@sankhyalabs/sankhyablocks 1.4.0-beta.1 → 1.4.0-beta.2
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/{SnkMessageBuilder-7717f1e4.js → SnkMessageBuilder-d8215915.js} +14 -119
- package/dist/cjs/{filter-item-type.enum-e2e1bc5b.js → filter-item-type.enum-3daf58d3.js} +2 -0
- package/dist/cjs/index-84fe3b86.js +20 -0
- package/dist/cjs/index-93965c41.js +141 -0
- package/dist/cjs/{index-02201bc9.js → index-e90ae303.js} +11 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +43 -25
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +10 -18
- package/dist/cjs/snk-filter-bar.cjs.entry.js +334 -146
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +37 -2
- package/dist/cjs/snk-filter-item.cjs.entry.js +34 -11
- package/dist/cjs/snk-filter-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal.cjs.entry.js +37 -0
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +89 -0
- package/dist/cjs/snk-filter-search.cjs.entry.js +2 -2
- package/dist/cjs/snk-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +1 -1
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +1 -1
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/snk-application/snk-application.js +54 -7
- package/dist/collection/components/snk-crud/snk-crud.js +2 -4
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +0 -27
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +100 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +161 -0
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +2 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +36 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +32 -9
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +196 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +22 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +238 -139
- package/dist/collection/components/snk-grid/snk-grid.js +2 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +18 -10
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +14 -2
- package/dist/components/SnkMessageBuilder.js +15 -119
- package/dist/components/filter-item-type.enum.js +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index2.js +11 -1
- package/dist/components/index3.js +139 -0
- package/dist/components/snk-application2.js +39 -19
- package/dist/components/snk-crud.js +15 -9
- package/dist/components/snk-data-unit.js +2 -11
- package/dist/components/snk-filter-bar2.js +340 -146
- package/dist/components/snk-filter-detail2.js +36 -1
- package/dist/components/snk-filter-item2.js +32 -9
- package/dist/components/snk-filter-list2.js +1 -1
- package/dist/components/snk-filter-modal.d.ts +11 -0
- package/dist/components/snk-filter-modal.js +6 -0
- package/dist/components/snk-filter-modal2.js +73 -0
- package/dist/components/snk-filter-personalized.d.ts +11 -0
- package/dist/components/snk-filter-personalized.js +107 -0
- package/dist/components/snk-grid2.js +15 -9
- package/dist/{sankhyablocks/SnkMessageBuilder-a7da466b.js → esm/SnkMessageBuilder-35a20271.js} +15 -119
- package/dist/esm/{filter-item-type.enum-61fbf80a.js → filter-item-type.enum-a79b2fa8.js} +2 -0
- package/dist/esm/index-5992b7e6.js +139 -0
- package/dist/esm/{index-f1d3e4da.js → index-c683b2b0.js} +11 -1
- package/dist/esm/index-c71285cb.js +17 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +37 -19
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-unit.entry.js +3 -11
- package/dist/esm/snk-filter-bar.entry.js +328 -140
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +37 -2
- package/dist/esm/snk-filter-item.entry.js +34 -11
- package/dist/esm/snk-filter-list.entry.js +1 -1
- package/dist/esm/snk-filter-modal.entry.js +33 -0
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-personalized.entry.js +85 -0
- package/dist/esm/snk-filter-search.entry.js +2 -2
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +1 -1
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +1 -1
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/{esm/SnkMessageBuilder-a7da466b.js → sankhyablocks/SnkMessageBuilder-35a20271.js} +15 -119
- package/dist/sankhyablocks/{filter-item-type.enum-61fbf80a.js → filter-item-type.enum-a79b2fa8.js} +2 -0
- package/dist/sankhyablocks/index-5992b7e6.js +139 -0
- package/dist/sankhyablocks/{index-f1d3e4da.js → index-c683b2b0.js} +11 -1
- package/dist/sankhyablocks/index-c71285cb.js +17 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/sankhyablocks/snk-application.entry.js +37 -19
- package/dist/sankhyablocks/snk-crud.entry.js +1 -1
- package/dist/sankhyablocks/snk-data-unit.entry.js +3 -11
- package/dist/sankhyablocks/snk-filter-bar.entry.js +328 -140
- package/dist/sankhyablocks/snk-filter-binary-select.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-detail.entry.js +37 -2
- package/dist/sankhyablocks/snk-filter-item.entry.js +34 -11
- package/dist/sankhyablocks/snk-filter-list.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-modal.entry.js +33 -0
- package/dist/sankhyablocks/snk-filter-multi-select.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-number.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-period.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-personalized.entry.js +85 -0
- package/dist/sankhyablocks/snk-filter-search.entry.js +2 -2
- package/dist/sankhyablocks/snk-form.entry.js +1 -1
- package/dist/sankhyablocks/snk-grid.entry.js +1 -1
- package/dist/sankhyablocks/snk-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/snk-taskbar.entry.js +1 -1
- package/dist/sankhyablocks/teste-pesquisa.entry.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +4 -1
- package/dist/types/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +23 -0
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +3 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +23 -0
- package/dist/types/components.d.ts +56 -8
- package/package.json +3 -3
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +0 -51
|
@@ -125,5 +125,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
125
125
|
|
|
126
126
|
patchBrowser().then(options => {
|
|
127
127
|
globalScripts();
|
|
128
|
-
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[
|
|
128
|
+
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"fix":[16],"unfix":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-item",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["snk-filter-list",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32]}]]],["snk-filter-modal",[[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}]]],["snk-filter-bar",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-taskbar",[[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-grid",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-form",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"keepOpened":[1028,"keep-opened"],"getMessage":[16]}]]]], options);
|
|
129
129
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { E as ErrorException, W as WarningException, S as StringUtils, D as DataUnit, b as DataType, C as ChangeOperation,
|
|
3
|
-
import { A as ApplicationUtils
|
|
2
|
+
import { E as ErrorException, W as WarningException, S as StringUtils, D as DataUnit, b as DataType, C as ChangeOperation, d as DateUtils, O as ObjectUtils, e as WaitingChangeException, f as DependencyType, A as ApplicationContext, g as ErrorTracking } from './index-c683b2b0.js';
|
|
3
|
+
import { A as ApplicationUtils } from './index-5992b7e6.js';
|
|
4
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-35a20271.js';
|
|
4
5
|
|
|
5
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
7
|
|
|
@@ -7515,20 +7516,28 @@ class TotalsFetcher {
|
|
|
7515
7516
|
}
|
|
7516
7517
|
|
|
7517
7518
|
function normalizeValue(value) {
|
|
7519
|
+
if (value == undefined) {
|
|
7520
|
+
return value;
|
|
7521
|
+
}
|
|
7518
7522
|
if (value instanceof Date) {
|
|
7519
7523
|
return value.toISOString();
|
|
7520
7524
|
}
|
|
7521
7525
|
if (typeof value === "object") {
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
}
|
|
7527
|
-
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7526
|
+
if (value instanceof Array) {
|
|
7527
|
+
return value.map(item => normalizeValue(item));
|
|
7528
|
+
}
|
|
7529
|
+
else {
|
|
7530
|
+
const normalized = Object.assign({}, value);
|
|
7531
|
+
Object.keys(value).forEach(prop => {
|
|
7532
|
+
if (value[prop]) {
|
|
7533
|
+
normalized[prop] = normalizeValue(value[prop]);
|
|
7534
|
+
}
|
|
7535
|
+
else {
|
|
7536
|
+
delete normalized[prop];
|
|
7537
|
+
}
|
|
7538
|
+
});
|
|
7539
|
+
return normalized;
|
|
7540
|
+
}
|
|
7532
7541
|
}
|
|
7533
7542
|
return value;
|
|
7534
7543
|
}
|
|
@@ -7693,15 +7702,24 @@ const SnkApplication = class {
|
|
|
7693
7702
|
* Mostra o conteúdo passado em um Popup
|
|
7694
7703
|
*/
|
|
7695
7704
|
async showPopUp(content) {
|
|
7696
|
-
this.
|
|
7705
|
+
this.clearContent(this._popUp);
|
|
7697
7706
|
this._popUp.appendChild(content);
|
|
7698
7707
|
this._popUp.opened = true;
|
|
7699
7708
|
}
|
|
7709
|
+
async showModal(content) {
|
|
7710
|
+
this.clearContent(this._rightModal);
|
|
7711
|
+
this._rightModal.appendChild(content);
|
|
7712
|
+
this._rightModal.opened = true;
|
|
7713
|
+
}
|
|
7714
|
+
async closeModal() {
|
|
7715
|
+
this.clearContent(this._rightModal);
|
|
7716
|
+
this._rightModal.opened = false;
|
|
7717
|
+
}
|
|
7700
7718
|
/**
|
|
7701
7719
|
* Fecha o popup, liberando o conteúdo.
|
|
7702
7720
|
*/
|
|
7703
7721
|
async closePopUp() {
|
|
7704
|
-
this.
|
|
7722
|
+
this.clearContent(this._popUp);
|
|
7705
7723
|
this._popUp.opened = false;
|
|
7706
7724
|
}
|
|
7707
7725
|
/**
|
|
@@ -8044,10 +8062,10 @@ const SnkApplication = class {
|
|
|
8044
8062
|
accept(window['isDebugMode']);
|
|
8045
8063
|
});
|
|
8046
8064
|
}
|
|
8047
|
-
|
|
8048
|
-
if (
|
|
8049
|
-
Array.from(
|
|
8050
|
-
|
|
8065
|
+
clearContent(container) {
|
|
8066
|
+
if (container) {
|
|
8067
|
+
Array.from(container.children).forEach(child => {
|
|
8068
|
+
container.removeChild(child);
|
|
8051
8069
|
});
|
|
8052
8070
|
}
|
|
8053
8071
|
}
|
|
@@ -8091,7 +8109,7 @@ const SnkApplication = class {
|
|
|
8091
8109
|
});
|
|
8092
8110
|
}
|
|
8093
8111
|
render() {
|
|
8094
|
-
return (h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() })));
|
|
8112
|
+
return (h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "col col--sd-3", closeOutsideClick: true })));
|
|
8095
8113
|
}
|
|
8096
8114
|
};
|
|
8097
8115
|
class RequestListenerLoadingBar {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, g as getElement } from './index-2b4d2d14.js';
|
|
2
|
-
import { A as ApplicationContext } from './index-
|
|
2
|
+
import { A as ApplicationContext } from './index-c683b2b0.js';
|
|
3
3
|
|
|
4
4
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
5
5
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-2b4d2d14.js';
|
|
2
|
-
import { a as Action, A as ApplicationContext } from './index-
|
|
3
|
-
import { A as ApplicationUtils, D as DialogType
|
|
2
|
+
import { a as Action, A as ApplicationContext } from './index-c683b2b0.js';
|
|
3
|
+
import { A as ApplicationUtils, D as DialogType } from './index-5992b7e6.js';
|
|
4
|
+
import { O as OperationMap } from './SnkMessageBuilder-35a20271.js';
|
|
4
5
|
|
|
5
6
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
6
7
|
|
|
@@ -16,10 +17,6 @@ const SnkDataUnit = class {
|
|
|
16
17
|
* Determina quantas linhas são retornadas por página
|
|
17
18
|
*/
|
|
18
19
|
this.pageSize = 150;
|
|
19
|
-
/**
|
|
20
|
-
* Quando ativada essa propriedade faz com que haja uma carga imediata no DataUnit
|
|
21
|
-
*/
|
|
22
|
-
this.autoLoad = true;
|
|
23
20
|
this._dataUnitObserver = (action) => {
|
|
24
21
|
const duState = {
|
|
25
22
|
insertionMode: false,
|
|
@@ -241,11 +238,6 @@ const SnkDataUnit = class {
|
|
|
241
238
|
while (resolver = this._onDataUnitResolve.pop()) {
|
|
242
239
|
resolver(this.dataUnit);
|
|
243
240
|
}
|
|
244
|
-
if (this.autoLoad) {
|
|
245
|
-
setTimeout(() => {
|
|
246
|
-
this.dataUnit.loadData();
|
|
247
|
-
}, 500); //TODO: Ajustar para aguardar filterProvider do dataunit estar pronto.
|
|
248
|
-
}
|
|
249
241
|
}
|
|
250
242
|
}
|
|
251
243
|
}
|