aril 0.0.8 → 0.0.9
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/aril-0.0.9.tgz +0 -0
- package/esm2022/http/src/serviceBase.mjs +2 -2
- 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/button/src/button.component.mjs +3 -3
- package/esm2022/ui/calendar/src/calendar.component.mjs +4 -4
- package/esm2022/ui/checkbox/src/check-box.component.mjs +4 -4
- package/esm2022/ui/checkbox/src/tri-state-checkbox.component.mjs +4 -4
- package/esm2022/ui/fileUpload/src/file-upload.component.mjs +4 -4
- package/esm2022/ui/form/src/form-submit-button.component.mjs +22 -27
- package/esm2022/ui/form/src/form.component.mjs +1 -1
- package/esm2022/ui/mask/src/mask.component.mjs +4 -4
- package/esm2022/ui/number/src/number.component.mjs +4 -4
- package/esm2022/ui/password/src/password.component.mjs +4 -4
- package/esm2022/ui/radioButton/src/radio-button.component.mjs +4 -4
- package/esm2022/ui/selectBox/src/select-box.component.mjs +4 -4
- package/esm2022/ui/switch/src/switch.component.mjs +4 -4
- package/esm2022/ui/tagBox/src/tag-box.component.mjs +4 -4
- package/esm2022/ui/text/src/text.component.mjs +4 -4
- package/esm2022/ui/textArea/src/text-area.component.mjs +4 -4
- package/esm2022/util/lib/index.mjs +2 -1
- package/esm2022/util/lib/src/module-router.mjs +16 -0
- package/fesm2022/aril-http.mjs +1 -1
- 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-button.mjs +2 -2
- package/fesm2022/aril-ui-button.mjs.map +1 -1
- package/fesm2022/aril-ui-calendar.mjs +3 -3
- package/fesm2022/aril-ui-calendar.mjs.map +1 -1
- package/fesm2022/aril-ui-checkbox.mjs +5 -5
- package/fesm2022/aril-ui-checkbox.mjs.map +1 -1
- package/fesm2022/aril-ui-fileUpload.mjs +3 -3
- package/fesm2022/aril-ui-fileUpload.mjs.map +1 -1
- package/fesm2022/aril-ui-form.mjs +21 -27
- package/fesm2022/aril-ui-form.mjs.map +1 -1
- package/fesm2022/aril-ui-mask.mjs +3 -3
- package/fesm2022/aril-ui-mask.mjs.map +1 -1
- package/fesm2022/aril-ui-number.mjs +3 -3
- package/fesm2022/aril-ui-number.mjs.map +1 -1
- package/fesm2022/aril-ui-password.mjs +3 -3
- package/fesm2022/aril-ui-password.mjs.map +1 -1
- package/fesm2022/aril-ui-radioButton.mjs +3 -3
- package/fesm2022/aril-ui-radioButton.mjs.map +1 -1
- package/fesm2022/aril-ui-selectBox.mjs +3 -3
- package/fesm2022/aril-ui-selectBox.mjs.map +1 -1
- package/fesm2022/aril-ui-switch.mjs +3 -3
- package/fesm2022/aril-ui-switch.mjs.map +1 -1
- package/fesm2022/aril-ui-tagBox.mjs +3 -3
- package/fesm2022/aril-ui-tagBox.mjs.map +1 -1
- package/fesm2022/aril-ui-text.mjs +3 -3
- package/fesm2022/aril-ui-text.mjs.map +1 -1
- package/fesm2022/aril-ui-textArea.mjs +3 -3
- package/fesm2022/aril-ui-textArea.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 +19 -13
- package/ui/button/src/button.component.d.ts +1 -1
- package/ui/form/src/form-submit-button.component.d.ts +5 -5
- package/util/lib/index.d.ts +1 -0
- package/util/lib/src/module-router.d.ts +5 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
2
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
3
3
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
4
4
|
import { TooltipModule } from 'primeng/tooltip';
|
|
@@ -17,11 +17,11 @@ export class TextAreaComponent extends BaseInputComponent {
|
|
|
17
17
|
this.placeholder = '';
|
|
18
18
|
}
|
|
19
19
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TextAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: TextAreaComponent, isStandalone: true, selector: "aril-text-area[ngModel], aril-text-area[formControl], aril-text-area[formControlName]", inputs: { rows: "rows", cols: "cols", tabindex: "tabindex", placeholder: "placeholder" }, usesInheritance: true, hostDirectives: [{ directive: i1.ValueAccessorDirective }], ngImport: i0, template: "<textarea\n\tpInputTextarea\n\t[rows]=\"rows\"\n\t[cols]=\"cols\"\n\t[autoResize]=\"true\"\n\t[placeholder]=\"placeholder\"\n\t[tabindex]=\"tabindex\"\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)\"></textarea>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: InputTextareaModule }, { kind: "directive", type: i3.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { 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" }]
|
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: TextAreaComponent, isStandalone: true, selector: "aril-text-area[ngModel], aril-text-area[formControl], aril-text-area[formControlName]", inputs: { rows: "rows", cols: "cols", tabindex: "tabindex", placeholder: "placeholder" }, usesInheritance: true, hostDirectives: [{ directive: i1.ValueAccessorDirective }], ngImport: i0, template: "<textarea\n\tpInputTextarea\n\t[rows]=\"rows\"\n\t[cols]=\"cols\"\n\t[autoResize]=\"true\"\n\t[placeholder]=\"placeholder\"\n\t[tabindex]=\"tabindex\"\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)\"></textarea>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: InputTextareaModule }, { kind: "directive", type: i3.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { 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" }] }); }
|
|
21
21
|
}
|
|
22
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TextAreaComponent, decorators: [{
|
|
23
23
|
type: Component,
|
|
24
|
-
args: [{ standalone: true, selector: 'aril-text-area[ngModel], aril-text-area[formControl], aril-text-area[formControlName]', imports: [ReactiveFormsModule, InputTextareaModule, TooltipModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective],
|
|
24
|
+
args: [{ standalone: true, selector: 'aril-text-area[ngModel], aril-text-area[formControl], aril-text-area[formControlName]', imports: [ReactiveFormsModule, InputTextareaModule, TooltipModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective], template: "<textarea\n\tpInputTextarea\n\t[rows]=\"rows\"\n\t[cols]=\"cols\"\n\t[autoResize]=\"true\"\n\t[placeholder]=\"placeholder\"\n\t[tabindex]=\"tabindex\"\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)\"></textarea>\n" }]
|
|
25
25
|
}], propDecorators: { rows: [{
|
|
26
26
|
type: Input
|
|
27
27
|
}], cols: [{
|
|
@@ -31,4 +31,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
31
31
|
}], placeholder: [{
|
|
32
32
|
type: Input
|
|
33
33
|
}] } });
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dC1hcmVhLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FyaWwvdWkvdGV4dEFyZWEvc3JjL3RleHQtYXJlYS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hcmlsL3VpL3RleHRBcmVhL3NyYy90ZXh0LWFyZWEuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUEyQixTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzFFLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRXJELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQzVELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUVoRCxPQUFPLEVBQUUsa0JBQWtCLEVBQUUscUJBQXFCLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxhQUFhLENBQUM7Ozs7OztBQUVoRzs7RUFFRTtBQVNGLE1BQU0sT0FBTyxpQkFBa0IsU0FBUSxrQkFBa0I7SUFQekQ7O1FBV1UsZ0JBQVcsR0FBRyxFQUFFLENBQUM7S0FDMUI7OEdBTFksaUJBQWlCO2tHQUFqQixpQkFBaUIsOFRDbkI5Qix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3 +1,4 @@
|
|
|
1
1
|
export * from './src/types';
|
|
2
2
|
export * from './src/interfaces';
|
|
3
|
-
|
|
3
|
+
export * from './src/module-router';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9hcmlsL3V0aWwvbGliL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxxQkFBcUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3JjL3R5cGVzJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2ludGVyZmFjZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvbW9kdWxlLXJvdXRlcic7XG4iXX0=
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { RouterOutlet } from '@angular/router';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class ModuleRouterOutlet {
|
|
5
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ModuleRouterOutlet, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: ModuleRouterOutlet, isStandalone: true, selector: "ng-component", ngImport: i0, template: ` <router-outlet /> `, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
7
|
+
}
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ModuleRouterOutlet, decorators: [{
|
|
9
|
+
type: Component,
|
|
10
|
+
args: [{
|
|
11
|
+
standalone: true,
|
|
12
|
+
template: ` <router-outlet /> `,
|
|
13
|
+
imports: [RouterOutlet]
|
|
14
|
+
}]
|
|
15
|
+
}] });
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLXJvdXRlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FyaWwvdXRpbC9saWIvc3JjL21vZHVsZS1yb3V0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxQyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7O0FBTy9DLE1BQU0sT0FBTyxrQkFBa0I7OEdBQWxCLGtCQUFrQjtrR0FBbEIsa0JBQWtCLHdFQUhwQixxQkFBcUIsNERBQ3JCLFlBQVk7OzJGQUVWLGtCQUFrQjtrQkFMOUIsU0FBUzttQkFBQztvQkFDVixVQUFVLEVBQUUsSUFBSTtvQkFDaEIsUUFBUSxFQUFFLHFCQUFxQjtvQkFDL0IsT0FBTyxFQUFFLENBQUMsWUFBWSxDQUFDO2lCQUN2QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgeyBSb3V0ZXJPdXRsZXQgfSBmcm9tICdAYW5ndWxhci9yb3V0ZXInO1xyXG5cclxuQENvbXBvbmVudCh7XHJcblx0c3RhbmRhbG9uZTogdHJ1ZSxcclxuXHR0ZW1wbGF0ZTogYCA8cm91dGVyLW91dGxldCAvPiBgLFxyXG5cdGltcG9ydHM6IFtSb3V0ZXJPdXRsZXRdXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBNb2R1bGVSb3V0ZXJPdXRsZXQge31cclxuIl19
|
package/fesm2022/aril-http.mjs
CHANGED
|
@@ -100,7 +100,7 @@ function ServiceCall(httpMethod, proxy, serviceURL, remoteAPI) {
|
|
|
100
100
|
observable = httpClient.get(endPoint, { params: request, responseType: 'json' });
|
|
101
101
|
break;
|
|
102
102
|
case HTTPMethods.POST:
|
|
103
|
-
observable = httpClient.post(endPoint,
|
|
103
|
+
observable = httpClient.post(endPoint, args[0], { responseType: 'json' });
|
|
104
104
|
break;
|
|
105
105
|
case HTTPMethods.PUT:
|
|
106
106
|
observable = httpClient.put(endPoint + '/' + args[0], request, { responseType: 'json' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aril-http.mjs","sources":["../../projects/aril/http/lib/enums.ts","../../projects/aril/http/lib/interfaces.ts","../../projects/aril/http/src/httpClient.ts","../../projects/aril/http/src/serviceStateMethods.ts","../../projects/aril/http/src/serviceBase.ts","../../projects/aril/http/index.ts","../../projects/aril/http/aril-http.ts"],"sourcesContent":["export enum HTTPMethods {\n\tGET = 'GET',\n\tPOST = 'POST',\n\tPUT = 'PUT',\n\tDELETE = 'DELETE'\n}\n\nexport enum APIs {\n\tCRM = 'crm',\n\tWMD = 'wdm',\n\tBILLING = 'billing',\n\tPAYMENT = 'payment',\n\tYEAP = 'yeap'\n}\n\nexport enum ProxyTypes {\n\tNative,\n\tServerSide,\n\tClientSide\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\n\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { ProxyTypes } from './enums';\n\nexport interface ServiceCallStates {\n\tserviceCalled: boolean;\n\twaitingForResponse: boolean;\n\tresponseIsRecieved: boolean;\n\tserviceCallFailed: boolean;\n}\n\nexport type ServiceCallStateMap<T> = {\n\t[K in keyof T]?: T[K] extends Function ? ServiceCallStates : never;\n};\n\nexport class ErrorResponse {\n\terror: HttpErrorResponse | undefined;\n\n\tconstructor(err: HttpErrorResponse | undefined) {\n\t\tthis.error = err;\n\t}\n}\n\nexport class ServiceResponse<T> extends ErrorResponse {\n\trequest: any;\n\tresponse: T;\n\tproxy: ProxyTypes;\n\n\tconstructor(request: any, response: T, proxy: ProxyTypes) {\n\t\tsuper(undefined);\n\t\tthis.request = request;\n\t\tthis.response = response;\n\t\tthis.proxy = proxy;\n\t}\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { HttpClient } from '@angular/common/http';\nimport { InjectionToken, Injector, inject } from '@angular/core';\n\nimport { APIs } from '../lib/enums';\nimport { ServiceCallStateMap } from '../lib/interfaces';\n\nexport const API_TOKEN = new InjectionToken<APIs>('API');\n\nexport abstract class RestClient {\n\tprivate readonly httpClient = inject(HttpClient);\n\tprivate readonly baseAPI = inject(API_TOKEN);\n\tprivate readonly injector = inject(Injector);\n\n\tabstract states: ServiceCallStateMap<any>;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { ServiceCallStateMap } from '../lib/interfaces';\n\nexport const callState = (states: ServiceCallStateMap<any>, serviceName: any): void => {\n\tstates[serviceName] = {\n\t\tserviceCalled: true,\n\t\twaitingForResponse: true,\n\t\tresponseIsRecieved: false,\n\t\tserviceCallFailed: false\n\t};\n};\nexport const successState = (states: ServiceCallStateMap<any>, serviceName: any): void => {\n\tstates[serviceName] = {\n\t\tserviceCalled: true,\n\t\twaitingForResponse: false,\n\t\tresponseIsRecieved: true,\n\t\tserviceCallFailed: false\n\t};\n};\nexport const errorState = (states: ServiceCallStateMap<any>, serviceName: any): void => {\n\tstates[serviceName] = {\n\t\tserviceCalled: true,\n\t\twaitingForResponse: false,\n\t\tresponseIsRecieved: true,\n\t\tserviceCallFailed: true\n\t};\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/** TODO: ADD INTERCEPTOR */\n/** TODO: SET REQUEST & RESPONSE ACCORDING TO PROXY */\n\nimport { inject, runInInjectionContext } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { HttpErrorResponse, HttpClient, HttpParams } from '@angular/common/http';\n\nimport { MessageService } from 'primeng/api';\nimport { Observable, of } from 'rxjs';\nimport { catchError, map, tap } from 'rxjs/operators';\n\nimport { Interfaces } from 'aril/util/lib';\n\nimport { callState, successState, errorState } from './serviceStateMethods';\nimport { APIs, HTTPMethods, ProxyTypes } from '../lib/enums';\nimport { ErrorResponse, ServiceCallStateMap, ServiceResponse } from '../lib/interfaces';\n\nexport function ServiceCall(\n\thttpMethod: HTTPMethods,\n\tproxy: ProxyTypes,\n\tserviceURL: string,\n\tremoteAPI?: APIs\n): MethodDecorator {\n\treturn function (serviceClass: object, serviceName: string | symbol, descriptor: PropertyDescriptor) {\n\t\tconst originalFunction = descriptor.value;\n\n\t\tdescriptor.value = function (...args: any[]) {\n\t\t\treturn runInInjectionContext((<any>this).injector, () => {\n\t\t\t\tconst httpClient: HttpClient = (<any>this).httpClient;\n\t\t\t\tconst api: APIs = remoteAPI ?? (<any>this).baseAPI;\n\t\t\t\tconst endPoint: string = api + '/' + serviceURL;\n\t\t\t\tconst request = getRequest(httpMethod, originalFunction, args);\n\t\t\t\tconst states: ServiceCallStateMap<any> = (<any>this).states;\n\t\t\t\tconst messageService = inject(MessageService);\n\n\t\t\t\tcallState(states, serviceName);\n\n\t\t\t\tlet observable: Observable<any> = new Observable<any>();\n\n\t\t\t\tswitch (httpMethod) {\n\t\t\t\t\tcase HTTPMethods.GET:\n\t\t\t\t\t\tobservable = httpClient.get<any>(endPoint, { params: request as HttpParams, responseType: 'json' });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HTTPMethods.POST:\n\t\t\t\t\t\tobservable = httpClient.post<any>(endPoint, request, { responseType: 'json' });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HTTPMethods.PUT:\n\t\t\t\t\t\tobservable = httpClient.put<any>(endPoint + '/' + args[0], request, { responseType: 'json' });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase HTTPMethods.DELETE:\n\t\t\t\t\t\tobservable = httpClient.delete<any>(endPoint + '/' + args[0], { responseType: 'json' });\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tobservable = observable.pipe(\n\t\t\t\t\tmap((response) => new ServiceResponse(request, response, proxy)),\n\t\t\t\t\ttap(() => successState(states, serviceName)),\n\t\t\t\t\tcatchError((error: HttpErrorResponse) => {\n\t\t\t\t\t\terrorState(states, serviceName);\n\t\t\t\t\t\tconsole.error(error);\n\t\t\t\t\t\tmessageService.add({ key: 'toast-root', severity: 'error', summary: 'Error', detail: error.error });\n\t\t\t\t\t\treturn of(new ErrorResponse(error));\n\t\t\t\t\t}),\n\t\t\t\t\ttakeUntilDestroyed()\n\t\t\t\t);\n\n\t\t\t\treturn observable;\n\t\t\t});\n\t\t};\n\t};\n}\n\nexport function ServiceCallMock(httpMethod: HTTPMethods, proxy: ProxyTypes, serviceURL: string, mockAPI: string) {\n\treturn ServiceCall(httpMethod, proxy, serviceURL, <APIs>mockAPI);\n}\n\nfunction getRequest(\n\thttpMethod: HTTPMethods,\n\tfn: () => any,\n\targs: any[]\n): HttpParams | Interfaces.MapStringString | undefined {\n\tif (args.length) {\n\t\tconst source = fn.toString();\n\t\tconst match = source.match(/\\((.*?)\\)/);\n\t\tconst paramNames = match ? match[1].split(',').map((param) => param.trim()) : [];\n\n\t\tif (httpMethod === HTTPMethods.GET) {\n\t\t\tlet queryParams = new HttpParams();\n\n\t\t\tparamNames.forEach((paramName, index) => {\n\t\t\t\tqueryParams = queryParams.append(paramName, args[index]);\n\t\t\t});\n\t\t\treturn queryParams;\n\t\t} else {\n\t\t\tconst params: Interfaces.MapStringString = {};\n\n\t\t\targs.forEach((arg, index) => {\n\t\t\t\tparams[paramNames[index]] = arg;\n\t\t\t});\n\n\t\t\treturn params;\n\t\t}\n\t} else return undefined;\n}\n","/* lib */\nexport * from './lib/enums';\nexport * from './lib/interfaces';\n\n/* src */\nexport * from './src/httpClient';\nexport * from './src/serviceBase';\nexport * from './src/serviceStateMethods';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAAY,YAKX;AALD,CAAA,UAAY,WAAW,EAAA;AACtB,IAAA,WAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,WAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,WAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AAClB,CAAC,EALW,WAAW,KAAX,WAAW,GAKtB,EAAA,CAAA,CAAA,CAAA;IAEW,KAMX;AAND,CAAA,UAAY,IAAI,EAAA;AACf,IAAA,IAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,IAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,IAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,IAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,IAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACd,CAAC,EANW,IAAI,KAAJ,IAAI,GAMf,EAAA,CAAA,CAAA,CAAA;IAEW,WAIX;AAJD,CAAA,UAAY,UAAU,EAAA;AACrB,IAAA,UAAA,CAAA,UAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,UAAA,CAAA,UAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;AACV,IAAA,UAAA,CAAA,UAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU,CAAA;AACX,CAAC,EAJW,UAAU,KAAV,UAAU,GAIrB,EAAA,CAAA,CAAA;;ACnBD;AACA;MAgBa,aAAa,CAAA;AAGzB,IAAA,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ACzGA;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"aril-http.mjs","sources":["../../projects/aril/http/lib/enums.ts","../../projects/aril/http/lib/interfaces.ts","../../projects/aril/http/src/httpClient.ts","../../projects/aril/http/src/serviceStateMethods.ts","../../projects/aril/http/src/serviceBase.ts","../../projects/aril/http/index.ts","../../projects/aril/http/aril-http.ts"],"sourcesContent":["export enum HTTPMethods {\n\tGET = 'GET',\n\tPOST = 'POST',\n\tPUT = 'PUT',\n\tDELETE = 'DELETE'\n}\n\nexport enum APIs {\n\tCRM = 'crm',\n\tWMD = 'wdm',\n\tBILLING = 'billing',\n\tPAYMENT = 'payment',\n\tYEAP = 'yeap'\n}\n\nexport enum ProxyTypes {\n\tNative,\n\tServerSide,\n\tClientSide\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/ban-types */\n\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { ProxyTypes } from './enums';\n\nexport interface ServiceCallStates {\n\tserviceCalled: boolean;\n\twaitingForResponse: boolean;\n\tresponseIsRecieved: boolean;\n\tserviceCallFailed: boolean;\n}\n\nexport type ServiceCallStateMap<T> = {\n\t[K in keyof T]?: T[K] extends Function ? ServiceCallStates : never;\n};\n\nexport class ErrorResponse {\n\terror: HttpErrorResponse | undefined;\n\n\tconstructor(err: HttpErrorResponse | undefined) {\n\t\tthis.error = err;\n\t}\n}\n\nexport class ServiceResponse<T> extends ErrorResponse {\n\trequest: any;\n\tresponse: T;\n\tproxy: ProxyTypes;\n\n\tconstructor(request: any, response: T, proxy: ProxyTypes) {\n\t\tsuper(undefined);\n\t\tthis.request = request;\n\t\tthis.response = response;\n\t\tthis.proxy = proxy;\n\t}\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { HttpClient } from '@angular/common/http';\nimport { InjectionToken, Injector, inject } from '@angular/core';\n\nimport { APIs } from '../lib/enums';\nimport { ServiceCallStateMap } from '../lib/interfaces';\n\nexport const API_TOKEN = new InjectionToken<APIs>('API');\n\nexport abstract class RestClient {\n\tprivate readonly httpClient = inject(HttpClient);\n\tprivate readonly baseAPI = inject(API_TOKEN);\n\tprivate readonly injector = inject(Injector);\n\n\tabstract states: ServiceCallStateMap<any>;\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { ServiceCallStateMap } from '../lib/interfaces';\n\nexport const callState = (states: ServiceCallStateMap<any>, serviceName: any): void => {\n\tstates[serviceName] = {\n\t\tserviceCalled: true,\n\t\twaitingForResponse: true,\n\t\tresponseIsRecieved: false,\n\t\tserviceCallFailed: false\n\t};\n};\nexport const successState = (states: ServiceCallStateMap<any>, serviceName: any): void => {\n\tstates[serviceName] = {\n\t\tserviceCalled: true,\n\t\twaitingForResponse: false,\n\t\tresponseIsRecieved: true,\n\t\tserviceCallFailed: false\n\t};\n};\nexport const errorState = (states: ServiceCallStateMap<any>, serviceName: any): void => {\n\tstates[serviceName] = {\n\t\tserviceCalled: true,\n\t\twaitingForResponse: false,\n\t\tresponseIsRecieved: true,\n\t\tserviceCallFailed: true\n\t};\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\n\r\n/** TODO: ADD INTERCEPTOR */\r\n/** TODO: SET REQUEST & RESPONSE ACCORDING TO PROXY */\r\n\r\nimport { inject, runInInjectionContext } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { HttpErrorResponse, HttpClient, HttpParams } from '@angular/common/http';\r\n\r\nimport { MessageService } from 'primeng/api';\r\nimport { Observable, of } from 'rxjs';\r\nimport { catchError, map, tap } from 'rxjs/operators';\r\n\r\nimport { Interfaces } from 'aril/util/lib';\r\n\r\nimport { callState, successState, errorState } from './serviceStateMethods';\r\nimport { APIs, HTTPMethods, ProxyTypes } from '../lib/enums';\r\nimport { ErrorResponse, ServiceCallStateMap, ServiceResponse } from '../lib/interfaces';\r\n\r\nexport function ServiceCall(\r\n\thttpMethod: HTTPMethods,\r\n\tproxy: ProxyTypes,\r\n\tserviceURL: string,\r\n\tremoteAPI?: APIs\r\n): MethodDecorator {\r\n\treturn function (serviceClass: object, serviceName: string | symbol, descriptor: PropertyDescriptor) {\r\n\t\tconst originalFunction = descriptor.value;\r\n\r\n\t\tdescriptor.value = function (...args: any[]) {\r\n\t\t\treturn runInInjectionContext((<any>this).injector, () => {\r\n\t\t\t\tconst httpClient: HttpClient = (<any>this).httpClient;\r\n\t\t\t\tconst api: APIs = remoteAPI ?? (<any>this).baseAPI;\r\n\t\t\t\tconst endPoint: string = api + '/' + serviceURL;\r\n\t\t\t\tconst request = getRequest(httpMethod, originalFunction, args);\r\n\t\t\t\tconst states: ServiceCallStateMap<any> = (<any>this).states;\r\n\t\t\t\tconst messageService = inject(MessageService);\r\n\r\n\t\t\t\tcallState(states, serviceName);\r\n\r\n\t\t\t\tlet observable: Observable<any> = new Observable<any>();\r\n\r\n\t\t\t\tswitch (httpMethod) {\r\n\t\t\t\t\tcase HTTPMethods.GET:\r\n\t\t\t\t\t\tobservable = httpClient.get<any>(endPoint, { params: request as HttpParams, responseType: 'json' });\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase HTTPMethods.POST:\r\n\t\t\t\t\t\tobservable = httpClient.post<any>(endPoint, args[0], { responseType: 'json' });\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase HTTPMethods.PUT:\r\n\t\t\t\t\t\tobservable = httpClient.put<any>(endPoint + '/' + args[0], request, { responseType: 'json' });\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase HTTPMethods.DELETE:\r\n\t\t\t\t\t\tobservable = httpClient.delete<any>(endPoint + '/' + args[0], { responseType: 'json' });\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tobservable = observable.pipe(\r\n\t\t\t\t\tmap((response) => new ServiceResponse(request, response, proxy)),\r\n\t\t\t\t\ttap(() => successState(states, serviceName)),\r\n\t\t\t\t\tcatchError((error: HttpErrorResponse) => {\r\n\t\t\t\t\t\terrorState(states, serviceName);\r\n\t\t\t\t\t\tconsole.error(error);\r\n\t\t\t\t\t\tmessageService.add({ key: 'toast-root', severity: 'error', summary: 'Error', detail: error.error });\r\n\t\t\t\t\t\treturn of(new ErrorResponse(error));\r\n\t\t\t\t\t}),\r\n\t\t\t\t\ttakeUntilDestroyed()\r\n\t\t\t\t);\r\n\r\n\t\t\t\treturn observable;\r\n\t\t\t});\r\n\t\t};\r\n\t};\r\n}\r\n\r\nexport function ServiceCallMock(httpMethod: HTTPMethods, proxy: ProxyTypes, serviceURL: string, mockAPI: string) {\r\n\treturn ServiceCall(httpMethod, proxy, serviceURL, <APIs>mockAPI);\r\n}\r\n\r\nfunction getRequest(\r\n\thttpMethod: HTTPMethods,\r\n\tfn: () => any,\r\n\targs: any[]\r\n): HttpParams | Interfaces.MapStringString | undefined {\r\n\tif (args.length) {\r\n\t\tconst source = fn.toString();\r\n\t\tconst match = source.match(/\\((.*?)\\)/);\r\n\t\tconst paramNames = match ? match[1].split(',').map((param) => param.trim()) : [];\r\n\r\n\t\tif (httpMethod === HTTPMethods.GET) {\r\n\t\t\tlet queryParams = new HttpParams();\r\n\r\n\t\t\tparamNames.forEach((paramName, index) => {\r\n\t\t\t\tqueryParams = queryParams.append(paramName, args[index]);\r\n\t\t\t});\r\n\t\t\treturn queryParams;\r\n\t\t} else {\r\n\t\t\tconst params: Interfaces.MapStringString = {};\r\n\r\n\t\t\targs.forEach((arg, index) => {\r\n\t\t\t\tparams[paramNames[index]] = arg;\r\n\t\t\t});\r\n\r\n\t\t\treturn params;\r\n\t\t}\r\n\t} else return undefined;\r\n}\r\n","/* lib */\nexport * from './lib/enums';\nexport * from './lib/interfaces';\n\n/* src */\nexport * from './src/httpClient';\nexport * from './src/serviceBase';\nexport * from './src/serviceStateMethods';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAAY,YAKX;AALD,CAAA,UAAY,WAAW,EAAA;AACt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from '@angular/common/http';
|
|
4
|
+
import { provideTransloco, provideTranslocoScope, TranslocoModule } from '@ngneat/transloco';
|
|
5
|
+
|
|
6
|
+
const i18nRootFileUrl = new InjectionToken('BaseUrl');
|
|
7
|
+
|
|
8
|
+
class TranslocoHttpLoader {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.http = inject(HttpClient);
|
|
11
|
+
this.folderUrl = inject(i18nRootFileUrl);
|
|
12
|
+
}
|
|
13
|
+
getTranslation(lang) {
|
|
14
|
+
return this.http.get(`./assets/${this.folderUrl}/i18n/${lang}.json`);
|
|
15
|
+
}
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TranslocoHttpLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
17
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TranslocoHttpLoader, providedIn: 'root' }); }
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TranslocoHttpLoader, decorators: [{
|
|
20
|
+
type: Injectable,
|
|
21
|
+
args: [{ providedIn: 'root' }]
|
|
22
|
+
}] });
|
|
23
|
+
|
|
24
|
+
const i18nProvider = () => {
|
|
25
|
+
return provideTransloco({
|
|
26
|
+
config: {
|
|
27
|
+
availableLangs: ['tr', 'en'],
|
|
28
|
+
defaultLang: 'tr',
|
|
29
|
+
fallbackLang: 'tr',
|
|
30
|
+
reRenderOnLangChange: true,
|
|
31
|
+
prodMode: !isDevMode()
|
|
32
|
+
},
|
|
33
|
+
loader: TranslocoHttpLoader
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const languages = ['tr', 'en'];
|
|
38
|
+
/**
|
|
39
|
+
* @param loader `(lang: string) => import(`./i18n/${lang}.json`)` to create a relative import to the correct dir
|
|
40
|
+
*/
|
|
41
|
+
function i18nLoaderFactory(loader) {
|
|
42
|
+
return languages.reduce((acc, lang) => {
|
|
43
|
+
acc[lang] = () => loader(lang);
|
|
44
|
+
return acc;
|
|
45
|
+
}, {});
|
|
46
|
+
}
|
|
47
|
+
const providei18nScope = (scopeName, loader) => {
|
|
48
|
+
return provideTranslocoScope({
|
|
49
|
+
scope: scopeName,
|
|
50
|
+
loader: i18nLoaderFactory(loader)
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
class i18nModule {
|
|
55
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: i18nModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
56
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.2", ngImport: i0, type: i18nModule, exports: [TranslocoModule] }); }
|
|
57
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: i18nModule, providers: [i18nProvider()], imports: [TranslocoModule] }); }
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: i18nModule, decorators: [{
|
|
60
|
+
type: NgModule,
|
|
61
|
+
args: [{
|
|
62
|
+
exports: [TranslocoModule],
|
|
63
|
+
providers: [i18nProvider()]
|
|
64
|
+
}]
|
|
65
|
+
}] });
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Generated bundle index. Do not edit.
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
export { TranslocoHttpLoader, i18nLoaderFactory, i18nModule, i18nProvider, i18nRootFileUrl, providei18nScope };
|
|
72
|
+
//# sourceMappingURL=aril-i18n.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aril-i18n.mjs","sources":["../../projects/aril/i18n/src/file-url-token.ts","../../projects/aril/i18n/src/loader.ts","../../projects/aril/i18n/src/provideI18n.ts","../../projects/aril/i18n/src/provideScope.ts","../../projects/aril/i18n/src/i18n.module.ts","../../projects/aril/i18n/aril-i18n.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport const i18nRootFileUrl = new InjectionToken<string>('BaseUrl');\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\n\r\nimport { Translation, TranslocoLoader } from '@ngneat/transloco';\r\nimport { i18nRootFileUrl } from './file-url-token';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TranslocoHttpLoader implements TranslocoLoader {\r\n\tprivate http = inject(HttpClient);\r\n\tprivate folderUrl = inject(i18nRootFileUrl);\r\n\r\n\tgetTranslation(lang: string) {\r\n\t\treturn this.http.get<Translation>(`./assets/${this.folderUrl}/i18n/${lang}.json`);\r\n\t}\r\n}\r\n","import { EnvironmentProviders, isDevMode } from '@angular/core';\r\nimport { provideTransloco } from '@ngneat/transloco';\r\n\r\nimport { TranslocoHttpLoader } from './loader';\r\n\r\nexport const i18nProvider = (): EnvironmentProviders[] => {\r\n\treturn provideTransloco({\r\n\t\tconfig: {\r\n\t\t\tavailableLangs: ['tr', 'en'],\r\n\t\t\tdefaultLang: 'tr',\r\n\t\t\tfallbackLang: 'tr',\r\n\t\t\treRenderOnLangChange: true,\r\n\t\t\tprodMode: !isDevMode()\r\n\t\t},\r\n\t\tloader: TranslocoHttpLoader\r\n\t});\r\n};\r\n","import { provideTranslocoScope } from '@ngneat/transloco';\r\n\r\nconst languages = ['tr', 'en'];\r\n\r\n/**\r\n * @param loader `(lang: string) => import(`./i18n/${lang}.json`)` to create a relative import to the correct dir\r\n */\r\nexport function i18nLoaderFactory(loader: (lang: string) => Promise<any>) {\r\n\treturn languages.reduce((acc: any, lang) => {\r\n\t\tacc[lang] = () => loader(lang);\r\n\t\treturn acc;\r\n\t}, {});\r\n}\r\n\r\nexport const providei18nScope = (scopeName: string, loader: (lang: string) => Promise<any>) => {\r\n\treturn provideTranslocoScope({\r\n\t\tscope: scopeName,\r\n\t\tloader: i18nLoaderFactory(loader)\r\n\t});\r\n};\r\n","import { NgModule } from '@angular/core';\r\n\r\nimport { TranslocoModule } from '@ngneat/transloco';\r\n\r\nimport { i18nProvider } from './provideI18n';\r\n\r\n@NgModule({\r\n\texports: [TranslocoModule],\r\n\tproviders: [i18nProvider()]\r\n})\r\nexport class i18nModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAEa,eAAe,GAAG,IAAI,cAAc,CAAS,SAAS;;MCKtD,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;AAES,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC1B,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAK5C,KAAA;AAHA,IAAA,cAAc,CAAC,IAAY,EAAA;AAC1B,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAc,CAAA,SAAA,EAAY,IAAI,CAAC,SAAS,CAAA,MAAA,EAAS,IAAI,CAAA,KAAA,CAAO,CAAC,CAAC;KAClF;8GANW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cADN,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACD3B,MAAM,YAAY,GAAG,MAA6B;AACxD,IAAA,OAA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A,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,aAFX,CAAC,YAAY,EAAE,CAAC,YADjB,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGb,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,eAAe,CAAC;AAC1B,oBAAA,SAAS,EAAE,CAAC,YAAY,EAAE,CAAC;AAC3B,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -20,11 +20,11 @@ class ButtonComponent {
|
|
|
20
20
|
this.styleClass = `${this.raised ? `p-button-raised` : ''} ${this.outlined ? `p-button-outlined` : ''} ${this.size ? `p-button-${this.size}` : ''} ${this.color}`;
|
|
21
21
|
}
|
|
22
22
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.1.2", type: ButtonComponent, isStandalone: true, selector: "aril-button:not([click])", inputs: { label: "label", loading: "loading", disabled: "disabled", raised: "raised", outlined: "outlined", badge: "badge", size: "size", icon: ["icon", "icon", iconTransform], color: ["color", "color", colorTransform] }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<p-button\n\t[label]=\"label\"\n\t[badge]=\"badge\"\n\t[icon]=\"icon\"\n\ticonPos=\"left\"\n\t[disabled]=\"disabled\"\n\t[styleClass]=\"styleClass\"\n\t[loading]=\"loading\"\n\t(onClick)=\"clickEvent.emit(
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.1.2", type: ButtonComponent, isStandalone: true, selector: "aril-button:not([click])", inputs: { label: "label", loading: "loading", disabled: "disabled", raised: "raised", outlined: "outlined", badge: "badge", size: "size", icon: ["icon", "icon", iconTransform], color: ["color", "color", colorTransform] }, outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<p-button\n\t[label]=\"label\"\n\t[badge]=\"badge\"\n\t[icon]=\"icon\"\n\ticonPos=\"left\"\n\t[disabled]=\"disabled\"\n\t[styleClass]=\"styleClass\"\n\t[loading]=\"loading\"\n\t(onClick)=\"clickEvent.emit()\">\n</p-button>\n", dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "size", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
24
24
|
}
|
|
25
25
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
26
26
|
type: Component,
|
|
27
|
-
args: [{ standalone: true, selector: 'aril-button:not([click])', imports: [ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-button\n\t[label]=\"label\"\n\t[badge]=\"badge\"\n\t[icon]=\"icon\"\n\ticonPos=\"left\"\n\t[disabled]=\"disabled\"\n\t[styleClass]=\"styleClass\"\n\t[loading]=\"loading\"\n\t(onClick)=\"clickEvent.emit(
|
|
27
|
+
args: [{ standalone: true, selector: 'aril-button:not([click])', imports: [ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-button\n\t[label]=\"label\"\n\t[badge]=\"badge\"\n\t[icon]=\"icon\"\n\ticonPos=\"left\"\n\t[disabled]=\"disabled\"\n\t[styleClass]=\"styleClass\"\n\t[loading]=\"loading\"\n\t(onClick)=\"clickEvent.emit()\">\n</p-button>\n" }]
|
|
28
28
|
}], propDecorators: { label: [{
|
|
29
29
|
type: Input
|
|
30
30
|
}], loading: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aril-ui-button.mjs","sources":["../../projects/aril/ui/button/src/button.component.ts","../../projects/aril/ui/button/src/button.component.html","../../projects/aril/ui/button/src/split-button.component.ts","../../projects/aril/ui/button/src/split-button.component.html","../../projects/aril/ui/button/aril-ui-button.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { ButtonModule } from 'primeng/button';\n\nimport { PrimeIcon, iconTransform } from 'aril/ui/lib';\n\n/* TODO : \n 1. InputSignal\n*/\n\ntype Size = 'sm' | 'md' | 'lg';\nexport type Colors = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'help' | 'danger';\n\nexport function colorTransform(color: Colors): string {\n\treturn `p-button-${color}`;\n}\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-button:not([click])',\n\ttemplateUrl: './button.component.html',\n\timports: [ButtonModule],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ButtonComponent implements OnInit {\n\t@Input() label!: string;\n\t@Input() loading!: boolean;\n\t@Input() disabled!: boolean;\n\t@Input() raised = true;\n\t@Input() outlined!: boolean;\n\t@Input() badge!: string;\n\t@Input() size: Size = 'md';\n\t@Input({ transform: iconTransform }) icon!: PrimeIcon;\n\t@Input({ required: true, transform: colorTransform }) color!: Colors;\n\n\t@Output() clickEvent: EventEmitter<
|
|
1
|
+
{"version":3,"file":"aril-ui-button.mjs","sources":["../../projects/aril/ui/button/src/button.component.ts","../../projects/aril/ui/button/src/button.component.html","../../projects/aril/ui/button/src/split-button.component.ts","../../projects/aril/ui/button/src/split-button.component.html","../../projects/aril/ui/button/aril-ui-button.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\nimport { ButtonModule } from 'primeng/button';\n\nimport { PrimeIcon, iconTransform } from 'aril/ui/lib';\n\n/* TODO : \n 1. InputSignal\n*/\n\ntype Size = 'sm' | 'md' | 'lg';\nexport type Colors = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'help' | 'danger';\n\nexport function colorTransform(color: Colors): string {\n\treturn `p-button-${color}`;\n}\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-button:not([click])',\n\ttemplateUrl: './button.component.html',\n\timports: [ButtonModule],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ButtonComponent implements OnInit {\n\t@Input() label!: string;\n\t@Input() loading!: boolean;\n\t@Input() disabled!: boolean;\n\t@Input() raised = true;\n\t@Input() outlined!: boolean;\n\t@Input() badge!: string;\n\t@Input() size: Size = 'md';\n\t@Input({ transform: iconTransform }) icon!: PrimeIcon;\n\t@Input({ required: true, transform: colorTransform }) color!: Colors;\n\n\t@Output() clickEvent: EventEmitter<never> = new EventEmitter<never>();\n\n\tstyleClass = '';\n\n\tngOnInit() {\n\t\tthis.styleClass = `${this.raised ? `p-button-raised` : ''} ${this.outlined ? `p-button-outlined` : ''} ${this.size ? `p-button-${this.size}` : ''} ${this.color}`;\n\t}\n}\n","<p-button\n\t[label]=\"label\"\n\t[badge]=\"badge\"\n\t[icon]=\"icon\"\n\ticonPos=\"left\"\n\t[disabled]=\"disabled\"\n\t[styleClass]=\"styleClass\"\n\t[loading]=\"loading\"\n\t(onClick)=\"clickEvent.emit()\">\n</p-button>\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { MenuItem } from 'primeng/api';\nimport { SplitButtonModule } from 'primeng/splitbutton';\n\nimport { ButtonComponent } from './button.component';\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-split-button',\n\ttemplateUrl: './split-button.component.html',\n\timports: [SplitButtonModule],\n\tchangeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SplitButtonComponent extends ButtonComponent {\n\tmenu = input.required<MenuItem[]>();\n}\n","<p-splitButton [label]=\"label\" [icon]=\"icon\" [styleClass]=\"styleClass\" [model]=\"menu()\" [disabled]=\"disabled\">\n</p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eAAA,EACX,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,8IAAA,EAAA,CAAA;;;AEZhD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component,
|
|
2
|
+
import { Component, Input } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/forms';
|
|
4
4
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import * as i4 from 'primeng/calendar';
|
|
@@ -88,11 +88,11 @@ class CalendarComponent extends BaseInputComponent {
|
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CalendarComponent, deps: [{ token: i1.PrimeNGConfig }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
91
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: CalendarComponent, isStandalone: true, selector: "aril-calendar[ngModel], aril-calendar[formControl], aril-calendar[formControlName]", inputs: { minDate: "minDate", maxDate: "maxDate", inline: "inline", showIcon: "showIcon", showTime: "showTime", showWeek: "showWeek", showSeconds: "showSeconds", disabledDates: "disabledDates", view: "view", selectionMode: "selectionMode", tabindex: "tabindex" }, usesInheritance: true, usesOnChanges: true, hostDirectives: [{ directive: i2.ValueAccessorDirective }], ngImport: i0, template: "<p-calendar\n\t[showIcon]=\"true\"\n\t[dateFormat]=\"dateFormat\"\n\t[showButtonBar]=\"true\"\n\t[minDate]=\"minJSDate\"\n\t[maxDate]=\"maxJSDate\"\n\t[tabindex]=\"tabindex\"\n\t[disabledDates]=\"selectedDisabledDates\"\n\t[selectionMode]=\"selectionMode\"\n\t[readonlyInput]=\"true\"\n\t[showTime]=\"showTime\"\n\t[showSeconds]=\"showSeconds\"\n\t[inline]=\"inline\"\n\t[showWeek]=\"showWeek\"\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\t<ng-template pTemplate=\"header\">\n\t\t<ng-content select=\"[calendarHeader]\"></ng-content>\n\t</ng-template>\n\t<ng-template pTemplate=\"footer\">\n\t\t<ng-content select=\"[calendarFooter]\"></ng-content>\n\t</ng-template>\n</p-calendar>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i4.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i5.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" }]
|
|
91
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: CalendarComponent, isStandalone: true, selector: "aril-calendar[ngModel], aril-calendar[formControl], aril-calendar[formControlName]", inputs: { minDate: "minDate", maxDate: "maxDate", inline: "inline", showIcon: "showIcon", showTime: "showTime", showWeek: "showWeek", showSeconds: "showSeconds", disabledDates: "disabledDates", view: "view", selectionMode: "selectionMode", tabindex: "tabindex" }, usesInheritance: true, usesOnChanges: true, hostDirectives: [{ directive: i2.ValueAccessorDirective }], ngImport: i0, template: "<p-calendar\n\t[showIcon]=\"true\"\n\t[dateFormat]=\"dateFormat\"\n\t[showButtonBar]=\"true\"\n\t[minDate]=\"minJSDate\"\n\t[maxDate]=\"maxJSDate\"\n\t[tabindex]=\"tabindex\"\n\t[disabledDates]=\"selectedDisabledDates\"\n\t[selectionMode]=\"selectionMode\"\n\t[readonlyInput]=\"true\"\n\t[showTime]=\"showTime\"\n\t[showSeconds]=\"showSeconds\"\n\t[inline]=\"inline\"\n\t[showWeek]=\"showWeek\"\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\t<ng-template pTemplate=\"header\">\n\t\t<ng-content select=\"[calendarHeader]\"></ng-content>\n\t</ng-template>\n\t<ng-template pTemplate=\"footer\">\n\t\t<ng-content select=\"[calendarFooter]\"></ng-content>\n\t</ng-template>\n</p-calendar>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CalendarModule }, { kind: "component", type: i4.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i5.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" }] }); }
|
|
92
92
|
}
|
|
93
93
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
94
94
|
type: Component,
|
|
95
|
-
args: [{ standalone: true, selector: 'aril-calendar[ngModel], aril-calendar[formControl], aril-calendar[formControlName]', imports: [ReactiveFormsModule, CalendarModule, TooltipModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective],
|
|
95
|
+
args: [{ standalone: true, selector: 'aril-calendar[ngModel], aril-calendar[formControl], aril-calendar[formControlName]', imports: [ReactiveFormsModule, CalendarModule, TooltipModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective], template: "<p-calendar\n\t[showIcon]=\"true\"\n\t[dateFormat]=\"dateFormat\"\n\t[showButtonBar]=\"true\"\n\t[minDate]=\"minJSDate\"\n\t[maxDate]=\"maxJSDate\"\n\t[tabindex]=\"tabindex\"\n\t[disabledDates]=\"selectedDisabledDates\"\n\t[selectionMode]=\"selectionMode\"\n\t[readonlyInput]=\"true\"\n\t[showTime]=\"showTime\"\n\t[showSeconds]=\"showSeconds\"\n\t[inline]=\"inline\"\n\t[showWeek]=\"showWeek\"\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\t<ng-template pTemplate=\"header\">\n\t\t<ng-content select=\"[calendarHeader]\"></ng-content>\n\t</ng-template>\n\t<ng-template pTemplate=\"footer\">\n\t\t<ng-content select=\"[calendarFooter]\"></ng-content>\n\t</ng-template>\n</p-calendar>\n" }]
|
|
96
96
|
}], ctorParameters: () => [{ type: i1.PrimeNGConfig }], propDecorators: { minDate: [{
|
|
97
97
|
type: Input
|
|
98
98
|
}], maxDate: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aril-ui-calendar.mjs","sources":["../../projects/aril/ui/calendar/src/calendar.component.ts","../../projects/aril/ui/calendar/src/calendar.component.html","../../projects/aril/ui/calendar/aril-ui-calendar.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/* TODOS \n 1. InputSignal\n 2. Adjust different color or background for weekends\n*/\n\nimport {
|
|
1
|
+
{"version":3,"file":"aril-ui-calendar.mjs","sources":["../../projects/aril/ui/calendar/src/calendar.component.ts","../../projects/aril/ui/calendar/src/calendar.component.html","../../projects/aril/ui/calendar/aril-ui-calendar.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/* TODOS \n 1. InputSignal\n 2. Adjust different color or background for weekends\n*/\n\nimport { Component, Input, OnChanges } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { CalendarModule } from 'primeng/calendar';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { PrimeNGConfig } from 'primeng/api';\n\nimport { Types } from 'aril/util/lib';\nimport { BaseInputComponent, InputErrorMessagePipe, ValueAccessorDirective } from 'aril/ui/lib';\nimport 'aril/util/primitive-extensions';\n\ntype View = 'date' | 'month' | 'year';\ntype SelectionMode = 'single' | 'multiple' | 'range';\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-calendar[ngModel], aril-calendar[formControl], aril-calendar[formControlName]',\n\ttemplateUrl: './calendar.component.html',\n\timports: [ReactiveFormsModule, CalendarModule, TooltipModule, InputErrorMessagePipe],\n\thostDirectives: [ValueAccessorDirective]\n})\nexport class CalendarComponent extends BaseInputComponent implements OnChanges {\n\tconstructor(private primeNgConfig: PrimeNGConfig) {\n\t\tsuper();\n\t\tthis.setLocale();\n\t}\n\n\t@Input() minDate!: number;\n\t@Input() maxDate!: number;\n\t@Input() inline!: boolean;\n\t@Input() showIcon!: boolean;\n\t@Input() showTime!: boolean;\n\t@Input() showWeek!: boolean;\n\t@Input() showSeconds!: boolean;\n\t@Input() disabledDates: number[] = [];\n\t@Input() view: View = 'date';\n\t@Input() selectionMode: SelectionMode = 'single';\n\t@Input() tabindex!: number;\n\n\tminJSDate!: Date;\n\tmaxJSDate!: Date;\n\tdateFormat = 'dd/MM/yy';\n\tselectedDisabledDates: Date[] = [];\n\n\tngOnChanges(changes: Types.NgChanges<CalendarComponent>): void {\n\t\tif (changes.minDate) {\n\t\t\tthis.minJSDate = this.minDate.longToDate() as Date;\n\t\t}\n\t\tif (changes.maxDate) {\n\t\t\tthis.maxJSDate = this.minDate.longToDate() as Date;\n\t\t}\n\t\tif (changes.disabledDates?.currentValue.length) {\n\t\t\tthis.selectedDisabledDates = this.disabledDates.map((value: number) => value.longToDate() as Date);\n\t\t}\n\t\tif (changes.view) {\n\t\t\tswitch (this.view) {\n\t\t\t\tcase 'month':\n\t\t\t\t\tthis.dateFormat = 'MM/yy';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'year':\n\t\t\t\t\tthis.dateFormat = 'yy';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.dateFormat = 'dd/MM/yy';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// isWeekend(date: any): boolean {\n\t// if (!date) {\n\t// return false;\n\t// }\n\n\t// if (this.view == 'date') {\n\t// const dayOfWeek = date.getDay();\n\t// return dayOfWeek === 5 || dayOfWeek === 6;\n\t// }\n\t// }\n\n\tsetLocale() {\n\t\tthis.primeNgConfig.setTranslation({\n\t\t\tfirstDayOfWeek: 0,\n\t\t\tdayNames: ['Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi', 'Pazar'],\n\t\t\tdayNamesMin: ['Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt', 'Pzr'],\n\t\t\tdayNamesShort: ['Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt', 'Pzr'],\n\t\t\tmonthNames: [\n\t\t\t\t'Ocak',\n\t\t\t\t'Şubat',\n\t\t\t\t'Mart',\n\t\t\t\t'Nisan',\n\t\t\t\t'Mayıs',\n\t\t\t\t'Haziran',\n\t\t\t\t'Temmuz',\n\t\t\t\t'Ağustos',\n\t\t\t\t'Eylül',\n\t\t\t\t'Ekim',\n\t\t\t\t'Kasım',\n\t\t\t\t'Aralık'\n\t\t\t],\n\t\t\tmonthNamesShort: ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'],\n\t\t\ttoday: 'Bugün',\n\t\t\tclear: 'Temizle',\n\t\t\tdateFormat: 'dd/mm/yy',\n\t\t\tweekHeader: 'Hafta'\n\t\t});\n\t}\n}\n","<p-calendar\n\t[showIcon]=\"true\"\n\t[dateFormat]=\"dateFormat\"\n\t[showButtonBar]=\"true\"\n\t[minDate]=\"minJSDate\"\n\t[maxDate]=\"maxJSDate\"\n\t[tabindex]=\"tabindex\"\n\t[disabledDates]=\"selectedDisabledDates\"\n\t[selectionMode]=\"selectionMode\"\n\t[readonlyInput]=\"true\"\n\t[showTime]=\"showTime\"\n\t[showSeconds]=\"showSeconds\"\n\t[inline]=\"inline\"\n\t[showWeek]=\"showWeek\"\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\t<ng-template pTemplate=\"header\">\n\t\t<ng-content select=\"[calendarHeader]\"></ng-content>\n\t</ng-template>\n\t<ng-template pTemplate=\"footer\">\n\t\t<ng-content select=\"[calendarFooter]\"></ng-content>\n\t</ng-template>\n</p-calendar>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AAEA;;;AAGE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AAC,EACpE,cAAA,EAAA,CAAC,sBAAsB,CAAC,EAAA,QAAA,EAAA,i3BAAA,EAAA,CAAA;kFAQ/B,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,MAAM,EAAA,CAAA;sBAAd,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;;;AE5CP;;AAEG;;;;"}
|
|
@@ -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';
|
|
@@ -18,11 +18,11 @@ class CheckboxComponent extends BaseInputComponent {
|
|
|
18
18
|
this.tabindex = input();
|
|
19
19
|
}
|
|
20
20
|
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" }]
|
|
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" }] }); }
|
|
22
22
|
}
|
|
23
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
24
24
|
type: Component,
|
|
25
|
-
args: [{ standalone: true, selector: 'aril-checkbox[ngModel], aril-checkbox[formControl], aril-checkbox[formControlName]', imports: [ReactiveFormsModule, CheckboxModule, TooltipModule, InputErrorMessagePipe], hostDirectives: [ValueAccessorDirective],
|
|
25
|
+
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
26
|
}] });
|
|
27
27
|
|
|
28
28
|
class TriStateCheckboxComponent extends BaseInputComponent {
|
|
@@ -32,11 +32,11 @@ class TriStateCheckboxComponent extends BaseInputComponent {
|
|
|
32
32
|
this.tabindex = input();
|
|
33
33
|
}
|
|
34
34
|
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" }]
|
|
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" }] }); }
|
|
36
36
|
}
|
|
37
37
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: TriStateCheckboxComponent, decorators: [{
|
|
38
38
|
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],
|
|
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], 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
40
|
}] });
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -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@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@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":";;;;;;;;;;;;;AAeM,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,KAAA;8GAHY,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,e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ACG,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;;;AEdzC;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component,
|
|
2
|
+
import { EventEmitter, Component, Input, 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';
|
|
@@ -35,11 +35,11 @@ class FileUploadComponent {
|
|
|
35
35
|
this.messageService.add({ severity: 'success', summary: 'Dosya başarıyla yüklendi..', detail: '' });
|
|
36
36
|
}
|
|
37
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", tabindex: "tabindex", withCredentials: "withCredentials", showUploadButton: "showUploadButton", showCancelButton: "showCancelButton", cancelLabel: "cancelLabel", chooseLabel: "chooseLabel", uploadLabel: "uploadLabel", invalidFileTypeMessageSummary: "invalidFileTypeMessageSummary", invalidFileTypeMessageDetail: "invalidFileTypeMessageDetail", invalidFileSizeMessageSummary: "invalidFileSizeMessageSummary", invalidFileSizeMessageDetail: "invalidFileSizeMessageDetail" }, outputs: { beforeSend: "beforeSend", upload: "upload", errors: "errors", selects: "selects", clear: "clear" }, providers: [MessageService], ngImport: i0, template: "<p-fileUpload\n\t[name]=\"name\"\n\t[url]=\"url\"\n\tmethod=\"post\"\n\t[multiple]=\"multiple\"\n\t[accept]=\"accept\"\n\t[disabled]=\"disabled\"\n\t[auto]=\"auto\"\n\t[maxFileSize]=\"maxFileSize\"\n\t[tabindex]=\"tabindex\"\n\t[withCredentials]=\"withCredentials\"\n\t[showUploadButton]=\"showUploadButton\"\n\t[showCancelButton]=\"showCancelButton\"\n\t[chooseLabel]=\"chooseLabel\"\n\t[cancelLabel]=\"cancelLabel\"\n\t[uploadLabel]=\"uploadLabel\"\n\t[invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary\"\n\t[invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail\"\n\t[invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary\"\n\t[invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail\"\n\t(onBeforeSend)=\"beforeSend.emit($event)\"\n\t(onUpload)=\"onUpload($event)\"\n\t(onError)=\"errors.emit($event)\"\n\t(onSelect)=\"selects.emit($event)\"\n\t(onClear)=\"clear.emit($event)\">\n\t<ng-template pTemplate=\"content\">\n\t\t@if (uploadedFiles.length) {\n\t\t\t<div class=\"flex flex-column\">\n\t\t\t\t@for (file of uploadedFiles; track file) {\n\t\t\t\t\t<div class=\"mt-2\">\n\t\t\t\t\t\t<i class=\"pi pi-file-excel\" style=\"color: slateblue; font-size: 1.4rem\"></i>\n\t\t\t\t\t\t{{ file.name }} - {{ file.size }} bytes\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</ng-template>\n\t<ng-content></ng-content>\n</p-fileUpload>\n", dependencies: [{ kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i2.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError"] }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }]
|
|
38
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: FileUploadComponent, isStandalone: true, selector: "aril-file-upload", inputs: { name: "name", url: "url", multiple: "multiple", accept: "accept", disabled: "disabled", auto: "auto", maxFileSize: "maxFileSize", tabindex: "tabindex", withCredentials: "withCredentials", showUploadButton: "showUploadButton", showCancelButton: "showCancelButton", cancelLabel: "cancelLabel", chooseLabel: "chooseLabel", uploadLabel: "uploadLabel", invalidFileTypeMessageSummary: "invalidFileTypeMessageSummary", invalidFileTypeMessageDetail: "invalidFileTypeMessageDetail", invalidFileSizeMessageSummary: "invalidFileSizeMessageSummary", invalidFileSizeMessageDetail: "invalidFileSizeMessageDetail" }, outputs: { beforeSend: "beforeSend", upload: "upload", errors: "errors", selects: "selects", clear: "clear" }, providers: [MessageService], ngImport: i0, template: "<p-fileUpload\n\t[name]=\"name\"\n\t[url]=\"url\"\n\tmethod=\"post\"\n\t[multiple]=\"multiple\"\n\t[accept]=\"accept\"\n\t[disabled]=\"disabled\"\n\t[auto]=\"auto\"\n\t[maxFileSize]=\"maxFileSize\"\n\t[tabindex]=\"tabindex\"\n\t[withCredentials]=\"withCredentials\"\n\t[showUploadButton]=\"showUploadButton\"\n\t[showCancelButton]=\"showCancelButton\"\n\t[chooseLabel]=\"chooseLabel\"\n\t[cancelLabel]=\"cancelLabel\"\n\t[uploadLabel]=\"uploadLabel\"\n\t[invalidFileTypeMessageSummary]=\"invalidFileTypeMessageSummary\"\n\t[invalidFileTypeMessageDetail]=\"invalidFileTypeMessageDetail\"\n\t[invalidFileSizeMessageSummary]=\"invalidFileSizeMessageSummary\"\n\t[invalidFileSizeMessageDetail]=\"invalidFileSizeMessageDetail\"\n\t(onBeforeSend)=\"beforeSend.emit($event)\"\n\t(onUpload)=\"onUpload($event)\"\n\t(onError)=\"errors.emit($event)\"\n\t(onSelect)=\"selects.emit($event)\"\n\t(onClear)=\"clear.emit($event)\">\n\t<ng-template pTemplate=\"content\">\n\t\t@if (uploadedFiles.length) {\n\t\t\t<div class=\"flex flex-column\">\n\t\t\t\t@for (file of uploadedFiles; track file) {\n\t\t\t\t\t<div class=\"mt-2\">\n\t\t\t\t\t\t<i class=\"pi pi-file-excel\" style=\"color: slateblue; font-size: 1.4rem\"></i>\n\t\t\t\t\t\t{{ file.name }} - {{ file.size }} bytes\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</ng-template>\n\t<ng-content></ng-content>\n</p-fileUpload>\n", dependencies: [{ kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i2.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError"] }, { kind: "directive", type: i1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }] }); }
|
|
39
39
|
}
|
|
40
40
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
41
41
|
type: Component,
|
|
42
|
-
args: [{ standalone: true, selector: 'aril-file-upload', imports: [FileUploadModule], providers: [MessageService],
|
|
42
|
+
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)=\"errors.emit($event)\"\n\t(onSelect)=\"selects.emit($event)\"\n\t(onClear)=\"clear.emit($event)\">\n\t<ng-template pTemplate=\"content\">\n\t\t@if (uploadedFiles.length) {\n\t\t\t<div class=\"flex flex-column\">\n\t\t\t\t@for (file of uploadedFiles; track file) {\n\t\t\t\t\t<div class=\"mt-2\">\n\t\t\t\t\t\t<i class=\"pi pi-file-excel\" style=\"color: slateblue; font-size: 1.4rem\"></i>\n\t\t\t\t\t\t{{ file.name }} - {{ file.size }} bytes\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</ng-template>\n\t<ng-content></ng-content>\n</p-fileUpload>\n" }]
|
|
43
43
|
}], ctorParameters: () => [{ type: i1.MessageService }], propDecorators: { name: [{
|
|
44
44
|
type: Input
|
|
45
45
|
}], url: [{
|