@magic-xpa/angular 4.1300.0-dev4130.22 → 4.1300.0-dev4130.222

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 (63) hide show
  1. package/fesm2022/magic-xpa-angular.mjs +317 -128
  2. package/fesm2022/magic-xpa-angular.mjs.map +1 -1
  3. package/package.json +13 -11
  4. package/types/magic-xpa-angular.d.ts +2633 -0
  5. package/index.d.ts +0 -61
  6. package/src/controls.metadata.model.d.ts +0 -78
  7. package/src/interfaces/sub-form-definition.iterface.d.ts +0 -18
  8. package/src/magic.core.module.d.ts +0 -44
  9. package/src/services/ISubformMagicService.d.ts +0 -4
  10. package/src/services/OverlayWindowService.d.ts +0 -49
  11. package/src/services/StylesMapManager.d.ts +0 -8
  12. package/src/services/accessor.magic.service.d.ts +0 -311
  13. package/src/services/commands-collector.magic.service.d.ts +0 -18
  14. package/src/services/component-list.magic.service.d.ts +0 -50
  15. package/src/services/confirmation.components.magic.provider.d.ts +0 -24
  16. package/src/services/engine.magic.service.d.ts +0 -32
  17. package/src/services/exit.magic.service.d.ts +0 -12
  18. package/src/services/magic-color.service.d.ts +0 -25
  19. package/src/services/magic.lazy.loader.service.d.ts +0 -6
  20. package/src/services/magic.providers.d.ts +0 -110
  21. package/src/services/magic.services.d.ts +0 -22
  22. package/src/services/mg-date-adapter.d.ts +0 -38
  23. package/src/services/overlay.conainer.magic.provider.d.ts +0 -7
  24. package/src/services/router-commands.magic.service.d.ts +0 -23
  25. package/src/services/subform.magic.service.d.ts +0 -71
  26. package/src/services/table.magic.service.d.ts +0 -86
  27. package/src/services/task.magics.service.d.ts +0 -405
  28. package/src/services/title.magic.service.d.ts +0 -20
  29. package/src/ui/GuiInteractiveExecutor.d.ts +0 -25
  30. package/src/ui/components/base-magic-alert.component.d.ts +0 -26
  31. package/src/ui/components/base-magic-confirm.component.d.ts +0 -28
  32. package/src/ui/components/magic-alert.component.d.ts +0 -9
  33. package/src/ui/components/magic-confirmation-box.component.d.ts +0 -9
  34. package/src/ui/directives/NonMagicControlDirective.d.ts +0 -67
  35. package/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.d.ts +0 -15
  36. package/src/ui/directives/magic/checkbox.magic.directive.d.ts +0 -34
  37. package/src/ui/directives/magic/combobox.magic.directive.d.ts +0 -19
  38. package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts +0 -13
  39. package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts +0 -36
  40. package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts +0 -13
  41. package/src/ui/directives/magic/input.noformcontrol.magic.directive.d.ts +0 -15
  42. package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +0 -21
  43. package/src/ui/directives/magic/row.magic.directive.d.ts +0 -32
  44. package/src/ui/directives/magic-focus.directive.d.ts +0 -12
  45. package/src/ui/directives/magic.directive.d.ts +0 -127
  46. package/src/ui/directives/magicViewContainerRef.directive.d.ts +0 -11
  47. package/src/ui/directives/mgformat.magic.directive.d.ts +0 -82
  48. package/src/ui/directives/range-validator.magic.directive.d.ts +0 -33
  49. package/src/ui/magic-confirmationBox.d.ts +0 -25
  50. package/src/ui/magic-modal/base-magic-overlay-container.d.ts +0 -14
  51. package/src/ui/magic-modal/magic-modal-form.d.ts +0 -8
  52. package/src/ui/magic-modal/magic-modal-interface.d.ts +0 -45
  53. package/src/ui/magic-modal/magic-overlay-container-wrapper.d.ts +0 -50
  54. package/src/ui/magic-modal/magic-overlay-container.d.ts +0 -117
  55. package/src/ui/magic-root.component.d.ts +0 -85
  56. package/src/ui/mgerror.magic.component.d.ts +0 -39
  57. package/src/ui/pipes/date.magic.pipe.d.ts +0 -23
  58. package/src/ui/pipes/time.magic.pipe.d.ts +0 -14
  59. package/src/ui/pipes/time24.magic.pipe.d.ts +0 -10
  60. package/src/ui/router-container.magic.component.d.ts +0 -50
  61. package/src/ui/subform.magic.component.d.ts +0 -37
  62. package/src/ui/task-base.magic.component.d.ts +0 -112
  63. package/src/ui/utils.d.ts +0 -12
@@ -6,13 +6,13 @@ import { DatePipe, CommonModule, formatDate } from '@angular/common';
6
6
  import * as i2 from '@angular/router';
7
7
  import { NavigationEnd, RouterModule } from '@angular/router';
8
8
  import { FormGroup, FormControl, Validators, NG_VALIDATORS, NG_VALUE_ACCESSOR, CheckboxControlValueAccessor, DefaultValueAccessor, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
- import * as i3 from 'ng-dynamic-component';
9
+ import * as i2$3 from 'ng-dynamic-component';
10
10
  import { DynamicModule } from 'ng-dynamic-component';
11
11
  import { InteractiveCommandType, HtmlProperties, OverlayType, Styles, GuiConstants, CommandType, PIC, GuiEnvironment, Events, Modifiers } from '@magic-xpa/gui';
12
12
  import { MagicBridge, getGuiEventObj, CookieService, Environment, LastFocusedManager } from '@magic-xpa/engine';
13
13
  import { MagicProperties, Logger, StrUtil, StorageAttribute, PICInterface, MsgInterface, BindingLevel, StorageAttributeType, MgControlType } from '@magic-xpa/utils';
14
14
  import { filter, map, debounceTime, take } from 'rxjs/operators';
15
- import { Subject, EMPTY, fromEvent } from 'rxjs';
15
+ import { Subject, EMPTY, fromEvent, Observable } from 'rxjs';
16
16
  import { __decorate, __metadata } from 'tslib';
17
17
  import * as i2$1 from '@angular/cdk/drag-drop';
18
18
  import { DragDropModule, CdkDragHandle, CdkDrag } from '@angular/cdk/drag-drop';
@@ -23,6 +23,7 @@ import { maskitoTimeOptionsGenerator } from '@maskito/kit';
23
23
  import * as i2$2 from '@angular/cdk/platform';
24
24
  import { MaskitoModule } from '@maskito/angular';
25
25
  import { NativeDateAdapter, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
26
+ import { io } from 'socket.io-client';
26
27
 
27
28
  /**
28
29
  * @ignore
@@ -1003,6 +1004,61 @@ class GuiInteractiveExecutor {
1003
1004
  }
1004
1005
  }
1005
1006
 
1007
+ class MagicModalProperties {
1008
+ static formName = "overlay";
1009
+ static showTitleBar = true;
1010
+ static x = 0;
1011
+ static y = 0;
1012
+ static width = "300px";
1013
+ static height = "300px";
1014
+ static isCenteredToWindow = true;
1015
+ static shouldCloseOnBackgroundClick = true;
1016
+ static isResizable = true;
1017
+ static isMovable = true;
1018
+ constructor(formName, showTitleBar, x, y, width, height, isCenteredToWindow, shouldCloseOnBackgroundClick, isResizable, isMovable) {
1019
+ MagicModalProperties.formName = formName;
1020
+ MagicModalProperties.showTitleBar = showTitleBar;
1021
+ MagicModalProperties.x = x;
1022
+ MagicModalProperties.y = y;
1023
+ MagicModalProperties.width = width;
1024
+ MagicModalProperties.height = height;
1025
+ MagicModalProperties.isCenteredToWindow = isCenteredToWindow;
1026
+ MagicModalProperties.shouldCloseOnBackgroundClick = shouldCloseOnBackgroundClick;
1027
+ MagicModalProperties.isResizable = isResizable;
1028
+ MagicModalProperties.isMovable = isMovable;
1029
+ }
1030
+ X() {
1031
+ return MagicModalProperties.x;
1032
+ }
1033
+ Y() {
1034
+ return MagicModalProperties.y;
1035
+ }
1036
+ Width() {
1037
+ return MagicModalProperties.width;
1038
+ }
1039
+ Height() {
1040
+ return MagicModalProperties.height;
1041
+ }
1042
+ IsCenteredToWindow() {
1043
+ return MagicModalProperties.isCenteredToWindow;
1044
+ }
1045
+ FormName() {
1046
+ return MagicModalProperties.formName;
1047
+ }
1048
+ ShowTitleBar() {
1049
+ return MagicModalProperties.showTitleBar;
1050
+ }
1051
+ ShouldCloseOnBackgroundClick() {
1052
+ return MagicModalProperties.shouldCloseOnBackgroundClick;
1053
+ }
1054
+ IsResizable() {
1055
+ return MagicModalProperties.isResizable;
1056
+ }
1057
+ IsMovable() {
1058
+ return MagicModalProperties.isMovable;
1059
+ }
1060
+ }
1061
+
1006
1062
  let BaseMagicOverlayContainer = class BaseMagicOverlayContainer {
1007
1063
  };
1008
1064
  __decorate([
@@ -1046,50 +1102,50 @@ class MagicViewContainerRef {
1046
1102
 
1047
1103
  const _c0$3 = ["modalheader"];
1048
1104
  const _c1$1 = ["modalForeground"];
1049
- function MagicOverlayContainer_button_2_Template(rf, ctx) { if (rf & 1) {
1050
- const _r2 = i0.ɵɵgetCurrentView();
1105
+ function MagicOverlayContainer_Conditional_2_Template(rf, ctx) { if (rf & 1) {
1106
+ const _r1 = i0.ɵɵgetCurrentView();
1051
1107
  i0.ɵɵelementStart(0, "button", 14);
1052
- i0.ɵɵlistener("click", function MagicOverlayContainer_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnClose()); });
1108
+ i0.ɵɵlistener("click", function MagicOverlayContainer_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnClose()); });
1053
1109
  i0.ɵɵtext(1, "X");
1054
1110
  i0.ɵɵelementEnd();
1055
1111
  } }
1056
- function MagicOverlayContainer_span_5_Template(rf, ctx) { if (rf & 1) {
1057
- const _r4 = i0.ɵɵgetCurrentView();
1112
+ function MagicOverlayContainer_Conditional_5_Template(rf, ctx) { if (rf & 1) {
1113
+ const _r3 = i0.ɵɵgetCurrentView();
1058
1114
  i0.ɵɵelementStart(0, "span", 15);
1059
- i0.ɵɵlistener("mousedown", function MagicOverlayContainer_span_5_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onResizeStart($event, "right")); });
1115
+ i0.ɵɵlistener("mousedown", function MagicOverlayContainer_Conditional_5_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onResizeStart($event, "right")); });
1060
1116
  i0.ɵɵelementEnd();
1061
1117
  } }
1062
- function MagicOverlayContainer_span_6_Template(rf, ctx) { if (rf & 1) {
1063
- const _r5 = i0.ɵɵgetCurrentView();
1118
+ function MagicOverlayContainer_Conditional_6_Template(rf, ctx) { if (rf & 1) {
1119
+ const _r4 = i0.ɵɵgetCurrentView();
1064
1120
  i0.ɵɵelementStart(0, "span", 16);
1065
- i0.ɵɵlistener("mousedown", function MagicOverlayContainer_span_6_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onResizeStart($event, "left")); });
1121
+ i0.ɵɵlistener("mousedown", function MagicOverlayContainer_Conditional_6_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onResizeStart($event, "left")); });
1066
1122
  i0.ɵɵelementEnd();
1067
1123
  } }
1068
- function MagicOverlayContainer_span_7_Template(rf, ctx) { if (rf & 1) {
1069
- const _r6 = i0.ɵɵgetCurrentView();
1124
+ function MagicOverlayContainer_Conditional_7_Template(rf, ctx) { if (rf & 1) {
1125
+ const _r5 = i0.ɵɵgetCurrentView();
1070
1126
  i0.ɵɵelementStart(0, "span", 17);
1071
- i0.ɵɵlistener("mousedown", function MagicOverlayContainer_span_7_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onResizeStart($event, "corner")); });
1127
+ i0.ɵɵlistener("mousedown", function MagicOverlayContainer_Conditional_7_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onResizeStart($event, "corner")); });
1072
1128
  i0.ɵɵelementEnd();
1073
1129
  } }
1074
- function MagicOverlayContainer_span_8_Template(rf, ctx) { if (rf & 1) {
1075
- const _r7 = i0.ɵɵgetCurrentView();
1130
+ function MagicOverlayContainer_Conditional_8_Template(rf, ctx) { if (rf & 1) {
1131
+ const _r6 = i0.ɵɵgetCurrentView();
1076
1132
  i0.ɵɵelementStart(0, "span", 18);
1077
- i0.ɵɵlistener("mousedown", function MagicOverlayContainer_span_8_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onResizeStart($event, "bottom")); });
1133
+ i0.ɵɵlistener("mousedown", function MagicOverlayContainer_Conditional_8_Template_span_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onResizeStart($event, "bottom")); });
1078
1134
  i0.ɵɵelementEnd();
1079
1135
  } }
1080
- function MagicOverlayContainer_div_9_Template(rf, ctx) { if (rf & 1) {
1081
- const _r8 = i0.ɵɵgetCurrentView();
1136
+ function MagicOverlayContainer_Conditional_9_Template(rf, ctx) { if (rf & 1) {
1137
+ const _r7 = i0.ɵɵgetCurrentView();
1082
1138
  i0.ɵɵelementStart(0, "div", 19, 2);
1083
1139
  i0.ɵɵtext(2);
1084
1140
  i0.ɵɵelementStart(3, "button", 20);
1085
- i0.ɵɵlistener("click", function MagicOverlayContainer_div_9_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnClose()); });
1141
+ i0.ɵɵlistener("click", function MagicOverlayContainer_Conditional_9_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnClose()); });
1086
1142
  i0.ɵɵtext(4, "X");
1087
1143
  i0.ɵɵelementEnd()();
1088
1144
  } if (rf & 2) {
1089
- const ctx_r2 = i0.ɵɵnextContext();
1090
- i0.ɵɵclassProp("movable", ctx_r2.IsMovable());
1145
+ const ctx_r1 = i0.ɵɵnextContext();
1146
+ i0.ɵɵclassProp("movable", ctx_r1.IsMovable());
1091
1147
  i0.ɵɵadvance(2);
1092
- i0.ɵɵtextInterpolate1(" ", ctx_r2.getText(), " ");
1148
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.getText(), " ");
1093
1149
  } }
1094
1150
  /**
1095
1151
  * Creates a modal window for Magic modal window components
@@ -1142,7 +1198,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1142
1198
  ngOnInit() {
1143
1199
  this.componentRef = this.modalbodyViewContainerRef.createComponent(this.ModalComp);
1144
1200
  Object.assign(this.componentRef.instance, this.ModalCompParameters);
1145
- let comp = this.componentRef.instance;
1201
+ let comp = this.getOverlayProps();
1146
1202
  this.isCenteredToWindow = comp.IsCenteredToWindow();
1147
1203
  }
1148
1204
  ngAfterViewInit() {
@@ -1161,7 +1217,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1161
1217
  */
1162
1218
  getText() {
1163
1219
  if (this.componentRef !== null) {
1164
- let comp = this.componentRef.instance;
1220
+ let comp = this.getOverlayProps();
1165
1221
  return comp.FormName();
1166
1222
  }
1167
1223
  else
@@ -1180,7 +1236,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1180
1236
  getStyle() {
1181
1237
  let styles = {};
1182
1238
  if (this.componentRef != undefined) {
1183
- let comp = this.componentRef.instance;
1239
+ let comp = this.getOverlayProps();
1184
1240
  styles['width'] = comp.Width();
1185
1241
  styles['height'] = comp.Height();
1186
1242
  if (this.isCenteredToWindow) {
@@ -1217,7 +1273,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1217
1273
  */
1218
1274
  getShowTitleBar() {
1219
1275
  if (this.componentRef != undefined) {
1220
- let comp = this.componentRef.instance;
1276
+ let comp = this.getOverlayProps();
1221
1277
  return comp.ShowTitleBar();
1222
1278
  }
1223
1279
  }
@@ -1231,7 +1287,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1231
1287
  * Handles click in the background window
1232
1288
  */
1233
1289
  OnBackgroundClick() {
1234
- let comp = this.componentRef.instance;
1290
+ let comp = this.getOverlayProps();
1235
1291
  if (comp.ShouldCloseOnBackgroundClick())
1236
1292
  this.OnClose();
1237
1293
  }
@@ -1240,7 +1296,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1240
1296
  * @returns {boolean} True if the overlay is resizable, false otherwise.
1241
1297
  */
1242
1298
  IsResizable() {
1243
- let comp = this.componentRef.instance;
1299
+ let comp = this.getOverlayProps();
1244
1300
  return comp.IsResizable();
1245
1301
  }
1246
1302
  /**
@@ -1248,7 +1304,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1248
1304
  * @returns {boolean} True if the overlay is movable, false otherwise.
1249
1305
  */
1250
1306
  IsMovable() {
1251
- let comp = this.componentRef.instance;
1307
+ let comp = this.getOverlayProps();
1252
1308
  return comp.IsMovable();
1253
1309
  }
1254
1310
  /**
@@ -1342,45 +1398,53 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1342
1398
  this.resizing = false;
1343
1399
  this.resizeDirection = null;
1344
1400
  }
1401
+ getOverlayProps() {
1402
+ let obj = this.componentRef.instance;
1403
+ if (obj && obj.magicModalProperties instanceof MagicModalProperties)
1404
+ obj = obj.magicModalProperties;
1405
+ return obj;
1406
+ }
1345
1407
  /** @nocollapse */ static ɵfac = function MagicOverlayContainer_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicOverlayContainer)(); };
1346
1408
  /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: MagicOverlayContainer, selectors: [["app-magic-overlay-container"]], viewQuery: function MagicOverlayContainer_Query(rf, ctx) { if (rf & 1) {
1347
- i0.ɵɵviewQuery(_c0$3, 5);
1348
- i0.ɵɵviewQuery(_c1$1, 5);
1409
+ i0.ɵɵviewQuery(_c0$3, 5)(_c1$1, 5);
1349
1410
  } if (rf & 2) {
1350
1411
  let _t;
1351
1412
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerElementRef = _t.first);
1352
1413
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.foregroundElementRef = _t.first);
1353
1414
  } }, hostBindings: function MagicOverlayContainer_HostBindings(rf, ctx) { if (rf & 1) {
1354
- i0.ɵɵlistener("mousemove", function MagicOverlayContainer_mousemove_HostBindingHandler($event) { return ctx.onResize($event); }, false, i0.ɵɵresolveWindow)("mouseup", function MagicOverlayContainer_mouseup_HostBindingHandler() { return ctx.onResizeEnd(); }, false, i0.ɵɵresolveWindow);
1355
- } }, inputs: { ModalComp: "ModalComp", ModalCompParameters: "ModalCompParameters" }, outputs: { onClose: "onClose" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 13, vars: 9, consts: [["modalForeground", ""], ["modalbody", ""], ["modalheader", ""], [1, "boundary-line"], [1, "modal-background", 3, "click"], ["tabindex", "-1", "style", "float:right; border: none; background-color: transparent; outline: none; color: white", 3, "click", 4, "ngIf"], ["cdkDragBoundary", ".boundary-line", "cdkDrag", "", 1, "modal-foreground", 3, "ngStyle", "cdkDragDisabled"], ["class", "dragHandle right", 3, "mousedown", 4, "ngIf"], ["class", "dragHandle left", 3, "mousedown", 4, "ngIf"], ["class", "dragHandle corner", 3, "mousedown", 4, "ngIf"], ["class", "dragHandle bottom", 3, "mousedown", 4, "ngIf"], ["class", "modal-header", "cdkDragHandle", "", 3, "movable", 4, "ngIf"], [3, "ngStyle"], ["magicViewContainerRef", ""], ["tabindex", "-1", 2, "float", "right", "border", "none", "background-color", "transparent", "outline", "none", "color", "white", 3, "click"], [1, "dragHandle", "right", 3, "mousedown"], [1, "dragHandle", "left", 3, "mousedown"], [1, "dragHandle", "corner", 3, "mousedown"], [1, "dragHandle", "bottom", 3, "mousedown"], ["cdkDragHandle", "", 1, "modal-header"], ["tabindex", "-1", 2, "float", "right", 3, "click"]], template: function MagicOverlayContainer_Template(rf, ctx) { if (rf & 1) {
1356
- const _r1 = i0.ɵɵgetCurrentView();
1415
+ i0.ɵɵlistener("mousemove", function MagicOverlayContainer_mousemove_HostBindingHandler($event) { return ctx.onResize($event); }, i0.ɵɵresolveWindow)("mouseup", function MagicOverlayContainer_mouseup_HostBindingHandler() { return ctx.onResizeEnd(); }, i0.ɵɵresolveWindow);
1416
+ } }, inputs: { ModalComp: "ModalComp", ModalCompParameters: "ModalCompParameters" }, outputs: { onClose: "onClose" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 13, vars: 9, consts: [["modalForeground", ""], ["modalbody", ""], ["modalheader", ""], [1, "boundary-line"], [1, "modal-background", 3, "click"], ["tabindex", "-1", 2, "float", "right", "border", "none", "background-color", "transparent", "outline", "none", "color", "white"], ["cdkDragBoundary", ".boundary-line", "cdkDrag", "", 1, "modal-foreground", 3, "ngStyle", "cdkDragDisabled"], [1, "dragHandle", "right"], [1, "dragHandle", "left"], [1, "dragHandle", "corner"], [1, "dragHandle", "bottom"], ["cdkDragHandle", "", 1, "modal-header", 3, "movable"], [3, "ngStyle"], ["magicViewContainerRef", ""], ["tabindex", "-1", 2, "float", "right", "border", "none", "background-color", "transparent", "outline", "none", "color", "white", 3, "click"], [1, "dragHandle", "right", 3, "mousedown"], [1, "dragHandle", "left", 3, "mousedown"], [1, "dragHandle", "corner", 3, "mousedown"], [1, "dragHandle", "bottom", 3, "mousedown"], ["cdkDragHandle", "", 1, "modal-header"], ["tabindex", "-1", 2, "float", "right", 3, "click"]], template: function MagicOverlayContainer_Template(rf, ctx) { if (rf & 1) {
1357
1417
  i0.ɵɵelementStart(0, "div", 3)(1, "div", 4);
1358
- i0.ɵɵlistener("click", function MagicOverlayContainer_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnBackgroundClick()); });
1359
- i0.ɵɵtemplate(2, MagicOverlayContainer_button_2_Template, 2, 0, "button", 5);
1418
+ i0.ɵɵlistener("click", function MagicOverlayContainer_Template_div_click_1_listener() { return ctx.OnBackgroundClick(); });
1419
+ i0.ɵɵconditionalCreate(2, MagicOverlayContainer_Conditional_2_Template, 2, 0, "button", 5);
1360
1420
  i0.ɵɵelementEnd();
1361
1421
  i0.ɵɵelementStart(3, "div", 6, 0);
1362
- i0.ɵɵtemplate(5, MagicOverlayContainer_span_5_Template, 1, 0, "span", 7)(6, MagicOverlayContainer_span_6_Template, 1, 0, "span", 8)(7, MagicOverlayContainer_span_7_Template, 1, 0, "span", 9)(8, MagicOverlayContainer_span_8_Template, 1, 0, "span", 10)(9, MagicOverlayContainer_div_9_Template, 5, 3, "div", 11);
1422
+ i0.ɵɵconditionalCreate(5, MagicOverlayContainer_Conditional_5_Template, 1, 0, "span", 7);
1423
+ i0.ɵɵconditionalCreate(6, MagicOverlayContainer_Conditional_6_Template, 1, 0, "span", 8);
1424
+ i0.ɵɵconditionalCreate(7, MagicOverlayContainer_Conditional_7_Template, 1, 0, "span", 9);
1425
+ i0.ɵɵconditionalCreate(8, MagicOverlayContainer_Conditional_8_Template, 1, 0, "span", 10);
1426
+ i0.ɵɵconditionalCreate(9, MagicOverlayContainer_Conditional_9_Template, 5, 3, "div", 11);
1363
1427
  i0.ɵɵelementStart(10, "div", 12);
1364
1428
  i0.ɵɵelement(11, "div", 13, 1);
1365
1429
  i0.ɵɵelementEnd()()();
1366
1430
  } if (rf & 2) {
1367
1431
  i0.ɵɵadvance(2);
1368
- i0.ɵɵproperty("ngIf", !ctx.getShowTitleBar());
1432
+ i0.ɵɵconditional(!ctx.getShowTitleBar() ? 2 : -1);
1369
1433
  i0.ɵɵadvance();
1370
1434
  i0.ɵɵproperty("ngStyle", ctx.getStyle())("cdkDragDisabled", !ctx.IsMovable());
1371
1435
  i0.ɵɵadvance(2);
1372
- i0.ɵɵproperty("ngIf", ctx.IsResizable() && !ctx.isRtl);
1436
+ i0.ɵɵconditional(ctx.IsResizable() && !ctx.isRtl ? 5 : -1);
1373
1437
  i0.ɵɵadvance();
1374
- i0.ɵɵproperty("ngIf", ctx.IsResizable() && ctx.isRtl);
1438
+ i0.ɵɵconditional(ctx.IsResizable() && ctx.isRtl ? 6 : -1);
1375
1439
  i0.ɵɵadvance();
1376
- i0.ɵɵproperty("ngIf", ctx.IsResizable());
1440
+ i0.ɵɵconditional(ctx.IsResizable() ? 7 : -1);
1377
1441
  i0.ɵɵadvance();
1378
- i0.ɵɵproperty("ngIf", ctx.IsResizable());
1442
+ i0.ɵɵconditional(ctx.IsResizable() ? 8 : -1);
1379
1443
  i0.ɵɵadvance();
1380
- i0.ɵɵproperty("ngIf", ctx.getShowTitleBar());
1444
+ i0.ɵɵconditional(ctx.getShowTitleBar() ? 9 : -1);
1381
1445
  i0.ɵɵadvance();
1382
1446
  i0.ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
1383
- } }, dependencies: [i1.NgIf, i1.NgStyle, i2$1.CdkDragHandle, i2$1.CdkDrag, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#fff}.modal-background[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header[_ngcontent-%COMP%]{background-color:beige;border-bottom:2px solid red}.modal-header.movable[_ngcontent-%COMP%]:active{cursor:move}.container[_ngcontent-%COMP%]{position:relative}.dragHandle[_ngcontent-%COMP%]{position:absolute}.dragHandle.corner[_ngcontent-%COMP%]{width:10px;right:0;bottom:0;height:10px;cursor:nwse-resize;background:linear-gradient(135deg,rgba(0,0,0,.4) 50%,transparent 50%);position:absolute}[dir=\"rtl\"][_nghost-%COMP%] .dragHandle.corner[_ngcontent-%COMP%], [dir=\"rtl\"] [_nghost-%COMP%] .dragHandle.corner[_ngcontent-%COMP%]{right:auto!important;left:0;cursor:nesw-resize;background:linear-gradient(225deg,rgba(0,0,0,.4) 50%,transparent 50%)}.dragHandle.left[_ngcontent-%COMP%]{width:2px;left:-2px;height:100%;cursor:ew-resize}.dragHandle.right[_ngcontent-%COMP%]{width:2px;right:-2px;height:100%;cursor:ew-resize}.dragHandle.bottom[_ngcontent-%COMP%]{height:2px;bottom:-2px;width:100%;cursor:ns-resize}.boundary-line[_ngcontent-%COMP%]{width:100%;height:100%;max-width:100%}"] });
1447
+ } }, dependencies: [i1.NgStyle, i2$1.CdkDragHandle, i2$1.CdkDrag, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#fff}.modal-background[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header[_ngcontent-%COMP%]{background-color:beige;border-bottom:2px solid red}.modal-header.movable[_ngcontent-%COMP%]:active{cursor:move}.container[_ngcontent-%COMP%]{position:relative}.dragHandle[_ngcontent-%COMP%]{position:absolute}.dragHandle.corner[_ngcontent-%COMP%]{width:10px;right:0;bottom:0;height:10px;cursor:nwse-resize;background:linear-gradient(135deg,rgba(0,0,0,.4) 50%,transparent 50%);position:absolute}[dir=\"rtl\"][_nghost-%COMP%] .dragHandle.corner[_ngcontent-%COMP%], [dir=\"rtl\"] [_nghost-%COMP%] .dragHandle.corner[_ngcontent-%COMP%]{right:auto!important;left:0;cursor:nesw-resize;background:linear-gradient(225deg,rgba(0,0,0,.4) 50%,transparent 50%)}.dragHandle.left[_ngcontent-%COMP%]{width:2px;left:-2px;height:100%;cursor:ew-resize}.dragHandle.right[_ngcontent-%COMP%]{width:2px;right:-2px;height:100%;cursor:ew-resize}.dragHandle.bottom[_ngcontent-%COMP%]{height:2px;bottom:-2px;width:100%;cursor:ns-resize}.boundary-line[_ngcontent-%COMP%]{width:100%;height:100%;max-width:100%}"] });
1384
1448
  }
1385
1449
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainer, [{
1386
1450
  type: Component,
@@ -1388,20 +1452,32 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1388
1452
  <div class="boundary-line">
1389
1453
 
1390
1454
  <div class="modal-background" (click)="OnBackgroundClick()">
1391
- <button (click)="OnClose()" tabindex="-1" style="float:right; border: none; background-color: transparent; outline: none; color: white" *ngIf="!getShowTitleBar()">X</button>
1455
+ @if (!getShowTitleBar()) {
1456
+ <button (click)="OnClose()" tabindex="-1" style="float:right; border: none; background-color: transparent; outline: none; color: white">X</button>
1457
+ }
1392
1458
  </div>
1393
1459
 
1394
1460
  <div #modalForeground class="modal-foreground" [ngStyle]="getStyle()" cdkDragBoundary=".boundary-line" cdkDrag [cdkDragDisabled]="!IsMovable()">
1395
1461
 
1396
- <span *ngIf="IsResizable() && !isRtl" class="dragHandle right" (mousedown)="onResizeStart($event, 'right')"></span>
1397
- <span *ngIf="IsResizable() && isRtl" class="dragHandle left" (mousedown)="onResizeStart($event, 'left')"></span>
1398
- <span *ngIf="IsResizable()" class="dragHandle corner" (mousedown)="onResizeStart($event, 'corner')"></span>
1399
- <span *ngIf="IsResizable()" class="dragHandle bottom" (mousedown)="onResizeStart($event, 'bottom')"></span>
1462
+ @if (IsResizable() && !isRtl) {
1463
+ <span class="dragHandle right" (mousedown)="onResizeStart($event, 'right')"></span>
1464
+ }
1465
+ @if (IsResizable() && isRtl) {
1466
+ <span class="dragHandle left" (mousedown)="onResizeStart($event, 'left')"></span>
1467
+ }
1468
+ @if (IsResizable()) {
1469
+ <span class="dragHandle corner" (mousedown)="onResizeStart($event, 'corner')"></span>
1470
+ }
1471
+ @if (IsResizable()) {
1472
+ <span class="dragHandle bottom" (mousedown)="onResizeStart($event, 'bottom')"></span>
1473
+ }
1400
1474
 
1401
- <div #modalheader class="modal-header" *ngIf="getShowTitleBar()" cdkDragHandle [class.movable]="IsMovable()">
1402
- {{getText()}}
1403
- <button (click)="OnClose()" style="float:right" tabindex="-1">X</button>
1404
- </div>
1475
+ @if (getShowTitleBar()) {
1476
+ <div #modalheader class="modal-header" cdkDragHandle [class.movable]="IsMovable()">
1477
+ {{getText()}}
1478
+ <button (click)="OnClose()" style="float:right" tabindex="-1">X</button>
1479
+ </div>
1480
+ }
1405
1481
 
1406
1482
  <div [ngStyle]="getClientAreaStyles()">
1407
1483
  <div #modalbody magicViewContainerRef>
@@ -1409,7 +1485,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1409
1485
  </div>
1410
1486
  </div>
1411
1487
  </div>
1412
- `, standalone: false, styles: [".modal-foreground{position:fixed;inset:0;background-color:#fff}.modal-background{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}.modal-header.movable:active{cursor:move}.container{position:relative}.dragHandle{position:absolute}.dragHandle.corner{width:10px;right:0;bottom:0;height:10px;cursor:nwse-resize;background:linear-gradient(135deg,rgba(0,0,0,.4) 50%,transparent 50%);position:absolute}:host-context([dir=\"rtl\"]) .dragHandle.corner{right:auto!important;left:0;cursor:nesw-resize;background:linear-gradient(225deg,rgba(0,0,0,.4) 50%,transparent 50%)}.dragHandle.left{width:2px;left:-2px;height:100%;cursor:ew-resize}.dragHandle.right{width:2px;right:-2px;height:100%;cursor:ew-resize}.dragHandle.bottom{height:2px;bottom:-2px;width:100%;cursor:ns-resize}.boundary-line{width:100%;height:100%;max-width:100%}\n"] }]
1488
+ `, standalone: false, styles: [".modal-foreground{position:fixed;inset:0;background-color:#fff}.modal-background{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}.modal-header.movable:active{cursor:move}.container{position:relative}.dragHandle{position:absolute}.dragHandle.corner{width:10px;right:0;bottom:0;height:10px;cursor:nwse-resize;background:linear-gradient(135deg,rgba(0,0,0,.4) 50%,transparent 50%);position:absolute}:host-context([dir=\"rtl\"]) .dragHandle.corner{right:auto!important;left:0;cursor:nesw-resize;background:linear-gradient(225deg,rgba(0,0,0,.4) 50%,transparent 50%)}.dragHandle.left{width:2px;left:-2px;height:100%;cursor:ew-resize}.dragHandle.right{width:2px;right:-2px;height:100%;cursor:ew-resize}.dragHandle.bottom{height:2px;bottom:-2px;width:100%;cursor:ns-resize}.boundary-line{width:100%;height:100%;max-width:100%}\n"] }]
1413
1489
  }], () => [], { headerElementRef: [{
1414
1490
  type: ViewChild,
1415
1491
  args: ['modalheader', { static: false }]
@@ -1429,7 +1505,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1429
1505
  type: HostListener,
1430
1506
  args: ['window:mouseup']
1431
1507
  }] }); })();
1432
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicOverlayContainer, { className: "MagicOverlayContainer", filePath: "src/ui/magic-modal/magic-overlay-container.ts", lineNumber: 52 }); })();
1508
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicOverlayContainer, { className: "MagicOverlayContainer", filePath: "src/ui/magic-modal/magic-overlay-container.ts", lineNumber: 65 }); })();
1433
1509
 
1434
1510
  /**
1435
1511
  * Service managing overlay windows
@@ -1697,7 +1773,7 @@ class MagicAlertComponent extends BaseMagicAlertComponent {
1697
1773
  i0.ɵɵelementEnd()()();
1698
1774
  } if (rf & 2) {
1699
1775
  i0.ɵɵadvance(3);
1700
- i0.ɵɵtextInterpolate1(" ", ctx.title, "");
1776
+ i0.ɵɵtextInterpolate1(" ", ctx.title);
1701
1777
  i0.ɵɵadvance(2);
1702
1778
  i0.ɵɵtextInterpolate1("", ctx.message, " ");
1703
1779
  } }, styles: [".mg-message-background[_ngcontent-%COMP%]{background-color:#f5f5f5;width:40%;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;padding:17px;border-radius:5px;text-align:center;margin-top:10%;margin-left:auto;margin-right:auto;border:1px solid gray}button[_ngcontent-%COMP%]{background-color:#8cd4f5;color:#fff;border:none;box-shadow:none;font-size:17px;font-weight:500;-webkit-border-radius:4px;border-radius:5px;padding:10px 32px;margin:26px 5px 0;cursor:pointer}"] });
@@ -1736,7 +1812,7 @@ class MagicConfirmationBoxComponent extends BaseMagicConfirmComponent {
1736
1812
  i0.ɵɵelementEnd()()();
1737
1813
  } if (rf & 2) {
1738
1814
  i0.ɵɵadvance(3);
1739
- i0.ɵɵtextInterpolate1(" ", ctx.title, "");
1815
+ i0.ɵɵtextInterpolate1(" ", ctx.title);
1740
1816
  i0.ɵɵadvance();
1741
1817
  i0.ɵɵtextInterpolate1(" ", ctx.message, " ");
1742
1818
  } }, styles: [".mg-message-background[_ngcontent-%COMP%]{background-color:#f5f5f5;width:40%;font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;padding:17px;border-radius:5px;text-align:center;margin-top:10%;margin-left:auto;margin-right:auto;border:1px solid gray}button[_ngcontent-%COMP%]{background-color:#8cd4f5;color:#fff;border:none;box-shadow:none;font-size:17px;font-weight:500;-webkit-border-radius:4px;border-radius:5px;padding:10px 32px;margin:26px 5px 0;cursor:pointer}button.cancel[_ngcontent-%COMP%]{background-color:#c1c1c1}"] });
@@ -2981,12 +3057,13 @@ class TaskMagicService {
2981
3057
  }
2982
3058
  /**
2983
3059
  * Handle the Radio button "change" event
2984
- * @param event The event received from the UI
2985
3060
  * @param idx Id of the control raising the event
3061
+ * @param rowId Id of the row containing the control (defaults to '0' for non-table controls)
2986
3062
  */
2987
- mgOnRadioSelectionChanged(idx) {
2988
- let result = this.getFormControl('0', idx);
2989
- let guiEvent = getGuiEventObj('selectionchanged', idx, 0);
3063
+ mgOnRadioSelectionChanged(idx, rowId = '0') {
3064
+ // Fetch the Form Control for the specific table row (or row '0' for non-table child controls)
3065
+ let result = this.getFormControl(rowId, idx);
3066
+ let guiEvent = getGuiEventObj('selectionchanged', idx, +rowId);
2990
3067
  if (typeof result.value !== 'number')
2991
3068
  guiEvent.Value = result.value.index;
2992
3069
  else
@@ -5616,8 +5693,8 @@ class RangeValidatorMagicDirective {
5616
5693
  }]
5617
5694
  }], () => [{ type: TaskMagicService }, { type: i0.ViewContainerRef }], null); })();
5618
5695
 
5619
- function SubformMagicComponent_ndc_dynamic_0_Template(rf, ctx) { if (rf & 1) {
5620
- i0.ɵɵelement(0, "ndc-dynamic", 1);
5696
+ function SubformMagicComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
5697
+ i0.ɵɵelement(0, "ndc-dynamic", 0);
5621
5698
  } if (rf & 2) {
5622
5699
  const ctx_r0 = i0.ɵɵnextContext();
5623
5700
  i0.ɵɵproperty("ndcDynamicComponent", ctx_r0.Component)("ndcDynamicInputs", ctx_r0.Parameters);
@@ -5663,34 +5740,35 @@ class SubformMagicComponent {
5663
5740
  return this.mgSub.mgGetParameters(this.id);
5664
5741
  }
5665
5742
  /** @nocollapse */ static ɵfac = function SubformMagicComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SubformMagicComponent)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(SubformMagicService)); };
5666
- /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: SubformMagicComponent, selectors: [["magic-subform"]], inputs: { magic: "magic" }, standalone: false, decls: 1, vars: 1, consts: [[3, "ndcDynamicComponent", "ndcDynamicInputs", 4, "ngIf"], [3, "ndcDynamicComponent", "ndcDynamicInputs"]], template: function SubformMagicComponent_Template(rf, ctx) { if (rf & 1) {
5667
- i0.ɵɵtemplate(0, SubformMagicComponent_ndc_dynamic_0_Template, 1, 2, "ndc-dynamic", 0);
5743
+ /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: SubformMagicComponent, selectors: [["magic-subform"]], inputs: { magic: "magic" }, standalone: false, decls: 1, vars: 1, consts: [[3, "ndcDynamicComponent", "ndcDynamicInputs"]], template: function SubformMagicComponent_Template(rf, ctx) { if (rf & 1) {
5744
+ i0.ɵɵconditionalCreate(0, SubformMagicComponent_Conditional_0_Template, 1, 2, "ndc-dynamic", 0);
5668
5745
  } if (rf & 2) {
5669
- i0.ɵɵproperty("ngIf", ctx.Component);
5670
- } }, dependencies: [i1.NgIf, i3.DynamicIoDirective, i3.DynamicComponent], encapsulation: 2 });
5746
+ i0.ɵɵconditional(ctx.Component ? 0 : -1);
5747
+ } }, dependencies: [i2$3.DynamicIoDirective, i2$3.DynamicComponent], encapsulation: 2 });
5671
5748
  }
5672
5749
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubformMagicComponent, [{
5673
5750
  type: Component,
5674
5751
  args: [{
5675
5752
  selector: 'magic-subform',
5676
- template: `
5677
- <ndc-dynamic
5678
- *ngIf="Component"
5679
- [ndcDynamicComponent]="Component"
5680
- [ndcDynamicInputs]="Parameters">
5681
- </ndc-dynamic>
5682
- `,
5753
+ template: `
5754
+ @if (Component) {
5755
+ <ndc-dynamic
5756
+ [ndcDynamicComponent]="Component"
5757
+ [ndcDynamicInputs]="Parameters">
5758
+ </ndc-dynamic>
5759
+ }
5760
+ `,
5683
5761
  standalone: false
5684
5762
  }]
5685
5763
  }], () => [{ type: i0.ViewContainerRef }, { type: SubformMagicService }], { magic: [{
5686
5764
  type: Input,
5687
5765
  args: ['magic']
5688
5766
  }] }); })();
5689
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SubformMagicComponent, { className: "SubformMagicComponent", filePath: "src/ui/subform.magic.component.ts", lineNumber: 22 }); })();
5767
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SubformMagicComponent, { className: "SubformMagicComponent", filePath: "src/ui/subform.magic.component.ts", lineNumber: 23 }); })();
5690
5768
 
5691
5769
  const _c0$1 = ["customContent"];
5692
5770
  const _c1 = ["*"];
5693
- function ErrorMagicComponent_div_0_span_4_Template(rf, ctx) { if (rf & 1) {
5771
+ function ErrorMagicComponent_Conditional_0_Conditional_4_Template(rf, ctx) { if (rf & 1) {
5694
5772
  i0.ɵɵelementStart(0, "span");
5695
5773
  i0.ɵɵtext(1);
5696
5774
  i0.ɵɵelementEnd();
@@ -5699,16 +5777,16 @@ function ErrorMagicComponent_div_0_span_4_Template(rf, ctx) { if (rf & 1) {
5699
5777
  i0.ɵɵadvance();
5700
5778
  i0.ɵɵtextInterpolate1(" ", ctx_r0.mgService.getErrMsg(ctx_r0.id, ctx_r0.rowId), " ");
5701
5779
  } }
5702
- function ErrorMagicComponent_div_0_Template(rf, ctx) { if (rf & 1) {
5780
+ function ErrorMagicComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
5703
5781
  i0.ɵɵelementStart(0, "div")(1, "div", null, 0);
5704
5782
  i0.ɵɵprojection(3);
5705
5783
  i0.ɵɵelementEnd();
5706
- i0.ɵɵtemplate(4, ErrorMagicComponent_div_0_span_4_Template, 2, 1, "span", 1);
5784
+ i0.ɵɵconditionalCreate(4, ErrorMagicComponent_Conditional_0_Conditional_4_Template, 2, 1, "span");
5707
5785
  i0.ɵɵelementEnd();
5708
5786
  } if (rf & 2) {
5709
5787
  const ctx_r0 = i0.ɵɵnextContext();
5710
5788
  i0.ɵɵadvance(4);
5711
- i0.ɵɵproperty("ngIf", ctx_r0.defaultDisplay);
5789
+ i0.ɵɵconditional(ctx_r0.defaultDisplay ? 4 : -1);
5712
5790
  } }
5713
5791
  /**
5714
5792
  * Represents a Magic subform
@@ -5792,25 +5870,29 @@ class ErrorMagicComponent {
5792
5870
  } if (rf & 2) {
5793
5871
  let _t;
5794
5872
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.CustomContent = _t.first);
5795
- } }, inputs: { magic: "magic", rowId1: [0, "rowId", "rowId1"] }, standalone: false, ngContentSelectors: _c1, decls: 1, vars: 1, consts: [["customContent", ""], [4, "ngIf"]], template: function ErrorMagicComponent_Template(rf, ctx) { if (rf & 1) {
5873
+ } }, inputs: { magic: "magic", rowId1: [0, "rowId", "rowId1"] }, standalone: false, ngContentSelectors: _c1, decls: 1, vars: 1, consts: [["customContent", ""]], template: function ErrorMagicComponent_Template(rf, ctx) { if (rf & 1) {
5796
5874
  i0.ɵɵprojectionDef();
5797
- i0.ɵɵtemplate(0, ErrorMagicComponent_div_0_Template, 5, 1, "div", 1);
5875
+ i0.ɵɵconditionalCreate(0, ErrorMagicComponent_Conditional_0_Template, 5, 1, "div");
5798
5876
  } if (rf & 2) {
5799
- i0.ɵɵproperty("ngIf", ctx.HasErrors(ctx.id));
5800
- } }, dependencies: [i1.NgIf], encapsulation: 2 });
5877
+ i0.ɵɵconditional(ctx.HasErrors(ctx.id) ? 0 : -1);
5878
+ } }, encapsulation: 2 });
5801
5879
  }
5802
5880
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorMagicComponent, [{
5803
5881
  type: Component,
5804
5882
  args: [{
5805
5883
  selector: 'mgError',
5806
- template: `<div *ngIf="HasErrors(id)">
5807
- <div #customContent>
5808
- <ng-content></ng-content>
5809
- </div>
5810
- <span *ngIf="defaultDisplay">
5811
- {{mgService.getErrMsg(id, rowId)}}
5812
- </span>
5813
- </div>
5884
+ template: `@if (HasErrors(id)) {
5885
+ <div>
5886
+ <div #customContent>
5887
+ <ng-content></ng-content>
5888
+ </div>
5889
+ @if (defaultDisplay) {
5890
+ <span>
5891
+ {{mgService.getErrMsg(id, rowId)}}
5892
+ </span>
5893
+ }
5894
+ </div>
5895
+ }
5814
5896
  `,
5815
5897
  standalone: false
5816
5898
  }]
@@ -5824,7 +5906,7 @@ class ErrorMagicComponent {
5824
5906
  type: ViewChild,
5825
5907
  args: ['customContent', { static: false }]
5826
5908
  }] }); })();
5827
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ErrorMagicComponent, { className: "ErrorMagicComponent", filePath: "src/ui/mgerror.magic.component.ts", lineNumber: 24 }); })();
5909
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ErrorMagicComponent, { className: "ErrorMagicComponent", filePath: "src/ui/mgerror.magic.component.ts", lineNumber: 28 }); })();
5828
5910
 
5829
5911
  /**
5830
5912
  * Directive for checkboxes, to handle the 'change' event
@@ -5993,15 +6075,15 @@ class ExitMagicService {
5993
6075
  }], null, null); })();
5994
6076
 
5995
6077
  const _c0 = ["magicRoot"];
5996
- function MagicShellComponent_ndc_dynamic_2_Template(rf, ctx) { if (rf & 1) {
5997
- i0.ɵɵelement(0, "ndc-dynamic", 6);
6078
+ function MagicShellComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
6079
+ i0.ɵɵelement(0, "ndc-dynamic", 3);
5998
6080
  } if (rf & 2) {
5999
6081
  const ctx_r0 = i0.ɵɵnextContext();
6000
6082
  i0.ɵɵproperty("ndcDynamicComponent", ctx_r0.RootComponent)("ndcDynamicInputs", ctx_r0.RootComponentParameters);
6001
6083
  } }
6002
- function MagicShellComponent_div_5_Template(rf, ctx) { if (rf & 1) {
6003
- i0.ɵɵelementStart(0, "div", 7);
6004
- i0.ɵɵelementContainer(1, 8);
6084
+ function MagicShellComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
6085
+ i0.ɵɵelementStart(0, "div", 5);
6086
+ i0.ɵɵelementContainer(1, 6);
6005
6087
  i0.ɵɵelementEnd();
6006
6088
  } if (rf & 2) {
6007
6089
  const ctx_r0 = i0.ɵɵnextContext();
@@ -6010,7 +6092,7 @@ function MagicShellComponent_div_5_Template(rf, ctx) { if (rf & 1) {
6010
6092
  i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.SpinnerTemplate ? ctx_r0.SpinnerTemplate : defaultSpinner_r2);
6011
6093
  } }
6012
6094
  function MagicShellComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
6013
- i0.ɵɵelement(0, "div", 9);
6095
+ i0.ɵɵelement(0, "div", 7);
6014
6096
  } }
6015
6097
  /**
6016
6098
  * Root Magic component
@@ -6205,46 +6287,50 @@ class MagicShellComponent {
6205
6287
  let _t;
6206
6288
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rootMagicElementRef = _t.first);
6207
6289
  } }, hostBindings: function MagicShellComponent_HostBindings(rf, ctx) { if (rf & 1) {
6208
- i0.ɵɵlistener("beforeunload", function MagicShellComponent_beforeunload_HostBindingHandler($event) { return ctx.onBeforeUnload($event); }, false, i0.ɵɵresolveWindow)("unload", function MagicShellComponent_unload_HostBindingHandler($event) { return ctx.onUnload($event); }, false, i0.ɵɵresolveWindow);
6290
+ i0.ɵɵlistener("beforeunload", function MagicShellComponent_beforeunload_HostBindingHandler($event) { return ctx.onBeforeUnload($event); }, i0.ɵɵresolveWindow)("unload", function MagicShellComponent_unload_HostBindingHandler($event) { return ctx.onUnload($event); }, i0.ɵɵresolveWindow);
6209
6291
  } }, inputs: { SpinnerTemplate: "SpinnerTemplate" }, standalone: false, features: [i0.ɵɵProvidersFeature([
6210
6292
  // ExitMagicService
6211
- ])], decls: 8, vars: 2, consts: [["magicRoot", ""], ["overlayWindowsContainer", ""], ["defaultSpinner", ""], [3, "ndcDynamicComponent", "ndcDynamicInputs", 4, "ngIf"], ["magicViewContainerRef", ""], ["class", "spinner-background", 4, "ngIf"], [3, "ndcDynamicComponent", "ndcDynamicInputs"], [1, "spinner-background"], [3, "ngTemplateOutlet"], [1, "mgSpinnerClass"]], template: function MagicShellComponent_Template(rf, ctx) { if (rf & 1) {
6293
+ ])], decls: 8, vars: 2, consts: [["magicRoot", ""], ["overlayWindowsContainer", ""], ["defaultSpinner", ""], [3, "ndcDynamicComponent", "ndcDynamicInputs"], ["magicViewContainerRef", ""], [1, "spinner-background"], [3, "ngTemplateOutlet"], [1, "mgSpinnerClass"]], template: function MagicShellComponent_Template(rf, ctx) { if (rf & 1) {
6212
6294
  i0.ɵɵelementStart(0, "div", null, 0);
6213
- i0.ɵɵtemplate(2, MagicShellComponent_ndc_dynamic_2_Template, 1, 2, "ndc-dynamic", 3);
6295
+ i0.ɵɵconditionalCreate(2, MagicShellComponent_Conditional_2_Template, 1, 2, "ndc-dynamic", 3);
6214
6296
  i0.ɵɵelement(3, "div", 4, 1);
6215
6297
  i0.ɵɵelementEnd();
6216
- i0.ɵɵtemplate(5, MagicShellComponent_div_5_Template, 2, 1, "div", 5)(6, MagicShellComponent_ng_template_6_Template, 1, 0, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
6298
+ i0.ɵɵconditionalCreate(5, MagicShellComponent_Conditional_5_Template, 2, 1, "div", 5);
6299
+ i0.ɵɵtemplate(6, MagicShellComponent_ng_template_6_Template, 1, 0, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
6217
6300
  } if (rf & 2) {
6218
6301
  i0.ɵɵadvance(2);
6219
- i0.ɵɵproperty("ngIf", ctx.RootComponent !== null);
6302
+ i0.ɵɵconditional(ctx.RootComponent !== null ? 2 : -1);
6220
6303
  i0.ɵɵadvance(3);
6221
- i0.ɵɵproperty("ngIf", ctx.showSpinner);
6222
- } }, dependencies: [i1.NgIf, i1.NgTemplateOutlet, i3.DynamicIoDirective, i3.DynamicComponent, MagicViewContainerRef], styles: [".mgSpinnerClass[_ngcontent-%COMP%]{border:10px solid #cccccc;border-top:10px solid black;border-radius:50%;position:fixed;margin:auto;inset:0;width:100px;height:100px;animation:_ngcontent-%COMP%_spin 2s linear infinite}.spinner-background[_ngcontent-%COMP%]{position:fixed;z-index:1000;inset:0;opacity:.5}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"] });
6304
+ i0.ɵɵconditional(ctx.showSpinner ? 5 : -1);
6305
+ } }, dependencies: [i1.NgTemplateOutlet, i2$3.DynamicIoDirective, i2$3.DynamicComponent, MagicViewContainerRef], styles: [".mgSpinnerClass[_ngcontent-%COMP%]{border:10px solid #cccccc;border-top:10px solid black;border-radius:50%;position:fixed;margin:auto;inset:0;width:100px;height:100px;animation:_ngcontent-%COMP%_spin 2s linear infinite}.spinner-background[_ngcontent-%COMP%]{position:fixed;z-index:1000;inset:0;opacity:.5}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"] });
6223
6306
  }
6224
6307
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
6225
6308
  type: Component,
6226
6309
  args: [{ selector: 'magic-root', providers: [
6227
6310
  // ExitMagicService
6228
- ], template: `
6229
- <div #magicRoot>
6230
- <ndc-dynamic
6231
- *ngIf = "RootComponent !== null"
6232
- [ndcDynamicComponent]="RootComponent"
6233
- [ndcDynamicInputs] ="RootComponentParameters">
6234
- </ndc-dynamic>
6235
-
6236
- <div #overlayWindowsContainer magicViewContainerRef>
6237
- </div>
6238
- </div>
6239
-
6240
- <div class="spinner-background" *ngIf="showSpinner">
6241
- <ng-container [ngTemplateOutlet]="SpinnerTemplate ? SpinnerTemplate:defaultSpinner"></ng-container>
6242
- </div>
6243
-
6244
- <ng-template #defaultSpinner>
6245
- <div class="mgSpinnerClass"></div>
6246
- </ng-template>
6247
- `, standalone: false, styles: [".mgSpinnerClass{border:10px solid #cccccc;border-top:10px solid black;border-radius:50%;position:fixed;margin:auto;inset:0;width:100px;height:100px;animation:spin 2s linear infinite}.spinner-background{position:fixed;z-index:1000;inset:0;opacity:.5}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
6311
+ ], template: `
6312
+ <div #magicRoot>
6313
+ @if (RootComponent !== null) {
6314
+ <ndc-dynamic
6315
+ [ndcDynamicComponent]="RootComponent"
6316
+ [ndcDynamicInputs] ="RootComponentParameters">
6317
+ </ndc-dynamic>
6318
+ }
6319
+
6320
+ <div #overlayWindowsContainer magicViewContainerRef>
6321
+ </div>
6322
+ </div>
6323
+
6324
+ @if (showSpinner) {
6325
+ <div class="spinner-background">
6326
+ <ng-container [ngTemplateOutlet]="SpinnerTemplate ? SpinnerTemplate:defaultSpinner"></ng-container>
6327
+ </div>
6328
+ }
6329
+
6330
+ <ng-template #defaultSpinner>
6331
+ <div class="mgSpinnerClass"></div>
6332
+ </ng-template>
6333
+ `, standalone: false, styles: [".mgSpinnerClass{border:10px solid #cccccc;border-top:10px solid black;border-radius:50%;position:fixed;margin:auto;inset:0;width:100px;height:100px;animation:spin 2s linear infinite}.spinner-background{position:fixed;z-index:1000;inset:0;opacity:.5}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
6248
6334
  }], () => [{ type: EngineMagicService }, { type: ComponentListMagicService }, { type: i0.ChangeDetectorRef }, { type: i1$1.Title }, { type: OverlayWindowService }, { type: i1$2.HttpClient }, { type: CommandsCollectorMagicService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: ExitMagicService, decorators: [{
6249
6335
  type: Optional
6250
6336
  }] }], { rootMagicElementRef: [{
@@ -6259,7 +6345,7 @@ class MagicShellComponent {
6259
6345
  type: HostListener,
6260
6346
  args: ['window:unload', ['$event']]
6261
6347
  }] }); })();
6262
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicShellComponent, { className: "MagicShellComponent", filePath: "src/ui/magic-root.component.ts", lineNumber: 86 }); })();
6348
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicShellComponent, { className: "MagicShellComponent", filePath: "src/ui/magic-root.component.ts", lineNumber: 89 }); })();
6263
6349
 
6264
6350
  /**
6265
6351
  * @ignore
@@ -6860,6 +6946,109 @@ const magicProviders = [
6860
6946
  TableMagicService
6861
6947
  ];
6862
6948
 
6949
+ class SubscriberService {
6950
+ static instance;
6951
+ socket;
6952
+ constructor() {
6953
+ // Connect to the Socket.IO server with subscriber role
6954
+ this.socket = io('http://localhost:3000', {
6955
+ query: {
6956
+ role: 'subscriber',
6957
+ token: 'abc123' // Default token for testing; replace with actual authentication
6958
+ }
6959
+ });
6960
+ // Handle connection
6961
+ this.socket.on('connect', () => {
6962
+ console.log('Connected to server as subscriber:', this.socket.id);
6963
+ });
6964
+ // Handle disconnection
6965
+ this.socket.on('disconnect', () => {
6966
+ console.log('Disconnected from server');
6967
+ });
6968
+ // Handle subscription confirmation
6969
+ this.socket.on('subscribed', (data) => {
6970
+ console.log('Subscribed to topic:', data.topic, data.message);
6971
+ });
6972
+ // Handle unsubscription confirmation
6973
+ this.socket.on('unsubscribed', (data) => {
6974
+ console.log('Unsubscribed from topic:', data.topic, data.message);
6975
+ });
6976
+ // Handle errors
6977
+ this.socket.on('error', (error) => {
6978
+ console.error('Socket error:', error.message);
6979
+ });
6980
+ this.socket.on('message', (error) => {
6981
+ console.error('Message from xpa:', error.message);
6982
+ });
6983
+ }
6984
+ /**
6985
+ * Subscribe to a specific topic
6986
+ * @param topic The topic to subscribe to
6987
+ */
6988
+ subscribe(topic) {
6989
+ this.socket.emit('subscribe', topic);
6990
+ }
6991
+ /**
6992
+ * Unsubscribe from a specific topic
6993
+ * @param topic The topic to unsubscribe from
6994
+ */
6995
+ unsubscribe(topic) {
6996
+ this.socket.emit('unsubscribe', topic);
6997
+ }
6998
+ /**
6999
+ * Get an Observable for incoming messages
7000
+ * @returns Observable that emits message data
7001
+ */
7002
+ onMessage() {
7003
+ return new Observable(observer => {
7004
+ this.socket.on('message', (data) => {
7005
+ observer.next(data);
7006
+ });
7007
+ });
7008
+ }
7009
+ /**
7010
+ * Get current subscriptions (for debugging)
7011
+ */
7012
+ getSubscriptions() {
7013
+ this.socket.emit('getSubscriptions');
7014
+ }
7015
+ /**
7016
+ * Listen for subscriptions data
7017
+ * @returns Observable that emits subscriptions list
7018
+ */
7019
+ onSubscriptionsData() {
7020
+ return new Observable(observer => {
7021
+ this.socket.on('subscriptionsData', (data) => {
7022
+ observer.next(data);
7023
+ });
7024
+ });
7025
+ }
7026
+ /**
7027
+ * Get the singleton instance of SubscriberService
7028
+ * @returns {SubscriberService} The singleton instance
7029
+ */
7030
+ static getInstance() {
7031
+ if (!SubscriberService.instance) {
7032
+ SubscriberService.instance = new SubscriberService();
7033
+ }
7034
+ return SubscriberService.instance;
7035
+ }
7036
+ /**
7037
+ * Disconnect from the server
7038
+ */
7039
+ disconnect() {
7040
+ this.socket.disconnect();
7041
+ }
7042
+ /** @nocollapse */ static ɵfac = function SubscriberService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SubscriberService)(); };
7043
+ /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: SubscriberService, factory: SubscriberService.ɵfac, providedIn: 'root' });
7044
+ }
7045
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubscriberService, [{
7046
+ type: Injectable,
7047
+ args: [{
7048
+ providedIn: 'root'
7049
+ }]
7050
+ }], () => [], null); })();
7051
+
6863
7052
  /**
6864
7053
  * @ignore
6865
7054
  */
@@ -6945,5 +7134,5 @@ class ModalFormDefinition {
6945
7134
  * Generated bundle index. Do not edit.
6946
7135
  */
6947
7136
 
6948
- export { AccessorMagicService, BaseMagicAlertComponent, BaseMagicConfirmComponent, BaseMagicOverlayContainer, CHECKBOX_VALUE_ACCESSOR, COLOR_FILE_NAME, CheckboxMagicDirective, CheckboxNoFormControlMagicDirective, ComboboxMagicDirective, CommandsCollectorMagicService, ComponentListMagicService, ConfirmationComponentsMagicProvider, Constants, ControlMetadata, ControlsMetadata, DATE_VALUE_ACCESSOR, DateMagicPipe, DateValueAccessor, EngineMagicService, ErrorMagicComponent, ExitMagicService, GuiInteractiveExecutor, HtmlClasses, InputNoFormControlMagicDirective, MAGIC_BG_COLOR, MAGIC_DEFAULT_VALUE_ACCESSOR, MAGIC_FG_COLOR, MG_FORMATS, MagicAlertComponent, MagicCheckboxControlValueAccessor, MagicColorService, MagicConfirmationBoxComponent, MagicDefaultValueAccessor, MagicDirective, MagicFocusDirective, MagicLazyLoaderService, MagicModule, MagicOverlayContainer, MagicOverlayContainerWrapper, MagicServices, MagicShellComponent, MagicViewContainerRef, MgDateAdapter, MgDateFormatter, MgformatMagicDirective, ModalFormDefinition, NoControlMagicDirective, NonMagicControlDirective, OverlayContainerMagicProvider, OverlayWindowService, RangeValidatorMagicDirective, Records, RouteCommand, RouterCommandsMagicService, RouterContainerMagicComponent, RowMagicDirective, StylesMapManager, SubformMagicComponent, SubformMagicService, TableMagicService, TaskBaseMagicComponent, TaskMagicService, Time24MagicPipe, TimeMagicPipe, TitleMagicService, basicMagicProviders, confirmationBox, magicProviders, matDateProviders, utils };
7137
+ export { AccessorMagicService, BaseMagicAlertComponent, BaseMagicConfirmComponent, BaseMagicOverlayContainer, CHECKBOX_VALUE_ACCESSOR, COLOR_FILE_NAME, CheckboxMagicDirective, CheckboxNoFormControlMagicDirective, ComboboxMagicDirective, CommandsCollectorMagicService, ComponentListMagicService, ConfirmationComponentsMagicProvider, Constants, ControlMetadata, ControlsMetadata, DATE_VALUE_ACCESSOR, DateMagicPipe, DateValueAccessor, EngineMagicService, ErrorMagicComponent, ExitMagicService, GuiInteractiveExecutor, HtmlClasses, InputNoFormControlMagicDirective, MAGIC_BG_COLOR, MAGIC_DEFAULT_VALUE_ACCESSOR, MAGIC_FG_COLOR, MG_FORMATS, MagicAlertComponent, MagicCheckboxControlValueAccessor, MagicColorService, MagicConfirmationBoxComponent, MagicDefaultValueAccessor, MagicDirective, MagicFocusDirective, MagicLazyLoaderService, MagicModalProperties, MagicModule, MagicOverlayContainer, MagicOverlayContainerWrapper, MagicServices, MagicShellComponent, MagicViewContainerRef, MgDateAdapter, MgDateFormatter, MgformatMagicDirective, ModalFormDefinition, NoControlMagicDirective, NonMagicControlDirective, OverlayContainerMagicProvider, OverlayWindowService, RangeValidatorMagicDirective, Records, RouteCommand, RouterCommandsMagicService, RouterContainerMagicComponent, RowMagicDirective, StylesMapManager, SubformMagicComponent, SubformMagicService, SubscriberService, TableMagicService, TaskBaseMagicComponent, TaskMagicService, Time24MagicPipe, TimeMagicPipe, TitleMagicService, basicMagicProviders, confirmationBox, magicProviders, matDateProviders, utils };
6949
7138
  //# sourceMappingURL=magic-xpa-angular.mjs.map