@magic-xpa/angular 4.801.0-dev481.243 → 4.801.0-dev481.249

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 (127) 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/{esm2015/src/controls.metadata.model.js → esm2020/src/controls.metadata.model.mjs} +0 -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/{esm2015/src/services/StylesMapManager.js → esm2020/src/services/StylesMapManager.mjs} +0 -0
  9. package/{esm2015/src/services/accessor.magic.service.js → esm2020/src/services/accessor.magic.service.mjs} +2 -2
  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/{esm2015/src/services/subform.magic.service.js → esm2020/src/services/subform.magic.service.mjs} +14 -10
  22. package/{esm2015/src/services/table.magic.service.js → esm2020/src/services/table.magic.service.mjs} +2 -2
  23. package/{esm2015/src/services/task.magics.service.js → esm2020/src/services/task.magics.service.mjs} +2 -2
  24. package/{esm2015/src/services/title.magic.service.js → esm2020/src/services/title.magic.service.mjs} +2 -2
  25. package/{esm2015/src/ui/GuiInteractiveExecutor.js → esm2020/src/ui/GuiInteractiveExecutor.mjs} +0 -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/{esm2015/src/ui/directives/magic/row.magic.directive.js → esm2020/src/ui/directives/magic/row.magic.directive.mjs} +2 -2
  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/{esm2015/src/ui/directives/magicViewContainerRef.directive.js → esm2020/src/ui/directives/magicViewContainerRef.directive.mjs} +3 -3
  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/{esm2015/src/ui/pipes/date.magic.pipe.js → esm2020/src/ui/pipes/date.magic.pipe.mjs} +3 -3
  54. package/{esm2015/src/ui/pipes/time.magic.pipe.js → esm2020/src/ui/pipes/time.magic.pipe.mjs} +3 -3
  55. package/{esm2015/src/ui/router-container.magic.component.js → esm2020/src/ui/router-container.magic.component.mjs} +2 -2
  56. package/{esm2015/src/ui/subform.magic.component.js → esm2020/src/ui/subform.magic.component.mjs} +3 -3
  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} +433 -412
  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 +2 -2
  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 +6 -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/components/base-magic-alert.component.d.ts +2 -2
  83. package/src/ui/components/base-magic-confirm.component.d.ts +2 -2
  84. package/src/ui/components/magic-alert.component.d.ts +2 -2
  85. package/src/ui/components/magic-confirmation-box.component.d.ts +2 -2
  86. package/src/ui/directives/NonMagicControlDirective.d.ts +2 -2
  87. package/src/ui/directives/magic/checkbox-noformcontrol.magic.directive.d.ts +2 -2
  88. package/src/ui/directives/magic/checkbox.magic.directive.d.ts +2 -2
  89. package/src/ui/directives/magic/combobox.magic.directive.d.ts +2 -2
  90. package/src/ui/directives/magic/form-controls/control-value-accessors/checkbox.cva.directive.d.ts +2 -2
  91. package/src/ui/directives/magic/form-controls/control-value-accessors/date.cva.directive.d.ts +2 -2
  92. package/src/ui/directives/magic/form-controls/control-value-accessors/default.cva.directive.d.ts +2 -2
  93. package/src/ui/directives/magic/input.noformcontrol.magic.directive.d.ts +2 -2
  94. package/src/ui/directives/magic/nocontrol.magic.directive.d.ts +2 -2
  95. package/src/ui/directives/magic/row.magic.directive.d.ts +2 -2
  96. package/src/ui/directives/magic-focus.directive.d.ts +2 -2
  97. package/src/ui/directives/magic.directive.d.ts +2 -2
  98. package/src/ui/directives/magicViewContainerRef.directive.d.ts +2 -2
  99. package/src/ui/directives/mgformat.magic.directive.d.ts +2 -2
  100. package/src/ui/directives/range-validator.magic.directive.d.ts +2 -2
  101. package/src/ui/magic-modal/magic-overlay-container-wrapper.d.ts +7 -5
  102. package/src/ui/magic-modal/magic-overlay-container.d.ts +2 -2
  103. package/src/ui/magic-root.component.d.ts +2 -2
  104. package/src/ui/mgerror.magic.component.d.ts +2 -2
  105. package/src/ui/pipes/date.magic.pipe.d.ts +2 -2
  106. package/src/ui/pipes/time.magic.pipe.d.ts +2 -2
  107. package/src/ui/router-container.magic.component.d.ts +2 -2
  108. package/src/ui/subform.magic.component.d.ts +2 -2
  109. package/src/ui/task-base.magic.component.d.ts +2 -2
  110. package/bundles/magic-xpa-angular.umd.js +0 -5028
  111. package/bundles/magic-xpa-angular.umd.js.map +0 -1
  112. package/bundles/magic-xpa-angular.umd.min.js +0 -16
  113. package/bundles/magic-xpa-angular.umd.min.js.map +0 -1
  114. package/esm2015/index.js +0 -56
  115. package/esm2015/src/magic.core.module.js +0 -173
  116. package/esm2015/src/services/OverlayWindowService.js +0 -205
  117. package/esm2015/src/services/component-list.magic.service.js +0 -36
  118. package/esm2015/src/services/engine.magic.service.js +0 -82
  119. package/esm2015/src/services/router-commands.magic.service.js +0 -25
  120. package/esm2015/src/ui/components/magic-alert.component.js +0 -72
  121. package/esm2015/src/ui/components/magic-confirmation-box.component.js +0 -83
  122. package/esm2015/src/ui/directives/magic.directive.js +0 -207
  123. package/esm2015/src/ui/magic-modal/magic-overlay-container-wrapper.js +0 -131
  124. package/esm2015/src/ui/magic-modal/magic-overlay-container.js +0 -169
  125. package/esm2015/src/ui/magic-root.component.js +0 -237
  126. package/esm2015/src/ui/mgerror.magic.component.js +0 -120
  127. package/fesm2015/magic-xpa-angular.js.map +0 -1
@@ -1,120 +0,0 @@
1
- import { ChangeDetectorRef, Component, ElementRef, Input, ViewChild } from "@angular/core";
2
- import { AccessorMagicService } from "../services/accessor.magic.service";
3
- import { TaskMagicService } from "../services/task.magics.service";
4
- import { isUndefined } from "@magic-xpa/mscorelib";
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "../services/task.magics.service";
7
- import * as i2 from "../services/accessor.magic.service";
8
- import * as i3 from "@angular/common";
9
- const _c0 = ["customContent"];
10
- function ErrorMagicComponent_div_0_span_4_Template(rf, ctx) { if (rf & 1) {
11
- i0.ɵɵelementStart(0, "span");
12
- i0.ɵɵtext(1);
13
- i0.ɵɵelementEnd();
14
- } if (rf & 2) {
15
- const ctx_r2 = i0.ɵɵnextContext(2);
16
- i0.ɵɵadvance(1);
17
- i0.ɵɵtextInterpolate1(" ", ctx_r2.mgService.getErrMsg(ctx_r2.id, ctx_r2.rowId), " ");
18
- } }
19
- function ErrorMagicComponent_div_0_Template(rf, ctx) { if (rf & 1) {
20
- i0.ɵɵelementStart(0, "div");
21
- i0.ɵɵelementStart(1, "div", null, 1);
22
- i0.ɵɵprojection(3);
23
- i0.ɵɵelementEnd();
24
- i0.ɵɵtemplate(4, ErrorMagicComponent_div_0_span_4_Template, 2, 1, "span", 0);
25
- i0.ɵɵelementEnd();
26
- } if (rf & 2) {
27
- const ctx_r0 = i0.ɵɵnextContext();
28
- i0.ɵɵadvance(4);
29
- i0.ɵɵproperty("ngIf", ctx_r0.defaultDisplay);
30
- } }
31
- const _c1 = ["*"];
32
- export class ErrorMagicComponent {
33
- constructor(_task, mgService, changeDetectorRef) {
34
- this._task = _task;
35
- this.mgService = mgService;
36
- this.changeDetectorRef = changeDetectorRef;
37
- this.defaultDisplay = true;
38
- this.rowId = "0";
39
- }
40
- set magic(val) {
41
- this.id = val;
42
- }
43
- ;
44
- set rowId1(val) {
45
- this.rowId = val;
46
- }
47
- ;
48
- set CustomContent(innerComponent) {
49
- this.defaultDisplay = innerComponent == undefined || this.isEmpty(innerComponent.nativeElement);
50
- this.changeDetectorRef.detectChanges();
51
- }
52
- ;
53
- isEmpty(element) {
54
- const nodes = element.childNodes;
55
- for (let i = 0; i < nodes.length; i++) {
56
- const node = nodes.item(i);
57
- if (node.nodeType !== 8 && nodes.item(i).textContent.trim().length !== 0) {
58
- return false;
59
- }
60
- }
61
- return true;
62
- }
63
- HasErrors(id) {
64
- if (!isUndefined(id)) {
65
- let control = this._task.getFormControl(this.rowId, id);
66
- if (control !== null) {
67
- if (control.dirty && (control.hasError('pattern') || control.hasError('required') ||
68
- control.hasError('rangevalidator') || control.hasError('maxlength') || control.hasError('max')))
69
- return true;
70
- if (control.touched && control.hasError('required'))
71
- return true;
72
- if (this._task.Records.list[this.rowId] && this._task.Records.list[this.rowId].getControlMetadata(id)) {
73
- let controlMetadata = this._task.Records.list[this.rowId].getControlMetadata(id);
74
- for (let customValidator of controlMetadata.customValidators.keys()) {
75
- if (control.hasError(customValidator))
76
- return true;
77
- }
78
- }
79
- }
80
- }
81
- return false;
82
- }
83
- }
84
- ErrorMagicComponent.ɵfac = function ErrorMagicComponent_Factory(t) { return new (t || ErrorMagicComponent)(i0.ɵɵdirectiveInject(i1.TaskMagicService), i0.ɵɵdirectiveInject(i2.AccessorMagicService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
85
- ErrorMagicComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ErrorMagicComponent, selectors: [["mgError"]], viewQuery: function ErrorMagicComponent_Query(rf, ctx) { if (rf & 1) {
86
- i0.ɵɵviewQuery(_c0, true);
87
- } if (rf & 2) {
88
- var _t;
89
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.CustomContent = _t.first);
90
- } }, 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) {
91
- i0.ɵɵprojectionDef();
92
- i0.ɵɵtemplate(0, ErrorMagicComponent_div_0_Template, 5, 1, "div", 0);
93
- } if (rf & 2) {
94
- i0.ɵɵproperty("ngIf", ctx.HasErrors(ctx.id));
95
- } }, directives: [i3.NgIf], encapsulation: 2 });
96
- (function () { i0.ɵsetClassMetadata(ErrorMagicComponent, [{
97
- type: Component,
98
- args: [{
99
- selector: 'mgError',
100
- template: `<div *ngIf="HasErrors(id)">
101
- <div #customContent>
102
- <ng-content></ng-content>
103
- </div>
104
- <span *ngIf="defaultDisplay">
105
- {{mgService.getErrMsg(id, rowId)}}
106
- </span>
107
- </div>
108
- `
109
- }]
110
- }], function () { return [{ type: i1.TaskMagicService }, { type: i2.AccessorMagicService }, { type: i0.ChangeDetectorRef }]; }, { magic: [{
111
- type: Input,
112
- args: ['magic']
113
- }], rowId1: [{
114
- type: Input,
115
- args: ['rowId']
116
- }], CustomContent: [{
117
- type: ViewChild,
118
- args: ['customContent', { static: false }]
119
- }] }); })();
120
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWdlcnJvci5tYWdpYy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cm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