@sankhyalabs/sankhyablocks 2.1.8 → 2.2.0
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/snk-application.cjs.entry.js +1 -0
- package/dist/cjs/snk-config-options.cjs.entry.js +3 -0
- package/dist/cjs/snk-configurator_3.cjs.entry.js +5 -1
- package/dist/cjs/snk-filter-bar_7.cjs.entry.js +36 -5
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +7 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +10 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +7 -0
- package/dist/cjs/snk-filter-number.cjs.entry.js +7 -0
- package/dist/cjs/snk-filter-period.cjs.entry.js +7 -0
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +6 -0
- package/dist/cjs/snk-filter-search.cjs.entry.js +6 -0
- package/dist/cjs/snk-filter-text.cjs.entry.js +7 -0
- package/dist/cjs/snk-form-config.cjs.entry.js +7 -2
- package/dist/cjs/snk-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -0
- package/dist/collection/components/snk-application/snk-application.js +1 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +7 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +7 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +7 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +7 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +7 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +7 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +7 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +10 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +10 -2
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +10 -2
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +11 -2
- package/dist/collection/components/snk-form/snk-form.js +1 -1
- package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +4 -1
- package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +5 -1
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +8 -3
- package/dist/collection/components/snk-grid/snk-grid.js +1 -1
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +9 -3
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +5 -1
- package/dist/components/snk-application2.js +1 -0
- package/dist/components/snk-config-options2.js +4 -1
- package/dist/components/snk-field-config2.js +5 -1
- package/dist/components/snk-filter-bar2.js +11 -2
- package/dist/components/snk-filter-binary-select.js +7 -0
- package/dist/components/snk-filter-detail2.js +10 -1
- package/dist/components/snk-filter-item2.js +10 -2
- package/dist/components/snk-filter-list2.js +10 -2
- package/dist/components/snk-filter-multi-select.js +7 -0
- package/dist/components/snk-filter-number.js +7 -0
- package/dist/components/snk-filter-period.js +7 -0
- package/dist/components/snk-filter-personalized.js +7 -1
- package/dist/components/snk-filter-search.js +7 -1
- package/dist/components/snk-filter-text.js +7 -0
- package/dist/components/snk-form-config2.js +8 -3
- package/dist/components/snk-form2.js +1 -1
- package/dist/components/snk-grid-config2.js +9 -3
- package/dist/components/snk-grid2.js +1 -1
- package/dist/components/snk-pesquisa2.js +5 -1
- package/dist/esm/snk-application.entry.js +1 -0
- package/dist/esm/snk-config-options.entry.js +4 -1
- package/dist/esm/snk-configurator_3.entry.js +6 -2
- package/dist/esm/snk-filter-bar_7.entry.js +37 -6
- package/dist/esm/snk-filter-binary-select.entry.js +8 -1
- package/dist/esm/snk-filter-detail.entry.js +11 -2
- package/dist/esm/snk-filter-multi-select.entry.js +8 -1
- package/dist/esm/snk-filter-number.entry.js +8 -1
- package/dist/esm/snk-filter-period.entry.js +8 -1
- package/dist/esm/snk-filter-personalized.entry.js +8 -2
- package/dist/esm/snk-filter-search.entry.js +8 -2
- package/dist/esm/snk-filter-text.entry.js +8 -1
- package/dist/esm/snk-form-config.entry.js +9 -4
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/snk-pesquisa.entry.js +6 -2
- package/dist/sankhyablocks/{p-105cd4a8.entry.js → p-0ffee54f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-639b8f6e.entry.js → p-137962ed.entry.js} +1 -1
- package/dist/sankhyablocks/p-4f9aa0b0.entry.js +1 -0
- package/dist/sankhyablocks/p-570cc474.entry.js +1 -0
- package/dist/sankhyablocks/p-5fc34bc1.entry.js +1 -0
- package/dist/sankhyablocks/p-63229ecb.entry.js +1 -0
- package/dist/sankhyablocks/p-7dcce5aa.entry.js +1 -0
- package/dist/sankhyablocks/p-7e79ab39.entry.js +1 -0
- package/dist/sankhyablocks/p-8fca7910.entry.js +1 -0
- package/dist/sankhyablocks/p-b4e199d9.entry.js +1 -0
- package/dist/sankhyablocks/p-b5799889.entry.js +1 -0
- package/dist/sankhyablocks/p-bc41625b.entry.js +1 -0
- package/dist/sankhyablocks/p-da0a0b8c.entry.js +1 -0
- package/dist/sankhyablocks/p-df4efad2.entry.js +1 -0
- package/dist/sankhyablocks/p-f50c6ef6.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +3 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +3 -0
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +3 -0
- package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +1 -0
- package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +2 -0
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +2 -0
- package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +2 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +2 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-029ae4e4.entry.js +0 -1
- package/dist/sankhyablocks/p-12ad2a19.entry.js +0 -1
- package/dist/sankhyablocks/p-2dc76d79.entry.js +0 -1
- package/dist/sankhyablocks/p-3a276f3d.entry.js +0 -1
- package/dist/sankhyablocks/p-7481ab42.entry.js +0 -1
- package/dist/sankhyablocks/p-8dac0292.entry.js +0 -1
- package/dist/sankhyablocks/p-9465c10a.entry.js +0 -1
- package/dist/sankhyablocks/p-9dc4426d.entry.js +0 -1
- package/dist/sankhyablocks/p-ac71ef38.entry.js +0 -1
- package/dist/sankhyablocks/p-cc4bef9f.entry.js +0 -1
- package/dist/sankhyablocks/p-deb1f523.entry.js +0 -1
- package/dist/sankhyablocks/p-e9beab79.entry.js +0 -1
- package/dist/sankhyablocks/p-fa6ad58a.entry.js +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
3
4
|
|
|
4
5
|
const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -11,6 +12,11 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
11
12
|
const end = this._endDate.value;
|
|
12
13
|
this.value = (start || end ? { start, end } : undefined);
|
|
13
14
|
}
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
if (this._element) {
|
|
17
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
14
20
|
getDate(prop) {
|
|
15
21
|
const objValue = this.value ? this.value[prop] : null;
|
|
16
22
|
if (objValue instanceof Date) {
|
|
@@ -32,6 +38,7 @@ const SnkFilterPeriod$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
32
38
|
}
|
|
33
39
|
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") })));
|
|
34
40
|
}
|
|
41
|
+
get _element() { return this; }
|
|
35
42
|
}, [0, "snk-filter-period", {
|
|
36
43
|
"config": [16],
|
|
37
44
|
"value": [8],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { UserInterface, ApplicationContext } from '@sankhyalabs/core';
|
|
2
|
+
import { ElementIDUtils, UserInterface, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
4
4
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
@@ -9,6 +9,11 @@ const SnkFilterPersonalized$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
9
9
|
super();
|
|
10
10
|
this.__registerHost();
|
|
11
11
|
}
|
|
12
|
+
componentDidLoad() {
|
|
13
|
+
if (this._element) {
|
|
14
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
12
17
|
getValue(param, index) {
|
|
13
18
|
if (this.value && index >= 0 && index < this.value.length) {
|
|
14
19
|
const rawValue = this.value[index];
|
|
@@ -81,6 +86,7 @@ const SnkFilterPersonalized$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
81
86
|
}
|
|
82
87
|
return (h(Host, null, this.getParamsInterface()));
|
|
83
88
|
}
|
|
89
|
+
get _element() { return this; }
|
|
84
90
|
}, [0, "snk-filter-personalized", {
|
|
85
91
|
"config": [16],
|
|
86
92
|
"value": [1040],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { ApplicationContext } from '@sankhyalabs/core';
|
|
2
|
+
import { ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
4
4
|
|
|
5
5
|
const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -10,6 +10,11 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
10
10
|
ezChangeListener(_evt) {
|
|
11
11
|
this.value = this._searchInput.value;
|
|
12
12
|
}
|
|
13
|
+
componentDidLoad() {
|
|
14
|
+
if (this._element) {
|
|
15
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
13
18
|
doSearch(mode, argument) {
|
|
14
19
|
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
15
20
|
return new Promise((resolve, reject) => {
|
|
@@ -30,6 +35,7 @@ const SnkFilterSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
30
35
|
}
|
|
31
36
|
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) }));
|
|
32
37
|
}
|
|
38
|
+
get _element() { return this; }
|
|
33
39
|
}, [0, "snk-filter-search", {
|
|
34
40
|
"config": [16],
|
|
35
41
|
"value": [16],
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
|
|
3
4
|
const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
4
5
|
constructor() {
|
|
@@ -8,12 +9,18 @@ const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
8
9
|
ezChangeListener(evt) {
|
|
9
10
|
this.value = evt.detail;
|
|
10
11
|
}
|
|
12
|
+
componentDidLoad() {
|
|
13
|
+
if (this._element) {
|
|
14
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
11
17
|
render() {
|
|
12
18
|
if (!this.config) {
|
|
13
19
|
return undefined;
|
|
14
20
|
}
|
|
15
21
|
return (h("ez-text-input", { ref: ref => this._textInputElement = ref, label: this.config.label, value: this.config.value }));
|
|
16
22
|
}
|
|
23
|
+
get _element() { return this; }
|
|
17
24
|
}, [0, "snk-filter-text", {
|
|
18
25
|
"config": [16],
|
|
19
26
|
"value": [1]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { a as draggable_bundle, d as defineCustomElement$1 } from './snk-tab-config2.js';
|
|
3
|
-
import { ObjectUtils, ArrayUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
|
+
import { ObjectUtils, ArrayUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
4
4
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import { C as CONFIG_EVENTS, b as TAB_NAMES, A as ACTION_CONFIG, D as DEFAULT_TYPE } from './constants.js';
|
|
6
6
|
import { a as UserConfigType, C as ConfigStorage } from './ConfigStorage.js';
|
|
@@ -240,8 +240,8 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
240
240
|
var _a;
|
|
241
241
|
return ((_a = group.fields) === null || _a === void 0 ? void 0 : _a.length) ? group.fields.map((field) => {
|
|
242
242
|
var _a, _b;
|
|
243
|
-
return h("div", { key: field.name, class: this.getFieldConfigStyle(field), "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, h("snk-field-config", { onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, modeInsertion: false, fieldConfig: field, dataUnit: this.dataUnit, isConfigActive: ((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === field.name }), ((_b = this._fieldConfigSelected) === null || _b === void 0 ? void 0 : _b.name) === field.name &&
|
|
244
|
-
h("div", { class: "ez-flex form-config__config-options" }, h("snk-config-options", { idConfig: field.name, dataUnit: this.dataUnit, fieldConfig: this._fieldConfigSelected, onConfigOptionsChanged: (evt) => this.handleconfigOptionsChanged(evt.detail) })));
|
|
243
|
+
return h("div", { key: field.name, class: this.getFieldConfigStyle(field), "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, h("snk-field-config", { onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, modeInsertion: false, fieldConfig: field, "data-element-id": this._element.getAttribute("data-element-id"), dataUnit: this.dataUnit, isConfigActive: ((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === field.name }), ((_b = this._fieldConfigSelected) === null || _b === void 0 ? void 0 : _b.name) === field.name &&
|
|
244
|
+
h("div", { class: "ez-flex form-config__config-options" }, h("snk-config-options", { idConfig: field.name, dataUnit: this.dataUnit, fieldConfig: this._fieldConfigSelected, "data-element-id": this._element.getAttribute("data-element-id"), onConfigOptionsChanged: (evt) => this.handleconfigOptionsChanged(evt.detail) })));
|
|
245
245
|
}) : h("div", { class: "form-config__add-group-container" }, h("div", { class: "form-config__add-group-content" }, h("div", { class: "form-config__add-group-label" }, h("label", { class: "ez-text ez-text--center ez-text--medium ez-text--primary ez-text--bold" }, this.getMessage("snkFormConfig.form.labelDropField")))));
|
|
246
246
|
}
|
|
247
247
|
handleconfigOptionsChanged(fieldEdited) {
|
|
@@ -944,6 +944,10 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
944
944
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
945
945
|
this.loadConfig();
|
|
946
946
|
}
|
|
947
|
+
componentDidLoad() {
|
|
948
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
949
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
950
|
+
}
|
|
947
951
|
render() {
|
|
948
952
|
var _a, _b, _c, _d;
|
|
949
953
|
const configOptions = this._formConfigOptions.map((option) => {
|
|
@@ -967,6 +971,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
967
971
|
}), this.renderTempGroupByTab(tab.tab))), h("div", { class: "form-config__btn-add-group ez-row" }, h("div", { class: "form-config__btn-add-group-container ez-col ez-col--sd-12 ez-col--tb-12 ez-align--center" }, h("ez-button", { label: this.getMessage("snkFormConfig.form.labelNewGroup"), class: "ez-padding-horizontal--small ez-button--primary", size: "small", onClick: () => this.addNewGroup() }, h("ez-icon", { class: "ez-margin-right--small", slot: "leftIcon", iconName: "plus" })))))), h("div", { class: "form-config__fields-available ez-col ez-col--sd-3 ez-col--tb-3" }, h("section", { class: "ez-box__container ez-col ez-col--pn-12" }, h("h1", { class: "ez-title ez-title--large ez-title--primary ez-padding-bottom--medium" }, this.getMessage("snkFormConfig.availableFields.title")), h("ez-filter-input", { ref: ref => this._filterFieldsAvailable = ref, label: this.getMessage("snkFormConfig.availableFields.labelSearchField"), onEzChange: evt => this.onFilterChange(evt.detail) }), h("span", { class: "ez-box__label-counter ez-text ez-text--medium ez-text--primary ez-margin-bottom--medium" }, this.handleLabelCounter((_c = this._fieldsAvailable) === null || _c === void 0 ? void 0 : _c.length)), ((_d = this._layoutFormConfig) === null || _d === void 0 ? void 0 : _d.length) > 0 &&
|
|
968
972
|
h("div", { id: CONTAINER_ID.fieldsAvailable, class: "ez-row", "data-draggable-parent": "field" }, this.orderFieldsAvailable(this._fieldsAvailable).map((field) => h("div", { key: field.name, class: this._fieldsAvailableStyle, "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, h("snk-field-config", { onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, dataUnit: this.dataUnit, fieldConfig: field })))))))));
|
|
969
973
|
}
|
|
974
|
+
get _element() { return this; }
|
|
970
975
|
static get watchers() { return {
|
|
971
976
|
"formConfig": ["observeFormConfig"]
|
|
972
977
|
}; }
|
|
@@ -189,7 +189,7 @@ const SnkForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
189
189
|
return undefined;
|
|
190
190
|
}
|
|
191
191
|
return (h("section", { class: "snk-form" }, h("div", { class: "snk-form__header snk-form__header--fixed ez-row" }, h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6", key: "formHeader" }, h("ez-button", { title: this.getMessage("snkForm.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small", onClick: () => this.exitForm() }), h("h1", { class: "ez-title ez-title--primary ez-title--xlarge ez-align--middle" }, this.getMessage("snkForm.title"))), h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6 ez-align--right" }, h("snk-taskbar", { key: "formTaskbar", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, primaryButton: ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", dataUnit: this._dataUnit }))), h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, dataUnit: this._dataUnit, config: this.getFormConfig(), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
|
|
192
|
-
h("snk-form-config", { dataUnit: this._dataUnit, formConfig: this.getFormConfig(), configName: this.configName, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigClose: () => this.closeConfig() }))))));
|
|
192
|
+
h("snk-form-config", { dataUnit: this._dataUnit, formConfig: this.getFormConfig(), "data-element-id": this._element.getAttribute("data-element-id"), configName: this.configName, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigClose: () => this.closeConfig() }))))));
|
|
193
193
|
}
|
|
194
194
|
get _element() { return this; }
|
|
195
195
|
static get style() { return snkFormCss; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { StringUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
2
|
+
import { StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
|
5
5
|
import { O as ORDER_VALUES } from './constants.js';
|
|
@@ -108,14 +108,16 @@ const EzGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
108
108
|
this._columListItems = [visibleGroup, hiddenGroup];
|
|
109
109
|
}
|
|
110
110
|
buildColumnListSlot(item, group) {
|
|
111
|
-
|
|
111
|
+
const dataElementId = `${this._element.getAttribute("data-element-id")}_configItem_${StringUtils.toCamelCase(item.label)}`;
|
|
112
|
+
return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + ((item === null || item === void 0 ? void 0 : item.label) || '') + ((group === null || group === void 0 ? void 0 : group.group) || ''), value: group.group === this.getMessage("snkGridConfig.group.visible"), "data-element-id": dataElementId, onEzChange: (evt) => { this.switchColumnGroup(evt, item); } })));
|
|
112
113
|
}
|
|
113
114
|
buildOrderListSlot(item) {
|
|
115
|
+
const dataElementId = `${this._element.getAttribute("data-element-id")}_configItem_${StringUtils.toCamelCase(item.label)}`;
|
|
114
116
|
let selectedOption = ORDER_VALUES.none.value;
|
|
115
117
|
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
|
116
118
|
selectedOption = item.ascending == true ? ORDER_VALUES.asc.value : ORDER_VALUES.desc.value;
|
|
117
119
|
}
|
|
118
|
-
return (h("div", null, h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (evt) => { evt.stopPropagation(); this.updateOrder(evt.detail, item.label); } })));
|
|
120
|
+
return (h("div", null, h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, "data-element-id": dataElementId, onEzChange: (evt) => { evt.stopPropagation(); this.updateOrder(evt.detail, item.label); } })));
|
|
119
121
|
}
|
|
120
122
|
updateOrder(sortOrder, updatedItemLabel) {
|
|
121
123
|
var _a;
|
|
@@ -465,10 +467,14 @@ const EzGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
465
467
|
componentWillLoad() {
|
|
466
468
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
467
469
|
}
|
|
470
|
+
componentDidLoad() {
|
|
471
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
472
|
+
}
|
|
468
473
|
render() {
|
|
469
474
|
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, this.getMessage("snkGridConfig.gridConfiguration")), h("label", { class: "subtitle" }, this.getMessage("snkGridConfig.columnVisibilityOrder"))), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedIndex: this.selectedIndex, onEzChange: (evt) => { this.handleTabChange(evt.detail); }, tabs: this.getColumnNames() })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: this.getMessage("snkGridConfig.findColumn"), onKeyUp: (evt) => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedIndex === 0 ? "" : "hidden", dataSource: this._columListItems, onEzChange: (evt) => this.handleColumnListChange(evt), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("div", { class: this.selectedIndex === 1 ? "group-name" : "hidden" }, this.getMessage("snkGridConfig.info.sortingSequence")), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedIndex === 1 ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: (evt) => this.handleOrderListChange(evt), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: this.getMessage("snkGridConfig.cancel"), onClick: () => this.closeConfig() }), h("ez-button", { label: this.getMessage("snkGridConfig.complete"), class: "ez-button--primary", onClick: () => this.finish() }))));
|
|
470
475
|
}
|
|
471
476
|
static get assetsDirs() { return ["../assets"]; }
|
|
477
|
+
get _element() { return this; }
|
|
472
478
|
static get style() { return snkGridConfigCss; }
|
|
473
479
|
}, [2, "snk-grid-config", {
|
|
474
480
|
"selectedIndex": [1026, "selected-index"],
|
|
@@ -116,7 +116,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
116
116
|
if (!this._dataUnit) {
|
|
117
117
|
return undefined;
|
|
118
118
|
}
|
|
119
|
-
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", { dataUnit: this._dataUnit, class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), 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", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, 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(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, selectedIndex: 0, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
|
|
119
|
+
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", { dataUnit: this._dataUnit, class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), 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", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, 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(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute("data-element-id"), selectedIndex: 0, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
|
|
120
120
|
}
|
|
121
121
|
get _element() { return this; }
|
|
122
122
|
static get style() { return snkGridCss; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { ObjectUtils, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
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
|
|
|
@@ -295,6 +295,9 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
295
295
|
: 'Nenhum registro encontrado'
|
|
296
296
|
: 'Os resultados de sua pesquisa aparecerão aqui...';
|
|
297
297
|
}
|
|
298
|
+
componentDidLoad() {
|
|
299
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
300
|
+
}
|
|
298
301
|
render() {
|
|
299
302
|
var _a;
|
|
300
303
|
return (h(Host, null, h("div", { class: "snk-pesquisa" }, h("div", { class: "snk-pesquisa__input" }, h("ez-text-input", { label: "Buscar", class: "ez-margin-right--medium", canShowError: false, ref: (ref) => this._textInput = ref, onEzChange: (event) => this.onChangeValue(event), value: this.argument }, h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
|
|
@@ -303,6 +306,7 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
303
306
|
return (h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
|
|
304
307
|
})))));
|
|
305
308
|
}
|
|
309
|
+
get _element() { return this; }
|
|
306
310
|
static get watchers() { return {
|
|
307
311
|
"argument": ["observeArgument"]
|
|
308
312
|
}; }
|
|
@@ -1170,6 +1170,7 @@ const SnkApplication = class {
|
|
|
1170
1170
|
if (mode === "ADVANCED") {
|
|
1171
1171
|
return new Promise(accept => {
|
|
1172
1172
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
1173
|
+
pesquisaContent["data-element-id"] = `entity_${entity}`;
|
|
1173
1174
|
pesquisaContent.argument = argument;
|
|
1174
1175
|
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
1175
1176
|
pesquisaContent.selectItem = (option) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-e4121713.js';
|
|
2
|
-
import { UserInterface, ObjectUtils, StringUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
2
|
+
import { UserInterface, ObjectUtils, StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { DataType, getConvertedValue } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
4
4
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import { V as VARS_BY_TYPE, D as DEFAULT_TYPE, a as TAGS_BY_TYPE } from './constants-babe1a08.js';
|
|
@@ -216,6 +216,9 @@ const SnkConfigOptions = class {
|
|
|
216
216
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
217
217
|
this._fieldProperties = this.getFieldProperties((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.name);
|
|
218
218
|
}
|
|
219
|
+
componentDidLoad() {
|
|
220
|
+
ElementIDUtils.addIDInfo(this._element, this.fieldConfig.name);
|
|
221
|
+
}
|
|
219
222
|
render() {
|
|
220
223
|
var _a, _b;
|
|
221
224
|
return (h(Host, null, h("div", { id: this.idConfig }, h("div", { class: "ez-row ez-padding--medium" }, h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, h("ez-text-input", { label: this.getMessage("snkConfigOptions.label.nameField"), value: (_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.label, onEzChange: (evt) => { this.fieldConfig.label = evt.detail; this.configOptionsChanged.emit(this.fieldConfig); } })), h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, h("ez-combo-box", { label: this.getMessage("snkConfigOptions.label.typeValueDefault"), suppressEmptyOption: true, enabled: this.enabledValueDefault(), onEzChange: (evt) => { var _a; return this.onConfigDefault((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); }, value: this.getDefaultType() }, h("option", { value: DEFAULT_TYPE.fixed }, this.getMessage("snkConfigOptions.options.valueFixed")), h("option", { value: DEFAULT_TYPE.variable }, this.getMessage("snkConfigOptions.options.variable")))), h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, this._defaultType === DEFAULT_TYPE.variable ?
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-e4121713.js';
|
|
2
|
-
import { ApplicationContext } from '@sankhyalabs/core';
|
|
2
|
+
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { c as VIEW_MODE, A as ACTION_CONFIG } from './constants-babe1a08.js';
|
|
4
4
|
import { A as AuthorizationConfig } from './AuthorizationConfig-dcbd207a.js';
|
|
5
5
|
import { T as TaskbarProcessor } from './taskbar-processor-aa6772c9.js';
|
|
@@ -130,6 +130,9 @@ const SnkFieldConfig = class {
|
|
|
130
130
|
componentWillLoad() {
|
|
131
131
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
132
132
|
}
|
|
133
|
+
componentDidLoad() {
|
|
134
|
+
ElementIDUtils.addIDInfo(this._element, this.fieldConfig.name);
|
|
135
|
+
}
|
|
133
136
|
render() {
|
|
134
137
|
if (this.fieldConfig == undefined) {
|
|
135
138
|
return;
|
|
@@ -138,6 +141,7 @@ const SnkFieldConfig = class {
|
|
|
138
141
|
h("div", { class: "field-config__add" }, h("ez-button", { onClick: (evt) => this.handleAction(evt, ACTION_CONFIG.add), mode: "icon", class: "ez-button--tertiary", iconName: "plus", size: "large", title: this.getMessage("snkFieldConfig.titleAdd") })) :
|
|
139
142
|
h("div", { class: "field-config__options" + (this.isConfigActive ? " field-config__options--is-active" : " ") }, h("ez-button", { mode: "icon", class: "ez-button--tertiary field-config__remove-icon", onClick: (evt) => this.handleAction(evt, ACTION_CONFIG.remove), iconName: "minus", size: "large", title: this.getMessage("snkFieldConfig.titleRemove") }), h("ez-button", { id: "buttonConfig_" + this.fieldConfig.name, mode: "icon", class: "ez-button--tertiary", onClick: (evt) => this.handleAction(evt, ACTION_CONFIG.configuration), iconName: this.isConfigActive ? "chevron-up" : "settings-inverted", size: "large", title: this.getMessage("snkFieldConfig.titleConfigurations") }))), this.isConfigActive && h("div", { class: "field-config__config-popover" }, h("div", { class: "field-config__config-outer-arrow" }, h("div", { class: "field-config__config-inner-arrow" })))));
|
|
140
143
|
}
|
|
144
|
+
get _element() { return getElement(this); }
|
|
141
145
|
};
|
|
142
146
|
SnkFieldConfig.style = snkFieldConfigCss;
|
|
143
147
|
|
|
@@ -246,7 +250,7 @@ const SnkGrid = class {
|
|
|
246
250
|
if (!this._dataUnit) {
|
|
247
251
|
return undefined;
|
|
248
252
|
}
|
|
249
|
-
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", { dataUnit: this._dataUnit, class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), 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", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, 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(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, selectedIndex: 0, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
|
|
253
|
+
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", { dataUnit: this._dataUnit, class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), 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", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, 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(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute("data-element-id"), selectedIndex: 0, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
|
|
250
254
|
}
|
|
251
255
|
get _element() { return getElement(this); }
|
|
252
256
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-e4121713.js';
|
|
2
|
-
import { DataType, ObjectUtils, StringUtils, ErrorException, ApplicationContext, FloatingManager, ArrayUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { DataType, ObjectUtils, ElementIDUtils, StringUtils, ErrorException, ApplicationContext, FloatingManager, ArrayUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
import { ModalAction, ModalButtonStatus } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
5
5
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
@@ -157,6 +157,15 @@ const SnkFilterBar = class {
|
|
|
157
157
|
}
|
|
158
158
|
this.processAfterUpdateConfig();
|
|
159
159
|
}
|
|
160
|
+
componentDidLoad() {
|
|
161
|
+
if (this._element) {
|
|
162
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
163
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
164
|
+
const dataElementIdFilterBar = this._element.getAttribute("data-element-id");
|
|
165
|
+
this._idSnkFilterItem = dataElementIdFilterBar;
|
|
166
|
+
this._idSnkFilterList = dataElementIdFilterBar;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
160
169
|
processPendingFilter() {
|
|
161
170
|
if (this._pendingFilters.length > 0 && this._currentPendingFilter == undefined) {
|
|
162
171
|
this._currentPendingFilter = this._element.querySelector("#filter-" + this._pendingFilters.pop());
|
|
@@ -468,7 +477,7 @@ const SnkFilterBar = class {
|
|
|
468
477
|
if (!this.dataUnit || !this.filterConfig || this.filterConfig.length === 0) {
|
|
469
478
|
return undefined;
|
|
470
479
|
}
|
|
471
|
-
return (h(Host, null, h("ez-scroller", { direction: "horizontal", activeShadow: true, locked: this.scrollerLocked }, this.getFilterItems()), h("snk-filter-list", { id: APPLIED_FILTERS, onFocusin: () => this.itemFocused(APPLIED_FILTERS), items: this.getAppliedListItems(), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyAppliedFiltersList"), findFilterText: this.getMessage("snkFilterBar.findFilter"), iconName: "filter", class: "ez-padding-left--medium", buttonClass: this.getActiveClass(), onSnkItemSelected: evt => this.appliedFilterHandler(evt.detail) }), h("snk-filter-list", { id: ADD_FILTER, onFocusin: () => this.itemFocused(ADD_FILTER), items: this.getAddListItems(), label: this.getMessage("snkFilterBar.addFilter"), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyFiltersList"), findFilterText: this.getMessage("snkFilterBar.findField"), class: "ez-padding-left--medium", onSnkItemSelected: evt => this.addFilterHandler(evt.detail) }, h("ez-icon", { slot: "leftIcon", class: "ez-padding-right--small", iconName: "plus" }))));
|
|
480
|
+
return (h(Host, null, h("ez-scroller", { direction: "horizontal", activeShadow: true, locked: this.scrollerLocked }, this.getFilterItems()), h("snk-filter-list", { id: APPLIED_FILTERS, onFocusin: () => this.itemFocused(APPLIED_FILTERS), items: this.getAppliedListItems(), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyAppliedFiltersList"), findFilterText: this.getMessage("snkFilterBar.findFilter"), iconName: "filter", class: "ez-padding-left--medium", buttonClass: this.getActiveClass(), onSnkItemSelected: evt => this.appliedFilterHandler(evt.detail), "data-element-id": this._idSnkFilterList }), h("snk-filter-list", { id: ADD_FILTER, onFocusin: () => this.itemFocused(ADD_FILTER), items: this.getAddListItems(), label: this.getMessage("snkFilterBar.addFilter"), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyFiltersList"), findFilterText: this.getMessage("snkFilterBar.findField"), class: "ez-padding-left--medium", onSnkItemSelected: evt => this.addFilterHandler(evt.detail), "data-element-id": this._idSnkFilterList }, h("ez-icon", { slot: "leftIcon", class: "ez-padding-right--small", iconName: "plus" }))));
|
|
472
481
|
}
|
|
473
482
|
get _element() { return getElement(this); }
|
|
474
483
|
static get watchers() { return {
|
|
@@ -612,6 +621,14 @@ const SnkFilterItem = class {
|
|
|
612
621
|
}
|
|
613
622
|
return label;
|
|
614
623
|
}
|
|
624
|
+
componentDidLoad() {
|
|
625
|
+
if (this._filterItemElement) {
|
|
626
|
+
ElementIDUtils.addIDInfo(this._filterItemElement);
|
|
627
|
+
const dataElementIdDoFilterItem = this._filterItemElement.getAttribute("data-element-id");
|
|
628
|
+
this._idSnkFilterDetail = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
629
|
+
this._idEzChip = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
615
632
|
componentDidRender() {
|
|
616
633
|
if (this._floatingID == undefined) {
|
|
617
634
|
if (this._popover) {
|
|
@@ -639,7 +656,7 @@ const SnkFilterItem = class {
|
|
|
639
656
|
}
|
|
640
657
|
render() {
|
|
641
658
|
const leftIcon = this.getLeftIconName();
|
|
642
|
-
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 }))));
|
|
659
|
+
return (h(Host, null, h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined, "data-element-id": this._idEzChip }, 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, "data-element-id": this._idSnkFilterDetail }))));
|
|
643
660
|
}
|
|
644
661
|
get _filterItemElement() { return getElement(this); }
|
|
645
662
|
static get watchers() { return {
|
|
@@ -692,6 +709,11 @@ const SnkFilterList = class {
|
|
|
692
709
|
this.showDetail();
|
|
693
710
|
}
|
|
694
711
|
}
|
|
712
|
+
componentDidLoad() {
|
|
713
|
+
if (this._element) {
|
|
714
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
695
717
|
componentDidRender() {
|
|
696
718
|
if (this._floatingID == undefined) {
|
|
697
719
|
if (this._popover) {
|
|
@@ -701,7 +723,10 @@ const SnkFilterList = class {
|
|
|
701
723
|
}
|
|
702
724
|
buildItemElement(item) {
|
|
703
725
|
const itemId = ++this._selectableItemsCount;
|
|
704
|
-
|
|
726
|
+
if (this._buttonElement) {
|
|
727
|
+
ElementIDUtils.addIDInfo(this._buttonElement);
|
|
728
|
+
}
|
|
729
|
+
return (h("button", { id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name), ref: (el) => this._buttonElement = el }, 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)));
|
|
705
730
|
}
|
|
706
731
|
itemSelected(itemName) {
|
|
707
732
|
if (itemName === SHOW_MORE_ITEM_NAME) {
|
|
@@ -925,14 +950,16 @@ const EzGridConfig = class {
|
|
|
925
950
|
this._columListItems = [visibleGroup, hiddenGroup];
|
|
926
951
|
}
|
|
927
952
|
buildColumnListSlot(item, group) {
|
|
928
|
-
|
|
953
|
+
const dataElementId = `${this._element.getAttribute("data-element-id")}_configItem_${StringUtils.toCamelCase(item.label)}`;
|
|
954
|
+
return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + ((item === null || item === void 0 ? void 0 : item.label) || '') + ((group === null || group === void 0 ? void 0 : group.group) || ''), value: group.group === this.getMessage("snkGridConfig.group.visible"), "data-element-id": dataElementId, onEzChange: (evt) => { this.switchColumnGroup(evt, item); } })));
|
|
929
955
|
}
|
|
930
956
|
buildOrderListSlot(item) {
|
|
957
|
+
const dataElementId = `${this._element.getAttribute("data-element-id")}_configItem_${StringUtils.toCamelCase(item.label)}`;
|
|
931
958
|
let selectedOption = ORDER_VALUES.none.value;
|
|
932
959
|
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
|
933
960
|
selectedOption = item.ascending == true ? ORDER_VALUES.asc.value : ORDER_VALUES.desc.value;
|
|
934
961
|
}
|
|
935
|
-
return (h("div", null, h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (evt) => { evt.stopPropagation(); this.updateOrder(evt.detail, item.label); } })));
|
|
962
|
+
return (h("div", null, h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, "data-element-id": dataElementId, onEzChange: (evt) => { evt.stopPropagation(); this.updateOrder(evt.detail, item.label); } })));
|
|
936
963
|
}
|
|
937
964
|
updateOrder(sortOrder, updatedItemLabel) {
|
|
938
965
|
var _a;
|
|
@@ -1282,10 +1309,14 @@ const EzGridConfig = class {
|
|
|
1282
1309
|
componentWillLoad() {
|
|
1283
1310
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
1284
1311
|
}
|
|
1312
|
+
componentDidLoad() {
|
|
1313
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
1314
|
+
}
|
|
1285
1315
|
render() {
|
|
1286
1316
|
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, this.getMessage("snkGridConfig.gridConfiguration")), h("label", { class: "subtitle" }, this.getMessage("snkGridConfig.columnVisibilityOrder"))), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedIndex: this.selectedIndex, onEzChange: (evt) => { this.handleTabChange(evt.detail); }, tabs: this.getColumnNames() })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: this.getMessage("snkGridConfig.findColumn"), onKeyUp: (evt) => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedIndex === 0 ? "" : "hidden", dataSource: this._columListItems, onEzChange: (evt) => this.handleColumnListChange(evt), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("div", { class: this.selectedIndex === 1 ? "group-name" : "hidden" }, this.getMessage("snkGridConfig.info.sortingSequence")), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedIndex === 1 ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: (evt) => this.handleOrderListChange(evt), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: this.getMessage("snkGridConfig.cancel"), onClick: () => this.closeConfig() }), h("ez-button", { label: this.getMessage("snkGridConfig.complete"), class: "ez-button--primary", onClick: () => this.finish() }))));
|
|
1287
1317
|
}
|
|
1288
1318
|
static get assetsDirs() { return ["../assets"]; }
|
|
1319
|
+
get _element() { return getElement(this); }
|
|
1289
1320
|
};
|
|
1290
1321
|
EzGridConfig.style = snkGridConfigCss;
|
|
1291
1322
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-e4121713.js';
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-e4121713.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
3
4
|
|
|
4
5
|
const SnkFilterBinarySelect = class {
|
|
@@ -14,6 +15,11 @@ const SnkFilterBinarySelect = class {
|
|
|
14
15
|
}
|
|
15
16
|
this.updateValue();
|
|
16
17
|
}
|
|
18
|
+
componentDidLoad() {
|
|
19
|
+
if (this._element) {
|
|
20
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
17
23
|
assertCheckedOption(updatingCheck) {
|
|
18
24
|
if (updatingCheck === this._checkOne) {
|
|
19
25
|
this._checkTwo.value = true;
|
|
@@ -41,6 +47,7 @@ const SnkFilterBinarySelect = class {
|
|
|
41
47
|
const [optOne, optTwo] = this.config.props.options;
|
|
42
48
|
return (h(Host, null, h("ez-check", { label: optOne.label, class: "sc-snk-filter-bar editor__ez-check", ref: (ref) => this._checkOne = ref, value: this.isSelected(optOne.name) }), h("ez-check", { label: optTwo.label, class: "sc-snk-filter-bar editor__ez-check", ref: (ref) => this._checkTwo = ref, value: this.isSelected(optTwo.name) })));
|
|
43
49
|
}
|
|
50
|
+
get _element() { return getElement(this); }
|
|
44
51
|
};
|
|
45
52
|
|
|
46
53
|
export { SnkFilterBinarySelect as snk_filter_binary_select };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-e4121713.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-e4121713.js';
|
|
2
2
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
4
5
|
|
|
5
6
|
const SnkFilterDetail = class {
|
|
6
7
|
constructor(hostRef) {
|
|
@@ -10,6 +11,13 @@ const SnkFilterDetail = class {
|
|
|
10
11
|
async show() {
|
|
11
12
|
this._editor["show"]();
|
|
12
13
|
}
|
|
14
|
+
componentDidLoad() {
|
|
15
|
+
if (this._element) {
|
|
16
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
17
|
+
const dataElementIdDoFilterItem = this._element.getAttribute("data-element-id");
|
|
18
|
+
this._idContentEditor = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
13
21
|
changeConfig(newConfig) {
|
|
14
22
|
this.filterChange.emit(newConfig);
|
|
15
23
|
}
|
|
@@ -95,8 +103,9 @@ const SnkFilterDetail = class {
|
|
|
95
103
|
}
|
|
96
104
|
render() {
|
|
97
105
|
const ContentEditor = this.getContentEditor();
|
|
98
|
-
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, onKeyDown: evt => this.onKeyDonwListener(evt) }), 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", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
|
|
106
|
+
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, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor }), 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", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
|
|
99
107
|
}
|
|
108
|
+
get _element() { return getElement(this); }
|
|
100
109
|
};
|
|
101
110
|
|
|
102
111
|
export { SnkFilterDetail as snk_filter_detail };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-e4121713.js';
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-e4121713.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
3
4
|
|
|
4
5
|
const SnkFilterMultiSelect = class {
|
|
@@ -11,12 +12,18 @@ const SnkFilterMultiSelect = class {
|
|
|
11
12
|
async show() {
|
|
12
13
|
this._comboElement.setFocus();
|
|
13
14
|
}
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
if (this._element) {
|
|
17
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
14
20
|
render() {
|
|
15
21
|
if (!this.config || this.config.type !== FilterItemType.MULTI_SELECT) {
|
|
16
22
|
return undefined;
|
|
17
23
|
}
|
|
18
24
|
return (h("ez-combo-box", { ref: ref => this._comboElement = ref, label: this.config.label, value: this.config.value, options: this.config.props.options }));
|
|
19
25
|
}
|
|
26
|
+
get _element() { return getElement(this); }
|
|
20
27
|
};
|
|
21
28
|
|
|
22
29
|
export { SnkFilterMultiSelect as snk_filter_multi_select };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-e4121713.js';
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-e4121713.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
3
4
|
|
|
4
5
|
const SnkFilterPeriod = class {
|
|
@@ -11,6 +12,11 @@ const SnkFilterPeriod = class {
|
|
|
11
12
|
async show() {
|
|
12
13
|
this._numberElement.setFocus();
|
|
13
14
|
}
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
if (this._element) {
|
|
17
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
14
20
|
render() {
|
|
15
21
|
var _a;
|
|
16
22
|
if (!this.config || this.config.type !== FilterItemType.NUMBER) {
|
|
@@ -18,6 +24,7 @@ const SnkFilterPeriod = class {
|
|
|
18
24
|
}
|
|
19
25
|
return (h("ez-number-input", { ref: ref => this._numberElement = ref, label: this.config.label, value: this.config.value, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision }));
|
|
20
26
|
}
|
|
27
|
+
get _element() { return getElement(this); }
|
|
21
28
|
};
|
|
22
29
|
|
|
23
30
|
export { SnkFilterPeriod as snk_filter_number };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-e4121713.js';
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-e4121713.js';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
2
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
3
4
|
|
|
4
5
|
const SnkFilterPeriod = class {
|
|
@@ -10,6 +11,11 @@ const SnkFilterPeriod = class {
|
|
|
10
11
|
const end = this._endDate.value;
|
|
11
12
|
this.value = (start || end ? { start, end } : undefined);
|
|
12
13
|
}
|
|
14
|
+
componentDidLoad() {
|
|
15
|
+
if (this._element) {
|
|
16
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
13
19
|
getDate(prop) {
|
|
14
20
|
const objValue = this.value ? this.value[prop] : null;
|
|
15
21
|
if (objValue instanceof Date) {
|
|
@@ -31,6 +37,7 @@ const SnkFilterPeriod = class {
|
|
|
31
37
|
}
|
|
32
38
|
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") })));
|
|
33
39
|
}
|
|
40
|
+
get _element() { return getElement(this); }
|
|
34
41
|
};
|
|
35
42
|
|
|
36
43
|
export { SnkFilterPeriod as snk_filter_period };
|