@sankhyalabs/sankhyablocks 8.16.0-dev.110 → 8.16.0-dev.111
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-aecd7c18.js → SnkMessageBuilder-9deeae08.js} +4 -3
- package/dist/cjs/index-f9e81701.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_7.cjs.entry.js → snk-actions-button_8.cjs.entry.js} +61 -0
- package/dist/cjs/snk-application.cjs.entry.js +1 -1
- package/dist/cjs/snk-attach.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +2 -26
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
- package/dist/cjs/{snk-data-unit-ebfdb9ba.js → snk-data-unit-57916de4.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +57 -5
- package/dist/cjs/snk-form-view.cjs.entry.js +19 -7
- package/dist/cjs/snk-grid.cjs.entry.js +22 -23
- package/dist/cjs/{snk-guides-viewer-fd39f437.js → snk-guides-viewer-d33379cd.js} +36 -24
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +4 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +73 -85
- package/dist/cjs/snk-taskbar.cjs.entry.js +7 -3
- package/dist/cjs/{taskbar-elements-02379452.js → taskbar-elements-6f4e06af.js} +8 -0
- package/dist/cjs/{field-search-68e34bf4.js → taskbar-processor-2fba34a8.js} +0 -35
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-crud/snk-crud.js +2 -26
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +58 -4
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +54 -7
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +36 -40
- package/dist/collection/components/snk-grid/snk-grid.js +36 -36
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +75 -85
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +8 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.css +0 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +220 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +28 -2
- package/dist/collection/lib/message/resources/snk-crud.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-grid.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +2 -1
- package/dist/components/ContinuousInsertUtils.js +2 -33
- package/dist/components/SnkMessageBuilder.js +4 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-attach2.js +34 -28
- package/dist/components/snk-crud.js +75 -93
- package/dist/components/snk-detail-view2.js +193 -117
- package/dist/components/snk-form-view2.js +22 -8
- package/dist/components/snk-grid2.js +62 -57
- package/dist/components/snk-simple-crud2.js +104 -109
- package/dist/components/snk-taskbar2.js +29 -10
- package/dist/components/taskbar-split-button.d.ts +11 -0
- package/dist/components/taskbar-split-button.js +6 -0
- package/dist/components/taskbar-split-button2.js +87 -0
- package/dist/esm/{SnkMessageBuilder-12f5fe1a.js → SnkMessageBuilder-2dbd8fa2.js} +4 -3
- package/dist/esm/index-a7d3d3f1.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_7.entry.js → snk-actions-button_8.entry.js} +61 -1
- package/dist/esm/snk-application.entry.js +1 -1
- package/dist/esm/snk-attach.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +3 -27
- package/dist/esm/snk-data-exporter.entry.js +2 -2
- package/dist/esm/{snk-data-unit-03654813.js → snk-data-unit-65c9dd1a.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +59 -7
- package/dist/esm/snk-form-view.entry.js +19 -7
- package/dist/esm/snk-grid.entry.js +20 -21
- package/dist/esm/{snk-guides-viewer-75e06feb.js → snk-guides-viewer-72953334.js} +37 -25
- package/dist/esm/snk-guides-viewer.entry.js +4 -3
- package/dist/esm/snk-simple-crud.entry.js +74 -86
- package/dist/esm/snk-taskbar.entry.js +7 -3
- package/dist/esm/{taskbar-elements-c62b6c66.js → taskbar-elements-f2cb4922.js} +8 -0
- package/dist/esm/{field-search-f8b1d91e.js → taskbar-processor-3436124c.js} +1 -34
- package/dist/sankhyablocks/p-0fadb620.js +1 -0
- package/dist/sankhyablocks/p-1a0caadb.js +1 -0
- package/dist/sankhyablocks/{p-2c08fa3e.entry.js → p-1bdffb17.entry.js} +1 -1
- package/dist/sankhyablocks/p-1f80174b.entry.js +1 -0
- package/dist/sankhyablocks/p-24a0dbd2.entry.js +1 -0
- package/dist/sankhyablocks/p-2f7e2251.entry.js +1 -0
- package/dist/sankhyablocks/p-3372178e.entry.js +1 -0
- package/dist/sankhyablocks/p-4689c2e6.js +1 -0
- package/dist/sankhyablocks/{p-271c86d3.entry.js → p-52d10014.entry.js} +1 -1
- package/dist/sankhyablocks/p-6a03b190.entry.js +1 -0
- package/dist/sankhyablocks/{p-ad07f0c5.entry.js → p-7beeabc1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4a93daef.entry.js → p-a4ebeec4.entry.js} +1 -1
- package/dist/sankhyablocks/p-bc101064.entry.js +1 -0
- package/dist/sankhyablocks/{p-f4d5bb7f.js → p-c9675d64.js} +1 -1
- package/dist/sankhyablocks/{p-4e861843.entry.js → p-ce94e6c4.entry.js} +1 -1
- package/dist/sankhyablocks/p-d07b18a4.js +1 -0
- package/dist/sankhyablocks/{p-6a0c8ce0.entry.js → p-ddf93f36.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/snk-crud.d.ts +0 -3
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +11 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -6
- package/dist/types/components/snk-grid/snk-grid.d.ts +7 -5
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -10
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +44 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +5 -0
- package/dist/types/components.d.ts +107 -8
- 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/collection/components/snk-taskbar/subcomponents/field-search.js +0 -31
- package/dist/sankhyablocks/p-1a51dfde.entry.js +0 -1
- package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
- package/dist/sankhyablocks/p-23736d75.js +0 -1
- package/dist/sankhyablocks/p-2d6df7e7.entry.js +0 -1
- package/dist/sankhyablocks/p-41da5310.js +0 -1
- package/dist/sankhyablocks/p-65be98c5.entry.js +0 -1
- package/dist/sankhyablocks/p-80f8c22c.js +0 -1
- package/dist/sankhyablocks/p-cc8c3bca.entry.js +0 -1
- package/dist/sankhyablocks/p-cf1f25ed.entry.js +0 -1
- package/dist/sankhyablocks/p-fb0f0087.js +0 -1
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +0 -4
@@ -1,11 +1,11 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
|
-
import { StringUtils, ApplicationContext, ObjectUtils, Action, DataType, UserInterface,
|
3
|
-
import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
2
|
+
import { StringUtils, ApplicationContext, ObjectUtils, Action, DataType, UserInterface, KeyboardManager, ElementIDUtils } from '@sankhyalabs/core';
|
3
|
+
import { CSSVarsUtils, buildFieldSearch, LABEL_SEARCH_COLUMN, LABEL_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants.js';
|
5
|
-
import { T as TaskbarElement, d as defineCustomElement$
|
5
|
+
import { T as TaskbarElement, d as defineCustomElement$4 } from './snk-taskbar2.js';
|
6
6
|
import './DataFetcher.js';
|
7
7
|
import { P as PresentationMode } from './ISave.js';
|
8
|
-
import { S as SnkMultiSelectionListDataSource, T as TaskbarProcessor, R as RmPrecisionCustomValueFormatter,
|
8
|
+
import { S as SnkMultiSelectionListDataSource, T as TaskbarProcessor, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, a as CrudUtils, c as ClientSideExporterProvider } from './ContinuousInsertUtils.js';
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
11
|
import { I as InMemoryLoader } from './dataunit-fetcher.js';
|
@@ -14,17 +14,18 @@ import { F as FormConfigFetcher } from './form-config-fetcher.js';
|
|
14
14
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
15
15
|
import { S as SnkFormConfigManager } from './SnkFormConfigManager.js';
|
16
16
|
import { s as store } from './index2.js';
|
17
|
-
import { d as defineCustomElement$
|
18
|
-
import { d as defineCustomElement$
|
19
|
-
import { d as defineCustomElement$
|
20
|
-
import { d as defineCustomElement$
|
21
|
-
import { d as defineCustomElement$
|
22
|
-
import { d as defineCustomElement$
|
23
|
-
import { d as defineCustomElement$
|
24
|
-
import { d as defineCustomElement$
|
25
|
-
import { d as defineCustomElement$
|
26
|
-
import { d as defineCustomElement$
|
27
|
-
import { d as defineCustomElement$
|
17
|
+
import { d as defineCustomElement$d } from './snk-actions-button2.js';
|
18
|
+
import { d as defineCustomElement$c } from './snk-configurator2.js';
|
19
|
+
import { d as defineCustomElement$b } from './snk-data-exporter2.js';
|
20
|
+
import { d as defineCustomElement$a } from './snk-data-unit2.js';
|
21
|
+
import { d as defineCustomElement$9 } from './snk-exporter-email-sender2.js';
|
22
|
+
import { d as defineCustomElement$8 } from './snk-grid-config2.js';
|
23
|
+
import { d as defineCustomElement$7 } from './snk-layout-form-config2.js';
|
24
|
+
import { d as defineCustomElement$6 } from './snk-select-box2.js';
|
25
|
+
import { d as defineCustomElement$5 } from './snk-simple-form-config2.js';
|
26
|
+
import { d as defineCustomElement$3 } from './snk-view-representation2.js';
|
27
|
+
import { d as defineCustomElement$2 } from './taskbar-actions-button2.js';
|
28
|
+
import { d as defineCustomElement$1 } from './taskbar-split-button2.js';
|
28
29
|
|
29
30
|
const REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
|
30
31
|
const REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
|
@@ -42,10 +43,10 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
42
43
|
this.configuratorSave = createEvent(this, "configuratorSave", 7);
|
43
44
|
this.configuratorCancel = createEvent(this, "configuratorCancel", 7);
|
44
45
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
45
|
-
this._keyDownHandler = (event) => this.keyDownListener(event);
|
46
46
|
this._formConfigFetcher = new FormConfigFetcher();
|
47
47
|
this._customEditors = new Map();
|
48
48
|
this._customRenders = new Map();
|
49
|
+
this._container = undefined;
|
49
50
|
this._showPopUpGridConfig = false;
|
50
51
|
this._currentViewMode = VIEW_MODE.GRID;
|
51
52
|
this._config = undefined;
|
@@ -72,7 +73,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
72
73
|
this.useEnterLikeTab = false;
|
73
74
|
this.actionsList = undefined;
|
74
75
|
this.configName = undefined;
|
75
|
-
this.showConfiguratorButtons =
|
76
|
+
this.showConfiguratorButtons = false;
|
76
77
|
this.gridLegacyConfigName = undefined;
|
77
78
|
this.formLegacyConfigName = undefined;
|
78
79
|
this.ignoreReadOnlyFormFields = false;
|
@@ -197,6 +198,12 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
197
198
|
this.dataUnit.isMultipleEdition = false;
|
198
199
|
this._viewStack.show(view);
|
199
200
|
}
|
201
|
+
if (view === VIEW_MODE.GRID) {
|
202
|
+
requestAnimationFrame(() => this.focusToGrid());
|
203
|
+
}
|
204
|
+
if (view === VIEW_MODE.FORM) {
|
205
|
+
requestAnimationFrame(() => this.focusToForm());
|
206
|
+
}
|
200
207
|
}
|
201
208
|
actionClickListener(evt) {
|
202
209
|
this.handleTaskbarAction(evt.detail);
|
@@ -394,6 +401,10 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
394
401
|
}
|
395
402
|
}
|
396
403
|
}
|
404
|
+
disconnectedCallback() {
|
405
|
+
var _a;
|
406
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
407
|
+
}
|
397
408
|
setCustomRenders() {
|
398
409
|
if (!this._grid) {
|
399
410
|
return;
|
@@ -571,40 +582,18 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
571
582
|
}
|
572
583
|
this.configuratorCancel.emit();
|
573
584
|
}
|
574
|
-
|
575
|
-
if (this._columnSearch != undefined) {
|
576
|
-
return this._columnSearch;
|
577
|
-
}
|
578
|
-
this._moreOptions = actionButton;
|
579
|
-
this._columnSearch = buildFieldSearch(item, ({ argument }) => new Promise(accept => {
|
580
|
-
this._grid.filterColumns(argument).then((columns) => {
|
581
|
-
accept(columns
|
582
|
-
.filter(column => !column.hidden)
|
583
|
-
.map(column => ({ label: column.label, value: column.name })));
|
584
|
-
});
|
585
|
-
}), (option) => {
|
586
|
-
var _a;
|
587
|
-
if (option != undefined) {
|
588
|
-
this._grid.locateColumn(option.value);
|
589
|
-
(_a = actionButton["hideActions"]) === null || _a === void 0 ? void 0 : _a.call(actionButton);
|
590
|
-
}
|
591
|
-
});
|
592
|
-
return this._columnSearch;
|
593
|
-
}
|
594
|
-
onSelectField(option, actionButton) {
|
585
|
+
onSelectField(option) {
|
595
586
|
if (option == undefined) {
|
596
587
|
return;
|
597
588
|
}
|
598
589
|
this._fieldToGetFocus = option.value;
|
599
|
-
actionButton.hideActions();
|
600
590
|
}
|
601
|
-
getFieldSearch(
|
591
|
+
getFieldSearch(splitButton, item) {
|
602
592
|
if (this._fieldSearch != undefined) {
|
603
593
|
return this._fieldSearch;
|
604
594
|
}
|
605
|
-
this.
|
606
|
-
|
607
|
-
this._fieldSearch = buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option, actionButton));
|
595
|
+
this._splitButtonForm = splitButton;
|
596
|
+
this._fieldSearch = buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option));
|
608
597
|
return this._fieldSearch;
|
609
598
|
}
|
610
599
|
getFormFields() {
|
@@ -630,17 +619,26 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
630
619
|
isGridInsertActive() {
|
631
620
|
return this.enableGridInsert && this.dataUnit.hasNewRecord();
|
632
621
|
}
|
622
|
+
getColumnSearch(splitButton, item) {
|
623
|
+
if (this._columnSearch != undefined) {
|
624
|
+
return this._columnSearch;
|
625
|
+
}
|
626
|
+
this._splitButton = splitButton;
|
627
|
+
this._columnSearch = buildFieldSearch(item, ({ argument }) => new Promise(accept => {
|
628
|
+
this._grid.filterColumns(argument).then((columns) => {
|
629
|
+
accept(columns
|
630
|
+
.filter(column => !column.hidden)
|
631
|
+
.map(column => ({ label: column.label, value: column.name })));
|
632
|
+
});
|
633
|
+
}), (option) => {
|
634
|
+
if (option != undefined) {
|
635
|
+
this._grid.locateColumn(option.value);
|
636
|
+
}
|
637
|
+
});
|
638
|
+
return this._columnSearch;
|
639
|
+
}
|
633
640
|
getActionsList() {
|
634
|
-
|
635
|
-
const hardList = [{
|
636
|
-
value: StringUtils.generateUUID(),
|
637
|
-
label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findColumn", undefined)) !== null && _b !== void 0 ? _b : "Buscar",
|
638
|
-
disableCloseOnSelect: true,
|
639
|
-
eagerInitialize: true,
|
640
|
-
itemBuilder: (actionButton, item) => (this._currentViewMode === VIEW_MODE.GRID)
|
641
|
-
? this.getColumnSearch(actionButton, item)
|
642
|
-
: this.getFieldSearch(actionButton, item)
|
643
|
-
}];
|
641
|
+
const hardList = [];
|
644
642
|
if (this.enableGridInsert) {
|
645
643
|
hardList.push(this._continuousInsertUtils.actionContinuousInsert(this.enableContinuousInsert, () => {
|
646
644
|
this.enableContinuousInsert = !this.enableContinuousInsert;
|
@@ -653,8 +651,28 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
653
651
|
const taskbarID = this.getTopTaskBarId();
|
654
652
|
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
|
655
653
|
}
|
656
|
-
|
657
|
-
|
654
|
+
return hardList.concat(this.actionsList);
|
655
|
+
}
|
656
|
+
getSettingsListGrid() {
|
657
|
+
var _a, _b;
|
658
|
+
const hardList = [{
|
659
|
+
value: StringUtils.generateUUID(),
|
660
|
+
label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findColumn", {})) !== null && _b !== void 0 ? _b : LABEL_SEARCH_COLUMN,
|
661
|
+
disableCloseOnSelect: true,
|
662
|
+
eagerInitialize: true,
|
663
|
+
itemBuilder: (splitButton, item) => this.getColumnSearch(splitButton, item)
|
664
|
+
}];
|
665
|
+
return hardList;
|
666
|
+
}
|
667
|
+
getSettingsListForm() {
|
668
|
+
var _a, _b;
|
669
|
+
const hardList = [{
|
670
|
+
value: StringUtils.generateUUID(),
|
671
|
+
label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findFields", {})) !== null && _b !== void 0 ? _b : LABEL_SEARCH_FIELD,
|
672
|
+
disableCloseOnSelect: true,
|
673
|
+
eagerInitialize: true,
|
674
|
+
itemBuilder: (splitButton, item) => this.getFieldSearch(splitButton, item)
|
675
|
+
}];
|
658
676
|
return hardList;
|
659
677
|
}
|
660
678
|
getTopTaskBarId() {
|
@@ -662,45 +680,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
662
680
|
return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${PresentationMode.PRIMARY}` :
|
663
681
|
`snkGridTopTaskbar.regular${PresentationMode.PRIMARY}`;
|
664
682
|
}
|
665
|
-
async keyDownListener(event) {
|
666
|
-
if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
|
667
|
-
return;
|
668
|
-
}
|
669
|
-
if (this._element == undefined) {
|
670
|
-
return;
|
671
|
-
}
|
672
|
-
if (JSUtils.isHiddenElement(this._element)) {
|
673
|
-
return;
|
674
|
-
}
|
675
|
-
FloatingManager.closeAll();
|
676
|
-
if (this._currentViewMode === VIEW_MODE.GRID) {
|
677
|
-
await this.findColumn();
|
678
|
-
}
|
679
|
-
else {
|
680
|
-
await this.findField();
|
681
|
-
}
|
682
|
-
event.preventDefault();
|
683
|
-
}
|
684
|
-
async findField() {
|
685
|
-
await this.openSeach(this._fieldSearch);
|
686
|
-
}
|
687
|
-
async findColumn() {
|
688
|
-
await this.openSeach(this._columnSearch);
|
689
|
-
}
|
690
|
-
async openSeach(fieldSearch) {
|
691
|
-
await openFieldSearch(this._moreOptions, fieldSearch);
|
692
|
-
}
|
693
683
|
clearFieldToFocusHandler() {
|
694
684
|
this._fieldToGetFocus = undefined;
|
695
685
|
}
|
696
|
-
connectedCallback() {
|
697
|
-
window.addEventListener("keydown", this._keyDownHandler, { capture: true });
|
698
|
-
}
|
699
|
-
disconnectedCallback() {
|
700
|
-
var _a;
|
701
|
-
window.removeEventListener("keydown", this._keyDownHandler);
|
702
|
-
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
703
|
-
}
|
704
686
|
gridConfigChangeHandler(evt) {
|
705
687
|
evt.stopPropagation();
|
706
688
|
if (!this.configName)
|
@@ -796,16 +778,23 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
796
778
|
}
|
797
779
|
}, {
|
798
780
|
debounceTime: 1000,
|
799
|
-
description: "Cancela uma ação.",
|
800
|
-
element: this._element
|
781
|
+
description: "Cancela uma ação.", element: this._element
|
801
782
|
});
|
802
783
|
}
|
803
784
|
async handleFormConfigSaved() {
|
804
785
|
await this.loadFormConfig(true, true);
|
805
786
|
}
|
806
|
-
|
787
|
+
focusToGrid() {
|
788
|
+
const gridElement = this._grid;
|
789
|
+
gridElement.focus();
|
790
|
+
}
|
791
|
+
focusToForm() {
|
792
|
+
const formElement = this._form;
|
793
|
+
formElement.focus();
|
794
|
+
}
|
795
|
+
renderTaskbarContent(layout) {
|
807
796
|
var _a;
|
808
|
-
return (h("snk-taskbar", { class: this._currentViewMode === VIEW_MODE.FORM
|
797
|
+
return (h("snk-taskbar", { class: `ez-box--no-outline ez-box ${this._currentViewMode === VIEW_MODE.FORM ? (this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow-xsmall') + ' ez-padding--small' : ''}`, dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), actionsSettingsList: layout === VIEW_MODE.GRID ? this.getSettingsListGrid() : this.getSettingsListForm(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: PresentationMode.SECONDARY, tabindex: "0" }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
|
809
798
|
}
|
810
799
|
/* istanbul ignore next */
|
811
800
|
render() {
|
@@ -813,9 +802,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
813
802
|
if (this.dataUnit == undefined) {
|
814
803
|
return;
|
815
804
|
}
|
816
|
-
return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section
|
805
|
+
return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ez-box--no-outline ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section`, ref: (ref) => this._container = ref, tabindex: "0" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large ez-box--no-outline", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
817
806
|
? undefined
|
818
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
807
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, tabindex: "0" }, this.renderTaskbarContent(VIEW_MODE.GRID), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(VIEW_MODE.FORM), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ez-box--no-outline`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), elementFocusSearchField: this._container, tabindex: "0" }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
819
808
|
}
|
820
809
|
get _element() { return this; }
|
821
810
|
static get watchers() { return {
|
@@ -857,6 +846,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
857
846
|
"layoutFormConfig": [4, "layout-form-config"],
|
858
847
|
"autoLoad": [4, "auto-load"],
|
859
848
|
"outlineMode": [4, "outline-mode"],
|
849
|
+
"_container": [32],
|
860
850
|
"_showPopUpGridConfig": [32],
|
861
851
|
"_currentViewMode": [32],
|
862
852
|
"_config": [32],
|
@@ -890,7 +880,7 @@ function defineCustomElement() {
|
|
890
880
|
if (typeof customElements === "undefined") {
|
891
881
|
return;
|
892
882
|
}
|
893
|
-
const components = ["snk-simple-crud", "snk-actions-button", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-grid-config", "snk-layout-form-config", "snk-select-box", "snk-simple-form-config", "snk-taskbar", "snk-view-representation", "taskbar-actions-button"];
|
883
|
+
const components = ["snk-simple-crud", "snk-actions-button", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-grid-config", "snk-layout-form-config", "snk-select-box", "snk-simple-form-config", "snk-taskbar", "snk-view-representation", "taskbar-actions-button", "taskbar-split-button"];
|
894
884
|
components.forEach(tagName => { switch (tagName) {
|
895
885
|
case "snk-simple-crud":
|
896
886
|
if (!customElements.get(tagName)) {
|
@@ -899,60 +889,65 @@ function defineCustomElement() {
|
|
899
889
|
break;
|
900
890
|
case "snk-actions-button":
|
901
891
|
if (!customElements.get(tagName)) {
|
902
|
-
defineCustomElement$
|
892
|
+
defineCustomElement$d();
|
903
893
|
}
|
904
894
|
break;
|
905
895
|
case "snk-configurator":
|
906
896
|
if (!customElements.get(tagName)) {
|
907
|
-
defineCustomElement$
|
897
|
+
defineCustomElement$c();
|
908
898
|
}
|
909
899
|
break;
|
910
900
|
case "snk-data-exporter":
|
911
901
|
if (!customElements.get(tagName)) {
|
912
|
-
defineCustomElement$
|
902
|
+
defineCustomElement$b();
|
913
903
|
}
|
914
904
|
break;
|
915
905
|
case "snk-data-unit":
|
916
906
|
if (!customElements.get(tagName)) {
|
917
|
-
defineCustomElement$
|
907
|
+
defineCustomElement$a();
|
918
908
|
}
|
919
909
|
break;
|
920
910
|
case "snk-exporter-email-sender":
|
921
911
|
if (!customElements.get(tagName)) {
|
922
|
-
defineCustomElement$
|
912
|
+
defineCustomElement$9();
|
923
913
|
}
|
924
914
|
break;
|
925
915
|
case "snk-grid-config":
|
926
916
|
if (!customElements.get(tagName)) {
|
927
|
-
defineCustomElement$
|
917
|
+
defineCustomElement$8();
|
928
918
|
}
|
929
919
|
break;
|
930
920
|
case "snk-layout-form-config":
|
931
921
|
if (!customElements.get(tagName)) {
|
932
|
-
defineCustomElement$
|
922
|
+
defineCustomElement$7();
|
933
923
|
}
|
934
924
|
break;
|
935
925
|
case "snk-select-box":
|
936
926
|
if (!customElements.get(tagName)) {
|
937
|
-
defineCustomElement$
|
927
|
+
defineCustomElement$6();
|
938
928
|
}
|
939
929
|
break;
|
940
930
|
case "snk-simple-form-config":
|
941
931
|
if (!customElements.get(tagName)) {
|
942
|
-
defineCustomElement$
|
932
|
+
defineCustomElement$5();
|
943
933
|
}
|
944
934
|
break;
|
945
935
|
case "snk-taskbar":
|
946
936
|
if (!customElements.get(tagName)) {
|
947
|
-
defineCustomElement$
|
937
|
+
defineCustomElement$4();
|
948
938
|
}
|
949
939
|
break;
|
950
940
|
case "snk-view-representation":
|
951
941
|
if (!customElements.get(tagName)) {
|
952
|
-
defineCustomElement$
|
942
|
+
defineCustomElement$3();
|
953
943
|
}
|
954
944
|
break;
|
955
945
|
case "taskbar-actions-button":
|
946
|
+
if (!customElements.get(tagName)) {
|
947
|
+
defineCustomElement$2();
|
948
|
+
}
|
949
|
+
break;
|
950
|
+
case "taskbar-split-button":
|
956
951
|
if (!customElements.get(tagName)) {
|
957
952
|
defineCustomElement$1();
|
958
953
|
}
|
@@ -3,10 +3,11 @@ import { Action, LockManager, LockManagerOperation, SilentException, StringUtils
|
|
3
3
|
import { A as AuthorizationConfig } from './AuthorizationConfig.js';
|
4
4
|
import { P as PresentationMode } from './ISave.js';
|
5
5
|
import { s as store } from './index2.js';
|
6
|
-
import { d as defineCustomElement$
|
7
|
-
import { d as defineCustomElement$
|
8
|
-
import { d as defineCustomElement$
|
9
|
-
import { d as defineCustomElement$
|
6
|
+
import { d as defineCustomElement$5 } from './snk-actions-button2.js';
|
7
|
+
import { d as defineCustomElement$4 } from './snk-data-exporter2.js';
|
8
|
+
import { d as defineCustomElement$3 } from './snk-exporter-email-sender2.js';
|
9
|
+
import { d as defineCustomElement$2 } from './taskbar-actions-button2.js';
|
10
|
+
import { d as defineCustomElement$1 } from './taskbar-split-button2.js';
|
10
11
|
|
11
12
|
var TaskbarElement;
|
12
13
|
(function (TaskbarElement) {
|
@@ -94,6 +95,9 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
94
95
|
case TaskbarElement.FORM_MODE:
|
95
96
|
return iconButton("list", element, className, dataElementId, title, action, isEnabled);
|
96
97
|
case TaskbarElement.CONFIGURATOR:
|
98
|
+
if ((actions === null || actions === void 0 ? void 0 : actions.length) > 0) {
|
99
|
+
return splitButton("settings-inverted", element, className, title, dataElementId, isEnabled, actions, action);
|
100
|
+
}
|
97
101
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
98
102
|
case TaskbarElement.MORE_OPTIONS:
|
99
103
|
return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
|
@@ -118,6 +122,11 @@ function iconTextButton(iconName, name, className, dataElementId, text, title, a
|
|
118
122
|
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-taskbar-label": text, "data-taskbar-icon": iconName, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) },
|
119
123
|
h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
120
124
|
}
|
125
|
+
function splitButton(iconName, element, className, title, dataElementId, isEnabled, actions, action) {
|
126
|
+
return actions && actions.length > 0
|
127
|
+
? h("taskbar-split-button", { iconName: iconName, class: className, key: dataElementId, "data-taskbar-icon": iconName, "data-taskbar-label": title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, title: title, action: () => action(element) })
|
128
|
+
: undefined;
|
129
|
+
}
|
121
130
|
function actionButton(element, className, dataElementId, title, isEnabled, actions, action) {
|
122
131
|
return actions && actions.length > 0
|
123
132
|
? h("taskbar-actions-button", { class: className, key: dataElementId, title: title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
@@ -186,6 +195,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
186
195
|
this.buttons = undefined;
|
187
196
|
this.customButtons = undefined;
|
188
197
|
this.actionsList = undefined;
|
198
|
+
this.actionsSettingsList = undefined;
|
189
199
|
this.primaryButton = undefined;
|
190
200
|
this.disabledButtons = undefined;
|
191
201
|
this.dataUnit = undefined;
|
@@ -342,7 +352,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
342
352
|
const taskbarElement = TaskbarElement[def.toString()];
|
343
353
|
const dataExporterStoreKey = this._element.dataset.exporterStoreKey || this.configName;
|
344
354
|
if (taskbarElement) {
|
345
|
-
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.buildDynamicActionsList(), dataExporterStoreKey, this.presentationMode);
|
355
|
+
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), def !== TaskbarElement.CONFIGURATOR ? this.buildDynamicActionsList() : this.buildActionsSettingsList(), dataExporterStoreKey, this.presentationMode);
|
346
356
|
}
|
347
357
|
else {
|
348
358
|
return buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
@@ -351,10 +361,13 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
351
361
|
buildDynamicActionsList() {
|
352
362
|
var _a;
|
353
363
|
if (this._hiddenActionsList.length) {
|
354
|
-
return [...((_a = this.actionsList) !== null && _a !== void 0 ? _a : []),
|
364
|
+
return [...((_a = this.actionsList) !== null && _a !== void 0 ? _a : []), ...this._hiddenActionsList];
|
355
365
|
}
|
356
366
|
return this.actionsList;
|
357
367
|
}
|
368
|
+
buildActionsSettingsList() {
|
369
|
+
return this.actionsSettingsList;
|
370
|
+
}
|
358
371
|
getIdElemBtnNative(taskbarElem) {
|
359
372
|
return StringUtils.toCamelCase(taskbarElem);
|
360
373
|
}
|
@@ -584,6 +597,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
584
597
|
"buttons": [1],
|
585
598
|
"customButtons": [16],
|
586
599
|
"actionsList": [16],
|
600
|
+
"actionsSettingsList": [16],
|
587
601
|
"primaryButton": [1, "primary-button"],
|
588
602
|
"disabledButtons": [16],
|
589
603
|
"dataUnit": [16],
|
@@ -603,7 +617,7 @@ function defineCustomElement() {
|
|
603
617
|
if (typeof customElements === "undefined") {
|
604
618
|
return;
|
605
619
|
}
|
606
|
-
const components = ["snk-taskbar", "snk-actions-button", "snk-data-exporter", "snk-exporter-email-sender", "taskbar-actions-button"];
|
620
|
+
const components = ["snk-taskbar", "snk-actions-button", "snk-data-exporter", "snk-exporter-email-sender", "taskbar-actions-button", "taskbar-split-button"];
|
607
621
|
components.forEach(tagName => { switch (tagName) {
|
608
622
|
case "snk-taskbar":
|
609
623
|
if (!customElements.get(tagName)) {
|
@@ -612,20 +626,25 @@ function defineCustomElement() {
|
|
612
626
|
break;
|
613
627
|
case "snk-actions-button":
|
614
628
|
if (!customElements.get(tagName)) {
|
615
|
-
defineCustomElement$
|
629
|
+
defineCustomElement$5();
|
616
630
|
}
|
617
631
|
break;
|
618
632
|
case "snk-data-exporter":
|
619
633
|
if (!customElements.get(tagName)) {
|
620
|
-
defineCustomElement$
|
634
|
+
defineCustomElement$4();
|
621
635
|
}
|
622
636
|
break;
|
623
637
|
case "snk-exporter-email-sender":
|
624
638
|
if (!customElements.get(tagName)) {
|
625
|
-
defineCustomElement$
|
639
|
+
defineCustomElement$3();
|
626
640
|
}
|
627
641
|
break;
|
628
642
|
case "taskbar-actions-button":
|
643
|
+
if (!customElements.get(tagName)) {
|
644
|
+
defineCustomElement$2();
|
645
|
+
}
|
646
|
+
break;
|
647
|
+
case "taskbar-split-button":
|
629
648
|
if (!customElements.get(tagName)) {
|
630
649
|
defineCustomElement$1();
|
631
650
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface TaskbarSplitButton extends Components.TaskbarSplitButton, HTMLElement {}
|
4
|
+
export const TaskbarSplitButton: {
|
5
|
+
prototype: TaskbarSplitButton;
|
6
|
+
new (): TaskbarSplitButton;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|
@@ -0,0 +1,87 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
2
|
+
|
3
|
+
const taskbarSplitButtonCss = "";
|
4
|
+
|
5
|
+
const TaskbarSplitButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
6
|
+
constructor() {
|
7
|
+
super();
|
8
|
+
this.__registerHost();
|
9
|
+
this._showDropdown = false;
|
10
|
+
this.iconName = undefined;
|
11
|
+
this.action = undefined;
|
12
|
+
this.name = undefined;
|
13
|
+
this.className = undefined;
|
14
|
+
this.dataElementId = undefined;
|
15
|
+
this.title = undefined;
|
16
|
+
this.enabled = undefined;
|
17
|
+
this.actions = undefined;
|
18
|
+
}
|
19
|
+
initializeEagerItems() {
|
20
|
+
var _a;
|
21
|
+
(_a = this.actions) === null || _a === void 0 ? void 0 : _a.forEach(action => {
|
22
|
+
var _a;
|
23
|
+
if (action && action.eagerInitialize && action.itemBuilder) {
|
24
|
+
(_a = action.itemBuilder) === null || _a === void 0 ? void 0 : _a.call(action, this._splitButtonRef, action);
|
25
|
+
}
|
26
|
+
});
|
27
|
+
}
|
28
|
+
componentDidLoad() {
|
29
|
+
this.initializeEagerItems();
|
30
|
+
}
|
31
|
+
dropdownItemBuilder(item, _level) {
|
32
|
+
const itemAction = this.actions.find(action => action.value === item.id);
|
33
|
+
if (!itemAction || !itemAction.itemBuilder) {
|
34
|
+
return undefined;
|
35
|
+
}
|
36
|
+
const customContent = itemAction.itemBuilder(this._splitButtonRef, itemAction);
|
37
|
+
if (typeof customContent === 'string') {
|
38
|
+
return h("div", { innerHTML: customContent });
|
39
|
+
}
|
40
|
+
return customContent;
|
41
|
+
}
|
42
|
+
loadItems() {
|
43
|
+
return this.actions.filter(action => action !== undefined).map(action => {
|
44
|
+
var _a;
|
45
|
+
return {
|
46
|
+
id: action.value,
|
47
|
+
label: action.label,
|
48
|
+
value: action.value,
|
49
|
+
type: (_a = action.type) !== null && _a !== void 0 ? _a : 'item',
|
50
|
+
children: action.children,
|
51
|
+
iconName: action.iconName,
|
52
|
+
subAction: action.subAction,
|
53
|
+
group: action.group,
|
54
|
+
disableCloseOnSelect: action.disableCloseOnSelect,
|
55
|
+
};
|
56
|
+
});
|
57
|
+
}
|
58
|
+
render() {
|
59
|
+
return (h(Host, null, h("ez-split-button", { ref: (ref) => this._splitButtonRef = ref, key: this.dataElementId, class: `${this.className} "ez-split-button--tertiary ez-padding--medium"`, items: this.loadItems(), mode: "icon-only", iconName: this.iconName, enabled: this.enabled, show: this._showDropdown, onButtonClick: () => this.action(this.name), itemBuilder: (item, level) => this.dropdownItemBuilder(item, level) })));
|
60
|
+
}
|
61
|
+
static get style() { return taskbarSplitButtonCss; }
|
62
|
+
}, [2, "taskbar-split-button", {
|
63
|
+
"iconName": [1, "icon-name"],
|
64
|
+
"action": [16],
|
65
|
+
"name": [1],
|
66
|
+
"className": [1, "class-name"],
|
67
|
+
"dataElementId": [1, "data-element-id"],
|
68
|
+
"title": [1],
|
69
|
+
"enabled": [4],
|
70
|
+
"actions": [16],
|
71
|
+
"_showDropdown": [32]
|
72
|
+
}]);
|
73
|
+
function defineCustomElement() {
|
74
|
+
if (typeof customElements === "undefined") {
|
75
|
+
return;
|
76
|
+
}
|
77
|
+
const components = ["taskbar-split-button"];
|
78
|
+
components.forEach(tagName => { switch (tagName) {
|
79
|
+
case "taskbar-split-button":
|
80
|
+
if (!customElements.get(tagName)) {
|
81
|
+
customElements.define(tagName, TaskbarSplitButton);
|
82
|
+
}
|
83
|
+
break;
|
84
|
+
} });
|
85
|
+
}
|
86
|
+
|
87
|
+
export { TaskbarSplitButton as T, defineCustomElement as d };
|
@@ -147,12 +147,13 @@ const snkCrudMessages = {
|
|
147
147
|
update: "Alterar registro",
|
148
148
|
clean: "{{ENTITY_NAME}}"
|
149
149
|
},
|
150
|
-
findColumn: "Buscar campos",
|
150
|
+
findColumn: "Buscar campos (Ctrl+F)",
|
151
151
|
goBackTitle: "Voltar"
|
152
152
|
};
|
153
153
|
|
154
154
|
const snkSimpleCrudMessages = {
|
155
|
-
findColumn: "Busca de colunas",
|
155
|
+
findColumn: "Busca de colunas (Ctrl+F)",
|
156
|
+
findFields: "Busca de campos (Ctrl+F)",
|
156
157
|
formConfigUnavaliable: {
|
157
158
|
title: "Aviso",
|
158
159
|
message: 'A opção "Configurar formulário" será disponibilizada em breve. Enquanto isso, acesse a configuração do fomulário através dos layouts anteriores, HTML5 ou Flex.'
|
@@ -251,7 +252,7 @@ const snkConfiguratorMessages = {
|
|
251
252
|
};
|
252
253
|
|
253
254
|
const snkGridMessages = {
|
254
|
-
findColumn: "Busca de colunas",
|
255
|
+
findColumn: "Busca de colunas (Ctrl+F)",
|
255
256
|
cancelConfirmation: {
|
256
257
|
title: "Aviso",
|
257
258
|
message: "As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?</b>",
|
@@ -2174,10 +2174,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
2174
2174
|
return import(
|
2175
2175
|
/* webpackMode: "lazy" */
|
2176
2176
|
'./snk-personalized-filter.entry.js').then(processMod, consoleError);
|
2177
|
-
case 'snk-actions-
|
2177
|
+
case 'snk-actions-button_8':
|
2178
2178
|
return import(
|
2179
2179
|
/* webpackMode: "lazy" */
|
2180
|
-
'./snk-actions-
|
2180
|
+
'./snk-actions-button_8.entry.js').then(processMod, consoleError);
|
2181
2181
|
case 'snk-filter-advanced-mode_2':
|
2182
2182
|
return import(
|
2183
2183
|
/* webpackMode: "lazy" */
|