@acorex/platform 19.2.6 → 19.2.7

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 (78) hide show
  1. package/common/lib/app/application.types.d.ts +3 -1
  2. package/common/lib/settings/settings.service.d.ts +3 -2
  3. package/common/lib/utils/export-popup.d.ts +2 -1
  4. package/common/lib/utils/expression-evaluator.service.d.ts +11 -0
  5. package/common/lib/utils/index.d.ts +1 -0
  6. package/fesm2022/acorex-platform-common.mjs +86 -28
  7. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  8. package/fesm2022/acorex-platform-layout-builder.mjs +14 -4
  9. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  10. package/fesm2022/acorex-platform-layout-designer.mjs +5 -5
  11. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  12. package/fesm2022/acorex-platform-layout-entity.mjs +29 -7
  13. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  14. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-ClNKQnoc.mjs → acorex-platform-themes-default-entity-master-list-view.component-De61n012.mjs} +28 -15
  15. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-De61n012.mjs.map +1 -0
  16. package/fesm2022/{acorex-platform-themes-default-search-popup.component-BZJTLnlM.mjs → acorex-platform-themes-default-search-popup.component-Blkpqvqa.mjs} +4 -4
  17. package/fesm2022/{acorex-platform-themes-default-search-popup.component-BZJTLnlM.mjs.map → acorex-platform-themes-default-search-popup.component-Blkpqvqa.mjs.map} +1 -1
  18. package/fesm2022/{acorex-platform-themes-default-setting-page.component-oA4kM_-3.mjs → acorex-platform-themes-default-setting-page.component-BERYnJnp.mjs} +8 -8
  19. package/fesm2022/acorex-platform-themes-default-setting-page.component-BERYnJnp.mjs.map +1 -0
  20. package/fesm2022/{acorex-platform-themes-default-setting-view.component-CJZBhtKE.mjs → acorex-platform-themes-default-setting-view.component-BagAWM4W.mjs} +2 -2
  21. package/fesm2022/{acorex-platform-themes-default-setting-view.component-CJZBhtKE.mjs.map → acorex-platform-themes-default-setting-view.component-BagAWM4W.mjs.map} +1 -1
  22. package/fesm2022/{acorex-platform-themes-default-theme-palette-preview.page-D_AK8uVB.mjs → acorex-platform-themes-default-theme-palette-preview.page-D-yzbISw.mjs} +25 -5
  23. package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-D-yzbISw.mjs.map +1 -0
  24. package/fesm2022/acorex-platform-themes-default.mjs +24 -17
  25. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  26. package/fesm2022/acorex-platform-themes-shared.mjs +112 -54
  27. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  28. package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-D2-nHqYy.mjs +144 -0
  29. package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-D2-nHqYy.mjs.map +1 -0
  30. package/fesm2022/acorex-platform-widgets-tabular-data-view-popup.component-BBRVgZLu.mjs +48 -0
  31. package/fesm2022/acorex-platform-widgets-tabular-data-view-popup.component-BBRVgZLu.mjs.map +1 -0
  32. package/fesm2022/acorex-platform-widgets.mjs +555 -92
  33. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  34. package/layout/builder/lib/builder/widget-groups.d.ts +1 -0
  35. package/layout/builder/lib/builder/widget-map.d.ts +3 -0
  36. package/layout/builder/lib/builder/widget.types.d.ts +1 -1
  37. package/layout/entity/lib/entity-master-list.viewmodel.d.ts +2 -1
  38. package/layout/entity/lib/entity.viewmodel.d.ts +2 -0
  39. package/layout/setting/lib/setting.viewmodel.d.ts +2 -2
  40. package/package.json +1 -1
  41. package/themes/default/lib/layouts/base/simple-page/simple-page.layout.d.ts +4 -3
  42. package/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.d.ts +2 -2
  43. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +4 -4
  44. package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +2 -2
  45. package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +2 -2
  46. package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +2 -2
  47. package/themes/default/lib/layouts/setting-layout/setting-view/setting-view.component.d.ts +2 -2
  48. package/themes/default/lib/pages/theme-palette-preview/theme-palette-preview.page.d.ts +3 -2
  49. package/themes/shared/lib/components/layout-elements/index.d.ts +1 -0
  50. package/themes/shared/lib/components/layout-elements/layout-blocks.component.d.ts +1 -1
  51. package/themes/shared/lib/components/layout-elements/layout-footer.component.d.ts +5 -0
  52. package/themes/shared/lib/components/slots/theme-slot.component.d.ts +2 -2
  53. package/themes/shared/lib/theme.service.d.ts +2 -2
  54. package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +3 -1
  55. package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget-edit.component.d.ts +13 -0
  56. package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.config.d.ts +7 -0
  57. package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +15 -0
  58. package/widgets/lib/widgets/charts/bar-chart/index.d.ts +2 -0
  59. package/widgets/lib/widgets/charts/chart.type.d.ts +4 -0
  60. package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget-edit.component.d.ts +14 -0
  61. package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget.config.d.ts +7 -0
  62. package/widgets/lib/widgets/charts/donut-chart/donut-chart.type.d.ts +13 -0
  63. package/widgets/lib/widgets/charts/donut-chart/index.d.ts +2 -0
  64. package/widgets/lib/widgets/editors/tabular-data/index.d.ts +6 -0
  65. package/widgets/lib/widgets/editors/tabular-data/table-widget-column.component.d.ts +6 -0
  66. package/widgets/lib/widgets/editors/tabular-data/table-widget-filter.component.d.ts +6 -0
  67. package/widgets/lib/widgets/editors/tabular-data/table-widget-print.component.d.ts +6 -0
  68. package/widgets/lib/widgets/editors/tabular-data/table-widget.config.d.ts +7 -0
  69. package/widgets/lib/widgets/editors/tabular-data/tabular-data-edit-popup.component.d.ts +18 -0
  70. package/widgets/lib/widgets/editors/tabular-data/tabular-data-view-popup.component.d.ts +10 -0
  71. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-edit.component.d.ts +12 -0
  72. package/widgets/lib/widgets/editors/tabular-data/tabular-data-widget-view.component.d.ts +13 -0
  73. package/widgets/lib/widgets/editors/tabular-data/tabular-widget.types.d.ts +11 -0
  74. package/widgets/lib/widgets/editors/text/text-box-widget-edit.component.d.ts +0 -1
  75. package/widgets/lib/widgets/index.d.ts +2 -0
  76. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-ClNKQnoc.mjs.map +0 -1
  77. package/fesm2022/acorex-platform-themes-default-setting-page.component-oA4kM_-3.mjs.map +0 -1
  78. package/fesm2022/acorex-platform-themes-default-theme-palette-preview.page-D_AK8uVB.mjs.map +0 -1
@@ -150,12 +150,14 @@ export type AXPCommandActionCallback = string | {
150
150
  };
151
151
  };
152
152
  export interface AXPCommandAction extends Partial<AXPCommandActionLook> {
153
- permissions?: string[];
154
153
  command: AXPCommandActionCallback;
155
154
  title: string;
156
155
  type: AXPCommandActionType;
157
156
  priority: 'primary' | 'secondary';
158
157
  separated?: boolean;
158
+ permissions?: string[];
159
+ hidden?: boolean | string;
160
+ disabled?: boolean | string;
159
161
  }
160
162
  export interface AXPEntityAction extends AXPCommandAction {
161
163
  scope: AXPEntityCommandScope;
@@ -12,20 +12,21 @@ export declare class AXPSettingService implements AXPSettingServiceInterface {
12
12
  private readonly injector;
13
13
  private scopedSettingsCache;
14
14
  readonly onChanged: Subject<AXPSettingChangedEvent>;
15
+ private readonly broadcastChannel;
15
16
  constructor();
16
17
  load(): Promise<AXPSettingValue[]>;
17
18
  get<T = any>(key: string): Promise<T>;
18
19
  defaultValues(scope: AXPSettingScope): Promise<Record<string, unknown>>;
19
20
  scope(scope: AXPSettingScope): ScopedSettingService;
21
+ invokeChangeEvent(event: AXPSettingChangedEvent): void;
20
22
  static ɵfac: i0.ɵɵFactoryDeclaration<AXPSettingService, never>;
21
23
  static ɵprov: i0.ɵɵInjectableDeclaration<AXPSettingService>;
22
24
  }
23
25
  declare class ScopedSettingService {
24
26
  private parent;
25
27
  private provider;
26
- private onChanged;
27
28
  private scopeCache;
28
- constructor(parent: AXPSettingService, provider: AXPSettingValueProvider, onChanged: Subject<AXPSettingChangedEvent>, scopeCache: Map<string, any>);
29
+ constructor(parent: AXPSettingService, provider: AXPSettingValueProvider, scopeCache: Map<string, any>);
29
30
  get<T = any>(key: string): Promise<T>;
30
31
  all(): Promise<any>;
31
32
  defaultValues(): Promise<Record<string, unknown>>;
@@ -1,3 +1,4 @@
1
+ import { AXValueChangedEvent } from '@acorex/components/common';
1
2
  import { AXBasePageComponent } from '@acorex/components/page';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare class AXMOrgChartPrintPage extends AXBasePageComponent {
@@ -12,7 +13,7 @@ export declare class AXMOrgChartPrintPage extends AXBasePageComponent {
12
13
  protected quality: import("@angular/core").ModelSignal<number | undefined>;
13
14
  protected qualityComputed: import("@angular/core").WritableSignal<number>;
14
15
  protected scale: import("@angular/core").ModelSignal<number | undefined>;
15
- protected calculateRatio(value: number, type: 'width' | 'height'): void;
16
+ protected calculateRatio(event: AXValueChangedEvent, type: 'width' | 'height'): void;
16
17
  protected handleClose(isCanceled?: boolean): Promise<void>;
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<AXMOrgChartPrintPage, never>;
18
19
  static ɵcmp: i0.ɵɵComponentDeclaration<AXMOrgChartPrintPage, "ng-component", never, { "bgcolor": { "alias": "bgcolor"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "quality": { "alias": "quality"; "required": false; "isSignal": true; }; "scale": { "alias": "scale"; "required": false; "isSignal": true; }; }, { "bgcolor": "bgcolorChange"; "width": "widthChange"; "height": "heightChange"; "quality": "qualityChange"; "scale": "scaleChange"; }, never, never, true, never>;
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ export type AXPExpressionEvaluatorScope = {
3
+ [name: string]: {
4
+ [name: string]: Function;
5
+ };
6
+ };
7
+ export declare class AXPExpressionEvaluatorService {
8
+ evaluateExpression(obj: any, templateExpression: string, scope: AXPExpressionEvaluatorScope): Promise<any>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXPExpressionEvaluatorService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXPExpressionEvaluatorService>;
11
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './clipboard-service';
2
2
  export * from './data-generator';
3
3
  export * from './export.service';
4
+ export * from './expression-evaluator.service';
@@ -122,7 +122,11 @@ function getEntityInfo(entity) {
122
122
  },
123
123
  };
124
124
  }
125
- function createQueryView(name, title, fixed, params = { columns: [], conditions: [], sorts: [] }) {
125
+ function createQueryView(name, title, fixed, params = {
126
+ columns: [],
127
+ conditions: [],
128
+ sorts: [],
129
+ }) {
126
130
  params = Object.assign({ columns: [], sorts: [], conditions: [] }, params);
127
131
  return {
128
132
  name,
@@ -133,9 +137,17 @@ function createQueryView(name, title, fixed, params = { columns: [], conditions:
133
137
  sorts: params.sorts ?? [],
134
138
  };
135
139
  }
136
- function createAllQueryView(params = { columns: [], sorts: [], conditions: [] }) {
140
+ function createAllQueryView(params = {
141
+ columns: [],
142
+ sorts: [],
143
+ conditions: [],
144
+ }) {
137
145
  params = Object.assign({ columns: [], sorts: [], conditions: [] }, params);
138
- return createQueryView('all', 't("allItem", { scope: "common" })', true, { columns: params.columns ?? [], conditions: params.conditions ?? [], sorts: params.sorts ?? [] });
146
+ return createQueryView('all', 't("allItem", { scope: "common" })', true, {
147
+ columns: params.columns ?? [],
148
+ conditions: params.conditions ?? [],
149
+ sorts: params.sorts ?? [],
150
+ });
139
151
  }
140
152
  function resolveActionLook(tr) {
141
153
  const icon = 'fa-light';
@@ -410,16 +422,19 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
410
422
  });
411
423
  }
412
424
  #init;
413
- calculateRatio(value, type) {
414
- if (!this.ratio())
425
+ calculateRatio(event, type) {
426
+ if (!this.ratio() || !event.isUserInteraction)
415
427
  return;
428
+ const value = event.value;
416
429
  if (type === 'width') {
417
- const newHeight = Math.round((value / this.baseWidth()) * this.baseHeight());
430
+ const newHeight = Math.round((value / this.baseWidth()) * this.baseHeight() * 100) / 100;
418
431
  this.height.set(newHeight);
432
+ this.width.set(value);
419
433
  }
420
434
  else {
421
- const newWidth = Math.round((value / this.baseHeight()) * this.baseWidth());
435
+ const newWidth = Math.round((value / this.baseHeight()) * this.baseWidth() * 100) / 100;
422
436
  this.width.set(newWidth);
437
+ this.height.set(value);
423
438
  }
424
439
  }
425
440
  async handleClose(isCanceled = false) {
@@ -439,8 +454,8 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
439
454
  <ax-number-box
440
455
  [changeOnScroll]="true"
441
456
  [decimals]="4"
442
- [(ngModel)]="width"
443
- (ngModelChange)="calculateRatio($event, 'width')"
457
+ [value]="width()"
458
+ (onValueChanged)="calculateRatio($event, 'width')"
444
459
  name="Width"
445
460
  >
446
461
  </ax-number-box>
@@ -450,8 +465,8 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
450
465
  <ax-number-box
451
466
  [changeOnScroll]="true"
452
467
  [decimals]="4"
453
- [(ngModel)]="height"
454
- (ngModelChange)="calculateRatio($event, 'height')"
468
+ [value]="height()"
469
+ (onValueChanged)="calculateRatio($event, 'height')"
455
470
  name="Height"
456
471
  >
457
472
  </ax-number-box>
@@ -475,14 +490,14 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
475
490
  </div>
476
491
 
477
492
  <ax-footer>
493
+ <ax-prefix>
494
+ </ax-prefix>
478
495
  <ax-suffix>
496
+ <ax-button text="Cancel" look="solid" (onClick)="handleClose(true)"> </ax-button>
479
497
  <ax-button text="Print" look="solid" color="primary" (onClick)="handleClose()">
480
498
  <ax-icon class="fa-solid fa-print"> </ax-icon>
481
499
  </ax-button>
482
500
  </ax-suffix>
483
- <ax-prefix>
484
- <ax-button text="Cancel" look="solid" color="danger" (onClick)="handleClose(true)"> </ax-button>
485
- </ax-prefix>
486
501
  </ax-footer>`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXNumberBoxModule }, { kind: "component", type: i2.AXNumberBoxComponent, selector: "ax-number-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "changeOnScroll", "thousandsSeparator", "padDecimalZeros", "step", "decimals", "decimalStep", "showSpinButtons", "minValue", "maxValue", "class"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.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: i5.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: "ngmodule", type: AXColorBoxModule }, { kind: "component", type: i6.AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange"] }] }); }
487
502
  }
488
503
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMOrgChartPrintPage, decorators: [{
@@ -494,8 +509,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
494
509
  <ax-number-box
495
510
  [changeOnScroll]="true"
496
511
  [decimals]="4"
497
- [(ngModel)]="width"
498
- (ngModelChange)="calculateRatio($event, 'width')"
512
+ [value]="width()"
513
+ (onValueChanged)="calculateRatio($event, 'width')"
499
514
  name="Width"
500
515
  >
501
516
  </ax-number-box>
@@ -505,8 +520,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
505
520
  <ax-number-box
506
521
  [changeOnScroll]="true"
507
522
  [decimals]="4"
508
- [(ngModel)]="height"
509
- (ngModelChange)="calculateRatio($event, 'height')"
523
+ [value]="height()"
524
+ (onValueChanged)="calculateRatio($event, 'height')"
510
525
  name="Height"
511
526
  >
512
527
  </ax-number-box>
@@ -530,14 +545,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
530
545
  </div>
531
546
 
532
547
  <ax-footer>
548
+ <ax-prefix>
549
+ </ax-prefix>
533
550
  <ax-suffix>
551
+ <ax-button text="Cancel" look="solid" (onClick)="handleClose(true)"> </ax-button>
534
552
  <ax-button text="Print" look="solid" color="primary" (onClick)="handleClose()">
535
553
  <ax-icon class="fa-solid fa-print"> </ax-icon>
536
554
  </ax-button>
537
555
  </ax-suffix>
538
- <ax-prefix>
539
- <ax-button text="Cancel" look="solid" color="danger" (onClick)="handleClose(true)"> </ax-button>
540
- </ax-prefix>
541
556
  </ax-footer>`,
542
557
  imports: [
543
558
  FormsModule,
@@ -578,7 +593,7 @@ class AXPExportService {
578
593
  throw new Error('Process is Canceled by User!');
579
594
  }
580
595
  else {
581
- newOptions = result.data;
596
+ newOptions = { ...options, ...result.data };
582
597
  }
583
598
  }
584
599
  return domtoimage.toBlob(element, {
@@ -610,6 +625,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
610
625
  }]
611
626
  }] });
612
627
 
628
+ class AXPExpressionEvaluatorService {
629
+ async evaluateExpression(obj, templateExpression, scope) {
630
+ try {
631
+ // Check cache first, but cache the function for evaluation, not the evaluated value
632
+ const expressionMatch = templateExpression.match(/\{\{\s*(.*?)\s*\}\}/);
633
+ if (!expressionMatch) {
634
+ throw Error(`No valid expression found in "${templateExpression}"`);
635
+ }
636
+ const expression = expressionMatch[1];
637
+ // Cache the evaluation function instead of the result.
638
+ const evaluationFunction = async () => {
639
+ const sandbox = new Function('scope', `with (scope) { return (async function() { return ${expression}; })(); }`);
640
+ // Call the sandbox passing in the current global scope and the object.
641
+ return await sandbox(scope);
642
+ };
643
+ return await evaluationFunction();
644
+ }
645
+ catch (error) {
646
+ console.error('Error evaluating expression:', error);
647
+ return false;
648
+ }
649
+ }
650
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPExpressionEvaluatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
651
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPExpressionEvaluatorService, providedIn: 'root' }); }
652
+ }
653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPExpressionEvaluatorService, decorators: [{
654
+ type: Injectable,
655
+ args: [{ providedIn: 'root' }]
656
+ }] });
657
+
613
658
  class AXPDexieEntityStorageService extends Dexie {
614
659
  constructor() {
615
660
  super('ACoreXPlatform');
@@ -2223,6 +2268,7 @@ class AXPSettingService {
2223
2268
  this.injector = inject(Injector);
2224
2269
  this.scopedSettingsCache = new Map();
2225
2270
  this.onChanged = new Subject();
2271
+ this.broadcastChannel = new BroadcastChannel('AXPSettingChannel'); // BroadcastChannel for sync
2226
2272
  // Initialize scoped caches for dynamic scopes
2227
2273
  const staticScopes = [AXPSettingScope.Environment, AXPSettingScope.Global, AXPSettingScope.Tenant, AXPSettingScope.User];
2228
2274
  staticScopes.forEach((scope) => {
@@ -2230,6 +2276,15 @@ class AXPSettingService {
2230
2276
  this.scopedSettingsCache.set(scope, new Map());
2231
2277
  }
2232
2278
  });
2279
+ // Listen for setting changes from other tabs
2280
+ this.broadcastChannel.onmessage = (event) => {
2281
+ const data = event.data;
2282
+ console.log('[AXPSettingService] Received broadcasted setting change:', data);
2283
+ data.keys.forEach((key) => {
2284
+ this.scopedSettingsCache.get(data.scope)?.set(key, data.values[key]);
2285
+ });
2286
+ this.onChanged.next(data); // Notify subscribers in the current tab
2287
+ };
2233
2288
  }
2234
2289
  async load() {
2235
2290
  try {
@@ -2297,7 +2352,11 @@ class AXPSettingService {
2297
2352
  if (!provider) {
2298
2353
  throw new Error(`No provider found for scope: ${scope}`);
2299
2354
  }
2300
- return new ScopedSettingService(this, provider, this.onChanged, this.scopedSettingsCache.get(scope));
2355
+ return new ScopedSettingService(this, provider, this.scopedSettingsCache.get(scope));
2356
+ }
2357
+ invokeChangeEvent(event) {
2358
+ this.onChanged.next(event);
2359
+ this.broadcastChannel.postMessage(event);
2301
2360
  }
2302
2361
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2303
2362
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPSettingService, providedIn: 'root' }); }
@@ -2309,10 +2368,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2309
2368
  }]
2310
2369
  }], ctorParameters: () => [] });
2311
2370
  class ScopedSettingService {
2312
- constructor(parent, provider, onChanged, scopeCache) {
2371
+ constructor(parent, provider, scopeCache) {
2313
2372
  this.parent = parent;
2314
2373
  this.provider = provider;
2315
- this.onChanged = onChanged;
2316
2374
  this.scopeCache = scopeCache;
2317
2375
  }
2318
2376
  async get(key) {
@@ -2332,7 +2390,7 @@ class ScopedSettingService {
2332
2390
  // Single key-value pair
2333
2391
  await this.provider.set(keyOrValues, value);
2334
2392
  this.scopeCache.set(keyOrValues, value); // Sync the cache
2335
- this.onChanged.next({
2393
+ this.parent.invokeChangeEvent({
2336
2394
  scope: this.provider.scope,
2337
2395
  keys: [keyOrValues],
2338
2396
  values: { [keyOrValues]: value },
@@ -2344,7 +2402,7 @@ class ScopedSettingService {
2344
2402
  await this.provider.set(keyOrValues);
2345
2403
  Object.entries(keyOrValues).forEach(([key, val]) => this.scopeCache.set(key, val)); // Sync the cache
2346
2404
  const entries = Object.entries(keyOrValues).map(([key, val]) => ({ key, value: val }));
2347
- this.onChanged.next({
2405
+ this.parent.invokeChangeEvent({
2348
2406
  scope: this.provider.scope,
2349
2407
  keys: Object.keys(keyOrValues),
2350
2408
  values: keyOrValues,
@@ -2712,5 +2770,5 @@ const AXPSignInAction = createAction('[SignIn] Action');
2712
2770
  * Generated bundle index. Do not edit.
2713
2771
  */
2714
2772
 
2715
- export { ALL_DEFAULT_OPERATORS, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXMWorkflowErrorHandler, AXPAppStartUpProvider, AXPAppStartUpService, AXPClipBoardService, AXPCommonModule, AXPComponentLogoConfig, AXPComponentSlotDirective, AXPComponentSlotLoaderService, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataGenerator, AXPDataProvider, AXPDataSeederService, AXPDexieEntityStorageService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityQueryType, AXPEntityStorageService, AXPErrorHandlerRegistryService, AXPExportService, AXPFileStorageService, AXPFileStorageStatus, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFiltersProviderService, AXPFontIconLogoConfig, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGridLayoutDirective, AXPImageUrlLogoConfig, AXPLogoComponent, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRelationshipCardinality, AXPRelationshipKind, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingScope, AXPSettingService, AXPSignInAction, AXPSignOutAction, AXPStickyDirective, AXPTextLogoConfig, AXPToastAction, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_DATA_SEEDER_TOKEN, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createQueryView, getEntityInfo, resolveActionLook };
2773
+ export { ALL_DEFAULT_OPERATORS, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXMWorkflowErrorHandler, AXPAppStartUpProvider, AXPAppStartUpService, AXPClipBoardService, AXPCommonModule, AXPComponentLogoConfig, AXPComponentSlotDirective, AXPComponentSlotLoaderService, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataGenerator, AXPDataProvider, AXPDataSeederService, AXPDexieEntityStorageService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityQueryType, AXPEntityStorageService, AXPErrorHandlerRegistryService, AXPExportService, AXPExpressionEvaluatorService, AXPFileStorageService, AXPFileStorageStatus, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFiltersProviderService, AXPFontIconLogoConfig, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGridLayoutDirective, AXPImageUrlLogoConfig, AXPLogoComponent, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRelationshipCardinality, AXPRelationshipKind, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValueProvider, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingScope, AXPSettingService, AXPSignInAction, AXPSignOutAction, AXPStickyDirective, AXPTextLogoConfig, AXPToastAction, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_DATA_SEEDER_TOKEN, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createQueryView, getEntityInfo, resolveActionLook };
2716
2774
  //# sourceMappingURL=acorex-platform-common.mjs.map