@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-2b4d2d14.js';
|
|
2
|
-
import { F as FloatingManager } from './index-
|
|
3
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
2
|
+
import { F as FloatingManager } from './index-c683b2b0.js';
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
|
|
5
5
|
const SnkFilterItem = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -22,16 +22,20 @@ const SnkFilterItem = class {
|
|
|
22
22
|
} while ((current = current.offsetParent) != null);
|
|
23
23
|
}
|
|
24
24
|
this.detailIsVisible = false;
|
|
25
|
+
this.executeCloseCallback();
|
|
25
26
|
return false;
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
async showUp(open = false) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
return new Promise(resolve => {
|
|
31
|
+
this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
|
|
32
|
+
if (open) {
|
|
33
|
+
window.requestAnimationFrame(() => {
|
|
34
|
+
this._closeCallback = resolve;
|
|
35
|
+
this.showDetail();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
35
39
|
}
|
|
36
40
|
showDetail() {
|
|
37
41
|
this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: this.getScrollOffset() });
|
|
@@ -46,6 +50,13 @@ const SnkFilterItem = class {
|
|
|
46
50
|
}
|
|
47
51
|
this._floatingID = undefined;
|
|
48
52
|
this.detailIsVisible = false;
|
|
53
|
+
this.executeCloseCallback();
|
|
54
|
+
}
|
|
55
|
+
executeCloseCallback() {
|
|
56
|
+
if (this._closeCallback) {
|
|
57
|
+
this._closeCallback();
|
|
58
|
+
this._closeCallback = undefined;
|
|
59
|
+
}
|
|
49
60
|
}
|
|
50
61
|
//---------------------------------------------
|
|
51
62
|
// Event handlers
|
|
@@ -120,6 +131,9 @@ const SnkFilterItem = class {
|
|
|
120
131
|
if (type === FilterItemType.SEARCH) {
|
|
121
132
|
return `${label}: ${value.value} - ${value.label}`;
|
|
122
133
|
}
|
|
134
|
+
if (type === FilterItemType.PERSONALIZED) {
|
|
135
|
+
return label;
|
|
136
|
+
}
|
|
123
137
|
return `${label}: ${value}`;
|
|
124
138
|
}
|
|
125
139
|
return label;
|
|
@@ -134,15 +148,24 @@ const SnkFilterItem = class {
|
|
|
134
148
|
filterChangeListener() {
|
|
135
149
|
this.hideDetail();
|
|
136
150
|
}
|
|
137
|
-
|
|
151
|
+
getRightIconName() {
|
|
138
152
|
if (this.config.value != undefined) {
|
|
139
153
|
return "close";
|
|
140
154
|
}
|
|
141
155
|
return this.detailIsVisible ? "chevron-up" : "chevron-down";
|
|
142
156
|
}
|
|
157
|
+
getLeftIconName() {
|
|
158
|
+
switch (this.config.type) {
|
|
159
|
+
case FilterItemType.PERIOD:
|
|
160
|
+
return "calendar";
|
|
161
|
+
case FilterItemType.PERSONALIZED:
|
|
162
|
+
return "tune";
|
|
163
|
+
}
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
143
166
|
render() {
|
|
144
|
-
const leftIcon = this.
|
|
145
|
-
return (h(Host, null, h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.
|
|
167
|
+
const leftIcon = this.getLeftIconName();
|
|
168
|
+
return (h(Host, null, h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem, key: this.config.id }))));
|
|
146
169
|
}
|
|
147
170
|
get _filterItemElement() { return getElement(this); }
|
|
148
171
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-2b4d2d14.js';
|
|
2
|
-
import { F as FloatingManager,
|
|
2
|
+
import { F as FloatingManager, h as ArrayUtils } from './index-c683b2b0.js';
|
|
3
3
|
|
|
4
4
|
const SHOW_MORE_ITEM_NAME = "__SHOWMORE__";
|
|
5
5
|
const MAX_FILTERS = 5;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
+
import { a as ModalButtonStatus } from './index-c71285cb.js';
|
|
3
|
+
import { h as ArrayUtils } from './index-c683b2b0.js';
|
|
4
|
+
|
|
5
|
+
const SnkFilterModal = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
updateValue(id, value) {
|
|
10
|
+
this.items = this.items.map(item => {
|
|
11
|
+
if (item.id === id) {
|
|
12
|
+
return Object.assign(Object.assign({}, item), { active: value });
|
|
13
|
+
}
|
|
14
|
+
return item;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
getActiveFiltersMsg() {
|
|
18
|
+
const activeFilters = this.items.filter(item => item.active).length;
|
|
19
|
+
if (activeFilters === 0) {
|
|
20
|
+
return this.getMessage("snkFilterBar.noActiveFilters");
|
|
21
|
+
}
|
|
22
|
+
return this.getMessage(activeFilters > 1 ? "snkFilterBar.activeFilters" : "snkFilterBar.activeFilter", { ACTIVE_FILTERS: activeFilters });
|
|
23
|
+
}
|
|
24
|
+
getFilteredItems() {
|
|
25
|
+
return this.items ? ArrayUtils.applyStringFilter(this._filterArgument, this.items) : [];
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const allowCancel = this.items.filter(item => item.active).length > 0;
|
|
29
|
+
return (h("ez-modal-container", { modalTitle: this.modalTitle, modalSubTitle: this.modalSubTitle, cancelButtonLabel: this.cancelButtonLabel, okButtonLabel: this.okButtonLabel, onEzModalAction: evt => this.processModalAction(evt.detail), cancelButtonStatus: allowCancel ? ModalButtonStatus.ENABLED : ModalButtonStatus.DISABLED }, h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-content" }, h("div", null, this.useSearch ? h("ez-filter-input", { label: this.getMessage("snkFilterBar.modalFindFilter"), onEzChange: (evt) => this._filterArgument = evt.detail }) : undefined), this.getFilteredItems().length > 0 ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding-bottom--small" }, this.getActiveFiltersMsg()) : undefined, h("div", null, this.getFilteredItems().map(item => h("div", { class: "ez-padding--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item ez-align--middle ez-margin-bottom--small" }, h("ez-check", { 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)))), h("div", { class: "ez-text ez-text--large ez-align--middle ez-text--secondary ez-text--center ez-padding-bottom--large" }, this.infoText))));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { SnkFilterModal as snk_filter_modal };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
2
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
3
3
|
|
|
4
4
|
const SnkFilterMultiSelect = class {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
2
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
3
3
|
|
|
4
4
|
const SnkFilterPeriod = class {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
2
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
3
3
|
|
|
4
4
|
const SnkFilterPeriod = class {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { r as registerInstance, h, f as Host } from './index-2b4d2d14.js';
|
|
2
|
+
import { U as UserInterface, c as convertType, A as ApplicationContext } from './index-c683b2b0.js';
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
|
+
|
|
5
|
+
const SnkFilterPersonalized = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
getValue(param, index) {
|
|
10
|
+
if (this.value && index >= 0 && index < this.value.length) {
|
|
11
|
+
const rawValue = this.value[index];
|
|
12
|
+
if (param.type === UserInterface.SEARCH) {
|
|
13
|
+
return rawValue;
|
|
14
|
+
}
|
|
15
|
+
return convertType(param.dataType, rawValue);
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
setValue(index, value) {
|
|
20
|
+
if (this.value == undefined) {
|
|
21
|
+
this.value = Array(index).fill(null);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
this.value = [...this.value];
|
|
25
|
+
}
|
|
26
|
+
this.value[index] = value;
|
|
27
|
+
if (this.value.filter(item => item != undefined).length == 0) {
|
|
28
|
+
this.value = null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
doSearch(mode, argument, param) {
|
|
32
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
33
|
+
if (this.fix) {
|
|
34
|
+
this.fix();
|
|
35
|
+
}
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
application.executePreparedSearch(mode, argument, param.searchContext)
|
|
38
|
+
.then(result => {
|
|
39
|
+
resolve(result);
|
|
40
|
+
if (this.unfix) {
|
|
41
|
+
this.unfix();
|
|
42
|
+
}
|
|
43
|
+
}).catch(reason => {
|
|
44
|
+
reject(reason);
|
|
45
|
+
if (this.unfix) {
|
|
46
|
+
this.unfix();
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getParamsInterface() {
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
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;
|
|
54
|
+
return params.map((param, index) => {
|
|
55
|
+
var _a;
|
|
56
|
+
switch (param.type) {
|
|
57
|
+
case UserInterface.SEARCH:
|
|
58
|
+
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) });
|
|
59
|
+
case UserInterface.SWITCH:
|
|
60
|
+
case UserInterface.CHECKBOX:
|
|
61
|
+
const mode = UserInterface.SWITCH === param.type ? "switch" : "regular";
|
|
62
|
+
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) });
|
|
63
|
+
case UserInterface.DECIMALNUMBER:
|
|
64
|
+
case UserInterface.INTEGERNUMBER:
|
|
65
|
+
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) });
|
|
66
|
+
case UserInterface.OPTIONSELECTOR:
|
|
67
|
+
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); } });
|
|
68
|
+
case UserInterface.DATE:
|
|
69
|
+
return h("ez-date-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
70
|
+
case UserInterface.DATETIME:
|
|
71
|
+
return h("ez-date-time-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
72
|
+
default:
|
|
73
|
+
return h("ez-text-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
render() {
|
|
78
|
+
if (!this.config || this.config.type !== FilterItemType.PERSONALIZED) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
return (h(Host, null, this.getParamsInterface()));
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export { SnkFilterPersonalized as snk_filter_personalized };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { A as ApplicationContext } from './index-
|
|
3
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
2
|
+
import { A as ApplicationContext } from './index-c683b2b0.js';
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
|
|
5
5
|
const SnkFilterSearch = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -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
|
import { T as TaskbarProcessor } from './taskbar-processor-aa6772c9.js';
|
|
4
4
|
|
|
5
5
|
const snkFormCss = ".sc-snk-form-h{display:block}.snk-form.sc-snk-form{position:relative;padding:var(--space--large);padding-top:var(--space--medium)}.snk-form__header.sc-snk-form{position:relative;padding-top:var(--space--medium);padding-bottom:var(--space--medium);margin-bottom:var(--space--medium)}.snk-form__header--fixed.sc-snk-form{position:sticky;top:0;background:var(--background--body);z-index:var(--more-visible, 2);padding-left:var(--space--large);padding-right:var(--space--large);margin-left:calc(var(--space--large) * -1);margin-right:calc(var(--space--large) * -1);width:calc(100% + (var(--space--large) * 2))}";
|
|
@@ -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
|
import { T as TaskbarElement } from './taskbar-elements-35d64ff9.js';
|
|
4
4
|
import { T as TaskbarProcessor } from './taskbar-processor-aa6772c9.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, f as Host } from './index-2b4d2d14.js';
|
|
2
|
-
import { O as ObjectUtils, S as StringUtils } from './index-
|
|
2
|
+
import { O as ObjectUtils, S as StringUtils } from './index-c683b2b0.js';
|
|
3
3
|
|
|
4
4
|
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__content-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--snk-pesquisa__content-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--snk-pesquisa__content-scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__content-scrollbar--width:var(--space--medium, 12px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);max-height:100%;height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__content-scrollbar--background-color-primary) var(--snk-pesquisa__content-scrollbar--background-color-secondary);padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__content-scrollbar--background-color-secondary);border-radius:var(--snk-pesquisa__content-scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__content-scrollbar--background-color-primary);border-radius:var(--snk-pesquisa__content-scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__content-scrollbar--background-color-secondary);width:var(--snk-pesquisa__content-scrollbar--width);max-width:var(--snk-pesquisa__content-scrollbar--width);min-width:var(--snk-pesquisa__content-scrollbar--width)}.snk-pesquisa__records.sc-snk-pesquisa{font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);color:var(--snk-pesquisa__records--color);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host } from './index-2b4d2d14.js';
|
|
2
|
-
import { A as ApplicationContext } from './index-
|
|
2
|
+
import { A as ApplicationContext } from './index-c683b2b0.js';
|
|
3
3
|
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-35d64ff9.js';
|
|
4
4
|
|
|
5
5
|
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { D as DataUnit, b as DataType, U as UserInterface } from './index-
|
|
2
|
+
import { D as DataUnit, b as DataType, U as UserInterface } from './index-c683b2b0.js';
|
|
3
3
|
|
|
4
4
|
const testePesquisaCss = ":host{display:block}";
|
|
5
5
|
|
package/dist/{esm/SnkMessageBuilder-a7da466b.js → sankhyablocks/SnkMessageBuilder-35a20271.js}
RENAMED
|
@@ -1,119 +1,3 @@
|
|
|
1
|
-
var DialogType;
|
|
2
|
-
(function (DialogType) {
|
|
3
|
-
DialogType["WARN"] = "warn";
|
|
4
|
-
DialogType["CRITICAL"] = "critical";
|
|
5
|
-
DialogType["DEFAULT"] = "default";
|
|
6
|
-
})(DialogType || (DialogType = {}));
|
|
7
|
-
|
|
8
|
-
class ApplicationUtils {
|
|
9
|
-
static async showDialog(title, message, icon = null, confirm, dialogType = DialogType.DEFAULT, options) {
|
|
10
|
-
if (options) {
|
|
11
|
-
options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
|
|
12
|
-
}
|
|
13
|
-
return new Promise(resolve => {
|
|
14
|
-
let dialog = document.querySelector("ez-dialog");
|
|
15
|
-
if (!dialog) {
|
|
16
|
-
dialog = document.createElement("ez-dialog");
|
|
17
|
-
window.document.body.appendChild(dialog);
|
|
18
|
-
}
|
|
19
|
-
dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger).then(ok => resolve(ok));
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
23
|
-
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.WARN, options);
|
|
24
|
-
}
|
|
25
|
-
static async error(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
26
|
-
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.CRITICAL, options);
|
|
27
|
-
}
|
|
28
|
-
static async confirm(title, message, icon = null, dialogType = DialogType.WARN, options = ApplicationUtils.defaultMessageOptions) {
|
|
29
|
-
return ApplicationUtils.showDialog(title, message, icon, true, dialogType, options);
|
|
30
|
-
}
|
|
31
|
-
static async message(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
32
|
-
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.DEFAULT, options);
|
|
33
|
-
}
|
|
34
|
-
static async info(message, options = ApplicationUtils.defaultMessageOptions) {
|
|
35
|
-
let toast = document.querySelector("ez-toast");
|
|
36
|
-
if (!toast) {
|
|
37
|
-
toast = document.createElement("ez-toast");
|
|
38
|
-
const icon = document.createElement("ez-icon");
|
|
39
|
-
icon.className = "ez-margin-right--small toast__icon--color";
|
|
40
|
-
icon.slot = "icon";
|
|
41
|
-
toast.appendChild(icon);
|
|
42
|
-
window.document.body.appendChild(toast);
|
|
43
|
-
}
|
|
44
|
-
if (options.iconName) {
|
|
45
|
-
const iconElem = toast.querySelector("ez-icon");
|
|
46
|
-
if (iconElem) {
|
|
47
|
-
iconElem.iconName = options.iconName;
|
|
48
|
-
toast.useIcon = true;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
toast.useIcon = false;
|
|
53
|
-
}
|
|
54
|
-
toast.show(message, 5000, false, options.canClose);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
ApplicationUtils.defaultMessageOptions = {
|
|
58
|
-
canClose: true,
|
|
59
|
-
labelCancel: 'Não',
|
|
60
|
-
labelConfirm: 'Sim',
|
|
61
|
-
btnConfirmDanger: false
|
|
62
|
-
};
|
|
63
|
-
;
|
|
64
|
-
|
|
65
|
-
class CSSVarsUtils {
|
|
66
|
-
static applyVarsTextInput(host, child) {
|
|
67
|
-
if (child) {
|
|
68
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
|
|
69
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--border-color');
|
|
70
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
|
|
71
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--background-color');
|
|
72
|
-
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--color');
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
static applyVarsButton(host, child) {
|
|
76
|
-
if (child) {
|
|
77
|
-
["--ez-button--min-width",
|
|
78
|
-
"--ez-button--height",
|
|
79
|
-
"--ez-button__icon--width",
|
|
80
|
-
"--ez-button__inline__icon--padding",
|
|
81
|
-
"--ez-button--padding-top",
|
|
82
|
-
"--ez-button--padding-bottom",
|
|
83
|
-
"--ez-button--padding-right",
|
|
84
|
-
"--ez-button--padding-left",
|
|
85
|
-
"--ez-button--color",
|
|
86
|
-
"--ez-button--font-size",
|
|
87
|
-
"--ez-button--font-family",
|
|
88
|
-
"--ez-button--font-weight",
|
|
89
|
-
"--ez-button--background-color",
|
|
90
|
-
"--ez-button--border-radius",
|
|
91
|
-
"--ez-button--border",
|
|
92
|
-
"--ez-button--hover-color",
|
|
93
|
-
"--ez-button--hover--background-color",
|
|
94
|
-
"--ez-button--disabled-color",
|
|
95
|
-
"--ez-button--disabled--background-color",
|
|
96
|
-
"--ez-button--focus--border",
|
|
97
|
-
"--ez-button--focus--box-shadow",
|
|
98
|
-
"--ez-button--active-color",
|
|
99
|
-
"--ez-button--active--background-color",
|
|
100
|
-
"--ez-button--link-color",
|
|
101
|
-
"--ez-button--link--hover-color",
|
|
102
|
-
"--ez-button--link--small--font-size",
|
|
103
|
-
"--ez-button--link--medium--font-size",
|
|
104
|
-
"--ez-button--link--large--font-size",].forEach(prop => {
|
|
105
|
-
CSSVarsUtils.applyIfExists(host, child, prop);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
static applyIfExists(host, element, varName) {
|
|
110
|
-
const prop = getComputedStyle(host).getPropertyValue(varName);
|
|
111
|
-
if (prop) {
|
|
112
|
-
element.style.setProperty(varName, prop);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
1
|
const snkDataUnitMessages = {
|
|
118
2
|
saveInfo: {
|
|
119
3
|
clone: "Duplicação realizada!",
|
|
@@ -146,13 +30,25 @@ const snkFilterBarMessages = {
|
|
|
146
30
|
"applyFilter": "Aplicar",
|
|
147
31
|
"findFilter": "Buscar filtros...",
|
|
148
32
|
"findField": "Buscar filtros...",
|
|
33
|
+
"modalFindFilter": "Buscar filtro",
|
|
149
34
|
"emptyFiltersList": "Não há filtros disponíveis",
|
|
150
35
|
"emptyAppliedFiltersList": "Não há filtros aplicados",
|
|
151
36
|
"customFilter": "Filtro personalizado",
|
|
152
|
-
"defaultFilter": "Filtro
|
|
37
|
+
"defaultFilter": "Filtro padrão",
|
|
153
38
|
"failToLoadConfig": "Falha ao buscar configuração de filtros",
|
|
154
39
|
"clearAllFilters": "Limpar todos os filtros",
|
|
155
|
-
"successfullyCleaned": "Filtro limpo com sucesso!"
|
|
40
|
+
"successfullyCleaned": "Filtro limpo com sucesso!",
|
|
41
|
+
"activeFilter": "{{ACTIVE_FILTERS}} filtro aplicado",
|
|
42
|
+
"activeFilters": "{{ACTIVE_FILTERS}} filtros aplicados",
|
|
43
|
+
"noActiveFilters": "Nenhum filtro aplicado",
|
|
44
|
+
"modalDefaultFilterTitle": "Filtro padrão",
|
|
45
|
+
"modalInfoTextEditDefault": "Use o layout antigo para editar o seu filtro padrão, em breve traremos uma nova experiência.",
|
|
46
|
+
"modalInfoTextCreateDefault": "Use o layout antigo para criar o seu filtro padrão, em breve traremos uma nova experiência.",
|
|
47
|
+
"modalPersonalizedFilterTitle": "Filtro personalizado",
|
|
48
|
+
"modalPersonalizedFilterSubTitle": "Gerencie seus filtros",
|
|
49
|
+
"modalInfoTextCreateEditPersonalized": "Use o layout antigo para criar ou editar filtros, em breve traremos uma nova experiência",
|
|
50
|
+
"modalOkButtonLabel": "Aplicar",
|
|
51
|
+
"modalCancelButtonLabel": "Limpar"
|
|
156
52
|
};
|
|
157
53
|
|
|
158
54
|
const snkFormMessages = {
|
|
@@ -300,4 +196,4 @@ var OperationMap;
|
|
|
300
196
|
OperationMap["CLEAN"] = "clean";
|
|
301
197
|
})(OperationMap || (OperationMap = {}));
|
|
302
198
|
|
|
303
|
-
export {
|
|
199
|
+
export { OperationMap as O, SnkMessageBuilder as S };
|
package/dist/sankhyablocks/{filter-item-type.enum-61fbf80a.js → filter-item-type.enum-a79b2fa8.js}
RENAMED
|
@@ -6,6 +6,8 @@ var FilterItemType;
|
|
|
6
6
|
FilterItemType["SEARCH"] = "SEARCH";
|
|
7
7
|
FilterItemType["TEXT"] = "TEXT";
|
|
8
8
|
FilterItemType["NUMBER"] = "NUMBER";
|
|
9
|
+
FilterItemType["DEFAULT_FILTER"] = "DEFAULT_FILTER";
|
|
10
|
+
FilterItemType["PERSONALIZED"] = "PERSONALIZED";
|
|
9
11
|
})(FilterItemType || (FilterItemType = {}));
|
|
10
12
|
const FilterItemType$1 = FilterItemType;
|
|
11
13
|
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
var DialogType;
|
|
2
|
+
(function (DialogType) {
|
|
3
|
+
DialogType["WARN"] = "warn";
|
|
4
|
+
DialogType["CRITICAL"] = "critical";
|
|
5
|
+
DialogType["SUCCESS"] = "success";
|
|
6
|
+
DialogType["DEFAULT"] = "default";
|
|
7
|
+
})(DialogType || (DialogType = {}));
|
|
8
|
+
|
|
9
|
+
class ApplicationUtils {
|
|
10
|
+
static async showDialog(title, message, icon = null, confirm, dialogType = DialogType.DEFAULT, options) {
|
|
11
|
+
if (options) {
|
|
12
|
+
options = Object.assign(Object.assign({}, ApplicationUtils.defaultMessageOptions), options);
|
|
13
|
+
}
|
|
14
|
+
return new Promise(resolve => {
|
|
15
|
+
let dialog = document.querySelector("ez-dialog");
|
|
16
|
+
if (!dialog) {
|
|
17
|
+
dialog = document.createElement("ez-dialog");
|
|
18
|
+
window.document.body.appendChild(dialog);
|
|
19
|
+
}
|
|
20
|
+
dialog.show(title, message, dialogType, confirm, icon, options.labelCancel, options.labelConfirm, options.btnConfirmDanger).then(ok => resolve(ok));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
static async alert(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
24
|
+
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.WARN, options);
|
|
25
|
+
}
|
|
26
|
+
static async error(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
27
|
+
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.CRITICAL, options);
|
|
28
|
+
}
|
|
29
|
+
static async success(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
30
|
+
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.SUCCESS, options);
|
|
31
|
+
}
|
|
32
|
+
static async confirm(title, message, icon = null, dialogType = DialogType.WARN, options = ApplicationUtils.defaultMessageOptions) {
|
|
33
|
+
return ApplicationUtils.showDialog(title, message, icon, true, dialogType, options);
|
|
34
|
+
}
|
|
35
|
+
static async message(title, message, icon = null, options = ApplicationUtils.defaultMessageOptions) {
|
|
36
|
+
return ApplicationUtils.showDialog(title, message, icon, false, DialogType.DEFAULT, options);
|
|
37
|
+
}
|
|
38
|
+
static async info(message, options = ApplicationUtils.defaultMessageOptions) {
|
|
39
|
+
let toast = document.querySelector("ez-toast");
|
|
40
|
+
if (!toast) {
|
|
41
|
+
toast = document.createElement("ez-toast");
|
|
42
|
+
const icon = document.createElement("ez-icon");
|
|
43
|
+
icon.className = "ez-margin-right--small";
|
|
44
|
+
icon.slot = "icon";
|
|
45
|
+
icon.style.setProperty('--ez-icon--color', 'var(--color--success)');
|
|
46
|
+
toast.appendChild(icon);
|
|
47
|
+
window.document.body.appendChild(toast);
|
|
48
|
+
}
|
|
49
|
+
if (options.iconName) {
|
|
50
|
+
const iconElem = toast.querySelector("ez-icon");
|
|
51
|
+
if (iconElem) {
|
|
52
|
+
iconElem.iconName = options.iconName;
|
|
53
|
+
toast.useIcon = true;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
toast.useIcon = false;
|
|
58
|
+
}
|
|
59
|
+
toast.show(message, 5000, false, options.canClose);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
ApplicationUtils.defaultMessageOptions = {
|
|
63
|
+
canClose: true,
|
|
64
|
+
labelCancel: 'Não',
|
|
65
|
+
labelConfirm: 'Sim',
|
|
66
|
+
btnConfirmDanger: false
|
|
67
|
+
};
|
|
68
|
+
;
|
|
69
|
+
|
|
70
|
+
class CSSVarsUtils {
|
|
71
|
+
static applyCSSVars(document, host, child) {
|
|
72
|
+
const isSameDomain = (styleSheet) => {
|
|
73
|
+
if (!styleSheet.href) {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
return styleSheet.href.indexOf(window.location.origin) === 0;
|
|
77
|
+
};
|
|
78
|
+
Array.from(document.styleSheets).filter(isSameDomain).forEach((sheet) => {
|
|
79
|
+
Array.from(sheet.cssRules).filter(rule => rule instanceof CSSStyleRule).forEach((rule) => {
|
|
80
|
+
Array.from(rule.style).forEach((propName) => {
|
|
81
|
+
if (propName.startsWith("--")) {
|
|
82
|
+
CSSVarsUtils.applyIfExists(host, child, propName);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
static applyVarsTextInput(host, child) {
|
|
89
|
+
if (child) {
|
|
90
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--background-color');
|
|
91
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--border-color');
|
|
92
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
|
|
93
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--background-color');
|
|
94
|
+
CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--color');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
static applyVarsButton(host, child) {
|
|
98
|
+
if (child) {
|
|
99
|
+
["--ez-button--min-width",
|
|
100
|
+
"--ez-button--height",
|
|
101
|
+
"--ez-button__icon--width",
|
|
102
|
+
"--ez-button__inline__icon--padding",
|
|
103
|
+
"--ez-button--padding-top",
|
|
104
|
+
"--ez-button--padding-bottom",
|
|
105
|
+
"--ez-button--padding-right",
|
|
106
|
+
"--ez-button--padding-left",
|
|
107
|
+
"--ez-button--color",
|
|
108
|
+
"--ez-button--font-size",
|
|
109
|
+
"--ez-button--font-family",
|
|
110
|
+
"--ez-button--font-weight",
|
|
111
|
+
"--ez-button--background-color",
|
|
112
|
+
"--ez-button--border-radius",
|
|
113
|
+
"--ez-button--border",
|
|
114
|
+
"--ez-button--hover-color",
|
|
115
|
+
"--ez-button--hover--background-color",
|
|
116
|
+
"--ez-button--disabled-color",
|
|
117
|
+
"--ez-button--disabled--background-color",
|
|
118
|
+
"--ez-button--focus--border",
|
|
119
|
+
"--ez-button--focus--box-shadow",
|
|
120
|
+
"--ez-button--active-color",
|
|
121
|
+
"--ez-button--active--background-color",
|
|
122
|
+
"--ez-button--link-color",
|
|
123
|
+
"--ez-button--link--hover-color",
|
|
124
|
+
"--ez-button--link--small--font-size",
|
|
125
|
+
"--ez-button--link--medium--font-size",
|
|
126
|
+
"--ez-button--link--large--font-size",].forEach(prop => {
|
|
127
|
+
CSSVarsUtils.applyIfExists(host, child, prop);
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
static applyIfExists(host, element, varName) {
|
|
132
|
+
const prop = getComputedStyle(host).getPropertyValue(varName);
|
|
133
|
+
if (prop) {
|
|
134
|
+
element.style.setProperty(varName, prop);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export { ApplicationUtils as A, DialogType as D };
|
|
@@ -268,6 +268,16 @@ NumberUtils.changeFormat = (value) => {
|
|
|
268
268
|
//Formatting output following formatnumber
|
|
269
269
|
return value.replace(/\./g, '_').replace(/\,/g, '.').replace(/\_/g, ',');
|
|
270
270
|
};
|
|
271
|
+
/**
|
|
272
|
+
* @getValueOrZero: valida se o parametro é undefined caso seja retorna zero.
|
|
273
|
+
*
|
|
274
|
+
* @param value numero a ser validado
|
|
275
|
+
*
|
|
276
|
+
* @returns o proprio numero passado ou zero
|
|
277
|
+
*/
|
|
278
|
+
NumberUtils.getValueOrZero = (value) => {
|
|
279
|
+
return value !== undefined ? value : 0;
|
|
280
|
+
};
|
|
271
281
|
|
|
272
282
|
/**
|
|
273
283
|
* `MaskFormatter` é usado para formatar strings. Seu comportamento
|
|
@@ -2381,4 +2391,4 @@ class ErrorTracking {
|
|
|
2381
2391
|
}
|
|
2382
2392
|
}
|
|
2383
2393
|
|
|
2384
|
-
export { ApplicationContext as A, ChangeOperation as C, DataUnit as D, ErrorException as E, FloatingManager as F, ObjectUtils as O, StringUtils as S, UserInterface as U, WarningException as W, Action as a, DataType as b,
|
|
2394
|
+
export { ApplicationContext as A, ChangeOperation as C, DataUnit as D, ErrorException as E, FloatingManager as F, ObjectUtils as O, StringUtils as S, UserInterface as U, WarningException as W, Action as a, DataType as b, convertType as c, DateUtils as d, WaitingChangeException as e, DependencyType as f, ErrorTracking as g, ArrayUtils as h, toString as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var ModalAction;
|
|
2
|
+
(function (ModalAction) {
|
|
3
|
+
ModalAction["CLOSE"] = "CLOSE";
|
|
4
|
+
ModalAction["OK"] = "OK";
|
|
5
|
+
ModalAction["CANCEL"] = "CANCEL";
|
|
6
|
+
})(ModalAction || (ModalAction = {}));
|
|
7
|
+
const ModalAction$1 = ModalAction;
|
|
8
|
+
|
|
9
|
+
var ModalButtonStatus;
|
|
10
|
+
(function (ModalButtonStatus) {
|
|
11
|
+
ModalButtonStatus["ENABLED"] = "ENABLED";
|
|
12
|
+
ModalButtonStatus["DISABLED"] = "DISABLED";
|
|
13
|
+
ModalButtonStatus["HIDDEN"] = "HIDDEN";
|
|
14
|
+
})(ModalButtonStatus || (ModalButtonStatus = {}));
|
|
15
|
+
const ModalButtonStatus$1 = ModalButtonStatus;
|
|
16
|
+
|
|
17
|
+
export { ModalAction$1 as M, ModalButtonStatus$1 as a };
|