@sankhyalabs/sankhyablocks 1.3.31-beta.16 → 1.3.31-beta.17
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-79cf15c5.js → SnkMessageBuilder-cb132e6d.js} +133 -1
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/css-shim-b8158822.js +6 -0
- package/dist/cjs/dom-36862b77.js +75 -0
- package/dist/cjs/filter-item-type.enum-e2e1bc5b.js +14 -0
- package/dist/cjs/index-02201bc9.js +2397 -0
- package/dist/cjs/{index-5575fe3d.js → index-b0b676c5.js} +1598 -145
- package/dist/cjs/loader.cjs.js +18 -2
- package/dist/cjs/sankhyablocks.cjs.js +116 -4
- package/dist/cjs/shadow-css-346c0795.js +389 -0
- package/dist/cjs/snk-application.cjs.entry.js +542 -66
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +23 -24
- package/dist/cjs/snk-filter-bar.cjs.entry.js +199 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +47 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +44 -0
- package/dist/cjs/snk-filter-item.cjs.entry.js +131 -0
- package/dist/cjs/snk-filter-list.cjs.entry.js +91 -0
- package/dist/cjs/snk-filter-number.cjs.entry.js +23 -0
- package/dist/cjs/snk-filter-period.cjs.entry.js +26 -0
- package/dist/cjs/snk-filter-search.cjs.entry.js +44 -0
- package/dist/cjs/snk-filter-text.cjs.entry.js +22 -0
- package/dist/cjs/{snk-form_2.cjs.entry.js → snk-form.cjs.entry.js} +3 -65
- package/dist/cjs/snk-grid.cjs.entry.js +69 -0
- package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
- package/dist/cjs/snk-taskbar.cjs.entry.js +5 -4
- package/dist/cjs/{taskbar-elements-2ae0d005.js → taskbar-elements-efa44ff1.js} +1 -1
- package/dist/cjs/teste-pesquisa.cjs.entry.js +5 -5
- package/dist/collection/collection-manifest.json +9 -0
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +89 -17
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +88 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +64 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +69 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +118 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +63 -0
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +10 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +113 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +209 -0
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +182 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +99 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +257 -0
- package/dist/collection/components/snk-grid/snk-grid.css +14 -1
- package/dist/collection/components/snk-grid/snk-grid.js +1 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +24 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +268 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +14 -0
- package/dist/components/SnkMessageBuilder.js +133 -2
- package/dist/components/filter-item-type.enum.js +12 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +13 -0
- package/dist/components/index2.js +2384 -0
- package/dist/components/snk-application2.js +508 -30
- package/dist/components/snk-crud.js +25 -1
- package/dist/components/snk-data-unit.js +2 -3
- package/dist/components/snk-filter-bar.d.ts +11 -0
- package/dist/components/snk-filter-bar.js +6 -0
- package/dist/components/snk-filter-bar2.js +230 -0
- package/dist/components/snk-filter-binary-select.d.ts +11 -0
- package/dist/components/snk-filter-binary-select.js +63 -0
- package/dist/components/snk-filter-detail.d.ts +11 -0
- package/dist/components/snk-filter-detail.js +6 -0
- package/dist/components/snk-filter-detail2.js +58 -0
- package/dist/components/snk-filter-item.d.ts +11 -0
- package/dist/components/snk-filter-item.js +6 -0
- package/dist/components/snk-filter-item2.js +151 -0
- package/dist/components/snk-filter-list.d.ts +11 -0
- package/dist/components/snk-filter-list.js +6 -0
- package/dist/components/snk-filter-list2.js +108 -0
- package/dist/components/snk-filter-number.d.ts +11 -0
- package/dist/components/snk-filter-number.js +39 -0
- package/dist/components/snk-filter-period.d.ts +11 -0
- package/dist/components/snk-filter-period.js +42 -0
- package/dist/components/snk-filter-search.d.ts +11 -0
- package/dist/components/snk-filter-search.js +62 -0
- package/dist/components/snk-filter-text.d.ts +11 -0
- package/dist/components/snk-filter-text.js +38 -0
- package/dist/components/snk-form2.js +1 -1
- package/dist/components/snk-grid2.js +28 -4
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-taskbar2.js +2 -1
- package/dist/components/teste-pesquisa.js +1 -1
- package/dist/esm/{SnkMessageBuilder-3cdde541.js → SnkMessageBuilder-cff80920.js} +133 -2
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/css-shim-b3f2ee8d.js +4 -0
- package/dist/esm/dom-665d6011.js +73 -0
- package/dist/esm/filter-item-type.enum-61fbf80a.js +12 -0
- package/dist/esm/index-2b4d2d14.js +3262 -0
- package/dist/esm/index-e5b61043.js +2384 -0
- package/dist/esm/loader.js +18 -2
- package/dist/esm/sankhyablocks.js +116 -4
- package/dist/esm/shadow-css-b18e99d7.js +387 -0
- package/dist/esm/snk-application.entry.js +507 -31
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-unit.entry.js +3 -4
- package/dist/esm/snk-filter-bar.entry.js +195 -0
- package/dist/esm/snk-filter-binary-select.entry.js +43 -0
- package/dist/esm/snk-filter-detail.entry.js +40 -0
- package/dist/esm/snk-filter-item.entry.js +127 -0
- package/dist/esm/snk-filter-list.entry.js +87 -0
- package/dist/esm/snk-filter-number.entry.js +19 -0
- package/dist/esm/snk-filter-period.entry.js +22 -0
- package/dist/esm/snk-filter-search.entry.js +40 -0
- package/dist/esm/snk-filter-text.entry.js +18 -0
- package/dist/esm/{snk-form_2.entry.js → snk-form.entry.js} +3 -64
- package/dist/esm/snk-grid.entry.js +65 -0
- package/dist/esm/snk-pesquisa.entry.js +2 -2
- package/dist/esm/snk-taskbar.entry.js +4 -3
- package/dist/esm/{taskbar-elements-bcccc0ff.js → taskbar-elements-c119510a.js} +1 -1
- package/dist/esm/teste-pesquisa.entry.js +2 -2
- package/dist/sankhyablocks/SnkMessageBuilder-cff80920.js +299 -0
- package/dist/sankhyablocks/app-globals-0f993ce5.js +3 -0
- package/dist/sankhyablocks/css-shim-b3f2ee8d.js +4 -0
- package/dist/sankhyablocks/dom-665d6011.js +73 -0
- package/dist/sankhyablocks/filter-item-type.enum-61fbf80a.js +12 -0
- package/dist/sankhyablocks/index-2b4d2d14.js +3262 -0
- package/dist/sankhyablocks/index-e5b61043.js +2384 -0
- package/dist/sankhyablocks/index.esm.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +129 -1
- package/dist/sankhyablocks/shadow-css-b18e99d7.js +387 -0
- package/dist/sankhyablocks/snk-application.entry.js +8306 -0
- package/dist/sankhyablocks/snk-crud.entry.js +60 -0
- package/dist/sankhyablocks/snk-data-unit.entry.js +272 -0
- package/dist/sankhyablocks/snk-filter-bar.entry.js +195 -0
- package/dist/sankhyablocks/snk-filter-binary-select.entry.js +43 -0
- package/dist/sankhyablocks/snk-filter-detail.entry.js +40 -0
- package/dist/sankhyablocks/snk-filter-item.entry.js +127 -0
- package/dist/sankhyablocks/snk-filter-list.entry.js +87 -0
- package/dist/sankhyablocks/snk-filter-number.entry.js +19 -0
- package/dist/sankhyablocks/snk-filter-period.entry.js +22 -0
- package/dist/sankhyablocks/snk-filter-search.entry.js +40 -0
- package/dist/sankhyablocks/snk-filter-text.entry.js +18 -0
- package/dist/sankhyablocks/snk-form.entry.js +111 -0
- package/dist/sankhyablocks/snk-grid.entry.js +65 -0
- package/dist/sankhyablocks/snk-pesquisa.entry.js +311 -0
- package/dist/sankhyablocks/snk-taskbar.entry.js +153 -0
- package/dist/sankhyablocks/taskbar-elements-c119510a.js +72 -0
- package/dist/sankhyablocks/teste-pesquisa.entry.js +33 -0
- package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
- package/dist/types/components/snk-application/snk-application.d.ts +9 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +13 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +9 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +13 -0
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +37 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +43 -0
- package/dist/types/components.d.ts +199 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +5 -0
- package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +2 -0
- package/package.json +2 -2
- package/react/components.d.ts +0 -7
- package/react/components.js +0 -7
- package/react/components.js.map +1 -1
- package/dist/esm/index-cf91f542.js +0 -1817
- package/dist/sankhyablocks/p-1ba29824.entry.js +0 -74
- package/dist/sankhyablocks/p-2266555e.entry.js +0 -1
- package/dist/sankhyablocks/p-23c4c94f.js +0 -2
- package/dist/sankhyablocks/p-2454be94.js +0 -1
- package/dist/sankhyablocks/p-49743bc5.js +0 -1
- package/dist/sankhyablocks/p-4fa389bd.entry.js +0 -1
- package/dist/sankhyablocks/p-5327ba05.entry.js +0 -1
- package/dist/sankhyablocks/p-7a922fb4.entry.js +0 -1
- package/dist/sankhyablocks/p-92d6f826.entry.js +0 -1
- package/dist/sankhyablocks/p-bdeef7f2.entry.js +0 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { F as FloatingManager, g as ArrayUtils } from './index2.js';
|
|
3
|
+
|
|
4
|
+
const SHOW_MORE_ITEM_NAME = "__SHOWMORE__";
|
|
5
|
+
const MAX_FILTERS = 5;
|
|
6
|
+
const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.snkItemSelected = createEvent(this, "snkItemSelected", 7);
|
|
11
|
+
this.innerClickCheck = (floatingContainer, node) => {
|
|
12
|
+
if (node && floatingContainer) {
|
|
13
|
+
if (!node.offsetParent) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
let current = node;
|
|
17
|
+
do {
|
|
18
|
+
if (current === floatingContainer || current === this._element) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
} while ((current = current.offsetParent) != null);
|
|
22
|
+
}
|
|
23
|
+
this._detailIsVisible = false;
|
|
24
|
+
return false;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
showList() {
|
|
28
|
+
this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck });
|
|
29
|
+
this._detailIsVisible = true;
|
|
30
|
+
this._showAll = false;
|
|
31
|
+
this._filterArgument = "";
|
|
32
|
+
}
|
|
33
|
+
hideList() {
|
|
34
|
+
if (this._floatingID != undefined) {
|
|
35
|
+
FloatingManager.close(this._floatingID);
|
|
36
|
+
}
|
|
37
|
+
this._floatingID = undefined;
|
|
38
|
+
this._detailIsVisible = false;
|
|
39
|
+
}
|
|
40
|
+
buttonClick() {
|
|
41
|
+
if (this._detailIsVisible) {
|
|
42
|
+
this.hideList();
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
this.showList();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
componentDidRender() {
|
|
49
|
+
if (this._floatingID == undefined) {
|
|
50
|
+
if (this._popover) {
|
|
51
|
+
this._popover.remove();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
buildItemElement(item) {
|
|
56
|
+
return (h("div", { 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)));
|
|
57
|
+
}
|
|
58
|
+
itemSelected(itemName) {
|
|
59
|
+
if (itemName === SHOW_MORE_ITEM_NAME) {
|
|
60
|
+
this._showAll = true;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
this.hideList();
|
|
64
|
+
this.snkItemSelected.emit(itemName);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
getFilterItems() {
|
|
68
|
+
const items = this.items ? ArrayUtils.applyStringFilter(this._filterArgument, this.items.filter(item => item.kind === "FILTER")) : [];
|
|
69
|
+
if (items.length === 0) {
|
|
70
|
+
return h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-items-container--empty" }, this.getMessage("snkFilterBar.emptyFilterList"));
|
|
71
|
+
}
|
|
72
|
+
const hideItems = !this._filterArgument && !this._showAll && (items.length > MAX_FILTERS + 1);
|
|
73
|
+
if (hideItems) {
|
|
74
|
+
items.splice(MAX_FILTERS);
|
|
75
|
+
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" });
|
|
76
|
+
}
|
|
77
|
+
return h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-list-items-container" }, items.map(item => this.buildItemElement(item)));
|
|
78
|
+
}
|
|
79
|
+
getFooterItems() {
|
|
80
|
+
return this.items.filter(item => item.kind === "FOOTER");
|
|
81
|
+
}
|
|
82
|
+
render() {
|
|
83
|
+
return (h(Host, { class: "ez-flex ez-flex--column" }, h("ez-button", { 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.getMessage("snkFilterBar.findFilter"), 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))));
|
|
84
|
+
}
|
|
85
|
+
get _element() { return this; }
|
|
86
|
+
}, [4, "snk-filter-list", {
|
|
87
|
+
"label": [1],
|
|
88
|
+
"iconName": [1, "icon-name"],
|
|
89
|
+
"items": [16],
|
|
90
|
+
"getMessage": [16],
|
|
91
|
+
"_filterArgument": [32],
|
|
92
|
+
"_showAll": [32]
|
|
93
|
+
}]);
|
|
94
|
+
function defineCustomElement() {
|
|
95
|
+
if (typeof customElements === "undefined") {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const components = ["snk-filter-list"];
|
|
99
|
+
components.forEach(tagName => { switch (tagName) {
|
|
100
|
+
case "snk-filter-list":
|
|
101
|
+
if (!customElements.get(tagName)) {
|
|
102
|
+
customElements.define(tagName, SnkFilterList);
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
105
|
+
} });
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export { SnkFilterList as S, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SnkFilterNumber extends Components.SnkFilterNumber, HTMLElement {}
|
|
4
|
+
export const SnkFilterNumber: {
|
|
5
|
+
prototype: SnkFilterNumber;
|
|
6
|
+
new (): SnkFilterNumber;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
3
|
+
|
|
4
|
+
const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this.__registerHost();
|
|
8
|
+
}
|
|
9
|
+
ezChangeListener(evt) {
|
|
10
|
+
this.value = evt.detail;
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
if (!this.config || this.config.type !== FilterItemType.NUMBER) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
return (h("ez-number-input", { label: this.config.label, value: this.config.value }));
|
|
17
|
+
}
|
|
18
|
+
}, [0, "snk-filter-number", {
|
|
19
|
+
"config": [16],
|
|
20
|
+
"value": [2]
|
|
21
|
+
}, [[0, "ezChange", "ezChangeListener"]]]);
|
|
22
|
+
function defineCustomElement$1() {
|
|
23
|
+
if (typeof customElements === "undefined") {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const components = ["snk-filter-number"];
|
|
27
|
+
components.forEach(tagName => { switch (tagName) {
|
|
28
|
+
case "snk-filter-number":
|
|
29
|
+
if (!customElements.get(tagName)) {
|
|
30
|
+
customElements.define(tagName, SnkFilterPeriod);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
} });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const SnkFilterNumber = SnkFilterPeriod;
|
|
37
|
+
const defineCustomElement = defineCustomElement$1;
|
|
38
|
+
|
|
39
|
+
export { SnkFilterNumber, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SnkFilterPeriod extends Components.SnkFilterPeriod, HTMLElement {}
|
|
4
|
+
export const SnkFilterPeriod: {
|
|
5
|
+
prototype: SnkFilterPeriod;
|
|
6
|
+
new (): SnkFilterPeriod;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
3
|
+
|
|
4
|
+
const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this.__registerHost();
|
|
8
|
+
}
|
|
9
|
+
ezChangeListener() {
|
|
10
|
+
const start = this._startDate.value;
|
|
11
|
+
const end = this._endDate.value;
|
|
12
|
+
this.value = (start || end ? { start, end } : undefined);
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
if (!this.config || this.config.type !== FilterItemType.PERIOD) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
return (h("div", { class: "ez-col ez-col--nowrap" }, h("ez-date-input", { label: this.config.label, ref: ref => this._startDate = ref, value: (_a = this.config.value) === null || _a === void 0 ? void 0 : _a.start }), h("label", { class: "ez-text ez-text--medium ez-text--primary ez-margin--medium" }, "at\u00E9"), h("ez-date-input", { label: this.config.label, ref: ref => this._endDate = ref, value: (_b = this.config.value) === null || _b === void 0 ? void 0 : _b.end })));
|
|
20
|
+
}
|
|
21
|
+
}, [0, "snk-filter-period", {
|
|
22
|
+
"config": [16],
|
|
23
|
+
"value": [16]
|
|
24
|
+
}, [[0, "ezChange", "ezChangeListener"]]]);
|
|
25
|
+
function defineCustomElement$1() {
|
|
26
|
+
if (typeof customElements === "undefined") {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const components = ["snk-filter-period"];
|
|
30
|
+
components.forEach(tagName => { switch (tagName) {
|
|
31
|
+
case "snk-filter-period":
|
|
32
|
+
if (!customElements.get(tagName)) {
|
|
33
|
+
customElements.define(tagName, SnkFilterPeriod$1);
|
|
34
|
+
}
|
|
35
|
+
break;
|
|
36
|
+
} });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const SnkFilterPeriod = SnkFilterPeriod$1;
|
|
40
|
+
const defineCustomElement = defineCustomElement$1;
|
|
41
|
+
|
|
42
|
+
export { SnkFilterPeriod, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SnkFilterSearch extends Components.SnkFilterSearch, HTMLElement {}
|
|
4
|
+
export const SnkFilterSearch: {
|
|
5
|
+
prototype: SnkFilterSearch;
|
|
6
|
+
new (): SnkFilterSearch;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { a as ApplicationContext } from './index2.js';
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
4
|
+
|
|
5
|
+
const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
}
|
|
10
|
+
ezChangeListener(_evt) {
|
|
11
|
+
this.value = this._searchInput.value;
|
|
12
|
+
}
|
|
13
|
+
doSearch(mode, argument) {
|
|
14
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
15
|
+
if (this.fix) {
|
|
16
|
+
this.fix();
|
|
17
|
+
}
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
application.executePreparedSearch(mode, argument, this.config.props.searchContext)
|
|
20
|
+
.then(result => {
|
|
21
|
+
resolve(result);
|
|
22
|
+
if (this.unfix) {
|
|
23
|
+
this.unfix();
|
|
24
|
+
}
|
|
25
|
+
}).catch(reason => {
|
|
26
|
+
reject(reason);
|
|
27
|
+
if (this.unfix) {
|
|
28
|
+
this.unfix();
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
if (!this.config || this.config.type !== FilterItemType.SEARCH) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
return (h("ez-search", { value: this.config.value, label: this.config.label, ref: ref => this._searchInput = ref, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument) }));
|
|
38
|
+
}
|
|
39
|
+
}, [0, "snk-filter-search", {
|
|
40
|
+
"config": [16],
|
|
41
|
+
"value": [16],
|
|
42
|
+
"fix": [16],
|
|
43
|
+
"unfix": [16]
|
|
44
|
+
}, [[0, "ezChange", "ezChangeListener"]]]);
|
|
45
|
+
function defineCustomElement$1() {
|
|
46
|
+
if (typeof customElements === "undefined") {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const components = ["snk-filter-search"];
|
|
50
|
+
components.forEach(tagName => { switch (tagName) {
|
|
51
|
+
case "snk-filter-search":
|
|
52
|
+
if (!customElements.get(tagName)) {
|
|
53
|
+
customElements.define(tagName, SnkFilterSearch$1);
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
} });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const SnkFilterSearch = SnkFilterSearch$1;
|
|
60
|
+
const defineCustomElement = defineCustomElement$1;
|
|
61
|
+
|
|
62
|
+
export { SnkFilterSearch, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SnkFilterText extends Components.SnkFilterText, HTMLElement {}
|
|
4
|
+
export const SnkFilterText: {
|
|
5
|
+
prototype: SnkFilterText;
|
|
6
|
+
new (): SnkFilterText;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this.__registerHost();
|
|
7
|
+
}
|
|
8
|
+
ezChangeListener(evt) {
|
|
9
|
+
this.value = evt.detail;
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
if (!this.config) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
return (h("ez-text-input", { label: this.config.label, value: this.config.value }));
|
|
16
|
+
}
|
|
17
|
+
}, [0, "snk-filter-text", {
|
|
18
|
+
"config": [16],
|
|
19
|
+
"value": [1]
|
|
20
|
+
}, [[0, "ezChange", "ezChangeListener"]]]);
|
|
21
|
+
function defineCustomElement$1() {
|
|
22
|
+
if (typeof customElements === "undefined") {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const components = ["snk-filter-text"];
|
|
26
|
+
components.forEach(tagName => { switch (tagName) {
|
|
27
|
+
case "snk-filter-text":
|
|
28
|
+
if (!customElements.get(tagName)) {
|
|
29
|
+
customElements.define(tagName, SnkFilterText$1);
|
|
30
|
+
}
|
|
31
|
+
break;
|
|
32
|
+
} });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const SnkFilterText = SnkFilterText$1;
|
|
36
|
+
const defineCustomElement = defineCustomElement$1;
|
|
37
|
+
|
|
38
|
+
export { SnkFilterText, defineCustomElement };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { ApplicationContext } from '
|
|
2
|
+
import { a as ApplicationContext } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './snk-taskbar2.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,8 +1,12 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { ApplicationContext } from '
|
|
2
|
+
import { a as ApplicationContext } from './index2.js';
|
|
3
3
|
import { T as TaskbarElement, d as defineCustomElement$1 } from './snk-taskbar2.js';
|
|
4
|
+
import { d as defineCustomElement$5 } from './snk-filter-bar2.js';
|
|
5
|
+
import { d as defineCustomElement$4 } from './snk-filter-detail2.js';
|
|
6
|
+
import { d as defineCustomElement$3 } from './snk-filter-item2.js';
|
|
7
|
+
import { d as defineCustomElement$2 } from './snk-filter-list2.js';
|
|
4
8
|
|
|
5
|
-
const snkGridCss = ".sc-snk-grid
|
|
9
|
+
const snkGridCss = ".snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{display:flex;flex-wrap:nowrap;width:100%}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--small)}";
|
|
6
10
|
|
|
7
11
|
const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
12
|
constructor() {
|
|
@@ -57,7 +61,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
57
61
|
if (!this._configLoaded || !this._dataUnit) {
|
|
58
62
|
return undefined;
|
|
59
63
|
}
|
|
60
|
-
return (h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "
|
|
64
|
+
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-padding-bottom--medium ez-margin-bottom--medium" }, h("snk-filter-bar", { class: "snk-grid__filter-bar ez-align--top" }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", onActionClick: evt => this.actionClickHandler(evt), key: "topTaskbar", dataUnit: this._dataUnit, buttons: "FORM_MODE,CONFIG_GRID,INSERT", primaryButton: "INSERT" })), h("ez-grid", { ref: ref => this._grid = ref, dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: evt => { this.saveConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit() }, h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this.getHeaderButtons(), slot: "leftButtons", actionsList: this.actionsList })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" }))));
|
|
61
65
|
}
|
|
62
66
|
get _element() { return this; }
|
|
63
67
|
static get style() { return snkGridCss; }
|
|
@@ -73,13 +77,33 @@ function defineCustomElement() {
|
|
|
73
77
|
if (typeof customElements === "undefined") {
|
|
74
78
|
return;
|
|
75
79
|
}
|
|
76
|
-
const components = ["snk-grid", "snk-taskbar"];
|
|
80
|
+
const components = ["snk-grid", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-filter-list", "snk-taskbar"];
|
|
77
81
|
components.forEach(tagName => { switch (tagName) {
|
|
78
82
|
case "snk-grid":
|
|
79
83
|
if (!customElements.get(tagName)) {
|
|
80
84
|
customElements.define(tagName, SnkGrid);
|
|
81
85
|
}
|
|
82
86
|
break;
|
|
87
|
+
case "snk-filter-bar":
|
|
88
|
+
if (!customElements.get(tagName)) {
|
|
89
|
+
defineCustomElement$5();
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
case "snk-filter-detail":
|
|
93
|
+
if (!customElements.get(tagName)) {
|
|
94
|
+
defineCustomElement$4();
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
case "snk-filter-item":
|
|
98
|
+
if (!customElements.get(tagName)) {
|
|
99
|
+
defineCustomElement$3();
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
case "snk-filter-list":
|
|
103
|
+
if (!customElements.get(tagName)) {
|
|
104
|
+
defineCustomElement$2();
|
|
105
|
+
}
|
|
106
|
+
break;
|
|
83
107
|
case "snk-taskbar":
|
|
84
108
|
if (!customElements.get(tagName)) {
|
|
85
109
|
defineCustomElement$1();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { ObjectUtils, StringUtils } from '
|
|
2
|
+
import { O as ObjectUtils, S as StringUtils } from './index2.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 { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { ApplicationContext } from '
|
|
2
|
+
import { a as ApplicationContext } from './index2.js';
|
|
3
3
|
|
|
4
4
|
var TaskbarElement;
|
|
5
5
|
(function (TaskbarElement) {
|
|
@@ -208,6 +208,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
208
208
|
return this.getElement(index, TaskbarElement[btn]);
|
|
209
209
|
}
|
|
210
210
|
else {
|
|
211
|
+
index;
|
|
211
212
|
return h("slot", { name: btn });
|
|
212
213
|
}
|
|
213
214
|
})));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { DataUnit, DataType, UserInterface } from '
|
|
2
|
+
import { D as DataUnit, b as DataType, U as UserInterface } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$3 } from './snk-application2.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './snk-pesquisa2.js';
|
|
5
5
|
|
|
@@ -1,3 +1,119 @@
|
|
|
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
|
+
|
|
1
117
|
const snkDataUnitMessages = {
|
|
2
118
|
saveInfo: {
|
|
3
119
|
clone: "Duplicação realizada!",
|
|
@@ -21,6 +137,20 @@ const snkDataUnitMessages = {
|
|
|
21
137
|
forbiddenRemove: "Não é possível remover. Verifique as permissões de acesso."
|
|
22
138
|
};
|
|
23
139
|
|
|
140
|
+
const snkFilterBarMessages = {
|
|
141
|
+
"addFilter": "Adicionar filtro",
|
|
142
|
+
"pinFilter": "Fixar filtro",
|
|
143
|
+
"unpinFilter": "Desfixar filtro",
|
|
144
|
+
"removeFilter": "Remover filtro",
|
|
145
|
+
"cleanFilter": "Limpar",
|
|
146
|
+
"applyFilter": "Aplicar",
|
|
147
|
+
"findFilter": "Buscar campo...",
|
|
148
|
+
"emptyFilterList": "Há há campos disponíveis",
|
|
149
|
+
"customFilter": "Filtro personalizado",
|
|
150
|
+
"defaultFilter": "Filtro padrao",
|
|
151
|
+
"failToLoadConfig": "Falha ao buscar configuração de filtros"
|
|
152
|
+
};
|
|
153
|
+
|
|
24
154
|
const snkFormMessages = {
|
|
25
155
|
title: {
|
|
26
156
|
clone: "Duplicar registro",
|
|
@@ -53,7 +183,8 @@ class SnkMessageBuilder {
|
|
|
53
183
|
this._defaults = {
|
|
54
184
|
snkDataUnit: snkDataUnitMessages,
|
|
55
185
|
snkForm: snkFormMessages,
|
|
56
|
-
snkTaskbar: snkTaskbarMessages
|
|
186
|
+
snkTaskbar: snkTaskbarMessages,
|
|
187
|
+
snkFilterBar: snkFilterBarMessages
|
|
57
188
|
};
|
|
58
189
|
this._currentOperation = OperationMap.CLEAN;
|
|
59
190
|
this.loadAppMessages().then((msgs) => {
|
|
@@ -165,4 +296,4 @@ var OperationMap;
|
|
|
165
296
|
OperationMap["CLEAN"] = "clean";
|
|
166
297
|
})(OperationMap || (OperationMap = {}));
|
|
167
298
|
|
|
168
|
-
export { OperationMap as O, SnkMessageBuilder as S };
|
|
299
|
+
export { ApplicationUtils as A, DialogType as D, OperationMap as O, SnkMessageBuilder as S };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Stencil Client Patch Esm v2.18.1 | MIT Licensed | https://stenciljs.com
|
|
3
|
+
*/
|
|
4
|
+
var __assign=undefined&&undefined.__assign||function(){return (__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r);}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE;}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return "\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return {start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return {start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t);}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else {if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s);}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value;}));}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0);})),!t)return "break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return [];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove();}})).catch((function(e){console.error(e);}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window);
|