@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
package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import FilterItemType from '../filter-item-type.enum';
|
|
3
|
+
export class SnkFilterMultiSelect {
|
|
4
|
+
ezChangeListener(evt) {
|
|
5
|
+
this.value = evt.detail.value;
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
if (!this.config || this.config.type !== FilterItemType.MULTI_SELECT) {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
return (h("ez-combo-box", { label: this.config.label, value: this.config.value, options: this.config.props.options }));
|
|
12
|
+
}
|
|
13
|
+
static get is() { return "snk-filter-multi-select"; }
|
|
14
|
+
static get properties() {
|
|
15
|
+
return {
|
|
16
|
+
"value": {
|
|
17
|
+
"type": "any",
|
|
18
|
+
"mutable": true,
|
|
19
|
+
"complexType": {
|
|
20
|
+
"original": "any",
|
|
21
|
+
"resolved": "any",
|
|
22
|
+
"references": {}
|
|
23
|
+
},
|
|
24
|
+
"required": false,
|
|
25
|
+
"optional": false,
|
|
26
|
+
"docs": {
|
|
27
|
+
"tags": [],
|
|
28
|
+
"text": ""
|
|
29
|
+
},
|
|
30
|
+
"attribute": "value",
|
|
31
|
+
"reflect": true
|
|
32
|
+
},
|
|
33
|
+
"config": {
|
|
34
|
+
"type": "unknown",
|
|
35
|
+
"mutable": false,
|
|
36
|
+
"complexType": {
|
|
37
|
+
"original": "SnkFilterItemConfig",
|
|
38
|
+
"resolved": "SnkFilterItemConfig",
|
|
39
|
+
"references": {
|
|
40
|
+
"SnkFilterItemConfig": {
|
|
41
|
+
"location": "import",
|
|
42
|
+
"path": "../snk-filter-item"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": false,
|
|
47
|
+
"optional": false,
|
|
48
|
+
"docs": {
|
|
49
|
+
"tags": [],
|
|
50
|
+
"text": ""
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static get listeners() {
|
|
56
|
+
return [{
|
|
57
|
+
"name": "ezChange",
|
|
58
|
+
"method": "ezChangeListener",
|
|
59
|
+
"target": undefined,
|
|
60
|
+
"capture": false,
|
|
61
|
+
"passive": false
|
|
62
|
+
}];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import FilterItemType from '../filter-item-type.enum';
|
|
3
|
+
export class SnkFilterPeriod {
|
|
4
|
+
ezChangeListener(evt) {
|
|
5
|
+
this.value = evt.detail;
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
var _a;
|
|
9
|
+
if (!this.config || this.config.type !== FilterItemType.NUMBER) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
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 }));
|
|
13
|
+
}
|
|
14
|
+
static get is() { return "snk-filter-number"; }
|
|
15
|
+
static get properties() {
|
|
16
|
+
return {
|
|
17
|
+
"config": {
|
|
18
|
+
"type": "unknown",
|
|
19
|
+
"mutable": false,
|
|
20
|
+
"complexType": {
|
|
21
|
+
"original": "SnkFilterItemConfig",
|
|
22
|
+
"resolved": "SnkFilterItemConfig",
|
|
23
|
+
"references": {
|
|
24
|
+
"SnkFilterItemConfig": {
|
|
25
|
+
"location": "import",
|
|
26
|
+
"path": "../snk-filter-item"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": false,
|
|
31
|
+
"optional": false,
|
|
32
|
+
"docs": {
|
|
33
|
+
"tags": [],
|
|
34
|
+
"text": ""
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"value": {
|
|
38
|
+
"type": "number",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "number",
|
|
42
|
+
"resolved": "number",
|
|
43
|
+
"references": {}
|
|
44
|
+
},
|
|
45
|
+
"required": false,
|
|
46
|
+
"optional": false,
|
|
47
|
+
"docs": {
|
|
48
|
+
"tags": [],
|
|
49
|
+
"text": ""
|
|
50
|
+
},
|
|
51
|
+
"attribute": "value",
|
|
52
|
+
"reflect": false
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
static get listeners() {
|
|
57
|
+
return [{
|
|
58
|
+
"name": "ezChange",
|
|
59
|
+
"method": "ezChangeListener",
|
|
60
|
+
"target": undefined,
|
|
61
|
+
"capture": false,
|
|
62
|
+
"passive": false
|
|
63
|
+
}];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import FilterItemType from '../filter-item-type.enum';
|
|
3
|
+
export class SnkFilterPeriod {
|
|
4
|
+
ezChangeListener() {
|
|
5
|
+
const start = this._startDate.value;
|
|
6
|
+
const end = this._endDate.value;
|
|
7
|
+
this.value = (start || end ? { start, end } : undefined);
|
|
8
|
+
}
|
|
9
|
+
getDate(prop) {
|
|
10
|
+
const objValue = this.value ? this.value[prop] : null;
|
|
11
|
+
if (objValue instanceof Date) {
|
|
12
|
+
return objValue;
|
|
13
|
+
}
|
|
14
|
+
if (typeof objValue === "string") {
|
|
15
|
+
let date = new Date(objValue);
|
|
16
|
+
date.setMinutes(date.getMinutes() + date.getTimezoneOffset());
|
|
17
|
+
return date;
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
if (!this.config || this.config.type !== FilterItemType.PERIOD) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
return (h("div", { class: "ez-col ez-col--nowrap" }, h("ez-date-input", { label: this.config.label, ref: ref => this._startDate = ref, value: this.getDate("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: this.getDate("end") })));
|
|
26
|
+
}
|
|
27
|
+
static get is() { return "snk-filter-period"; }
|
|
28
|
+
static get properties() {
|
|
29
|
+
return {
|
|
30
|
+
"config": {
|
|
31
|
+
"type": "unknown",
|
|
32
|
+
"mutable": false,
|
|
33
|
+
"complexType": {
|
|
34
|
+
"original": "SnkFilterItemConfig",
|
|
35
|
+
"resolved": "SnkFilterItemConfig",
|
|
36
|
+
"references": {
|
|
37
|
+
"SnkFilterItemConfig": {
|
|
38
|
+
"location": "import",
|
|
39
|
+
"path": "../snk-filter-item"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"required": false,
|
|
44
|
+
"optional": false,
|
|
45
|
+
"docs": {
|
|
46
|
+
"tags": [],
|
|
47
|
+
"text": ""
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"value": {
|
|
51
|
+
"type": "any",
|
|
52
|
+
"mutable": false,
|
|
53
|
+
"complexType": {
|
|
54
|
+
"original": "any",
|
|
55
|
+
"resolved": "any",
|
|
56
|
+
"references": {}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": ""
|
|
63
|
+
},
|
|
64
|
+
"attribute": "value",
|
|
65
|
+
"reflect": false
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static get listeners() {
|
|
70
|
+
return [{
|
|
71
|
+
"name": "ezChange",
|
|
72
|
+
"method": "ezChangeListener",
|
|
73
|
+
"target": undefined,
|
|
74
|
+
"capture": false,
|
|
75
|
+
"passive": false
|
|
76
|
+
}];
|
|
77
|
+
}
|
|
78
|
+
}
|
package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { ApplicationContext, UserInterface } from '@sankhyalabs/core';
|
|
2
|
+
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
3
|
+
import { h, Host } from '@stencil/core';
|
|
4
|
+
import FilterItemType from '../filter-item-type.enum';
|
|
5
|
+
export class SnkFilterPersonalized {
|
|
6
|
+
getValue(param, index) {
|
|
7
|
+
if (this.value && index >= 0 && index < this.value.length) {
|
|
8
|
+
const rawValue = this.value[index];
|
|
9
|
+
if (param.type === UserInterface.SEARCH) {
|
|
10
|
+
return rawValue;
|
|
11
|
+
}
|
|
12
|
+
return convertType(param.dataType, rawValue);
|
|
13
|
+
}
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
setValue(index, value) {
|
|
17
|
+
if (this.value == undefined) {
|
|
18
|
+
this.value = Array(index).fill(null);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
this.value = [...this.value];
|
|
22
|
+
}
|
|
23
|
+
this.value[index] = value;
|
|
24
|
+
if (this.value.filter(item => item != undefined).length == 0) {
|
|
25
|
+
this.value = null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
doSearch(mode, argument, param) {
|
|
29
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
30
|
+
if (this.fix) {
|
|
31
|
+
this.fix();
|
|
32
|
+
}
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
34
|
+
application.executePreparedSearch(mode, argument, param.searchContext)
|
|
35
|
+
.then(result => {
|
|
36
|
+
resolve(result);
|
|
37
|
+
if (this.unfix) {
|
|
38
|
+
this.unfix();
|
|
39
|
+
}
|
|
40
|
+
}).catch(reason => {
|
|
41
|
+
reject(reason);
|
|
42
|
+
if (this.unfix) {
|
|
43
|
+
this.unfix();
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
getParamsInterface() {
|
|
49
|
+
var _a, _b, _c;
|
|
50
|
+
const params = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.personalizedFilter) === null || _c === void 0 ? void 0 : _c.parameters;
|
|
51
|
+
return params.map((param, index) => {
|
|
52
|
+
var _a;
|
|
53
|
+
switch (param.type) {
|
|
54
|
+
case UserInterface.SEARCH:
|
|
55
|
+
return h("ez-search", { suppressEmptyOption: true, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail), label: param.label, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, param) });
|
|
56
|
+
case UserInterface.SWITCH:
|
|
57
|
+
case UserInterface.CHECKBOX:
|
|
58
|
+
const mode = UserInterface.SWITCH === param.type ? "switch" : "regular";
|
|
59
|
+
return h("ez-check", { class: "ez-padding-bottom--medium", mode: mode, value: this.getValue(param, index), label: param.label, onEzChange: evt => this.setValue(index, evt.detail) });
|
|
60
|
+
case UserInterface.DECIMALNUMBER:
|
|
61
|
+
case UserInterface.INTEGERNUMBER:
|
|
62
|
+
return h("ez-number-input", { label: param.label, value: this.getValue(param, index), precision: (_a = param.props) === null || _a === void 0 ? void 0 : _a.precision, onEzChange: evt => this.setValue(index, evt.detail) });
|
|
63
|
+
case UserInterface.OPTIONSELECTOR:
|
|
64
|
+
return h("ez-combo-box", { label: param.label, value: this.getValue(param, index), options: param.options, onEzChange: evt => { var _a; return this.setValue(index, (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); } });
|
|
65
|
+
case UserInterface.DATE:
|
|
66
|
+
return h("ez-date-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
67
|
+
case UserInterface.DATETIME:
|
|
68
|
+
return h("ez-date-time-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
69
|
+
default:
|
|
70
|
+
return h("ez-text-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
if (!this.config || this.config.type !== FilterItemType.PERSONALIZED) {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
return (h(Host, null, this.getParamsInterface()));
|
|
79
|
+
}
|
|
80
|
+
static get is() { return "snk-filter-personalized"; }
|
|
81
|
+
static get properties() {
|
|
82
|
+
return {
|
|
83
|
+
"config": {
|
|
84
|
+
"type": "unknown",
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"complexType": {
|
|
87
|
+
"original": "SnkFilterItemConfig",
|
|
88
|
+
"resolved": "SnkFilterItemConfig",
|
|
89
|
+
"references": {
|
|
90
|
+
"SnkFilterItemConfig": {
|
|
91
|
+
"location": "import",
|
|
92
|
+
"path": "../snk-filter-item"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"required": false,
|
|
97
|
+
"optional": false,
|
|
98
|
+
"docs": {
|
|
99
|
+
"tags": [],
|
|
100
|
+
"text": ""
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"value": {
|
|
104
|
+
"type": "unknown",
|
|
105
|
+
"mutable": true,
|
|
106
|
+
"complexType": {
|
|
107
|
+
"original": "Array<Option|boolean|string|number|Date>",
|
|
108
|
+
"resolved": "(string | number | boolean | Date | Option)[]",
|
|
109
|
+
"references": {
|
|
110
|
+
"Array": {
|
|
111
|
+
"location": "global"
|
|
112
|
+
},
|
|
113
|
+
"Option": {
|
|
114
|
+
"location": "import",
|
|
115
|
+
"path": "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box"
|
|
116
|
+
},
|
|
117
|
+
"Date": {
|
|
118
|
+
"location": "global"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": false,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": ""
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"fix": {
|
|
130
|
+
"type": "unknown",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "()=>void",
|
|
134
|
+
"resolved": "() => void",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": false,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": ""
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"unfix": {
|
|
145
|
+
"type": "unknown",
|
|
146
|
+
"mutable": false,
|
|
147
|
+
"complexType": {
|
|
148
|
+
"original": "()=>void",
|
|
149
|
+
"resolved": "() => void",
|
|
150
|
+
"references": {}
|
|
151
|
+
},
|
|
152
|
+
"required": false,
|
|
153
|
+
"optional": false,
|
|
154
|
+
"docs": {
|
|
155
|
+
"tags": [],
|
|
156
|
+
"text": ""
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { ApplicationContext } from '@sankhyalabs/core';
|
|
2
|
+
import { h } from '@stencil/core';
|
|
3
|
+
import FilterItemType from '../filter-item-type.enum';
|
|
4
|
+
export class SnkFilterSearch {
|
|
5
|
+
ezChangeListener(_evt) {
|
|
6
|
+
this.value = this._searchInput.value;
|
|
7
|
+
}
|
|
8
|
+
doSearch(mode, argument) {
|
|
9
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
10
|
+
if (this.fix) {
|
|
11
|
+
this.fix();
|
|
12
|
+
}
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
application.executePreparedSearch(mode, argument, this.config.props.searchContext)
|
|
15
|
+
.then(result => {
|
|
16
|
+
resolve(result);
|
|
17
|
+
if (this.unfix) {
|
|
18
|
+
this.unfix();
|
|
19
|
+
}
|
|
20
|
+
}).catch(reason => {
|
|
21
|
+
reject(reason);
|
|
22
|
+
if (this.unfix) {
|
|
23
|
+
this.unfix();
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
if (!this.config || this.config.type !== FilterItemType.SEARCH) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
return (h("ez-search", { suppressEmptyOption: true, value: this.config.value, label: this.config.label, ref: ref => this._searchInput = ref, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument) }));
|
|
33
|
+
}
|
|
34
|
+
static get is() { return "snk-filter-search"; }
|
|
35
|
+
static get properties() {
|
|
36
|
+
return {
|
|
37
|
+
"config": {
|
|
38
|
+
"type": "unknown",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "SnkFilterItemConfig",
|
|
42
|
+
"resolved": "SnkFilterItemConfig",
|
|
43
|
+
"references": {
|
|
44
|
+
"SnkFilterItemConfig": {
|
|
45
|
+
"location": "import",
|
|
46
|
+
"path": "../snk-filter-item"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": ""
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"value": {
|
|
58
|
+
"type": "unknown",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "Option",
|
|
62
|
+
"resolved": "Option",
|
|
63
|
+
"references": {
|
|
64
|
+
"Option": {
|
|
65
|
+
"location": "import",
|
|
66
|
+
"path": "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": false,
|
|
71
|
+
"optional": false,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"text": ""
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"fix": {
|
|
78
|
+
"type": "unknown",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "()=>void",
|
|
82
|
+
"resolved": "() => void",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": ""
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"unfix": {
|
|
93
|
+
"type": "unknown",
|
|
94
|
+
"mutable": false,
|
|
95
|
+
"complexType": {
|
|
96
|
+
"original": "()=>void",
|
|
97
|
+
"resolved": "() => void",
|
|
98
|
+
"references": {}
|
|
99
|
+
},
|
|
100
|
+
"required": false,
|
|
101
|
+
"optional": false,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": ""
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
static get listeners() {
|
|
110
|
+
return [{
|
|
111
|
+
"name": "ezChange",
|
|
112
|
+
"method": "ezChangeListener",
|
|
113
|
+
"target": undefined,
|
|
114
|
+
"capture": false,
|
|
115
|
+
"passive": false
|
|
116
|
+
}];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
export class SnkFilterText {
|
|
3
|
+
ezChangeListener(evt) {
|
|
4
|
+
this.value = evt.detail;
|
|
5
|
+
}
|
|
6
|
+
render() {
|
|
7
|
+
if (!this.config) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
return (h("ez-text-input", { label: this.config.label, value: this.config.value }));
|
|
11
|
+
}
|
|
12
|
+
static get is() { return "snk-filter-text"; }
|
|
13
|
+
static get properties() {
|
|
14
|
+
return {
|
|
15
|
+
"config": {
|
|
16
|
+
"type": "unknown",
|
|
17
|
+
"mutable": false,
|
|
18
|
+
"complexType": {
|
|
19
|
+
"original": "SnkFilterItemConfig",
|
|
20
|
+
"resolved": "SnkFilterItemConfig",
|
|
21
|
+
"references": {
|
|
22
|
+
"SnkFilterItemConfig": {
|
|
23
|
+
"location": "import",
|
|
24
|
+
"path": "../snk-filter-item"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": false,
|
|
29
|
+
"optional": false,
|
|
30
|
+
"docs": {
|
|
31
|
+
"tags": [],
|
|
32
|
+
"text": ""
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"value": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"mutable": false,
|
|
38
|
+
"complexType": {
|
|
39
|
+
"original": "string",
|
|
40
|
+
"resolved": "string",
|
|
41
|
+
"references": {}
|
|
42
|
+
},
|
|
43
|
+
"required": false,
|
|
44
|
+
"optional": false,
|
|
45
|
+
"docs": {
|
|
46
|
+
"tags": [],
|
|
47
|
+
"text": ""
|
|
48
|
+
},
|
|
49
|
+
"attribute": "value",
|
|
50
|
+
"reflect": false
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
static get listeners() {
|
|
55
|
+
return [{
|
|
56
|
+
"name": "ezChange",
|
|
57
|
+
"method": "ezChangeListener",
|
|
58
|
+
"target": undefined,
|
|
59
|
+
"capture": false,
|
|
60
|
+
"passive": false
|
|
61
|
+
}];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var FilterItemType;
|
|
2
|
+
(function (FilterItemType) {
|
|
3
|
+
FilterItemType["MULTI_SELECT"] = "MULTI_SELECT";
|
|
4
|
+
FilterItemType["BINARY_SELECT"] = "BINARY_SELECT";
|
|
5
|
+
FilterItemType["PERIOD"] = "PERIOD";
|
|
6
|
+
FilterItemType["SEARCH"] = "SEARCH";
|
|
7
|
+
FilterItemType["TEXT"] = "TEXT";
|
|
8
|
+
FilterItemType["NUMBER"] = "NUMBER";
|
|
9
|
+
FilterItemType["DEFAULT_FILTER"] = "DEFAULT_FILTER";
|
|
10
|
+
FilterItemType["PERSONALIZED"] = "PERSONALIZED";
|
|
11
|
+
})(FilterItemType || (FilterItemType = {}));
|
|
12
|
+
export default FilterItemType;
|