@sankhyalabs/sankhyablocks 10.1.0-dev.56 → 10.1.0-dev.58

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.
Files changed (131) hide show
  1. package/dist/cjs/{ConfigStorage-a28eceb2.js → ConfigStorage-156bfcac.js} +2 -2
  2. package/dist/cjs/{DataFetcher-98d95e8f.js → DataFetcher-d13b4637.js} +12 -0
  3. package/dist/cjs/{ISave-a9815bb3.js → ISave-55d9dcc3.js} +1 -1
  4. package/dist/cjs/{SnkFormConfigManager-af47ba2f.js → SnkFormConfigManager-5cb9a39c.js} +2 -2
  5. package/dist/cjs/{SnkMultiSelectionListDataSource-2691125d.js → SnkMultiSelectionListDataSource-8d426f44.js} +15 -7
  6. package/dist/cjs/{auth-fetcher-9c257a1f.js → auth-fetcher-d1715459.js} +1 -1
  7. package/dist/cjs/{dataunit-fetcher-afc246d8.js → dataunit-fetcher-fae710c5.js} +1 -1
  8. package/dist/cjs/{form-config-fetcher-1ce4125c.js → form-config-fetcher-bbebdcb8.js} +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
  11. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  12. package/dist/cjs/snk-actions-button_9.cjs.entry.js +8 -8
  13. package/dist/cjs/snk-application.cjs.entry.js +6 -6
  14. package/dist/cjs/snk-attach_11.cjs.entry.js +12 -10
  15. package/dist/cjs/snk-crud.cjs.entry.js +12 -8
  16. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  17. package/dist/cjs/{snk-data-unit-ab570f87.js → snk-data-unit-32237a2d.js} +2 -2
  18. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  19. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  20. package/dist/cjs/snk-dynaform-detail-view_2.cjs.entry.js +31 -8
  21. package/dist/cjs/{snk-dynaform-guides-view-30ce5a8c.js → snk-dynaform-guides-view-c956fdd4.js} +388 -41
  22. package/dist/cjs/snk-dynaform-guides-view.cjs.entry.js +4 -4
  23. package/dist/cjs/snk-dynaform.cjs.entry.js +12 -8
  24. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +4 -4
  25. package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
  26. package/dist/cjs/snk-grid.cjs.entry.js +6 -6
  27. package/dist/cjs/{snk-guides-viewer-2a55fa3a.js → snk-guides-viewer-727cc1b6.js} +1 -1
  28. package/dist/cjs/snk-guides-viewer.cjs.entry.js +5 -5
  29. package/dist/cjs/snk-layout-form-config.cjs.entry.js +4 -4
  30. package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -4
  31. package/dist/cjs/{taskbarUtils-4ca4235e.js → taskbarUtils-be0fb299.js} +9 -4
  32. package/dist/collection/components/snk-actions-button/snk-actions-button.js +3 -3
  33. package/dist/collection/components/snk-crud/snk-crud.css +9 -4
  34. package/dist/collection/components/snk-crud/snk-crud.js +5 -1
  35. package/dist/collection/components/snk-crud/utils/taskbarUtils.js +5 -0
  36. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +11 -3
  37. package/dist/collection/components/snk-dynaform/snk-dynaform.css +9 -4
  38. package/dist/collection/components/snk-dynaform/snk-dynaform.js +5 -1
  39. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.css +71 -1
  40. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.js +23 -0
  41. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.css +35 -1
  42. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.js +3 -1
  43. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.css +229 -6
  44. package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.js +458 -38
  45. package/dist/collection/components/snk-dynaform-form-config/SnkFormConfigManager.js +8 -1
  46. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +1 -1
  47. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +4 -0
  48. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +4 -0
  49. package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +4 -0
  50. package/dist/components/ContinuousInsertUtils.js +11 -3
  51. package/dist/components/SnkMessageBuilder.js +12 -0
  52. package/dist/components/snk-actions-button2.js +3 -3
  53. package/dist/components/snk-crud.js +6 -2
  54. package/dist/components/snk-dynaform-detail-view2.js +419 -41
  55. package/dist/components/snk-dynaform-form-view2.js +4 -2
  56. package/dist/components/snk-dynaform.js +6 -2
  57. package/dist/components/snk-filter-bar2.js +1 -1
  58. package/dist/components/taskbarUtils.js +5 -0
  59. package/dist/esm/{ConfigStorage-346d781d.js → ConfigStorage-0d1c0695.js} +2 -2
  60. package/dist/esm/{DataFetcher-7d8df5a2.js → DataFetcher-70de9419.js} +12 -0
  61. package/dist/esm/{ISave-2117075a.js → ISave-f5704813.js} +1 -1
  62. package/dist/esm/{SnkFormConfigManager-066d370b.js → SnkFormConfigManager-e7f05f79.js} +2 -2
  63. package/dist/esm/{SnkMultiSelectionListDataSource-056ede43.js → SnkMultiSelectionListDataSource-eefb24b4.js} +15 -7
  64. package/dist/esm/{auth-fetcher-5891e22c.js → auth-fetcher-e34880e5.js} +1 -1
  65. package/dist/esm/{dataunit-fetcher-5dcb0e89.js → dataunit-fetcher-d26e4a08.js} +1 -1
  66. package/dist/esm/{form-config-fetcher-8e2082f3.js → form-config-fetcher-98c42169.js} +1 -1
  67. package/dist/esm/loader.js +1 -1
  68. package/dist/esm/pesquisa-grid_2.entry.js +4 -4
  69. package/dist/esm/sankhyablocks.js +1 -1
  70. package/dist/esm/snk-actions-button_9.entry.js +8 -8
  71. package/dist/esm/snk-application.entry.js +6 -6
  72. package/dist/esm/snk-attach_11.entry.js +12 -10
  73. package/dist/esm/snk-crud.entry.js +12 -8
  74. package/dist/esm/snk-data-exporter.entry.js +5 -5
  75. package/dist/esm/{snk-data-unit-f697345b.js → snk-data-unit-ff57ac90.js} +2 -2
  76. package/dist/esm/snk-data-unit.entry.js +3 -3
  77. package/dist/esm/snk-detail-view.entry.js +7 -7
  78. package/dist/esm/snk-dynaform-detail-view_2.entry.js +31 -8
  79. package/dist/esm/{snk-dynaform-guides-view-6aae38f7.js → snk-dynaform-guides-view-9977a60e.js} +389 -42
  80. package/dist/esm/snk-dynaform-guides-view.entry.js +4 -4
  81. package/dist/esm/snk-dynaform.entry.js +12 -8
  82. package/dist/esm/snk-filter-bar_4.entry.js +4 -4
  83. package/dist/esm/snk-form_2.entry.js +4 -4
  84. package/dist/esm/snk-grid.entry.js +6 -6
  85. package/dist/esm/{snk-guides-viewer-3ea7e312.js → snk-guides-viewer-d512dc7a.js} +1 -1
  86. package/dist/esm/snk-guides-viewer.entry.js +5 -5
  87. package/dist/esm/snk-layout-form-config.entry.js +4 -4
  88. package/dist/esm/snk-pesquisa.entry.js +4 -4
  89. package/dist/esm/{taskbarUtils-a43e4bba.js → taskbarUtils-c08efdbb.js} +9 -4
  90. package/dist/sankhyablocks/{p-3190ac29.js → p-097d75b3.js} +2 -2
  91. package/dist/sankhyablocks/{p-aa9d61fa.entry.js → p-12579574.entry.js} +1 -1
  92. package/dist/sankhyablocks/p-1567aaf9.entry.js +1 -0
  93. package/dist/sankhyablocks/p-2a83f20e.entry.js +1 -0
  94. package/dist/sankhyablocks/{p-5a8390f9.entry.js → p-30570022.entry.js} +1 -1
  95. package/dist/sankhyablocks/p-33f84e69.entry.js +1 -0
  96. package/dist/sankhyablocks/p-4299bcbb.js +1 -0
  97. package/dist/sankhyablocks/{p-10d883b0.js → p-4dd574d6.js} +1 -1
  98. package/dist/sankhyablocks/{p-c5889dae.js → p-59717928.js} +1 -1
  99. package/dist/sankhyablocks/{p-7e63af25.entry.js → p-62601ac6.entry.js} +1 -1
  100. package/dist/sankhyablocks/p-64f14e9c.entry.js +1 -0
  101. package/dist/sankhyablocks/{p-b3762105.entry.js → p-69f1b522.entry.js} +1 -1
  102. package/dist/sankhyablocks/{p-ee192f06.entry.js → p-711508e7.entry.js} +1 -1
  103. package/dist/sankhyablocks/p-75f261aa.js +1 -0
  104. package/dist/sankhyablocks/{p-95777c35.entry.js → p-8be9d886.entry.js} +1 -1
  105. package/dist/sankhyablocks/{p-c1e168a2.js → p-8d1ef77a.js} +1 -1
  106. package/dist/sankhyablocks/{p-13f91e7e.js → p-8d81c8d3.js} +1 -1
  107. package/dist/sankhyablocks/p-9a0e5bdf.js +1 -0
  108. package/dist/sankhyablocks/{p-741f1ad0.entry.js → p-9b5c9387.entry.js} +1 -1
  109. package/dist/sankhyablocks/p-9e02a785.js +1 -0
  110. package/dist/sankhyablocks/{p-c6b6567f.entry.js → p-a9330ce9.entry.js} +1 -1
  111. package/dist/sankhyablocks/{p-6f2de911.entry.js → p-af58b0d9.entry.js} +1 -1
  112. package/dist/sankhyablocks/{p-3630a5ae.entry.js → p-c4b34e2b.entry.js} +1 -1
  113. package/dist/sankhyablocks/{p-8d513b64.js → p-c9440c8a.js} +1 -1
  114. package/dist/sankhyablocks/{p-58e0f14b.entry.js → p-d10df418.entry.js} +1 -1
  115. package/dist/sankhyablocks/{p-4a53fbeb.entry.js → p-d622b92c.entry.js} +1 -1
  116. package/dist/sankhyablocks/{p-7827871d.entry.js → p-d8361914.entry.js} +1 -1
  117. package/dist/sankhyablocks/{p-e91bd00e.js → p-eac48627.js} +1 -1
  118. package/dist/sankhyablocks/{p-d7657667.js → p-ec7c87bb.js} +1 -1
  119. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  120. package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.d.ts +11 -0
  121. package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.d.ts +1 -0
  122. package/dist/types/components.d.ts +32 -0
  123. package/package.json +1 -1
  124. package/dist/sankhyablocks/p-1bc6849e.js +0 -1
  125. package/dist/sankhyablocks/p-3cc67d50.entry.js +0 -1
  126. package/dist/sankhyablocks/p-5c8217fa.entry.js +0 -1
  127. package/dist/sankhyablocks/p-a8a93568.entry.js +0 -1
  128. package/dist/sankhyablocks/p-acd3adf9.entry.js +0 -1
  129. package/dist/sankhyablocks/p-c3bc693a.js +0 -1
  130. package/dist/sankhyablocks/p-ed1b1b14.js +0 -1
  131. package/dist/sankhyablocks/p-fb3e17ff.js +0 -1
@@ -5,18 +5,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-1894343a.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
- require('./DataFetcher-98d95e8f.js');
9
- require('./ISave-a9815bb3.js');
8
+ require('./DataFetcher-d13b4637.js');
9
+ require('./ISave-55d9dcc3.js');
10
10
  const index$1 = require('./index-e3e39724.js');
11
11
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
12
12
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
13
- require('./dataunit-fetcher-afc246d8.js');
13
+ require('./dataunit-fetcher-fae710c5.js');
14
14
  require('./filter-item-type.enum-a7ffdaa6.js');
15
- require('./form-config-fetcher-1ce4125c.js');
15
+ require('./form-config-fetcher-bbebdcb8.js');
16
16
  const constants = require('./constants-6d82e405.js');
17
- const authFetcher = require('./auth-fetcher-9c257a1f.js');
17
+ const authFetcher = require('./auth-fetcher-d1715459.js');
18
18
  const ContinuousInsertUtils = require('./ContinuousInsertUtils-1ae0c6ac.js');
19
- const taskbarUtils = require('./taskbarUtils-4ca4235e.js');
19
+ const taskbarUtils = require('./taskbarUtils-be0fb299.js');
20
20
  const filterValidate = require('./filter-validate-cb4ed41a.js');
21
21
  const ServicesNumberingConfig = require('./ServicesNumberingConfig-69038a0f.js');
22
22
  const taskbarElements = require('./taskbar-elements-80eddec8.js');
@@ -26,7 +26,7 @@ require('@sankhyalabs/core/dist/utils/SortingUtils');
26
26
  require('./ResourceIDUtils-5ff86aa7.js');
27
27
  require('./index-f0fe7e6e.js');
28
28
 
29
- const snkDynaformCss = ".sc-snk-dynaform-h{display:flex;flex-direction:column;height:100%;width:100%;overflow:hidden;scrollbar-gutter:stable both-edges}snk-grid.sc-snk-dynaform{--snk-grid-padding:0 var(--space--6, 6px) var(--space--6, 6px) var(--space--6, 6px)}ez-view-stack.sc-snk-dynaform{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}stack-item.sc-snk-dynaform.sc-snk-dynaform{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}stack-item.sc-snk-dynaform.sc-snk-dynaform>snk-dynaform-guides-view.sc-snk-dynaform{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.snk-crud__header.sc-snk-dynaform{margin-bottom:var(--space--10, 10px)}.snk-crud__grid-stack-item.sc-snk-dynaform{display:flex;flex-direction:column;height:100%;width:100%;padding:0 var(--space--2, 2px)}.snk-crud__header-top.sc-snk-dynaform{display:flex;justify-content:space-between;align-items:center;padding:var(--space--8, 8px);padding-top:var(--space--12, 12px)}.snk-crud--hidden.sc-snk-dynaform{display:none !important}ez-record-navigation.sc-snk-dynaform,ez-grid-pagination.sc-snk-dynaform{margin-bottom:var(--space--8, 8px)}";
29
+ const snkDynaformCss = ".sc-snk-dynaform-h{display:flex;flex-direction:column;height:100%;width:100%;overflow:hidden;scrollbar-gutter:stable both-edges}snk-grid.sc-snk-dynaform{--snk-grid-padding:0 var(--space--6, 6px) var(--space--6, 6px) var(--space--6, 6px)}ez-view-stack.sc-snk-dynaform{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}stack-item.sc-snk-dynaform.sc-snk-dynaform{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}stack-item.sc-snk-dynaform.sc-snk-dynaform>snk-dynaform-guides-view.sc-snk-dynaform{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.snk-crud__grid-stack-item.sc-snk-dynaform{display:flex;flex-direction:column;height:100%;width:100%;padding:0 var(--space--2, 2px)}.snk-crud__header-top.sc-snk-dynaform{display:flex;justify-content:space-between;align-items:center;padding:var(--space--8, 8px);padding-top:var(--space--12, 12px)}.snk-crud--hidden.sc-snk-dynaform{display:none !important}.snk-crud__filter-bar--hidden.sc-snk-dynaform{display:none !important}snk-filter-bar.sc-snk-dynaform{padding-inline:var(--space--4, 4px)}ez-record-navigation.sc-snk-dynaform,ez-grid-pagination.sc-snk-dynaform{margin-bottom:var(--space--8, 8px)}";
30
30
 
31
31
  const SnkDynaform = class {
32
32
  constructor(hostRef) {
@@ -663,7 +663,11 @@ const SnkDynaform = class {
663
663
  if (this._snkDataUnit) {
664
664
  this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === constants.VIEW_MODE.GRID && !this.enableGridInsert);
665
665
  }
666
- return (index.h(index.Host, null, index.h("header", { class: { 'snk-crud--hidden': !this._headerVisible, 'snk-crud__header': true } }, index.h("div", { class: "snk-crud__header-top" }, index.h("snk-taskbar", { "data-element-id": "grid_top", key: "snkGridTopTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, resourceID: this._resourceID, primaryButton: "INSERT", overflowStrategy: "hiddenItems", alignRigth: true, actionsList: this.getActionsList(), customActionsList: this.buildTaskbarCustomActionsList(), sizeButtons: 'medium' })), index.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, mode: this._filterMode, hideFilterButton: true, sizeChips: 'default' })), index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", { class: 'snk-crud__grid-stack-item' }, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode, hideHeader: true, hideGridTaskbar: true }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-dynaform-guides-view", { ref: (ref) => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: (_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: (evt) => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields, onFormConfigVisibilityChanged: evt => this._headerVisible = !evt.detail }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), index.h("slot", { name: "SnkFormTaskBar" })))), index.h("snk-attach", { ref: (ref) => this._snkAttach = ref, registerKey: (_b = this.attachmentRegisterKey) !== null && _b !== void 0 ? _b : '', messagesBuilder: this.messagesBuilder, entityName: (_d = (_c = this._snkDataUnit) === null || _c === void 0 ? void 0 : _c.entityName) !== null && _d !== void 0 ? _d : '' }), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: (_e = this._snkDataUnit) === null || _e === void 0 ? void 0 : _e.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig }), this.renderDynamicSearch(), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
666
+ return (index.h(index.Host, null, index.h("header", { class: { 'snk-crud--hidden': !this._headerVisible, 'snk-crud__header': true } }, index.h("div", { class: "snk-crud__header-top" }, index.h("snk-taskbar", { "data-element-id": "grid_top", key: "snkGridTopTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, resourceID: this._resourceID, primaryButton: "INSERT", overflowStrategy: "hiddenItems", alignRigth: true, actionsList: this.getActionsList(), customActionsList: this.buildTaskbarCustomActionsList(), sizeButtons: 'medium' })), index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: {
667
+ 'snk-grid__filter-bar': true,
668
+ 'ez-align--top': true,
669
+ 'snk-crud__filter-bar--hidden': this._currentViewMode !== constants.VIEW_MODE.GRID
670
+ }, 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, mode: this._filterMode, hideFilterButton: true, sizeChips: 'default' })), index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", { class: 'snk-crud__grid-stack-item' }, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode, hideHeader: true, hideGridTaskbar: true }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-dynaform-guides-view", { ref: (ref) => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: (_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: (evt) => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields, onFormConfigVisibilityChanged: evt => this._headerVisible = !evt.detail }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), index.h("slot", { name: "SnkFormTaskBar" })))), index.h("snk-attach", { ref: (ref) => this._snkAttach = ref, registerKey: (_b = this.attachmentRegisterKey) !== null && _b !== void 0 ? _b : '', messagesBuilder: this.messagesBuilder, entityName: (_d = (_c = this._snkDataUnit) === null || _c === void 0 ? void 0 : _c.entityName) !== null && _d !== void 0 ? _d : '' }), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: (_e = this._snkDataUnit) === null || _e === void 0 ? void 0 : _e.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig }), this.renderDynamicSearch(), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
667
671
  }
668
672
  get _element() { return index.getElement(this); }
669
673
  static get watchers() { return {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-1894343a.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
8
- const ConfigStorage = require('./ConfigStorage-a28eceb2.js');
8
+ const ConfigStorage = require('./ConfigStorage-156bfcac.js');
9
9
  const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-263e4d24.js');
10
10
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
11
11
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
@@ -14,8 +14,8 @@ const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/e
14
14
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
15
15
  const filterType_enum = require('./filter-type.enum-b3b388af.js');
16
16
  const filterValidate = require('./filter-validate-cb4ed41a.js');
17
- require('./form-config-fetcher-1ce4125c.js');
18
- require('./DataFetcher-98d95e8f.js');
17
+ require('./form-config-fetcher-bbebdcb8.js');
18
+ require('./DataFetcher-d13b4637.js');
19
19
  require('./PrintUtils-bcaeb82f.js');
20
20
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
21
21
 
@@ -751,7 +751,7 @@ const SnkFilterBar = class {
751
751
  if (this.mode !== "regular") {
752
752
  return (index.h(index.Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), (this.mode === 'button' && !this.hideFilterButton) && (index.h("ez-button", { variant: "secondary", mode: "icon", iconName: "filter", class: "ez-margin-left--medium ez-margin-top--extra-small", size: "small", onClick: this.showFilterModal.bind(this) })), index.h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, filterItemType_enum.FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
753
753
  }
754
- return (index.h(index.Host, null, index.h("div", null, index.h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), index.h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked, scrollAmount: 100, navigationMode: "buttons" }, index.h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), !this.hideFilterButton &&
754
+ return (index.h(index.Host, null, index.h("div", null, this.title && index.h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), index.h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked, scrollAmount: 100, navigationMode: "buttons" }, index.h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), !this.hideFilterButton &&
755
755
  index.h("ez-button", { variant: "secondary", mode: "icon", iconName: "filter", class: "ez-padding-left--medium ez-margin-top--extra-small", size: "small", onClick: this.showFilterModal.bind(this) }, index.h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" })), index.h("snk-filter-modal", { opened: this.isFilterModalOpen, filterConfig: this.filterConfig, configName: this.configName, disablePersonalizedFilter: this.disablePersonalizedFilter, getMessage: (key, props) => this.getMessage(key, props), applyFilters: (filters) => this.applyFiltersFromModal(filters), closeModal: () => this.closeFilterModal(), addPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault), editPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault), deletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, filterItemType_enum.FilterItemType.PERSONALIZED, configName, isDefault), filterCustomConfigInterceptor: this.filterCustomConfigInterceptor })));
756
756
  }
757
757
  get _element() { return index.getElement(this); }
@@ -4,15 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1894343a.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-af47ba2f.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-5cb9a39c.js');
8
8
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
9
9
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
10
10
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
11
- const formConfigFetcher = require('./form-config-fetcher-1ce4125c.js');
11
+ const formConfigFetcher = require('./form-config-fetcher-bbebdcb8.js');
12
12
  const constants = require('./constants-6d82e405.js');
13
13
  const FormConfigHelper = require('./FormConfigHelper-28fe4668.js');
14
- require('./ConfigStorage-a28eceb2.js');
15
- require('./DataFetcher-98d95e8f.js');
14
+ require('./ConfigStorage-156bfcac.js');
15
+ require('./DataFetcher-d13b4637.js');
16
16
  require('./PrintUtils-bcaeb82f.js');
17
17
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
18
18
  require('./filter-item-type.enum-a7ffdaa6.js');
@@ -6,17 +6,17 @@ const index = require('./index-1894343a.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
8
8
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
9
- require('./DataFetcher-98d95e8f.js');
10
- require('./ISave-a9815bb3.js');
11
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-2691125d.js');
9
+ require('./DataFetcher-d13b4637.js');
10
+ require('./ISave-55d9dcc3.js');
11
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-8d426f44.js');
12
12
  const index$1 = require('./index-e3e39724.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- require('./dataunit-fetcher-afc246d8.js');
15
+ require('./dataunit-fetcher-fae710c5.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
- require('./form-config-fetcher-1ce4125c.js');
17
+ require('./form-config-fetcher-bbebdcb8.js');
18
18
  require('./constants-6d82e405.js');
19
- const ConfigStorage = require('./ConfigStorage-a28eceb2.js');
19
+ const ConfigStorage = require('./ConfigStorage-156bfcac.js');
20
20
  const index$2 = require('./index-f0fe7e6e.js');
21
21
  const ContinuousInsertUtils = require('./ContinuousInsertUtils-1ae0c6ac.js');
22
22
  const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
@@ -5,7 +5,7 @@ const core = require('@sankhyalabs/core');
5
5
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
7
  const constants = require('./constants-6d82e405.js');
8
- const SnkFormConfigManager = require('./SnkFormConfigManager-af47ba2f.js');
8
+ const SnkFormConfigManager = require('./SnkFormConfigManager-5cb9a39c.js');
9
9
  const taskbarElements = require('./taskbar-elements-80eddec8.js');
10
10
 
11
11
  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:132px;--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;--snk-workspace--header-height:40px;display:block;outline:none}ez-guide-navigator.sc-snk-guides-viewer{--ez-guide-navigator--border-radius:var(--space--12, 12px)}snk-form-view.sc-snk-guides-viewer{width:100%}stack-item.snk-guides-viewer.sc-snk-guides-viewer{display:grid}stack-item.sc-snk-guides-viewer.sc-snk-guides-viewer{display:grid;min-height:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding:0 var(--snk-guides-viewer--space-small);padding-bottom:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column;max-height:calc(100vh - var(--snk-guides-viewer__header--min-height));overflow-y:auto}.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-small)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:var(--snk-guides-viewer--space-small);height:calc(100vh - var(--snk-guides-viewer__header--min-height))}.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}";
@@ -2,16 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-2a55fa3a.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-727cc1b6.js');
6
6
  require('./index-1894343a.js');
7
7
  require('@sankhyalabs/core');
8
8
  require('@sankhyalabs/ezui/dist/collection/utils');
9
9
  require('@sankhyalabs/ezui/dist/collection/utils/form');
10
10
  require('./constants-6d82e405.js');
11
- require('./SnkFormConfigManager-af47ba2f.js');
12
- require('./ConfigStorage-a28eceb2.js');
13
- require('./form-config-fetcher-1ce4125c.js');
14
- require('./DataFetcher-98d95e8f.js');
11
+ require('./SnkFormConfigManager-5cb9a39c.js');
12
+ require('./ConfigStorage-156bfcac.js');
13
+ require('./form-config-fetcher-bbebdcb8.js');
14
+ require('./DataFetcher-d13b4637.js');
15
15
  require('./PrintUtils-bcaeb82f.js');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
@@ -3,15 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1894343a.js');
6
- require('./DataFetcher-98d95e8f.js');
7
- require('./ISave-a9815bb3.js');
6
+ require('./DataFetcher-d13b4637.js');
7
+ require('./ISave-55d9dcc3.js');
8
8
  const core = require('@sankhyalabs/core');
9
9
  require('./index-e3e39724.js');
10
10
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
11
11
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
12
- require('./dataunit-fetcher-afc246d8.js');
12
+ require('./dataunit-fetcher-fae710c5.js');
13
13
  require('./filter-item-type.enum-a7ffdaa6.js');
14
- const formConfigFetcher = require('./form-config-fetcher-1ce4125c.js');
14
+ const formConfigFetcher = require('./form-config-fetcher-bbebdcb8.js');
15
15
  require('./constants-6d82e405.js');
16
16
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
17
17
  require('./PrintUtils-bcaeb82f.js');
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1894343a.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const ISave = require('./ISave-a9815bb3.js');
8
- require('./DataFetcher-98d95e8f.js');
7
+ const ISave = require('./ISave-55d9dcc3.js');
8
+ require('./DataFetcher-d13b4637.js');
9
9
  require('./index-e3e39724.js');
10
10
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
11
11
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
12
- require('./dataunit-fetcher-afc246d8.js');
12
+ require('./dataunit-fetcher-fae710c5.js');
13
13
  require('./filter-item-type.enum-a7ffdaa6.js');
14
- require('./form-config-fetcher-1ce4125c.js');
14
+ require('./form-config-fetcher-bbebdcb8.js');
15
15
  require('./constants-6d82e405.js');
16
16
  require('./PrintUtils-bcaeb82f.js');
17
17
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- require('./DataFetcher-98d95e8f.js');
4
- require('./ISave-a9815bb3.js');
3
+ require('./DataFetcher-d13b4637.js');
4
+ require('./ISave-55d9dcc3.js');
5
5
  require('@sankhyalabs/core');
6
6
  const index = require('./index-e3e39724.js');
7
7
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
8
8
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
9
- require('./dataunit-fetcher-afc246d8.js');
9
+ require('./dataunit-fetcher-fae710c5.js');
10
10
  require('./filter-item-type.enum-a7ffdaa6.js');
11
- require('./form-config-fetcher-1ce4125c.js');
11
+ require('./form-config-fetcher-bbebdcb8.js');
12
12
  const constants = require('./constants-6d82e405.js');
13
13
  const taskbarElements = require('./taskbar-elements-80eddec8.js');
14
14
 
@@ -171,6 +171,11 @@ function buildNativeTaskbarManager(currentViewMode, mergeTaskbarManager, message
171
171
  },
172
172
  isEnabled: (_, dataState, buttonName, originalValue) => {
173
173
  var _a;
174
+ // Filtro só faz sentido no modo grade; a filter-bar fica oculta no
175
+ // form-view, então desabilita o botão que abre o painel de filtros.
176
+ if (currentViewMode === constants.VIEW_MODE.FORM && buttonName === exports.CustomTaskbarButton.FILTER) {
177
+ return false;
178
+ }
174
179
  if (!dataState) {
175
180
  return originalValue;
176
181
  }
@@ -69,9 +69,9 @@ export class SnkActionsButton {
69
69
  var _a, _b;
70
70
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
71
71
  await this.loadParameters();
72
- const snkDataUnit = this._element.parentElement;
73
- this._dataUnit = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.dataUnit;
74
- this._resourceID = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.resourceID;
72
+ const snkTaskbar = this._element.closest('snk-taskbar');
73
+ this._dataUnit = snkTaskbar === null || snkTaskbar === void 0 ? void 0 : snkTaskbar.dataUnit;
74
+ this._resourceID = snkTaskbar === null || snkTaskbar === void 0 ? void 0 : snkTaskbar.resourceID;
75
75
  this._entityName = (_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.split('/')[2];
76
76
  if (this._resourceID == undefined) {
77
77
  this._resourceID = await ResourceIDUtils.getResourceID();
@@ -15,10 +15,6 @@ stack-item.sc-snk-crud {
15
15
  min-height: 100%;
16
16
  }
17
17
 
18
- .snk-crud__header {
19
- margin-bottom: var(--space--10, 10px);
20
- }
21
-
22
18
  .snk-crud__grid-stack-item {
23
19
  display: flex;
24
20
  flex-direction: column;
@@ -51,6 +47,15 @@ stack-item.sc-snk-crud {
51
47
  display: none !important;
52
48
  }
53
49
 
50
+ /* Filtros só fazem sentido no modo grade; escondidos no formulário liberam espaço vertical. */
51
+ .snk-crud__filter-bar--hidden {
52
+ display: none !important;
53
+ }
54
+
55
+ snk-filter-bar {
56
+ padding-inline: var(--space--4, 4px);
57
+ }
58
+
54
59
  ez-record-navigation, ez-grid-pagination {
55
60
  margin-bottom: var(--space--8, 8px);
56
61
  }
@@ -596,7 +596,11 @@ export class SnkCrud {
596
596
  return;
597
597
  }
598
598
  this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
599
- return (h(Host, null, h("header", { class: { 'snk-crud--hidden': !this._headerVisible, 'snk-crud__header': true } }, h("div", { class: "snk-crud__header-top" }, h("snk-taskbar", { "data-element-id": "grid_top", key: "snkGridTopTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, resourceID: this._resourceID, primaryButton: "INSERT", overflowStrategy: "hiddenItems", alignRigth: true, actionsList: this.getActionsList(), customActionsList: this.buildTaskbarCustomActionsList(), sizeButtons: 'medium' })), 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, mode: this._filterMode, hideFilterButton: true, sizeChips: 'default' })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'snk-crud__grid-stack-item' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode, hideHeader: true, hideGridTaskbar: true }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields, onFormConfigVisibilityChanged: evt => this._headerVisible = !evt.detail }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), h("slot", { name: "SnkFormTaskBar" })))), h("snk-attach", { ref: (ref) => this._snkAttach = ref, registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName }), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig }), this.renderDynamicSearch(), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
599
+ return (h(Host, null, h("header", { class: { 'snk-crud--hidden': !this._headerVisible, 'snk-crud__header': true } }, h("div", { class: "snk-crud__header-top" }, h("snk-taskbar", { "data-element-id": "grid_top", key: "snkGridTopTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, resourceID: this._resourceID, primaryButton: "INSERT", overflowStrategy: "hiddenItems", alignRigth: true, actionsList: this.getActionsList(), customActionsList: this.buildTaskbarCustomActionsList(), sizeButtons: 'medium' })), h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: {
600
+ 'snk-grid__filter-bar': true,
601
+ 'ez-align--top': true,
602
+ 'snk-crud__filter-bar--hidden': this._currentViewMode !== VIEW_MODE.GRID
603
+ }, 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, mode: this._filterMode, hideFilterButton: true, sizeChips: 'default' })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'snk-crud__grid-stack-item' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode, hideHeader: true, hideGridTaskbar: true }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields, onFormConfigVisibilityChanged: evt => this._headerVisible = !evt.detail }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), h("slot", { name: "SnkFormTaskBar" })))), h("snk-attach", { ref: (ref) => this._snkAttach = ref, registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName }), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: this._snkDataUnit.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig }), this.renderDynamicSearch(), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
600
604
  }
601
605
  static get is() { return "snk-crud"; }
602
606
  static get encapsulation() { return "scoped"; }
@@ -104,6 +104,11 @@ export function buildNativeTaskbarManager(currentViewMode, mergeTaskbarManager,
104
104
  },
105
105
  isEnabled: (_, dataState, buttonName, originalValue) => {
106
106
  var _a;
107
+ // Filtro só faz sentido no modo grade; a filter-bar fica oculta no
108
+ // form-view, então desabilita o botão que abre o painel de filtros.
109
+ if (currentViewMode === VIEW_MODE.FORM && buttonName === CustomTaskbarButton.FILTER) {
110
+ return false;
111
+ }
107
112
  if (!dataState) {
108
113
  return originalValue;
109
114
  }
@@ -20,6 +20,7 @@ export class CommonsExporter {
20
20
  var _a;
21
21
  const columnsMetadata = [];
22
22
  const searchPlusDescriptionIds = this.collectSearchPlusDescriptionIds(gridColumns);
23
+ const gridColumnsByName = new Map(gridColumns.map(column => [column.name, column]));
23
24
  for (const column of gridColumns) {
24
25
  if (this.isHiddenColumn(column)) {
25
26
  continue;
@@ -46,9 +47,16 @@ export class CommonsExporter {
46
47
  };
47
48
  let descriptionColumn = isSearchField ? this.buildDescriptionColumn(fieldData, column) : undefined;
48
49
  if (descriptionColumn) {
49
- const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
50
- columnData = Object.assign(Object.assign({}, columnData), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.codWidth });
51
- descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.descWidth, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
50
+ const realDescriptionColumn = gridColumnsByName.get(descriptionColumn.id);
51
+ if (realDescriptionColumn === null || realDescriptionColumn === void 0 ? void 0 : realDescriptionColumn.width) {
52
+ columnData = Object.assign(Object.assign({}, columnData), { width: Math.min(columnData.width, this.MAX_WIDTH_COD) });
53
+ descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: realDescriptionColumn.width, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
54
+ }
55
+ else {
56
+ const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
57
+ columnData = Object.assign(Object.assign({}, columnData), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.codWidth });
58
+ descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.descWidth, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
59
+ }
52
60
  }
53
61
  columnsMetadata.push(columnData);
54
62
  if (descriptionColumn)
@@ -35,10 +35,6 @@ stack-item.sc-snk-dynaform > snk-dynaform-guides-view {
35
35
  overflow: hidden;
36
36
  }
37
37
 
38
- .snk-crud__header {
39
- margin-bottom: var(--space--10, 10px);
40
- }
41
-
42
38
  .snk-crud__grid-stack-item {
43
39
  display: flex;
44
40
  flex-direction: column;
@@ -59,6 +55,15 @@ stack-item.sc-snk-dynaform > snk-dynaform-guides-view {
59
55
  display: none !important;
60
56
  }
61
57
 
58
+ /* Filtros só fazem sentido no modo grade; escondidos no formulário liberam espaço vertical. */
59
+ .snk-crud__filter-bar--hidden {
60
+ display: none !important;
61
+ }
62
+
63
+ snk-filter-bar {
64
+ padding-inline: var(--space--4, 4px);
65
+ }
66
+
62
67
  ez-record-navigation, ez-grid-pagination {
63
68
  margin-bottom: var(--space--8, 8px);
64
69
  }
@@ -644,7 +644,11 @@ export class SnkDynaform {
644
644
  if (this._snkDataUnit) {
645
645
  this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
646
646
  }
647
- return (h(Host, null, h("header", { class: { 'snk-crud--hidden': !this._headerVisible, 'snk-crud__header': true } }, h("div", { class: "snk-crud__header-top" }, h("snk-taskbar", { "data-element-id": "grid_top", key: "snkGridTopTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, resourceID: this._resourceID, primaryButton: "INSERT", overflowStrategy: "hiddenItems", alignRigth: true, actionsList: this.getActionsList(), customActionsList: this.buildTaskbarCustomActionsList(), sizeButtons: 'medium' })), 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, mode: this._filterMode, hideFilterButton: true, sizeChips: 'default' })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'snk-crud__grid-stack-item' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode, hideHeader: true, hideGridTaskbar: true }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-dynaform-guides-view", { ref: (ref) => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: (_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: (evt) => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields, onFormConfigVisibilityChanged: evt => this._headerVisible = !evt.detail }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), h("slot", { name: "SnkFormTaskBar" })))), h("snk-attach", { ref: (ref) => this._snkAttach = ref, registerKey: (_b = this.attachmentRegisterKey) !== null && _b !== void 0 ? _b : '', messagesBuilder: this.messagesBuilder, entityName: (_d = (_c = this._snkDataUnit) === null || _c === void 0 ? void 0 : _c.entityName) !== null && _d !== void 0 ? _d : '' }), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: (_e = this._snkDataUnit) === null || _e === void 0 ? void 0 : _e.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig }), this.renderDynamicSearch(), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
647
+ return (h(Host, null, h("header", { class: { 'snk-crud--hidden': !this._headerVisible, 'snk-crud__header': true } }, h("div", { class: "snk-crud__header-top" }, h("snk-taskbar", { "data-element-id": "grid_top", key: "snkGridTopTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, resourceID: this._resourceID, primaryButton: "INSERT", overflowStrategy: "hiddenItems", alignRigth: true, actionsList: this.getActionsList(), customActionsList: this.buildTaskbarCustomActionsList(), sizeButtons: 'medium' })), h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: {
648
+ 'snk-grid__filter-bar': true,
649
+ 'ez-align--top': true,
650
+ 'snk-crud__filter-bar--hidden': this._currentViewMode !== VIEW_MODE.GRID
651
+ }, 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, mode: this._filterMode, hideFilterButton: true, sizeChips: 'default' })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'snk-crud__grid-stack-item' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter, multipleEditionEnabled: this.multipleEditionEnabled, paginationCounterMode: this.paginationCounterMode, hideHeader: true, hideGridTaskbar: true }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-dynaform-guides-view", { ref: (ref) => this._guidesViewer = ref, customGuidesConfig: this.customGuidesConfig, entityPath: (_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: (evt) => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields, onFormConfigVisibilityChanged: evt => this._headerVisible = !evt.detail }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), this.renderCustomGuideSlots(), h("slot", { name: "SnkFormTaskBar" })))), h("snk-attach", { ref: (ref) => this._snkAttach = ref, registerKey: (_b = this.attachmentRegisterKey) !== null && _b !== void 0 ? _b : '', messagesBuilder: this.messagesBuilder, entityName: (_d = (_c = this._snkDataUnit) === null || _c === void 0 ? void 0 : _c.entityName) !== null && _d !== void 0 ? _d : '' }), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, entityName: (_e = this._snkDataUnit) === null || _e === void 0 ? void 0 : _e.entityName, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig }), this.renderDynamicSearch(), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
648
652
  }
649
653
  static get is() { return "snk-dynaform"; }
650
654
  static get encapsulation() { return "scoped"; }
@@ -4,7 +4,36 @@
4
4
  flex-direction: column;
5
5
  width: 100%;
6
6
  height: 100%;
7
- overflow: hidden;
7
+ overflow-x: hidden;
8
+ overflow-y: auto;
9
+ padding: var(--space--4, 4px);
10
+ scrollbar-width: auto;
11
+ scrollbar-color: var(--color--strokes, #E1E2E5) transparent;
12
+ }
13
+
14
+ :host::-webkit-scrollbar {
15
+ width: var(--space--14, 14px);
16
+ height: var(--space--14, 14px);
17
+ }
18
+
19
+ :host::-webkit-scrollbar-track {
20
+ background: transparent;
21
+ }
22
+
23
+ :host::-webkit-scrollbar-thumb {
24
+ background-color: var(--color--strokes, #E1E2E5);
25
+ border-radius: var(--border--radius-100, 100px);
26
+ border: 2px solid transparent;
27
+ background-clip: padding-box;
28
+ }
29
+
30
+ :host::-webkit-scrollbar-thumb:hover {
31
+ background-color: var(--color--petroleum-100, #C8CCD3);
32
+ background-clip: padding-box;
33
+ }
34
+
35
+ :host::-webkit-scrollbar-corner {
36
+ background: transparent;
8
37
  }
9
38
 
10
39
  .level-path {
@@ -31,15 +60,29 @@
31
60
 
32
61
  snk-data-unit {
33
62
  flex: 1;
63
+ /* Permite encolher abaixo do conteúdo p/ a grade rolar quando o painel
64
+ inferior é redimensionado abaixo da altura natural. */
65
+ min-height: 0;
34
66
  gap: var(--space--12, 12px);
35
67
  display: flex;
36
68
  flex-direction: column;
37
69
  }
38
70
 
71
+ /* view-stack preenche o espaço restante e pode encolher (grade rola dentro). */
72
+ snk-data-unit ez-view-stack {
73
+ flex: 1;
74
+ min-height: 0;
75
+ }
76
+
39
77
  snk-grid {
40
78
  height: 100%;
41
79
  --snk-grid-margin: 0px;
42
80
  --snk-grid-box-shadow: none;
81
+ --snk-grid-min-height: 135px;
82
+ }
83
+
84
+ .form-and-detail-container > ez-tabselector {
85
+ flex-shrink: 0;
43
86
  }
44
87
 
45
88
  .form-and-detail-container {
@@ -49,6 +92,33 @@ snk-grid {
49
92
  width: 100%;
50
93
  overflow: auto;
51
94
  padding: var(--space--12, 12px);
95
+ scrollbar-width: auto;
96
+ scrollbar-color: var(--color--strokes, #E1E2E5) transparent;
97
+ }
98
+
99
+ .form-and-detail-container::-webkit-scrollbar {
100
+ width: var(--space--14, 14px);
101
+ height: var(--space--14, 14px);
102
+ }
103
+
104
+ .form-and-detail-container::-webkit-scrollbar-track {
105
+ background: transparent;
106
+ }
107
+
108
+ .form-and-detail-container::-webkit-scrollbar-thumb {
109
+ background-color: var(--color--strokes, #E1E2E5);
110
+ border-radius: var(--border--radius-100, 100px);
111
+ border: 2px solid transparent;
112
+ background-clip: padding-box;
113
+ }
114
+
115
+ .form-and-detail-container::-webkit-scrollbar-thumb:hover {
116
+ background-color: var(--color--petroleum-100, #C8CCD3);
117
+ background-clip: padding-box;
118
+ }
119
+
120
+ .form-and-detail-container::-webkit-scrollbar-corner {
121
+ background: transparent;
52
122
  }
53
123
 
54
124
  .ez-tabselector-internal {
@@ -13,6 +13,8 @@ import { DEFAULT_TASKBAR_BUTTONS, getTopTaskBarId } from '../../../snk-crud/util
13
13
  export class SnkDynaformDetailView {
14
14
  constructor() {
15
15
  this._taskbarProcessor = new SimpleTaskbarProcessor(DEFAULT_TASKBAR_BUTTONS);
16
+ /** Evita repetir a carga inicial da grade no mesmo mount da aba. */
17
+ this._didInitialLoad = false;
16
18
  this._currentView = 0;
17
19
  this.attachmentRegisterKey = undefined;
18
20
  this._fieldToGetFocus = undefined;
@@ -161,6 +163,27 @@ export class SnkDynaformDetailView {
161
163
  dataUnitReadyHandler(evt) {
162
164
  this.dataUnit = evt.detail;
163
165
  this.loadMetadata();
166
+ this.ensureInitialLoad();
167
+ }
168
+ /**
169
+ * Dispara a carga inicial da grade quando a aba é montada com o master já
170
+ * selecionado. A carga do filho normalmente é disparada pelo evento de troca
171
+ * de seleção do master; uma aba montada tardiamente (aberta depois que o
172
+ * registro master já estava selecionado) não recebe esse evento e ficaria
173
+ * vazia até um refresh manual. Navegações seguintes do master continuam
174
+ * recarregando pela assinatura existente do DataUnit.
175
+ */
176
+ ensureInitialLoad() {
177
+ var _a, _b, _c, _d, _e;
178
+ if (this._didInitialLoad) {
179
+ return;
180
+ }
181
+ const dataUnit = this.dataUnit;
182
+ const parentDataUnit = (_a = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getParentDataUnit) === null || _a === void 0 ? void 0 : _a.call(dataUnit);
183
+ if (((_b = parentDataUnit === null || parentDataUnit === void 0 ? void 0 : parentDataUnit.getSelectedRecord) === null || _b === void 0 ? void 0 : _b.call(parentDataUnit)) && ((_d = (_c = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.records) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) === 0) {
184
+ this._didInitialLoad = true;
185
+ (_e = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.loadData) === null || _e === void 0 ? void 0 : _e.call(dataUnit);
186
+ }
164
187
  }
165
188
  getFormFields() {
166
189
  var _a, _b, _c;