aril 0.0.8 → 0.0.13

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 (110) hide show
  1. package/esm2022/http/src/serviceBase.mjs +2 -3
  2. package/esm2022/i18n/aril-i18n.mjs +5 -0
  3. package/esm2022/i18n/index.mjs +6 -0
  4. package/esm2022/i18n/src/file-url-token.mjs +3 -0
  5. package/esm2022/i18n/src/i18n.module.mjs +17 -0
  6. package/esm2022/i18n/src/loader.mjs +20 -0
  7. package/esm2022/i18n/src/provideI18n.mjs +16 -0
  8. package/esm2022/i18n/src/provideScope.mjs +18 -0
  9. package/esm2022/ui/badge/src/badge.component.mjs +11 -17
  10. package/esm2022/ui/button/src/button.component.mjs +19 -34
  11. package/esm2022/ui/button/src/split-button.component.mjs +3 -3
  12. package/esm2022/ui/calendar/src/calendar.component.mjs +35 -56
  13. package/esm2022/ui/checkbox/src/check-box.component.mjs +7 -4
  14. package/esm2022/ui/checkbox/src/tri-state-checkbox.component.mjs +7 -4
  15. package/esm2022/ui/dxField/src/dx-field.component.mjs +9 -21
  16. package/esm2022/ui/field/src/field.component.mjs +19 -32
  17. package/esm2022/ui/fileUpload/src/file-upload.component.mjs +28 -57
  18. package/esm2022/ui/form/src/form-submit-button.component.mjs +22 -27
  19. package/esm2022/ui/form/src/form.component.mjs +7 -11
  20. package/esm2022/ui/lib/src/form/form-error-message.component.mjs +1 -5
  21. package/esm2022/ui/lib/src/form/form-error-message.directive.mjs +8 -12
  22. package/esm2022/ui/lib/src/input/input-disabled.directive.mjs +1 -5
  23. package/esm2022/ui/mask/src/mask.component.mjs +7 -4
  24. package/esm2022/ui/number/src/number.component.mjs +19 -40
  25. package/esm2022/ui/password/src/password.component.mjs +11 -16
  26. package/esm2022/ui/radioButton/src/radio-button.component.mjs +14 -21
  27. package/esm2022/ui/selectBox/src/select-box.component.mjs +12 -24
  28. package/esm2022/ui/switch/src/switch.component.mjs +6 -6
  29. package/esm2022/ui/table/src/table.component.mjs +2 -1
  30. package/esm2022/ui/tagBox/src/tag-box.component.mjs +12 -21
  31. package/esm2022/ui/text/src/text.component.mjs +24 -35
  32. package/esm2022/ui/textArea/src/text-area.component.mjs +11 -16
  33. package/esm2022/ui/tree/src/tree.component.mjs +3 -3
  34. package/esm2022/ui/value/src/value.component.mjs +26 -42
  35. package/esm2022/util/lib/index.mjs +2 -1
  36. package/esm2022/util/lib/src/module-router.mjs +16 -0
  37. package/fesm2022/aril-http.mjs +1 -2
  38. package/fesm2022/aril-http.mjs.map +1 -1
  39. package/fesm2022/aril-i18n.mjs +72 -0
  40. package/fesm2022/aril-i18n.mjs.map +1 -0
  41. package/fesm2022/aril-ui-badge.mjs +10 -16
  42. package/fesm2022/aril-ui-badge.mjs.map +1 -1
  43. package/fesm2022/aril-ui-button.mjs +21 -36
  44. package/fesm2022/aril-ui-button.mjs.map +1 -1
  45. package/fesm2022/aril-ui-calendar.mjs +34 -55
  46. package/fesm2022/aril-ui-calendar.mjs.map +1 -1
  47. package/fesm2022/aril-ui-checkbox.mjs +11 -5
  48. package/fesm2022/aril-ui-checkbox.mjs.map +1 -1
  49. package/fesm2022/aril-ui-dxField.mjs +8 -20
  50. package/fesm2022/aril-ui-dxField.mjs.map +1 -1
  51. package/fesm2022/aril-ui-field.mjs +18 -31
  52. package/fesm2022/aril-ui-field.mjs.map +1 -1
  53. package/fesm2022/aril-ui-fileUpload.mjs +27 -56
  54. package/fesm2022/aril-ui-fileUpload.mjs.map +1 -1
  55. package/fesm2022/aril-ui-form.mjs +26 -36
  56. package/fesm2022/aril-ui-form.mjs.map +1 -1
  57. package/fesm2022/aril-ui-lib.mjs +7 -19
  58. package/fesm2022/aril-ui-lib.mjs.map +1 -1
  59. package/fesm2022/aril-ui-mask.mjs +6 -3
  60. package/fesm2022/aril-ui-mask.mjs.map +1 -1
  61. package/fesm2022/aril-ui-number.mjs +18 -39
  62. package/fesm2022/aril-ui-number.mjs.map +1 -1
  63. package/fesm2022/aril-ui-password.mjs +10 -15
  64. package/fesm2022/aril-ui-password.mjs.map +1 -1
  65. package/fesm2022/aril-ui-radioButton.mjs +13 -20
  66. package/fesm2022/aril-ui-radioButton.mjs.map +1 -1
  67. package/fesm2022/aril-ui-selectBox.mjs +11 -23
  68. package/fesm2022/aril-ui-selectBox.mjs.map +1 -1
  69. package/fesm2022/aril-ui-switch.mjs +5 -5
  70. package/fesm2022/aril-ui-switch.mjs.map +1 -1
  71. package/fesm2022/aril-ui-table.mjs +1 -0
  72. package/fesm2022/aril-ui-table.mjs.map +1 -1
  73. package/fesm2022/aril-ui-tagBox.mjs +11 -20
  74. package/fesm2022/aril-ui-tagBox.mjs.map +1 -1
  75. package/fesm2022/aril-ui-text.mjs +23 -34
  76. package/fesm2022/aril-ui-text.mjs.map +1 -1
  77. package/fesm2022/aril-ui-textArea.mjs +10 -15
  78. package/fesm2022/aril-ui-textArea.mjs.map +1 -1
  79. package/fesm2022/aril-ui-tree.mjs +2 -2
  80. package/fesm2022/aril-ui-tree.mjs.map +1 -1
  81. package/fesm2022/aril-ui-value.mjs +25 -41
  82. package/fesm2022/aril-ui-value.mjs.map +1 -1
  83. package/fesm2022/aril-util-lib.mjs +19 -0
  84. package/fesm2022/aril-util-lib.mjs.map +1 -1
  85. package/i18n/index.d.ts +5 -0
  86. package/i18n/src/file-url-token.d.ts +2 -0
  87. package/i18n/src/i18n.module.d.ts +7 -0
  88. package/i18n/src/loader.d.ts +9 -0
  89. package/i18n/src/provideI18n.d.ts +2 -0
  90. package/i18n/src/provideScope.d.ts +9 -0
  91. package/package.json +13 -7
  92. package/ui/badge/src/badge.component.d.ts +5 -5
  93. package/ui/button/src/button.component.d.ts +16 -19
  94. package/ui/calendar/src/calendar.component.d.ts +17 -20
  95. package/ui/dxField/src/dx-field.component.d.ts +5 -7
  96. package/ui/field/src/field.component.d.ts +9 -10
  97. package/ui/fileUpload/src/file-upload.component.d.ts +20 -19
  98. package/ui/form/src/form-submit-button.component.d.ts +5 -5
  99. package/ui/form/src/form.component.d.ts +2 -2
  100. package/ui/lib/src/form/form-error-message.directive.d.ts +2 -2
  101. package/ui/number/src/number.component.d.ts +19 -16
  102. package/ui/password/src/password.component.d.ts +5 -5
  103. package/ui/radioButton/src/radio-button.component.d.ts +8 -6
  104. package/ui/selectBox/src/select-box.component.d.ts +8 -8
  105. package/ui/tagBox/src/tag-box.component.d.ts +6 -6
  106. package/ui/text/src/text.component.d.ts +9 -9
  107. package/ui/textArea/src/text-area.component.d.ts +5 -5
  108. package/ui/value/src/value.component.d.ts +7 -9
  109. package/util/lib/index.d.ts +1 -0
  110. package/util/lib/src/module-router.d.ts +5 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { input, Component } from '@angular/core';
3
3
  import * as i2 from '@angular/forms';
4
4
  import { ReactiveFormsModule } from '@angular/forms';
5
5
  import * as i3 from 'primeng/checkbox';
@@ -11,6 +11,9 @@ import { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } fro
11
11
  import * as i3$1 from 'primeng/tristatecheckbox';
12
12
  import { TriStateCheckboxModule } from 'primeng/tristatecheckbox';
13
13
 
14
+ /* TODO
15
+ 1. HostAttributeToken
16
+ */
14
17
  class CheckboxComponent extends BaseInputComponent {
15
18
  constructor() {
16
19
  super(...arguments);
@@ -18,13 +21,16 @@ class CheckboxComponent extends BaseInputComponent {
18
21
  this.tabindex = input();
19
22
  }
20
23
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
21
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: CheckboxComponent, isStandalone: true, selector: "aril-checkbox[ngModel], aril-checkbox[formControl], aril-checkbox[formControlName]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, hostDirectives: [{ directive: i1.ValueAccessorDirective }], ngImport: i0, template: "<p-checkbox\n\t[label]=\"label()\"\n\t[tabindex]=\"tabindex()\"\n\t[binary]=\"true\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-checkbox>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i3.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange", "onFocus", "onBlur"] }, { 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 }); }
24
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: CheckboxComponent, isStandalone: true, selector: "aril-checkbox[ngModel], aril-checkbox[formControl], aril-checkbox[formControlName]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, hostDirectives: [{ directive: i1.ValueAccessorDirective }], ngImport: i0, template: "<p-checkbox\n\t[label]=\"label()\"\n\t[tabindex]=\"tabindex()\"\n\t[binary]=\"true\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-checkbox>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i3.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange", "onFocus", "onBlur"] }, { 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" }] }); }
22
25
  }
23
26
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CheckboxComponent, decorators: [{
24
27
  type: Component,
25
- args: [{ standalone: true, selector: 'aril-checkbox[ngModel], aril-checkbox[formControl], aril-checkbox[formControlName]', imports: [ReactiveFormsModule, CheckboxModule, TooltipModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-checkbox\n\t[label]=\"label()\"\n\t[tabindex]=\"tabindex()\"\n\t[binary]=\"true\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-checkbox>\n" }]
28
+ args: [{ standalone: true, selector: 'aril-checkbox[ngModel], aril-checkbox[formControl], aril-checkbox[formControlName]', imports: [ReactiveFormsModule, CheckboxModule, TooltipModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective], template: "<p-checkbox\n\t[label]=\"label()\"\n\t[tabindex]=\"tabindex()\"\n\t[binary]=\"true\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-checkbox>\n" }]
26
29
  }] });
27
30
 
31
+ /* TODO
32
+ 1. HostAttributeToken
33
+ */
28
34
  class TriStateCheckboxComponent extends BaseInputComponent {
29
35
  constructor() {
30
36
  super(...arguments);
@@ -32,11 +38,11 @@ class TriStateCheckboxComponent extends BaseInputComponent {
32
38
  this.tabindex = input();
33
39
  }
34
40
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TriStateCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
35
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: TriStateCheckboxComponent, isStandalone: true, selector: "aril-tri-state-checkbox[ngModel], aril-tri-state-checkbox[formControl], aril-tri-state-checkbox[formControlName]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, hostDirectives: [{ directive: i1.ValueAccessorDirective }], ngImport: i0, template: "<p-triStateCheckbox\n\t[label]=\"label()\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-triStateCheckbox>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TriStateCheckboxModule }, { kind: "component", type: i3$1.TriStateCheckbox, selector: "p-triStateCheckbox", inputs: ["disabled", "name", "ariaLabel", "ariaLabelledBy", "tabindex", "inputId", "style", "styleClass", "label", "readonly", "checkboxTrueIcon", "checkboxFalseIcon"], outputs: ["onChange"] }, { 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 }); }
41
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: TriStateCheckboxComponent, isStandalone: true, selector: "aril-tri-state-checkbox[ngModel], aril-tri-state-checkbox[formControl], aril-tri-state-checkbox[formControlName]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, hostDirectives: [{ directive: i1.ValueAccessorDirective }], ngImport: i0, template: "<p-triStateCheckbox\n\t[label]=\"label()\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-triStateCheckbox>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TriStateCheckboxModule }, { kind: "component", type: i3$1.TriStateCheckbox, selector: "p-triStateCheckbox", inputs: ["disabled", "name", "ariaLabel", "ariaLabelledBy", "tabindex", "inputId", "style", "styleClass", "label", "readonly", "checkboxTrueIcon", "checkboxFalseIcon"], outputs: ["onChange"] }, { 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" }] }); }
36
42
  }
37
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TriStateCheckboxComponent, decorators: [{
38
44
  type: Component,
39
- args: [{ standalone: true, selector: 'aril-tri-state-checkbox[ngModel], aril-tri-state-checkbox[formControl], aril-tri-state-checkbox[formControlName]', imports: [ReactiveFormsModule, TriStateCheckboxModule, TooltipModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-triStateCheckbox\n\t[label]=\"label()\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-triStateCheckbox>\n" }]
45
+ args: [{ standalone: true, selector: 'aril-tri-state-checkbox[ngModel], aril-tri-state-checkbox[formControl], aril-tri-state-checkbox[formControlName]', imports: [ReactiveFormsModule, TriStateCheckboxModule, TooltipModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective], template: "<p-triStateCheckbox\n\t[label]=\"label()\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-triStateCheckbox>\n" }]
40
46
  }] });
41
47
 
42
48
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"aril-ui-checkbox.mjs","sources":["../../projects/aril/ui/checkbox/src/check-box.component.ts","../../projects/aril/ui/checkbox/src/check-box.component.html","../../projects/aril/ui/checkbox/src/tri-state-checkbox.component.ts","../../projects/aril/ui/checkbox/src/tri-state-checkbox.component.html","../../projects/aril/ui/checkbox/aril-ui-checkbox.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-checkbox[ngModel], aril-checkbox[formControl], aril-checkbox[formControlName]',\n\ttemplateUrl: './check-box.component.html',\n\timports: [ReactiveFormsModule, CheckboxModule, TooltipModule, InputErrorMessagePipe],\n\thostDirectives: [ValueAccessorDirective],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CheckboxComponent extends BaseInputComponent {\n\tlabel = input.required<string>();\n\ttabindex = input<number>();\n}\n","<p-checkbox\n\t[label]=\"label()\"\n\t[tabindex]=\"tabindex()\"\n\t[binary]=\"true\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-checkbox>\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { TooltipModule } from 'primeng/tooltip';\nimport { TriStateCheckboxModule } from 'primeng/tristatecheckbox';\n\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\n\n@Component({\n\tstandalone: true,\n\tselector:\n\t\t'aril-tri-state-checkbox[ngModel], aril-tri-state-checkbox[formControl], aril-tri-state-checkbox[formControlName]',\n\ttemplateUrl: './tri-state-checkbox.component.html',\n\timports: [ReactiveFormsModule, TriStateCheckboxModule, TooltipModule, InputErrorMessagePipe],\n\thostDirectives: [ValueAccessorDirective],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TriStateCheckboxComponent extends BaseInputComponent {\n\tlabel = input.required<string>();\n\ttabindex = input<number>();\n}\n","<p-triStateCheckbox\n\t[label]=\"label()\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-triStateCheckbox>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3"],"mappings":";;;;;;;;;;;;;AAgBM,MAAO,iBAAkB,SAAQ,kBAAkB,CAAA;AARzD,IAAA,WAAA,GAAA;;AASC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;QACjC,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAU,CAAC;AAC3B,KAAA;8GAHY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oFAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChB9B,qVASA,EDGW,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,yTAAE,cAAc,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,UAAA,EAAA,QAA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IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,eAAA,EAAA,mBAAA,EAAA,eAAA,EAAA,QAAA,EAAA,WAAA,EAAA,WAAA,EAAA,MAAA,EAAA,aAAA,EAAA,cAAA,EAAA,UAAA,EAAA,YAAA,EAAA,cAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,qBAAqB,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAI/E,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBATrC,SAAS;AACG,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,YAEf,kHAAkH,EAAA,OAAA,EAE1G,CAAC,mBAAmB,EAAE,sBAAsB,EAAE,aAAa,EAAE,qBAAqB,CAAC,kBAC5E,CAAC,sBAAsB,CAAC,EACvB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mTAAA,EAAA,CAAA;;;AEfhD;;AAEG;;;;"}
1
+ {"version":3,"file":"aril-ui-checkbox.mjs","sources":["../../projects/aril/ui/checkbox/src/check-box.component.ts","../../projects/aril/ui/checkbox/src/check-box.component.html","../../projects/aril/ui/checkbox/src/tri-state-checkbox.component.ts","../../projects/aril/ui/checkbox/src/tri-state-checkbox.component.html","../../projects/aril/ui/checkbox/aril-ui-checkbox.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { CheckboxModule } from 'primeng/checkbox';\nimport { TooltipModule } from 'primeng/tooltip';\n\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\n\n/* TODO\n 1. HostAttributeToken\n*/\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-checkbox[ngModel], aril-checkbox[formControl], aril-checkbox[formControlName]',\n\ttemplateUrl: './check-box.component.html',\n\timports: [ReactiveFormsModule, CheckboxModule, TooltipModule, InputErrorMessagePipe],\n\thostDirectives: [ValueAccessorDirective]\n})\nexport class CheckboxComponent extends BaseInputComponent {\n\tlabel = input.required<string>();\n\ttabindex = input<number>();\n}\n","<p-checkbox\n\t[label]=\"label()\"\n\t[tabindex]=\"tabindex()\"\n\t[binary]=\"true\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-checkbox>\n","import { Component, input } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { TooltipModule } from 'primeng/tooltip';\nimport { TriStateCheckboxModule } from 'primeng/tristatecheckbox';\n\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\n\n/* TODO\n 1. HostAttributeToken\n*/\n\n@Component({\n\tstandalone: true,\n\tselector:\n\t\t'aril-tri-state-checkbox[ngModel], aril-tri-state-checkbox[formControl], aril-tri-state-checkbox[formControlName]',\n\ttemplateUrl: './tri-state-checkbox.component.html',\n\timports: [ReactiveFormsModule, TriStateCheckboxModule, TooltipModule, InputErrorMessagePipe],\n\thostDirectives: [ValueAccessorDirective]\n})\nexport class TriStateCheckboxComponent extends BaseInputComponent {\n\tlabel = input.required<string>();\n\ttabindex = input<number>();\n}\n","<p-triStateCheckbox\n\t[label]=\"label()\"\n\t[pTooltip]=\"ngControl.invalid ? (ngControl.control.value | inputErrorMessage: ngControl) : ''\"\n\t[tooltipOptions]=\"tooltipOptions\"\n\t[formControl]=\"ngControl.control\"\n\t(ngModelChange)=\"ngControl.viewToModelUpdate($event)\">\n</p-triStateCheckbox>\n","/**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AAA,eAAA,EAAA,mBAAA,EAAA,eAAA,EAAA,QAAA,EAAA,WAAA,EAAA,WAAA,EAAA,MAAA,EAAA,aAAA,EAAA,cAAA,EAAA,UAAA,EAAA,YAAA,EAAA,cAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,qBAAqB,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG/E,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBARrC,SAAS;AACG,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EAEf,QAAA,EAAA,kHAAkH,EAE1G,OAAA,EAAA,CAAC,mBAAmB,EAAE,sBAAsB,EAAE,aAAa,EAAE,qBAAqB,CAAC,EAC5E,cAAA,EAAA,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,mTAAA,EAAA,CAAA;;;AElBzC;;AAEG;;;;"}
@@ -1,33 +1,21 @@
1
1
  import { NgStyle } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
3
+ import { input, Component, ChangeDetectionStrategy } from '@angular/core';
4
4
 
5
- /* TODO :
6
- 1. InputSignal
7
- */
8
5
  class DxFieldComponent {
9
6
  constructor() {
10
- this.color = '#333';
11
- this.labelWidth = 30;
12
- this.valueWidth = 70;
7
+ this.label = input();
8
+ this.color = input('#333');
9
+ this.labelWidth = input(30);
10
+ this.valueWidth = input(70);
13
11
  }
14
12
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: DxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.1.2", type: DxFieldComponent, isStandalone: true, selector: "aril-dx-field", inputs: { label: "label", color: "color", labelWidth: ["labelWidth", "labelWidth", (value) => value + '%'], valueWidth: ["valueWidth", "valueWidth", (value) => value + '%'] }, ngImport: i0, template: "<div class=\"dx-field\">\n\t<div class=\"dx-field-label font-bold\" [ngStyle]=\"{ color: color, width: labelWidth }\">\n\t\t{{ label }}\n\t</div>\n\t<div class=\"dx-field-value\" [ngStyle]=\"{ width: valueWidth }\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
13
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: DxFieldComponent, isStandalone: true, selector: "aril-dx-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null }, valueWidth: { classPropertyName: "valueWidth", publicName: "valueWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"dx-field\">\n\t<div class=\"dx-field-label font-bold\" [ngStyle]=\"{ color: color(), width: labelWidth() + '%' }\">\n\t\t{{ label() }}\n\t</div>\n\t<div class=\"dx-field-value\" [ngStyle]=\"{ width: valueWidth() + '%' }\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
16
14
  }
17
15
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: DxFieldComponent, decorators: [{
18
16
  type: Component,
19
- args: [{ standalone: true, selector: 'aril-dx-field', imports: [NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dx-field\">\n\t<div class=\"dx-field-label font-bold\" [ngStyle]=\"{ color: color, width: labelWidth }\">\n\t\t{{ label }}\n\t</div>\n\t<div class=\"dx-field-value\" [ngStyle]=\"{ width: valueWidth }\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n" }]
20
- }], propDecorators: { label: [{
21
- type: Input
22
- }], color: [{
23
- type: Input
24
- }], labelWidth: [{
25
- type: Input,
26
- args: [{ transform: (value) => value + '%' }]
27
- }], valueWidth: [{
28
- type: Input,
29
- args: [{ transform: (value) => value + '%' }]
30
- }] } });
17
+ args: [{ standalone: true, selector: 'aril-dx-field', imports: [NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dx-field\">\n\t<div class=\"dx-field-label font-bold\" [ngStyle]=\"{ color: color(), width: labelWidth() + '%' }\">\n\t\t{{ label() }}\n\t</div>\n\t<div class=\"dx-field-value\" [ngStyle]=\"{ width: valueWidth() + '%' }\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n" }]
18
+ }] });
31
19
 
32
20
  /**
33
21
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"aril-ui-dxField.mjs","sources":["../../projects/aril/ui/dxField/src/dx-field.component.ts","../../projects/aril/ui/dxField/src/dx-field.component.html","../../projects/aril/ui/dxField/aril-ui-dxField.ts"],"sourcesContent":["import { NgStyle } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n/* TODO : \n 1. InputSignal\n*/\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-dx-field',\n\ttemplateUrl: './dx-field.component.html',\n\timports: [NgStyle],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DxFieldComponent {\n\t@Input() label!: string;\n\t@Input() color = '#333';\n\t@Input({ transform: (value: number) => value + '%' }) labelWidth = 30;\n\t@Input({ transform: (value: number) => value + '%' }) valueWidth = 70;\n}\n","<div class=\"dx-field\">\n\t<div class=\"dx-field-label font-bold\" [ngStyle]=\"{ color: color, width: labelWidth }\">\n\t\t{{ label }}\n\t</div>\n\t<div class=\"dx-field-value\" [ngStyle]=\"{ width: valueWidth }\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;;AAEE;MASW,gBAAgB,CAAA;AAP7B,IAAA,WAAA,GAAA;QASU,IAAK,CAAA,KAAA,GAAG,MAAM,CAAC;QAC8B,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;QAChB,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;AACtE,KAAA;8GALY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,KAAA,EAAA,OAAA,EAAA,UAAA,EAAA,CAAA,YAAA,EAAA,YAAA,EAGR,CAAC,KAAa,KAAK,KAAK,GAAG,GAAG,CAAA,EAAA,UAAA,EAAA,CAAA,YAAA,EAAA,YAAA,EAC9B,CAAC,KAAa,KAAK,KAAK,GAAG,GAAG,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClBnD,4QAQA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDGW,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAGL,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;iCACG,IAAI,EAAA,QAAA,EACN,eAAe,EAEhB,OAAA,EAAA,CAAC,OAAO,CAAC,EAAA,eAAA,EACD,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4QAAA,EAAA,CAAA;8BAGtC,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACgD,UAAU,EAAA,CAAA;sBAA/D,KAAK;uBAAC,EAAE,SAAS,EAAE,CAAC,KAAa,KAAK,KAAK,GAAG,GAAG,EAAE,CAAA;gBACE,UAAU,EAAA,CAAA;sBAA/D,KAAK;uBAAC,EAAE,SAAS,EAAE,CAAC,KAAa,KAAK,KAAK,GAAG,GAAG,EAAE,CAAA;;;AElBrD;;AAEG;;;;"}
1
+ {"version":3,"file":"aril-ui-dxField.mjs","sources":["../../projects/aril/ui/dxField/src/dx-field.component.ts","../../projects/aril/ui/dxField/src/dx-field.component.html","../../projects/aril/ui/dxField/aril-ui-dxField.ts"],"sourcesContent":["import { NgStyle } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-dx-field',\n\ttemplateUrl: './dx-field.component.html',\n\timports: [NgStyle],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DxFieldComponent {\n\tlabel = input<string>();\n\tcolor = input<string>('#333');\n\tlabelWidth = input<number>(30);\n\tvalueWidth = input<number>(70);\n}\n","<div class=\"dx-field\">\n\t<div class=\"dx-field-label font-bold\" [ngStyle]=\"{ color: color(), width: labelWidth() + '%' }\">\n\t\t{{ label() }}\n\t</div>\n\t<div class=\"dx-field-value\" [ngStyle]=\"{ width: valueWidth() + '%' }\">\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAUa,gBAAgB,CAAA;AAP7B,IAAA,WAAA,GAAA;QAQC,IAAK,CAAA,KAAA,GAAG,KAAK,EAAU,CAAC;AACxB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,MAAM,CAAC,CAAC;AAC9B,QAAA,IAAA,CAAA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S;iCACG,IAAI,EAAA,QAAA,EACN,eAAe,EAEhB,OAAA,EAAA,CAAC,OAAO,CAAC,EAAA,eAAA,EACD,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,gSAAA,EAAA,CAAA;;;AERhD;;AAEG;;;;"}
@@ -1,47 +1,34 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input, HostBinding } from '@angular/core';
2
+ import { input, effect, Component, ChangeDetectionStrategy, HostBinding } from '@angular/core';
3
3
  import { DxFieldComponent } from 'aril/ui/dxField';
4
+ import { NgIf, NgTemplateOutlet } from '@angular/common';
4
5
 
5
6
  class FieldComponent {
6
7
  constructor() {
7
- this.labelPos = 'top';
8
- this.color = '#333';
9
- this.labelWidth = 30;
10
- this.valueWidth = 70;
8
+ this.label = input();
9
+ this.color = input('#333');
10
+ this.labelWidth = input(30);
11
+ this.valueWidth = input(70);
12
+ this.labelPos = input('top');
13
+ this.markAsRequired = input(false);
14
+ this.cols = input.required({});
11
15
  this.hostClass = '';
12
16
  this.padding = '.5rem';
13
- }
14
- set cols(value) {
15
- this.hostClass = '';
16
- Object.entries(value).forEach(([key, value]) => {
17
- this.hostClass += `${key}:col-${value} `;
17
+ effect(() => {
18
+ if (this.cols()) {
19
+ this.hostClass = Object.entries(this.cols()).reduce((acc, [key, value]) => {
20
+ return `${acc} ${key}:col-${value}`;
21
+ }, '');
22
+ }
18
23
  });
19
24
  }
20
25
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: FieldComponent, isStandalone: true, selector: "aril-field", inputs: { label: "label", labelPos: "labelPos", color: "color", labelWidth: ["labelWidth", "labelWidth", (value) => value + '%'], valueWidth: ["valueWidth", "valueWidth", (value) => value + '%'], markAsRequired: "markAsRequired", cols: "cols" }, host: { properties: { "class": "this.hostClass", "style.padding": "this.padding" } }, ngImport: i0, template: "@if (labelPos === 'left') {\n\t<aril-dx-field [label]=\"label\" [color]=\"color\" [labelWidth]=\"labelWidth\" [valueWidth]=\"valueWidth\">\n\t\t<ng-content></ng-content>\n\t</aril-dx-field>\n} @else {\n\t@if (label) {\n\t\t<div class=\"mb-1\">\n\t\t\t<span class=\"font-bold\">{{ markAsRequired && '*' }}{{ label }}</span>\n\t\t</div>\n\t}\n\t<ng-content></ng-content>\n}\n", dependencies: [{ kind: "component", type: DxFieldComponent, selector: "aril-dx-field", inputs: ["label", "color", "labelWidth", "valueWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
26
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: FieldComponent, isStandalone: true, selector: "aril-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, labelWidth: { classPropertyName: "labelWidth", publicName: "labelWidth", isSignal: true, isRequired: false, transformFunction: null }, valueWidth: { classPropertyName: "valueWidth", publicName: "valueWidth", isSignal: true, isRequired: false, transformFunction: null }, labelPos: { classPropertyName: "labelPos", publicName: "labelPos", isSignal: true, isRequired: false, transformFunction: null }, markAsRequired: { classPropertyName: "markAsRequired", publicName: "markAsRequired", isSignal: true, isRequired: false, transformFunction: null }, cols: { classPropertyName: "cols", publicName: "cols", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "this.hostClass", "style.padding": "this.padding" } }, ngImport: i0, template: "<ng-template #content>\n\t@if (label() && labelPos() === 'top') {\n\t\t<div class=\"mb-1\">\n\t\t\t<span class=\"font-bold\">\n\t\t\t\t@if(markAsRequired()) {*}\n\t\t\t\t{{ label() }}\n\t\t\t</span>\n\t\t</div>\n\t}\n\t<ng-content></ng-content>\n</ng-template>\n\n<aril-dx-field\n\t*ngIf=\"labelPos() === 'left'; else content\"\n\t[label]=\"label()\" [color]=\"color()\" [labelWidth]=\"labelWidth()\" [valueWidth]=\"valueWidth()\">\n\t<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</aril-dx-field>\n", dependencies: [{ kind: "component", type: DxFieldComponent, selector: "aril-dx-field", inputs: ["label", "color", "labelWidth", "valueWidth"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22
27
  }
23
28
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FieldComponent, decorators: [{
24
29
  type: Component,
25
- args: [{ standalone: true, selector: 'aril-field', imports: [DxFieldComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (labelPos === 'left') {\n\t<aril-dx-field [label]=\"label\" [color]=\"color\" [labelWidth]=\"labelWidth\" [valueWidth]=\"valueWidth\">\n\t\t<ng-content></ng-content>\n\t</aril-dx-field>\n} @else {\n\t@if (label) {\n\t\t<div class=\"mb-1\">\n\t\t\t<span class=\"font-bold\">{{ markAsRequired && '*' }}{{ label }}</span>\n\t\t</div>\n\t}\n\t<ng-content></ng-content>\n}\n" }]
26
- }], propDecorators: { label: [{
27
- type: Input,
28
- args: [{ required: true }]
29
- }], labelPos: [{
30
- type: Input
31
- }], color: [{
32
- type: Input
33
- }], labelWidth: [{
34
- type: Input,
35
- args: [{ transform: (value) => value + '%' }]
36
- }], valueWidth: [{
37
- type: Input,
38
- args: [{ transform: (value) => value + '%' }]
39
- }], markAsRequired: [{
40
- type: Input
41
- }], cols: [{
42
- type: Input,
43
- args: [{ required: true }]
44
- }], hostClass: [{
30
+ args: [{ standalone: true, selector: 'aril-field', imports: [DxFieldComponent, NgIf, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #content>\n\t@if (label() && labelPos() === 'top') {\n\t\t<div class=\"mb-1\">\n\t\t\t<span class=\"font-bold\">\n\t\t\t\t@if(markAsRequired()) {*}\n\t\t\t\t{{ label() }}\n\t\t\t</span>\n\t\t</div>\n\t}\n\t<ng-content></ng-content>\n</ng-template>\n\n<aril-dx-field\n\t*ngIf=\"labelPos() === 'left'; else content\"\n\t[label]=\"label()\" [color]=\"color()\" [labelWidth]=\"labelWidth()\" [valueWidth]=\"valueWidth()\">\n\t<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</aril-dx-field>\n" }]
31
+ }], ctorParameters: () => [], propDecorators: { hostClass: [{
45
32
  type: HostBinding,
46
33
  args: ['class']
47
34
  }], padding: [{
@@ -1 +1 @@
1
- {"version":3,"file":"aril-ui-field.mjs","sources":["../../projects/aril/ui/field/src/field.component.ts","../../projects/aril/ui/field/src/field.component.html","../../projects/aril/ui/field/aril-ui-field.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, HostBinding, Input } from '@angular/core';\n\nimport { Types } from 'aril/util/lib';\nimport { DxFieldComponent } from 'aril/ui/dxField';\n\n/* TODO : \n 1. InputSignal\n*/\n\ntype LabelPositions = 'top' | 'left';\n\ninterface ColumnSizeTypes {\n\txl?: Types.NumberRange<1, 13>;\n\tlg?: Types.NumberRange<1, 13>;\n\tmd?: Types.NumberRange<1, 13>;\n\tsm?: Types.NumberRange<1, 13>;\n}\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-field',\n\ttemplateUrl: './field.component.html',\n\timports: [DxFieldComponent],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FieldComponent {\n\t@Input({ required: true }) label!: string;\n\t@Input() labelPos: LabelPositions = 'top';\n\t@Input() color = '#333';\n\t@Input({ transform: (value: number) => value + '%' }) labelWidth = 30;\n\t@Input({ transform: (value: number) => value + '%' }) valueWidth = 70;\n\t@Input() markAsRequired!: boolean;\n\t@Input({ required: true }) set cols(value: ColumnSizeTypes) {\n\t\tthis.hostClass = '';\n\t\tObject.entries(value).forEach(([key, value]) => {\n\t\t\tthis.hostClass += `${key}:col-${value} `;\n\t\t});\n\t}\n\n\t@HostBinding('class') hostClass = '';\n\t@HostBinding('style.padding') padding = '.5rem';\n}\n","@if (labelPos === 'left') {\n\t<aril-dx-field [label]=\"label\" [color]=\"color\" [labelWidth]=\"labelWidth\" [valueWidth]=\"valueWidth\">\n\t\t<ng-content></ng-content>\n\t</aril-dx-field>\n} @else {\n\t@if (label) {\n\t\t<div class=\"mb-1\">\n\t\t\t<span class=\"font-bold\">{{ markAsRequired && '*' }}{{ label }}</span>\n\t\t</div>\n\t}\n\t<ng-content></ng-content>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAyBa,cAAc,CAAA;AAP3B,IAAA,WAAA,GAAA;QASU,IAAQ,CAAA,QAAA,GAAmB,KAAK,CAAC;QACjC,IAAK,CAAA,KAAA,GAAG,MAAM,CAAC;QAC8B,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;QAChB,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;QAShD,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;QACP,IAAO,CAAA,OAAA,GAAG,OAAO,CAAC;AAChD,KAAA;IATA,IAA+B,IAAI,CAAC,KAAsB,EAAA;AACzD,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;AACpB,QAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;YAC9C,IAAI,CAAC,SAAS,IAAI,CAAA,EAAG,GAAG,CAAQ,KAAA,EAAA,KAAK,GAAG,CAAC;AAC1C,SAAC,CAAC,CAAC;KACH;8GAZW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SA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,EAAE,SAAS,EAAE,CAAC,KAAa,KAAK,KAAK,GAAG,GAAG,EAAE,CAAA;gBACE,UAAU,EAAA,CAAA;sBAA/D,KAAK;uBAAC,EAAE,SAAS,EAAE,CAAC,KAAa,KAAK,KAAK,GAAG,GAAG,EAAE,CAAA;gBAC3C,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBACyB,IAAI,EAAA,CAAA;sBAAlC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;gBAOH,SAAS,EAAA,CAAA;sBAA9B,WAAW;uBAAC,OAAO,CAAA;gBACU,OAAO,EAAA,CAAA;sBAApC,WAAW;uBAAC,eAAe,CAAA;;;AExC7B;;AAEG;;;;"}
1
+ {"version":3,"file":"aril-ui-field.mjs","sources":["../../projects/aril/ui/field/src/field.component.ts","../../projects/aril/ui/field/src/field.component.html","../../projects/aril/ui/field/aril-ui-field.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, HostBinding, input, effect } from '@angular/core';\n\nimport { Types } from 'aril/util/lib';\nimport { DxFieldComponent } from 'aril/ui/dxField';\nimport { NgIf, NgTemplateOutlet } from '@angular/common';\n\ntype LabelPositions = 'top' | 'left';\n\ninterface ColumnSizeTypes {\n\txl?: Types.NumberRange<1, 13>;\n\tlg?: Types.NumberRange<1, 13>;\n\tmd?: Types.NumberRange<1, 13>;\n\tsm?: Types.NumberRange<1, 13>;\n}\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-field',\n\ttemplateUrl: './field.component.html',\n\timports: [DxFieldComponent, NgIf, NgTemplateOutlet],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FieldComponent {\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tif (this.cols()) {\n\t\t\t\tthis.hostClass = Object.entries(this.cols()).reduce((acc, [key, value]) => {\n\t\t\t\t\treturn `${acc} ${key}:col-${value}`;\n\t\t\t\t}, '');\n\t\t\t}\n\t\t});\n\t}\n\n\tlabel = input<string>();\n\tcolor = input<string>('#333');\n\tlabelWidth = input<number>(30);\n\tvalueWidth = input<number>(70);\n\tlabelPos = input<LabelPositions>('top');\n\tmarkAsRequired = input<boolean>(false);\n\tcols = input.required<ColumnSizeTypes>({});\n\n\t@HostBinding('class') hostClass = '';\n\t@HostBinding('style.padding') padding = '.5rem';\n}\n","<ng-template #content>\n\t@if (label() && labelPos() === 'top') {\n\t\t<div class=\"mb-1\">\n\t\t\t<span class=\"font-bold\">\n\t\t\t\t@if(markAsRequired()) {*}\n\t\t\t\t{{ label() }}\n\t\t\t</span>\n\t\t</div>\n\t}\n\t<ng-content></ng-content>\n</ng-template>\n\n<aril-dx-field\n\t*ngIf=\"labelPos() === 'left'; else content\"\n\t[label]=\"label()\" [color]=\"color()\" [labelWidth]=\"labelWidth()\" [valueWidth]=\"valueWidth()\">\n\t<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</aril-dx-field>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAsBa,cAAc,CAAA;AAC1B,IAAA,WAAA,GAAA;QAUA,IAAK,CAAA,KAAA,GAAG,KAAK,EAAU,CAAC;AACxB,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,MAAM,CAAC,CAAC;AAC9B,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAiB,KAAK,CAAC,CAAC;AACxC,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAU,KAAK,CAAC,CAAC;AACvC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAkB,EAAE,CAAC,CAAC;QAErB,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;QACP,IAAO,CAAA,OAAA,GAAG,OAAO,CAAC;QAlB/C,MAAM,C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AI,EAAE,gBAAgB,CAAC,EAClC,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,ogBAAA,EAAA,CAAA;wDAqBzB,SAAS,EAAA,CAAA;sBAA9B,WAAW;uBAAC,OAAO,CAAA;gBACU,OAAO,EAAA,CAAA;sBAApC,WAAW;uBAAC,eAAe,CAAA;;;AE1C7B;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output } from '@angular/core';
2
+ import { input, EventEmitter, Component, Output } from '@angular/core';
3
3
  import * as i2 from 'primeng/fileupload';
4
4
  import { FileUploadModule } from 'primeng/fileupload';
5
5
  import * as i1 from 'primeng/api';
@@ -8,20 +8,24 @@ import { MessageService } from 'primeng/api';
8
8
  class FileUploadComponent {
9
9
  constructor(messageService) {
10
10
  this.messageService = messageService;
11
- this.multiple = false;
12
- this.accept = '.xlsx';
13
- this.disabled = false;
14
- this.auto = false;
15
- this.withCredentials = false;
16
- this.showUploadButton = true;
17
- this.showCancelButton = true;
18
- this.cancelLabel = 'Temizle';
19
- this.chooseLabel = 'Dosyayi Seç';
20
- this.uploadLabel = 'Dosyayi Yükle';
21
- this.invalidFileTypeMessageSummary = 'Geçersiz dosya türü';
22
- this.invalidFileTypeMessageDetail = 'Seçilen dosya türü desteklenmiyor.';
23
- this.invalidFileSizeMessageSummary = 'Dosya boyutu çok büyük';
24
- this.invalidFileSizeMessageDetail = 'Dosya boyutu izin verilen maksimum boyuttan daha büyük.';
11
+ this.name = input();
12
+ this.url = input.required();
13
+ this.multiple = input(false);
14
+ this.accept = input('.xlsx');
15
+ this.disabled = input(false);
16
+ this.auto = input(false);
17
+ this.maxFileSize = input();
18
+ this.tabindex = input();
19
+ this.withCredentials = input(false);
20
+ this.showUploadButton = input(true);
21
+ this.showCancelButton = input(true);
22
+ this.cancelLabel = input('Temizle');
23
+ this.chooseLabel = input('Dosya Seç');
24
+ this.uploadLabel = input('Dosya Yükle');
25
+ this.invalidFileTypeMessageSummary = input('Geçersiz dosya türü');
26
+ this.invalidFileTypeMessageDetail = input('Seçilen dosya türü desteklenmiyor.');
27
+ this.invalidFileSizeMessageSummary = input('Dosya boyutu çok büyük');
28
+ this.invalidFileSizeMessageDetail = input('Dosya boyutu izin verilen maksimum boyuttan daha büyük.');
25
29
  this.beforeSend = new EventEmitter();
26
30
  this.upload = new EventEmitter();
27
31
  this.errors = new EventEmitter();
@@ -32,52 +36,19 @@ class FileUploadComponent {
32
36
  onUpload(event) {
33
37
  this.upload.emit(event);
34
38
  this.uploadedFiles = event.files;
35
- this.messageService.add({ severity: 'success', summary: 'Dosya başarıyla yüklendi..', detail: '' });
39
+ this.messageService.add({ key: 'toast-root', severity: 'success', summary: 'Dosya başarıyla yüklendi.' });
40
+ }
41
+ onError(event) {
42
+ this.errors.emit(event);
43
+ this.messageService.add({ key: 'toast-root', severity: 'error', summary: 'Dosya yüklenemedi.' });
36
44
  }
37
45
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FileUploadComponent, deps: [{ token: i1.MessageService }], target: i0.ɵɵFactoryTarget.Component }); }
38
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: FileUploadComponent, isStandalone: true, selector: "aril-file-upload", inputs: { name: "name", url: "url", multiple: "multiple", accept: "accept", disabled: "disabled", auto: "auto", maxFileSize: "maxFileSize", tabindex: "tabindex", withCredentials: "withCredentials", showUploadButton: "showUploadButton", showCancelButton: "showCancelButton", cancelLabel: "cancelLabel", chooseLabel: "chooseLabel", uploadLabel: "uploadLabel", invalidFileTypeMessageSummary: "invalidFileTypeMessageSummary", invalidFileTypeMessageDetail: "invalidFileTypeMessageDetail", invalidFileSizeMessageSummary: "invalidFileSizeMessageSummary", invalidFileSizeMessageDetail: "invalidFileSizeMessageDetail" }, outputs: { beforeSend: "beforeSend", upload: "upload", errors: "errors", selects: "selects", clear: "clear" }, providers: [MessageService], ngImport: i0, template: "<p-fileUpload\n\t[name]=\"name\"\n\t[url]=\"url\"\n\tmethod=\"post\"\n\t[multiple]=\"multiple\"\n\t[accept]=\"accept\"\n\t[disabled]=\"disabled\"\n\t[auto]=\"auto\"\n\t[maxFileSize]=\"maxFileSize\"\n\t[tabindex]=\"tabindex\"\n\t[withCredentials]=\"withCredentials\"\n\t[showUploadButton]=\"showUploadButton\"\n\t[showCancelButton]=\"showCancelButton\"\n\t[chooseLabel]=\"chooseLabel\"\n\t[cancelLabel]=\"cancelLabel\"\n\t[uploadLabel]=\"uploadLabel\"\n\t[invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary\"\n\t[invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail\"\n\t[invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary\"\n\t[invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail\"\n\t(onBeforeSend)=\"beforeSend.emit($event)\"\n\t(onUpload)=\"onUpload($event)\"\n\t(onError)=\"errors.emit($event)\"\n\t(onSelect)=\"selects.emit($event)\"\n\t(onClear)=\"clear.emit($event)\">\n\t<ng-template pTemplate=\"content\">\n\t\t@if (uploadedFiles.length) {\n\t\t\t<div class=\"flex flex-column\">\n\t\t\t\t@for (file of uploadedFiles; track file) {\n\t\t\t\t\t<div class=\"mt-2\">\n\t\t\t\t\t\t<i class=\"pi pi-file-excel\" style=\"color: slateblue; font-size: 1.4rem\"></i>\n\t\t\t\t\t\t{{ file.name }} - {{ file.size }} bytes\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</ng-template>\n\t<ng-content></ng-content>\n</p-fileUpload>\n", dependencies: [{ kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i2.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError"] }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
46
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: FileUploadComponent, isStandalone: true, selector: "aril-file-upload", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, auto: { classPropertyName: "auto", publicName: "auto", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, withCredentials: { classPropertyName: "withCredentials", publicName: "withCredentials", isSignal: true, isRequired: false, transformFunction: null }, showUploadButton: { classPropertyName: "showUploadButton", publicName: "showUploadButton", isSignal: true, isRequired: false, transformFunction: null }, showCancelButton: { classPropertyName: "showCancelButton", publicName: "showCancelButton", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, chooseLabel: { classPropertyName: "chooseLabel", publicName: "chooseLabel", isSignal: true, isRequired: false, transformFunction: null }, uploadLabel: { classPropertyName: "uploadLabel", publicName: "uploadLabel", isSignal: true, isRequired: false, transformFunction: null }, invalidFileTypeMessageSummary: { classPropertyName: "invalidFileTypeMessageSummary", publicName: "invalidFileTypeMessageSummary", isSignal: true, isRequired: false, transformFunction: null }, invalidFileTypeMessageDetail: { classPropertyName: "invalidFileTypeMessageDetail", publicName: "invalidFileTypeMessageDetail", isSignal: true, isRequired: false, transformFunction: null }, invalidFileSizeMessageSummary: { classPropertyName: "invalidFileSizeMessageSummary", publicName: "invalidFileSizeMessageSummary", isSignal: true, isRequired: false, transformFunction: null }, invalidFileSizeMessageDetail: { classPropertyName: "invalidFileSizeMessageDetail", publicName: "invalidFileSizeMessageDetail", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { beforeSend: "beforeSend", upload: "upload", errors: "errors", selects: "selects", clear: "clear" }, providers: [MessageService], ngImport: i0, template: "<p-fileUpload\n\t[name]=\"name()\"\n\t[url]=\"url()\"\n\tmethod=\"post\"\n\t[multiple]=\"multiple()\"\n\t[accept]=\"accept()\"\n\t[disabled]=\"disabled()\"\n\t[auto]=\"auto()\"\n\t[maxFileSize]=\"maxFileSize()\"\n\t[tabindex]=\"tabindex\"\n\t[withCredentials]=\"withCredentials()\"\n\t[showUploadButton]=\"showUploadButton()\"\n\t[showCancelButton]=\"showCancelButton()\"\n\t[chooseLabel]=\"chooseLabel()\"\n\t[cancelLabel]=\"cancelLabel()\"\n\t[uploadLabel]=\"uploadLabel()\"\n\t[invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary()\"\n\t[invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail()\"\n\t[invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary()\"\n\t[invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail()\"\n\t(onBeforeSend)=\"beforeSend.emit($event)\"\n\t(onUpload)=\"onUpload($event)\"\n\t(onError)=\"onError($event)\"\n\t(onSelect)=\"selects.emit($event)\"\n\t(onClear)=\"clear.emit($event)\">\n\t<ng-template pTemplate=\"content\">\n\t\t@if (uploadedFiles.length) {\n\t\t\t<div class=\"flex flex-column\">\n\t\t\t\t@for (file of uploadedFiles; track file) {\n\t\t\t\t\t<div class=\"mt-2\">\n\t\t\t\t\t\t<i class=\"pi pi-file-excel\" style=\"color: slateblue; font-size: 1.4rem\"></i>\n\t\t\t\t\t\t{{ file.name }} - {{ file.size }} bytes\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</ng-template>\n</p-fileUpload>\n", dependencies: [{ kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i2.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError"] }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] }); }
39
47
  }
40
48
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FileUploadComponent, decorators: [{
41
49
  type: Component,
42
- args: [{ standalone: true, selector: 'aril-file-upload', imports: [FileUploadModule], providers: [MessageService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-fileUpload\n\t[name]=\"name\"\n\t[url]=\"url\"\n\tmethod=\"post\"\n\t[multiple]=\"multiple\"\n\t[accept]=\"accept\"\n\t[disabled]=\"disabled\"\n\t[auto]=\"auto\"\n\t[maxFileSize]=\"maxFileSize\"\n\t[tabindex]=\"tabindex\"\n\t[withCredentials]=\"withCredentials\"\n\t[showUploadButton]=\"showUploadButton\"\n\t[showCancelButton]=\"showCancelButton\"\n\t[chooseLabel]=\"chooseLabel\"\n\t[cancelLabel]=\"cancelLabel\"\n\t[uploadLabel]=\"uploadLabel\"\n\t[invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary\"\n\t[invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail\"\n\t[invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary\"\n\t[invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail\"\n\t(onBeforeSend)=\"beforeSend.emit($event)\"\n\t(onUpload)=\"onUpload($event)\"\n\t(onError)=\"errors.emit($event)\"\n\t(onSelect)=\"selects.emit($event)\"\n\t(onClear)=\"clear.emit($event)\">\n\t<ng-template pTemplate=\"content\">\n\t\t@if (uploadedFiles.length) {\n\t\t\t<div class=\"flex flex-column\">\n\t\t\t\t@for (file of uploadedFiles; track file) {\n\t\t\t\t\t<div class=\"mt-2\">\n\t\t\t\t\t\t<i class=\"pi pi-file-excel\" style=\"color: slateblue; font-size: 1.4rem\"></i>\n\t\t\t\t\t\t{{ file.name }} - {{ file.size }} bytes\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</ng-template>\n\t<ng-content></ng-content>\n</p-fileUpload>\n" }]
43
- }], ctorParameters: () => [{ type: i1.MessageService }], propDecorators: { name: [{
44
- type: Input
45
- }], url: [{
46
- type: Input,
47
- args: [{ required: true }]
48
- }], multiple: [{
49
- type: Input
50
- }], accept: [{
51
- type: Input
52
- }], disabled: [{
53
- type: Input
54
- }], auto: [{
55
- type: Input
56
- }], maxFileSize: [{
57
- type: Input
58
- }], tabindex: [{
59
- type: Input
60
- }], withCredentials: [{
61
- type: Input
62
- }], showUploadButton: [{
63
- type: Input
64
- }], showCancelButton: [{
65
- type: Input
66
- }], cancelLabel: [{
67
- type: Input
68
- }], chooseLabel: [{
69
- type: Input
70
- }], uploadLabel: [{
71
- type: Input
72
- }], invalidFileTypeMessageSummary: [{
73
- type: Input
74
- }], invalidFileTypeMessageDetail: [{
75
- type: Input
76
- }], invalidFileSizeMessageSummary: [{
77
- type: Input
78
- }], invalidFileSizeMessageDetail: [{
79
- type: Input
80
- }], beforeSend: [{
50
+ args: [{ standalone: true, selector: 'aril-file-upload', imports: [FileUploadModule], providers: [MessageService], template: "<p-fileUpload\n\t[name]=\"name()\"\n\t[url]=\"url()\"\n\tmethod=\"post\"\n\t[multiple]=\"multiple()\"\n\t[accept]=\"accept()\"\n\t[disabled]=\"disabled()\"\n\t[auto]=\"auto()\"\n\t[maxFileSize]=\"maxFileSize()\"\n\t[tabindex]=\"tabindex\"\n\t[withCredentials]=\"withCredentials()\"\n\t[showUploadButton]=\"showUploadButton()\"\n\t[showCancelButton]=\"showCancelButton()\"\n\t[chooseLabel]=\"chooseLabel()\"\n\t[cancelLabel]=\"cancelLabel()\"\n\t[uploadLabel]=\"uploadLabel()\"\n\t[invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary()\"\n\t[invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail()\"\n\t[invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary()\"\n\t[invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail()\"\n\t(onBeforeSend)=\"beforeSend.emit($event)\"\n\t(onUpload)=\"onUpload($event)\"\n\t(onError)=\"onError($event)\"\n\t(onSelect)=\"selects.emit($event)\"\n\t(onClear)=\"clear.emit($event)\">\n\t<ng-template pTemplate=\"content\">\n\t\t@if (uploadedFiles.length) {\n\t\t\t<div class=\"flex flex-column\">\n\t\t\t\t@for (file of uploadedFiles; track file) {\n\t\t\t\t\t<div class=\"mt-2\">\n\t\t\t\t\t\t<i class=\"pi pi-file-excel\" style=\"color: slateblue; font-size: 1.4rem\"></i>\n\t\t\t\t\t\t{{ file.name }} - {{ file.size }} bytes\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</ng-template>\n</p-fileUpload>\n" }]
51
+ }], ctorParameters: () => [{ type: i1.MessageService }], propDecorators: { beforeSend: [{
81
52
  type: Output
82
53
  }], upload: [{
83
54
  type: Output
@@ -1 +1 @@
1
- {"version":3,"file":"aril-ui-fileUpload.mjs","sources":["../../projects/aril/ui/fileUpload/src/file-upload.component.ts","../../projects/aril/ui/fileUpload/src/file-upload.component.html","../../projects/aril/ui/fileUpload/aril-ui-fileUpload.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { HttpEvent } from '@angular/common/http';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { FileUploadModule } from 'primeng/fileupload';\nimport { MessageService } from 'primeng/api';\n\n/* TODO : \n 1. InputSignal\n*/\n\ninterface UploadEvent {\n\toriginalEvent: HttpEvent<any>;\n\tfiles: File[];\n}\n\ninterface UploadFile {\n\tname: string;\n\tsize: number;\n\ttype: string;\n\tobjectURL?: string;\n}\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-file-upload',\n\ttemplateUrl: './file-upload.component.html',\n\timports: [FileUploadModule],\n\tproviders: [MessageService],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FileUploadComponent {\n\tconstructor(private messageService: MessageService) {}\n\n\t@Input() name!: string;\n\t@Input({ required: true }) url!: string;\n\t@Input() multiple = false;\n\t@Input() accept = '.xlsx';\n\t@Input() disabled = false;\n\t@Input() auto = false;\n\t@Input() maxFileSize!: number;\n\t@Input() tabindex!: number;\n\t@Input() withCredentials = false;\n\t@Input() showUploadButton = true;\n\t@Input() showCancelButton = true;\n\t@Input() cancelLabel = 'Temizle';\n\t@Input() chooseLabel = 'Dosyayi Seç';\n\t@Input() uploadLabel = 'Dosyayi Yükle';\n\t@Input() invalidFileTypeMessageSummary = 'Geçersiz dosya türü';\n\t@Input() invalidFileTypeMessageDetail = 'Seçilen dosya türü desteklenmiyor.';\n\t@Input() invalidFileSizeMessageSummary = 'Dosya boyutu çok büyük';\n\t@Input() invalidFileSizeMessageDetail = 'Dosya boyutu izin verilen maksimum boyuttan daha büyük.';\n\n\t@Output() beforeSend: EventEmitter<unknown> = new EventEmitter();\n\t@Output() upload: EventEmitter<unknown> = new EventEmitter();\n\t@Output() errors: EventEmitter<unknown> = new EventEmitter();\n\t@Output() selects: EventEmitter<unknown> = new EventEmitter();\n\t@Output() clear: EventEmitter<unknown> = new EventEmitter();\n\n\tuploadedFiles: UploadFile[] = [];\n\n\tonUpload(event: UploadEvent) {\n\t\tthis.upload.emit(event);\n\t\tthis.uploadedFiles = event.files;\n\t\tthis.messageService.add({ severity: 'success', summary: 'Dosya başarıyla yüklendi..', detail: '' });\n\t}\n}\n","<p-fileUpload\n\t[name]=\"name\"\n\t[url]=\"url\"\n\tmethod=\"post\"\n\t[multiple]=\"multiple\"\n\t[accept]=\"accept\"\n\t[disabled]=\"disabled\"\n\t[auto]=\"auto\"\n\t[maxFileSize]=\"maxFileSize\"\n\t[tabindex]=\"tabindex\"\n\t[withCredentials]=\"withCredentials\"\n\t[showUploadButton]=\"showUploadButton\"\n\t[showCancelButton]=\"showCancelButton\"\n\t[chooseLabel]=\"chooseLabel\"\n\t[cancelLabel]=\"cancelLabel\"\n\t[uploadLabel]=\"uploadLabel\"\n\t[invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary\"\n\t[invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail\"\n\t[invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary\"\n\t[invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail\"\n\t(onBeforeSend)=\"beforeSend.emit($event)\"\n\t(onUpload)=\"onUpload($event)\"\n\t(onError)=\"errors.emit($event)\"\n\t(onSelect)=\"selects.emit($event)\"\n\t(onClear)=\"clear.emit($event)\">\n\t<ng-template pTemplate=\"content\">\n\t\t@if (uploadedFiles.length) {\n\t\t\t<div class=\"flex flex-column\">\n\t\t\t\t@for (file of uploadedFiles; track file) {\n\t\t\t\t\t<div class=\"mt-2\">\n\t\t\t\t\t\t<i class=\"pi pi-file-excel\" style=\"color: slateblue; font-size: 1.4rem\"></i>\n\t\t\t\t\t\t{{ file.name }} - {{ file.size }} bytes\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</ng-template>\n\t<ng-content></ng-content>\n</p-fileUpload>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAgCa,mBAAmB,CAAA;AAC/B,IAAA,WAAA,CAAoB,cAA8B,EAAA;QAA9B,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;QAIzC,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QACjB,IAAM,CAAA,MAAA,GAAG,OAAO,CAAC;QACjB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;QACjB,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;QAGb,IAAe,CAAA,eAAA,GAAG,KAAK,CAAC;QACxB,IAAgB,CAAA,gBAAA,GAAG,IAAI,CAAC;QACxB,IAAgB,CAAA,gBAAA,GAAG,IAAI,CAAC;QACxB,IAAW,CAAA,WAAA,GAAG,SAAS,CAAC;QACxB,IAAW,CAAA,WAAA,GAAG,aAAa,CAAC;QAC5B,IAAW,CAAA,WAAA,GAAG,eAAe,CAAC;QAC9B,IAA6B,CAAA,6BAAA,GAAG,qBAAqB,CAAC;QACtD,IAA4B,CAAA,4BAAA,GAAG,oCAAoC,CAAC;QACpE,IAA6B,CAAA,6BAAA,GAAG,wBAAwB,CAAC;QACzD,IAA4B,CAAA,4BAAA,GAAG,yDAAyD,CAAC;AAExF,QAAA,IAAA,C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;sBAAd,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,eAAe,EAAA,CAAA;sBAAvB,KAAK;gBACG,gBAAgB,EAAA,CAAA;sBAAxB,KAAK;gBACG,gBAAgB,EAAA,CAAA;sBAAxB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,6BAA6B,EAAA,CAAA;sBAArC,KAAK;gBACG,4BAA4B,EAAA,CAAA;sBAApC,KAAK;gBACG,6BAA6B,EAAA,CAAA;sBAArC,KAAK;gBACG,4BAA4B,EAAA,CAAA;sBAApC,KAAK;gBAEI,UAAU,EAAA,CAAA;sBAAnB,MAAM;gBACG,MAAM,EAAA,CAAA;sBAAf,MAAM;gBACG,MAAM,EAAA,CAAA;sBAAf,MAAM;gBACG,OAAO,EAAA,CAAA;sBAAhB,MAAM;gBACG,KAAK,EAAA,CAAA;sBAAd,MAAM;;;AE1DR;;AAEG;;;;"}
1
+ {"version":3,"file":"aril-ui-fileUpload.mjs","sources":["../../projects/aril/ui/fileUpload/src/file-upload.component.ts","../../projects/aril/ui/fileUpload/src/file-upload.component.html","../../projects/aril/ui/fileUpload/aril-ui-fileUpload.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { HttpEvent } from '@angular/common/http';\nimport { Component, EventEmitter, input, Output } from '@angular/core';\n\nimport { FileUploadModule } from 'primeng/fileupload';\nimport { MessageService } from 'primeng/api';\n\n/* TODO : \n 1. HostAttributeToken\n*/\n\ninterface UploadEvent {\n\toriginalEvent: HttpEvent<any>;\n\tfiles: File[];\n}\n\ninterface UploadFile {\n\tname: string;\n\tsize: number;\n\ttype: string;\n\tobjectURL?: string;\n}\n\ninterface FileUploadErrorEvent {\n\tfiles: File[];\n\terror: ErrorEvent;\n}\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-file-upload',\n\ttemplateUrl: './file-upload.component.html',\n\timports: [FileUploadModule],\n\tproviders: [MessageService]\n})\nexport class FileUploadComponent {\n\tconstructor(private messageService: MessageService) {}\n\n\tname = input<string>();\n\turl = input.required<string>();\n\tmultiple = input(false);\n\taccept = input<string>('.xlsx');\n\tdisabled = input(false);\n\tauto = input(false);\n\tmaxFileSize = input<number>();\n\ttabindex = input<number>();\n\twithCredentials = input(false);\n\tshowUploadButton = input(true);\n\tshowCancelButton = input(true);\n\tcancelLabel = input('Temizle');\n\tchooseLabel = input('Dosya Seç');\n\tuploadLabel = input('Dosya Yükle');\n\tinvalidFileTypeMessageSummary = input('Geçersiz dosya türü');\n\tinvalidFileTypeMessageDetail = input('Seçilen dosya türü desteklenmiyor.');\n\tinvalidFileSizeMessageSummary = input('Dosya boyutu çok büyük');\n\tinvalidFileSizeMessageDetail = input('Dosya boyutu izin verilen maksimum boyuttan daha büyük.');\n\n\t@Output() beforeSend: EventEmitter<unknown> = new EventEmitter();\n\t@Output() upload: EventEmitter<unknown> = new EventEmitter();\n\t@Output() errors: EventEmitter<unknown> = new EventEmitter();\n\t@Output() selects: EventEmitter<unknown> = new EventEmitter();\n\t@Output() clear: EventEmitter<unknown> = new EventEmitter();\n\n\tuploadedFiles: UploadFile[] = [];\n\n\tonUpload(event: UploadEvent) {\n\t\tthis.upload.emit(event);\n\t\tthis.uploadedFiles = event.files;\n\t\tthis.messageService.add({ key: 'toast-root', severity: 'success', summary: 'Dosya başarıyla yüklendi.' });\n\t}\n\n\tonError(event: any) {\n\t\tthis.errors.emit(event);\n\t\tthis.messageService.add({ key: 'toast-root', severity: 'error', summary: 'Dosya yüklenemedi.' });\n\t}\n}\n","<p-fileUpload\n\t[name]=\"name()\"\n\t[url]=\"url()\"\n\tmethod=\"post\"\n\t[multiple]=\"multiple()\"\n\t[accept]=\"accept()\"\n\t[disabled]=\"disabled()\"\n\t[auto]=\"auto()\"\n\t[maxFileSize]=\"maxFileSize()\"\n\t[tabindex]=\"tabindex\"\n\t[withCredentials]=\"withCredentials()\"\n\t[showUploadButton]=\"showUploadButton()\"\n\t[showCancelButton]=\"showCancelButton()\"\n\t[chooseLabel]=\"chooseLabel()\"\n\t[cancelLabel]=\"cancelLabel()\"\n\t[uploadLabel]=\"uploadLabel()\"\n\t[invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary()\"\n\t[invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail()\"\n\t[invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary()\"\n\t[invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail()\"\n\t(onBeforeSend)=\"beforeSend.emit($event)\"\n\t(onUpload)=\"onUpload($event)\"\n\t(onError)=\"onError($event)\"\n\t(onSelect)=\"selects.emit($event)\"\n\t(onClear)=\"clear.emit($event)\">\n\t<ng-template pTemplate=\"content\">\n\t\t@if (uploadedFiles.length) {\n\t\t\t<div class=\"flex flex-column\">\n\t\t\t\t@for (file of uploadedFiles; track file) {\n\t\t\t\t\t<div class=\"mt-2\">\n\t\t\t\t\t\t<i class=\"pi pi-file-excel\" style=\"color: slateblue; font-size: 1.4rem\"></i>\n\t\t\t\t\t\t{{ file.name }} - {{ file.size }} bytes\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</ng-template>\n</p-fileUpload>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAoCa,mBAAmB,CAAA;AAC/B,IAAA,WAAA,CAAoB,cAA8B,EAAA;QAA9B,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;QAElD,IAAI,CAAA,IAAA,GAAG,KAAK,EAAU,CAAC;AACvB,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;AA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 -1,22 +1,21 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output, NgModule } from '@angular/core';
2
+ import { input, Component, ChangeDetectionStrategy, EventEmitter, inject, Output, NgModule } from '@angular/core';
3
3
  import * as i1$1 from 'aril/ui/button';
4
4
  import { ButtonComponent } from 'aril/ui/button';
5
5
  import * as i1 from 'aril/ui/lib';
6
- import { FlexGridDirective, FormErrorMessageDirective } from 'aril/ui/lib';
7
- import { isFormControl, isFormGroup, isFormArray } from '@angular/forms';
6
+ import { FlexGridDirective, FormErrorMessageDirective, checkValidInputs } from 'aril/ui/lib';
7
+ import { MessageService } from 'primeng/api';
8
8
 
9
- /* TODO :
10
- 1. InputSignal
11
- */
12
9
  class FormComponent {
10
+ constructor() {
11
+ this.formGroup = input.required();
12
+ }
13
13
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: FormComponent, selector: "aril-form", inputs: { formGroup: "formGroup" }, hostDirectives: [{ directive: i1.FlexGridDirective }, { directive: i1.FormErrorMessageDirective, inputs: ["formErrorMessage", "formGroup"] }], ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: FormComponent, selector: "aril-form", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, hostDirectives: [{ directive: i1.FlexGridDirective }, { directive: i1.FormErrorMessageDirective, inputs: ["formErrorMessage", "formGroup"] }], ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15
15
  }
16
16
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormComponent, decorators: [{
17
17
  type: Component,
18
18
  args: [{
19
- // standalone: true,
20
19
  selector: 'aril-form',
21
20
  template: ` <ng-content></ng-content> `,
22
21
  hostDirectives: [
@@ -28,47 +27,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
28
27
  ],
29
28
  changeDetection: ChangeDetectionStrategy.OnPush
30
29
  }]
31
- }], propDecorators: { formGroup: [{
32
- type: Input,
33
- args: [{ required: true }]
34
- }] } });
30
+ }] });
35
31
 
36
- /* eslint-disable @typescript-eslint/no-unused-vars */
37
- /* eslint-disable @typescript-eslint/no-explicit-any */
38
- /* TODO :
39
- 1. InputSignal
40
- */
41
32
  class FormSubmitButtonComponent extends ButtonComponent {
42
33
  constructor() {
43
34
  super(...arguments);
35
+ this.formGroup = input.required();
36
+ this.validEvent = new EventEmitter();
44
37
  this.inValidEvent = new EventEmitter();
38
+ this.messageService = inject(MessageService);
45
39
  }
46
40
  submit() {
47
- this.markAsDirty(this.formGroup.controls);
48
- if (this.formGroup.valid)
49
- this.clickEvent.emit();
50
- else
41
+ checkValidInputs(this.formGroup());
42
+ if (this.formGroup().valid)
43
+ this.validEvent.emit();
44
+ else {
45
+ this.messageService.add({
46
+ key: 'toast-root',
47
+ severity: 'warn ',
48
+ summary: 'Form Hatası',
49
+ detail: 'Lütfen formdaki eksikleri gideriniz'
50
+ });
51
51
  this.inValidEvent.emit();
52
- }
53
- markAsDirty(controls) {
54
- Object.entries(controls).forEach(([key, ctrl]) => {
55
- if (isFormControl(ctrl)) {
56
- ctrl.markAsDirty();
57
- }
58
- else if (isFormGroup(ctrl) || isFormArray(ctrl)) {
59
- this.markAsDirty(ctrl.controls);
60
- }
61
- });
52
+ }
62
53
  }
63
54
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormSubmitButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
64
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: FormSubmitButtonComponent, selector: "aril-form-submit", inputs: { formGroup: "formGroup" }, outputs: { inValidEvent: "inValidEvent" }, usesInheritance: true, ngImport: i0, template: "<aril-button\n\t[label]=\"label\"\n\t[loading]=\"formGroup.pending\"\n\t[disabled]=\"disabled\"\n\t[raised]=\"raised\"\n\t[outlined]=\"outlined\"\n\t[badge]=\"badge\"\n\t[size]=\"size\"\n\t[icon]=\"icon\"\n\t[color]=\"color\"\n\t(clickEvent)=\"submit()\">\n</aril-button>\n", dependencies: [{ kind: "component", type: i1$1.ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
55
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.1.2", type: FormSubmitButtonComponent, selector: "aril-form-submit:not([click])", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { validEvent: "validEvent", inValidEvent: "inValidEvent" }, usesInheritance: true, ngImport: i0, template: "<aril-button\n\t[label]=\"label()\"\n\t[loading]=\"formGroup().pending\"\n\t[disabled]=\"disabled()\"\n\t[raised]=\"raised()\"\n\t[outlined]=\"outlined()\"\n\t[badge]=\"badge()\"\n\t[size]=\"size()\"\n\t[icon]=\"icon()\"\n\t[color]=\"color()\"\n\t(clickEvent)=\"submit()\">\n</aril-button>\n", dependencies: [{ kind: "component", type: i1$1.ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
65
56
  }
66
57
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormSubmitButtonComponent, decorators: [{
67
58
  type: Component,
68
- args: [{ selector: 'aril-form-submit', changeDetection: ChangeDetectionStrategy.OnPush, template: "<aril-button\n\t[label]=\"label\"\n\t[loading]=\"formGroup.pending\"\n\t[disabled]=\"disabled\"\n\t[raised]=\"raised\"\n\t[outlined]=\"outlined\"\n\t[badge]=\"badge\"\n\t[size]=\"size\"\n\t[icon]=\"icon\"\n\t[color]=\"color\"\n\t(clickEvent)=\"submit()\">\n</aril-button>\n" }]
69
- }], propDecorators: { formGroup: [{
70
- type: Input,
71
- args: [{ required: true }]
59
+ args: [{ selector: 'aril-form-submit:not([click])', changeDetection: ChangeDetectionStrategy.OnPush, template: "<aril-button\n\t[label]=\"label()\"\n\t[loading]=\"formGroup().pending\"\n\t[disabled]=\"disabled()\"\n\t[raised]=\"raised()\"\n\t[outlined]=\"outlined()\"\n\t[badge]=\"badge()\"\n\t[size]=\"size()\"\n\t[icon]=\"icon()\"\n\t[color]=\"color()\"\n\t(clickEvent)=\"submit()\">\n</aril-button>\n" }]
60
+ }], propDecorators: { validEvent: [{
61
+ type: Output
72
62
  }], inValidEvent: [{
73
63
  type: Output
74
64
  }] } });