@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-67229.2 → 0.0.0-bugfix-dev-KB-38445.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/cjs/{IExporterProvider-9479f618.js → IExporterProvider-597949f9.js} +1 -1
  2. package/dist/cjs/{SnkFormConfigManager-26dfc762.js → SnkFormConfigManager-1b13bacd.js} +7 -5
  3. package/dist/cjs/{dataunit-fetcher-0c7106a0.js → dataunit-fetcher-688d3f05.js} +7 -3
  4. package/dist/cjs/snk-actions-button_4.cjs.entry.js +1 -1
  5. package/dist/cjs/snk-application.cjs.entry.js +1 -1
  6. package/dist/cjs/snk-attach.cjs.entry.js +1 -1
  7. package/dist/cjs/snk-crud.cjs.entry.js +1 -1
  8. package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
  9. package/dist/cjs/{snk-data-unit-16791a2f.js → snk-data-unit-685272e7.js} +1 -1
  10. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  11. package/dist/cjs/snk-detail-view.cjs.entry.js +5 -4
  12. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  13. package/dist/cjs/snk-form.cjs.entry.js +1 -1
  14. package/dist/cjs/snk-grid.cjs.entry.js +4 -4
  15. package/dist/cjs/{snk-guides-viewer-657dc13c.js → snk-guides-viewer-67605336.js} +3 -3
  16. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -3
  17. package/dist/cjs/snk-simple-crud.cjs.entry.js +5 -5
  18. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -1
  19. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
  20. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +7 -5
  21. package/dist/collection/components/snk-form-config/snk-form-config.js +1 -1
  22. package/dist/collection/components/snk-grid/snk-grid.css +2 -0
  23. package/dist/collection/components/snk-grid/snk-grid.js +1 -1
  24. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +2 -2
  25. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +7 -3
  26. package/dist/components/SnkFormConfigManager.js +7 -5
  27. package/dist/components/dataunit-fetcher.js +7 -3
  28. package/dist/components/snk-detail-view2.js +3 -2
  29. package/dist/components/snk-form-config2.js +1 -1
  30. package/dist/components/snk-grid2.js +2 -2
  31. package/dist/components/snk-simple-crud2.js +2 -2
  32. package/dist/esm/{IExporterProvider-5a858363.js → IExporterProvider-63a188b6.js} +1 -1
  33. package/dist/esm/{SnkFormConfigManager-5782d6cf.js → SnkFormConfigManager-d4554df9.js} +7 -5
  34. package/dist/esm/{dataunit-fetcher-f7e0ffc0.js → dataunit-fetcher-264191b2.js} +7 -3
  35. package/dist/esm/snk-actions-button_4.entry.js +1 -1
  36. package/dist/esm/snk-application.entry.js +1 -1
  37. package/dist/esm/snk-attach.entry.js +1 -1
  38. package/dist/esm/snk-crud.entry.js +1 -1
  39. package/dist/esm/snk-data-exporter.entry.js +2 -2
  40. package/dist/esm/{snk-data-unit-a327d22c.js → snk-data-unit-63f83504.js} +1 -1
  41. package/dist/esm/snk-data-unit.entry.js +2 -2
  42. package/dist/esm/snk-detail-view.entry.js +5 -4
  43. package/dist/esm/snk-form-config.entry.js +1 -1
  44. package/dist/esm/snk-form.entry.js +1 -1
  45. package/dist/esm/snk-grid.entry.js +4 -4
  46. package/dist/esm/{snk-guides-viewer-1cc2883a.js → snk-guides-viewer-151f6091.js} +3 -3
  47. package/dist/esm/snk-guides-viewer.entry.js +3 -3
  48. package/dist/esm/snk-simple-crud.entry.js +5 -5
  49. package/dist/sankhyablocks/p-14a08904.entry.js +1 -0
  50. package/dist/sankhyablocks/{p-5231f7bf.entry.js → p-14b9f964.entry.js} +1 -1
  51. package/dist/sankhyablocks/{p-b8cde0d8.entry.js → p-19c18d06.entry.js} +1 -1
  52. package/dist/sankhyablocks/{p-e6210aec.js → p-3a212712.js} +1 -1
  53. package/dist/sankhyablocks/{p-e0b9f59a.entry.js → p-7505da04.entry.js} +1 -1
  54. package/dist/sankhyablocks/{p-e9bbc3d5.entry.js → p-75f83d1d.entry.js} +1 -1
  55. package/dist/sankhyablocks/p-829d4045.js +1 -0
  56. package/dist/sankhyablocks/{p-60e46675.entry.js → p-82a0bfb0.entry.js} +1 -1
  57. package/dist/sankhyablocks/{p-b8d06bb3.entry.js → p-8fc470e5.entry.js} +1 -1
  58. package/dist/sankhyablocks/{p-0e11ee18.entry.js → p-941bf3ef.entry.js} +1 -1
  59. package/dist/sankhyablocks/p-b4b21558.entry.js +1 -0
  60. package/dist/sankhyablocks/{p-b7c4feeb.entry.js → p-bad55caa.entry.js} +1 -1
  61. package/dist/sankhyablocks/{p-5ffec2d5.entry.js → p-c053256c.entry.js} +1 -1
  62. package/dist/sankhyablocks/{p-7d9baaf4.entry.js → p-c5268346.entry.js} +1 -1
  63. package/dist/sankhyablocks/p-cefba299.js +1 -0
  64. package/dist/sankhyablocks/{p-c7cbad38.js → p-fcac4dfc.js} +1 -1
  65. package/dist/sankhyablocks/{p-6d4f4614.js → p-fe79f83a.js} +1 -1
  66. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  67. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +2 -2
  68. package/package.json +1 -1
  69. package/dist/sankhyablocks/p-159ad0fb.entry.js +0 -1
  70. package/dist/sankhyablocks/p-450c60e4.entry.js +0 -1
  71. package/dist/sankhyablocks/p-ad7c7de8.js +0 -1
  72. package/dist/sankhyablocks/p-f4d7fa81.js +0 -1
@@ -7,7 +7,7 @@ require('./index-1dfc7a6e.js');
7
7
  require('./ISave-e91b70a7.js');
8
8
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
9
9
  const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
10
- const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
10
+ const dataunitFetcher = require('./dataunit-fetcher-688d3f05.js');
11
11
  require('./filter-item-type.enum-a7ffdaa6.js');
12
12
  require('./form-config-fetcher-2dd00e5b.js');
13
13
  const InMemoryFilterColumnDataSource = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
@@ -76,8 +76,10 @@ class SnkFormConfigManager {
76
76
  if (fields != undefined && fields.length > 0) {
77
77
  return fields.map(({ label, name, readOnly, visible, required }) => {
78
78
  if (label == undefined) {
79
- const currentField = dataUnit.getField(name);
80
- return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required });
79
+ return Object.assign(Object.assign({}, dataUnit.getField(name)), { name,
80
+ readOnly,
81
+ visible,
82
+ required });
81
83
  }
82
84
  return { name, label, readOnly, visible, required };
83
85
  })
@@ -101,7 +103,7 @@ class SnkFormConfigManager {
101
103
  const normalizedFilter = core.StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
102
104
  return normalizedText.includes(normalizedFilter);
103
105
  }
104
- getFormConfig(dataUnit, ignoreReadOnlyFormFields) {
106
+ getInsertionConfig(dataUnit, ignoreReadOnlyFormFields) {
105
107
  let fields = this.getFieldsList(dataUnit);
106
108
  if (ignoreReadOnlyFormFields) {
107
109
  fields = fields.filter(field => {
@@ -133,8 +135,8 @@ class SnkFormConfigManager {
133
135
  this._onConfigChange(Object.assign({}, this._config));
134
136
  }
135
137
  }
136
- getConfig(dataUnit, ignoreReadOnlyFormFields) {
137
- return this.getFormConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true);
138
+ getConfig(insertionMode, dataUnit, ignoreReadOnlyFormFields) {
139
+ return insertionMode ? this.getInsertionConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true) : Object.assign({}, this._config);
138
140
  }
139
141
  getFormConfigFetcher() {
140
142
  if (this._formConfigFetcher == undefined) {
@@ -252,13 +252,17 @@ function applySorting(records, dataUnit, sorting) {
252
252
  return records.sort(sortingFunction);
253
253
  }
254
254
  function buildPaginationInfo(records, offset = 0, limit = 0) {
255
- const lastRecord = Math.min(offset + limit, records === null || records === void 0 ? void 0 : records.length);
255
+ if (records === undefined) {
256
+ return undefined;
257
+ }
258
+ const total = (records === null || records === void 0 ? void 0 : records.length) || 0;
259
+ const lastRecord = Math.min(offset + limit, total);
256
260
  return {
257
261
  currentPage: limit === 0 ? 0 : Math.ceil(offset / limit),
258
262
  firstRecord: offset,
259
263
  lastRecord: lastRecord,
260
- total: records === null || records === void 0 ? void 0 : records.length,
261
- hasMore: !!((records === null || records === void 0 ? void 0 : records.length) - lastRecord),
264
+ total: total,
265
+ hasMore: !!(total - lastRecord),
262
266
  };
263
267
  }
264
268
 
@@ -11,7 +11,7 @@ require('./index-1dfc7a6e.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./dataunit-fetcher-0c7106a0.js');
14
+ require('./dataunit-fetcher-688d3f05.js');
15
15
  require('./filter-item-type.enum-a7ffdaa6.js');
16
16
  require('./form-config-fetcher-2dd00e5b.js');
17
17
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
@@ -8,7 +8,7 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const ConfigStorage = require('./ConfigStorage-942ce74b.js');
9
9
  const DataFetcher = require('./DataFetcher-313debd8.js');
10
10
  const authFetcher = require('./auth-fetcher-54f5ff9d.js');
11
- const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
11
+ const dataunitFetcher = require('./dataunit-fetcher-688d3f05.js');
12
12
  const pesquisaFetcher = require('./pesquisa-fetcher-680e198f.js');
13
13
  const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
14
14
  require('./form-config-fetcher-2dd00e5b.js');
@@ -8,7 +8,7 @@ const DataFetcher = require('./DataFetcher-313debd8.js');
8
8
  require('./pesquisa-fetcher-680e198f.js');
9
9
  require('./index-1dfc7a6e.js');
10
10
  const ISave = require('./ISave-e91b70a7.js');
11
- const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
11
+ const dataunitFetcher = require('./dataunit-fetcher-688d3f05.js');
12
12
  require('./filter-item-type.enum-a7ffdaa6.js');
13
13
  require('./form-config-fetcher-2dd00e5b.js');
14
14
  const constants = require('./constants-35ddd366.js');
@@ -11,7 +11,7 @@ const index$1 = require('./index-1dfc7a6e.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./dataunit-fetcher-0c7106a0.js');
14
+ require('./dataunit-fetcher-688d3f05.js');
15
15
  require('./filter-item-type.enum-a7ffdaa6.js');
16
16
  require('./form-config-fetcher-2dd00e5b.js');
17
17
  const constants = require('./constants-35ddd366.js');
@@ -8,12 +8,12 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const index = require('./index-1dfc7a6e.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
10
  const DataFetcher = require('./DataFetcher-313debd8.js');
11
- const snkDataUnit = require('./snk-data-unit-16791a2f.js');
11
+ const snkDataUnit = require('./snk-data-unit-685272e7.js');
12
12
  require('./pesquisa-fetcher-680e198f.js');
13
13
  require('./ISave-e91b70a7.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
15
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
16
- require('./dataunit-fetcher-0c7106a0.js');
16
+ require('./dataunit-fetcher-688d3f05.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
18
  require('./form-config-fetcher-2dd00e5b.js');
19
19
  require('./PrintUtils-bcaeb82f.js');
@@ -4,7 +4,7 @@ const index = require('./index-f9e81701.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
6
6
  const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
7
- const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
7
+ const dataunitFetcher = require('./dataunit-fetcher-688d3f05.js');
8
8
  const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
9
9
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
10
10
 
@@ -2,12 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkDataUnit = require('./snk-data-unit-16791a2f.js');
5
+ const snkDataUnit = require('./snk-data-unit-685272e7.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
8
  require('@sankhyalabs/ezui/dist/collection/utils');
9
9
  require('./SnkMessageBuilder-722b104e.js');
10
- require('./dataunit-fetcher-0c7106a0.js');
10
+ require('./dataunit-fetcher-688d3f05.js');
11
11
  require('./DataFetcher-313debd8.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-26dfc762.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1b13bacd.js');
8
8
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
9
9
  require('./DataFetcher-313debd8.js');
10
10
  require('./pesquisa-fetcher-680e198f.js');
@@ -12,12 +12,12 @@ const index$1 = require('./index-1dfc7a6e.js');
12
12
  require('./ISave-e91b70a7.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- require('./dataunit-fetcher-0c7106a0.js');
15
+ require('./dataunit-fetcher-688d3f05.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
17
  require('./form-config-fetcher-2dd00e5b.js');
18
18
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
19
19
  const constants = require('./constants-35ddd366.js');
20
- const snkGuidesViewer = require('./snk-guides-viewer-657dc13c.js');
20
+ const snkGuidesViewer = require('./snk-guides-viewer-67605336.js');
21
21
  const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
22
22
  require('./ConfigStorage-942ce74b.js');
23
23
  require('./PrintUtils-bcaeb82f.js');
@@ -227,13 +227,14 @@ const SnkDetailView = class {
227
227
  return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
228
228
  }
229
229
  loadMetadata() {
230
+ var _a;
230
231
  if (!this.dataUnit) {
231
232
  return;
232
233
  }
233
234
  if (!this.formConfigManager.isLoaded) {
234
235
  return;
235
236
  }
236
- const formConfig = this.formConfigManager.getConfig(this.dataUnit);
237
+ const formConfig = this.formConfigManager.getConfig((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode, this.dataUnit);
237
238
  //this._cardsState = formConfig?.cardsState;
238
239
  this._formMetadata = form.buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
239
240
  }
@@ -80,7 +80,7 @@ const SnkFormConfig = class {
80
80
  }
81
81
  }
82
82
  getConfig() {
83
- let config = this.configManager.getConfig(this.dataUnit);
83
+ let config = this.configManager.getConfig(false, this.dataUnit);
84
84
  if (config.fields && config.fields.length === 0) {
85
85
  config = undefined;
86
86
  }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-26dfc762.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1b13bacd.js');
8
8
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
9
9
  require('./ConfigStorage-942ce74b.js');
10
10
  require('./form-config-fetcher-2dd00e5b.js');
@@ -9,14 +9,14 @@ const ConfigStorage = require('./ConfigStorage-942ce74b.js');
9
9
  const index$1 = require('./index-1dfc7a6e.js');
10
10
  const fieldSearch = require('./field-search-f56aa7d6.js');
11
11
  const index$2 = require('./index-102ba62d.js');
12
- const IExporterProvider = require('./IExporterProvider-9479f618.js');
12
+ const IExporterProvider = require('./IExporterProvider-597949f9.js');
13
13
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
14
14
  require('./DataFetcher-313debd8.js');
15
15
  require('./pesquisa-fetcher-680e198f.js');
16
16
  require('./ISave-e91b70a7.js');
17
17
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
18
18
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
19
- require('./dataunit-fetcher-0c7106a0.js');
19
+ require('./dataunit-fetcher-688d3f05.js');
20
20
  require('./filter-item-type.enum-a7ffdaa6.js');
21
21
  require('./form-config-fetcher-2dd00e5b.js');
22
22
  const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
@@ -80,7 +80,7 @@ class ServerSideExporterProvider extends IExporterProvider.CommonsExporter {
80
80
  }
81
81
  }
82
82
 
83
- const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.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}";
83
+ const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--lg)}.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}";
84
84
 
85
85
  const SnkGrid = class {
86
86
  constructor(hostRef) {
@@ -489,7 +489,7 @@ const SnkGrid = class {
489
489
  if (!this._dataUnit) {
490
490
  return undefined;
491
491
  }
492
- return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
492
+ return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
493
493
  index.h(index.Fragment, null, 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 }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.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' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.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 }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, 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 }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
494
494
  }
495
495
  get _element() { return index.getElement(this); }
@@ -2,7 +2,7 @@
2
2
 
3
3
  const index = require('./index-f9e81701.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const SnkFormConfigManager = require('./SnkFormConfigManager-26dfc762.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1b13bacd.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
7
  const fieldSearch = require('./field-search-f56aa7d6.js');
8
8
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
@@ -13,7 +13,7 @@ const index$1 = require('./index-1dfc7a6e.js');
13
13
  require('./ISave-e91b70a7.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
15
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
16
- require('./dataunit-fetcher-0c7106a0.js');
16
+ require('./dataunit-fetcher-688d3f05.js');
17
17
  require('./filter-item-type.enum-a7ffdaa6.js');
18
18
  require('./form-config-fetcher-2dd00e5b.js');
19
19
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
@@ -129,7 +129,7 @@ const SnkGuidesViewer = class {
129
129
  }
130
130
  onContentCardChanged(evt) {
131
131
  SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this._configManager)
132
- .then(() => this.masterFormConfig = this._configManager.getConfig(this.dataUnit));
132
+ .then(() => this.masterFormConfig = this._configManager.getConfig(this.dataState.insertionMode, this.dataUnit));
133
133
  }
134
134
  /**
135
135
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-657dc13c.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-67605336.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-26dfc762.js');
8
+ require('./SnkFormConfigManager-1b13bacd.js');
9
9
  require('./ConfigStorage-942ce74b.js');
10
10
  require('./form-config-fetcher-2dd00e5b.js');
11
11
  require('./DataFetcher-313debd8.js');
@@ -21,7 +21,7 @@ require('./constants-35ddd366.js');
21
21
  require('./pesquisa-fetcher-680e198f.js');
22
22
  require('./ISave-e91b70a7.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
24
- require('./dataunit-fetcher-0c7106a0.js');
24
+ require('./dataunit-fetcher-688d3f05.js');
25
25
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
26
26
  require('@sankhyalabs/core/dist/utils/SortingUtils');
27
27
  require('./ResourceIDUtils-5ff86aa7.js');
@@ -9,17 +9,17 @@ const constants = require('./constants-35ddd366.js');
9
9
  const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
10
10
  require('./DataFetcher-313debd8.js');
11
11
  require('./pesquisa-fetcher-680e198f.js');
12
- const IExporterProvider = require('./IExporterProvider-9479f618.js');
12
+ const IExporterProvider = require('./IExporterProvider-597949f9.js');
13
13
  const index = require('./index-1dfc7a6e.js');
14
14
  require('./ISave-e91b70a7.js');
15
15
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
17
- const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
17
+ const dataunitFetcher = require('./dataunit-fetcher-688d3f05.js');
18
18
  require('./filter-item-type.enum-a7ffdaa6.js');
19
19
  const formConfigFetcher = require('./form-config-fetcher-2dd00e5b.js');
20
20
  const fieldSearch = require('./field-search-f56aa7d6.js');
21
21
  const ConfigStorage = require('./ConfigStorage-942ce74b.js');
22
- const SnkFormConfigManager = require('./SnkFormConfigManager-26dfc762.js');
22
+ const SnkFormConfigManager = require('./SnkFormConfigManager-1b13bacd.js');
23
23
  const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
24
24
  const index$2 = require('./index-102ba62d.js');
25
25
  require('./PrintUtils-bcaeb82f.js');
@@ -752,8 +752,8 @@ const SnkSimpleCrud = class {
752
752
  return core.StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
753
753
  }
754
754
  getFormConfig() {
755
- var _a;
756
- const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig(this.dataUnit, this.ignoreReadOnlyFormFields);
755
+ var _a, _b;
756
+ const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.insertionMode, this.dataUnit, this.ignoreReadOnlyFormFields);
757
757
  if (!this.configName && !configFromManager) {
758
758
  return this.formConfig;
759
759
  }
@@ -158,13 +158,14 @@ export class SnkDetailView {
158
158
  return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
159
159
  }
160
160
  loadMetadata() {
161
+ var _a;
161
162
  if (!this.dataUnit) {
162
163
  return;
163
164
  }
164
165
  if (!this.formConfigManager.isLoaded) {
165
166
  return;
166
167
  }
167
- const formConfig = this.formConfigManager.getConfig(this.dataUnit);
168
+ const formConfig = this.formConfigManager.getConfig((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode, this.dataUnit);
168
169
  //this._cardsState = formConfig?.cardsState;
169
170
  this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
170
171
  }
@@ -113,7 +113,7 @@ export class SnkGuidesViewer {
113
113
  }
114
114
  onContentCardChanged(evt) {
115
115
  SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this._configManager)
116
- .then(() => this.masterFormConfig = this._configManager.getConfig(this.dataUnit));
116
+ .then(() => this.masterFormConfig = this._configManager.getConfig(this.dataState.insertionMode, this.dataUnit));
117
117
  }
118
118
  /**
119
119
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
@@ -73,8 +73,10 @@ export class SnkFormConfigManager {
73
73
  if (fields != undefined && fields.length > 0) {
74
74
  return fields.map(({ label, name, readOnly, visible, required }) => {
75
75
  if (label == undefined) {
76
- const currentField = dataUnit.getField(name);
77
- return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required });
76
+ return Object.assign(Object.assign({}, dataUnit.getField(name)), { name,
77
+ readOnly,
78
+ visible,
79
+ required });
78
80
  }
79
81
  return { name, label, readOnly, visible, required };
80
82
  })
@@ -98,7 +100,7 @@ export class SnkFormConfigManager {
98
100
  const normalizedFilter = StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
99
101
  return normalizedText.includes(normalizedFilter);
100
102
  }
101
- getFormConfig(dataUnit, ignoreReadOnlyFormFields) {
103
+ getInsertionConfig(dataUnit, ignoreReadOnlyFormFields) {
102
104
  let fields = this.getFieldsList(dataUnit);
103
105
  if (ignoreReadOnlyFormFields) {
104
106
  fields = fields.filter(field => {
@@ -130,8 +132,8 @@ export class SnkFormConfigManager {
130
132
  this._onConfigChange(Object.assign({}, this._config));
131
133
  }
132
134
  }
133
- getConfig(dataUnit, ignoreReadOnlyFormFields) {
134
- return this.getFormConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true);
135
+ getConfig(insertionMode, dataUnit, ignoreReadOnlyFormFields) {
136
+ return insertionMode ? this.getInsertionConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true) : Object.assign({}, this._config);
135
137
  }
136
138
  getFormConfigFetcher() {
137
139
  if (this._formConfigFetcher == undefined) {
@@ -67,7 +67,7 @@ export class SnkFormConfig {
67
67
  }
68
68
  }
69
69
  getConfig() {
70
- let config = this.configManager.getConfig(this.dataUnit);
70
+ let config = this.configManager.getConfig(false, this.dataUnit);
71
71
  if (config.fields && config.fields.length === 0) {
72
72
  config = undefined;
73
73
  }
@@ -1,11 +1,13 @@
1
1
  :host {
2
2
  --snk-grid-min-height: 300px;
3
+ --snk-grid-padding: var(--space--lg);
3
4
  }
4
5
 
5
6
  .snk-grid__container {
6
7
  display: flex;
7
8
  height: 100%;
8
9
  width: 100%;
10
+ padding: var(--snk-grid-padding);
9
11
  }
10
12
 
11
13
  .snk-grid__header {
@@ -415,7 +415,7 @@ export class SnkGrid {
415
415
  if (!this._dataUnit) {
416
416
  return undefined;
417
417
  }
418
- 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--medium" }, this._showSnkFilterBar &&
418
+ return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
419
419
  h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
420
420
  }
421
421
  static get is() { return "snk-grid"; }
@@ -672,8 +672,8 @@ export class SnkSimpleCrud {
672
672
  return StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
673
673
  }
674
674
  getFormConfig() {
675
- var _a;
676
- const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig(this.dataUnit, this.ignoreReadOnlyFormFields);
675
+ var _a, _b;
676
+ const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.insertionMode, this.dataUnit, this.ignoreReadOnlyFormFields);
677
677
  if (!this.configName && !configFromManager) {
678
678
  return this.formConfig;
679
679
  }
@@ -22,12 +22,16 @@ export function applySorting(records, dataUnit, sorting) {
22
22
  return records.sort(sortingFunction);
23
23
  }
24
24
  export function buildPaginationInfo(records, offset = 0, limit = 0) {
25
- const lastRecord = Math.min(offset + limit, records === null || records === void 0 ? void 0 : records.length);
25
+ if (records === undefined) {
26
+ return undefined;
27
+ }
28
+ const total = (records === null || records === void 0 ? void 0 : records.length) || 0;
29
+ const lastRecord = Math.min(offset + limit, total);
26
30
  return {
27
31
  currentPage: limit === 0 ? 0 : Math.ceil(offset / limit),
28
32
  firstRecord: offset,
29
33
  lastRecord: lastRecord,
30
- total: records === null || records === void 0 ? void 0 : records.length,
31
- hasMore: !!((records === null || records === void 0 ? void 0 : records.length) - lastRecord),
34
+ total: total,
35
+ hasMore: !!(total - lastRecord),
32
36
  };
33
37
  }
@@ -74,8 +74,10 @@ class SnkFormConfigManager {
74
74
  if (fields != undefined && fields.length > 0) {
75
75
  return fields.map(({ label, name, readOnly, visible, required }) => {
76
76
  if (label == undefined) {
77
- const currentField = dataUnit.getField(name);
78
- return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required });
77
+ return Object.assign(Object.assign({}, dataUnit.getField(name)), { name,
78
+ readOnly,
79
+ visible,
80
+ required });
79
81
  }
80
82
  return { name, label, readOnly, visible, required };
81
83
  })
@@ -99,7 +101,7 @@ class SnkFormConfigManager {
99
101
  const normalizedFilter = StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
100
102
  return normalizedText.includes(normalizedFilter);
101
103
  }
102
- getFormConfig(dataUnit, ignoreReadOnlyFormFields) {
104
+ getInsertionConfig(dataUnit, ignoreReadOnlyFormFields) {
103
105
  let fields = this.getFieldsList(dataUnit);
104
106
  if (ignoreReadOnlyFormFields) {
105
107
  fields = fields.filter(field => {
@@ -131,8 +133,8 @@ class SnkFormConfigManager {
131
133
  this._onConfigChange(Object.assign({}, this._config));
132
134
  }
133
135
  }
134
- getConfig(dataUnit, ignoreReadOnlyFormFields) {
135
- return this.getFormConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true);
136
+ getConfig(insertionMode, dataUnit, ignoreReadOnlyFormFields) {
137
+ return insertionMode ? this.getInsertionConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true) : Object.assign({}, this._config);
136
138
  }
137
139
  getFormConfigFetcher() {
138
140
  if (this._formConfigFetcher == undefined) {
@@ -246,13 +246,17 @@ function applySorting(records, dataUnit, sorting) {
246
246
  return records.sort(sortingFunction);
247
247
  }
248
248
  function buildPaginationInfo(records, offset = 0, limit = 0) {
249
- const lastRecord = Math.min(offset + limit, records === null || records === void 0 ? void 0 : records.length);
249
+ if (records === undefined) {
250
+ return undefined;
251
+ }
252
+ const total = (records === null || records === void 0 ? void 0 : records.length) || 0;
253
+ const lastRecord = Math.min(offset + limit, total);
250
254
  return {
251
255
  currentPage: limit === 0 ? 0 : Math.ceil(offset / limit),
252
256
  firstRecord: offset,
253
257
  lastRecord: lastRecord,
254
- total: records === null || records === void 0 ? void 0 : records.length,
255
- hasMore: !!((records === null || records === void 0 ? void 0 : records.length) - lastRecord),
258
+ total: total,
259
+ hasMore: !!(total - lastRecord),
256
260
  };
257
261
  }
258
262
 
@@ -156,7 +156,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
156
156
  }
157
157
  onContentCardChanged(evt) {
158
158
  SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this._configManager)
159
- .then(() => this.masterFormConfig = this._configManager.getConfig(this.dataUnit));
159
+ .then(() => this.masterFormConfig = this._configManager.getConfig(this.dataState.insertionMode, this.dataUnit));
160
160
  }
161
161
  /**
162
162
  * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
@@ -938,13 +938,14 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
938
938
  return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
939
939
  }
940
940
  loadMetadata() {
941
+ var _a;
941
942
  if (!this.dataUnit) {
942
943
  return;
943
944
  }
944
945
  if (!this.formConfigManager.isLoaded) {
945
946
  return;
946
947
  }
947
- const formConfig = this.formConfigManager.getConfig(this.dataUnit);
948
+ const formConfig = this.formConfigManager.getConfig((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode, this.dataUnit);
948
949
  //this._cardsState = formConfig?.cardsState;
949
950
  this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
950
951
  }
@@ -76,7 +76,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
76
76
  }
77
77
  }
78
78
  getConfig() {
79
- let config = this.configManager.getConfig(this.dataUnit);
79
+ let config = this.configManager.getConfig(false, this.dataUnit);
80
80
  if (config.fields && config.fields.length === 0) {
81
81
  config = undefined;
82
82
  }
@@ -86,7 +86,7 @@ class ServerSideExporterProvider extends CommonsExporter {
86
86
  }
87
87
  }
88
88
 
89
- const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.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}";
89
+ const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--lg)}.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}";
90
90
 
91
91
  const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
92
92
  constructor() {
@@ -496,7 +496,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
496
496
  if (!this._dataUnit) {
497
497
  return undefined;
498
498
  }
499
- 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--medium" }, this._showSnkFilterBar &&
499
+ return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
500
500
  h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
501
501
  }
502
502
  get _element() { return this; }
@@ -753,8 +753,8 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
753
753
  return StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
754
754
  }
755
755
  getFormConfig() {
756
- var _a;
757
- const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig(this.dataUnit, this.ignoreReadOnlyFormFields);
756
+ var _a, _b;
757
+ const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.insertionMode, this.dataUnit, this.ignoreReadOnlyFormFields);
758
758
  if (!this.configName && !configFromManager) {
759
759
  return this.formConfig;
760
760
  }
@@ -5,7 +5,7 @@ import './index-3aa4977a.js';
5
5
  import './ISave-d8c8bc59.js';
6
6
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
7
7
  import { UserInterface as UserInterface$1 } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
8
- import { P as PreloadManager } from './dataunit-fetcher-f7e0ffc0.js';
8
+ import { P as PreloadManager } from './dataunit-fetcher-264191b2.js';
9
9
  import './filter-item-type.enum-d45e026f.js';
10
10
  import './form-config-fetcher-30fb808f.js';
11
11
  import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';