@koalarx/ui 20.0.33 → 20.0.35
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 +3 -0
- package/fesm2022/koalarx-ui-core-base.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-dialog.mjs +2 -2
- package/fesm2022/koalarx-ui-shared-components-dialog.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-side-window.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-side-window.mjs.map +1 -1
- package/package.json +1 -1
- package/theme/form.css +9 -1
|
@@ -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 signal,\n Type,\n} from '@angular/core';\nimport {\n GetManyResult,\n QueryPagination,\n SortFilterType,\n} from '@koalarx/ui/core/models';\nimport { HttpBase } from './http-base';\n\n@Directive()\nexport abstract class ListBase<\n QueryType extends QueryPagination,\n TEntity = any\n> {\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\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 const result = this.resourceRef.value();\n\n if (!result) {\n return;\n }\n\n this.list.set(result.items);\n this.totalItemsOnPage.set(result.items.length);\n this.totalItems.set(result.count);\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.resourceRef.reload();\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,CAAC,OAAO,IAAI,EAAE;AACtD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAA,EAAG,IAAI,CAAC,OAAO,CAAA,CAAA,EAAI,IAAI,CAAC,QAAQ,CAAA,CAAE;;AAG/C,IAAA,IAAI,CAAI,IAAiB,EAAE,QAAQ,GAAG,EAAE,EAAA;QACtC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAI,CAAA,EAAG,IAAI,CAAC,GAAG,CAAA,EAAG,QAAQ,CAAE,CAAA,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;;IAGxE,GAAG,CAAI,EAAU,EAAE,IAAiB,EAAA;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAI,CAAA,EAAG,IAAI,CAAC,GAAG,CAAA,CAAA,EAAI,EAAE,CAAE,CAAA,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,EAA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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 signal,\n Type,\n} from '@angular/core';\nimport {\n GetManyResult,\n QueryPagination,\n SortFilterType,\n} from '@koalarx/ui/core/models';\nimport { HttpBase } from './http-base';\n\n@Directive()\nexport abstract class ListBase<\n QueryType extends QueryPagination,\n TEntity = any\n> {\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\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 const result = this.resourceRef.value();\n\n if (!result) {\n this.list.set([]);\n this.totalItemsOnPage.set(0);\n this.totalItems.set(0);\n return;\n }\n\n this.list.set(result.items);\n this.totalItemsOnPage.set(result.items.length);\n this.totalItems.set(result.count);\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.resourceRef.reload();\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,C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,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC;;IAGvB,UAAU,GAAA;AAClB,QAAA,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;;uGA/DP,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,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,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAR,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAD7B;;;MCfqB,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;;;;"}
|
|
@@ -13,11 +13,11 @@ class DialogContent {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: DialogContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.6", type: DialogContent, isStandalone: true, selector: "kl-dialog-content", viewQueries: [{ propertyName: "dialogElement", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], ngImport: i0, template: "<dialog #dialog class=\"modal\">\n <div class=\"modal-box bg-base-
|
|
16
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.6", type: DialogContent, isStandalone: true, selector: "kl-dialog-content", viewQueries: [{ propertyName: "dialogElement", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], ngImport: i0, template: "<dialog #dialog class=\"modal\">\n <div class=\"modal-box bg-base-200 border-4 border-neutral-200 dark:border-neutral-900 rounded-lg shadow-sm\">\n <ng-content select=\"[header]\" />\n <ng-content select=\"[content]\" />\n\n <div class=\"modal-action\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n</dialog>\n" });
|
|
17
17
|
}
|
|
18
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: DialogContent, decorators: [{
|
|
19
19
|
type: Component,
|
|
20
|
-
args: [{ selector: 'kl-dialog-content', template: "<dialog #dialog class=\"modal\">\n <div class=\"modal-box bg-base-
|
|
20
|
+
args: [{ selector: 'kl-dialog-content', template: "<dialog #dialog class=\"modal\">\n <div class=\"modal-box bg-base-200 border-4 border-neutral-200 dark:border-neutral-900 rounded-lg shadow-sm\">\n <ng-content select=\"[header]\" />\n <ng-content select=\"[content]\" />\n\n <div class=\"modal-action\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n</dialog>\n" }]
|
|
21
21
|
}], ctorParameters: () => [] });
|
|
22
22
|
|
|
23
23
|
const DIALOG_CONFIG = new InjectionToken('DialogConfig');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-dialog.mjs","sources":["../../projects/koala-ui/shared/components/dialog/dialog-content.ts","../../projects/koala-ui/shared/components/dialog/dialog-content.html","../../projects/koala-ui/shared/components/dialog/dialog.ts","../../projects/koala-ui/shared/components/dialog/dialog-ref.ts","../../projects/koala-ui/shared/components/dialog/koalarx-ui-shared-components-dialog.ts"],"sourcesContent":["import { Component, effect, ElementRef, viewChild } from '@angular/core';\n\n@Component({\n selector: 'kl-dialog-content',\n templateUrl: './dialog-content.html',\n})\nexport class DialogContent {\n dialogElement = viewChild<ElementRef<HTMLDialogElement>>('dialog');\n\n constructor() {\n effect(() => {\n const dialog = this.dialogElement();\n\n if (dialog) {\n dialog.nativeElement.showModal();\n }\n });\n }\n}\n","<dialog #dialog class=\"modal\">\n <div class=\"modal-box bg-base-
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-dialog.mjs","sources":["../../projects/koala-ui/shared/components/dialog/dialog-content.ts","../../projects/koala-ui/shared/components/dialog/dialog-content.html","../../projects/koala-ui/shared/components/dialog/dialog.ts","../../projects/koala-ui/shared/components/dialog/dialog-ref.ts","../../projects/koala-ui/shared/components/dialog/koalarx-ui-shared-components-dialog.ts"],"sourcesContent":["import { Component, effect, ElementRef, viewChild } from '@angular/core';\n\n@Component({\n selector: 'kl-dialog-content',\n templateUrl: './dialog-content.html',\n})\nexport class DialogContent {\n dialogElement = viewChild<ElementRef<HTMLDialogElement>>('dialog');\n\n constructor() {\n effect(() => {\n const dialog = this.dialogElement();\n\n if (dialog) {\n dialog.nativeElement.showModal();\n }\n });\n }\n}\n","<dialog #dialog class=\"modal\">\n <div class=\"modal-box bg-base-200 border-4 border-neutral-200 dark:border-neutral-900 rounded-lg shadow-sm\">\n <ng-content select=\"[header]\" />\n <ng-content select=\"[content]\" />\n\n <div class=\"modal-action\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n</dialog>\n","import {\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n Type,\n} from '@angular/core';\nimport { randomString } from '@koalarx/utils/KlString';\nimport { DIALOG_REF_TOKEN, DialogRef } from './dialog-ref';\n\nexport type DialogAfterCloseTrigger = string | Record<string, any>;\nexport type DialogAfterCloseTriggerFn = (\n trigger: DialogAfterCloseTrigger\n) => void;\nexport const DIALOG_CONFIG = new InjectionToken('DialogConfig');\nexport const DIALOG_DATA = new InjectionToken('DialogData');\nexport const DIALOG_APP_REF = new InjectionToken('DialogAppRef');\nexport const DIALOG_AFTER_CLOSE_TRIGGER =\n new InjectionToken<DialogAfterCloseTriggerFn>('DialogAfterCloseTrigger');\n\nexport interface DialogConfig {\n data?: any;\n afterClosed?: {\n trigger: DialogAfterCloseTrigger;\n callback: (trigger: any) => void;\n };\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Dialog {\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n\n private generateElementId() {\n let elementId: string;\n\n do {\n elementId = randomString(50, {\n numbers: false,\n lowercase: true,\n uppercase: true,\n specialCharacters: false,\n });\n } while (document.getElementById(elementId));\n\n return elementId;\n }\n\n open(component: Type<any>, config?: DialogConfig) {\n const main = document.querySelector<HTMLElement>(\n 'kl-dialog-container .dialog-container'\n );\n\n if (main) {\n const elementId = this.generateElementId();\n const container = main.appendChild(document.createElement('div'));\n\n container.id = elementId;\n\n const componentRef = createComponent(component, {\n environmentInjector: this.injector,\n hostElement: container,\n elementInjector: Injector.create({\n providers: [\n { provide: DIALOG_CONFIG, useValue: config },\n { provide: DIALOG_APP_REF, useValue: this.appRef },\n {\n provide: DIALOG_REF_TOKEN,\n useValue: () => componentRef,\n },\n { provide: DIALOG_DATA, useValue: config?.data },\n {\n provide: DIALOG_AFTER_CLOSE_TRIGGER,\n useValue: (trigger: DialogAfterCloseTrigger) => {\n if (\n config?.afterClosed &&\n (config.afterClosed.trigger === trigger ||\n typeof trigger === 'object')\n ) {\n config.afterClosed.callback(trigger);\n }\n },\n },\n {\n provide: DialogRef,\n deps: [\n DIALOG_CONFIG,\n DIALOG_APP_REF,\n DIALOG_REF_TOKEN,\n DIALOG_AFTER_CLOSE_TRIGGER,\n DIALOG_DATA,\n ],\n },\n ],\n }),\n });\n\n this.appRef.attachView(componentRef.hostView);\n\n componentRef.changeDetectorRef.detectChanges();\n }\n }\n}\n","import {\n ApplicationRef,\n ComponentRef,\n inject,\n Injectable,\n InjectionToken,\n Type,\n} from '@angular/core';\nimport {\n DIALOG_AFTER_CLOSE_TRIGGER,\n DIALOG_APP_REF,\n DialogAfterCloseTrigger,\n DialogAfterCloseTriggerFn,\n} from './dialog';\n\nexport const DIALOG_REF_TOKEN = new InjectionToken('DialogRefToken');\n\n@Injectable()\nexport class DialogRef {\n private readonly appRef = inject<ApplicationRef>(DIALOG_APP_REF);\n private readonly componentRef =\n inject<() => ComponentRef<Type<any>>>(DIALOG_REF_TOKEN);\n private readonly afterCloseTrigger = inject<DialogAfterCloseTriggerFn>(\n DIALOG_AFTER_CLOSE_TRIGGER\n );\n\n dismiss(afterCloseTrigger?: DialogAfterCloseTrigger) {\n this.componentRef().destroy();\n this.appRef.detachView(this.componentRef().hostView);\n\n if (afterCloseTrigger) {\n this.afterCloseTrigger(afterCloseTrigger);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,aAAa,CAAA;AACxB,IAAA,aAAa,GAAG,SAAS,CAAgC,QAAQ,CAAC;AAElE,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE;YAEnC,IAAI,MAAM,EAAE;AACV,gBAAA,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE;;AAEpC,SAAC,CAAC;;uGAVO,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,sMCN1B,uVAUA,EAAA,CAAA;;2FDJa,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,SAAS;+BACE,mBAAmB,EAAA,QAAA,EAAA,uVAAA,EAAA;;;MEclB,aAAa,GAA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AAE;;;MChBrB,gBAAgB,GAAG,IAAI,cAAc,CAAC,gBAAgB;MAGtD,SAAS,CAAA;AACH,IAAA,MAAM,GAAG,MAAM,CAAiB,cAAc,CAAC;AAC/C,IAAA,YAAY,GAC3B,MAAM,CAAgC,gBAAgB,CAAC;AACxC,IAAA,iBAAiB,GAAG,MAAM,CACzC,0BAA0B,CAC3B;AAED,IAAA,OAAO,CAAC,iBAA2C,EAAA;AACjD,QAAA,IAAI,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE;AAC7B,QAAA,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;QAEpD,IAAI,iBAAiB,EAAE;AACrB,YAAA,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC;;;uGAblC,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;;;ACjBD;;AAEG;;;;"}
|
|
@@ -4,11 +4,11 @@ import { randomString } from '@koalarx/utils/KlString';
|
|
|
4
4
|
|
|
5
5
|
class SideWindowContent {
|
|
6
6
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SideWindowContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: SideWindowContent, isStandalone: true, selector: "kl-side-window-content", ngImport: i0, template: "<div class=\"fixed flex z-10000 bg-base-100/20 h-screen w-screen justify-end p-2\">\n <div class=\"w-auto h-full bg-base-
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: SideWindowContent, isStandalone: true, selector: "kl-side-window-content", ngImport: i0, template: "<div class=\"fixed flex z-10000 bg-base-100/20 h-screen w-screen justify-end p-2\">\n <div class=\"w-auto h-full bg-base-200 rounded-xl shadow-2xl border-4 border-neutral-200 dark:border-neutral-900 animate-slide-in-left\">\n <ng-content />\n </div>\n</div>\n" });
|
|
8
8
|
}
|
|
9
9
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SideWindowContent, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
|
-
args: [{ selector: 'kl-side-window-content', template: "<div class=\"fixed flex z-10000 bg-base-100/20 h-screen w-screen justify-end p-2\">\n <div class=\"w-auto h-full bg-base-
|
|
11
|
+
args: [{ selector: 'kl-side-window-content', template: "<div class=\"fixed flex z-10000 bg-base-100/20 h-screen w-screen justify-end p-2\">\n <div class=\"w-auto h-full bg-base-200 rounded-xl shadow-2xl border-4 border-neutral-200 dark:border-neutral-900 animate-slide-in-left\">\n <ng-content />\n </div>\n</div>\n" }]
|
|
12
12
|
}] });
|
|
13
13
|
|
|
14
14
|
const SIDE_WINDOW_CONFIG = new InjectionToken('SideWindowConfig');
|
|
@@ -101,7 +101,7 @@ class SideWindowRef {
|
|
|
101
101
|
if (afterCloseTrigger) {
|
|
102
102
|
this.afterCloseTrigger(afterCloseTrigger);
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, 50);
|
|
105
105
|
}
|
|
106
106
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SideWindowRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
107
107
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SideWindowRef });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-side-window.mjs","sources":["../../projects/koala-ui/shared/components/side-window/side-window-content.ts","../../projects/koala-ui/shared/components/side-window/side-window-content.html","../../projects/koala-ui/shared/components/side-window/side-window.ts","../../projects/koala-ui/shared/components/side-window/side-window-ref.ts","../../projects/koala-ui/shared/components/side-window/koalarx-ui-shared-components-side-window.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'kl-side-window-content',\n templateUrl: './side-window-content.html',\n})\nexport class SideWindowContent {}\n","<div class=\"fixed flex z-10000 bg-base-100/20 h-screen w-screen justify-end p-2\">\n <div class=\"w-auto h-full bg-base-
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-side-window.mjs","sources":["../../projects/koala-ui/shared/components/side-window/side-window-content.ts","../../projects/koala-ui/shared/components/side-window/side-window-content.html","../../projects/koala-ui/shared/components/side-window/side-window.ts","../../projects/koala-ui/shared/components/side-window/side-window-ref.ts","../../projects/koala-ui/shared/components/side-window/koalarx-ui-shared-components-side-window.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'kl-side-window-content',\n templateUrl: './side-window-content.html',\n})\nexport class SideWindowContent {}\n","<div class=\"fixed flex z-10000 bg-base-100/20 h-screen w-screen justify-end p-2\">\n <div class=\"w-auto h-full bg-base-200 rounded-xl shadow-2xl border-4 border-neutral-200 dark:border-neutral-900 animate-slide-in-left\">\n <ng-content />\n </div>\n</div>\n","import {\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n Type,\n} from '@angular/core';\nimport { randomString } from '@koalarx/utils/KlString';\nimport { SIDE_WINDOW_REF_TOKEN, SideWindowRef } from './side-window-ref';\n\nexport type SideWindowAfterCloseTrigger = string | Record<string, any>;\nexport type SideWindowAfterCloseTriggerFn = (\n trigger: SideWindowAfterCloseTrigger\n) => void;\nexport const SIDE_WINDOW_CONFIG = new InjectionToken('SideWindowConfig');\nexport const SIDE_WINDOW_DATA = new InjectionToken('SideWindowData');\nexport const SIDE_WINDOW_APP_REF = new InjectionToken('SideWindowAppRef');\nexport const SIDE_WINDOW_AFTER_CLOSE_TRIGGER =\n new InjectionToken<SideWindowAfterCloseTriggerFn>(\n 'SideWindowAfterCloseTrigger'\n );\n\nexport interface SideWindowConfig {\n data?: any;\n afterClosed?: {\n trigger: SideWindowAfterCloseTrigger;\n callback: (trigger: any) => void;\n };\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SideWindow {\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n\n private generateElementId() {\n let elementId: string;\n\n do {\n elementId = randomString(50, {\n numbers: false,\n lowercase: true,\n uppercase: true,\n specialCharacters: false,\n });\n } while (document.getElementById(elementId));\n\n return elementId;\n }\n\n open(component: Type<any>, config?: SideWindowConfig) {\n const main = document.querySelector<HTMLElement>(\n 'kl-side-window-container .side-window-container'\n );\n\n if (main) {\n const elementId = this.generateElementId();\n const container = main.appendChild(document.createElement('div'));\n\n container.id = elementId;\n\n const componentRef = createComponent(component, {\n environmentInjector: this.injector,\n hostElement: container,\n elementInjector: Injector.create({\n providers: [\n { provide: SIDE_WINDOW_CONFIG, useValue: config },\n { provide: SIDE_WINDOW_APP_REF, useValue: this.appRef },\n {\n provide: SIDE_WINDOW_REF_TOKEN,\n useValue: () => componentRef,\n },\n { provide: SIDE_WINDOW_DATA, useValue: config?.data },\n {\n provide: SIDE_WINDOW_AFTER_CLOSE_TRIGGER,\n useValue: (trigger: SideWindowAfterCloseTrigger) => {\n if (\n config?.afterClosed &&\n (config.afterClosed.trigger === trigger ||\n typeof trigger === 'object')\n ) {\n config.afterClosed.callback(trigger);\n }\n },\n },\n {\n provide: SideWindowRef,\n deps: [\n SIDE_WINDOW_CONFIG,\n SIDE_WINDOW_APP_REF,\n SIDE_WINDOW_REF_TOKEN,\n SIDE_WINDOW_AFTER_CLOSE_TRIGGER,\n SIDE_WINDOW_DATA,\n ],\n },\n ],\n }),\n });\n\n this.appRef.attachView(componentRef.hostView);\n\n componentRef.changeDetectorRef.detectChanges();\n\n document.body.style.overflowY = 'hidden';\n }\n }\n}\n","import {\n ApplicationRef,\n ComponentRef,\n inject,\n Injectable,\n InjectionToken,\n Type,\n} from '@angular/core';\nimport {\n SIDE_WINDOW_AFTER_CLOSE_TRIGGER,\n SIDE_WINDOW_APP_REF,\n SideWindowAfterCloseTrigger,\n SideWindowAfterCloseTriggerFn,\n} from './side-window';\n\nexport const SIDE_WINDOW_REF_TOKEN = new InjectionToken('SideWindowRefToken');\n\n@Injectable()\nexport class SideWindowRef {\n private readonly appRef = inject<ApplicationRef>(SIDE_WINDOW_APP_REF);\n private readonly componentRef = inject<() => ComponentRef<Type<any>>>(\n SIDE_WINDOW_REF_TOKEN\n );\n private readonly afterCloseTrigger = inject<SideWindowAfterCloseTriggerFn>(\n SIDE_WINDOW_AFTER_CLOSE_TRIGGER\n );\n\n dismiss(afterCloseTrigger?: SideWindowAfterCloseTrigger) {\n const componentRef = this.componentRef();\n componentRef.location.nativeElement\n .querySelector('div div')\n .classList.add('animate-slide-out-right');\n\n document.body.style.overflowY = 'auto';\n\n setTimeout(() => {\n componentRef.destroy();\n this.appRef.detachView(componentRef.hostView);\n\n if (afterCloseTrigger) {\n this.afterCloseTrigger(afterCloseTrigger);\n }\n }, 50);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,kFCN9B,0QAKA,EAAA,CAAA;;2FDCa,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,SAAS;+BACE,wBAAwB,EAAA,QAAA,EAAA,0QAAA,EAAA;;;MEcvB,kBAAkB,GAAG,IAAI,cAAc,CAAC,kBAAkB;MAC1D,gBAAgB,GAAG,IAAI,cAAc,CAAC,gB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E,UAAU,EAAE,MAAM,EAAE;;;MClBrB,qBAAqB,GAAG,IAAI,cAAc,CAAC,oBAAoB;MAG/D,aAAa,CAAA;AACP,IAAA,MAAM,GAAG,MAAM,CAAiB,mBAAmB,CAAC;AACpD,IAAA,YAAY,GAAG,MAAM,CACpC,qBAAqB,CACtB;AACgB,IAAA,iBAAiB,GAAG,MAAM,CACzC,+BAA+B,CAChC;AAED,IAAA,OAAO,CAAC,iBAA+C,EAAA;AACrD,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE;QACxC,YAAY,CAAC,QAAQ,CAAC;aACnB,aAAa,CAAC,SAAS;AACvB,aAAA,SAAS,CAAC,GAAG,CAAC,yBAAyB,CAAC;QAE3C,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM;QAEtC,UAAU,CAAC,MAAK;YACd,YAAY,CAAC,OAAO,EAAE;YACtB,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC;YAE7C,IAAI,iBAAiB,EAAE;AACrB,gBAAA,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC;;SAE5C,EAAE,EAAE,CAAC;;uGAxBG,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAb,aAAa,EAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB;;;ACjBD;;AAEG;;;;"}
|
package/package.json
CHANGED
package/theme/form.css
CHANGED
|
@@ -59,14 +59,22 @@ kl-autocomplete-field .has-value:focus .autocomplete-label:after {
|
|
|
59
59
|
font-size: 1rem;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
.input,
|
|
63
|
+
.select,
|
|
64
|
+
.textarea {
|
|
65
|
+
background-color: transparent;
|
|
66
|
+
}
|
|
67
|
+
|
|
62
68
|
.input:focus,
|
|
63
69
|
.select:focus,
|
|
70
|
+
textarea:focus,
|
|
64
71
|
button:focus {
|
|
65
72
|
outline: none;
|
|
66
73
|
box-shadow: 0 0 0 3px var(--color-neutral-600) !important;
|
|
67
74
|
}
|
|
68
75
|
|
|
69
76
|
.input:has(.ng-touched.ng-invalid),
|
|
70
|
-
.select:has(.ng-touched.ng-invalid)
|
|
77
|
+
.select:has(.ng-touched.ng-invalid),
|
|
78
|
+
.textarea:has(.ng-touched.ng-invalid) {
|
|
71
79
|
--input-color: var(--color-error);
|
|
72
80
|
}
|