@sankhyalabs/sankhyablocks 10.1.0-dev.1 → 10.1.0-dev.10
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/{ConfigStorage-5a73e979.js → ConfigStorage-5c0590b3.js} +2 -2
- package/dist/cjs/{DataFetcher-eeb3b0b7.js → DataFetcher-5181a917.js} +23 -2
- package/dist/cjs/{FormConfigHelper-ebb77625.js → FormConfigHelper-28fe4668.js} +44 -0
- package/dist/cjs/{ISave-861e9d6d.js → ISave-0f98a457.js} +4 -4
- package/dist/cjs/{SnkFormConfigManager-8d4fded8.js → SnkFormConfigManager-1907ffed.js} +7 -7
- package/dist/cjs/{SnkMultiSelectionListDataSource-3b93f6a6.js → SnkMultiSelectionListDataSource-e4e38139.js} +4 -4
- package/dist/cjs/{auth-fetcher-8d8acd69.js → auth-fetcher-cff55b1f.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-1cea0695.js → dataunit-fetcher-1ba5e2cc.js} +1 -1
- package/dist/cjs/field-config_2.cjs.entry.js +1 -1
- package/dist/cjs/fields-layout.cjs.entry.js +6 -3
- package/dist/cjs/fields-selector.cjs.entry.js +1 -1
- package/dist/cjs/{form-config-fetcher-f347f884.js → form-config-fetcher-4a679e23.js} +1 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +5 -3
- package/dist/cjs/index-1cf293c1.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +14 -7
- package/dist/cjs/snk-application.cjs.entry.js +81 -69
- package/dist/cjs/snk-attach.cjs.entry.js +5 -5
- package/dist/cjs/snk-crud.cjs.entry.js +97 -6
- package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +40 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-de248308.js → snk-data-unit-061487a8.js} +4 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-view.cjs.entry.js +2 -6
- package/dist/cjs/snk-form_2.cjs.entry.js +32 -9
- package/dist/cjs/snk-grid.cjs.entry.js +13 -10
- package/dist/cjs/{snk-guides-viewer-4ec3e7e1.js → snk-guides-viewer-2efe60a7.js} +84 -38
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +16 -5
- package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
- package/dist/cjs/snk-taskbar.cjs.entry.js +64 -48
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.js +27 -0
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +5 -25
- package/dist/collection/components/snk-application/snk-application.js +87 -44
- package/dist/collection/components/snk-attach/snk-attach.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +151 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +2 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +133 -34
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.css +3 -0
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.js +95 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +2 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +1 -1
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +42 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -6
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +6 -3
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -3
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +5 -3
- package/dist/collection/components/snk-form-config/snk-form-config.js +53 -6
- package/dist/collection/components/snk-grid/snk-grid.css +14 -0
- package/dist/collection/components/snk-grid/snk-grid.js +26 -4
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +9 -2
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +5 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +43 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +1 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +87 -48
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +7 -0
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +7 -0
- package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +8 -1
- package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +1 -1
- package/dist/components/DataFetcher.js +23 -2
- package/dist/components/ISave.js +3 -3
- package/dist/components/SnkFormConfigManager.js +6 -6
- package/dist/components/field-config2.js +43 -1
- package/dist/components/fields-layout2.js +6 -3
- package/dist/components/guides-configurator2.js +5 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-application2.js +76 -63
- package/dist/components/snk-attach2.js +1 -1
- package/dist/components/snk-crud.js +96 -1
- package/dist/components/snk-custom-slot-guide.d.ts +11 -0
- package/dist/components/snk-custom-slot-guide.js +55 -0
- package/dist/components/snk-data-unit2.js +2 -0
- package/dist/components/snk-detail-view2.js +81 -34
- package/dist/components/snk-filter-number.js +1 -1
- package/dist/components/snk-form-config2.js +29 -5
- package/dist/components/snk-form-view2.js +2 -6
- package/dist/components/snk-grid2.js +9 -4
- package/dist/components/snk-layout-form-config2.js +9 -2
- package/dist/components/snk-pesquisa2.js +14 -2
- package/dist/components/snk-simple-crud2.js +1 -1
- package/dist/components/snk-taskbar2.js +66 -49
- package/dist/esm/{ConfigStorage-568dc227.js → ConfigStorage-bd096633.js} +2 -2
- package/dist/esm/{DataFetcher-743feb3b.js → DataFetcher-5780ad39.js} +23 -2
- package/dist/esm/{FormConfigHelper-4e42f0b6.js → FormConfigHelper-d09669f3.js} +43 -1
- package/dist/esm/{ISave-345481c1.js → ISave-8a22ec18.js} +4 -4
- package/dist/esm/{SnkFormConfigManager-d61df0c8.js → SnkFormConfigManager-437e98bb.js} +7 -7
- package/dist/esm/{SnkMultiSelectionListDataSource-ca8d7a09.js → SnkMultiSelectionListDataSource-42125ef4.js} +4 -4
- package/dist/esm/{auth-fetcher-c353127d.js → auth-fetcher-28b9d0db.js} +1 -1
- package/dist/esm/{dataunit-fetcher-7f2c61ca.js → dataunit-fetcher-c4251d80.js} +1 -1
- package/dist/esm/field-config_2.entry.js +1 -1
- package/dist/esm/fields-layout.entry.js +6 -3
- package/dist/esm/fields-selector.entry.js +1 -1
- package/dist/esm/{form-config-fetcher-898d2dd1.js → form-config-fetcher-d0536a71.js} +1 -1
- package/dist/esm/guides-configurator.entry.js +5 -3
- package/dist/esm/index-479e1293.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +4 -4
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_9.entry.js +14 -7
- package/dist/esm/snk-application.entry.js +81 -69
- package/dist/esm/snk-attach.entry.js +5 -5
- package/dist/esm/snk-crud.entry.js +97 -6
- package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-60b338c5.js → snk-data-unit-4a1ef77f.js} +4 -2
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +7 -7
- package/dist/esm/snk-filter-bar_4.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form-view.entry.js +2 -6
- package/dist/esm/snk-form_2.entry.js +32 -9
- package/dist/esm/snk-grid.entry.js +13 -10
- package/dist/esm/{snk-guides-viewer-339e10b3.js → snk-guides-viewer-c182d058.js} +84 -38
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +16 -5
- package/dist/esm/snk-simple-crud.entry.js +7 -7
- package/dist/esm/snk-taskbar.entry.js +65 -49
- package/dist/sankhyablocks/{p-e6b1c769.entry.js → p-01ca59fc.entry.js} +1 -1
- package/dist/sankhyablocks/p-028fb380.entry.js +11 -0
- package/dist/sankhyablocks/{p-1f8cb438.entry.js → p-03f02b12.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1788d191.js → p-0e4f8b86.js} +1 -1
- package/dist/sankhyablocks/p-1037ea7b.entry.js +1 -0
- package/dist/sankhyablocks/{p-6d241415.js → p-1b1373b6.js} +1 -1
- package/dist/sankhyablocks/{p-27005fac.entry.js → p-2e882241.entry.js} +1 -1
- package/dist/sankhyablocks/p-30a58e29.entry.js +1 -0
- package/dist/sankhyablocks/{p-9f2cdaab.entry.js → p-35974f5f.entry.js} +1 -1
- package/dist/sankhyablocks/p-3b167a03.entry.js +1 -0
- package/dist/sankhyablocks/{p-e8c49c12.js → p-3c046287.js} +2 -2
- package/dist/sankhyablocks/{p-bd203e8d.entry.js → p-42272de8.entry.js} +1 -1
- package/dist/sankhyablocks/{p-11346b8d.entry.js → p-4c2e2767.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7fc46290.js → p-4db9dbf8.js} +1 -1
- package/dist/sankhyablocks/{p-626b7a17.js → p-55d7abe7.js} +1 -1
- package/dist/sankhyablocks/p-5d408e7e.entry.js +1 -0
- package/dist/sankhyablocks/{p-9b6d4950.entry.js → p-6e5af618.entry.js} +1 -1
- package/dist/sankhyablocks/{p-144da1d1.entry.js → p-78d4b3e3.entry.js} +1 -1
- package/dist/sankhyablocks/p-8b4d6719.js +1 -0
- package/dist/sankhyablocks/{p-e64958ba.entry.js → p-903fa0b4.entry.js} +1 -1
- package/dist/sankhyablocks/p-987cd79d.entry.js +1 -0
- package/dist/sankhyablocks/{p-88ed2793.js → p-9ab6ae1e.js} +2 -2
- package/dist/sankhyablocks/{p-c90f337a.entry.js → p-9f16d33e.entry.js} +1 -1
- package/dist/sankhyablocks/p-a1d23fef.js +1 -0
- package/dist/sankhyablocks/{p-bb0de89c.entry.js → p-a64ffe30.entry.js} +1 -1
- package/dist/sankhyablocks/p-aca74b21.js +1 -0
- package/dist/sankhyablocks/p-b7e891cc.entry.js +1 -0
- package/dist/sankhyablocks/{p-1d585081.js → p-b9699067.js} +1 -1
- package/dist/sankhyablocks/p-c98c79c3.entry.js +1 -0
- package/dist/sankhyablocks/p-d2ec9a24.entry.js +1 -0
- package/dist/sankhyablocks/{p-59b8f277.js → p-d3534985.js} +1 -1
- package/dist/sankhyablocks/{p-7b3ca294.entry.js → p-f3027bc9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f8f29e1a.entry.js → p-f35f2eb3.entry.js} +1 -1
- package/dist/sankhyablocks/p-fd05e31d.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.d.ts +5 -0
- package/dist/types/components/snk-application/snk-application.d.ts +9 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +22 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +23 -0
- package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +6 -1
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +1 -1
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +9 -2
- package/dist/types/components/snk-grid/snk-grid.d.ts +5 -0
- package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +2 -2
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +8 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +12 -4
- package/dist/types/components.d.ts +105 -0
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/sankhyablocks/p-0cf9aa38.js +0 -1
- package/dist/sankhyablocks/p-1649f51e.entry.js +0 -1
- package/dist/sankhyablocks/p-2c86cfab.entry.js +0 -1
- package/dist/sankhyablocks/p-4759912d.entry.js +0 -1
- package/dist/sankhyablocks/p-56948f00.entry.js +0 -11
- package/dist/sankhyablocks/p-8f73da95.js +0 -1
- package/dist/sankhyablocks/p-95c71f5e.entry.js +0 -1
- package/dist/sankhyablocks/p-9fe91526.js +0 -1
- package/dist/sankhyablocks/p-a5108625.entry.js +0 -1
- package/dist/sankhyablocks/p-aae4258d.entry.js +0 -1
- package/dist/sankhyablocks/p-af9d79e0.entry.js +0 -1
- package/dist/sankhyablocks/p-f25c50f7.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { Action, LockManager, LockManagerOperation, SilentException, StringUtils, ApplicationContext, OVERFLOWED_CLASS_NAME, OverflowWatcher, OverflowDirection
|
|
3
|
-
import { A as AuthorizationConfig } from './AuthorizationConfig.js';
|
|
2
|
+
import { Action, ElementIDUtils, LockManager, LockManagerOperation, SilentException, StringUtils, ApplicationContext, OVERFLOWED_CLASS_NAME, OverflowWatcher, OverflowDirection } from '@sankhyalabs/core';
|
|
4
3
|
import { P as PresentationMode } from './ISave.js';
|
|
4
|
+
import { A as AuthorizationConfig } from './AuthorizationConfig.js';
|
|
5
5
|
import { s as store } from './index2.js';
|
|
6
6
|
import { d as defineCustomElement$5 } from './snk-actions-button2.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './snk-data-exporter2.js';
|
|
@@ -144,9 +144,11 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
144
144
|
this.taskbarSaveUnlocker = createEvent(this, "taskbarSaveUnlocker", 7);
|
|
145
145
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
|
146
146
|
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
|
147
|
-
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
|
148
147
|
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
|
149
148
|
this.TASKBAR_CUSTOM_ELEMENTS = 'taskbar-custom-elements-container';
|
|
149
|
+
this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME = 'taskbar-additional-slot-container';
|
|
150
|
+
this.TASKBAR_ADDITIONAL_SLOT = 'taskbar-additional-slot-container';
|
|
151
|
+
this._dataUnitInitialized = false;
|
|
150
152
|
this._titleKeyByElement = {
|
|
151
153
|
[TaskbarElement.UPDATE_MULTIPLE]: "snkTaskbar.titleUpdateMultiple",
|
|
152
154
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
|
@@ -189,6 +191,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
189
191
|
this._isWaitingForSave = false;
|
|
190
192
|
this.alignRigth = false;
|
|
191
193
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
|
194
|
+
this.additionalSlotId = "TASKBAR_ADDITIONAL_SLOT";
|
|
192
195
|
this.customContainerId = undefined;
|
|
193
196
|
this.overflowStrategy = 'hiddenItems';
|
|
194
197
|
this.configName = undefined;
|
|
@@ -244,6 +247,17 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
244
247
|
this.taskbarSaveUnlocker.emit();
|
|
245
248
|
}
|
|
246
249
|
}
|
|
250
|
+
observeDataUnit(newValue) {
|
|
251
|
+
this.initializeDataUnit(newValue);
|
|
252
|
+
}
|
|
253
|
+
initializeDataUnit(dataUnit) {
|
|
254
|
+
if (!!dataUnit && !this._dataUnitInitialized) {
|
|
255
|
+
this._dataUnitInitialized = true;
|
|
256
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
257
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
258
|
+
this.dataUnit.subscribe(this.onSaveEvent);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
247
261
|
// Internal methods
|
|
248
262
|
elementsFromString(strButtons) {
|
|
249
263
|
const elements = [];
|
|
@@ -289,45 +303,46 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
289
303
|
}
|
|
290
304
|
elementClick(elem) {
|
|
291
305
|
LockManager.whenResolve(this._element, LockManagerOperation.TASKBAR_CLICK).then(() => {
|
|
292
|
-
if (this.dataUnit) {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
306
|
+
if (!this.dataUnit) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
switch (elem) {
|
|
310
|
+
case TaskbarElement.PREVIOUS:
|
|
311
|
+
this.dataUnit.previousRecord();
|
|
312
|
+
break;
|
|
313
|
+
case TaskbarElement.NEXT:
|
|
314
|
+
this.dataUnit.nextRecord();
|
|
315
|
+
break;
|
|
316
|
+
case TaskbarElement.REFRESH:
|
|
317
|
+
this.dataUnit.loadData();
|
|
318
|
+
break;
|
|
319
|
+
case TaskbarElement.CLONE:
|
|
320
|
+
this.dataUnit.copySelected();
|
|
321
|
+
break;
|
|
322
|
+
case TaskbarElement.REMOVE:
|
|
323
|
+
this.dataUnit.removeSelectedRecords();
|
|
324
|
+
break;
|
|
325
|
+
case TaskbarElement.INSERT:
|
|
326
|
+
this.dataUnit.addRecord();
|
|
327
|
+
break;
|
|
328
|
+
case TaskbarElement.CANCEL:
|
|
329
|
+
this.dataUnit.cancelEdition();
|
|
330
|
+
break;
|
|
331
|
+
case TaskbarElement.SAVE:
|
|
332
|
+
if (!this._isWaitingForSave) {
|
|
333
|
+
this._isWaitingForSave = true;
|
|
334
|
+
this.dataUnit.saveData().catch((err) => {
|
|
335
|
+
if (err instanceof SilentException) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
throw err;
|
|
340
|
+
}
|
|
341
|
+
}).finally(() => {
|
|
342
|
+
this._isWaitingForSave = false;
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
break;
|
|
331
346
|
}
|
|
332
347
|
if (this.isEnabled(elem))
|
|
333
348
|
this.actionClick.emit(elem);
|
|
@@ -509,7 +524,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
509
524
|
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
|
510
525
|
}
|
|
511
526
|
hasToIgnoreOverFlow(element) {
|
|
512
|
-
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME)
|
|
527
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME) ||
|
|
528
|
+
element.classList.contains(this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME);
|
|
513
529
|
}
|
|
514
530
|
handleOverFlowStrategy() {
|
|
515
531
|
if (this.overflowStrategy === 'hiddenItems') {
|
|
@@ -525,10 +541,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
525
541
|
};
|
|
526
542
|
}
|
|
527
543
|
componentDidLoad() {
|
|
528
|
-
|
|
529
|
-
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
544
|
+
this.initializeDataUnit(this.dataUnit);
|
|
530
545
|
this.handleOverFlowStrategy();
|
|
531
|
-
this.dataUnit.subscribe(this.onSaveEvent);
|
|
532
546
|
}
|
|
533
547
|
componentDidRender() {
|
|
534
548
|
this.appendCustomElementsInTaskbar();
|
|
@@ -555,7 +569,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
555
569
|
this._slotContainer.appendChild(customElement);
|
|
556
570
|
}
|
|
557
571
|
render() {
|
|
558
|
-
var _a;
|
|
572
|
+
var _a, _b;
|
|
559
573
|
if (this._definitions === undefined) {
|
|
560
574
|
return undefined;
|
|
561
575
|
}
|
|
@@ -575,7 +589,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
575
589
|
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
|
576
590
|
return h("slot", { name: elem });
|
|
577
591
|
})), h("div", { id: this.TASKBAR_CUSTOM_ELEMENTS, class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }), (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 :
|
|
578
|
-
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS))))
|
|
592
|
+
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS)), h("div", { id: this.TASKBAR_ADDITIONAL_SLOT, class: this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME }, h("slot", { name: this.additionalSlotId }), (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 :
|
|
593
|
+
_b.addNotOverFlowElement(this.TASKBAR_ADDITIONAL_SLOT))));
|
|
579
594
|
}
|
|
580
595
|
getHostClasses() {
|
|
581
596
|
if (this.overflowStrategy !== 'hiddenItems')
|
|
@@ -587,12 +602,14 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
587
602
|
"buttons": ["observeButtons"],
|
|
588
603
|
"disabledButtons": ["observeDisabledButtons"],
|
|
589
604
|
"_lastWidth": ["observeLastWidth"],
|
|
590
|
-
"_isWaitingForSave": ["observeIsWaitingForSave"]
|
|
605
|
+
"_isWaitingForSave": ["observeIsWaitingForSave"],
|
|
606
|
+
"dataUnit": ["observeDataUnit"]
|
|
591
607
|
}; }
|
|
592
608
|
static get style() { return snkTaskbarCss; }
|
|
593
609
|
}, [6, "snk-taskbar", {
|
|
594
610
|
"alignRigth": [4, "align-rigth"],
|
|
595
611
|
"customSlotId": [1, "custom-slot-id"],
|
|
612
|
+
"additionalSlotId": [1, "additional-slot-id"],
|
|
596
613
|
"customContainerId": [1, "custom-container-id"],
|
|
597
614
|
"overflowStrategy": [1, "overflow-strategy"],
|
|
598
615
|
"configName": [1, "config-name"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-
|
|
2
|
-
import { D as DataFetcher, d as dist } from './DataFetcher-
|
|
1
|
+
import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-d0536a71.js';
|
|
2
|
+
import { D as DataFetcher, d as dist } from './DataFetcher-5780ad39.js';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
4
4
|
import { ObjectUtils } from '@sankhyalabs/core';
|
|
5
5
|
|
|
@@ -7257,7 +7257,7 @@ const snkPesquisaMessages$2 = {
|
|
|
7257
7257
|
initialMessage: "Os resultados de sua pesquisa aparecerão aqui...",
|
|
7258
7258
|
resultsFoundSingular: "1 registro encontrado",
|
|
7259
7259
|
resultsFoundPlural: "{{COUNT}} registros encontrados",
|
|
7260
|
-
limitMessage: "
|
|
7260
|
+
limitMessage: "Esta pesquisa foi limitada, existem mais resultados."
|
|
7261
7261
|
},
|
|
7262
7262
|
viewMode: {
|
|
7263
7263
|
tableMode: "Modo grade",
|
|
@@ -7438,6 +7438,8 @@ const snkFormConfigMessages$2 = {
|
|
|
7438
7438
|
labelNewGroup: "Adicionar novo grupo",
|
|
7439
7439
|
mainArea: "Área principal",
|
|
7440
7440
|
tabGeneral: "Geral",
|
|
7441
|
+
canNotEditCustomGuide: "Não é possível editar guias detalhe e guias personalizadas",
|
|
7442
|
+
canNotEditDetailGuide: "Para realizar a configuração de uma tela de detalhes é necessário acessar a sua aba",
|
|
7441
7443
|
createNewGroup: "Criar novo grupo",
|
|
7442
7444
|
newGroup: "Criar novo grupo",
|
|
7443
7445
|
noGuideSelected: "Selecione uma guia e comece a configurar",
|
|
@@ -7465,6 +7467,10 @@ const snkFormConfigMessages$2 = {
|
|
|
7465
7467
|
title: "Atenção",
|
|
7466
7468
|
message: "Selecione uma guia para iniciar a configuração!"
|
|
7467
7469
|
},
|
|
7470
|
+
canNotAddFieldToGuide: {
|
|
7471
|
+
title: "Atenção",
|
|
7472
|
+
message: "Não é possível adicionar campos à guias customizadas ou guias detalhe!"
|
|
7473
|
+
},
|
|
7468
7474
|
alert: {
|
|
7469
7475
|
titleGroupExists: "Já existe um grupo com título",
|
|
7470
7476
|
titleGroupEditing: "Há um <b>grupo<b/> em edição. <br/> Finalize a edição para salvar as configurações.",
|
|
@@ -7495,10 +7501,11 @@ const snkFormConfigMessages$2 = {
|
|
|
7495
7501
|
createNewGuide: "Criar nova guia",
|
|
7496
7502
|
noHiddenGuides: "Nenhuma guia oculta",
|
|
7497
7503
|
noVisibleGuides: "Nenhuma guia visível",
|
|
7504
|
+
canNotDeleteCustomGuide: "Não é possível excluir guias detalhe e guias personalizadas",
|
|
7498
7505
|
actions: {
|
|
7499
7506
|
hide: "Ocultar",
|
|
7500
7507
|
show: "Tornar visível",
|
|
7501
|
-
delete: "Excluir"
|
|
7508
|
+
delete: "Excluir",
|
|
7502
7509
|
}
|
|
7503
7510
|
}
|
|
7504
7511
|
};
|
|
@@ -8296,6 +8303,8 @@ const snkFormConfigMessages$1 = {
|
|
|
8296
8303
|
labelNewGroup: "Add new group",
|
|
8297
8304
|
mainArea: "Main area",
|
|
8298
8305
|
tabGeneral: "General",
|
|
8306
|
+
canNotEditCustomGuide: "It is not possible to edit detail tabs and custom tabs",
|
|
8307
|
+
canNotEditDetailGuide: "To configure a detail screen, you must access its tab",
|
|
8299
8308
|
createNewGroup: "Create new group",
|
|
8300
8309
|
newGroup: "New group",
|
|
8301
8310
|
noGuideSelected: "Select a tab and start configuring",
|
|
@@ -8323,6 +8332,10 @@ const snkFormConfigMessages$1 = {
|
|
|
8323
8332
|
title: "Attention",
|
|
8324
8333
|
message: "Select a guide to start configuration!"
|
|
8325
8334
|
},
|
|
8335
|
+
canNotAddFieldToGuide: {
|
|
8336
|
+
title: "Attention",
|
|
8337
|
+
message: "It is not possible to add fields to detail tabs or custom tabs!"
|
|
8338
|
+
},
|
|
8326
8339
|
alert: {
|
|
8327
8340
|
titleGroupExists: "A group with this title already exists",
|
|
8328
8341
|
titleGroupEditing: "There is a <b>group<b/> being edited. <br/> Finish editing to save the settings.",
|
|
@@ -8353,6 +8366,7 @@ const snkFormConfigMessages$1 = {
|
|
|
8353
8366
|
createNewGuide: "Create new tab",
|
|
8354
8367
|
noHiddenGuides: "No hidden tabs",
|
|
8355
8368
|
noVisibleGuides: "No visible tabs",
|
|
8369
|
+
canNotDeleteCustomGuide: "Is not possible to detail detail tabs os a custom tabs",
|
|
8356
8370
|
actions: {
|
|
8357
8371
|
hide: "Hide",
|
|
8358
8372
|
show: "Make visible",
|
|
@@ -9154,6 +9168,8 @@ const snkFormConfigMessages = {
|
|
|
9154
9168
|
labelNewGroup: "Añadir nuevo grupo",
|
|
9155
9169
|
mainArea: "Área principal",
|
|
9156
9170
|
tabGeneral: "General",
|
|
9171
|
+
canNotEditCustomGuide: "No es posible editar pestañas de detalles y pestañas personalizadas",
|
|
9172
|
+
canNotEditDetailGuide: "Para realizar la configuración de una pantalla de detalles es necesario acceder a su pestaña",
|
|
9157
9173
|
createNewGroup: "Crear nuevo grupo",
|
|
9158
9174
|
newGroup: "Nuevo grupo",
|
|
9159
9175
|
noGuideSelected: "Seleccione una pestaña y comience a configurar",
|
|
@@ -9181,6 +9197,10 @@ const snkFormConfigMessages = {
|
|
|
9181
9197
|
title: "Atención",
|
|
9182
9198
|
message: "¡Seleccione una guía para iniciar la configuración!"
|
|
9183
9199
|
},
|
|
9200
|
+
canNotAddFieldToGuide: {
|
|
9201
|
+
title: "Atención",
|
|
9202
|
+
message: "¡No es posible agregar campos a pestañas de detalles o pestañas personalizadas!"
|
|
9203
|
+
},
|
|
9184
9204
|
alert: {
|
|
9185
9205
|
titleGroupExists: "Ya existe un grupo con título",
|
|
9186
9206
|
titleGroupEditing: "Hay un <b>grupo<b/> en edición. <br/> Finalice la edición para guardar las configuraciones.",
|
|
@@ -9211,6 +9231,7 @@ const snkFormConfigMessages = {
|
|
|
9211
9231
|
createNewGuide: "Crear nueva pestaña",
|
|
9212
9232
|
noHiddenGuides: "No hay pestañas ocultas",
|
|
9213
9233
|
noVisibleGuides: "No hay pestañas visibles",
|
|
9234
|
+
canNotDeleteCustomGuide: "No es posible eliminar pestañas de detalles o pestañas personalizadas",
|
|
9214
9235
|
actions: {
|
|
9215
9236
|
hide: "Ocultar",
|
|
9216
9237
|
show: "Hacer visible",
|
|
@@ -109,6 +109,48 @@ function buildGuides(config, mainArea) {
|
|
|
109
109
|
tabs = initializeTabsNames(tabs);
|
|
110
110
|
return handleMainTab(tabs, mainArea);
|
|
111
111
|
}
|
|
112
|
+
function buildChildrenGuides(dataUnit, initialOrderIndex = 0, guidesList) {
|
|
113
|
+
var _a;
|
|
114
|
+
if (!dataUnit || !dataUnit.metadata) {
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
117
|
+
const children = ((_a = dataUnit.metadata) === null || _a === void 0 ? void 0 : _a.children) || [];
|
|
118
|
+
const childrenWithNoGuide = [];
|
|
119
|
+
for (const child of children) {
|
|
120
|
+
const guideOnConfig = guidesList.find(guide => child.label === guide.label);
|
|
121
|
+
if (guideOnConfig) {
|
|
122
|
+
guideOnConfig.isCustom = true;
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
childrenWithNoGuide.push({
|
|
126
|
+
label: child.label,
|
|
127
|
+
name: child.name,
|
|
128
|
+
visible: true,
|
|
129
|
+
isCustom: true,
|
|
130
|
+
order: initialOrderIndex++
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return childrenWithNoGuide;
|
|
134
|
+
}
|
|
135
|
+
function buildCustomGuides(customGuidesList, guidesList) {
|
|
136
|
+
let initialOrderIndex = guidesList.length;
|
|
137
|
+
const customGuidesToAdd = getCustomGuidesNotIncludedInList(customGuidesList, guidesList);
|
|
138
|
+
return customGuidesToAdd.map(guide => {
|
|
139
|
+
return {
|
|
140
|
+
name: guide.id,
|
|
141
|
+
label: guide.label,
|
|
142
|
+
visible: true,
|
|
143
|
+
isCustom: true,
|
|
144
|
+
order: initialOrderIndex++
|
|
145
|
+
};
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
function isCustomGuideIncludedInList(guidesList, guide) {
|
|
149
|
+
return guidesList.some(fromList => fromList.name === guide.id || fromList.label === guide.label);
|
|
150
|
+
}
|
|
151
|
+
function getCustomGuidesNotIncludedInList(customGuidesList, guidesList) {
|
|
152
|
+
return customGuidesList.filter(guide => !isCustomGuideIncludedInList(guidesList, guide));
|
|
153
|
+
}
|
|
112
154
|
function handleFieldsTabNames(allFields) {
|
|
113
155
|
// Campos que não fazem parte de nenhuma aba ou da aba "Geral", devem ser movidos para a aba __main.
|
|
114
156
|
return allFields.map(field => {
|
|
@@ -244,4 +286,4 @@ function buildFieldToSave(fieldConfig) {
|
|
|
244
286
|
return fieldToSave;
|
|
245
287
|
}
|
|
246
288
|
|
|
247
|
-
export { ID_AVAILABLE_FIELDS as I, SORTABLE_PATH as S,
|
|
289
|
+
export { ID_AVAILABLE_FIELDS as I, SORTABLE_PATH as S, buildChildrenGuides as a, buildGuides as b, buildCustomGuides as c, buildGuidesMap as d, buildNewGuideName as e, getFieldsStructure as f, getFieldsToSave as g, getValidatedFieldValue as h, getEnabledByProperty as i, getValueByProperty as j, getIconName as k, updateTabInFieldsFromGroupList as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserInterface, DataType, ApplicationContext, ErrorException } from '@sankhyalabs/core';
|
|
2
|
-
import { d as dist, D as DataFetcher } from './DataFetcher-
|
|
2
|
+
import { d as dist, D as DataFetcher } from './DataFetcher-5780ad39.js';
|
|
3
3
|
|
|
4
4
|
function buildGridMetadata(rawValue) {
|
|
5
5
|
const fieldsMetadata = buildFieldsMetadata(rawValue.fieldsMetadata);
|
|
@@ -162,7 +162,7 @@ class PesquisaFetcher {
|
|
|
162
162
|
return result;
|
|
163
163
|
}
|
|
164
164
|
loadAdvancedSearch(entityName, argument, criteria, searchOptions, codeValue) {
|
|
165
|
-
var _a, _b, _c, _d, _e;
|
|
165
|
+
var _a, _b, _c, _d, _e, _f;
|
|
166
166
|
const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
|
|
167
167
|
const values = {
|
|
168
168
|
argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
|
|
@@ -201,11 +201,11 @@ class PesquisaFetcher {
|
|
|
201
201
|
};
|
|
202
202
|
}
|
|
203
203
|
const options = searchOptions != undefined
|
|
204
|
-
? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
|
|
204
|
+
? Object.assign(Object.assign({}, values === null || values === void 0 ? void 0 : values.searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true, "limit": searchOptions.limit }) : undefined;
|
|
205
205
|
const reqBody = {
|
|
206
206
|
"serviceName": serviceName,
|
|
207
207
|
"requestBody": {
|
|
208
|
-
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": this._defaultPageSize, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (
|
|
208
|
+
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": (_e = options === null || options === void 0 ? void 0 : options.limit) !== null && _e !== void 0 ? _e : this._defaultPageSize, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_f = values.searchOptions) === null || _f === void 0 ? void 0 : _f.rootEntity }, { options }),
|
|
209
209
|
"clientEventList": {
|
|
210
210
|
"clientEvent": []
|
|
211
211
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as ConfigStorage } from './ConfigStorage-568dc227.js';
|
|
2
1
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
3
|
-
import {
|
|
2
|
+
import { C as ConfigStorage } from './ConfigStorage-bd096633.js';
|
|
3
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-d0536a71.js';
|
|
4
4
|
import { a as TAB_NAMES } from './constants-7b422de0.js';
|
|
5
5
|
|
|
6
6
|
class SnkFormConfigManager {
|
|
@@ -83,7 +83,7 @@ class SnkFormConfigManager {
|
|
|
83
83
|
return false;
|
|
84
84
|
}
|
|
85
85
|
getFieldsList(descriptionFilter, forceEmptyConfig = false) {
|
|
86
|
-
var _a;
|
|
86
|
+
var _a, _b;
|
|
87
87
|
const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
|
|
88
88
|
const hasConfig = this.hasConfig();
|
|
89
89
|
if (hasConfig && !forceEmptyConfig) {
|
|
@@ -99,7 +99,7 @@ class SnkFormConfigManager {
|
|
|
99
99
|
})
|
|
100
100
|
.filter(field => this.isFieldVisible(field, descriptionFilter));
|
|
101
101
|
}
|
|
102
|
-
if (!this._dataUnit) {
|
|
102
|
+
if (!this._dataUnit || !((_b = this._dataUnit.metadata) === null || _b === void 0 ? void 0 : _b.fields)) {
|
|
103
103
|
return [];
|
|
104
104
|
}
|
|
105
105
|
const filteredFields = this._dataUnit.metadata.fields
|
|
@@ -179,7 +179,7 @@ class SnkFormConfigManager {
|
|
|
179
179
|
return Array.isArray(object) ? object : [object];
|
|
180
180
|
}
|
|
181
181
|
buildFormMetadataUITabs(config, forceEmptyConfig = false) {
|
|
182
|
-
var _a;
|
|
182
|
+
var _a, _b, _c;
|
|
183
183
|
const hasConfig = this.hasConfig(config);
|
|
184
184
|
if (!forceEmptyConfig && (!this._dataUnit || hasConfig)) {
|
|
185
185
|
return config;
|
|
@@ -188,10 +188,10 @@ class SnkFormConfigManager {
|
|
|
188
188
|
config.tabs = this.parseObjectList(config.tabs);
|
|
189
189
|
config.emptyConfig = false;
|
|
190
190
|
config.defaultConfiguration = true;
|
|
191
|
-
const fields = this._dataUnit.metadata.fields;
|
|
191
|
+
const fields = (_b = (_a = this._dataUnit.metadata) === null || _a === void 0 ? void 0 : _a.fields) !== null && _b !== void 0 ? _b : [];
|
|
192
192
|
for (const currentField of fields) {
|
|
193
193
|
const field = config.fields.find(field => field.name === currentField.name);
|
|
194
|
-
const uiTabName = (
|
|
194
|
+
const uiTabName = (_c = currentField.properties) === null || _c === void 0 ? void 0 : _c.UITabName;
|
|
195
195
|
if (!uiTabName || uiTabName === TAB_NAMES.main) {
|
|
196
196
|
continue;
|
|
197
197
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { D as DataFetcher } from './DataFetcher-
|
|
2
|
-
import './ISave-
|
|
1
|
+
import { D as DataFetcher } from './DataFetcher-5780ad39.js';
|
|
2
|
+
import './ISave-8a22ec18.js';
|
|
3
3
|
import { SortMode, ApplicationContext, ObjectUtils, StringUtils, NumberUtils, DataType, UserInterface as UserInterface$1, DateUtils } from '@sankhyalabs/core';
|
|
4
4
|
import { D as DataExporterOption } from './index-b40568ff.js';
|
|
5
5
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
6
6
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
7
|
-
import { P as PreloadManager } from './dataunit-fetcher-
|
|
7
|
+
import { P as PreloadManager } from './dataunit-fetcher-c4251d80.js';
|
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
|
9
|
-
import './form-config-fetcher-
|
|
9
|
+
import './form-config-fetcher-d0536a71.js';
|
|
10
10
|
import './constants-7b422de0.js';
|
|
11
11
|
import { h } from './index-479e1293.js';
|
|
12
12
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ObjectUtils } from '@sankhyalabs/core';
|
|
2
|
-
import { R as ResourceFetcher } from './form-config-fetcher-
|
|
2
|
+
import { R as ResourceFetcher } from './form-config-fetcher-d0536a71.js';
|
|
3
3
|
|
|
4
4
|
class AuthFetcher extends ResourceFetcher {
|
|
5
5
|
getData(resourceID) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ObjectUtils, DataUnit, DataUnitInMemoryLoader, ApplicationContext, StringUtils, UserInterface, DataUnitStorage, DataType, ChangeOperation } from '@sankhyalabs/core';
|
|
2
|
-
import { D as DataFetcher, S as SnkMessageBuilder, d as dist } from './DataFetcher-
|
|
2
|
+
import { D as DataFetcher, S as SnkMessageBuilder, d as dist } from './DataFetcher-5780ad39.js';
|
|
3
3
|
import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
4
4
|
import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
5
5
|
import { ColumnFilterManager } from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
@@ -3,7 +3,7 @@ import { UserInterface, StringUtils, ObjectUtils, ApplicationContext } from '@sa
|
|
|
3
3
|
import { b as VARS_BY_TYPE, D as DEFAULT_TYPE, c as TAGS_BY_TYPE } from './constants-7b422de0.js';
|
|
4
4
|
import { getConvertedValue } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
5
5
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
6
|
-
import {
|
|
6
|
+
import { h as getValidatedFieldValue, i as getEnabledByProperty, j as getValueByProperty, k as getIconName } from './FormConfigHelper-d09669f3.js';
|
|
7
7
|
|
|
8
8
|
const fieldConfigCss = ".field-config-container.sc-field-config{font-family:'Roboto';color:#2b3a54;display:flex;flex-direction:column;gap:10px;width:330px;justify-content:space-between}.header.sc-field-config{display:flex;font-weight:500;font-size:16px}.actions.sc-field-config{display:flex;align-items:flex-end;gap:12px}";
|
|
9
9
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-479e1293.js';
|
|
2
2
|
import { StringUtils, ObjectUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
4
|
import { S as Sortable } from './sortable.esm-842f85a3.js';
|
|
4
|
-
import { S as SORTABLE_PATH, d as getFieldsStructure, I as ID_AVAILABLE_FIELDS } from './FormConfigHelper-4e42f0b6.js';
|
|
5
5
|
import { a as TAB_NAMES, G as GROUP_NAMES } from './constants-7b422de0.js';
|
|
6
|
-
import {
|
|
6
|
+
import { S as SORTABLE_PATH, f as getFieldsStructure, I as ID_AVAILABLE_FIELDS } from './FormConfigHelper-d09669f3.js';
|
|
7
7
|
|
|
8
|
-
const fieldsLayoutCss = ".sc-fields-layout-h{display:flex;padding:12px;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);flex-direction:column}.layout-container.sc-fields-layout{container-type:inline-size;display:flex;flex-direction:column;overflow:auto;height:calc(100vh - 225px)}.guide-header.sc-fields-layout{display:flex;width:100%;font-size:20px;border-bottom:1px solid #dce0e8;margin-bottom:6px;align-items:center;height:45px}.guide-header.sc-fields-layout ez-button.sc-fields-layout{transition:all 0.2s ease-in-out;visibility:hidden;opacity:0}.guide-header.sc-fields-layout:hover ez-button.sc-fields-layout{visibility:visible;opacity:1}.guide-header-label.sc-fields-layout{display:block;padding:10px 0}.group-config.sc-fields-layout{padding:12px 0;display:flex;flex-direction:column;width:100%}.group-content.sc-fields-layout{display:grid;gap:12px;min-height:65px;width:100%;padding:6px 0;grid-template-columns:repeat(auto-fill, minmax(250px, 1fr))}.group-content.empty-content.sc-fields-layout{position:relative}.group-content.empty-content.sc-fields-layout::before{content:var(--empty-content-message, \"Arraste e solte um campo aqui\");color:#cbcfd7;font-size:16px;font-weight:500;text-align:center;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;transition:opacity 0.3s;height:100%;box-sizing:border-box;padding:10px;background:#f9f9f9;border:1px dashed #dce0e8;border-radius:6px}.no-group-container.sc-fields-layout{padding:12px 0;width:100%;border-bottom:1px solid #dce0e8}.no-group-container.sc-fields-layout::before{content:var(--no-group-message, \"Inclua estes campos nos grupos ou deixe-os separados no topo do formulário\");width:100%;display:block;font-size:16px;font-weight:400;color:#AFB6C0;padding-bottom:12px}.add-group-container.sc-fields-layout{display:flex;align-items:center;border-top:1px solid #dce0e8;padding-top:22px;padding-bottom:12px;gap:6px;cursor:pointer;justify-content:center;width:100%;height:55px}.no-guide-selected.sc-fields-layout{display:block;margin:auto;font-size:24px;color:#AFB6C0;font-weight:500}.ghost.sc-fields-layout{opacity:.5;background:#c8fbe2}";
|
|
8
|
+
const fieldsLayoutCss = ".sc-fields-layout-h{display:flex;padding:12px;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);flex-direction:column}.layout-container.sc-fields-layout{container-type:inline-size;display:flex;flex-direction:column;overflow:auto;height:calc(100vh - 225px)}.guide-header.sc-fields-layout{display:flex;width:100%;font-size:20px;border-bottom:1px solid #dce0e8;margin-bottom:6px;align-items:center;height:45px}.guide-header.sc-fields-layout ez-button.sc-fields-layout{transition:all 0.2s ease-in-out;visibility:hidden;opacity:0}.guide-header.sc-fields-layout:hover ez-button.sc-fields-layout{visibility:visible;opacity:1}.guide-header-label.sc-fields-layout{display:block;padding:10px 0}.group-config.sc-fields-layout{padding:12px 0;display:flex;flex-direction:column;width:100%}.group-content.sc-fields-layout{display:grid;gap:12px;min-height:65px;width:100%;padding:6px 0;grid-template-columns:repeat(auto-fill, minmax(250px, 1fr))}.group-content.empty-content.sc-fields-layout{position:relative}.group-content.empty-content.sc-fields-layout::before{content:var(--empty-content-message, \"Arraste e solte um campo aqui\");color:#cbcfd7;font-size:16px;font-weight:500;text-align:center;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;transition:opacity 0.3s;height:100%;box-sizing:border-box;padding:10px;background:#f9f9f9;border:1px dashed #dce0e8;border-radius:6px}.no-group-container.sc-fields-layout{padding:12px 0;width:100%;border-bottom:1px solid #dce0e8}.no-group-container.sc-fields-layout::before{content:var(--no-group-message, \"Inclua estes campos nos grupos ou deixe-os separados no topo do formulário\");width:100%;display:block;font-size:16px;font-weight:400;color:#AFB6C0;padding-bottom:12px}.add-group-container.sc-fields-layout{display:flex;align-items:center;border-top:1px solid #dce0e8;padding-top:22px;padding-bottom:12px;gap:6px;cursor:pointer;justify-content:center;width:100%;height:55px}.no-guide-selected.sc-fields-layout{display:block;margin:auto;font-size:24px;color:#AFB6C0;font-weight:500}.message-container.sc-fields-layout{margin:auto;display:flex;flex-direction:column;justify-content:center;align-items:center}.message-config-detail.sc-fields-layout{display:block;margin:auto;font-size:var(--font-size--medium, 16px);color:#AFB6C0;font-weight:var(--font-weight--medium, 500)}.ghost.sc-fields-layout{opacity:.5;background:#c8fbe2}";
|
|
9
9
|
|
|
10
10
|
const FieldLayoutComponent = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -329,6 +329,9 @@ const FieldLayoutComponent = class {
|
|
|
329
329
|
if (!this.selectedGuide) {
|
|
330
330
|
return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, h("span", { class: 'no-guide-selected' }, this.getMessage('snkFormConfig.form.noGuideSelected'))));
|
|
331
331
|
}
|
|
332
|
+
if (this.selectedGuide.isCustom || this.selectedGuide.isDetail) {
|
|
333
|
+
return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, h("div", { class: 'message-container' }, h("h1", { class: 'no-guide-selected' }, this.getMessage('snkFormConfig.form.canNotEditCustomGuide')), h("span", { class: 'message-config-detail' }, this.getMessage('snkFormConfig.form.canNotEditDetailGuide')))));
|
|
334
|
+
}
|
|
332
335
|
return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, this.renderGuideName(), h("div", { class: 'layout-container' }, h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { class: 'no-group-container' }, h("div", { id: GROUP_NAMES.noGroup, class: 'group-content', "data-group-name": GROUP_NAMES.noGroup }, this.renderFixedFields())), h("hr", null), h("div", { id: this.ID_GROUPS, class: 'groups-container' }, this.renderDraggableGroups()))), h("div", { class: 'add-group-container', onClick: this.handleAddGroup.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus" }), h("span", null, this.getMessage('snkFormConfig.form.createNewGroup')))));
|
|
333
336
|
}
|
|
334
337
|
get el() { return getElement(this); }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-479e1293.js';
|
|
2
2
|
import { S as Sortable } from './sortable.esm-842f85a3.js';
|
|
3
|
-
import { I as ID_AVAILABLE_FIELDS } from './FormConfigHelper-
|
|
3
|
+
import { I as ID_AVAILABLE_FIELDS } from './FormConfigHelper-d09669f3.js';
|
|
4
4
|
import { ArrayUtils } from '@sankhyalabs/core';
|
|
5
5
|
import './constants-7b422de0.js';
|
|
6
6
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-479e1293.js';
|
|
2
|
-
import { S as Sortable } from './sortable.esm-842f85a3.js';
|
|
3
2
|
import { ObjectUtils, ArrayUtils } from '@sankhyalabs/core';
|
|
4
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
+
import { S as Sortable } from './sortable.esm-842f85a3.js';
|
|
5
5
|
import { a as TAB_NAMES } from './constants-7b422de0.js';
|
|
6
6
|
|
|
7
|
-
const guidesConfiguratorCss = ".ezSidebarNavigator.sc-guides-configurator{--ez-sidebar-navigator--height:calc(100vh - 118px)}.navigator-container.sc-guides-configurator{height:calc(100vh - 175px);display:flex;flex-direction:column;justify-content:space-between}.collapsible-container.sc-guides-configurator{display:flex;flex-direction:column;gap:12px;flex-grow:1;max-height:calc(100vh - 240px);overflow:auto}.collapsible-item.sc-guides-configurator{padding:6px;border-radius:6px;border:1px solid #dce0e8}.add-button-container.sc-guides-configurator{display:flex;align-items:center;border-top:1px solid #dce0e8;padding-top:22px;gap:6px;cursor:pointer;justify-content:center}.add-button-container.sc-guides-configurator span.sc-guides-configurator{display:block}.guide-list.sc-guides-configurator{display:flex;flex-direction:column;width:100%;min-height:10px}.guide-list.hidden-empty-content.sc-guides-configurator::before{content:var(--no-hidden-guides-message, \"Nenhuma guia oculta\");display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.guide-list.visible-empty-content.sc-guides-configurator::before{content:var(--no-visible-guides-message, \"Nenhuma guia visível\");display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.item-label.sc-guides-configurator{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-grow:1}.guide-item.sc-guides-configurator{margin:0 3px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:5px 10px;border-radius:6px;transition:all 0.2s ease-in-out;height:32px}.guide-item.sc-guides-configurator .actions.sc-guides-configurator{display:flex;gap:8px;transition:0.2s ease-in-out;
|
|
7
|
+
const guidesConfiguratorCss = ".ezSidebarNavigator.sc-guides-configurator{--ez-sidebar-navigator--height:calc(100vh - 118px)}.navigator-container.sc-guides-configurator{height:calc(100vh - 175px);display:flex;flex-direction:column;justify-content:space-between}.collapsible-container.sc-guides-configurator{display:flex;flex-direction:column;gap:12px;flex-grow:1;max-height:calc(100vh - 240px);overflow:auto}.collapsible-item.sc-guides-configurator{padding:6px;border-radius:6px;border:1px solid #dce0e8}.add-button-container.sc-guides-configurator{display:flex;align-items:center;border-top:1px solid #dce0e8;padding-top:22px;gap:6px;cursor:pointer;justify-content:center}.add-button-container.sc-guides-configurator span.sc-guides-configurator{display:block}.guide-list.sc-guides-configurator{display:flex;flex-direction:column;width:100%;min-height:10px}.guide-list.hidden-empty-content.sc-guides-configurator::before{content:var(--no-hidden-guides-message, \"Nenhuma guia oculta\");display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.guide-list.visible-empty-content.sc-guides-configurator::before{content:var(--no-visible-guides-message, \"Nenhuma guia visível\");display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.item-label.sc-guides-configurator{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-grow:1}.guide-item.sc-guides-configurator{margin:0 3px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:5px 10px;border-radius:6px;transition:all 0.2s ease-in-out;height:32px}.guide-item.sc-guides-configurator .actions.sc-guides-configurator{display:flex;gap:8px;transition:opacity 0.2s ease-in-out;display:none;opacity:0}.guide-item.sc-guides-configurator:hover .actions.sc-guides-configurator{display:flex;opacity:1}ez-button.sc-guides-configurator{width:24px;align-items:center;justify-content:center;display:flex}.ghost.sc-guides-configurator{opacity:.5;background:#e2eaf4}.main-guide.sc-guides-configurator{padding:12px;margin:12px 0;border:1px solid #dce0e8;border-radius:6px;transition:all 0.2s ease-in-out}.guide-item.selected.sc-guides-configurator,.main-guide.selected.sc-guides-configurator{background:#E2F4EF}.guide-item.sc-guides-configurator:hover,.main-guide.sc-guides-configurator:hover{background:#f5fcfa}";
|
|
8
8
|
|
|
9
9
|
const GuidesConfigurator = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -100,7 +100,9 @@ const GuidesConfigurator = class {
|
|
|
100
100
|
var _a;
|
|
101
101
|
return (h("div", { key: guide.name, "data-guide-name": guide.name, title: guide.label, class: `guide-item ${((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.label) === guide.label ? 'selected' : ''} ${this.filterTerm.length ? 'disable-sort' : ''}`, onClick: e => this.handleSelectGuide(guide, e) }, h("span", null, h("ez-icon", { iconName: "drag-indicator", class: 'ez-margin-right--small' })), h("span", { class: 'item-label' }, guide.label), h("div", { class: 'actions' }, h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.toggleGuideVisibility(guide, e), size: "medium", iconName: guide.visible ? 'eye-off' : 'eye', title: guide.visible ?
|
|
102
102
|
this.getMessage('snkFormConfig.guidesConfigurator.actions.hide') :
|
|
103
|
-
this.getMessage('snkFormConfig.guidesConfigurator.actions.show') }), h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.handleDeleteGuide(guide, e), size: "medium", iconName: 'delete', title:
|
|
103
|
+
this.getMessage('snkFormConfig.guidesConfigurator.actions.show') }), h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.handleDeleteGuide(guide, e), size: "medium", isDisabled: guide.isCustom || guide.isDetail, iconName: 'delete', title: guide.isCustom || guide.isDetail ?
|
|
104
|
+
this.getMessage('snkFormConfig.guidesConfigurator.canNotDeleteCustomGuide') :
|
|
105
|
+
this.getMessage('snkFormConfig.guidesConfigurator.actions.delete') }))));
|
|
104
106
|
});
|
|
105
107
|
}
|
|
106
108
|
getContainerElement(id) {
|
|
@@ -2104,6 +2104,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2104
2104
|
return import(
|
|
2105
2105
|
/* webpackMode: "lazy" */
|
|
2106
2106
|
'./snk-custom-slot-elements.entry.js').then(processMod, consoleError);
|
|
2107
|
+
case 'snk-custom-slot-guide':
|
|
2108
|
+
return import(
|
|
2109
|
+
/* webpackMode: "lazy" */
|
|
2110
|
+
'./snk-custom-slot-guide.entry.js').then(processMod, consoleError);
|
|
2107
2111
|
case 'snk-entity-list':
|
|
2108
2112
|
return import(
|
|
2109
2113
|
/* webpackMode: "lazy" */
|