@farris/jit-engine 1.4.135 → 1.4.136
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 +1398 -1398
- package/lib/domstructure/devkit/viewmodel/component/component.js +221 -221
- package/lib/domstructure/ui/index.js +0 -1
- package/lib/domstructure/ui/index.js.map +1 -1
- package/lib/template/devkit/module.pug +268 -270
- package/lib/utility/devkit/component-creator.js +0 -1
- package/lib/utility/devkit/component-creator.js.map +1 -1
- package/lib/utility/devkit/component-parameter-collector/component-parameter-collector-manager.js +0 -4
- 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 +0 -1
- package/lib/utility/devkit/component-parameter-collector/component-parameter-collector-type.js.map +1 -1
- package/lib/utility/devkit/component-parameter-collector/toolbar-collector.js +3 -1
- package/lib/utility/devkit/component-parameter-collector/toolbar-collector.js.map +1 -1
- package/lib/utility/devkit/devkit-constant.js +0 -1
- package/lib/utility/devkit/devkit-constant.js.map +1 -1
- package/lib/utility/devkit-template-config.js +0 -3
- package/lib/utility/devkit-template-config.js.map +1 -1
- package/lib/utility/i18n/i18n-resource-manager.js +0 -9
- package/lib/utility/i18n/i18n-resource-manager.js.map +1 -1
- package/lib/utility/internal-entity/component-parameter/index.js +0 -1
- package/lib/utility/internal-entity/component-parameter/index.js.map +1 -1
- package/lib/utility/template-generator/devkit/component-generator/component-toolbar-parameter-generator.js +8 -0
- package/lib/utility/template-generator/devkit/component-generator/component-toolbar-parameter-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/component-template-generator.js +537 -541
- package/lib/utility/template-generator/devkit/component-template-generator.js.map +1 -1
- package/lib/utility/template-generator/devkit/module-generator/module-import-statement-generator.js +140 -141
- 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 +142 -143
- package/lib/utility/template-generator/devkit/module-generator/module-imports-statement-generator.js.map +1 -1
- package/package.json +25 -15
- package/lib/domstructure/ui/field-search-box/field-search-box.js +0 -85
- package/lib/domstructure/ui/field-search-box/field-search-box.js.map +0 -1
- package/lib/domstructure/ui/field-search-box/index.js +0 -14
- package/lib/domstructure/ui/field-search-box/index.js.map +0 -1
- package/lib/template/ui/kendo/field-search-box.pug +0 -9
- package/lib/utility/devkit/component-parameter-collector/field-search-box-parameter-collector.js +0 -84
- package/lib/utility/devkit/component-parameter-collector/field-search-box-parameter-collector.js.map +0 -1
- package/lib/utility/internal-entity/component-parameter/component-field-search-box-parameter.js +0 -43
- package/lib/utility/internal-entity/component-parameter/component-field-search-box-parameter.js.map +0 -1
- package/lib/utility/template-generator/devkit/component-generator/component-field-search-box-parameter-generator.js +0 -69
- package/lib/utility/template-generator/devkit/component-generator/component-field-search-box-parameter-generator.js.map +0 -1
package/lib/utility/devkit/component-parameter-collector/field-search-box-parameter-collector.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FieldSearchBoxParameterCollector = void 0;
|
|
4
|
-
const abstract_component_parameter_collector_1 = require("./abstract-component-parameter-collector");
|
|
5
|
-
const toolhepler_1 = require("../../toolhepler");
|
|
6
|
-
const i18n_1 = require("../../i18n");
|
|
7
|
-
const devkit_constant_1 = require("../devkit-constant");
|
|
8
|
-
class FieldSearchBoxParameterCollector extends abstract_component_parameter_collector_1.AbstractComponentParameterCollector {
|
|
9
|
-
collect(value, options) {
|
|
10
|
-
const parameters = [];
|
|
11
|
-
this.collectComponentFieldSearchBox(value, parameters, options ? options.i18nResourcePrefix : undefined);
|
|
12
|
-
return parameters;
|
|
13
|
-
}
|
|
14
|
-
collectComponentFieldSearchBox(component, parameters, i18nResourcePrefix) {
|
|
15
|
-
const contents = component.contents;
|
|
16
|
-
if (contents && contents.length) {
|
|
17
|
-
contents.forEach((element) => {
|
|
18
|
-
this.collectComponentFieldSearchBox(element, parameters, i18nResourcePrefix);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
if (component.type != devkit_constant_1.DevkitConstant.FieldSearchBoxType) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
const fields = [];
|
|
25
|
-
if (toolhepler_1.ToolHelper.isArray(component.fields, false)) {
|
|
26
|
-
component.fields.forEach((field) => {
|
|
27
|
-
if (!field) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
fields.push({
|
|
31
|
-
"field": field.field,
|
|
32
|
-
"title": this.generateFieldTitle(field, component, i18nResourcePrefix),
|
|
33
|
-
"dataType": field.dataType,
|
|
34
|
-
"options": this.generateFieldOptions(field, component, i18nResourcePrefix)
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
parameters.push({
|
|
39
|
-
"id": component.id,
|
|
40
|
-
"fields": fields
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
generateFieldTitle(field, component, i18nResourcePrefix) {
|
|
44
|
-
const resourceId = i18n_1.I18nResourceManager.generateFieldSearchBoxFieldTitleResourceId(component.id, field.field);
|
|
45
|
-
return `${i18n_1.I18nResourceManager.generateI18nState(i18n_1.I18nResourceManager.generateI18nResourceId(resourceId, i18nResourcePrefix), field.title)}`;
|
|
46
|
-
}
|
|
47
|
-
generateFieldOptions(field, component, i18nResourcePrefix) {
|
|
48
|
-
if (!field.options) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
let options;
|
|
52
|
-
try {
|
|
53
|
-
options = JSON.parse(JSON.stringify(field.options));
|
|
54
|
-
}
|
|
55
|
-
catch (e) {
|
|
56
|
-
return field.options;
|
|
57
|
-
}
|
|
58
|
-
if (!options || typeof options !== 'object') {
|
|
59
|
-
return options;
|
|
60
|
-
}
|
|
61
|
-
if (toolhepler_1.ToolHelper.isArray(options.data, false)) {
|
|
62
|
-
const textField = options.textField || "name";
|
|
63
|
-
const valueField = options.valueField || "value";
|
|
64
|
-
options.data.forEach((item, index) => {
|
|
65
|
-
if (!item || toolhepler_1.ToolHelper.isNullOrUndefined(item[textField])) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const enumValue = toolhepler_1.ToolHelper.isNullOrUndefined(item[valueField]) ? index : item[valueField];
|
|
69
|
-
const resourceId = i18n_1.I18nResourceManager.generateFieldSearchBoxFieldEnumValueResourceId(component.id, field.field, enumValue + "");
|
|
70
|
-
item[textField] = `${i18n_1.I18nResourceManager.generateI18nState(i18n_1.I18nResourceManager.generateI18nResourceId(resourceId, i18nResourcePrefix), item[textField])}`;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
["trueText", "falseText"].forEach(textName => {
|
|
74
|
-
if (toolhepler_1.ToolHelper.isNullOrUndefined(options[textName])) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const resourceId = i18n_1.I18nResourceManager.generateFieldSearchBoxFieldOptionTextResourceId(component.id, field.field, textName);
|
|
78
|
-
options[textName] = `${i18n_1.I18nResourceManager.generateI18nState(i18n_1.I18nResourceManager.generateI18nResourceId(resourceId, i18nResourcePrefix), options[textName])}`;
|
|
79
|
-
});
|
|
80
|
-
return options;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
exports.FieldSearchBoxParameterCollector = FieldSearchBoxParameterCollector;
|
|
84
|
-
//# sourceMappingURL=field-search-box-parameter-collector.js.map
|
package/lib/utility/devkit/component-parameter-collector/field-search-box-parameter-collector.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field-search-box-parameter-collector.js","sourceRoot":"","sources":["../../../../src/utility/devkit/component-parameter-collector/field-search-box-parameter-collector.ts"],"names":[],"mappings":";;;AAAA,qGAA+F;AAG/F,iDAA8C;AAC9C,qCAAiD;AACjD,wDAAoD;AAUpD,MAAa,gCAAiC,SAAQ,4EAAmC;IAMrF,OAAO,CAAC,KAAU,EAAE,OAA4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,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC5F,MAAM,UAAU,GAAG,0BAAmB,CAAC,8CAA8C,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,EAAE,CAAC,CAAC;gBACjI,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,0BAAmB,CAAC,iBAAiB,CAAC,0BAAmB,CAAC,sBAAsB,CAAC,UAAU,EAAE,kBAAkB,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC;YAC9J,CAAC,CAAC,CAAC;SACN;QAGD,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACzC,IAAI,uBAAU,CAAC,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE;gBACjD,OAAO;aACV;YACD,MAAM,UAAU,GAAG,0BAAmB,CAAC,+CAA+C,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;YAC5H,OAAO,CAAC,QAAQ,CAAC,GAAG,GAAG,0BAAmB,CAAC,iBAAiB,CAAC,0BAAmB,CAAC,sBAAsB,CAAC,UAAU,EAAE,kBAAkB,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;QAClK,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAjGD,4EAiGC"}
|
package/lib/utility/internal-entity/component-parameter/component-field-search-box-parameter.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ComponentFieldSearchBoxParameter = exports.ComponentFieldSearchBoxFieldParameter = void 0;
|
|
4
|
-
const toolhepler_1 = require("../../toolhepler");
|
|
5
|
-
class ComponentFieldSearchBoxFieldParameter {
|
|
6
|
-
constructor(param) {
|
|
7
|
-
if (!param) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
const keys = 'field,title,dataType,options';
|
|
11
|
-
Object.keys(param).forEach(key => {
|
|
12
|
-
if (keys.includes(key)) {
|
|
13
|
-
this[key] = param[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.ComponentFieldSearchBoxFieldParameter = ComponentFieldSearchBoxFieldParameter;
|
|
19
|
-
class ComponentFieldSearchBoxParameter {
|
|
20
|
-
constructor(param) {
|
|
21
|
-
if (!param) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
const keys = 'id,fields';
|
|
25
|
-
Object.keys(param).forEach(key => {
|
|
26
|
-
if (keys.includes(key)) {
|
|
27
|
-
if (key == "fields") {
|
|
28
|
-
this.fields = [];
|
|
29
|
-
if (toolhepler_1.ToolHelper.isArray(param[key], false)) {
|
|
30
|
-
param[key].forEach((item) => {
|
|
31
|
-
this.fields.push(new ComponentFieldSearchBoxFieldParameter(item));
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this[key] = param[key];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.ComponentFieldSearchBoxParameter = ComponentFieldSearchBoxParameter;
|
|
43
|
-
//# sourceMappingURL=component-field-search-box-parameter.js.map
|
package/lib/utility/internal-entity/component-parameter/component-field-search-box-parameter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-field-search-box-parameter.js","sourceRoot":"","sources":["../../../../src/utility/internal-entity/component-parameter/component-field-search-box-parameter.ts"],"names":[],"mappings":";;;AACA,iDAA8C;AAK9C,MAAa,qCAAqC;IAW9C,YAAY,KAAW;QAC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-
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.ComponentFieldSearchBoxParameterGenerator = void 0;
|
|
23
|
-
const toolhepler_1 = require("../../../../utility/toolhepler");
|
|
24
|
-
const jsonStringify = __importStar(require("../../../json-stringfy-helper"));
|
|
25
|
-
class ComponentFieldSearchBoxParameterGenerator {
|
|
26
|
-
static generateFieldSearchBox(variable) {
|
|
27
|
-
let generateString = "";
|
|
28
|
-
if (!toolhepler_1.ToolHelper.isArray(variable.fieldSearchBoxParameters, false)) {
|
|
29
|
-
return generateString;
|
|
30
|
-
}
|
|
31
|
-
variable.fieldSearchBoxParameters.forEach((parameter) => {
|
|
32
|
-
const fieldsName = "fields" + toolhepler_1.ToolHelper.replaceHengXianAndDotToXiaHuaXian(toolhepler_1.ToolHelper.replaceSpecialCharacter(parameter.id));
|
|
33
|
-
generateString += `
|
|
34
|
-
${fieldsName}=[`;
|
|
35
|
-
if (toolhepler_1.ToolHelper.isArray(parameter.fields, false)) {
|
|
36
|
-
parameter.fields.forEach((field, index) => {
|
|
37
|
-
generateString += `
|
|
38
|
-
{
|
|
39
|
-
"field": "${field.field}",
|
|
40
|
-
"title": ${field.title},
|
|
41
|
-
"dataType": ${field.dataType ? `"${field.dataType}"` : "null"},
|
|
42
|
-
"options": ${this.generateFieldOptions(field.options)}
|
|
43
|
-
}`;
|
|
44
|
-
if (index < parameter.fields.length - 1) {
|
|
45
|
-
generateString += ",";
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
generateString += `];`;
|
|
50
|
-
});
|
|
51
|
-
return generateString;
|
|
52
|
-
}
|
|
53
|
-
static generateFieldOptions(options) {
|
|
54
|
-
if (!options) {
|
|
55
|
-
return "null";
|
|
56
|
-
}
|
|
57
|
-
const noneQuotsString = ["trueText", "falseText"];
|
|
58
|
-
const textField = options.textField ? options.textField : "name";
|
|
59
|
-
if (noneQuotsString.indexOf(textField) == -1) {
|
|
60
|
-
noneQuotsString.push(textField);
|
|
61
|
-
}
|
|
62
|
-
return jsonStringify.stringify(options, null, null, {
|
|
63
|
-
noneQuotsString: noneQuotsString,
|
|
64
|
-
skipUndefinedProperties: true
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
exports.ComponentFieldSearchBoxParameterGenerator = ComponentFieldSearchBoxParameterGenerator;
|
|
69
|
-
//# sourceMappingURL=component-field-search-box-parameter-generator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component-field-search-box-parameter-generator.js","sourceRoot":"","sources":["../../../../../src/utility/template-generator/devkit/component-generator/component-field-search-box-parameter-generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+DAA4D;AAE5D,6EAA+D;AAE/D,MAAa,yCAAyC;IAWlD,MAAM,CAAC,sBAAsB,CAAC,QAAa;QACvC,IAAI,cAAc,GAAG,EAAE,CAAC;QACxB,IAAI,CAAC,uBAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,wB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