@acorex/platform 19.2.12 → 19.2.15

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 (128) hide show
  1. package/auth/lib/session.service.d.ts +8 -2
  2. package/common/index.d.ts +0 -1
  3. package/common/lib/app/application.types.d.ts +2 -2
  4. package/common/lib/common.module.d.ts +1 -2
  5. package/common/lib/data/index.d.ts +0 -4
  6. package/common/lib/file-type/file-type.provider.d.ts +3 -3
  7. package/common/lib/file-type/file-type.types.d.ts +12 -0
  8. package/common/lib/layout/menu/menu.types.d.ts +3 -2
  9. package/common/lib/layout/theme/components/slots/navbar-slot.component.d.ts +2 -4
  10. package/common/lib/search/search.types.d.ts +3 -5
  11. package/common/lib/settings/settings.service.d.ts +1 -1
  12. package/common/lib/utils/index.d.ts +0 -1
  13. package/common/lib/utils/regional-util.service.d.ts +2 -2
  14. package/core/index.d.ts +1 -5
  15. package/core/lib/data/data-generator.d.ts +26 -0
  16. package/core/lib/data/index.d.ts +1 -0
  17. package/core/lib/directives/element-data.directive.d.ts +20 -0
  18. package/core/lib/directives/index.d.ts +1 -0
  19. package/core/lib/event-service/event.service.d.ts +43 -0
  20. package/core/lib/event-service/index.d.ts +1 -0
  21. package/{common/lib/utils → core/lib/expression-evaluator}/expression-evaluator.service.d.ts +1 -1
  22. package/core/lib/expression-evaluator/index.d.ts +1 -0
  23. package/core/lib/index.d.ts +6 -0
  24. package/core/lib/types.d.ts +17 -0
  25. package/core/lib/utils/data-conditioner.d.ts +5 -0
  26. package/core/lib/utils/index.d.ts +4 -0
  27. package/fesm2022/acorex-platform-auth.mjs +53 -17
  28. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  29. package/fesm2022/acorex-platform-common.mjs +606 -869
  30. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  31. package/fesm2022/acorex-platform-core.mjs +364 -12
  32. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  33. package/fesm2022/acorex-platform-layout-builder.mjs +14 -3
  34. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  35. package/fesm2022/acorex-platform-layout-designer.mjs +99 -52
  36. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  37. package/fesm2022/acorex-platform-layout-entity.mjs +673 -34
  38. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  39. package/fesm2022/acorex-platform-layout-search.mjs +4 -3
  40. package/fesm2022/acorex-platform-layout-search.mjs.map +1 -1
  41. package/fesm2022/acorex-platform-layout-setting.mjs +4 -3
  42. package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
  43. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-DrHsaotw.mjs → acorex-platform-themes-default-entity-master-list-view.component-ewOei4ta.mjs} +11 -3
  44. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-ewOei4ta.mjs.map +1 -0
  45. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BGUrwL2P.mjs → acorex-platform-themes-default-entity-master-single-view.component-DcSk0ia4.mjs} +2 -2
  46. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BGUrwL2P.mjs.map → acorex-platform-themes-default-entity-master-single-view.component-DcSk0ia4.mjs.map} +1 -1
  47. package/fesm2022/{acorex-platform-themes-default-search-popup.component-Ccouaqp4.mjs → acorex-platform-themes-default-search-popup.component-DfeNmpS9.mjs} +4 -4
  48. package/fesm2022/{acorex-platform-themes-default-search-popup.component-Ccouaqp4.mjs.map → acorex-platform-themes-default-search-popup.component-DfeNmpS9.mjs.map} +1 -1
  49. package/fesm2022/{acorex-platform-themes-default-setting-page.component-CJoBVXTl.mjs → acorex-platform-themes-default-setting-page.component-DtJmPSFo.mjs} +5 -4
  50. package/fesm2022/acorex-platform-themes-default-setting-page.component-DtJmPSFo.mjs.map +1 -0
  51. package/fesm2022/{acorex-platform-themes-default-setting-view.component-CsCug3Vu.mjs → acorex-platform-themes-default-setting-view.component-fuHM7W6Y.mjs} +2 -2
  52. package/fesm2022/{acorex-platform-themes-default-setting-view.component-CsCug3Vu.mjs.map → acorex-platform-themes-default-setting-view.component-fuHM7W6Y.mjs.map} +1 -1
  53. package/fesm2022/{acorex-platform-themes-default-theme-palette-preview.page-D-yzbISw.mjs → acorex-platform-themes-default-theme-palette-preview.page-DkjAgWLn.mjs} +2 -2
  54. package/fesm2022/{acorex-platform-themes-default-theme-palette-preview.page-D-yzbISw.mjs.map → acorex-platform-themes-default-theme-palette-preview.page-DkjAgWLn.mjs.map} +1 -1
  55. package/fesm2022/acorex-platform-themes-default.mjs +36 -24
  56. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  57. package/fesm2022/acorex-platform-themes-shared.mjs +27 -4
  58. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  59. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-Ba_DdBAl.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-Emh145xN.mjs} +3 -3
  60. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-Ba_DdBAl.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-Emh145xN.mjs.map} +1 -1
  61. package/fesm2022/acorex-platform-widgets.mjs +1083 -98
  62. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  63. package/fesm2022/acorex-platform-workflow.mjs +17 -8
  64. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  65. package/layout/builder/lib/builder/datasource-provider.service.d.ts +2 -2
  66. package/layout/builder/lib/builder/metadata/metadata.types.d.ts +2 -1
  67. package/layout/builder/lib/builder/widget-map.d.ts +5 -0
  68. package/layout/builder/lib/builder/widget.types.d.ts +1 -1
  69. package/layout/designer/lib/designer/designer.component.d.ts +2 -1
  70. package/layout/designer/lib/designer/shared/designer.service.d.ts +8 -4
  71. package/layout/designer/lib/designer/shared/designer.types.d.ts +24 -0
  72. package/layout/designer/lib/preview/preview-viewer.component.d.ts +5 -1
  73. package/layout/designer/lib/preview/preview.component.d.ts +2 -1
  74. package/layout/entity/lib/entity-master-create.viewmodel.d.ts +1 -0
  75. package/{common/lib/data → layout/entity/lib}/entity-storage-service.d.ts +1 -0
  76. package/layout/entity/lib/index.d.ts +4 -0
  77. package/layout/entity/lib/widgets/tagable-box/index.d.ts +6 -0
  78. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-column.component.d.ts +11 -0
  79. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-edit.component.d.ts +19 -0
  80. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-filter.component.d.ts +6 -0
  81. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-print.component.d.ts +11 -0
  82. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-view.component.d.ts +11 -0
  83. package/layout/entity/lib/widgets/tagable-box/tagable-box-widget.config.d.ts +7 -0
  84. package/package.json +1 -1
  85. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +2 -0
  86. package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +5 -0
  87. package/themes/shared/lib/components/layout-elements/index.d.ts +1 -0
  88. package/themes/shared/lib/components/layout-elements/layout-blocks.component.d.ts +1 -1
  89. package/themes/shared/lib/components/layout-elements/layout-tool-bar.component.d.ts +5 -0
  90. package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +2 -1
  91. package/widgets/lib/widgets/advance/map/map-box-widget-edit.component.d.ts +4 -2
  92. package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget-edit.component.d.ts +8 -0
  93. package/widgets/lib/widgets/editors/meta-data/index.d.ts +6 -0
  94. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-column.component.d.ts +6 -0
  95. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-edit.component.d.ts +13 -0
  96. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-filter.component.d.ts +6 -0
  97. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-print.component.d.ts +6 -0
  98. package/widgets/lib/widgets/editors/meta-data/meta-data-widget-view.component.d.ts +8 -0
  99. package/widgets/lib/widgets/editors/meta-data/meta-data-widget.config.d.ts +7 -0
  100. package/widgets/lib/widgets/editors/number-unit/index.d.ts +6 -0
  101. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-column.component.d.ts +9 -0
  102. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-edit.component.d.ts +24 -0
  103. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-filter.component.d.ts +6 -0
  104. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-print.component.d.ts +6 -0
  105. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-view.component.d.ts +12 -0
  106. package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget.config.d.ts +7 -0
  107. package/widgets/lib/widgets/editors/select/select-box-widget-edit.component.d.ts +1 -0
  108. package/widgets/lib/widgets/editors/single-file-box/index.d.ts +6 -0
  109. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-column.component.d.ts +6 -0
  110. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-edit.component.d.ts +19 -0
  111. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-filter.component.d.ts +6 -0
  112. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-print.component.d.ts +6 -0
  113. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-view.component.d.ts +8 -0
  114. package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget.config.d.ts +7 -0
  115. package/widgets/lib/widgets/index.d.ts +1 -0
  116. package/workflow/lib/actions/decide.action.d.ts +7 -0
  117. package/workflow/lib/workflow.service.d.ts +0 -1
  118. package/common/lib/store/common.actions.d.ts +0 -2
  119. package/common/lib/store/index.d.ts +0 -1
  120. package/core/utils/data-conditioner.d.ts +0 -3
  121. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DrHsaotw.mjs.map +0 -1
  122. package/fesm2022/acorex-platform-themes-default-setting-page.component-CJoBVXTl.mjs.map +0 -1
  123. /package/core/{utils → lib/utils}/countdown-timer.d.ts +0 -0
  124. /package/core/{utils → lib/utils}/highlighter.d.ts +0 -0
  125. /package/core/{utils → lib/utils}/html-utils.d.ts +0 -0
  126. /package/{common/lib/data → layout/entity/lib}/data.types.d.ts +0 -0
  127. /package/{common/lib/data → layout/entity/lib}/dexie-storage.service.d.ts +0 -0
  128. /package/{common/lib/data → layout/entity/lib}/entity-data-seeder.d.ts +0 -0
@@ -10,8 +10,9 @@ import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
10
10
  import { AXPopupService } from '@acorex/components/popup';
11
11
  import { AXToastService } from '@acorex/components/toast';
12
12
  import { AXFileService } from '@acorex/core/file';
13
- import { merge, cloneDeep, assign, get, sortBy, set, orderBy, capitalize, unionBy, isArray, isNil, isEmpty, isEqual } from 'lodash-es';
13
+ import { merge, cloneDeep, assign, get, sortBy, set, isNil, isEmpty, orderBy, capitalize, unionBy, isArray, isEqual } from 'lodash-es';
14
14
  import { Subject, distinctUntilChanged, filter, debounceTime, first, merge as merge$1 } from 'rxjs';
15
+ import { AXPBroadcastEventService } from '@acorex/platform/core';
15
16
  import * as i2$1 from '@acorex/components/common';
16
17
  import { AXCommonModule } from '@acorex/components/common';
17
18
  import { AXBasePageComponent } from '@acorex/components/page';
@@ -39,6 +40,7 @@ import { AXCollapseModule } from '@acorex/components/collapse';
39
40
  import * as i1$4 from '@acorex/components/breadcrumbs';
40
41
  import { AXBreadcrumbsModule } from '@acorex/components/breadcrumbs';
41
42
  import { AXPWorkflowService } from '@acorex/platform/workflow';
43
+ import { AXUnsubscriber } from '@acorex/core/utils';
42
44
  import * as i4$1 from '@acorex/components/json-viewer';
43
45
  import { AXJsonViewerModule } from '@acorex/components/json-viewer';
44
46
  import { AXSafePipe } from '@acorex/core/pipes';
@@ -290,6 +292,27 @@ function cloneWidgetMenu(item, options) {
290
292
  return assign(cloneDeep(item), options);
291
293
  }
292
294
 
295
+ class AXPDesignerModes {
296
+ static { this.View = { id: 'view', title: 'View' }; }
297
+ static { this.Design = { id: 'designer', title: 'Designer' }; }
298
+ static { this.Edit = { id: 'edit', title: 'Edit' }; }
299
+ }
300
+ var AXPTemplateLoadingStrategy;
301
+ (function (AXPTemplateLoadingStrategy) {
302
+ AXPTemplateLoadingStrategy["Connector"] = "Connector";
303
+ AXPTemplateLoadingStrategy["Broadcast"] = "Broadcast";
304
+ })(AXPTemplateLoadingStrategy || (AXPTemplateLoadingStrategy = {}));
305
+ const AXPDesignerMessageKeys = {
306
+ Preview: "designer-preview",
307
+ Loaded: "designer-preview-loaded",
308
+ ContextChanged: "designer-preview-context-changed",
309
+ PreviewWindow: "designer-open-preview-window",
310
+ RequestFormContent: "designer-request-form-content",
311
+ ResponseFormContent: "designer-response-form-content",
312
+ SaveForm: 'designer-save-form-content',
313
+ FormSaved: 'designer-form-saved-content',
314
+ };
315
+
293
316
  class AXPDesignerService {
294
317
  #ef;
295
318
  constructor() {
@@ -299,7 +322,7 @@ class AXPDesignerService {
299
322
  this.loadingService = inject(AXLoadingDialogService);
300
323
  this.widgetRegisteryService = inject(AXPWidgetRegistryService);
301
324
  this.connector = inject(AXPDesignerConnector);
302
- this.channel = new BroadcastChannel('livePreviewChannel');
325
+ this.eventService = inject(AXPBroadcastEventService);
303
326
  this.document = signal(this.createDoc());
304
327
  this.currentPageIndex = signal(0);
305
328
  this.currentPage = signal(this.document().children?.[0]);
@@ -316,6 +339,7 @@ class AXPDesignerService {
316
339
  this.canRedo = computed(() => this.commandManager.canRedo());
317
340
  //
318
341
  this.canSave = computed(() => this.templateId() != null);
342
+ this.unsavedChanges = signal(false);
319
343
  this.breadcrumbs = computed(() => {
320
344
  return this.selectedNode() ? this.findBreadcrumbs(this.currentPage(), this.selectedNode()) ?? [] : [];
321
345
  });
@@ -329,6 +353,7 @@ class AXPDesignerService {
329
353
  this.onUpdate = new Subject();
330
354
  this.onFocused = new Subject();
331
355
  this.templateId = signal(null);
356
+ this.loadingStrategy = signal(AXPTemplateLoadingStrategy.Connector);
332
357
  this.#ef = effect(() => {
333
358
  this.refresh({ widget: this.currentPage() });
334
359
  });
@@ -349,15 +374,26 @@ class AXPDesignerService {
349
374
  insert: config.type == 'container' && config.options?.canInsert != false,
350
375
  };
351
376
  };
352
- this.channelCallback = (message) => {
353
- if (message.data.action == 'designer-preview-loaded') {
354
- this.updatePreview();
355
- }
356
- if (message.data.action == 'open-preview-window') {
357
- this.openPreviewWindow();
377
+ this.eventService.listen(AXPDesignerMessageKeys.Loaded).subscribe(() => {
378
+ this.updatePreview();
379
+ });
380
+ //
381
+ this.eventService.listen(AXPDesignerMessageKeys.PreviewWindow).subscribe(() => {
382
+ this.openPreviewWindow();
383
+ });
384
+ //
385
+ // window.addEventListener("beforeunload", (event) => {
386
+ // console.log("Window is before closing...");
387
+ // // event.preventDefault();
388
+ // // event.returnValue = 'abc'; // Some browsers require this to show the prompt.
389
+ // });
390
+ window.addEventListener("unload", async () => {
391
+ console.log("Window is closing...");
392
+ if (this.unsavedChanges()) {
393
+ this.eventService.publish(AXPDesignerMessageKeys.SaveForm, { id: this.templateId(), success: false });
358
394
  }
359
- };
360
- this.channel.addEventListener('message', this.channelCallback);
395
+ this.unsubscribeEvents();
396
+ });
361
397
  }
362
398
  register(command) {
363
399
  this.select({ widget: command.widget });
@@ -373,6 +409,7 @@ class AXPDesignerService {
373
409
  }
374
410
  //this.selectedNode.update((c) => merge(node, command.values));
375
411
  this.onUpdate.next({ widget: node, values: command.values });
412
+ this.unsavedChanges.set(true);
376
413
  this.updatePreview();
377
414
  }
378
415
  focus(command) {
@@ -684,10 +721,17 @@ class AXPDesignerService {
684
721
  async save() {
685
722
  if (this.templateId()) {
686
723
  const content = this.export();
687
- const result = await this.connector.save(this.templateId(), { json: content });
688
- if (result) {
724
+ if (this.loadingStrategy() == AXPTemplateLoadingStrategy.Connector) {
725
+ await this.connector.save(this.templateId(), { json: content });
689
726
  this.toastService.success('Your changes saved successfully');
690
727
  }
728
+ else {
729
+ const result = await this.eventService.sendAndWaitForResponse(AXPDesignerMessageKeys.SaveForm, { id: this.templateId(), success: true, content });
730
+ if (result.success) {
731
+ this.unsavedChanges.set(false);
732
+ window.close();
733
+ }
734
+ }
691
735
  }
692
736
  else {
693
737
  this.downloadJson();
@@ -723,13 +767,20 @@ class AXPDesignerService {
723
767
  URL.revokeObjectURL(url);
724
768
  document.body.removeChild(a);
725
769
  }
726
- async loadById(id) {
770
+ async loadById(id, options = { strategy: AXPTemplateLoadingStrategy.Connector }) {
771
+ let content = null;
727
772
  try {
728
- const content = await this.connector.load(id);
729
- this.templateId.set(id);
730
- if (content) {
773
+ if (options.strategy == AXPTemplateLoadingStrategy.Connector) {
774
+ content = await this.connector.load(id);
775
+ }
776
+ else {
777
+ content = await this.eventService.sendAndWaitForResponse(AXPDesignerMessageKeys.RequestFormContent, { formId: id }, { timeout: 10000, retries: 3, retryDelay: 1000 });
778
+ }
779
+ if (!isNil(content) && !isEmpty(content)) {
731
780
  await this.loadByContent(content);
732
781
  }
782
+ this.templateId.set(id);
783
+ this.loadingStrategy.set(options.strategy);
733
784
  }
734
785
  catch (error) {
735
786
  this.toastService.danger(error.message);
@@ -824,9 +875,9 @@ class AXPDesignerService {
824
875
  }
825
876
  }
826
877
  updatePreview() {
827
- this.channel.postMessage({
828
- action: 'designer-preview',
829
- document: this.removeMetaProp(this.document()),
878
+ this.eventService.publish(AXPDesignerMessageKeys.Preview, {
879
+ id: this.templateId(),
880
+ document: this.removeMetaProp(this.document())
830
881
  });
831
882
  }
832
883
  async openPreviewDialog() {
@@ -918,6 +969,10 @@ class AXPDesignerService {
918
969
  //
919
970
  }
920
971
  }
972
+ unsubscribeEvents() {
973
+ this.eventService.unsubscribe(AXPDesignerMessageKeys.Loaded);
974
+ this.eventService.unsubscribe(AXPDesignerMessageKeys.PreviewWindow);
975
+ }
921
976
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDesignerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
922
977
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDesignerService }); }
923
978
  }
@@ -1888,7 +1943,7 @@ class AXPDesignerHistoryComponent {
1888
1943
  this.service = inject(AXPDesignerService);
1889
1944
  }
1890
1945
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDesignerHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1891
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPDesignerHistoryComponent, isStandalone: true, selector: "axp-designer-history", ngImport: i0, template: "<axp-designer-drawer-content>\n\n <ax-title>History</ax-title>\n\n <ax-content header>\n <ax-button look=\"blank\" class=\"ax-sm\">\n <ax-icon class=\"fa-light fa-ellipsis\"></ax-icon>\n <ax-dropdown-panel class=\"ax-sm\">\n <ax-button-item-list>\n <ax-button-item text=\"Clear\" name=\"add\" (onClick)=\"service.clearHistory()\"> </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </ax-content>\n\n <ax-content body>\n @if(service.history().length)\n {\n <ul class=\"axp-designer-drawer-list\">\n @for (step of service.history(); track $index) {\n <li (click)=\"service.navigateTo($index)\" [class.ax-italic]=\"step.isFuture\"\n [class.ax-text-neutral-400]=\"step.isFuture\" [class.ax-state-selected]=\"step.isCurrent\">\n <i class=\"ax-me-1\" [ngClass]=\"step.icon\"></i>\n {{ step.description }}\n </li>\n }\n </ul>\n }\n @else {\n <div class=\"axp-designer-drawer-empty\">\n No changes have been made yet.\n </div>\n }\n </ax-content>\n\n</axp-designer-drawer-content>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXPLayoutDesignerDrawerContentComponent, selector: "axp-designer-drawer-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1946
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPDesignerHistoryComponent, isStandalone: true, selector: "axp-designer-history", ngImport: i0, template: "<axp-designer-drawer-content>\n\n <ax-title>History</ax-title>\n\n <ax-content header>\n <ax-button look=\"blank\" class=\"ax-sm\">\n <ax-icon class=\"fa-light fa-ellipsis\"></ax-icon>\n <ax-dropdown-panel class=\"ax-sm\">\n <ax-button-item-list>\n <ax-button-item text=\"Clear\" name=\"add\" (onClick)=\"service.clearHistory()\"> </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </ax-content>\n\n <ax-content body>\n @if(service.history().length)\n {\n <ul class=\"axp-designer-drawer-list\">\n @for (step of service.history(); track $index) {\n <li (click)=\"service.navigateTo($index)\" [class.ax-italic]=\"step.isFuture\"\n [class.ax-text-neutral-400]=\"step.isFuture\" [class.ax-state-selected]=\"step.isCurrent\">\n <i class=\"ax-me-1\" [ngClass]=\"step.icon\"></i>\n {{ step.description }}\n </li>\n }\n </ul>\n }\n @else {\n <div class=\"axp-designer-drawer-empty\">\n No changes have been made yet.\n </div>\n }\n </ax-content>\n\n</axp-designer-drawer-content>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXPLayoutDesignerDrawerContentComponent, selector: "axp-designer-drawer-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1892
1947
  }
1893
1948
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDesignerHistoryComponent, decorators: [{
1894
1949
  type: Component,
@@ -2110,6 +2165,7 @@ class AXPLayoutDesignerComponent {
2110
2165
  constructor() {
2111
2166
  this.service = inject(AXPDesignerService);
2112
2167
  this.id = input();
2168
+ this.strategy = input();
2113
2169
  this.nodeConfig = computed(() => this.service.selectedNode() ? get(this.service.selectedNode(), '__meta__.config') : null);
2114
2170
  this.service.onUpdate.subscribe((e) => {
2115
2171
  this.propertyViewer.update(e.values);
@@ -2117,7 +2173,7 @@ class AXPLayoutDesignerComponent {
2117
2173
  }
2118
2174
  ngOnInit() {
2119
2175
  if (this.id()) {
2120
- this.service.loadById(this.id());
2176
+ this.service.loadById(this.id(), { strategy: (this.strategy() ?? AXPTemplateLoadingStrategy.Connector) });
2121
2177
  }
2122
2178
  }
2123
2179
  get __styles() {
@@ -2126,7 +2182,7 @@ class AXPLayoutDesignerComponent {
2126
2182
  return styles;
2127
2183
  }
2128
2184
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2129
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: AXPLayoutDesignerComponent, isStandalone: true, selector: "axp-layout-designer", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.__styles" } }, providers: [AXPDesignerService], viewQueries: [{ propertyName: "propertyViewer", first: true, predicate: AXPWidgetPropertyViewerComponent, descendants: true, static: true }], ngImport: i0, template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative ax-overflow-hidden\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-lightest ax-border-e ax-sm ax-flex ax-flex-col ax-items-center ax-dark\">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo.png\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <!-- <ax-button look=\"blank\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button> -->\n <ax-button look=\"blank\" (onClick)=\"pages.toggle()\" title=\"Pages\">\n <ax-icon class=\"fa-solid fa-page ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"datasources.toggle()\" title=\"Data Sources\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"outline.toggle()\" title=\"Outline\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"history.toggle()\" title=\"History\">\n <ax-icon class=\"fa-solid fa-clock-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <!-- <ax-button look=\"blank\" title=\"Timeline\">\n <ax-icon class=\"fa-solid fa-diagram-sankey ax-text-sm\"> </ax-icon>\n </ax-button> -->\n </div>\n </div>\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1\">\n <!-- Header Toolbar -->\n <div class=\"ax-h-10 ax-bg-lightest ax-border-b ax-flex ax-justify-between ax-px-2 ax-dark\">\n <div class=\"ax-flex ax-flex-1 ax-items-center ax-text-white ax-justify-start\">\n <axp-designer-header-menu></axp-designer-header-menu>\n </div>\n <div class=\"ax-flex ax-flex-1 ax-flex-row ax-gap-2 ax-sm ax-items-center ax-justify-center\">\n <axp-designer-view-sizes [(size)]=\"service.size\"></axp-designer-view-sizes>\n </div>\n <div class=\"ax-flex ax-flex-1 ax-flex-row ax-gap-2 ax-sm ax-items-center ax-justify-end\">\n <ax-dropdown-button mode=\"split\" look=\"solid\" text=\"Preview\" class=\"ax-sm\"\n (onClick)=\"service.openPreviewDialog()\">\n <ax-button-item-list>\n <ax-button-item text=\"Open in new window\" (onClick)=\"service.openPreviewWindow()\">\n <ax-prefix>\n <ax-icon icon=\"fa-regular fa-window-restore\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n </div>\n </div>\n <!-- Board -->\n <ax-drawer-container class=\"ax-w-full ax-flex-1\">\n <!-- Pages -->\n <ax-drawer #pages location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-pages></axp-designer-pages>\n </ax-content>\n </ax-drawer>\n <!-- Datasources -->\n <ax-drawer #datasources location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-data-sources></axp-designer-data-sources>\n </ax-content>\n </ax-drawer>\n <!-- Outline Pnael -->\n <ax-drawer #outline location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-outline></axp-designer-outline>\n </ax-content>\n </ax-drawer>\n <!-- History Pnael -->\n <ax-drawer #history location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-history></axp-designer-history>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content class=\"ax-light ax-bg-lighter ax-flex ax-justify-center ax-p-10\">\n <axp-designer-board class=\"ax-rounded-lg ax-bg-lightest ax-shadow-md\"> </axp-designer-board>\n </ax-content>\n </ax-drawer-container>\n <!-- Footer -->\n <div class=\"ax-h-10 ax-bg-lightest ax-border-t ax-flex ax-items-center ax-dark\">\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-dark axp-designer-prop-side\" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-px-4 ax-border-b ax-h-10\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{ nodeConfig()?.title }}</span>\n </div>\n </div>\n <axp-widget-property-viewer [widget]=\"service.selectedNode()!\"\n (onChanged)=\"service.update({ values: $event.values, mode: $event.mode })\" class=\"ax-w-1/4\">\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>\n", styles: ["axp-layout-designer .axp-designer-board{background-color:#fff;background-image:linear-gradient(45deg,#f0f0f0 25%,transparent 25%,transparent 75%,#f0f0f0 75%,#f0f0f0),linear-gradient(45deg,#f0f0f0 25%,#fff 25%,#fff 75%,#f0f0f0 75%,#f0f0f0);background-size:20px 20px;background-position:0 0,10px 10px;display:block;height:100%;width:100%;overflow:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-surface),var(--tw-bg-opacity, 1));padding:.75rem}axp-layout-designer .axp-designer-board ax-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1))}axp-layout-designer .axp-designer-board.axp-state-design .ax-widget-outline{outline-style:dashed;outline-width:1px;outline-offset:2px;outline-color:#d1d5db}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host{cursor:pointer;position:relative}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:2px;outline-offset:1px;outline-color:#60a5fa;outline-color:rgba(var(--ax-sys-color-lightest-surface),1)}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected.ax-widget-container{outline-offset:2px}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover{outline-style:dashed;outline-width:2px;outline-offset:2px;outline-color:#d946ef}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.axp-state-selected{outline-color:#60a5fa}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.ax-widget-container{outline-offset:4px}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:2000;height:100%;width:100%}axp-layout-designer .axp-designer-board .axp-empty-space{display:flex;flex:1 1 0%;cursor:default;align-items:center;justify-content:center;background-color:rgba(var(--ax-sys-color-primary-300),10%);background-image:linear-gradient(135deg,rgba(var(--ax-sys-color-primary-300),50%) 10%,transparent 0,transparent 50%,rgba(var(--ax-sys-color-primary-300),50%) 0,rgba(var(--ax-sys-color-primary-300),50%) 60%,transparent 0,transparent);background-size:7.5px 7.5px;height:100%}axp-layout-designer .axp-designer-board .axp-page-widget-header,axp-layout-designer .axp-designer-board .axp-page-widget-footer{filter:grayscale(100%);opacity:.5}axp-layout-designer .axp-designer-board .axp-page-widget-header:hover,axp-layout-designer .axp-designer-board .axp-page-widget-footer:hover{filter:grayscale(0);opacity:1}axp-layout-designer .axp-designer-board .axp-page-widget-header{margin-bottom:.5rem}axp-layout-designer .axp-designer-board .axp-page-widget-footer{margin-top:.5rem}axp-layout-designer .axp-designer-prop-side{width:20rem;border-inline-start-width:1px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}axp-designer-drawer-content ul.axp-designer-drawer-list{padding:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list li{cursor:pointer;border-radius:.125rem;padding:.25rem .5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}axp-designer-drawer-content ul.axp-designer-drawer-list li:hover:not(.axp-designer-drawer-list){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list li.ax-state-selected{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}axp-designer-drawer-content .axp-designer-drawer-empty{display:flex;align-items:center;justify-content:center;padding:1rem;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: AXPDesignerBoardComponent, selector: "axp-designer-board" }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget"], outputs: ["onChanged"] }, { kind: "component", type: AXPDesignerBreadcrumbsComponent, selector: "axp-designer-breadcrumbs" }, { kind: "component", type: AXPDesignerOutlineComponent, selector: "axp-designer-outline" }, { kind: "component", type: AXPDesignerHeaderMenuComponent, selector: "axp-designer-header-menu" }, { kind: "component", type: AXPDesignerHistoryComponent, selector: "axp-designer-history" }, { kind: "component", type: AXPDesignerDataSourcesComponent, selector: "axp-designer-data-sources" }, { kind: "component", type: AXPDesignerPagesComponent, selector: "axp-designer-pages" }, { kind: "component", type: AXPDesignerViewSizeToolbarComponent, selector: "axp-designer-view-sizes", inputs: ["size"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3$1.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "closeOthers", "collapsed"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i3$1.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXMenuModule }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "component", type: i5.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }], encapsulation: i0.ViewEncapsulation.None }); }
2185
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: AXPLayoutDesignerComponent, isStandalone: true, selector: "axp-layout-designer", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, strategy: { classPropertyName: "strategy", publicName: "strategy", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.__styles" } }, providers: [AXPDesignerService], viewQueries: [{ propertyName: "propertyViewer", first: true, predicate: AXPWidgetPropertyViewerComponent, descendants: true, static: true }], ngImport: i0, template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative ax-overflow-hidden\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-lightest ax-border-e ax-sm ax-flex ax-flex-col ax-items-center ax-dark\">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo.png\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <!-- <ax-button look=\"blank\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button> -->\n <ax-button look=\"blank\" (onClick)=\"pages.toggle()\" title=\"Pages\">\n <ax-icon class=\"fa-solid fa-page ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"datasources.toggle()\" title=\"Data Sources\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"outline.toggle()\" title=\"Outline\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"history.toggle()\" title=\"History\">\n <ax-icon class=\"fa-solid fa-clock-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <!-- <ax-button look=\"blank\" title=\"Timeline\">\n <ax-icon class=\"fa-solid fa-diagram-sankey ax-text-sm\"> </ax-icon>\n </ax-button> -->\n </div>\n </div>\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1\">\n <!-- Header Toolbar -->\n <div class=\"ax-h-10 ax-bg-lightest ax-border-b ax-flex ax-justify-between ax-px-2 ax-dark\">\n <div class=\"ax-flex ax-flex-1 ax-items-center ax-text-white ax-justify-start\">\n <axp-designer-header-menu></axp-designer-header-menu>\n </div>\n <div class=\"ax-flex ax-flex-1 ax-flex-row ax-gap-2 ax-sm ax-items-center ax-justify-center\">\n <axp-designer-view-sizes [(size)]=\"service.size\"></axp-designer-view-sizes>\n </div>\n <div class=\"ax-flex ax-flex-1 ax-flex-row ax-gap-2 ax-sm ax-items-center ax-justify-end\">\n <ax-dropdown-button mode=\"split\" look=\"solid\" text=\"Preview\" class=\"ax-sm\"\n (onClick)=\"service.openPreviewDialog()\">\n <ax-button-item-list>\n <ax-button-item text=\"Open in new window\" (onClick)=\"service.openPreviewWindow()\">\n <ax-prefix>\n <ax-icon icon=\"fa-regular fa-window-restore\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n </div>\n </div>\n <!-- Board -->\n <ax-drawer-container class=\"ax-w-full ax-flex-1\">\n <!-- Pages -->\n <ax-drawer #pages location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-pages></axp-designer-pages>\n </ax-content>\n </ax-drawer>\n <!-- Datasources -->\n <ax-drawer #datasources location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-data-sources></axp-designer-data-sources>\n </ax-content>\n </ax-drawer>\n <!-- Outline Pnael -->\n <ax-drawer #outline location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-outline></axp-designer-outline>\n </ax-content>\n </ax-drawer>\n <!-- History Pnael -->\n <ax-drawer #history location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-history></axp-designer-history>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content class=\"ax-light ax-bg-lighter ax-flex ax-justify-center ax-p-10\">\n <axp-designer-board class=\"ax-rounded-lg ax-bg-lightest ax-shadow-md\"> </axp-designer-board>\n </ax-content>\n </ax-drawer-container>\n <!-- Footer -->\n <div class=\"ax-h-10 ax-bg-lightest ax-border-t ax-flex ax-items-center ax-dark\">\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-dark axp-designer-prop-side\" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-px-4 ax-border-b ax-h-10\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{ nodeConfig()?.title }}</span>\n </div>\n </div>\n <axp-widget-property-viewer [widget]=\"service.selectedNode()!\"\n (onChanged)=\"service.update({ values: $event.values, mode: $event.mode })\" class=\"ax-w-1/4\">\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>\n", styles: ["axp-layout-designer .axp-designer-board{background-color:#fff;background-image:linear-gradient(45deg,#f0f0f0 25%,transparent 25%,transparent 75%,#f0f0f0 75%,#f0f0f0),linear-gradient(45deg,#f0f0f0 25%,#fff 25%,#fff 75%,#f0f0f0 75%,#f0f0f0);background-size:20px 20px;background-position:0 0,10px 10px;display:block;height:100%;width:100%;overflow:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-surface),var(--tw-bg-opacity, 1));padding:.75rem}axp-layout-designer .axp-designer-board ax-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1))}axp-layout-designer .axp-designer-board.axp-state-design .ax-widget-outline{outline-style:dashed;outline-width:1px;outline-offset:2px;outline-color:#d1d5db}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host{cursor:pointer;position:relative}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:2px;outline-offset:1px;outline-color:#60a5fa;outline-color:rgba(var(--ax-sys-color-lightest-surface),1)}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected.ax-widget-container{outline-offset:2px}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover{outline-style:dashed;outline-width:2px;outline-offset:2px;outline-color:#d946ef}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.axp-state-selected{outline-color:#60a5fa}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.ax-widget-container{outline-offset:4px}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:2000;height:100%;width:100%}axp-layout-designer .axp-designer-board .axp-empty-space{display:flex;flex:1 1 0%;cursor:default;align-items:center;justify-content:center;background-color:rgba(var(--ax-sys-color-primary-300),10%);background-image:linear-gradient(135deg,rgba(var(--ax-sys-color-primary-300),50%) 10%,transparent 0,transparent 50%,rgba(var(--ax-sys-color-primary-300),50%) 0,rgba(var(--ax-sys-color-primary-300),50%) 60%,transparent 0,transparent);background-size:7.5px 7.5px;height:100%}axp-layout-designer .axp-designer-board .axp-page-widget-header,axp-layout-designer .axp-designer-board .axp-page-widget-footer{filter:grayscale(100%);opacity:.5}axp-layout-designer .axp-designer-board .axp-page-widget-header:hover,axp-layout-designer .axp-designer-board .axp-page-widget-footer:hover{filter:grayscale(0);opacity:1}axp-layout-designer .axp-designer-board .axp-page-widget-header{margin-bottom:.5rem}axp-layout-designer .axp-designer-board .axp-page-widget-footer{margin-top:.5rem}axp-layout-designer .axp-designer-prop-side{width:20rem;border-inline-start-width:1px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}axp-designer-drawer-content ul.axp-designer-drawer-list{padding:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list li{cursor:pointer;border-radius:.125rem;padding:.25rem .5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}axp-designer-drawer-content ul.axp-designer-drawer-list li:hover:not(.axp-designer-drawer-list){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list li.ax-state-selected{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}axp-designer-drawer-content .axp-designer-drawer-empty{display:flex;align-items:center;justify-content:center;padding:1rem;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: AXPDesignerBoardComponent, selector: "axp-designer-board" }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget"], outputs: ["onChanged"] }, { kind: "component", type: AXPDesignerBreadcrumbsComponent, selector: "axp-designer-breadcrumbs" }, { kind: "component", type: AXPDesignerOutlineComponent, selector: "axp-designer-outline" }, { kind: "component", type: AXPDesignerHeaderMenuComponent, selector: "axp-designer-header-menu" }, { kind: "component", type: AXPDesignerHistoryComponent, selector: "axp-designer-history" }, { kind: "component", type: AXPDesignerDataSourcesComponent, selector: "axp-designer-data-sources" }, { kind: "component", type: AXPDesignerPagesComponent, selector: "axp-designer-pages" }, { kind: "component", type: AXPDesignerViewSizeToolbarComponent, selector: "axp-designer-view-sizes", inputs: ["size"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3$1.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "closeOthers", "collapsed"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i3$1.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXMenuModule }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "component", type: i5.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }], encapsulation: i0.ViewEncapsulation.None }); }
2130
2186
  }
2131
2187
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutDesignerComponent, decorators: [{
2132
2188
  type: Component,
@@ -2159,12 +2215,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2159
2215
  args: ['style']
2160
2216
  }] } });
2161
2217
 
2162
- class AXPDesignerModes {
2163
- static { this.View = { id: 'view', title: 'View' }; }
2164
- static { this.Design = { id: 'designer', title: 'Designer' }; }
2165
- static { this.Edit = { id: 'edit', title: 'Edit' }; }
2166
- }
2167
-
2168
2218
  class AXPLayoutDesignerPreviewViewerComponent {
2169
2219
  constructor() {
2170
2220
  this.context = {};
@@ -2172,18 +2222,21 @@ class AXPLayoutDesignerPreviewViewerComponent {
2172
2222
  this.currentPageIndex = signal(0);
2173
2223
  this.connector = inject(AXPDesignerConnector);
2174
2224
  this.dataSourceProvider = inject(AXPWidgetDataSourceProviderService);
2225
+ this.eventService = inject(AXPBroadcastEventService);
2226
+ this.unsubscriber = inject(AXUnsubscriber);
2175
2227
  this.currentPage = computed(() => {
2176
2228
  return (this.document().children?.[this.currentPageIndex()] ?? { type: AXPWidgetsCatalog.pageLayout });
2177
2229
  });
2178
- this.channel = new BroadcastChannel('livePreviewChannel');
2179
2230
  this.functions = {
2180
2231
  getDataSourceNames: this.getDataSources.bind(this),
2181
2232
  };
2182
- this.channel.addEventListener('message', (message) => {
2183
- if (message.data.action == 'designer-preview') {
2184
- this.document.set(message.data.document);
2185
- }
2233
+ this.eventService
2234
+ .listen(AXPDesignerMessageKeys.Preview)
2235
+ .pipe(this.unsubscriber.takeUntilDestroy)
2236
+ .subscribe((event) => {
2237
+ this.document.set(event.data.document);
2186
2238
  });
2239
+ //
2187
2240
  if (document.body.parentElement) {
2188
2241
  document.body.parentElement.classList.remove('ax-dark');
2189
2242
  document.body.parentElement.style.backgroundColor = 'unset';
@@ -2191,22 +2244,20 @@ class AXPLayoutDesignerPreviewViewerComponent {
2191
2244
  }
2192
2245
  }
2193
2246
  ngAfterViewInit() {
2194
- this.channel.postMessage({
2195
- action: 'designer-preview-loaded',
2196
- });
2247
+ this.eventService.publish(AXPDesignerMessageKeys.Loaded);
2197
2248
  }
2198
2249
  handleContextChanged(e) {
2199
2250
  this.context = e.data;
2200
- this.channel.postMessage({
2201
- action: 'designer-preview-context',
2202
- context: this.context,
2203
- });
2251
+ this.eventService.publish(AXPDesignerMessageKeys.ContextChanged, this.context);
2204
2252
  }
2205
2253
  async getDataSources(name) {
2206
2254
  return await this.dataSourceProvider.get(name);
2207
2255
  }
2256
+ ngOnDestroy() {
2257
+ this.eventService.unsubscribe(AXPDesignerMessageKeys.Preview);
2258
+ }
2208
2259
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutDesignerPreviewViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2209
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPLayoutDesignerPreviewViewerComponent, isStandalone: true, selector: "axp-layout-builder-viewer", ngImport: i0, template: `
2260
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPLayoutDesignerPreviewViewerComponent, isStandalone: true, selector: "axp-layout-builder-viewer", providers: [AXUnsubscriber], ngImport: i0, template: `
2210
2261
  <axp-widgets-container [context]="context" (onContextChanged)="handleContextChanged($event)">
2211
2262
  <ng-container axp-widget-renderer [node]="currentPage()" [mode]="'edit'"></ng-container>
2212
2263
  </axp-widgets-container>
@@ -2222,7 +2273,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2222
2273
  </axp-widgets-container>
2223
2274
  `,
2224
2275
  encapsulation: ViewEncapsulation.None,
2225
- imports: [CommonModule, AXPLayoutBuilderModule]
2276
+ imports: [CommonModule, AXPLayoutBuilderModule],
2277
+ providers: [AXUnsubscriber],
2226
2278
  }]
2227
2279
  }], ctorParameters: () => [] });
2228
2280
 
@@ -2302,19 +2354,16 @@ class AXPLayoutDesignerPreviewComponent extends AXBasePageComponent {
2302
2354
  super();
2303
2355
  this.clipboard = inject(AXPClipBoardService);
2304
2356
  this.settings = inject(AXPSettingService);
2357
+ this.eventService = inject(AXPBroadcastEventService);
2305
2358
  this.initialSize = 'xl';
2306
2359
  this.isDialogWindow = false;
2307
2360
  this.jsonSettingsKey = 'forms:preview:json';
2308
2361
  this.jsonViewCollapsed = signal(true);
2309
2362
  this.size = signal(this.initialSize);
2310
- this.channel = new BroadcastChannel('livePreviewChannel');
2311
2363
  this.context = signal({});
2312
2364
  //
2313
- this.channel.addEventListener('message', (message) => {
2314
- if (message.data.action == 'designer-preview-context') {
2315
- //TODO: json viewer bug
2316
- this.context.set(message.data.context);
2317
- }
2365
+ this.eventService.listen(AXPDesignerMessageKeys.ContextChanged).subscribe((context) => {
2366
+ this.context.set(context);
2318
2367
  });
2319
2368
  }
2320
2369
  async ngOnInit() {
@@ -2332,9 +2381,7 @@ class AXPLayoutDesignerPreviewComponent extends AXBasePageComponent {
2332
2381
  }
2333
2382
  }
2334
2383
  handlePreviewWindow() {
2335
- this.channel.postMessage({
2336
- action: 'open-preview-window',
2337
- });
2384
+ this.eventService.publish(AXPDesignerMessageKeys.PreviewWindow);
2338
2385
  this.close();
2339
2386
  }
2340
2387
  handleCopyJson() {
@@ -2369,5 +2416,5 @@ var preview_component = /*#__PURE__*/Object.freeze({
2369
2416
  * Generated bundle index. Do not edit.
2370
2417
  */
2371
2418
 
2372
- export { AXPDesignerAddWidgetButtonComponent, AXPDesignerAddWidgetLineButtonComponent, AXPDesignerAddWidgetMiniButtonComponent, AXPDesignerConnector, AXPDesignerGridDrawerComponent, AXPDesignerModes, AXPDesignerService, AXPDesignerWidgetPickerComponent, AXPLayoutDesignerComponent, AXPLayoutDesignerPreviewComponent, AXPLayoutDesignerPreviewViewerComponent, AXPWidgetDesignerRendererDirective, AXPWidgetPropertyViewerComponent, AXP_DESIGNER_ADD_WIDGET_MENU, AXP_DESIGNER_CLONE_MENU, AXP_DESIGNER_COPY_MENU, AXP_DESIGNER_CUT_MENU, AXP_DESIGNER_DELETE_WIDGET_MENU, AXP_DESIGNER_PASTE_MENU, AXP_DESIGNER_SAVE_AS_WIDGET_MENU, AXP_DESIGNER_SELECT_WIDGET_MENU, cloneWidgetMenu };
2419
+ export { AXPDesignerAddWidgetButtonComponent, AXPDesignerAddWidgetLineButtonComponent, AXPDesignerAddWidgetMiniButtonComponent, AXPDesignerConnector, AXPDesignerGridDrawerComponent, AXPDesignerMessageKeys, AXPDesignerModes, AXPDesignerService, AXPDesignerWidgetPickerComponent, AXPLayoutDesignerComponent, AXPLayoutDesignerPreviewComponent, AXPLayoutDesignerPreviewViewerComponent, AXPTemplateLoadingStrategy, AXPWidgetDesignerRendererDirective, AXPWidgetPropertyViewerComponent, AXP_DESIGNER_ADD_WIDGET_MENU, AXP_DESIGNER_CLONE_MENU, AXP_DESIGNER_COPY_MENU, AXP_DESIGNER_CUT_MENU, AXP_DESIGNER_DELETE_WIDGET_MENU, AXP_DESIGNER_PASTE_MENU, AXP_DESIGNER_SAVE_AS_WIDGET_MENU, AXP_DESIGNER_SELECT_WIDGET_MENU, cloneWidgetMenu };
2373
2420
  //# sourceMappingURL=acorex-platform-layout-designer.mjs.map