@sankhyalabs/ezui 7.1.0-dev.1 → 7.1.0-dev.2
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/dist/cjs/ez-form.cjs.entry.js +99 -37
- package/dist/collection/utils/form/FormMetadata.js +99 -37
- package/dist/custom-elements/index.js +99 -37
- package/dist/esm/ez-form.entry.js +99 -37
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-f958dcb1.entry.js +1 -0
- package/dist/types/utils/form/FormMetadata.d.ts +2 -1
- package/dist/types/utils/form/interfaces/IFormSheetMetadata.d.ts +2 -0
- package/dist/types/utils/form/interfaces/ITabConfig.d.ts +2 -0
- package/package.json +1 -1
- package/dist/ezui/p-4c4f0850.entry.js +0 -1
|
@@ -82,28 +82,49 @@ const buildFormConfigFromDataUnit = (dataUnit) => {
|
|
|
82
82
|
.filter(descriptor => descriptor.visible !== false)
|
|
83
83
|
.map(descriptor => { return { name: descriptor.name, defaultValue: descriptor.defaultValue }; });
|
|
84
84
|
}
|
|
85
|
-
|
|
86
|
-
return config;
|
|
85
|
+
return { emptyConfig: false, fields };
|
|
87
86
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
const defaultValues = {};
|
|
98
|
-
(_a = config === null || config === void 0 ? void 0 : config.tabs) === null || _a === void 0 ? void 0 : _a.forEach((tab) => {
|
|
99
|
-
if (!hiddenTabs.has(tab.label) && tab.visible === false) {
|
|
100
|
-
hiddenTabs.set(tab.label, tab);
|
|
87
|
+
function handleDetailTabs(dataUnit, config, sheets) {
|
|
88
|
+
const unitMD = dataUnit.metadata;
|
|
89
|
+
if (unitMD === undefined || unitMD.children === undefined)
|
|
90
|
+
return;
|
|
91
|
+
unitMD.children.forEach((child) => {
|
|
92
|
+
const tabConfig = getTabFromConfig(child.label, config);
|
|
93
|
+
if (tabConfig) {
|
|
94
|
+
sheets.set(Object.assign(tabConfig, { name: buildChildName(child), isDetail: true }), []);
|
|
95
|
+
return;
|
|
101
96
|
}
|
|
97
|
+
const { label, name, fields } = buildDetailSheet(child);
|
|
98
|
+
sheets.set({ name, label, isDetail: true }, fields);
|
|
102
99
|
});
|
|
103
|
-
|
|
100
|
+
}
|
|
101
|
+
function handleCustomTabs(customGuides, config, sheets) {
|
|
102
|
+
customGuides.forEach((guide) => {
|
|
103
|
+
const tabConfig = getTabFromConfig(guide.label, config);
|
|
104
|
+
if (tabConfig) {
|
|
105
|
+
sheets.set(Object.assign(tabConfig, { name: guide.id, isCustom: true }), []);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const sheet = { label: guide.label, name: guide.id, isCustom: true, visible: true };
|
|
109
|
+
sheets.set(sheet, []);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function parseTabToFormSheet(key, fields) {
|
|
113
|
+
const i18n = index.getI18n();
|
|
114
|
+
return {
|
|
115
|
+
label: (key.label === "__main") ? i18n("ez-form.mainTab") : key.label,
|
|
116
|
+
name: key.name || key.label,
|
|
117
|
+
isCustom: key.isCustom,
|
|
118
|
+
isDetail: key.isDetail,
|
|
119
|
+
fields
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function handleFields(config, sheets, hiddenTabs, dataUnit, requiredFields, cleanOnCopyFields, defaultValues) {
|
|
123
|
+
var _a;
|
|
124
|
+
(_a = config === null || config === void 0 ? void 0 : config.fields) === null || _a === void 0 ? void 0 : _a.forEach((field) => {
|
|
104
125
|
var _a, _b, _c;
|
|
105
126
|
if (field.visible !== false) {
|
|
106
|
-
const tabConfig = getTabConfig(field.tab || "__main", sheets);
|
|
127
|
+
const tabConfig = getTabConfig(field.tab || "__main", sheets, config);
|
|
107
128
|
if (hiddenTabs.has(tabConfig.label)) {
|
|
108
129
|
return;
|
|
109
130
|
}
|
|
@@ -139,7 +160,8 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
|
|
|
139
160
|
defaultValue = value;
|
|
140
161
|
}
|
|
141
162
|
}
|
|
142
|
-
catch (_d) {
|
|
163
|
+
catch (_d) {
|
|
164
|
+
}
|
|
143
165
|
}
|
|
144
166
|
}
|
|
145
167
|
defaultValues[field.name] = defaultValue;
|
|
@@ -147,42 +169,82 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
|
|
|
147
169
|
}
|
|
148
170
|
}
|
|
149
171
|
});
|
|
172
|
+
}
|
|
173
|
+
const buildFormMetadata = (config, dataUnit, includeDetails = false, customGuides) => {
|
|
174
|
+
var _a;
|
|
175
|
+
if (config == undefined || (config === null || config === void 0 ? void 0 : config.emptyConfig) === true) {
|
|
176
|
+
config = buildFormConfigFromDataUnit(dataUnit);
|
|
177
|
+
}
|
|
178
|
+
const sheets = new Map();
|
|
179
|
+
const hiddenTabs = new Map();
|
|
180
|
+
const requiredFields = [];
|
|
181
|
+
const cleanOnCopyFields = [];
|
|
182
|
+
const defaultValues = {};
|
|
183
|
+
const tabs = (_a = config === null || config === void 0 ? void 0 : config.tabs) !== null && _a !== void 0 ? _a : [];
|
|
184
|
+
tabs.forEach((tab) => {
|
|
185
|
+
if (!hiddenTabs.has(tab.label) && tab.visible === false) {
|
|
186
|
+
hiddenTabs.set(tab.label, tab);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
handleFields(config, sheets, hiddenTabs, dataUnit, requiredFields, cleanOnCopyFields, defaultValues);
|
|
150
190
|
const metadata = new FormMetadata();
|
|
151
191
|
metadata.setDefaultVars(config.defaultVars);
|
|
152
192
|
if (includeDetails) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
sheets.set({ name, label }, fields);
|
|
158
|
-
});
|
|
159
|
-
}
|
|
193
|
+
handleDetailTabs(dataUnit, config, sheets);
|
|
194
|
+
}
|
|
195
|
+
if (customGuides) {
|
|
196
|
+
handleCustomTabs(customGuides, config, sheets);
|
|
160
197
|
}
|
|
161
|
-
const i18n = index.getI18n();
|
|
162
198
|
Array.from(sheets.entries())
|
|
163
199
|
.sort(sortTabs)
|
|
164
|
-
.forEach(([
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
fields
|
|
169
|
-
});
|
|
200
|
+
.forEach(([tab, fields]) => {
|
|
201
|
+
if (!hiddenTabs.has(tab.label)) {
|
|
202
|
+
metadata.addSheet(parseTabToFormSheet(tab, fields));
|
|
203
|
+
}
|
|
170
204
|
});
|
|
171
205
|
metadata.addRequiredFields(requiredFields);
|
|
172
206
|
metadata.addCleanOnCopyFields(cleanOnCopyFields);
|
|
173
207
|
metadata.addDefaultValues(defaultValues);
|
|
174
208
|
return metadata;
|
|
175
209
|
};
|
|
176
|
-
const
|
|
177
|
-
|
|
210
|
+
const getTabFromConfig = (tab, config) => {
|
|
211
|
+
var _a;
|
|
212
|
+
if (!config) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
return (_a = config.tabs) === null || _a === void 0 ? void 0 : _a.find(t => t.label === tab);
|
|
216
|
+
};
|
|
217
|
+
const getTabConfig = (tab, sheets, config) => {
|
|
218
|
+
if (typeof tab !== "string") {
|
|
219
|
+
return tab;
|
|
220
|
+
}
|
|
221
|
+
if (config) {
|
|
222
|
+
const tabConfig = getTabFromConfig(tab, config);
|
|
223
|
+
if (tabConfig) {
|
|
224
|
+
return tabConfig;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const tabConfig = Array.from(sheets.keys()).find(t => t.label === tab);
|
|
178
228
|
return tabConfig || { label: tab, visible: true };
|
|
179
229
|
};
|
|
180
|
-
|
|
181
|
-
|
|
230
|
+
function sortTabs(a, b) {
|
|
231
|
+
var _a, _b;
|
|
232
|
+
if (a[0].label === '__main' && b[0].label !== '__main') {
|
|
233
|
+
return -1;
|
|
234
|
+
}
|
|
235
|
+
if (a[0].label !== '__main' && b[0].label === '__main') {
|
|
236
|
+
return 1;
|
|
237
|
+
}
|
|
238
|
+
const aOrder = (_a = a[0].order) !== null && _a !== void 0 ? _a : Number.MAX_VALUE;
|
|
239
|
+
const bOrder = (_b = b[0].order) !== null && _b !== void 0 ? _b : Number.MAX_VALUE;
|
|
240
|
+
return aOrder - bOrder;
|
|
241
|
+
}
|
|
242
|
+
const buildChildName = (child) => {
|
|
243
|
+
return `child[${child.name}]`;
|
|
182
244
|
};
|
|
183
245
|
const buildDetailSheet = (child) => {
|
|
184
246
|
return {
|
|
185
|
-
name:
|
|
247
|
+
name: buildChildName(child),
|
|
186
248
|
label: child.label,
|
|
187
249
|
fields: []
|
|
188
250
|
};
|
|
@@ -72,28 +72,49 @@ export const buildFormConfigFromDataUnit = (dataUnit) => {
|
|
|
72
72
|
.filter(descriptor => descriptor.visible !== false)
|
|
73
73
|
.map(descriptor => { return { name: descriptor.name, defaultValue: descriptor.defaultValue }; });
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
return config;
|
|
75
|
+
return { emptyConfig: false, fields };
|
|
77
76
|
};
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
const defaultValues = {};
|
|
88
|
-
(_a = config === null || config === void 0 ? void 0 : config.tabs) === null || _a === void 0 ? void 0 : _a.forEach((tab) => {
|
|
89
|
-
if (!hiddenTabs.has(tab.label) && tab.visible === false) {
|
|
90
|
-
hiddenTabs.set(tab.label, tab);
|
|
77
|
+
function handleDetailTabs(dataUnit, config, sheets) {
|
|
78
|
+
const unitMD = dataUnit.metadata;
|
|
79
|
+
if (unitMD === undefined || unitMD.children === undefined)
|
|
80
|
+
return;
|
|
81
|
+
unitMD.children.forEach((child) => {
|
|
82
|
+
const tabConfig = getTabFromConfig(child.label, config);
|
|
83
|
+
if (tabConfig) {
|
|
84
|
+
sheets.set(Object.assign(tabConfig, { name: buildChildName(child), isDetail: true }), []);
|
|
85
|
+
return;
|
|
91
86
|
}
|
|
87
|
+
const { label, name, fields } = buildDetailSheet(child);
|
|
88
|
+
sheets.set({ name, label, isDetail: true }, fields);
|
|
92
89
|
});
|
|
93
|
-
|
|
90
|
+
}
|
|
91
|
+
function handleCustomTabs(customGuides, config, sheets) {
|
|
92
|
+
customGuides.forEach((guide) => {
|
|
93
|
+
const tabConfig = getTabFromConfig(guide.label, config);
|
|
94
|
+
if (tabConfig) {
|
|
95
|
+
sheets.set(Object.assign(tabConfig, { name: guide.id, isCustom: true }), []);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const sheet = { label: guide.label, name: guide.id, isCustom: true, visible: true };
|
|
99
|
+
sheets.set(sheet, []);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function parseTabToFormSheet(key, fields) {
|
|
103
|
+
const i18n = getI18n();
|
|
104
|
+
return {
|
|
105
|
+
label: (key.label === "__main") ? i18n("ez-form.mainTab") : key.label,
|
|
106
|
+
name: key.name || key.label,
|
|
107
|
+
isCustom: key.isCustom,
|
|
108
|
+
isDetail: key.isDetail,
|
|
109
|
+
fields
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function handleFields(config, sheets, hiddenTabs, dataUnit, requiredFields, cleanOnCopyFields, defaultValues) {
|
|
113
|
+
var _a;
|
|
114
|
+
(_a = config === null || config === void 0 ? void 0 : config.fields) === null || _a === void 0 ? void 0 : _a.forEach((field) => {
|
|
94
115
|
var _a, _b, _c;
|
|
95
116
|
if (field.visible !== false) {
|
|
96
|
-
const tabConfig = getTabConfig(field.tab || "__main", sheets);
|
|
117
|
+
const tabConfig = getTabConfig(field.tab || "__main", sheets, config);
|
|
97
118
|
if (hiddenTabs.has(tabConfig.label)) {
|
|
98
119
|
return;
|
|
99
120
|
}
|
|
@@ -129,7 +150,8 @@ export const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
|
|
|
129
150
|
defaultValue = value;
|
|
130
151
|
}
|
|
131
152
|
}
|
|
132
|
-
catch (_d) {
|
|
153
|
+
catch (_d) {
|
|
154
|
+
}
|
|
133
155
|
}
|
|
134
156
|
}
|
|
135
157
|
defaultValues[field.name] = defaultValue;
|
|
@@ -137,42 +159,82 @@ export const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
|
|
|
137
159
|
}
|
|
138
160
|
}
|
|
139
161
|
});
|
|
162
|
+
}
|
|
163
|
+
export const buildFormMetadata = (config, dataUnit, includeDetails = false, customGuides) => {
|
|
164
|
+
var _a;
|
|
165
|
+
if (config == undefined || (config === null || config === void 0 ? void 0 : config.emptyConfig) === true) {
|
|
166
|
+
config = buildFormConfigFromDataUnit(dataUnit);
|
|
167
|
+
}
|
|
168
|
+
const sheets = new Map();
|
|
169
|
+
const hiddenTabs = new Map();
|
|
170
|
+
const requiredFields = [];
|
|
171
|
+
const cleanOnCopyFields = [];
|
|
172
|
+
const defaultValues = {};
|
|
173
|
+
const tabs = (_a = config === null || config === void 0 ? void 0 : config.tabs) !== null && _a !== void 0 ? _a : [];
|
|
174
|
+
tabs.forEach((tab) => {
|
|
175
|
+
if (!hiddenTabs.has(tab.label) && tab.visible === false) {
|
|
176
|
+
hiddenTabs.set(tab.label, tab);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
handleFields(config, sheets, hiddenTabs, dataUnit, requiredFields, cleanOnCopyFields, defaultValues);
|
|
140
180
|
const metadata = new FormMetadata();
|
|
141
181
|
metadata.setDefaultVars(config.defaultVars);
|
|
142
182
|
if (includeDetails) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
sheets.set({ name, label }, fields);
|
|
148
|
-
});
|
|
149
|
-
}
|
|
183
|
+
handleDetailTabs(dataUnit, config, sheets);
|
|
184
|
+
}
|
|
185
|
+
if (customGuides) {
|
|
186
|
+
handleCustomTabs(customGuides, config, sheets);
|
|
150
187
|
}
|
|
151
|
-
const i18n = getI18n();
|
|
152
188
|
Array.from(sheets.entries())
|
|
153
189
|
.sort(sortTabs)
|
|
154
|
-
.forEach(([
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
fields
|
|
159
|
-
});
|
|
190
|
+
.forEach(([tab, fields]) => {
|
|
191
|
+
if (!hiddenTabs.has(tab.label)) {
|
|
192
|
+
metadata.addSheet(parseTabToFormSheet(tab, fields));
|
|
193
|
+
}
|
|
160
194
|
});
|
|
161
195
|
metadata.addRequiredFields(requiredFields);
|
|
162
196
|
metadata.addCleanOnCopyFields(cleanOnCopyFields);
|
|
163
197
|
metadata.addDefaultValues(defaultValues);
|
|
164
198
|
return metadata;
|
|
165
199
|
};
|
|
166
|
-
const
|
|
167
|
-
|
|
200
|
+
const getTabFromConfig = (tab, config) => {
|
|
201
|
+
var _a;
|
|
202
|
+
if (!config) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
return (_a = config.tabs) === null || _a === void 0 ? void 0 : _a.find(t => t.label === tab);
|
|
206
|
+
};
|
|
207
|
+
const getTabConfig = (tab, sheets, config) => {
|
|
208
|
+
if (typeof tab !== "string") {
|
|
209
|
+
return tab;
|
|
210
|
+
}
|
|
211
|
+
if (config) {
|
|
212
|
+
const tabConfig = getTabFromConfig(tab, config);
|
|
213
|
+
if (tabConfig) {
|
|
214
|
+
return tabConfig;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const tabConfig = Array.from(sheets.keys()).find(t => t.label === tab);
|
|
168
218
|
return tabConfig || { label: tab, visible: true };
|
|
169
219
|
};
|
|
170
|
-
|
|
171
|
-
|
|
220
|
+
function sortTabs(a, b) {
|
|
221
|
+
var _a, _b;
|
|
222
|
+
if (a[0].label === '__main' && b[0].label !== '__main') {
|
|
223
|
+
return -1;
|
|
224
|
+
}
|
|
225
|
+
if (a[0].label !== '__main' && b[0].label === '__main') {
|
|
226
|
+
return 1;
|
|
227
|
+
}
|
|
228
|
+
const aOrder = (_a = a[0].order) !== null && _a !== void 0 ? _a : Number.MAX_VALUE;
|
|
229
|
+
const bOrder = (_b = b[0].order) !== null && _b !== void 0 ? _b : Number.MAX_VALUE;
|
|
230
|
+
return aOrder - bOrder;
|
|
231
|
+
}
|
|
232
|
+
const buildChildName = (child) => {
|
|
233
|
+
return `child[${child.name}]`;
|
|
172
234
|
};
|
|
173
235
|
const buildDetailSheet = (child) => {
|
|
174
236
|
return {
|
|
175
|
-
name:
|
|
237
|
+
name: buildChildName(child),
|
|
176
238
|
label: child.label,
|
|
177
239
|
fields: []
|
|
178
240
|
};
|
|
@@ -4149,28 +4149,49 @@ const buildFormConfigFromDataUnit = (dataUnit) => {
|
|
|
4149
4149
|
.filter(descriptor => descriptor.visible !== false)
|
|
4150
4150
|
.map(descriptor => { return { name: descriptor.name, defaultValue: descriptor.defaultValue }; });
|
|
4151
4151
|
}
|
|
4152
|
-
|
|
4153
|
-
return config;
|
|
4152
|
+
return { emptyConfig: false, fields };
|
|
4154
4153
|
};
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
if (
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
const defaultValues = {};
|
|
4165
|
-
(_a = config === null || config === void 0 ? void 0 : config.tabs) === null || _a === void 0 ? void 0 : _a.forEach((tab) => {
|
|
4166
|
-
if (!hiddenTabs.has(tab.label) && tab.visible === false) {
|
|
4167
|
-
hiddenTabs.set(tab.label, tab);
|
|
4154
|
+
function handleDetailTabs(dataUnit, config, sheets) {
|
|
4155
|
+
const unitMD = dataUnit.metadata;
|
|
4156
|
+
if (unitMD === undefined || unitMD.children === undefined)
|
|
4157
|
+
return;
|
|
4158
|
+
unitMD.children.forEach((child) => {
|
|
4159
|
+
const tabConfig = getTabFromConfig(child.label, config);
|
|
4160
|
+
if (tabConfig) {
|
|
4161
|
+
sheets.set(Object.assign(tabConfig, { name: buildChildName(child), isDetail: true }), []);
|
|
4162
|
+
return;
|
|
4168
4163
|
}
|
|
4164
|
+
const { label, name, fields } = buildDetailSheet(child);
|
|
4165
|
+
sheets.set({ name, label, isDetail: true }, fields);
|
|
4169
4166
|
});
|
|
4170
|
-
|
|
4167
|
+
}
|
|
4168
|
+
function handleCustomTabs(customGuides, config, sheets) {
|
|
4169
|
+
customGuides.forEach((guide) => {
|
|
4170
|
+
const tabConfig = getTabFromConfig(guide.label, config);
|
|
4171
|
+
if (tabConfig) {
|
|
4172
|
+
sheets.set(Object.assign(tabConfig, { name: guide.id, isCustom: true }), []);
|
|
4173
|
+
return;
|
|
4174
|
+
}
|
|
4175
|
+
const sheet = { label: guide.label, name: guide.id, isCustom: true, visible: true };
|
|
4176
|
+
sheets.set(sheet, []);
|
|
4177
|
+
});
|
|
4178
|
+
}
|
|
4179
|
+
function parseTabToFormSheet(key, fields) {
|
|
4180
|
+
const i18n = getI18n();
|
|
4181
|
+
return {
|
|
4182
|
+
label: (key.label === "__main") ? i18n("ez-form.mainTab") : key.label,
|
|
4183
|
+
name: key.name || key.label,
|
|
4184
|
+
isCustom: key.isCustom,
|
|
4185
|
+
isDetail: key.isDetail,
|
|
4186
|
+
fields
|
|
4187
|
+
};
|
|
4188
|
+
}
|
|
4189
|
+
function handleFields(config, sheets, hiddenTabs, dataUnit, requiredFields, cleanOnCopyFields, defaultValues) {
|
|
4190
|
+
var _a;
|
|
4191
|
+
(_a = config === null || config === void 0 ? void 0 : config.fields) === null || _a === void 0 ? void 0 : _a.forEach((field) => {
|
|
4171
4192
|
var _a, _b, _c;
|
|
4172
4193
|
if (field.visible !== false) {
|
|
4173
|
-
const tabConfig = getTabConfig(field.tab || "__main", sheets);
|
|
4194
|
+
const tabConfig = getTabConfig(field.tab || "__main", sheets, config);
|
|
4174
4195
|
if (hiddenTabs.has(tabConfig.label)) {
|
|
4175
4196
|
return;
|
|
4176
4197
|
}
|
|
@@ -4206,7 +4227,8 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
|
|
|
4206
4227
|
defaultValue = value;
|
|
4207
4228
|
}
|
|
4208
4229
|
}
|
|
4209
|
-
catch (_d) {
|
|
4230
|
+
catch (_d) {
|
|
4231
|
+
}
|
|
4210
4232
|
}
|
|
4211
4233
|
}
|
|
4212
4234
|
defaultValues[field.name] = defaultValue;
|
|
@@ -4214,42 +4236,82 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
|
|
|
4214
4236
|
}
|
|
4215
4237
|
}
|
|
4216
4238
|
});
|
|
4239
|
+
}
|
|
4240
|
+
const buildFormMetadata = (config, dataUnit, includeDetails = false, customGuides) => {
|
|
4241
|
+
var _a;
|
|
4242
|
+
if (config == undefined || (config === null || config === void 0 ? void 0 : config.emptyConfig) === true) {
|
|
4243
|
+
config = buildFormConfigFromDataUnit(dataUnit);
|
|
4244
|
+
}
|
|
4245
|
+
const sheets = new Map();
|
|
4246
|
+
const hiddenTabs = new Map();
|
|
4247
|
+
const requiredFields = [];
|
|
4248
|
+
const cleanOnCopyFields = [];
|
|
4249
|
+
const defaultValues = {};
|
|
4250
|
+
const tabs = (_a = config === null || config === void 0 ? void 0 : config.tabs) !== null && _a !== void 0 ? _a : [];
|
|
4251
|
+
tabs.forEach((tab) => {
|
|
4252
|
+
if (!hiddenTabs.has(tab.label) && tab.visible === false) {
|
|
4253
|
+
hiddenTabs.set(tab.label, tab);
|
|
4254
|
+
}
|
|
4255
|
+
});
|
|
4256
|
+
handleFields(config, sheets, hiddenTabs, dataUnit, requiredFields, cleanOnCopyFields, defaultValues);
|
|
4217
4257
|
const metadata = new FormMetadata();
|
|
4218
4258
|
metadata.setDefaultVars(config.defaultVars);
|
|
4219
4259
|
if (includeDetails) {
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
sheets.set({ name, label }, fields);
|
|
4225
|
-
});
|
|
4226
|
-
}
|
|
4260
|
+
handleDetailTabs(dataUnit, config, sheets);
|
|
4261
|
+
}
|
|
4262
|
+
if (customGuides) {
|
|
4263
|
+
handleCustomTabs(customGuides, config, sheets);
|
|
4227
4264
|
}
|
|
4228
|
-
const i18n = getI18n();
|
|
4229
4265
|
Array.from(sheets.entries())
|
|
4230
4266
|
.sort(sortTabs)
|
|
4231
|
-
.forEach(([
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
fields
|
|
4236
|
-
});
|
|
4267
|
+
.forEach(([tab, fields]) => {
|
|
4268
|
+
if (!hiddenTabs.has(tab.label)) {
|
|
4269
|
+
metadata.addSheet(parseTabToFormSheet(tab, fields));
|
|
4270
|
+
}
|
|
4237
4271
|
});
|
|
4238
4272
|
metadata.addRequiredFields(requiredFields);
|
|
4239
4273
|
metadata.addCleanOnCopyFields(cleanOnCopyFields);
|
|
4240
4274
|
metadata.addDefaultValues(defaultValues);
|
|
4241
4275
|
return metadata;
|
|
4242
4276
|
};
|
|
4243
|
-
const
|
|
4244
|
-
|
|
4277
|
+
const getTabFromConfig = (tab, config) => {
|
|
4278
|
+
var _a;
|
|
4279
|
+
if (!config) {
|
|
4280
|
+
return;
|
|
4281
|
+
}
|
|
4282
|
+
return (_a = config.tabs) === null || _a === void 0 ? void 0 : _a.find(t => t.label === tab);
|
|
4283
|
+
};
|
|
4284
|
+
const getTabConfig = (tab, sheets, config) => {
|
|
4285
|
+
if (typeof tab !== "string") {
|
|
4286
|
+
return tab;
|
|
4287
|
+
}
|
|
4288
|
+
if (config) {
|
|
4289
|
+
const tabConfig = getTabFromConfig(tab, config);
|
|
4290
|
+
if (tabConfig) {
|
|
4291
|
+
return tabConfig;
|
|
4292
|
+
}
|
|
4293
|
+
}
|
|
4294
|
+
const tabConfig = Array.from(sheets.keys()).find(t => t.label === tab);
|
|
4245
4295
|
return tabConfig || { label: tab, visible: true };
|
|
4246
4296
|
};
|
|
4247
|
-
|
|
4248
|
-
|
|
4297
|
+
function sortTabs(a, b) {
|
|
4298
|
+
var _a, _b;
|
|
4299
|
+
if (a[0].label === '__main' && b[0].label !== '__main') {
|
|
4300
|
+
return -1;
|
|
4301
|
+
}
|
|
4302
|
+
if (a[0].label !== '__main' && b[0].label === '__main') {
|
|
4303
|
+
return 1;
|
|
4304
|
+
}
|
|
4305
|
+
const aOrder = (_a = a[0].order) !== null && _a !== void 0 ? _a : Number.MAX_VALUE;
|
|
4306
|
+
const bOrder = (_b = b[0].order) !== null && _b !== void 0 ? _b : Number.MAX_VALUE;
|
|
4307
|
+
return aOrder - bOrder;
|
|
4308
|
+
}
|
|
4309
|
+
const buildChildName = (child) => {
|
|
4310
|
+
return `child[${child.name}]`;
|
|
4249
4311
|
};
|
|
4250
4312
|
const buildDetailSheet = (child) => {
|
|
4251
4313
|
return {
|
|
4252
|
-
name:
|
|
4314
|
+
name: buildChildName(child),
|
|
4253
4315
|
label: child.label,
|
|
4254
4316
|
fields: []
|
|
4255
4317
|
};
|
|
@@ -78,28 +78,49 @@ const buildFormConfigFromDataUnit = (dataUnit) => {
|
|
|
78
78
|
.filter(descriptor => descriptor.visible !== false)
|
|
79
79
|
.map(descriptor => { return { name: descriptor.name, defaultValue: descriptor.defaultValue }; });
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
return config;
|
|
81
|
+
return { emptyConfig: false, fields };
|
|
83
82
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const defaultValues = {};
|
|
94
|
-
(_a = config === null || config === void 0 ? void 0 : config.tabs) === null || _a === void 0 ? void 0 : _a.forEach((tab) => {
|
|
95
|
-
if (!hiddenTabs.has(tab.label) && tab.visible === false) {
|
|
96
|
-
hiddenTabs.set(tab.label, tab);
|
|
83
|
+
function handleDetailTabs(dataUnit, config, sheets) {
|
|
84
|
+
const unitMD = dataUnit.metadata;
|
|
85
|
+
if (unitMD === undefined || unitMD.children === undefined)
|
|
86
|
+
return;
|
|
87
|
+
unitMD.children.forEach((child) => {
|
|
88
|
+
const tabConfig = getTabFromConfig(child.label, config);
|
|
89
|
+
if (tabConfig) {
|
|
90
|
+
sheets.set(Object.assign(tabConfig, { name: buildChildName(child), isDetail: true }), []);
|
|
91
|
+
return;
|
|
97
92
|
}
|
|
93
|
+
const { label, name, fields } = buildDetailSheet(child);
|
|
94
|
+
sheets.set({ name, label, isDetail: true }, fields);
|
|
98
95
|
});
|
|
99
|
-
|
|
96
|
+
}
|
|
97
|
+
function handleCustomTabs(customGuides, config, sheets) {
|
|
98
|
+
customGuides.forEach((guide) => {
|
|
99
|
+
const tabConfig = getTabFromConfig(guide.label, config);
|
|
100
|
+
if (tabConfig) {
|
|
101
|
+
sheets.set(Object.assign(tabConfig, { name: guide.id, isCustom: true }), []);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const sheet = { label: guide.label, name: guide.id, isCustom: true, visible: true };
|
|
105
|
+
sheets.set(sheet, []);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function parseTabToFormSheet(key, fields) {
|
|
109
|
+
const i18n = getI18n();
|
|
110
|
+
return {
|
|
111
|
+
label: (key.label === "__main") ? i18n("ez-form.mainTab") : key.label,
|
|
112
|
+
name: key.name || key.label,
|
|
113
|
+
isCustom: key.isCustom,
|
|
114
|
+
isDetail: key.isDetail,
|
|
115
|
+
fields
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function handleFields(config, sheets, hiddenTabs, dataUnit, requiredFields, cleanOnCopyFields, defaultValues) {
|
|
119
|
+
var _a;
|
|
120
|
+
(_a = config === null || config === void 0 ? void 0 : config.fields) === null || _a === void 0 ? void 0 : _a.forEach((field) => {
|
|
100
121
|
var _a, _b, _c;
|
|
101
122
|
if (field.visible !== false) {
|
|
102
|
-
const tabConfig = getTabConfig(field.tab || "__main", sheets);
|
|
123
|
+
const tabConfig = getTabConfig(field.tab || "__main", sheets, config);
|
|
103
124
|
if (hiddenTabs.has(tabConfig.label)) {
|
|
104
125
|
return;
|
|
105
126
|
}
|
|
@@ -135,7 +156,8 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
|
|
|
135
156
|
defaultValue = value;
|
|
136
157
|
}
|
|
137
158
|
}
|
|
138
|
-
catch (_d) {
|
|
159
|
+
catch (_d) {
|
|
160
|
+
}
|
|
139
161
|
}
|
|
140
162
|
}
|
|
141
163
|
defaultValues[field.name] = defaultValue;
|
|
@@ -143,42 +165,82 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
|
|
|
143
165
|
}
|
|
144
166
|
}
|
|
145
167
|
});
|
|
168
|
+
}
|
|
169
|
+
const buildFormMetadata = (config, dataUnit, includeDetails = false, customGuides) => {
|
|
170
|
+
var _a;
|
|
171
|
+
if (config == undefined || (config === null || config === void 0 ? void 0 : config.emptyConfig) === true) {
|
|
172
|
+
config = buildFormConfigFromDataUnit(dataUnit);
|
|
173
|
+
}
|
|
174
|
+
const sheets = new Map();
|
|
175
|
+
const hiddenTabs = new Map();
|
|
176
|
+
const requiredFields = [];
|
|
177
|
+
const cleanOnCopyFields = [];
|
|
178
|
+
const defaultValues = {};
|
|
179
|
+
const tabs = (_a = config === null || config === void 0 ? void 0 : config.tabs) !== null && _a !== void 0 ? _a : [];
|
|
180
|
+
tabs.forEach((tab) => {
|
|
181
|
+
if (!hiddenTabs.has(tab.label) && tab.visible === false) {
|
|
182
|
+
hiddenTabs.set(tab.label, tab);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
handleFields(config, sheets, hiddenTabs, dataUnit, requiredFields, cleanOnCopyFields, defaultValues);
|
|
146
186
|
const metadata = new FormMetadata();
|
|
147
187
|
metadata.setDefaultVars(config.defaultVars);
|
|
148
188
|
if (includeDetails) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
sheets.set({ name, label }, fields);
|
|
154
|
-
});
|
|
155
|
-
}
|
|
189
|
+
handleDetailTabs(dataUnit, config, sheets);
|
|
190
|
+
}
|
|
191
|
+
if (customGuides) {
|
|
192
|
+
handleCustomTabs(customGuides, config, sheets);
|
|
156
193
|
}
|
|
157
|
-
const i18n = getI18n();
|
|
158
194
|
Array.from(sheets.entries())
|
|
159
195
|
.sort(sortTabs)
|
|
160
|
-
.forEach(([
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
fields
|
|
165
|
-
});
|
|
196
|
+
.forEach(([tab, fields]) => {
|
|
197
|
+
if (!hiddenTabs.has(tab.label)) {
|
|
198
|
+
metadata.addSheet(parseTabToFormSheet(tab, fields));
|
|
199
|
+
}
|
|
166
200
|
});
|
|
167
201
|
metadata.addRequiredFields(requiredFields);
|
|
168
202
|
metadata.addCleanOnCopyFields(cleanOnCopyFields);
|
|
169
203
|
metadata.addDefaultValues(defaultValues);
|
|
170
204
|
return metadata;
|
|
171
205
|
};
|
|
172
|
-
const
|
|
173
|
-
|
|
206
|
+
const getTabFromConfig = (tab, config) => {
|
|
207
|
+
var _a;
|
|
208
|
+
if (!config) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
return (_a = config.tabs) === null || _a === void 0 ? void 0 : _a.find(t => t.label === tab);
|
|
212
|
+
};
|
|
213
|
+
const getTabConfig = (tab, sheets, config) => {
|
|
214
|
+
if (typeof tab !== "string") {
|
|
215
|
+
return tab;
|
|
216
|
+
}
|
|
217
|
+
if (config) {
|
|
218
|
+
const tabConfig = getTabFromConfig(tab, config);
|
|
219
|
+
if (tabConfig) {
|
|
220
|
+
return tabConfig;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
const tabConfig = Array.from(sheets.keys()).find(t => t.label === tab);
|
|
174
224
|
return tabConfig || { label: tab, visible: true };
|
|
175
225
|
};
|
|
176
|
-
|
|
177
|
-
|
|
226
|
+
function sortTabs(a, b) {
|
|
227
|
+
var _a, _b;
|
|
228
|
+
if (a[0].label === '__main' && b[0].label !== '__main') {
|
|
229
|
+
return -1;
|
|
230
|
+
}
|
|
231
|
+
if (a[0].label !== '__main' && b[0].label === '__main') {
|
|
232
|
+
return 1;
|
|
233
|
+
}
|
|
234
|
+
const aOrder = (_a = a[0].order) !== null && _a !== void 0 ? _a : Number.MAX_VALUE;
|
|
235
|
+
const bOrder = (_b = b[0].order) !== null && _b !== void 0 ? _b : Number.MAX_VALUE;
|
|
236
|
+
return aOrder - bOrder;
|
|
237
|
+
}
|
|
238
|
+
const buildChildName = (child) => {
|
|
239
|
+
return `child[${child.name}]`;
|
|
178
240
|
};
|
|
179
241
|
const buildDetailSheet = (child) => {
|
|
180
242
|
return {
|
|
181
|
-
name:
|
|
243
|
+
name: buildChildName(child),
|
|
182
244
|
label: child.label,
|
|
183
245
|
fields: []
|
|
184
246
|
};
|
package/dist/ezui/ezui.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-23a36bb6.js";export{s as setNonce}from"./p-23a36bb6.js";import{g as o}from"./p-14807f4e.js";import"./p-641ee538.js";import"@sankhyalabs/core";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>(o(),t(JSON.parse('[["p-6a9a20a0",[[1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32],"disableItem":[64],"openGuideNavidator":[64],"enableItem":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"selectGuide":[64],"getParent":[64]}]]],["p-957d08cd",[[1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540],"_container":[32]}]]],["p-1730ee24",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"displayIcon":[513,"display-icon"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"showActions":[64],"isOpened":[64]}]]],["p-bd6146c5",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040],"show":[64]}]]],["p-6d596a5a",[[1,"ez-tile",{"text":[513],"size":[513],"height":[514],"width":[514],"color":[513],"iconName":[513,"icon-name"],"maximumLines":[514,"maximum-lines"],"isInteractive":[516,"is-interactive"],"setFocus":[64],"setBlur":[64]},[[2,"click","clickListener"]]]]],["p-bc2f844e",[[0,"ez-application"]]],["p-d2645bdf",[[1,"ez-empty-card",{"color":[513],"height":[514],"width":[514]}]]],["p-1bfef8e5",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"closeOutsideLeave":[4,"close-outside-leave"],"scrim":[1]}]]],["p-a3ada561",[[1,"ez-tag",{"label":[513],"color":[513],"customBackgroundColor":[1,"custom-background-color"],"customLabelColor":[1,"custom-label-color"]}]]],["p-dee18824",[[1,"ez-icon",{"size":[513],"fontSize":[520,"font-size"],"href":[513],"iconName":[513,"icon-name"]}]]],["p-93e1c917",[[1,"ez-tile-medium",{"color":[1],"iconName":[1,"icon-name"],"iconColor":[1,"icon-color"],"smallTitleText":[1,"small-title-text"],"smallTitleMaximumLines":[2,"small-title-maximum-lines"],"titleText":[1,"title-text"],"titleMaximumLines":[2,"title-maximum-lines"],"descriptionText":[1,"description-text"],"descriptionMaximumLines":[2,"description-maximum-lines"],"height":[1],"width":[1],"avatarProps":[16],"buttonProps":[16],"tags":[16],"setButtonFocus":[64],"setButtonBlur":[64]}]]],["p-1f50fa05",[[1,"ez-alert",{"alertType":[513,"alert-type"]}]]],["p-8df1ca33",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["p-0e49c0ff",[[1,"ez-text-input",{"label":[513],"alternativePlaceholder":[513,"alternative-placeholder"],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"hasInvalid":[1540,"has-invalid"],"mask":[1],"cleanValueMask":[4,"clean-value-mask"],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4],"autoFocus":[4,"auto-focus"],"hasRightSlotContent":[32],"forceLabelFloat":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-d66bf34e",[[6,"ez-grid",{"enableLockManagerLoadingComp":[1028,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[1028,"can-edit"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"enableGridInsert":[4,"enable-grid-insert"],"enableContinuousInsert":[4,"enable-continuous-insert"],"suppressCheckboxColumn":[1028,"suppress-checkbox-column"],"suppressFilterColumn":[1028,"suppress-filter-column"],"outlineMode":[4,"outline-mode"],"enableRowTableStriped":[4,"enable-row-table-striped"],"compact":[1028],"useSearchColumn":[4,"use-search-column"],"suppressHorizontalScroll":[4,"suppress-horizontal-scroll"],"mode":[513],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32],"setColumnsDef":[64],"getAppliedColumnFilters":[64],"refreshColumnFilterDataSource":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"locateColumn":[64],"filterColumns":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"refreshSelectedRows":[64],"getCustomValueFormatter":[64],"setFocus":[64],"stopEdit":[64],"checkStopEditOutsideClick":[64]},[[0,"applyFilterColumnOptions","handleApplyFilterColumn"],[0,"ezSelectionChange","onSelectionChange"],[2,"click","handleClick"]]]]],["p-411c0222",[[6,"ez-grid-view",{"metadata":[16],"records":[16],"columnsConfig":[1040],"pageSize":[2,"page-size"],"recordDateFormat":[1,"record-date-format"],"multipleSelection":[4,"multiple-selection"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"suppressCheckboxColumn":[1028,"suppress-checkbox-column"],"suppressFilterColumn":[4,"suppress-filter-column"],"outlineMode":[4,"outline-mode"],"enableRowTableStriped":[4,"enable-row-table-striped"],"compact":[1028],"useSearchColumn":[4,"use-search-column"],"suppressHorizontalScroll":[4,"suppress-horizontal-scroll"],"inMemoryLoader":[32],"getDataUnit":[64],"refresh":[64],"getSelection":[64],"quickFilter":[64],"locateColumn":[64],"filterColumns":[64],"addColumnMenuItem":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"addGridCustomRender":[64],"setFocus":[64]}]]],["p-3fe05d6b",[[2,"ez-double-list",{"leftList":[1040],"leftTitle":[1,"left-title"],"rightList":[1040],"entityLabel":[1,"entity-label"],"entityLabelPlural":[1,"entity-label-plural"],"leftListLabel":[1,"left-list-label"],"rightListLabel":[1,"right-list-label"],"useOnlyRightList":[4,"use-only-right-list"],"rightTitle":[1,"right-title"],"emptyMessage":[16],"slotsListBuilder":[1040],"leftFilteredList":[32],"rightFilteredList":[32],"selectedLeftList":[32],"selectedRightList":[32],"isFilteringLeft":[32],"isFilteringRight":[32],"resetSelectedLists":[64]}]]],["p-e8c6c973",[[1,"ez-sidebar-navigator",{"type":[1],"mode":[1025],"size":[1],"isResponsive":[4,"is-responsive"],"titleMenu":[1,"title-menu"],"showCollapseMenu":[4,"show-collapse-menu"],"showFixedButton":[4,"show-fixed-button"],"open":[32],"changeModeMenu":[64],"closeSidebar":[64],"openSidebar":[64]}]]],["p-1e7a8633",[[1,"ez-breadcrumb",{"items":[1040],"fillMode":[1025,"fill-mode"],"maxItems":[1026,"max-items"],"positionEllipsis":[1026,"position-ellipsis"],"visibleItems":[32],"hiddenItems":[32],"showDropdown":[32],"collapseConfigPosition":[32]}]]],["p-7fe97ef5",[[1,"ez-classic-combo-box",{"value":[1040],"label":[1],"placeholder":[1025],"enabled":[4],"readonly":[4],"name":[1],"state":[1],"helpText":[1,"help-text"],"iconName":[1,"icon-name"],"titleIcon":[1,"title-icon"],"iconClickable":[4,"icon-clickable"],"suppressSearch":[4,"suppress-search"],"options":[16],"textEmptyOption":[1,"text-empty-option"],"suppressEmptyOption":[4,"suppress-empty-option"],"popoverVisible":[32],"hasSlotContent":[32],"highlightedIndex":[32],"filteredOptions":[32],"inputValue":[32],"setFocus":[64],"setBlur":[64],"showPopover":[64],"hidePopover":[64],"setValue":[64]}]]],["p-2ba2d792",[[1,"ez-split-button",{"show":[1540],"enabled":[516],"isDisabled":[520,"is-disabled"],"iconName":[513,"icon-name"],"leftIconName":[513,"left-icon-name"],"rightIconName":[513,"right-icon-name"],"image":[513],"items":[16],"label":[513],"leftTitle":[513,"left-title"],"rightTitle":[513,"right-title"],"mode":[513],"size":[513],"variant":[1537],"suppressAnimation":[1540,"suppress-animation"],"itemBuilder":[16],"leftRipples":[32],"rightRipples":[32],"isLeftPressed":[32],"isRightPressed":[32],"setBlur":[64],"setLeftButtonFocus":[64],"setRightButtonFocus":[64],"toggleDropdown":[64],"isOpenedDropdown":[64]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onTouchStart"],[2,"click","clickListener"]]]]],["p-a0bf1fc7",[[1,"ez-tag-input",{"label":[1],"placeholder":[1],"helpText":[1025,"help-text"],"enabled":[4],"readonly":[4],"name":[1],"tags":[1040],"maxTagLength":[2,"max-tag-length"],"maxTags":[2,"max-tags"],"allowDuplicates":[4,"allow-duplicates"],"state":[1537],"validator":[16],"suppressTagsKeyboardNavigation":[4,"suppress-tags-keyboard-navigation"],"suppressBackspaceToRemove":[4,"suppress-backspace-to-remove"],"setFocus":[64],"setBlur":[64],"addTag":[64],"removeTag":[64],"clearTags":[64]}]]],["p-e882635e",[[2,"ez-pagination",{"type":[1],"currentPage":[1026,"current-page"],"totalItems":[2,"total-items"],"pageSize":[2,"page-size"],"hideInfoLabel":[4,"hide-info-label"],"pageLimit":[2,"page-limit"]}]]],["p-1266fe78",[[4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"size":[1],"structural":[4],"_expanded":[32]}]]],["p-48effc69",[[1,"ez-classic-text-area",{"name":[1],"label":[1],"placeholder":[1],"value":[1],"helpText":[1,"help-text"],"state":[1],"enabled":[4],"readonly":[4],"maxlength":[2],"resize":[1],"leftIconName":[1,"left-icon-name"],"rightIconName":[1,"right-icon-name"],"rightIconTooltip":[1,"right-icon-tooltip"],"leftIconTooltip":[1,"left-icon-tooltip"],"leftIconClickable":[4,"left-icon-clickable"],"rightIconClickable":[4,"right-icon-clickable"],"rows":[2],"setFocus":[64],"setBlur":[64]}]]],["p-0c0eb410",[[1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]]],["p-d6742c1e",[[2,"ez-list-item",{"titleText":[513,"title-text"],"text":[513],"iconName":[513,"icon-name"]}]]],["p-6369a0cd",[[1,"ez-chart",{"type":[1],"xAxis":[16],"yAxis":[16],"chartTitle":[1,"chart-title"],"chartSubTitle":[1,"chart-sub-title"],"legendEnabled":[4,"legend-enabled"],"series":[16],"width":[2],"height":[2]}]]],["p-5ed81457",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["p-a3075f52",[[2,"ez-progress-bar",{"percent":[514],"label":[513],"helpText":[513,"help-text"]}]]],["p-9f5fa3f9",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["p-a7eab406",[[1,"ez-spinner",{"size":[1]}]]],["p-fa6732f2",[[0,"ez-split-panel",{"direction":[1],"anchorToExpand":[4,"anchor-to-expand"],"structural":[4],"rebuildLayout":[64]}]]],["p-d8cc640d",[[1,"ez-underface",{"color":[513],"customColor":[513,"custom-color"],"height":[514],"width":[514]}]]],["p-e8c57463",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["p-ba7e908a",[[1,"ez-tooltip",{"message":[1],"anchoringElement":[1040],"placement":[1],"gapOptions":[16],"type":[1],"debouncingTime":[2,"debouncing-time"],"active":[4],"maxWidth":[2,"max-width"],"useAnchorSize":[4,"use-anchor-size"],"strategy":[1]}]]],["p-4e1df756",[[2,"ez-form-view",{"fields":[16],"selectedRecord":[16],"singleColumn":[4,"single-column"],"_customEditors":[32],"showUp":[64],"addCustomEditor":[64],"setFieldProp":[64]}]]],["p-20c024f7",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"setValue":[64],"endSearch":[64]}]]],["p-eee3c7ff",[[1,"ez-sortable-list",{"title":[1],"hideHeader":[4,"hide-header"],"hideTotalizer":[4,"hide-totalizer"],"group":[1],"dataSource":[16],"idSortableList":[1,"id-sortable-list"],"entityLabel":[1,"entity-label"],"entityLabelPlural":[1,"entity-label-plural"],"emptyMessage":[1,"empty-message"],"hoverFeedback":[4,"hover-feedback"],"enableMultipleSelection":[4,"enable-multiple-selection"],"removeItensMoved":[4,"remove-itens-moved"],"itemRightSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"filterTerm":[32],"selectedItems":[32],"clearSelection":[64]}]]],["p-7f8c1fce",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"],"disableAutoUpdateValue":[4,"disable-auto-update-value"],"maxWidth":[1,"max-width"],"size":[1],"iconNameLeft":[1,"icon-name-left"],"iconNameRight":[1,"icon-name-right"],"type":[1],"tabIndex":[2,"tab-index"],"removeWithKeyboard":[4,"remove-with-keyboard"],"_isOverflowing":[32],"setFocus":[64],"setBlur":[64]}]]],["p-59a98e31",[[1,"ez-avatar",{"name":[513],"imageSrc":[513,"image-src"],"iconName":[513,"icon-name"],"size":[513],"shape":[513],"isInteractive":[516,"is-interactive"]}]]],["p-e75c7a23",[[1,"ez-badge",{"size":[513],"label":[513],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"position":[1040],"alignItems":[1537,"align-items"],"hasSlot":[32]}]]],["p-9b2e6438",[[1,"ez-classic-input",{"type":[1],"value":[1025],"label":[1],"helpText":[1,"help-text"],"placeholder":[1025],"enabled":[4],"readonly":[4],"name":[1],"minlength":[2],"maxlength":[2],"leftIconName":[1,"left-icon-name"],"rightIconName":[1,"right-icon-name"],"rightIconTooltip":[1,"right-icon-tooltip"],"leftIconTooltip":[1,"left-icon-tooltip"],"state":[1],"leftIconClickable":[4,"left-icon-clickable"],"rightIconClickable":[4,"right-icon-clickable"],"mask":[1],"emitMaskedValue":[4,"emit-masked-value"],"setFocus":[64],"setBlur":[64]}]]],["p-6020f3d5",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"goToTab":[64]}]]],["p-02f6e3b0",[[1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"enableHierarchicalFilter":[4,"enable-hierarchical-filter"],"_tree":[32],"_waintingForLoad":[32],"selectItem":[64],"openItem":[64],"disableItem":[64],"enableItem":[64],"addChild":[64],"applyFilter":[64],"expandAll":[64],"collapseAll":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"getParent":[64]},[[2,"keydown","onKeyDownListener"]]]]],["p-2a70f094",[[2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32],"clearFilteredOptions":[64]}]]],["p-e27d7dc2",[[0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32],"hide":[64],"show":[64]}]]],["p-124699e0",[[1,"ez-search-result-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"value":[1],"showOptionValue":[4,"show-option-value"],"_preSelection":[32],"nextOption":[64],"previousOption":[64],"selectCurrentItem":[64],"cancelSelection":[64]}]]],["p-e46a4d06",[[1,"ez-search-plus",{"value":[1537],"enabled":[1540],"disableCodeInput":[1540,"disable-code-input"],"disableDescriptionInput":[1540,"disable-description-input"],"label":[1537],"codLabel":[1537,"cod-label"],"hideDescriptionInput":[1540,"hide-description-input"],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"mode":[513],"contextProperties":[8,"context-properties"],"optionLoader":[16],"showOptionValue":[4,"show-option-value"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"autoFocus":[4,"auto-focus"],"showSelectedValue":[4,"show-selected-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"suppressSearch":[4,"suppress-search"],"suppressPreLoad":[4,"suppress-pre-load"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"descriptionValue":[32],"codeValue":[32],"isLoadingDescription":[32],"searchDescriptionIsOpen":[32],"visibleOptions":[32],"showLoading":[32],"setFocus":[64],"getValueAsync":[64],"clearValue":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-8dc267ff",[[1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"autoFocus":[4,"auto-focus"],"preventAutoFocus":[4,"prevent-auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"textEmptyOption":[1,"text-empty-option"],"isOpen":[32],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"getValueAsync":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64]}]]],["p-d0e6911e",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-59092a66",[[1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["p-8bb3aeb0",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"allowNegative":[4,"allow-negative"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[1,"alternative-placeholder"],"_value":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-5ab08b60",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[1,"alternative-placeholder"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-e7a7c594",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"],"autoRows":[516,"auto-rows"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"forceLabelFloat":[32],"appendTextToSelection":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-6f119d5f",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"fitHorizontal":[64],"hide":[64]},[[11,"scroll","scrollListener"]]]]],["p-1adf7139",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-4d30b703",[[1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]},[[4,"click","handleClickOutside"]]]]],["p-1cde96f9",[[1,"ez-upload",{"label":[1],"subtitle":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["p-a80b1287",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64]}]]],["p-288631d1",[[1,"ez-sidebar-button"],[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["p-0b333f09",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"contextProperties":[8,"context-properties"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"showMore":[4,"show-more"],"suppressInputPersist":[1028,"suppress-input-persist"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_showLoadingDescription":[32],"_criteria":[32],"getValueAsync":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64]}]]],["p-7f792043",[[1,"ez-check",{"label":[513],"alternativePlaceholder":[513,"alternative-placeholder"],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4],"getMode":[64],"setFocus":[64]}]]],["p-e99cbb51",[[2,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"enableMultipleSelection":[4,"enable-multiple-selection"],"enabled":[4],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64],"removeSelection":[64]}]]],["p-6f77a359",[[1,"ez-button",{"label":[513],"enabled":[516],"isDisabled":[520,"is-disabled"],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"variant":[1],"type":[1],"leftIconName":[1,"left-icon-name"],"rightIconName":[1,"right-icon-name"],"suppressAnimation":[4,"suppress-animation"],"ripples":[32],"isPressed":[32],"setFocus":[64],"setBlur":[64]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onTouchStart"],[2,"click","clickListener"]]]]],["p-191cfbc8",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"],"showCloseButton":[4,"show-close-button"]},[[4,"ezCloseModal","handleEzModalAction"]]]]],["p-2df50161",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"],"enabledScroll":[4,"enabled-scroll"],"autoClose":[4,"auto-close"],"footerButtons":[16]}]]],["p-91c9d50e",[[2,"ez-rich-toolbar-item",{"icon":[1],"command":[1],"title":[1],"value":[1]}]]],["p-79277e43",[[0,"ez-skeleton",{"template":[1],"count":[2],"variant":[1],"width":[1],"height":[1],"marginTop":[1,"margin-top"],"marginRight":[1,"margin-right"],"marginBottom":[1,"margin-bottom"],"marginLeft":[1,"margin-left"],"animation":[1]}]]],["p-ef8bd3e8",[[1,"ez-popover-core",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040],"useAnchorSize":[516,"use-anchor-size"],"minWidth":[514,"min-width"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64],"setOptions":[64],"setAnchorElement":[64]}]]],["p-a401041c",[[2,"ez-link-builder",{"textToShow":[32],"link":[32],"openInNewGuide":[32],"show":[64],"hide":[64]}],[2,"ez-simple-image-uploader",{"maxSize":[2,"max-size"],"link":[32],"base64":[32],"messageError":[32],"selectedFile":[32],"show":[64],"hide":[64]}],[2,"ez-rich-toolbar",{"showPreview":[4,"show-preview"],"isPreviewMode":[4,"is-preview-mode"],"showConfigs":[4,"show-configs"],"showTextFormat":[4,"show-text-format"],"showUndoRedo":[4,"show-undo-redo"]},[[0,"actionTriggered","handleActionTriggered"]]],[2,"ez-rich-toolbar-arrows"],[2,"ez-rich-toolbar-configs"],[2,"ez-rich-toolbar-letters"]]],["p-c943f7c4",[[2,"ez-rich-text",{"showPreview":[4,"show-preview"],"value":[1537],"label":[513],"mode":[513],"enabled":[516],"rows":[514],"errorMessage":[1537,"error-message"],"canShowError":[516,"can-show-error"],"showConfigs":[4,"show-configs"],"showTextFormat":[4,"show-text-format"],"showUndoRedo":[4,"show-undo-redo"],"previewMode":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]},[[0,"executeToolbarCommand","handleExecuteToolbarCommand"]]],[2,"ez-custom-form-input",{"customEditor":[16],"formViewField":[16],"value":[1032],"detailContext":[1,"detail-context"],"builderFallback":[16],"selectedRecord":[16],"gui":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}],[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}],[1,"ez-combo-box-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"textEmptyList":[1,"text-empty-list"],"showOptionValue":[4,"show-option-value"],"preSelection":[2,"pre-selection"],"maxWidth":[2,"max-width"],"width":[2],"onOptionSelect":[16],"onOptionHover":[16],"nextOption":[64],"previousOption":[64],"selectCurrentOption":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-d6f50207",[[1,"ez-card-item",{"item":[16],"enableKey":[4,"enable-key"],"compacted":[4]}]]],["p-2528e988",[[0,"multi-selection-box-message",{"message":[1]}],[1,"search-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"textEmptyList":[1,"text-empty-list"],"canShowListOptions":[4,"can-show-list-options"],"value":[1],"showOptionValue":[4,"show-option-value"],"preSelection":[2,"pre-selection"],"nextOption":[64],"previousOption":[64]}],[1,"ez-popover-plus",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040],"useAnchorSize":[516,"use-anchor-size"],"minWidth":[514,"min-width"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64],"setOptions":[64],"setAnchorElement":[64]}]]],["p-4c4f0850",[[2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"onlyStaticFields":[4,"only-static-fields"],"useSearchField":[4,"use-search-field"],"elementFocusSearchField":[16],"_fieldsProps":[32],"_singleColumn":[32],"validate":[64],"addCustomEditor":[64],"setFieldProp":[64]}]]]]'),e))));
|
|
1
|
+
import{p as e,b as t}from"./p-23a36bb6.js";export{s as setNonce}from"./p-23a36bb6.js";import{g as o}from"./p-14807f4e.js";import"./p-641ee538.js";import"@sankhyalabs/core";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>(o(),t(JSON.parse('[["p-6a9a20a0",[[1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32],"disableItem":[64],"openGuideNavidator":[64],"enableItem":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"selectGuide":[64],"getParent":[64]}]]],["p-957d08cd",[[1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540],"_container":[32]}]]],["p-1730ee24",[[1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"displayIcon":[513,"display-icon"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32],"hideActions":[64],"showActions":[64],"isOpened":[64]}]]],["p-bd6146c5",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040],"show":[64]}]]],["p-6d596a5a",[[1,"ez-tile",{"text":[513],"size":[513],"height":[514],"width":[514],"color":[513],"iconName":[513,"icon-name"],"maximumLines":[514,"maximum-lines"],"isInteractive":[516,"is-interactive"],"setFocus":[64],"setBlur":[64]},[[2,"click","clickListener"]]]]],["p-bc2f844e",[[0,"ez-application"]]],["p-d2645bdf",[[1,"ez-empty-card",{"color":[513],"height":[514],"width":[514]}]]],["p-1bfef8e5",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"closeOutsideLeave":[4,"close-outside-leave"],"scrim":[1]}]]],["p-a3ada561",[[1,"ez-tag",{"label":[513],"color":[513],"customBackgroundColor":[1,"custom-background-color"],"customLabelColor":[1,"custom-label-color"]}]]],["p-dee18824",[[1,"ez-icon",{"size":[513],"fontSize":[520,"font-size"],"href":[513],"iconName":[513,"icon-name"]}]]],["p-93e1c917",[[1,"ez-tile-medium",{"color":[1],"iconName":[1,"icon-name"],"iconColor":[1,"icon-color"],"smallTitleText":[1,"small-title-text"],"smallTitleMaximumLines":[2,"small-title-maximum-lines"],"titleText":[1,"title-text"],"titleMaximumLines":[2,"title-maximum-lines"],"descriptionText":[1,"description-text"],"descriptionMaximumLines":[2,"description-maximum-lines"],"height":[1],"width":[1],"avatarProps":[16],"buttonProps":[16],"tags":[16],"setButtonFocus":[64],"setButtonBlur":[64]}]]],["p-1f50fa05",[[1,"ez-alert",{"alertType":[513,"alert-type"]}]]],["p-8df1ca33",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["p-0e49c0ff",[[1,"ez-text-input",{"label":[513],"alternativePlaceholder":[513,"alternative-placeholder"],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"hasInvalid":[1540,"has-invalid"],"mask":[1],"cleanValueMask":[4,"clean-value-mask"],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4],"autoFocus":[4,"auto-focus"],"hasRightSlotContent":[32],"forceLabelFloat":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-d66bf34e",[[6,"ez-grid",{"enableLockManagerLoadingComp":[1028,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[1028,"can-edit"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"enableGridInsert":[4,"enable-grid-insert"],"enableContinuousInsert":[4,"enable-continuous-insert"],"suppressCheckboxColumn":[1028,"suppress-checkbox-column"],"suppressFilterColumn":[1028,"suppress-filter-column"],"outlineMode":[4,"outline-mode"],"enableRowTableStriped":[4,"enable-row-table-striped"],"compact":[1028],"useSearchColumn":[4,"use-search-column"],"suppressHorizontalScroll":[4,"suppress-horizontal-scroll"],"mode":[513],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32],"setColumnsDef":[64],"getAppliedColumnFilters":[64],"refreshColumnFilterDataSource":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"locateColumn":[64],"filterColumns":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"refreshSelectedRows":[64],"getCustomValueFormatter":[64],"setFocus":[64],"stopEdit":[64],"checkStopEditOutsideClick":[64]},[[0,"applyFilterColumnOptions","handleApplyFilterColumn"],[0,"ezSelectionChange","onSelectionChange"],[2,"click","handleClick"]]]]],["p-411c0222",[[6,"ez-grid-view",{"metadata":[16],"records":[16],"columnsConfig":[1040],"pageSize":[2,"page-size"],"recordDateFormat":[1,"record-date-format"],"multipleSelection":[4,"multiple-selection"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"suppressCheckboxColumn":[1028,"suppress-checkbox-column"],"suppressFilterColumn":[4,"suppress-filter-column"],"outlineMode":[4,"outline-mode"],"enableRowTableStriped":[4,"enable-row-table-striped"],"compact":[1028],"useSearchColumn":[4,"use-search-column"],"suppressHorizontalScroll":[4,"suppress-horizontal-scroll"],"inMemoryLoader":[32],"getDataUnit":[64],"refresh":[64],"getSelection":[64],"quickFilter":[64],"locateColumn":[64],"filterColumns":[64],"addColumnMenuItem":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"addGridCustomRender":[64],"setFocus":[64]}]]],["p-3fe05d6b",[[2,"ez-double-list",{"leftList":[1040],"leftTitle":[1,"left-title"],"rightList":[1040],"entityLabel":[1,"entity-label"],"entityLabelPlural":[1,"entity-label-plural"],"leftListLabel":[1,"left-list-label"],"rightListLabel":[1,"right-list-label"],"useOnlyRightList":[4,"use-only-right-list"],"rightTitle":[1,"right-title"],"emptyMessage":[16],"slotsListBuilder":[1040],"leftFilteredList":[32],"rightFilteredList":[32],"selectedLeftList":[32],"selectedRightList":[32],"isFilteringLeft":[32],"isFilteringRight":[32],"resetSelectedLists":[64]}]]],["p-e8c6c973",[[1,"ez-sidebar-navigator",{"type":[1],"mode":[1025],"size":[1],"isResponsive":[4,"is-responsive"],"titleMenu":[1,"title-menu"],"showCollapseMenu":[4,"show-collapse-menu"],"showFixedButton":[4,"show-fixed-button"],"open":[32],"changeModeMenu":[64],"closeSidebar":[64],"openSidebar":[64]}]]],["p-1e7a8633",[[1,"ez-breadcrumb",{"items":[1040],"fillMode":[1025,"fill-mode"],"maxItems":[1026,"max-items"],"positionEllipsis":[1026,"position-ellipsis"],"visibleItems":[32],"hiddenItems":[32],"showDropdown":[32],"collapseConfigPosition":[32]}]]],["p-7fe97ef5",[[1,"ez-classic-combo-box",{"value":[1040],"label":[1],"placeholder":[1025],"enabled":[4],"readonly":[4],"name":[1],"state":[1],"helpText":[1,"help-text"],"iconName":[1,"icon-name"],"titleIcon":[1,"title-icon"],"iconClickable":[4,"icon-clickable"],"suppressSearch":[4,"suppress-search"],"options":[16],"textEmptyOption":[1,"text-empty-option"],"suppressEmptyOption":[4,"suppress-empty-option"],"popoverVisible":[32],"hasSlotContent":[32],"highlightedIndex":[32],"filteredOptions":[32],"inputValue":[32],"setFocus":[64],"setBlur":[64],"showPopover":[64],"hidePopover":[64],"setValue":[64]}]]],["p-2ba2d792",[[1,"ez-split-button",{"show":[1540],"enabled":[516],"isDisabled":[520,"is-disabled"],"iconName":[513,"icon-name"],"leftIconName":[513,"left-icon-name"],"rightIconName":[513,"right-icon-name"],"image":[513],"items":[16],"label":[513],"leftTitle":[513,"left-title"],"rightTitle":[513,"right-title"],"mode":[513],"size":[513],"variant":[1537],"suppressAnimation":[1540,"suppress-animation"],"itemBuilder":[16],"leftRipples":[32],"rightRipples":[32],"isLeftPressed":[32],"isRightPressed":[32],"setBlur":[64],"setLeftButtonFocus":[64],"setRightButtonFocus":[64],"toggleDropdown":[64],"isOpenedDropdown":[64]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onTouchStart"],[2,"click","clickListener"]]]]],["p-a0bf1fc7",[[1,"ez-tag-input",{"label":[1],"placeholder":[1],"helpText":[1025,"help-text"],"enabled":[4],"readonly":[4],"name":[1],"tags":[1040],"maxTagLength":[2,"max-tag-length"],"maxTags":[2,"max-tags"],"allowDuplicates":[4,"allow-duplicates"],"state":[1537],"validator":[16],"suppressTagsKeyboardNavigation":[4,"suppress-tags-keyboard-navigation"],"suppressBackspaceToRemove":[4,"suppress-backspace-to-remove"],"setFocus":[64],"setBlur":[64],"addTag":[64],"removeTag":[64],"clearTags":[64]}]]],["p-e882635e",[[2,"ez-pagination",{"type":[1],"currentPage":[1026,"current-page"],"totalItems":[2,"total-items"],"pageSize":[2,"page-size"],"hideInfoLabel":[4,"hide-info-label"],"pageLimit":[2,"page-limit"]}]]],["p-1266fe78",[[4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"size":[1],"structural":[4],"_expanded":[32]}]]],["p-48effc69",[[1,"ez-classic-text-area",{"name":[1],"label":[1],"placeholder":[1],"value":[1],"helpText":[1,"help-text"],"state":[1],"enabled":[4],"readonly":[4],"maxlength":[2],"resize":[1],"leftIconName":[1,"left-icon-name"],"rightIconName":[1,"right-icon-name"],"rightIconTooltip":[1,"right-icon-tooltip"],"leftIconTooltip":[1,"left-icon-tooltip"],"leftIconClickable":[4,"left-icon-clickable"],"rightIconClickable":[4,"right-icon-clickable"],"rows":[2],"setFocus":[64],"setBlur":[64]}]]],["p-0c0eb410",[[1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]]],["p-d6742c1e",[[2,"ez-list-item",{"titleText":[513,"title-text"],"text":[513],"iconName":[513,"icon-name"]}]]],["p-6369a0cd",[[1,"ez-chart",{"type":[1],"xAxis":[16],"yAxis":[16],"chartTitle":[1,"chart-title"],"chartSubTitle":[1,"chart-sub-title"],"legendEnabled":[4,"legend-enabled"],"series":[16],"width":[2],"height":[2]}]]],["p-5ed81457",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["p-a3075f52",[[2,"ez-progress-bar",{"percent":[514],"label":[513],"helpText":[513,"help-text"]}]]],["p-9f5fa3f9",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["p-a7eab406",[[1,"ez-spinner",{"size":[1]}]]],["p-fa6732f2",[[0,"ez-split-panel",{"direction":[1],"anchorToExpand":[4,"anchor-to-expand"],"structural":[4],"rebuildLayout":[64]}]]],["p-d8cc640d",[[1,"ez-underface",{"color":[513],"customColor":[513,"custom-color"],"height":[514],"width":[514]}]]],["p-e8c57463",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["p-ba7e908a",[[1,"ez-tooltip",{"message":[1],"anchoringElement":[1040],"placement":[1],"gapOptions":[16],"type":[1],"debouncingTime":[2,"debouncing-time"],"active":[4],"maxWidth":[2,"max-width"],"useAnchorSize":[4,"use-anchor-size"],"strategy":[1]}]]],["p-4e1df756",[[2,"ez-form-view",{"fields":[16],"selectedRecord":[16],"singleColumn":[4,"single-column"],"_customEditors":[32],"showUp":[64],"addCustomEditor":[64],"setFieldProp":[64]}]]],["p-20c024f7",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"setValue":[64],"endSearch":[64]}]]],["p-eee3c7ff",[[1,"ez-sortable-list",{"title":[1],"hideHeader":[4,"hide-header"],"hideTotalizer":[4,"hide-totalizer"],"group":[1],"dataSource":[16],"idSortableList":[1,"id-sortable-list"],"entityLabel":[1,"entity-label"],"entityLabelPlural":[1,"entity-label-plural"],"emptyMessage":[1,"empty-message"],"hoverFeedback":[4,"hover-feedback"],"enableMultipleSelection":[4,"enable-multiple-selection"],"removeItensMoved":[4,"remove-itens-moved"],"itemRightSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"filterTerm":[32],"selectedItems":[32],"clearSelection":[64]}]]],["p-7f8c1fce",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"],"disableAutoUpdateValue":[4,"disable-auto-update-value"],"maxWidth":[1,"max-width"],"size":[1],"iconNameLeft":[1,"icon-name-left"],"iconNameRight":[1,"icon-name-right"],"type":[1],"tabIndex":[2,"tab-index"],"removeWithKeyboard":[4,"remove-with-keyboard"],"_isOverflowing":[32],"setFocus":[64],"setBlur":[64]}]]],["p-59a98e31",[[1,"ez-avatar",{"name":[513],"imageSrc":[513,"image-src"],"iconName":[513,"icon-name"],"size":[513],"shape":[513],"isInteractive":[516,"is-interactive"]}]]],["p-e75c7a23",[[1,"ez-badge",{"size":[513],"label":[513],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"position":[1040],"alignItems":[1537,"align-items"],"hasSlot":[32]}]]],["p-9b2e6438",[[1,"ez-classic-input",{"type":[1],"value":[1025],"label":[1],"helpText":[1,"help-text"],"placeholder":[1025],"enabled":[4],"readonly":[4],"name":[1],"minlength":[2],"maxlength":[2],"leftIconName":[1,"left-icon-name"],"rightIconName":[1,"right-icon-name"],"rightIconTooltip":[1,"right-icon-tooltip"],"leftIconTooltip":[1,"left-icon-tooltip"],"state":[1],"leftIconClickable":[4,"left-icon-clickable"],"rightIconClickable":[4,"right-icon-clickable"],"mask":[1],"emitMaskedValue":[4,"emit-masked-value"],"setFocus":[64],"setBlur":[64]}]]],["p-6020f3d5",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"goToTab":[64]}]]],["p-02f6e3b0",[[1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"enableHierarchicalFilter":[4,"enable-hierarchical-filter"],"_tree":[32],"_waintingForLoad":[32],"selectItem":[64],"openItem":[64],"disableItem":[64],"enableItem":[64],"addChild":[64],"applyFilter":[64],"expandAll":[64],"collapseAll":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"getParent":[64]},[[2,"keydown","onKeyDownListener"]]]]],["p-2a70f094",[[2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32],"clearFilteredOptions":[64]}]]],["p-e27d7dc2",[[0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32],"hide":[64],"show":[64]}]]],["p-124699e0",[[1,"ez-search-result-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"value":[1],"showOptionValue":[4,"show-option-value"],"_preSelection":[32],"nextOption":[64],"previousOption":[64],"selectCurrentItem":[64],"cancelSelection":[64]}]]],["p-e46a4d06",[[1,"ez-search-plus",{"value":[1537],"enabled":[1540],"disableCodeInput":[1540,"disable-code-input"],"disableDescriptionInput":[1540,"disable-description-input"],"label":[1537],"codLabel":[1537,"cod-label"],"hideDescriptionInput":[1540,"hide-description-input"],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"mode":[513],"contextProperties":[8,"context-properties"],"optionLoader":[16],"showOptionValue":[4,"show-option-value"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"autoFocus":[4,"auto-focus"],"showSelectedValue":[4,"show-selected-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"suppressSearch":[4,"suppress-search"],"suppressPreLoad":[4,"suppress-pre-load"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"descriptionValue":[32],"codeValue":[32],"isLoadingDescription":[32],"searchDescriptionIsOpen":[32],"visibleOptions":[32],"showLoading":[32],"setFocus":[64],"getValueAsync":[64],"clearValue":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-8dc267ff",[[1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"autoFocus":[4,"auto-focus"],"preventAutoFocus":[4,"prevent-auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"textEmptyOption":[1,"text-empty-option"],"isOpen":[32],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"getValueAsync":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64]}]]],["p-d0e6911e",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-59092a66",[[1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["p-8bb3aeb0",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"allowNegative":[4,"allow-negative"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[1,"alternative-placeholder"],"_value":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-5ab08b60",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[1,"alternative-placeholder"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-e7a7c594",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"],"autoRows":[516,"auto-rows"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"forceLabelFloat":[32],"appendTextToSelection":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-6f119d5f",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"fitHorizontal":[64],"hide":[64]},[[11,"scroll","scrollListener"]]]]],["p-1adf7139",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-4d30b703",[[1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]},[[4,"click","handleClickOutside"]]]]],["p-1cde96f9",[[1,"ez-upload",{"label":[1],"subtitle":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["p-a80b1287",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64]}]]],["p-288631d1",[[1,"ez-sidebar-button"],[1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]]],["p-0b333f09",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"contextProperties":[8,"context-properties"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"autoFocus":[4,"auto-focus"],"alternativePlaceholder":[513,"alternative-placeholder"],"showMore":[4,"show-more"],"suppressInputPersist":[1028,"suppress-input-persist"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_showLoadingDescription":[32],"_criteria":[32],"getValueAsync":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64]}]]],["p-7f792043",[[1,"ez-check",{"label":[513],"alternativePlaceholder":[513,"alternative-placeholder"],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4],"getMode":[64],"setFocus":[64]}]]],["p-e99cbb51",[[2,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"enableMultipleSelection":[4,"enable-multiple-selection"],"enabled":[4],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64],"removeSelection":[64]}]]],["p-6f77a359",[[1,"ez-button",{"label":[513],"enabled":[516],"isDisabled":[520,"is-disabled"],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"variant":[1],"type":[1],"leftIconName":[1,"left-icon-name"],"rightIconName":[1,"right-icon-name"],"suppressAnimation":[4,"suppress-animation"],"ripples":[32],"isPressed":[32],"setFocus":[64],"setBlur":[64]},[[1,"mousedown","onMouseDown"],[1,"touchstart","onTouchStart"],[2,"click","clickListener"]]]]],["p-191cfbc8",[[6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"],"showCloseButton":[4,"show-close-button"]},[[4,"ezCloseModal","handleEzModalAction"]]]]],["p-2df50161",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"],"enabledScroll":[4,"enabled-scroll"],"autoClose":[4,"auto-close"],"footerButtons":[16]}]]],["p-91c9d50e",[[2,"ez-rich-toolbar-item",{"icon":[1],"command":[1],"title":[1],"value":[1]}]]],["p-79277e43",[[0,"ez-skeleton",{"template":[1],"count":[2],"variant":[1],"width":[1],"height":[1],"marginTop":[1,"margin-top"],"marginRight":[1,"margin-right"],"marginBottom":[1,"margin-bottom"],"marginLeft":[1,"margin-left"],"animation":[1]}]]],["p-ef8bd3e8",[[1,"ez-popover-core",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040],"useAnchorSize":[516,"use-anchor-size"],"minWidth":[514,"min-width"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64],"setOptions":[64],"setAnchorElement":[64]}]]],["p-a401041c",[[2,"ez-link-builder",{"textToShow":[32],"link":[32],"openInNewGuide":[32],"show":[64],"hide":[64]}],[2,"ez-simple-image-uploader",{"maxSize":[2,"max-size"],"link":[32],"base64":[32],"messageError":[32],"selectedFile":[32],"show":[64],"hide":[64]}],[2,"ez-rich-toolbar",{"showPreview":[4,"show-preview"],"isPreviewMode":[4,"is-preview-mode"],"showConfigs":[4,"show-configs"],"showTextFormat":[4,"show-text-format"],"showUndoRedo":[4,"show-undo-redo"]},[[0,"actionTriggered","handleActionTriggered"]]],[2,"ez-rich-toolbar-arrows"],[2,"ez-rich-toolbar-configs"],[2,"ez-rich-toolbar-letters"]]],["p-c943f7c4",[[2,"ez-rich-text",{"showPreview":[4,"show-preview"],"value":[1537],"label":[513],"mode":[513],"enabled":[516],"rows":[514],"errorMessage":[1537,"error-message"],"canShowError":[516,"can-show-error"],"showConfigs":[4,"show-configs"],"showTextFormat":[4,"show-text-format"],"showUndoRedo":[4,"show-undo-redo"],"previewMode":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]},[[0,"executeToolbarCommand","handleExecuteToolbarCommand"]]],[2,"ez-custom-form-input",{"customEditor":[16],"formViewField":[16],"value":[1032],"detailContext":[1,"detail-context"],"builderFallback":[16],"selectedRecord":[16],"gui":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}],[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}],[1,"ez-combo-box-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"textEmptyList":[1,"text-empty-list"],"showOptionValue":[4,"show-option-value"],"preSelection":[2,"pre-selection"],"maxWidth":[2,"max-width"],"width":[2],"onOptionSelect":[16],"onOptionHover":[16],"nextOption":[64],"previousOption":[64],"selectCurrentOption":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-d6f50207",[[1,"ez-card-item",{"item":[16],"enableKey":[4,"enable-key"],"compacted":[4]}]]],["p-2528e988",[[0,"multi-selection-box-message",{"message":[1]}],[1,"search-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"textEmptyList":[1,"text-empty-list"],"canShowListOptions":[4,"can-show-list-options"],"value":[1],"showOptionValue":[4,"show-option-value"],"preSelection":[2,"pre-selection"],"nextOption":[64],"previousOption":[64]}],[1,"ez-popover-plus",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040],"useAnchorSize":[516,"use-anchor-size"],"minWidth":[514,"min-width"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64],"setOptions":[64],"setAnchorElement":[64]}]]],["p-f958dcb1",[[2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"onlyStaticFields":[4,"only-static-fields"],"useSearchField":[4,"use-search-field"],"elementFocusSearchField":[16],"_fieldsProps":[32],"_singleColumn":[32],"validate":[64],"addCustomEditor":[64],"setFieldProp":[64]}]]]]'),e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,f as n,H as s,g as r}from"./p-23a36bb6.js";import{DateUtils as o,ApplicationContext as l,Action as a,StringUtils as h,KeyboardManager as u,DataUnit as c,ElementIDUtils as d}from"@sankhyalabs/core";import{b as f,a as v,S as m,f as p,c as b,D as y}from"./p-623161e2.js";import{g as w,i as g}from"./p-641ee538.js";import{F as _}from"./p-30ffb9ed.js";import"./p-5a11cf56.js";import"./p-ab574d59.js";import"./p-b853763b.js";const C=/child\[([^\]]+)\]/,O=/\$\{.+\}/;class E{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[],this._defaultValues={}}static getDetailName(t){const i=C.exec(t);return i?i[1]:void 0}getSheet(t){return this._sheets.get(t)}getAllSheets(){return this._sheets}addSheet(t){this._sheets.set(t.name,t)}addRequiredFields(t){this._requiredFields=this._requiredFields.concat(t)}getRequiredFields(){return this._requiredFields}addCleanOnCopyFields(t){this._cleanOnCopyFields=this._cleanOnCopyFields.concat(t)}getCleanOnCopyFields(){return this._cleanOnCopyFields}addDefaultValues(t){return this._defaultValues=Object.assign(Object.assign({},this._defaultValues),t)}getDefaultValues(){const t={};return Object.entries(this._defaultValues).forEach((([i,e])=>{if("string"==typeof e){const t=O.exec(e);t&&(e=this.getDefaultVar(t[0]))}t[i]=e})),t}getDefaultVar(t){return"${data}"===t?o.getToday():"${datahora}"===t?o.getToday(!0):this._defaultVars?this._defaultVars.get(t):void 0}setDefaultVars(t){this._defaultVars=t}}const F=(t,i)=>{var e;if(i)return null===(e=i.tabs)||void 0===e?void 0:e.find((i=>i.label===t))},j=(t,i,e)=>{if("string"!=typeof t)return t;if(e){const i=F(t,e);if(i)return i}return Array.from(i.keys()).find((i=>i.label===t))||{label:t,visible:!0}};function z(t,i){var e,n;return"__main"===t[0].label&&"__main"!==i[0].label?-1:"__main"!==t[0].label&&"__main"===i[0].label?1:(null!==(e=t[0].order)&&void 0!==e?e:Number.MAX_VALUE)-(null!==(n=i[0].order)&&void 0!==n?n:Number.MAX_VALUE)}const A=t=>`child[${t.name}]`,N=t=>({name:A(t),label:t.label,fields:[]});function S(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var x="function"==typeof Symbol&&Symbol.observable||"@@observable",D=function(){return Math.random().toString(36).substring(7).split("").join(".")},M={INIT:"@@redux/INIT"+D(),REPLACE:"@@redux/REPLACE"+D(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+D()}};function R(t){if("object"!=typeof t||null===t)return!1;for(var i=t;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(t)===i}function T(t,i,e){var n;if("function"==typeof i&&"function"==typeof e||"function"==typeof e&&"function"==typeof arguments[3])throw new Error(S(0));if("function"==typeof i&&void 0===e&&(e=i,i=void 0),void 0!==e){if("function"!=typeof e)throw new Error(S(1));return e(T)(t,i)}if("function"!=typeof t)throw new Error(S(2));var s=t,r=i,o=[],l=o,a=!1;function h(){l===o&&(l=o.slice())}function u(){if(a)throw new Error(S(3));return r}function c(t){if("function"!=typeof t)throw new Error(S(4));if(a)throw new Error(S(5));var i=!0;return h(),l.push(t),function(){if(i){if(a)throw new Error(S(6));i=!1,h();var e=l.indexOf(t);l.splice(e,1),o=null}}}function d(t){if(!R(t))throw new Error(S(7));if(void 0===t.type)throw new Error(S(8));if(a)throw new Error(S(9));try{a=!0,r=s(r,t)}finally{a=!1}for(var i=o=l,e=0;e<i.length;e++)(0,i[e])();return t}function f(t){if("function"!=typeof t)throw new Error(S(10));s=t,d({type:M.REPLACE})}function v(){var t,i=c;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(S(11));function e(){t.next&&t.next(u())}return e(),{unsubscribe:i(e)}}})[x]=function(){return this},t}return d({type:M.INIT}),(n={dispatch:d,subscribe:c,getState:u,replaceReducer:f})[x]=v,n}const I={};function P(t=I,i){switch(i.type){case K.METADATA_LOADED:return Object.assign(Object.assign({},t),{formMetadata:i.payload,currentSheet:void 0});case K.CHANGE_TAB:return Object.assign(Object.assign({},t),{currentSheet:i.payload});default:return t}}function L(t){return t.formMetadata}function V(t){const i=function(t){return t.currentSheet}(t);return i?t.formMetadata.getSheet(i):Array.from(t.formMetadata.getAllSheets().values())[0]}var K;!function(t){t.METADATA_LOADED="FORM/METADATA_LOADED",t.CHANGE_TAB="FORM/CHANGE_TAB"}(K||(K={}));const $=class{constructor(e){t(this,e),this.ezFormRequestClearFieldToFocus=i(this,"ezFormRequestClearFieldToFocus",7),this.ezFormSetFields=i(this,"ezFormSetFields",7),this.ezReady=i(this,"ezReady",7),this.formItemsReady=i(this,"formItemsReady",7),this._customEditors=new Map,this._application=l.getContextValue("__SNK__APPLICATION__"),this.onDataUnitAction=t=>{t.type===a.METADATA_LOADED&&this.processMetadata()},this._fieldsProps=new Map,this._singleColumn=!1,this.dataUnit=void 0,this.config=void 0,this.recordsValidator=void 0,this.fieldToFocus=void 0,this.onlyStaticFields=!1,this.useSearchField=!0,this.elementFocusSearchField=void 0}validate(){return this._dataBinder.validate()}async addCustomEditor(t,i,e){if(this._formView)return void this._formView.addCustomEditor(t,i,e);const n=new Map(this._customEditors);n.set(t,{customEditor:i,detailContext:e}),this._customEditors=n}observeConfig(){this.processMetadata()}async setFieldProp(t,i,e){const n=new Map(this._fieldsProps),s=this._fieldsProps.get(t);n.set(t,Object.assign(Object.assign({},s),{[i]:e})),this._fieldsProps=n}getDynamicContent(){var t;const i=L(this._store.getState());if(!i)return null;const n=Array.from(i.getAllSheets().values()),s=V(null===(t=this._store)||void 0===t?void 0:t.getState());let r=[];if(n.length>1){const t=n.map(((t,i)=>({tabKey:t.name,label:t.label,index:i}))),i="selector";r.push(e("ez-tabselector",{tabs:this.buildIdTabSelector(t),onEzChange:t=>this._store.dispatch(function(t){return{type:K.CHANGE_TAB,payload:"string"==typeof t?t:t.tabKey}}(t.detail)),selectedTab:s.name,"data-element-id":i}))}return r=r.concat(this.buildFormContent(s)),r}buildFormContent(t){const i=null==t?void 0:t.fields;if(null==t)return;this.ezFormSetFields.emit(i);const n=`${h.replaceAccentuatedChars(h.toCamelCase(null==t?void 0:t.label),!1)}_selectorContainer`;return e("div",{class:"dynamic-content ez-box--no-outline","data-element-id":n,ref:t=>this._container=t,tabindex:"0"},e("ez-popover",{ref:t=>this._ezPopoverSearchField=t,overlayType:"none"},this.renderFieldColumn()),e("ez-form-view",{ref:t=>this._formView=t,class:"ez-row ez-padding-vertical--small",fields:i,singleColumn:this._singleColumn,selectedRecord:this.dataUnit.getSelectedRecord()}))}renderFieldColumn(){return null!=this._fieldSearch||(this._fieldSearch=v({value:h.generateUUID(),label:this._i18n("ez-form.labelSearchField")},(({argument:t})=>this.fieldsOptionLoader(t)),(t=>this.onSelectField(t)))),this._fieldSearch}getFormFields(){var t;return null===(t=this.config)||void 0===t?void 0:t.fields}fieldsOptionLoader(t){const i=null==t?void 0:t.toLowerCase(),e=this.getFormFields().map((t=>{var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getField(t.name)})).filter((t=>{var e,n;return(null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes(i))||(null===(n=t.label)||void 0===n?void 0:n.toLowerCase().includes(i))})).map((t=>({value:t.name,label:t.label})));return Promise.resolve(e)}onSelectField(t){null!=t&&null!=t.value?(this.fieldToFocus=t.value,this._ezPopoverSearchField.hide()):this.fieldToFocus=""}async initKeyboardManager(){var t,i;this._keyboardManager=new u({propagate:!1,element:null!==(t=this.elementFocusSearchField)&&void 0!==t?t:this._element}),this.useSearchField&&this._keyboardManager.bind(m,(async()=>{if(!this._container||!this._ezPopoverSearchField)return;const t=this._container.getBoundingClientRect();await p(this._fieldSearch),this._ezPopoverSearchField.showUnder(this._container,{horizontalGap:t.width-b,verticalGap:-1*t.height})}),{description:this._i18n("ez-form.labelSearchField"),element:null!==(i=this.elementFocusSearchField)&&void 0!==i?i:this._element})}componentDidLoad(){this.initKeyboardManager()}processMetadata(){if(this.bindFields()&&this.dataUnit&&this._store){const t=((t,i,e=!1,n)=>{var s;null!=t&&!0!==(null==t?void 0:t.emptyConfig)||(t=(t=>{const i=t.metadata;let e;return i&&(e=i.fields.filter((t=>!1!==t.visible)).map((t=>({name:t.name,defaultValue:t.defaultValue})))),{emptyConfig:!1,fields:e}})(i));const r=new Map,o=new Map,l=[],a=[],h={};(null!==(s=null==t?void 0:t.tabs)&&void 0!==s?s:[]).forEach((t=>{o.has(t.label)||!1!==t.visible||o.set(t.label,t)})),function(t,i,e,n,s,r,o){var l;null===(l=null==t?void 0:t.fields)||void 0===l||l.forEach((l=>{var a,h,u;if(!1!==l.visible){const c=j(l.tab||"__main",i,t);if(e.has(c.label))return;const d=n.getField(l.name);if(d&&(null==(null==d?void 0:d.visible)||!0===(null==d?void 0:d.visible))&&c.visible){i.has(c)||i.set(c,[]);const t=f(d,l);i.get(c).push(t),t.required&&s.push(l.name),((null==l.cleanOnCopy?null===(a=d.properties)||void 0===a?void 0:a.cleanOnCopy:l.cleanOnCopy)||(null===(h=d.properties)||void 0===h?void 0:h.cleanOnCopy))&&r.push(l.name);let e=null==l.defaultValue?null===(u=d.properties)||void 0===u?void 0:u.defaultValue:l.defaultValue;if(e&&null!=e.value){const{type:t,value:i}=e;if(t)if("V"===t)e=i;else try{const t=JSON.parse(i);e=t&&"value"in t?t:i}catch(t){}o[l.name]=e}}}}))}(t,r,o,i,l,a,h);const u=new E;return u.setDefaultVars(t.defaultVars),e&&function(t,i,e){const n=t.metadata;void 0!==n&&void 0!==n.children&&n.children.forEach((t=>{const n=F(t.label,i);if(n)return void e.set(Object.assign(n,{name:A(t),isDetail:!0}),[]);const{label:s,name:r,fields:o}=N(t);e.set({name:r,label:s,isDetail:!0},o)}))}(i,t,r),n&&function(t,i,e){t.forEach((t=>{const n=F(t.label,i);e.set(n?Object.assign(n,{name:t.id,isCustom:!0}):{label:t.label,name:t.id,isCustom:!0,visible:!0},[])}))}(n,t,r),Array.from(r.entries()).sort(z).forEach((([t,i])=>{o.has(t.label)||u.addSheet(function(t,i){const e=w();return{label:"__main"===t.label?e("ez-form.mainTab"):t.label,name:t.name||t.label,isCustom:t.isCustom,isDetail:t.isDetail,fields:i}}(t,i))})),u.addRequiredFields(l),u.addCleanOnCopyFields(a),u.addDefaultValues(h),u})(this.config,this.dataUnit);this._store.dispatch({type:K.METADATA_LOADED,payload:t})}}isStatic(){var t;return(null===(t=this._staticFields)||void 0===t?void 0:t.length)>0}bindFields(){return!this.isStatic()||!1===this.onlyStaticFields}async componentWillLoad(){var t;void 0===this.dataUnit&&(this.dataUnit=new c("ez-form")),this.dataUnit.unsubscribe(this.onDataUnitAction),this.dataUnit.subscribe(this.onDataUnitAction),this._dataBinder=new y(this.dataUnit),this._store=T(P),this._store.subscribe((()=>n(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata(),d.addIDInfo(this._element,null,{dataUnit:this.dataUnit});const i=await(null===(t=this._application)||void 0===t?void 0:t.getLayoutFormConfig());this.setSingleColumn(i),this.registerNotifyListeners(i),this._i18n=await g()}async setSingleColumn(t){this._singleColumn=(null==t?void 0:t.config)===_.CASCADE}async registerNotifyListeners(t){t&&t.onConfigChange((t=>{this._singleColumn=t===_.CASCADE}))}componentDidRender(){const t=L(this._store.getState());t.addRequiredFields(this._staticFields.filter((t=>t.dataset.required)).map((t=>t.dataset.fieldName))),this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")),this.dataUnit.dataUnitId,t,this.recordsValidator),this.ezReady.emit(),this.handleFieldToFocus(),this.setCustomEditors(),this.setFieldsProps()}setCustomEditors(){if(this._formView)for(const[t,i]of this._customEditors)this._formView.addCustomEditor(t,i.customEditor,i.detailContext),this._customEditors.delete(t)}handleFieldToFocus(){var t;if(null==this.fieldToFocus)return;const i=V(null===(t=this._store)||void 0===t?void 0:t.getState());(null==i?void 0:i.fields).some((t=>t.name===this.fieldToFocus))&&requestAnimationFrame((()=>{this._dataBinder.setFocus(this.fieldToFocus),this.ezFormRequestClearFieldToFocus.emit(),this.fieldToFocus=null}))}setFieldsProps(){if(this._formView)for(const[t,i]of this._fieldsProps){for(const e in i)this._formView.setFieldProp(t,e,i[e]);this._fieldsProps.delete(t)}}disconnectedCallback(){var t;this.dataUnit.unsubscribe(this.onDataUnitAction),this._dataBinder.onDisconnectedCallback(),null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}buildIdTabSelector(t){return t&&t.forEach((t=>t[d.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=h.toCamelCase(t.label))),t}render(){return e(s,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};$.style=".sc-ez-form-h{display:flex;flex-direction:column;width:100%}.dynamic-content.sc-ez-form ez-collapsible-box.sc-ez-form{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";export{$ as ez_form}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataUnit } from "@sankhyalabs/core";
|
|
2
2
|
import { IFormConfig, IFormSheetMetadata } from "./interfaces";
|
|
3
|
+
import { IGuideItem } from "../../components/ez-guide-navigator/interfaces";
|
|
3
4
|
export declare class FormMetadata {
|
|
4
5
|
private _sheets;
|
|
5
6
|
private _requiredFields;
|
|
@@ -20,4 +21,4 @@ export declare class FormMetadata {
|
|
|
20
21
|
setDefaultVars(vars: Map<string, any>): void;
|
|
21
22
|
}
|
|
22
23
|
export declare const buildFormConfigFromDataUnit: (dataUnit: DataUnit) => IFormConfig;
|
|
23
|
-
export declare const buildFormMetadata: (config: IFormConfig, dataUnit: DataUnit, includeDetails?: boolean) => FormMetadata;
|
|
24
|
+
export declare const buildFormMetadata: (config: IFormConfig, dataUnit: DataUnit, includeDetails?: boolean, customGuides?: IGuideItem[]) => FormMetadata;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,f as n,H as s,g as r}from"./p-23a36bb6.js";import{DateUtils as o,ApplicationContext as l,Action as a,StringUtils as h,KeyboardManager as u,DataUnit as d,ElementIDUtils as c}from"@sankhyalabs/core";import{b as f,a as v,S as p,f as m,c as b,D as y}from"./p-623161e2.js";import{g as w,i as g}from"./p-641ee538.js";import{F as E}from"./p-30ffb9ed.js";import"./p-5a11cf56.js";import"./p-ab574d59.js";import"./p-b853763b.js";const O=/child\[([^\]]+)\]/,C=/\$\{.+\}/;class F{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[],this._defaultValues={}}static getDetailName(t){const i=O.exec(t);return i?i[1]:void 0}getSheet(t){return this._sheets.get(t)}getAllSheets(){return this._sheets}addSheet(t){this._sheets.set(t.name,t)}addRequiredFields(t){this._requiredFields=this._requiredFields.concat(t)}getRequiredFields(){return this._requiredFields}addCleanOnCopyFields(t){this._cleanOnCopyFields=this._cleanOnCopyFields.concat(t)}getCleanOnCopyFields(){return this._cleanOnCopyFields}addDefaultValues(t){return this._defaultValues=Object.assign(Object.assign({},this._defaultValues),t)}getDefaultValues(){const t={};return Object.entries(this._defaultValues).forEach((([i,e])=>{if("string"==typeof e){const t=C.exec(e);t&&(e=this.getDefaultVar(t[0]))}t[i]=e})),t}getDefaultVar(t){return"${data}"===t?o.getToday():"${datahora}"===t?o.getToday(!0):this._defaultVars?this._defaultVars.get(t):void 0}setDefaultVars(t){this._defaultVars=t}}const _=(t,i)=>"__main"==t[0].label?-1:(t[0].order||1e4)-(i[0].order||1e4);function j(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var z="function"==typeof Symbol&&Symbol.observable||"@@observable",A=function(){return Math.random().toString(36).substring(7).split("").join(".")},S={INIT:"@@redux/INIT"+A(),REPLACE:"@@redux/REPLACE"+A(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+A()}};function x(t){if("object"!=typeof t||null===t)return!1;for(var i=t;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(t)===i}function N(t,i,e){var n;if("function"==typeof i&&"function"==typeof e||"function"==typeof e&&"function"==typeof arguments[3])throw new Error(j(0));if("function"==typeof i&&void 0===e&&(e=i,i=void 0),void 0!==e){if("function"!=typeof e)throw new Error(j(1));return e(N)(t,i)}if("function"!=typeof t)throw new Error(j(2));var s=t,r=i,o=[],l=o,a=!1;function h(){l===o&&(l=o.slice())}function u(){if(a)throw new Error(j(3));return r}function d(t){if("function"!=typeof t)throw new Error(j(4));if(a)throw new Error(j(5));var i=!0;return h(),l.push(t),function(){if(i){if(a)throw new Error(j(6));i=!1,h();var e=l.indexOf(t);l.splice(e,1),o=null}}}function c(t){if(!x(t))throw new Error(j(7));if(void 0===t.type)throw new Error(j(8));if(a)throw new Error(j(9));try{a=!0,r=s(r,t)}finally{a=!1}for(var i=o=l,e=0;e<i.length;e++)(0,i[e])();return t}function f(t){if("function"!=typeof t)throw new Error(j(10));s=t,c({type:S.REPLACE})}function v(){var t,i=d;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(j(11));function e(){t.next&&t.next(u())}return e(),{unsubscribe:i(e)}}})[z]=function(){return this},t}return c({type:S.INIT}),(n={dispatch:c,subscribe:d,getState:u,replaceReducer:f})[z]=v,n}const M={};function R(t=M,i){switch(i.type){case I.METADATA_LOADED:return Object.assign(Object.assign({},t),{formMetadata:i.payload,currentSheet:void 0});case I.CHANGE_TAB:return Object.assign(Object.assign({},t),{currentSheet:i.payload});default:return t}}function T(t){return t.formMetadata}function D(t){const i=function(t){return t.currentSheet}(t);return i?t.formMetadata.getSheet(i):Array.from(t.formMetadata.getAllSheets().values())[0]}var I;!function(t){t.METADATA_LOADED="FORM/METADATA_LOADED",t.CHANGE_TAB="FORM/CHANGE_TAB"}(I||(I={}));const P=class{constructor(e){t(this,e),this.ezFormRequestClearFieldToFocus=i(this,"ezFormRequestClearFieldToFocus",7),this.ezFormSetFields=i(this,"ezFormSetFields",7),this.ezReady=i(this,"ezReady",7),this.formItemsReady=i(this,"formItemsReady",7),this._customEditors=new Map,this._application=l.getContextValue("__SNK__APPLICATION__"),this.onDataUnitAction=t=>{t.type===a.METADATA_LOADED&&this.processMetadata()},this._fieldsProps=new Map,this._singleColumn=!1,this.dataUnit=void 0,this.config=void 0,this.recordsValidator=void 0,this.fieldToFocus=void 0,this.onlyStaticFields=!1,this.useSearchField=!0,this.elementFocusSearchField=void 0}validate(){return this._dataBinder.validate()}async addCustomEditor(t,i,e){if(this._formView)return void this._formView.addCustomEditor(t,i,e);const n=new Map(this._customEditors);n.set(t,{customEditor:i,detailContext:e}),this._customEditors=n}observeConfig(){this.processMetadata()}async setFieldProp(t,i,e){const n=new Map(this._fieldsProps),s=this._fieldsProps.get(t);n.set(t,Object.assign(Object.assign({},s),{[i]:e})),this._fieldsProps=n}getDynamicContent(){var t;const i=T(this._store.getState());if(!i)return null;const n=Array.from(i.getAllSheets().values()),s=D(null===(t=this._store)||void 0===t?void 0:t.getState());let r=[];if(n.length>1){const t=n.map(((t,i)=>({tabKey:t.name,label:t.label,index:i}))),i="selector";r.push(e("ez-tabselector",{tabs:this.buildIdTabSelector(t),onEzChange:t=>this._store.dispatch(function(t){return{type:I.CHANGE_TAB,payload:"string"==typeof t?t:t.tabKey}}(t.detail)),selectedTab:s.name,"data-element-id":i}))}return r=r.concat(this.buildFormContent(s)),r}buildFormContent(t){const i=null==t?void 0:t.fields;if(null==t)return;this.ezFormSetFields.emit(i);const n=`${h.replaceAccentuatedChars(h.toCamelCase(null==t?void 0:t.label),!1)}_selectorContainer`;return e("div",{class:"dynamic-content ez-box--no-outline","data-element-id":n,ref:t=>this._container=t,tabindex:"0"},e("ez-popover",{ref:t=>this._ezPopoverSearchField=t,overlayType:"none"},this.renderFieldColumn()),e("ez-form-view",{ref:t=>this._formView=t,class:"ez-row ez-padding-vertical--small",fields:i,singleColumn:this._singleColumn,selectedRecord:this.dataUnit.getSelectedRecord()}))}renderFieldColumn(){return null!=this._fieldSearch||(this._fieldSearch=v({value:h.generateUUID(),label:this._i18n("ez-form.labelSearchField")},(({argument:t})=>this.fieldsOptionLoader(t)),(t=>this.onSelectField(t)))),this._fieldSearch}getFormFields(){var t;return null===(t=this.config)||void 0===t?void 0:t.fields}fieldsOptionLoader(t){const i=null==t?void 0:t.toLowerCase(),e=this.getFormFields().map((t=>{var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getField(t.name)})).filter((t=>{var e,n;return(null===(e=t.name)||void 0===e?void 0:e.toLowerCase().includes(i))||(null===(n=t.label)||void 0===n?void 0:n.toLowerCase().includes(i))})).map((t=>({value:t.name,label:t.label})));return Promise.resolve(e)}onSelectField(t){null!=t&&null!=t.value?(this.fieldToFocus=t.value,this._ezPopoverSearchField.hide()):this.fieldToFocus=""}async initKeyboardManager(){var t,i;this._keyboardManager=new u({propagate:!1,element:null!==(t=this.elementFocusSearchField)&&void 0!==t?t:this._element}),this.useSearchField&&this._keyboardManager.bind(p,(async()=>{if(!this._container||!this._ezPopoverSearchField)return;const t=this._container.getBoundingClientRect();await m(this._fieldSearch),this._ezPopoverSearchField.showUnder(this._container,{horizontalGap:t.width-b,verticalGap:-1*t.height})}),{description:this._i18n("ez-form.labelSearchField"),element:null!==(i=this.elementFocusSearchField)&&void 0!==i?i:this._element})}componentDidLoad(){this.initKeyboardManager()}processMetadata(){if(this.bindFields()&&this.dataUnit&&this._store){const t=((t,i,e=!1)=>{var n,s;null!=t&&!0!==(null==t?void 0:t.emptyConfig)||(t=(t=>{const i=t.metadata;let e;return i&&(e=i.fields.filter((t=>!1!==t.visible)).map((t=>({name:t.name,defaultValue:t.defaultValue})))),{emptyConfig:!1,fields:e}})(i));const r=new Map,o=new Map,l=[],a=[],h={};null===(n=null==t?void 0:t.tabs)||void 0===n||n.forEach((t=>{o.has(t.label)||!1!==t.visible||o.set(t.label,t)})),null===(s=null==t?void 0:t.fields)||void 0===s||s.forEach((t=>{var e,n,s;if(!1!==t.visible){const u=((t,i)=>("string"==typeof t?Array.from(i.keys()).find((i=>i.label===t)):t)||{label:t,visible:!0})(t.tab||"__main",r);if(o.has(u.label))return;const d=i.getField(t.name);if(d&&(null==(null==d?void 0:d.visible)||!0===(null==d?void 0:d.visible))&&u.visible){r.has(u)||r.set(u,[]);const i=f(d,t);r.get(u).push(i),i.required&&l.push(t.name),((null==t.cleanOnCopy?null===(e=d.properties)||void 0===e?void 0:e.cleanOnCopy:t.cleanOnCopy)||(null===(n=d.properties)||void 0===n?void 0:n.cleanOnCopy))&&a.push(t.name);let o=null==t.defaultValue?null===(s=d.properties)||void 0===s?void 0:s.defaultValue:t.defaultValue;if(o&&null!=o.value){const{type:i,value:e}=o;if(i)if("V"===i)o=e;else try{const t=JSON.parse(e);o=t&&"value"in t?t:e}catch(t){}h[t.name]=o}}}}));const u=new F;if(u.setDefaultVars(t.defaultVars),e){const t=i.metadata;null!=t&&null!=t.children&&t.children.forEach((t=>{const{label:i,name:e,fields:n}=(t=>({name:`child[${t.name}]`,label:t.label,fields:[]}))(t);r.set({name:e,label:i},n)}))}const d=w();return Array.from(r.entries()).sort(_).forEach((([t,i])=>{u.addSheet({label:"__main"===t.label?d("ez-form.mainTab"):t.label,name:t.name||t.label,fields:i})})),u.addRequiredFields(l),u.addCleanOnCopyFields(a),u.addDefaultValues(h),u})(this.config,this.dataUnit);this._store.dispatch({type:I.METADATA_LOADED,payload:t})}}isStatic(){var t;return(null===(t=this._staticFields)||void 0===t?void 0:t.length)>0}bindFields(){return!this.isStatic()||!1===this.onlyStaticFields}async componentWillLoad(){var t;void 0===this.dataUnit&&(this.dataUnit=new d("ez-form")),this.dataUnit.unsubscribe(this.onDataUnitAction),this.dataUnit.subscribe(this.onDataUnitAction),this._dataBinder=new y(this.dataUnit),this._store=N(R),this._store.subscribe((()=>n(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata(),c.addIDInfo(this._element,null,{dataUnit:this.dataUnit});const i=await(null===(t=this._application)||void 0===t?void 0:t.getLayoutFormConfig());this.setSingleColumn(i),this.registerNotifyListeners(i),this._i18n=await g()}async setSingleColumn(t){this._singleColumn=(null==t?void 0:t.config)===E.CASCADE}async registerNotifyListeners(t){t&&t.onConfigChange((t=>{this._singleColumn=t===E.CASCADE}))}componentDidRender(){const t=T(this._store.getState());t.addRequiredFields(this._staticFields.filter((t=>t.dataset.required)).map((t=>t.dataset.fieldName))),this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")),this.dataUnit.dataUnitId,t,this.recordsValidator),this.ezReady.emit(),this.handleFieldToFocus(),this.setCustomEditors(),this.setFieldsProps()}setCustomEditors(){if(this._formView)for(const[t,i]of this._customEditors)this._formView.addCustomEditor(t,i.customEditor,i.detailContext),this._customEditors.delete(t)}handleFieldToFocus(){var t;if(null==this.fieldToFocus)return;const i=D(null===(t=this._store)||void 0===t?void 0:t.getState());(null==i?void 0:i.fields).some((t=>t.name===this.fieldToFocus))&&requestAnimationFrame((()=>{this._dataBinder.setFocus(this.fieldToFocus),this.ezFormRequestClearFieldToFocus.emit(),this.fieldToFocus=null}))}setFieldsProps(){if(this._formView)for(const[t,i]of this._fieldsProps){for(const e in i)this._formView.setFieldProp(t,e,i[e]);this._fieldsProps.delete(t)}}disconnectedCallback(){var t;this.dataUnit.unsubscribe(this.onDataUnitAction),this._dataBinder.onDisconnectedCallback(),null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}buildIdTabSelector(t){return t&&t.forEach((t=>t[c.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=h.toCamelCase(t.label))),t}render(){return e(s,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};P.style=".sc-ez-form-h{display:flex;flex-direction:column;width:100%}.dynamic-content.sc-ez-form ez-collapsible-box.sc-ez-form{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";export{P as ez_form}
|