@sankhyalabs/sankhyablocks 5.6.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{SnkMessageBuilder-e64dce7f.js → SnkMessageBuilder-1760d2c9.js} +16 -1
- package/dist/cjs/{filter-item-type.enum-3daf58d3.js → filter-item-type.enum-aa823a00.js} +1 -0
- package/dist/cjs/filter-type.enum-b14ce507.js +11 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/presentationMode-52ec3bdd.js +7 -0
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
- package/dist/cjs/{snk-data-unit-85d6565e.js → snk-data-unit-f27603c9.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar.cjs.entry.js +52 -140
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +26 -15
- package/dist/cjs/snk-filter-detail.cjs.entry.js +5 -10
- package/dist/cjs/snk-filter-item.cjs.entry.js +36 -8
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +67 -0
- package/dist/cjs/snk-filter-modal.cjs.entry.js +72 -49
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +3 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +3 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +18 -2
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +3 -1
- package/dist/cjs/snk-filter-search.cjs.entry.js +3 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +2 -0
- package/dist/cjs/snk-grid.cjs.entry.js +8 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/presentationMode.js +5 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +60 -29
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +19 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +19 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +72 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +19 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +19 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +19 -0
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +1 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +5 -10
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +36 -8
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +32 -2
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +116 -156
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.css +8 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +116 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +19 -142
- package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js +7 -0
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +36 -0
- package/dist/collection/components/snk-filter-bar/utils/filters-mock.js +315 -0
- package/dist/collection/components/snk-grid/snk-grid.js +8 -1
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +16 -1
- package/dist/components/SnkMessageBuilder.js +16 -1
- package/dist/components/filter-item-type.enum.js +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/presentationMode.js +7 -0
- package/dist/components/snk-crud.js +22 -34
- package/dist/components/snk-detail-view2.js +24 -46
- package/dist/components/snk-filter-bar2.js +57 -157
- package/dist/components/snk-filter-binary-select.js +27 -16
- package/dist/components/snk-filter-detail2.js +5 -10
- package/dist/components/snk-filter-item2.js +36 -8
- package/dist/components/snk-filter-list.js +171 -1
- package/dist/components/snk-filter-modal-item.d.ts +11 -0
- package/dist/components/snk-filter-modal-item.js +6 -0
- package/dist/components/snk-filter-modal-item2.js +86 -0
- package/dist/components/snk-filter-modal.js +118 -1
- package/dist/components/snk-filter-multi-select.js +3 -1
- package/dist/components/snk-filter-number.js +3 -1
- package/dist/components/snk-filter-period.js +20 -2
- package/dist/components/snk-filter-personalized.js +3 -1
- package/dist/components/snk-filter-search.js +3 -1
- package/dist/components/snk-filter-text.js +3 -1
- package/dist/components/snk-grid2.js +18 -23
- package/dist/esm/{SnkMessageBuilder-f3590f65.js → SnkMessageBuilder-4caf8b4f.js} +16 -1
- package/dist/esm/{filter-item-type.enum-a79b2fa8.js → filter-item-type.enum-5028ed3f.js} +1 -0
- package/dist/esm/filter-type.enum-a80c1b6b.js +9 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/presentationMode-783bbf9d.js +7 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +2 -2
- package/dist/esm/{snk-data-unit-50b1660c.js → snk-data-unit-640399b3.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +1 -1
- package/dist/esm/snk-filter-bar.entry.js +53 -141
- package/dist/esm/snk-filter-binary-select.entry.js +27 -16
- package/dist/esm/snk-filter-detail.entry.js +6 -11
- package/dist/esm/snk-filter-item.entry.js +37 -9
- package/dist/esm/snk-filter-modal-item.entry.js +63 -0
- package/dist/esm/snk-filter-modal.entry.js +73 -50
- package/dist/esm/snk-filter-multi-select.entry.js +4 -2
- package/dist/esm/snk-filter-number.entry.js +4 -2
- package/dist/esm/snk-filter-period.entry.js +19 -3
- package/dist/esm/snk-filter-personalized.entry.js +4 -2
- package/dist/esm/snk-filter-search.entry.js +4 -2
- package/dist/esm/snk-filter-text.entry.js +3 -1
- package/dist/esm/snk-grid.entry.js +8 -1
- package/dist/sankhyablocks/p-08779202.entry.js +1 -0
- package/dist/sankhyablocks/p-1465f132.entry.js +1 -0
- package/dist/sankhyablocks/p-1a68fb59.js +1 -0
- package/dist/sankhyablocks/{p-f344b811.entry.js → p-21c2b733.entry.js} +1 -1
- package/dist/sankhyablocks/p-29c1889f.js +1 -0
- package/dist/sankhyablocks/p-355e7ab0.entry.js +1 -0
- package/dist/sankhyablocks/p-3794686e.entry.js +1 -0
- package/dist/sankhyablocks/{p-c4417efb.entry.js → p-4181c36d.entry.js} +1 -1
- package/dist/sankhyablocks/p-4ce96831.entry.js +1 -0
- package/dist/sankhyablocks/{p-3fbe2d69.entry.js → p-57b74971.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9dd2b8cb.js → p-584d7212.js} +1 -1
- package/dist/sankhyablocks/p-59705471.entry.js +1 -0
- package/dist/sankhyablocks/{p-3d3263b4.js → p-6981c03e.js} +1 -1
- package/dist/sankhyablocks/p-786ae316.entry.js +1 -0
- package/dist/sankhyablocks/p-80e52e85.entry.js +1 -0
- package/dist/sankhyablocks/p-8efb0f47.entry.js +1 -0
- package/dist/sankhyablocks/p-9af04fc7.entry.js +1 -0
- package/dist/sankhyablocks/{p-df8f13b4.entry.js → p-9c3f0caf.entry.js} +1 -1
- package/dist/sankhyablocks/p-9cbc3925.entry.js +1 -0
- package/dist/sankhyablocks/p-b9fb86fe.entry.js +1 -0
- package/dist/sankhyablocks/p-d9804798.js +1 -0
- package/dist/sankhyablocks/p-e2bb9c9a.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/editors/enum/presentationMode.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +5 -0
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +11 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +37 -0
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +17 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +2 -11
- package/dist/types/components/snk-filter-bar/types/filter-type.enum.d.ts +6 -0
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +20 -0
- package/dist/types/components/snk-filter-bar/utils/filters-mock.d.ts +186 -0
- package/dist/types/components.d.ts +119 -56
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/components/snk-filter-list2.js +0 -173
- package/dist/components/snk-filter-modal2.js +0 -97
- package/dist/sankhyablocks/p-1dcfd32a.entry.js +0 -1
- package/dist/sankhyablocks/p-3a2ce158.entry.js +0 -1
- package/dist/sankhyablocks/p-5e62a17b.entry.js +0 -1
- package/dist/sankhyablocks/p-5fc55684.entry.js +0 -1
- package/dist/sankhyablocks/p-73e830cf.entry.js +0 -1
- package/dist/sankhyablocks/p-86d29b6f.entry.js +0 -1
- package/dist/sankhyablocks/p-ad51bf1c.entry.js +0 -1
- package/dist/sankhyablocks/p-afba9bbe.entry.js +0 -1
- package/dist/sankhyablocks/p-c336170d.entry.js +0 -1
- package/dist/sankhyablocks/p-c9477950.js +0 -1
- package/dist/sankhyablocks/p-d5c9c1f8.entry.js +0 -1
- package/dist/sankhyablocks/p-ee82c157.entry.js +0 -1
- package/dist/sankhyablocks/p-fac37198.entry.js +0 -1
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
6
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
7
|
-
const filterItemType_enum = require('./filter-item-type.enum-
|
7
|
+
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
8
|
const core = require('@sankhyalabs/core');
|
9
9
|
|
10
10
|
const SnkFilterDetail = class {
|
@@ -18,7 +18,8 @@ const SnkFilterDetail = class {
|
|
18
18
|
* Exibe o componente snk-filter-detail.
|
19
19
|
*/
|
20
20
|
async show() {
|
21
|
-
|
21
|
+
var _a, _b;
|
22
|
+
(_b = (_a = this._editor)["show"]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
22
23
|
}
|
23
24
|
componentDidLoad() {
|
24
25
|
if (this._element) {
|
@@ -51,13 +52,7 @@ const SnkFilterDetail = class {
|
|
51
52
|
this.changeConfig(Object.assign(Object.assign({}, this.config), { visible: false, fixed: false, value: undefined }));
|
52
53
|
}
|
53
54
|
getPopUpHeaderButtons() {
|
54
|
-
|
55
|
-
return undefined;
|
56
|
-
}
|
57
|
-
return ([
|
58
|
-
this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()),
|
59
|
-
this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))
|
60
|
-
]);
|
55
|
+
return (index.h(index.Fragment, null, !this.config.removalBlocked && this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), !this.config.hardFixed && this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
|
61
56
|
}
|
62
57
|
buildIcon(title, iconName, action) {
|
63
58
|
return (index.h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, index.h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
|
@@ -129,7 +124,7 @@ const SnkFilterDetail = class {
|
|
129
124
|
}
|
130
125
|
render() {
|
131
126
|
const ContentEditor = this.getContentEditor();
|
132
|
-
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" }))));
|
127
|
+
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, getMessage: this.getMessage }), 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" }))));
|
133
128
|
}
|
134
129
|
get _element() { return index.getElement(this); }
|
135
130
|
};
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const filterItemType_enum = require('./filter-item-type.enum-
|
7
|
+
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
8
|
|
9
9
|
const SnkFilterItem = class {
|
10
10
|
constructor(hostRef) {
|
@@ -118,16 +118,17 @@ const SnkFilterItem = class {
|
|
118
118
|
evt.stopPropagation();
|
119
119
|
}
|
120
120
|
}
|
121
|
-
getLabel() {
|
121
|
+
getLabel(isTooltipLabel = false) {
|
122
122
|
const { type, value, label, props } = this.config;
|
123
123
|
if (value) {
|
124
124
|
if (type === filterItemType_enum.FilterItemType.BINARY_SELECT) {
|
125
125
|
const [optOne, optTwo] = props.options;
|
126
|
+
const tooltip = this.getMessage('snkFilterBar.binarySelectTooltip');
|
126
127
|
if (optOne.name === value) {
|
127
|
-
return optOne.label;
|
128
|
+
return isTooltipLabel ? `${tooltip} ${String(optOne.label).toLowerCase()}` : optOne.label;
|
128
129
|
}
|
129
130
|
if (optTwo.name === value) {
|
130
|
-
return optTwo.label;
|
131
|
+
return isTooltipLabel ? `${tooltip} ${String(optTwo.label).toLowerCase()}` : optTwo.label;
|
131
132
|
}
|
132
133
|
}
|
133
134
|
if (type === filterItemType_enum.FilterItemType.MULTI_SELECT) {
|
@@ -146,14 +147,21 @@ const SnkFilterItem = class {
|
|
146
147
|
}
|
147
148
|
const dateFormater = new Intl.DateTimeFormat("pt-BR");
|
148
149
|
if (end && start) {
|
149
|
-
|
150
|
+
const isSameYear = start.getFullYear() === end.getFullYear();
|
151
|
+
const formatOptions = Object.assign({ day: '2-digit', month: '2-digit' }, ((!isSameYear || isTooltipLabel) && { year: '2-digit' }));
|
152
|
+
const startLabel = core.DateUtils.formatDate(start, formatOptions);
|
153
|
+
const endLabel = core.DateUtils.formatDate(end, formatOptions);
|
154
|
+
if (isTooltipLabel) {
|
155
|
+
return this.getMessage('snkFilterBar.fullPeriodTooltip', { LABEL: label, START_LABEL: startLabel, END_LABEL: endLabel });
|
156
|
+
}
|
157
|
+
return `${label}: ${startLabel} \u2192 ${endLabel}`;
|
150
158
|
}
|
151
159
|
else {
|
152
160
|
if (start) {
|
153
|
-
return `${label}:
|
161
|
+
return `${label}: ${this.getMessage('snkFilterBar.onlyStartPeriodToltip')} ${dateFormater.format(start)}`;
|
154
162
|
}
|
155
163
|
else if (end) {
|
156
|
-
return `${label}:
|
164
|
+
return `${label}: ${this.getMessage('snkFilterBar.onlyEndPeriodToltip')} ${dateFormater.format(end)}`;
|
157
165
|
}
|
158
166
|
else {
|
159
167
|
return label;
|
@@ -166,10 +174,30 @@ const SnkFilterItem = class {
|
|
166
174
|
if (type === filterItemType_enum.FilterItemType.PERSONALIZED) {
|
167
175
|
return label;
|
168
176
|
}
|
177
|
+
if (type === filterItemType_enum.FilterItemType.MULTI_LIST) {
|
178
|
+
const selectedOptions = value.filter(item => item.check);
|
179
|
+
const checkedAmount = selectedOptions.length;
|
180
|
+
if (checkedAmount > 1) {
|
181
|
+
if (isTooltipLabel) {
|
182
|
+
const selectedOptionsDescrptions = selectedOptions.map(item => item.description);
|
183
|
+
return `${label}: ${selectedOptionsDescrptions.join(',')}`;
|
184
|
+
}
|
185
|
+
return `${label}: ${checkedAmount} ${this.getMessage('snkFilterBar.multiListToltip')}`;
|
186
|
+
}
|
187
|
+
return `${label}: ${value.description}`;
|
188
|
+
}
|
169
189
|
return `${label}: ${value}`;
|
170
190
|
}
|
171
191
|
return label;
|
172
192
|
}
|
193
|
+
applyTooltip() {
|
194
|
+
if (!this.config.value)
|
195
|
+
return undefined;
|
196
|
+
return {
|
197
|
+
'data-tooltip': this.getLabel(true),
|
198
|
+
'data-flow': 'bottom'
|
199
|
+
};
|
200
|
+
}
|
173
201
|
componentDidLoad() {
|
174
202
|
if (this._filterItemElement) {
|
175
203
|
core.ElementIDUtils.addIDInfo(this._filterItemElement);
|
@@ -207,7 +235,7 @@ const SnkFilterItem = class {
|
|
207
235
|
}
|
208
236
|
render() {
|
209
237
|
const leftIcon = this.getLeftIconName();
|
210
|
-
return (index.h(index.Host,
|
238
|
+
return (index.h(index.Host, Object.assign({}, this.applyTooltip()), index.h("ez-chip", { id: this.config.id, 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", id: "removeFilter" })), 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 }))));
|
211
239
|
}
|
212
240
|
get _filterItemElement() { return index.getElement(this); }
|
213
241
|
static get watchers() { return {
|
@@ -0,0 +1,67 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-21bd01e1.js');
|
6
|
+
const core = require('@sankhyalabs/core');
|
7
|
+
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
|
+
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
9
|
+
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
10
|
+
|
11
|
+
const snkFilterModalItemCss = ".grow{flex-grow:1}.gap{gap:4px}";
|
12
|
+
|
13
|
+
const SnkFilterModalItem = class {
|
14
|
+
constructor(hostRef) {
|
15
|
+
index.registerInstance(this, hostRef);
|
16
|
+
this.filterChange = index.createEvent(this, "filterChange", 7);
|
17
|
+
this.filterItem = undefined;
|
18
|
+
}
|
19
|
+
observeFilterItem(newValue) {
|
20
|
+
this.filterChange.emit(newValue);
|
21
|
+
}
|
22
|
+
getContentEditorConfig() {
|
23
|
+
const variations = { presentationMode: presentationMode.EPresentationMode.MODAL };
|
24
|
+
switch (this.filterItem.type) {
|
25
|
+
case filterItemType_enum.FilterItemType.BINARY_SELECT:
|
26
|
+
return { tag: "snk-filter-binary-select", variations };
|
27
|
+
case filterItemType_enum.FilterItemType.MULTI_SELECT:
|
28
|
+
return { tag: "snk-filter-multi-select" };
|
29
|
+
case filterItemType_enum.FilterItemType.PERIOD:
|
30
|
+
return { tag: "snk-filter-period", variations };
|
31
|
+
case filterItemType_enum.FilterItemType.SEARCH:
|
32
|
+
return { tag: "snk-filter-search" };
|
33
|
+
case filterItemType_enum.FilterItemType.NUMBER:
|
34
|
+
return { tag: "snk-filter-number" };
|
35
|
+
case filterItemType_enum.FilterItemType.PERSONALIZED:
|
36
|
+
return { tag: "snk-filter-personalized" };
|
37
|
+
case filterItemType_enum.FilterItemType.MULTI_LIST:
|
38
|
+
return { tag: "snk-entity-list" };
|
39
|
+
}
|
40
|
+
return { tag: "snk-filter-text" };
|
41
|
+
}
|
42
|
+
updateFilterValue(newValue) {
|
43
|
+
const isVisble = !this.filterItem.visible ? newValue !== undefined : true;
|
44
|
+
this.filterItem = Object.assign(Object.assign({}, this.filterItem), { value: newValue, visible: isVisble });
|
45
|
+
}
|
46
|
+
canShowDetailModal() {
|
47
|
+
return this.filterItem.filterType !== filterType_enum.FilterType.OTHER_FILTERS && this.filterItem.type !== filterItemType_enum.FilterItemType.BINARY_SELECT;
|
48
|
+
}
|
49
|
+
componentDidLoad() {
|
50
|
+
if (this._element) {
|
51
|
+
core.ElementIDUtils.addIDInfo(this._element);
|
52
|
+
const dataElementIdDoFilterItem = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
53
|
+
this._idContentEditor = `${dataElementIdDoFilterItem}_${this.filterItem.id}`;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
render() {
|
57
|
+
const { tag: ContentEditor, variations } = this.getContentEditorConfig();
|
58
|
+
return (index.h(index.Host, null, index.h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (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-title ez-title--small ez-title--primary grow" }, this.filterItem.detailModal))), index.h(ContentEditor, Object.assign({ config: this.filterItem, value: this.filterItem.value, onValueChanged: (event) => this.updateFilterValue(event.detail), "data-element-id": this._idContentEditor }, variations)))));
|
59
|
+
}
|
60
|
+
get _element() { return index.getElement(this); }
|
61
|
+
static get watchers() { return {
|
62
|
+
"filterItem": ["observeFilterItem"]
|
63
|
+
}; }
|
64
|
+
};
|
65
|
+
SnkFilterModalItem.style = snkFilterModalItemCss;
|
66
|
+
|
67
|
+
exports.snk_filter_modal_item = SnkFilterModalItem;
|
@@ -4,71 +4,94 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
6
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
7
|
-
const
|
8
|
-
const
|
7
|
+
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
8
|
+
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
9
9
|
|
10
|
-
const snkFilterModalCss = ".snk-filter__modal-container{width:
|
10
|
+
const snkFilterModalCss = "ez-modal{--ez-modal-content-padding:24px 12px}.snk-filter__modal-container{width:344px;max-width:344px;overflow:hidden}.snk-filter__modal-content{display:flex;flex-direction:column;gap:12px;max-height:760px;overflow-x:clip;overflow-y:auto;padding-right:4px}.snk-filter__modal-content::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.snk-filter__modal-collapsible-box{border:1px solid #DCE0E8;border-radius:var(--border--radius-medium);padding:12px 6px}";
|
11
11
|
|
12
12
|
const SnkFilterModal = class {
|
13
13
|
constructor(hostRef) {
|
14
14
|
index.registerInstance(this, hostRef);
|
15
|
-
this._filterArgument = undefined;
|
16
15
|
this.getMessage = undefined;
|
17
|
-
this.
|
18
|
-
this.
|
19
|
-
this.
|
20
|
-
this.
|
21
|
-
this.okButtonLabel = undefined;
|
22
|
-
this.infoText = undefined;
|
23
|
-
this.useSearch = undefined;
|
24
|
-
this.processModalAction = undefined;
|
16
|
+
this.filters = undefined;
|
17
|
+
this.applyFilters = undefined;
|
18
|
+
this.clearAll = undefined;
|
19
|
+
this.closeModal = undefined;
|
25
20
|
}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
}
|
34
|
-
return item;
|
35
|
-
});
|
21
|
+
getCustomMessage(key, params) {
|
22
|
+
var _a;
|
23
|
+
return (_a = this.getMessage) === null || _a === void 0 ? void 0 : _a.call(this, `snkFilterBar.filterModal.${key}`, params);
|
24
|
+
}
|
25
|
+
handleClearAll() {
|
26
|
+
const cleanedFilters = this.clearAll(this.filters);
|
27
|
+
this.filters = cleanedFilters;
|
36
28
|
}
|
37
|
-
|
38
|
-
const
|
39
|
-
|
40
|
-
|
29
|
+
modalActionListener(evt) {
|
30
|
+
const modalAction = evt.detail;
|
31
|
+
switch (modalAction) {
|
32
|
+
case ezModalContainer.ModalAction.CANCEL:
|
33
|
+
this.handleClearAll();
|
34
|
+
break;
|
35
|
+
case ezModalContainer.ModalAction.OK:
|
36
|
+
this.applyFilters(this.filters);
|
37
|
+
case ezModalContainer.ModalAction.CLOSE:
|
38
|
+
this.closeModal();
|
41
39
|
}
|
42
|
-
return this.getMessage(activeFilters > 1 ? "snkFilterBar.activeFilters" : "snkFilterBar.activeFilter", { ACTIVE_FILTERS: activeFilters });
|
43
40
|
}
|
44
|
-
|
45
|
-
|
46
|
-
return (index.h("button", { onClick: () => this.updateValue(item.id), class: "ez-padding--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item ez-align--middle ez-margin-bottom--small" }, index.h("ez-check", { id: `checkbox_${item.id}`, tabIndex: -1, class: "sc-snk-filter-bar snk-filter-bar__filter-modal-item__check", onEzChange: evt => this.updateValue(item.id, evt.detail), enabled: item.enabled, value: item.active, mode: utils.CheckMode.SWITCH }), index.h("div", { class: "ez-text ez-title--primary ez-text--medium ez-margin-left--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item__label" }, item.label)));
|
47
|
-
});
|
41
|
+
handleFilterChange(filterConfig) {
|
42
|
+
this.filters = this.filters.map(filter => filter.id === filterConfig.id ? filterConfig : filter);
|
48
43
|
}
|
49
|
-
|
50
|
-
|
51
|
-
this.updateValue(item.id);
|
52
|
-
}
|
44
|
+
handleClearFilters(filterList) {
|
45
|
+
this.filters = this.filters.map(filter => filterList.includes(filter) ? (Object.assign(Object.assign({}, filter), { value: undefined })) : filter);
|
53
46
|
}
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
47
|
+
renderFilterItem(filterItem, fullRow) {
|
48
|
+
return (index.h("snk-filter-modal-item", { class: fullRow ? 'ez-col ez-col--sd-12' : 'ez-col ez-col--sd-6 ez-padding--small', filterItem: filterItem, onFilterChange: (event) => this.handleFilterChange(event.detail) }));
|
49
|
+
}
|
50
|
+
mountFiltersLines(filters) {
|
51
|
+
const MAX_LINE_LENGTH = 2;
|
52
|
+
let currentLine = 0;
|
53
|
+
let forceAddCurrent = false;
|
54
|
+
const filtersLines = {};
|
55
|
+
for (let curr = 0; curr < filters.length; curr++) {
|
56
|
+
filtersLines[currentLine] = filtersLines[currentLine] || [];
|
57
|
+
const item = filters[curr];
|
58
|
+
const isLast = curr === filters.length - 1;
|
59
|
+
const currentItemMatch = [filterItemType_enum.FilterItemType.TEXT, filterItemType_enum.FilterItemType.NUMBER].includes(item.type);
|
60
|
+
const nextItemMatch = isLast ? false : [filterItemType_enum.FilterItemType.TEXT, filterItemType_enum.FilterItemType.NUMBER].includes(filters[curr + 1].type);
|
61
|
+
if ((currentItemMatch && nextItemMatch) || forceAddCurrent) {
|
62
|
+
filtersLines[currentLine].push(item);
|
63
|
+
forceAddCurrent = filtersLines[currentLine].length < MAX_LINE_LENGTH;
|
64
|
+
if (filtersLines[currentLine].length === MAX_LINE_LENGTH)
|
65
|
+
++currentLine;
|
66
|
+
continue;
|
59
67
|
}
|
68
|
+
filtersLines[currentLine] = filtersLines[currentLine] || [];
|
69
|
+
filtersLines[currentLine].push(item);
|
70
|
+
++currentLine;
|
60
71
|
}
|
61
|
-
|
62
|
-
|
63
|
-
|
72
|
+
return Object.values(filtersLines);
|
73
|
+
}
|
74
|
+
renderFilterLine(filters) {
|
75
|
+
const fullLine = filters.length === 1;
|
76
|
+
return (index.h("div", { class: "ez-row" }, filters.map((filter) => this.renderFilterItem(filter, fullLine))));
|
77
|
+
}
|
78
|
+
renderCollapsibleFilterBox(label, listItems) {
|
79
|
+
if (!listItems.length)
|
80
|
+
return null;
|
81
|
+
const appliedFilters = listItems.filter(filterItem => !!filterItem.value).length;
|
82
|
+
const lines = this.mountFiltersLines(listItems);
|
83
|
+
return (index.h("ez-collapsible-box", { className: "snk-filter__modal-collapsible-box", headerSize: "medium", value: true, label: label }, !!appliedFilters && (index.h("ez-badge", { className: "ez-badge--primary-subtle", slot: "rightSlot", label: appliedFilters })), lines.map(this.renderFilterLine.bind(this)), index.h("div", { class: "ez-flex ez-flex--justify-end grow" }, index.h("ez-button", { className: "ez-button--tertiary", size: "medium", label: "Limpar", onClick: () => this.handleClearFilters(listItems) }))));
|
84
|
+
}
|
85
|
+
componentWillRender() {
|
86
|
+
this._modalTitle = this.getCustomMessage('title');
|
87
|
+
this._okButtonLabel = this.getCustomMessage('okButtonLabel');
|
88
|
+
this._cancelButtonLabel = this.getCustomMessage('cancelButtonLabel');
|
64
89
|
}
|
65
90
|
render() {
|
66
|
-
const
|
67
|
-
const
|
68
|
-
|
69
|
-
|
70
|
-
:
|
71
|
-
undefined), items.length > 0 ? index.h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding-bottom--small" }, this.getActiveFiltersMsg()) : undefined, index.h("div", null, this.buildItems(items)), index.h("div", { class: "ez-text ez-text--large ez-align--middle ez-text--secondary ez-text--center ez-padding-bottom--large" }, this.infoText))));
|
91
|
+
const customFilters = this.filters.filter(filter => filter.filterType === filterType_enum.FilterType.CUSTOM_FILTER);
|
92
|
+
const quickFilters = this.filters.filter(filter => filter.filterType === filterType_enum.FilterType.QUICK_FILTER);
|
93
|
+
const otherFilters = this.filters.filter(filter => filter.filterType === filterType_enum.FilterType.OTHER_FILTERS);
|
94
|
+
return (index.h("ez-modal-container", { class: "snk-filter__modal-container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, index.h("div", { class: "snk-filter__modal-content" }, this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter])))));
|
72
95
|
}
|
73
96
|
};
|
74
97
|
SnkFilterModal.style = snkFilterModalCss;
|
@@ -4,11 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const filterItemType_enum = require('./filter-item-type.enum-
|
7
|
+
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
8
|
|
9
9
|
const SnkFilterMultiSelect = class {
|
10
10
|
constructor(hostRef) {
|
11
11
|
index.registerInstance(this, hostRef);
|
12
|
+
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
12
13
|
this.value = undefined;
|
13
14
|
this.config = undefined;
|
14
15
|
}
|
@@ -17,6 +18,7 @@ const SnkFilterMultiSelect = class {
|
|
17
18
|
*/
|
18
19
|
ezChangeListener(evt) {
|
19
20
|
this.value = evt.detail.value;
|
21
|
+
this.valueChanged.emit(this.value);
|
20
22
|
}
|
21
23
|
/**
|
22
24
|
* Exibe o componente snk-filter-multi-select
|
@@ -4,11 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const filterItemType_enum = require('./filter-item-type.enum-
|
7
|
+
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
8
|
|
9
9
|
const SnkFilterPeriod = class {
|
10
10
|
constructor(hostRef) {
|
11
11
|
index.registerInstance(this, hostRef);
|
12
|
+
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
12
13
|
this.config = undefined;
|
13
14
|
this.value = undefined;
|
14
15
|
}
|
@@ -17,6 +18,7 @@ const SnkFilterPeriod = class {
|
|
17
18
|
*/
|
18
19
|
ezChangeListener(evt) {
|
19
20
|
this.value = evt.detail;
|
21
|
+
this.valueChanged.emit(this.value);
|
20
22
|
}
|
21
23
|
/**
|
22
24
|
* Exibe o componente snk-filter-number
|
@@ -4,13 +4,19 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const filterItemType_enum = require('./filter-item-type.enum-
|
7
|
+
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
|
+
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
8
9
|
|
9
10
|
const SnkFilterPeriod = class {
|
10
11
|
constructor(hostRef) {
|
11
12
|
index.registerInstance(this, hostRef);
|
13
|
+
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
14
|
+
this._startDateLabel = 'Inicial';
|
15
|
+
this._endDateLabel = 'Final';
|
12
16
|
this.config = undefined;
|
17
|
+
this.getMessage = undefined;
|
13
18
|
this.value = undefined;
|
19
|
+
this.presentationMode = presentationMode.EPresentationMode.CHIP;
|
14
20
|
}
|
15
21
|
/**
|
16
22
|
* Emitido quando acontece a alteração de valor do componente snk-filter-period
|
@@ -19,6 +25,7 @@ const SnkFilterPeriod = class {
|
|
19
25
|
const start = this._startDate.value;
|
20
26
|
const end = this._endDate.value;
|
21
27
|
this.value = (start || end ? { start, end } : undefined);
|
28
|
+
this.valueChanged.emit(this.value);
|
22
29
|
}
|
23
30
|
componentDidLoad() {
|
24
31
|
if (this._element) {
|
@@ -43,11 +50,20 @@ const SnkFilterPeriod = class {
|
|
43
50
|
async show() {
|
44
51
|
this._startDate.setFocus();
|
45
52
|
}
|
53
|
+
buildLabel() {
|
54
|
+
if (this.presentationMode === presentationMode.EPresentationMode.CHIP) {
|
55
|
+
return index.h("label", { class: "ez-text ez-text--medium ez-text--primary ez-margin--medium" }, "at\u00E9");
|
56
|
+
}
|
57
|
+
}
|
58
|
+
componentWillLoad() {
|
59
|
+
this._startDateLabel = this.getMessage('snkFilterBar.labelStartDatePeriod');
|
60
|
+
this._endDateLabel = this.getMessage('snkFilterBar.labelEndDatePeriod');
|
61
|
+
}
|
46
62
|
render() {
|
47
63
|
if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.PERIOD) {
|
48
64
|
return undefined;
|
49
65
|
}
|
50
|
-
return (index.h("div", { class: "ez-col ez-col--nowrap" }, index.h("ez-date-input", { id: `${this.config.id}_start`,
|
66
|
+
return (index.h("div", { class: "ez-col ez-col--nowrap" }, index.h("ez-date-input", { id: `${this.config.id}_start`, class: this.presentationMode === presentationMode.EPresentationMode.MODAL ? 'ez-padding--small' : '', label: this._startDateLabel, ref: ref => this._startDate = ref, value: this.getDate("start") }), this.buildLabel(), index.h("ez-date-input", { id: `${this.config.id}_end`, class: this.presentationMode === presentationMode.EPresentationMode.MODAL ? 'ez-padding--small' : '', label: this._endDateLabel, ref: ref => this._endDate = ref, value: this.getDate("end") })));
|
51
67
|
}
|
52
68
|
get _element() { return index.getElement(this); }
|
53
69
|
};
|
@@ -6,11 +6,12 @@ const index = require('./index-21bd01e1.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
9
|
-
const filterItemType_enum = require('./filter-item-type.enum-
|
9
|
+
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
10
10
|
|
11
11
|
const SnkFilterPersonalized = class {
|
12
12
|
constructor(hostRef) {
|
13
13
|
index.registerInstance(this, hostRef);
|
14
|
+
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
14
15
|
this.config = undefined;
|
15
16
|
this.value = undefined;
|
16
17
|
this.fix = undefined;
|
@@ -42,6 +43,7 @@ const SnkFilterPersonalized = class {
|
|
42
43
|
if (this.value.filter(item => item != undefined).length == 0) {
|
43
44
|
this.value = null;
|
44
45
|
}
|
46
|
+
this.valueChanged.emit(this.value || []);
|
45
47
|
}
|
46
48
|
doSearch(mode, argument, param) {
|
47
49
|
const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
@@ -4,11 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const filterItemType_enum = require('./filter-item-type.enum-
|
7
|
+
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
8
|
|
9
9
|
const SnkFilterSearch = class {
|
10
10
|
constructor(hostRef) {
|
11
11
|
index.registerInstance(this, hostRef);
|
12
|
+
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
12
13
|
this.config = undefined;
|
13
14
|
this.value = undefined;
|
14
15
|
}
|
@@ -17,6 +18,7 @@ const SnkFilterSearch = class {
|
|
17
18
|
*/
|
18
19
|
ezChangeListener(_evt) {
|
19
20
|
this.value = this._searchInput.value;
|
21
|
+
this.valueChanged.emit(this.value);
|
20
22
|
}
|
21
23
|
componentDidLoad() {
|
22
24
|
if (this._element) {
|
@@ -8,6 +8,7 @@ const core = require('@sankhyalabs/core');
|
|
8
8
|
const SnkFilterText = class {
|
9
9
|
constructor(hostRef) {
|
10
10
|
index.registerInstance(this, hostRef);
|
11
|
+
this.valueChanged = index.createEvent(this, "valueChanged", 7);
|
11
12
|
this.config = undefined;
|
12
13
|
this.value = undefined;
|
13
14
|
}
|
@@ -16,6 +17,7 @@ const SnkFilterText = class {
|
|
16
17
|
*/
|
17
18
|
ezChangeListener(evt) {
|
18
19
|
this.value = evt.detail;
|
20
|
+
this.valueChanged.emit(this.value);
|
19
21
|
}
|
20
22
|
componentDidLoad() {
|
21
23
|
if (this._element) {
|
@@ -226,10 +226,12 @@ const SnkGrid = class {
|
|
226
226
|
if (!this._dataUnit) {
|
227
227
|
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
228
228
|
this._dataUnit = evt.detail;
|
229
|
+
this._dataUnitLoadLockerResolver = this._dataUnit.addLoadingLocker();
|
229
230
|
this.addElementID();
|
230
231
|
});
|
231
232
|
}
|
232
233
|
else {
|
234
|
+
this._dataUnitLoadLockerResolver = this._dataUnit.addLoadingLocker();
|
233
235
|
this.addElementID();
|
234
236
|
}
|
235
237
|
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
@@ -279,13 +281,18 @@ const SnkGrid = class {
|
|
279
281
|
getPrimaryButton() {
|
280
282
|
return this.presentationMode === index$1.PresentationMode.PRIMARY ? "INSERT" : "";
|
281
283
|
}
|
284
|
+
onEzGridReady() {
|
285
|
+
var _a;
|
286
|
+
(_a = this._dataUnitLoadLockerResolver) === null || _a === void 0 ? void 0 : _a.call(this);
|
287
|
+
this._dataUnitLoadLockerResolver = undefined;
|
288
|
+
}
|
282
289
|
render() {
|
283
290
|
var _a, _b;
|
284
291
|
if (!this._dataUnit) {
|
285
292
|
return undefined;
|
286
293
|
}
|
287
294
|
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-margin-bottom--medium" }, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
288
|
-
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", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, index.h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", 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(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig() }))));
|
295
|
+
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", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady() }, index.h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", 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(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig() }))));
|
289
296
|
}
|
290
297
|
get _element() { return index.getElement(this); }
|
291
298
|
};
|
@@ -26,6 +26,7 @@
|
|
26
26
|
"./components/snk-filter-bar/filter-item/editors/snk-filter-period.js",
|
27
27
|
"./components/snk-filter-bar/filter-item/editors/snk-filter-search.js",
|
28
28
|
"./components/snk-filter-bar/filter-item/editors/snk-filter-text.js",
|
29
|
+
"./components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js",
|
29
30
|
"./components/snk-filter-field-search/snk-filter-field-search.js",
|
30
31
|
"./components/snk-form/snk-form.js",
|
31
32
|
"./components/snk-form/subcomponents/snk-config-options/snk-config-options.js",
|