@sankhyalabs/sankhyablocks 1.3.34 → 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-d8215915.js +221 -0
- 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-3daf58d3.js +16 -0
- package/dist/cjs/index-84fe3b86.js +20 -0
- package/dist/cjs/index-93965c41.js +141 -0
- package/dist/cjs/index-b0b676c5.js +3298 -0
- package/dist/cjs/index-e90ae303.js +2408 -0
- package/dist/cjs/loader.cjs.js +19 -3
- package/dist/cjs/sankhyablocks.cjs.js +117 -5
- package/dist/cjs/shadow-css-346c0795.js +389 -0
- package/dist/cjs/snk-application.cjs.entry.js +744 -174
- package/dist/cjs/snk-crud.cjs.entry.js +70 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +272 -0
- package/dist/cjs/snk-filter-bar.cjs.entry.js +466 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +47 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +84 -0
- package/dist/cjs/snk-filter-item.cjs.entry.js +177 -0
- package/dist/cjs/snk-filter-list.cjs.entry.js +91 -0
- package/dist/cjs/snk-filter-modal.cjs.entry.js +37 -0
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +23 -0
- package/dist/cjs/snk-filter-number.cjs.entry.js +24 -0
- package/dist/cjs/snk-filter-period.cjs.entry.js +37 -0
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +89 -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.cjs.entry.js +133 -0
- package/dist/cjs/snk-grid.cjs.entry.js +79 -0
- package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -5
- package/dist/cjs/snk-taskbar.cjs.entry.js +160 -0
- package/dist/cjs/taskbar-elements-283c737e.js +93 -0
- package/dist/cjs/taskbar-processor-6bd0d35c.js +47 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +5 -5
- package/dist/collection/collection-manifest.json +19 -2
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +9 -2
- package/dist/collection/components/snk-application/snk-application.js +1179 -627
- package/dist/collection/components/snk-crud/snk-crud.css +6 -0
- package/dist/collection/components/snk-crud/snk-crud.js +201 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.css +6 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +517 -0
- 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-binary-select.js +88 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +64 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +65 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +78 -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/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 +12 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +153 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +278 -0
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +233 -0
- 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 +136 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +452 -0
- package/dist/collection/components/snk-form/snk-form.css +34 -0
- package/dist/collection/components/snk-form/snk-form.js +258 -0
- package/dist/collection/components/snk-grid/snk-grid.css +18 -0
- package/dist/collection/components/snk-grid/snk-grid.js +203 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +80 -79
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +86 -0
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +43 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +3 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +307 -0
- package/dist/collection/components/teste-pesquisa/teste-pesquisa.js +12 -9
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +37 -12
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +52 -21
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +62 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +4 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js +47 -0
- package/dist/collection/lib/index.js +1 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +121 -0
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +23 -0
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +30 -0
- package/dist/collection/lib/message/resources/snk-form.msg.js +10 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +17 -0
- package/dist/components/SnkMessageBuilder.js +199 -0
- package/dist/components/filter-item-type.enum.js +14 -0
- package/dist/components/index.d.ts +20 -5
- package/dist/components/index.js +24 -0
- package/dist/components/index2.js +2394 -0
- package/dist/components/index3.js +139 -0
- package/dist/components/snk-application2.js +727 -146
- package/dist/components/snk-crud.d.ts +11 -0
- package/dist/components/snk-crud.js +139 -0
- package/dist/components/snk-data-unit.d.ts +11 -0
- package/dist/components/snk-data-unit.js +294 -0
- 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 +504 -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 +98 -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 +198 -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 +111 -0
- 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-multi-select.d.ts +11 -0
- package/dist/components/snk-filter-multi-select.js +39 -0
- package/dist/components/snk-filter-number.d.ts +11 -0
- package/dist/components/snk-filter-number.js +40 -0
- package/dist/components/snk-filter-period.d.ts +11 -0
- package/dist/components/snk-filter-period.js +53 -0
- package/dist/components/snk-filter-personalized.d.ts +11 -0
- package/dist/components/snk-filter-personalized.js +107 -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-form.d.ts +11 -0
- package/dist/components/snk-form.js +6 -0
- package/dist/components/snk-form2.js +159 -0
- package/dist/components/snk-grid.d.ts +11 -0
- package/dist/components/snk-grid.js +6 -0
- package/dist/components/snk-grid2.js +133 -0
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-taskbar.d.ts +11 -0
- package/dist/components/snk-taskbar.js +6 -0
- package/dist/components/snk-taskbar2.js +264 -0
- package/dist/components/taskbar-processor.js +45 -0
- package/dist/components/teste-pesquisa.js +1 -1
- package/dist/esm/SnkMessageBuilder-35a20271.js +199 -0
- 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-a79b2fa8.js +14 -0
- package/dist/esm/index-2b4d2d14.js +3262 -0
- package/dist/esm/index-5992b7e6.js +139 -0
- package/dist/esm/index-c683b2b0.js +2394 -0
- package/dist/esm/index-c71285cb.js +17 -0
- package/dist/esm/loader.js +19 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/sankhyablocks.js +117 -5
- package/dist/esm/shadow-css-b18e99d7.js +387 -0
- package/dist/esm/snk-application.entry.js +717 -147
- package/dist/esm/snk-crud.entry.js +66 -0
- package/dist/esm/snk-data-unit.entry.js +268 -0
- package/dist/esm/snk-filter-bar.entry.js +462 -0
- package/dist/esm/snk-filter-binary-select.entry.js +43 -0
- package/dist/esm/snk-filter-detail.entry.js +80 -0
- package/dist/esm/snk-filter-item.entry.js +173 -0
- package/dist/esm/snk-filter-list.entry.js +87 -0
- package/dist/esm/snk-filter-modal.entry.js +33 -0
- package/dist/esm/snk-filter-multi-select.entry.js +19 -0
- package/dist/esm/snk-filter-number.entry.js +20 -0
- package/dist/esm/snk-filter-period.entry.js +33 -0
- package/dist/esm/snk-filter-personalized.entry.js +85 -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.entry.js +129 -0
- package/dist/esm/snk-grid.entry.js +75 -0
- package/dist/esm/snk-pesquisa.entry.js +2 -2
- package/dist/esm/snk-taskbar.entry.js +156 -0
- package/dist/esm/taskbar-elements-35d64ff9.js +90 -0
- package/dist/esm/taskbar-processor-aa6772c9.js +45 -0
- package/dist/esm/teste-pesquisa.entry.js +2 -2
- package/dist/sankhyablocks/SnkMessageBuilder-35a20271.js +199 -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-a79b2fa8.js +14 -0
- package/dist/sankhyablocks/index-2b4d2d14.js +3262 -0
- package/dist/sankhyablocks/index-5992b7e6.js +139 -0
- package/dist/sankhyablocks/index-c683b2b0.js +2394 -0
- package/dist/sankhyablocks/index-c71285cb.js +17 -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 +8166 -0
- package/dist/sankhyablocks/snk-crud.entry.js +66 -0
- package/dist/sankhyablocks/snk-data-unit.entry.js +268 -0
- package/dist/sankhyablocks/snk-filter-bar.entry.js +462 -0
- package/dist/sankhyablocks/snk-filter-binary-select.entry.js +43 -0
- package/dist/sankhyablocks/snk-filter-detail.entry.js +80 -0
- package/dist/sankhyablocks/snk-filter-item.entry.js +173 -0
- package/dist/sankhyablocks/snk-filter-list.entry.js +87 -0
- package/dist/sankhyablocks/snk-filter-modal.entry.js +33 -0
- package/dist/sankhyablocks/snk-filter-multi-select.entry.js +19 -0
- package/dist/sankhyablocks/snk-filter-number.entry.js +20 -0
- package/dist/sankhyablocks/snk-filter-period.entry.js +33 -0
- package/dist/sankhyablocks/snk-filter-personalized.entry.js +85 -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 +129 -0
- package/dist/sankhyablocks/snk-grid.entry.js +75 -0
- package/dist/sankhyablocks/snk-pesquisa.entry.js +311 -0
- package/dist/sankhyablocks/snk-taskbar.entry.js +156 -0
- package/dist/sankhyablocks/taskbar-elements-35d64ff9.js +90 -0
- package/dist/sankhyablocks/taskbar-processor-aa6772c9.js +45 -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 +149 -16
- 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-binary-select.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +7 -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 +14 -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/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 +11 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +16 -0
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +40 -0
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +23 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -0
- package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +12 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +84 -0
- package/dist/types/components.d.ts +744 -8
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +7 -6
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/totals-fetcher.d.ts +8 -0
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +42 -0
- package/dist/types/lib/message/resources/snk-data-unit.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-form.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-taskbar.msg.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/loader/package.json +1 -0
- package/package.json +5 -5
- package/react/components.d.ts +0 -2
- package/react/components.js +0 -2
- package/react/components.js.map +1 -1
- package/dist/cjs/index-1133bc2a.js +0 -1235
- package/dist/esm/index-ffda6382.js +0 -1208
- package/dist/sankhyablocks/p-2a7b4cb3.entry.js +0 -1
- package/dist/sankhyablocks/p-9520d78a.entry.js +0 -1
- package/dist/sankhyablocks/p-98e8490d.entry.js +0 -69
- package/dist/sankhyablocks/p-edcb9d8e.js +0 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { A as ApplicationUtils } from './index3.js';
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
4
|
+
|
|
5
|
+
const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.filterChange = createEvent(this, "filterChange", 7);
|
|
10
|
+
}
|
|
11
|
+
changeConfig(newConfig) {
|
|
12
|
+
this.filterChange.emit(newConfig);
|
|
13
|
+
}
|
|
14
|
+
getContentEditor() {
|
|
15
|
+
switch (this.config.type) {
|
|
16
|
+
case FilterItemType.BINARY_SELECT:
|
|
17
|
+
return "snk-filter-binary-select";
|
|
18
|
+
case FilterItemType.MULTI_SELECT:
|
|
19
|
+
return "snk-filter-multi-select";
|
|
20
|
+
case FilterItemType.PERIOD:
|
|
21
|
+
return "snk-filter-period";
|
|
22
|
+
case FilterItemType.SEARCH:
|
|
23
|
+
return "snk-filter-search";
|
|
24
|
+
case FilterItemType.NUMBER:
|
|
25
|
+
return "snk-filter-number";
|
|
26
|
+
case FilterItemType.PERSONALIZED:
|
|
27
|
+
return "snk-filter-personalized";
|
|
28
|
+
}
|
|
29
|
+
return "snk-filter-text";
|
|
30
|
+
}
|
|
31
|
+
removeItem() {
|
|
32
|
+
this.changeConfig(Object.assign(Object.assign({}, this.config), { visible: false, fixed: false, value: undefined }));
|
|
33
|
+
}
|
|
34
|
+
getPopUpHeaderButtons() {
|
|
35
|
+
if (this.config.hardFixed) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
return ([
|
|
39
|
+
h("ez-icon", { title: this.getMessage("snkFilterBar.removeFilter"), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", iconName: "delete", onClick: () => this.removeItem() }),
|
|
40
|
+
h("ez-icon", { title: this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), class: "ez-margin-left--small sc-snk-filter-bar snk-filter-item__editor-header-button", iconName: this.config.fixed ? "un-pin" : "push-pin", onClick: () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })) })
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
apply() {
|
|
44
|
+
var _a;
|
|
45
|
+
let isValid = true;
|
|
46
|
+
const value = this._editor["value"];
|
|
47
|
+
/* WARNING: Temporário. Isso só está sendo feito até desconsiderar os parametros não informados para PersonalizedFilter*/
|
|
48
|
+
if (value != undefined && this.config.type === FilterItemType.PERSONALIZED) {
|
|
49
|
+
const params = ((_a = this.config.props.personalizedFilter) === null || _a === void 0 ? void 0 : _a.parameters) || [];
|
|
50
|
+
if (params.length > 1) {
|
|
51
|
+
if (params.length > value.length) {
|
|
52
|
+
isValid = false;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
value.forEach(item => {
|
|
56
|
+
if (item == undefined) {
|
|
57
|
+
isValid = false;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (!isValid) {
|
|
63
|
+
this.keepOpened = true;
|
|
64
|
+
ApplicationUtils.alert("Filtro parcialmente preenchido", "Favor completar todas as informações do filtro.").then(() => setTimeout(() => this.keepOpened = false, 1));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/* WARNING: Temporário.*/
|
|
68
|
+
if (isValid) {
|
|
69
|
+
this.changeConfig(Object.assign(Object.assign({}, this.config), { value: value }));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
clear() {
|
|
73
|
+
this.changeConfig(Object.assign(Object.assign({}, this.config), { value: undefined }));
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
const ContentEditor = this.getContentEditor();
|
|
77
|
+
return (h(Host, null, h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config, fix: () => this.keepOpened = true, unfix: () => this.keepOpened = false }), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), h("ez-button", { label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
|
|
78
|
+
}
|
|
79
|
+
}, [0, "snk-filter-detail", {
|
|
80
|
+
"config": [1040],
|
|
81
|
+
"keepOpened": [1028, "keep-opened"],
|
|
82
|
+
"getMessage": [16]
|
|
83
|
+
}]);
|
|
84
|
+
function defineCustomElement() {
|
|
85
|
+
if (typeof customElements === "undefined") {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const components = ["snk-filter-detail"];
|
|
89
|
+
components.forEach(tagName => { switch (tagName) {
|
|
90
|
+
case "snk-filter-detail":
|
|
91
|
+
if (!customElements.get(tagName)) {
|
|
92
|
+
customElements.define(tagName, SnkFilterDetail);
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
} });
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { SnkFilterDetail as S, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SnkFilterItem extends Components.SnkFilterItem, HTMLElement {}
|
|
4
|
+
export const SnkFilterItem: {
|
|
5
|
+
prototype: SnkFilterItem;
|
|
6
|
+
new (): SnkFilterItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { F as FloatingManager } from './index2.js';
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './snk-filter-detail2.js';
|
|
5
|
+
|
|
6
|
+
const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
this.filterChange = createEvent(this, "filterChange", 7);
|
|
11
|
+
this.innerClickCheck = (floatingContainer, node) => {
|
|
12
|
+
if (this._popover.keepOpened) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
if (node && floatingContainer) {
|
|
16
|
+
if (!node.offsetParent) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
let current = node;
|
|
20
|
+
do {
|
|
21
|
+
if (current === floatingContainer) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
} while ((current = current.offsetParent) != null);
|
|
25
|
+
}
|
|
26
|
+
this.detailIsVisible = false;
|
|
27
|
+
this.executeCloseCallback();
|
|
28
|
+
return false;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
async showUp(open = false) {
|
|
32
|
+
return new Promise(resolve => {
|
|
33
|
+
this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
|
|
34
|
+
if (open) {
|
|
35
|
+
window.requestAnimationFrame(() => {
|
|
36
|
+
this._closeCallback = resolve;
|
|
37
|
+
this.showDetail();
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
showDetail() {
|
|
43
|
+
this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: this.getScrollOffset() });
|
|
44
|
+
this.detailIsVisible = true;
|
|
45
|
+
}
|
|
46
|
+
getScrollOffset() {
|
|
47
|
+
return `${this._filterItemElement.getBoundingClientRect().left + 12}px`;
|
|
48
|
+
}
|
|
49
|
+
hideDetail() {
|
|
50
|
+
if (this._floatingID != undefined) {
|
|
51
|
+
FloatingManager.close(this._floatingID);
|
|
52
|
+
}
|
|
53
|
+
this._floatingID = undefined;
|
|
54
|
+
this.detailIsVisible = false;
|
|
55
|
+
this.executeCloseCallback();
|
|
56
|
+
}
|
|
57
|
+
executeCloseCallback() {
|
|
58
|
+
if (this._closeCallback) {
|
|
59
|
+
this._closeCallback();
|
|
60
|
+
this._closeCallback = undefined;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//---------------------------------------------
|
|
64
|
+
// Event handlers
|
|
65
|
+
//---------------------------------------------
|
|
66
|
+
clickListener(evt) {
|
|
67
|
+
if ([this._chipElement, this._leftIconElement, this._rightIconElement].includes(evt.target)) {
|
|
68
|
+
if (evt.target === this._rightIconElement && this.config.value != undefined) {
|
|
69
|
+
this.filterChange.emit(Object.assign(Object.assign({}, this.config), { value: undefined }));
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
if (this.detailIsVisible) {
|
|
73
|
+
this.hideDetail();
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
this.showDetail();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
evt.preventDefault();
|
|
80
|
+
evt.stopImmediatePropagation();
|
|
81
|
+
evt.stopPropagation();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
mouseDownListener(evt) {
|
|
85
|
+
if (this.detailIsVisible && [this._chipElement, this._leftIconElement, this._rightIconElement].includes(evt.target)) {
|
|
86
|
+
evt.preventDefault();
|
|
87
|
+
evt.stopImmediatePropagation();
|
|
88
|
+
evt.stopPropagation();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
getLabel() {
|
|
92
|
+
const { type, value, label, props } = this.config;
|
|
93
|
+
if (value) {
|
|
94
|
+
if (type === FilterItemType.BINARY_SELECT) {
|
|
95
|
+
const [optOne, optTwo] = props.options;
|
|
96
|
+
if (optOne.name === value) {
|
|
97
|
+
return optOne.label;
|
|
98
|
+
}
|
|
99
|
+
if (optTwo.name === value) {
|
|
100
|
+
return optTwo.label;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (type === FilterItemType.MULTI_SELECT) {
|
|
104
|
+
const opt = props.options.find(opt => opt.value === value);
|
|
105
|
+
return `${label}: ${opt.label}`;
|
|
106
|
+
}
|
|
107
|
+
if (type === FilterItemType.PERIOD) {
|
|
108
|
+
let { end, start } = value;
|
|
109
|
+
if (typeof end === "string") {
|
|
110
|
+
end = new Date(end);
|
|
111
|
+
end.setMinutes(end.getMinutes() + end.getTimezoneOffset());
|
|
112
|
+
}
|
|
113
|
+
if (typeof start === "string") {
|
|
114
|
+
start = new Date(start);
|
|
115
|
+
start.setMinutes(start.getMinutes() + start.getTimezoneOffset());
|
|
116
|
+
}
|
|
117
|
+
const dateFormater = new Intl.DateTimeFormat("pt-BR");
|
|
118
|
+
if (end && start) {
|
|
119
|
+
return `${label}: ${dateFormater.format(start)} a ${dateFormater.format(end)}`;
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
if (start) {
|
|
123
|
+
return `${label}: A partir de ${dateFormater.format(start)}`;
|
|
124
|
+
}
|
|
125
|
+
else if (end) {
|
|
126
|
+
return `${label}: Até ${dateFormater.format(end)}`;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
return label;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (type === FilterItemType.SEARCH) {
|
|
134
|
+
return `${label}: ${value.value} - ${value.label}`;
|
|
135
|
+
}
|
|
136
|
+
if (type === FilterItemType.PERSONALIZED) {
|
|
137
|
+
return label;
|
|
138
|
+
}
|
|
139
|
+
return `${label}: ${value}`;
|
|
140
|
+
}
|
|
141
|
+
return label;
|
|
142
|
+
}
|
|
143
|
+
componentDidRender() {
|
|
144
|
+
if (this._floatingID == undefined) {
|
|
145
|
+
if (this._popover) {
|
|
146
|
+
this._popover.remove();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
filterChangeListener() {
|
|
151
|
+
this.hideDetail();
|
|
152
|
+
}
|
|
153
|
+
getRightIconName() {
|
|
154
|
+
if (this.config.value != undefined) {
|
|
155
|
+
return "close";
|
|
156
|
+
}
|
|
157
|
+
return this.detailIsVisible ? "chevron-up" : "chevron-down";
|
|
158
|
+
}
|
|
159
|
+
getLeftIconName() {
|
|
160
|
+
switch (this.config.type) {
|
|
161
|
+
case FilterItemType.PERIOD:
|
|
162
|
+
return "calendar";
|
|
163
|
+
case FilterItemType.PERSONALIZED:
|
|
164
|
+
return "tune";
|
|
165
|
+
}
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
render() {
|
|
169
|
+
const leftIcon = this.getLeftIconName();
|
|
170
|
+
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 }))));
|
|
171
|
+
}
|
|
172
|
+
get _filterItemElement() { return this; }
|
|
173
|
+
}, [0, "snk-filter-item", {
|
|
174
|
+
"config": [1040],
|
|
175
|
+
"getMessage": [16],
|
|
176
|
+
"detailIsVisible": [32],
|
|
177
|
+
"showUp": [64]
|
|
178
|
+
}, [[2, "click", "clickListener"], [2, "mousedown", "mouseDownListener"], [0, "filterChange", "filterChangeListener"]]]);
|
|
179
|
+
function defineCustomElement() {
|
|
180
|
+
if (typeof customElements === "undefined") {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const components = ["snk-filter-item", "snk-filter-detail"];
|
|
184
|
+
components.forEach(tagName => { switch (tagName) {
|
|
185
|
+
case "snk-filter-item":
|
|
186
|
+
if (!customElements.get(tagName)) {
|
|
187
|
+
customElements.define(tagName, SnkFilterItem);
|
|
188
|
+
}
|
|
189
|
+
break;
|
|
190
|
+
case "snk-filter-detail":
|
|
191
|
+
if (!customElements.get(tagName)) {
|
|
192
|
+
defineCustomElement$1();
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
} });
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export { SnkFilterItem as S, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SnkFilterList extends Components.SnkFilterList, HTMLElement {}
|
|
4
|
+
export const SnkFilterList: {
|
|
5
|
+
prototype: SnkFilterList;
|
|
6
|
+
new (): SnkFilterList;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { F as FloatingManager, h 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.emptyText);
|
|
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", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, h("slot", { name: "leftIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, h("ez-filter-input", { ref: ref => this._filterInput = ref, mode: "slim", label: this.findFilterText, value: this._filterArgument, onEzChange: (evt) => this._filterArgument = evt.detail }), this.getFilterItems(), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
|
|
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
|
+
"emptyText": [1, "empty-text"],
|
|
92
|
+
"findFilterText": [1, "find-filter-text"],
|
|
93
|
+
"buttonClass": [1, "button-class"],
|
|
94
|
+
"_filterArgument": [32],
|
|
95
|
+
"_showAll": [32]
|
|
96
|
+
}]);
|
|
97
|
+
function defineCustomElement() {
|
|
98
|
+
if (typeof customElements === "undefined") {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const components = ["snk-filter-list"];
|
|
102
|
+
components.forEach(tagName => { switch (tagName) {
|
|
103
|
+
case "snk-filter-list":
|
|
104
|
+
if (!customElements.get(tagName)) {
|
|
105
|
+
customElements.define(tagName, SnkFilterList);
|
|
106
|
+
}
|
|
107
|
+
break;
|
|
108
|
+
} });
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { SnkFilterList as S, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SnkFilterModal extends Components.SnkFilterModal, HTMLElement {}
|
|
4
|
+
export const SnkFilterModal: {
|
|
5
|
+
prototype: SnkFilterModal;
|
|
6
|
+
new (): SnkFilterModal;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { h as ArrayUtils } from './index2.js';
|
|
3
|
+
|
|
4
|
+
var ModalAction;
|
|
5
|
+
(function (ModalAction) {
|
|
6
|
+
ModalAction["CLOSE"] = "CLOSE";
|
|
7
|
+
ModalAction["OK"] = "OK";
|
|
8
|
+
ModalAction["CANCEL"] = "CANCEL";
|
|
9
|
+
})(ModalAction || (ModalAction = {}));
|
|
10
|
+
const ModalAction$1 = ModalAction;
|
|
11
|
+
|
|
12
|
+
var ModalButtonStatus;
|
|
13
|
+
(function (ModalButtonStatus) {
|
|
14
|
+
ModalButtonStatus["ENABLED"] = "ENABLED";
|
|
15
|
+
ModalButtonStatus["DISABLED"] = "DISABLED";
|
|
16
|
+
ModalButtonStatus["HIDDEN"] = "HIDDEN";
|
|
17
|
+
})(ModalButtonStatus || (ModalButtonStatus = {}));
|
|
18
|
+
const ModalButtonStatus$1 = ModalButtonStatus;
|
|
19
|
+
|
|
20
|
+
const SnkFilterModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
this.__registerHost();
|
|
24
|
+
}
|
|
25
|
+
updateValue(id, value) {
|
|
26
|
+
this.items = this.items.map(item => {
|
|
27
|
+
if (item.id === id) {
|
|
28
|
+
return Object.assign(Object.assign({}, item), { active: value });
|
|
29
|
+
}
|
|
30
|
+
return item;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
getActiveFiltersMsg() {
|
|
34
|
+
const activeFilters = this.items.filter(item => item.active).length;
|
|
35
|
+
if (activeFilters === 0) {
|
|
36
|
+
return this.getMessage("snkFilterBar.noActiveFilters");
|
|
37
|
+
}
|
|
38
|
+
return this.getMessage(activeFilters > 1 ? "snkFilterBar.activeFilters" : "snkFilterBar.activeFilter", { ACTIVE_FILTERS: activeFilters });
|
|
39
|
+
}
|
|
40
|
+
getFilteredItems() {
|
|
41
|
+
return this.items ? ArrayUtils.applyStringFilter(this._filterArgument, this.items) : [];
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
const allowCancel = this.items.filter(item => item.active).length > 0;
|
|
45
|
+
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$1.ENABLED : ModalButtonStatus$1.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))));
|
|
46
|
+
}
|
|
47
|
+
}, [0, "snk-filter-modal", {
|
|
48
|
+
"getMessage": [16],
|
|
49
|
+
"items": [1040],
|
|
50
|
+
"modalTitle": [1, "modal-title"],
|
|
51
|
+
"modalSubTitle": [1, "modal-sub-title"],
|
|
52
|
+
"cancelButtonLabel": [1, "cancel-button-label"],
|
|
53
|
+
"okButtonLabel": [1, "ok-button-label"],
|
|
54
|
+
"infoText": [1, "info-text"],
|
|
55
|
+
"useSearch": [4, "use-search"],
|
|
56
|
+
"processModalAction": [16],
|
|
57
|
+
"_filterArgument": [32]
|
|
58
|
+
}]);
|
|
59
|
+
function defineCustomElement() {
|
|
60
|
+
if (typeof customElements === "undefined") {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const components = ["snk-filter-modal"];
|
|
64
|
+
components.forEach(tagName => { switch (tagName) {
|
|
65
|
+
case "snk-filter-modal":
|
|
66
|
+
if (!customElements.get(tagName)) {
|
|
67
|
+
customElements.define(tagName, SnkFilterModal);
|
|
68
|
+
}
|
|
69
|
+
break;
|
|
70
|
+
} });
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { ModalAction$1 as M, SnkFilterModal as S, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SnkFilterMultiSelect extends Components.SnkFilterMultiSelect, HTMLElement {}
|
|
4
|
+
export const SnkFilterMultiSelect: {
|
|
5
|
+
prototype: SnkFilterMultiSelect;
|
|
6
|
+
new (): SnkFilterMultiSelect;
|
|
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 SnkFilterMultiSelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this.__registerHost();
|
|
8
|
+
}
|
|
9
|
+
ezChangeListener(evt) {
|
|
10
|
+
this.value = evt.detail.value;
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
if (!this.config || this.config.type !== FilterItemType.MULTI_SELECT) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
return (h("ez-combo-box", { label: this.config.label, value: this.config.value, options: this.config.props.options }));
|
|
17
|
+
}
|
|
18
|
+
}, [0, "snk-filter-multi-select", {
|
|
19
|
+
"value": [1544],
|
|
20
|
+
"config": [16]
|
|
21
|
+
}, [[0, "ezChange", "ezChangeListener"]]]);
|
|
22
|
+
function defineCustomElement$1() {
|
|
23
|
+
if (typeof customElements === "undefined") {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const components = ["snk-filter-multi-select"];
|
|
27
|
+
components.forEach(tagName => { switch (tagName) {
|
|
28
|
+
case "snk-filter-multi-select":
|
|
29
|
+
if (!customElements.get(tagName)) {
|
|
30
|
+
customElements.define(tagName, SnkFilterMultiSelect$1);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
} });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const SnkFilterMultiSelect = SnkFilterMultiSelect$1;
|
|
37
|
+
const defineCustomElement = defineCustomElement$1;
|
|
38
|
+
|
|
39
|
+
export { SnkFilterMultiSelect, defineCustomElement };
|
|
@@ -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,40 @@
|
|
|
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
|
+
var _a;
|
|
14
|
+
if (!this.config || this.config.type !== FilterItemType.NUMBER) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
return (h("ez-number-input", { label: this.config.label, value: this.config.value, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision }));
|
|
18
|
+
}
|
|
19
|
+
}, [0, "snk-filter-number", {
|
|
20
|
+
"config": [16],
|
|
21
|
+
"value": [2]
|
|
22
|
+
}, [[0, "ezChange", "ezChangeListener"]]]);
|
|
23
|
+
function defineCustomElement$1() {
|
|
24
|
+
if (typeof customElements === "undefined") {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const components = ["snk-filter-number"];
|
|
28
|
+
components.forEach(tagName => { switch (tagName) {
|
|
29
|
+
case "snk-filter-number":
|
|
30
|
+
if (!customElements.get(tagName)) {
|
|
31
|
+
customElements.define(tagName, SnkFilterPeriod);
|
|
32
|
+
}
|
|
33
|
+
break;
|
|
34
|
+
} });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const SnkFilterNumber = SnkFilterPeriod;
|
|
38
|
+
const defineCustomElement = defineCustomElement$1;
|
|
39
|
+
|
|
40
|
+
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;
|