@sankhyalabs/sankhyablocks 9.2.0-dev.17 → 9.2.0-dev.19
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-0ebc800f.js → ConfigStorage-52c38bb9.js} +2 -2
- package/dist/cjs/{DataFetcher-602cdc72.js → DataFetcher-9af55840.js} +15 -0
- package/dist/cjs/{ISave-18205d86.js → ISave-c4918000.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-4b651537.js → SnkFormConfigManager-cef663d1.js} +2 -2
- package/dist/cjs/{ClientSideExporterProvider-bb0b2273.js → SnkMultiSelectionListDataSource-58ded10c.js} +78 -78
- package/dist/cjs/{auth-fetcher-82317d4d.js → auth-fetcher-a3a3bb16.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-93077a2f.js → dataunit-fetcher-ae454648.js} +1 -1
- package/dist/cjs/filter-validate-6993f6f2.js +30 -0
- package/dist/cjs/{form-config-fetcher-05d210e7.js → form-config-fetcher-d7bb4f41.js} +1 -1
- package/dist/cjs/index-1cf293c1.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_8.cjs.entry.js +5 -5
- package/dist/cjs/snk-application.cjs.entry.js +6 -6
- package/dist/cjs/snk-attach.cjs.entry.js +5 -5
- package/dist/cjs/snk-crud.cjs.entry.js +5 -5
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-28d629e4.js → snk-data-unit-a59a7ade.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- package/dist/cjs/snk-entity-list.cjs.entry.js +10 -3
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +164 -100
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +23 -2
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +20 -2
- package/dist/cjs/snk-filter-detail.cjs.entry.js +25 -8
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +9 -14
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +16 -3
- package/dist/cjs/snk-filter-number.cjs.entry.js +34 -3
- package/dist/cjs/snk-filter-period.cjs.entry.js +59 -14
- package/dist/cjs/snk-filter-search.cjs.entry.js +14 -3
- package/dist/cjs/snk-filter-text.cjs.entry.js +18 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid.cjs.entry.js +38 -21
- package/dist/cjs/{snk-guides-viewer-73d40f42.js → snk-guides-viewer-e7c08c71.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-pesquisa.cjs.entry.js +4 -4
- package/dist/cjs/snk-simple-crud.cjs.entry.js +13 -13
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +28 -4
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +72 -2
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +73 -2
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +51 -5
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +83 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +118 -27
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +49 -5
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +71 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +62 -11
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +70 -8
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +0 -4
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +112 -16
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +8 -16
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +106 -52
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
- package/dist/collection/components/snk-filter-bar/utils/filter-validate.js +24 -0
- package/dist/collection/components/snk-grid/snk-grid.js +89 -11
- package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +1 -0
- package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js +4 -0
- package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +1 -0
- package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js +4 -0
- package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +1 -0
- package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js +4 -0
- package/dist/components/DataFetcher.js +15 -0
- package/dist/components/snk-crud.js +62 -44
- package/dist/components/snk-detail-view2.js +89 -56
- package/dist/components/snk-entity-list.js +11 -3
- package/dist/components/snk-filter-bar2.js +77 -93
- package/dist/components/snk-filter-binary-select.js +27 -3
- package/dist/components/snk-filter-checkbox-list.js +24 -3
- package/dist/components/snk-filter-detail2.js +28 -9
- package/dist/components/snk-filter-item2.js +70 -8
- package/dist/components/snk-filter-modal-item2.js +7 -12
- package/dist/components/snk-filter-modal.js +1 -325
- package/dist/components/snk-filter-modal2.js +391 -0
- package/dist/components/snk-filter-multi-select.js +19 -4
- package/dist/components/snk-filter-number.js +38 -4
- package/dist/components/snk-filter-period.js +64 -16
- package/dist/components/snk-filter-search.js +17 -4
- package/dist/components/snk-filter-text.js +22 -2
- package/dist/components/snk-grid2.js +65 -29
- package/dist/esm/{ConfigStorage-fc4e3a42.js → ConfigStorage-1e758486.js} +2 -2
- package/dist/esm/{DataFetcher-01ce1a4f.js → DataFetcher-2f7ba7ae.js} +15 -0
- package/dist/esm/{ISave-d36bade4.js → ISave-4c9742c1.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-71dae34e.js → SnkFormConfigManager-d7031fcb.js} +2 -2
- package/dist/esm/{ClientSideExporterProvider-21a99af1.js → SnkMultiSelectionListDataSource-eace25fd.js} +83 -83
- package/dist/esm/{auth-fetcher-2e565c35.js → auth-fetcher-d8169b9c.js} +1 -1
- package/dist/esm/{dataunit-fetcher-14ba162b.js → dataunit-fetcher-1f7a73df.js} +1 -1
- package/dist/esm/filter-validate-d765d450.js +27 -0
- package/dist/esm/{form-config-fetcher-a1ccc944.js → form-config-fetcher-eb03ac08.js} +1 -1
- package/dist/esm/index-479e1293.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +4 -4
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_8.entry.js +5 -5
- package/dist/esm/snk-application.entry.js +6 -6
- package/dist/esm/snk-attach.entry.js +5 -5
- package/dist/esm/snk-crud.entry.js +5 -5
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-3977725e.js → snk-data-unit-a94dd52a.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +7 -7
- package/dist/esm/snk-entity-list.entry.js +10 -3
- package/dist/esm/snk-filter-bar_4.entry.js +165 -101
- package/dist/esm/snk-filter-binary-select.entry.js +23 -2
- package/dist/esm/snk-filter-checkbox-list.entry.js +20 -2
- package/dist/esm/snk-filter-detail.entry.js +25 -8
- package/dist/esm/snk-filter-modal-item.entry.js +9 -14
- package/dist/esm/snk-filter-multi-select.entry.js +16 -3
- package/dist/esm/snk-filter-number.entry.js +34 -3
- package/dist/esm/snk-filter-period.entry.js +59 -14
- package/dist/esm/snk-filter-search.entry.js +14 -3
- package/dist/esm/snk-filter-text.entry.js +18 -1
- package/dist/esm/snk-form_2.entry.js +4 -4
- package/dist/esm/snk-grid.entry.js +31 -14
- package/dist/esm/{snk-guides-viewer-f800c9aa.js → snk-guides-viewer-e716659f.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-pesquisa.entry.js +4 -4
- package/dist/esm/snk-simple-crud.entry.js +8 -8
- package/dist/sankhyablocks/p-093f58fa.entry.js +1 -0
- package/dist/sankhyablocks/{p-e63cc25f.js → p-0dc071de.js} +1 -1
- package/dist/sankhyablocks/{p-f4bf0517.entry.js → p-0f6f2a84.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2b2c2718.js → p-1129ded7.js} +1 -1
- package/dist/sankhyablocks/p-12cba660.entry.js +1 -0
- package/dist/sankhyablocks/{p-51209229.js → p-12db5588.js} +1 -1
- package/dist/sankhyablocks/{p-65517fcf.js → p-3d4a3965.js} +1 -1
- package/dist/sankhyablocks/p-3ed04f0d.entry.js +1 -0
- package/dist/sankhyablocks/{p-b6b42620.entry.js → p-4033a6e3.entry.js} +1 -1
- package/dist/sankhyablocks/p-49ddc27a.entry.js +1 -0
- package/dist/sankhyablocks/{p-c3eea705.entry.js → p-4a42d004.entry.js} +1 -1
- package/dist/sankhyablocks/p-4c763b10.entry.js +1 -0
- package/dist/sankhyablocks/p-4eeb06fc.js +1 -0
- package/dist/sankhyablocks/{p-dc8bb41f.js → p-552bdfdc.js} +1 -1
- package/dist/sankhyablocks/{p-3cdfd7fb.js → p-66e6569e.js} +1 -1
- package/dist/sankhyablocks/p-6909c146.entry.js +1 -0
- package/dist/sankhyablocks/p-69d0afa4.js +1 -0
- package/dist/sankhyablocks/{p-c3bab5f4.js → p-75b80a92.js} +1 -1
- package/dist/sankhyablocks/p-7f7fe6c4.entry.js +1 -0
- package/dist/sankhyablocks/{p-e5571279.entry.js → p-86009ea5.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7b97f9af.entry.js → p-864066bb.entry.js} +1 -1
- package/dist/sankhyablocks/p-96d45943.entry.js +1 -0
- package/dist/sankhyablocks/{p-34222890.entry.js → p-a0b4c940.entry.js} +1 -1
- package/dist/sankhyablocks/{p-a60028f1.entry.js → p-a4be272f.entry.js} +1 -1
- package/dist/sankhyablocks/p-ab2ba522.entry.js +1 -0
- package/dist/sankhyablocks/p-ac9488fd.entry.js +1 -0
- package/dist/sankhyablocks/{p-7a1d3cb6.entry.js → p-b1d8cbf7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7535d592.js → p-b393f1df.js} +1 -1
- package/dist/sankhyablocks/{p-dfbe4d7f.entry.js → p-c5d281ad.entry.js} +1 -1
- package/dist/sankhyablocks/{p-41e5a485.entry.js → p-c6d8c86b.entry.js} +1 -1
- package/dist/sankhyablocks/p-cb4343c4.entry.js +1 -0
- package/dist/sankhyablocks/p-d235314c.entry.js +1 -0
- package/dist/sankhyablocks/{p-dde9da7a.entry.js → p-d76f1aa5.entry.js} +1 -1
- package/dist/sankhyablocks/{p-aba06047.entry.js → p-de58a26f.entry.js} +1 -1
- package/dist/sankhyablocks/p-e258de96.entry.js +1 -0
- package/dist/sankhyablocks/p-fd8047b8.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +8 -4
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +12 -4
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +16 -4
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +17 -3
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +10 -2
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +8 -3
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +27 -4
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +17 -3
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +2 -3
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +15 -2
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +4 -2
- package/dist/types/components/snk-filter-bar/utils/filter-validate.d.ts +11 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +21 -8
- package/dist/types/components.d.ts +202 -17
- package/package.json +1 -1
- package/dist/sankhyablocks/p-07b14811.entry.js +0 -1
- package/dist/sankhyablocks/p-082e7ba8.entry.js +0 -1
- package/dist/sankhyablocks/p-25209340.entry.js +0 -1
- package/dist/sankhyablocks/p-295b83ae.entry.js +0 -1
- package/dist/sankhyablocks/p-3143bb44.entry.js +0 -1
- package/dist/sankhyablocks/p-353b4a74.js +0 -1
- package/dist/sankhyablocks/p-398cdd67.entry.js +0 -1
- package/dist/sankhyablocks/p-5bab470d.entry.js +0 -1
- package/dist/sankhyablocks/p-9fd87bfd.entry.js +0 -1
- package/dist/sankhyablocks/p-a76e6d51.entry.js +0 -1
- package/dist/sankhyablocks/p-ae2ebab7.js +0 -1
- package/dist/sankhyablocks/p-b21aa190.entry.js +0 -1
- package/dist/sankhyablocks/p-c6a8a8bc.entry.js +0 -1
- package/dist/sankhyablocks/p-c8932b14.entry.js +0 -1
- package/dist/sankhyablocks/p-dff65083.entry.js +0 -1
@@ -1,11 +1,10 @@
|
|
1
|
-
import { ApplicationContext, ElementIDUtils,
|
1
|
+
import { ApplicationContext, ElementIDUtils, ErrorException, LockManager, LockManagerOperation, ObjectUtils } from '@sankhyalabs/core';
|
2
2
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
3
3
|
import { h, Host } from '@stencil/core';
|
4
4
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
5
|
+
import { PersonalizedFilterUtils } from '../snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils';
|
5
6
|
import buildFilter from './filter-item/dataunitfilter/data-unit-filter-builder';
|
6
7
|
import FilterItemType from './filter-item/filter-item-type.enum';
|
7
|
-
import SnkFilterModalFactory from './utils/SnkFilterModalFactory';
|
8
|
-
import { PersonalizedFilterUtils } from '../snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils';
|
9
8
|
export class SnkFilterBar {
|
10
9
|
constructor() {
|
11
10
|
this._updateSequence = [];
|
@@ -42,10 +41,13 @@ export class SnkFilterBar {
|
|
42
41
|
this.filterBarLegacyConfigName = undefined;
|
43
42
|
this.autoLoad = undefined;
|
44
43
|
this.afterApplyConfig = undefined;
|
44
|
+
this.filterCustomConfig = undefined;
|
45
|
+
this.filterCustomConfigInterceptor = undefined;
|
45
46
|
this.allowDefault = undefined;
|
46
47
|
this.scrollerLocked = false;
|
47
48
|
this.showPersonalizedFilter = false;
|
48
49
|
this.personalizedFilterId = undefined;
|
50
|
+
this.isFilterModalOpen = false;
|
49
51
|
}
|
50
52
|
hasValidValue(item) {
|
51
53
|
if (item.value === undefined || item.value === null)
|
@@ -157,7 +159,6 @@ export class SnkFilterBar {
|
|
157
159
|
return Promise.resolve(undefined);
|
158
160
|
}
|
159
161
|
const itemToRemove = this.filterConfig[itemIndex];
|
160
|
-
;
|
161
162
|
this.filterConfig = this.filterConfig.filter(item => item.id !== filterID);
|
162
163
|
return Promise.resolve(itemToRemove);
|
163
164
|
}
|
@@ -194,7 +195,7 @@ export class SnkFilterBar {
|
|
194
195
|
return;
|
195
196
|
}
|
196
197
|
this._loadingPending = false;
|
197
|
-
this.doLoadData(
|
198
|
+
this.doLoadData();
|
198
199
|
}
|
199
200
|
if (this._configUpdated) {
|
200
201
|
this._configUpdated = false;
|
@@ -293,11 +294,11 @@ export class SnkFilterBar {
|
|
293
294
|
const unpinnedItems = [];
|
294
295
|
this.filterConfig.sort((a, b) => this._filtersComparator(a, b))
|
295
296
|
.filter(this.filterActiveFilter)
|
296
|
-
.forEach((item
|
297
|
+
.forEach((item) => {
|
297
298
|
item = ObjectUtils.copy(item);
|
298
299
|
const itemId = `filter-${item.id}`;
|
299
|
-
const filterItem = (h("snk-filter-item", { onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFilterChange: (event) => this.updateFilter(event.detail), onFocusin: () => this.itemFocused(itemId), id: itemId, config: item, class:
|
300
|
-
if (item.fixed || item.hardFixed) {
|
300
|
+
const filterItem = (h("snk-filter-item", { onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFilterChange: (event) => this.updateFilter(event.detail), onFocusin: () => this.itemFocused(itemId), id: itemId, config: item, class: "ez-margin-horizontal--extra-small", getMessage: (key, props) => this.getMessage(key, props), key: item.id }));
|
301
|
+
if (item.fixed || item.hardFixed || item.required) {
|
301
302
|
pinnedItems.push(filterItem);
|
302
303
|
}
|
303
304
|
else {
|
@@ -306,9 +307,9 @@ export class SnkFilterBar {
|
|
306
307
|
return filterItem;
|
307
308
|
});
|
308
309
|
const elements = [];
|
309
|
-
elements.push(...pinnedItems);
|
310
|
+
elements.push(...pinnedItems.reverse());
|
310
311
|
if (pinnedItems.length > 0 && unpinnedItems.length > 0) {
|
311
|
-
elements.push(h("hr", { class: "ez-
|
312
|
+
elements.push(h("hr", { class: "ez-margin-horizontal--small ez-margin-vertical--auto ez-divider-vertical ez-divider--dark snk-filter-bar__divider" }));
|
312
313
|
}
|
313
314
|
elements.push(...unpinnedItems);
|
314
315
|
return elements;
|
@@ -333,7 +334,7 @@ export class SnkFilterBar {
|
|
333
334
|
return normalized;
|
334
335
|
}
|
335
336
|
updateFilter(newItem) {
|
336
|
-
|
337
|
+
let config = this.filterConfig.map(item => {
|
337
338
|
newItem = this.normalizeItem(newItem);
|
338
339
|
if (item.id === newItem.id) {
|
339
340
|
if (ObjectUtils.objectToString(item) != ObjectUtils.objectToString(newItem)) {
|
@@ -343,6 +344,10 @@ export class SnkFilterBar {
|
|
343
344
|
}
|
344
345
|
return item;
|
345
346
|
}).sort((a, b) => this._filtersComparator(a, b));
|
347
|
+
if (this.filterCustomConfigInterceptor) {
|
348
|
+
config = this.filterCustomConfigInterceptor(config);
|
349
|
+
}
|
350
|
+
this.filterConfig = config;
|
346
351
|
}
|
347
352
|
loadPermitions() {
|
348
353
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
@@ -364,6 +369,12 @@ export class SnkFilterBar {
|
|
364
369
|
else {
|
365
370
|
config = await ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name });
|
366
371
|
}
|
372
|
+
if (this.filterCustomConfig) {
|
373
|
+
config = [...this.filterCustomConfig, ...config];
|
374
|
+
}
|
375
|
+
if (this.filterCustomConfigInterceptor) {
|
376
|
+
config = this.filterCustomConfigInterceptor(config);
|
377
|
+
}
|
367
378
|
this.filterConfig = config.map(item => this.normalizeItem(item));
|
368
379
|
this.filterConfig.sort((a, b) => this._filtersComparator(a, b));
|
369
380
|
}
|
@@ -407,30 +418,13 @@ export class SnkFilterBar {
|
|
407
418
|
* @async
|
408
419
|
*/
|
409
420
|
async showFilterModal() {
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
};
|
415
|
-
let filtersConfigCopy = ObjectUtils.copy(this.filterConfig);
|
416
|
-
filtersConfigCopy = filtersConfigCopy.sort((itemA, itemB) => {
|
417
|
-
return itemA.originOrder - itemB.originOrder;
|
418
|
-
});
|
419
|
-
const factoryParams = {
|
420
|
-
filterConfig: filtersConfigCopy,
|
421
|
-
configName: this.configName,
|
422
|
-
onComplete: callbackOnApplyFilter,
|
423
|
-
disablePersonalizedFilter: this.disablePersonalizedFilter,
|
424
|
-
getMessage: (key, props) => this.getMessage(key, props),
|
425
|
-
onAddPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault),
|
426
|
-
onEditPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault),
|
427
|
-
onDeletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault),
|
428
|
-
};
|
429
|
-
this._filterModalFactory = new SnkFilterModalFactory(factoryParams);
|
430
|
-
await this._filterModalFactory.showModal();
|
421
|
+
if (this.isFilterModalOpen) {
|
422
|
+
return; // Evita abrir múltiplos modais
|
423
|
+
}
|
424
|
+
this.isFilterModalOpen = true;
|
431
425
|
}
|
432
426
|
addPersonalizedFilter(isDefault = false) {
|
433
|
-
this.
|
427
|
+
this.isFilterModalOpen = false;
|
434
428
|
this._isDefaultFilter = isDefault;
|
435
429
|
this.personalizedFilterId = undefined;
|
436
430
|
this.showPersonalizedFilter = true;
|
@@ -439,7 +433,7 @@ export class SnkFilterBar {
|
|
439
433
|
});
|
440
434
|
}
|
441
435
|
editPersonalizedFilter(id, isDefault = false) {
|
442
|
-
this.
|
436
|
+
this.isFilterModalOpen = false;
|
443
437
|
this._isDefaultFilter = isDefault;
|
444
438
|
this.showPersonalizedFilter = true;
|
445
439
|
this.personalizedFilterId = id;
|
@@ -454,6 +448,15 @@ export class SnkFilterBar {
|
|
454
448
|
ConfigStorage.removePersonalizedFilter(filter, this.resourceID, configName);
|
455
449
|
}
|
456
450
|
}
|
451
|
+
closeFilterModal() {
|
452
|
+
this.isFilterModalOpen = false;
|
453
|
+
}
|
454
|
+
applyFiltersFromModal(filters) {
|
455
|
+
var _a;
|
456
|
+
this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
|
457
|
+
(_a = this.afterApplyConfig) === null || _a === void 0 ? void 0 : _a.call(this);
|
458
|
+
this.isFilterModalOpen = false;
|
459
|
+
}
|
457
460
|
handleHidePersonalizedFilter(reloadFilterBar) {
|
458
461
|
if (reloadFilterBar) {
|
459
462
|
this.loadConfigFromStorage().then(() => {
|
@@ -500,10 +503,14 @@ export class SnkFilterBar {
|
|
500
503
|
if (this.showPersonalizedFilter) {
|
501
504
|
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, isDefaultFilter: this._isDefaultFilter, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
502
505
|
}
|
506
|
+
let filtersConfigCopy = ObjectUtils.copy(this.filterConfig);
|
507
|
+
filtersConfigCopy = filtersConfigCopy.sort((itemA, itemB) => {
|
508
|
+
return itemA.originOrder - itemB.originOrder;
|
509
|
+
});
|
503
510
|
if (this.mode !== "regular") {
|
504
|
-
return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) }))));
|
511
|
+
return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) })), h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
|
505
512
|
}
|
506
|
-
return (h(Host, null, 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 ez-margin-top--extra-small", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
|
513
|
+
return (h(Host, null, 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 ez-margin-top--extra-small", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, this.getMessage("snkFilterBar.filters")), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" })), h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
|
507
514
|
}
|
508
515
|
static get is() { return "snk-filter-bar"; }
|
509
516
|
static get encapsulation() { return "scoped"; }
|
@@ -811,6 +818,67 @@ export class SnkFilterBar {
|
|
811
818
|
}],
|
812
819
|
"text": ""
|
813
820
|
}
|
821
|
+
},
|
822
|
+
"filterCustomConfig": {
|
823
|
+
"type": "unknown",
|
824
|
+
"mutable": false,
|
825
|
+
"complexType": {
|
826
|
+
"original": "Array<SnkFilterItemConfig>",
|
827
|
+
"resolved": "SnkFilterItemConfig[]",
|
828
|
+
"references": {
|
829
|
+
"Array": {
|
830
|
+
"location": "global"
|
831
|
+
},
|
832
|
+
"SnkFilterItemConfig": {
|
833
|
+
"location": "import",
|
834
|
+
"path": "./filter-item/snk-filter-item"
|
835
|
+
}
|
836
|
+
}
|
837
|
+
},
|
838
|
+
"required": false,
|
839
|
+
"optional": true,
|
840
|
+
"docs": {
|
841
|
+
"tags": [{
|
842
|
+
"name": "description",
|
843
|
+
"text": "Configura\u00E7\u00E3o customizada dos filtros."
|
844
|
+
}, {
|
845
|
+
"name": "param",
|
846
|
+
"text": "config - Lista de configura\u00E7\u00F5es de filtros."
|
847
|
+
}],
|
848
|
+
"text": ""
|
849
|
+
}
|
850
|
+
},
|
851
|
+
"filterCustomConfigInterceptor": {
|
852
|
+
"type": "unknown",
|
853
|
+
"mutable": false,
|
854
|
+
"complexType": {
|
855
|
+
"original": "(config: Array<SnkFilterItemConfig>) => Array<SnkFilterItemConfig>",
|
856
|
+
"resolved": "(config: SnkFilterItemConfig[]) => SnkFilterItemConfig[]",
|
857
|
+
"references": {
|
858
|
+
"Array": {
|
859
|
+
"location": "global"
|
860
|
+
},
|
861
|
+
"SnkFilterItemConfig": {
|
862
|
+
"location": "import",
|
863
|
+
"path": "./filter-item/snk-filter-item"
|
864
|
+
}
|
865
|
+
}
|
866
|
+
},
|
867
|
+
"required": false,
|
868
|
+
"optional": true,
|
869
|
+
"docs": {
|
870
|
+
"tags": [{
|
871
|
+
"name": "description",
|
872
|
+
"text": "Intercepta a configura\u00E7\u00E3o dos filtros antes de serem aplicadas."
|
873
|
+
}, {
|
874
|
+
"name": "param",
|
875
|
+
"text": "config - Lista de configura\u00E7\u00F5es de filtros."
|
876
|
+
}, {
|
877
|
+
"name": "returns",
|
878
|
+
"text": "Retorna a lista de configura\u00E7\u00F5es de filtros."
|
879
|
+
}],
|
880
|
+
"text": ""
|
881
|
+
}
|
814
882
|
}
|
815
883
|
};
|
816
884
|
}
|
@@ -819,7 +887,8 @@ export class SnkFilterBar {
|
|
819
887
|
"allowDefault": {},
|
820
888
|
"scrollerLocked": {},
|
821
889
|
"showPersonalizedFilter": {},
|
822
|
-
"personalizedFilterId": {}
|
890
|
+
"personalizedFilterId": {},
|
891
|
+
"isFilterModalOpen": {}
|
823
892
|
};
|
824
893
|
}
|
825
894
|
static get events() {
|
@@ -1060,21 +1129,6 @@ export class SnkFilterBar {
|
|
1060
1129
|
"references": {
|
1061
1130
|
"Promise": {
|
1062
1131
|
"location": "global"
|
1063
|
-
},
|
1064
|
-
"SnkFilterItemConfig": {
|
1065
|
-
"location": "import",
|
1066
|
-
"path": "./filter-item/snk-filter-item"
|
1067
|
-
},
|
1068
|
-
"Array": {
|
1069
|
-
"location": "global"
|
1070
|
-
},
|
1071
|
-
"SnkFilterModalFactoryParams": {
|
1072
|
-
"location": "import",
|
1073
|
-
"path": "./utils/SnkFilterModalFactory"
|
1074
|
-
},
|
1075
|
-
"IPersonalizedFilter": {
|
1076
|
-
"location": "import",
|
1077
|
-
"path": "../snk-personalized-filter/interfaces/IPersonalizedFilter"
|
1078
1132
|
}
|
1079
1133
|
},
|
1080
1134
|
"return": "Promise<void>"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
2
2
|
class SnkFilterModalFactory {
|
3
|
-
constructor({ filterConfig, configName, onComplete, getMessage, disablePersonalizedFilter, onAddPersonalizedFilter, onEditPersonalizedFilter, onDeletePersonalizedFilter }) {
|
3
|
+
constructor({ filterConfig, configName, onComplete, getMessage, disablePersonalizedFilter, onAddPersonalizedFilter, onEditPersonalizedFilter, onDeletePersonalizedFilter, filterCustomConfigInterceptor }) {
|
4
4
|
this._filterConfig = filterConfig;
|
5
5
|
this._configName = configName;
|
6
6
|
this._onComplete = onComplete;
|
@@ -9,6 +9,7 @@ class SnkFilterModalFactory {
|
|
9
9
|
this._addPersonalizedFilterFn = onAddPersonalizedFilter;
|
10
10
|
this._editPersonalizedFilterFn = onEditPersonalizedFilter;
|
11
11
|
this._onDeletePersonalizedFilter = onDeletePersonalizedFilter;
|
12
|
+
this._filterCustomConfigInterceptor = filterCustomConfigInterceptor;
|
12
13
|
}
|
13
14
|
applyFilters(newFilterConfig) {
|
14
15
|
this._onComplete(newFilterConfig);
|
@@ -26,6 +27,7 @@ class SnkFilterModalFactory {
|
|
26
27
|
filterModal.addPersonalizedFilter = (isDefault) => this._addPersonalizedFilterFn(isDefault);
|
27
28
|
filterModal.editPersonalizedFilter = (id, isDefault) => this._editPersonalizedFilterFn(id, isDefault);
|
28
29
|
filterModal.deletePersonalizedFilter = (filter, configName, isDefault) => this._onDeletePersonalizedFilter(filter, configName, isDefault);
|
30
|
+
filterModal.filterCustomConfigInterceptor = this._filterCustomConfigInterceptor;
|
29
31
|
return filterModal;
|
30
32
|
}
|
31
33
|
async showModal() {
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import FilterItemType from "../filter-item/filter-item-type.enum";
|
2
|
+
export function hasActiveElements(value) {
|
3
|
+
var _a;
|
4
|
+
const list = Array.isArray(value) ? value : value === null || value === void 0 ? void 0 : value.elements;
|
5
|
+
return ((_a = list === null || list === void 0 ? void 0 : list.filter((val) => val === null || val === void 0 ? void 0 : val.check)) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
6
|
+
}
|
7
|
+
export function getInvalidFilters(filters) {
|
8
|
+
return filters.filter(item => {
|
9
|
+
if (!item.required) {
|
10
|
+
return false;
|
11
|
+
}
|
12
|
+
if (item.type === FilterItemType.MULTI_LIST) {
|
13
|
+
return !hasActiveElements(item.value);
|
14
|
+
}
|
15
|
+
return !item.value;
|
16
|
+
});
|
17
|
+
}
|
18
|
+
export function validateFilters(filters) {
|
19
|
+
const notValidFilters = getInvalidFilters(filters);
|
20
|
+
if (notValidFilters.length === 0) {
|
21
|
+
return true;
|
22
|
+
}
|
23
|
+
return false;
|
24
|
+
}
|
@@ -1,18 +1,19 @@
|
|
1
|
-
import {
|
2
|
-
import { Action as DUAction, ApplicationContext, ElementIDUtils, KeyboardManager, StringUtils, } from '@sankhyalabs/core';
|
3
|
-
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
4
|
-
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
5
|
-
import { ExporterStrategy, PresentationMode } from '../../lib/@types';
|
6
|
-
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
7
|
-
import store from '../../lib/store';
|
8
|
-
import SnkMultiSelectionListDataSource from './filtercolumn/SnkMultiSelectionListDataSource';
|
1
|
+
import { ApplicationContext, Action as DUAction, ElementIDUtils, KeyboardManager, StringUtils } from '@sankhyalabs/core';
|
9
2
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
3
|
+
import { buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
|
+
import { Fragment, h, } from '@stencil/core';
|
10
5
|
import { CrudUtils } from '../../lib';
|
6
|
+
import { ExporterStrategy, PresentationMode } from '../../lib/@types';
|
7
|
+
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
11
8
|
import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter';
|
12
|
-
import
|
9
|
+
import store from "../../lib/store";
|
13
10
|
import { ContinuousInsertUtils } from '../../lib/utils/ContinuousInsertUtils';
|
14
11
|
import ClientSideExporterProvider from '../snk-data-exporter/providers/ClientSideExporterProvider';
|
15
|
-
import
|
12
|
+
import ServerSideExporterProvider from '../snk-data-exporter/providers/ServerSideExporterProvider';
|
13
|
+
import { validateFilters } from '../snk-filter-bar/utils/filter-validate';
|
14
|
+
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
15
|
+
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
16
|
+
import SnkMultiSelectionListDataSource from './filtercolumn/SnkMultiSelectionListDataSource';
|
16
17
|
export class SnkGrid {
|
17
18
|
constructor() {
|
18
19
|
this._customEditors = new Map();
|
@@ -42,6 +43,9 @@ export class SnkGrid {
|
|
42
43
|
if (action.type === DUAction.METADATA_LOADED) {
|
43
44
|
return await this.interceptMetadataLoaded(action);
|
44
45
|
}
|
46
|
+
if (action.type === DUAction.LOADING_DATA) {
|
47
|
+
return await this.interceptLoadData(action);
|
48
|
+
}
|
45
49
|
return action;
|
46
50
|
},
|
47
51
|
};
|
@@ -86,6 +90,8 @@ export class SnkGrid {
|
|
86
90
|
this.suppressCheckboxColumn = undefined;
|
87
91
|
this.suppressFilterColumn = false;
|
88
92
|
this.compact = undefined;
|
93
|
+
this.filterCustomConfig = undefined;
|
94
|
+
this.filterCustomConfigInterceptor = undefined;
|
89
95
|
}
|
90
96
|
getGridHeaderSelectedBtns() {
|
91
97
|
const btns = [
|
@@ -364,6 +370,17 @@ export class SnkGrid {
|
|
364
370
|
this.loadGridCustomFormatters(action.payload.fields);
|
365
371
|
return action;
|
366
372
|
}
|
373
|
+
async interceptLoadData(action) {
|
374
|
+
var _a;
|
375
|
+
const hasInvalidFilters = !validateFilters((_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig);
|
376
|
+
if (hasInvalidFilters) {
|
377
|
+
const errorTitle = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.title", {});
|
378
|
+
const errorMessage = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.message", {});
|
379
|
+
await this._application.error(errorTitle, errorMessage);
|
380
|
+
return;
|
381
|
+
}
|
382
|
+
return action;
|
383
|
+
}
|
367
384
|
finishLoading() {
|
368
385
|
this._dataUnit.addInterceptor(this.dataUnitInterceptor);
|
369
386
|
CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
@@ -573,7 +590,7 @@ export class SnkGrid {
|
|
573
590
|
return undefined;
|
574
591
|
}
|
575
592
|
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
|
576
|
-
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, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }), 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 ez-padding-top--extra-small", "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', actionsSettingsList: this.getActionsSettingsList() }, 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) => {
|
593
|
+
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, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, filterCustomConfig: this.filterCustomConfig, filterCustomConfigInterceptor: this.filterCustomConfigInterceptor }), 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 ez-padding-top--extra-small", "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', actionsSettingsList: this.getActionsSettingsList() }, 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) => {
|
577
594
|
this.gridConfigChangeHandler(evt);
|
578
595
|
}, onEzColumnFilterChanged: async () => await this.dataExporterProviderStore(), 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, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, useSearchColumn: this.useSearchColumn, suppressHorizontalScroll: this.suppressHorizontalScroll, paginationCounterMode: this.paginationCounterMode, suppressCheckboxColumn: this.suppressCheckboxColumn, suppressFilterColumn: this.suppressFilterColumn, compact: this.compact }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), 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, actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, h("slot", { name: "SnkGridFooter" })), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => 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), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
579
596
|
}
|
@@ -1243,6 +1260,67 @@ export class SnkGrid {
|
|
1243
1260
|
},
|
1244
1261
|
"attribute": "compact",
|
1245
1262
|
"reflect": false
|
1263
|
+
},
|
1264
|
+
"filterCustomConfig": {
|
1265
|
+
"type": "unknown",
|
1266
|
+
"mutable": false,
|
1267
|
+
"complexType": {
|
1268
|
+
"original": "Array<SnkFilterItemConfig>",
|
1269
|
+
"resolved": "SnkFilterItemConfig[]",
|
1270
|
+
"references": {
|
1271
|
+
"Array": {
|
1272
|
+
"location": "global"
|
1273
|
+
},
|
1274
|
+
"SnkFilterItemConfig": {
|
1275
|
+
"location": "import",
|
1276
|
+
"path": "../snk-filter-bar/filter-item/snk-filter-item"
|
1277
|
+
}
|
1278
|
+
}
|
1279
|
+
},
|
1280
|
+
"required": false,
|
1281
|
+
"optional": true,
|
1282
|
+
"docs": {
|
1283
|
+
"tags": [{
|
1284
|
+
"name": "description",
|
1285
|
+
"text": "Configura\u00E7\u00E3o customizada dos filtros."
|
1286
|
+
}, {
|
1287
|
+
"name": "param",
|
1288
|
+
"text": "config - Lista de configura\u00E7\u00F5es de filtros."
|
1289
|
+
}],
|
1290
|
+
"text": ""
|
1291
|
+
}
|
1292
|
+
},
|
1293
|
+
"filterCustomConfigInterceptor": {
|
1294
|
+
"type": "unknown",
|
1295
|
+
"mutable": false,
|
1296
|
+
"complexType": {
|
1297
|
+
"original": "(config: Array<SnkFilterItemConfig>) => Array<SnkFilterItemConfig>",
|
1298
|
+
"resolved": "(config: SnkFilterItemConfig[]) => SnkFilterItemConfig[]",
|
1299
|
+
"references": {
|
1300
|
+
"Array": {
|
1301
|
+
"location": "global"
|
1302
|
+
},
|
1303
|
+
"SnkFilterItemConfig": {
|
1304
|
+
"location": "import",
|
1305
|
+
"path": "../snk-filter-bar/filter-item/snk-filter-item"
|
1306
|
+
}
|
1307
|
+
}
|
1308
|
+
},
|
1309
|
+
"required": false,
|
1310
|
+
"optional": true,
|
1311
|
+
"docs": {
|
1312
|
+
"tags": [{
|
1313
|
+
"name": "description",
|
1314
|
+
"text": "Intercepta a configura\u00E7\u00E3o dos filtros antes de serem aplicadas."
|
1315
|
+
}, {
|
1316
|
+
"name": "param",
|
1317
|
+
"text": "config - Lista de configura\u00E7\u00F5es de filtros."
|
1318
|
+
}, {
|
1319
|
+
"name": "returns",
|
1320
|
+
"text": "Retorna a lista de configura\u00E7\u00F5es de filtros."
|
1321
|
+
}],
|
1322
|
+
"text": ""
|
1323
|
+
}
|
1246
1324
|
}
|
1247
1325
|
};
|
1248
1326
|
}
|
@@ -4,6 +4,10 @@ export const snkGridMessages = {
|
|
4
4
|
title: 'Warning',
|
5
5
|
message: 'The changes made will be discarded<br/><br/><b>Do you really want to cancel?</b>',
|
6
6
|
},
|
7
|
+
requiredFiltersNotFilled: {
|
8
|
+
title: 'Error',
|
9
|
+
message: 'There are required filters that are not filled.',
|
10
|
+
},
|
7
11
|
};
|
8
12
|
export const snkGridConfigMessages = {
|
9
13
|
gridConfiguration: 'Grid Configuration',
|
@@ -58,6 +58,7 @@ export const snkFilterBarMessages = {
|
|
58
58
|
create: "Crear filtro predeterminado",
|
59
59
|
},
|
60
60
|
validations: {
|
61
|
+
requiredFilter: "Filtro obligatorio",
|
61
62
|
notFullFilled: {
|
62
63
|
title: "Filtro parcialmente completado",
|
63
64
|
message: "Por favor complete toda la información del filtro."
|
@@ -4,6 +4,10 @@ export const snkGridMessages = {
|
|
4
4
|
title: 'Aviso',
|
5
5
|
message: 'Los cambios realizados serán descartados<br/><br/><b>¿Realmente desea cancelar?</b>',
|
6
6
|
},
|
7
|
+
requiredFiltersNotFilled: {
|
8
|
+
title: 'Error',
|
9
|
+
message: 'Existen filtros obligatorios que no están completados.',
|
10
|
+
},
|
7
11
|
};
|
8
12
|
export const snkGridConfigMessages = {
|
9
13
|
gridConfiguration: 'Configuración de la Cuadrícula',
|
@@ -58,6 +58,7 @@ export const snkFilterBarMessages = {
|
|
58
58
|
create: "Criar filtro padrão",
|
59
59
|
},
|
60
60
|
validations: {
|
61
|
+
requiredFilter: "Filtro obrigatório",
|
61
62
|
notFullFilled: {
|
62
63
|
title: "Filtro parcialmente preenchido",
|
63
64
|
message: "Favor completar todas as informações do filtro."
|
@@ -4,6 +4,10 @@ export const snkGridMessages = {
|
|
4
4
|
title: 'Aviso',
|
5
5
|
message: 'As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?</b>',
|
6
6
|
},
|
7
|
+
requiredFiltersNotFilled: {
|
8
|
+
title: 'Erro',
|
9
|
+
message: 'Existem filtros obrigatórios não preenchidos.',
|
10
|
+
},
|
7
11
|
};
|
8
12
|
export const snkGridConfigMessages = {
|
9
13
|
gridConfiguration: 'Configuração da Grade',
|
@@ -6761,6 +6761,7 @@ const snkFilterBarMessages$2 = {
|
|
6761
6761
|
create: "Criar filtro padrão",
|
6762
6762
|
},
|
6763
6763
|
validations: {
|
6764
|
+
requiredFilter: "Filtro obrigatório",
|
6764
6765
|
notFullFilled: {
|
6765
6766
|
title: "Filtro parcialmente preenchido",
|
6766
6767
|
message: "Favor completar todas as informações do filtro."
|
@@ -7314,6 +7315,10 @@ const snkGridMessages$2 = {
|
|
7314
7315
|
title: 'Aviso',
|
7315
7316
|
message: 'As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?</b>',
|
7316
7317
|
},
|
7318
|
+
requiredFiltersNotFilled: {
|
7319
|
+
title: 'Erro',
|
7320
|
+
message: 'Existem filtros obrigatórios não preenchidos.',
|
7321
|
+
},
|
7317
7322
|
};
|
7318
7323
|
const snkGridConfigMessages$2 = {
|
7319
7324
|
gridConfiguration: 'Configuração da Grade',
|
@@ -7606,6 +7611,7 @@ const snkFilterBarMessages$1 = {
|
|
7606
7611
|
create: "Create default filter",
|
7607
7612
|
},
|
7608
7613
|
validations: {
|
7614
|
+
requiredFilter: "Required filter",
|
7609
7615
|
notFullFilled: {
|
7610
7616
|
title: "Partially filled filter",
|
7611
7617
|
message: "Please complete all filter information."
|
@@ -8160,6 +8166,10 @@ const snkGridMessages$1 = {
|
|
8160
8166
|
title: 'Warning',
|
8161
8167
|
message: 'The changes made will be discarded<br/><br/><b>Do you really want to cancel?</b>',
|
8162
8168
|
},
|
8169
|
+
requiredFiltersNotFilled: {
|
8170
|
+
title: 'Error',
|
8171
|
+
message: 'There are required filters that are not filled.',
|
8172
|
+
},
|
8163
8173
|
};
|
8164
8174
|
const snkGridConfigMessages$1 = {
|
8165
8175
|
gridConfiguration: 'Grid Configuration',
|
@@ -8452,6 +8462,7 @@ const snkFilterBarMessages = {
|
|
8452
8462
|
create: "Crear filtro predeterminado",
|
8453
8463
|
},
|
8454
8464
|
validations: {
|
8465
|
+
requiredFilter: "Filtro obligatorio",
|
8455
8466
|
notFullFilled: {
|
8456
8467
|
title: "Filtro parcialmente completado",
|
8457
8468
|
message: "Por favor complete toda la información del filtro."
|
@@ -9006,6 +9017,10 @@ const snkGridMessages = {
|
|
9006
9017
|
title: 'Aviso',
|
9007
9018
|
message: 'Los cambios realizados serán descartados<br/><br/><b>¿Realmente desea cancelar?</b>',
|
9008
9019
|
},
|
9020
|
+
requiredFiltersNotFilled: {
|
9021
|
+
title: 'Error',
|
9022
|
+
message: 'Existen filtros obligatorios que no están completados.',
|
9023
|
+
},
|
9009
9024
|
};
|
9010
9025
|
const snkGridConfigMessages = {
|
9011
9026
|
gridConfiguration: 'Configuración de la Cuadrícula',
|