##// END OF EJS Templates
Fixed startup of DjxWidgetBase to start inner widgets...
Fixed startup of DjxWidgetBase to start inner widgets added some traits to tsx/traits : destroy, emptyNode, startupWidgets

File last commit:

r46:ed3c20c09b00 v1.0.2 default
r52:0b9593714536 default
Show More
i18n.ts
38 lines | 1.0 KiB | video/mp2t | TypeScriptLexer
cin
Initial commit, copied files related to .tsx scripts support.
r0 import { MapOf } from "@implab/core-amd/interfaces";
import { NlsBundle } from "./NlsBundle";
import { isPromise } from "@implab/core-amd/safe";
cin
Fixed i18n exports
r44 export interface OnLoad {
cin
fixes to css, nls to support requirejs optimizer
r36 (result?: any): void;
error(err: any): void;
}
cin
Initial commit, copied files related to .tsx scripts support.
r0 export function bundle<T extends object>(nls: T, locales?: MapOf<any>) {
const nlsBundle = new NlsBundle(nls, locales);
const fn = (locale?: string) => {
cin
created typings for basic part of dojo and dijit further work is required to...
r2 const result = locale ? nlsBundle.getLocale(locale) : nlsBundle.default;
cin
Initial commit, copied files related to .tsx scripts support.
r0 if (isPromise(result))
throw new Error(`The bundle '${locale}' isn't loaded`);
else
return result;
};
fn.define = (pack: Partial<T>) => pack;
fn.default = nlsBundle.default;
cin
fixes to css, nls to support requirejs optimizer
r36 fn.load = async (id: string, require: Require, cb: OnLoad, config: any) => {
cin
Fixed loading i18n with dojo module loader
r46 if (config && config.isBuild) {
cin
Initial commit, copied files related to .tsx scripts support.
r0 cb();
cin
fixes to css, nls to support requirejs optimizer
r36 } else {
try {
await nlsBundle.getLocale(id);
cb();
} catch (e) {
cb.error(e);
}
cin
Initial commit, copied files related to .tsx scripts support.
r0 }
};
return fn;
}