@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-99992.1 → 0.0.0-bugfix-dev-KB-47082.0
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-302bbbd4.js → ConfigStorage-d4c99a5e.js} +2 -2
- package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-99f0f6ed.js} +5 -3
- package/dist/cjs/{SnkFormConfigManager-71c4768e.js → SnkFormConfigManager-3621bfc4.js} +2 -2
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-5161d082.js} +1 -1
- package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-9f1a13ca.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-c790ffb7.js → pesquisa-fetcher-c416a6b7.js} +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_2.cjs.entry.js +4 -4
- package/dist/cjs/snk-application.cjs.entry.js +5 -5
- package/dist/cjs/snk-attach.cjs.entry.js +5 -5
- package/dist/cjs/snk-crud.cjs.entry.js +7 -6
- package/dist/cjs/snk-data-exporter.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- package/dist/cjs/snk-filter-bar.cjs.entry.js +12 -5
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-config.cjs.entry.js +41 -27
- package/dist/cjs/snk-form.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid-config.cjs.entry.js +3 -3
- package/dist/cjs/snk-grid.cjs.entry.js +6 -5
- package/dist/cjs/{snk-guides-viewer-32c1d35d.js → snk-guides-viewer-bd69fce4.js} +5 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +6 -6
- package/dist/cjs/snk-taskbar.cjs.entry.js +41 -5
- package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-1e4fb2e0.js} +8 -8
- package/dist/collection/components/snk-crud/snk-crud.js +20 -2
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +23 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +75 -2
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +39 -25
- package/dist/collection/components/snk-grid/snk-grid.js +20 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +2 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +1 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +8 -8
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +42 -5
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +5 -3
- package/dist/components/DataFetcher.js +5 -3
- package/dist/components/snk-crud.js +3 -1
- package/dist/components/snk-filter-bar2.js +13 -3
- package/dist/components/snk-form-config2.js +39 -25
- package/dist/components/snk-grid2.js +3 -1
- package/dist/components/snk-simple-crud2.js +2 -2
- package/dist/components/snk-taskbar2.js +50 -13
- package/dist/components/taskbar-actions-button2.js +1 -1
- package/dist/esm/{ConfigStorage-4151acc8.js → ConfigStorage-39ed8aeb.js} +2 -2
- package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-a650ae58.js} +5 -3
- package/dist/esm/{SnkFormConfigManager-5c7d3771.js → SnkFormConfigManager-692e20c7.js} +2 -2
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-17dc5b5e.js} +1 -1
- package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-f121f880.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-4000d0b8.js → pesquisa-fetcher-ab16a2e8.js} +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_2.entry.js +4 -4
- package/dist/esm/snk-application.entry.js +5 -5
- package/dist/esm/snk-attach.entry.js +5 -5
- package/dist/esm/snk-crud.entry.js +7 -6
- package/dist/esm/snk-data-exporter.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +7 -7
- package/dist/esm/snk-filter-bar.entry.js +12 -5
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form-config.entry.js +41 -27
- package/dist/esm/snk-form.entry.js +4 -4
- package/dist/esm/snk-grid-config.entry.js +3 -3
- package/dist/esm/snk-grid.entry.js +6 -5
- package/dist/esm/{snk-guides-viewer-8adacfd4.js → snk-guides-viewer-fde82cc1.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-simple-crud.entry.js +6 -6
- package/dist/esm/snk-taskbar.entry.js +41 -5
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-846c027c.js} +8 -8
- package/dist/sankhyablocks/p-11ad137d.entry.js +1 -0
- package/dist/sankhyablocks/p-3e2e2424.entry.js +1 -0
- package/dist/sankhyablocks/p-3e91d5ea.entry.js +1 -0
- package/dist/sankhyablocks/p-50783a8b.js +1 -0
- package/dist/sankhyablocks/{p-2419f19f.js → p-57212bb5.js} +1 -1
- package/dist/sankhyablocks/{p-0574c231.entry.js → p-5f5b58b6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-aa95fb2c.js → p-67aedbe0.js} +1 -1
- package/dist/sankhyablocks/{p-573a07c5.js → p-725d04ba.js} +1 -1
- package/dist/sankhyablocks/{p-e0fd9555.entry.js → p-827e4b01.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e0b23084.entry.js → p-84bb8f47.entry.js} +1 -1
- package/dist/sankhyablocks/p-8c13d8d6.entry.js +1 -0
- package/dist/sankhyablocks/p-8c49760e.js +1 -0
- package/dist/sankhyablocks/{p-11bbb65e.entry.js → p-91b7f78a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7f3c7b09.entry.js → p-9d608b62.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0d7863ed.js → p-a13ccb86.js} +1 -1
- package/dist/sankhyablocks/p-b7004423.entry.js +1 -0
- package/dist/sankhyablocks/{p-9695f78b.js → p-be75153c.js} +1 -1
- package/dist/sankhyablocks/{p-0eb1ff03.js → p-c6247955.js} +1 -1
- package/dist/sankhyablocks/{p-3838d2ff.entry.js → p-d4802f81.entry.js} +1 -1
- package/dist/sankhyablocks/{p-761ed32f.entry.js → p-e3bd000e.entry.js} +1 -1
- package/dist/sankhyablocks/p-fb842329.entry.js +1 -0
- package/dist/sankhyablocks/{p-1d75d9f9.entry.js → p-fcdcb0e2.entry.js} +1 -1
- package/dist/sankhyablocks/{p-db4edd06.entry.js → p-fd0a8d68.entry.js} +1 -1
- package/dist/sankhyablocks/{p-40915359.entry.js → p-fdc4cb9b.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/snk-crud.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +12 -1
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +1 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +7 -0
- package/dist/types/components.d.ts +43 -6
- package/package.json +1 -1
- package/dist/sankhyablocks/p-374d03f6.js +0 -1
- package/dist/sankhyablocks/p-45d82274.entry.js +0 -1
- package/dist/sankhyablocks/p-79b4b271.entry.js +0 -1
- package/dist/sankhyablocks/p-96ef14f9.entry.js +0 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
- package/dist/sankhyablocks/p-df2b84c4.entry.js +0 -1
- package/dist/sankhyablocks/p-e6380c60.js +0 -1
- package/dist/sankhyablocks/p-ed2dce4b.entry.js +0 -1
|
@@ -20,6 +20,7 @@ export class SnkCrud {
|
|
|
20
20
|
this._canEdit = undefined;
|
|
21
21
|
this._resourceID = undefined;
|
|
22
22
|
this.configName = undefined;
|
|
23
|
+
this.filterBarTitle = undefined;
|
|
23
24
|
this.selectionToastConfig = undefined;
|
|
24
25
|
this.showActionButtons = false;
|
|
25
26
|
this.actionsList = undefined;
|
|
@@ -281,7 +282,7 @@ export class SnkCrud {
|
|
|
281
282
|
return;
|
|
282
283
|
}
|
|
283
284
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
|
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" }))));
|
|
285
|
+
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, filterBarTitle: this.filterBarTitle, "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" }))));
|
|
285
286
|
}
|
|
286
287
|
static get is() { return "snk-crud"; }
|
|
287
288
|
static get encapsulation() { return "scoped"; }
|
|
@@ -314,6 +315,23 @@ export class SnkCrud {
|
|
|
314
315
|
"attribute": "config-name",
|
|
315
316
|
"reflect": false
|
|
316
317
|
},
|
|
318
|
+
"filterBarTitle": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"mutable": false,
|
|
321
|
+
"complexType": {
|
|
322
|
+
"original": "string",
|
|
323
|
+
"resolved": "string",
|
|
324
|
+
"references": {}
|
|
325
|
+
},
|
|
326
|
+
"required": false,
|
|
327
|
+
"optional": false,
|
|
328
|
+
"docs": {
|
|
329
|
+
"tags": [],
|
|
330
|
+
"text": "T\u00EDtulo que ser\u00E1 apresentado na barra de filtros"
|
|
331
|
+
},
|
|
332
|
+
"attribute": "filter-bar-title",
|
|
333
|
+
"reflect": false
|
|
334
|
+
},
|
|
317
335
|
"selectionToastConfig": {
|
|
318
336
|
"type": "unknown",
|
|
319
337
|
"mutable": false,
|
|
@@ -530,7 +548,7 @@ export class SnkCrud {
|
|
|
530
548
|
"optional": false,
|
|
531
549
|
"docs": {
|
|
532
550
|
"tags": [],
|
|
533
|
-
"text": "Desabilita a apresenta\u00E7\u00E3o da op\u00E7\u00E3o de filtros personalizados na filter bar (chip de filtros)
|
|
551
|
+
"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
552
|
},
|
|
535
553
|
"attribute": "disable-personalized-filter",
|
|
536
554
|
"reflect": false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: minmax(100px, 100%) 1fr 1fr;
|
|
3
|
+
grid-template-columns: 1fr minmax(100px, 100%) 1fr 1fr;
|
|
4
4
|
|
|
5
5
|
/*@doc Define o z-index do componente.*/
|
|
6
6
|
--snk-personalized-filter--z-index: var(--elevation--20, 20);
|
|
@@ -8,6 +8,28 @@
|
|
|
8
8
|
--snk-personalized-filter--background-color: var(--background--xlight, #fff);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
.snk-filter-bar__title {
|
|
12
|
+
max-width: 260px;
|
|
13
|
+
display: inline-block;
|
|
14
|
+
text-overflow: ellipsis;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
font-size: 16px;
|
|
18
|
+
font-family: var(--font-pattern, Arial);
|
|
19
|
+
font-weight: var(--text-weight--large, 600);
|
|
20
|
+
color: var(--color--title-primary, #2B3A54);
|
|
21
|
+
margin-top: 8px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([data-mode="hidden"]) {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([data-mode="button"]) {
|
|
29
|
+
grid-template-columns: 1fr;
|
|
30
|
+
width: fit-content;
|
|
31
|
+
}
|
|
32
|
+
|
|
11
33
|
.snk-filter__popover-container{
|
|
12
34
|
/*private*/
|
|
13
35
|
display: flex;
|
|
@@ -28,8 +28,10 @@ export class SnkFilterBar {
|
|
|
28
28
|
return this._calculateSortIndex(b) - this._calculateSortIndex(a);
|
|
29
29
|
};
|
|
30
30
|
this.dataUnit = undefined;
|
|
31
|
+
this.title = undefined;
|
|
31
32
|
this.configName = undefined;
|
|
32
33
|
this.resourceID = undefined;
|
|
34
|
+
this.mode = "regular";
|
|
33
35
|
this.filterConfig = undefined;
|
|
34
36
|
this.messagesBuilder = undefined;
|
|
35
37
|
this.disablePersonalizedFilter = undefined;
|
|
@@ -347,6 +349,9 @@ export class SnkFilterBar {
|
|
|
347
349
|
filterChangeListener(evt) {
|
|
348
350
|
this.updateFilter(evt.detail);
|
|
349
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* Abre o modal de filtros
|
|
354
|
+
*/
|
|
350
355
|
async showFilterModal() {
|
|
351
356
|
const callbackOnApplyFilter = (filters) => {
|
|
352
357
|
this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
|
|
@@ -418,7 +423,9 @@ export class SnkFilterBar {
|
|
|
418
423
|
if (this.showPersonalizedFilter) {
|
|
419
424
|
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
|
420
425
|
}
|
|
421
|
-
|
|
426
|
+
if (this.mode === "button")
|
|
427
|
+
return (h(Host, { "data-mode": this.mode }, h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) })));
|
|
428
|
+
return (h(Host, { "data-mode": this.mode }, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
|
|
422
429
|
}
|
|
423
430
|
static get is() { return "snk-filter-bar"; }
|
|
424
431
|
static get encapsulation() { return "scoped"; }
|
|
@@ -454,6 +461,23 @@ export class SnkFilterBar {
|
|
|
454
461
|
"text": "Recebe o DataUnit do ambiente. Se n\u00E3o for informado, procura pela refer\u00EAncia\ndo SnkDataUnit. Necess\u00E1rio para se registrar como provedor de filtros."
|
|
455
462
|
}
|
|
456
463
|
},
|
|
464
|
+
"title": {
|
|
465
|
+
"type": "string",
|
|
466
|
+
"mutable": false,
|
|
467
|
+
"complexType": {
|
|
468
|
+
"original": "string",
|
|
469
|
+
"resolved": "string",
|
|
470
|
+
"references": {}
|
|
471
|
+
},
|
|
472
|
+
"required": false,
|
|
473
|
+
"optional": false,
|
|
474
|
+
"docs": {
|
|
475
|
+
"tags": [],
|
|
476
|
+
"text": "T\u00EDtulo que ser\u00E1 apresentado na barra de filtros"
|
|
477
|
+
},
|
|
478
|
+
"attribute": "title",
|
|
479
|
+
"reflect": false
|
|
480
|
+
},
|
|
457
481
|
"configName": {
|
|
458
482
|
"type": "string",
|
|
459
483
|
"mutable": false,
|
|
@@ -488,6 +512,24 @@ export class SnkFilterBar {
|
|
|
488
512
|
"attribute": "resource-i-d",
|
|
489
513
|
"reflect": false
|
|
490
514
|
},
|
|
515
|
+
"mode": {
|
|
516
|
+
"type": "string",
|
|
517
|
+
"mutable": false,
|
|
518
|
+
"complexType": {
|
|
519
|
+
"original": "\"regular\" | \"button\" | \"hidden\"",
|
|
520
|
+
"resolved": "\"button\" | \"hidden\" | \"regular\"",
|
|
521
|
+
"references": {}
|
|
522
|
+
},
|
|
523
|
+
"required": false,
|
|
524
|
+
"optional": false,
|
|
525
|
+
"docs": {
|
|
526
|
+
"tags": [],
|
|
527
|
+
"text": "Modo de apresenta\u00E7\u00E3o da filterbar."
|
|
528
|
+
},
|
|
529
|
+
"attribute": "mode",
|
|
530
|
+
"reflect": false,
|
|
531
|
+
"defaultValue": "\"regular\""
|
|
532
|
+
},
|
|
491
533
|
"filterConfig": {
|
|
492
534
|
"type": "unknown",
|
|
493
535
|
"mutable": true,
|
|
@@ -543,7 +585,7 @@ export class SnkFilterBar {
|
|
|
543
585
|
"optional": false,
|
|
544
586
|
"docs": {
|
|
545
587
|
"tags": [],
|
|
546
|
-
"text": "Desabilita a apresenta\u00E7\u00E3o da op\u00E7\u00E3o de filtros personalizados na filter bar (chip de filtros)
|
|
588
|
+
"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)."
|
|
547
589
|
},
|
|
548
590
|
"attribute": "disable-personalized-filter",
|
|
549
591
|
"reflect": false
|
|
@@ -708,6 +750,37 @@ export class SnkFilterBar {
|
|
|
708
750
|
"text": "- Retorna o item de filtro removido, ou undefined caso n\u00E3o encontrado."
|
|
709
751
|
}]
|
|
710
752
|
}
|
|
753
|
+
},
|
|
754
|
+
"showFilterModal": {
|
|
755
|
+
"complexType": {
|
|
756
|
+
"signature": "() => Promise<void>",
|
|
757
|
+
"parameters": [],
|
|
758
|
+
"references": {
|
|
759
|
+
"Promise": {
|
|
760
|
+
"location": "global"
|
|
761
|
+
},
|
|
762
|
+
"SnkFilterItemConfig": {
|
|
763
|
+
"location": "import",
|
|
764
|
+
"path": "./filter-item/snk-filter-item"
|
|
765
|
+
},
|
|
766
|
+
"Array": {
|
|
767
|
+
"location": "global"
|
|
768
|
+
},
|
|
769
|
+
"SnkFilterModalFactoryParams": {
|
|
770
|
+
"location": "import",
|
|
771
|
+
"path": "./utils/SnkFilterModalFactory"
|
|
772
|
+
},
|
|
773
|
+
"IPersonalizedFilter": {
|
|
774
|
+
"location": "import",
|
|
775
|
+
"path": "../snk-personalized-filter/interfaces/IPersonalizedFilter"
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
"return": "Promise<void>"
|
|
779
|
+
},
|
|
780
|
+
"docs": {
|
|
781
|
+
"text": "Abre o modal de filtros",
|
|
782
|
+
"tags": []
|
|
783
|
+
}
|
|
711
784
|
}
|
|
712
785
|
};
|
|
713
786
|
}
|
package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js
CHANGED
|
@@ -25,6 +25,7 @@ export class SnkFormConfig {
|
|
|
25
25
|
this._formFieldsStyle = "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding-right--small ez-padding-bottom--medium sc-snk-form-config";
|
|
26
26
|
this._fieldsAvailableStyle = "ez-col ez-col--sd-12 ez-col--tb-12 ez-margin-bottom--medium ez-margin-right--medium sc-snk-form-config";
|
|
27
27
|
this._fieldFloatingStyle = "form-config__field-config--dragged";
|
|
28
|
+
this._sortableTimer = 100;
|
|
28
29
|
this._formConfigOptions = [];
|
|
29
30
|
this._fieldConfigSelected = undefined;
|
|
30
31
|
this._layoutFormConfig = undefined;
|
|
@@ -39,20 +40,27 @@ export class SnkFormConfig {
|
|
|
39
40
|
this.messagesBuilder = undefined;
|
|
40
41
|
}
|
|
41
42
|
observeConfigManager() {
|
|
42
|
-
this.loadConfig();
|
|
43
|
+
this.loadConfig(this._sortableTimer);
|
|
43
44
|
}
|
|
44
|
-
loadFields() {
|
|
45
|
+
loadFields(updateTimer = 0) {
|
|
45
46
|
this._layoutFormConfig = [];
|
|
46
|
-
|
|
47
|
+
if (updateTimer > 0) {
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
this.buildFields();
|
|
50
|
+
}, updateTimer);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this.buildFields();
|
|
54
|
+
}
|
|
47
55
|
}
|
|
48
56
|
buildFields() {
|
|
49
57
|
this.buildFormConfig();
|
|
50
58
|
this.buildAvailableFields();
|
|
51
59
|
}
|
|
52
|
-
loadFormConfig() {
|
|
60
|
+
loadFormConfig(updateTimer) {
|
|
53
61
|
var _a;
|
|
54
62
|
this._formConfig = this.getConfig();
|
|
55
|
-
this.loadFields();
|
|
63
|
+
this.loadFields(updateTimer);
|
|
56
64
|
this.controlFieldConfig();
|
|
57
65
|
if (((_a = this._filterFieldsAvailable) === null || _a === void 0 ? void 0 : _a.value) != undefined) {
|
|
58
66
|
this._filterFieldsAvailable.value = "";
|
|
@@ -95,12 +103,12 @@ export class SnkFormConfig {
|
|
|
95
103
|
}
|
|
96
104
|
}
|
|
97
105
|
resetChangeConfig() {
|
|
98
|
-
this.loadFormConfig();
|
|
106
|
+
this.loadFormConfig(this._sortableTimer);
|
|
99
107
|
this.clearTempGroups();
|
|
100
108
|
}
|
|
101
109
|
resetChangeOptionConfig() {
|
|
102
110
|
this._formConfigChanged = false;
|
|
103
|
-
this.loadConfig();
|
|
111
|
+
this.loadConfig(this._sortableTimer);
|
|
104
112
|
this.clearTempGroups();
|
|
105
113
|
}
|
|
106
114
|
getTabsToSave() {
|
|
@@ -318,7 +326,9 @@ export class SnkFormConfig {
|
|
|
318
326
|
&& oldContainer.id === newContainer.id) {
|
|
319
327
|
evt.cancel();
|
|
320
328
|
this._fieldsAvailable = [];
|
|
321
|
-
|
|
329
|
+
setTimeout(() => {
|
|
330
|
+
this.buildAvailableFields();
|
|
331
|
+
}, this._sortableTimer);
|
|
322
332
|
return true;
|
|
323
333
|
}
|
|
324
334
|
return false;
|
|
@@ -361,7 +371,11 @@ export class SnkFormConfig {
|
|
|
361
371
|
if (isNewGroup) {
|
|
362
372
|
this.clearTempGroups(true);
|
|
363
373
|
}
|
|
364
|
-
|
|
374
|
+
const sortableTimer = oldContainer.dataset.groupName !== newContainer.dataset.groupName
|
|
375
|
+
|| (newContainer.id === CONTAINER_ID.withoutGroup && oldContainer.id === CONTAINER_ID.fieldsAvailable)
|
|
376
|
+
? this._sortableTimer
|
|
377
|
+
: 0;
|
|
378
|
+
this.updateFieldsToSave(sortableTimer);
|
|
365
379
|
}, this._renderTimer);
|
|
366
380
|
return true;
|
|
367
381
|
}
|
|
@@ -391,12 +405,12 @@ export class SnkFormConfig {
|
|
|
391
405
|
return;
|
|
392
406
|
}
|
|
393
407
|
}
|
|
394
|
-
updateFieldsToSave() {
|
|
408
|
+
updateFieldsToSave(updateTimer = 0) {
|
|
395
409
|
const fields = this.getFieldsToSave();
|
|
396
410
|
if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
|
|
397
411
|
this._formConfig.fields = fields;
|
|
398
412
|
}
|
|
399
|
-
this.loadFields();
|
|
413
|
+
this.loadFields(updateTimer);
|
|
400
414
|
this._formConfigChanged = true;
|
|
401
415
|
}
|
|
402
416
|
controlSortableField() {
|
|
@@ -426,7 +440,7 @@ export class SnkFormConfig {
|
|
|
426
440
|
controlStopDraggingGroup(evt) {
|
|
427
441
|
if (evt.data.newIndex !== evt.data.oldIndex) {
|
|
428
442
|
setTimeout(() => {
|
|
429
|
-
this.updateFieldsToSave();
|
|
443
|
+
this.updateFieldsToSave(this._sortableTimer);
|
|
430
444
|
}, this._renderTimer);
|
|
431
445
|
}
|
|
432
446
|
}
|
|
@@ -499,7 +513,7 @@ export class SnkFormConfig {
|
|
|
499
513
|
});
|
|
500
514
|
if (tabs.length > 0) {
|
|
501
515
|
this._formConfig.tabs = tabs;
|
|
502
|
-
this.loadFields();
|
|
516
|
+
this.loadFields(this._sortableTimer);
|
|
503
517
|
this.controlFieldConfig();
|
|
504
518
|
this._formConfigChanged = true;
|
|
505
519
|
}
|
|
@@ -523,13 +537,13 @@ export class SnkFormConfig {
|
|
|
523
537
|
if (config != undefined) {
|
|
524
538
|
this._formConfig = config;
|
|
525
539
|
this._tabSelected = 1;
|
|
526
|
-
this.loadFields();
|
|
540
|
+
this.loadFields(this._sortableTimer);
|
|
527
541
|
this.controlFieldConfig();
|
|
528
542
|
this.clearTempGroups();
|
|
529
543
|
}
|
|
530
544
|
}
|
|
531
|
-
loadConfig() {
|
|
532
|
-
this.loadFormConfig();
|
|
545
|
+
loadConfig(updateTimer = 0) {
|
|
546
|
+
this.loadFormConfig(updateTimer);
|
|
533
547
|
this.loadUserConfig();
|
|
534
548
|
}
|
|
535
549
|
addNewGroup() {
|
|
@@ -570,7 +584,7 @@ export class SnkFormConfig {
|
|
|
570
584
|
});
|
|
571
585
|
}
|
|
572
586
|
else {
|
|
573
|
-
this.updateFieldsToSave();
|
|
587
|
+
this.updateFieldsToSave(this._sortableTimer);
|
|
574
588
|
}
|
|
575
589
|
}
|
|
576
590
|
checkGroupExists(newLabel, indexGroup, isTempGroup = false) {
|
|
@@ -616,7 +630,7 @@ export class SnkFormConfig {
|
|
|
616
630
|
field.group = newLabel;
|
|
617
631
|
}
|
|
618
632
|
});
|
|
619
|
-
this.loadFields();
|
|
633
|
+
this.loadFields(this._sortableTimer);
|
|
620
634
|
this.controlFieldConfig();
|
|
621
635
|
this._formConfigChanged = true;
|
|
622
636
|
}
|
|
@@ -830,14 +844,14 @@ export class SnkFormConfig {
|
|
|
830
844
|
this._formConfigChanged = true;
|
|
831
845
|
this.resetSortables();
|
|
832
846
|
}
|
|
833
|
-
controlRemoveFieldConfig(fieldConfig) {
|
|
847
|
+
controlRemoveFieldConfig(fieldConfig, updateTimer) {
|
|
834
848
|
var _a;
|
|
835
849
|
this._formConfigChanged = false;
|
|
836
850
|
if (fieldConfig == undefined) {
|
|
837
851
|
return;
|
|
838
852
|
}
|
|
839
853
|
this._formConfig.fields = (_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.filter((field) => field.name !== fieldConfig.name);
|
|
840
|
-
this.loadFields();
|
|
854
|
+
this.loadFields(updateTimer);
|
|
841
855
|
this.controlFieldConfig();
|
|
842
856
|
this._formConfigChanged = true;
|
|
843
857
|
this.resetSortables();
|
|
@@ -846,14 +860,14 @@ export class SnkFormConfig {
|
|
|
846
860
|
this.controlSortableField();
|
|
847
861
|
this.controlSortableGroup();
|
|
848
862
|
}
|
|
849
|
-
handleFieldConfigChange(evt) {
|
|
863
|
+
handleFieldConfigChange(evt, updateTimer = 0) {
|
|
850
864
|
const { field: fieldConfig, type: actionType } = evt.detail;
|
|
851
865
|
if (actionType === ACTION_CONFIG.configuration) {
|
|
852
866
|
this.controlFieldConfig(fieldConfig);
|
|
853
867
|
return;
|
|
854
868
|
}
|
|
855
869
|
if (actionType === ACTION_CONFIG.remove) {
|
|
856
|
-
this.controlRemoveFieldConfig(fieldConfig);
|
|
870
|
+
this.controlRemoveFieldConfig(fieldConfig, updateTimer);
|
|
857
871
|
return;
|
|
858
872
|
}
|
|
859
873
|
if (actionType === ACTION_CONFIG.add) {
|
|
@@ -874,7 +888,7 @@ export class SnkFormConfig {
|
|
|
874
888
|
tab.label = newLabel;
|
|
875
889
|
}
|
|
876
890
|
});
|
|
877
|
-
this.loadFields();
|
|
891
|
+
this.loadFields(this._sortableTimer);
|
|
878
892
|
this.controlFieldConfig();
|
|
879
893
|
this._formConfigChanged = true;
|
|
880
894
|
}
|
|
@@ -894,7 +908,7 @@ export class SnkFormConfig {
|
|
|
894
908
|
this._formConfig.tabs = (_a = this._formConfig.tabs) === null || _a === void 0 ? void 0 : _a.filter((tab) => {
|
|
895
909
|
return tab.label !== tabSelected.detail.label;
|
|
896
910
|
});
|
|
897
|
-
this.loadFields();
|
|
911
|
+
this.loadFields(this._sortableTimer);
|
|
898
912
|
this.controlFieldConfig();
|
|
899
913
|
this._formConfigChanged = true;
|
|
900
914
|
}
|
|
@@ -907,7 +921,7 @@ export class SnkFormConfig {
|
|
|
907
921
|
tab.visible = !tab.visible;
|
|
908
922
|
}
|
|
909
923
|
});
|
|
910
|
-
this.loadFields();
|
|
924
|
+
this.loadFields(this._sortableTimer);
|
|
911
925
|
this.controlFieldConfig();
|
|
912
926
|
this._formConfigChanged = true;
|
|
913
927
|
}
|
|
@@ -37,6 +37,7 @@ export class SnkGrid {
|
|
|
37
37
|
this._showSnkFilterBar = true;
|
|
38
38
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
|
39
39
|
this.configName = undefined;
|
|
40
|
+
this.filterBarTitle = undefined;
|
|
40
41
|
this.resourceID = undefined;
|
|
41
42
|
this.selectionToastConfig = undefined;
|
|
42
43
|
this.actionsList = undefined;
|
|
@@ -400,7 +401,7 @@ export class SnkGrid {
|
|
|
400
401
|
return undefined;
|
|
401
402
|
}
|
|
402
403
|
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 &&
|
|
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 }))));
|
|
404
|
+
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, 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 }))));
|
|
404
405
|
}
|
|
405
406
|
static get is() { return "snk-grid"; }
|
|
406
407
|
static get encapsulation() { return "scoped"; }
|
|
@@ -454,6 +455,23 @@ export class SnkGrid {
|
|
|
454
455
|
"attribute": "config-name",
|
|
455
456
|
"reflect": false
|
|
456
457
|
},
|
|
458
|
+
"filterBarTitle": {
|
|
459
|
+
"type": "string",
|
|
460
|
+
"mutable": false,
|
|
461
|
+
"complexType": {
|
|
462
|
+
"original": "string",
|
|
463
|
+
"resolved": "string",
|
|
464
|
+
"references": {}
|
|
465
|
+
},
|
|
466
|
+
"required": false,
|
|
467
|
+
"optional": false,
|
|
468
|
+
"docs": {
|
|
469
|
+
"tags": [],
|
|
470
|
+
"text": "T\u00EDtulo que ser\u00E1 apresentado na barra de filtros"
|
|
471
|
+
},
|
|
472
|
+
"attribute": "filter-bar-title",
|
|
473
|
+
"reflect": false
|
|
474
|
+
},
|
|
457
475
|
"resourceID": {
|
|
458
476
|
"type": "string",
|
|
459
477
|
"mutable": false,
|
|
@@ -756,7 +774,7 @@ export class SnkGrid {
|
|
|
756
774
|
"optional": false,
|
|
757
775
|
"docs": {
|
|
758
776
|
"tags": [],
|
|
759
|
-
"text": "Desabilita a apresenta\u00E7\u00E3o da op\u00E7\u00E3o de filtros personalizados na filter bar (chip de filtros)
|
|
777
|
+
"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
778
|
},
|
|
761
779
|
"attribute": "disable-personalized-filter",
|
|
762
780
|
"reflect": false
|
|
@@ -293,9 +293,9 @@ export class SnkSimpleCrud {
|
|
|
293
293
|
}
|
|
294
294
|
render() {
|
|
295
295
|
var _a;
|
|
296
|
-
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium
|
|
296
|
+
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), columnfilterDataSource: this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
|
297
297
|
? undefined
|
|
298
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this.formConfig, fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }))))));
|
|
298
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { class: "ez-margin-top--large", dataUnit: this.dataUnit, config: this.formConfig, fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }))))));
|
|
299
299
|
}
|
|
300
300
|
static get is() { return "snk-simple-crud"; }
|
|
301
301
|
static get encapsulation() { return "scoped"; }
|
|
@@ -118,7 +118,7 @@ export class TaskbarActionsButton {
|
|
|
118
118
|
this.taskbarActionsButtonDisconnected.emit();
|
|
119
119
|
}
|
|
120
120
|
render() {
|
|
121
|
-
return (h(Host, null, h("div", { class:
|
|
121
|
+
return (h(Host, null, h("div", { class: `${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) }))));
|
|
122
122
|
}
|
|
123
123
|
static get is() { return "taskbar-actions-button"; }
|
|
124
124
|
static get encapsulation() { return "scoped"; }
|
|
@@ -86,29 +86,29 @@ export const buildElem = (element, className, dataElementId, getTitle, action, i
|
|
|
86
86
|
case TaskbarElement.CONFIGURATOR:
|
|
87
87
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
|
88
88
|
case TaskbarElement.MORE_OPTIONS:
|
|
89
|
-
return actionButton(element, dataElementId, title, isEnabled, actions, action);
|
|
89
|
+
return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
|
|
90
90
|
case TaskbarElement.DIVIDER:
|
|
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
|
-
function actionButton(element, dataElementId, title, isEnabled, actions, action) {
|
|
110
|
+
function actionButton(element, className, 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", { class: className, key: dataElementId, title: title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
|
113
113
|
: undefined;
|
|
114
114
|
}
|