aril 0.0.2 → 0.0.3

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 (207) hide show
  1. package/README.md +20 -7
  2. package/esm2022/http/index.mjs +5 -1
  3. package/esm2022/http/lib/enums.mjs +1 -2
  4. package/esm2022/http/lib/interfaces.mjs +3 -1
  5. package/esm2022/http/src/httpClient.mjs +2 -1
  6. package/esm2022/http/src/serviceBase.mjs +10 -10
  7. package/esm2022/ui/badge/aril-ui-badge.mjs +5 -0
  8. package/esm2022/ui/badge/index.mjs +2 -0
  9. package/esm2022/ui/badge/src/badge.component.mjs +25 -0
  10. package/esm2022/ui/button/index.mjs +2 -1
  11. package/esm2022/ui/button/src/button.component.mjs +45 -7
  12. package/esm2022/ui/button/src/split-button.component.mjs +17 -0
  13. package/esm2022/ui/calendar/src/calendar.component.mjs +80 -8
  14. package/esm2022/ui/checkbox/index.mjs +2 -2
  15. package/esm2022/ui/checkbox/src/check-box.component.mjs +26 -0
  16. package/esm2022/ui/confirmPopup/aril-ui-confirmPopup.mjs +5 -0
  17. package/esm2022/ui/confirmPopup/index.mjs +2 -0
  18. package/esm2022/ui/confirmPopup/src/confirm-popup.component.mjs +40 -0
  19. package/esm2022/ui/dialog/aril-ui-dialog.mjs +5 -0
  20. package/esm2022/ui/dialog/index.mjs +2 -0
  21. package/esm2022/ui/dialog/src/dialog.component.mjs +56 -0
  22. package/esm2022/ui/dxField/aril-ui-dxField.mjs +5 -0
  23. package/esm2022/ui/dxField/index.mjs +2 -0
  24. package/esm2022/ui/dxField/src/dx-field.component.mjs +27 -0
  25. package/esm2022/ui/field/aril-ui-field.mjs +5 -0
  26. package/esm2022/ui/field/index.mjs +2 -0
  27. package/esm2022/ui/field/src/field.component.mjs +48 -0
  28. package/esm2022/ui/fileUpload/aril-ui-fileUpload.mjs +5 -0
  29. package/esm2022/ui/fileUpload/index.mjs +2 -0
  30. package/esm2022/ui/fileUpload/src/file-upload.component.mjs +85 -0
  31. package/esm2022/ui/form/aril-ui-form.mjs +5 -0
  32. package/esm2022/ui/form/index.mjs +3 -0
  33. package/esm2022/ui/form/src/form-submit-button.component.mjs +41 -0
  34. package/esm2022/ui/form/src/form.component.mjs +28 -0
  35. package/esm2022/ui/lib/index.mjs +13 -3
  36. package/esm2022/ui/lib/src/form/form-error-message.component.mjs +33 -0
  37. package/esm2022/ui/lib/src/form/form-error-message.directive.mjs +35 -0
  38. package/esm2022/ui/lib/src/grid/flex-grid.directive.mjs +21 -0
  39. package/esm2022/ui/lib/src/input/baseInput.mjs +24 -0
  40. package/esm2022/ui/lib/src/input/common-input-validators.service.mjs +3 -3
  41. package/esm2022/ui/lib/src/input/dx-input-error-message.pipe.mjs +22 -0
  42. package/esm2022/ui/lib/src/input/input-disabled.directive.mjs +3 -3
  43. package/esm2022/ui/lib/src/input/input-error-message.pipe.mjs +41 -0
  44. package/esm2022/ui/lib/src/input/input-transforms.mjs +8 -0
  45. package/esm2022/ui/lib/src/input/value-accessor.directive.mjs +32 -0
  46. package/esm2022/ui/mask/aril-ui-mask.mjs +5 -0
  47. package/esm2022/ui/mask/index.mjs +2 -0
  48. package/esm2022/ui/mask/src/mask.component.mjs +44 -0
  49. package/esm2022/ui/number/aril-ui-number.mjs +5 -0
  50. package/esm2022/ui/number/index.mjs +2 -0
  51. package/esm2022/ui/number/src/number.component.mjs +58 -0
  52. package/esm2022/ui/overlayPanel/aril-ui-overlayPanel.mjs +5 -0
  53. package/esm2022/ui/overlayPanel/index.mjs +2 -0
  54. package/esm2022/ui/overlayPanel/src/overlay-panel.component.mjs +37 -0
  55. package/esm2022/ui/panel/aril-ui-panel.mjs +5 -0
  56. package/esm2022/ui/panel/index.mjs +2 -0
  57. package/esm2022/ui/panel/src/panel.component.mjs +32 -0
  58. package/esm2022/ui/password/aril-ui-password.mjs +5 -0
  59. package/esm2022/ui/password/index.mjs +2 -0
  60. package/esm2022/ui/password/src/password.component.mjs +32 -0
  61. package/esm2022/ui/radioButton/aril-ui-radioButton.mjs +5 -0
  62. package/esm2022/ui/radioButton/index.mjs +2 -0
  63. package/esm2022/ui/radioButton/src/radio-button.component.mjs +35 -0
  64. package/esm2022/ui/selectBox/aril-ui-selectBox.mjs +5 -0
  65. package/esm2022/ui/selectBox/index.mjs +2 -0
  66. package/esm2022/ui/selectBox/src/select-box.component.mjs +41 -0
  67. package/esm2022/ui/switch/aril-ui-switch.mjs +5 -0
  68. package/esm2022/ui/switch/index.mjs +2 -0
  69. package/esm2022/ui/switch/src/switch.component.mjs +19 -0
  70. package/esm2022/ui/tagBox/aril-ui-tagBox.mjs +5 -0
  71. package/esm2022/ui/tagBox/index.mjs +2 -0
  72. package/esm2022/ui/tagBox/src/tag-box.component.mjs +58 -0
  73. package/esm2022/ui/text/aril-ui-text.mjs +5 -0
  74. package/esm2022/ui/text/index.mjs +2 -0
  75. package/esm2022/ui/text/src/text.component.mjs +37 -0
  76. package/esm2022/ui/textArea/aril-ui-textArea.mjs +5 -0
  77. package/esm2022/ui/textArea/index.mjs +2 -0
  78. package/esm2022/ui/textArea/src/text-area.component.mjs +27 -0
  79. package/esm2022/ui/tree/aril-ui-tree.mjs +5 -0
  80. package/esm2022/ui/tree/index.mjs +2 -0
  81. package/esm2022/ui/tree/src/tree.component.mjs +67 -0
  82. package/esm2022/ui/treeTable/aril-ui-treeTable.mjs +5 -0
  83. package/esm2022/ui/treeTable/index.mjs +2 -0
  84. package/esm2022/ui/treeTable/src/tree-table.component.mjs +52 -0
  85. package/esm2022/util/init-event/src/init-event.directive.mjs +8 -8
  86. package/esm2022/util/lib/src/interfaces.mjs +3 -1
  87. package/esm2022/util/lib/src/types.mjs +4 -1
  88. package/esm2022/util/pub-sub/src/pub-sub.service.mjs +5 -4
  89. package/fesm2022/aril-http.mjs +49 -45
  90. package/fesm2022/aril-http.mjs.map +1 -1
  91. package/fesm2022/aril-ui-badge.mjs +32 -0
  92. package/fesm2022/aril-ui-badge.mjs.map +1 -0
  93. package/fesm2022/aril-ui-button.mjs +59 -7
  94. package/fesm2022/aril-ui-button.mjs.map +1 -1
  95. package/fesm2022/aril-ui-calendar.mjs +78 -7
  96. package/fesm2022/aril-ui-calendar.mjs.map +1 -1
  97. package/fesm2022/aril-ui-checkbox.mjs +22 -7
  98. package/fesm2022/aril-ui-checkbox.mjs.map +1 -1
  99. package/fesm2022/aril-ui-confirmPopup.mjs +47 -0
  100. package/fesm2022/aril-ui-confirmPopup.mjs.map +1 -0
  101. package/fesm2022/aril-ui-dialog.mjs +63 -0
  102. package/fesm2022/aril-ui-dialog.mjs.map +1 -0
  103. package/fesm2022/aril-ui-dxField.mjs +34 -0
  104. package/fesm2022/aril-ui-dxField.mjs.map +1 -0
  105. package/fesm2022/aril-ui-field.mjs +55 -0
  106. package/fesm2022/aril-ui-field.mjs.map +1 -0
  107. package/fesm2022/aril-ui-fileUpload.mjs +92 -0
  108. package/fesm2022/aril-ui-fileUpload.mjs.map +1 -0
  109. package/fesm2022/aril-ui-form.mjs +74 -0
  110. package/fesm2022/aril-ui-form.mjs.map +1 -0
  111. package/fesm2022/aril-ui-lib.mjs +252 -51
  112. package/fesm2022/aril-ui-lib.mjs.map +1 -1
  113. package/fesm2022/aril-ui-mask.mjs +51 -0
  114. package/fesm2022/aril-ui-mask.mjs.map +1 -0
  115. package/fesm2022/aril-ui-number.mjs +65 -0
  116. package/fesm2022/aril-ui-number.mjs.map +1 -0
  117. package/fesm2022/aril-ui-overlayPanel.mjs +44 -0
  118. package/fesm2022/aril-ui-overlayPanel.mjs.map +1 -0
  119. package/fesm2022/aril-ui-panel.mjs +39 -0
  120. package/fesm2022/aril-ui-panel.mjs.map +1 -0
  121. package/fesm2022/aril-ui-password.mjs +39 -0
  122. package/fesm2022/aril-ui-password.mjs.map +1 -0
  123. package/fesm2022/aril-ui-radioButton.mjs +42 -0
  124. package/fesm2022/aril-ui-radioButton.mjs.map +1 -0
  125. package/fesm2022/aril-ui-selectBox.mjs +48 -0
  126. package/fesm2022/aril-ui-selectBox.mjs.map +1 -0
  127. package/fesm2022/aril-ui-switch.mjs +26 -0
  128. package/fesm2022/aril-ui-switch.mjs.map +1 -0
  129. package/fesm2022/aril-ui-tagBox.mjs +65 -0
  130. package/fesm2022/aril-ui-tagBox.mjs.map +1 -0
  131. package/fesm2022/aril-ui-text.mjs +44 -0
  132. package/fesm2022/aril-ui-text.mjs.map +1 -0
  133. package/fesm2022/aril-ui-textArea.mjs +34 -0
  134. package/fesm2022/aril-ui-textArea.mjs.map +1 -0
  135. package/fesm2022/aril-ui-tree.mjs +74 -0
  136. package/fesm2022/aril-ui-tree.mjs.map +1 -0
  137. package/fesm2022/aril-ui-treeTable.mjs +59 -0
  138. package/fesm2022/aril-ui-treeTable.mjs.map +1 -0
  139. package/fesm2022/aril-util-init-event.mjs +7 -7
  140. package/fesm2022/aril-util-init-event.mjs.map +1 -1
  141. package/fesm2022/aril-util-lib.mjs +7 -0
  142. package/fesm2022/aril-util-lib.mjs.map +1 -1
  143. package/fesm2022/aril-util-pub-sub.mjs +4 -3
  144. package/fesm2022/aril-util-pub-sub.mjs.map +1 -1
  145. package/http/index.d.ts +2 -0
  146. package/http/lib/enums.d.ts +2 -2
  147. package/package.json +138 -12
  148. package/styles/ui/ui.styles.css +8 -0
  149. package/ui/badge/index.d.ts +1 -0
  150. package/ui/badge/src/badge.component.d.ts +11 -0
  151. package/ui/button/index.d.ts +1 -0
  152. package/ui/button/src/button.component.d.ts +21 -2
  153. package/ui/button/src/split-button.component.d.ts +8 -0
  154. package/ui/calendar/src/calendar.component.d.ts +26 -2
  155. package/ui/checkbox/index.d.ts +1 -1
  156. package/ui/checkbox/src/check-box.component.d.ts +8 -0
  157. package/ui/confirmPopup/index.d.ts +1 -0
  158. package/ui/confirmPopup/src/confirm-popup.component.d.ts +15 -0
  159. package/ui/dialog/index.d.ts +1 -0
  160. package/ui/dialog/src/dialog.component.d.ts +20 -0
  161. package/ui/dxField/index.d.ts +1 -0
  162. package/ui/dxField/src/dx-field.component.d.ts +11 -0
  163. package/ui/field/index.d.ts +1 -0
  164. package/ui/field/src/field.component.d.ts +24 -0
  165. package/ui/fileUpload/index.d.ts +1 -0
  166. package/ui/fileUpload/src/file-upload.component.d.ts +44 -0
  167. package/ui/form/index.d.ts +2 -0
  168. package/ui/form/src/form-submit-button.component.d.ts +14 -0
  169. package/ui/form/src/form.component.d.ts +8 -0
  170. package/ui/lib/index.d.ts +9 -2
  171. package/ui/lib/src/form/form-error-message.component.d.ts +9 -0
  172. package/ui/lib/src/form/form-error-message.directive.d.ts +14 -0
  173. package/ui/lib/src/grid/flex-grid.directive.d.ts +6 -0
  174. package/ui/lib/src/input/baseInput.d.ts +7 -0
  175. package/ui/lib/src/input/dx-input-error-message.pipe.d.ts +11 -0
  176. package/ui/lib/src/input/input-error-message.pipe.d.ts +7 -0
  177. package/ui/lib/src/input/input-transforms.d.ts +5 -0
  178. package/ui/lib/src/input/value-accessor.directive.d.ts +9 -0
  179. package/ui/mask/index.d.ts +1 -0
  180. package/ui/mask/src/mask.component.d.ts +21 -0
  181. package/ui/number/index.d.ts +1 -0
  182. package/ui/number/src/number.component.d.ts +23 -0
  183. package/ui/overlayPanel/index.d.ts +1 -0
  184. package/ui/overlayPanel/src/overlay-panel.component.d.ts +15 -0
  185. package/ui/panel/index.d.ts +1 -0
  186. package/ui/panel/src/panel.component.d.ts +12 -0
  187. package/ui/password/index.d.ts +1 -0
  188. package/ui/password/src/password.component.d.ts +10 -0
  189. package/ui/radioButton/index.d.ts +1 -0
  190. package/ui/radioButton/src/radio-button.component.d.ts +17 -0
  191. package/ui/selectBox/index.d.ts +1 -0
  192. package/ui/selectBox/src/select-box.component.d.ts +18 -0
  193. package/ui/switch/index.d.ts +1 -0
  194. package/ui/switch/src/switch.component.d.ts +7 -0
  195. package/ui/tagBox/index.d.ts +1 -0
  196. package/ui/tagBox/src/tag-box.component.d.ts +14 -0
  197. package/ui/text/index.d.ts +1 -0
  198. package/ui/text/src/text.component.d.ts +15 -0
  199. package/ui/textArea/index.d.ts +1 -0
  200. package/ui/textArea/src/text-area.component.d.ts +11 -0
  201. package/ui/tree/index.d.ts +1 -0
  202. package/ui/tree/src/tree.component.d.ts +29 -0
  203. package/ui/treeTable/index.d.ts +1 -0
  204. package/ui/treeTable/src/tree-table.component.d.ts +23 -0
  205. package/util/init-event/src/init-event.directive.d.ts +4 -4
  206. package/esm2022/ui/checkbox/src/checkbox.component.mjs +0 -11
  207. package/ui/checkbox/src/checkbox.component.d.ts +0 -5
@@ -1,31 +1,149 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, Injectable } from '@angular/core';
3
- import * as i1 from '@angular/forms';
4
- import { FormControl, FormGroup, FormArray } from '@angular/forms';
2
+ import { Component, ChangeDetectionStrategy, Input, Directive, HostBinding, inject, Injectable, Pipe } from '@angular/core';
3
+ import * as i1 from 'primeng/messages';
4
+ import { MessagesModule } from 'primeng/messages';
5
+ import * as i1$1 from '@angular/forms';
6
+ import { FormControl, FormGroup, FormArray, NgControl, NgModel, FormControlName, FormControlDirective, NG_VALUE_ACCESSOR } from '@angular/forms';
5
7
  import 'aril/util/primitive-extensions';
8
+ import { PrimeIcons } from 'primeng/api';
6
9
 
7
- class InputDisabledDirective {
8
- constructor(ngControl) {
9
- this.ngControl = ngControl;
10
+ class FormErrorMessagesComponent {
11
+ set messages(messages) {
12
+ this._pMessages = Object.values(messages).map((msg) => {
13
+ return { severity: 'error', summary: '', detail: msg };
14
+ });
10
15
  }
11
- set arilDisabled(condition) {
12
- const action = condition ? 'disable' : 'enable';
13
- if (this.ngControl.control)
14
- this.ngControl.control[action]();
16
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormErrorMessagesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: FormErrorMessagesComponent, isStandalone: true, selector: "ng-component", inputs: { messages: "messages" }, ngImport: i0, template: `
18
+ <div class="flex gap-2 formErrorMessage">
19
+ <p-messages [(value)]="_pMessages" [enableService]="false" [closable]="false"></p-messages>
20
+ </div>
21
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: MessagesModule }, { kind: "component", type: i1.Messages, selector: "p-messages", inputs: ["value", "closable", "style", "styleClass", "enableService", "key", "escape", "severity", "showTransitionOptions", "hideTransitionOptions"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22
+ }
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormErrorMessagesComponent, decorators: [{
24
+ type: Component,
25
+ args: [{
26
+ standalone: true,
27
+ imports: [MessagesModule],
28
+ template: `
29
+ <div class="flex gap-2 formErrorMessage">
30
+ <p-messages [(value)]="_pMessages" [enableService]="false" [closable]="false"></p-messages>
31
+ </div>
32
+ `,
33
+ changeDetection: ChangeDetectionStrategy.OnPush
34
+ }]
35
+ }], propDecorators: { messages: [{
36
+ type: Input
37
+ }] } });
38
+
39
+ /* eslint-disable @angular-eslint/directive-selector */
40
+ class FormErrorMessageDirective {
41
+ constructor(viewContainerRef) {
42
+ this.viewContainerRef = viewContainerRef;
43
+ this.errorKeys = [];
15
44
  }
16
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: InputDisabledDirective, deps: [{ token: i1.NgControl }], target: i0.ɵɵFactoryTarget.Directive }); }
17
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.1", type: InputDisabledDirective, isStandalone: true, selector: "[arilDisabled]", inputs: { arilDisabled: "arilDisabled" }, ngImport: i0 }); }
45
+ ngOnInit() {
46
+ this.formErrorMessage.statusChanges.subscribe((status) => {
47
+ if (this.componentRef)
48
+ this.viewContainerRef.remove();
49
+ if (status === 'INVALID') {
50
+ if (this.formErrorMessage.errors) {
51
+ this.componentRef = this.viewContainerRef.createComponent(FormErrorMessagesComponent);
52
+ this.componentRef.instance.messages = this.formErrorMessage.errors;
53
+ this.viewContainerRef.insert(this.componentRef.hostView);
54
+ }
55
+ }
56
+ });
57
+ }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormErrorMessageDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
59
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.2", type: FormErrorMessageDirective, isStandalone: true, selector: "[formErrorMessage]", inputs: { formErrorMessage: "formErrorMessage" }, ngImport: i0 }); }
18
60
  }
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: InputDisabledDirective, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormErrorMessageDirective, decorators: [{
20
62
  type: Directive,
21
63
  args: [{
22
64
  standalone: true,
23
- selector: '[arilDisabled]'
65
+ selector: '[formErrorMessage]'
24
66
  }]
25
- }], ctorParameters: () => [{ type: i1.NgControl }], propDecorators: { arilDisabled: [{
67
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { formErrorMessage: [{
26
68
  type: Input
27
69
  }] } });
28
70
 
71
+ const checkValidInputs = (formGroup) => {
72
+ Object.keys(formGroup.controls).forEach(field => {
73
+ const control = formGroup.get(field);
74
+ if (control instanceof FormControl) {
75
+ control.markAsTouched({ onlySelf: true });
76
+ control.markAsDirty({ onlySelf: true });
77
+ }
78
+ else if (control instanceof FormGroup || control instanceof FormArray) {
79
+ checkValidInputs(control);
80
+ }
81
+ });
82
+ };
83
+
84
+ const addControlsWithValidation = (form, controls) => {
85
+ controls.forEach(control => {
86
+ if (!form.contains(control.name)) {
87
+ form.addControl(control.name, new FormControl('', control.validator));
88
+ }
89
+ });
90
+ };
91
+ const removeControls = (form, controlNames) => {
92
+ controlNames.forEach(controlName => {
93
+ if (form.contains(controlName)) {
94
+ form.removeControl(controlName);
95
+ }
96
+ });
97
+ };
98
+ const updateValueAndValidities = (form, controlNames) => {
99
+ controlNames.forEach(controlName => {
100
+ if (form.contains(controlName)) {
101
+ form.get(controlName)?.updateValueAndValidity();
102
+ }
103
+ });
104
+ };
105
+
106
+ /* eslint-disable @angular-eslint/directive-selector */
107
+ class FlexGridDirective {
108
+ constructor() {
109
+ this.hostClass = 'grid p-fluid m-0 p-0';
110
+ }
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FlexGridDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
112
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.2", type: FlexGridDirective, isStandalone: true, selector: "[flexGrid]", host: { properties: { "class": "this.hostClass" } }, ngImport: i0 }); }
113
+ }
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FlexGridDirective, decorators: [{
115
+ type: Directive,
116
+ args: [{
117
+ standalone: true,
118
+ selector: '[flexGrid]'
119
+ }]
120
+ }], propDecorators: { hostClass: [{
121
+ type: HostBinding,
122
+ args: ['class']
123
+ }] } });
124
+
125
+ class BaseInputComponent {
126
+ constructor() {
127
+ this.ngControl = injectNgControl();
128
+ this.tooltipOptions = {
129
+ tooltipPosition: 'top',
130
+ tooltipEvent: 'focus',
131
+ tooltipStyleClass: 'tooltipErrorMessage'
132
+ };
133
+ }
134
+ }
135
+ function injectNgControl() {
136
+ const ngControl = inject(NgControl, { self: true, optional: true });
137
+ if (!ngControl)
138
+ throw new Error('NgModel or FormControlName or FormControlDirective is required');
139
+ if (ngControl instanceof NgModel ||
140
+ ngControl instanceof FormControlName ||
141
+ ngControl instanceof FormControlDirective) {
142
+ return ngControl;
143
+ }
144
+ throw new Error("Something went wrong in InjectNgControl");
145
+ }
146
+
29
147
  class CommonInputValidatorsService {
30
148
  /**
31
149
  * @param sdCtrlName - name of the start date form control
@@ -62,54 +180,137 @@ class CommonInputValidatorsService {
62
180
  return null;
63
181
  };
64
182
  }
65
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: CommonInputValidatorsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
66
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: CommonInputValidatorsService, providedIn: 'root' }); }
183
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CommonInputValidatorsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
184
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CommonInputValidatorsService, providedIn: 'root' }); }
67
185
  }
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.1", ngImport: i0, type: CommonInputValidatorsService, decorators: [{
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CommonInputValidatorsService, decorators: [{
69
187
  type: Injectable,
70
188
  args: [{
71
189
  providedIn: 'root'
72
190
  }]
73
191
  }] });
74
192
 
75
- const checkValidInputs = (formGroup) => {
76
- Object.keys(formGroup.controls).forEach(field => {
77
- const control = formGroup.get(field);
78
- if (control instanceof FormControl) {
79
- control.markAsTouched({ onlySelf: true });
80
- control.markAsDirty({ onlySelf: true });
81
- }
82
- else if (control instanceof FormGroup || control instanceof FormArray) {
83
- checkValidInputs(control);
193
+ /* eslint-disable @typescript-eslint/no-explicit-any */
194
+ class InputErrorMessagePipe {
195
+ transform(value, ...args) {
196
+ const control = args[0];
197
+ const errorKeys = Object.keys(control.errors || {});
198
+ if (errorKeys.length) {
199
+ const errorKey = errorKeys[0];
200
+ const errorValue = control.errors[errorKey];
201
+ switch (errorKey) {
202
+ case 'required':
203
+ return 'This field is required';
204
+ case 'min':
205
+ return `Minimum value is ${errorValue.min}`;
206
+ case 'max':
207
+ return `Maximum value is ${errorValue.max}`;
208
+ case 'minlength':
209
+ return `Minimum length is ${errorValue.requiredLength}`;
210
+ case 'maxlength':
211
+ return `Maximum length is ${errorValue.requiredLength}`;
212
+ case 'email':
213
+ return 'Invalid email';
214
+ case 'pattern':
215
+ return 'Invalid format';
216
+ default: return errorValue;
217
+ }
84
218
  }
85
- });
86
- };
219
+ return '';
220
+ }
221
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: InputErrorMessagePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
222
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.2", ngImport: i0, type: InputErrorMessagePipe, isStandalone: true, name: "inputErrorMessage" }); }
223
+ }
224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: InputErrorMessagePipe, decorators: [{
225
+ type: Pipe,
226
+ args: [{
227
+ standalone: true,
228
+ name: 'inputErrorMessage'
229
+ }]
230
+ }] });
87
231
 
88
- const addControlsWithValidation = (form, controls) => {
89
- controls.forEach(control => {
90
- if (!form.contains(control.name)) {
91
- form.addControl(control.name, new FormControl('', control.validator));
92
- }
93
- });
94
- };
95
- const removeControls = (form, controlNames) => {
96
- controlNames.forEach(controlName => {
97
- if (form.contains(controlName)) {
98
- form.removeControl(controlName);
99
- }
100
- });
101
- };
102
- const updateValueAndValidities = (form, controlNames) => {
103
- controlNames.forEach(controlName => {
104
- if (form.contains(controlName)) {
105
- form.get(controlName)?.updateValueAndValidity();
106
- }
107
- });
108
- };
232
+ /* eslint-disable @typescript-eslint/no-explicit-any */
233
+ class DXInputErrorMessagePipe {
234
+ constructor() {
235
+ this.errorMsgPipe = inject(InputErrorMessagePipe);
236
+ }
237
+ transform(value, ...args) {
238
+ return { message: this.errorMsgPipe.transform(value, ...args) };
239
+ }
240
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: DXInputErrorMessagePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
241
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.1.2", ngImport: i0, type: DXInputErrorMessagePipe, isStandalone: true, name: "dxInputErrorMessage" }); }
242
+ }
243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: DXInputErrorMessagePipe, decorators: [{
244
+ type: Pipe,
245
+ args: [{
246
+ standalone: true,
247
+ name: 'dxInputErrorMessage'
248
+ }]
249
+ }] });
250
+
251
+ class InputDisabledDirective {
252
+ constructor(ngControl) {
253
+ this.ngControl = ngControl;
254
+ }
255
+ set arilDisabled(condition) {
256
+ const action = condition ? 'disable' : 'enable';
257
+ if (this.ngControl.control)
258
+ this.ngControl.control[action]();
259
+ }
260
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: InputDisabledDirective, deps: [{ token: i1$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive }); }
261
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.2", type: InputDisabledDirective, isStandalone: true, selector: "[arilDisabled]", inputs: { arilDisabled: "arilDisabled" }, ngImport: i0 }); }
262
+ }
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: InputDisabledDirective, decorators: [{
264
+ type: Directive,
265
+ args: [{
266
+ standalone: true,
267
+ selector: '[arilDisabled]'
268
+ }]
269
+ }], ctorParameters: () => [{ type: i1$1.NgControl }], propDecorators: { arilDisabled: [{
270
+ type: Input
271
+ }] } });
272
+
273
+ function iconTransform(icon) {
274
+ return PrimeIcons[icon];
275
+ }
276
+ function iconPosTransform(pos) {
277
+ return 'p-input-icon-' + pos;
278
+ }
279
+
280
+ /* eslint-disable @typescript-eslint/no-unused-vars */
281
+ /* eslint-disable @typescript-eslint/no-explicit-any */
282
+ class ValueAccessorDirective {
283
+ writeValue(obj) { return; }
284
+ registerOnChange(fn) { return; }
285
+ registerOnTouched(fn) { return; }
286
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ValueAccessorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
287
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.2", type: ValueAccessorDirective, isStandalone: true, providers: [
288
+ {
289
+ provide: NG_VALUE_ACCESSOR,
290
+ multi: true,
291
+ useExisting: ValueAccessorDirective
292
+ },
293
+ ], ngImport: i0 }); }
294
+ }
295
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ValueAccessorDirective, decorators: [{
296
+ type: Directive,
297
+ args: [{
298
+ standalone: true,
299
+ providers: [
300
+ {
301
+ provide: NG_VALUE_ACCESSOR,
302
+ multi: true,
303
+ useExisting: ValueAccessorDirective
304
+ },
305
+ ]
306
+ }]
307
+ }] });
308
+
309
+ /* form */
109
310
 
110
311
  /**
111
312
  * Generated bundle index. Do not edit.
112
313
  */
113
314
 
114
- export { CommonInputValidatorsService, InputDisabledDirective, addControlsWithValidation, checkValidInputs, removeControls, updateValueAndValidities };
315
+ export { BaseInputComponent, CommonInputValidatorsService, DXInputErrorMessagePipe, FlexGridDirective, FormErrorMessageDirective, InputDisabledDirective, InputErrorMessagePipe, ValueAccessorDirective, addControlsWithValidation, checkValidInputs, iconPosTransform, iconTransform, injectNgControl, removeControls, updateValueAndValidities };
115
316
  //# sourceMappingURL=aril-ui-lib.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"aril-ui-lib.mjs","sources":["../../projects/aril/ui/lib/src/input/input-disabled.directive.ts","../../projects/aril/ui/lib/src/input/common-input-validators.service.ts","../../projects/aril/ui/lib/src/form/form-validation.ts","../../projects/aril/ui/lib/src/form/form-field-builder.ts","../../projects/aril/ui/lib/aril-ui-lib.ts"],"sourcesContent":["import { Directive, Input } from '@angular/core';\r\nimport { NgControl } from '@angular/forms';\r\n\r\n@Directive({\r\n standalone: true,\r\n selector: '[arilDisabled]'\r\n})\r\nexport class InputDisabledDirective {\r\n constructor(private ngControl: NgControl) { }\r\n\r\n @Input() set arilDisabled(condition: boolean) {\r\n const action = condition ? 'disable' : 'enable';\r\n if (this.ngControl.control) this.ngControl.control[action]();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\r\nimport \"aril/util/primitive-extensions\";\r\n\r\nexport type DateRangeFormat = \"minute\" | \"hour\" | \"day\" | \"month\" | \"year\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CommonInputValidatorsService {\r\n\r\n /**\r\n * @param sdCtrlName - name of the start date form control\r\n * @param edCtrlName - name of the end date form control\r\n * @param rangeValue - range between start and end date. Default value is 1\r\n * @param rangeFormat - format of the range. Default value is \"day\"\r\n */\r\n dateRange(sdCtrlName: string, edCtrlName: string, rangeValue = 0, rangeFormat: DateRangeFormat = \"day\"): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n const start: number = control.get(sdCtrlName)?.value;\r\n const end: number = control.get(edCtrlName)?.value;\r\n\r\n const startJSDate = start.longToDate();\r\n const endJSDate = end.longToDate();\r\n\r\n if (startJSDate && endJSDate) {\r\n const isRangeValid = (endJSDate.getTime() - startJSDate.getTime() > rangeValue);\r\n\r\n return isRangeValid ? null : { dateRange: `The end date must be at least ${rangeValue} ${rangeFormat} bigger than the start date` };\r\n }\r\n\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * @description - pasword match vs.\r\n */\r\n strictMatch(controlName: string, matchingControlName: string): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n const firstField = control.get(controlName);\r\n const secondField = control.get(matchingControlName);\r\n\r\n if (!firstField || !secondField) {\r\n return null;\r\n }\r\n\r\n if (firstField.value !== secondField.value) {\r\n return { strictMatch: `${controlName} and ${matchingControlName} do not match` };\r\n }\r\n\r\n return null;\r\n }\r\n }\r\n}\r\n","import { FormArray, FormControl, FormGroup } from \"@angular/forms\";\r\n\r\nexport const checkValidInputs = (formGroup: FormGroup | FormArray) => {\r\n Object.keys(formGroup.controls).forEach(field => {\r\n const control = formGroup.get(field);\r\n if (control instanceof FormControl) {\r\n control.markAsTouched({ onlySelf: true });\r\n control.markAsDirty({ onlySelf: true });\r\n } else if (control instanceof FormGroup || control instanceof FormArray) {\r\n checkValidInputs(control);\r\n }\r\n });\r\n}","import { FormControl, FormGroup, ValidatorFn } from '@angular/forms';\r\n\r\nexport const addControlsWithValidation = (form: FormGroup, controls: { name: string, validator?: ValidatorFn }[]) => {\r\n controls.forEach(control => {\r\n if (!form.contains(control.name)) {\r\n form.addControl(control.name, new FormControl('', control.validator));\r\n }\r\n });\r\n}\r\n\r\nexport const removeControls = (form: FormGroup, controlNames: string[]) => {\r\n controlNames.forEach(controlName => {\r\n if (form.contains(controlName)) {\r\n form.removeControl(controlName);\r\n }\r\n });\r\n}\r\n\r\nexport const updateValueAndValidities = (form: FormGroup, controlNames: string[]) => {\r\n controlNames.forEach(controlName => {\r\n if (form.contains(controlName)) {\r\n form.get(controlName)?.updateValueAndValidity();\r\n }\r\n });\r\n\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAOa,sBAAsB,CAAA;AACjC,IAAA,WAAA,CAAoB,SAAoB,EAAA;QAApB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAW;KAAK;IAE7C,IAAa,YAAY,CAAC,SAAkB,EAAA;QAC1C,MAAM,MAAM,GAAG,SAAS,GAAG,S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ACjC,QAAA,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;YAC9B,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,sBAAsB,EAAE,CAAC;SACjD;AACH,KAAC,CAAC,CAAC;AAEL;;ACzBA;;AAEG;;;;"}
1
+ {"version":3,"file":"aril-ui-lib.mjs","sources":["../../projects/aril/ui/lib/src/form/form-error-message.component.ts","../../projects/aril/ui/lib/src/form/form-error-message.directive.ts","../../projects/aril/ui/lib/src/form/form-validation.ts","../../projects/aril/ui/lib/src/form/form-field-builder.ts","../../projects/aril/ui/lib/src/grid/flex-grid.directive.ts","../../projects/aril/ui/lib/src/input/baseInput.ts","../../projects/aril/ui/lib/src/input/common-input-validators.service.ts","../../projects/aril/ui/lib/src/input/input-error-message.pipe.ts","../../projects/aril/ui/lib/src/input/dx-input-error-message.pipe.ts","../../projects/aril/ui/lib/src/input/input-disabled.directive.ts","../../projects/aril/ui/lib/src/input/input-transforms.ts","../../projects/aril/ui/lib/src/input/value-accessor.directive.ts","../../projects/aril/ui/lib/index.ts","../../projects/aril/ui/lib/aril-ui-lib.ts"],"sourcesContent":["\r\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\r\nimport { ValidationErrors } from '@angular/forms';\r\nimport { Message } from 'primeng/api';\r\nimport { MessagesModule } from 'primeng/messages';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [MessagesModule],\r\n template: `\r\n\t\t<div class=\"flex gap-2 formErrorMessage\">\r\n\t\t\t<p-messages [(value)]=\"_pMessages\" [enableService]=\"false\" [closable]=\"false\"></p-messages>\r\n\t\t</div>\r\n\t`,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormErrorMessagesComponent {\r\n _pMessages!: Message[];\r\n\r\n @Input() set messages(messages: ValidationErrors | null) {\r\n this._pMessages = Object.values(messages!).map((msg) => {\r\n return { severity: 'error', summary: '', detail: msg }\r\n });\r\n }\r\n}\r\n","/* eslint-disable @angular-eslint/directive-selector */\r\n\r\nimport { ComponentRef, Directive, Input, OnInit, ViewContainerRef } from '@angular/core';\r\nimport { FormGroup } from '@angular/forms';\r\nimport { FormErrorMessagesComponent } from './form-error-message.component';\r\n\r\n@Directive({\r\n standalone: true,\r\n selector: '[formErrorMessage]'\r\n})\r\nexport class FormErrorMessageDirective implements OnInit {\r\n constructor(private viewContainerRef: ViewContainerRef) { }\r\n\r\n @Input() formErrorMessage!: FormGroup;\r\n\r\n errorKeys: string[] = [];\r\n componentRef!: ComponentRef<FormErrorMessagesComponent>;\r\n\r\n ngOnInit(): void {\r\n this.formErrorMessage.statusChanges.subscribe((status) => {\r\n if (this.componentRef) this.viewContainerRef.remove();\r\n\r\n if (status === 'INVALID') {\r\n if (this.formErrorMessage.errors) {\r\n this.componentRef = this.viewContainerRef.createComponent(FormErrorMessagesComponent);\r\n this.componentRef.instance.messages = this.formErrorMessage.errors;\r\n this.viewContainerRef.insert(this.componentRef.hostView);\r\n }\r\n }\r\n });\r\n }\r\n}","import { FormArray, FormControl, FormGroup } from \"@angular/forms\";\r\n\r\nexport const checkValidInputs = (formGroup: FormGroup | FormArray) => {\r\n Object.keys(formGroup.controls).forEach(field => {\r\n const control = formGroup.get(field);\r\n if (control instanceof FormControl) {\r\n control.markAsTouched({ onlySelf: true });\r\n control.markAsDirty({ onlySelf: true });\r\n } else if (control instanceof FormGroup || control instanceof FormArray) {\r\n checkValidInputs(control);\r\n }\r\n });\r\n}","import { FormControl, FormGroup, ValidatorFn } from '@angular/forms';\r\n\r\nexport const addControlsWithValidation = (form: FormGroup, controls: { name: string, validator?: ValidatorFn }[]) => {\r\n controls.forEach(control => {\r\n if (!form.contains(control.name)) {\r\n form.addControl(control.name, new FormControl('', control.validator));\r\n }\r\n });\r\n}\r\n\r\nexport const removeControls = (form: FormGroup, controlNames: string[]) => {\r\n controlNames.forEach(controlName => {\r\n if (form.contains(controlName)) {\r\n form.removeControl(controlName);\r\n }\r\n });\r\n}\r\n\r\nexport const updateValueAndValidities = (form: FormGroup, controlNames: string[]) => {\r\n controlNames.forEach(controlName => {\r\n if (form.contains(controlName)) {\r\n form.get(controlName)?.updateValueAndValidity();\r\n }\r\n });\r\n\r\n}","/* eslint-disable @angular-eslint/directive-selector */\r\n\r\nimport { Directive, HostBinding } from \"@angular/core\";\r\n\r\n@Directive({\r\n standalone: true,\r\n selector: '[flexGrid]'\r\n})\r\nexport class FlexGridDirective {\r\n @HostBinding('class') hostClass = 'grid p-fluid m-0 p-0';\r\n}","import { inject } from \"@angular/core\";\r\nimport { FormControlDirective, FormControlName, NgControl, NgModel } from \"@angular/forms\";\r\nimport { TooltipOptions } from \"primeng/api\";\r\n\r\nexport abstract class BaseInputComponent {\r\n\r\n ngControl = injectNgControl();\r\n\r\n tooltipOptions: TooltipOptions = {\r\n tooltipPosition: 'top',\r\n tooltipEvent: 'focus',\r\n tooltipStyleClass: 'tooltipErrorMessage'\r\n };\r\n}\r\n\r\nexport function injectNgControl() {\r\n const ngControl = inject(NgControl, { self: true, optional: true });\r\n\r\n if (!ngControl) throw new Error('NgModel or FormControlName or FormControlDirective is required');\r\n\r\n if (\r\n ngControl instanceof NgModel ||\r\n ngControl instanceof FormControlName ||\r\n ngControl instanceof FormControlDirective\r\n ) {\r\n return ngControl;\r\n }\r\n\r\n throw new Error(\"Something went wrong in InjectNgControl\");\r\n}","import { Injectable } from '@angular/core';\r\nimport { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';\r\nimport \"aril/util/primitive-extensions\";\r\n\r\nexport type DateRangeFormat = \"minute\" | \"hour\" | \"day\" | \"month\" | \"year\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CommonInputValidatorsService {\r\n\r\n /**\r\n * @param sdCtrlName - name of the start date form control\r\n * @param edCtrlName - name of the end date form control\r\n * @param rangeValue - range between start and end date. Default value is 1\r\n * @param rangeFormat - format of the range. Default value is \"day\"\r\n */\r\n dateRange(sdCtrlName: string, edCtrlName: string, rangeValue = 0, rangeFormat: DateRangeFormat = \"day\"): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n const start: number = control.get(sdCtrlName)?.value;\r\n const end: number = control.get(edCtrlName)?.value;\r\n\r\n const startJSDate = start.longToDate();\r\n const endJSDate = end.longToDate();\r\n\r\n if (startJSDate && endJSDate) {\r\n const isRangeValid = (endJSDate.getTime() - startJSDate.getTime() > rangeValue);\r\n\r\n return isRangeValid ? null : { dateRange: `The end date must be at least ${rangeValue} ${rangeFormat} bigger than the start date` };\r\n }\r\n\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * @description - pasword match vs.\r\n */\r\n strictMatch(controlName: string, matchingControlName: string): ValidatorFn {\r\n return (control: AbstractControl): ValidationErrors | null => {\r\n const firstField = control.get(controlName);\r\n const secondField = control.get(matchingControlName);\r\n\r\n if (!firstField || !secondField) {\r\n return null;\r\n }\r\n\r\n if (firstField.value !== secondField.value) {\r\n return { strictMatch: `${controlName} and ${matchingControlName} do not match` };\r\n }\r\n\r\n return null;\r\n }\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\n\r\nimport { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n standalone: true,\r\n name: 'inputErrorMessage'\r\n})\r\nexport class InputErrorMessagePipe implements PipeTransform {\r\n\r\n transform(value: any, ...args: any[]): string {\r\n const control = args[0];\r\n const errorKeys = Object.keys(control.errors || {});\r\n\r\n if (errorKeys.length) {\r\n const errorKey = errorKeys[0];\r\n const errorValue = control.errors![errorKey];\r\n\r\n switch (errorKey) {\r\n case 'required':\r\n return 'This field is required';\r\n case 'min':\r\n return `Minimum value is ${errorValue.min}`;\r\n case 'max':\r\n return `Maximum value is ${errorValue.max}`;\r\n case 'minlength':\r\n return `Minimum length is ${errorValue.requiredLength}`;\r\n case 'maxlength':\r\n return `Maximum length is ${errorValue.requiredLength}`;\r\n case 'email':\r\n return 'Invalid email';\r\n case 'pattern':\r\n return 'Invalid format';\r\n default: return errorValue;\r\n }\r\n }\r\n\r\n return '';\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\n\r\nimport { Pipe, PipeTransform, inject } from \"@angular/core\";\r\nimport { InputErrorMessagePipe } from \"./input-error-message.pipe\";\r\n\r\n@Pipe({\r\n standalone: true,\r\n name: 'dxInputErrorMessage'\r\n})\r\nexport class DXInputErrorMessagePipe implements PipeTransform {\r\n errorMsgPipe = inject(InputErrorMessagePipe);\r\n\r\n transform(value: any, ...args: any[]): { message: string } {\r\n return { message: this.errorMsgPipe.transform(value, ...args) };\r\n }\r\n}","import { Directive, Input } from '@angular/core';\r\nimport { NgControl } from '@angular/forms';\r\n\r\n@Directive({\r\n standalone: true,\r\n selector: '[arilDisabled]'\r\n})\r\nexport class InputDisabledDirective {\r\n constructor(private ngControl: NgControl) { }\r\n\r\n @Input() set arilDisabled(condition: boolean) {\r\n const action = condition ? 'disable' : 'enable';\r\n if (this.ngControl.control) this.ngControl.control[action]();\r\n }\r\n}\r\n","import { PrimeIcons } from 'primeng/api';\r\n\r\nexport type PrimeIcon = Exclude<keyof typeof PrimeIcons, \"prototype\">;\r\nexport function iconTransform(icon: PrimeIcon): string {\r\n return PrimeIcons[icon];\r\n}\r\n\r\nexport type IconPosTypes = 'right' | 'left';\r\nexport function iconPosTransform(pos: IconPosTypes): string {\r\n return 'p-input-icon-' + pos;\r\n}","/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { Directive } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Directive({\n standalone: true,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n multi: true,\n useExisting: ValueAccessorDirective\n },\n ]\n})\nexport class ValueAccessorDirective implements ControlValueAccessor {\n writeValue(obj: any): void { return }\n registerOnChange(fn: any): void { return }\n registerOnTouched(fn: any): void { return }\n}","/* form */\r\nexport * from './src/form/form-error-message.directive';\r\nexport * from './src/form/form-validation';\r\nexport * from './src/form/form-field-builder';\r\n\r\n/* grid */\r\nexport * from './src/grid/flex-grid.directive';\r\n\r\n/* input */\r\nexport * from './src/input/baseInput';\r\nexport * from './src/input/common-input-validators.service';\r\nexport * from './src/input/dx-input-error-message.pipe';\r\nexport * from './src/input/input-disabled.directive';\r\nexport * from './src/input/input-error-message.pipe';\r\nexport * from './src/input/input-transforms';\r\nexport * from './src/input/value-accessor.directive';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;MAgBa,0BAA0B,CAAA;IAGrC,IAAa,QAAQ,CAAC,QAAiC,EAAA;AACrD,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,QAAS,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAI;AACrD,YAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAA;AACxD,SAAC,CAAC,CAAC;KACJ;8GAPU,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,EAP3B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIV,CAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EALU,cAAc,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,E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,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EARtB,YAAA,EAAA,IAAA,EAAA,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,KAAK,EAAE,IAAI;AACX,gBAAA,WAAW,EAAE,sBAAsB;AACpC,aAAA;AACF,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAEU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,WAAW,EAAwB,sBAAA;AACpC,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;ACfD;;ACAA;;AAEG;;;;"}
@@ -0,0 +1,51 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
3
+ import * as i3 from 'primeng/inputmask';
4
+ import { InputMaskModule } from 'primeng/inputmask';
5
+ import * as i1 from 'aril/ui/lib';
6
+ import { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';
7
+ import * as i2 from '@angular/forms';
8
+ import { ReactiveFormsModule } from '@angular/forms';
9
+ import { NgStyle } from '@angular/common';
10
+
11
+ /**
12
+ * a - alphabetic characters
13
+ * 9 - numeric characters
14
+ * * - alphanumeric characters
15
+ * ? - optional characters
16
+ * formatting characters -> (), -
17
+ */
18
+ class InputMaskComponent extends BaseInputComponent {
19
+ constructor() {
20
+ super(...arguments);
21
+ this.slotChar = '_';
22
+ this.usageInGrid = true;
23
+ this.showTooltip = false;
24
+ }
25
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: InputMaskComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
26
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: InputMaskComponent, isStandalone: true, selector: "aril-mask[ngModel], aril-mask[formControl], aril-mask[formControlName]", inputs: { mask: "mask", slotChar: "slotChar", style: "style", placeholder: "placeholder", maxlength: "maxlength", usageInGrid: "usageInGrid" }, usesInheritance: true, hostDirectives: [{ directive: i1.ValueAccessorDirective }], ngImport: i0, template: "<div\n\tstyle=\"position: relative\"\n\t[ngStyle]=\"!usageInGrid ? { display: 'inline-block' } : {}\">\n\t<p-inputMask\n\t\t[mask]=\"mask\"\n\t\t[style]=\"style\"\n\t\t[slotChar]=\"slotChar\"\n\t\t[placeholder]=\"placeholder\"\n\t\t[maxlength]=\"maxlength\"\n\t\t[formControl]=\"ngControl.control\"\n\t\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\"\n\t\t(onFocus)=\"showTooltip = true\"\n\t\t(onBlur)=\"showTooltip = false\">\n\t</p-inputMask>\n\t@if (ngControl.invalid && showTooltip) {\n\t\t<div class=\"custom-tooltip tooltipErrorMessage\">\n\t\t\t{{ ngControl.control.value | inputErrorMessage: ngControl }}\n\t\t</div>\n\t}\n</div>\n", styles: [".custom-tooltip{position:absolute;background-color:#dc143c;color:#fff;padding:.75rem;border-radius:6px;z-index:1001;top:-107%;left:50%;transform:translate(-50%);white-space:nowrap}.custom-tooltip:before{content:\"\";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:3px;border-style:solid;border-color:var(--primary-color) transparent transparent transparent}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: InputMaskModule }, { kind: "component", type: i3.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "pipe", type: InputErrorMessagePipe, name: "inputErrorMessage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
27
+ }
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: InputMaskComponent, decorators: [{
29
+ type: Component,
30
+ args: [{ standalone: true, selector: 'aril-mask[ngModel], aril-mask[formControl], aril-mask[formControlName]', imports: [ReactiveFormsModule, NgStyle, InputMaskModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n\tstyle=\"position: relative\"\n\t[ngStyle]=\"!usageInGrid ? { display: 'inline-block' } : {}\">\n\t<p-inputMask\n\t\t[mask]=\"mask\"\n\t\t[style]=\"style\"\n\t\t[slotChar]=\"slotChar\"\n\t\t[placeholder]=\"placeholder\"\n\t\t[maxlength]=\"maxlength\"\n\t\t[formControl]=\"ngControl.control\"\n\t\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\"\n\t\t(onFocus)=\"showTooltip = true\"\n\t\t(onBlur)=\"showTooltip = false\">\n\t</p-inputMask>\n\t@if (ngControl.invalid && showTooltip) {\n\t\t<div class=\"custom-tooltip tooltipErrorMessage\">\n\t\t\t{{ ngControl.control.value | inputErrorMessage: ngControl }}\n\t\t</div>\n\t}\n</div>\n", styles: [".custom-tooltip{position:absolute;background-color:#dc143c;color:#fff;padding:.75rem;border-radius:6px;z-index:1001;top:-107%;left:50%;transform:translate(-50%);white-space:nowrap}.custom-tooltip:before{content:\"\";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:3px;border-style:solid;border-color:var(--primary-color) transparent transparent transparent}\n"] }]
31
+ }], propDecorators: { mask: [{
32
+ type: Input,
33
+ args: [{ required: true }]
34
+ }], slotChar: [{
35
+ type: Input
36
+ }], style: [{
37
+ type: Input
38
+ }], placeholder: [{
39
+ type: Input
40
+ }], maxlength: [{
41
+ type: Input
42
+ }], usageInGrid: [{
43
+ type: Input
44
+ }] } });
45
+
46
+ /**
47
+ * Generated bundle index. Do not edit.
48
+ */
49
+
50
+ export { InputMaskComponent };
51
+ //# sourceMappingURL=aril-ui-mask.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aril-ui-mask.mjs","sources":["../../projects/aril/ui/mask/src/mask.component.ts","../../projects/aril/ui/mask/src/mask.component.html","../../projects/aril/ui/mask/aril-ui-mask.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\r\nimport { InputMaskModule } from 'primeng/inputmask';\r\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { NgStyle } from '@angular/common';\r\n\r\n/**\r\n * a - alphabetic characters\r\n * 9 - numeric characters\r\n * * - alphanumeric characters\r\n * ? - optional characters\r\n * formatting characters -> (), -\r\n */\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'aril-mask[ngModel], aril-mask[formControl], aril-mask[formControlName]',\r\n templateUrl: './mask.component.html',\r\n styleUrl: './mask.component.css',\r\n imports: [ReactiveFormsModule, NgStyle, InputMaskModule, InputErrorMessagePipe],\r\n hostDirectives: [ValueAccessorDirective],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class InputMaskComponent extends BaseInputComponent {\r\n @Input({ required: true }) mask!: string;\r\n @Input() slotChar = '_';\r\n @Input() style?: object;\r\n @Input() placeholder?: string;\r\n @Input() maxlength!: number;\r\n @Input() usageInGrid = true;\r\n\r\n showTooltip = false;\r\n}\r\n","<div\n\tstyle=\"position: relative\"\n\t[ngStyle]=\"!usageInGrid ? { display: 'inline-block' } : {}\">\n\t<p-inputMask\n\t\t[mask]=\"mask\"\n\t\t[style]=\"style\"\n\t\t[slotChar]=\"slotChar\"\n\t\t[placeholder]=\"placeholder\"\n\t\t[maxlength]=\"maxlength\"\n\t\t[formControl]=\"ngControl.control\"\n\t\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\"\n\t\t(onFocus)=\"showTooltip = true\"\n\t\t(onBlur)=\"showTooltip = false\">\n\t</p-inputMask>\n\t@if (ngControl.invalid && showTooltip) {\n\t\t<div class=\"custom-tooltip tooltipErrorMessage\">\n\t\t\t{{ ngControl.control.value | inputErrorMessage: ngControl }}\n\t\t</div>\n\t}\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;;;;;AAMG;AAWG,MAAO,kBAAmB,SAAQ,kBAAkB,CAAA;AAT1D,IAAA,WAAA,GAAA;;QAWW,IAAQ,CAAA,QAAA,GAAG,GAAG,CAAC;QAIf,IAAW,CAAA,WAAA,GAAG,IAAI,CAAC;QAE5B,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AACrB,KAAA;8GATY,kBAAkB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wEAAA,EAAA,MAAA,EAAA,EAAA,I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;;2FAInE,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAT9B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,YACN,wEAAwE,EAAA,OAAA,EAGzE,CAAC,mBAAmB,EAAE,OAAO,EAAE,eAAe,EAAE,qBAAqB,CAAC,kBAC/D,CAAC,sBAAsB,CAAC,EACvB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2oBAAA,EAAA,MAAA,EAAA,CAAA,2XAAA,CAAA,EAAA,CAAA;8BAGpB,IAAI,EAAA,CAAA;sBAA9B,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;gBAChB,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;;;AE7BR;;AAEG;;;;"}
@@ -0,0 +1,65 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
3
+ import * as i2 from '@angular/forms';
4
+ import { ReactiveFormsModule } from '@angular/forms';
5
+ import * as i3 from 'primeng/inputnumber';
6
+ import { InputNumberModule } from 'primeng/inputnumber';
7
+ import * as i1 from 'aril/ui/lib';
8
+ import { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';
9
+ import * as i4 from 'primeng/tooltip';
10
+ import { TooltipModule } from 'primeng/tooltip';
11
+
12
+ class InputNumberComponent extends BaseInputComponent {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.useGrouping = true;
16
+ this._buttonLayout = "stacked";
17
+ }
18
+ set buttonLayout(value) {
19
+ this._buttonLayout = value;
20
+ if (value == "vertical") {
21
+ this.style = { 'width': '4rem' };
22
+ }
23
+ }
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: InputNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
25
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: InputNumberComponent, isStandalone: true, selector: "aril-number[ngModel], aril-number[formControl], aril-number[formControlName]", inputs: { min: "min", max: "max", style: "style", showButtons: "showButtons", placeholder: "placeholder", customClass: "customClass", prefix: "prefix", suffix: "suffix", maxlength: "maxlength", showClear: "showClear", useGrouping: "useGrouping", maxDigits: "maxDigits", minDigits: "minDigits", buttonLayout: "buttonLayout" }, usesInheritance: true, hostDirectives: [{ directive: i1.ValueAccessorDirective }], ngImport: i0, template: "<p-inputNumber\r\n\t[min]=\"min\"\r\n\t[max]=\"max\"\r\n\tmode=\"decimal\"\r\n\tlocale=\"en-US\"\r\n\t[prefix]=\"prefix\"\r\n\t[suffix]=\"suffix\"\r\n\t[maxlength]=\"maxlength\"\r\n\t[showClear]=\"showClear\"\r\n\t[class]=\"customClass\"\r\n\t[style]=\"style\"\r\n\tspinnerMode=\"vertical\"\r\n\t[useGrouping]=\"useGrouping\"\r\n\t[placeholder]=\"placeholder\"\r\n\t[showButtons]=\"showButtons\"\r\n\t[maxFractionDigits]=\"maxDigits\"\r\n\t[minFractionDigits]=\"minDigits\"\r\n\t[buttonLayout]=\"_buttonLayout\"\r\n\tincrementButtonClass=\"p-button-primary\"\r\n\tdecrementButtonClass=\"p-button-danger\"\r\n\tincrementButtonIcon=\"pi pi-plus\"\r\n\tdecrementButtonIcon=\"pi pi-minus\"\r\n\t[pTooltip]=\"\r\n\t\tngControl.invalid\r\n\t\t\t? (ngControl.control.value | inputErrorMessage: ngControl)\r\n\t\t\t: ''\r\n\t\"\r\n\t[tooltipOptions]=\"tooltipOptions\"\r\n\t[formControl]=\"ngControl.control\"\r\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\r\n</p-inputNumber>\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i3.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "pipe", type: InputErrorMessagePipe, name: "inputErrorMessage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
26
+ }
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: InputNumberComponent, decorators: [{
28
+ type: Component,
29
+ args: [{ standalone: true, selector: 'aril-number[ngModel], aril-number[formControl], aril-number[formControlName]', imports: [ReactiveFormsModule, InputNumberModule, TooltipModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-inputNumber\r\n\t[min]=\"min\"\r\n\t[max]=\"max\"\r\n\tmode=\"decimal\"\r\n\tlocale=\"en-US\"\r\n\t[prefix]=\"prefix\"\r\n\t[suffix]=\"suffix\"\r\n\t[maxlength]=\"maxlength\"\r\n\t[showClear]=\"showClear\"\r\n\t[class]=\"customClass\"\r\n\t[style]=\"style\"\r\n\tspinnerMode=\"vertical\"\r\n\t[useGrouping]=\"useGrouping\"\r\n\t[placeholder]=\"placeholder\"\r\n\t[showButtons]=\"showButtons\"\r\n\t[maxFractionDigits]=\"maxDigits\"\r\n\t[minFractionDigits]=\"minDigits\"\r\n\t[buttonLayout]=\"_buttonLayout\"\r\n\tincrementButtonClass=\"p-button-primary\"\r\n\tdecrementButtonClass=\"p-button-danger\"\r\n\tincrementButtonIcon=\"pi pi-plus\"\r\n\tdecrementButtonIcon=\"pi pi-minus\"\r\n\t[pTooltip]=\"\r\n\t\tngControl.invalid\r\n\t\t\t? (ngControl.control.value | inputErrorMessage: ngControl)\r\n\t\t\t: ''\r\n\t\"\r\n\t[tooltipOptions]=\"tooltipOptions\"\r\n\t[formControl]=\"ngControl.control\"\r\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\r\n</p-inputNumber>\r\n" }]
30
+ }], propDecorators: { min: [{
31
+ type: Input
32
+ }], max: [{
33
+ type: Input
34
+ }], style: [{
35
+ type: Input
36
+ }], showButtons: [{
37
+ type: Input
38
+ }], placeholder: [{
39
+ type: Input
40
+ }], customClass: [{
41
+ type: Input
42
+ }], prefix: [{
43
+ type: Input
44
+ }], suffix: [{
45
+ type: Input
46
+ }], maxlength: [{
47
+ type: Input
48
+ }], showClear: [{
49
+ type: Input
50
+ }], useGrouping: [{
51
+ type: Input
52
+ }], maxDigits: [{
53
+ type: Input
54
+ }], minDigits: [{
55
+ type: Input
56
+ }], buttonLayout: [{
57
+ type: Input
58
+ }] } });
59
+
60
+ /**
61
+ * Generated bundle index. Do not edit.
62
+ */
63
+
64
+ export { InputNumberComponent };
65
+ //# sourceMappingURL=aril-ui-number.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aril-ui-number.mjs","sources":["../../projects/aril/ui/number/src/number.component.ts","../../projects/aril/ui/number/src/number.component.html","../../projects/aril/ui/number/aril-ui-number.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { InputNumberModule } from 'primeng/inputnumber';\r\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\r\nimport { TooltipModule } from 'primeng/tooltip';\r\n\r\nexport type ButtonLayouts = \"stacked\" | \"vertical\";\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'aril-number[ngModel], aril-number[formControl], aril-number[formControlName]',\r\n templateUrl: './number.component.html',\r\n imports: [ReactiveFormsModule, InputNumberModule, TooltipModule, InputErrorMessagePipe],\r\n hostDirectives: [ValueAccessorDirective],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class InputNumberComponent extends BaseInputComponent {\r\n @Input() min?: number;\r\n @Input() max?: number;\r\n @Input() style?: object;\r\n @Input() showButtons!: boolean;\r\n @Input() placeholder?: string;\r\n @Input() customClass?: string;\r\n @Input() prefix?: string;\r\n @Input() suffix?: string;\r\n @Input() maxlength!: number;\r\n @Input() showClear!: boolean;\r\n @Input() useGrouping = true;\r\n @Input() maxDigits?: number;\r\n @Input() minDigits?: number;\r\n @Input() set buttonLayout(value: ButtonLayouts) {\r\n this._buttonLayout = value;\r\n\r\n if (value == \"vertical\") {\r\n this.style = { 'width': '4rem' };\r\n }\r\n }\r\n\r\n _buttonLayout: ButtonLayouts = \"stacked\";\r\n}\r\n","<p-inputNumber\r\n\t[min]=\"min\"\r\n\t[max]=\"max\"\r\n\tmode=\"decimal\"\r\n\tlocale=\"en-US\"\r\n\t[prefix]=\"prefix\"\r\n\t[suffix]=\"suffix\"\r\n\t[maxlength]=\"maxlength\"\r\n\t[showClear]=\"showClear\"\r\n\t[class]=\"customClass\"\r\n\t[style]=\"style\"\r\n\tspinnerMode=\"vertical\"\r\n\t[useGrouping]=\"useGrouping\"\r\n\t[placeholder]=\"placeholder\"\r\n\t[showButtons]=\"showButtons\"\r\n\t[maxFractionDigits]=\"maxDigits\"\r\n\t[minFractionDigits]=\"minDigits\"\r\n\t[buttonLayout]=\"_buttonLayout\"\r\n\tincrementButtonClass=\"p-button-primary\"\r\n\tdecrementButtonClass=\"p-button-danger\"\r\n\tincrementButtonIcon=\"pi pi-plus\"\r\n\tdecrementButtonIcon=\"pi pi-minus\"\r\n\t[pTooltip]=\"\r\n\t\tngControl.invalid\r\n\t\t\t? (ngControl.control.value | inputErrorMessage: ngControl)\r\n\t\t\t: ''\r\n\t\"\r\n\t[tooltipOptions]=\"tooltipOptions\"\r\n\t[formControl]=\"ngControl.control\"\r\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\r\n</p-inputNumber>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAgBM,MAAO,oBAAqB,SAAQ,kBAAkB,CAAA;AAR5D,IAAA,WAAA,GAAA;;QAmBW,IAAW,CAAA,WAAA,GAAG,IAAI,CAAC;QAW5B,IAAa,CAAA,aAAA,GAAkB,SAAS,CAAC;AAC1C,KAAA;IATC,IAAa,YAAY,CAAC,KAAoB,EAAA;AAC5C,QAAA,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;AAE3B,QAAA,IAAI,KAAK,IAAI,UAAU,EAAE;YACvB,IAAI,CAAC,KAAK,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;SAClC;KACF;8GApBU,oBAAoB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAApB,oBAAoB,EAAA,YAAA,EAAA,IA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AAd,KAAK;gBACG,MAAM,EAAA,CAAA;sBAAd,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACO,YAAY,EAAA,CAAA;sBAAxB,KAAK;;;AE9BR;;AAEG;;;;"}
@@ -0,0 +1,44 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, ViewChild } from '@angular/core';
3
+ import { ButtonComponent } from 'aril/ui/button';
4
+ import * as i1 from 'primeng/overlaypanel';
5
+ import { OverlayPanelModule } from 'primeng/overlaypanel';
6
+ import * as i2 from 'primeng/api';
7
+
8
+ class OverlayPanelComponent {
9
+ constructor() {
10
+ this.dismissable = true;
11
+ }
12
+ togglePanel(event) {
13
+ this.overlayPanel.toggle(event, this.toggleButton.nativeElement);
14
+ }
15
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: OverlayPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: OverlayPanelComponent, isStandalone: true, selector: "aril-overlay-panel", inputs: { showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions", dismissable: "dismissable", styleClass: "styleClass", label: "label" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: ["overlayPanel"], descendants: true }, { propertyName: "toggleButton", first: true, predicate: ["toggleButton"], descendants: true }], ngImport: i0, template: "<p-overlayPanel\r\n\t[showTransitionOptions]=\"showTransitionOptions\"\r\n\t[hideTransitionOptions]=\"hideTransitionOptions\"\r\n\t[dismissable]=\"dismissable\"\r\n\t[styleClass]=\"styleClass\"\r\n\t#overlayPanel>\r\n\t<ng-template pTemplate=\"content\">\r\n\t\t<ng-content></ng-content>\r\n\t</ng-template>\r\n</p-overlayPanel>\r\n<div>\r\n\t<aril-button\r\n\t\tcolor=\"primary\"\r\n\t\t[label]=\"label || 'Show'\"\r\n\t\t(clickEvent)=\"togglePanel($event)\"\r\n\t\tclass=\"toggle-button\"\r\n\t\t#toggleButton>\r\n\t</aril-button>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: OverlayPanelModule }, { kind: "component", type: i1.OverlayPanel, selector: "p-overlayPanel", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17
+ }
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: OverlayPanelComponent, decorators: [{
19
+ type: Component,
20
+ args: [{ standalone: true, selector: 'aril-overlay-panel', imports: [OverlayPanelModule, ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-overlayPanel\r\n\t[showTransitionOptions]=\"showTransitionOptions\"\r\n\t[hideTransitionOptions]=\"hideTransitionOptions\"\r\n\t[dismissable]=\"dismissable\"\r\n\t[styleClass]=\"styleClass\"\r\n\t#overlayPanel>\r\n\t<ng-template pTemplate=\"content\">\r\n\t\t<ng-content></ng-content>\r\n\t</ng-template>\r\n</p-overlayPanel>\r\n<div>\r\n\t<aril-button\r\n\t\tcolor=\"primary\"\r\n\t\t[label]=\"label || 'Show'\"\r\n\t\t(clickEvent)=\"togglePanel($event)\"\r\n\t\tclass=\"toggle-button\"\r\n\t\t#toggleButton>\r\n\t</aril-button>\r\n</div>\r\n" }]
21
+ }], propDecorators: { showTransitionOptions: [{
22
+ type: Input
23
+ }], hideTransitionOptions: [{
24
+ type: Input
25
+ }], dismissable: [{
26
+ type: Input
27
+ }], styleClass: [{
28
+ type: Input
29
+ }], label: [{
30
+ type: Input
31
+ }], overlayPanel: [{
32
+ type: ViewChild,
33
+ args: ['overlayPanel']
34
+ }], toggleButton: [{
35
+ type: ViewChild,
36
+ args: ['toggleButton']
37
+ }] } });
38
+
39
+ /**
40
+ * Generated bundle index. Do not edit.
41
+ */
42
+
43
+ export { OverlayPanelComponent };
44
+ //# sourceMappingURL=aril-ui-overlayPanel.mjs.map