@sankhyalabs/sankhyablocks 8.16.0-dev.96 → 8.16.0-dev.98

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. package/dist/cjs/{ClientSideExporterProvider-9bd6fa5a.js → ClientSideExporterProvider-cc82b68a.js} +2 -3
  2. package/dist/cjs/{ConfigStorage-6b633b10.js → ConfigStorage-2235f35e.js} +1 -1
  3. package/dist/cjs/{pesquisa-fetcher-30cab386.js → ISave-62fbb1dd.js} +8 -0
  4. package/dist/cjs/{SnkFormConfigManager-d680be08.js → SnkFormConfigManager-6637cd6b.js} +2 -2
  5. package/dist/cjs/{auth-fetcher-24ba4135.js → auth-fetcher-abad589f.js} +1 -1
  6. package/dist/cjs/{form-config-fetcher-e0a512c3.js → form-config-fetcher-db332748.js} +14 -0
  7. package/dist/cjs/index-f9e81701.js +2 -2
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +3 -4
  10. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  11. package/dist/cjs/{snk-actions-button_5.cjs.entry.js → snk-actions-button_7.cjs.entry.js} +63 -4
  12. package/dist/cjs/snk-application.cjs.entry.js +48 -5
  13. package/dist/cjs/snk-attach.cjs.entry.js +3 -4
  14. package/dist/cjs/snk-config-options_3.cjs.entry.js +3 -3
  15. package/dist/cjs/snk-configurator.cjs.entry.js +8 -1
  16. package/dist/cjs/snk-crud.cjs.entry.js +5 -5
  17. package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -3
  18. package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
  19. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +2 -2
  20. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -2
  21. package/dist/cjs/snk-grid.cjs.entry.js +4 -5
  22. package/dist/cjs/{snk-guides-viewer-65964889.js → snk-guides-viewer-0e4f3b1a.js} +4 -5
  23. package/dist/cjs/snk-guides-viewer.cjs.entry.js +5 -6
  24. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
  25. package/dist/cjs/snk-pesquisa.cjs.entry.js +9 -10
  26. package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
  27. package/dist/collection/collection-manifest.json +2 -0
  28. package/dist/collection/components/snk-application/snk-application.js +41 -0
  29. package/dist/collection/components/snk-configurator/snk-configurator.js +26 -1
  30. package/dist/collection/components/snk-crud/snk-crud.js +20 -1
  31. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css +10 -1
  32. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +25 -1
  33. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
  34. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.css +3 -0
  35. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +73 -0
  36. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.css +78 -0
  37. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +57 -0
  38. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +20 -1
  39. package/dist/collection/lib/configs/LayoutFormConfig.js +25 -0
  40. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +14 -0
  41. package/dist/components/form-config-fetcher.js +14 -0
  42. package/dist/components/index.d.ts +2 -0
  43. package/dist/components/index.js +2 -0
  44. package/dist/components/snk-application2.js +45 -0
  45. package/dist/components/snk-attach2.js +34 -22
  46. package/dist/components/snk-configurator2.js +22 -2
  47. package/dist/components/snk-crud.js +76 -62
  48. package/dist/components/snk-detail-view2.js +110 -86
  49. package/dist/components/snk-layout-form-config.d.ts +11 -0
  50. package/dist/components/snk-layout-form-config.js +6 -0
  51. package/dist/components/snk-layout-form-config2.js +73 -0
  52. package/dist/components/snk-simple-crud2.js +33 -19
  53. package/dist/components/snk-view-representation.d.ts +11 -0
  54. package/dist/components/snk-view-representation.js +6 -0
  55. package/dist/components/snk-view-representation2.js +41 -0
  56. package/dist/esm/{ClientSideExporterProvider-e42c5a48.js → ClientSideExporterProvider-8191676b.js} +2 -3
  57. package/dist/esm/{ConfigStorage-e5c1f4c0.js → ConfigStorage-9bd805d6.js} +1 -1
  58. package/dist/esm/{pesquisa-fetcher-e26c3295.js → ISave-7d546dce.js} +9 -1
  59. package/dist/esm/{SnkFormConfigManager-1efd102b.js → SnkFormConfigManager-fbc6a9a8.js} +2 -2
  60. package/dist/esm/{auth-fetcher-9987c66e.js → auth-fetcher-07d33333.js} +1 -1
  61. package/dist/esm/{form-config-fetcher-34becd23.js → form-config-fetcher-ac17cff4.js} +14 -0
  62. package/dist/esm/index-a7d3d3f1.js +2 -2
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/esm/pesquisa-grid_2.entry.js +2 -3
  65. package/dist/esm/sankhyablocks.js +1 -1
  66. package/dist/esm/{snk-actions-button_5.entry.js → snk-actions-button_7.entry.js} +63 -6
  67. package/dist/esm/snk-application.entry.js +47 -4
  68. package/dist/esm/snk-attach.entry.js +3 -4
  69. package/dist/esm/snk-config-options_3.entry.js +3 -3
  70. package/dist/esm/snk-configurator.entry.js +8 -1
  71. package/dist/esm/snk-crud.entry.js +5 -5
  72. package/dist/esm/snk-data-exporter.entry.js +2 -3
  73. package/dist/esm/snk-detail-view.entry.js +8 -8
  74. package/dist/esm/snk-filter-bar_4.entry.js +2 -2
  75. package/dist/esm/snk-filter-modal-item.entry.js +2 -2
  76. package/dist/esm/snk-grid.entry.js +4 -5
  77. package/dist/esm/{snk-guides-viewer-9e43d0ca.js → snk-guides-viewer-80a8709c.js} +4 -5
  78. package/dist/esm/snk-guides-viewer.entry.js +5 -6
  79. package/dist/esm/snk-personalized-filter.entry.js +2 -2
  80. package/dist/esm/snk-pesquisa.entry.js +2 -3
  81. package/dist/esm/snk-simple-crud.entry.js +7 -7
  82. package/dist/sankhyablocks/p-01512409.js +26 -0
  83. package/dist/sankhyablocks/p-02c6dc9f.entry.js +1 -0
  84. package/dist/sankhyablocks/{p-6c43fcde.entry.js → p-0bcd4757.entry.js} +1 -1
  85. package/dist/sankhyablocks/{p-ef076eea.js → p-108fee57.js} +2 -2
  86. package/dist/sankhyablocks/{p-3fcb90d6.js → p-13f17dab.js} +1 -1
  87. package/dist/sankhyablocks/{p-d3b9b377.entry.js → p-340e2447.entry.js} +1 -1
  88. package/dist/sankhyablocks/p-35fcf37e.js +1 -0
  89. package/dist/sankhyablocks/p-3a36d4b3.entry.js +1 -0
  90. package/dist/sankhyablocks/{p-a77bdadc.js → p-48729c8c.js} +1 -1
  91. package/dist/sankhyablocks/p-513af002.entry.js +1 -0
  92. package/dist/sankhyablocks/{p-e5657d22.entry.js → p-6c0afbce.entry.js} +1 -1
  93. package/dist/sankhyablocks/p-950e3cbe.entry.js +1 -0
  94. package/dist/sankhyablocks/p-9907cf67.entry.js +1 -0
  95. package/dist/sankhyablocks/p-af58c9d7.entry.js +1 -0
  96. package/dist/sankhyablocks/p-c5acb7ba.entry.js +11 -0
  97. package/dist/sankhyablocks/p-c7c6eab7.entry.js +1 -0
  98. package/dist/sankhyablocks/{p-3ce68be5.js → p-cb9d725a.js} +1 -1
  99. package/dist/sankhyablocks/p-d1f04e2c.js +1 -0
  100. package/dist/sankhyablocks/p-d2065bb4.entry.js +1 -0
  101. package/dist/sankhyablocks/p-dc617b0c.entry.js +1 -0
  102. package/dist/sankhyablocks/p-e5d8891d.entry.js +1 -0
  103. package/dist/sankhyablocks/{p-e66bcb5c.entry.js → p-f467153c.entry.js} +1 -1
  104. package/dist/sankhyablocks/p-f861bfcb.entry.js +1 -0
  105. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  106. package/dist/types/components/snk-application/snk-application.d.ts +10 -0
  107. package/dist/types/components/snk-configurator/snk-configurator.d.ts +6 -0
  108. package/dist/types/components/snk-crud/snk-crud.d.ts +4 -0
  109. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +5 -0
  110. package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +15 -0
  111. package/dist/types/components/snk-layout-form-config/snk-view-representation/snk-view-representation.d.ts +10 -0
  112. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -0
  113. package/dist/types/components.d.ts +77 -1
  114. package/dist/types/lib/configs/LayoutFormConfig.d.ts +11 -0
  115. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +6 -0
  116. package/package.json +1 -1
  117. package/react/components.d.ts +2 -0
  118. package/react/components.js +2 -0
  119. package/react/components.js.map +1 -1
  120. package/dist/cjs/ISave-e91b70a7.js +0 -9
  121. package/dist/esm/ISave-d8c8bc59.js +0 -9
  122. package/dist/sankhyablocks/p-04acdc3a.entry.js +0 -1
  123. package/dist/sankhyablocks/p-05fda408.entry.js +0 -1
  124. package/dist/sankhyablocks/p-1a8295af.entry.js +0 -1
  125. package/dist/sankhyablocks/p-1e48864c.js +0 -1
  126. package/dist/sankhyablocks/p-21749402.js +0 -1
  127. package/dist/sankhyablocks/p-22ddc147.js +0 -26
  128. package/dist/sankhyablocks/p-27d12f8f.entry.js +0 -1
  129. package/dist/sankhyablocks/p-3bab7e9c.entry.js +0 -1
  130. package/dist/sankhyablocks/p-3d424ae9.entry.js +0 -1
  131. package/dist/sankhyablocks/p-4b01cbad.entry.js +0 -11
  132. package/dist/sankhyablocks/p-4c9adf1c.entry.js +0 -1
  133. package/dist/sankhyablocks/p-6b898a51.entry.js +0 -1
  134. package/dist/sankhyablocks/p-9523fc40.entry.js +0 -1
  135. package/dist/sankhyablocks/p-a18de25e.js +0 -1
  136. package/dist/sankhyablocks/p-be2e5f36.entry.js +0 -1
  137. package/dist/sankhyablocks/p-d571e243.entry.js +0 -1
@@ -2,20 +2,19 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
2
2
  import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ServiceUtils, StorageType, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { D as DataFetcher } from './DataFetcher-ecf5f903.js';
4
4
  import { P as ParamType } from './ParamType-d5152b06.js';
5
- import './pesquisa-fetcher-e26c3295.js';
5
+ import './ISave-7d546dce.js';
6
6
  import './index-b40568ff.js';
7
- import './ISave-d8c8bc59.js';
8
7
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
9
8
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
10
9
  import './dataunit-fetcher-ed6e65ef.js';
11
10
  import './filter-item-type.enum-d45e026f.js';
12
- import { F as FormConfigFetcher } from './form-config-fetcher-34becd23.js';
11
+ import { F as FormConfigFetcher } from './form-config-fetcher-ac17cff4.js';
13
12
  import { O as ORDER_VALUES } from './constants-75abb876.js';
14
13
  import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
15
14
  import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
16
- import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
15
+ import { ApplicationUtils, DialogType, FormLayout } from '@sankhyalabs/ezui/dist/collection/utils';
17
16
  import { CheckMode } from '@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode';
18
- import { C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
17
+ import { C as ConfigStorage } from './ConfigStorage-9bd805d6.js';
19
18
  import './PrintUtils-3e4ff0f5.js';
20
19
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
21
20
  import '@sankhyalabs/core/dist/utils/SortingUtils';
@@ -1216,6 +1215,43 @@ const SnkGridConfig = class {
1216
1215
  };
1217
1216
  SnkGridConfig.style = snkGridConfigCss;
1218
1217
 
1218
+ const snkLayoutFormConfigCss = ".sc-snk-layout-form-config-h{display:block}";
1219
+
1220
+ const FORM_COL_CONFIG_PREFIX = 'formColCfg.';
1221
+ const SnkLayoutFormConfig = class {
1222
+ constructor(hostRef) {
1223
+ registerInstance(this, hostRef);
1224
+ this._formConfigFetcher = new FormConfigFetcher();
1225
+ this.layoutType = FormLayout.CASCADE;
1226
+ }
1227
+ /**
1228
+ * Salva o tipo de layout escolhido. Sem retorno.
1229
+ */
1230
+ async save() {
1231
+ this._LayoutFormConfigSingleton.setConfig(this.layoutType);
1232
+ this._formConfigFetcher.saveLayoutFormConfig(FORM_COL_CONFIG_PREFIX + this._resourceID, { config: this.layoutType, newConfig: true });
1233
+ }
1234
+ async componentWillLoad() {
1235
+ const _application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
1236
+ this._LayoutFormConfigSingleton = await (_application === null || _application === void 0 ? void 0 : _application.getLayoutFormConfig());
1237
+ this._resourceID = await (_application === null || _application === void 0 ? void 0 : _application.getResourceID());
1238
+ this.setLayoutInit();
1239
+ }
1240
+ setLayoutInit() {
1241
+ if (!this._LayoutFormConfigSingleton)
1242
+ return;
1243
+ const { config } = this._LayoutFormConfigSingleton;
1244
+ this.layoutType = Number(config) in FormLayout ? Number(config) : FormLayout.CASCADE;
1245
+ }
1246
+ toggleLayout(key) {
1247
+ this.layoutType = key;
1248
+ }
1249
+ render() {
1250
+ 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."))));
1251
+ }
1252
+ };
1253
+ SnkLayoutFormConfig.style = snkLayoutFormConfigCss;
1254
+
1219
1255
  const snkSelectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
1220
1256
 
1221
1257
  const SelectBox = class {
@@ -1322,6 +1358,27 @@ const SnkSimpleFormConfig = class {
1322
1358
  };
1323
1359
  SnkSimpleFormConfig.style = snkSimpleFormConfigCss;
1324
1360
 
1361
+ 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%}";
1362
+
1363
+ const SnkViewRepresentation = class {
1364
+ constructor(hostRef) {
1365
+ registerInstance(this, hostRef);
1366
+ this.mode = FormLayout.SIDE_BY_SIDE;
1367
+ }
1368
+ renderCascadeLayout() {
1369
+ 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" }))))));
1370
+ }
1371
+ renderSideBySideLayout() {
1372
+ return (h("div", { class: "svg-container__inline" }, [...Array(2)].map(() => this.renderCascadeLayout())));
1373
+ }
1374
+ render() {
1375
+ 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
1376
+ ? this.renderCascadeLayout()
1377
+ : this.renderSideBySideLayout())));
1378
+ }
1379
+ };
1380
+ SnkViewRepresentation.style = snkViewRepresentationCss;
1381
+
1325
1382
  const taskbarActionsButtonCss = ".sc-taskbar-actions-button-h{display:flex;width:fit-content;height:fit-content}";
1326
1383
 
1327
1384
  const TaskbarActionsButton = class {
@@ -1453,4 +1510,4 @@ const TaskbarActionsButton = class {
1453
1510
  };
1454
1511
  TaskbarActionsButton.style = taskbarActionsButtonCss;
1455
1512
 
1456
- export { SnkActionsButton as snk_actions_button, SnkGridConfig as snk_grid_config, SelectBox as snk_select_box, SnkSimpleFormConfig as snk_simple_form_config, TaskbarActionsButton as taskbar_actions_button };
1513
+ export { SnkActionsButton as snk_actions_button, SnkGridConfig as snk_grid_config, SnkLayoutFormConfig as snk_layout_form_config, SelectBox as snk_select_box, SnkSimpleFormConfig as snk_simple_form_config, SnkViewRepresentation as snk_view_representation, TaskbarActionsButton as taskbar_actions_button };
@@ -1,15 +1,16 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { DateUtils, StringUtils, ObjectUtils, WaitingChangeException, WarningException, ErrorException, KeyboardManager, OnboardingUtils, DependencyType, ArrayUtils, SearchUtils, ElementIDUtils, ApplicationContext, DataType, ErrorTracking, UserAgentUtils, LockManager, LockManagerOperation } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
- import { C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
4
+ import { C as ConfigStorage } from './ConfigStorage-9bd805d6.js';
5
5
  import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-ecf5f903.js';
6
- import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-9987c66e.js';
6
+ import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-07d33333.js';
7
7
  import { P as PreloadManager, D as DataUnitFetcher } from './dataunit-fetcher-ed6e65ef.js';
8
- import { P as PesquisaFetcher } from './pesquisa-fetcher-e26c3295.js';
8
+ import { P as PesquisaFetcher } from './ISave-7d546dce.js';
9
9
  import { S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
10
10
  import { T as TEMPLATES_SKELETON } from './constants-75abb876.js';
11
- import './form-config-fetcher-34becd23.js';
11
+ import './index-b40568ff.js';
12
12
  import './filter-item-type.enum-d45e026f.js';
13
+ import { F as FormConfigFetcher } from './form-config-fetcher-ac17cff4.js';
13
14
  import './PrintUtils-3e4ff0f5.js';
14
15
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
15
16
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
@@ -382,6 +383,32 @@ class RequestListenerFactory {
382
383
  }
383
384
  }
384
385
 
386
+ class LayoutFormConfig {
387
+ constructor() {
388
+ this._config = null;
389
+ this.listeners = [];
390
+ }
391
+ static getInstance() {
392
+ if (!LayoutFormConfig.instance) {
393
+ LayoutFormConfig.instance = new LayoutFormConfig();
394
+ }
395
+ return LayoutFormConfig.instance;
396
+ }
397
+ get config() {
398
+ return this._config;
399
+ }
400
+ setConfig(newConfig) {
401
+ this._config = newConfig;
402
+ this.notifyListeners();
403
+ }
404
+ onConfigChange(listener) {
405
+ this.listeners.push(listener);
406
+ }
407
+ notifyListeners() {
408
+ this.listeners.forEach(listener => listener(this._config));
409
+ }
410
+ }
411
+
385
412
  const snkApplicationCss = ".sc-snk-application-h{--scrim-z-index:var(--elevation--100, 100);display:flex;flex-direction:column;height:100%}.sc-snk-application-h>.loading-hidden.sc-snk-application{display:none;pointer-events:none}.skeleton-content-left.sc-snk-application{width:300px;padding-right:5px}.skeleton-content.sc-snk-application{height:calc(100vh - 310px)}.spinner.sc-snk-application{height:100vh;gap:10px}.spinner.sc-snk-application>.spin.sc-snk-application{animation-name:spin;animation-duration:5000ms;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";
386
413
 
387
414
  const SnkApplication = class {
@@ -401,6 +428,8 @@ const SnkApplication = class {
401
428
  this._pendingActions = new Map;
402
429
  this._loadPkParameter = null;
403
430
  this._isLoadedByPk = false;
431
+ this._formConfigFetcher = new FormConfigFetcher();
432
+ this._LayoutFormConfigSingleton = LayoutFormConfig.getInstance();
404
433
  this._applicationReady = false;
405
434
  this._templateSkeleton = TEMPLATES_SKELETON.GRID;
406
435
  this._activeScrimWindow = false;
@@ -475,6 +504,14 @@ const SnkApplication = class {
475
504
  async getKeyboardManager() {
476
505
  return Promise.resolve(this._keyboardManager);
477
506
  }
507
+ /**
508
+ * Obtém o notificador de Layout de formulario.
509
+ *
510
+ * @return {LayoutFormConfig} the Configurador de Layout do Formulario
511
+ */
512
+ async getLayoutFormConfig() {
513
+ return Promise.resolve(this._LayoutFormConfigSingleton);
514
+ }
478
515
  /**
479
516
  * Obtém `true` caso o usuário logado seja o SUP.
480
517
  */
@@ -1388,6 +1425,12 @@ const SnkApplication = class {
1388
1425
  ConfigStorage.preload(this.applicationResourceID, this.configName, legacyConfig);
1389
1426
  document.addEventListener("click", () => Workspace.applicationClick());
1390
1427
  this._waitingAppReady.forEach(resolve => resolve());
1428
+ this.setLayoutFormConfig();
1429
+ }
1430
+ async setLayoutFormConfig() {
1431
+ const response = await this._formConfigFetcher.fetchLayoutFormConfig('formColCfg.' + this.applicationResourceID);
1432
+ const config = isNaN(Number(response === null || response === void 0 ? void 0 : response.config)) ? null : Number(response === null || response === void 0 ? void 0 : response.config);
1433
+ this._LayoutFormConfigSingleton.setConfig(config);
1391
1434
  }
1392
1435
  connectedCallback() {
1393
1436
  this._isBrowserTypeElectron = UserAgentUtils.isElectron();
@@ -1,14 +1,13 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-a7d3d3f1.js';
2
2
  import { ApplicationContext, DataType, Action, UserInterface, StringUtils, DataUnitLoaderUtils, DataUnit } from '@sankhyalabs/core';
3
3
  import { D as DataFetcher } from './DataFetcher-ecf5f903.js';
4
- import './pesquisa-fetcher-e26c3295.js';
4
+ import { S as SaveErrorsEnum } from './ISave-7d546dce.js';
5
5
  import './index-b40568ff.js';
6
- import { S as SaveErrorsEnum } from './ISave-d8c8bc59.js';
7
6
  import { P as PreloadManager, D as DataUnitFetcher, I as InMemoryLoader } from './dataunit-fetcher-ed6e65ef.js';
8
7
  import './filter-item-type.enum-d45e026f.js';
9
- import './form-config-fetcher-34becd23.js';
8
+ import './form-config-fetcher-ac17cff4.js';
10
9
  import { V as VIEW_MODE } from './constants-75abb876.js';
11
- import { A as AutorizationType } from './auth-fetcher-9987c66e.js';
10
+ import { A as AutorizationType } from './auth-fetcher-07d33333.js';
12
11
  import { T as TaskbarElement } from './taskbar-elements-d2353c64.js';
13
12
  import './PrintUtils-3e4ff0f5.js';
14
13
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -3,12 +3,12 @@ import { UserInterface, ObjectUtils, StringUtils, ApplicationContext, ElementIDU
3
3
  import { DataType, getConvertedValue } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
4
4
  import { CheckMode, ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
5
5
  import { d as VARS_BY_TYPE, D as DEFAULT_TYPE, e as TAGS_BY_TYPE, C as CONFIG_EVENTS, a as CONFIG_SORTABLE_EVENTS, c as TAB_NAMES, A as ACTION_CONFIG } from './constants-75abb876.js';
6
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-1efd102b.js';
6
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-fbc6a9a8.js';
7
7
  import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
8
8
  import { S as Sortable } from './Sortable-83960219.js';
9
- import { U as UserConfigType } from './form-config-fetcher-34becd23.js';
9
+ import { U as UserConfigType } from './form-config-fetcher-ac17cff4.js';
10
10
  import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
11
- import './ConfigStorage-e5c1f4c0.js';
11
+ import './ConfigStorage-9bd805d6.js';
12
12
  import './filter-item-type.enum-d45e026f.js';
13
13
  import './DataFetcher-ecf5f903.js';
14
14
  import './PrintUtils-3e4ff0f5.js';
@@ -19,6 +19,7 @@ const SnkConfigurator = class {
19
19
  this.resourceID = undefined;
20
20
  this.viewMode = VIEW_MODE.GRID;
21
21
  this.customContainerId = undefined;
22
+ this.layoutFormConfig = false;
22
23
  this.messagesBuilder = undefined;
23
24
  }
24
25
  /**
@@ -79,6 +80,12 @@ const SnkConfigurator = class {
79
80
  var _a;
80
81
  return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, {});
81
82
  }
83
+ handleSave() {
84
+ if (this.layoutFormConfig) {
85
+ this._snkLayoutFormConfig.save();
86
+ }
87
+ this.save.emit();
88
+ }
82
89
  componentWillLoad() {
83
90
  this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
84
91
  if (this._application) {
@@ -102,7 +109,7 @@ const SnkConfigurator = class {
102
109
  insideCustomElementsContainer === null || insideCustomElementsContainer === void 0 ? void 0 : insideCustomElementsContainer.appendChild(configuratorCustomElement);
103
110
  }
104
111
  render() {
105
- return (h("ez-modal", { ref: (element) => (this.modal = element), opened: this._opened, "close-esc": false, "close-outside-click": false, "modal-size": "small", scrim: "light" }, h("div", { class: "snk-configurator" }, h("div", { class: "snk-configurator__header" }, h("label", { class: "snk-configurator__title" }, this.getMessage('snkConfigurator.titleConfigurations')), h("div", { class: "snk-configurator__button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", onClick: () => this.closeConfig() }))), h("div", { class: "snk-configurator__main" }, h("ez-collapsible-box", { boxBordered: true, label: "Modo de visualiza\u00E7\u00E3o ", headerSize: "medium", class: "snk-configurator__collapsable-box" }, h("ez-radio-button", { value: this.getViewModeValue().toString(), onEzChange: (evt) => this.onViewModeChanged(evt), enabled: this.enableModeConfig() }, h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelGrid'), value: VIEW_MODE.GRID }), h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelForm'), value: VIEW_MODE.FORM })), h("div", { class: "snk-configurator__collsable-box-action" }, h("ez-button", { label: this.viewMode === VIEW_MODE.GRID ? this.getMessage('snkConfigurator.labelConfigGrid') : this.getMessage('snkConfigurator.labelConfigForm'), class: "snk-configurator__button-config ez-button--secondary", onClick: () => this.onClickOpenConfig(), id: "openConfigurator" }))), h("div", { id: "slotContainer", class: "snk-configurator__outline" })), this.showActionButtons && (h("div", { class: "snk-configurator__action-buttons" }, h("ez-button", { label: "Cancelar", onClick: () => this.cancel.emit() }), h("ez-button", { label: "Salvar", onClick: () => this.save.emit(), class: "ez-button--primary" }))))));
112
+ return (h("ez-modal", { ref: (element) => (this.modal = element), opened: this._opened, "close-esc": false, "close-outside-click": false, "modal-size": "small", scrim: "light" }, h("div", { class: "snk-configurator" }, h("div", { class: "snk-configurator__header" }, h("label", { class: "snk-configurator__title" }, this.getMessage('snkConfigurator.titleConfigurations')), h("div", { class: "snk-configurator__button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", onClick: () => this.closeConfig() }))), h("div", { class: "snk-configurator__main" }, h("ez-collapsible-box", { boxBordered: true, label: "Modo de visualiza\u00E7\u00E3o ", headerSize: "medium", class: "snk-configurator__collapsable-box" }, h("ez-radio-button", { value: this.getViewModeValue().toString(), onEzChange: (evt) => this.onViewModeChanged(evt), enabled: this.enableModeConfig() }, h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelGrid'), value: VIEW_MODE.GRID }), h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelForm'), value: VIEW_MODE.FORM })), h("div", { class: "snk-configurator__collsable-box-action" }, h("ez-button", { label: this.viewMode === VIEW_MODE.GRID ? this.getMessage('snkConfigurator.labelConfigGrid') : this.getMessage('snkConfigurator.labelConfigForm'), class: "snk-configurator__button-config ez-button--secondary", onClick: () => this.onClickOpenConfig(), id: "openConfigurator" }))), this.layoutFormConfig && h("ez-collapsible-box", { boxBordered: true, value: true, label: "Layout do formul\u00E1rio", headerSize: "medium", class: "snk-configurator__collapsable-box ez-margin-top--medium" }, h("div", { class: 'ez-flex ez-flex--column ez-size-width--full' }, h("snk-layout-form-config", { ref: (ref) => this._snkLayoutFormConfig = ref }))), h("div", { id: "slotContainer", class: "snk-configurator__outline" })), this.showActionButtons && (h("div", { class: "snk-configurator__action-buttons" }, h("ez-button", { label: "Cancelar", onClick: () => this.cancel.emit() }), h("ez-button", { label: "Salvar", onClick: () => this.handleSave(), class: "ez-button--primary" }))))));
106
113
  }
107
114
  get _element() { return getElement(this); }
108
115
  };
@@ -2,16 +2,15 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
2
2
  import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
3
3
  import { T as TaskbarElement } from './taskbar-elements-d2353c64.js';
4
4
  import './DataFetcher-ecf5f903.js';
5
- import './pesquisa-fetcher-e26c3295.js';
5
+ import './ISave-7d546dce.js';
6
6
  import { P as PresentationMode, E as ExporterStrategy } from './index-b40568ff.js';
7
- import './ISave-d8c8bc59.js';
8
7
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
9
8
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
10
9
  import './dataunit-fetcher-ed6e65ef.js';
11
10
  import './filter-item-type.enum-d45e026f.js';
12
- import './form-config-fetcher-34becd23.js';
11
+ import './form-config-fetcher-ac17cff4.js';
13
12
  import { V as VIEW_MODE } from './constants-75abb876.js';
14
- import { A as AutorizationType } from './auth-fetcher-9987c66e.js';
13
+ import { A as AutorizationType } from './auth-fetcher-07d33333.js';
15
14
  import './index-bdf75557.js';
16
15
  import './PrintUtils-3e4ff0f5.js';
17
16
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
@@ -63,6 +62,7 @@ const SnkCrud = class {
63
62
  this.ignoreReadOnlyFormFields = undefined;
64
63
  this.setCustomFormTitle = undefined;
65
64
  this.strategyExporter = ExporterStrategy.SERVER_SIDE;
65
+ this.layoutFormConfig = false;
66
66
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
67
67
  }
68
68
  /**
@@ -397,7 +397,7 @@ const SnkCrud = class {
397
397
  return;
398
398
  }
399
399
  this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
400
- return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
400
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, strategyExporter: this.strategyExporter }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
401
401
  }
402
402
  get _element() { return getElement(this); }
403
403
  static get watchers() { return {
@@ -6,13 +6,12 @@ import { D as DataExporterOption, a as DataExporterType, b as DataExporterFormat
6
6
  import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-75abb876.js';
7
7
  import { D as DataFetcher } from './DataFetcher-ecf5f903.js';
8
8
  import { S as SnkDataUnit } from './snk-data-unit-6258b8ae.js';
9
- import './pesquisa-fetcher-e26c3295.js';
10
- import './ISave-d8c8bc59.js';
9
+ import './ISave-7d546dce.js';
11
10
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
12
11
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
13
12
  import './dataunit-fetcher-ed6e65ef.js';
14
13
  import './filter-item-type.enum-d45e026f.js';
15
- import './form-config-fetcher-34becd23.js';
14
+ import './form-config-fetcher-ac17cff4.js';
16
15
  import './PrintUtils-3e4ff0f5.js';
17
16
  import './SnkMessageBuilder-6fff4a4c.js';
18
17
  import '@sankhyalabs/core/dist/dataunit/metadata/DataType';
@@ -1,21 +1,20 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
2
2
  import { Action } from '@sankhyalabs/core';
3
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-1efd102b.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-fbc6a9a8.js';
4
4
  import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import './DataFetcher-ecf5f903.js';
6
- import './pesquisa-fetcher-e26c3295.js';
6
+ import './ISave-7d546dce.js';
7
7
  import { P as PresentationMode } from './index-b40568ff.js';
8
- import './ISave-d8c8bc59.js';
9
8
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
10
9
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
11
10
  import './dataunit-fetcher-ed6e65ef.js';
12
11
  import './filter-item-type.enum-d45e026f.js';
13
- import './form-config-fetcher-34becd23.js';
12
+ import './form-config-fetcher-ac17cff4.js';
14
13
  import { V as VIEW_MODE } from './constants-75abb876.js';
15
14
  import { T as TaskbarElement } from './taskbar-elements-d2353c64.js';
16
- import { S as SnkGuidesViewer } from './snk-guides-viewer-9e43d0ca.js';
15
+ import { S as SnkGuidesViewer } from './snk-guides-viewer-80a8709c.js';
17
16
  import { S as SnkMessageBuilder } from './SnkMessageBuilder-6fff4a4c.js';
18
- import './ConfigStorage-e5c1f4c0.js';
17
+ import './ConfigStorage-9bd805d6.js';
19
18
  import './PrintUtils-3e4ff0f5.js';
20
19
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
21
20
  import '@sankhyalabs/core/dist/utils/SortingUtils';
@@ -67,7 +66,7 @@ class GuideBuilder {
67
66
  }
68
67
  }
69
68
 
70
- const snkDetailViewCss = ".sc-snk-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%}.level-path.sc-snk-detail-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.form-taskbar.sc-snk-detail-view{padding-bottom:var(--space--medium)}.grid-container.sc-snk-detail-view{background-color:#FFF;min-height:100px}.detail-header.sc-snk-detail-view{padding-bottom:0}";
69
+ const snkDetailViewCss = ".sc-snk-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%}.level-path.sc-snk-detail-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.form-taskbar.sc-snk-detail-view{padding-bottom:var(--space--medium)}.grid-container.sc-snk-detail-view{background-color:#FFF;min-height:100px;height:100%}.detail-header.sc-snk-detail-view{padding-bottom:0}snk-data-unit.sc-snk-detail-view{flex:1}snk-grid.sc-snk-detail-view{height:calc(100% - 43px)}";
71
70
 
72
71
  const SnkDetailView = class {
73
72
  constructor(hostRef) {
@@ -93,6 +92,7 @@ const SnkDetailView = class {
93
92
  this.taskbarCustomContainerId = undefined;
94
93
  this.customEditors = undefined;
95
94
  this.customRenders = undefined;
95
+ this.presentationMode = PresentationMode.SECONDARY;
96
96
  }
97
97
  observeDataUnit(newDataUnit, oldDataUnit) {
98
98
  newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
@@ -312,7 +312,7 @@ const SnkDetailView = class {
312
312
  render() {
313
313
  this.updateLabel();
314
314
  //const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
315
- return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS", outlineMode: false }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
315
+ return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: this.presentationMode, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS", outlineMode: false }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: this.presentationMode, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
316
316
  }
317
317
  static get watchers() { return {
318
318
  "dataUnit": ["observeDataUnit"],
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext, LockManager, LockManagerOperation, FloatingManager, DateUtils, MaskFormatter, ArrayUtils } from '@sankhyalabs/core';
3
3
  import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
4
- import { C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
4
+ import { C as ConfigStorage } from './ConfigStorage-9bd805d6.js';
5
5
  import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
6
6
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
7
7
  import { F as FilterOperand } from './index-ae591a44.js';
@@ -10,7 +10,7 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
10
10
  import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-e2b38ef7.js';
11
11
  import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
12
12
  import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
13
- import './form-config-fetcher-34becd23.js';
13
+ import './form-config-fetcher-ac17cff4.js';
14
14
  import './DataFetcher-ecf5f903.js';
15
15
  import './PrintUtils-3e4ff0f5.js';
16
16
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -2,9 +2,9 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
2
2
  import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
3
3
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
4
4
  import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
5
- import { C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
5
+ import { C as ConfigStorage } from './ConfigStorage-9bd805d6.js';
6
6
  import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
7
- import './form-config-fetcher-34becd23.js';
7
+ import './form-config-fetcher-ac17cff4.js';
8
8
  import './DataFetcher-ecf5f903.js';
9
9
  import './PrintUtils-3e4ff0f5.js';
10
10
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -1,20 +1,19 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { Action, ElementIDUtils, ApplicationContext, StringUtils } from '@sankhyalabs/core';
3
3
  import { T as TaskbarElement } from './taskbar-elements-d2353c64.js';
4
- import { C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
4
+ import { C as ConfigStorage } from './ConfigStorage-9bd805d6.js';
5
5
  import { P as PresentationMode, E as ExporterStrategy } from './index-b40568ff.js';
6
6
  import { T as TaskbarProcessor, o as openFieldSearch, b as buildFieldSearch } from './field-search-f8b1d91e.js';
7
7
  import { s as store } from './index-bdf75557.js';
8
- import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './ClientSideExporterProvider-e42c5a48.js';
8
+ import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter, b as ContinuousInsertUtils, c as ClientSideExporterProvider } from './ClientSideExporterProvider-8191676b.js';
9
9
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
10
10
  import './DataFetcher-ecf5f903.js';
11
- import './pesquisa-fetcher-e26c3295.js';
12
- import './ISave-d8c8bc59.js';
11
+ import './ISave-7d546dce.js';
13
12
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
14
13
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
15
14
  import './dataunit-fetcher-ed6e65ef.js';
16
15
  import './filter-item-type.enum-d45e026f.js';
17
- import './form-config-fetcher-34becd23.js';
16
+ import './form-config-fetcher-ac17cff4.js';
18
17
  import './constants-75abb876.js';
19
18
  import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
20
19
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
@@ -1,19 +1,18 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-a7d3d3f1.js';
2
2
  import { Action, ElementIDUtils } from '@sankhyalabs/core';
3
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-1efd102b.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-fbc6a9a8.js';
4
4
  import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } from './field-search-f8b1d91e.js';
6
6
  import { T as TaskbarElement } from './taskbar-elements-d2353c64.js';
7
7
  import { V as VIEW_MODE } from './constants-75abb876.js';
8
8
  import './DataFetcher-ecf5f903.js';
9
- import './pesquisa-fetcher-e26c3295.js';
9
+ import './ISave-7d546dce.js';
10
10
  import { P as PresentationMode } from './index-b40568ff.js';
11
- import './ISave-d8c8bc59.js';
12
11
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
13
12
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
14
13
  import './dataunit-fetcher-ed6e65ef.js';
15
14
  import './filter-item-type.enum-d45e026f.js';
16
- import './form-config-fetcher-34becd23.js';
15
+ import './form-config-fetcher-ac17cff4.js';
17
16
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
18
17
 
19
18
  const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-small:var(--space--2xs, 8px);--snk-guides-viewer__header--min-height:68px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-small);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-small));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-small))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
@@ -298,7 +297,7 @@ const SnkGuidesViewer = class {
298
297
  else {
299
298
  detailBranch = this.selectedGuide;
300
299
  }
301
- content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders }));
300
+ content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode }));
302
301
  }
303
302
  else {
304
303
  const cardId = this.selectedGuide.id;
@@ -1,9 +1,9 @@
1
- export { S as snk_guides_viewer } from './snk-guides-viewer-9e43d0ca.js';
1
+ export { S as snk_guides_viewer } from './snk-guides-viewer-80a8709c.js';
2
2
  import './index-a7d3d3f1.js';
3
3
  import '@sankhyalabs/core';
4
- import './SnkFormConfigManager-1efd102b.js';
5
- import './ConfigStorage-e5c1f4c0.js';
6
- import './form-config-fetcher-34becd23.js';
4
+ import './SnkFormConfigManager-fbc6a9a8.js';
5
+ import './ConfigStorage-9bd805d6.js';
6
+ import './form-config-fetcher-ac17cff4.js';
7
7
  import './DataFetcher-ecf5f903.js';
8
8
  import './PrintUtils-3e4ff0f5.js';
9
9
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -14,8 +14,7 @@ import './field-search-f8b1d91e.js';
14
14
  import './taskbar-elements-d2353c64.js';
15
15
  import './index-b40568ff.js';
16
16
  import './index-bdf75557.js';
17
- import './pesquisa-fetcher-e26c3295.js';
18
- import './ISave-d8c8bc59.js';
17
+ import './ISave-7d546dce.js';
19
18
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
20
19
  import './dataunit-fetcher-ed6e65ef.js';
21
20
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
@@ -1,12 +1,12 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-a7d3d3f1.js';
2
2
  import { StringUtils, ObjectUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-e2b38ef7.js';
4
- import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage-e5c1f4c0.js';
4
+ import { P as PersonalizedFilterFetcher, C as ConfigStorage } from './ConfigStorage-9bd805d6.js';
5
5
  import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
6
6
  import { a as FilterGroupCondition } from './index-ae591a44.js';
7
7
  import { s as store } from './index-bdf75557.js';
8
8
  import './filter-item-type.enum-d45e026f.js';
9
- import './form-config-fetcher-34becd23.js';
9
+ import './form-config-fetcher-ac17cff4.js';
10
10
  import './DataFetcher-ecf5f903.js';
11
11
  import './PrintUtils-3e4ff0f5.js';
12
12
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
@@ -1,14 +1,13 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { ObjectUtils, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
- import { P as PesquisaFetcher, b as buildGridMetadata, a as PESQUISA_VIEW_MODE } from './pesquisa-fetcher-e26c3295.js';
3
+ import { P as PesquisaFetcher, b as buildGridMetadata, a as PESQUISA_VIEW_MODE } from './ISave-7d546dce.js';
4
4
  import './DataFetcher-ecf5f903.js';
5
5
  import './index-b40568ff.js';
6
- import './ISave-d8c8bc59.js';
7
6
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
8
7
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
9
8
  import './dataunit-fetcher-ed6e65ef.js';
10
9
  import './filter-item-type.enum-d45e026f.js';
11
- import './form-config-fetcher-34becd23.js';
10
+ import './form-config-fetcher-ac17cff4.js';
12
11
  import './constants-75abb876.js';
13
12
  import './PrintUtils-3e4ff0f5.js';
14
13
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';