@magic-xpa/angular 4.801.0-dev481.299 → 4.801.0-dev481.303
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.
- package/esm2020/src/services/accessor.magic.service.mjs +1 -1
- package/esm2020/src/services/magic-color.service.mjs +25 -9
- package/esm2020/src/ui/components/magic-alert.component.mjs +3 -7
- package/esm2020/src/ui/components/magic-confirmation-box.component.mjs +4 -9
- package/esm2020/src/ui/magic-modal/magic-overlay-container.mjs +4 -8
- package/esm2020/src/ui/mgerror.magic.component.mjs +2 -3
- package/fesm2015/magic-xpa-angular.mjs +36 -32
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +34 -32
- package/fesm2020/magic-xpa-angular.mjs.map +1 -1
- package/package.json +3 -3
- package/src/services/accessor.magic.service.d.ts +1 -1
- package/src/services/magic-color.service.d.ts +5 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isNullOrUndefined, NString, List, isUndefined, StringBuilder, RefParam } from '@magic-xpa/mscorelib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, Component, Input, Output, EventEmitter, Directive, ViewChild, HostListener, Optional, Pipe, forwardRef, NgModule } from '@angular/core';
|
|
3
|
+
import { Injectable, Component, Input, Output, EventEmitter, Directive, ViewChild, InjectionToken, Inject, HostListener, Optional, Pipe, forwardRef, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { DatePipe, CommonModule, formatDate } from '@angular/common';
|
|
6
6
|
import * as i2 from '@angular/router';
|
|
@@ -1095,8 +1095,7 @@ function MagicOverlayContainer_div_5_Template(rf, ctx) {
|
|
|
1095
1095
|
i0.ɵɵelementStart(3, "button", 11);
|
|
1096
1096
|
i0.ɵɵlistener("click", function MagicOverlayContainer_div_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.OnClose(); });
|
|
1097
1097
|
i0.ɵɵtext(4, "X");
|
|
1098
|
-
i0.ɵɵelementEnd();
|
|
1099
|
-
i0.ɵɵelementEnd();
|
|
1098
|
+
i0.ɵɵelementEnd()();
|
|
1100
1099
|
}
|
|
1101
1100
|
if (rf & 2) {
|
|
1102
1101
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
@@ -1187,8 +1186,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
|
|
|
1187
1186
|
}
|
|
1188
1187
|
}, 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) {
|
|
1189
1188
|
if (rf & 1) {
|
|
1190
|
-
i0.ɵɵelementStart(0, "div");
|
|
1191
|
-
i0.ɵɵelementStart(1, "div", 0);
|
|
1189
|
+
i0.ɵɵelementStart(0, "div")(1, "div", 0);
|
|
1192
1190
|
i0.ɵɵlistener("click", function MagicOverlayContainer_Template_div_click_1_listener() { return ctx.OnBackgroundClick(); });
|
|
1193
1191
|
i0.ɵɵtemplate(2, MagicOverlayContainer_button_2_Template, 2, 0, "button", 1);
|
|
1194
1192
|
i0.ɵɵelementEnd();
|
|
@@ -1196,9 +1194,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
|
|
|
1196
1194
|
i0.ɵɵtemplate(5, MagicOverlayContainer_div_5_Template, 5, 1, "div", 4);
|
|
1197
1195
|
i0.ɵɵelementStart(6, "div", 5);
|
|
1198
1196
|
i0.ɵɵelement(7, "div", 6, 7);
|
|
1199
|
-
i0.ɵɵelementEnd();
|
|
1200
|
-
i0.ɵɵelementEnd();
|
|
1201
|
-
i0.ɵɵelementEnd();
|
|
1197
|
+
i0.ɵɵelementEnd()()();
|
|
1202
1198
|
}
|
|
1203
1199
|
if (rf & 2) {
|
|
1204
1200
|
i0.ɵɵadvance(2);
|
|
@@ -1264,9 +1260,7 @@ class MagicAlertComponent extends BaseMagicAlertComponent {
|
|
|
1264
1260
|
MagicAlertComponent.ɵfac = function () { let ɵMagicAlertComponent_BaseFactory; return function MagicAlertComponent_Factory(t) { return (ɵMagicAlertComponent_BaseFactory || (ɵMagicAlertComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MagicAlertComponent)))(t || MagicAlertComponent); }; }();
|
|
1265
1261
|
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) {
|
|
1266
1262
|
if (rf & 1) {
|
|
1267
|
-
i0.ɵɵelementStart(0, "div");
|
|
1268
|
-
i0.ɵɵelementStart(1, "div", 0);
|
|
1269
|
-
i0.ɵɵelementStart(2, "h2");
|
|
1263
|
+
i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "h2");
|
|
1270
1264
|
i0.ɵɵtext(3);
|
|
1271
1265
|
i0.ɵɵelementEnd();
|
|
1272
1266
|
i0.ɵɵelementStart(4, "p");
|
|
@@ -1275,9 +1269,7 @@ MagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicAlertComponent,
|
|
|
1275
1269
|
i0.ɵɵelementStart(6, "button", 1);
|
|
1276
1270
|
i0.ɵɵlistener("click", function MagicAlertComponent_Template_button_click_6_listener() { return ctx.OnClose(); });
|
|
1277
1271
|
i0.ɵɵtext(7, "OK");
|
|
1278
|
-
i0.ɵɵelementEnd();
|
|
1279
|
-
i0.ɵɵelementEnd();
|
|
1280
|
-
i0.ɵɵelementEnd();
|
|
1272
|
+
i0.ɵɵelementEnd()()();
|
|
1281
1273
|
}
|
|
1282
1274
|
if (rf & 2) {
|
|
1283
1275
|
i0.ɵɵadvance(3);
|
|
@@ -1337,14 +1329,11 @@ class MagicConfirmationBoxComponent extends BaseMagicConfirmComponent {
|
|
|
1337
1329
|
MagicConfirmationBoxComponent.ɵfac = function () { let ɵMagicConfirmationBoxComponent_BaseFactory; return function MagicConfirmationBoxComponent_Factory(t) { return (ɵMagicConfirmationBoxComponent_BaseFactory || (ɵMagicConfirmationBoxComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MagicConfirmationBoxComponent)))(t || MagicConfirmationBoxComponent); }; }();
|
|
1338
1330
|
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) {
|
|
1339
1331
|
if (rf & 1) {
|
|
1340
|
-
i0.ɵɵelementStart(0, "div");
|
|
1341
|
-
i0.ɵɵelementStart(1, "div", 0);
|
|
1342
|
-
i0.ɵɵelementStart(2, "h2");
|
|
1332
|
+
i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "h2");
|
|
1343
1333
|
i0.ɵɵtext(3);
|
|
1344
1334
|
i0.ɵɵelementEnd();
|
|
1345
1335
|
i0.ɵɵtext(4);
|
|
1346
|
-
i0.ɵɵelement(5, "br");
|
|
1347
|
-
i0.ɵɵelement(6, "br");
|
|
1336
|
+
i0.ɵɵelement(5, "br")(6, "br");
|
|
1348
1337
|
i0.ɵɵelementStart(7, "button", 1);
|
|
1349
1338
|
i0.ɵɵlistener("click", function MagicConfirmationBoxComponent_Template_button_click_7_listener() { return ctx.OnClose(true); });
|
|
1350
1339
|
i0.ɵɵtext(8, "OK");
|
|
@@ -1352,9 +1341,7 @@ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfir
|
|
|
1352
1341
|
i0.ɵɵelementStart(9, "button", 2);
|
|
1353
1342
|
i0.ɵɵlistener("click", function MagicConfirmationBoxComponent_Template_button_click_9_listener() { return ctx.OnClose(false); });
|
|
1354
1343
|
i0.ɵɵtext(10, "Cancel");
|
|
1355
|
-
i0.ɵɵelementEnd();
|
|
1356
|
-
i0.ɵɵelementEnd();
|
|
1357
|
-
i0.ɵɵelementEnd();
|
|
1344
|
+
i0.ɵɵelementEnd()()();
|
|
1358
1345
|
}
|
|
1359
1346
|
if (rf & 2) {
|
|
1360
1347
|
i0.ɵɵadvance(3);
|
|
@@ -2312,17 +2299,30 @@ TitleMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TitleMagicService, f
|
|
|
2312
2299
|
}], function () { return [{ type: i1$1.Title }]; }, null);
|
|
2313
2300
|
})();
|
|
2314
2301
|
|
|
2302
|
+
let COLOR_FILE_NAME = new InjectionToken('colorFile', {
|
|
2303
|
+
providedIn: 'root',
|
|
2304
|
+
factory: () => 'clr_rnt.eng'
|
|
2305
|
+
});
|
|
2315
2306
|
const MAGIC_FG_COLOR = 1;
|
|
2316
2307
|
const MAGIC_BG_COLOR = 2;
|
|
2317
2308
|
class MagicColorService {
|
|
2318
|
-
constructor(http) {
|
|
2309
|
+
constructor(http, colorFile1 = 'clr_rnt.eng') {
|
|
2319
2310
|
this.http = http;
|
|
2320
|
-
this.
|
|
2311
|
+
this.colorFileName = 'clr_rnt.eng';
|
|
2312
|
+
if (colorFile1)
|
|
2313
|
+
this.colorFileName = colorFile1;
|
|
2314
|
+
else
|
|
2315
|
+
this.colorFileName = 'clr_rnt.eng';
|
|
2316
|
+
}
|
|
2317
|
+
getColorFilePath() {
|
|
2318
|
+
return 'assets/' + this.colorFileName;
|
|
2321
2319
|
}
|
|
2322
2320
|
getColorData() {
|
|
2323
|
-
|
|
2324
|
-
this.
|
|
2325
|
-
|
|
2321
|
+
if (!this.colorsData) {
|
|
2322
|
+
this.http.get(this.getColorFilePath(), { responseType: 'text' }).subscribe(resp => {
|
|
2323
|
+
this.colorsData = resp.replace(/\n/g, '@').split('@');
|
|
2324
|
+
});
|
|
2325
|
+
}
|
|
2326
2326
|
}
|
|
2327
2327
|
hexToRgba(hex) {
|
|
2328
2328
|
let shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
@@ -2366,7 +2366,7 @@ class MagicColorService {
|
|
|
2366
2366
|
return '';
|
|
2367
2367
|
}
|
|
2368
2368
|
}
|
|
2369
|
-
MagicColorService.ɵfac = function MagicColorService_Factory(t) { return new (t || MagicColorService)(i0.ɵɵinject(i1$2.HttpClient)); };
|
|
2369
|
+
MagicColorService.ɵfac = function MagicColorService_Factory(t) { return new (t || MagicColorService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(COLOR_FILE_NAME)); };
|
|
2370
2370
|
MagicColorService.ɵprov = i0.ɵɵdefineInjectable({ token: MagicColorService, factory: MagicColorService.ɵfac, providedIn: 'root' });
|
|
2371
2371
|
(function () {
|
|
2372
2372
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicColorService, [{
|
|
@@ -2374,7 +2374,12 @@ MagicColorService.ɵprov = i0.ɵɵdefineInjectable({ token: MagicColorService, f
|
|
|
2374
2374
|
args: [{
|
|
2375
2375
|
providedIn: 'root'
|
|
2376
2376
|
}]
|
|
2377
|
-
}], function () {
|
|
2377
|
+
}], function () {
|
|
2378
|
+
return [{ type: i1$2.HttpClient }, { type: undefined, decorators: [{
|
|
2379
|
+
type: Inject,
|
|
2380
|
+
args: [COLOR_FILE_NAME]
|
|
2381
|
+
}] }];
|
|
2382
|
+
}, null);
|
|
2378
2383
|
})();
|
|
2379
2384
|
|
|
2380
2385
|
class AccessorMagicService {
|
|
@@ -3696,8 +3701,7 @@ function ErrorMagicComponent_div_0_span_4_Template(rf, ctx) {
|
|
|
3696
3701
|
}
|
|
3697
3702
|
function ErrorMagicComponent_div_0_Template(rf, ctx) {
|
|
3698
3703
|
if (rf & 1) {
|
|
3699
|
-
i0.ɵɵelementStart(0, "div");
|
|
3700
|
-
i0.ɵɵelementStart(1, "div", null, 1);
|
|
3704
|
+
i0.ɵɵelementStart(0, "div")(1, "div", null, 1);
|
|
3701
3705
|
i0.ɵɵprojection(3);
|
|
3702
3706
|
i0.ɵɵelementEnd();
|
|
3703
3707
|
i0.ɵɵtemplate(4, ErrorMagicComponent_div_0_span_4_Template, 2, 1, "span", 0);
|
|
@@ -4624,5 +4628,5 @@ class ModalFormDefinition {
|
|
|
4624
4628
|
}
|
|
4625
4629
|
}
|
|
4626
4630
|
|
|
4627
|
-
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_BG_COLOR, MAGIC_DEFAULT_VALUE_ACCESSOR, MAGIC_FG_COLOR, MG_FORMATS, MagicAlertComponent, MagicCheckboxControlValueAccessor, MagicColorService, 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 };
|
|
4631
|
+
export { AccessorMagicService, BaseMagicAlertComponent, BaseMagicConfirmComponent, BaseMagicOverlayContainer, CHECKBOX_VALUE_ACCESSOR, COLOR_FILE_NAME, CheckboxMagicDirective, CheckboxNoFormControlMagicDirective, ComboboxMagicDirective, CommandsCollectorMagicService, ComponentListMagicService, ConfirmationComponentsMagicProvider, Constants, ControlMetadata, ControlsMetadata, DATE_VALUE_ACCESSOR, DateMagicPipe, DateValueAccessor, EngineMagicService, ErrorMagicComponent, ExitMagicService, GuiInteractiveExecutor, HtmlClasses, InputNoFormControlMagicDirective, MAGIC_BG_COLOR, MAGIC_DEFAULT_VALUE_ACCESSOR, MAGIC_FG_COLOR, MG_FORMATS, MagicAlertComponent, MagicCheckboxControlValueAccessor, MagicColorService, MagicConfirmationBoxComponent, MagicDefaultValueAccessor, MagicDirective, MagicFocusDirective, MagicLazyLoaderService, 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 };
|
|
4628
4632
|
//# sourceMappingURL=magic-xpa-angular.mjs.map
|