@sankhyalabs/sankhyablocks 8.15.0-dev.31 → 8.15.0-dev.32
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/{SnkMessageBuilder-e7dcf408.js → SnkMessageBuilder-141aa18d.js} +2 -1
- package/dist/cjs/snk-application.cjs.entry.js +1 -1
- package/dist/cjs/snk-attach.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +7 -3
- package/dist/cjs/{snk-data-unit-82c08a8c.js → snk-data-unit-6026a9f7.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-config.cjs.entry.js +39 -25
- package/dist/cjs/snk-grid.cjs.entry.js +1 -1
- package/dist/cjs/{snk-guides-viewer-c7293cfa.js → snk-guides-viewer-75047f22.js} +1 -1
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +2 -2
- package/dist/cjs/snk-simple-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +6 -9
- package/dist/cjs/{taskbar-elements-1e4fb2e0.js → taskbar-elements-3ecd1278.js} +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +5 -1
- package/dist/collection/components/snk-form-config/snk-form-config.js +39 -25
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +1 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +5 -8
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
- package/dist/components/SnkMessageBuilder.js +2 -1
- package/dist/components/snk-data-exporter2.js +5 -1
- package/dist/components/snk-form-config2.js +39 -25
- package/dist/components/snk-taskbar2.js +6 -9
- package/dist/esm/{SnkMessageBuilder-0fb796b9.js → SnkMessageBuilder-9747ddd2.js} +2 -1
- package/dist/esm/snk-application.entry.js +1 -1
- package/dist/esm/snk-attach.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +7 -3
- package/dist/esm/{snk-data-unit-5d201fb3.js → snk-data-unit-4c343635.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +3 -3
- package/dist/esm/snk-form-config.entry.js +39 -25
- package/dist/esm/snk-grid.entry.js +1 -1
- package/dist/esm/{snk-guides-viewer-47443f7c.js → snk-guides-viewer-8b679ee6.js} +1 -1
- package/dist/esm/snk-guides-viewer.entry.js +2 -2
- package/dist/esm/snk-simple-crud.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +6 -9
- package/dist/esm/{taskbar-elements-846c027c.js → taskbar-elements-2473c8ac.js} +1 -1
- package/dist/sankhyablocks/p-20b46647.entry.js +1 -0
- package/dist/sankhyablocks/p-230f5148.entry.js +1 -0
- package/dist/sankhyablocks/{p-05243555.js → p-2936303b.js} +1 -1
- package/dist/sankhyablocks/{p-eefe9954.entry.js → p-2e493bef.entry.js} +1 -1
- package/dist/sankhyablocks/{p-fca66dda.entry.js → p-4b0c5921.entry.js} +1 -1
- package/dist/sankhyablocks/{p-30735d1e.entry.js → p-5eaecd30.entry.js} +1 -1
- package/dist/sankhyablocks/p-7e05bd83.entry.js +1 -0
- package/dist/sankhyablocks/{p-6ae58da0.js → p-8a00836e.js} +1 -1
- package/dist/sankhyablocks/{p-f3d1c48e.js → p-9a5d1b39.js} +1 -1
- package/dist/sankhyablocks/{p-99b1926b.entry.js → p-a1c630fb.entry.js} +1 -1
- package/dist/sankhyablocks/p-ae4fc9a9.js +1 -0
- package/dist/sankhyablocks/{p-3c5b7cfc.entry.js → p-ba4871b5.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ec18c04e.entry.js → p-c4bcdd4b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b281e9e9.entry.js → p-d0bc5ef3.entry.js} +1 -1
- package/dist/sankhyablocks/p-e7dbe53a.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-8c13d8d6.entry.js +0 -1
- package/dist/sankhyablocks/p-8c49760e.js +0 -1
- package/dist/sankhyablocks/p-c4874327.entry.js +0 -1
- package/dist/sankhyablocks/p-fdc4cb9b.entry.js +0 -1
- package/dist/sankhyablocks/p-fe741404.entry.js +0 -1
@@ -48,7 +48,9 @@ export class SnkTaskbar {
|
|
48
48
|
}
|
49
49
|
observeButtons() {
|
50
50
|
this._definitions = undefined;
|
51
|
-
requestAnimationFrame(() => {
|
51
|
+
requestAnimationFrame(() => {
|
52
|
+
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
53
|
+
});
|
52
54
|
}
|
53
55
|
// Internal methods
|
54
56
|
elementsFromString(strButtons) {
|
@@ -203,7 +205,7 @@ export class SnkTaskbar {
|
|
203
205
|
this._customElementsId.push(elementId);
|
204
206
|
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.addNotOverFlowElement(elementId);
|
205
207
|
}
|
206
|
-
return h("span", { key: elementId, id: elementId });
|
208
|
+
return h("span", { class: "ez-padding-left--medium", key: elementId, id: elementId });
|
207
209
|
}
|
208
210
|
getCustomElements() {
|
209
211
|
var _a, _b;
|
@@ -327,12 +329,7 @@ export class SnkTaskbar {
|
|
327
329
|
let index = 0;
|
328
330
|
return (h(Host, { class: this.getHostClasses() }, this.removeEmpty(this._definitions.map((elem) => {
|
329
331
|
var _a, _b;
|
330
|
-
|
331
|
-
index = 0;
|
332
|
-
}
|
333
|
-
else {
|
334
|
-
index++;
|
335
|
-
}
|
332
|
+
index++;
|
336
333
|
if (TaskbarElement[elem]) {
|
337
334
|
return this.getElement(index, TaskbarElement[elem]);
|
338
335
|
}
|
@@ -16,7 +16,8 @@ export const snkDataExporterMessages = {
|
|
16
16
|
},
|
17
17
|
message: {
|
18
18
|
emailSuccess: "E-mail enviado com sucesso",
|
19
|
-
exportError: "
|
19
|
+
exportError: "Falha ao exportar dados",
|
20
|
+
unknownFailure: "O motivo da falha não pode ser identificado.",
|
20
21
|
exportPermission: "O usuário não possui permissão para exportar o arquivo.",
|
21
22
|
},
|
22
23
|
title: {
|
@@ -286,7 +286,8 @@ const snkDataExporterMessages = {
|
|
286
286
|
},
|
287
287
|
message: {
|
288
288
|
emailSuccess: "E-mail enviado com sucesso",
|
289
|
-
exportError: "
|
289
|
+
exportError: "Falha ao exportar dados",
|
290
|
+
unknownFailure: "O motivo da falha não pode ser identificado.",
|
290
291
|
exportPermission: "O usuário não possui permissão para exportar o arquivo.",
|
291
292
|
},
|
292
293
|
title: {
|
@@ -323,7 +323,11 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
323
323
|
}
|
324
324
|
fetchDataExporter(params)
|
325
325
|
.then((result) => callbackResolver(result))
|
326
|
-
.catch((exception) =>
|
326
|
+
.catch((exception) => {
|
327
|
+
console.error(exception);
|
328
|
+
let { title, message, statusMessage } = exception || {};
|
329
|
+
ApplicationUtils.error(title || this.getMessage("snkDataExporter.message.exportError"), statusMessage || message || this.getMessage("snkDataExporter.message.unknownFailure"));
|
330
|
+
});
|
327
331
|
}
|
328
332
|
getOptionKey(option) {
|
329
333
|
return Object.keys(DataExporterOption)
|
@@ -34,6 +34,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
34
34
|
this._formFieldsStyle = "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding-right--small ez-padding-bottom--medium sc-snk-form-config";
|
35
35
|
this._fieldsAvailableStyle = "ez-col ez-col--sd-12 ez-col--tb-12 ez-margin-bottom--medium ez-margin-right--medium sc-snk-form-config";
|
36
36
|
this._fieldFloatingStyle = "form-config__field-config--dragged";
|
37
|
+
this._sortableTimer = 100;
|
37
38
|
this._formConfigOptions = [];
|
38
39
|
this._fieldConfigSelected = undefined;
|
39
40
|
this._layoutFormConfig = undefined;
|
@@ -48,20 +49,27 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
48
49
|
this.messagesBuilder = undefined;
|
49
50
|
}
|
50
51
|
observeConfigManager() {
|
51
|
-
this.loadConfig();
|
52
|
+
this.loadConfig(this._sortableTimer);
|
52
53
|
}
|
53
|
-
loadFields() {
|
54
|
+
loadFields(updateTimer = 0) {
|
54
55
|
this._layoutFormConfig = [];
|
55
|
-
|
56
|
+
if (updateTimer > 0) {
|
57
|
+
setTimeout(() => {
|
58
|
+
this.buildFields();
|
59
|
+
}, updateTimer);
|
60
|
+
}
|
61
|
+
else {
|
62
|
+
this.buildFields();
|
63
|
+
}
|
56
64
|
}
|
57
65
|
buildFields() {
|
58
66
|
this.buildFormConfig();
|
59
67
|
this.buildAvailableFields();
|
60
68
|
}
|
61
|
-
loadFormConfig() {
|
69
|
+
loadFormConfig(updateTimer) {
|
62
70
|
var _a;
|
63
71
|
this._formConfig = this.getConfig();
|
64
|
-
this.loadFields();
|
72
|
+
this.loadFields(updateTimer);
|
65
73
|
this.controlFieldConfig();
|
66
74
|
if (((_a = this._filterFieldsAvailable) === null || _a === void 0 ? void 0 : _a.value) != undefined) {
|
67
75
|
this._filterFieldsAvailable.value = "";
|
@@ -104,12 +112,12 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
104
112
|
}
|
105
113
|
}
|
106
114
|
resetChangeConfig() {
|
107
|
-
this.loadFormConfig();
|
115
|
+
this.loadFormConfig(this._sortableTimer);
|
108
116
|
this.clearTempGroups();
|
109
117
|
}
|
110
118
|
resetChangeOptionConfig() {
|
111
119
|
this._formConfigChanged = false;
|
112
|
-
this.loadConfig();
|
120
|
+
this.loadConfig(this._sortableTimer);
|
113
121
|
this.clearTempGroups();
|
114
122
|
}
|
115
123
|
getTabsToSave() {
|
@@ -324,7 +332,9 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
324
332
|
&& oldContainer.id === newContainer.id) {
|
325
333
|
evt.cancel();
|
326
334
|
this._fieldsAvailable = [];
|
327
|
-
|
335
|
+
setTimeout(() => {
|
336
|
+
this.buildAvailableFields();
|
337
|
+
}, this._sortableTimer);
|
328
338
|
return true;
|
329
339
|
}
|
330
340
|
return false;
|
@@ -367,7 +377,11 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
367
377
|
if (isNewGroup) {
|
368
378
|
this.clearTempGroups(true);
|
369
379
|
}
|
370
|
-
|
380
|
+
const sortableTimer = oldContainer.dataset.groupName !== newContainer.dataset.groupName
|
381
|
+
|| (newContainer.id === CONTAINER_ID.withoutGroup && oldContainer.id === CONTAINER_ID.fieldsAvailable)
|
382
|
+
? this._sortableTimer
|
383
|
+
: 0;
|
384
|
+
this.updateFieldsToSave(sortableTimer);
|
371
385
|
}, this._renderTimer);
|
372
386
|
return true;
|
373
387
|
}
|
@@ -397,12 +411,12 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
397
411
|
return;
|
398
412
|
}
|
399
413
|
}
|
400
|
-
updateFieldsToSave() {
|
414
|
+
updateFieldsToSave(updateTimer = 0) {
|
401
415
|
const fields = this.getFieldsToSave();
|
402
416
|
if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
|
403
417
|
this._formConfig.fields = fields;
|
404
418
|
}
|
405
|
-
this.loadFields();
|
419
|
+
this.loadFields(updateTimer);
|
406
420
|
this._formConfigChanged = true;
|
407
421
|
}
|
408
422
|
controlSortableField() {
|
@@ -432,7 +446,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
432
446
|
controlStopDraggingGroup(evt) {
|
433
447
|
if (evt.data.newIndex !== evt.data.oldIndex) {
|
434
448
|
setTimeout(() => {
|
435
|
-
this.updateFieldsToSave();
|
449
|
+
this.updateFieldsToSave(this._sortableTimer);
|
436
450
|
}, this._renderTimer);
|
437
451
|
}
|
438
452
|
}
|
@@ -505,7 +519,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
505
519
|
});
|
506
520
|
if (tabs.length > 0) {
|
507
521
|
this._formConfig.tabs = tabs;
|
508
|
-
this.loadFields();
|
522
|
+
this.loadFields(this._sortableTimer);
|
509
523
|
this.controlFieldConfig();
|
510
524
|
this._formConfigChanged = true;
|
511
525
|
}
|
@@ -529,13 +543,13 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
529
543
|
if (config != undefined) {
|
530
544
|
this._formConfig = config;
|
531
545
|
this._tabSelected = 1;
|
532
|
-
this.loadFields();
|
546
|
+
this.loadFields(this._sortableTimer);
|
533
547
|
this.controlFieldConfig();
|
534
548
|
this.clearTempGroups();
|
535
549
|
}
|
536
550
|
}
|
537
|
-
loadConfig() {
|
538
|
-
this.loadFormConfig();
|
551
|
+
loadConfig(updateTimer = 0) {
|
552
|
+
this.loadFormConfig(updateTimer);
|
539
553
|
this.loadUserConfig();
|
540
554
|
}
|
541
555
|
addNewGroup() {
|
@@ -576,7 +590,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
576
590
|
});
|
577
591
|
}
|
578
592
|
else {
|
579
|
-
this.updateFieldsToSave();
|
593
|
+
this.updateFieldsToSave(this._sortableTimer);
|
580
594
|
}
|
581
595
|
}
|
582
596
|
checkGroupExists(newLabel, indexGroup, isTempGroup = false) {
|
@@ -622,7 +636,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
622
636
|
field.group = newLabel;
|
623
637
|
}
|
624
638
|
});
|
625
|
-
this.loadFields();
|
639
|
+
this.loadFields(this._sortableTimer);
|
626
640
|
this.controlFieldConfig();
|
627
641
|
this._formConfigChanged = true;
|
628
642
|
}
|
@@ -836,14 +850,14 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
836
850
|
this._formConfigChanged = true;
|
837
851
|
this.resetSortables();
|
838
852
|
}
|
839
|
-
controlRemoveFieldConfig(fieldConfig) {
|
853
|
+
controlRemoveFieldConfig(fieldConfig, updateTimer) {
|
840
854
|
var _a;
|
841
855
|
this._formConfigChanged = false;
|
842
856
|
if (fieldConfig == undefined) {
|
843
857
|
return;
|
844
858
|
}
|
845
859
|
this._formConfig.fields = (_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.filter((field) => field.name !== fieldConfig.name);
|
846
|
-
this.loadFields();
|
860
|
+
this.loadFields(updateTimer);
|
847
861
|
this.controlFieldConfig();
|
848
862
|
this._formConfigChanged = true;
|
849
863
|
this.resetSortables();
|
@@ -852,14 +866,14 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
852
866
|
this.controlSortableField();
|
853
867
|
this.controlSortableGroup();
|
854
868
|
}
|
855
|
-
handleFieldConfigChange(evt) {
|
869
|
+
handleFieldConfigChange(evt, updateTimer = 0) {
|
856
870
|
const { field: fieldConfig, type: actionType } = evt.detail;
|
857
871
|
if (actionType === ACTION_CONFIG.configuration) {
|
858
872
|
this.controlFieldConfig(fieldConfig);
|
859
873
|
return;
|
860
874
|
}
|
861
875
|
if (actionType === ACTION_CONFIG.remove) {
|
862
|
-
this.controlRemoveFieldConfig(fieldConfig);
|
876
|
+
this.controlRemoveFieldConfig(fieldConfig, updateTimer);
|
863
877
|
return;
|
864
878
|
}
|
865
879
|
if (actionType === ACTION_CONFIG.add) {
|
@@ -880,7 +894,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
880
894
|
tab.label = newLabel;
|
881
895
|
}
|
882
896
|
});
|
883
|
-
this.loadFields();
|
897
|
+
this.loadFields(this._sortableTimer);
|
884
898
|
this.controlFieldConfig();
|
885
899
|
this._formConfigChanged = true;
|
886
900
|
}
|
@@ -900,7 +914,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
900
914
|
this._formConfig.tabs = (_a = this._formConfig.tabs) === null || _a === void 0 ? void 0 : _a.filter((tab) => {
|
901
915
|
return tab.label !== tabSelected.detail.label;
|
902
916
|
});
|
903
|
-
this.loadFields();
|
917
|
+
this.loadFields(this._sortableTimer);
|
904
918
|
this.controlFieldConfig();
|
905
919
|
this._formConfigChanged = true;
|
906
920
|
}
|
@@ -913,7 +927,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
913
927
|
tab.visible = !tab.visible;
|
914
928
|
}
|
915
929
|
});
|
916
|
-
this.loadFields();
|
930
|
+
this.loadFields(this._sortableTimer);
|
917
931
|
this.controlFieldConfig();
|
918
932
|
this._formConfigChanged = true;
|
919
933
|
}
|
@@ -95,7 +95,7 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
95
95
|
case TaskbarElement.MORE_OPTIONS:
|
96
96
|
return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
|
97
97
|
case TaskbarElement.DIVIDER:
|
98
|
-
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-
|
98
|
+
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium", "data-taskbar-divider": true });
|
99
99
|
case TaskbarElement.DATA_EXPORTER:
|
100
100
|
const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
101
101
|
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
|
@@ -171,7 +171,9 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
171
171
|
}
|
172
172
|
observeButtons() {
|
173
173
|
this._definitions = undefined;
|
174
|
-
requestAnimationFrame(() => {
|
174
|
+
requestAnimationFrame(() => {
|
175
|
+
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
176
|
+
});
|
175
177
|
}
|
176
178
|
// Internal methods
|
177
179
|
elementsFromString(strButtons) {
|
@@ -326,7 +328,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
326
328
|
this._customElementsId.push(elementId);
|
327
329
|
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.addNotOverFlowElement(elementId);
|
328
330
|
}
|
329
|
-
return h("span", { key: elementId, id: elementId });
|
331
|
+
return h("span", { class: "ez-padding-left--medium", key: elementId, id: elementId });
|
330
332
|
}
|
331
333
|
getCustomElements() {
|
332
334
|
var _a, _b;
|
@@ -450,12 +452,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
450
452
|
let index = 0;
|
451
453
|
return (h(Host, { class: this.getHostClasses() }, this.removeEmpty(this._definitions.map((elem) => {
|
452
454
|
var _a, _b;
|
453
|
-
|
454
|
-
index = 0;
|
455
|
-
}
|
456
|
-
else {
|
457
|
-
index++;
|
458
|
-
}
|
455
|
+
index++;
|
459
456
|
if (TaskbarElement[elem]) {
|
460
457
|
return this.getElement(index, TaskbarElement[elem]);
|
461
458
|
}
|
@@ -286,7 +286,8 @@ const snkDataExporterMessages = {
|
|
286
286
|
},
|
287
287
|
message: {
|
288
288
|
emailSuccess: "E-mail enviado com sucesso",
|
289
|
-
exportError: "
|
289
|
+
exportError: "Falha ao exportar dados",
|
290
|
+
unknownFailure: "O motivo da falha não pode ser identificado.",
|
290
291
|
exportPermission: "O usuário não possui permissão para exportar o arquivo.",
|
291
292
|
},
|
292
293
|
title: {
|
@@ -5,7 +5,7 @@ import { C as ConfigStorage } from './ConfigStorage-39ed8aeb.js';
|
|
5
5
|
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-a650ae58.js';
|
6
6
|
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-17dc5b5e.js';
|
7
7
|
import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-f05a12ca.js';
|
8
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
8
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-9747ddd2.js';
|
9
9
|
import './form-config-fetcher-f121f880.js';
|
10
10
|
import './filter-item-type.enum-d45e026f.js';
|
11
11
|
import './PrintUtils-3e4ff0f5.js';
|
@@ -8,7 +8,7 @@ import './filter-item-type.enum-d45e026f.js';
|
|
8
8
|
import './form-config-fetcher-f121f880.js';
|
9
9
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
10
10
|
import { A as AutorizationType } from './auth-fetcher-17dc5b5e.js';
|
11
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
11
|
+
import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
|
12
12
|
import './PrintUtils-3e4ff0f5.js';
|
13
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
14
14
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
|
3
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
3
|
+
import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
|
4
4
|
import './DataFetcher-a650ae58.js';
|
5
5
|
import './pesquisa-fetcher-f05a12ca.js';
|
6
6
|
import { P as PresentationMode } from './index-0ece87a6.js';
|
@@ -4,10 +4,10 @@ import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/
|
|
4
4
|
import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType } from './index-0ece87a6.js';
|
5
5
|
import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-8457af36.js';
|
6
6
|
import { D as DataFetcher } from './DataFetcher-a650ae58.js';
|
7
|
-
import { S as SnkDataUnit } from './snk-data-unit-
|
7
|
+
import { S as SnkDataUnit } from './snk-data-unit-4c343635.js';
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './SnkMessageBuilder-
|
10
|
+
import './SnkMessageBuilder-9747ddd2.js';
|
11
11
|
|
12
12
|
class ItemBuilder {
|
13
13
|
constructor(getMessage, selectedNumber) {
|
@@ -324,7 +324,11 @@ const SnkDataExporter = class {
|
|
324
324
|
}
|
325
325
|
fetchDataExporter(params)
|
326
326
|
.then((result) => callbackResolver(result))
|
327
|
-
.catch((exception) =>
|
327
|
+
.catch((exception) => {
|
328
|
+
console.error(exception);
|
329
|
+
let { title, message, statusMessage } = exception || {};
|
330
|
+
ApplicationUtils.error(title || this.getMessage("snkDataExporter.message.exportError"), statusMessage || message || this.getMessage("snkDataExporter.message.unknownFailure"));
|
331
|
+
});
|
328
332
|
}
|
329
333
|
getOptionKey(option) {
|
330
334
|
return Object.keys(DataExporterOption)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-a7d3d3f1.js';
|
2
2
|
import { Action, ObjectUtils, JSUtils, DataUnitAction, ApplicationContext, DataType } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
|
-
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-
|
4
|
+
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-9747ddd2.js';
|
5
5
|
|
6
6
|
const SnkDataUnit = class {
|
7
7
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export { S as snk_data_unit } from './snk-data-unit-
|
1
|
+
export { S as snk_data_unit } from './snk-data-unit-4c343635.js';
|
2
2
|
import './index-a7d3d3f1.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
4
|
import '@sankhyalabs/ezui/dist/collection/utils';
|
5
|
-
import './SnkMessageBuilder-
|
5
|
+
import './SnkMessageBuilder-9747ddd2.js';
|
@@ -10,10 +10,10 @@ import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
12
12
|
import './form-config-fetcher-f121f880.js';
|
13
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
13
|
+
import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
|
14
14
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
15
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
16
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
15
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-8b679ee6.js';
|
16
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-9747ddd2.js';
|
17
17
|
import './ConfigStorage-39ed8aeb.js';
|
18
18
|
import './PrintUtils-3e4ff0f5.js';
|
19
19
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
@@ -34,6 +34,7 @@ const SnkFormConfig = class {
|
|
34
34
|
this._formFieldsStyle = "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding-right--small ez-padding-bottom--medium sc-snk-form-config";
|
35
35
|
this._fieldsAvailableStyle = "ez-col ez-col--sd-12 ez-col--tb-12 ez-margin-bottom--medium ez-margin-right--medium sc-snk-form-config";
|
36
36
|
this._fieldFloatingStyle = "form-config__field-config--dragged";
|
37
|
+
this._sortableTimer = 100;
|
37
38
|
this._formConfigOptions = [];
|
38
39
|
this._fieldConfigSelected = undefined;
|
39
40
|
this._layoutFormConfig = undefined;
|
@@ -48,20 +49,27 @@ const SnkFormConfig = class {
|
|
48
49
|
this.messagesBuilder = undefined;
|
49
50
|
}
|
50
51
|
observeConfigManager() {
|
51
|
-
this.loadConfig();
|
52
|
+
this.loadConfig(this._sortableTimer);
|
52
53
|
}
|
53
|
-
loadFields() {
|
54
|
+
loadFields(updateTimer = 0) {
|
54
55
|
this._layoutFormConfig = [];
|
55
|
-
|
56
|
+
if (updateTimer > 0) {
|
57
|
+
setTimeout(() => {
|
58
|
+
this.buildFields();
|
59
|
+
}, updateTimer);
|
60
|
+
}
|
61
|
+
else {
|
62
|
+
this.buildFields();
|
63
|
+
}
|
56
64
|
}
|
57
65
|
buildFields() {
|
58
66
|
this.buildFormConfig();
|
59
67
|
this.buildAvailableFields();
|
60
68
|
}
|
61
|
-
loadFormConfig() {
|
69
|
+
loadFormConfig(updateTimer) {
|
62
70
|
var _a;
|
63
71
|
this._formConfig = this.getConfig();
|
64
|
-
this.loadFields();
|
72
|
+
this.loadFields(updateTimer);
|
65
73
|
this.controlFieldConfig();
|
66
74
|
if (((_a = this._filterFieldsAvailable) === null || _a === void 0 ? void 0 : _a.value) != undefined) {
|
67
75
|
this._filterFieldsAvailable.value = "";
|
@@ -104,12 +112,12 @@ const SnkFormConfig = class {
|
|
104
112
|
}
|
105
113
|
}
|
106
114
|
resetChangeConfig() {
|
107
|
-
this.loadFormConfig();
|
115
|
+
this.loadFormConfig(this._sortableTimer);
|
108
116
|
this.clearTempGroups();
|
109
117
|
}
|
110
118
|
resetChangeOptionConfig() {
|
111
119
|
this._formConfigChanged = false;
|
112
|
-
this.loadConfig();
|
120
|
+
this.loadConfig(this._sortableTimer);
|
113
121
|
this.clearTempGroups();
|
114
122
|
}
|
115
123
|
getTabsToSave() {
|
@@ -324,7 +332,9 @@ const SnkFormConfig = class {
|
|
324
332
|
&& oldContainer.id === newContainer.id) {
|
325
333
|
evt.cancel();
|
326
334
|
this._fieldsAvailable = [];
|
327
|
-
|
335
|
+
setTimeout(() => {
|
336
|
+
this.buildAvailableFields();
|
337
|
+
}, this._sortableTimer);
|
328
338
|
return true;
|
329
339
|
}
|
330
340
|
return false;
|
@@ -367,7 +377,11 @@ const SnkFormConfig = class {
|
|
367
377
|
if (isNewGroup) {
|
368
378
|
this.clearTempGroups(true);
|
369
379
|
}
|
370
|
-
|
380
|
+
const sortableTimer = oldContainer.dataset.groupName !== newContainer.dataset.groupName
|
381
|
+
|| (newContainer.id === CONTAINER_ID.withoutGroup && oldContainer.id === CONTAINER_ID.fieldsAvailable)
|
382
|
+
? this._sortableTimer
|
383
|
+
: 0;
|
384
|
+
this.updateFieldsToSave(sortableTimer);
|
371
385
|
}, this._renderTimer);
|
372
386
|
return true;
|
373
387
|
}
|
@@ -397,12 +411,12 @@ const SnkFormConfig = class {
|
|
397
411
|
return;
|
398
412
|
}
|
399
413
|
}
|
400
|
-
updateFieldsToSave() {
|
414
|
+
updateFieldsToSave(updateTimer = 0) {
|
401
415
|
const fields = this.getFieldsToSave();
|
402
416
|
if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
|
403
417
|
this._formConfig.fields = fields;
|
404
418
|
}
|
405
|
-
this.loadFields();
|
419
|
+
this.loadFields(updateTimer);
|
406
420
|
this._formConfigChanged = true;
|
407
421
|
}
|
408
422
|
controlSortableField() {
|
@@ -432,7 +446,7 @@ const SnkFormConfig = class {
|
|
432
446
|
controlStopDraggingGroup(evt) {
|
433
447
|
if (evt.data.newIndex !== evt.data.oldIndex) {
|
434
448
|
setTimeout(() => {
|
435
|
-
this.updateFieldsToSave();
|
449
|
+
this.updateFieldsToSave(this._sortableTimer);
|
436
450
|
}, this._renderTimer);
|
437
451
|
}
|
438
452
|
}
|
@@ -505,7 +519,7 @@ const SnkFormConfig = class {
|
|
505
519
|
});
|
506
520
|
if (tabs.length > 0) {
|
507
521
|
this._formConfig.tabs = tabs;
|
508
|
-
this.loadFields();
|
522
|
+
this.loadFields(this._sortableTimer);
|
509
523
|
this.controlFieldConfig();
|
510
524
|
this._formConfigChanged = true;
|
511
525
|
}
|
@@ -529,13 +543,13 @@ const SnkFormConfig = class {
|
|
529
543
|
if (config != undefined) {
|
530
544
|
this._formConfig = config;
|
531
545
|
this._tabSelected = 1;
|
532
|
-
this.loadFields();
|
546
|
+
this.loadFields(this._sortableTimer);
|
533
547
|
this.controlFieldConfig();
|
534
548
|
this.clearTempGroups();
|
535
549
|
}
|
536
550
|
}
|
537
|
-
loadConfig() {
|
538
|
-
this.loadFormConfig();
|
551
|
+
loadConfig(updateTimer = 0) {
|
552
|
+
this.loadFormConfig(updateTimer);
|
539
553
|
this.loadUserConfig();
|
540
554
|
}
|
541
555
|
addNewGroup() {
|
@@ -576,7 +590,7 @@ const SnkFormConfig = class {
|
|
576
590
|
});
|
577
591
|
}
|
578
592
|
else {
|
579
|
-
this.updateFieldsToSave();
|
593
|
+
this.updateFieldsToSave(this._sortableTimer);
|
580
594
|
}
|
581
595
|
}
|
582
596
|
checkGroupExists(newLabel, indexGroup, isTempGroup = false) {
|
@@ -622,7 +636,7 @@ const SnkFormConfig = class {
|
|
622
636
|
field.group = newLabel;
|
623
637
|
}
|
624
638
|
});
|
625
|
-
this.loadFields();
|
639
|
+
this.loadFields(this._sortableTimer);
|
626
640
|
this.controlFieldConfig();
|
627
641
|
this._formConfigChanged = true;
|
628
642
|
}
|
@@ -836,14 +850,14 @@ const SnkFormConfig = class {
|
|
836
850
|
this._formConfigChanged = true;
|
837
851
|
this.resetSortables();
|
838
852
|
}
|
839
|
-
controlRemoveFieldConfig(fieldConfig) {
|
853
|
+
controlRemoveFieldConfig(fieldConfig, updateTimer) {
|
840
854
|
var _a;
|
841
855
|
this._formConfigChanged = false;
|
842
856
|
if (fieldConfig == undefined) {
|
843
857
|
return;
|
844
858
|
}
|
845
859
|
this._formConfig.fields = (_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.filter((field) => field.name !== fieldConfig.name);
|
846
|
-
this.loadFields();
|
860
|
+
this.loadFields(updateTimer);
|
847
861
|
this.controlFieldConfig();
|
848
862
|
this._formConfigChanged = true;
|
849
863
|
this.resetSortables();
|
@@ -852,14 +866,14 @@ const SnkFormConfig = class {
|
|
852
866
|
this.controlSortableField();
|
853
867
|
this.controlSortableGroup();
|
854
868
|
}
|
855
|
-
handleFieldConfigChange(evt) {
|
869
|
+
handleFieldConfigChange(evt, updateTimer = 0) {
|
856
870
|
const { field: fieldConfig, type: actionType } = evt.detail;
|
857
871
|
if (actionType === ACTION_CONFIG.configuration) {
|
858
872
|
this.controlFieldConfig(fieldConfig);
|
859
873
|
return;
|
860
874
|
}
|
861
875
|
if (actionType === ACTION_CONFIG.remove) {
|
862
|
-
this.controlRemoveFieldConfig(fieldConfig);
|
876
|
+
this.controlRemoveFieldConfig(fieldConfig, updateTimer);
|
863
877
|
return;
|
864
878
|
}
|
865
879
|
if (actionType === ACTION_CONFIG.add) {
|
@@ -880,7 +894,7 @@ const SnkFormConfig = class {
|
|
880
894
|
tab.label = newLabel;
|
881
895
|
}
|
882
896
|
});
|
883
|
-
this.loadFields();
|
897
|
+
this.loadFields(this._sortableTimer);
|
884
898
|
this.controlFieldConfig();
|
885
899
|
this._formConfigChanged = true;
|
886
900
|
}
|
@@ -900,7 +914,7 @@ const SnkFormConfig = class {
|
|
900
914
|
this._formConfig.tabs = (_a = this._formConfig.tabs) === null || _a === void 0 ? void 0 : _a.filter((tab) => {
|
901
915
|
return tab.label !== tabSelected.detail.label;
|
902
916
|
});
|
903
|
-
this.loadFields();
|
917
|
+
this.loadFields(this._sortableTimer);
|
904
918
|
this.controlFieldConfig();
|
905
919
|
this._formConfigChanged = true;
|
906
920
|
}
|
@@ -913,7 +927,7 @@ const SnkFormConfig = class {
|
|
913
927
|
tab.visible = !tab.visible;
|
914
928
|
}
|
915
929
|
});
|
916
|
-
this.loadFields();
|
930
|
+
this.loadFields(this._sortableTimer);
|
917
931
|
this.controlFieldConfig();
|
918
932
|
this._formConfigChanged = true;
|
919
933
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { ElementIDUtils, ApplicationContext, StringUtils, DataType } from '@sankhyalabs/core';
|
3
3
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
4
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
4
|
+
import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
|
5
5
|
import { C as ConfigStorage } from './ConfigStorage-39ed8aeb.js';
|
6
6
|
import { P as PresentationMode } from './index-0ece87a6.js';
|
7
7
|
import { T as TaskbarProcessor, o as openFieldSearch, b as buildFieldSearch } from './field-search-efbe307f.js';
|
@@ -3,7 +3,7 @@ import { Action, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { S as SnkFormConfigManager } from './SnkFormConfigManager-dd450734.js';
|
4
4
|
import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
5
5
|
import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } from './field-search-efbe307f.js';
|
6
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
6
|
+
import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
|
7
7
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
8
8
|
import './DataFetcher-a650ae58.js';
|
9
9
|
import './pesquisa-fetcher-f05a12ca.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { S as snk_guides_viewer } from './snk-guides-viewer-
|
1
|
+
export { S as snk_guides_viewer } from './snk-guides-viewer-8b679ee6.js';
|
2
2
|
import './index-a7d3d3f1.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
4
|
import './SnkFormConfigManager-dd450734.js';
|
@@ -10,7 +10,7 @@ import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
10
|
import './filter-item-type.enum-d45e026f.js';
|
11
11
|
import '@sankhyalabs/ezui/dist/collection/utils/form';
|
12
12
|
import './field-search-efbe307f.js';
|
13
|
-
import './taskbar-elements-
|
13
|
+
import './taskbar-elements-2473c8ac.js';
|
14
14
|
import './index-0ece87a6.js';
|
15
15
|
import './index-bdf75557.js';
|
16
16
|
import './constants-8457af36.js';
|