@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
@@ -10,11 +10,13 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
10
10
|
this._isSearchPlus = false;
|
11
11
|
this.config = undefined;
|
12
12
|
this.value = undefined;
|
13
|
+
this.errorMessage = undefined;
|
13
14
|
}
|
14
15
|
/**
|
15
16
|
* Emitido quando acontece a alteração de valor do componente snk-filter-search
|
16
17
|
*/
|
17
18
|
async ezChangeListener(_evt) {
|
19
|
+
this.errorMessage = undefined;
|
18
20
|
if (this._isSearchPlus) {
|
19
21
|
this.value = await this._searchInput.getValueAsync();
|
20
22
|
}
|
@@ -41,16 +43,25 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
41
43
|
});
|
42
44
|
}
|
43
45
|
/**
|
44
|
-
*
|
46
|
+
* Define o foco no componente snk-filter-search.
|
45
47
|
*/
|
46
|
-
async
|
48
|
+
async setFocus() {
|
47
49
|
this._searchInput.setFocus();
|
48
50
|
}
|
51
|
+
/**
|
52
|
+
* Limpa o valor do componente restaurando o valor original da configuração.
|
53
|
+
*/
|
54
|
+
async clearValue() {
|
55
|
+
this.value = this.config.value;
|
56
|
+
if (this._searchInput) {
|
57
|
+
this._searchInput.value = this.config.value;
|
58
|
+
}
|
59
|
+
}
|
49
60
|
getInputItem() {
|
50
61
|
var _a;
|
51
62
|
this._isSearchPlus = ((_a = this.config.props) === null || _a === void 0 ? void 0 : _a["useSearchPlus"]) == true;
|
52
63
|
const TagName = this._isSearchPlus ? "ez-search-plus" : "ez-search";
|
53
|
-
return (h(TagName, { id: this.config.id, suppressEmptyOption: true, value: this.config.value, label: this.config.label, ref: ref => this._searchInput = ref, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, this._isSearchPlus) }));
|
64
|
+
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h(TagName, { id: this.config.id, suppressEmptyOption: true, value: this.config.value, label: this.config.label, enabled: this.config.enabled, ref: ref => this._searchInput = ref, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, this._isSearchPlus), errorMessage: this.errorMessage })));
|
54
65
|
}
|
55
66
|
render() {
|
56
67
|
if (!this.config || this.config.type !== FilterItemType.SEARCH) {
|
@@ -62,7 +73,9 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
62
73
|
}, [0, "snk-filter-search", {
|
63
74
|
"config": [16],
|
64
75
|
"value": [16],
|
65
|
-
"
|
76
|
+
"errorMessage": [1537, "error-message"],
|
77
|
+
"setFocus": [64],
|
78
|
+
"clearValue": [64]
|
66
79
|
}, [[0, "ezChange", "ezChangeListener"]]]);
|
67
80
|
function defineCustomElement$1() {
|
68
81
|
if (typeof customElements === "undefined") {
|
@@ -8,14 +8,31 @@ const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
8
8
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
9
9
|
this.config = undefined;
|
10
10
|
this.value = undefined;
|
11
|
+
this.errorMessage = undefined;
|
11
12
|
}
|
12
13
|
/**
|
13
14
|
* Emitido quando acontece a alteração de valor do componente snk-filter-text.
|
14
15
|
*/
|
15
16
|
ezChangeListener(evt) {
|
17
|
+
this.errorMessage = undefined;
|
16
18
|
this.value = evt.detail;
|
17
19
|
this.valueChanged.emit(this.value);
|
18
20
|
}
|
21
|
+
/**
|
22
|
+
* Define o foco no componente snk-filter-text.
|
23
|
+
*/
|
24
|
+
async setFocus() {
|
25
|
+
this._textInputElement.setFocus();
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* Limpa o valor do componente restaurando o valor original da configuração.
|
29
|
+
*/
|
30
|
+
async clearValue() {
|
31
|
+
this.value = this.config.value;
|
32
|
+
if (this._textInputElement) {
|
33
|
+
this._textInputElement.value = this.config.value;
|
34
|
+
}
|
35
|
+
}
|
19
36
|
componentDidLoad() {
|
20
37
|
if (this._element) {
|
21
38
|
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
@@ -26,12 +43,15 @@ const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
26
43
|
if (!this.config) {
|
27
44
|
return undefined;
|
28
45
|
}
|
29
|
-
return (h("ez-text-input", { id: this.config.id, ref: ref => this._textInputElement = ref,
|
46
|
+
return (h("ez-tooltip", { active: this.config.enabled === false, message: this.config.disabledMessage, type: 'warning' }, h("ez-text-input", { id: this.config.id, ref: ref => this._textInputElement = ref, value: this.config.value, mask: (_a = this.config) === null || _a === void 0 ? void 0 : _a.mask, enabled: this.config.enabled, cleanValueMask: true, errorMessage: this.errorMessage })));
|
30
47
|
}
|
31
48
|
get _element() { return this; }
|
32
49
|
}, [0, "snk-filter-text", {
|
33
50
|
"config": [16],
|
34
|
-
"value": [1]
|
51
|
+
"value": [1],
|
52
|
+
"errorMessage": [1537, "error-message"],
|
53
|
+
"setFocus": [64],
|
54
|
+
"clearValue": [64]
|
35
55
|
}, [[0, "ezChange", "ezChangeListener"]]]);
|
36
56
|
function defineCustomElement$1() {
|
37
57
|
if (typeof customElements === "undefined") {
|
@@ -1,31 +1,34 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
|
2
2
|
import { KeyboardManager, Action, ElementIDUtils, ApplicationContext, StringUtils } from '@sankhyalabs/core';
|
3
|
-
import { T as TaskbarElement, d as defineCustomElement$3 } from './snk-taskbar2.js';
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage.js';
|
5
|
-
import { P as PresentationMode, E as ExporterStrategy } from './ISave.js';
|
6
|
-
import { C as CommonsExporter, T as TaskbarProcessor, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './ContinuousInsertUtils.js';
|
7
|
-
import { s as store } from './index2.js';
|
8
3
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
4
|
+
import { buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
|
9
5
|
import './DataFetcher.js';
|
6
|
+
import { P as PresentationMode, E as ExporterStrategy } from './ISave.js';
|
7
|
+
import { C as CommonsExporter, T as TaskbarProcessor, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './ContinuousInsertUtils.js';
|
10
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
11
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
12
10
|
import './dataunit-fetcher.js';
|
13
11
|
import './filter-item-type.enum.js';
|
14
12
|
import './form-config-fetcher.js';
|
15
13
|
import './constants.js';
|
14
|
+
import { C as ConfigStorage } from './ConfigStorage.js';
|
15
|
+
import { s as store } from './index2.js';
|
16
16
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo.js';
|
17
|
-
import {
|
18
|
-
import { d as defineCustomElement$
|
19
|
-
import { d as defineCustomElement$
|
20
|
-
import { d as defineCustomElement$
|
21
|
-
import { d as defineCustomElement$
|
22
|
-
import { d as defineCustomElement$
|
23
|
-
import { d as defineCustomElement$
|
24
|
-
import { d as defineCustomElement$
|
25
|
-
import { d as defineCustomElement$
|
26
|
-
import { d as defineCustomElement$
|
27
|
-
import { d as defineCustomElement$
|
28
|
-
import { d as defineCustomElement$
|
17
|
+
import { v as validateFilters, d as defineCustomElement$a } from './snk-filter-modal2.js';
|
18
|
+
import { T as TaskbarElement, d as defineCustomElement$3 } from './snk-taskbar2.js';
|
19
|
+
import { d as defineCustomElement$m } from './snk-actions-button2.js';
|
20
|
+
import { d as defineCustomElement$l } from './snk-data-exporter2.js';
|
21
|
+
import { d as defineCustomElement$k } from './snk-default-filter2.js';
|
22
|
+
import { d as defineCustomElement$j } from './snk-exporter-email-sender2.js';
|
23
|
+
import { d as defineCustomElement$i } from './snk-expression-group2.js';
|
24
|
+
import { d as defineCustomElement$h } from './snk-expression-item2.js';
|
25
|
+
import { d as defineCustomElement$g } from './snk-filter-advanced-mode2.js';
|
26
|
+
import { d as defineCustomElement$f } from './snk-filter-assistent-mode2.js';
|
27
|
+
import { d as defineCustomElement$e } from './snk-filter-bar2.js';
|
28
|
+
import { d as defineCustomElement$d } from './snk-filter-detail2.js';
|
29
|
+
import { d as defineCustomElement$c } from './snk-filter-field-search2.js';
|
30
|
+
import { d as defineCustomElement$b } from './snk-filter-item2.js';
|
31
|
+
import { d as defineCustomElement$9 } from './snk-filter-modal-item2.js';
|
29
32
|
import { d as defineCustomElement$8 } from './snk-filter-param-config2.js';
|
30
33
|
import { d as defineCustomElement$7 } from './snk-grid-config2.js';
|
31
34
|
import { d as defineCustomElement$6 } from './snk-personalized-filter2.js';
|
@@ -124,6 +127,9 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
124
127
|
if (action.type === Action.METADATA_LOADED) {
|
125
128
|
return await this.interceptMetadataLoaded(action);
|
126
129
|
}
|
130
|
+
if (action.type === Action.LOADING_DATA) {
|
131
|
+
return await this.interceptLoadData(action);
|
132
|
+
}
|
127
133
|
return action;
|
128
134
|
},
|
129
135
|
};
|
@@ -168,6 +174,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
168
174
|
this.suppressCheckboxColumn = undefined;
|
169
175
|
this.suppressFilterColumn = false;
|
170
176
|
this.compact = undefined;
|
177
|
+
this.filterCustomConfig = undefined;
|
178
|
+
this.filterCustomConfigInterceptor = undefined;
|
171
179
|
}
|
172
180
|
getGridHeaderSelectedBtns() {
|
173
181
|
const btns = [
|
@@ -446,6 +454,17 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
446
454
|
this.loadGridCustomFormatters(action.payload.fields);
|
447
455
|
return action;
|
448
456
|
}
|
457
|
+
async interceptLoadData(action) {
|
458
|
+
var _a;
|
459
|
+
const hasInvalidFilters = !validateFilters((_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig);
|
460
|
+
if (hasInvalidFilters) {
|
461
|
+
const errorTitle = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.title", {});
|
462
|
+
const errorMessage = this.messagesBuilder.getMessage("snkGrid.requiredFiltersNotFilled.message", {});
|
463
|
+
await this._application.error(errorTitle, errorMessage);
|
464
|
+
return;
|
465
|
+
}
|
466
|
+
return action;
|
467
|
+
}
|
449
468
|
finishLoading() {
|
450
469
|
this._dataUnit.addInterceptor(this.dataUnitInterceptor);
|
451
470
|
CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
@@ -655,7 +674,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
655
674
|
return undefined;
|
656
675
|
}
|
657
676
|
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 &&
|
658
|
-
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) => {
|
677
|
+
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) => {
|
659
678
|
this.gridConfigChangeHandler(evt);
|
660
679
|
}, 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 }))));
|
661
680
|
}
|
@@ -700,6 +719,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
700
719
|
"suppressCheckboxColumn": [4, "suppress-checkbox-column"],
|
701
720
|
"suppressFilterColumn": [1028, "suppress-filter-column"],
|
702
721
|
"compact": [4],
|
722
|
+
"filterCustomConfig": [16],
|
723
|
+
"filterCustomConfigInterceptor": [16],
|
703
724
|
"_dataUnit": [32],
|
704
725
|
"_dataState": [32],
|
705
726
|
"_gridConfig": [32],
|
@@ -723,7 +744,7 @@ function defineCustomElement() {
|
|
723
744
|
if (typeof customElements === "undefined") {
|
724
745
|
return;
|
725
746
|
}
|
726
|
-
const components = ["snk-grid", "snk-actions-button", "snk-data-exporter", "snk-exporter-email-sender", "snk-expression-group", "snk-expression-item", "snk-filter-advanced-mode", "snk-filter-assistent-mode", "snk-filter-bar", "snk-filter-detail", "snk-filter-field-search", "snk-filter-item", "snk-filter-param-config", "snk-grid-config", "snk-personalized-filter", "snk-select-box", "snk-simple-bar", "snk-taskbar", "taskbar-actions-button", "taskbar-split-button"];
|
747
|
+
const components = ["snk-grid", "snk-actions-button", "snk-data-exporter", "snk-default-filter", "snk-exporter-email-sender", "snk-expression-group", "snk-expression-item", "snk-filter-advanced-mode", "snk-filter-assistent-mode", "snk-filter-bar", "snk-filter-detail", "snk-filter-field-search", "snk-filter-item", "snk-filter-modal", "snk-filter-modal-item", "snk-filter-param-config", "snk-grid-config", "snk-personalized-filter", "snk-select-box", "snk-simple-bar", "snk-taskbar", "taskbar-actions-button", "taskbar-split-button"];
|
727
748
|
components.forEach(tagName => { switch (tagName) {
|
728
749
|
case "snk-grid":
|
729
750
|
if (!customElements.get(tagName)) {
|
@@ -732,55 +753,70 @@ function defineCustomElement() {
|
|
732
753
|
break;
|
733
754
|
case "snk-actions-button":
|
734
755
|
if (!customElements.get(tagName)) {
|
735
|
-
defineCustomElement$
|
756
|
+
defineCustomElement$m();
|
736
757
|
}
|
737
758
|
break;
|
738
759
|
case "snk-data-exporter":
|
739
760
|
if (!customElements.get(tagName)) {
|
740
|
-
defineCustomElement$
|
761
|
+
defineCustomElement$l();
|
762
|
+
}
|
763
|
+
break;
|
764
|
+
case "snk-default-filter":
|
765
|
+
if (!customElements.get(tagName)) {
|
766
|
+
defineCustomElement$k();
|
741
767
|
}
|
742
768
|
break;
|
743
769
|
case "snk-exporter-email-sender":
|
744
770
|
if (!customElements.get(tagName)) {
|
745
|
-
defineCustomElement$
|
771
|
+
defineCustomElement$j();
|
746
772
|
}
|
747
773
|
break;
|
748
774
|
case "snk-expression-group":
|
749
775
|
if (!customElements.get(tagName)) {
|
750
|
-
defineCustomElement$
|
776
|
+
defineCustomElement$i();
|
751
777
|
}
|
752
778
|
break;
|
753
779
|
case "snk-expression-item":
|
754
780
|
if (!customElements.get(tagName)) {
|
755
|
-
defineCustomElement$
|
781
|
+
defineCustomElement$h();
|
756
782
|
}
|
757
783
|
break;
|
758
784
|
case "snk-filter-advanced-mode":
|
759
785
|
if (!customElements.get(tagName)) {
|
760
|
-
defineCustomElement$
|
786
|
+
defineCustomElement$g();
|
761
787
|
}
|
762
788
|
break;
|
763
789
|
case "snk-filter-assistent-mode":
|
764
790
|
if (!customElements.get(tagName)) {
|
765
|
-
defineCustomElement$
|
791
|
+
defineCustomElement$f();
|
766
792
|
}
|
767
793
|
break;
|
768
794
|
case "snk-filter-bar":
|
769
795
|
if (!customElements.get(tagName)) {
|
770
|
-
defineCustomElement$
|
796
|
+
defineCustomElement$e();
|
771
797
|
}
|
772
798
|
break;
|
773
799
|
case "snk-filter-detail":
|
774
800
|
if (!customElements.get(tagName)) {
|
775
|
-
defineCustomElement$
|
801
|
+
defineCustomElement$d();
|
776
802
|
}
|
777
803
|
break;
|
778
804
|
case "snk-filter-field-search":
|
779
805
|
if (!customElements.get(tagName)) {
|
780
|
-
defineCustomElement$
|
806
|
+
defineCustomElement$c();
|
781
807
|
}
|
782
808
|
break;
|
783
809
|
case "snk-filter-item":
|
810
|
+
if (!customElements.get(tagName)) {
|
811
|
+
defineCustomElement$b();
|
812
|
+
}
|
813
|
+
break;
|
814
|
+
case "snk-filter-modal":
|
815
|
+
if (!customElements.get(tagName)) {
|
816
|
+
defineCustomElement$a();
|
817
|
+
}
|
818
|
+
break;
|
819
|
+
case "snk-filter-modal-item":
|
784
820
|
if (!customElements.get(tagName)) {
|
785
821
|
defineCustomElement$9();
|
786
822
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-
|
2
|
-
import { D as DataFetcher, d as dist } from './DataFetcher-
|
1
|
+
import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-eb03ac08.js';
|
2
|
+
import { D as DataFetcher, d as dist } from './DataFetcher-2f7ba7ae.js';
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
4
4
|
import { ObjectUtils } from '@sankhyalabs/core';
|
5
5
|
|
@@ -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',
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { UserInterface, DataType, ApplicationContext, ErrorException } from '@sankhyalabs/core';
|
2
|
-
import { d as dist, D as DataFetcher } from './DataFetcher-
|
2
|
+
import { d as dist, D as DataFetcher } from './DataFetcher-2f7ba7ae.js';
|
3
3
|
|
4
4
|
function buildGridMetadata(rawValue) {
|
5
5
|
const fieldsMetadata = buildFieldsMetadata(rawValue.fieldsMetadata);
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
1
|
+
import { C as ConfigStorage } from './ConfigStorage-1e758486.js';
|
2
2
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
3
|
-
import { F as FormConfigFetcher } from './form-config-fetcher-
|
3
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-eb03ac08.js';
|
4
4
|
import { a as TAB_NAMES } from './constants-7b422de0.js';
|
5
5
|
|
6
6
|
class SnkFormConfigManager {
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { D as DataFetcher } from './DataFetcher-
|
2
|
-
import './ISave-
|
3
|
-
import { SortMode, ApplicationContext,
|
1
|
+
import { D as DataFetcher } from './DataFetcher-2f7ba7ae.js';
|
2
|
+
import './ISave-4c9742c1.js';
|
3
|
+
import { SortMode, ApplicationContext, ObjectUtils, StringUtils, NumberUtils, DataType, UserInterface as UserInterface$1, DateUtils } from '@sankhyalabs/core';
|
4
4
|
import { D as DataExporterOption } from './index-b40568ff.js';
|
5
5
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
6
|
-
import { UserInterface
|
7
|
-
import { P as PreloadManager } from './dataunit-fetcher-
|
6
|
+
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
7
|
+
import { P as PreloadManager } from './dataunit-fetcher-1f7a73df.js';
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
9
|
-
import './form-config-fetcher-
|
9
|
+
import './form-config-fetcher-eb03ac08.js';
|
10
10
|
import './constants-7b422de0.js';
|
11
|
-
import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
12
11
|
import { h } from './index-479e1293.js';
|
13
12
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
14
13
|
import { I as IExportType } from './IFetchDataExporterParams-d73bed3d.js';
|
14
|
+
import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
15
15
|
|
16
16
|
class CrudUtils {
|
17
17
|
static assertDefaultSorting(gridConfig, dataUnit) {
|
@@ -105,44 +105,6 @@ class CrudUtils {
|
|
105
105
|
}
|
106
106
|
}
|
107
107
|
|
108
|
-
class SnkMultiSelectionListDataSource {
|
109
|
-
setDataUnit(dataUnit) {
|
110
|
-
this._dataUnit = dataUnit;
|
111
|
-
}
|
112
|
-
setApplication(application) {
|
113
|
-
this._application = application;
|
114
|
-
}
|
115
|
-
formatLabel(fieldName, value) {
|
116
|
-
const { userInterface } = this._dataUnit.getField(fieldName);
|
117
|
-
if (userInterface === UserInterface.DATETIME) {
|
118
|
-
return DateUtils.formatDate(this._dataUnit.valueFromString(fieldName, value));
|
119
|
-
}
|
120
|
-
return String(this._dataUnit.getFormattedValue(fieldName, value));
|
121
|
-
}
|
122
|
-
async getStaticOptions(fieldName, options) {
|
123
|
-
if (fieldName == undefined) {
|
124
|
-
return Promise.resolve(undefined);
|
125
|
-
}
|
126
|
-
return Promise.resolve(await PreloadManager.getDistinct(this._dataUnit, fieldName, options === null || options === void 0 ? void 0 : options.onlyLabel));
|
127
|
-
}
|
128
|
-
fetchData(filterTerm, fieldName) {
|
129
|
-
return new Promise(resolve => {
|
130
|
-
this._application.executeSelectDistinct(this._dataUnit, fieldName, filterTerm).then(result => {
|
131
|
-
resolve(result.map(item => {
|
132
|
-
const field = this._dataUnit.getField(fieldName);
|
133
|
-
if (field.userInterface === UserInterface.SEARCH) {
|
134
|
-
return Object.assign(Object.assign({}, JSON.parse(item)), { check: true });
|
135
|
-
}
|
136
|
-
return { value: item, label: this.formatLabel(fieldName, item), check: true };
|
137
|
-
}));
|
138
|
-
});
|
139
|
-
});
|
140
|
-
}
|
141
|
-
sortItems(fieldName, items) {
|
142
|
-
return InMemoryFilterColumnDataSource.defaultSorterMultSelectionOption(this._dataUnit, fieldName, items);
|
143
|
-
}
|
144
|
-
}
|
145
|
-
|
146
108
|
class RmPrecisionCustomValueFormatter {
|
147
109
|
setGrid(grid) {
|
148
110
|
if (this._grid) {
|
@@ -184,6 +146,41 @@ class RmPrecisionCustomValueFormatter {
|
|
184
146
|
}
|
185
147
|
}
|
186
148
|
|
149
|
+
class ContinuousInsertUtils {
|
150
|
+
constructor(snkApplication, resourceID, configName) {
|
151
|
+
this.snkApplication = snkApplication;
|
152
|
+
this.keyConfigEnableContinuousInsert = `${resourceID}enableContinuousInsert${configName ? configName : ''}`;
|
153
|
+
}
|
154
|
+
handleSaveConfig(enableContinuousInsert) {
|
155
|
+
return this.snkApplication.saveConfig(this.keyConfigEnableContinuousInsert, enableContinuousInsert);
|
156
|
+
}
|
157
|
+
getConfig() {
|
158
|
+
return this.snkApplication.getConfig(this.keyConfigEnableContinuousInsert).then(value => {
|
159
|
+
if (value) {
|
160
|
+
return value == "true" ? true : false;
|
161
|
+
}
|
162
|
+
return false;
|
163
|
+
}).catch(() => {
|
164
|
+
return false;
|
165
|
+
});
|
166
|
+
}
|
167
|
+
getMessage(key, params) {
|
168
|
+
var _a, _b;
|
169
|
+
return (_b = (_a = this.snkApplication) === null || _a === void 0 ? void 0 : _a.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage(key, params);
|
170
|
+
}
|
171
|
+
actionContinuousInsert(enableContinuousInsert, handleEnableContinuousInsert) {
|
172
|
+
return {
|
173
|
+
value: StringUtils.generateUUID(),
|
174
|
+
label: enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'),
|
175
|
+
enabled: true,
|
176
|
+
itemBuilder: () => {
|
177
|
+
return (h("div", { class: "ez-dropdown__item-wrapper", onClick: handleEnableContinuousInsert },
|
178
|
+
h("span", { class: "ez-dropdown__item-label" }, enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'))));
|
179
|
+
},
|
180
|
+
};
|
181
|
+
}
|
182
|
+
}
|
183
|
+
|
187
184
|
class CommonsExporter {
|
188
185
|
constructor(dataUnit, grid) {
|
189
186
|
this.MAX_WIDTH_COD = 60;
|
@@ -212,7 +209,7 @@ class CommonsExporter {
|
|
212
209
|
}
|
213
210
|
const fieldData = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
|
214
211
|
const customFormatter = await this.grid.getCustomValueFormatter(column.name);
|
215
|
-
const isUserInterfaceSEARCH = (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UserInterface
|
212
|
+
const isUserInterfaceSEARCH = (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UserInterface.SEARCH;
|
216
213
|
const widthColumnDefault = 60;
|
217
214
|
const labelColumn = isUserInterfaceSEARCH ? "Cód. " : column.label;
|
218
215
|
let descriptionColumn = undefined;
|
@@ -233,7 +230,7 @@ class CommonsExporter {
|
|
233
230
|
label: labelDescription,
|
234
231
|
width: isUserInterfaceSEARCH && labelDescription ? (labelDescription.length * this.DEFAULT_FONT_SIZE - widthColumnDefault) : column.width,
|
235
232
|
type: DataType.TEXT,
|
236
|
-
userInterface: UserInterface
|
233
|
+
userInterface: UserInterface.LONGTEXT,
|
237
234
|
descriptionFrom: fieldData.name
|
238
235
|
};
|
239
236
|
const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
|
@@ -267,41 +264,6 @@ class CommonsExporter {
|
|
267
264
|
}
|
268
265
|
}
|
269
266
|
|
270
|
-
class ContinuousInsertUtils {
|
271
|
-
constructor(snkApplication, resourceID, configName) {
|
272
|
-
this.snkApplication = snkApplication;
|
273
|
-
this.keyConfigEnableContinuousInsert = `${resourceID}enableContinuousInsert${configName ? configName : ''}`;
|
274
|
-
}
|
275
|
-
handleSaveConfig(enableContinuousInsert) {
|
276
|
-
return this.snkApplication.saveConfig(this.keyConfigEnableContinuousInsert, enableContinuousInsert);
|
277
|
-
}
|
278
|
-
getConfig() {
|
279
|
-
return this.snkApplication.getConfig(this.keyConfigEnableContinuousInsert).then(value => {
|
280
|
-
if (value) {
|
281
|
-
return value == "true" ? true : false;
|
282
|
-
}
|
283
|
-
return false;
|
284
|
-
}).catch(() => {
|
285
|
-
return false;
|
286
|
-
});
|
287
|
-
}
|
288
|
-
getMessage(key, params) {
|
289
|
-
var _a, _b;
|
290
|
-
return (_b = (_a = this.snkApplication) === null || _a === void 0 ? void 0 : _a.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage(key, params);
|
291
|
-
}
|
292
|
-
actionContinuousInsert(enableContinuousInsert, handleEnableContinuousInsert) {
|
293
|
-
return {
|
294
|
-
value: StringUtils.generateUUID(),
|
295
|
-
label: enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'),
|
296
|
-
enabled: true,
|
297
|
-
itemBuilder: () => {
|
298
|
-
return (h("div", { class: "ez-dropdown__item-wrapper", onClick: handleEnableContinuousInsert },
|
299
|
-
h("span", { class: "ez-dropdown__item-label" }, enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'))));
|
300
|
-
},
|
301
|
-
};
|
302
|
-
}
|
303
|
-
}
|
304
|
-
|
305
267
|
class ClientSideExporterProvider extends CommonsExporter {
|
306
268
|
getSelectedNumber() {
|
307
269
|
return this.dataUnit.getSelectionInfo().length;
|
@@ -359,7 +321,7 @@ class ClientSideExporterProvider extends CommonsExporter {
|
|
359
321
|
return value.label;
|
360
322
|
}
|
361
323
|
const fieldDescriptor = this.dataUnit.getField(id);
|
362
|
-
if (fieldDescriptor.userInterface === UserInterface.SEARCH) {
|
324
|
+
if (fieldDescriptor.userInterface === UserInterface$1.SEARCH) {
|
363
325
|
return value.value;
|
364
326
|
}
|
365
327
|
if (column.customFormatter) {
|
@@ -371,4 +333,42 @@ class ClientSideExporterProvider extends CommonsExporter {
|
|
371
333
|
}
|
372
334
|
}
|
373
335
|
|
336
|
+
class SnkMultiSelectionListDataSource {
|
337
|
+
setDataUnit(dataUnit) {
|
338
|
+
this._dataUnit = dataUnit;
|
339
|
+
}
|
340
|
+
setApplication(application) {
|
341
|
+
this._application = application;
|
342
|
+
}
|
343
|
+
formatLabel(fieldName, value) {
|
344
|
+
const { userInterface } = this._dataUnit.getField(fieldName);
|
345
|
+
if (userInterface === UserInterface$1.DATETIME) {
|
346
|
+
return DateUtils.formatDate(this._dataUnit.valueFromString(fieldName, value));
|
347
|
+
}
|
348
|
+
return String(this._dataUnit.getFormattedValue(fieldName, value));
|
349
|
+
}
|
350
|
+
async getStaticOptions(fieldName, options) {
|
351
|
+
if (fieldName == undefined) {
|
352
|
+
return Promise.resolve(undefined);
|
353
|
+
}
|
354
|
+
return Promise.resolve(await PreloadManager.getDistinct(this._dataUnit, fieldName, options === null || options === void 0 ? void 0 : options.onlyLabel));
|
355
|
+
}
|
356
|
+
fetchData(filterTerm, fieldName) {
|
357
|
+
return new Promise(resolve => {
|
358
|
+
this._application.executeSelectDistinct(this._dataUnit, fieldName, filterTerm).then(result => {
|
359
|
+
resolve(result.map(item => {
|
360
|
+
const field = this._dataUnit.getField(fieldName);
|
361
|
+
if (field.userInterface === UserInterface$1.SEARCH) {
|
362
|
+
return Object.assign(Object.assign({}, JSON.parse(item)), { check: true });
|
363
|
+
}
|
364
|
+
return { value: item, label: this.formatLabel(fieldName, item), check: true };
|
365
|
+
}));
|
366
|
+
});
|
367
|
+
});
|
368
|
+
}
|
369
|
+
sortItems(fieldName, items) {
|
370
|
+
return InMemoryFilterColumnDataSource.defaultSorterMultSelectionOption(this._dataUnit, fieldName, items);
|
371
|
+
}
|
372
|
+
}
|
373
|
+
|
374
374
|
export { CommonsExporter as C, RmPrecisionCustomValueFormatter as R, SnkMultiSelectionListDataSource as S, CrudUtils as a, ContinuousInsertUtils as b, ClientSideExporterProvider as c };
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ObjectUtils } from '@sankhyalabs/core';
|
2
|
-
import { R as ResourceFetcher } from './form-config-fetcher-
|
2
|
+
import { R as ResourceFetcher } from './form-config-fetcher-eb03ac08.js';
|
3
3
|
|
4
4
|
class AuthFetcher extends ResourceFetcher {
|
5
5
|
getData(resourceID) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ObjectUtils, DataUnit, DataUnitInMemoryLoader, ApplicationContext, StringUtils, UserInterface, DataUnitStorage, DataType, ChangeOperation } from '@sankhyalabs/core';
|
2
|
-
import { D as DataFetcher, S as SnkMessageBuilder, d as dist } from './DataFetcher-
|
2
|
+
import { D as DataFetcher, S as SnkMessageBuilder, d as dist } from './DataFetcher-2f7ba7ae.js';
|
3
3
|
import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
|
4
4
|
import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
5
5
|
import { ColumnFilterManager } from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|