@sankhyalabs/sankhyablocks 5.5.0 → 5.7.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-26da04f7.js → SnkMessageBuilder-056d1c24.js} +23 -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/index-8d94b7e0.js +7 -0
- package/dist/cjs/index-de79181a.js +201 -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-attach.cjs.entry.js +2 -1
- package/dist/cjs/snk-crud.cjs.entry.js +2 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
- package/dist/cjs/{snk-data-unit-c43df27b.js → snk-data-unit-289081c4.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +4 -3
- package/dist/cjs/snk-expression-item.cjs.entry.js +213 -0
- package/dist/cjs/snk-filter-bar.cjs.entry.js +52 -140
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +8 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +435 -0
- package/dist/cjs/snk-filter-item.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +66 -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 +11 -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 +3 -2
- package/dist/cjs/{snk-guides-viewer-e6a65393.js → snk-guides-viewer-9784c527.js} +1 -1
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -2
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +126 -0
- package/dist/cjs/snk-simple-bar_2.cjs.entry.js +2 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +2 -1
- package/dist/cjs/taskbar-elements-bc2598f9.js +118 -0
- package/dist/collection/collection-manifest.json +3 -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 +47 -0
- 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 +50 -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-modal/snk-filter-modal.css +31 -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 +4 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +115 -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-filter-field-search/snk-filter-field-search.js +62 -69
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css +4 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +87 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js +34 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.css +97 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +298 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js +2 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +63 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +2 -0
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +9 -1
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +12 -0
- package/dist/collection/lib/store/index.js +2 -1
- package/dist/components/SnkMessageBuilder.js +23 -1
- package/dist/components/filter-item-type.enum.js +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index2.js +1 -1
- package/dist/components/index3.js +199 -0
- package/dist/components/presentationMode.js +7 -0
- package/dist/components/snk-crud.js +22 -34
- package/dist/components/snk-data-exporter2.js +1 -1
- package/dist/components/snk-detail-view2.js +24 -46
- package/dist/components/snk-expression-item.d.ts +11 -0
- package/dist/components/snk-expression-item.js +6 -0
- package/dist/components/snk-expression-item2.js +241 -0
- package/dist/components/snk-filter-bar2.js +57 -157
- package/dist/components/snk-filter-binary-select.js +9 -1
- package/dist/components/snk-filter-field-search.js +1 -200
- package/dist/{esm/snk-filter-field-search.entry.js → components/snk-filter-field-search2.js} +65 -38
- 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 +85 -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-param-config.js +1 -273
- package/dist/{esm/snk-filter-param-config.entry.js → components/snk-filter-param-config2.js} +35 -11
- package/dist/components/snk-filter-period.js +12 -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 +12 -23
- package/dist/components/snk-personalized-filter.d.ts +11 -0
- package/dist/components/snk-personalized-filter.js +158 -0
- package/dist/components/snk-taskbar2.js +3 -197
- package/dist/esm/{SnkMessageBuilder-7a9392e6.js → SnkMessageBuilder-23272e07.js} +23 -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/{index-6519a79e.js → index-507e19ec.js} +1 -1
- package/dist/esm/index-620ac460.js +7 -0
- package/dist/esm/index-8efbf198.js +199 -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-attach.entry.js +3 -2
- package/dist/esm/snk-crud.entry.js +3 -2
- package/dist/esm/snk-data-exporter.entry.js +3 -3
- package/dist/esm/{snk-data-unit-f9e4c694.js → snk-data-unit-34dc5371.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +5 -4
- package/dist/esm/snk-expression-item.entry.js +209 -0
- package/dist/esm/snk-filter-bar.entry.js +53 -141
- package/dist/esm/snk-filter-binary-select.entry.js +9 -2
- package/dist/esm/snk-filter-detail.entry.js +1 -1
- package/dist/esm/snk-filter-field-search_2.entry.js +430 -0
- package/dist/esm/snk-filter-item.entry.js +1 -1
- package/dist/esm/snk-filter-modal-item.entry.js +62 -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 +12 -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 +3 -2
- package/dist/esm/{snk-guides-viewer-62a9f74d.js → snk-guides-viewer-4d12f268.js} +2 -2
- package/dist/esm/snk-guides-viewer.entry.js +4 -3
- package/dist/esm/snk-personalized-filter.entry.js +122 -0
- package/dist/esm/snk-simple-bar_2.entry.js +3 -2
- package/dist/esm/snk-taskbar.entry.js +3 -2
- package/dist/esm/taskbar-elements-e6af3e93.js +115 -0
- package/dist/sankhyablocks/p-0110b7da.entry.js +1 -0
- package/dist/sankhyablocks/p-1a68fb59.js +1 -0
- package/dist/sankhyablocks/p-27e264d9.entry.js +1 -0
- package/dist/sankhyablocks/p-343699ad.entry.js +1 -0
- package/dist/sankhyablocks/{p-f2223502.js → p-3db1d3de.js} +1 -1
- package/dist/sankhyablocks/p-433dfa63.entry.js +1 -0
- package/dist/sankhyablocks/p-45ee8b22.entry.js +1 -0
- package/dist/sankhyablocks/{p-f132e371.js → p-4c2015a9.js} +1 -1
- package/dist/sankhyablocks/p-4ce96831.entry.js +1 -0
- package/dist/sankhyablocks/p-4eefe631.entry.js +1 -0
- package/dist/sankhyablocks/{p-9dd2b8cb.js → p-584d7212.js} +1 -1
- package/dist/sankhyablocks/{p-a412992c.entry.js → p-64b03506.entry.js} +1 -1
- package/dist/sankhyablocks/p-6a02e236.js +1 -0
- package/dist/sankhyablocks/p-7695c404.entry.js +1 -0
- package/dist/sankhyablocks/p-786ae316.entry.js +1 -0
- package/dist/sankhyablocks/p-82bc97da.entry.js +1 -0
- package/dist/sankhyablocks/p-8bdf5e57.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-3a2ce158.entry.js → p-a1c58536.entry.js} +1 -1
- package/dist/sankhyablocks/{p-afba9bbe.entry.js → p-bdbb2672.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b2523981.entry.js → p-c1ab16d0.entry.js} +2 -2
- package/dist/sankhyablocks/{p-aeffd219.js → p-ccd26e3a.js} +1 -1
- package/dist/sankhyablocks/p-d410f45a.js +1 -0
- package/dist/sankhyablocks/p-d9804798.js +1 -0
- package/dist/sankhyablocks/p-df8f13b4.entry.js +1 -0
- package/dist/sankhyablocks/p-e2bb9c9a.entry.js +1 -0
- package/dist/sankhyablocks/p-e9f42525.entry.js +1 -0
- package/dist/sankhyablocks/p-ed3d6ab4.entry.js +1 -0
- package/dist/sankhyablocks/p-ee1381f4.entry.js +1 -0
- package/dist/sankhyablocks/p-f4184ce7.js +1 -0
- package/dist/sankhyablocks/p-f5f36fbb.js +1 -0
- package/dist/sankhyablocks/p-fd4ed40a.entry.js +1 -0
- package/dist/sankhyablocks/p-ff96b509.entry.js +27 -0
- package/dist/sankhyablocks/p-ffac37d5.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 +3 -0
- 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/snk-filter-field-search/interfaces/index.d.ts +14 -4
- package/dist/types/components/snk-filter-field-search/snk-filter-field-search.d.ts +13 -10
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +20 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.d.ts +9 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +54 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem.d.ts +4 -2
- package/dist/types/components.d.ts +196 -63
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +7 -0
- package/dist/types/lib/message/resources/snk-personalized-filter.msg.d.ts +1 -0
- package/dist/types/lib/store/index.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +3 -0
- package/react/components.js +3 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/snk-filter-field-search.cjs.entry.js +0 -185
- package/dist/cjs/snk-filter-param-config.cjs.entry.js +0 -256
- package/dist/cjs/taskbar-elements-80285601.js +0 -313
- package/dist/components/snk-filter-list2.js +0 -173
- package/dist/components/snk-filter-modal2.js +0 -97
- package/dist/esm/taskbar-elements-055ba1ad.js +0 -309
- package/dist/sankhyablocks/p-4512cc6c.entry.js +0 -1
- package/dist/sankhyablocks/p-5cbbe1f7.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-63d01871.entry.js +0 -1
- package/dist/sankhyablocks/p-73e830cf.entry.js +0 -1
- package/dist/sankhyablocks/p-741b00ef.entry.js +0 -1
- package/dist/sankhyablocks/p-79d22df0.entry.js +0 -1
- package/dist/sankhyablocks/p-86d29b6f.entry.js +0 -1
- package/dist/sankhyablocks/p-92a0fca4.js +0 -1
- package/dist/sankhyablocks/p-93d8fe00.entry.js +0 -1
- package/dist/sankhyablocks/p-999d1953.entry.js +0 -1
- package/dist/sankhyablocks/p-ad51bf1c.entry.js +0 -1
- package/dist/sankhyablocks/p-c336170d.entry.js +0 -1
- package/dist/sankhyablocks/p-c3efd4eb.entry.js +0 -1
- package/dist/sankhyablocks/p-d5c9c1f8.entry.js +0 -1
- package/dist/sankhyablocks/p-ebe876f5.entry.js +0 -1
- package/dist/sankhyablocks/p-ed438690.js +0 -1
- package/dist/sankhyablocks/p-ee82c157.entry.js +0 -1
- package/dist/sankhyablocks/p-f3d0c744.entry.js +0 -1
- package/dist/sankhyablocks/p-fac37198.entry.js +0 -1
@@ -0,0 +1,34 @@
|
|
1
|
+
import { FilterOperand } from "../../../../../lib/@types";
|
2
|
+
import { UserInterface } from '@sankhyalabs/core';
|
3
|
+
export const FilterOperandDefault = [
|
4
|
+
{ value: FilterOperand.EQUAL, label: "Igual (=)" },
|
5
|
+
{ value: FilterOperand.DIFFERENT, label: "Diferente (<>)" },
|
6
|
+
{ value: FilterOperand.LIKE, label: "Contendo (LIKE)" },
|
7
|
+
{ value: FilterOperand.IN, label: "Contido em (IN)" },
|
8
|
+
{ value: FilterOperand.START_WITH, label: "Iniciado com (%?)" },
|
9
|
+
{ value: FilterOperand.FINISHED_WITH, label: "Terminado com (?%)" },
|
10
|
+
{ value: FilterOperand.NULL, label: "Vazio (NULL)" },
|
11
|
+
{ value: FilterOperand.NOT_NULL, label: "Não Vazio (NOT NULL)" },
|
12
|
+
{ value: FilterOperand.LARGER, label: "Maior (>)" },
|
13
|
+
{ value: FilterOperand.LARGER_EQUAL, label: "Maior ou Igual (>=)" },
|
14
|
+
{ value: FilterOperand.SMALLER, label: "Menor (<)" },
|
15
|
+
{ value: FilterOperand.SMALLER_EQUAL, label: "Menor ou Igual (<=)" }
|
16
|
+
];
|
17
|
+
export const FilterOperandTypeTextSearch = [
|
18
|
+
{ value: FilterOperand.EQUAL, label: "Igual (=)" },
|
19
|
+
{ value: FilterOperand.DIFFERENT, label: "Diferente (<>)" },
|
20
|
+
{ value: FilterOperand.LIKE, label: "Contendo (LIKE)" },
|
21
|
+
{ value: FilterOperand.IN, label: "Contido em (IN)" },
|
22
|
+
{ value: FilterOperand.START_WITH, label: "Iniciado com (%?)" },
|
23
|
+
{ value: FilterOperand.FINISHED_WITH, label: "Terminado com (?%)" },
|
24
|
+
{ value: FilterOperand.NULL, label: "Vazio (NULL)" },
|
25
|
+
{ value: FilterOperand.NOT_NULL, label: "Não Vazio (NOT NULL)" }
|
26
|
+
];
|
27
|
+
export const FIELD_TYPE_SEARCH_AND_TEXT = [
|
28
|
+
UserInterface.SEARCH,
|
29
|
+
UserInterface.SHORTTEXT,
|
30
|
+
UserInterface.PASSWORD,
|
31
|
+
UserInterface.MASKEDTEXT,
|
32
|
+
UserInterface.LONGTEXT,
|
33
|
+
UserInterface.HTML
|
34
|
+
];
|
@@ -0,0 +1,97 @@
|
|
1
|
+
:host {
|
2
|
+
/*private*/
|
3
|
+
display: flex;
|
4
|
+
width: 100%;
|
5
|
+
|
6
|
+
/*@doc Define a cor de fundo do componente.*/
|
7
|
+
--snk-expression-item--background-color: var(--background--xlight, #fff);
|
8
|
+
|
9
|
+
/* Spacing */
|
10
|
+
/*@doc Define o espaçamento interno entre os itens*/
|
11
|
+
--snk-expression-item__itens--padding: var(--space--small, 6px);
|
12
|
+
|
13
|
+
/* Sizes */
|
14
|
+
/*@doc Define o tamanho do campo operator*/
|
15
|
+
--snk-expression-item__width--input-operator: 220px;
|
16
|
+
/*@doc Define o tamanho do campo value*/
|
17
|
+
--snk-expression-item__width--input-value: 240px;
|
18
|
+
/*@doc Define o tamanho do campo value-variable*/
|
19
|
+
--snk-expression-item__width--input-value-variable: 176px;
|
20
|
+
|
21
|
+
/* Bordes */
|
22
|
+
/*@doc Define o arredondamento das bordas*/
|
23
|
+
--snk-expression-item--border-radius: var(--border--radius-medium, 12px);
|
24
|
+
/*@doc Define a cor da borda.*/
|
25
|
+
--snk-expression-item--border-color: var(--color--strokes, #DCE0E8);
|
26
|
+
/*@doc Define largura e estilo da borda.*/
|
27
|
+
--snk-expression-item--border-style: var(--border--small, 1px solid);
|
28
|
+
}
|
29
|
+
|
30
|
+
.box{
|
31
|
+
/*private*/
|
32
|
+
width: 100%;
|
33
|
+
height: 100%;
|
34
|
+
background: var(--snk-expression-item--background-color);
|
35
|
+
|
36
|
+
/*public*/
|
37
|
+
margin: var(--space--small, 6px);
|
38
|
+
border: var(--snk-expression-item--border-color) var(--snk-expression-item--border-style);
|
39
|
+
border-radius: var(--snk-expression-item--border-radius);
|
40
|
+
}
|
41
|
+
|
42
|
+
.box__container{
|
43
|
+
/*private*/
|
44
|
+
display: flex;
|
45
|
+
align-items: center;
|
46
|
+
justify-content: space-between;
|
47
|
+
white-space: nowrap;
|
48
|
+
|
49
|
+
/*public*/
|
50
|
+
margin: var(--space--small, 6px);
|
51
|
+
}
|
52
|
+
|
53
|
+
.box__container--input-filter{
|
54
|
+
width: 100%;
|
55
|
+
}
|
56
|
+
|
57
|
+
.box__container--input-operator{
|
58
|
+
/*private*/
|
59
|
+
display: flex;
|
60
|
+
/*public*/
|
61
|
+
width: var(--snk-expression-item__width--input-operator);
|
62
|
+
min-width: var(--snk-expression-item__width--input-operator);
|
63
|
+
}
|
64
|
+
|
65
|
+
.box__container--input-value{
|
66
|
+
/*private*/
|
67
|
+
display: flex;
|
68
|
+
/*public*/
|
69
|
+
width: var(--snk-expression-item__width--input-value);
|
70
|
+
min-width: var(--snk-expression-item__width--input-value);
|
71
|
+
}
|
72
|
+
|
73
|
+
.box__container--input-value-variable{
|
74
|
+
/*private*/
|
75
|
+
display: flex;
|
76
|
+
/*public*/
|
77
|
+
width: var(--snk-expression-item__width--input-value-variable);
|
78
|
+
min-width: var(--snk-expression-item__width--input-value-variable);
|
79
|
+
}
|
80
|
+
|
81
|
+
.box__container--button-delete{
|
82
|
+
display: flex;
|
83
|
+
}
|
84
|
+
|
85
|
+
.box__container > div {
|
86
|
+
padding-left: var(--snk-expression-item__itens--padding);
|
87
|
+
padding-right: var(--snk-expression-item__itens--padding);
|
88
|
+
}
|
89
|
+
|
90
|
+
.box__container--button-delete--icon {
|
91
|
+
width: 42px;
|
92
|
+
min-width: 42px;
|
93
|
+
}
|
94
|
+
|
95
|
+
.box__container--input-value-variable--icon{
|
96
|
+
cursor: pointer;
|
97
|
+
}
|
@@ -0,0 +1,298 @@
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
2
|
+
import { ApplicationContext, UserInterface } from '@sankhyalabs/core';
|
3
|
+
import { SelectedItemType } from "../../../snk-filter-field-search/interfaces";
|
4
|
+
import { CheckMode, ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
5
|
+
import { fieldBuilder } from "@sankhyalabs/ezui/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder";
|
6
|
+
import { FilterOperand } from '../../../../lib/@types';
|
7
|
+
import { FilterOperandDefault, FilterOperandTypeTextSearch, FIELD_TYPE_SEARCH_AND_TEXT } from "./filter-operands/filter-operands";
|
8
|
+
import store from '../../../../lib/store';
|
9
|
+
export class SnkExpressionItem {
|
10
|
+
constructor() {
|
11
|
+
this.application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
12
|
+
this.filterOperandDefault = FilterOperandDefault;
|
13
|
+
this.filterOperandTypeTextSearch = FilterOperandTypeTextSearch;
|
14
|
+
this._showValueVariable = false;
|
15
|
+
this._fieldSelected = undefined;
|
16
|
+
this._optionNotNull = false;
|
17
|
+
this.expression = undefined;
|
18
|
+
this.canRemove = true;
|
19
|
+
this.messagesBuilder = undefined;
|
20
|
+
}
|
21
|
+
expressionChanged(newValue, oldValue) {
|
22
|
+
if (newValue !== oldValue) {
|
23
|
+
this.ezFilterItemChange.emit(newValue);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
componentWillLoad() {
|
27
|
+
this._dataSourceFetcher = store.get("filterFieldsDataSource");
|
28
|
+
store.onChange('filterFieldsDataSource', () => {
|
29
|
+
this._dataSourceFetcher = store.get("filterFieldsDataSource");
|
30
|
+
});
|
31
|
+
}
|
32
|
+
setValueExpression(key, value) {
|
33
|
+
this.expression[key] = value;
|
34
|
+
this.expressionChanged(this.expression);
|
35
|
+
}
|
36
|
+
getMessage(key, params) {
|
37
|
+
return this.application.messagesBuilder.getMessage(key, params);
|
38
|
+
}
|
39
|
+
handleSelectItem(filterField) {
|
40
|
+
if (filterField.type === SelectedItemType.FIELD) {
|
41
|
+
const field = filterField;
|
42
|
+
this._fieldSelected = field;
|
43
|
+
this.setValueExpression("fieldName", field.name);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
handleFocus() {
|
47
|
+
if (this._elFilterFieldSearch)
|
48
|
+
this._elFilterFieldSearch.show();
|
49
|
+
}
|
50
|
+
handleChangeFilterInput(evt) {
|
51
|
+
this._elFilterFieldSearch.applyFilter(evt.detail);
|
52
|
+
}
|
53
|
+
handleChangeValueVariable(showValueVariable) {
|
54
|
+
this._showValueVariable = showValueVariable;
|
55
|
+
if (this._elFieldDynamic) {
|
56
|
+
this._elFieldDynamic.value = undefined;
|
57
|
+
this._elFieldDynamic.enabled = !showValueVariable;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
openSnkFilterParamConfig() {
|
61
|
+
var _a;
|
62
|
+
(_a = this._elFilterParamConfigRef) === null || _a === void 0 ? void 0 : _a.open(this.expression).then(this.onOpenPromiseReady.bind(this)).catch(error => {
|
63
|
+
console.error(error);
|
64
|
+
});
|
65
|
+
}
|
66
|
+
onOpenPromiseReady(changes) {
|
67
|
+
this.expression = changes;
|
68
|
+
}
|
69
|
+
buildOptionsOperator() {
|
70
|
+
var _a;
|
71
|
+
if (FIELD_TYPE_SEARCH_AND_TEXT.includes((_a = this._fieldSelected) === null || _a === void 0 ? void 0 : _a.userInterface)) {
|
72
|
+
return this.filterOperandTypeTextSearch;
|
73
|
+
}
|
74
|
+
else {
|
75
|
+
return this.filterOperandDefault;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
handleChangeOperator(optionSelected) {
|
79
|
+
this.checkOptionIsNull(optionSelected);
|
80
|
+
this.setValueExpression("operand", optionSelected);
|
81
|
+
}
|
82
|
+
checkOptionIsNull(optionSelected) {
|
83
|
+
if (optionSelected === FilterOperand.NULL || optionSelected === FilterOperand.NOT_NULL) {
|
84
|
+
this._optionNotNull = true;
|
85
|
+
if (this._elFieldDynamic) {
|
86
|
+
this._elFieldDynamic.enabled = false;
|
87
|
+
this._elFieldDynamic.value = undefined;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
else {
|
91
|
+
this._optionNotNull = false;
|
92
|
+
if (this._elFieldDynamic) {
|
93
|
+
this._elFieldDynamic.enabled = this._showValueVariable ? false : true;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
confirmRemove(evt) {
|
98
|
+
evt.preventDefault();
|
99
|
+
evt.stopPropagation();
|
100
|
+
ApplicationUtils.confirm(this.getMessage("snkPersonalizedFilter.confirm.title"), this.getMessage("snkPersonalizedFilter.confirm.description"))
|
101
|
+
.then((canRemove) => {
|
102
|
+
if (canRemove) {
|
103
|
+
this.ezFilterItemRemove.emit(this.expression);
|
104
|
+
}
|
105
|
+
});
|
106
|
+
}
|
107
|
+
buildFieldByType() {
|
108
|
+
var _a, _b;
|
109
|
+
if (!this._fieldSelected)
|
110
|
+
return;
|
111
|
+
const inputFieldData = (_a = fieldBuilder(this.configureFieldByType())) === null || _a === void 0 ? void 0 : _a.$children$.shift();
|
112
|
+
if (this._optionNotNull && inputFieldData || ((_b = this._elValueVariable) === null || _b === void 0 ? void 0 : _b.value) && inputFieldData) {
|
113
|
+
inputFieldData.$attrs$.enabled = false;
|
114
|
+
}
|
115
|
+
return h(inputFieldData.$tag$, Object.assign(Object.assign({}, inputFieldData.$attrs$), { ref: (el) => {
|
116
|
+
this._elFieldDynamic = el;
|
117
|
+
} }));
|
118
|
+
}
|
119
|
+
configureFieldByType() {
|
120
|
+
const field = {
|
121
|
+
userInterface: this._fieldSelected.userInterface,
|
122
|
+
name: this._fieldSelected.name,
|
123
|
+
label: this._fieldSelected.label,
|
124
|
+
canShowError: false
|
125
|
+
};
|
126
|
+
switch (field.userInterface) {
|
127
|
+
case UserInterface.OPTIONSELECTOR:
|
128
|
+
field.props = {
|
129
|
+
options: this._fieldSelected.properties.map(option => ({
|
130
|
+
value: option.value,
|
131
|
+
label: option.name,
|
132
|
+
})),
|
133
|
+
};
|
134
|
+
break;
|
135
|
+
case UserInterface.LONGTEXT:
|
136
|
+
field.rows = 1;
|
137
|
+
break;
|
138
|
+
case UserInterface.SEARCH:
|
139
|
+
field.optionLoader = searchArgument => this.setCriteriaSearch(searchArgument, this.application);
|
140
|
+
break;
|
141
|
+
default:
|
142
|
+
break;
|
143
|
+
}
|
144
|
+
return field;
|
145
|
+
}
|
146
|
+
setCriteriaSearch({ mode, argument }, application) {
|
147
|
+
if (application == undefined)
|
148
|
+
return;
|
149
|
+
const searchOptions = {
|
150
|
+
showInactives: false
|
151
|
+
};
|
152
|
+
const options = {
|
153
|
+
entity: this._fieldSelected.properties.ENTITYNAME,
|
154
|
+
searchOptions: searchOptions,
|
155
|
+
entityDescription: this._fieldSelected.label
|
156
|
+
};
|
157
|
+
return application.executePreparedSearch(mode, argument, options);
|
158
|
+
}
|
159
|
+
render() {
|
160
|
+
var _a;
|
161
|
+
return (h(Host, null, h("div", { class: "box" }, h("div", { class: "box__container" }, h("div", { class: "box__container--input-filter" }, h("ez-filter-input", { value: (_a = this._fieldSelected) === null || _a === void 0 ? void 0 : _a.path, label: this.getMessage("snkPersonalizedFilter.info.labelSearchField"), canShowError: false, onEzChange: (evt) => this.handleChangeFilterInput(evt), onFocus: () => this.handleFocus() }), h("snk-filter-field-search", { ref: ref => this._elFilterFieldSearch = ref, searchable: false, onEzSelectFilterItem: (ev) => this.handleSelectItem(ev.detail), fieldsDataSource: this._dataSourceFetcher })), h("div", { class: "box__container--input-operator" }, h("ez-combo-box", { label: this.getMessage("snkPersonalizedFilter.info.labelOperator"), canShowError: false, options: this.buildOptionsOperator(), onEzChange: (evt) => this.handleChangeOperator(evt.detail.value), suppressEmptyOption: true })), h("div", { class: "box__container--input-value" }, !this._fieldSelected ?
|
162
|
+
h("ez-number-input", { label: "Valor", canShowError: false, enabled: (!this._showValueVariable && !this._optionNotNull) }) :
|
163
|
+
this.buildFieldByType()), h("div", { class: "box__container--input-value-variable", title: this.getMessage("snkPersonalizedFilter.info.titleTooltip") }, !this._optionNotNull &&
|
164
|
+
h("ez-check", { ref: ref => this._elValueVariable = ref, label: this.getMessage("snkPersonalizedFilter.info.labelValueVarible"), mode: CheckMode.SWITCH, onEzChange: (evt) => this.handleChangeValueVariable(evt.detail) }), (this._showValueVariable && !this._optionNotNull) &&
|
165
|
+
h("ez-icon", { class: "box__container--input-value-variable--icon", size: "large", iconName: "settings-inverted", onClick: () => this.openSnkFilterParamConfig() }), h("snk-filter-param-config", { ref: (el) => this._elFilterParamConfigRef = el, messagesBuilder: this.messagesBuilder })), h("div", { class: "box__container--button-delete" }, h("div", { class: "box__container--button-delete--icon" }, this.canRemove && h("ez-button", { mode: "icon", iconName: "delete", onClick: (evt) => this.confirmRemove(evt) })))))));
|
166
|
+
}
|
167
|
+
static get is() { return "snk-expression-item"; }
|
168
|
+
static get encapsulation() { return "scoped"; }
|
169
|
+
static get originalStyleUrls() {
|
170
|
+
return {
|
171
|
+
"$": ["snk-expression-item.css"]
|
172
|
+
};
|
173
|
+
}
|
174
|
+
static get styleUrls() {
|
175
|
+
return {
|
176
|
+
"$": ["snk-expression-item.css"]
|
177
|
+
};
|
178
|
+
}
|
179
|
+
static get properties() {
|
180
|
+
return {
|
181
|
+
"expression": {
|
182
|
+
"type": "unknown",
|
183
|
+
"mutable": false,
|
184
|
+
"complexType": {
|
185
|
+
"original": "IExpressionItem",
|
186
|
+
"resolved": "IExpressionItem",
|
187
|
+
"references": {
|
188
|
+
"IExpressionItem": {
|
189
|
+
"location": "import",
|
190
|
+
"path": "../../../snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem"
|
191
|
+
}
|
192
|
+
}
|
193
|
+
},
|
194
|
+
"required": false,
|
195
|
+
"optional": false,
|
196
|
+
"docs": {
|
197
|
+
"tags": [],
|
198
|
+
"text": "Express\u00E3o que ser\u00E1 representada visualmente."
|
199
|
+
},
|
200
|
+
"defaultValue": "undefined"
|
201
|
+
},
|
202
|
+
"canRemove": {
|
203
|
+
"type": "boolean",
|
204
|
+
"mutable": false,
|
205
|
+
"complexType": {
|
206
|
+
"original": "boolean",
|
207
|
+
"resolved": "boolean",
|
208
|
+
"references": {}
|
209
|
+
},
|
210
|
+
"required": false,
|
211
|
+
"optional": false,
|
212
|
+
"docs": {
|
213
|
+
"tags": [],
|
214
|
+
"text": "Controla a exibi\u00E7\u00E3o do bot\u00E3o Remover."
|
215
|
+
},
|
216
|
+
"attribute": "can-remove",
|
217
|
+
"reflect": true,
|
218
|
+
"defaultValue": "true"
|
219
|
+
},
|
220
|
+
"messagesBuilder": {
|
221
|
+
"type": "unknown",
|
222
|
+
"mutable": true,
|
223
|
+
"complexType": {
|
224
|
+
"original": "SnkMessageBuilder",
|
225
|
+
"resolved": "SnkMessageBuilder",
|
226
|
+
"references": {
|
227
|
+
"SnkMessageBuilder": {
|
228
|
+
"location": "import",
|
229
|
+
"path": "../../../../lib/message/SnkMessageBuilder"
|
230
|
+
}
|
231
|
+
}
|
232
|
+
},
|
233
|
+
"required": false,
|
234
|
+
"optional": false,
|
235
|
+
"docs": {
|
236
|
+
"tags": [],
|
237
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
238
|
+
}
|
239
|
+
}
|
240
|
+
};
|
241
|
+
}
|
242
|
+
static get states() {
|
243
|
+
return {
|
244
|
+
"_showValueVariable": {},
|
245
|
+
"_fieldSelected": {},
|
246
|
+
"_optionNotNull": {}
|
247
|
+
};
|
248
|
+
}
|
249
|
+
static get events() {
|
250
|
+
return [{
|
251
|
+
"method": "ezFilterItemChange",
|
252
|
+
"name": "ezFilterItemChange",
|
253
|
+
"bubbles": true,
|
254
|
+
"cancelable": true,
|
255
|
+
"composed": true,
|
256
|
+
"docs": {
|
257
|
+
"tags": [],
|
258
|
+
"text": "Emitido quando acontece altera\u00E7\u00F5es na express\u00E3o."
|
259
|
+
},
|
260
|
+
"complexType": {
|
261
|
+
"original": "IExpressionItem",
|
262
|
+
"resolved": "IExpressionItem",
|
263
|
+
"references": {
|
264
|
+
"IExpressionItem": {
|
265
|
+
"location": "import",
|
266
|
+
"path": "../../../snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem"
|
267
|
+
}
|
268
|
+
}
|
269
|
+
}
|
270
|
+
}, {
|
271
|
+
"method": "ezFilterItemRemove",
|
272
|
+
"name": "ezFilterItemRemove",
|
273
|
+
"bubbles": true,
|
274
|
+
"cancelable": true,
|
275
|
+
"composed": true,
|
276
|
+
"docs": {
|
277
|
+
"tags": [],
|
278
|
+
"text": "Emitido ao confirmar uma remo\u00E7\u00E3o."
|
279
|
+
},
|
280
|
+
"complexType": {
|
281
|
+
"original": "IExpressionItem",
|
282
|
+
"resolved": "IExpressionItem",
|
283
|
+
"references": {
|
284
|
+
"IExpressionItem": {
|
285
|
+
"location": "import",
|
286
|
+
"path": "../../../snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem"
|
287
|
+
}
|
288
|
+
}
|
289
|
+
}
|
290
|
+
}];
|
291
|
+
}
|
292
|
+
static get watchers() {
|
293
|
+
return [{
|
294
|
+
"propName": "expression",
|
295
|
+
"methodName": "expressionChanged"
|
296
|
+
}];
|
297
|
+
}
|
298
|
+
}
|
@@ -33,7 +33,8 @@ export class SnkFilterParamConfig {
|
|
33
33
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-param-config.msg.ts"
|
34
34
|
*/
|
35
35
|
getMessage(key, params) {
|
36
|
-
|
36
|
+
var _a;
|
37
|
+
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
37
38
|
}
|
38
39
|
getConfigValue(configName, inputName, inputAlias = "") {
|
39
40
|
var _a, _b, _c;
|
@@ -188,7 +189,6 @@ export class SnkFilterParamConfig {
|
|
188
189
|
})))), h("ez-text-area", Object.assign({ ref: (ref) => this._expressionElement = ref, class: "snk-filter-param-config__expression", label: this.getMessage("snkFilterParamConfig.labelExpression"), enabled: false }, this.getElementID("presentationExpression"))), h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, h("ez-button", Object.assign({ class: "ez-padding-right--medium", label: this.getMessage("snkFilterParamConfig.labelCancel"), onClick: () => this.close() }, this.getElementID("cancelEditParam"))), h("ez-button", Object.assign({ class: "ez-button--primary", label: this.getMessage("snkFilterParamConfig.labelSave"), onClick: () => this.save(), enabled: this._canSave }, this.getElementID("saveEditParam")))))));
|
189
190
|
}
|
190
191
|
static get is() { return "snk-filter-param-config"; }
|
191
|
-
static get encapsulation() { return "scoped"; }
|
192
192
|
static get originalStyleUrls() {
|
193
193
|
return {
|
194
194
|
"$": ["snk-filter-param-config.css"]
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { gql } from "graphql-request";
|
2
|
+
import { DataFetcher } from "../DataFetcher";
|
3
|
+
export default class PersonalizedFilterFetcher {
|
4
|
+
constructor() {
|
5
|
+
this.templateByQuery = new Map();
|
6
|
+
this.buildTemplates();
|
7
|
+
}
|
8
|
+
buildTemplates() {
|
9
|
+
const query = gql `
|
10
|
+
query($name: String!) {
|
11
|
+
$queryAlias$: fetchFilterFields(name: $name){
|
12
|
+
currentLink {
|
13
|
+
description
|
14
|
+
uri
|
15
|
+
}
|
16
|
+
links {
|
17
|
+
description
|
18
|
+
uri
|
19
|
+
fieldCount
|
20
|
+
}
|
21
|
+
fields {
|
22
|
+
name
|
23
|
+
description
|
24
|
+
uri
|
25
|
+
onlyDate
|
26
|
+
dataType
|
27
|
+
userInterface
|
28
|
+
properties {
|
29
|
+
name
|
30
|
+
value
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
`;
|
36
|
+
this.templateByQuery.set("fetchFilterFields", query);
|
37
|
+
}
|
38
|
+
loadFields(uri) {
|
39
|
+
return new Promise((resolve, reject) => {
|
40
|
+
DataFetcher.get()
|
41
|
+
.callGraphQL({
|
42
|
+
values: { name: uri },
|
43
|
+
query: this.templateByQuery.get("fetchFilterFields"),
|
44
|
+
})
|
45
|
+
.then((resp) => {
|
46
|
+
let fields = resp.fields;
|
47
|
+
for (const field of fields) {
|
48
|
+
if (Array.isArray(field.properties) && field.properties.length > 0 && field.userInterface === "SEARCH") {
|
49
|
+
const propertiesConvertedObject = field.properties.reduce((accumulator, prop) => {
|
50
|
+
accumulator[prop.name] = prop.value;
|
51
|
+
return accumulator;
|
52
|
+
}, {});
|
53
|
+
field.properties = propertiesConvertedObject;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
resolve(Object.assign(Object.assign({}, resp), { fields: fields }));
|
57
|
+
})
|
58
|
+
.catch((error) => {
|
59
|
+
reject(error);
|
60
|
+
});
|
61
|
+
});
|
62
|
+
}
|
63
|
+
}
|
@@ -13,6 +13,7 @@ import { snkFilterParamConfigMessages } from "./resources/snk-filter-param-confi
|
|
13
13
|
import { snkFilterFieldSearchMessages } from "./resources/snk-filter-field-search.msg.js";
|
14
14
|
import { snkSimpleBarMessages } from './resources/snk-simple-bar.msg.js';
|
15
15
|
import { snkAttachMessages } from "./resources/snk-attach.msg";
|
16
|
+
import { snkPersonalizedFilterMessages } from "./resources/snk-personalized-filter.msg.js";
|
16
17
|
export class SnkMessageBuilder {
|
17
18
|
constructor(domainName) {
|
18
19
|
this._defaults = {
|
@@ -35,6 +36,7 @@ export class SnkMessageBuilder {
|
|
35
36
|
snkFilterFieldSearch: snkFilterFieldSearchMessages,
|
36
37
|
snkSimpleBar: snkSimpleBarMessages,
|
37
38
|
snkAttach: snkAttachMessages,
|
39
|
+
snkPersonalizedFilter: snkPersonalizedFilterMessages
|
38
40
|
};
|
39
41
|
this._currentOperation = OperationMap.CLEAN;
|
40
42
|
this._domainName = domainName;
|
@@ -25,6 +25,14 @@ const snkFilterBarMessages = {
|
|
25
25
|
"modalPersonalizedFilterSubTitle": "Gerencie seus filtros",
|
26
26
|
"modalInfoTextCreateEditPersonalized": "Use o layout antigo para criar ou editar filtros, em breve traremos uma nova experiência",
|
27
27
|
"modalOkButtonLabel": "Aplicar",
|
28
|
-
"modalCancelButtonLabel": "Limpar"
|
28
|
+
"modalCancelButtonLabel": "Limpar",
|
29
|
+
"filters": "Filtros",
|
30
|
+
"filterModal": {
|
31
|
+
"title": "Filtros",
|
32
|
+
"okButtonLabel": "Aplicar",
|
33
|
+
"cancelButtonLabel": "Limpar tudo",
|
34
|
+
"customFilters": "Filtros personalizados",
|
35
|
+
"quickFilters": "Filtros rápidos"
|
36
|
+
}
|
29
37
|
};
|
30
38
|
export default snkFilterBarMessages;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export const snkPersonalizedFilterMessages = {
|
2
|
+
info: {
|
3
|
+
labelSearchField: "Buscar campo",
|
4
|
+
labelOperator: "Operador",
|
5
|
+
labelValueVarible: "Valor variável",
|
6
|
+
titleTooltip: "Ao ativar um valor variável, é possível inserir um valor diferente sempre que o filtro for aplicado"
|
7
|
+
},
|
8
|
+
confirm: {
|
9
|
+
title: "Aviso",
|
10
|
+
description: `As informações da condição serão descartadas.</br></br><b>Gostaria de continuar?</b>`
|
11
|
+
}
|
12
|
+
};
|
@@ -56,7 +56,15 @@ const snkFilterBarMessages = {
|
|
56
56
|
"modalPersonalizedFilterSubTitle": "Gerencie seus filtros",
|
57
57
|
"modalInfoTextCreateEditPersonalized": "Use o layout antigo para criar ou editar filtros, em breve traremos uma nova experiência",
|
58
58
|
"modalOkButtonLabel": "Aplicar",
|
59
|
-
"modalCancelButtonLabel": "Limpar"
|
59
|
+
"modalCancelButtonLabel": "Limpar",
|
60
|
+
"filters": "Filtros",
|
61
|
+
"filterModal": {
|
62
|
+
"title": "Filtros",
|
63
|
+
"okButtonLabel": "Aplicar",
|
64
|
+
"cancelButtonLabel": "Limpar tudo",
|
65
|
+
"customFilters": "Filtros personalizados",
|
66
|
+
"quickFilters": "Filtros rápidos"
|
67
|
+
}
|
60
68
|
};
|
61
69
|
|
62
70
|
const snkTaskbarMessages = {
|
@@ -310,6 +318,19 @@ const snkAttachMessages = {
|
|
310
318
|
}
|
311
319
|
};
|
312
320
|
|
321
|
+
const snkPersonalizedFilterMessages = {
|
322
|
+
info: {
|
323
|
+
labelSearchField: "Buscar campo",
|
324
|
+
labelOperator: "Operador",
|
325
|
+
labelValueVarible: "Valor variável",
|
326
|
+
titleTooltip: "Ao ativar um valor variável, é possível inserir um valor diferente sempre que o filtro for aplicado"
|
327
|
+
},
|
328
|
+
confirm: {
|
329
|
+
title: "Aviso",
|
330
|
+
description: `As informações da condição serão descartadas.</br></br><b>Gostaria de continuar?</b>`
|
331
|
+
}
|
332
|
+
};
|
333
|
+
|
313
334
|
class SnkMessageBuilder {
|
314
335
|
constructor(domainName) {
|
315
336
|
this._defaults = {
|
@@ -332,6 +353,7 @@ class SnkMessageBuilder {
|
|
332
353
|
snkFilterFieldSearch: snkFilterFieldSearchMessages,
|
333
354
|
snkSimpleBar: snkSimpleBarMessages,
|
334
355
|
snkAttach: snkAttachMessages,
|
356
|
+
snkPersonalizedFilter: snkPersonalizedFilterMessages
|
335
357
|
};
|
336
358
|
this._currentOperation = OperationMap.CLEAN;
|
337
359
|
this._domainName = domainName;
|
@@ -8,6 +8,7 @@ var FilterItemType;
|
|
8
8
|
FilterItemType["NUMBER"] = "NUMBER";
|
9
9
|
FilterItemType["DEFAULT_FILTER"] = "DEFAULT_FILTER";
|
10
10
|
FilterItemType["PERSONALIZED"] = "PERSONALIZED";
|
11
|
+
FilterItemType["MULTI_LIST"] = "MULTI_LIST";
|
11
12
|
})(FilterItemType || (FilterItemType = {}));
|
12
13
|
const FilterItemType$1 = FilterItemType;
|
13
14
|
|
@@ -8,6 +8,7 @@ export { SnkDataExporter as SnkDataExporter } from '../types/components/snk-data
|
|
8
8
|
export { SnkDataUnit as SnkDataUnit } from '../types/components/snk-data-unit/snk-data-unit';
|
9
9
|
export { SnkDetailView as SnkDetailView } from '../types/components/snk-crud/subcomponents/snk-detail-view';
|
10
10
|
export { SnkExporterEmailSender as SnkExporterEmailSender } from '../types/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender';
|
11
|
+
export { SnkExpressionItem as SnkExpressionItem } from '../types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item';
|
11
12
|
export { SnkFieldConfig as SnkFieldConfig } from '../types/components/snk-form/subcomponents/snk-field-config/snk-field-config';
|
12
13
|
export { SnkFilterBar as SnkFilterBar } from '../types/components/snk-filter-bar/snk-filter-bar';
|
13
14
|
export { SnkFilterBinarySelect as SnkFilterBinarySelect } from '../types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select';
|
@@ -16,6 +17,7 @@ export { SnkFilterFieldSearch as SnkFilterFieldSearch } from '../types/component
|
|
16
17
|
export { SnkFilterItem as SnkFilterItem } from '../types/components/snk-filter-bar/filter-item/snk-filter-item';
|
17
18
|
export { SnkFilterList as SnkFilterList } from '../types/components/snk-filter-bar/filter-list/snk-filter-list';
|
18
19
|
export { SnkFilterModal as SnkFilterModal } from '../types/components/snk-filter-bar/filter-modal/snk-filter-modal';
|
20
|
+
export { SnkFilterModalItem as SnkFilterModalItem } from '../types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item';
|
19
21
|
export { SnkFilterMultiSelect as SnkFilterMultiSelect } from '../types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select';
|
20
22
|
export { SnkFilterPeriod as SnkFilterNumber } from '../types/components/snk-filter-bar/filter-item/editors/snk-filter-number';
|
21
23
|
export { SnkFilterParamConfig as SnkFilterParamConfig } from '../types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config';
|
@@ -30,6 +32,7 @@ export { SnkFormView as SnkFormView } from '../types/components/snk-crud/subcomp
|
|
30
32
|
export { SnkGrid as SnkGrid } from '../types/components/snk-grid/snk-grid';
|
31
33
|
export { SnkGridConfig as SnkGridConfig } from '../types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config';
|
32
34
|
export { SnkGuidesViewer as SnkGuidesViewer } from '../types/components/snk-crud/subcomponents/snk-guides-viewer';
|
35
|
+
export { SnkPersonalizedFilter as SnkPersonalizedFilter } from '../types/components/snk-personalized-filter/snk-personalized-filter';
|
33
36
|
export { SnkPesquisa as SnkPesquisa } from '../types/components/snk-pesquisa/snk-pesquisa';
|
34
37
|
export { SelectBox as SnkSelectBox } from '../types/components/snk-grid/subcomponents/snk-select-box/snk-select-box';
|
35
38
|
export { SnkSimpleBar as SnkSimpleBar } from '../types/components/snk-simple-bar/snk-simple-bar';
|
package/dist/components/index.js
CHANGED
@@ -8,6 +8,7 @@ export { SnkDataExporter, defineCustomElement as defineCustomElementSnkDataExpor
|
|
8
8
|
export { SnkDataUnit, defineCustomElement as defineCustomElementSnkDataUnit } from './snk-data-unit.js';
|
9
9
|
export { SnkDetailView, defineCustomElement as defineCustomElementSnkDetailView } from './snk-detail-view.js';
|
10
10
|
export { SnkExporterEmailSender, defineCustomElement as defineCustomElementSnkExporterEmailSender } from './snk-exporter-email-sender.js';
|
11
|
+
export { SnkExpressionItem, defineCustomElement as defineCustomElementSnkExpressionItem } from './snk-expression-item.js';
|
11
12
|
export { SnkFieldConfig, defineCustomElement as defineCustomElementSnkFieldConfig } from './snk-field-config.js';
|
12
13
|
export { SnkFilterBar, defineCustomElement as defineCustomElementSnkFilterBar } from './snk-filter-bar.js';
|
13
14
|
export { SnkFilterBinarySelect, defineCustomElement as defineCustomElementSnkFilterBinarySelect } from './snk-filter-binary-select.js';
|
@@ -16,6 +17,7 @@ export { SnkFilterFieldSearch, defineCustomElement as defineCustomElementSnkFilt
|
|
16
17
|
export { SnkFilterItem, defineCustomElement as defineCustomElementSnkFilterItem } from './snk-filter-item.js';
|
17
18
|
export { SnkFilterList, defineCustomElement as defineCustomElementSnkFilterList } from './snk-filter-list.js';
|
18
19
|
export { SnkFilterModal, defineCustomElement as defineCustomElementSnkFilterModal } from './snk-filter-modal.js';
|
20
|
+
export { SnkFilterModalItem, defineCustomElement as defineCustomElementSnkFilterModalItem } from './snk-filter-modal-item.js';
|
19
21
|
export { SnkFilterMultiSelect, defineCustomElement as defineCustomElementSnkFilterMultiSelect } from './snk-filter-multi-select.js';
|
20
22
|
export { SnkFilterNumber, defineCustomElement as defineCustomElementSnkFilterNumber } from './snk-filter-number.js';
|
21
23
|
export { SnkFilterParamConfig, defineCustomElement as defineCustomElementSnkFilterParamConfig } from './snk-filter-param-config.js';
|
@@ -30,6 +32,7 @@ export { SnkFormView, defineCustomElement as defineCustomElementSnkFormView } fr
|
|
30
32
|
export { SnkGrid, defineCustomElement as defineCustomElementSnkGrid } from './snk-grid.js';
|
31
33
|
export { SnkGridConfig, defineCustomElement as defineCustomElementSnkGridConfig } from './snk-grid-config.js';
|
32
34
|
export { SnkGuidesViewer, defineCustomElement as defineCustomElementSnkGuidesViewer } from './snk-guides-viewer.js';
|
35
|
+
export { SnkPersonalizedFilter, defineCustomElement as defineCustomElementSnkPersonalizedFilter } from './snk-personalized-filter.js';
|
33
36
|
export { SnkPesquisa, defineCustomElement as defineCustomElementSnkPesquisa } from './snk-pesquisa.js';
|
34
37
|
export { SnkSelectBox, defineCustomElement as defineCustomElementSnkSelectBox } from './snk-select-box.js';
|
35
38
|
export { SnkSimpleBar, defineCustomElement as defineCustomElementSnkSimpleBar } from './snk-simple-bar.js';
|