@sankhyalabs/sankhyablocks 8.15.0-rc.1 → 8.15.0-rc.3
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/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-e4a7c4c3.js → pesquisa-fetcher-c790ffb7.js} +3 -3
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_2.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +22 -1
- package/dist/cjs/snk-attach.cjs.entry.js +2 -2
- package/dist/cjs/snk-crud.cjs.entry.js +8 -5
- package/dist/cjs/snk-detail-view.cjs.entry.js +3 -3
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +17 -2
- package/dist/cjs/snk-grid.cjs.entry.js +3 -2
- package/dist/cjs/{snk-guides-viewer-d32c096f.js → snk-guides-viewer-89d08958.js} +5 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +2 -2
- package/dist/cjs/snk-taskbar.cjs.entry.js +90 -6
- package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-e8062d32.js} +6 -6
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +9 -9
- package/dist/collection/components/snk-crud/snk-crud.js +23 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +2 -2
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +17 -2
- package/dist/collection/components/snk-grid/snk-grid.js +19 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +6 -6
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +128 -6
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
- package/dist/components/dataunit-fetcher.js +3 -3
- package/dist/components/snk-application2.js +21 -0
- package/dist/components/snk-crud.js +7 -3
- package/dist/components/snk-detail-view2.js +3 -3
- package/dist/components/snk-entity-list.js +5 -3
- package/dist/components/snk-filter-bar2.js +17 -2
- package/dist/components/snk-grid2.js +3 -1
- package/dist/components/snk-taskbar2.js +101 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-fa0c2540.js → pesquisa-fetcher-4000d0b8.js} +3 -3
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_2.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +22 -1
- package/dist/esm/snk-attach.entry.js +2 -2
- package/dist/esm/snk-crud.entry.js +8 -5
- package/dist/esm/snk-detail-view.entry.js +3 -3
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +17 -2
- package/dist/esm/snk-grid.entry.js +3 -2
- package/dist/esm/{snk-guides-viewer-f49613c6.js → snk-guides-viewer-9052331a.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +3 -3
- package/dist/esm/snk-simple-crud.entry.js +2 -2
- package/dist/esm/snk-taskbar.entry.js +91 -7
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-1e667ab6.js} +6 -6
- package/dist/sankhyablocks/{p-282789a6.entry.js → p-0574c231.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3b0e4e08.js → p-0eb1ff03.js} +1 -1
- package/dist/sankhyablocks/{p-02e3a45b.entry.js → p-2180fd6c.entry.js} +1 -1
- package/dist/sankhyablocks/p-2495e6a9.entry.js +1 -0
- package/dist/sankhyablocks/{p-ac384baf.entry.js → p-2a663ce7.entry.js} +1 -1
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/{p-9b5944a4.entry.js → p-455372c5.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9bdbc7d8.entry.js → p-683f6726.entry.js} +1 -1
- package/dist/sankhyablocks/p-96ef14f9.entry.js +1 -0
- package/dist/sankhyablocks/{p-0ec5b2e5.js → p-a53ebcdb.js} +1 -1
- package/dist/sankhyablocks/p-b82ad89f.entry.js +1 -0
- package/dist/sankhyablocks/p-d24863c4.js +1 -0
- package/dist/sankhyablocks/{p-e817f254.entry.js → p-db4edd06.entry.js} +3 -3
- package/dist/sankhyablocks/p-f2689647.entry.js +1 -0
- 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/__mocks__/snk-application.d.ts +3 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +5 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +2 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +5 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +27 -1
- package/dist/types/components.d.ts +32 -0
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/package.json +9 -2
- package/dist/sankhyablocks/p-2582537c.entry.js +0 -1
- package/dist/sankhyablocks/p-374d03f6.js +0 -1
- package/dist/sankhyablocks/p-62896624.entry.js +0 -1
- package/dist/sankhyablocks/p-69efa80d.entry.js +0 -1
- package/dist/sankhyablocks/p-b05ab13d.entry.js +0 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const constants = require('./constants-35ddd366.js');
|
8
|
-
const taskbarElements = require('./taskbar-elements-
|
8
|
+
const taskbarElements = require('./taskbar-elements-e8062d32.js');
|
9
9
|
require('./DataFetcher-ba94ed5b.js');
|
10
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
10
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-c790ffb7.js');
|
11
11
|
const index$1 = require('./index-0922807b.js');
|
12
12
|
require('./ISave-e91b70a7.js');
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
@@ -5,17 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
8
|
-
const taskbarElements = require('./taskbar-elements-
|
8
|
+
const taskbarElements = require('./taskbar-elements-e8062d32.js');
|
9
9
|
const index$1 = require('./index-0922807b.js');
|
10
10
|
require('./index-102ba62d.js');
|
11
11
|
|
12
|
-
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
|
12
|
+
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:wrap}.no-wrap.sc-snk-taskbar-h{flex-wrap:nowrap}.full-width.sc-snk-taskbar-h{width:100%}.align-right.sc-snk-taskbar-h{justify-content:flex-end}.overflowed.sc-snk-taskbar{display:none}";
|
13
13
|
|
14
14
|
const SnkTaskbar = class {
|
15
15
|
constructor(hostRef) {
|
16
16
|
index.registerInstance(this, hostRef);
|
17
17
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
18
18
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
19
|
+
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
20
|
+
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
21
|
+
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
19
22
|
this._titleKeyByElement = {
|
20
23
|
[taskbarElements.TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
21
24
|
[taskbarElements.TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
|
@@ -33,11 +36,15 @@ const SnkTaskbar = class {
|
|
33
36
|
[taskbarElements.TaskbarElement.ATTACH]: "snkTaskbar.titleAttach",
|
34
37
|
};
|
35
38
|
this._permissions = undefined;
|
39
|
+
this._overFlowedElements = [];
|
36
40
|
this._customElements = undefined;
|
37
41
|
this._customElementsId = undefined;
|
38
42
|
this._slotContainer = undefined;
|
43
|
+
this._hiddenActionsList = [];
|
44
|
+
this.alignRigth = false;
|
39
45
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
40
46
|
this.customContainerId = undefined;
|
47
|
+
this.overflowStrategy = 'hiddenItems';
|
41
48
|
this.configName = undefined;
|
42
49
|
this.resourceID = undefined;
|
43
50
|
this.buttons = undefined;
|
@@ -51,6 +58,7 @@ const SnkTaskbar = class {
|
|
51
58
|
}
|
52
59
|
observeButtons() {
|
53
60
|
this._definitions = undefined;
|
61
|
+
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
54
62
|
}
|
55
63
|
// Internal methods
|
56
64
|
elementsFromString(strButtons) {
|
@@ -146,12 +154,19 @@ const SnkTaskbar = class {
|
|
146
154
|
}
|
147
155
|
const taskbarElement = taskbarElements.TaskbarElement[def.toString()];
|
148
156
|
if (taskbarElement) {
|
149
|
-
return taskbarElements.buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.
|
157
|
+
return taskbarElements.buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.buildDynamicActionsList(), this.configName, this.presentationMode);
|
150
158
|
}
|
151
159
|
else {
|
152
160
|
return taskbarElements.buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
153
161
|
}
|
154
162
|
}
|
163
|
+
buildDynamicActionsList() {
|
164
|
+
var _a;
|
165
|
+
if (this._hiddenActionsList.length) {
|
166
|
+
return [...((_a = this.actionsList) !== null && _a !== void 0 ? _a : []), { type: 'divider', label: "", value: "" }, ...this._hiddenActionsList];
|
167
|
+
}
|
168
|
+
return this.actionsList;
|
169
|
+
}
|
155
170
|
getIdElemBtnNative(taskbarElem) {
|
156
171
|
return core.StringUtils.toCamelCase(taskbarElem);
|
157
172
|
}
|
@@ -192,9 +207,11 @@ const SnkTaskbar = class {
|
|
192
207
|
});
|
193
208
|
}
|
194
209
|
addCustomElementContainer(elem) {
|
210
|
+
var _a;
|
195
211
|
const elementId = `${this.TASKBAR_ITEM_ID_PREFIX}${elem}`;
|
196
212
|
if (!this._customElementsId.includes(elementId)) {
|
197
213
|
this._customElementsId.push(elementId);
|
214
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.addNotOverFlowElement(elementId);
|
198
215
|
}
|
199
216
|
return index.h("span", { key: elementId, id: elementId });
|
200
217
|
}
|
@@ -231,15 +248,76 @@ const SnkTaskbar = class {
|
|
231
248
|
}
|
232
249
|
this.validatePresentationMode();
|
233
250
|
}
|
251
|
+
handleOverFlow(overFlowingElements) {
|
252
|
+
const elementsToHandle = overFlowingElements.filter(element => !this.hasToIgnoreOverFlow(element));
|
253
|
+
this.resetOverFlowedElements();
|
254
|
+
this.doOverFlowElements(elementsToHandle);
|
255
|
+
}
|
256
|
+
resetOverFlowedElements() {
|
257
|
+
this._overFlowedElements.forEach(element => {
|
258
|
+
element.classList.remove(core.OVERFLOWED_CLASS_NAME);
|
259
|
+
});
|
260
|
+
this._hiddenActionsList = [];
|
261
|
+
this._overFlowedElements = [];
|
262
|
+
}
|
263
|
+
doOverFlowElements(overFlowedElements) {
|
264
|
+
overFlowedElements.forEach(element => {
|
265
|
+
element.classList.add(core.OVERFLOWED_CLASS_NAME);
|
266
|
+
this._overFlowedElements.push(element);
|
267
|
+
this.addItemToActionList(element);
|
268
|
+
});
|
269
|
+
}
|
270
|
+
addItemToActionList(element) {
|
271
|
+
const taskbarElement = this.getTaskbarElementName(element);
|
272
|
+
if (taskbarElement && this.isEnabled(taskbarElement) && this.isAllowed(taskbarElement)) {
|
273
|
+
const optionItem = {
|
274
|
+
value: taskbarElement,
|
275
|
+
label: this.getTaskbarElementLabel(element),
|
276
|
+
iconName: this.getTaskbarElementIcon(element)
|
277
|
+
};
|
278
|
+
this._hiddenActionsList.push(optionItem);
|
279
|
+
}
|
280
|
+
}
|
281
|
+
getTaskbarElementName(element) {
|
282
|
+
var _a;
|
283
|
+
return (_a = element.getAttribute('data-taskbar-element')) !== null && _a !== void 0 ? _a : "";
|
284
|
+
}
|
285
|
+
getTaskbarElementIcon(element) {
|
286
|
+
var _a;
|
287
|
+
return (_a = element.getAttribute('data-taskbar-icon')) !== null && _a !== void 0 ? _a : "";
|
288
|
+
}
|
289
|
+
getTaskbarElementLabel(element) {
|
290
|
+
var _a;
|
291
|
+
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
292
|
+
}
|
293
|
+
hasToIgnoreOverFlow(element) {
|
294
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME);
|
295
|
+
}
|
296
|
+
handleOverFlowStrategy() {
|
297
|
+
if (this.overflowStrategy === 'hiddenItems') {
|
298
|
+
this._overFlowWatcher = new core.OverflowWatcher(this.buildOverFlowWatcherParams());
|
299
|
+
}
|
300
|
+
}
|
301
|
+
buildOverFlowWatcherParams() {
|
302
|
+
return {
|
303
|
+
element: this._element,
|
304
|
+
callback: this.handleOverFlow.bind(this),
|
305
|
+
overFlowDirection: core.OverflowDirection.HORIZONTAL,
|
306
|
+
notOverFlow: this.NOT_OVERFLOW_ELEMENTS
|
307
|
+
};
|
308
|
+
}
|
234
309
|
componentDidLoad() {
|
235
310
|
const dataInfo = { dataUnit: this.dataUnit };
|
236
311
|
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
312
|
+
this.handleOverFlowStrategy();
|
237
313
|
}
|
238
314
|
componentDidRender() {
|
239
315
|
this.appendCustomElementsInTaskbar();
|
240
316
|
}
|
241
317
|
disconnectedCallback() {
|
318
|
+
var _a;
|
242
319
|
this.unlinkAllCustomElements();
|
320
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
|
243
321
|
}
|
244
322
|
unlinkAllCustomElements() {
|
245
323
|
var _a;
|
@@ -257,8 +335,8 @@ const SnkTaskbar = class {
|
|
257
335
|
return undefined;
|
258
336
|
}
|
259
337
|
let index$1 = 0;
|
260
|
-
return (index.h(index.Host,
|
261
|
-
var _a;
|
338
|
+
return (index.h(index.Host, { class: this.getHostClasses() }, this.removeEmpty(this._definitions.map((elem) => {
|
339
|
+
var _a, _b;
|
262
340
|
if (elem === taskbarElements.TaskbarElement.DIVIDER) {
|
263
341
|
index$1 = 0;
|
264
342
|
}
|
@@ -274,8 +352,14 @@ const SnkTaskbar = class {
|
|
274
352
|
if (this._customElements.has(elem)) {
|
275
353
|
return this.addCustomElementContainer(elem);
|
276
354
|
}
|
355
|
+
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
277
356
|
return index.h("slot", { name: elem });
|
278
|
-
})), index.h("div", { class:
|
357
|
+
})), index.h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.customSlotId }))));
|
358
|
+
}
|
359
|
+
getHostClasses() {
|
360
|
+
if (this.overflowStrategy !== 'hiddenItems')
|
361
|
+
return 'no-wrap';
|
362
|
+
return `full-width ${this.alignRigth ? 'align-right' : ""}`;
|
279
363
|
}
|
280
364
|
get _element() { return index.getElement(this); }
|
281
365
|
static get watchers() { return {
|
@@ -94,26 +94,26 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
94
94
|
return index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--medium", "data-taskbar-divider": true });
|
95
95
|
case exports.TaskbarElement.DATA_EXPORTER:
|
96
96
|
const provider = (_a = index$1.store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
97
|
-
return index.h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
97
|
+
return index.h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
|
98
98
|
case exports.TaskbarElement.ATTACH:
|
99
99
|
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
100
100
|
case exports.TaskbarElement.ACTIONS_BUTTON:
|
101
|
-
return index.h("snk-actions-button", { "data-element-id": dataElementId });
|
101
|
+
return index.h("snk-actions-button", { "data-element-id": dataElementId, "data-taskbar-element": element });
|
102
102
|
}
|
103
103
|
};
|
104
104
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
105
|
-
return index.h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
105
|
+
return index.h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-taskbar-label": text, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
106
106
|
}
|
107
107
|
function iconButton(iconName, name, className, dataElementId, title, action, isEnabled) {
|
108
|
-
return index.h("ez-button", { key: dataElementId, title: title, mode: "icon", size: "small", class: className, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
|
108
|
+
return index.h("ez-button", { key: dataElementId, title: title, mode: "icon", size: "small", class: className, "data-taskbar-label": title, "data-taskbar-element": name, "data-taskbar-icon": iconName, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
|
109
109
|
}
|
110
110
|
function iconTextButton(iconName, name, className, dataElementId, text, title, action, isEnabled) {
|
111
|
-
return index.h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) },
|
111
|
+
return index.h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-taskbar-label": text, "data-taskbar-icon": iconName, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) },
|
112
112
|
index.h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
113
113
|
}
|
114
114
|
function actionButton(element, dataElementId, title, isEnabled, actions, action) {
|
115
115
|
return actions && actions.length > 0
|
116
|
-
? index.h("taskbar-actions-button", { key: dataElementId, title: title, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
116
|
+
? index.h("taskbar-actions-button", { key: dataElementId, title: title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
117
117
|
: undefined;
|
118
118
|
}
|
119
119
|
|
@@ -2150,6 +2150,10 @@ export class SnkApplication {
|
|
2150
2150
|
"Promise": {
|
2151
2151
|
"location": "global"
|
2152
2152
|
},
|
2153
|
+
"IOption": {
|
2154
|
+
"location": "import",
|
2155
|
+
"path": "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search"
|
2156
|
+
},
|
2153
2157
|
"ISearchArgument": {
|
2154
2158
|
"location": "import",
|
2155
2159
|
"path": "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search"
|
@@ -2161,16 +2165,12 @@ export class SnkApplication {
|
|
2161
2165
|
"Array": {
|
2162
2166
|
"location": "global"
|
2163
2167
|
},
|
2164
|
-
"IOption": {
|
2165
|
-
"location": "import",
|
2166
|
-
"path": "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search"
|
2167
|
-
},
|
2168
2168
|
"SearchCriteria": {
|
2169
2169
|
"location": "import",
|
2170
2170
|
"path": "../../lib/http/data-fetcher/fetchers/pesquisa-fetcher"
|
2171
2171
|
}
|
2172
2172
|
},
|
2173
|
-
"return": "Promise<
|
2173
|
+
"return": "Promise<IOption | IOption[]>"
|
2174
2174
|
},
|
2175
2175
|
"docs": {
|
2176
2176
|
"text": "Obt\u00E9m as op\u00E7\u00F5es em componentes de pesquisa\nEx.: snk-config-options",
|
@@ -2194,18 +2194,18 @@ export class SnkApplication {
|
|
2194
2194
|
"Promise": {
|
2195
2195
|
"location": "global"
|
2196
2196
|
},
|
2197
|
-
"Array": {
|
2198
|
-
"location": "global"
|
2199
|
-
},
|
2200
2197
|
"IOption": {
|
2201
2198
|
"location": "import",
|
2202
2199
|
"path": "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search"
|
2203
2200
|
},
|
2201
|
+
"Array": {
|
2202
|
+
"location": "global"
|
2203
|
+
},
|
2204
2204
|
"HTMLSnkPesquisaElement": {
|
2205
2205
|
"location": "global"
|
2206
2206
|
}
|
2207
2207
|
},
|
2208
|
-
"return": "Promise<
|
2208
|
+
"return": "Promise<IOption | IOption[]>"
|
2209
2209
|
},
|
2210
2210
|
"docs": {
|
2211
2211
|
"text": "Obt\u00E9m as op\u00E7\u00F5es em componentes de pesquisa\nEx.: snk-config-options",
|
@@ -30,6 +30,7 @@ export class SnkCrud {
|
|
30
30
|
this.presentationMode = PresentationMode.PRIMARY;
|
31
31
|
this.messagesBuilder = undefined;
|
32
32
|
this.useEnterLikeTab = false;
|
33
|
+
this.disablePersonalizedFilter = undefined;
|
33
34
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
34
35
|
}
|
35
36
|
/**
|
@@ -162,7 +163,8 @@ export class SnkCrud {
|
|
162
163
|
window.removeEventListener("keydown", this._keyDownHandler);
|
163
164
|
}
|
164
165
|
async initKeyboardManager() {
|
165
|
-
|
166
|
+
var _a;
|
167
|
+
const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
|
166
168
|
if (keyboardManager) {
|
167
169
|
const dataUnit = this._dataUnit || await this._snkDataUnit.getDataUnit();
|
168
170
|
async function saveDataUnitHandlingFocus() {
|
@@ -211,7 +213,8 @@ export class SnkCrud {
|
|
211
213
|
}
|
212
214
|
}
|
213
215
|
async removeShortcuts() {
|
214
|
-
|
216
|
+
var _a;
|
217
|
+
const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
|
215
218
|
if (keyboardManager) {
|
216
219
|
keyboardManager
|
217
220
|
.unbind("F6")
|
@@ -278,7 +281,7 @@ export class SnkCrud {
|
|
278
281
|
return;
|
279
282
|
}
|
280
283
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
281
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
284
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
282
285
|
}
|
283
286
|
static get is() { return "snk-crud"; }
|
284
287
|
static get encapsulation() { return "scoped"; }
|
@@ -514,6 +517,23 @@ export class SnkCrud {
|
|
514
517
|
"attribute": "use-enter-like-tab",
|
515
518
|
"reflect": false,
|
516
519
|
"defaultValue": "false"
|
520
|
+
},
|
521
|
+
"disablePersonalizedFilter": {
|
522
|
+
"type": "boolean",
|
523
|
+
"mutable": false,
|
524
|
+
"complexType": {
|
525
|
+
"original": "boolean",
|
526
|
+
"resolved": "boolean",
|
527
|
+
"references": {}
|
528
|
+
},
|
529
|
+
"required": false,
|
530
|
+
"optional": false,
|
531
|
+
"docs": {
|
532
|
+
"tags": [],
|
533
|
+
"text": "Desabilita a apresenta\u00E7\u00E3o da op\u00E7\u00E3o de filtros personalizados na filter bar (chip de filtros) \ne no modal lateral de filtros (container de filtros personalizados)."
|
534
|
+
},
|
535
|
+
"attribute": "disable-personalized-filter",
|
536
|
+
"reflect": false
|
517
537
|
}
|
518
538
|
};
|
519
539
|
}
|
@@ -25,7 +25,7 @@ snk-form-view {
|
|
25
25
|
position: relative;
|
26
26
|
padding-left: 0px;
|
27
27
|
padding-top: 0px;
|
28
|
-
|
28
|
+
|
29
29
|
/*public*/
|
30
30
|
padding-right: var(--snk-guides-viewer--space-large);
|
31
31
|
padding-bottom: var(--snk-guides-viewer--space-large);
|
@@ -57,6 +57,15 @@ snk-form-view {
|
|
57
57
|
margin-bottom: var(--snk-guides-viewer--space-medium);
|
58
58
|
}
|
59
59
|
|
60
|
+
.snk-guides-viewer__header-breadcrumb{
|
61
|
+
width: 25%;
|
62
|
+
display: flex;
|
63
|
+
}
|
64
|
+
|
65
|
+
.snk-guides-viewer__header-taskbar{
|
66
|
+
width: 75%;
|
67
|
+
}
|
68
|
+
|
60
69
|
.snk-guides-viewer__container {
|
61
70
|
/*private*/
|
62
71
|
display: grid;
|
@@ -88,4 +97,4 @@ snk-form-view {
|
|
88
97
|
min-height: 100%;
|
89
98
|
align-items: flex-start;
|
90
99
|
align-content: flex-start;
|
91
|
-
}
|
100
|
+
}
|
@@ -383,7 +383,7 @@ export class SnkGuidesViewer {
|
|
383
383
|
}
|
384
384
|
buildTaskBar() {
|
385
385
|
var _a;
|
386
|
-
return h("div", { class: `
|
386
|
+
return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
|
387
387
|
}
|
388
388
|
async dataUnitActionHandler(action) {
|
389
389
|
var _a;
|
@@ -442,7 +442,7 @@ export class SnkGuidesViewer {
|
|
442
442
|
}
|
443
443
|
this.loadTaskbarProcessor();
|
444
444
|
const showGuides = this._guides && (this._guides.length > 1);
|
445
|
-
return (h("section", { class: "snk-guides-viewer" }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "
|
445
|
+
return (h("section", { class: "snk-guides-viewer" }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getMessage("snkCrud.title")), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
446
446
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
447
447
|
h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
|
448
448
|
:
|
@@ -56,16 +56,18 @@ export class SnkEntityList {
|
|
56
56
|
this.loadListSource();
|
57
57
|
}
|
58
58
|
optionLoader(searchArgument) {
|
59
|
-
var _a, _b, _c, _d;
|
59
|
+
var _a, _b, _c, _d, _e, _f;
|
60
60
|
const { mode, argument } = searchArgument;
|
61
61
|
if (this._application === undefined) {
|
62
62
|
return;
|
63
63
|
}
|
64
64
|
const searchOptions = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.searchContext) === null || _c === void 0 ? void 0 : _c.searchOptions;
|
65
|
+
const criteria = (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.criteria;
|
65
66
|
const options = {
|
66
|
-
entityDescription: (
|
67
|
+
entityDescription: (_f = this.config) === null || _f === void 0 ? void 0 : _f.label,
|
67
68
|
entity: this._entityName,
|
68
|
-
searchOptions: searchOptions
|
69
|
+
searchOptions: searchOptions,
|
70
|
+
criteria,
|
69
71
|
};
|
70
72
|
return this._application.executePreparedSearch(mode, argument, options);
|
71
73
|
}
|
@@ -11,6 +11,7 @@ export class SnkFilterBar {
|
|
11
11
|
this._updateSequence = [];
|
12
12
|
this._loadingPending = false;
|
13
13
|
this._configUpdated = false;
|
14
|
+
this._firstLoad = true;
|
14
15
|
this._pendingVariables = false;
|
15
16
|
this._customfiltersToBeUpdated = [];
|
16
17
|
this._calculateSortIndex = (item) => {
|
@@ -165,13 +166,27 @@ export class SnkFilterBar {
|
|
165
166
|
return;
|
166
167
|
}
|
167
168
|
this._loadingPending = false;
|
168
|
-
this.dataUnit.
|
169
|
+
this.doLoadData(this.dataUnit.getLastLoadRequest() != undefined);
|
169
170
|
}
|
170
171
|
if (this._configUpdated) {
|
171
172
|
this._configUpdated = false;
|
172
173
|
ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName, this.resourceID);
|
173
174
|
}
|
174
175
|
}
|
176
|
+
async doLoadData(forceReload = false) {
|
177
|
+
try {
|
178
|
+
if (this._firstLoad && !forceReload) {
|
179
|
+
let autoLoad = await this._application.getBooleanParam("global.carregar.registros.iniciar.tela");
|
180
|
+
if (!autoLoad) {
|
181
|
+
return;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
this.dataUnit.loadData(undefined, undefined, true);
|
185
|
+
}
|
186
|
+
finally {
|
187
|
+
this._firstLoad = false;
|
188
|
+
}
|
189
|
+
}
|
175
190
|
/**
|
176
191
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
177
192
|
* através de um pequeno modulo na estrutura da aplicação:
|
@@ -209,7 +224,7 @@ export class SnkFilterBar {
|
|
209
224
|
registryFilterProvider() {
|
210
225
|
this.dataUnit.addFilterProvider(this);
|
211
226
|
if (this.filterConfig) {
|
212
|
-
this.
|
227
|
+
this.doLoadData();
|
213
228
|
}
|
214
229
|
}
|
215
230
|
itemFocused(selectedItem) {
|
@@ -52,6 +52,7 @@ export class SnkGrid {
|
|
52
52
|
this.taskbarCustomContainerId = undefined;
|
53
53
|
this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
|
54
54
|
this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
|
55
|
+
this.disablePersonalizedFilter = undefined;
|
55
56
|
}
|
56
57
|
/**
|
57
58
|
* Exibe a janela de configurações da grade.
|
@@ -399,7 +400,7 @@ export class SnkGrid {
|
|
399
400
|
return undefined;
|
400
401
|
}
|
401
402
|
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
|
402
|
-
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail) }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
403
|
+
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
403
404
|
}
|
404
405
|
static get is() { return "snk-grid"; }
|
405
406
|
static get encapsulation() { return "scoped"; }
|
@@ -742,6 +743,23 @@ export class SnkGrid {
|
|
742
743
|
"attribute": "top-taskbar-custom-slot-id",
|
743
744
|
"reflect": false,
|
744
745
|
"defaultValue": "'GRID_TASKBAR_CUSTOM_ELEMENTS'"
|
746
|
+
},
|
747
|
+
"disablePersonalizedFilter": {
|
748
|
+
"type": "boolean",
|
749
|
+
"mutable": false,
|
750
|
+
"complexType": {
|
751
|
+
"original": "boolean",
|
752
|
+
"resolved": "boolean",
|
753
|
+
"references": {}
|
754
|
+
},
|
755
|
+
"required": false,
|
756
|
+
"optional": false,
|
757
|
+
"docs": {
|
758
|
+
"tags": [],
|
759
|
+
"text": "Desabilita a apresenta\u00E7\u00E3o da op\u00E7\u00E3o de filtros personalizados na filter bar (chip de filtros) \ne no modal lateral de filtros (container de filtros personalizados)."
|
760
|
+
},
|
761
|
+
"attribute": "disable-personalized-filter",
|
762
|
+
"reflect": false
|
745
763
|
}
|
746
764
|
};
|
747
765
|
}
|
@@ -91,24 +91,24 @@ export const buildElem = (element, className, dataElementId, getTitle, action, i
|
|
91
91
|
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--medium", "data-taskbar-divider": true });
|
92
92
|
case TaskbarElement.DATA_EXPORTER:
|
93
93
|
const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
94
|
-
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
94
|
+
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
|
95
95
|
case TaskbarElement.ATTACH:
|
96
96
|
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
97
97
|
case TaskbarElement.ACTIONS_BUTTON:
|
98
|
-
return h("snk-actions-button", { "data-element-id": dataElementId });
|
98
|
+
return h("snk-actions-button", { "data-element-id": dataElementId, "data-taskbar-element": element });
|
99
99
|
}
|
100
100
|
};
|
101
101
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
102
|
-
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
102
|
+
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-taskbar-label": text, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
103
103
|
}
|
104
104
|
function iconButton(iconName, name, className, dataElementId, title, action, isEnabled) {
|
105
|
-
return h("ez-button", { key: dataElementId, title: title, mode: "icon", size: "small", class: className, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
|
105
|
+
return h("ez-button", { key: dataElementId, title: title, mode: "icon", size: "small", class: className, "data-taskbar-label": title, "data-taskbar-element": name, "data-taskbar-icon": iconName, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
|
106
106
|
}
|
107
107
|
function iconTextButton(iconName, name, className, dataElementId, text, title, action, isEnabled) {
|
108
|
-
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
108
|
+
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-taskbar-label": text, "data-taskbar-icon": iconName, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
109
109
|
}
|
110
110
|
function actionButton(element, dataElementId, title, isEnabled, actions, action) {
|
111
111
|
return actions && actions.length > 0
|
112
|
-
? h("taskbar-actions-button", { key: dataElementId, title: title, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
112
|
+
? h("taskbar-actions-button", { key: dataElementId, title: title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
113
113
|
: undefined;
|
114
114
|
}
|