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.
- package/esm2022/http/src/serviceBase.mjs +2 -3
- package/esm2022/i18n/aril-i18n.mjs +5 -0
- package/esm2022/i18n/index.mjs +6 -0
- package/esm2022/i18n/src/file-url-token.mjs +3 -0
- package/esm2022/i18n/src/i18n.module.mjs +17 -0
- package/esm2022/i18n/src/loader.mjs +20 -0
- package/esm2022/i18n/src/provideI18n.mjs +16 -0
- package/esm2022/i18n/src/provideScope.mjs +18 -0
- package/esm2022/ui/badge/src/badge.component.mjs +11 -17
- package/esm2022/ui/button/src/button.component.mjs +19 -34
- package/esm2022/ui/button/src/split-button.component.mjs +3 -3
- package/esm2022/ui/calendar/src/calendar.component.mjs +35 -56
- package/esm2022/ui/checkbox/src/check-box.component.mjs +7 -4
- package/esm2022/ui/checkbox/src/tri-state-checkbox.component.mjs +7 -4
- package/esm2022/ui/dxField/src/dx-field.component.mjs +9 -21
- package/esm2022/ui/field/src/field.component.mjs +19 -32
- package/esm2022/ui/fileUpload/src/file-upload.component.mjs +28 -57
- package/esm2022/ui/form/src/form-submit-button.component.mjs +22 -27
- package/esm2022/ui/form/src/form.component.mjs +7 -11
- package/esm2022/ui/lib/src/form/form-error-message.component.mjs +1 -5
- package/esm2022/ui/lib/src/form/form-error-message.directive.mjs +8 -12
- package/esm2022/ui/lib/src/input/input-disabled.directive.mjs +1 -5
- package/esm2022/ui/mask/src/mask.component.mjs +7 -4
- package/esm2022/ui/number/src/number.component.mjs +19 -40
- package/esm2022/ui/password/src/password.component.mjs +11 -16
- package/esm2022/ui/radioButton/src/radio-button.component.mjs +14 -21
- package/esm2022/ui/selectBox/src/select-box.component.mjs +12 -24
- package/esm2022/ui/switch/src/switch.component.mjs +6 -6
- package/esm2022/ui/table/src/table.component.mjs +2 -1
- package/esm2022/ui/tagBox/src/tag-box.component.mjs +12 -21
- package/esm2022/ui/text/src/text.component.mjs +24 -35
- package/esm2022/ui/textArea/src/text-area.component.mjs +11 -16
- package/esm2022/ui/tree/src/tree.component.mjs +3 -3
- package/esm2022/ui/value/src/value.component.mjs +26 -42
- package/esm2022/util/lib/index.mjs +2 -1
- package/esm2022/util/lib/src/module-router.mjs +16 -0
- package/fesm2022/aril-http.mjs +1 -2
- package/fesm2022/aril-http.mjs.map +1 -1
- package/fesm2022/aril-i18n.mjs +72 -0
- package/fesm2022/aril-i18n.mjs.map +1 -0
- package/fesm2022/aril-ui-badge.mjs +10 -16
- package/fesm2022/aril-ui-badge.mjs.map +1 -1
- package/fesm2022/aril-ui-button.mjs +21 -36
- package/fesm2022/aril-ui-button.mjs.map +1 -1
- package/fesm2022/aril-ui-calendar.mjs +34 -55
- package/fesm2022/aril-ui-calendar.mjs.map +1 -1
- package/fesm2022/aril-ui-checkbox.mjs +11 -5
- package/fesm2022/aril-ui-checkbox.mjs.map +1 -1
- package/fesm2022/aril-ui-dxField.mjs +8 -20
- package/fesm2022/aril-ui-dxField.mjs.map +1 -1
- package/fesm2022/aril-ui-field.mjs +18 -31
- package/fesm2022/aril-ui-field.mjs.map +1 -1
- package/fesm2022/aril-ui-fileUpload.mjs +27 -56
- package/fesm2022/aril-ui-fileUpload.mjs.map +1 -1
- package/fesm2022/aril-ui-form.mjs +26 -36
- package/fesm2022/aril-ui-form.mjs.map +1 -1
- package/fesm2022/aril-ui-lib.mjs +7 -19
- package/fesm2022/aril-ui-lib.mjs.map +1 -1
- package/fesm2022/aril-ui-mask.mjs +6 -3
- package/fesm2022/aril-ui-mask.mjs.map +1 -1
- package/fesm2022/aril-ui-number.mjs +18 -39
- package/fesm2022/aril-ui-number.mjs.map +1 -1
- package/fesm2022/aril-ui-password.mjs +10 -15
- package/fesm2022/aril-ui-password.mjs.map +1 -1
- package/fesm2022/aril-ui-radioButton.mjs +13 -20
- package/fesm2022/aril-ui-radioButton.mjs.map +1 -1
- package/fesm2022/aril-ui-selectBox.mjs +11 -23
- package/fesm2022/aril-ui-selectBox.mjs.map +1 -1
- package/fesm2022/aril-ui-switch.mjs +5 -5
- package/fesm2022/aril-ui-switch.mjs.map +1 -1
- package/fesm2022/aril-ui-table.mjs +1 -0
- package/fesm2022/aril-ui-table.mjs.map +1 -1
- package/fesm2022/aril-ui-tagBox.mjs +11 -20
- package/fesm2022/aril-ui-tagBox.mjs.map +1 -1
- package/fesm2022/aril-ui-text.mjs +23 -34
- package/fesm2022/aril-ui-text.mjs.map +1 -1
- package/fesm2022/aril-ui-textArea.mjs +10 -15
- package/fesm2022/aril-ui-textArea.mjs.map +1 -1
- package/fesm2022/aril-ui-tree.mjs +2 -2
- package/fesm2022/aril-ui-tree.mjs.map +1 -1
- package/fesm2022/aril-ui-value.mjs +25 -41
- package/fesm2022/aril-ui-value.mjs.map +1 -1
- package/fesm2022/aril-util-lib.mjs +19 -0
- package/fesm2022/aril-util-lib.mjs.map +1 -1
- package/i18n/index.d.ts +5 -0
- package/i18n/src/file-url-token.d.ts +2 -0
- package/i18n/src/i18n.module.d.ts +7 -0
- package/i18n/src/loader.d.ts +9 -0
- package/i18n/src/provideI18n.d.ts +2 -0
- package/i18n/src/provideScope.d.ts +9 -0
- package/package.json +13 -7
- package/ui/badge/src/badge.component.d.ts +5 -5
- package/ui/button/src/button.component.d.ts +16 -19
- package/ui/calendar/src/calendar.component.d.ts +17 -20
- package/ui/dxField/src/dx-field.component.d.ts +5 -7
- package/ui/field/src/field.component.d.ts +9 -10
- package/ui/fileUpload/src/file-upload.component.d.ts +20 -19
- package/ui/form/src/form-submit-button.component.d.ts +5 -5
- package/ui/form/src/form.component.d.ts +2 -2
- package/ui/lib/src/form/form-error-message.directive.d.ts +2 -2
- package/ui/number/src/number.component.d.ts +19 -16
- package/ui/password/src/password.component.d.ts +5 -5
- package/ui/radioButton/src/radio-button.component.d.ts +8 -6
- package/ui/selectBox/src/select-box.component.d.ts +8 -8
- package/ui/tagBox/src/tag-box.component.d.ts +6 -6
- package/ui/text/src/text.component.d.ts +9 -9
- package/ui/textArea/src/text-area.component.d.ts +5 -5
- package/ui/value/src/value.component.d.ts +7 -9
- package/util/lib/index.d.ts +1 -0
- 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
|
|
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" }]
|
|
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],
|
|
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" }]
|
|
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],
|
|
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 {
|
|
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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3"],"mappings":";;;;;;;;;;;;;AAQA;;AAEE;AASI,MAAO,iBAAkB,SAAQ,kBAAkB,CAAA;AAPzD,IAAA,WAAA,GAAA;;AAQC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;QACjC,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAU,CAAC;AAC3B,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AAA,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
|
|
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.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
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: "
|
|
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
|
-
}]
|
|
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,
|
|
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,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;;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,gSAAA,EAAA,CAAA;;;AERhD;;AAEG;;;;"}
|
|
@@ -1,47 +1,34 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy,
|
|
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.
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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",
|
|
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 === '
|
|
26
|
-
}], propDecorators: {
|
|
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,
|
|
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,CAAC,MAAK;AACX,YAAA,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE;gBAChB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,I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A;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,
|
|
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.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
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
|
|
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)=\"
|
|
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],
|
|
43
|
-
}], ctorParameters: () => [{ type: i1.MessageService }], propDecorators: {
|
|
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 {
|
|
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;AAC/B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;AACxB,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAS,OAAO,CAAC,CAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;AACxB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QACpB,IAAW,CAAA,WAAA,GAAG,KAAK,EAAU,CAAC;QAC9B,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAU,CAAC;AAC3B,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;AAC/B,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;AAC/B,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;AAC/B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAC/B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,CA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,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGd,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;iCACG,IAAI,EAAA,QAAA,EACN,kBAAkB,EAEnB,OAAA,EAAA,CAAC,gBAAgB,CAAC,EAAA,SAAA,EAChB,CAAC,cAAc,CAAC,EAAA,QAAA,EAAA,m2CAAA,EAAA,CAAA;mFAwBjB,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;;;AE9DR;;AAEG;;;;"}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy,
|
|
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 {
|
|
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
|
+
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
|
-
}]
|
|
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
|
-
|
|
48
|
-
if (this.formGroup.valid)
|
|
49
|
-
this.
|
|
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: "
|
|
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: {
|
|
70
|
-
type:
|
|
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
|
}] } });
|