aril 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -7
- package/esm2022/http/index.mjs +5 -1
- package/esm2022/http/lib/enums.mjs +1 -2
- package/esm2022/http/lib/interfaces.mjs +3 -1
- package/esm2022/http/src/httpClient.mjs +2 -1
- package/esm2022/http/src/serviceBase.mjs +10 -10
- package/esm2022/ui/badge/aril-ui-badge.mjs +5 -0
- package/esm2022/ui/badge/index.mjs +2 -0
- package/esm2022/ui/badge/src/badge.component.mjs +25 -0
- package/esm2022/ui/button/index.mjs +2 -1
- package/esm2022/ui/button/src/button.component.mjs +45 -7
- package/esm2022/ui/button/src/split-button.component.mjs +17 -0
- package/esm2022/ui/calendar/src/calendar.component.mjs +80 -8
- package/esm2022/ui/checkbox/index.mjs +2 -2
- package/esm2022/ui/checkbox/src/check-box.component.mjs +26 -0
- package/esm2022/ui/confirmPopup/aril-ui-confirmPopup.mjs +5 -0
- package/esm2022/ui/confirmPopup/index.mjs +2 -0
- package/esm2022/ui/confirmPopup/src/confirm-popup.component.mjs +40 -0
- package/esm2022/ui/dialog/aril-ui-dialog.mjs +5 -0
- package/esm2022/ui/dialog/index.mjs +2 -0
- package/esm2022/ui/dialog/src/dialog.component.mjs +56 -0
- package/esm2022/ui/dxField/aril-ui-dxField.mjs +5 -0
- package/esm2022/ui/dxField/index.mjs +2 -0
- package/esm2022/ui/dxField/src/dx-field.component.mjs +27 -0
- package/esm2022/ui/field/aril-ui-field.mjs +5 -0
- package/esm2022/ui/field/index.mjs +2 -0
- package/esm2022/ui/field/src/field.component.mjs +48 -0
- package/esm2022/ui/fileUpload/aril-ui-fileUpload.mjs +5 -0
- package/esm2022/ui/fileUpload/index.mjs +2 -0
- package/esm2022/ui/fileUpload/src/file-upload.component.mjs +85 -0
- package/esm2022/ui/form/aril-ui-form.mjs +5 -0
- package/esm2022/ui/form/index.mjs +3 -0
- package/esm2022/ui/form/src/form-submit-button.component.mjs +41 -0
- package/esm2022/ui/form/src/form.component.mjs +28 -0
- package/esm2022/ui/lib/index.mjs +13 -3
- package/esm2022/ui/lib/src/form/form-error-message.component.mjs +33 -0
- package/esm2022/ui/lib/src/form/form-error-message.directive.mjs +35 -0
- package/esm2022/ui/lib/src/grid/flex-grid.directive.mjs +21 -0
- package/esm2022/ui/lib/src/input/baseInput.mjs +24 -0
- package/esm2022/ui/lib/src/input/common-input-validators.service.mjs +3 -3
- package/esm2022/ui/lib/src/input/dx-input-error-message.pipe.mjs +22 -0
- package/esm2022/ui/lib/src/input/input-disabled.directive.mjs +3 -3
- package/esm2022/ui/lib/src/input/input-error-message.pipe.mjs +41 -0
- package/esm2022/ui/lib/src/input/input-transforms.mjs +8 -0
- package/esm2022/ui/lib/src/input/value-accessor.directive.mjs +32 -0
- package/esm2022/ui/mask/aril-ui-mask.mjs +5 -0
- package/esm2022/ui/mask/index.mjs +2 -0
- package/esm2022/ui/mask/src/mask.component.mjs +44 -0
- package/esm2022/ui/number/aril-ui-number.mjs +5 -0
- package/esm2022/ui/number/index.mjs +2 -0
- package/esm2022/ui/number/src/number.component.mjs +58 -0
- package/esm2022/ui/overlayPanel/aril-ui-overlayPanel.mjs +5 -0
- package/esm2022/ui/overlayPanel/index.mjs +2 -0
- package/esm2022/ui/overlayPanel/src/overlay-panel.component.mjs +37 -0
- package/esm2022/ui/panel/aril-ui-panel.mjs +5 -0
- package/esm2022/ui/panel/index.mjs +2 -0
- package/esm2022/ui/panel/src/panel.component.mjs +32 -0
- package/esm2022/ui/password/aril-ui-password.mjs +5 -0
- package/esm2022/ui/password/index.mjs +2 -0
- package/esm2022/ui/password/src/password.component.mjs +32 -0
- package/esm2022/ui/radioButton/aril-ui-radioButton.mjs +5 -0
- package/esm2022/ui/radioButton/index.mjs +2 -0
- package/esm2022/ui/radioButton/src/radio-button.component.mjs +35 -0
- package/esm2022/ui/selectBox/aril-ui-selectBox.mjs +5 -0
- package/esm2022/ui/selectBox/index.mjs +2 -0
- package/esm2022/ui/selectBox/src/select-box.component.mjs +41 -0
- package/esm2022/ui/switch/aril-ui-switch.mjs +5 -0
- package/esm2022/ui/switch/index.mjs +2 -0
- package/esm2022/ui/switch/src/switch.component.mjs +19 -0
- package/esm2022/ui/tagBox/aril-ui-tagBox.mjs +5 -0
- package/esm2022/ui/tagBox/index.mjs +2 -0
- package/esm2022/ui/tagBox/src/tag-box.component.mjs +58 -0
- package/esm2022/ui/text/aril-ui-text.mjs +5 -0
- package/esm2022/ui/text/index.mjs +2 -0
- package/esm2022/ui/text/src/text.component.mjs +37 -0
- package/esm2022/ui/textArea/aril-ui-textArea.mjs +5 -0
- package/esm2022/ui/textArea/index.mjs +2 -0
- package/esm2022/ui/textArea/src/text-area.component.mjs +27 -0
- package/esm2022/ui/tree/aril-ui-tree.mjs +5 -0
- package/esm2022/ui/tree/index.mjs +2 -0
- package/esm2022/ui/tree/src/tree.component.mjs +67 -0
- package/esm2022/ui/treeTable/aril-ui-treeTable.mjs +5 -0
- package/esm2022/ui/treeTable/index.mjs +2 -0
- package/esm2022/ui/treeTable/src/tree-table.component.mjs +52 -0
- package/esm2022/util/init-event/src/init-event.directive.mjs +8 -8
- package/esm2022/util/lib/src/interfaces.mjs +3 -1
- package/esm2022/util/lib/src/types.mjs +4 -1
- package/esm2022/util/pub-sub/src/pub-sub.service.mjs +5 -4
- package/fesm2022/aril-http.mjs +49 -45
- package/fesm2022/aril-http.mjs.map +1 -1
- package/fesm2022/aril-ui-badge.mjs +32 -0
- package/fesm2022/aril-ui-badge.mjs.map +1 -0
- package/fesm2022/aril-ui-button.mjs +59 -7
- package/fesm2022/aril-ui-button.mjs.map +1 -1
- package/fesm2022/aril-ui-calendar.mjs +78 -7
- package/fesm2022/aril-ui-calendar.mjs.map +1 -1
- package/fesm2022/aril-ui-checkbox.mjs +22 -7
- package/fesm2022/aril-ui-checkbox.mjs.map +1 -1
- package/fesm2022/aril-ui-confirmPopup.mjs +47 -0
- package/fesm2022/aril-ui-confirmPopup.mjs.map +1 -0
- package/fesm2022/aril-ui-dialog.mjs +63 -0
- package/fesm2022/aril-ui-dialog.mjs.map +1 -0
- package/fesm2022/aril-ui-dxField.mjs +34 -0
- package/fesm2022/aril-ui-dxField.mjs.map +1 -0
- package/fesm2022/aril-ui-field.mjs +55 -0
- package/fesm2022/aril-ui-field.mjs.map +1 -0
- package/fesm2022/aril-ui-fileUpload.mjs +92 -0
- package/fesm2022/aril-ui-fileUpload.mjs.map +1 -0
- package/fesm2022/aril-ui-form.mjs +74 -0
- package/fesm2022/aril-ui-form.mjs.map +1 -0
- package/fesm2022/aril-ui-lib.mjs +252 -51
- package/fesm2022/aril-ui-lib.mjs.map +1 -1
- package/fesm2022/aril-ui-mask.mjs +51 -0
- package/fesm2022/aril-ui-mask.mjs.map +1 -0
- package/fesm2022/aril-ui-number.mjs +65 -0
- package/fesm2022/aril-ui-number.mjs.map +1 -0
- package/fesm2022/aril-ui-overlayPanel.mjs +44 -0
- package/fesm2022/aril-ui-overlayPanel.mjs.map +1 -0
- package/fesm2022/aril-ui-panel.mjs +39 -0
- package/fesm2022/aril-ui-panel.mjs.map +1 -0
- package/fesm2022/aril-ui-password.mjs +39 -0
- package/fesm2022/aril-ui-password.mjs.map +1 -0
- package/fesm2022/aril-ui-radioButton.mjs +42 -0
- package/fesm2022/aril-ui-radioButton.mjs.map +1 -0
- package/fesm2022/aril-ui-selectBox.mjs +48 -0
- package/fesm2022/aril-ui-selectBox.mjs.map +1 -0
- package/fesm2022/aril-ui-switch.mjs +26 -0
- package/fesm2022/aril-ui-switch.mjs.map +1 -0
- package/fesm2022/aril-ui-tagBox.mjs +65 -0
- package/fesm2022/aril-ui-tagBox.mjs.map +1 -0
- package/fesm2022/aril-ui-text.mjs +44 -0
- package/fesm2022/aril-ui-text.mjs.map +1 -0
- package/fesm2022/aril-ui-textArea.mjs +34 -0
- package/fesm2022/aril-ui-textArea.mjs.map +1 -0
- package/fesm2022/aril-ui-tree.mjs +74 -0
- package/fesm2022/aril-ui-tree.mjs.map +1 -0
- package/fesm2022/aril-ui-treeTable.mjs +59 -0
- package/fesm2022/aril-ui-treeTable.mjs.map +1 -0
- package/fesm2022/aril-util-init-event.mjs +7 -7
- package/fesm2022/aril-util-init-event.mjs.map +1 -1
- package/fesm2022/aril-util-lib.mjs +7 -0
- package/fesm2022/aril-util-lib.mjs.map +1 -1
- package/fesm2022/aril-util-pub-sub.mjs +4 -3
- package/fesm2022/aril-util-pub-sub.mjs.map +1 -1
- package/http/index.d.ts +2 -0
- package/http/lib/enums.d.ts +2 -2
- package/package.json +138 -12
- package/styles/ui/ui.styles.css +8 -0
- package/ui/badge/index.d.ts +1 -0
- package/ui/badge/src/badge.component.d.ts +11 -0
- package/ui/button/index.d.ts +1 -0
- package/ui/button/src/button.component.d.ts +21 -2
- package/ui/button/src/split-button.component.d.ts +8 -0
- package/ui/calendar/src/calendar.component.d.ts +26 -2
- package/ui/checkbox/index.d.ts +1 -1
- package/ui/checkbox/src/check-box.component.d.ts +8 -0
- package/ui/confirmPopup/index.d.ts +1 -0
- package/ui/confirmPopup/src/confirm-popup.component.d.ts +15 -0
- package/ui/dialog/index.d.ts +1 -0
- package/ui/dialog/src/dialog.component.d.ts +20 -0
- package/ui/dxField/index.d.ts +1 -0
- package/ui/dxField/src/dx-field.component.d.ts +11 -0
- package/ui/field/index.d.ts +1 -0
- package/ui/field/src/field.component.d.ts +24 -0
- package/ui/fileUpload/index.d.ts +1 -0
- package/ui/fileUpload/src/file-upload.component.d.ts +44 -0
- package/ui/form/index.d.ts +2 -0
- package/ui/form/src/form-submit-button.component.d.ts +14 -0
- package/ui/form/src/form.component.d.ts +8 -0
- package/ui/lib/index.d.ts +9 -2
- package/ui/lib/src/form/form-error-message.component.d.ts +9 -0
- package/ui/lib/src/form/form-error-message.directive.d.ts +14 -0
- package/ui/lib/src/grid/flex-grid.directive.d.ts +6 -0
- package/ui/lib/src/input/baseInput.d.ts +7 -0
- package/ui/lib/src/input/dx-input-error-message.pipe.d.ts +11 -0
- package/ui/lib/src/input/input-error-message.pipe.d.ts +7 -0
- package/ui/lib/src/input/input-transforms.d.ts +5 -0
- package/ui/lib/src/input/value-accessor.directive.d.ts +9 -0
- package/ui/mask/index.d.ts +1 -0
- package/ui/mask/src/mask.component.d.ts +21 -0
- package/ui/number/index.d.ts +1 -0
- package/ui/number/src/number.component.d.ts +23 -0
- package/ui/overlayPanel/index.d.ts +1 -0
- package/ui/overlayPanel/src/overlay-panel.component.d.ts +15 -0
- package/ui/panel/index.d.ts +1 -0
- package/ui/panel/src/panel.component.d.ts +12 -0
- package/ui/password/index.d.ts +1 -0
- package/ui/password/src/password.component.d.ts +10 -0
- package/ui/radioButton/index.d.ts +1 -0
- package/ui/radioButton/src/radio-button.component.d.ts +17 -0
- package/ui/selectBox/index.d.ts +1 -0
- package/ui/selectBox/src/select-box.component.d.ts +18 -0
- package/ui/switch/index.d.ts +1 -0
- package/ui/switch/src/switch.component.d.ts +7 -0
- package/ui/tagBox/index.d.ts +1 -0
- package/ui/tagBox/src/tag-box.component.d.ts +14 -0
- package/ui/text/index.d.ts +1 -0
- package/ui/text/src/text.component.d.ts +15 -0
- package/ui/textArea/index.d.ts +1 -0
- package/ui/textArea/src/text-area.component.d.ts +11 -0
- package/ui/tree/index.d.ts +1 -0
- package/ui/tree/src/tree.component.d.ts +29 -0
- package/ui/treeTable/index.d.ts +1 -0
- package/ui/treeTable/src/tree-table.component.d.ts +23 -0
- package/util/init-event/src/init-event.directive.d.ts +4 -4
- package/esm2022/ui/checkbox/src/checkbox.component.mjs +0 -11
- package/ui/checkbox/src/checkbox.component.d.ts +0 -5
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output } from '@angular/core';
|
|
3
|
+
import * as i1 from 'primeng/dialog';
|
|
4
|
+
import { DialogModule } from 'primeng/dialog';
|
|
5
|
+
|
|
6
|
+
/* TODO : REFACTOR */
|
|
7
|
+
class DialogComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.visible = false;
|
|
10
|
+
this.header = '';
|
|
11
|
+
this.draggable = false;
|
|
12
|
+
this.resizable = false;
|
|
13
|
+
this.closable = true;
|
|
14
|
+
this.maximizable = false;
|
|
15
|
+
this.dismissableMask = false;
|
|
16
|
+
this.modal = false;
|
|
17
|
+
this.isVisible = false;
|
|
18
|
+
this.transitionOptions = '150ms cubic-bezier(0, 0, 0.2, 1)';
|
|
19
|
+
this.showEvent = new EventEmitter();
|
|
20
|
+
this.hideEvent = new EventEmitter();
|
|
21
|
+
}
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: DialogComponent, isStandalone: true, selector: "aril-dialog", inputs: { visible: "visible", header: "header", draggable: "draggable", resizable: "resizable", contentStyleClass: "contentStyleClass", closable: "closable", maximizable: "maximizable", dismissableMask: "dismissableMask", modal: "modal", style: "style", isVisible: "isVisible", transitionOptions: "transitionOptions" }, outputs: { showEvent: "showEvent", hideEvent: "hideEvent" }, ngImport: i0, template: "<p-dialog\r\n\t[(visible)]=\"visible\"\r\n\t[modal]=\"modal\"\r\n\t[header]=\"header\"\r\n\t[closable]=\"closable\"\r\n\t[maximizable]=\"maximizable\"\r\n\t[contentStyleClass]=\"contentStyleClass\"\r\n\t[draggable]=\"draggable\"\r\n\t[resizable]=\"resizable\"\r\n\t[dismissableMask]=\"dismissableMask\"\r\n\t[transitionOptions]=\"transitionOptions\"\r\n\t[style]=\"{ width: '60vw' }\"\r\n\t(onShow)=\"showEvent.emit()\"\r\n\t(onHide)=\"hideEvent.emit()\">\r\n\t<ng-content> </ng-content>\r\n\t<!-- <ng-template pTemplate=\"footer\">\r\n\t\t<p-button\r\n\t\t\ticon=\"pi pi-check\"\r\n\t\t\t(click)=\"visible = false\"\r\n\t\t\tlabel=\"Tamam\"\r\n\t\t\tstyleClass=\"p-button-text\"></p-button>\r\n\t</ng-template> -->\r\n</p-dialog>\r\n", dependencies: [{ kind: "ngmodule", type: DialogModule }, { kind: "component", type: i1.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "visible", "style", "position"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24
|
+
}
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: DialogComponent, decorators: [{
|
|
26
|
+
type: Component,
|
|
27
|
+
args: [{ standalone: true, selector: 'aril-dialog', imports: [DialogModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-dialog\r\n\t[(visible)]=\"visible\"\r\n\t[modal]=\"modal\"\r\n\t[header]=\"header\"\r\n\t[closable]=\"closable\"\r\n\t[maximizable]=\"maximizable\"\r\n\t[contentStyleClass]=\"contentStyleClass\"\r\n\t[draggable]=\"draggable\"\r\n\t[resizable]=\"resizable\"\r\n\t[dismissableMask]=\"dismissableMask\"\r\n\t[transitionOptions]=\"transitionOptions\"\r\n\t[style]=\"{ width: '60vw' }\"\r\n\t(onShow)=\"showEvent.emit()\"\r\n\t(onHide)=\"hideEvent.emit()\">\r\n\t<ng-content> </ng-content>\r\n\t<!-- <ng-template pTemplate=\"footer\">\r\n\t\t<p-button\r\n\t\t\ticon=\"pi pi-check\"\r\n\t\t\t(click)=\"visible = false\"\r\n\t\t\tlabel=\"Tamam\"\r\n\t\t\tstyleClass=\"p-button-text\"></p-button>\r\n\t</ng-template> -->\r\n</p-dialog>\r\n" }]
|
|
28
|
+
}], propDecorators: { visible: [{
|
|
29
|
+
type: Input
|
|
30
|
+
}], header: [{
|
|
31
|
+
type: Input
|
|
32
|
+
}], draggable: [{
|
|
33
|
+
type: Input
|
|
34
|
+
}], resizable: [{
|
|
35
|
+
type: Input
|
|
36
|
+
}], contentStyleClass: [{
|
|
37
|
+
type: Input
|
|
38
|
+
}], closable: [{
|
|
39
|
+
type: Input
|
|
40
|
+
}], maximizable: [{
|
|
41
|
+
type: Input
|
|
42
|
+
}], dismissableMask: [{
|
|
43
|
+
type: Input
|
|
44
|
+
}], modal: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}], style: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}], isVisible: [{
|
|
49
|
+
type: Input
|
|
50
|
+
}], transitionOptions: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}], showEvent: [{
|
|
53
|
+
type: Output
|
|
54
|
+
}], hideEvent: [{
|
|
55
|
+
type: Output
|
|
56
|
+
}] } });
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Generated bundle index. Do not edit.
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
export { DialogComponent };
|
|
63
|
+
//# sourceMappingURL=aril-ui-dialog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aril-ui-dialog.mjs","sources":["../../projects/aril/ui/dialog/src/dialog.component.ts","../../projects/aril/ui/dialog/src/dialog.component.html","../../projects/aril/ui/dialog/aril-ui-dialog.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport { DialogModule } from 'primeng/dialog';\r\n\r\n/* TODO : REFACTOR */\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'aril-dialog',\r\n templateUrl: './dialog.component.html',\r\n imports: [DialogModule],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class DialogComponent {\r\n @Input() visible = false;\r\n @Input() header = '';\r\n @Input() draggable = false;\r\n @Input() resizable = false;\r\n @Input() contentStyleClass: string | undefined;\r\n @Input() closable = true;\r\n @Input() maximizable = false;\r\n @Input() dismissableMask = false;\r\n @Input() modal = false;\r\n @Input() style!: object;\r\n @Input() isVisible = false;\r\n @Input() transitionOptions = '150ms cubic-bezier(0, 0, 0.2, 1)';\r\n\r\n @Output() showEvent: EventEmitter<void> = new EventEmitter();\r\n @Output() hideEvent: EventEmitter<void> = new EventEmitter();\r\n}\r\n","<p-dialog\r\n\t[(visible)]=\"visible\"\r\n\t[modal]=\"modal\"\r\n\t[header]=\"header\"\r\n\t[closable]=\"closable\"\r\n\t[maximizable]=\"maximizable\"\r\n\t[contentStyleClass]=\"contentStyleClass\"\r\n\t[draggable]=\"draggable\"\r\n\t[resizable]=\"resizable\"\r\n\t[dismissableMask]=\"dismissableMask\"\r\n\t[transitionOptions]=\"transitionOptions\"\r\n\t[style]=\"{ width: '60vw' }\"\r\n\t(onShow)=\"showEvent.emit()\"\r\n\t(onHide)=\"hideEvent.emit()\">\r\n\t<ng-content> </ng-content>\r\n\t<!-- <ng-template pTemplate=\"footer\">\r\n\t\t<p-button\r\n\t\t\ticon=\"pi pi-check\"\r\n\t\t\t(click)=\"visible = false\"\r\n\t\t\tlabel=\"Tamam\"\r\n\t\t\tstyleClass=\"p-button-text\"></p-button>\r\n\t</ng-template> -->\r\n</p-dialog>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;MASa,eAAe,CAAA;AAP5B,IAAA,WAAA,GAAA;QAQW,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;QAChB,IAAM,CAAA,MAAA,GAAG,EAAE,CAAC;QACZ,IAAS,CAA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;sBAAb,KAAK;gBACG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,iBAAiB,EAAA,CAAA;sBAAzB,KAAK;gBAEI,SAAS,EAAA,CAAA;sBAAlB,MAAM;gBACG,SAAS,EAAA,CAAA;sBAAlB,MAAM;;;AE3BT;;AAEG;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { NgStyle } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
4
|
+
|
|
5
|
+
class DxFieldComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.color = '#333';
|
|
8
|
+
this.labelWidth = 30;
|
|
9
|
+
this.valueWidth = 70;
|
|
10
|
+
}
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: DxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12
|
+
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\">\r\n\t<div\r\n\t\tclass=\"dx-field-label font-bold\"\r\n\t\t[ngStyle]=\"{ color: color, width: labelWidth }\">\r\n\t\t{{ label }}\r\n\t</div>\r\n\t<div class=\"dx-field-value\" [ngStyle]=\"{ width: valueWidth }\">\r\n\t\t<ng-content></ng-content>\r\n\t</div>\r\n</div>\r\n`\r\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13
|
+
}
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: DxFieldComponent, decorators: [{
|
|
15
|
+
type: Component,
|
|
16
|
+
args: [{ standalone: true, selector: 'aril-dx-field', imports: [NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dx-field\">\r\n\t<div\r\n\t\tclass=\"dx-field-label font-bold\"\r\n\t\t[ngStyle]=\"{ color: color, width: labelWidth }\">\r\n\t\t{{ label }}\r\n\t</div>\r\n\t<div class=\"dx-field-value\" [ngStyle]=\"{ width: valueWidth }\">\r\n\t\t<ng-content></ng-content>\r\n\t</div>\r\n</div>\r\n`\r\n" }]
|
|
17
|
+
}], propDecorators: { label: [{
|
|
18
|
+
type: Input
|
|
19
|
+
}], color: [{
|
|
20
|
+
type: Input
|
|
21
|
+
}], labelWidth: [{
|
|
22
|
+
type: Input,
|
|
23
|
+
args: [{ transform: (value) => value + "%" }]
|
|
24
|
+
}], valueWidth: [{
|
|
25
|
+
type: Input,
|
|
26
|
+
args: [{ transform: (value) => value + "%" }]
|
|
27
|
+
}] } });
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Generated bundle index. Do not edit.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
export { DxFieldComponent };
|
|
34
|
+
//# sourceMappingURL=aril-ui-dxField.mjs.map
|
|
@@ -0,0 +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';\r\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'aril-dx-field',\r\n templateUrl: './dx-field.component.html',\r\n imports: [NgStyle],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class DxFieldComponent {\r\n @Input() label!: string;\r\n @Input() color = '#333';\r\n @Input({ transform: (value: number) => value + \"%\" }) labelWidth = 30;\r\n @Input({ transform: (value: number) => value + \"%\" }) valueWidth = 70;\r\n}\r\n","<div class=\"dx-field\">\r\n\t<div\r\n\t\tclass=\"dx-field-label font-bold\"\r\n\t\t[ngStyle]=\"{ color: color, width: labelWidth }\">\r\n\t\t{{ label }}\r\n\t</div>\r\n\t<div class=\"dx-field-value\" [ngStyle]=\"{ width: valueWidth }\">\r\n\t\t<ng-content></ng-content>\r\n\t</div>\r\n</div>\r\n`\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAUa,gBAAgB,CAAA;AAP7B,IAAA,WAAA,GAAA;QASW,IAAK,CAAA,KAAA,GAAG,MAAM,CAAC;QAC8B,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;QAChB,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;AACvE,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,EAGP,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,ECdpD,+SAWA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDJY,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;;2FAGN,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;iCACI,IAAI,EAAA,QAAA,EACN,eAAe,EAEhB,OAAA,EAAA,CAAC,OAAO,CAAC,EAAA,eAAA,EACD,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,+SAAA,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;;;AEdtD;;AAEG;;;;"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, HostBinding } from '@angular/core';
|
|
3
|
+
import { DxFieldComponent } from 'aril/ui/dxField';
|
|
4
|
+
|
|
5
|
+
class FieldComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.labelPos = "top";
|
|
8
|
+
this.color = '#333';
|
|
9
|
+
this.labelWidth = 30;
|
|
10
|
+
this.valueWidth = 70;
|
|
11
|
+
this.hostClass = '';
|
|
12
|
+
this.padding = '.5rem';
|
|
13
|
+
}
|
|
14
|
+
set cols(value) {
|
|
15
|
+
this.hostClass = "";
|
|
16
|
+
Object.entries(value).forEach(([key, value]) => { this.hostClass += `${key}:col-${value} `; });
|
|
17
|
+
}
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19
|
+
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\n\t\t[label]=\"label\"\n\t\t[color]=\"color\"\n\t\t[labelWidth]=\"labelWidth\"\n\t\t[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 }); }
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FieldComponent, decorators: [{
|
|
22
|
+
type: Component,
|
|
23
|
+
args: [{ standalone: true, selector: 'aril-field', imports: [DxFieldComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (labelPos === 'left') {\n\t<aril-dx-field\n\t\t[label]=\"label\"\n\t\t[color]=\"color\"\n\t\t[labelWidth]=\"labelWidth\"\n\t\t[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" }]
|
|
24
|
+
}], propDecorators: { label: [{
|
|
25
|
+
type: Input,
|
|
26
|
+
args: [{ required: true }]
|
|
27
|
+
}], labelPos: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}], color: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], labelWidth: [{
|
|
32
|
+
type: Input,
|
|
33
|
+
args: [{ transform: (value) => value + "%" }]
|
|
34
|
+
}], valueWidth: [{
|
|
35
|
+
type: Input,
|
|
36
|
+
args: [{ transform: (value) => value + "%" }]
|
|
37
|
+
}], markAsRequired: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], cols: [{
|
|
40
|
+
type: Input,
|
|
41
|
+
args: [{ required: true }]
|
|
42
|
+
}], hostClass: [{
|
|
43
|
+
type: HostBinding,
|
|
44
|
+
args: ['class']
|
|
45
|
+
}], padding: [{
|
|
46
|
+
type: HostBinding,
|
|
47
|
+
args: ['style.padding']
|
|
48
|
+
}] } });
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Generated bundle index. Do not edit.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
export { FieldComponent };
|
|
55
|
+
//# sourceMappingURL=aril-ui-field.mjs.map
|
|
@@ -0,0 +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';\r\nimport { Types } from 'aril/util/lib';\r\nimport { DxFieldComponent } from \"aril/ui/dxField\";\r\n\r\nexport type LabelPositions = 'top' | 'left';\r\n\r\nexport interface ColumnSizeTypes {\r\n xl?: Types.NumberRange<1, 13>;\r\n lg?: Types.NumberRange<1, 13>;\r\n md?: Types.NumberRange<1, 13>;\r\n sm?: Types.NumberRange<1, 13>;\r\n}\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'aril-field',\r\n templateUrl: './field.component.html',\r\n imports: [DxFieldComponent],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FieldComponent {\r\n @Input({ required: true }) label!: string;\r\n @Input() labelPos: LabelPositions = \"top\";\r\n @Input() color = '#333';\r\n @Input({ transform: (value: number) => value + \"%\" }) labelWidth = 30;\r\n @Input({ transform: (value: number) => value + \"%\" }) valueWidth = 70;\r\n @Input() markAsRequired!: boolean;\r\n @Input({ required: true }) set cols(value: ColumnSizeTypes) {\r\n this.hostClass = \"\";\r\n Object.entries(value).forEach(([key, value]) => { this.hostClass += `${key}:col-${value} ` });\r\n }\r\n\r\n @HostBinding('class') hostClass = '';\r\n @HostBinding('style.padding') padding = '.5rem';\r\n}\r\n","@if (labelPos === 'left') {\n\t<aril-dx-field\n\t\t[label]=\"label\"\n\t\t[color]=\"color\"\n\t\t[labelWidth]=\"labelWidth\"\n\t\t[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":";;;;MAoBa,cAAc,CAAA;AAP3B,IAAA,WAAA,GAAA;QASW,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;QAOhD,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;QACP,IAAO,CAAA,OAAA,GAAG,OAAO,CAAC;AACjD,KAAA;IAPC,IAA+B,IAAI,CAAC,KAAsB,EAAA;AACxD,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;AACpB,QAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK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AA,CAAA;8BAGpB,KAAK,EAAA,CAAA;sBAA/B,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;gBAChB,QAAQ,EAAA,CAAA;sBAAhB,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;gBAC3C,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBACyB,IAAI,EAAA,CAAA;sBAAlC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;gBAKH,SAAS,EAAA,CAAA;sBAA9B,WAAW;uBAAC,OAAO,CAAA;gBACU,OAAO,EAAA,CAAA;sBAApC,WAAW;uBAAC,eAAe,CAAA;;;AEjC9B;;AAEG;;;;"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output } from '@angular/core';
|
|
3
|
+
import * as i2 from 'primeng/fileupload';
|
|
4
|
+
import { FileUploadModule } from 'primeng/fileupload';
|
|
5
|
+
import * as i1 from 'primeng/api';
|
|
6
|
+
|
|
7
|
+
class FileUploadComponent {
|
|
8
|
+
constructor(messageService) {
|
|
9
|
+
this.messageService = messageService;
|
|
10
|
+
this.multiple = false;
|
|
11
|
+
this.accept = ".xlsx";
|
|
12
|
+
this.disabled = false;
|
|
13
|
+
this.auto = false;
|
|
14
|
+
this.showUploadButton = true;
|
|
15
|
+
this.showCancelButton = true;
|
|
16
|
+
this.cancelLabel = "Temizle";
|
|
17
|
+
this.chooseLabel = "Dosyayi Seç";
|
|
18
|
+
this.uploadLabel = "Dosyayi Yükle";
|
|
19
|
+
this.invalidFileTypeMessageSummary = "Geçersiz dosya türü";
|
|
20
|
+
this.invalidFileTypeMessageDetail = "Seçilen dosya türü desteklenmiyor.";
|
|
21
|
+
this.invalidFileSizeMessageSummary = "Dosya boyutu çok büyük";
|
|
22
|
+
this.invalidFileSizeMessageDetail = "Dosya boyutu izin verilen maksimum boyuttan daha büyük.";
|
|
23
|
+
this.beforeSend = new EventEmitter();
|
|
24
|
+
this.upload = new EventEmitter();
|
|
25
|
+
this.errors = new EventEmitter();
|
|
26
|
+
this.selects = new EventEmitter();
|
|
27
|
+
this.clear = new EventEmitter();
|
|
28
|
+
this.uploadedFiles = [];
|
|
29
|
+
}
|
|
30
|
+
onUpload(event) {
|
|
31
|
+
this.upload.emit(event);
|
|
32
|
+
for (const file of event.files) {
|
|
33
|
+
this.uploadedFiles.push(file);
|
|
34
|
+
}
|
|
35
|
+
this.messageService.add({ severity: 'success', summary: 'Dosya başarıyla yüklendi..', detail: '' });
|
|
36
|
+
}
|
|
37
|
+
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", 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" }, 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[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\n\t\t\t\t\t\t\tclass=\"pi pi-file-excel\"\n\t\t\t\t\t\t\tstyle=\"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 }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
41
|
+
type: Component,
|
|
42
|
+
args: [{ standalone: true, selector: 'aril-file-upload', imports: [FileUploadModule], 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[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\n\t\t\t\t\t\t\tclass=\"pi pi-file-excel\"\n\t\t\t\t\t\t\tstyle=\"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
|
+
}], multiple: [{
|
|
48
|
+
type: Input
|
|
49
|
+
}], accept: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], disabled: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], auto: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], maxFileSize: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], showUploadButton: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], showCancelButton: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], cancelLabel: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], chooseLabel: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], uploadLabel: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], invalidFileTypeMessageSummary: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], invalidFileTypeMessageDetail: [{
|
|
70
|
+
type: Input
|
|
71
|
+
}], invalidFileSizeMessageSummary: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], invalidFileSizeMessageDetail: [{
|
|
74
|
+
type: Input
|
|
75
|
+
}], beforeSend: [{
|
|
76
|
+
type: Output
|
|
77
|
+
}], upload: [{
|
|
78
|
+
type: Output
|
|
79
|
+
}], errors: [{
|
|
80
|
+
type: Output
|
|
81
|
+
}], selects: [{
|
|
82
|
+
type: Output
|
|
83
|
+
}], clear: [{
|
|
84
|
+
type: Output
|
|
85
|
+
}] } });
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Generated bundle index. Do not edit.
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
export { FileUploadComponent };
|
|
92
|
+
//# sourceMappingURL=aril-ui-fileUpload.mjs.map
|
|
@@ -0,0 +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 */\r\n\r\nimport { HttpEvent } from '@angular/common/http';\r\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport { FileUploadModule } from 'primeng/fileupload';\r\nimport { MessageService } from 'primeng/api';\r\n\r\ninterface UploadEvent {\r\n originalEvent: HttpEvent<any>;\r\n files: File[];\r\n}\r\n\r\ninterface UploadFile {\r\n name: string;\r\n size: number;\r\n type: string;\r\n objectURL?: string;\r\n}\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'aril-file-upload',\r\n templateUrl: './file-upload.component.html',\r\n imports: [FileUploadModule],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FileUploadComponent {\r\n constructor(private messageService: MessageService) { }\r\n\r\n @Input() name!: string;\r\n @Input() url!: string;\r\n @Input() multiple = false;\r\n @Input() accept = \".xlsx\";\r\n @Input() disabled = false;\r\n @Input() auto = false;\r\n @Input() maxFileSize!: number;\r\n @Input() showUploadButton = true;\r\n @Input() showCancelButton = true;\r\n @Input() cancelLabel = \"Temizle\";\r\n @Input() chooseLabel = \"Dosyayi Seç\";\r\n @Input() uploadLabel = \"Dosyayi Yükle\";\r\n @Input() invalidFileTypeMessageSummary = \"Geçersiz dosya türü\";\r\n @Input() invalidFileTypeMessageDetail = \"Seçilen dosya türü desteklenmiyor.\";\r\n @Input() invalidFileSizeMessageSummary = \"Dosya boyutu çok büyük\";\r\n @Input() invalidFileSizeMessageDetail = \"Dosya boyutu izin verilen maksimum boyuttan daha büyük.\";\r\n\r\n @Output() beforeSend: EventEmitter<unknown> = new EventEmitter();\r\n @Output() upload: EventEmitter<unknown> = new EventEmitter();\r\n @Output() errors: EventEmitter<unknown> = new EventEmitter();\r\n @Output() selects: EventEmitter<unknown> = new EventEmitter();\r\n @Output() clear: EventEmitter<unknown> = new EventEmitter();\r\n\r\n uploadedFiles: UploadFile[] = [];\r\n\r\n onUpload(event: UploadEvent) {\r\n this.upload.emit(event);\r\n for (const file of event.files) {\r\n this.uploadedFiles.push(file);\r\n }\r\n this.messageService.add({ severity: 'success', summary: 'Dosya başarıyla yüklendi..', detail: '' });\r\n }\r\n}\r\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[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\n\t\t\t\t\t\t\tclass=\"pi pi-file-excel\"\n\t\t\t\t\t\t\tstyle=\"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":";;;;;;MA0Ba,mBAAmB,CAAA;AAC9B,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;QAEb,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,CAAA,UAAU,GAA0B,IAAI,YAAY,EAAE,CAAC;AACvD,QAAA,IAA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AA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAGf,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;iCACI,IAAI,EAAA,QAAA,EACN,kBAAkB,EAEnB,OAAA,EAAA,CAAC,gBAAgB,CAAC,EAAA,eAAA,EACV,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4zCAAA,EAAA,CAAA;mFAKtC,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,GAAG,EAAA,CAAA;sBAAX,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,MAAM,EAAA,CAAA;sBAAd,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,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;;;AElDT;;AAEG;;;;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output } from '@angular/core';
|
|
3
|
+
import * as i1 from 'aril/ui/lib';
|
|
4
|
+
import { FlexGridDirective, FormErrorMessageDirective } from 'aril/ui/lib';
|
|
5
|
+
import { isFormControl, isFormGroup, isFormArray } from '@angular/forms';
|
|
6
|
+
import { ButtonComponent } from 'aril/ui/button';
|
|
7
|
+
|
|
8
|
+
class FormComponent {
|
|
9
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: FormComponent, isStandalone: true, 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 }); }
|
|
11
|
+
}
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormComponent, decorators: [{
|
|
13
|
+
type: Component,
|
|
14
|
+
args: [{
|
|
15
|
+
standalone: true,
|
|
16
|
+
selector: 'aril-form',
|
|
17
|
+
template: ` <ng-content></ng-content> `,
|
|
18
|
+
hostDirectives: [
|
|
19
|
+
FlexGridDirective,
|
|
20
|
+
{
|
|
21
|
+
directive: FormErrorMessageDirective,
|
|
22
|
+
inputs: ["formErrorMessage: formGroup"]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
26
|
+
}]
|
|
27
|
+
}], propDecorators: { formGroup: [{
|
|
28
|
+
type: Input,
|
|
29
|
+
args: [{ required: true }]
|
|
30
|
+
}] } });
|
|
31
|
+
|
|
32
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
33
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
34
|
+
class FormSubmitButtonComponent extends ButtonComponent {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.inValidEvent = new EventEmitter();
|
|
38
|
+
}
|
|
39
|
+
submit() {
|
|
40
|
+
this.markAsDirty(this.formGroup.controls);
|
|
41
|
+
if (this.formGroup.valid)
|
|
42
|
+
this.clickEvent.emit();
|
|
43
|
+
else
|
|
44
|
+
this.inValidEvent.emit();
|
|
45
|
+
}
|
|
46
|
+
markAsDirty(controls) {
|
|
47
|
+
Object.entries(controls).forEach(([key, ctrl]) => {
|
|
48
|
+
if (isFormControl(ctrl)) {
|
|
49
|
+
ctrl.markAsDirty();
|
|
50
|
+
}
|
|
51
|
+
else if (isFormGroup(ctrl) || isFormArray(ctrl)) {
|
|
52
|
+
this.markAsDirty(ctrl.controls);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormSubmitButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
57
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: FormSubmitButtonComponent, isStandalone: true, selector: "aril-form-submit-button", inputs: { formGroup: "formGroup" }, outputs: { inValidEvent: "inValidEvent" }, usesInheritance: true, ngImport: i0, template: "<aril-button\r\n\t[label]=\"label\"\r\n\t[loading]=\"formGroup.pending\"\r\n\t[disabled]=\"disabled\"\r\n\t[raised]=\"raised\"\r\n\t[outlined]=\"outlined\"\r\n\t[badge]=\"badge\"\r\n\t[size]=\"size\"\r\n\t[icon]=\"icon\"\r\n\t[color]=\"color\"\r\n\t(clickEvent)=\"submit()\">\r\n</aril-button>\r\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "aril-button:not([click])", inputs: ["label", "loading", "disabled", "raised", "outlined", "badge", "size", "icon", "color"], outputs: ["clickEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FormSubmitButtonComponent, decorators: [{
|
|
60
|
+
type: Component,
|
|
61
|
+
args: [{ standalone: true, selector: 'aril-form-submit-button', imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<aril-button\r\n\t[label]=\"label\"\r\n\t[loading]=\"formGroup.pending\"\r\n\t[disabled]=\"disabled\"\r\n\t[raised]=\"raised\"\r\n\t[outlined]=\"outlined\"\r\n\t[badge]=\"badge\"\r\n\t[size]=\"size\"\r\n\t[icon]=\"icon\"\r\n\t[color]=\"color\"\r\n\t(clickEvent)=\"submit()\">\r\n</aril-button>\r\n" }]
|
|
62
|
+
}], propDecorators: { formGroup: [{
|
|
63
|
+
type: Input,
|
|
64
|
+
args: [{ required: true }]
|
|
65
|
+
}], inValidEvent: [{
|
|
66
|
+
type: Output
|
|
67
|
+
}] } });
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Generated bundle index. Do not edit.
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
export { FormComponent, FormSubmitButtonComponent };
|
|
74
|
+
//# sourceMappingURL=aril-ui-form.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aril-ui-form.mjs","sources":["../../projects/aril/ui/form/src/form.component.ts","../../projects/aril/ui/form/src/form-submit-button.component.ts","../../projects/aril/ui/form/src/form-submit-button.component.html","../../projects/aril/ui/form/aril-ui-form.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\r\nimport { FormGroup } from '@angular/forms';\r\nimport { FlexGridDirective, FormErrorMessageDirective } from 'aril/ui/lib';\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'aril-form',\r\n template: ` <ng-content></ng-content> `,\r\n hostDirectives: [\r\n FlexGridDirective,\r\n {\r\n directive: FormErrorMessageDirective,\r\n inputs: [\"formErrorMessage: formGroup\"]\r\n }\r\n ],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormComponent {\r\n @Input({ required: true }) formGroup!: FormGroup;\r\n}\r\n","/* eslint-disable @typescript-eslint/no-unused-vars */\r\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\n\r\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport { FormGroup, isFormArray, isFormControl, isFormGroup } from '@angular/forms';\r\nimport { ButtonComponent } from 'aril/ui/button';\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'aril-form-submit-button',\r\n templateUrl: './form-submit-button.component.html',\r\n imports: [ButtonComponent],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class FormSubmitButtonComponent extends ButtonComponent {\r\n @Input({ required: true }) formGroup!: FormGroup;\r\n @Output() inValidEvent: EventEmitter<never> = new EventEmitter<never>();\r\n\r\n submit() {\r\n this.markAsDirty(this.formGroup.controls);\r\n if (this.formGroup.valid) this.clickEvent.emit();\r\n else this.inValidEvent.emit();\r\n }\r\n\r\n markAsDirty(controls: { [key: string]: any }) {\r\n Object.entries(controls).forEach(([key, ctrl]) => {\r\n if (isFormControl(ctrl)) {\r\n ctrl.markAsDirty();\r\n } else if (isFormGroup(ctrl) || isFormArray(ctrl)) {\r\n this.markAsDirty(ctrl.controls);\r\n }\r\n });\r\n }\r\n}","<aril-button\r\n\t[label]=\"label\"\r\n\t[loading]=\"formGroup.pending\"\r\n\t[disabled]=\"disabled\"\r\n\t[raised]=\"raised\"\r\n\t[outlined]=\"outlined\"\r\n\t[badge]=\"badge\"\r\n\t[size]=\"size\"\r\n\t[icon]=\"icon\"\r\n\t[color]=\"color\"\r\n\t(clickEvent)=\"submit()\">\r\n</aril-button>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAiBa,aAAa,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