@magic-xpa/angular 4.900.0-dev490.134 → 4.900.0-dev490.137
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 +26 -3
- package/esm2020/src/services/mg-date-adapter.mjs +12 -7
- package/fesm2015/magic-xpa-angular.mjs +36 -6
- package/fesm2015/magic-xpa-angular.mjs.map +1 -1
- package/fesm2020/magic-xpa-angular.mjs +34 -6
- package/fesm2020/magic-xpa-angular.mjs.map +1 -1
- package/package.json +3 -3
- package/src/services/accessor.magic.service.d.ts +1 -0
- package/src/services/mg-date-adapter.d.ts +2 -1
@@ -10,14 +10,14 @@ import * as i3 from 'ng-dynamic-component';
|
|
10
10
|
import { DynamicModule } from 'ng-dynamic-component';
|
11
11
|
import { InteractiveCommandType, OverlayType, Styles, HtmlProperties, GuiConstants, CommandType, PIC, GuiEnvironment, Modifiers } from '@magic-xpa/gui';
|
12
12
|
import { MagicBridge, getGuiEventObj, CookieService } from '@magic-xpa/engine';
|
13
|
-
import { MagicProperties, Logger, StrUtil, StorageAttribute, BindingLevel, StorageAttributeType, MgControlType
|
13
|
+
import { MagicProperties, Logger, StrUtil, StorageAttribute, PICInterface, BindingLevel, StorageAttributeType, MgControlType } from '@magic-xpa/utils';
|
14
14
|
import { filter, map, debounceTime } from 'rxjs/operators';
|
15
15
|
import { Subject, fromEvent } from 'rxjs';
|
16
16
|
import { __decorate, __metadata } from 'tslib';
|
17
17
|
import * as i1$1 from '@angular/platform-browser';
|
18
18
|
import * as i1$2 from '@angular/common/http';
|
19
19
|
import { HttpClientModule } from '@angular/common/http';
|
20
|
-
import { NativeDateAdapter, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
20
|
+
import { NativeDateAdapter, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
21
21
|
import * as i1$3 from '@angular/cdk/platform';
|
22
22
|
|
23
23
|
class ControlMetadata {
|
@@ -2371,6 +2371,29 @@ class AccessorMagicService {
|
|
2371
2371
|
let vis = this.getProperty(controlId, HtmlProperties.Visible, rowId);
|
2372
2372
|
return vis ? 'visible' : 'hidden';
|
2373
2373
|
}
|
2374
|
+
getAlphaMask(controlId, rowId) {
|
2375
|
+
if (isNullOrUndefined(controlId))
|
2376
|
+
return null;
|
2377
|
+
let pic = this.task.GetControlPictureMask(controlId);
|
2378
|
+
let mask = pic.getMask();
|
2379
|
+
let valueStr = new StringBuilder();
|
2380
|
+
for (let i = 0; i < mask.length; i++) {
|
2381
|
+
switch (mask.charCodeAt(i)) {
|
2382
|
+
case PICInterface.PIC_N:
|
2383
|
+
valueStr.Append("9");
|
2384
|
+
break;
|
2385
|
+
case PICInterface.PIC_U:
|
2386
|
+
case PICInterface.PIC_L:
|
2387
|
+
case PICInterface.PIC_X:
|
2388
|
+
valueStr.Append("A");
|
2389
|
+
break;
|
2390
|
+
default:
|
2391
|
+
valueStr.Append(mask.charAt(i));
|
2392
|
+
break;
|
2393
|
+
}
|
2394
|
+
}
|
2395
|
+
return (pic != null) ? valueStr.toString() : null;
|
2396
|
+
}
|
2374
2397
|
getNumericPicture(picture) {
|
2375
2398
|
var obj = {};
|
2376
2399
|
if (isNullOrUndefined(picture))
|
@@ -4319,11 +4342,13 @@ const MG_FORMATS = {
|
|
4319
4342
|
}
|
4320
4343
|
};
|
4321
4344
|
class MgDateAdapter extends NativeDateAdapter {
|
4322
|
-
constructor(platform, task) {
|
4323
|
-
super(
|
4345
|
+
constructor(platform, task, localeId) {
|
4346
|
+
super(localeId, platform);
|
4324
4347
|
this.platform = platform;
|
4325
4348
|
this.task = task;
|
4349
|
+
this.localeId = localeId;
|
4326
4350
|
this.mgdtfmt = null;
|
4351
|
+
this.setLocale(localeId);
|
4327
4352
|
}
|
4328
4353
|
parse(value) {
|
4329
4354
|
let valueStr = value;
|
@@ -4399,11 +4424,14 @@ class MgDateAdapter extends NativeDateAdapter {
|
|
4399
4424
|
}
|
4400
4425
|
}
|
4401
4426
|
}
|
4402
|
-
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService)); };
|
4427
|
+
MgDateAdapter.ɵfac = function MgDateAdapter_Factory(t) { return new (t || MgDateAdapter)(i0.ɵɵinject(i1$3.Platform), i0.ɵɵinject(TaskMagicService), i0.ɵɵinject(MAT_DATE_LOCALE)); };
|
4403
4428
|
MgDateAdapter.ɵprov = i0.ɵɵdefineInjectable({ token: MgDateAdapter, factory: MgDateAdapter.ɵfac });
|
4404
4429
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MgDateAdapter, [{
|
4405
4430
|
type: Injectable
|
4406
|
-
}], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }
|
4431
|
+
}], function () { return [{ type: i1$3.Platform }, { type: TaskMagicService }, { type: undefined, decorators: [{
|
4432
|
+
type: Inject,
|
4433
|
+
args: [MAT_DATE_LOCALE]
|
4434
|
+
}] }]; }, null); })();
|
4407
4435
|
|
4408
4436
|
const matDateProviders = [
|
4409
4437
|
{ provide: DateAdapter, useClass: MgDateAdapter },
|