@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.
@@ -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, Directive, EventEmitter, ViewChild, HostListener, Optional, Pipe, forwardRef, NgModule } from '@angular/core';
3
+ import { Injectable, Component, Input, Output, Directive, EventEmitter, 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';
@@ -831,8 +831,7 @@ function MagicOverlayContainer_div_5_Template(rf, ctx) { if (rf & 1) {
831
831
  i0.ɵɵelementStart(3, "button", 11);
832
832
  i0.ɵɵlistener("click", function MagicOverlayContainer_div_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.OnClose(); });
833
833
  i0.ɵɵtext(4, "X");
834
- i0.ɵɵelementEnd();
835
- i0.ɵɵelementEnd();
834
+ i0.ɵɵelementEnd()();
836
835
  } if (rf & 2) {
837
836
  const ctx_r2 = i0.ɵɵnextContext();
838
837
  i0.ɵɵadvance(2);
@@ -917,8 +916,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
917
916
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerElementRef = _t.first);
918
917
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.foregroundElementRef = _t.first);
919
918
  } }, 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) {
920
- i0.ɵɵelementStart(0, "div");
921
- i0.ɵɵelementStart(1, "div", 0);
919
+ i0.ɵɵelementStart(0, "div")(1, "div", 0);
922
920
  i0.ɵɵlistener("click", function MagicOverlayContainer_Template_div_click_1_listener() { return ctx.OnBackgroundClick(); });
923
921
  i0.ɵɵtemplate(2, MagicOverlayContainer_button_2_Template, 2, 0, "button", 1);
924
922
  i0.ɵɵelementEnd();
@@ -926,9 +924,7 @@ MagicOverlayContainer.ɵcmp = i0.ɵɵdefineComponent({ type: MagicOverlayContain
926
924
  i0.ɵɵtemplate(5, MagicOverlayContainer_div_5_Template, 5, 1, "div", 4);
927
925
  i0.ɵɵelementStart(6, "div", 5);
928
926
  i0.ɵɵelement(7, "div", 6, 7);
929
- i0.ɵɵelementEnd();
930
- i0.ɵɵelementEnd();
931
- i0.ɵɵelementEnd();
927
+ i0.ɵɵelementEnd()()();
932
928
  } if (rf & 2) {
933
929
  i0.ɵɵadvance(2);
934
930
  i0.ɵɵproperty("ngIf", !ctx.getShowTitleBar());
@@ -1176,9 +1172,7 @@ class MagicAlertComponent extends BaseMagicAlertComponent {
1176
1172
  }
1177
1173
  MagicAlertComponent.ɵfac = function () { let ɵMagicAlertComponent_BaseFactory; return function MagicAlertComponent_Factory(t) { return (ɵMagicAlertComponent_BaseFactory || (ɵMagicAlertComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MagicAlertComponent)))(t || MagicAlertComponent); }; }();
1178
1174
  MagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicAlertComponent, selectors: [["sample-magic-alert-component"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 2, consts: [[1, "mg-message-background"], [3, "click"]], template: function MagicAlertComponent_Template(rf, ctx) { if (rf & 1) {
1179
- i0.ɵɵelementStart(0, "div");
1180
- i0.ɵɵelementStart(1, "div", 0);
1181
- i0.ɵɵelementStart(2, "h2");
1175
+ i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "h2");
1182
1176
  i0.ɵɵtext(3);
1183
1177
  i0.ɵɵelementEnd();
1184
1178
  i0.ɵɵelementStart(4, "p");
@@ -1187,9 +1181,7 @@ MagicAlertComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicAlertComponent,
1187
1181
  i0.ɵɵelementStart(6, "button", 1);
1188
1182
  i0.ɵɵlistener("click", function MagicAlertComponent_Template_button_click_6_listener() { return ctx.OnClose(); });
1189
1183
  i0.ɵɵtext(7, "OK");
1190
- i0.ɵɵelementEnd();
1191
- i0.ɵɵelementEnd();
1192
- i0.ɵɵelementEnd();
1184
+ i0.ɵɵelementEnd()()();
1193
1185
  } if (rf & 2) {
1194
1186
  i0.ɵɵadvance(3);
1195
1187
  i0.ɵɵtextInterpolate1(" ", ctx.title, "");
@@ -1244,14 +1236,11 @@ class MagicConfirmationBoxComponent extends BaseMagicConfirmComponent {
1244
1236
  }
1245
1237
  MagicConfirmationBoxComponent.ɵfac = function () { let ɵMagicConfirmationBoxComponent_BaseFactory; return function MagicConfirmationBoxComponent_Factory(t) { return (ɵMagicConfirmationBoxComponent_BaseFactory || (ɵMagicConfirmationBoxComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MagicConfirmationBoxComponent)))(t || MagicConfirmationBoxComponent); }; }();
1246
1238
  MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfirmationBoxComponent, selectors: [["sample-magic-confirmation-box"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 11, vars: 2, consts: [[1, "mg-message-background"], [3, "click"], [1, "cancel", 3, "click"]], template: function MagicConfirmationBoxComponent_Template(rf, ctx) { if (rf & 1) {
1247
- i0.ɵɵelementStart(0, "div");
1248
- i0.ɵɵelementStart(1, "div", 0);
1249
- i0.ɵɵelementStart(2, "h2");
1239
+ i0.ɵɵelementStart(0, "div")(1, "div", 0)(2, "h2");
1250
1240
  i0.ɵɵtext(3);
1251
1241
  i0.ɵɵelementEnd();
1252
1242
  i0.ɵɵtext(4);
1253
- i0.ɵɵelement(5, "br");
1254
- i0.ɵɵelement(6, "br");
1243
+ i0.ɵɵelement(5, "br")(6, "br");
1255
1244
  i0.ɵɵelementStart(7, "button", 1);
1256
1245
  i0.ɵɵlistener("click", function MagicConfirmationBoxComponent_Template_button_click_7_listener() { return ctx.OnClose(true); });
1257
1246
  i0.ɵɵtext(8, "OK");
@@ -1259,9 +1248,7 @@ MagicConfirmationBoxComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MagicConfir
1259
1248
  i0.ɵɵelementStart(9, "button", 2);
1260
1249
  i0.ɵɵlistener("click", function MagicConfirmationBoxComponent_Template_button_click_9_listener() { return ctx.OnClose(false); });
1261
1250
  i0.ɵɵtext(10, "Cancel");
1262
- i0.ɵɵelementEnd();
1263
- i0.ɵɵelementEnd();
1264
- i0.ɵɵelementEnd();
1251
+ i0.ɵɵelementEnd()()();
1265
1252
  } if (rf & 2) {
1266
1253
  i0.ɵɵadvance(3);
1267
1254
  i0.ɵɵtextInterpolate1(" ", ctx.title, "");
@@ -2246,17 +2233,30 @@ TitleMagicService.ɵprov = i0.ɵɵdefineInjectable({ token: TitleMagicService, f
2246
2233
  type: Injectable
2247
2234
  }], function () { return [{ type: i1$1.Title }]; }, null); })();
2248
2235
 
2236
+ let COLOR_FILE_NAME = new InjectionToken('colorFile', {
2237
+ providedIn: 'root',
2238
+ factory: () => 'clr_rnt.eng'
2239
+ });
2249
2240
  const MAGIC_FG_COLOR = 1;
2250
2241
  const MAGIC_BG_COLOR = 2;
2251
2242
  class MagicColorService {
2252
- constructor(http) {
2243
+ constructor(http, colorFile1 = 'clr_rnt.eng') {
2253
2244
  this.http = http;
2254
- this.colorFilePath = 'assets/clr_rnt.eng';
2245
+ this.colorFileName = 'clr_rnt.eng';
2246
+ if (colorFile1)
2247
+ this.colorFileName = colorFile1;
2248
+ else
2249
+ this.colorFileName = 'clr_rnt.eng';
2250
+ }
2251
+ getColorFilePath() {
2252
+ return 'assets/' + this.colorFileName;
2255
2253
  }
2256
2254
  getColorData() {
2257
- this.http.get(this.colorFilePath, { responseType: 'text' }).subscribe(resp => {
2258
- this.colorsData = resp.replace(/\n/g, '@').split('@');
2259
- });
2255
+ if (!this.colorsData) {
2256
+ this.http.get(this.getColorFilePath(), { responseType: 'text' }).subscribe(resp => {
2257
+ this.colorsData = resp.replace(/\n/g, '@').split('@');
2258
+ });
2259
+ }
2260
2260
  }
2261
2261
  hexToRgba(hex) {
2262
2262
  let shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])$/i;
@@ -2300,14 +2300,17 @@ class MagicColorService {
2300
2300
  return '';
2301
2301
  }
2302
2302
  }
2303
- MagicColorService.ɵfac = function MagicColorService_Factory(t) { return new (t || MagicColorService)(i0.ɵɵinject(i1$2.HttpClient)); };
2303
+ MagicColorService.ɵfac = function MagicColorService_Factory(t) { return new (t || MagicColorService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(COLOR_FILE_NAME)); };
2304
2304
  MagicColorService.ɵprov = i0.ɵɵdefineInjectable({ token: MagicColorService, factory: MagicColorService.ɵfac, providedIn: 'root' });
2305
2305
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MagicColorService, [{
2306
2306
  type: Injectable,
2307
2307
  args: [{
2308
2308
  providedIn: 'root'
2309
2309
  }]
2310
- }], function () { return [{ type: i1$2.HttpClient }]; }, null); })();
2310
+ }], function () { return [{ type: i1$2.HttpClient }, { type: undefined, decorators: [{
2311
+ type: Inject,
2312
+ args: [COLOR_FILE_NAME]
2313
+ }] }]; }, null); })();
2311
2314
 
2312
2315
  class AccessorMagicService {
2313
2316
  constructor(task, magicColor) {
@@ -3588,8 +3591,7 @@ function ErrorMagicComponent_div_0_span_4_Template(rf, ctx) { if (rf & 1) {
3588
3591
  i0.ɵɵtextInterpolate1(" ", ctx_r2.mgService.getErrMsg(ctx_r2.id, ctx_r2.rowId), " ");
3589
3592
  } }
3590
3593
  function ErrorMagicComponent_div_0_Template(rf, ctx) { if (rf & 1) {
3591
- i0.ɵɵelementStart(0, "div");
3592
- i0.ɵɵelementStart(1, "div", null, 1);
3594
+ i0.ɵɵelementStart(0, "div")(1, "div", null, 1);
3593
3595
  i0.ɵɵprojection(3);
3594
3596
  i0.ɵɵelementEnd();
3595
3597
  i0.ɵɵtemplate(4, ErrorMagicComponent_div_0_span_4_Template, 2, 1, "span", 0);
@@ -4448,5 +4450,5 @@ class ModalFormDefinition {
4448
4450
  }
4449
4451
  }
4450
4452
 
4451
- 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 };
4453
+ 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 };
4452
4454
  //# sourceMappingURL=magic-xpa-angular.mjs.map