@sankhyalabs/sankhyablocks 10.1.0-dev.1 → 10.1.0-dev.10
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/{ConfigStorage-5a73e979.js → ConfigStorage-5c0590b3.js} +2 -2
- package/dist/cjs/{DataFetcher-eeb3b0b7.js → DataFetcher-5181a917.js} +23 -2
- package/dist/cjs/{FormConfigHelper-ebb77625.js → FormConfigHelper-28fe4668.js} +44 -0
- package/dist/cjs/{ISave-861e9d6d.js → ISave-0f98a457.js} +4 -4
- package/dist/cjs/{SnkFormConfigManager-8d4fded8.js → SnkFormConfigManager-1907ffed.js} +7 -7
- package/dist/cjs/{SnkMultiSelectionListDataSource-3b93f6a6.js → SnkMultiSelectionListDataSource-e4e38139.js} +4 -4
- package/dist/cjs/{auth-fetcher-8d8acd69.js → auth-fetcher-cff55b1f.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-1cea0695.js → dataunit-fetcher-1ba5e2cc.js} +1 -1
- package/dist/cjs/field-config_2.cjs.entry.js +1 -1
- package/dist/cjs/fields-layout.cjs.entry.js +6 -3
- package/dist/cjs/fields-selector.cjs.entry.js +1 -1
- package/dist/cjs/{form-config-fetcher-f347f884.js → form-config-fetcher-4a679e23.js} +1 -1
- package/dist/cjs/guides-configurator.cjs.entry.js +5 -3
- package/dist/cjs/index-1cf293c1.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +14 -7
- package/dist/cjs/snk-application.cjs.entry.js +81 -69
- package/dist/cjs/snk-attach.cjs.entry.js +5 -5
- package/dist/cjs/snk-crud.cjs.entry.js +97 -6
- package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +40 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-de248308.js → snk-data-unit-061487a8.js} +4 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-view.cjs.entry.js +2 -6
- package/dist/cjs/snk-form_2.cjs.entry.js +32 -9
- package/dist/cjs/snk-grid.cjs.entry.js +13 -10
- package/dist/cjs/{snk-guides-viewer-4ec3e7e1.js → snk-guides-viewer-2efe60a7.js} +84 -38
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +16 -5
- package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
- package/dist/cjs/snk-taskbar.cjs.entry.js +64 -48
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.js +27 -0
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +5 -25
- package/dist/collection/components/snk-application/snk-application.js +87 -44
- package/dist/collection/components/snk-attach/snk-attach.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +151 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +2 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +133 -34
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.css +3 -0
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.js +95 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +2 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +1 -1
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +42 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -6
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +6 -3
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -3
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +5 -3
- package/dist/collection/components/snk-form-config/snk-form-config.js +53 -6
- package/dist/collection/components/snk-grid/snk-grid.css +14 -0
- package/dist/collection/components/snk-grid/snk-grid.js +26 -4
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +9 -2
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +5 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +43 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +1 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +87 -48
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +7 -0
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +7 -0
- package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +8 -1
- package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +1 -1
- package/dist/components/DataFetcher.js +23 -2
- package/dist/components/ISave.js +3 -3
- package/dist/components/SnkFormConfigManager.js +6 -6
- package/dist/components/field-config2.js +43 -1
- package/dist/components/fields-layout2.js +6 -3
- package/dist/components/guides-configurator2.js +5 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-application2.js +76 -63
- package/dist/components/snk-attach2.js +1 -1
- package/dist/components/snk-crud.js +96 -1
- package/dist/components/snk-custom-slot-guide.d.ts +11 -0
- package/dist/components/snk-custom-slot-guide.js +55 -0
- package/dist/components/snk-data-unit2.js +2 -0
- package/dist/components/snk-detail-view2.js +81 -34
- package/dist/components/snk-filter-number.js +1 -1
- package/dist/components/snk-form-config2.js +29 -5
- package/dist/components/snk-form-view2.js +2 -6
- package/dist/components/snk-grid2.js +9 -4
- package/dist/components/snk-layout-form-config2.js +9 -2
- package/dist/components/snk-pesquisa2.js +14 -2
- package/dist/components/snk-simple-crud2.js +1 -1
- package/dist/components/snk-taskbar2.js +66 -49
- package/dist/esm/{ConfigStorage-568dc227.js → ConfigStorage-bd096633.js} +2 -2
- package/dist/esm/{DataFetcher-743feb3b.js → DataFetcher-5780ad39.js} +23 -2
- package/dist/esm/{FormConfigHelper-4e42f0b6.js → FormConfigHelper-d09669f3.js} +43 -1
- package/dist/esm/{ISave-345481c1.js → ISave-8a22ec18.js} +4 -4
- package/dist/esm/{SnkFormConfigManager-d61df0c8.js → SnkFormConfigManager-437e98bb.js} +7 -7
- package/dist/esm/{SnkMultiSelectionListDataSource-ca8d7a09.js → SnkMultiSelectionListDataSource-42125ef4.js} +4 -4
- package/dist/esm/{auth-fetcher-c353127d.js → auth-fetcher-28b9d0db.js} +1 -1
- package/dist/esm/{dataunit-fetcher-7f2c61ca.js → dataunit-fetcher-c4251d80.js} +1 -1
- package/dist/esm/field-config_2.entry.js +1 -1
- package/dist/esm/fields-layout.entry.js +6 -3
- package/dist/esm/fields-selector.entry.js +1 -1
- package/dist/esm/{form-config-fetcher-898d2dd1.js → form-config-fetcher-d0536a71.js} +1 -1
- package/dist/esm/guides-configurator.entry.js +5 -3
- package/dist/esm/index-479e1293.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +4 -4
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_9.entry.js +14 -7
- package/dist/esm/snk-application.entry.js +81 -69
- package/dist/esm/snk-attach.entry.js +5 -5
- package/dist/esm/snk-crud.entry.js +97 -6
- package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-60b338c5.js → snk-data-unit-4a1ef77f.js} +4 -2
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +7 -7
- package/dist/esm/snk-filter-bar_4.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form-view.entry.js +2 -6
- package/dist/esm/snk-form_2.entry.js +32 -9
- package/dist/esm/snk-grid.entry.js +13 -10
- package/dist/esm/{snk-guides-viewer-339e10b3.js → snk-guides-viewer-c182d058.js} +84 -38
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +16 -5
- package/dist/esm/snk-simple-crud.entry.js +7 -7
- package/dist/esm/snk-taskbar.entry.js +65 -49
- package/dist/sankhyablocks/{p-e6b1c769.entry.js → p-01ca59fc.entry.js} +1 -1
- package/dist/sankhyablocks/p-028fb380.entry.js +11 -0
- package/dist/sankhyablocks/{p-1f8cb438.entry.js → p-03f02b12.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1788d191.js → p-0e4f8b86.js} +1 -1
- package/dist/sankhyablocks/p-1037ea7b.entry.js +1 -0
- package/dist/sankhyablocks/{p-6d241415.js → p-1b1373b6.js} +1 -1
- package/dist/sankhyablocks/{p-27005fac.entry.js → p-2e882241.entry.js} +1 -1
- package/dist/sankhyablocks/p-30a58e29.entry.js +1 -0
- package/dist/sankhyablocks/{p-9f2cdaab.entry.js → p-35974f5f.entry.js} +1 -1
- package/dist/sankhyablocks/p-3b167a03.entry.js +1 -0
- package/dist/sankhyablocks/{p-e8c49c12.js → p-3c046287.js} +2 -2
- package/dist/sankhyablocks/{p-bd203e8d.entry.js → p-42272de8.entry.js} +1 -1
- package/dist/sankhyablocks/{p-11346b8d.entry.js → p-4c2e2767.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7fc46290.js → p-4db9dbf8.js} +1 -1
- package/dist/sankhyablocks/{p-626b7a17.js → p-55d7abe7.js} +1 -1
- package/dist/sankhyablocks/p-5d408e7e.entry.js +1 -0
- package/dist/sankhyablocks/{p-9b6d4950.entry.js → p-6e5af618.entry.js} +1 -1
- package/dist/sankhyablocks/{p-144da1d1.entry.js → p-78d4b3e3.entry.js} +1 -1
- package/dist/sankhyablocks/p-8b4d6719.js +1 -0
- package/dist/sankhyablocks/{p-e64958ba.entry.js → p-903fa0b4.entry.js} +1 -1
- package/dist/sankhyablocks/p-987cd79d.entry.js +1 -0
- package/dist/sankhyablocks/{p-88ed2793.js → p-9ab6ae1e.js} +2 -2
- package/dist/sankhyablocks/{p-c90f337a.entry.js → p-9f16d33e.entry.js} +1 -1
- package/dist/sankhyablocks/p-a1d23fef.js +1 -0
- package/dist/sankhyablocks/{p-bb0de89c.entry.js → p-a64ffe30.entry.js} +1 -1
- package/dist/sankhyablocks/p-aca74b21.js +1 -0
- package/dist/sankhyablocks/p-b7e891cc.entry.js +1 -0
- package/dist/sankhyablocks/{p-1d585081.js → p-b9699067.js} +1 -1
- package/dist/sankhyablocks/p-c98c79c3.entry.js +1 -0
- package/dist/sankhyablocks/p-d2ec9a24.entry.js +1 -0
- package/dist/sankhyablocks/{p-59b8f277.js → p-d3534985.js} +1 -1
- package/dist/sankhyablocks/{p-7b3ca294.entry.js → p-f3027bc9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f8f29e1a.entry.js → p-f35f2eb3.entry.js} +1 -1
- package/dist/sankhyablocks/p-fd05e31d.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.d.ts +5 -0
- package/dist/types/components/snk-application/snk-application.d.ts +9 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +22 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +23 -0
- package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +6 -1
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +1 -1
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +9 -2
- package/dist/types/components/snk-grid/snk-grid.d.ts +5 -0
- package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +2 -2
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +8 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +12 -4
- package/dist/types/components.d.ts +105 -0
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/sankhyablocks/p-0cf9aa38.js +0 -1
- package/dist/sankhyablocks/p-1649f51e.entry.js +0 -1
- package/dist/sankhyablocks/p-2c86cfab.entry.js +0 -1
- package/dist/sankhyablocks/p-4759912d.entry.js +0 -1
- package/dist/sankhyablocks/p-56948f00.entry.js +0 -11
- package/dist/sankhyablocks/p-8f73da95.js +0 -1
- package/dist/sankhyablocks/p-95c71f5e.entry.js +0 -1
- package/dist/sankhyablocks/p-9fe91526.js +0 -1
- package/dist/sankhyablocks/p-a5108625.entry.js +0 -1
- package/dist/sankhyablocks/p-aae4258d.entry.js +0 -1
- package/dist/sankhyablocks/p-af9d79e0.entry.js +0 -1
- package/dist/sankhyablocks/p-f25c50f7.entry.js +0 -1
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-2efe60a7.js');
|
|
6
6
|
require('./index-1cf293c1.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
9
9
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
10
10
|
require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
11
|
-
require('./DataFetcher-
|
|
11
|
+
require('./DataFetcher-5181a917.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./ISave-
|
|
14
|
+
require('./ISave-0f98a457.js');
|
|
15
15
|
require('./index-e3e39724.js');
|
|
16
16
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
17
|
-
require('./dataunit-fetcher-
|
|
17
|
+
require('./dataunit-fetcher-1ba5e2cc.js');
|
|
18
18
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
19
19
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
20
20
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
21
21
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
22
|
-
require('./form-config-fetcher-
|
|
22
|
+
require('./form-config-fetcher-4a679e23.js');
|
|
23
23
|
require('./constants-6d82e405.js');
|
|
24
|
-
require('./SnkFormConfigManager-
|
|
25
|
-
require('./ConfigStorage-
|
|
24
|
+
require('./SnkFormConfigManager-1907ffed.js');
|
|
25
|
+
require('./ConfigStorage-5c0590b3.js');
|
|
26
26
|
require('./taskbar-elements-fb5d1e08.js');
|
|
27
27
|
require('./index-13d05f03.js');
|
|
28
28
|
require('./taskbar-processor-2fba34a8.js');
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-7259cf65.js');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-5c0590b3.js');
|
|
9
9
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
10
10
|
const index$1 = require('./index-62760a9c.js');
|
|
11
11
|
const index$2 = require('./index-13d05f03.js');
|
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
13
|
-
require('./form-config-fetcher-
|
|
14
|
-
require('./DataFetcher-
|
|
13
|
+
require('./form-config-fetcher-4a679e23.js');
|
|
14
|
+
require('./DataFetcher-5181a917.js');
|
|
15
15
|
require('./PrintUtils-bcaeb82f.js');
|
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
17
17
|
|
|
@@ -4,21 +4,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const ISave = require('./ISave-
|
|
8
|
-
require('./DataFetcher-
|
|
7
|
+
const ISave = require('./ISave-0f98a457.js');
|
|
8
|
+
require('./DataFetcher-5181a917.js');
|
|
9
9
|
require('./index-e3e39724.js');
|
|
10
10
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
11
11
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
12
|
-
require('./dataunit-fetcher-
|
|
12
|
+
require('./dataunit-fetcher-1ba5e2cc.js');
|
|
13
13
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
14
|
-
require('./form-config-fetcher-
|
|
14
|
+
require('./form-config-fetcher-4a679e23.js');
|
|
15
15
|
require('./constants-6d82e405.js');
|
|
16
16
|
require('./PrintUtils-bcaeb82f.js');
|
|
17
17
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
18
18
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
19
19
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
20
20
|
|
|
21
|
-
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--small, 6px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right);height:
|
|
21
|
+
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--small, 6px);--snk-pesquisa__scrollable-content--height:calc(100vh - 300px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right);height:var(--snk-pesquisa__scrollable-content--height)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records-label.sc-snk-pesquisa{display:flex;flex-direction:row;justify-content:space-between;font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__records-label.hidden.sc-snk-pesquisa{display:none}.snk-pesquisa__records.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color)}.snk-pesquisa__records-limit.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color-secondary)}.snk-pesquisa__records-limit.hidden.sc-snk-pesquisa,.snk-pesquisa__records.hidden.sc-snk-pesquisa{visibility:hidden}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}.snk-pesquisa__cards-container.sc-snk-pesquisa{height:100%;overflow-y:auto}";
|
|
22
22
|
|
|
23
23
|
const SnkPesquisa = class {
|
|
24
24
|
constructor(hostRef) {
|
|
@@ -52,6 +52,17 @@ const SnkPesquisa = class {
|
|
|
52
52
|
this._textInput.value = this.argument;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
/** * Executa uma pesquisa programaticamente.
|
|
56
|
+
* Útil para cenários onde a pesquisa precisa ser disparada sem interação do usuário.
|
|
57
|
+
*
|
|
58
|
+
* @param text Texto utilizado como argumento de pesquisa.
|
|
59
|
+
* @example
|
|
60
|
+
* await pesquisaRef.executeSearch("Texto para pesquisa");
|
|
61
|
+
*/
|
|
62
|
+
async executeSearch(text) {
|
|
63
|
+
this.argument = text;
|
|
64
|
+
this.onChangeValue({ detail: text });
|
|
65
|
+
}
|
|
55
66
|
clearSearch() {
|
|
56
67
|
this.argument = "";
|
|
57
68
|
this._itemList = undefined;
|
|
@@ -7,18 +7,18 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const constants = require('./constants-6d82e405.js');
|
|
9
9
|
const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
|
|
10
|
-
require('./DataFetcher-
|
|
11
|
-
require('./ISave-
|
|
12
|
-
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-
|
|
10
|
+
require('./DataFetcher-5181a917.js');
|
|
11
|
+
require('./ISave-0f98a457.js');
|
|
12
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-e4e38139.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');
|
|
16
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
16
|
+
const dataunitFetcher = require('./dataunit-fetcher-1ba5e2cc.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
18
|
+
const formConfigFetcher = require('./form-config-fetcher-4a679e23.js');
|
|
19
19
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
|
20
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
21
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
20
|
+
const ConfigStorage = require('./ConfigStorage-5c0590b3.js');
|
|
21
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-1907ffed.js');
|
|
22
22
|
const index$2 = require('./index-13d05f03.js');
|
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
|
24
24
|
require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
+
const index$1 = require('./index-e3e39724.js');
|
|
7
8
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
8
9
|
const taskbarElements = require('./taskbar-elements-fb5d1e08.js');
|
|
9
|
-
const index$1 = require('./index-e3e39724.js');
|
|
10
10
|
require('./index-13d05f03.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}";
|
|
@@ -19,9 +19,11 @@ const SnkTaskbar = class {
|
|
|
19
19
|
this.taskbarSaveUnlocker = index.createEvent(this, "taskbarSaveUnlocker", 7);
|
|
20
20
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
|
21
21
|
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
|
22
|
-
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
|
23
22
|
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
|
24
23
|
this.TASKBAR_CUSTOM_ELEMENTS = 'taskbar-custom-elements-container';
|
|
24
|
+
this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME = 'taskbar-additional-slot-container';
|
|
25
|
+
this.TASKBAR_ADDITIONAL_SLOT = 'taskbar-additional-slot-container';
|
|
26
|
+
this._dataUnitInitialized = false;
|
|
25
27
|
this._titleKeyByElement = {
|
|
26
28
|
[taskbarElements.TaskbarElement.UPDATE_MULTIPLE]: "snkTaskbar.titleUpdateMultiple",
|
|
27
29
|
[taskbarElements.TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
|
@@ -64,6 +66,7 @@ const SnkTaskbar = class {
|
|
|
64
66
|
this._isWaitingForSave = false;
|
|
65
67
|
this.alignRigth = false;
|
|
66
68
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
|
69
|
+
this.additionalSlotId = "TASKBAR_ADDITIONAL_SLOT";
|
|
67
70
|
this.customContainerId = undefined;
|
|
68
71
|
this.overflowStrategy = 'hiddenItems';
|
|
69
72
|
this.configName = undefined;
|
|
@@ -119,6 +122,17 @@ const SnkTaskbar = class {
|
|
|
119
122
|
this.taskbarSaveUnlocker.emit();
|
|
120
123
|
}
|
|
121
124
|
}
|
|
125
|
+
observeDataUnit(newValue) {
|
|
126
|
+
this.initializeDataUnit(newValue);
|
|
127
|
+
}
|
|
128
|
+
initializeDataUnit(dataUnit) {
|
|
129
|
+
if (!!dataUnit && !this._dataUnitInitialized) {
|
|
130
|
+
this._dataUnitInitialized = true;
|
|
131
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
132
|
+
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
133
|
+
this.dataUnit.subscribe(this.onSaveEvent);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
122
136
|
// Internal methods
|
|
123
137
|
elementsFromString(strButtons) {
|
|
124
138
|
const elements = [];
|
|
@@ -164,45 +178,46 @@ const SnkTaskbar = class {
|
|
|
164
178
|
}
|
|
165
179
|
elementClick(elem) {
|
|
166
180
|
core.LockManager.whenResolve(this._element, core.LockManagerOperation.TASKBAR_CLICK).then(() => {
|
|
167
|
-
if (this.dataUnit) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
181
|
+
if (!this.dataUnit) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
switch (elem) {
|
|
185
|
+
case taskbarElements.TaskbarElement.PREVIOUS:
|
|
186
|
+
this.dataUnit.previousRecord();
|
|
187
|
+
break;
|
|
188
|
+
case taskbarElements.TaskbarElement.NEXT:
|
|
189
|
+
this.dataUnit.nextRecord();
|
|
190
|
+
break;
|
|
191
|
+
case taskbarElements.TaskbarElement.REFRESH:
|
|
192
|
+
this.dataUnit.loadData();
|
|
193
|
+
break;
|
|
194
|
+
case taskbarElements.TaskbarElement.CLONE:
|
|
195
|
+
this.dataUnit.copySelected();
|
|
196
|
+
break;
|
|
197
|
+
case taskbarElements.TaskbarElement.REMOVE:
|
|
198
|
+
this.dataUnit.removeSelectedRecords();
|
|
199
|
+
break;
|
|
200
|
+
case taskbarElements.TaskbarElement.INSERT:
|
|
201
|
+
this.dataUnit.addRecord();
|
|
202
|
+
break;
|
|
203
|
+
case taskbarElements.TaskbarElement.CANCEL:
|
|
204
|
+
this.dataUnit.cancelEdition();
|
|
205
|
+
break;
|
|
206
|
+
case taskbarElements.TaskbarElement.SAVE:
|
|
207
|
+
if (!this._isWaitingForSave) {
|
|
208
|
+
this._isWaitingForSave = true;
|
|
209
|
+
this.dataUnit.saveData().catch((err) => {
|
|
210
|
+
if (err instanceof core.SilentException) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
throw err;
|
|
215
|
+
}
|
|
216
|
+
}).finally(() => {
|
|
217
|
+
this._isWaitingForSave = false;
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
break;
|
|
206
221
|
}
|
|
207
222
|
if (this.isEnabled(elem))
|
|
208
223
|
this.actionClick.emit(elem);
|
|
@@ -384,7 +399,8 @@ const SnkTaskbar = class {
|
|
|
384
399
|
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
|
385
400
|
}
|
|
386
401
|
hasToIgnoreOverFlow(element) {
|
|
387
|
-
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME)
|
|
402
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME) ||
|
|
403
|
+
element.classList.contains(this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME);
|
|
388
404
|
}
|
|
389
405
|
handleOverFlowStrategy() {
|
|
390
406
|
if (this.overflowStrategy === 'hiddenItems') {
|
|
@@ -400,10 +416,8 @@ const SnkTaskbar = class {
|
|
|
400
416
|
};
|
|
401
417
|
}
|
|
402
418
|
componentDidLoad() {
|
|
403
|
-
|
|
404
|
-
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
419
|
+
this.initializeDataUnit(this.dataUnit);
|
|
405
420
|
this.handleOverFlowStrategy();
|
|
406
|
-
this.dataUnit.subscribe(this.onSaveEvent);
|
|
407
421
|
}
|
|
408
422
|
componentDidRender() {
|
|
409
423
|
this.appendCustomElementsInTaskbar();
|
|
@@ -430,7 +444,7 @@ const SnkTaskbar = class {
|
|
|
430
444
|
this._slotContainer.appendChild(customElement);
|
|
431
445
|
}
|
|
432
446
|
render() {
|
|
433
|
-
var _a;
|
|
447
|
+
var _a, _b;
|
|
434
448
|
if (this._definitions === undefined) {
|
|
435
449
|
return undefined;
|
|
436
450
|
}
|
|
@@ -450,7 +464,8 @@ const SnkTaskbar = class {
|
|
|
450
464
|
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
|
451
465
|
return index.h("slot", { name: elem });
|
|
452
466
|
})), index.h("div", { id: this.TASKBAR_CUSTOM_ELEMENTS, class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.customSlotId }), (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 :
|
|
453
|
-
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS))))
|
|
467
|
+
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS)), index.h("div", { id: this.TASKBAR_ADDITIONAL_SLOT, class: this.TASKBAR_ADDITIONAL_SLOT_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.additionalSlotId }), (_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 :
|
|
468
|
+
_b.addNotOverFlowElement(this.TASKBAR_ADDITIONAL_SLOT))));
|
|
454
469
|
}
|
|
455
470
|
getHostClasses() {
|
|
456
471
|
if (this.overflowStrategy !== 'hiddenItems')
|
|
@@ -462,7 +477,8 @@ const SnkTaskbar = class {
|
|
|
462
477
|
"buttons": ["observeButtons"],
|
|
463
478
|
"disabledButtons": ["observeDisabledButtons"],
|
|
464
479
|
"_lastWidth": ["observeLastWidth"],
|
|
465
|
-
"_isWaitingForSave": ["observeIsWaitingForSave"]
|
|
480
|
+
"_isWaitingForSave": ["observeIsWaitingForSave"],
|
|
481
|
+
"dataUnit": ["observeDataUnit"]
|
|
466
482
|
}; }
|
|
467
483
|
};
|
|
468
484
|
SnkTaskbar.style = snkTaskbarCss;
|
|
@@ -11,12 +11,13 @@
|
|
|
11
11
|
"./components/snk-actions-button/subcomponents/snk-client-confirm.js",
|
|
12
12
|
"./components/snk-attach/snk-attach.js",
|
|
13
13
|
"./components/snk-configurator/snk-configurator.js",
|
|
14
|
+
"./components/snk-crud/subcomponents/snk-guides-viewer.js",
|
|
14
15
|
"./components/snk-crud/snk-crud.js",
|
|
15
16
|
"./components/snk-crud/subcomponents/snk-form-summary.js",
|
|
16
17
|
"./components/snk-crud/subcomponents/snk-form-view.js",
|
|
17
|
-
"./components/snk-crud/subcomponents/snk-guides-viewer.js",
|
|
18
18
|
"./components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js",
|
|
19
19
|
"./components/snk-custom-slot-elements/snk-custom-slot-elements.js",
|
|
20
|
+
"./components/snk-custom-slot-guide/snk-custom-slot-guide.js",
|
|
20
21
|
"./components/snk-data-exporter/snk-data-exporter.js",
|
|
21
22
|
"./components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js",
|
|
22
23
|
"./components/snk-entity-list/snk-entity-list.js",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ElementIDUtils } from "@sankhyalabs/core";
|
|
2
|
+
const executeAdvancedModeSearch = async (argument, options, app, pesquisaFetcher) => {
|
|
3
|
+
const { entity, entityDescription, criteria, searchOptions, isHierarchyEntity, allowsNonAnalytic, executeOnOpen } = options;
|
|
4
|
+
return new Promise((accept, reject) => {
|
|
5
|
+
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
6
|
+
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
|
7
|
+
pesquisaContent.entityName = entity;
|
|
8
|
+
pesquisaContent.argument = argument;
|
|
9
|
+
pesquisaContent.searchLoader = (text) => pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
10
|
+
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
|
11
|
+
if (isHierarchyEntity) {
|
|
12
|
+
pesquisaContent.treeLoader = (text) => pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
|
13
|
+
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
|
14
|
+
}
|
|
15
|
+
pesquisaContent.selectItem = (option) => {
|
|
16
|
+
accept(option);
|
|
17
|
+
app.clearPopUpTitle();
|
|
18
|
+
app.closePopUp();
|
|
19
|
+
};
|
|
20
|
+
app.setPopUpTitle(entityDescription);
|
|
21
|
+
app.showPopUp(pesquisaContent, undefined, undefined, reject);
|
|
22
|
+
if (executeOnOpen) {
|
|
23
|
+
pesquisaContent.executeSearch(argument);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
export default executeAdvancedModeSearch;
|
package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js
CHANGED
|
@@ -1,32 +1,13 @@
|
|
|
1
|
-
import { ArrayUtils,
|
|
2
|
-
import
|
|
3
|
-
import { StringUtils } from "@sankhyalabs/core";
|
|
1
|
+
import { ArrayUtils, ObjectUtils, SearchUtils, StringUtils } from "@sankhyalabs/core";
|
|
2
|
+
import executeAdvancedModeSearch from "./exec-prepared-search-advaced-mode";
|
|
4
3
|
const QTD_DETAIL_FIELDS_PREDICTIVE_SEARCH = 6;
|
|
5
4
|
const INVALID_CONTENT_PATTERNS = ['<img', '<svg'];
|
|
6
5
|
const executePreparedSearchPlus = async (mode, argument, options, app, pesquisaFetcher) => {
|
|
7
6
|
var _a;
|
|
8
7
|
const mdByName = {};
|
|
9
|
-
const { entity,
|
|
8
|
+
const { entity, criteria, searchOptions } = options;
|
|
10
9
|
if (mode === "ADVANCED") {
|
|
11
|
-
return
|
|
12
|
-
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
13
|
-
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
|
14
|
-
pesquisaContent.entityName = entity;
|
|
15
|
-
pesquisaContent.argument = argument;
|
|
16
|
-
pesquisaContent.searchLoader = (text) => pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
17
|
-
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
|
18
|
-
if (isHierarchyEntity) {
|
|
19
|
-
pesquisaContent.treeLoader = (text) => pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
|
20
|
-
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
|
21
|
-
}
|
|
22
|
-
pesquisaContent.selectItem = (option) => {
|
|
23
|
-
accept(option);
|
|
24
|
-
app.clearPopUpTitle();
|
|
25
|
-
app.closePopUp();
|
|
26
|
-
};
|
|
27
|
-
app.setPopUpTitle(entityDescription);
|
|
28
|
-
app.showPopUp(pesquisaContent, undefined, undefined, reject);
|
|
29
|
-
});
|
|
10
|
+
return executeAdvancedModeSearch(argument, options, app, pesquisaFetcher);
|
|
30
11
|
}
|
|
31
12
|
else if (mode === "LOAD_DESCRIPTION") {
|
|
32
13
|
let result = await pesquisaFetcher.loadByCode(entity, argument, criteria, searchOptions);
|
|
@@ -63,14 +44,13 @@ const buildOptionItem = (argument, item, fields, descriptionField, pkField) => {
|
|
|
63
44
|
const matchFields = item['__matchFields'];
|
|
64
45
|
const descriptionValue = (_a = item[descriptionField]) !== null && _a !== void 0 ? _a : "";
|
|
65
46
|
const pkValue = item[pkField];
|
|
66
|
-
|
|
47
|
+
return {
|
|
67
48
|
value: pkValue,
|
|
68
49
|
label: descriptionValue,
|
|
69
50
|
presentationValue: StringUtils.highlightValue(argument, matchFields, pkValue, fields, true),
|
|
70
51
|
presentationLabel: descriptionField ? StringUtils.highlightValue(argument, matchFields, descriptionValue, fields, true) : "",
|
|
71
52
|
details: SearchUtils.buildDetails(argument, fields, item)
|
|
72
53
|
};
|
|
73
|
-
return searchOption;
|
|
74
54
|
};
|
|
75
55
|
const filterInvalidFields = (resp, item, mdByName) => {
|
|
76
56
|
let fieldsMetadata = resp.fieldsMetadata.filter((field) => {
|
|
@@ -20,6 +20,7 @@ import { TEMPLATES_SKELETON } from "../../lib/utils/constants";
|
|
|
20
20
|
import executePreparedSearchPlus from "./search-strategy/exec-prepared-search-plus";
|
|
21
21
|
import { LayoutFormConfig } from "../../lib/configs/LayoutFormConfig";
|
|
22
22
|
import { FormConfigFetcher } from "../../lib";
|
|
23
|
+
import executeAdvancedModeSearch from "./search-strategy/exec-prepared-search-advaced-mode";
|
|
23
24
|
/**
|
|
24
25
|
* É possível customizar as mensagens dos blocos de construção através de um pequeno modulo na estrutura da aplicação:
|
|
25
26
|
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
@@ -394,7 +395,7 @@ export class SnkApplication {
|
|
|
394
395
|
if (this._featureFlagsCache.get(featureName) && now < this._featureFlagsCache.get(featureName).expires) {
|
|
395
396
|
return Promise.resolve(this._featureFlagsCache.get(featureName).isActive);
|
|
396
397
|
}
|
|
397
|
-
//Caso ocorra um erro nessa chamada, o reject do error é feito automaticamente
|
|
398
|
+
//Caso ocorra um erro nessa chamada, o reject do error é feito automaticamente
|
|
398
399
|
const result = await DataFetcher.get().callServiceBroker("SystemUtilsSP.featureIsActive", JSON.stringify(payload));
|
|
399
400
|
const isActive = result.isActive;
|
|
400
401
|
this._featureFlagsCache.set(featureName, {
|
|
@@ -887,52 +888,57 @@ export class SnkApplication {
|
|
|
887
888
|
*/
|
|
888
889
|
async executePreparedSearch(mode, argument, options) {
|
|
889
890
|
const mdByName = {};
|
|
890
|
-
const { entity,
|
|
891
|
+
const { entity, criteria, searchOptions, useSearchPlus } = options;
|
|
891
892
|
if (useSearchPlus) {
|
|
892
893
|
return executePreparedSearchPlus(mode, argument, options, this, this.pesquisaFetcher);
|
|
893
894
|
}
|
|
894
895
|
if (mode === "ADVANCED") {
|
|
895
|
-
return
|
|
896
|
-
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
897
|
-
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
|
898
|
-
pesquisaContent.entityName = entity;
|
|
899
|
-
pesquisaContent.argument = argument;
|
|
900
|
-
pesquisaContent.searchLoader = (text) => this.pesquisaFetcher.loadAdvancedSearch(entity, text, criteria, searchOptions);
|
|
901
|
-
pesquisaContent.isHierarchyEntity = isHierarchyEntity;
|
|
902
|
-
if (isHierarchyEntity) {
|
|
903
|
-
pesquisaContent.treeLoader = (text) => this.pesquisaFetcher.loadTree(entity, text, criteria, searchOptions);
|
|
904
|
-
pesquisaContent.allowsNonAnalytic = allowsNonAnalytic;
|
|
905
|
-
}
|
|
906
|
-
pesquisaContent.selectItem = (option) => {
|
|
907
|
-
accept(option);
|
|
908
|
-
this.clearPopUpTitle();
|
|
909
|
-
this.closePopUp();
|
|
910
|
-
};
|
|
911
|
-
this.setPopUpTitle(entityDescription);
|
|
912
|
-
this.showPopUp(pesquisaContent, undefined, undefined, reject);
|
|
913
|
-
});
|
|
896
|
+
return executeAdvancedModeSearch(argument, options, this, this.pesquisaFetcher);
|
|
914
897
|
}
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
result.data.forEach((item) => {
|
|
924
|
-
let fieldsMetadata = this.filterInvalidFields(result, item, mdByName);
|
|
925
|
-
let qtyFields = 6;
|
|
926
|
-
let fields = this.filterMathFields(item['__matchFields'], fieldsMetadata, qtyFields, mdByName);
|
|
927
|
-
list.push(this.builOptionItem(argument, item, fields, descriptionField, pkField));
|
|
928
|
-
});
|
|
929
|
-
resolve(list);
|
|
930
|
-
})
|
|
931
|
-
.catch(error => {
|
|
932
|
-
reject(error);
|
|
933
|
-
});
|
|
898
|
+
return new Promise((resolve, reject) => {
|
|
899
|
+
this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
|
|
900
|
+
.then(result => {
|
|
901
|
+
result = ObjectUtils.stringToObject(result.json.$);
|
|
902
|
+
resolve(this.buildSearchResultList(result, mdByName, argument));
|
|
903
|
+
})
|
|
904
|
+
.catch(error => {
|
|
905
|
+
reject(error);
|
|
934
906
|
});
|
|
935
|
-
}
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* Obtém as opções em componentes de pesquisa além dos metadados como showMore e entityPk.
|
|
911
|
+
* @param {string} argument - O argumento da pesquisa.
|
|
912
|
+
* @param {any} options - Opções preparadas para a pesquisa.
|
|
913
|
+
* @returns {Promise<Array<IOption> | IOption>} Uma lista de opções ou uma única opção.
|
|
914
|
+
* @async
|
|
915
|
+
*/
|
|
916
|
+
async executePreparedSearchWithFullResponse(argument, options) {
|
|
917
|
+
const mdByName = {};
|
|
918
|
+
const { entity, criteria, searchOptions } = options;
|
|
919
|
+
return new Promise((resolve, reject) => {
|
|
920
|
+
this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
|
|
921
|
+
.then(result => {
|
|
922
|
+
result = ObjectUtils.stringToObject(result.json.$);
|
|
923
|
+
result.data = this.buildSearchResultList(result, mdByName, argument);
|
|
924
|
+
resolve(result);
|
|
925
|
+
})
|
|
926
|
+
.catch(error => {
|
|
927
|
+
reject(error);
|
|
928
|
+
});
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
buildSearchResultList(result, mdByName, argument) {
|
|
932
|
+
let descriptionField = result.descriptionField;
|
|
933
|
+
let pkField = result.pkField;
|
|
934
|
+
const list = [];
|
|
935
|
+
result.data.forEach((item) => {
|
|
936
|
+
let fieldsMetadata = this.filterInvalidFields(result, item, mdByName);
|
|
937
|
+
let qtyFields = 6;
|
|
938
|
+
let fields = this.filterMathFields(item['__matchFields'], fieldsMetadata, qtyFields, mdByName);
|
|
939
|
+
list.push(this.builOptionItem(argument, item, fields, descriptionField, pkField));
|
|
940
|
+
});
|
|
941
|
+
return list;
|
|
936
942
|
}
|
|
937
943
|
/**
|
|
938
944
|
* Obtém `true` caso a tela esteja em modo de debug.
|
|
@@ -3477,9 +3483,6 @@ export class SnkApplication {
|
|
|
3477
3483
|
},
|
|
3478
3484
|
"Array": {
|
|
3479
3485
|
"location": "global"
|
|
3480
|
-
},
|
|
3481
|
-
"HTMLSnkPesquisaElement": {
|
|
3482
|
-
"location": "global"
|
|
3483
3486
|
}
|
|
3484
3487
|
},
|
|
3485
3488
|
"return": "Promise<IOption | IOption[]>"
|
|
@@ -3504,6 +3507,46 @@ export class SnkApplication {
|
|
|
3504
3507
|
}]
|
|
3505
3508
|
}
|
|
3506
3509
|
},
|
|
3510
|
+
"executePreparedSearchWithFullResponse": {
|
|
3511
|
+
"complexType": {
|
|
3512
|
+
"signature": "(argument: string, options: any) => Promise<any>",
|
|
3513
|
+
"parameters": [{
|
|
3514
|
+
"tags": [{
|
|
3515
|
+
"name": "param",
|
|
3516
|
+
"text": "argument - O argumento da pesquisa."
|
|
3517
|
+
}],
|
|
3518
|
+
"text": "- O argumento da pesquisa."
|
|
3519
|
+
}, {
|
|
3520
|
+
"tags": [{
|
|
3521
|
+
"name": "param",
|
|
3522
|
+
"text": "options - Op\u00E7\u00F5es preparadas para a pesquisa."
|
|
3523
|
+
}],
|
|
3524
|
+
"text": "- Op\u00E7\u00F5es preparadas para a pesquisa."
|
|
3525
|
+
}],
|
|
3526
|
+
"references": {
|
|
3527
|
+
"Promise": {
|
|
3528
|
+
"location": "global"
|
|
3529
|
+
}
|
|
3530
|
+
},
|
|
3531
|
+
"return": "Promise<any>"
|
|
3532
|
+
},
|
|
3533
|
+
"docs": {
|
|
3534
|
+
"text": "Obt\u00E9m as op\u00E7\u00F5es em componentes de pesquisa al\u00E9m dos metadados como showMore e entityPk.",
|
|
3535
|
+
"tags": [{
|
|
3536
|
+
"name": "param",
|
|
3537
|
+
"text": "argument - O argumento da pesquisa."
|
|
3538
|
+
}, {
|
|
3539
|
+
"name": "param",
|
|
3540
|
+
"text": "options - Op\u00E7\u00F5es preparadas para a pesquisa."
|
|
3541
|
+
}, {
|
|
3542
|
+
"name": "returns",
|
|
3543
|
+
"text": "Uma lista de op\u00E7\u00F5es ou uma \u00FAnica op\u00E7\u00E3o."
|
|
3544
|
+
}, {
|
|
3545
|
+
"name": "async",
|
|
3546
|
+
"text": undefined
|
|
3547
|
+
}]
|
|
3548
|
+
}
|
|
3549
|
+
},
|
|
3507
3550
|
"isDebugMode": {
|
|
3508
3551
|
"complexType": {
|
|
3509
3552
|
"signature": "() => Promise<boolean>",
|