@sankhyalabs/sankhyablocks 8.14.11 → 8.15.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-8009ecb2.js → ConfigStorage-302bbbd4.js} +24 -14
- package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
- package/dist/cjs/{SnkFormConfigManager-7d850fbc.js → SnkFormConfigManager-71c4768e.js} +1 -1
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
- package/dist/cjs/{field-search-ca27041a.js → field-search-f56aa7d6.js} +29 -1
- package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
- package/dist/cjs/index-f9e81701.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-d839c5d7.js → pesquisa-fetcher-7a08d110.js} +173 -6
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button.cjs.entry.js → snk-actions-button_2.cjs.entry.js} +133 -4
- package/dist/cjs/snk-application.cjs.entry.js +65 -6
- package/dist/cjs/snk-attach.cjs.entry.js +389 -58
- package/dist/cjs/snk-crud.cjs.entry.js +8 -9
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
- package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +9 -10
- package/dist/cjs/snk-filter-bar.cjs.entry.js +6 -3
- package/dist/cjs/snk-filter-item.cjs.entry.js +47 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +2 -2
- package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +51 -42
- package/dist/cjs/{snk-guides-viewer-88a7f880.js → snk-guides-viewer-546509df.js} +10 -21
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +20 -42
- package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
- package/dist/cjs/{taskbar-elements-39949c7a.js → taskbar-elements-01b85b99.js} +4 -4
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/snk-application/snk-application.js +65 -5
- package/dist/collection/components/snk-attach/snk-attach.js +188 -39
- package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
- package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
- package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
- package/dist/collection/components/snk-attach/structure/index.js +6 -3
- package/dist/collection/components/snk-crud/snk-crud.js +5 -5
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +6 -19
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +47 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +5 -2
- package/dist/collection/components/snk-grid/snk-grid.js +59 -53
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +15 -36
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +6 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +324 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -3
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -2
- package/dist/collection/components/snk-taskbar/subcomponents/field-search.js +28 -1
- package/dist/collection/lib/@types/index.js +1 -0
- package/dist/collection/lib/configs/ConfigStorage.js +24 -14
- package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +11 -6
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
- package/dist/components/ConfigStorage.js +24 -14
- package/dist/components/SnkMessageBuilder.js +13 -0
- package/dist/components/dataunit-fetcher.js +11 -6
- package/dist/components/field-search.js +29 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +1 -0
- package/dist/components/snk-actions-button2.js +1 -0
- package/dist/components/snk-application2.js +62 -2
- package/dist/components/snk-attach2.js +414 -71
- package/dist/components/snk-crud.js +69 -63
- package/dist/components/snk-detail-view2.js +95 -94
- package/dist/components/snk-filter-bar2.js +5 -2
- package/dist/components/snk-filter-item2.js +47 -1
- package/dist/components/snk-grid2.js +91 -76
- package/dist/components/snk-simple-crud2.js +31 -46
- package/dist/components/snk-taskbar2.js +15 -9
- package/dist/components/taskbar-actions-button.d.ts +11 -0
- package/dist/components/taskbar-actions-button.js +6 -0
- package/dist/components/taskbar-actions-button2.js +154 -0
- package/dist/esm/{ConfigStorage-1244b8b0.js → ConfigStorage-4151acc8.js} +24 -14
- package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
- package/dist/esm/{SnkFormConfigManager-9be0e7d4.js → SnkFormConfigManager-5c7d3771.js} +1 -1
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
- package/dist/esm/{field-search-c6938ee4.js → field-search-efbe307f.js} +29 -2
- package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
- package/dist/esm/index-a7d3d3f1.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-cf01a8f4.js → pesquisa-fetcher-d6ff9386.js} +173 -7
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button.entry.js → snk-actions-button_2.entry.js} +134 -6
- package/dist/esm/snk-application.entry.js +65 -6
- package/dist/esm/snk-attach.entry.js +390 -59
- package/dist/esm/snk-crud.entry.js +8 -9
- package/dist/esm/snk-data-exporter.entry.js +3 -3
- package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +9 -10
- package/dist/esm/snk-filter-bar.entry.js +6 -3
- package/dist/esm/snk-filter-item.entry.js +47 -1
- package/dist/esm/snk-filter-modal-item.entry.js +1 -1
- package/dist/esm/snk-form.entry.js +2 -2
- package/dist/esm/snk-grid-config.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +52 -43
- package/dist/esm/{snk-guides-viewer-fde509bf.js → snk-guides-viewer-4e56a2e0.js} +10 -21
- package/dist/esm/snk-guides-viewer.entry.js +8 -9
- package/dist/esm/snk-personalized-filter.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +19 -41
- package/dist/esm/snk-taskbar.entry.js +2 -2
- package/dist/esm/{taskbar-elements-0a6b8b95.js → taskbar-elements-d4d0b424.js} +4 -4
- package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
- package/dist/sankhyablocks/{p-fd8814b9.entry.js → p-1d75d9f9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-32460e98.entry.js +11 -0
- package/dist/sankhyablocks/p-374d03f6.js +1 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-3963b9c1.entry.js} +1 -1
- package/dist/sankhyablocks/p-42af1bbf.js +65 -0
- package/dist/sankhyablocks/{p-776ee8e3.js → p-573a07c5.js} +1 -1
- package/dist/sankhyablocks/{p-d4fb9642.entry.js → p-69efa80d.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6977a26c.entry.js → p-71439fd9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-11081798.entry.js → p-761ed32f.entry.js} +1 -1
- package/dist/sankhyablocks/p-7d8d7fe9.entry.js +1 -0
- package/dist/sankhyablocks/{p-f514913b.entry.js → p-7f3c7b09.entry.js} +1 -1
- package/dist/sankhyablocks/p-8c74258e.entry.js +1 -0
- package/dist/sankhyablocks/p-8f0488b8.entry.js +1 -0
- package/dist/sankhyablocks/p-9ebcfeb6.entry.js +1 -0
- package/dist/sankhyablocks/p-aa95fb2c.js +56 -0
- package/dist/sankhyablocks/p-b05ab13d.entry.js +1 -0
- package/dist/sankhyablocks/p-c2137023.entry.js +1 -0
- package/dist/sankhyablocks/p-c2495304.js +1 -0
- package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
- package/dist/sankhyablocks/p-d82f6eda.entry.js +1 -0
- package/dist/sankhyablocks/p-dcb6aad1.entry.js +1 -0
- package/dist/sankhyablocks/{p-3520c088.entry.js → p-e0fd9555.entry.js} +1 -1
- package/dist/sankhyablocks/p-e8812d8a.js +1 -0
- package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +4 -1
- package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
- package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +27 -6
- package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
- package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
- package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
- package/dist/types/components/snk-crud/snk-crud.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +5 -4
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +6 -5
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +60 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +16 -0
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +2 -0
- package/dist/types/components.d.ts +111 -11
- package/dist/types/lib/@types/index.d.ts +2 -1
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +1 -0
- package/dist/types/lib/index.d.ts +1 -1
- package/package.json +8 -6
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
- package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
- package/dist/sankhyablocks/p-08ced1fd.entry.js +0 -1
- package/dist/sankhyablocks/p-3160fa64.js +0 -60
- package/dist/sankhyablocks/p-34774923.entry.js +0 -1
- package/dist/sankhyablocks/p-38ab8a3b.entry.js +0 -1
- package/dist/sankhyablocks/p-3ab540cc.entry.js +0 -11
- package/dist/sankhyablocks/p-3ecd72a4.js +0 -1
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-5534e08c.js +0 -1
- package/dist/sankhyablocks/p-585294ee.js +0 -56
- package/dist/sankhyablocks/p-6ea96bb1.entry.js +0 -1
- package/dist/sankhyablocks/p-936addf1.js +0 -1
- package/dist/sankhyablocks/p-c53926eb.entry.js +0 -1
- package/dist/sankhyablocks/p-c9841939.js +0 -1
- package/dist/sankhyablocks/p-cfbebb49.entry.js +0 -1
- package/dist/sankhyablocks/p-d2923a2a.entry.js +0 -1
- package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
- package/dist/sankhyablocks/p-f2056f66.entry.js +0 -1
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
- /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -0,0 +1,154 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
+
|
3
|
+
const taskbarActionsButtonCss = ".sc-taskbar-actions-button-h{display:flex;width:fit-content;height:fit-content}";
|
4
|
+
|
5
|
+
const TaskbarActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
6
|
+
constructor() {
|
7
|
+
super();
|
8
|
+
this.__registerHost();
|
9
|
+
this.taskbarActionSelected = createEvent(this, "taskbarActionSelected", 7);
|
10
|
+
this.taskbarActionsOpened = createEvent(this, "taskbarActionsOpened", 7);
|
11
|
+
this.taskbarActionsButtonDisconnected = createEvent(this, "taskbarActionsButtonDisconnected", 7);
|
12
|
+
this._showDropdown = false;
|
13
|
+
this.title = undefined;
|
14
|
+
this.enabled = undefined;
|
15
|
+
this.actions = undefined;
|
16
|
+
}
|
17
|
+
async handleKeyDown(event) {
|
18
|
+
if (event.key === 'Escape' || event.key === 'Esc') {
|
19
|
+
await this.hideActions();
|
20
|
+
}
|
21
|
+
}
|
22
|
+
async handleClose() {
|
23
|
+
await this.hideActions();
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* Exibe a lista de ações.
|
27
|
+
*/
|
28
|
+
async showActions() {
|
29
|
+
this._showDropdown = true;
|
30
|
+
requestAnimationFrame(() => {
|
31
|
+
this._element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' });
|
32
|
+
});
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Esaconde a lista de ações.
|
36
|
+
*/
|
37
|
+
async hideActions() {
|
38
|
+
this._showDropdown = false;
|
39
|
+
}
|
40
|
+
/**
|
41
|
+
* Informa se a lista de ações está aberta.
|
42
|
+
*/
|
43
|
+
async isOpened() {
|
44
|
+
return this._showDropdown;
|
45
|
+
}
|
46
|
+
controlDropdown() {
|
47
|
+
this._showDropdown = !this._showDropdown;
|
48
|
+
}
|
49
|
+
loadItems() {
|
50
|
+
return this.actions.filter(action => action !== undefined).map(action => {
|
51
|
+
var _a;
|
52
|
+
return {
|
53
|
+
id: action.value,
|
54
|
+
label: action.label,
|
55
|
+
value: action.value,
|
56
|
+
type: (_a = action.type) !== null && _a !== void 0 ? _a : 'item',
|
57
|
+
children: action.children,
|
58
|
+
iconName: action.iconName,
|
59
|
+
subAction: action.subAction,
|
60
|
+
group: action.group,
|
61
|
+
disableCloseOnSelect: action.disableCloseOnSelect,
|
62
|
+
};
|
63
|
+
});
|
64
|
+
}
|
65
|
+
canShowDropdown() {
|
66
|
+
var _a;
|
67
|
+
return this._showDropdown && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
68
|
+
}
|
69
|
+
onSelectAction(iAction) {
|
70
|
+
const actions = this.actions.map(action => (Object.assign(Object.assign({}, action), { id: action.value })));
|
71
|
+
const selectedAction = this.getSelectedAction(iAction.id, actions);
|
72
|
+
this.taskbarActionSelected.emit(selectedAction);
|
73
|
+
if (!selectedAction.disableCloseOnSelect) {
|
74
|
+
this._showDropdown = false;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
getSelectedAction(id, actions) {
|
78
|
+
let selectedItem;
|
79
|
+
for (const item of actions) {
|
80
|
+
if (item.id === id) {
|
81
|
+
selectedItem = item;
|
82
|
+
break;
|
83
|
+
}
|
84
|
+
if (!(item === null || item === void 0 ? void 0 : item.children))
|
85
|
+
continue;
|
86
|
+
selectedItem = this.getSelectedAction(id, item.children);
|
87
|
+
}
|
88
|
+
return selectedItem;
|
89
|
+
}
|
90
|
+
dropdownItemBuilder(item, _level) {
|
91
|
+
const itemAction = this.actions.find(action => action.value === item.id);
|
92
|
+
if (!itemAction || !itemAction.itemBuilder) {
|
93
|
+
return undefined;
|
94
|
+
}
|
95
|
+
const customContent = itemAction.itemBuilder(this._element, itemAction);
|
96
|
+
if (typeof customContent === 'string') {
|
97
|
+
return h("div", { innerHTML: customContent });
|
98
|
+
}
|
99
|
+
return customContent;
|
100
|
+
}
|
101
|
+
/**
|
102
|
+
* Existem algumas actions que precisam ser inicializadas assim que o componente é carregado,
|
103
|
+
* pois necessitam de algumas informações, como por exemplo a referência do elemento taskbar-actions-button na tela.
|
104
|
+
* É o caso do searchColumn/searhField
|
105
|
+
*/
|
106
|
+
initializeEagerItems() {
|
107
|
+
var _a;
|
108
|
+
(_a = this.actions) === null || _a === void 0 ? void 0 : _a.forEach(action => {
|
109
|
+
var _a;
|
110
|
+
if (action && action.eagerInitialize && action.itemBuilder) {
|
111
|
+
(_a = action.itemBuilder) === null || _a === void 0 ? void 0 : _a.call(action, this._element, action);
|
112
|
+
}
|
113
|
+
});
|
114
|
+
}
|
115
|
+
componentDidLoad() {
|
116
|
+
this.initializeEagerItems();
|
117
|
+
}
|
118
|
+
componentDidRender() {
|
119
|
+
if (this._showDropdown) {
|
120
|
+
this.taskbarActionsOpened.emit(this._element);
|
121
|
+
}
|
122
|
+
}
|
123
|
+
disconnectedCallback() {
|
124
|
+
this.taskbarActionsButtonDisconnected.emit();
|
125
|
+
}
|
126
|
+
render() {
|
127
|
+
return (h(Host, null, h("div", { class: `ez-padding-left--medium ${this.canShowDropdown() ? ' ez-elevation--16' : ''}` }, h("ez-button", { title: this.title, mode: 'icon', iconName: 'dots-vertical', size: 'small', enabled: this.enabled, onClick: () => this.controlDropdown() }), this.canShowDropdown() && h("ez-dropdown", { items: this.loadItems(), onEzClick: (evt) => this.onSelectAction(evt.detail), onEzOutsideClick: () => this._showDropdown = false, itemBuilder: (item, level) => this.dropdownItemBuilder(item, level) }))));
|
128
|
+
}
|
129
|
+
get _element() { return this; }
|
130
|
+
static get style() { return taskbarActionsButtonCss; }
|
131
|
+
}, [2, "taskbar-actions-button", {
|
132
|
+
"title": [1],
|
133
|
+
"enabled": [4],
|
134
|
+
"actions": [16],
|
135
|
+
"_showDropdown": [32],
|
136
|
+
"showActions": [64],
|
137
|
+
"hideActions": [64],
|
138
|
+
"isOpened": [64]
|
139
|
+
}, [[8, "keydown", "handleKeyDown"], [8, "ezOpenModal", "handleClose"]]]);
|
140
|
+
function defineCustomElement() {
|
141
|
+
if (typeof customElements === "undefined") {
|
142
|
+
return;
|
143
|
+
}
|
144
|
+
const components = ["taskbar-actions-button"];
|
145
|
+
components.forEach(tagName => { switch (tagName) {
|
146
|
+
case "taskbar-actions-button":
|
147
|
+
if (!customElements.get(tagName)) {
|
148
|
+
customElements.define(tagName, TaskbarActionsButton);
|
149
|
+
}
|
150
|
+
break;
|
151
|
+
} });
|
152
|
+
}
|
153
|
+
|
154
|
+
export { TaskbarActionsButton as T, defineCustomElement as d };
|
@@ -351,11 +351,12 @@ class PersonalizedFilterFetcher {
|
|
351
351
|
}
|
352
352
|
}
|
353
353
|
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
354
|
+
var CONFIG_SOURCE;
|
355
|
+
(function (CONFIG_SOURCE) {
|
356
|
+
CONFIG_SOURCE["form"] = "form";
|
357
|
+
CONFIG_SOURCE["grid"] = "grid";
|
358
|
+
CONFIG_SOURCE["filterBar"] = "filterBar";
|
359
|
+
})(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
|
359
360
|
class ConfigStorage {
|
360
361
|
static preload(resourceID, configName) {
|
361
362
|
ConfigStorage.loadFormConfig(configName, resourceID);
|
@@ -383,13 +384,11 @@ class ConfigStorage {
|
|
383
384
|
return ConfigStorage.configById.get(cacheID);
|
384
385
|
}
|
385
386
|
static async saveFilterBarConfig(config, name, resourceID) {
|
386
|
-
|
387
|
-
this.configById.delete(cacheID);
|
387
|
+
await this.deleteFilterBarConfigCache(name, resourceID);
|
388
388
|
return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
|
389
389
|
}
|
390
390
|
static async saveFormConfig(config, name, resourceID) {
|
391
|
-
|
392
|
-
this.configById.delete(cacheID);
|
391
|
+
await this.deleteFormConfigCache(name, resourceID);
|
393
392
|
return this.formConfigFetcher.saveConfig(config, name, resourceID);
|
394
393
|
}
|
395
394
|
static async saveCardState(config, name, resourceID) {
|
@@ -399,18 +398,16 @@ class ConfigStorage {
|
|
399
398
|
if (config == undefined) {
|
400
399
|
return;
|
401
400
|
}
|
402
|
-
|
403
|
-
this.configById.delete(cacheID);
|
401
|
+
await this.deleteGridConfigCache(name, resourceID);
|
404
402
|
return this.gridConfigFetcher.saveConfig(config, name, resourceID);
|
405
403
|
}
|
406
404
|
static async loadPersonalizedFilter(filterId, resourceID, configName) {
|
407
405
|
return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName);
|
408
406
|
}
|
409
407
|
static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
410
|
-
//Ao criar ou alterar um filtro personalizado,
|
408
|
+
//Ao criar ou alterar um filtro personalizado,
|
411
409
|
//precisamos remover o cache do status da filterbar.
|
412
|
-
|
413
|
-
this.configById.delete(cacheID);
|
410
|
+
await this.deleteFilterBarConfigCache(configName, resourceID);
|
414
411
|
return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
|
415
412
|
}
|
416
413
|
static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
@@ -419,6 +416,19 @@ class ConfigStorage {
|
|
419
416
|
static async validatePersonalizedFilter(dataUnitName, expression) {
|
420
417
|
return this.personalizedFilterFetcher.validatePersonalizedFilter(dataUnitName, expression);
|
421
418
|
}
|
419
|
+
static async deleteGridConfigCache(name, resourceID) {
|
420
|
+
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.grid);
|
421
|
+
}
|
422
|
+
static async deleteFormConfigCache(name, resourceID) {
|
423
|
+
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.form);
|
424
|
+
}
|
425
|
+
static async deleteFilterBarConfigCache(name, resourceID) {
|
426
|
+
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
|
427
|
+
}
|
428
|
+
static async deleteConfigCache(name, resourceID, source) {
|
429
|
+
const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
|
430
|
+
this.configById.delete(cacheID);
|
431
|
+
}
|
422
432
|
static buildCacheID(name, source, resourceID) {
|
423
433
|
if (name == undefined) {
|
424
434
|
return `req_${source}_${resourceID}`;
|
@@ -3,6 +3,7 @@ var SaveErrorsEnum;
|
|
3
3
|
SaveErrorsEnum["LINK_AND_FILE_AT_THE_SAME_TIME"] = "LINK_AND_FILE_AT_THE_SAME_TIME";
|
4
4
|
SaveErrorsEnum["ANY_LINK_OR_FILE_FILLED"] = "ANY_LINK_OR_FILE_FILLED";
|
5
5
|
SaveErrorsEnum["UNKNOWN"] = "UNKNOWN";
|
6
|
+
SaveErrorsEnum["DESCRIPTION_CANNOT_BE_CHANGED"] = "DESCRIPTION_CANNOT_BE_CHANGED";
|
6
7
|
})(SaveErrorsEnum || (SaveErrorsEnum = {}));
|
7
8
|
|
8
9
|
export { SaveErrorsEnum as S };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
1
|
+
import { C as ConfigStorage } from './ConfigStorage-4151acc8.js';
|
2
2
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
3
3
|
import { F as FormConfigFetcher } from './form-config-fetcher-36219cd3.js';
|
4
4
|
|
@@ -351,11 +351,24 @@ const snkAttachMessages = {
|
|
351
351
|
anyLinkOrFileFilled: {
|
352
352
|
title: "Atenção",
|
353
353
|
message: `É necessário preencher o campo "Link" ou anexar um arquivo.`
|
354
|
+
},
|
355
|
+
descriptionCannotBeChanged: {
|
356
|
+
title: "Atenção",
|
357
|
+
message: "O campo 'Descrição' não pode ser alterado."
|
354
358
|
}
|
355
359
|
},
|
356
360
|
taskbar: {
|
357
361
|
titleDownload: "Fazer download",
|
358
362
|
titleLink: "Abrir link",
|
363
|
+
},
|
364
|
+
attachMetadata: {
|
365
|
+
lblCode: "Código",
|
366
|
+
lblDescription: "Descrição",
|
367
|
+
lblFileOrLink: "Arquivo / Link",
|
368
|
+
lblUser: "Usuário",
|
369
|
+
lblDate: "Data de alteração",
|
370
|
+
lblFile: "Arquivo",
|
371
|
+
lblSubTitle: "Clique para selecionar um arquivo",
|
359
372
|
}
|
360
373
|
};
|
361
374
|
|
@@ -46,8 +46,35 @@ class TaskbarProcessor {
|
|
46
46
|
}
|
47
47
|
}
|
48
48
|
|
49
|
+
const EVENT_NAME = 'taskbarActionsOpened';
|
49
50
|
const buildFieldSearch = (action, optionLoader, onSelectField) => {
|
50
|
-
return h("ez-search", { class:
|
51
|
+
return h("ez-search", { class: 'ez-actions-button--bottom-padding', canShowError: 'false', showSelectedValue: 'false', showOptionValue: 'false', suppressEmptyOption: 'true', label: action.label, value: '', optionLoader: optionLoader, onEzChange: (evt) => onSelectField(evt.detail), ignoreLimitCharsToSearch: true });
|
52
|
+
};
|
53
|
+
async function focusOnFieldSerch(field) {
|
54
|
+
requestAnimationFrame(async () => {
|
55
|
+
if (field) {
|
56
|
+
const realElement = field['$elm$'];
|
57
|
+
if (!realElement)
|
58
|
+
return;
|
59
|
+
realElement.value = null;
|
60
|
+
await realElement.setFocus();
|
61
|
+
}
|
62
|
+
});
|
63
|
+
}
|
64
|
+
const openFieldSearch = async (moreOptions, field) => {
|
65
|
+
if (!moreOptions) {
|
66
|
+
return;
|
67
|
+
}
|
68
|
+
if ((await moreOptions.isOpened())) {
|
69
|
+
await focusOnFieldSerch(field);
|
70
|
+
return;
|
71
|
+
}
|
72
|
+
const eventHandler = () => {
|
73
|
+
focusOnFieldSerch(field);
|
74
|
+
moreOptions.removeEventListener(EVENT_NAME, eventHandler);
|
75
|
+
};
|
76
|
+
moreOptions.addEventListener(EVENT_NAME, eventHandler);
|
77
|
+
await moreOptions.showActions();
|
51
78
|
};
|
52
79
|
|
53
|
-
export { TaskbarProcessor as T, buildFieldSearch as b };
|
80
|
+
export { TaskbarProcessor as T, buildFieldSearch as b, openFieldSearch as o };
|
@@ -2,6 +2,7 @@ var PresentationMode;
|
|
2
2
|
(function (PresentationMode) {
|
3
3
|
PresentationMode["PRIMARY"] = "primary";
|
4
4
|
PresentationMode["SECONDARY"] = "secondary";
|
5
|
+
PresentationMode["SINGLE_TASKBAR"] = "singleTaskbar";
|
5
6
|
})(PresentationMode || (PresentationMode = {}));
|
6
7
|
var DataExporterOption;
|
7
8
|
(function (DataExporterOption) {
|
@@ -2206,10 +2206,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
2206
2206
|
return import(
|
2207
2207
|
/* webpackMode: "lazy" */
|
2208
2208
|
'./snk-filter-detail.entry.js').then(processMod, consoleError);
|
2209
|
-
case 'snk-actions-
|
2209
|
+
case 'snk-actions-button_2':
|
2210
2210
|
return import(
|
2211
2211
|
/* webpackMode: "lazy" */
|
2212
|
-
'./snk-actions-
|
2212
|
+
'./snk-actions-button_2.entry.js').then(processMod, consoleError);
|
2213
2213
|
case 'snk-simple-bar':
|
2214
2214
|
return import(
|
2215
2215
|
/* webpackMode: "lazy" */
|
package/dist/esm/loader.js
CHANGED
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
13
13
|
return patchEsm().then(() => {
|
14
|
-
return bootstrapLazy(JSON.parse("[[\"snk-filter-modal\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"configName\":[1025,\"config-name\"],\"filters\":[1040],\"applyFilters\":[16],\"closeModal\":[16],\"addPersonalizedFilter\":[16],\"editPersonalizedFilter\":[16],\"deletePersonalizedFilter\":[16],\"filtersToDelete\":[16]},[[0,\"deleteFilter\",\"deletePersonalizedFilterListener\"]]]]],[\"snk-actions-form\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-custom-slot-elements\",[[6,\"snk-custom-slot-elements\",{\"slotName\":[1,\"slot-name\"]}]]],[\"snk-entity-list\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"],\"resetValues\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-checkbox-list\",[[0,\"snk-filter-checkbox-list\",{\"config\":[1040],\"optionsList\":[32]}]]],[\"snk-filter-list\",[[4,\"snk-filter-list\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"items\":[16],\"getMessage\":[16],\"emptyText\":[1,\"empty-text\"],\"findFilterText\":[1,\"find-filter-text\"],\"buttonClass\":[1,\"button-class\"],\"_filterArgument\":[32],\"_showAll\":[32],\"hideDetail\":[64]},[[2,\"keydown\",\"keyDownHandler\"]]]]],[\"snk-filter-multi-select\",[[0,\"snk-filter-multi-select\",{\"value\":[1544],\"config\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-number\",[[0,\"snk-filter-number\",{\"config\":[16],\"getMessage\":[16],\"value\":[2],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-search\",[[0,\"snk-filter-search\",{\"config\":[16],\"value\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-text\",[[0,\"snk-filter-text\",{\"config\":[16],\"value\":[1]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-personalized-filter-editor\",[[2,\"snk-personalized-filter-editor\",{\"messagesBuilder\":[1040],\"presentationMode\":[2,\"presentation-mode\"],\"config\":[16],\"value\":[1040],\"items\":[32],\"show\":[64]}]]],[\"snk-print-selector\",[[2,\"snk-print-selector\",{\"_printServerActive\":[32],\"_selectedPrinter\":[32],\"_remotePrintersDataSource\":[32],\"_localPrintersDataSource\":[32],\"_printJobData\":[32],\"openPrintSelector\":[64]}]]],[\"snk-simple-bar\",[[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-expression-group_2\",[[2,\"snk-expression-group\",{\"parentTop\":[1026,\"parent-top\"],\"group\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityURI\":[1025,\"entity-u-r-i\"],\"_conditionOperator\":[32],\"_group\":[32],\"_selfTop\":[32],\"canAddExpression\":[32],\"_showDashes\":[32],\"getExpressionGroup\":[64]},[[8,\"ezExpressionLayoutChanged\",\"todoCompletedHandler\"]]],[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"entityURI\":[1025,\"entity-u-r-i\"],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-filter-advanced-mode_2\",[[2,\"snk-filter-assistent-mode\",{\"filterAssistent\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityUri\":[1025,\"entity-uri\"],\"application\":[1040]}],[2,\"snk-filter-advanced-mode\",{\"filterAssistent\":[1040],\"application\":[1040]}]]],[\"snk-personalized-filter\",[[2,\"snk-personalized-filter\",{\"messagesBuilder\":[1040],\"entityUri\":[1025,\"entity-uri\"],\"filterId\":[1025,\"filter-id\"],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_filterAssistentMode\":[32],\"_filterAssistent\":[32],\"createPersonalizedFilter\":[64]}]]],[\"snk-detail-view\",[[6,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"resourceID\":[1,\"resource-i-d\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[1040],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"_disabledButtons\":[32],\"_currentView\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-configurator\",[[2,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"viewMode\":[2,\"view-mode\"],\"customContainerId\":[1,\"custom-container-id\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-pesquisa\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"teste-pesquisa\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal-item\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}]]],[\"snk-filter-bar\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"allowDefault\":[32],\"scrollerLocked\":[32],\"showPersonalizedFilter\":[32],\"personalizedFilterId\":[32],\"reload\":[64],\"getFilterItem\":[64],\"updateFilterItem\":[64],\"addFilterItem\":[64],\"removeFilterItem\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-config-options\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_formConfigOptions\":[32],\"_fieldConfigSelected\":[32],\"_layoutFormConfig\":[32],\"_fieldsAvailable\":[32],\"_formConfig\":[32],\"_formConfigChanged\":[32],\"_optionFormConfigSelected\":[32],\"_optionFormConfigChanged\":[32],\"_tempGroups\":[32]}]]],[\"snk-select-box\",[[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}]]],[\"snk-grid-config\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"application\":[16],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}]]],[\"snk-filter-item\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-data-unit\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"ignoreSaveMessage\":[4,\"ignore-save-message\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64]}]]],[\"snk-filter-detail\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"show\":[64]}]]],[\"snk-exporter-email-sender\",[[0,\"snk-exporter-email-sender\",{\"getMessage\":[16],\"_config\":[32],\"_opened\":[32],\"_currentStep\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-exporter\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32],\"_releasedToExport\":[32]}]]],[\"snk-taskbar\",[[6,\"snk-taskbar\",{\"customSlotId\":[1,\"custom-slot-id\"],\"customContainerId\":[1,\"custom-container-id\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32],\"_customElements\":[32],\"_customElementsId\":[32],\"_slotContainer\":[32]}]]],[\"snk-grid\",[[6,\"snk-grid\",{\"columnFilterDataSource\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"selectionToastConfig\":[16],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"recordsValidator\":[16],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"gridHeaderCustomSlotId\":[1,\"grid-header-custom-slot-id\"],\"topTaskbarCustomSlotId\":[1,\"top-taskbar-custom-slot-id\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"_showSnkFilterBar\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64],\"findColumn\":[64],\"getFilterBar\":[64]}]]],[\"snk-guides-viewer\",[[6,\"snk-guides-viewer\",{\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"canEdit\":[4,\"can-edit\"],\"presentationMode\":[1,\"presentation-mode\"],\"resourceID\":[1,\"resource-i-d\"],\"detailTaskbarCustomContainerId\":[1,\"detail-taskbar-custom-container-id\"],\"_hasToCreateFieldSearch\":[32],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"_fieldToGetFocus\":[32],\"showFormConfig\":[64],\"findField\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-crud\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"selectionToastConfig\":[16],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"_canEdit\":[32],\"_resourceID\":[32],\"customContainerId\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64]}]]],[\"snk-form\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"resourceID\":[1,\"resource-i-d\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64]}]]],[\"snk-application\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"loadByPK\":[16],\"getKeyboardManager\":[64],\"isUserSup\":[64],\"addPendingAction\":[64],\"callServiceBroker\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"showAlerts\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadTotals\":[64],\"isLoadedByPk\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64],\"importScript\":[64],\"getApplicationPath\":[64],\"executeSelectDistinct\":[64],\"getDataFetcher\":[64],\"whenApplicationReady\":[64]}]]],[\"snk-simple-crud\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"mode\":[2],\"gridConfig\":[16],\"formConfig\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"_currentViewMode\":[32],\"_config\":[32],\"_fieldToGetFocus\":[32],\"_formFields\":[32],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]]]],[\"snk-attach\",[[2,\"snk-attach\",{\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"dataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"fieldToFocus\":[1,\"field-to-focus\"],\"showUp\":[64]}]]],[\"snk-actions-button\",[[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}]]],[\"snk-filter-field-search_2\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"searchEmpty\":[32],\"groupEmpty\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]]]"), options);
|
14
|
+
return bootstrapLazy(JSON.parse("[[\"snk-filter-modal\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"configName\":[1025,\"config-name\"],\"filters\":[1040],\"applyFilters\":[16],\"closeModal\":[16],\"addPersonalizedFilter\":[16],\"editPersonalizedFilter\":[16],\"deletePersonalizedFilter\":[16],\"filtersToDelete\":[16]},[[0,\"deleteFilter\",\"deletePersonalizedFilterListener\"]]]]],[\"snk-actions-form\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-custom-slot-elements\",[[6,\"snk-custom-slot-elements\",{\"slotName\":[1,\"slot-name\"]}]]],[\"snk-entity-list\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"],\"resetValues\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-checkbox-list\",[[0,\"snk-filter-checkbox-list\",{\"config\":[1040],\"optionsList\":[32]}]]],[\"snk-filter-list\",[[4,\"snk-filter-list\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"items\":[16],\"getMessage\":[16],\"emptyText\":[1,\"empty-text\"],\"findFilterText\":[1,\"find-filter-text\"],\"buttonClass\":[1,\"button-class\"],\"_filterArgument\":[32],\"_showAll\":[32],\"hideDetail\":[64]},[[2,\"keydown\",\"keyDownHandler\"]]]]],[\"snk-filter-multi-select\",[[0,\"snk-filter-multi-select\",{\"value\":[1544],\"config\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-number\",[[0,\"snk-filter-number\",{\"config\":[16],\"getMessage\":[16],\"value\":[2],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-search\",[[0,\"snk-filter-search\",{\"config\":[16],\"value\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-text\",[[0,\"snk-filter-text\",{\"config\":[16],\"value\":[1]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-personalized-filter-editor\",[[2,\"snk-personalized-filter-editor\",{\"messagesBuilder\":[1040],\"presentationMode\":[2,\"presentation-mode\"],\"config\":[16],\"value\":[1040],\"items\":[32],\"show\":[64]}]]],[\"snk-print-selector\",[[2,\"snk-print-selector\",{\"_printServerActive\":[32],\"_selectedPrinter\":[32],\"_remotePrintersDataSource\":[32],\"_localPrintersDataSource\":[32],\"_printJobData\":[32],\"openPrintSelector\":[64]}]]],[\"snk-simple-bar\",[[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-expression-group_2\",[[2,\"snk-expression-group\",{\"parentTop\":[1026,\"parent-top\"],\"group\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityURI\":[1025,\"entity-u-r-i\"],\"_conditionOperator\":[32],\"_group\":[32],\"_selfTop\":[32],\"canAddExpression\":[32],\"_showDashes\":[32],\"getExpressionGroup\":[64]},[[8,\"ezExpressionLayoutChanged\",\"todoCompletedHandler\"]]],[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"entityURI\":[1025,\"entity-u-r-i\"],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-filter-advanced-mode_2\",[[2,\"snk-filter-assistent-mode\",{\"filterAssistent\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityUri\":[1025,\"entity-uri\"],\"application\":[1040]}],[2,\"snk-filter-advanced-mode\",{\"filterAssistent\":[1040],\"application\":[1040]}]]],[\"snk-personalized-filter\",[[2,\"snk-personalized-filter\",{\"messagesBuilder\":[1040],\"entityUri\":[1025,\"entity-uri\"],\"filterId\":[1025,\"filter-id\"],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_filterAssistentMode\":[32],\"_filterAssistent\":[32],\"createPersonalizedFilter\":[64]}]]],[\"snk-detail-view\",[[6,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"resourceID\":[1,\"resource-i-d\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[1040],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"_disabledButtons\":[32],\"_currentView\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-configurator\",[[2,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"viewMode\":[2,\"view-mode\"],\"customContainerId\":[1,\"custom-container-id\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-pesquisa\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"teste-pesquisa\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal-item\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}]]],[\"snk-filter-bar\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"allowDefault\":[32],\"scrollerLocked\":[32],\"showPersonalizedFilter\":[32],\"personalizedFilterId\":[32],\"reload\":[64],\"getFilterItem\":[64],\"updateFilterItem\":[64],\"addFilterItem\":[64],\"removeFilterItem\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-config-options\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_formConfigOptions\":[32],\"_fieldConfigSelected\":[32],\"_layoutFormConfig\":[32],\"_fieldsAvailable\":[32],\"_formConfig\":[32],\"_formConfigChanged\":[32],\"_optionFormConfigSelected\":[32],\"_optionFormConfigChanged\":[32],\"_tempGroups\":[32]}]]],[\"snk-select-box\",[[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}]]],[\"snk-grid-config\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"application\":[16],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}]]],[\"snk-filter-item\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-data-unit\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"ignoreSaveMessage\":[4,\"ignore-save-message\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64]}]]],[\"snk-filter-detail\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"show\":[64]}]]],[\"snk-exporter-email-sender\",[[0,\"snk-exporter-email-sender\",{\"getMessage\":[16],\"_config\":[32],\"_opened\":[32],\"_currentStep\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-exporter\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32],\"_releasedToExport\":[32]}]]],[\"snk-taskbar\",[[6,\"snk-taskbar\",{\"customSlotId\":[1,\"custom-slot-id\"],\"customContainerId\":[1,\"custom-container-id\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32],\"_customElements\":[32],\"_customElementsId\":[32],\"_slotContainer\":[32]}]]],[\"snk-grid\",[[6,\"snk-grid\",{\"columnFilterDataSource\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"selectionToastConfig\":[16],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"recordsValidator\":[16],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"gridHeaderCustomSlotId\":[1,\"grid-header-custom-slot-id\"],\"topTaskbarCustomSlotId\":[1,\"top-taskbar-custom-slot-id\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"_showSnkFilterBar\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64],\"findColumn\":[64]}]]],[\"snk-guides-viewer\",[[6,\"snk-guides-viewer\",{\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"canEdit\":[4,\"can-edit\"],\"presentationMode\":[1,\"presentation-mode\"],\"resourceID\":[1,\"resource-i-d\"],\"detailTaskbarCustomContainerId\":[1,\"detail-taskbar-custom-container-id\"],\"_hasToCreateFieldSearch\":[32],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"_fieldToGetFocus\":[32],\"showFormConfig\":[64],\"findField\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-crud\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"selectionToastConfig\":[16],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"_canEdit\":[32],\"_resourceID\":[32],\"customContainerId\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64]}]]],[\"snk-form\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"resourceID\":[1,\"resource-i-d\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64]}]]],[\"snk-application\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"loadByPK\":[16],\"getKeyboardManager\":[64],\"isUserSup\":[64],\"addPendingAction\":[64],\"callServiceBroker\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"showAlerts\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadTotals\":[64],\"isLoadedByPk\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64],\"importScript\":[64],\"getApplicationPath\":[64],\"executeSelectDistinct\":[64],\"getDataFetcher\":[64],\"whenApplicationReady\":[64]}]]],[\"snk-simple-crud\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"mode\":[2],\"gridConfig\":[16],\"formConfig\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"_currentViewMode\":[32],\"_config\":[32],\"_fieldToGetFocus\":[32],\"_formFields\":[32],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]]]],[\"snk-attach\",[[2,\"snk-attach\",{\"fetcherType\":[1,\"fetcher-type\"],\"fetcher\":[16],\"dataUnit\":[16],\"dataUnitBuilder\":[16],\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"_currentFetcher\":[32],\"_currentDataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"fieldToFocus\":[1,\"field-to-focus\"],\"showUp\":[64]}]]],[\"snk-actions-button_2\",[[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}],[2,\"taskbar-actions-button\",{\"title\":[1],\"enabled\":[4],\"actions\":[16],\"_showDropdown\":[32],\"showActions\":[64],\"hideActions\":[64],\"isOpened\":[64]},[[8,\"keydown\",\"handleKeyDown\"],[8,\"ezOpenModal\",\"handleClose\"]]]]],[\"snk-filter-field-search_2\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"searchEmpty\":[32],\"groupEmpty\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]]]"), options);
|
15
15
|
});
|
16
16
|
};
|
17
17
|
|
@@ -198,13 +198,21 @@ class DatasetStrategy {
|
|
198
198
|
getFieldsList(dataUnit) {
|
199
199
|
let fields = ["__record__id__", "__record__label__"];
|
200
200
|
dataUnit.metadata.fields.forEach((descriptor) => {
|
201
|
-
if (descriptor.standAlone)
|
201
|
+
if (descriptor.standAlone)
|
202
202
|
return;
|
203
|
-
}
|
204
203
|
fields = fields.concat(this.getFieldNames(descriptor));
|
205
204
|
});
|
206
205
|
return fields;
|
207
206
|
}
|
207
|
+
getStandAloneFieldsList(dataUnit) {
|
208
|
+
let fields = {};
|
209
|
+
dataUnit.metadata.fields.forEach((currentField) => {
|
210
|
+
if (!currentField.standAlone)
|
211
|
+
return;
|
212
|
+
fields = Object.assign(Object.assign({}, fields), { [currentField.name]: { fieldType: currentField.dataType, userType: currentField.userInterface } });
|
213
|
+
});
|
214
|
+
return fields;
|
215
|
+
}
|
208
216
|
getFieldNames(descriptor) {
|
209
217
|
const descriptionField = this.getSearchDescriptionField(descriptor);
|
210
218
|
if (descriptionField == undefined) {
|
@@ -227,10 +235,7 @@ class DatasetStrategy {
|
|
227
235
|
totalRecordsCount: loadingInfo.count,
|
228
236
|
pagerID: loadingInfo.pagerId,
|
229
237
|
standAlone: false,
|
230
|
-
standAloneFieldsMD: {
|
231
|
-
__record__id__: { "fieldType": "S", "userType": "P" },
|
232
|
-
__record__label__: { "fieldType": "S", "userType": "P" }
|
233
|
-
},
|
238
|
+
standAloneFieldsMD: Object.assign({ __record__id__: { "fieldType": "S", "userType": "P" }, __record__label__: { "fieldType": "S", "userType": "P" } }, this.getStandAloneFieldsList(dataUnit)),
|
234
239
|
tryJoinedFields: true,
|
235
240
|
parallelLoader: useParallelLoader,
|
236
241
|
crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
|
@@ -740,4 +745,165 @@ class DataUnitFetcher {
|
|
740
745
|
}
|
741
746
|
}
|
742
747
|
|
743
|
-
|
748
|
+
class PesquisaFetcher {
|
749
|
+
constructor() {
|
750
|
+
this._defaultPageSize = 100;
|
751
|
+
this._templateByQuery = new Map();
|
752
|
+
this._searchListenersByDataUnit = new Map();
|
753
|
+
this.buldTemplates();
|
754
|
+
}
|
755
|
+
buldTemplates() {
|
756
|
+
this._templateByQuery.set("search", dist.gql `query($entityName: String! $argument: String $criteria: InputSearchCriteria $options: InputSearchOptions) {
|
757
|
+
$queryAlias$: search(entityName: $entityName argument: $argument criteria: $criteria options: $options){
|
758
|
+
value
|
759
|
+
label
|
760
|
+
}
|
761
|
+
}`);
|
762
|
+
}
|
763
|
+
loadSearchOptions(entityName, argument, criteria, options) {
|
764
|
+
var _a;
|
765
|
+
const cleanText = (argument === null || argument === void 0 ? void 0 : argument.toString().trim()) || undefined;
|
766
|
+
argument = isNaN(Number(cleanText)) && cleanText ? `%${cleanText}` : cleanText;
|
767
|
+
criteria === null || criteria === void 0 ? void 0 : criteria.params.forEach(param => {
|
768
|
+
if (param.dataType === DataType.OBJECT) {
|
769
|
+
param.value = JSON.stringify(param.value);
|
770
|
+
}
|
771
|
+
});
|
772
|
+
const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, options);
|
773
|
+
const values = {
|
774
|
+
argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
|
775
|
+
entityName,
|
776
|
+
criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
|
777
|
+
options: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions) || options,
|
778
|
+
};
|
779
|
+
if (values.options) {
|
780
|
+
(_a = values.options) === null || _a === void 0 ? true : delete _a.dataUnitId;
|
781
|
+
}
|
782
|
+
return new Promise((resolve, reject) => {
|
783
|
+
DataFetcher.get()
|
784
|
+
.callGraphQL({
|
785
|
+
values,
|
786
|
+
query: this._templateByQuery.get("search"),
|
787
|
+
})
|
788
|
+
.then((result) => {
|
789
|
+
resolve(result);
|
790
|
+
})
|
791
|
+
.catch((error) => {
|
792
|
+
reject(error);
|
793
|
+
});
|
794
|
+
});
|
795
|
+
}
|
796
|
+
loadAdvancedSearch(entityName, argument, criteria, searchOptions) {
|
797
|
+
var _a, _b, _c;
|
798
|
+
const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
|
799
|
+
const values = {
|
800
|
+
argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
|
801
|
+
criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
|
802
|
+
searchOptions: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions) || searchOptions,
|
803
|
+
};
|
804
|
+
const serviceName = "PesquisaSP.getSuggestion";
|
805
|
+
const externalCriteria = {
|
806
|
+
query: {
|
807
|
+
$: (_a = values.criteria) === null || _a === void 0 ? void 0 : _a.expression
|
808
|
+
}
|
809
|
+
};
|
810
|
+
if (((_b = values.criteria) === null || _b === void 0 ? void 0 : _b.params.length) > 0) {
|
811
|
+
externalCriteria.params = {
|
812
|
+
param: values.criteria.params.map(param => {
|
813
|
+
let value = param.value;
|
814
|
+
let type = param.dataType;
|
815
|
+
if (type === DataType.OBJECT) {
|
816
|
+
value = value.value;
|
817
|
+
type = "S";
|
818
|
+
}
|
819
|
+
else {
|
820
|
+
type = convertParamType(param.dataType);
|
821
|
+
}
|
822
|
+
return { $: value, type };
|
823
|
+
})
|
824
|
+
};
|
825
|
+
}
|
826
|
+
const options = searchOptions != undefined
|
827
|
+
? {
|
828
|
+
"pkFieldName": searchOptions.codeFieldName,
|
829
|
+
"label": searchOptions.descriptionFieldName,
|
830
|
+
"fieldName": searchOptions.codeFieldName,
|
831
|
+
"useDescriptionOptions": false,
|
832
|
+
"enableRowsCounter": true
|
833
|
+
}
|
834
|
+
: undefined;
|
835
|
+
const reqBody = {
|
836
|
+
"serviceName": serviceName,
|
837
|
+
"requestBody": {
|
838
|
+
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_c = values.searchOptions) === null || _c === void 0 ? void 0 : _c.rootEntity }, { options }),
|
839
|
+
"clientEventList": {
|
840
|
+
"clientEvent": []
|
841
|
+
}
|
842
|
+
}
|
843
|
+
};
|
844
|
+
return new Promise((resolve, reject) => {
|
845
|
+
DataFetcher.get()
|
846
|
+
.callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody))
|
847
|
+
.then(result => resolve(result))
|
848
|
+
.catch(error => reject(error));
|
849
|
+
});
|
850
|
+
}
|
851
|
+
addSearchListener(entityName, dataUnitID, listener) {
|
852
|
+
var _a;
|
853
|
+
const dataUnitSearchListeners = this._searchListenersByDataUnit.get(dataUnitID) || [];
|
854
|
+
const entityListener = dataUnitSearchListeners.find(currentListener => currentListener.entity === entityName);
|
855
|
+
if (!entityListener) {
|
856
|
+
this._searchListenersByDataUnit.set(dataUnitID, [...dataUnitSearchListeners, { entity: entityName, listener }]);
|
857
|
+
}
|
858
|
+
else {
|
859
|
+
for (const type of Object.keys(listener)) {
|
860
|
+
if (type in entityListener.listener) {
|
861
|
+
const listenerFunctionIsEquals = ((_a = entityListener.listener[type]) === null || _a === void 0 ? void 0 : _a.toString()) === listener[type].toString();
|
862
|
+
if (listenerFunctionIsEquals)
|
863
|
+
continue;
|
864
|
+
entityListener.listener[type] = listener[type];
|
865
|
+
}
|
866
|
+
}
|
867
|
+
}
|
868
|
+
return () => {
|
869
|
+
const newListeners = dataUnitSearchListeners.filter(currentListener => currentListener.entity !== entityName);
|
870
|
+
if (!newListeners.length) {
|
871
|
+
this._searchListenersByDataUnit.delete(dataUnitID);
|
872
|
+
return;
|
873
|
+
}
|
874
|
+
this._searchListenersByDataUnit.set(dataUnitID, newListeners);
|
875
|
+
};
|
876
|
+
}
|
877
|
+
applySearchListener(listenerType, entityName, argument, criteria, searchOptions) {
|
878
|
+
var _a;
|
879
|
+
const dataUnitId = searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.dataUnitId;
|
880
|
+
if (!dataUnitId)
|
881
|
+
return;
|
882
|
+
const entityListener = (_a = this._searchListenersByDataUnit.get(dataUnitId)) === null || _a === void 0 ? void 0 : _a.find(({ entity }) => entity === entityName);
|
883
|
+
if (!entityListener)
|
884
|
+
return;
|
885
|
+
const { listener } = entityListener;
|
886
|
+
if (!(listenerType in listener))
|
887
|
+
return;
|
888
|
+
return listener[listenerType]({ argument, criteria, searchOptions });
|
889
|
+
}
|
890
|
+
}
|
891
|
+
function convertParamType(dataType) {
|
892
|
+
//Alerta: Cuidado pra não contaminar o DataType com a implementação
|
893
|
+
//atual da pesquisa... em geral, somente inteiros,
|
894
|
+
//data (com ou sem hora) e string são realmente relevantes
|
895
|
+
switch (dataType) {
|
896
|
+
case DataType.NUMBER:
|
897
|
+
return "I";
|
898
|
+
case DataType.DATE:
|
899
|
+
return "D";
|
900
|
+
default:
|
901
|
+
return "S";
|
902
|
+
}
|
903
|
+
}
|
904
|
+
var SearchListenerType;
|
905
|
+
(function (SearchListenerType) {
|
906
|
+
SearchListenerType["beforeSearch"] = "beforeSearch";
|
907
|
+
})(SearchListenerType || (SearchListenerType = {}));
|
908
|
+
|
909
|
+
export { DataUnitFetcher as D, InMemoryLoader as I, PesquisaFetcher as P };
|