@koalarx/ui 20.2.8 → 20.2.10
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/fesm2022/koalarx-ui-core-base.mjs +15 -15
- package/fesm2022/koalarx-ui-core-base.mjs.map +1 -1
- package/fesm2022/koalarx-ui-core-components-dialog.mjs +3 -3
- package/fesm2022/koalarx-ui-core-components-kl-root.mjs +4 -4
- package/fesm2022/koalarx-ui-core-components-kl-root.mjs.map +1 -1
- package/fesm2022/koalarx-ui-core-components-loader-page.mjs +7 -7
- package/fesm2022/koalarx-ui-core-components-loader-page.mjs.map +1 -1
- package/fesm2022/koalarx-ui-core-components-loader.mjs +4 -4
- package/fesm2022/koalarx-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/koalarx-ui-core-components-side-window.mjs +3 -3
- package/fesm2022/koalarx-ui-core-components-snackbar.mjs +3 -3
- package/fesm2022/koalarx-ui-core-guards.mjs +3 -3
- package/fesm2022/koalarx-ui-core-translations.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-accordion.mjs +4 -4
- package/fesm2022/koalarx-ui-shared-components-accordion.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-alert.mjs +6 -6
- package/fesm2022/koalarx-ui-shared-components-alert.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-code-viewer.mjs +10 -10
- package/fesm2022/koalarx-ui-shared-components-code-viewer.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-collapse.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-confirm.mjs +6 -6
- package/fesm2022/koalarx-ui-shared-components-confirm.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-datatable.mjs +47 -47
- package/fesm2022/koalarx-ui-shared-components-datatable.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-dialog.mjs +10 -10
- package/fesm2022/koalarx-ui-shared-components-dialog.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-dropdown.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-dropdown.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-field-errors.mjs +4 -4
- package/fesm2022/koalarx-ui-shared-components-field-errors.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-horizontal-menu.mjs +7 -7
- package/fesm2022/koalarx-ui-shared-components-horizontal-menu.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-autocomplete.mjs +57 -64
- package/fesm2022/koalarx-ui-shared-components-input-field-autocomplete.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-field-group.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-fieldset.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-input-checkbox.mjs +6 -6
- package/fesm2022/koalarx-ui-shared-components-input-field-input-checkbox.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-cnpj.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-input-cpf.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-input-currency.mjs +4 -4
- package/fesm2022/koalarx-ui-shared-components-input-field-input-currency.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-date.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-input-field-input-date.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-datetime.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-input-field-input-datetime.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-email.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-input-month.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-input-field-input-month.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-password.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-input-field-input-password.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-radio.mjs +9 -9
- package/fesm2022/koalarx-ui-shared-components-input-field-input-radio.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-text.mjs +4 -4
- package/fesm2022/koalarx-ui-shared-components-input-field-input-text.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-time.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-input-field-input-time.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-url.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-select.mjs +4 -4
- package/fesm2022/koalarx-ui-shared-components-input-field-select.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-switcher.mjs +6 -6
- package/fesm2022/koalarx-ui-shared-components-input-field-switcher.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-textarea.mjs +6 -6
- package/fesm2022/koalarx-ui-shared-components-input-field-textarea.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field.mjs +15 -15
- package/fesm2022/koalarx-ui-shared-components-input-field.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-on-this-page.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-on-this-page.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-side-window.mjs +9 -9
- package/fesm2022/koalarx-ui-shared-components-snackbar.mjs +15 -15
- package/fesm2022/koalarx-ui-shared-components-snackbar.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-stepper.mjs +13 -13
- package/fesm2022/koalarx-ui-shared-components-stepper.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-vertical-menu.mjs +7 -7
- package/fesm2022/koalarx-ui-shared-components-vertical-menu.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-directives.mjs +28 -28
- package/fesm2022/koalarx-ui-shared-directives.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-services.mjs +7 -7
- package/fesm2022/koalarx-ui-shared-services.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-utils.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-utils.mjs.map +1 -1
- package/fesm2022/koalarx-ui.mjs +6 -6
- package/package.json +18 -18
|
@@ -90,19 +90,19 @@ class ListBase {
|
|
|
90
90
|
reloading = false;
|
|
91
91
|
currentPaginationType = 'paginator';
|
|
92
92
|
resourceRef;
|
|
93
|
-
limitPage = signal(30);
|
|
94
|
-
page = signal(1);
|
|
95
|
-
filter = signal({});
|
|
93
|
+
limitPage = signal(30, ...(ngDevMode ? [{ debugName: "limitPage" }] : []));
|
|
94
|
+
page = signal(1, ...(ngDevMode ? [{ debugName: "page" }] : []));
|
|
95
|
+
filter = signal({}, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
96
96
|
resource;
|
|
97
|
-
totalItemsOnPage = signal(0);
|
|
98
|
-
totalItems = signal(0);
|
|
99
|
-
list = signal([]);
|
|
100
|
-
sortFilter = signal(null);
|
|
101
|
-
paginationType = model('paginator');
|
|
97
|
+
totalItemsOnPage = signal(0, ...(ngDevMode ? [{ debugName: "totalItemsOnPage" }] : []));
|
|
98
|
+
totalItems = signal(0, ...(ngDevMode ? [{ debugName: "totalItems" }] : []));
|
|
99
|
+
list = signal([], ...(ngDevMode ? [{ debugName: "list" }] : []));
|
|
100
|
+
sortFilter = signal(null, ...(ngDevMode ? [{ debugName: "sortFilter" }] : []));
|
|
101
|
+
paginationType = model('paginator', ...(ngDevMode ? [{ debugName: "paginationType" }] : []));
|
|
102
102
|
withPagination = computed(() => {
|
|
103
103
|
this.currentPaginationType = this.paginationType();
|
|
104
104
|
return this.currentPaginationType === 'paginator';
|
|
105
|
-
});
|
|
105
|
+
}, ...(ngDevMode ? [{ debugName: "withPagination" }] : []));
|
|
106
106
|
datatableConfig = linkedSignal(() => ({
|
|
107
107
|
currentPage: this.page(),
|
|
108
108
|
totalItems: this.totalItems(),
|
|
@@ -116,8 +116,8 @@ class ListBase {
|
|
|
116
116
|
limit: this.limitPage(),
|
|
117
117
|
...(this.sortFilter() ?? {}),
|
|
118
118
|
...this.filter(),
|
|
119
|
-
}));
|
|
120
|
-
reload = input(false);
|
|
119
|
+
}), ...(ngDevMode ? [{ debugName: "queryParams" }] : []));
|
|
120
|
+
reload = input(false, ...(ngDevMode ? [{ debugName: "reload" }] : []));
|
|
121
121
|
constructor(
|
|
122
122
|
// eslint-disable-next-line @angular-eslint/prefer-inject
|
|
123
123
|
resource,
|
|
@@ -181,15 +181,15 @@ class ListBase {
|
|
|
181
181
|
loadMore() {
|
|
182
182
|
this.page.update((current) => current + 1);
|
|
183
183
|
}
|
|
184
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
185
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ListBase, deps: [{ token: i0.Type }, { token: i0.Type }], target: i0.ɵɵFactoryTarget.Directive });
|
|
185
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.6", type: ListBase, isStandalone: true, inputs: { paginationType: { classPropertyName: "paginationType", publicName: "paginationType", isSignal: true, isRequired: false, transformFunction: null }, reload: { classPropertyName: "reload", publicName: "reload", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { paginationType: "paginationTypeChange" }, ngImport: i0 });
|
|
186
186
|
}
|
|
187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: ListBase, decorators: [{
|
|
188
188
|
type: Directive
|
|
189
189
|
}], ctorParameters: () => [{ type: i0.Type }, { type: i0.Type }] });
|
|
190
190
|
|
|
191
191
|
class PageBase {
|
|
192
|
-
reload = signal(false);
|
|
192
|
+
reload = signal(false, ...(ngDevMode ? [{ debugName: "reload" }] : []));
|
|
193
193
|
reloadList() {
|
|
194
194
|
this.reload.set(true);
|
|
195
195
|
setTimeout(() => this.reload.set(false));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-core-base.mjs","sources":["../../projects/koala-ui/core/base/http-base.ts","../../projects/koala-ui/core/base/list-base.ts","../../projects/koala-ui/core/base/page-base.ts","../../projects/koala-ui/core/base/koalarx-ui-core-base.ts"],"sourcesContent":["import { HttpClient, httpResource } from '@angular/common/http';\nimport { inject, Injector, Signal } from '@angular/core';\nimport { rxResource } from '@angular/core/rxjs-interop';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { GetManyResult } from '@koalarx/ui/core/models';\nimport { AutocompleteOption } from '@koalarx/ui/shared/components/input-field/autocomplete';\nimport { SelectOption } from '@koalarx/ui/shared/components/input-field/select';\nimport { first } from 'rxjs/internal/operators/first';\nimport { map } from 'rxjs/internal/operators/map';\n\nexport interface HttpResourceRequestOptions<EntityType> {\n debounceTime?: number;\n endpoint?: string;\n mapOption?: (\n item: any\n ) => Omit<\n | AutocompleteOption<EntityType>\n | SelectOption<EntityType>\n | GetManyResult<EntityType>,\n 'data'\n >;\n}\n\nexport abstract class HttpBase<\n EntityType = any,\n PayloadType = any,\n QueryType = any\n> {\n private readonly appConfig = inject(AppConfig);\n protected readonly injector = inject(Injector);\n protected readonly http = inject(HttpClient);\n protected readonly url: string;\n protected readonly hostApi: string;\n\n constructor(protected readonly resource: string, hostApi?: string) {\n this.hostApi = hostApi || this.appConfig.hostApi || '';\n this.url = `${this.hostApi}/${this.resource}`;\n }\n\n post<T>(data: PayloadType, endpoint = '') {\n return this.http.post<T>(`${this.url}${endpoint}`, data).pipe(first());\n }\n\n put<T>(id: string, data: PayloadType) {\n return this.http.put<T>(`${this.url}/${id}`, data).pipe(first());\n }\n\n patch<T>(id: string, data: any) {\n return this.http.patch<T>(`${this.url}/${id}`, data).pipe(first());\n }\n\n delete<T>(id: string) {\n return this.http.delete<T>(`${this.url}/${id}`).pipe(first());\n }\n\n getMany<TResponse = EntityType>(query: QueryType, endpoint = '') {\n return this.http.get<GetManyResult<TResponse>>(`${this.url}${endpoint}`, {\n params: query as any,\n });\n }\n\n getById<TResponse = EntityType>(id: string | null) {\n return this.http.get<TResponse>(`${this.url}/${id}`);\n }\n\n getManyWithResource<TResponse = EntityType>(\n query: Signal<QueryType>,\n {\n endpoint = '',\n mapOption,\n }: Omit<HttpResourceRequestOptions<TResponse>, 'debounceTime'> = {}\n ) {\n return httpResource<GetManyResult<TResponse>>(\n () => {\n return {\n url: `${this.url}${endpoint}`,\n params: query() as any,\n };\n },\n {\n parse: mapOption as (data: any) => any,\n }\n );\n }\n\n getByIdWithResource<TResponse = EntityType>(\n id: Signal<string | null>,\n endpoint = ':id',\n mapResponse?: (response: TResponse) => TResponse\n ) {\n return httpResource<TResponse>(\n () => {\n const resourceId = id();\n\n if (!resourceId) {\n return undefined;\n }\n\n return `${this.url}/${endpoint.replace(':id', resourceId)}`;\n },\n {\n parse: mapResponse as (resume: any) => TResponse,\n }\n );\n }\n\n getByOneWithResource<TResponse = EntityType>(\n endpoint: Signal<string | null>,\n params?: Signal<any>,\n mapResponse?: (response: TResponse) => TResponse\n ) {\n return httpResource<TResponse>(\n () => {\n const resourceUrl = endpoint();\n\n if (!resourceUrl) {\n return undefined;\n }\n\n return {\n url: `${this.url}/${resourceUrl}`,\n params: params ? params() : undefined,\n };\n },\n {\n parse: mapResponse as (resume: any) => TResponse,\n }\n );\n }\n\n getManyForSelector<TResponse = EntityType>(\n query: QueryType | Signal<QueryType>,\n mapOption: (\n item: TResponse\n ) => Omit<AutocompleteOption<TResponse> | SelectOption<TResponse>, 'data'>\n ) {\n return rxResource({\n defaultValue: [],\n params: () => (query instanceof Function ? query() : query),\n stream: (data) =>\n this.getMany<TResponse>(data.params).pipe(\n map((response) =>\n response.items.map((item) => ({\n ...mapOption(item),\n data: item,\n }))\n )\n ),\n });\n }\n}\n","import { HttpResourceRef } from '@angular/common/http';\nimport {\n computed,\n Directive,\n effect,\n inject,\n input,\n linkedSignal,\n model,\n signal,\n Type,\n} from '@angular/core';\nimport {\n GetManyResult,\n QueryPagination,\n SortFilterType,\n} from '@koalarx/ui/core/models';\nimport { DatatableConfig } from '@koalarx/ui/shared/components/datatable';\nimport { HttpBase } from './http-base';\n\ntype PaginationType = 'paginator' | 'loadMore';\n\n@Directive()\nexport abstract class ListBase<\n QueryType extends QueryPagination,\n TEntity = any\n> {\n private reloading = false;\n private currentPaginationType: PaginationType = 'paginator';\n protected readonly resourceRef: HttpResourceRef<\n GetManyResult<TEntity> | undefined\n >;\n protected readonly limitPage = signal(30);\n protected readonly page = signal(1);\n protected readonly filter = signal<QueryType>({} as any);\n protected readonly resource: HttpBase<TEntity, any, QueryType>;\n protected readonly totalItemsOnPage = signal(0);\n protected readonly totalItems = signal(0);\n protected readonly list = signal<TEntity[]>([]);\n protected readonly sortFilter = signal<SortFilterType | null>(null);\n protected readonly paginationType = model<PaginationType>('paginator');\n protected readonly withPagination = computed<boolean>(() => {\n this.currentPaginationType = this.paginationType();\n return this.currentPaginationType === 'paginator';\n });\n protected readonly datatableConfig = linkedSignal(\n () =>\n ({\n currentPage: this.page(),\n totalItems: this.totalItems(),\n totalItemsOnPage: this.totalItemsOnPage(),\n currentPageSize: this.limitPage(),\n isLoading: this.resourceRef.isLoading(),\n hasError: !!this.resourceRef.error(),\n } as DatatableConfig)\n );\n\n queryParams = computed<QueryType>(\n () =>\n ({\n page: this.page(),\n limit: this.limitPage(),\n ...(this.sortFilter() ?? {}),\n ...this.filter(),\n } as QueryType)\n );\n reload = input<boolean>(false);\n\n constructor(\n // eslint-disable-next-line @angular-eslint/prefer-inject\n resource: Type<HttpBase<TEntity, any, QueryType>>,\n // eslint-disable-next-line @angular-eslint/prefer-inject\n protected readonly componentFilter?: Type<any>\n ) {\n this.resource = inject(resource);\n this.resourceRef = this.resource.getManyWithResource(this.queryParams);\n\n effect(() => {\n this.filter();\n this.page.set(1);\n });\n\n effect(() => {\n const queryParams = this.queryParams();\n\n if (queryParams.page === 1 && !this.reloading) {\n this.reloading = true;\n return;\n }\n });\n\n effect(() => {\n const withPagination = this.currentPaginationType === 'paginator';\n const result = this.resourceRef.value();\n\n if (!withPagination && !this.reloading) {\n if (result) {\n this.list.update((current) => [...current, ...result.items]);\n this.totalItemsOnPage.update(\n (current) => current + result.items.length\n );\n this.totalItems.set(result.count);\n }\n this.reloading = false;\n return;\n }\n\n if (!result) {\n this.list.set([]);\n this.totalItemsOnPage.set(0);\n this.totalItems.set(0);\n this.reloading = false;\n return;\n }\n\n this.list.set(result.items);\n this.totalItemsOnPage.set(result.items.length);\n this.totalItems.set(result.count);\n this.reloading = false;\n });\n\n effect(() => {\n if (this.reload()) {\n this.reloadList();\n }\n });\n }\n\n protected sort(sortFilter: SortFilterType) {\n this.sortFilter.set(sortFilter);\n }\n\n protected reloadList() {\n this.reloading = true;\n this.list.set([]);\n this.totalItemsOnPage.set(0);\n this.totalItems.set(0);\n this.page.set(1);\n this.resourceRef.reload();\n }\n\n protected loadMore() {\n this.page.update((current) => current + 1);\n }\n}\n","import { signal } from '@angular/core';\n\nexport abstract class PageBase {\n protected reload = signal(false);\n\n protected reloadList() {\n this.reload.set(true);\n setTimeout(() => this.reload.set(false));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAuBsB,QAAQ,CAAA;AAWG,IAAA,QAAA;AANd,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC3B,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,IAAA,GAAG;AACH,IAAA,OAAO;IAE1B,WAA+B,CAAA,QAAgB,EAAE,OAAgB,EAAA;QAAlC,IAAQ,CAAA,QAAA,GAAR,QAAQ;AACrC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,IAAI,CAAC,SAAS,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EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,cAAA,EAAA,sBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAD7B;;;MCpBqB,QAAQ,CAAA;AAClB,IAAA,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC;IAEtB,UAAU,GAAA;AAClB,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;AACrB,QAAA,UAAU,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;;AAE3C;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koalarx-ui-core-base.mjs","sources":["../../projects/koala-ui/core/base/http-base.ts","../../projects/koala-ui/core/base/list-base.ts","../../projects/koala-ui/core/base/page-base.ts","../../projects/koala-ui/core/base/koalarx-ui-core-base.ts"],"sourcesContent":["import { HttpClient, httpResource } from '@angular/common/http';\nimport { inject, Injector, Signal } from '@angular/core';\nimport { rxResource } from '@angular/core/rxjs-interop';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport { GetManyResult } from '@koalarx/ui/core/models';\nimport { AutocompleteOption } from '@koalarx/ui/shared/components/input-field/autocomplete';\nimport { SelectOption } from '@koalarx/ui/shared/components/input-field/select';\nimport { first } from 'rxjs/internal/operators/first';\nimport { map } from 'rxjs/internal/operators/map';\n\nexport interface HttpResourceRequestOptions<EntityType> {\n debounceTime?: number;\n endpoint?: string;\n mapOption?: (\n item: any\n ) => Omit<\n | AutocompleteOption<EntityType>\n | SelectOption<EntityType>\n | GetManyResult<EntityType>,\n 'data'\n >;\n}\n\nexport abstract class HttpBase<\n EntityType = any,\n PayloadType = any,\n QueryType = any\n> {\n private readonly appConfig = inject(AppConfig);\n protected readonly injector = inject(Injector);\n protected readonly http = inject(HttpClient);\n protected readonly url: string;\n protected readonly hostApi: string;\n\n constructor(protected readonly resource: string, hostApi?: string) {\n this.hostApi = hostApi || this.appConfig.hostApi || '';\n this.url = `${this.hostApi}/${this.resource}`;\n }\n\n post<T>(data: PayloadType, endpoint = '') {\n return this.http.post<T>(`${this.url}${endpoint}`, data).pipe(first());\n }\n\n put<T>(id: string, data: PayloadType) {\n return this.http.put<T>(`${this.url}/${id}`, data).pipe(first());\n }\n\n patch<T>(id: string, data: any) {\n return this.http.patch<T>(`${this.url}/${id}`, data).pipe(first());\n }\n\n delete<T>(id: string) {\n return this.http.delete<T>(`${this.url}/${id}`).pipe(first());\n }\n\n getMany<TResponse = EntityType>(query: QueryType, endpoint = '') {\n return this.http.get<GetManyResult<TResponse>>(`${this.url}${endpoint}`, {\n params: query as any,\n });\n }\n\n getById<TResponse = EntityType>(id: string | null) {\n return this.http.get<TResponse>(`${this.url}/${id}`);\n }\n\n getManyWithResource<TResponse = EntityType>(\n query: Signal<QueryType>,\n {\n endpoint = '',\n mapOption,\n }: Omit<HttpResourceRequestOptions<TResponse>, 'debounceTime'> = {}\n ) {\n return httpResource<GetManyResult<TResponse>>(\n () => {\n return {\n url: `${this.url}${endpoint}`,\n params: query() as any,\n };\n },\n {\n parse: mapOption as (data: any) => any,\n }\n );\n }\n\n getByIdWithResource<TResponse = EntityType>(\n id: Signal<string | null>,\n endpoint = ':id',\n mapResponse?: (response: TResponse) => TResponse\n ) {\n return httpResource<TResponse>(\n () => {\n const resourceId = id();\n\n if (!resourceId) {\n return undefined;\n }\n\n return `${this.url}/${endpoint.replace(':id', resourceId)}`;\n },\n {\n parse: mapResponse as (resume: any) => TResponse,\n }\n );\n }\n\n getByOneWithResource<TResponse = EntityType>(\n endpoint: Signal<string | null>,\n params?: Signal<any>,\n mapResponse?: (response: TResponse) => TResponse\n ) {\n return httpResource<TResponse>(\n () => {\n const resourceUrl = endpoint();\n\n if (!resourceUrl) {\n return undefined;\n }\n\n return {\n url: `${this.url}/${resourceUrl}`,\n params: params ? params() : undefined,\n };\n },\n {\n parse: mapResponse as (resume: any) => TResponse,\n }\n );\n }\n\n getManyForSelector<TResponse = EntityType>(\n query: QueryType | Signal<QueryType>,\n mapOption: (\n item: TResponse\n ) => Omit<AutocompleteOption<TResponse> | SelectOption<TResponse>, 'data'>\n ) {\n return rxResource({\n defaultValue: [],\n params: () => (query instanceof Function ? query() : query),\n stream: (data) =>\n this.getMany<TResponse>(data.params).pipe(\n map((response) =>\n response.items.map((item) => ({\n ...mapOption(item),\n data: item,\n }))\n )\n ),\n });\n }\n}\n","import { HttpResourceRef } from '@angular/common/http';\nimport {\n computed,\n Directive,\n effect,\n inject,\n input,\n linkedSignal,\n model,\n signal,\n Type,\n} from '@angular/core';\nimport {\n GetManyResult,\n QueryPagination,\n SortFilterType,\n} from '@koalarx/ui/core/models';\nimport { DatatableConfig } from '@koalarx/ui/shared/components/datatable';\nimport { HttpBase } from './http-base';\n\ntype PaginationType = 'paginator' | 'loadMore';\n\n@Directive()\nexport abstract class ListBase<\n QueryType extends QueryPagination,\n TEntity = any\n> {\n private reloading = false;\n private currentPaginationType: PaginationType = 'paginator';\n protected readonly resourceRef: HttpResourceRef<\n GetManyResult<TEntity> | undefined\n >;\n protected readonly limitPage = signal(30);\n protected readonly page = signal(1);\n protected readonly filter = signal<QueryType>({} as any);\n protected readonly resource: HttpBase<TEntity, any, QueryType>;\n protected readonly totalItemsOnPage = signal(0);\n protected readonly totalItems = signal(0);\n protected readonly list = signal<TEntity[]>([]);\n protected readonly sortFilter = signal<SortFilterType | null>(null);\n protected readonly paginationType = model<PaginationType>('paginator');\n protected readonly withPagination = computed<boolean>(() => {\n this.currentPaginationType = this.paginationType();\n return this.currentPaginationType === 'paginator';\n });\n protected readonly datatableConfig = linkedSignal(\n () =>\n ({\n currentPage: this.page(),\n totalItems: this.totalItems(),\n totalItemsOnPage: this.totalItemsOnPage(),\n currentPageSize: this.limitPage(),\n isLoading: this.resourceRef.isLoading(),\n hasError: !!this.resourceRef.error(),\n } as DatatableConfig)\n );\n\n queryParams = computed<QueryType>(\n () =>\n ({\n page: this.page(),\n limit: this.limitPage(),\n ...(this.sortFilter() ?? {}),\n ...this.filter(),\n } as QueryType)\n );\n reload = input<boolean>(false);\n\n constructor(\n // eslint-disable-next-line @angular-eslint/prefer-inject\n resource: Type<HttpBase<TEntity, any, QueryType>>,\n // eslint-disable-next-line @angular-eslint/prefer-inject\n protected readonly componentFilter?: Type<any>\n ) {\n this.resource = inject(resource);\n this.resourceRef = this.resource.getManyWithResource(this.queryParams);\n\n effect(() => {\n this.filter();\n this.page.set(1);\n });\n\n effect(() => {\n const queryParams = this.queryParams();\n\n if (queryParams.page === 1 && !this.reloading) {\n this.reloading = true;\n return;\n }\n });\n\n effect(() => {\n const withPagination = this.currentPaginationType === 'paginator';\n const result = this.resourceRef.value();\n\n if (!withPagination && !this.reloading) {\n if (result) {\n this.list.update((current) => [...current, ...result.items]);\n this.totalItemsOnPage.update(\n (current) => current + result.items.length\n );\n this.totalItems.set(result.count);\n }\n this.reloading = false;\n return;\n }\n\n if (!result) {\n this.list.set([]);\n this.totalItemsOnPage.set(0);\n this.totalItems.set(0);\n this.reloading = false;\n return;\n }\n\n this.list.set(result.items);\n this.totalItemsOnPage.set(result.items.length);\n this.totalItems.set(result.count);\n this.reloading = false;\n });\n\n effect(() => {\n if (this.reload()) {\n this.reloadList();\n }\n });\n }\n\n protected sort(sortFilter: SortFilterType) {\n this.sortFilter.set(sortFilter);\n }\n\n protected reloadList() {\n this.reloading = true;\n this.list.set([]);\n this.totalItemsOnPage.set(0);\n this.totalItems.set(0);\n this.page.set(1);\n this.resourceRef.reload();\n }\n\n protected loadMore() {\n this.page.update((current) => current + 1);\n }\n}\n","import { signal } from '@angular/core';\n\nexport abstract class PageBase {\n protected reload = signal(false);\n\n protected reloadList() {\n this.reload.set(true);\n setTimeout(() => this.reload.set(false));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAuBsB,QAAQ,CAAA;AAWG,IAAA,QAAA;AANd,I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A,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,cAAA,EAAA,sBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAD7B;;;MCpBqB,QAAQ,CAAA;AAClB,IAAA,MAAM,GAAG,MAAM,CAAC,KAAK,kDAAC;IAEtB,UAAU,GAAA;AAClB,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;AACrB,QAAA,UAAU,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;;AAE3C;;ACTD;;AAEG;;;;"}
|
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class DialogContainer {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DialogContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: DialogContainer, isStandalone: true, selector: "kl-dialog-container", ngImport: i0, template: "<div class=\"dialog-container\"></div>\n" });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: DialogContainer, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'kl-dialog-container', template: "<div class=\"dialog-container\"></div>\n" }]
|
|
11
11
|
}] });
|
|
@@ -8,16 +8,16 @@ import { LoadingBarRouterModule } from '@ngx-loading-bar/router';
|
|
|
8
8
|
import * as i1 from '@ngx-loading-bar/core';
|
|
9
9
|
|
|
10
10
|
class KlRoot {
|
|
11
|
-
routerLoaderColor = input('#6A1B9A');
|
|
11
|
+
routerLoaderColor = input('#6A1B9A', ...(ngDevMode ? [{ debugName: "routerLoaderColor" }] : []));
|
|
12
12
|
ngOnInit() {
|
|
13
13
|
if (document.querySelector('html')?.getAttribute('data-theme') === null) {
|
|
14
14
|
document.querySelector('html')?.setAttribute('data-theme', 'light');
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
18
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: KlRoot, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: KlRoot, isStandalone: true, selector: "kl-root", inputs: { routerLoaderColor: { classPropertyName: "routerLoaderColor", publicName: "routerLoaderColor", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ngx-loading-bar\n [color]=\"routerLoaderColor()\"\n height=\"4px\"\n [includeSpinner]=\"false\"\n/>\n\n<main class=\"overflow-x-hidden\">\n <kl-loader-page-content />\n <kl-snackbar-container />\n <kl-dialog-container />\n <kl-side-window-container />\n <div class=\"kl-generic-component-container\"></div>\n\n <ng-content />\n</main>\n", dependencies: [{ kind: "component", type: DialogContainer, selector: "kl-dialog-container" }, { kind: "ngmodule", type: LoadingBarRouterModule }, { kind: "component", type: i1.LoadingBarComponent, selector: "ngx-loading-bar" }, { kind: "component", type: SideWindowContainer, selector: "kl-side-window-container" }, { kind: "component", type: SnackbarContainer, selector: "kl-snackbar-container" }, { kind: "component", type: LoaderPageContent, selector: "kl-loader-page-content" }] });
|
|
19
19
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: KlRoot, decorators: [{
|
|
21
21
|
type: Component,
|
|
22
22
|
args: [{ selector: 'kl-root', imports: [
|
|
23
23
|
DialogContainer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-core-components-kl-root.mjs","sources":["../../projects/koala-ui/core/components/kl-root/kl-root.ts","../../projects/koala-ui/core/components/kl-root/kl-root.html","../../projects/koala-ui/core/components/kl-root/koalarx-ui-core-components-kl-root.ts"],"sourcesContent":["import { Component, input, OnInit } from '@angular/core';\nimport { DialogContainer } from '@koalarx/ui/core/components/dialog';\nimport { LoaderPageContent } from '@koalarx/ui/core/components/loader-page';\nimport { SideWindowContainer } from '@koalarx/ui/core/components/side-window';\nimport { SnackbarContainer } from '@koalarx/ui/core/components/snackbar';\nimport { LoadingBarRouterModule } from '@ngx-loading-bar/router';\n\n@Component({\n selector: 'kl-root',\n templateUrl: './kl-root.html',\n imports: [\n DialogContainer,\n LoadingBarRouterModule,\n SideWindowContainer,\n SnackbarContainer,\n LoaderPageContent,\n ],\n})\nexport class KlRoot implements OnInit {\n routerLoaderColor = input<string>('#6A1B9A');\n\n ngOnInit(): void {\n if (document.querySelector('html')?.getAttribute('data-theme') === null) {\n document.querySelector('html')?.setAttribute('data-theme', 'light');\n }\n }\n}\n","<ngx-loading-bar\n [color]=\"routerLoaderColor()\"\n height=\"4px\"\n [includeSpinner]=\"false\"\n/>\n\n<main class=\"overflow-x-hidden\">\n <kl-loader-page-content />\n <kl-snackbar-container />\n <kl-dialog-container />\n <kl-side-window-container />\n <div class=\"kl-generic-component-container\"></div>\n\n <ng-content />\n</main>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAkBa,MAAM,CAAA;AACjB,IAAA,iBAAiB,GAAG,KAAK,CAAS,SAAS,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-core-components-kl-root.mjs","sources":["../../projects/koala-ui/core/components/kl-root/kl-root.ts","../../projects/koala-ui/core/components/kl-root/kl-root.html","../../projects/koala-ui/core/components/kl-root/koalarx-ui-core-components-kl-root.ts"],"sourcesContent":["import { Component, input, OnInit } from '@angular/core';\nimport { DialogContainer } from '@koalarx/ui/core/components/dialog';\nimport { LoaderPageContent } from '@koalarx/ui/core/components/loader-page';\nimport { SideWindowContainer } from '@koalarx/ui/core/components/side-window';\nimport { SnackbarContainer } from '@koalarx/ui/core/components/snackbar';\nimport { LoadingBarRouterModule } from '@ngx-loading-bar/router';\n\n@Component({\n selector: 'kl-root',\n templateUrl: './kl-root.html',\n imports: [\n DialogContainer,\n LoadingBarRouterModule,\n SideWindowContainer,\n SnackbarContainer,\n LoaderPageContent,\n ],\n})\nexport class KlRoot implements OnInit {\n routerLoaderColor = input<string>('#6A1B9A');\n\n ngOnInit(): void {\n if (document.querySelector('html')?.getAttribute('data-theme') === null) {\n document.querySelector('html')?.setAttribute('data-theme', 'light');\n }\n }\n}\n","<ngx-loading-bar\n [color]=\"routerLoaderColor()\"\n height=\"4px\"\n [includeSpinner]=\"false\"\n/>\n\n<main class=\"overflow-x-hidden\">\n <kl-loader-page-content />\n <kl-snackbar-container />\n <kl-dialog-container />\n <kl-side-window-container />\n <div class=\"kl-generic-component-container\"></div>\n\n <ng-content />\n</main>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAkBa,MAAM,CAAA;AACjB,IAAA,iBAAiB,GAAG,KAAK,CAAS,SAAS,6DAAC;IAE5C,QAAQ,GAAA;AACN,QAAA,IAAI,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,KAAK,IAAI,EAAE;AACvE,YAAA,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC;;;uGAL5D,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAN,MAAM,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClBnB,4VAeA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDJI,eAAe,EAAA,QAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACf,sBAAsB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACtB,mBAAmB,EAAA,QAAA,EAAA,0BAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACnB,iBAAiB,EAAA,QAAA,EAAA,uBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACjB,iBAAiB,EAAA,QAAA,EAAA,wBAAA,EAAA,CAAA,EAAA,CAAA;;2FAGR,MAAM,EAAA,UAAA,EAAA,CAAA;kBAXlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,EAAA,OAAA,EAEV;wBACP,eAAe;wBACf,sBAAsB;wBACtB,mBAAmB;wBACnB,iBAAiB;wBACjB,iBAAiB;AAClB,qBAAA,EAAA,QAAA,EAAA,4VAAA,EAAA;;;AEhBH;;AAEG;;;;"}
|
|
@@ -3,7 +3,7 @@ import { signal, Injectable, inject, Component } from '@angular/core';
|
|
|
3
3
|
import { Loader } from '@koalarx/ui/core/components/loader';
|
|
4
4
|
|
|
5
5
|
class LoaderPage {
|
|
6
|
-
_loading = signal(false);
|
|
6
|
+
_loading = signal(false, ...(ngDevMode ? [{ debugName: "_loading" }] : []));
|
|
7
7
|
get isLoading() {
|
|
8
8
|
return this._loading.asReadonly();
|
|
9
9
|
}
|
|
@@ -13,20 +13,20 @@ class LoaderPage {
|
|
|
13
13
|
dismiss() {
|
|
14
14
|
this._loading.set(false);
|
|
15
15
|
}
|
|
16
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
17
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoaderPage, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
17
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoaderPage, providedIn: 'root' });
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoaderPage, decorators: [{
|
|
20
20
|
type: Injectable,
|
|
21
21
|
args: [{ providedIn: 'root' }]
|
|
22
22
|
}] });
|
|
23
23
|
|
|
24
24
|
class LoaderPageContent {
|
|
25
25
|
loaderPage = inject(LoaderPage);
|
|
26
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
27
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoaderPageContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: LoaderPageContent, isStandalone: true, selector: "kl-loader-page-content", ngImport: i0, template: "<div class=\"fixed bg-base-100/40 flex w-full h-full items-center justify-center z-50\"\n [class]=\"{ 'hidden': !loaderPage.isLoading() }\">\n <kl-loader size=\"extraLarge\" />\n</div>\n", dependencies: [{ kind: "component", type: Loader, selector: "kl-loader", inputs: ["size"] }] });
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoaderPageContent, decorators: [{
|
|
30
30
|
type: Component,
|
|
31
31
|
args: [{ selector: 'kl-loader-page-content', imports: [Loader], template: "<div class=\"fixed bg-base-100/40 flex w-full h-full items-center justify-center z-50\"\n [class]=\"{ 'hidden': !loaderPage.isLoading() }\">\n <kl-loader size=\"extraLarge\" />\n</div>\n" }]
|
|
32
32
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-core-components-loader-page.mjs","sources":["../../projects/koala-ui/core/components/loader-page/loader-page.ts","../../projects/koala-ui/core/components/loader-page/loader-page-content.ts","../../projects/koala-ui/core/components/loader-page/loader-page-content.html","../../projects/koala-ui/core/components/loader-page/koalarx-ui-core-components-loader-page.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class LoaderPage {\n private _loading = signal(false);\n\n get isLoading() {\n return this._loading.asReadonly();\n }\n\n show() {\n this._loading.set(true);\n }\n\n dismiss() {\n this._loading.set(false);\n }\n}\n","import { Component, inject } from '@angular/core';\nimport { Loader } from '@koalarx/ui/core/components/loader';\nimport { LoaderPage } from './loader-page';\n\n@Component({\n selector: 'kl-loader-page-content',\n templateUrl: './loader-page-content.html',\n imports: [Loader],\n})\nexport class LoaderPageContent {\n loaderPage = inject(LoaderPage);\n}\n","<div class=\"fixed bg-base-100/40 flex w-full h-full items-center justify-center z-50\"\n [class]=\"{ 'hidden': !loaderPage.isLoading() }\">\n <kl-loader size=\"extraLarge\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,UAAU,CAAA;AACb,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-core-components-loader-page.mjs","sources":["../../projects/koala-ui/core/components/loader-page/loader-page.ts","../../projects/koala-ui/core/components/loader-page/loader-page-content.ts","../../projects/koala-ui/core/components/loader-page/loader-page-content.html","../../projects/koala-ui/core/components/loader-page/koalarx-ui-core-components-loader-page.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class LoaderPage {\n private _loading = signal(false);\n\n get isLoading() {\n return this._loading.asReadonly();\n }\n\n show() {\n this._loading.set(true);\n }\n\n dismiss() {\n this._loading.set(false);\n }\n}\n","import { Component, inject } from '@angular/core';\nimport { Loader } from '@koalarx/ui/core/components/loader';\nimport { LoaderPage } from './loader-page';\n\n@Component({\n selector: 'kl-loader-page-content',\n templateUrl: './loader-page-content.html',\n imports: [Loader],\n})\nexport class LoaderPageContent {\n loaderPage = inject(LoaderPage);\n}\n","<div class=\"fixed bg-base-100/40 flex w-full h-full items-center justify-center z-50\"\n [class]=\"{ 'hidden': !loaderPage.isLoading() }\">\n <kl-loader size=\"extraLarge\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,UAAU,CAAA;AACb,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,oDAAC;AAEhC,IAAA,IAAI,SAAS,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;;IAGnC,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;;IAGzB,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;;uGAZf,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAV,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,cADG,MAAM,EAAA,CAAA;;2FACnB,UAAU,EAAA,UAAA,EAAA,CAAA;kBADtB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;MCOrB,iBAAiB,CAAA;AAC5B,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;uGADpB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECT9B,8LAIA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDGY,MAAM,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAEL,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,SAAS;+BACE,wBAAwB,EAAA,OAAA,EAEzB,CAAC,MAAM,CAAC,EAAA,QAAA,EAAA,8LAAA,EAAA;;;AEPnB;;AAEG;;;;"}
|
|
@@ -2,11 +2,11 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class Loader {
|
|
5
|
-
size = input('small');
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
5
|
+
size = input('small', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Loader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: Loader, isStandalone: true, selector: "kl-loader", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<span\n class=\"loading loading-spinner\" [class]=\"{\n 'loading-xs': size() === 'extraSmall',\n 'loading-sm': size() === 'small',\n 'loading-md': size() === 'medium',\n 'loading-lg': size() === 'large',\n 'loading-xl': size() === 'extraLarge'\n }\">\n</span>\n" });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Loader, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'kl-loader', template: "<span\n class=\"loading loading-spinner\" [class]=\"{\n 'loading-xs': size() === 'extraSmall',\n 'loading-sm': size() === 'small',\n 'loading-md': size() === 'medium',\n 'loading-lg': size() === 'large',\n 'loading-xl': size() === 'extraLarge'\n }\">\n</span>\n" }]
|
|
12
12
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-core-components-loader.mjs","sources":["../../projects/koala-ui/core/components/loader/loader.ts","../../projects/koala-ui/core/components/loader/loader.html","../../projects/koala-ui/core/components/loader/koalarx-ui-core-components-loader.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\n\ntype LoaderSize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge';\n\n@Component({\n selector: 'kl-loader',\n templateUrl: './loader.html',\n})\nexport class Loader {\n size = input<LoaderSize>('small');\n}\n","<span\n class=\"loading loading-spinner\" [class]=\"{\n 'loading-xs': size() === 'extraSmall',\n 'loading-sm': size() === 'small',\n 'loading-md': size() === 'medium',\n 'loading-lg': size() === 'large',\n 'loading-xl': size() === 'extraLarge'\n }\">\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAQa,MAAM,CAAA;AACjB,IAAA,IAAI,GAAG,KAAK,CAAa,OAAO,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-core-components-loader.mjs","sources":["../../projects/koala-ui/core/components/loader/loader.ts","../../projects/koala-ui/core/components/loader/loader.html","../../projects/koala-ui/core/components/loader/koalarx-ui-core-components-loader.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\n\ntype LoaderSize = 'extraSmall' | 'small' | 'medium' | 'large' | 'extraLarge';\n\n@Component({\n selector: 'kl-loader',\n templateUrl: './loader.html',\n})\nexport class Loader {\n size = input<LoaderSize>('small');\n}\n","<span\n class=\"loading loading-spinner\" [class]=\"{\n 'loading-xs': size() === 'extraSmall',\n 'loading-sm': size() === 'small',\n 'loading-md': size() === 'medium',\n 'loading-lg': size() === 'large',\n 'loading-xl': size() === 'extraLarge'\n }\">\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAQa,MAAM,CAAA;AACjB,IAAA,IAAI,GAAG,KAAK,CAAa,OAAO,gDAAC;uGADtB,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAN,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,sMCRnB,wRASA,EAAA,CAAA;;2FDDa,MAAM,EAAA,UAAA,EAAA,CAAA;kBAJlB,SAAS;+BACE,WAAW,EAAA,QAAA,EAAA,wRAAA,EAAA;;;AELvB;;AAEG;;;;"}
|
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class SideWindowContainer {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: SideWindowContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: SideWindowContainer, isStandalone: true, selector: "kl-side-window-container", ngImport: i0, template: "<div class=\"side-window-container\"></div>\n" });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: SideWindowContainer, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'kl-side-window-container', template: "<div class=\"side-window-container\"></div>\n" }]
|
|
11
11
|
}] });
|
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class SnackbarContainer {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: SnackbarContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: SnackbarContainer, isStandalone: true, selector: "kl-snackbar-container", ngImport: i0, template: "<div class=\"toast toast-top toast-end z-10000 w-full\"></div>\n" });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: SnackbarContainer, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'kl-snackbar-container', template: "<div class=\"toast toast-top toast-end z-10000 w-full\"></div>\n" }]
|
|
11
11
|
}] });
|
|
@@ -7,10 +7,10 @@ class AuthGuard {
|
|
|
7
7
|
canActivate() {
|
|
8
8
|
return this.authService.isAuthenticated();
|
|
9
9
|
}
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
11
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AuthGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AuthGuard });
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AuthGuard, decorators: [{
|
|
14
14
|
type: Injectable
|
|
15
15
|
}] });
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-core-translations.mjs","sources":["../../projects/koala-ui/core/translations/en.ts","../../projects/koala-ui/core/translations/ptbr.ts","../../projects/koala-ui/core/translations/get-translation-by-language.ts","../../projects/koala-ui/core/translations/koalarx-ui-core-translations.ts"],"sourcesContent":["import { Translation } from './translation.model';\n\nexport const en: Translation = {\n confirm: {\n btnLabelYes: 'Yes',\n btnLabelNo: 'No',\n askAreYouSureMessage: 'Are you sure you want to continue?',\n },\n codeViewer: {\n copyToClipboard: 'Copy to clipboard',\n copiedToClipboard: 'Copied to clipboard',\n },\n form: {\n required: 'This field is required.',\n invalidEmail: 'Invalid email address',\n invalidMinLength: (minLength: number) =>\n `The field must have at least ${minLength} characters.`,\n invalidCPF: 'Invalid CPF',\n invalidCNPJ: 'Invalid CNPJ',\n invalidURL: 'Invalid URL',\n invalidPasswordHasSpecialCharacters:\n 'The password must contain special characters.',\n invalidPasswordHasLowercase: 'The password must contain lowercase letters.',\n invalidPasswordHasUppercase: 'The password must contain uppercase letters.',\n invalidPasswordHasNumber: 'The password must contain numbers.',\n invalidConfirmPassword: 'The confirmation password does not match.',\n },\n onThisPage: {\n title: 'On this page',\n },\n datatable: {\n btnFilterLabel: 'Filter',\n clearFilterTooltip: 'Clear filters',\n addFilterTooltip: 'Add filter',\n reloadListTooltip: 'Reload data',\n labelItemsPerPage: 'Items per page limit',\n loadMoreBtnLabel: 'Load more',\n errorLoadDataLabel: 'Error loading data',\n paginatorPagesFeedback: (currentPage: number, lastPage: number) =>\n `Page ${currentPage} of ${lastPage}`,\n },\n feedbackRequestInterceptor: {\n '400': 'An error occurred related to the submitted data',\n '401': 'Unauthorized access, please log in again.',\n '403': 'Access denied.',\n '404': 'No record found from the provided data.',\n '409': 'This record already exists',\n '422': 'Validation error in the submitted data.',\n '500': 'Please contact our support via WhatsApp.',\n '0': 'We identified an instability in communication with our server, this may occur due to rapid internet drops, slow connection, or server overload, please try again.',\n unknowError: 'An unknown error occurred, please try again.',\n },\n jwtAuthorizationService: {\n questionLogoutMessage: 'You are about to <b>log out of the system</b>.',\n },\n};\n","import { Translation } from './translation.model';\n\nexport const ptBr: Translation = {\n confirm: {\n btnLabelYes: 'Sim',\n btnLabelNo: 'Não',\n askAreYouSureMessage: 'Tem certeza de que deseja continuar?',\n },\n codeViewer: {\n copyToClipboard: 'Copiar',\n copiedToClipboard: 'Copiado',\n },\n form: {\n required: 'O campo é obrigatório.',\n invalidEmail: 'E-mail inválido',\n invalidMinLength: (minLength: number) =>\n `O campo deve ter no mínimo ${minLength} caracteres.`,\n invalidCPF: 'CPF inválido',\n invalidCNPJ: 'CNPJ inválido',\n invalidURL: 'URL inválida',\n invalidPasswordHasSpecialCharacters:\n 'A senha deve conter caracteres especiais.',\n invalidPasswordHasLowercase: 'A senha deve conter letras minúsculas.',\n invalidPasswordHasUppercase: 'A senha deve conter letras maiúsculas.',\n invalidPasswordHasNumber: 'A senha deve conter números.',\n invalidConfirmPassword: 'A confirmação da senha não confere.',\n },\n onThisPage: {\n title: 'Nesta página',\n },\n datatable: {\n btnFilterLabel: 'Filtro',\n clearFilterTooltip: 'Limpar filtros',\n addFilterTooltip: 'Adicionar filtro',\n reloadListTooltip: 'Recarregar dados',\n labelItemsPerPage: 'Limite de itens por carregamento',\n loadMoreBtnLabel: 'Carregar mais',\n errorLoadDataLabel: 'Erro ao carregar os dados',\n paginatorPagesFeedback: (currentPage: number, lastPage: number) =>\n `Página ${currentPage} de ${lastPage}`,\n },\n feedbackRequestInterceptor: {\n '400': 'Ocorreu um erro relacionado aos dados enviados',\n '401': 'Acesso não autorizado, por favor, faça login novamente.',\n '403': 'Acesso negado.',\n '404': 'Nenhum registro encontrado a partir dos dados informados.',\n '409': 'Este registro já existe',\n '422': 'Erro de validação nos dados enviados.',\n '500': 'Entre em contato com nosso suporte pelo canal do whatsapp.',\n '0': 'Identificamos uma instabilidade na comunicação com nosso servidor, isto pode ocorrer devido a rápidas quedas de internet, conexão lenta ou sobrecarga no servidor, por favor, tente novamente.',\n unknowError: 'Ocorreu um erro desconhecido, por favor, tente novamente.',\n },\n jwtAuthorizationService: {\n questionLogoutMessage: 'Você está prestes a <b>deslogar do sistema</b>.',\n },\n};\n","import { en } from './en';\nimport { ptBr } from './ptbr';\nimport { Translation } from './translation.model';\n\nexport type KoalaLanguage = 'en' | 'ptBr';\n\nexport function getTranslationByLanguage(language: KoalaLanguage): Translation {\n switch (language) {\n case 'en':\n return en;\n case 'ptBr':\n return ptBr;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"koalarx-ui-core-translations.mjs","sources":["../../projects/koala-ui/core/translations/en.ts","../../projects/koala-ui/core/translations/ptbr.ts","../../projects/koala-ui/core/translations/get-translation-by-language.ts","../../projects/koala-ui/core/translations/koalarx-ui-core-translations.ts"],"sourcesContent":["import { Translation } from './translation.model';\n\nexport const en: Translation = {\n confirm: {\n btnLabelYes: 'Yes',\n btnLabelNo: 'No',\n askAreYouSureMessage: 'Are you sure you want to continue?',\n },\n codeViewer: {\n copyToClipboard: 'Copy to clipboard',\n copiedToClipboard: 'Copied to clipboard',\n },\n form: {\n required: 'This field is required.',\n invalidEmail: 'Invalid email address',\n invalidMinLength: (minLength: number) =>\n `The field must have at least ${minLength} characters.`,\n invalidCPF: 'Invalid CPF',\n invalidCNPJ: 'Invalid CNPJ',\n invalidURL: 'Invalid URL',\n invalidPasswordHasSpecialCharacters:\n 'The password must contain special characters.',\n invalidPasswordHasLowercase: 'The password must contain lowercase letters.',\n invalidPasswordHasUppercase: 'The password must contain uppercase letters.',\n invalidPasswordHasNumber: 'The password must contain numbers.',\n invalidConfirmPassword: 'The confirmation password does not match.',\n },\n onThisPage: {\n title: 'On this page',\n },\n datatable: {\n btnFilterLabel: 'Filter',\n clearFilterTooltip: 'Clear filters',\n addFilterTooltip: 'Add filter',\n reloadListTooltip: 'Reload data',\n labelItemsPerPage: 'Items per page limit',\n loadMoreBtnLabel: 'Load more',\n errorLoadDataLabel: 'Error loading data',\n paginatorPagesFeedback: (currentPage: number, lastPage: number) =>\n `Page ${currentPage} of ${lastPage}`,\n },\n feedbackRequestInterceptor: {\n '400': 'An error occurred related to the submitted data',\n '401': 'Unauthorized access, please log in again.',\n '403': 'Access denied.',\n '404': 'No record found from the provided data.',\n '409': 'This record already exists',\n '422': 'Validation error in the submitted data.',\n '500': 'Please contact our support via WhatsApp.',\n '0': 'We identified an instability in communication with our server, this may occur due to rapid internet drops, slow connection, or server overload, please try again.',\n unknowError: 'An unknown error occurred, please try again.',\n },\n jwtAuthorizationService: {\n questionLogoutMessage: 'You are about to <b>log out of the system</b>.',\n },\n};\n","import { Translation } from './translation.model';\n\nexport const ptBr: Translation = {\n confirm: {\n btnLabelYes: 'Sim',\n btnLabelNo: 'Não',\n askAreYouSureMessage: 'Tem certeza de que deseja continuar?',\n },\n codeViewer: {\n copyToClipboard: 'Copiar',\n copiedToClipboard: 'Copiado',\n },\n form: {\n required: 'O campo é obrigatório.',\n invalidEmail: 'E-mail inválido',\n invalidMinLength: (minLength: number) =>\n `O campo deve ter no mínimo ${minLength} caracteres.`,\n invalidCPF: 'CPF inválido',\n invalidCNPJ: 'CNPJ inválido',\n invalidURL: 'URL inválida',\n invalidPasswordHasSpecialCharacters:\n 'A senha deve conter caracteres especiais.',\n invalidPasswordHasLowercase: 'A senha deve conter letras minúsculas.',\n invalidPasswordHasUppercase: 'A senha deve conter letras maiúsculas.',\n invalidPasswordHasNumber: 'A senha deve conter números.',\n invalidConfirmPassword: 'A confirmação da senha não confere.',\n },\n onThisPage: {\n title: 'Nesta página',\n },\n datatable: {\n btnFilterLabel: 'Filtro',\n clearFilterTooltip: 'Limpar filtros',\n addFilterTooltip: 'Adicionar filtro',\n reloadListTooltip: 'Recarregar dados',\n labelItemsPerPage: 'Limite de itens por carregamento',\n loadMoreBtnLabel: 'Carregar mais',\n errorLoadDataLabel: 'Erro ao carregar os dados',\n paginatorPagesFeedback: (currentPage: number, lastPage: number) =>\n `Página ${currentPage} de ${lastPage}`,\n },\n feedbackRequestInterceptor: {\n '400': 'Ocorreu um erro relacionado aos dados enviados',\n '401': 'Acesso não autorizado, por favor, faça login novamente.',\n '403': 'Acesso negado.',\n '404': 'Nenhum registro encontrado a partir dos dados informados.',\n '409': 'Este registro já existe',\n '422': 'Erro de validação nos dados enviados.',\n '500': 'Entre em contato com nosso suporte pelo canal do whatsapp.',\n '0': 'Identificamos uma instabilidade na comunicação com nosso servidor, isto pode ocorrer devido a rápidas quedas de internet, conexão lenta ou sobrecarga no servidor, por favor, tente novamente.',\n unknowError: 'Ocorreu um erro desconhecido, por favor, tente novamente.',\n },\n jwtAuthorizationService: {\n questionLogoutMessage: 'Você está prestes a <b>deslogar do sistema</b>.',\n },\n};\n","import { en } from './en';\nimport { ptBr } from './ptbr';\nimport { Translation } from './translation.model';\n\nexport type KoalaLanguage = 'en' | 'ptBr';\n\nexport function getTranslationByLanguage(language: KoalaLanguage): Translation {\n switch (language) {\n case 'en':\n return en;\n case 'ptBr':\n return ptBr;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAEO,MAAM,EAAE,GAAgB;AAC7B,IAAA,OAAO,EAAE;AACP,QAAA,WAAW,EAAE,KAAK;AAClB,QAAA,UAAU,EAAE,IAAI;AAChB,QAAA,oBAAoB,EAAE,oCAAoC;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2B;AAC/C,QAAA,sBAAsB,EAAE,CAAC,WAAmB,EAAE,QAAgB,KAC5D,CAAA,OAAA,EAAU,WAAW,CAAA,IAAA,EAAO,QAAQ,CAAA,CAAE;AACzC,KAAA;AACD,IAAA,0BAA0B,EAAE;AAC1B,QAAA,KAAK,EAAE,gDAAgD;AACvD,QAAA,KAAK,EAAE,yDAAyD;AAChE,QAAA,KAAK,EAAE,gBAAgB;AACvB,QAAA,KAAK,EAAE,2DAA2D;AAClE,QAAA,KAAK,EAAE,yBAAyB;AAChC,QAAA,KAAK,EAAE,uCAAuC;AAC9C,QAAA,KAAK,EAAE,4DAA4D;AACnE,QAAA,GAAG,EAAE,gMAAgM;AACrM,QAAA,WAAW,EAAE,2DAA2D;AACzE,KAAA;AACD,IAAA,uBAAuB,EAAE;AACvB,QAAA,qBAAqB,EAAE,iDAAiD;AACzE,KAAA;;;AChDG,SAAU,wBAAwB,CAAC,QAAuB,EAAA;IAC9D,QAAQ,QAAQ;AACd,QAAA,KAAK,IAAI;AACP,YAAA,OAAO,EAAE;AACX,QAAA,KAAK,MAAM;AACT,YAAA,OAAO,IAAI;;AAEjB;;ACbA;;AAEG;;;;"}
|
|
@@ -2,11 +2,11 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class Accordion {
|
|
5
|
-
name = input.required();
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
5
|
+
name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Accordion, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: Accordion, isStandalone: true, selector: "kl-accordion", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"collapse bg-base-100 border border-neutral-500 dark:border-neutral-700\">\n <input type=\"radio\" [name]=\"name()\" />\n <div class=\"collapse-title font-semibold\">\n <ng-content select=\"[title]\" />\n </div>\n <div class=\"collapse-content text-sm\">\n <ng-content select=\"[content]\" />\n </div>\n</div>\n" });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Accordion, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'kl-accordion', template: "<div class=\"collapse bg-base-100 border border-neutral-500 dark:border-neutral-700\">\n <input type=\"radio\" [name]=\"name()\" />\n <div class=\"collapse-title font-semibold\">\n <ng-content select=\"[title]\" />\n </div>\n <div class=\"collapse-content text-sm\">\n <ng-content select=\"[content]\" />\n </div>\n</div>\n" }]
|
|
12
12
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-accordion.mjs","sources":["../../projects/koala-ui/shared/components/accordion/accordion.ts","../../projects/koala-ui/shared/components/accordion/accordion.html","../../projects/koala-ui/shared/components/accordion/koalarx-ui-shared-components-accordion.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'kl-accordion',\n templateUrl: './accordion.html',\n})\nexport class Accordion {\n name = input.required<string>();\n}\n","<div class=\"collapse bg-base-100 border border-neutral-500 dark:border-neutral-700\">\n <input type=\"radio\" [name]=\"name()\" />\n <div class=\"collapse-title font-semibold\">\n <ng-content select=\"[title]\" />\n </div>\n <div class=\"collapse-content text-sm\">\n <ng-content select=\"[content]\" />\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,SAAS,CAAA;AACpB,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-accordion.mjs","sources":["../../projects/koala-ui/shared/components/accordion/accordion.ts","../../projects/koala-ui/shared/components/accordion/accordion.html","../../projects/koala-ui/shared/components/accordion/koalarx-ui-shared-components-accordion.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\n\n@Component({\n selector: 'kl-accordion',\n templateUrl: './accordion.html',\n})\nexport class Accordion {\n name = input.required<string>();\n}\n","<div class=\"collapse bg-base-100 border border-neutral-500 dark:border-neutral-700\">\n <input type=\"radio\" [name]=\"name()\" />\n <div class=\"collapse-title font-semibold\">\n <ng-content select=\"[title]\" />\n </div>\n <div class=\"collapse-content text-sm\">\n <ng-content select=\"[content]\" />\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,SAAS,CAAA;AACpB,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAU;uGADpB,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,wMCNtB,gVASA,EAAA,CAAA;;2FDHa,SAAS,EAAA,UAAA,EAAA,CAAA;kBAJrB,SAAS;+BACE,cAAc,EAAA,QAAA,EAAA,gVAAA,EAAA;;;AEH1B;;AAEG;;;;"}
|
|
@@ -9,10 +9,10 @@ class AlertContent {
|
|
|
9
9
|
close() {
|
|
10
10
|
this.dialogRef.dismiss('close');
|
|
11
11
|
}
|
|
12
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
13
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AlertContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: AlertContent, isStandalone: true, selector: "kl-alert-content", ngImport: i0, template: "<kl-dialog-content>\n @if (data.title) {\n <h2>{{ data.title }}</h2>\n }\n\n <div class=\"flex flex-col items-center justify-center gap-4\" content>\n @switch (data.type) {\n @case ('info') {\n <i class=\"fa-solid fa-circle-info text-6xl text-indigo-500\"></i>\n }\n @case ('success') {\n <i class=\"fa-solid fa-circle-check text-6xl text-green-500\"></i>\n }\n @case ('warning') {\n <i class=\"fa-solid fa-triangle-exclamation text-6xl text-yellow-500\"></i>\n\n }\n @case ('error') {\n <i class=\"fa-solid fa-circle-xmark text-6xl text-red-500\"></i>\n }\n }\n\n <p [innerHTML]=\"data.message\"></p>\n </div>\n\n <div class=\"flex items-center justify-center w-full\" actions>\n <button klButton outline [color]=\"data.type\" (click)=\"close()\">\n {{ data.okButtonText ?? 'OK' }}\n </button>\n </div>\n</kl-dialog-content>\n", dependencies: [{ kind: "component", type: DialogContent, selector: "kl-dialog-content" }, { kind: "directive", type: Button, selector: "button[klButton], a[klButton]", inputs: ["color", "type", "circle", "outline", "soft", "showLoader", "disabled", "size"] }] });
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AlertContent, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
17
|
args: [{ selector: 'kl-alert-content', imports: [DialogContent, Button], template: "<kl-dialog-content>\n @if (data.title) {\n <h2>{{ data.title }}</h2>\n }\n\n <div class=\"flex flex-col items-center justify-center gap-4\" content>\n @switch (data.type) {\n @case ('info') {\n <i class=\"fa-solid fa-circle-info text-6xl text-indigo-500\"></i>\n }\n @case ('success') {\n <i class=\"fa-solid fa-circle-check text-6xl text-green-500\"></i>\n }\n @case ('warning') {\n <i class=\"fa-solid fa-triangle-exclamation text-6xl text-yellow-500\"></i>\n\n }\n @case ('error') {\n <i class=\"fa-solid fa-circle-xmark text-6xl text-red-500\"></i>\n }\n }\n\n <p [innerHTML]=\"data.message\"></p>\n </div>\n\n <div class=\"flex items-center justify-center w-full\" actions>\n <button klButton outline [color]=\"data.type\" (click)=\"close()\">\n {{ data.okButtonText ?? 'OK' }}\n </button>\n </div>\n</kl-dialog-content>\n" }]
|
|
18
18
|
}] });
|
|
@@ -74,10 +74,10 @@ class Alert {
|
|
|
74
74
|
onClose: options.onClose,
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
78
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
77
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
78
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Alert, providedIn: 'root' });
|
|
79
79
|
}
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Alert, decorators: [{
|
|
81
81
|
type: Injectable,
|
|
82
82
|
args: [{ providedIn: 'root' }]
|
|
83
83
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-alert.mjs","sources":["../../projects/koala-ui/shared/components/alert/alert-content.ts","../../projects/koala-ui/shared/components/alert/alert-content.html","../../projects/koala-ui/shared/components/alert/alert.ts","../../projects/koala-ui/shared/components/alert/koalarx-ui-shared-components-alert.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport {\n DIALOG_DATA,\n DialogContent,\n DialogRef,\n} from '@koalarx/ui/shared/components/dialog';\nimport { Button } from '@koalarx/ui/shared/directives';\nimport { AlertData } from './alert';\n\n@Component({\n selector: 'kl-alert-content',\n templateUrl: './alert-content.html',\n imports: [DialogContent, Button],\n})\nexport class AlertContent {\n private readonly dialogRef = inject(DialogRef);\n\n data = inject<AlertData>(DIALOG_DATA);\n\n close() {\n this.dialogRef.dismiss('close');\n }\n}\n","<kl-dialog-content>\n @if (data.title) {\n <h2>{{ data.title }}</h2>\n }\n\n <div class=\"flex flex-col items-center justify-center gap-4\" content>\n @switch (data.type) {\n @case ('info') {\n <i class=\"fa-solid fa-circle-info text-6xl text-indigo-500\"></i>\n }\n @case ('success') {\n <i class=\"fa-solid fa-circle-check text-6xl text-green-500\"></i>\n }\n @case ('warning') {\n <i class=\"fa-solid fa-triangle-exclamation text-6xl text-yellow-500\"></i>\n\n }\n @case ('error') {\n <i class=\"fa-solid fa-circle-xmark text-6xl text-red-500\"></i>\n }\n }\n\n <p [innerHTML]=\"data.message\"></p>\n </div>\n\n <div class=\"flex items-center justify-center w-full\" actions>\n <button klButton outline [color]=\"data.type\" (click)=\"close()\">\n {{ data.okButtonText ?? 'OK' }}\n </button>\n </div>\n</kl-dialog-content>\n","import { inject, Injectable } from '@angular/core';\nimport { Dialog } from '@koalarx/ui/shared/components/dialog';\nimport { AlertContent } from './alert-content';\n\nexport interface AlertData {\n type: 'info' | 'warning' | 'error' | 'success';\n message: string;\n title?: string;\n okButtonText?: string;\n}\n\nexport interface AlertConfig {\n data: AlertData;\n onClose?: () => void;\n}\n\nexport interface AlertOptions extends Omit<AlertData, 'type'> {\n onClose?: () => void;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Alert {\n private readonly dialog = inject(Dialog);\n\n private open(config: AlertConfig) {\n this.dialog.open(AlertContent, {\n data: config.data,\n afterClosed: config.onClose\n ? {\n trigger: 'close',\n callback: config.onClose,\n }\n : undefined,\n });\n }\n\n success(options: AlertOptions) {\n this.open({\n data: {\n type: 'success',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n\n error(options: AlertOptions) {\n this.open({\n data: {\n type: 'error',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n\n info(options: AlertOptions) {\n this.open({\n data: {\n type: 'info',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n\n warning(options: AlertOptions) {\n this.open({\n data: {\n type: 'warning',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAca,YAAY,CAAA;AACN,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAE9C,IAAA,IAAI,GAAG,MAAM,CAAY,WAAW,CAAC;IAErC,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;;uGANtB,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-alert.mjs","sources":["../../projects/koala-ui/shared/components/alert/alert-content.ts","../../projects/koala-ui/shared/components/alert/alert-content.html","../../projects/koala-ui/shared/components/alert/alert.ts","../../projects/koala-ui/shared/components/alert/koalarx-ui-shared-components-alert.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport {\n DIALOG_DATA,\n DialogContent,\n DialogRef,\n} from '@koalarx/ui/shared/components/dialog';\nimport { Button } from '@koalarx/ui/shared/directives';\nimport { AlertData } from './alert';\n\n@Component({\n selector: 'kl-alert-content',\n templateUrl: './alert-content.html',\n imports: [DialogContent, Button],\n})\nexport class AlertContent {\n private readonly dialogRef = inject(DialogRef);\n\n data = inject<AlertData>(DIALOG_DATA);\n\n close() {\n this.dialogRef.dismiss('close');\n }\n}\n","<kl-dialog-content>\n @if (data.title) {\n <h2>{{ data.title }}</h2>\n }\n\n <div class=\"flex flex-col items-center justify-center gap-4\" content>\n @switch (data.type) {\n @case ('info') {\n <i class=\"fa-solid fa-circle-info text-6xl text-indigo-500\"></i>\n }\n @case ('success') {\n <i class=\"fa-solid fa-circle-check text-6xl text-green-500\"></i>\n }\n @case ('warning') {\n <i class=\"fa-solid fa-triangle-exclamation text-6xl text-yellow-500\"></i>\n\n }\n @case ('error') {\n <i class=\"fa-solid fa-circle-xmark text-6xl text-red-500\"></i>\n }\n }\n\n <p [innerHTML]=\"data.message\"></p>\n </div>\n\n <div class=\"flex items-center justify-center w-full\" actions>\n <button klButton outline [color]=\"data.type\" (click)=\"close()\">\n {{ data.okButtonText ?? 'OK' }}\n </button>\n </div>\n</kl-dialog-content>\n","import { inject, Injectable } from '@angular/core';\nimport { Dialog } from '@koalarx/ui/shared/components/dialog';\nimport { AlertContent } from './alert-content';\n\nexport interface AlertData {\n type: 'info' | 'warning' | 'error' | 'success';\n message: string;\n title?: string;\n okButtonText?: string;\n}\n\nexport interface AlertConfig {\n data: AlertData;\n onClose?: () => void;\n}\n\nexport interface AlertOptions extends Omit<AlertData, 'type'> {\n onClose?: () => void;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Alert {\n private readonly dialog = inject(Dialog);\n\n private open(config: AlertConfig) {\n this.dialog.open(AlertContent, {\n data: config.data,\n afterClosed: config.onClose\n ? {\n trigger: 'close',\n callback: config.onClose,\n }\n : undefined,\n });\n }\n\n success(options: AlertOptions) {\n this.open({\n data: {\n type: 'success',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n\n error(options: AlertOptions) {\n this.open({\n data: {\n type: 'error',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n\n info(options: AlertOptions) {\n this.open({\n data: {\n type: 'info',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n\n warning(options: AlertOptions) {\n this.open({\n data: {\n type: 'warning',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAca,YAAY,CAAA;AACN,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAE9C,IAAA,IAAI,GAAG,MAAM,CAAY,WAAW,CAAC;IAErC,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;;uGANtB,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECdzB,85BA+BA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDnBY,aAAa,8DAAE,MAAM,EAAA,QAAA,EAAA,+BAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,YAAA,EAAA,UAAA,EA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IAAI,CAAC,IAAI,CAAC;AACR,YAAA,IAAI,EAAE;AACJ,gBAAA,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,YAAY,EAAE,OAAO,CAAC,YAAY;AACnC,aAAA;YACD,OAAO,EAAE,OAAO,CAAC,OAAO;AACzB,SAAA,CAAC;;AAGJ,IAAA,OAAO,CAAC,OAAqB,EAAA;QAC3B,IAAI,CAAC,IAAI,CAAC;AACR,YAAA,IAAI,EAAE;AACJ,gBAAA,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,YAAY,EAAE,OAAO,CAAC,YAAY;AACnC,aAAA;YACD,OAAO,EAAE,OAAO,CAAC,OAAO;AACzB,SAAA,CAAC;;uGA5DO,KAAK,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAL,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,KAAK,cADQ,MAAM,EAAA,CAAA;;2FACnB,KAAK,EAAA,UAAA,EAAA,CAAA;kBADjB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpBlC;;AAEG;;;;"}
|
|
@@ -15,13 +15,13 @@ import { MarkdownModule } from 'ngx-markdown';
|
|
|
15
15
|
|
|
16
16
|
class CodeViewer {
|
|
17
17
|
translations = inject(AppConfig).translation.codeViewer;
|
|
18
|
-
copied = signal(false);
|
|
19
|
-
content = signal('');
|
|
20
|
-
name = input.required();
|
|
21
|
-
src = input.required();
|
|
22
|
-
language = input('other');
|
|
23
|
-
lineHighlight = input();
|
|
24
|
-
lineNumbers = input(false, { transform: booleanAttribute });
|
|
18
|
+
copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : []));
|
|
19
|
+
content = signal('', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
20
|
+
name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
21
|
+
src = input.required(...(ngDevMode ? [{ debugName: "src" }] : []));
|
|
22
|
+
language = input('other', ...(ngDevMode ? [{ debugName: "language" }] : []));
|
|
23
|
+
lineHighlight = input(...(ngDevMode ? [undefined, { debugName: "lineHighlight" }] : []));
|
|
24
|
+
lineNumbers = input(false, ...(ngDevMode ? [{ debugName: "lineNumbers", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
25
25
|
icon = linkedSignal(() => {
|
|
26
26
|
const language = this.language();
|
|
27
27
|
if (language) {
|
|
@@ -52,10 +52,10 @@ class CodeViewer {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
56
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: CodeViewer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: CodeViewer, isStandalone: true, selector: "kl-code-viewer", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: false, transformFunction: null }, lineHighlight: { classPropertyName: "lineHighlight", publicName: "lineHighlight", isSignal: true, isRequired: false, transformFunction: null }, lineNumbers: { classPropertyName: "lineNumbers", publicName: "lineNumbers", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"relative rounded-xl bg-neutral-900 border border-base-300 mt-5 overflow-hidden\">\n <div class=\"flex items-center justify-between p-3\">\n <span class=\"flex items-center gap-2\">\n <i class=\"bg-neutral-400 text-neutral-950 rounded-sm\"\n [class]=\"icon()\">\n </i>\n <span class=\"text-neutral-500\">{{ name() }}</span>\n </span>\n\n <button class=\"hover:cursor-pointer px-2 text-md text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800 rounded-sm\"\n type=\"button\"\n [tooltip]=\"copied()\n ? translations.copiedToClipboard\n : translations.copyToClipboard\"\n tooltipPosition=\"left\"\n (click)=\"copyCode()\">\n\n @if (copied()) {\n <i class=\"fa-solid fa-check\"></i>\n } @else {\n <i class=\"fa-regular fa-clipboard\"></i>\n }\n </button>\n </div>\n\n <markdown\n [src]=\"src()\"\n [disableSanitizer]=\"true\"\n [lineNumbers]=\"lineNumbers()\"\n lineHighlight\n [line]=\"lineHighlight()\"\n (load)=\"clipboard($event)\"\n />\n</div>\n", dependencies: [{ kind: "ngmodule", type: MarkdownModule }, { kind: "component", type: i1.MarkdownComponent, selector: "markdown, [markdown]", inputs: ["data", "src", "disableSanitizer", "inline", "clipboard", "clipboardButtonComponent", "clipboardButtonTemplate", "emoji", "katex", "katexOptions", "mermaid", "mermaidOptions", "lineHighlight", "line", "lineOffset", "lineNumbers", "start", "commandLine", "filterOutput", "host", "prompt", "output", "user"], outputs: ["error", "load", "ready"] }, { kind: "directive", type: Tooltip, selector: "[tooltip]", inputs: ["tooltip", "tooltipPosition"] }] });
|
|
57
57
|
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: CodeViewer, decorators: [{
|
|
59
59
|
type: Component,
|
|
60
60
|
args: [{ selector: 'kl-code-viewer', imports: [MarkdownModule, Tooltip], template: "<div class=\"relative rounded-xl bg-neutral-900 border border-base-300 mt-5 overflow-hidden\">\n <div class=\"flex items-center justify-between p-3\">\n <span class=\"flex items-center gap-2\">\n <i class=\"bg-neutral-400 text-neutral-950 rounded-sm\"\n [class]=\"icon()\">\n </i>\n <span class=\"text-neutral-500\">{{ name() }}</span>\n </span>\n\n <button class=\"hover:cursor-pointer px-2 text-md text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800 rounded-sm\"\n type=\"button\"\n [tooltip]=\"copied()\n ? translations.copiedToClipboard\n : translations.copyToClipboard\"\n tooltipPosition=\"left\"\n (click)=\"copyCode()\">\n\n @if (copied()) {\n <i class=\"fa-solid fa-check\"></i>\n } @else {\n <i class=\"fa-regular fa-clipboard\"></i>\n }\n </button>\n </div>\n\n <markdown\n [src]=\"src()\"\n [disableSanitizer]=\"true\"\n [lineNumbers]=\"lineNumbers()\"\n lineHighlight\n [line]=\"lineHighlight()\"\n (load)=\"clipboard($event)\"\n />\n</div>\n" }]
|
|
61
61
|
}] });
|