@smallpearl/ngx-helper 0.29.23

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 (117) hide show
  1. package/README.md +230 -0
  2. package/core/index.d.ts +2 -0
  3. package/core/src/ngx-helper.d.ts +7 -0
  4. package/core/src/version.d.ts +1 -0
  5. package/entity-field/index.d.ts +2 -0
  6. package/entity-field/src/entity-field-spec.d.ts +69 -0
  7. package/entity-field/src/provider.d.ts +27 -0
  8. package/fesm2022/smallpearl-ngx-helper-core.mjs +23 -0
  9. package/fesm2022/smallpearl-ngx-helper-core.mjs.map +1 -0
  10. package/fesm2022/smallpearl-ngx-helper-entity-field.mjs +112 -0
  11. package/fesm2022/smallpearl-ngx-helper-entity-field.mjs.map +1 -0
  12. package/fesm2022/smallpearl-ngx-helper-forms.mjs +112 -0
  13. package/fesm2022/smallpearl-ngx-helper-forms.mjs.map +1 -0
  14. package/fesm2022/smallpearl-ngx-helper-hover-dropdown.mjs +108 -0
  15. package/fesm2022/smallpearl-ngx-helper-hover-dropdown.mjs.map +1 -0
  16. package/fesm2022/smallpearl-ngx-helper-locale.mjs +296 -0
  17. package/fesm2022/smallpearl-ngx-helper-locale.mjs.map +1 -0
  18. package/fesm2022/smallpearl-ngx-helper-mat-busy-wheel.mjs +504 -0
  19. package/fesm2022/smallpearl-ngx-helper-mat-busy-wheel.mjs.map +1 -0
  20. package/fesm2022/smallpearl-ngx-helper-mat-context-menu.mjs +184 -0
  21. package/fesm2022/smallpearl-ngx-helper-mat-context-menu.mjs.map +1 -0
  22. package/fesm2022/smallpearl-ngx-helper-mat-entity-crud.mjs +1486 -0
  23. package/fesm2022/smallpearl-ngx-helper-mat-entity-crud.mjs.map +1 -0
  24. package/fesm2022/smallpearl-ngx-helper-mat-entity-list.mjs +800 -0
  25. package/fesm2022/smallpearl-ngx-helper-mat-entity-list.mjs.map +1 -0
  26. package/fesm2022/smallpearl-ngx-helper-mat-file-input.mjs +328 -0
  27. package/fesm2022/smallpearl-ngx-helper-mat-file-input.mjs.map +1 -0
  28. package/fesm2022/smallpearl-ngx-helper-mat-form-error.mjs +468 -0
  29. package/fesm2022/smallpearl-ngx-helper-mat-form-error.mjs.map +1 -0
  30. package/fesm2022/smallpearl-ngx-helper-mat-select-entity.mjs +854 -0
  31. package/fesm2022/smallpearl-ngx-helper-mat-select-entity.mjs.map +1 -0
  32. package/fesm2022/smallpearl-ngx-helper-mat-side-menu-layout.mjs +930 -0
  33. package/fesm2022/smallpearl-ngx-helper-mat-side-menu-layout.mjs.map +1 -0
  34. package/fesm2022/smallpearl-ngx-helper-mat-tel-input.mjs +926 -0
  35. package/fesm2022/smallpearl-ngx-helper-mat-tel-input.mjs.map +1 -0
  36. package/fesm2022/smallpearl-ngx-helper-sideload.mjs +111 -0
  37. package/fesm2022/smallpearl-ngx-helper-sideload.mjs.map +1 -0
  38. package/fesm2022/smallpearl-ngx-helper-stationary-with-line-items.mjs +384 -0
  39. package/fesm2022/smallpearl-ngx-helper-stationary-with-line-items.mjs.map +1 -0
  40. package/fesm2022/smallpearl-ngx-helper.mjs +13 -0
  41. package/fesm2022/smallpearl-ngx-helper.mjs.map +1 -0
  42. package/forms/index.d.ts +1 -0
  43. package/forms/src/validation-error-handler.d.ts +52 -0
  44. package/hover-dropdown/index.d.ts +1 -0
  45. package/hover-dropdown/src/hover-dropdown.directive.d.ts +41 -0
  46. package/index.d.ts +5 -0
  47. package/locale/index.d.ts +5 -0
  48. package/locale/src/currency.pipe.d.ts +14 -0
  49. package/locale/src/date.pipe.d.ts +14 -0
  50. package/locale/src/format-currency.d.ts +1 -0
  51. package/locale/src/format-date.d.ts +2 -0
  52. package/locale/src/is-empty.d.ts +1 -0
  53. package/locale/src/providers.d.ts +20 -0
  54. package/mat-busy-wheel/index.d.ts +4 -0
  55. package/mat-busy-wheel/src/busy-wheel-op.d.ts +65 -0
  56. package/mat-busy-wheel/src/busy-wheel.component.d.ts +12 -0
  57. package/mat-busy-wheel/src/busy-wheel.service.d.ts +42 -0
  58. package/mat-busy-wheel/src/host-busy-wheel.directive.d.ts +35 -0
  59. package/mat-context-menu/index.d.ts +1 -0
  60. package/mat-context-menu/src/mat-context-menu.component.d.ts +54 -0
  61. package/mat-entity-crud/index.d.ts +5 -0
  62. package/mat-entity-crud/src/default-config.d.ts +9 -0
  63. package/mat-entity-crud/src/form-view-host.component.d.ts +34 -0
  64. package/mat-entity-crud/src/mat-entity-crud-form-base.d.ts +95 -0
  65. package/mat-entity-crud/src/mat-entity-crud-internal-types.d.ts +66 -0
  66. package/mat-entity-crud/src/mat-entity-crud-types.d.ts +141 -0
  67. package/mat-entity-crud/src/mat-entity-crud.component.d.ts +267 -0
  68. package/mat-entity-crud/src/preview-host.component.d.ts +19 -0
  69. package/mat-entity-crud/src/preview-pane.component.d.ts +27 -0
  70. package/mat-entity-crud/src/providers.d.ts +3 -0
  71. package/mat-entity-list/index.d.ts +3 -0
  72. package/mat-entity-list/src/config.d.ts +6 -0
  73. package/mat-entity-list/src/mat-entity-list-types.d.ts +53 -0
  74. package/mat-entity-list/src/mat-entity-list.component.d.ts +209 -0
  75. package/mat-entity-list/src/providers.d.ts +3 -0
  76. package/mat-file-input/README.md +63 -0
  77. package/mat-file-input/index.d.ts +1 -0
  78. package/mat-file-input/src/mat-file-input.component.d.ts +58 -0
  79. package/mat-form-error/README.md +306 -0
  80. package/mat-form-error/index.d.ts +6 -0
  81. package/mat-form-error/src/locales/en.d.ts +4 -0
  82. package/mat-form-error/src/locales/hu.d.ts +4 -0
  83. package/mat-form-error/src/locales/index.d.ts +3 -0
  84. package/mat-form-error/src/locales/pt-br.d.ts +4 -0
  85. package/mat-form-error/src/ngx-error-list.component.d.ts +9 -0
  86. package/mat-form-error/src/ngx-mat-error-control.d.ts +17 -0
  87. package/mat-form-error/src/ngx-mat-error-def.directive.d.ts +30 -0
  88. package/mat-form-error/src/ngx-mat-errors-for-date-range-picker.directive.d.ts +8 -0
  89. package/mat-form-error/src/ngx-mat-errors.component.d.ts +23 -0
  90. package/mat-form-error/src/types.d.ts +68 -0
  91. package/mat-form-error/src/utils/coerce-to-observable.d.ts +3 -0
  92. package/mat-form-error/src/utils/distinct-until-error-changed.d.ts +2 -0
  93. package/mat-form-error/src/utils/find-error-for-control.d.ts +9 -0
  94. package/mat-form-error/src/utils/get-abstract-controls.d.ts +3 -0
  95. package/mat-form-error/src/utils/get-control-with-error.d.ts +3 -0
  96. package/mat-select-entity/index.d.ts +2 -0
  97. package/mat-select-entity/src/mat-select-entity.component.d.ts +207 -0
  98. package/mat-select-entity/src/providers.d.ts +9 -0
  99. package/mat-side-menu-layout/index.d.ts +6 -0
  100. package/mat-side-menu-layout/src/layout.service.d.ts +23 -0
  101. package/mat-side-menu-layout/src/mat-menu-layout.component.d.ts +39 -0
  102. package/mat-side-menu-layout/src/mat-menu-layout.module.d.ts +18 -0
  103. package/mat-side-menu-layout/src/mat-menu-list-item.component.d.ts +36 -0
  104. package/mat-side-menu-layout/src/mat-menu-pane.component.d.ts +66 -0
  105. package/mat-side-menu-layout/src/nav-item.d.ts +10 -0
  106. package/mat-tel-input/README.md +18 -0
  107. package/mat-tel-input/index.d.ts +2 -0
  108. package/mat-tel-input/src/country-codes.d.ts +5 -0
  109. package/mat-tel-input/src/mat-telephone.component.d.ts +129 -0
  110. package/mat-tel-input/src/providers.d.ts +38 -0
  111. package/ngx-helper.d.ts +2 -0
  112. package/package.json +114 -0
  113. package/public-api.d.ts +1 -0
  114. package/sideload/index.d.ts +1 -0
  115. package/sideload/src/sideload.d.ts +17 -0
  116. package/stationary-with-line-items/index.d.ts +1 -0
  117. package/stationary-with-line-items/src/stationary-with-line-items.component.d.ts +74 -0
@@ -0,0 +1,108 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, Directive } from '@angular/core';
3
+
4
+ /**
5
+ * A directive to make a button triggered mat-menu open during mouse hover.
6
+ * Use it like this:
7
+
8
+ <button #menuTrigger="matMenuTrigger"
9
+ mat-icon-button
10
+ [matMenuTriggerFor]="children"
11
+ hoverDropDown
12
+ [menu]="children"
13
+ [hoverTrigger]="menuTrigger">
14
+ <mat-icon>menu</mat-icon>
15
+ </button>
16
+ <mat-menu #children="matMenu" hasBackdrop="false">
17
+ <button mat-menu-item (click)="onEdit()">Edit</button>
18
+ <button mat-menu-item (click)="onDelete()">Delete</button>
19
+ </mat-menu>
20
+
21
+ Note how hoverDropDown and [hoverTrigger] are used to wire up the button
22
+ and the associated mat-menu to the directive. Once setup like this, the
23
+ mat-menu will be opened whenever the mouse cursor hovers over the menu
24
+ trigger button.
25
+
26
+ Copied from:
27
+ https://stackoverflow.com/questions/54301126/how-to-show-the-angular-material-drop-down-on-mouse-over
28
+ */
29
+ class HoverDropDownDirective {
30
+ el;
31
+ static _menuClicked = false;
32
+ isInHoverBlock = false;
33
+ constructor(el) {
34
+ this.el = el;
35
+ }
36
+ hoverTrigger = input();
37
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
38
+ menu = input();
39
+ ngOnInit() {
40
+ const ht = this.hoverTrigger();
41
+ if (ht) {
42
+ this.el.nativeElement.addEventListener('mouseenter', () => {
43
+ if (HoverDropDownDirective._menuClicked) {
44
+ // console.log(`menu clicked state set, ignoring mouse enter..`);
45
+ return;
46
+ }
47
+ this.setHoverState(true);
48
+ ht.openMenu();
49
+ // KLUDGE!
50
+ // this.menu._elementRef.nativeElement.className can return multiple
51
+ // class names, delimited by a space. Use the first class as the
52
+ // definitive selector for the menu. this could potentially fail in
53
+ // new Angular Material versions if the MatMenu implementation changes.
54
+ const openMenu = document.querySelector(`.mat-menu-after.${this.menu()._elementRef.nativeElement.className.split(' ')[0]}`);
55
+ if (!openMenu) {
56
+ ht.closeMenu();
57
+ return;
58
+ }
59
+ openMenu.addEventListener('mouseenter', () => {
60
+ this.setHoverState(true);
61
+ });
62
+ openMenu.addEventListener('mouseleave', () => {
63
+ this.setHoverState(false);
64
+ });
65
+ openMenu.addEventListener('click', () => {
66
+ // console.log(`menu clicked, setting state..`);
67
+ HoverDropDownDirective._menuClicked = true;
68
+ setTimeout(() => {
69
+ // console.log(`menu clicked, clearing state..`);
70
+ HoverDropDownDirective._menuClicked = false;
71
+ }, 180);
72
+ });
73
+ });
74
+ this.el.nativeElement.addEventListener('mouseleave', () => {
75
+ this.setHoverState(false);
76
+ });
77
+ }
78
+ }
79
+ setHoverState(isInBlock) {
80
+ this.isInHoverBlock = isInBlock;
81
+ if (!isInBlock) {
82
+ this.checkHover();
83
+ }
84
+ }
85
+ checkHover() {
86
+ setTimeout(() => {
87
+ if (!this.isInHoverBlock && this.hoverTrigger().menuOpen) {
88
+ this.hoverTrigger().closeMenu();
89
+ }
90
+ }, 50);
91
+ }
92
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: HoverDropDownDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
93
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.6", type: HoverDropDownDirective, isStandalone: true, selector: "[hoverDropDown]", inputs: { hoverTrigger: { classPropertyName: "hoverTrigger", publicName: "hoverTrigger", isSignal: true, isRequired: false, transformFunction: null }, menu: { classPropertyName: "menu", publicName: "menu", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
94
+ }
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: HoverDropDownDirective, decorators: [{
96
+ type: Directive,
97
+ args: [{
98
+ standalone: true,
99
+ selector: '[hoverDropDown]',
100
+ }]
101
+ }], ctorParameters: () => [{ type: i0.ElementRef }] });
102
+
103
+ /**
104
+ * Generated bundle index. Do not edit.
105
+ */
106
+
107
+ export { HoverDropDownDirective };
108
+ //# sourceMappingURL=smallpearl-ngx-helper-hover-dropdown.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smallpearl-ngx-helper-hover-dropdown.mjs","sources":["../../../../projects/smallpearl/ngx-helper/hover-dropdown/src/hover-dropdown.directive.ts","../../../../projects/smallpearl/ngx-helper/hover-dropdown/smallpearl-ngx-helper-hover-dropdown.ts"],"sourcesContent":["import { Directive, ElementRef, input, OnInit } from '@angular/core';\nimport { MatMenuTrigger } from '@angular/material/menu';\n\n/**\n * A directive to make a button triggered mat-menu open during mouse hover.\n * Use it like this:\n\n <button #menuTrigger=\"matMenuTrigger\"\n mat-icon-button\n [matMenuTriggerFor]=\"children\"\n hoverDropDown\n [menu]=\"children\"\n [hoverTrigger]=\"menuTrigger\">\n <mat-icon>menu</mat-icon>\n </button>\n <mat-menu #children=\"matMenu\" hasBackdrop=\"false\">\n <button mat-menu-item (click)=\"onEdit()\">Edit</button>\n <button mat-menu-item (click)=\"onDelete()\">Delete</button>\n </mat-menu>\n\n Note how hoverDropDown and [hoverTrigger] are used to wire up the button\n and the associated mat-menu to the directive. Once setup like this, the\n mat-menu will be opened whenever the mouse cursor hovers over the menu\n trigger button.\n\n Copied from:\n https://stackoverflow.com/questions/54301126/how-to-show-the-angular-material-drop-down-on-mouse-over\n */\n@Directive({\n standalone: true,\n selector: '[hoverDropDown]',\n})\nexport class HoverDropDownDirective implements OnInit {\n static _menuClicked = false;\n isInHoverBlock = false;\n\n constructor(private el: ElementRef) {}\n\n hoverTrigger = input<MatMenuTrigger|null>();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n menu = input<any>();\n\n ngOnInit() {\n const ht = this.hoverTrigger();\n if (ht) {\n this.el.nativeElement.addEventListener('mouseenter', () => {\n if (HoverDropDownDirective._menuClicked) {\n // console.log(`menu clicked state set, ignoring mouse enter..`);\n return;\n }\n this.setHoverState(true);\n ht.openMenu();\n // KLUDGE!\n // this.menu._elementRef.nativeElement.className can return multiple\n // class names, delimited by a space. Use the first class as the\n // definitive selector for the menu. this could potentially fail in\n // new Angular Material versions if the MatMenu implementation changes.\n const openMenu = document.querySelector(\n `.mat-menu-after.${\n this.menu()._elementRef.nativeElement.className.split(' ')[0]\n }`\n );\n if (!openMenu) {\n ht.closeMenu();\n return;\n }\n openMenu.addEventListener('mouseenter', () => {\n this.setHoverState(true);\n });\n openMenu.addEventListener('mouseleave', () => {\n this.setHoverState(false);\n });\n openMenu.addEventListener('click', () => {\n // console.log(`menu clicked, setting state..`);\n HoverDropDownDirective._menuClicked = true;\n setTimeout(() => {\n // console.log(`menu clicked, clearing state..`);\n HoverDropDownDirective._menuClicked = false;\n }, 180);\n });\n });\n this.el.nativeElement.addEventListener('mouseleave', () => {\n this.setHoverState(false);\n });\n }\n }\n\n private setHoverState(isInBlock: boolean) {\n this.isInHoverBlock = isInBlock;\n if (!isInBlock) {\n this.checkHover();\n }\n }\n\n private checkHover() {\n setTimeout(() => {\n if (!this.isInHoverBlock && this.hoverTrigger()!.menuOpen) {\n this.hoverTrigger()!.closeMenu();\n }\n }, 50);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;MAKU,sBAAsB,CAAA;AAIb,IAAA,EAAA;AAHpB,IAAA,OAAO,YAAY,GAAG,KAAK;IAC3B,cAAc,GAAG,KAAK;AAEtB,IAAA,WAAA,CAAoB,EAAc,EAAA;QAAd,IAAE,CAAA,EAAA,GAAF,EAAE;;IAEtB,YAAY,GAAG,KAAK,EAAuB;;IAG3C,IAAI,GAAG,KAAK,EAAO;IAEnB,QAAQ,GAAA;AACN,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE;QAC9B,IAAI,EAAE,EAAE;YACN,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAAK;AACxD,gBAAA,IAAI,sBAAsB,CAAC,YAAY,EAAE;;oBAEvC;;AAEF,gBAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;gBACxB,EAAE,CAAC,QAAQ,EAAE;;;;;;gBAMb,MAAM,QAAQ,GAAG,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,CAAC;;0HApEG,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;8GAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,iBAAiB;AAC5B,iBAAA;;;AC/BD;;AAEG;;;;"}
@@ -0,0 +1,296 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Pipe } from '@angular/core';
3
+
4
+ /**
5
+ * Default mini library config.
6
+ */
7
+ const DEFAULT_SP_NGX_I18N_CONFIG = {
8
+ locale: 'en-US',
9
+ currency: 'USD',
10
+ timezone: 'UTC',
11
+ datetimeFormat: 'mediumDate'
12
+ };
13
+ /**
14
+ * The object that will hold the mini library config.
15
+ */
16
+ let _config = DEFAULT_SP_NGX_I18N_CONFIG;
17
+ /**
18
+ * Call this function update the _config dynamically as the need arises.
19
+ * @param config
20
+ */
21
+ function setSPLocaleConfig(config) {
22
+ _config = { ..._config, ...config };
23
+ }
24
+ /**
25
+ * @returns Current config object.
26
+ */
27
+ function getSPLocaleConfig() {
28
+ return _config;
29
+ }
30
+
31
+ const isEmpty = (value) => {
32
+ return (value == null || value === '' || value !== value // Check for NaN.
33
+ );
34
+ };
35
+
36
+ const formatOptions = {
37
+ short: {
38
+ year: 'numeric',
39
+ month: 'numeric',
40
+ day: 'numeric',
41
+ hour: 'numeric',
42
+ minute: 'numeric',
43
+ },
44
+ medium: {
45
+ year: 'numeric',
46
+ month: 'short',
47
+ day: 'numeric',
48
+ hour: 'numeric',
49
+ minute: 'numeric',
50
+ second: 'numeric',
51
+ },
52
+ long: {
53
+ year: 'numeric',
54
+ month: 'long',
55
+ day: 'numeric',
56
+ hour: 'numeric',
57
+ minute: 'numeric',
58
+ second: 'numeric',
59
+ timeZoneName: 'short'
60
+ },
61
+ full: {
62
+ weekday: 'long',
63
+ year: 'numeric',
64
+ month: 'long',
65
+ day: 'numeric',
66
+ hour: 'numeric',
67
+ minute: 'numeric',
68
+ second: 'numeric',
69
+ timeZoneName: 'longOffset'
70
+ },
71
+ shortDate: {
72
+ year: 'numeric',
73
+ month: 'numeric',
74
+ day: 'numeric',
75
+ },
76
+ mediumDate: {
77
+ year: 'numeric',
78
+ month: 'short',
79
+ day: 'numeric',
80
+ },
81
+ longDate: {
82
+ year: 'numeric',
83
+ month: 'long',
84
+ day: 'numeric',
85
+ },
86
+ fullDate: {
87
+ weekday: 'long',
88
+ year: 'numeric',
89
+ month: 'long',
90
+ day: 'numeric',
91
+ },
92
+ shortTime: {
93
+ hour: 'numeric',
94
+ minute: 'numeric',
95
+ },
96
+ mediumTime: {
97
+ hour: 'numeric',
98
+ minute: 'numeric',
99
+ second: 'numeric',
100
+ },
101
+ longTime: {
102
+ hour: 'numeric',
103
+ minute: 'numeric',
104
+ second: 'numeric',
105
+ timeZoneName: 'short'
106
+ },
107
+ fullTime: {
108
+ hour: 'numeric',
109
+ minute: 'numeric',
110
+ second: 'numeric',
111
+ timeZoneName: 'longOffset'
112
+ },
113
+ };
114
+ function spFormatDate(value, format, timeZone) {
115
+ if (isEmpty(value)) {
116
+ return '';
117
+ }
118
+ const date = new Date(value);
119
+ if (isNaN(date.valueOf())) {
120
+ return '******';
121
+ // throw new Error(`Unable to convert "${value}" into a date.`);
122
+ }
123
+ const config = getSPLocaleConfig();
124
+ format = format ?? config.datetimeFormat;
125
+ const validFormatStrings = Object.keys(formatOptions);
126
+ if (!validFormatStrings.find(formatStr => formatStr === format)) {
127
+ format = 'mediumDate';
128
+ }
129
+ timeZone = timeZone ?? config.timezone;
130
+ const dateTimeFormatter = new Intl.DateTimeFormat(config.locale, {
131
+ ...formatOptions[format],
132
+ timeZone,
133
+ });
134
+ return dateTimeFormatter.format(date);
135
+ }
136
+
137
+ /**
138
+ * An alternative to the Angular built-in `DatePipe` based on the native `Intl.DateTimeFormat` API.
139
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
140
+ * https://angular.io/api/common/DatePipe
141
+ */
142
+ class SPDatePipe {
143
+ #formatOptions = {
144
+ short: {
145
+ year: 'numeric',
146
+ month: 'numeric',
147
+ day: 'numeric',
148
+ hour: 'numeric',
149
+ minute: 'numeric',
150
+ },
151
+ medium: {
152
+ year: 'numeric',
153
+ month: 'short',
154
+ day: 'numeric',
155
+ hour: 'numeric',
156
+ minute: 'numeric',
157
+ second: 'numeric',
158
+ },
159
+ long: {
160
+ year: 'numeric',
161
+ month: 'long',
162
+ day: 'numeric',
163
+ hour: 'numeric',
164
+ minute: 'numeric',
165
+ second: 'numeric',
166
+ timeZoneName: 'short'
167
+ },
168
+ full: {
169
+ weekday: 'long',
170
+ year: 'numeric',
171
+ month: 'long',
172
+ day: 'numeric',
173
+ hour: 'numeric',
174
+ minute: 'numeric',
175
+ second: 'numeric',
176
+ timeZoneName: 'longOffset'
177
+ },
178
+ shortDate: {
179
+ year: 'numeric',
180
+ month: 'numeric',
181
+ day: 'numeric',
182
+ },
183
+ mediumDate: {
184
+ year: 'numeric',
185
+ month: 'short',
186
+ day: 'numeric',
187
+ },
188
+ longDate: {
189
+ year: 'numeric',
190
+ month: 'long',
191
+ day: 'numeric',
192
+ },
193
+ fullDate: {
194
+ weekday: 'long',
195
+ year: 'numeric',
196
+ month: 'long',
197
+ day: 'numeric',
198
+ },
199
+ shortTime: {
200
+ hour: 'numeric',
201
+ minute: 'numeric',
202
+ },
203
+ mediumTime: {
204
+ hour: 'numeric',
205
+ minute: 'numeric',
206
+ second: 'numeric',
207
+ },
208
+ longTime: {
209
+ hour: 'numeric',
210
+ minute: 'numeric',
211
+ second: 'numeric',
212
+ timeZoneName: 'short'
213
+ },
214
+ fullTime: {
215
+ hour: 'numeric',
216
+ minute: 'numeric',
217
+ second: 'numeric',
218
+ timeZoneName: 'longOffset'
219
+ },
220
+ };
221
+ transform(value, format, timeZone) {
222
+ return spFormatDate(value, format, timeZone);
223
+ // if (isEmpty(value)) {
224
+ // return '';
225
+ // }
226
+ // const date = new Date(value);
227
+ // if (isNaN(date.valueOf())) {
228
+ // return '******';
229
+ // // throw new Error(`Unable to convert "${value}" into a date.`);
230
+ // }
231
+ // const config = getSPI18nConfig();
232
+ // format = format ?? config.datetimeFormat;
233
+ // timeZone = timeZone ?? config.timezone;
234
+ // const dateTimeFormatter = new Intl.DateTimeFormat(config.locale, {
235
+ // ...this.#formatOptions[format],
236
+ // timeZone,
237
+ // });
238
+ // return dateTimeFormatter.format(date);
239
+ }
240
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: SPDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
241
+ /** @nocollapse */ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.6", ngImport: i0, type: SPDatePipe, isStandalone: true, name: "spDate" });
242
+ }
243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: SPDatePipe, decorators: [{
244
+ type: Pipe,
245
+ args: [{
246
+ standalone: true,
247
+ name: 'spDate',
248
+ }]
249
+ }] });
250
+
251
+ function spFormatCurrency(value, currency) {
252
+ if (isEmpty(value)) {
253
+ return '';
254
+ }
255
+ const number = typeof value === 'string' ? parseFloat(value) : value;
256
+ if (isNaN(number)) {
257
+ return "****.**";
258
+ // throw new Error(`"${value}" is not a number.`);
259
+ }
260
+ const config = getSPLocaleConfig();
261
+ // TODO: change to community locale read from this.currentCommunity.locale
262
+ const currencyFormatter = new Intl.NumberFormat(config.locale, {
263
+ currency: currency ?? config.currency,
264
+ style: 'currency',
265
+ });
266
+ return currencyFormatter.format(number);
267
+ }
268
+
269
+ /**
270
+ * This is a replacement for Angular's native currency pipe. This uses
271
+ * web standardized Intl.NumberFormat() API to format currency. The advantage
272
+ * of this over Angular's version is that this pipe allows the locale and
273
+ * currency parameters to be dynamically changed during runtime.
274
+ */
275
+ class SPCurrencyPipe {
276
+ constructor() { }
277
+ transform(value, currency) {
278
+ return spFormatCurrency(value, currency);
279
+ }
280
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: SPCurrencyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
281
+ /** @nocollapse */ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.6", ngImport: i0, type: SPCurrencyPipe, isStandalone: true, name: "spCurrency" });
282
+ }
283
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: SPCurrencyPipe, decorators: [{
284
+ type: Pipe,
285
+ args: [{
286
+ name: 'spCurrency',
287
+ standalone: true,
288
+ }]
289
+ }], ctorParameters: () => [] });
290
+
291
+ /**
292
+ * Generated bundle index. Do not edit.
293
+ */
294
+
295
+ export { SPCurrencyPipe, SPDatePipe, _config, getSPLocaleConfig, setSPLocaleConfig, spFormatCurrency, spFormatDate };
296
+ //# sourceMappingURL=smallpearl-ngx-helper-locale.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smallpearl-ngx-helper-locale.mjs","sources":["../../../../projects/smallpearl/ngx-helper/locale/src/providers.ts","../../../../projects/smallpearl/ngx-helper/locale/src/is-empty.ts","../../../../projects/smallpearl/ngx-helper/locale/src/format-date.ts","../../../../projects/smallpearl/ngx-helper/locale/src/date.pipe.ts","../../../../projects/smallpearl/ngx-helper/locale/src/format-currency.ts","../../../../projects/smallpearl/ngx-helper/locale/src/currency.pipe.ts","../../../../projects/smallpearl/ngx-helper/locale/smallpearl-ngx-helper-locale.ts"],"sourcesContent":["export type SPIntlDateFormat = 'short'|'medium'|'long'|'full'|'shortDate'|'mediumDate'|'longDate'|'fullDate'|'shortTime'|'mediumTime'|'longTime'|'fullTime';\n\nexport interface SPNgxI18nConfig {\n locale: string;\n currency: string;\n timezone: string;\n datetimeFormat: SPIntlDateFormat;\n}\n\n/**\n * Default mini library config.\n */\nconst DEFAULT_SP_NGX_I18N_CONFIG: SPNgxI18nConfig = {\n locale: 'en-US',\n currency: 'USD',\n timezone: 'UTC',\n datetimeFormat: 'mediumDate'\n};\n\n/**\n * The object that will hold the mini library config.\n */\nexport let _config: SPNgxI18nConfig = DEFAULT_SP_NGX_I18N_CONFIG;\n\n/**\n * Call this function update the _config dynamically as the need arises.\n * @param config\n */\nexport function setSPLocaleConfig(config: Partial<SPNgxI18nConfig>) {\n _config = {..._config, ...config };\n}\n\n/**\n * @returns Current config object.\n */\nexport function getSPLocaleConfig() {\n return _config;\n}\n","export const isEmpty = (value: any): boolean => {\n return (\n value == null || value === '' || value !== value // Check for NaN.\n );\n};\n","import { isEmpty } from \"./is-empty\";\nimport { getSPLocaleConfig, SPIntlDateFormat } from \"./providers\";\n\nconst formatOptions: Record<SPIntlDateFormat, Intl.DateTimeFormatOptions> = {\n short: {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short'\n },\n full: {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'longOffset'\n },\n shortDate: {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n },\n mediumDate: { // Equal to the \"mediumDate\" format in Angular.\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n },\n longDate: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n fullDate: {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n shortTime: {\n hour: 'numeric',\n minute: 'numeric',\n },\n mediumTime: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n longTime: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short'\n },\n fullTime: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'longOffset'\n },\n};\n\nexport function spFormatDate(value: Date | number | string, format?: SPIntlDateFormat, timeZone?: string) {\n if (isEmpty(value)) {\n return '';\n }\n\n const date = new Date(value);\n\n if (isNaN(date.valueOf())) {\n return '******';\n // throw new Error(`Unable to convert \"${value}\" into a date.`);\n }\n const config = getSPLocaleConfig();\n format = format ?? config.datetimeFormat;\n const validFormatStrings = Object.keys(formatOptions);\n if (!validFormatStrings.find(formatStr => formatStr === format)) {\n format = 'mediumDate';\n }\n timeZone = timeZone ?? config.timezone;\n const dateTimeFormatter = new Intl.DateTimeFormat(config.locale, {\n ...formatOptions[format],\n timeZone,\n });\n\n return dateTimeFormatter.format(date);\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { spFormatDate } from './format-date';\nimport { SPIntlDateFormat } from './providers';\n\n/**\n * An alternative to the Angular built-in `DatePipe` based on the native `Intl.DateTimeFormat` API.\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * https://angular.io/api/common/DatePipe\n */\n@Pipe({\n standalone: true,\n name: 'spDate',\n})\nexport class SPDatePipe implements PipeTransform {\n readonly #formatOptions: Record<SPIntlDateFormat, Intl.DateTimeFormatOptions> = {\n short: {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short'\n },\n full: {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'longOffset'\n },\n shortDate: {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n },\n mediumDate: { // Equal to the \"mediumDate\" format in Angular.\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n },\n longDate: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n fullDate: {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n shortTime: {\n hour: 'numeric',\n minute: 'numeric',\n },\n mediumTime: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n longTime: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short'\n },\n fullTime: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'longOffset'\n },\n };\n\n transform(\n value: Date | number | string,\n format?: SPIntlDateFormat,\n timeZone?: string\n ): string | null {\n\n return spFormatDate(value, format, timeZone);\n // if (isEmpty(value)) {\n // return '';\n // }\n\n // const date = new Date(value);\n\n // if (isNaN(date.valueOf())) {\n // return '******';\n // // throw new Error(`Unable to convert \"${value}\" into a date.`);\n // }\n // const config = getSPI18nConfig();\n // format = format ?? config.datetimeFormat;\n // timeZone = timeZone ?? config.timezone;\n // const dateTimeFormatter = new Intl.DateTimeFormat(config.locale, {\n // ...this.#formatOptions[format],\n // timeZone,\n // });\n\n // return dateTimeFormatter.format(date);\n }\n}\n","import { isEmpty } from \"./is-empty\";\nimport { getSPLocaleConfig } from \"./providers\";\n\nexport function spFormatCurrency(value: number | bigint | string, currency?: string): string | null {\n\n if (isEmpty(value)) {\n return '';\n }\n\n const number =\n typeof value === 'string' ? parseFloat(value) : (value as number);\n\n if (isNaN(number)) {\n return \"****.**\";\n // throw new Error(`\"${value}\" is not a number.`);\n }\n\n const config = getSPLocaleConfig();\n // TODO: change to community locale read from this.currentCommunity.locale\n const currencyFormatter = new Intl.NumberFormat(config.locale, {\n currency: currency ?? config.currency,\n style: 'currency',\n });\n\n return currencyFormatter.format(number);\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { spFormatCurrency } from './format-currency';\n\n/**\n * This is a replacement for Angular's native currency pipe. This uses\n * web standardized Intl.NumberFormat() API to format currency. The advantage\n * of this over Angular's version is that this pipe allows the locale and\n * currency parameters to be dynamically changed during runtime.\n */\n@Pipe({\n name: 'spCurrency',\n standalone: true,\n})\nexport class SPCurrencyPipe implements PipeTransform {\n constructor() {}\n\n transform(value: number | bigint | string, currency?: string): string | null {\n return spFormatCurrency(value, currency);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AASA;;AAEG;AACH,MAAM,0BAA0B,GAAoB;AAClD,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,cAAc,EAAE;CACjB;AAED;;AAEG;AACI,IAAI,OAAO,GAAoB;AAEtC;;;AAGG;AACG,SAAU,iBAAiB,CAAC,MAAgC,EAAA;IAChE,OAAO,GAAG,EAAC,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE;AACp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