@magic-xpa/angular 4.800.0-dev480.94 → 4.801.0-dev000.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/esm2020/index.mjs +57 -0
  2. package/{esm2015/magic-xpa-angular.js → esm2020/magic-xpa-angular.mjs} +0 -0
  3. package/esm2020/src/controls.metadata.model.mjs +180 -0
  4. package/{esm2015/src/interfaces/sub-form-definition.iterface.js → esm2020/src/interfaces/sub-form-definition.iterface.mjs} +1 -0
  5. package/esm2020/src/magic.core.module.mjs +157 -0
  6. package/{esm2015/src/services/ISubformMagicService.js → esm2020/src/services/ISubformMagicService.mjs} +1 -0
  7. package/esm2020/src/services/OverlayWindowService.mjs +208 -0
  8. package/esm2020/src/services/StylesMapManager.mjs +28 -0
  9. package/esm2020/src/services/accessor.magic.service.mjs +302 -0
  10. package/{esm2015/src/services/commands-collector.magic.service.js → esm2020/src/services/commands-collector.magic.service.mjs} +7 -4
  11. package/esm2020/src/services/component-list.magic.service.mjs +46 -0
  12. package/{esm2015/src/services/confirmation.components.magic.provider.js → esm2020/src/services/confirmation.components.magic.provider.mjs} +2 -2
  13. package/esm2020/src/services/engine.magic.service.mjs +82 -0
  14. package/{esm2015/src/services/exit.magic.service.js → esm2020/src/services/exit.magic.service.mjs} +2 -2
  15. package/esm2020/src/services/magic.lazy.loader.service.mjs +16 -0
  16. package/{esm2015/src/services/magic.providers.js → esm2020/src/services/magic.providers.mjs} +0 -0
  17. package/{esm2015/src/services/magic.services.js → esm2020/src/services/magic.services.mjs} +2 -2
  18. package/{esm2015/src/services/mg-date-adapter.js → esm2020/src/services/mg-date-adapter.mjs} +2 -2
  19. package/{esm2015/src/services/overlay.conainer.magic.provider.js → esm2020/src/services/overlay.conainer.magic.provider.mjs} +2 -2
  20. package/esm2020/src/services/router-commands.magic.service.mjs +28 -0
  21. package/esm2020/src/services/subform.magic.service.mjs +185 -0
  22. package/{esm2015/src/services/table.magic.service.js → esm2020/src/services/table.magic.service.mjs} +2 -2
  23. package/esm2020/src/services/task.magics.service.mjs +611 -0
  24. package/{esm2015/src/services/title.magic.service.js → esm2020/src/services/title.magic.service.mjs} +2 -2
  25. package/esm2020/src/ui/GuiInteractiveExecutor.mjs +98 -0
  26. package/{esm2015/src/ui/components/base-magic-alert.component.js → esm2020/src/ui/components/base-magic-alert.component.mjs} +2 -2
  27. package/{esm2015/src/ui/components/base-magic-confirm.component.js → esm2020/src/ui/components/base-magic-confirm.component.mjs} +2 -2
  28. package/esm2020/src/ui/components/magic-alert.component.mjs +71 -0
  29. package/esm2020/src/ui/components/magic-confirmation-box.component.mjs +82 -0
  30. package/{esm2015/src/ui/directives/NonMagicControlDirective.js → esm2020/src/ui/directives/NonMagicControlDirective.mjs} +2 -2
  31. package/{esm2015/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.js → esm2020/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.mjs} +2 -2
  32. package/{esm2015/src/ui/directives/magic/checkbox.magic.directive.js → esm2020/src/ui/directives/magic/checkbox.magic.directive.mjs} +2 -2
  33. package/{esm2015/src/ui/directives/magic/combobox.magic.directive.js → esm2020/src/ui/directives/magic/combobox.magic.directive.mjs} +2 -2
  34. package/{esm2015/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.js → esm2020/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.mjs} +3 -4
  35. package/{esm2015/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.js → esm2020/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.mjs} +2 -2
  36. package/{esm2015/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.js → esm2020/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.mjs} +3 -4
  37. package/{esm2015/src/ui/directives/magic/input.noformcontrol.magic.directive.js → esm2020/src/ui/directives/magic/input.noformcontrol.magic.directive.mjs} +2 -2
  38. package/{esm2015/src/ui/directives/magic/nocontrol.magic.directive.js → esm2020/src/ui/directives/magic/nocontrol.magic.directive.mjs} +2 -2
  39. package/esm2020/src/ui/directives/magic/row.magic.directive.mjs +58 -0
  40. package/{esm2015/src/ui/directives/magic-focus.directive.js → esm2020/src/ui/directives/magic-focus.directive.mjs} +2 -2
  41. package/esm2020/src/ui/directives/magic.directive.mjs +207 -0
  42. package/esm2020/src/ui/directives/magicViewContainerRef.directive.mjs +20 -0
  43. package/{esm2015/src/ui/directives/mgformat.magic.directive.js → esm2020/src/ui/directives/mgformat.magic.directive.mjs} +2 -2
  44. package/{esm2015/src/ui/directives/range-validator.magic.directive.js → esm2020/src/ui/directives/range-validator.magic.directive.mjs} +2 -2
  45. package/{esm2015/src/ui/magic-confirmationBox.js → esm2020/src/ui/magic-confirmationBox.mjs} +0 -0
  46. package/{esm2015/src/ui/magic-modal/base-magic-overlay-container.js → esm2020/src/ui/magic-modal/base-magic-overlay-container.mjs} +0 -0
  47. package/{esm2015/src/ui/magic-modal/magic-modal-form.js → esm2020/src/ui/magic-modal/magic-modal-form.mjs} +0 -0
  48. package/{esm2015/src/ui/magic-modal/magic-modal-interface.js → esm2020/src/ui/magic-modal/magic-modal-interface.mjs} +1 -0
  49. package/esm2020/src/ui/magic-modal/magic-overlay-container-wrapper.mjs +135 -0
  50. package/esm2020/src/ui/magic-modal/magic-overlay-container.mjs +165 -0
  51. package/esm2020/src/ui/magic-root.component.mjs +237 -0
  52. package/esm2020/src/ui/mgerror.magic.component.mjs +120 -0
  53. package/esm2020/src/ui/pipes/date.magic.pipe.mjs +105 -0
  54. package/{esm2015/src/ui/pipes/time.magic.pipe.js → esm2020/src/ui/pipes/time.magic.pipe.mjs} +3 -3
  55. package/esm2020/src/ui/router-container.magic.component.mjs +109 -0
  56. package/esm2020/src/ui/subform.magic.component.mjs +52 -0
  57. package/{esm2015/src/ui/task-base.magic.component.js → esm2020/src/ui/task-base.magic.component.mjs} +2 -2
  58. package/{esm2015/src/ui/utils.js → esm2020/src/ui/utils.mjs} +0 -0
  59. package/fesm2015/magic-xpa-angular.mjs +4578 -0
  60. package/fesm2015/magic-xpa-angular.mjs.map +1 -0
  61. package/{fesm2015/magic-xpa-angular.js → fesm2020/magic-xpa-angular.mjs} +834 -764
  62. package/fesm2020/magic-xpa-angular.mjs.map +1 -0
  63. package/index.d.ts +1 -0
  64. package/package.json +28 -15
  65. package/src/magic.core.module.d.ts +3 -8
  66. package/src/services/OverlayWindowService.d.ts +2 -2
  67. package/src/services/accessor.magic.service.d.ts +10 -3
  68. package/src/services/commands-collector.magic.service.d.ts +2 -2
  69. package/src/services/component-list.magic.service.d.ts +3 -0
  70. package/src/services/confirmation.components.magic.provider.d.ts +2 -2
  71. package/src/services/engine.magic.service.d.ts +2 -2
  72. package/src/services/exit.magic.service.d.ts +2 -2
  73. package/src/services/magic.lazy.loader.service.d.ts +6 -0
  74. package/src/services/magic.services.d.ts +2 -2
  75. package/src/services/mg-date-adapter.d.ts +2 -2
  76. package/src/services/overlay.conainer.magic.provider.d.ts +2 -2
  77. package/src/services/router-commands.magic.service.d.ts +2 -2
  78. package/src/services/subform.magic.service.d.ts +9 -4
  79. package/src/services/table.magic.service.d.ts +2 -2
  80. package/src/services/task.magics.service.d.ts +2 -2
  81. package/src/services/title.magic.service.d.ts +2 -2
  82. package/src/ui/GuiInteractiveExecutor.d.ts +1 -0
  83. package/src/ui/components/base-magic-alert.component.d.ts +2 -2
  84. package/src/ui/components/base-magic-confirm.component.d.ts +2 -2
  85. package/src/ui/components/magic-alert.component.d.ts +2 -2
  86. package/src/ui/components/magic-confirmation-box.component.d.ts +2 -2
  87. package/src/ui/directives/NonMagicControlDirective.d.ts +2 -2
  88. package/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.d.ts +2 -2
  89. package/src/ui/directives/magic/checkbox.magic.directive.d.ts +2 -2
  90. package/src/ui/directives/magic/combobox.magic.directive.d.ts +2 -2
  91. package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts +2 -2
  92. package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts +2 -2
  93. package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts +2 -2
  94. package/src/ui/directives/magic/input.noformcontrol.magic.directive.d.ts +2 -2
  95. package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +2 -2
  96. package/src/ui/directives/magic/row.magic.directive.d.ts +2 -2
  97. package/src/ui/directives/magic-focus.directive.d.ts +2 -2
  98. package/src/ui/directives/magic.directive.d.ts +3 -2
  99. package/src/ui/directives/magicViewContainerRef.directive.d.ts +2 -2
  100. package/src/ui/directives/mgformat.magic.directive.d.ts +2 -2
  101. package/src/ui/directives/range-validator.magic.directive.d.ts +2 -2
  102. package/src/ui/magic-modal/magic-overlay-container-wrapper.d.ts +7 -5
  103. package/src/ui/magic-modal/magic-overlay-container.d.ts +2 -2
  104. package/src/ui/magic-root.component.d.ts +2 -2
  105. package/src/ui/mgerror.magic.component.d.ts +2 -2
  106. package/src/ui/pipes/date.magic.pipe.d.ts +2 -2
  107. package/src/ui/pipes/time.magic.pipe.d.ts +2 -2
  108. package/src/ui/router-container.magic.component.d.ts +7 -4
  109. package/src/ui/subform.magic.component.d.ts +2 -2
  110. package/src/ui/task-base.magic.component.d.ts +2 -2
  111. package/bundles/magic-xpa-angular.umd.js +0 -4973
  112. package/bundles/magic-xpa-angular.umd.js.map +0 -1
  113. package/bundles/magic-xpa-angular.umd.min.js +0 -16
  114. package/bundles/magic-xpa-angular.umd.min.js.map +0 -1
  115. package/esm2015/index.js +0 -56
  116. package/esm2015/src/controls.metadata.model.js +0 -180
  117. package/esm2015/src/magic.core.module.js +0 -173
  118. package/esm2015/src/services/OverlayWindowService.js +0 -205
  119. package/esm2015/src/services/StylesMapManager.js +0 -29
  120. package/esm2015/src/services/accessor.magic.service.js +0 -290
  121. package/esm2015/src/services/component-list.magic.service.js +0 -36
  122. package/esm2015/src/services/engine.magic.service.js +0 -82
  123. package/esm2015/src/services/router-commands.magic.service.js +0 -25
  124. package/esm2015/src/services/subform.magic.service.js +0 -161
  125. package/esm2015/src/services/task.magics.service.js +0 -610
  126. package/esm2015/src/ui/GuiInteractiveExecutor.js +0 -91
  127. package/esm2015/src/ui/components/magic-alert.component.js +0 -72
  128. package/esm2015/src/ui/components/magic-confirmation-box.component.js +0 -83
  129. package/esm2015/src/ui/directives/magic/row.magic.directive.js +0 -56
  130. package/esm2015/src/ui/directives/magic.directive.js +0 -205
  131. package/esm2015/src/ui/directives/magicViewContainerRef.directive.js +0 -20
  132. package/esm2015/src/ui/magic-modal/magic-overlay-container-wrapper.js +0 -131
  133. package/esm2015/src/ui/magic-modal/magic-overlay-container.js +0 -169
  134. package/esm2015/src/ui/magic-root.component.js +0 -237
  135. package/esm2015/src/ui/mgerror.magic.component.js +0 -120
  136. package/esm2015/src/ui/pipes/date.magic.pipe.js +0 -106
  137. package/esm2015/src/ui/router-container.magic.component.js +0 -102
  138. package/esm2015/src/ui/subform.magic.component.js +0 -52
  139. package/fesm2015/magic-xpa-angular.js.map +0 -1
@@ -1,21 +1,24 @@
1
- import { isNullOrUndefined, isUndefined } from 'util';
2
- import { ɵɵdefineInjectable, ɵsetClassMetadata, Injectable, Input, Output, ɵɵdirectiveInject, ViewContainerRef, ComponentFactoryResolver, ɵɵdefineDirective, Directive, ɵɵgetCurrentView, ɵɵelementStart, ɵɵlistener, ɵɵrestoreView, ɵɵnextContext, ɵɵtext, ɵɵelementEnd, ɵɵadvance, ɵɵtextInterpolate1, EventEmitter, Injector, ɵɵdefineComponent, ɵɵviewQuery, ɵɵqueryRefresh, ɵɵloadQuery, ɵɵInheritDefinitionFeature, ɵɵtemplate, ɵɵelement, ɵɵproperty, Component, ViewChild, ElementRef, NgModuleFactoryLoader, ChangeDetectorRef, ɵɵstaticViewQuery, ɵɵgetInheritedFactory, ɵɵinject, ɵɵProvidersFeature, HostListener, Renderer2, Optional, ɵɵdefinePipe, Pipe, ɵɵprojection, ɵɵprojectionDef, ɵɵelementContainer, ɵɵreference, ɵɵresolveWindow, ɵɵtemplateRefExtractor, forwardRef, ɵɵdefineNgModule, ɵɵdefineInjector, ɵɵsetNgModuleScope, NgModule } from '@angular/core';
3
- import { NgIf, NgStyle, DatePipe, NgTemplateOutlet, CommonModule, formatDate } from '@angular/common';
4
- import { ActivatedRoute, Router, RouterModule } from '@angular/router';
1
+ import { isNullOrUndefined, NString, List, isUndefined, StringBuilder, RefParam } from '@magic-xpa/mscorelib';
2
+ import * as i0 from '@angular/core';
3
+ import { Injectable, Component, Input, Output, Directive, EventEmitter, ViewChild, HostListener, Optional, Pipe, forwardRef, NgModule } from '@angular/core';
4
+ import * as i1 from '@angular/common';
5
+ import { DatePipe, CommonModule, formatDate } from '@angular/common';
6
+ import * as i2 from '@angular/router';
7
+ import { RouterModule } from '@angular/router';
5
8
  import { FormGroup, FormControl, Validators, NG_VALIDATORS, NG_VALUE_ACCESSOR, CheckboxControlValueAccessor, DefaultValueAccessor, FormsModule, ReactiveFormsModule } from '@angular/forms';
6
- import { DynamicComponent, DynamicIoDirective, DynamicModule } from 'ng-dynamic-component';
7
- import { __awaiter, __decorate, __metadata } from 'tslib';
8
- import { Subject } from 'rxjs';
9
- import { MagicBridge, getGuiEventObj, CookieService } from '@magic-xpa/engine';
9
+ import * as i3 from 'ng-dynamic-component';
10
+ import { DynamicModule } from 'ng-dynamic-component';
10
11
  import { InteractiveCommandType, OverlayType, Styles, HtmlProperties, GuiConstants, CommandType, PIC, GuiEnvironment, Modifiers } from '@magic-xpa/gui';
11
- import { MagicProperties, StorageAttribute, Logger, BindingLevel, StorageAttributeType, StrUtil, PICInterface } from '@magic-xpa/utils';
12
+ import { MagicBridge, getGuiEventObj, CookieService } from '@magic-xpa/engine';
13
+ import { MagicProperties, Logger, StrUtil, StorageAttribute, BindingLevel, StorageAttributeType, PICInterface } from '@magic-xpa/utils';
12
14
  import { filter, map, debounceTime } from 'rxjs/operators';
13
- import { NString, StringBuilder, List, RefParam } from '@magic-xpa/mscorelib';
14
- import { Title } from '@angular/platform-browser';
15
- import { fromEvent } from 'rxjs/internal/observable/fromEvent';
16
- import { HttpClient, HttpClientModule } from '@angular/common/http';
15
+ import { Subject, fromEvent } from 'rxjs';
16
+ import { __decorate, __metadata } from 'tslib';
17
+ import * as i1$1 from '@angular/platform-browser';
18
+ import * as i5 from '@angular/common/http';
19
+ import { HttpClientModule } from '@angular/common/http';
17
20
  import { NativeDateAdapter, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
18
- import { Platform } from '@angular/cdk/platform';
21
+ import * as i1$2 from '@angular/cdk/platform';
19
22
 
20
23
  class ControlMetadata {
21
24
  constructor() {
@@ -196,6 +199,32 @@ var HtmlClasses;
196
199
  HtmlClasses["HintColor"] = "hintcolor";
197
200
  })(HtmlClasses || (HtmlClasses = {}));
198
201
 
202
+ class StylesMapManager {
203
+ static magicValueGetStyle(styleName, magicValue) {
204
+ let style = "";
205
+ if (!isNullOrUndefined(magicValue)) {
206
+ let value = StylesMapManager.StylesMap.get(styleName);
207
+ if (value.constructor === Map) {
208
+ style = value.get(magicValue);
209
+ }
210
+ else if (value.constructor === String) {
211
+ style = NString.Format(value.toString(), magicValue);
212
+ }
213
+ }
214
+ return style;
215
+ }
216
+ }
217
+ StylesMapManager.StylesMap = new Map([
218
+ [MagicProperties.LineDivider, new Map([[true, "solid"], [false, "hidden"]])],
219
+ [MagicProperties.ImageFile, "url('\{0}\')"],
220
+ [MagicProperties.Wallpaper, "url('\{0}\')"]
221
+ ]);
222
+ StylesMapManager.MagicPropertyToHtmlAttributeMap = new Map([
223
+ [MagicProperties.LineDivider, "border-bottom-style"],
224
+ [MagicProperties.ImageFile, "background-image"],
225
+ [MagicProperties.Wallpaper, "background-image"]
226
+ ]);
227
+
199
228
  class EngineMagicService {
200
229
  constructor() {
201
230
  this.magicBridge = MagicBridge;
@@ -228,10 +257,8 @@ class EngineMagicService {
228
257
  });
229
258
  this.magicBridge.Initialize(httpClient);
230
259
  }
231
- terminateMagic() {
232
- return __awaiter(this, void 0, void 0, function* () {
233
- yield this.magicBridge.TerminateMagic();
234
- });
260
+ async terminateMagic() {
261
+ await this.magicBridge.TerminateMagic();
235
262
  }
236
263
  insertEvent(guiEvent) {
237
264
  if (!this.isStub)
@@ -268,9 +295,12 @@ class EngineMagicService {
268
295
  }
269
296
  }
270
297
  EngineMagicService.ɵfac = function EngineMagicService_Factory(t) { return new (t || EngineMagicService)(); };
271
- EngineMagicService.ɵprov = ɵɵdefineInjectable({ token: EngineMagicService, factory: EngineMagicService.ɵfac });
272
- (function () { ɵsetClassMetadata(EngineMagicService, [{
273
- type: Injectable
298
+ EngineMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: EngineMagicService, factory: EngineMagicService.ɵfac, providedIn: 'root' });
299
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EngineMagicService, [{
300
+ type: Injectable,
301
+ args: [{
302
+ providedIn: 'root'
303
+ }]
274
304
  }], null, null); })();
275
305
 
276
306
  class ComponentListMagicService {
@@ -307,33 +337,355 @@ class ComponentListMagicService {
307
337
  getLazyLoadModuleData(name) {
308
338
  return (this.lazyLoadModulesMap != null && this.lazyLoadModulesMap.hasOwnProperty(name)) ? this.lazyLoadModulesMap[name] : null;
309
339
  }
310
- }
311
-
312
- class StylesMapManager {
313
- static magicValueGetStyle(styleName, magicValue) {
314
- let style = "";
315
- if (!isNullOrUndefined(magicValue)) {
316
- let value = StylesMapManager.StylesMap.get(styleName);
317
- if (value.constructor === Map) {
318
- style = value.get(magicValue);
319
- }
320
- else if (value.constructor === String) {
321
- style = NString.Format(value.toString(), magicValue);
322
- }
340
+ }
341
+ ComponentListMagicService.ɵfac = function ComponentListMagicService_Factory(t) { return new (t || ComponentListMagicService)(); };
342
+ ComponentListMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: ComponentListMagicService, factory: ComponentListMagicService.ɵfac, providedIn: 'root' });
343
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ComponentListMagicService, [{
344
+ type: Injectable,
345
+ args: [{
346
+ providedIn: 'root'
347
+ }]
348
+ }], null, null); })();
349
+
350
+ class CommandsCollectorMagicService {
351
+ constructor(magic) {
352
+ this.magic = magic;
353
+ this.count = 0;
354
+ this.commands = new List();
355
+ this.subscription = null;
356
+ }
357
+ startCollecting() {
358
+ this.count++;
359
+ Logger.Instance.WriteDevToLog("CommandsCollectorMagicService.startCollecting() --- " + this.count);
360
+ if (this.subscription === null) {
361
+ this.subscription = this.magic.refreshDom
362
+ .subscribe(command => {
363
+ this.commands.push(command);
364
+ });
365
+ }
366
+ }
367
+ stopCollecting() {
368
+ this.count--;
369
+ Logger.Instance.WriteDevToLog("CommandsCollectorMagicService.stopCollecting() --- " + this.count);
370
+ if (this.count === 0) {
371
+ this.subscription.unsubscribe();
372
+ this.subscription = null;
373
+ }
374
+ }
375
+ GetCommands(taskId) {
376
+ const commands = this.commands.filter((command) => command.TaskTag === taskId);
377
+ commands.forEach(command => { this.commands.Remove(command); });
378
+ return commands;
379
+ }
380
+ }
381
+ CommandsCollectorMagicService.ɵfac = function CommandsCollectorMagicService_Factory(t) { return new (t || CommandsCollectorMagicService)(i0.ɵɵinject(EngineMagicService)); };
382
+ CommandsCollectorMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: CommandsCollectorMagicService, factory: CommandsCollectorMagicService.ɵfac, providedIn: 'root' });
383
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CommandsCollectorMagicService, [{
384
+ type: Injectable,
385
+ args: [{
386
+ providedIn: 'root'
387
+ }]
388
+ }], function () { return [{ type: EngineMagicService }]; }, null); })();
389
+
390
+ class RouteCommand {
391
+ }
392
+ class RouterCommandsMagicService {
393
+ constructor() {
394
+ this.pendingRouteCommands = [];
395
+ }
396
+ AddRouteCommand(routeCommand) {
397
+ this.pendingRouteCommands.push(routeCommand);
398
+ }
399
+ ExecuteNextCommand() {
400
+ let pendingRouteCommand = this.pendingRouteCommands.shift();
401
+ if (!isNullOrUndefined(pendingRouteCommand)) {
402
+ pendingRouteCommand.callerMgSubformServiceRef.ExecuteRouteCommand(pendingRouteCommand);
403
+ }
404
+ }
405
+ }
406
+ RouterCommandsMagicService.ɵfac = function RouterCommandsMagicService_Factory(t) { return new (t || RouterCommandsMagicService)(); };
407
+ RouterCommandsMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: RouterCommandsMagicService, factory: RouterCommandsMagicService.ɵfac, providedIn: 'root' });
408
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RouterCommandsMagicService, [{
409
+ type: Injectable,
410
+ args: [{
411
+ providedIn: 'root'
412
+ }]
413
+ }], null, null); })();
414
+
415
+ class MagicLazyLoaderService {
416
+ Load(path) {
417
+ return Promise.reject('error in loading module :' + path);
418
+ }
419
+ }
420
+ MagicLazyLoaderService.ɵfac = function MagicLazyLoaderService_Factory(t) { return new (t || MagicLazyLoaderService)(); };
421
+ MagicLazyLoaderService.ɵprov = i0.ɵɵdefineInjectable({ token: MagicLazyLoaderService, factory: MagicLazyLoaderService.ɵfac, providedIn: 'root' });
422
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicLazyLoaderService, [{
423
+ type: Injectable,
424
+ args: [{
425
+ providedIn: 'root'
426
+ }]
427
+ }], null, null); })();
428
+
429
+ class SubformMagicService {
430
+ constructor(task, activatedRoute, componentList, pendingCommandsCollector, router, routerCommandsMagicService, componentListMagicService, loader, injector, compiler) {
431
+ this.task = task;
432
+ this.activatedRoute = activatedRoute;
433
+ this.componentList = componentList;
434
+ this.pendingCommandsCollector = pendingCommandsCollector;
435
+ this.router = router;
436
+ this.routerCommandsMagicService = routerCommandsMagicService;
437
+ this.componentListMagicService = componentListMagicService;
438
+ this.loader = loader;
439
+ this.injector = injector;
440
+ this.compiler = compiler;
441
+ this.subformsDict = {};
442
+ this.routesDict = {};
443
+ this.currentRouteDefinition = null;
444
+ }
445
+ mgGetComp(subformName) {
446
+ if (subformName in this.subformsDict) {
447
+ let formName = this.subformsDict[subformName].formName;
448
+ if (formName)
449
+ return this.componentList.getComponent(formName);
450
+ }
451
+ return null;
452
+ }
453
+ mgGetParameters(subformName) {
454
+ if (subformName in this.subformsDict) {
455
+ return this.subformsDict[subformName].parameters;
456
+ }
457
+ else
458
+ return "";
459
+ }
460
+ deleteSubformComp(subformControlName, formName) {
461
+ if (Object.keys(this.subformsDict).indexOf(subformControlName) >= 0) {
462
+ if (this.subformsDict[subformControlName].formName === formName) {
463
+ this.subformsDict[subformControlName] = {};
464
+ this.task.refreshView();
465
+ }
466
+ }
467
+ }
468
+ addSubformComp(subformControlName, formName, taskId, taskDescription, routerPath, params, inDefaultOutlet) {
469
+ this.pendingCommandsCollector.startCollecting();
470
+ let refreshNeeded = false;
471
+ if (isNullOrUndefined(routerPath)) {
472
+ if (Object.keys(this.subformsDict).indexOf(subformControlName) >= 0) {
473
+ if (this.subformsDict[subformControlName].formName === formName) {
474
+ this.subformsDict[subformControlName] = {};
475
+ this.task.refreshView();
476
+ }
477
+ }
478
+ let moduleRef = this.componentListMagicService.getModuleRef(formName);
479
+ if (moduleRef == null) {
480
+ let lazyLoadModule = this.componentListMagicService.getLazyLoadModuleData(formName);
481
+ if (lazyLoadModule != null) {
482
+ let moduleName = lazyLoadModule.moduleName.replace("Magic", "");
483
+ moduleName = moduleName.replace("Module", "");
484
+ this.loader.Load(moduleName).then(m => {
485
+ const compiled = this.compiler.compileModuleAndAllComponentsSync(m[lazyLoadModule.moduleName]);
486
+ moduleRef = compiled.ngModuleFactory.create(this.injector);
487
+ this.subformsDict[subformControlName] = {
488
+ formName,
489
+ parameters: { taskIdParam: taskId, taskDescription: taskDescription }
490
+ };
491
+ this.task.refreshView();
492
+ });
493
+ }
494
+ }
495
+ else {
496
+ this.subformsDict[subformControlName] = {
497
+ formName,
498
+ parameters: { taskIdParam: taskId, taskDescription: taskDescription }
499
+ };
500
+ refreshNeeded = true;
501
+ }
502
+ }
503
+ else {
504
+ if (inDefaultOutlet)
505
+ subformControlName = "primary";
506
+ let routeParams = new List();
507
+ routeParams.push(routerPath);
508
+ if (params !== null) {
509
+ routeParams = routeParams.concat(params);
510
+ }
511
+ let routeCommand = {
512
+ callerMgSubformServiceRef: this,
513
+ routerOutletName: subformControlName,
514
+ formName: formName,
515
+ parameters: { taskIdParam: taskId, taskDescription: taskDescription },
516
+ routeParams: routeParams
517
+ };
518
+ if (SubformMagicService.currentCallerMgSubformServiceRef === null)
519
+ this.ExecuteRouteCommand(routeCommand);
520
+ else
521
+ this.routerCommandsMagicService.AddRouteCommand(routeCommand);
522
+ }
523
+ if (refreshNeeded)
524
+ this.task.refreshView();
525
+ }
526
+ ExecuteRouteCommand(routeCommand) {
527
+ let reusingComponent = false;
528
+ let currentSubformMagicService = routeCommand.callerMgSubformServiceRef;
529
+ let relativeRoute = SubformMagicService.getRelativeRoute(currentSubformMagicService.activatedRoute);
530
+ if (currentSubformMagicService.routesDict[routeCommand.routerOutletName] === routeCommand.routeParams[0]) {
531
+ currentSubformMagicService.router.navigate([{ outlets: { [routeCommand.routerOutletName]: null } }], { relativeTo: relativeRoute })
532
+ .then((result) => {
533
+ SubformMagicService.currentCallerMgSubformServiceRef = currentSubformMagicService;
534
+ currentSubformMagicService.currentRouteDefinition = {
535
+ formName: routeCommand.formName,
536
+ parameters: routeCommand.parameters
537
+ };
538
+ currentSubformMagicService.PerformRouterNavigate(routeCommand.routerOutletName, routeCommand.routeParams);
539
+ });
540
+ }
541
+ else {
542
+ SubformMagicService.currentCallerMgSubformServiceRef = currentSubformMagicService;
543
+ currentSubformMagicService.currentRouteDefinition = {
544
+ formName: routeCommand.formName,
545
+ parameters: routeCommand.parameters
546
+ };
547
+ if (SubformMagicService.routerContainers.length > 0) {
548
+ let routeContainer = SubformMagicService.routerContainers[0];
549
+ SubformMagicService.routerContainers.shift();
550
+ routeContainer.initializeComponent();
551
+ }
552
+ else {
553
+ currentSubformMagicService.PerformRouterNavigate(routeCommand.routerOutletName, routeCommand.routeParams);
554
+ }
555
+ }
556
+ }
557
+ PerformRouterNavigate(routerOutletName, routeParams) {
558
+ let relativeRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
559
+ this.router.navigate([{ outlets: { [routerOutletName]: routeParams } }], { relativeTo: relativeRoute })
560
+ .then((result) => {
561
+ if (result !== null && !result) {
562
+ let subformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;
563
+ subformMagicService.currentRouteDefinition = null;
564
+ SubformMagicService.currentCallerMgSubformServiceRef = null;
565
+ subformMagicService.pendingCommandsCollector.stopCollecting();
566
+ subformMagicService.routerCommandsMagicService.ExecuteNextCommand();
567
+ }
568
+ });
569
+ }
570
+ init() {
571
+ const pendingCommands = this.pendingCommandsCollector.GetCommands(this.task.taskId);
572
+ if (pendingCommands.length > 0) {
573
+ pendingCommands.forEach(command => { this.task.executeCommand(command); });
574
+ this.task.refreshView();
575
+ }
576
+ this.pendingCommandsCollector.stopCollecting();
577
+ }
578
+ refreshView() {
579
+ this.task.refreshView();
580
+ }
581
+ static getRelativeRoute(sendActivatedRoute) {
582
+ let currentActiveRoute = sendActivatedRoute;
583
+ if (currentActiveRoute.snapshot.routeConfig !== null && currentActiveRoute.snapshot.routeConfig.path === '') {
584
+ currentActiveRoute = currentActiveRoute.parent;
585
+ if (!currentActiveRoute.snapshot.routeConfig.loadChildren)
586
+ console.log("getRelativeRoute(): both path and currentActiveRoute.snapshot.routeConfig.loadChildren are empty.");
587
+ }
588
+ return currentActiveRoute;
589
+ }
590
+ }
591
+ SubformMagicService.currentCallerMgSubformServiceRef = null;
592
+ SubformMagicService.routerContainers = new Array();
593
+ SubformMagicService.ɵfac = function SubformMagicService_Factory(t) { return new (t || 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), i0.ɵɵinject(i0.Compiler)); };
594
+ SubformMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: SubformMagicService, factory: SubformMagicService.ɵfac });
595
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubformMagicService, [{
596
+ type: Injectable
597
+ }], function () { return [{ type: TaskMagicService }, { type: i2.ActivatedRoute }, { type: ComponentListMagicService }, { type: CommandsCollectorMagicService }, { type: i2.Router }, { type: RouterCommandsMagicService }, { type: ComponentListMagicService }, { type: MagicLazyLoaderService }, { type: i0.Injector }, { type: i0.Compiler }]; }, null); })();
598
+
599
+ class RouterContainerMagicComponent {
600
+ constructor(activatedRoute, router, magic, containerTaskService, componentFactoryResolver, viewContainerRef, componentList, pendingCommandsCollector, routerCommandsMagicService) {
601
+ this.activatedRoute = activatedRoute;
602
+ this.router = router;
603
+ this.magic = magic;
604
+ this.containerTaskService = containerTaskService;
605
+ this.componentFactoryResolver = componentFactoryResolver;
606
+ this.viewContainerRef = viewContainerRef;
607
+ this.componentList = componentList;
608
+ this.pendingCommandsCollector = pendingCommandsCollector;
609
+ this.routerCommandsMagicService = routerCommandsMagicService;
610
+ this.componentRef = null;
611
+ this.parentMgSubformService = null;
612
+ }
613
+ static get LastRoute() {
614
+ return RouterContainerMagicComponent.lastRoute;
615
+ }
616
+ ngOnInit() {
617
+ let outletname = this.activatedRoute.outlet;
618
+ let subformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;
619
+ let currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
620
+ RouterContainerMagicComponent.lastRoute = this.router.url;
621
+ if (subformMagicService == null || subformMagicService.currentRouteDefinition === null) {
622
+ this.insertRouteEvent(currentActiveRoute);
623
+ SubformMagicService.routerContainers.push(this);
624
+ }
625
+ else {
626
+ this.initializeComponent();
627
+ }
628
+ }
629
+ insertRouteEvent(currentActiveRoute) {
630
+ let guiEvent = getGuiEventObj('RouterNavigate', null, 0);
631
+ guiEvent.RouterPath = currentActiveRoute.snapshot.routeConfig.path;
632
+ if (currentActiveRoute.snapshot.outlet !== 'primary')
633
+ guiEvent.RouterOutletName = currentActiveRoute.snapshot.outlet;
634
+ let calcRouterPath = currentActiveRoute.routeConfig.path;
635
+ if (calcRouterPath.length > 0) {
636
+ let routerPath = calcRouterPath;
637
+ let tokens = StrUtil.tokenize(routerPath, "/:");
638
+ guiEvent.RouterPath = tokens[0];
639
+ guiEvent.RouterParams = new List();
640
+ for (let i = 1; i < tokens.length; i++) {
641
+ guiEvent.RouterParams.push(currentActiveRoute.snapshot.params[tokens[i]]);
642
+ }
643
+ }
644
+ this.containerTaskService.insertEvent(guiEvent);
645
+ }
646
+ initializeComponent() {
647
+ let subformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;
648
+ if (subformMagicService.currentRouteDefinition !== null) {
649
+ let comp = this.componentList.getComponent(subformMagicService.currentRouteDefinition.formName);
650
+ const componentFactory = this.componentFactoryResolver.resolveComponentFactory(comp);
651
+ this.componentRef = this.viewContainerRef.createComponent(componentFactory);
652
+ Object.assign(this.componentRef.instance, subformMagicService.currentRouteDefinition.parameters);
653
+ let myActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
654
+ let routeParams = StrUtil.tokenize(myActiveRoute.snapshot.routeConfig.path, "/:");
655
+ subformMagicService.routesDict[myActiveRoute.snapshot.outlet] = routeParams[0];
656
+ this.parentMgSubformService = subformMagicService;
657
+ subformMagicService.currentRouteDefinition = null;
658
+ SubformMagicService.currentCallerMgSubformServiceRef = null;
659
+ let ignoreParamChange = true;
660
+ myActiveRoute.paramMap.subscribe(params => {
661
+ if (!ignoreParamChange)
662
+ this.insertRouteEvent(myActiveRoute);
663
+ ignoreParamChange = false;
664
+ });
665
+ this.parentMgSubformService.refreshView();
666
+ this.routerCommandsMagicService.ExecuteNextCommand();
667
+ }
668
+ }
669
+ ngOnDestroy() {
670
+ if (this.componentRef != null) {
671
+ this.componentRef.instance.task.close();
672
+ let currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
673
+ this.parentMgSubformService.routesDict[currentActiveRoute.outlet] = "";
674
+ RouterContainerMagicComponent.lastRoute = this.router.url;
323
675
  }
324
- return style;
325
676
  }
326
677
  }
327
- StylesMapManager.StylesMap = new Map([
328
- [MagicProperties.LineDivider, new Map([[true, "solid"], [false, "hidden"]])],
329
- [MagicProperties.ImageFile, "url('\{0}\')"],
330
- [MagicProperties.Wallpaper, "url('\{0}\')"]
331
- ]);
332
- StylesMapManager.MagicPropertyToHtmlAttributeMap = new Map([
333
- [MagicProperties.LineDivider, "border-bottom-style"],
334
- [MagicProperties.ImageFile, "background-image"],
335
- [MagicProperties.Wallpaper, "background-image"]
336
- ]);
678
+ RouterContainerMagicComponent.lastRoute = "/";
679
+ RouterContainerMagicComponent.ɵfac = function RouterContainerMagicComponent_Factory(t) { return new (t || RouterContainerMagicComponent)(i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(EngineMagicService), i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(CommandsCollectorMagicService), i0.ɵɵdirectiveInject(RouterCommandsMagicService)); };
680
+ RouterContainerMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RouterContainerMagicComponent, selectors: [["magic-route-outlet"]], decls: 0, vars: 0, template: function RouterContainerMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
681
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RouterContainerMagicComponent, [{
682
+ type: Component,
683
+ args: [{
684
+ selector: 'magic-route-outlet',
685
+ template: `
686
+ `
687
+ }]
688
+ }], function () { return [{ type: i2.ActivatedRoute }, { type: i2.Router }, { type: EngineMagicService }, { type: TaskMagicService }, { type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: ComponentListMagicService }, { type: CommandsCollectorMagicService }, { type: RouterCommandsMagicService }]; }, null); })();
337
689
 
338
690
  class GuiInteractiveExecutor {
339
691
  Run() {
@@ -363,6 +715,9 @@ class GuiInteractiveExecutor {
363
715
  case InteractiveCommandType.REFRESH_PAGE:
364
716
  this.OnRefreshPage();
365
717
  break;
718
+ case InteractiveCommandType.GET_LAST_ROUTE:
719
+ this.OnGetLastRoute();
720
+ break;
366
721
  }
367
722
  }
368
723
  catch (ex) {
@@ -422,6 +777,9 @@ class GuiInteractiveExecutor {
422
777
  else
423
778
  this.command._boolVal = this.task.Records.list[guiRowIndex].isEditing;
424
779
  }
780
+ OnGetLastRoute() {
781
+ this.command.resultString = RouterContainerMagicComponent.LastRoute;
782
+ }
425
783
  }
426
784
 
427
785
  let BaseMagicOverlayContainer = class BaseMagicOverlayContainer {
@@ -447,41 +805,41 @@ class MagicViewContainerRef {
447
805
  constructor(vcRef, resolver) {
448
806
  this.vcRef = vcRef;
449
807
  this.resolver = resolver;
450
- let comp = (this.vcRef._hostView).find(v => v != null && !isNullOrUndefined(v.setViewContainerRef));
808
+ let comp = (this.vcRef._hostLView).find(v => v != null && !isNullOrUndefined(v.setViewContainerRef));
451
809
  comp.setViewContainerRef(vcRef);
452
810
  }
453
811
  }
454
- MagicViewContainerRef.ɵfac = function MagicViewContainerRef_Factory(t) { return new (t || MagicViewContainerRef)(ɵɵdirectiveInject(ViewContainerRef), ɵɵdirectiveInject(ComponentFactoryResolver)); };
455
- MagicViewContainerRef.ɵdir = ɵɵdefineDirective({ type: MagicViewContainerRef, selectors: [["", "magicViewContainerRef", ""]] });
456
- (function () { ɵsetClassMetadata(MagicViewContainerRef, [{
812
+ MagicViewContainerRef.ɵfac = function MagicViewContainerRef_Factory(t) { return new (t || MagicViewContainerRef)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver)); };
813
+ MagicViewContainerRef.ɵdir = i0.ɵɵdefineDirective({ type: MagicViewContainerRef, selectors: [["", "magicViewContainerRef", ""]] });
814
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicViewContainerRef, [{
457
815
  type: Directive,
458
816
  args: [{
459
817
  selector: '[magicViewContainerRef]',
460
818
  }]
461
- }], function () { return [{ type: ViewContainerRef }, { type: ComponentFactoryResolver }]; }, null); })();
819
+ }], function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }]; }, null); })();
462
820
 
463
- const _c0 = ["modalheader"];
464
- const _c1 = ["modalForeground"];
821
+ const _c0$3 = ["modalheader"];
822
+ const _c1$1 = ["modalForeground"];
465
823
  function MagicOverlayContainer_button_2_Template(rf, ctx) { if (rf & 1) {
466
- const _r5 = ɵɵgetCurrentView();
467
- ɵɵelementStart(0, "button", 8);
468
- ɵɵlistener("click", function MagicOverlayContainer_button_2_Template_button_click_0_listener() { ɵɵrestoreView(_r5); const ctx_r4 = ɵɵnextContext(); return ctx_r4.OnClose(); });
469
- ɵɵtext(1, "X");
470
- ɵɵelementEnd();
824
+ const _r5 = i0.ɵɵgetCurrentView();
825
+ i0.ɵɵelementStart(0, "button", 8);
826
+ i0.ɵɵlistener("click", function MagicOverlayContainer_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.OnClose(); });
827
+ i0.ɵɵtext(1, "X");
828
+ i0.ɵɵelementEnd();
471
829
  } }
472
830
  function MagicOverlayContainer_div_5_Template(rf, ctx) { if (rf & 1) {
473
- const _r8 = ɵɵgetCurrentView();
474
- ɵɵelementStart(0, "div", 9, 10);
475
- ɵɵtext(2);
476
- ɵɵelementStart(3, "button", 11);
477
- ɵɵlistener("click", function MagicOverlayContainer_div_5_Template_button_click_3_listener() { ɵɵrestoreView(_r8); const ctx_r7 = ɵɵnextContext(); return ctx_r7.OnClose(); });
478
- ɵɵtext(4, "X");
479
- ɵɵelementEnd();
480
- ɵɵelementEnd();
831
+ const _r8 = i0.ɵɵgetCurrentView();
832
+ i0.ɵɵelementStart(0, "div", 9, 10);
833
+ i0.ɵɵtext(2);
834
+ i0.ɵɵelementStart(3, "button", 11);
835
+ i0.ɵɵlistener("click", function MagicOverlayContainer_div_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.OnClose(); });
836
+ i0.ɵɵtext(4, "X");
837
+ i0.ɵɵelementEnd();
838
+ i0.ɵɵelementEnd();
481
839
  } if (rf & 2) {
482
- const ctx_r2 = ɵɵnextContext();
483
- ɵɵadvance(2);
484
- ɵɵtextInterpolate1(" ", ctx_r2.getText(), " ");
840
+ const ctx_r2 = i0.ɵɵnextContext();
841
+ i0.ɵɵadvance(2);
842
+ i0.ɵɵtextInterpolate1(" ", ctx_r2.getText(), " ");
485
843
  } }
486
844
  class MagicOverlayContainer extends BaseMagicOverlayContainer {
487
845
  constructor(injector, componentFactoryResolver) {
@@ -555,42 +913,40 @@ class MagicOverlayContainer extends BaseMagicOverlayContainer {
555
913
  this.OnClose();
556
914
  }
557
915
  }
558
- MagicOverlayContainer.ɵfac = function MagicOverlayContainer_Factory(t) { return new (t || MagicOverlayContainer)(ɵɵdirectiveInject(Injector), ɵɵdirectiveInject(ComponentFactoryResolver)); };
559
- MagicOverlayContainer.ɵcmp = ɵɵdefineComponent({ type: MagicOverlayContainer, selectors: [["app-magic-overlay-container"]], viewQuery: function MagicOverlayContainer_Query(rf, ctx) { if (rf & 1) {
560
- ɵɵviewQuery(_c0, true);
561
- ɵɵviewQuery(_c1, true);
916
+ MagicOverlayContainer.ɵfac = function MagicOverlayContainer_Factory(t) { return new (t || MagicOverlayContainer)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver)); };
917
+ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContainer, selectors: [["app-magic-overlay-container"]], viewQuery: function MagicOverlayContainer_Query(rf, ctx) { if (rf & 1) {
918
+ i0.ɵɵviewQuery(_c0$3, 5);
919
+ i0.ɵɵviewQuery(_c1$1, 5);
562
920
  } if (rf & 2) {
563
- var _t;
564
- ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.headerElementRef = _t.first);
565
- ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.foregroundElementRef = _t.first);
566
- } }, inputs: { ModalComp: "ModalComp", ModalCompParameters: "ModalCompParameters" }, outputs: { onClose: "onClose" }, features: [ɵɵInheritDefinitionFeature], decls: 9, vars: 4, consts: [[1, "modal-background", 3, "click"], ["tabindex", "-1", "style", "float:right; border: none; background-color: transparent; outline: none; color: white", 3, "click", 4, "ngIf"], [1, "modal-foreground", 3, "ngStyle"], ["modalForeground", ""], ["class", "modal-header", 4, "ngIf"], [3, "ngStyle"], ["magicViewContainerRef", ""], ["modalbody", ""], ["tabindex", "-1", 2, "float", "right", "border", "none", "background-color", "transparent", "outline", "none", "color", "white", 3, "click"], [1, "modal-header"], ["modalheader", ""], ["tabindex", "-1", 2, "float", "right", 3, "click"]], template: function MagicOverlayContainer_Template(rf, ctx) { if (rf & 1) {
567
- ɵɵelementStart(0, "div");
568
- ɵɵelementStart(1, "div", 0);
569
- ɵɵlistener("click", function MagicOverlayContainer_Template_div_click_1_listener() { return ctx.OnBackgroundClick(); });
570
- ɵɵtemplate(2, MagicOverlayContainer_button_2_Template, 2, 0, "button", 1);
571
- ɵɵelementEnd();
572
- ɵɵelementStart(3, "div", 2, 3);
573
- ɵɵtemplate(5, MagicOverlayContainer_div_5_Template, 5, 1, "div", 4);
574
- ɵɵelementStart(6, "div", 5);
575
- ɵɵelement(7, "div", 6, 7);
576
- ɵɵelementEnd();
577
- ɵɵelementEnd();
578
- ɵɵelementEnd();
921
+ let _t;
922
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerElementRef = _t.first);
923
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.foregroundElementRef = _t.first);
924
+ } }, inputs: { ModalComp: "ModalComp", ModalCompParameters: "ModalCompParameters" }, outputs: { onClose: "onClose" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 4, consts: [[1, "modal-background", 3, "click"], ["tabindex", "-1", "style", "float:right; border: none; background-color: transparent; outline: none; color: white", 3, "click", 4, "ngIf"], [1, "modal-foreground", 3, "ngStyle"], ["modalForeground", ""], ["class", "modal-header", 4, "ngIf"], [3, "ngStyle"], ["magicViewContainerRef", ""], ["modalbody", ""], ["tabindex", "-1", 2, "float", "right", "border", "none", "background-color", "transparent", "outline", "none", "color", "white", 3, "click"], [1, "modal-header"], ["modalheader", ""], ["tabindex", "-1", 2, "float", "right", 3, "click"]], template: function MagicOverlayContainer_Template(rf, ctx) { if (rf & 1) {
925
+ i0.ɵɵelementStart(0, "div");
926
+ i0.ɵɵelementStart(1, "div", 0);
927
+ i0.ɵɵlistener("click", function MagicOverlayContainer_Template_div_click_1_listener() { return ctx.OnBackgroundClick(); });
928
+ i0.ɵɵtemplate(2, MagicOverlayContainer_button_2_Template, 2, 0, "button", 1);
929
+ i0.ɵɵelementEnd();
930
+ i0.ɵɵelementStart(3, "div", 2, 3);
931
+ i0.ɵɵtemplate(5, MagicOverlayContainer_div_5_Template, 5, 1, "div", 4);
932
+ i0.ɵɵelementStart(6, "div", 5);
933
+ i0.ɵɵelement(7, "div", 6, 7);
934
+ i0.ɵɵelementEnd();
935
+ i0.ɵɵelementEnd();
936
+ i0.ɵɵelementEnd();
579
937
  } if (rf & 2) {
580
- ɵɵadvance(2);
581
- ɵɵproperty("ngIf", !ctx.getShowTitleBar());
582
- ɵɵadvance(1);
583
- ɵɵproperty("ngStyle", ctx.getStyle());
584
- ɵɵadvance(2);
585
- ɵɵproperty("ngIf", ctx.getShowTitleBar());
586
- ɵɵadvance(1);
587
- ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
588
- } }, directives: [NgIf, NgStyle, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{background-color:#fff}.modal-background[_ngcontent-%COMP%], .modal-foreground[_ngcontent-%COMP%]{bottom:0;left:0;position:fixed;right:0;top:0}.modal-background[_ngcontent-%COMP%]{background-color:#000;opacity:.75}.modal-header[_ngcontent-%COMP%]{background-color:beige;border-bottom:2px solid red}"] });
589
- (function () { ɵsetClassMetadata(MagicOverlayContainer, [{
938
+ i0.ɵɵadvance(2);
939
+ i0.ɵɵproperty("ngIf", !ctx.getShowTitleBar());
940
+ i0.ɵɵadvance(1);
941
+ i0.ɵɵproperty("ngStyle", ctx.getStyle());
942
+ i0.ɵɵadvance(2);
943
+ i0.ɵɵproperty("ngIf", ctx.getShowTitleBar());
944
+ i0.ɵɵadvance(1);
945
+ i0.ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
946
+ } }, directives: [i1.NgIf, i1.NgStyle, MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#fff}.modal-background[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.75}.modal-header[_ngcontent-%COMP%]{background-color:beige;border-bottom:2px solid red}"] });
947
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainer, [{
590
948
  type: Component,
591
- args: [{
592
- selector: 'app-magic-overlay-container',
593
- template: `
949
+ args: [{ selector: 'app-magic-overlay-container', template: `
594
950
  <div>
595
951
  <div class="modal-background" (click)="OnBackgroundClick()">
596
952
  <button (click)="OnClose()" tabindex="-1" style="float:right; border: none; background-color: transparent; outline: none; color: white" *ngIf="!getShowTitleBar()">X</button>
@@ -606,10 +962,8 @@ MagicOverlayContainer.ɵcmp = ɵɵdefineComponent({ type: MagicOverlayContainer,
606
962
  </div>
607
963
  </div>
608
964
  </div>
609
- `,
610
- styleUrls: ['./magic-overlay-container.css']
611
- }]
612
- }], function () { return [{ type: Injector }, { type: ComponentFactoryResolver }]; }, { headerElementRef: [{
965
+ `, styles: [".modal-foreground{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#fff}.modal-background{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}\n"] }]
966
+ }], function () { return [{ type: i0.Injector }, { type: i0.ComponentFactoryResolver }]; }, { headerElementRef: [{
613
967
  type: ViewChild,
614
968
  args: ['modalheader', { static: false }]
615
969
  }], foregroundElementRef: [{
@@ -629,8 +983,8 @@ class OverlayContainerMagicProvider {
629
983
  }
630
984
  }
631
985
  OverlayContainerMagicProvider.ɵfac = function OverlayContainerMagicProvider_Factory(t) { return new (t || OverlayContainerMagicProvider)(); };
632
- OverlayContainerMagicProvider.ɵprov = ɵɵdefineInjectable({ token: OverlayContainerMagicProvider, factory: OverlayContainerMagicProvider.ɵfac });
633
- (function () { ɵsetClassMetadata(OverlayContainerMagicProvider, [{
986
+ OverlayContainerMagicProvider.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayContainerMagicProvider, factory: OverlayContainerMagicProvider.ɵfac });
987
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayContainerMagicProvider, [{
634
988
  type: Injectable
635
989
  }], null, null); })();
636
990
 
@@ -643,8 +997,8 @@ class BaseMagicConfirmComponent {
643
997
  }
644
998
  }
645
999
  BaseMagicConfirmComponent.ɵfac = function BaseMagicConfirmComponent_Factory(t) { return new (t || BaseMagicConfirmComponent)(); };
646
- BaseMagicConfirmComponent.ɵcmp = ɵɵdefineComponent({ type: BaseMagicConfirmComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicConfirmComponent_Template(rf, ctx) { }, styles: [""] });
647
- (function () { ɵsetClassMetadata(BaseMagicConfirmComponent, [{
1000
+ BaseMagicConfirmComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMagicConfirmComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicConfirmComponent_Template(rf, ctx) { }, styles: [""] });
1001
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseMagicConfirmComponent, [{
648
1002
  type: Component,
649
1003
  args: [{
650
1004
  selector: 'mg-base-alert',
@@ -668,8 +1022,8 @@ class BaseMagicAlertComponent {
668
1022
  }
669
1023
  }
670
1024
  BaseMagicAlertComponent.ɵfac = function BaseMagicAlertComponent_Factory(t) { return new (t || BaseMagicAlertComponent)(); };
671
- BaseMagicAlertComponent.ɵcmp = ɵɵdefineComponent({ type: BaseMagicAlertComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicAlertComponent_Template(rf, ctx) { }, styles: [""] });
672
- (function () { ɵsetClassMetadata(BaseMagicAlertComponent, [{
1025
+ BaseMagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: BaseMagicAlertComponent, selectors: [["mg-base-alert"]], inputs: { title: "title", message: "message" }, outputs: { onClose: "onClose" }, decls: 0, vars: 0, template: function BaseMagicAlertComponent_Template(rf, ctx) { }, styles: [""] });
1026
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BaseMagicAlertComponent, [{
673
1027
  type: Component,
674
1028
  args: [{
675
1029
  selector: 'mg-base-alert',
@@ -692,23 +1046,24 @@ class MagicFocusDirective {
692
1046
  this.hostElement.nativeElement.focus();
693
1047
  }
694
1048
  }
695
- MagicFocusDirective.ɵfac = function MagicFocusDirective_Factory(t) { return new (t || MagicFocusDirective)(ɵɵdirectiveInject(ElementRef)); };
696
- MagicFocusDirective.ɵdir = ɵɵdefineDirective({ type: MagicFocusDirective, selectors: [["", "magicFocus", ""]] });
697
- (function () { ɵsetClassMetadata(MagicFocusDirective, [{
1049
+ MagicFocusDirective.ɵfac = function MagicFocusDirective_Factory(t) { return new (t || MagicFocusDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
1050
+ MagicFocusDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicFocusDirective, selectors: [["", "magicFocus", ""]] });
1051
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicFocusDirective, [{
698
1052
  type: Directive,
699
1053
  args: [{
700
1054
  selector: '[magicFocus]'
701
1055
  }]
702
- }], function () { return [{ type: ElementRef }]; }, null); })();
1056
+ }], function () { return [{ type: i0.ElementRef }]; }, null); })();
703
1057
 
704
- const _c0$1 = ["overlayContainerWrapper"];
1058
+ const _c0$2 = ["overlayContainerWrapper"];
705
1059
  class MagicOverlayContainerWrapper {
706
- constructor(componentListMagicService, loader, injector, componentFactoryResolver, changeDetectorRef) {
1060
+ constructor(componentListMagicService, magicLazyModuleLoader, injector, componentFactoryResolver, changeDetectorRef, compiler) {
707
1061
  this.componentListMagicService = componentListMagicService;
708
- this.loader = loader;
1062
+ this.magicLazyModuleLoader = magicLazyModuleLoader;
709
1063
  this.injector = injector;
710
1064
  this.componentFactoryResolver = componentFactoryResolver;
711
1065
  this.changeDetectorRef = changeDetectorRef;
1066
+ this.compiler = compiler;
712
1067
  this.Component = null;
713
1068
  this.Parameters = {};
714
1069
  this.onClose = new EventEmitter();
@@ -718,10 +1073,11 @@ class MagicOverlayContainerWrapper {
718
1073
  if (moduleRef == null) {
719
1074
  let lazyLoadModule = this.componentListMagicService.getLazyLoadModuleData(this.Parameters.MagicFormName);
720
1075
  if (lazyLoadModule != null) {
721
- this.loader
722
- .load(lazyLoadModule.modulePath + "#" + lazyLoadModule.moduleName)
723
- .then((moduleFactory) => {
724
- moduleRef = moduleFactory.create(this.injector);
1076
+ let moduleName = lazyLoadModule.moduleName.replace("Magic", "");
1077
+ moduleName = moduleName.replace("Module", "");
1078
+ this.magicLazyModuleLoader.Load(moduleName).then(m => {
1079
+ const compiled = this.compiler.compileModuleAndAllComponentsSync(m[lazyLoadModule.moduleName]);
1080
+ moduleRef = compiled.ngModuleFactory.create(this.injector);
725
1081
  this.loadComponent(moduleRef);
726
1082
  });
727
1083
  }
@@ -767,22 +1123,22 @@ MagicOverlayContainerWrapper.allowedBaseComps = new Map([
767
1123
  [OverlayType.Alert, { comp: BaseMagicAlertComponent, error: 'BaseMagicAlertComponent. Alert ' }],
768
1124
  [OverlayType.ConfirmationBox, { comp: BaseMagicConfirmComponent, error: 'BaseMagicConfirmComponent. Confirmation ' }]
769
1125
  ]);
770
- MagicOverlayContainerWrapper.ɵfac = function MagicOverlayContainerWrapper_Factory(t) { return new (t || MagicOverlayContainerWrapper)(ɵɵdirectiveInject(ComponentListMagicService), ɵɵdirectiveInject(NgModuleFactoryLoader), ɵɵdirectiveInject(Injector), ɵɵdirectiveInject(ComponentFactoryResolver), ɵɵdirectiveInject(ChangeDetectorRef)); };
771
- MagicOverlayContainerWrapper.ɵcmp = ɵɵdefineComponent({ type: MagicOverlayContainerWrapper, selectors: [["app-magic-overlay-container-wrapper"]], viewQuery: function MagicOverlayContainerWrapper_Query(rf, ctx) { if (rf & 1) {
772
- ɵɵstaticViewQuery(_c0$1, true);
1126
+ MagicOverlayContainerWrapper.ɵfac = function MagicOverlayContainerWrapper_Factory(t) { return new (t || MagicOverlayContainerWrapper)(i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(MagicLazyLoaderService), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.Compiler)); };
1127
+ MagicOverlayContainerWrapper.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContainerWrapper, selectors: [["app-magic-overlay-container-wrapper"]], viewQuery: function MagicOverlayContainerWrapper_Query(rf, ctx) { if (rf & 1) {
1128
+ i0.ɵɵviewQuery(_c0$2, 7);
773
1129
  } if (rf & 2) {
774
- var _t;
775
- ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.overlayContainerWrapperElementRef = _t.first);
1130
+ let _t;
1131
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.overlayContainerWrapperElementRef = _t.first);
776
1132
  } }, inputs: { Component: "Component", Parameters: "Parameters", OverlayTypeParam: "OverlayTypeParam" }, outputs: { onClose: "onClose" }, decls: 7, vars: 0, consts: [["tabIndex", "0", "magicFocus", "", 1, "overlay-container-wrapper-background", 2, "width", "0px", "height", "0px"], [1, "overlay-container-wrapper-background"], ["overlayContainerWrapper", ""], ["magicViewContainerRef", ""], ["overlayContent", ""], ["tabIndex", "0", 1, "overlay-container-wrapper-background", 2, "width", "0px", "height", "0px"]], template: function MagicOverlayContainerWrapper_Template(rf, ctx) { if (rf & 1) {
777
- ɵɵelementStart(0, "div");
778
- ɵɵelement(1, "div", 0);
779
- ɵɵelementStart(2, "div", 1, 2);
780
- ɵɵelement(4, "div", 3, 4);
781
- ɵɵelementEnd();
782
- ɵɵelement(6, "div", 5);
783
- ɵɵelementEnd();
784
- } }, directives: [MagicFocusDirective, MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%] {\n \n position: fixed;\n top: 0;\n z-index: 999;\n right: 0;\n bottom: 0;\n left: 0;\n }"] });
785
- (function () { ɵsetClassMetadata(MagicOverlayContainerWrapper, [{
1133
+ i0.ɵɵelementStart(0, "div");
1134
+ i0.ɵɵelement(1, "div", 0);
1135
+ i0.ɵɵelementStart(2, "div", 1, 2);
1136
+ i0.ɵɵelement(4, "div", 3, 4);
1137
+ i0.ɵɵelementEnd();
1138
+ i0.ɵɵelement(6, "div", 5);
1139
+ i0.ɵɵelementEnd();
1140
+ } }, directives: [MagicFocusDirective, MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%]{position:fixed;top:0;z-index:999;right:0;bottom:0;left:0}"] });
1141
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainerWrapper, [{
786
1142
  type: Component,
787
1143
  args: [{
788
1144
  selector: 'app-magic-overlay-container-wrapper',
@@ -808,7 +1164,7 @@ MagicOverlayContainerWrapper.ɵcmp = ɵɵdefineComponent({ type: MagicOverlayCon
808
1164
  }
809
1165
  `]
810
1166
  }]
811
- }], function () { return [{ type: ComponentListMagicService }, { type: NgModuleFactoryLoader }, { type: Injector }, { type: ComponentFactoryResolver }, { type: ChangeDetectorRef }]; }, { Component: [{
1167
+ }], function () { return [{ type: ComponentListMagicService }, { type: MagicLazyLoaderService }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }, { type: i0.ChangeDetectorRef }, { type: i0.Compiler }]; }, { Component: [{
812
1168
  type: Input
813
1169
  }], Parameters: [{
814
1170
  type: Input
@@ -823,30 +1179,29 @@ MagicOverlayContainerWrapper.ɵcmp = ɵɵdefineComponent({ type: MagicOverlayCon
823
1179
 
824
1180
  class MagicAlertComponent extends BaseMagicAlertComponent {
825
1181
  }
826
- MagicAlertComponent.ɵfac = function MagicAlertComponent_Factory(t) { return ɵMagicAlertComponent_BaseFactory(t || MagicAlertComponent); };
827
- MagicAlertComponent.ɵcmp = ɵɵdefineComponent({ type: MagicAlertComponent, selectors: [["sample-magic-alert-component"]], features: [ɵɵInheritDefinitionFeature], decls: 8, vars: 2, consts: [[1, "mg-message-background"], [3, "click"]], template: function MagicAlertComponent_Template(rf, ctx) { if (rf & 1) {
828
- ɵɵelementStart(0, "div");
829
- ɵɵelementStart(1, "div", 0);
830
- ɵɵelementStart(2, "h2");
831
- ɵɵtext(3);
832
- ɵɵelementEnd();
833
- ɵɵelementStart(4, "p");
834
- ɵɵtext(5);
835
- ɵɵelementEnd();
836
- ɵɵelementStart(6, "button", 1);
837
- ɵɵlistener("click", function MagicAlertComponent_Template_button_click_6_listener() { return ctx.OnClose(); });
838
- ɵɵtext(7, "OK");
839
- ɵɵelementEnd();
840
- ɵɵelementEnd();
841
- ɵɵelementEnd();
1182
+ MagicAlertComponent.ɵfac = function () { let ɵMagicAlertComponent_BaseFactory; return function MagicAlertComponent_Factory(t) { return (ɵMagicAlertComponent_BaseFactory || (ɵMagicAlertComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MagicAlertComponent)))(t || MagicAlertComponent); }; }();
1183
+ MagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicAlertComponent, selectors: [["sample-magic-alert-component"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 2, consts: [[1, "mg-message-background"], [3, "click"]], template: function MagicAlertComponent_Template(rf, ctx) { if (rf & 1) {
1184
+ i0.ɵɵelementStart(0, "div");
1185
+ i0.ɵɵelementStart(1, "div", 0);
1186
+ i0.ɵɵelementStart(2, "h2");
1187
+ i0.ɵɵtext(3);
1188
+ i0.ɵɵelementEnd();
1189
+ i0.ɵɵelementStart(4, "p");
1190
+ i0.ɵɵtext(5);
1191
+ i0.ɵɵelementEnd();
1192
+ i0.ɵɵelementStart(6, "button", 1);
1193
+ i0.ɵɵlistener("click", function MagicAlertComponent_Template_button_click_6_listener() { return ctx.OnClose(); });
1194
+ i0.ɵɵtext(7, "OK");
1195
+ i0.ɵɵelementEnd();
1196
+ i0.ɵɵelementEnd();
1197
+ i0.ɵɵelementEnd();
842
1198
  } if (rf & 2) {
843
- ɵɵadvance(3);
844
- ɵɵtextInterpolate1(" ", ctx.title, "");
845
- ɵɵadvance(2);
846
- ɵɵtextInterpolate1("", ctx.message, " ");
847
- } }, styles: [".mg-message-background[_ngcontent-%COMP%] {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button[_ngcontent-%COMP%] {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }"] });
848
- const ɵMagicAlertComponent_BaseFactory = ɵɵgetInheritedFactory(MagicAlertComponent);
849
- (function () { ɵsetClassMetadata(MagicAlertComponent, [{
1199
+ i0.ɵɵadvance(3);
1200
+ i0.ɵɵtextInterpolate1(" ", ctx.title, "");
1201
+ i0.ɵɵadvance(2);
1202
+ i0.ɵɵtextInterpolate1("", ctx.message, " ");
1203
+ } }, 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;border-radius:5px;padding:10px 32px;margin:26px 5px 0;cursor:pointer}"] });
1204
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicAlertComponent, [{
850
1205
  type: Component,
851
1206
  args: [{
852
1207
  selector: 'sample-magic-alert-component',
@@ -892,34 +1247,33 @@ const ɵMagicAlertComponent_BaseFactory = ɵɵgetInheritedFactory(MagicAlertComp
892
1247
 
893
1248
  class MagicConfirmationBoxComponent extends BaseMagicConfirmComponent {
894
1249
  }
895
- MagicConfirmationBoxComponent.ɵfac = function MagicConfirmationBoxComponent_Factory(t) { return ɵMagicConfirmationBoxComponent_BaseFactory(t || MagicConfirmationBoxComponent); };
896
- MagicConfirmationBoxComponent.ɵcmp = ɵɵdefineComponent({ type: MagicConfirmationBoxComponent, selectors: [["sample-magic-confirmation-box"]], features: [ɵɵInheritDefinitionFeature], decls: 11, vars: 2, consts: [[1, "mg-message-background"], [3, "click"], [1, "cancel", 3, "click"]], template: function MagicConfirmationBoxComponent_Template(rf, ctx) { if (rf & 1) {
897
- ɵɵelementStart(0, "div");
898
- ɵɵelementStart(1, "div", 0);
899
- ɵɵelementStart(2, "h2");
900
- ɵɵtext(3);
901
- ɵɵelementEnd();
902
- ɵɵtext(4);
903
- ɵɵelement(5, "br");
904
- ɵɵelement(6, "br");
905
- ɵɵelementStart(7, "button", 1);
906
- ɵɵlistener("click", function MagicConfirmationBoxComponent_Template_button_click_7_listener() { return ctx.OnClose(true); });
907
- ɵɵtext(8, "OK");
908
- ɵɵelementEnd();
909
- ɵɵelementStart(9, "button", 2);
910
- ɵɵlistener("click", function MagicConfirmationBoxComponent_Template_button_click_9_listener() { return ctx.OnClose(false); });
911
- ɵɵtext(10, "Cancel");
912
- ɵɵelementEnd();
913
- ɵɵelementEnd();
914
- ɵɵelementEnd();
1250
+ MagicConfirmationBoxComponent.ɵfac = function () { let ɵMagicConfirmationBoxComponent_BaseFactory; return function MagicConfirmationBoxComponent_Factory(t) { return (ɵMagicConfirmationBoxComponent_BaseFactory || (ɵMagicConfirmationBoxComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MagicConfirmationBoxComponent)))(t || MagicConfirmationBoxComponent); }; }();
1251
+ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfirmationBoxComponent, selectors: [["sample-magic-confirmation-box"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 2, consts: [[1, "mg-message-background"], [3, "click"], [1, "cancel", 3, "click"]], template: function MagicConfirmationBoxComponent_Template(rf, ctx) { if (rf & 1) {
1252
+ i0.ɵɵelementStart(0, "div");
1253
+ i0.ɵɵelementStart(1, "div", 0);
1254
+ i0.ɵɵelementStart(2, "h2");
1255
+ i0.ɵɵtext(3);
1256
+ i0.ɵɵelementEnd();
1257
+ i0.ɵɵtext(4);
1258
+ i0.ɵɵelement(5, "br");
1259
+ i0.ɵɵelement(6, "br");
1260
+ i0.ɵɵelementStart(7, "button", 1);
1261
+ i0.ɵɵlistener("click", function MagicConfirmationBoxComponent_Template_button_click_7_listener() { return ctx.OnClose(true); });
1262
+ i0.ɵɵtext(8, "OK");
1263
+ i0.ɵɵelementEnd();
1264
+ i0.ɵɵelementStart(9, "button", 2);
1265
+ i0.ɵɵlistener("click", function MagicConfirmationBoxComponent_Template_button_click_9_listener() { return ctx.OnClose(false); });
1266
+ i0.ɵɵtext(10, "Cancel");
1267
+ i0.ɵɵelementEnd();
1268
+ i0.ɵɵelementEnd();
1269
+ i0.ɵɵelementEnd();
915
1270
  } if (rf & 2) {
916
- ɵɵadvance(3);
917
- ɵɵtextInterpolate1(" ", ctx.title, "");
918
- ɵɵadvance(1);
919
- ɵɵtextInterpolate1(" ", ctx.message, " ");
920
- } }, styles: [".mg-message-background[_ngcontent-%COMP%] {\n background-color: #F5F5F5;\n text-align: center;\n width: 40%;\n font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n padding: 17px;\n border-radius: 5px;\n text-align: center;\n margin-top: 10% ;\n margin-left: auto;\n margin-right: auto;\n border: 1px solid gray;\n }\n\n button[_ngcontent-%COMP%] {\n background-color: #8CD4F5;\n color: white;\n border: none;\n box-shadow: none;\n font-size: 17px;\n font-weight: 500;\n -webkit-border-radius: 4px;\n border-radius: 5px;\n padding: 10px 32px;\n margin: 26px 5px 0 5px;\n cursor: pointer;\n }\n \n button.cancel[_ngcontent-%COMP%] {\n background-color: #C1C1C1;\n }"] });
921
- const ɵMagicConfirmationBoxComponent_BaseFactory = ɵɵgetInheritedFactory(MagicConfirmationBoxComponent);
922
- (function () { ɵsetClassMetadata(MagicConfirmationBoxComponent, [{
1271
+ i0.ɵɵadvance(3);
1272
+ i0.ɵɵtextInterpolate1(" ", ctx.title, "");
1273
+ i0.ɵɵadvance(1);
1274
+ i0.ɵɵtextInterpolate1(" ", ctx.message, " ");
1275
+ } }, 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;border-radius:5px;padding:10px 32px;margin:26px 5px 0;cursor:pointer}button.cancel[_ngcontent-%COMP%]{background-color:#c1c1c1}"] });
1276
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicConfirmationBoxComponent, [{
923
1277
  type: Component,
924
1278
  args: [{
925
1279
  selector: 'sample-magic-confirmation-box',
@@ -982,8 +1336,8 @@ class ConfirmationComponentsMagicProvider {
982
1336
  }
983
1337
  }
984
1338
  ConfirmationComponentsMagicProvider.ɵfac = function ConfirmationComponentsMagicProvider_Factory(t) { return new (t || ConfirmationComponentsMagicProvider)(); };
985
- ConfirmationComponentsMagicProvider.ɵprov = ɵɵdefineInjectable({ token: ConfirmationComponentsMagicProvider, factory: ConfirmationComponentsMagicProvider.ɵfac });
986
- (function () { ɵsetClassMetadata(ConfirmationComponentsMagicProvider, [{
1339
+ ConfirmationComponentsMagicProvider.ɵprov = i0.ɵɵdefineInjectable({ token: ConfirmationComponentsMagicProvider, factory: ConfirmationComponentsMagicProvider.ɵfac });
1340
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConfirmationComponentsMagicProvider, [{
987
1341
  type: Injectable
988
1342
  }], null, null); })();
989
1343
 
@@ -1096,11 +1450,14 @@ class OverlayWindowService {
1096
1450
  return componentRef;
1097
1451
  }
1098
1452
  }
1099
- OverlayWindowService.ɵfac = function OverlayWindowService_Factory(t) { return new (t || OverlayWindowService)(ɵɵinject(ComponentFactoryResolver), ɵɵinject(ComponentListMagicService), ɵɵinject(EngineMagicService), ɵɵinject(OverlayContainerMagicProvider), ɵɵinject(ConfirmationComponentsMagicProvider)); };
1100
- OverlayWindowService.ɵprov = ɵɵdefineInjectable({ token: OverlayWindowService, factory: OverlayWindowService.ɵfac });
1101
- (function () { ɵsetClassMetadata(OverlayWindowService, [{
1102
- type: Injectable
1103
- }], function () { return [{ type: ComponentFactoryResolver }, { type: ComponentListMagicService }, { type: EngineMagicService }, { type: OverlayContainerMagicProvider }, { type: ConfirmationComponentsMagicProvider }]; }, null); })();
1453
+ OverlayWindowService.ɵfac = function OverlayWindowService_Factory(t) { return new (t || OverlayWindowService)(i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(OverlayContainerMagicProvider), i0.ɵɵinject(ConfirmationComponentsMagicProvider)); };
1454
+ OverlayWindowService.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayWindowService, factory: OverlayWindowService.ɵfac, providedIn: 'root' });
1455
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayWindowService, [{
1456
+ type: Injectable,
1457
+ args: [{
1458
+ providedIn: 'root'
1459
+ }]
1460
+ }], function () { return [{ type: i0.ComponentFactoryResolver }, { type: ComponentListMagicService }, { type: EngineMagicService }, { type: OverlayContainerMagicProvider }, { type: ConfirmationComponentsMagicProvider }]; }, null); })();
1104
1461
  class OverlayWindowFocusManager {
1105
1462
  constructor(rootMagicElement) {
1106
1463
  this.rootMagicElement = null;
@@ -1530,6 +1887,7 @@ class TaskMagicService {
1530
1887
  control.setValidators([control.validator, this.customValidator(guiRowId.toString(), controlId)]);
1531
1888
  else
1532
1889
  control.setValidators(this.customValidator(guiRowId.toString(), controlId));
1890
+ control.updateValueAndValidity();
1533
1891
  }
1534
1892
  }
1535
1893
  break;
@@ -1542,7 +1900,7 @@ class TaskMagicService {
1542
1900
  properties.setStyle(command.Operation, command.obj1);
1543
1901
  break;
1544
1902
  case CommandType.SET_ATTRIBUTE:
1545
- properties = this.Records.list[guiRowId].getControlMetadata(controlId);
1903
+ properties = this.Records.list[0].getControlMetadata(controlId);
1546
1904
  properties.dataType = String.fromCharCode(command.number);
1547
1905
  break;
1548
1906
  case CommandType.SET_VALUE:
@@ -1717,306 +2075,100 @@ class TaskMagicService {
1717
2075
  guiEvent.Value = event.value;
1718
2076
  }
1719
2077
  this.insertEvent(guiEvent);
1720
- }
1721
- onListBoxSelectionChanged(event, idx) {
1722
- let guiEvent = getGuiEventObj('selectionchanged', idx, 0);
1723
- let selectedOptions;
1724
- if (!isNullOrUndefined(event.target))
1725
- selectedOptions = event.target.selectedOptions;
1726
- else
1727
- selectedOptions = event.source.selectedOptions.selected;
1728
- let length = selectedOptions.length;
1729
- let indexes = new Array(length);
1730
- for (let i = 0; i < length; i++) {
1731
- if (!isNullOrUndefined(event.target))
1732
- indexes[i] = (selectedOptions[i]).index;
1733
- else
1734
- indexes[i] = (selectedOptions[i]).value;
1735
- }
1736
- guiEvent.Value = indexes;
1737
- this.insertEvent(guiEvent);
1738
- }
1739
- onCheckChanged(event, idx, rowId) {
1740
- if (typeof rowId === 'undefined')
1741
- rowId = 0;
1742
- let guiEvent = getGuiEventObj('selectionchanged', idx, rowId);
1743
- if (typeof (event) == 'boolean') {
1744
- guiEvent.Value = event;
1745
- }
1746
- else {
1747
- if (typeof event.target === 'undefined')
1748
- guiEvent.Value = (event).checked;
1749
- else
1750
- guiEvent.Value = (event.target).checked;
1751
- }
1752
- this.insertEvent(guiEvent);
1753
- }
1754
- mgOnTabSelectionChanged(idx, layer) {
1755
- let guiEvent = getGuiEventObj('selectionchanged', idx, 0);
1756
- guiEvent.Value = layer.toString();
1757
- this.insertEvent(guiEvent);
1758
- }
1759
- mgOnRadioSelectionChanged(event, idx) {
1760
- let result = this.getFormControl('0', idx);
1761
- let guiEvent = getGuiEventObj('selectionchanged', idx, 0);
1762
- if (typeof result.value !== 'string')
1763
- guiEvent.Value = result.value.index;
1764
- else
1765
- guiEvent.Value = result.value;
1766
- this.insertEvent(guiEvent);
1767
- }
1768
- close() {
1769
- this.insertEvent(getGuiEventObj('close', null, 0));
1770
- }
1771
- IsStub() {
1772
- return this.magic.isStub;
1773
- }
1774
- saveData(data) {
1775
- this.magic.saveData(data);
1776
- }
1777
- createData() {
1778
- let myData = {
1779
- records: this.Records,
1780
- template: this.template
1781
- };
1782
- let text = 'loadData():any {\n' +
1783
- ' let stubData = ' + JSON.stringify(myData) + ';\n' +
1784
- ' this.loadStubData(stubData);}';
1785
- console.log(text);
1786
- this.saveData(text);
1787
- }
1788
- loadStubData(stubData) {
1789
- this.Records = stubData.records;
1790
- this.settemplate(stubData.template);
1791
- this.taskId = '1';
1792
- for (let i = 0; i < this.Records.list.length; i++)
1793
- this.buildTableRowControls(i);
1794
- }
1795
- loadData() {
1796
- alert('Please, overwrite method loadData');
1797
- }
1798
- setStubValue(guiRowId, fc, name) {
1799
- if (this.IsStub()) {
1800
- try {
1801
- let val = this.Records.list[guiRowId].values[name];
1802
- fc.setValue(val);
1803
- }
1804
- catch (e) {
1805
- }
1806
- }
1807
- }
1808
- }
1809
- TaskMagicService.ɵfac = function TaskMagicService_Factory(t) { return new (t || TaskMagicService)(ɵɵinject(EngineMagicService), ɵɵinject(OverlayWindowService)); };
1810
- TaskMagicService.ɵprov = ɵɵdefineInjectable({ token: TaskMagicService, factory: TaskMagicService.ɵfac });
1811
- (function () { ɵsetClassMetadata(TaskMagicService, [{
1812
- type: Injectable
1813
- }], function () { return [{ type: EngineMagicService }, { type: OverlayWindowService }]; }, null); })();
1814
-
1815
- class CommandsCollectorMagicService {
1816
- constructor(magic) {
1817
- this.magic = magic;
1818
- this.count = 0;
1819
- this.commands = new List();
1820
- this.subscription = null;
1821
- }
1822
- startCollecting() {
1823
- this.count++;
1824
- Logger.Instance.WriteDevToLog("CommandsCollectorMagicService.startCollecting() --- " + this.count);
1825
- if (this.subscription === null) {
1826
- this.subscription = this.magic.refreshDom
1827
- .subscribe(command => {
1828
- this.commands.push(command);
1829
- });
1830
- }
1831
- }
1832
- stopCollecting() {
1833
- this.count--;
1834
- Logger.Instance.WriteDevToLog("CommandsCollectorMagicService.stopCollecting() --- " + this.count);
1835
- if (this.count === 0) {
1836
- this.subscription.unsubscribe();
1837
- this.subscription = null;
1838
- }
1839
- }
1840
- GetCommands(taskId) {
1841
- const commands = this.commands.filter((command) => command.TaskTag === taskId);
1842
- commands.forEach(command => { this.commands.Remove(command); });
1843
- return commands;
1844
- }
1845
- }
1846
- CommandsCollectorMagicService.ɵfac = function CommandsCollectorMagicService_Factory(t) { return new (t || CommandsCollectorMagicService)(ɵɵinject(EngineMagicService)); };
1847
- CommandsCollectorMagicService.ɵprov = ɵɵdefineInjectable({ token: CommandsCollectorMagicService, factory: CommandsCollectorMagicService.ɵfac });
1848
- (function () { ɵsetClassMetadata(CommandsCollectorMagicService, [{
1849
- type: Injectable
1850
- }], function () { return [{ type: EngineMagicService }]; }, null); })();
1851
-
1852
- class RouteCommand {
1853
- }
1854
- class RouterCommandsMagicService {
1855
- constructor() {
1856
- this.pendingRouteCommands = [];
1857
- }
1858
- AddRouteCommand(routeCommand) {
1859
- this.pendingRouteCommands.push(routeCommand);
1860
- }
1861
- ExecuteNextCommand() {
1862
- let pendingRouteCommand = this.pendingRouteCommands.shift();
1863
- if (!isNullOrUndefined(pendingRouteCommand)) {
1864
- pendingRouteCommand.callerMgSubformServiceRef.ExecuteRouteCommand(pendingRouteCommand);
1865
- }
1866
- }
1867
- }
1868
- RouterCommandsMagicService.ɵfac = function RouterCommandsMagicService_Factory(t) { return new (t || RouterCommandsMagicService)(); };
1869
- RouterCommandsMagicService.ɵprov = ɵɵdefineInjectable({ token: RouterCommandsMagicService, factory: RouterCommandsMagicService.ɵfac });
1870
- (function () { ɵsetClassMetadata(RouterCommandsMagicService, [{
1871
- type: Injectable
1872
- }], null, null); })();
1873
-
1874
- class SubformMagicService {
1875
- constructor(task, activatedRoute, componentList, pendingCommandsCollector, router, routerCommandsMagicService) {
1876
- this.task = task;
1877
- this.activatedRoute = activatedRoute;
1878
- this.componentList = componentList;
1879
- this.pendingCommandsCollector = pendingCommandsCollector;
1880
- this.router = router;
1881
- this.routerCommandsMagicService = routerCommandsMagicService;
1882
- this.subformsDict = {};
1883
- this.routesDict = {};
1884
- this.currentRouteDefinition = null;
1885
- }
1886
- mgGetComp(subformName) {
1887
- if (subformName in this.subformsDict) {
1888
- let formName = this.subformsDict[subformName].formName;
1889
- if (formName)
1890
- return this.componentList.getComponent(formName);
1891
- }
1892
- return null;
1893
- }
1894
- mgGetParameters(subformName) {
1895
- if (subformName in this.subformsDict) {
1896
- return this.subformsDict[subformName].parameters;
1897
- }
1898
- else
1899
- return "";
1900
- }
1901
- deleteSubformComp(subformControlName, formName) {
1902
- if (Object.keys(this.subformsDict).indexOf(subformControlName) >= 0) {
1903
- if (this.subformsDict[subformControlName].formName === formName) {
1904
- this.subformsDict[subformControlName] = {};
1905
- this.task.refreshView();
1906
- }
1907
- }
1908
- }
1909
- addSubformComp(subformControlName, formName, taskId, taskDescription, routerPath, params, inDefaultOutlet) {
1910
- this.pendingCommandsCollector.startCollecting();
1911
- let refreshNeeded = false;
1912
- if (isNullOrUndefined(routerPath)) {
1913
- if (Object.keys(this.subformsDict).indexOf(subformControlName) >= 0) {
1914
- if (this.subformsDict[subformControlName].formName === formName) {
1915
- this.subformsDict[subformControlName] = {};
1916
- this.task.refreshView();
1917
- }
1918
- }
1919
- this.subformsDict[subformControlName] = {
1920
- formName,
1921
- parameters: { taskIdParam: taskId, taskDescription: taskDescription }
1922
- };
1923
- refreshNeeded = true;
1924
- }
1925
- else {
1926
- if (inDefaultOutlet)
1927
- subformControlName = "primary";
1928
- let routeParams = new List();
1929
- routeParams.push(routerPath);
1930
- if (params !== null) {
1931
- routeParams = routeParams.concat(params);
1932
- }
1933
- let routeCommand = {
1934
- callerMgSubformServiceRef: this,
1935
- routerOutletName: subformControlName,
1936
- formName: formName,
1937
- parameters: { taskIdParam: taskId, taskDescription: taskDescription },
1938
- routeParams: routeParams
1939
- };
1940
- if (SubformMagicService.currentCallerMgSubformServiceRef === null)
1941
- this.ExecuteRouteCommand(routeCommand);
2078
+ }
2079
+ onListBoxSelectionChanged(event, idx) {
2080
+ let guiEvent = getGuiEventObj('selectionchanged', idx, 0);
2081
+ let selectedOptions;
2082
+ if (!isNullOrUndefined(event.target))
2083
+ selectedOptions = event.target.selectedOptions;
2084
+ else
2085
+ selectedOptions = event.source.selectedOptions.selected;
2086
+ let length = selectedOptions.length;
2087
+ let indexes = new Array(length);
2088
+ for (let i = 0; i < length; i++) {
2089
+ if (!isNullOrUndefined(event.target))
2090
+ indexes[i] = (selectedOptions[i]).index;
1942
2091
  else
1943
- this.routerCommandsMagicService.AddRouteCommand(routeCommand);
2092
+ indexes[i] = (selectedOptions[i]).value;
1944
2093
  }
1945
- if (refreshNeeded)
1946
- this.task.refreshView();
2094
+ guiEvent.Value = indexes;
2095
+ this.insertEvent(guiEvent);
1947
2096
  }
1948
- ExecuteRouteCommand(routeCommand) {
1949
- let reusingComponent = false;
1950
- let currentSubformMagicService = routeCommand.callerMgSubformServiceRef;
1951
- let relativeRoute = SubformMagicService.getRelativeRoute(currentSubformMagicService.activatedRoute);
1952
- if (currentSubformMagicService.routesDict[routeCommand.routerOutletName] === routeCommand.routeParams[0]) {
1953
- currentSubformMagicService.router.navigate([{ outlets: { [routeCommand.routerOutletName]: null } }], { relativeTo: relativeRoute })
1954
- .then((result) => {
1955
- SubformMagicService.currentCallerMgSubformServiceRef = currentSubformMagicService;
1956
- currentSubformMagicService.currentRouteDefinition = {
1957
- formName: routeCommand.formName,
1958
- parameters: routeCommand.parameters
1959
- };
1960
- currentSubformMagicService.PerformRouterNavigate(routeCommand.routerOutletName, routeCommand.routeParams);
1961
- });
2097
+ onCheckChanged(event, idx, rowId) {
2098
+ if (typeof rowId === 'undefined')
2099
+ rowId = 0;
2100
+ let guiEvent = getGuiEventObj('selectionchanged', idx, rowId);
2101
+ if (typeof (event) == 'boolean') {
2102
+ guiEvent.Value = event;
1962
2103
  }
1963
2104
  else {
1964
- SubformMagicService.currentCallerMgSubformServiceRef = currentSubformMagicService;
1965
- currentSubformMagicService.currentRouteDefinition = {
1966
- formName: routeCommand.formName,
1967
- parameters: routeCommand.parameters
1968
- };
1969
- if (SubformMagicService.routerContainers.length > 0) {
1970
- let routeContainer = SubformMagicService.routerContainers[0];
1971
- SubformMagicService.routerContainers.shift();
1972
- routeContainer.initializeComponent();
1973
- }
1974
- else {
1975
- currentSubformMagicService.PerformRouterNavigate(routeCommand.routerOutletName, routeCommand.routeParams);
1976
- }
2105
+ if (typeof event.target === 'undefined')
2106
+ guiEvent.Value = (event).checked;
2107
+ else
2108
+ guiEvent.Value = (event.target).checked;
1977
2109
  }
2110
+ this.insertEvent(guiEvent);
1978
2111
  }
1979
- PerformRouterNavigate(routerOutletName, routeParams) {
1980
- let relativeRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
1981
- this.router.navigate([{ outlets: { [routerOutletName]: routeParams } }], { relativeTo: relativeRoute })
1982
- .then((result) => {
1983
- if (result !== null && !result) {
1984
- let subformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;
1985
- subformMagicService.currentRouteDefinition = null;
1986
- SubformMagicService.currentCallerMgSubformServiceRef = null;
1987
- subformMagicService.pendingCommandsCollector.stopCollecting();
1988
- subformMagicService.routerCommandsMagicService.ExecuteNextCommand();
1989
- }
1990
- });
2112
+ mgOnTabSelectionChanged(idx, layer) {
2113
+ let guiEvent = getGuiEventObj('selectionchanged', idx, 0);
2114
+ guiEvent.Value = layer.toString();
2115
+ this.insertEvent(guiEvent);
1991
2116
  }
1992
- init() {
1993
- const pendingCommands = this.pendingCommandsCollector.GetCommands(this.task.taskId);
1994
- if (pendingCommands.length > 0) {
1995
- pendingCommands.forEach(command => { this.task.executeCommand(command); });
1996
- this.task.refreshView();
1997
- }
1998
- this.pendingCommandsCollector.stopCollecting();
2117
+ mgOnRadioSelectionChanged(event, idx) {
2118
+ let result = this.getFormControl('0', idx);
2119
+ let guiEvent = getGuiEventObj('selectionchanged', idx, 0);
2120
+ if (typeof result.value !== 'string')
2121
+ guiEvent.Value = result.value.index;
2122
+ else
2123
+ guiEvent.Value = result.value;
2124
+ this.insertEvent(guiEvent);
1999
2125
  }
2000
- refreshView() {
2001
- this.task.refreshView();
2126
+ close() {
2127
+ this.insertEvent(getGuiEventObj('close', null, 0));
2002
2128
  }
2003
- static getRelativeRoute(sendActivatedRoute) {
2004
- let currentActiveRoute = sendActivatedRoute;
2005
- if (currentActiveRoute.snapshot.routeConfig !== null && currentActiveRoute.snapshot.routeConfig.path === '') {
2006
- currentActiveRoute = currentActiveRoute.parent;
2007
- if (!currentActiveRoute.snapshot.routeConfig.loadChildren)
2008
- console.log("getRelativeRoute(): both path and currentActiveRoute.snapshot.routeConfig.loadChildren are empty.");
2129
+ IsStub() {
2130
+ return this.magic.isStub;
2131
+ }
2132
+ saveData(data) {
2133
+ this.magic.saveData(data);
2134
+ }
2135
+ createData() {
2136
+ let myData = {
2137
+ records: this.Records,
2138
+ template: this.template
2139
+ };
2140
+ let text = 'loadData():any {\n' +
2141
+ ' let stubData = ' + JSON.stringify(myData) + ';\n' +
2142
+ ' this.loadStubData(stubData);}';
2143
+ console.log(text);
2144
+ this.saveData(text);
2145
+ }
2146
+ loadStubData(stubData) {
2147
+ this.Records = stubData.records;
2148
+ this.settemplate(stubData.template);
2149
+ this.taskId = '1';
2150
+ for (let i = 0; i < this.Records.list.length; i++)
2151
+ this.buildTableRowControls(i);
2152
+ }
2153
+ loadData() {
2154
+ alert('Please, overwrite method loadData');
2155
+ }
2156
+ setStubValue(guiRowId, fc, name) {
2157
+ if (this.IsStub()) {
2158
+ try {
2159
+ let val = this.Records.list[guiRowId].values[name];
2160
+ fc.setValue(val);
2161
+ }
2162
+ catch (e) {
2163
+ }
2009
2164
  }
2010
- return currentActiveRoute;
2011
2165
  }
2012
2166
  }
2013
- SubformMagicService.currentCallerMgSubformServiceRef = null;
2014
- SubformMagicService.routerContainers = new Array();
2015
- SubformMagicService.ɵfac = function SubformMagicService_Factory(t) { return new (t || SubformMagicService)(ɵɵinject(TaskMagicService), ɵɵinject(ActivatedRoute), ɵɵinject(ComponentListMagicService), ɵɵinject(CommandsCollectorMagicService), ɵɵinject(Router), ɵɵinject(RouterCommandsMagicService)); };
2016
- SubformMagicService.ɵprov = ɵɵdefineInjectable({ token: SubformMagicService, factory: SubformMagicService.ɵfac });
2017
- (function () { ɵsetClassMetadata(SubformMagicService, [{
2167
+ TaskMagicService.ɵfac = function TaskMagicService_Factory(t) { return new (t || TaskMagicService)(i0.ɵɵinject(EngineMagicService), i0.ɵɵinject(OverlayWindowService)); };
2168
+ TaskMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TaskMagicService, factory: TaskMagicService.ɵfac });
2169
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TaskMagicService, [{
2018
2170
  type: Injectable
2019
- }], function () { return [{ type: TaskMagicService }, { type: ActivatedRoute }, { type: ComponentListMagicService }, { type: CommandsCollectorMagicService }, { type: Router }, { type: RouterCommandsMagicService }]; }, null); })();
2171
+ }], function () { return [{ type: EngineMagicService }, { type: OverlayWindowService }]; }, null); })();
2020
2172
 
2021
2173
  class TableMagicService {
2022
2174
  constructor(componentList, task) {
@@ -2080,9 +2232,9 @@ class TableMagicService {
2080
2232
  return topIndex;
2081
2233
  }
2082
2234
  }
2083
- TableMagicService.ɵfac = function TableMagicService_Factory(t) { return new (t || TableMagicService)(ɵɵinject(ComponentListMagicService), ɵɵinject(TaskMagicService)); };
2084
- TableMagicService.ɵprov = ɵɵdefineInjectable({ token: TableMagicService, factory: TableMagicService.ɵfac });
2085
- (function () { ɵsetClassMetadata(TableMagicService, [{
2235
+ TableMagicService.ɵfac = function TableMagicService_Factory(t) { return new (t || TableMagicService)(i0.ɵɵinject(ComponentListMagicService), i0.ɵɵinject(TaskMagicService)); };
2236
+ TableMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TableMagicService, factory: TableMagicService.ɵfac });
2237
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableMagicService, [{
2086
2238
  type: Injectable
2087
2239
  }], function () { return [{ type: ComponentListMagicService }, { type: TaskMagicService }]; }, null); })();
2088
2240
 
@@ -2094,11 +2246,11 @@ class TitleMagicService {
2094
2246
  this.titleService.setTitle(newTitle);
2095
2247
  }
2096
2248
  }
2097
- TitleMagicService.ɵfac = function TitleMagicService_Factory(t) { return new (t || TitleMagicService)(ɵɵinject(Title)); };
2098
- TitleMagicService.ɵprov = ɵɵdefineInjectable({ token: TitleMagicService, factory: TitleMagicService.ɵfac });
2099
- (function () { ɵsetClassMetadata(TitleMagicService, [{
2249
+ TitleMagicService.ɵfac = function TitleMagicService_Factory(t) { return new (t || TitleMagicService)(i0.ɵɵinject(i1$1.Title)); };
2250
+ TitleMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TitleMagicService, factory: TitleMagicService.ɵfac });
2251
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TitleMagicService, [{
2100
2252
  type: Injectable
2101
- }], function () { return [{ type: Title }]; }, null); })();
2253
+ }], function () { return [{ type: i1$1.Title }]; }, null); })();
2102
2254
 
2103
2255
  class AccessorMagicService {
2104
2256
  constructor(task) {
@@ -2246,6 +2398,18 @@ class AccessorMagicService {
2246
2398
  getItemListValues(id, rowId) {
2247
2399
  return this.getProperty(id, HtmlProperties.ItemsList, rowId);
2248
2400
  }
2401
+ getFilteredList(controlId, rowId) {
2402
+ if (isNullOrUndefined(rowId))
2403
+ rowId = '0';
2404
+ let items = this.getItemListValues(controlId, rowId);
2405
+ let value = this.task.getFormControl(rowId, controlId).value;
2406
+ if (value !== null && value !== "" && items instanceof Array) {
2407
+ value = value.toLowerCase();
2408
+ return items.filter(option => option.displayValue.toLowerCase().includes(value));
2409
+ }
2410
+ else
2411
+ return items;
2412
+ }
2249
2413
  getDisplayValue(id, rowId) {
2250
2414
  let displayValue = "";
2251
2415
  let o = this.getProperty(id, HtmlProperties.ItemsList, rowId);
@@ -2376,9 +2540,9 @@ class AccessorMagicService {
2376
2540
  return CookieService.deleteCookie(name);
2377
2541
  }
2378
2542
  }
2379
- AccessorMagicService.ɵfac = function AccessorMagicService_Factory(t) { return new (t || AccessorMagicService)(ɵɵinject(TaskMagicService)); };
2380
- AccessorMagicService.ɵprov = ɵɵdefineInjectable({ token: AccessorMagicService, factory: AccessorMagicService.ɵfac });
2381
- (function () { ɵsetClassMetadata(AccessorMagicService, [{
2543
+ AccessorMagicService.ɵfac = function AccessorMagicService_Factory(t) { return new (t || AccessorMagicService)(i0.ɵɵinject(TaskMagicService)); };
2544
+ AccessorMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: AccessorMagicService, factory: AccessorMagicService.ɵfac });
2545
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AccessorMagicService, [{
2382
2546
  type: Injectable
2383
2547
  }], function () { return [{ type: TaskMagicService }]; }, null); })();
2384
2548
 
@@ -2395,9 +2559,9 @@ class MagicServices {
2395
2559
  task.mgAccessorService = mgAccessorService;
2396
2560
  }
2397
2561
  }
2398
- MagicServices.ɵfac = function MagicServices_Factory(t) { return new (t || MagicServices)(ɵɵinject(TaskMagicService), ɵɵinject(SubformMagicService), ɵɵinject(TableMagicService), ɵɵinject(TitleMagicService), ɵɵinject(AccessorMagicService)); };
2399
- MagicServices.ɵprov = ɵɵdefineInjectable({ token: MagicServices, factory: MagicServices.ɵfac });
2400
- (function () { ɵsetClassMetadata(MagicServices, [{
2562
+ MagicServices.ɵfac = function MagicServices_Factory(t) { return new (t || MagicServices)(i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(SubformMagicService), i0.ɵɵinject(TableMagicService), i0.ɵɵinject(TitleMagicService), i0.ɵɵinject(AccessorMagicService)); };
2563
+ MagicServices.ɵprov = i0.ɵɵdefineInjectable({ token: MagicServices, factory: MagicServices.ɵfac });
2564
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicServices, [{
2401
2565
  type: Injectable
2402
2566
  }], function () { return [{ type: TaskMagicService }, { type: SubformMagicService }, { type: TableMagicService }, { type: TitleMagicService }, { type: AccessorMagicService }]; }, null); })();
2403
2567
 
@@ -2458,16 +2622,16 @@ class TaskBaseMagicComponent {
2458
2622
  this.task.dispose();
2459
2623
  }
2460
2624
  }
2461
- TaskBaseMagicComponent.ɵfac = function TaskBaseMagicComponent_Factory(t) { return new (t || TaskBaseMagicComponent)(ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(MagicServices)); };
2462
- TaskBaseMagicComponent.ɵcmp = ɵɵdefineComponent({ type: TaskBaseMagicComponent, selectors: [["task-magic"]], inputs: { taskIdParam: "taskIdParam", taskDescription: "taskDescription" }, features: [ɵɵProvidersFeature([TaskMagicService, SubformMagicService, TableMagicService])], decls: 0, vars: 0, template: function TaskBaseMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
2463
- (function () { ɵsetClassMetadata(TaskBaseMagicComponent, [{
2625
+ TaskBaseMagicComponent.ɵfac = function TaskBaseMagicComponent_Factory(t) { return new (t || TaskBaseMagicComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(MagicServices)); };
2626
+ TaskBaseMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: TaskBaseMagicComponent, selectors: [["task-magic"]], inputs: { taskIdParam: "taskIdParam", taskDescription: "taskDescription" }, features: [i0.ɵɵProvidersFeature([TaskMagicService, SubformMagicService, TableMagicService])], decls: 0, vars: 0, template: function TaskBaseMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
2627
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TaskBaseMagicComponent, [{
2464
2628
  type: Component,
2465
2629
  args: [{
2466
2630
  selector: 'task-magic',
2467
2631
  providers: [TaskMagicService, SubformMagicService, TableMagicService],
2468
2632
  template: ''
2469
2633
  }]
2470
- }], function () { return [{ type: ChangeDetectorRef }, { type: MagicServices }]; }, { taskIdParam: [{
2634
+ }], function () { return [{ type: i0.ChangeDetectorRef }, { type: MagicServices }]; }, { taskIdParam: [{
2471
2635
  type: Input
2472
2636
  }], taskDescription: [{
2473
2637
  type: Input
@@ -2502,20 +2666,21 @@ class RowMagicDirective {
2502
2666
  onClick($event) {
2503
2667
  if (this.rowId != '') {
2504
2668
  this._task.insertEvent(getGuiEventObj('click', "magicRow", +this.rowId));
2505
- event.cancelBubble = true;
2669
+ if (MagicDirective.noOfAutoCompleteBoxesOpened < 1)
2670
+ event.cancelBubble = true;
2506
2671
  }
2507
2672
  }
2508
2673
  }
2509
- RowMagicDirective.ɵfac = function RowMagicDirective_Factory(t) { return new (t || RowMagicDirective)(ɵɵdirectiveInject(TaskMagicService), ɵɵdirectiveInject(ElementRef)); };
2510
- RowMagicDirective.ɵdir = ɵɵdefineDirective({ type: RowMagicDirective, selectors: [["", "magicRow", ""]], hostBindings: function RowMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
2511
- ɵɵlistener("click", function RowMagicDirective_click_HostBindingHandler($event) { return ctx.onClick($event); });
2674
+ RowMagicDirective.ɵfac = function RowMagicDirective_Factory(t) { return new (t || RowMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef)); };
2675
+ RowMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RowMagicDirective, selectors: [["", "magicRow", ""]], hostBindings: function RowMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
2676
+ i0.ɵɵlistener("click", function RowMagicDirective_click_HostBindingHandler($event) { return ctx.onClick($event); });
2512
2677
  } }, inputs: { rowId: ["magicRow", "rowId"] } });
2513
- (function () { ɵsetClassMetadata(RowMagicDirective, [{
2678
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RowMagicDirective, [{
2514
2679
  type: Directive,
2515
2680
  args: [{
2516
2681
  selector: '[magicRow]'
2517
2682
  }]
2518
- }], function () { return [{ type: TaskMagicService }, { type: ElementRef }]; }, { rowId: [{
2683
+ }], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }]; }, { rowId: [{
2519
2684
  type: Input,
2520
2685
  args: ['magicRow']
2521
2686
  }], onClick: [{
@@ -2561,7 +2726,8 @@ class MagicDirective {
2561
2726
  if (this.htmlElement instanceof HTMLButtonElement)
2562
2727
  fromButton = true;
2563
2728
  this.task.insertEvent(getGuiEventObj(event, this.id, +this.rowId, fromButton));
2564
- e.cancelBubble = true;
2729
+ if (MagicDirective.noOfAutoCompleteBoxesOpened < 1)
2730
+ e.cancelBubble = true;
2565
2731
  });
2566
2732
  });
2567
2733
  this.renderer.listen(this.htmlElement, 'change', (e) => {
@@ -2601,7 +2767,7 @@ class MagicDirective {
2601
2767
  (e.keyCode >= GuiConstants.KEY_F1 && e.keyCode <= GuiConstants.KEY_F12);
2602
2768
  if (guiEvent.modifiers !== Modifiers.MODIFIER_NONE || supportedKey) {
2603
2769
  guiEvent.keyCode = e.keyCode;
2604
- if (e.keyCode !== GuiConstants.KEY_ESC || e.keyCode === GuiConstants.KEY_ESC && !MagicDirective.opened)
2770
+ if (e.keyCode !== GuiConstants.KEY_ESC || e.keyCode === GuiConstants.KEY_ESC && (!MagicDirective.opened && MagicDirective.noOfAutoCompleteBoxesOpened < 1))
2605
2771
  e.cancelBubble = true;
2606
2772
  this.task.insertEvent(guiEvent);
2607
2773
  }
@@ -2665,7 +2831,7 @@ class MagicDirective {
2665
2831
  case InteractiveCommandType.CALL_JS:
2666
2832
  let methodName = command._str;
2667
2833
  let args = command.arguments;
2668
- let magicComponent = (this.vcRef._hostView).find(v => v instanceof TaskBaseMagicComponent);
2834
+ let magicComponent = (this.vcRef._hostLView).find(v => v instanceof TaskBaseMagicComponent);
2669
2835
  let resultString = '';
2670
2836
  try {
2671
2837
  if (!isNullOrUndefined(magicComponent[methodName])) {
@@ -2696,14 +2862,15 @@ class MagicDirective {
2696
2862
  }
2697
2863
  }
2698
2864
  MagicDirective.opened = false;
2699
- MagicDirective.ɵfac = function MagicDirective_Factory(t) { return new (t || MagicDirective)(ɵɵdirectiveInject(TaskMagicService), ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(ViewContainerRef), ɵɵdirectiveInject(RowMagicDirective, 8)); };
2700
- MagicDirective.ɵdir = ɵɵdefineDirective({ type: MagicDirective, selectors: [["", "magic", ""]], inputs: { magic: "magic", eventsOnly: "eventsOnly", rowId: "rowId" } });
2701
- (function () { ɵsetClassMetadata(MagicDirective, [{
2865
+ MagicDirective.noOfAutoCompleteBoxesOpened = 0;
2866
+ MagicDirective.ɵfac = function MagicDirective_Factory(t) { return new (t || MagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
2867
+ MagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MagicDirective, selectors: [["", "magic", ""]], inputs: { magic: "magic", eventsOnly: "eventsOnly", rowId: "rowId" } });
2868
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDirective, [{
2702
2869
  type: Directive,
2703
2870
  args: [{
2704
2871
  selector: '[magic]'
2705
2872
  }]
2706
- }], function () { return [{ type: TaskMagicService }, { type: ElementRef }, { type: Renderer2 }, { type: ViewContainerRef }, { type: RowMagicDirective, decorators: [{
2873
+ }], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
2707
2874
  type: Optional
2708
2875
  }] }]; }, { magic: [{
2709
2876
  type: Input,
@@ -2882,104 +3049,20 @@ class NoControlMagicDirective extends MagicDirective {
2882
3049
  }
2883
3050
  }
2884
3051
  }
2885
- NoControlMagicDirective.ɵfac = function NoControlMagicDirective_Factory(t) { return new (t || NoControlMagicDirective)(ɵɵdirectiveInject(TaskMagicService), ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(ViewContainerRef), ɵɵdirectiveInject(RowMagicDirective, 8)); };
2886
- NoControlMagicDirective.ɵdir = ɵɵdefineDirective({ type: NoControlMagicDirective, selectors: [["", "magicnc", ""]], inputs: { magic: ["magicnc", "magic"] }, features: [ɵɵInheritDefinitionFeature] });
2887
- (function () { ɵsetClassMetadata(NoControlMagicDirective, [{
3052
+ NoControlMagicDirective.ɵfac = function NoControlMagicDirective_Factory(t) { return new (t || NoControlMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(RowMagicDirective, 8)); };
3053
+ NoControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: NoControlMagicDirective, selectors: [["", "magicnc", ""]], inputs: { magic: ["magicnc", "magic"] }, features: [i0.ɵɵInheritDefinitionFeature] });
3054
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NoControlMagicDirective, [{
2888
3055
  type: Directive,
2889
3056
  args: [{
2890
3057
  selector: '[magicnc]'
2891
3058
  }]
2892
- }], function () { return [{ type: TaskMagicService }, { type: ElementRef }, { type: Renderer2 }, { type: ViewContainerRef }, { type: RowMagicDirective, decorators: [{
3059
+ }], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: RowMagicDirective, decorators: [{
2893
3060
  type: Optional
2894
3061
  }] }]; }, { magic: [{
2895
3062
  type: Input,
2896
3063
  args: ['magicnc']
2897
3064
  }] }); })();
2898
3065
 
2899
- class RouterContainerMagicComponent {
2900
- constructor(activatedRoute, magic, containerTaskService, componentFactoryResolver, viewContainerRef, componentList, pendingCommandsCollector, routerCommandsMagicService) {
2901
- this.activatedRoute = activatedRoute;
2902
- this.magic = magic;
2903
- this.containerTaskService = containerTaskService;
2904
- this.componentFactoryResolver = componentFactoryResolver;
2905
- this.viewContainerRef = viewContainerRef;
2906
- this.componentList = componentList;
2907
- this.pendingCommandsCollector = pendingCommandsCollector;
2908
- this.routerCommandsMagicService = routerCommandsMagicService;
2909
- this.componentRef = null;
2910
- this.parentMgSubformService = null;
2911
- }
2912
- ngOnInit() {
2913
- let outletname = this.activatedRoute.outlet;
2914
- let subformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;
2915
- let currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
2916
- if (subformMagicService == null || subformMagicService.currentRouteDefinition === null) {
2917
- this.insertRouteEvent(currentActiveRoute);
2918
- SubformMagicService.routerContainers.push(this);
2919
- }
2920
- else {
2921
- this.initializeComponent();
2922
- }
2923
- }
2924
- insertRouteEvent(currentActiveRoute) {
2925
- let guiEvent = getGuiEventObj('RouterNavigate', null, 0);
2926
- guiEvent.RouterPath = currentActiveRoute.snapshot.routeConfig.path;
2927
- if (currentActiveRoute.snapshot.outlet !== 'primary')
2928
- guiEvent.RouterOutletName = currentActiveRoute.snapshot.outlet;
2929
- let calcRouterPath = currentActiveRoute.routeConfig.path;
2930
- if (calcRouterPath.length > 0) {
2931
- let routerPath = calcRouterPath;
2932
- let tokens = StrUtil.tokenize(routerPath, "/:");
2933
- guiEvent.RouterPath = tokens[0];
2934
- guiEvent.RouterParams = new List();
2935
- for (let i = 1; i < tokens.length; i++) {
2936
- guiEvent.RouterParams.push(this.activatedRoute.snapshot.params[tokens[i]]);
2937
- }
2938
- }
2939
- this.containerTaskService.insertEvent(guiEvent);
2940
- }
2941
- initializeComponent() {
2942
- let subformMagicService = SubformMagicService.currentCallerMgSubformServiceRef;
2943
- if (subformMagicService.currentRouteDefinition !== null) {
2944
- let comp = this.componentList.getComponent(subformMagicService.currentRouteDefinition.formName);
2945
- const componentFactory = this.componentFactoryResolver.resolveComponentFactory(comp);
2946
- this.componentRef = this.viewContainerRef.createComponent(componentFactory);
2947
- Object.assign(this.componentRef.instance, subformMagicService.currentRouteDefinition.parameters);
2948
- let myActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
2949
- let routeParams = StrUtil.tokenize(myActiveRoute.snapshot.routeConfig.path, "/:");
2950
- subformMagicService.routesDict[myActiveRoute.snapshot.outlet] = routeParams[0];
2951
- this.parentMgSubformService = subformMagicService;
2952
- subformMagicService.currentRouteDefinition = null;
2953
- SubformMagicService.currentCallerMgSubformServiceRef = null;
2954
- let ignoreParamChange = true;
2955
- myActiveRoute.paramMap.subscribe(params => {
2956
- if (!ignoreParamChange)
2957
- this.insertRouteEvent(myActiveRoute);
2958
- ignoreParamChange = false;
2959
- });
2960
- this.parentMgSubformService.refreshView();
2961
- this.routerCommandsMagicService.ExecuteNextCommand();
2962
- }
2963
- }
2964
- ngOnDestroy() {
2965
- if (this.componentRef != null) {
2966
- this.componentRef.instance.task.close();
2967
- let currentActiveRoute = SubformMagicService.getRelativeRoute(this.activatedRoute);
2968
- this.parentMgSubformService.routesDict[currentActiveRoute.outlet] = "";
2969
- }
2970
- }
2971
- }
2972
- RouterContainerMagicComponent.ɵfac = function RouterContainerMagicComponent_Factory(t) { return new (t || RouterContainerMagicComponent)(ɵɵdirectiveInject(ActivatedRoute), ɵɵdirectiveInject(EngineMagicService), ɵɵdirectiveInject(TaskMagicService), ɵɵdirectiveInject(ComponentFactoryResolver), ɵɵdirectiveInject(ViewContainerRef), ɵɵdirectiveInject(ComponentListMagicService), ɵɵdirectiveInject(CommandsCollectorMagicService), ɵɵdirectiveInject(RouterCommandsMagicService)); };
2973
- RouterContainerMagicComponent.ɵcmp = ɵɵdefineComponent({ type: RouterContainerMagicComponent, selectors: [["magic-route-outlet"]], decls: 0, vars: 0, template: function RouterContainerMagicComponent_Template(rf, ctx) { }, encapsulation: 2 });
2974
- (function () { ɵsetClassMetadata(RouterContainerMagicComponent, [{
2975
- type: Component,
2976
- args: [{
2977
- selector: 'magic-route-outlet',
2978
- template: `
2979
- `
2980
- }]
2981
- }], function () { return [{ type: ActivatedRoute }, { type: EngineMagicService }, { type: TaskMagicService }, { type: ComponentFactoryResolver }, { type: ViewContainerRef }, { type: ComponentListMagicService }, { type: CommandsCollectorMagicService }, { type: RouterCommandsMagicService }]; }, null); })();
2982
-
2983
3066
  class Constants {
2984
3067
  }
2985
3068
  Constants.DATE_FMT = 'dd/MMM/yyyy';
@@ -3007,9 +3090,9 @@ class DateMagicPipe extends DatePipe {
3007
3090
  return value;
3008
3091
  }
3009
3092
  }
3010
- DateMagicPipe.ɵfac = function DateMagicPipe_Factory(t) { return new (t || DateMagicPipe)(ɵɵdirectiveInject(TaskMagicService)); };
3011
- DateMagicPipe.ɵpipe = ɵɵdefinePipe({ name: "magicDate", type: DateMagicPipe, pure: true });
3012
- (function () { ɵsetClassMetadata(DateMagicPipe, [{
3093
+ DateMagicPipe.ɵfac = function DateMagicPipe_Factory(t) { return new (t || DateMagicPipe)(i0.ɵɵdirectiveInject(TaskMagicService, 16)); };
3094
+ DateMagicPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "magicDate", type: DateMagicPipe, pure: true });
3095
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DateMagicPipe, [{
3013
3096
  type: Pipe,
3014
3097
  args: [{
3015
3098
  name: 'magicDate'
@@ -3277,11 +3360,11 @@ class MgformatMagicDirective {
3277
3360
  return false;
3278
3361
  }
3279
3362
  }
3280
- MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(ɵɵdirectiveInject(MagicDirective), ɵɵdirectiveInject(TaskMagicService)); };
3281
- MgformatMagicDirective.ɵdir = ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
3282
- ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
3363
+ MgformatMagicDirective.ɵfac = function MgformatMagicDirective_Factory(t) { return new (t || MgformatMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective), i0.ɵɵdirectiveInject(TaskMagicService)); };
3364
+ MgformatMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: MgformatMagicDirective, selectors: [["", "mgFormat", ""]], hostBindings: function MgformatMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
3365
+ i0.ɵɵlistener("focus", function MgformatMagicDirective_focus_HostBindingHandler($event) { return ctx.onFocusEvent($event); })("change", function MgformatMagicDirective_change_HostBindingHandler($event) { return ctx.onChangeEvent($event); });
3283
3366
  } } });
3284
- (function () { ɵsetClassMetadata(MgformatMagicDirective, [{
3367
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgformatMagicDirective, [{
3285
3368
  type: Directive,
3286
3369
  args: [{
3287
3370
  selector: '[mgFormat]'
@@ -3329,9 +3412,9 @@ class TimeMagicPipe extends DatePipe {
3329
3412
  return value;
3330
3413
  }
3331
3414
  }
3332
- TimeMagicPipe.ɵfac = function TimeMagicPipe_Factory(t) { return new (t || TimeMagicPipe)(ɵɵdirectiveInject(TaskMagicService)); };
3333
- TimeMagicPipe.ɵpipe = ɵɵdefinePipe({ name: "magicTime", type: TimeMagicPipe, pure: true });
3334
- (function () { ɵsetClassMetadata(TimeMagicPipe, [{
3415
+ TimeMagicPipe.ɵfac = function TimeMagicPipe_Factory(t) { return new (t || TimeMagicPipe)(i0.ɵɵdirectiveInject(TaskMagicService, 16)); };
3416
+ TimeMagicPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "magicTime", type: TimeMagicPipe, pure: true });
3417
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimeMagicPipe, [{
3335
3418
  type: Pipe,
3336
3419
  args: [{
3337
3420
  name: 'magicTime'
@@ -3369,15 +3452,15 @@ class RangeValidatorMagicDirective {
3369
3452
  return Object.keys(formGroup).find(name => c === formGroup[name]) || null;
3370
3453
  }
3371
3454
  }
3372
- RangeValidatorMagicDirective.ɵfac = function RangeValidatorMagicDirective_Factory(t) { return new (t || RangeValidatorMagicDirective)(ɵɵdirectiveInject(TaskMagicService), ɵɵdirectiveInject(ViewContainerRef)); };
3373
- RangeValidatorMagicDirective.ɵdir = ɵɵdefineDirective({ type: RangeValidatorMagicDirective, selectors: [["", "rangevalidator", ""]], features: [ɵɵProvidersFeature([
3455
+ RangeValidatorMagicDirective.ɵfac = function RangeValidatorMagicDirective_Factory(t) { return new (t || RangeValidatorMagicDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); };
3456
+ RangeValidatorMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: RangeValidatorMagicDirective, selectors: [["", "rangevalidator", ""]], features: [i0.ɵɵProvidersFeature([
3374
3457
  {
3375
3458
  provide: NG_VALIDATORS,
3376
3459
  useExisting: RangeValidatorMagicDirective,
3377
3460
  multi: true,
3378
3461
  }
3379
3462
  ])] });
3380
- (function () { ɵsetClassMetadata(RangeValidatorMagicDirective, [{
3463
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RangeValidatorMagicDirective, [{
3381
3464
  type: Directive,
3382
3465
  args: [{
3383
3466
  selector: '[rangevalidator] ',
@@ -3389,20 +3472,20 @@ RangeValidatorMagicDirective.ɵdir = ɵɵdefineDirective({ type: RangeValidatorM
3389
3472
  }
3390
3473
  ]
3391
3474
  }]
3392
- }], function () { return [{ type: TaskMagicService }, { type: ViewContainerRef }]; }, null); })();
3475
+ }], function () { return [{ type: TaskMagicService }, { type: i0.ViewContainerRef }]; }, null); })();
3393
3476
 
3394
3477
  function SubformMagicComponent_ndc_dynamic_0_Template(rf, ctx) { if (rf & 1) {
3395
- ɵɵelement(0, "ndc-dynamic", 1);
3478
+ i0.ɵɵelement(0, "ndc-dynamic", 1);
3396
3479
  } if (rf & 2) {
3397
- const ctx_r0 = ɵɵnextContext();
3398
- ɵɵproperty("ndcDynamicComponent", ctx_r0.Component)("ndcDynamicInputs", ctx_r0.Parameters);
3480
+ const ctx_r0 = i0.ɵɵnextContext();
3481
+ i0.ɵɵproperty("ndcDynamicComponent", ctx_r0.Component)("ndcDynamicInputs", ctx_r0.Parameters);
3399
3482
  } }
3400
3483
  class SubformMagicComponent {
3401
3484
  constructor(vcRef, mgSub) {
3402
3485
  this.vcRef = vcRef;
3403
3486
  this.mgSub = mgSub;
3404
3487
  this.component = null;
3405
- this.component = (this.vcRef._hostView).find(v => !isNullOrUndefined(v));
3488
+ this.component = (this.vcRef._hostLView).find(v => !isNullOrUndefined(v));
3406
3489
  }
3407
3490
  set magic(val) { this.id = val; }
3408
3491
  ;
@@ -3413,13 +3496,13 @@ class SubformMagicComponent {
3413
3496
  return this.mgSub.mgGetParameters(this.id);
3414
3497
  }
3415
3498
  }
3416
- SubformMagicComponent.ɵfac = function SubformMagicComponent_Factory(t) { return new (t || SubformMagicComponent)(ɵɵdirectiveInject(ViewContainerRef), ɵɵdirectiveInject(SubformMagicService)); };
3417
- SubformMagicComponent.ɵcmp = ɵɵdefineComponent({ type: SubformMagicComponent, selectors: [["magic-subform"]], inputs: { magic: "magic" }, decls: 1, vars: 1, consts: [[3, "ndcDynamicComponent", "ndcDynamicInputs", 4, "ngIf"], [3, "ndcDynamicComponent", "ndcDynamicInputs"]], template: function SubformMagicComponent_Template(rf, ctx) { if (rf & 1) {
3418
- ɵɵtemplate(0, SubformMagicComponent_ndc_dynamic_0_Template, 1, 2, "ndc-dynamic", 0);
3499
+ SubformMagicComponent.ɵfac = function SubformMagicComponent_Factory(t) { return new (t || SubformMagicComponent)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(SubformMagicService)); };
3500
+ SubformMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SubformMagicComponent, selectors: [["magic-subform"]], inputs: { magic: "magic" }, decls: 1, vars: 1, consts: [[3, "ndcDynamicComponent", "ndcDynamicInputs", 4, "ngIf"], [3, "ndcDynamicComponent", "ndcDynamicInputs"]], template: function SubformMagicComponent_Template(rf, ctx) { if (rf & 1) {
3501
+ i0.ɵɵtemplate(0, SubformMagicComponent_ndc_dynamic_0_Template, 1, 2, "ndc-dynamic", 0);
3419
3502
  } if (rf & 2) {
3420
- ɵɵproperty("ngIf", ctx.Component);
3421
- } }, directives: [NgIf, DynamicComponent, DynamicIoDirective], encapsulation: 2 });
3422
- (function () { ɵsetClassMetadata(SubformMagicComponent, [{
3503
+ i0.ɵɵproperty("ngIf", ctx.Component);
3504
+ } }, directives: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective], encapsulation: 2 });
3505
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubformMagicComponent, [{
3423
3506
  type: Component,
3424
3507
  args: [{
3425
3508
  selector: 'magic-subform',
@@ -3431,34 +3514,34 @@ SubformMagicComponent.ɵcmp = ɵɵdefineComponent({ type: SubformMagicComponent,
3431
3514
  </ndc-dynamic>
3432
3515
  `
3433
3516
  }]
3434
- }], function () { return [{ type: ViewContainerRef }, { type: SubformMagicService }]; }, { magic: [{
3517
+ }], function () { return [{ type: i0.ViewContainerRef }, { type: SubformMagicService }]; }, { magic: [{
3435
3518
  type: Input,
3436
3519
  args: ['magic']
3437
3520
  }] }); })();
3438
3521
 
3439
- const _c0$2 = ["customContent"];
3522
+ const _c0$1 = ["customContent"];
3440
3523
  function ErrorMagicComponent_div_0_span_4_Template(rf, ctx) { if (rf & 1) {
3441
- ɵɵelementStart(0, "span");
3442
- ɵɵtext(1);
3443
- ɵɵelementEnd();
3524
+ i0.ɵɵelementStart(0, "span");
3525
+ i0.ɵɵtext(1);
3526
+ i0.ɵɵelementEnd();
3444
3527
  } if (rf & 2) {
3445
- const ctx_r2 = ɵɵnextContext(2);
3446
- ɵɵadvance(1);
3447
- ɵɵtextInterpolate1(" ", ctx_r2.mgService.getErrMsg(ctx_r2.id, ctx_r2.rowId), " ");
3528
+ const ctx_r2 = i0.ɵɵnextContext(2);
3529
+ i0.ɵɵadvance(1);
3530
+ i0.ɵɵtextInterpolate1(" ", ctx_r2.mgService.getErrMsg(ctx_r2.id, ctx_r2.rowId), " ");
3448
3531
  } }
3449
3532
  function ErrorMagicComponent_div_0_Template(rf, ctx) { if (rf & 1) {
3450
- ɵɵelementStart(0, "div");
3451
- ɵɵelementStart(1, "div", null, 1);
3452
- ɵɵprojection(3);
3453
- ɵɵelementEnd();
3454
- ɵɵtemplate(4, ErrorMagicComponent_div_0_span_4_Template, 2, 1, "span", 0);
3455
- ɵɵelementEnd();
3533
+ i0.ɵɵelementStart(0, "div");
3534
+ i0.ɵɵelementStart(1, "div", null, 1);
3535
+ i0.ɵɵprojection(3);
3536
+ i0.ɵɵelementEnd();
3537
+ i0.ɵɵtemplate(4, ErrorMagicComponent_div_0_span_4_Template, 2, 1, "span", 0);
3538
+ i0.ɵɵelementEnd();
3456
3539
  } if (rf & 2) {
3457
- const ctx_r0 = ɵɵnextContext();
3458
- ɵɵadvance(4);
3459
- ɵɵproperty("ngIf", ctx_r0.defaultDisplay);
3540
+ const ctx_r0 = i0.ɵɵnextContext();
3541
+ i0.ɵɵadvance(4);
3542
+ i0.ɵɵproperty("ngIf", ctx_r0.defaultDisplay);
3460
3543
  } }
3461
- const _c1$1 = ["*"];
3544
+ const _c1 = ["*"];
3462
3545
  class ErrorMagicComponent {
3463
3546
  constructor(_task, mgService, changeDetectorRef) {
3464
3547
  this._task = _task;
@@ -3511,19 +3594,19 @@ class ErrorMagicComponent {
3511
3594
  return false;
3512
3595
  }
3513
3596
  }
3514
- ErrorMagicComponent.ɵfac = function ErrorMagicComponent_Factory(t) { return new (t || ErrorMagicComponent)(ɵɵdirectiveInject(TaskMagicService), ɵɵdirectiveInject(AccessorMagicService), ɵɵdirectiveInject(ChangeDetectorRef)); };
3515
- ErrorMagicComponent.ɵcmp = ɵɵdefineComponent({ type: ErrorMagicComponent, selectors: [["mgError"]], viewQuery: function ErrorMagicComponent_Query(rf, ctx) { if (rf & 1) {
3516
- ɵɵviewQuery(_c0$2, true);
3597
+ ErrorMagicComponent.ɵfac = function ErrorMagicComponent_Factory(t) { return new (t || ErrorMagicComponent)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(AccessorMagicService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
3598
+ ErrorMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ErrorMagicComponent, selectors: [["mgError"]], viewQuery: function ErrorMagicComponent_Query(rf, ctx) { if (rf & 1) {
3599
+ i0.ɵɵviewQuery(_c0$1, 5);
3517
3600
  } if (rf & 2) {
3518
- var _t;
3519
- ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.CustomContent = _t.first);
3520
- } }, inputs: { magic: "magic", rowId1: ["rowId", "rowId1"] }, ngContentSelectors: _c1$1, decls: 1, vars: 1, consts: [[4, "ngIf"], ["customContent", ""]], template: function ErrorMagicComponent_Template(rf, ctx) { if (rf & 1) {
3521
- ɵɵprojectionDef();
3522
- ɵɵtemplate(0, ErrorMagicComponent_div_0_Template, 5, 1, "div", 0);
3601
+ let _t;
3602
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.CustomContent = _t.first);
3603
+ } }, inputs: { magic: "magic", rowId1: ["rowId", "rowId1"] }, ngContentSelectors: _c1, decls: 1, vars: 1, consts: [[4, "ngIf"], ["customContent", ""]], template: function ErrorMagicComponent_Template(rf, ctx) { if (rf & 1) {
3604
+ i0.ɵɵprojectionDef();
3605
+ i0.ɵɵtemplate(0, ErrorMagicComponent_div_0_Template, 5, 1, "div", 0);
3523
3606
  } if (rf & 2) {
3524
- ɵɵproperty("ngIf", ctx.HasErrors(ctx.id));
3525
- } }, directives: [NgIf], encapsulation: 2 });
3526
- (function () { ɵsetClassMetadata(ErrorMagicComponent, [{
3607
+ i0.ɵɵproperty("ngIf", ctx.HasErrors(ctx.id));
3608
+ } }, directives: [i1.NgIf], encapsulation: 2 });
3609
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorMagicComponent, [{
3527
3610
  type: Component,
3528
3611
  args: [{
3529
3612
  selector: 'mgError',
@@ -3537,7 +3620,7 @@ ErrorMagicComponent.ɵcmp = ɵɵdefineComponent({ type: ErrorMagicComponent, sel
3537
3620
  </div>
3538
3621
  `
3539
3622
  }]
3540
- }], function () { return [{ type: TaskMagicService }, { type: AccessorMagicService }, { type: ChangeDetectorRef }]; }, { magic: [{
3623
+ }], function () { return [{ type: TaskMagicService }, { type: AccessorMagicService }, { type: i0.ChangeDetectorRef }]; }, { magic: [{
3541
3624
  type: Input,
3542
3625
  args: ['magic']
3543
3626
  }], rowId1: [{
@@ -3556,11 +3639,11 @@ class CheckboxMagicDirective {
3556
3639
  this.magicDirective.task.onCheckChanged($event, this.magicDirective.id, +this.magicDirective.rowId);
3557
3640
  }
3558
3641
  }
3559
- CheckboxMagicDirective.ɵfac = function CheckboxMagicDirective_Factory(t) { return new (t || CheckboxMagicDirective)(ɵɵdirectiveInject(MagicDirective)); };
3560
- CheckboxMagicDirective.ɵdir = ɵɵdefineDirective({ type: CheckboxMagicDirective, selectors: [["input", "type", "checkbox", "magic", "", 3, "noFormControl", ""]], hostBindings: function CheckboxMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
3561
- ɵɵlistener("change", function CheckboxMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
3642
+ CheckboxMagicDirective.ɵfac = function CheckboxMagicDirective_Factory(t) { return new (t || CheckboxMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
3643
+ CheckboxMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: CheckboxMagicDirective, selectors: [["input", "type", "checkbox", "magic", "", 3, "noFormControl", ""]], hostBindings: function CheckboxMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
3644
+ i0.ɵɵlistener("change", function CheckboxMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
3562
3645
  } } });
3563
- (function () { ɵsetClassMetadata(CheckboxMagicDirective, [{
3646
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckboxMagicDirective, [{
3564
3647
  type: Directive,
3565
3648
  args: [{
3566
3649
  selector: `
@@ -3580,11 +3663,11 @@ class ComboboxMagicDirective {
3580
3663
  this.magicDirective.task.onComboboxSelectionChanged($event, this.magicDirective.id, +this.magicDirective.rowId);
3581
3664
  }
3582
3665
  }
3583
- ComboboxMagicDirective.ɵfac = function ComboboxMagicDirective_Factory(t) { return new (t || ComboboxMagicDirective)(ɵɵdirectiveInject(MagicDirective)); };
3584
- ComboboxMagicDirective.ɵdir = ɵɵdefineDirective({ type: ComboboxMagicDirective, selectors: [["select", "magic", "", 3, "multiple", ""]], hostBindings: function ComboboxMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
3585
- ɵɵlistener("change", function ComboboxMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
3666
+ ComboboxMagicDirective.ɵfac = function ComboboxMagicDirective_Factory(t) { return new (t || ComboboxMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
3667
+ ComboboxMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: ComboboxMagicDirective, selectors: [["select", "magic", "", 3, "multiple", ""]], hostBindings: function ComboboxMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
3668
+ i0.ɵɵlistener("change", function ComboboxMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
3586
3669
  } } });
3587
- (function () { ɵsetClassMetadata(ComboboxMagicDirective, [{
3670
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ComboboxMagicDirective, [{
3588
3671
  type: Directive,
3589
3672
  args: [{
3590
3673
  selector: `select[magic]:not([multiple])`,
@@ -3600,30 +3683,30 @@ class ExitMagicService {
3600
3683
  }
3601
3684
  }
3602
3685
  ExitMagicService.ɵfac = function ExitMagicService_Factory(t) { return new (t || ExitMagicService)(); };
3603
- ExitMagicService.ɵprov = ɵɵdefineInjectable({ token: ExitMagicService, factory: ExitMagicService.ɵfac });
3604
- (function () { ɵsetClassMetadata(ExitMagicService, [{
3686
+ ExitMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: ExitMagicService, factory: ExitMagicService.ɵfac });
3687
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExitMagicService, [{
3605
3688
  type: Injectable
3606
3689
  }], null, null); })();
3607
3690
 
3608
- const _c0$3 = ["magicRoot"];
3691
+ const _c0 = ["magicRoot"];
3609
3692
  function MagicShellComponent_ndc_dynamic_2_Template(rf, ctx) { if (rf & 1) {
3610
- ɵɵelement(0, "ndc-dynamic", 6);
3693
+ i0.ɵɵelement(0, "ndc-dynamic", 6);
3611
3694
  } if (rf & 2) {
3612
- const ctx_r1 = ɵɵnextContext();
3613
- ɵɵproperty("ndcDynamicComponent", ctx_r1.RootComponent)("ndcDynamicInputs", ctx_r1.RootComponentParameters);
3695
+ const ctx_r1 = i0.ɵɵnextContext();
3696
+ i0.ɵɵproperty("ndcDynamicComponent", ctx_r1.RootComponent)("ndcDynamicInputs", ctx_r1.RootComponentParameters);
3614
3697
  } }
3615
3698
  function MagicShellComponent_div_5_Template(rf, ctx) { if (rf & 1) {
3616
- ɵɵelementStart(0, "div", 7);
3617
- ɵɵelementContainer(1, 8);
3618
- ɵɵelementEnd();
3699
+ i0.ɵɵelementStart(0, "div", 7);
3700
+ i0.ɵɵelementContainer(1, 8);
3701
+ i0.ɵɵelementEnd();
3619
3702
  } if (rf & 2) {
3620
- const ctx_r3 = ɵɵnextContext();
3621
- const _r4 = ɵɵreference(7);
3622
- ɵɵadvance(1);
3623
- ɵɵproperty("ngTemplateOutlet", ctx_r3.SpinnerTemplate ? ctx_r3.SpinnerTemplate : _r4);
3703
+ const ctx_r3 = i0.ɵɵnextContext();
3704
+ const _r4 = i0.ɵɵreference(7);
3705
+ i0.ɵɵadvance(1);
3706
+ i0.ɵɵproperty("ngTemplateOutlet", ctx_r3.SpinnerTemplate ? ctx_r3.SpinnerTemplate : _r4);
3624
3707
  } }
3625
3708
  function MagicShellComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
3626
- ɵɵelement(0, "div", 9);
3709
+ i0.ɵɵelement(0, "div", 9);
3627
3710
  } }
3628
3711
  class MagicShellComponent {
3629
3712
  constructor(engineMagicService, componentList, changeDetectorRef, titleService, overlayWindowService, httpClient, pendingCommandsCollector, exitMagicService) {
@@ -3728,28 +3811,28 @@ class MagicShellComponent {
3728
3811
  }
3729
3812
  }
3730
3813
  }
3731
- MagicShellComponent.ɵfac = function MagicShellComponent_Factory(t) { return new (t || MagicShellComponent)(ɵɵdirectiveInject(EngineMagicService), ɵɵdirectiveInject(ComponentListMagicService), ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(Title), ɵɵdirectiveInject(OverlayWindowService), ɵɵdirectiveInject(HttpClient), ɵɵdirectiveInject(CommandsCollectorMagicService), ɵɵdirectiveInject(ExitMagicService, 8)); };
3732
- MagicShellComponent.ɵcmp = ɵɵdefineComponent({ type: MagicShellComponent, selectors: [["magic-root"]], viewQuery: function MagicShellComponent_Query(rf, ctx) { if (rf & 1) {
3733
- ɵɵstaticViewQuery(_c0$3, true);
3814
+ MagicShellComponent.ɵfac = function MagicShellComponent_Factory(t) { return new (t || MagicShellComponent)(i0.ɵɵdirectiveInject(EngineMagicService), i0.ɵɵdirectiveInject(ComponentListMagicService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$1.Title), i0.ɵɵdirectiveInject(OverlayWindowService), i0.ɵɵdirectiveInject(i5.HttpClient), i0.ɵɵdirectiveInject(CommandsCollectorMagicService), i0.ɵɵdirectiveInject(ExitMagicService, 8)); };
3815
+ MagicShellComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicShellComponent, selectors: [["magic-root"]], viewQuery: function MagicShellComponent_Query(rf, ctx) { if (rf & 1) {
3816
+ i0.ɵɵviewQuery(_c0, 7);
3734
3817
  } if (rf & 2) {
3735
- var _t;
3736
- ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx.rootMagicElementRef = _t.first);
3818
+ let _t;
3819
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.rootMagicElementRef = _t.first);
3737
3820
  } }, hostBindings: function MagicShellComponent_HostBindings(rf, ctx) { if (rf & 1) {
3738
- ɵɵlistener("beforeunload", function MagicShellComponent_beforeunload_HostBindingHandler($event) { return ctx.onBeforeUnload($event); }, false, ɵɵresolveWindow)("unload", function MagicShellComponent_unload_HostBindingHandler($event) { return ctx.onUnload($event); }, false, ɵɵresolveWindow);
3739
- } }, inputs: { SpinnerTemplate: "SpinnerTemplate" }, features: [ɵɵProvidersFeature([])], decls: 8, vars: 2, consts: [["magicRoot", ""], [3, "ndcDynamicComponent", "ndcDynamicInputs", 4, "ngIf"], ["magicViewContainerRef", ""], ["overlayWindowsContainer", ""], ["class", "spinner-background", 4, "ngIf"], ["defaultSpinner", ""], [3, "ndcDynamicComponent", "ndcDynamicInputs"], [1, "spinner-background"], [3, "ngTemplateOutlet"], [1, "mgSpinnerClass"]], template: function MagicShellComponent_Template(rf, ctx) { if (rf & 1) {
3740
- ɵɵelementStart(0, "div", null, 0);
3741
- ɵɵtemplate(2, MagicShellComponent_ndc_dynamic_2_Template, 1, 2, "ndc-dynamic", 1);
3742
- ɵɵelement(3, "div", 2, 3);
3743
- ɵɵelementEnd();
3744
- ɵɵtemplate(5, MagicShellComponent_div_5_Template, 2, 1, "div", 4);
3745
- ɵɵtemplate(6, MagicShellComponent_ng_template_6_Template, 1, 0, "ng-template", null, 5, ɵɵtemplateRefExtractor);
3821
+ i0.ɵɵlistener("beforeunload", function MagicShellComponent_beforeunload_HostBindingHandler($event) { return ctx.onBeforeUnload($event); }, false, i0.ɵɵresolveWindow)("unload", function MagicShellComponent_unload_HostBindingHandler($event) { return ctx.onUnload($event); }, false, i0.ɵɵresolveWindow);
3822
+ } }, inputs: { SpinnerTemplate: "SpinnerTemplate" }, features: [i0.ɵɵProvidersFeature([])], decls: 8, vars: 2, consts: [["magicRoot", ""], [3, "ndcDynamicComponent", "ndcDynamicInputs", 4, "ngIf"], ["magicViewContainerRef", ""], ["overlayWindowsContainer", ""], ["class", "spinner-background", 4, "ngIf"], ["defaultSpinner", ""], [3, "ndcDynamicComponent", "ndcDynamicInputs"], [1, "spinner-background"], [3, "ngTemplateOutlet"], [1, "mgSpinnerClass"]], template: function MagicShellComponent_Template(rf, ctx) { if (rf & 1) {
3823
+ i0.ɵɵelementStart(0, "div", null, 0);
3824
+ i0.ɵɵtemplate(2, MagicShellComponent_ndc_dynamic_2_Template, 1, 2, "ndc-dynamic", 1);
3825
+ i0.ɵɵelement(3, "div", 2, 3);
3826
+ i0.ɵɵelementEnd();
3827
+ i0.ɵɵtemplate(5, MagicShellComponent_div_5_Template, 2, 1, "div", 4);
3828
+ i0.ɵɵtemplate(6, MagicShellComponent_ng_template_6_Template, 1, 0, "ng-template", null, 5, i0.ɵɵtemplateRefExtractor);
3746
3829
  } if (rf & 2) {
3747
- ɵɵadvance(2);
3748
- ɵɵproperty("ngIf", ctx.RootComponent !== null);
3749
- ɵɵadvance(3);
3750
- ɵɵproperty("ngIf", ctx.showSpinner);
3751
- } }, directives: [NgIf, MagicViewContainerRef, DynamicComponent, DynamicIoDirective, NgTemplateOutlet], styles: [".mgSpinnerClass[_ngcontent-%COMP%] {\n border: 10px solid #cccccc; \n border-top: 10px solid black; \n border-radius: 50%;\n position: fixed;\n margin: auto;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100px;\n height: 100px;\n animation: spin 2s linear infinite;\n }\n .spinner-background[_ngcontent-%COMP%] {\n \n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n left: 0;\n opacity: 0.5;\n }\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }"] });
3752
- (function () { ɵsetClassMetadata(MagicShellComponent, [{
3830
+ i0.ɵɵadvance(2);
3831
+ i0.ɵɵproperty("ngIf", ctx.RootComponent !== null);
3832
+ i0.ɵɵadvance(3);
3833
+ i0.ɵɵproperty("ngIf", ctx.showSpinner);
3834
+ } }, directives: [i1.NgIf, i3.DynamicComponent, i3.DynamicIoDirective, MagicViewContainerRef, i1.NgTemplateOutlet], styles: [".mgSpinnerClass[_ngcontent-%COMP%]{border:10px solid #cccccc;border-top:10px solid black;border-radius:50%;position:fixed;margin:auto;top:0;right:0;bottom:0;left:0;width:100px;height:100px;animation:spin 2s linear infinite}.spinner-background[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;z-index:1000;left:0;opacity:.5}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"] });
3835
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicShellComponent, [{
3753
3836
  type: Component,
3754
3837
  args: [{
3755
3838
  selector: 'magic-root',
@@ -3805,7 +3888,7 @@ MagicShellComponent.ɵcmp = ɵɵdefineComponent({ type: MagicShellComponent, sel
3805
3888
  }
3806
3889
  `]
3807
3890
  }]
3808
- }], function () { return [{ type: EngineMagicService }, { type: ComponentListMagicService }, { type: ChangeDetectorRef }, { type: Title }, { type: OverlayWindowService }, { type: HttpClient }, { type: CommandsCollectorMagicService }, { type: ExitMagicService, decorators: [{
3891
+ }], function () { return [{ type: EngineMagicService }, { type: ComponentListMagicService }, { type: i0.ChangeDetectorRef }, { type: i1$1.Title }, { type: OverlayWindowService }, { type: i5.HttpClient }, { type: CommandsCollectorMagicService }, { type: ExitMagicService, decorators: [{
3809
3892
  type: Optional
3810
3893
  }] }]; }, { rootMagicElementRef: [{
3811
3894
  type: ViewChild,
@@ -3827,12 +3910,11 @@ const CHECKBOX_VALUE_ACCESSOR = {
3827
3910
  };
3828
3911
  class MagicCheckboxControlValueAccessor extends CheckboxControlValueAccessor {
3829
3912
  }
3830
- MagicCheckboxControlValueAccessor.ɵfac = function MagicCheckboxControlValueAccessor_Factory(t) { return ɵMagicCheckboxControlValueAccessor_BaseFactory(t || MagicCheckboxControlValueAccessor); };
3831
- MagicCheckboxControlValueAccessor.ɵdir = ɵɵdefineDirective({ type: MagicCheckboxControlValueAccessor, selectors: [["input", "type", "checkbox", "magic", "", 3, "formControlName", "", 3, "no-form-control", ""], ["input", "type", "checkbox", "magic", "", 3, "formControl", ""], ["input", "type", "checkbox", "magic", "", 3, "ngModel", ""]], hostBindings: function MagicCheckboxControlValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {
3832
- ɵɵlistener("change", function MagicCheckboxControlValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target.checked); })("blur", function MagicCheckboxControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });
3833
- } }, features: [ɵɵProvidersFeature([CHECKBOX_VALUE_ACCESSOR]), ɵɵInheritDefinitionFeature] });
3834
- const ɵMagicCheckboxControlValueAccessor_BaseFactory = ɵɵgetInheritedFactory(MagicCheckboxControlValueAccessor);
3835
- (function () { ɵsetClassMetadata(MagicCheckboxControlValueAccessor, [{
3913
+ MagicCheckboxControlValueAccessor.ɵfac = function () { let ɵMagicCheckboxControlValueAccessor_BaseFactory; return function MagicCheckboxControlValueAccessor_Factory(t) { return (ɵMagicCheckboxControlValueAccessor_BaseFactory || (ɵMagicCheckboxControlValueAccessor_BaseFactory = i0.ɵɵgetInheritedFactory(MagicCheckboxControlValueAccessor)))(t || MagicCheckboxControlValueAccessor); }; }();
3914
+ MagicCheckboxControlValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: MagicCheckboxControlValueAccessor, selectors: [["input", "type", "checkbox", "magic", "", 3, "formControlName", "", 3, "no-form-control", ""], ["input", "type", "checkbox", "magic", "", 3, "formControl", ""], ["input", "type", "checkbox", "magic", "", 3, "ngModel", ""]], hostBindings: function MagicCheckboxControlValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {
3915
+ i0.ɵɵlistener("change", function MagicCheckboxControlValueAccessor_change_HostBindingHandler($event) { return ctx.onChange($event.target.checked); })("blur", function MagicCheckboxControlValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });
3916
+ } }, features: [i0.ɵɵProvidersFeature([CHECKBOX_VALUE_ACCESSOR]), i0.ɵɵInheritDefinitionFeature] });
3917
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicCheckboxControlValueAccessor, [{
3836
3918
  type: Directive,
3837
3919
  args: [{
3838
3920
  selector: `
@@ -3852,12 +3934,11 @@ const MAGIC_DEFAULT_VALUE_ACCESSOR = {
3852
3934
  };
3853
3935
  class MagicDefaultValueAccessor extends DefaultValueAccessor {
3854
3936
  }
3855
- MagicDefaultValueAccessor.ɵfac = function MagicDefaultValueAccessor_Factory(t) { return ɵMagicDefaultValueAccessor_BaseFactory(t || MagicDefaultValueAccessor); };
3856
- MagicDefaultValueAccessor.ɵdir = ɵɵdefineDirective({ type: MagicDefaultValueAccessor, selectors: [["input", "magic", "", 3, "type", "checkbox", 3, "formControlName", "", 3, "no-form-control", ""], ["textarea", "magic", "", 3, "formControlName", "", 3, "noFormControl", "", 3, "no-form-control", ""]], hostBindings: function MagicDefaultValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {
3857
- ɵɵlistener("input", function MagicDefaultValueAccessor_input_HostBindingHandler($event) { return ctx._handleInput($event.target.value); })("blur", function MagicDefaultValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); })("compositionstart", function MagicDefaultValueAccessor_compositionstart_HostBindingHandler() { return ctx._compositionStart(); })("compositionend", function MagicDefaultValueAccessor_compositionend_HostBindingHandler($event) { return ctx._compositionEnd($event.target.value); });
3858
- } }, exportAs: ["magic"], features: [ɵɵProvidersFeature([MAGIC_DEFAULT_VALUE_ACCESSOR]), ɵɵInheritDefinitionFeature] });
3859
- const ɵMagicDefaultValueAccessor_BaseFactory = ɵɵgetInheritedFactory(MagicDefaultValueAccessor);
3860
- (function () { ɵsetClassMetadata(MagicDefaultValueAccessor, [{
3937
+ MagicDefaultValueAccessor.ɵfac = function () { let ɵMagicDefaultValueAccessor_BaseFactory; return function MagicDefaultValueAccessor_Factory(t) { return (ɵMagicDefaultValueAccessor_BaseFactory || (ɵMagicDefaultValueAccessor_BaseFactory = i0.ɵɵgetInheritedFactory(MagicDefaultValueAccessor)))(t || MagicDefaultValueAccessor); }; }();
3938
+ MagicDefaultValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: MagicDefaultValueAccessor, selectors: [["input", "magic", "", 3, "type", "checkbox", 3, "formControlName", "", 3, "no-form-control", ""], ["textarea", "magic", "", 3, "formControlName", "", 3, "noFormControl", "", 3, "no-form-control", ""]], hostBindings: function MagicDefaultValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {
3939
+ i0.ɵɵlistener("input", function MagicDefaultValueAccessor_input_HostBindingHandler($event) { return ctx._handleInput($event.target.value); })("blur", function MagicDefaultValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); })("compositionstart", function MagicDefaultValueAccessor_compositionstart_HostBindingHandler() { return ctx._compositionStart(); })("compositionend", function MagicDefaultValueAccessor_compositionend_HostBindingHandler($event) { return ctx._compositionEnd($event.target.value); });
3940
+ } }, exportAs: ["magic"], features: [i0.ɵɵProvidersFeature([MAGIC_DEFAULT_VALUE_ACCESSOR]), i0.ɵɵInheritDefinitionFeature] });
3941
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicDefaultValueAccessor, [{
3861
3942
  type: Directive,
3862
3943
  args: [{
3863
3944
  selector: `
@@ -3883,11 +3964,11 @@ class CheckboxNoFormControlMagicDirective {
3883
3964
  this.magicDirective.task.onCheckChanged($event, this.magicDirective.id, +this.magicDirective.rowId);
3884
3965
  }
3885
3966
  }
3886
- CheckboxNoFormControlMagicDirective.ɵfac = function CheckboxNoFormControlMagicDirective_Factory(t) { return new (t || CheckboxNoFormControlMagicDirective)(ɵɵdirectiveInject(MagicDirective)); };
3887
- CheckboxNoFormControlMagicDirective.ɵdir = ɵɵdefineDirective({ type: CheckboxNoFormControlMagicDirective, selectors: [["input", "type", "checkbox", "magic", "", "noFormControl", ""]], hostBindings: function CheckboxNoFormControlMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
3888
- ɵɵlistener("change", function CheckboxNoFormControlMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
3967
+ CheckboxNoFormControlMagicDirective.ɵfac = function CheckboxNoFormControlMagicDirective_Factory(t) { return new (t || CheckboxNoFormControlMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
3968
+ CheckboxNoFormControlMagicDirective.ɵdir = i0.ɵɵdefineDirective({ type: CheckboxNoFormControlMagicDirective, selectors: [["input", "type", "checkbox", "magic", "", "noFormControl", ""]], hostBindings: function CheckboxNoFormControlMagicDirective_HostBindings(rf, ctx) { if (rf & 1) {
3969
+ i0.ɵɵlistener("change", function CheckboxNoFormControlMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
3889
3970
  } } });
3890
- (function () { ɵsetClassMetadata(CheckboxNoFormControlMagicDirective, [{
3971
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckboxNoFormControlMagicDirective, [{
3891
3972
  type: Directive,
3892
3973
  args: [{
3893
3974
  selector: `
@@ -3907,11 +3988,11 @@ class InputNoFormControlMagicDirective {
3907
3988
  this.magicDirective.task.setInputTextValue(this.magicDirective.id, this.magicDirective.rowId, event.srcElement.value);
3908
3989
  }
3909
3990
  }
3910
- InputNoFormControlMagicDirective.ɵfac = function InputNoFormControlMagicDirective_Factory(t) { return new (t || InputNoFormControlMagicDirective)(ɵɵdirectiveInject(MagicDirective)); };
3911
- InputNoFormControlMagicDirective.ɵdir = ɵɵ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) {
3912
- ɵɵlistener("change", function InputNoFormControlMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
3991
+ InputNoFormControlMagicDirective.ɵfac = function InputNoFormControlMagicDirective_Factory(t) { return new (t || InputNoFormControlMagicDirective)(i0.ɵɵdirectiveInject(MagicDirective)); };
3992
+ InputNoFormControlMagicDirective.ɵdir = 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) {
3993
+ i0.ɵɵlistener("change", function InputNoFormControlMagicDirective_change_HostBindingHandler($event) { return ctx.onChange($event); });
3913
3994
  } } });
3914
- (function () { ɵsetClassMetadata(InputNoFormControlMagicDirective, [{
3995
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InputNoFormControlMagicDirective, [{
3915
3996
  type: Directive,
3916
3997
  args: [{
3917
3998
  selector: `input[magic]:([noFormControl]):not([type=checkbox]),
@@ -3953,17 +4034,17 @@ class DateValueAccessor {
3953
4034
  this.renderer.setProperty(this.elementRef.nativeElement, "disabled", isDisabled);
3954
4035
  }
3955
4036
  }
3956
- DateValueAccessor.ɵfac = function DateValueAccessor_Factory(t) { return new (t || DateValueAccessor)(ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(ElementRef)); };
3957
- DateValueAccessor.ɵdir = ɵɵdefineDirective({ type: DateValueAccessor, selectors: [["", "dateInput", ""]], hostBindings: function DateValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {
3958
- ɵɵlistener("input", function DateValueAccessor_input_HostBindingHandler($event) { return ctx.onChange($event.target.valueAsDate); })("blur", function DateValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });
3959
- } }, features: [ɵɵProvidersFeature([DATE_VALUE_ACCESSOR])] });
3960
- (function () { ɵsetClassMetadata(DateValueAccessor, [{
4037
+ DateValueAccessor.ɵfac = function DateValueAccessor_Factory(t) { return new (t || DateValueAccessor)(i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ElementRef)); };
4038
+ DateValueAccessor.ɵdir = i0.ɵɵdefineDirective({ type: DateValueAccessor, selectors: [["", "dateInput", ""]], hostBindings: function DateValueAccessor_HostBindings(rf, ctx) { if (rf & 1) {
4039
+ i0.ɵɵlistener("input", function DateValueAccessor_input_HostBindingHandler($event) { return ctx.onChange($event.target.valueAsDate); })("blur", function DateValueAccessor_blur_HostBindingHandler() { return ctx.onTouched(); });
4040
+ } }, features: [i0.ɵɵProvidersFeature([DATE_VALUE_ACCESSOR])] });
4041
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DateValueAccessor, [{
3961
4042
  type: Directive,
3962
4043
  args: [{
3963
4044
  selector: "[dateInput]",
3964
4045
  providers: [DATE_VALUE_ACCESSOR]
3965
4046
  }]
3966
- }], function () { return [{ type: Renderer2 }, { type: ElementRef }]; }, { onChange: [{
4047
+ }], function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, { onChange: [{
3967
4048
  type: HostListener,
3968
4049
  args: ["input", ["$event.target.valueAsDate"]]
3969
4050
  }], onTouched: [{
@@ -4003,14 +4084,14 @@ class NonMagicControlDirective {
4003
4084
  this.regEvents();
4004
4085
  }
4005
4086
  }
4006
- NonMagicControlDirective.ɵfac = function NonMagicControlDirective_Factory(t) { return new (t || NonMagicControlDirective)(ɵɵdirectiveInject(TaskMagicService), ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(Renderer2), ɵɵdirectiveInject(ViewContainerRef)); };
4007
- NonMagicControlDirective.ɵdir = ɵɵdefineDirective({ type: NonMagicControlDirective, selectors: [["", "NonMagicControl", ""]], inputs: { magic: ["NonMagicControl", "magic"] } });
4008
- (function () { ɵsetClassMetadata(NonMagicControlDirective, [{
4087
+ NonMagicControlDirective.ɵfac = function NonMagicControlDirective_Factory(t) { return new (t || NonMagicControlDirective)(i0.ɵɵdirectiveInject(TaskMagicService), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); };
4088
+ NonMagicControlDirective.ɵdir = i0.ɵɵdefineDirective({ type: NonMagicControlDirective, selectors: [["", "NonMagicControl", ""]], inputs: { magic: ["NonMagicControl", "magic"] } });
4089
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NonMagicControlDirective, [{
4009
4090
  type: Directive,
4010
4091
  args: [{
4011
4092
  selector: '[NonMagicControl]'
4012
4093
  }]
4013
- }], function () { return [{ type: TaskMagicService }, { type: ElementRef }, { type: Renderer2 }, { type: ViewContainerRef }]; }, { magic: [{
4094
+ }], function () { return [{ type: TaskMagicService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }]; }, { magic: [{
4014
4095
  type: Input,
4015
4096
  args: ['NonMagicControl']
4016
4097
  }] }); })();
@@ -4046,21 +4127,10 @@ const decs = [
4046
4127
  MagicViewContainerRef
4047
4128
  ];
4048
4129
  class MagicModule {
4049
- static forRoot() {
4050
- return {
4051
- ngModule: MagicModule,
4052
- providers: [
4053
- EngineMagicService,
4054
- ComponentListMagicService,
4055
- CommandsCollectorMagicService,
4056
- RouterCommandsMagicService,
4057
- OverlayWindowService,
4058
- ]
4059
- };
4060
- }
4061
4130
  }
4062
- MagicModule.ɵmod = ɵɵdefineNgModule({ type: MagicModule });
4063
- MagicModule.ɵinj = ɵɵdefineInjector({ factory: function MagicModule_Factory(t) { return new (t || MagicModule)(); }, providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [[
4131
+ MagicModule.ɵfac = function MagicModule_Factory(t) { return new (t || MagicModule)(); };
4132
+ MagicModule.ɵmod = i0.ɵɵdefineNgModule({ type: MagicModule });
4133
+ MagicModule.ɵinj = i0.ɵɵdefineInjector({ providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider], imports: [[
4064
4134
  CommonModule,
4065
4135
  FormsModule,
4066
4136
  ReactiveFormsModule,
@@ -4068,7 +4138,24 @@ MagicModule.ɵinj = ɵɵdefineInjector({ factory: function MagicModule_Factory(t
4068
4138
  DynamicModule,
4069
4139
  HttpClientModule
4070
4140
  ]] });
4071
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(MagicModule, { declarations: [MagicDirective,
4141
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicModule, [{
4142
+ type: NgModule,
4143
+ args: [{
4144
+ declarations: [...decs],
4145
+ exports: [...decs],
4146
+ entryComponents: [],
4147
+ imports: [
4148
+ CommonModule,
4149
+ FormsModule,
4150
+ ReactiveFormsModule,
4151
+ RouterModule,
4152
+ DynamicModule,
4153
+ HttpClientModule
4154
+ ],
4155
+ providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider]
4156
+ }]
4157
+ }], null, null); })();
4158
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MagicModule, { declarations: [MagicDirective,
4072
4159
  CheckboxMagicDirective,
4073
4160
  CheckboxNoFormControlMagicDirective,
4074
4161
  InputNoFormControlMagicDirective,
@@ -4127,24 +4214,7 @@ MagicModule.ɵinj = ɵɵdefineInjector({ factory: function MagicModule_Factory(t
4127
4214
  RangeValidatorMagicDirective,
4128
4215
  NonMagicControlDirective,
4129
4216
  MagicFocusDirective,
4130
- MagicViewContainerRef] }); })();
4131
- (function () { ɵsetClassMetadata(MagicModule, [{
4132
- type: NgModule,
4133
- args: [{
4134
- declarations: [...decs],
4135
- exports: [...decs],
4136
- entryComponents: [],
4137
- imports: [
4138
- CommonModule,
4139
- FormsModule,
4140
- ReactiveFormsModule,
4141
- RouterModule,
4142
- DynamicModule,
4143
- HttpClientModule
4144
- ],
4145
- providers: [ConfirmationComponentsMagicProvider, OverlayContainerMagicProvider]
4146
- }]
4147
- }], null, null); })();
4217
+ MagicViewContainerRef] }); })();
4148
4218
 
4149
4219
  const MG_FORMATS = {
4150
4220
  parse: { dateInput: { month: 'short', year: 'numeric', day: 'numeric' } },
@@ -4237,11 +4307,11 @@ class MgDateAdapter extends NativeDateAdapter {
4237
4307
  }
4238
4308
  }
4239
4309
  }
4240
- MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(ɵɵinject(Platform), ɵɵinject(TaskMagicService)); };
4241
- MgDateAdapter.ɵprov = ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
4242
- (function () { ɵsetClassMetadata(MgDateAdapter, [{
4310
+ MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$2.Platform), i0.ɵɵinject(TaskMagicService)); };
4311
+ MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
4312
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
4243
4313
  type: Injectable
4244
- }], function () { return [{ type: Platform }, { type: TaskMagicService }]; }, null); })();
4314
+ }], function () { return [{ type: i1$2.Platform }, { type: TaskMagicService }]; }, null); })();
4245
4315
 
4246
4316
  const matDateProviders = [
4247
4317
  { provide: DateAdapter, useClass: MgDateAdapter },
@@ -4330,5 +4400,5 @@ class ModalFormDefinition {
4330
4400
  }
4331
4401
  }
4332
4402
 
4333
- export { AccessorMagicService, BaseMagicAlertComponent, BaseMagicConfirmComponent, BaseMagicOverlayContainer, CHECKBOX_VALUE_ACCESSOR, CheckboxMagicDirective, CheckboxNoFormControlMagicDirective, ComboboxMagicDirective, CommandsCollectorMagicService, ComponentListMagicService, ConfirmationComponentsMagicProvider, Constants, ControlMetadata, ControlsMetadata, DATE_VALUE_ACCESSOR, DateMagicPipe, DateValueAccessor, EngineMagicService, ErrorMagicComponent, ExitMagicService, GuiInteractiveExecutor, HtmlClasses, InputNoFormControlMagicDirective, MAGIC_DEFAULT_VALUE_ACCESSOR, MG_FORMATS, MagicAlertComponent, MagicCheckboxControlValueAccessor, MagicConfirmationBoxComponent, MagicDefaultValueAccessor, MagicDirective, MagicFocusDirective, MagicModule, MagicOverlayContainer, MagicOverlayContainerWrapper, MagicServices, MagicShellComponent, MagicViewContainerRef, MgDateAdapter, MgDateFormatter, MgformatMagicDirective, ModalFormDefinition, NoControlMagicDirective, NonMagicControlDirective, OverlayContainerMagicProvider, OverlayWindowService, RangeValidatorMagicDirective, Records, RouteCommand, RouterCommandsMagicService, RouterContainerMagicComponent, RowMagicDirective, StylesMapManager, SubformMagicComponent, SubformMagicService, TableMagicService, TaskBaseMagicComponent, TaskMagicService, TimeMagicPipe, TitleMagicService, basicMagicProviders, confirmationBox, magicProviders, matDateProviders, utils };
4334
- //# sourceMappingURL=magic-xpa-angular.js.map
4403
+ export { AccessorMagicService, BaseMagicAlertComponent, BaseMagicConfirmComponent, BaseMagicOverlayContainer, CHECKBOX_VALUE_ACCESSOR, CheckboxMagicDirective, CheckboxNoFormControlMagicDirective, ComboboxMagicDirective, CommandsCollectorMagicService, ComponentListMagicService, ConfirmationComponentsMagicProvider, Constants, ControlMetadata, ControlsMetadata, DATE_VALUE_ACCESSOR, DateMagicPipe, DateValueAccessor, EngineMagicService, ErrorMagicComponent, ExitMagicService, GuiInteractiveExecutor, HtmlClasses, InputNoFormControlMagicDirective, MAGIC_DEFAULT_VALUE_ACCESSOR, MG_FORMATS, MagicAlertComponent, MagicCheckboxControlValueAccessor, MagicConfirmationBoxComponent, MagicDefaultValueAccessor, MagicDirective, MagicFocusDirective, MagicLazyLoaderService, MagicModule, MagicOverlayContainer, MagicOverlayContainerWrapper, MagicServices, MagicShellComponent, MagicViewContainerRef, MgDateAdapter, MgDateFormatter, MgformatMagicDirective, ModalFormDefinition, NoControlMagicDirective, NonMagicControlDirective, OverlayContainerMagicProvider, OverlayWindowService, RangeValidatorMagicDirective, Records, RouteCommand, RouterCommandsMagicService, RouterContainerMagicComponent, RowMagicDirective, StylesMapManager, SubformMagicComponent, SubformMagicService, TableMagicService, TaskBaseMagicComponent, TaskMagicService, TimeMagicPipe, TitleMagicService, basicMagicProviders, confirmationBox, magicProviders, matDateProviders, utils };
4404
+ //# sourceMappingURL=magic-xpa-angular.mjs.map