@magic-xpa/angular 4.1300.0-dev4130.261 → 4.1300.0-dev4130.266

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.
@@ -1,26 +1,24 @@
1
1
  import { isNullOrUndefined, NString, List, isUndefined, StringBuilder, RefParam } from '@magic-xpa/mscorelib';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, createNgModule, ChangeDetectionStrategy, Component, Input, Output, Directive, EventEmitter, HostListener, ViewChild, InjectionToken, Inject, Optional, Pipe, forwardRef, NgModule } from '@angular/core';
3
+ import { Injectable, inject, Injector, createNgModule, ViewContainerRef, ChangeDetectionStrategy, Component, Directive, EventEmitter, HostListener, Output, Input, ViewChild, input, output, ElementRef, viewChild, ChangeDetectorRef, InjectionToken, DestroyRef, Renderer2, Pipe, effect, forwardRef, NgModule } from '@angular/core';
4
4
  import * as i1 from '@angular/common';
5
5
  import { DatePipe, CommonModule, formatDate } from '@angular/common';
6
- import * as i2 from '@angular/router';
7
- import { NavigationEnd, RouterModule } from '@angular/router';
6
+ import { ActivatedRoute, Router, NavigationEnd, RouterModule } from '@angular/router';
8
7
  import { FormGroup, FormControl, Validators, NG_VALIDATORS, NG_VALUE_ACCESSOR, CheckboxControlValueAccessor, DefaultValueAccessor, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
- import * as i2$3 from 'ng-dynamic-component';
8
+ import * as i1$1 from 'ng-dynamic-component';
10
9
  import { DynamicModule } from 'ng-dynamic-component';
11
10
  import { InteractiveCommandType, HtmlProperties, OverlayType, Styles, GuiConstants, CommandType, PIC, GuiEnvironment, Events, Modifiers } from '@magic-xpa/gui';
12
11
  import { MagicBridge, getGuiEventObj, CookieService, Environment, LastFocusedManager } from '@magic-xpa/engine';
12
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
13
13
  import { MagicProperties, Logger, StrUtil, StorageAttribute, PICInterface, MsgInterface, BindingLevel, StorageAttributeType, MgControlType } from '@magic-xpa/utils';
14
- import { filter, map, debounceTime, take } from 'rxjs/operators';
15
14
  import { Subject, EMPTY, fromEvent, Observable } from 'rxjs';
16
- import { __decorate, __metadata } from 'tslib';
17
- import * as i2$1 from '@angular/cdk/drag-drop';
15
+ import { filter, map, debounceTime, take } from 'rxjs/operators';
16
+ import * as i2 from '@angular/cdk/drag-drop';
18
17
  import { DragDropModule, CdkDragHandle, CdkDrag } from '@angular/cdk/drag-drop';
19
- import * as i1$1 from '@angular/platform-browser';
20
- import * as i1$2 from '@angular/common/http';
21
- import { provideHttpClient, withXhr, withInterceptorsFromDi } from '@angular/common/http';
18
+ import { Title } from '@angular/platform-browser';
19
+ import { HttpClient, provideHttpClient, withXhr, withInterceptorsFromDi } from '@angular/common/http';
22
20
  import { maskitoTimeOptionsGenerator } from '@maskito/kit';
23
- import * as i2$2 from '@angular/cdk/platform';
21
+ import { Platform } from '@angular/cdk/platform';
24
22
  import { MaskitoDirective } from '@maskito/angular';
25
23
  import { NativeDateAdapter, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
26
24
  import { io } from 'socket.io-client';
@@ -240,6 +238,63 @@ var HtmlClasses;
240
238
  HtmlClasses["HintColor"] = "hintcolor";
241
239
  })(HtmlClasses || (HtmlClasses = {}));
242
240
 
241
+ /**
242
+ * Notifies Angular that Magic state changed outside of its knowledge.
243
+ *
244
+ * The WebClient runs zoneless, so Angular no longer re-renders the application
245
+ * after every asynchronous task. Change detection is triggered only by Angular's
246
+ * own APIs - a template event binding, a signal write, `markForCheck()` and so on.
247
+ *
248
+ * Magic drives the UI from sources Angular cannot observe: DOM listeners registered
249
+ * through `Renderer2`, the engine's event loop, and socket callbacks. Every such
250
+ * source calls {@link notify}, and the Magic components refresh themselves in response.
251
+ *
252
+ * Application code can use this service for the same purpose. Call {@link notify}
253
+ * after changing component state from a callback Angular does not control - a
254
+ * `setTimeout`, a `Promise`, a `fetch` response or a third-party widget event:
255
+ *
256
+ * ```ts
257
+ * export class MyForm extends TaskBaseMagicComponent {
258
+ * private readonly magicChangeDetection = inject(MagicChangeDetectionService);
259
+ *
260
+ * override mgOnLoad(): void {
261
+ * setTimeout(() => {
262
+ * this.statusText = 'Ready';
263
+ * this.magicChangeDetection.notify();
264
+ * }, 1000);
265
+ * }
266
+ * }
267
+ * ```
268
+ *
269
+ * Notifications are coalesced by Angular's scheduler, so calling {@link notify}
270
+ * several times in a row still results in a single refresh.
271
+ */
272
+ class MagicChangeDetectionService {
273
+ /**
274
+ * @ignore
275
+ */
276
+ changedSubject = new Subject();
277
+ /**
278
+ * Emits whenever Magic state changed and the views should be refreshed.
279
+ * Subscribers are expected to mark their view for check.
280
+ */
281
+ changed = this.changedSubject.asObservable();
282
+ /**
283
+ * Notify Angular that state which the templates depend on has changed.
284
+ */
285
+ notify() {
286
+ this.changedSubject.next();
287
+ }
288
+ /** @nocollapse */ static ɵfac = function MagicChangeDetectionService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicChangeDetectionService)(); };
289
+ /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: MagicChangeDetectionService, factory: MagicChangeDetectionService.ɵfac, providedIn: 'root' });
290
+ }
291
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicChangeDetectionService, [{
292
+ type: Injectable,
293
+ args: [{
294
+ providedIn: 'root'
295
+ }]
296
+ }], null, null); })();
297
+
243
298
  /**
244
299
  * @ignore
245
300
  */
@@ -280,6 +335,9 @@ class EngineMagicService {
280
335
  //TODO - unregister
281
336
  refreshDom = new Subject();
282
337
  interactiveCommands = new Subject();
338
+ // Injected as a field rather than a constructor parameter so that the public
339
+ // constructor signature stays unchanged for anyone extending this service.
340
+ magicChangeDetection = inject(MagicChangeDetectionService);
283
341
  startMagicEngine(httpClient, args) {
284
342
  this.magicBridge.registerExecuteCommandsCallback(data => {
285
343
  if (!this.isStub) {
@@ -295,11 +353,17 @@ class EngineMagicService {
295
353
  console.log('moving to stub mode');
296
354
  this.isStub = true;
297
355
  }
356
+ finally {
357
+ // The engine finished a batch of UI commands. Running zoneless, this is the
358
+ // single point where every server-driven change becomes visible to Angular.
359
+ this.magicChangeDetection.notify();
360
+ }
298
361
  }
299
362
  });
300
363
  this.magicBridge.registerInteractiveCallback(data => {
301
364
  if (!this.isStub) {
302
365
  this.interactiveCommands.next(data);
366
+ this.magicChangeDetection.notify();
303
367
  }
304
368
  });
305
369
  this.magicBridge.Initialize(httpClient, args);
@@ -310,6 +374,11 @@ class EngineMagicService {
310
374
  insertEvent(guiEvent) {
311
375
  if (!this.isStub)
312
376
  this.magicBridge.insertEvent(guiEvent);
377
+ // Every Magic UI event - from the DOM listeners registered by MagicDirective and
378
+ // its subclasses, from the accessor service, and from the overlay service - reaches
379
+ // the engine through here. Renderer2 listeners do not notify Angular's scheduler on
380
+ // their own, so this is where an interaction becomes a change-detection trigger.
381
+ this.magicChangeDetection.notify();
313
382
  }
314
383
  GetRangedValue(taskId, controlName, value) {
315
384
  return this.magicBridge.GetRangedValue(taskId, controlName, value);
@@ -431,12 +500,11 @@ class ComponentListMagicService {
431
500
  * @ignore
432
501
  */
433
502
  class CommandsCollectorMagicService {
434
- magic;
435
503
  count = 0;
436
504
  commands = new List();
437
505
  subscription = null;
438
- constructor(magic) {
439
- this.magic = magic;
506
+ magic = inject(EngineMagicService);
507
+ constructor() {
440
508
  }
441
509
  startCollecting() {
442
510
  this.count++;
@@ -461,8 +529,7 @@ class CommandsCollectorMagicService {
461
529
  commands.forEach(command => { this.commands.Remove(command); });
462
530
  return commands;
463
531
  }
464
- /** @nocollapse */ static ɵfac = function CommandsCollectorMagicService_Factory(__ngFactoryType__) { /* @ts-ignore */
465
- return new (__ngFactoryType__ || CommandsCollectorMagicService)(i0.ɵɵinject(EngineMagicService)); };
532
+ /** @nocollapse */ static ɵfac = function CommandsCollectorMagicService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CommandsCollectorMagicService)(); };
466
533
  /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: CommandsCollectorMagicService, factory: CommandsCollectorMagicService.ɵfac, providedIn: 'root' });
467
534
  }
468
535
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CommandsCollectorMagicService, [{
@@ -470,7 +537,7 @@ class CommandsCollectorMagicService {
470
537
  args: [{
471
538
  providedIn: 'root'
472
539
  }]
473
- }], () => [{ type: EngineMagicService }], null); })();
540
+ }], () => [], null); })();
474
541
 
475
542
  /**
476
543
  * @ignore
@@ -524,30 +591,21 @@ class MagicLazyLoaderService {
524
591
  * Service for managing subforms and routing
525
592
  */
526
593
  class SubformMagicService {
527
- task;
528
- activatedRoute;
529
- componentList;
530
- pendingCommandsCollector;
531
- router;
532
- routerCommandsMagicService;
533
- componentListMagicService;
534
- loader;
535
- injector;
536
594
  subformsDict /*:{ [x: string]: SubformDefinition }*/ = {};
537
595
  routesDict = {}; // dictionary of router outlet to router path
538
596
  currentRouteDefinition = null;
539
597
  static currentCallerMgSubformServiceRef = null;
540
598
  static routerContainers = new Array();
541
- constructor(task, activatedRoute, componentList, pendingCommandsCollector, router, routerCommandsMagicService, componentListMagicService, loader, injector) {
542
- this.task = task;
543
- this.activatedRoute = activatedRoute;
544
- this.componentList = componentList;
545
- this.pendingCommandsCollector = pendingCommandsCollector;
546
- this.router = router;
547
- this.routerCommandsMagicService = routerCommandsMagicService;
548
- this.componentListMagicService = componentListMagicService;
549
- this.loader = loader;
550
- this.injector = injector;
599
+ task = inject(TaskMagicService);
600
+ activatedRoute = inject(ActivatedRoute);
601
+ componentList = inject(ComponentListMagicService);
602
+ pendingCommandsCollector = inject(CommandsCollectorMagicService);
603
+ router = inject(Router);
604
+ routerCommandsMagicService = inject(RouterCommandsMagicService);
605
+ componentListMagicService = inject(ComponentListMagicService);
606
+ loader = inject(MagicLazyLoaderService);
607
+ injector = inject(Injector);
608
+ constructor() {
551
609
  }
552
610
  /**
553
611
  * Finds and returns the component according to the subform name
@@ -748,26 +806,17 @@ class SubformMagicService {
748
806
  }
749
807
  return currentActiveRoute;
750
808
  }
751
- /** @nocollapse */ static ɵfac = function SubformMagicService_Factory(__ngFactoryType__) { /* @ts-ignore */
752
- return new (__ngFactoryType__ || SubformMagicService)(i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(i2.ActivatedRoute), i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(CommandsCollectorMagicService), i0.ɵɵinject(i2.Router), i0.ɵɵinject(RouterCommandsMagicService), i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(MagicLazyLoaderService), i0.ɵɵinject(i0.Injector)); };
809
+ /** @nocollapse */ static ɵfac = function SubformMagicService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SubformMagicService)(); };
753
810
  /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: SubformMagicService, factory: SubformMagicService.ɵfac });
754
811
  }
755
812
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubformMagicService, [{
756
813
  type: Injectable
757
- }], () => [{ type: TaskMagicService }, { type: i2.ActivatedRoute }, { type: ComponentListMagicService }, { type: CommandsCollectorMagicService }, { type: i2.Router }, { type: RouterCommandsMagicService }, { type: ComponentListMagicService }, { type: MagicLazyLoaderService }, { type: i0.Injector }], null); })();
814
+ }], () => [], null); })();
758
815
 
759
816
  /**
760
817
  * Mock component, implements routing by connecting the requested URL with the appropriate Magic task
761
818
  */
762
819
  class RouterContainerMagicComponent {
763
- activatedRoute;
764
- router;
765
- magic;
766
- containerTaskService;
767
- viewContainerRef;
768
- componentList;
769
- pendingCommandsCollector;
770
- routerCommandsMagicService;
771
820
  componentRef = null;
772
821
  parentMgSubformService = null;
773
822
  static lastRoute = "/";
@@ -775,6 +824,14 @@ class RouterContainerMagicComponent {
775
824
  static get LastRoute() {
776
825
  return RouterContainerMagicComponent.lastRoute;
777
826
  }
827
+ activatedRoute = inject(ActivatedRoute);
828
+ router = inject(Router);
829
+ magic = inject(EngineMagicService);
830
+ containerTaskService = inject(TaskMagicService);
831
+ viewContainerRef = inject(ViewContainerRef);
832
+ componentList = inject(ComponentListMagicService);
833
+ pendingCommandsCollector = inject(CommandsCollectorMagicService);
834
+ routerCommandsMagicService = inject(RouterCommandsMagicService);
778
835
  /**
779
836
  *
780
837
  * @param changeDetectorRef
@@ -785,16 +842,7 @@ class RouterContainerMagicComponent {
785
842
  * @param componentList
786
843
  * @param pendingCommandsCollector
787
844
  */
788
- constructor(activatedRoute, router, magic, containerTaskService, viewContainerRef, componentList, pendingCommandsCollector, routerCommandsMagicService) {
789
- this.activatedRoute = activatedRoute;
790
- this.router = router;
791
- this.magic = magic;
792
- this.containerTaskService = containerTaskService;
793
- this.viewContainerRef = viewContainerRef;
794
- this.componentList = componentList;
795
- this.pendingCommandsCollector = pendingCommandsCollector;
796
- this.routerCommandsMagicService = routerCommandsMagicService;
797
- }
845
+ constructor() { }
798
846
  /**
799
847
  * Initialization
800
848
  */
@@ -872,8 +920,7 @@ class RouterContainerMagicComponent {
872
920
  getRouterPath() {
873
921
  return this.routePath;
874
922
  }
875
- /** @nocollapse */ static ɵfac = function RouterContainerMagicComponent_Factory(__ngFactoryType__) { /* @ts-ignore */
876
- return new (__ngFactoryType__ || RouterContainerMagicComponent)(i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(EngineMagicService), i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(CommandsCollectorMagicService), i0.ɵɵdirectiveInject(RouterCommandsMagicService)); };
923
+ /** @nocollapse */ static ɵfac = function RouterContainerMagicComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RouterContainerMagicComponent)(); };
877
924
  /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: RouterContainerMagicComponent, selectors: [["magic-route-outlet"]], standalone: false, decls: 0, vars: 0, template: function RouterContainerMagicComponent_Template(rf, ctx) { }, encapsulation: 2, changeDetection: 1 });
878
925
  }
879
926
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RouterContainerMagicComponent, [{
@@ -885,7 +932,7 @@ class RouterContainerMagicComponent {
885
932
  changeDetection: ChangeDetectionStrategy.Eager,
886
933
  standalone: false
887
934
  }]
888
- }], () => [{ type: i2.ActivatedRoute }, { type: i2.Router }, { type: EngineMagicService }, { type: TaskMagicService }, { type: i0.ViewContainerRef }, { type: ComponentListMagicService }, { type: CommandsCollectorMagicService }, { type: RouterCommandsMagicService }], null); })();
935
+ }], () => [], null); })();
889
936
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RouterContainerMagicComponent, { className: "RouterContainerMagicComponent", filePath: "src/ui/router-container.magic.component.ts", lineNumber: 24 }); })();
890
937
 
891
938
  /**
@@ -1060,38 +1107,26 @@ class MagicModalProperties {
1060
1107
  }
1061
1108
  }
1062
1109
 
1063
- let BaseMagicOverlayContainer = class BaseMagicOverlayContainer {
1064
- };
1065
- __decorate([
1066
- Input(),
1067
- __metadata("design:type", Object)
1068
- ], BaseMagicOverlayContainer.prototype, "ModalComp", void 0);
1069
- __decorate([
1070
- Input(),
1071
- __metadata("design:type", Object)
1072
- ], BaseMagicOverlayContainer.prototype, "ModalCompParameters", void 0);
1073
- __decorate([
1074
- Output(),
1075
- __metadata("design:type", Object)
1076
- ], BaseMagicOverlayContainer.prototype, "onClose", void 0);
1077
- BaseMagicOverlayContainer = __decorate([
1078
- Input(),
1079
- Output()
1080
- ], BaseMagicOverlayContainer);
1110
+ /**
1111
+ * Abstract base for Magic overlay container components.
1112
+ * Concrete classes must implement these members using Angular signal APIs (input/output).
1113
+ * The class is kept as an abstract class (not an interface) so that instanceof checks
1114
+ * in MagicOverlayContainerWrapper continue to work at runtime.
1115
+ */
1116
+ class BaseMagicOverlayContainer {
1117
+ }
1081
1118
 
1082
1119
  /**
1083
1120
  * Directive for setting ViewContainerRef on element
1084
1121
  */
1085
1122
  class MagicViewContainerRef {
1086
- vcRef;
1087
- constructor(vcRef) {
1088
- this.vcRef = vcRef;
1123
+ vcRef = inject(ViewContainerRef);
1124
+ constructor() {
1089
1125
  // For angular 10 - find the component from the views
1090
1126
  let comp = (this.vcRef._hostLView).find(v => v != null && !isNullOrUndefined(v.setViewContainerRef));
1091
- comp.setViewContainerRef(vcRef);
1127
+ comp.setViewContainerRef(this.vcRef);
1092
1128
  }
1093
- /** @nocollapse */ static ɵfac = function MagicViewContainerRef_Factory(__ngFactoryType__) { /* @ts-ignore */
1094
- return new (__ngFactoryType__ || MagicViewContainerRef)(i0.ɵɵdirectiveInject(i0.ViewContainerRef)); };
1129
+ /** @nocollapse */ static ɵfac = function MagicViewContainerRef_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicViewContainerRef)(); };
1095
1130
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: MagicViewContainerRef, selectors: [["", "magicViewContainerRef", ""]], standalone: false });
1096
1131
  }
1097
1132
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicViewContainerRef, [{
@@ -1100,7 +1135,7 @@ class MagicViewContainerRef {
1100
1135
  selector: '[magicViewContainerRef]',
1101
1136
  standalone: false
1102
1137
  }]
1103
- }], () => [{ type: i0.ViewContainerRef }], null); })();
1138
+ }], () => [], null); })();
1104
1139
 
1105
1140
  const _c0$3 = ["modalheader"];
1106
1141
  const _c1$1 = ["modalForeground"];
@@ -1298,6 +1333,8 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1298
1333
  * @returns {boolean} True if the overlay is resizable, false otherwise.
1299
1334
  */
1300
1335
  IsResizable() {
1336
+ if (!this.componentRef)
1337
+ return false;
1301
1338
  let comp = this.getOverlayProps();
1302
1339
  return comp.IsResizable();
1303
1340
  }
@@ -1306,6 +1343,8 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1306
1343
  * @returns {boolean} True if the overlay is movable, false otherwise.
1307
1344
  */
1308
1345
  IsMovable() {
1346
+ if (!this.componentRef)
1347
+ return false;
1309
1348
  let comp = this.getOverlayProps();
1310
1349
  return comp.IsMovable();
1311
1350
  }
@@ -1452,7 +1491,7 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
1452
1491
  i0.ɵɵconditional(ctx.getShowTitleBar() ? 9 : -1);
1453
1492
  i0.ɵɵadvance();
1454
1493
  i0.ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
1455
- } }, 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%}"], changeDetection: 1 });
1494
+ } }, dependencies: [i1.NgStyle, i2.CdkDragHandle, i2.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%}"], changeDetection: 1 });
1456
1495
  }
1457
1496
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainer, [{
1458
1497
  type: Component,
@@ -1537,16 +1576,18 @@ class BaseMagicConfirmComponent {
1537
1576
  /**
1538
1577
  * title of the component
1539
1578
  */
1540
- title;
1579
+ title = input(/* @ts-ignore */
1580
+ ...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
1541
1581
  /**
1542
1582
  * message of the component
1543
1583
  */
1544
- message;
1584
+ message = input(/* @ts-ignore */
1585
+ ...(ngDevMode ? [undefined, { debugName: "message" }] : /* istanbul ignore next */ []));
1545
1586
  /**
1546
1587
  * onClose Event - to be raised when the component is closed
1547
1588
  * should pass true when OK is pressed and false when cancel is pressed
1548
1589
  */
1549
- onClose = new EventEmitter();
1590
+ onClose = output();
1550
1591
  /**
1551
1592
  * raises close Event
1552
1593
  * @param result true when OK is pressed and false when cancel is pressed
@@ -1556,18 +1597,12 @@ class BaseMagicConfirmComponent {
1556
1597
  this.onClose.emit(result);
1557
1598
  }
1558
1599
  /** @nocollapse */ static ɵfac = function BaseMagicConfirmComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || BaseMagicConfirmComponent)(); };
1559
- /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: BaseMagicConfirmComponent, selectors: [["mg-base-confirm"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, standalone: false, decls: 0, vars: 0, template: function BaseMagicConfirmComponent_Template(rf, ctx) { }, encapsulation: 2, changeDetection: 1 });
1600
+ /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: BaseMagicConfirmComponent, selectors: [["mg-base-confirm"]], inputs: { title: [1, "title"], message: [1, "message"] }, outputs: { onClose: "onClose" }, standalone: false, decls: 0, vars: 0, template: function BaseMagicConfirmComponent_Template(rf, ctx) { }, encapsulation: 2, changeDetection: 1 });
1560
1601
  }
1561
1602
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseMagicConfirmComponent, [{
1562
1603
  type: Component,
1563
1604
  args: [{ selector: 'mg-base-confirm', template: '', changeDetection: ChangeDetectionStrategy.Eager, standalone: false }]
1564
- }], null, { title: [{
1565
- type: Input
1566
- }], message: [{
1567
- type: Input
1568
- }], onClose: [{
1569
- type: Output
1570
- }] }); })();
1605
+ }], null, { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], onClose: [{ type: i0.Output, args: ["onClose"] }] }); })();
1571
1606
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BaseMagicConfirmComponent, { className: "BaseMagicConfirmComponent", filePath: "src/ui/components/base-magic-confirm.component.ts", lineNumber: 14 }); })();
1572
1607
 
1573
1608
  /**
@@ -1577,16 +1612,18 @@ class BaseMagicAlertComponent {
1577
1612
  /**
1578
1613
  * title of the component
1579
1614
  */
1580
- title;
1615
+ title = input(/* @ts-ignore */
1616
+ ...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
1581
1617
  /**
1582
1618
  * message of the component
1583
1619
  */
1584
- message;
1620
+ message = input(/* @ts-ignore */
1621
+ ...(ngDevMode ? [undefined, { debugName: "message" }] : /* istanbul ignore next */ []));
1585
1622
  /**
1586
1623
  * onClose Event - to be raised when the component is closed
1587
1624
 
1588
1625
  */
1589
- onClose = new EventEmitter();
1626
+ onClose = output();
1590
1627
  /**
1591
1628
  * close magic alert
1592
1629
  */
@@ -1594,33 +1631,24 @@ class BaseMagicAlertComponent {
1594
1631
  this.onClose.emit();
1595
1632
  }
1596
1633
  /** @nocollapse */ static ɵfac = function BaseMagicAlertComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || BaseMagicAlertComponent)(); };
1597
- /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: BaseMagicAlertComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, standalone: false, decls: 0, vars: 0, template: function BaseMagicAlertComponent_Template(rf, ctx) { }, encapsulation: 2, changeDetection: 1 });
1634
+ /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: BaseMagicAlertComponent, selectors: [["mg-base-alert"]], inputs: { title: [1, "title"], message: [1, "message"] }, outputs: { onClose: "onClose" }, standalone: false, decls: 0, vars: 0, template: function BaseMagicAlertComponent_Template(rf, ctx) { }, encapsulation: 2, changeDetection: 1 });
1598
1635
  }
1599
1636
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseMagicAlertComponent, [{
1600
1637
  type: Component,
1601
1638
  args: [{ selector: 'mg-base-alert', template: '', changeDetection: ChangeDetectionStrategy.Eager, standalone: false }]
1602
- }], null, { title: [{
1603
- type: Input
1604
- }], message: [{
1605
- type: Input
1606
- }], onClose: [{
1607
- type: Output
1608
- }] }); })();
1609
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BaseMagicAlertComponent, { className: "BaseMagicAlertComponent", filePath: "src/ui/components/base-magic-alert.component.ts", lineNumber: 15 }); })();
1639
+ }], null, { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], onClose: [{ type: i0.Output, args: ["onClose"] }] }); })();
1640
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BaseMagicAlertComponent, { className: "BaseMagicAlertComponent", filePath: "src/ui/components/base-magic-alert.component.ts", lineNumber: 16 }); })();
1610
1641
 
1611
1642
  /**
1612
1643
  * Directive for setting focus on element
1613
1644
  */
1614
1645
  class MagicFocusDirective {
1615
- hostElement;
1616
- constructor(hostElement) {
1617
- this.hostElement = hostElement;
1618
- }
1646
+ hostElement = inject(ElementRef);
1647
+ constructor() { }
1619
1648
  ngAfterViewInit() {
1620
1649
  this.hostElement.nativeElement.focus();
1621
1650
  }
1622
- /** @nocollapse */ static ɵfac = function MagicFocusDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
1623
- return new (__ngFactoryType__ || MagicFocusDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
1651
+ /** @nocollapse */ static ɵfac = function MagicFocusDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicFocusDirective)(); };
1624
1652
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: MagicFocusDirective, selectors: [["", "magicFocus", ""]], standalone: false });
1625
1653
  }
1626
1654
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicFocusDirective, [{
@@ -1629,29 +1657,29 @@ class MagicFocusDirective {
1629
1657
  selector: '[magicFocus]',
1630
1658
  standalone: false
1631
1659
  }]
1632
- }], () => [{ type: i0.ElementRef }], null); })();
1660
+ }], () => [], null); })();
1633
1661
 
1634
1662
  const _c0$2 = ["overlayContainerWrapper"];
1635
1663
  class MagicOverlayContainerWrapper {
1636
- componentListMagicService;
1637
- magicLazyModuleLoader;
1638
- injector;
1639
- changeDetectorRef;
1640
1664
  /**
1641
1665
  *
1642
1666
  */
1643
- Component = null;
1667
+ Component = input(null, /* @ts-ignore */
1668
+ ...(ngDevMode ? [{ debugName: "Component" }] : /* istanbul ignore next */ []));
1644
1669
  /**
1645
1670
  *
1646
1671
  */
1647
- Parameters = {};
1648
- OverlayTypeParam;
1649
- onClose = new EventEmitter();
1672
+ Parameters = input({}, /* @ts-ignore */
1673
+ ...(ngDevMode ? [{ debugName: "Parameters" }] : /* istanbul ignore next */ []));
1674
+ OverlayTypeParam = input(/* @ts-ignore */
1675
+ ...(ngDevMode ? [undefined, { debugName: "OverlayTypeParam" }] : /* istanbul ignore next */ []));
1676
+ onClose = output();
1650
1677
  /**
1651
1678
  * HTML to be displayed in the modal window
1652
1679
  */
1653
1680
  overlayContentViewContainerRef;
1654
- overlayContainerWrapperElementRef;
1681
+ overlayContainerWrapperElementRef = viewChild.required('overlayContainerWrapper', /* @ts-ignore */
1682
+ ...(ngDevMode ? [{ debugName: "overlayContainerWrapperElementRef" }] : /* istanbul ignore next */ []));
1655
1683
  /**
1656
1684
  * @ignore
1657
1685
  * contais data of allowed base components to use
@@ -1661,23 +1689,19 @@ class MagicOverlayContainerWrapper {
1661
1689
  [OverlayType.Alert, { comp: BaseMagicAlertComponent, error: 'BaseMagicAlertComponent. Alert ' }],
1662
1690
  [OverlayType.ConfirmationBox, { comp: BaseMagicConfirmComponent, error: 'BaseMagicConfirmComponent. Confirmation ' }]
1663
1691
  ]);
1664
- /**
1665
- *
1666
- * @param componentFactoryResolver
1667
- */
1668
- constructor(componentListMagicService, magicLazyModuleLoader, injector, changeDetectorRef) {
1669
- this.componentListMagicService = componentListMagicService;
1670
- this.magicLazyModuleLoader = magicLazyModuleLoader;
1671
- this.injector = injector;
1672
- this.changeDetectorRef = changeDetectorRef;
1692
+ componentListMagicService = inject(ComponentListMagicService);
1693
+ magicLazyModuleLoader = inject(MagicLazyLoaderService);
1694
+ injector = inject(Injector);
1695
+ changeDetectorRef = inject(ChangeDetectorRef);
1696
+ constructor() {
1673
1697
  }
1674
1698
  /**
1675
1699
  *
1676
1700
  */
1677
1701
  ngOnInit() {
1678
- let moduleRef = this.componentListMagicService.getModuleRef(this.Parameters.MagicFormName);
1702
+ let moduleRef = this.componentListMagicService.getModuleRef(this.Parameters().MagicFormName);
1679
1703
  if (moduleRef == null) {
1680
- let lazyLoadModule = this.componentListMagicService.getLazyLoadModuleData(this.Parameters.MagicFormName);
1704
+ let lazyLoadModule = this.componentListMagicService.getLazyLoadModuleData(this.Parameters().MagicFormName);
1681
1705
  if (lazyLoadModule != null) {
1682
1706
  const Magic = 'Magic';
1683
1707
  const Module = 'Module';
@@ -1696,11 +1720,18 @@ class MagicOverlayContainerWrapper {
1696
1720
  this.loadComponent(moduleRef);
1697
1721
  }
1698
1722
  loadComponent(moduleRef) {
1699
- this.Parameters.ModalComp = this.componentListMagicService.getComponent(this.Parameters.MagicFormName, !isNullOrUndefined(this.Parameters.MagicFormName));
1700
- let componentRef = this.overlayContentViewContainerRef.createComponent(this.Component);
1701
- let allowedBaseComp = MagicOverlayContainerWrapper.allowedBaseComps.get(this.OverlayTypeParam);
1723
+ this.Parameters().ModalComp = this.componentListMagicService.getComponent(this.Parameters().MagicFormName, !isNullOrUndefined(this.Parameters().MagicFormName));
1724
+ let componentRef = this.overlayContentViewContainerRef.createComponent(this.Component());
1725
+ let allowedBaseComp = MagicOverlayContainerWrapper.allowedBaseComps.get(this.OverlayTypeParam());
1702
1726
  if (componentRef.instance instanceof allowedBaseComp.comp) {
1703
- Object.assign(componentRef.instance, this.Parameters);
1727
+ if (this.OverlayTypeParam() === OverlayType.Overlay) {
1728
+ componentRef.setInput('ModalComp', this.Parameters().ModalComp);
1729
+ componentRef.setInput('ModalCompParameters', this.Parameters().ModalCompParameters);
1730
+ }
1731
+ else {
1732
+ componentRef.setInput('title', this.Parameters().title);
1733
+ componentRef.setInput('message', this.Parameters().message);
1734
+ }
1704
1735
  componentRef.instance.onClose.subscribe((res) => {
1705
1736
  this.onClose.emit(res);
1706
1737
  });
@@ -1714,19 +1745,17 @@ class MagicOverlayContainerWrapper {
1714
1745
  this.overlayContentViewContainerRef = vcRef;
1715
1746
  }
1716
1747
  GetRootElement() {
1717
- return this.overlayContainerWrapperElementRef.nativeElement;
1748
+ return this.overlayContainerWrapperElementRef().nativeElement;
1718
1749
  }
1719
1750
  DetectChanges() {
1720
1751
  this.changeDetectorRef.detectChanges();
1721
1752
  }
1722
- /** @nocollapse */ static ɵfac = function MagicOverlayContainerWrapper_Factory(__ngFactoryType__) { /* @ts-ignore */
1723
- return new (__ngFactoryType__ || MagicOverlayContainerWrapper)(i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(MagicLazyLoaderService), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
1753
+ /** @nocollapse */ static ɵfac = function MagicOverlayContainerWrapper_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicOverlayContainerWrapper)(); };
1724
1754
  /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: MagicOverlayContainerWrapper, selectors: [["app-magic-overlay-container-wrapper"]], viewQuery: function MagicOverlayContainerWrapper_Query(rf, ctx) { if (rf & 1) {
1725
- i0.ɵɵviewQuery(_c0$2, 7);
1755
+ i0.ɵɵviewQuerySignal(ctx.overlayContainerWrapperElementRef, _c0$2, 5);
1726
1756
  } if (rf & 2) {
1727
- let _t;
1728
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.overlayContainerWrapperElementRef = _t.first);
1729
- } }, inputs: { Component: "Component", Parameters: "Parameters", OverlayTypeParam: "OverlayTypeParam" }, outputs: { onClose: "onClose" }, standalone: false, decls: 7, vars: 0, consts: [["overlayContainerWrapper", ""], ["overlayContent", ""], ["tabIndex", "0", "magicFocus", "", 1, "overlay-container-wrapper-background", 2, "width", "0px", "height", "0px"], [1, "overlay-container-wrapper-background"], ["magicViewContainerRef", ""], ["tabIndex", "0", 1, "overlay-container-wrapper-background", 2, "width", "0px", "height", "0px"]], template: function MagicOverlayContainerWrapper_Template(rf, ctx) { if (rf & 1) {
1757
+ i0.ɵɵqueryAdvance();
1758
+ } }, inputs: { Component: [1, "Component"], Parameters: [1, "Parameters"], OverlayTypeParam: [1, "OverlayTypeParam"] }, outputs: { onClose: "onClose" }, standalone: false, decls: 7, vars: 0, consts: [["overlayContainerWrapper", ""], ["overlayContent", ""], ["tabIndex", "0", "magicFocus", "", 1, "overlay-container-wrapper-background", 2, "width", "0px", "height", "0px"], [1, "overlay-container-wrapper-background"], ["magicViewContainerRef", ""], ["tabIndex", "0", 1, "overlay-container-wrapper-background", 2, "width", "0px", "height", "0px"]], template: function MagicOverlayContainerWrapper_Template(rf, ctx) { if (rf & 1) {
1730
1759
  i0.ɵɵelementStart(0, "div");
1731
1760
  i0.ɵɵelement(1, "div", 2);
1732
1761
  i0.ɵɵelementStart(2, "div", 3, 0);
@@ -1748,19 +1777,8 @@ class MagicOverlayContainerWrapper {
1748
1777
  <div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" ></div>
1749
1778
  </div>
1750
1779
  `, changeDetection: ChangeDetectionStrategy.Eager, standalone: false, styles: [".overlay-container-wrapper-background{position:fixed;z-index:999;inset:0}\n"] }]
1751
- }], () => [{ type: ComponentListMagicService }, { type: MagicLazyLoaderService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }], { Component: [{
1752
- type: Input
1753
- }], Parameters: [{
1754
- type: Input
1755
- }], OverlayTypeParam: [{
1756
- type: Input
1757
- }], onClose: [{
1758
- type: Output
1759
- }], overlayContainerWrapperElementRef: [{
1760
- type: ViewChild,
1761
- args: ['overlayContainerWrapper', { static: true }]
1762
- }] }); })();
1763
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicOverlayContainerWrapper, { className: "MagicOverlayContainerWrapper", filePath: "src/ui/magic-modal/magic-overlay-container-wrapper.ts", lineNumber: 48 }); })();
1780
+ }], () => [], { Component: [{ type: i0.Input, args: [{ isSignal: true, alias: "Component", required: false }] }], Parameters: [{ type: i0.Input, args: [{ isSignal: true, alias: "Parameters", required: false }] }], OverlayTypeParam: [{ type: i0.Input, args: [{ isSignal: true, alias: "OverlayTypeParam", required: false }] }], onClose: [{ type: i0.Output, args: ["onClose"] }], overlayContainerWrapperElementRef: [{ type: i0.ViewChild, args: ['overlayContainerWrapper', { isSignal: true }] }] }); })();
1781
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicOverlayContainerWrapper, { className: "MagicOverlayContainerWrapper", filePath: "src/ui/magic-modal/magic-overlay-container-wrapper.ts", lineNumber: 46 }); })();
1764
1782
 
1765
1783
  /***
1766
1784
  * This is sample component for the alert message
@@ -1780,17 +1798,17 @@ class MagicAlertComponent extends BaseMagicAlertComponent {
1780
1798
  i0.ɵɵelementEnd()()();
1781
1799
  } if (rf & 2) {
1782
1800
  i0.ɵɵadvance(3);
1783
- i0.ɵɵtextInterpolate1(" ", ctx.title);
1801
+ i0.ɵɵtextInterpolate1(" ", ctx.title());
1784
1802
  i0.ɵɵadvance(2);
1785
- i0.ɵɵtextInterpolate1("", ctx.message, " ");
1803
+ i0.ɵɵtextInterpolate1("", ctx.message(), " ");
1786
1804
  } }, 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}"] });
1787
1805
  }
1788
1806
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicAlertComponent, [{
1789
1807
  type: Component,
1790
1808
  args: [{ selector: 'sample-magic-alert-component', template: `<div>
1791
1809
  <div class="mg-message-background">
1792
- <h2> {{title}}</h2>
1793
- <p>{{message}} </p>
1810
+ <h2> {{title()}}</h2>
1811
+ <p>{{message()}} </p>
1794
1812
 
1795
1813
  <button (click)="OnClose()">OK</button>
1796
1814
  </div>
@@ -1819,17 +1837,17 @@ class MagicConfirmationBoxComponent extends BaseMagicConfirmComponent {
1819
1837
  i0.ɵɵelementEnd()()();
1820
1838
  } if (rf & 2) {
1821
1839
  i0.ɵɵadvance(3);
1822
- i0.ɵɵtextInterpolate1(" ", ctx.title);
1840
+ i0.ɵɵtextInterpolate1(" ", ctx.title());
1823
1841
  i0.ɵɵadvance();
1824
- i0.ɵɵtextInterpolate1(" ", ctx.message, " ");
1842
+ i0.ɵɵtextInterpolate1(" ", ctx.message(), " ");
1825
1843
  } }, 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}"] });
1826
1844
  }
1827
1845
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicConfirmationBoxComponent, [{
1828
1846
  type: Component,
1829
1847
  args: [{ selector: 'sample-magic-confirmation-box', template: `<div>
1830
1848
  <div class="mg-message-background">
1831
- <h2> {{title}}</h2>
1832
- {{message}}
1849
+ <h2> {{title()}}</h2>
1850
+ {{message()}}
1833
1851
  <br>
1834
1852
  <br>
1835
1853
 
@@ -1946,19 +1964,13 @@ class confirmationBox {
1946
1964
  * Service managing overlay windows
1947
1965
  */
1948
1966
  class OverlayWindowService {
1949
- componentList;
1950
- engineMagicService;
1951
- magicLazyModuleLoader;
1952
- injector;
1953
- overlayContainerMagicProvider;
1954
- confirmationComponentsMagicProvider;
1955
- constructor(componentList, engineMagicService, magicLazyModuleLoader, injector, overlayContainerMagicProvider, confirmationComponentsMagicProvider) {
1956
- this.componentList = componentList;
1957
- this.engineMagicService = engineMagicService;
1958
- this.magicLazyModuleLoader = magicLazyModuleLoader;
1959
- this.injector = injector;
1960
- this.overlayContainerMagicProvider = overlayContainerMagicProvider;
1961
- this.confirmationComponentsMagicProvider = confirmationComponentsMagicProvider;
1967
+ componentList = inject(ComponentListMagicService);
1968
+ engineMagicService = inject(EngineMagicService);
1969
+ magicLazyModuleLoader = inject(MagicLazyLoaderService);
1970
+ injector = inject(Injector);
1971
+ overlayContainerMagicProvider = inject(OverlayContainerMagicProvider);
1972
+ confirmationComponentsMagicProvider = inject(ConfirmationComponentsMagicProvider);
1973
+ constructor() {
1962
1974
  }
1963
1975
  // The view reference of container of overlay window
1964
1976
  overlayWindowsContainerViewRef;
@@ -2060,14 +2072,15 @@ class OverlayWindowService {
2060
2072
  // Create the UI component of modal window
2061
2073
  let viewCRef = this.overlayWindowsContainerViewRef;
2062
2074
  componentRef = viewCRef.createComponent(MagicOverlayContainerWrapper);
2063
- // Set the data to newly created component
2064
- Object.assign(componentRef.instance, magicModalContainerParameters);
2075
+ // Set signal inputs via setInput() direct property assignment would overwrite the signal functions
2076
+ componentRef.setInput('Component', magicModalContainerParameters.Component);
2077
+ componentRef.setInput('Parameters', magicModalContainerParameters.Parameters);
2078
+ componentRef.setInput('OverlayTypeParam', magicModalContainerParameters.OverlayTypeParam);
2065
2079
  this.overlayWindowFocusManager.pushDialog(componentRef.instance.GetRootElement());
2066
2080
  componentRef.instance.DetectChanges();
2067
2081
  return componentRef;
2068
2082
  }
2069
- /** @nocollapse */ static ɵfac = function OverlayWindowService_Factory(__ngFactoryType__) { /* @ts-ignore */
2070
- return new (__ngFactoryType__ || OverlayWindowService)(i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(MagicLazyLoaderService), i0.ɵɵinject(i0.Injector), i0.ɵɵinject(OverlayContainerMagicProvider), i0.ɵɵinject(ConfirmationComponentsMagicProvider)); };
2083
+ /** @nocollapse */ static ɵfac = function OverlayWindowService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || OverlayWindowService)(); };
2071
2084
  /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: OverlayWindowService, factory: OverlayWindowService.ɵfac, providedIn: 'root' });
2072
2085
  }
2073
2086
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayWindowService, [{
@@ -2075,7 +2088,7 @@ class OverlayWindowService {
2075
2088
  args: [{
2076
2089
  providedIn: 'root'
2077
2090
  }]
2078
- }], () => [{ type: ComponentListMagicService }, { type: EngineMagicService }, { type: MagicLazyLoaderService }, { type: i0.Injector }, { type: OverlayContainerMagicProvider }, { type: ConfirmationComponentsMagicProvider }], null); })();
2091
+ }], () => [], null); })();
2079
2092
  class OverlayWindowFocusManager {
2080
2093
  rootMagicElement = null;
2081
2094
  openDialogList = new Array(0);
@@ -2200,8 +2213,6 @@ class DialogInfo {
2200
2213
  * Main service to connect the UI with the Magic WebCLient
2201
2214
  */
2202
2215
  class TaskMagicService {
2203
- magic;
2204
- overlayWindowService;
2205
2216
  /**
2206
2217
  * Service to provide table-related functionalities
2207
2218
  */
@@ -2273,13 +2284,9 @@ class TaskMagicService {
2273
2284
  * @ignore
2274
2285
  */
2275
2286
  oldPageSize = 0;
2276
- /**
2277
- *
2278
- * @param magic
2279
- */
2280
- constructor(magic, overlayWindowService) {
2281
- this.magic = magic;
2282
- this.overlayWindowService = overlayWindowService;
2287
+ magic = inject(EngineMagicService);
2288
+ overlayWindowService = inject(OverlayWindowService);
2289
+ constructor() {
2283
2290
  this.Records.setGuiTopIndex(0);
2284
2291
  this.mgInputDateFormat = null;
2285
2292
  }
@@ -3143,30 +3150,22 @@ class TaskMagicService {
3143
3150
  }
3144
3151
  }
3145
3152
  }
3146
- /** @nocollapse */ static ɵfac = function TaskMagicService_Factory(__ngFactoryType__) { /* @ts-ignore */
3147
- return new (__ngFactoryType__ || TaskMagicService)(i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(OverlayWindowService)); };
3153
+ /** @nocollapse */ static ɵfac = function TaskMagicService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TaskMagicService)(); };
3148
3154
  /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: TaskMagicService, factory: TaskMagicService.ɵfac });
3149
3155
  }
3150
3156
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TaskMagicService, [{
3151
3157
  type: Injectable
3152
- }], () => [{ type: EngineMagicService }, { type: OverlayWindowService }], null); })();
3158
+ }], () => [], null); })();
3153
3159
 
3154
3160
  /**
3155
3161
  * Implements various table-related functionalities
3156
3162
  */
3157
3163
  class TableMagicService {
3158
- componentList;
3159
- task;
3160
3164
  selectedItem;
3161
3165
  chunkSize;
3162
- /**
3163
- *
3164
- * @param componentList Component-mapping service
3165
- * @param task Magic task service
3166
- */
3167
- constructor(componentList, task) {
3168
- this.componentList = componentList;
3169
- this.task = task;
3166
+ componentList = inject(ComponentListMagicService);
3167
+ task = inject(TaskMagicService);
3168
+ constructor() {
3170
3169
  }
3171
3170
  shouldOpenFieldTextEditor = true;
3172
3171
  /**
@@ -3276,25 +3275,19 @@ class TableMagicService {
3276
3275
  topIndex--;
3277
3276
  return topIndex;
3278
3277
  }
3279
- /** @nocollapse */ static ɵfac = function TableMagicService_Factory(__ngFactoryType__) { /* @ts-ignore */
3280
- return new (__ngFactoryType__ || TableMagicService)(i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(TaskMagicService)); };
3278
+ /** @nocollapse */ static ɵfac = function TableMagicService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TableMagicService)(); };
3281
3279
  /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: TableMagicService, factory: TableMagicService.ɵfac });
3282
3280
  }
3283
3281
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableMagicService, [{
3284
3282
  type: Injectable
3285
- }], () => [{ type: ComponentListMagicService }, { type: TaskMagicService }], null); })();
3283
+ }], () => [], null); })();
3286
3284
 
3287
3285
  /**
3288
3286
  * Enables changing the browser title using Magic expression (SetTitle)
3289
3287
  */
3290
3288
  class TitleMagicService {
3291
- titleService;
3292
- /**
3293
- *
3294
- * @param titleService Angular's title-changing class
3295
- */
3296
- constructor(titleService) {
3297
- this.titleService = titleService;
3289
+ titleService = inject(Title);
3290
+ constructor() {
3298
3291
  }
3299
3292
  /**
3300
3293
  * Set the new title of the window
@@ -3303,13 +3296,12 @@ class TitleMagicService {
3303
3296
  setTitle(newTitle) {
3304
3297
  this.titleService.setTitle(newTitle);
3305
3298
  }
3306
- /** @nocollapse */ static ɵfac = function TitleMagicService_Factory(__ngFactoryType__) { /* @ts-ignore */
3307
- return new (__ngFactoryType__ || TitleMagicService)(i0.ɵɵinject(i1$1.Title)); };
3299
+ /** @nocollapse */ static ɵfac = function TitleMagicService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TitleMagicService)(); };
3308
3300
  /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: TitleMagicService, factory: TitleMagicService.ɵfac });
3309
3301
  }
3310
3302
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TitleMagicService, [{
3311
3303
  type: Injectable
3312
- }], () => [{ type: i1$1.Title }], null); })();
3304
+ }], () => [], null); })();
3313
3305
 
3314
3306
  let COLOR_FILE_NAME = new InjectionToken('colorFile', {
3315
3307
  providedIn: 'root',
@@ -3322,7 +3314,6 @@ const SYSTEM_BG = 4;
3322
3314
  const SYSTEM_FG_AND_SYSTEM_BG = 6;
3323
3315
  const TRANSPERENT_BG = 1;
3324
3316
  class MagicColorService {
3325
- http;
3326
3317
  colorFileName = 'clr_rnt.eng';
3327
3318
  getColorFilePath() {
3328
3319
  return 'assets/' + this.colorFileName;
@@ -3330,10 +3321,11 @@ class MagicColorService {
3330
3321
  colorsData;
3331
3322
  fileNotFound = false;
3332
3323
  // public static FILE_NAME;
3333
- constructor(http, colorFile1 = 'clr_rnt.eng') {
3334
- this.http = http;
3335
- if (colorFile1)
3336
- this.colorFileName = colorFile1;
3324
+ http = inject(HttpClient);
3325
+ colorFile1 = inject(COLOR_FILE_NAME);
3326
+ constructor() {
3327
+ if (this.colorFile1)
3328
+ this.colorFileName = this.colorFile1;
3337
3329
  else
3338
3330
  this.colorFileName = 'clr_rnt.eng';
3339
3331
  }
@@ -3405,8 +3397,7 @@ class MagicColorService {
3405
3397
  }
3406
3398
  return '';
3407
3399
  }
3408
- /** @nocollapse */ static ɵfac = function MagicColorService_Factory(__ngFactoryType__) { /* @ts-ignore */
3409
- return new (__ngFactoryType__ || MagicColorService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(COLOR_FILE_NAME)); };
3400
+ /** @nocollapse */ static ɵfac = function MagicColorService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicColorService)(); };
3410
3401
  /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: MagicColorService, factory: MagicColorService.ɵfac, providedIn: 'root' });
3411
3402
  }
3412
3403
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicColorService, [{
@@ -3414,26 +3405,21 @@ class MagicColorService {
3414
3405
  args: [{
3415
3406
  providedIn: 'root'
3416
3407
  }]
3417
- }], () => [{ type: i1$2.HttpClient }, { type: undefined, decorators: [{
3418
- type: Inject,
3419
- args: [COLOR_FILE_NAME]
3420
- }] }], null); })();
3408
+ }], () => [], null); })();
3421
3409
 
3422
3410
  /**
3423
3411
  * Provides the UI with values calculated by the Magic WebClient
3424
3412
  */
3425
3413
  class AccessorMagicService {
3426
- task;
3427
- magicColor;
3428
3414
  Logger = null;
3429
3415
  hhmm = maskitoTimeOptionsGenerator({ mode: 'HH:MM' });
3430
3416
  hhmmss = maskitoTimeOptionsGenerator({ mode: 'HH:MM:SS' });
3417
+ task = inject(TaskMagicService);
3418
+ magicColor = inject(MagicColorService);
3431
3419
  /**
3432
3420
  * @ignore
3433
3421
  */
3434
- constructor(task, magicColor) {
3435
- this.task = task;
3436
- this.magicColor = magicColor;
3422
+ constructor() {
3437
3423
  this.Logger = Logger.Instance;
3438
3424
  }
3439
3425
  UploadFileToServer(fileContent, serverFileName) {
@@ -4046,51 +4032,42 @@ class AccessorMagicService {
4046
4032
  getColor(colorNumber, colorType) {
4047
4033
  return this.magicColor.getColor(colorNumber, colorType);
4048
4034
  }
4049
- /** @nocollapse */ static ɵfac = function AccessorMagicService_Factory(__ngFactoryType__) { /* @ts-ignore */
4050
- return new (__ngFactoryType__ || AccessorMagicService)(i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MagicColorService)); };
4035
+ /** @nocollapse */ static ɵfac = function AccessorMagicService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AccessorMagicService)(); };
4051
4036
  /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: AccessorMagicService, factory: AccessorMagicService.ɵfac });
4052
4037
  }
4053
4038
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AccessorMagicService, [{
4054
4039
  type: Injectable
4055
- }], () => [{ type: TaskMagicService }, { type: MagicColorService }], null); })();
4040
+ }], () => [], null); })();
4056
4041
 
4057
4042
  /**
4058
4043
  * Central place for adding the Magic services
4059
4044
  */
4060
4045
  class MagicServices {
4061
- task;
4062
- subformService;
4063
- tableService;
4064
- titleService;
4065
- mgAccessorService;
4046
+ task = inject(TaskMagicService);
4047
+ subformService = inject(SubformMagicService);
4048
+ tableService = inject(TableMagicService);
4049
+ titleService = inject(TitleMagicService);
4050
+ mgAccessorService = inject(AccessorMagicService);
4066
4051
  /**
4067
4052
  * @ignore
4068
4053
  */
4069
- constructor(task, subformService, tableService, titleService, mgAccessorService) {
4070
- this.task = task;
4071
- this.subformService = subformService;
4072
- this.tableService = tableService;
4073
- this.titleService = titleService;
4074
- this.mgAccessorService = mgAccessorService;
4075
- task.tableService = tableService;
4076
- task.mgSubformService = subformService;
4077
- task.mgTitleService = titleService;
4078
- task.mgAccessorService = mgAccessorService;
4079
- }
4080
- /** @nocollapse */ static ɵfac = function MagicServices_Factory(__ngFactoryType__) { /* @ts-ignore */
4081
- return new (__ngFactoryType__ || MagicServices)(i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(SubformMagicService), i0.ɵɵinject(TableMagicService), i0.ɵɵinject(TitleMagicService), i0.ɵɵinject(AccessorMagicService)); };
4054
+ constructor() {
4055
+ this.task.tableService = this.tableService;
4056
+ this.task.mgSubformService = this.subformService;
4057
+ this.task.mgTitleService = this.titleService;
4058
+ this.task.mgAccessorService = this.mgAccessorService;
4059
+ }
4060
+ /** @nocollapse */ static ɵfac = function MagicServices_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicServices)(); };
4082
4061
  /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: MagicServices, factory: MagicServices.ɵfac });
4083
4062
  }
4084
4063
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicServices, [{
4085
4064
  type: Injectable
4086
- }], () => [{ type: TaskMagicService }, { type: SubformMagicService }, { type: TableMagicService }, { type: TitleMagicService }, { type: AccessorMagicService }], null); })();
4065
+ }], () => [], null); })();
4087
4066
 
4088
4067
  /**
4089
4068
  * Base component representing a Magic task
4090
4069
  */
4091
4070
  class TaskBaseMagicComponent {
4092
- ref;
4093
- magicServices;
4094
4071
  /**
4095
4072
  * Id of task, used for initializing the task service
4096
4073
  */
@@ -4103,15 +4080,24 @@ class TaskBaseMagicComponent {
4103
4080
  * @ignore
4104
4081
  */
4105
4082
  magicProperties = MagicProperties;
4083
+ /**
4084
+ * @ignore
4085
+ * Injected as fields rather than constructor parameters, so that the constructor
4086
+ * signature of this base class - which every generated component inherits - is unchanged.
4087
+ */
4088
+ magicChangeDetection = inject(MagicChangeDetectionService);
4089
+ /**
4090
+ * @ignore
4091
+ */
4092
+ destroyRef = inject(DestroyRef);
4093
+ ref = inject(ChangeDetectorRef);
4094
+ magicServices = inject(MagicServices);
4106
4095
  /**
4107
4096
  *
4108
4097
  * @param ref changes-detector object
4109
4098
  * @param magicServices Access point for all Magic services
4110
4099
  */
4111
- constructor(ref, magicServices) {
4112
- this.ref = ref;
4113
- this.magicServices = magicServices;
4114
- }
4100
+ constructor() { }
4115
4101
  /**
4116
4102
  * Returns the Magic task service
4117
4103
  * @returns
@@ -4161,6 +4147,14 @@ class TaskBaseMagicComponent {
4161
4147
  this.task.detectChanges.pipe().subscribe(c => {
4162
4148
  this.ref.detectChanges();
4163
4149
  });
4150
+ // Running zoneless, nothing refreshes this view unless Angular is told to.
4151
+ // MagicChangeDetectionService is application-scoped and never completes, so this
4152
+ // subscription must be tied to the component's lifetime.
4153
+ this.magicChangeDetection.changed
4154
+ .pipe(takeUntilDestroyed(this.destroyRef))
4155
+ .subscribe(() => {
4156
+ this.ref.markForCheck();
4157
+ });
4164
4158
  this.task.initTask(this.taskIdParam, this.taskDescription);
4165
4159
  this.createFormControlsAccessor(this.screenFormGroup);
4166
4160
  this.setInputDateFormat();
@@ -4234,8 +4228,7 @@ class TaskBaseMagicComponent {
4234
4228
  ngOnDestroy() {
4235
4229
  this.task.dispose();
4236
4230
  }
4237
- /** @nocollapse */ static ɵfac = function TaskBaseMagicComponent_Factory(__ngFactoryType__) { /* @ts-ignore */
4238
- return new (__ngFactoryType__ || TaskBaseMagicComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(MagicServices)); };
4231
+ /** @nocollapse */ static ɵfac = function TaskBaseMagicComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TaskBaseMagicComponent)(); };
4239
4232
  /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: TaskBaseMagicComponent, selectors: [["task-magic"]], inputs: { taskIdParam: "taskIdParam", taskDescription: "taskDescription" }, standalone: false, features: [i0.ɵɵProvidersFeature([TaskMagicService, SubformMagicService, TableMagicService])], decls: 0, vars: 0, template: function TaskBaseMagicComponent_Template(rf, ctx) { }, encapsulation: 2, changeDetection: 1 });
4240
4233
  }
4241
4234
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TaskBaseMagicComponent, [{
@@ -4247,19 +4240,17 @@ class TaskBaseMagicComponent {
4247
4240
  changeDetection: ChangeDetectionStrategy.Eager,
4248
4241
  standalone: false
4249
4242
  }]
4250
- }], () => [{ type: i0.ChangeDetectorRef }, { type: MagicServices }], { taskIdParam: [{
4243
+ }], () => [], { taskIdParam: [{
4251
4244
  type: Input
4252
4245
  }], taskDescription: [{
4253
4246
  type: Input
4254
4247
  }] }); })();
4255
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TaskBaseMagicComponent, { className: "TaskBaseMagicComponent", filePath: "src/ui/task-base.magic.component.ts", lineNumber: 22 }); })();
4248
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TaskBaseMagicComponent, { className: "TaskBaseMagicComponent", filePath: "src/ui/task-base.magic.component.ts", lineNumber: 24 }); })();
4256
4249
 
4257
4250
  /**
4258
4251
  * @ignore
4259
4252
  */
4260
4253
  class RowMagicDirective {
4261
- _task;
4262
- element;
4263
4254
  rowId;
4264
4255
  /**
4265
4256
  * The HTML element connected to this directive
@@ -4269,9 +4260,9 @@ class RowMagicDirective {
4269
4260
  * @ignore
4270
4261
  */
4271
4262
  rowChangedSubscriber = null;
4272
- constructor(_task, element) {
4273
- this._task = _task;
4274
- this.element = element;
4263
+ _task = inject(TaskMagicService);
4264
+ element = inject(ElementRef);
4265
+ constructor() {
4275
4266
  this.htmlElement = this.element.nativeElement;
4276
4267
  }
4277
4268
  /**
@@ -4312,8 +4303,7 @@ class RowMagicDirective {
4312
4303
  event.cancelBubble = true;
4313
4304
  }
4314
4305
  }
4315
- /** @nocollapse */ static ɵfac = function RowMagicDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
4316
- return new (__ngFactoryType__ || RowMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef)); };
4306
+ /** @nocollapse */ static ɵfac = function RowMagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RowMagicDirective)(); };
4317
4307
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: RowMagicDirective, selectors: [["", "magicRow", ""]], hostBindings: function RowMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
4318
4308
  i0.ɵɵlistener("click", function RowMagicDirective_click_HostBindingHandler($event) { return ctx.onClick($event); });
4319
4309
  } }, inputs: { rowId: [0, "magicRow", "rowId"] }, standalone: false });
@@ -4324,7 +4314,7 @@ class RowMagicDirective {
4324
4314
  selector: '[magicRow]',
4325
4315
  standalone: false
4326
4316
  }]
4327
- }], () => [{ type: TaskMagicService }, { type: i0.ElementRef }], { rowId: [{
4317
+ }], () => [], { rowId: [{
4328
4318
  type: Input,
4329
4319
  args: ['magicRow']
4330
4320
  }], onClick: [{
@@ -4336,12 +4326,6 @@ class RowMagicDirective {
4336
4326
  * Connects HTML elements to the Magic Web Client engine
4337
4327
  */
4338
4328
  class MagicDirective {
4339
- _task;
4340
- element;
4341
- renderer;
4342
- vcRef;
4343
- platform;
4344
- magicRow;
4345
4329
  set magic(val) {
4346
4330
  this.id = val;
4347
4331
  this.selector = "magic";
@@ -4405,21 +4389,15 @@ class MagicDirective {
4405
4389
  * @param platform
4406
4390
  * @param magicRow
4407
4391
  */
4408
- constructor(_task, element, renderer, vcRef, platform, magicRow) {
4409
- this._task = _task;
4410
- this.element = element;
4411
- this.renderer = renderer;
4412
- this.vcRef = vcRef;
4413
- this.platform = platform;
4414
- this.magicRow = magicRow;
4392
+ constructor() {
4415
4393
  this.htmlElement = this.element.nativeElement;
4416
4394
  //let c = (<any>this.vcRef)._view;
4417
4395
  //while (!(c instanceof TaskBaseMagicComponent)) {
4418
4396
  // c = c.component;
4419
4397
  //}
4420
4398
  //this.component = c;
4421
- if (!(typeof magicRow === "undefined" || magicRow === null))
4422
- this.rowId = magicRow.rowId;
4399
+ if (!(typeof this.magicRow === "undefined" || this.magicRow === null))
4400
+ this.rowId = this.magicRow.rowId;
4423
4401
  }
4424
4402
  /**
4425
4403
  * Get the task service
@@ -4428,6 +4406,12 @@ class MagicDirective {
4428
4406
  get task() {
4429
4407
  return this._task;
4430
4408
  }
4409
+ _task = inject(TaskMagicService);
4410
+ element = inject(ElementRef);
4411
+ renderer = inject(Renderer2);
4412
+ vcRef = inject(ViewContainerRef);
4413
+ platform = inject(Platform);
4414
+ magicRow = inject(RowMagicDirective, { optional: true });
4431
4415
  /**
4432
4416
  * Register to the events this element may need to handle
4433
4417
  */
@@ -4630,8 +4614,7 @@ class MagicDirective {
4630
4614
  ngOnDestroy() {
4631
4615
  this.subscribeRefreshDom.unsubscribe();
4632
4616
  }
4633
- /** @nocollapse */ static ɵfac = function MagicDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
4634
- return new (__ngFactoryType__ || MagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i2$2.Platform), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
4617
+ /** @nocollapse */ static ɵfac = function MagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicDirective)(); };
4635
4618
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: MagicDirective, selectors: [["", "magic", ""]], inputs: { magic: "magic", eventsOnly: "eventsOnly", pollTime: "pollTime", rowId: "rowId" }, standalone: false });
4636
4619
  }
4637
4620
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
@@ -4640,9 +4623,7 @@ class MagicDirective {
4640
4623
  selector: "[magic]",
4641
4624
  standalone: false
4642
4625
  }]
4643
- }], () => [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2$2.Platform }, { type: RowMagicDirective, decorators: [{
4644
- type: Optional
4645
- }] }], { magic: [{
4626
+ }], () => [], { magic: [{
4646
4627
  type: Input,
4647
4628
  args: ["magic"]
4648
4629
  }], eventsOnly: [{
@@ -4660,9 +4641,15 @@ class MagicDirective {
4660
4641
  class NoControlMagicDirective extends MagicDirective {
4661
4642
  set magic(val) { this.id = val; this.selector = 'magicnc'; }
4662
4643
  ;
4663
- constructor(_task, element, renderer, vcRef, platform, magicRow) {
4664
- super(_task, element, renderer, vcRef, platform, magicRow);
4644
+ constructor() {
4645
+ super();
4665
4646
  }
4647
+ _task = inject(TaskMagicService);
4648
+ element = inject(ElementRef);
4649
+ renderer = inject(Renderer2);
4650
+ vcRef = inject(ViewContainerRef);
4651
+ platform = inject(Platform);
4652
+ magicRow = inject(RowMagicDirective, { optional: true });
4666
4653
  regEvents() {
4667
4654
  super.regEvents();
4668
4655
  if (this.htmlElement instanceof HTMLSelectElement) {
@@ -4829,8 +4816,7 @@ class NoControlMagicDirective extends MagicDirective {
4829
4816
  break;
4830
4817
  }
4831
4818
  }
4832
- /** @nocollapse */ static ɵfac = function NoControlMagicDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
4833
- return new (__ngFactoryType__ || NoControlMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i2$2.Platform), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
4819
+ /** @nocollapse */ static ɵfac = function NoControlMagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NoControlMagicDirective)(); };
4834
4820
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: NoControlMagicDirective, selectors: [["", "magicnc", ""]], inputs: { magic: [0, "magicnc", "magic"] }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature] });
4835
4821
  }
4836
4822
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NoControlMagicDirective, [{
@@ -4839,9 +4825,7 @@ class NoControlMagicDirective extends MagicDirective {
4839
4825
  selector: '[magicnc]',
4840
4826
  standalone: false
4841
4827
  }]
4842
- }], () => [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2$2.Platform }, { type: RowMagicDirective, decorators: [{
4843
- type: Optional
4844
- }] }], { magic: [{
4828
+ }], () => [], { magic: [{
4845
4829
  type: Input,
4846
4830
  args: ['magicnc']
4847
4831
  }] }); })();
@@ -4856,10 +4840,9 @@ class Constants {
4856
4840
  * @ignore
4857
4841
  */
4858
4842
  class DateMagicPipe extends DatePipe {
4859
- _task;
4860
- constructor(_task) {
4843
+ _task = inject(TaskMagicService);
4844
+ constructor() {
4861
4845
  super('en-US');
4862
- this._task = _task;
4863
4846
  }
4864
4847
  transform(value, controlId) {
4865
4848
  let mask = this._task.GetControlPictureMask(controlId).getMask();
@@ -4880,8 +4863,7 @@ class DateMagicPipe extends DatePipe {
4880
4863
  value = "";
4881
4864
  return value;
4882
4865
  }
4883
- /** @nocollapse */ static ɵfac = function DateMagicPipe_Factory(__ngFactoryType__) { /* @ts-ignore */
4884
- return new (__ngFactoryType__ || DateMagicPipe)(i0.ɵɵdirectiveInject(TaskMagicService, 16)); };
4866
+ /** @nocollapse */ static ɵfac = function DateMagicPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DateMagicPipe)(); };
4885
4867
  /** @nocollapse */ static ɵpipe = /** @pureOrBreakMyCode */ i0.ɵɵdefinePipe({ name: "magicDate", type: DateMagicPipe, pure: true, standalone: false });
4886
4868
  }
4887
4869
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DateMagicPipe, [{
@@ -4890,7 +4872,7 @@ class DateMagicPipe extends DatePipe {
4890
4872
  name: 'magicDate',
4891
4873
  standalone: false
4892
4874
  }]
4893
- }], () => [{ type: TaskMagicService }], null); })();
4875
+ }], () => [], null); })();
4894
4876
  class MgDateFormatter {
4895
4877
  ConvertMgDateFormatToAngular(mgDateMask) {
4896
4878
  let formatStr = new StringBuilder();
@@ -4958,16 +4940,13 @@ class MgDateFormatter {
4958
4940
  * Perform Magic validation on input controls which hold alphanumeric strings
4959
4941
  */
4960
4942
  class MgformatMagicDirective {
4961
- magicDir;
4962
- _task;
4963
4943
  datePasteFlag = false;
4944
+ magicDir = inject(MagicDirective);
4945
+ _task = inject(TaskMagicService);
4964
4946
  /**
4965
4947
  * @ignore
4966
4948
  */
4967
- constructor(magicDir, _task) {
4968
- this.magicDir = magicDir;
4969
- this._task = _task;
4970
- }
4949
+ constructor() { }
4971
4950
  ngAfterViewInit() {
4972
4951
  let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
4973
4952
  if (control != null && this._task.mgInputDateFormat == null) {
@@ -5561,8 +5540,7 @@ class MgformatMagicDirective {
5561
5540
  return true;
5562
5541
  return false;
5563
5542
  }
5564
- /** @nocollapse */ static ɵfac = function MgformatMagicDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
5565
- return new (__ngFactoryType__ || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
5543
+ /** @nocollapse */ static ɵfac = function MgformatMagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MgformatMagicDirective)(); };
5566
5544
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
5567
5545
  i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("paste", function MgformatMagicDirective_paste_HostBindingHandler($event) { return ctx.onPaste($event); })("input", function MgformatMagicDirective_input_HostBindingHandler($event) { return ctx.onInputEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); })("blur", function MgformatMagicDirective_blur_HostBindingHandler($event) { return ctx.onBlurEvent($event); });
5568
5546
  } }, standalone: false });
@@ -5573,7 +5551,7 @@ class MgformatMagicDirective {
5573
5551
  selector: '[mgFormat]',
5574
5552
  standalone: false
5575
5553
  }]
5576
- }], () => [{ type: MagicDirective }, { type: TaskMagicService }], { onFocusEvent: [{
5554
+ }], () => [], { onFocusEvent: [{
5577
5555
  type: HostListener,
5578
5556
  args: ['focus', ['$event']]
5579
5557
  }], onPaste: [{
@@ -5594,10 +5572,9 @@ class MgformatMagicDirective {
5594
5572
  * @ignore
5595
5573
  */
5596
5574
  class TimeMagicPipe extends DatePipe {
5597
- _task;
5598
- constructor(_task) {
5575
+ _task = inject(TaskMagicService);
5576
+ constructor() {
5599
5577
  super('en-US');
5600
- this._task = _task;
5601
5578
  }
5602
5579
  transform(value, controlId) {
5603
5580
  let mask = this._task.GetControlPictureMask(controlId).getMask();
@@ -5628,8 +5605,7 @@ class TimeMagicPipe extends DatePipe {
5628
5605
  }
5629
5606
  return value;
5630
5607
  }
5631
- /** @nocollapse */ static ɵfac = function TimeMagicPipe_Factory(__ngFactoryType__) { /* @ts-ignore */
5632
- return new (__ngFactoryType__ || TimeMagicPipe)(i0.ɵɵdirectiveInject(TaskMagicService, 16)); };
5608
+ /** @nocollapse */ static ɵfac = function TimeMagicPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimeMagicPipe)(); };
5633
5609
  /** @nocollapse */ static ɵpipe = /** @pureOrBreakMyCode */ i0.ɵɵdefinePipe({ name: "magicTime", type: TimeMagicPipe, pure: true, standalone: false });
5634
5610
  }
5635
5611
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimeMagicPipe, [{
@@ -5638,22 +5614,20 @@ class TimeMagicPipe extends DatePipe {
5638
5614
  name: 'magicTime',
5639
5615
  standalone: false
5640
5616
  }]
5641
- }], () => [{ type: TaskMagicService }], null); })();
5617
+ }], () => [], null); })();
5642
5618
 
5643
5619
  /**
5644
5620
  * Validates the field range.
5645
5621
  */
5646
5622
  class RangeValidatorMagicDirective {
5647
- _task;
5648
- vcRef;
5623
+ _task = inject(TaskMagicService);
5624
+ vcRef = inject(ViewContainerRef);
5649
5625
  /**
5650
5626
  *
5651
5627
  * @param _task The task service
5652
5628
  * @param vcRef
5653
5629
  */
5654
- constructor(_task, vcRef) {
5655
- this._task = _task;
5656
- this.vcRef = vcRef;
5630
+ constructor() {
5657
5631
  }
5658
5632
  /**
5659
5633
  * Validation method
@@ -5688,8 +5662,7 @@ class RangeValidatorMagicDirective {
5688
5662
  const formGroup = c.parent.controls;
5689
5663
  return Object.keys(formGroup).find(name => c === formGroup[name]) || null;
5690
5664
  }
5691
- /** @nocollapse */ static ɵfac = function RangeValidatorMagicDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
5692
- return new (__ngFactoryType__ || RangeValidatorMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); };
5665
+ /** @nocollapse */ static ɵfac = function RangeValidatorMagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RangeValidatorMagicDirective)(); };
5693
5666
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: RangeValidatorMagicDirective, selectors: [["", "rangevalidator", ""]], standalone: false, features: [i0.ɵɵProvidersFeature([
5694
5667
  {
5695
5668
  provide: NG_VALIDATORS,
@@ -5711,7 +5684,7 @@ class RangeValidatorMagicDirective {
5711
5684
  ],
5712
5685
  standalone: false
5713
5686
  }]
5714
- }], () => [{ type: TaskMagicService }, { type: i0.ViewContainerRef }], null); })();
5687
+ }], () => [], null); })();
5715
5688
 
5716
5689
  function SubformMagicComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
5717
5690
  i0.ɵɵelement(0, "ndc-dynamic", 0);
@@ -5723,8 +5696,6 @@ function SubformMagicComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
5723
5696
  * Represents a Magic subform
5724
5697
  */
5725
5698
  class SubformMagicComponent {
5726
- vcRef;
5727
- mgSub;
5728
5699
  /**
5729
5700
  * @ignore
5730
5701
  */
@@ -5741,12 +5712,12 @@ class SubformMagicComponent {
5741
5712
  /**
5742
5713
  * @ignore
5743
5714
  */
5744
- constructor(vcRef, mgSub) {
5745
- this.vcRef = vcRef;
5746
- this.mgSub = mgSub;
5715
+ constructor() {
5747
5716
  // For angular 13 - find the component from _hostLView
5748
5717
  this.component = (this.vcRef._hostLView).find(v => !isNullOrUndefined(v));
5749
5718
  }
5719
+ vcRef = inject(ViewContainerRef);
5720
+ mgSub = inject(SubformMagicService);
5750
5721
  /**
5751
5722
  * @ignore
5752
5723
  */
@@ -5759,30 +5730,29 @@ class SubformMagicComponent {
5759
5730
  get Parameters() {
5760
5731
  return this.mgSub.mgGetParameters(this.id);
5761
5732
  }
5762
- /** @nocollapse */ static ɵfac = function SubformMagicComponent_Factory(__ngFactoryType__) { /* @ts-ignore */
5763
- return new (__ngFactoryType__ || SubformMagicComponent)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(SubformMagicService)); };
5733
+ /** @nocollapse */ static ɵfac = function SubformMagicComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SubformMagicComponent)(); };
5764
5734
  /** @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) {
5765
5735
  i0.ɵɵconditionalCreate(0, SubformMagicComponent_Conditional_0_Template, 1, 2, "ndc-dynamic", 0);
5766
5736
  } if (rf & 2) {
5767
5737
  i0.ɵɵconditional(ctx.Component ? 0 : -1);
5768
- } }, dependencies: [i2$3.DynamicIoDirective, i2$3.DynamicComponent], encapsulation: 2, changeDetection: 1 });
5738
+ } }, dependencies: [i1$1.DynamicIoDirective, i1$1.DynamicComponent], encapsulation: 2, changeDetection: 1 });
5769
5739
  }
5770
5740
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubformMagicComponent, [{
5771
5741
  type: Component,
5772
5742
  args: [{
5773
5743
  selector: 'magic-subform',
5774
- template: `
5775
- @if (Component) {
5776
- <ndc-dynamic
5777
- [ndcDynamicComponent]="Component"
5778
- [ndcDynamicInputs]="Parameters">
5779
- </ndc-dynamic>
5780
- }
5744
+ template: `
5745
+ @if (Component) {
5746
+ <ndc-dynamic
5747
+ [ndcDynamicComponent]="Component"
5748
+ [ndcDynamicInputs]="Parameters">
5749
+ </ndc-dynamic>
5750
+ }
5781
5751
  `,
5782
5752
  changeDetection: ChangeDetectionStrategy.Eager,
5783
5753
  standalone: false
5784
5754
  }]
5785
- }], () => [{ type: i0.ViewContainerRef }, { type: SubformMagicService }], { magic: [{
5755
+ }], () => [], { magic: [{
5786
5756
  type: Input,
5787
5757
  args: ['magic']
5788
5758
  }] }); })();
@@ -5814,9 +5784,6 @@ function ErrorMagicComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
5814
5784
  * Represents a Magic subform
5815
5785
  */
5816
5786
  class ErrorMagicComponent {
5817
- _task;
5818
- mgService;
5819
- changeDetectorRef;
5820
5787
  /**
5821
5788
  * @ignore
5822
5789
  */
@@ -5835,19 +5802,19 @@ class ErrorMagicComponent {
5835
5802
  ;
5836
5803
  // if true - display standard magic error message, if false - customer has provides his own content and we'll use it
5837
5804
  defaultDisplay = true;
5838
- set CustomContent(innerComponent) {
5839
- this.defaultDisplay = innerComponent == undefined || this.isEmpty(innerComponent.nativeElement);
5840
- this.changeDetectorRef.detectChanges();
5841
- }
5842
- ;
5805
+ customContentRef = viewChild('customContent', /* @ts-ignore */
5806
+ ...(ngDevMode ? [{ debugName: "customContentRef" }] : /* istanbul ignore next */ []));
5843
5807
  /**
5844
5808
  * @ignore
5845
5809
  */
5846
- constructor(_task, mgService, changeDetectorRef) {
5847
- this._task = _task;
5848
- this.mgService = mgService;
5849
- this.changeDetectorRef = changeDetectorRef;
5810
+ constructor() {
5850
5811
  this.rowId = "0";
5812
+ // Reactively update defaultDisplay whenever customContent changes in the DOM
5813
+ effect(() => {
5814
+ const innerComponent = this.customContentRef();
5815
+ this.defaultDisplay = innerComponent == undefined || this.isEmpty(innerComponent.nativeElement);
5816
+ this.changeDetectorRef.detectChanges();
5817
+ });
5851
5818
  }
5852
5819
  /**
5853
5820
  * returns true if the html element has no children
@@ -5886,13 +5853,14 @@ class ErrorMagicComponent {
5886
5853
  }
5887
5854
  return false;
5888
5855
  }
5889
- /** @nocollapse */ static ɵfac = function ErrorMagicComponent_Factory(__ngFactoryType__) { /* @ts-ignore */
5890
- return new (__ngFactoryType__ || ErrorMagicComponent)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(AccessorMagicService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
5856
+ _task = inject(TaskMagicService);
5857
+ mgService = inject(AccessorMagicService);
5858
+ changeDetectorRef = inject(ChangeDetectorRef);
5859
+ /** @nocollapse */ static ɵfac = function ErrorMagicComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ErrorMagicComponent)(); };
5891
5860
  /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: ErrorMagicComponent, selectors: [["mgError"]], viewQuery: function ErrorMagicComponent_Query(rf, ctx) { if (rf & 1) {
5892
- i0.ɵɵviewQuery(_c0$1, 5);
5861
+ i0.ɵɵviewQuerySignal(ctx.customContentRef, _c0$1, 5);
5893
5862
  } if (rf & 2) {
5894
- let _t;
5895
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.CustomContent = _t.first);
5863
+ i0.ɵɵqueryAdvance();
5896
5864
  } }, 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) {
5897
5865
  i0.ɵɵprojectionDef();
5898
5866
  i0.ɵɵconditionalCreate(0, ErrorMagicComponent_Conditional_0_Template, 5, 1, "div");
@@ -5904,57 +5872,49 @@ class ErrorMagicComponent {
5904
5872
  type: Component,
5905
5873
  args: [{
5906
5874
  selector: 'mgError',
5907
- template: `@if (HasErrors(id)) {
5908
- <div>
5909
- <div #customContent>
5910
- <ng-content></ng-content>
5911
- </div>
5912
- @if (defaultDisplay) {
5913
- <span>
5914
- {{mgService.getErrMsg(id, rowId)}}
5915
- </span>
5916
- }
5917
- </div>
5918
- }
5875
+ template: `@if (HasErrors(id)) {
5876
+ <div>
5877
+ <div #customContent>
5878
+ <ng-content></ng-content>
5879
+ </div>
5880
+ @if (defaultDisplay) {
5881
+ <span>
5882
+ {{mgService.getErrMsg(id, rowId)}}
5883
+ </span>
5884
+ }
5885
+ </div>
5886
+ }
5919
5887
  `,
5920
5888
  changeDetection: ChangeDetectionStrategy.Eager,
5921
5889
  standalone: false
5922
5890
  }]
5923
- }], () => [{ type: TaskMagicService }, { type: AccessorMagicService }, { type: i0.ChangeDetectorRef }], { magic: [{
5891
+ }], () => [], { magic: [{
5924
5892
  type: Input,
5925
5893
  args: ['magic']
5926
5894
  }], rowId1: [{
5927
5895
  type: Input,
5928
5896
  args: ['rowId']
5929
- }], CustomContent: [{
5930
- type: ViewChild,
5931
- args: ['customContent', { static: false }]
5932
- }] }); })();
5897
+ }], customContentRef: [{ type: i0.ViewChild, args: ['customContent', { isSignal: true }] }] }); })();
5933
5898
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ErrorMagicComponent, { className: "ErrorMagicComponent", filePath: "src/ui/mgerror.magic.component.ts", lineNumber: 29 }); })();
5934
5899
 
5935
5900
  /**
5936
5901
  * Directive for checkboxes, to handle the 'change' event
5937
5902
  */
5938
5903
  class CheckboxMagicDirective {
5939
- magicDirective;
5940
- el;
5941
- task;
5942
- threeState = false;
5904
+ threeState = input(false, /* @ts-ignore */
5905
+ ...(ngDevMode ? [{ debugName: "threeState" }] : /* istanbul ignore next */ []));
5943
5906
  subscribeRefreshDom = null;
5944
5907
  isIndeterminate = false;
5945
- /**
5946
- * @ignore
5947
- */
5948
- constructor(magicDirective, el, task) {
5949
- this.magicDirective = magicDirective;
5950
- this.el = el;
5951
- this.task = task;
5908
+ magicDirective = inject(MagicDirective);
5909
+ el = inject(ElementRef);
5910
+ task = inject(TaskMagicService);
5911
+ constructor() {
5952
5912
  }
5953
5913
  /**
5954
5914
  * Handles the Checkbox 'change' event - pass it to the Magic engine
5955
5915
  */
5956
5916
  onChange($event) {
5957
- if (this.threeState) {
5917
+ if (this.threeState()) {
5958
5918
  this.handleThreeState();
5959
5919
  }
5960
5920
  else {
@@ -5962,7 +5922,7 @@ class CheckboxMagicDirective {
5962
5922
  }
5963
5923
  }
5964
5924
  ngOnInit() {
5965
- if (this.threeState) {
5925
+ if (this.threeState()) {
5966
5926
  let guiEvent = getGuiEventObj("setAsThreeState", this.magicDirective.id, +this.magicDirective.rowId);
5967
5927
  this.task.insertEvent(guiEvent);
5968
5928
  this.el.nativeElement.indeterminate = this.isIndeterminate = this.task.getProperty(this.magicDirective.id, HtmlProperties.CheckBoxIndeterminate, this.magicDirective.rowId);
@@ -6017,11 +5977,10 @@ class CheckboxMagicDirective {
6017
5977
  if (this.subscribeRefreshDom !== null)
6018
5978
  this.subscribeRefreshDom.unsubscribe();
6019
5979
  }
6020
- /** @nocollapse */ static ɵfac = function CheckboxMagicDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
6021
- return new (__ngFactoryType__ || CheckboxMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(TaskMagicService)); };
5980
+ /** @nocollapse */ static ɵfac = function CheckboxMagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CheckboxMagicDirective)(); };
6022
5981
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: CheckboxMagicDirective, selectors: [["input", "type", "checkbox", "magic", "", 3, "noFormControl", ""]], hostBindings: function CheckboxMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
6023
5982
  i0.ɵɵlistener("change", function CheckboxMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
6024
- } }, inputs: { threeState: "threeState" }, standalone: false });
5983
+ } }, inputs: { threeState: [1, "threeState"] }, standalone: false });
6025
5984
  }
6026
5985
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckboxMagicDirective, [{
6027
5986
  type: Directive,
@@ -6031,9 +5990,7 @@ class CheckboxMagicDirective {
6031
5990
  `,
6032
5991
  standalone: false
6033
5992
  }]
6034
- }], () => [{ type: MagicDirective }, { type: i0.ElementRef }, { type: TaskMagicService }], { threeState: [{
6035
- type: Input
6036
- }], onChange: [{
5993
+ }], () => [], { threeState: [{ type: i0.Input, args: [{ isSignal: true, alias: "threeState", required: false }] }], onChange: [{
6037
5994
  type: HostListener,
6038
5995
  args: ['change', ['$event']]
6039
5996
  }] }); })();
@@ -6042,9 +5999,8 @@ class CheckboxMagicDirective {
6042
5999
  * Directive for comboboxes, to handle the 'change' event
6043
6000
  */
6044
6001
  class ComboboxMagicDirective {
6045
- magicDirective;
6046
- constructor(magicDirective) {
6047
- this.magicDirective = magicDirective;
6002
+ magicDirective = inject(MagicDirective);
6003
+ constructor() {
6048
6004
  // subcribe to refreshDom. This is a special case for native select HTML control.
6049
6005
  // to refresh the selected property. Else by default, HTML element doesn't get refreshed as per
6050
6006
  // selected value and 1st element remains selected.
@@ -6066,8 +6022,7 @@ class ComboboxMagicDirective {
6066
6022
  onComboboxItemsListChanged() {
6067
6023
  this.magicDirective.task.refreshView();
6068
6024
  }
6069
- /** @nocollapse */ static ɵfac = function ComboboxMagicDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
6070
- return new (__ngFactoryType__ || ComboboxMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
6025
+ /** @nocollapse */ static ɵfac = function ComboboxMagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ComboboxMagicDirective)(); };
6071
6026
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: ComboboxMagicDirective, selectors: [["select", "magic", "", 3, "multiple", ""]], hostBindings: function ComboboxMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
6072
6027
  i0.ɵɵlistener("change", function ComboboxMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
6073
6028
  } }, standalone: false });
@@ -6078,7 +6033,7 @@ class ComboboxMagicDirective {
6078
6033
  selector: `select[magic]:not([multiple])`,
6079
6034
  standalone: false
6080
6035
  }]
6081
- }], () => [{ type: MagicDirective }], { onChange: [{
6036
+ }], () => [], { onChange: [{
6082
6037
  type: HostListener,
6083
6038
  args: ['change', ['$event']]
6084
6039
  }] }); })();
@@ -6115,7 +6070,7 @@ function MagicShellComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
6115
6070
  const ctx_r0 = i0.ɵɵnextContext();
6116
6071
  const defaultSpinner_r2 = i0.ɵɵreference(7);
6117
6072
  i0.ɵɵadvance();
6118
- i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.SpinnerTemplate ? ctx_r0.SpinnerTemplate : defaultSpinner_r2);
6073
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.SpinnerTemplate() ? ctx_r0.SpinnerTemplate() : defaultSpinner_r2);
6119
6074
  } }
6120
6075
  function MagicShellComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
6121
6076
  i0.ɵɵelement(0, "div", 7);
@@ -6124,16 +6079,6 @@ function MagicShellComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
6124
6079
  * Root Magic component
6125
6080
  */
6126
6081
  class MagicShellComponent {
6127
- engineMagicService;
6128
- componentList;
6129
- changeDetectorRef;
6130
- titleService;
6131
- overlayWindowService;
6132
- httpClient;
6133
- pendingCommandsCollector;
6134
- route;
6135
- router;
6136
- exitMagicService;
6137
6082
  /**
6138
6083
  * Root component to be displayed in the window
6139
6084
  */
@@ -6143,10 +6088,22 @@ class MagicShellComponent {
6143
6088
  */
6144
6089
  RootComponentParameters;
6145
6090
  overlayWindowsContainerViewRef;
6146
- rootMagicElementRef;
6147
- SpinnerTemplate;
6091
+ rootMagicElementRef = viewChild.required('magicRoot', /* @ts-ignore */
6092
+ ...(ngDevMode ? [{ debugName: "rootMagicElementRef" }] : /* istanbul ignore next */ []));
6093
+ SpinnerTemplate = input(/* @ts-ignore */
6094
+ ...(ngDevMode ? [undefined, { debugName: "SpinnerTemplate" }] : /* istanbul ignore next */ []));
6148
6095
  showSpinner;
6149
6096
  magicEngineTerminated = false;
6097
+ engineMagicService = inject(EngineMagicService);
6098
+ componentList = inject(ComponentListMagicService);
6099
+ changeDetectorRef = inject(ChangeDetectorRef);
6100
+ titleService = inject(Title);
6101
+ overlayWindowService = inject(OverlayWindowService);
6102
+ httpClient = inject(HttpClient);
6103
+ pendingCommandsCollector = inject(CommandsCollectorMagicService);
6104
+ route = inject(ActivatedRoute);
6105
+ router = inject(Router);
6106
+ exitMagicService = inject(ExitMagicService, { optional: true });
6150
6107
  /**
6151
6108
  *
6152
6109
  * @param magic Magic's service
@@ -6156,17 +6113,7 @@ class MagicShellComponent {
6156
6113
  * @param httpClient The native httpClient instance
6157
6114
  * @param exitMagicService Magic exit service
6158
6115
  */
6159
- constructor(engineMagicService, componentList, changeDetectorRef, titleService, overlayWindowService, httpClient, pendingCommandsCollector, route, router, exitMagicService) {
6160
- this.engineMagicService = engineMagicService;
6161
- this.componentList = componentList;
6162
- this.changeDetectorRef = changeDetectorRef;
6163
- this.titleService = titleService;
6164
- this.overlayWindowService = overlayWindowService;
6165
- this.httpClient = httpClient;
6166
- this.pendingCommandsCollector = pendingCommandsCollector;
6167
- this.route = route;
6168
- this.router = router;
6169
- this.exitMagicService = exitMagicService;
6116
+ constructor() {
6170
6117
  this.initialize();
6171
6118
  this.setTitle();
6172
6119
  }
@@ -6192,7 +6139,7 @@ class MagicShellComponent {
6192
6139
  this.engineMagicService.TerminateContextUsingFetchAPI();
6193
6140
  }
6194
6141
  ngAfterViewInit() {
6195
- this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef.nativeElement, this.changeDetectorRef);
6142
+ this.overlayWindowService.init(this.overlayWindowsContainerViewRef, this.rootMagicElementRef().nativeElement, this.changeDetectorRef);
6196
6143
  // Helper function to start the engine
6197
6144
  const startEngine = () => {
6198
6145
  const queryParams = this.route.snapshot.queryParams;
@@ -6306,16 +6253,14 @@ class MagicShellComponent {
6306
6253
  break;
6307
6254
  }
6308
6255
  }
6309
- /** @nocollapse */ static ɵfac = function MagicShellComponent_Factory(__ngFactoryType__) { /* @ts-ignore */
6310
- return new (__ngFactoryType__ || MagicShellComponent)(i0.ɵɵdirectiveInject(EngineMagicService), i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.Title), i0.ɵɵdirectiveInject(OverlayWindowService), i0.ɵɵdirectiveInject(i1$2.HttpClient), i0.ɵɵdirectiveInject(CommandsCollectorMagicService), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(ExitMagicService, 8)); };
6256
+ /** @nocollapse */ static ɵfac = function MagicShellComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MagicShellComponent)(); };
6311
6257
  /** @nocollapse */ static ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: MagicShellComponent, selectors: [["magic-root"]], viewQuery: function MagicShellComponent_Query(rf, ctx) { if (rf & 1) {
6312
- i0.ɵɵviewQuery(_c0, 7);
6258
+ i0.ɵɵviewQuerySignal(ctx.rootMagicElementRef, _c0, 5);
6313
6259
  } if (rf & 2) {
6314
- let _t;
6315
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rootMagicElementRef = _t.first);
6260
+ i0.ɵɵqueryAdvance();
6316
6261
  } }, hostBindings: function MagicShellComponent_HostBindings(rf, ctx) { if (rf & 1) {
6317
6262
  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);
6318
- } }, inputs: { SpinnerTemplate: "SpinnerTemplate" }, standalone: false, features: [i0.ɵɵProvidersFeature([
6263
+ } }, inputs: { SpinnerTemplate: [1, "SpinnerTemplate"] }, standalone: false, features: [i0.ɵɵProvidersFeature([
6319
6264
  // ExitMagicService
6320
6265
  ])], 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) {
6321
6266
  i0.ɵɵelementStart(0, "div", null, 0);
@@ -6329,50 +6274,43 @@ class MagicShellComponent {
6329
6274
  i0.ɵɵconditional(ctx.RootComponent !== null ? 2 : -1);
6330
6275
  i0.ɵɵadvance(3);
6331
6276
  i0.ɵɵconditional(ctx.showSpinner ? 5 : -1);
6332
- } }, 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)}}"], changeDetection: 1 });
6277
+ } }, dependencies: [i1.NgTemplateOutlet, i1$1.DynamicIoDirective, i1$1.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)}}"], changeDetection: 1 });
6333
6278
  }
6334
6279
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
6335
6280
  type: Component,
6336
6281
  args: [{ selector: 'magic-root', providers: [
6337
6282
  // ExitMagicService
6338
- ], template: `
6339
- <div #magicRoot>
6340
- @if (RootComponent !== null) {
6341
- <ndc-dynamic
6342
- [ndcDynamicComponent]="RootComponent"
6343
- [ndcDynamicInputs] ="RootComponentParameters">
6344
- </ndc-dynamic>
6345
- }
6346
-
6347
- <div #overlayWindowsContainer magicViewContainerRef>
6348
- </div>
6349
- </div>
6350
-
6351
- @if (showSpinner) {
6352
- <div class="spinner-background">
6353
- <ng-container [ngTemplateOutlet]="SpinnerTemplate ? SpinnerTemplate:defaultSpinner"></ng-container>
6354
- </div>
6355
- }
6356
-
6357
- <ng-template #defaultSpinner>
6358
- <div class="mgSpinnerClass"></div>
6359
- </ng-template>
6283
+ ], template: `
6284
+ <div #magicRoot>
6285
+ @if (RootComponent !== null) {
6286
+ <ndc-dynamic
6287
+ [ndcDynamicComponent]="RootComponent"
6288
+ [ndcDynamicInputs] ="RootComponentParameters">
6289
+ </ndc-dynamic>
6290
+ }
6291
+
6292
+ <div #overlayWindowsContainer magicViewContainerRef>
6293
+ </div>
6294
+ </div>
6295
+
6296
+ @if (showSpinner) {
6297
+ <div class="spinner-background">
6298
+ <ng-container [ngTemplateOutlet]="SpinnerTemplate() ? SpinnerTemplate():defaultSpinner"></ng-container>
6299
+ </div>
6300
+ }
6301
+
6302
+ <ng-template #defaultSpinner>
6303
+ <div class="mgSpinnerClass"></div>
6304
+ </ng-template>
6360
6305
  `, changeDetection: ChangeDetectionStrategy.Eager, 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"] }]
6361
- }], () => [{ 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: [{
6362
- type: Optional
6363
- }] }], { rootMagicElementRef: [{
6364
- type: ViewChild,
6365
- args: ['magicRoot', { static: true }]
6366
- }], SpinnerTemplate: [{
6367
- type: Input
6368
- }], onBeforeUnload: [{
6306
+ }], () => [], { rootMagicElementRef: [{ type: i0.ViewChild, args: ['magicRoot', { isSignal: true }] }], SpinnerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "SpinnerTemplate", required: false }] }], onBeforeUnload: [{
6369
6307
  type: HostListener,
6370
6308
  args: ['window:beforeunload', ['$event']]
6371
6309
  }], onUnload: [{
6372
6310
  type: HostListener,
6373
6311
  args: ['window:unload', ['$event']]
6374
6312
  }] }); })();
6375
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicShellComponent, { className: "MagicShellComponent", filePath: "src/ui/magic-root.component.ts", lineNumber: 92 }); })();
6313
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MagicShellComponent, { className: "MagicShellComponent", filePath: "src/ui/magic-root.component.ts", lineNumber: 90 }); })();
6376
6314
 
6377
6315
  /**
6378
6316
  * @ignore
@@ -6445,9 +6383,8 @@ class MagicDefaultValueAccessor extends DefaultValueAccessor {
6445
6383
  * Directive for checkboxes which should not have a form control
6446
6384
  */
6447
6385
  class CheckboxNoFormControlMagicDirective {
6448
- magicDirective;
6449
- constructor(magicDirective) {
6450
- this.magicDirective = magicDirective;
6386
+ magicDirective = inject(MagicDirective);
6387
+ constructor() {
6451
6388
  }
6452
6389
  /**
6453
6390
  * Handle the 'Checkbox' change event - pass it to the Magic engine
@@ -6455,8 +6392,7 @@ class CheckboxNoFormControlMagicDirective {
6455
6392
  onChange($event) {
6456
6393
  this.magicDirective.task.onCheckChanged($event, this.magicDirective.id, +this.magicDirective.rowId);
6457
6394
  }
6458
- /** @nocollapse */ static ɵfac = function CheckboxNoFormControlMagicDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
6459
- return new (__ngFactoryType__ || CheckboxNoFormControlMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
6395
+ /** @nocollapse */ static ɵfac = function CheckboxNoFormControlMagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CheckboxNoFormControlMagicDirective)(); };
6460
6396
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: CheckboxNoFormControlMagicDirective, selectors: [["input", "type", "checkbox", "magic", "", "noFormControl", ""]], hostBindings: function CheckboxNoFormControlMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
6461
6397
  i0.ɵɵlistener("change", function CheckboxNoFormControlMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
6462
6398
  } }, standalone: false });
@@ -6469,7 +6405,7 @@ class CheckboxNoFormControlMagicDirective {
6469
6405
  `,
6470
6406
  standalone: false
6471
6407
  }]
6472
- }], () => [{ type: MagicDirective }], { onChange: [{
6408
+ }], () => [], { onChange: [{
6473
6409
  type: HostListener,
6474
6410
  args: ['change', ['$event']]
6475
6411
  }] }); })();
@@ -6478,9 +6414,8 @@ class CheckboxNoFormControlMagicDirective {
6478
6414
  * Directive for non-checkbox input controls which do not have a form control
6479
6415
  */
6480
6416
  class InputNoFormControlMagicDirective {
6481
- magicDirective;
6482
- constructor(magicDirective) {
6483
- this.magicDirective = magicDirective;
6417
+ magicDirective = inject(MagicDirective);
6418
+ constructor() {
6484
6419
  }
6485
6420
  /**
6486
6421
  * Handles the 'change' event - pass it to the Magic engine
@@ -6488,8 +6423,7 @@ class InputNoFormControlMagicDirective {
6488
6423
  onChange($event) {
6489
6424
  this.magicDirective.task.setInputTextValue(this.magicDirective.id, this.magicDirective.rowId, event.srcElement.value);
6490
6425
  }
6491
- /** @nocollapse */ static ɵfac = function InputNoFormControlMagicDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
6492
- return new (__ngFactoryType__ || InputNoFormControlMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
6426
+ /** @nocollapse */ static ɵfac = function InputNoFormControlMagicDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || InputNoFormControlMagicDirective)(); };
6493
6427
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: InputNoFormControlMagicDirective, selectors: [["input", "magic", "", "noFormControl", "", 3, "type", "checkbox"], ["textarea", "magic", "", "noFormControl", "", 3, "type", "checkbox"]], hostBindings: function InputNoFormControlMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
6494
6428
  i0.ɵɵlistener("change", function InputNoFormControlMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
6495
6429
  } }, standalone: false });
@@ -6501,7 +6435,7 @@ class InputNoFormControlMagicDirective {
6501
6435
  textarea[magic]:([noFormControl]):not([type=checkbox])`,
6502
6436
  standalone: false
6503
6437
  }]
6504
- }], () => [{ type: MagicDirective }], { onChange: [{
6438
+ }], () => [], { onChange: [{
6505
6439
  type: HostListener,
6506
6440
  args: ['change', ['$event']]
6507
6441
  }] }); })();
@@ -6520,10 +6454,6 @@ const DATE_VALUE_ACCESSOR = {
6520
6454
  * `<input type="date" formControlName="birthday" dateInput>`
6521
6455
  */
6522
6456
  class DateValueAccessor {
6523
- renderer;
6524
- elementRef;
6525
- magicDir;
6526
- _task;
6527
6457
  onChange = (_) => { };
6528
6458
  onTouched = () => { };
6529
6459
  onBlurEvent(event) {
@@ -6531,12 +6461,11 @@ class DateValueAccessor {
6531
6461
  let control = this._task.getFormControl(this.magicDir.rowId, this.magicDir.id);
6532
6462
  this.formatDateWithCentury(event.target.value, century, control);
6533
6463
  }
6534
- constructor(renderer, elementRef, magicDir, _task) {
6535
- this.renderer = renderer;
6536
- this.elementRef = elementRef;
6537
- this.magicDir = magicDir;
6538
- this._task = _task;
6539
- }
6464
+ renderer = inject(Renderer2);
6465
+ elementRef = inject(ElementRef);
6466
+ magicDir = inject(MagicDirective);
6467
+ _task = inject(TaskMagicService);
6468
+ constructor() { }
6540
6469
  /** Format year, if user enters 2 digits instead of 4 digits as per the century given in Magic.ini file */
6541
6470
  formatDateWithCentury(userInput, century, control) {
6542
6471
  const separator = userInput.includes('/') ? '/' : "-";
@@ -6574,8 +6503,7 @@ class DateValueAccessor {
6574
6503
  setDisabledState(isDisabled) {
6575
6504
  this.renderer.setProperty(this.elementRef.nativeElement, "disabled", isDisabled);
6576
6505
  }
6577
- /** @nocollapse */ static ɵfac = function DateValueAccessor_Factory(__ngFactoryType__) { /* @ts-ignore */
6578
- return new (__ngFactoryType__ || DateValueAccessor)(i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
6506
+ /** @nocollapse */ static ɵfac = function DateValueAccessor_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DateValueAccessor)(); };
6579
6507
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: DateValueAccessor, selectors: [["", "dateInput", ""]], hostBindings: function DateValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {
6580
6508
  i0.ɵɵlistener("input", function DateValueAccessor_input_HostBindingHandler($event) { return ctx.onChange($event.target.valueAsDate); })("blur", function DateValueAccessor_blur_HostBindingHandler($event) { return ctx.onBlurEvent($event); });
6581
6509
  } }, standalone: false, features: [i0.ɵɵProvidersFeature([DATE_VALUE_ACCESSOR])] });
@@ -6587,7 +6515,7 @@ class DateValueAccessor {
6587
6515
  providers: [DATE_VALUE_ACCESSOR],
6588
6516
  standalone: false
6589
6517
  }]
6590
- }], () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: MagicDirective }, { type: TaskMagicService }], { onChange: [{
6518
+ }], () => [], { onChange: [{
6591
6519
  type: HostListener,
6592
6520
  args: ["input", ["$event.target.valueAsDate"]]
6593
6521
  }], onTouched: [{
@@ -6602,10 +6530,6 @@ class DateValueAccessor {
6602
6530
  * Responsible for connecting HTML elements to the Magic WebClient engine showing it is not Magic Control but a Dummy control which is used to notify only receeive focus event for now
6603
6531
  */
6604
6532
  class NonMagicControlDirective {
6605
- _task;
6606
- element;
6607
- renderer;
6608
- vcRef;
6609
6533
  set magic(val) {
6610
6534
  this.id = val;
6611
6535
  this.selector = 'NonMagicControl';
@@ -6643,13 +6567,13 @@ class NonMagicControlDirective {
6643
6567
  * @param renderer Renderer for the element
6644
6568
  * @param vcRef
6645
6569
  */
6646
- constructor(_task, element, renderer, vcRef) {
6647
- this._task = _task;
6648
- this.element = element;
6649
- this.renderer = renderer;
6650
- this.vcRef = vcRef;
6570
+ constructor() {
6651
6571
  this.htmlElement = this.element.nativeElement;
6652
6572
  }
6573
+ _task = inject(TaskMagicService);
6574
+ element = inject(ElementRef);
6575
+ renderer = inject(Renderer2);
6576
+ vcRef = inject(ViewContainerRef);
6653
6577
  /**
6654
6578
  * Get the task service
6655
6579
  * @returns
@@ -6680,8 +6604,7 @@ class NonMagicControlDirective {
6680
6604
  ngOnInit() {
6681
6605
  this.regEvents();
6682
6606
  }
6683
- /** @nocollapse */ static ɵfac = function NonMagicControlDirective_Factory(__ngFactoryType__) { /* @ts-ignore */
6684
- return new (__ngFactoryType__ || NonMagicControlDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); };
6607
+ /** @nocollapse */ static ɵfac = function NonMagicControlDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NonMagicControlDirective)(); };
6685
6608
  /** @nocollapse */ static ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: NonMagicControlDirective, selectors: [["", "NonMagicControl", ""]], inputs: { magic: [0, "NonMagicControl", "magic"] }, standalone: false });
6686
6609
  }
6687
6610
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NonMagicControlDirective, [{
@@ -6690,15 +6613,14 @@ class NonMagicControlDirective {
6690
6613
  selector: '[NonMagicControl]',
6691
6614
  standalone: false
6692
6615
  }]
6693
- }], () => [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }], { magic: [{
6616
+ }], () => [], { magic: [{
6694
6617
  type: Input,
6695
6618
  args: ['NonMagicControl']
6696
6619
  }] }); })();
6697
6620
 
6698
6621
  class Time24MagicPipe {
6699
- _task;
6700
- constructor(_task) {
6701
- this._task = _task;
6622
+ _task = inject(TaskMagicService);
6623
+ constructor() {
6702
6624
  }
6703
6625
  transform(value, controlId) {
6704
6626
  let mask = this._task.GetControlPictureMask(controlId).getMask();
@@ -6716,8 +6638,7 @@ class Time24MagicPipe {
6716
6638
  }
6717
6639
  return value;
6718
6640
  }
6719
- /** @nocollapse */ static ɵfac = function Time24MagicPipe_Factory(__ngFactoryType__) { /* @ts-ignore */
6720
- return new (__ngFactoryType__ || Time24MagicPipe)(i0.ɵɵdirectiveInject(TaskMagicService, 16)); };
6641
+ /** @nocollapse */ static ɵfac = function Time24MagicPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Time24MagicPipe)(); };
6721
6642
  /** @nocollapse */ static ɵpipe = /** @pureOrBreakMyCode */ i0.ɵɵdefinePipe({ name: "magicTime24", type: Time24MagicPipe, pure: true, standalone: false });
6722
6643
  }
6723
6644
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Time24MagicPipe, [{
@@ -6726,7 +6647,7 @@ class Time24MagicPipe {
6726
6647
  name: 'magicTime24',
6727
6648
  standalone: false
6728
6649
  }]
6729
- }], () => [{ type: TaskMagicService }], null); })();
6650
+ }], () => [], null); })();
6730
6651
 
6731
6652
  /**
6732
6653
  * @ignore
@@ -6868,14 +6789,12 @@ const MG_FORMATS = {
6868
6789
  }
6869
6790
  };
6870
6791
  class MgDateAdapter extends NativeDateAdapter {
6871
- task;
6872
- localeId;
6873
6792
  mgdtfmt = null;
6874
- constructor(task, localeId) {
6793
+ task = inject(TaskMagicService);
6794
+ localeId = inject(MAT_DATE_LOCALE);
6795
+ constructor() {
6875
6796
  super();
6876
- this.task = task;
6877
- this.localeId = localeId;
6878
- this.setLocale(localeId);
6797
+ this.setLocale(this.localeId);
6879
6798
  }
6880
6799
  parse(value) {
6881
6800
  let valueStr = value;
@@ -6950,16 +6869,12 @@ class MgDateAdapter extends NativeDateAdapter {
6950
6869
  return date.toDateString();
6951
6870
  }
6952
6871
  }
6953
- /** @nocollapse */ static ɵfac = function MgDateAdapter_Factory(__ngFactoryType__) { /* @ts-ignore */
6954
- return new (__ngFactoryType__ || MgDateAdapter)(i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
6872
+ /** @nocollapse */ static ɵfac = function MgDateAdapter_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MgDateAdapter)(); };
6955
6873
  /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
6956
6874
  }
6957
6875
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
6958
6876
  type: Injectable
6959
- }], () => [{ type: TaskMagicService }, { type: undefined, decorators: [{
6960
- type: Inject,
6961
- args: [MAT_DATE_LOCALE]
6962
- }] }], null); })();
6877
+ }], () => [], null); })();
6963
6878
 
6964
6879
  const matDateProviders = [
6965
6880
  { provide: DateAdapter, useClass: MgDateAdapter },
@@ -7169,5 +7084,5 @@ class ModalFormDefinition {
7169
7084
  * Generated bundle index. Do not edit.
7170
7085
  */
7171
7086
 
7172
- 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 };
7087
+ 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, MagicChangeDetectionService, 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 };
7173
7088
  //# sourceMappingURL=magic-xpa-angular.mjs.map