@sankhyalabs/sankhyablocks 8.16.0-dev.99 → 8.16.0-ms.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/{ClientSideExporterProvider-cc82b68a.js → ClientSideExporterProvider-fe52f7cf.js} +11 -4
- package/dist/cjs/{ConfigStorage-2235f35e.js → ConfigStorage-6b633b10.js} +1 -1
- package/dist/cjs/ISave-e91b70a7.js +9 -0
- package/dist/cjs/{SnkFormConfigManager-6637cd6b.js → SnkFormConfigManager-d680be08.js} +2 -2
- package/dist/cjs/{auth-fetcher-abad589f.js → auth-fetcher-24ba4135.js} +1 -1
- package/dist/cjs/{form-config-fetcher-db332748.js → form-config-fetcher-e0a512c3.js} +0 -14
- package/dist/cjs/{index-102ba62d.js → index-ab1cfb44.js} +3 -4
- package/dist/cjs/index-f9e81701.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{ISave-62fbb1dd.js → pesquisa-fetcher-30cab386.js} +0 -8
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -4
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_7.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +4 -63
- package/dist/cjs/snk-application.cjs.entry.js +5 -48
- package/dist/cjs/snk-attach.cjs.entry.js +49 -19
- package/dist/cjs/snk-config-options_3.cjs.entry.js +3 -3
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -8
- package/dist/cjs/snk-crud.cjs.entry.js +8 -7
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -10
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -2
- package/dist/cjs/snk-grid.cjs.entry.js +10 -8
- package/dist/cjs/{snk-guides-viewer-0e4f3b1a.js → snk-guides-viewer-b6002ea7.js} +6 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +16 -9
- package/dist/cjs/snk-simple-crud.cjs.entry.js +11 -10
- package/dist/cjs/snk-taskbar.cjs.entry.js +6 -3
- package/dist/cjs/{taskbar-elements-7e19882d.js → taskbar-elements-ebddaef4.js} +1 -1
- package/dist/collection/collection-manifest.json +0 -2
- package/dist/collection/components/snk-application/snk-application.js +0 -41
- package/dist/collection/components/snk-attach/snk-attach.js +27 -1
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +17 -13
- package/dist/collection/components/snk-configurator/snk-configurator.js +1 -26
- package/dist/collection/components/snk-crud/snk-crud.js +10 -10
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css +1 -10
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +1 -25
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -0
- package/dist/collection/components/snk-grid/snk-grid.css +1 -0
- package/dist/collection/components/snk-grid/snk-grid.js +20 -1
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +1 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +9 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +21 -21
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +4 -1
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +8 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +0 -14
- package/dist/components/ContinuousInsertUtils.js +8 -2
- package/dist/components/form-config-fetcher.js +0 -14
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +0 -2
- package/dist/components/index2.js +3 -4
- package/dist/components/pesquisa-grid2.js +1 -1
- package/dist/components/snk-application2.js +0 -45
- package/dist/components/snk-attach2.js +65 -48
- package/dist/components/snk-configurator2.js +2 -22
- package/dist/components/snk-crud.js +64 -76
- package/dist/components/snk-detail-view2.js +86 -110
- package/dist/components/snk-filter-bar2.js +1 -1
- package/dist/components/snk-grid2.js +4 -2
- package/dist/components/snk-pesquisa2.js +9 -2
- package/dist/components/snk-simple-crud2.js +22 -34
- package/dist/components/snk-taskbar2.js +4 -1
- package/dist/esm/{ClientSideExporterProvider-8191676b.js → ClientSideExporterProvider-bd24a4b3.js} +11 -4
- package/dist/esm/{ConfigStorage-9bd805d6.js → ConfigStorage-e5c1f4c0.js} +1 -1
- package/dist/esm/ISave-d8c8bc59.js +9 -0
- package/dist/esm/{SnkFormConfigManager-fbc6a9a8.js → SnkFormConfigManager-1efd102b.js} +2 -2
- package/dist/esm/{auth-fetcher-07d33333.js → auth-fetcher-9987c66e.js} +1 -1
- package/dist/esm/{form-config-fetcher-ac17cff4.js → form-config-fetcher-34becd23.js} +0 -14
- package/dist/esm/index-a7d3d3f1.js +2 -2
- package/dist/esm/{index-bdf75557.js → index-c57e49af.js} +3 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{ISave-7d546dce.js → pesquisa-fetcher-e26c3295.js} +1 -9
- package/dist/esm/pesquisa-grid_2.entry.js +4 -3
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_7.entry.js → snk-actions-button_5.entry.js} +6 -63
- package/dist/esm/snk-application.entry.js +4 -47
- package/dist/esm/snk-attach.entry.js +49 -19
- package/dist/esm/snk-config-options_3.entry.js +3 -3
- package/dist/esm/snk-configurator.entry.js +1 -8
- package/dist/esm/snk-crud.entry.js +8 -7
- package/dist/esm/snk-data-exporter.entry.js +3 -2
- package/dist/esm/snk-detail-view.entry.js +10 -10
- package/dist/esm/snk-expression-group_2.entry.js +1 -1
- package/dist/esm/snk-filter-bar_4.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +2 -2
- package/dist/esm/snk-grid.entry.js +10 -8
- package/dist/esm/{snk-guides-viewer-80a8709c.js → snk-guides-viewer-39fae8d5.js} +6 -5
- package/dist/esm/snk-guides-viewer.entry.js +8 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +10 -3
- package/dist/esm/snk-simple-crud.entry.js +11 -10
- package/dist/esm/snk-taskbar.entry.js +6 -3
- package/dist/esm/{taskbar-elements-d2353c64.js → taskbar-elements-ed51e143.js} +1 -1
- package/dist/sankhyablocks/p-11afea24.entry.js +1 -0
- package/dist/sankhyablocks/p-18389343.entry.js +1 -0
- package/dist/sankhyablocks/p-21749402.js +1 -0
- package/dist/sankhyablocks/p-22ddc147.js +26 -0
- package/dist/sankhyablocks/p-240ac47f.entry.js +1 -0
- package/dist/sankhyablocks/{p-cb9d725a.js → p-3ce68be5.js} +1 -1
- package/dist/sankhyablocks/{p-13f17dab.js → p-3fcb90d6.js} +1 -1
- package/dist/sankhyablocks/p-43769aa9.js +1 -0
- package/dist/sankhyablocks/p-4b01cbad.entry.js +11 -0
- package/dist/sankhyablocks/p-4c9adf1c.entry.js +1 -0
- package/dist/sankhyablocks/{p-3fc82614.js → p-517efc93.js} +1 -1
- package/dist/sankhyablocks/p-5e9fbd76.js +1 -0
- package/dist/sankhyablocks/p-6b898a51.entry.js +1 -0
- package/dist/sankhyablocks/p-77168ab4.entry.js +1 -0
- package/dist/sankhyablocks/p-91708c3d.entry.js +1 -0
- package/dist/sankhyablocks/p-9523fc40.entry.js +1 -0
- package/dist/sankhyablocks/p-9887a437.entry.js +1 -0
- package/dist/sankhyablocks/p-9ebc3f3b.entry.js +1 -0
- package/dist/sankhyablocks/p-a5bdcb3f.entry.js +1 -0
- package/dist/sankhyablocks/{p-0bcd4757.entry.js → p-a61bbe18.entry.js} +1 -1
- package/dist/sankhyablocks/{p-48729c8c.js → p-a77bdadc.js} +1 -1
- package/dist/sankhyablocks/{p-9d3a025a.entry.js → p-bfdf92e9.entry.js} +1 -1
- package/dist/sankhyablocks/p-cb1e77e0.entry.js +1 -0
- package/dist/sankhyablocks/{p-340e2447.entry.js → p-d3b9b377.entry.js} +1 -1
- package/dist/sankhyablocks/p-e289826a.js +1 -0
- package/dist/sankhyablocks/p-e51c52cf.entry.js +1 -0
- package/dist/sankhyablocks/{p-f467153c.entry.js → p-e66bcb5c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-108fee57.js → p-ef076eea.js} +2 -2
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -10
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +0 -6
- package/dist/types/components/snk-crud/snk-crud.d.ts +2 -2
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +0 -5
- package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +1 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -4
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -0
- package/dist/types/components.d.ts +25 -77
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +0 -6
- package/package.json +1 -1
- package/react/components.d.ts +0 -2
- package/react/components.js +0 -2
- package/react/components.js.map +1 -1
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.css +0 -3
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +0 -73
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.css +0 -78
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +0 -57
- package/dist/collection/lib/configs/LayoutFormConfig.js +0 -25
- package/dist/components/snk-layout-form-config.d.ts +0 -11
- package/dist/components/snk-layout-form-config.js +0 -6
- package/dist/components/snk-layout-form-config2.js +0 -73
- package/dist/components/snk-view-representation.d.ts +0 -11
- package/dist/components/snk-view-representation.js +0 -6
- package/dist/components/snk-view-representation2.js +0 -41
- package/dist/sankhyablocks/p-01512409.js +0 -26
- package/dist/sankhyablocks/p-02c6dc9f.entry.js +0 -1
- package/dist/sankhyablocks/p-35fcf37e.js +0 -1
- package/dist/sankhyablocks/p-3a36d4b3.entry.js +0 -1
- package/dist/sankhyablocks/p-513af002.entry.js +0 -1
- package/dist/sankhyablocks/p-5fea0816.entry.js +0 -1
- package/dist/sankhyablocks/p-6dc031de.js +0 -1
- package/dist/sankhyablocks/p-950e3cbe.entry.js +0 -1
- package/dist/sankhyablocks/p-9907cf67.entry.js +0 -1
- package/dist/sankhyablocks/p-a962a3e4.entry.js +0 -1
- package/dist/sankhyablocks/p-af58c9d7.entry.js +0 -1
- package/dist/sankhyablocks/p-c5acb7ba.entry.js +0 -11
- package/dist/sankhyablocks/p-c7c6eab7.entry.js +0 -1
- package/dist/sankhyablocks/p-d1f04e2c.js +0 -1
- package/dist/sankhyablocks/p-d2065bb4.entry.js +0 -1
- package/dist/sankhyablocks/p-dc617b0c.entry.js +0 -1
- package/dist/sankhyablocks/p-e5d8891d.entry.js +0 -1
- package/dist/sankhyablocks/p-f861bfcb.entry.js +0 -1
- package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +0 -15
- package/dist/types/components/snk-layout-form-config/snk-view-representation/snk-view-representation.d.ts +0 -10
- package/dist/types/lib/configs/LayoutFormConfig.d.ts +0 -11
package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js
CHANGED
@@ -28,7 +28,6 @@ export class SnkDetailView {
|
|
28
28
|
this.taskbarCustomContainerId = undefined;
|
29
29
|
this.customEditors = undefined;
|
30
30
|
this.customRenders = undefined;
|
31
|
-
this.presentationMode = PresentationMode.SECONDARY;
|
32
31
|
}
|
33
32
|
observeDataUnit(newDataUnit, oldDataUnit) {
|
34
33
|
newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
@@ -248,7 +247,7 @@ export class SnkDetailView {
|
|
248
247
|
render() {
|
249
248
|
this.updateLabel();
|
250
249
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
251
|
-
return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode:
|
250
|
+
return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS", outlineMode: false }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
252
251
|
}
|
253
252
|
static get is() { return "snk-detail-view"; }
|
254
253
|
static get encapsulation() { return "scoped"; }
|
@@ -546,29 +545,6 @@ export class SnkDetailView {
|
|
546
545
|
"tags": [],
|
547
546
|
"text": "Render customizados da grade."
|
548
547
|
}
|
549
|
-
},
|
550
|
-
"presentationMode": {
|
551
|
-
"type": "string",
|
552
|
-
"mutable": false,
|
553
|
-
"complexType": {
|
554
|
-
"original": "PresentationMode",
|
555
|
-
"resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY | PresentationMode.SINGLE_TASKBAR",
|
556
|
-
"references": {
|
557
|
-
"PresentationMode": {
|
558
|
-
"location": "import",
|
559
|
-
"path": "../../../../lib"
|
560
|
-
}
|
561
|
-
}
|
562
|
-
},
|
563
|
-
"required": false,
|
564
|
-
"optional": false,
|
565
|
-
"docs": {
|
566
|
-
"tags": [],
|
567
|
-
"text": "Altera o modo de apresenta\u00E7\u00E3o dos bot\u00F5es do snk-taskbar."
|
568
|
-
},
|
569
|
-
"attribute": "presentation-mode",
|
570
|
-
"reflect": false,
|
571
|
-
"defaultValue": "PresentationMode.SECONDARY"
|
572
548
|
}
|
573
549
|
};
|
574
550
|
}
|
@@ -284,7 +284,7 @@ export class SnkGuidesViewer {
|
|
284
284
|
else {
|
285
285
|
detailBranch = this.selectedGuide;
|
286
286
|
}
|
287
|
-
content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders
|
287
|
+
content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders }));
|
288
288
|
}
|
289
289
|
else {
|
290
290
|
const cardId = this.selectedGuide.id;
|
@@ -78,6 +78,7 @@ export class SnkGrid {
|
|
78
78
|
this.enableGridInsert = false;
|
79
79
|
this.outlineMode = false;
|
80
80
|
this.strategyExporter = ExporterStrategy.SERVER_SIDE;
|
81
|
+
this.paginationCounterMode = 'auto';
|
81
82
|
}
|
82
83
|
reloadConfig() {
|
83
84
|
this.loadConfig();
|
@@ -485,7 +486,7 @@ export class SnkGrid {
|
|
485
486
|
return undefined;
|
486
487
|
}
|
487
488
|
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 &&
|
488
|
-
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 snk-grid-container__footer" }, 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 }))));
|
489
|
+
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, paginationCounterMode: this.paginationCounterMode }, 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 snk-grid-container__footer" }, 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 }))));
|
489
490
|
}
|
490
491
|
static get is() { return "snk-grid"; }
|
491
492
|
static get encapsulation() { return "scoped"; }
|
@@ -1026,6 +1027,24 @@ export class SnkGrid {
|
|
1026
1027
|
"attribute": "strategy-exporter",
|
1027
1028
|
"reflect": false,
|
1028
1029
|
"defaultValue": "ExporterStrategy.SERVER_SIDE"
|
1030
|
+
},
|
1031
|
+
"paginationCounterMode": {
|
1032
|
+
"type": "string",
|
1033
|
+
"mutable": false,
|
1034
|
+
"complexType": {
|
1035
|
+
"original": "'show' | 'hidden' | 'auto'",
|
1036
|
+
"resolved": "\"auto\" | \"hidden\" | \"show\"",
|
1037
|
+
"references": {}
|
1038
|
+
},
|
1039
|
+
"required": false,
|
1040
|
+
"optional": true,
|
1041
|
+
"docs": {
|
1042
|
+
"tags": [],
|
1043
|
+
"text": "Define se a grid ser\u00E1 focada ao ser carregada."
|
1044
|
+
},
|
1045
|
+
"attribute": "pagination-counter-mode",
|
1046
|
+
"reflect": false,
|
1047
|
+
"defaultValue": "'auto'"
|
1029
1048
|
}
|
1030
1049
|
};
|
1031
1050
|
}
|
@@ -32,7 +32,7 @@ export class PesquisaGrid {
|
|
32
32
|
}
|
33
33
|
initializeDataUnit() {
|
34
34
|
var _a;
|
35
|
-
if (!this.metadata)
|
35
|
+
if (!this.metadata || this._dataunit)
|
36
36
|
return;
|
37
37
|
this._inMemoryLoader = new InMemoryLoader(this.metadata, (_a = this.dataSource) !== null && _a !== void 0 ? _a : []);
|
38
38
|
this._dataunit = this._inMemoryLoader.dataUnit;
|
@@ -19,6 +19,7 @@ export class SnkPesquisa {
|
|
19
19
|
this._startLoading = false;
|
20
20
|
this._presentationMode = "list";
|
21
21
|
this._currentView = undefined;
|
22
|
+
this._valideDataSource = false;
|
22
23
|
this.searchLoader = undefined;
|
23
24
|
this.treeLoader = undefined;
|
24
25
|
this.selectItem = undefined;
|
@@ -289,10 +290,13 @@ export class SnkPesquisa {
|
|
289
290
|
if (this.argument && (!isNaN(argumentNumber) || this.argument.length >= this._limitCharsToSearch)) {
|
290
291
|
this._changeDeboucingTimeout = setTimeout(() => {
|
291
292
|
this.doSearch(isNaN(argumentNumber) ? this.argument : argumentNumber.toString());
|
293
|
+
this._valideDataSource = true;
|
292
294
|
}, this._deboucingTime);
|
293
295
|
}
|
294
296
|
else {
|
295
297
|
this._itemList = undefined;
|
298
|
+
this._gridDataSource = [];
|
299
|
+
this._valideDataSource = false;
|
296
300
|
}
|
297
301
|
}
|
298
302
|
clearDeboucingTimeout() {
|
@@ -303,6 +307,7 @@ export class SnkPesquisa {
|
|
303
307
|
}
|
304
308
|
onClickSearch() {
|
305
309
|
this.doSearch((this.argument || "").trim());
|
310
|
+
this._valideDataSource = true;
|
306
311
|
}
|
307
312
|
getMessageView() {
|
308
313
|
return this._startLoading
|
@@ -370,7 +375,8 @@ export class SnkPesquisa {
|
|
370
375
|
var _a, _b;
|
371
376
|
return (h(Host, null, h("div", { class: "snk-pesquisa" }, h("div", { class: "snk-pesquisa__input" }, h("ez-text-input", { label: "Buscar", class: "ez-margin-right--medium", canShowError: false, ref: (ref) => this._textInput = ref, onEzChange: (event) => this.onChangeValue(event), value: this.argument, "data-element-id": "searchInput" }, h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
|
372
377
|
? h("button", { slot: "rightIcon", class: "snk-pesquisa__btn", onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
373
|
-
: undefined), h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() }), h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this.getButtonModeInfo().iconName, title: this.getButtonModeInfo().title, onClick: async () => await this.handleChangeViewMode() })), h("div", { class: `snk-pesquisa__records-label ${this._currentView === PESQUISA_VIEW_MODE.TREE ? 'hidden' : ''}` }, h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, "Essa pesquisa foi limitada, existem mais resultados.")), h("div", { class: "snk-pesquisa__content" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null,
|
378
|
+
: undefined), h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() }), h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this.getButtonModeInfo().iconName, title: this.getButtonModeInfo().title, onClick: async () => await this.handleChangeViewMode() })), h("div", { class: `snk-pesquisa__records-label ${this._currentView === PESQUISA_VIEW_MODE.TREE ? 'hidden' : ''}` }, h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, "Essa pesquisa foi limitada, existem mais resultados.")), h("div", { class: "snk-pesquisa__content" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, this._valideDataSource &&
|
379
|
+
h("pesquisa-grid", { metadata: this._gridMetadata, dataSource: this._gridDataSource, pkField: this._pkField, descriptionField: this._descriptionField, entityName: this.entityName, shouldLoadConfig: this._currentView === PESQUISA_VIEW_MODE.GRID, onPesquisaGridSelectItem: ({ detail }) => this.selectItem(detail) })), h("stack-item", null, h("div", { class: 'snk-pesquisa__cards-container' }, (_b = this._itemList) === null || _b === void 0 ? void 0 : _b.map((item) => {
|
374
380
|
return (h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
|
375
381
|
}))), h("stack-item", null, h("pesquisa-tree", { ref: (element) => this._pesquisaTree = element, argument: this.argument, treeLoader: this.treeLoader, allowsNonAnalytic: this.allowsNonAnalytic, shouldLoadTree: this._currentView === PESQUISA_VIEW_MODE.TREE, onPesquisaTreeSelectItem: ({ detail }) => this.selectItem(detail) })))))));
|
376
382
|
}
|
@@ -523,7 +529,8 @@ export class SnkPesquisa {
|
|
523
529
|
"_itemList": {},
|
524
530
|
"_startLoading": {},
|
525
531
|
"_presentationMode": {},
|
526
|
-
"_currentView": {}
|
532
|
+
"_currentView": {},
|
533
|
+
"_valideDataSource": {}
|
527
534
|
};
|
528
535
|
}
|
529
536
|
static get elementRef() { return "_element"; }
|
@@ -50,6 +50,7 @@ export class SnkSimpleCrud {
|
|
50
50
|
this.pageSize = 150;
|
51
51
|
this.resourceID = undefined;
|
52
52
|
this.enableGridInsert = false;
|
53
|
+
this.paginationCounterMode = 'auto';
|
53
54
|
this.taskbarManager = undefined;
|
54
55
|
this.messagesBuilder = undefined;
|
55
56
|
this.useEnterLikeTab = false;
|
@@ -61,7 +62,6 @@ export class SnkSimpleCrud {
|
|
61
62
|
this.ignoreReadOnlyFormFields = false;
|
62
63
|
this.autoFocus = true;
|
63
64
|
this.domainMessagesBuilder = undefined;
|
64
|
-
this.layoutFormConfig = false;
|
65
65
|
this.autoLoad = undefined;
|
66
66
|
this.outlineMode = false;
|
67
67
|
}
|
@@ -752,9 +752,9 @@ export class SnkSimpleCrud {
|
|
752
752
|
if (this.dataUnit == undefined) {
|
753
753
|
return;
|
754
754
|
}
|
755
|
-
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),
|
755
|
+
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` }, 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", 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)
|
756
756
|
? undefined
|
757
|
-
: 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
|
757
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, paginationCounterMode: this.paginationCounterMode }, 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 })), 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() }))));
|
758
758
|
}
|
759
759
|
static get is() { return "snk-simple-crud"; }
|
760
760
|
static get encapsulation() { return "scoped"; }
|
@@ -1032,6 +1032,24 @@ export class SnkSimpleCrud {
|
|
1032
1032
|
"reflect": false,
|
1033
1033
|
"defaultValue": "false"
|
1034
1034
|
},
|
1035
|
+
"paginationCounterMode": {
|
1036
|
+
"type": "string",
|
1037
|
+
"mutable": false,
|
1038
|
+
"complexType": {
|
1039
|
+
"original": "'show' | 'hidden' | 'auto'",
|
1040
|
+
"resolved": "\"auto\" | \"hidden\" | \"show\"",
|
1041
|
+
"references": {}
|
1042
|
+
},
|
1043
|
+
"required": false,
|
1044
|
+
"optional": true,
|
1045
|
+
"docs": {
|
1046
|
+
"tags": [],
|
1047
|
+
"text": "Define se a grid ser\u00E1 focada ao ser carregada."
|
1048
|
+
},
|
1049
|
+
"attribute": "pagination-counter-mode",
|
1050
|
+
"reflect": false,
|
1051
|
+
"defaultValue": "'auto'"
|
1052
|
+
},
|
1035
1053
|
"taskbarManager": {
|
1036
1054
|
"type": "unknown",
|
1037
1055
|
"mutable": false,
|
@@ -1234,24 +1252,6 @@ export class SnkSimpleCrud {
|
|
1234
1252
|
"attribute": "domain-messages-builder",
|
1235
1253
|
"reflect": false
|
1236
1254
|
},
|
1237
|
-
"layoutFormConfig": {
|
1238
|
-
"type": "boolean",
|
1239
|
-
"mutable": false,
|
1240
|
-
"complexType": {
|
1241
|
-
"original": "boolean",
|
1242
|
-
"resolved": "boolean",
|
1243
|
-
"references": {}
|
1244
|
-
},
|
1245
|
-
"required": false,
|
1246
|
-
"optional": false,
|
1247
|
-
"docs": {
|
1248
|
-
"tags": [],
|
1249
|
-
"text": "Define se o LayoutFormConfig ser\u00E1 exibido no configurador."
|
1250
|
-
},
|
1251
|
-
"attribute": "layout-form-config",
|
1252
|
-
"reflect": false,
|
1253
|
-
"defaultValue": "false"
|
1254
|
-
},
|
1255
1255
|
"autoLoad": {
|
1256
1256
|
"type": "boolean",
|
1257
1257
|
"mutable": false,
|
@@ -10,6 +10,7 @@ export class SnkTaskbar {
|
|
10
10
|
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
11
11
|
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
12
12
|
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
13
|
+
this.TASKBAR_CUSTOM_ELEMENTS = 'taskbar-custom-elements-container';
|
13
14
|
this._titleKeyByElement = {
|
14
15
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
15
16
|
[TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
|
@@ -413,6 +414,7 @@ export class SnkTaskbar {
|
|
413
414
|
this._slotContainer.appendChild(customElement);
|
414
415
|
}
|
415
416
|
render() {
|
417
|
+
var _a;
|
416
418
|
if (this._definitions === undefined) {
|
417
419
|
return undefined;
|
418
420
|
}
|
@@ -431,7 +433,8 @@ export class SnkTaskbar {
|
|
431
433
|
}
|
432
434
|
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
433
435
|
return h("slot", { name: elem });
|
434
|
-
})), h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }))
|
436
|
+
})), h("div", { id: this.TASKBAR_CUSTOM_ELEMENTS, class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }), (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 :
|
437
|
+
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS))));
|
435
438
|
}
|
436
439
|
getHostClasses() {
|
437
440
|
if (this.overflowStrategy !== 'hiddenItems')
|
@@ -24,9 +24,15 @@ export default class RmPrecisionCustomValueFormatter {
|
|
24
24
|
if (rmPrecision || rmPrecision === 0) {
|
25
25
|
return NumberUtils.format(currentValue, rmPrecision, rmPrecision);
|
26
26
|
}
|
27
|
-
|
28
|
-
|
27
|
+
const columnProps = column === null || column === void 0 ? void 0 : column.props;
|
28
|
+
if (columnProps) {
|
29
|
+
const precision = column === null || column === void 0 ? void 0 : column.props.get('precision');
|
30
|
+
const prettyPrecision = column === null || column === void 0 ? void 0 : column.props.get('prettyPrecision');
|
31
|
+
if (precision !== undefined && prettyPrecision !== undefined) {
|
32
|
+
return NumberUtils.format(currentValue, precision, prettyPrecision);
|
33
|
+
}
|
29
34
|
}
|
35
|
+
return currentValue;
|
30
36
|
}
|
31
37
|
refreshSelectedRows() {
|
32
38
|
var _a;
|
@@ -220,20 +220,6 @@ export class FormConfigFetcher extends ResourceFetcher {
|
|
220
220
|
const rawFields = (_c = (_b = (_a = config === null || config === void 0 ? void 0 : config.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
|
221
221
|
return { emptyConfig: false, fields: Array.isArray(rawFields) ? rawFields : [rawFields] };
|
222
222
|
}
|
223
|
-
async fetchLayoutFormConfig(configName) {
|
224
|
-
const payload = { 'requestBody': { 'config': { 'chave': configName, 'tipo': 'T' } } };
|
225
|
-
const response = await DataFetcher.get().callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
|
226
|
-
if (ObjectUtils.isEmpty(response))
|
227
|
-
return undefined;
|
228
|
-
return response.config;
|
229
|
-
}
|
230
|
-
async saveLayoutFormConfig(configName, config) {
|
231
|
-
const payload = { 'requestBody': { 'config': Object.assign(Object.assign({}, config), { 'chave': configName, 'tipo': 'T' }) } };
|
232
|
-
const response = await DataFetcher.get().callServiceBroker('SystemUtilsSP.saveConf', JSON.stringify(payload));
|
233
|
-
if (ObjectUtils.isEmpty(response))
|
234
|
-
return undefined;
|
235
|
-
return response;
|
236
|
-
}
|
237
223
|
}
|
238
224
|
export var UserConfigType;
|
239
225
|
(function (UserConfigType) {
|
@@ -248,9 +248,15 @@ class RmPrecisionCustomValueFormatter {
|
|
248
248
|
if (rmPrecision || rmPrecision === 0) {
|
249
249
|
return NumberUtils.format(currentValue, rmPrecision, rmPrecision);
|
250
250
|
}
|
251
|
-
|
252
|
-
|
251
|
+
const columnProps = column === null || column === void 0 ? void 0 : column.props;
|
252
|
+
if (columnProps) {
|
253
|
+
const precision = column === null || column === void 0 ? void 0 : column.props.get('precision');
|
254
|
+
const prettyPrecision = column === null || column === void 0 ? void 0 : column.props.get('prettyPrecision');
|
255
|
+
if (precision !== undefined && prettyPrecision !== undefined) {
|
256
|
+
return NumberUtils.format(currentValue, precision, prettyPrecision);
|
257
|
+
}
|
253
258
|
}
|
259
|
+
return currentValue;
|
254
260
|
}
|
255
261
|
refreshSelectedRows() {
|
256
262
|
var _a;
|
@@ -282,20 +282,6 @@ class FormConfigFetcher extends ResourceFetcher {
|
|
282
282
|
const rawFields = (_c = (_b = (_a = config === null || config === void 0 ? void 0 : config.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
|
283
283
|
return { emptyConfig: false, fields: Array.isArray(rawFields) ? rawFields : [rawFields] };
|
284
284
|
}
|
285
|
-
async fetchLayoutFormConfig(configName) {
|
286
|
-
const payload = { 'requestBody': { 'config': { 'chave': configName, 'tipo': 'T' } } };
|
287
|
-
const response = await DataFetcher.get().callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
|
288
|
-
if (ObjectUtils.isEmpty(response))
|
289
|
-
return undefined;
|
290
|
-
return response.config;
|
291
|
-
}
|
292
|
-
async saveLayoutFormConfig(configName, config) {
|
293
|
-
const payload = { 'requestBody': { 'config': Object.assign(Object.assign({}, config), { 'chave': configName, 'tipo': 'T' }) } };
|
294
|
-
const response = await DataFetcher.get().callServiceBroker('SystemUtilsSP.saveConf', JSON.stringify(payload));
|
295
|
-
if (ObjectUtils.isEmpty(response))
|
296
|
-
return undefined;
|
297
|
-
return response;
|
298
|
-
}
|
299
285
|
}
|
300
286
|
var UserConfigType;
|
301
287
|
(function (UserConfigType) {
|
@@ -42,7 +42,6 @@ export { SnkFormView as SnkFormView } from '../types/components/snk-crud/subcomp
|
|
42
42
|
export { SnkGrid as SnkGrid } from '../types/components/snk-grid/snk-grid';
|
43
43
|
export { SnkGridConfig as SnkGridConfig } from '../types/components/snk-grid-config/snk-grid-config';
|
44
44
|
export { SnkGuidesViewer as SnkGuidesViewer } from '../types/components/snk-crud/subcomponents/snk-guides-viewer';
|
45
|
-
export { SnkLayoutFormConfig as SnkLayoutFormConfig } from '../types/components/snk-layout-form-config/snk-layout-form-config';
|
46
45
|
export { SnkPersonalizedFilter as SnkPersonalizedFilter } from '../types/components/snk-personalized-filter/snk-personalized-filter';
|
47
46
|
export { SnkFilterPersonalized as SnkPersonalizedFilterEditor } from '../types/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor';
|
48
47
|
export { SnkPesquisa as SnkPesquisa } from '../types/components/snk-pesquisa/snk-pesquisa';
|
@@ -53,7 +52,6 @@ export { SnkSimpleCrud as SnkSimpleCrud } from '../types/components/snk-simple-c
|
|
53
52
|
export { SnkSimpleFormConfig as SnkSimpleFormConfig } from '../types/components/snk-simple-form-config/snk-simple-form-config';
|
54
53
|
export { SnkTabConfig as SnkTabConfig } from '../types/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config';
|
55
54
|
export { SnkTaskbar as SnkTaskbar } from '../types/components/snk-taskbar/snk-taskbar';
|
56
|
-
export { SnkViewRepresentation as SnkViewRepresentation } from '../types/components/snk-layout-form-config/snk-view-representation/snk-view-representation';
|
57
55
|
export { TaskbarActionsButton as TaskbarActionsButton } from '../types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button';
|
58
56
|
export { TestePesquisa as TestePesquisa } from '../types/components/teste-pesquisa/teste-pesquisa';
|
59
57
|
|
package/dist/components/index.js
CHANGED
@@ -42,7 +42,6 @@ export { SnkFormView, defineCustomElement as defineCustomElementSnkFormView } fr
|
|
42
42
|
export { SnkGrid, defineCustomElement as defineCustomElementSnkGrid } from './snk-grid.js';
|
43
43
|
export { SnkGridConfig, defineCustomElement as defineCustomElementSnkGridConfig } from './snk-grid-config.js';
|
44
44
|
export { SnkGuidesViewer, defineCustomElement as defineCustomElementSnkGuidesViewer } from './snk-guides-viewer.js';
|
45
|
-
export { SnkLayoutFormConfig, defineCustomElement as defineCustomElementSnkLayoutFormConfig } from './snk-layout-form-config.js';
|
46
45
|
export { SnkPersonalizedFilter, defineCustomElement as defineCustomElementSnkPersonalizedFilter } from './snk-personalized-filter.js';
|
47
46
|
export { SnkPersonalizedFilterEditor, defineCustomElement as defineCustomElementSnkPersonalizedFilterEditor } from './snk-personalized-filter-editor.js';
|
48
47
|
export { SnkPesquisa, defineCustomElement as defineCustomElementSnkPesquisa } from './snk-pesquisa.js';
|
@@ -53,6 +52,5 @@ export { SnkSimpleCrud, defineCustomElement as defineCustomElementSnkSimpleCrud
|
|
53
52
|
export { SnkSimpleFormConfig, defineCustomElement as defineCustomElementSnkSimpleFormConfig } from './snk-simple-form-config.js';
|
54
53
|
export { SnkTabConfig, defineCustomElement as defineCustomElementSnkTabConfig } from './snk-tab-config.js';
|
55
54
|
export { SnkTaskbar, defineCustomElement as defineCustomElementSnkTaskbar } from './snk-taskbar.js';
|
56
|
-
export { SnkViewRepresentation, defineCustomElement as defineCustomElementSnkViewRepresentation } from './snk-view-representation.js';
|
57
55
|
export { TaskbarActionsButton, defineCustomElement as defineCustomElementTaskbarActionsButton } from './taskbar-actions-button.js';
|
58
56
|
export { TestePesquisa, defineCustomElement as defineCustomElementTestePesquisa } from './teste-pesquisa.js';
|
@@ -36,7 +36,7 @@ const cleanupElements = debounce((map) => {
|
|
36
36
|
for (let key of map.keys()) {
|
37
37
|
map.set(key, map.get(key).filter(isConnected));
|
38
38
|
}
|
39
|
-
},
|
39
|
+
}, 2_000);
|
40
40
|
const stencilSubscription = () => {
|
41
41
|
if (typeof getRenderingRef !== 'function') {
|
42
42
|
// If we are not in a stencil project, we do nothing.
|
@@ -69,7 +69,7 @@ const stencilSubscription = () => {
|
|
69
69
|
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
70
70
|
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
71
71
|
const unwrappedState = unwrap(defaultState);
|
72
|
-
let states = new Map(Object.entries(unwrappedState
|
72
|
+
let states = new Map(Object.entries(unwrappedState ?? {}));
|
73
73
|
const handlers = {
|
74
74
|
dispose: [],
|
75
75
|
get: [],
|
@@ -77,10 +77,9 @@ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) =>
|
|
77
77
|
reset: [],
|
78
78
|
};
|
79
79
|
const reset = () => {
|
80
|
-
var _a;
|
81
80
|
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
82
81
|
// otherwise, the state won't be properly reset
|
83
|
-
states = new Map(Object.entries(
|
82
|
+
states = new Map(Object.entries(unwrap(defaultState) ?? {}));
|
84
83
|
handlers.reset.forEach((cb) => cb());
|
85
84
|
};
|
86
85
|
const dispose = () => {
|
@@ -45,7 +45,7 @@ const PesquisaGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
45
45
|
}
|
46
46
|
initializeDataUnit() {
|
47
47
|
var _a;
|
48
|
-
if (!this.metadata)
|
48
|
+
if (!this.metadata || this._dataunit)
|
49
49
|
return;
|
50
50
|
this._inMemoryLoader = new InMemoryLoader(this.metadata, (_a = this.dataSource) !== null && _a !== void 0 ? _a : []);
|
51
51
|
this._dataunit = this._inMemoryLoader.dataUnit;
|
@@ -8,8 +8,6 @@ import { P as PreloadManager, D as DataUnitFetcher } from './dataunit-fetcher.js
|
|
8
8
|
import { a as PesquisaFetcher } from './ISave.js';
|
9
9
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder.js';
|
10
10
|
import { T as TEMPLATES_SKELETON } from './constants.js';
|
11
|
-
import './filter-item-type.enum.js';
|
12
|
-
import { F as FormConfigFetcher } from './form-config-fetcher.js';
|
13
11
|
import { d as defineCustomElement$3 } from './pesquisa-grid2.js';
|
14
12
|
import { d as defineCustomElement$2 } from './pesquisa-tree2.js';
|
15
13
|
import { d as defineCustomElement$1 } from './snk-pesquisa2.js';
|
@@ -379,32 +377,6 @@ class RequestListenerFactory {
|
|
379
377
|
}
|
380
378
|
}
|
381
379
|
|
382
|
-
class LayoutFormConfig {
|
383
|
-
constructor() {
|
384
|
-
this._config = null;
|
385
|
-
this.listeners = [];
|
386
|
-
}
|
387
|
-
static getInstance() {
|
388
|
-
if (!LayoutFormConfig.instance) {
|
389
|
-
LayoutFormConfig.instance = new LayoutFormConfig();
|
390
|
-
}
|
391
|
-
return LayoutFormConfig.instance;
|
392
|
-
}
|
393
|
-
get config() {
|
394
|
-
return this._config;
|
395
|
-
}
|
396
|
-
setConfig(newConfig) {
|
397
|
-
this._config = newConfig;
|
398
|
-
this.notifyListeners();
|
399
|
-
}
|
400
|
-
onConfigChange(listener) {
|
401
|
-
this.listeners.push(listener);
|
402
|
-
}
|
403
|
-
notifyListeners() {
|
404
|
-
this.listeners.forEach(listener => listener(this._config));
|
405
|
-
}
|
406
|
-
}
|
407
|
-
|
408
380
|
const snkApplicationCss = ".sc-snk-application-h{--scrim-z-index:var(--elevation--100, 100);display:flex;flex-direction:column;height:100%}.sc-snk-application-h>.loading-hidden.sc-snk-application{display:none;pointer-events:none}.skeleton-content-left.sc-snk-application{width:300px;padding-right:5px}.skeleton-content.sc-snk-application{height:calc(100vh - 310px)}.spinner.sc-snk-application{height:100vh;gap:10px}.spinner.sc-snk-application>.spin.sc-snk-application{animation-name:spin;animation-duration:5000ms;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";
|
409
381
|
|
410
382
|
const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
@@ -425,8 +397,6 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
425
397
|
this._pendingActions = new Map;
|
426
398
|
this._loadPkParameter = null;
|
427
399
|
this._isLoadedByPk = false;
|
428
|
-
this._formConfigFetcher = new FormConfigFetcher();
|
429
|
-
this._LayoutFormConfigSingleton = LayoutFormConfig.getInstance();
|
430
400
|
this._applicationReady = false;
|
431
401
|
this._templateSkeleton = TEMPLATES_SKELETON.GRID;
|
432
402
|
this._activeScrimWindow = false;
|
@@ -501,14 +471,6 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
501
471
|
async getKeyboardManager() {
|
502
472
|
return Promise.resolve(this._keyboardManager);
|
503
473
|
}
|
504
|
-
/**
|
505
|
-
* Obtém o notificador de Layout de formulario.
|
506
|
-
*
|
507
|
-
* @return {LayoutFormConfig} the Configurador de Layout do Formulario
|
508
|
-
*/
|
509
|
-
async getLayoutFormConfig() {
|
510
|
-
return Promise.resolve(this._LayoutFormConfigSingleton);
|
511
|
-
}
|
512
474
|
/**
|
513
475
|
* Obtém `true` caso o usuário logado seja o SUP.
|
514
476
|
*/
|
@@ -1422,12 +1384,6 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1422
1384
|
ConfigStorage.preload(this.applicationResourceID, this.configName, legacyConfig);
|
1423
1385
|
document.addEventListener("click", () => Workspace.applicationClick());
|
1424
1386
|
this._waitingAppReady.forEach(resolve => resolve());
|
1425
|
-
this.setLayoutFormConfig();
|
1426
|
-
}
|
1427
|
-
async setLayoutFormConfig() {
|
1428
|
-
const response = await this._formConfigFetcher.fetchLayoutFormConfig('formColCfg.' + this.applicationResourceID);
|
1429
|
-
const config = isNaN(Number(response === null || response === void 0 ? void 0 : response.config)) ? null : Number(response === null || response === void 0 ? void 0 : response.config);
|
1430
|
-
this._LayoutFormConfigSingleton.setConfig(config);
|
1431
1387
|
}
|
1432
1388
|
connectedCallback() {
|
1433
1389
|
this._isBrowserTypeElectron = UserAgentUtils.isElectron();
|
@@ -1608,7 +1564,6 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1608
1564
|
"_templateSkeleton": [32],
|
1609
1565
|
"_activeScrimWindow": [32],
|
1610
1566
|
"getKeyboardManager": [64],
|
1611
|
-
"getLayoutFormConfig": [64],
|
1612
1567
|
"isUserSup": [64],
|
1613
1568
|
"addPendingAction": [64],
|
1614
1569
|
"callServiceBroker": [64],
|