@sankhyalabs/sankhyablocks 8.16.0-dev.112 → 8.16.0-dev.114
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-df09fb78.js → ConfigStorage-48ba265b.js} +45 -17
- package/dist/cjs/{PersonalizedFilterUtils-0184ffbb.js → PersonalizedFilterUtils-7259cf65.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-45a8d7b7.js → SnkFormConfigManager-ce7b0951.js} +1 -1
- package/dist/cjs/{SnkMessageBuilder-9deeae08.js → SnkMessageBuilder-21cc7f09.js} +12 -1
- package/dist/cjs/default-filters-a09bf82b.js +8 -0
- package/dist/cjs/{filter-type.enum-b14ce507.js → filter-type.enum-2bb46d2a.js} +1 -0
- package/dist/cjs/{index-c5771aba.js → index-62760a9c.js} +5 -0
- package/dist/cjs/index-f9e81701.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_8.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +2 -2
- package/dist/cjs/snk-config-options_3.cjs.entry.js +2 -2
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
- package/dist/cjs/{snk-data-unit-57916de4.js → snk-data-unit-7913a033.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-default-filter.cjs.entry.js +77 -0
- package/dist/cjs/snk-detail-view.cjs.entry.js +4 -4
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +8 -6
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +4 -3
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +81 -27
- package/dist/cjs/snk-filter-detail.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -2
- package/dist/cjs/snk-grid.cjs.entry.js +2 -2
- package/dist/cjs/{snk-guides-viewer-d33379cd.js → snk-guides-viewer-450baf6a.js} +1 -1
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -3
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +51 -16
- package/dist/cjs/snk-simple-crud.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +80 -12
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.css +34 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js +142 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +24 -15
- package/dist/collection/components/snk-filter-bar/types/default-filters.js +6 -0
- package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js +1 -0
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +4 -4
- package/dist/collection/components/snk-grid/snk-grid.css +1 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/index.js +5 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +67 -13
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css +3 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +20 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +22 -3
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js +20 -1
- package/dist/collection/lib/configs/ConfigStorage.js +16 -8
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +29 -9
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +6 -0
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +6 -1
- package/dist/components/ConfigStorage.js +45 -17
- package/dist/components/PersonalizedFilterUtils.js +6 -1
- package/dist/components/SnkMessageBuilder.js +12 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-default-filter.d.ts +11 -0
- package/dist/components/snk-default-filter.js +6 -0
- package/dist/components/snk-default-filter2.js +97 -0
- package/dist/components/snk-expression-group2.js +4 -2
- package/dist/components/snk-expression-item2.js +5 -3
- package/dist/components/snk-filter-assistent-mode2.js +4 -2
- package/dist/components/snk-filter-bar2.js +28 -19
- package/dist/components/snk-filter-modal-item2.js +1 -0
- package/dist/components/snk-filter-modal.js +59 -8
- package/dist/components/snk-grid2.js +1 -1
- package/dist/components/snk-personalized-filter2.js +50 -14
- package/dist/esm/{ConfigStorage-71e6766f.js → ConfigStorage-79b9e180.js} +45 -17
- package/dist/esm/{PersonalizedFilterUtils-e2b38ef7.js → PersonalizedFilterUtils-2db38ff2.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-be490a33.js → SnkFormConfigManager-327dfdd4.js} +1 -1
- package/dist/esm/{SnkMessageBuilder-2dbd8fa2.js → SnkMessageBuilder-0f112c19.js} +12 -1
- package/dist/esm/default-filters-50105e43.js +8 -0
- package/dist/esm/{filter-type.enum-a80c1b6b.js → filter-type.enum-f6a8fe23.js} +1 -0
- package/dist/esm/{index-ae591a44.js → index-8acbae97.js} +6 -1
- package/dist/esm/index-a7d3d3f1.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_8.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +2 -2
- package/dist/esm/snk-config-options_3.entry.js +2 -2
- package/dist/esm/snk-data-exporter.entry.js +2 -2
- package/dist/esm/{snk-data-unit-65c9dd1a.js → snk-data-unit-a95dc9fe.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-default-filter.entry.js +73 -0
- package/dist/esm/snk-detail-view.entry.js +4 -4
- package/dist/esm/snk-expression-group_2.entry.js +8 -6
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +4 -3
- package/dist/esm/snk-filter-bar_4.entry.js +81 -27
- package/dist/esm/snk-filter-detail.entry.js +2 -2
- package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
- package/dist/esm/snk-filter-modal-item.entry.js +2 -2
- package/dist/esm/snk-grid.entry.js +2 -2
- package/dist/esm/{snk-guides-viewer-72953334.js → snk-guides-viewer-ebb40908.js} +1 -1
- package/dist/esm/snk-guides-viewer.entry.js +3 -3
- package/dist/esm/snk-personalized-filter.entry.js +51 -16
- package/dist/esm/snk-simple-crud.entry.js +2 -2
- package/dist/sankhyablocks/{p-165cde3b.entry.js → p-043bef5f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ebdb9d89.js → p-088d7e7b.js} +1 -1
- package/dist/sankhyablocks/p-13a0ead0.entry.js +1 -0
- package/dist/sankhyablocks/{p-52d10014.entry.js → p-34f7a3ab.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ddf93f36.entry.js → p-39f3b02d.entry.js} +1 -1
- package/dist/sankhyablocks/p-5182513e.entry.js +1 -0
- package/dist/sankhyablocks/p-6416975c.js +56 -0
- package/dist/sankhyablocks/p-6a4b21dd.js +1 -0
- package/dist/sankhyablocks/{p-a4ebeec4.entry.js → p-6a5f061b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-54a5d52a.entry.js → p-70da6817.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2f7e2251.entry.js → p-794840bd.entry.js} +1 -1
- package/dist/sankhyablocks/p-79b3cccc.js +1 -0
- package/dist/sankhyablocks/{p-bc101064.entry.js → p-7effe55f.entry.js} +1 -1
- package/dist/sankhyablocks/p-814d99ec.entry.js +1 -0
- package/dist/sankhyablocks/p-84345e7a.js +1 -0
- package/dist/sankhyablocks/{p-057fad05.js → p-988afe78.js} +1 -1
- package/dist/sankhyablocks/p-a9813a81.entry.js +1 -0
- package/dist/sankhyablocks/{p-3372178e.entry.js → p-ab12216c.entry.js} +1 -1
- package/dist/sankhyablocks/p-b568c1d4.js +1 -0
- package/dist/sankhyablocks/{p-c9675d64.js → p-bd6a6203.js} +1 -1
- package/dist/sankhyablocks/{p-7beeabc1.entry.js → p-bd7ccf60.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0fadb620.js → p-c7492861.js} +1 -1
- package/dist/sankhyablocks/p-d257ff20.entry.js +1 -0
- package/dist/sankhyablocks/{p-8002dcd0.entry.js → p-def1fe2d.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5ffa0493.entry.js → p-e3c71e43.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b8d649dd.entry.js → p-e6d90f89.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +16 -4
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.d.ts +27 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -3
- package/dist/types/components/snk-filter-bar/types/default-filters.d.ts +5 -0
- package/dist/types/components/snk-filter-bar/types/filter-type.enum.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -3
- package/dist/types/components/snk-personalized-filter/interfaces/index.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +7 -1
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.d.ts +4 -0
- package/dist/types/components.d.ts +81 -6
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -2
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +8 -4
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/sankhyablocks/p-03b68a74.js +0 -56
- package/dist/sankhyablocks/p-3ab6df3d.entry.js +0 -1
- package/dist/sankhyablocks/p-4689c2e6.js +0 -1
- package/dist/sankhyablocks/p-490b75b5.entry.js +0 -1
- package/dist/sankhyablocks/p-60137b7a.entry.js +0 -1
- package/dist/sankhyablocks/p-933c0c0b.js +0 -1
- package/dist/sankhyablocks/p-9d3a025a.entry.js +0 -1
- package/dist/sankhyablocks/p-d9804798.js +0 -1
@@ -3,9 +3,10 @@ import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-mod
|
|
3
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { F as FilterType, d as defineCustomElement$2 } from './snk-filter-modal-item2.js';
|
5
5
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
6
|
-
import { ObjectUtils } from '@sankhyalabs/core';
|
7
|
-
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils.js';
|
6
|
+
import { ObjectUtils, ApplicationContext } from '@sankhyalabs/core';
|
7
|
+
import { P as PersonalizedFilterUtils, D as DefaultFilter } from './PersonalizedFilterUtils.js';
|
8
8
|
import { F as FilterNumberVariation } from './filterNumberVariation.js';
|
9
|
+
import { A as ActionDefaultFilter, d as defineCustomElement$3 } from './snk-default-filter2.js';
|
9
10
|
|
10
11
|
const snkFilterModalCss = "ez-modal{--ez-modal-content-padding:24px 12px}.snk-filter-modal__container{width:344px;max-width:344px;min-width:344px;overflow:hidden}.snk-filter-modal__content{display:flex;flex-direction:column;gap:var(--space--medium, 12px);padding-right:var(--space--3xs, 4px)}.snk-filter-modal__collapsible-box{border:var(--border--small, 1px solid) var(--color--strokes, #DCE0E8);border-radius:var(--border--radius-medium);padding:var(--space--medium, 12px) var(--space--small, 6px)}.snk-filter-modal__rendered-items{max-height:760px;overflow-x:hidden;overflow-y:auto}.snk-filter-modal__rendered-items::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";
|
11
12
|
|
@@ -22,6 +23,7 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
22
23
|
this.editPersonalizedFilter = undefined;
|
23
24
|
this.deletePersonalizedFilter = undefined;
|
24
25
|
this.filtersToDelete = [];
|
26
|
+
this.filterDefaultToDelete = undefined;
|
25
27
|
this.disablePersonalizedFilter = undefined;
|
26
28
|
}
|
27
29
|
/**
|
@@ -80,8 +82,12 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
80
82
|
return copy;
|
81
83
|
});
|
82
84
|
}
|
85
|
+
hasChangeToSave() {
|
86
|
+
const hasChangesPersonalizedFilters = ObjectUtils.objectToString(this.filters) !== ObjectUtils.objectToString(this._originalFilterConfig);
|
87
|
+
return hasChangesPersonalizedFilters;
|
88
|
+
}
|
83
89
|
handleClose() {
|
84
|
-
const hasChangesToSave =
|
90
|
+
const hasChangesToSave = this.hasChangeToSave();
|
85
91
|
if (!hasChangesToSave) {
|
86
92
|
this.closeModal();
|
87
93
|
return;
|
@@ -92,7 +98,7 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
92
98
|
});
|
93
99
|
}
|
94
100
|
handleApplyFilters() {
|
95
|
-
const filterPersonalized = this.filters.find(filter => filter.filterType === FilterType.CUSTOM_FILTER);
|
101
|
+
const filterPersonalized = this.filters.find(filter => filter.filterType === FilterType.CUSTOM_FILTER || filter.filterType === FilterType.DEFAULT_FILTER);
|
96
102
|
if (this.isValidCustomFilter(filterPersonalized)) {
|
97
103
|
this.applyFilters(this.filters);
|
98
104
|
}
|
@@ -102,6 +108,11 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
102
108
|
});
|
103
109
|
this.filtersToDelete = [];
|
104
110
|
}
|
111
|
+
if (this.filterDefaultToDelete) {
|
112
|
+
this.deletePersonalizedFilter(this.filterDefaultToDelete, this.configName, true);
|
113
|
+
this._defaultFilter = undefined;
|
114
|
+
this.filterDefaultToDelete = undefined;
|
115
|
+
}
|
105
116
|
}
|
106
117
|
isValidCustomFilter(filterPersonalized) {
|
107
118
|
const isValid = PersonalizedFilterUtils.validateVariableValues(filterPersonalized);
|
@@ -226,6 +237,39 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
226
237
|
const lines = this.mountFiltersLines(listItems);
|
227
238
|
return (h("ez-collapsible-box", { class: "snk-filter-modal__collapsible-box", headerSize: "medium", value: true, label: label }, !!appliedFilters && (h("ez-badge", { class: "ez-badge--primary-subtle", slot: "rightSlot", label: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.toString() })), h("div", { class: "ez-row snk-filter-modal__rendered-items" }, lines.map(this.renderFilterLine.bind(this))), shouldRenderFooter && (h("div", { class: "ez-flex ez-flex--justify-end grow" }, h("ez-button", { class: "ez-button--tertiary", size: "medium", label: "Limpar", onClick: () => isSingleItem ? this.handleClearSigleFilter(listItems[0]) : this.handleClearFilterList(listItems) })))));
|
228
239
|
}
|
240
|
+
handleDeleteFilter() {
|
241
|
+
this._application.confirm(this.getMessage('snkPersonalizedFilter.deleteConfirm.title'), this.getMessage('snkPersonalizedFilter.info.deleteDefaultFilterConfirm'), "alert-circle-inverted", "critical").then((actionConfirmed) => {
|
242
|
+
if (!actionConfirmed) {
|
243
|
+
return;
|
244
|
+
}
|
245
|
+
this.filterDefaultToDelete = this._defaultFilter;
|
246
|
+
this.filters = this.filters.filter(filter => filter.id !== FilterType.DEFAULT_FILTER);
|
247
|
+
});
|
248
|
+
}
|
249
|
+
handleActionSelectedDefaultFilter({ detail: action }) {
|
250
|
+
switch (action) {
|
251
|
+
case ActionDefaultFilter.CREATE:
|
252
|
+
this.addPersonalizedFilter(true);
|
253
|
+
break;
|
254
|
+
case ActionDefaultFilter.EDIT:
|
255
|
+
this.editPersonalizedFilter(this._defaultFilter.id, true);
|
256
|
+
break;
|
257
|
+
case ActionDefaultFilter.REMOVE:
|
258
|
+
this.handleDeleteFilter();
|
259
|
+
break;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
getCustomFilter(filters) {
|
263
|
+
const customFilters = filters.filter((filter) => filter.filterType === FilterType.CUSTOM_FILTER);
|
264
|
+
return customFilters;
|
265
|
+
}
|
266
|
+
getDefaultFilter(filters) {
|
267
|
+
const defaultFilter = filters.find((item) => item.id === DefaultFilter.id);
|
268
|
+
return defaultFilter;
|
269
|
+
}
|
270
|
+
componentWillLoad() {
|
271
|
+
this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
272
|
+
}
|
229
273
|
componentWillRender() {
|
230
274
|
this._modalTitle = this.getCustomMessage('title');
|
231
275
|
this._okButtonLabel = this.getCustomMessage('okButtonLabel');
|
@@ -236,10 +280,11 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
236
280
|
this._originalFilterConfig = this.filters;
|
237
281
|
}
|
238
282
|
render() {
|
239
|
-
|
283
|
+
this._defaultFilter = this.getDefaultFilter(this.filters);
|
284
|
+
const customFilters = this.getCustomFilter(this.filters);
|
240
285
|
const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
|
241
286
|
const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
|
242
|
-
return (h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
|
287
|
+
return (h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, h("snk-default-filter", { getMessage: this.getCustomMessage.bind(this), hasDefaultFilter: !!this._defaultFilter, onActionSelected: this.handleActionSelectedDefaultFilter.bind(this) }), !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
|
243
288
|
}
|
244
289
|
static get style() { return snkFilterModalCss; }
|
245
290
|
}, [0, "snk-filter-modal", {
|
@@ -251,20 +296,26 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
251
296
|
"addPersonalizedFilter": [16],
|
252
297
|
"editPersonalizedFilter": [16],
|
253
298
|
"deletePersonalizedFilter": [16],
|
254
|
-
"filtersToDelete": [
|
299
|
+
"filtersToDelete": [1040],
|
300
|
+
"filterDefaultToDelete": [1040],
|
255
301
|
"disablePersonalizedFilter": [4, "disable-personalized-filter"]
|
256
302
|
}, [[0, "deleteFilter", "deletePersonalizedFilterListener"]]]);
|
257
303
|
function defineCustomElement$1() {
|
258
304
|
if (typeof customElements === "undefined") {
|
259
305
|
return;
|
260
306
|
}
|
261
|
-
const components = ["snk-filter-modal", "snk-filter-modal-item"];
|
307
|
+
const components = ["snk-filter-modal", "snk-default-filter", "snk-filter-modal-item"];
|
262
308
|
components.forEach(tagName => { switch (tagName) {
|
263
309
|
case "snk-filter-modal":
|
264
310
|
if (!customElements.get(tagName)) {
|
265
311
|
customElements.define(tagName, SnkFilterModal$1);
|
266
312
|
}
|
267
313
|
break;
|
314
|
+
case "snk-default-filter":
|
315
|
+
if (!customElements.get(tagName)) {
|
316
|
+
defineCustomElement$3();
|
317
|
+
}
|
318
|
+
break;
|
268
319
|
case "snk-filter-modal-item":
|
269
320
|
if (!customElements.get(tagName)) {
|
270
321
|
defineCustomElement$2();
|
@@ -88,7 +88,7 @@ class ServerSideExporterProvider extends CommonsExporter {
|
|
88
88
|
}
|
89
89
|
}
|
90
90
|
|
91
|
-
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding)}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
|
91
|
+
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
|
92
92
|
|
93
93
|
const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
94
94
|
constructor() {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
|
2
2
|
import { StringUtils, ObjectUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
3
|
-
import { F as FilterGroupCondition, P as PersonalizedFilterUtils } from './PersonalizedFilterUtils.js';
|
3
|
+
import { F as FilterGroupCondition, D as DefaultFilter, P as PersonalizedFilterUtils } from './PersonalizedFilterUtils.js';
|
4
4
|
import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage.js';
|
5
5
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
6
6
|
import { s as store } from './index2.js';
|
@@ -43,6 +43,7 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
43
43
|
this.filterId = undefined;
|
44
44
|
this.configName = undefined;
|
45
45
|
this.resourceID = undefined;
|
46
|
+
this.isDefaultFilter = false;
|
46
47
|
}
|
47
48
|
/*
|
48
49
|
* Cria um novo filtro se não houver nenhum filtro existente
|
@@ -75,6 +76,9 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
75
76
|
operand: FilterGroupCondition.AND
|
76
77
|
}
|
77
78
|
};
|
79
|
+
if (this.isDefaultFilter) {
|
80
|
+
this.buildDataDefaultFilter(newPersonalizedFilter);
|
81
|
+
}
|
78
82
|
this._originalFilterAssistent = ObjectUtils.copy(newPersonalizedFilter);
|
79
83
|
this._filterAssistent = ObjectUtils.copy(newPersonalizedFilter);
|
80
84
|
}
|
@@ -82,6 +86,16 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
82
86
|
if (newValue == null || oldValue == newValue || this.resourceID == undefined) {
|
83
87
|
return;
|
84
88
|
}
|
89
|
+
if (newValue === DefaultFilter.id) {
|
90
|
+
ConfigStorage.loadDefaultFilter(newValue, this.resourceID, this.configName)
|
91
|
+
.then((resp) => {
|
92
|
+
const personalizedFilter = this.applyDefaultValues(resp);
|
93
|
+
this._filterAssistent = personalizedFilter;
|
94
|
+
this._originalFilterAssistent = ObjectUtils.copy(personalizedFilter);
|
95
|
+
this._filterAssistentMode = this._filterAssistent.hasOwnProperty("assistent") && this._filterAssistent.assistent != undefined;
|
96
|
+
});
|
97
|
+
return;
|
98
|
+
}
|
85
99
|
ConfigStorage.loadPersonalizedFilter(newValue, this.resourceID, this.configName)
|
86
100
|
.then((resp) => {
|
87
101
|
const personalizedFilter = this.applyDefaultValues(resp);
|
@@ -108,20 +122,29 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
108
122
|
this._elButtonMode.setAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME, ElementIDUtils.getInternalIDInfo(`${this._filterAssistentMode ? "advancedMode_ezButton" : "assistentMode_ezButton"}`));
|
109
123
|
}
|
110
124
|
}
|
125
|
+
buildDataDefaultFilter(data) {
|
126
|
+
data.name = DefaultFilter.name;
|
127
|
+
data.id = DefaultFilter.id;
|
128
|
+
}
|
111
129
|
getMessage(key, params) {
|
112
130
|
return this._application.messagesBuilder.getMessage(key, params);
|
113
131
|
}
|
114
|
-
saveFilter() {
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
});
|
132
|
+
async saveFilter() {
|
133
|
+
let response;
|
134
|
+
if (this.isDefaultFilter) {
|
135
|
+
response = await ConfigStorage.saveDefaultFilter(this._filterAssistent, this.resourceID, this.configName);
|
136
|
+
}
|
137
|
+
else {
|
138
|
+
response = await ConfigStorage.savePersonalizedFilter(this._filterAssistent, this.resourceID, this.configName);
|
139
|
+
}
|
140
|
+
this._elButtonSave.enabled = false;
|
141
|
+
const messageToken = !!this._filterAssistent.id ? 'confirmEdit' : 'confirmSave';
|
142
|
+
ApplicationUtils.info(this.getMessage(`snkPersonalizedFilter.${messageToken}.title`), { iconName: "check" });
|
143
|
+
const updatedFilterAssistent = Object.assign(Object.assign({}, response), this._filterAssistent);
|
144
|
+
updatedFilterAssistent.parameters = PersonalizedFilterUtils.buildVariableParameters(this._filterAssistent.assistent);
|
145
|
+
this._originalFilterAssistent = ObjectUtils.copy(updatedFilterAssistent);
|
146
|
+
this._filterAssistent = ObjectUtils.copy(updatedFilterAssistent);
|
147
|
+
this.ezAfterSave.emit();
|
125
148
|
}
|
126
149
|
removeFilter() {
|
127
150
|
ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.resourceID, this.configName);
|
@@ -257,7 +280,7 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
257
280
|
}
|
258
281
|
buildContainerPersonalizedFilter() {
|
259
282
|
return (h("ez-view-stack", { ref: (ref) => this._viewStackRef = ref }, h("stack-item", null, this._filterAssistentMode &&
|
260
|
-
h("snk-filter-assistent-mode", { filterAssistent: this._filterAssistent, messagesBuilder: this.messagesBuilder, filterId: this.filterId, entityUri: this.entityUri, application: this._application, onEzChangeFilter: (ev) => this.handleChangeFilterAssistentMode(ev.detail) })), h("stack-item", null, h("snk-filter-advanced-mode", { ref: (ref) => this._elAdvancedMode = ref, filterAssistent: this._filterAssistent, application: this._application, onEzExpressionChange: (ev) => this.handleExpressionChangeAdvancedMode(ev.detail) }))));
|
283
|
+
h("snk-filter-assistent-mode", { filterAssistent: this._filterAssistent, messagesBuilder: this.messagesBuilder, filterId: this.filterId, entityUri: this.entityUri, application: this._application, onEzChangeFilter: (ev) => this.handleChangeFilterAssistentMode(ev.detail), isDefaultFilter: this.isDefaultFilter })), h("stack-item", null, h("snk-filter-advanced-mode", { ref: (ref) => this._elAdvancedMode = ref, filterAssistent: this._filterAssistent, application: this._application, onEzExpressionChange: (ev) => this.handleExpressionChangeAdvancedMode(ev.detail) }))));
|
261
284
|
}
|
262
285
|
handleModeChange() {
|
263
286
|
var _a, _b;
|
@@ -296,12 +319,24 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
296
319
|
}
|
297
320
|
}
|
298
321
|
}
|
322
|
+
buildTitle() {
|
323
|
+
if (this.isDefaultFilter && !this.filterId) {
|
324
|
+
return this.getMessage("snkPersonalizedFilter.info.titleCreateDefault");
|
325
|
+
}
|
326
|
+
if (this.isDefaultFilter && this.filterId) {
|
327
|
+
return this.getMessage("snkPersonalizedFilter.info.titleEditDefault");
|
328
|
+
}
|
329
|
+
if (this.filterId) {
|
330
|
+
return this.getMessage("snkPersonalizedFilter.info.titleEdit");
|
331
|
+
}
|
332
|
+
return this.getMessage("snkPersonalizedFilter.info.titleAdd");
|
333
|
+
}
|
299
334
|
render() {
|
300
335
|
var _a, _b, _c, _d;
|
301
336
|
if (!((_a = this._filterAssistent) === null || _a === void 0 ? void 0 : _a.assistent) && this._filterAssistentMode) {
|
302
337
|
return;
|
303
338
|
}
|
304
|
-
return (h(Host, null, h("div", { class: "snk-personalized-filter" }, h("div", null, h("snk-simple-bar", { label: this.
|
339
|
+
return (h(Host, null, h("div", { class: "snk-personalized-filter" }, h("div", null, h("snk-simple-bar", { label: this.buildTitle(), onExit: () => this.handleCancel() }, h("div", { class: "snk-personalized-filter__header-actions", slot: "rightSlot" }, h("ez-button", { size: "small", label: this.getMessage("snkPersonalizedFilter.info.labelCancel"), onClick: () => this.handleCancel() }), h("ez-button", { size: "small", ref: (el) => this._elButtonSave = el, enabled: false, class: "ez-button--primary", label: this.getMessage("snkPersonalizedFilter.info.labelSave"), onClick: this.handleSave.bind(this) })))), h("div", { class: "ez-box ez-margin-bottom--medium ez-box__main" }, h("div", { class: "ez-box__container" }, h("div", { class: "ez-flex ez-flex--column ez-size-width--full" }, h("div", { class: "ez-flex" }, h("ez-tooltip", { message: this.getMessage("snkPersonalizedFilter.info.textInputDisabled"), active: this.isDefaultFilter }, h("ez-text-input", { class: "ez-padding-right--medium", label: this.getMessage("snkPersonalizedFilter.info.labelNameFilter"), value: (_b = this._filterAssistent) === null || _b === void 0 ? void 0 : _b.name, onEzChange: (evt) => this.handleTitleChange(evt.detail), enabled: !this.isDefaultFilter })), this.renderButtonAddField(), h("ez-button", { ref: (el) => this._elButtonMode = el, class: "snk-personalized-filter__button-mode", label: this._filterAssistentMode ? this.getMessage("snkPersonalizedFilter.info.activeModeAdvanced") : this.getMessage("snkPersonalizedFilter.info.activeModeAssistent"), onClick: () => this.handleModeChange(), "data-tooltip": !(this._filterAssistentMode || ((_c = this._filterAssistent) === null || _c === void 0 ? void 0 : _c.assistent)) ? this.getMessage("snkPersonalizedFilter.info.tooltipDisabledAssistentMode") : undefined, "data-flow": "bottom", enabled: (!this._filterAssistent.name || Boolean(this._filterAssistentMode || ((_d = this._filterAssistent) === null || _d === void 0 ? void 0 : _d.assistent))) })), this.buildContainerPersonalizedFilter()))))));
|
305
340
|
}
|
306
341
|
static get watchers() { return {
|
307
342
|
"filterId": ["loadFilter"]
|
@@ -313,6 +348,7 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
313
348
|
"filterId": [1025, "filter-id"],
|
314
349
|
"configName": [1025, "config-name"],
|
315
350
|
"resourceID": [1, "resource-i-d"],
|
351
|
+
"isDefaultFilter": [4, "is-default-filter"],
|
316
352
|
"_filterAssistentMode": [32],
|
317
353
|
"_filterAssistent": [32],
|
318
354
|
"createPersonalizedFilter": [64]
|
@@ -182,16 +182,30 @@ class FilterBarConfigFetcher extends ResourceFetcher {
|
|
182
182
|
|
183
183
|
class PersonalizedFilterFetcher {
|
184
184
|
constructor() {
|
185
|
+
this.DEFAULT_RESOURCE = '_default';
|
185
186
|
this.templateByQuery = new Map();
|
186
187
|
this.buildTemplates();
|
187
188
|
}
|
188
|
-
resolveURI(resourceID, configName) {
|
189
|
+
resolveURI(resourceID, configName, isDefault) {
|
189
190
|
let uri = "filter-assistent-config://" + resourceID;
|
190
191
|
if (configName) {
|
191
192
|
uri += "." + configName;
|
192
193
|
}
|
194
|
+
if (isDefault) {
|
195
|
+
uri += this.DEFAULT_RESOURCE;
|
196
|
+
}
|
193
197
|
return uri;
|
194
198
|
}
|
199
|
+
resolveLegacyConfigName(legacyConfigName, isDefault) {
|
200
|
+
if (!legacyConfigName) {
|
201
|
+
return '';
|
202
|
+
}
|
203
|
+
let legacyConfig = `?legacyResourceID=${legacyConfigName}`;
|
204
|
+
if (isDefault) {
|
205
|
+
legacyConfig += this.DEFAULT_RESOURCE;
|
206
|
+
}
|
207
|
+
return legacyConfig;
|
208
|
+
}
|
195
209
|
buildTemplates() {
|
196
210
|
this.templateByQuery.set("fetchFilterFields", dist.gql `
|
197
211
|
query($name: String!) {
|
@@ -254,11 +268,14 @@ class PersonalizedFilterFetcher {
|
|
254
268
|
}
|
255
269
|
}`);
|
256
270
|
}
|
257
|
-
async
|
271
|
+
async loadDefaultFilter(resourceID, filterID, configName, legacyConfigName) {
|
272
|
+
return this.loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName, true);
|
273
|
+
}
|
274
|
+
async loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName, isDefault) {
|
258
275
|
return new Promise((resolve, reject) => {
|
259
276
|
DataFetcher.get()
|
260
277
|
.callGraphQL({
|
261
|
-
values: { name: this.resolveURI(resourceID, configName) + "/" + filterID + this.resolveLegacyConfigName(legacyConfigName) },
|
278
|
+
values: { name: this.resolveURI(resourceID, configName, isDefault) + "/" + filterID + this.resolveLegacyConfigName(legacyConfigName, isDefault) },
|
262
279
|
query: this.templateByQuery.get("fetchFilterAssistent"),
|
263
280
|
})
|
264
281
|
.then((resp) => {
|
@@ -270,10 +287,10 @@ class PersonalizedFilterFetcher {
|
|
270
287
|
});
|
271
288
|
});
|
272
289
|
}
|
273
|
-
|
274
|
-
return
|
290
|
+
async saveDefaultFilter(personalizedFilter, resourceID, configName) {
|
291
|
+
return this.savePersonalizedFilter(personalizedFilter, resourceID, configName, true);
|
275
292
|
}
|
276
|
-
async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
293
|
+
async savePersonalizedFilter(personalizedFilter, resourceID, configName, isDefault) {
|
277
294
|
if (!personalizedFilter || Object.keys(personalizedFilter).length == 0) {
|
278
295
|
return Promise.reject(new Error("personalizedFilter não pode ser vazio"));
|
279
296
|
}
|
@@ -282,7 +299,7 @@ class PersonalizedFilterFetcher {
|
|
282
299
|
return new Promise((resolve, reject) => {
|
283
300
|
DataFetcher.get()
|
284
301
|
.callGraphQL({
|
285
|
-
values: { name: this.resolveURI(resourceID, configName), filterAssistent: personalizedFilterParsed },
|
302
|
+
values: { name: this.resolveURI(resourceID, configName, isDefault), filterAssistent: personalizedFilterParsed },
|
286
303
|
query: this.templateByQuery.get("savePersonalizedFilter"),
|
287
304
|
})
|
288
305
|
.then((resp) => {
|
@@ -293,11 +310,14 @@ class PersonalizedFilterFetcher {
|
|
293
310
|
});
|
294
311
|
});
|
295
312
|
}
|
296
|
-
|
313
|
+
removeDefaultFilter(personalizedFilter, resourceID, configName) {
|
314
|
+
return this.removePersonalizedFilter(personalizedFilter, resourceID, configName, true);
|
315
|
+
}
|
316
|
+
async removePersonalizedFilter(personalizedFilter, resourceID, configName, isDefault) {
|
297
317
|
return new Promise((resolve, reject) => {
|
298
318
|
DataFetcher.get()
|
299
319
|
.callGraphQL({
|
300
|
-
values: { name: this.resolveURI(resourceID, configName), filterId: personalizedFilter.id },
|
320
|
+
values: { name: this.resolveURI(resourceID, configName, isDefault), filterId: personalizedFilter.id },
|
301
321
|
query: this.templateByQuery.get("deletePersonalizedFilter"),
|
302
322
|
})
|
303
323
|
.then((resp) => {
|
@@ -362,15 +382,15 @@ var CONFIG_SOURCE;
|
|
362
382
|
})(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
|
363
383
|
class ConfigStorage {
|
364
384
|
static addFilterBarLegacyConfig(configName, legacyConfigName) {
|
365
|
-
this.
|
385
|
+
this.validateResourceId(legacyConfigName);
|
366
386
|
this.filterBarLegacyConfig.set(configName, legacyConfigName);
|
367
387
|
}
|
368
388
|
static addFormLegacyConfig(configName, legacyConfigName) {
|
369
|
-
this.
|
389
|
+
this.validateResourceId(legacyConfigName);
|
370
390
|
this.formLegacyConfig.set(configName, legacyConfigName);
|
371
391
|
}
|
372
392
|
static addGridLegacyConfig(configName, legacyConfigName) {
|
373
|
-
this.
|
393
|
+
this.validateResourceId(legacyConfigName);
|
374
394
|
this.gridLegacyConfig.set(configName, legacyConfigName);
|
375
395
|
}
|
376
396
|
static preload(resourceID, configName, legacyConfigs) {
|
@@ -427,6 +447,10 @@ class ConfigStorage {
|
|
427
447
|
await this.deleteGridConfigCache(name, resourceID);
|
428
448
|
return this.gridConfigFetcher.saveConfig(config, name, resourceID);
|
429
449
|
}
|
450
|
+
static async loadDefaultFilter(filterId, resourceID, configName) {
|
451
|
+
const legacyConfigName = this.filterBarLegacyConfig.get(configName);
|
452
|
+
return this.personalizedFilterFetcher.loadDefaultFilter(resourceID, filterId, configName, legacyConfigName);
|
453
|
+
}
|
430
454
|
static async loadPersonalizedFilter(filterId, resourceID, configName) {
|
431
455
|
const legacyConfigName = this.filterBarLegacyConfig.get(configName);
|
432
456
|
return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName, legacyConfigName);
|
@@ -437,6 +461,13 @@ class ConfigStorage {
|
|
437
461
|
await this.deleteFilterBarConfigCache(configName, resourceID);
|
438
462
|
return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
|
439
463
|
}
|
464
|
+
static async saveDefaultFilter(personalizedFilter, resourceID, configName) {
|
465
|
+
await this.deleteFilterBarConfigCache(configName, resourceID);
|
466
|
+
return this.personalizedFilterFetcher.saveDefaultFilter(personalizedFilter, resourceID, configName);
|
467
|
+
}
|
468
|
+
static async removeDefaultFilter(personalizedFilter, resourceID, configName) {
|
469
|
+
return this.personalizedFilterFetcher.removeDefaultFilter(personalizedFilter, resourceID, configName);
|
470
|
+
}
|
440
471
|
static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
441
472
|
return this.personalizedFilterFetcher.removePersonalizedFilter(personalizedFilter, resourceID, configName);
|
442
473
|
}
|
@@ -452,10 +483,8 @@ class ConfigStorage {
|
|
452
483
|
static async deleteFilterBarConfigCache(name, resourceID) {
|
453
484
|
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
|
454
485
|
}
|
455
|
-
static
|
456
|
-
if (!
|
457
|
-
throw Error(this.CONFIG_NAME_ERROR_MESSAGE);
|
458
|
-
if (!legacyConfigName)
|
486
|
+
static validateResourceId(resourceId) {
|
487
|
+
if (!resourceId)
|
459
488
|
throw Error(this.LEGACY_CONFIG_NAME_ERROR_MESSAGE);
|
460
489
|
}
|
461
490
|
static handleLegacyConfig(configName, configSource, urlParams) {
|
@@ -495,7 +524,6 @@ class ConfigStorage {
|
|
495
524
|
return `req_${source}_${name}_${resourceID}`;
|
496
525
|
}
|
497
526
|
}
|
498
|
-
ConfigStorage.CONFIG_NAME_ERROR_MESSAGE = "ConfigName precisa ser informado.";
|
499
527
|
ConfigStorage.LEGACY_CONFIG_NAME_ERROR_MESSAGE = "LegacyConfigName precisa ser informado.";
|
500
528
|
ConfigStorage.filterBarLegacyConfig = new Map();
|
501
529
|
ConfigStorage.formLegacyConfig = new Map();
|
package/dist/esm/{PersonalizedFilterUtils-e2b38ef7.js → PersonalizedFilterUtils-2db38ff2.js}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { DataType, NumberUtils, DateUtils, UserInterface } from '@sankhyalabs/core';
|
2
2
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
3
|
-
import { F as FilterOperand } from './index-
|
3
|
+
import { F as FilterOperand } from './index-8acbae97.js';
|
4
4
|
|
5
5
|
class PersonalizedFilterUtils {
|
6
6
|
/**
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
1
|
+
import { C as ConfigStorage } from './ConfigStorage-79b9e180.js';
|
2
2
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
3
3
|
import { F as FormConfigFetcher } from './form-config-fetcher-fa208a6c.js';
|
4
4
|
import { c as TAB_NAMES } from './constants-7db1128a.js';
|
@@ -83,6 +83,12 @@ const snkFilterBarMessages = {
|
|
83
83
|
"cancelButtonLabel": "Limpar tudo",
|
84
84
|
"customFilters": "Filtros personalizados",
|
85
85
|
"quickFilters": "Filtros rápidos",
|
86
|
+
"defaultFilter": {
|
87
|
+
"title": "Filtro padrão",
|
88
|
+
"edit": "Editar filtro",
|
89
|
+
"remove": "Excluir filtro",
|
90
|
+
"create": "Criar filtro padrão",
|
91
|
+
},
|
86
92
|
"validations": {
|
87
93
|
"notFullFilled": {
|
88
94
|
"title": "Filtro parcialmente preenchido",
|
@@ -395,6 +401,8 @@ const snkPersonalizedFilterMessages = {
|
|
395
401
|
info: {
|
396
402
|
titleEdit: "Editar filtro personalizado",
|
397
403
|
titleAdd: "Criar filtro personalizado",
|
404
|
+
titleCreateDefault: "Aplicar filtro padrão",
|
405
|
+
titleEditDefault: "Editar filtro padrão",
|
398
406
|
titleCollapsible: "Expressão a ser aplicada (gerada pelo assistente)",
|
399
407
|
labelSearchField: "Buscar campo",
|
400
408
|
labelOperator: "Operador",
|
@@ -417,7 +425,10 @@ const snkPersonalizedFilterMessages = {
|
|
417
425
|
applyExpression: "Expressão a ser aplicada:",
|
418
426
|
tooltipDisabledAssistentMode: "Expressão não suportada pelo assistente.",
|
419
427
|
activeModeAdvanced: "Ativar modo avançado",
|
420
|
-
activeModeAssistent: "Ativar modo assistente"
|
428
|
+
activeModeAssistent: "Ativar modo assistente",
|
429
|
+
textInputDisabled: "Campo desabilitado para filtros padrões",
|
430
|
+
checkVariableDisabled: "Filtro padrão não pode ser variável.",
|
431
|
+
deleteDefaultFilterConfirm: "Deseja excluir o <b>filtro padrão</b>?",
|
421
432
|
},
|
422
433
|
confirmExpression: {
|
423
434
|
title: "Aviso",
|
@@ -0,0 +1,8 @@
|
|
1
|
+
var ActionDefaultFilter;
|
2
|
+
(function (ActionDefaultFilter) {
|
3
|
+
ActionDefaultFilter["EDIT"] = "edit";
|
4
|
+
ActionDefaultFilter["REMOVE"] = "remove";
|
5
|
+
ActionDefaultFilter["CREATE"] = "create";
|
6
|
+
})(ActionDefaultFilter || (ActionDefaultFilter = {}));
|
7
|
+
|
8
|
+
export { ActionDefaultFilter as A };
|
@@ -3,6 +3,7 @@ var FilterType;
|
|
3
3
|
FilterType["QUICK_FILTER"] = "QUICK_FILTER";
|
4
4
|
FilterType["CUSTOM_FILTER"] = "CUSTOM_FILTER";
|
5
5
|
FilterType["OTHER_FILTERS"] = "OTHER_FILTERS";
|
6
|
+
FilterType["DEFAULT_FILTER"] = "DEFAULT_FILTER";
|
6
7
|
})(FilterType || (FilterType = {}));
|
7
8
|
const FilterType$1 = FilterType;
|
8
9
|
|
@@ -40,5 +40,10 @@ var FilterEntities;
|
|
40
40
|
FilterEntities["FIELD"] = "Campo";
|
41
41
|
FilterEntities["INSTANCE"] = "Instancia";
|
42
42
|
})(FilterEntities || (FilterEntities = {}));
|
43
|
+
var DefaultFilter;
|
44
|
+
(function (DefaultFilter) {
|
45
|
+
DefaultFilter["name"] = "Filtro padr\u00E3o";
|
46
|
+
DefaultFilter["id"] = "DEFAULT_FILTER";
|
47
|
+
})(DefaultFilter || (DefaultFilter = {}));
|
43
48
|
|
44
|
-
export { FilterOperand as F, FilterGroupCondition as a, FilterConfigType as b, FilterEntities as c, FilterUserConfigTypes as d };
|
49
|
+
export { DefaultFilter as D, FilterOperand as F, FilterGroupCondition as a, FilterConfigType as b, FilterEntities as c, FilterUserConfigTypes as d };
|
@@ -2154,6 +2154,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
2154
2154
|
return import(
|
2155
2155
|
/* webpackMode: "lazy" */
|
2156
2156
|
'./teste-pesquisa.entry.js').then(processMod, consoleError);
|
2157
|
+
case 'snk-default-filter':
|
2158
|
+
return import(
|
2159
|
+
/* webpackMode: "lazy" */
|
2160
|
+
'./snk-default-filter.entry.js').then(processMod, consoleError);
|
2157
2161
|
case 'snk-filter-modal-item':
|
2158
2162
|
return import(
|
2159
2163
|
/* webpackMode: "lazy" */
|