@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,15 +1,17 @@
|
|
|
1
|
-
import { Action as DUAction,
|
|
1
|
+
import { ApplicationContext, Action as DUAction, ElementIDUtils, LockManager, LockManagerOperation, OverflowDirection, OVERFLOWED_CLASS_NAME, OverflowWatcher, SilentException, StringUtils, } from '@sankhyalabs/core';
|
|
2
2
|
import { h, Host } from '@stencil/core';
|
|
3
|
+
import { PresentationMode } from '../../lib/@types';
|
|
3
4
|
import { AuthorizationConfig } from '../snk-configurator/AuthorizationConfig';
|
|
4
5
|
import { AuthorizationElements, buildCustomButton, buildElem, TaskbarElement, VisibleWhenForbidden, } from './elements/taskbar-elements';
|
|
5
|
-
import { PresentationMode } from '../../lib/@types';
|
|
6
6
|
export class SnkTaskbar {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
|
9
9
|
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
|
10
|
-
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
|
11
10
|
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
|
12
11
|
this.TASKBAR_CUSTOM_ELEMENTS = 'taskbar-custom-elements-container';
|
|
12
|
+
this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME = 'taskbar-additional-slot-container';
|
|
13
|
+
this.TASKBAR_ADDITIONAL_SLOT = 'taskbar-additional-slot-container';
|
|
14
|
+
this._dataUnitInitialized = false;
|
|
13
15
|
this._titleKeyByElement = {
|
|
14
16
|
[TaskbarElement.UPDATE_MULTIPLE]: "snkTaskbar.titleUpdateMultiple",
|
|
15
17
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
|
@@ -52,6 +54,7 @@ export class SnkTaskbar {
|
|
|
52
54
|
this._isWaitingForSave = false;
|
|
53
55
|
this.alignRigth = false;
|
|
54
56
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
|
57
|
+
this.additionalSlotId = "TASKBAR_ADDITIONAL_SLOT";
|
|
55
58
|
this.customContainerId = undefined;
|
|
56
59
|
this.overflowStrategy = 'hiddenItems';
|
|
57
60
|
this.configName = undefined;
|
|
@@ -107,6 +110,17 @@ export class SnkTaskbar {
|
|
|
107
110
|
this.taskbarSaveUnlocker.emit();
|
|
108
111
|
}
|
|
109
112
|
}
|
|
113
|
+
observeDataUnit(newValue) {
|
|
114
|
+
this.initializeDataUnit(newValue);
|
|
115
|
+
}
|
|
116
|
+
initializeDataUnit(dataUnit) {
|
|
117
|
+
if (!!dataUnit && !this._dataUnitInitialized) {
|
|
118
|
+
this._dataUnitInitialized = true;
|
|
119
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
120
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
121
|
+
this.dataUnit.subscribe(this.onSaveEvent);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
110
124
|
// Internal methods
|
|
111
125
|
elementsFromString(strButtons) {
|
|
112
126
|
const elements = [];
|
|
@@ -152,45 +166,46 @@ export class SnkTaskbar {
|
|
|
152
166
|
}
|
|
153
167
|
elementClick(elem) {
|
|
154
168
|
LockManager.whenResolve(this._element, LockManagerOperation.TASKBAR_CLICK).then(() => {
|
|
155
|
-
if (this.dataUnit) {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
169
|
+
if (!this.dataUnit) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
switch (elem) {
|
|
173
|
+
case TaskbarElement.PREVIOUS:
|
|
174
|
+
this.dataUnit.previousRecord();
|
|
175
|
+
break;
|
|
176
|
+
case TaskbarElement.NEXT:
|
|
177
|
+
this.dataUnit.nextRecord();
|
|
178
|
+
break;
|
|
179
|
+
case TaskbarElement.REFRESH:
|
|
180
|
+
this.dataUnit.loadData();
|
|
181
|
+
break;
|
|
182
|
+
case TaskbarElement.CLONE:
|
|
183
|
+
this.dataUnit.copySelected();
|
|
184
|
+
break;
|
|
185
|
+
case TaskbarElement.REMOVE:
|
|
186
|
+
this.dataUnit.removeSelectedRecords();
|
|
187
|
+
break;
|
|
188
|
+
case TaskbarElement.INSERT:
|
|
189
|
+
this.dataUnit.addRecord();
|
|
190
|
+
break;
|
|
191
|
+
case TaskbarElement.CANCEL:
|
|
192
|
+
this.dataUnit.cancelEdition();
|
|
193
|
+
break;
|
|
194
|
+
case TaskbarElement.SAVE:
|
|
195
|
+
if (!this._isWaitingForSave) {
|
|
196
|
+
this._isWaitingForSave = true;
|
|
197
|
+
this.dataUnit.saveData().catch((err) => {
|
|
198
|
+
if (err instanceof SilentException) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
throw err;
|
|
203
|
+
}
|
|
204
|
+
}).finally(() => {
|
|
205
|
+
this._isWaitingForSave = false;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
194
209
|
}
|
|
195
210
|
if (this.isEnabled(elem))
|
|
196
211
|
this.actionClick.emit(elem);
|
|
@@ -372,7 +387,8 @@ export class SnkTaskbar {
|
|
|
372
387
|
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
|
373
388
|
}
|
|
374
389
|
hasToIgnoreOverFlow(element) {
|
|
375
|
-
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME)
|
|
390
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME) ||
|
|
391
|
+
element.classList.contains(this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME);
|
|
376
392
|
}
|
|
377
393
|
handleOverFlowStrategy() {
|
|
378
394
|
if (this.overflowStrategy === 'hiddenItems') {
|
|
@@ -388,10 +404,8 @@ export class SnkTaskbar {
|
|
|
388
404
|
};
|
|
389
405
|
}
|
|
390
406
|
componentDidLoad() {
|
|
391
|
-
|
|
392
|
-
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
407
|
+
this.initializeDataUnit(this.dataUnit);
|
|
393
408
|
this.handleOverFlowStrategy();
|
|
394
|
-
this.dataUnit.subscribe(this.onSaveEvent);
|
|
395
409
|
}
|
|
396
410
|
componentDidRender() {
|
|
397
411
|
this.appendCustomElementsInTaskbar();
|
|
@@ -418,7 +432,7 @@ export class SnkTaskbar {
|
|
|
418
432
|
this._slotContainer.appendChild(customElement);
|
|
419
433
|
}
|
|
420
434
|
render() {
|
|
421
|
-
var _a;
|
|
435
|
+
var _a, _b;
|
|
422
436
|
if (this._definitions === undefined) {
|
|
423
437
|
return undefined;
|
|
424
438
|
}
|
|
@@ -438,7 +452,8 @@ export class SnkTaskbar {
|
|
|
438
452
|
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
|
439
453
|
return h("slot", { name: elem });
|
|
440
454
|
})), 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 :
|
|
441
|
-
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS))))
|
|
455
|
+
_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 :
|
|
456
|
+
_b.addNotOverFlowElement(this.TASKBAR_ADDITIONAL_SLOT))));
|
|
442
457
|
}
|
|
443
458
|
getHostClasses() {
|
|
444
459
|
if (this.overflowStrategy !== 'hiddenItems')
|
|
@@ -501,6 +516,27 @@ export class SnkTaskbar {
|
|
|
501
516
|
"reflect": false,
|
|
502
517
|
"defaultValue": "\"TASKBAR_CUSTOM_ELEMENTS\""
|
|
503
518
|
},
|
|
519
|
+
"additionalSlotId": {
|
|
520
|
+
"type": "string",
|
|
521
|
+
"mutable": false,
|
|
522
|
+
"complexType": {
|
|
523
|
+
"original": "string",
|
|
524
|
+
"resolved": "string",
|
|
525
|
+
"references": {}
|
|
526
|
+
},
|
|
527
|
+
"required": false,
|
|
528
|
+
"optional": false,
|
|
529
|
+
"docs": {
|
|
530
|
+
"tags": [{
|
|
531
|
+
"name": "description",
|
|
532
|
+
"text": "Define o identificador do slot adicional."
|
|
533
|
+
}],
|
|
534
|
+
"text": ""
|
|
535
|
+
},
|
|
536
|
+
"attribute": "additional-slot-id",
|
|
537
|
+
"reflect": false,
|
|
538
|
+
"defaultValue": "\"TASKBAR_ADDITIONAL_SLOT\""
|
|
539
|
+
},
|
|
504
540
|
"customContainerId": {
|
|
505
541
|
"type": "string",
|
|
506
542
|
"mutable": false,
|
|
@@ -889,6 +925,9 @@ export class SnkTaskbar {
|
|
|
889
925
|
}, {
|
|
890
926
|
"propName": "_isWaitingForSave",
|
|
891
927
|
"methodName": "observeIsWaitingForSave"
|
|
928
|
+
}, {
|
|
929
|
+
"propName": "dataUnit",
|
|
930
|
+
"methodName": "observeDataUnit"
|
|
892
931
|
}];
|
|
893
932
|
}
|
|
894
933
|
static get listeners() {
|
|
@@ -64,7 +64,7 @@ export class PesquisaFetcher {
|
|
|
64
64
|
return result;
|
|
65
65
|
}
|
|
66
66
|
loadAdvancedSearch(entityName, argument, criteria, searchOptions, codeValue) {
|
|
67
|
-
var _a, _b, _c, _d, _e;
|
|
67
|
+
var _a, _b, _c, _d, _e, _f;
|
|
68
68
|
const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
|
|
69
69
|
const values = {
|
|
70
70
|
argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
|
|
@@ -103,11 +103,11 @@ export class PesquisaFetcher {
|
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
const options = searchOptions != undefined
|
|
106
|
-
? 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;
|
|
106
|
+
? 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;
|
|
107
107
|
const reqBody = {
|
|
108
108
|
"serviceName": serviceName,
|
|
109
109
|
"requestBody": {
|
|
110
|
-
"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": (
|
|
110
|
+
"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 }),
|
|
111
111
|
"clientEventList": {
|
|
112
112
|
"clientEvent": []
|
|
113
113
|
}
|
|
@@ -39,6 +39,8 @@ export const snkFormConfigMessages = {
|
|
|
39
39
|
labelNewGroup: "Add new group",
|
|
40
40
|
mainArea: "Main area",
|
|
41
41
|
tabGeneral: "General",
|
|
42
|
+
canNotEditCustomGuide: "It is not possible to edit detail tabs and custom tabs",
|
|
43
|
+
canNotEditDetailGuide: "To configure a detail screen, you must access its tab",
|
|
42
44
|
createNewGroup: "Create new group",
|
|
43
45
|
newGroup: "New group",
|
|
44
46
|
noGuideSelected: "Select a tab and start configuring",
|
|
@@ -66,6 +68,10 @@ export const snkFormConfigMessages = {
|
|
|
66
68
|
title: "Attention",
|
|
67
69
|
message: "Select a guide to start configuration!"
|
|
68
70
|
},
|
|
71
|
+
canNotAddFieldToGuide: {
|
|
72
|
+
title: "Attention",
|
|
73
|
+
message: "It is not possible to add fields to detail tabs or custom tabs!"
|
|
74
|
+
},
|
|
69
75
|
alert: {
|
|
70
76
|
titleGroupExists: "A group with this title already exists",
|
|
71
77
|
titleGroupEditing: "There is a <b>group<b/> being edited. <br/> Finish editing to save the settings.",
|
|
@@ -96,6 +102,7 @@ export const snkFormConfigMessages = {
|
|
|
96
102
|
createNewGuide: "Create new tab",
|
|
97
103
|
noHiddenGuides: "No hidden tabs",
|
|
98
104
|
noVisibleGuides: "No visible tabs",
|
|
105
|
+
canNotDeleteCustomGuide: "Is not possible to detail detail tabs os a custom tabs",
|
|
99
106
|
actions: {
|
|
100
107
|
hide: "Hide",
|
|
101
108
|
show: "Make visible",
|
|
@@ -39,6 +39,8 @@ export const snkFormConfigMessages = {
|
|
|
39
39
|
labelNewGroup: "Añadir nuevo grupo",
|
|
40
40
|
mainArea: "Área principal",
|
|
41
41
|
tabGeneral: "General",
|
|
42
|
+
canNotEditCustomGuide: "No es posible editar pestañas de detalles y pestañas personalizadas",
|
|
43
|
+
canNotEditDetailGuide: "Para realizar la configuración de una pantalla de detalles es necesario acceder a su pestaña",
|
|
42
44
|
createNewGroup: "Crear nuevo grupo",
|
|
43
45
|
newGroup: "Nuevo grupo",
|
|
44
46
|
noGuideSelected: "Seleccione una pestaña y comience a configurar",
|
|
@@ -66,6 +68,10 @@ export const snkFormConfigMessages = {
|
|
|
66
68
|
title: "Atención",
|
|
67
69
|
message: "¡Seleccione una guía para iniciar la configuración!"
|
|
68
70
|
},
|
|
71
|
+
canNotAddFieldToGuide: {
|
|
72
|
+
title: "Atención",
|
|
73
|
+
message: "¡No es posible agregar campos a pestañas de detalles o pestañas personalizadas!"
|
|
74
|
+
},
|
|
69
75
|
alert: {
|
|
70
76
|
titleGroupExists: "Ya existe un grupo con título",
|
|
71
77
|
titleGroupEditing: "Hay un <b>grupo<b/> en edición. <br/> Finalice la edición para guardar las configuraciones.",
|
|
@@ -96,6 +102,7 @@ export const snkFormConfigMessages = {
|
|
|
96
102
|
createNewGuide: "Crear nueva pestaña",
|
|
97
103
|
noHiddenGuides: "No hay pestañas ocultas",
|
|
98
104
|
noVisibleGuides: "No hay pestañas visibles",
|
|
105
|
+
canNotDeleteCustomGuide: "No es posible eliminar pestañas de detalles o pestañas personalizadas",
|
|
99
106
|
actions: {
|
|
100
107
|
hide: "Ocultar",
|
|
101
108
|
show: "Hacer visible",
|
|
@@ -39,6 +39,8 @@ export const snkFormConfigMessages = {
|
|
|
39
39
|
labelNewGroup: "Adicionar novo grupo",
|
|
40
40
|
mainArea: "Área principal",
|
|
41
41
|
tabGeneral: "Geral",
|
|
42
|
+
canNotEditCustomGuide: "Não é possível editar guias detalhe e guias personalizadas",
|
|
43
|
+
canNotEditDetailGuide: "Para realizar a configuração de uma tela de detalhes é necessário acessar a sua aba",
|
|
42
44
|
createNewGroup: "Criar novo grupo",
|
|
43
45
|
newGroup: "Criar novo grupo",
|
|
44
46
|
noGuideSelected: "Selecione uma guia e comece a configurar",
|
|
@@ -66,6 +68,10 @@ export const snkFormConfigMessages = {
|
|
|
66
68
|
title: "Atenção",
|
|
67
69
|
message: "Selecione uma guia para iniciar a configuração!"
|
|
68
70
|
},
|
|
71
|
+
canNotAddFieldToGuide: {
|
|
72
|
+
title: "Atenção",
|
|
73
|
+
message: "Não é possível adicionar campos à guias customizadas ou guias detalhe!"
|
|
74
|
+
},
|
|
69
75
|
alert: {
|
|
70
76
|
titleGroupExists: "Já existe um grupo com título",
|
|
71
77
|
titleGroupEditing: "Há um <b>grupo<b/> em edição. <br/> Finalize a edição para salvar as configurações.",
|
|
@@ -96,10 +102,11 @@ export const snkFormConfigMessages = {
|
|
|
96
102
|
createNewGuide: "Criar nova guia",
|
|
97
103
|
noHiddenGuides: "Nenhuma guia oculta",
|
|
98
104
|
noVisibleGuides: "Nenhuma guia visível",
|
|
105
|
+
canNotDeleteCustomGuide: "Não é possível excluir guias detalhe e guias personalizadas",
|
|
99
106
|
actions: {
|
|
100
107
|
hide: "Ocultar",
|
|
101
108
|
show: "Tornar visível",
|
|
102
|
-
delete: "Excluir"
|
|
109
|
+
delete: "Excluir",
|
|
103
110
|
}
|
|
104
111
|
}
|
|
105
112
|
};
|
|
@@ -8,7 +8,7 @@ export const snkPesquisaMessages = {
|
|
|
8
8
|
initialMessage: "Os resultados de sua pesquisa aparecerão aqui...",
|
|
9
9
|
resultsFoundSingular: "1 registro encontrado",
|
|
10
10
|
resultsFoundPlural: "{{COUNT}} registros encontrados",
|
|
11
|
-
limitMessage: "
|
|
11
|
+
limitMessage: "Esta pesquisa foi limitada, existem mais resultados."
|
|
12
12
|
},
|
|
13
13
|
viewMode: {
|
|
14
14
|
tableMode: "Modo grade",
|
|
@@ -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",
|
package/dist/components/ISave.js
CHANGED
|
@@ -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,5 +1,5 @@
|
|
|
1
|
-
import { C as ConfigStorage } from './ConfigStorage.js';
|
|
2
1
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { C as ConfigStorage } from './ConfigStorage.js';
|
|
3
3
|
import { F as FormConfigFetcher } from './form-config-fetcher.js';
|
|
4
4
|
import { T as TAB_NAMES } from './constants.js';
|
|
5
5
|
|
|
@@ -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
|
}
|
|
@@ -112,6 +112,48 @@ function buildGuides(config, mainArea) {
|
|
|
112
112
|
tabs = initializeTabsNames(tabs);
|
|
113
113
|
return handleMainTab(tabs, mainArea);
|
|
114
114
|
}
|
|
115
|
+
function buildChildrenGuides(dataUnit, initialOrderIndex = 0, guidesList) {
|
|
116
|
+
var _a;
|
|
117
|
+
if (!dataUnit || !dataUnit.metadata) {
|
|
118
|
+
return [];
|
|
119
|
+
}
|
|
120
|
+
const children = ((_a = dataUnit.metadata) === null || _a === void 0 ? void 0 : _a.children) || [];
|
|
121
|
+
const childrenWithNoGuide = [];
|
|
122
|
+
for (const child of children) {
|
|
123
|
+
const guideOnConfig = guidesList.find(guide => child.label === guide.label);
|
|
124
|
+
if (guideOnConfig) {
|
|
125
|
+
guideOnConfig.isCustom = true;
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
childrenWithNoGuide.push({
|
|
129
|
+
label: child.label,
|
|
130
|
+
name: child.name,
|
|
131
|
+
visible: true,
|
|
132
|
+
isCustom: true,
|
|
133
|
+
order: initialOrderIndex++
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return childrenWithNoGuide;
|
|
137
|
+
}
|
|
138
|
+
function buildCustomGuides(customGuidesList, guidesList) {
|
|
139
|
+
let initialOrderIndex = guidesList.length;
|
|
140
|
+
const customGuidesToAdd = getCustomGuidesNotIncludedInList(customGuidesList, guidesList);
|
|
141
|
+
return customGuidesToAdd.map(guide => {
|
|
142
|
+
return {
|
|
143
|
+
name: guide.id,
|
|
144
|
+
label: guide.label,
|
|
145
|
+
visible: true,
|
|
146
|
+
isCustom: true,
|
|
147
|
+
order: initialOrderIndex++
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function isCustomGuideIncludedInList(guidesList, guide) {
|
|
152
|
+
return guidesList.some(fromList => fromList.name === guide.id || fromList.label === guide.label);
|
|
153
|
+
}
|
|
154
|
+
function getCustomGuidesNotIncludedInList(customGuidesList, guidesList) {
|
|
155
|
+
return customGuidesList.filter(guide => !isCustomGuideIncludedInList(guidesList, guide));
|
|
156
|
+
}
|
|
115
157
|
function handleFieldsTabNames(allFields) {
|
|
116
158
|
// Campos que não fazem parte de nenhuma aba ou da aba "Geral", devem ser movidos para a aba __main.
|
|
117
159
|
return allFields.map(field => {
|
|
@@ -521,4 +563,4 @@ function defineCustomElement() {
|
|
|
521
563
|
} });
|
|
522
564
|
}
|
|
523
565
|
|
|
524
|
-
export { FieldConfig as F, ID_AVAILABLE_FIELDS as I, SORTABLE_PATH as S, getFieldsStructure as a, buildGuides as b,
|
|
566
|
+
export { FieldConfig as F, ID_AVAILABLE_FIELDS as I, SORTABLE_PATH as S, getFieldsStructure as a, buildGuides as b, buildChildrenGuides as c, defineCustomElement as d, buildCustomGuides as e, buildGuidesMap as f, getIconName as g, getFieldsToSave as h, buildNewGuideName as i, updateTabInFieldsFromGroupList as u };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
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.js';
|
|
4
|
-
import { S as SORTABLE_PATH, a as getFieldsStructure, d as defineCustomElement$2, I as ID_AVAILABLE_FIELDS } from './field-config2.js';
|
|
5
5
|
import { T as TAB_NAMES, G as GROUP_NAMES } from './constants.js';
|
|
6
|
-
import {
|
|
6
|
+
import { S as SORTABLE_PATH, a as getFieldsStructure, d as defineCustomElement$2, I as ID_AVAILABLE_FIELDS } from './field-config2.js';
|
|
7
7
|
import { d as defineCustomElement$1 } from './field-item2.js';
|
|
8
8
|
|
|
9
|
-
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}";
|
|
9
|
+
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}";
|
|
10
10
|
|
|
11
11
|
const FieldLayoutComponent = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
12
12
|
constructor() {
|
|
@@ -331,6 +331,9 @@ const FieldLayoutComponent = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
331
331
|
if (!this.selectedGuide) {
|
|
332
332
|
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'))));
|
|
333
333
|
}
|
|
334
|
+
if (this.selectedGuide.isCustom || this.selectedGuide.isDetail) {
|
|
335
|
+
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')))));
|
|
336
|
+
}
|
|
334
337
|
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')))));
|
|
335
338
|
}
|
|
336
339
|
get el() { return this; }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { S as Sortable } from './sortable.esm.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.js';
|
|
5
5
|
import { T as TAB_NAMES } from './constants.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 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -101,7 +101,9 @@ const GuidesConfigurator = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
101
101
|
var _a;
|
|
102
102
|
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 ?
|
|
103
103
|
this.getMessage('snkFormConfig.guidesConfigurator.actions.hide') :
|
|
104
|
-
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:
|
|
104
|
+
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 ?
|
|
105
|
+
this.getMessage('snkFormConfig.guidesConfigurator.canNotDeleteCustomGuide') :
|
|
106
|
+
this.getMessage('snkFormConfig.guidesConfigurator.actions.delete') }))));
|
|
105
107
|
});
|
|
106
108
|
}
|
|
107
109
|
getContainerElement(id) {
|
|
@@ -16,6 +16,7 @@ export { SnkActionsForm as SnkClientConfirm } from '../types/components/snk-acti
|
|
|
16
16
|
export { SnkConfigurator as SnkConfigurator } from '../types/components/snk-configurator/snk-configurator';
|
|
17
17
|
export { SnkCrud as SnkCrud } from '../types/components/snk-crud/snk-crud';
|
|
18
18
|
export { SnkCustomSlotElements as SnkCustomSlotElements } from '../types/components/snk-custom-slot-elements/snk-custom-slot-elements';
|
|
19
|
+
export { SnkCustomSlotGuide as SnkCustomSlotGuide } from '../types/components/snk-custom-slot-guide/snk-custom-slot-guide';
|
|
19
20
|
export { SnkDataExporter as SnkDataExporter } from '../types/components/snk-data-exporter/snk-data-exporter';
|
|
20
21
|
export { SnkDataUnit as SnkDataUnit } from '../types/components/snk-data-unit/snk-data-unit';
|
|
21
22
|
export { SnkDefaultFilter as SnkDefaultFilter } from '../types/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter';
|