@sankhyalabs/sankhyablocks 9.2.0-dev.2 → 9.2.0-dev.21
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-1931defc.js → ConfigStorage-8b6def32.js} +2 -2
- package/dist/cjs/{DataFetcher-ad9fb3bb.js → DataFetcher-2c37b6a1.js} +52 -1
- package/dist/cjs/{ISave-18ffb73e.js → ISave-b22b3cf0.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-65e5288e.js → SnkFormConfigManager-477a27de.js} +2 -2
- package/dist/cjs/{ClientSideExporterProvider-994f6e26.js → SnkMultiSelectionListDataSource-b7ab26ba.js} +82 -79
- package/dist/cjs/{auth-fetcher-afbe69ab.js → auth-fetcher-78a90b36.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-c7253b02.js → dataunit-fetcher-877944a9.js} +1 -1
- package/dist/cjs/filter-validate-6993f6f2.js +30 -0
- package/dist/cjs/{form-config-fetcher-f6e66d64.js → form-config-fetcher-dee08eb4.js} +1 -1
- package/dist/cjs/{index-0ad2baeb.js → index-13d05f03.js} +21 -5
- 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 -9
- package/dist/cjs/snk-attach.cjs.entry.js +7 -7
- package/dist/cjs/snk-crud.cjs.entry.js +7 -7
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-448fce74.js → snk-data-unit-0cfa7622.js} +14 -4
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +9 -9
- package/dist/cjs/snk-entity-list.cjs.entry.js +10 -3
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +189 -115
- 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 +31 -5
- package/dist/cjs/snk-grid.cjs.entry.js +158 -66
- package/dist/cjs/{snk-guides-viewer-c23ed218.js → snk-guides-viewer-38277265.js} +6 -6
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +14 -6
- package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -4
- package/dist/cjs/snk-simple-bar.cjs.entry.js +5 -5
- package/dist/cjs/snk-simple-crud.cjs.entry.js +60 -23
- package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
- package/dist/cjs/{taskbar-elements-3b74cd21.js → taskbar-elements-fb5d1e08.js} +1 -1
- package/dist/collection/components/snk-application/snk-application.js +0 -2
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +4 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +174 -29
- 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 +315 -114
- 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-form/snk-form.js +133 -22
- package/dist/collection/components/snk-grid/snk-grid.js +488 -133
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +83 -21
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +80 -14
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +9 -9
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +414 -119
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +102 -36
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +1 -0
- package/dist/collection/lib/http/data-fetcher/custom-xhr-override.js +39 -0
- 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/ContinuousInsertUtils.js +4 -1
- package/dist/components/DataFetcher.js +52 -1
- package/dist/components/index2.js +21 -5
- package/dist/components/snk-application2.js +0 -3
- package/dist/components/snk-crud.js +62 -44
- package/dist/components/snk-data-unit2.js +12 -2
- 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 +103 -108
- 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-form.js +29 -2
- package/dist/components/snk-grid2.js +188 -75
- package/dist/components/snk-personalized-filter2.js +10 -2
- package/dist/components/snk-simple-bar2.js +5 -5
- package/dist/components/snk-simple-crud2.js +45 -8
- package/dist/esm/{ConfigStorage-b5a1dba3.js → ConfigStorage-22eace3a.js} +2 -2
- package/dist/esm/{DataFetcher-6f6de657.js → DataFetcher-f6b2961a.js} +52 -1
- package/dist/esm/{ISave-7ecdca20.js → ISave-6b7b0423.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-34fc1dc7.js → SnkFormConfigManager-968b97e7.js} +2 -2
- package/dist/esm/{ClientSideExporterProvider-7c2781f4.js → SnkMultiSelectionListDataSource-1136c4e7.js} +87 -84
- package/dist/esm/{auth-fetcher-7332a9a9.js → auth-fetcher-cf39e42b.js} +1 -1
- package/dist/esm/{dataunit-fetcher-f21cbad0.js → dataunit-fetcher-6314b19d.js} +1 -1
- package/dist/esm/filter-validate-d765d450.js +27 -0
- package/dist/esm/{form-config-fetcher-6ab4e805.js → form-config-fetcher-bc6f0f1f.js} +1 -1
- package/dist/esm/{index-b72af127.js → index-446f9341.js} +21 -5
- 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 -9
- package/dist/esm/snk-attach.entry.js +7 -7
- package/dist/esm/snk-crud.entry.js +7 -7
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-b7e6e7a6.js → snk-data-unit-4acf4781.js} +14 -4
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +9 -9
- package/dist/esm/snk-entity-list.entry.js +10 -3
- package/dist/esm/snk-expression-group_2.entry.js +1 -1
- package/dist/esm/snk-filter-bar_4.entry.js +190 -116
- 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 +31 -5
- package/dist/esm/snk-grid.entry.js +152 -60
- package/dist/esm/{snk-guides-viewer-fbfece85.js → snk-guides-viewer-19cb7f1f.js} +6 -6
- package/dist/esm/snk-guides-viewer.entry.js +9 -9
- package/dist/esm/snk-personalized-filter.entry.js +14 -6
- package/dist/esm/snk-pesquisa.entry.js +4 -4
- package/dist/esm/snk-simple-bar.entry.js +5 -5
- package/dist/esm/snk-simple-crud.entry.js +55 -18
- package/dist/esm/snk-taskbar.entry.js +2 -2
- package/dist/esm/{taskbar-elements-171476d4.js → taskbar-elements-faaf5d8f.js} +1 -1
- package/dist/sankhyablocks/p-093f58fa.entry.js +1 -0
- package/dist/sankhyablocks/{p-0e495575.js → p-0a317e81.js} +1 -1
- package/dist/sankhyablocks/{p-ad2ae575.entry.js → p-0e1f0344.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8d1508aa.entry.js → p-16c1c209.entry.js} +1 -1
- package/dist/sankhyablocks/p-29cacaf3.entry.js +1 -0
- package/dist/sankhyablocks/{p-eb0616d3.entry.js → p-32450ea2.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b49281be.entry.js → p-3c29939c.entry.js} +1 -1
- package/dist/sankhyablocks/p-3ed04f0d.entry.js +1 -0
- package/dist/sankhyablocks/{p-4872dc3a.entry.js → p-44c5ec49.entry.js} +1 -1
- package/dist/sankhyablocks/p-49ddc27a.entry.js +1 -0
- package/dist/sankhyablocks/p-4c763b10.entry.js +1 -0
- package/dist/sankhyablocks/p-4eeb06fc.js +1 -0
- package/dist/sankhyablocks/p-505172c8.entry.js +1 -0
- package/dist/sankhyablocks/p-55798617.js +1 -0
- package/dist/sankhyablocks/p-658f67a5.js +1 -0
- package/dist/sankhyablocks/{p-158adf33.entry.js → p-701b024c.entry.js} +1 -1
- package/dist/sankhyablocks/p-72a9285d.entry.js +1 -0
- package/dist/sankhyablocks/p-7f7fe6c4.entry.js +1 -0
- package/dist/sankhyablocks/p-88b7bc09.js +1 -0
- package/dist/sankhyablocks/{p-c6331595.js → p-8d256def.js} +1 -1
- package/dist/sankhyablocks/p-8f37b75b.entry.js +1 -0
- package/dist/sankhyablocks/{p-b35574b5.js → p-9062d640.js} +1 -1
- package/dist/sankhyablocks/{p-72c8c847.entry.js → p-95c71f5e.entry.js} +1 -1
- package/dist/sankhyablocks/p-96d45943.entry.js +1 -0
- package/dist/sankhyablocks/{p-eacff4b7.entry.js → p-b2d7f4cd.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6a015ba2.js → p-b7f5caf6.js} +1 -1
- package/dist/sankhyablocks/p-b9200e77.entry.js +11 -0
- package/dist/sankhyablocks/{p-7de79adf.js → p-b987e15d.js} +1 -1
- package/dist/sankhyablocks/{p-ba4979b4.js → p-bf017a1f.js} +1 -1
- package/dist/sankhyablocks/{p-735a1175.entry.js → p-c3dbf441.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3dba3468.js → p-c71dcb2d.js} +1 -1
- package/dist/sankhyablocks/{p-5e282b33.entry.js → p-c95f20d9.entry.js} +1 -1
- package/dist/sankhyablocks/p-c98e2085.js +1 -0
- package/dist/sankhyablocks/p-cb4343c4.entry.js +1 -0
- package/dist/sankhyablocks/p-d03ae54e.entry.js +1 -0
- package/dist/sankhyablocks/p-d235314c.entry.js +1 -0
- package/dist/sankhyablocks/p-d75a732c.js +1 -0
- package/dist/sankhyablocks/{p-f39b0ebe.entry.js → p-df7979fd.entry.js} +1 -1
- package/dist/sankhyablocks/p-e258de96.entry.js +1 -0
- package/dist/sankhyablocks/{p-d377aa7a.entry.js → p-f8e87cf1.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +46 -3
- 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 +60 -30
- 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-form/snk-form.d.ts +29 -4
- package/dist/types/components/snk-grid/snk-grid.d.ts +132 -58
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +53 -5
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +44 -6
- package/dist/types/components/snk-simple-bar/snk-simple-bar.d.ts +15 -15
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +100 -43
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +23 -21
- package/dist/types/components.d.ts +771 -255
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
- package/package.json +4 -3
- package/dist/collection/lib/licenses/sankhyalicense.module.js +0 -1
- package/dist/sankhyablocks/p-012208e0.entry.js +0 -1
- package/dist/sankhyablocks/p-07b14811.entry.js +0 -1
- package/dist/sankhyablocks/p-0dac8fef.js +0 -1
- package/dist/sankhyablocks/p-1210500e.js +0 -1
- package/dist/sankhyablocks/p-16fc4acd.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-398cdd67.entry.js +0 -1
- package/dist/sankhyablocks/p-4e63ffed.entry.js +0 -1
- package/dist/sankhyablocks/p-5bab470d.entry.js +0 -1
- package/dist/sankhyablocks/p-5c7af8a9.entry.js +0 -1
- package/dist/sankhyablocks/p-81769310.entry.js +0 -11
- package/dist/sankhyablocks/p-9fd87bfd.entry.js +0 -1
- package/dist/sankhyablocks/p-a349689a.js +0 -1
- package/dist/sankhyablocks/p-a76e6d51.entry.js +0 -1
- package/dist/sankhyablocks/p-a86eee47.entry.js +0 -1
- package/dist/sankhyablocks/p-c6a8a8bc.entry.js +0 -1
- package/dist/sankhyablocks/p-c9e6d720.js +0 -1
- package/dist/sankhyablocks/p-dff65083.entry.js +0 -1
- package/dist/sankhyablocks/p-fa18530e.entry.js +0 -1
@@ -86,7 +86,10 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
86
86
|
this.outlineMode = false;
|
87
87
|
}
|
88
88
|
/**
|
89
|
-
* Registra um editor customizado para campos da grade e formulário.
|
89
|
+
* @description Registra um editor customizado para campos da grade e do formulário.
|
90
|
+
* @param {string} fieldName - O nome do campo.
|
91
|
+
* @param {ICustomEditor} customEditor - A instância do editor customizado.
|
92
|
+
* @returns {Promise<void>}
|
90
93
|
*/
|
91
94
|
async addCustomEditor(fieldName, customEditor) {
|
92
95
|
if (this._grid && this._form) {
|
@@ -99,7 +102,10 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
99
102
|
this._customEditors = newCustomEditors;
|
100
103
|
}
|
101
104
|
/**
|
102
|
-
* Registra um
|
105
|
+
* @description Registra um renderizador customizado para colunas da grade.
|
106
|
+
* @param {string} fieldName - O nome do campo.
|
107
|
+
* @param {ICustomRender} customRender - A instância do renderizador customizado.
|
108
|
+
* @returns {Promise<void>}
|
103
109
|
*/
|
104
110
|
async addGridCustomRender(fieldName, customRender) {
|
105
111
|
if (this._grid) {
|
@@ -121,19 +127,28 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
121
127
|
await this.loadGridConfig(true);
|
122
128
|
}
|
123
129
|
/**
|
124
|
-
* Registra um formatador de valores para uma coluna da
|
130
|
+
* @description Registra um formatador de valores para uma coluna da grade.
|
131
|
+
* @param {string} columnName - O nome da coluna.
|
132
|
+
* @param {ICustomFormatter} customFormatter - A instância do formatador customizado.
|
133
|
+
* @returns {Promise<void>}
|
125
134
|
*/
|
126
135
|
async addCustomValueFormatter(columnName, customFormatter) {
|
127
136
|
this._grid.addCustomValueFormatter(columnName, customFormatter);
|
128
137
|
}
|
129
138
|
/**
|
130
|
-
* Remove o formatador de valores de uma coluna da
|
139
|
+
* @description Remove o formatador de valores de uma coluna da grade.
|
140
|
+
* @param {string} columnName - O nome da coluna.
|
141
|
+
* @returns {Promise<void>}
|
131
142
|
*/
|
132
143
|
async removeCustomValueFormatter(columnName) {
|
133
144
|
this._grid.removeCustomValueFormatter(columnName);
|
134
145
|
}
|
135
146
|
/**
|
136
|
-
* Altera/adiciona uma propriedade nos metadados do campo.
|
147
|
+
* @description Altera/adiciona uma propriedade nos metadados do campo.
|
148
|
+
* @param {string} fieldName - O nome do campo.
|
149
|
+
* @param {string} propName - O nome da propriedade.
|
150
|
+
* @param {any} value - O valor da propriedade.
|
151
|
+
* @returns {Promise<void>}
|
137
152
|
*/
|
138
153
|
async setFieldProp(fieldName, propName, value) {
|
139
154
|
const newCustomFieldProps = new Map(this._fieldsProps);
|
@@ -190,7 +205,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
190
205
|
return newTaskBarConfig;
|
191
206
|
}
|
192
207
|
/**
|
193
|
-
* Usado para alternar a visão entre GRID e FORM externamente.
|
208
|
+
* @description Usado para alternar a visão entre GRID e FORM externamente.
|
209
|
+
* @param {VIEW_MODE} view - A visão para a qual navegar.
|
210
|
+
* @returns {Promise<void>}
|
194
211
|
*/
|
195
212
|
async goToView(view) {
|
196
213
|
this._currentViewMode = view;
|
@@ -464,6 +481,11 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
464
481
|
this.dataUnit = this._inMemoryLoader.dataUnit;
|
465
482
|
this.dataUnitReady.emit(this.dataUnit);
|
466
483
|
}
|
484
|
+
/**
|
485
|
+
* @description Define os metadados do DataUnit.
|
486
|
+
* @param {UnitMetadata} metadata - Os metadados a serem definidos.
|
487
|
+
* @returns {Promise<void>}
|
488
|
+
*/
|
467
489
|
setMetadata(metadata) {
|
468
490
|
if (this._inMemoryLoader) {
|
469
491
|
this._inMemoryLoader.metadata = metadata;
|
@@ -473,6 +495,11 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
473
495
|
}
|
474
496
|
return Promise.resolve();
|
475
497
|
}
|
498
|
+
/**
|
499
|
+
* @description Define os registros do DataUnit.
|
500
|
+
* @param {Array<Record>} records - Os registros a serem definidos.
|
501
|
+
* @returns {Promise<void>}
|
502
|
+
*/
|
476
503
|
setRecords(records) {
|
477
504
|
if (this._inMemoryLoader) {
|
478
505
|
this._inMemoryLoader.records = records;
|
@@ -482,23 +509,33 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
482
509
|
}
|
483
510
|
return Promise.resolve();
|
484
511
|
}
|
512
|
+
/**
|
513
|
+
* @description Obtém os registros do DataUnit.
|
514
|
+
* @returns {Promise<Array<Record>>} Uma promessa que resolve com a lista de registros.
|
515
|
+
*/
|
485
516
|
getRecords() {
|
486
517
|
return Promise.resolve(this.dataUnit.records);
|
487
518
|
}
|
488
519
|
/**
|
489
|
-
* Usado para abrir o
|
520
|
+
* @description Usado para abrir o configurador do CRUD.
|
521
|
+
* @returns {Promise<void>}
|
490
522
|
*/
|
491
523
|
async openConfigurator() {
|
492
524
|
var _a;
|
493
525
|
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
|
494
526
|
}
|
495
527
|
/**
|
496
|
-
* Usado para fechar o
|
528
|
+
* @description Usado para fechar o configurador do CRUD.
|
529
|
+
* @returns {Promise<void>}
|
497
530
|
*/
|
498
531
|
async closeConfigurator() {
|
499
532
|
var _a;
|
500
533
|
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
|
501
534
|
}
|
535
|
+
/**
|
536
|
+
* @description Atualiza a configuração do formulário.
|
537
|
+
* @returns {Promise<void>}
|
538
|
+
*/
|
502
539
|
async updateConfig() {
|
503
540
|
if (this._formConfigManager == undefined) {
|
504
541
|
this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
|
@@ -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-bc6f0f1f.js';
|
2
|
+
import { D as DataFetcher, d as dist } from './DataFetcher-f6b2961a.js';
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
4
4
|
import { ObjectUtils } from '@sankhyalabs/core';
|
5
5
|
|
@@ -5603,7 +5603,7 @@ var _public = {
|
|
5603
5603
|
};
|
5604
5604
|
|
5605
5605
|
/* eslint-env browser */
|
5606
|
-
var browser = typeof self
|
5606
|
+
var browser = typeof self === 'object' ? self.FormData : window.FormData;
|
5607
5607
|
|
5608
5608
|
var defaultJsonSerializer = createCommonjsModule(function (module, exports) {
|
5609
5609
|
Object.defineProperty(exports, "__esModule", { value: true });
|
@@ -6558,6 +6558,42 @@ Object.defineProperty(exports, "GraphQLWebSocketClient", { enumerable: true, get
|
|
6558
6558
|
//# sourceMappingURL=index.js.map
|
6559
6559
|
});
|
6560
6560
|
|
6561
|
+
(function () {
|
6562
|
+
const OriginalXHR = window.XMLHttpRequest;
|
6563
|
+
|
6564
|
+
function CustomXHR() {
|
6565
|
+
const xhr = new OriginalXHR();
|
6566
|
+
let oldContent;
|
6567
|
+
|
6568
|
+
const originalOpen = xhr.open;
|
6569
|
+
xhr.open = function (_method, _url, ...args) {
|
6570
|
+
originalOpen.call(xhr, _method, _url, ...args);
|
6571
|
+
};
|
6572
|
+
|
6573
|
+
const originalSend = xhr.send;
|
6574
|
+
xhr.send = function (body) {
|
6575
|
+
if (top.charcleaner && typeof top.charcleaner.a === 'function') {
|
6576
|
+
try {
|
6577
|
+
oldContent = typeof body === 'string' ? JSON.parse(body) : body;
|
6578
|
+
|
6579
|
+
var c = JSON.stringify(oldContent);
|
6580
|
+
|
6581
|
+
var sktk = top.charcleaner.a(c);
|
6582
|
+
|
6583
|
+
xhr.setRequestHeader("sktk", sktk);
|
6584
|
+
} catch (e) {
|
6585
|
+
}
|
6586
|
+
}
|
6587
|
+
|
6588
|
+
originalSend.call(xhr, body);
|
6589
|
+
};
|
6590
|
+
|
6591
|
+
return xhr;
|
6592
|
+
}
|
6593
|
+
|
6594
|
+
window.XMLHttpRequest = CustomXHR;
|
6595
|
+
})();
|
6596
|
+
|
6561
6597
|
class UrlUtils {
|
6562
6598
|
static getQueryParams(queryString) {
|
6563
6599
|
const params = new Map();
|
@@ -6761,6 +6797,7 @@ const snkFilterBarMessages$2 = {
|
|
6761
6797
|
create: "Criar filtro padrão",
|
6762
6798
|
},
|
6763
6799
|
validations: {
|
6800
|
+
requiredFilter: "Filtro obrigatório",
|
6764
6801
|
notFullFilled: {
|
6765
6802
|
title: "Filtro parcialmente preenchido",
|
6766
6803
|
message: "Favor completar todas as informações do filtro."
|
@@ -7314,6 +7351,10 @@ const snkGridMessages$2 = {
|
|
7314
7351
|
title: 'Aviso',
|
7315
7352
|
message: 'As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?</b>',
|
7316
7353
|
},
|
7354
|
+
requiredFiltersNotFilled: {
|
7355
|
+
title: 'Erro',
|
7356
|
+
message: 'Existem filtros obrigatórios não preenchidos.',
|
7357
|
+
},
|
7317
7358
|
};
|
7318
7359
|
const snkGridConfigMessages$2 = {
|
7319
7360
|
gridConfiguration: 'Configuração da Grade',
|
@@ -7606,6 +7647,7 @@ const snkFilterBarMessages$1 = {
|
|
7606
7647
|
create: "Create default filter",
|
7607
7648
|
},
|
7608
7649
|
validations: {
|
7650
|
+
requiredFilter: "Required filter",
|
7609
7651
|
notFullFilled: {
|
7610
7652
|
title: "Partially filled filter",
|
7611
7653
|
message: "Please complete all filter information."
|
@@ -8160,6 +8202,10 @@ const snkGridMessages$1 = {
|
|
8160
8202
|
title: 'Warning',
|
8161
8203
|
message: 'The changes made will be discarded<br/><br/><b>Do you really want to cancel?</b>',
|
8162
8204
|
},
|
8205
|
+
requiredFiltersNotFilled: {
|
8206
|
+
title: 'Error',
|
8207
|
+
message: 'There are required filters that are not filled.',
|
8208
|
+
},
|
8163
8209
|
};
|
8164
8210
|
const snkGridConfigMessages$1 = {
|
8165
8211
|
gridConfiguration: 'Grid Configuration',
|
@@ -8452,6 +8498,7 @@ const snkFilterBarMessages = {
|
|
8452
8498
|
create: "Crear filtro predeterminado",
|
8453
8499
|
},
|
8454
8500
|
validations: {
|
8501
|
+
requiredFilter: "Filtro obligatorio",
|
8455
8502
|
notFullFilled: {
|
8456
8503
|
title: "Filtro parcialmente completado",
|
8457
8504
|
message: "Por favor complete toda la información del filtro."
|
@@ -9006,6 +9053,10 @@ const snkGridMessages = {
|
|
9006
9053
|
title: 'Aviso',
|
9007
9054
|
message: 'Los cambios realizados serán descartados<br/><br/><b>¿Realmente desea cancelar?</b>',
|
9008
9055
|
},
|
9056
|
+
requiredFiltersNotFilled: {
|
9057
|
+
title: 'Error',
|
9058
|
+
message: 'Existen filtros obligatorios que no están completados.',
|
9059
|
+
},
|
9009
9060
|
};
|
9010
9061
|
const snkGridConfigMessages = {
|
9011
9062
|
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-f6b2961a.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-22eace3a.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-bc6f0f1f.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-f6b2961a.js';
|
2
|
+
import './ISave-6b7b0423.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-6314b19d.js';
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
9
|
-
import './form-config-fetcher-
|
9
|
+
import './form-config-fetcher-bc6f0f1f.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;
|
@@ -334,7 +296,10 @@ class ClientSideExporterProvider extends CommonsExporter {
|
|
334
296
|
}
|
335
297
|
resolveRecordsFromSelection() {
|
336
298
|
const selectionInfo = this.dataUnit.getSelectionInfo();
|
337
|
-
|
299
|
+
if (selectionInfo.isEmpty()) {
|
300
|
+
return this.dataUnit.records;
|
301
|
+
}
|
302
|
+
const selectionRecords = selectionInfo.isAllRecords() ? selectionInfo.getAllRecords() : selectionInfo.records;
|
338
303
|
return selectionRecords.length ? selectionRecords : this.dataUnit.records;
|
339
304
|
}
|
340
305
|
getHiddenOptions() {
|
@@ -356,7 +321,7 @@ class ClientSideExporterProvider extends CommonsExporter {
|
|
356
321
|
return value.label;
|
357
322
|
}
|
358
323
|
const fieldDescriptor = this.dataUnit.getField(id);
|
359
|
-
if (fieldDescriptor.userInterface === UserInterface.SEARCH) {
|
324
|
+
if (fieldDescriptor.userInterface === UserInterface$1.SEARCH) {
|
360
325
|
return value.value;
|
361
326
|
}
|
362
327
|
if (column.customFormatter) {
|
@@ -368,4 +333,42 @@ class ClientSideExporterProvider extends CommonsExporter {
|
|
368
333
|
}
|
369
334
|
}
|
370
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
|
+
|
371
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-bc6f0f1f.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-f6b2961a.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';
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
2
|
+
|
3
|
+
function hasActiveElements(value) {
|
4
|
+
var _a;
|
5
|
+
const list = Array.isArray(value) ? value : value === null || value === void 0 ? void 0 : value.elements;
|
6
|
+
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;
|
7
|
+
}
|
8
|
+
function getInvalidFilters(filters) {
|
9
|
+
return filters.filter(item => {
|
10
|
+
if (!item.required) {
|
11
|
+
return false;
|
12
|
+
}
|
13
|
+
if (item.type === FilterItemType.MULTI_LIST) {
|
14
|
+
return !hasActiveElements(item.value);
|
15
|
+
}
|
16
|
+
return !item.value;
|
17
|
+
});
|
18
|
+
}
|
19
|
+
function validateFilters(filters) {
|
20
|
+
const notValidFilters = getInvalidFilters(filters);
|
21
|
+
if (notValidFilters.length === 0) {
|
22
|
+
return true;
|
23
|
+
}
|
24
|
+
return false;
|
25
|
+
}
|
26
|
+
|
27
|
+
export { getInvalidFilters as g, validateFilters as v };
|
@@ -76,6 +76,8 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
|
|
76
76
|
set: [],
|
77
77
|
reset: [],
|
78
78
|
};
|
79
|
+
// Track onChange listeners to enable removeListener functionality
|
80
|
+
const changeListeners = new Map();
|
79
81
|
const reset = () => {
|
80
82
|
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
81
83
|
// otherwise, the state won't be properly reset
|
@@ -129,17 +131,21 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
|
|
129
131
|
};
|
130
132
|
};
|
131
133
|
const onChange = (propName, cb) => {
|
132
|
-
const
|
134
|
+
const setHandler = (key, newValue) => {
|
133
135
|
if (key === propName) {
|
134
136
|
cb(newValue);
|
135
137
|
}
|
136
|
-
}
|
137
|
-
|
138
|
-
//
|
139
|
-
const
|
138
|
+
};
|
139
|
+
const resetHandler = () => cb(unwrap(defaultState)[propName]);
|
140
|
+
// Register the handlers
|
141
|
+
const unSet = on('set', setHandler);
|
142
|
+
const unReset = on('reset', resetHandler);
|
143
|
+
// Track the relationship between the user callback and internal handlers
|
144
|
+
changeListeners.set(cb, { setHandler, resetHandler, propName });
|
140
145
|
return () => {
|
141
146
|
unSet();
|
142
147
|
unReset();
|
148
|
+
changeListeners.delete(cb);
|
143
149
|
};
|
144
150
|
};
|
145
151
|
const use = (...subscriptions) => {
|
@@ -164,6 +170,15 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
|
|
164
170
|
const oldValue = states.get(key);
|
165
171
|
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
166
172
|
};
|
173
|
+
const removeListener = (propName, listener) => {
|
174
|
+
const listenerInfo = changeListeners.get(listener);
|
175
|
+
if (listenerInfo && listenerInfo.propName === propName) {
|
176
|
+
// Remove the specific handlers that were created for this listener
|
177
|
+
removeFromArray(handlers.set, listenerInfo.setHandler);
|
178
|
+
removeFromArray(handlers.reset, listenerInfo.resetHandler);
|
179
|
+
changeListeners.delete(listener);
|
180
|
+
}
|
181
|
+
};
|
167
182
|
return {
|
168
183
|
state,
|
169
184
|
get,
|
@@ -174,6 +189,7 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
|
|
174
189
|
dispose,
|
175
190
|
reset,
|
176
191
|
forceUpdate,
|
192
|
+
removeListener,
|
177
193
|
};
|
178
194
|
};
|
179
195
|
const removeFromArray = (array, item) => {
|
@@ -2148,14 +2148,6 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
2148
2148
|
return import(
|
2149
2149
|
/* webpackMode: "lazy" */
|
2150
2150
|
'./teste-pesquisa.entry.js').then(processMod, consoleError);
|
2151
|
-
case 'snk-default-filter':
|
2152
|
-
return import(
|
2153
|
-
/* webpackMode: "lazy" */
|
2154
|
-
'./snk-default-filter.entry.js').then(processMod, consoleError);
|
2155
|
-
case 'snk-filter-modal-item':
|
2156
|
-
return import(
|
2157
|
-
/* webpackMode: "lazy" */
|
2158
|
-
'./snk-filter-modal-item.entry.js').then(processMod, consoleError);
|
2159
2151
|
case 'pesquisa-grid_2':
|
2160
2152
|
return import(
|
2161
2153
|
/* webpackMode: "lazy" */
|
@@ -2200,6 +2192,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
2200
2192
|
return import(
|
2201
2193
|
/* webpackMode: "lazy" */
|
2202
2194
|
'./field-config_2.entry.js').then(processMod, consoleError);
|
2195
|
+
case 'snk-default-filter':
|
2196
|
+
return import(
|
2197
|
+
/* webpackMode: "lazy" */
|
2198
|
+
'./snk-default-filter.entry.js').then(processMod, consoleError);
|
2203
2199
|
case 'snk-filter-advanced-mode_2':
|
2204
2200
|
return import(
|
2205
2201
|
/* webpackMode: "lazy" */
|
@@ -2208,6 +2204,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
2208
2204
|
return import(
|
2209
2205
|
/* webpackMode: "lazy" */
|
2210
2206
|
'./snk-filter-detail.entry.js').then(processMod, consoleError);
|
2207
|
+
case 'snk-filter-modal-item':
|
2208
|
+
return import(
|
2209
|
+
/* webpackMode: "lazy" */
|
2210
|
+
'./snk-filter-modal-item.entry.js').then(processMod, consoleError);
|
2211
2211
|
case 'snk-simple-bar':
|
2212
2212
|
return import(
|
2213
2213
|
/* webpackMode: "lazy" */
|