@farris/jit-engine 1.3.351 → 1.3.353
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 +9 -21
- package/lib/domstructure/devkit/module/module.js +216 -216
- package/lib/domstructure/devkit/module/module.js.map +1 -1
- package/lib/domstructure/ui/common/absctract_dom.js +2 -2
- package/lib/domstructure/ui/common/appearance.js +35 -35
- package/lib/domstructure/ui/common/background.js +33 -33
- package/lib/domstructure/ui/common/base-title-component.js +46 -46
- package/lib/domstructure/ui/common/basecomponent.js +160 -160
- package/lib/domstructure/ui/common/binding.js +164 -164
- package/lib/domstructure/ui/common/binding.js.map +1 -1
- package/lib/domstructure/ui/common/border.js +39 -39
- package/lib/domstructure/ui/common/font.js +38 -38
- package/lib/domstructure/ui/common/index.js +21 -21
- package/lib/domstructure/ui/common/margin.js +39 -39
- package/lib/domstructure/ui/common/padding.js +39 -39
- package/lib/domstructure/ui/common/size.js +34 -34
- package/lib/domstructure/ui/common/visible.js +69 -69
- 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,165 +1,165 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Binding = void 0;
|
|
4
|
-
const componentFrameID_helper_1 = require("../../../utility/componentFrameID-helper");
|
|
5
|
-
const utility_1 = require("../../../utility");
|
|
6
|
-
const expression_value_generator_1 = require("../../../utility/expression-value-generator");
|
|
7
|
-
const running_position_enum_1 = require("../../running-position-enum");
|
|
8
|
-
class Binding {
|
|
9
|
-
constructor(param, options) {
|
|
10
|
-
this.isExpression = false;
|
|
11
|
-
this.isVariable = false;
|
|
12
|
-
this.isForm = false;
|
|
13
|
-
this.isComposite = false;
|
|
14
|
-
this.runningPosition = running_position_enum_1.RunningPositionEnum.card;
|
|
15
|
-
if (options && utility_1.ToolHelper.isNullOrUndefined(options.addThisWithViewModel)) {
|
|
16
|
-
options.addThisWithViewModel = true;
|
|
17
|
-
}
|
|
18
|
-
if (param instanceof Binding) {
|
|
19
|
-
this.value = param.value;
|
|
20
|
-
this.type = this.value.type;
|
|
21
|
-
this.useQuote = param.useQuote;
|
|
22
|
-
this.path = param.path;
|
|
23
|
-
this.fullPath = param.fullPath;
|
|
24
|
-
this.bindingPath = param.bindingPath;
|
|
25
|
-
this.expressionId = param.expressionId;
|
|
26
|
-
this.isExpression = param.isExpression;
|
|
27
|
-
this.isVariable = param.isVariable;
|
|
28
|
-
this.isForm = param.isForm;
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (utility_1.ToolHelper.isArray(param)) {
|
|
32
|
-
const bindingArr = [];
|
|
33
|
-
param.forEach((item) => {
|
|
34
|
-
if (!utility_1.ToolHelper.isNullOrUndefined(item) && (!item.source || item.source === "dom")) {
|
|
35
|
-
let itemValue = item.value;
|
|
36
|
-
if (!item.source) {
|
|
37
|
-
itemValue = item;
|
|
38
|
-
}
|
|
39
|
-
const bindindValue = new Binding(itemValue, {
|
|
40
|
-
externalComponentNameSpace: options.externalComponentNameSpace,
|
|
41
|
-
runningPosition: options.runningPosition,
|
|
42
|
-
addThisWithViewModel: false,
|
|
43
|
-
parentComponentId: options.parentComponentId
|
|
44
|
-
});
|
|
45
|
-
bindindValue.value = { source: "dom", value: bindindValue.value };
|
|
46
|
-
bindingArr.push(bindindValue);
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
const bindingValue = new Binding(item, {
|
|
50
|
-
externalComponentNameSpace: options.externalComponentNameSpace,
|
|
51
|
-
runningPosition: options.runningPosition,
|
|
52
|
-
addThisWithViewModel: false,
|
|
53
|
-
parentComponentId: options.parentComponentId
|
|
54
|
-
});
|
|
55
|
-
bindingArr.push(bindingValue);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
this.isComposite = true;
|
|
59
|
-
const compositeValue = bindingArr.map((bindingItem) => {
|
|
60
|
-
return bindingItem.value;
|
|
61
|
-
});
|
|
62
|
-
this.value = compositeValue;
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
const externalComponentNameSpace = options.externalComponentNameSpace;
|
|
66
|
-
this.runningPosition = options.runningPosition ? options.runningPosition : running_position_enum_1.RunningPositionEnum.card;
|
|
67
|
-
if (utility_1.ToolHelper.isNullOrUndefinedOrEmpty(param)) {
|
|
68
|
-
this.useQuote = false;
|
|
69
|
-
this.value = param;
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
if (utility_1.ToolHelper.isBoolean(param) || utility_1.ToolHelper.isNumber(param)) {
|
|
73
|
-
this.useQuote = false;
|
|
74
|
-
this.value = param;
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
if (utility_1.ToolHelper.isObject(param) && param.source) {
|
|
78
|
-
this.value = param;
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (utility_1.ToolHelper.isString(param) && utility_1.ToolHelper.isObject(param) == false) {
|
|
82
|
-
if (param.indexOf("=>") >= 0) {
|
|
83
|
-
this.value = param;
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
if (options.addThisWithViewModel) {
|
|
87
|
-
this.value = utility_1.ToolHelper.viewModelReplaceToThisViewModel(param);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
this.value = param;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
this.useQuote = false;
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
let obj;
|
|
97
|
-
if (typeof param === 'string') {
|
|
98
|
-
obj = utility_1.ToolHelper.convertToJsonOrDefault(param);
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
obj = param;
|
|
102
|
-
}
|
|
103
|
-
if (!obj) {
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
const keys = 'type,target,path,expressionId,runningPosition,fullPath,bindingPath';
|
|
107
|
-
Object.keys(obj).forEach(key => {
|
|
108
|
-
if (keys.includes(key)) {
|
|
109
|
-
this[key] = obj[key];
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
if (this.type == "Variable") {
|
|
113
|
-
this.useQuote = false;
|
|
114
|
-
const [frameComponentId, variablePath] = this.path.split('.');
|
|
115
|
-
if (!variablePath) {
|
|
116
|
-
this.value = "this.viewModel['uiState']['" + this.path + "']";
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
const externalComponentFrameId = componentFrameID_helper_1.ComponentFrameIDHelper.getComponentFrameIdWithNameSpace({ componentNameSpace: externalComponentNameSpace, frameID: frameComponentId });
|
|
120
|
-
this.value = "this.context.appContext.getFrameContext('" + externalComponentFrameId + "')['uiState']['" + variablePath + "']";
|
|
121
|
-
}
|
|
122
|
-
this.isVariable = true;
|
|
123
|
-
}
|
|
124
|
-
else if (this.type == "Form") {
|
|
125
|
-
this.value = this.path;
|
|
126
|
-
this.isForm = true;
|
|
127
|
-
}
|
|
128
|
-
else if (this.type == "Expression" || this.type == "FormRule") {
|
|
129
|
-
this.value = expression_value_generator_1.ExpressionValueGenerator.generate(this.expressionId, this.runningPosition);
|
|
130
|
-
this.useQuote = this.runningPosition == running_position_enum_1.RunningPositionEnum.card;
|
|
131
|
-
this.isExpression = true;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
toJSON() {
|
|
135
|
-
return {
|
|
136
|
-
"useQuote": this.useQuote,
|
|
137
|
-
"type": this.type,
|
|
138
|
-
"target": this.target,
|
|
139
|
-
"path": this.path,
|
|
140
|
-
"fullPath": this.fullPath,
|
|
141
|
-
"isExpression": this.isExpression,
|
|
142
|
-
"bindingPath": this.bindingPath,
|
|
143
|
-
"value": this.value
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
toString() {
|
|
147
|
-
if (this.useQuote) {
|
|
148
|
-
return `'${this.value}'`;
|
|
149
|
-
}
|
|
150
|
-
return this.value;
|
|
151
|
-
}
|
|
152
|
-
toAbstractDom() {
|
|
153
|
-
return {
|
|
154
|
-
"type": this.type,
|
|
155
|
-
"target": this.target,
|
|
156
|
-
"path": this.path,
|
|
157
|
-
"fullPath": this.fullPath,
|
|
158
|
-
"isExpression": this.isExpression,
|
|
159
|
-
"isForm": this.isForm,
|
|
160
|
-
"isVariable": this.isVariable
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
exports.Binding = Binding;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Binding = void 0;
|
|
4
|
+
const componentFrameID_helper_1 = require("../../../utility/componentFrameID-helper");
|
|
5
|
+
const utility_1 = require("../../../utility");
|
|
6
|
+
const expression_value_generator_1 = require("../../../utility/expression-value-generator");
|
|
7
|
+
const running_position_enum_1 = require("../../running-position-enum");
|
|
8
|
+
class Binding {
|
|
9
|
+
constructor(param, options) {
|
|
10
|
+
this.isExpression = false;
|
|
11
|
+
this.isVariable = false;
|
|
12
|
+
this.isForm = false;
|
|
13
|
+
this.isComposite = false;
|
|
14
|
+
this.runningPosition = running_position_enum_1.RunningPositionEnum.card;
|
|
15
|
+
if (options && utility_1.ToolHelper.isNullOrUndefined(options.addThisWithViewModel)) {
|
|
16
|
+
options.addThisWithViewModel = true;
|
|
17
|
+
}
|
|
18
|
+
if (param instanceof Binding) {
|
|
19
|
+
this.value = param.value;
|
|
20
|
+
this.type = this.value.type;
|
|
21
|
+
this.useQuote = param.useQuote;
|
|
22
|
+
this.path = param.path;
|
|
23
|
+
this.fullPath = param.fullPath;
|
|
24
|
+
this.bindingPath = param.bindingPath;
|
|
25
|
+
this.expressionId = param.expressionId;
|
|
26
|
+
this.isExpression = param.isExpression;
|
|
27
|
+
this.isVariable = param.isVariable;
|
|
28
|
+
this.isForm = param.isForm;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (utility_1.ToolHelper.isArray(param)) {
|
|
32
|
+
const bindingArr = [];
|
|
33
|
+
param.forEach((item) => {
|
|
34
|
+
if (!utility_1.ToolHelper.isNullOrUndefined(item) && (!item.source || item.source === "dom")) {
|
|
35
|
+
let itemValue = item.value;
|
|
36
|
+
if (!item.source) {
|
|
37
|
+
itemValue = item;
|
|
38
|
+
}
|
|
39
|
+
const bindindValue = new Binding(itemValue, {
|
|
40
|
+
externalComponentNameSpace: options.externalComponentNameSpace,
|
|
41
|
+
runningPosition: options.runningPosition,
|
|
42
|
+
addThisWithViewModel: false,
|
|
43
|
+
parentComponentId: options.parentComponentId
|
|
44
|
+
});
|
|
45
|
+
bindindValue.value = { source: "dom", value: bindindValue.value };
|
|
46
|
+
bindingArr.push(bindindValue);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const bindingValue = new Binding(item, {
|
|
50
|
+
externalComponentNameSpace: options.externalComponentNameSpace,
|
|
51
|
+
runningPosition: options.runningPosition,
|
|
52
|
+
addThisWithViewModel: false,
|
|
53
|
+
parentComponentId: options.parentComponentId
|
|
54
|
+
});
|
|
55
|
+
bindingArr.push(bindingValue);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
this.isComposite = true;
|
|
59
|
+
const compositeValue = bindingArr.map((bindingItem) => {
|
|
60
|
+
return bindingItem.value;
|
|
61
|
+
});
|
|
62
|
+
this.value = compositeValue;
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const externalComponentNameSpace = options.externalComponentNameSpace;
|
|
66
|
+
this.runningPosition = options.runningPosition ? options.runningPosition : running_position_enum_1.RunningPositionEnum.card;
|
|
67
|
+
if (utility_1.ToolHelper.isNullOrUndefinedOrEmpty(param)) {
|
|
68
|
+
this.useQuote = false;
|
|
69
|
+
this.value = param;
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (utility_1.ToolHelper.isBoolean(param) || utility_1.ToolHelper.isNumber(param)) {
|
|
73
|
+
this.useQuote = false;
|
|
74
|
+
this.value = param;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (utility_1.ToolHelper.isObject(param) && param.source) {
|
|
78
|
+
this.value = param;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (utility_1.ToolHelper.isString(param) && utility_1.ToolHelper.isObject(param) == false) {
|
|
82
|
+
if (param.indexOf("=>") >= 0) {
|
|
83
|
+
this.value = param;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
if (options.addThisWithViewModel) {
|
|
87
|
+
this.value = utility_1.ToolHelper.viewModelReplaceToThisViewModel(param);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
this.value = param;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
this.useQuote = false;
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
let obj;
|
|
97
|
+
if (typeof param === 'string') {
|
|
98
|
+
obj = utility_1.ToolHelper.convertToJsonOrDefault(param);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
obj = param;
|
|
102
|
+
}
|
|
103
|
+
if (!obj) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const keys = 'type,target,path,expressionId,runningPosition,fullPath,bindingPath';
|
|
107
|
+
Object.keys(obj).forEach(key => {
|
|
108
|
+
if (keys.includes(key)) {
|
|
109
|
+
this[key] = obj[key];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
if (this.type == "Variable") {
|
|
113
|
+
this.useQuote = false;
|
|
114
|
+
const [frameComponentId, variablePath] = this.path.split('.');
|
|
115
|
+
if (!variablePath) {
|
|
116
|
+
this.value = "this.viewModel['uiState']['" + this.path + "']";
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
const externalComponentFrameId = componentFrameID_helper_1.ComponentFrameIDHelper.getComponentFrameIdWithNameSpace({ componentNameSpace: externalComponentNameSpace, frameID: frameComponentId });
|
|
120
|
+
this.value = "this.context.appContext.getFrameContext('" + externalComponentFrameId + "')['uiState']['" + variablePath + "']";
|
|
121
|
+
}
|
|
122
|
+
this.isVariable = true;
|
|
123
|
+
}
|
|
124
|
+
else if (this.type == "Form") {
|
|
125
|
+
this.value = this.path;
|
|
126
|
+
this.isForm = true;
|
|
127
|
+
}
|
|
128
|
+
else if (this.type == "Expression" || this.type == "FormRule") {
|
|
129
|
+
this.value = expression_value_generator_1.ExpressionValueGenerator.generate(this.expressionId, this.runningPosition);
|
|
130
|
+
this.useQuote = this.runningPosition == running_position_enum_1.RunningPositionEnum.card;
|
|
131
|
+
this.isExpression = true;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
toJSON() {
|
|
135
|
+
return {
|
|
136
|
+
"useQuote": this.useQuote,
|
|
137
|
+
"type": this.type,
|
|
138
|
+
"target": this.target,
|
|
139
|
+
"path": this.path,
|
|
140
|
+
"fullPath": this.fullPath,
|
|
141
|
+
"isExpression": this.isExpression,
|
|
142
|
+
"bindingPath": this.bindingPath,
|
|
143
|
+
"value": this.value
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
toString() {
|
|
147
|
+
if (this.useQuote) {
|
|
148
|
+
return `'${this.value}'`;
|
|
149
|
+
}
|
|
150
|
+
return this.value;
|
|
151
|
+
}
|
|
152
|
+
toAbstractDom() {
|
|
153
|
+
return {
|
|
154
|
+
"type": this.type,
|
|
155
|
+
"target": this.target,
|
|
156
|
+
"path": this.path,
|
|
157
|
+
"fullPath": this.fullPath,
|
|
158
|
+
"isExpression": this.isExpression,
|
|
159
|
+
"isForm": this.isForm,
|
|
160
|
+
"isVariable": this.isVariable
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
exports.Binding = Binding;
|
|
165
165
|
//# sourceMappingURL=binding.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding.js","sourceRoot":"","sources":["../../../../src/domstructure/ui/common/binding.ts"],"names":[],"mappings":";;;AAAA,sFAAkF;AAClF,8CAA8C;AAC9C,4FAAuF;AACvF,uEAAkE;AAGlE,MAAa,OAAO;IA6BlB,YAAY,KAAmB,EAAE,OAKhC;QAxBD,iBAAY,GAAG,KAAK,CAAC;QAErB,eAAU,GAAG,KAAK,CAAC;QACnB,WAAM,GAAG,KAAK,CAAC;QAMf,gBAAW,GAAG,KAAK,CAAC;QAOpB,oBAAe,GAAwB,2CAAmB,CAAC,IAAI,CAAC;QA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AE,IAAI,CAAC,QAAQ;YACzB,MAAM,EAAE,IAAI,CAAC,IAAI;YACjB,QAAQ,EAAE,IAAI,CAAC,MAAM;YACrB,MAAM,EAAE,IAAI,CAAC,IAAI;YACjB,UAAU,EAAE,IAAI,CAAC,QAAQ;YACzB,cAAc,EAAE,IAAI,CAAC,YAAY;YACjC,aAAa,EAAE,IAAI,CAAC,WAAW;YAC/B,OAAO,EAAE,IAAI,CAAC,KAAK;SACpB,CAAC;IACJ,CAAC;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC;SAC1B;QACD,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,aAAa;QACX,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,IAAI;YACjB,QAAQ,EAAE,IAAI,CAAC,MAAM;YACrB,MAAM,EAAE,IAAI,CAAC,IAAI;YACjB,UAAU,EAAE,IAAI,CAAC,QAAQ;YACzB,cAAc,EAAE,IAAI,CAAC,YAAY;YACjC,QAAQ,EAAE,IAAI,CAAC,MAAM;YACrB,YAAY,EAAE,IAAI,CAAC,UAAU;SAC9B,CAAC;IACJ,CAAC;CACF;AA3MD,0BA2MC"}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Border = void 0;
|
|
4
|
-
const utility_1 = require("../../../utility");
|
|
5
|
-
class Border {
|
|
6
|
-
constructor(param) {
|
|
7
|
-
let obj;
|
|
8
|
-
if (typeof param === 'string') {
|
|
9
|
-
obj = utility_1.ToolHelper.convertToJsonOrDefault(param);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
obj = param;
|
|
13
|
-
}
|
|
14
|
-
if (!obj) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
const keys = 'left,top,right,bottom,color,width';
|
|
18
|
-
Object.keys(obj).forEach(key => {
|
|
19
|
-
if (keys.includes(key)) {
|
|
20
|
-
this[key] = obj[key];
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
toJSON() {
|
|
25
|
-
return {
|
|
26
|
-
"left": this.left,
|
|
27
|
-
"top": this.top,
|
|
28
|
-
"right": this.right,
|
|
29
|
-
"bottom": this.bottom,
|
|
30
|
-
"all": this.all,
|
|
31
|
-
"color": this.color,
|
|
32
|
-
"width": this.width
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
toString() {
|
|
36
|
-
return JSON.stringify(this.toJSON());
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.Border = Border;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Border = void 0;
|
|
4
|
+
const utility_1 = require("../../../utility");
|
|
5
|
+
class Border {
|
|
6
|
+
constructor(param) {
|
|
7
|
+
let obj;
|
|
8
|
+
if (typeof param === 'string') {
|
|
9
|
+
obj = utility_1.ToolHelper.convertToJsonOrDefault(param);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
obj = param;
|
|
13
|
+
}
|
|
14
|
+
if (!obj) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const keys = 'left,top,right,bottom,color,width';
|
|
18
|
+
Object.keys(obj).forEach(key => {
|
|
19
|
+
if (keys.includes(key)) {
|
|
20
|
+
this[key] = obj[key];
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
toJSON() {
|
|
25
|
+
return {
|
|
26
|
+
"left": this.left,
|
|
27
|
+
"top": this.top,
|
|
28
|
+
"right": this.right,
|
|
29
|
+
"bottom": this.bottom,
|
|
30
|
+
"all": this.all,
|
|
31
|
+
"color": this.color,
|
|
32
|
+
"width": this.width
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
toString() {
|
|
36
|
+
return JSON.stringify(this.toJSON());
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.Border = Border;
|
|
40
40
|
//# sourceMappingURL=border.js.map
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Font = void 0;
|
|
4
|
-
const utility_1 = require("../../../utility");
|
|
5
|
-
class Font {
|
|
6
|
-
constructor(param) {
|
|
7
|
-
let obj;
|
|
8
|
-
if (typeof param === 'string') {
|
|
9
|
-
obj = utility_1.ToolHelper.convertToJsonOrDefault(param);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
obj = param;
|
|
13
|
-
}
|
|
14
|
-
if (!obj) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
const keys = 'family,size,color,bold,underscore,italic';
|
|
18
|
-
Object.keys(obj).forEach(key => {
|
|
19
|
-
if (keys.includes(key)) {
|
|
20
|
-
this[key] = obj[key];
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
toJSON() {
|
|
25
|
-
return {
|
|
26
|
-
"family": this.family,
|
|
27
|
-
"size": this.size,
|
|
28
|
-
"color": this.color,
|
|
29
|
-
"bold": this.bold,
|
|
30
|
-
"underscore": this.underscore,
|
|
31
|
-
"italic": this.italic
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
toString() {
|
|
35
|
-
return JSON.stringify(this.toJSON());
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.Font = Font;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Font = void 0;
|
|
4
|
+
const utility_1 = require("../../../utility");
|
|
5
|
+
class Font {
|
|
6
|
+
constructor(param) {
|
|
7
|
+
let obj;
|
|
8
|
+
if (typeof param === 'string') {
|
|
9
|
+
obj = utility_1.ToolHelper.convertToJsonOrDefault(param);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
obj = param;
|
|
13
|
+
}
|
|
14
|
+
if (!obj) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const keys = 'family,size,color,bold,underscore,italic';
|
|
18
|
+
Object.keys(obj).forEach(key => {
|
|
19
|
+
if (keys.includes(key)) {
|
|
20
|
+
this[key] = obj[key];
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
toJSON() {
|
|
25
|
+
return {
|
|
26
|
+
"family": this.family,
|
|
27
|
+
"size": this.size,
|
|
28
|
+
"color": this.color,
|
|
29
|
+
"bold": this.bold,
|
|
30
|
+
"underscore": this.underscore,
|
|
31
|
+
"italic": this.italic
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
toString() {
|
|
35
|
+
return JSON.stringify(this.toJSON());
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.Font = Font;
|
|
39
39
|
//# sourceMappingURL=font.js.map
|
|
@@ -1,22 +1,22 @@
|
|
|
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("./appearance"), exports);
|
|
14
|
-
__exportStar(require("./background"), exports);
|
|
15
|
-
__exportStar(require("./binding"), exports);
|
|
16
|
-
__exportStar(require("./border"), exports);
|
|
17
|
-
__exportStar(require("./basecomponent"), exports);
|
|
18
|
-
__exportStar(require("./font"), exports);
|
|
19
|
-
__exportStar(require("./margin"), exports);
|
|
20
|
-
__exportStar(require("./padding"), exports);
|
|
21
|
-
__exportStar(require("./size"), 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("./appearance"), exports);
|
|
14
|
+
__exportStar(require("./background"), exports);
|
|
15
|
+
__exportStar(require("./binding"), exports);
|
|
16
|
+
__exportStar(require("./border"), exports);
|
|
17
|
+
__exportStar(require("./basecomponent"), exports);
|
|
18
|
+
__exportStar(require("./font"), exports);
|
|
19
|
+
__exportStar(require("./margin"), exports);
|
|
20
|
+
__exportStar(require("./padding"), exports);
|
|
21
|
+
__exportStar(require("./size"), exports);
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Margin = void 0;
|
|
4
|
-
const utility_1 = require("../../../utility");
|
|
5
|
-
class Margin {
|
|
6
|
-
constructor(param) {
|
|
7
|
-
let obj;
|
|
8
|
-
if (typeof param === 'string') {
|
|
9
|
-
obj = utility_1.ToolHelper.convertToJsonOrDefault(param);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
obj = param;
|
|
13
|
-
}
|
|
14
|
-
if (!obj) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
const keys = 'left,top,right,bottom,all,horizental,vertical';
|
|
18
|
-
Object.keys(obj).forEach(key => {
|
|
19
|
-
if (keys.includes(key)) {
|
|
20
|
-
this[key] = obj[key];
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
toJSON() {
|
|
25
|
-
return {
|
|
26
|
-
"left": this.left,
|
|
27
|
-
"top": this.top,
|
|
28
|
-
"right": this.right,
|
|
29
|
-
"bottom": this.bottom,
|
|
30
|
-
"all": this.all,
|
|
31
|
-
"horizental": this.horizental,
|
|
32
|
-
"vertical": this.vertical
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
toString() {
|
|
36
|
-
return JSON.stringify(this.toJSON());
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.Margin = Margin;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Margin = void 0;
|
|
4
|
+
const utility_1 = require("../../../utility");
|
|
5
|
+
class Margin {
|
|
6
|
+
constructor(param) {
|
|
7
|
+
let obj;
|
|
8
|
+
if (typeof param === 'string') {
|
|
9
|
+
obj = utility_1.ToolHelper.convertToJsonOrDefault(param);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
obj = param;
|
|
13
|
+
}
|
|
14
|
+
if (!obj) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const keys = 'left,top,right,bottom,all,horizental,vertical';
|
|
18
|
+
Object.keys(obj).forEach(key => {
|
|
19
|
+
if (keys.includes(key)) {
|
|
20
|
+
this[key] = obj[key];
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
toJSON() {
|
|
25
|
+
return {
|
|
26
|
+
"left": this.left,
|
|
27
|
+
"top": this.top,
|
|
28
|
+
"right": this.right,
|
|
29
|
+
"bottom": this.bottom,
|
|
30
|
+
"all": this.all,
|
|
31
|
+
"horizental": this.horizental,
|
|
32
|
+
"vertical": this.vertical
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
toString() {
|
|
36
|
+
return JSON.stringify(this.toJSON());
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.Margin = Margin;
|
|
40
40
|
//# sourceMappingURL=margin.js.map
|