@sankhyalabs/sankhyablocks 5.4.3 → 5.6.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-115e8a80.js → SnkMessageBuilder-e64dce7f.js} +49 -1
- package/dist/cjs/{constants-ae0ed870.js → constants-3787fa32.js} +1 -0
- package/dist/cjs/dataunit-fetcher-8f5ade55.js +319 -0
- package/dist/cjs/index-8d94b7e0.js +7 -0
- package/dist/cjs/{index-fc7ca86c.js → index-de79181a.js} +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +3 -315
- package/dist/cjs/snk-attach.cjs.entry.js +450 -0
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +23 -13
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
- package/dist/cjs/{snk-data-unit-aa613f3b.js → snk-data-unit-85d6565e.js} +4 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +5 -5
- package/dist/cjs/snk-expression-item.cjs.entry.js +213 -0
- package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +435 -0
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +11 -3
- package/dist/cjs/{snk-guides-viewer-7db960c2.js → snk-guides-viewer-9784c527.js} +2 -2
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +4 -4
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +126 -0
- package/dist/cjs/snk-select-box.cjs.entry.js +1 -1
- package/dist/cjs/{snk-simple-crud.cjs.entry.js → snk-simple-bar_2.cjs.entry.js} +48 -5
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +6 -4
- package/dist/cjs/{taskbar-elements-5e87cf44.js → taskbar-elements-bc2598f9.js} +4 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/snk-attach/interfaces/index.js +1 -0
- package/dist/collection/components/snk-attach/snk-attach.css +8 -0
- package/dist/collection/components/snk-attach/snk-attach.js +202 -0
- package/dist/collection/components/snk-attach/structure/crud-config-builder.js +37 -0
- package/dist/collection/components/snk-attach/structure/data-unit-builder.js +106 -0
- package/dist/collection/components/snk-attach/structure/index.js +3 -0
- package/dist/collection/components/snk-attach/structure/taskbar-builder.js +47 -0
- package/dist/collection/components/snk-configurator/snk-configurator.js +3 -3
- package/dist/collection/components/snk-crud/snk-crud.js +22 -11
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +21 -0
- package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.js +62 -69
- package/dist/collection/components/snk-grid/snk-grid.js +11 -3
- 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/components/snk-simple-bar/snk-simple-bar.js +37 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +65 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +4 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/attach-fetcher.js +136 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/ISave.js +6 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/index.js +3 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +63 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +7 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +27 -0
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +12 -0
- package/dist/collection/lib/message/resources/snk-simple-bar.msg.js +3 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -0
- package/dist/collection/lib/store/index.js +2 -1
- package/dist/collection/lib/utils/constants.js +1 -0
- package/dist/components/SnkMessageBuilder.js +49 -1
- package/dist/components/constants.js +1 -0
- package/dist/components/dataunit-fetcher.js +317 -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/snk-application2.js +2 -314
- package/dist/components/snk-attach.d.ts +11 -0
- package/dist/components/snk-attach.js +6 -0
- package/dist/components/snk-attach2.js +498 -0
- package/dist/components/snk-crud.js +77 -48
- package/dist/components/snk-data-exporter2.js +1 -1
- package/dist/components/snk-data-unit2.js +4 -0
- 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-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-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-grid2.js +12 -4
- package/dist/components/snk-personalized-filter.d.ts +11 -0
- package/dist/components/snk-personalized-filter.js +158 -0
- package/dist/components/snk-simple-bar.js +1 -41
- package/dist/components/snk-simple-bar2.js +59 -0
- package/dist/components/snk-simple-crud.js +1 -328
- package/dist/{esm/snk-simple-crud.entry.js → components/snk-simple-crud2.js} +73 -18
- package/dist/components/snk-taskbar2.js +10 -199
- package/dist/esm/{SnkMessageBuilder-a15d22f8.js → SnkMessageBuilder-f3590f65.js} +49 -1
- package/dist/esm/{constants-15617e7d.js → constants-e916ccc3.js} +1 -0
- package/dist/esm/dataunit-fetcher-d32c6a47.js +317 -0
- package/dist/esm/{index-6519a79e.js → index-507e19ec.js} +1 -1
- package/dist/esm/index-620ac460.js +7 -0
- package/dist/esm/{index-e467ade5.js → index-8efbf198.js} +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +3 -315
- package/dist/esm/snk-attach.entry.js +446 -0
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +25 -15
- package/dist/esm/snk-data-exporter.entry.js +4 -4
- package/dist/esm/{snk-data-unit-5ed93c0e.js → snk-data-unit-50b1660c.js} +4 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +6 -6
- package/dist/esm/snk-expression-item.entry.js +209 -0
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-filter-field-search_2.entry.js +430 -0
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-grid-config.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +13 -5
- package/dist/esm/{snk-guides-viewer-1e7c21f6.js → snk-guides-viewer-4d12f268.js} +3 -3
- package/dist/esm/snk-guides-viewer.entry.js +5 -5
- package/dist/esm/snk-personalized-filter.entry.js +122 -0
- package/dist/esm/snk-select-box.entry.js +1 -1
- package/dist/esm/snk-simple-bar_2.entry.js +325 -0
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +7 -5
- package/dist/esm/{taskbar-elements-10d80c79.js → taskbar-elements-e6af3e93.js} +5 -2
- package/dist/sankhyablocks/p-17375123.js +1 -0
- package/dist/sankhyablocks/{p-b80cf644.entry.js → p-1c0ee011.entry.js} +1 -1
- package/dist/sankhyablocks/p-1dcfd32a.entry.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-3d3263b4.js +1 -0
- package/dist/sankhyablocks/p-3fbe2d69.entry.js +11 -0
- package/dist/sankhyablocks/p-433dfa63.entry.js +1 -0
- package/dist/sankhyablocks/{p-f132e371.js → p-4c2015a9.js} +1 -1
- package/dist/sankhyablocks/p-4eefe631.entry.js +1 -0
- package/dist/sankhyablocks/p-6a02e236.js +1 -0
- package/dist/sankhyablocks/{p-0a1e7f75.entry.js → p-6ac29569.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f4d36823.entry.js → p-6f0b3cc0.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6516f35a.entry.js → p-86f75e7a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-32599159.entry.js → p-8b02b276.entry.js} +1 -1
- package/dist/sankhyablocks/p-8bdf5e57.entry.js +1 -0
- package/dist/sankhyablocks/{p-9bfa3cfb.entry.js → p-c4417efb.entry.js} +1 -1
- package/dist/sankhyablocks/p-c9477950.js +1 -0
- package/dist/sankhyablocks/{p-703dddb9.js → p-ccd26e3a.js} +1 -1
- package/dist/sankhyablocks/p-d410f45a.js +1 -0
- package/dist/sankhyablocks/p-df8f13b4.entry.js +1 -0
- package/dist/sankhyablocks/{p-3169584f.entry.js → p-e0b4aec3.entry.js} +1 -1
- package/dist/sankhyablocks/p-e9f42525.entry.js +1 -0
- package/dist/sankhyablocks/{p-1393dc00.entry.js → p-f344b811.entry.js} +1 -1
- package/dist/sankhyablocks/p-f4184ce7.js +1 -0
- package/dist/sankhyablocks/p-f821768b.js +74 -0
- package/dist/sankhyablocks/{p-f29caa0a.entry.js → p-f8c66aa3.entry.js} +1 -1
- package/dist/sankhyablocks/p-fd4ed40a.entry.js +1 -0
- package/dist/sankhyablocks/p-ff96b509.entry.js +27 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/interfaces/index.d.ts +10 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +45 -0
- package/dist/types/components/snk-attach/structure/crud-config-builder.d.ts +7 -0
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +16 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +3 -0
- package/dist/types/components/snk-attach/structure/taskbar-builder.d.ts +8 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +5 -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/snk-simple-bar/snk-simple-bar.d.ts +14 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -0
- package/dist/types/components.d.ts +150 -9
- package/dist/types/global.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +8 -2
- package/dist/types/lib/http/data-fetcher/fetchers/attach-fetcher.d.ts +14 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.d.ts +13 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/ISave.d.ts +26 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +7 -0
- package/dist/types/lib/message/resources/snk-attach.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-personalized-filter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-simple-bar.msg.d.ts +1 -0
- package/dist/types/lib/store/index.d.ts +1 -0
- package/dist/types/lib/utils/constants.d.ts +2 -1
- 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/snk-simple-bar.cjs.entry.js +0 -30
- package/dist/esm/snk-simple-bar.entry.js +0 -26
- package/dist/sankhyablocks/p-1c17eecf.entry.js +0 -1
- package/dist/sankhyablocks/p-2ecf14ff.js +0 -1
- package/dist/sankhyablocks/p-340d6fb0.entry.js +0 -84
- package/dist/sankhyablocks/p-74724fa7.js +0 -1
- package/dist/sankhyablocks/p-79d22df0.entry.js +0 -1
- package/dist/sankhyablocks/p-79f01b63.entry.js +0 -1
- package/dist/sankhyablocks/p-81e85890.entry.js +0 -1
- package/dist/sankhyablocks/p-93d8fe00.entry.js +0 -1
- package/dist/sankhyablocks/p-94e6fc90.entry.js +0 -1
- package/dist/sankhyablocks/p-98f7f796.js +0 -1
- package/dist/sankhyablocks/p-b3e71248.entry.js +0 -1
- package/dist/sankhyablocks/p-bc281de0.js +0 -1
- package/dist/sankhyablocks/p-d61759a5.entry.js +0 -1
- package/dist/sankhyablocks/p-d65809d5.entry.js +0 -1
- package/dist/sankhyablocks/p-f587a454.js +0 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -259
- package/dist/types/components/snk-crud/snk-crud.d.ts +0 -73
- package/dist/types/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.d.ts +0 -40
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +0 -27
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +0 -23
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +0 -23
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +0 -29
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +0 -25
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +0 -19
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +0 -38
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +0 -74
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +0 -53
- package/dist/types/components/snk-grid/snk-grid.d.ts +0 -95
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +0 -59
@@ -0,0 +1,213 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index$1 = require('./index-21bd01e1.js');
|
6
|
+
const core = require('@sankhyalabs/core');
|
7
|
+
const index$3 = require('./index-8d94b7e0.js');
|
8
|
+
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
9
|
+
const FieldBuilder = require('@sankhyalabs/ezui/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder');
|
10
|
+
const index = require('./index-f400b1d6.js');
|
11
|
+
const index$2 = require('./index-de79181a.js');
|
12
|
+
|
13
|
+
const FilterOperandDefault = [
|
14
|
+
{ value: index.FilterOperand.EQUAL, label: "Igual (=)" },
|
15
|
+
{ value: index.FilterOperand.DIFFERENT, label: "Diferente (<>)" },
|
16
|
+
{ value: index.FilterOperand.LIKE, label: "Contendo (LIKE)" },
|
17
|
+
{ value: index.FilterOperand.IN, label: "Contido em (IN)" },
|
18
|
+
{ value: index.FilterOperand.START_WITH, label: "Iniciado com (%?)" },
|
19
|
+
{ value: index.FilterOperand.FINISHED_WITH, label: "Terminado com (?%)" },
|
20
|
+
{ value: index.FilterOperand.NULL, label: "Vazio (NULL)" },
|
21
|
+
{ value: index.FilterOperand.NOT_NULL, label: "Não Vazio (NOT NULL)" },
|
22
|
+
{ value: index.FilterOperand.LARGER, label: "Maior (>)" },
|
23
|
+
{ value: index.FilterOperand.LARGER_EQUAL, label: "Maior ou Igual (>=)" },
|
24
|
+
{ value: index.FilterOperand.SMALLER, label: "Menor (<)" },
|
25
|
+
{ value: index.FilterOperand.SMALLER_EQUAL, label: "Menor ou Igual (<=)" }
|
26
|
+
];
|
27
|
+
const FilterOperandTypeTextSearch = [
|
28
|
+
{ value: index.FilterOperand.EQUAL, label: "Igual (=)" },
|
29
|
+
{ value: index.FilterOperand.DIFFERENT, label: "Diferente (<>)" },
|
30
|
+
{ value: index.FilterOperand.LIKE, label: "Contendo (LIKE)" },
|
31
|
+
{ value: index.FilterOperand.IN, label: "Contido em (IN)" },
|
32
|
+
{ value: index.FilterOperand.START_WITH, label: "Iniciado com (%?)" },
|
33
|
+
{ value: index.FilterOperand.FINISHED_WITH, label: "Terminado com (?%)" },
|
34
|
+
{ value: index.FilterOperand.NULL, label: "Vazio (NULL)" },
|
35
|
+
{ value: index.FilterOperand.NOT_NULL, label: "Não Vazio (NOT NULL)" }
|
36
|
+
];
|
37
|
+
const FIELD_TYPE_SEARCH_AND_TEXT = [
|
38
|
+
core.UserInterface.SEARCH,
|
39
|
+
core.UserInterface.SHORTTEXT,
|
40
|
+
core.UserInterface.PASSWORD,
|
41
|
+
core.UserInterface.MASKEDTEXT,
|
42
|
+
core.UserInterface.LONGTEXT,
|
43
|
+
core.UserInterface.HTML
|
44
|
+
];
|
45
|
+
|
46
|
+
const snkExpressionItemCss = ".sc-snk-expression-item-h{display:flex;width:100%;--snk-expression-item--background-color:var(--background--xlight, #fff);--snk-expression-item__itens--padding:var(--space--small, 6px);--snk-expression-item__width--input-operator:220px;--snk-expression-item__width--input-value:240px;--snk-expression-item__width--input-value-variable:176px;--snk-expression-item--border-radius:var(--border--radius-medium, 12px);--snk-expression-item--border-color:var(--color--strokes, #DCE0E8);--snk-expression-item--border-style:var(--border--small, 1px solid)}.box.sc-snk-expression-item{width:100%;height:100%;background:var(--snk-expression-item--background-color);margin:var(--space--small, 6px);border:var(--snk-expression-item--border-color) var(--snk-expression-item--border-style);border-radius:var(--snk-expression-item--border-radius)}.box__container.sc-snk-expression-item{display:flex;align-items:center;justify-content:space-between;white-space:nowrap;margin:var(--space--small, 6px)}.box__container--input-filter.sc-snk-expression-item{width:100%}.box__container--input-operator.sc-snk-expression-item{display:flex;width:var(--snk-expression-item__width--input-operator);min-width:var(--snk-expression-item__width--input-operator)}.box__container--input-value.sc-snk-expression-item{display:flex;width:var(--snk-expression-item__width--input-value);min-width:var(--snk-expression-item__width--input-value)}.box__container--input-value-variable.sc-snk-expression-item{display:flex;width:var(--snk-expression-item__width--input-value-variable);min-width:var(--snk-expression-item__width--input-value-variable)}.box__container--button-delete.sc-snk-expression-item{display:flex}.box__container.sc-snk-expression-item>div.sc-snk-expression-item{padding-left:var(--snk-expression-item__itens--padding);padding-right:var(--snk-expression-item__itens--padding)}.box__container--button-delete--icon.sc-snk-expression-item{width:42px;min-width:42px}.box__container--input-value-variable--icon.sc-snk-expression-item{cursor:pointer}";
|
47
|
+
|
48
|
+
const SnkExpressionItem = class {
|
49
|
+
constructor(hostRef) {
|
50
|
+
index$1.registerInstance(this, hostRef);
|
51
|
+
this.ezFilterItemChange = index$1.createEvent(this, "ezFilterItemChange", 7);
|
52
|
+
this.ezFilterItemRemove = index$1.createEvent(this, "ezFilterItemRemove", 7);
|
53
|
+
this.application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
54
|
+
this.filterOperandDefault = FilterOperandDefault;
|
55
|
+
this.filterOperandTypeTextSearch = FilterOperandTypeTextSearch;
|
56
|
+
this._showValueVariable = false;
|
57
|
+
this._fieldSelected = undefined;
|
58
|
+
this._optionNotNull = false;
|
59
|
+
this.expression = undefined;
|
60
|
+
this.canRemove = true;
|
61
|
+
this.messagesBuilder = undefined;
|
62
|
+
}
|
63
|
+
expressionChanged(newValue, oldValue) {
|
64
|
+
if (newValue !== oldValue) {
|
65
|
+
this.ezFilterItemChange.emit(newValue);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
componentWillLoad() {
|
69
|
+
this._dataSourceFetcher = index$2.store.get("filterFieldsDataSource");
|
70
|
+
index$2.store.onChange('filterFieldsDataSource', () => {
|
71
|
+
this._dataSourceFetcher = index$2.store.get("filterFieldsDataSource");
|
72
|
+
});
|
73
|
+
}
|
74
|
+
setValueExpression(key, value) {
|
75
|
+
this.expression[key] = value;
|
76
|
+
this.expressionChanged(this.expression);
|
77
|
+
}
|
78
|
+
getMessage(key, params) {
|
79
|
+
return this.application.messagesBuilder.getMessage(key, params);
|
80
|
+
}
|
81
|
+
handleSelectItem(filterField) {
|
82
|
+
if (filterField.type === index$3.SelectedItemType.FIELD) {
|
83
|
+
const field = filterField;
|
84
|
+
this._fieldSelected = field;
|
85
|
+
this.setValueExpression("fieldName", field.name);
|
86
|
+
}
|
87
|
+
}
|
88
|
+
handleFocus() {
|
89
|
+
if (this._elFilterFieldSearch)
|
90
|
+
this._elFilterFieldSearch.show();
|
91
|
+
}
|
92
|
+
handleChangeFilterInput(evt) {
|
93
|
+
this._elFilterFieldSearch.applyFilter(evt.detail);
|
94
|
+
}
|
95
|
+
handleChangeValueVariable(showValueVariable) {
|
96
|
+
this._showValueVariable = showValueVariable;
|
97
|
+
if (this._elFieldDynamic) {
|
98
|
+
this._elFieldDynamic.value = undefined;
|
99
|
+
this._elFieldDynamic.enabled = !showValueVariable;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
openSnkFilterParamConfig() {
|
103
|
+
var _a;
|
104
|
+
(_a = this._elFilterParamConfigRef) === null || _a === void 0 ? void 0 : _a.open(this.expression).then(this.onOpenPromiseReady.bind(this)).catch(error => {
|
105
|
+
console.error(error);
|
106
|
+
});
|
107
|
+
}
|
108
|
+
onOpenPromiseReady(changes) {
|
109
|
+
this.expression = changes;
|
110
|
+
}
|
111
|
+
buildOptionsOperator() {
|
112
|
+
var _a;
|
113
|
+
if (FIELD_TYPE_SEARCH_AND_TEXT.includes((_a = this._fieldSelected) === null || _a === void 0 ? void 0 : _a.userInterface)) {
|
114
|
+
return this.filterOperandTypeTextSearch;
|
115
|
+
}
|
116
|
+
else {
|
117
|
+
return this.filterOperandDefault;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
handleChangeOperator(optionSelected) {
|
121
|
+
this.checkOptionIsNull(optionSelected);
|
122
|
+
this.setValueExpression("operand", optionSelected);
|
123
|
+
}
|
124
|
+
checkOptionIsNull(optionSelected) {
|
125
|
+
if (optionSelected === index.FilterOperand.NULL || optionSelected === index.FilterOperand.NOT_NULL) {
|
126
|
+
this._optionNotNull = true;
|
127
|
+
if (this._elFieldDynamic) {
|
128
|
+
this._elFieldDynamic.enabled = false;
|
129
|
+
this._elFieldDynamic.value = undefined;
|
130
|
+
}
|
131
|
+
}
|
132
|
+
else {
|
133
|
+
this._optionNotNull = false;
|
134
|
+
if (this._elFieldDynamic) {
|
135
|
+
this._elFieldDynamic.enabled = this._showValueVariable ? false : true;
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
139
|
+
confirmRemove(evt) {
|
140
|
+
evt.preventDefault();
|
141
|
+
evt.stopPropagation();
|
142
|
+
utils.ApplicationUtils.confirm(this.getMessage("snkPersonalizedFilter.confirm.title"), this.getMessage("snkPersonalizedFilter.confirm.description"))
|
143
|
+
.then((canRemove) => {
|
144
|
+
if (canRemove) {
|
145
|
+
this.ezFilterItemRemove.emit(this.expression);
|
146
|
+
}
|
147
|
+
});
|
148
|
+
}
|
149
|
+
buildFieldByType() {
|
150
|
+
var _a, _b;
|
151
|
+
if (!this._fieldSelected)
|
152
|
+
return;
|
153
|
+
const inputFieldData = (_a = FieldBuilder.fieldBuilder(this.configureFieldByType())) === null || _a === void 0 ? void 0 : _a.$children$.shift();
|
154
|
+
if (this._optionNotNull && inputFieldData || ((_b = this._elValueVariable) === null || _b === void 0 ? void 0 : _b.value) && inputFieldData) {
|
155
|
+
inputFieldData.$attrs$.enabled = false;
|
156
|
+
}
|
157
|
+
return index$1.h(inputFieldData.$tag$, Object.assign(Object.assign({}, inputFieldData.$attrs$), { ref: (el) => {
|
158
|
+
this._elFieldDynamic = el;
|
159
|
+
} }));
|
160
|
+
}
|
161
|
+
configureFieldByType() {
|
162
|
+
const field = {
|
163
|
+
userInterface: this._fieldSelected.userInterface,
|
164
|
+
name: this._fieldSelected.name,
|
165
|
+
label: this._fieldSelected.label,
|
166
|
+
canShowError: false
|
167
|
+
};
|
168
|
+
switch (field.userInterface) {
|
169
|
+
case core.UserInterface.OPTIONSELECTOR:
|
170
|
+
field.props = {
|
171
|
+
options: this._fieldSelected.properties.map(option => ({
|
172
|
+
value: option.value,
|
173
|
+
label: option.name,
|
174
|
+
})),
|
175
|
+
};
|
176
|
+
break;
|
177
|
+
case core.UserInterface.LONGTEXT:
|
178
|
+
field.rows = 1;
|
179
|
+
break;
|
180
|
+
case core.UserInterface.SEARCH:
|
181
|
+
field.optionLoader = searchArgument => this.setCriteriaSearch(searchArgument, this.application);
|
182
|
+
break;
|
183
|
+
}
|
184
|
+
return field;
|
185
|
+
}
|
186
|
+
setCriteriaSearch({ mode, argument }, application) {
|
187
|
+
if (application == undefined)
|
188
|
+
return;
|
189
|
+
const searchOptions = {
|
190
|
+
showInactives: false
|
191
|
+
};
|
192
|
+
const options = {
|
193
|
+
entity: this._fieldSelected.properties.ENTITYNAME,
|
194
|
+
searchOptions: searchOptions,
|
195
|
+
entityDescription: this._fieldSelected.label
|
196
|
+
};
|
197
|
+
return application.executePreparedSearch(mode, argument, options);
|
198
|
+
}
|
199
|
+
render() {
|
200
|
+
var _a;
|
201
|
+
return (index$1.h(index$1.Host, null, index$1.h("div", { class: "box" }, index$1.h("div", { class: "box__container" }, index$1.h("div", { class: "box__container--input-filter" }, index$1.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() }), index$1.h("snk-filter-field-search", { ref: ref => this._elFilterFieldSearch = ref, searchable: false, onEzSelectFilterItem: (ev) => this.handleSelectItem(ev.detail), fieldsDataSource: this._dataSourceFetcher })), index$1.h("div", { class: "box__container--input-operator" }, index$1.h("ez-combo-box", { label: this.getMessage("snkPersonalizedFilter.info.labelOperator"), canShowError: false, options: this.buildOptionsOperator(), onEzChange: (evt) => this.handleChangeOperator(evt.detail.value), suppressEmptyOption: true })), index$1.h("div", { class: "box__container--input-value" }, !this._fieldSelected ?
|
202
|
+
index$1.h("ez-number-input", { label: "Valor", canShowError: false, enabled: (!this._showValueVariable && !this._optionNotNull) }) :
|
203
|
+
this.buildFieldByType()), index$1.h("div", { class: "box__container--input-value-variable", title: this.getMessage("snkPersonalizedFilter.info.titleTooltip") }, !this._optionNotNull &&
|
204
|
+
index$1.h("ez-check", { ref: ref => this._elValueVariable = ref, label: this.getMessage("snkPersonalizedFilter.info.labelValueVarible"), mode: utils.CheckMode.SWITCH, onEzChange: (evt) => this.handleChangeValueVariable(evt.detail) }), (this._showValueVariable && !this._optionNotNull) &&
|
205
|
+
index$1.h("ez-icon", { class: "box__container--input-value-variable--icon", size: "large", iconName: "settings-inverted", onClick: () => this.openSnkFilterParamConfig() }), index$1.h("snk-filter-param-config", { ref: (el) => this._elFilterParamConfigRef = el, messagesBuilder: this.messagesBuilder })), index$1.h("div", { class: "box__container--button-delete" }, index$1.h("div", { class: "box__container--button-delete--icon" }, this.canRemove && index$1.h("ez-button", { mode: "icon", iconName: "delete", onClick: (evt) => this.confirmRemove(evt) })))))));
|
206
|
+
}
|
207
|
+
static get watchers() { return {
|
208
|
+
"expression": ["expressionChanged"]
|
209
|
+
}; }
|
210
|
+
};
|
211
|
+
SnkExpressionItem.style = snkExpressionItemCss;
|
212
|
+
|
213
|
+
exports.snk_expression_item = SnkExpressionItem;
|
@@ -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 constants = require('./constants-
|
7
|
+
const constants = require('./constants-3787fa32.js');
|
8
8
|
|
9
9
|
const snkFieldConfigCss = ".sc-snk-field-config-h{--snk-field-config--height:42px;--snk-field-config--width:100%;--snk-field-config__icon--width:48px;--snk-field-config-slim--height:32px;--snk-field-config--border-radius:var(--border--radius-medium, 12px);--snk-field-config--font-size:var(--text--medium, 14px);--snk-field-config--font-family:var(--font-pattern, Arial);--snk-field-config--font-weight:var(--text-weight--medium, 400);--snk-field-config--color:var(--title--primary, #000);--snk-field-config--padding-left:var(--space--medium, 6px);--snk-field-config__input--background-color:var(--background--medium, #e0e0e0);--snk-field-config__input--border:var(--border--medium, 2px solid);--snk-field-config__input--border-color:var(--background--xlight, #fff);--snk-field-config__required--color:var(--color--error, #FF0000);--snk-field-config__label--gap:var(--space--extra-small, 3px);--snk-field-config__transition--visibility:var(--transition, 0.2s linear);--snk-field-config__transition--opacity:var(--transition, 0.15s linear);--snk-field-config__config-popover--z-index:var(--more-visible, 2);--snk-field-config__config-outer-arrow--background-color:var(--color--secondary-200, #D2D3DA);--snk-field-config__draggable--padding-right:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--snk-field-config--width)}.field-config.sc-snk-field-config{width:100%;box-sizing:border-box;display:flex;align-items:center;padding-left:var(--snk-field-config--padding-left);font-weight:var(--snk-field-config--font-weight);height:var(--snk-field-config--height);border-radius:var(--snk-field-config--border-radius);font-family:var(--snk-field-config--font-family);font-size:var(--snk-field-config--font-size);border:var(--snk-field-config__input--border);border-color:var(--snk-field-config__input--border-color);background-color:var(--snk-field-config__input--background-color);color:var(--snk-field-config--color)}.field-config__config-popover.sc-snk-field-config{width:40px;margin-left:auto;z-index:var(--snk-field-config__config-popover--z-index)}.field-config__label.sc-snk-field-config{display:flex;flex-direction:row-reverse;line-height:calc(var(--snk-field-config--font-size) + 2px);gap:var(--snk-field-config__label--gap)}.field-config__label-text.sc-snk-field-config{overflow:hidden;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;display:-webkit-box;-o-text-overflow:ellipsis;text-overflow:ellipsis;word-break:break-word}.field-config__label-required.sc-snk-field-config{color:var(--snk-field-config__required--color)}.field-config__add.sc-snk-field-config{display:flex;margin-left:auto;visibility:hidden;opacity:0;transition:visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity)}.field-config__options.sc-snk-field-config{display:flex;margin-left:auto;visibility:hidden;opacity:0;transition:visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity)}.field-config__options--is-active.sc-snk-field-config{display:flex;visibility:visible;opacity:1}.field-config__remove-icon.sc-snk-field-config{margin-right:-15px}.field-config.sc-snk-field-config:hover .field-config__options.sc-snk-field-config{display:flex;visibility:visible;opacity:1}.field-config.sc-snk-field-config:hover .field-config__add.sc-snk-field-config{visibility:visible;opacity:1}.field-config__draggable.sc-snk-field-config{padding-right:var(--snk-field-config__draggable--padding-right)}.field-config__config-outer-arrow.sc-snk-field-config{clip-path:polygon(50% 0, 90% 100%, 10% 100%);border-radius:0.25em 0 0 0;width:30px;height:15px;padding-top:3px;border-bottom:1px solid #FFFFFF;background-color:var(--snk-field-config__config-outer-arrow--background-color)}.field-config__config-inner-arrow.sc-snk-field-config{background-color:#FFFFFF;clip-path:polygon(50% 0, 90% 100%, 10% 100%);border-radius:0.25em 0 0 0;width:30px;height:15px}.ez-box__container.sc-snk-field-config ez-collapsible-box.sc-snk-field-config{--snk-collapsible-box__header--padding-left:6px}ez-icon.sc-snk-field-config{--snk-icon--color:var(--snk-field-config--color)}ez-popover.sc-snk-field-config{--snk-popover__box--background-color:transparent;--snk-popover__box--box-shadow:none}.field-config__options.sc-snk-field-config ez-button.sc-snk-field-config{--snk-button--background-color:transparent;--snk-button--focus--border:none;--snk-button--focus--box-shadow:none}@media screen and (min-width: 1200px){.field-config__label.sc-snk-field-config{flex-direction:row}}";
|
10
10
|
|