@koalarx/ui 21.2.3 → 21.2.4
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 +16 -16
- 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-config.mjs +1 -1
- package/fesm2022/koalarx-ui-core-config.mjs.map +1 -1
- package/fesm2022/koalarx-ui-core-guards.mjs +3 -3
- package/fesm2022/koalarx-ui-core-guards.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 +11 -11
- 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 +9 -9
- package/fesm2022/koalarx-ui-shared-components-dialog.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-dropdown.mjs +6 -6
- 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-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-cnpj.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-cpf.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-input-cpf.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-currency.mjs +5 -5
- 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-email.mjs.map +1 -1
- 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-number.mjs +3 -3
- 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-input-url.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-range.mjs +14 -14
- package/fesm2022/koalarx-ui-shared-components-input-field-range.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-select.mjs +22 -22
- 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 +18 -18
- package/fesm2022/koalarx-ui-shared-components-input-field.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-on-this-page.mjs +6 -6
- 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-side-window.mjs.map +1 -1
- 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-shared-validators.mjs.map +1 -1
- package/fesm2022/koalarx-ui.mjs +7 -7
- package/fesm2022/koalarx-ui.mjs.map +1 -1
- package/package.json +23 -23
|
@@ -90,19 +90,19 @@ class ListBase {
|
|
|
90
90
|
reloading = false;
|
|
91
91
|
currentPaginationType = 'paginator';
|
|
92
92
|
resourceRef;
|
|
93
|
-
limitPage = signal(30, ...(ngDevMode ? [{ debugName: "limitPage" }] : []));
|
|
94
|
-
page = signal(1, ...(ngDevMode ? [{ debugName: "page" }] : []));
|
|
95
|
-
filter = signal({}, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
93
|
+
limitPage = signal(30, ...(ngDevMode ? [{ debugName: "limitPage" }] : /* istanbul ignore next */ []));
|
|
94
|
+
page = signal(1, ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
|
|
95
|
+
filter = signal({}, ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
|
|
96
96
|
service;
|
|
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" }] : []));
|
|
97
|
+
totalItemsOnPage = signal(0, ...(ngDevMode ? [{ debugName: "totalItemsOnPage" }] : /* istanbul ignore next */ []));
|
|
98
|
+
totalItems = signal(0, ...(ngDevMode ? [{ debugName: "totalItems" }] : /* istanbul ignore next */ []));
|
|
99
|
+
list = signal([], ...(ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []));
|
|
100
|
+
sortFilter = signal(null, ...(ngDevMode ? [{ debugName: "sortFilter" }] : /* istanbul ignore next */ []));
|
|
101
|
+
paginationType = model('paginator', ...(ngDevMode ? [{ debugName: "paginationType" }] : /* istanbul ignore next */ []));
|
|
102
102
|
withPagination = computed(() => {
|
|
103
103
|
this.currentPaginationType = this.paginationType();
|
|
104
104
|
return this.currentPaginationType === 'paginator';
|
|
105
|
-
}, ...(ngDevMode ? [{ debugName: "withPagination" }] : []));
|
|
105
|
+
}, ...(ngDevMode ? [{ debugName: "withPagination" }] : /* istanbul ignore next */ []));
|
|
106
106
|
datatableConfig = linkedSignal(() => ({
|
|
107
107
|
currentPage: this.page(),
|
|
108
108
|
totalItems: this.totalItems(),
|
|
@@ -110,14 +110,14 @@ class ListBase {
|
|
|
110
110
|
currentPageSize: this.limitPage(),
|
|
111
111
|
isLoading: this.resourceRef.isLoading(),
|
|
112
112
|
hasError: !!this.resourceRef.error(),
|
|
113
|
-
}), ...(ngDevMode ? [{ debugName: "datatableConfig" }] : []));
|
|
113
|
+
}), ...(ngDevMode ? [{ debugName: "datatableConfig" }] : /* istanbul ignore next */ []));
|
|
114
114
|
queryParams = computed(() => ({
|
|
115
115
|
page: this.page(),
|
|
116
116
|
limit: this.limitPage(),
|
|
117
117
|
...(this.sortFilter() ?? {}),
|
|
118
118
|
...this.filter(),
|
|
119
|
-
}), ...(ngDevMode ? [{ debugName: "queryParams" }] : []));
|
|
120
|
-
reload = input(false, ...(ngDevMode ? [{ debugName: "reload" }] : []));
|
|
119
|
+
}), ...(ngDevMode ? [{ debugName: "queryParams" }] : /* istanbul ignore next */ []));
|
|
120
|
+
reload = input(false, ...(ngDevMode ? [{ debugName: "reload" }] : /* istanbul ignore next */ []));
|
|
121
121
|
constructor(
|
|
122
122
|
// eslint-disable-next-line @angular-eslint/prefer-inject
|
|
123
123
|
service,
|
|
@@ -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: "21.
|
|
185
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", 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: "21.2.8", 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: "21.
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ListBase, decorators: [{
|
|
188
188
|
type: Directive
|
|
189
189
|
}], ctorParameters: () => [{ type: i0.Type }, { type: i0.Type }], propDecorators: { paginationType: [{ type: i0.Input, args: [{ isSignal: true, alias: "paginationType", required: false }] }, { type: i0.Output, args: ["paginationTypeChange"] }], reload: [{ type: i0.Input, args: [{ isSignal: true, alias: "reload", required: false }] }] } });
|
|
190
190
|
|
|
191
191
|
class PageBase {
|
|
192
|
-
reload = signal(false, ...(ngDevMode ? [{ debugName: "reload" }] : []));
|
|
192
|
+
reload = signal(false, ...(ngDevMode ? [{ debugName: "reload" }] : /* istanbul ignore next */ []));
|
|
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 { 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<SelectOption<EntityType> | GetManyResult<EntityType>, 'data'>;\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: (item: TResponse) => Omit<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 TService extends HttpBase<TEntity, any, QueryType> = HttpBase<\n TEntity,\n any,\n QueryType\n >,\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 service: TService;\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 service: Type<TService>,\n // eslint-disable-next-line @angular-eslint/prefer-inject\n protected readonly componentFilter?: Type<any>,\n ) {\n this.service = inject(service);\n this.resourceRef = this.service.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":";;;;;;;;MAiBsB,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,WAAA,CAA+B,QAAgB,EAAE,O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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;;;;"}
|
|
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 { 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<SelectOption<EntityType> | GetManyResult<EntityType>, 'data'>;\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: (item: TResponse) => Omit<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 TService extends HttpBase<TEntity, any, QueryType> = HttpBase<\n TEntity,\n any,\n QueryType\n >,\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 service: TService;\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 service: Type<TService>,\n // eslint-disable-next-line @angular-eslint/prefer-inject\n protected readonly componentFilter?: Type<any>,\n ) {\n this.service = inject(service);\n this.resourceRef = this.service.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":";;;;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,QAAQ,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,IAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,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,6EAAC;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;IAC1C;AACD;;ACTD;;AAEG;;;;"}
|
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class DialogContainer {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DialogContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: DialogContainer, isStandalone: true, selector: "kl-dialog-container", ngImport: i0, template: "<div class=\"dialog-container\"></div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: DialogContainer, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'kl-dialog-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dialog-container\"></div>\n" }]
|
|
11
11
|
}] });
|
|
@@ -9,7 +9,7 @@ import { LoadingBarRouterModule } from '@ngx-loading-bar/router';
|
|
|
9
9
|
import * as i1 from '@ngx-loading-bar/core';
|
|
10
10
|
|
|
11
11
|
class KlRoot {
|
|
12
|
-
routerLoaderColor = input('#6A1B9A', ...(ngDevMode ? [{ debugName: "routerLoaderColor" }] : []));
|
|
12
|
+
routerLoaderColor = input('#6A1B9A', ...(ngDevMode ? [{ debugName: "routerLoaderColor" }] : /* istanbul ignore next */ []));
|
|
13
13
|
ngOnInit() {
|
|
14
14
|
if (document.querySelector('html')?.getAttribute('data-theme') === null) {
|
|
15
15
|
document.querySelector('html')?.setAttribute('data-theme', 'light');
|
|
@@ -27,10 +27,10 @@ class KlRoot {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
31
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: KlRoot, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", 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-dialog-container />\n <kl-side-window-container />\n <kl-snackbar-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" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: KlRoot, decorators: [{
|
|
34
34
|
type: Component,
|
|
35
35
|
args: [{ selector: 'kl-root', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
36
36
|
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 {\n ChangeDetectionStrategy,\n Component,\n input,\n OnInit,\n} 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 { CURRENT_THEME } from '@koalarx/ui/core/config';\nimport { ThemeName } from '@koalarx/ui/theme';\nimport { LoadingBarRouterModule } from '@ngx-loading-bar/router';\n\n@Component({\n selector: 'kl-root',\n templateUrl: './kl-root.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\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 const htmlElement = document.querySelector('html');\n\n if (htmlElement) {\n htmlElement.onchange = () => {\n setTimeout(() => {\n const theme = htmlElement.getAttribute(\n 'data-theme'\n ) as ThemeName | null;\n\n if (theme === CURRENT_THEME()) {\n return;\n }\n\n CURRENT_THEME.set(theme);\n });\n };\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-dialog-container />\n <kl-side-window-container />\n <kl-snackbar-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":";;;;;;;;;;MA0Ba,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 {\n ChangeDetectionStrategy,\n Component,\n input,\n OnInit,\n} 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 { CURRENT_THEME } from '@koalarx/ui/core/config';\nimport { ThemeName } from '@koalarx/ui/theme';\nimport { LoadingBarRouterModule } from '@ngx-loading-bar/router';\n\n@Component({\n selector: 'kl-root',\n templateUrl: './kl-root.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\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 const htmlElement = document.querySelector('html');\n\n if (htmlElement) {\n htmlElement.onchange = () => {\n setTimeout(() => {\n const theme = htmlElement.getAttribute(\n 'data-theme'\n ) as ThemeName | null;\n\n if (theme === CURRENT_THEME()) {\n return;\n }\n\n CURRENT_THEME.set(theme);\n });\n };\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-dialog-container />\n <kl-side-window-container />\n <kl-snackbar-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":";;;;;;;;;;MA0Ba,MAAM,CAAA;AACjB,IAAA,iBAAiB,GAAG,KAAK,CAAS,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AAA,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,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAGR,MAAM,EAAA,UAAA,EAAA,CAAA;kBAZlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,EAAA,eAAA,EAEF,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,eAAe;wBACf,sBAAsB;wBACtB,mBAAmB;wBACnB,iBAAiB;wBACjB,iBAAiB;AAClB,qBAAA,EAAA,QAAA,EAAA,4VAAA,EAAA;;;AExBH;;AAEG;;;;"}
|
|
@@ -3,7 +3,7 @@ import { signal, Injectable, inject, ChangeDetectionStrategy, Component } from '
|
|
|
3
3
|
import { Loader } from '@koalarx/ui/core/components/loader';
|
|
4
4
|
|
|
5
5
|
class LoaderPage {
|
|
6
|
-
_loading = signal(false, ...(ngDevMode ? [{ debugName: "_loading" }] : []));
|
|
6
|
+
_loading = signal(false, ...(ngDevMode ? [{ debugName: "_loading" }] : /* istanbul ignore next */ []));
|
|
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: "21.
|
|
17
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LoaderPage, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
17
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LoaderPage, providedIn: 'root' });
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", 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: "21.
|
|
27
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LoaderPageContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", 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-10001\"\n [class]=\"{ 'hidden': !loaderPage.isLoading() }\">\n <kl-loader size=\"extraLarge\" />\n</div>\n", dependencies: [{ kind: "component", type: Loader, selector: "kl-loader", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: LoaderPageContent, decorators: [{
|
|
30
30
|
type: Component,
|
|
31
31
|
args: [{ selector: 'kl-loader-page-content', changeDetection: ChangeDetectionStrategy.OnPush, imports: [Loader], template: "<div class=\"fixed bg-base-100/40 flex w-full h-full items-center justify-center z-10001\"\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 { ChangeDetectionStrategy, 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 changeDetection: ChangeDetectionStrategy.OnPush,\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-10001\"\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 { ChangeDetectionStrategy, 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 changeDetection: ChangeDetectionStrategy.OnPush,\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-10001\"\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,+EAAC;AAEhC,IAAA,IAAI,SAAS,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;IACnC;IAEA,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;IACzB;IAEA,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;IAC1B;uGAbW,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;;;MCQrB,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,ECV9B,iMAIA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDIY,MAAM,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEL,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,mBAEjB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,MAAM,CAAC,EAAA,QAAA,EAAA,iMAAA,EAAA;;;AERnB;;AAEG;;;;"}
|
|
@@ -2,11 +2,11 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class Loader {
|
|
5
|
-
size = input('small', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
5
|
+
size = input('small', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Loader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", 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", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Loader, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'kl-loader', changeDetection: ChangeDetectionStrategy.OnPush, 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
|
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
@@ -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 { ChangeDetectionStrategy, 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 changeDetection: ChangeDetectionStrategy.OnPush,\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":";;;MASa,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 { ChangeDetectionStrategy, 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 changeDetection: ChangeDetectionStrategy.OnPush,\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":";;;MASa,MAAM,CAAA;AACjB,IAAA,IAAI,GAAG,KAAK,CAAa,OAAO,2EAAC;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,sMCTnB,wRASA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDAa,MAAM,EAAA,UAAA,EAAA,CAAA;kBALlB,SAAS;+BACE,WAAW,EAAA,eAAA,EAEJ,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,wRAAA,EAAA;;;AEPjD;;AAEG;;;;"}
|
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class SideWindowContainer {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SideWindowContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: SideWindowContainer, isStandalone: true, selector: "kl-side-window-container", ngImport: i0, template: "<div class=\"side-window-container\"></div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SideWindowContainer, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'kl-side-window-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"side-window-container\"></div>\n" }]
|
|
11
11
|
}] });
|
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class SnackbarContainer {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SnackbarContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: SnackbarContainer, isStandalone: true, selector: "kl-snackbar-container", ngImport: i0, template: "<div class=\"toast toast-top toast-end z-20000 w-full\"></div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SnackbarContainer, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{ selector: 'kl-snackbar-container', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"toast toast-top toast-end z-20000 w-full\"></div>\n" }]
|
|
11
11
|
}] });
|
|
@@ -2,7 +2,7 @@ import { signal } from '@angular/core';
|
|
|
2
2
|
import { en } from '@koalarx/ui/core/translations';
|
|
3
3
|
|
|
4
4
|
const GENERIC_COMPONENT_CONTAINER_NAME = '.kl-generic-component-container';
|
|
5
|
-
const CURRENT_THEME = signal(null, ...(ngDevMode ? [{ debugName: "CURRENT_THEME" }] : []));
|
|
5
|
+
const CURRENT_THEME = signal(null, ...(ngDevMode ? [{ debugName: "CURRENT_THEME" }] : /* istanbul ignore next */ []));
|
|
6
6
|
|
|
7
7
|
class AppConfig {
|
|
8
8
|
_hostApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-core-config.mjs","sources":["../../projects/koala-ui/core/config/constants.ts","../../projects/koala-ui/core/config/app-config.ts","../../projects/koala-ui/core/config/koalarx-ui-core-config.ts"],"sourcesContent":["import { signal } from '@angular/core';\nimport { ThemeName } from '@koalarx/ui/theme';\n\nexport const GENERIC_COMPONENT_CONTAINER_NAME =\n '.kl-generic-component-container';\nexport const CURRENT_THEME = signal<ThemeName | null>(null);\n","import { HttpClientErrorsMiddleware } from '@koalarx/ui/core/middlewares';\nimport { AuthConfig } from '@koalarx/ui/core/models';\nimport { KoalaLanguage, Translation, en } from '@koalarx/ui/core/translations';\n\nexport class AppConfig {\n private _hostApi: string | undefined;\n private _language: KoalaLanguage | undefined;\n private _translation: Translation | undefined;\n private _httpClientErrorsMiddleware: HttpClientErrorsMiddleware | undefined;\n private _authConfig: AuthConfig | undefined;\n\n set hostApi(hostApi: string | undefined) {\n this._hostApi = hostApi;\n }\n\n get hostApi(): string | undefined {\n return this._hostApi;\n }\n\n set language(language: KoalaLanguage | undefined) {\n this._language = language;\n }\n\n get language(): KoalaLanguage | undefined {\n return this._language;\n }\n\n set translation(translation: Translation | undefined) {\n this._translation = translation;\n }\n\n get translation(): Translation {\n return this._translation ?? en;\n }\n\n set httpClientErrorsMiddleware(\n httpClientErrorsMiddleware: HttpClientErrorsMiddleware | undefined\n ) {\n this._httpClientErrorsMiddleware = httpClientErrorsMiddleware;\n }\n\n get httpClientErrorsMiddleware(): HttpClientErrorsMiddleware | undefined {\n return this._httpClientErrorsMiddleware;\n }\n\n set authConfig(authConfig: AuthConfig | undefined) {\n this._authConfig = authConfig;\n }\n\n get authConfig(): AuthConfig | undefined {\n return this._authConfig;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGO,MAAM,gCAAgC,GAC3C;MACW,aAAa,GAAG,MAAM,CAAmB,IAAI;;MCD7C,SAAS,CAAA;AACZ,IAAA,QAAQ;AACR,IAAA,SAAS;AACT,IAAA,YAAY;AACZ,IAAA,2BAA2B;AAC3B,IAAA,WAAW;IAEnB,IAAI,OAAO,CAAC,OAA2B,EAAA;AACrC,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO
|
|
1
|
+
{"version":3,"file":"koalarx-ui-core-config.mjs","sources":["../../projects/koala-ui/core/config/constants.ts","../../projects/koala-ui/core/config/app-config.ts","../../projects/koala-ui/core/config/koalarx-ui-core-config.ts"],"sourcesContent":["import { signal } from '@angular/core';\nimport { ThemeName } from '@koalarx/ui/theme';\n\nexport const GENERIC_COMPONENT_CONTAINER_NAME =\n '.kl-generic-component-container';\nexport const CURRENT_THEME = signal<ThemeName | null>(null);\n","import { HttpClientErrorsMiddleware } from '@koalarx/ui/core/middlewares';\nimport { AuthConfig } from '@koalarx/ui/core/models';\nimport { KoalaLanguage, Translation, en } from '@koalarx/ui/core/translations';\n\nexport class AppConfig {\n private _hostApi: string | undefined;\n private _language: KoalaLanguage | undefined;\n private _translation: Translation | undefined;\n private _httpClientErrorsMiddleware: HttpClientErrorsMiddleware | undefined;\n private _authConfig: AuthConfig | undefined;\n\n set hostApi(hostApi: string | undefined) {\n this._hostApi = hostApi;\n }\n\n get hostApi(): string | undefined {\n return this._hostApi;\n }\n\n set language(language: KoalaLanguage | undefined) {\n this._language = language;\n }\n\n get language(): KoalaLanguage | undefined {\n return this._language;\n }\n\n set translation(translation: Translation | undefined) {\n this._translation = translation;\n }\n\n get translation(): Translation {\n return this._translation ?? en;\n }\n\n set httpClientErrorsMiddleware(\n httpClientErrorsMiddleware: HttpClientErrorsMiddleware | undefined\n ) {\n this._httpClientErrorsMiddleware = httpClientErrorsMiddleware;\n }\n\n get httpClientErrorsMiddleware(): HttpClientErrorsMiddleware | undefined {\n return this._httpClientErrorsMiddleware;\n }\n\n set authConfig(authConfig: AuthConfig | undefined) {\n this._authConfig = authConfig;\n }\n\n get authConfig(): AuthConfig | undefined {\n return this._authConfig;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGO,MAAM,gCAAgC,GAC3C;MACW,aAAa,GAAG,MAAM,CAAmB,IAAI;;MCD7C,SAAS,CAAA;AACZ,IAAA,QAAQ;AACR,IAAA,SAAS;AACT,IAAA,YAAY;AACZ,IAAA,2BAA2B;AAC3B,IAAA,WAAW;IAEnB,IAAI,OAAO,CAAC,OAA2B,EAAA;AACrC,QAAA,IAAI,CAAC,QAAQ,GAAG,OAAO;IACzB;AAEA,IAAA,IAAI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,IAAI,QAAQ,CAAC,QAAmC,EAAA;AAC9C,QAAA,IAAI,CAAC,SAAS,GAAG,QAAQ;IAC3B;AAEA,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;IACvB;IAEA,IAAI,WAAW,CAAC,WAAoC,EAAA;AAClD,QAAA,IAAI,CAAC,YAAY,GAAG,WAAW;IACjC;AAEA,IAAA,IAAI,WAAW,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,YAAY,IAAI,EAAE;IAChC;IAEA,IAAI,0BAA0B,CAC5B,0BAAkE,EAAA;AAElE,QAAA,IAAI,CAAC,2BAA2B,GAAG,0BAA0B;IAC/D;AAEA,IAAA,IAAI,0BAA0B,GAAA;QAC5B,OAAO,IAAI,CAAC,2BAA2B;IACzC;IAEA,IAAI,UAAU,CAAC,UAAkC,EAAA;AAC/C,QAAA,IAAI,CAAC,WAAW,GAAG,UAAU;IAC/B;AAEA,IAAA,IAAI,UAAU,GAAA;QACZ,OAAO,IAAI,CAAC,WAAW;IACzB;AACD;;ACpDD;;AAEG;;;;"}
|
|
@@ -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: "21.
|
|
11
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
10
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AuthGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AuthGuard });
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AuthGuard, decorators: [{
|
|
14
14
|
type: Injectable
|
|
15
15
|
}] });
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-core-guards.mjs","sources":["../../projects/koala-ui/core/guards/auth.guard.ts","../../projects/koala-ui/core/guards/koalarx-ui-core-guards.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { CanActivate, GuardResult, MaybeAsync } from '@angular/router';\nimport { Authorization } from '@koalarx/ui/shared/services';\n\n@Injectable()\nexport class AuthGuard implements CanActivate {\n private readonly authService = inject(Authorization);\n\n canActivate(): MaybeAsync<GuardResult> {\n return this.authService.isAuthenticated();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAKa,SAAS,CAAA;AACH,IAAA,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC;IAEpD,WAAW,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE
|
|
1
|
+
{"version":3,"file":"koalarx-ui-core-guards.mjs","sources":["../../projects/koala-ui/core/guards/auth.guard.ts","../../projects/koala-ui/core/guards/koalarx-ui-core-guards.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { CanActivate, GuardResult, MaybeAsync } from '@angular/router';\nimport { Authorization } from '@koalarx/ui/shared/services';\n\n@Injectable()\nexport class AuthGuard implements CanActivate {\n private readonly authService = inject(Authorization);\n\n canActivate(): MaybeAsync<GuardResult> {\n return this.authService.isAuthenticated();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAKa,SAAS,CAAA;AACH,IAAA,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC;IAEpD,WAAW,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE;IAC3C;uGALW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAT,SAAS,EAAA,CAAA;;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBADrB;;;ACJD;;AAEG;;;;"}
|
|
@@ -2,11 +2,11 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class Accordion {
|
|
5
|
-
name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
5
|
+
name = input.required(...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Accordion, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", 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", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Accordion, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'kl-accordion', changeDetection: ChangeDetectionStrategy.OnPush, 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
|
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }] } });
|
|
@@ -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 { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'kl-accordion',\n templateUrl: './accordion.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\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":";;;MAOa,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 { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'kl-accordion',\n templateUrl: './accordion.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\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":";;;MAOa,SAAS,CAAA;AACpB,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAU;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,wMCPtB,gVASA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDFa,SAAS,EAAA,UAAA,EAAA,CAAA;kBALrB,SAAS;+BACE,cAAc,EAAA,eAAA,EAEP,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,gVAAA,EAAA;;;AELjD;;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: "21.
|
|
13
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AlertContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", 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 class=\"text-center\" [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: "21.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", 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 class=\"text-center\" [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: "21.
|
|
78
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
77
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
78
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Alert, providedIn: 'root' });
|
|
79
79
|
}
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", 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 class=\"text-center\" [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
|
|
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 class=\"text-center\" [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;IACjC;uGAPW,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,o7BA+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,EAAA,MAAA,CAAA,EAAA,CAAA,EAA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AAC;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;IACJ;AAEA,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;IACJ;uGA7DW,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, ...(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 });
|
|
18
|
+
copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : /* istanbul ignore next */ []));
|
|
19
|
+
content = signal('', ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
20
|
+
name = input.required(...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
21
|
+
src = input.required(...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
|
|
22
|
+
language = input('other', ...(ngDevMode ? [{ debugName: "language" }] : /* istanbul ignore next */ []));
|
|
23
|
+
lineHighlight = input(...(ngDevMode ? [undefined, { debugName: "lineHighlight" }] : /* istanbul ignore next */ []));
|
|
24
|
+
lineNumbers = input(false, { ...(ngDevMode ? { debugName: "lineNumbers" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
25
25
|
icon = linkedSignal(() => {
|
|
26
26
|
const language = this.language();
|
|
27
27
|
if (language) {
|
|
@@ -39,7 +39,7 @@ class CodeViewer {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
return 'fa-solid fa-code';
|
|
42
|
-
}, ...(ngDevMode ? [{ debugName: "icon" }] : []));
|
|
42
|
+
}, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
43
43
|
clipboard(event) {
|
|
44
44
|
this.content.set(event.replace(/^[^\n]*\n?/, '').replace(/`/g, ''));
|
|
45
45
|
}
|
|
@@ -52,10 +52,10 @@ class CodeViewer {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
56
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CodeViewer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
57
57
|
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: CodeViewer, decorators: [{
|
|
59
59
|
type: Component,
|
|
60
60
|
args: [{ selector: 'kl-code-viewer', changeDetection: ChangeDetectionStrategy.OnPush, 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
|
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: true }] }], language: [{ type: i0.Input, args: [{ isSignal: true, alias: "language", required: false }] }], lineHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineHighlight", required: false }] }], lineNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineNumbers", required: false }] }] } });
|