@koalarx/ui 20.0.22 → 20.0.23

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.
@@ -10,11 +10,11 @@ class AlertContent {
10
10
  this.dialogRef.dismiss('close');
11
11
  }
12
12
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AlertContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: AlertContent, isStandalone: true, selector: "kl-alert-content", ngImport: i0, template: "<kl-dialog-content>\n @if (data.title) {\n <h2>{{ data.title }}</h2>\n }\n\n <div class=\"flex flex-col items-center justify-center gap-4\" content>\n @switch (data.type) {\n @case ('info') {\n <i class=\"fa-solid fa-circle-info text-6xl text-indigo-500\"></i>\n }\n @case ('success') {\n <i class=\"fa-solid fa-circle-check text-6xl text-green-500\"></i>\n }\n @case ('warning') {\n <i class=\"fa-solid fa-triangle-exclamation text-6xl text-yellow-500\"></i>\n\n }\n @case ('error') {\n <i class=\"fa-solid fa-circle-xmark text-6xl text-red-500\"></i>\n }\n }\n\n <p [innerHTML]=\"data.message\"></p>\n </div>\n\n <div class=\"flex items-center justify-center w-full\" actions>\n <button klButton soft color=\"primary\" (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"] }] });
13
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: AlertContent, isStandalone: true, selector: "kl-alert-content", ngImport: i0, template: "<kl-dialog-content>\n @if (data.title) {\n <h2>{{ data.title }}</h2>\n }\n\n <div class=\"flex flex-col items-center justify-center gap-4\" content>\n @switch (data.type) {\n @case ('info') {\n <i class=\"fa-solid fa-circle-info text-6xl text-indigo-500\"></i>\n }\n @case ('success') {\n <i class=\"fa-solid fa-circle-check text-6xl text-green-500\"></i>\n }\n @case ('warning') {\n <i class=\"fa-solid fa-triangle-exclamation text-6xl text-yellow-500\"></i>\n\n }\n @case ('error') {\n <i class=\"fa-solid fa-circle-xmark text-6xl text-red-500\"></i>\n }\n }\n\n <p [innerHTML]=\"data.message\"></p>\n </div>\n\n <div class=\"flex items-center justify-center w-full\" actions>\n <button klButton outline [color]=\"data.type\" (click)=\"close()\">\n {{ data.okButtonText ?? 'OK' }}\n </button>\n </div>\n</kl-dialog-content>\n", dependencies: [{ kind: "component", type: DialogContent, selector: "kl-dialog-content" }, { kind: "directive", type: Button, selector: "button[klButton], a[klButton]", inputs: ["color", "type", "circle", "outline", "soft", "showLoader", "disabled", "size"] }] });
14
14
  }
15
15
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: AlertContent, decorators: [{
16
16
  type: Component,
17
- args: [{ selector: 'kl-alert-content', imports: [DialogContent, Button], template: "<kl-dialog-content>\n @if (data.title) {\n <h2>{{ data.title }}</h2>\n }\n\n <div class=\"flex flex-col items-center justify-center gap-4\" content>\n @switch (data.type) {\n @case ('info') {\n <i class=\"fa-solid fa-circle-info text-6xl text-indigo-500\"></i>\n }\n @case ('success') {\n <i class=\"fa-solid fa-circle-check text-6xl text-green-500\"></i>\n }\n @case ('warning') {\n <i class=\"fa-solid fa-triangle-exclamation text-6xl text-yellow-500\"></i>\n\n }\n @case ('error') {\n <i class=\"fa-solid fa-circle-xmark text-6xl text-red-500\"></i>\n }\n }\n\n <p [innerHTML]=\"data.message\"></p>\n </div>\n\n <div class=\"flex items-center justify-center w-full\" actions>\n <button klButton soft color=\"primary\" (click)=\"close()\">\n {{ data.okButtonText ?? 'OK' }}\n </button>\n </div>\n</kl-dialog-content>\n" }]
17
+ args: [{ selector: 'kl-alert-content', imports: [DialogContent, Button], template: "<kl-dialog-content>\n @if (data.title) {\n <h2>{{ data.title }}</h2>\n }\n\n <div class=\"flex flex-col items-center justify-center gap-4\" content>\n @switch (data.type) {\n @case ('info') {\n <i class=\"fa-solid fa-circle-info text-6xl text-indigo-500\"></i>\n }\n @case ('success') {\n <i class=\"fa-solid fa-circle-check text-6xl text-green-500\"></i>\n }\n @case ('warning') {\n <i class=\"fa-solid fa-triangle-exclamation text-6xl text-yellow-500\"></i>\n\n }\n @case ('error') {\n <i class=\"fa-solid fa-circle-xmark text-6xl text-red-500\"></i>\n }\n }\n\n <p [innerHTML]=\"data.message\"></p>\n </div>\n\n <div class=\"flex items-center justify-center w-full\" actions>\n <button klButton outline [color]=\"data.type\" (click)=\"close()\">\n {{ data.okButtonText ?? 'OK' }}\n </button>\n </div>\n</kl-dialog-content>\n" }]
18
18
  }] });
19
19
 
20
20
  class Alert {
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-alert.mjs","sources":["../../projects/koala-ui/shared/components/alert/alert-content.ts","../../projects/koala-ui/shared/components/alert/alert-content.html","../../projects/koala-ui/shared/components/alert/alert.ts","../../projects/koala-ui/shared/components/alert/koalarx-ui-shared-components-alert.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport {\n DIALOG_DATA,\n DialogContent,\n DialogRef,\n} from '@koalarx/ui/shared/components/dialog';\nimport { Button } from '@koalarx/ui/shared/directives';\nimport { AlertData } from './alert';\n\n@Component({\n selector: 'kl-alert-content',\n templateUrl: './alert-content.html',\n imports: [DialogContent, Button],\n})\nexport class AlertContent {\n private readonly dialogRef = inject(DialogRef);\n\n data = inject<AlertData>(DIALOG_DATA);\n\n close() {\n this.dialogRef.dismiss('close');\n }\n}\n","<kl-dialog-content>\n @if (data.title) {\n <h2>{{ data.title }}</h2>\n }\n\n <div class=\"flex flex-col items-center justify-center gap-4\" content>\n @switch (data.type) {\n @case ('info') {\n <i class=\"fa-solid fa-circle-info text-6xl text-indigo-500\"></i>\n }\n @case ('success') {\n <i class=\"fa-solid fa-circle-check text-6xl text-green-500\"></i>\n }\n @case ('warning') {\n <i class=\"fa-solid fa-triangle-exclamation text-6xl text-yellow-500\"></i>\n\n }\n @case ('error') {\n <i class=\"fa-solid fa-circle-xmark text-6xl text-red-500\"></i>\n }\n }\n\n <p [innerHTML]=\"data.message\"></p>\n </div>\n\n <div class=\"flex items-center justify-center w-full\" actions>\n <button klButton soft color=\"primary\" (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 */\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,YAAY,EAAE,OAAO,CAAC,YAAY;AACnC,aAAA;YACD,OAAO,EAAE,OAAO,CAAC,OAAO;AACzB,SAAA,CAAC;;uGA5DO,KAAK,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAL,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,KAAK,cADQ,MAAM,EAAA,CAAA;;2FACnB,KAAK,EAAA,UAAA,EAAA,CAAA;kBADjB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpBlC;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-alert.mjs","sources":["../../projects/koala-ui/shared/components/alert/alert-content.ts","../../projects/koala-ui/shared/components/alert/alert-content.html","../../projects/koala-ui/shared/components/alert/alert.ts","../../projects/koala-ui/shared/components/alert/koalarx-ui-shared-components-alert.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport {\n DIALOG_DATA,\n DialogContent,\n DialogRef,\n} from '@koalarx/ui/shared/components/dialog';\nimport { Button } from '@koalarx/ui/shared/directives';\nimport { AlertData } from './alert';\n\n@Component({\n selector: 'kl-alert-content',\n templateUrl: './alert-content.html',\n imports: [DialogContent, Button],\n})\nexport class AlertContent {\n private readonly dialogRef = inject(DialogRef);\n\n data = inject<AlertData>(DIALOG_DATA);\n\n close() {\n this.dialogRef.dismiss('close');\n }\n}\n","<kl-dialog-content>\n @if (data.title) {\n <h2>{{ data.title }}</h2>\n }\n\n <div class=\"flex flex-col items-center justify-center gap-4\" content>\n @switch (data.type) {\n @case ('info') {\n <i class=\"fa-solid fa-circle-info text-6xl text-indigo-500\"></i>\n }\n @case ('success') {\n <i class=\"fa-solid fa-circle-check text-6xl text-green-500\"></i>\n }\n @case ('warning') {\n <i class=\"fa-solid fa-triangle-exclamation text-6xl text-yellow-500\"></i>\n\n }\n @case ('error') {\n <i class=\"fa-solid fa-circle-xmark text-6xl text-red-500\"></i>\n }\n }\n\n <p [innerHTML]=\"data.message\"></p>\n </div>\n\n <div class=\"flex items-center justify-center w-full\" actions>\n <button klButton outline [color]=\"data.type\" (click)=\"close()\">\n {{ data.okButtonText ?? 'OK' }}\n </button>\n </div>\n</kl-dialog-content>\n","import { inject, Injectable } from '@angular/core';\nimport { Dialog } from '@koalarx/ui/shared/components/dialog';\nimport { AlertContent } from './alert-content';\n\nexport interface AlertData {\n type: 'info' | 'warning' | 'error' | 'success';\n message: string;\n title?: string;\n okButtonText?: string;\n}\n\nexport interface AlertConfig {\n data: AlertData;\n onClose?: () => void;\n}\n\nexport interface AlertOptions extends Omit<AlertData, 'type'> {\n onClose?: () => void;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Alert {\n private readonly dialog = inject(Dialog);\n\n private open(config: AlertConfig) {\n this.dialog.open(AlertContent, {\n data: config.data,\n afterClosed: config.onClose\n ? {\n trigger: 'close',\n callback: config.onClose,\n }\n : undefined,\n });\n }\n\n success(options: AlertOptions) {\n this.open({\n data: {\n type: 'success',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n\n error(options: AlertOptions) {\n this.open({\n data: {\n type: 'error',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n\n info(options: AlertOptions) {\n this.open({\n data: {\n type: 'info',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n\n warning(options: AlertOptions) {\n this.open({\n data: {\n type: 'warning',\n message: options.message,\n title: options.title,\n okButtonText: options.okButtonText,\n },\n onClose: options.onClose,\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAca,YAAY,CAAA;AACN,IAAA,SAAS,GAA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AO;AACzB,SAAA,CAAC;;uGA5DO,KAAK,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAL,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,KAAK,cADQ,MAAM,EAAA,CAAA;;2FACnB,KAAK,EAAA,UAAA,EAAA,CAAA;kBADjB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpBlC;;AAEG;;;;"}
@@ -12,11 +12,11 @@ class ConfirmContent {
12
12
  this.dialogRef.dismiss({ type });
13
13
  }
14
14
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: ConfirmContent, isStandalone: true, selector: "kl-confirm-content", ngImport: i0, template: "<kl-dialog-content>\n <div content>\n <p class=\"text-center\" [innerHTML]=\"message\"></p>\n <p class=\"text-center\">Tem certeza de que deseja continuar?</p>\n </div>\n\n <div class=\"flex items-center justify-center gap-1 w-full\" actions>\n <button klButton color=\"error\" (click)=\"close('no')\">\n {{translations.btnLabelNo}}\n </button>\n <button klButton color=\"primary\" (click)=\"close('yes')\">\n {{translations.btnLabelYes}}\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"] }] });
15
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.6", type: ConfirmContent, isStandalone: true, selector: "kl-confirm-content", ngImport: i0, template: "<kl-dialog-content>\n <div content>\n <p class=\"text-center\" [innerHTML]=\"message\"></p>\n <p class=\"text-center\">Tem certeza de que deseja continuar?</p>\n </div>\n\n <div class=\"flex items-center justify-center gap-2 w-full\" actions>\n <button klButton color=\"error\" (click)=\"close('no')\">\n {{translations.btnLabelNo}}\n </button>\n <button klButton color=\"accent\" outline (click)=\"close('yes')\">\n {{translations.btnLabelYes}}\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"] }] });
16
16
  }
17
17
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ConfirmContent, decorators: [{
18
18
  type: Component,
19
- args: [{ selector: 'kl-confirm-content', imports: [DialogContent, Button], template: "<kl-dialog-content>\n <div content>\n <p class=\"text-center\" [innerHTML]=\"message\"></p>\n <p class=\"text-center\">Tem certeza de que deseja continuar?</p>\n </div>\n\n <div class=\"flex items-center justify-center gap-1 w-full\" actions>\n <button klButton color=\"error\" (click)=\"close('no')\">\n {{translations.btnLabelNo}}\n </button>\n <button klButton color=\"primary\" (click)=\"close('yes')\">\n {{translations.btnLabelYes}}\n </button>\n </div>\n</kl-dialog-content>\n" }]
19
+ args: [{ selector: 'kl-confirm-content', imports: [DialogContent, Button], template: "<kl-dialog-content>\n <div content>\n <p class=\"text-center\" [innerHTML]=\"message\"></p>\n <p class=\"text-center\">Tem certeza de que deseja continuar?</p>\n </div>\n\n <div class=\"flex items-center justify-center gap-2 w-full\" actions>\n <button klButton color=\"error\" (click)=\"close('no')\">\n {{translations.btnLabelNo}}\n </button>\n <button klButton color=\"accent\" outline (click)=\"close('yes')\">\n {{translations.btnLabelYes}}\n </button>\n </div>\n</kl-dialog-content>\n" }]
20
20
  }] });
21
21
 
22
22
  class Confirm {
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-confirm.mjs","sources":["../../projects/koala-ui/shared/components/confirm/confirm-content.ts","../../projects/koala-ui/shared/components/confirm/confirm-content.html","../../projects/koala-ui/shared/components/confirm/confirm.ts","../../projects/koala-ui/shared/components/confirm/koalarx-ui-shared-components-confirm.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport {\n DIALOG_DATA,\n DialogContent,\n DialogRef,\n} from '@koalarx/ui/shared/components/dialog';\nimport { Button } from '@koalarx/ui/shared/directives';\n\n@Component({\n selector: 'kl-confirm-content',\n templateUrl: './confirm-content.html',\n imports: [DialogContent, Button],\n})\nexport class ConfirmContent {\n readonly translations = inject(AppConfig).translation.confirm;\n private readonly dialogRef = inject(DialogRef);\n\n message = inject<string>(DIALOG_DATA);\n\n close(type: 'yes' | 'no') {\n this.dialogRef.dismiss({ type });\n }\n}\n","<kl-dialog-content>\n <div content>\n <p class=\"text-center\" [innerHTML]=\"message\"></p>\n <p class=\"text-center\">Tem certeza de que deseja continuar?</p>\n </div>\n\n <div class=\"flex items-center justify-center gap-1 w-full\" actions>\n <button klButton color=\"error\" (click)=\"close('no')\">\n {{translations.btnLabelNo}}\n </button>\n <button klButton color=\"primary\" (click)=\"close('yes')\">\n {{translations.btnLabelYes}}\n </button>\n </div>\n</kl-dialog-content>\n","import { inject, Injectable } from '@angular/core';\nimport { Dialog } from '@koalarx/ui/shared/components/dialog';\nimport { ConfirmContent } from './confirm-content';\n\nexport interface ConfirmConfig {\n message: string;\n yesCallback?: () => void;\n noCallback?: () => void;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Confirm {\n private readonly dialog = inject(Dialog);\n\n open(config: ConfirmConfig) {\n this.dialog.open(ConfirmContent, {\n data: config.message,\n afterClosed: {\n trigger: {},\n callback: (confirm: { type: 'yes' | 'no' }) => {\n if (confirm.type === 'yes' && config.yesCallback) {\n config.yesCallback();\n } else if (confirm.type === 'no' && config.noCallback) {\n config.noCallback();\n }\n },\n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AAqB,EAAA;AACxB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE;YAC/B,IAAI,EAAE,MAAM,CAAC,OAAO;AACpB,YAAA,WAAW,EAAE;AACX,gBAAA,OAAO,EAAE,EAAE;AACX,gBAAA,QAAQ,EAAE,CAAC,OAA+B,KAAI;oBAC5C,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,IAAI,MAAM,CAAC,WAAW,EAAE;wBAChD,MAAM,CAAC,WAAW,EAAE;;yBACf,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,IAAI,MAAM,CAAC,UAAU,EAAE;wBACrD,MAAM,CAAC,UAAU,EAAE;;iBAEtB;AACF,aAAA;AACF,SAAA,CAAC;;uGAhBO,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAP,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,OAAO,cADM,MAAM,EAAA,CAAA;;2FACnB,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACVlC;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-confirm.mjs","sources":["../../projects/koala-ui/shared/components/confirm/confirm-content.ts","../../projects/koala-ui/shared/components/confirm/confirm-content.html","../../projects/koala-ui/shared/components/confirm/confirm.ts","../../projects/koala-ui/shared/components/confirm/koalarx-ui-shared-components-confirm.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport { AppConfig } from '@koalarx/ui/core/config';\nimport {\n DIALOG_DATA,\n DialogContent,\n DialogRef,\n} from '@koalarx/ui/shared/components/dialog';\nimport { Button } from '@koalarx/ui/shared/directives';\n\n@Component({\n selector: 'kl-confirm-content',\n templateUrl: './confirm-content.html',\n imports: [DialogContent, Button],\n})\nexport class ConfirmContent {\n readonly translations = inject(AppConfig).translation.confirm;\n private readonly dialogRef = inject(DialogRef);\n\n message = inject<string>(DIALOG_DATA);\n\n close(type: 'yes' | 'no') {\n this.dialogRef.dismiss({ type });\n }\n}\n","<kl-dialog-content>\n <div content>\n <p class=\"text-center\" [innerHTML]=\"message\"></p>\n <p class=\"text-center\">Tem certeza de que deseja continuar?</p>\n </div>\n\n <div class=\"flex items-center justify-center gap-2 w-full\" actions>\n <button klButton color=\"error\" (click)=\"close('no')\">\n {{translations.btnLabelNo}}\n </button>\n <button klButton color=\"accent\" outline (click)=\"close('yes')\">\n {{translations.btnLabelYes}}\n </button>\n </div>\n</kl-dialog-content>\n","import { inject, Injectable } from '@angular/core';\nimport { Dialog } from '@koalarx/ui/shared/components/dialog';\nimport { ConfirmContent } from './confirm-content';\n\nexport interface ConfirmConfig {\n message: string;\n yesCallback?: () => void;\n noCallback?: () => void;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Confirm {\n private readonly dialog = inject(Dialog);\n\n open(config: ConfirmConfig) {\n this.dialog.open(ConfirmContent, {\n data: config.message,\n afterClosed: {\n trigger: {},\n callback: (confirm: { type: 'yes' | 'no' }) => {\n if (confirm.type === 'yes' && config.yesCallback) {\n config.yesCallback();\n } else if (confirm.type === 'no' && config.noCallback) {\n config.noCallback();\n }\n },\n },\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAca,cAAc,CAAA;IAChB,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,OAAO;AAC5C,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAE9C,IAAA,OAAO,GAAG,MAAM,CAAS,WAAW,CAAC;AAErC,IAAA,KAAK,CAAC,IAAkB,EAAA;QACtB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CA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I,MAAM,CAAC,UAAU,EAAE;wBACrD,MAAM,CAAC,UAAU,EAAE;;iBAEtB;AACF,aAAA;AACF,SAAA,CAAC;;uGAhBO,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAP,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,OAAO,cADM,MAAM,EAAA,CAAA;;2FACnB,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACVlC;;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 border border-neutral-700 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" });
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-300 border border-neutral-700 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 border border-neutral-700 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" }]
20
+ args: [{ selector: 'kl-dialog-content', template: "<dialog #dialog class=\"modal\">\n <div class=\"modal-box bg-base-300 border border-neutral-700 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 border border-neutral-700 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,aAA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AE7C,YAAA,YAAY,CAAC,iBAAiB,CAAC,aAAa,EAAE;;;uGAtEvC,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAN,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAM,cADO,MAAM,EAAA,CAAA;;2FACnB,MAAM,EAAA,UAAA,EAAA,CAAA;kBADlB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;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;;;;"}
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-300 border border-neutral-700 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,6TAUA,EAAA,CAAA;;2FDJa,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,SAAS;+BACE,mBAAmB,EAAA,QAAA,EAAA,6TAAA,EAAA;;;MEclB,aAAa,GAAG,IAAI,cAAc,CAAC,cAAc;MACjD,WAAW,GAAG,IAAI,cAAc,CAAC,YAAY;MAC7C,cAAc,GAAG,IAAI,cAAc,CAAC,cAAc;MAClD,0BAA0B,GACrC,IAAI,cAAc,CAA4B,yBAAyB;MAW5D,MAAM,CAAA;AACA,IAAA,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC;AAC/B,IAAA,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAE/C,iBAAiB,GAAA;AACvB,QAAA,IAAI,SAAiB;AAErB,QAAA,GAAG;AACD,YAAA,SAAS,GAAG,YAAY,CAAC,EAAE,EAAE;AAC3B,gBAAA,OA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,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;;;;"}
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, input, signal, linkedSignal, Component } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
- import { ActivatedRoute } from '@angular/router';
4
+ import { Router, NavigationEnd } from '@angular/router';
5
5
  import { AppConfig } from '@koalarx/ui/core/config';
6
6
 
7
7
  class OnThisPage {
8
- activatedRoute = inject(ActivatedRoute);
8
+ router = inject(Router);
9
9
  translations = inject(AppConfig).translation.onThisPage;
10
10
  links = input.required();
11
11
  activeSection = signal(null);
@@ -35,8 +35,10 @@ class OnThisPage {
35
35
  }
36
36
  };
37
37
  constructor() {
38
- this.activatedRoute.url.pipe(takeUntilDestroyed()).subscribe(() => {
39
- document.body.scrollTo({ top: 0 });
38
+ this.router.events.pipe(takeUntilDestroyed()).subscribe((event) => {
39
+ if (event instanceof NavigationEnd) {
40
+ window.scrollTo({ top: 0 });
41
+ }
40
42
  });
41
43
  }
42
44
  ngOnDestroy() {
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-on-this-page.mjs","sources":["../../projects/koala-ui/shared/components/on-this-page/on-this-page.ts","../../projects/koala-ui/shared/components/on-this-page/on-this-page.html","../../projects/koala-ui/shared/components/on-this-page/koalarx-ui-shared-components-on-this-page.ts"],"sourcesContent":["import {\n Component,\n inject,\n input,\n linkedSignal,\n OnDestroy,\n OnInit,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute } from '@angular/router';\nimport { AppConfig } from '@koalarx/ui/core/config';\n\nexport interface OnThisPageLink {\n label: string;\n elementId: string;\n}\n\n@Component({\n selector: 'kl-on-this-page',\n templateUrl: './on-this-page.html',\n})\nexport class OnThisPage implements OnInit, OnDestroy {\n private readonly activatedRoute = inject(ActivatedRoute);\n\n readonly translations = inject(AppConfig).translation.onThisPage;\n\n links = input.required<OnThisPageLink[]>();\n activeSection = signal<string | null>(null);\n\n linkSections = linkedSignal(() => {\n const links = this.links();\n const currentSection = this.activeSection();\n\n return links.map((link) => ({\n label: link.label,\n elementId: link.elementId,\n isActive: link.elementId === currentSection,\n }));\n });\n\n private onScroll = () => {\n const links = this.links();\n let current: string | null = null;\n for (const link of links) {\n const el = document.getElementById(link.elementId);\n if (el) {\n const rect = el.getBoundingClientRect();\n if (rect.top <= 250) {\n current = link.elementId;\n }\n }\n }\n if (current) {\n this.activeSection.set(current);\n }\n };\n\n constructor() {\n this.activatedRoute.url.pipe(takeUntilDestroyed()).subscribe(() => {\n document.body.scrollTo({ top: 0 });\n });\n }\n\n ngOnDestroy(): void {\n window.removeEventListener('scroll', this.onScroll);\n }\n\n ngOnInit(): void {\n this.activeSection.set(\n location.hash.match(/#[a-zA-Z]+/)?.[0]?.replace(/#/g, '') || null\n );\n window.addEventListener('scroll', this.onScroll, { passive: true });\n }\n\n scrollTo(elementId: string) {\n const element = document.getElementById(elementId);\n if (element) {\n this.activeSection.set(elementId);\n const link = location.hash.match(/#[a-zA-Z]+/)\n ? location.hash.replace(/#([^#]*)$/, `#${elementId}`)\n : `${location.hash}#${elementId}`;\n\n history.pushState({}, '', link);\n\n const scrollPosition =\n element.getBoundingClientRect().top + window.scrollY - 100;\n\n window.scrollTo({\n top: scrollPosition,\n behavior: 'smooth',\n });\n }\n }\n}\n","<div class=\"fixed\">\n <small class=\"opacity-70\">\n <ng-content select=\"[title]\">\n {{translations.title}}\n </ng-content>\n </small>\n\n <div class=\"flex flex-col gap-2 mt-2\">\n @for (item of linkSections(); track $index) {\n <a class=\"hover:cursor-pointer hover:opacity-90 transition duration-100 opacity-60\" [class]=\"{'opacity-100': item.isActive}\" (click)=\"scrollTo(item.elementId)\">\n {{ item.label }}\n </a>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAsBa,UAAU,CAAA;AACJ,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAE/C,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,UAAU;AAEhE,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAoB;AAC1C,IAAA,aAAa,GAAG,MAAM,CAAgB,IAAI,CAAC;AAE3C,IAAA,YAAY,GAAG,YAAY,CAAC,MAAK;AAC/B,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;AAC1B,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,aAAa,EAAE;QAE3C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM;YAC1B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;AACzB,YAAA,QAAQ,EAAE,IAAI,CAAC,SAAS,KAAK,cAAc;AAC5C,SAAA,CAAC,CAAC;AACL,KAAC,CAAC;IAEM,QAAQ,GAAG,MAAK;AACtB,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;QAC1B,IAAI,OAAO,GAAkB,IAAI;AACjC,QAAA,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;YACxB,MAAM,EAAE,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC;YAClD,IAAI,EAAE,EAAE;AACN,gBAAA,MAAM,IAAI,GAAG,EAAE,CAAC,qBAAqB,EAAE;AACvC,gBAAA,IAAI,IAAI,CAAC,GAAG,IAAI,GAAG,EAAE;AACnB,oBAAA,OAAO,GAAG,IAAI,CAAC,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,GAClB,OAAO,CAAC,qBAAqB,EAAE,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG;YAE5D,MAAM,CAAC,QAAQ,CAAC;AACd,gBAAA,GAAG,EAAE,cAAc;AACnB,gBAAA,QAAQ,EAAE,QAAQ;AACnB,aAAA,CAAC;;;uGArEK,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,8MCtBvB,yeAeA,EAAA,CAAA;;2FDOa,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,SAAS;+BACE,iBAAiB,EAAA,QAAA,EAAA,yeAAA,EAAA;;;AEnB7B;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-on-this-page.mjs","sources":["../../projects/koala-ui/shared/components/on-this-page/on-this-page.ts","../../projects/koala-ui/shared/components/on-this-page/on-this-page.html","../../projects/koala-ui/shared/components/on-this-page/koalarx-ui-shared-components-on-this-page.ts"],"sourcesContent":["import {\n Component,\n inject,\n input,\n linkedSignal,\n OnDestroy,\n OnInit,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { AppConfig } from '@koalarx/ui/core/config';\n\nexport interface OnThisPageLink {\n label: string;\n elementId: string;\n}\n\n@Component({\n selector: 'kl-on-this-page',\n templateUrl: './on-this-page.html',\n})\nexport class OnThisPage implements OnInit, OnDestroy {\n private readonly router = inject(Router);\n\n readonly translations = inject(AppConfig).translation.onThisPage;\n\n links = input.required<OnThisPageLink[]>();\n activeSection = signal<string | null>(null);\n\n linkSections = linkedSignal(() => {\n const links = this.links();\n const currentSection = this.activeSection();\n\n return links.map((link) => ({\n label: link.label,\n elementId: link.elementId,\n isActive: link.elementId === currentSection,\n }));\n });\n\n private onScroll = () => {\n const links = this.links();\n let current: string | null = null;\n for (const link of links) {\n const el = document.getElementById(link.elementId);\n if (el) {\n const rect = el.getBoundingClientRect();\n if (rect.top <= 250) {\n current = link.elementId;\n }\n }\n }\n if (current) {\n this.activeSection.set(current);\n }\n };\n\n constructor() {\n this.router.events.pipe(takeUntilDestroyed()).subscribe((event) => {\n if (event instanceof NavigationEnd) {\n window.scrollTo({ top: 0 });\n }\n });\n }\n\n ngOnDestroy(): void {\n window.removeEventListener('scroll', this.onScroll);\n }\n\n ngOnInit(): void {\n this.activeSection.set(\n location.hash.match(/#[a-zA-Z]+/)?.[0]?.replace(/#/g, '') || null\n );\n window.addEventListener('scroll', this.onScroll, { passive: true });\n }\n\n scrollTo(elementId: string) {\n const element = document.getElementById(elementId);\n if (element) {\n this.activeSection.set(elementId);\n const link = location.hash.match(/#[a-zA-Z]+/)\n ? location.hash.replace(/#([^#]*)$/, `#${elementId}`)\n : `${location.hash}#${elementId}`;\n\n history.pushState({}, '', link);\n\n const scrollPosition =\n element.getBoundingClientRect().top + window.scrollY - 100;\n\n window.scrollTo({\n top: scrollPosition,\n behavior: 'smooth',\n });\n }\n }\n}\n","<div class=\"fixed\">\n <small class=\"opacity-70\">\n <ng-content select=\"[title]\">\n {{translations.title}}\n </ng-content>\n </small>\n\n <div class=\"flex flex-col gap-2 mt-2\">\n @for (item of linkSections(); track $index) {\n <a class=\"hover:cursor-pointer hover:opacity-90 transition duration-100 opacity-60\" [class]=\"{'opacity-100': item.isActive}\" (click)=\"scrollTo(item.elementId)\">\n {{ item.label }}\n </a>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAsBa,UAAU,CAAA;AACJ,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE/B,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAA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,CAAA;AAAV,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAU,8MCtBvB,yeAeA,EAAA,CAAA;;2FDOa,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,SAAS;+BACE,iBAAiB,EAAA,QAAA,EAAA,yeAAA,EAAA;;;AEnB7B;;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-100 rounded-xl shadow-2xl border border-neutral-700 animate-slide-in-left\">\n <ng-content />\n </div>\n</div>\n" });
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-300 rounded-xl shadow-2xl border border-neutral-700 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-100 rounded-xl shadow-2xl border border-neutral-700 animate-slide-in-left\">\n <ng-content />\n </div>\n</div>\n" }]
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-300 rounded-xl shadow-2xl border border-neutral-700 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');
@@ -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-100 rounded-xl shadow-2xl border border-neutral-700 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 }, 100);\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,gPAKA,EAAA,CAAA;;2FDCa,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,SAAS;+BACE,wBAAwB,EAAA,QAAA,EAAA,gPAAA,EAAA;;;MEcvB,kBAAkB,GAAG,IAAI,cAAc,CAAC,kBAAkB;MAC1D,gBAAgB,GAAG,IAAI,cAAc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BAAC,EAAE,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,GAAG,CAAC;;uGAxBE,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;;;;"}
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-300 rounded-xl shadow-2xl border border-neutral-700 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 }, 100);\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,gPAKA,EAAA,CAAA;;2FDCa,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,SAAS;+BACE,wBAAwB,EAAA,QAAA,EAAA,gPAAA,EAAA;;;MEcvB,kBAAkB,GAAG,IAAI,cAAc,CAAC,kBAAkB;MAC1D,gBAAgB,GAAG,IAAI,cAAc,CAAC,gBAAgB;MACtD,mBAAmB,GAAG,IAAI,cAAc,CAAC,kBAAkB;MAC3D,+BAA+B,GAC1C,IAAI,cAAc,CAChB,6BAA6B;MAYpB,UAAU,CAAA;AACJ,IAAA,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC;AAC/B,IAAA,QAAQ,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAE/C,iBAAiB,GAAA;AACvB,QAAA,IAAI,SAAiB;AAErB,QAAA,GAAG;AACD,YAAA,SAAS,GAAG,YAAY,CAAC,EAAE,EAAE;AAC3B,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,iBAAiB,EAAE,KAAK;AACzB,aAAA,CAAC;AACJ,SAAC,QAAQ,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC;AAE3C,QAAA,OAAO,SAAS;;IAGlB,IAAI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AI,CAAC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC;YAE7C,IAAI,iBAAiB,EAAE;AACrB,gBAAA,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC;;SAE5C,EAAE,GAAG,CAAC;;uGAxBE,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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koalarx/ui",
3
- "version": "20.0.22",
3
+ "version": "20.0.23",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0"
@@ -6,7 +6,7 @@ interface OnThisPageLink {
6
6
  elementId: string;
7
7
  }
8
8
  declare class OnThisPage implements OnInit, OnDestroy {
9
- private readonly activatedRoute;
9
+ private readonly router;
10
10
  readonly translations: {
11
11
  title: string;
12
12
  };
package/theme/koala.css CHANGED
@@ -6,6 +6,43 @@
6
6
  themes: all;
7
7
  }
8
8
 
9
+ @plugin "daisyui/theme" {
10
+ name: "koala";
11
+ color-scheme: "dark";
12
+ --color-base-100: oklch(13% 0 0);
13
+ --color-base-200: oklch(19% 0 0);
14
+ --color-base-300: oklch(22% 0 0);
15
+ --color-base-content: oklch(90% 0 0);
16
+ --color-primary: oklch(58% 0.233 277.117);
17
+ --color-primary-content: oklch(96% 0.018 272.314);
18
+ --color-secondary: oklch(65% 0.241 354.308);
19
+ --color-secondary-content: oklch(94% 0.028 342.258);
20
+ --color-accent: oklch(77% 0.152 181.912);
21
+ --color-accent-content: oklch(38% 0.063 188.416);
22
+ --color-neutral: oklch(38% 0.005 285.823);
23
+ --color-neutral-content: oklch(90% 0.004 286.32);
24
+ --color-info: oklch(74% 0.16 232.661);
25
+ --color-info-content: oklch(29% 0.066 243.157);
26
+ --color-success: oklch(76% 0.177 163.223);
27
+ --color-success-content: oklch(37% 0.077 168.94);
28
+ --color-warning: oklch(82% 0.189 84.429);
29
+ --color-warning-content: oklch(41% 0.112 45.904);
30
+ --color-error: oklch(71% 0.194 13.428);
31
+ --color-error-content: oklch(27% 0.105 12.094);
32
+ --radius-selector: 0.5rem;
33
+ --radius-field: 0.25rem;
34
+ --radius-box: 0.5rem;
35
+ --size-selector: 0.25rem;
36
+ --size-field: 0.25rem;
37
+ --border: 1px;
38
+ --depth: 1;
39
+ --noise: 0;
40
+ }
41
+
42
+ [data-theme="koala"] *:disabled {
43
+ opacity: 80%;
44
+ }
45
+
9
46
  @import "./icons/font-awesome/css/all.min.css";
10
47
  @import "./animations.css";
11
48
  @import "./grid.css";