@sankhyalabs/sankhyablocks 1.4.0-beta.4 → 1.4.0-beta.6
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-d8215915.js → SnkMessageBuilder-b54dfb89.js} +6 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +9 -3
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar_5.cjs.entry.js +122 -36
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +14 -3
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +4 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +4 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +14 -7
- package/dist/cjs/snk-filter-search.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/collection/components/snk-application/snk-application.js +12 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +23 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +24 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +24 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +23 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +34 -7
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +23 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +34 -3
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +37 -15
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +82 -8
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +30 -5
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +17 -4
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +18 -8
- package/dist/collection/lib/index.js +1 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
- package/dist/collection/lib/message/resources/crud-utils.msg.js +4 -0
- package/dist/collection/lib/utils/CrudUtils.js +73 -0
- package/dist/components/SnkMessageBuilder.js +6 -1
- package/dist/components/snk-application2.js +8 -2
- package/dist/components/snk-filter-bar2.js +19 -9
- package/dist/components/snk-filter-binary-select.js +5 -1
- package/dist/components/snk-filter-detail2.js +16 -4
- package/dist/components/snk-filter-item2.js +23 -16
- package/dist/components/snk-filter-list2.js +56 -10
- package/dist/components/snk-filter-modal2.js +30 -5
- package/dist/components/snk-filter-multi-select.js +6 -2
- package/dist/components/snk-filter-number.js +6 -2
- package/dist/components/snk-filter-period.js +5 -1
- package/dist/components/snk-filter-personalized.js +16 -8
- package/dist/components/snk-filter-search.js +5 -1
- package/dist/components/snk-filter-text.js +1 -1
- package/dist/esm/{SnkMessageBuilder-35a20271.js → SnkMessageBuilder-d440381c.js} +6 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +9 -3
- package/dist/esm/snk-data-unit.entry.js +1 -1
- package/dist/esm/snk-filter-bar_5.entry.js +122 -36
- package/dist/esm/snk-filter-binary-select.entry.js +3 -0
- package/dist/esm/snk-filter-detail.entry.js +14 -3
- package/dist/esm/snk-filter-multi-select.entry.js +4 -1
- package/dist/esm/snk-filter-number.entry.js +4 -1
- package/dist/esm/snk-filter-period.entry.js +3 -0
- package/dist/esm/snk-filter-personalized.entry.js +14 -7
- package/dist/esm/snk-filter-search.entry.js +3 -0
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/sankhyablocks/{p-01823784.entry.js → p-0ea25487.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8bbc0cbb.entry.js → p-1a58f45c.entry.js} +2 -2
- package/dist/sankhyablocks/p-21e940aa.entry.js +1 -0
- package/dist/sankhyablocks/{p-8f3c5709.entry.js → p-2e49afef.entry.js} +1 -1
- package/dist/sankhyablocks/{p-586e2522.js → p-2eea7eea.js} +1 -1
- package/dist/sankhyablocks/p-40b27004.entry.js +1 -0
- package/dist/sankhyablocks/p-4574a955.entry.js +1 -0
- package/dist/sankhyablocks/p-49580cdd.entry.js +1 -0
- package/dist/sankhyablocks/p-5bdb8452.entry.js +1 -0
- package/dist/sankhyablocks/p-6386d720.entry.js +1 -0
- package/dist/sankhyablocks/p-a14c49db.entry.js +1 -0
- package/dist/sankhyablocks/p-ba426ea9.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +7 -2
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +5 -2
- package/dist/types/components.d.ts +10 -1
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/message/resources/crud-utils.msg.d.ts +2 -0
- package/dist/types/lib/utils/CrudUtils.d.ts +6 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-07ebda01.entry.js +0 -1
- package/dist/sankhyablocks/p-46caa101.entry.js +0 -1
- package/dist/sankhyablocks/p-6f8303f3.entry.js +0 -1
- package/dist/sankhyablocks/p-746fc78b.entry.js +0 -1
- package/dist/sankhyablocks/p-c1c3b5d8.entry.js +0 -1
- package/dist/sankhyablocks/p-c9eec639.entry.js +0 -1
- package/dist/sankhyablocks/p-eea6444c.entry.js +0 -1
- package/dist/sankhyablocks/p-fb705f81.entry.js +0 -1
|
@@ -8,6 +8,7 @@ const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
8
8
|
super();
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
this.snkItemSelected = createEvent(this, "snkItemSelected", 7);
|
|
11
|
+
this._preselection = -1;
|
|
11
12
|
this.innerClickCheck = (_floatingContainer, node) => {
|
|
12
13
|
if (node.id != FloatingManager.MODAL_ELEMENT_ID) {
|
|
13
14
|
return true;
|
|
@@ -16,25 +17,34 @@ const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
16
17
|
return false;
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
this.
|
|
20
|
+
showDetail() {
|
|
21
|
+
this._preselection = -1;
|
|
22
|
+
this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, {
|
|
23
|
+
autoClose: true,
|
|
24
|
+
innerClickTest: this.innerClickCheck,
|
|
25
|
+
backClickListener: () => this.onListCloseCallback(),
|
|
26
|
+
useOverlay: true
|
|
27
|
+
});
|
|
21
28
|
this._detailIsVisible = true;
|
|
22
29
|
this._showAll = false;
|
|
23
30
|
this._filterArgument = "";
|
|
31
|
+
this._filterInput.setFocus();
|
|
24
32
|
}
|
|
25
|
-
|
|
33
|
+
async hideDetail() {
|
|
26
34
|
if (this._floatingID != undefined) {
|
|
27
35
|
FloatingManager.close(this._floatingID);
|
|
28
36
|
}
|
|
37
|
+
}
|
|
38
|
+
onListCloseCallback() {
|
|
29
39
|
this._floatingID = undefined;
|
|
30
40
|
this._detailIsVisible = false;
|
|
31
41
|
}
|
|
32
42
|
buttonClick() {
|
|
33
43
|
if (this._detailIsVisible) {
|
|
34
|
-
this.
|
|
44
|
+
this.hideDetail();
|
|
35
45
|
}
|
|
36
46
|
else {
|
|
37
|
-
this.
|
|
47
|
+
this.showDetail();
|
|
38
48
|
}
|
|
39
49
|
}
|
|
40
50
|
componentDidRender() {
|
|
@@ -45,14 +55,15 @@ const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
57
|
buildItemElement(item) {
|
|
48
|
-
|
|
58
|
+
const itemId = ++this._selectableItemsCount;
|
|
59
|
+
return (h("button", { id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name) }, item.iconName ? h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
|
|
49
60
|
}
|
|
50
61
|
itemSelected(itemName) {
|
|
51
62
|
if (itemName === SHOW_MORE_ITEM_NAME) {
|
|
52
63
|
this._showAll = true;
|
|
53
64
|
}
|
|
54
65
|
else {
|
|
55
|
-
this.
|
|
66
|
+
this.hideDetail();
|
|
56
67
|
this.snkItemSelected.emit(itemName);
|
|
57
68
|
}
|
|
58
69
|
}
|
|
@@ -66,13 +77,47 @@ const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
66
77
|
items.splice(MAX_FILTERS);
|
|
67
78
|
items.push({ kind: "INTERNAL", label: "Mostrar mais", iconName: "dots-horizontal", name: SHOW_MORE_ITEM_NAME, iconClass: "snk-filter-bar__filter-list-item__icon--secondary", labelClass: "snk-filter-bar__filter-list-item__label--secondary" });
|
|
68
79
|
}
|
|
80
|
+
this._selectableItemsCount = 0;
|
|
69
81
|
return h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-list-items-container" }, items.map(item => this.buildItemElement(item)));
|
|
70
82
|
}
|
|
71
83
|
getFooterItems() {
|
|
72
84
|
return this.items.filter(item => item.kind === "FOOTER");
|
|
73
85
|
}
|
|
86
|
+
keyDownHandler(event) {
|
|
87
|
+
switch (event.key) {
|
|
88
|
+
case "ArrowDown":
|
|
89
|
+
this.changePreselection(this._preselection + 1);
|
|
90
|
+
//Paramos a propagação do evento para evitar scroll indesejado
|
|
91
|
+
event.stopImmediatePropagation();
|
|
92
|
+
event.stopPropagation();
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
break;
|
|
95
|
+
case "ArrowUp":
|
|
96
|
+
this.changePreselection(this._preselection - 1);
|
|
97
|
+
//Paramos a propagação do evento para evitar scroll indesejado
|
|
98
|
+
event.stopImmediatePropagation();
|
|
99
|
+
event.stopPropagation();
|
|
100
|
+
event.preventDefault();
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
changePreselection(newSelection) {
|
|
105
|
+
if (newSelection < 0) {
|
|
106
|
+
newSelection = this._selectableItemsCount;
|
|
107
|
+
}
|
|
108
|
+
this._preselection = newSelection > this._selectableItemsCount ? 0 : newSelection;
|
|
109
|
+
if (this._preselection === 0) {
|
|
110
|
+
this._filterInput.setFocus();
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const item = this._element.querySelector(`#filter-item${this._preselection}`);
|
|
114
|
+
if (item) {
|
|
115
|
+
item.focus();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
74
119
|
render() {
|
|
75
|
-
return (h(Host, { class: "ez-flex ez-flex--column" }, h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, h("slot", { name: "leftIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, h("ez-filter-input", { ref: ref => this._filterInput = ref, mode: "slim", label: this.findFilterText, value: this._filterArgument, onEzChange: (evt) => this._filterArgument = evt.detail }), this.getFilterItems(), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
|
|
120
|
+
return (h(Host, { class: "ez-flex ez-flex--column" }, h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, h("slot", { name: "leftIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, h("ez-filter-input", { ref: ref => this._filterInput = ref, mode: "slim", label: this.findFilterText, value: this._filterArgument, onEzChange: (evt) => this._filterArgument = evt.detail, onFocus: () => this._preselection = 0 }), this.getFilterItems(), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
|
|
76
121
|
}
|
|
77
122
|
get _element() { return this; }
|
|
78
123
|
}, [4, "snk-filter-list", {
|
|
@@ -84,8 +129,9 @@ const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
84
129
|
"findFilterText": [1, "find-filter-text"],
|
|
85
130
|
"buttonClass": [1, "button-class"],
|
|
86
131
|
"_filterArgument": [32],
|
|
87
|
-
"_showAll": [32]
|
|
88
|
-
|
|
132
|
+
"_showAll": [32],
|
|
133
|
+
"hideDetail": [64]
|
|
134
|
+
}, [[2, "keydown", "keyDownHandler"]]]);
|
|
89
135
|
function defineCustomElement() {
|
|
90
136
|
if (typeof customElements === "undefined") {
|
|
91
137
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { ModalButtonStatus } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
2
|
+
import { ModalAction, ModalButtonStatus } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
3
3
|
import { ArrayUtils } from '@sankhyalabs/core';
|
|
4
4
|
|
|
5
5
|
const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -7,9 +7,12 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
}
|
|
10
|
-
updateValue(id, value) {
|
|
10
|
+
updateValue(id, value = undefined) {
|
|
11
11
|
this.items = this.items.map(item => {
|
|
12
12
|
if (item.id === id) {
|
|
13
|
+
if (value == undefined) {
|
|
14
|
+
value = !item.active;
|
|
15
|
+
}
|
|
13
16
|
return Object.assign(Object.assign({}, item), { active: value });
|
|
14
17
|
}
|
|
15
18
|
return item;
|
|
@@ -22,12 +25,34 @@ const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
22
25
|
}
|
|
23
26
|
return this.getMessage(activeFilters > 1 ? "snkFilterBar.activeFilters" : "snkFilterBar.activeFilter", { ACTIVE_FILTERS: activeFilters });
|
|
24
27
|
}
|
|
25
|
-
|
|
26
|
-
return
|
|
28
|
+
buildItems(list) {
|
|
29
|
+
return list.map(item => {
|
|
30
|
+
return (h("button", { onClick: () => this.updateValue(item.id), class: "ez-padding--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item ez-align--middle ez-margin-bottom--small" }, h("ez-check", { id: `checkbox_${item.id}`, tabIndex: "-1", class: "sc-snk-filter-bar snk-filter-bar__filter-modal-item__check", onEzChange: evt => this.updateValue(item.id, evt.detail), enabled: item.enabled, value: item.active, mode: "switch" }), h("div", { class: "ez-text ez-title--primary ez-text--medium ez-margin-left--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item__label" }, item.label)));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
itemKeyBoardSelect(event, item) {
|
|
34
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
35
|
+
this.updateValue(item.id);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
modalActionListener(evt) {
|
|
39
|
+
const modalAction = evt.detail;
|
|
40
|
+
if (modalAction === ModalAction.LOAD) {
|
|
41
|
+
if (this._filterInput) {
|
|
42
|
+
this._filterInput.setFocus();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this.processModalAction(modalAction);
|
|
47
|
+
}
|
|
27
48
|
}
|
|
28
49
|
render() {
|
|
29
50
|
const allowCancel = this.items.filter(item => item.active).length > 0;
|
|
30
|
-
|
|
51
|
+
const items = (this.items ? ArrayUtils.applyStringFilter(this._filterArgument, this.items) : []);
|
|
52
|
+
return (h("ez-modal-container", { modalTitle: this.modalTitle, modalSubTitle: this.modalSubTitle, cancelButtonLabel: this.cancelButtonLabel, okButtonLabel: this.okButtonLabel, onEzModalAction: evt => this.modalActionListener(evt), cancelButtonStatus: allowCancel ? ModalButtonStatus.ENABLED : ModalButtonStatus.DISABLED }, h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-content" }, h("div", null, this.useSearch ?
|
|
53
|
+
h("ez-filter-input", { ref: ref => this._filterInput = ref, label: this.getMessage("snkFilterBar.modalFindFilter"), onEzChange: (evt) => this._filterArgument = evt.detail })
|
|
54
|
+
:
|
|
55
|
+
undefined), items.length > 0 ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding-bottom--small" }, this.getActiveFiltersMsg()) : undefined, h("div", null, this.buildItems(items)), h("div", { class: "ez-text ez-text--large ez-align--middle ez-text--secondary ez-text--center ez-padding-bottom--large" }, this.infoText))));
|
|
31
56
|
}
|
|
32
57
|
}, [0, "snk-filter-modal", {
|
|
33
58
|
"getMessage": [16],
|
|
@@ -9,15 +9,19 @@ const SnkFilterMultiSelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
9
9
|
ezChangeListener(evt) {
|
|
10
10
|
this.value = evt.detail.value;
|
|
11
11
|
}
|
|
12
|
+
async show() {
|
|
13
|
+
this._comboElement.setFocus();
|
|
14
|
+
}
|
|
12
15
|
render() {
|
|
13
16
|
if (!this.config || this.config.type !== FilterItemType.MULTI_SELECT) {
|
|
14
17
|
return undefined;
|
|
15
18
|
}
|
|
16
|
-
return (h("ez-combo-box", { label: this.config.label, value: this.config.value, options: this.config.props.options }));
|
|
19
|
+
return (h("ez-combo-box", { ref: ref => this._comboElement = ref, label: this.config.label, value: this.config.value, options: this.config.props.options }));
|
|
17
20
|
}
|
|
18
21
|
}, [0, "snk-filter-multi-select", {
|
|
19
22
|
"value": [1544],
|
|
20
|
-
"config": [16]
|
|
23
|
+
"config": [16],
|
|
24
|
+
"show": [64]
|
|
21
25
|
}, [[0, "ezChange", "ezChangeListener"]]]);
|
|
22
26
|
function defineCustomElement$1() {
|
|
23
27
|
if (typeof customElements === "undefined") {
|
|
@@ -9,16 +9,20 @@ const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
9
9
|
ezChangeListener(evt) {
|
|
10
10
|
this.value = evt.detail;
|
|
11
11
|
}
|
|
12
|
+
async show() {
|
|
13
|
+
this._numberElement.setFocus();
|
|
14
|
+
}
|
|
12
15
|
render() {
|
|
13
16
|
var _a;
|
|
14
17
|
if (!this.config || this.config.type !== FilterItemType.NUMBER) {
|
|
15
18
|
return undefined;
|
|
16
19
|
}
|
|
17
|
-
return (h("ez-number-input", { label: this.config.label, value: this.config.value, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision }));
|
|
20
|
+
return (h("ez-number-input", { ref: ref => this._numberElement = ref, label: this.config.label, value: this.config.value, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision }));
|
|
18
21
|
}
|
|
19
22
|
}, [0, "snk-filter-number", {
|
|
20
23
|
"config": [16],
|
|
21
|
-
"value": [2]
|
|
24
|
+
"value": [2],
|
|
25
|
+
"show": [64]
|
|
22
26
|
}, [[0, "ezChange", "ezChangeListener"]]]);
|
|
23
27
|
function defineCustomElement$1() {
|
|
24
28
|
if (typeof customElements === "undefined") {
|
|
@@ -23,6 +23,9 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
23
23
|
}
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
+
async show() {
|
|
27
|
+
this._startDate.setFocus();
|
|
28
|
+
}
|
|
26
29
|
render() {
|
|
27
30
|
if (!this.config || this.config.type !== FilterItemType.PERIOD) {
|
|
28
31
|
return undefined;
|
|
@@ -31,7 +34,8 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
31
34
|
}
|
|
32
35
|
}, [0, "snk-filter-period", {
|
|
33
36
|
"config": [16],
|
|
34
|
-
"value": [8]
|
|
37
|
+
"value": [8],
|
|
38
|
+
"show": [64]
|
|
35
39
|
}, [[0, "ezChange", "ezChangeListener"]]]);
|
|
36
40
|
function defineCustomElement$1() {
|
|
37
41
|
if (typeof customElements === "undefined") {
|
|
@@ -46,27 +46,34 @@ const SnkFilterPersonalized$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
46
46
|
const params = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.personalizedFilter) === null || _c === void 0 ? void 0 : _c.parameters;
|
|
47
47
|
return params.map((param, index) => {
|
|
48
48
|
var _a;
|
|
49
|
+
const elemId = 'param_' + index;
|
|
49
50
|
switch (param.type) {
|
|
50
51
|
case UserInterface.SEARCH:
|
|
51
|
-
return h("ez-search", { suppressEmptyOption: true, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail), label: param.label, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, param) });
|
|
52
|
+
return h("ez-search", { id: elemId, suppressEmptyOption: true, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail), label: param.label, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, param) });
|
|
52
53
|
case UserInterface.SWITCH:
|
|
53
54
|
case UserInterface.CHECKBOX:
|
|
54
55
|
const mode = UserInterface.SWITCH === param.type ? "switch" : "regular";
|
|
55
|
-
return h("ez-check", { class: "ez-padding-bottom--medium", mode: mode, value: this.getValue(param, index), label: param.label, onEzChange: evt => this.setValue(index, evt.detail) });
|
|
56
|
+
return h("ez-check", { id: elemId, class: "ez-padding-bottom--medium", mode: mode, value: this.getValue(param, index), label: param.label, onEzChange: evt => this.setValue(index, evt.detail) });
|
|
56
57
|
case UserInterface.DECIMALNUMBER:
|
|
57
58
|
case UserInterface.INTEGERNUMBER:
|
|
58
|
-
return h("ez-number-input", { label: param.label, value: this.getValue(param, index), precision: (_a = param.props) === null || _a === void 0 ? void 0 : _a.precision, onEzChange: evt => this.setValue(index, evt.detail) });
|
|
59
|
+
return h("ez-number-input", { id: elemId, label: param.label, value: this.getValue(param, index), precision: (_a = param.props) === null || _a === void 0 ? void 0 : _a.precision, onEzChange: evt => this.setValue(index, evt.detail) });
|
|
59
60
|
case UserInterface.OPTIONSELECTOR:
|
|
60
|
-
return h("ez-combo-box", { label: param.label, value: this.getValue(param, index), options: param.options, onEzChange: evt => { var _a; return this.setValue(index, (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); } });
|
|
61
|
+
return h("ez-combo-box", { id: elemId, label: param.label, value: this.getValue(param, index), options: param.options, onEzChange: evt => { var _a; return this.setValue(index, (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); } });
|
|
61
62
|
case UserInterface.DATE:
|
|
62
|
-
return h("ez-date-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
63
|
+
return h("ez-date-input", { id: elemId, label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
63
64
|
case UserInterface.DATETIME:
|
|
64
|
-
return h("ez-date-time-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
65
|
+
return h("ez-date-time-input", { id: elemId, label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
65
66
|
default:
|
|
66
|
-
return h("ez-text-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
67
|
+
return h("ez-text-input", { id: elemId, label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
67
68
|
}
|
|
68
69
|
});
|
|
69
70
|
}
|
|
71
|
+
async show() {
|
|
72
|
+
const elem = document.querySelector("#param_0");
|
|
73
|
+
if (elem) {
|
|
74
|
+
elem["setFocus"]();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
70
77
|
render() {
|
|
71
78
|
if (!this.config || this.config.type !== FilterItemType.PERSONALIZED) {
|
|
72
79
|
return undefined;
|
|
@@ -75,7 +82,8 @@ const SnkFilterPersonalized$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
75
82
|
}
|
|
76
83
|
}, [0, "snk-filter-personalized", {
|
|
77
84
|
"config": [16],
|
|
78
|
-
"value": [1040]
|
|
85
|
+
"value": [1040],
|
|
86
|
+
"show": [64]
|
|
79
87
|
}]);
|
|
80
88
|
function defineCustomElement$1() {
|
|
81
89
|
if (typeof customElements === "undefined") {
|
|
@@ -21,6 +21,9 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
+
async show() {
|
|
25
|
+
this._searchInput.setFocus();
|
|
26
|
+
}
|
|
24
27
|
render() {
|
|
25
28
|
if (!this.config || this.config.type !== FilterItemType.SEARCH) {
|
|
26
29
|
return undefined;
|
|
@@ -29,7 +32,8 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
29
32
|
}
|
|
30
33
|
}, [0, "snk-filter-search", {
|
|
31
34
|
"config": [16],
|
|
32
|
-
"value": [16]
|
|
35
|
+
"value": [16],
|
|
36
|
+
"show": [64]
|
|
33
37
|
}, [[0, "ezChange", "ezChangeListener"]]]);
|
|
34
38
|
function defineCustomElement$1() {
|
|
35
39
|
if (typeof customElements === "undefined") {
|
|
@@ -12,7 +12,7 @@ const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
12
12
|
if (!this.config) {
|
|
13
13
|
return undefined;
|
|
14
14
|
}
|
|
15
|
-
return (h("ez-text-input", { label: this.config.label, value: this.config.value }));
|
|
15
|
+
return (h("ez-text-input", { ref: ref => this._textInputElement = ref, label: this.config.label, value: this.config.value }));
|
|
16
16
|
}
|
|
17
17
|
}, [0, "snk-filter-text", {
|
|
18
18
|
"config": [16],
|
|
@@ -78,13 +78,18 @@ const snkTaskbarMessages = {
|
|
|
78
78
|
forbidden: "Permissão não liberada"
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
+
const crudUtilsMessages = {
|
|
82
|
+
errorArray: "CrudUtils.find deve receber um array de fields, ou uma lista separada por virgula.",
|
|
83
|
+
};
|
|
84
|
+
|
|
81
85
|
class SnkMessageBuilder {
|
|
82
86
|
constructor() {
|
|
83
87
|
this._defaults = {
|
|
84
88
|
snkDataUnit: snkDataUnitMessages,
|
|
85
89
|
snkForm: snkFormMessages,
|
|
86
90
|
snkTaskbar: snkTaskbarMessages,
|
|
87
|
-
snkFilterBar: snkFilterBarMessages
|
|
91
|
+
snkFilterBar: snkFilterBarMessages,
|
|
92
|
+
crudUtils: crudUtilsMessages
|
|
88
93
|
};
|
|
89
94
|
this._currentOperation = OperationMap.CLEAN;
|
|
90
95
|
this.loadAppMessages().then((msgs) => {
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["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]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[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-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16]}]]],["snk-filter-bar_5",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[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]}],[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]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["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],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[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-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-filter-bar_5",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[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],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]],[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]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["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]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[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-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16]}]]],["snk-filter-bar_5",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[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]}],[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]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["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],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[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-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-filter-bar_5",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[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],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]],[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]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-81dda3cf.js';
|
|
2
2
|
import { ErrorException, WarningException, StringUtils, DataUnit, DataType, ChangeOperation, DateUtils, ObjectUtils, WaitingChangeException, DependencyType, ApplicationContext, ErrorTracking } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
|
4
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-d440381c.js';
|
|
5
5
|
|
|
6
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
7
|
|
|
@@ -7539,10 +7539,14 @@ const SnkApplication = class {
|
|
|
7539
7539
|
/**
|
|
7540
7540
|
* Mostra o conteúdo passado em um Popup
|
|
7541
7541
|
*/
|
|
7542
|
-
async showPopUp(content) {
|
|
7542
|
+
async showPopUp(content, size = "full") {
|
|
7543
7543
|
this.clearContent(this._popUp);
|
|
7544
|
+
if (content.tagName === 'EZ-MODAL-CONTAINER') {
|
|
7545
|
+
this._popUp.useHeader = false;
|
|
7546
|
+
}
|
|
7544
7547
|
this._popUp.appendChild(content);
|
|
7545
7548
|
this._popUp.opened = true;
|
|
7549
|
+
this._popUp.heightMode = size;
|
|
7546
7550
|
}
|
|
7547
7551
|
async showModal(content) {
|
|
7548
7552
|
this.clearContent(this._rightModal);
|
|
@@ -7559,6 +7563,8 @@ const SnkApplication = class {
|
|
|
7559
7563
|
async closePopUp() {
|
|
7560
7564
|
this.clearContent(this._popUp);
|
|
7561
7565
|
this._popUp.opened = false;
|
|
7566
|
+
this._popUp.useHeader = true;
|
|
7567
|
+
this._popUp.heightMode = "full";
|
|
7562
7568
|
}
|
|
7563
7569
|
/**
|
|
7564
7570
|
* Verifica se a licença do cliente tem determinado opcional (produto)
|
|
@@ -7945,7 +7951,7 @@ const SnkApplication = class {
|
|
|
7945
7951
|
});
|
|
7946
7952
|
}
|
|
7947
7953
|
render() {
|
|
7948
|
-
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 })));
|
|
7954
|
+
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, closeEsc: true })));
|
|
7949
7955
|
}
|
|
7950
7956
|
};
|
|
7951
7957
|
class RequestListenerLoadingBar {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-81dda3cf.js';
|
|
2
2
|
import { Action, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
-
import { O as OperationMap } from './SnkMessageBuilder-
|
|
4
|
+
import { O as OperationMap } from './SnkMessageBuilder-d440381c.js';
|
|
5
5
|
|
|
6
6
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
7
7
|
|