@magic-xpa/angular 4.1100.0-dev4110.106 → 4.1100.0-dev4110.108

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 (124) hide show
  1. package/README.md +5 -5
  2. package/esm2020/index.mjs +59 -2
  3. package/esm2020/src/controls.metadata.model.mjs +180 -0
  4. package/esm2020/src/interfaces/sub-form-definition.iterface.mjs +2 -0
  5. package/esm2020/src/magic.core.module.mjs +160 -0
  6. package/esm2020/src/services/ISubformMagicService.mjs +2 -0
  7. package/esm2020/src/services/OverlayWindowService.mjs +236 -0
  8. package/esm2020/src/services/StylesMapManager.mjs +28 -0
  9. package/esm2020/src/services/accessor.magic.service.mjs +356 -0
  10. package/esm2020/src/services/commands-collector.magic.service.mjs +46 -0
  11. package/esm2020/src/services/component-list.magic.service.mjs +46 -0
  12. package/esm2020/src/services/confirmation.components.magic.provider.mjs +21 -0
  13. package/esm2020/src/services/engine.magic.service.mjs +82 -0
  14. package/esm2020/src/services/exit.magic.service.mjs +13 -0
  15. package/esm2020/src/services/magic-color.service.mjs +99 -0
  16. package/esm2020/src/services/magic.lazy.loader.service.mjs +16 -0
  17. package/esm2020/src/services/magic.providers.mjs +25 -0
  18. package/esm2020/src/services/magic.services.mjs +31 -0
  19. package/esm2020/src/services/mg-date-adapter.mjs +109 -0
  20. package/esm2020/src/services/overlay.conainer.magic.provider.mjs +14 -0
  21. package/esm2020/src/services/router-commands.magic.service.mjs +28 -0
  22. package/esm2020/src/services/subform.magic.service.mjs +184 -0
  23. package/esm2020/src/services/table.magic.service.mjs +77 -0
  24. package/esm2020/src/services/task.magics.service.mjs +624 -0
  25. package/esm2020/src/services/title.magic.service.mjs +18 -0
  26. package/esm2020/src/ui/GuiInteractiveExecutor.mjs +105 -0
  27. package/esm2020/src/ui/components/base-magic-alert.component.mjs +23 -0
  28. package/esm2020/src/ui/components/base-magic-confirm.component.mjs +23 -0
  29. package/esm2020/src/ui/components/magic-alert.component.mjs +35 -0
  30. package/esm2020/src/ui/components/magic-confirmation-box.component.mjs +41 -0
  31. package/esm2020/src/ui/directives/NonMagicControlDirective.mjs +49 -0
  32. package/esm2020/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.mjs +28 -0
  33. package/esm2020/src/ui/directives/magic/checkbox.magic.directive.mjs +28 -0
  34. package/esm2020/src/ui/directives/magic/combobox.magic.directive.mjs +36 -0
  35. package/esm2020/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.mjs +27 -0
  36. package/esm2020/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.mjs +52 -0
  37. package/esm2020/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.mjs +32 -0
  38. package/esm2020/src/ui/directives/magic/input.noformcontrol.magic.directive.mjs +27 -0
  39. package/esm2020/src/ui/directives/magic/nocontrol.magic.directive.mjs +193 -0
  40. package/esm2020/src/ui/directives/magic/row.magic.directive.mjs +58 -0
  41. package/esm2020/src/ui/directives/magic-focus.directive.mjs +19 -0
  42. package/esm2020/src/ui/directives/magic.directive.mjs +215 -0
  43. package/esm2020/src/ui/directives/magicViewContainerRef.directive.mjs +19 -0
  44. package/esm2020/src/ui/directives/mgformat.magic.directive.mjs +408 -0
  45. package/esm2020/src/ui/directives/range-validator.magic.directive.mjs +58 -0
  46. package/esm2020/src/ui/magic-confirmationBox.mjs +42 -0
  47. package/esm2020/src/ui/magic-modal/base-magic-overlay-container.mjs +22 -0
  48. package/esm2020/src/ui/magic-modal/magic-modal-form.mjs +8 -0
  49. package/esm2020/src/ui/magic-modal/magic-modal-interface.mjs +2 -0
  50. package/esm2020/src/ui/magic-modal/magic-overlay-container-wrapper.mjs +121 -0
  51. package/esm2020/src/ui/magic-modal/magic-overlay-container.mjs +159 -0
  52. package/esm2020/src/ui/magic-root.component.mjs +203 -0
  53. package/esm2020/src/ui/mgerror.magic.component.mjs +119 -0
  54. package/esm2020/src/ui/pipes/date.magic.pipe.mjs +105 -0
  55. package/esm2020/src/ui/pipes/time.magic.pipe.mjs +51 -0
  56. package/esm2020/src/ui/pipes/time24.magic.pipe.mjs +34 -0
  57. package/esm2020/src/ui/router-container.magic.component.mjs +108 -0
  58. package/esm2020/src/ui/subform.magic.component.mjs +52 -0
  59. package/esm2020/src/ui/task-base.magic.component.mjs +86 -0
  60. package/esm2020/src/ui/utils.mjs +54 -0
  61. package/fesm2015/magic-xpa-angular.mjs +4863 -0
  62. package/fesm2015/magic-xpa-angular.mjs.map +1 -1
  63. package/fesm2020/magic-xpa-angular.mjs +4681 -0
  64. package/fesm2020/magic-xpa-angular.mjs.map +1 -1
  65. package/index.d.ts +58 -1
  66. package/package.json +3 -3
  67. package/src/controls.metadata.model.d.ts +62 -0
  68. package/src/interfaces/sub-form-definition.iterface.d.ts +12 -0
  69. package/src/magic.core.module.d.ts +41 -0
  70. package/src/services/ISubformMagicService.d.ts +4 -0
  71. package/src/services/OverlayWindowService.d.ts +31 -0
  72. package/src/services/StylesMapManager.d.ts +5 -0
  73. package/src/services/accessor.magic.service.d.ts +69 -0
  74. package/src/services/commands-collector.magic.service.d.ts +15 -0
  75. package/src/services/component-list.magic.service.d.ts +23 -0
  76. package/src/services/confirmation.components.magic.provider.d.ts +8 -0
  77. package/src/services/engine.magic.service.d.ts +27 -0
  78. package/src/services/exit.magic.service.d.ts +6 -0
  79. package/src/services/magic-color.service.d.ts +19 -0
  80. package/src/services/magic.lazy.loader.service.d.ts +6 -0
  81. package/src/services/magic.providers.d.ts +107 -0
  82. package/src/services/magic.services.d.ts +16 -0
  83. package/src/services/mg-date-adapter.d.ts +40 -0
  84. package/src/services/overlay.conainer.magic.provider.d.ts +7 -0
  85. package/src/services/router-commands.magic.service.d.ts +17 -0
  86. package/src/services/subform.magic.service.d.ts +43 -0
  87. package/src/services/table.magic.service.d.ts +30 -0
  88. package/src/services/task.magics.service.d.ts +100 -0
  89. package/src/services/title.magic.service.d.ts +9 -0
  90. package/src/ui/GuiInteractiveExecutor.d.ts +22 -0
  91. package/src/ui/components/base-magic-alert.component.d.ts +10 -0
  92. package/src/ui/components/base-magic-confirm.component.d.ts +10 -0
  93. package/src/ui/components/magic-alert.component.d.ts +6 -0
  94. package/src/ui/components/magic-confirmation-box.component.d.ts +6 -0
  95. package/src/ui/directives/NonMagicControlDirective.d.ts +26 -0
  96. package/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.d.ts +9 -0
  97. package/src/ui/directives/magic/checkbox.magic.directive.d.ts +9 -0
  98. package/src/ui/directives/magic/combobox.magic.directive.d.ts +10 -0
  99. package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts +7 -0
  100. package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts +17 -0
  101. package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts +7 -0
  102. package/src/ui/directives/magic/input.noformcontrol.magic.directive.d.ts +9 -0
  103. package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +18 -0
  104. package/src/ui/directives/magic/row.magic.directive.d.ts +17 -0
  105. package/src/ui/directives/magic-focus.directive.d.ts +9 -0
  106. package/src/ui/directives/magic.directive.d.ts +44 -0
  107. package/src/ui/directives/magicViewContainerRef.directive.d.ts +8 -0
  108. package/src/ui/directives/mgformat.magic.directive.d.ts +31 -0
  109. package/src/ui/directives/range-validator.magic.directive.d.ts +17 -0
  110. package/src/ui/magic-confirmationBox.d.ts +6 -0
  111. package/src/ui/magic-modal/base-magic-overlay-container.d.ts +5 -0
  112. package/src/ui/magic-modal/magic-modal-form.d.ts +5 -0
  113. package/src/ui/magic-modal/magic-modal-interface.d.ts +10 -0
  114. package/src/ui/magic-modal/magic-overlay-container-wrapper.d.ts +31 -0
  115. package/src/ui/magic-modal/magic-overlay-container.d.ts +25 -0
  116. package/src/ui/magic-root.component.d.ts +40 -0
  117. package/src/ui/mgerror.magic.component.d.ts +20 -0
  118. package/src/ui/pipes/date.magic.pipe.d.ts +17 -0
  119. package/src/ui/pipes/time.magic.pipe.d.ts +11 -0
  120. package/src/ui/pipes/time24.magic.pipe.d.ts +10 -0
  121. package/src/ui/router-container.magic.component.d.ts +30 -0
  122. package/src/ui/subform.magic.component.d.ts +16 -0
  123. package/src/ui/task-base.magic.component.d.ts +34 -0
  124. package/src/ui/utils.d.ts +9 -0
@@ -0,0 +1,82 @@
1
+ import { Injectable } from "@angular/core";
2
+ import { Subject } from "rxjs";
3
+ import { MagicBridge } from "@magic-xpa/engine";
4
+ import * as i0 from "@angular/core";
5
+ export class EngineMagicService {
6
+ constructor() {
7
+ this.magicBridge = MagicBridge;
8
+ this.isStub = false;
9
+ this.isLoggedIn = false;
10
+ this.refreshDom = new Subject();
11
+ this.interactiveCommands = new Subject();
12
+ }
13
+ startMagicEngine(httpClient) {
14
+ this.magicBridge.registerExecuteCommandsCallback(data => {
15
+ if (!this.isStub) {
16
+ try {
17
+ const list = data;
18
+ for (let c of list) {
19
+ this.refreshDom.next(c);
20
+ }
21
+ }
22
+ catch (e) {
23
+ console.dir(e);
24
+ console.log('magic engine not found');
25
+ console.log('moving to stub mode');
26
+ this.isStub = true;
27
+ }
28
+ }
29
+ });
30
+ this.magicBridge.registerInteractiveCallback(data => {
31
+ if (!this.isStub) {
32
+ this.interactiveCommands.next(data);
33
+ }
34
+ });
35
+ this.magicBridge.Initialize(httpClient);
36
+ }
37
+ async terminateMagic() {
38
+ await this.magicBridge.TerminateMagic();
39
+ }
40
+ insertEvent(guiEvent) {
41
+ if (!this.isStub)
42
+ this.magicBridge.insertEvent(guiEvent);
43
+ }
44
+ GetRangedValue(taskId, controlName, value) {
45
+ return this.magicBridge.GetRangedValue(taskId, controlName, value);
46
+ }
47
+ GetControlPictureMask(taskId, controlName) {
48
+ return this.magicBridge.GetControlPictureMask(taskId, controlName);
49
+ }
50
+ GetFormattedValue(taskId, controlName, value, rowId) {
51
+ return this.magicBridge.GetFormattedValue(taskId, controlName, value, rowId);
52
+ }
53
+ ValidateControlValue(taskId, controlName, value) {
54
+ return this.magicBridge.ValidateControlValue(taskId, controlName, value);
55
+ }
56
+ GetFldRanges(taskId, controlName) {
57
+ return this.magicBridge.GetFldRanges(taskId, controlName);
58
+ }
59
+ saveData(data) {
60
+ }
61
+ getIsLoggedIn() {
62
+ return this.isLoggedIn;
63
+ }
64
+ setIsLoggedIn(setIsLoggedIn) {
65
+ this.isLoggedIn = setIsLoggedIn;
66
+ }
67
+ TransCacheExists() {
68
+ return this.magicBridge.TransCacheExists();
69
+ }
70
+ TerminateContextUsingFetchAPI() {
71
+ this.magicBridge.TerminateContextUsingFetchAPI();
72
+ }
73
+ }
74
+ EngineMagicService.ɵfac = function EngineMagicService_Factory(t) { return new (t || EngineMagicService)(); };
75
+ EngineMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: EngineMagicService, factory: EngineMagicService.ɵfac, providedIn: 'root' });
76
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EngineMagicService, [{
77
+ type: Injectable,
78
+ args: [{
79
+ providedIn: 'root'
80
+ }]
81
+ }], null, null); })();
82
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5naW5lLm1hZ2ljLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyL3NyYy9zZXJ2aWNlcy9lbmdpbmUubWFnaWMuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBQyxPQUFPLEVBQUMsTUFBTSxNQUFNLENBQUM7QUFFN0IsT0FBTyxFQUFZLFdBQVcsRUFBQyxNQUFNLG1CQUFtQixDQUFDOztBQVV6RCxNQUFNLE9BQU8sa0JBQWtCO0lBSC9CO1FBSUUsZ0JBQVcsR0FBRyxXQUFXLENBQUM7UUFD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HJcbiAgVHJhbnNDYWNoZUV4aXN0cygpOiBib29sZWFuIHtcclxuICAgIHJldHVybiB0aGlzLm1hZ2ljQnJpZGdlLlRyYW5zQ2FjaGVFeGlzdHMoKTtcclxuICB9XHJcblxyXG4gIFRlcm1pbmF0ZUNvbnRleHRVc2luZ0ZldGNoQVBJKCk6IHZvaWQge1xyXG4gICAgdGhpcy5tYWdpY0JyaWRnZS5UZXJtaW5hdGVDb250ZXh0VXNpbmdGZXRjaEFQSSgpO1xyXG4gIH1cclxufVxyXG4iXX0=
@@ -0,0 +1,13 @@
1
+ import { Injectable } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class ExitMagicService {
4
+ exitMagic() {
5
+ console.log("Magic application terminated");
6
+ }
7
+ }
8
+ ExitMagicService.ɵfac = function ExitMagicService_Factory(t) { return new (t || ExitMagicService)(); };
9
+ ExitMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: ExitMagicService, factory: ExitMagicService.ɵfac });
10
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExitMagicService, [{
11
+ type: Injectable
12
+ }], null, null); })();
13
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhpdC5tYWdpYy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci9zcmMvc2VydmljZXMvZXhpdC5tYWdpYy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBTTNDLE1BQU0sT0FBTyxnQkFBZ0I7SUFNM0IsU0FBUztRQUNQLE9BQU8sQ0FBQyxHQUFHLENBQUMsOEJBQThCLENBQUMsQ0FBQztJQUM5QyxDQUFDOztnRkFSVSxnQkFBZ0I7d0RBQWhCLGdCQUFnQixXQUFoQixnQkFBZ0I7dUZBQWhCLGdCQUFnQjtjQUQ1QixVQUFVIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5cclxuLyoqXHJcbiAqIFRoaXMgc2VydmljZSBzdXBwb3J0cyBjdXN0b20gYWN0aW9ucyBvbiBtYWdpYyBleGl0XHJcbiAqL1xyXG5ASW5qZWN0YWJsZSgpXHJcbmV4cG9ydCBjbGFzcyBFeGl0TWFnaWNTZXJ2aWNlIHtcclxuXHJcblxyXG4gIC8qKlxyXG4gICAqIE92ZXJyaWRlIHRoaXMgbWV0aG9kIHRvIGltcGxlbWVudCBjdXN0b20gbG9naWMgb24gbWFnaWMgZXhpdFxyXG4gICAqL1xyXG4gIGV4aXRNYWdpYygpIHtcclxuICAgIGNvbnNvbGUubG9nKFwiTWFnaWMgYXBwbGljYXRpb24gdGVybWluYXRlZFwiKTtcclxuICB9XHJcblxyXG59XHJcbiJdfQ==
@@ -0,0 +1,99 @@
1
+ import { Inject, Injectable, InjectionToken } from '@angular/core';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "@angular/common/http";
5
+ export let COLOR_FILE_NAME = new InjectionToken('colorFile', {
6
+ providedIn: 'root',
7
+ factory: () => 'clr_rnt.eng'
8
+ });
9
+ export const MAGIC_FG_COLOR = 1;
10
+ export const MAGIC_BG_COLOR = 2;
11
+ const SYSTEM_FG = 2;
12
+ const SYSTEM_BG = 4;
13
+ const SYSTEM_FG_AND_SYSTEM_BG = 6;
14
+ const TRANSPERENT_BG = 1;
15
+ export class MagicColorService {
16
+ getColorFilePath() {
17
+ return 'assets/' + this.colorFileName;
18
+ }
19
+ constructor(http, colorFile1 = 'clr_rnt.eng') {
20
+ this.http = http;
21
+ this.colorFileName = 'clr_rnt.eng';
22
+ this.fileNotFound = false;
23
+ if (colorFile1)
24
+ this.colorFileName = colorFile1;
25
+ else
26
+ this.colorFileName = 'clr_rnt.eng';
27
+ }
28
+ getColorData() {
29
+ if (!this.colorsData) {
30
+ this.http.get(this.getColorFilePath(), { responseType: 'text' }).subscribe(resp => {
31
+ this.colorsData = resp.replace(/\n/g, '@').split('@');
32
+ }, error1 => {
33
+ console.error('File not found ' + this.colorFileName);
34
+ this.fileNotFound = true;
35
+ });
36
+ }
37
+ }
38
+ hexToRgba(hex, isTransperent) {
39
+ let shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])$/i;
40
+ hex = hex.replace(shorthandRegex, function (m, r, g, b, a) {
41
+ return a + a + r + r + g + g + b + b;
42
+ });
43
+ let result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
44
+ let rgb = {
45
+ 'red': parseInt(result[4], 16),
46
+ 'green': parseInt(result[3], 16),
47
+ 'blue': parseInt(result[2], 16),
48
+ 'alpha': (255 - parseInt(result[1], 16)) / 255
49
+ };
50
+ if (isTransperent)
51
+ rgb.alpha = 0;
52
+ return 'rgba(' + rgb.red + ',' + rgb.green + ',' + rgb.blue + ',' + rgb.alpha + ')';
53
+ }
54
+ getColor(colorIndex, colorType) {
55
+ let isTransperent = false;
56
+ if (!this.colorsData && !this.fileNotFound)
57
+ this.getColorData();
58
+ if (this.colorsData) {
59
+ if (this.colorsData[colorIndex - 1]) {
60
+ const grayHashCode = '00808080';
61
+ let hex = grayHashCode;
62
+ let color = this.colorsData[colorIndex - 1].split(',');
63
+ let colorAtrributes = +color[3];
64
+ switch (colorType) {
65
+ case MAGIC_FG_COLOR:
66
+ if (colorAtrributes != SYSTEM_FG && colorAtrributes != SYSTEM_FG_AND_SYSTEM_BG)
67
+ hex = (color[1]);
68
+ break;
69
+ case MAGIC_BG_COLOR:
70
+ if (colorAtrributes != SYSTEM_BG && colorAtrributes != SYSTEM_FG_AND_SYSTEM_BG) {
71
+ if (colorAtrributes == TRANSPERENT_BG)
72
+ isTransperent = true;
73
+ hex = (color[2]);
74
+ }
75
+ break;
76
+ default:
77
+ console.log('Please enter valid color type : 1-FG, 2-BG ' + colorIndex);
78
+ return '';
79
+ }
80
+ return this.hexToRgba('#' + hex, isTransperent);
81
+ }
82
+ else
83
+ console.log('Could not get color for number ' + colorIndex);
84
+ }
85
+ return '';
86
+ }
87
+ }
88
+ MagicColorService.ɵfac = function MagicColorService_Factory(t) { return new (t || MagicColorService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(COLOR_FILE_NAME)); };
89
+ MagicColorService.ɵprov = i0.ɵɵdefineInjectable({ token: MagicColorService, factory: MagicColorService.ɵfac, providedIn: 'root' });
90
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicColorService, [{
91
+ type: Injectable,
92
+ args: [{
93
+ providedIn: 'root'
94
+ }]
95
+ }], function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
96
+ type: Inject,
97
+ args: [COLOR_FILE_NAME]
98
+ }] }]; }, null); })();
99
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnaWMtY29sb3Iuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXIvc3JjL3NlcnZpY2VzL21hZ2ljLWNvbG9yLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsY0FBYyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25FLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQzs7O0FBR2xELE1BQU0sQ0FBQyxJQUFJLGVBQWUsR0FBRyxJQUFJLGNBQWMsQ0FBUyxXQUFXLEVBQUU7SUFDbkUsVUFBVSxFQUFFLE1B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KGNvbG9yQXRycmlidXRlcyA9PSBUUkFOU1BFUkVOVF9CRylcbiAgICAgICAgICAgICAgICBpc1RyYW5zcGVyZW50ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgaGV4ID0gKGNvbG9yWzJdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICBjb25zb2xlLmxvZygnUGxlYXNlIGVudGVyIHZhbGlkIGNvbG9yIHR5cGUgOiAxLUZHLCAyLUJHICcgKyBjb2xvckluZGV4KTtcbiAgICAgICAgICAgIHJldHVybiAnJztcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLmhleFRvUmdiYSgnIycgKyBoZXgsIGlzVHJhbnNwZXJlbnQpO1xuICAgICAgfSBlbHNlXG4gICAgICAgIGNvbnNvbGUubG9nKCdDb3VsZCBub3QgZ2V0IGNvbG9yIGZvciBudW1iZXIgJyArIGNvbG9ySW5kZXgpO1xuICAgIH1cblxuICAgIHJldHVybiAnJztcbiAgfVxufVxuIl19
@@ -0,0 +1,16 @@
1
+ import { Injectable } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class MagicLazyLoaderService {
4
+ Load(path) {
5
+ return Promise.reject('error in loading module :' + path);
6
+ }
7
+ }
8
+ MagicLazyLoaderService.ɵfac = function MagicLazyLoaderService_Factory(t) { return new (t || MagicLazyLoaderService)(); };
9
+ MagicLazyLoaderService.ɵprov = i0.ɵɵdefineInjectable({ token: MagicLazyLoaderService, factory: MagicLazyLoaderService.ɵfac, providedIn: 'root' });
10
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicLazyLoaderService, [{
11
+ type: Injectable,
12
+ args: [{
13
+ providedIn: 'root'
14
+ }]
15
+ }], null, null); })();
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnaWMubGF6eS5sb2FkZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXIvc3JjL3NlcnZpY2VzL21hZ2ljLmxhenkubG9hZGVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFLM0MsTUFBTSxPQUFPLHNCQUFzQjtJQUNqQyxJQUFJLENBQUMsSUFBWTtRQUNmLE9BQU8sT0FBTyxDQUFDLE1BQU0sQ0FBQywyQkFBMkIsR0FBRyxJQUFJLENBQUMsQ0FBQztJQUM1RCxDQUFDOzs0RkFIVSxzQkFBc0I7OERBQXRCLHNCQUFzQixXQUF0QixzQkFBc0IsbUJBRnBCLE1BQU07dUZBRVIsc0JBQXNCO2NBSGxDLFVBQVU7ZUFBQztnQkFDVixVQUFVLEVBQUcsTUFBTTthQUNwQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuXHJcbkBJbmplY3RhYmxlKHtcclxuICBwcm92aWRlZEluIDogJ3Jvb3QnXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBNYWdpY0xhenlMb2FkZXJTZXJ2aWNlIHtcclxuICBMb2FkKHBhdGg6IHN0cmluZyk6IFByb21pc2U8YW55PiB7XHJcbiAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QoJ2Vycm9yIGluIGxvYWRpbmcgbW9kdWxlIDonICsgcGF0aCk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -0,0 +1,25 @@
1
+ import { MagicServices } from "./magic.services";
2
+ import { TaskMagicService } from "./task.magics.service";
3
+ import { SubformMagicService } from "./subform.magic.service";
4
+ import { TableMagicService } from "./table.magic.service";
5
+ import { TitleMagicService } from "./title.magic.service";
6
+ import { AccessorMagicService } from "./accessor.magic.service";
7
+ import { MgDateAdapter, MG_FORMATS } from "./mg-date-adapter";
8
+ import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
9
+ export const matDateProviders = [
10
+ { provide: DateAdapter, useClass: MgDateAdapter },
11
+ { provide: MAT_DATE_FORMATS, useValue: MG_FORMATS }
12
+ ];
13
+ export const basicMagicProviders = [
14
+ MagicServices,
15
+ TaskMagicService,
16
+ SubformMagicService,
17
+ TitleMagicService,
18
+ AccessorMagicService,
19
+ matDateProviders,
20
+ ];
21
+ export const magicProviders = [
22
+ ...basicMagicProviders,
23
+ TableMagicService
24
+ ];
25
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnaWMucHJvdmlkZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci9zcmMvc2VydmljZXMvbWFnaWMucHJvdmlkZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNqRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUN6RCxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUMxRCxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUNoRSxPQUFPLEVBQUMsYUFBYSxFQUFFLFVBQVUsRUFBQyxNQUFNLG1CQUFtQixDQUFDO0FBQzVELE9BQU8sRUFBQyxXQUFXLEVBQUUsZ0JBQWdCLEV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ZGFwdGVyLCBNR19GT1JNQVRTfSBmcm9tIFwiLi9tZy1kYXRlLWFkYXB0ZXJcIjtcclxuaW1wb3J0IHtEYXRlQWRhcHRlciwgTUFUX0RBVEVfRk9STUFUU30gZnJvbSAnQGFuZ3VsYXIvbWF0ZXJpYWwvY29yZSc7XHJcblxyXG5leHBvcnQgY29uc3QgbWF0RGF0ZVByb3ZpZGVycyA9IFtcclxuICB7cHJvdmlkZTogRGF0ZUFkYXB0ZXIsIHVzZUNsYXNzOiBNZ0RhdGVBZGFwdGVyfSxcclxuICB7cHJvdmlkZTogTUFUX0RBVEVfRk9STUFUUywgdXNlVmFsdWU6IE1HX0ZPUk1BVFN9XHJcbl07XHJcblxyXG5cclxuLyoqXHJcbiAqIE1hZ2ljIHNlcnZpY2UgcHJvdmlkZXJzXHJcbiAqL1xyXG5leHBvcnQgY29uc3QgYmFzaWNNYWdpY1Byb3ZpZGVycyA9IFtcclxuICBNYWdpY1NlcnZpY2VzLFxyXG4gIFRhc2tNYWdpY1NlcnZpY2UsXHJcbiAgU3ViZm9ybU1hZ2ljU2VydmljZSxcclxuICBUaXRsZU1hZ2ljU2VydmljZSxcclxuICBBY2Nlc3Nvck1hZ2ljU2VydmljZSxcclxuICBtYXREYXRlUHJvdmlkZXJzLFxyXG5dO1xyXG5cclxuXHJcblxyXG4gIGV4cG9ydCBjb25zdCBtYWdpY1Byb3ZpZGVycyA9IFtcclxuICAgIC4uLmJhc2ljTWFnaWNQcm92aWRlcnMsXHJcbiAgICBUYWJsZU1hZ2ljU2VydmljZVxyXG5dO1xyXG4iXX0=
@@ -0,0 +1,31 @@
1
+ import { Injectable } from "@angular/core";
2
+ import { SubformMagicService } from "./subform.magic.service";
3
+ import { TableMagicService } from "./table.magic.service";
4
+ import { TaskMagicService } from "./task.magics.service";
5
+ import { TitleMagicService } from "./title.magic.service";
6
+ import { AccessorMagicService } from "./accessor.magic.service";
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "./task.magics.service";
9
+ import * as i2 from "./subform.magic.service";
10
+ import * as i3 from "./table.magic.service";
11
+ import * as i4 from "./title.magic.service";
12
+ import * as i5 from "./accessor.magic.service";
13
+ export class MagicServices {
14
+ constructor(task, subformService, tableService, titleService, mgAccessorService) {
15
+ this.task = task;
16
+ this.subformService = subformService;
17
+ this.tableService = tableService;
18
+ this.titleService = titleService;
19
+ this.mgAccessorService = mgAccessorService;
20
+ task.tableService = tableService;
21
+ task.mgSubformService = subformService;
22
+ task.mgTitleService = titleService;
23
+ task.mgAccessorService = mgAccessorService;
24
+ }
25
+ }
26
+ MagicServices.ɵfac = function MagicServices_Factory(t) { return new (t || MagicServices)(i0.ɵɵinject(i1.TaskMagicService), i0.ɵɵinject(i2.SubformMagicService), i0.ɵɵinject(i3.TableMagicService), i0.ɵɵinject(i4.TitleMagicService), i0.ɵɵinject(i5.AccessorMagicService)); };
27
+ MagicServices.ɵprov = i0.ɵɵdefineInjectable({ token: MagicServices, factory: MagicServices.ɵfac });
28
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicServices, [{
29
+ type: Injectable
30
+ }], function () { return [{ type: i1.TaskMagicService }, { type: i2.SubformMagicService }, { type: i3.TableMagicService }, { type: i4.TitleMagicService }, { type: i5.AccessorMagicService }]; }, null); })();
31
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnaWMuc2VydmljZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyL3NyYy9zZXJ2aWNlcy9tYWdpYy5zZXJ2aWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTNDLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzlELE9BQU8sRU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1nVGl0bGVTZXJ2aWNlID0gdGl0bGVTZXJ2aWNlO1xyXG4gICAgdGFzay5tZ0FjY2Vzc29yU2VydmljZSA9IG1nQWNjZXNzb3JTZXJ2aWNlO1xyXG4gIH1cclxuXHJcblxyXG59XHJcbiJdfQ==
@@ -0,0 +1,109 @@
1
+ import { MAT_DATE_LOCALE, NativeDateAdapter } from '@angular/material/core';
2
+ import { formatDate } from '@angular/common';
3
+ import { Platform } from '@angular/cdk/platform';
4
+ import { TaskMagicService } from "./task.magics.service";
5
+ import { Inject, Injectable } from "@angular/core";
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@angular/cdk/platform";
8
+ import * as i2 from "./task.magics.service";
9
+ export const MG_FORMATS = {
10
+ parse: { dateInput: { month: 'short', year: 'numeric', day: 'numeric' } },
11
+ display: {
12
+ dateInput: 'input',
13
+ monthYearLabel: { year: 'numeric', month: 'short' },
14
+ dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },
15
+ monthYearA11yLabel: { year: 'numeric', month: 'long' }
16
+ }
17
+ };
18
+ export class MgDateAdapter extends NativeDateAdapter {
19
+ constructor(platform, task, localeId) {
20
+ super(localeId, platform);
21
+ this.platform = platform;
22
+ this.task = task;
23
+ this.localeId = localeId;
24
+ this.mgdtfmt = null;
25
+ this.setLocale(localeId);
26
+ }
27
+ parse(value) {
28
+ let valueStr = value;
29
+ let date = 0, month = 0, year = 0;
30
+ let mgDateMask = this.mgdtfmt;
31
+ let sep = valueStr.indexOf('/') > 0 ? '/' : '-';
32
+ if (value == null || value == "")
33
+ return null;
34
+ if (this.mgdtfmt == null && this.task.mgInputDateFormat != null)
35
+ this.mgdtfmt = this.task.mgInputDateFormat;
36
+ if ((this.mgdtfmt.indexOf('MMM') > 0) || (this.mgdtfmt.indexOf('MMMM') > 0))
37
+ return new Date(value);
38
+ if (mgDateMask !== null) {
39
+ for (let i = 0; i < mgDateMask.length;) {
40
+ switch (mgDateMask[i]) {
41
+ case 'd':
42
+ {
43
+ let tmpStr;
44
+ let len = valueStr.indexOf(sep, 0);
45
+ tmpStr = len == -1 ? valueStr : valueStr.substr(0, len);
46
+ if (len > -1)
47
+ valueStr = valueStr.substr(len + 1);
48
+ for (; mgDateMask[i] == 'd'; i++)
49
+ ;
50
+ date = (Number)(tmpStr);
51
+ }
52
+ break;
53
+ case 'M':
54
+ {
55
+ let tmpStr;
56
+ let len = valueStr.indexOf(sep, 0);
57
+ tmpStr = len == -1 ? valueStr : valueStr.substr(0, len);
58
+ if (len > -1)
59
+ valueStr = valueStr.substr(len + 1);
60
+ for (; mgDateMask[i] == 'M'; i++)
61
+ ;
62
+ month = (Number)(tmpStr) > 0 ? (Number)(tmpStr) - 1 : 0;
63
+ }
64
+ break;
65
+ case 'y':
66
+ {
67
+ let tmpStr;
68
+ let len = valueStr.indexOf(sep, 0);
69
+ tmpStr = len == -1 ? valueStr : valueStr.substr(0, len);
70
+ if (len > -1) {
71
+ valueStr = valueStr.substr(len + 1);
72
+ }
73
+ for (; mgDateMask[i] == 'y'; i++)
74
+ ;
75
+ year = (Number)(tmpStr);
76
+ }
77
+ break;
78
+ default:
79
+ i++;
80
+ break;
81
+ }
82
+ }
83
+ if (month == 0 && year == 0 && date == 0)
84
+ return null;
85
+ return new Date(year, month, date);
86
+ }
87
+ }
88
+ format(date, displayFormat) {
89
+ if (this.mgdtfmt == null && this.task.mgInputDateFormat != null)
90
+ this.mgdtfmt = this.task.mgInputDateFormat;
91
+ if (displayFormat === 'input') {
92
+ if (this.mgdtfmt == null)
93
+ this.mgdtfmt = 'M/d/yyyy';
94
+ return formatDate(date, this.mgdtfmt, this.locale);
95
+ }
96
+ else {
97
+ return date.toDateString();
98
+ }
99
+ }
100
+ }
101
+ MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1.Platform), i0.ɵɵinject(i2.TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
102
+ MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
103
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
104
+ type: Injectable
105
+ }], function () { return [{ type: i1.Platform }, { type: i2.TaskMagicService }, { type: undefined, decorators: [{
106
+ type: Inject,
107
+ args: [MAT_DATE_LOCALE]
108
+ }] }]; }, null); })();
109
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWctZGF0ZS1hZGFwdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci9zcmMvc2VydmljZXMvbWctZGF0ZS1hZGFwdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxlQUFlLEVBQUUsaUJBQWlCLEVBQUMsTUFBTSx3QkFBd0IsQ0FBQztBQUMxRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDN0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ2pELE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQ3ZELE9BQU8sRUFBQyxNQUFNLEVBQUUsVUFBVSxFQUFDLE1BQU0sZUFBZSxDQUFDOzs7O0FBRWpELE1BQU0sQ0FBQyxNQUFNLFVBQVUsR0FBRztJQUN4QixLQUFLLEVBQUUsRUFBQyxTQUFTLEVBQUUsRUFBQyxLQUFLLEVBQUUsT0FBTyxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUsR0FBRyxFQUFFLFNBQVMsRUFBQyxFQUFDO0lBQ3JFLE9BQU8sRUFBRTtRQUNQLFNBQVMsRUFBRSxPQUFPO1FBQ2xCLGNBQWMsRUFBRSxFQUFDLElBQUksRUFBRSxTQU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odGhpcy5tZ2R0Zm10ID09IG51bGwgJiYgdGhpcy50YXNrLm1nSW5wdXREYXRlRm9ybWF0ICE9IG51bGwpXHJcbiAgICAgIHRoaXMubWdkdGZtdCA9IHRoaXMudGFzay5tZ0lucHV0RGF0ZUZvcm1hdDtcclxuICAgIGlmICgodGhpcy5tZ2R0Zm10LmluZGV4T2YoJ01NTScpID4gMCkgfHwgKHRoaXMubWdkdGZtdC5pbmRleE9mKCdNTU1NJykgPiAwKSlcclxuICAgICAgcmV0dXJuIG5ldyBEYXRlKHZhbHVlKTtcclxuICAgIGlmIChtZ0RhdGVNYXNrICE9PSBudWxsKSB7XHJcbiAgICAgIGZvciAobGV0IGk9MDsgaSA8IG1nRGF0ZU1hc2subGVuZ3RoOykge1xyXG4gICAgICAgIHN3aXRjaCAobWdEYXRlTWFza1tpXSkge1xyXG4gICAgICAgICAgY2FzZSAnZCc6IHtcclxuICAgICAgICAgICAgICBsZXQgdG1wU3RyOiBzdHJpbmc7XHJcbiAgICAgICAgICAgICAgbGV0IGxlbiA9IHZhbHVlU3RyLmluZGV4T2Yoc2VwLCAwKTtcclxuICAgICAgICAgICAgICB0bXBTdHIgPSBsZW4gPT0gLTEgPyB2YWx1ZVN0ciA6IHZhbHVlU3RyLnN1YnN0cigwLCBsZW4pO1xyXG4gICAgICAgICAgICAgIGlmIChsZW4gPiAtMSlcclxuICAgICAgICAgICAgICAgIHZhbHVlU3RyID0gdmFsdWVTdHIuc3Vic3RyKGxlbisxKTtcclxuICAgICAgICAgICAgICBmb3IgKDttZ0RhdGVNYXNrW2ldID09ICdkJzsgaSsrKTtcclxuICAgICAgICAgICAgICBkYXRlID0gKE51bWJlcikodG1wU3RyKTtcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICBjYXNlICdNJzoge1xyXG4gICAgICAgICAgICAgIGxldCB0bXBTdHI6IHN0cmluZztcclxuICAgICAgICAgICAgICBsZXQgbGVuID0gdmFsdWVTdHIuaW5kZXhPZihzZXAsIDApO1xyXG4gICAgICAgICAgICAgIHRtcFN0ciA9IGxlbiA9PSAtMSA/IHZhbHVlU3RyIDogdmFsdWVTdHIuc3Vic3RyKDAsIGxlbik7XHJcblxyXG4gICAgICAgICAgICAgIGlmIChsZW4gPiAtMSlcclxuICAgICAgICAgICAgICAgIHZhbHVlU3RyID0gdmFsdWVTdHIuc3Vic3RyKGxlbisxKTtcclxuXHJcbiAgICAgICAgICAgICAgZm9yICg7IG1nRGF0ZU1hc2tbaV0gPT0gJ00nIDtpKyspO1xyXG4gICAgICAgICAgICAgIG1vbnRoID0gKE51bWJlcikodG1wU3RyKSA+IDAgPyAoTnVtYmVyKSh0bXBTdHIpLSAxIDogMDtcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICBjYXNlICd5Jzoge1xyXG4gICAgICAgICAgICAgIGxldCB0bXBTdHI7XHJcbiAgICAgICAgICAgICAgbGV0IGxlbiA9IHZhbHVlU3RyLmluZGV4T2Yoc2VwLCAwKTtcclxuICAgICAgICAgICAgICB0bXBTdHIgPSBsZW4gPT0gLTEgPyB2YWx1ZVN0ciA6IHZhbHVlU3RyLnN1YnN0cigwLCBsZW4pO1xyXG4gICAgICAgICAgICAgIGlmIChsZW4gPiAtMSkge1xyXG4gICAgICAgICAgICAgICAgdmFsdWVTdHIgPSB2YWx1ZVN0ci5zdWJzdHIobGVuICsgMSk7XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgIGZvciAoOyBtZ0RhdGVNYXNrW2ldID09ICd5JyA7aSsrKTtcclxuICAgICAgICAgICAgICB5ZWFyID0gKE51bWJlcikodG1wU3RyKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgIGkrKztcclxuICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcblxyXG4gICAgICBpZiAobW9udGggPT0gMCAmJiB5ZWFyID09IDAgJiYgZGF0ZSA9PSAwKVxyXG4gICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICByZXR1cm4gbmV3IERhdGUoeWVhciwgbW9udGgsIGRhdGUpO1xyXG4gICAgfVxyXG5cclxufVxyXG5cclxuZm9ybWF0KGRhdGU6IERhdGUsIGRpc3BsYXlGb3JtYXQ6IE9iamVjdCk6IHN0cmluZyB7XHJcbiAgICBpZiAodGhpcy5tZ2R0Zm10ID09IG51bGwgJiYgdGhpcy50YXNrLm1nSW5wdXREYXRlRm9ybWF0ICE9IG51bGwpXHJcbiAgICAgIHRoaXMubWdkdGZtdCA9IHRoaXMudGFzay5tZ0lucHV0RGF0ZUZvcm1hdDtcclxuICAgIGlmIChkaXNwbGF5Rm9ybWF0ID09PSAnaW5wdXQnKSB7XHJcbiAgICAgIGlmICh0aGlzLm1nZHRmbXQgPT0gbnVsbClcclxuICAgICAgICB0aGlzLm1nZHRmbXQgPSAnTS9kL3l5eXknOyAvL2RlZmF1bHQgZm9ybWF0XHJcbiAgICAgIHJldHVybiBmb3JtYXREYXRlKGRhdGUsdGhpcy5tZ2R0Zm10LHRoaXMubG9jYWxlKTtcclxuICAgIH0gZWxzZSB7XHJcbiAgICAgIHJldHVybiBkYXRlLnRvRGF0ZVN0cmluZygpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG5cclxuIl19
@@ -0,0 +1,14 @@
1
+ import { Injectable } from "@angular/core";
2
+ import { MagicOverlayContainer } from "../ui/magic-modal/magic-overlay-container";
3
+ import * as i0 from "@angular/core";
4
+ export class OverlayContainerMagicProvider {
5
+ getComponent() {
6
+ return MagicOverlayContainer;
7
+ }
8
+ }
9
+ OverlayContainerMagicProvider.ɵfac = function OverlayContainerMagicProvider_Factory(t) { return new (t || OverlayContainerMagicProvider)(); };
10
+ OverlayContainerMagicProvider.ɵprov = i0.ɵɵdefineInjectable({ token: OverlayContainerMagicProvider, factory: OverlayContainerMagicProvider.ɵfac });
11
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayContainerMagicProvider, [{
12
+ type: Injectable
13
+ }], null, null); })();
14
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3ZlcmxheS5jb25haW5lci5tYWdpYy5wcm92aWRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXIvc3JjL3NlcnZpY2VzL292ZXJsYXkuY29uYWluZXIubWFnaWMucHJvdmlkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSwyQ0FBMkMsQ0FBQzs7QUFHbEYsTUFBTSxPQUFPLDZCQUE2QjtJQUN4QyxZQUFZO1FBQ1YsT0FBTyxxQkFBcUIsQ0FBQztJQUMvQixDQUFDOzswR0FIVSw2QkFBNkI7cUVBQTdCLDZCQUE2QixXQUE3Qiw2QkFBNkI7dUZBQTdCLDZCQUE2QjtjQUR6QyxVQUFVIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXHJcbiAqIFNlcnZpY2UgbWFuYWdpbmcgb3ZlcmxheSB3aW5kb3dzXHJcbiAqIFRoaXMgaXMgTWFnaWMncyBkZWZhdWx0IHByb3ZpZGVyXHJcbiAqL1xyXG5pbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSBcIkBhbmd1bGFyL2NvcmVcIjtcclxuaW1wb3J0IHsgTWFnaWNPdmVybGF5Q29udGFpbmVyIH0gZnJvbSBcIi4uL3VpL21hZ2ljLW1vZGFsL21hZ2ljLW92ZXJsYXktY29udGFpbmVyXCI7XHJcblxyXG5ASW5qZWN0YWJsZSgpXHJcbmV4cG9ydCBjbGFzcyBPdmVybGF5Q29udGFpbmVyTWFnaWNQcm92aWRlciB7XHJcbiAgZ2V0Q29tcG9uZW50KCkge1xyXG4gICAgcmV0dXJuIE1hZ2ljT3ZlcmxheUNvbnRhaW5lcjtcclxuICB9XHJcbn1cclxuIl19
@@ -0,0 +1,28 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { isNullOrUndefined } from '@magic-xpa/mscorelib';
3
+ import * as i0 from "@angular/core";
4
+ export class RouteCommand {
5
+ }
6
+ export class RouterCommandsMagicService {
7
+ constructor() {
8
+ this.pendingRouteCommands = [];
9
+ }
10
+ AddRouteCommand(routeCommand) {
11
+ this.pendingRouteCommands.push(routeCommand);
12
+ }
13
+ ExecuteNextCommand() {
14
+ let pendingRouteCommand = this.pendingRouteCommands.shift();
15
+ if (!isNullOrUndefined(pendingRouteCommand)) {
16
+ pendingRouteCommand.callerMgSubformServiceRef.ExecuteRouteCommand(pendingRouteCommand);
17
+ }
18
+ }
19
+ }
20
+ RouterCommandsMagicService.ɵfac = function RouterCommandsMagicService_Factory(t) { return new (t || RouterCommandsMagicService)(); };
21
+ RouterCommandsMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: RouterCommandsMagicService, factory: RouterCommandsMagicService.ɵfac, providedIn: 'root' });
22
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RouterCommandsMagicService, [{
23
+ type: Injectable,
24
+ args: [{
25
+ providedIn: 'root'
26
+ }]
27
+ }], null, null); })();
28
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLWNvbW1hbmRzLm1hZ2ljLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyL3NyYy9zZXJ2aWNlcy9yb3V0ZXItY29tbWFuZHMubWFnaWMuc2VydmljZS50cyJdLCJuY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