@sankhyalabs/sankhyablocks 2.1.7 → 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 +40 -6
- 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/filter-modal/snk-filter-modal.css +5 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +11 -1
- 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-modal2.js +4 -1
- 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 +41 -7
- 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-53706b41.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
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { ApplicationContext } from '@sankhyalabs/core';
|
|
1
|
+
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
2
2
|
import { h } from '@stencil/core';
|
|
3
3
|
import FilterItemType from '../filter-item-type.enum';
|
|
4
4
|
export class SnkFilterSearch {
|
|
5
5
|
ezChangeListener(_evt) {
|
|
6
6
|
this.value = this._searchInput.value;
|
|
7
7
|
}
|
|
8
|
+
componentDidLoad() {
|
|
9
|
+
if (this._element) {
|
|
10
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
8
13
|
doSearch(mode, argument) {
|
|
9
14
|
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
10
15
|
return new Promise((resolve, reject) => {
|
|
@@ -90,6 +95,7 @@ export class SnkFilterSearch {
|
|
|
90
95
|
}
|
|
91
96
|
};
|
|
92
97
|
}
|
|
98
|
+
static get elementRef() { return "_element"; }
|
|
93
99
|
static get listeners() {
|
|
94
100
|
return [{
|
|
95
101
|
"name": "ezChange",
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
1
2
|
import { h } from '@stencil/core';
|
|
2
3
|
export class SnkFilterText {
|
|
3
4
|
ezChangeListener(evt) {
|
|
4
5
|
this.value = evt.detail;
|
|
5
6
|
}
|
|
7
|
+
componentDidLoad() {
|
|
8
|
+
if (this._element) {
|
|
9
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
6
12
|
render() {
|
|
7
13
|
if (!this.config) {
|
|
8
14
|
return undefined;
|
|
@@ -51,6 +57,7 @@ export class SnkFilterText {
|
|
|
51
57
|
}
|
|
52
58
|
};
|
|
53
59
|
}
|
|
60
|
+
static get elementRef() { return "_element"; }
|
|
54
61
|
static get listeners() {
|
|
55
62
|
return [{
|
|
56
63
|
"name": "ezChange",
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
|
2
2
|
import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
|
3
3
|
import FilterItemType from './filter-item-type.enum';
|
|
4
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
4
5
|
export class SnkFilterDetail {
|
|
5
6
|
async show() {
|
|
6
7
|
this._editor["show"]();
|
|
7
8
|
}
|
|
9
|
+
componentDidLoad() {
|
|
10
|
+
if (this._element) {
|
|
11
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
12
|
+
const dataElementIdDoFilterItem = this._element.getAttribute("data-element-id");
|
|
13
|
+
this._idContentEditor = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
8
16
|
changeConfig(newConfig) {
|
|
9
17
|
this.filterChange.emit(newConfig);
|
|
10
18
|
}
|
|
@@ -90,7 +98,7 @@ export class SnkFilterDetail {
|
|
|
90
98
|
}
|
|
91
99
|
render() {
|
|
92
100
|
const ContentEditor = this.getContentEditor();
|
|
93
|
-
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" }))));
|
|
101
|
+
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" }))));
|
|
94
102
|
}
|
|
95
103
|
static get is() { return "snk-filter-detail"; }
|
|
96
104
|
static get properties() {
|
|
@@ -175,4 +183,5 @@ export class SnkFilterDetail {
|
|
|
175
183
|
}
|
|
176
184
|
};
|
|
177
185
|
}
|
|
186
|
+
static get elementRef() { return "_element"; }
|
|
178
187
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FloatingManager } from '@sankhyalabs/core';
|
|
1
|
+
import { ElementIDUtils, FloatingManager } from '@sankhyalabs/core';
|
|
2
2
|
import { h, Host } from '@stencil/core';
|
|
3
3
|
import FilterItemType from './filter-item-type.enum';
|
|
4
4
|
export class SnkFilterItem {
|
|
@@ -133,6 +133,14 @@ export class SnkFilterItem {
|
|
|
133
133
|
}
|
|
134
134
|
return label;
|
|
135
135
|
}
|
|
136
|
+
componentDidLoad() {
|
|
137
|
+
if (this._filterItemElement) {
|
|
138
|
+
ElementIDUtils.addIDInfo(this._filterItemElement);
|
|
139
|
+
const dataElementIdDoFilterItem = this._filterItemElement.getAttribute("data-element-id");
|
|
140
|
+
this._idSnkFilterDetail = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
141
|
+
this._idEzChip = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
136
144
|
componentDidRender() {
|
|
137
145
|
if (this._floatingID == undefined) {
|
|
138
146
|
if (this._popover) {
|
|
@@ -160,7 +168,7 @@ export class SnkFilterItem {
|
|
|
160
168
|
}
|
|
161
169
|
render() {
|
|
162
170
|
const leftIcon = this.getLeftIconName();
|
|
163
|
-
return (h(Host, null, h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem, key: this.config.id }))));
|
|
171
|
+
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 }))));
|
|
164
172
|
}
|
|
165
173
|
static get is() { return "snk-filter-item"; }
|
|
166
174
|
static get properties() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArrayUtils, FloatingManager } from '@sankhyalabs/core';
|
|
1
|
+
import { ArrayUtils, ElementIDUtils, FloatingManager } from '@sankhyalabs/core';
|
|
2
2
|
import { h, Host } from '@stencil/core';
|
|
3
3
|
const SHOW_MORE_ITEM_NAME = "__SHOWMORE__";
|
|
4
4
|
const MAX_FILTERS = 5;
|
|
@@ -43,6 +43,11 @@ export class SnkFilterList {
|
|
|
43
43
|
this.showDetail();
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
+
componentDidLoad() {
|
|
47
|
+
if (this._element) {
|
|
48
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
46
51
|
componentDidRender() {
|
|
47
52
|
if (this._floatingID == undefined) {
|
|
48
53
|
if (this._popover) {
|
|
@@ -52,7 +57,10 @@ export class SnkFilterList {
|
|
|
52
57
|
}
|
|
53
58
|
buildItemElement(item) {
|
|
54
59
|
const itemId = ++this._selectableItemsCount;
|
|
55
|
-
|
|
60
|
+
if (this._buttonElement) {
|
|
61
|
+
ElementIDUtils.addIDInfo(this._buttonElement);
|
|
62
|
+
}
|
|
63
|
+
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)));
|
|
56
64
|
}
|
|
57
65
|
itemSelected(itemName) {
|
|
58
66
|
if (itemName === SHOW_MORE_ITEM_NAME) {
|
|
@@ -45,12 +45,22 @@ export class SnkFilterModal {
|
|
|
45
45
|
render() {
|
|
46
46
|
const allowCancel = this.items.filter(item => item.active).length > 0;
|
|
47
47
|
const items = (this.items ? ArrayUtils.applyStringFilter(this._filterArgument, this.items) : []);
|
|
48
|
-
return (h("ez-modal-container", { modalTitle: this.modalTitle, modalSubTitle: this.modalSubTitle, cancelButtonLabel: this.cancelButtonLabel, okButtonLabel: this.okButtonLabel, onEzModalAction: evt => this.modalActionListener(evt), cancelButtonStatus: allowCancel ? ModalButtonStatus.ENABLED : ModalButtonStatus.DISABLED }, h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-content" }, h("div", null, this.useSearch ?
|
|
48
|
+
return (h("ez-modal-container", { class: "snk-filter__modal-container", modalTitle: this.modalTitle, modalSubTitle: this.modalSubTitle, cancelButtonLabel: this.cancelButtonLabel, okButtonLabel: this.okButtonLabel, onEzModalAction: evt => this.modalActionListener(evt), cancelButtonStatus: allowCancel ? ModalButtonStatus.ENABLED : ModalButtonStatus.DISABLED }, h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-content" }, h("div", null, this.useSearch ?
|
|
49
49
|
h("ez-filter-input", { ref: ref => this._filterInput = ref, label: this.getMessage("snkFilterBar.modalFindFilter"), onEzChange: (evt) => this._filterArgument = evt.detail })
|
|
50
50
|
:
|
|
51
51
|
undefined), items.length > 0 ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding-bottom--small" }, this.getActiveFiltersMsg()) : undefined, h("div", null, this.buildItems(items)), h("div", { class: "ez-text ez-text--large ez-align--middle ez-text--secondary ez-text--center ez-padding-bottom--large" }, this.infoText))));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "snk-filter-modal"; }
|
|
54
|
+
static get originalStyleUrls() {
|
|
55
|
+
return {
|
|
56
|
+
"$": ["snk-filter-modal.css"]
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static get styleUrls() {
|
|
60
|
+
return {
|
|
61
|
+
"$": ["snk-filter-modal.css"]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
54
64
|
static get properties() {
|
|
55
65
|
return {
|
|
56
66
|
"getMessage": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
|
2
|
-
import { ApplicationContext, ErrorException, ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { ApplicationContext, ElementIDUtils, ErrorException, ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
import FilterItemType from './filter-item/filter-item-type.enum';
|
|
4
4
|
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
5
5
|
import buildFilter from './filter-item/dataunitfilter/data-unit-filter-builder';
|
|
@@ -50,6 +50,15 @@ export class SnkFilterBar {
|
|
|
50
50
|
}
|
|
51
51
|
this.processAfterUpdateConfig();
|
|
52
52
|
}
|
|
53
|
+
componentDidLoad() {
|
|
54
|
+
if (this._element) {
|
|
55
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
56
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
57
|
+
const dataElementIdFilterBar = this._element.getAttribute("data-element-id");
|
|
58
|
+
this._idSnkFilterItem = dataElementIdFilterBar;
|
|
59
|
+
this._idSnkFilterList = dataElementIdFilterBar;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
53
62
|
processPendingFilter() {
|
|
54
63
|
if (this._pendingFilters.length > 0 && this._currentPendingFilter == undefined) {
|
|
55
64
|
this._currentPendingFilter = this._element.querySelector("#filter-" + this._pendingFilters.pop());
|
|
@@ -361,7 +370,7 @@ export class SnkFilterBar {
|
|
|
361
370
|
if (!this.dataUnit || !this.filterConfig || this.filterConfig.length === 0) {
|
|
362
371
|
return undefined;
|
|
363
372
|
}
|
|
364
|
-
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" }))));
|
|
373
|
+
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" }))));
|
|
365
374
|
}
|
|
366
375
|
static get is() { return "snk-filter-bar"; }
|
|
367
376
|
static get encapsulation() { return "scoped"; }
|
|
@@ -177,7 +177,7 @@ export class SnkForm {
|
|
|
177
177
|
return undefined;
|
|
178
178
|
}
|
|
179
179
|
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 &&
|
|
180
|
-
h("snk-form-config", { dataUnit: this._dataUnit, formConfig: this.getFormConfig(), configName: this.configName, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigClose: () => this.closeConfig() }))))));
|
|
180
|
+
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() }))))));
|
|
181
181
|
}
|
|
182
182
|
static get is() { return "snk-form"; }
|
|
183
183
|
static get encapsulation() { return "scoped"; }
|
package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { ApplicationContext, UserInterface, ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { ApplicationContext, UserInterface, ObjectUtils, StringUtils, 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 { DEFAULT_TYPE, TAGS_BY_TYPE, VARS_BY_TYPE } from "../../../../lib/utils/constants";
|
|
@@ -211,6 +211,9 @@ export class SnkConfigOptions {
|
|
|
211
211
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
212
212
|
this._fieldProperties = this.getFieldProperties((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.name);
|
|
213
213
|
}
|
|
214
|
+
componentDidLoad() {
|
|
215
|
+
ElementIDUtils.addIDInfo(this._element, this.fieldConfig.name);
|
|
216
|
+
}
|
|
214
217
|
render() {
|
|
215
218
|
var _a, _b;
|
|
216
219
|
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 ?
|
package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApplicationContext } from "@sankhyalabs/core";
|
|
1
|
+
import { ApplicationContext, ElementIDUtils } from "@sankhyalabs/core";
|
|
2
2
|
import { h, Host } from "@stencil/core";
|
|
3
3
|
import { ACTION_CONFIG } from "../../../../lib/utils/constants";
|
|
4
4
|
export class SnkFieldConfig {
|
|
@@ -38,6 +38,9 @@ export class SnkFieldConfig {
|
|
|
38
38
|
componentWillLoad() {
|
|
39
39
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
40
40
|
}
|
|
41
|
+
componentDidLoad() {
|
|
42
|
+
ElementIDUtils.addIDInfo(this._element, this.fieldConfig.name);
|
|
43
|
+
}
|
|
41
44
|
render() {
|
|
42
45
|
if (this.fieldConfig == undefined) {
|
|
43
46
|
return;
|
|
@@ -162,4 +165,5 @@ export class SnkFieldConfig {
|
|
|
162
165
|
}
|
|
163
166
|
}];
|
|
164
167
|
}
|
|
168
|
+
static get elementRef() { return "_element"; }
|
|
165
169
|
}
|
package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { Sortable } from '@shopify/draggable';
|
|
3
|
-
import { ApplicationContext, ObjectUtils, ArrayUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { ApplicationContext, ObjectUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
4
4
|
import { ApplicationUtils, DialogType } from "@sankhyalabs/ezui/dist/collection/utils";
|
|
5
5
|
import { ACTION_CONFIG, CONFIG_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "../../../../lib/utils/constants";
|
|
6
6
|
import { UserConfigType } from "../../../../lib/http/data-fetcher/fetchers/form-config-fetcher";
|
|
@@ -232,8 +232,8 @@ export class SnkFormConfig {
|
|
|
232
232
|
var _a;
|
|
233
233
|
return ((_a = group.fields) === null || _a === void 0 ? void 0 : _a.length) ? group.fields.map((field) => {
|
|
234
234
|
var _a, _b;
|
|
235
|
-
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 &&
|
|
236
|
-
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) })));
|
|
235
|
+
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 &&
|
|
236
|
+
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) })));
|
|
237
237
|
}) : 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")))));
|
|
238
238
|
}
|
|
239
239
|
handleconfigOptionsChanged(fieldEdited) {
|
|
@@ -939,6 +939,10 @@ export class SnkFormConfig {
|
|
|
939
939
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
940
940
|
this.loadConfig();
|
|
941
941
|
}
|
|
942
|
+
componentDidLoad() {
|
|
943
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
944
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
945
|
+
}
|
|
942
946
|
render() {
|
|
943
947
|
var _a, _b, _c, _d;
|
|
944
948
|
const configOptions = this._formConfigOptions.map((option) => {
|
|
@@ -1087,6 +1091,7 @@ export class SnkFormConfig {
|
|
|
1087
1091
|
}
|
|
1088
1092
|
}];
|
|
1089
1093
|
}
|
|
1094
|
+
static get elementRef() { return "_element"; }
|
|
1090
1095
|
static get watchers() {
|
|
1091
1096
|
return [{
|
|
1092
1097
|
"propName": "formConfig",
|
|
@@ -101,7 +101,7 @@ export class SnkGrid {
|
|
|
101
101
|
if (!this._dataUnit) {
|
|
102
102
|
return undefined;
|
|
103
103
|
}
|
|
104
|
-
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() }))));
|
|
104
|
+
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() }))));
|
|
105
105
|
}
|
|
106
106
|
static get is() { return "snk-grid"; }
|
|
107
107
|
static get encapsulation() { return "scoped"; }
|
package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApplicationContext, StringUtils } from '@sankhyalabs/core';
|
|
1
|
+
import { ApplicationContext, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
2
2
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
3
|
import { h, Host } from '@stencil/core';
|
|
4
4
|
import { ConfigStorage } from '../../../../lib/configs/ConfigStorage';
|
|
@@ -100,14 +100,16 @@ export class EzGridConfig {
|
|
|
100
100
|
this._columListItems = [visibleGroup, hiddenGroup];
|
|
101
101
|
}
|
|
102
102
|
buildColumnListSlot(item, group) {
|
|
103
|
-
|
|
103
|
+
const dataElementId = `${this._element.getAttribute("data-element-id")}_configItem_${StringUtils.toCamelCase(item.label)}`;
|
|
104
|
+
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); } })));
|
|
104
105
|
}
|
|
105
106
|
buildOrderListSlot(item) {
|
|
107
|
+
const dataElementId = `${this._element.getAttribute("data-element-id")}_configItem_${StringUtils.toCamelCase(item.label)}`;
|
|
106
108
|
let selectedOption = ORDER_VALUES.none.value;
|
|
107
109
|
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
|
108
110
|
selectedOption = item.ascending == true ? ORDER_VALUES.asc.value : ORDER_VALUES.desc.value;
|
|
109
111
|
}
|
|
110
|
-
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); } })));
|
|
112
|
+
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); } })));
|
|
111
113
|
}
|
|
112
114
|
updateOrder(sortOrder, updatedItemLabel) {
|
|
113
115
|
var _a;
|
|
@@ -457,6 +459,9 @@ export class EzGridConfig {
|
|
|
457
459
|
componentWillLoad() {
|
|
458
460
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
459
461
|
}
|
|
462
|
+
componentDidLoad() {
|
|
463
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
464
|
+
}
|
|
460
465
|
render() {
|
|
461
466
|
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() }))));
|
|
462
467
|
}
|
|
@@ -603,4 +608,5 @@ export class EzGridConfig {
|
|
|
603
608
|
}
|
|
604
609
|
};
|
|
605
610
|
}
|
|
611
|
+
static get elementRef() { return "_element"; }
|
|
606
612
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
1
|
+
import { ObjectUtils, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
2
2
|
import { h, Host } from '@stencil/core';
|
|
3
3
|
export class SnkPesquisa {
|
|
4
4
|
constructor() {
|
|
@@ -290,6 +290,9 @@ export class SnkPesquisa {
|
|
|
290
290
|
: 'Nenhum registro encontrado'
|
|
291
291
|
: 'Os resultados de sua pesquisa aparecerão aqui...';
|
|
292
292
|
}
|
|
293
|
+
componentDidLoad() {
|
|
294
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
295
|
+
}
|
|
293
296
|
render() {
|
|
294
297
|
var _a;
|
|
295
298
|
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)
|
|
@@ -375,6 +378,7 @@ export class SnkPesquisa {
|
|
|
375
378
|
"_startLoading": {}
|
|
376
379
|
};
|
|
377
380
|
}
|
|
381
|
+
static get elementRef() { return "_element"; }
|
|
378
382
|
static get watchers() {
|
|
379
383
|
return [{
|
|
380
384
|
"propName": "argument",
|
|
@@ -1171,6 +1171,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
1171
1171
|
if (mode === "ADVANCED") {
|
|
1172
1172
|
return new Promise(accept => {
|
|
1173
1173
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
1174
|
+
pesquisaContent["data-element-id"] = `entity_${entity}`;
|
|
1174
1175
|
pesquisaContent.argument = argument;
|
|
1175
1176
|
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
1176
1177
|
pesquisaContent.selectItem = (option) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
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 { a as VARS_BY_TYPE, D as DEFAULT_TYPE, T as TAGS_BY_TYPE } from './constants.js';
|
|
@@ -217,6 +217,9 @@ const SnkConfigOptions = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
217
217
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
218
218
|
this._fieldProperties = this.getFieldProperties((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.name);
|
|
219
219
|
}
|
|
220
|
+
componentDidLoad() {
|
|
221
|
+
ElementIDUtils.addIDInfo(this._element, this.fieldConfig.name);
|
|
222
|
+
}
|
|
220
223
|
render() {
|
|
221
224
|
var _a, _b;
|
|
222
225
|
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 { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { ApplicationContext } from '@sankhyalabs/core';
|
|
2
|
+
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { A as ACTION_CONFIG } from './constants.js';
|
|
4
4
|
|
|
5
5
|
const snkFieldConfigCss = ".sc-snk-field-config-h{--snk-field-config--height:42px;--snk-field-config--width:100%;--snk-field-config__icon--width:48px;--snk-field-config--height--slim:32px;--snk-field-config--border-radius:var(--border--radius-medium, 12px);--snk-field-config--font-size:var(--text--medium, 14px);--snk-field-config--font-family:var(--font-pattern, Arial);--snk-field-config--font-weight:var(--text-weight--medium, 400);--snk-field-config--color:var(--title--primary, #000);--snk-field-config__input--background-color:var(--background--medium, #e0e0e0);--snk-field-config__input--border:var(--border--medium, 2px solid);--snk-field-config__input--border-color:var(--background--xlight, #fff);--snk-field-config__required--color:var(--color--error, #FF0000);--snk-field-config__transition--visibility:var(--transition, 0.2s linear);--snk-field-config__transition--opacity:var(--transition, 0.15s linear);display:flex;flex-wrap:wrap;position:relative;width:var(--snk-field-config--width)}.field-config.sc-snk-field-config{width:100%;box-sizing:border-box;display:flex;align-items:center;padding-left:var(--space--medium, 6px);font-weight:var(--snk-field-config--font-weight);height:var(--snk-field-config--height);border-radius:var(--snk-field-config--border-radius);font-family:var(--snk-field-config--font-family);font-size:var(--snk-field-config--font-size);border:var(--snk-field-config__input--border);border-color:var(--snk-field-config__input--border-color);background-color:var(--snk-field-config__input--background-color);color:var(--snk-field-config--color)}.field-config__config-popover.sc-snk-field-config{width:40px;margin-left:auto;z-index:var(--more-visible, 2)}.field-config__required-label.sc-snk-field-config{padding-left:var(--space--extra-small, 3px);color:var(--snk-field-config__required--color)}.field-config__add.sc-snk-field-config{display:flex;margin-left:auto;visibility:hidden;opacity:0;transition:visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity)}.field-config__options.sc-snk-field-config{display:flex;margin-left:auto;visibility:hidden;opacity:0;transition:visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity)}.field-config__options--is-active.sc-snk-field-config{display:flex;visibility:visible;opacity:1}.field-config__remove-icon.sc-snk-field-config{margin-right:-15px}.field-config.sc-snk-field-config:hover .field-config__options.sc-snk-field-config{display:flex;visibility:visible;opacity:1}.field-config.sc-snk-field-config:hover .field-config__add.sc-snk-field-config{visibility:visible;opacity:1}.field-config__draggable.sc-snk-field-config{padding-right:var(--space--small, 6px)}.field-config__config-outer-arrow.sc-snk-field-config{background-color:var(--color--secondary-200);clip-path:polygon(50% 0, 90% 100%, 10% 100%);border-radius:0.25em 0 0 0;width:30px;height:15px;padding-top:3px;border-bottom:1px solid #FFFFFF}.field-config__config-inner-arrow.sc-snk-field-config{background-color:#FFFFFF;clip-path:polygon(50% 0, 90% 100%, 10% 100%);border-radius:0.25em 0 0 0;width:30px;height:15px}.ez-box__container.sc-snk-field-config ez-collapsible-box.sc-snk-field-config{--snk-collapsible-box__header--padding-left:6px}ez-icon.sc-snk-field-config{--snk-icon--color:var(--snk-field-config--color)}ez-popover.sc-snk-field-config{--snk-popover__box--background-color:transparent;--snk-popover__box--box-shadow:none}.field-config__options.sc-snk-field-config ez-button.sc-snk-field-config{--snk-button--background-color:transparent;--snk-button--focus--border:none;--snk-button--focus--box-shadow:none}";
|
|
@@ -44,6 +44,9 @@ const SnkFieldConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
44
44
|
componentWillLoad() {
|
|
45
45
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
46
46
|
}
|
|
47
|
+
componentDidLoad() {
|
|
48
|
+
ElementIDUtils.addIDInfo(this._element, this.fieldConfig.name);
|
|
49
|
+
}
|
|
47
50
|
render() {
|
|
48
51
|
if (this.fieldConfig == undefined) {
|
|
49
52
|
return;
|
|
@@ -52,6 +55,7 @@ const SnkFieldConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
52
55
|
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") })) :
|
|
53
56
|
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" })))));
|
|
54
57
|
}
|
|
58
|
+
get _element() { return this; }
|
|
55
59
|
static get style() { return snkFieldConfigCss; }
|
|
56
60
|
}, [2, "snk-field-config", {
|
|
57
61
|
"isConfigActive": [16],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { DataType, ObjectUtils, StringUtils, ErrorException, ApplicationContext } from '@sankhyalabs/core';
|
|
2
|
+
import { DataType, ObjectUtils, ElementIDUtils, StringUtils, ErrorException, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
4
4
|
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
5
5
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
@@ -156,6 +156,15 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
156
156
|
}
|
|
157
157
|
this.processAfterUpdateConfig();
|
|
158
158
|
}
|
|
159
|
+
componentDidLoad() {
|
|
160
|
+
if (this._element) {
|
|
161
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
162
|
+
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
163
|
+
const dataElementIdFilterBar = this._element.getAttribute("data-element-id");
|
|
164
|
+
this._idSnkFilterItem = dataElementIdFilterBar;
|
|
165
|
+
this._idSnkFilterList = dataElementIdFilterBar;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
159
168
|
processPendingFilter() {
|
|
160
169
|
if (this._pendingFilters.length > 0 && this._currentPendingFilter == undefined) {
|
|
161
170
|
this._currentPendingFilter = this._element.querySelector("#filter-" + this._pendingFilters.pop());
|
|
@@ -467,7 +476,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
467
476
|
if (!this.dataUnit || !this.filterConfig || this.filterConfig.length === 0) {
|
|
468
477
|
return undefined;
|
|
469
478
|
}
|
|
470
|
-
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" }))));
|
|
479
|
+
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" }))));
|
|
471
480
|
}
|
|
472
481
|
get _element() { return this; }
|
|
473
482
|
static get watchers() { return {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } 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 SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -15,6 +16,11 @@ const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
15
16
|
}
|
|
16
17
|
this.updateValue();
|
|
17
18
|
}
|
|
19
|
+
componentDidLoad() {
|
|
20
|
+
if (this._element) {
|
|
21
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
18
24
|
assertCheckedOption(updatingCheck) {
|
|
19
25
|
if (updatingCheck === this._checkOne) {
|
|
20
26
|
this._checkTwo.value = true;
|
|
@@ -42,6 +48,7 @@ const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
42
48
|
const [optOne, optTwo] = this.config.props.options;
|
|
43
49
|
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) })));
|
|
44
50
|
}
|
|
51
|
+
get _element() { return this; }
|
|
45
52
|
}, [0, "snk-filter-binary-select", {
|
|
46
53
|
"value": [1544],
|
|
47
54
|
"config": [16],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
4
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
4
5
|
|
|
5
6
|
const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
7
|
constructor() {
|
|
@@ -11,6 +12,13 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
11
12
|
async show() {
|
|
12
13
|
this._editor["show"]();
|
|
13
14
|
}
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
if (this._element) {
|
|
17
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
18
|
+
const dataElementIdDoFilterItem = this._element.getAttribute("data-element-id");
|
|
19
|
+
this._idContentEditor = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
14
22
|
changeConfig(newConfig) {
|
|
15
23
|
this.filterChange.emit(newConfig);
|
|
16
24
|
}
|
|
@@ -96,8 +104,9 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
96
104
|
}
|
|
97
105
|
render() {
|
|
98
106
|
const ContentEditor = this.getContentEditor();
|
|
99
|
-
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" }))));
|
|
107
|
+
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" }))));
|
|
100
108
|
}
|
|
109
|
+
get _element() { return this; }
|
|
101
110
|
}, [0, "snk-filter-detail", {
|
|
102
111
|
"config": [1040],
|
|
103
112
|
"getMessage": [16],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { FloatingManager } from '@sankhyalabs/core';
|
|
2
|
+
import { FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './snk-filter-detail2.js';
|
|
5
5
|
|
|
@@ -139,6 +139,14 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
139
139
|
}
|
|
140
140
|
return label;
|
|
141
141
|
}
|
|
142
|
+
componentDidLoad() {
|
|
143
|
+
if (this._filterItemElement) {
|
|
144
|
+
ElementIDUtils.addIDInfo(this._filterItemElement);
|
|
145
|
+
const dataElementIdDoFilterItem = this._filterItemElement.getAttribute("data-element-id");
|
|
146
|
+
this._idSnkFilterDetail = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
147
|
+
this._idEzChip = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
142
150
|
componentDidRender() {
|
|
143
151
|
if (this._floatingID == undefined) {
|
|
144
152
|
if (this._popover) {
|
|
@@ -166,7 +174,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
166
174
|
}
|
|
167
175
|
render() {
|
|
168
176
|
const leftIcon = this.getLeftIconName();
|
|
169
|
-
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 }))));
|
|
177
|
+
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 }))));
|
|
170
178
|
}
|
|
171
179
|
get _filterItemElement() { return this; }
|
|
172
180
|
static get watchers() { return {
|