@wavemaker/app-ng-runtime 11.5.3-next.51001 → 11.5.3-next.51551

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.
Files changed (62) hide show
  1. app-ng-runtime/components/base/bundles/index.umd.js +39 -10
  2. app-ng-runtime/components/base/esm2020/pipes/custom-pipes.mjs +24 -11
  3. app-ng-runtime/components/base/esm2020/pipes/wm-pipe.mjs +17 -0
  4. app-ng-runtime/components/base/fesm2015/index.mjs +39 -10
  5. app-ng-runtime/components/base/fesm2015/index.mjs.map +1 -1
  6. app-ng-runtime/components/base/fesm2020/index.mjs +39 -10
  7. app-ng-runtime/components/base/fesm2020/index.mjs.map +1 -1
  8. app-ng-runtime/components/base/pipes/custom-pipes.d.ts +5 -2
  9. app-ng-runtime/components/base/pipes/wm-pipe.d.ts +9 -0
  10. app-ng-runtime/components/chart/bundles/index.umd.js +51 -34
  11. app-ng-runtime/components/chart/esm2020/chart.component.mjs +5 -5
  12. app-ng-runtime/components/chart/esm2020/chart.utils.mjs +50 -13
  13. app-ng-runtime/components/chart/fesm2015/index.mjs +53 -16
  14. app-ng-runtime/components/chart/fesm2015/index.mjs.map +1 -1
  15. app-ng-runtime/components/chart/fesm2020/index.mjs +53 -16
  16. app-ng-runtime/components/chart/fesm2020/index.mjs.map +1 -1
  17. app-ng-runtime/components/containers/wizard/bundles/index.umd.js +14 -3
  18. app-ng-runtime/components/containers/wizard/esm2020/wizard.component.mjs +13 -4
  19. app-ng-runtime/components/containers/wizard/esm2020/wizard.props.mjs +2 -1
  20. app-ng-runtime/components/containers/wizard/fesm2015/index.mjs +14 -3
  21. app-ng-runtime/components/containers/wizard/fesm2015/index.mjs.map +1 -1
  22. app-ng-runtime/components/containers/wizard/fesm2020/index.mjs +13 -3
  23. app-ng-runtime/components/containers/wizard/fesm2020/index.mjs.map +1 -1
  24. app-ng-runtime/components/containers/wizard/wizard.component.d.ts +2 -0
  25. app-ng-runtime/components/input/default/bundles/index.umd.js +176 -162
  26. app-ng-runtime/components/input/default/esm2020/number/number.component.mjs +7 -6
  27. app-ng-runtime/components/input/default/esm2020/number/number.props.mjs +4 -2
  28. app-ng-runtime/components/input/default/esm2020/text/calendar/input-calendar.component.mjs +7 -6
  29. app-ng-runtime/components/input/default/esm2020/text/calendar/input-calendar.props.mjs +4 -2
  30. app-ng-runtime/components/input/default/esm2020/text/color/input-color.component.mjs +7 -6
  31. app-ng-runtime/components/input/default/esm2020/text/color/input-color.props.mjs +4 -2
  32. app-ng-runtime/components/input/default/esm2020/text/email/input-email.component.mjs +7 -6
  33. app-ng-runtime/components/input/default/esm2020/text/email/input-email.props.mjs +4 -2
  34. app-ng-runtime/components/input/default/esm2020/text/number/input-number.component.mjs +5 -5
  35. app-ng-runtime/components/input/default/esm2020/text/number/input-number.props.mjs +4 -2
  36. app-ng-runtime/components/input/default/esm2020/text/text/input-text.component.mjs +8 -7
  37. app-ng-runtime/components/input/default/esm2020/text/text/input-text.props.mjs +4 -2
  38. app-ng-runtime/components/input/default/esm2020/textarea/textarea.component.mjs +5 -5
  39. app-ng-runtime/components/input/default/esm2020/textarea/textarea.props.mjs +3 -1
  40. app-ng-runtime/components/input/default/fesm2015/index.mjs +57 -43
  41. app-ng-runtime/components/input/default/fesm2015/index.mjs.map +1 -1
  42. app-ng-runtime/components/input/default/fesm2020/index.mjs +57 -43
  43. app-ng-runtime/components/input/default/fesm2020/index.mjs.map +1 -1
  44. app-ng-runtime/components/input/default/number/number.component.d.ts +2 -0
  45. app-ng-runtime/components/input/default/text/calendar/input-calendar.component.d.ts +2 -0
  46. app-ng-runtime/components/input/default/text/color/input-color.component.d.ts +2 -0
  47. app-ng-runtime/components/input/default/text/email/input-email.component.d.ts +2 -0
  48. app-ng-runtime/components/input/default/text/number/input-number.component.d.ts +2 -0
  49. app-ng-runtime/components/input/default/text/text/input-text.component.d.ts +2 -0
  50. app-ng-runtime/components/input/default/textarea/textarea.component.d.ts +2 -0
  51. app-ng-runtime/package.json +1 -1
  52. app-ng-runtime/runtime/base/bundles/index.umd.js +26 -1
  53. app-ng-runtime/runtime/base/components/base-page.component.d.ts +1 -0
  54. app-ng-runtime/runtime/base/esm2020/components/base-page.component.mjs +26 -1
  55. app-ng-runtime/runtime/base/esm2020/services/pipe-provider.service.mjs +2 -2
  56. app-ng-runtime/runtime/base/fesm2015/index.mjs +26 -1
  57. app-ng-runtime/runtime/base/fesm2015/index.mjs.map +1 -1
  58. app-ng-runtime/runtime/base/fesm2020/index.mjs +26 -1
  59. app-ng-runtime/runtime/base/fesm2020/index.mjs.map +1 -1
  60. app-ng-runtime/scripts/@wavemaker/nvd3/build/nv.d3.min.js +1 -0
  61. app-ng-runtime/scripts/d3/d3.min.js +2 -5
  62. app-ng-runtime/scripts/@wavemaker.com/nvd3/build/nv.d3.min.js +0 -13
@@ -2328,6 +2328,23 @@ TextContentDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: TextCo
2328
2328
  type: Input
2329
2329
  }] }); })();
2330
2330
 
2331
+ class WmPipe {
2332
+ constructor(pipeName, customPipeManager) {
2333
+ this.pipeName = pipeName;
2334
+ this.customPipeManager = customPipeManager;
2335
+ this.pipeRef = this.customPipeManager ? this.customPipeManager.getCustomPipe(pipeName) : null;
2336
+ this.isCustomPipe = this.pipeRef && _.isFunction(this.pipeRef.formatter);
2337
+ }
2338
+ customFormatter(data, args) {
2339
+ try {
2340
+ return this.pipeRef.formatter(...args);
2341
+ }
2342
+ catch (error) {
2343
+ return data;
2344
+ }
2345
+ }
2346
+ }
2347
+
2331
2348
  const getEpochValue = data => {
2332
2349
  let epoch;
2333
2350
  // For data in form of string number ('123'), convert to number (123). And don't parse date objects.
@@ -2356,23 +2373,33 @@ TrailingZeroDecimalPipe.ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "traili
2356
2373
  name: 'trailingZeroDecimalPipe'
2357
2374
  }]
2358
2375
  }], function () { return [{ type: i1$1.DecimalPipe }]; }, null); })();
2359
- class ToDatePipe {
2376
+ class ToDatePipe extends WmPipe {
2377
+ // This method calls the custom formatter fn after applying the exisitng date pattern
2378
+ returnFn(data, args) {
2379
+ if (this.isCustomPipe) {
2380
+ if (args) {
2381
+ args[0] = data;
2382
+ }
2383
+ return this.customFormatter(data, args);
2384
+ }
2385
+ return data;
2386
+ }
2360
2387
  transform(data, format, timezone, compInstance) {
2361
2388
  let timestamp;
2362
2389
  // 'null' is to be treated as a special case, If user wants to enter null value, empty string will be passed to the backend
2363
2390
  if (data === 'null' || data === '') {
2364
- return '';
2391
+ return this.returnFn('', arguments);
2365
2392
  }
2366
2393
  if (!isDefined(data)) {
2367
- return '';
2394
+ return this.returnFn('', arguments);
2368
2395
  }
2369
2396
  timestamp = getEpochValue(data);
2370
2397
  if (timestamp) {
2371
2398
  if (format === 'timestamp') {
2372
- return timestamp;
2399
+ return this.returnFn(timestamp, arguments);
2373
2400
  }
2374
2401
  if (format === 'UTC') {
2375
- return new Date(timestamp).toISOString();
2402
+ return this.returnFn(new Date(timestamp).toISOString(), arguments);
2376
2403
  }
2377
2404
  let formattedVal;
2378
2405
  const timeZone = this.i18nService ? this.i18nService.getTimezone(compInstance) : timezone;
@@ -2382,23 +2409,25 @@ class ToDatePipe {
2382
2409
  else {
2383
2410
  formattedVal = this.datePipe.transform(timestamp, format);
2384
2411
  }
2385
- return formattedVal;
2412
+ return this.returnFn(formattedVal, arguments);
2386
2413
  }
2387
- return '';
2414
+ return this.returnFn('', arguments);
2388
2415
  }
2389
- constructor(datePipe, i18nService) {
2416
+ constructor(datePipe, i18nService, customPipeManager) {
2417
+ super('toDate', customPipeManager);
2390
2418
  this.datePipe = datePipe;
2391
2419
  this.i18nService = i18nService;
2420
+ this.customPipeManager = customPipeManager;
2392
2421
  }
2393
2422
  }
2394
- ToDatePipe.ɵfac = function ToDatePipe_Factory(t) { return new (t || ToDatePipe)(i0.ɵɵdirectiveInject(i1$1.DatePipe, 16), i0.ɵɵdirectiveInject(i1.AbstractI18nService, 16)); };
2423
+ ToDatePipe.ɵfac = function ToDatePipe_Factory(t) { return new (t || ToDatePipe)(i0.ɵɵdirectiveInject(i1$1.DatePipe, 16), i0.ɵɵdirectiveInject(i1.AbstractI18nService, 16), i0.ɵɵdirectiveInject(i1.CustomPipeManager, 16)); };
2395
2424
  ToDatePipe.ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "toDate", type: ToDatePipe, pure: true });
2396
2425
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ToDatePipe, [{
2397
2426
  type: Pipe,
2398
2427
  args: [{
2399
2428
  name: 'toDate'
2400
2429
  }]
2401
- }], function () { return [{ type: i1$1.DatePipe }, { type: i1.AbstractI18nService }]; }, null); })();
2430
+ }], function () { return [{ type: i1$1.DatePipe }, { type: i1.AbstractI18nService }, { type: i1.CustomPipeManager }]; }, null); })();
2402
2431
  class ToNumberPipe {
2403
2432
  transform(data, fracSize) {
2404
2433
  if (fracSize && !String(fracSize).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)) {