@sankhyalabs/sankhyablocks 8.15.0-rc.1 → 8.15.0-rc.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-302bbbd4.js → ConfigStorage-34be11ce.js} +70 -7
- package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-99f0f6ed.js} +5 -3
- package/dist/cjs/{SnkFormConfigManager-71c4768e.js → SnkFormConfigManager-6211fb28.js} +7 -2
- package/dist/cjs/{SnkMessageBuilder-e7dcf408.js → SnkMessageBuilder-141aa18d.js} +2 -1
- package/dist/cjs/SnkMultiSelectionListDataSource-5213120b.js +140 -0
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-5161d082.js} +1 -1
- package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-9f1a13ca.js} +1 -1
- package/dist/cjs/index-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-e4a7c4c3.js → pesquisa-fetcher-94f6b316.js} +235 -24
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +520 -5
- package/dist/cjs/snk-application.cjs.entry.js +34 -8
- package/dist/cjs/snk-attach.cjs.entry.js +7 -8
- package/dist/cjs/snk-crud.cjs.entry.js +16 -10
- package/dist/cjs/snk-data-exporter.cjs.entry.js +8 -4
- package/dist/cjs/{snk-data-unit-82c08a8c.js → snk-data-unit-6026a9f7.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +9 -10
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +36 -7
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-config.cjs.entry.js +47 -27
- package/dist/cjs/snk-form.cjs.entry.js +11 -4
- package/dist/cjs/snk-grid.cjs.entry.js +40 -22
- package/dist/cjs/{snk-guides-viewer-d32c096f.js → snk-guides-viewer-508bb6fe.js} +15 -9
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -8
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +214 -23
- package/dist/cjs/snk-taskbar.cjs.entry.js +100 -14
- package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-3ecd1278.js} +9 -9
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +51 -11
- package/dist/collection/components/snk-crud/snk-crud.js +95 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +27 -3
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +5 -1
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +23 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +116 -4
- package/dist/collection/components/snk-form/snk-form.js +25 -1
- package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +6 -1
- package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +50 -30
- package/dist/collection/components/snk-grid/snk-grid.js +103 -16
- package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
- package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
- package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +5 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +325 -17
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +1 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +9 -9
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +139 -13
- package/dist/collection/lib/configs/ConfigStorage.js +63 -3
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +5 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -11
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
- package/dist/collection/lib/utils/CrudUtils.js +13 -1
- package/dist/components/ConfigStorage.js +68 -5
- package/dist/components/DataFetcher.js +5 -3
- package/dist/components/SnkFormConfigManager.js +5 -0
- package/dist/components/SnkMessageBuilder.js +2 -1
- package/dist/components/dataunit-fetcher.js +4 -11
- package/dist/components/field-search.js +93 -3
- package/dist/components/index.d.ts +6 -6
- package/dist/components/snk-application2.js +30 -1
- package/dist/components/snk-attach2.js +54 -12
- package/dist/components/snk-crud.js +15 -3
- package/dist/components/snk-data-exporter2.js +5 -1
- package/dist/components/snk-detail-view2.js +40 -7
- package/dist/components/snk-entity-list.js +5 -3
- package/dist/components/snk-filter-bar2.js +38 -5
- package/dist/components/snk-form-config2.js +46 -26
- package/dist/components/snk-form.js +8 -0
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +41 -17
- package/dist/components/snk-personalized-filter-editor.js +3 -1
- package/dist/components/snk-simple-crud2.js +270 -28
- package/dist/components/snk-taskbar2.js +114 -24
- package/dist/components/taskbar-actions-button2.js +1 -1
- package/dist/esm/{ConfigStorage-4151acc8.js → ConfigStorage-101a2b4c.js} +70 -7
- package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-a650ae58.js} +5 -3
- package/dist/esm/{SnkFormConfigManager-5c7d3771.js → SnkFormConfigManager-d86ba46f.js} +7 -2
- package/dist/esm/{SnkMessageBuilder-0fb796b9.js → SnkMessageBuilder-9747ddd2.js} +2 -1
- package/dist/esm/SnkMultiSelectionListDataSource-7e7eada5.js +133 -0
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-17dc5b5e.js} +1 -1
- package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-f121f880.js} +1 -1
- package/dist/esm/index-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-fa0c2540.js → pesquisa-fetcher-f05a12ca.js} +226 -16
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +519 -6
- package/dist/esm/snk-application.entry.js +34 -8
- package/dist/esm/snk-attach.entry.js +6 -7
- package/dist/esm/snk-crud.entry.js +16 -10
- package/dist/esm/snk-data-exporter.entry.js +8 -4
- package/dist/esm/{snk-data-unit-5d201fb3.js → snk-data-unit-4c343635.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +9 -10
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +36 -7
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form-config.entry.js +48 -28
- package/dist/esm/snk-form.entry.js +11 -4
- package/dist/esm/snk-grid.entry.js +41 -23
- package/dist/esm/{snk-guides-viewer-f49613c6.js → snk-guides-viewer-18859840.js} +15 -9
- package/dist/esm/snk-guides-viewer.entry.js +7 -8
- package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-simple-crud.entry.js +215 -24
- package/dist/esm/snk-taskbar.entry.js +101 -15
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-2473c8ac.js} +9 -9
- package/dist/sankhyablocks/p-1f3174cb.entry.js +1 -0
- package/dist/sankhyablocks/p-1fa5a18c.entry.js +11 -0
- package/dist/sankhyablocks/p-20b46647.entry.js +1 -0
- package/dist/sankhyablocks/p-2897fb8c.js +1 -0
- package/dist/sankhyablocks/{p-05243555.js → p-2936303b.js} +1 -1
- package/dist/sankhyablocks/p-2b909f08.entry.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-50783a8b.js +1 -0
- package/dist/sankhyablocks/p-5c0b53ce.js +56 -0
- package/dist/sankhyablocks/p-5dbc1a3f.js +1 -0
- package/dist/sankhyablocks/p-60fa6c7a.js +1 -0
- package/dist/sankhyablocks/p-64c1b368.entry.js +1 -0
- package/dist/sankhyablocks/{p-7f3c7b09.entry.js → p-6b28cc74.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e0fd9555.entry.js → p-7ddd95b6.entry.js} +1 -1
- package/dist/sankhyablocks/p-7e05bd83.entry.js +1 -0
- package/dist/sankhyablocks/p-7f97fee2.entry.js +1 -0
- package/dist/sankhyablocks/{p-f3d1c48e.js → p-9a5d1b39.js} +1 -1
- package/dist/sankhyablocks/{p-0d7863ed.js → p-a13ccb86.js} +1 -1
- package/dist/sankhyablocks/p-ae4fc9a9.js +1 -0
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/p-b41a622a.entry.js +1 -0
- package/dist/sankhyablocks/p-b4de81ac.entry.js +1 -0
- package/dist/sankhyablocks/p-ba4871b5.entry.js +1 -0
- package/dist/sankhyablocks/{p-9695f78b.js → p-be75153c.js} +1 -1
- package/dist/sankhyablocks/p-d01ceda6.entry.js +1 -0
- package/dist/sankhyablocks/p-d304659d.entry.js +1 -0
- package/dist/sankhyablocks/p-d78d4062.js +65 -0
- package/dist/sankhyablocks/p-e4fb3308.entry.js +1 -0
- package/dist/sankhyablocks/p-e7dbe53a.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
- package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
- package/dist/types/components/snk-application/snk-application.d.ts +8 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +21 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +19 -1
- package/dist/types/components/snk-form/snk-form.d.ts +6 -1
- package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +1 -0
- package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +5 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +20 -1
- package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
- package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +61 -3
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +28 -1
- package/dist/types/components.d.ts +193 -12
- package/dist/types/lib/configs/ConfigStorage.d.ts +21 -1
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
- package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
- package/package.json +9 -2
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-02e3a45b.entry.js +0 -1
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-0ec5b2e5.js +0 -1
- package/dist/sankhyablocks/p-1d75d9f9.entry.js +0 -1
- package/dist/sankhyablocks/p-2582537c.entry.js +0 -1
- package/dist/sankhyablocks/p-282789a6.entry.js +0 -1
- package/dist/sankhyablocks/p-374d03f6.js +0 -1
- package/dist/sankhyablocks/p-3b0e4e08.js +0 -65
- package/dist/sankhyablocks/p-40915359.entry.js +0 -1
- package/dist/sankhyablocks/p-573a07c5.js +0 -1
- package/dist/sankhyablocks/p-62896624.entry.js +0 -1
- package/dist/sankhyablocks/p-69efa80d.entry.js +0 -1
- package/dist/sankhyablocks/p-761ed32f.entry.js +0 -1
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-9b5944a4.entry.js +0 -1
- package/dist/sankhyablocks/p-9bdbc7d8.entry.js +0 -1
- package/dist/sankhyablocks/p-aa95fb2c.js +0 -56
- package/dist/sankhyablocks/p-ac384baf.entry.js +0 -1
- package/dist/sankhyablocks/p-b05ab13d.entry.js +0 -1
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-c4874327.entry.js +0 -1
- package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
- package/dist/sankhyablocks/p-e6380c60.js +0 -1
- package/dist/sankhyablocks/p-e817f254.entry.js +0 -11
- /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
@@ -1,16 +1,19 @@
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-a7d3d3f1.js';
|
2
2
|
import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
3
|
-
import { D as DataFetcher } from './DataFetcher-
|
3
|
+
import { D as DataFetcher } from './DataFetcher-a650ae58.js';
|
4
4
|
import { P as ParamType } from './ParamType-d5152b06.js';
|
5
|
-
import './pesquisa-fetcher-
|
5
|
+
import './pesquisa-fetcher-f05a12ca.js';
|
6
6
|
import './index-0ece87a6.js';
|
7
7
|
import './ISave-d8c8bc59.js';
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './PreloadManager-c1c2f2b4.js';
|
11
10
|
import './filter-item-type.enum-d45e026f.js';
|
12
|
-
import './form-config-fetcher-
|
11
|
+
import './form-config-fetcher-f121f880.js';
|
13
12
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
13
|
+
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
14
|
+
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode';
|
15
|
+
import { C as ConfigStorage } from './ConfigStorage-101a2b4c.js';
|
16
|
+
import { O as ORDER_VALUES } from './constants-8457af36.js';
|
14
17
|
import './PrintUtils-3e4ff0f5.js';
|
15
18
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
16
19
|
|
@@ -712,6 +715,516 @@ const SnkActionsButton = class {
|
|
712
715
|
};
|
713
716
|
SnkActionsButton.style = snkActionsButtonCss;
|
714
717
|
|
718
|
+
const snkGridConfigCss = ".sc-snk-grid-config-h{--snk-grid-config__footer--padding-top:var(--space--medium, 12px);--snk-grid-config__main--padding-right:var(--space--medium, 12px);--snk-grid-config__tabselector-container--padding:var(--space--medium, 12px);--snk-grid-config__button-close--padding-left:var(--space--medium, 12px);--snk-grid-config__title--color:var(--title--primary, #2B3A54);--snk-grid-config__title--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__title--font-size:var(--title--large, 20px);--snk-grid-config__title--font-weight:var(--text-weight--extra-large, 700);--snk-grid-config__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__subtitle--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__group--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-weight:var(--text-weight--large, 600);--snk-grid-config__group--padding-bottom:var(--space-small, 6px);--snk-grid-config__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-grid-config__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-grid-config__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-grid-config__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-grid-config__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-grid-config__scrollbar--width:var(--space--medium, 12px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-snk-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-snk-grid-config{padding-right:var(--space--medium)}ez-list.sc-snk-grid-config{height:100%}.height-calc.sc-snk-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-snk-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--snk-grid-config__footer--padding-top)}.hidden.sc-snk-grid-config{display:none}.tabselector-container.sc-snk-grid-config{padding:var(--snk-grid-config__tabselector-container--padding) 0}.button-close.sc-snk-grid-config{padding-left:var(--snk-grid-config__button-close--padding-left)}.title-container.sc-snk-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.title.sc-snk-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-grid-config__title--color);font-size:var(--snk-grid-config__title--font-size);font-family:var(--snk-grid-config__title--font-family);font-weight:var(--snk-grid-config__title--font-weight)}.subtitle.sc-snk-grid-config{color:var(--text--primary);font-size:var(--snk-grid-config__subtitle--font-size);font-family:var(--snk-grid-config__subtitle--font-family)}.grid-config__main.sc-snk-grid-config{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-grid-config__scrollbar--color-clicked) var(--snk-grid-config__scrollbar--color-background);padding-right:var(--snk-grid-config__main--padding-right)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar{width:var(--snk-grid-config__scrollbar--width);max-width:var(--snk-grid-config__scrollbar--width);min-width:var(--snk-grid-config__scrollbar--width);background-color:var(--snk-grid-config__scrollbar--color-background)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-track{background-color:var(--snk-grid-config__scrollbar--color-background);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb{background-color:var(--snk-grid-config__scrollbar--color-default);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:hover,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-grid-config__scrollbar--color-hover)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:active,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-grid-config__scrollbar--color-clicked)}.group-name.sc-snk-grid-config{font-family:var(--snk-grid-config__group--font-family);font-size:var(--snk-grid-config__group--font-size);font-weight:var(--snk-grid-config__group--font-weight);padding-bottom:var(--snk-grid-config__group--padding-bottom)}";
|
719
|
+
|
720
|
+
const SnkGridConfig = class {
|
721
|
+
constructor(hostRef) {
|
722
|
+
registerInstance(this, hostRef);
|
723
|
+
this.configChange = createEvent(this, "configChange", 7);
|
724
|
+
this.configCancel = createEvent(this, "configCancel", 7);
|
725
|
+
this._orderListItems = [];
|
726
|
+
this._orderPriorityList = [];
|
727
|
+
this._columListItems = [];
|
728
|
+
this._selectedIndex = -1;
|
729
|
+
this._dataChanged = false;
|
730
|
+
this._componenteInternalKey = Date.now();
|
731
|
+
this.selectedIndex = 0;
|
732
|
+
this.columns = undefined;
|
733
|
+
this.config = undefined;
|
734
|
+
this.configName = undefined;
|
735
|
+
this.resourceID = undefined;
|
736
|
+
}
|
737
|
+
/* Creation Methods */
|
738
|
+
/**
|
739
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
740
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
741
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
742
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-grid.msg.ts"
|
743
|
+
*/
|
744
|
+
getMessage(key, params) {
|
745
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
746
|
+
return application.messagesBuilder.getMessage(key, params);
|
747
|
+
}
|
748
|
+
getSortableColumns() {
|
749
|
+
let newList = [];
|
750
|
+
this.columns.filter(col => { var _a; return StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach((column) => {
|
751
|
+
var _a;
|
752
|
+
let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find((item) => item.name === column.name);
|
753
|
+
let item = { name: column.name, label: column.label };
|
754
|
+
if (configItem) {
|
755
|
+
item['orderIndex'] = configItem.orderIndex;
|
756
|
+
item['ascending'] = configItem.ascending;
|
757
|
+
}
|
758
|
+
if (!column.hidden) {
|
759
|
+
newList.push(item);
|
760
|
+
}
|
761
|
+
});
|
762
|
+
return newList;
|
763
|
+
}
|
764
|
+
createOrderList() {
|
765
|
+
let newSortableList = this.getSortableColumns();
|
766
|
+
newSortableList.sort((a, b) => {
|
767
|
+
//OS dois tem order index 0 e pelo menos um deles tem orientação de ordenação.
|
768
|
+
if (a.orderIndex == 0 && b.orderIndex == 0 && (a.ascending != undefined || b.ascending != undefined)) {
|
769
|
+
if (a.ascending != undefined)
|
770
|
+
return -1;
|
771
|
+
if (b.ascending != undefined)
|
772
|
+
return 1;
|
773
|
+
return 0;
|
774
|
+
//Pelo menos um deles tem order index diferente de 0 e os dois tem orientação de ordenação.
|
775
|
+
}
|
776
|
+
else if (a.ascending != undefined && b.ascending != undefined) {
|
777
|
+
return (a.orderIndex - b.orderIndex);
|
778
|
+
//Pelo menos um deles tem order index diferente de 0 e pelo menos um deles tem orientação de ordenação.
|
779
|
+
}
|
780
|
+
else if (a.ascending != undefined || b.ascending != undefined) {
|
781
|
+
if (a.ascending != undefined)
|
782
|
+
return -1;
|
783
|
+
if (b.ascending != undefined)
|
784
|
+
return 1;
|
785
|
+
return 0;
|
786
|
+
}
|
787
|
+
return (a.orderIndex - b.orderIndex);
|
788
|
+
});
|
789
|
+
this._orderListItems = newSortableList;
|
790
|
+
}
|
791
|
+
createColumnList() {
|
792
|
+
let visibleGroup = {
|
793
|
+
group: this.getMessage("snkGridConfig.group.visible"),
|
794
|
+
items: [],
|
795
|
+
};
|
796
|
+
let hiddenGroup = {
|
797
|
+
group: this.getMessage("snkGridConfig.group.hidden"),
|
798
|
+
items: [],
|
799
|
+
sort: ORDER_VALUES.asc.value
|
800
|
+
};
|
801
|
+
this.columns.forEach((column) => {
|
802
|
+
let item = { label: column.label };
|
803
|
+
if (column.hidden) {
|
804
|
+
hiddenGroup.items.push(item);
|
805
|
+
}
|
806
|
+
else {
|
807
|
+
visibleGroup.items.push(item);
|
808
|
+
}
|
809
|
+
});
|
810
|
+
this._columListItems = [visibleGroup, hiddenGroup];
|
811
|
+
}
|
812
|
+
createColumnListSlotDataElementId(item) {
|
813
|
+
return `configItem_${StringUtils.replaceAccentuatedChars(StringUtils.toCamelCase(item.label))}`;
|
814
|
+
}
|
815
|
+
buildColumnListSlot(item, group) {
|
816
|
+
const dataElementId = this.createColumnListSlotDataElementId(item);
|
817
|
+
return (h("div", null, h("ez-check", { mode: CheckMode.SWITCH, id: CheckMode.SWITCH + ((item === null || item === void 0 ? void 0 : item.label) || '') + ((group === null || group === void 0 ? void 0 : group.group) || ''), value: group.group === this.getMessage("snkGridConfig.group.visible"), "data-element-id": dataElementId, onEzChange: (evt) => { this.switchColumnGroup(evt, item); } })));
|
818
|
+
}
|
819
|
+
createOrderListSlotDataElementId(item) {
|
820
|
+
return `${this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${StringUtils.toCamelCase(item.label)}`;
|
821
|
+
}
|
822
|
+
buildOrderListSlot(item) {
|
823
|
+
const dataElementId = this.createOrderListSlotDataElementId(item);
|
824
|
+
let selectedOption = ORDER_VALUES.none.value;
|
825
|
+
if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
|
826
|
+
selectedOption = item.ascending == true ? ORDER_VALUES.asc.value : ORDER_VALUES.desc.value;
|
827
|
+
}
|
828
|
+
return (h("div", null, h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, "data-element-id": dataElementId, onEzChange: (evt) => { evt.stopPropagation(); this.updateOrder(evt.detail, item.label); } })));
|
829
|
+
}
|
830
|
+
updateOrder(sortOrder, updatedItemLabel) {
|
831
|
+
var _a;
|
832
|
+
this._dataChanged = true;
|
833
|
+
let newList = [...this.columns];
|
834
|
+
let newItem = newList.find((item) => item.label === updatedItemLabel);
|
835
|
+
if (newItem) {
|
836
|
+
newItem.sort = sortOrder.value === ORDER_VALUES.none.value ? undefined : sortOrder.value;
|
837
|
+
}
|
838
|
+
let orderArray;
|
839
|
+
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
840
|
+
this._orderPriorityList.find((item) => item.label === newItem.label).sort = sortOrder;
|
841
|
+
this._orderPriorityList.filter((item) => item.sort).forEach((item, index) => {
|
842
|
+
if (item.label === newItem.label) {
|
843
|
+
newItem.sortIndex = index;
|
844
|
+
}
|
845
|
+
});
|
846
|
+
}
|
847
|
+
else {
|
848
|
+
orderArray = newList.filter((item) => item.sort && item.hidden !== true)
|
849
|
+
.map((item, index) => {
|
850
|
+
return { label: item.label, orderIndex: index };
|
851
|
+
});
|
852
|
+
orderArray.forEach((element) => {
|
853
|
+
newList.find((item) => item.label === element.label).sortIndex = element.orderIndex;
|
854
|
+
});
|
855
|
+
}
|
856
|
+
this.columns = newList;
|
857
|
+
}
|
858
|
+
/* Actions Methods */
|
859
|
+
switchColumnGroup(evt, switchedItem) {
|
860
|
+
evt.stopPropagation();
|
861
|
+
let newList = [...this._columListItems];
|
862
|
+
this._dataChanged = true;
|
863
|
+
if (evt.detail === true) {
|
864
|
+
let hiddenGroup = newList.find((group) => group.group === this.getMessage("snkGridConfig.group.hidden"));
|
865
|
+
let index = hiddenGroup.items.findIndex((item) => item.label === switchedItem.label);
|
866
|
+
if (index >= 0) {
|
867
|
+
hiddenGroup.items.splice(index, 1);
|
868
|
+
}
|
869
|
+
let visibleGroup = newList.find((group) => group.group === this.getMessage("snkGridConfig.group.visible"));
|
870
|
+
visibleGroup.items.push(switchedItem);
|
871
|
+
this._columListItems = newList;
|
872
|
+
this.createOrderList();
|
873
|
+
}
|
874
|
+
else if (evt.detail === false) {
|
875
|
+
let visibleGroup = newList.find((group) => group.group === this.getMessage("snkGridConfig.group.visible"));
|
876
|
+
let index = visibleGroup.items.findIndex((item) => item.label === switchedItem.label);
|
877
|
+
if (index >= 0) {
|
878
|
+
visibleGroup.items.splice(index, 1);
|
879
|
+
}
|
880
|
+
let hiddenGroup = newList.find((group) => group.group === this.getMessage("snkGridConfig.group.hidden"));
|
881
|
+
hiddenGroup.items.push(switchedItem);
|
882
|
+
this._columListItems = newList;
|
883
|
+
this.createOrderList();
|
884
|
+
}
|
885
|
+
}
|
886
|
+
finish() {
|
887
|
+
if (!this._dataChanged) {
|
888
|
+
this.closeConfig();
|
889
|
+
return;
|
890
|
+
}
|
891
|
+
let newColumnList = [];
|
892
|
+
this._columListItems.forEach((group) => {
|
893
|
+
group.items.forEach((item) => {
|
894
|
+
const baseColumn = this.columns.find((column) => column.label === item.label);
|
895
|
+
let newColumnItem = Object.assign({}, baseColumn);
|
896
|
+
if (group.group === this.getMessage("snkGridConfig.group.hidden")) {
|
897
|
+
newColumnItem.hidden = true;
|
898
|
+
}
|
899
|
+
else {
|
900
|
+
newColumnItem.hidden = false;
|
901
|
+
}
|
902
|
+
newColumnList.push(newColumnItem);
|
903
|
+
});
|
904
|
+
});
|
905
|
+
this.columns = newColumnList;
|
906
|
+
this._dataChanged = false;
|
907
|
+
this.closeConfig();
|
908
|
+
this.save();
|
909
|
+
}
|
910
|
+
saveGridConfigOnStorage(_newConfig) {
|
911
|
+
ConfigStorage.saveGridConfig(_newConfig, this.configName, this.resourceID)
|
912
|
+
.then((savedConfig) => {
|
913
|
+
this.configChange.emit(savedConfig);
|
914
|
+
this._orderList.clearHistory();
|
915
|
+
ApplicationUtils.info(this.getMessage("snkGridConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
916
|
+
});
|
917
|
+
}
|
918
|
+
reOrderPriorityColumns(columns, orderPriorityList) {
|
919
|
+
let orderArray = [];
|
920
|
+
orderArray = columns.filter((item) => item.sort && item.hidden !== true)
|
921
|
+
.map((item) => {
|
922
|
+
return { label: item.label, orderIndex: 0 };
|
923
|
+
});
|
924
|
+
let indexCount = 0;
|
925
|
+
let newOrderArray = [];
|
926
|
+
orderPriorityList.forEach((orderPriorityItem) => {
|
927
|
+
let item = orderArray.find((column) => column.label === orderPriorityItem.label);
|
928
|
+
if (item) {
|
929
|
+
item.orderIndex = indexCount;
|
930
|
+
newOrderArray.push(item);
|
931
|
+
indexCount++;
|
932
|
+
}
|
933
|
+
});
|
934
|
+
if (newOrderArray.length > 0) {
|
935
|
+
orderArray = newOrderArray;
|
936
|
+
}
|
937
|
+
return orderArray;
|
938
|
+
}
|
939
|
+
save() {
|
940
|
+
var _a;
|
941
|
+
let _newConfig;
|
942
|
+
if (this.config) {
|
943
|
+
_newConfig = this.config;
|
944
|
+
}
|
945
|
+
else {
|
946
|
+
_newConfig = this.createConfigFromState(this.columns);
|
947
|
+
}
|
948
|
+
let _newColumnConfigList = [];
|
949
|
+
let orderArray;
|
950
|
+
if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
951
|
+
orderArray = this.reOrderPriorityColumns(this.columns, this._orderPriorityList);
|
952
|
+
}
|
953
|
+
this.columns.forEach((column) => {
|
954
|
+
let _newColumnConfig = _newConfig.columns.find((_newColumnConfig) => column.name === _newColumnConfig.name);
|
955
|
+
if (column.hidden === true && _newColumnConfig)
|
956
|
+
return;
|
957
|
+
if (_newColumnConfig) {
|
958
|
+
_newColumnConfig.width = column.width;
|
959
|
+
}
|
960
|
+
else if (column.hidden === false) {
|
961
|
+
_newColumnConfig = { name: column.name, width: column.width, orderIndex: 0 };
|
962
|
+
}
|
963
|
+
if (_newColumnConfig) {
|
964
|
+
if (column.sort) {
|
965
|
+
_newColumnConfig.ascending = column.sort.toUpperCase() === ORDER_VALUES.asc.value ? true : false;
|
966
|
+
if (orderArray) {
|
967
|
+
adjustPriorityOrder(column, _newColumnConfig);
|
968
|
+
}
|
969
|
+
else {
|
970
|
+
_newColumnConfig.orderIndex = column.sortIndex;
|
971
|
+
}
|
972
|
+
}
|
973
|
+
else {
|
974
|
+
delete _newColumnConfig.ascending;
|
975
|
+
_newColumnConfig.orderIndex = 0;
|
976
|
+
}
|
977
|
+
_newColumnConfigList.push(_newColumnConfig);
|
978
|
+
}
|
979
|
+
});
|
980
|
+
_newConfig.columns = _newColumnConfigList;
|
981
|
+
this.saveGridConfigOnStorage(_newConfig);
|
982
|
+
function adjustPriorityOrder(column, _newColumnConfig) {
|
983
|
+
if (orderArray) {
|
984
|
+
let orderItem = orderArray.find((item) => item.label === column.label);
|
985
|
+
if (orderItem) {
|
986
|
+
_newColumnConfig.orderIndex = orderItem.orderIndex;
|
987
|
+
}
|
988
|
+
}
|
989
|
+
}
|
990
|
+
}
|
991
|
+
createConfigFromState(state) {
|
992
|
+
let newConfig = { columns: [] };
|
993
|
+
state.forEach((columnState) => {
|
994
|
+
if (!columnState.hidden) {
|
995
|
+
let newConfigColumn = { name: columnState.name };
|
996
|
+
if (columnState.width) {
|
997
|
+
newConfigColumn['width'] = columnState.width;
|
998
|
+
}
|
999
|
+
if (columnState.sort) {
|
1000
|
+
newConfigColumn['ascending'] = (columnState.sort.toUpperCase() === ORDER_VALUES.asc.value);
|
1001
|
+
newConfigColumn['orderIndex'] = columnState.sortIndex;
|
1002
|
+
}
|
1003
|
+
else {
|
1004
|
+
newConfigColumn['orderIndex'] = 0;
|
1005
|
+
}
|
1006
|
+
if (newConfigColumn) {
|
1007
|
+
newConfig.columns.push(newConfigColumn);
|
1008
|
+
}
|
1009
|
+
}
|
1010
|
+
});
|
1011
|
+
return newConfig;
|
1012
|
+
}
|
1013
|
+
async locateColumn(evt, searchingText) {
|
1014
|
+
var _a;
|
1015
|
+
const hitEnter = evt.key === "Enter";
|
1016
|
+
searchingText = searchingText || ((_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value);
|
1017
|
+
if (!searchingText) {
|
1018
|
+
this.removeSelection();
|
1019
|
+
return;
|
1020
|
+
}
|
1021
|
+
const matchedIndexes = await this.getMatchedIndexes(searchingText);
|
1022
|
+
const newSelected = this.getNewSelectedIndex(matchedIndexes, hitEnter);
|
1023
|
+
this._selectedIndex = newSelected;
|
1024
|
+
if (this.selectedIndex === 1) {
|
1025
|
+
this.updateOrderListSelection(newSelected);
|
1026
|
+
}
|
1027
|
+
else {
|
1028
|
+
this.updateColumnListSelection(newSelected);
|
1029
|
+
}
|
1030
|
+
}
|
1031
|
+
async getMatchedIndexes(searchingText) {
|
1032
|
+
const matchedIndexes = [];
|
1033
|
+
if (this.selectedIndex === 1) {
|
1034
|
+
const orderListDatasource = await this._orderList.getList();
|
1035
|
+
orderListDatasource.forEach((column, index) => {
|
1036
|
+
if (this.compareWords(column, searchingText)) {
|
1037
|
+
matchedIndexes.push(index);
|
1038
|
+
}
|
1039
|
+
});
|
1040
|
+
}
|
1041
|
+
else {
|
1042
|
+
this.columns.forEach((column, index) => {
|
1043
|
+
if (this.compareWords(column, searchingText)) {
|
1044
|
+
matchedIndexes.push(index);
|
1045
|
+
}
|
1046
|
+
});
|
1047
|
+
}
|
1048
|
+
return matchedIndexes;
|
1049
|
+
}
|
1050
|
+
getNewSelectedIndex(matchedIndexes, hitEnter) {
|
1051
|
+
if (matchedIndexes.length === 0)
|
1052
|
+
return -1;
|
1053
|
+
if (hitEnter) {
|
1054
|
+
for (const index of matchedIndexes) {
|
1055
|
+
if (index > this._selectedIndex) {
|
1056
|
+
return index;
|
1057
|
+
}
|
1058
|
+
}
|
1059
|
+
}
|
1060
|
+
return matchedIndexes[0];
|
1061
|
+
}
|
1062
|
+
updateOrderListSelection(newSelected) {
|
1063
|
+
if (newSelected === -1) {
|
1064
|
+
this._orderList.removeSelection();
|
1065
|
+
return;
|
1066
|
+
}
|
1067
|
+
this._orderList.getList().then((orderListDatasource) => {
|
1068
|
+
const selectedColumn = orderListDatasource[newSelected];
|
1069
|
+
if (selectedColumn) {
|
1070
|
+
this._orderList.setSelection(selectedColumn, true);
|
1071
|
+
}
|
1072
|
+
else {
|
1073
|
+
this._orderList.removeSelection();
|
1074
|
+
}
|
1075
|
+
});
|
1076
|
+
}
|
1077
|
+
updateColumnListSelection(newSelected) {
|
1078
|
+
if (newSelected === -1) {
|
1079
|
+
this._columnList.removeSelection();
|
1080
|
+
return;
|
1081
|
+
}
|
1082
|
+
const selectedColumn = this.columns[newSelected];
|
1083
|
+
if (selectedColumn) {
|
1084
|
+
const listItem = this._columListItems
|
1085
|
+
.map(group => group.items)
|
1086
|
+
.flat()
|
1087
|
+
.find(item => item.label === selectedColumn.label);
|
1088
|
+
if (listItem) {
|
1089
|
+
this._columnList.setSelection(listItem, true);
|
1090
|
+
}
|
1091
|
+
else {
|
1092
|
+
this._columnList.removeSelection();
|
1093
|
+
}
|
1094
|
+
}
|
1095
|
+
else {
|
1096
|
+
this._columnList.removeSelection();
|
1097
|
+
}
|
1098
|
+
}
|
1099
|
+
removeSelection() {
|
1100
|
+
if (this.selectedIndex === 1) {
|
1101
|
+
this._orderList.removeSelection();
|
1102
|
+
}
|
1103
|
+
else {
|
1104
|
+
this._columnList.removeSelection();
|
1105
|
+
}
|
1106
|
+
}
|
1107
|
+
compareWords(column, searchingText) {
|
1108
|
+
var _a, _b;
|
1109
|
+
const columnLabel = (_a = StringUtils.replaceAccentuatedChars(column === null || column === void 0 ? void 0 : column.label)) === null || _a === void 0 ? void 0 : _a.toUpperCase();
|
1110
|
+
const argument = (_b = StringUtils.replaceAccentuatedChars(searchingText)) === null || _b === void 0 ? void 0 : _b.toUpperCase();
|
1111
|
+
if (StringUtils.isEmpty(columnLabel) || StringUtils.isEmpty(argument)) {
|
1112
|
+
return false;
|
1113
|
+
}
|
1114
|
+
return columnLabel.includes(argument);
|
1115
|
+
}
|
1116
|
+
getColumnNames() {
|
1117
|
+
const listNames = [];
|
1118
|
+
listNames.push(this.getMessage("snkGridConfig.tab.columns"));
|
1119
|
+
listNames.push(this.getMessage("snkGridConfig.tab.lineOrdering"));
|
1120
|
+
return listNames.join(',');
|
1121
|
+
}
|
1122
|
+
closeConfig() {
|
1123
|
+
this._orderList.scrollToTop();
|
1124
|
+
this._columnList.scrollToTop();
|
1125
|
+
this._searchElement.value = "";
|
1126
|
+
if (this._dataChanged) {
|
1127
|
+
let options = {
|
1128
|
+
canClose: false,
|
1129
|
+
labelCancel: this.getMessage("snkGridConfig.confirm.cancel"),
|
1130
|
+
labelConfirm: this.getMessage("snkGridConfig.confirm.save"),
|
1131
|
+
btnConfirmDanger: false
|
1132
|
+
};
|
1133
|
+
ApplicationUtils.confirm(this.getMessage("snkGridConfig.confirm.alert"), this.getMessage("snkGridConfig.confirm.msgCancel"), null, DialogType.WARN, options)
|
1134
|
+
.then((response) => {
|
1135
|
+
if (!response) {
|
1136
|
+
this._dataChanged = false;
|
1137
|
+
this.configCancel.emit();
|
1138
|
+
this._orderList.clearHistory();
|
1139
|
+
this._componenteInternalKey = Date.now();
|
1140
|
+
}
|
1141
|
+
else {
|
1142
|
+
this.finish();
|
1143
|
+
}
|
1144
|
+
});
|
1145
|
+
}
|
1146
|
+
else {
|
1147
|
+
this.configCancel.emit();
|
1148
|
+
this._orderList.clearHistory();
|
1149
|
+
}
|
1150
|
+
}
|
1151
|
+
/* Handlers */
|
1152
|
+
handleTabChange(tab) {
|
1153
|
+
if ((tab === null || tab === void 0 ? void 0 : tab.index) != undefined) {
|
1154
|
+
if (this.selectedIndex !== tab.index) {
|
1155
|
+
if (tab.index === 0) {
|
1156
|
+
this._orderList.scrollToTop();
|
1157
|
+
}
|
1158
|
+
else if (tab.index === 1) {
|
1159
|
+
this._columnList.scrollToTop();
|
1160
|
+
}
|
1161
|
+
this._searchElement.value = "";
|
1162
|
+
}
|
1163
|
+
if (tab.index === 1) {
|
1164
|
+
this.createOrderList();
|
1165
|
+
}
|
1166
|
+
this.selectedIndex = tab.index;
|
1167
|
+
}
|
1168
|
+
}
|
1169
|
+
handleColumnListChange(evt) {
|
1170
|
+
var _a;
|
1171
|
+
if (evt.detail) {
|
1172
|
+
let visibleItems = (_a = evt.detail.find((group) => group.group === this.getMessage("snkGridConfig.group.visible"))) === null || _a === void 0 ? void 0 : _a.items;
|
1173
|
+
if (visibleItems) {
|
1174
|
+
this._dataChanged = true;
|
1175
|
+
this._orderListItems = visibleItems;
|
1176
|
+
}
|
1177
|
+
}
|
1178
|
+
}
|
1179
|
+
handleOrderListChange(evt) {
|
1180
|
+
if (evt.detail) {
|
1181
|
+
let orderPriorityList = evt.detail;
|
1182
|
+
if (orderPriorityList) {
|
1183
|
+
this._dataChanged = true;
|
1184
|
+
this._orderPriorityList = orderPriorityList;
|
1185
|
+
}
|
1186
|
+
}
|
1187
|
+
}
|
1188
|
+
componentWillRender() {
|
1189
|
+
var _a;
|
1190
|
+
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
1191
|
+
this.createColumnList();
|
1192
|
+
}
|
1193
|
+
}
|
1194
|
+
componentDidRender() {
|
1195
|
+
var _a;
|
1196
|
+
if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
1197
|
+
this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
|
1198
|
+
}
|
1199
|
+
}
|
1200
|
+
componentDidLoad() {
|
1201
|
+
ElementIDUtils.addIDInfo(this._element);
|
1202
|
+
}
|
1203
|
+
render() {
|
1204
|
+
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, this.getMessage("snkGridConfig.gridConfiguration")), h("label", { class: "subtitle" }, this.getMessage("snkGridConfig.columnVisibilityOrder"))), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedIndex: this.selectedIndex, onEzChange: (evt) => { this.handleTabChange(evt.detail); }, tabs: this.getColumnNames() })), h("div", null, h("ez-text-input", { "data-element-id": "searchColums", ref: (el) => this._searchElement = el, label: this.getMessage("snkGridConfig.findColumn"), onKeyUp: (evt) => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedIndex === 0 ? "" : "hidden", dataSource: this._columListItems, onEzChange: (evt) => this.handleColumnListChange(evt), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true, "data-element-id": "configCols" }), h("div", { class: this.selectedIndex === 1 ? "group-name" : "hidden" }, this.getMessage("snkGridConfig.info.sortingSequence")), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedIndex === 1 ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: (evt) => this.handleOrderListChange(evt), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item), "data-element-id": "configDataOrder" })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: this.getMessage("snkGridConfig.cancel"), onClick: () => this.closeConfig() }), h("ez-button", { label: this.getMessage("snkGridConfig.complete"), class: "ez-button--primary", onClick: () => this.finish() }))));
|
1205
|
+
}
|
1206
|
+
static get assetsDirs() { return ["../assets"]; }
|
1207
|
+
get _element() { return getElement(this); }
|
1208
|
+
};
|
1209
|
+
SnkGridConfig.style = snkGridConfigCss;
|
1210
|
+
|
1211
|
+
const snkSelectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
|
1212
|
+
|
1213
|
+
const SelectBox = class {
|
1214
|
+
constructor(hostRef) {
|
1215
|
+
registerInstance(this, hostRef);
|
1216
|
+
this.ezChange = createEvent(this, "ezChange", 7);
|
1217
|
+
this.selectedOption = ORDER_VALUES.none;
|
1218
|
+
}
|
1219
|
+
render() {
|
1220
|
+
return (h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, Object.keys(ORDER_VALUES).map((key) => {
|
1221
|
+
return h("option", { value: ORDER_VALUES[key].value }, ORDER_VALUES[key].label);
|
1222
|
+
})));
|
1223
|
+
}
|
1224
|
+
static get assetsDirs() { return ["../assets"]; }
|
1225
|
+
};
|
1226
|
+
SelectBox.style = snkSelectBoxCss;
|
1227
|
+
|
715
1228
|
const taskbarActionsButtonCss = ".sc-taskbar-actions-button-h{display:flex;width:fit-content;height:fit-content}";
|
716
1229
|
|
717
1230
|
const TaskbarActionsButton = class {
|
@@ -837,10 +1350,10 @@ const TaskbarActionsButton = class {
|
|
837
1350
|
this.taskbarActionsButtonDisconnected.emit();
|
838
1351
|
}
|
839
1352
|
render() {
|
840
|
-
return (h(Host, null, h("div", { class:
|
1353
|
+
return (h(Host, null, h("div", { class: `${this.canShowDropdown() ? ' ez-elevation--16' : ''}` }, h("ez-button", { title: this.title, mode: 'icon', iconName: 'dots-vertical', size: 'small', enabled: this.enabled, onClick: () => this.controlDropdown() }), this.canShowDropdown() && h("ez-dropdown", { items: this.loadItems(), onEzClick: (evt) => this.onSelectAction(evt.detail), onEzOutsideClick: () => this._showDropdown = false, itemBuilder: (item, level) => this.dropdownItemBuilder(item, level) }))));
|
841
1354
|
}
|
842
1355
|
get _element() { return getElement(this); }
|
843
1356
|
};
|
844
1357
|
TaskbarActionsButton.style = taskbarActionsButtonCss;
|
845
1358
|
|
846
|
-
export { SnkActionsButton as snk_actions_button, TaskbarActionsButton as taskbar_actions_button };
|
1359
|
+
export { SnkActionsButton as snk_actions_button, SnkGridConfig as snk_grid_config, SelectBox as snk_select_box, TaskbarActionsButton as taskbar_actions_button };
|
@@ -1,17 +1,16 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
5
|
-
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-
|
6
|
-
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-
|
7
|
-
import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-
|
8
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
9
|
-
import './form-config-fetcher-
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-101a2b4c.js';
|
5
|
+
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-a650ae58.js';
|
6
|
+
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-17dc5b5e.js';
|
7
|
+
import { D as DataUnitFetcher, P as PesquisaFetcher } from './pesquisa-fetcher-f05a12ca.js';
|
8
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-9747ddd2.js';
|
9
|
+
import './form-config-fetcher-f121f880.js';
|
10
10
|
import './filter-item-type.enum-d45e026f.js';
|
11
11
|
import './PrintUtils-3e4ff0f5.js';
|
12
12
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
13
13
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
14
|
-
import './PreloadManager-c1c2f2b4.js';
|
15
14
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
16
15
|
import './ResourceIDUtils-a114189a.js';
|
17
16
|
|
@@ -26,7 +25,22 @@ const _0x5b7870=_0x2202;(function(_0x42e134,_0x5d9727){const _0x185c97=_0x2202,_
|
|
26
25
|
|
27
26
|
class ParametersFetcher {
|
28
27
|
constructor() {
|
28
|
+
this._embeddedParams = new Map();
|
29
29
|
this.templateByQuery = new Map();
|
30
|
+
try {
|
31
|
+
if (window["MGE_PARAMS"] != undefined) {
|
32
|
+
const source = atob(window['MGE_PARAMS']);
|
33
|
+
const params = source.split('__;__');
|
34
|
+
params.forEach(param => {
|
35
|
+
const [key, value] = param.split("__=__");
|
36
|
+
this._embeddedParams.set(key, value);
|
37
|
+
});
|
38
|
+
}
|
39
|
+
}
|
40
|
+
catch (error) {
|
41
|
+
console.error("Problemas ao obter parâmetros embarcados");
|
42
|
+
console.error(error);
|
43
|
+
}
|
30
44
|
this.buldTemplates();
|
31
45
|
}
|
32
46
|
buldTemplates() {
|
@@ -38,6 +52,9 @@ class ParametersFetcher {
|
|
38
52
|
}`);
|
39
53
|
}
|
40
54
|
async getParam(name) {
|
55
|
+
if (this._embeddedParams.has(name)) {
|
56
|
+
return Promise.resolve(this._embeddedParams.get(name));
|
57
|
+
}
|
41
58
|
const completPath = `param://application?params=${name}`;
|
42
59
|
return DataFetcher.get().callGraphQL({
|
43
60
|
values: { name: completPath },
|
@@ -75,6 +92,9 @@ class ParametersFetcher {
|
|
75
92
|
if (Array.isArray(obj) && obj.length > 0) {
|
76
93
|
obj = obj[0];
|
77
94
|
}
|
95
|
+
if (typeof obj === "string") {
|
96
|
+
return obj;
|
97
|
+
}
|
78
98
|
if (StringUtils.isEmpty(obj.resource))
|
79
99
|
return "";
|
80
100
|
try {
|
@@ -277,6 +297,8 @@ const SnkApplication = class {
|
|
277
297
|
this._isLoadedByPk = false;
|
278
298
|
this.messagesBuilder = undefined;
|
279
299
|
this.configName = undefined;
|
300
|
+
this.gridLegacyConfigName = undefined;
|
301
|
+
this.formLegacyConfigName = undefined;
|
280
302
|
this.loadByPK = undefined;
|
281
303
|
}
|
282
304
|
async processPendingActions(actionsLocker) {
|
@@ -1183,7 +1205,11 @@ const SnkApplication = class {
|
|
1183
1205
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
1184
1206
|
this.registerPkChangeListener();
|
1185
1207
|
ErrorTracking.init();
|
1186
|
-
|
1208
|
+
let legacyConfig = {
|
1209
|
+
gridLegacyConfig: this.gridLegacyConfigName,
|
1210
|
+
formLegacyConfig: this.formLegacyConfigName
|
1211
|
+
};
|
1212
|
+
ConfigStorage.preload(this.applicationResourceID, this.configName, legacyConfig);
|
1187
1213
|
document.addEventListener("click", () => Workspace.applicationClick());
|
1188
1214
|
this._waitingAppReady.forEach(resolve => resolve());
|
1189
1215
|
}
|
@@ -1,20 +1,19 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-a7d3d3f1.js';
|
2
2
|
import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataUnit } from '@sankhyalabs/core';
|
3
|
-
import { D as DataFetcher } from './DataFetcher-
|
4
|
-
import { D as DataUnitFetcher } from './pesquisa-fetcher-
|
3
|
+
import { D as DataFetcher } from './DataFetcher-a650ae58.js';
|
4
|
+
import { a as PreloadManager, D as DataUnitFetcher } from './pesquisa-fetcher-f05a12ca.js';
|
5
5
|
import './index-0ece87a6.js';
|
6
6
|
import { S as SaveErrorsEnum } from './ISave-d8c8bc59.js';
|
7
7
|
import './filter-item-type.enum-d45e026f.js';
|
8
|
-
import './form-config-fetcher-
|
8
|
+
import './form-config-fetcher-f121f880.js';
|
9
9
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import { T as TaskbarElement } from './taskbar-elements-d4d0b424.js';
|
10
|
+
import { A as AutorizationType } from './auth-fetcher-17dc5b5e.js';
|
11
|
+
import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
|
13
12
|
import './PrintUtils-3e4ff0f5.js';
|
14
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
15
14
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
16
|
-
import './ResourceIDUtils-a114189a.js';
|
17
15
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
16
|
+
import './ResourceIDUtils-a114189a.js';
|
18
17
|
import './index-bdf75557.js';
|
19
18
|
|
20
19
|
const SERVICE$1 = {
|