@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-kb-85616.0 → 0.0.0-bugfix-dev-KB-81596.1

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 (186) hide show
  1. package/dist/cjs/{ClientSideExporterProvider-9bd6fa5a.js → ClientSideExporterProvider-5fff8770.js} +20 -25
  2. package/dist/cjs/{ConfigStorage-6b633b10.js → ConfigStorage-df09fb78.js} +2 -2
  3. package/dist/cjs/{DataFetcher-875371e9.js → DataFetcher-1afdb18e.js} +14 -2
  4. package/dist/cjs/{pesquisa-fetcher-30cab386.js → ISave-c76e2c51.js} +35 -3
  5. package/dist/cjs/{SnkFormConfigManager-d680be08.js → SnkFormConfigManager-45a8d7b7.js} +3 -3
  6. package/dist/cjs/{auth-fetcher-24ba4135.js → auth-fetcher-1687ac0a.js} +1 -1
  7. package/dist/cjs/{constants-241934b3.js → constants-77c1b8bd.js} +1 -0
  8. package/dist/cjs/{dataunit-fetcher-b95768e8.js → dataunit-fetcher-4a5d491a.js} +7 -6
  9. package/dist/cjs/{form-config-fetcher-e0a512c3.js → form-config-fetcher-40d3f752.js} +15 -1
  10. package/dist/cjs/index-f9e81701.js +2 -2
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +6 -7
  13. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  14. package/dist/cjs/{snk-actions-button_5.cjs.entry.js → snk-actions-button_7.cjs.entry.js} +68 -7
  15. package/dist/cjs/snk-application.cjs.entry.js +176 -13
  16. package/dist/cjs/snk-attach.cjs.entry.js +6 -7
  17. package/dist/cjs/snk-config-options_3.cjs.entry.js +10 -8
  18. package/dist/cjs/snk-configurator.cjs.entry.js +9 -2
  19. package/dist/cjs/snk-crud.cjs.entry.js +8 -8
  20. package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -7
  21. package/dist/cjs/{snk-data-unit-33937ffe.js → snk-data-unit-4b510d6e.js} +1 -1
  22. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  23. package/dist/cjs/snk-detail-view.cjs.entry.js +11 -11
  24. package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
  25. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
  26. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  27. package/dist/cjs/snk-filter-search.cjs.entry.js +18 -5
  28. package/dist/cjs/snk-grid.cjs.entry.js +7 -8
  29. package/dist/cjs/{snk-guides-viewer-65964889.js → snk-guides-viewer-e8e5f7b4.js} +7 -8
  30. package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -9
  31. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  32. package/dist/cjs/snk-pesquisa.cjs.entry.js +12 -13
  33. package/dist/cjs/snk-simple-crud.cjs.entry.js +10 -10
  34. package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
  35. package/dist/collection/collection-manifest.json +2 -0
  36. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +5 -2
  37. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +107 -0
  38. package/dist/collection/components/snk-application/snk-application.js +126 -4
  39. package/dist/collection/components/snk-configurator/snk-configurator.js +26 -1
  40. package/dist/collection/components/snk-crud/snk-crud.js +20 -1
  41. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css +10 -1
  42. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +25 -1
  43. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
  44. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +15 -19
  45. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +18 -5
  46. package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js +5 -3
  47. package/dist/collection/components/snk-grid-config/snk-grid-config.js +2 -0
  48. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.css +3 -0
  49. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +73 -0
  50. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.css +78 -0
  51. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +57 -0
  52. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +20 -1
  53. package/dist/collection/lib/configs/LayoutFormConfig.js +25 -0
  54. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +14 -2
  55. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +6 -5
  56. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +14 -0
  57. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +26 -2
  58. package/dist/collection/lib/utils/constants.js +1 -0
  59. package/dist/components/ContinuousInsertUtils.js +15 -19
  60. package/dist/components/DataFetcher.js +14 -2
  61. package/dist/components/ISave.js +26 -2
  62. package/dist/components/constants.js +1 -0
  63. package/dist/components/dataunit-fetcher.js +6 -5
  64. package/dist/components/form-config-fetcher.js +14 -0
  65. package/dist/components/index.d.ts +2 -0
  66. package/dist/components/index.js +2 -0
  67. package/dist/components/snk-application2.js +174 -6
  68. package/dist/components/snk-attach2.js +34 -22
  69. package/dist/components/snk-config-options2.js +5 -3
  70. package/dist/components/snk-configurator2.js +22 -2
  71. package/dist/components/snk-crud.js +76 -62
  72. package/dist/components/snk-detail-view2.js +110 -86
  73. package/dist/components/snk-filter-search.js +18 -5
  74. package/dist/components/snk-grid-config2.js +2 -0
  75. package/dist/components/snk-layout-form-config.d.ts +11 -0
  76. package/dist/components/snk-layout-form-config.js +6 -0
  77. package/dist/components/snk-layout-form-config2.js +73 -0
  78. package/dist/components/snk-simple-crud2.js +33 -19
  79. package/dist/components/snk-view-representation.d.ts +11 -0
  80. package/dist/components/snk-view-representation.js +6 -0
  81. package/dist/components/snk-view-representation2.js +41 -0
  82. package/dist/esm/{ClientSideExporterProvider-e42c5a48.js → ClientSideExporterProvider-da9935ed.js} +20 -25
  83. package/dist/esm/{ConfigStorage-e5c1f4c0.js → ConfigStorage-71e6766f.js} +2 -2
  84. package/dist/esm/{DataFetcher-ecf5f903.js → DataFetcher-88e56266.js} +14 -2
  85. package/dist/esm/{pesquisa-fetcher-e26c3295.js → ISave-5efafc97.js} +36 -4
  86. package/dist/esm/{SnkFormConfigManager-1efd102b.js → SnkFormConfigManager-be490a33.js} +3 -3
  87. package/dist/esm/{auth-fetcher-9987c66e.js → auth-fetcher-3510520e.js} +1 -1
  88. package/dist/esm/{constants-75abb876.js → constants-7db1128a.js} +1 -0
  89. package/dist/esm/{dataunit-fetcher-ed6e65ef.js → dataunit-fetcher-1d02ecfc.js} +7 -6
  90. package/dist/esm/{form-config-fetcher-34becd23.js → form-config-fetcher-fa208a6c.js} +15 -1
  91. package/dist/esm/index-a7d3d3f1.js +2 -2
  92. package/dist/esm/loader.js +1 -1
  93. package/dist/esm/pesquisa-grid_2.entry.js +5 -6
  94. package/dist/esm/sankhyablocks.js +1 -1
  95. package/dist/esm/{snk-actions-button_5.entry.js → snk-actions-button_7.entry.js} +68 -9
  96. package/dist/esm/snk-application.entry.js +176 -13
  97. package/dist/esm/snk-attach.entry.js +6 -7
  98. package/dist/esm/snk-config-options_3.entry.js +10 -8
  99. package/dist/esm/snk-configurator.entry.js +9 -2
  100. package/dist/esm/snk-crud.entry.js +8 -8
  101. package/dist/esm/snk-data-exporter.entry.js +6 -7
  102. package/dist/esm/{snk-data-unit-6258b8ae.js → snk-data-unit-7d0ce406.js} +1 -1
  103. package/dist/esm/snk-data-unit.entry.js +3 -3
  104. package/dist/esm/snk-detail-view.entry.js +11 -11
  105. package/dist/esm/snk-field-config.entry.js +1 -1
  106. package/dist/esm/snk-filter-bar_4.entry.js +3 -3
  107. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  108. package/dist/esm/snk-filter-search.entry.js +18 -5
  109. package/dist/esm/snk-grid.entry.js +7 -8
  110. package/dist/esm/{snk-guides-viewer-9e43d0ca.js → snk-guides-viewer-c44b3839.js} +7 -8
  111. package/dist/esm/snk-guides-viewer.entry.js +8 -9
  112. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  113. package/dist/esm/snk-pesquisa.entry.js +5 -6
  114. package/dist/esm/snk-simple-crud.entry.js +10 -10
  115. package/dist/esm/snk-tab-config.entry.js +1 -1
  116. package/dist/sankhyablocks/p-00796b12.entry.js +1 -0
  117. package/dist/sankhyablocks/{p-3fcb90d6.js → p-03b68a74.js} +1 -1
  118. package/dist/sankhyablocks/p-092078e3.entry.js +1 -0
  119. package/dist/sankhyablocks/{p-d3b9b377.entry.js → p-165cde3b.entry.js} +1 -1
  120. package/dist/sankhyablocks/p-35f85998.entry.js +1 -0
  121. package/dist/sankhyablocks/{p-2953c481.entry.js → p-3749dffb.entry.js} +1 -1
  122. package/dist/sankhyablocks/p-38e3ffda.entry.js +1 -0
  123. package/dist/sankhyablocks/p-3b190fb1.entry.js +1 -0
  124. package/dist/sankhyablocks/{p-6c43fcde.entry.js → p-490b75b5.entry.js} +1 -1
  125. package/dist/sankhyablocks/p-4ad638be.js +1 -0
  126. package/dist/sankhyablocks/p-5503e89f.entry.js +1 -0
  127. package/dist/sankhyablocks/p-5cc206bb.entry.js +1 -0
  128. package/dist/sankhyablocks/{p-e66bcb5c.entry.js → p-5ffa0493.entry.js} +1 -1
  129. package/dist/sankhyablocks/{p-6c9d1be4.entry.js → p-60137b7a.entry.js} +1 -1
  130. package/dist/sankhyablocks/p-601b252b.js +26 -0
  131. package/dist/sankhyablocks/p-6293ded9.entry.js +11 -0
  132. package/dist/sankhyablocks/p-6dd38d7b.js +6 -0
  133. package/dist/sankhyablocks/{p-abd9681c.js → p-6e0a5314.js} +1 -1
  134. package/dist/sankhyablocks/{p-a77bdadc.js → p-73285a8a.js} +1 -1
  135. package/dist/sankhyablocks/p-893b9483.entry.js +1 -0
  136. package/dist/sankhyablocks/p-90684a75.entry.js +1 -0
  137. package/dist/sankhyablocks/{p-1d19a5b0.js → p-9261d8a0.js} +1 -1
  138. package/dist/sankhyablocks/p-92778d5a.js +1 -0
  139. package/dist/sankhyablocks/{p-7e0a0aae.js → p-a8be1d67.js} +1 -1
  140. package/dist/sankhyablocks/{p-2746d606.entry.js → p-b2a2a83e.entry.js} +1 -1
  141. package/dist/sankhyablocks/p-b6200d32.entry.js +1 -0
  142. package/dist/sankhyablocks/{p-23cd6abf.entry.js → p-c0eb761b.entry.js} +1 -1
  143. package/dist/sankhyablocks/p-d9fdb018.entry.js +1 -0
  144. package/dist/sankhyablocks/{p-3ce68be5.js → p-ebdb9d89.js} +1 -1
  145. package/dist/sankhyablocks/p-ef6f0a1b.entry.js +1 -0
  146. package/dist/sankhyablocks/{p-5a7e18f4.js → p-fbba7e3d.js} +1 -1
  147. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  148. package/dist/types/components/snk-application/search-strategy/exec-prepared-search-plus.d.ts +5 -0
  149. package/dist/types/components/snk-application/snk-application.d.ts +17 -2
  150. package/dist/types/components/snk-configurator/snk-configurator.d.ts +6 -0
  151. package/dist/types/components/snk-crud/snk-crud.d.ts +4 -0
  152. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +5 -0
  153. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +5 -3
  154. package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +1 -0
  155. package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +15 -0
  156. package/dist/types/components/snk-layout-form-config/snk-view-representation/snk-view-representation.d.ts +10 -0
  157. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -0
  158. package/dist/types/components.d.ts +83 -1
  159. package/dist/types/lib/configs/LayoutFormConfig.d.ts +11 -0
  160. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +6 -0
  161. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +4 -1
  162. package/dist/types/lib/utils/constants.d.ts +1 -0
  163. package/package.json +1 -1
  164. package/react/components.d.ts +2 -0
  165. package/react/components.js +2 -0
  166. package/react/components.js.map +1 -1
  167. package/dist/cjs/ISave-e91b70a7.js +0 -9
  168. package/dist/esm/ISave-d8c8bc59.js +0 -9
  169. package/dist/sankhyablocks/p-04acdc3a.entry.js +0 -1
  170. package/dist/sankhyablocks/p-05fda408.entry.js +0 -1
  171. package/dist/sankhyablocks/p-1a8295af.entry.js +0 -1
  172. package/dist/sankhyablocks/p-1e48864c.js +0 -1
  173. package/dist/sankhyablocks/p-21749402.js +0 -1
  174. package/dist/sankhyablocks/p-22ddc147.js +0 -26
  175. package/dist/sankhyablocks/p-27d12f8f.entry.js +0 -1
  176. package/dist/sankhyablocks/p-3bab7e9c.entry.js +0 -1
  177. package/dist/sankhyablocks/p-3d424ae9.entry.js +0 -1
  178. package/dist/sankhyablocks/p-4b01cbad.entry.js +0 -11
  179. package/dist/sankhyablocks/p-4c9adf1c.entry.js +0 -1
  180. package/dist/sankhyablocks/p-6b898a51.entry.js +0 -1
  181. package/dist/sankhyablocks/p-9523fc40.entry.js +0 -1
  182. package/dist/sankhyablocks/p-a18de25e.js +0 -1
  183. package/dist/sankhyablocks/p-be2e5f36.entry.js +0 -1
  184. package/dist/sankhyablocks/p-c8622597.entry.js +0 -1
  185. package/dist/sankhyablocks/p-d571e243.entry.js +0 -1
  186. package/dist/sankhyablocks/p-ef076eea.js +0 -6
@@ -0,0 +1,73 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import './DataFetcher.js';
3
+ import './ISave.js';
4
+ import { ApplicationContext } from '@sankhyalabs/core';
5
+ import '@sankhyalabs/ezui/dist/collection/utils/constants';
6
+ import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
7
+ import './dataunit-fetcher.js';
8
+ import './filter-item-type.enum.js';
9
+ import { F as FormConfigFetcher } from './form-config-fetcher.js';
10
+ import './constants.js';
11
+ import { FormLayout } from '@sankhyalabs/ezui/dist/collection/utils';
12
+ import { d as defineCustomElement$1 } from './snk-view-representation2.js';
13
+
14
+ const snkLayoutFormConfigCss = ".sc-snk-layout-form-config-h{display:block}";
15
+
16
+ const FORM_COL_CONFIG_PREFIX = 'formColCfg.';
17
+ const SnkLayoutFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
18
+ constructor() {
19
+ super();
20
+ this.__registerHost();
21
+ this._formConfigFetcher = new FormConfigFetcher();
22
+ this.layoutType = FormLayout.CASCADE;
23
+ }
24
+ /**
25
+ * Salva o tipo de layout escolhido. Sem retorno.
26
+ */
27
+ async save() {
28
+ this._LayoutFormConfigSingleton.setConfig(this.layoutType);
29
+ this._formConfigFetcher.saveLayoutFormConfig(FORM_COL_CONFIG_PREFIX + this._resourceID, { config: this.layoutType, newConfig: true });
30
+ }
31
+ async componentWillLoad() {
32
+ const _application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
33
+ this._LayoutFormConfigSingleton = await (_application === null || _application === void 0 ? void 0 : _application.getLayoutFormConfig());
34
+ this._resourceID = await (_application === null || _application === void 0 ? void 0 : _application.getResourceID());
35
+ this.setLayoutInit();
36
+ }
37
+ setLayoutInit() {
38
+ if (!this._LayoutFormConfigSingleton)
39
+ return;
40
+ const { config } = this._LayoutFormConfigSingleton;
41
+ this.layoutType = Number(config) in FormLayout ? Number(config) : FormLayout.CASCADE;
42
+ }
43
+ toggleLayout(key) {
44
+ this.layoutType = key;
45
+ }
46
+ render() {
47
+ return (h("div", { class: "ez-flex ez-flex--column" }, h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: "Layout em cascata", class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CASCADE), value: this.layoutType === FormLayout.CASCADE }), h("snk-view-representation", { mode: FormLayout.CASCADE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, "Todos os campos ser\u00E3o organizados em uma coluna \u00FAnica.")), h("div", null, h("ez-check", { label: "Layout lado a lado", class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.SIDE_BY_SIDE), value: this.layoutType === FormLayout.SIDE_BY_SIDE }), h("snk-view-representation", { mode: FormLayout.SIDE_BY_SIDE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, "Todos os campos ser\u00E3o dispostos lado a lado, ajustando-se automaticamente \u00E0 largura da tela."))));
48
+ }
49
+ static get style() { return snkLayoutFormConfigCss; }
50
+ }, [2, "snk-layout-form-config", {
51
+ "layoutType": [32],
52
+ "save": [64]
53
+ }]);
54
+ function defineCustomElement() {
55
+ if (typeof customElements === "undefined") {
56
+ return;
57
+ }
58
+ const components = ["snk-layout-form-config", "snk-view-representation"];
59
+ components.forEach(tagName => { switch (tagName) {
60
+ case "snk-layout-form-config":
61
+ if (!customElements.get(tagName)) {
62
+ customElements.define(tagName, SnkLayoutFormConfig);
63
+ }
64
+ break;
65
+ case "snk-view-representation":
66
+ if (!customElements.get(tagName)) {
67
+ defineCustomElement$1();
68
+ }
69
+ break;
70
+ } });
71
+ }
72
+
73
+ export { SnkLayoutFormConfig as S, defineCustomElement as d };
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
2
2
  import { StringUtils, ApplicationContext, ObjectUtils, DataType, UserInterface, JSUtils, FloatingManager, KeyboardManager, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
4
  import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants.js';
5
- import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
5
+ import { T as TaskbarElement, d as defineCustomElement$3 } from './snk-taskbar2.js';
6
6
  import './DataFetcher.js';
7
7
  import { P as PresentationMode } from './ISave.js';
8
8
  import { S as SnkMultiSelectionListDataSource, T as TaskbarProcessor, R as RmPrecisionCustomValueFormatter, c as ContinuousInsertUtils, b as buildFieldSearch, o as openFieldSearch, a as CrudUtils, d as ClientSideExporterProvider } from './ContinuousInsertUtils.js';
@@ -14,14 +14,16 @@ import { F as FormConfigFetcher } from './form-config-fetcher.js';
14
14
  import { C as ConfigStorage } from './ConfigStorage.js';
15
15
  import { S as SnkFormConfigManager } from './SnkFormConfigManager.js';
16
16
  import { s as store } from './index2.js';
17
- import { d as defineCustomElement$a } from './snk-actions-button2.js';
18
- import { d as defineCustomElement$9 } from './snk-configurator2.js';
19
- import { d as defineCustomElement$8 } from './snk-data-exporter2.js';
20
- import { d as defineCustomElement$7 } from './snk-data-unit2.js';
21
- import { d as defineCustomElement$6 } from './snk-exporter-email-sender2.js';
22
- import { d as defineCustomElement$5 } from './snk-grid-config2.js';
23
- import { d as defineCustomElement$4 } from './snk-select-box2.js';
24
- import { d as defineCustomElement$3 } from './snk-simple-form-config2.js';
17
+ import { d as defineCustomElement$c } from './snk-actions-button2.js';
18
+ import { d as defineCustomElement$b } from './snk-configurator2.js';
19
+ import { d as defineCustomElement$a } from './snk-data-exporter2.js';
20
+ import { d as defineCustomElement$9 } from './snk-data-unit2.js';
21
+ import { d as defineCustomElement$8 } from './snk-exporter-email-sender2.js';
22
+ import { d as defineCustomElement$7 } from './snk-grid-config2.js';
23
+ import { d as defineCustomElement$6 } from './snk-layout-form-config2.js';
24
+ import { d as defineCustomElement$5 } from './snk-select-box2.js';
25
+ import { d as defineCustomElement$4 } from './snk-simple-form-config2.js';
26
+ import { d as defineCustomElement$2 } from './snk-view-representation2.js';
25
27
  import { d as defineCustomElement$1 } from './taskbar-actions-button2.js';
26
28
 
27
29
  const REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
@@ -83,6 +85,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
83
85
  this.ignoreReadOnlyFormFields = false;
84
86
  this.autoFocus = true;
85
87
  this.domainMessagesBuilder = undefined;
88
+ this.layoutFormConfig = false;
86
89
  this.autoLoad = undefined;
87
90
  this.outlineMode = false;
88
91
  }
@@ -775,7 +778,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
775
778
  }
776
779
  return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
777
780
  ? undefined
778
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
781
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
779
782
  }
780
783
  get _element() { return this; }
781
784
  static get watchers() { return {
@@ -813,6 +816,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
813
816
  "ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
814
817
  "autoFocus": [4, "auto-focus"],
815
818
  "domainMessagesBuilder": [1, "domain-messages-builder"],
819
+ "layoutFormConfig": [4, "layout-form-config"],
816
820
  "autoLoad": [4, "auto-load"],
817
821
  "outlineMode": [4, "outline-mode"],
818
822
  "_showPopUpGridConfig": [32],
@@ -839,7 +843,7 @@ function defineCustomElement() {
839
843
  if (typeof customElements === "undefined") {
840
844
  return;
841
845
  }
842
- const components = ["snk-simple-crud", "snk-actions-button", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-grid-config", "snk-select-box", "snk-simple-form-config", "snk-taskbar", "taskbar-actions-button"];
846
+ const components = ["snk-simple-crud", "snk-actions-button", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-grid-config", "snk-layout-form-config", "snk-select-box", "snk-simple-form-config", "snk-taskbar", "snk-view-representation", "taskbar-actions-button"];
843
847
  components.forEach(tagName => { switch (tagName) {
844
848
  case "snk-simple-crud":
845
849
  if (!customElements.get(tagName)) {
@@ -848,45 +852,55 @@ function defineCustomElement() {
848
852
  break;
849
853
  case "snk-actions-button":
850
854
  if (!customElements.get(tagName)) {
851
- defineCustomElement$a();
855
+ defineCustomElement$c();
852
856
  }
853
857
  break;
854
858
  case "snk-configurator":
855
859
  if (!customElements.get(tagName)) {
856
- defineCustomElement$9();
860
+ defineCustomElement$b();
857
861
  }
858
862
  break;
859
863
  case "snk-data-exporter":
860
864
  if (!customElements.get(tagName)) {
861
- defineCustomElement$8();
865
+ defineCustomElement$a();
862
866
  }
863
867
  break;
864
868
  case "snk-data-unit":
865
869
  if (!customElements.get(tagName)) {
866
- defineCustomElement$7();
870
+ defineCustomElement$9();
867
871
  }
868
872
  break;
869
873
  case "snk-exporter-email-sender":
870
874
  if (!customElements.get(tagName)) {
871
- defineCustomElement$6();
875
+ defineCustomElement$8();
872
876
  }
873
877
  break;
874
878
  case "snk-grid-config":
875
879
  if (!customElements.get(tagName)) {
876
- defineCustomElement$5();
880
+ defineCustomElement$7();
881
+ }
882
+ break;
883
+ case "snk-layout-form-config":
884
+ if (!customElements.get(tagName)) {
885
+ defineCustomElement$6();
877
886
  }
878
887
  break;
879
888
  case "snk-select-box":
880
889
  if (!customElements.get(tagName)) {
881
- defineCustomElement$4();
890
+ defineCustomElement$5();
882
891
  }
883
892
  break;
884
893
  case "snk-simple-form-config":
885
894
  if (!customElements.get(tagName)) {
886
- defineCustomElement$3();
895
+ defineCustomElement$4();
887
896
  }
888
897
  break;
889
898
  case "snk-taskbar":
899
+ if (!customElements.get(tagName)) {
900
+ defineCustomElement$3();
901
+ }
902
+ break;
903
+ case "snk-view-representation":
890
904
  if (!customElements.get(tagName)) {
891
905
  defineCustomElement$2();
892
906
  }
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SnkViewRepresentation extends Components.SnkViewRepresentation, HTMLElement {}
4
+ export const SnkViewRepresentation: {
5
+ prototype: SnkViewRepresentation;
6
+ new (): SnkViewRepresentation;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { S as SnkViewRepresentation$1, d as defineCustomElement$1 } from './snk-view-representation2.js';
2
+
3
+ const SnkViewRepresentation = SnkViewRepresentation$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { SnkViewRepresentation, defineCustomElement };
@@ -0,0 +1,41 @@
1
+ import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
+ import { FormLayout } from '@sankhyalabs/ezui/dist/collection/utils';
3
+
4
+ const snkViewRepresentationCss = ".sc-snk-view-representation-h{display:block}.svg-container.sc-snk-view-representation{display:flex;width:185px;height:125px;border-radius:8px;background-color:#f7f7f7;padding:10px 12px;box-sizing:border-box;position:relative}.svg-container__background.sc-snk-view-representation{display:flex;flex-direction:column;width:100%}.svg-container__header.sc-snk-view-representation{display:flex;gap:2px;margin-bottom:12px}.svg-container__circle.sc-snk-view-representation{width:9px;height:9px;border-radius:50%}.svg-container__circle--red.sc-snk-view-representation{background-color:#ed7678}.svg-container__circle--yellow.sc-snk-view-representation{background-color:#eddb76}.svg-container__circle--green.sc-snk-view-representation{background-color:#7ad08e}.svg-container__section.sc-snk-view-representation{width:100%}.svg-container__collumn.sc-snk-view-representation{width:100%;display:flex;flex-direction:column}.svg-container__inline.sc-snk-view-representation{display:flex;flex-direction:row;gap:6px}.svg-container__line.sc-snk-view-representation{height:13px;border-radius:4px;background-color:#d9d9d9;margin-bottom:4px}.svg-container__line--short.sc-snk-view-representation{width:39.68px;height:7px;border-radius:3.5px}.svg-container__line--long.sc-snk-view-representation{width:100%}";
5
+
6
+ const SnkViewRepresentation = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.mode = FormLayout.SIDE_BY_SIDE;
11
+ }
12
+ renderCascadeLayout() {
13
+ return (h("div", { class: "svg-container__collumn" }, [...Array(3)].map(() => (h("div", { class: "svg-container__section" }, h("div", { class: "svg-container__line svg-container__line--short" }), h("div", { class: "svg-container__line svg-container__line--long" }))))));
14
+ }
15
+ renderSideBySideLayout() {
16
+ return (h("div", { class: "svg-container__inline" }, [...Array(2)].map(() => this.renderCascadeLayout())));
17
+ }
18
+ render() {
19
+ return (h("div", { class: "svg-container ez-margin-left--small" }, h("div", { class: "svg-container__background" }, h("div", { class: "svg-container__header" }, h("div", { class: "svg-container__circle svg-container__circle--red" }), h("div", { class: "svg-container__circle svg-container__circle--yellow" }), h("div", { class: "svg-container__circle svg-container__circle--green" })), this.mode === FormLayout.CASCADE
20
+ ? this.renderCascadeLayout()
21
+ : this.renderSideBySideLayout())));
22
+ }
23
+ static get style() { return snkViewRepresentationCss; }
24
+ }, [2, "snk-view-representation", {
25
+ "mode": [8]
26
+ }]);
27
+ function defineCustomElement() {
28
+ if (typeof customElements === "undefined") {
29
+ return;
30
+ }
31
+ const components = ["snk-view-representation"];
32
+ components.forEach(tagName => { switch (tagName) {
33
+ case "snk-view-representation":
34
+ if (!customElements.get(tagName)) {
35
+ customElements.define(tagName, SnkViewRepresentation);
36
+ }
37
+ break;
38
+ } });
39
+ }
40
+
41
+ export { SnkViewRepresentation as S, defineCustomElement as d };
@@ -1,14 +1,13 @@
1
- import { D as DataFetcher } from './DataFetcher-ecf5f903.js';
2
- import './pesquisa-fetcher-e26c3295.js';
1
+ import { D as DataFetcher } from './DataFetcher-88e56266.js';
2
+ import './ISave-5efafc97.js';
3
3
  import { SortMode, ApplicationContext, UserInterface, DateUtils, ObjectUtils, StringUtils, NumberUtils, DataType } from '@sankhyalabs/core';
4
4
  import { D as DataExporterOption } from './index-b40568ff.js';
5
- import './ISave-d8c8bc59.js';
6
5
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
7
6
  import { UserInterface as UserInterface$1 } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
8
- import { P as PreloadManager } from './dataunit-fetcher-ed6e65ef.js';
7
+ import { P as PreloadManager } from './dataunit-fetcher-1d02ecfc.js';
9
8
  import './filter-item-type.enum-d45e026f.js';
10
- import './form-config-fetcher-34becd23.js';
11
- import './constants-75abb876.js';
9
+ import './form-config-fetcher-fa208a6c.js';
10
+ import './constants-7db1128a.js';
12
11
  import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
13
12
  import { h } from './index-a7d3d3f1.js';
14
13
  import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
@@ -219,25 +218,21 @@ class CommonsExporter {
219
218
  userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
220
219
  customFormatter
221
220
  };
222
- if (isUserInterfaceSEARCH) {
223
- if (((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
224
- const labelDescription = (_c = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _c === void 0 ? void 0 : _c.DESCRIPTIONENTITY;
225
- const mergedFrom = fieldData.properties.mergedFrom;
226
- const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
227
- descriptionColumn = {
228
- id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
229
- label: labelDescription,
230
- width: isUserInterfaceSEARCH && labelDescription ? (labelDescription.length * this.DEFAULT_FONT_SIZE - widthColumnDefault) : column.width,
231
- type: DataType.TEXT,
232
- userInterface: UserInterface$1.LONGTEXT,
233
- descriptionFrom: fieldData.name
234
- };
235
- }
236
- if (descriptionColumn) {
237
- const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
238
- columnData = Object.assign(Object.assign({}, columnData), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.codWidth });
239
- descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.descWidth, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
240
- }
221
+ if (isUserInterfaceSEARCH && ((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
222
+ const labelDescription = (_c = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _c === void 0 ? void 0 : _c.DESCRIPTIONENTITY;
223
+ const mergedFrom = fieldData.properties.mergedFrom;
224
+ const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
225
+ descriptionColumn = {
226
+ id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
227
+ label: labelDescription,
228
+ width: isUserInterfaceSEARCH && labelDescription ? (labelDescription.length * this.DEFAULT_FONT_SIZE - widthColumnDefault) : column.width,
229
+ type: DataType.TEXT,
230
+ userInterface: UserInterface$1.LONGTEXT,
231
+ descriptionFrom: fieldData.name
232
+ };
233
+ const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
234
+ columnData = Object.assign(Object.assign({}, columnData), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.codWidth });
235
+ descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.descWidth, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
241
236
  }
242
237
  columnsMetadata.push(columnData);
243
238
  if (descriptionColumn)
@@ -1,7 +1,7 @@
1
- import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-34becd23.js';
1
+ import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-fa208a6c.js';
2
2
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
3
3
  import { ObjectUtils } from '@sankhyalabs/core';
4
- import { d as dist, D as DataFetcher } from './DataFetcher-ecf5f903.js';
4
+ import { d as dist, D as DataFetcher } from './DataFetcher-88e56266.js';
5
5
 
6
6
  class GridConfigFetcher extends ResourceFetcher {
7
7
  constructor() {
@@ -6716,7 +6716,13 @@ class DataFetcher {
6716
6716
  if (error.length > 0) { //As informações do erro vem no primeiro indice de um array
6717
6717
  const errorInfo = error[POSITION_ERROR_INFO];
6718
6718
  const errorMessage = (errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.message) ? errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.message : "Não há mensagem de erro";
6719
- const errorLevel = ((_a = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.extensions) === null || _a === void 0 ? void 0 : _a.level) ? errorInfo.extensions.level : "ERROR";
6719
+ /*
6720
+ No HTML5, todos os erros de Troubleshooting são considerados alerta,
6721
+ pois a comparação errorLevel == ServiceProxyConstants.LEVEL.ERROR sempre é falsa
6722
+ Motivo: - errorLevel é uma string "ERROR" por exemplo
6723
+ - ServiceProxyConstants.LEVEL.ERROR é um numero 1, por exemplo
6724
+ */
6725
+ const errorLevel = ((_a = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.extensions) === null || _a === void 0 ? void 0 : _a.level) ? "WARNING" : "ERROR";
6720
6726
  const errorCode = ((_b = errorInfo === null || errorInfo === void 0 ? void 0 : errorInfo.extensions) === null || _b === void 0 ? void 0 : _b.code) ? errorInfo.extensions.code : "";
6721
6727
  switch (errorLevel) {
6722
6728
  case "WARNING":
@@ -6738,7 +6744,13 @@ class DataFetcher {
6738
6744
  let tsErrorCode, tsErrorLevel;
6739
6745
  if (tsError) {
6740
6746
  tsErrorCode = tsError.tsErrorCode;
6741
- tsErrorLevel = tsError.tsErrorLevel;
6747
+ /*
6748
+ No HTML5, todos os erros de Troubleshooting são considerados alerta,
6749
+ pois a comparação errorLevel == ServiceProxyConstants.LEVEL.ERROR sempre é falsa
6750
+ Motivo: - errorLevel é uma string "ERROR" por exemplo
6751
+ - ServiceProxyConstants.LEVEL.ERROR é um numero 1, por exemplo
6752
+ */
6753
+ tsErrorLevel = "WARNING";
6742
6754
  }
6743
6755
  if (tsErrorLevel === "WARNING") {
6744
6756
  return new WarningException(title, statusMessage, tsErrorCode);
@@ -1,5 +1,5 @@
1
1
  import { UserInterface, DataType, ApplicationContext, ErrorException } from '@sankhyalabs/core';
2
- import { d as dist, D as DataFetcher } from './DataFetcher-ecf5f903.js';
2
+ import { d as dist, D as DataFetcher } from './DataFetcher-88e56266.js';
3
3
 
4
4
  function buildGridMetadata(rawValue) {
5
5
  const fieldsMetadata = buildFieldsMetadata(rawValue.fieldsMetadata);
@@ -148,7 +148,20 @@ class PesquisaFetcher {
148
148
  });
149
149
  });
150
150
  }
151
- loadAdvancedSearch(entityName, argument, criteria, searchOptions) {
151
+ buildDescriptionCacheKey(entityName, codeValue) {
152
+ return `${entityName}__${codeValue}`;
153
+ }
154
+ async loadByCode(entityName, codeValue, criteria, searchOptions) {
155
+ const cacheKey = this.buildDescriptionCacheKey(entityName, codeValue);
156
+ const cachedValue = PesquisaFetcher.DESCRIPTIONS_BY_CODE[cacheKey];
157
+ if (cachedValue) {
158
+ return Promise.resolve(cachedValue);
159
+ }
160
+ const result = await this.loadAdvancedSearch(entityName, undefined, criteria, searchOptions, codeValue);
161
+ PesquisaFetcher.DESCRIPTIONS_BY_CODE[cacheKey] = result;
162
+ return result;
163
+ }
164
+ loadAdvancedSearch(entityName, argument, criteria, searchOptions, codeValue) {
152
165
  var _a, _b, _c, _d, _e;
153
166
  const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
154
167
  const values = {
@@ -192,12 +205,22 @@ class PesquisaFetcher {
192
205
  const reqBody = {
193
206
  "serviceName": serviceName,
194
207
  "requestBody": {
195
- "criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_e = values.searchOptions) === null || _e === void 0 ? void 0 : _e.rootEntity }, { options }),
208
+ "criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": (_d = options === null || options === void 0 ? void 0 : options.ignoreEntityCriteria) !== null && _d !== void 0 ? _d : false, "limit": this._defaultPageSize, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_e = values.searchOptions) === null || _e === void 0 ? void 0 : _e.rootEntity }, { options }),
196
209
  "clientEventList": {
197
210
  "clientEvent": []
198
211
  }
199
212
  }
200
213
  };
214
+ if (codeValue == undefined) {
215
+ reqBody.requestBody.criteria.query = {
216
+ "$": argument
217
+ };
218
+ }
219
+ else {
220
+ reqBody.requestBody.criteria.pk = {
221
+ "$": codeValue
222
+ };
223
+ }
201
224
  const urlOptions = {
202
225
  urlParams: {
203
226
  "quietMode": true
@@ -307,6 +330,7 @@ class PesquisaFetcher {
307
330
  return params;
308
331
  }
309
332
  }
333
+ PesquisaFetcher.DESCRIPTIONS_BY_CODE = {};
310
334
  function buildLoadGridConfigPayload(entityName) {
311
335
  return {
312
336
  'gridConfig': {
@@ -359,4 +383,12 @@ var SearchListenerType;
359
383
  SearchListenerType["beforeSearch"] = "beforeSearch";
360
384
  })(SearchListenerType || (SearchListenerType = {}));
361
385
 
362
- export { PesquisaFetcher as P, PESQUISA_VIEW_MODE as a, buildGridMetadata as b };
386
+ var SaveErrorsEnum;
387
+ (function (SaveErrorsEnum) {
388
+ SaveErrorsEnum["LINK_AND_FILE_AT_THE_SAME_TIME"] = "LINK_AND_FILE_AT_THE_SAME_TIME";
389
+ SaveErrorsEnum["ANY_LINK_OR_FILE_FILLED"] = "ANY_LINK_OR_FILE_FILLED";
390
+ SaveErrorsEnum["UNKNOWN"] = "UNKNOWN";
391
+ SaveErrorsEnum["DESCRIPTION_CANNOT_BE_CHANGED"] = "DESCRIPTION_CANNOT_BE_CHANGED";
392
+ })(SaveErrorsEnum || (SaveErrorsEnum = {}));
393
+
394
+ export { PesquisaFetcher as P, SaveErrorsEnum as S, PESQUISA_VIEW_MODE as a, buildGridMetadata as b };
@@ -1,7 +1,7 @@
1
- import { C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
1
+ import { C as ConfigStorage } from './ConfigStorage-71e6766f.js';
2
2
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
3
- import { F as FormConfigFetcher } from './form-config-fetcher-34becd23.js';
4
- import { c as TAB_NAMES } from './constants-75abb876.js';
3
+ import { F as FormConfigFetcher } from './form-config-fetcher-fa208a6c.js';
4
+ import { c as TAB_NAMES } from './constants-7db1128a.js';
5
5
 
6
6
  class SnkFormConfigManager {
7
7
  constructor(configName, resourceID, onConfigChange, dataUnit) {
@@ -1,5 +1,5 @@
1
1
  import { ObjectUtils } from '@sankhyalabs/core';
2
- import { R as ResourceFetcher } from './form-config-fetcher-34becd23.js';
2
+ import { R as ResourceFetcher } from './form-config-fetcher-fa208a6c.js';
3
3
 
4
4
  class AuthFetcher extends ResourceFetcher {
5
5
  getData(resourceID) {
@@ -67,6 +67,7 @@ const TAGS_BY_TYPE = {
67
67
  CHECKBOX: "ez-check",
68
68
  OPTIONSELECTOR: "ez-combo-box",
69
69
  SEARCH: "ez-search",
70
+ SEARCHPLUS: "ez-search-plus",
70
71
  INTEGERNUMBER: "ez-number-input",
71
72
  DECIMALNUMBER: "ez-number-input"
72
73
  };
@@ -1,5 +1,5 @@
1
1
  import { ObjectUtils, DataUnit, DataUnitInMemoryLoader, ApplicationContext, StringUtils, UserInterface, DataUnitStorage, DataType, ChangeOperation } from '@sankhyalabs/core';
2
- import { D as DataFetcher, d as dist } from './DataFetcher-ecf5f903.js';
2
+ import { D as DataFetcher, d as dist } from './DataFetcher-88e56266.js';
3
3
  import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
4
4
  import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
5
5
  import { ColumnFilterManager } from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
@@ -495,11 +495,12 @@ class DatasetStrategy {
495
495
  return InMemoryLoader.getConvertedValue(descriptor, strValue);
496
496
  }
497
497
  getSearchDescriptionField(descriptor) {
498
- if (descriptor.userInterface === UserInterface.SEARCH) {
499
- const { ENTITYNAME, mergedFrom, DESCRIPTIONFIELD } = descriptor.properties;
500
- if (!StringUtils.isEmpty(DESCRIPTIONFIELD)) {
501
- return mergedFrom != undefined ? `${mergedFrom}.${ENTITYNAME}.${DESCRIPTIONFIELD}` : `${ENTITYNAME}.${DESCRIPTIONFIELD}`;
502
- }
498
+ if (![UserInterface.SEARCH, UserInterface.SEARCHPLUS].includes(descriptor.userInterface)) {
499
+ return undefined;
500
+ }
501
+ const { ENTITYNAME, mergedFrom, DESCRIPTIONFIELD } = descriptor.properties;
502
+ if (!StringUtils.isEmpty(DESCRIPTIONFIELD)) {
503
+ return mergedFrom != undefined ? `${mergedFrom}.${ENTITYNAME}.${DESCRIPTIONFIELD}` : `${ENTITYNAME}.${DESCRIPTIONFIELD}`;
503
504
  }
504
505
  return undefined;
505
506
  }
@@ -1,4 +1,4 @@
1
- import { d as dist, D as DataFetcher } from './DataFetcher-ecf5f903.js';
1
+ import { d as dist, D as DataFetcher } from './DataFetcher-88e56266.js';
2
2
  import { ObjectUtils } from '@sankhyalabs/core';
3
3
 
4
4
  class ResourceFetcher {
@@ -282,6 +282,20 @@ class FormConfigFetcher extends ResourceFetcher {
282
282
  const rawFields = (_c = (_b = (_a = config === null || config === void 0 ? void 0 : config.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
283
283
  return { emptyConfig: false, fields: Array.isArray(rawFields) ? rawFields : [rawFields] };
284
284
  }
285
+ async fetchLayoutFormConfig(configName) {
286
+ const payload = { 'requestBody': { 'config': { 'chave': configName, 'tipo': 'T' } } };
287
+ const response = await DataFetcher.get().callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
288
+ if (ObjectUtils.isEmpty(response))
289
+ return undefined;
290
+ return response.config;
291
+ }
292
+ async saveLayoutFormConfig(configName, config) {
293
+ const payload = { 'requestBody': { 'config': Object.assign(Object.assign({}, config), { 'chave': configName, 'tipo': 'T' }) } };
294
+ const response = await DataFetcher.get().callServiceBroker('SystemUtilsSP.saveConf', JSON.stringify(payload));
295
+ if (ObjectUtils.isEmpty(response))
296
+ return undefined;
297
+ return response;
298
+ }
285
299
  }
286
300
  var UserConfigType;
287
301
  (function (UserConfigType) {
@@ -2174,10 +2174,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
2174
2174
  return import(
2175
2175
  /* webpackMode: "lazy" */
2176
2176
  './snk-personalized-filter.entry.js').then(processMod, consoleError);
2177
- case 'snk-actions-button_5':
2177
+ case 'snk-actions-button_7':
2178
2178
  return import(
2179
2179
  /* webpackMode: "lazy" */
2180
- './snk-actions-button_5.entry.js').then(processMod, consoleError);
2180
+ './snk-actions-button_7.entry.js').then(processMod, consoleError);
2181
2181
  case 'snk-filter-advanced-mode_2':
2182
2182
  return import(
2183
2183
  /* webpackMode: "lazy" */