@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-78242.2 → 0.0.0-bugfix-dev-KB-80932.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/{ConfigStorage-f079f5fd.js → ConfigStorage-d024aec8.js} +2 -2
- package/dist/cjs/{ContinuousInsertUtils-64e47516.js → ContinuousInsertUtils-54d44192.js} +5 -5
- package/dist/cjs/{DataFetcher-e059eb72.js → DataFetcher-65879b2c.js} +188 -56
- package/dist/cjs/{SnkFormConfigManager-63369164.js → SnkFormConfigManager-ae3185b2.js} +2 -2
- package/dist/cjs/{auth-fetcher-4f853233.js → auth-fetcher-8480751c.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-228016f4.js → dataunit-fetcher-8ea97d88.js} +2 -2
- package/dist/cjs/{form-config-fetcher-39397ac5.js → form-config-fetcher-90126e4c.js} +38 -1
- package/dist/cjs/index-f9e81701.js +8 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-a9bfeb22.js → pesquisa-fetcher-f3454c23.js} +179 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +133 -0
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +99 -9
- package/dist/cjs/snk-application.cjs.entry.js +144 -21
- package/dist/cjs/snk-attach.cjs.entry.js +13 -9
- package/dist/cjs/snk-config-options_3.cjs.entry.js +4 -4
- package/dist/cjs/snk-crud.cjs.entry.js +8 -7
- package/dist/cjs/snk-data-exporter.cjs.entry.js +29 -18
- package/dist/cjs/{snk-data-unit-3d9b6ed4.js → snk-data-unit-72ef8777.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +27 -11
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-grid.cjs.entry.js +9 -8
- package/dist/cjs/{snk-guides-viewer-2139481c.js → snk-guides-viewer-ea5d0907.js} +5 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +105 -31
- package/dist/cjs/snk-simple-crud.cjs.entry.js +27 -29
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/snk-actions-button/actions/index.js +4 -4
- package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +4 -3
- package/dist/collection/components/snk-application/snk-application.css +34 -0
- package/dist/collection/components/snk-application/snk-application.js +197 -14
- package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
- package/dist/collection/components/snk-crud/snk-crud.js +39 -20
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +11 -5
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +11 -4
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -3
- package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +3 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +40 -8
- package/dist/collection/components/snk-grid/snk-grid.js +39 -20
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +10 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +190 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +25 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +179 -0
- package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +89 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +24 -5
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +168 -32
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +56 -41
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +181 -0
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +41 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +92 -3
- package/dist/components/ContinuousInsertUtils.js +2 -3
- package/dist/components/DataFetcher.js +188 -56
- package/dist/components/ISave.js +346 -1
- package/dist/components/dataunit-fetcher.js +1 -1
- package/dist/components/form-config-fetcher.js +37 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/pesquisa-grid.d.ts +11 -0
- package/dist/components/pesquisa-grid.js +6 -0
- package/dist/components/pesquisa-grid2.js +86 -0
- package/dist/components/pesquisa-tree.d.ts +11 -0
- package/dist/components/pesquisa-tree.js +6 -0
- package/dist/components/pesquisa-tree2.js +82 -0
- package/dist/components/snk-actions-button2.js +4 -5
- package/dist/components/snk-application2.js +159 -20
- package/dist/components/snk-attach2.js +20 -35
- package/dist/components/snk-crud.js +66 -59
- package/dist/components/snk-data-exporter2.js +25 -15
- package/dist/components/snk-detail-view2.js +84 -94
- package/dist/components/snk-filter-bar2.js +23 -8
- package/dist/components/snk-filter-modal.js +3 -1
- package/dist/components/snk-grid2.js +5 -4
- package/dist/components/snk-pesquisa2.js +118 -33
- package/dist/components/snk-simple-crud2.js +35 -56
- package/dist/components/snk-simple-form-config.d.ts +11 -0
- package/dist/components/snk-simple-form-config.js +6 -0
- package/dist/components/snk-simple-form-config2.js +120 -0
- package/dist/components/teste-pesquisa.js +13 -1
- package/dist/esm/{ConfigStorage-6514d66e.js → ConfigStorage-373bb440.js} +2 -2
- package/dist/esm/{ContinuousInsertUtils-b62906f9.js → ContinuousInsertUtils-25e7bd9a.js} +5 -5
- package/dist/esm/{DataFetcher-5034df59.js → DataFetcher-5221b992.js} +188 -56
- package/dist/esm/{SnkFormConfigManager-b409c745.js → SnkFormConfigManager-b65e6db0.js} +2 -2
- package/dist/esm/{auth-fetcher-ca5d3a49.js → auth-fetcher-e32fe8a4.js} +1 -1
- package/dist/esm/{dataunit-fetcher-56cb648b.js → dataunit-fetcher-8dd93d8b.js} +2 -2
- package/dist/esm/{form-config-fetcher-a7d3e277.js → form-config-fetcher-126e2471.js} +38 -1
- package/dist/esm/index-a7d3d3f1.js +8 -4
- package/dist/esm/loader.js +1 -1
- package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-0af41f09.js} +180 -3
- package/dist/esm/pesquisa-grid_2.entry.js +128 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_5.entry.js} +99 -10
- package/dist/esm/snk-application.entry.js +146 -23
- package/dist/esm/snk-attach.entry.js +13 -9
- package/dist/esm/snk-config-options_3.entry.js +4 -4
- package/dist/esm/snk-crud.entry.js +8 -7
- package/dist/esm/snk-data-exporter.entry.js +29 -18
- package/dist/esm/{snk-data-unit-9fa7d2b9.js → snk-data-unit-11a49fc3.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +7 -7
- package/dist/esm/snk-filter-bar_4.entry.js +28 -12
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-grid.entry.js +9 -8
- package/dist/esm/{snk-guides-viewer-b7ed39eb.js → snk-guides-viewer-830f5fb9.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +105 -31
- package/dist/esm/snk-simple-crud.entry.js +27 -29
- package/dist/sankhyablocks/{p-0e206e62.js → p-05b6ff91.js} +1 -1
- package/dist/sankhyablocks/p-09067bee.entry.js +1 -0
- package/dist/sankhyablocks/p-0cda2226.entry.js +11 -0
- package/dist/sankhyablocks/p-1435701f.js +26 -0
- package/dist/sankhyablocks/{p-e97be1c8.js → p-171b7623.js} +1 -1
- package/dist/sankhyablocks/{p-9ffd9fc7.js → p-19dc71e9.js} +1 -1
- package/dist/sankhyablocks/{p-0d2a2e9e.entry.js → p-1a91d1f3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-aa003d4e.entry.js → p-1cf39cfd.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bb8ef149.entry.js → p-254c59d2.entry.js} +1 -1
- package/dist/sankhyablocks/p-422eb699.entry.js +1 -0
- package/dist/sankhyablocks/{p-a2c790ac.entry.js → p-469384a2.entry.js} +1 -1
- package/dist/sankhyablocks/p-54f5354a.entry.js +1 -0
- package/dist/sankhyablocks/{p-342eeb3b.js → p-60e4db34.js} +1 -1
- package/dist/sankhyablocks/p-618a29ed.entry.js +1 -0
- package/dist/sankhyablocks/p-798386c7.js +6 -0
- package/dist/sankhyablocks/{p-fca0e5cc.entry.js → p-82ee6dc3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e4391e16.js → p-8a1ee5b5.js} +1 -1
- package/dist/sankhyablocks/p-8bd86610.entry.js +1 -0
- package/dist/sankhyablocks/p-b50a0753.entry.js +1 -0
- package/dist/sankhyablocks/p-d62228fb.js +1 -0
- package/dist/sankhyablocks/p-d92d4f91.entry.js +1 -0
- package/dist/sankhyablocks/{p-47d24ac8.js → p-ddefbbc7.js} +1 -1
- package/dist/sankhyablocks/p-e5430b29.entry.js +1 -0
- package/dist/sankhyablocks/p-f0b9303b.js +1 -0
- package/dist/sankhyablocks/p-f258690a.entry.js +1 -0
- package/dist/sankhyablocks/{p-ec43fcc8.entry.js → p-f975370f.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +22 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +8 -4
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +6 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +8 -4
- package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +38 -0
- package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +29 -0
- package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +19 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +35 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -4
- package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +34 -0
- package/dist/types/components.d.ts +244 -23
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +8 -2
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +10 -1
- package/package.json +1 -1
- package/react/components.d.ts +3 -0
- package/react/components.js +3 -0
- package/react/components.js.map +1 -1
- package/dist/esm/pesquisa-fetcher-6bc2e41a.js +0 -169
- package/dist/sankhyablocks/p-00278e07.js +0 -1
- package/dist/sankhyablocks/p-0387d9d7.entry.js +0 -1
- package/dist/sankhyablocks/p-126c58ea.js +0 -26
- package/dist/sankhyablocks/p-1d3ce0d9.entry.js +0 -1
- package/dist/sankhyablocks/p-341465ce.js +0 -6
- package/dist/sankhyablocks/p-3728d2aa.entry.js +0 -11
- package/dist/sankhyablocks/p-4138da61.entry.js +0 -1
- package/dist/sankhyablocks/p-5d9788b3.entry.js +0 -1
- package/dist/sankhyablocks/p-7075b789.entry.js +0 -1
- package/dist/sankhyablocks/p-aaf94476.js +0 -1
- package/dist/sankhyablocks/p-af7f7b3e.entry.js +0 -1
- package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
- package/dist/sankhyablocks/p-eb7c9cf4.entry.js +0 -1
|
@@ -21,6 +21,8 @@ export class SnkCrud {
|
|
|
21
21
|
this._currentViewMode = VIEW_MODE.GRID;
|
|
22
22
|
this._canEdit = undefined;
|
|
23
23
|
this._resourceID = undefined;
|
|
24
|
+
this.enableLockManagerLoadingComp = false;
|
|
25
|
+
this.enableLockManagerTaskbarClick = false;
|
|
24
26
|
this.configName = undefined;
|
|
25
27
|
this.filterBarTitle = undefined;
|
|
26
28
|
this.selectionToastConfig = undefined;
|
|
@@ -42,7 +44,6 @@ export class SnkCrud {
|
|
|
42
44
|
this.enableGridInsert = false;
|
|
43
45
|
this.domainMessagesBuilder = undefined;
|
|
44
46
|
this.ignoreReadOnlyFormFields = undefined;
|
|
45
|
-
this.enableLockManger = false;
|
|
46
47
|
this.setCustomFormTitle = undefined;
|
|
47
48
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
|
48
49
|
}
|
|
@@ -390,7 +391,7 @@ export class SnkCrud {
|
|
|
390
391
|
return;
|
|
391
392
|
}
|
|
392
393
|
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
|
|
393
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert,
|
|
394
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
|
394
395
|
}
|
|
395
396
|
static get is() { return "snk-crud"; }
|
|
396
397
|
static get encapsulation() { return "scoped"; }
|
|
@@ -406,6 +407,42 @@ export class SnkCrud {
|
|
|
406
407
|
}
|
|
407
408
|
static get properties() {
|
|
408
409
|
return {
|
|
410
|
+
"enableLockManagerLoadingComp": {
|
|
411
|
+
"type": "boolean",
|
|
412
|
+
"mutable": false,
|
|
413
|
+
"complexType": {
|
|
414
|
+
"original": "boolean",
|
|
415
|
+
"resolved": "boolean",
|
|
416
|
+
"references": {}
|
|
417
|
+
},
|
|
418
|
+
"required": false,
|
|
419
|
+
"optional": true,
|
|
420
|
+
"docs": {
|
|
421
|
+
"tags": [],
|
|
422
|
+
"text": "Define se o componente deve usar o LockManager para controle de carregamento da aplica\u00E7\u00E3o"
|
|
423
|
+
},
|
|
424
|
+
"attribute": "enable-lock-manager-loading-comp",
|
|
425
|
+
"reflect": false,
|
|
426
|
+
"defaultValue": "false"
|
|
427
|
+
},
|
|
428
|
+
"enableLockManagerTaskbarClick": {
|
|
429
|
+
"type": "boolean",
|
|
430
|
+
"mutable": false,
|
|
431
|
+
"complexType": {
|
|
432
|
+
"original": "boolean",
|
|
433
|
+
"resolved": "boolean",
|
|
434
|
+
"references": {}
|
|
435
|
+
},
|
|
436
|
+
"required": false,
|
|
437
|
+
"optional": true,
|
|
438
|
+
"docs": {
|
|
439
|
+
"tags": [],
|
|
440
|
+
"text": "Ativa o gerenciamento de locks na grade pela Taskbar."
|
|
441
|
+
},
|
|
442
|
+
"attribute": "enable-lock-manager-taskbar-click",
|
|
443
|
+
"reflect": false,
|
|
444
|
+
"defaultValue": "false"
|
|
445
|
+
},
|
|
409
446
|
"configName": {
|
|
410
447
|
"type": "string",
|
|
411
448
|
"mutable": true,
|
|
@@ -799,24 +836,6 @@ export class SnkCrud {
|
|
|
799
836
|
"attribute": "ignore-read-only-form-fields",
|
|
800
837
|
"reflect": false
|
|
801
838
|
},
|
|
802
|
-
"enableLockManger": {
|
|
803
|
-
"type": "boolean",
|
|
804
|
-
"mutable": false,
|
|
805
|
-
"complexType": {
|
|
806
|
-
"original": "boolean",
|
|
807
|
-
"resolved": "boolean",
|
|
808
|
-
"references": {}
|
|
809
|
-
},
|
|
810
|
-
"required": false,
|
|
811
|
-
"optional": true,
|
|
812
|
-
"docs": {
|
|
813
|
-
"tags": [],
|
|
814
|
-
"text": "Ativa o gerenciamento de locks na grade."
|
|
815
|
-
},
|
|
816
|
-
"attribute": "enable-lock-manger",
|
|
817
|
-
"reflect": false,
|
|
818
|
-
"defaultValue": "false"
|
|
819
|
-
},
|
|
820
839
|
"setCustomFormTitle": {
|
|
821
840
|
"type": "unknown",
|
|
822
841
|
"mutable": false,
|
package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js
CHANGED
|
@@ -10,11 +10,17 @@ export default class ClientSideExporterStrategy {
|
|
|
10
10
|
const visibleColumns = getVisibleColumns(columns);
|
|
11
11
|
return visibleColumns;
|
|
12
12
|
}
|
|
13
|
-
async
|
|
13
|
+
async getColumns(resolveProps) {
|
|
14
14
|
var _a;
|
|
15
|
+
if ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) {
|
|
16
|
+
return await this.getParsedColumns();
|
|
17
|
+
}
|
|
18
|
+
return await this._provider.getColumnsMetadata();
|
|
19
|
+
}
|
|
20
|
+
async executeExport(resolveProps) {
|
|
15
21
|
const { methodName, gridTitle } = resolveProps;
|
|
16
22
|
const records = await this._provider.getRecords();
|
|
17
|
-
const columns =
|
|
23
|
+
const columns = await this.getColumns(resolveProps);
|
|
18
24
|
const [serviceName, processor] = this.getExecutor(methodName);
|
|
19
25
|
const payload = {
|
|
20
26
|
serviceName,
|
|
@@ -51,10 +57,10 @@ export default class ClientSideExporterStrategy {
|
|
|
51
57
|
"GridXLSBuilderSP.buildXLSFromJson",
|
|
52
58
|
responseBody => ({
|
|
53
59
|
fileSessionKey: responseBody.chaveXLS.valor,
|
|
54
|
-
canPrint:
|
|
55
|
-
canExport:
|
|
60
|
+
canPrint: true,
|
|
61
|
+
canExport: true,
|
|
62
|
+
canSendEmail: true,
|
|
56
63
|
useAppPrint: false,
|
|
57
|
-
canSendEmail: false
|
|
58
64
|
})
|
|
59
65
|
];
|
|
60
66
|
}
|
package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js
CHANGED
|
@@ -23,12 +23,19 @@ export default class ServerSideExporterStrategy {
|
|
|
23
23
|
const visibleColumns = getVisibleColumns(columns);
|
|
24
24
|
return visibleColumns;
|
|
25
25
|
}
|
|
26
|
+
async getColumns(resolveProps) {
|
|
27
|
+
var _a;
|
|
28
|
+
if ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) {
|
|
29
|
+
return await this.getParsedColumns();
|
|
30
|
+
}
|
|
31
|
+
return await this._provider.getColumnsMetadata();
|
|
32
|
+
}
|
|
26
33
|
async getParams(resolveProps) {
|
|
27
|
-
var _a, _b, _c, _d, _e, _f
|
|
34
|
+
var _a, _b, _c, _d, _e, _f;
|
|
28
35
|
const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29
|
-
const columns =
|
|
30
|
-
const sort = (
|
|
31
|
-
const resourceURI = (
|
|
36
|
+
const columns = await this.getColumns(resolveProps);
|
|
37
|
+
const sort = (_d = (_c = this._provider).getOrders) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
38
|
+
const resourceURI = (_f = (_e = this._provider).getResourceURI) === null || _f === void 0 ? void 0 : _f.call(_e);
|
|
32
39
|
const selectedIDs = this._provider.getSelectedIDs();
|
|
33
40
|
const option = resolveProps.exportOption;
|
|
34
41
|
const currentPageOptions = [
|
|
@@ -28,7 +28,7 @@ export class CommonsExporter {
|
|
|
28
28
|
const columnData = {
|
|
29
29
|
label: column.label,
|
|
30
30
|
id: column.name,
|
|
31
|
-
width: column.width,
|
|
31
|
+
width: (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UserInterface.SEARCH ? 60 : column.width,
|
|
32
32
|
type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
|
33
33
|
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
|
|
34
34
|
customFormatter
|
|
@@ -126,7 +126,6 @@ export class SnkDataExporter {
|
|
|
126
126
|
var _a, _b, _c;
|
|
127
127
|
const optionKey = this.getOptionKey(option);
|
|
128
128
|
const fileType = (_a = DataExporterType[optionKey]) !== null && _a !== void 0 ? _a : DataExporterType.EXPORT_TO_PDF;
|
|
129
|
-
const isDownload = DataExporterType[optionKey] === DataExporterType.EXPORT_TO_XLS;
|
|
130
129
|
const params = {
|
|
131
130
|
methodName: DataExporterOption[`EXPORT_TO_${fileType}`],
|
|
132
131
|
fileName: this._appLabel,
|
|
@@ -137,8 +136,7 @@ export class SnkDataExporter {
|
|
|
137
136
|
};
|
|
138
137
|
await this.resolveExporter(params, (response) => {
|
|
139
138
|
if (response.canExport || fileType === DataExporterType.EXPORT_TO_PDF) {
|
|
140
|
-
fileViewer(Object.assign(Object.assign({}, response), { fileType
|
|
141
|
-
isDownload }));
|
|
139
|
+
fileViewer(Object.assign(Object.assign({}, response), { fileType }));
|
|
142
140
|
}
|
|
143
141
|
else {
|
|
144
142
|
ApplicationUtils.error(this.getMessage("snkDataExporter.title.permission"), this.getMessage("snkDataExporter.message.exportPermission"));
|
|
@@ -144,7 +144,9 @@ export class SnkFilterModal {
|
|
|
144
144
|
this.filters = ObjectUtils.copy(filterListCopy);
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
|
-
this.filters.find(filter => filter.id === filterItem.id)
|
|
147
|
+
const filter = this.filters.find(filter => filter.id === filterItem.id);
|
|
148
|
+
filter.value = undefined;
|
|
149
|
+
this.filters = ObjectUtils.copy(this.filters);
|
|
148
150
|
}
|
|
149
151
|
uncheckFilterValues(valueList) {
|
|
150
152
|
valueList.forEach(value => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApplicationContext, ElementIDUtils, ObjectUtils, ErrorException } from '@sankhyalabs/core';
|
|
1
|
+
import { ApplicationContext, ElementIDUtils, ObjectUtils, ErrorException, LockManager, LockManagerOperation } from '@sankhyalabs/core';
|
|
2
2
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
|
3
3
|
import { h, Host } from '@stencil/core';
|
|
4
4
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
|
@@ -14,6 +14,7 @@ export class SnkFilterBar {
|
|
|
14
14
|
this._firstLoad = true;
|
|
15
15
|
this._pendingVariables = false;
|
|
16
16
|
this._customfiltersToBeUpdated = [];
|
|
17
|
+
this._resolveLoading = undefined;
|
|
17
18
|
this._calculateSortIndex = (item) => {
|
|
18
19
|
if (!item.visible)
|
|
19
20
|
return 0;
|
|
@@ -27,6 +28,7 @@ export class SnkFilterBar {
|
|
|
27
28
|
this._filtersComparator = (a, b) => {
|
|
28
29
|
return this._calculateSortIndex(b) - this._calculateSortIndex(a);
|
|
29
30
|
};
|
|
31
|
+
this.enableLockManagerLoadingComp = false;
|
|
30
32
|
this.customFilterBarConfig = undefined;
|
|
31
33
|
this.dataUnit = undefined;
|
|
32
34
|
this.title = undefined;
|
|
@@ -448,14 +450,26 @@ export class SnkFilterBar {
|
|
|
448
450
|
this.personalizedFilterId = undefined;
|
|
449
451
|
this.showPersonalizedFilter = false;
|
|
450
452
|
}
|
|
451
|
-
componentWillLoad() {
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
this.
|
|
455
|
-
this.
|
|
456
|
-
this.
|
|
453
|
+
async componentWillLoad() {
|
|
454
|
+
var _a;
|
|
455
|
+
try {
|
|
456
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
457
|
+
await this.attachDataUnit();
|
|
458
|
+
if (this._application) {
|
|
459
|
+
if (this._application.enableLockManagerLoadingApp && this.enableLockManagerLoadingComp) {
|
|
460
|
+
const appLoadLockerID = LockManager.addLockManagerCtxId(this._element);
|
|
461
|
+
this._resolveLoading = LockManager.lock(appLoadLockerID, LockManagerOperation.APP_LOADING);
|
|
462
|
+
}
|
|
463
|
+
await Promise.all([
|
|
464
|
+
this.loadPermitions(),
|
|
465
|
+
this.addFilterBarLegacyConfigName(),
|
|
466
|
+
this.loadConfigFromStorage(),
|
|
467
|
+
]);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
finally {
|
|
471
|
+
(_a = this._resolveLoading) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
457
472
|
}
|
|
458
|
-
this.attachDataUnit();
|
|
459
473
|
}
|
|
460
474
|
componentDidRender() {
|
|
461
475
|
this.processPendingFilter();
|
|
@@ -486,6 +500,24 @@ export class SnkFilterBar {
|
|
|
486
500
|
}
|
|
487
501
|
static get properties() {
|
|
488
502
|
return {
|
|
503
|
+
"enableLockManagerLoadingComp": {
|
|
504
|
+
"type": "boolean",
|
|
505
|
+
"mutable": false,
|
|
506
|
+
"complexType": {
|
|
507
|
+
"original": "boolean",
|
|
508
|
+
"resolved": "boolean",
|
|
509
|
+
"references": {}
|
|
510
|
+
},
|
|
511
|
+
"required": false,
|
|
512
|
+
"optional": true,
|
|
513
|
+
"docs": {
|
|
514
|
+
"tags": [],
|
|
515
|
+
"text": "Define se o componente deve usar o LockManager para controle de carregamento"
|
|
516
|
+
},
|
|
517
|
+
"attribute": "enable-lock-manager-loading-comp",
|
|
518
|
+
"reflect": false,
|
|
519
|
+
"defaultValue": "false"
|
|
520
|
+
},
|
|
489
521
|
"customFilterBarConfig": {
|
|
490
522
|
"type": "unknown",
|
|
491
523
|
"mutable": false,
|
|
@@ -50,6 +50,8 @@ export class SnkGrid {
|
|
|
50
50
|
this._showSnkFilterBar = true;
|
|
51
51
|
this._enableContinuousInsert = false;
|
|
52
52
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
|
53
|
+
this.enableLockManagerLoadingComp = false;
|
|
54
|
+
this.enableLockManagerTaskbarClick = false;
|
|
53
55
|
this.configName = undefined;
|
|
54
56
|
this.filterBarTitle = undefined;
|
|
55
57
|
this.resourceID = undefined;
|
|
@@ -73,7 +75,6 @@ export class SnkGrid {
|
|
|
73
75
|
this.autoLoad = undefined;
|
|
74
76
|
this.autoFocus = true;
|
|
75
77
|
this.enableGridInsert = false;
|
|
76
|
-
this.enableLockManger = false;
|
|
77
78
|
this.outlineMode = false;
|
|
78
79
|
}
|
|
79
80
|
/**
|
|
@@ -463,7 +464,7 @@ export class SnkGrid {
|
|
|
463
464
|
return undefined;
|
|
464
465
|
}
|
|
465
466
|
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
|
|
466
|
-
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert,
|
|
467
|
+
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, 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.resourceID }))));
|
|
467
468
|
}
|
|
468
469
|
static get is() { return "snk-grid"; }
|
|
469
470
|
static get encapsulation() { return "scoped"; }
|
|
@@ -500,6 +501,42 @@ export class SnkGrid {
|
|
|
500
501
|
},
|
|
501
502
|
"defaultValue": "new SnkMultiSelectionListDataSource()"
|
|
502
503
|
},
|
|
504
|
+
"enableLockManagerLoadingComp": {
|
|
505
|
+
"type": "boolean",
|
|
506
|
+
"mutable": false,
|
|
507
|
+
"complexType": {
|
|
508
|
+
"original": "boolean",
|
|
509
|
+
"resolved": "boolean",
|
|
510
|
+
"references": {}
|
|
511
|
+
},
|
|
512
|
+
"required": false,
|
|
513
|
+
"optional": true,
|
|
514
|
+
"docs": {
|
|
515
|
+
"tags": [],
|
|
516
|
+
"text": "Define se o componente deve usar o LockManager para controle de carregamento da aplica\u00E7\u00E3o"
|
|
517
|
+
},
|
|
518
|
+
"attribute": "enable-lock-manager-loading-comp",
|
|
519
|
+
"reflect": false,
|
|
520
|
+
"defaultValue": "false"
|
|
521
|
+
},
|
|
522
|
+
"enableLockManagerTaskbarClick": {
|
|
523
|
+
"type": "boolean",
|
|
524
|
+
"mutable": false,
|
|
525
|
+
"complexType": {
|
|
526
|
+
"original": "boolean",
|
|
527
|
+
"resolved": "boolean",
|
|
528
|
+
"references": {}
|
|
529
|
+
},
|
|
530
|
+
"required": false,
|
|
531
|
+
"optional": true,
|
|
532
|
+
"docs": {
|
|
533
|
+
"tags": [],
|
|
534
|
+
"text": "Ativa o gerenciamento de locks na grade pela Taskbar."
|
|
535
|
+
},
|
|
536
|
+
"attribute": "enable-lock-manager-taskbar-click",
|
|
537
|
+
"reflect": false,
|
|
538
|
+
"defaultValue": "false"
|
|
539
|
+
},
|
|
503
540
|
"configName": {
|
|
504
541
|
"type": "string",
|
|
505
542
|
"mutable": false,
|
|
@@ -928,24 +965,6 @@ export class SnkGrid {
|
|
|
928
965
|
"reflect": false,
|
|
929
966
|
"defaultValue": "false"
|
|
930
967
|
},
|
|
931
|
-
"enableLockManger": {
|
|
932
|
-
"type": "boolean",
|
|
933
|
-
"mutable": false,
|
|
934
|
-
"complexType": {
|
|
935
|
-
"original": "boolean",
|
|
936
|
-
"resolved": "boolean",
|
|
937
|
-
"references": {}
|
|
938
|
-
},
|
|
939
|
-
"required": false,
|
|
940
|
-
"optional": true,
|
|
941
|
-
"docs": {
|
|
942
|
-
"tags": [],
|
|
943
|
-
"text": "Ativa o gerenciamento de locks na grade."
|
|
944
|
-
},
|
|
945
|
-
"attribute": "enable-lock-manger",
|
|
946
|
-
"reflect": false,
|
|
947
|
-
"defaultValue": "false"
|
|
948
|
-
},
|
|
949
968
|
"outlineMode": {
|
|
950
969
|
"type": "boolean",
|
|
951
970
|
"mutable": false,
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
|
+
import InMemoryLoader from '../../../lib/dataUnit/InMemoryLoader';
|
|
3
|
+
import { PesquisaFetcher } from '../../../lib';
|
|
4
|
+
export class PesquisaGrid {
|
|
5
|
+
constructor() {
|
|
6
|
+
this._pesquisaFetcher = new PesquisaFetcher();
|
|
7
|
+
this.metadata = undefined;
|
|
8
|
+
this.dataSource = [];
|
|
9
|
+
this.pkField = undefined;
|
|
10
|
+
this.descriptionField = undefined;
|
|
11
|
+
this.entityName = undefined;
|
|
12
|
+
this._inMemoryLoader = undefined;
|
|
13
|
+
this._dataunit = undefined;
|
|
14
|
+
this._gridConfig = undefined;
|
|
15
|
+
}
|
|
16
|
+
observeDataSource(newValue) {
|
|
17
|
+
if (!this._inMemoryLoader || !this._dataunit || !newValue)
|
|
18
|
+
return;
|
|
19
|
+
this._inMemoryLoader.records = [...newValue];
|
|
20
|
+
}
|
|
21
|
+
async componentWillLoad() {
|
|
22
|
+
this.initializeDataUnit();
|
|
23
|
+
this._gridConfig = await this._pesquisaFetcher.loadPesquisaGridConfig(this.entityName);
|
|
24
|
+
}
|
|
25
|
+
initializeDataUnit() {
|
|
26
|
+
var _a;
|
|
27
|
+
this._inMemoryLoader = new InMemoryLoader(this.metadata, (_a = this.dataSource) !== null && _a !== void 0 ? _a : []);
|
|
28
|
+
this._dataunit = this._inMemoryLoader.dataUnit;
|
|
29
|
+
this._dataunit.pageSize = 0;
|
|
30
|
+
}
|
|
31
|
+
handleDbClick(record) {
|
|
32
|
+
const option = {
|
|
33
|
+
value: record[this.pkField],
|
|
34
|
+
label: record[this.descriptionField],
|
|
35
|
+
};
|
|
36
|
+
this.pesquisaGridSelectItem.emit(option);
|
|
37
|
+
}
|
|
38
|
+
async handleConfigChanged({ detail }) {
|
|
39
|
+
var _a;
|
|
40
|
+
const columns = (_a = detail === null || detail === void 0 ? void 0 : detail.columns) !== null && _a !== void 0 ? _a : [];
|
|
41
|
+
await this._pesquisaFetcher.savePesquisaGridConfig(this.entityName, columns);
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return (h(Host, null, h("ez-grid", { dataUnit: this._dataunit, config: this._gridConfig, canEdit: false, suppressCheckboxColumn: true, compact: true, autoFocus: false, onEzDoubleClick: ({ detail }) => this.handleDbClick(detail), onConfigChange: async (event) => this.handleConfigChanged(event) })));
|
|
45
|
+
}
|
|
46
|
+
static get is() { return "pesquisa-grid"; }
|
|
47
|
+
static get encapsulation() { return "scoped"; }
|
|
48
|
+
static get originalStyleUrls() {
|
|
49
|
+
return {
|
|
50
|
+
"$": ["pesquisa-grid.css"]
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
static get styleUrls() {
|
|
54
|
+
return {
|
|
55
|
+
"$": ["pesquisa-grid.css"]
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
static get properties() {
|
|
59
|
+
return {
|
|
60
|
+
"metadata": {
|
|
61
|
+
"type": "unknown",
|
|
62
|
+
"mutable": false,
|
|
63
|
+
"complexType": {
|
|
64
|
+
"original": "UnitMetadata",
|
|
65
|
+
"resolved": "UnitMetadata",
|
|
66
|
+
"references": {
|
|
67
|
+
"UnitMetadata": {
|
|
68
|
+
"location": "import",
|
|
69
|
+
"path": "@sankhyalabs/core"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"optional": false,
|
|
75
|
+
"docs": {
|
|
76
|
+
"tags": [],
|
|
77
|
+
"text": "Campos que representam as colunas da grade."
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"dataSource": {
|
|
81
|
+
"type": "unknown",
|
|
82
|
+
"mutable": false,
|
|
83
|
+
"complexType": {
|
|
84
|
+
"original": "Record[]",
|
|
85
|
+
"resolved": "Record[]",
|
|
86
|
+
"references": {
|
|
87
|
+
"Record": {
|
|
88
|
+
"location": "import",
|
|
89
|
+
"path": "@sankhyalabs/core"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"required": false,
|
|
94
|
+
"optional": false,
|
|
95
|
+
"docs": {
|
|
96
|
+
"tags": [],
|
|
97
|
+
"text": "Registros da grade"
|
|
98
|
+
},
|
|
99
|
+
"defaultValue": "[]"
|
|
100
|
+
},
|
|
101
|
+
"pkField": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"mutable": false,
|
|
104
|
+
"complexType": {
|
|
105
|
+
"original": "string",
|
|
106
|
+
"resolved": "string",
|
|
107
|
+
"references": {}
|
|
108
|
+
},
|
|
109
|
+
"required": false,
|
|
110
|
+
"optional": false,
|
|
111
|
+
"docs": {
|
|
112
|
+
"tags": [],
|
|
113
|
+
"text": "Campo que representa a chave prim\u00E1ria do registro"
|
|
114
|
+
},
|
|
115
|
+
"attribute": "pk-field",
|
|
116
|
+
"reflect": false
|
|
117
|
+
},
|
|
118
|
+
"descriptionField": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "string",
|
|
123
|
+
"resolved": "string",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [],
|
|
130
|
+
"text": "Campo que representa a descri\u00E7\u00E3o do registro"
|
|
131
|
+
},
|
|
132
|
+
"attribute": "description-field",
|
|
133
|
+
"reflect": false
|
|
134
|
+
},
|
|
135
|
+
"entityName": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"mutable": false,
|
|
138
|
+
"complexType": {
|
|
139
|
+
"original": "string",
|
|
140
|
+
"resolved": "string",
|
|
141
|
+
"references": {}
|
|
142
|
+
},
|
|
143
|
+
"required": false,
|
|
144
|
+
"optional": false,
|
|
145
|
+
"docs": {
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": "Nome da entidade representada na grade"
|
|
148
|
+
},
|
|
149
|
+
"attribute": "entity-name",
|
|
150
|
+
"reflect": false
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
static get states() {
|
|
155
|
+
return {
|
|
156
|
+
"_inMemoryLoader": {},
|
|
157
|
+
"_dataunit": {},
|
|
158
|
+
"_gridConfig": {}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
static get events() {
|
|
162
|
+
return [{
|
|
163
|
+
"method": "pesquisaGridSelectItem",
|
|
164
|
+
"name": "pesquisaGridSelectItem",
|
|
165
|
+
"bubbles": true,
|
|
166
|
+
"cancelable": true,
|
|
167
|
+
"composed": true,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": ""
|
|
171
|
+
},
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "IOption",
|
|
174
|
+
"resolved": "IOption",
|
|
175
|
+
"references": {
|
|
176
|
+
"IOption": {
|
|
177
|
+
"location": "import",
|
|
178
|
+
"path": "@sankhyalabs/ezui/.diststorybook/types/components/ez-combo-box/ez-combo-box"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}];
|
|
183
|
+
}
|
|
184
|
+
static get watchers() {
|
|
185
|
+
return [{
|
|
186
|
+
"propName": "dataSource",
|
|
187
|
+
"methodName": "observeDataSource"
|
|
188
|
+
}];
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
/*@doc Define o posicionamento superior do container de botões de ação.*/
|
|
3
|
+
--snk-pesquisa--tree__action-container--top: var(--space--sm);
|
|
4
|
+
/*@doc Define o posicionamento direito do container de botões de ação.*/
|
|
5
|
+
--snk-pesquisa--tree__action-container--right: var(--space--small);
|
|
6
|
+
/*@doc Define a altura mínima do componente.*/
|
|
7
|
+
--snk-pesquisa--tree__min-height: var(--space--extra-large);
|
|
8
|
+
|
|
9
|
+
background: var(--background--xlight, #FFF);
|
|
10
|
+
position: relative;
|
|
11
|
+
display: inline-block;
|
|
12
|
+
min-height: var(--snk-pesquisa--tree__min-height);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host:hover .actions-container{
|
|
16
|
+
display: flex;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.actions-container {
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: var(--snk-pesquisa--tree__action-container--top);
|
|
23
|
+
right: var(--snk-pesquisa--tree__action-container--right);
|
|
24
|
+
display: none;
|
|
25
|
+
}
|