@sankhyalabs/sankhyablocks 10.1.0-dev.37 → 10.1.0-dev.39
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-e384fb7b.js → ConfigStorage-a1fab5ca.js} +2 -2
- package/dist/cjs/ContinuousInsertUtils-1ae0c6ac.js +41 -0
- package/dist/cjs/{DataFetcher-3a8ea521.js → DataFetcher-384d2ce8.js} +1 -1
- package/dist/cjs/{ISave-a66bb65e.js → ISave-ecbe9336.js} +1 -1
- package/dist/cjs/{ImageUtils-5e3f406b.js → ImageUtils-c46f2d11.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-73df0f8b.js → SnkFormConfigManager-44386305.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-d9558dba.js → SnkMessageBuilder-a9300ebe.js} +24 -0
- package/dist/cjs/{SnkMultiSelectionListDataSource-016393f3.js → SnkMultiSelectionListDataSource-b951ed91.js} +61 -47
- package/dist/cjs/{auth-fetcher-80e608b0.js → auth-fetcher-6b134ec4.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-6febd6c4.js → dataunit-fetcher-93f53260.js} +2 -2
- package/dist/cjs/{form-config-fetcher-81cbd405.js → form-config-fetcher-45d1964c.js} +1 -1
- package/dist/cjs/index-1894343a.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_8.cjs.entry.js → snk-actions-button_9.cjs.entry.js} +52 -12
- package/dist/cjs/snk-application.cjs.entry.js +7 -7
- package/dist/cjs/snk-attach.cjs.entry.js +50 -24
- package/dist/cjs/snk-crud.cjs.entry.js +344 -109
- package/dist/cjs/snk-data-exporter.cjs.entry.js +8 -7
- package/dist/cjs/{snk-data-unit-94757628.js → snk-data-unit-6abc5efc.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +11 -16
- package/dist/cjs/snk-entity-search.cjs.entry.js +211 -0
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/{snk-filter-advanced-mode_2.cjs.entry.js → snk-filter-advanced-mode_3.cjs.entry.js} +39 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +106 -95
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +4 -4
- package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +5 -5
- package/dist/cjs/snk-grid.cjs.entry.js +40 -17
- package/dist/cjs/{snk-guides-viewer-688c4398.js → snk-guides-viewer-b4ca3437.js} +37 -153
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -17
- package/dist/cjs/snk-image-input.cjs.entry.js +2 -2
- package/dist/cjs/snk-layout-form-config.cjs.entry.js +5 -5
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +5 -5
- package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
- package/dist/cjs/snk-simple-crud.cjs.entry.js +12 -12
- package/dist/cjs/snk-taskbar.cjs.entry.js +181 -124
- package/dist/cjs/taskbar-elements-80eddec8.js +152 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -3
- package/dist/collection/components/snk-attach/snk-attach.css +29 -7
- package/dist/collection/components/snk-attach/snk-attach.js +81 -18
- package/dist/collection/components/snk-crud/snk-crud.css +46 -0
- package/dist/collection/components/snk-crud/snk-crud.js +143 -94
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -5
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.css +17 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.js +330 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +22 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +35 -144
- package/dist/collection/components/snk-crud/utils/taskbarUtils.js +144 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +20 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +2 -2
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +23 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +6 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +8 -5
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +139 -84
- package/dist/collection/components/snk-grid/snk-grid.css +12 -3
- package/dist/collection/components/snk-grid/snk-grid.js +148 -4
- package/dist/collection/components/snk-image-input/utils/ImageUtils.js +1 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +8 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +38 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +51 -35
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +27 -1
- package/dist/collection/components/snk-taskbar/processor/simple-taskbar-processor.js +55 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +44 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +248 -132
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.css +12 -0
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.js +19 -0
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +8 -0
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +8 -0
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +8 -0
- package/dist/components/ContinuousInsertUtils.js +1 -1
- package/dist/components/SnkMessageBuilder.js +24 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/snk-actions-button2.js +6 -3
- package/dist/components/snk-attach2.js +56 -27
- package/dist/components/snk-crud.js +422 -175
- package/dist/components/snk-data-exporter2.js +3 -1
- package/dist/components/snk-detail-view2.js +158 -258
- package/dist/components/snk-entity-search.d.ts +11 -0
- package/dist/components/snk-entity-search.js +6 -0
- package/dist/components/snk-entity-search2.js +231 -0
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +94 -85
- package/dist/components/snk-filter-item2.js +4 -2
- package/dist/components/snk-filter-modal2.js +8 -5
- package/dist/components/snk-grid2.js +82 -47
- package/dist/components/snk-image-input2.js +1 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-simple-crud2.js +29 -23
- package/dist/components/snk-taskbar-skeleton.d.ts +11 -0
- package/dist/components/snk-taskbar-skeleton.js +6 -0
- package/dist/components/snk-taskbar-skeleton2.js +29 -0
- package/dist/components/snk-taskbar2.js +253 -174
- package/dist/components/taskbar-actions-button2.js +21 -2
- package/dist/components/taskbar-split-button2.js +10 -1
- package/dist/esm/{ConfigStorage-82ff76fb.js → ConfigStorage-76872695.js} +2 -2
- package/dist/esm/ContinuousInsertUtils-bce77dc1.js +39 -0
- package/dist/esm/{DataFetcher-1dd7e8c0.js → DataFetcher-e60f8d53.js} +1 -1
- package/dist/esm/{ISave-498c4831.js → ISave-4929c071.js} +1 -1
- package/dist/esm/{ImageUtils-8fc8d905.js → ImageUtils-7f3a4149.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-e8ae1561.js → SnkFormConfigManager-83f6b22f.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-c0bc4424.js → SnkMessageBuilder-1eb7a1af.js} +24 -0
- package/dist/esm/{SnkMultiSelectionListDataSource-ec783ded.js → SnkMultiSelectionListDataSource-7fe25a58.js} +55 -41
- package/dist/esm/{auth-fetcher-38a83f5e.js → auth-fetcher-1a31c1e4.js} +1 -1
- package/dist/esm/{dataunit-fetcher-21c43ec7.js → dataunit-fetcher-050b6d31.js} +2 -2
- package/dist/esm/{form-config-fetcher-24eb587c.js → form-config-fetcher-b44b2727.js} +1 -1
- package/dist/esm/index-04f73a26.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +5 -5
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_8.entry.js → snk-actions-button_9.entry.js} +52 -13
- package/dist/esm/snk-application.entry.js +7 -7
- package/dist/esm/snk-attach.entry.js +50 -24
- package/dist/esm/snk-crud.entry.js +333 -98
- package/dist/esm/snk-data-exporter.entry.js +8 -7
- package/dist/esm/{snk-data-unit-3b06a0f3.js → snk-data-unit-ca2c9858.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-detail-view.entry.js +11 -16
- package/dist/esm/snk-entity-search.entry.js +207 -0
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/{snk-filter-advanced-mode_2.entry.js → snk-filter-advanced-mode_3.entry.js} +40 -3
- package/dist/esm/snk-filter-bar_4.entry.js +107 -96
- package/dist/esm/snk-filter-modal-item.entry.js +4 -4
- package/dist/esm/snk-form-view.entry.js +1 -1
- package/dist/esm/snk-form_2.entry.js +5 -5
- package/dist/esm/snk-grid.entry.js +37 -14
- package/dist/esm/{snk-guides-viewer-6ddc7e6a.js → snk-guides-viewer-cc37535b.js} +38 -154
- package/dist/esm/snk-guides-viewer.entry.js +9 -17
- package/dist/esm/snk-image-input.entry.js +2 -2
- package/dist/esm/snk-layout-form-config.entry.js +5 -5
- package/dist/esm/snk-personalized-filter.entry.js +5 -5
- package/dist/esm/snk-pesquisa.entry.js +5 -5
- package/dist/esm/snk-simple-crud.entry.js +10 -10
- package/dist/esm/snk-taskbar.entry.js +182 -125
- package/dist/esm/taskbar-elements-63651ca7.js +149 -0
- package/dist/sankhyablocks/p-09ba6bd4.js +1 -0
- package/dist/sankhyablocks/p-10f27dc6.entry.js +1 -0
- package/dist/sankhyablocks/{p-54f5c36d.entry.js → p-20af4b6a.entry.js} +1 -1
- package/dist/sankhyablocks/p-225f92cf.entry.js +1 -0
- package/dist/sankhyablocks/{p-605a2a99.entry.js → p-251aee41.entry.js} +1 -1
- package/dist/sankhyablocks/p-2af815bb.entry.js +1 -0
- package/dist/sankhyablocks/{p-bdf0077f.js → p-2af8aca3.js} +1 -1
- package/dist/sankhyablocks/p-3072136e.js +1 -0
- package/dist/sankhyablocks/p-33492640.entry.js +1 -0
- package/dist/sankhyablocks/{p-f208ec52.entry.js → p-35317d9a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6753f16e.js → p-3704bf1b.js} +1 -1
- package/dist/sankhyablocks/{p-2d606189.js → p-3870748a.js} +1 -1
- package/dist/sankhyablocks/{p-e057ecb6.js → p-3c990841.js} +1 -1
- package/dist/sankhyablocks/{p-4ff3b494.js → p-420b39b5.js} +1 -1
- package/dist/sankhyablocks/{p-8bb4e86b.entry.js → p-46f75667.entry.js} +1 -1
- package/dist/sankhyablocks/{p-32ad76cc.js → p-4f7adf97.js} +2 -2
- package/dist/sankhyablocks/p-554c0e54.js +1 -0
- package/dist/sankhyablocks/p-6ae7543b.entry.js +1 -0
- package/dist/sankhyablocks/p-771b137e.js +1 -0
- package/dist/sankhyablocks/p-77f608bc.entry.js +1 -0
- package/dist/sankhyablocks/p-7c8bf699.entry.js +1 -0
- package/dist/sankhyablocks/{p-d34a41ec.entry.js → p-8a8900a9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e484913b.entry.js → p-95af0bb1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-10cad767.entry.js → p-98241c21.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f5b929c2.entry.js → p-ab12f544.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ef8cf0e2.js → p-ab5e12fa.js} +1 -1
- package/dist/sankhyablocks/p-ac384a1e.entry.js +1 -0
- package/dist/sankhyablocks/{p-3a98c337.entry.js → p-aff2d081.entry.js} +1 -1
- package/dist/sankhyablocks/p-b3b51693.entry.js +1 -0
- package/dist/sankhyablocks/{p-08415ef7.entry.js → p-bab4cde4.entry.js} +1 -1
- package/dist/sankhyablocks/p-ce3b284c.entry.js +1 -0
- package/dist/sankhyablocks/p-ce8ccd72.entry.js +1 -0
- package/dist/sankhyablocks/{p-b9970342.js → p-d972a9c1.js} +1 -1
- package/dist/sankhyablocks/p-e5a3711f.js +1 -0
- package/dist/sankhyablocks/{p-2b882835.entry.js → p-e737fd5a.entry.js} +1 -1
- package/dist/sankhyablocks/p-efd18bc2.entry.js +1 -0
- package/dist/sankhyablocks/{p-362e6e8c.js → p-f185d5ad.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +4 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +20 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +28 -10
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-entity-search.d.ts +62 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +4 -18
- package/dist/types/components/snk-crud/utils/taskbarUtils.d.ts +13 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +32 -20
- package/dist/types/components/snk-grid/snk-grid.d.ts +28 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +6 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +5 -0
- package/dist/types/components/snk-taskbar/processor/simple-taskbar-processor.d.ts +31 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +32 -21
- package/dist/types/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.d.ts +3 -0
- package/dist/types/components.d.ts +197 -4
- package/package.json +2 -2
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -45
- package/dist/cjs/taskbar-elements-a94d4318.js +0 -133
- package/dist/cjs/taskbar-processor-2fba34a8.js +0 -53
- package/dist/esm/snk-simple-bar.entry.js +0 -41
- package/dist/esm/taskbar-elements-97541bdd.js +0 -130
- package/dist/esm/taskbar-processor-3436124c.js +0 -51
- package/dist/sankhyablocks/p-07aa8192.entry.js +0 -1
- package/dist/sankhyablocks/p-1a0caadb.js +0 -1
- package/dist/sankhyablocks/p-27aea149.entry.js +0 -1
- package/dist/sankhyablocks/p-27d6590e.js +0 -1
- package/dist/sankhyablocks/p-449e36d2.entry.js +0 -1
- package/dist/sankhyablocks/p-615655bd.entry.js +0 -1
- package/dist/sankhyablocks/p-62e17eea.entry.js +0 -1
- package/dist/sankhyablocks/p-6e1a7929.entry.js +0 -1
- package/dist/sankhyablocks/p-72d62f22.js +0 -1
- package/dist/sankhyablocks/p-9c1ff75e.entry.js +0 -1
- package/dist/sankhyablocks/p-a8c5ebf1.entry.js +0 -1
- package/dist/sankhyablocks/p-b25777fa.entry.js +0 -1
- package/dist/sankhyablocks/p-b6d47f08.entry.js +0 -1
- package/dist/sankhyablocks/p-b8453e18.js +0 -1
- package/dist/sankhyablocks/p-c8043a53.entry.js +0 -1
- package/dist/sankhyablocks/p-f0c9969e.entry.js +0 -1
- package/dist/sankhyablocks/p-fc5938fb.js +0 -1
|
@@ -6,10 +6,10 @@ const index = require('./index-1894343a.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const index$1 = require('./index-e3e39724.js');
|
|
8
8
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
9
|
-
const taskbarElements = require('./taskbar-elements-
|
|
9
|
+
const taskbarElements = require('./taskbar-elements-80eddec8.js');
|
|
10
10
|
require('./index-f0fe7e6e.js');
|
|
11
11
|
|
|
12
|
-
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:
|
|
12
|
+
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:nowrap}.no-wrap.sc-snk-taskbar-h{flex-wrap:nowrap}.full-width.sc-snk-taskbar-h{width:100%}.align-right.sc-snk-taskbar-h{justify-content:flex-end}.overflowed.sc-snk-taskbar{display:none}.taskbar-element.sc-snk-taskbar{width:auto}.space-between-item.sc-snk-taskbar{margin-left:var(--space--8, 8px)}.icon-button--small.sc-snk-taskbar{width:32px;height:32px}.icon-button--medium.sc-snk-taskbar{width:42px;height:42px}.icon-button--large.sc-snk-taskbar{width:46px;height:46px}.taskbar-spacer.sc-snk-taskbar{flex:1}.taskbar-group.sc-snk-taskbar{display:flex;flex-wrap:wrap;min-width:0}.taskbar-group--start.sc-snk-taskbar{flex:1 1 auto;justify-content:flex-start}.taskbar-group--end.sc-snk-taskbar{flex:0 0 auto;justify-content:flex-end}";
|
|
13
13
|
|
|
14
14
|
const SnkTaskbar = class {
|
|
15
15
|
constructor(hostRef) {
|
|
@@ -24,6 +24,10 @@ const SnkTaskbar = class {
|
|
|
24
24
|
this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME = 'taskbar-additional-slot-container';
|
|
25
25
|
this.TASKBAR_ADDITIONAL_SLOT = 'taskbar-additional-slot-container';
|
|
26
26
|
this._dataUnitInitialized = false;
|
|
27
|
+
this._permissions = {};
|
|
28
|
+
this._customElements = new Map();
|
|
29
|
+
this._customElementsId = [];
|
|
30
|
+
this._overFlowedElements = [];
|
|
27
31
|
this._titleKeyByElement = {
|
|
28
32
|
[taskbarElements.TaskbarElement.UPDATE_MULTIPLE]: "snkTaskbar.titleUpdateMultiple",
|
|
29
33
|
[taskbarElements.TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
|
@@ -55,15 +59,9 @@ const SnkTaskbar = class {
|
|
|
55
59
|
break;
|
|
56
60
|
}
|
|
57
61
|
};
|
|
58
|
-
this._permissions = undefined;
|
|
59
|
-
this._overFlowedElements = [];
|
|
60
|
-
this._customElements = undefined;
|
|
61
|
-
this._customElementsId = undefined;
|
|
62
|
-
this._slotContainer = undefined;
|
|
63
62
|
this._hiddenActionsList = [];
|
|
64
|
-
this._lastWidth = undefined;
|
|
65
|
-
this._hasToUpdateOverFlow = false;
|
|
66
63
|
this._isWaitingForSave = false;
|
|
64
|
+
this._isLoading = true;
|
|
67
65
|
this.alignRigth = false;
|
|
68
66
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
|
69
67
|
this.additionalSlotId = "TASKBAR_ADDITIONAL_SLOT";
|
|
@@ -75,11 +73,14 @@ const SnkTaskbar = class {
|
|
|
75
73
|
this.customButtons = undefined;
|
|
76
74
|
this.actionsList = undefined;
|
|
77
75
|
this.actionsSettingsList = undefined;
|
|
76
|
+
this.customActionsList = undefined;
|
|
78
77
|
this.primaryButton = undefined;
|
|
79
78
|
this.disabledButtons = undefined;
|
|
80
79
|
this.dataUnit = undefined;
|
|
81
80
|
this.presentationMode = index$1.PresentationMode.PRIMARY;
|
|
82
81
|
this.messagesBuilder = undefined;
|
|
82
|
+
this.disableSkeleton = false;
|
|
83
|
+
this.sizeButtons = 'small';
|
|
83
84
|
}
|
|
84
85
|
handleCustomSlotElementsLoaded(event) {
|
|
85
86
|
if (this.hasToSearchCustomElements(event)) {
|
|
@@ -100,19 +101,10 @@ const SnkTaskbar = class {
|
|
|
100
101
|
return this.customSlotId === event.detail && !this._slotContainer;
|
|
101
102
|
}
|
|
102
103
|
observeButtons() {
|
|
103
|
-
this.
|
|
104
|
-
requestAnimationFrame(() => {
|
|
105
|
-
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
|
106
|
-
});
|
|
104
|
+
this.handleDefinitions();
|
|
107
105
|
}
|
|
108
106
|
observeDisabledButtons() {
|
|
109
|
-
|
|
110
|
-
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate();
|
|
111
|
-
}
|
|
112
|
-
observeLastWidth(newValue, oldValue) {
|
|
113
|
-
if (oldValue === 0 && newValue !== 0) {
|
|
114
|
-
this._hasToUpdateOverFlow = true;
|
|
115
|
-
}
|
|
107
|
+
this.handleDefinitions();
|
|
116
108
|
}
|
|
117
109
|
observeIsWaitingForSave(newValue, oldValue) {
|
|
118
110
|
if (newValue == true && oldValue == false) {
|
|
@@ -125,7 +117,7 @@ const SnkTaskbar = class {
|
|
|
125
117
|
observeDataUnit(newValue) {
|
|
126
118
|
this.initializeDataUnit(newValue);
|
|
127
119
|
}
|
|
128
|
-
initializeDataUnit(dataUnit) {
|
|
120
|
+
initializeDataUnit(dataUnit = this.dataUnit) {
|
|
129
121
|
if (!!dataUnit && !this._dataUnitInitialized) {
|
|
130
122
|
this._dataUnitInitialized = true;
|
|
131
123
|
const dataInfo = { dataUnit: this.dataUnit };
|
|
@@ -133,7 +125,6 @@ const SnkTaskbar = class {
|
|
|
133
125
|
this.dataUnit.subscribe(this.onSaveEvent);
|
|
134
126
|
}
|
|
135
127
|
}
|
|
136
|
-
// Internal methods
|
|
137
128
|
elementsFromString(strButtons) {
|
|
138
129
|
const elements = [];
|
|
139
130
|
if (strButtons == null)
|
|
@@ -147,15 +138,17 @@ const SnkTaskbar = class {
|
|
|
147
138
|
return elements;
|
|
148
139
|
}
|
|
149
140
|
isAllowed(buttonName) {
|
|
141
|
+
if (!this._permissions) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
if (this._permissions.isSup) {
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
150
147
|
if (buttonName === taskbarElements.AuthorizationElements.CONFIGURATOR) {
|
|
151
|
-
return this._permissions
|
|
152
|
-
? this._permissions.isSup
|
|
153
|
-
|| this._permissions[AuthorizationConfig.AuthorizationConfig.CONFIG_GRID]
|
|
154
|
-
|| this._permissions[AuthorizationConfig.AuthorizationConfig.CONFIG]
|
|
155
|
-
: false;
|
|
148
|
+
return this._permissions[AuthorizationConfig.AuthorizationConfig.CONFIG_GRID] || this._permissions[AuthorizationConfig.AuthorizationConfig.CONFIG];
|
|
156
149
|
}
|
|
157
150
|
if (taskbarElements.AuthorizationElements[buttonName]) {
|
|
158
|
-
return this._permissions
|
|
151
|
+
return this._permissions[buttonName];
|
|
159
152
|
}
|
|
160
153
|
return true;
|
|
161
154
|
}
|
|
@@ -229,32 +222,54 @@ const SnkTaskbar = class {
|
|
|
229
222
|
}
|
|
230
223
|
return !(this.disabledButtons && this.disabledButtons.includes(elem));
|
|
231
224
|
}
|
|
232
|
-
validatePresentationMode() {
|
|
233
|
-
if (Object.values(index$1.PresentationMode).includes(this.presentationMode)) {
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
this.presentationMode = index$1.PresentationMode.PRIMARY;
|
|
237
|
-
}
|
|
238
225
|
getElement(index, def) {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
226
|
+
const className = {
|
|
227
|
+
"taskbar-element": true,
|
|
228
|
+
"space-between-item": index > 0
|
|
229
|
+
};
|
|
243
230
|
const taskbarElement = taskbarElements.TaskbarElement[def.toString()];
|
|
244
231
|
const dataExporterStoreKey = this._element.dataset.exporterStoreKey || this.configName;
|
|
245
232
|
if (taskbarElement) {
|
|
246
|
-
return taskbarElements.buildElem(
|
|
233
|
+
return taskbarElements.buildElem({
|
|
234
|
+
element: def,
|
|
235
|
+
className,
|
|
236
|
+
dataElementId: this.getIdElemBtnNative(def),
|
|
237
|
+
getTitle: elem => this.getTitle(elem),
|
|
238
|
+
action: elem => this.elementClick(elem),
|
|
239
|
+
isEnabled: elem => this.isEnabled(elem),
|
|
240
|
+
actions: def !== taskbarElements.TaskbarElement.CONFIGURATOR ? this.buildDynamicActionsList() : this.buildActionsSettingsList(),
|
|
241
|
+
dataExporterStoreKey,
|
|
242
|
+
presentationMode: this.presentationMode,
|
|
243
|
+
variant: def === this.primaryButton ? "primary" : "secondary",
|
|
244
|
+
size: this.sizeButtons,
|
|
245
|
+
});
|
|
247
246
|
}
|
|
248
247
|
else {
|
|
249
|
-
return taskbarElements.buildCustomButton(
|
|
248
|
+
return taskbarElements.buildCustomButton({
|
|
249
|
+
def: def,
|
|
250
|
+
className,
|
|
251
|
+
dataElementId: this.getIdElemBtnCustom(def),
|
|
252
|
+
action: elem => this.elementClick(elem),
|
|
253
|
+
isEnabled: elem => this.isEnabled(elem),
|
|
254
|
+
size: this.sizeButtons
|
|
255
|
+
});
|
|
250
256
|
}
|
|
251
257
|
}
|
|
258
|
+
buildDivider() {
|
|
259
|
+
return { value: '', label: '', type: 'divider' };
|
|
260
|
+
}
|
|
252
261
|
buildDynamicActionsList() {
|
|
253
|
-
var _a;
|
|
262
|
+
var _a, _b;
|
|
263
|
+
const customActions = [...((_a = this.customActionsList) !== null && _a !== void 0 ? _a : [])].filter(a => a !== undefined);
|
|
264
|
+
const defaultActionsList = [...((_b = this.actionsList) !== null && _b !== void 0 ? _b : [])].filter(a => a !== undefined);
|
|
265
|
+
if (customActions.length > 0 && defaultActionsList.length > 0) {
|
|
266
|
+
customActions.push(this.buildDivider());
|
|
267
|
+
}
|
|
268
|
+
const combinedList = [...customActions, ...defaultActionsList];
|
|
254
269
|
if (this._hiddenActionsList.length) {
|
|
255
|
-
return [...
|
|
270
|
+
return [...combinedList, ...this._hiddenActionsList];
|
|
256
271
|
}
|
|
257
|
-
return
|
|
272
|
+
return combinedList;
|
|
258
273
|
}
|
|
259
274
|
buildActionsSettingsList() {
|
|
260
275
|
return this.actionsSettingsList;
|
|
@@ -324,38 +339,12 @@ const SnkTaskbar = class {
|
|
|
324
339
|
else {
|
|
325
340
|
slotContainer = this._element.querySelector(`#${this.customSlotId}`);
|
|
326
341
|
}
|
|
327
|
-
// Caso
|
|
342
|
+
// Caso não encontre o slot container dentro do próprio elemento, tenta buscar na DOM do document.
|
|
328
343
|
if (searchOnDocument && !slotContainer) {
|
|
329
344
|
slotContainer = document.querySelector(`#${this.customSlotId}`);
|
|
330
345
|
}
|
|
331
346
|
return slotContainer;
|
|
332
347
|
}
|
|
333
|
-
componentWillLoad() {
|
|
334
|
-
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
335
|
-
if (this._application) {
|
|
336
|
-
this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
|
|
337
|
-
}
|
|
338
|
-
else {
|
|
339
|
-
this._permissions = {};
|
|
340
|
-
}
|
|
341
|
-
this.getCustomElements();
|
|
342
|
-
}
|
|
343
|
-
componentWillRender() {
|
|
344
|
-
this.handleDefinitions();
|
|
345
|
-
this.validatePresentationMode();
|
|
346
|
-
this.updateOverFlowIfNeeded();
|
|
347
|
-
}
|
|
348
|
-
handleDefinitions() {
|
|
349
|
-
if (this._definitions == undefined && this._permissions) {
|
|
350
|
-
this._definitions = this.elementsFromString(this.buttons);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
updateOverFlowIfNeeded() {
|
|
354
|
-
if (this._hasToUpdateOverFlow) {
|
|
355
|
-
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
|
356
|
-
this._hasToUpdateOverFlow = false;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
348
|
handleOverFlow(overFlowingElements) {
|
|
360
349
|
const elementsToHandle = overFlowingElements.filter(element => !this.hasToIgnoreOverFlow(element));
|
|
361
350
|
this.resetOverFlowedElements();
|
|
@@ -375,28 +364,38 @@ const SnkTaskbar = class {
|
|
|
375
364
|
this.addItemToActionList(element);
|
|
376
365
|
});
|
|
377
366
|
}
|
|
367
|
+
getAttributeFromName(element, attributeName) {
|
|
368
|
+
var _a;
|
|
369
|
+
if (!element) {
|
|
370
|
+
console.warn(`[snk-taskbar] Tentativa de acessar atributo "${attributeName}" em elemento nulo.`);
|
|
371
|
+
return "";
|
|
372
|
+
}
|
|
373
|
+
let attributeValue = element.getAttribute(attributeName);
|
|
374
|
+
if (!attributeValue && ((_a = element.tagName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'ez-tooltip') {
|
|
375
|
+
const innerButton = element.querySelector('ez-button');
|
|
376
|
+
if (innerButton) {
|
|
377
|
+
attributeValue = innerButton.getAttribute(attributeName);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
return attributeValue !== null && attributeValue !== void 0 ? attributeValue : "";
|
|
381
|
+
}
|
|
378
382
|
addItemToActionList(element) {
|
|
379
|
-
const taskbarElement = this.
|
|
383
|
+
const taskbarElement = this.getAttributeFromName(element, 'data-taskbar-element');
|
|
380
384
|
if (taskbarElement && this.isEnabled(taskbarElement) && this.isAllowed(taskbarElement)) {
|
|
381
385
|
const optionItem = {
|
|
382
386
|
value: taskbarElement,
|
|
383
|
-
label: this.
|
|
384
|
-
iconName: this.
|
|
387
|
+
label: this.getAttributeFromName(element, 'data-taskbar-label'),
|
|
388
|
+
iconName: this.getIconName(element)
|
|
385
389
|
};
|
|
386
390
|
this._hiddenActionsList.push(optionItem);
|
|
387
391
|
}
|
|
388
392
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
return (_a = element.getAttribute('data-taskbar-icon')) !== null && _a !== void 0 ? _a : "";
|
|
396
|
-
}
|
|
397
|
-
getTaskbarElementLabel(element) {
|
|
398
|
-
var _a;
|
|
399
|
-
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
|
393
|
+
getIconName(element) {
|
|
394
|
+
const taskbarElement = this.getAttributeFromName(element, 'data-taskbar-element');
|
|
395
|
+
if (taskbarElement === taskbarElements.TaskbarElement.INSERT) {
|
|
396
|
+
return "plus";
|
|
397
|
+
}
|
|
398
|
+
return this.getAttributeFromName(element, 'data-taskbar-icon');
|
|
400
399
|
}
|
|
401
400
|
hasToIgnoreOverFlow(element) {
|
|
402
401
|
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME) ||
|
|
@@ -415,22 +414,34 @@ const SnkTaskbar = class {
|
|
|
415
414
|
notOverFlow: this.NOT_OVERFLOW_ELEMENTS
|
|
416
415
|
};
|
|
417
416
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
417
|
+
handleDefinitions() {
|
|
418
|
+
if (!this._permissions) {
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
this._definitions = this.elementsFromString(this.buttons);
|
|
422
|
+
requestAnimationFrame(() => {
|
|
423
|
+
requestAnimationFrame(() => {
|
|
424
|
+
var _a;
|
|
425
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate();
|
|
426
|
+
});
|
|
427
|
+
});
|
|
428
428
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
(
|
|
429
|
+
async getAccess() {
|
|
430
|
+
if (!this._application) {
|
|
431
|
+
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
432
|
+
}
|
|
433
|
+
if (!this._application) {
|
|
434
|
+
console.warn('[snk-taskbar] Application context não encontrado. Permissões serão vazias.');
|
|
435
|
+
this._permissions = {};
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
try {
|
|
439
|
+
this._permissions = await this._application.getAllAccess(this.resourceID);
|
|
440
|
+
}
|
|
441
|
+
catch (error) {
|
|
442
|
+
console.error('[snk-taskbar] Erro ao obter permissões:', error);
|
|
443
|
+
this._permissions = {};
|
|
444
|
+
}
|
|
434
445
|
}
|
|
435
446
|
unlinkAllCustomElements() {
|
|
436
447
|
var _a;
|
|
@@ -443,40 +454,86 @@ const SnkTaskbar = class {
|
|
|
443
454
|
unlinkCustomElementFromTaskbar(customElement) {
|
|
444
455
|
this._slotContainer.appendChild(customElement);
|
|
445
456
|
}
|
|
446
|
-
render() {
|
|
447
|
-
var _a, _b;
|
|
448
|
-
if (this._definitions === undefined) {
|
|
449
|
-
return undefined;
|
|
450
|
-
}
|
|
451
|
-
let index$1 = 0;
|
|
452
|
-
return (index.h(index.Host, { class: this.getHostClasses() }, this.removeEmpty(this._definitions.map((elem) => {
|
|
453
|
-
var _a, _b;
|
|
454
|
-
index$1++;
|
|
455
|
-
if (taskbarElements.TaskbarElement[elem]) {
|
|
456
|
-
return this.getElement(index$1, taskbarElements.TaskbarElement[elem]);
|
|
457
|
-
}
|
|
458
|
-
if ((_a = this.customButtons) === null || _a === void 0 ? void 0 : _a.has(elem)) {
|
|
459
|
-
return this.getElement(index$1, this.customButtons.get(elem));
|
|
460
|
-
}
|
|
461
|
-
if (this._customElements.has(elem)) {
|
|
462
|
-
return this.addCustomElementContainer(elem);
|
|
463
|
-
}
|
|
464
|
-
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
|
465
|
-
return index.h("slot", { name: elem });
|
|
466
|
-
})), index.h("div", { id: this.TASKBAR_CUSTOM_ELEMENTS, class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.customSlotId }), (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 :
|
|
467
|
-
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS)), index.h("div", { id: this.TASKBAR_ADDITIONAL_SLOT, class: this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.additionalSlotId }), (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 :
|
|
468
|
-
_b.addNotOverFlowElement(this.TASKBAR_ADDITIONAL_SLOT))));
|
|
469
|
-
}
|
|
470
457
|
getHostClasses() {
|
|
471
458
|
if (this.overflowStrategy !== 'hiddenItems')
|
|
472
459
|
return 'no-wrap';
|
|
473
460
|
return `full-width ${this.alignRigth ? 'align-right' : ""}`;
|
|
474
461
|
}
|
|
462
|
+
connectedCallback() {
|
|
463
|
+
this.initializeDataUnit();
|
|
464
|
+
this.handleOverFlowStrategy();
|
|
465
|
+
this.getCustomElements();
|
|
466
|
+
}
|
|
467
|
+
async componentWillLoad() {
|
|
468
|
+
this._isLoading = true;
|
|
469
|
+
try {
|
|
470
|
+
await this.getAccess();
|
|
471
|
+
this.handleDefinitions();
|
|
472
|
+
}
|
|
473
|
+
catch (error) {
|
|
474
|
+
console.error('[snk-taskbar] Erro ao obter permissões de acesso:', error);
|
|
475
|
+
}
|
|
476
|
+
finally {
|
|
477
|
+
this._isLoading = false;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
componentDidRender() {
|
|
481
|
+
this.appendCustomElementsInTaskbar();
|
|
482
|
+
}
|
|
483
|
+
disconnectedCallback() {
|
|
484
|
+
var _a, _b;
|
|
485
|
+
(_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.unsubscribe(this.onSaveEvent);
|
|
486
|
+
this.unlinkAllCustomElements();
|
|
487
|
+
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
488
|
+
}
|
|
489
|
+
renderTaskbarElement(elem, index$1) {
|
|
490
|
+
var _a, _b;
|
|
491
|
+
if (taskbarElements.TaskbarElement[elem]) {
|
|
492
|
+
return this.getElement(index$1, taskbarElements.TaskbarElement[elem]);
|
|
493
|
+
}
|
|
494
|
+
if ((_a = this.customButtons) === null || _a === void 0 ? void 0 : _a.has(elem)) {
|
|
495
|
+
return this.getElement(index$1, this.customButtons.get(elem));
|
|
496
|
+
}
|
|
497
|
+
if (this._customElements.has(elem)) {
|
|
498
|
+
return this.addCustomElementContainer(elem);
|
|
499
|
+
}
|
|
500
|
+
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
|
501
|
+
return index.h("slot", { name: elem });
|
|
502
|
+
}
|
|
503
|
+
renderElements() {
|
|
504
|
+
var _a, _b;
|
|
505
|
+
const spacerIndex = (_a = this._definitions) === null || _a === void 0 ? void 0 : _a.indexOf(taskbarElements.TaskbarElement.SPACER);
|
|
506
|
+
const hasSpacerElement = spacerIndex !== undefined && spacerIndex !== -1;
|
|
507
|
+
if (!hasSpacerElement) {
|
|
508
|
+
const arrayOfElements = (_b = this._definitions) === null || _b === void 0 ? void 0 : _b.map((elem, index) => this.renderTaskbarElement(elem, index));
|
|
509
|
+
return this.removeEmpty(arrayOfElements);
|
|
510
|
+
}
|
|
511
|
+
// Split elements into before and after spacer
|
|
512
|
+
const elementsBeforeSpacer = this._definitions.slice(0, spacerIndex);
|
|
513
|
+
const elementsAfterSpacer = this._definitions.slice(spacerIndex + 1);
|
|
514
|
+
const beforeElements = elementsBeforeSpacer.map((elem, index) => this.renderTaskbarElement(elem, index));
|
|
515
|
+
const afterElements = elementsAfterSpacer.map((elem, index) => this.renderTaskbarElement(elem, index + spacerIndex + 1));
|
|
516
|
+
return [
|
|
517
|
+
index.h("div", { class: "taskbar-group taskbar-group--start" }, this.removeEmpty(beforeElements)),
|
|
518
|
+
index.h("div", { class: "taskbar-group taskbar-group--end" }, this.removeEmpty(afterElements))
|
|
519
|
+
];
|
|
520
|
+
}
|
|
521
|
+
render() {
|
|
522
|
+
var _a, _b;
|
|
523
|
+
if (!this._definitions) {
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
if (this._isLoading && !this.disableSkeleton) {
|
|
527
|
+
return (index.h(index.Host, { class: this.getHostClasses() }, index.h("snk-taskbar-skeleton", null)));
|
|
528
|
+
}
|
|
529
|
+
return (index.h(index.Host, { class: this.getHostClasses() }, this.renderElements(), index.h("div", { id: this.TASKBAR_CUSTOM_ELEMENTS, class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.customSlotId }), (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 :
|
|
530
|
+
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS)), index.h("div", { id: this.TASKBAR_ADDITIONAL_SLOT, class: this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.additionalSlotId }), (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 :
|
|
531
|
+
_b.addNotOverFlowElement(this.TASKBAR_ADDITIONAL_SLOT))));
|
|
532
|
+
}
|
|
475
533
|
get _element() { return index.getElement(this); }
|
|
476
534
|
static get watchers() { return {
|
|
477
535
|
"buttons": ["observeButtons"],
|
|
478
536
|
"disabledButtons": ["observeDisabledButtons"],
|
|
479
|
-
"_lastWidth": ["observeLastWidth"],
|
|
480
537
|
"_isWaitingForSave": ["observeIsWaitingForSave"],
|
|
481
538
|
"dataUnit": ["observeDataUnit"]
|
|
482
539
|
}; }
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-1894343a.js');
|
|
4
|
+
const index$2 = require('./index-e3e39724.js');
|
|
5
|
+
const index$1 = require('./index-f0fe7e6e.js');
|
|
6
|
+
|
|
7
|
+
exports.TaskbarElement = void 0;
|
|
8
|
+
(function (TaskbarElement) {
|
|
9
|
+
TaskbarElement["PREVIOUS"] = "PREVIOUS";
|
|
10
|
+
TaskbarElement["NEXT"] = "NEXT";
|
|
11
|
+
TaskbarElement["REFRESH"] = "REFRESH";
|
|
12
|
+
TaskbarElement["UPDATE"] = "UPDATE";
|
|
13
|
+
TaskbarElement["CLONE"] = "CLONE";
|
|
14
|
+
TaskbarElement["REMOVE"] = "REMOVE";
|
|
15
|
+
TaskbarElement["INSERT"] = "INSERT";
|
|
16
|
+
TaskbarElement["CANCEL"] = "CANCEL";
|
|
17
|
+
TaskbarElement["SAVE"] = "SAVE";
|
|
18
|
+
TaskbarElement["GRID_MODE"] = "GRID_MODE";
|
|
19
|
+
TaskbarElement["FORM_MODE"] = "FORM_MODE";
|
|
20
|
+
TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
|
|
21
|
+
TaskbarElement["DIVIDER"] = "DIVIDER";
|
|
22
|
+
TaskbarElement["SPACER"] = "SPACER";
|
|
23
|
+
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
|
24
|
+
TaskbarElement["DATA_EXPORTER"] = "DATA_EXPORTER";
|
|
25
|
+
TaskbarElement["ATTACH"] = "ATTACH";
|
|
26
|
+
TaskbarElement["ACTIONS_BUTTON"] = "ACTIONS_BUTTON";
|
|
27
|
+
TaskbarElement["UPDATE_MULTIPLE"] = "UPDATE_MULTIPLE";
|
|
28
|
+
})(exports.TaskbarElement || (exports.TaskbarElement = {}));
|
|
29
|
+
exports.AuthorizationElements = void 0;
|
|
30
|
+
(function (AuthorizationElements) {
|
|
31
|
+
AuthorizationElements["UPDATE"] = "UPDATE";
|
|
32
|
+
AuthorizationElements["CLONE"] = "CLONE";
|
|
33
|
+
AuthorizationElements["REMOVE"] = "REMOVE";
|
|
34
|
+
AuthorizationElements["INSERT"] = "INSERT";
|
|
35
|
+
AuthorizationElements["CONFIGURATOR"] = "CONFIGURATOR";
|
|
36
|
+
})(exports.AuthorizationElements || (exports.AuthorizationElements = {}));
|
|
37
|
+
exports.VisibleWhenForbidden = void 0;
|
|
38
|
+
(function (VisibleWhenForbidden) {
|
|
39
|
+
VisibleWhenForbidden["CONFIGURATOR"] = "CONFIGURATOR";
|
|
40
|
+
})(exports.VisibleWhenForbidden || (exports.VisibleWhenForbidden = {}));
|
|
41
|
+
const buildCustomButton = ({ def, className, dataElementId, action, isEnabled, size }) => {
|
|
42
|
+
const { hint, text, iconName } = def;
|
|
43
|
+
if (iconName) {
|
|
44
|
+
if (text) {
|
|
45
|
+
return iconTextButton({ iconName, element: def.name, className, dataElementId, title: hint, action, isEnabled, size });
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return iconButton({ iconName, element: def.name, className, dataElementId, title: hint, action, isEnabled, size });
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return textButton({ element: def.name, className, dataElementId, title: hint, action, isEnabled, size });
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const buildElem = ({ element, className, dataElementId, getTitle, action, isEnabled, actions, dataExporterStoreKey, presentationMode, variant, size }) => {
|
|
56
|
+
var _a, _b;
|
|
57
|
+
const title = getTitle(element);
|
|
58
|
+
const propertiesItem = {
|
|
59
|
+
element, className, dataElementId, title, action, isEnabled, actions, variant, size
|
|
60
|
+
};
|
|
61
|
+
switch (element) {
|
|
62
|
+
case exports.TaskbarElement.PREVIOUS:
|
|
63
|
+
return iconButton(Object.assign({ iconName: "chevron-left" }, propertiesItem));
|
|
64
|
+
case exports.TaskbarElement.NEXT:
|
|
65
|
+
return iconButton(Object.assign({ iconName: "chevron-right" }, propertiesItem));
|
|
66
|
+
case exports.TaskbarElement.REFRESH:
|
|
67
|
+
return iconButton(Object.assign({ iconName: "sync" }, propertiesItem));
|
|
68
|
+
case exports.TaskbarElement.UPDATE:
|
|
69
|
+
return iconButton(Object.assign({ iconName: "edit" }, propertiesItem));
|
|
70
|
+
case exports.TaskbarElement.UPDATE_MULTIPLE:
|
|
71
|
+
return iconButton(Object.assign({ iconName: "edit-table" }, propertiesItem));
|
|
72
|
+
case exports.TaskbarElement.CLONE:
|
|
73
|
+
return iconButton(Object.assign({ iconName: "copy" }, propertiesItem));
|
|
74
|
+
case exports.TaskbarElement.REMOVE:
|
|
75
|
+
return iconButton(Object.assign({ iconName: "delete" }, propertiesItem));
|
|
76
|
+
case exports.TaskbarElement.INSERT:
|
|
77
|
+
if (presentationMode === index$2.PresentationMode.PRIMARY) {
|
|
78
|
+
return textButton(Object.assign({}, propertiesItem));
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
return iconButton(Object.assign({ iconName: "plus" }, propertiesItem));
|
|
82
|
+
}
|
|
83
|
+
case exports.TaskbarElement.CANCEL:
|
|
84
|
+
return textButton(Object.assign({}, propertiesItem));
|
|
85
|
+
case exports.TaskbarElement.SAVE:
|
|
86
|
+
if (presentationMode === index$2.PresentationMode.PRIMARY) {
|
|
87
|
+
return iconTextButton(Object.assign(Object.assign({ iconName: "save" }, propertiesItem), { variant: "primary" }));
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
return iconButton(Object.assign(Object.assign({ iconName: "save" }, propertiesItem), { variant: "primary" }));
|
|
91
|
+
}
|
|
92
|
+
case exports.TaskbarElement.GRID_MODE:
|
|
93
|
+
return iconButton(Object.assign({ iconName: "table" }, propertiesItem));
|
|
94
|
+
case exports.TaskbarElement.FORM_MODE:
|
|
95
|
+
return iconButton(Object.assign({ iconName: "list" }, propertiesItem));
|
|
96
|
+
case exports.TaskbarElement.CONFIGURATOR:
|
|
97
|
+
if ((actions === null || actions === void 0 ? void 0 : actions.length) > 0) {
|
|
98
|
+
return splitButton(Object.assign({ iconName: "settings-inverted" }, propertiesItem));
|
|
99
|
+
}
|
|
100
|
+
return iconButton(Object.assign({ iconName: "settings-inverted" }, propertiesItem));
|
|
101
|
+
case exports.TaskbarElement.MORE_OPTIONS:
|
|
102
|
+
const definedActions = (_a = actions === null || actions === void 0 ? void 0 : actions.filter(a => a !== undefined)) !== null && _a !== void 0 ? _a : [];
|
|
103
|
+
return actionButton(Object.assign(Object.assign({}, propertiesItem), { actions: definedActions }));
|
|
104
|
+
case exports.TaskbarElement.DIVIDER:
|
|
105
|
+
return index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium", "data-taskbar-divider": true });
|
|
106
|
+
case exports.TaskbarElement.DATA_EXPORTER:
|
|
107
|
+
const provider = (_b = index$1.store.get("exporterProviders")) === null || _b === void 0 ? void 0 : _b[dataExporterStoreKey];
|
|
108
|
+
return index.h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element, size: size });
|
|
109
|
+
case exports.TaskbarElement.ATTACH:
|
|
110
|
+
return iconButton(Object.assign({ iconName: "anexo" }, propertiesItem));
|
|
111
|
+
case exports.TaskbarElement.ACTIONS_BUTTON:
|
|
112
|
+
return index.h("snk-actions-button", { "data-element-id": dataElementId, "data-taskbar-element": element, class: className, size: size });
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
function textButton({ action, className, dataElementId, title, element, isEnabled, variant, size }) {
|
|
116
|
+
return (index.h("ez-tooltip", { key: dataElementId, message: title, class: className },
|
|
117
|
+
index.h("ez-button", { label: title, "data-taskbar-label": title, "data-taskbar-element": element, "data-element-id": dataElementId, isDisabled: !isEnabled(element), onClick: () => action(element), variant: variant, size: size })));
|
|
118
|
+
}
|
|
119
|
+
function concatClass(className) {
|
|
120
|
+
if (typeof className === "string") {
|
|
121
|
+
return className;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
return Object.keys(className).filter(key => className[key]).join(" ");
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function iconButton({ iconName, element, className, dataElementId, title, action, isEnabled, variant, size }) {
|
|
128
|
+
return (index.h("ez-tooltip", { key: dataElementId, message: title, class: {
|
|
129
|
+
[concatClass(className)]: true,
|
|
130
|
+
[`icon-button--${size}`]: true
|
|
131
|
+
} },
|
|
132
|
+
index.h("ez-button", { mode: "icon", "data-taskbar-label": title, "data-taskbar-element": element, "data-taskbar-icon": iconName, "data-element-id": dataElementId, iconName: iconName, isDisabled: !isEnabled(element), onClick: () => action(element), variant: variant, size: size })));
|
|
133
|
+
}
|
|
134
|
+
function iconTextButton({ iconName, element, className, dataElementId, title, action, isEnabled, variant, size }) {
|
|
135
|
+
return (index.h("ez-tooltip", { key: dataElementId, message: title, class: className },
|
|
136
|
+
index.h("ez-button", { label: title, "data-taskbar-label": title, "data-taskbar-icon": iconName, "data-taskbar-element": element, "data-element-id": dataElementId, isDisabled: !isEnabled(element), onClick: () => action(element), variant: variant, size: size },
|
|
137
|
+
index.h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }))));
|
|
138
|
+
}
|
|
139
|
+
function splitButton({ iconName, element, className, title, dataElementId, isEnabled, actions, action, size }) {
|
|
140
|
+
return actions && actions.length > 0
|
|
141
|
+
?
|
|
142
|
+
index.h("taskbar-split-button", { key: dataElementId, class: className, iconName: iconName, "data-taskbar-icon": iconName, "data-taskbar-label": title, title: title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, action: () => action(element), size: size })
|
|
143
|
+
: undefined;
|
|
144
|
+
}
|
|
145
|
+
function actionButton({ element, className, dataElementId, title, isEnabled, actions, action, size }) {
|
|
146
|
+
return actions && actions.length > 0
|
|
147
|
+
? index.h("taskbar-actions-button", { class: className, key: dataElementId, title: title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value), size: size })
|
|
148
|
+
: undefined;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
exports.buildCustomButton = buildCustomButton;
|
|
152
|
+
exports.buildElem = buildElem;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"./components/snk-configurator/snk-configurator.js",
|
|
14
14
|
"./components/snk-crud/subcomponents/snk-guides-viewer.js",
|
|
15
15
|
"./components/snk-crud/snk-crud.js",
|
|
16
|
+
"./components/snk-crud/subcomponents/snk-entity-search.js",
|
|
16
17
|
"./components/snk-crud/subcomponents/snk-form-summary.js",
|
|
17
18
|
"./components/snk-crud/subcomponents/snk-form-view.js",
|
|
18
19
|
"./components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js",
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
"./components/snk-simple-form-config/snk-simple-form-config.js",
|
|
66
67
|
"./components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js",
|
|
67
68
|
"./components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js",
|
|
69
|
+
"./components/snk-taskbar/subcomponents/snk-taskbar-skeleton.js",
|
|
68
70
|
"./components/teste-pesquisa/teste-pesquisa.js"
|
|
69
71
|
],
|
|
70
72
|
"compiler": {
|