@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
|
@@ -782,14 +782,15 @@ const SnkApplication = class {
|
|
|
782
782
|
/**
|
|
783
783
|
* Mostra o conteúdo passado em um Popup
|
|
784
784
|
*/
|
|
785
|
-
async showPopUp(content, size = "full") {
|
|
785
|
+
async showPopUp(content, size = "full", useHeader = true) {
|
|
786
786
|
this.clearContent(this._popUp);
|
|
787
|
-
if (content.tagName === 'EZ-MODAL-CONTAINER') {
|
|
788
|
-
this._popUp.useHeader = false;
|
|
789
|
-
}
|
|
790
787
|
this._popUp.appendChild(content);
|
|
791
788
|
this._popUp.opened = true;
|
|
792
789
|
this._popUp.heightMode = size;
|
|
790
|
+
this._popUp.useHeader = useHeader;
|
|
791
|
+
if (content.tagName === 'EZ-MODAL-CONTAINER') {
|
|
792
|
+
this._popUp.useHeader = false;
|
|
793
|
+
}
|
|
793
794
|
}
|
|
794
795
|
async showModal(content) {
|
|
795
796
|
this.clearContent(this._rightModal);
|
|
@@ -1174,6 +1175,7 @@ const SnkApplication = class {
|
|
|
1174
1175
|
if (mode === "ADVANCED") {
|
|
1175
1176
|
return new Promise(accept => {
|
|
1176
1177
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
1178
|
+
pesquisaContent["data-element-id"] = `entity_${entity}`;
|
|
1177
1179
|
pesquisaContent.argument = argument;
|
|
1178
1180
|
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
1179
1181
|
pesquisaContent.selectItem = (option) => {
|
|
@@ -220,6 +220,9 @@ const SnkConfigOptions = class {
|
|
|
220
220
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
221
221
|
this._fieldProperties = this.getFieldProperties((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.name);
|
|
222
222
|
}
|
|
223
|
+
componentDidLoad() {
|
|
224
|
+
core.ElementIDUtils.addIDInfo(this._element, this.fieldConfig.name);
|
|
225
|
+
}
|
|
223
226
|
render() {
|
|
224
227
|
var _a, _b;
|
|
225
228
|
return (index.h(index.Host, null, index.h("div", { id: this.idConfig }, index.h("div", { class: "ez-row ez-padding--medium" }, index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.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); } })), index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.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() }, index.h("option", { value: constants.DEFAULT_TYPE.fixed }, this.getMessage("snkConfigOptions.options.valueFixed")), index.h("option", { value: constants.DEFAULT_TYPE.variable }, this.getMessage("snkConfigOptions.options.variable")))), index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, this._defaultType === constants.DEFAULT_TYPE.variable ?
|
|
@@ -134,6 +134,9 @@ const SnkFieldConfig = class {
|
|
|
134
134
|
componentWillLoad() {
|
|
135
135
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
136
136
|
}
|
|
137
|
+
componentDidLoad() {
|
|
138
|
+
core.ElementIDUtils.addIDInfo(this._element, this.fieldConfig.name);
|
|
139
|
+
}
|
|
137
140
|
render() {
|
|
138
141
|
if (this.fieldConfig == undefined) {
|
|
139
142
|
return;
|
|
@@ -142,6 +145,7 @@ const SnkFieldConfig = class {
|
|
|
142
145
|
index.h("div", { class: "field-config__add" }, index.h("ez-button", { onClick: (evt) => this.handleAction(evt, constants.ACTION_CONFIG.add), mode: "icon", class: "ez-button--tertiary", iconName: "plus", size: "large", title: this.getMessage("snkFieldConfig.titleAdd") })) :
|
|
143
146
|
index.h("div", { class: "field-config__options" + (this.isConfigActive ? " field-config__options--is-active" : " ") }, index.h("ez-button", { mode: "icon", class: "ez-button--tertiary field-config__remove-icon", onClick: (evt) => this.handleAction(evt, constants.ACTION_CONFIG.remove), iconName: "minus", size: "large", title: this.getMessage("snkFieldConfig.titleRemove") }), index.h("ez-button", { id: "buttonConfig_" + this.fieldConfig.name, mode: "icon", class: "ez-button--tertiary", onClick: (evt) => this.handleAction(evt, constants.ACTION_CONFIG.configuration), iconName: this.isConfigActive ? "chevron-up" : "settings-inverted", size: "large", title: this.getMessage("snkFieldConfig.titleConfigurations") }))), this.isConfigActive && index.h("div", { class: "field-config__config-popover" }, index.h("div", { class: "field-config__config-outer-arrow" }, index.h("div", { class: "field-config__config-inner-arrow" })))));
|
|
144
147
|
}
|
|
148
|
+
get _element() { return index.getElement(this); }
|
|
145
149
|
};
|
|
146
150
|
SnkFieldConfig.style = snkFieldConfigCss;
|
|
147
151
|
|
|
@@ -250,7 +254,7 @@ const SnkGrid = class {
|
|
|
250
254
|
if (!this._dataUnit) {
|
|
251
255
|
return undefined;
|
|
252
256
|
}
|
|
253
|
-
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-padding-bottom--medium ez-margin-bottom--medium" }, index.h("snk-filter-bar", { dataUnit: this._dataUnit, class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.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" })), index.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 }, index.h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, selectedIndex: 0, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
|
|
257
|
+
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-padding-bottom--medium ez-margin-bottom--medium" }, index.h("snk-filter-bar", { dataUnit: this._dataUnit, class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.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" })), index.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 }, index.h("snk-taskbar", { dataUnit: this._dataUnit, buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.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() }))));
|
|
254
258
|
}
|
|
255
259
|
get _element() { return index.getElement(this); }
|
|
256
260
|
};
|
|
@@ -111,7 +111,7 @@ function buildPersonalized(item) {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:minmax(100px, 100%) 1fr 1fr}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;z-index:var(--more-visible, 2);background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:
|
|
114
|
+
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:minmax(100px, 100%) 1fr 1fr}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;z-index:var(--more-visible, 2);background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
|
|
115
115
|
|
|
116
116
|
const PERSONALIZED_FILTER = "PERSONALIZED_FILTER";
|
|
117
117
|
const DEFAULT_FILTER = "DEFAULT_FILTER";
|
|
@@ -161,6 +161,15 @@ const SnkFilterBar = class {
|
|
|
161
161
|
}
|
|
162
162
|
this.processAfterUpdateConfig();
|
|
163
163
|
}
|
|
164
|
+
componentDidLoad() {
|
|
165
|
+
if (this._element) {
|
|
166
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
167
|
+
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
168
|
+
const dataElementIdFilterBar = this._element.getAttribute("data-element-id");
|
|
169
|
+
this._idSnkFilterItem = dataElementIdFilterBar;
|
|
170
|
+
this._idSnkFilterList = dataElementIdFilterBar;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
164
173
|
processPendingFilter() {
|
|
165
174
|
if (this._pendingFilters.length > 0 && this._currentPendingFilter == undefined) {
|
|
166
175
|
this._currentPendingFilter = this._element.querySelector("#filter-" + this._pendingFilters.pop());
|
|
@@ -472,7 +481,7 @@ const SnkFilterBar = class {
|
|
|
472
481
|
if (!this.dataUnit || !this.filterConfig || this.filterConfig.length === 0) {
|
|
473
482
|
return undefined;
|
|
474
483
|
}
|
|
475
|
-
return (index.h(index.Host, null, index.h("ez-scroller", { direction: "horizontal", activeShadow: true, locked: this.scrollerLocked }, this.getFilterItems()), index.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) }), index.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) }, index.h("ez-icon", { slot: "leftIcon", class: "ez-padding-right--small", iconName: "plus" }))));
|
|
484
|
+
return (index.h(index.Host, null, index.h("ez-scroller", { direction: "horizontal", activeShadow: true, locked: this.scrollerLocked }, this.getFilterItems()), index.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 }), index.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 }, index.h("ez-icon", { slot: "leftIcon", class: "ez-padding-right--small", iconName: "plus" }))));
|
|
476
485
|
}
|
|
477
486
|
get _element() { return index.getElement(this); }
|
|
478
487
|
static get watchers() { return {
|
|
@@ -616,6 +625,14 @@ const SnkFilterItem = class {
|
|
|
616
625
|
}
|
|
617
626
|
return label;
|
|
618
627
|
}
|
|
628
|
+
componentDidLoad() {
|
|
629
|
+
if (this._filterItemElement) {
|
|
630
|
+
core.ElementIDUtils.addIDInfo(this._filterItemElement);
|
|
631
|
+
const dataElementIdDoFilterItem = this._filterItemElement.getAttribute("data-element-id");
|
|
632
|
+
this._idSnkFilterDetail = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
633
|
+
this._idEzChip = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
619
636
|
componentDidRender() {
|
|
620
637
|
if (this._floatingID == undefined) {
|
|
621
638
|
if (this._popover) {
|
|
@@ -643,7 +660,7 @@ const SnkFilterItem = class {
|
|
|
643
660
|
}
|
|
644
661
|
render() {
|
|
645
662
|
const leftIcon = this.getLeftIconName();
|
|
646
|
-
return (index.h(index.Host, null, index.h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined }, leftIcon ? index.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, index.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.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 }))));
|
|
663
|
+
return (index.h(index.Host, null, index.h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined, "data-element-id": this._idEzChip }, leftIcon ? index.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, index.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.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 }))));
|
|
647
664
|
}
|
|
648
665
|
get _filterItemElement() { return index.getElement(this); }
|
|
649
666
|
static get watchers() { return {
|
|
@@ -696,6 +713,11 @@ const SnkFilterList = class {
|
|
|
696
713
|
this.showDetail();
|
|
697
714
|
}
|
|
698
715
|
}
|
|
716
|
+
componentDidLoad() {
|
|
717
|
+
if (this._element) {
|
|
718
|
+
core.ElementIDUtils.addIDInfo(this._element);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
699
721
|
componentDidRender() {
|
|
700
722
|
if (this._floatingID == undefined) {
|
|
701
723
|
if (this._popover) {
|
|
@@ -705,7 +727,10 @@ const SnkFilterList = class {
|
|
|
705
727
|
}
|
|
706
728
|
buildItemElement(item) {
|
|
707
729
|
const itemId = ++this._selectableItemsCount;
|
|
708
|
-
|
|
730
|
+
if (this._buttonElement) {
|
|
731
|
+
core.ElementIDUtils.addIDInfo(this._buttonElement);
|
|
732
|
+
}
|
|
733
|
+
return (index.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 ? index.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, index.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)));
|
|
709
734
|
}
|
|
710
735
|
itemSelected(itemName) {
|
|
711
736
|
if (itemName === SHOW_MORE_ITEM_NAME) {
|
|
@@ -929,14 +954,16 @@ const EzGridConfig = class {
|
|
|
929
954
|
this._columListItems = [visibleGroup, hiddenGroup];
|
|
930
955
|
}
|
|
931
956
|
buildColumnListSlot(item, group) {
|
|
932
|
-
|
|
957
|
+
const dataElementId = `${this._element.getAttribute("data-element-id")}_configItem_${core.StringUtils.toCamelCase(item.label)}`;
|
|
958
|
+
return (index.h("div", null, index.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); } })));
|
|
933
959
|
}
|
|
934
960
|
buildOrderListSlot(item) {
|
|
961
|
+
const dataElementId = `${this._element.getAttribute("data-element-id")}_configItem_${core.StringUtils.toCamelCase(item.label)}`;
|
|
935
962
|
let selectedOption = constants.ORDER_VALUES.none.value;
|
|
936
963
|
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
|
937
964
|
selectedOption = item.ascending == true ? constants.ORDER_VALUES.asc.value : constants.ORDER_VALUES.desc.value;
|
|
938
965
|
}
|
|
939
|
-
return (index.h("div", null, index.h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (evt) => { evt.stopPropagation(); this.updateOrder(evt.detail, item.label); } })));
|
|
966
|
+
return (index.h("div", null, index.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); } })));
|
|
940
967
|
}
|
|
941
968
|
updateOrder(sortOrder, updatedItemLabel) {
|
|
942
969
|
var _a;
|
|
@@ -1286,10 +1313,14 @@ const EzGridConfig = class {
|
|
|
1286
1313
|
componentWillLoad() {
|
|
1287
1314
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
1288
1315
|
}
|
|
1316
|
+
componentDidLoad() {
|
|
1317
|
+
core.ElementIDUtils.addIDInfo(this._element);
|
|
1318
|
+
}
|
|
1289
1319
|
render() {
|
|
1290
1320
|
return (index.h(index.Host, null, index.h("div", { class: "grid-config__header" }, index.h("div", { class: "title-container" }, index.h("div", { class: "" }, index.h("label", { class: "title" }, this.getMessage("snkGridConfig.gridConfiguration")), index.h("label", { class: "subtitle" }, this.getMessage("snkGridConfig.columnVisibilityOrder"))), index.h("div", { class: "button-close" }, index.h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), index.h("div", { class: "tabselector-container" }, index.h("ez-tabselector", { selectedIndex: this.selectedIndex, onEzChange: (evt) => { this.handleTabChange(evt.detail); }, tabs: this.getColumnNames() })), index.h("div", null, index.h("ez-text-input", { ref: (el) => this._searchElement = el, label: this.getMessage("snkGridConfig.findColumn"), onKeyUp: (evt) => this.locateColumn(evt) }, index.h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), index.h("div", { class: "grid-config__main" }, index.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 }), index.h("div", { class: this.selectedIndex === 1 ? "group-name" : "hidden" }, this.getMessage("snkGridConfig.info.sortingSequence")), index.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) })), index.h("div", { class: "grid-config__footer" }, index.h("ez-button", { class: "padding-right--medium", label: this.getMessage("snkGridConfig.cancel"), onClick: () => this.closeConfig() }), index.h("ez-button", { label: this.getMessage("snkGridConfig.complete"), class: "ez-button--primary", onClick: () => this.finish() }))));
|
|
1291
1321
|
}
|
|
1292
1322
|
static get assetsDirs() { return ["../assets"]; }
|
|
1323
|
+
get _element() { return index.getElement(this); }
|
|
1293
1324
|
};
|
|
1294
1325
|
EzGridConfig.style = snkGridConfigCss;
|
|
1295
1326
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
6
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
7
8
|
|
|
8
9
|
const SnkFilterBinarySelect = class {
|
|
@@ -18,6 +19,11 @@ const SnkFilterBinarySelect = class {
|
|
|
18
19
|
}
|
|
19
20
|
this.updateValue();
|
|
20
21
|
}
|
|
22
|
+
componentDidLoad() {
|
|
23
|
+
if (this._element) {
|
|
24
|
+
core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
25
|
+
}
|
|
26
|
+
}
|
|
21
27
|
assertCheckedOption(updatingCheck) {
|
|
22
28
|
if (updatingCheck === this._checkOne) {
|
|
23
29
|
this._checkTwo.value = true;
|
|
@@ -45,6 +51,7 @@ const SnkFilterBinarySelect = class {
|
|
|
45
51
|
const [optOne, optTwo] = this.config.props.options;
|
|
46
52
|
return (index.h(index.Host, null, index.h("ez-check", { label: optOne.label, class: "sc-snk-filter-bar editor__ez-check", ref: (ref) => this._checkOne = ref, value: this.isSelected(optOne.name) }), index.h("ez-check", { label: optTwo.label, class: "sc-snk-filter-bar editor__ez-check", ref: (ref) => this._checkTwo = ref, value: this.isSelected(optTwo.name) })));
|
|
47
53
|
}
|
|
54
|
+
get _element() { return index.getElement(this); }
|
|
48
55
|
};
|
|
49
56
|
|
|
50
57
|
exports.snk_filter_binary_select = SnkFilterBinarySelect;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
6
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
8
|
+
const core = require('@sankhyalabs/core');
|
|
8
9
|
|
|
9
10
|
const SnkFilterDetail = class {
|
|
10
11
|
constructor(hostRef) {
|
|
@@ -14,6 +15,13 @@ const SnkFilterDetail = class {
|
|
|
14
15
|
async show() {
|
|
15
16
|
this._editor["show"]();
|
|
16
17
|
}
|
|
18
|
+
componentDidLoad() {
|
|
19
|
+
if (this._element) {
|
|
20
|
+
core.ElementIDUtils.addIDInfo(this._element);
|
|
21
|
+
const dataElementIdDoFilterItem = this._element.getAttribute("data-element-id");
|
|
22
|
+
this._idContentEditor = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
17
25
|
changeConfig(newConfig) {
|
|
18
26
|
this.filterChange.emit(newConfig);
|
|
19
27
|
}
|
|
@@ -99,8 +107,9 @@ const SnkFilterDetail = class {
|
|
|
99
107
|
}
|
|
100
108
|
render() {
|
|
101
109
|
const ContentEditor = this.getContentEditor();
|
|
102
|
-
return (index.h(index.Host, null, index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.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()), index.h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt) }), index.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), index.h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, index.h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), index.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" }))));
|
|
110
|
+
return (index.h(index.Host, null, index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.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()), index.h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor }), index.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), index.h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, index.h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), index.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" }))));
|
|
103
111
|
}
|
|
112
|
+
get _element() { return index.getElement(this); }
|
|
104
113
|
};
|
|
105
114
|
|
|
106
115
|
exports.snk_filter_detail = SnkFilterDetail;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
6
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
7
8
|
|
|
8
9
|
const SnkFilterMultiSelect = class {
|
|
@@ -15,12 +16,18 @@ const SnkFilterMultiSelect = class {
|
|
|
15
16
|
async show() {
|
|
16
17
|
this._comboElement.setFocus();
|
|
17
18
|
}
|
|
19
|
+
componentDidLoad() {
|
|
20
|
+
if (this._element) {
|
|
21
|
+
core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
18
24
|
render() {
|
|
19
25
|
if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.MULTI_SELECT) {
|
|
20
26
|
return undefined;
|
|
21
27
|
}
|
|
22
28
|
return (index.h("ez-combo-box", { ref: ref => this._comboElement = ref, label: this.config.label, value: this.config.value, options: this.config.props.options }));
|
|
23
29
|
}
|
|
30
|
+
get _element() { return index.getElement(this); }
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
exports.snk_filter_multi_select = SnkFilterMultiSelect;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
6
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
7
8
|
|
|
8
9
|
const SnkFilterPeriod = class {
|
|
@@ -15,6 +16,11 @@ const SnkFilterPeriod = class {
|
|
|
15
16
|
async show() {
|
|
16
17
|
this._numberElement.setFocus();
|
|
17
18
|
}
|
|
19
|
+
componentDidLoad() {
|
|
20
|
+
if (this._element) {
|
|
21
|
+
core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
18
24
|
render() {
|
|
19
25
|
var _a;
|
|
20
26
|
if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.NUMBER) {
|
|
@@ -22,6 +28,7 @@ const SnkFilterPeriod = class {
|
|
|
22
28
|
}
|
|
23
29
|
return (index.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 }));
|
|
24
30
|
}
|
|
31
|
+
get _element() { return index.getElement(this); }
|
|
25
32
|
};
|
|
26
33
|
|
|
27
34
|
exports.snk_filter_number = SnkFilterPeriod;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
6
7
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
7
8
|
|
|
8
9
|
const SnkFilterPeriod = class {
|
|
@@ -14,6 +15,11 @@ const SnkFilterPeriod = class {
|
|
|
14
15
|
const end = this._endDate.value;
|
|
15
16
|
this.value = (start || end ? { start, end } : undefined);
|
|
16
17
|
}
|
|
18
|
+
componentDidLoad() {
|
|
19
|
+
if (this._element) {
|
|
20
|
+
core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
17
23
|
getDate(prop) {
|
|
18
24
|
const objValue = this.value ? this.value[prop] : null;
|
|
19
25
|
if (objValue instanceof Date) {
|
|
@@ -35,6 +41,7 @@ const SnkFilterPeriod = class {
|
|
|
35
41
|
}
|
|
36
42
|
return (index.h("div", { class: "ez-col ez-col--nowrap" }, index.h("ez-date-input", { label: this.config.label, ref: ref => this._startDate = ref, value: this.getDate("start") }), index.h("label", { class: "ez-text ez-text--medium ez-text--primary ez-margin--medium" }, "at\u00E9"), index.h("ez-date-input", { label: this.config.label, ref: ref => this._endDate = ref, value: this.getDate("end") })));
|
|
37
43
|
}
|
|
44
|
+
get _element() { return index.getElement(this); }
|
|
38
45
|
};
|
|
39
46
|
|
|
40
47
|
exports.snk_filter_period = SnkFilterPeriod;
|
|
@@ -12,6 +12,11 @@ const SnkFilterPersonalized = class {
|
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
14
|
}
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
if (this._element) {
|
|
17
|
+
core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
15
20
|
getValue(param, index) {
|
|
16
21
|
if (this.value && index >= 0 && index < this.value.length) {
|
|
17
22
|
const rawValue = this.value[index];
|
|
@@ -84,6 +89,7 @@ const SnkFilterPersonalized = class {
|
|
|
84
89
|
}
|
|
85
90
|
return (index.h(index.Host, null, this.getParamsInterface()));
|
|
86
91
|
}
|
|
92
|
+
get _element() { return index.getElement(this); }
|
|
87
93
|
};
|
|
88
94
|
|
|
89
95
|
exports.snk_filter_personalized = SnkFilterPersonalized;
|
|
@@ -13,6 +13,11 @@ const SnkFilterSearch = class {
|
|
|
13
13
|
ezChangeListener(_evt) {
|
|
14
14
|
this.value = this._searchInput.value;
|
|
15
15
|
}
|
|
16
|
+
componentDidLoad() {
|
|
17
|
+
if (this._element) {
|
|
18
|
+
core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
19
|
+
}
|
|
20
|
+
}
|
|
16
21
|
doSearch(mode, argument) {
|
|
17
22
|
const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
18
23
|
return new Promise((resolve, reject) => {
|
|
@@ -33,6 +38,7 @@ const SnkFilterSearch = class {
|
|
|
33
38
|
}
|
|
34
39
|
return (index.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) }));
|
|
35
40
|
}
|
|
41
|
+
get _element() { return index.getElement(this); }
|
|
36
42
|
};
|
|
37
43
|
|
|
38
44
|
exports.snk_filter_search = SnkFilterSearch;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
|
+
const core = require('@sankhyalabs/core');
|
|
6
7
|
|
|
7
8
|
const SnkFilterText = class {
|
|
8
9
|
constructor(hostRef) {
|
|
@@ -11,12 +12,18 @@ const SnkFilterText = class {
|
|
|
11
12
|
ezChangeListener(evt) {
|
|
12
13
|
this.value = evt.detail;
|
|
13
14
|
}
|
|
15
|
+
componentDidLoad() {
|
|
16
|
+
if (this._element) {
|
|
17
|
+
core.ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
14
20
|
render() {
|
|
15
21
|
if (!this.config) {
|
|
16
22
|
return undefined;
|
|
17
23
|
}
|
|
18
24
|
return (index.h("ez-text-input", { ref: ref => this._textInputElement = ref, label: this.config.label, value: this.config.value }));
|
|
19
25
|
}
|
|
26
|
+
get _element() { return index.getElement(this); }
|
|
20
27
|
};
|
|
21
28
|
|
|
22
29
|
exports.snk_filter_text = SnkFilterText;
|
|
@@ -242,8 +242,8 @@ const SnkFormConfig = class {
|
|
|
242
242
|
var _a;
|
|
243
243
|
return ((_a = group.fields) === null || _a === void 0 ? void 0 : _a.length) ? group.fields.map((field) => {
|
|
244
244
|
var _a, _b;
|
|
245
|
-
return index.h("div", { key: field.name, class: this.getFieldConfigStyle(field), "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, index.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 &&
|
|
246
|
-
index.h("div", { class: "ez-flex form-config__config-options" }, index.h("snk-config-options", { idConfig: field.name, dataUnit: this.dataUnit, fieldConfig: this._fieldConfigSelected, onConfigOptionsChanged: (evt) => this.handleconfigOptionsChanged(evt.detail) })));
|
|
245
|
+
return index.h("div", { key: field.name, class: this.getFieldConfigStyle(field), "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, index.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 &&
|
|
246
|
+
index.h("div", { class: "ez-flex form-config__config-options" }, index.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) })));
|
|
247
247
|
}) : index.h("div", { class: "form-config__add-group-container" }, index.h("div", { class: "form-config__add-group-content" }, index.h("div", { class: "form-config__add-group-label" }, index.h("label", { class: "ez-text ez-text--center ez-text--medium ez-text--primary ez-text--bold" }, this.getMessage("snkFormConfig.form.labelDropField")))));
|
|
248
248
|
}
|
|
249
249
|
handleconfigOptionsChanged(fieldEdited) {
|
|
@@ -946,6 +946,10 @@ const SnkFormConfig = class {
|
|
|
946
946
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
947
947
|
this.loadConfig();
|
|
948
948
|
}
|
|
949
|
+
componentDidLoad() {
|
|
950
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
951
|
+
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
952
|
+
}
|
|
949
953
|
render() {
|
|
950
954
|
var _a, _b, _c, _d;
|
|
951
955
|
const configOptions = this._formConfigOptions.map((option) => {
|
|
@@ -969,6 +973,7 @@ const SnkFormConfig = class {
|
|
|
969
973
|
}), this.renderTempGroupByTab(tab.tab))), index.h("div", { class: "form-config__btn-add-group ez-row" }, index.h("div", { class: "form-config__btn-add-group-container ez-col ez-col--sd-12 ez-col--tb-12 ez-align--center" }, index.h("ez-button", { label: this.getMessage("snkFormConfig.form.labelNewGroup"), class: "ez-padding-horizontal--small ez-button--primary", size: "small", onClick: () => this.addNewGroup() }, index.h("ez-icon", { class: "ez-margin-right--small", slot: "leftIcon", iconName: "plus" })))))), index.h("div", { class: "form-config__fields-available ez-col ez-col--sd-3 ez-col--tb-3" }, index.h("section", { class: "ez-box__container ez-col ez-col--pn-12" }, index.h("h1", { class: "ez-title ez-title--large ez-title--primary ez-padding-bottom--medium" }, this.getMessage("snkFormConfig.availableFields.title")), index.h("ez-filter-input", { ref: ref => this._filterFieldsAvailable = ref, label: this.getMessage("snkFormConfig.availableFields.labelSearchField"), onEzChange: evt => this.onFilterChange(evt.detail) }), index.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 &&
|
|
970
974
|
index.h("div", { id: CONTAINER_ID.fieldsAvailable, class: "ez-row", "data-draggable-parent": "field" }, this.orderFieldsAvailable(this._fieldsAvailable).map((field) => index.h("div", { key: field.name, class: this._fieldsAvailableStyle, "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, index.h("snk-field-config", { onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, dataUnit: this.dataUnit, fieldConfig: field })))))))));
|
|
971
975
|
}
|
|
976
|
+
get _element() { return index.getElement(this); }
|
|
972
977
|
static get watchers() { return {
|
|
973
978
|
"formConfig": ["observeFormConfig"]
|
|
974
979
|
}; }
|
|
@@ -188,7 +188,7 @@ const SnkForm = class {
|
|
|
188
188
|
return undefined;
|
|
189
189
|
}
|
|
190
190
|
return (index.h("section", { class: "snk-form" }, index.h("div", { class: "snk-form__header snk-form__header--fixed ez-row" }, index.h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6", key: "formHeader" }, index.h("ez-button", { title: this.getMessage("snkForm.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small", onClick: () => this.exitForm() }), index.h("h1", { class: "ez-title ez-title--primary ez-title--xlarge ez-align--middle" }, this.getMessage("snkForm.title"))), index.h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6 ez-align--right" }, index.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 }))), index.h("section", null, index.h("div", { class: "ez-row" }, index.h("div", { class: "ez-col ez-col--sd-12" }, index.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 &&
|
|
191
|
-
index.h("snk-form-config", { dataUnit: this._dataUnit, formConfig: this.getFormConfig(), configName: this.configName, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigClose: () => this.closeConfig() }))))));
|
|
191
|
+
index.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() }))))));
|
|
192
192
|
}
|
|
193
193
|
get _element() { return index.getElement(this); }
|
|
194
194
|
};
|
|
@@ -298,6 +298,9 @@ const SnkPesquisa = class {
|
|
|
298
298
|
: 'Nenhum registro encontrado'
|
|
299
299
|
: 'Os resultados de sua pesquisa aparecerão aqui...';
|
|
300
300
|
}
|
|
301
|
+
componentDidLoad() {
|
|
302
|
+
core.ElementIDUtils.addIDInfo(this._element);
|
|
303
|
+
}
|
|
301
304
|
render() {
|
|
302
305
|
var _a;
|
|
303
306
|
return (index.h(index.Host, null, index.h("div", { class: "snk-pesquisa" }, index.h("div", { class: "snk-pesquisa__input" }, index.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 }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
|
|
@@ -306,6 +309,7 @@ const SnkPesquisa = class {
|
|
|
306
309
|
return (index.h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
|
|
307
310
|
})))));
|
|
308
311
|
}
|
|
312
|
+
get _element() { return index.getElement(this); }
|
|
309
313
|
static get watchers() { return {
|
|
310
314
|
"argument": ["observeArgument"]
|
|
311
315
|
}; }
|
|
@@ -142,14 +142,15 @@ export class SnkApplication {
|
|
|
142
142
|
/**
|
|
143
143
|
* Mostra o conteúdo passado em um Popup
|
|
144
144
|
*/
|
|
145
|
-
async showPopUp(content, size = "full") {
|
|
145
|
+
async showPopUp(content, size = "full", useHeader = true) {
|
|
146
146
|
this.clearContent(this._popUp);
|
|
147
|
-
if (content.tagName === 'EZ-MODAL-CONTAINER') {
|
|
148
|
-
this._popUp.useHeader = false;
|
|
149
|
-
}
|
|
150
147
|
this._popUp.appendChild(content);
|
|
151
148
|
this._popUp.opened = true;
|
|
152
149
|
this._popUp.heightMode = size;
|
|
150
|
+
this._popUp.useHeader = useHeader;
|
|
151
|
+
if (content.tagName === 'EZ-MODAL-CONTAINER') {
|
|
152
|
+
this._popUp.useHeader = false;
|
|
153
|
+
}
|
|
153
154
|
}
|
|
154
155
|
async showModal(content) {
|
|
155
156
|
this.clearContent(this._rightModal);
|
|
@@ -536,6 +537,7 @@ export class SnkApplication {
|
|
|
536
537
|
if (mode === "ADVANCED") {
|
|
537
538
|
return new Promise(accept => {
|
|
538
539
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
540
|
+
pesquisaContent["data-element-id"] = `entity_${entity}`;
|
|
539
541
|
pesquisaContent.argument = argument;
|
|
540
542
|
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
541
543
|
pesquisaContent.selectItem = (option) => {
|
|
@@ -852,13 +854,16 @@ export class SnkApplication {
|
|
|
852
854
|
},
|
|
853
855
|
"showPopUp": {
|
|
854
856
|
"complexType": {
|
|
855
|
-
"signature": "(content: HTMLElement, size?: string) => Promise<void>",
|
|
857
|
+
"signature": "(content: HTMLElement, size?: string, useHeader?: boolean) => Promise<void>",
|
|
856
858
|
"parameters": [{
|
|
857
859
|
"tags": [],
|
|
858
860
|
"text": ""
|
|
859
861
|
}, {
|
|
860
862
|
"tags": [],
|
|
861
863
|
"text": ""
|
|
864
|
+
}, {
|
|
865
|
+
"tags": [],
|
|
866
|
+
"text": ""
|
|
862
867
|
}],
|
|
863
868
|
"references": {
|
|
864
869
|
"Promise": {
|
package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
1
2
|
import { h, Host } from '@stencil/core';
|
|
2
3
|
import FilterItemType from '../filter-item-type.enum';
|
|
3
4
|
export class SnkFilterBinarySelect {
|
|
@@ -10,6 +11,11 @@ export class SnkFilterBinarySelect {
|
|
|
10
11
|
}
|
|
11
12
|
this.updateValue();
|
|
12
13
|
}
|
|
14
|
+
componentDidLoad() {
|
|
15
|
+
if (this._element) {
|
|
16
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
13
19
|
assertCheckedOption(updatingCheck) {
|
|
14
20
|
if (updatingCheck === this._checkOne) {
|
|
15
21
|
this._checkTwo.value = true;
|
|
@@ -99,6 +105,7 @@ export class SnkFilterBinarySelect {
|
|
|
99
105
|
}
|
|
100
106
|
};
|
|
101
107
|
}
|
|
108
|
+
static get elementRef() { return "_element"; }
|
|
102
109
|
static get listeners() {
|
|
103
110
|
return [{
|
|
104
111
|
"name": "ezChange",
|
package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
1
2
|
import { h } from '@stencil/core';
|
|
2
3
|
import FilterItemType from '../filter-item-type.enum';
|
|
3
4
|
export class SnkFilterMultiSelect {
|
|
@@ -7,6 +8,11 @@ export class SnkFilterMultiSelect {
|
|
|
7
8
|
async show() {
|
|
8
9
|
this._comboElement.setFocus();
|
|
9
10
|
}
|
|
11
|
+
componentDidLoad() {
|
|
12
|
+
if (this._element) {
|
|
13
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
10
16
|
render() {
|
|
11
17
|
if (!this.config || this.config.type !== FilterItemType.MULTI_SELECT) {
|
|
12
18
|
return undefined;
|
|
@@ -75,6 +81,7 @@ export class SnkFilterMultiSelect {
|
|
|
75
81
|
}
|
|
76
82
|
};
|
|
77
83
|
}
|
|
84
|
+
static get elementRef() { return "_element"; }
|
|
78
85
|
static get listeners() {
|
|
79
86
|
return [{
|
|
80
87
|
"name": "ezChange",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
1
2
|
import { h } from '@stencil/core';
|
|
2
3
|
import FilterItemType from '../filter-item-type.enum';
|
|
3
4
|
export class SnkFilterPeriod {
|
|
@@ -7,6 +8,11 @@ export class SnkFilterPeriod {
|
|
|
7
8
|
async show() {
|
|
8
9
|
this._numberElement.setFocus();
|
|
9
10
|
}
|
|
11
|
+
componentDidLoad() {
|
|
12
|
+
if (this._element) {
|
|
13
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
10
16
|
render() {
|
|
11
17
|
var _a;
|
|
12
18
|
if (!this.config || this.config.type !== FilterItemType.NUMBER) {
|
|
@@ -76,6 +82,7 @@ export class SnkFilterPeriod {
|
|
|
76
82
|
}
|
|
77
83
|
};
|
|
78
84
|
}
|
|
85
|
+
static get elementRef() { return "_element"; }
|
|
79
86
|
static get listeners() {
|
|
80
87
|
return [{
|
|
81
88
|
"name": "ezChange",
|