@sankhyalabs/sankhyablocks 10.1.0-dev.17 → 10.1.0-dev.19
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/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-eccb267a.js} +13 -0
- package/dist/cjs/{SnkMultiSelectionListDataSource-72925620.js → SnkMultiSelectionListDataSource-03b58f5a.js} +1 -1
- package/dist/cjs/config-header.cjs.entry.js +1 -1
- package/dist/cjs/configs-button.cjs.entry.js +1 -1
- package/dist/cjs/css-shim-a27d231b.js +6 -0
- package/dist/cjs/dom-ff96a4bc.js +75 -0
- package/dist/cjs/field-config_2.cjs.entry.js +1 -1
- package/dist/cjs/fields-layout.cjs.entry.js +1 -1
- package/dist/cjs/fields-selector.cjs.entry.js +1 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +1 -1
- package/dist/cjs/{index-dc83c596.js → index-1894343a.js} +1527 -170
- package/dist/cjs/{index-516250fa.js → index-f0fe7e6e.js} +90 -21
- package/dist/cjs/loader.cjs.js +15 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +131 -3
- package/dist/cjs/shadow-css-7e3e0ab1.js +389 -0
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +1 -1
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +19 -2
- package/dist/cjs/snk-attach.cjs.entry.js +3 -3
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +3 -3
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
- package/dist/cjs/{snk-data-unit-47f02b9e.js → snk-data-unit-036ce58c.js} +8 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-default-filter.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +4 -4
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +22 -12
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +4 -4
- package/dist/cjs/{snk-guides-viewer-41c22d96.js → snk-guides-viewer-164c063e.js} +2 -2
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +4 -4
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +4 -4
- package/dist/cjs/snk-taskbar.cjs.entry.js +3 -3
- package/dist/cjs/{taskbar-elements-756fcbe7.js → taskbar-elements-8a80420e.js} +2 -2
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/components/snk-application/snk-application.js +18 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +7 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +17 -9
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -0
- package/dist/components/PersonalizedFilterUtils.js +13 -0
- package/dist/components/index2.js +90 -21
- package/dist/components/snk-application2.js +18 -1
- package/dist/components/snk-data-unit2.js +7 -0
- package/dist/components/snk-filter-bar2.js +17 -9
- package/dist/components/snk-filter-item2.js +3 -1
- package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-d2439a9a.js} +13 -0
- package/dist/esm/{SnkMultiSelectionListDataSource-493ae8c8.js → SnkMultiSelectionListDataSource-01b3744b.js} +1 -1
- package/dist/esm/config-header.entry.js +1 -1
- package/dist/esm/configs-button.entry.js +1 -1
- package/dist/esm/css-shim-9f2d321e.js +4 -0
- package/dist/esm/dom-64053c71.js +73 -0
- package/dist/esm/field-config_2.entry.js +1 -1
- package/dist/esm/fields-layout.entry.js +1 -1
- package/dist/esm/fields-selector.entry.js +1 -1
- package/dist/esm/guides-configurator.entry.js +1 -1
- package/dist/esm/{index-7fd74680.js → index-04f73a26.js} +1519 -170
- package/dist/esm/{index-3355bd17.js → index-ea250be6.js} +90 -21
- package/dist/esm/loader.js +16 -2
- package/dist/esm/pesquisa-grid_2.entry.js +1 -1
- package/dist/esm/sankhyablocks.js +132 -4
- package/dist/esm/shadow-css-98135883.js +387 -0
- package/dist/esm/snk-actions-button_9.entry.js +1 -1
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +19 -2
- package/dist/esm/snk-attach.entry.js +3 -3
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +3 -3
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-custom-slot-guide.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +2 -2
- package/dist/esm/{snk-data-unit-9e9d9d46.js → snk-data-unit-130021b3.js} +8 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-default-filter.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +4 -4
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-expression-group_2.entry.js +2 -2
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +2 -2
- package/dist/esm/snk-filter-bar_4.entry.js +22 -12
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +2 -2
- package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
- package/dist/esm/snk-filter-modal-item.entry.js +1 -1
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/esm/snk-form-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +1 -1
- package/dist/esm/snk-form_2.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +4 -4
- package/dist/esm/{snk-guides-viewer-31ef5fc6.js → snk-guides-viewer-3fd18298.js} +2 -2
- package/dist/esm/snk-guides-viewer.entry.js +4 -4
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-bar.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +4 -4
- package/dist/esm/snk-taskbar.entry.js +3 -3
- package/dist/esm/{taskbar-elements-bf5b73f1.js → taskbar-elements-d1e63fb2.js} +2 -2
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-c60d864f.entry.js → p-0a160fb5.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0893a694.entry.js → p-12f595a6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-522d36aa.entry.js → p-175c9576.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8488fa7e.entry.js → p-18d66638.entry.js} +1 -1
- package/dist/sankhyablocks/{p-cfa4c183.entry.js → p-27e0cd68.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8d84d6ab.entry.js → p-2b882835.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7375bf6a.entry.js → p-2c6be187.entry.js} +1 -1
- package/dist/sankhyablocks/p-2c9d0870.js +2 -0
- package/dist/sankhyablocks/{p-8783d550.entry.js → p-2cc2526e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-82b59a45.entry.js → p-2ebda226.entry.js} +1 -1
- package/dist/sankhyablocks/{p-301baf9c.entry.js → p-2f94cf87.entry.js} +1 -1
- package/dist/sankhyablocks/{p-35a26068.entry.js → p-3a35917e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4e9e570c.entry.js → p-3b6d8d33.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0da30fd9.entry.js → p-3db72758.entry.js} +1 -1
- package/dist/sankhyablocks/p-560a9a68.entry.js +1 -0
- package/dist/sankhyablocks/{p-4575c4aa.entry.js → p-5aae5c74.entry.js} +1 -1
- package/dist/sankhyablocks/p-6564180d.entry.js +1 -0
- package/dist/sankhyablocks/p-68c1a093.js +1 -0
- package/dist/sankhyablocks/{p-907e96eb.js → p-6d322b0a.js} +1 -1
- package/dist/sankhyablocks/{p-cc68a0c1.entry.js → p-7150eacf.entry.js} +1 -1
- package/dist/sankhyablocks/{p-56b1b397.entry.js → p-752c57f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-670b8802.entry.js → p-752f4e29.entry.js} +1 -1
- package/dist/sankhyablocks/{p-939523b3.entry.js → p-76729994.entry.js} +1 -1
- package/dist/sankhyablocks/{p-357e10e0.entry.js → p-877d9614.entry.js} +1 -1
- package/dist/sankhyablocks/{p-497ece60.entry.js → p-8d946600.entry.js} +1 -1
- package/dist/sankhyablocks/{p-227e82b2.entry.js → p-90ae6c2e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b5832fa0.entry.js → p-94267a30.entry.js} +1 -1
- package/dist/sankhyablocks/{p-59158ba4.js → p-998a9d6f.js} +1 -1
- package/dist/sankhyablocks/{p-1e469905.entry.js → p-9c1ff75e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-abfc9880.entry.js → p-9e109f5e.entry.js} +1 -1
- package/dist/sankhyablocks/p-a46ac091.js +1 -0
- package/dist/sankhyablocks/p-a73b6b00.js +1 -0
- package/dist/sankhyablocks/{p-4deb7f46.entry.js → p-acd2ba28.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3671cdd4.entry.js → p-ae326d06.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5c9bea92.entry.js → p-b471bfab.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2624dfd2.entry.js → p-b533edab.entry.js} +1 -1
- package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
- package/dist/sankhyablocks/p-c3ec6642.js +19 -0
- package/dist/sankhyablocks/{p-613eb22e.entry.js → p-c8043a53.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ce207f2a.entry.js → p-cc64239c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1be69fd4.js → p-cc9935af.js} +1 -1
- package/dist/sankhyablocks/{p-8d76a0ca.entry.js → p-cd00a3d1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7961c550.entry.js → p-cd40c8cf.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d5d7fe52.entry.js → p-cd412add.entry.js} +1 -1
- package/dist/sankhyablocks/{p-959fe522.entry.js → p-d657f71f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c2bb0659.entry.js → p-d6dad5e4.entry.js} +1 -1
- package/dist/sankhyablocks/p-d714b6ca.js +1 -0
- package/dist/sankhyablocks/{p-dcb096c4.entry.js → p-d8368b17.entry.js} +1 -1
- package/dist/sankhyablocks/p-da455c82.js +12 -0
- package/dist/sankhyablocks/p-dea58642.entry.js +11 -0
- package/dist/sankhyablocks/p-e30acdca.entry.js +1 -0
- package/dist/sankhyablocks/{p-1dba30c9.entry.js → p-ec9027a7.entry.js} +1 -1
- package/dist/sankhyablocks/p-ef9343c3.entry.js +1 -0
- package/dist/sankhyablocks/{p-def17f0e.entry.js → p-f152ef98.entry.js} +1 -1
- package/dist/sankhyablocks/{p-98c70173.entry.js → p-f7170e10.entry.js} +1 -1
- package/dist/sankhyablocks/{p-02cb4829.entry.js → p-f8c5395a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-98e3d0a1.entry.js → p-f8da8569.entry.js} +1 -1
- package/dist/sankhyablocks/{p-fd1a5a61.entry.js → p-f921270b.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
- package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-156c9f38.js +0 -1
- package/dist/sankhyablocks/p-1c31f314.entry.js +0 -1
- package/dist/sankhyablocks/p-465877ee.entry.js +0 -1
- package/dist/sankhyablocks/p-516411de.entry.js +0 -1
- package/dist/sankhyablocks/p-67137d7c.entry.js +0 -1
- package/dist/sankhyablocks/p-82bb3eda.js +0 -2
- package/dist/sankhyablocks/p-8336900b.js +0 -1
- package/dist/sankhyablocks/p-988afe78.js +0 -1
- package/dist/sankhyablocks/p-cb7c592f.entry.js +0 -11
- package/dist/sankhyablocks/p-e47d6f17.entry.js +0 -1
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const index$1 = require('./index-62760a9c.js');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const core = require('@sankhyalabs/core');
|
|
9
9
|
const index$3 = require('./index-8d94b7e0.js');
|
|
10
10
|
const FieldBuilder = require('@sankhyalabs/ezui/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder');
|
|
11
|
-
const index$2 = require('./index-
|
|
11
|
+
const index$2 = require('./index-f0fe7e6e.js');
|
|
12
12
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
13
13
|
|
|
14
14
|
const snkExpressionGroupCss = ".sc-snk-expression-group-h{display:block;--snk-expression-group--container-condition--width:184px;--snk-expression-group--container-condition--height:38px;--snk-expression-group--container-condition--border-radius:var(--border--radius-medium, 12px);--snk-expression-group--container-option--width:85px;--snk-expression-group__container-condition--background-and:#66B6A0;--snk-expression-group__container-condition--background-or:#EBC65E;--snk-expression-group__container-expression--padding-left:26px;--snk-expression-group__background-color-dashed:var(--background--body, #fafcff);--ez-text-input__margin-bottom:0px}.snk-expression-group__container-condition.sc-snk-expression-group{width:var(--snk-expression-group--container-condition--width);height:var(--snk-expression-group--container-condition--height);border-radius:var(--snk-expression-group--container-condition--border-radius);z-index:var(--more-visible--2x, 3);padding:var(--space--nano, 2px)}.snk-expression-group__container-option.sc-snk-expression-group{width:var(--snk-expression-group--container-option--width)}.snk-expression-group__container-condition[data-condition=\"AND\"].sc-snk-expression-group{background-color:var(--snk-expression-group__container-condition--background-and)}.snk-expression-group__container-condition[data-condition=\"OR\"].sc-snk-expression-group{background-color:var(--snk-expression-group__container-condition--background-or)}.snk-expression-group__container-expression.sc-snk-expression-group{padding-left:var(--snk-expression-group__container-expression--padding-left)}.dashes.sc-snk-expression-group{z-index:var(--visible, 1);background:var(--snk-expression-group__background-color-dashed);border-left:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:58px;margin-left:-15px;margin-top:-36.5px}.horizontal-dashes.sc-snk-expression-group{z-index:var(--more-visible, 2);border-bottom:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:54px;margin-left:-15px;margin-top:-33.5px}.hidden.sc-snk-expression-group{display:none}";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
|
+
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-eccb267a.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
9
9
|
require('./index-62760a9c.js');
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index$1 = require('./index-
|
|
5
|
+
const index$1 = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
|
|
8
8
|
const ConfigStorage = require('./ConfigStorage-a4e1e518.js');
|
|
9
|
-
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-
|
|
9
|
+
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-eccb267a.js');
|
|
10
10
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
11
11
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
12
12
|
const index = require('./index-62760a9c.js');
|
|
@@ -541,27 +541,35 @@ const SnkFilterBar = class {
|
|
|
541
541
|
}
|
|
542
542
|
normalizeItem(item) {
|
|
543
543
|
const normalized = Object.assign({}, item);
|
|
544
|
+
const isPersonalizedFilter = item.type === filterItemType_enum.FilterItemType.PERSONALIZED;
|
|
545
|
+
const hasNormalizedGroupedItems = (normalized.value === undefined && normalized.groupedItems);
|
|
546
|
+
if (isPersonalizedFilter && hasNormalizedGroupedItems) {
|
|
547
|
+
normalized.value = normalized.groupedItems.filter(groupItem => !!groupItem.visible).length;
|
|
548
|
+
}
|
|
544
549
|
const optionals = ["props", "value", "hardFixed", "fixed"];
|
|
545
550
|
optionals.forEach(prop => {
|
|
551
|
+
if (prop === "value" && isPersonalizedFilter) {
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
546
554
|
if (normalized[prop] == undefined) {
|
|
547
555
|
delete normalized[prop];
|
|
548
556
|
}
|
|
549
557
|
});
|
|
550
|
-
if (
|
|
551
|
-
delete
|
|
558
|
+
if (normalized.value === "" && !isPersonalizedFilter) {
|
|
559
|
+
delete normalized.value;
|
|
552
560
|
}
|
|
553
561
|
return normalized;
|
|
554
562
|
}
|
|
555
563
|
updateFilter(newItem) {
|
|
564
|
+
const normalizedNewItem = this.normalizeItem(newItem);
|
|
556
565
|
let config = this.filterConfig.map(item => {
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
return newItem;
|
|
566
|
+
if (item.id !== normalizedNewItem.id) {
|
|
567
|
+
return item;
|
|
568
|
+
}
|
|
569
|
+
if (core.ObjectUtils.objectToString(item) == core.ObjectUtils.objectToString(normalizedNewItem)) {
|
|
570
|
+
this.calculateUpdateSequence(normalizedNewItem);
|
|
563
571
|
}
|
|
564
|
-
return
|
|
572
|
+
return normalizedNewItem;
|
|
565
573
|
}).sort((a, b) => this._filtersComparator(a, b));
|
|
566
574
|
if (this.filterCustomConfigInterceptor) {
|
|
567
575
|
config = this.filterCustomConfigInterceptor(config);
|
|
@@ -757,8 +765,10 @@ const SnkFilterItem = class {
|
|
|
757
765
|
/**
|
|
758
766
|
* Emitido quando o estado do filtro é alterado.
|
|
759
767
|
*/
|
|
760
|
-
filterChangeListener() {
|
|
768
|
+
filterChangeListener(event) {
|
|
761
769
|
this.hideDetail();
|
|
770
|
+
// Re-emite o evento para o pai (snk-filter-bar)
|
|
771
|
+
this.filterChange.emit(event.detail);
|
|
762
772
|
}
|
|
763
773
|
/**
|
|
764
774
|
* Exibe os detalhes de um item da lista.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
|
-
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-
|
|
8
|
+
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-eccb267a.js');
|
|
9
9
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
10
10
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
11
11
|
require('./index-62760a9c.js');
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const index$1 = require('./index-8d94b7e0.js');
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
|
9
9
|
const index$2 = require('./index-62760a9c.js');
|
|
10
|
-
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-
|
|
10
|
+
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-eccb267a.js');
|
|
11
11
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
12
12
|
|
|
13
13
|
const ICON_MODES = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const ConfigStorage = require('./ConfigStorage-a4e1e518.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
const filterNumberVariation = require('./filterNumberVariation-d65332da.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const SnkFormConfigManager = require('./SnkFormConfigManager-b8c81493.js');
|
|
8
8
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
require('./DataFetcher-0b6aa084.js');
|
|
10
10
|
require('./ISave-2c455a77.js');
|
|
11
|
-
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-
|
|
11
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-03b58f5a.js');
|
|
12
12
|
const index$1 = require('./index-e3e39724.js');
|
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -17,10 +17,10 @@ require('./filter-item-type.enum-a7ffdaa6.js');
|
|
|
17
17
|
require('./form-config-fetcher-5516d68a.js');
|
|
18
18
|
require('./constants-6d82e405.js');
|
|
19
19
|
const ConfigStorage = require('./ConfigStorage-a4e1e518.js');
|
|
20
|
-
const index$2 = require('./index-
|
|
20
|
+
const index$2 = require('./index-f0fe7e6e.js');
|
|
21
21
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
22
22
|
const filterValidate = require('./filter-validate-cb4ed41a.js');
|
|
23
|
-
const taskbarElements = require('./taskbar-elements-
|
|
23
|
+
const taskbarElements = require('./taskbar-elements-8a80420e.js');
|
|
24
24
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
|
25
25
|
require('./PrintUtils-bcaeb82f.js');
|
|
26
26
|
require('./IFetchDataExporterParams-e78ec415.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-1894343a.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
5
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
6
6
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
@@ -15,7 +15,7 @@ require('./filter-item-type.enum-a7ffdaa6.js');
|
|
|
15
15
|
require('./form-config-fetcher-5516d68a.js');
|
|
16
16
|
const constants = require('./constants-6d82e405.js');
|
|
17
17
|
const SnkFormConfigManager = require('./SnkFormConfigManager-b8c81493.js');
|
|
18
|
-
const taskbarElements = require('./taskbar-elements-
|
|
18
|
+
const taskbarElements = require('./taskbar-elements-8a80420e.js');
|
|
19
19
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
|
20
20
|
|
|
21
21
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-small:var(--space--2xs, 8px);--snk-guides-viewer__header--min-height:68px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-small);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-small));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-small))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
6
|
-
require('./index-
|
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-164c063e.js');
|
|
6
|
+
require('./index-1894343a.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
9
9
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
@@ -23,8 +23,8 @@ require('./form-config-fetcher-5516d68a.js');
|
|
|
23
23
|
require('./constants-6d82e405.js');
|
|
24
24
|
require('./SnkFormConfigManager-b8c81493.js');
|
|
25
25
|
require('./ConfigStorage-a4e1e518.js');
|
|
26
|
-
require('./taskbar-elements-
|
|
27
|
-
require('./index-
|
|
26
|
+
require('./taskbar-elements-8a80420e.js');
|
|
27
|
+
require('./index-f0fe7e6e.js');
|
|
28
28
|
require('./taskbar-processor-2fba34a8.js');
|
|
29
29
|
|
|
30
30
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-
|
|
7
|
+
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-eccb267a.js');
|
|
8
8
|
const ConfigStorage = require('./ConfigStorage-a4e1e518.js');
|
|
9
9
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
10
10
|
const index$1 = require('./index-62760a9c.js');
|
|
11
|
-
const index$2 = require('./index-
|
|
11
|
+
const index$2 = require('./index-f0fe7e6e.js');
|
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
13
13
|
require('./form-config-fetcher-5516d68a.js');
|
|
14
14
|
require('./DataFetcher-0b6aa084.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const ISave = require('./ISave-2c455a77.js');
|
|
8
8
|
require('./DataFetcher-0b6aa084.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const PrintUtils = require('./PrintUtils-bcaeb82f.js');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const core = require('@sankhyalabs/core');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
8
|
const snkSimpleBarCss = ".sc-snk-simple-bar-h{display:flex;height:100%;width:100%}.simple-bar__container.sc-snk-simple-bar{flex:1;display:flex;align-items:stretch;gap:var(--space--small)}.simple-bar__left-slot.sc-snk-simple-bar{min-width:280px;flex:1;display:flex;align-items:center}.simple-bar__right-slot.sc-snk-simple-bar{flex:1;display:flex;align-items:center;justify-content:flex-end}.simple-bar__column.sc-snk-simple-bar{flex:1;display:flex;flex-direction:column}";
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const constants = require('./constants-6d82e405.js');
|
|
9
|
-
const taskbarElements = require('./taskbar-elements-
|
|
9
|
+
const taskbarElements = require('./taskbar-elements-8a80420e.js');
|
|
10
10
|
require('./DataFetcher-0b6aa084.js');
|
|
11
11
|
require('./ISave-2c455a77.js');
|
|
12
|
-
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-
|
|
12
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-03b58f5a.js');
|
|
13
13
|
const index$1 = require('./index-e3e39724.js');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -19,7 +19,7 @@ const formConfigFetcher = require('./form-config-fetcher-5516d68a.js');
|
|
|
19
19
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
|
20
20
|
const ConfigStorage = require('./ConfigStorage-a4e1e518.js');
|
|
21
21
|
const SnkFormConfigManager = require('./SnkFormConfigManager-b8c81493.js');
|
|
22
|
-
const index$2 = require('./index-
|
|
22
|
+
const index$2 = require('./index-f0fe7e6e.js');
|
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
|
24
24
|
require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
25
25
|
require('./IFetchDataExporterParams-e78ec415.js');
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1894343a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const index$1 = require('./index-e3e39724.js');
|
|
8
8
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
9
|
-
const taskbarElements = require('./taskbar-elements-
|
|
10
|
-
require('./index-
|
|
9
|
+
const taskbarElements = require('./taskbar-elements-8a80420e.js');
|
|
10
|
+
require('./index-f0fe7e6e.js');
|
|
11
11
|
|
|
12
12
|
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:wrap}.no-wrap.sc-snk-taskbar-h{flex-wrap:nowrap}.full-width.sc-snk-taskbar-h{width:100%}.align-right.sc-snk-taskbar-h{justify-content:flex-end}.overflowed.sc-snk-taskbar{display:none}";
|
|
13
13
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-1894343a.js');
|
|
4
4
|
const index$2 = require('./index-e3e39724.js');
|
|
5
|
-
const index$1 = require('./index-
|
|
5
|
+
const index$1 = require('./index-f0fe7e6e.js');
|
|
6
6
|
|
|
7
7
|
exports.TaskbarElement = void 0;
|
|
8
8
|
(function (TaskbarElement) {
|
|
@@ -887,12 +887,29 @@ export class SnkApplication {
|
|
|
887
887
|
* @async
|
|
888
888
|
*/
|
|
889
889
|
async executePreparedSearch(mode, argument, options) {
|
|
890
|
+
var _a;
|
|
890
891
|
const mdByName = {};
|
|
891
892
|
const { entity, criteria, searchOptions, useSearchPlus } = options;
|
|
892
893
|
if (useSearchPlus) {
|
|
893
894
|
return executePreparedSearchPlus(mode, argument, options, this, this.pesquisaFetcher);
|
|
894
895
|
}
|
|
895
|
-
if (mode === "
|
|
896
|
+
if (mode === "LOAD_DESCRIPTION") {
|
|
897
|
+
let result = await this.pesquisaFetcher.loadByCode(entity, argument, criteria, searchOptions);
|
|
898
|
+
result = ObjectUtils.stringToObject(result.json.$);
|
|
899
|
+
let descriptionField = result.descriptionField;
|
|
900
|
+
const option = (_a = result.data) === null || _a === void 0 ? void 0 : _a[0];
|
|
901
|
+
if (!option) {
|
|
902
|
+
return {
|
|
903
|
+
value: argument,
|
|
904
|
+
label: ""
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
return {
|
|
908
|
+
value: argument,
|
|
909
|
+
label: option[descriptionField]
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
else if (mode === "ADVANCED") {
|
|
896
913
|
return executeAdvancedModeSearch(argument, options, this, this.pesquisaFetcher);
|
|
897
914
|
}
|
|
898
915
|
return new Promise((resolve, reject) => {
|
|
@@ -16,6 +16,7 @@ export class SnkDataUnit {
|
|
|
16
16
|
this._metadataByRow = new Map();
|
|
17
17
|
this._rowMetadataCache = new Map();
|
|
18
18
|
this._formFieldsConfig = [];
|
|
19
|
+
this._internalDataStateChange = false;
|
|
19
20
|
this.REGEX_DATAUNIT_NAME = /dd:\/\/(.+?)\//;
|
|
20
21
|
this._dataUnitObserver = async (action) => {
|
|
21
22
|
const duState = await this.buildDataState(action.type);
|
|
@@ -272,11 +273,17 @@ export class SnkDataUnit {
|
|
|
272
273
|
if (this.isAllowed("UPDATE") || this.dataUnit.isNewRecord(recordId)) {
|
|
273
274
|
return action;
|
|
274
275
|
}
|
|
276
|
+
if (this._internalDataStateChange) {
|
|
277
|
+
this._internalDataStateChange = false;
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
275
280
|
if (this._openedAlert) {
|
|
281
|
+
this._internalDataStateChange = true;
|
|
276
282
|
await this.dataUnit.cancelEdition();
|
|
277
283
|
return;
|
|
278
284
|
}
|
|
279
285
|
this._openedAlert = true;
|
|
286
|
+
this._internalDataStateChange = true;
|
|
280
287
|
await this.dataUnit.cancelEdition();
|
|
281
288
|
await ApplicationUtils.alert(this.getMessage("snkDataUnit.forbidden"), this.getMessage("snkDataUnit.forbiddenUpdate"));
|
|
282
289
|
this._openedAlert = false;
|
|
@@ -16,8 +16,10 @@ export class SnkFilterItem {
|
|
|
16
16
|
/**
|
|
17
17
|
* Emitido quando o estado do filtro é alterado.
|
|
18
18
|
*/
|
|
19
|
-
filterChangeListener() {
|
|
19
|
+
filterChangeListener(event) {
|
|
20
20
|
this.hideDetail();
|
|
21
|
+
// Re-emite o evento para o pai (snk-filter-bar)
|
|
22
|
+
this.filterChange.emit(event.detail);
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Exibe os detalhes de um item da lista.
|
|
@@ -331,27 +331,35 @@ export class SnkFilterBar {
|
|
|
331
331
|
}
|
|
332
332
|
normalizeItem(item) {
|
|
333
333
|
const normalized = Object.assign({}, item);
|
|
334
|
+
const isPersonalizedFilter = item.type === FilterItemType.PERSONALIZED;
|
|
335
|
+
const hasNormalizedGroupedItems = (normalized.value === undefined && normalized.groupedItems);
|
|
336
|
+
if (isPersonalizedFilter && hasNormalizedGroupedItems) {
|
|
337
|
+
normalized.value = normalized.groupedItems.filter(groupItem => !!groupItem.visible).length;
|
|
338
|
+
}
|
|
334
339
|
const optionals = ["props", "value", "hardFixed", "fixed"];
|
|
335
340
|
optionals.forEach(prop => {
|
|
341
|
+
if (prop === "value" && isPersonalizedFilter) {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
336
344
|
if (normalized[prop] == undefined) {
|
|
337
345
|
delete normalized[prop];
|
|
338
346
|
}
|
|
339
347
|
});
|
|
340
|
-
if (
|
|
341
|
-
delete
|
|
348
|
+
if (normalized.value === "" && !isPersonalizedFilter) {
|
|
349
|
+
delete normalized.value;
|
|
342
350
|
}
|
|
343
351
|
return normalized;
|
|
344
352
|
}
|
|
345
353
|
updateFilter(newItem) {
|
|
354
|
+
const normalizedNewItem = this.normalizeItem(newItem);
|
|
346
355
|
let config = this.filterConfig.map(item => {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
return newItem;
|
|
356
|
+
if (item.id !== normalizedNewItem.id) {
|
|
357
|
+
return item;
|
|
358
|
+
}
|
|
359
|
+
if (ObjectUtils.objectToString(item) == ObjectUtils.objectToString(normalizedNewItem)) {
|
|
360
|
+
this.calculateUpdateSequence(normalizedNewItem);
|
|
353
361
|
}
|
|
354
|
-
return
|
|
362
|
+
return normalizedNewItem;
|
|
355
363
|
}).sort((a, b) => this._filtersComparator(a, b));
|
|
356
364
|
if (this.filterCustomConfigInterceptor) {
|
|
357
365
|
config = this.filterCustomConfigInterceptor(config);
|
|
@@ -75,6 +75,9 @@ export class PersonalizedFilterUtils {
|
|
|
75
75
|
}
|
|
76
76
|
else if (DataType.DATE == type) {
|
|
77
77
|
value = this.convertDataValue(value);
|
|
78
|
+
if (value === undefined) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
78
81
|
}
|
|
79
82
|
else if (DataType.BOOLEAN == type) {
|
|
80
83
|
value = value ? "S" : "N";
|
|
@@ -100,9 +103,19 @@ export class PersonalizedFilterUtils {
|
|
|
100
103
|
return `?:{entidade=${expressionItem.entityName || ""};campo=${expressionItem.fieldName || ""}}`;
|
|
101
104
|
}
|
|
102
105
|
static convertDataValue(value) {
|
|
106
|
+
if (value == null || value === '' || value === undefined) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
103
109
|
if (typeof value == 'string') {
|
|
110
|
+
const trimmedValue = value.trim();
|
|
111
|
+
if (trimmedValue === '' || trimmedValue === '/' || trimmedValue === ' / /') {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
104
114
|
value = new Date(value);
|
|
105
115
|
}
|
|
116
|
+
if (value instanceof Date && isNaN(value.getTime())) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
106
119
|
return DateUtils.formatDate(value);
|
|
107
120
|
}
|
|
108
121
|
/*
|
|
@@ -123,6 +123,9 @@ class PersonalizedFilterUtils {
|
|
|
123
123
|
}
|
|
124
124
|
else if (DataType.DATE == type) {
|
|
125
125
|
value = this.convertDataValue(value);
|
|
126
|
+
if (value === undefined) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
126
129
|
}
|
|
127
130
|
else if (DataType.BOOLEAN == type) {
|
|
128
131
|
value = value ? "S" : "N";
|
|
@@ -148,9 +151,19 @@ class PersonalizedFilterUtils {
|
|
|
148
151
|
return `?:{entidade=${expressionItem.entityName || ""};campo=${expressionItem.fieldName || ""}}`;
|
|
149
152
|
}
|
|
150
153
|
static convertDataValue(value) {
|
|
154
|
+
if (value == null || value === '' || value === undefined) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
151
157
|
if (typeof value == 'string') {
|
|
158
|
+
const trimmedValue = value.trim();
|
|
159
|
+
if (trimmedValue === '' || trimmedValue === '/' || trimmedValue === ' / /') {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
152
162
|
value = new Date(value);
|
|
153
163
|
}
|
|
164
|
+
if (value instanceof Date && isNaN(value.getTime())) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
154
167
|
return DateUtils.formatDate(value);
|
|
155
168
|
}
|
|
156
169
|
/*
|