@magic-xpa/angular 4.801.0-dev481.321 → 4.801.0-dev481.324

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.
@@ -2239,6 +2239,10 @@ let COLOR_FILE_NAME = new InjectionToken('colorFile', {
2239
2239
  });
2240
2240
  const MAGIC_FG_COLOR = 1;
2241
2241
  const MAGIC_BG_COLOR = 2;
2242
+ const SYSTEM_FG = 2;
2243
+ const SYSTEM_BG = 4;
2244
+ const SYSTEM_FG_AND_SYSTEM_BG = 6;
2245
+ const TRANSPERENT_BG = 1;
2242
2246
  class MagicColorService {
2243
2247
  constructor(http, colorFile1 = 'clr_rnt.eng') {
2244
2248
  this.http = http;
@@ -2284,27 +2288,26 @@ class MagicColorService {
2284
2288
  this.getColorData();
2285
2289
  if (this.colorsData) {
2286
2290
  if (this.colorsData[colorIndex - 1]) {
2287
- let hex = '';
2288
2291
  const grayHashCode = '00808080';
2292
+ let hex = grayHashCode;
2289
2293
  let color = this.colorsData[colorIndex - 1].split(',');
2290
- if (+color[3] || 1 == +color[3]) {
2291
- isTransperent = true;
2292
- }
2293
- if (+color[3] <= 1) {
2294
- switch (colorType) {
2295
- case MAGIC_FG_COLOR:
2294
+ let colorAtrributes = +color[3];
2295
+ switch (colorType) {
2296
+ case MAGIC_FG_COLOR:
2297
+ if (colorAtrributes != SYSTEM_FG && colorAtrributes != SYSTEM_FG_AND_SYSTEM_BG)
2296
2298
  hex = (color[1]);
2297
- break;
2298
- case MAGIC_BG_COLOR:
2299
+ break;
2300
+ case MAGIC_BG_COLOR:
2301
+ if (colorAtrributes != SYSTEM_BG && colorAtrributes != SYSTEM_FG_AND_SYSTEM_BG) {
2302
+ if (colorAtrributes == TRANSPERENT_BG)
2303
+ isTransperent = true;
2299
2304
  hex = (color[2]);
2300
- break;
2301
- default:
2302
- console.log('Please enter valid color type : 1-FG, 2-BG ' + colorIndex);
2303
- return '';
2304
- }
2305
+ }
2306
+ break;
2307
+ default:
2308
+ console.log('Please enter valid color type : 1-FG, 2-BG ' + colorIndex);
2309
+ return '';
2305
2310
  }
2306
- else
2307
- hex = grayHashCode;
2308
2311
  return this.hexToRgba('#' + hex, isTransperent);
2309
2312
  }
2310
2313
  else