@sankhyalabs/sankhyablocks 8.8.0-rc.7 → 8.8.0-rc.9

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 (97) hide show
  1. package/dist/cjs/{ConfigStorage-bdb539ce.js → ConfigStorage-908ce5bc.js} +2 -2
  2. package/dist/cjs/{DataFetcher-016f1661.js → DataFetcher-713f0749.js} +2 -2
  3. package/dist/cjs/{SnkFormConfigManager-c9d38de1.js → SnkFormConfigManager-793ade39.js} +2 -2
  4. package/dist/cjs/{SnkMultiSelectionListDataSource-49120c1a.js → SnkMultiSelectionListDataSource-f000a53f.js} +1 -1
  5. package/dist/cjs/{auth-fetcher-73ee0989.js → auth-fetcher-555ff856.js} +1 -1
  6. package/dist/cjs/{dataunit-fetcher-d2b1e486.js → dataunit-fetcher-e86cba8a.js} +1 -1
  7. package/dist/cjs/{form-config-fetcher-5e5ec5be.js → form-config-fetcher-17775a75.js} +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{pesquisa-fetcher-63a8c652.js → pesquisa-fetcher-34922b83.js} +1 -1
  10. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  11. package/dist/cjs/snk-actions-button.cjs.entry.js +4 -4
  12. package/dist/cjs/snk-application.cjs.entry.js +14 -6
  13. package/dist/cjs/snk-attach.cjs.entry.js +2 -2
  14. package/dist/cjs/snk-crud.cjs.entry.js +5 -5
  15. package/dist/cjs/snk-data-exporter.cjs.entry.js +1 -1
  16. package/dist/cjs/snk-detail-view.cjs.entry.js +22 -8
  17. package/dist/cjs/snk-filter-bar.cjs.entry.js +19 -4
  18. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  19. package/dist/cjs/snk-form-config.cjs.entry.js +2 -2
  20. package/dist/cjs/snk-form.cjs.entry.js +4 -4
  21. package/dist/cjs/snk-grid-config.cjs.entry.js +3 -3
  22. package/dist/cjs/snk-grid.cjs.entry.js +5 -5
  23. package/dist/cjs/{snk-guides-viewer-724cdac7.js → snk-guides-viewer-22e180b5.js} +77 -5
  24. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  25. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  26. package/dist/cjs/snk-simple-crud.cjs.entry.js +5 -5
  27. package/dist/collection/components/snk-application/snk-application.js +1 -0
  28. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +18 -1
  29. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +80 -8
  30. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +17 -2
  31. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +2 -2
  32. package/dist/collection/lib/workspace/workspace.js +7 -0
  33. package/dist/components/DataFetcher.js +2 -2
  34. package/dist/components/snk-application2.js +8 -0
  35. package/dist/components/snk-detail-view2.js +88 -2
  36. package/dist/components/snk-filter-bar2.js +17 -2
  37. package/dist/esm/{ConfigStorage-9840d004.js → ConfigStorage-48648d45.js} +2 -2
  38. package/dist/esm/{DataFetcher-07935045.js → DataFetcher-79f78222.js} +2 -2
  39. package/dist/esm/{SnkFormConfigManager-a7c4ac16.js → SnkFormConfigManager-3c15f319.js} +2 -2
  40. package/dist/esm/{SnkMultiSelectionListDataSource-52cd2213.js → SnkMultiSelectionListDataSource-922f0941.js} +1 -1
  41. package/dist/esm/{auth-fetcher-1afab780.js → auth-fetcher-e260d0cd.js} +1 -1
  42. package/dist/esm/{dataunit-fetcher-e7cb71d2.js → dataunit-fetcher-ec40608e.js} +1 -1
  43. package/dist/esm/{form-config-fetcher-5b886892.js → form-config-fetcher-e1603e66.js} +1 -1
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/esm/{pesquisa-fetcher-7c46996d.js → pesquisa-fetcher-8e922c9d.js} +1 -1
  46. package/dist/esm/sankhyablocks.js +1 -1
  47. package/dist/esm/snk-actions-button.entry.js +4 -4
  48. package/dist/esm/snk-application.entry.js +14 -6
  49. package/dist/esm/snk-attach.entry.js +2 -2
  50. package/dist/esm/snk-crud.entry.js +5 -5
  51. package/dist/esm/snk-data-exporter.entry.js +1 -1
  52. package/dist/esm/snk-detail-view.entry.js +22 -8
  53. package/dist/esm/snk-filter-bar.entry.js +20 -5
  54. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  55. package/dist/esm/snk-form-config.entry.js +2 -2
  56. package/dist/esm/snk-form.entry.js +4 -4
  57. package/dist/esm/snk-grid-config.entry.js +3 -3
  58. package/dist/esm/snk-grid.entry.js +5 -5
  59. package/dist/esm/{snk-guides-viewer-fbe0c5a6.js → snk-guides-viewer-f5f50062.js} +78 -6
  60. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  61. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  62. package/dist/esm/snk-simple-crud.entry.js +5 -5
  63. package/dist/sankhyablocks/{p-b19c272c.js → p-2b39abbc.js} +1 -1
  64. package/dist/sankhyablocks/{p-1b985000.entry.js → p-2ecd9a19.entry.js} +1 -1
  65. package/dist/sankhyablocks/{p-48ec4931.entry.js → p-3307f385.entry.js} +1 -1
  66. package/dist/sankhyablocks/{p-de9eb242.entry.js → p-395567f3.entry.js} +1 -1
  67. package/dist/sankhyablocks/p-3c884841.entry.js +11 -0
  68. package/dist/sankhyablocks/{p-1c32a70d.entry.js → p-3fd5b4c1.entry.js} +1 -1
  69. package/dist/sankhyablocks/{p-efb2e247.js → p-41d156dd.js} +1 -1
  70. package/dist/sankhyablocks/{p-aeb2298c.js → p-43cbd6ba.js} +1 -1
  71. package/dist/sankhyablocks/{p-0f2b03e5.js → p-4651b43f.js} +1 -1
  72. package/dist/sankhyablocks/p-5b4b85a9.entry.js +1 -0
  73. package/dist/sankhyablocks/p-63784e83.js +1 -0
  74. package/dist/sankhyablocks/{p-54efcc8d.entry.js → p-747043a5.entry.js} +1 -1
  75. package/dist/sankhyablocks/{p-96dd0c41.js → p-8015cbfb.js} +1 -1
  76. package/dist/sankhyablocks/{p-562896d0.entry.js → p-80692cbd.entry.js} +1 -1
  77. package/dist/sankhyablocks/{p-b4a0b2e3.js → p-9713c75c.js} +2 -2
  78. package/dist/sankhyablocks/{p-afdb6ddc.entry.js → p-abff11ef.entry.js} +1 -1
  79. package/dist/sankhyablocks/{p-9246d7df.entry.js → p-afacdce6.entry.js} +1 -1
  80. package/dist/sankhyablocks/{p-64e2d600.entry.js → p-c0c48f19.entry.js} +1 -1
  81. package/dist/sankhyablocks/{p-4f7b9c50.js → p-c9399ce6.js} +1 -1
  82. package/dist/sankhyablocks/p-d0b36421.js +1 -0
  83. package/dist/sankhyablocks/{p-13e22fee.entry.js → p-e040c626.entry.js} +1 -1
  84. package/dist/sankhyablocks/p-ea573860.entry.js +1 -0
  85. package/dist/sankhyablocks/{p-a9de84fc.entry.js → p-efc9b851.entry.js} +1 -1
  86. package/dist/sankhyablocks/p-f07a5363.entry.js +1 -0
  87. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  88. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +3 -0
  89. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +22 -11
  90. package/dist/types/lib/workspace/workspace.d.ts +1 -0
  91. package/package.json +1 -1
  92. package/dist/sankhyablocks/p-43f36d85.entry.js +0 -1
  93. package/dist/sankhyablocks/p-61755a99.js +0 -1
  94. package/dist/sankhyablocks/p-76aa485c.entry.js +0 -1
  95. package/dist/sankhyablocks/p-bc6b332c.entry.js +0 -1
  96. package/dist/sankhyablocks/p-de1196c8.js +0 -1
  97. package/dist/sankhyablocks/p-f2aba462.entry.js +0 -11
@@ -6,18 +6,18 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
8
8
  const taskbarElements = require('./taskbar-elements-39949c7a.js');
9
- const ConfigStorage = require('./ConfigStorage-bdb539ce.js');
9
+ const ConfigStorage = require('./ConfigStorage-908ce5bc.js');
10
10
  const index$1 = require('./index-0e663819.js');
11
11
  const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
12
12
  const index$2 = require('./index-102ba62d.js');
13
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-49120c1a.js');
13
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-f000a53f.js');
14
14
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
15
- require('./form-config-fetcher-5e5ec5be.js');
16
- require('./DataFetcher-016f1661.js');
15
+ require('./form-config-fetcher-17775a75.js');
16
+ require('./DataFetcher-713f0749.js');
17
17
  require('./_commonjsHelpers-537d719a.js');
18
18
  require('./PrintUtils-bcaeb82f.js');
19
19
  require('./filter-item-type.enum-aa823a00.js');
20
- require('./dataunit-fetcher-d2b1e486.js');
20
+ require('./dataunit-fetcher-e86cba8a.js');
21
21
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
22
22
  require('./ResourceIDUtils-5ff86aa7.js');
23
23
 
@@ -2,20 +2,20 @@
2
2
 
3
3
  const index = require('./index-f9e81701.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const SnkFormConfigManager = require('./SnkFormConfigManager-c9d38de1.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-793ade39.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
7
  const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
8
8
  const taskbarElements = require('./taskbar-elements-39949c7a.js');
9
9
  const constants = require('./constants-d187e03e.js');
10
- require('./DataFetcher-016f1661.js');
11
- require('./pesquisa-fetcher-63a8c652.js');
10
+ require('./DataFetcher-713f0749.js');
11
+ require('./pesquisa-fetcher-34922b83.js');
12
12
  const index$1 = require('./index-0e663819.js');
13
13
  require('./ISave-d68ce3cd.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
15
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
16
- require('./dataunit-fetcher-d2b1e486.js');
16
+ require('./dataunit-fetcher-e86cba8a.js');
17
17
  require('./filter-item-type.enum-aa823a00.js');
18
- require('./form-config-fetcher-5e5ec5be.js');
18
+ require('./form-config-fetcher-17775a75.js');
19
19
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
20
20
 
21
21
  const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-medium:var(--space--medium, 12px);--snk-guides-viewer__header--min-height:94px;--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-medium);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-medium)}.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-medium));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-medium))}.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}";
@@ -140,6 +140,12 @@ const SnkGuidesViewer = class {
140
140
  this._breadcrumbItems = breadcrumbs;
141
141
  });
142
142
  });
143
+ this._guides = this._guides.map(guide => {
144
+ if (guide.id === guideItem.id) {
145
+ return Object.assign(Object.assign({}, guide), guideItem);
146
+ }
147
+ return guide;
148
+ });
143
149
  }
144
150
  }
145
151
  loadTaskbarProcessor() {
@@ -267,6 +273,28 @@ const SnkGuidesViewer = class {
267
273
  this._guideNavigator.getCurrentPath().then(breadcrumbs => {
268
274
  this._breadcrumbItems = breadcrumbs;
269
275
  });
276
+ this.resetGuideBadge(currentItem);
277
+ }
278
+ resetGuideBadge(selectedGuide) {
279
+ var _a;
280
+ this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
281
+ if (this.canClearGuideBadge(guide, selectedGuide.id)) {
282
+ return Object.assign(Object.assign({}, guide), { badge: null });
283
+ }
284
+ return guide;
285
+ })];
286
+ }
287
+ canClearGuideBadge(guide, idToCheck) {
288
+ return (guide.id === idToCheck) || this.isIncludedInChildrenList(guide, idToCheck);
289
+ }
290
+ isIncludedInChildrenList(guide, guideId) {
291
+ return this.hasChildren(guide) && this.getChildrenIdList(guide).includes(guideId);
292
+ }
293
+ hasChildren(guide) {
294
+ return guide.children && Array.isArray(guide.children);
295
+ }
296
+ getChildrenIdList(guide) {
297
+ return (guide.children).map(guideChild => guideChild.id);
270
298
  }
271
299
  getConfigViewMode() {
272
300
  return constants.VIEW_MODE.GRID;
@@ -316,6 +344,50 @@ const SnkGuidesViewer = class {
316
344
  var _a;
317
345
  return index.h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != index$1.PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, index.h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
318
346
  }
347
+ async dataUnitActionHandler(action) {
348
+ var _a;
349
+ if (action.type === core.Action.FIELD_INVALIDATED) {
350
+ const guideName = this.getGuideName((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fieldName);
351
+ await this.addErrorBadgeToGuide(guideName);
352
+ await this.openGuideNavigator(guideName);
353
+ }
354
+ }
355
+ async addErrorBadgeToGuide(guideName) {
356
+ var _a;
357
+ this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
358
+ return Object.assign(Object.assign({}, guide), { badge: this.getBadge(guide, guideName) });
359
+ })];
360
+ }
361
+ async openGuideNavigator(guideName) {
362
+ if (this.selectedGuide.id !== guideName) {
363
+ await this._guideNavigator.openGuideNavidator();
364
+ }
365
+ }
366
+ getBadge(guide, tabName) {
367
+ var _a;
368
+ if (this.selectedGuide.id === tabName) {
369
+ return null;
370
+ }
371
+ if (tabName === guide.id) {
372
+ return "error";
373
+ }
374
+ return (_a = guide.badge) !== null && _a !== void 0 ? _a : null;
375
+ }
376
+ getGuideName(fieldName) {
377
+ var _a;
378
+ for (const sheet of this._masterFormMetadata.getAllSheets()) {
379
+ const formFields = (_a = sheet[1]) === null || _a === void 0 ? void 0 : _a.fields;
380
+ for (const field of formFields) {
381
+ if (field.name === fieldName) {
382
+ return sheet[0];
383
+ }
384
+ }
385
+ }
386
+ return "";
387
+ }
388
+ componentDidLoad() {
389
+ this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
390
+ }
319
391
  render() {
320
392
  var _a, _b;
321
393
  if (this._formEditorConfigManager != undefined) {
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-724cdac7.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-22e180b5.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-c9d38de1.js');
9
- require('./ConfigStorage-bdb539ce.js');
10
- require('./form-config-fetcher-5e5ec5be.js');
11
- require('./DataFetcher-016f1661.js');
8
+ require('./SnkFormConfigManager-793ade39.js');
9
+ require('./ConfigStorage-908ce5bc.js');
10
+ require('./form-config-fetcher-17775a75.js');
11
+ require('./DataFetcher-713f0749.js');
12
12
  require('./_commonjsHelpers-537d719a.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
14
  require('./PrintUtils-bcaeb82f.js');
@@ -19,10 +19,10 @@ require('./taskbar-elements-39949c7a.js');
19
19
  require('./index-0e663819.js');
20
20
  require('./index-102ba62d.js');
21
21
  require('./constants-d187e03e.js');
22
- require('./pesquisa-fetcher-63a8c652.js');
22
+ require('./pesquisa-fetcher-34922b83.js');
23
23
  require('./ISave-d68ce3cd.js');
24
24
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
25
- require('./dataunit-fetcher-d2b1e486.js');
25
+ require('./dataunit-fetcher-e86cba8a.js');
26
26
  require('./ResourceIDUtils-5ff86aa7.js');
27
27
  require('@sankhyalabs/core/dist/dataunit/DataUnit');
28
28
 
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-1aeb625d.js');
8
- const ConfigStorage = require('./ConfigStorage-bdb539ce.js');
8
+ const ConfigStorage = require('./ConfigStorage-908ce5bc.js');
9
9
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
10
10
  const index$1 = require('./index-c5771aba.js');
11
11
  const index$2 = require('./index-102ba62d.js');
12
12
  require('./filter-item-type.enum-aa823a00.js');
13
- require('./form-config-fetcher-5e5ec5be.js');
14
- require('./DataFetcher-016f1661.js');
13
+ require('./form-config-fetcher-17775a75.js');
14
+ require('./DataFetcher-713f0749.js');
15
15
  require('./_commonjsHelpers-537d719a.js');
16
16
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
17
17
  require('./PrintUtils-bcaeb82f.js');
@@ -6,17 +6,17 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const constants = require('./constants-d187e03e.js');
8
8
  const taskbarElements = require('./taskbar-elements-39949c7a.js');
9
- require('./DataFetcher-016f1661.js');
10
- require('./pesquisa-fetcher-63a8c652.js');
9
+ require('./DataFetcher-713f0749.js');
10
+ require('./pesquisa-fetcher-34922b83.js');
11
11
  const index$1 = require('./index-0e663819.js');
12
12
  require('./ISave-d68ce3cd.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- const dataunitFetcher = require('./dataunit-fetcher-d2b1e486.js');
15
+ const dataunitFetcher = require('./dataunit-fetcher-e86cba8a.js');
16
16
  require('./filter-item-type.enum-aa823a00.js');
17
- require('./form-config-fetcher-5e5ec5be.js');
17
+ require('./form-config-fetcher-17775a75.js');
18
18
  const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
19
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-49120c1a.js');
19
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-f000a53f.js');
20
20
  require('./index-102ba62d.js');
21
21
  require('./_commonjsHelpers-537d719a.js');
22
22
  require('./PrintUtils-bcaeb82f.js');
@@ -830,6 +830,7 @@ export class SnkApplication {
830
830
  }, 100);
831
831
  ErrorTracking.init();
832
832
  ConfigStorage.preload(this.applicationResourceID, this.configName);
833
+ document.addEventListener("click", () => Workspace.applicationClick());
833
834
  }
834
835
  connectedCallback() {
835
836
  ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
@@ -1,3 +1,4 @@
1
+ import { Action } from '@sankhyalabs/core';
1
2
  import { Host, forceUpdate, h } from '@stencil/core';
2
3
  import { SnkFormConfigManager } from '../../../snk-form/SnkFormConfigManager';
3
4
  import { buildFormMetadata } from "@sankhyalabs/ezui/dist/collection/utils/form";
@@ -26,6 +27,10 @@ export class SnkDetailView {
26
27
  this.canEdit = true;
27
28
  this.taskbarCustomContainerId = undefined;
28
29
  }
30
+ observeDataUnit(newDataUnit, oldDataUnit) {
31
+ newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
32
+ oldDataUnit === null || oldDataUnit === void 0 ? void 0 : oldDataUnit.unsubscribe(this.dataUnitActionHandler);
33
+ }
29
34
  observerDataState(newValue, oldValue) {
30
35
  const openInsertion = !(oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
31
36
  const closeInsertion = (oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && !(newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
@@ -191,6 +196,15 @@ export class SnkDetailView {
191
196
  this.messagesBuilder = new SnkMessageBuilder(this.entityName);
192
197
  }
193
198
  }
199
+ async dataUnitActionHandler(action) {
200
+ if (action.type === Action.FIELD_INVALIDATED) {
201
+ this.addErrorBadgeToBranchGuide();
202
+ }
203
+ }
204
+ addErrorBadgeToBranchGuide() {
205
+ this.branchGuide = Object.assign(Object.assign({}, this.branchGuide), { badge: 'error' });
206
+ this.snkDetailGuidesChange.emit(new GuideBuilder(this.branchGuide, this._formMetadata, this.dataUnit));
207
+ }
194
208
  render() {
195
209
  this.updateLabel();
196
210
  //const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
@@ -400,7 +414,7 @@ export class SnkDetailView {
400
414
  },
401
415
  "branchGuide": {
402
416
  "type": "unknown",
403
- "mutable": false,
417
+ "mutable": true,
404
418
  "complexType": {
405
419
  "original": "IGuideItem",
406
420
  "resolved": "IGuideItem",
@@ -589,6 +603,9 @@ export class SnkDetailView {
589
603
  }
590
604
  static get watchers() {
591
605
  return [{
606
+ "propName": "dataUnit",
607
+ "methodName": "observeDataUnit"
608
+ }, {
592
609
  "propName": "dataState",
593
610
  "methodName": "observerDataState"
594
611
  }];
@@ -1,11 +1,11 @@
1
- import { ElementIDUtils } from "@sankhyalabs/core";
2
- import { Fragment, h } from "@stencil/core";
3
- import { SnkFormConfigManager } from "../../snk-form/SnkFormConfigManager";
4
- import { FormMetadata, buildFormMetadata } from "@sankhyalabs/ezui/dist/collection/utils/form";
5
- import TaskbarProcessor from "../../snk-taskbar/processor/taskbar-processor";
6
- import { TaskbarElement } from "../../snk-taskbar/elements/taskbar-elements";
7
- import { VIEW_MODE } from "../../../lib/utils/constants";
8
- import { PresentationMode } from "../../../lib";
1
+ import { Action as DUAction, ElementIDUtils } from '@sankhyalabs/core';
2
+ import { Fragment, h } from '@stencil/core';
3
+ import { SnkFormConfigManager } from '../../snk-form/SnkFormConfigManager';
4
+ import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
+ import TaskbarProcessor from '../../snk-taskbar/processor/taskbar-processor';
6
+ import { TaskbarElement } from '../../snk-taskbar/elements/taskbar-elements';
7
+ import { VIEW_MODE } from '../../../lib/utils/constants';
8
+ import { PresentationMode } from '../../../lib';
9
9
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
10
10
  const FORM_NAME_PREFIX = "__FORM:";
11
11
  export class SnkGuidesViewer {
@@ -123,6 +123,12 @@ export class SnkGuidesViewer {
123
123
  this._breadcrumbItems = breadcrumbs;
124
124
  });
125
125
  });
126
+ this._guides = this._guides.map(guide => {
127
+ if (guide.id === guideItem.id) {
128
+ return Object.assign(Object.assign({}, guide), guideItem);
129
+ }
130
+ return guide;
131
+ });
126
132
  }
127
133
  }
128
134
  loadTaskbarProcessor() {
@@ -250,6 +256,28 @@ export class SnkGuidesViewer {
250
256
  this._guideNavigator.getCurrentPath().then(breadcrumbs => {
251
257
  this._breadcrumbItems = breadcrumbs;
252
258
  });
259
+ this.resetGuideBadge(currentItem);
260
+ }
261
+ resetGuideBadge(selectedGuide) {
262
+ var _a;
263
+ this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
264
+ if (this.canClearGuideBadge(guide, selectedGuide.id)) {
265
+ return Object.assign(Object.assign({}, guide), { badge: null });
266
+ }
267
+ return guide;
268
+ })];
269
+ }
270
+ canClearGuideBadge(guide, idToCheck) {
271
+ return (guide.id === idToCheck) || this.isIncludedInChildrenList(guide, idToCheck);
272
+ }
273
+ isIncludedInChildrenList(guide, guideId) {
274
+ return this.hasChildren(guide) && this.getChildrenIdList(guide).includes(guideId);
275
+ }
276
+ hasChildren(guide) {
277
+ return guide.children && Array.isArray(guide.children);
278
+ }
279
+ getChildrenIdList(guide) {
280
+ return (guide.children).map(guideChild => guideChild.id);
253
281
  }
254
282
  getConfigViewMode() {
255
283
  return VIEW_MODE.GRID;
@@ -299,6 +327,50 @@ export class SnkGuidesViewer {
299
327
  var _a;
300
328
  return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
301
329
  }
330
+ async dataUnitActionHandler(action) {
331
+ var _a;
332
+ if (action.type === DUAction.FIELD_INVALIDATED) {
333
+ const guideName = this.getGuideName((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fieldName);
334
+ await this.addErrorBadgeToGuide(guideName);
335
+ await this.openGuideNavigator(guideName);
336
+ }
337
+ }
338
+ async addErrorBadgeToGuide(guideName) {
339
+ var _a;
340
+ this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
341
+ return Object.assign(Object.assign({}, guide), { badge: this.getBadge(guide, guideName) });
342
+ })];
343
+ }
344
+ async openGuideNavigator(guideName) {
345
+ if (this.selectedGuide.id !== guideName) {
346
+ await this._guideNavigator.openGuideNavidator();
347
+ }
348
+ }
349
+ getBadge(guide, tabName) {
350
+ var _a;
351
+ if (this.selectedGuide.id === tabName) {
352
+ return null;
353
+ }
354
+ if (tabName === guide.id) {
355
+ return "error";
356
+ }
357
+ return (_a = guide.badge) !== null && _a !== void 0 ? _a : null;
358
+ }
359
+ getGuideName(fieldName) {
360
+ var _a;
361
+ for (const sheet of this._masterFormMetadata.getAllSheets()) {
362
+ const formFields = (_a = sheet[1]) === null || _a === void 0 ? void 0 : _a.fields;
363
+ for (const field of formFields) {
364
+ if (field.name === fieldName) {
365
+ return sheet[0];
366
+ }
367
+ }
368
+ }
369
+ return "";
370
+ }
371
+ componentDidLoad() {
372
+ this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
373
+ }
302
374
  render() {
303
375
  var _a, _b;
304
376
  if (this._formEditorConfigManager != undefined) {
@@ -1,4 +1,4 @@
1
- import { DataType } from "@sankhyalabs/core";
1
+ import { DataType, StringUtils } from "@sankhyalabs/core";
2
2
  import { toString } from "@sankhyalabs/core/dist/dataunit/metadata/DataType";
3
3
  import FilterItemType from "../filter-item-type.enum";
4
4
  import { FilterOperand } from "../../../snk-personalized-filter/interfaces/index";
@@ -93,8 +93,11 @@ function buildSearch(item) {
93
93
  return { name: id, expression, params: [{ name: id, dataType: DataType.TEXT, value: toString(DataType.TEXT, value.value) }] };
94
94
  }
95
95
  function buildText(item) {
96
- const { id, value, props } = item;
96
+ let { id, value, props } = item;
97
97
  const expression = props.expression;
98
+ if (!StringUtils.isEmpty(props.likeAs)) {
99
+ value = buildLikeValue(value, props.likeAs);
100
+ }
98
101
  return { name: id, expression, params: [{ name: id, dataType: DataType.TEXT, value: toString(DataType.TEXT, value) }] };
99
102
  }
100
103
  function buildNumber(item) {
@@ -102,6 +105,18 @@ function buildNumber(item) {
102
105
  const expression = props.expression;
103
106
  return { name: id, expression, params: [{ name: id, dataType: DataType.NUMBER, value: toString(DataType.NUMBER, value) }] };
104
107
  }
108
+ function buildLikeValue(valueAsString, likeAs) {
109
+ if (likeAs === "CONTANIS") {
110
+ return `%${valueAsString}%`;
111
+ }
112
+ else if (likeAs === "STARTS_WITH") {
113
+ return `${valueAsString}%`;
114
+ }
115
+ else if (likeAs === "ENDS_WITH") {
116
+ return `%${valueAsString}`;
117
+ }
118
+ return valueAsString;
119
+ }
105
120
  function buildPersonalized(item) {
106
121
  const { id, groupedItems = [] } = item;
107
122
  const activeFilters = groupedItems.filter(groupItem => !!groupItem.visible);
@@ -233,9 +233,9 @@ export class DataFetcher {
233
233
  const urlParams = UrlUtils.getQueryParams(location.search);
234
234
  return {
235
235
  baseUrl: `${this.resolveURL()}/${module}/service.sbr`,
236
- appName: "SankhyaBlocks",
236
+ appName: window['APPLICATION_NAME'] || "SankhyaBlocks",
237
237
  mgeSession: `${window['mgeSession'] || urlParams.get("mgeSession")}`,
238
- globalID: "85C0093DFA240EAB699B4E47A10215BD",
238
+ globalID: window['GLOBALID'] || StringUtils.generateUUID(),
239
239
  resourceID: (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID))
240
240
  };
241
241
  }
@@ -23,5 +23,12 @@ export default class Workspace {
23
23
  var _a;
24
24
  (_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.setScreenToUseOldLayout();
25
25
  }
26
+ static applicationClick() {
27
+ var _a, _b;
28
+ if (!((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.applicationClick)) {
29
+ return;
30
+ }
31
+ (_b = window["workspace"]) === null || _b === void 0 ? void 0 : _b.applicationClick();
32
+ }
26
33
  }
27
34
  Workspace.resourceID = (_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID;
@@ -6729,9 +6729,9 @@ class DataFetcher {
6729
6729
  const urlParams = UrlUtils.getQueryParams(location.search);
6730
6730
  return {
6731
6731
  baseUrl: `${this.resolveURL()}/${module}/service.sbr`,
6732
- appName: "SankhyaBlocks",
6732
+ appName: window['APPLICATION_NAME'] || "SankhyaBlocks",
6733
6733
  mgeSession: `${window['mgeSession'] || urlParams.get("mgeSession")}`,
6734
- globalID: "85C0093DFA240EAB699B4E47A10215BD",
6734
+ globalID: window['GLOBALID'] || StringUtils.generateUUID(),
6735
6735
  resourceID: (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID))
6736
6736
  };
6737
6737
  }
@@ -170,6 +170,13 @@ class Workspace {
170
170
  var _a;
171
171
  (_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.setScreenToUseOldLayout();
172
172
  }
173
+ static applicationClick() {
174
+ var _a, _b;
175
+ if (!((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.applicationClick)) {
176
+ return;
177
+ }
178
+ (_b = window["workspace"]) === null || _b === void 0 ? void 0 : _b.applicationClick();
179
+ }
173
180
  }
174
181
  Workspace.resourceID = (_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID;
175
182
 
@@ -1047,6 +1054,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1047
1054
  }, 100);
1048
1055
  ErrorTracking.init();
1049
1056
  ConfigStorage.preload(this.applicationResourceID, this.configName);
1057
+ document.addEventListener("click", () => Workspace.applicationClick());
1050
1058
  }
1051
1059
  connectedCallback() {
1052
1060
  ApplicationContext.setContextValue("__SNK__APPLICATION__", this);
@@ -1,9 +1,9 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Fragment, forceUpdate, Host } from '@stencil/core/internal/client';
2
+ import { Action, ElementIDUtils } from '@sankhyalabs/core';
2
3
  import { S as SnkFormConfigManager } from './SnkFormConfigManager.js';
3
4
  import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
4
5
  import './DataFetcher.js';
5
6
  import './dataunit-fetcher.js';
6
- import { ElementIDUtils } from '@sankhyalabs/core';
7
7
  import { P as PresentationMode } from './index2.js';
8
8
  import { d as defineCustomElement$t } from './snk-actions-button2.js';
9
9
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
@@ -165,6 +165,12 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
165
165
  this._breadcrumbItems = breadcrumbs;
166
166
  });
167
167
  });
168
+ this._guides = this._guides.map(guide => {
169
+ if (guide.id === guideItem.id) {
170
+ return Object.assign(Object.assign({}, guide), guideItem);
171
+ }
172
+ return guide;
173
+ });
168
174
  }
169
175
  }
170
176
  loadTaskbarProcessor() {
@@ -292,6 +298,28 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
292
298
  this._guideNavigator.getCurrentPath().then(breadcrumbs => {
293
299
  this._breadcrumbItems = breadcrumbs;
294
300
  });
301
+ this.resetGuideBadge(currentItem);
302
+ }
303
+ resetGuideBadge(selectedGuide) {
304
+ var _a;
305
+ this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
306
+ if (this.canClearGuideBadge(guide, selectedGuide.id)) {
307
+ return Object.assign(Object.assign({}, guide), { badge: null });
308
+ }
309
+ return guide;
310
+ })];
311
+ }
312
+ canClearGuideBadge(guide, idToCheck) {
313
+ return (guide.id === idToCheck) || this.isIncludedInChildrenList(guide, idToCheck);
314
+ }
315
+ isIncludedInChildrenList(guide, guideId) {
316
+ return this.hasChildren(guide) && this.getChildrenIdList(guide).includes(guideId);
317
+ }
318
+ hasChildren(guide) {
319
+ return guide.children && Array.isArray(guide.children);
320
+ }
321
+ getChildrenIdList(guide) {
322
+ return (guide.children).map(guideChild => guideChild.id);
295
323
  }
296
324
  getConfigViewMode() {
297
325
  return VIEW_MODE.GRID;
@@ -341,6 +369,50 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
341
369
  var _a;
342
370
  return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
343
371
  }
372
+ async dataUnitActionHandler(action) {
373
+ var _a;
374
+ if (action.type === Action.FIELD_INVALIDATED) {
375
+ const guideName = this.getGuideName((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fieldName);
376
+ await this.addErrorBadgeToGuide(guideName);
377
+ await this.openGuideNavigator(guideName);
378
+ }
379
+ }
380
+ async addErrorBadgeToGuide(guideName) {
381
+ var _a;
382
+ this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
383
+ return Object.assign(Object.assign({}, guide), { badge: this.getBadge(guide, guideName) });
384
+ })];
385
+ }
386
+ async openGuideNavigator(guideName) {
387
+ if (this.selectedGuide.id !== guideName) {
388
+ await this._guideNavigator.openGuideNavidator();
389
+ }
390
+ }
391
+ getBadge(guide, tabName) {
392
+ var _a;
393
+ if (this.selectedGuide.id === tabName) {
394
+ return null;
395
+ }
396
+ if (tabName === guide.id) {
397
+ return "error";
398
+ }
399
+ return (_a = guide.badge) !== null && _a !== void 0 ? _a : null;
400
+ }
401
+ getGuideName(fieldName) {
402
+ var _a;
403
+ for (const sheet of this._masterFormMetadata.getAllSheets()) {
404
+ const formFields = (_a = sheet[1]) === null || _a === void 0 ? void 0 : _a.fields;
405
+ for (const field of formFields) {
406
+ if (field.name === fieldName) {
407
+ return sheet[0];
408
+ }
409
+ }
410
+ }
411
+ return "";
412
+ }
413
+ componentDidLoad() {
414
+ this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
415
+ }
344
416
  render() {
345
417
  var _a, _b;
346
418
  if (this._formEditorConfigManager != undefined) {
@@ -615,6 +687,10 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
615
687
  this.canEdit = true;
616
688
  this.taskbarCustomContainerId = undefined;
617
689
  }
690
+ observeDataUnit(newDataUnit, oldDataUnit) {
691
+ newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
692
+ oldDataUnit === null || oldDataUnit === void 0 ? void 0 : oldDataUnit.unsubscribe(this.dataUnitActionHandler);
693
+ }
618
694
  observerDataState(newValue, oldValue) {
619
695
  const openInsertion = !(oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
620
696
  const closeInsertion = (oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && !(newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
@@ -780,12 +856,22 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
780
856
  this.messagesBuilder = new SnkMessageBuilder(this.entityName);
781
857
  }
782
858
  }
859
+ async dataUnitActionHandler(action) {
860
+ if (action.type === Action.FIELD_INVALIDATED) {
861
+ this.addErrorBadgeToBranchGuide();
862
+ }
863
+ }
864
+ addErrorBadgeToBranchGuide() {
865
+ this.branchGuide = Object.assign(Object.assign({}, this.branchGuide), { badge: 'error' });
866
+ this.snkDetailGuidesChange.emit(new GuideBuilder(this.branchGuide, this._formMetadata, this.dataUnit));
867
+ }
783
868
  render() {
784
869
  this.updateLabel();
785
870
  //const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
786
871
  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" }))), 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) }))))));
787
872
  }
788
873
  static get watchers() { return {
874
+ "dataUnit": ["observeDataUnit"],
789
875
  "dataState": ["observerDataState"]
790
876
  }; }
791
877
  static get style() { return snkDetailViewCss; }
@@ -800,7 +886,7 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
800
886
  "selectedForm": [1025, "selected-form"],
801
887
  "dataState": [1040],
802
888
  "messagesBuilder": [1040],
803
- "branchGuide": [16],
889
+ "branchGuide": [1040],
804
890
  "canEdit": [4, "can-edit"],
805
891
  "taskbarCustomContainerId": [1, "taskbar-custom-container-id"],
806
892
  "_disabledButtons": [32],