@sankhyalabs/sankhyablocks 2.1.8 → 2.2.1
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 +6 -4
- 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 +37 -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 +10 -5
- 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.css +1 -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 +6 -4
- 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 +12 -3
- 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 +6 -4
- 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 +38 -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-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-639b8f6e.entry.js → p-6340d992.entry.js} +1 -1
- 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-9b0f99fd.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-f50c6ef6.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +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/dist/types/components.d.ts +1 -1
- 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,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 {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { FloatingManager, ArrayUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { FloatingManager, ElementIDUtils, ArrayUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const SHOW_MORE_ITEM_NAME = "__SHOWMORE__";
|
|
5
5
|
const MAX_FILTERS = 5;
|
|
@@ -47,6 +47,11 @@ const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
47
47
|
this.showDetail();
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
componentDidLoad() {
|
|
51
|
+
if (this._element) {
|
|
52
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
50
55
|
componentDidRender() {
|
|
51
56
|
if (this._floatingID == undefined) {
|
|
52
57
|
if (this._popover) {
|
|
@@ -56,7 +61,10 @@ const SnkFilterList = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
56
61
|
}
|
|
57
62
|
buildItemElement(item) {
|
|
58
63
|
const itemId = ++this._selectableItemsCount;
|
|
59
|
-
|
|
64
|
+
if (this._buttonElement) {
|
|
65
|
+
ElementIDUtils.addIDInfo(this._buttonElement);
|
|
66
|
+
}
|
|
67
|
+
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)));
|
|
60
68
|
}
|
|
61
69
|
itemSelected(itemName) {
|
|
62
70
|
if (itemName === SHOW_MORE_ITEM_NAME) {
|
|
@@ -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 SnkFilterMultiSelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -12,12 +13,18 @@ const SnkFilterMultiSelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
|
12
13
|
async show() {
|
|
13
14
|
this._comboElement.setFocus();
|
|
14
15
|
}
|
|
16
|
+
componentDidLoad() {
|
|
17
|
+
if (this._element) {
|
|
18
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
15
21
|
render() {
|
|
16
22
|
if (!this.config || this.config.type !== FilterItemType.MULTI_SELECT) {
|
|
17
23
|
return undefined;
|
|
18
24
|
}
|
|
19
25
|
return (h("ez-combo-box", { ref: ref => this._comboElement = ref, label: this.config.label, value: this.config.value, options: this.config.props.options }));
|
|
20
26
|
}
|
|
27
|
+
get _element() { return this; }
|
|
21
28
|
}, [0, "snk-filter-multi-select", {
|
|
22
29
|
"value": [1544],
|
|
23
30
|
"config": [16],
|
|
@@ -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 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -12,6 +13,11 @@ const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
12
13
|
async show() {
|
|
13
14
|
this._numberElement.setFocus();
|
|
14
15
|
}
|
|
16
|
+
componentDidLoad() {
|
|
17
|
+
if (this._element) {
|
|
18
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
15
21
|
render() {
|
|
16
22
|
var _a;
|
|
17
23
|
if (!this.config || this.config.type !== FilterItemType.NUMBER) {
|
|
@@ -19,6 +25,7 @@ const SnkFilterPeriod = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
19
25
|
}
|
|
20
26
|
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 }));
|
|
21
27
|
}
|
|
28
|
+
get _element() { return this; }
|
|
22
29
|
}, [0, "snk-filter-number", {
|
|
23
30
|
"config": [16],
|
|
24
31
|
"value": [2],
|
|
@@ -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
|
}; }
|
|
@@ -778,14 +778,15 @@ const SnkApplication = class {
|
|
|
778
778
|
/**
|
|
779
779
|
* Mostra o conteúdo passado em um Popup
|
|
780
780
|
*/
|
|
781
|
-
async showPopUp(content, size = "full") {
|
|
781
|
+
async showPopUp(content, size = "full", useHeader = true) {
|
|
782
782
|
this.clearContent(this._popUp);
|
|
783
|
-
if (content.tagName === 'EZ-MODAL-CONTAINER') {
|
|
784
|
-
this._popUp.useHeader = false;
|
|
785
|
-
}
|
|
786
783
|
this._popUp.appendChild(content);
|
|
787
784
|
this._popUp.opened = true;
|
|
788
785
|
this._popUp.heightMode = size;
|
|
786
|
+
this._popUp.useHeader = useHeader;
|
|
787
|
+
if (content.tagName === 'EZ-MODAL-CONTAINER') {
|
|
788
|
+
this._popUp.useHeader = false;
|
|
789
|
+
}
|
|
789
790
|
}
|
|
790
791
|
async showModal(content) {
|
|
791
792
|
this.clearContent(this._rightModal);
|
|
@@ -1170,6 +1171,7 @@ const SnkApplication = class {
|
|
|
1170
1171
|
if (mode === "ADVANCED") {
|
|
1171
1172
|
return new Promise(accept => {
|
|
1172
1173
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
1174
|
+
pesquisaContent["data-element-id"] = `entity_${entity}`;
|
|
1173
1175
|
pesquisaContent.argument = argument;
|
|
1174
1176
|
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
1175
1177
|
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
|
};
|