@farris/jit-engine 1.3.351 → 1.3.352
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/README.md +6 -22
- package/lib/domstructure/devkit/module/module.js +216 -216
- package/lib/domstructure/devkit/module/module.js.map +1 -1
- package/lib/domstructure/ui/common/binding.js +1 -1
- package/lib/domstructure/ui/data/index.js +68 -69
- package/lib/domstructure/ui/data/index.js.map +1 -1
- package/lib/domstructure/ui/queryScheme/query-scheme.js +0 -3
- package/lib/domstructure/ui/queryScheme/query-scheme.js.map +1 -1
- package/lib/mobileapp/vue/code-generator/file-generator/app-generator/vue-app-index-vue-generator.js +93 -93
- package/lib/mobileapp/vue/code-generator/file-generator/app-generator/vue-app-index-vue-generator.js.map +1 -1
- package/lib/template/ui/kendo/adminorganization-selector.pug +101 -101
- package/lib/template/ui/kendo/appointment-calendar.pug +39 -39
- package/lib/template/ui/kendo/button.pug +16 -16
- package/lib/template/ui/kendo/buttongroup.pug +7 -7
- package/lib/template/ui/kendo/chart.pug +9 -9
- package/lib/template/ui/kendo/checkbox.pug +118 -118
- package/lib/template/ui/kendo/checkboxgroup.pug +63 -63
- package/lib/template/ui/kendo/city-selector.pug +69 -69
- package/lib/template/ui/kendo/combobox.pug +70 -70
- package/lib/template/ui/kendo/componentref.pug +3 -3
- package/lib/template/ui/kendo/contentcontainer.pug +8 -8
- package/lib/template/ui/kendo/datepicker.pug +70 -70
- package/lib/template/ui/kendo/dialog.pug +10 -10
- package/lib/template/ui/kendo/dropdownlist.pug +18 -18
- package/lib/template/ui/kendo/dynamic-area-item.pug +1 -1
- package/lib/template/ui/kendo/employee-selector.pug +96 -96
- package/lib/template/ui/kendo/externalContainer.pug +12 -12
- package/lib/template/ui/kendo/externalRouteContainer.pug +1 -1
- package/lib/template/ui/kendo/farris-avatar.pug +18 -18
- package/lib/template/ui/kendo/farris-calendar.pug +5 -5
- package/lib/template/ui/kendo/farris-checkbox-group.pug +96 -96
- package/lib/template/ui/kendo/farris-combo-list.pug +111 -111
- package/lib/template/ui/kendo/farris-datagrid-template.pug +21 -21
- package/lib/template/ui/kendo/farris-datagrid.pug +37 -37
- package/lib/template/ui/kendo/farris-datepicker.pug +118 -118
- package/lib/template/ui/kendo/farris-dynamic-control-group.pug +14 -14
- package/lib/template/ui/kendo/farris-ext-intergration.pug +79 -79
- package/lib/template/ui/kendo/farris-file-preview.pug +6 -6
- package/lib/template/ui/kendo/farris-file-upload-preview.pug +1 -1
- package/lib/template/ui/kendo/farris-file-upload.pug +3 -3
- package/lib/template/ui/kendo/farris-light-list-filter.pug +10 -10
- package/lib/template/ui/kendo/farris-list-filter.pug +11 -11
- package/lib/template/ui/kendo/farris-list-view.pug +28 -27
- package/lib/template/ui/kendo/farris-number-range.pug +98 -98
- package/lib/template/ui/kendo/farris-number-spinner.pug +103 -103
- package/lib/template/ui/kendo/farris-query-solution.pug +17 -18
- package/lib/template/ui/kendo/farris-scrollspy.pug +10 -10
- package/lib/template/ui/kendo/farris-splitter-pane.pug +11 -11
- package/lib/template/ui/kendo/farris-splitter.pug +6 -6
- package/lib/template/ui/kendo/farris-switch.pug +88 -88
- package/lib/template/ui/kendo/farris-tags.pug +70 -70
- package/lib/template/ui/kendo/farris-time-picker.pug +102 -102
- package/lib/template/ui/kendo/farris-time-spinner.pug +71 -71
- package/lib/template/ui/kendo/farris-ui-footer.pug +15 -15
- package/lib/template/ui/kendo/farris-wizard-page-detail.pug +14 -14
- package/lib/template/ui/kendo/farris-wizard.pug +8 -8
- package/lib/template/ui/kendo/farrissidebar.pug +26 -26
- package/lib/template/ui/kendo/farristabpage.pug +14 -14
- package/lib/template/ui/kendo/farristabs.pug +13 -13
- package/lib/template/ui/kendo/farristag.pug +6 -6
- package/lib/template/ui/kendo/fieldset.pug +20 -20
- package/lib/template/ui/kendo/flexlayout.pug +5 -5
- package/lib/template/ui/kendo/form.pug +15 -15
- package/lib/template/ui/kendo/grid.pug +83 -83
- package/lib/template/ui/kendo/header.pug +9 -9
- package/lib/template/ui/kendo/hidden-container.pug +1 -1
- package/lib/template/ui/kendo/image-upload.pug +82 -82
- package/lib/template/ui/kendo/image.pug +18 -18
- package/lib/template/ui/kendo/input-group.pug +96 -96
- package/lib/template/ui/kendo/label.pug +18 -18
- package/lib/template/ui/kendo/lookup-employee.pug +109 -109
- package/lib/template/ui/kendo/lookup.pug +113 -113
- package/lib/template/ui/kendo/loop-container.pug +1 -1
- package/lib/template/ui/kendo/menu.pug +3 -3
- package/lib/template/ui/kendo/menuitem.pug +7 -7
- package/lib/template/ui/kendo/modal-footer.pug +9 -9
- package/lib/template/ui/kendo/multi-view-container.pug +7 -7
- package/lib/template/ui/kendo/multi-view-item.pug +8 -8
- package/lib/template/ui/kendo/multitextbox.pug +101 -101
- package/lib/template/ui/kendo/numericbox.pug +70 -70
- package/lib/template/ui/kendo/oa-relation.pug +20 -20
- package/lib/template/ui/kendo/organization-selector.pug +116 -116
- package/lib/template/ui/kendo/p-treetable.pug +28 -28
- package/lib/template/ui/kendo/popup.pug +3 -3
- package/lib/template/ui/kendo/portlet.pug +2 -2
- package/lib/template/ui/kendo/primeng-edittree/checkbox.pug +12 -12
- package/lib/template/ui/kendo/primeng-edittree/farris-combo-list.pug +16 -16
- package/lib/template/ui/kendo/primeng-edittree/farris-combo-lookup.pug +19 -19
- package/lib/template/ui/kendo/primeng-edittree/farris-datepicker.pug +31 -31
- package/lib/template/ui/kendo/primeng-edittree/farris-number-spinner.pug +18 -18
- package/lib/template/ui/kendo/primeng-edittree/farris-switch.pug +13 -13
- package/lib/template/ui/kendo/primeng-edittree/farris-time-picker.pug +17 -17
- package/lib/template/ui/kendo/primeng-edittree/input-group.pug +14 -14
- package/lib/template/ui/kendo/primeng-edittree/language-textbox.pug +14 -14
- package/lib/template/ui/kendo/primeng-edittree/lookup.pug +32 -32
- package/lib/template/ui/kendo/primeng-edittree/multitextbox.pug +17 -17
- package/lib/template/ui/kendo/primeng-edittree/textbox.pug +18 -18
- package/lib/template/ui/kendo/qdp-condition-dialog-tab.pug +3 -3
- package/lib/template/ui/kendo/qdp-condition-dialog.pug +3 -3
- package/lib/template/ui/kendo/qdpframework.pug +15 -15
- package/lib/template/ui/kendo/queryform.pug +7 -7
- package/lib/template/ui/kendo/radiobox.pug +60 -60
- package/lib/template/ui/kendo/radioboxgroup.pug +94 -94
- package/lib/template/ui/kendo/richtextbox.pug +53 -53
- package/lib/template/ui/kendo/scroll-collapse-area.pug +2 -2
- package/lib/template/ui/kendo/section.pug +44 -44
- package/lib/template/ui/kendo/select.pug +46 -46
- package/lib/template/ui/kendo/spreadsheet.pug +7 -7
- package/lib/template/ui/kendo/switch.pug +67 -67
- package/lib/template/ui/kendo/tab.pug +3 -3
- package/lib/template/ui/kendo/table/adminorganization-selector.pug +73 -73
- package/lib/template/ui/kendo/table/checkbox.pug +92 -92
- package/lib/template/ui/kendo/table/checkboxgroup.pug +30 -30
- package/lib/template/ui/kendo/table/combobox.pug +49 -49
- package/lib/template/ui/kendo/table/datepicker.pug +49 -49
- package/lib/template/ui/kendo/table/employee-selector.pug +70 -70
- package/lib/template/ui/kendo/table/farris-avatar.pug +25 -25
- package/lib/template/ui/kendo/table/farris-checkbox-group.pug +47 -47
- package/lib/template/ui/kendo/table/farris-combo-list.pug +60 -60
- package/lib/template/ui/kendo/table/farris-combo-lookup.pug +30 -30
- package/lib/template/ui/kendo/table/farris-datepicker.pug +61 -61
- package/lib/template/ui/kendo/table/farris-number-range.pug +59 -59
- package/lib/template/ui/kendo/table/farris-number-spinner.pug +61 -61
- package/lib/template/ui/kendo/table/farris-static-text.pug +3 -3
- package/lib/template/ui/kendo/table/farris-switch.pug +55 -55
- package/lib/template/ui/kendo/table/farris-table-column.pug +1 -1
- package/lib/template/ui/kendo/table/farris-table-row.pug +1 -1
- package/lib/template/ui/kendo/table/farris-tags.pug +55 -55
- package/lib/template/ui/kendo/table/farris-time-picker.pug +51 -51
- package/lib/template/ui/kendo/table/farris-time-spinner.pug +25 -25
- package/lib/template/ui/kendo/table/input-group.pug +46 -46
- package/lib/template/ui/kendo/table/lookup-employee.pug +71 -71
- package/lib/template/ui/kendo/table/lookup.pug +75 -75
- package/lib/template/ui/kendo/table/multitextbox.pug +47 -47
- package/lib/template/ui/kendo/table/numericbox.pug +59 -59
- package/lib/template/ui/kendo/table/organization-selector.pug +75 -75
- package/lib/template/ui/kendo/table/radiobox.pug +27 -27
- package/lib/template/ui/kendo/table/radioboxgroup.pug +47 -47
- package/lib/template/ui/kendo/table/richtextbox.pug +30 -30
- package/lib/template/ui/kendo/table/select.pug +21 -21
- package/lib/template/ui/kendo/table/switch.pug +55 -55
- package/lib/template/ui/kendo/table/textbox.pug +53 -53
- package/lib/template/ui/kendo/table/timebox.pug +33 -33
- package/lib/template/ui/kendo/table/timepicker.pug +25 -25
- package/lib/template/ui/kendo/table/tinymcerichtextbox.pug +36 -36
- package/lib/template/ui/kendo/tabpage.pug +10 -10
- package/lib/template/ui/kendo/template.pug +2 -2
- package/lib/template/ui/kendo/textbox.pug +98 -98
- package/lib/template/ui/kendo/timebox.pug +47 -47
- package/lib/template/ui/kendo/timepicker.pug +17 -17
- package/lib/template/ui/kendo/tinymcerichtextbox.pug +59 -59
- package/lib/template/ui/kendo/toolbar.pug +5 -5
- package/lib/template/ui/kendo/view-change.pug +1 -1
- package/lib/template/ui/kendo/wizarddetailcontainer.pug +6 -6
- package/lib/utility/config-hepler.js.map +1 -1
- package/lib/utility/declaration-trigger.js +3 -0
- package/lib/utility/devkit/component-creator.js +191 -192
- package/lib/utility/devkit/component-creator.js.map +1 -1
- package/lib/utility/devkit/component-parameter-collector/component-parameter-collector-manager.js +221 -222
- package/lib/utility/devkit/component-parameter-collector/component-parameter-collector-manager.js.map +1 -1
- package/lib/utility/devkit/component-parameter-collector/component-parameter-collector-type.js +56 -57
- package/lib/utility/devkit/component-parameter-collector/component-parameter-collector-type.js.map +1 -1
- package/lib/utility/devkit/component-parameter-collector/farris-lookup-collector.js +64 -64
- package/lib/utility/devkit/component-parameter-collector/farris-lookup-collector.js.map +1 -1
- package/lib/utility/devkit/form-file-executor.js +1 -6
- package/lib/utility/devkit/form-file-executor.js.map +1 -1
- package/lib/utility/devkit/module-creator.js +167 -170
- package/lib/utility/devkit/module-creator.js.map +1 -1
- package/lib/utility/farris-datagrid/column-editor-manager.js +111 -115
- package/lib/utility/farris-datagrid/column-editor-manager.js.map +1 -1
- package/lib/utility/farris-datagrid/farris-grid-column-type-convertor.js +105 -112
- package/lib/utility/farris-datagrid/farris-grid-column-type-convertor.js.map +1 -1
- package/lib/utility/i18n/i18n-resource-manager.js +237 -237
- package/lib/utility/i18n/i18n-resource-manager.js.map +1 -1
- package/lib/utility/i18n/index.js +13 -13
- package/lib/utility/template-generator/devkit/lang-template-generator.js +2 -37
- package/lib/utility/template-generator/devkit/lang-template-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/module-generator/index.js +19 -19
- package/lib/utility/template-generator/devkit/module-generator/module-import-statement-generator.js +303 -304
- package/lib/utility/template-generator/devkit/module-generator/module-import-statement-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/module-generator/module-imports-statement-generator.js +282 -300
- package/lib/utility/template-generator/devkit/module-generator/module-imports-statement-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/module-generator/module-providers-generator.js +158 -158
- package/lib/utility/template-generator/devkit/module-generator/module-providers-generator.js.map +1 -1
- package/package.json +1 -1
- package/lib/domstructure/ui/data/fields/form/editable/inputs/reference/external-service-lookup.js +0 -48
- package/lib/domstructure/ui/data/fields/form/editable/inputs/reference/external-service-lookup.js.map +0 -1
- package/lib/template/ui/kendo/light-lookup.pug +0 -183
- package/lib/utility/farris-datagrid/external-service-lookup-editor.js +0 -96
- package/lib/utility/farris-datagrid/external-service-lookup-editor.js.map +0 -1
- package/lib/utility/template-generator/advanced-component-recognizer.js +0 -75
- package/lib/utility/template-generator/advanced-component-recognizer.js.map +0 -1
- package/lib/utility/template-generator/devkit-template-config.js +0 -580
- package/lib/utility/template-generator/devkit-template-config.js.map +0 -1
- package/lib/utility/template-generator/external-service-lookup-checker.js +0 -28
- package/lib/utility/template-generator/external-service-lookup-checker.js.map +0 -1
|
@@ -1,238 +1,238 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.I18nResourceManager = void 0;
|
|
4
|
-
const build_file_version_constants_1 = require("../build-file-version/build-file-version-constants");
|
|
5
|
-
const build_file_version_manager_1 = require("../build-file-version/build-file-version-manager");
|
|
6
|
-
const directory_file_helper_1 = require("../directory-file-helper");
|
|
7
|
-
const logger_helper_1 = require("../logger/logger-helper");
|
|
8
|
-
const toolhepler_1 = require("../toolhepler");
|
|
9
|
-
class I18nResourceManager {
|
|
10
|
-
static generateI18nResourceId(id, prefix) {
|
|
11
|
-
if (id && id.indexOf(".") >= 0) {
|
|
12
|
-
id = toolhepler_1.ToolHelper.replaceDotToXiaHuaXian(id);
|
|
13
|
-
}
|
|
14
|
-
if (prefix) {
|
|
15
|
-
return prefix.toLowerCase() + "_" + id;
|
|
16
|
-
}
|
|
17
|
-
return id;
|
|
18
|
-
}
|
|
19
|
-
static generateI18nResourceIdWithoutPrefix(id) {
|
|
20
|
-
return this.generateI18nResourceId(id, null);
|
|
21
|
-
}
|
|
22
|
-
static generateI18nResourceKeyPrefix(source, ...args) {
|
|
23
|
-
if (!args || args.length == 0) {
|
|
24
|
-
return source.toLowerCase();
|
|
25
|
-
}
|
|
26
|
-
let generatedParameter = "";
|
|
27
|
-
for (let i = 0; i < args.length; i++) {
|
|
28
|
-
if (i == 0) {
|
|
29
|
-
generatedParameter = args[i];
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
generatedParameter = generatedParameter + "_" + args[i];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (source) {
|
|
36
|
-
return (source + "_" + generatedParameter).toLowerCase();
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
return generatedParameter.toLowerCase();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
static generateI18nState(i18nResourceKey, defaultValue, useQuote = true) {
|
|
43
|
-
if (toolhepler_1.ToolHelper.isNullOrUndefined(defaultValue)) {
|
|
44
|
-
defaultValue = "";
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
defaultValue = toolhepler_1.ToolHelper.removeNewLineParameter(defaultValue);
|
|
48
|
-
}
|
|
49
|
-
if (useQuote == true) {
|
|
50
|
-
return `this.langService.transform("${i18nResourceKey}", this.lang, "${defaultValue}")`;
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
return `this.langService.transform(${i18nResourceKey}, this.lang, ${defaultValue})`;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
static generateEnumFieldResourceId(componentId, fieldValue) {
|
|
57
|
-
let enumFieldResourceId;
|
|
58
|
-
if (toolhepler_1.ToolHelper.isNullOrUndefined(fieldValue) == false) {
|
|
59
|
-
enumFieldResourceId = "EnumField/" + componentId + "/enumData/" + fieldValue;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
enumFieldResourceId = "EnumField/" + componentId;
|
|
63
|
-
}
|
|
64
|
-
return enumFieldResourceId;
|
|
65
|
-
}
|
|
66
|
-
static generateNavTabDataResourceId(componentId, fieldValue) {
|
|
67
|
-
let navDataResourceId;
|
|
68
|
-
if (toolhepler_1.ToolHelper.isNullOrUndefined(fieldValue) == false) {
|
|
69
|
-
navDataResourceId = "NavTab/" + componentId + "/navData/" + fieldValue;
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
navDataResourceId = "NavTab/" + componentId;
|
|
73
|
-
}
|
|
74
|
-
return navDataResourceId;
|
|
75
|
-
}
|
|
76
|
-
static generateImageAltResourceId(componentId) {
|
|
77
|
-
return "Image/" + componentId + "/alt";
|
|
78
|
-
}
|
|
79
|
-
static generateAvatarImgTitleResourceId(componentId) {
|
|
80
|
-
return "Avatar/" + componentId + "/imgTitle";
|
|
81
|
-
}
|
|
82
|
-
static generateViewChangeToolbarDataResourceId(componentId, fieldValue) {
|
|
83
|
-
let navDataResourceId;
|
|
84
|
-
if (toolhepler_1.ToolHelper.isNullOrUndefined(fieldValue) == false) {
|
|
85
|
-
navDataResourceId = "ViewChange/" + componentId + "/toolbarData/" + fieldValue;
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
navDataResourceId = "ViewChange/" + componentId;
|
|
89
|
-
}
|
|
90
|
-
return navDataResourceId;
|
|
91
|
-
}
|
|
92
|
-
static generateTagsDataResourceId(componentId, fieldId) {
|
|
93
|
-
let enumFieldResourceId;
|
|
94
|
-
if (toolhepler_1.ToolHelper.isNullOrUndefined(fieldId) == false) {
|
|
95
|
-
enumFieldResourceId = "Tags/" + componentId + "/tagData/" + fieldId;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
enumFieldResourceId = "Tags/" + componentId;
|
|
99
|
-
}
|
|
100
|
-
return enumFieldResourceId;
|
|
101
|
-
}
|
|
102
|
-
static generateCheckGroupItemResourceId(componentId, itemValue) {
|
|
103
|
-
let checkGroupItemResourceId;
|
|
104
|
-
if (toolhepler_1.ToolHelper.isNullOrUndefined(itemValue) == false) {
|
|
105
|
-
checkGroupItemResourceId = "CheckGroup/" + componentId + "/" + itemValue;
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
checkGroupItemResourceId = "CheckGroup/" + componentId;
|
|
109
|
-
}
|
|
110
|
-
return checkGroupItemResourceId;
|
|
111
|
-
}
|
|
112
|
-
static generateAnatarImgTitleResourceId(componentId) {
|
|
113
|
-
return "Avatar/" + componentId + "/imgTitle";
|
|
114
|
-
}
|
|
115
|
-
static generateFileUploadPreviewSelectTextResourceId(componentId) {
|
|
116
|
-
return `FileUploadPreview/${componentId}/uploadSelectText`;
|
|
117
|
-
}
|
|
118
|
-
static generateFileUploadPreviewDefaultNameResourceId(componentId) {
|
|
119
|
-
return `FileUploadPreview/${componentId}/previewDefaultRename`;
|
|
120
|
-
}
|
|
121
|
-
static generateFileUploadPreviewCustomInfoResourceId(componentId) {
|
|
122
|
-
return `FileUploadPreview/${componentId}/customInfo`;
|
|
123
|
-
}
|
|
124
|
-
static generateFileUploadFieldFormatterTrueText(fieldResourcePrefix, fieldId, columnField) {
|
|
125
|
-
return fieldResourcePrefix + "/" + fieldId + "/" + columnField + "/formatter/trueText";
|
|
126
|
-
}
|
|
127
|
-
static generateFileUploadFieldFormatterFalseText(fieldResourcePrefix, fieldId, columnField) {
|
|
128
|
-
return fieldResourcePrefix + "/" + fieldId + "/" + columnField + "/formatter/falseText";
|
|
129
|
-
}
|
|
130
|
-
static generateLookupDialogTitleResourceId(componentId
|
|
131
|
-
return
|
|
132
|
-
}
|
|
133
|
-
static generateFarrisGridLookupDialogTitleResourceId(gridFieldId, editorId) {
|
|
134
|
-
return `GridField/${gridFieldId}/editor/LookupEdit/${editorId}/dialogTitle`;
|
|
135
|
-
}
|
|
136
|
-
static generateSectionMainTitleResourceId(componentId) {
|
|
137
|
-
return "Section/" + componentId + "/mainTitle";
|
|
138
|
-
}
|
|
139
|
-
static generateSectionSubTitleResourceId(componentId) {
|
|
140
|
-
return "Section/" + componentId + "/subTitle";
|
|
141
|
-
}
|
|
142
|
-
static generateHeaderMainTitleResourceId(componentId) {
|
|
143
|
-
return "Header/" + componentId + "/mainTitle";
|
|
144
|
-
}
|
|
145
|
-
static generateHeaderSubTitleResourceId(componentId) {
|
|
146
|
-
return "Header/" + componentId + "/subTitle";
|
|
147
|
-
}
|
|
148
|
-
static generateScrollSpyItemResourceId(componentId, itemId) {
|
|
149
|
-
return `Scrollspy/${componentId}/items/${itemId}`;
|
|
150
|
-
}
|
|
151
|
-
static generateWizardProcessStepMessageResourceId(componentId, stepMessageId) {
|
|
152
|
-
return "Wizard/" + componentId + "/progressData/stepMessages/" + stepMessageId;
|
|
153
|
-
}
|
|
154
|
-
static generateRadioGroupEnumFieldResourceId(componentId, itemValue) {
|
|
155
|
-
let enumFieldResourceId;
|
|
156
|
-
if (toolhepler_1.ToolHelper.isNullOrUndefined(itemValue) == false) {
|
|
157
|
-
enumFieldResourceId = "RadioGroup/" + componentId + "/" + itemValue;
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
enumFieldResourceId = "RadioGroup/" + componentId;
|
|
161
|
-
}
|
|
162
|
-
return enumFieldResourceId;
|
|
163
|
-
}
|
|
164
|
-
static generateTreeGridEnumFieldResourceId(fieldId, itemValue) {
|
|
165
|
-
return `TreeGridField/${fieldId}/enumData/${itemValue}`;
|
|
166
|
-
}
|
|
167
|
-
static generateQuerySchemeFieldConfigNameResourceId(componentId, fieldConfigId) {
|
|
168
|
-
return "QueryScheme/" + componentId + "/" + fieldConfigId;
|
|
169
|
-
}
|
|
170
|
-
static generateListFilterFieldConfigNameResourceId(componentId, fieldConfigId) {
|
|
171
|
-
return "ListFilter/" + componentId + "/" + fieldConfigId;
|
|
172
|
-
}
|
|
173
|
-
static generateListFilterFieldConfigDropDownEnumValueResourceId(componentId, fieldId, enumValue) {
|
|
174
|
-
return "ListFilter/" + componentId + "/" + fieldId + "/" + "control/enumValues/" + enumValue;
|
|
175
|
-
}
|
|
176
|
-
static generateListFilterFieldConfigCheckBoxGroupEnumValueResourceId(componentId, fieldId, enumValue) {
|
|
177
|
-
return "ListFilter/" + componentId + "/" + fieldId + "/" + "control/enumValues/" + enumValue;
|
|
178
|
-
}
|
|
179
|
-
static generatePlaceHolderResourceId(currentComponentType, currentComponentId, i18nResourcePrefix) {
|
|
180
|
-
const resourceId = this.generatePlaceHolderResourceIdWithOutPrefix(currentComponentType, currentComponentId);
|
|
181
|
-
return this.generateI18nResourceId(resourceId, i18nResourcePrefix);
|
|
182
|
-
}
|
|
183
|
-
static generatePlaceHolderResourceIdWithOutPrefix(componentType, componentId) {
|
|
184
|
-
return `${componentType}/${componentId}/placeHolder`;
|
|
185
|
-
}
|
|
186
|
-
static generatePlaceTitleResourceIdWithOutPrefix(componentType, componentId) {
|
|
187
|
-
return `${componentType}/${componentId}/placeTitle`;
|
|
188
|
-
}
|
|
189
|
-
static generatePlaceHolderLangName(componentId, isLowerFirstLetter = true) {
|
|
190
|
-
let placeHolderLangName = toolhepler_1.ToolHelper.replaceHengXianAndDotToXiaHuaXian(`${componentId}_PlaceHolder`);
|
|
191
|
-
if (isLowerFirstLetter) {
|
|
192
|
-
placeHolderLangName = placeHolderLangName.replace(placeHolderLangName[0], placeHolderLangName[0].toLowerCase());
|
|
193
|
-
}
|
|
194
|
-
return placeHolderLangName;
|
|
195
|
-
}
|
|
196
|
-
static generateQuerySchemeFieldConfigDropDownEnumValueResourceId(componentId, fieldId, enumValue) {
|
|
197
|
-
return "QueryScheme/" + componentId + "/" + fieldId + "/" + "control/enumValues/" + enumValue;
|
|
198
|
-
}
|
|
199
|
-
static generateQuerySchemeFieldConfigGroupTextResourceId(componentId, fieldId) {
|
|
200
|
-
return "QueryScheme/" + componentId + "/" + fieldId + "/" + "control/input-group/groupText";
|
|
201
|
-
}
|
|
202
|
-
static generateGridFieldFormatterTrueText(fieldResourcePrefix, fieldId) {
|
|
203
|
-
return fieldResourcePrefix + "/" + fieldId + "/formatter/trueText";
|
|
204
|
-
}
|
|
205
|
-
static generateGridFieldFormatterFalseText(fieldResourcePrefix, fieldId) {
|
|
206
|
-
return fieldResourcePrefix + "/" + fieldId + "/formatter/falseText";
|
|
207
|
-
}
|
|
208
|
-
static generateInputGroupTextResourceId(componentId) {
|
|
209
|
-
return "InputGroup/" + componentId + "/groupText";
|
|
210
|
-
}
|
|
211
|
-
static copyI18nFolder(sourceBasePath, formModuleCode, targetBasePath, projectName, isGroupForm) {
|
|
212
|
-
const sourcePath = `${sourceBasePath}/i18n/${formModuleCode.toLowerCase()}/i18n`;
|
|
213
|
-
let targetPath;
|
|
214
|
-
if (!isGroupForm) {
|
|
215
|
-
targetPath = `${targetBasePath}/projects/${projectName}/src/app/${formModuleCode.toLowerCase()}/i18n`;
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
targetPath = `${targetBasePath}/${formModuleCode.toLowerCase()}/i18n`;
|
|
219
|
-
}
|
|
220
|
-
if (directory_file_helper_1.DirectoryFileHelper.isExists(sourcePath)) {
|
|
221
|
-
directory_file_helper_1.DirectoryFileHelper.copyDir(sourcePath, targetPath, (error) => {
|
|
222
|
-
logger_helper_1.LoggerHelper.log(`copy i18n folder failed, the path is ${sourcePath}, error message is ${error}`);
|
|
223
|
-
});
|
|
224
|
-
if (directory_file_helper_1.DirectoryFileHelper.isExists(targetPath)) {
|
|
225
|
-
const files = directory_file_helper_1.DirectoryFileHelper.getFilesInDir(targetPath);
|
|
226
|
-
if (toolhepler_1.ToolHelper.isArray(files, false)) {
|
|
227
|
-
files.map((file) => {
|
|
228
|
-
const fileContent = directory_file_helper_1.DirectoryFileHelper.readFile(toolhepler_1.ToolHelper.pathJoinAndnormalize(targetPath, file));
|
|
229
|
-
const i18nVersionKey = `${formModuleCode.toLocaleLowerCase()}/${file}`;
|
|
230
|
-
build_file_version_manager_1.BuildFileVersionManager.updateBuildFileVersionWithFileContent(build_file_version_constants_1.BuildFileVersionContants.I18nCategory, i18nVersionKey, fileContent);
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
exports.I18nResourceManager = I18nResourceManager;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.I18nResourceManager = void 0;
|
|
4
|
+
const build_file_version_constants_1 = require("../build-file-version/build-file-version-constants");
|
|
5
|
+
const build_file_version_manager_1 = require("../build-file-version/build-file-version-manager");
|
|
6
|
+
const directory_file_helper_1 = require("../directory-file-helper");
|
|
7
|
+
const logger_helper_1 = require("../logger/logger-helper");
|
|
8
|
+
const toolhepler_1 = require("../toolhepler");
|
|
9
|
+
class I18nResourceManager {
|
|
10
|
+
static generateI18nResourceId(id, prefix) {
|
|
11
|
+
if (id && id.indexOf(".") >= 0) {
|
|
12
|
+
id = toolhepler_1.ToolHelper.replaceDotToXiaHuaXian(id);
|
|
13
|
+
}
|
|
14
|
+
if (prefix) {
|
|
15
|
+
return prefix.toLowerCase() + "_" + id;
|
|
16
|
+
}
|
|
17
|
+
return id;
|
|
18
|
+
}
|
|
19
|
+
static generateI18nResourceIdWithoutPrefix(id) {
|
|
20
|
+
return this.generateI18nResourceId(id, null);
|
|
21
|
+
}
|
|
22
|
+
static generateI18nResourceKeyPrefix(source, ...args) {
|
|
23
|
+
if (!args || args.length == 0) {
|
|
24
|
+
return source.toLowerCase();
|
|
25
|
+
}
|
|
26
|
+
let generatedParameter = "";
|
|
27
|
+
for (let i = 0; i < args.length; i++) {
|
|
28
|
+
if (i == 0) {
|
|
29
|
+
generatedParameter = args[i];
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
generatedParameter = generatedParameter + "_" + args[i];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (source) {
|
|
36
|
+
return (source + "_" + generatedParameter).toLowerCase();
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return generatedParameter.toLowerCase();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
static generateI18nState(i18nResourceKey, defaultValue, useQuote = true) {
|
|
43
|
+
if (toolhepler_1.ToolHelper.isNullOrUndefined(defaultValue)) {
|
|
44
|
+
defaultValue = "";
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
defaultValue = toolhepler_1.ToolHelper.removeNewLineParameter(defaultValue);
|
|
48
|
+
}
|
|
49
|
+
if (useQuote == true) {
|
|
50
|
+
return `this.langService.transform("${i18nResourceKey}", this.lang, "${defaultValue}")`;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return `this.langService.transform(${i18nResourceKey}, this.lang, ${defaultValue})`;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
static generateEnumFieldResourceId(componentId, fieldValue) {
|
|
57
|
+
let enumFieldResourceId;
|
|
58
|
+
if (toolhepler_1.ToolHelper.isNullOrUndefined(fieldValue) == false) {
|
|
59
|
+
enumFieldResourceId = "EnumField/" + componentId + "/enumData/" + fieldValue;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
enumFieldResourceId = "EnumField/" + componentId;
|
|
63
|
+
}
|
|
64
|
+
return enumFieldResourceId;
|
|
65
|
+
}
|
|
66
|
+
static generateNavTabDataResourceId(componentId, fieldValue) {
|
|
67
|
+
let navDataResourceId;
|
|
68
|
+
if (toolhepler_1.ToolHelper.isNullOrUndefined(fieldValue) == false) {
|
|
69
|
+
navDataResourceId = "NavTab/" + componentId + "/navData/" + fieldValue;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
navDataResourceId = "NavTab/" + componentId;
|
|
73
|
+
}
|
|
74
|
+
return navDataResourceId;
|
|
75
|
+
}
|
|
76
|
+
static generateImageAltResourceId(componentId) {
|
|
77
|
+
return "Image/" + componentId + "/alt";
|
|
78
|
+
}
|
|
79
|
+
static generateAvatarImgTitleResourceId(componentId) {
|
|
80
|
+
return "Avatar/" + componentId + "/imgTitle";
|
|
81
|
+
}
|
|
82
|
+
static generateViewChangeToolbarDataResourceId(componentId, fieldValue) {
|
|
83
|
+
let navDataResourceId;
|
|
84
|
+
if (toolhepler_1.ToolHelper.isNullOrUndefined(fieldValue) == false) {
|
|
85
|
+
navDataResourceId = "ViewChange/" + componentId + "/toolbarData/" + fieldValue;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
navDataResourceId = "ViewChange/" + componentId;
|
|
89
|
+
}
|
|
90
|
+
return navDataResourceId;
|
|
91
|
+
}
|
|
92
|
+
static generateTagsDataResourceId(componentId, fieldId) {
|
|
93
|
+
let enumFieldResourceId;
|
|
94
|
+
if (toolhepler_1.ToolHelper.isNullOrUndefined(fieldId) == false) {
|
|
95
|
+
enumFieldResourceId = "Tags/" + componentId + "/tagData/" + fieldId;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
enumFieldResourceId = "Tags/" + componentId;
|
|
99
|
+
}
|
|
100
|
+
return enumFieldResourceId;
|
|
101
|
+
}
|
|
102
|
+
static generateCheckGroupItemResourceId(componentId, itemValue) {
|
|
103
|
+
let checkGroupItemResourceId;
|
|
104
|
+
if (toolhepler_1.ToolHelper.isNullOrUndefined(itemValue) == false) {
|
|
105
|
+
checkGroupItemResourceId = "CheckGroup/" + componentId + "/" + itemValue;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
checkGroupItemResourceId = "CheckGroup/" + componentId;
|
|
109
|
+
}
|
|
110
|
+
return checkGroupItemResourceId;
|
|
111
|
+
}
|
|
112
|
+
static generateAnatarImgTitleResourceId(componentId) {
|
|
113
|
+
return "Avatar/" + componentId + "/imgTitle";
|
|
114
|
+
}
|
|
115
|
+
static generateFileUploadPreviewSelectTextResourceId(componentId) {
|
|
116
|
+
return `FileUploadPreview/${componentId}/uploadSelectText`;
|
|
117
|
+
}
|
|
118
|
+
static generateFileUploadPreviewDefaultNameResourceId(componentId) {
|
|
119
|
+
return `FileUploadPreview/${componentId}/previewDefaultRename`;
|
|
120
|
+
}
|
|
121
|
+
static generateFileUploadPreviewCustomInfoResourceId(componentId) {
|
|
122
|
+
return `FileUploadPreview/${componentId}/customInfo`;
|
|
123
|
+
}
|
|
124
|
+
static generateFileUploadFieldFormatterTrueText(fieldResourcePrefix, fieldId, columnField) {
|
|
125
|
+
return fieldResourcePrefix + "/" + fieldId + "/" + columnField + "/formatter/trueText";
|
|
126
|
+
}
|
|
127
|
+
static generateFileUploadFieldFormatterFalseText(fieldResourcePrefix, fieldId, columnField) {
|
|
128
|
+
return fieldResourcePrefix + "/" + fieldId + "/" + columnField + "/formatter/falseText";
|
|
129
|
+
}
|
|
130
|
+
static generateLookupDialogTitleResourceId(componentId) {
|
|
131
|
+
return `LookupEdit/${componentId}/dialogTitle`;
|
|
132
|
+
}
|
|
133
|
+
static generateFarrisGridLookupDialogTitleResourceId(gridFieldId, editorId) {
|
|
134
|
+
return `GridField/${gridFieldId}/editor/LookupEdit/${editorId}/dialogTitle`;
|
|
135
|
+
}
|
|
136
|
+
static generateSectionMainTitleResourceId(componentId) {
|
|
137
|
+
return "Section/" + componentId + "/mainTitle";
|
|
138
|
+
}
|
|
139
|
+
static generateSectionSubTitleResourceId(componentId) {
|
|
140
|
+
return "Section/" + componentId + "/subTitle";
|
|
141
|
+
}
|
|
142
|
+
static generateHeaderMainTitleResourceId(componentId) {
|
|
143
|
+
return "Header/" + componentId + "/mainTitle";
|
|
144
|
+
}
|
|
145
|
+
static generateHeaderSubTitleResourceId(componentId) {
|
|
146
|
+
return "Header/" + componentId + "/subTitle";
|
|
147
|
+
}
|
|
148
|
+
static generateScrollSpyItemResourceId(componentId, itemId) {
|
|
149
|
+
return `Scrollspy/${componentId}/items/${itemId}`;
|
|
150
|
+
}
|
|
151
|
+
static generateWizardProcessStepMessageResourceId(componentId, stepMessageId) {
|
|
152
|
+
return "Wizard/" + componentId + "/progressData/stepMessages/" + stepMessageId;
|
|
153
|
+
}
|
|
154
|
+
static generateRadioGroupEnumFieldResourceId(componentId, itemValue) {
|
|
155
|
+
let enumFieldResourceId;
|
|
156
|
+
if (toolhepler_1.ToolHelper.isNullOrUndefined(itemValue) == false) {
|
|
157
|
+
enumFieldResourceId = "RadioGroup/" + componentId + "/" + itemValue;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
enumFieldResourceId = "RadioGroup/" + componentId;
|
|
161
|
+
}
|
|
162
|
+
return enumFieldResourceId;
|
|
163
|
+
}
|
|
164
|
+
static generateTreeGridEnumFieldResourceId(fieldId, itemValue) {
|
|
165
|
+
return `TreeGridField/${fieldId}/enumData/${itemValue}`;
|
|
166
|
+
}
|
|
167
|
+
static generateQuerySchemeFieldConfigNameResourceId(componentId, fieldConfigId) {
|
|
168
|
+
return "QueryScheme/" + componentId + "/" + fieldConfigId;
|
|
169
|
+
}
|
|
170
|
+
static generateListFilterFieldConfigNameResourceId(componentId, fieldConfigId) {
|
|
171
|
+
return "ListFilter/" + componentId + "/" + fieldConfigId;
|
|
172
|
+
}
|
|
173
|
+
static generateListFilterFieldConfigDropDownEnumValueResourceId(componentId, fieldId, enumValue) {
|
|
174
|
+
return "ListFilter/" + componentId + "/" + fieldId + "/" + "control/enumValues/" + enumValue;
|
|
175
|
+
}
|
|
176
|
+
static generateListFilterFieldConfigCheckBoxGroupEnumValueResourceId(componentId, fieldId, enumValue) {
|
|
177
|
+
return "ListFilter/" + componentId + "/" + fieldId + "/" + "control/enumValues/" + enumValue;
|
|
178
|
+
}
|
|
179
|
+
static generatePlaceHolderResourceId(currentComponentType, currentComponentId, i18nResourcePrefix) {
|
|
180
|
+
const resourceId = this.generatePlaceHolderResourceIdWithOutPrefix(currentComponentType, currentComponentId);
|
|
181
|
+
return this.generateI18nResourceId(resourceId, i18nResourcePrefix);
|
|
182
|
+
}
|
|
183
|
+
static generatePlaceHolderResourceIdWithOutPrefix(componentType, componentId) {
|
|
184
|
+
return `${componentType}/${componentId}/placeHolder`;
|
|
185
|
+
}
|
|
186
|
+
static generatePlaceTitleResourceIdWithOutPrefix(componentType, componentId) {
|
|
187
|
+
return `${componentType}/${componentId}/placeTitle`;
|
|
188
|
+
}
|
|
189
|
+
static generatePlaceHolderLangName(componentId, isLowerFirstLetter = true) {
|
|
190
|
+
let placeHolderLangName = toolhepler_1.ToolHelper.replaceHengXianAndDotToXiaHuaXian(`${componentId}_PlaceHolder`);
|
|
191
|
+
if (isLowerFirstLetter) {
|
|
192
|
+
placeHolderLangName = placeHolderLangName.replace(placeHolderLangName[0], placeHolderLangName[0].toLowerCase());
|
|
193
|
+
}
|
|
194
|
+
return placeHolderLangName;
|
|
195
|
+
}
|
|
196
|
+
static generateQuerySchemeFieldConfigDropDownEnumValueResourceId(componentId, fieldId, enumValue) {
|
|
197
|
+
return "QueryScheme/" + componentId + "/" + fieldId + "/" + "control/enumValues/" + enumValue;
|
|
198
|
+
}
|
|
199
|
+
static generateQuerySchemeFieldConfigGroupTextResourceId(componentId, fieldId) {
|
|
200
|
+
return "QueryScheme/" + componentId + "/" + fieldId + "/" + "control/input-group/groupText";
|
|
201
|
+
}
|
|
202
|
+
static generateGridFieldFormatterTrueText(fieldResourcePrefix, fieldId) {
|
|
203
|
+
return fieldResourcePrefix + "/" + fieldId + "/formatter/trueText";
|
|
204
|
+
}
|
|
205
|
+
static generateGridFieldFormatterFalseText(fieldResourcePrefix, fieldId) {
|
|
206
|
+
return fieldResourcePrefix + "/" + fieldId + "/formatter/falseText";
|
|
207
|
+
}
|
|
208
|
+
static generateInputGroupTextResourceId(componentId) {
|
|
209
|
+
return "InputGroup/" + componentId + "/groupText";
|
|
210
|
+
}
|
|
211
|
+
static copyI18nFolder(sourceBasePath, formModuleCode, targetBasePath, projectName, isGroupForm) {
|
|
212
|
+
const sourcePath = `${sourceBasePath}/i18n/${formModuleCode.toLowerCase()}/i18n`;
|
|
213
|
+
let targetPath;
|
|
214
|
+
if (!isGroupForm) {
|
|
215
|
+
targetPath = `${targetBasePath}/projects/${projectName}/src/app/${formModuleCode.toLowerCase()}/i18n`;
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
targetPath = `${targetBasePath}/${formModuleCode.toLowerCase()}/i18n`;
|
|
219
|
+
}
|
|
220
|
+
if (directory_file_helper_1.DirectoryFileHelper.isExists(sourcePath)) {
|
|
221
|
+
directory_file_helper_1.DirectoryFileHelper.copyDir(sourcePath, targetPath, (error) => {
|
|
222
|
+
logger_helper_1.LoggerHelper.log(`copy i18n folder failed, the path is ${sourcePath}, error message is ${error}`);
|
|
223
|
+
});
|
|
224
|
+
if (directory_file_helper_1.DirectoryFileHelper.isExists(targetPath)) {
|
|
225
|
+
const files = directory_file_helper_1.DirectoryFileHelper.getFilesInDir(targetPath);
|
|
226
|
+
if (toolhepler_1.ToolHelper.isArray(files, false)) {
|
|
227
|
+
files.map((file) => {
|
|
228
|
+
const fileContent = directory_file_helper_1.DirectoryFileHelper.readFile(toolhepler_1.ToolHelper.pathJoinAndnormalize(targetPath, file));
|
|
229
|
+
const i18nVersionKey = `${formModuleCode.toLocaleLowerCase()}/${file}`;
|
|
230
|
+
build_file_version_manager_1.BuildFileVersionManager.updateBuildFileVersionWithFileContent(build_file_version_constants_1.BuildFileVersionContants.I18nCategory, i18nVersionKey, fileContent);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
exports.I18nResourceManager = I18nResourceManager;
|
|
238
238
|
//# sourceMappingURL=i18n-resource-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-resource-manager.js","sourceRoot":"","sources":["../../../src/utility/i18n/i18n-resource-manager.ts"],"names":[],"mappings":";;;AAAA,qGAA8F;AAC9F,iGAA2F;AAC3F,oEAA+D;AAC/D,2DAAuD;AACvD,8CAA2C;AAQ3C,MAAa,mBAAmB;IAS5B,MAAM,CAAC,sBAAsB,CAAC,EAAU,EAAE,MAAc;QAEpD,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAE5B,EAAE,GAAG,uBAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;SAC9C;QAED,IAAI,MAAM,EAAE;YACR,OAAO,MAAM,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;SAC1C;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IASD,MAAM,CAAC,mCAAmC,CAAC,EAAU;QACjD,OAAO,IAAI,CAAC,sBAAsB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;IASD,MAAM,CAAC,6BAA6B,CAAC,MAAc,EAAE,GAAG,IAAc;QAClE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE;YAC3B,OAAO,MAAM,CAAC,WAAW,EAAE,CAAC;S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CAAC;iBACN;aACJ;SACJ;IACL,CAAC;CACJ;AAnmBD,kDAmmBC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./i18n-resource-manager"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./i18n-resource-manager"), exports);
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,7 +4,6 @@ exports.LangTemplateGenerator = void 0;
|
|
|
4
4
|
const abstract_template_generator_1 = require("../abstract-template-generator");
|
|
5
5
|
const jit_constant_1 = require("../../jit-constant");
|
|
6
6
|
const toolhepler_1 = require("../../toolhepler");
|
|
7
|
-
const module_generator_1 = require("./module-generator");
|
|
8
7
|
class LangTemplateGenerator extends abstract_template_generator_1.AbstractTemplateGenerator {
|
|
9
8
|
generate(generateParams) {
|
|
10
9
|
const variable = generateParams.devkit;
|
|
@@ -26,20 +25,7 @@ import { catchError, switchMap } from "rxjs/operators";
|
|
|
26
25
|
import { HttpClient } from '@angular/common/http';
|
|
27
26
|
import { DomSanitizer} from '@angular/platform-browser';
|
|
28
27
|
import { BasePathService } from '@farris/rtf';`;
|
|
29
|
-
|
|
30
|
-
if (generateParams.metaDataConfig.isRuntime) {
|
|
31
|
-
runTimeDimPath = module_generator_1.ModuleProviderGenerator.executeRuntimeDimPath(runTimeDimPath, generateParams.metaDataConfig);
|
|
32
|
-
generateString += `
|
|
33
|
-
export function createTranslateLoader(http: HttpClient,version:string) {
|
|
34
|
-
let versionSuffix = "";
|
|
35
|
-
if (version) {
|
|
36
|
-
versionSuffix = "?v=" + version;
|
|
37
|
-
}
|
|
38
|
-
return new TranslateHttpLoader(http, BasePathService.convertPath('/${toolhepler_1.ToolHelper.replaceFanXieXianToXieXian(serviceUnitPath.toLowerCase())}/web/${projectName.toLowerCase()}/${moduleCode.toLowerCase()}/${runTimeDimPath.toLowerCase()}i18n/'), '.json'+ versionSuffix);
|
|
39
|
-
}
|
|
40
|
-
`;
|
|
41
|
-
}
|
|
42
|
-
else if (isGroupForm == false) {
|
|
28
|
+
if (isGroupForm == false) {
|
|
43
29
|
generateString += `
|
|
44
30
|
export function createTranslateLoader(http: HttpClient,version:string) {
|
|
45
31
|
let versionSuffix = "";
|
|
@@ -113,27 +99,7 @@ export class ${externalPrefix}TranslateResolveService implements Resolve<any>{
|
|
|
113
99
|
generateString += `
|
|
114
100
|
if (this.translate.defaultLang === langCode) {`;
|
|
115
101
|
}
|
|
116
|
-
|
|
117
|
-
generateString += `
|
|
118
|
-
this.translate.setTranslation('zh-CHS', lang['zh-CHS']);
|
|
119
|
-
return of(this.translate[langCode]);
|
|
120
|
-
} else {
|
|
121
|
-
const httpOb = this.http.get(BasePathService.getBasePath() + "/${toolhepler_1.ToolHelper.replaceFanXieXianToXieXian(serviceUnitPath.toLowerCase())}/web/${projectName.toLowerCase()}/${moduleCode.toLowerCase()}/${runTimeDimPath.toLowerCase()}version.json?v=" + new Date().getTime()).pipe(switchMap((data)=>{
|
|
122
|
-
let currentVersion = null;
|
|
123
|
-
if (data instanceof Array) {
|
|
124
|
-
const versionKey = "${moduleCode.toLowerCase()}/" + langCode + ".json";
|
|
125
|
-
data.forEach((item) => {
|
|
126
|
-
if (item.category == "i18n" && item.key == versionKey) {
|
|
127
|
-
currentVersion = item.value;
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
this.translate.defaultLang = langCode;
|
|
133
|
-
this.translate.currentLang = langCode;`;
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
generateString += `
|
|
102
|
+
generateString += `
|
|
137
103
|
this.translate.setTranslation('zh-CHS', lang['zh-CHS']);
|
|
138
104
|
return of(this.translate[langCode]);
|
|
139
105
|
} else {
|
|
@@ -150,7 +116,6 @@ export class ${externalPrefix}TranslateResolveService implements Resolve<any>{
|
|
|
150
116
|
|
|
151
117
|
this.translate.defaultLang = langCode;
|
|
152
118
|
this.translate.currentLang = langCode;`;
|
|
153
|
-
}
|
|
154
119
|
if (isGroupForm == false) {
|
|
155
120
|
generateString += `
|
|
156
121
|
this.translate.currentLoader = createTranslateLoader(this.http, currentVersion);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lang-template-generator.js","sourceRoot":"","sources":["../../../../src/utility/template-generator/devkit/lang-template-generator.ts"],"names":[],"mappings":";;;AAAA,gFAA2E;AAC3E,qDAAiD;AACjD,iDAA8C;
|
|
1
|
+
{"version":3,"file":"lang-template-generator.js","sourceRoot":"","sources":["../../../../src/utility/template-generator/devkit/lang-template-generator.ts"],"names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