@wavemaker/angular-codegen 11.5.1-rc.5401 → 11.5.1-rc.5402

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.
@@ -36,7 +36,7 @@
36
36
  "@metrichor/jmespath": "^0.3.1",
37
37
  "@wavemaker.com/nvd3": "1.0.0",
38
38
  "@wavemaker/focus-trap": "^1.0.0",
39
- "@wavemaker/variables": "11.5.1-rc.5401",
39
+ "@wavemaker/variables": "11.5.1-rc.5402",
40
40
  "@ztree/ztree_v3": "^3.5.48",
41
41
  "angular-imask": "6.3.0",
42
42
  "angular2-websocket": "0.9.7",
@@ -5947,9 +5947,9 @@
5947
5947
  }
5948
5948
  },
5949
5949
  "node_modules/@wavemaker/variables": {
5950
- "version": "11.5.1-rc.5401",
5951
- "resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-11.5.1-rc.5401.tgz",
5952
- "integrity": "sha512-vR6kaPdb8CX0Er10UZc9w16kCaslpL3+UVrvBIBa6TYr5DuYUlltRHkOXdWfTZz8F0jdRQvoROtjmkAxfQNOAw==",
5950
+ "version": "11.5.1-rc.5402",
5951
+ "resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-11.5.1-rc.5402.tgz",
5952
+ "integrity": "sha512-OtgNDIqkZ17Baqs4lTzjjxPr5ZHnFJM0xtbX3tx1QjFxPY2hbF155OiIb3MCudHqHYpJO6nEmlvUP08O3eDNWA==",
5953
5953
  "dependencies": {
5954
5954
  "@metrichor/jmespath": "^0.3.1",
5955
5955
  "he": "^1.2.0",
@@ -47,7 +47,7 @@
47
47
  "@metrichor/jmespath": "^0.3.1",
48
48
  "@wavemaker.com/nvd3": "1.0.0",
49
49
  "@wavemaker/focus-trap": "^1.0.0",
50
- "@wavemaker/variables": "11.5.1-rc.5401",
50
+ "@wavemaker/variables": "11.5.1-rc.5402",
51
51
  "@ztree/ztree_v3": "^3.5.48",
52
52
  "angular-imask": "6.3.0",
53
53
  "angular2-websocket": "0.9.7",
@@ -72,7 +72,7 @@
72
72
  "tslib": "2.4.1",
73
73
  "x2js": "^3.4.4",
74
74
  "zone.js": "~0.11.4",
75
- "@wavemaker/app-ng-runtime": "11.5.1-rc.5401"
75
+ "@wavemaker/app-ng-runtime": "11.5.1-rc.5402"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
@@ -96668,6 +96668,23 @@ CoreModule$1.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({ imports: [HttpClientModu
96668
96668
  }], null, null); })();
96669
96669
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(CoreModule$1, { imports: [HttpClientModule$1] }); })();
96670
96670
 
96671
+ class WmPipe {
96672
+ constructor(pipeName, customPipeManager) {
96673
+ this.pipeName = pipeName;
96674
+ this.customPipeManager = customPipeManager;
96675
+ this.pipeRef = this.customPipeManager ? this.customPipeManager.getCustomPipe(pipeName) : null;
96676
+ this.isCustomPipe = this.pipeRef && _.isFunction(this.pipeRef.formatter);
96677
+ }
96678
+ customFormatter(data, args) {
96679
+ try {
96680
+ return this.pipeRef.formatter(...args);
96681
+ }
96682
+ catch (error) {
96683
+ return data;
96684
+ }
96685
+ }
96686
+ }
96687
+
96671
96688
  const getEpochValue = data => {
96672
96689
  let epoch;
96673
96690
  // For data in form of string number ('123'), convert to number (123). And don't parse date objects.
@@ -96696,8 +96713,11 @@ TrailingZeroDecimalPipe.ɵpipe = /*@__PURE__*/ ɵɵdefinePipe({ name: "trailingZ
96696
96713
  name: 'trailingZeroDecimalPipe'
96697
96714
  }]
96698
96715
  }], function () { return [{ type: DecimalPipe }]; }, null); })();
96699
- class ToDatePipe {
96716
+ class ToDatePipe extends WmPipe {
96700
96717
  transform(data, format, timezone, compInstance) {
96718
+ if (this.isCustomPipe) {
96719
+ return this.customFormatter(data, arguments);
96720
+ }
96701
96721
  let timestamp;
96702
96722
  // 'null' is to be treated as a special case, If user wants to enter null value, empty string will be passed to the backend
96703
96723
  if (data === 'null' || data === '') {
@@ -96726,19 +96746,21 @@ class ToDatePipe {
96726
96746
  }
96727
96747
  return '';
96728
96748
  }
96729
- constructor(datePipe, i18nService) {
96749
+ constructor(datePipe, i18nService, customPipeManager) {
96750
+ super('toDate', customPipeManager);
96730
96751
  this.datePipe = datePipe;
96731
96752
  this.i18nService = i18nService;
96753
+ this.customPipeManager = customPipeManager;
96732
96754
  }
96733
96755
  }
96734
- ToDatePipe.ɵfac = function ToDatePipe_Factory(t) { return new (t || ToDatePipe)(ɵɵdirectiveInject(DatePipe, 16), ɵɵdirectiveInject(AbstractI18nService$1, 16)); };
96756
+ ToDatePipe.ɵfac = function ToDatePipe_Factory(t) { return new (t || ToDatePipe)(ɵɵdirectiveInject(DatePipe, 16), ɵɵdirectiveInject(AbstractI18nService$1, 16), ɵɵdirectiveInject(CustomPipeManager$1, 16)); };
96735
96757
  ToDatePipe.ɵpipe = /*@__PURE__*/ ɵɵdefinePipe({ name: "toDate", type: ToDatePipe, pure: true });
96736
96758
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ToDatePipe, [{
96737
96759
  type: Pipe,
96738
96760
  args: [{
96739
96761
  name: 'toDate'
96740
96762
  }]
96741
- }], function () { return [{ type: DatePipe }, { type: AbstractI18nService$1 }]; }, null); })();
96763
+ }], function () { return [{ type: DatePipe }, { type: AbstractI18nService$1 }, { type: CustomPipeManager$1 }]; }, null); })();
96742
96764
  class ToNumberPipe {
96743
96765
  transform(data, fracSize) {
96744
96766
  if (fracSize && !String(fracSize).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)) {
@@ -125304,7 +125326,7 @@ class PipeProvider {
125304
125326
  this.preparePipeMeta(CurrencyPipe$1, 'currency', true, [this._locale]),
125305
125327
  this.preparePipeMeta(DatePipe$1, 'date', true, [this._locale]),
125306
125328
  this.preparePipeMeta(ToDatePipe, 'toDate', true, [
125307
- new DatePipe$1(this._locale)
125329
+ new DatePipe$1(this._locale), undefined, this.injector.get(CustomPipeManager)
125308
125330
  ]),
125309
125331
  this.preparePipeMeta(ToNumberPipe, 'toNumber', true, [
125310
125332
  new DecimalPipe$1(this._locale),
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.5.1-rc.5401",
3
+ "version": "11.5.1-rc.5402",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {