@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
@@ -1,25 +1,26 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
|
2
2
|
import { Action } from '@sankhyalabs/core';
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-1efd102b.js';
|
4
4
|
import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
5
5
|
import './DataFetcher-ecf5f903.js';
|
6
|
-
import './
|
6
|
+
import './pesquisa-fetcher-e26c3295.js';
|
7
7
|
import { P as PresentationMode } from './index-b40568ff.js';
|
8
|
+
import './ISave-d8c8bc59.js';
|
8
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
11
|
import './dataunit-fetcher-ed6e65ef.js';
|
11
12
|
import './filter-item-type.enum-d45e026f.js';
|
12
|
-
import './form-config-fetcher-
|
13
|
+
import './form-config-fetcher-34becd23.js';
|
13
14
|
import { V as VIEW_MODE } from './constants-75abb876.js';
|
14
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
15
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
15
|
+
import { T as TaskbarElement } from './taskbar-elements-ed51e143.js';
|
16
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-39fae8d5.js';
|
16
17
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
|
17
|
-
import './ConfigStorage-
|
18
|
+
import './ConfigStorage-e5c1f4c0.js';
|
18
19
|
import './PrintUtils-3e4ff0f5.js';
|
19
20
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
20
21
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
21
22
|
import './ResourceIDUtils-a114189a.js';
|
22
|
-
import './index-
|
23
|
+
import './index-c57e49af.js';
|
23
24
|
import './field-search-f8b1d91e.js';
|
24
25
|
import '@sankhyalabs/core/dist/dataunit/DataUnit';
|
25
26
|
|
@@ -66,7 +67,7 @@ class GuideBuilder {
|
|
66
67
|
}
|
67
68
|
}
|
68
69
|
|
69
|
-
const snkDetailViewCss = ".sc-snk-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%}.level-path.sc-snk-detail-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.form-taskbar.sc-snk-detail-view{padding-bottom:var(--space--medium)}.grid-container.sc-snk-detail-view{background-color:#FFF;min-height:100px
|
70
|
+
const snkDetailViewCss = ".sc-snk-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%}.level-path.sc-snk-detail-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.form-taskbar.sc-snk-detail-view{padding-bottom:var(--space--medium)}.grid-container.sc-snk-detail-view{background-color:#FFF;min-height:100px}.detail-header.sc-snk-detail-view{padding-bottom:0}";
|
70
71
|
|
71
72
|
const SnkDetailView = class {
|
72
73
|
constructor(hostRef) {
|
@@ -92,7 +93,6 @@ const SnkDetailView = class {
|
|
92
93
|
this.taskbarCustomContainerId = undefined;
|
93
94
|
this.customEditors = undefined;
|
94
95
|
this.customRenders = undefined;
|
95
|
-
this.presentationMode = PresentationMode.SECONDARY;
|
96
96
|
}
|
97
97
|
observeDataUnit(newDataUnit, oldDataUnit) {
|
98
98
|
newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
@@ -312,7 +312,7 @@ const SnkDetailView = class {
|
|
312
312
|
render() {
|
313
313
|
this.updateLabel();
|
314
314
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
315
|
-
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:
|
315
|
+
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) }))))));
|
316
316
|
}
|
317
317
|
static get watchers() { return {
|
318
318
|
"dataUnit": ["observeDataUnit"],
|
@@ -4,7 +4,7 @@ import { ApplicationUtils, CheckMode } from '@sankhyalabs/ezui/dist/collection/u
|
|
4
4
|
import { ApplicationContext, StringUtils, ElementIDUtils, UserInterface } from '@sankhyalabs/core';
|
5
5
|
import { S as SelectedItemType } from './index-620ac460.js';
|
6
6
|
import { fieldBuilder } from '@sankhyalabs/ezui/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder';
|
7
|
-
import { s as store } from './index-
|
7
|
+
import { s as store } from './index-c57e49af.js';
|
8
8
|
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
9
9
|
|
10
10
|
const snkExpressionGroupCss = ".sc-snk-expression-group-h{display:block;--snk-expression-group--container-condition--width:184px;--snk-expression-group--container-condition--height:38px;--snk-expression-group--container-condition--border-radius:var(--border--radius-medium, 12px);--snk-expression-group--container-option--width:85px;--snk-expression-group__container-condition--background-and:#66B6A0;--snk-expression-group__container-condition--background-or:#EBC65E;--snk-expression-group__container-expression--padding-left:26px;--snk-expression-group__background-color-dashed:var(--background--body, #fafcff)}.snk-expression-group__container-condition.sc-snk-expression-group{width:var(--snk-expression-group--container-condition--width);height:var(--snk-expression-group--container-condition--height);border-radius:var(--snk-expression-group--container-condition--border-radius);z-index:var(--more-visible--2x, 3)}.snk-expression-group__container-option.sc-snk-expression-group{width:var(--snk-expression-group--container-option--width)}.snk-expression-group__container-condition[data-condition=\"AND\"].sc-snk-expression-group{background-color:var(--snk-expression-group__container-condition--background-and)}.snk-expression-group__container-condition[data-condition=\"OR\"].sc-snk-expression-group{background-color:var(--snk-expression-group__container-condition--background-or)}.snk-expression-group__container-expression.sc-snk-expression-group{padding-left:var(--snk-expression-group__container-expression--padding-left)}.dashes.sc-snk-expression-group{z-index:var(--visible, 1);background:var(--snk-expression-group__background-color-dashed);border-left:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:58px;margin-left:-15px;margin-top:-36.5px}.horizontal-dashes.sc-snk-expression-group{z-index:var(--more-visible, 2);border-bottom:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:54px;margin-left:-15px;margin-top:-33.5px}.hidden.sc-snk-expression-group{display:none}";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, LockManager, LockManagerOperation, FloatingManager, DateUtils, MaskFormatter, ArrayUtils } from '@sankhyalabs/core';
|
3
3
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
|
5
5
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
6
6
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
7
7
|
import { F as FilterOperand } from './index-ae591a44.js';
|
@@ -10,7 +10,7 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
10
10
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-e2b38ef7.js';
|
11
11
|
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
12
12
|
import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
|
13
|
-
import './form-config-fetcher-
|
13
|
+
import './form-config-fetcher-34becd23.js';
|
14
14
|
import './DataFetcher-ecf5f903.js';
|
15
15
|
import './PrintUtils-3e4ff0f5.js';
|
16
16
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
@@ -250,7 +250,7 @@ class SnkFilterModalFactory {
|
|
250
250
|
}
|
251
251
|
}
|
252
252
|
|
253
|
-
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:12px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-items:start}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
|
253
|
+
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:12px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small);height:80%}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-items:start}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
|
254
254
|
|
255
255
|
const SnkFilterBar = class {
|
256
256
|
constructor(hostRef) {
|
@@ -2,9 +2,9 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
2
2
|
import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
4
4
|
import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
|
5
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
5
|
+
import { C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
|
6
6
|
import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
|
7
|
-
import './form-config-fetcher-
|
7
|
+
import './form-config-fetcher-34becd23.js';
|
8
8
|
import './DataFetcher-ecf5f903.js';
|
9
9
|
import './PrintUtils-3e4ff0f5.js';
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
@@ -1,19 +1,20 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { Action, ElementIDUtils, ApplicationContext, StringUtils } from '@sankhyalabs/core';
|
3
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
3
|
+
import { T as TaskbarElement } from './taskbar-elements-ed51e143.js';
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
|
5
5
|
import { P as PresentationMode, E as ExporterStrategy } from './index-b40568ff.js';
|
6
6
|
import { T as TaskbarProcessor, o as openFieldSearch, b as buildFieldSearch } from './field-search-f8b1d91e.js';
|
7
|
-
import { s as store } from './index-
|
8
|
-
import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './ClientSideExporterProvider-
|
7
|
+
import { s as store } from './index-c57e49af.js';
|
8
|
+
import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './ClientSideExporterProvider-bd24a4b3.js';
|
9
9
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
10
10
|
import './DataFetcher-ecf5f903.js';
|
11
|
-
import './
|
11
|
+
import './pesquisa-fetcher-e26c3295.js';
|
12
|
+
import './ISave-d8c8bc59.js';
|
12
13
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
13
14
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
14
15
|
import './dataunit-fetcher-ed6e65ef.js';
|
15
16
|
import './filter-item-type.enum-d45e026f.js';
|
16
|
-
import './form-config-fetcher-
|
17
|
+
import './form-config-fetcher-34becd23.js';
|
17
18
|
import './constants-75abb876.js';
|
18
19
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
19
20
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
@@ -77,7 +78,7 @@ class ServerSideExporterProvider extends CommonsExporter {
|
|
77
78
|
}
|
78
79
|
}
|
79
80
|
|
80
|
-
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding)}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
|
81
|
+
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";
|
81
82
|
|
82
83
|
const SnkGrid = class {
|
83
84
|
constructor(hostRef) {
|
@@ -147,6 +148,7 @@ const SnkGrid = class {
|
|
147
148
|
this.enableGridInsert = false;
|
148
149
|
this.outlineMode = false;
|
149
150
|
this.strategyExporter = ExporterStrategy.SERVER_SIDE;
|
151
|
+
this.paginationCounterMode = 'auto';
|
150
152
|
}
|
151
153
|
reloadConfig() {
|
152
154
|
this.loadConfig();
|
@@ -554,7 +556,7 @@ const SnkGrid = class {
|
|
554
556
|
return undefined;
|
555
557
|
}
|
556
558
|
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 &&
|
557
|
-
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 }))));
|
559
|
+
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 }))));
|
558
560
|
}
|
559
561
|
get _element() { return getElement(this); }
|
560
562
|
static get watchers() { return {
|
@@ -1,18 +1,19 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-a7d3d3f1.js';
|
2
2
|
import { Action, ElementIDUtils } from '@sankhyalabs/core';
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-1efd102b.js';
|
4
4
|
import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
5
5
|
import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } from './field-search-f8b1d91e.js';
|
6
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
6
|
+
import { T as TaskbarElement } from './taskbar-elements-ed51e143.js';
|
7
7
|
import { V as VIEW_MODE } from './constants-75abb876.js';
|
8
8
|
import './DataFetcher-ecf5f903.js';
|
9
|
-
import './
|
9
|
+
import './pesquisa-fetcher-e26c3295.js';
|
10
10
|
import { P as PresentationMode } from './index-b40568ff.js';
|
11
|
+
import './ISave-d8c8bc59.js';
|
11
12
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
12
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
13
14
|
import './dataunit-fetcher-ed6e65ef.js';
|
14
15
|
import './filter-item-type.enum-d45e026f.js';
|
15
|
-
import './form-config-fetcher-
|
16
|
+
import './form-config-fetcher-34becd23.js';
|
16
17
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
17
18
|
|
18
19
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-small:var(--space--2xs, 8px);--snk-guides-viewer__header--min-height:68px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-small);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-small));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-small))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
|
@@ -297,7 +298,7 @@ const SnkGuidesViewer = class {
|
|
297
298
|
else {
|
298
299
|
detailBranch = this.selectedGuide;
|
299
300
|
}
|
300
|
-
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
|
301
|
+
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 }));
|
301
302
|
}
|
302
303
|
else {
|
303
304
|
const cardId = this.selectedGuide.id;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
export { S as snk_guides_viewer } from './snk-guides-viewer-
|
1
|
+
export { S as snk_guides_viewer } from './snk-guides-viewer-39fae8d5.js';
|
2
2
|
import './index-a7d3d3f1.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
|
-
import './SnkFormConfigManager-
|
5
|
-
import './ConfigStorage-
|
6
|
-
import './form-config-fetcher-
|
4
|
+
import './SnkFormConfigManager-1efd102b.js';
|
5
|
+
import './ConfigStorage-e5c1f4c0.js';
|
6
|
+
import './form-config-fetcher-34becd23.js';
|
7
7
|
import './DataFetcher-ecf5f903.js';
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
@@ -11,10 +11,11 @@ import './filter-item-type.enum-d45e026f.js';
|
|
11
11
|
import './constants-75abb876.js';
|
12
12
|
import '@sankhyalabs/ezui/dist/collection/utils/form';
|
13
13
|
import './field-search-f8b1d91e.js';
|
14
|
-
import './taskbar-elements-
|
14
|
+
import './taskbar-elements-ed51e143.js';
|
15
15
|
import './index-b40568ff.js';
|
16
|
-
import './index-
|
17
|
-
import './
|
16
|
+
import './index-c57e49af.js';
|
17
|
+
import './pesquisa-fetcher-e26c3295.js';
|
18
|
+
import './ISave-d8c8bc59.js';
|
18
19
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
19
20
|
import './dataunit-fetcher-ed6e65ef.js';
|
20
21
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-a7d3d3f1.js';
|
2
2
|
import { StringUtils, ObjectUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-e2b38ef7.js';
|
4
|
-
import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage-
|
4
|
+
import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
|
5
5
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
6
6
|
import { a as FilterGroupCondition } from './index-ae591a44.js';
|
7
|
-
import { s as store } from './index-
|
7
|
+
import { s as store } from './index-c57e49af.js';
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
9
|
-
import './form-config-fetcher-
|
9
|
+
import './form-config-fetcher-34becd23.js';
|
10
10
|
import './DataFetcher-ecf5f903.js';
|
11
11
|
import './PrintUtils-3e4ff0f5.js';
|
12
12
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { ObjectUtils, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
3
|
-
import { P as PesquisaFetcher, b as buildGridMetadata, a as PESQUISA_VIEW_MODE } from './
|
3
|
+
import { P as PesquisaFetcher, b as buildGridMetadata, a as PESQUISA_VIEW_MODE } from './pesquisa-fetcher-e26c3295.js';
|
4
4
|
import './DataFetcher-ecf5f903.js';
|
5
5
|
import './index-b40568ff.js';
|
6
|
+
import './ISave-d8c8bc59.js';
|
6
7
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
7
8
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
8
9
|
import './dataunit-fetcher-ed6e65ef.js';
|
9
10
|
import './filter-item-type.enum-d45e026f.js';
|
10
|
-
import './form-config-fetcher-
|
11
|
+
import './form-config-fetcher-34becd23.js';
|
11
12
|
import './constants-75abb876.js';
|
12
13
|
import './PrintUtils-3e4ff0f5.js';
|
13
14
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
@@ -34,6 +35,7 @@ const SnkPesquisa = class {
|
|
34
35
|
this._startLoading = false;
|
35
36
|
this._presentationMode = "list";
|
36
37
|
this._currentView = undefined;
|
38
|
+
this._valideDataSource = false;
|
37
39
|
this.searchLoader = undefined;
|
38
40
|
this.treeLoader = undefined;
|
39
41
|
this.selectItem = undefined;
|
@@ -304,10 +306,13 @@ const SnkPesquisa = class {
|
|
304
306
|
if (this.argument && (!isNaN(argumentNumber) || this.argument.length >= this._limitCharsToSearch)) {
|
305
307
|
this._changeDeboucingTimeout = setTimeout(() => {
|
306
308
|
this.doSearch(isNaN(argumentNumber) ? this.argument : argumentNumber.toString());
|
309
|
+
this._valideDataSource = true;
|
307
310
|
}, this._deboucingTime);
|
308
311
|
}
|
309
312
|
else {
|
310
313
|
this._itemList = undefined;
|
314
|
+
this._gridDataSource = [];
|
315
|
+
this._valideDataSource = false;
|
311
316
|
}
|
312
317
|
}
|
313
318
|
clearDeboucingTimeout() {
|
@@ -318,6 +323,7 @@ const SnkPesquisa = class {
|
|
318
323
|
}
|
319
324
|
onClickSearch() {
|
320
325
|
this.doSearch((this.argument || "").trim());
|
326
|
+
this._valideDataSource = true;
|
321
327
|
}
|
322
328
|
getMessageView() {
|
323
329
|
return this._startLoading
|
@@ -385,7 +391,8 @@ const SnkPesquisa = class {
|
|
385
391
|
var _a, _b;
|
386
392
|
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)
|
387
393
|
? h("button", { slot: "rightIcon", class: "snk-pesquisa__btn", onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
388
|
-
: 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,
|
394
|
+
: 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 &&
|
395
|
+
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) => {
|
389
396
|
return (h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
|
390
397
|
}))), 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) })))))));
|
391
398
|
}
|
@@ -2,20 +2,21 @@ import { r as registerInstance, c as createEvent, h, g as getElement } from './i
|
|
2
2
|
import { StringUtils, ApplicationContext, ObjectUtils, DataType, UserInterface, JSUtils, FloatingManager, KeyboardManager, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants-75abb876.js';
|
5
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
5
|
+
import { T as TaskbarElement } from './taskbar-elements-ed51e143.js';
|
6
6
|
import './DataFetcher-ecf5f903.js';
|
7
|
-
import './
|
8
|
-
import { S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, a as CrudUtils, c as ClientSideExporterProvider } from './ClientSideExporterProvider-
|
7
|
+
import './pesquisa-fetcher-e26c3295.js';
|
8
|
+
import { S as SnkMultiSelectionListDataSource, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, a as CrudUtils, c as ClientSideExporterProvider } from './ClientSideExporterProvider-bd24a4b3.js';
|
9
9
|
import { P as PresentationMode } from './index-b40568ff.js';
|
10
|
+
import './ISave-d8c8bc59.js';
|
10
11
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
11
12
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
12
13
|
import { I as InMemoryLoader } from './dataunit-fetcher-ed6e65ef.js';
|
13
14
|
import './filter-item-type.enum-d45e026f.js';
|
14
|
-
import { F as FormConfigFetcher } from './form-config-fetcher-
|
15
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-34becd23.js';
|
15
16
|
import { T as TaskbarProcessor, b as buildFieldSearch, o as openFieldSearch } from './field-search-f8b1d91e.js';
|
16
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
17
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
18
|
-
import { s as store } from './index-
|
17
|
+
import { C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
|
18
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-1efd102b.js';
|
19
|
+
import { s as store } from './index-c57e49af.js';
|
19
20
|
import './PrintUtils-3e4ff0f5.js';
|
20
21
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
21
22
|
import './GetSelectedRecordsIDsInfo-9fa41508.js';
|
@@ -71,6 +72,7 @@ const SnkSimpleCrud = class {
|
|
71
72
|
this.pageSize = 150;
|
72
73
|
this.resourceID = undefined;
|
73
74
|
this.enableGridInsert = false;
|
75
|
+
this.paginationCounterMode = 'auto';
|
74
76
|
this.taskbarManager = undefined;
|
75
77
|
this.messagesBuilder = undefined;
|
76
78
|
this.useEnterLikeTab = false;
|
@@ -82,7 +84,6 @@ const SnkSimpleCrud = class {
|
|
82
84
|
this.ignoreReadOnlyFormFields = false;
|
83
85
|
this.autoFocus = true;
|
84
86
|
this.domainMessagesBuilder = undefined;
|
85
|
-
this.layoutFormConfig = false;
|
86
87
|
this.autoLoad = undefined;
|
87
88
|
this.outlineMode = false;
|
88
89
|
}
|
@@ -773,9 +774,9 @@ const SnkSimpleCrud = class {
|
|
773
774
|
if (this.dataUnit == undefined) {
|
774
775
|
return;
|
775
776
|
}
|
776
|
-
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),
|
777
|
+
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)
|
777
778
|
? undefined
|
778
|
-
: 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
|
779
|
+
: 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() }))));
|
779
780
|
}
|
780
781
|
get _element() { return getElement(this); }
|
781
782
|
static get watchers() { return {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { Action, LockManager, LockManagerOperation, SilentException, StringUtils, ApplicationContext, OVERFLOWED_CLASS_NAME, OverflowWatcher, OverflowDirection, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { A as AuthorizationConfig } from './AuthorizationConfig-dcbd207a.js';
|
4
|
-
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-
|
4
|
+
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-ed51e143.js';
|
5
5
|
import { P as PresentationMode } from './index-b40568ff.js';
|
6
|
-
import './index-
|
6
|
+
import './index-c57e49af.js';
|
7
7
|
|
8
8
|
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:wrap}.no-wrap.sc-snk-taskbar-h{flex-wrap:nowrap}.full-width.sc-snk-taskbar-h{width:100%}.align-right.sc-snk-taskbar-h{justify-content:flex-end}.overflowed.sc-snk-taskbar{display:none}";
|
9
9
|
|
@@ -17,6 +17,7 @@ const SnkTaskbar = class {
|
|
17
17
|
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
18
18
|
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
19
19
|
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
20
|
+
this.TASKBAR_CUSTOM_ELEMENTS = 'taskbar-custom-elements-container';
|
20
21
|
this._titleKeyByElement = {
|
21
22
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
22
23
|
[TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
|
@@ -420,6 +421,7 @@ const SnkTaskbar = class {
|
|
420
421
|
this._slotContainer.appendChild(customElement);
|
421
422
|
}
|
422
423
|
render() {
|
424
|
+
var _a;
|
423
425
|
if (this._definitions === undefined) {
|
424
426
|
return undefined;
|
425
427
|
}
|
@@ -438,7 +440,8 @@ const SnkTaskbar = class {
|
|
438
440
|
}
|
439
441
|
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
440
442
|
return h("slot", { name: elem });
|
441
|
-
})), h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }))
|
443
|
+
})), 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 :
|
444
|
+
_a.addNotOverFlowElement(this.TASKBAR_CUSTOM_ELEMENTS))));
|
442
445
|
}
|
443
446
|
getHostClasses() {
|
444
447
|
if (this.overflowStrategy !== 'hiddenItems')
|
@@ -0,0 +1 @@
|
|
1
|
+
export{S as snk_guides_viewer}from"./p-43769aa9.js";import"./p-d2d301a6.js";import"@sankhyalabs/core";import"./p-3ce68be5.js";import"./p-3fcb90d6.js";import"./p-22ddc147.js";import"./p-5a7e18f4.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-ff1990ad.js";import"./p-1d19a5b0.js";import"@sankhyalabs/ezui/dist/collection/utils/form";import"./p-23736d75.js";import"./p-517efc93.js";import"./p-0f3698af.js";import"./p-5e9fbd76.js";import"./p-ef076eea.js";import"./p-21749402.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"./p-7e0a0aae.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";import"@sankhyalabs/core/dist/dataunit/DataUnit";
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as s,h as i,H as t,g as e}from"./p-d2d301a6.js";import{ObjectUtils as a,StringUtils as r,ElementIDUtils as o}from"@sankhyalabs/core";import{P as n,b as l,a as c}from"./p-ef076eea.js";import"./p-5a7e18f4.js";import"./p-0f3698af.js";import"./p-21749402.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-7e0a0aae.js";import"./p-ff1990ad.js";import"./p-22ddc147.js";import"./p-1d19a5b0.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";const h=class{constructor(i){s(this,i),this._mdByName={},this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this._specialCharsRegex=/[[.\-\$\+\*,_\&\(\)%\/\\#@!:\|\=\'\"]/gim,this._charsWithAccentuation="ÁÉÍÓÚ_ÃÕ_ÂÊÎÔÛ_ÀÈÌÒÙ_Ü_Ç_áéíóú_ãõ_âêîôû_àèìòù_ü_ç",this._charsWithoutAccentuation="AEIOU_AO_AEIOU_AEIOU_U_C_aeiou_ao_aeiou_aeiou_u_c",this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=450,this._gridDataSource=[],this.pesquisaFetcher=new n,this._itemList=void 0,this._startLoading=!1,this._presentationMode="list",this._currentView=void 0,this._valideDataSource=!1,this.searchLoader=void 0,this.treeLoader=void 0,this.selectItem=void 0,this.entityName=void 0,this.argument=void 0,this.isHierarchyEntity=!1,this.allowsNonAnalytic=!1}observeArgument(){this._textInput&&(this._textInput.value=this.argument)}clearSearch(){this.argument="",this._itemList=void 0}buildDetails(s,i){let t={};for(let e=0;e<s.length;e++){const a=s[e],r=i[a.fieldName];t[a.description]=this.highlightValue(i.__matchFields,a.options&&a.options[r]||r,s,!0)}return t}buildFirstFields(s,i,t=6){return s&&Array.isArray(s)&&s.forEach((s=>{let t=this.removeReference(i,this._mdByName[s]);t&&i.unshift(t)})),i=i.slice(0,t)}doSearch(s){this.searchLoader&&"function"==typeof this.searchLoader&&(this._startLoading=!0,this.searchLoader(s).then((s=>{s&&this.processSearchResponse(s)})).finally((()=>{this._startLoading=!1})))}processSearchResponse(s){let i=(s=a.stringToObject(s.json.$)).descriptionField,t=s.pkField;t&&(this._gridMetadata=l(s),this._gridDataSource=[...s.data],this._pkField=t,this._descriptionField=i,this._itemList=this.buildCardItemList(s,t,i))}buildCardItemList(s,i,t){var e;return null===(e=s.data)||void 0===e?void 0:e.map((e=>{var a;let r=this.filterFieldsMetadata(s,e),o=this.buildFirstFields(e.__matchFields,r);return{key:this.highlightValue(e.__matchFields,null===(a=e[i])||void 0===a?void 0:a.toString(),o,!0),title:t?this.highlightValue(e.__matchFields,e[t],o,!0):"",details:this.buildDetails(o,e)}}))}filterFieldsMetadata(s,i){return s.fieldsMetadata.filter((t=>{let e=!r.isEmpty(i[t.fieldName])&&!1!==t.visible&&"B"!==t.type&&s.pkField!==t.fieldName&&s.descriptionField!==t.fieldName&&(t.isPrimaryKey||!t.isLinkField)&&!("S"===t.type&&"H"===t.presentationType);return e&&(this._mdByName[t.fieldName]=t),("string"!=typeof i[t.fieldName]||!(i[t.fieldName].indexOf("<img")>-1||i[t.fieldName].indexOf("<svg")>-1))&&e}))}removeAtIndex(s,i){if(i>=0&&i<s.length)return s.splice(i,1)[0]}removeReference(s,i){let t=this.indexOf(s,i);return this.removeAtIndex(s,t)}indexOf(s,i){let t=-1;return Array.isArray(s)&&this.find(s,((s,e)=>(t=e,this.equals(i,s)))),t}equals(s,i){return a.objectToString(s)===a.objectToString(i)}find(s,i){if(s)for(let t=0,e=s.length;t<e;t++)if(i(s[t],t,s))return s[t]}highlightValue(s,i,t,e){let a=this.replaceHtmlEntities(i);if(this.argument&&(e||this.isIn(s,t.fieldName))){const s=this.getArgumentNumber();let i=(isNaN(s)?this.argument:s.toString()).split(/%|,|\s+/),e=0,r=this.replaceAccentuatedChars(a);i.forEach((s=>{if(s){s=this.replaceAccentuatedChars(s);let i=this.getSpecialCharacters(s);null!=i&&i.length>0&&(s=this.removeSpecialCharacters(s)),(t.mask||"CGC_CPF"===t.uiType||"Phone"===t.uiType)&&(s=s.split("").join("\\.?\\-?\\/?\\(?\\)?"));let o=new RegExp(s,"ig");o.lastIndex=e;let n=o.exec(r);if(n&&n.length>0){e=n.index;let s=n[0].length,i=a.substring(e,e+s),t=(null==i?void 0:i.trim())?this._startHighlightTag+i+this._endHighlightTag:"",o=a.substring(0,e),l=a.substring(e+s);a=o+t+l,e+=t.length,r=this.replaceAccentuatedChars(a)}}}))}return a}replaceHtmlEntities(s){return null==s?s:String(s).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}replaceAccentuatedChars(s){return null==s?s:this.replaceToSpace(s,["&","<",">","""]).replace(/[^\w ]/g,(s=>{let i=this._charsWithAccentuation.indexOf(s);return i>-1&&(s=this._charsWithoutAccentuation.charAt(i)),s||""}))}replaceToSpace(s,i=[]){return null==s||i.forEach((i=>{const t=new RegExp(i,"g");let e="";for(let s=0;s<i.length;s++)e+=" ";s=String(s).replace(t,e)})),s}isIn(s,i){return this.indexOf(s,i)>-1}getSpecialCharacters(s){let i,t=[];for(;i=this._specialCharsRegex.exec(s);)t.push(s[i.index]);return t}removeSpecialCharacters(s){return this.getSpecialCharacters(s).forEach((i=>{s=this.replaceAll(s,i,"")})),s}replaceAll(s,i,t){let e=(null!=s?s:"").indexOf(i);for(;e>-1;)e=(s=s.replace(i,t)).indexOf(i);return s}getArgumentNumber(){return Number(this.argument||void 0)}createOption(s){let{key:i,title:t}=s;const e=new RegExp(this._startHighlightTag,"g"),a=new RegExp(this._endHighlightTag,"g");t=r.decodeHtmlEntities(t);const o={value:null==i?void 0:i.replace(e,"").replace(a,""),label:null==t?void 0:t.replace(e,"").replace(a,"")};this.selectItem(o)}onChangeValue(s){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=setTimeout((()=>{this.onChangeValue(s)}),this._deboucingTime));if(this.argument=(s.detail||"").trim(),this.isHierarchyEntity&&"list"===this._presentationMode)return void(null===(i=this._pesquisaTree)||void 0===i||i.applyFilter());const t=this.getArgumentNumber();this.argument&&(!isNaN(t)||this.argument.length>=this._limitCharsToSearch)?this._changeDeboucingTimeout=setTimeout((()=>{this.doSearch(isNaN(t)?this.argument:t.toString()),this._valideDataSource=!0}),this._deboucingTime):(this._itemList=void 0,this._gridDataSource=[],this._valideDataSource=!1)}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=void 0)}onClickSearch(){this.doSearch((this.argument||"").trim()),this._valideDataSource=!0}getMessageView(){return this._startLoading?"Aguarde, buscando registros...":this._itemList?this._itemList.length>=1?`${this._itemList.length} ${this._itemList.length>1?"registros encontrados":"registro encontrado"}`:"Nenhum registro encontrado":"Os resultados de sua pesquisa aparecerão aqui..."}async componentWillLoad(){const s=await this.pesquisaFetcher.loadPresentationConfig(this.entityName);this._presentationMode="list"===s?"list":"table"}async componentDidLoad(){o.addIDInfo(this._element),await this.chooseViewMode()}async handleChangeViewMode(){this._presentationMode="list"===this._presentationMode?"table":"list",await this.chooseViewMode(),await this.pesquisaFetcher.savePresentationConfig(this.entityName,this._presentationMode)}async chooseViewMode(){var s,i;if("list"!==this._presentationMode)return await(null===(s=this._viewStack)||void 0===s?void 0:s.show(c.GRID)),void(this._currentView=c.GRID);const t=this.isHierarchyEntity?c.TREE:c.CARDS;await(null===(i=this._viewStack)||void 0===i?void 0:i.show(t)),this._currentView=t}hideLimitMessage(){return!this._itemList||this._itemList.length<100}hideRecordsMessage(){return"list"===this._presentationMode&&this.isHierarchyEntity}getButtonModeInfo(){return"list"===this._presentationMode?{iconName:"table",title:"Modo grade"}:this.isHierarchyEntity?{iconName:"hierarchical-tree",title:"Modo árvore hierárquica"}:{iconName:"list",title:"Modo lista"}}render(){var s,e;return i(t,null,i("div",{class:"snk-pesquisa"},i("div",{class:"snk-pesquisa__input"},i("ez-text-input",{label:"Buscar",class:"ez-margin-right--medium",canShowError:!1,ref:s=>this._textInput=s,onEzChange:s=>this.onChangeValue(s),value:this.argument,"data-element-id":"searchInput"},i("ez-icon",{slot:"leftIcon",iconName:"search"}),this.argument&&(null===(s=this._textInput)||void 0===s?void 0:s.value)?i("button",{slot:"rightIcon",class:"snk-pesquisa__btn",onClick:()=>this.clearSearch()},i("ez-icon",{iconName:"close"})):void 0),i("ez-button",{class:"ez-button--primary",label:"Pesquisar",onClick:()=>this.onClickSearch()}),i("ez-button",{class:"ez-margin-left--medium",mode:"icon",iconName:this.getButtonModeInfo().iconName,title:this.getButtonModeInfo().title,onClick:async()=>await this.handleChangeViewMode()})),i("div",{class:"snk-pesquisa__records-label "+(this._currentView===c.TREE?"hidden":"")},i("label",{class:"snk-pesquisa__records "+(this.hideRecordsMessage()?"hidden":"")},this.getMessageView()),i("label",{class:"snk-pesquisa__records-limit "+(this.hideLimitMessage()?"hidden":"")},"Essa pesquisa foi limitada, existem mais resultados.")),i("div",{class:"snk-pesquisa__content"},i("ez-view-stack",{ref:s=>this._viewStack=s,"data-element-id":"simple-crud"},i("stack-item",null,this._valideDataSource&&i("pesquisa-grid",{metadata:this._gridMetadata,dataSource:this._gridDataSource,pkField:this._pkField,descriptionField:this._descriptionField,entityName:this.entityName,shouldLoadConfig:this._currentView===c.GRID,onPesquisaGridSelectItem:({detail:s})=>this.selectItem(s)})),i("stack-item",null,i("div",{class:"snk-pesquisa__cards-container"},null===(e=this._itemList)||void 0===e?void 0:e.map((s=>i("ez-card-item",{onEzClick:s=>this.createOption(s.detail),item:s}))))),i("stack-item",null,i("pesquisa-tree",{ref:s=>this._pesquisaTree=s,argument:this.argument,treeLoader:this.treeLoader,allowsNonAnalytic:this.allowsNonAnalytic,shouldLoadTree:this._currentView===c.TREE,onPesquisaTreeSelectItem:({detail:s})=>this.selectItem(s)}))))))}get _element(){return e(this)}static get watchers(){return{argument:["observeArgument"]}}};h.style=".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--small, 6px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right);height:100vh}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records-label.sc-snk-pesquisa{display:flex;flex-direction:row;justify-content:space-between;font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__records-label.hidden.sc-snk-pesquisa{display:none}.snk-pesquisa__records.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color)}.snk-pesquisa__records-limit.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color-secondary)}.snk-pesquisa__records-limit.hidden.sc-snk-pesquisa,.snk-pesquisa__records.hidden.sc-snk-pesquisa{visibility:hidden}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}.snk-pesquisa__cards-container.sc-snk-pesquisa{height:100%;overflow-y:auto}";export{h as snk_pesquisa}
|
@@ -0,0 +1 @@
|
|
1
|
+
var _;!function(_){_.LINK_AND_FILE_AT_THE_SAME_TIME="LINK_AND_FILE_AT_THE_SAME_TIME",_.ANY_LINK_OR_FILE_FILLED="ANY_LINK_OR_FILE_FILLED",_.UNKNOWN="UNKNOWN",_.DESCRIPTION_CANNOT_BE_CHANGED="DESCRIPTION_CANNOT_BE_CHANGED"}(_||(_={}));export{_ as S}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import{d as e,D as r}from"./p-5a7e18f4.js";import{ObjectUtils as n}from"@sankhyalabs/core";class t{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchResource",e.gql`query($name: String!) {
|
2
|
+
$queryAlias$: fetchResource(name: $name){
|
3
|
+
resource
|
4
|
+
}
|
5
|
+
}`),this.templateByQuery.set("saveResource",e.gql`mutation($resource: InputResource!) {
|
6
|
+
$queryAlias$: saveResource(resource: $resource){
|
7
|
+
name
|
8
|
+
resource
|
9
|
+
}
|
10
|
+
}`)}loadResource(e){if(t._loadingResource.has(e))return t._loadingResource.get(e);const n=new Promise(((n,o)=>{r.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchResource")}).then((r=>{n(null==r?void 0:r.resource),t._loadingResource.delete(e)})).catch((r=>{o(r),t._loadingResource.delete(e)}))}));return t._loadingResource.set(e,n),n}saveResource(e,n){return new Promise(((t,o)=>{r.get().callGraphQL({values:{resource:{name:n,resource:JSON.stringify(e)}},query:this.templateByQuery.get("saveResource")}).then((e=>{t(e)})).catch((e=>{o(e)}))}))}}t._loadingResource=new Map;class o extends t{constructor(){super(),this.queryConfig=new Map,this.buildTemplatesConfig()}buildTemplatesConfig(){this.queryConfig.set("fetchUserAvailableConfigs",e.gql`query($name: String!) {
|
11
|
+
$queryAlias$: fetchUserAvailableConfigs(name: $name){
|
12
|
+
name
|
13
|
+
origin
|
14
|
+
key
|
15
|
+
}
|
16
|
+
}`),this.queryConfig.set("fetchLegacyConfig",e.gql`query($name: String!) {
|
17
|
+
$queryAlias$: fetchLegacyConfig(name: $name){
|
18
|
+
name
|
19
|
+
resource
|
20
|
+
}
|
21
|
+
}`),this.queryConfig.set("fetchDefaultConfig",e.gql`query($name: String!) {
|
22
|
+
$queryAlias$: fetchDefaultConfig(name: $name){
|
23
|
+
name
|
24
|
+
resource
|
25
|
+
}
|
26
|
+
}`)}loadFormConfig(e,r){return new Promise(((n,t)=>{Promise.all([this.loadResource(this.getPath(r,e)),this.loadResource(this.getPath(`FormCardState:${r}`,e,"form-card")),this.loadResource(this.getPath(r,e,"summary")),this.loadResource(this.getPath(r,e,"defaultValues"))]).then((([e,r,t,o])=>{let i;if(null!=e){i=Object.assign(Object.assign({},JSON.parse(e)),{emptyConfig:!1});const{tabs:r,fields:n}=i;if(r){const e=new Map(r.map((e=>[e.label,e])));null==n||n.forEach((r=>{var n;return r.tab=(null===(n=e.get(this.getTabName(r.tab)))||void 0===n?void 0:n.label)||e.get(this.getTabName(r.tab))}))}i.fields=null==n?void 0:n.map((e=>{if("readonly"in e){const r=!0===e.readonly;delete e.readonly,e.readOnly=r}return e}))}null!=r&&(null==i&&(i={emptyConfig:!0,fields:[]}),i.cardsState=new Map(JSON.parse(r))),null!=t&&(null==i&&(i={emptyConfig:!0,fields:[]}),i.summary=new Map(Object.entries(JSON.parse(t)))),null!=o&&(null==i&&(i={emptyConfig:!0,fields:[]}),i.defaultVars=new Map(Object.entries(JSON.parse(o)))),n(i)})).catch((e=>{t(e)}))}))}getTabName(e){return"object"==typeof e?e.label:e}saveCardState(e,r,n){const t=this.getPath(`FormCardState:${n}`,r,"form-card");return new Promise(((r,n)=>{this.saveResource(Array.from(e.entries()),t).then((e=>{r(new Map(JSON.parse(e.resource)))})).catch((e=>{n(e)}))}))}saveConfig(e,r,n){delete e.cardsState,delete e.defaultVars,delete e.summary;const t=this.getPath(n,r);return new Promise(((r,n)=>{this.saveResource(e,t).then((e=>{r(JSON.parse(e.resource))})).catch((e=>{n(e)}))}))}fetchUserAvailableConfigs(e,n){const t=this.getPath(n,e);return new Promise(((e,n)=>{r.get().callGraphQL({values:{name:t},query:this.queryConfig.get("fetchUserAvailableConfigs")}).then((r=>{e(r)})).catch((e=>{n(e)}))}))}fetchLegacyConfig(e,t){const o=this.getPath(t,e);return new Promise(((e,t)=>{r.get().callGraphQL({values:{name:o},query:this.queryConfig.get("fetchLegacyConfig")}).then((r=>{e(n.stringToObject((null==r?void 0:r.resource)||""))})).catch((e=>{t(e)}))}))}fetchDefaultConfig(e,t){const o=this.getPath(t,e);return new Promise(((e,t)=>{r.get().callGraphQL({values:{name:o},query:this.queryConfig.get("fetchDefaultConfig")}).then((r=>{(null==r?void 0:r.resource)||e(null),e(n.stringToObject(null==r?void 0:r.resource))})).catch((e=>{t(e)}))}))}getPath(e,r,n="form"){return r?`cfg://${n}/${e}/${r}`:`cfg://${n}/${e}`}async fetchLegacyConfigurableForm(e){const t={requestBody:{config:{chave:e,tipo:"T"}}},o=await r.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(t));if(!n.isEmpty(o))return this.buildLegacyConfigurableForm(o)}async fetchSimpleFormConfig(e){const n={requestBody:{formConfig:{configName:e}}},t=await r.get().callServiceBroker("FormConfig.getFormConfig",JSON.stringify(n));return this.processConfig(t)}async saveSimpleFormConfig(e,n){const t=this.buildSaveSimpleFormConfigPayload(e,n),o=await r.get().callServiceBroker("FormConfig.saveFormConfig",JSON.stringify(t));this.processConfig(o)}processConfig(e){return n.isEmpty(e)?[]:this.getResponseAsArray(e).map((e=>e.name))}getResponseAsArray(e){var r,n,t;const o=null!==(t=null===(n=null===(r=null==e?void 0:e.formConfig)||void 0===r?void 0:r.layout)||void 0===n?void 0:n.field)&&void 0!==t?t:[];return Array.isArray(o)?o:[o]}buildSaveSimpleFormConfigPayload(e,r){return{formConfig:{configName:e,layout:{field:r.map((e=>({name:e})))},metadata:{field:[]}}}}async restoreFormConfig(e){const n={requestBody:{formConfig:{configName:e}}};await r.get().callServiceBroker("FormConfig.restoreFormConfig",JSON.stringify(n))}buildLegacyConfigurableForm(e){var r,n,t;const o=null!==(t=null===(n=null===(r=null==e?void 0:e.formConfig)||void 0===r?void 0:r.layout)||void 0===n?void 0:n.field)&&void 0!==t?t:[];return{emptyConfig:!1,fields:Array.isArray(o)?o:[o]}}}var i;!function(e){e.USER="USER",e.DEFAULT="DEFAULT",e.SHARED="SHARED"}(i||(i={}));export{o as F,t as R,i as U}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as t,c as i,f as s,h as e,H as a}from"./p-d2d301a6.js";import{Action as o}from"@sankhyalabs/core";import{S as h}from"./p-3ce68be5.js";import{FormMetadata as n,buildFormMetadata as r}from"@sankhyalabs/ezui/dist/collection/utils/form";import"./p-5a7e18f4.js";import"./p-ef076eea.js";import{P as d}from"./p-0f3698af.js";import"./p-21749402.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-7e0a0aae.js";import"./p-ff1990ad.js";import"./p-22ddc147.js";import{V as l}from"./p-1d19a5b0.js";import{T as c}from"./p-517efc93.js";import{S as m}from"./p-43769aa9.js";import{S as u}from"./p-17425c72.js";import"./p-3fcb90d6.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";import"./p-5e9fbd76.js";import"./p-23736d75.js";import"@sankhyalabs/core/dist/dataunit/DataUnit";class v{constructor(t,i,s){this._parentGuide=t,this._formMetadata=i,this._dataUnit=s}get id(){return this._parentGuide.id}buildGuideItem(t){const i=Object.assign({},this._parentGuide);delete i.expanded,delete i.children;const s=this._dataUnit.getSelectedRecord();if(!s)return i;const e=this._dataUnit.isNewRecord(s.__record__id__),a=Array.from(this._formMetadata.getAllSheets().values()).map((i=>{const{name:s,label:a}=i,o=null!=n.getDetailName(s.split("::").pop()),h=o&&e,r=this._parentGuide.id,d=o?`${r}::${s}`:`${r}__FORM:${s}`;return o&&t.has(d)&&!h?t.get(d).buildGuideItem(t):{id:d,label:a,disabled:h,tooltip:h?"Finalize o cadastro para ter acesso a esta guia.":void 0}})),o=a.shift();return o.label=e?"Novo Registro":s.__record__label__,o.children=a,i.children=[o],i}}const p=class{constructor(s){t(this,s),this.snkDetailGuidesChange=i(this,"snkDetailGuidesChange",7),this.snkSwitchGuide=i(this,"snkSwitchGuide",7),this.formItemsReady=i(this,"formItemsReady",7),this._disabledButtons=void 0,this._currentView=void 0,this.attachmentRegisterKey=void 0,this.formConfigManager=void 0,this.dataUnitName=void 0,this.resourceID=void 0,this.guideItemPath=void 0,this.entityName=void 0,this.label=void 0,this.dataUnit=void 0,this.selectedForm=void 0,this.dataState=void 0,this.messagesBuilder=void 0,this.branchGuide=void 0,this.canEdit=!0,this.taskbarCustomContainerId=void 0,this.customEditors=void 0,this.customRenders=void 0}observeDataUnit(t,i){null==t||t.subscribe(this.dataUnitActionHandler.bind(this)),null==i||i.unsubscribe(this.dataUnitActionHandler)}observerDataState(t,i){const s=!(null==i?void 0:i.insertionMode)&&(null==t?void 0:t.insertionMode),e=(null==i?void 0:i.insertionMode)&&!(null==t?void 0:t.insertionMode);if((s||e)&&this.loadMetadata(),null==this._formMetadata)return;const a=null==t?void 0:t.selectedRecord,o=null==i?void 0:i.selectedRecord;(null==a?void 0:a.__record__id__)!==(null==o?void 0:o.__record__id__)&&this.snkDetailGuidesChange.emit(new v(this.branchGuide,this._formMetadata,this.dataUnit)),s&&setTimeout((()=>{this.changeViewMode(l.FORM)}),0),e&&this.changeViewMode(l.GRID);const h=[];this.dataState.hasPrevious||h.push(c.PREVIOUS),this.dataState.hasNext||h.push(c.NEXT),this.dataState.insertionMode&&h.push(c.INSERT),this._disabledButtons=h}async changeViewMode(t){this.emitSwitchEvent(t)}async configGrid(){this._snkGrid&&this._snkGrid.showConfig()}async showUp(){this._snkFormView&&this._snkFormView.showUp(),this._snkGrid&&this._snkGrid.scrollIntoView({behavior:"smooth",block:"start"})}async addCustomEditor(t,i){var s;const e=this.normalizeBranchGuideId(null===(s=this.branchGuide)||void 0===s?void 0:s.id);this._snkGrid.addCustomEditor(t,i,e),this._snkFormView.addCustomEditor(t,i,e)}async observerPropsCustomEditor(t){for(const i in t)await this.addCustomEditor(i,t[i])}async addGridCustomRender(t,i){var s;const e=this.normalizeBranchGuideId(null===(s=this.branchGuide)||void 0===s?void 0:s.id);await this._snkGrid.addGridCustomRender(t,i,e)}onContentCardChanged(t){m.updateContentCard(t.detail.formName,t.detail.cardConfig,t.detail.propertyChanged,this.formConfigManager).then((()=>s(this))),t.stopPropagation()}async observeCustomRenders(t){for(const i in t){const s=t[i];await this.addGridCustomRender(i,s)}}updateLabel(){const t=this.guideItemPath?this.guideItemPath.length:0;if(t>0){const i=t>0?this.guideItemPath.map((t=>t.label)):void 0;this.label=i.pop(),this._levelPath=i.length>0?i.join(" / "):void 0}else this.label="",this._levelPath=void 0}getFormGuideId(t){var i;if(!t){if(null==(null===(i=this.dataState)||void 0===i?void 0:i.selectedRecord))return;const s=Array.from(this._formMetadata.getAllSheets().keys());if(!s||0==s.length)return;t=s[0]}return`${this.stripFormPattern(this.branchGuide.id)}__FORM:${t}`}stripFormPattern(t){return t.replace(p.REGEX_FORM_ID,"")}loadMetadata(){if(!this.dataUnit)return;if(!this.formConfigManager.isLoaded)return;const t=this.formConfigManager.getConfig(this.dataUnit);this._formMetadata=r(null==t||0===t.fields.length?void 0:t,this.dataUnit,!0)}dataUnitReadyHandler(t){this.dataUnit=t.detail,this.loadMetadata()}updateViewStack(t){var i,s;this._viewStack=t,this._currentView=this.selectedForm?1:0,null===(s=null===(i=this._viewStack)||void 0===i?void 0:i.show)||void 0===s||s.call(i,this._currentView)}getFormFields(){return this.selectedForm&&this._formMetadata?this._formMetadata.getSheet(this.selectedForm).fields:[]}emitSwitchEvent(t){const i=t===l.GRID?this.stripFormPattern(this.branchGuide.id):this.getFormGuideId();i&&this.snkSwitchGuide.emit(i)}handleAttachBack(){this._viewStack.show(l.GRID)}executeActionHandler(t){t.detail===c.GRID_MODE&&(this.emitSwitchEvent(l.GRID),t.stopPropagation()),t.detail!==c.FORM_MODE&&t.detail!==c.UPDATE||(this.emitSwitchEvent(l.FORM),t.stopPropagation()),t.detail===c.ATTACH&&(this._viewStack.show(l.ATTACHMENT),t.stopPropagation())}async getAttachmentRegisterKey(){if(this._snkDataUnit)return(await this._snkDataUnit.getSelectedRecordsIDsInfo()).map((({value:t})=>t)).join("_")}async handleDataStateChange({detail:t}){this.dataState=t,void 0!==t.selectedRecord&&this._snkDataUnit&&(this.attachmentRegisterKey=await this.getAttachmentRegisterKey())}componentWillLoad(){this._configName=`dynaform.${this.entityName}`,this.formConfigManager=new h(this._configName,this.resourceID,(()=>this.loadMetadata()),this.dataUnit),this.formConfigManager.loadConfig(),null==this.messagesBuilder&&(this.messagesBuilder=new u(this.entityName))}async componentDidLoad(){await this.observerPropsCustomEditor(this.customEditors),await this.observeCustomRenders(this.customRenders)}async dataUnitActionHandler(t){t.type===o.FIELD_INVALIDATED&&this.addErrorBadgeToBranchGuide()}addErrorBadgeToBranchGuide(){this.branchGuide=Object.assign(Object.assign({},this.branchGuide),{badge:"error"}),this.snkDetailGuidesChange.emit(new v(this.branchGuide,this._formMetadata,this.dataUnit))}normalizeBranchGuideId(t){return null==t?void 0:t.replace(/child\[(.*?)\]/g,"$1").replace(/::/g,">")}render(){return this.updateLabel(),e(a,null,e("snk-data-unit",{ref:t=>this._snkDataUnit=t,dataUnitName:`${this.dataUnitName}`,onDataUnitReady:t=>this.dataUnitReadyHandler(t),entityName:this.entityName,onDataStateChange:this.handleDataStateChange.bind(this),ignoreSaveMessage:this._currentView===l.GRID,messagesBuilder:this.messagesBuilder,configName:this._configName},e("ez-view-stack",{ref:t=>this.updateViewStack(t)},e("stack-item",null,e("div",{class:"ez-box ez-box--shadow grid-container"},e("div",{class:"ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header"},e("div",{class:"ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center"},this._levelPath?e("span",{class:"level-path"},this._levelPath+" /"):void 0,this.label)),e("snk-grid",{class:"ez-size-width--full ez-size-height--full",ref:t=>this._snkGrid=t,configName:this._configName,messagesBuilder:this.messagesBuilder,onGridDoubleClick:()=>this.emitSwitchEvent(l.FORM),onActionClick:t=>this.executeActionHandler(t),presentationMode:d.SECONDARY,canEdit:this.canEdit,isDetail:!0,taskbarCustomContainerId:this.taskbarCustomContainerId,gridHeaderCustomSlotId:"DETAIL_GRID_HEADER_CUSTOM_ELEMENTS",topTaskbarCustomSlotId:"DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS",outlineMode:!1}))),e("stack-item",null,e("snk-form-view",{ref:t=>this._snkFormView=t,canExpand:!1,canFix:!1,name:this.selectedForm,formMetadata:this._formMetadata,dataUnit:this.dataUnit,fields:this.getFormFields(),label:this.label,levelPath:this._levelPath,onFormItemsReady:({detail:t})=>this.formItemsReady.emit(t)},e("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:d.SECONDARY,onActionClick:t=>this.executeActionHandler(t),dataUnit:this.dataUnit,resourceID:this.resourceID,customContainerId:this.taskbarCustomContainerId,customSlotId:"DETAIL_TASKBAR_CUSTOM_ELEMENTS"},e("slot",{name:"DETAIL_TASKBAR_CUSTOM_ELEMENTS"})))),e("stack-item",null,e("snk-attach",{registerKey:this.attachmentRegisterKey,messagesBuilder:this.messagesBuilder,entityName:this.entityName,onBack:this.handleAttachBack.bind(this)})))))}static get watchers(){return{dataUnit:["observeDataUnit"],dataState:["observerDataState"],customEditors:["observerPropsCustomEditor"],customRenders:["observeCustomRenders"]}}};p.REGEX_FORM_ID=/__FORM:[^:]+/g,p.style=".sc-snk-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%}.level-path.sc-snk-detail-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.form-taskbar.sc-snk-detail-view{padding-bottom:var(--space--medium)}.grid-container.sc-snk-detail-view{background-color:#FFF;min-height:100px}.detail-header.sc-snk-detail-view{padding-bottom:0}";export{p as snk_detail_view}
|