@sankhyalabs/sankhyablocks 8.15.0-rc.2 → 8.15.0-rc.20
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-8d4e9d53.js} +70 -7
- package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-99f0f6ed.js} +5 -3
- package/dist/cjs/{SnkFormConfigManager-71c4768e.js → SnkFormConfigManager-33995e92.js} +21 -13
- package/dist/cjs/{SnkMessageBuilder-e7dcf408.js → SnkMessageBuilder-66aa2557.js} +6 -1
- package/dist/cjs/SnkMultiSelectionListDataSource-d15f7aac.js +140 -0
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-bb8e9ae4.js} +1 -1
- package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-d73f4449.js} +13 -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-bdbbe9ac.js} +277 -61
- 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 +13 -8
- package/dist/cjs/snk-attach.cjs.entry.js +67 -47
- package/dist/cjs/snk-crud.cjs.entry.js +16 -10
- package/dist/cjs/snk-data-exporter.cjs.entry.js +10 -6
- package/dist/cjs/{snk-data-unit-82c08a8c.js → snk-data-unit-41c29713.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 -5
- package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
- package/dist/cjs/snk-filter-item.cjs.entry.js +10 -6
- 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 +37 -22
- package/dist/cjs/{snk-guides-viewer-d32c096f.js → snk-guides-viewer-a8dd24a3.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 +249 -23
- package/dist/cjs/snk-taskbar.cjs.entry.js +123 -15
- 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-attach/snk-attach.js +39 -24
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +29 -22
- 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 +7 -3
- 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/filter-item/snk-filter-detail.js +22 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +24 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +116 -2
- package/dist/collection/components/snk-form/snk-form.js +25 -1
- package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +20 -12
- 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 +100 -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 +10 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +414 -18
- 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 +166 -14
- package/dist/collection/lib/configs/ConfigStorage.js +63 -3
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +9 -40
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +5 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -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/message/resources/snk-simple-crud.msg.js +4 -0
- 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 +19 -11
- package/dist/components/SnkMessageBuilder.js +6 -1
- package/dist/components/dataunit-fetcher.js +45 -50
- package/dist/components/field-search.js +93 -3
- package/dist/components/form-config-fetcher.js +12 -0
- package/dist/components/index.d.ts +6 -6
- package/dist/components/snk-application2.js +9 -1
- package/dist/components/snk-attach2.js +115 -52
- package/dist/components/snk-crud.js +15 -3
- package/dist/components/snk-data-exporter2.js +7 -3
- 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 -3
- package/dist/components/snk-filter-detail2.js +5 -1
- package/dist/components/snk-filter-item2.js +11 -6
- 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 +38 -17
- package/dist/components/snk-personalized-filter-editor.js +3 -1
- package/dist/components/snk-simple-crud2.js +310 -30
- package/dist/components/snk-taskbar2.js +139 -25
- package/dist/components/taskbar-actions-button2.js +1 -1
- package/dist/esm/{ConfigStorage-4151acc8.js → ConfigStorage-6e241cd7.js} +70 -7
- package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-a650ae58.js} +5 -3
- package/dist/esm/{SnkFormConfigManager-5c7d3771.js → SnkFormConfigManager-7a4e678f.js} +21 -13
- package/dist/esm/{SnkMessageBuilder-0fb796b9.js → SnkMessageBuilder-0a4becdd.js} +6 -1
- package/dist/esm/SnkMultiSelectionListDataSource-7084f3b3.js +133 -0
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-8ec448b0.js} +1 -1
- package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-765b8498.js} +13 -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-96d2f351.js} +266 -54
- 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 +13 -8
- package/dist/esm/snk-attach.entry.js +66 -46
- package/dist/esm/snk-crud.entry.js +16 -10
- package/dist/esm/snk-data-exporter.entry.js +10 -6
- package/dist/esm/{snk-data-unit-5d201fb3.js → snk-data-unit-de1d140d.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 -5
- package/dist/esm/snk-filter-detail.entry.js +4 -1
- package/dist/esm/snk-filter-item.entry.js +10 -6
- 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 +38 -23
- package/dist/esm/{snk-guides-viewer-f49613c6.js → snk-guides-viewer-131e9660.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 +250 -24
- package/dist/esm/snk-taskbar.entry.js +124 -16
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-2473c8ac.js} +9 -9
- package/dist/sankhyablocks/p-004c356e.js +26 -0
- package/dist/sankhyablocks/p-0624f62d.js +56 -0
- package/dist/sankhyablocks/p-075bba4c.entry.js +1 -0
- package/dist/sankhyablocks/p-07a61550.entry.js +1 -0
- package/dist/sankhyablocks/p-103c5956.entry.js +1 -0
- package/dist/sankhyablocks/p-1048bd26.entry.js +1 -0
- package/dist/sankhyablocks/{p-e6380c60.js → p-125bb902.js} +1 -1
- package/dist/sankhyablocks/p-13ae1a89.entry.js +1 -0
- package/dist/sankhyablocks/p-19a56978.entry.js +1 -0
- package/dist/sankhyablocks/{p-e0fd9555.entry.js → p-24ed6ad6.entry.js} +1 -1
- package/dist/sankhyablocks/p-32556aa6.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-34a7f2ab.js +65 -0
- package/dist/sankhyablocks/{p-f3d1c48e.js → p-52c8e589.js} +1 -1
- package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
- package/dist/sankhyablocks/p-5833cff9.js +1 -0
- package/dist/sankhyablocks/p-5a2e016a.entry.js +1 -0
- package/dist/sankhyablocks/p-619c5f6f.entry.js +11 -0
- package/dist/sankhyablocks/p-6f560924.entry.js +1 -0
- package/dist/sankhyablocks/p-8967fa78.js +1 -0
- package/dist/sankhyablocks/p-a87149e4.entry.js +1 -0
- package/dist/sankhyablocks/{p-7f3c7b09.entry.js → p-ac77949b.entry.js} +1 -1
- package/dist/sankhyablocks/p-ae4fc9a9.js +1 -0
- package/dist/sankhyablocks/p-b10b9934.entry.js +1 -0
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/{p-9695f78b.js → p-be75153c.js} +1 -1
- package/dist/sankhyablocks/p-bf39bdb8.entry.js +1 -0
- package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
- package/dist/sankhyablocks/p-efeca7ba.js +1 -0
- package/dist/sankhyablocks/p-f7d0fab9.entry.js +1 -0
- package/dist/sankhyablocks/p-f7d9d148.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-attach/snk-attach.d.ts +2 -1
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +10 -1
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +5 -4
- 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/filter-item/snk-filter-detail.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +6 -2
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +20 -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 +2 -1
- 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 +19 -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 +75 -3
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +34 -1
- package/dist/types/components.d.ts +226 -12
- package/dist/types/lib/configs/ConfigStorage.d.ts +21 -1
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +0 -2
- package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -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-05243555.js +0 -1
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-0d7863ed.js +0 -26
- 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-69efa80d.entry.js +0 -1
- package/dist/sankhyablocks/p-761ed32f.entry.js +0 -1
- package/dist/sankhyablocks/p-86801b08.entry.js +0 -1
- package/dist/sankhyablocks/p-96ef14f9.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-a52b9254.entry.js +0 -11
- 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-d6317851.entry.js +0 -1
- /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,28 +1,34 @@
|
|
1
|
-
import { ApplicationContext, DataType, FloatingManager, JSUtils, ObjectUtils, StringUtils, UserInterface, } from '@sankhyalabs/core';
|
1
|
+
import { ApplicationContext, DataType, ElementIDUtils, FloatingManager, JSUtils, ObjectUtils, StringUtils, UserInterface, } from '@sankhyalabs/core';
|
2
|
+
import { CSSVarsUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
2
3
|
import { h } from '@stencil/core';
|
3
4
|
import { SIMPLE_CRUD_MODE, VIEW_MODE } from '../../lib/utils/constants';
|
4
5
|
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
5
|
-
import { PresentationMode } from '../../lib';
|
6
|
+
import { CrudUtils, FormConfigFetcher, PresentationMode } from '../../lib';
|
6
7
|
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
7
8
|
import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
|
8
9
|
import SnkMultiSelectionListDataSource from '../snk-grid/filtercolumn/SnkMultiSelectionListDataSource';
|
9
10
|
import { buildFieldSearch, openFieldSearch } from '../snk-taskbar/subcomponents/field-search';
|
11
|
+
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
12
|
+
import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
|
13
|
+
import { REGULAR_DEFAULT_BTNS, REGULAR_SELECTED_BTNS } from './regular-buttons';
|
10
14
|
export class SnkSimpleCrud {
|
11
15
|
constructor() {
|
12
|
-
this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
|
13
|
-
this.REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
|
14
16
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
15
17
|
this._keyDownHandler = (event) => this.keyDownListener(event);
|
18
|
+
this._formConfigFetcher = new FormConfigFetcher();
|
16
19
|
this._taskbarProcessor = new TaskbarProcessor({
|
17
|
-
"snkSimpleCrudTaskbar.form_regular": this.
|
18
|
-
"snkSimpleCrudTaskbar.grid_regular": this.
|
19
|
-
"snkSimpleCrudTaskbar.form_selected": this.
|
20
|
-
"snkSimpleCrudTaskbar.grid_selected": this.
|
20
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, TaskbarElement.GRID_MODE),
|
21
|
+
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, TaskbarElement.FORM_MODE),
|
22
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, TaskbarElement.GRID_MODE),
|
23
|
+
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, TaskbarElement.FORM_MODE),
|
21
24
|
"snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
22
25
|
});
|
26
|
+
this._showPopUpGridConfig = false;
|
27
|
+
this._showFormConfig = false;
|
23
28
|
this._currentViewMode = VIEW_MODE.GRID;
|
24
29
|
this._config = undefined;
|
25
30
|
this._fieldToGetFocus = undefined;
|
31
|
+
this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
26
32
|
this.dataState = undefined;
|
27
33
|
this.dataUnit = undefined;
|
28
34
|
this.mode = SIMPLE_CRUD_MODE.SERVER;
|
@@ -31,11 +37,39 @@ export class SnkSimpleCrud {
|
|
31
37
|
this._formFields = [];
|
32
38
|
this.multipleSelection = undefined;
|
33
39
|
this.useCancelConfirm = true;
|
40
|
+
this.resourceID = undefined;
|
34
41
|
this.taskbarManager = undefined;
|
35
42
|
this.messagesBuilder = undefined;
|
36
43
|
this.useEnterLikeTab = false;
|
37
44
|
this.actionsList = undefined;
|
38
45
|
this.configName = undefined;
|
46
|
+
this.showConfiguratorButtons = undefined;
|
47
|
+
this.gridLegacyConfigName = undefined;
|
48
|
+
this.formLegacyConfigName = undefined;
|
49
|
+
this.ignoreReadOnlyFormFields = false;
|
50
|
+
}
|
51
|
+
handleResourceIDChanged(newValue, oldValue) {
|
52
|
+
if (StringUtils.isEmpty(newValue)) {
|
53
|
+
return;
|
54
|
+
}
|
55
|
+
if (newValue === oldValue) {
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
this.loadFormConfig(true);
|
59
|
+
this.loadGridConfig(true);
|
60
|
+
}
|
61
|
+
getButtons(selected, changeModeBtn) {
|
62
|
+
return this.addConfigButton(this.resolveInMemoryBtns(selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS)
|
63
|
+
.concat(changeModeBtn));
|
64
|
+
}
|
65
|
+
addConfigButton(buttons) {
|
66
|
+
if (this.configName === undefined) {
|
67
|
+
return buttons;
|
68
|
+
}
|
69
|
+
return buttons.concat(TaskbarElement.CONFIGURATOR);
|
70
|
+
}
|
71
|
+
get application() {
|
72
|
+
return ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
39
73
|
}
|
40
74
|
resolveInMemoryBtns(taskbarButtons) {
|
41
75
|
const newTaskBarConfig = [...taskbarButtons];
|
@@ -55,7 +89,10 @@ export class SnkSimpleCrud {
|
|
55
89
|
}
|
56
90
|
actionClickListener(evt) {
|
57
91
|
const act = evt.detail;
|
58
|
-
if (act === TaskbarElement.
|
92
|
+
if (act === TaskbarElement.CONFIGURATOR) {
|
93
|
+
this._snkConfigurator.open();
|
94
|
+
}
|
95
|
+
else if (act === TaskbarElement.GRID_MODE) {
|
59
96
|
this.goToView(VIEW_MODE.GRID);
|
60
97
|
}
|
61
98
|
else if (act === TaskbarElement.FORM_MODE) {
|
@@ -73,17 +110,129 @@ export class SnkSimpleCrud {
|
|
73
110
|
this.dataStateChange.emit(newValue);
|
74
111
|
}
|
75
112
|
}
|
76
|
-
|
113
|
+
async observeFormLegacy(newValue, oldValue) {
|
114
|
+
await this.handleUpdateFormLegacyConfig(newValue, oldValue);
|
115
|
+
}
|
116
|
+
async observeGridLegacy(newValue, oldValue) {
|
117
|
+
await this.handleUpdateGridLegacyConfig(newValue, oldValue);
|
118
|
+
}
|
119
|
+
async handleUpdateGridLegacyConfig(newValue, oldValue) {
|
120
|
+
if (newValue == undefined || newValue == oldValue) {
|
121
|
+
return;
|
122
|
+
}
|
123
|
+
if (!this._gridConfigAlreadyLoaded) {
|
124
|
+
return;
|
125
|
+
}
|
126
|
+
await this.loadGridConfig(true);
|
127
|
+
}
|
128
|
+
async handleUpdateFormLegacyConfig(newValue, oldValue) {
|
129
|
+
if (newValue == undefined || newValue == oldValue) {
|
130
|
+
return;
|
131
|
+
}
|
132
|
+
if (!this._formConfigAlreadyLoaded) {
|
133
|
+
return;
|
134
|
+
}
|
135
|
+
this.loadFormConfig(true);
|
136
|
+
}
|
137
|
+
openConfig(viewMode) {
|
138
|
+
this._snkConfigurator.close();
|
139
|
+
if (viewMode === VIEW_MODE.GRID) {
|
140
|
+
this.openGridConfig();
|
141
|
+
}
|
142
|
+
else if (viewMode === VIEW_MODE.FORM) {
|
143
|
+
this.openFormConfig();
|
144
|
+
}
|
145
|
+
}
|
146
|
+
openGridConfig() {
|
147
|
+
this._grid.getColumnsState()
|
148
|
+
.then((gridColumns) => {
|
149
|
+
this._snkGridConfig.columns = gridColumns.filter(c => c.name);
|
150
|
+
this._snkGridConfig.selectedIndex = 0;
|
151
|
+
this._showPopUpGridConfig = true;
|
152
|
+
});
|
153
|
+
}
|
154
|
+
async openFormConfig() {
|
155
|
+
var _a, _b;
|
156
|
+
//No momento não daremos suporte para configuraçao de formulário quando houver legacy config
|
157
|
+
if (this.formLegacyConfigName) {
|
158
|
+
const title = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.formConfigUnavaliable.title", undefined);
|
159
|
+
const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkSimpleCrud.formConfigUnavaliable.message", undefined);
|
160
|
+
await this.application.alert(title, message);
|
161
|
+
return;
|
162
|
+
}
|
163
|
+
this._showFormConfig = true;
|
164
|
+
}
|
165
|
+
addGridLegacyConfigName() {
|
166
|
+
if (this.gridLegacyConfigName && this.configName) {
|
167
|
+
ConfigStorage.addGridLegacyConfig(this.configName, this.gridLegacyConfigName);
|
168
|
+
}
|
169
|
+
}
|
170
|
+
loadGridConfig(forceUpdate) {
|
171
|
+
if (this.configName === undefined) {
|
172
|
+
return;
|
173
|
+
}
|
174
|
+
if ((this.gridConfig != undefined || this._gridConfigAlreadyLoaded) && !forceUpdate) {
|
175
|
+
return;
|
176
|
+
}
|
177
|
+
this.addGridLegacyConfigName();
|
178
|
+
this._gridConfigAlreadyLoaded = true;
|
179
|
+
return new Promise((accept, reject) => {
|
180
|
+
ConfigStorage.loadGridConfig(this.configName, this.resolveResourceID())
|
181
|
+
.then(config => {
|
182
|
+
this.setGridConfig(config);
|
183
|
+
accept();
|
184
|
+
})
|
185
|
+
.catch(reason => {
|
186
|
+
reject(reason);
|
187
|
+
});
|
188
|
+
});
|
189
|
+
}
|
190
|
+
formConfigIsLoaded() {
|
191
|
+
return this.formConfig != undefined || this._formConfigAlreadyLoaded;
|
192
|
+
}
|
193
|
+
async loadFormConfig(forceLoad = false) {
|
194
|
+
if (this.configName === undefined) {
|
195
|
+
return;
|
196
|
+
}
|
197
|
+
if (this._formConfigManager == undefined) {
|
198
|
+
this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
|
199
|
+
this._formConfigManager.setConfig(this.formConfig);
|
200
|
+
}
|
201
|
+
if (this.formConfigIsLoaded() && !forceLoad) {
|
202
|
+
return;
|
203
|
+
}
|
204
|
+
this._formConfigAlreadyLoaded = true;
|
205
|
+
let loadedLegacyConfig = await this._formConfigFetcher.fetchLegacyConfigurableForm(this.formLegacyConfigName);
|
206
|
+
if (loadedLegacyConfig != undefined) {
|
207
|
+
this._formConfigManager.setConfig(loadedLegacyConfig);
|
208
|
+
this.setFormConfig(loadedLegacyConfig);
|
209
|
+
return;
|
210
|
+
}
|
211
|
+
this.setFormConfig(await this._formConfigManager.loadConfig());
|
212
|
+
}
|
213
|
+
async componentWillRender() {
|
214
|
+
this._resourceID = await this.application.getResourceID();
|
77
215
|
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
|
216
|
+
if (this.configName === undefined) {
|
217
|
+
return;
|
218
|
+
}
|
219
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
220
|
+
return;
|
221
|
+
}
|
222
|
+
await this.addGridLegacyConfigName();
|
223
|
+
this.loadGridConfig();
|
224
|
+
this.loadFormConfig();
|
78
225
|
}
|
79
226
|
componentWillLoad() {
|
80
227
|
this.processMetadata();
|
81
228
|
this.onModeChange();
|
82
229
|
this.configDatasource();
|
83
230
|
}
|
231
|
+
componentDidLoad() {
|
232
|
+
CSSVarsUtils.applyVarsGrid(this._element, this._grid);
|
233
|
+
}
|
84
234
|
configDatasource() {
|
85
|
-
|
86
|
-
this._multiSelectionListDataSource.setApplication(application);
|
235
|
+
this._multiSelectionListDataSource.setApplication(this.application);
|
87
236
|
this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
|
88
237
|
}
|
89
238
|
getTaskBarId() {
|
@@ -124,6 +273,27 @@ export class SnkSimpleCrud {
|
|
124
273
|
getRecords() {
|
125
274
|
return Promise.resolve(this.dataUnit.records);
|
126
275
|
}
|
276
|
+
/**
|
277
|
+
* Usado para abrir o configurator do CRUD
|
278
|
+
*/
|
279
|
+
async openConfigurator() {
|
280
|
+
var _a;
|
281
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
|
282
|
+
}
|
283
|
+
/**
|
284
|
+
* Usado para fechar o configurator do CRUD
|
285
|
+
*/
|
286
|
+
async closeConfigurator() {
|
287
|
+
var _a;
|
288
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
|
289
|
+
}
|
290
|
+
updateConfig() {
|
291
|
+
if (this._formConfigManager == undefined) {
|
292
|
+
this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
|
293
|
+
}
|
294
|
+
this._formConfigManager.setConfig(this.formConfig);
|
295
|
+
return;
|
296
|
+
}
|
127
297
|
processMetadata() {
|
128
298
|
const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
|
129
299
|
const fieldMetadata = [];
|
@@ -178,6 +348,14 @@ export class SnkSimpleCrud {
|
|
178
348
|
this.dataUnit.clearSelection();
|
179
349
|
}
|
180
350
|
}
|
351
|
+
handleConfiguratorEvent(evt, type) {
|
352
|
+
evt.stopImmediatePropagation();
|
353
|
+
if (type === 'SAVE') {
|
354
|
+
this.configuratorSave.emit();
|
355
|
+
return;
|
356
|
+
}
|
357
|
+
this.configuratorCancel.emit();
|
358
|
+
}
|
181
359
|
getColumnSearch(actionButton, item) {
|
182
360
|
if (this._columnSearch != undefined) {
|
183
361
|
return this._columnSearch;
|
@@ -219,7 +397,9 @@ export class SnkSimpleCrud {
|
|
219
397
|
return (_b = (_a = this.formConfig) === null || _a === void 0 ? void 0 : _a.fields) !== null && _b !== void 0 ? _b : this._formFields;
|
220
398
|
}
|
221
399
|
handleFormSetFields(fields) {
|
222
|
-
this._formFields
|
400
|
+
if (!ObjectUtils.equals(this._formFields, fields)) {
|
401
|
+
this._formFields = fields !== null && fields !== void 0 ? fields : [];
|
402
|
+
}
|
223
403
|
}
|
224
404
|
fieldsOptionLoader(argument) {
|
225
405
|
const searchTerm = argument === null || argument === void 0 ? void 0 : argument.toLowerCase();
|
@@ -291,11 +471,51 @@ export class SnkSimpleCrud {
|
|
291
471
|
disconnectedCallback() {
|
292
472
|
window.removeEventListener("keydown", this._keyDownHandler);
|
293
473
|
}
|
474
|
+
gridConfigChangeHandler(evt) {
|
475
|
+
const config = evt.detail;
|
476
|
+
ConfigStorage.saveGridConfig(config, this.configName, this.resolveResourceID());
|
477
|
+
evt.stopPropagation();
|
478
|
+
}
|
479
|
+
modalConfigChangeHandler(evt) {
|
480
|
+
const config = evt.detail;
|
481
|
+
this._grid.setColumnsState(config.columns)
|
482
|
+
.then(() => {
|
483
|
+
this.setGridConfig(config);
|
484
|
+
this.closeGridConfig();
|
485
|
+
});
|
486
|
+
evt.stopPropagation();
|
487
|
+
}
|
488
|
+
setGridConfig(config) {
|
489
|
+
this.gridConfig = config;
|
490
|
+
CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
|
491
|
+
}
|
492
|
+
setFormConfig(config, forceUpdate) {
|
493
|
+
if (this.formConfig && !forceUpdate)
|
494
|
+
return;
|
495
|
+
this.formConfig = config;
|
496
|
+
}
|
497
|
+
closeGridConfig() {
|
498
|
+
this._showPopUpGridConfig = false;
|
499
|
+
}
|
500
|
+
closeFormConfig() {
|
501
|
+
this._showFormConfig = false;
|
502
|
+
}
|
503
|
+
//No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
|
504
|
+
handleShowFormConfig() {
|
505
|
+
return this._showFormConfig && !this.formLegacyConfigName;
|
506
|
+
}
|
507
|
+
resolveResourceID() {
|
508
|
+
return StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
|
509
|
+
}
|
510
|
+
/* istanbul ignore next */
|
294
511
|
render() {
|
295
|
-
var _a;
|
296
|
-
|
512
|
+
var _a, _b, _c;
|
513
|
+
if (this.dataUnit == undefined) {
|
514
|
+
return;
|
515
|
+
}
|
516
|
+
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
297
517
|
? undefined
|
298
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this.
|
518
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit, this.ignoreReadOnlyFormFields), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
299
519
|
}
|
300
520
|
static get is() { return "snk-simple-crud"; }
|
301
521
|
static get encapsulation() { return "scoped"; }
|
@@ -376,7 +596,7 @@ export class SnkSimpleCrud {
|
|
376
596
|
},
|
377
597
|
"gridConfig": {
|
378
598
|
"type": "unknown",
|
379
|
-
"mutable":
|
599
|
+
"mutable": true,
|
380
600
|
"complexType": {
|
381
601
|
"original": "IGridConfig",
|
382
602
|
"resolved": "IGridConfig",
|
@@ -396,7 +616,7 @@ export class SnkSimpleCrud {
|
|
396
616
|
},
|
397
617
|
"formConfig": {
|
398
618
|
"type": "unknown",
|
399
|
-
"mutable":
|
619
|
+
"mutable": true,
|
400
620
|
"complexType": {
|
401
621
|
"original": "IFormConfig",
|
402
622
|
"resolved": "IFormConfig",
|
@@ -449,6 +669,23 @@ export class SnkSimpleCrud {
|
|
449
669
|
"reflect": false,
|
450
670
|
"defaultValue": "true"
|
451
671
|
},
|
672
|
+
"resourceID": {
|
673
|
+
"type": "string",
|
674
|
+
"mutable": false,
|
675
|
+
"complexType": {
|
676
|
+
"original": "string",
|
677
|
+
"resolved": "string",
|
678
|
+
"references": {}
|
679
|
+
},
|
680
|
+
"required": false,
|
681
|
+
"optional": false,
|
682
|
+
"docs": {
|
683
|
+
"tags": [],
|
684
|
+
"text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
|
685
|
+
},
|
686
|
+
"attribute": "resource-i-d",
|
687
|
+
"reflect": false
|
688
|
+
},
|
452
689
|
"taskbarManager": {
|
453
690
|
"type": "unknown",
|
454
691
|
"mutable": false,
|
@@ -546,14 +783,86 @@ export class SnkSimpleCrud {
|
|
546
783
|
},
|
547
784
|
"attribute": "config-name",
|
548
785
|
"reflect": false
|
786
|
+
},
|
787
|
+
"showConfiguratorButtons": {
|
788
|
+
"type": "boolean",
|
789
|
+
"mutable": false,
|
790
|
+
"complexType": {
|
791
|
+
"original": "boolean",
|
792
|
+
"resolved": "boolean",
|
793
|
+
"references": {}
|
794
|
+
},
|
795
|
+
"required": false,
|
796
|
+
"optional": false,
|
797
|
+
"docs": {
|
798
|
+
"tags": [],
|
799
|
+
"text": "Usado para exibir os bot\u00F5es de a\u00E7\u00E3o do snk-configurator."
|
800
|
+
},
|
801
|
+
"attribute": "show-configurator-buttons",
|
802
|
+
"reflect": false
|
803
|
+
},
|
804
|
+
"gridLegacyConfigName": {
|
805
|
+
"type": "string",
|
806
|
+
"mutable": false,
|
807
|
+
"complexType": {
|
808
|
+
"original": "string",
|
809
|
+
"resolved": "string",
|
810
|
+
"references": {}
|
811
|
+
},
|
812
|
+
"required": false,
|
813
|
+
"optional": false,
|
814
|
+
"docs": {
|
815
|
+
"tags": [],
|
816
|
+
"text": "Chave da configura\u00E7\u00E3o legado da grade."
|
817
|
+
},
|
818
|
+
"attribute": "grid-legacy-config-name",
|
819
|
+
"reflect": false
|
820
|
+
},
|
821
|
+
"formLegacyConfigName": {
|
822
|
+
"type": "string",
|
823
|
+
"mutable": false,
|
824
|
+
"complexType": {
|
825
|
+
"original": "string",
|
826
|
+
"resolved": "string",
|
827
|
+
"references": {}
|
828
|
+
},
|
829
|
+
"required": false,
|
830
|
+
"optional": false,
|
831
|
+
"docs": {
|
832
|
+
"tags": [],
|
833
|
+
"text": "Chave da configura\u00E7\u00E3o legado do formul\u00E1rio."
|
834
|
+
},
|
835
|
+
"attribute": "form-legacy-config-name",
|
836
|
+
"reflect": false
|
837
|
+
},
|
838
|
+
"ignoreReadOnlyFormFields": {
|
839
|
+
"type": "boolean",
|
840
|
+
"mutable": false,
|
841
|
+
"complexType": {
|
842
|
+
"original": "boolean",
|
843
|
+
"resolved": "boolean",
|
844
|
+
"references": {}
|
845
|
+
},
|
846
|
+
"required": false,
|
847
|
+
"optional": false,
|
848
|
+
"docs": {
|
849
|
+
"tags": [],
|
850
|
+
"text": "Ignora os campos \"somente leitura\" no modo de inser\u00E7\u00E3o."
|
851
|
+
},
|
852
|
+
"attribute": "ignore-read-only-form-fields",
|
853
|
+
"reflect": false,
|
854
|
+
"defaultValue": "false"
|
549
855
|
}
|
550
856
|
};
|
551
857
|
}
|
552
858
|
static get states() {
|
553
859
|
return {
|
860
|
+
"_showPopUpGridConfig": {},
|
861
|
+
"_showFormConfig": {},
|
554
862
|
"_currentViewMode": {},
|
555
863
|
"_config": {},
|
556
864
|
"_fieldToGetFocus": {},
|
865
|
+
"_customContainerId": {},
|
557
866
|
"_formFields": {}
|
558
867
|
};
|
559
868
|
}
|
@@ -635,6 +944,36 @@ export class SnkSimpleCrud {
|
|
635
944
|
}
|
636
945
|
}
|
637
946
|
}
|
947
|
+
}, {
|
948
|
+
"method": "configuratorSave",
|
949
|
+
"name": "configuratorSave",
|
950
|
+
"bubbles": true,
|
951
|
+
"cancelable": true,
|
952
|
+
"composed": true,
|
953
|
+
"docs": {
|
954
|
+
"tags": [],
|
955
|
+
"text": "Emitido quando salva a configura\u00E7\u00E3o no configurator do CRUD."
|
956
|
+
},
|
957
|
+
"complexType": {
|
958
|
+
"original": "any",
|
959
|
+
"resolved": "any",
|
960
|
+
"references": {}
|
961
|
+
}
|
962
|
+
}, {
|
963
|
+
"method": "configuratorCancel",
|
964
|
+
"name": "configuratorCancel",
|
965
|
+
"bubbles": true,
|
966
|
+
"cancelable": true,
|
967
|
+
"composed": true,
|
968
|
+
"docs": {
|
969
|
+
"tags": [],
|
970
|
+
"text": "Emitido quando cancela o salvamento da configura\u00E7\u00E3o no configurator do CRUD."
|
971
|
+
},
|
972
|
+
"complexType": {
|
973
|
+
"original": "any",
|
974
|
+
"resolved": "any",
|
975
|
+
"references": {}
|
976
|
+
}
|
638
977
|
}];
|
639
978
|
}
|
640
979
|
static get methods() {
|
@@ -733,17 +1072,74 @@ export class SnkSimpleCrud {
|
|
733
1072
|
"text": "",
|
734
1073
|
"tags": []
|
735
1074
|
}
|
1075
|
+
},
|
1076
|
+
"openConfigurator": {
|
1077
|
+
"complexType": {
|
1078
|
+
"signature": "() => Promise<void>",
|
1079
|
+
"parameters": [],
|
1080
|
+
"references": {
|
1081
|
+
"Promise": {
|
1082
|
+
"location": "global"
|
1083
|
+
}
|
1084
|
+
},
|
1085
|
+
"return": "Promise<void>"
|
1086
|
+
},
|
1087
|
+
"docs": {
|
1088
|
+
"text": "Usado para abrir o configurator do CRUD",
|
1089
|
+
"tags": []
|
1090
|
+
}
|
1091
|
+
},
|
1092
|
+
"closeConfigurator": {
|
1093
|
+
"complexType": {
|
1094
|
+
"signature": "() => Promise<void>",
|
1095
|
+
"parameters": [],
|
1096
|
+
"references": {
|
1097
|
+
"Promise": {
|
1098
|
+
"location": "global"
|
1099
|
+
}
|
1100
|
+
},
|
1101
|
+
"return": "Promise<void>"
|
1102
|
+
},
|
1103
|
+
"docs": {
|
1104
|
+
"text": "Usado para fechar o configurator do CRUD",
|
1105
|
+
"tags": []
|
1106
|
+
}
|
1107
|
+
},
|
1108
|
+
"updateConfig": {
|
1109
|
+
"complexType": {
|
1110
|
+
"signature": "() => Promise<void>",
|
1111
|
+
"parameters": [],
|
1112
|
+
"references": {
|
1113
|
+
"Promise": {
|
1114
|
+
"location": "global"
|
1115
|
+
}
|
1116
|
+
},
|
1117
|
+
"return": "Promise<void>"
|
1118
|
+
},
|
1119
|
+
"docs": {
|
1120
|
+
"text": "",
|
1121
|
+
"tags": []
|
1122
|
+
}
|
736
1123
|
}
|
737
1124
|
};
|
738
1125
|
}
|
739
1126
|
static get elementRef() { return "_element"; }
|
740
1127
|
static get watchers() {
|
741
1128
|
return [{
|
1129
|
+
"propName": "resourceID",
|
1130
|
+
"methodName": "handleResourceIDChanged"
|
1131
|
+
}, {
|
742
1132
|
"propName": "mode",
|
743
1133
|
"methodName": "onModeChange"
|
744
1134
|
}, {
|
745
1135
|
"propName": "dataState",
|
746
1136
|
"methodName": "observeDataState"
|
1137
|
+
}, {
|
1138
|
+
"propName": "formLegacyConfigName",
|
1139
|
+
"methodName": "observeFormLegacy"
|
1140
|
+
}, {
|
1141
|
+
"propName": "gridLegacyConfigName",
|
1142
|
+
"methodName": "observeGridLegacy"
|
747
1143
|
}];
|
748
1144
|
}
|
749
1145
|
static get listeners() {
|
@@ -118,7 +118,7 @@ export class TaskbarActionsButton {
|
|
118
118
|
this.taskbarActionsButtonDisconnected.emit();
|
119
119
|
}
|
120
120
|
render() {
|
121
|
-
return (h(Host, null, h("div", { class:
|
121
|
+
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) }))));
|
122
122
|
}
|
123
123
|
static get is() { return "taskbar-actions-button"; }
|
124
124
|
static get encapsulation() { return "scoped"; }
|
@@ -86,29 +86,29 @@ export const buildElem = (element, className, dataElementId, getTitle, action, i
|
|
86
86
|
case TaskbarElement.CONFIGURATOR:
|
87
87
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
88
88
|
case TaskbarElement.MORE_OPTIONS:
|
89
|
-
return actionButton(element, dataElementId, title, isEnabled, actions, action);
|
89
|
+
return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
|
90
90
|
case TaskbarElement.DIVIDER:
|
91
|
-
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-
|
91
|
+
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium", "data-taskbar-divider": true });
|
92
92
|
case TaskbarElement.DATA_EXPORTER:
|
93
93
|
const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
94
|
-
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
94
|
+
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
|
95
95
|
case TaskbarElement.ATTACH:
|
96
96
|
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
97
97
|
case TaskbarElement.ACTIONS_BUTTON:
|
98
|
-
return h("snk-actions-button", { "data-element-id": dataElementId });
|
98
|
+
return h("snk-actions-button", { "data-element-id": dataElementId, "data-taskbar-element": element });
|
99
99
|
}
|
100
100
|
};
|
101
101
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
102
|
-
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
102
|
+
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-taskbar-label": text, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
103
103
|
}
|
104
104
|
function iconButton(iconName, name, className, dataElementId, title, action, isEnabled) {
|
105
|
-
return h("ez-button", { key: dataElementId, title: title, mode: "icon", size: "small", class: className, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
|
105
|
+
return h("ez-button", { key: dataElementId, title: title, mode: "icon", size: "small", class: className, "data-taskbar-label": title, "data-taskbar-element": name, "data-taskbar-icon": iconName, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
|
106
106
|
}
|
107
107
|
function iconTextButton(iconName, name, className, dataElementId, text, title, action, isEnabled) {
|
108
|
-
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
108
|
+
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-taskbar-label": text, "data-taskbar-icon": iconName, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
109
109
|
}
|
110
|
-
function actionButton(element, dataElementId, title, isEnabled, actions, action) {
|
110
|
+
function actionButton(element, className, dataElementId, title, isEnabled, actions, action) {
|
111
111
|
return actions && actions.length > 0
|
112
|
-
? h("taskbar-actions-button", { key: dataElementId, title: title, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
112
|
+
? h("taskbar-actions-button", { class: className, key: dataElementId, title: title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
113
113
|
: undefined;
|
114
114
|
}
|