@sankhyalabs/sankhyablocks 8.9.0-rc.1 → 8.9.0-rc.3
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-c15716fd.js → ConfigStorage-90552fe8.js} +2 -2
- package/dist/cjs/{DataFetcher-713f0749.js → DataFetcher-1b1e9ff0.js} +58 -43
- package/dist/cjs/{SnkFormConfigManager-29101e20.js → SnkFormConfigManager-0561602d.js} +2 -2
- package/dist/cjs/Sortable-fb1c4cbb.js +2853 -0
- package/dist/cjs/{auth-fetcher-555ff856.js → auth-fetcher-eee6ec18.js} +1 -1
- package/dist/cjs/{constants-d187e03e.js → constants-35ddd366.js} +4 -0
- package/dist/cjs/{dataunit-fetcher-55f98541.js → dataunit-fetcher-38233d72.js} +3 -2
- package/dist/cjs/{form-config-fetcher-17775a75.js → form-config-fetcher-00372ac0.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-34922b83.js → pesquisa-fetcher-8bc6d0a5.js} +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button.cjs.entry.js +4 -5
- package/dist/cjs/snk-application.cjs.entry.js +6 -7
- package/dist/cjs/snk-attach.cjs.entry.js +3 -4
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +12 -7
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +8 -9
- package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar.cjs.entry.js +3 -4
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -4
- package/dist/cjs/snk-form-config.cjs.entry.js +15 -14
- package/dist/cjs/snk-form.cjs.entry.js +4 -5
- package/dist/cjs/snk-grid-config.cjs.entry.js +4 -5
- package/dist/cjs/snk-grid.cjs.entry.js +9 -4
- package/dist/cjs/{snk-guides-viewer-6dfeec5c.js → snk-guides-viewer-676dd526.js} +6 -6
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -4
- package/dist/cjs/snk-select-box.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +5 -6
- package/dist/cjs/snk-tab-config.cjs.entry.js +12 -11
- package/dist/collection/components/snk-crud/snk-crud.js +25 -0
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +10 -8
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +10 -8
- package/dist/collection/components/snk-grid/snk-grid.js +25 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +2 -1
- package/dist/collection/lib/utils/constants.js +3 -0
- package/dist/components/DataFetcher.js +16 -1
- package/dist/components/constants.js +4 -1
- package/dist/components/dataunit-fetcher.js +2 -1
- package/dist/components/snk-crud.js +8 -1
- package/dist/components/snk-form-config2.js +13 -11
- package/dist/components/snk-grid2.js +8 -1
- package/dist/components/snk-tab-config2.js +2203 -6233
- package/dist/esm/{ConfigStorage-79c81f36.js → ConfigStorage-84abda58.js} +2 -2
- package/dist/esm/{DataFetcher-79f78222.js → DataFetcher-7814568f.js} +16 -1
- package/dist/esm/{SnkFormConfigManager-7723f3ec.js → SnkFormConfigManager-655943d0.js} +2 -2
- package/dist/esm/Sortable-83960219.js +2851 -0
- package/dist/esm/{auth-fetcher-e260d0cd.js → auth-fetcher-06354710.js} +1 -1
- package/dist/esm/{constants-3644f1b6.js → constants-8457af36.js} +4 -1
- package/dist/esm/{dataunit-fetcher-6725cb0e.js → dataunit-fetcher-aa70ea72.js} +3 -2
- package/dist/esm/{form-config-fetcher-e1603e66.js → form-config-fetcher-24f43afd.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-8e922c9d.js → pesquisa-fetcher-f7aaf727.js} +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button.entry.js +4 -5
- package/dist/esm/snk-application.entry.js +6 -7
- package/dist/esm/snk-attach.entry.js +3 -4
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +12 -7
- package/dist/esm/snk-data-exporter.entry.js +2 -3
- package/dist/esm/snk-detail-view.entry.js +8 -9
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-filter-bar.entry.js +3 -4
- package/dist/esm/snk-filter-modal-item.entry.js +3 -4
- package/dist/esm/snk-form-config.entry.js +15 -14
- package/dist/esm/snk-form.entry.js +4 -5
- package/dist/esm/snk-grid-config.entry.js +4 -5
- package/dist/esm/snk-grid.entry.js +9 -4
- package/dist/esm/{snk-guides-viewer-8b47f38c.js → snk-guides-viewer-746e2547.js} +6 -6
- package/dist/esm/snk-guides-viewer.entry.js +8 -9
- package/dist/esm/snk-personalized-filter.entry.js +3 -4
- package/dist/esm/snk-select-box.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +5 -6
- package/dist/esm/snk-tab-config.entry.js +12 -11
- package/dist/sankhyablocks/p-0d5e8a37.entry.js +1 -0
- package/dist/sankhyablocks/p-1a991d41.entry.js +1 -0
- package/dist/sankhyablocks/p-1ae31937.entry.js +1 -0
- package/dist/sankhyablocks/p-25df73bf.entry.js +1 -0
- package/dist/sankhyablocks/p-3b60db06.entry.js +1 -0
- package/dist/sankhyablocks/p-3f0fe056.js +1 -0
- package/dist/sankhyablocks/{p-2e6f1666.js → p-5eb3ac18.js} +1 -1
- package/dist/sankhyablocks/{p-73d3daa8.entry.js → p-5f74c859.entry.js} +1 -1
- package/dist/sankhyablocks/p-6e32de4b.entry.js +1 -0
- package/dist/sankhyablocks/p-718ecd01.entry.js +1 -0
- package/dist/sankhyablocks/p-809a09ac.entry.js +1 -0
- package/dist/sankhyablocks/p-88039a7f.js +1 -0
- package/dist/sankhyablocks/p-8eb67fa4.entry.js +1 -0
- package/dist/sankhyablocks/p-8f307ef2.entry.js +1 -0
- package/dist/sankhyablocks/{p-f30526a7.entry.js → p-95df461f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-838f8234.entry.js → p-98674137.entry.js} +1 -1
- package/dist/sankhyablocks/p-993e27ad.entry.js +1 -0
- package/dist/sankhyablocks/p-a3868fbc.entry.js +1 -0
- package/dist/sankhyablocks/p-a3fbded7.entry.js +1 -0
- package/dist/sankhyablocks/p-a4401f5f.entry.js +1 -0
- package/dist/sankhyablocks/{p-29176742.js → p-a9b6acf1.js} +1 -1
- package/dist/sankhyablocks/p-b0ef4383.js +1 -0
- package/dist/sankhyablocks/{p-08fca9d1.js → p-b54e06ca.js} +1 -1
- package/dist/sankhyablocks/p-c6800fd4.entry.js +1 -0
- package/dist/sankhyablocks/p-d7665a57.entry.js +1 -0
- package/dist/sankhyablocks/{p-41d156dd.js → p-e38f28ae.js} +2 -2
- package/dist/sankhyablocks/{p-4651b43f.js → p-e47d966c.js} +1 -1
- package/dist/sankhyablocks/{p-73407f35.js → p-ee49df44.js} +1 -1
- package/dist/sankhyablocks/{p-de84a3d5.entry.js → p-f3479d53.entry.js} +2 -2
- package/dist/sankhyablocks/p-fa816fb2.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/snk-crud.d.ts +4 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/dist/types/lib/utils/constants.d.ts +3 -4
- package/package.json +2 -2
- package/dist/cjs/_commonjsHelpers-537d719a.js +0 -20
- package/dist/cjs/draggable.bundle-82a25c06.js +0 -6886
- package/dist/components/_commonjsHelpers.js +0 -17
- package/dist/esm/_commonjsHelpers-9943807e.js +0 -17
- package/dist/esm/draggable.bundle-41d56f06.js +0 -6884
- package/dist/sankhyablocks/p-06e76ed2.entry.js +0 -1
- package/dist/sankhyablocks/p-112455b1.js +0 -1
- package/dist/sankhyablocks/p-44865ff1.entry.js +0 -1
- package/dist/sankhyablocks/p-47d20cb0.entry.js +0 -1
- package/dist/sankhyablocks/p-47e4b6c9.entry.js +0 -1
- package/dist/sankhyablocks/p-4a78e118.js +0 -1
- package/dist/sankhyablocks/p-651b4f89.entry.js +0 -1
- package/dist/sankhyablocks/p-7749c662.entry.js +0 -1
- package/dist/sankhyablocks/p-80692cbd.entry.js +0 -1
- package/dist/sankhyablocks/p-94c532bb.entry.js +0 -1
- package/dist/sankhyablocks/p-b2ce189a.entry.js +0 -1
- package/dist/sankhyablocks/p-b6d6b172.js +0 -1
- package/dist/sankhyablocks/p-bbcd3b4d.entry.js +0 -1
- package/dist/sankhyablocks/p-bd628455.entry.js +0 -1
- package/dist/sankhyablocks/p-c9399ce6.js +0 -1
- package/dist/sankhyablocks/p-cab6a969.entry.js +0 -1
- package/dist/sankhyablocks/p-d0b36421.js +0 -1
- package/dist/sankhyablocks/p-d3ec3586.entry.js +0 -1
- package/dist/sankhyablocks/p-e60325bc.entry.js +0 -1
- package/dist/sankhyablocks/p-eac8b93f.entry.js +0 -1
- package/dist/sankhyablocks/p-fda8c84c.entry.js +0 -1
@@ -6,11 +6,10 @@ const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
8
8
|
const CheckMode = require('@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode');
|
9
|
-
const ConfigStorage = require('./ConfigStorage-
|
10
|
-
const constants = require('./constants-
|
11
|
-
require('./form-config-fetcher-
|
12
|
-
require('./DataFetcher-
|
13
|
-
require('./_commonjsHelpers-537d719a.js');
|
9
|
+
const ConfigStorage = require('./ConfigStorage-90552fe8.js');
|
10
|
+
const constants = require('./constants-35ddd366.js');
|
11
|
+
require('./form-config-fetcher-00372ac0.js');
|
12
|
+
require('./DataFetcher-1b1e9ff0.js');
|
14
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
14
|
require('./PrintUtils-bcaeb82f.js');
|
16
15
|
require('./filter-item-type.enum-aa823a00.js');
|
@@ -6,15 +6,14 @@ const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
8
8
|
const taskbarElements = require('./taskbar-elements-39949c7a.js');
|
9
|
-
const ConfigStorage = require('./ConfigStorage-
|
9
|
+
const ConfigStorage = require('./ConfigStorage-90552fe8.js');
|
10
10
|
const index$1 = require('./index-0e663819.js');
|
11
11
|
const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
|
12
12
|
const index$2 = require('./index-102ba62d.js');
|
13
13
|
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-ba5838c2.js');
|
14
14
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
15
|
-
require('./form-config-fetcher-
|
16
|
-
require('./DataFetcher-
|
17
|
-
require('./_commonjsHelpers-537d719a.js');
|
15
|
+
require('./form-config-fetcher-00372ac0.js');
|
16
|
+
require('./DataFetcher-1b1e9ff0.js');
|
18
17
|
require('./PrintUtils-bcaeb82f.js');
|
19
18
|
require('./filter-item-type.enum-aa823a00.js');
|
20
19
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
@@ -94,6 +93,12 @@ const SnkGrid = class {
|
|
94
93
|
var _a;
|
95
94
|
(_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.reload();
|
96
95
|
}
|
96
|
+
/**
|
97
|
+
* Retorna o elemento da filter-bar da grade.
|
98
|
+
*/
|
99
|
+
async getFilterBar() {
|
100
|
+
return this._snkFilterBar;
|
101
|
+
}
|
97
102
|
openGridConfig() {
|
98
103
|
this._grid.getColumnsState()
|
99
104
|
.then((gridColumns) => {
|
@@ -2,21 +2,21 @@
|
|
2
2
|
|
3
3
|
const index = require('./index-f9e81701.js');
|
4
4
|
const core = require('@sankhyalabs/core');
|
5
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
5
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-0561602d.js');
|
6
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
7
7
|
const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
|
8
8
|
const taskbarElements = require('./taskbar-elements-39949c7a.js');
|
9
|
-
const constants = require('./constants-
|
10
|
-
require('./DataFetcher-
|
11
|
-
require('./pesquisa-fetcher-
|
9
|
+
const constants = require('./constants-35ddd366.js');
|
10
|
+
require('./DataFetcher-1b1e9ff0.js');
|
11
|
+
require('./pesquisa-fetcher-8bc6d0a5.js');
|
12
12
|
const index$1 = require('./index-0e663819.js');
|
13
13
|
require('./ISave-d68ce3cd.js');
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
16
|
-
require('./dataunit-fetcher-
|
16
|
+
require('./dataunit-fetcher-38233d72.js');
|
17
17
|
require('./PreloadManager-84466da6.js');
|
18
18
|
require('./filter-item-type.enum-aa823a00.js');
|
19
|
-
require('./form-config-fetcher-
|
19
|
+
require('./form-config-fetcher-00372ac0.js');
|
20
20
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
21
21
|
|
22
22
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-medium:var(--space--medium, 12px);--snk-guides-viewer__header--min-height:94px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-medium);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-medium)}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-medium));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-medium))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
|
@@ -2,14 +2,13 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-676dd526.js');
|
6
6
|
require('./index-f9e81701.js');
|
7
7
|
require('@sankhyalabs/core');
|
8
|
-
require('./SnkFormConfigManager-
|
9
|
-
require('./ConfigStorage-
|
10
|
-
require('./form-config-fetcher-
|
11
|
-
require('./DataFetcher-
|
12
|
-
require('./_commonjsHelpers-537d719a.js');
|
8
|
+
require('./SnkFormConfigManager-0561602d.js');
|
9
|
+
require('./ConfigStorage-90552fe8.js');
|
10
|
+
require('./form-config-fetcher-00372ac0.js');
|
11
|
+
require('./DataFetcher-1b1e9ff0.js');
|
13
12
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
13
|
require('./PrintUtils-bcaeb82f.js');
|
15
14
|
require('./filter-item-type.enum-aa823a00.js');
|
@@ -18,11 +17,11 @@ require('./taskbar-processor-bce3f499.js');
|
|
18
17
|
require('./taskbar-elements-39949c7a.js');
|
19
18
|
require('./index-0e663819.js');
|
20
19
|
require('./index-102ba62d.js');
|
21
|
-
require('./constants-
|
22
|
-
require('./pesquisa-fetcher-
|
20
|
+
require('./constants-35ddd366.js');
|
21
|
+
require('./pesquisa-fetcher-8bc6d0a5.js');
|
23
22
|
require('./ISave-d68ce3cd.js');
|
24
23
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
25
|
-
require('./dataunit-fetcher-
|
24
|
+
require('./dataunit-fetcher-38233d72.js');
|
26
25
|
require('./PreloadManager-84466da6.js');
|
27
26
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
28
27
|
require('./ResourceIDUtils-5ff86aa7.js');
|
@@ -5,14 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-2f7823fc.js');
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
8
|
+
const ConfigStorage = require('./ConfigStorage-90552fe8.js');
|
9
9
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
10
10
|
const index$1 = require('./index-c5771aba.js');
|
11
11
|
const index$2 = require('./index-102ba62d.js');
|
12
12
|
require('./filter-item-type.enum-aa823a00.js');
|
13
|
-
require('./form-config-fetcher-
|
14
|
-
require('./DataFetcher-
|
15
|
-
require('./_commonjsHelpers-537d719a.js');
|
13
|
+
require('./form-config-fetcher-00372ac0.js');
|
14
|
+
require('./DataFetcher-1b1e9ff0.js');
|
16
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
17
16
|
require('./PrintUtils-bcaeb82f.js');
|
18
17
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
|
-
const constants = require('./constants-
|
6
|
+
const constants = require('./constants-35ddd366.js');
|
7
7
|
|
8
8
|
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}";
|
9
9
|
|
@@ -4,22 +4,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const constants = require('./constants-
|
7
|
+
const constants = require('./constants-35ddd366.js');
|
8
8
|
const taskbarElements = require('./taskbar-elements-39949c7a.js');
|
9
|
-
require('./DataFetcher-
|
10
|
-
require('./pesquisa-fetcher-
|
9
|
+
require('./DataFetcher-1b1e9ff0.js');
|
10
|
+
require('./pesquisa-fetcher-8bc6d0a5.js');
|
11
11
|
const index$1 = require('./index-0e663819.js');
|
12
12
|
require('./ISave-d68ce3cd.js');
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
15
|
+
const dataunitFetcher = require('./dataunit-fetcher-38233d72.js');
|
16
16
|
require('./PreloadManager-84466da6.js');
|
17
17
|
require('./filter-item-type.enum-aa823a00.js');
|
18
|
-
require('./form-config-fetcher-
|
18
|
+
require('./form-config-fetcher-00372ac0.js');
|
19
19
|
const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
|
20
20
|
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-ba5838c2.js');
|
21
21
|
require('./index-102ba62d.js');
|
22
|
-
require('./_commonjsHelpers-537d719a.js');
|
23
22
|
require('./PrintUtils-bcaeb82f.js');
|
24
23
|
require('./ResourceIDUtils-5ff86aa7.js');
|
25
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
@@ -3,10 +3,9 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
|
-
const
|
6
|
+
const Sortable = require('./Sortable-fb1c4cbb.js');
|
7
7
|
const core = require('@sankhyalabs/core');
|
8
|
-
const constants = require('./constants-
|
9
|
-
require('./_commonjsHelpers-537d719a.js');
|
8
|
+
const constants = require('./constants-35ddd366.js');
|
10
9
|
|
11
10
|
const snkTabConfigCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}.sc-snk-tab-config-h{--snk-tab-config--backward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--snk-tab-config--forward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--snk-tab-config__lower-bar--background-color:var(--color--disable-primary, #e5eaf0);--snk-tab-config__lower-bar--border:2px solid var(--color--disable-primary, #e5eaf0);--snk-tab-config__tab--color:var(--text--primary, #626e82);--snk-tab-config__tab--font-family:var(--font-pattern, \"Roboto\");--snk-tab-config__tab--font-size:var(--title--small, 14px);--snk-tab-config__tab--padding:var(--space--small, 6px) var(--space--medium, 12px);--snk-tab-config__tab-is-active--color:var(--color--primary, #008561);--snk-tab-config__tab-hover--color:var(--color--secondary, #383c45);--snk-tab-config__tab-is-focused--border:1px dashed var(--color--primary, #008561);--snk-tab-config__tab-label--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--snk-tab-config__tab-label--margin-bottom:var(--space--extra-small, 3px);--snk-tab-config__new-button-icon--color:var(--color--secondary-700, #1C1D22);--snk-tab-config__forward-button--background-color:var(--text--primary, #626e82);--snk-tab-config__forward-button-hover--background-color:var(--color--primary, #008561);--snk-tab-config__left-icon--padding-right:var(--space--small, 6px);--snk-tab-config__left-icon--color:var(--text--disable, #AFB6C0);--snk-tab-config__tab-label-disabled--color:var(--text--disable, #AFB6C0);--snk-tab-config__slot--margin-left:var(--space--small, 6px);display:flex;position:relative;width:100%;overflow:hidden}.tab-config__scroll.sc-snk-tab-config{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.tab-config__lower-bar.sc-snk-tab-config{position:absolute;left:0%;right:0%;top:91%;bottom:0%;border-radius:2px;background-color:var(--snk-tab-config__lower-bar--background-color);border:var(--snk-tab-config__lower-bar--border)}.tab-config__tab.sc-snk-tab-config{display:flex;border:none;background-color:unset;cursor:pointer;align-items:center;justify-content:center;min-width:fit-content;color:var(--snk-tab-config__tab--color);font-family:var(--snk-tab-config__tab--font-family);font-size:var(--snk-tab-config__tab--font-size);padding:var(--snk-tab-config__tab--padding)}.tab-config__tab.sc-snk-tab-config:focus,.tab-config__forward-button.sc-snk-tab-config,.tab-config__backward-button.sc-snk-tab-config{outline:none}.tab-config__tab--is-active.sc-snk-tab-config{position:relative;color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab.sc-snk-tab-config:hover{color:var(--snk-tab-config__tab-hover--color)}.tab-config__tab--is-active.sc-snk-tab-config:hover{color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab--is-active.sc-snk-tab-config::after{content:\"\";position:absolute;width:100%;height:100%;clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out;background-color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab--is-focused.sc-snk-tab-config{border:var(--snk-tab-config__tab-is-focused--border)}.tab-config__tab-label.sc-snk-tab-config{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--snk-tab-config__tab-label--text-shadow);margin-bottom:var(--snk-tab-config__tab-label--margin-bottom)}.tab-config__forward-button.sc-snk-tab-config,.tab-config__backward-button.sc-snk-tab-config{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.tab-config__new-button.sc-snk-tab-config{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.tab-config__new-button.sc-snk-tab-config ez-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__new-button-icon--color)}.tab-config__backward-button.sc-snk-tab-config{left:0px;box-shadow:10px 10px 5px 5px white;background:white}.tab-config__forward-button.sc-snk-tab-config{box-shadow:10px 10px 5px 20px white;background:white}.tab-config__forward-button.sc-snk-tab-config::after,.tab-config__backward-button.sc-snk-tab-config::after{content:'';display:flex;width:10px;height:16px;background-color:var(--snk-tab-config__forward-button--background-color)}.tab-config__forward-button.sc-snk-tab-config::after{-webkit-mask-image:var(--snk-tab-config--forward-icon);mask-image:var(--snk-tab-config--forward-icon)}.tab-config__backward-button.sc-snk-tab-config::after{-webkit-mask-image:var(--snk-tab-config--backward-icon);mask-image:var(--snk-tab-config--backward-icon)}.tab-config__forward-button.sc-snk-tab-config:hover::after,.tab-config__backward-button.sc-snk-tab-config:hover::after{background-color:var(--snk-tab-config__forward-button-hover--background-color)}.tab-config__new-button.sc-snk-tab-config:hover ez-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__forward-button-hover--background-color)}.tab-config__hidden.sc-snk-tab-config{display:none}.tab-config__scroll.sc-snk-tab-config::-webkit-scrollbar{display:none}.tab-config__left-icon.sc-snk-tab-config{padding-right:var(--snk-tab-config__left-icon--padding-right);--ez-icon--color:var(--snk-tab-config__left-icon--color)}.tab-config__left-icon--eye-off.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__left-icon--color)}.tab-config__right-icon.sc-snk-tab-config{visibility:hidden;padding-left:var(--snk-tab-config__left-icon--padding-right)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{visibility:visible}.tab-config__tab--is-active.sc-snk-tab-config .tab-config__right-icon.sc-snk-tab-config{visibility:visible;--ez-icon--color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__tab-hover--color)}.tab-config__tab--is-active.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__tab-is-active--color)}.tab-config__actions-button.sc-snk-tab-config{--ez-actions-button__btn-action--min-width:100px;visibility:hidden;opacity:0;transition:visibility 1s linear, opacity 0.3s linear}.tab-config__tab.sc-snk-tab-config:hover .tab-config__actions-button.sc-snk-tab-config{visibility:visible;opacity:1;transition:visibility 0.2s linear, opacity 0.10s linear}[data-draggable-element].sc-snk-tab-config{cursor:grab}.tab-config__tab-label-disabled.sc-snk-tab-config{color:var(--snk-tab-config__tab-label-disabled--color)}.tab-config__slot.sc-snk-tab-config{margin-left:var(--snk-tab-config__slot--margin-left)}";
|
12
11
|
|
@@ -44,14 +43,15 @@ const SnkTabConfig = class {
|
|
44
43
|
if (this._sortableTab) {
|
45
44
|
this._sortableTab.destroy();
|
46
45
|
}
|
47
|
-
this._sortableTab = new
|
46
|
+
this._sortableTab = new Sortable.Sortable(this._hostElem.querySelectorAll('[data-draggable-parent="tab"]'), {
|
48
47
|
draggable: '[data-draggable-element="tab"]',
|
49
48
|
mirror: {
|
50
49
|
constrainDimensions: true
|
51
|
-
}
|
50
|
+
},
|
51
|
+
distance: constants.CONFIG_EVENTS.dragStartDistance
|
52
52
|
});
|
53
|
-
this._sortableTab.on(constants.
|
54
|
-
this._sortableTab.on(constants.
|
53
|
+
this._sortableTab.on(constants.CONFIG_SORTABLE_EVENTS.dragStart, (evt) => this.controlStartDraggingTab(evt));
|
54
|
+
this._sortableTab.on(constants.CONFIG_SORTABLE_EVENTS.dragStop, (evt) => this.controlStopDraggingTab(evt));
|
55
55
|
}
|
56
56
|
controlStartDraggingTab(evt) {
|
57
57
|
var _a, _b;
|
@@ -226,8 +226,9 @@ const SnkTabConfig = class {
|
|
226
226
|
};
|
227
227
|
return styledLabel;
|
228
228
|
}
|
229
|
-
cancelEditText() {
|
229
|
+
cancelEditText(cancelTextEdition) {
|
230
230
|
var _a;
|
231
|
+
cancelTextEdition.stopPropagation();
|
231
232
|
this._activeEditText = false;
|
232
233
|
if (this._scrollContainer != undefined) {
|
233
234
|
(_a = this._scrollContainer.querySelector('.tab-config__tab--is-active')) === null || _a === void 0 ? void 0 : _a.focus();
|
@@ -249,13 +250,13 @@ const SnkTabConfig = class {
|
|
249
250
|
handleSaveEditionText(editDetails) {
|
250
251
|
const { value, newValue } = editDetails.detail;
|
251
252
|
if (value === newValue) {
|
252
|
-
this.cancelEditText();
|
253
|
+
this.cancelEditText(editDetails);
|
253
254
|
return;
|
254
255
|
}
|
255
256
|
this._processedTabs.forEach((tab) => {
|
256
257
|
if (tab.label === value) {
|
257
258
|
tab.label = newValue;
|
258
|
-
this.cancelEditText();
|
259
|
+
this.cancelEditText(editDetails);
|
259
260
|
this.editionTitleTab.emit(editDetails);
|
260
261
|
}
|
261
262
|
});
|
@@ -321,7 +322,7 @@ const SnkTabConfig = class {
|
|
321
322
|
return index.h("button", { id: tabId, class: `tab-config__tab${isSelected ? " tab-config__tab--is-active" : ""}`, onClick: () => this.handleTabClick(tab), onDblClick: () => { this._activeEditText = true; this._activeEditTextIndex = index$1; }, "data-draggable-element": index$1 > 0 ? "tab" : "", onMouseLeave: () => this.onHideActions(index$1), key: tab.label }, (this._activeEditText === true && this._activeEditTextIndex === index$1 && index$1 > 0) ||
|
322
323
|
index.h(index.Fragment, null, index$1 > 0 && index.h("ez-icon", { iconName: tab.leftIcon || "drag-indicator", class: "tab-config__left-icon" }), (tab.visible === false && index$1 > 0) && index.h("ez-icon", { iconName: tab.leftIcon || "eye-off", class: "tab-config__left-icon tab-config__left-icon--eye-off" }), index.h("span", { class: "tab-config__tab-label" + (tab.visible === false && index$1 > 0 ? " tab-config__tab-label-disabled" : ""), title: tab.label }, tab.label), index$1 > 0 &&
|
323
324
|
index.h("ez-actions-button", { class: "tab-config__actions-button", size: "small", ref: elem => this._refTabActions[index$1] = elem, actions: tab.visible === false ? this._actionsShow : this._actionsHide, isTransparent: true, arrowActive: true, onEzAction: (ev) => this.handleActions(ev, tab) }), index.h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } })), (this._activeEditText === true && index$1 > 0 && this._activeEditTextIndex === index$1) &&
|
324
|
-
index.h("ez-text-edit", { value: tab.label, styled: this.getStyledLabel(tabId), class: "tab-config__edit-text", onSaveEdition: (ev) => this.handleSaveEditionText(ev), onCancelEdition: () => this.cancelEditText() }));
|
325
|
+
index.h("ez-text-edit", { value: tab.label, styled: this.getStyledLabel(tabId), class: "tab-config__edit-text", onSaveEdition: (ev) => this.handleSaveEditionText(ev), onCancelEdition: (ev) => this.cancelEditText(ev) }));
|
325
326
|
})), index.h("button", { class: "tab-config__forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
|
326
327
|
}
|
327
328
|
get _hostElem() { return index.getElement(this); }
|
@@ -58,6 +58,12 @@ export class SnkCrud {
|
|
58
58
|
var _a;
|
59
59
|
(_a = this._snkGrid) === null || _a === void 0 ? void 0 : _a.reloadFilterBar();
|
60
60
|
}
|
61
|
+
/**
|
62
|
+
* Retorna o elemento da filter-bar da grade.
|
63
|
+
*/
|
64
|
+
async getFilterBar() {
|
65
|
+
return await this._snkGrid.getFilterBar();
|
66
|
+
}
|
61
67
|
currentViewModeWatcher(currentView) {
|
62
68
|
this._viewHistory = [...this._viewHistory.slice(-1), currentView];
|
63
69
|
}
|
@@ -559,6 +565,25 @@ export class SnkCrud {
|
|
559
565
|
"text": "Faz o recarregamento da filter-bar do crud, buscando o state no servidor.",
|
560
566
|
"tags": []
|
561
567
|
}
|
568
|
+
},
|
569
|
+
"getFilterBar": {
|
570
|
+
"complexType": {
|
571
|
+
"signature": "() => Promise<HTMLSnkFilterBarElement>",
|
572
|
+
"parameters": [],
|
573
|
+
"references": {
|
574
|
+
"Promise": {
|
575
|
+
"location": "global"
|
576
|
+
},
|
577
|
+
"HTMLSnkFilterBarElement": {
|
578
|
+
"location": "global"
|
579
|
+
}
|
580
|
+
},
|
581
|
+
"return": "Promise<HTMLSnkFilterBarElement>"
|
582
|
+
},
|
583
|
+
"docs": {
|
584
|
+
"text": "Retorna o elemento da filter-bar da grade.",
|
585
|
+
"tags": []
|
586
|
+
}
|
562
587
|
}
|
563
588
|
};
|
564
589
|
}
|
package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js
CHANGED
@@ -2,7 +2,7 @@ import { h, Host } from "@stencil/core";
|
|
2
2
|
import { Sortable } from '@shopify/draggable';
|
3
3
|
import { ObjectUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
4
4
|
import { ApplicationUtils, DialogType } from "@sankhyalabs/ezui/dist/collection/utils";
|
5
|
-
import { ACTION_CONFIG, CONFIG_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "../../../../lib/utils/constants";
|
5
|
+
import { ACTION_CONFIG, CONFIG_EVENTS, CONFIG_SORTABLE_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "../../../../lib/utils/constants";
|
6
6
|
import { UserConfigType } from "../../../../lib/http/data-fetcher/fetchers/form-config-fetcher";
|
7
7
|
import { buildFormConfigFromDataUnit } from "@sankhyalabs/ezui/dist/collection/utils/form";
|
8
8
|
const CONTAINER_ID = {
|
@@ -410,11 +410,12 @@ export class SnkFormConfig {
|
|
410
410
|
draggable: '[data-draggable-element="field"]',
|
411
411
|
mirror: {
|
412
412
|
constrainDimensions: true
|
413
|
-
}
|
413
|
+
},
|
414
|
+
distance: CONFIG_EVENTS.dragStartDistance
|
414
415
|
});
|
415
|
-
this._sortableField.on(
|
416
|
-
this._sortableField.on(
|
417
|
-
this._sortableField.on(
|
416
|
+
this._sortableField.on(CONFIG_SORTABLE_EVENTS.dragStart, (evt) => this.controlStartDraggingField(evt));
|
417
|
+
this._sortableField.on(CONFIG_SORTABLE_EVENTS.dragSorted, (evt) => this.controlSortedDraggingField(evt));
|
418
|
+
this._sortableField.on(CONFIG_SORTABLE_EVENTS.dragStop, (evt) => this.controlStopDraggingField(evt));
|
418
419
|
}
|
419
420
|
controlStartDraggingGroup(evt) {
|
420
421
|
if (this._mouseOnFieldConfig || this._editingTitleGroup) {
|
@@ -440,10 +441,11 @@ export class SnkFormConfig {
|
|
440
441
|
draggable: '[data-draggable-element="group"]',
|
441
442
|
mirror: {
|
442
443
|
constrainDimensions: true
|
443
|
-
}
|
444
|
+
},
|
445
|
+
distance: CONFIG_EVENTS.dragStartDistance
|
444
446
|
});
|
445
|
-
this._sortableGroup.on(
|
446
|
-
this._sortableGroup.on(
|
447
|
+
this._sortableGroup.on(CONFIG_SORTABLE_EVENTS.dragStart, (evt) => this.controlStartDraggingGroup(evt));
|
448
|
+
this._sortableGroup.on(CONFIG_SORTABLE_EVENTS.dragStop, (evt) => this.controlStopDraggingGroup(evt));
|
447
449
|
}
|
448
450
|
loadUserConfig() {
|
449
451
|
if (this.configManager == undefined) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { h, Host, Fragment } from "@stencil/core";
|
2
2
|
import { Sortable } from '@shopify/draggable';
|
3
3
|
import { ApplicationContext, ElementIDUtils } from "@sankhyalabs/core";
|
4
|
-
import { CONFIG_EVENTS, KEY_EVENTS, TAB_NAMES, TYPE_ACTIONS } from "../../../../lib/utils/constants";
|
4
|
+
import { CONFIG_EVENTS, CONFIG_SORTABLE_EVENTS, KEY_EVENTS, TAB_NAMES, TYPE_ACTIONS } from "../../../../lib/utils/constants";
|
5
5
|
export class SnkTabConfig {
|
6
6
|
constructor() {
|
7
7
|
this._refTabActions = [];
|
@@ -33,10 +33,11 @@ export class SnkTabConfig {
|
|
33
33
|
draggable: '[data-draggable-element="tab"]',
|
34
34
|
mirror: {
|
35
35
|
constrainDimensions: true
|
36
|
-
}
|
36
|
+
},
|
37
|
+
distance: CONFIG_EVENTS.dragStartDistance
|
37
38
|
});
|
38
|
-
this._sortableTab.on(
|
39
|
-
this._sortableTab.on(
|
39
|
+
this._sortableTab.on(CONFIG_SORTABLE_EVENTS.dragStart, (evt) => this.controlStartDraggingTab(evt));
|
40
|
+
this._sortableTab.on(CONFIG_SORTABLE_EVENTS.dragStop, (evt) => this.controlStopDraggingTab(evt));
|
40
41
|
}
|
41
42
|
controlStartDraggingTab(evt) {
|
42
43
|
var _a, _b;
|
@@ -211,8 +212,9 @@ export class SnkTabConfig {
|
|
211
212
|
};
|
212
213
|
return styledLabel;
|
213
214
|
}
|
214
|
-
cancelEditText() {
|
215
|
+
cancelEditText(cancelTextEdition) {
|
215
216
|
var _a;
|
217
|
+
cancelTextEdition.stopPropagation();
|
216
218
|
this._activeEditText = false;
|
217
219
|
if (this._scrollContainer != undefined) {
|
218
220
|
(_a = this._scrollContainer.querySelector('.tab-config__tab--is-active')) === null || _a === void 0 ? void 0 : _a.focus();
|
@@ -234,13 +236,13 @@ export class SnkTabConfig {
|
|
234
236
|
handleSaveEditionText(editDetails) {
|
235
237
|
const { value, newValue } = editDetails.detail;
|
236
238
|
if (value === newValue) {
|
237
|
-
this.cancelEditText();
|
239
|
+
this.cancelEditText(editDetails);
|
238
240
|
return;
|
239
241
|
}
|
240
242
|
this._processedTabs.forEach((tab) => {
|
241
243
|
if (tab.label === value) {
|
242
244
|
tab.label = newValue;
|
243
|
-
this.cancelEditText();
|
245
|
+
this.cancelEditText(editDetails);
|
244
246
|
this.editionTitleTab.emit(editDetails);
|
245
247
|
}
|
246
248
|
});
|
@@ -306,7 +308,7 @@ export class SnkTabConfig {
|
|
306
308
|
return h("button", { id: tabId, class: `tab-config__tab${isSelected ? " tab-config__tab--is-active" : ""}`, onClick: () => this.handleTabClick(tab), onDblClick: () => { this._activeEditText = true; this._activeEditTextIndex = index; }, "data-draggable-element": index > 0 ? "tab" : "", onMouseLeave: () => this.onHideActions(index), key: tab.label }, (this._activeEditText === true && this._activeEditTextIndex === index && index > 0) ||
|
307
309
|
h(Fragment, null, index > 0 && h("ez-icon", { iconName: tab.leftIcon || "drag-indicator", class: "tab-config__left-icon" }), (tab.visible === false && index > 0) && h("ez-icon", { iconName: tab.leftIcon || "eye-off", class: "tab-config__left-icon tab-config__left-icon--eye-off" }), h("span", { class: "tab-config__tab-label" + (tab.visible === false && index > 0 ? " tab-config__tab-label-disabled" : ""), title: tab.label }, tab.label), index > 0 &&
|
308
310
|
h("ez-actions-button", { class: "tab-config__actions-button", size: "small", ref: elem => this._refTabActions[index] = elem, actions: tab.visible === false ? this._actionsShow : this._actionsHide, isTransparent: true, arrowActive: true, onEzAction: (ev) => this.handleActions(ev, tab) }), h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } })), (this._activeEditText === true && index > 0 && this._activeEditTextIndex === index) &&
|
309
|
-
h("ez-text-edit", { value: tab.label, styled: this.getStyledLabel(tabId), class: "tab-config__edit-text", onSaveEdition: (ev) => this.handleSaveEditionText(ev), onCancelEdition: () => this.cancelEditText() }));
|
311
|
+
h("ez-text-edit", { value: tab.label, styled: this.getStyledLabel(tabId), class: "tab-config__edit-text", onSaveEdition: (ev) => this.handleSaveEditionText(ev), onCancelEdition: (ev) => this.cancelEditText(ev) }));
|
310
312
|
})), h("button", { class: "tab-config__forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
|
311
313
|
}
|
312
314
|
static get is() { return "snk-tab-config"; }
|
@@ -77,6 +77,12 @@ export class SnkGrid {
|
|
77
77
|
var _a;
|
78
78
|
(_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.reload();
|
79
79
|
}
|
80
|
+
/**
|
81
|
+
* Retorna o elemento da filter-bar da grade.
|
82
|
+
*/
|
83
|
+
async getFilterBar() {
|
84
|
+
return this._snkFilterBar;
|
85
|
+
}
|
80
86
|
openGridConfig() {
|
81
87
|
this._grid.getColumnsState()
|
82
88
|
.then((gridColumns) => {
|
@@ -798,6 +804,25 @@ export class SnkGrid {
|
|
798
804
|
"text": "Faz o recarregamento da filter-bar da grade buscando o state no servidor.",
|
799
805
|
"tags": []
|
800
806
|
}
|
807
|
+
},
|
808
|
+
"getFilterBar": {
|
809
|
+
"complexType": {
|
810
|
+
"signature": "() => Promise<HTMLSnkFilterBarElement>",
|
811
|
+
"parameters": [],
|
812
|
+
"references": {
|
813
|
+
"Promise": {
|
814
|
+
"location": "global"
|
815
|
+
},
|
816
|
+
"HTMLSnkFilterBarElement": {
|
817
|
+
"location": "global"
|
818
|
+
}
|
819
|
+
},
|
820
|
+
"return": "Promise<HTMLSnkFilterBarElement>"
|
821
|
+
},
|
822
|
+
"docs": {
|
823
|
+
"text": "Retorna o elemento da filter-bar da grade.",
|
824
|
+
"tags": []
|
825
|
+
}
|
801
826
|
}
|
802
827
|
};
|
803
828
|
}
|
package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js
CHANGED
@@ -69,6 +69,7 @@ export class DatasetStrategy {
|
|
69
69
|
const dataSetID = dataUnit.dataUnitId;
|
70
70
|
const dataUnitName = dataUnit.name;
|
71
71
|
const entityName = DataUnitFetcher.parseDataUnitName(dataUnitName).entityName;
|
72
|
+
const useParallelLoader = !!(request.limit || request.offset);
|
72
73
|
const requestBody = {
|
73
74
|
serviceName,
|
74
75
|
requestBody: {
|
@@ -84,7 +85,7 @@ export class DatasetStrategy {
|
|
84
85
|
__record__label__: { "fieldType": "S", "userType": "P" }
|
85
86
|
},
|
86
87
|
tryJoinedFields: true,
|
87
|
-
parallelLoader:
|
88
|
+
parallelLoader: useParallelLoader,
|
88
89
|
crudListener: "br.com.sankhya.modelcore.dataset.DataUnitDatasetAdapter",
|
89
90
|
txProperties: this.getTxProperties(dataUnitName, request, sorting),
|
90
91
|
useDefaultRowsLimit: false
|
@@ -35,6 +35,9 @@ export const CONFIG_EVENTS = {
|
|
35
35
|
changeConfig: "changeConfig",
|
36
36
|
configChanged: "configChanged",
|
37
37
|
fieldChanged: "ezChange",
|
38
|
+
dragStartDistance: 40
|
39
|
+
};
|
40
|
+
export const CONFIG_SORTABLE_EVENTS = {
|
38
41
|
dragStart: "sortable:start",
|
39
42
|
dragSort: "sortable:sort",
|
40
43
|
dragSorted: "sortable:sorted",
|
@@ -1,8 +1,23 @@
|
|
1
1
|
import { DataType, ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils } from '@sankhyalabs/core';
|
2
|
-
import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers.js';
|
3
2
|
import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
4
3
|
import { P as PrintUtils } from './PrintUtils.js';
|
5
4
|
|
5
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
6
|
+
|
7
|
+
function createCommonjsModule(fn, basedir, module) {
|
8
|
+
return module = {
|
9
|
+
path: basedir,
|
10
|
+
exports: {},
|
11
|
+
require: function (path, base) {
|
12
|
+
return commonjsRequire();
|
13
|
+
}
|
14
|
+
}, fn(module, module.exports), module.exports;
|
15
|
+
}
|
16
|
+
|
17
|
+
function commonjsRequire () {
|
18
|
+
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
19
|
+
}
|
20
|
+
|
6
21
|
var browserPonyfill = createCommonjsModule(function (module, exports) {
|
7
22
|
var global = typeof self !== 'undefined' ? self : commonjsGlobal;
|
8
23
|
var __self__ = (function () {
|
@@ -32,6 +32,9 @@ const CONFIG_EVENTS = {
|
|
32
32
|
changeConfig: "changeConfig",
|
33
33
|
configChanged: "configChanged",
|
34
34
|
fieldChanged: "ezChange",
|
35
|
+
dragStartDistance: 40
|
36
|
+
};
|
37
|
+
const CONFIG_SORTABLE_EVENTS = {
|
35
38
|
dragStart: "sortable:start",
|
36
39
|
dragSort: "sortable:sort",
|
37
40
|
dragSorted: "sortable:sorted",
|
@@ -87,4 +90,4 @@ var SIMPLE_CRUD_MODE;
|
|
87
90
|
SIMPLE_CRUD_MODE[SIMPLE_CRUD_MODE["IN_MEMORY"] = 1] = "IN_MEMORY";
|
88
91
|
})(SIMPLE_CRUD_MODE || (SIMPLE_CRUD_MODE = {}));
|
89
92
|
|
90
|
-
export { ACTION_CONFIG as A, CONFIG_EVENTS as C, DEFAULT_TYPE as D, KEY_EVENTS as K, ORDER_VALUES as O, REPORT_LAUNCHER_RESOURCE_ID as R, SIMPLE_CRUD_MODE as S, TAGS_BY_TYPE as T, VIEW_MODE as V, VARS_BY_TYPE as a,
|
93
|
+
export { ACTION_CONFIG as A, CONFIG_EVENTS as C, DEFAULT_TYPE as D, KEY_EVENTS as K, ORDER_VALUES as O, REPORT_LAUNCHER_RESOURCE_ID as R, SIMPLE_CRUD_MODE as S, TAGS_BY_TYPE as T, VIEW_MODE as V, VARS_BY_TYPE as a, CONFIG_SORTABLE_EVENTS as b, TAB_NAMES as c, TYPE_ACTIONS as d };
|
@@ -591,6 +591,7 @@ class DatasetStrategy {
|
|
591
591
|
const dataSetID = dataUnit.dataUnitId;
|
592
592
|
const dataUnitName = dataUnit.name;
|
593
593
|
const entityName = DataUnitFetcher.parseDataUnitName(dataUnitName).entityName;
|
594
|
+
const useParallelLoader = !!(request.limit || request.offset);
|
594
595
|
const requestBody = {
|
595
596
|
serviceName,
|
596
597
|
requestBody: {
|
@@ -606,7 +607,7 @@ class DatasetStrategy {
|
|
606
607
|
__record__label__: { "fieldType": "S", "userType": "P" }
|
607
608
|
},
|
608
609
|
tryJoinedFields: true,
|
609
|
-
parallelLoader:
|
610
|
+
parallelLoader: useParallelLoader,
|
610
611
|
crudListener: "br.com.sankhya.modelcore.dataset.DataUnitDatasetAdapter",
|
611
612
|
txProperties: this.getTxProperties(dataUnitName, request, sorting),
|
612
613
|
useDefaultRowsLimit: false
|
@@ -96,6 +96,12 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
96
96
|
var _a;
|
97
97
|
(_a = this._snkGrid) === null || _a === void 0 ? void 0 : _a.reloadFilterBar();
|
98
98
|
}
|
99
|
+
/**
|
100
|
+
* Retorna o elemento da filter-bar da grade.
|
101
|
+
*/
|
102
|
+
async getFilterBar() {
|
103
|
+
return await this._snkGrid.getFilterBar();
|
104
|
+
}
|
99
105
|
currentViewModeWatcher(currentView) {
|
100
106
|
this._viewHistory = [...this._viewHistory.slice(-1), currentView];
|
101
107
|
}
|
@@ -238,7 +244,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
238
244
|
"goToView": [64],
|
239
245
|
"openConfigurator": [64],
|
240
246
|
"closeConfigurator": [64],
|
241
|
-
"reloadFilterBar": [64]
|
247
|
+
"reloadFilterBar": [64],
|
248
|
+
"getFilterBar": [64]
|
242
249
|
}]);
|
243
250
|
function defineCustomElement$1() {
|
244
251
|
if (typeof customElements === "undefined") {
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import { a as
|
2
|
+
import { a as Sortable, d as defineCustomElement$1 } from './snk-tab-config2.js';
|
3
3
|
import { ObjectUtils, ElementIDUtils, ArrayUtils } from '@sankhyalabs/core';
|
4
4
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
5
|
-
import { C as CONFIG_EVENTS, b as TAB_NAMES, A as ACTION_CONFIG, D as DEFAULT_TYPE } from './constants.js';
|
5
|
+
import { C as CONFIG_EVENTS, b as CONFIG_SORTABLE_EVENTS, c as TAB_NAMES, A as ACTION_CONFIG, D as DEFAULT_TYPE } from './constants.js';
|
6
6
|
import { U as UserConfigType } from './form-config-fetcher.js';
|
7
7
|
import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
8
8
|
import { d as defineCustomElement$3 } from './snk-config-options2.js';
|
@@ -412,15 +412,16 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
412
412
|
if (this._sortableField) {
|
413
413
|
this._sortableField.destroy();
|
414
414
|
}
|
415
|
-
this._sortableField = new
|
415
|
+
this._sortableField = new Sortable(this._sortableContainer.querySelectorAll('[data-draggable-parent="field"]'), {
|
416
416
|
draggable: '[data-draggable-element="field"]',
|
417
417
|
mirror: {
|
418
418
|
constrainDimensions: true
|
419
|
-
}
|
419
|
+
},
|
420
|
+
distance: CONFIG_EVENTS.dragStartDistance
|
420
421
|
});
|
421
|
-
this._sortableField.on(
|
422
|
-
this._sortableField.on(
|
423
|
-
this._sortableField.on(
|
422
|
+
this._sortableField.on(CONFIG_SORTABLE_EVENTS.dragStart, (evt) => this.controlStartDraggingField(evt));
|
423
|
+
this._sortableField.on(CONFIG_SORTABLE_EVENTS.dragSorted, (evt) => this.controlSortedDraggingField(evt));
|
424
|
+
this._sortableField.on(CONFIG_SORTABLE_EVENTS.dragStop, (evt) => this.controlStopDraggingField(evt));
|
424
425
|
}
|
425
426
|
controlStartDraggingGroup(evt) {
|
426
427
|
if (this._mouseOnFieldConfig || this._editingTitleGroup) {
|
@@ -442,14 +443,15 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
442
443
|
if (this._sortableGroup) {
|
443
444
|
this._sortableGroup.destroy();
|
444
445
|
}
|
445
|
-
this._sortableGroup = new
|
446
|
+
this._sortableGroup = new Sortable(this._sortableContainer.querySelectorAll('[data-draggable-parent="group"]'), {
|
446
447
|
draggable: '[data-draggable-element="group"]',
|
447
448
|
mirror: {
|
448
449
|
constrainDimensions: true
|
449
|
-
}
|
450
|
+
},
|
451
|
+
distance: CONFIG_EVENTS.dragStartDistance
|
450
452
|
});
|
451
|
-
this._sortableGroup.on(
|
452
|
-
this._sortableGroup.on(
|
453
|
+
this._sortableGroup.on(CONFIG_SORTABLE_EVENTS.dragStart, (evt) => this.controlStartDraggingGroup(evt));
|
454
|
+
this._sortableGroup.on(CONFIG_SORTABLE_EVENTS.dragStop, (evt) => this.controlStopDraggingGroup(evt));
|
453
455
|
}
|
454
456
|
loadUserConfig() {
|
455
457
|
if (this.configManager == undefined) {
|
@@ -98,6 +98,12 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
98
98
|
var _a;
|
99
99
|
(_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.reload();
|
100
100
|
}
|
101
|
+
/**
|
102
|
+
* Retorna o elemento da filter-bar da grade.
|
103
|
+
*/
|
104
|
+
async getFilterBar() {
|
105
|
+
return this._snkFilterBar;
|
106
|
+
}
|
101
107
|
openGridConfig() {
|
102
108
|
this._grid.getColumnsState()
|
103
109
|
.then((gridColumns) => {
|
@@ -389,7 +395,8 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
389
395
|
"showConfig": [64],
|
390
396
|
"hideConfig": [64],
|
391
397
|
"setConfig": [64],
|
392
|
-
"reloadFilterBar": [64]
|
398
|
+
"reloadFilterBar": [64],
|
399
|
+
"getFilterBar": [64]
|
393
400
|
}]);
|
394
401
|
function defineCustomElement() {
|
395
402
|
if (typeof customElements === "undefined") {
|