@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
@@ -8,23 +8,21 @@ import { P as PresentationMode } from './index2.js';
|
|
8
8
|
import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
|
9
9
|
import { V as VIEW_MODE } from './constants.js';
|
10
10
|
import { T as TaskbarProcessor } from './taskbar-processor.js';
|
11
|
-
import { d as defineCustomElement$
|
12
|
-
import { d as defineCustomElement$
|
13
|
-
import { d as defineCustomElement$
|
14
|
-
import { d as defineCustomElement$
|
11
|
+
import { d as defineCustomElement$i } from './snk-config-options2.js';
|
12
|
+
import { d as defineCustomElement$h } from './snk-configurator2.js';
|
13
|
+
import { d as defineCustomElement$g } from './snk-data-exporter2.js';
|
14
|
+
import { d as defineCustomElement$f } from './snk-data-unit2.js';
|
15
15
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder.js';
|
16
|
-
import { d as defineCustomElement$
|
17
|
-
import { d as defineCustomElement$
|
18
|
-
import { d as defineCustomElement$
|
19
|
-
import { d as defineCustomElement$
|
20
|
-
import { d as defineCustomElement$b } from './snk-filter-list2.js';
|
21
|
-
import { d as defineCustomElement$a } from './snk-filter-modal2.js';
|
16
|
+
import { d as defineCustomElement$e } from './snk-exporter-email-sender2.js';
|
17
|
+
import { d as defineCustomElement$c } from './snk-filter-bar2.js';
|
18
|
+
import { d as defineCustomElement$b } from './snk-filter-detail2.js';
|
19
|
+
import { d as defineCustomElement$a } from './snk-filter-item2.js';
|
22
20
|
import { d as defineCustomElement$8 } from './snk-form-summary2.js';
|
23
21
|
import { d as defineCustomElement$7 } from './snk-form-view2.js';
|
24
22
|
import { d as defineCustomElement$6 } from './snk-grid2.js';
|
25
23
|
import { d as defineCustomElement$5 } from './snk-grid-config2.js';
|
26
24
|
import { d as defineCustomElement$4 } from './snk-select-box2.js';
|
27
|
-
import { d as defineCustomElement$
|
25
|
+
import { d as defineCustomElement$d } from './snk-field-config2.js';
|
28
26
|
import { d as defineCustomElement$9 } from './snk-form-config2.js';
|
29
27
|
import { d as defineCustomElement$3 } from './snk-tab-config2.js';
|
30
28
|
|
@@ -361,7 +359,7 @@ function defineCustomElement$1() {
|
|
361
359
|
if (typeof customElements === "undefined") {
|
362
360
|
return;
|
363
361
|
}
|
364
|
-
const components = ["snk-guides-viewer", "snk-config-options", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-detail-view", "snk-exporter-email-sender", "snk-field-config", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-
|
362
|
+
const components = ["snk-guides-viewer", "snk-config-options", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-detail-view", "snk-exporter-email-sender", "snk-field-config", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-form-config", "snk-form-summary", "snk-form-view", "snk-grid", "snk-grid-config", "snk-select-box", "snk-tab-config", "snk-taskbar"];
|
365
363
|
components.forEach(tagName => { switch (tagName) {
|
366
364
|
case "snk-guides-viewer":
|
367
365
|
if (!customElements.get(tagName)) {
|
@@ -370,22 +368,22 @@ function defineCustomElement$1() {
|
|
370
368
|
break;
|
371
369
|
case "snk-config-options":
|
372
370
|
if (!customElements.get(tagName)) {
|
373
|
-
defineCustomElement$
|
371
|
+
defineCustomElement$i();
|
374
372
|
}
|
375
373
|
break;
|
376
374
|
case "snk-configurator":
|
377
375
|
if (!customElements.get(tagName)) {
|
378
|
-
defineCustomElement$
|
376
|
+
defineCustomElement$h();
|
379
377
|
}
|
380
378
|
break;
|
381
379
|
case "snk-data-exporter":
|
382
380
|
if (!customElements.get(tagName)) {
|
383
|
-
defineCustomElement$
|
381
|
+
defineCustomElement$g();
|
384
382
|
}
|
385
383
|
break;
|
386
384
|
case "snk-data-unit":
|
387
385
|
if (!customElements.get(tagName)) {
|
388
|
-
defineCustomElement$
|
386
|
+
defineCustomElement$f();
|
389
387
|
}
|
390
388
|
break;
|
391
389
|
case "snk-detail-view":
|
@@ -394,36 +392,26 @@ function defineCustomElement$1() {
|
|
394
392
|
}
|
395
393
|
break;
|
396
394
|
case "snk-exporter-email-sender":
|
397
|
-
if (!customElements.get(tagName)) {
|
398
|
-
defineCustomElement$g();
|
399
|
-
}
|
400
|
-
break;
|
401
|
-
case "snk-field-config":
|
402
|
-
if (!customElements.get(tagName)) {
|
403
|
-
defineCustomElement$f();
|
404
|
-
}
|
405
|
-
break;
|
406
|
-
case "snk-filter-bar":
|
407
395
|
if (!customElements.get(tagName)) {
|
408
396
|
defineCustomElement$e();
|
409
397
|
}
|
410
398
|
break;
|
411
|
-
case "snk-
|
399
|
+
case "snk-field-config":
|
412
400
|
if (!customElements.get(tagName)) {
|
413
401
|
defineCustomElement$d();
|
414
402
|
}
|
415
403
|
break;
|
416
|
-
case "snk-filter-
|
404
|
+
case "snk-filter-bar":
|
417
405
|
if (!customElements.get(tagName)) {
|
418
406
|
defineCustomElement$c();
|
419
407
|
}
|
420
408
|
break;
|
421
|
-
case "snk-filter-
|
409
|
+
case "snk-filter-detail":
|
422
410
|
if (!customElements.get(tagName)) {
|
423
411
|
defineCustomElement$b();
|
424
412
|
}
|
425
413
|
break;
|
426
|
-
case "snk-filter-
|
414
|
+
case "snk-filter-item":
|
427
415
|
if (!customElements.get(tagName)) {
|
428
416
|
defineCustomElement$a();
|
429
417
|
}
|
@@ -706,7 +694,7 @@ function defineCustomElement() {
|
|
706
694
|
if (typeof customElements === "undefined") {
|
707
695
|
return;
|
708
696
|
}
|
709
|
-
const components = ["snk-detail-view", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-
|
697
|
+
const components = ["snk-detail-view", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-filter-bar", "snk-filter-detail", "snk-filter-item", "snk-form-summary", "snk-form-view", "snk-grid", "snk-grid-config", "snk-select-box", "snk-taskbar"];
|
710
698
|
components.forEach(tagName => { switch (tagName) {
|
711
699
|
case "snk-detail-view":
|
712
700
|
if (!customElements.get(tagName)) {
|
@@ -715,40 +703,30 @@ function defineCustomElement() {
|
|
715
703
|
break;
|
716
704
|
case "snk-data-exporter":
|
717
705
|
if (!customElements.get(tagName)) {
|
718
|
-
defineCustomElement$
|
706
|
+
defineCustomElement$g();
|
719
707
|
}
|
720
708
|
break;
|
721
709
|
case "snk-data-unit":
|
722
710
|
if (!customElements.get(tagName)) {
|
723
|
-
defineCustomElement$
|
711
|
+
defineCustomElement$f();
|
724
712
|
}
|
725
713
|
break;
|
726
714
|
case "snk-exporter-email-sender":
|
727
|
-
if (!customElements.get(tagName)) {
|
728
|
-
defineCustomElement$g();
|
729
|
-
}
|
730
|
-
break;
|
731
|
-
case "snk-filter-bar":
|
732
715
|
if (!customElements.get(tagName)) {
|
733
716
|
defineCustomElement$e();
|
734
717
|
}
|
735
718
|
break;
|
736
|
-
case "snk-filter-
|
737
|
-
if (!customElements.get(tagName)) {
|
738
|
-
defineCustomElement$d();
|
739
|
-
}
|
740
|
-
break;
|
741
|
-
case "snk-filter-item":
|
719
|
+
case "snk-filter-bar":
|
742
720
|
if (!customElements.get(tagName)) {
|
743
721
|
defineCustomElement$c();
|
744
722
|
}
|
745
723
|
break;
|
746
|
-
case "snk-filter-
|
724
|
+
case "snk-filter-detail":
|
747
725
|
if (!customElements.get(tagName)) {
|
748
726
|
defineCustomElement$b();
|
749
727
|
}
|
750
728
|
break;
|
751
|
-
case "snk-filter-
|
729
|
+
case "snk-filter-item":
|
752
730
|
if (!customElements.get(tagName)) {
|
753
731
|
defineCustomElement$a();
|
754
732
|
}
|
@@ -1,14 +1,12 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import { DataType, ObjectUtils, ElementIDUtils,
|
2
|
+
import { DataType, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext } from '@sankhyalabs/core';
|
3
3
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
4
|
-
import { F as FilterItemType } from './filter-item-type.enum.js';
|
5
|
-
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
6
|
-
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
7
4
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import { d as defineCustomElement$
|
5
|
+
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
6
|
+
import { F as FilterItemType } from './filter-item-type.enum.js';
|
7
|
+
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
8
|
+
import { d as defineCustomElement$2 } from './snk-filter-detail2.js';
|
9
|
+
import { d as defineCustomElement$1 } from './snk-filter-item2.js';
|
12
10
|
|
13
11
|
const buildFilter = (item) => {
|
14
12
|
switch (item.type) {
|
@@ -107,13 +105,43 @@ function buildPersonalized(item) {
|
|
107
105
|
};
|
108
106
|
}
|
109
107
|
|
108
|
+
class SnkFilterModalFactory {
|
109
|
+
constructor({ filterConfig, onComplete, getMessage }) {
|
110
|
+
this._filterConfig = filterConfig;
|
111
|
+
this._onComplete = onComplete;
|
112
|
+
this._getMessage = getMessage;
|
113
|
+
}
|
114
|
+
applyFilters(newFilterConfig) {
|
115
|
+
this._onComplete(newFilterConfig);
|
116
|
+
this._closeModal();
|
117
|
+
}
|
118
|
+
clearAll(filterConfigSnapshot) {
|
119
|
+
return filterConfigSnapshot.map(filterItem => (Object.assign(Object.assign({}, filterItem), { value: undefined })));
|
120
|
+
}
|
121
|
+
buildFilterModal() {
|
122
|
+
const filterModal = document.createElement("snk-filter-modal");
|
123
|
+
filterModal.filters = this._filterConfig;
|
124
|
+
filterModal.getMessage = this._getMessage.bind(this);
|
125
|
+
filterModal.applyFilters = this.applyFilters.bind(this);
|
126
|
+
filterModal.clearAll = this.clearAll.bind(this);
|
127
|
+
filterModal.closeModal = () => this._closeModal();
|
128
|
+
return filterModal;
|
129
|
+
}
|
130
|
+
async showModal() {
|
131
|
+
const filterModal = this.buildFilterModal();
|
132
|
+
const modalProps = {
|
133
|
+
content: filterModal,
|
134
|
+
position: 'left',
|
135
|
+
heightMode: 'full',
|
136
|
+
closeOutsideClick: false,
|
137
|
+
useScrimLight: true
|
138
|
+
};
|
139
|
+
this._closeModal = await ApplicationUtils.showModal(modalProps);
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
110
143
|
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(--most-visible, 3);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%}";
|
111
144
|
|
112
|
-
const PERSONALIZED_FILTER = "PERSONALIZED_FILTER";
|
113
|
-
const DEFAULT_FILTER = "DEFAULT_FILTER";
|
114
|
-
const CLEAR_ALL_FILTERS = "CLEAR_ALL_FILTERS";
|
115
|
-
const ADD_FILTER = "ADD_FILTER";
|
116
|
-
const APPLIED_FILTERS = "APPLIED_FILTERS";
|
117
145
|
const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
118
146
|
constructor() {
|
119
147
|
super();
|
@@ -202,9 +230,9 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
202
230
|
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
203
231
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-bar.msg.ts"
|
204
232
|
*/
|
205
|
-
getMessage(key, params) {
|
233
|
+
getMessage(key, params, defaultValue) {
|
206
234
|
var _a;
|
207
|
-
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
235
|
+
return ((_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params)) || defaultValue;
|
208
236
|
}
|
209
237
|
getFilter(_dataUnit) {
|
210
238
|
var _a;
|
@@ -293,110 +321,6 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
293
321
|
return item;
|
294
322
|
}).sort((a, b) => this._filtersComparator(a, b));
|
295
323
|
}
|
296
|
-
getAddListItems() {
|
297
|
-
const hiddenItems = this.filterConfig
|
298
|
-
.filter(item => !item.visible && this.isListable(item));
|
299
|
-
const footerItems = [{ name: PERSONALIZED_FILTER, label: this.getMessage("snkFilterBar.customFilter"), iconName: "tune", kind: "FOOTER" }];
|
300
|
-
if (this.allowDefault) {
|
301
|
-
footerItems.push({ name: DEFAULT_FILTER, label: this.getMessage("snkFilterBar.defaultFilter"), iconName: "configuration", kind: "FOOTER" });
|
302
|
-
}
|
303
|
-
return hiddenItems.map(filter => { return { name: filter.id, label: filter.label, kind: "FILTER", iconName: null }; })
|
304
|
-
.concat(footerItems);
|
305
|
-
}
|
306
|
-
getActiveClass() {
|
307
|
-
const filterApplied = this.filterConfig.filter(item => item.value != undefined).length > 0;
|
308
|
-
return filterApplied ? "sc-snk-filter-bar snk-filter-bar__filter-list-items-button--active" : "";
|
309
|
-
}
|
310
|
-
isListable(item, allowPersonalized = false) {
|
311
|
-
return item.type !== FilterItemType.DEFAULT_FILTER && (allowPersonalized || item.type !== FilterItemType.PERSONALIZED);
|
312
|
-
}
|
313
|
-
getAppliedListItems() {
|
314
|
-
const appliedItems = this.filterConfig
|
315
|
-
.filter(item => this.isActiveFilter(item) && this.isListable(item, true));
|
316
|
-
return appliedItems.map(filter => {
|
317
|
-
return { name: filter.id, label: filter.label, kind: "FILTER", iconName: null };
|
318
|
-
}).concat([
|
319
|
-
{ name: CLEAR_ALL_FILTERS, label: this.getMessage("snkFilterBar.clearAllFilters"), iconName: "cleaning", kind: "FOOTER" }
|
320
|
-
]);
|
321
|
-
}
|
322
|
-
addPersonalizedFilters(personalizedItems) {
|
323
|
-
const activeFilters = {};
|
324
|
-
personalizedItems.forEach(item => {
|
325
|
-
if (item.active) {
|
326
|
-
activeFilters[item.id] = true;
|
327
|
-
}
|
328
|
-
});
|
329
|
-
this.filterConfig = this.filterConfig.map(item => {
|
330
|
-
var _a, _b;
|
331
|
-
if (item.type === FilterItemType.PERSONALIZED) {
|
332
|
-
const visible = activeFilters[item.id];
|
333
|
-
if (!item.visible && visible) {
|
334
|
-
this.calculateUpdateSequence(item);
|
335
|
-
if (((_b = (_a = item.props) === null || _a === void 0 ? void 0 : _a.personalizedFilter) === null || _b === void 0 ? void 0 : _b.parameters) != undefined) {
|
336
|
-
this._pendingFilters.push(item.id);
|
337
|
-
}
|
338
|
-
}
|
339
|
-
return this.normalizeItem(visible ? Object.assign(Object.assign({}, item), { visible }) : Object.assign(Object.assign({}, item), { visible, value: undefined, fixed: undefined }));
|
340
|
-
}
|
341
|
-
return item;
|
342
|
-
}).sort((a, b) => this._filtersComparator(a, b));
|
343
|
-
}
|
344
|
-
openDefaultFilterModal() {
|
345
|
-
const filterModal = document.createElement("snk-filter-modal");
|
346
|
-
const defaultFilter = this.filterConfig.filter(item => item.type === FilterItemType.DEFAULT_FILTER);
|
347
|
-
filterModal.getMessage = (key, props) => this.getMessage(key, props);
|
348
|
-
filterModal.modalTitle = this.getMessage("snkFilterBar.modalDefaultFilterTitle");
|
349
|
-
filterModal.infoText = this.getMessage(defaultFilter.length == 0 ? "snkFilterBar.modalInfoTextCreateDefault" : "snkFilterBar.modalInfoTextEditDefault");
|
350
|
-
filterModal.items = defaultFilter.map(item => {
|
351
|
-
return { id: item.id, active: true, enabled: false, label: item.label };
|
352
|
-
});
|
353
|
-
filterModal.processModalAction = (_action) => {
|
354
|
-
this._application.closeModal();
|
355
|
-
};
|
356
|
-
this._application.showModal(filterModal);
|
357
|
-
}
|
358
|
-
openPersonalizedModal() {
|
359
|
-
const filterModal = document.createElement("snk-filter-modal");
|
360
|
-
const personalizedFilter = this.filterConfig
|
361
|
-
.filter(item => item.type === FilterItemType.PERSONALIZED)
|
362
|
-
.sort((itemA, itemB) => StringUtils.compare(itemA.label, itemB.label));
|
363
|
-
filterModal.getMessage = (key, props) => this.getMessage(key, props);
|
364
|
-
filterModal.modalTitle = this.getMessage("snkFilterBar.modalPersonalizedFilterTitle");
|
365
|
-
filterModal.modalSubTitle = this.getMessage("snkFilterBar.modalPersonalizedFilterSubTitle");
|
366
|
-
filterModal.okButtonLabel = this.getMessage("snkFilterBar.modalOkButtonLabel");
|
367
|
-
filterModal.cancelButtonLabel = this.getMessage("snkFilterBar.modalCancelButtonLabel");
|
368
|
-
filterModal.infoText = this.getMessage("snkFilterBar.modalInfoTextCreateEditPersonalized");
|
369
|
-
filterModal.useSearch = true;
|
370
|
-
filterModal.items = personalizedFilter.map(item => {
|
371
|
-
return { id: item.id, active: item.visible, enabled: true, label: item.label };
|
372
|
-
});
|
373
|
-
filterModal.processModalAction = (action) => {
|
374
|
-
if (action === ModalAction.CANCEL) {
|
375
|
-
// O Botão de cancelar, tem efeito específico:
|
376
|
-
// - Desmarcar todos os filtros personalizados.
|
377
|
-
filterModal.items = filterModal.items.map(item => {
|
378
|
-
return Object.assign(Object.assign({}, item), { active: false });
|
379
|
-
});
|
380
|
-
}
|
381
|
-
else {
|
382
|
-
if (action === ModalAction.OK) {
|
383
|
-
this.addPersonalizedFilters(filterModal.items);
|
384
|
-
}
|
385
|
-
this._application.closeModal();
|
386
|
-
}
|
387
|
-
};
|
388
|
-
this._application.showModal(filterModal);
|
389
|
-
}
|
390
|
-
clearFilters() {
|
391
|
-
let changed = false;
|
392
|
-
this.filterConfig = this.filterConfig.map(item => {
|
393
|
-
if (item.value != undefined) {
|
394
|
-
changed = true;
|
395
|
-
}
|
396
|
-
return Object.assign(Object.assign({}, item), { value: undefined });
|
397
|
-
}).sort((a, b) => this._filtersComparator(a, b));
|
398
|
-
return changed;
|
399
|
-
}
|
400
324
|
loadPermitions() {
|
401
325
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
402
326
|
}
|
@@ -445,31 +369,17 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
445
369
|
filterChangeListener(evt) {
|
446
370
|
this.updateFilter(evt.detail);
|
447
371
|
}
|
448
|
-
|
449
|
-
const
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
}
|
460
|
-
}
|
461
|
-
appliedFilterHandler(itemName) {
|
462
|
-
if (itemName === CLEAR_ALL_FILTERS) {
|
463
|
-
if (this.clearFilters()) {
|
464
|
-
this._application.info(this.getMessage("snkFilterBar.successfullyCleaned"), { iconName: "check" });
|
465
|
-
}
|
466
|
-
}
|
467
|
-
else {
|
468
|
-
const filterItemElement = this._element.querySelector("#filter-" + itemName);
|
469
|
-
if (filterItemElement) {
|
470
|
-
filterItemElement.showUp(true);
|
471
|
-
}
|
472
|
-
}
|
372
|
+
async showFilterModal() {
|
373
|
+
const callbackOnApplyFilter = (filters) => {
|
374
|
+
this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
|
375
|
+
};
|
376
|
+
const factoryParams = {
|
377
|
+
filterConfig: this.filterConfig,
|
378
|
+
onComplete: callbackOnApplyFilter,
|
379
|
+
getMessage: (key, props) => this.getMessage(key, props)
|
380
|
+
};
|
381
|
+
const factory = new SnkFilterModalFactory(factoryParams);
|
382
|
+
await factory.showModal();
|
473
383
|
}
|
474
384
|
componentWillLoad() {
|
475
385
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
@@ -486,7 +396,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
486
396
|
if (!this.dataUnit || !this.filterConfig || this.filterConfig.length === 0) {
|
487
397
|
return undefined;
|
488
398
|
}
|
489
|
-
return (h(Host, null, h("ez-scroller", { direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, this.getFilterItems()), h("
|
399
|
+
return (h(Host, null, h("ez-scroller", { direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, this.getFilterItems()), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
|
490
400
|
}
|
491
401
|
get _element() { return this; }
|
492
402
|
static get watchers() { return {
|
@@ -505,7 +415,7 @@ function defineCustomElement() {
|
|
505
415
|
if (typeof customElements === "undefined") {
|
506
416
|
return;
|
507
417
|
}
|
508
|
-
const components = ["snk-filter-bar", "snk-filter-detail", "snk-filter-item"
|
418
|
+
const components = ["snk-filter-bar", "snk-filter-detail", "snk-filter-item"];
|
509
419
|
components.forEach(tagName => { switch (tagName) {
|
510
420
|
case "snk-filter-bar":
|
511
421
|
if (!customElements.get(tagName)) {
|
@@ -513,21 +423,11 @@ function defineCustomElement() {
|
|
513
423
|
}
|
514
424
|
break;
|
515
425
|
case "snk-filter-detail":
|
516
|
-
if (!customElements.get(tagName)) {
|
517
|
-
defineCustomElement$4();
|
518
|
-
}
|
519
|
-
break;
|
520
|
-
case "snk-filter-item":
|
521
|
-
if (!customElements.get(tagName)) {
|
522
|
-
defineCustomElement$3();
|
523
|
-
}
|
524
|
-
break;
|
525
|
-
case "snk-filter-list":
|
526
426
|
if (!customElements.get(tagName)) {
|
527
427
|
defineCustomElement$2();
|
528
428
|
}
|
529
429
|
break;
|
530
|
-
case "snk-filter-
|
430
|
+
case "snk-filter-item":
|
531
431
|
if (!customElements.get(tagName)) {
|
532
432
|
defineCustomElement$1();
|
533
433
|
}
|
@@ -1,13 +1,18 @@
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
4
|
+
import { E as EPresentationMode } from './presentationMode.js';
|
4
5
|
|
5
6
|
const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
6
7
|
constructor() {
|
7
8
|
super();
|
8
9
|
this.__registerHost();
|
10
|
+
this.valueChanged = createEvent(this, "valueChanged", 7);
|
11
|
+
this._noOptionValue = 'NO_VALUE';
|
12
|
+
this._radioButtonValue = undefined;
|
9
13
|
this.value = undefined;
|
10
14
|
this.config = undefined;
|
15
|
+
this.presentationMode = EPresentationMode.CHIP;
|
11
16
|
}
|
12
17
|
isSelected(option) {
|
13
18
|
return this.value == undefined || this.value === option;
|
@@ -16,15 +21,15 @@ const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
16
21
|
* Emitido quando acontece a alteração de valor do componente snk-filter-binary-select
|
17
22
|
*/
|
18
23
|
ezChangeListener(evt) {
|
19
|
-
if (
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
if (this._element) {
|
26
|
-
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
24
|
+
if (this.presentationMode === EPresentationMode.MODAL) {
|
25
|
+
if (!evt.detail) {
|
26
|
+
this.assertCheckedOption(evt.target);
|
27
|
+
}
|
28
|
+
this.updateValue();
|
29
|
+
return;
|
27
30
|
}
|
31
|
+
this.value = evt.detail === this._noOptionValue ? undefined : evt.detail;
|
32
|
+
this._radioButtonValue = evt.detail;
|
28
33
|
}
|
29
34
|
assertCheckedOption(updatingCheck) {
|
30
35
|
if (updatingCheck === this._checkOne) {
|
@@ -42,25 +47,31 @@ const SnkFilterBinarySelect$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
42
47
|
else {
|
43
48
|
this.value = undefined;
|
44
49
|
}
|
50
|
+
this.valueChanged.emit(this.value);
|
45
51
|
}
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
52
|
+
componentDidLoad() {
|
53
|
+
if (this._element) {
|
54
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
55
|
+
}
|
56
|
+
}
|
57
|
+
componentWillLoad() {
|
58
|
+
this._radioButtonValue = this.value || this._noOptionValue;
|
51
59
|
}
|
52
60
|
render() {
|
53
61
|
if (!this.config || this.config.type !== FilterItemType.BINARY_SELECT) {
|
54
62
|
return undefined;
|
55
63
|
}
|
56
64
|
const [optOne, optTwo] = this.config.props.options;
|
57
|
-
|
65
|
+
if (this.presentationMode === EPresentationMode.MODAL) {
|
66
|
+
return (h(Host, null, h("div", { class: "ez-flex ez-flex--row ez-flex--align-items-center" }, h("label", { class: "ez-text ez-title--small ez-title--primary", style: { flex: '1 1 0', width: '0px' } }, this.config.detailModal), h("ez-check", { compact: true, style: { flex: '1 1 0', width: '0px' }, id: `${this.config.id}_${optOne.name || "option1"}`, label: optOne.label, class: "sc-snk-filter-bar editor__ez-check", ref: (ref) => this._checkOne = ref, value: this.isSelected(optOne.name) }), h("ez-check", { compact: true, style: { flex: '1 1 0', width: '0px' }, id: `${this.config.id}_${optTwo.name || "option2"}`, label: optTwo.label, class: "sc-snk-filter-bar editor__ez-check", ref: (ref) => this._checkTwo = ref, value: this.isSelected(optTwo.name) }))));
|
67
|
+
}
|
68
|
+
return (h(Host, null, h("ez-radio-button", { value: this._radioButtonValue }, h("ez-radio-button-option", { id: `${this.config.id}_${optOne.name || "option1"}`, class: "sc-snk-filter-bar editor__ez-check", label: optOne.label, value: optOne.name }), h("ez-radio-button-option", { id: `${this.config.id}_${optTwo.name || "option2"}`, class: "sc-snk-filter-bar editor__ez-check", label: optTwo.label, value: optTwo.name }), h("ez-radio-button-option", { id: `${this.config.id}_option3`, class: "sc-snk-filter-bar editor__ez-check", label: `${optOne.label} + ${optTwo.label}`, value: this._noOptionValue }))));
|
58
69
|
}
|
59
70
|
get _element() { return this; }
|
60
71
|
}, [0, "snk-filter-binary-select", {
|
61
72
|
"value": [1544],
|
62
73
|
"config": [16],
|
63
|
-
"
|
74
|
+
"presentationMode": [2, "presentation-mode"]
|
64
75
|
}, [[0, "ezChange", "ezChangeListener"]]]);
|
65
76
|
function defineCustomElement$1() {
|
66
77
|
if (typeof customElements === "undefined") {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, Host } from '@stencil/core/internal/client';
|
2
2
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
4
4
|
import { ElementIDUtils, DataType } from '@sankhyalabs/core';
|
@@ -15,7 +15,8 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
15
15
|
* Exibe o componente snk-filter-detail.
|
16
16
|
*/
|
17
17
|
async show() {
|
18
|
-
|
18
|
+
var _a, _b;
|
19
|
+
(_b = (_a = this._editor)["show"]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
19
20
|
}
|
20
21
|
componentDidLoad() {
|
21
22
|
if (this._element) {
|
@@ -48,13 +49,7 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
48
49
|
this.changeConfig(Object.assign(Object.assign({}, this.config), { visible: false, fixed: false, value: undefined }));
|
49
50
|
}
|
50
51
|
getPopUpHeaderButtons() {
|
51
|
-
|
52
|
-
return undefined;
|
53
|
-
}
|
54
|
-
return ([
|
55
|
-
this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()),
|
56
|
-
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 })))
|
57
|
-
]);
|
52
|
+
return (h(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 })))));
|
58
53
|
}
|
59
54
|
buildIcon(title, iconName, action) {
|
60
55
|
return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
|
@@ -126,7 +121,7 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
126
121
|
}
|
127
122
|
render() {
|
128
123
|
const ContentEditor = this.getContentEditor();
|
129
|
-
return (h(Host, null, h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor }), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), h("ez-button", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
|
124
|
+
return (h(Host, null, h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor, getMessage: this.getMessage }), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), h("ez-button", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
|
130
125
|
}
|
131
126
|
get _element() { return this; }
|
132
127
|
}, [0, "snk-filter-detail", {
|