当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript FrameworkConfiguration.globalResources方法代码示例

本文整理汇总了TypeScript中aurelia-framework.FrameworkConfiguration.globalResources方法的典型用法代码示例。如果您正苦于以下问题:TypeScript FrameworkConfiguration.globalResources方法的具体用法?TypeScript FrameworkConfiguration.globalResources怎么用?TypeScript FrameworkConfiguration.globalResources使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在aurelia-framework.FrameworkConfiguration的用法示例。


在下文中一共展示了FrameworkConfiguration.globalResources方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: configure

export function configure(frameworkConfig: FrameworkConfiguration, callback?: (config: PluginOptions) => void) {
  const logger = getLogger('aurelia-json-schema-form');

  logger.info('initializing aurelia-json-schema-form');

  // create defaults/apply user defined configuration
  const options = new PluginOptions();
  if (callback instanceof Function) {
    callback(options);
  }

  registerLogger(logger, options, frameworkConfig);

  registerConfiguration(logger, options, frameworkConfig);

  (frameworkConfig.container.get(RulesFactory) as RulesFactory).register();

  frameworkConfig.globalResources([
    PLATFORM.moduleName('./form/au-json-schema-form'),
    PLATFORM.moduleName('./value-converters/sf-number-value-converter'),
    PLATFORM.moduleName('./value-converters/sf-array-can-remove-value-converter'),
    PLATFORM.moduleName('./value-converters/sf-boolean-is-read-only-value-converter'),
    PLATFORM.moduleName('./form/array/sf-array'),
    PLATFORM.moduleName('./form/object/sf-object'),
    PLATFORM.moduleName('./form/number/sf-number'),
    PLATFORM.moduleName('./form/text/sf-string'),
    PLATFORM.moduleName('./form/boolean/sf-boolean'),
    PLATFORM.moduleName('./templates/bootstrap4/bootstrap-tooltip')
  ]);
}
开发者ID:jbockle,项目名称:aurelia-json-schema-form,代码行数:30,代码来源:index.ts

示例2: configure

export function configure(aurelia: FrameworkConfiguration) {
    aurelia.globalResources([
        PLATFORM.moduleName('./tree-view/tree-node'),
        PLATFORM.moduleName('./tree-view/tree-node-template'),
        PLATFORM.moduleName('./tree-view/tree-view')
    ]);
}
开发者ID:Thanood,项目名称:aurelia-tree-view,代码行数:7,代码来源:index.ts

示例3: configure

export function configure(config: FrameworkConfiguration) {
  config.globalResources([
    PLATFORM.moduleName('./elements/bootstrap-tooltip'),
    PLATFORM.moduleName('./elements/loading-indicator'),
    PLATFORM.moduleName('./value-converters/date-format')
  ]);
}
开发者ID:ghiscoding,项目名称:Realtime-TODO-Aurelia-RethinkDB,代码行数:7,代码来源:index.ts

示例4: configure

export function configure(config: FrameworkConfiguration) {
  config.globalResources([
      "./elements/loading-indicator",
      "./elements/date-picker",
      "./dialogs/message-box",
      "./value-converters/dateFormat"
  ]);
}
开发者ID:rajajhansi,项目名称:aspnetcore-aurelia-tutorial,代码行数:8,代码来源:index.ts

示例5: configure

export function configure(config: FrameworkConfiguration) {
  config.globalResources([
    './number-value',
    './registration-form',
    './trigger-form',
    './validation-errors-form-one',
    './nullable-object-form'
  ]);
}
开发者ID:StrahilKazlachev,项目名称:validation,代码行数:9,代码来源:index.ts

示例6: configure

export function configure(config: FrameworkConfiguration) {
  config.globalResources([
    './components/nav-bar',
    './components/pagination.html',
    './components/list-search.html',

    './value-converters/upper'
  ]);
}
开发者ID:effervescentia,项目名称:aurelia-sails-boilerplate-frontend,代码行数:9,代码来源:index.ts

示例7: configure

export function configure(frameworkConfig: FrameworkConfiguration, config: CoreConfig): Promise<void> {
	frameworkConfig.singleton(RouteMapper);
	frameworkConfig.globalResources([
		PLATFORM.moduleName("./routing/route-active/route-active.attribute"),
		PLATFORM.moduleName("./routing/route-href/route-href.attribute")
	]);

	Object.assign(routeActiveConfig, config.routeActive);
	return Promise.resolve();
}
开发者ID:sketch7,项目名称:ssv-au-core,代码行数:10,代码来源:config.ts

示例8: configure

export function configure(fc: FrameworkConfiguration){
  fc.globalResources([
    './ui/elements/title-bar.html',
    './ui/elements/nav-bar',
    './ui/elements/post-summary',
    './ui/elements/post-object',
    './ui/elements/post-editor',
    './ui/command/command-ext',
    './ui/converters/common'
  ]);
}
开发者ID:avizcaino,项目名称:avizcaino.github.io,代码行数:11,代码来源:index.ts

示例9: configure

export function configure(config: FrameworkConfiguration) {
  config.globalResources([
    // elements
    // './elements/nav-bar',
    // './elements/pagination.html',

    // attributes
    // './attributes/authOnly',
    // './attributes/themeable'

    // binding behaviors
    // './throttleOnNetwork'

    // value converters
    // './value-converters/upperCase'
  ]);
}
开发者ID:effervescentia,项目名称:generator-aurelia-sails,代码行数:17,代码来源:index.ts

示例10: configure

export function configure(config: FrameworkConfiguration, configCallback) {
  config.container.registerHandler('ui-validator', container => container.get(UIValidationRenderer));

  config.globalResources([
    './elements/core/ui-viewport',
    './elements/core/ui-page',
    './elements/core/ui-grid'
  ]);
  config.globalResources([
    './elements/components/ui-tab',
    './elements/components/ui-menu',
    './elements/components/ui-panel',
    './elements/components/ui-drawer',
    './elements/components/ui-tree',
    './elements/components/ui-datagrid'
  ]);
  config.globalResources([
    './elements/inputs/ui-button',
    './elements/inputs/ui-input',
    './elements/inputs/ui-option',
    './elements/inputs/ui-markdown',
    './elements/inputs/ui-list',
    './elements/inputs/ui-date'
  ]);
  config.globalResources([
    './attributes/ui-marked',
    './attributes/ui-badge'
  ]);
  config.globalResources([
    './value-converters/ui-text',
    './value-converters/ui-lodash'
  ]);

  var Configure = {
    title: (t) => {
      UIConstants.App.Title = t;
      return Configure;
    },
    version: (t) => {
      UIConstants.App.Version = t;
      return Configure;
    },
    appKey: (t) => {
      UIConstants.App.Key = t;
      return Configure;
    },
    apiUrl: (t) => {
      UIConstants.Http.BaseUrl = t;
      return Configure;
    },
    apiHeaders: (t) => {
      UIConstants.Http.Headers = t;
      return Configure;
    },
    sendAuthHeader: (t) => {
      UIConstants.Http.AuthorizationHeader = t;
      return Configure;
    },
    languages: (l) => {
      UIConstants.Languages = l;
      return Configure;
    }
  };

  if (configCallback !== undefined && typeof configCallback === 'function') {
    configCallback(Configure);
  }

  // Validation Rules
  ValidationRules
    .customRule('phone', (value, obj) => value === null || value === undefined || value === '' || PhoneLib.isValid(value), '\${$displayName } is not a valid phone number.');
  ValidationRules
    .customRule('integer', (value, obj, min, max) => value === null || value === undefined || value === '' || (Number.isInteger(value) && value >= (isEmpty(min) ? Number.MIN_VALUE : min) && value <= (isEmpty(max) ? Number.MAX_VALUE : max)),
    '\${$displayName} must be an integer value between \${$config.min} and \${$config.max}.', (min, max) => ({ min, max }));
  ValidationRules
    .customRule('decimal', (value, obj, min, max) => value === null || value === undefined || value === '' || (isNumber(value) && Math.floor(value % 1) === 0 && value >= (isEmpty(min) ? Number.MIN_VALUE : min) && value <= (isEmpty(max) ? Number.MAX_VALUE : max)),
    '\${$displayName} must be a decimal value between \${$config.min} and \${$config.max}.', (min, max) => ({ min, max }));
  ValidationRules
    .customRule('language', (map, obj, controller, langInput) => {
      if (!(langInput && langInput.addError && langInput.removeError)) throw new Error('Language validation must have reference to ui-language');
      let promises = [];
      _.forEach(map, (model, key) => {
        promises.push(controller.validator.validateObject(model)
          .then(e => {
            if (langInput.errors.indexOf(key) > -1) langInput.removeError(key);
            if (e.length > 0) langInput.addError(key);
            return e.length > 0 ? true : false;
          }));
      });
      return Promise.all(promises).then(e => _.filter(e).length == 0);
    }, 'Some language entries contain invalid values');

  // Setup kramed
  let rend = new kramed.Renderer();
  rend.code = (code, lang) => {
    if (window.hljs) {
      window.hljs.configure({
        useBR: true,
        tabReplace: '    '
      });
//.........这里部分代码省略.........
开发者ID:sigmaframeworks,项目名称:sigma-ui-framework,代码行数:101,代码来源:index.ts


注:本文中的aurelia-framework.FrameworkConfiguration.globalResources方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。