@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,42 @@
1
+ import { Styles } from "@magic-xpa/gui";
2
+ export class confirmationBox {
3
+ static isConfirmBox(style) {
4
+ let buttonMode = style & 0x0F;
5
+ var isConfirm = (buttonMode === Styles.MSGBOX_BUTTON_OK_CANCEL) ||
6
+ (buttonMode === Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE) ||
7
+ (buttonMode === Styles.MSGBOX_BUTTON_YES_NO_CANCEL) ||
8
+ (buttonMode === Styles.MSGBOX_BUTTON_YES_NO) ||
9
+ (buttonMode === Styles.MSGBOX_BUTTON_RETRY_CANCEL);
10
+ return (isConfirm);
11
+ }
12
+ static convertToExcpectedResultBox(style, okWasPressed) {
13
+ let buttonMode = style & 0x0F;
14
+ let retValue = Styles.MSGBOX_RESULT_OK;
15
+ if (buttonMode === Styles.MSGBOX_BUTTON_OK)
16
+ retValue = Styles.MSGBOX_RESULT_OK;
17
+ else if (buttonMode === Styles.MSGBOX_BUTTON_OK_CANCEL)
18
+ retValue = okWasPressed ? Styles.MSGBOX_RESULT_OK : Styles.MSGBOX_RESULT_CANCEL;
19
+ else if (buttonMode === Styles.MSGBOX_BUTTON_ABORT_RETRY_IGNORE)
20
+ retValue = okWasPressed ? Styles.MSGBOX_RESULT_ABORT : Styles.MSGBOX_RESULT_RETRY;
21
+ else if (buttonMode === Styles.MSGBOX_BUTTON_YES_NO_CANCEL)
22
+ retValue = okWasPressed ? Styles.MSGBOX_RESULT_YES : Styles.MSGBOX_RESULT_NO;
23
+ else if (buttonMode === Styles.MSGBOX_BUTTON_YES_NO)
24
+ retValue = okWasPressed ? Styles.MSGBOX_RESULT_YES : Styles.MSGBOX_RESULT_NO;
25
+ else if (buttonMode === Styles.MSGBOX_BUTTON_RETRY_CANCEL)
26
+ retValue = okWasPressed ? Styles.MSGBOX_RESULT_RETRY : Styles.MSGBOX_RESULT_CANCEL;
27
+ return retValue;
28
+ }
29
+ static showConfirmationBox(title, message, style) {
30
+ let okWasPressed = false;
31
+ let isConfirm = this.isConfirmBox(style);
32
+ let titleAndString = title + '\n' + '\n' + message;
33
+ if (isConfirm)
34
+ okWasPressed = confirm(titleAndString);
35
+ else {
36
+ alert(titleAndString);
37
+ okWasPressed = true;
38
+ }
39
+ return okWasPressed;
40
+ }
41
+ }
42
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnaWMtY29uZmlybWF0aW9uQm94LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci9zcmMvdWkvbWFnaWMtY29uZmlybWF0aW9uQm94LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxNQUFNLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUt0QyxNQUFNLE9BQU8sZUFBZTtJQUtuQixNQUFNLENBQUUsWUFBWSxDQUFDLEtBQWM7UUFHeEMsSUFBSSxVQUFVLEdBQVcsS0FBSyxHQUFHLElBQUksQ0FBQztRQUV0QyxJQUFJLFNBQVMsR0FBRyxDQUFDLFVBQVUsS0FBSyxNQUFNLENBQUMsdUJBQXVCLENBQUM7WUFDN0QsQ0FBQyxVQUFVLEtBQUssTUFBTSxDQUFDLGdDQUFnQyxDQUFDO1lBQ3hELENBQUMsVUFBVSxLQUFLLE1BQU0sQ0FBQywyQkFBMkIsQ0FBQztZQUNuRCxDQUFDLFVBQVUsS0FBSyxNQUFNLENBQUMsb0JBQW9CLENBQUM7WUFDNUMsQ0FBQyxVQUFVLEtBQUssTUFBTSxDQUFDLDBCQUEwQixDQUFDLENBQUM7UUFFckQsT0FBTyxD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gbGV0IHRpdGxlQW5kU3RyaW5nID0gdGl0bGUgKyAnXFxuJysgJ1xcbicgKyBtZXNzYWdlO1xyXG5cclxuICAgIGlmIChpc0NvbmZpcm0pXHJcbiAgICAgIG9rV2FzUHJlc3NlZCA9IGNvbmZpcm0odGl0bGVBbmRTdHJpbmcpO1xyXG4gICAgZWxzZSB7XHJcbiAgICAgIGFsZXJ0KHRpdGxlQW5kU3RyaW5nKTtcclxuICAgICAgb2tXYXNQcmVzc2VkID0gdHJ1ZTtcclxuICAgIH1cclxuXHJcbiAgICAvLyByZXR1cm4gdGhlIHJlc3VsdCBmcm9tIHRoZSB1c2VyXHJcbiAgICByZXR1cm4gb2tXYXNQcmVzc2VkOyBcclxuICB9XHJcbn1cclxuIl19
@@ -0,0 +1,22 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { Input, Output } from "@angular/core";
3
+ let BaseMagicOverlayContainer = class BaseMagicOverlayContainer {
4
+ };
5
+ __decorate([
6
+ Input(),
7
+ __metadata("design:type", Object)
8
+ ], BaseMagicOverlayContainer.prototype, "ModalComp", void 0);
9
+ __decorate([
10
+ Input(),
11
+ __metadata("design:type", Object)
12
+ ], BaseMagicOverlayContainer.prototype, "ModalCompParameters", void 0);
13
+ __decorate([
14
+ Output(),
15
+ __metadata("design:type", Object)
16
+ ], BaseMagicOverlayContainer.prototype, "onClose", void 0);
17
+ BaseMagicOverlayContainer = __decorate([
18
+ Input(),
19
+ Output()
20
+ ], BaseMagicOverlayContainer);
21
+ export { BaseMagicOverlayContainer };
22
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1tYWdpYy1vdmVybGF5LWNvbnRhaW5lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXIvc3JjL3VpL21hZ2ljLW1vZGFsL2Jhc2UtbWFnaWMtb3ZlcmxheS1jb250YWluZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBR3ZDLElBQWUseUJBQXlCLEdBQXhDLE1BQWUseUJBQXlCO0NBZTlDLENBQUE7QUFYQztJQUFDLEtBQUssRUFBRTs7NERBQW9CO0FBSzVCO0lBQUMsS0FBSyxFQUFFOztzRUFBbUM7QUFLM0M7SUFBQyxNQUFNLEVBQUU7OzBEQUFrQjtBQWRQLHlCQUF5QjtJQUY5QyxLQUFLLEVBQUU7SUFDUCxNQUFNLEVBQUU7R0FDYSx5QkFBeUIsQ0FlOUM7U0FmcUIseUJBQXlCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5wdXQsIE91dHB1dCB9IGZyb20gXCJAYW5ndWxhci9jb3JlXCI7XHJcbkBJbnB1dCgpXHJcbkBPdXRwdXQoKVxyXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgQmFzZU1hZ2ljT3ZlcmxheUNvbnRhaW5lciB7XHJcbiAgLyoqXHJcbiAgICpcclxuICAgKi9cclxuICBASW5wdXQoKSBhYnN0cmFjdCBNb2RhbENvbXA7XHJcblxyXG4gIC8qKlxyXG4gICAqXHJcbiAgICovXHJcbiAgQElucHV0KCkgYWJzdHJhY3QgTW9kYWxDb21wUGFyYW1ldGVyczogYW55O1xyXG5cclxuICAvKipcclxuICAgKlxyXG4gICAqL1xyXG4gIEBPdXRwdXQoKSBhYnN0cmFjdCBvbkNsb3NlO1xyXG59XHJcbiJdfQ==
@@ -0,0 +1,8 @@
1
+ export class ModalFormDefinition {
2
+ constructor() {
3
+ this.taskId = "";
4
+ this.comp = null;
5
+ this.parameters = {};
6
+ }
7
+ }
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnaWMtbW9kYWwtZm9ybS5qcyIsInNvdXJjZVJvb3QiOi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GFsIHdpbmRvd1xyXG4gICAqL1xyXG4gIFgoKTtcclxuICAvKipcclxuICAgKiBSZXR1cm5zIHRoZSBZIGNvb3JkaW5hdGUgb2YgdGhlIG1vZGFsIHdpbmRvd1xyXG4gICAqL1xyXG4gIFkoKTtcclxuICAvKipcclxuICAgKiBSZXR1cm5zIHRoZSB3aWR0aCBvZiBtb2RhbCB3aW5kb3dcclxuICAgKi9cclxuICBXaWR0aCgpOiBzdHJpbmc7XHJcbiAgLyoqXHJcbiAgICogUmV0dXJucyB0aGUgaGVpZ2h0IG9mIG1vZGFsIHdpbmRvd1xyXG4gICAqL1xyXG4gIEhlaWdodCgpOiBzdHJpbmc7XHJcbiAgLyoqXHJcbiAgICogSXMgdGhlIG1vZGFsIHdpbmRvdyBjZW50ZXJlZCByZWxhdGl2ZWx5IHRvIHRoZSBtYWluIHdpbmRvd1xyXG4gICAqL1xyXG4gIElzQ2VudGVyZWRUb1dpbmRvdygpO1xyXG4gIC8qKlxyXG4gICAqIFJldHVybnMgdGhlIG5hbWUgb2YgdGhlIGZvcm0gLSB0aXRsZSBvZiB0aGUgbW9kYWwgd2luZG93XHJcbiAgICovXHJcbiAgRm9ybU5hbWUoKTtcclxuICAvKipcclxuICAgKiBTaG91bGQgdGhlIHRpdGxlIGJhciBiZSBkaXNwbGF5ZWRcclxuICAgKi9cclxuICBTaG93VGl0bGVCYXIoKTtcclxuICAvKipcclxuICAgKiBTaG91bGQgdGhlIG1vZGFsIHdpbmRvdyBjbG9zZSB3aGVuIHRoZSB1c2VyIGNsaWNrcyBvbiB0aGUgYmFja2dyb3VuZFxyXG4gICAqL1xyXG4gIFNob3VsZENsb3NlT25CYWNrZ3JvdW5kQ2xpY2soKTtcclxufVxyXG4iXX0=
@@ -0,0 +1,121 @@
1
+ import { Component, Input, Output, EventEmitter, ViewChild, ComponentFactoryResolver, ElementRef, Injector, ChangeDetectorRef, Compiler } from '@angular/core';
2
+ import { BaseMagicOverlayContainer } from "./base-magic-overlay-container";
3
+ import { BaseMagicConfirmComponent } from "../components/base-magic-confirm.component";
4
+ import { BaseMagicAlertComponent } from "../components/base-magic-alert.component";
5
+ import { OverlayType } from "@magic-xpa/gui";
6
+ import { ComponentListMagicService } from "../../services/component-list.magic.service";
7
+ import { isNullOrUndefined } from '@magic-xpa/mscorelib';
8
+ import { MagicLazyLoaderService } from '../../services/magic.lazy.loader.service';
9
+ import * as i0 from "@angular/core";
10
+ import * as i1 from "../../services/component-list.magic.service";
11
+ import * as i2 from "../../services/magic.lazy.loader.service";
12
+ import * as i3 from "../directives/magic-focus.directive";
13
+ import * as i4 from "../directives/magicViewContainerRef.directive";
14
+ const _c0 = ["overlayContainerWrapper"];
15
+ export class MagicOverlayContainerWrapper {
16
+ constructor(componentListMagicService, magicLazyModuleLoader, injector, componentFactoryResolver, changeDetectorRef, compiler) {
17
+ this.componentListMagicService = componentListMagicService;
18
+ this.magicLazyModuleLoader = magicLazyModuleLoader;
19
+ this.injector = injector;
20
+ this.componentFactoryResolver = componentFactoryResolver;
21
+ this.changeDetectorRef = changeDetectorRef;
22
+ this.compiler = compiler;
23
+ this.Component = null;
24
+ this.Parameters = {};
25
+ this.onClose = new EventEmitter();
26
+ }
27
+ ngOnInit() {
28
+ let moduleRef = this.componentListMagicService.getModuleRef(this.Parameters.MagicFormName);
29
+ if (moduleRef == null) {
30
+ let lazyLoadModule = this.componentListMagicService.getLazyLoadModuleData(this.Parameters.MagicFormName);
31
+ if (lazyLoadModule != null) {
32
+ let moduleName = lazyLoadModule.moduleName.replace("Magic", "");
33
+ moduleName = moduleName.replace("Module", "");
34
+ this.magicLazyModuleLoader.Load(moduleName).then(m => {
35
+ const compiled = this.compiler.compileModuleAndAllComponentsSync(m[lazyLoadModule.moduleName]);
36
+ moduleRef = compiled.ngModuleFactory.create(this.injector);
37
+ this.loadComponent(moduleRef);
38
+ });
39
+ }
40
+ else {
41
+ this.loadComponent(null);
42
+ }
43
+ }
44
+ else
45
+ this.loadComponent(moduleRef);
46
+ }
47
+ loadComponent(moduleRef) {
48
+ this.Parameters.ModalComp = this.componentListMagicService.getComponent(this.Parameters.MagicFormName, !isNullOrUndefined(this.Parameters.MagicFormName));
49
+ let factory;
50
+ if (moduleRef != null)
51
+ factory = moduleRef.componentFactoryResolver.resolveComponentFactory(this.Component);
52
+ else
53
+ factory = this.componentFactoryResolver.resolveComponentFactory(this.Component);
54
+ let componentRef = this.overlayContentViewContainerRef.createComponent(factory);
55
+ let allowedBaseComp = MagicOverlayContainerWrapper.allowedBaseComps.get(this.OverlayTypeParam);
56
+ if (componentRef.instance instanceof allowedBaseComp.comp) {
57
+ Object.assign(componentRef.instance, this.Parameters);
58
+ componentRef.instance.onClose.subscribe((res) => {
59
+ this.onClose.emit(res);
60
+ });
61
+ }
62
+ else {
63
+ let msg = "Provided window container should subclass of : " + allowedBaseComp.error + "window will not work properly.";
64
+ alert(msg);
65
+ }
66
+ }
67
+ setViewContainerRef(vcRef) {
68
+ this.overlayContentViewContainerRef = vcRef;
69
+ }
70
+ GetRootElement() {
71
+ return this.overlayContainerWrapperElementRef.nativeElement;
72
+ }
73
+ DetectChanges() {
74
+ this.changeDetectorRef.detectChanges();
75
+ }
76
+ }
77
+ MagicOverlayContainerWrapper.allowedBaseComps = new Map([
78
+ [OverlayType.Overlay, { comp: BaseMagicOverlayContainer, error: 'BaseMagicOverlayContainer . Overlay ' }],
79
+ [OverlayType.Alert, { comp: BaseMagicAlertComponent, error: 'BaseMagicAlertComponent. Alert ' }],
80
+ [OverlayType.ConfirmationBox, { comp: BaseMagicConfirmComponent, error: 'BaseMagicConfirmComponent. Confirmation ' }]
81
+ ]);
82
+ MagicOverlayContainerWrapper.ɵfac = function MagicOverlayContainerWrapper_Factory(t) { return new (t || MagicOverlayContainerWrapper)(i0.ɵɵdirectiveInject(i1.ComponentListMagicService), i0.ɵɵdirectiveInject(i2.MagicLazyLoaderService), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.Compiler)); };
83
+ MagicOverlayContainerWrapper.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContainerWrapper, selectors: [["app-magic-overlay-container-wrapper"]], viewQuery: function MagicOverlayContainerWrapper_Query(rf, ctx) { if (rf & 1) {
84
+ i0.ɵɵviewQuery(_c0, 7);
85
+ } if (rf & 2) {
86
+ let _t;
87
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.overlayContainerWrapperElementRef = _t.first);
88
+ } }, 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) {
89
+ i0.ɵɵelementStart(0, "div");
90
+ i0.ɵɵelement(1, "div", 0);
91
+ i0.ɵɵelementStart(2, "div", 1, 2);
92
+ i0.ɵɵelement(4, "div", 3, 4);
93
+ i0.ɵɵelementEnd();
94
+ i0.ɵɵelement(6, "div", 5);
95
+ i0.ɵɵelementEnd();
96
+ } }, dependencies: [i3.MagicFocusDirective, i4.MagicViewContainerRef], styles: [".overlay-container-wrapper-background[_ngcontent-%COMP%]{position:fixed;z-index:999;inset:0}"] });
97
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainerWrapper, [{
98
+ type: Component,
99
+ args: [{ selector: 'app-magic-overlay-container-wrapper', template: `
100
+ <div>
101
+ <div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" magicFocus></div>
102
+ <div class="overlay-container-wrapper-background" #overlayContainerWrapper>
103
+ <div #overlayContent magicViewContainerRef>
104
+ </div>
105
+ </div>
106
+ <div class="overlay-container-wrapper-background" tabIndex="0" style="width: 0px; height: 0px;" ></div>
107
+ </div>
108
+ `, styles: [".overlay-container-wrapper-background{position:fixed;z-index:999;inset:0}\n"] }]
109
+ }], function () { return [{ type: i1.ComponentListMagicService }, { type: i2.MagicLazyLoaderService }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }, { type: i0.ChangeDetectorRef }, { type: i0.Compiler }]; }, { Component: [{
110
+ type: Input
111
+ }], Parameters: [{
112
+ type: Input
113
+ }], OverlayTypeParam: [{
114
+ type: Input
115
+ }], onClose: [{
116
+ type: Output
117
+ }], overlayContainerWrapperElementRef: [{
118
+ type: ViewChild,
119
+ args: ['overlayContainerWrapper', { static: true }]
120
+ }] }); })();
121
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnaWMtb3ZlcmxheS1jb250YWluZXItd3JhcHBlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXIvc3JjL3VpL21hZ2ljLW1vZGFsL21hZ2ljLW92ZXJsYXktY29udGFpbmVyLXdyYXBwZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxLQUFLLEVBQ0wsTUFBTSxFQUNOLFlBQVksRUFDWixTQUFTLEVBRVQsd0JBQXdCLEVBQ3hCLFVBQVUsRUFDVixRQUFRLEVBQUUsaUJBQWlCLEVBQUUsUUFBUSxFQUN0QyxNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUMzRSxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSw0Q0FBNEMsQ0FBQztBQUN2RixP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gIGlmIChjb21wb25lbnRSZWYuaW5zdGFuY2UgaW5zdGFuY2VvZiBhbGxvd2VkQmFzZUNvbXAuY29tcCkge1xyXG4gICAgICBPYmplY3QuYXNzaWduKGNvbXBvbmVudFJlZi5pbnN0YW5jZSwgdGhpcy5QYXJhbWV0ZXJzKTtcclxuICAgICAgKDxhbnk+Y29tcG9uZW50UmVmLmluc3RhbmNlKS5vbkNsb3NlLnN1YnNjcmliZSgocmVzKSA9PiB7XHJcbiAgICAgICAgdGhpcy5vbkNsb3NlLmVtaXQocmVzKTtcclxuICAgICAgfSk7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBsZXQgbXNnID0gXCJQcm92aWRlZCAgd2luZG93IGNvbnRhaW5lciBzaG91bGQgc3ViY2xhc3Mgb2YgOiBcIiArIGFsbG93ZWRCYXNlQ29tcC5lcnJvciArIFwid2luZG93IHdpbGwgbm90IHdvcmsgcHJvcGVybHkuXCI7XHJcbiAgICAgIGFsZXJ0KG1zZyk7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICBzZXRWaWV3Q29udGFpbmVyUmVmKHZjUmVmOiBWaWV3Q29udGFpbmVyUmVmKXtcclxuICAgIHRoaXMub3ZlcmxheUNvbnRlbnRWaWV3Q29udGFpbmVyUmVmID0gdmNSZWY7XHJcbiAgfVxyXG5cclxuICBHZXRSb290RWxlbWVudCgpOiBIVE1MRWxlbWVudCB7XHJcbiAgICByZXR1cm4gdGhpcy5vdmVybGF5Q29udGFpbmVyV3JhcHBlckVsZW1lbnRSZWYubmF0aXZlRWxlbWVudDtcclxuICB9XHJcblxyXG4gIERldGVjdENoYW5nZXMoKVxyXG4gIHtcclxuICAgIHRoaXMuY2hhbmdlRGV0ZWN0b3JSZWYuZGV0ZWN0Q2hhbmdlcygpO1xyXG4gIH1cclxufVxyXG4iXX0=
@@ -0,0 +1,159 @@
1
+ import { Component, ComponentFactoryResolver, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
2
+ import { isNullOrUndefined } from '@magic-xpa/mscorelib';
3
+ import { BaseMagicOverlayContainer } from './base-magic-overlay-container';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/common";
6
+ import * as i2 from "../directives/magicViewContainerRef.directive";
7
+ const _c0 = ["modalheader"];
8
+ const _c1 = ["modalForeground"];
9
+ function MagicOverlayContainer_button_2_Template(rf, ctx) { if (rf & 1) {
10
+ const _r5 = i0.ɵɵgetCurrentView();
11
+ i0.ɵɵelementStart(0, "button", 8);
12
+ i0.ɵɵlistener("click", function MagicOverlayContainer_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r4.OnClose()); });
13
+ i0.ɵɵtext(1, "X");
14
+ i0.ɵɵelementEnd();
15
+ } }
16
+ function MagicOverlayContainer_div_5_Template(rf, ctx) { if (rf & 1) {
17
+ const _r8 = i0.ɵɵgetCurrentView();
18
+ i0.ɵɵelementStart(0, "div", 9, 10);
19
+ i0.ɵɵtext(2);
20
+ i0.ɵɵelementStart(3, "button", 11);
21
+ i0.ɵɵlistener("click", function MagicOverlayContainer_div_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.OnClose()); });
22
+ i0.ɵɵtext(4, "X");
23
+ i0.ɵɵelementEnd()();
24
+ } if (rf & 2) {
25
+ const ctx_r2 = i0.ɵɵnextContext();
26
+ i0.ɵɵadvance(2);
27
+ i0.ɵɵtextInterpolate1(" ", ctx_r2.getText(), " ");
28
+ } }
29
+ export class MagicOverlayContainer extends BaseMagicOverlayContainer {
30
+ constructor(componentFactoryResolver) {
31
+ super();
32
+ this.componentFactoryResolver = componentFactoryResolver;
33
+ this.ModalComp = null;
34
+ this.ModalCompParameters = {};
35
+ this.onClose = new EventEmitter();
36
+ this.componentRef = null;
37
+ }
38
+ ngOnInit() {
39
+ const factory = this.componentFactoryResolver.resolveComponentFactory(this.ModalComp);
40
+ this.componentRef = this.modalbodyViewContainerRef.createComponent(factory);
41
+ Object.assign(this.componentRef.instance, this.ModalCompParameters);
42
+ }
43
+ setViewContainerRef(vcRef) {
44
+ this.modalbodyViewContainerRef = vcRef;
45
+ }
46
+ getText() {
47
+ if (this.componentRef !== null) {
48
+ let comp = this.componentRef.instance;
49
+ return comp.FormName();
50
+ }
51
+ else
52
+ return '';
53
+ }
54
+ getStyle() {
55
+ let styles = {};
56
+ if (this.componentRef != undefined) {
57
+ let comp = this.componentRef.instance;
58
+ styles['width'] = comp.Width();
59
+ styles['height'] = comp.Height();
60
+ if (comp.IsCenteredToWindow()) {
61
+ styles['margin'] = 'auto';
62
+ }
63
+ else {
64
+ styles['margin-left'] = comp.X() + 'px';
65
+ styles['margin-top'] = comp.Y() + 'px';
66
+ }
67
+ }
68
+ return styles;
69
+ }
70
+ getClientAreaStyles() {
71
+ let styles = {};
72
+ if (this.componentRef != undefined) {
73
+ const headerHeight = this.getShowTitleBar() && !isNullOrUndefined(this.headerElementRef) ? (this.headerElementRef.nativeElement.offsetHeight + 1) : 0;
74
+ if (!isNullOrUndefined(this.foregroundElementRef)) {
75
+ const foregroundHeight = this.foregroundElementRef.nativeElement.offsetHeight;
76
+ styles['height'] = (foregroundHeight - headerHeight) + 'px';
77
+ const foregroundWidth = this.foregroundElementRef.nativeElement.offsetWidth;
78
+ styles['width'] = (foregroundWidth) + 'px';
79
+ }
80
+ styles['overflow'] = 'auto';
81
+ }
82
+ return styles;
83
+ }
84
+ getShowTitleBar() {
85
+ if (this.componentRef != undefined) {
86
+ let comp = this.componentRef.instance;
87
+ return comp.ShowTitleBar();
88
+ }
89
+ }
90
+ OnClose() {
91
+ this.onClose.emit();
92
+ }
93
+ OnBackgroundClick() {
94
+ let comp = this.componentRef.instance;
95
+ if (comp.ShouldCloseOnBackgroundClick())
96
+ this.OnClose();
97
+ }
98
+ }
99
+ MagicOverlayContainer.ɵfac = function MagicOverlayContainer_Factory(t) { return new (t || MagicOverlayContainer)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver)); };
100
+ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContainer, selectors: [["app-magic-overlay-container"]], viewQuery: function MagicOverlayContainer_Query(rf, ctx) { if (rf & 1) {
101
+ i0.ɵɵviewQuery(_c0, 5);
102
+ i0.ɵɵviewQuery(_c1, 5);
103
+ } if (rf & 2) {
104
+ let _t;
105
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerElementRef = _t.first);
106
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.foregroundElementRef = _t.first);
107
+ } }, 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) {
108
+ i0.ɵɵelementStart(0, "div")(1, "div", 0);
109
+ i0.ɵɵlistener("click", function MagicOverlayContainer_Template_div_click_1_listener() { return ctx.OnBackgroundClick(); });
110
+ i0.ɵɵtemplate(2, MagicOverlayContainer_button_2_Template, 2, 0, "button", 1);
111
+ i0.ɵɵelementEnd();
112
+ i0.ɵɵelementStart(3, "div", 2, 3);
113
+ i0.ɵɵtemplate(5, MagicOverlayContainer_div_5_Template, 5, 1, "div", 4);
114
+ i0.ɵɵelementStart(6, "div", 5);
115
+ i0.ɵɵelement(7, "div", 6, 7);
116
+ i0.ɵɵelementEnd()()();
117
+ } if (rf & 2) {
118
+ i0.ɵɵadvance(2);
119
+ i0.ɵɵproperty("ngIf", !ctx.getShowTitleBar());
120
+ i0.ɵɵadvance(1);
121
+ i0.ɵɵproperty("ngStyle", ctx.getStyle());
122
+ i0.ɵɵadvance(2);
123
+ i0.ɵɵproperty("ngIf", ctx.getShowTitleBar());
124
+ i0.ɵɵadvance(1);
125
+ i0.ɵɵproperty("ngStyle", ctx.getClientAreaStyles());
126
+ } }, dependencies: [i1.NgIf, i1.NgStyle, i2.MagicViewContainerRef], styles: [".modal-foreground[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#fff}.modal-background[_ngcontent-%COMP%]{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header[_ngcontent-%COMP%]{background-color:beige;border-bottom:2px solid red}"] });
127
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicOverlayContainer, [{
128
+ type: Component,
129
+ args: [{ selector: 'app-magic-overlay-container', template: `
130
+ <div>
131
+ <div class="modal-background" (click)="OnBackgroundClick()">
132
+ <button (click)="OnClose()" tabindex="-1" style="float:right; border: none; background-color: transparent; outline: none; color: white" *ngIf="!getShowTitleBar()">X</button>
133
+ </div>
134
+ <div #modalForeground class="modal-foreground" [ngStyle]="getStyle()">
135
+ <div #modalheader class="modal-header" *ngIf="getShowTitleBar()">
136
+ {{getText()}}
137
+ <button (click)="OnClose()" style="float:right" tabindex="-1">X</button>
138
+ </div>
139
+ <div [ngStyle]="getClientAreaStyles()">
140
+ <div #modalbody magicViewContainerRef>
141
+ </div>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ `, styles: [".modal-foreground{position:fixed;inset:0;background-color:#fff}.modal-background{position:fixed;inset:0;background-color:#000;opacity:.75}.modal-header{background-color:beige;border-bottom:2px solid red}\n"] }]
146
+ }], function () { return [{ type: i0.ComponentFactoryResolver }]; }, { headerElementRef: [{
147
+ type: ViewChild,
148
+ args: ['modalheader', { static: false }]
149
+ }], foregroundElementRef: [{
150
+ type: ViewChild,
151
+ args: ['modalForeground', { static: false }]
152
+ }], ModalComp: [{
153
+ type: Input
154
+ }], ModalCompParameters: [{
155
+ type: Input
156
+ }], onClose: [{
157
+ type: Output
158
+ }] }); })();
159
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFnaWMtb3ZlcmxheS1jb250YWluZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyL3NyYy91aS9tYWdpYy1tb2RhbC9tYWdpYy1vdmVybGF5LWNvbnRhaW5lci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUNULHdCQUF3QixFQUN4QixVQUFVLEVBQ1YsWUFBWSxFQUNaLEtBQUssRUFFTCxNQUFNLEVBQ04sU0FBUyxFQUVWLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3pELE9BQU8sRUFBRSx5QkFBeUIsRUFBRSxNQUFNLGdDQUFnQyxDQUFDOzs7Ozs7OztJQVduRSxpQ0FBbUs7SUFBM0oscUtBQVMsZUFBQSxnQkFBUyxDQUFBLElBQUM7SUFBd0ksaUJBQUM7SUFBQSxpQkFBUzs7OztJQUc3SyxrQ0FBaUU7SUFDL0QsWUFDQTtJQUFBLGtDQUE4RDtJQUF0RCxrS0FBUyxlQUFBLGdCQUFTLENBQUEsSUFBQztJQUFtQyxpQkFBQztJQUFBLGlCQUFTLEVBQUE7OztJQUR4RSxlQUNBO0lBREEsaURBQ0E7O0FBV1YsTUFBTSxPQUFPLHFCQUFzQixTQUFRLHlCQUF5QjtJQW9DbEUsWUFDVSx3QkFBa0Q7UUFDMUQsS0FBSyxF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