@mediafly/js-ui 50.0.1-beta.2 → 50.0.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/feedback/feedback.component.js.map +1 -1
- package/lib/translate/translate-factory.js +28 -23
- package/lib/translate/translate-factory.js.map +1 -1
- package/lib/tsconfig.deploy.tsbuildinfo +2 -2
- package/package.json +1 -1
- package/src/components/feedback/feedback.component.ts +0 -1
- package/src/components/translate/translate-factory.ts +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback.component.js","sourceRoot":"","sources":["../../src/components/feedback/feedback.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sDAA6B;AAC7B,8CAAiD;AACjD,4EAAkD;
|
|
1
|
+
{"version":3,"file":"feedback.component.js","sourceRoot":"","sources":["../../src/components/feedback/feedback.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sDAA6B;AAC7B,8CAAiD;AACjD,4EAAkD;AAsBlD,IAAqB,eAAe,GAApC,MAAqB,eAAe;IAInC,YAC8B,SAA8B,EAC7B,UAAgC,EACjC,SAAuC,EAC5C,IAAoB,EAChB,QAA4B,EACpB,gBAAkC,EAClC,gBAAgB;QANvB,cAAS,GAAT,SAAS,CAAqB;QAC7B,eAAU,GAAV,UAAU,CAAsB;QACjC,cAAS,GAAT,SAAS,CAA8B;QAC5C,SAAI,GAAJ,IAAI,CAAgB;QAChB,aAAQ,GAAR,QAAQ,CAAoB;QACpB,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,qBAAgB,GAAhB,gBAAgB,CAAA;QAV3C,WAAM,GAAa,EAAE,CAAA;IAW5B,CAAC;IAEJ,OAAO;QAEN,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,IAA8C,EAAE,EAAE;YAE7F,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC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-6,29 +6,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const angular_1 = __importDefault(require("angular"));
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
8
|
const index_strings_json_1 = __importDefault(require("../localization/index.strings.json"));
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
// Manually annotate this because otherwise Viewer's annotation setup has trouble with it.
|
|
10
|
+
angular_1.default.module('app').factory('translateFactory', [
|
|
11
|
+
'$injector',
|
|
12
|
+
'$log',
|
|
13
|
+
function translateFactory($injector, $log) {
|
|
14
|
+
let $translate;
|
|
15
|
+
try {
|
|
16
|
+
$translate = $injector.get('$translate', 'translateFactory');
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
$log.info('angular-translate is not available');
|
|
20
|
+
}
|
|
21
|
+
const defaultText = {
|
|
22
|
+
JSUI: index_strings_json_1.default
|
|
23
|
+
};
|
|
24
|
+
function instant(KEY, options) {
|
|
25
|
+
if ($translate) {
|
|
26
|
+
return $translate.instant(KEY, options);
|
|
27
|
+
}
|
|
28
|
+
let text = lodash_1.default.get(defaultText, KEY);
|
|
29
|
+
lodash_1.default.forIn(options, (value, key) => {
|
|
30
|
+
text = text.replace(`{{ ${key} }}`, value);
|
|
31
|
+
});
|
|
32
|
+
return text;
|
|
23
33
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
28
|
-
return text;
|
|
34
|
+
return {
|
|
35
|
+
instant
|
|
36
|
+
};
|
|
29
37
|
}
|
|
30
|
-
|
|
31
|
-
instant
|
|
32
|
-
};
|
|
33
|
-
});
|
|
38
|
+
]);
|
|
34
39
|
//# sourceMappingURL=translate-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translate-factory.js","sourceRoot":"","sources":["../../src/components/translate/translate-factory.ts"],"names":[],"mappings":";;;;;AAAA,sDAA6B;AAC7B,oDAAsB;AACtB,4FAAoE;
|
|
1
|
+
{"version":3,"file":"translate-factory.js","sourceRoot":"","sources":["../../src/components/translate/translate-factory.ts"],"names":[],"mappings":";;;;;AAAA,sDAA6B;AAC7B,oDAAsB;AACtB,4FAAoE;AAOpE,0FAA0F;AAC1F,iBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE;IACjD,WAAW;IACX,MAAM;IACN,SAAS,gBAAgB,CAAC,SAAmC,EAAE,IAAoB;QAEnF,IAAI,UAA0C,CAAA;QAE9C,IAAI;YACH,UAAU,GAAG,SAAS,CAAC,GAAG,CAAiC,YAAY,EAAE,kBAAkB,CAAC,CAAA;SAC5F;QAAC,OAAO,KAAK,EAAE;YACf,IAAI,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAA;SAC/C;QAED,MAAM,WAAW,GAAG;YACnB,IAAI,EAAE,4BAAmB;SACzB,CAAA;QAED,SAAS,OAAO,CAAC,GAAG,EAAE,OAAmC;YAExD,IAAI,UAAU,EAAE;gBACf,OAAO,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;aACvC;YAED,IAAI,IAAI,GAAW,gBAAC,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAA;YAE1C,gBAAC,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;gBAC/B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,EAAE,KAAK,CAAC,CAAA;YAC3C,CAAC,CAAC,CAAA;YAEF,OAAO,IAAI,CAAA;QACZ,CAAC;QAED,OAAO;YACN,OAAO;SACP,CAAA;IACF,CAAC;CAAC,CAAC,CAAA"}
|
|
@@ -442,7 +442,7 @@
|
|
|
442
442
|
"affectsGlobalScope": true
|
|
443
443
|
},
|
|
444
444
|
"../src/components/translate/translate-factory.ts": {
|
|
445
|
-
"version": "
|
|
445
|
+
"version": "8b5b21865ee5166438baee8fa0252450ab0ba42aafe1699a83c35c551c736089",
|
|
446
446
|
"signature": "9fca8856bb1069d424bd7b0d097df939bda4dfd4f831ed339e72eaeb44f809cb",
|
|
447
447
|
"affectsGlobalScope": false
|
|
448
448
|
},
|
|
@@ -952,7 +952,7 @@
|
|
|
952
952
|
"affectsGlobalScope": false
|
|
953
953
|
},
|
|
954
954
|
"../src/components/feedback/feedback.component.ts": {
|
|
955
|
-
"version": "
|
|
955
|
+
"version": "23eac075b4a5d89e3117a8df613d9c9d34f5bc30411b876ff275eae422e0b590",
|
|
956
956
|
"signature": "1fc7ff73de6ed466d823d26c80dd1122ae9e0c3c5e1663f18bd532c32d60d887",
|
|
957
957
|
"affectsGlobalScope": false
|
|
958
958
|
},
|
package/package.json
CHANGED
|
@@ -22,7 +22,6 @@ export interface FeedbackOptions {
|
|
|
22
22
|
selector: 'feedbackManager',
|
|
23
23
|
template: require('./feedback.component.html')
|
|
24
24
|
})
|
|
25
|
-
|
|
26
25
|
export default class FeedbackManager implements ng.IComponentController {
|
|
27
26
|
protected alerts: object[] = []
|
|
28
27
|
private timer: ng.IPromise<any> | undefined
|
|
@@ -7,8 +7,11 @@ export interface TranslateFactory {
|
|
|
7
7
|
instant: (KEY: string, options?: Record<string, string>) => string
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
angular.module('app').factory('translateFactory',
|
|
10
|
+
// Manually annotate this because otherwise Viewer's annotation setup has trouble with it.
|
|
11
|
+
angular.module('app').factory('translateFactory', [
|
|
12
|
+
'$injector',
|
|
13
|
+
'$log',
|
|
14
|
+
function translateFactory($injector: ng.auto.IInjectorService, $log: ng.ILogService) {
|
|
12
15
|
|
|
13
16
|
let $translate: ng.translate.ITranslateService
|
|
14
17
|
|
|
@@ -40,4 +43,4 @@ angular.module('app').factory('translateFactory', function translateFactory($inj
|
|
|
40
43
|
return {
|
|
41
44
|
instant
|
|
42
45
|
}
|
|
43
|
-
})
|
|
46
|
+
}])
|