@sankhyalabs/sankhyablocks 5.4.3 → 5.5.0
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/{SnkMessageBuilder-115e8a80.js → SnkMessageBuilder-26da04f7.js} +35 -1
- package/dist/cjs/{constants-ae0ed870.js → constants-3787fa32.js} +1 -0
- package/dist/cjs/dataunit-fetcher-8f5ade55.js +319 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +3 -315
- package/dist/cjs/snk-attach.cjs.entry.js +449 -0
- 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 +22 -13
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
- package/dist/cjs/{snk-data-unit-aa613f3b.js → snk-data-unit-c43df27b.js} +4 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +4 -5
- package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +11 -4
- package/dist/cjs/{snk-guides-viewer-7db960c2.js → snk-guides-viewer-e6a65393.js} +2 -2
- package/dist/cjs/snk-guides-viewer.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 → snk-simple-bar_2.cjs.entry.js} +47 -5
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +5 -4
- package/dist/cjs/taskbar-elements-80285601.js +313 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/snk-attach/interfaces/index.js +1 -0
- package/dist/collection/components/snk-attach/snk-attach.css +8 -0
- package/dist/collection/components/snk-attach/snk-attach.js +202 -0
- package/dist/collection/components/snk-attach/structure/crud-config-builder.js +37 -0
- package/dist/collection/components/snk-attach/structure/data-unit-builder.js +106 -0
- package/dist/collection/components/snk-attach/structure/index.js +3 -0
- package/dist/collection/components/snk-attach/structure/taskbar-builder.js +47 -0
- package/dist/collection/components/snk-configurator/snk-configurator.js +3 -3
- package/dist/collection/components/snk-crud/snk-crud.js +22 -11
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +21 -0
- package/dist/collection/components/snk-grid/snk-grid.js +11 -3
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +37 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +65 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +4 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/attach-fetcher.js +136 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/ISave.js +6 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/index.js +3 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +5 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +27 -0
- package/dist/collection/lib/message/resources/snk-simple-bar.msg.js +3 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -0
- package/dist/collection/lib/utils/constants.js +1 -0
- package/dist/components/SnkMessageBuilder.js +35 -1
- package/dist/components/constants.js +1 -0
- package/dist/components/dataunit-fetcher.js +317 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-application2.js +2 -314
- package/dist/components/snk-attach.d.ts +11 -0
- package/dist/components/snk-attach.js +6 -0
- package/dist/components/snk-attach2.js +498 -0
- package/dist/components/snk-crud.js +77 -48
- package/dist/components/snk-data-unit2.js +4 -0
- package/dist/components/snk-grid2.js +11 -4
- package/dist/components/snk-simple-bar.js +1 -41
- package/dist/components/snk-simple-bar2.js +59 -0
- package/dist/components/snk-simple-crud.js +1 -328
- package/dist/{esm/snk-simple-crud.entry.js → components/snk-simple-crud2.js} +73 -18
- package/dist/components/snk-taskbar2.js +7 -2
- package/dist/esm/{SnkMessageBuilder-a15d22f8.js → SnkMessageBuilder-7a9392e6.js} +35 -1
- package/dist/esm/{constants-15617e7d.js → constants-e916ccc3.js} +1 -0
- package/dist/esm/dataunit-fetcher-d32c6a47.js +317 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +3 -315
- package/dist/esm/snk-attach.entry.js +445 -0
- 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 +23 -14
- package/dist/esm/snk-data-exporter.entry.js +3 -3
- package/dist/esm/{snk-data-unit-5ed93c0e.js → snk-data-unit-f9e4c694.js} +4 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +4 -5
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-grid-config.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +11 -4
- package/dist/esm/{snk-guides-viewer-1e7c21f6.js → snk-guides-viewer-62a9f74d.js} +2 -2
- package/dist/esm/snk-guides-viewer.entry.js +3 -4
- package/dist/esm/snk-select-box.entry.js +1 -1
- package/dist/esm/snk-simple-bar_2.entry.js +324 -0
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +5 -4
- package/dist/esm/taskbar-elements-055ba1ad.js +309 -0
- package/dist/sankhyablocks/p-17375123.js +1 -0
- package/dist/sankhyablocks/{p-b80cf644.entry.js → p-1c0ee011.entry.js} +1 -1
- package/dist/sankhyablocks/p-4512cc6c.entry.js +1 -0
- package/dist/sankhyablocks/p-5cbbe1f7.entry.js +1 -0
- package/dist/sankhyablocks/p-63d01871.entry.js +1 -0
- package/dist/sankhyablocks/{p-0a1e7f75.entry.js → p-6ac29569.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f4d36823.entry.js → p-6f0b3cc0.entry.js} +1 -1
- package/dist/sankhyablocks/p-741b00ef.entry.js +1 -0
- package/dist/sankhyablocks/{p-6516f35a.entry.js → p-86f75e7a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-32599159.entry.js → p-8b02b276.entry.js} +1 -1
- package/dist/sankhyablocks/p-92a0fca4.js +1 -0
- package/dist/sankhyablocks/p-999d1953.entry.js +1 -0
- package/dist/sankhyablocks/{p-9bfa3cfb.entry.js → p-a412992c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-703dddb9.js → p-aeffd219.js} +1 -1
- package/dist/sankhyablocks/p-b2523981.entry.js +11 -0
- package/dist/sankhyablocks/p-c3efd4eb.entry.js +1 -0
- package/dist/sankhyablocks/{p-3169584f.entry.js → p-e0b4aec3.entry.js} +1 -1
- package/dist/sankhyablocks/p-ebe876f5.entry.js +1 -0
- package/dist/sankhyablocks/p-ed438690.js +1 -0
- package/dist/sankhyablocks/p-f2223502.js +1 -0
- package/dist/sankhyablocks/p-f3d0c744.entry.js +1 -0
- package/dist/sankhyablocks/p-f821768b.js +74 -0
- package/dist/sankhyablocks/{p-f29caa0a.entry.js → p-f8c66aa3.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/interfaces/index.d.ts +10 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +45 -0
- package/dist/types/components/snk-attach/structure/crud-config-builder.d.ts +7 -0
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +16 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +3 -0
- package/dist/types/components/snk-attach/structure/taskbar-builder.d.ts +8 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +5 -0
- package/dist/types/components/snk-simple-bar/snk-simple-bar.d.ts +14 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -0
- package/dist/types/components.d.ts +67 -0
- package/dist/types/global.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +8 -2
- package/dist/types/lib/http/data-fetcher/fetchers/attach-fetcher.d.ts +14 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.d.ts +13 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/ISave.d.ts +26 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/index.d.ts +3 -0
- package/dist/types/lib/message/resources/snk-attach.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-simple-bar.msg.d.ts +1 -0
- package/dist/types/lib/utils/constants.d.ts +2 -1
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/index-fc7ca86c.js +0 -200
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -30
- package/dist/cjs/taskbar-elements-5e87cf44.js +0 -115
- package/dist/esm/index-e467ade5.js +0 -198
- package/dist/esm/snk-simple-bar.entry.js +0 -26
- package/dist/esm/taskbar-elements-10d80c79.js +0 -112
- package/dist/sankhyablocks/p-1393dc00.entry.js +0 -1
- package/dist/sankhyablocks/p-1c17eecf.entry.js +0 -1
- package/dist/sankhyablocks/p-2ecf14ff.js +0 -1
- package/dist/sankhyablocks/p-340d6fb0.entry.js +0 -84
- package/dist/sankhyablocks/p-74724fa7.js +0 -1
- package/dist/sankhyablocks/p-79f01b63.entry.js +0 -1
- package/dist/sankhyablocks/p-81e85890.entry.js +0 -1
- package/dist/sankhyablocks/p-94e6fc90.entry.js +0 -1
- package/dist/sankhyablocks/p-98f7f796.js +0 -1
- package/dist/sankhyablocks/p-b3e71248.entry.js +0 -1
- package/dist/sankhyablocks/p-bc281de0.js +0 -1
- package/dist/sankhyablocks/p-d61759a5.entry.js +0 -1
- package/dist/sankhyablocks/p-d65809d5.entry.js +0 -1
- package/dist/sankhyablocks/p-f587a454.js +0 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -259
- package/dist/types/components/snk-crud/snk-crud.d.ts +0 -73
- package/dist/types/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.d.ts +0 -40
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +0 -27
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +0 -23
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +0 -23
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +0 -29
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +0 -25
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +0 -19
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +0 -38
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +0 -74
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +0 -53
- package/dist/types/components/snk-grid/snk-grid.d.ts +0 -95
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +0 -59
@@ -1,10 +1,10 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-cfd4bb13.js';
|
2
|
-
import { ElementIDUtils, ApplicationContext, DataType } from '@sankhyalabs/core';
|
2
|
+
import { VersionUtils, ElementIDUtils, ApplicationContext, DataType } from '@sankhyalabs/core';
|
3
3
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
4
|
+
import { T as TaskbarElement, s as store } from './taskbar-elements-055ba1ad.js';
|
4
5
|
import { C as ConfigStorage } from './ConfigStorage-ac77ff39.js';
|
5
6
|
import { P as PresentationMode } from './index-6519a79e.js';
|
6
7
|
import { T as TaskbarProcessor } from './taskbar-processor-94402e6e.js';
|
7
|
-
import { s as store } from './index-e467ade5.js';
|
8
8
|
import './form-config-fetcher-018e7e73.js';
|
9
9
|
import './DataFetcher-b3d8b2d5.js';
|
10
10
|
import './_commonjsHelpers-9943807e.js';
|
@@ -24,7 +24,7 @@ const SnkGrid = class {
|
|
24
24
|
});
|
25
25
|
this._headerTaskbarProcessor = new TaskbarProcessor({
|
26
26
|
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER"],
|
27
|
-
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH", "DATA_EXPORTER"],
|
27
|
+
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", this.getAttachAvailable(), "REFRESH", "DATA_EXPORTER"],
|
28
28
|
"snkGridHeaderTaskbar.detail.unselected": ["REFRESH"],
|
29
29
|
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
30
30
|
});
|
@@ -65,6 +65,13 @@ const SnkGrid = class {
|
|
65
65
|
async setConfig(config) {
|
66
66
|
this.setGridConfig(config);
|
67
67
|
}
|
68
|
+
getAttachAvailable() {
|
69
|
+
var _a;
|
70
|
+
const isValidVersion = VersionUtils.isRequiredVersion((_a = window.envContext) === null || _a === void 0 ? void 0 : _a.sysVersion, '4.22');
|
71
|
+
if (isValidVersion)
|
72
|
+
return TaskbarElement.ATTACH;
|
73
|
+
return "";
|
74
|
+
}
|
68
75
|
openGridConfig() {
|
69
76
|
this._grid.getColumnsState()
|
70
77
|
.then((gridColumns) => {
|
@@ -234,7 +241,7 @@ const SnkGrid = class {
|
|
234
241
|
const disabledButtons = [];
|
235
242
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) {
|
236
243
|
if (this._dataState.selectionInfo.length > 1) {
|
237
|
-
disabledButtons.push(
|
244
|
+
disabledButtons.push(TaskbarElement.CLONE, "ATTACH");
|
238
245
|
}
|
239
246
|
if (this._dataState.selectionInfo.isAllRecords()) {
|
240
247
|
disabledButtons.push("REMOVE");
|
@@ -3,8 +3,8 @@ import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { S as SnkFormConfigManager } from './SnkFormConfigManager-40609500.js';
|
4
4
|
import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
5
5
|
import { T as TaskbarProcessor } from './taskbar-processor-94402e6e.js';
|
6
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
7
|
-
import { c as VIEW_MODE } from './constants-
|
6
|
+
import { T as TaskbarElement } from './taskbar-elements-055ba1ad.js';
|
7
|
+
import { c as VIEW_MODE } from './constants-e916ccc3.js';
|
8
8
|
import './DataFetcher-b3d8b2d5.js';
|
9
9
|
import './pesquisa-fetcher-bd6af0e3.js';
|
10
10
|
import { P as PresentationMode } from './index-6519a79e.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { S as snk_guides_viewer } from './snk-guides-viewer-
|
1
|
+
export { S as snk_guides_viewer } from './snk-guides-viewer-62a9f74d.js';
|
2
2
|
import './index-cfd4bb13.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
4
|
import './SnkFormConfigManager-40609500.js';
|
@@ -8,8 +8,7 @@ import './DataFetcher-b3d8b2d5.js';
|
|
8
8
|
import './_commonjsHelpers-9943807e.js';
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/form';
|
10
10
|
import './taskbar-processor-94402e6e.js';
|
11
|
-
import './taskbar-elements-
|
11
|
+
import './taskbar-elements-055ba1ad.js';
|
12
12
|
import './index-6519a79e.js';
|
13
|
-
import './
|
14
|
-
import './constants-15617e7d.js';
|
13
|
+
import './constants-e916ccc3.js';
|
15
14
|
import './pesquisa-fetcher-bd6af0e3.js';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-cfd4bb13.js';
|
2
|
-
import { O as ORDER_VALUES } from './constants-
|
2
|
+
import { O as ORDER_VALUES } from './constants-e916ccc3.js';
|
3
3
|
|
4
4
|
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}";
|
5
5
|
|
@@ -0,0 +1,324 @@
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-cfd4bb13.js';
|
2
|
+
import { ElementIDUtils, ApplicationContext, DataUnit, StringUtils, SortMode, DataType, ChangeOperation, ObjectUtils, UserInterface } from '@sankhyalabs/core';
|
3
|
+
import { c as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants-e916ccc3.js';
|
4
|
+
import { T as TaskbarElement } from './taskbar-elements-055ba1ad.js';
|
5
|
+
import './DataFetcher-b3d8b2d5.js';
|
6
|
+
import './pesquisa-fetcher-bd6af0e3.js';
|
7
|
+
import { P as PresentationMode } from './index-6519a79e.js';
|
8
|
+
import { T as TaskbarProcessor } from './taskbar-processor-94402e6e.js';
|
9
|
+
import './_commonjsHelpers-9943807e.js';
|
10
|
+
|
11
|
+
const snkSimpleBarCss = ".sc-snk-simple-bar-h{display:flex;height:100%;width:100%}.simple-bar__container.sc-snk-simple-bar{flex:1;display:flex;align-items:stretch;gap:var(--space--small)}.simple-bar__left-slot.sc-snk-simple-bar{min-width:280px;flex:1;display:flex;align-items:center}.simple-bar__right-slot.sc-snk-simple-bar{flex:1;display:flex;align-items:center;justify-content:flex-end}.simple-bar__column.sc-snk-simple-bar{flex:1;display:flex;flex-direction:column}";
|
12
|
+
|
13
|
+
const SnkSimpleBar = class {
|
14
|
+
constructor(hostRef) {
|
15
|
+
registerInstance(this, hostRef);
|
16
|
+
this.clickBreadcrumbItem = createEvent(this, "clickBreadcrumbItem", 3);
|
17
|
+
this.exit = createEvent(this, "exit", 3);
|
18
|
+
this.label = undefined;
|
19
|
+
this.breadcrumbItens = undefined;
|
20
|
+
this.messagesBuilder = undefined;
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
24
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
25
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
26
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-simple-bar.msg.ts"
|
27
|
+
*/
|
28
|
+
getMessage(key, params) {
|
29
|
+
var _a;
|
30
|
+
if (this.messagesBuilder)
|
31
|
+
return this.messagesBuilder.getMessage(key, params);
|
32
|
+
if ((_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder)
|
33
|
+
return this._application.messagesBuilder.getMessage(key, params);
|
34
|
+
}
|
35
|
+
componentDidLoad() {
|
36
|
+
if (!this._element)
|
37
|
+
return;
|
38
|
+
ElementIDUtils.addIDInfo(this._element);
|
39
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
40
|
+
}
|
41
|
+
render() {
|
42
|
+
return (h("div", { class: "simple-bar__container ez-margin-vertical--medium ez-padding--extra-small" }, h("div", { class: "simple-bar__left-slot" }, h("ez-button", { class: "ez-padding-right--medium", title: this.getMessage('snkSimpleBar.backTitle'), mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), h("div", { class: "simple-bar__column" }, h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), h("div", { class: "simple-bar__right-slot" }, h("slot", { name: "rightSlot" }))));
|
43
|
+
}
|
44
|
+
get _element() { return getElement(this); }
|
45
|
+
};
|
46
|
+
SnkSimpleBar.style = snkSimpleBarCss;
|
47
|
+
|
48
|
+
class InMemoryLoader {
|
49
|
+
constructor(metadata, records) {
|
50
|
+
this.records = records || [];
|
51
|
+
this.metadata = metadata;
|
52
|
+
this._dataUnit = new DataUnit("InMemoryDataUnit");
|
53
|
+
this._dataUnit.metadataLoader = () => this.metadaLoader();
|
54
|
+
this._dataUnit.dataLoader = (_dataUnit, request) => this.dataLoader(_dataUnit, request);
|
55
|
+
this._dataUnit.saveLoader = (_dataUnit, changes) => this.saveLoader(_dataUnit, changes);
|
56
|
+
this._dataUnit.removeLoader = (_dataUnit, recordIds) => this.removeLoader(_dataUnit, recordIds);
|
57
|
+
this.dataUnit.loadMetadata().then(() => this.dataUnit.loadData());
|
58
|
+
}
|
59
|
+
get dataUnit() {
|
60
|
+
return this._dataUnit;
|
61
|
+
}
|
62
|
+
get records() {
|
63
|
+
return this._records;
|
64
|
+
}
|
65
|
+
set records(records) {
|
66
|
+
this._records = records === null || records === void 0 ? void 0 : records.map(record => {
|
67
|
+
if (!record["__record__id__"]) {
|
68
|
+
record["__record__id__"] = this.generateUniqueId();
|
69
|
+
}
|
70
|
+
return record;
|
71
|
+
});
|
72
|
+
if (this._dataUnit) {
|
73
|
+
this._dataUnit.records = [...this._records];
|
74
|
+
}
|
75
|
+
}
|
76
|
+
get metadata() {
|
77
|
+
return this._metadata;
|
78
|
+
}
|
79
|
+
set metadata(metadata) {
|
80
|
+
this._metadata = metadata;
|
81
|
+
if (this._dataUnit) {
|
82
|
+
this._dataUnit.metadata = this._metadata;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
generateUniqueId() {
|
86
|
+
return StringUtils.generateUUID();
|
87
|
+
}
|
88
|
+
metadaLoader() {
|
89
|
+
return Promise.resolve(this._metadata);
|
90
|
+
}
|
91
|
+
dataLoader(_dataUnit, request) {
|
92
|
+
let records = [...this._records];
|
93
|
+
if (request.sort) {
|
94
|
+
request.sort.forEach(sort => {
|
95
|
+
records = records.sort((recordA, recordB) => {
|
96
|
+
const fieldA = recordA[sort.field];
|
97
|
+
const fieldB = recordB[sort.field];
|
98
|
+
const sortFn = this.getSortFn(sort.dataType);
|
99
|
+
return sortFn(fieldA, fieldB) * (sort.mode == SortMode.ASC ? 1 : -1);
|
100
|
+
});
|
101
|
+
});
|
102
|
+
}
|
103
|
+
return Promise.resolve({ records: records });
|
104
|
+
}
|
105
|
+
getSortFn(type) {
|
106
|
+
switch (type) {
|
107
|
+
case DataType.NUMBER:
|
108
|
+
return this.sortNumber;
|
109
|
+
case DataType.DATE:
|
110
|
+
return this.sortDate;
|
111
|
+
case DataType.OBJECT:
|
112
|
+
return this.sortObject;
|
113
|
+
default:
|
114
|
+
return StringUtils.compare;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
sortObject(a, b) {
|
118
|
+
return StringUtils.compare(a["label"], b["label"]);
|
119
|
+
}
|
120
|
+
sortNumber(a, b) {
|
121
|
+
return a - b;
|
122
|
+
}
|
123
|
+
sortDate(a, b) {
|
124
|
+
let timeA = a.getTime(), timeB = b.getTime();
|
125
|
+
return timeA === timeB ? 0 : (timeA < timeB ? -1 : 1);
|
126
|
+
}
|
127
|
+
saveLoader(_dataUnit, changes) {
|
128
|
+
return new Promise((resolve) => {
|
129
|
+
let dataUnitRecords = [];
|
130
|
+
changes.forEach(change => {
|
131
|
+
let { record, updatingFields, operation } = change;
|
132
|
+
let isAdd = false;
|
133
|
+
if (operation === ChangeOperation.INSERT ||
|
134
|
+
operation === ChangeOperation.COPY) {
|
135
|
+
record["__old__id__"] = record["__record__id__"];
|
136
|
+
record["__record__id__"] = this.generateUniqueId();
|
137
|
+
isAdd = true;
|
138
|
+
}
|
139
|
+
const changedRecord = Object.assign(Object.assign({}, record), updatingFields);
|
140
|
+
if (isAdd) {
|
141
|
+
this.records.push(changedRecord);
|
142
|
+
}
|
143
|
+
else {
|
144
|
+
const recordIndex = this.records.findIndex(r => r["__record__id__"] == changedRecord["__record__id__"]);
|
145
|
+
this.records[recordIndex] = changedRecord;
|
146
|
+
}
|
147
|
+
dataUnitRecords.push(changedRecord);
|
148
|
+
});
|
149
|
+
resolve(dataUnitRecords);
|
150
|
+
});
|
151
|
+
}
|
152
|
+
removeLoader(_dataUnit, recordIds) {
|
153
|
+
return new Promise((resolve) => {
|
154
|
+
this._records = this._records.filter(record => !recordIds.includes(record["__record__id__"]));
|
155
|
+
resolve(recordIds);
|
156
|
+
});
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto;row-gap:12px;height:100%;width:100%}.simple-crud__taskbar.sc-snk-simple-crud{z-index:var(--more-visible, 2);margin-bottom:var(--space--medium)}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
|
161
|
+
|
162
|
+
const SnkSimpleCrud = class {
|
163
|
+
constructor(hostRef) {
|
164
|
+
registerInstance(this, hostRef);
|
165
|
+
this.dataStateChange = createEvent(this, "dataStateChange", 3);
|
166
|
+
this.dataUnitReady = createEvent(this, "dataUnitReady", 3);
|
167
|
+
this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER"];
|
168
|
+
this.REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER"];
|
169
|
+
this._taskbarProcessor = new TaskbarProcessor({
|
170
|
+
"snkSimpleCrudTaskbar.form_regular": this.resolveInMemoryBtns(this.REGULAR_DEFAULT_BTNS).concat(TaskbarElement.GRID_MODE),
|
171
|
+
"snkSimpleCrudTaskbar.grid_regular": this.resolveInMemoryBtns(this.REGULAR_DEFAULT_BTNS).concat(TaskbarElement.FORM_MODE),
|
172
|
+
"snkSimpleCrudTaskbar.form_selected": this.resolveInMemoryBtns(this.REGULAR_SELECTED_BTNS).concat(TaskbarElement.GRID_MODE),
|
173
|
+
"snkSimpleCrudTaskbar.grid_selected": this.resolveInMemoryBtns(this.REGULAR_SELECTED_BTNS).concat(TaskbarElement.FORM_MODE),
|
174
|
+
"snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
175
|
+
});
|
176
|
+
this._currentViewMode = VIEW_MODE.GRID;
|
177
|
+
this._config = undefined;
|
178
|
+
this.dataState = undefined;
|
179
|
+
this.dataUnit = undefined;
|
180
|
+
this.mode = SIMPLE_CRUD_MODE.SERVER;
|
181
|
+
this.gridConfig = undefined;
|
182
|
+
this.formConfig = undefined;
|
183
|
+
this.useCancelConfirm = true;
|
184
|
+
this.taskbarManager = undefined;
|
185
|
+
this.messagesBuilder = undefined;
|
186
|
+
}
|
187
|
+
resolveInMemoryBtns(taskbarButtons) {
|
188
|
+
const newTaskBarConfig = [...taskbarButtons];
|
189
|
+
if (this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
|
190
|
+
newTaskBarConfig.splice(1, 1);
|
191
|
+
}
|
192
|
+
return newTaskBarConfig;
|
193
|
+
}
|
194
|
+
/**
|
195
|
+
* Usado para alternar a visão entre GRID e FORM externamente.
|
196
|
+
*/
|
197
|
+
async goToView(view) {
|
198
|
+
this._currentViewMode = view;
|
199
|
+
if (this._viewStack) {
|
200
|
+
this._viewStack.show(view);
|
201
|
+
}
|
202
|
+
}
|
203
|
+
actionClickListener(evt) {
|
204
|
+
const act = evt.detail;
|
205
|
+
if (act === TaskbarElement.GRID_MODE) {
|
206
|
+
this.goToView(VIEW_MODE.GRID);
|
207
|
+
}
|
208
|
+
else if (act === TaskbarElement.FORM_MODE) {
|
209
|
+
this.goToView(VIEW_MODE.FORM);
|
210
|
+
}
|
211
|
+
evt.stopPropagation();
|
212
|
+
}
|
213
|
+
onModeChange() {
|
214
|
+
if (this.mode == SIMPLE_CRUD_MODE.IN_MEMORY) {
|
215
|
+
this.initInMemoryDataUnit();
|
216
|
+
}
|
217
|
+
}
|
218
|
+
observeDataState(newValue, oldValue) {
|
219
|
+
if (ObjectUtils.objectToString(oldValue) != ObjectUtils.objectToString(newValue)) {
|
220
|
+
this.dataStateChange.emit(newValue);
|
221
|
+
}
|
222
|
+
}
|
223
|
+
componentWillRender() {
|
224
|
+
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
|
225
|
+
}
|
226
|
+
componentWillLoad() {
|
227
|
+
this.processMetadata();
|
228
|
+
this.onModeChange();
|
229
|
+
}
|
230
|
+
getTaskBarId() {
|
231
|
+
var _a, _b, _c;
|
232
|
+
if ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
|
233
|
+
return "snkSimpleCrudTaskbar.finish_edition";
|
234
|
+
}
|
235
|
+
if (((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo) &&
|
236
|
+
!this.dataState.selectionInfo.isAllRecords() &&
|
237
|
+
((_c = this.dataState.selectionInfo.records) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
238
|
+
return this._currentViewMode === VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_selected" : "snkSimpleCrudTaskbar.form_selected";
|
239
|
+
}
|
240
|
+
return this._currentViewMode === VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_regular" : "snkSimpleCrudTaskbar.form_regular";
|
241
|
+
}
|
242
|
+
initInMemoryDataUnit() {
|
243
|
+
this._inMemoryLoader = new InMemoryLoader(this._metadata);
|
244
|
+
this.dataUnit = this._inMemoryLoader.dataUnit;
|
245
|
+
this.dataUnitReady.emit(this.dataUnit);
|
246
|
+
}
|
247
|
+
setMetadata(metadata) {
|
248
|
+
if (this._inMemoryLoader) {
|
249
|
+
this._inMemoryLoader.metadata = metadata;
|
250
|
+
}
|
251
|
+
else if (this.dataUnit) {
|
252
|
+
this.dataUnit.metadata = metadata;
|
253
|
+
}
|
254
|
+
return Promise.resolve();
|
255
|
+
}
|
256
|
+
setRecords(records) {
|
257
|
+
if (this._inMemoryLoader) {
|
258
|
+
this._inMemoryLoader.records = records;
|
259
|
+
}
|
260
|
+
else if (this.dataUnit) {
|
261
|
+
this.dataUnit.records = records;
|
262
|
+
}
|
263
|
+
return Promise.resolve();
|
264
|
+
}
|
265
|
+
getRecords() {
|
266
|
+
return Promise.resolve(this.dataUnit.records);
|
267
|
+
}
|
268
|
+
processMetadata() {
|
269
|
+
const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
|
270
|
+
const fieldMetadata = [];
|
271
|
+
const formConfig = { fields: [], emptyConfig: false };
|
272
|
+
fieldsMetadataElem.forEach(fieldElem => {
|
273
|
+
const field = {
|
274
|
+
name: fieldElem.getAttribute("name") || fieldElem.getAttribute("label"),
|
275
|
+
label: fieldElem.getAttribute("label"),
|
276
|
+
dataType: DataType[fieldElem.getAttribute("dataType")] || DataType.TEXT,
|
277
|
+
userInterface: UserInterface[fieldElem.getAttribute("userInterface")] || UserInterface.SHORTTEXT,
|
278
|
+
readOnly: fieldElem.getAttribute("readOnly") == "true",
|
279
|
+
required: fieldElem.getAttribute("required") == "true",
|
280
|
+
tab: fieldElem.getAttribute("tab") || undefined,
|
281
|
+
visible: fieldElem.getAttribute("visible") != "false"
|
282
|
+
};
|
283
|
+
const fieldConfig = { name: field.name, tab: field.tab, visible: field.visible };
|
284
|
+
formConfig.fields.push(fieldConfig);
|
285
|
+
fieldMetadata.push(field);
|
286
|
+
});
|
287
|
+
if (fieldMetadata.length > 0) {
|
288
|
+
if (!this.formConfig) {
|
289
|
+
this.formConfig = formConfig;
|
290
|
+
}
|
291
|
+
this._metadata = {
|
292
|
+
name: "SimpleCrud",
|
293
|
+
label: "SimpleCrud",
|
294
|
+
fields: fieldMetadata
|
295
|
+
};
|
296
|
+
}
|
297
|
+
}
|
298
|
+
onDataStateChange(evt) {
|
299
|
+
this.dataState = Object.assign({}, evt.detail);
|
300
|
+
}
|
301
|
+
getTaskBarDisabledButtons() {
|
302
|
+
var _a, _b;
|
303
|
+
const disabledButtons = [];
|
304
|
+
if (!((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.hasNext)) {
|
305
|
+
disabledButtons.push(TaskbarElement.NEXT);
|
306
|
+
}
|
307
|
+
if (!((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.hasPrevious)) {
|
308
|
+
disabledButtons.push(TaskbarElement.PREVIOUS);
|
309
|
+
}
|
310
|
+
return disabledButtons;
|
311
|
+
}
|
312
|
+
render() {
|
313
|
+
var _a;
|
314
|
+
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-flex ez-box ez-box--shadow" }, h("snk-taskbar", { class: "simple-crud__taskbar 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, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }), h("ez-view-stack", { class: "ez-flex ez-flex--column", ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { dataUnit: this.dataUnit, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), config: this.gridConfig, "no-header": true }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this.formConfig }))))));
|
315
|
+
}
|
316
|
+
get _element() { return getElement(this); }
|
317
|
+
static get watchers() { return {
|
318
|
+
"mode": ["onModeChange"],
|
319
|
+
"dataState": ["observeDataState"]
|
320
|
+
}; }
|
321
|
+
};
|
322
|
+
SnkSimpleCrud.style = snkSimpleCrudCss;
|
323
|
+
|
324
|
+
export { SnkSimpleBar as snk_simple_bar, SnkSimpleCrud as snk_simple_crud };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-cfd4bb13.js';
|
2
2
|
import { d as draggable_bundle } from './draggable.bundle-41d56f06.js';
|
3
3
|
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
4
|
-
import { C as CONFIG_EVENTS, K as KEY_EVENTS, b as TYPE_ACTIONS, T as TAB_NAMES } from './constants-
|
4
|
+
import { C as CONFIG_EVENTS, K as KEY_EVENTS, b as TYPE_ACTIONS, T as TAB_NAMES } from './constants-e916ccc3.js';
|
5
5
|
import './_commonjsHelpers-9943807e.js';
|
6
6
|
|
7
7
|
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)}";
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-cfd4bb13.js';
|
2
2
|
import { StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { A as AuthorizationConfig } from './AuthorizationConfig-dcbd207a.js';
|
4
|
-
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-
|
4
|
+
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-055ba1ad.js';
|
5
5
|
import { P as PresentationMode } from './index-6519a79e.js';
|
6
|
-
import './index-e467ade5.js';
|
7
6
|
|
8
7
|
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
|
9
8
|
|
@@ -24,7 +23,8 @@ const SnkTaskbar = class {
|
|
24
23
|
[TaskbarElement.SAVE]: "snkTaskbar.titleSave",
|
25
24
|
[TaskbarElement.GRID_MODE]: "snkTaskbar.titleGridMode",
|
26
25
|
[TaskbarElement.FORM_MODE]: "snkTaskbar.titleFormMode",
|
27
|
-
[TaskbarElement.CONFIGURATOR]: "snkTaskbar.titleConfigurator"
|
26
|
+
[TaskbarElement.CONFIGURATOR]: "snkTaskbar.titleConfigurator",
|
27
|
+
[TaskbarElement.ATTACH]: "snkTaskbar.titleAttach",
|
28
28
|
};
|
29
29
|
this._permissions = undefined;
|
30
30
|
this.configName = undefined;
|
@@ -131,7 +131,8 @@ const SnkTaskbar = class {
|
|
131
131
|
if (index > 1) {
|
132
132
|
className += "ez-padding-left--medium";
|
133
133
|
}
|
134
|
-
|
134
|
+
const taskbarElement = TaskbarElement[def.toString()];
|
135
|
+
if (taskbarElement) {
|
135
136
|
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.actionsList, this.configName, this.presentationMode);
|
136
137
|
}
|
137
138
|
else {
|