@sankhyalabs/sankhyablocks 8.14.11 → 8.15.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-8009ecb2.js → ConfigStorage-302bbbd4.js} +24 -14
- package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
- package/dist/cjs/{SnkFormConfigManager-7d850fbc.js → SnkFormConfigManager-71c4768e.js} +1 -1
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
- package/dist/cjs/{field-search-ca27041a.js → field-search-f56aa7d6.js} +29 -1
- package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
- package/dist/cjs/index-f9e81701.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-d839c5d7.js → pesquisa-fetcher-7a08d110.js} +173 -6
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button.cjs.entry.js → snk-actions-button_2.cjs.entry.js} +133 -4
- package/dist/cjs/snk-application.cjs.entry.js +65 -6
- package/dist/cjs/snk-attach.cjs.entry.js +389 -58
- package/dist/cjs/snk-crud.cjs.entry.js +8 -9
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
- package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +9 -10
- package/dist/cjs/snk-filter-bar.cjs.entry.js +6 -3
- package/dist/cjs/snk-filter-item.cjs.entry.js +47 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +2 -2
- package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +51 -42
- package/dist/cjs/{snk-guides-viewer-88a7f880.js → snk-guides-viewer-546509df.js} +10 -21
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +20 -42
- package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
- package/dist/cjs/{taskbar-elements-39949c7a.js → taskbar-elements-01b85b99.js} +4 -4
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/snk-application/snk-application.js +65 -5
- package/dist/collection/components/snk-attach/snk-attach.js +188 -39
- package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
- package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
- package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
- package/dist/collection/components/snk-attach/structure/index.js +6 -3
- package/dist/collection/components/snk-crud/snk-crud.js +5 -5
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +6 -19
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +47 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +5 -2
- package/dist/collection/components/snk-grid/snk-grid.js +59 -53
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +15 -36
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +6 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +324 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -3
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -2
- package/dist/collection/components/snk-taskbar/subcomponents/field-search.js +28 -1
- package/dist/collection/lib/@types/index.js +1 -0
- package/dist/collection/lib/configs/ConfigStorage.js +24 -14
- package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +11 -6
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
- package/dist/components/ConfigStorage.js +24 -14
- package/dist/components/SnkMessageBuilder.js +13 -0
- package/dist/components/dataunit-fetcher.js +11 -6
- package/dist/components/field-search.js +29 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +1 -0
- package/dist/components/snk-actions-button2.js +1 -0
- package/dist/components/snk-application2.js +62 -2
- package/dist/components/snk-attach2.js +414 -71
- package/dist/components/snk-crud.js +69 -63
- package/dist/components/snk-detail-view2.js +95 -94
- package/dist/components/snk-filter-bar2.js +5 -2
- package/dist/components/snk-filter-item2.js +47 -1
- package/dist/components/snk-grid2.js +91 -76
- package/dist/components/snk-simple-crud2.js +31 -46
- package/dist/components/snk-taskbar2.js +15 -9
- package/dist/components/taskbar-actions-button.d.ts +11 -0
- package/dist/components/taskbar-actions-button.js +6 -0
- package/dist/components/taskbar-actions-button2.js +154 -0
- package/dist/esm/{ConfigStorage-1244b8b0.js → ConfigStorage-4151acc8.js} +24 -14
- package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
- package/dist/esm/{SnkFormConfigManager-9be0e7d4.js → SnkFormConfigManager-5c7d3771.js} +1 -1
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
- package/dist/esm/{field-search-c6938ee4.js → field-search-efbe307f.js} +29 -2
- package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
- package/dist/esm/index-a7d3d3f1.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-cf01a8f4.js → pesquisa-fetcher-d6ff9386.js} +173 -7
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button.entry.js → snk-actions-button_2.entry.js} +134 -6
- package/dist/esm/snk-application.entry.js +65 -6
- package/dist/esm/snk-attach.entry.js +390 -59
- package/dist/esm/snk-crud.entry.js +8 -9
- package/dist/esm/snk-data-exporter.entry.js +3 -3
- package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +9 -10
- package/dist/esm/snk-filter-bar.entry.js +6 -3
- package/dist/esm/snk-filter-item.entry.js +47 -1
- package/dist/esm/snk-filter-modal-item.entry.js +1 -1
- package/dist/esm/snk-form.entry.js +2 -2
- package/dist/esm/snk-grid-config.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +52 -43
- package/dist/esm/{snk-guides-viewer-fde509bf.js → snk-guides-viewer-4e56a2e0.js} +10 -21
- package/dist/esm/snk-guides-viewer.entry.js +8 -9
- package/dist/esm/snk-personalized-filter.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +19 -41
- package/dist/esm/snk-taskbar.entry.js +2 -2
- package/dist/esm/{taskbar-elements-0a6b8b95.js → taskbar-elements-d4d0b424.js} +4 -4
- package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
- package/dist/sankhyablocks/{p-fd8814b9.entry.js → p-1d75d9f9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-32460e98.entry.js +11 -0
- package/dist/sankhyablocks/p-374d03f6.js +1 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-3963b9c1.entry.js} +1 -1
- package/dist/sankhyablocks/p-42af1bbf.js +65 -0
- package/dist/sankhyablocks/{p-776ee8e3.js → p-573a07c5.js} +1 -1
- package/dist/sankhyablocks/{p-d4fb9642.entry.js → p-69efa80d.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6977a26c.entry.js → p-71439fd9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-11081798.entry.js → p-761ed32f.entry.js} +1 -1
- package/dist/sankhyablocks/p-7d8d7fe9.entry.js +1 -0
- package/dist/sankhyablocks/{p-f514913b.entry.js → p-7f3c7b09.entry.js} +1 -1
- package/dist/sankhyablocks/p-8c74258e.entry.js +1 -0
- package/dist/sankhyablocks/p-8f0488b8.entry.js +1 -0
- package/dist/sankhyablocks/p-9ebcfeb6.entry.js +1 -0
- package/dist/sankhyablocks/p-aa95fb2c.js +56 -0
- package/dist/sankhyablocks/p-b05ab13d.entry.js +1 -0
- package/dist/sankhyablocks/p-c2137023.entry.js +1 -0
- package/dist/sankhyablocks/p-c2495304.js +1 -0
- package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
- package/dist/sankhyablocks/p-d82f6eda.entry.js +1 -0
- package/dist/sankhyablocks/p-dcb6aad1.entry.js +1 -0
- package/dist/sankhyablocks/{p-3520c088.entry.js → p-e0fd9555.entry.js} +1 -1
- package/dist/sankhyablocks/p-e8812d8a.js +1 -0
- package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +4 -1
- package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
- package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +27 -6
- package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
- package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
- package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
- package/dist/types/components/snk-crud/snk-crud.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +5 -4
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +6 -5
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +60 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +16 -0
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +2 -0
- package/dist/types/components.d.ts +111 -11
- package/dist/types/lib/@types/index.d.ts +2 -1
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +1 -0
- package/dist/types/lib/index.d.ts +1 -1
- package/package.json +8 -6
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
- package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
- package/dist/sankhyablocks/p-08ced1fd.entry.js +0 -1
- package/dist/sankhyablocks/p-3160fa64.js +0 -60
- package/dist/sankhyablocks/p-34774923.entry.js +0 -1
- package/dist/sankhyablocks/p-38ab8a3b.entry.js +0 -1
- package/dist/sankhyablocks/p-3ab540cc.entry.js +0 -11
- package/dist/sankhyablocks/p-3ecd72a4.js +0 -1
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-5534e08c.js +0 -1
- package/dist/sankhyablocks/p-585294ee.js +0 -56
- package/dist/sankhyablocks/p-6ea96bb1.entry.js +0 -1
- package/dist/sankhyablocks/p-936addf1.js +0 -1
- package/dist/sankhyablocks/p-c53926eb.entry.js +0 -1
- package/dist/sankhyablocks/p-c9841939.js +0 -1
- package/dist/sankhyablocks/p-cfbebb49.entry.js +0 -1
- package/dist/sankhyablocks/p-d2923a2a.entry.js +0 -1
- package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
- package/dist/sankhyablocks/p-f2056f66.entry.js +0 -1
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
- /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -6,12 +6,11 @@ const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const DataFetcher = require('./DataFetcher-ba94ed5b.js');
|
8
8
|
const ParamType = require('./ParamType-90b440a0.js');
|
9
|
-
require('./pesquisa-fetcher-
|
10
|
-
require('./index-
|
11
|
-
require('./ISave-
|
9
|
+
require('./pesquisa-fetcher-7a08d110.js');
|
10
|
+
require('./index-0922807b.js');
|
11
|
+
require('./ISave-e91b70a7.js');
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
|
-
require('./dataunit-fetcher-d839c5d7.js');
|
15
14
|
require('./PreloadManager-84466da6.js');
|
16
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
17
16
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -717,4 +716,134 @@ const SnkActionsButton = class {
|
|
717
716
|
};
|
718
717
|
SnkActionsButton.style = snkActionsButtonCss;
|
719
718
|
|
719
|
+
const taskbarActionsButtonCss = ".sc-taskbar-actions-button-h{display:flex;width:fit-content;height:fit-content}";
|
720
|
+
|
721
|
+
const TaskbarActionsButton = class {
|
722
|
+
constructor(hostRef) {
|
723
|
+
index.registerInstance(this, hostRef);
|
724
|
+
this.taskbarActionSelected = index.createEvent(this, "taskbarActionSelected", 7);
|
725
|
+
this.taskbarActionsOpened = index.createEvent(this, "taskbarActionsOpened", 7);
|
726
|
+
this.taskbarActionsButtonDisconnected = index.createEvent(this, "taskbarActionsButtonDisconnected", 7);
|
727
|
+
this._showDropdown = false;
|
728
|
+
this.title = undefined;
|
729
|
+
this.enabled = undefined;
|
730
|
+
this.actions = undefined;
|
731
|
+
}
|
732
|
+
async handleKeyDown(event) {
|
733
|
+
if (event.key === 'Escape' || event.key === 'Esc') {
|
734
|
+
await this.hideActions();
|
735
|
+
}
|
736
|
+
}
|
737
|
+
async handleClose() {
|
738
|
+
await this.hideActions();
|
739
|
+
}
|
740
|
+
/**
|
741
|
+
* Exibe a lista de ações.
|
742
|
+
*/
|
743
|
+
async showActions() {
|
744
|
+
this._showDropdown = true;
|
745
|
+
requestAnimationFrame(() => {
|
746
|
+
this._element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' });
|
747
|
+
});
|
748
|
+
}
|
749
|
+
/**
|
750
|
+
* Esaconde a lista de ações.
|
751
|
+
*/
|
752
|
+
async hideActions() {
|
753
|
+
this._showDropdown = false;
|
754
|
+
}
|
755
|
+
/**
|
756
|
+
* Informa se a lista de ações está aberta.
|
757
|
+
*/
|
758
|
+
async isOpened() {
|
759
|
+
return this._showDropdown;
|
760
|
+
}
|
761
|
+
controlDropdown() {
|
762
|
+
this._showDropdown = !this._showDropdown;
|
763
|
+
}
|
764
|
+
loadItems() {
|
765
|
+
return this.actions.filter(action => action !== undefined).map(action => {
|
766
|
+
var _a;
|
767
|
+
return {
|
768
|
+
id: action.value,
|
769
|
+
label: action.label,
|
770
|
+
value: action.value,
|
771
|
+
type: (_a = action.type) !== null && _a !== void 0 ? _a : 'item',
|
772
|
+
children: action.children,
|
773
|
+
iconName: action.iconName,
|
774
|
+
subAction: action.subAction,
|
775
|
+
group: action.group,
|
776
|
+
disableCloseOnSelect: action.disableCloseOnSelect,
|
777
|
+
};
|
778
|
+
});
|
779
|
+
}
|
780
|
+
canShowDropdown() {
|
781
|
+
var _a;
|
782
|
+
return this._showDropdown && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
783
|
+
}
|
784
|
+
onSelectAction(iAction) {
|
785
|
+
const actions = this.actions.map(action => (Object.assign(Object.assign({}, action), { id: action.value })));
|
786
|
+
const selectedAction = this.getSelectedAction(iAction.id, actions);
|
787
|
+
this.taskbarActionSelected.emit(selectedAction);
|
788
|
+
if (!selectedAction.disableCloseOnSelect) {
|
789
|
+
this._showDropdown = false;
|
790
|
+
}
|
791
|
+
}
|
792
|
+
getSelectedAction(id, actions) {
|
793
|
+
let selectedItem;
|
794
|
+
for (const item of actions) {
|
795
|
+
if (item.id === id) {
|
796
|
+
selectedItem = item;
|
797
|
+
break;
|
798
|
+
}
|
799
|
+
if (!(item === null || item === void 0 ? void 0 : item.children))
|
800
|
+
continue;
|
801
|
+
selectedItem = this.getSelectedAction(id, item.children);
|
802
|
+
}
|
803
|
+
return selectedItem;
|
804
|
+
}
|
805
|
+
dropdownItemBuilder(item, _level) {
|
806
|
+
const itemAction = this.actions.find(action => action.value === item.id);
|
807
|
+
if (!itemAction || !itemAction.itemBuilder) {
|
808
|
+
return undefined;
|
809
|
+
}
|
810
|
+
const customContent = itemAction.itemBuilder(this._element, itemAction);
|
811
|
+
if (typeof customContent === 'string') {
|
812
|
+
return index.h("div", { innerHTML: customContent });
|
813
|
+
}
|
814
|
+
return customContent;
|
815
|
+
}
|
816
|
+
/**
|
817
|
+
* Existem algumas actions que precisam ser inicializadas assim que o componente é carregado,
|
818
|
+
* pois necessitam de algumas informações, como por exemplo a referência do elemento taskbar-actions-button na tela.
|
819
|
+
* É o caso do searchColumn/searhField
|
820
|
+
*/
|
821
|
+
initializeEagerItems() {
|
822
|
+
var _a;
|
823
|
+
(_a = this.actions) === null || _a === void 0 ? void 0 : _a.forEach(action => {
|
824
|
+
var _a;
|
825
|
+
if (action && action.eagerInitialize && action.itemBuilder) {
|
826
|
+
(_a = action.itemBuilder) === null || _a === void 0 ? void 0 : _a.call(action, this._element, action);
|
827
|
+
}
|
828
|
+
});
|
829
|
+
}
|
830
|
+
componentDidLoad() {
|
831
|
+
this.initializeEagerItems();
|
832
|
+
}
|
833
|
+
componentDidRender() {
|
834
|
+
if (this._showDropdown) {
|
835
|
+
this.taskbarActionsOpened.emit(this._element);
|
836
|
+
}
|
837
|
+
}
|
838
|
+
disconnectedCallback() {
|
839
|
+
this.taskbarActionsButtonDisconnected.emit();
|
840
|
+
}
|
841
|
+
render() {
|
842
|
+
return (index.h(index.Host, null, index.h("div", { class: `ez-padding-left--medium ${this.canShowDropdown() ? ' ez-elevation--16' : ''}` }, index.h("ez-button", { title: this.title, mode: 'icon', iconName: 'dots-vertical', size: 'small', enabled: this.enabled, onClick: () => this.controlDropdown() }), this.canShowDropdown() && index.h("ez-dropdown", { items: this.loadItems(), onEzClick: (evt) => this.onSelectAction(evt.detail), onEzOutsideClick: () => this._showDropdown = false, itemBuilder: (item, level) => this.dropdownItemBuilder(item, level) }))));
|
843
|
+
}
|
844
|
+
get _element() { return index.getElement(this); }
|
845
|
+
};
|
846
|
+
TaskbarActionsButton.style = taskbarActionsButtonCss;
|
847
|
+
|
720
848
|
exports.snk_actions_button = SnkActionsButton;
|
849
|
+
exports.taskbar_actions_button = TaskbarActionsButton;
|
@@ -5,12 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
8
|
+
const ConfigStorage = require('./ConfigStorage-302bbbd4.js');
|
9
9
|
const DataFetcher = require('./DataFetcher-ba94ed5b.js');
|
10
10
|
const authFetcher = require('./auth-fetcher-c8467c07.js');
|
11
|
-
const
|
12
|
-
const
|
13
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-7293d0ad.js');
|
11
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-7a08d110.js');
|
12
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-e7dcf408.js');
|
14
13
|
require('./form-config-fetcher-df043d3d.js');
|
15
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
16
15
|
require('./PrintUtils-bcaeb82f.js');
|
@@ -765,7 +764,7 @@ const SnkApplication = class {
|
|
765
764
|
}
|
766
765
|
get dataUnitFetcher() {
|
767
766
|
if (!this._dataUnitFetcher) {
|
768
|
-
this._dataUnitFetcher = new
|
767
|
+
this._dataUnitFetcher = new pesquisaFetcher.DataUnitFetcher();
|
769
768
|
}
|
770
769
|
return this._dataUnitFetcher;
|
771
770
|
}
|
@@ -829,11 +828,53 @@ const SnkApplication = class {
|
|
829
828
|
return this.executePreparedSearch(mode, argument, { entity: ENTITYNAME, entityDescription: DESCRIPTIONENTITY, criteria, searchOptions });
|
830
829
|
}
|
831
830
|
}
|
831
|
+
filterInvalidFields(resp, item, mdByName) {
|
832
|
+
let fieldsMetadata = resp.fieldsMetadata.filter((field) => {
|
833
|
+
let accept = !core.StringUtils.isEmpty(item[field.fieldName]) &&
|
834
|
+
field.visible !== false &&
|
835
|
+
field.type !== 'B' &&
|
836
|
+
resp.pkField !== field.fieldName &&
|
837
|
+
resp.descriptionField !== field.fieldName &&
|
838
|
+
(field.isPrimaryKey || !field.isLinkField) &&
|
839
|
+
!(field.type === 'S' && field.presentationType === 'H');
|
840
|
+
if (accept) {
|
841
|
+
mdByName[field.fieldName] = field;
|
842
|
+
}
|
843
|
+
//Condição que trata o problema de trazer imagem no entityCard na pesquisa de registros
|
844
|
+
if (typeof item[field.fieldName] === 'string' && (item[field.fieldName].indexOf('<img') > -1 || item[field.fieldName].indexOf('<svg') > -1)) {
|
845
|
+
return false;
|
846
|
+
}
|
847
|
+
return accept;
|
848
|
+
});
|
849
|
+
return fieldsMetadata;
|
850
|
+
}
|
851
|
+
filterMathFields(matchFields, fields, qtyFields, mdByName) {
|
852
|
+
if (matchFields && Array.isArray(matchFields)) {
|
853
|
+
matchFields.forEach((matchField) => {
|
854
|
+
let fieldMD = core.ArrayUtils.removeReference(fields, mdByName[matchField]);
|
855
|
+
if (fieldMD) {
|
856
|
+
fields.unshift(fieldMD);
|
857
|
+
}
|
858
|
+
});
|
859
|
+
}
|
860
|
+
fields = fields.slice(0, qtyFields);
|
861
|
+
return fields;
|
862
|
+
}
|
863
|
+
builOptionItem(argument, item, fields, descriptionField, pkField) {
|
864
|
+
var _a;
|
865
|
+
let exibitionItem = {
|
866
|
+
value: core.StringUtils.highlightValue(argument, item['__matchFields'], (_a = item[pkField]) === null || _a === void 0 ? void 0 : _a.toString(), fields, true),
|
867
|
+
label: descriptionField ? core.StringUtils.highlightValue(argument, item['__matchFields'], item[descriptionField], fields, true) : "",
|
868
|
+
details: core.SearchUtils.buildDetails(argument, fields, item)
|
869
|
+
};
|
870
|
+
return exibitionItem;
|
871
|
+
}
|
832
872
|
/**
|
833
873
|
* Obtém as opções em componentes de pesquisa
|
834
874
|
* Ex.: snk-config-options
|
835
875
|
*/
|
836
876
|
async executePreparedSearch(mode, argument, options) {
|
877
|
+
const mdByName = {};
|
837
878
|
const { entity, entityDescription, criteria, searchOptions } = options;
|
838
879
|
if (mode === "ADVANCED") {
|
839
880
|
return new Promise(accept => {
|
@@ -851,7 +892,25 @@ const SnkApplication = class {
|
|
851
892
|
});
|
852
893
|
}
|
853
894
|
else {
|
854
|
-
return
|
895
|
+
return new Promise((resolve, reject) => {
|
896
|
+
this.pesquisaFetcher.loadAdvancedSearch(entity, argument, criteria, searchOptions)
|
897
|
+
.then(result => {
|
898
|
+
result = core.ObjectUtils.stringToObject(result.json.$);
|
899
|
+
let descriptionField = result.descriptionField;
|
900
|
+
let pkField = result.pkField;
|
901
|
+
const list = [];
|
902
|
+
result.data.forEach((item) => {
|
903
|
+
let fieldsMetadata = this.filterInvalidFields(result, item, mdByName);
|
904
|
+
let qtyFields = 6;
|
905
|
+
let fields = this.filterMathFields(item['__matchFields'], fieldsMetadata, qtyFields, mdByName);
|
906
|
+
list.push(this.builOptionItem(argument, item, fields, descriptionField, pkField));
|
907
|
+
});
|
908
|
+
resolve(list);
|
909
|
+
})
|
910
|
+
.catch(error => {
|
911
|
+
reject(error);
|
912
|
+
});
|
913
|
+
});
|
855
914
|
}
|
856
915
|
}
|
857
916
|
/**
|