@sankhyalabs/sankhyablocks 8.15.0-dev.30 → 8.15.0-dev.31

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 (123) hide show
  1. package/dist/cjs/SnkMultiSelectionListDataSource-5213120b.js +140 -0
  2. package/dist/cjs/index-f9e81701.js +2 -10
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{pesquisa-fetcher-c416a6b7.js → pesquisa-fetcher-94f6b316.js} +231 -20
  5. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  6. package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +517 -2
  7. package/dist/cjs/snk-application.cjs.entry.js +1 -2
  8. package/dist/cjs/snk-attach.cjs.entry.js +3 -4
  9. package/dist/cjs/snk-crud.cjs.entry.js +2 -3
  10. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -5
  11. package/dist/cjs/snk-form-config.cjs.entry.js +6 -0
  12. package/dist/cjs/snk-form.cjs.entry.js +1 -1
  13. package/dist/cjs/snk-grid.cjs.entry.js +10 -19
  14. package/dist/cjs/{snk-guides-viewer-bd69fce4.js → snk-guides-viewer-c7293cfa.js} +2 -3
  15. package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -4
  16. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
  17. package/dist/cjs/snk-simple-crud.cjs.entry.js +147 -16
  18. package/dist/collection/collection-manifest.json +6 -6
  19. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
  20. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
  21. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
  22. package/dist/collection/components/snk-form/snk-form.js +1 -1
  23. package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +11 -5
  24. package/dist/collection/components/snk-grid/snk-grid.js +5 -16
  25. package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
  26. package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
  27. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +5 -0
  28. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +226 -14
  29. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +1 -8
  30. package/dist/collection/lib/utils/CrudUtils.js +13 -1
  31. package/dist/components/dataunit-fetcher.js +1 -8
  32. package/dist/components/field-search.js +93 -3
  33. package/dist/components/index.d.ts +6 -6
  34. package/dist/components/snk-attach2.js +54 -12
  35. package/dist/components/snk-detail-view2.js +29 -4
  36. package/dist/components/snk-form-config2.js +7 -1
  37. package/dist/components/snk-grid-config2.js +128 -102
  38. package/dist/components/snk-grid2.js +10 -17
  39. package/dist/components/snk-personalized-filter-editor.js +3 -1
  40. package/dist/components/snk-simple-crud2.js +204 -24
  41. package/dist/esm/SnkMultiSelectionListDataSource-7e7eada5.js +133 -0
  42. package/dist/esm/index-a7d3d3f1.js +2 -10
  43. package/dist/esm/loader.js +1 -1
  44. package/dist/esm/{pesquisa-fetcher-ab16a2e8.js → pesquisa-fetcher-f05a12ca.js} +222 -12
  45. package/dist/esm/sankhyablocks.js +1 -1
  46. package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +516 -3
  47. package/dist/esm/snk-application.entry.js +1 -2
  48. package/dist/esm/snk-attach.entry.js +2 -3
  49. package/dist/esm/snk-crud.entry.js +2 -3
  50. package/dist/esm/snk-detail-view.entry.js +4 -5
  51. package/dist/esm/snk-form-config.entry.js +7 -1
  52. package/dist/esm/snk-form.entry.js +1 -1
  53. package/dist/esm/snk-grid.entry.js +11 -20
  54. package/dist/esm/{snk-guides-viewer-fde82cc1.js → snk-guides-viewer-47443f7c.js} +2 -3
  55. package/dist/esm/snk-guides-viewer.entry.js +3 -4
  56. package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
  57. package/dist/esm/snk-simple-crud.entry.js +148 -17
  58. package/dist/sankhyablocks/p-2897fb8c.js +1 -0
  59. package/dist/sankhyablocks/p-30735d1e.entry.js +1 -0
  60. package/dist/sankhyablocks/p-3c5b7cfc.entry.js +1 -0
  61. package/dist/sankhyablocks/p-6ae58da0.js +1 -0
  62. package/dist/sankhyablocks/{p-fcdcb0e2.entry.js → p-746fc99e.entry.js} +1 -1
  63. package/dist/sankhyablocks/p-99b1926b.entry.js +1 -0
  64. package/dist/sankhyablocks/p-9fb97691.entry.js +1 -0
  65. package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
  66. package/dist/sankhyablocks/p-b281e9e9.entry.js +1 -0
  67. package/dist/sankhyablocks/p-d78d4062.js +65 -0
  68. package/dist/sankhyablocks/{p-fd0a8d68.entry.js → p-ec18c04e.entry.js} +3 -3
  69. package/dist/sankhyablocks/p-eefe9954.entry.js +1 -0
  70. package/dist/sankhyablocks/p-fca66dda.entry.js +1 -0
  71. package/dist/sankhyablocks/p-fe741404.entry.js +1 -0
  72. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  73. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
  74. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +1 -1
  75. package/dist/types/components/snk-form/snk-form.d.ts +1 -1
  76. package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +4 -3
  77. package/dist/types/components/snk-grid/snk-grid.d.ts +0 -1
  78. package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
  79. package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
  80. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +46 -1
  81. package/dist/types/components.d.ts +26 -10
  82. package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
  83. package/package.json +1 -1
  84. package/dist/cjs/PreloadManager-84466da6.js +0 -224
  85. package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
  86. package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
  87. package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
  88. package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
  89. package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
  90. package/dist/esm/snk-grid-config.entry.js +0 -479
  91. package/dist/esm/snk-select-box.entry.js +0 -21
  92. package/dist/sankhyablocks/p-094c30cb.js +0 -1
  93. package/dist/sankhyablocks/p-0b0b36ac.entry.js +0 -1
  94. package/dist/sankhyablocks/p-11ad137d.entry.js +0 -1
  95. package/dist/sankhyablocks/p-57212bb5.js +0 -1
  96. package/dist/sankhyablocks/p-5f5b58b6.entry.js +0 -1
  97. package/dist/sankhyablocks/p-84bb8f47.entry.js +0 -1
  98. package/dist/sankhyablocks/p-91b7f78a.entry.js +0 -1
  99. package/dist/sankhyablocks/p-98674137.entry.js +0 -1
  100. package/dist/sankhyablocks/p-b7004423.entry.js +0 -1
  101. package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
  102. package/dist/sankhyablocks/p-c6247955.js +0 -65
  103. package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
  104. package/dist/sankhyablocks/p-d4802f81.entry.js +0 -1
  105. package/dist/sankhyablocks/p-e3bd000e.entry.js +0 -1
  106. package/dist/sankhyablocks/p-fb842329.entry.js +0 -1
  107. /package/dist/cjs/{SnkFormConfigManager-3621bfc4.js → SnkFormConfigManager-0ffd098d.js} +0 -0
  108. /package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +0 -0
  109. /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
  110. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
  111. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
  112. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
  113. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
  114. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
  115. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
  116. /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
  117. /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
  118. /package/dist/esm/{SnkFormConfigManager-692e20c7.js → SnkFormConfigManager-dd450734.js} +0 -0
  119. /package/dist/sankhyablocks/{p-725d04ba.js → p-9ea14b61.js} +0 -0
  120. /package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +0 -0
  121. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
  122. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
  123. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
@@ -8,14 +8,13 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const ConfigStorage = require('./ConfigStorage-d4c99a5e.js');
9
9
  const DataFetcher = require('./DataFetcher-99f0f6ed.js');
10
10
  const authFetcher = require('./auth-fetcher-5161d082.js');
11
- const pesquisaFetcher = require('./pesquisa-fetcher-c416a6b7.js');
11
+ const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
12
12
  const SnkMessageBuilder = require('./SnkMessageBuilder-e7dcf408.js');
13
13
  require('./form-config-fetcher-9f1a13ca.js');
14
14
  require('./filter-item-type.enum-a7ffdaa6.js');
15
15
  require('./PrintUtils-bcaeb82f.js');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
17
17
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
18
- require('./PreloadManager-84466da6.js');
19
18
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
20
19
  require('./ResourceIDUtils-5ff86aa7.js');
21
20
 
@@ -5,20 +5,19 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const DataFetcher = require('./DataFetcher-99f0f6ed.js');
8
- const pesquisaFetcher = require('./pesquisa-fetcher-c416a6b7.js');
8
+ const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
9
9
  require('./index-0922807b.js');
10
10
  const ISave = require('./ISave-e91b70a7.js');
11
11
  require('./filter-item-type.enum-a7ffdaa6.js');
12
12
  require('./form-config-fetcher-9f1a13ca.js');
13
13
  const constants = require('./constants-35ddd366.js');
14
- const PreloadManager = require('./PreloadManager-84466da6.js');
15
14
  const authFetcher = require('./auth-fetcher-5161d082.js');
16
15
  const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
17
16
  require('./PrintUtils-bcaeb82f.js');
18
17
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
19
18
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
20
- require('./ResourceIDUtils-5ff86aa7.js');
21
19
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
20
+ require('./ResourceIDUtils-5ff86aa7.js');
22
21
  require('./index-102ba62d.js');
23
22
 
24
23
  const SERVICE$1 = {
@@ -314,7 +313,7 @@ class AnexoSistemaDataUnitFactory {
314
313
  const { records } = dataUnit.getSelectionInfo();
315
314
  const recordToDelete = records[0];
316
315
  fetcher.delete(recordToDelete).then(() => {
317
- PreloadManager.PreloadManager.removeRecords(dataUnit, [recordToDelete]);
316
+ pesquisaFetcher.PreloadManager.removeRecords(dataUnit, [recordToDelete]);
318
317
  return resolve(ids);
319
318
  });
320
319
  });
@@ -6,20 +6,19 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
8
8
  require('./DataFetcher-99f0f6ed.js');
9
- require('./pesquisa-fetcher-c416a6b7.js');
9
+ require('./pesquisa-fetcher-94f6b316.js');
10
10
  const index$1 = require('./index-0922807b.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('./PreloadManager-84466da6.js');
15
14
  require('./filter-item-type.enum-a7ffdaa6.js');
16
15
  require('./form-config-fetcher-9f1a13ca.js');
17
16
  const constants = require('./constants-35ddd366.js');
18
17
  const authFetcher = require('./auth-fetcher-5161d082.js');
19
18
  require('./index-102ba62d.js');
20
19
  require('./PrintUtils-bcaeb82f.js');
21
- require('./ResourceIDUtils-5ff86aa7.js');
22
20
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
21
+ require('./ResourceIDUtils-5ff86aa7.js');
23
22
 
24
23
  const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
25
24
 
@@ -4,25 +4,24 @@ 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-3621bfc4.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-0ffd098d.js');
8
8
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
9
9
  require('./DataFetcher-99f0f6ed.js');
10
- require('./pesquisa-fetcher-c416a6b7.js');
10
+ require('./pesquisa-fetcher-94f6b316.js');
11
11
  const index$1 = require('./index-0922807b.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('./PreloadManager-84466da6.js');
16
15
  require('./filter-item-type.enum-a7ffdaa6.js');
17
16
  require('./form-config-fetcher-9f1a13ca.js');
18
17
  const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
19
18
  const constants = require('./constants-35ddd366.js');
20
- const snkGuidesViewer = require('./snk-guides-viewer-bd69fce4.js');
19
+ const snkGuidesViewer = require('./snk-guides-viewer-c7293cfa.js');
21
20
  const SnkMessageBuilder = require('./SnkMessageBuilder-e7dcf408.js');
22
21
  require('./ConfigStorage-d4c99a5e.js');
23
22
  require('./PrintUtils-bcaeb82f.js');
24
- require('./ResourceIDUtils-5ff86aa7.js');
25
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
24
+ require('./ResourceIDUtils-5ff86aa7.js');
26
25
  require('./index-102ba62d.js');
27
26
  require('./field-search-f56aa7d6.js');
28
27
  require('@sankhyalabs/core/dist/dataunit/DataUnit');
@@ -942,6 +942,12 @@ const SnkFormConfig = class {
942
942
  this.controlSortableField();
943
943
  this.controlSortableGroup();
944
944
  }
945
+ async componentWillRender() {
946
+ if (this.messagesBuilder == undefined) {
947
+ const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
948
+ this.messagesBuilder = application.messagesBuilder;
949
+ }
950
+ }
945
951
  componentWillLoad() {
946
952
  this.loadConfig();
947
953
  }
@@ -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-3621bfc4.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-0ffd098d.js');
8
8
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
9
9
  require('./ConfigStorage-d4c99a5e.js');
10
10
  require('./form-config-fetcher-9f1a13ca.js');
@@ -10,15 +10,18 @@ const ConfigStorage = require('./ConfigStorage-d4c99a5e.js');
10
10
  const index$1 = require('./index-0922807b.js');
11
11
  const fieldSearch = require('./field-search-f56aa7d6.js');
12
12
  const index$2 = require('./index-102ba62d.js');
13
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-ba5838c2.js');
13
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-5213120b.js');
14
14
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
15
- require('./form-config-fetcher-9f1a13ca.js');
16
15
  require('./DataFetcher-99f0f6ed.js');
17
- require('./PrintUtils-bcaeb82f.js');
16
+ require('./pesquisa-fetcher-94f6b316.js');
17
+ require('./ISave-e91b70a7.js');
18
+ require('@sankhyalabs/ezui/dist/collection/utils/constants');
18
19
  require('./filter-item-type.enum-a7ffdaa6.js');
20
+ require('./form-config-fetcher-9f1a13ca.js');
19
21
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
20
- require('./PreloadManager-84466da6.js');
22
+ require('./PrintUtils-bcaeb82f.js');
21
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
24
+ require('./ResourceIDUtils-5ff86aa7.js');
22
25
 
23
26
  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}";
24
27
 
@@ -127,19 +130,7 @@ const SnkGrid = class {
127
130
  }
128
131
  setGridConfig(config) {
129
132
  this._gridConfig = config;
130
- this.assertDefaultSorting();
131
- }
132
- assertDefaultSorting() {
133
- if (this._gridConfig && this._dataUnit) {
134
- this._dataUnit.defaultSorting = this._gridConfig
135
- .columns
136
- .filter(col => col.ascending != undefined)
137
- .sort((colA, colB) => colA.orderIndex - colB.orderIndex)
138
- .map(({ name: field, ascending }) => {
139
- const { dataType } = this._dataUnit.getField(field);
140
- return { field, dataType, mode: ascending ? UnitMetadata.SortMode.ASC : UnitMetadata.SortMode.DESC };
141
- });
142
- }
133
+ SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
143
134
  }
144
135
  loadConfig() {
145
136
  ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this.resourceID)
@@ -265,7 +256,7 @@ const SnkGrid = class {
265
256
  core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
266
257
  }
267
258
  finshLoading() {
268
- this.assertDefaultSorting();
259
+ SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
269
260
  this.addElementID();
270
261
  if (this.columnFilterDataSource != undefined) {
271
262
  this.columnFilterDataSource.setApplication(this._application);
@@ -417,7 +408,7 @@ const SnkGrid = class {
417
408
  return undefined;
418
409
  }
419
410
  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 &&
420
- 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 }), 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 }, 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), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
411
+ 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 }), 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 }, 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 }))));
421
412
  }
422
413
  get _element() { return index.getElement(this); }
423
414
  };
@@ -2,18 +2,17 @@
2
2
 
3
3
  const index = require('./index-f9e81701.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const SnkFormConfigManager = require('./SnkFormConfigManager-3621bfc4.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-0ffd098d.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-1e4fb2e0.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
10
  require('./DataFetcher-99f0f6ed.js');
11
- require('./pesquisa-fetcher-c416a6b7.js');
11
+ require('./pesquisa-fetcher-94f6b316.js');
12
12
  const index$1 = require('./index-0922807b.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('./PreloadManager-84466da6.js');
17
16
  require('./filter-item-type.enum-a7ffdaa6.js');
18
17
  require('./form-config-fetcher-9f1a13ca.js');
19
18
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-bd69fce4.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-c7293cfa.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-3621bfc4.js');
8
+ require('./SnkFormConfigManager-0ffd098d.js');
9
9
  require('./ConfigStorage-d4c99a5e.js');
10
10
  require('./form-config-fetcher-9f1a13ca.js');
11
11
  require('./DataFetcher-99f0f6ed.js');
@@ -18,9 +18,8 @@ require('./taskbar-elements-1e4fb2e0.js');
18
18
  require('./index-0922807b.js');
19
19
  require('./index-102ba62d.js');
20
20
  require('./constants-35ddd366.js');
21
- require('./pesquisa-fetcher-c416a6b7.js');
21
+ require('./pesquisa-fetcher-94f6b316.js');
22
22
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
23
- require('./PreloadManager-84466da6.js');
24
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
25
24
  require('./ResourceIDUtils-5ff86aa7.js');
26
25
  require('./ISave-e91b70a7.js');
@@ -67,8 +67,10 @@ const SnkFilterPersonalized = class {
67
67
  return this.presentationMode === presentationMode.EPresentationMode.MODAL;
68
68
  }
69
69
  doSearch(mode, argument, param) {
70
+ const context = Object.assign({}, param.searchContext);
71
+ context.searchOptions = Object.assign(Object.assign({}, context.searchOptions), { showInactives: "true" });
70
72
  return new Promise((resolve, reject) => {
71
- this._application.executePreparedSearch(mode, argument, param.searchContext)
73
+ this._application.executePreparedSearch(mode, argument, context)
72
74
  .then(result => {
73
75
  resolve(result);
74
76
  }).catch(reason => {
@@ -7,23 +7,24 @@ const core = require('@sankhyalabs/core');
7
7
  const constants = require('./constants-35ddd366.js');
8
8
  const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
9
9
  require('./DataFetcher-99f0f6ed.js');
10
- const pesquisaFetcher = require('./pesquisa-fetcher-c416a6b7.js');
10
+ const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
11
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-5213120b.js');
11
12
  const index$1 = require('./index-0922807b.js');
12
13
  require('./ISave-e91b70a7.js');
13
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- require('./PreloadManager-84466da6.js');
16
16
  require('./filter-item-type.enum-a7ffdaa6.js');
17
17
  require('./form-config-fetcher-9f1a13ca.js');
18
18
  const fieldSearch = require('./field-search-f56aa7d6.js');
19
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-ba5838c2.js');
19
+ const ConfigStorage = require('./ConfigStorage-d4c99a5e.js');
20
+ const SnkFormConfigManager = require('./SnkFormConfigManager-0ffd098d.js');
20
21
  require('./index-102ba62d.js');
21
22
  require('./PrintUtils-bcaeb82f.js');
22
- require('./ResourceIDUtils-5ff86aa7.js');
23
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
24
+ require('./ResourceIDUtils-5ff86aa7.js');
24
25
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
25
26
 
26
- const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:max-content;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
27
+ const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:max-content;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
27
28
 
28
29
  const SnkSimpleCrud = class {
29
30
  constructor(hostRef) {
@@ -32,20 +33,25 @@ const SnkSimpleCrud = class {
32
33
  this.dataUnitReady = index.createEvent(this, "dataUnitReady", 3);
33
34
  this.actionClick = index.createEvent(this, "actionClick", 7);
34
35
  this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
36
+ this.configuratorSave = index.createEvent(this, "configuratorSave", 7);
37
+ this.configuratorCancel = index.createEvent(this, "configuratorCancel", 7);
35
38
  this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
36
39
  this.REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
37
40
  this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
38
41
  this._keyDownHandler = (event) => this.keyDownListener(event);
39
42
  this._taskbarProcessor = new fieldSearch.TaskbarProcessor({
40
- "snkSimpleCrudTaskbar.form_regular": this.resolveInMemoryBtns(this.REGULAR_DEFAULT_BTNS).concat(taskbarElements.TaskbarElement.GRID_MODE),
41
- "snkSimpleCrudTaskbar.grid_regular": this.resolveInMemoryBtns(this.REGULAR_DEFAULT_BTNS).concat(taskbarElements.TaskbarElement.FORM_MODE),
42
- "snkSimpleCrudTaskbar.form_selected": this.resolveInMemoryBtns(this.REGULAR_SELECTED_BTNS).concat(taskbarElements.TaskbarElement.GRID_MODE),
43
- "snkSimpleCrudTaskbar.grid_selected": this.resolveInMemoryBtns(this.REGULAR_SELECTED_BTNS).concat(taskbarElements.TaskbarElement.FORM_MODE),
43
+ "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, taskbarElements.TaskbarElement.GRID_MODE),
44
+ "snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, taskbarElements.TaskbarElement.FORM_MODE),
45
+ "snkSimpleCrudTaskbar.form_selected": this.getButtons(true, taskbarElements.TaskbarElement.GRID_MODE),
46
+ "snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, taskbarElements.TaskbarElement.FORM_MODE),
44
47
  "snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
45
48
  });
49
+ this._showPopUpGridConfig = false;
50
+ this._showFormConfig = false;
46
51
  this._currentViewMode = constants.VIEW_MODE.GRID;
47
52
  this._config = undefined;
48
53
  this._fieldToGetFocus = undefined;
54
+ this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
49
55
  this.dataState = undefined;
50
56
  this.dataUnit = undefined;
51
57
  this.mode = constants.SIMPLE_CRUD_MODE.SERVER;
@@ -59,6 +65,20 @@ const SnkSimpleCrud = class {
59
65
  this.useEnterLikeTab = false;
60
66
  this.actionsList = undefined;
61
67
  this.configName = undefined;
68
+ this.showConfiguratorButtons = undefined;
69
+ }
70
+ getButtons(selected, changeModeBtn) {
71
+ return this.addConfigButton(this.resolveInMemoryBtns(selected ? this.REGULAR_DEFAULT_BTNS : this.REGULAR_SELECTED_BTNS)
72
+ .concat(changeModeBtn));
73
+ }
74
+ addConfigButton(buttons) {
75
+ if (this.configName === undefined) {
76
+ return buttons;
77
+ }
78
+ return buttons.concat(taskbarElements.TaskbarElement.CONFIGURATOR);
79
+ }
80
+ get application() {
81
+ return core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
62
82
  }
63
83
  resolveInMemoryBtns(taskbarButtons) {
64
84
  const newTaskBarConfig = [...taskbarButtons];
@@ -78,7 +98,10 @@ const SnkSimpleCrud = class {
78
98
  }
79
99
  actionClickListener(evt) {
80
100
  const act = evt.detail;
81
- if (act === taskbarElements.TaskbarElement.GRID_MODE) {
101
+ if (act === taskbarElements.TaskbarElement.CONFIGURATOR) {
102
+ this._snkConfigurator.open();
103
+ }
104
+ else if (act === taskbarElements.TaskbarElement.GRID_MODE) {
82
105
  this.goToView(constants.VIEW_MODE.GRID);
83
106
  }
84
107
  else if (act === taskbarElements.TaskbarElement.FORM_MODE) {
@@ -96,8 +119,64 @@ const SnkSimpleCrud = class {
96
119
  this.dataStateChange.emit(newValue);
97
120
  }
98
121
  }
99
- componentWillRender() {
122
+ openConfig(viewMode) {
123
+ this._snkConfigurator.close();
124
+ if (viewMode === constants.VIEW_MODE.GRID) {
125
+ this.openGridConfig();
126
+ }
127
+ else if (viewMode === constants.VIEW_MODE.FORM) {
128
+ this.openFormConfig();
129
+ }
130
+ }
131
+ openGridConfig() {
132
+ this._grid.getColumnsState()
133
+ .then((gridColumns) => {
134
+ this._snkGridConfig.columns = gridColumns.filter(c => c.name);
135
+ this._snkGridConfig.selectedIndex = 0;
136
+ this._showPopUpGridConfig = true;
137
+ });
138
+ }
139
+ openFormConfig() {
140
+ this._showFormConfig = true;
141
+ }
142
+ loadGridConfig() {
143
+ if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
144
+ return;
145
+ }
146
+ this._gridConfigAlreadyLoaded = true;
147
+ return new Promise((accept, reject) => {
148
+ ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this._resourceID)
149
+ .then(config => {
150
+ this.setGridConfig(config);
151
+ accept();
152
+ })
153
+ .catch(reason => {
154
+ reject(reason);
155
+ });
156
+ });
157
+ }
158
+ async loadFormConfig() {
159
+ if (this._formConfigManager == undefined) {
160
+ this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this._resourceID);
161
+ this._formConfigManager.setConfig(this.formConfig);
162
+ }
163
+ if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
164
+ return;
165
+ }
166
+ this._formConfigAlreadyLoaded = true;
167
+ this.setFormConfig(await this._formConfigManager.loadConfig());
168
+ }
169
+ async componentWillRender() {
170
+ this._resourceID = await this.application.getResourceID();
100
171
  this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
172
+ if (this.configName === undefined) {
173
+ return;
174
+ }
175
+ if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
176
+ return;
177
+ }
178
+ this.loadGridConfig();
179
+ this.loadFormConfig();
101
180
  }
102
181
  componentWillLoad() {
103
182
  this.processMetadata();
@@ -105,8 +184,7 @@ const SnkSimpleCrud = class {
105
184
  this.configDatasource();
106
185
  }
107
186
  configDatasource() {
108
- const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
109
- this._multiSelectionListDataSource.setApplication(application);
187
+ this._multiSelectionListDataSource.setApplication(this.application);
110
188
  this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
111
189
  }
112
190
  getTaskBarId() {
@@ -147,6 +225,20 @@ const SnkSimpleCrud = class {
147
225
  getRecords() {
148
226
  return Promise.resolve(this.dataUnit.records);
149
227
  }
228
+ /**
229
+ * Usado para abrir o configurator do CRUD
230
+ */
231
+ async openConfigurator() {
232
+ var _a;
233
+ (_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
234
+ }
235
+ /**
236
+ * Usado para fechar o configurator do CRUD
237
+ */
238
+ async closeConfigurator() {
239
+ var _a;
240
+ (_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
241
+ }
150
242
  processMetadata() {
151
243
  const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
152
244
  const fieldMetadata = [];
@@ -201,6 +293,14 @@ const SnkSimpleCrud = class {
201
293
  this.dataUnit.clearSelection();
202
294
  }
203
295
  }
296
+ handleConfiguratorEvent(evt, type) {
297
+ evt.stopImmediatePropagation();
298
+ if (type === 'SAVE') {
299
+ this.configuratorSave.emit();
300
+ return;
301
+ }
302
+ this.configuratorCancel.emit();
303
+ }
204
304
  getColumnSearch(actionButton, item) {
205
305
  if (this._columnSearch != undefined) {
206
306
  return this._columnSearch;
@@ -314,11 +414,42 @@ const SnkSimpleCrud = class {
314
414
  disconnectedCallback() {
315
415
  window.removeEventListener("keydown", this._keyDownHandler);
316
416
  }
417
+ gridConfigChangeHandler(evt) {
418
+ const config = evt.detail;
419
+ ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this._resourceID);
420
+ evt.stopPropagation();
421
+ }
422
+ modalConfigChangeHandler(evt) {
423
+ const config = evt.detail;
424
+ this._grid.setColumnsState(config.columns)
425
+ .then(() => {
426
+ this.setGridConfig(config);
427
+ this.closeGridConfig();
428
+ });
429
+ evt.stopPropagation();
430
+ }
431
+ setGridConfig(config) {
432
+ this.gridConfig = config;
433
+ SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
434
+ }
435
+ setFormConfig(config) {
436
+ this.formConfig = config;
437
+ }
438
+ closeGridConfig() {
439
+ this._showPopUpGridConfig = false;
440
+ }
441
+ closeFormConfig() {
442
+ this._showFormConfig = false;
443
+ }
444
+ /* istanbul ignore next */
317
445
  render() {
318
- var _a;
319
- return (index.h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index.h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: index$1.PresentationMode.SECONDARY }, index.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), columnfilterDataSource: this.dataUnit.name.includes(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
446
+ var _a, _b, _c;
447
+ if (this.dataUnit == undefined) {
448
+ return;
449
+ }
450
+ return (index.h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index.h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: index$1.PresentationMode.SECONDARY }, index.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
320
451
  ? undefined
321
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.h("ez-form", { class: "ez-margin-top--large", dataUnit: this.dataUnit, config: this.formConfig, fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }))))));
452
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.h("ez-form", { class: `ez-margin-top--large ${this._showFormConfig ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this._showFormConfig && index.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this._customContainerId })), index.h("div", { id: `${this._customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }))), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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 }))));
322
453
  }
323
454
  get _element() { return index.getElement(this); }
324
455
  static get watchers() { return {
@@ -6,7 +6,6 @@
6
6
  "./components/snk-taskbar/snk-taskbar.js",
7
7
  "./components/snk-filter-bar/filter-list/snk-filter-list.js",
8
8
  "./components/snk-print-selector/snk-print-selector.js",
9
- "./components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js",
10
9
  "./components/snk-actions-button/snk-actions-button.js",
11
10
  "./components/snk-actions-button/subcomponents/snk-actions-form.js",
12
11
  "./components/snk-actions-button/subcomponents/snk-client-confirm.js",
@@ -35,12 +34,13 @@
35
34
  "./components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js",
36
35
  "./components/snk-filter-field-search/snk-filter-field-search.js",
37
36
  "./components/snk-form/snk-form.js",
38
- "./components/snk-form/subcomponents/snk-config-options/snk-config-options.js",
39
- "./components/snk-form/subcomponents/snk-field-config/snk-field-config.js",
40
- "./components/snk-form/subcomponents/snk-form-config/snk-form-config.js",
37
+ "./components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js",
38
+ "./components/snk-form-config/snk-form-config.js",
39
+ "./components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js",
40
+ "./components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js",
41
41
  "./components/snk-grid/snk-grid.js",
42
- "./components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js",
43
- "./components/snk-grid/subcomponents/snk-select-box/snk-select-box.js",
42
+ "./components/snk-grid-config/snk-grid-config.js",
43
+ "./components/snk-grid-config/snk-select-box/snk-select-box.js",
44
44
  "./components/snk-personalized-filter/snk-personalized-filter.js",
45
45
  "./components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js",
46
46
  "./components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js",
@@ -1,6 +1,6 @@
1
1
  import { Action } from '@sankhyalabs/core';
2
2
  import { Host, forceUpdate, h } from '@stencil/core';
3
- import { SnkFormConfigManager } from '../../../snk-form/SnkFormConfigManager';
3
+ import { SnkFormConfigManager } from '../../../snk-form-config/SnkFormConfigManager';
4
4
  import { buildFormMetadata } from "@sankhyalabs/ezui/dist/collection/utils/form";
5
5
  import { PresentationMode } from '../../../../lib';
6
6
  import { TaskbarElement } from '../../../snk-taskbar/elements/taskbar-elements';
@@ -236,7 +236,7 @@ export class SnkDetailView {
236
236
  "references": {
237
237
  "SnkFormConfigManager": {
238
238
  "location": "import",
239
- "path": "../../../snk-form/SnkFormConfigManager"
239
+ "path": "../../../snk-form-config/SnkFormConfigManager"
240
240
  }
241
241
  }
242
242
  },
@@ -1,6 +1,6 @@
1
1
  import { Action as DUAction, ElementIDUtils } from '@sankhyalabs/core';
2
2
  import { Fragment, h } from '@stencil/core';
3
- import { SnkFormConfigManager } from '../../snk-form/SnkFormConfigManager';
3
+ import { SnkFormConfigManager } from '../../snk-form-config/SnkFormConfigManager';
4
4
  import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import TaskbarProcessor from '../../snk-taskbar/processor/taskbar-processor';
6
6
  import { TaskbarElement } from '../../snk-taskbar/elements/taskbar-elements';
@@ -55,8 +55,10 @@ export class SnkFilterPersonalized {
55
55
  return this.presentationMode === EPresentationMode.MODAL;
56
56
  }
57
57
  doSearch(mode, argument, param) {
58
+ const context = Object.assign({}, param.searchContext);
59
+ context.searchOptions = Object.assign(Object.assign({}, context.searchOptions), { showInactives: "true" });
58
60
  return new Promise((resolve, reject) => {
59
- this._application.executePreparedSearch(mode, argument, param.searchContext)
61
+ this._application.executePreparedSearch(mode, argument, context)
60
62
  .then(result => {
61
63
  resolve(result);
62
64
  }).catch(reason => {
@@ -1,6 +1,6 @@
1
1
  import { ElementIDUtils } from '@sankhyalabs/core';
2
2
  import { h } from '@stencil/core';
3
- import { SnkFormConfigManager } from './SnkFormConfigManager';
3
+ import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
4
4
  import ResourceIDUtils from '../../lib/resourceid/ResourceIDUtils';
5
5
  export class SnkForm {
6
6
  constructor() {