@kato-lee/components 1.1.4 → 2.0.0
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/README.md +1 -1
- package/assets/_fields.scss +82 -21
- package/assets/_grids.scss +8 -0
- package/assets/assets.scss +4 -0
- package/assets/bundle.css +1 -0
- package/assets/{themes/_default.scss → colors.scss} +7 -6
- package/assets/components/_checkbox.scss +11 -0
- package/assets/components/_fields.scss +53 -13
- package/assets/components/_scroll-bar.scss +8 -0
- package/assets/components/_snack-bar.scss +21 -10
- package/assets/components/_tables.scss +75 -84
- package/assets/components/main.scss +9 -10
- package/assets/material/theme.scss +91 -0
- package/box-form/index.d.ts +51 -3
- package/box-form/package.json +3 -0
- package/capsule/index.d.ts +25 -2
- package/capsule/package.json +3 -0
- package/cards/index.d.ts +18 -2
- package/cards/package.json +3 -0
- package/dialogs/index.d.ts +18 -2
- package/dialogs/package.json +3 -0
- package/fesm2022/kato-lee-components-box-form.mjs +9 -9
- package/fesm2022/kato-lee-components-box-form.mjs.map +1 -1
- package/fesm2022/kato-lee-components-capsule.mjs +8 -8
- package/fesm2022/kato-lee-components-capsule.mjs.map +1 -1
- package/fesm2022/kato-lee-components-cards.mjs +8 -8
- package/fesm2022/kato-lee-components-cards.mjs.map +1 -1
- package/fesm2022/kato-lee-components-dialogs.mjs +9 -9
- package/fesm2022/kato-lee-components-dialogs.mjs.map +1 -1
- package/fesm2022/kato-lee-components-fields.mjs +60 -64
- package/fesm2022/kato-lee-components-fields.mjs.map +1 -1
- package/fesm2022/kato-lee-components-modal.mjs +16 -12
- package/fesm2022/kato-lee-components-modal.mjs.map +1 -1
- package/fesm2022/kato-lee-components-pretty-box.mjs +4 -4
- package/fesm2022/kato-lee-components-pretty-box.mjs.map +1 -1
- package/fesm2022/kato-lee-components-tables.mjs +60 -20
- package/fesm2022/kato-lee-components-tables.mjs.map +1 -1
- package/fesm2022/kato-lee-components-toast.mjs +3 -3
- package/fesm2022/kato-lee-components-toast.mjs.map +1 -1
- package/fields/index.d.ts +464 -15
- package/fields/package.json +3 -0
- package/index.d.ts +2 -1
- package/modal/index.d.ts +66 -4
- package/modal/package.json +3 -0
- package/package.json +8 -28
- package/pretty-box/index.d.ts +27 -1
- package/pretty-box/package.json +3 -0
- package/tables/index.d.ts +27 -3
- package/tables/package.json +3 -0
- package/toast/index.d.ts +25 -1
- package/toast/package.json +3 -0
- package/assets/components/_material.scss +0 -15
- package/assets/main.scss +0 -4
- package/assets/material/themes/dark.scss +0 -52
- package/assets/material/themes/default.scss +0 -105
- package/assets/material/themes/main.scss +0 -2907
- package/assets/themes/_dark.scss +0 -16
- package/assets/themes/main.scss +0 -2
- package/assets/variables.scss +0 -7
- package/box-form/common.d.ts +0 -5
- package/box-form/component.d.ts +0 -34
- package/box-form/module.d.ts +0 -8
- package/capsule/component.d.ts +0 -14
- package/capsule/module.d.ts +0 -8
- package/cards/component.d.ts +0 -8
- package/cards/module.d.ts +0 -8
- package/dialogs/dismiss-dialog-button.component.d.ts +0 -8
- package/dialogs/module.d.ts +0 -8
- package/esm2022/box-form/common.mjs +0 -2
- package/esm2022/box-form/component.mjs +0 -112
- package/esm2022/box-form/index.mjs +0 -7
- package/esm2022/box-form/kato-lee-components-box-form.mjs +0 -5
- package/esm2022/box-form/module.mjs +0 -17
- package/esm2022/capsule/component.mjs +0 -78
- package/esm2022/capsule/index.mjs +0 -6
- package/esm2022/capsule/kato-lee-components-capsule.mjs +0 -5
- package/esm2022/capsule/module.mjs +0 -17
- package/esm2022/cards/component.mjs +0 -48
- package/esm2022/cards/index.mjs +0 -6
- package/esm2022/cards/kato-lee-components-cards.mjs +0 -5
- package/esm2022/cards/module.mjs +0 -18
- package/esm2022/dialogs/dismiss-dialog-button.component.mjs +0 -46
- package/esm2022/dialogs/index.mjs +0 -6
- package/esm2022/dialogs/kato-lee-components-dialogs.mjs +0 -5
- package/esm2022/dialogs/module.mjs +0 -18
- package/esm2022/fields/autocomplete/component.mjs +0 -259
- package/esm2022/fields/common.mjs +0 -11
- package/esm2022/fields/date/component.mjs +0 -163
- package/esm2022/fields/date-range/component.mjs +0 -85
- package/esm2022/fields/error/component.mjs +0 -57
- package/esm2022/fields/error/error-equals.pipe.mjs +0 -19
- package/esm2022/fields/error/error.msg.pipe.mjs +0 -19
- package/esm2022/fields/error/lang/_en.mjs +0 -12
- package/esm2022/fields/error/lang/_es.mjs +0 -12
- package/esm2022/fields/error/lang/index.mjs +0 -3
- package/esm2022/fields/general/component.mjs +0 -202
- package/esm2022/fields/index.mjs +0 -19
- package/esm2022/fields/kato-lee-components-fields.mjs +0 -5
- package/esm2022/fields/module.mjs +0 -82
- package/esm2022/fields/money/component.mjs +0 -202
- package/esm2022/fields/number/component.mjs +0 -179
- package/esm2022/fields/remote-autocomplete/component.mjs +0 -188
- package/esm2022/fields/select/component.mjs +0 -158
- package/esm2022/fields/text-area/component.mjs +0 -186
- package/esm2022/fields/validators.mjs +0 -11
- package/esm2022/index.mjs +0 -2
- package/esm2022/kato-lee-components.mjs +0 -5
- package/esm2022/modal/component.mjs +0 -66
- package/esm2022/modal/config.mjs +0 -2
- package/esm2022/modal/index.mjs +0 -8
- package/esm2022/modal/kato-lee-components-modal.mjs +0 -5
- package/esm2022/modal/module.mjs +0 -17
- package/esm2022/modal/service.mjs +0 -33
- package/esm2022/pretty-box/component.mjs +0 -94
- package/esm2022/pretty-box/index.mjs +0 -5
- package/esm2022/pretty-box/kato-lee-components-pretty-box.mjs +0 -5
- package/esm2022/tables/index.mjs +0 -7
- package/esm2022/tables/kato-lee-components-tables.mjs +0 -5
- package/esm2022/tables/mat-paginator.translation.mjs +0 -22
- package/esm2022/tables/module.mjs +0 -22
- package/esm2022/tables/no-records.component.mjs +0 -58
- package/esm2022/toast/index.mjs +0 -5
- package/esm2022/toast/kato-lee-components-toast.mjs +0 -5
- package/esm2022/toast/service.mjs +0 -42
- package/fields/autocomplete/component.d.ts +0 -65
- package/fields/common.d.ts +0 -8
- package/fields/date/component.d.ts +0 -46
- package/fields/date-range/component.d.ts +0 -23
- package/fields/error/component.d.ts +0 -22
- package/fields/error/error-equals.pipe.d.ts +0 -7
- package/fields/error/error.msg.pipe.d.ts +0 -7
- package/fields/error/lang/_en.d.ts +0 -1
- package/fields/error/lang/_es.d.ts +0 -1
- package/fields/error/lang/index.d.ts +0 -2
- package/fields/general/component.d.ts +0 -56
- package/fields/module.d.ts +0 -19
- package/fields/money/component.d.ts +0 -53
- package/fields/number/component.d.ts +0 -52
- package/fields/remote-autocomplete/component.d.ts +0 -43
- package/fields/select/component.d.ts +0 -44
- package/fields/text-area/component.d.ts +0 -55
- package/fields/validators.d.ts +0 -9
- package/modal/component.d.ts +0 -35
- package/modal/config.d.ts +0 -9
- package/modal/module.d.ts +0 -8
- package/modal/service.d.ts +0 -13
- package/pretty-box/component.d.ts +0 -24
- package/tables/mat-paginator.translation.d.ts +0 -2
- package/tables/module.d.ts +0 -10
- package/tables/no-records.component.d.ts +0 -12
- package/toast/service.d.ts +0 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Inject, ViewEncapsulation, Component, NgModule, Injectable } from '@angular/core';
|
|
3
3
|
import * as i1 from '@kato-lee/material/dialog';
|
|
4
4
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@kato-lee/material/dialog';
|
|
5
5
|
import * as i2 from '@kato-lee/material/button';
|
|
@@ -54,12 +54,12 @@ class TakModalComponent {
|
|
|
54
54
|
get hasTopCloseButton() {
|
|
55
55
|
return this._hasTopCloseButton;
|
|
56
56
|
}
|
|
57
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
58
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakModalComponent, deps: [{ token: i0.ElementRef }, { token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
58
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TakModalComponent, isStandalone: true, selector: "tak-modal", ngImport: i0, template: "@if (hasTopCloseButton) {\r\n <div mat-dialog-title>\r\n <p style=\"padding: 0 !important\">\r\n @if (data.title) {\r\n <h1 class=\"tak-modal__title\">{{ data.title }}</h1>\r\n }\r\n </p>\r\n <button mat-icon-button (click)=\"onCloseFromButton()\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n}\r\n@if (hasTopCloseButton) {\r\n <mat-divider />\r\n}\r\n<div mat-dialog-content>\r\n <div class=\"tak-modal__content\" attr.style=\"text-align: {{ data.options!.textAlign! }};\">\r\n <p>{{ data.content }}</p>\r\n </div>\r\n</div>\r\n<mat-divider />\r\n<mat-dialog-actions>\r\n @if (!isAlert) {\r\n <button mat-button color=\"warn\" (click)=\"onClose()\">\r\n {{ deniedButton }}\r\n </button>\r\n }\r\n @if (!isAlert) {\r\n <button mat-button color=\"accent\" (click)=\"onConfirm()\" cdkFocusInitial>\r\n {{ confirmButton }}\r\n </button>\r\n }\r\n @if (isAlert) {\r\n <button mat-button color=\"accent\" (click)=\"onClose()\" style=\"float: right\" cdkFocusInitial>\r\n {{ okButton }}\r\n </button>\r\n }\r\n</mat-dialog-actions>\r\n", styles: [".mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:0!important}.tak-modal [mat-button]{font-weight:bolder}.tak-modal [mat-dialog-title]{display:flex;align-items:center;justify-content:space-between}.tak-modal__title{font-size:18px;font-weight:500;margin:0}.tak-modal__content{padding:0 24px;font-size:14px;color:var(--mdc-dialog-subhead-color)}.tak-modal__buttons{display:flex}.tak-modal__buttons button{font-weight:bolder;text-transform:uppercase}.tak-modal__buttons.tak-modal-one{justify-content:end}.tak-modal__buttons.tak-modal-two{justify-content:space-between}.tak-modal .tak-dialog-content{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakModalComponent, decorators: [{
|
|
61
61
|
type: Component,
|
|
62
|
-
args: [{ standalone: true, imports: [MatButtonModule, MatDialogModule, MatDividerModule, MatIconModule], selector: 'tak-modal', encapsulation: ViewEncapsulation.None, template: "@if (hasTopCloseButton) {\r\n <div mat-dialog-title>\r\n @if (data.title
|
|
62
|
+
args: [{ standalone: true, imports: [MatButtonModule, MatDialogModule, MatDividerModule, MatIconModule], selector: 'tak-modal', encapsulation: ViewEncapsulation.None, template: "@if (hasTopCloseButton) {\r\n <div mat-dialog-title>\r\n <p style=\"padding: 0 !important\">\r\n @if (data.title) {\r\n <h1 class=\"tak-modal__title\">{{ data.title }}</h1>\r\n }\r\n </p>\r\n <button mat-icon-button (click)=\"onCloseFromButton()\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n}\r\n@if (hasTopCloseButton) {\r\n <mat-divider />\r\n}\r\n<div mat-dialog-content>\r\n <div class=\"tak-modal__content\" attr.style=\"text-align: {{ data.options!.textAlign! }};\">\r\n <p>{{ data.content }}</p>\r\n </div>\r\n</div>\r\n<mat-divider />\r\n<mat-dialog-actions>\r\n @if (!isAlert) {\r\n <button mat-button color=\"warn\" (click)=\"onClose()\">\r\n {{ deniedButton }}\r\n </button>\r\n }\r\n @if (!isAlert) {\r\n <button mat-button color=\"accent\" (click)=\"onConfirm()\" cdkFocusInitial>\r\n {{ confirmButton }}\r\n </button>\r\n }\r\n @if (isAlert) {\r\n <button mat-button color=\"accent\" (click)=\"onClose()\" style=\"float: right\" cdkFocusInitial>\r\n {{ okButton }}\r\n </button>\r\n }\r\n</mat-dialog-actions>\r\n", styles: [".mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:0!important}.tak-modal [mat-button]{font-weight:bolder}.tak-modal [mat-dialog-title]{display:flex;align-items:center;justify-content:space-between}.tak-modal__title{font-size:18px;font-weight:500;margin:0}.tak-modal__content{padding:0 24px;font-size:14px;color:var(--mdc-dialog-subhead-color)}.tak-modal__buttons{display:flex}.tak-modal__buttons button{font-weight:bolder;text-transform:uppercase}.tak-modal__buttons.tak-modal-one{justify-content:end}.tak-modal__buttons.tak-modal-two{justify-content:space-between}.tak-modal .tak-dialog-content{padding:0}\n"] }]
|
|
63
63
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
64
64
|
type: Inject,
|
|
65
65
|
args: [MAT_DIALOG_DATA]
|
|
@@ -67,11 +67,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
|
|
|
67
67
|
|
|
68
68
|
/** @deprecated Use standalone */
|
|
69
69
|
class TakModalModule {
|
|
70
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
71
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
72
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
70
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
71
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: TakModalModule, imports: [TakModalComponent], exports: [TakModalComponent] }); }
|
|
72
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakModalModule, imports: [TakModalComponent] }); }
|
|
73
73
|
}
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakModalModule, decorators: [{
|
|
75
75
|
type: NgModule,
|
|
76
76
|
args: [{
|
|
77
77
|
imports: [TakModalComponent],
|
|
@@ -90,6 +90,10 @@ class TakModal {
|
|
|
90
90
|
return this._generateDialog(content, title, 'confirm', options);
|
|
91
91
|
}
|
|
92
92
|
_generateDialog(content, title, type, options) {
|
|
93
|
+
if (!options)
|
|
94
|
+
options = {};
|
|
95
|
+
if (!options.textAlign)
|
|
96
|
+
options.textAlign = 'justify';
|
|
93
97
|
const dialog = this.dialog.open(TakModalComponent, {
|
|
94
98
|
data: {
|
|
95
99
|
content,
|
|
@@ -100,10 +104,10 @@ class TakModal {
|
|
|
100
104
|
});
|
|
101
105
|
return dialog.afterClosed();
|
|
102
106
|
}
|
|
103
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
104
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakModal, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
108
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakModal, providedIn: 'root' }); }
|
|
105
109
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakModal, decorators: [{
|
|
107
111
|
type: Injectable,
|
|
108
112
|
args: [{ providedIn: 'root' }]
|
|
109
113
|
}], ctorParameters: () => [{ type: i1.MatDialog }] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kato-lee-components-modal.mjs","sources":["../../../libraries/components/modal/component.ts","../../../libraries/components/modal/component.html","../../../libraries/components/modal/module.ts","../../../libraries/components/modal/service.ts","../../../libraries/components/modal/index.ts","../../../libraries/components/modal/kato-lee-components-modal.ts"],"sourcesContent":["import { Component, ElementRef, Inject, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@kato-lee/material/dialog';\r\nimport { TakModalConfig, TakModalType } from './config';\r\nimport { MatButtonModule } from '@kato-lee/material/button';\r\nimport { MatIconModule } from '@kato-lee/material/icon';\r\nimport { MatDividerModule } from '@kato-lee/material/divider';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [MatButtonModule, MatDialogModule, MatDividerModule, MatIconModule],\r\n selector: 'tak-modal',\r\n templateUrl: './component.html',\r\n styleUrls: ['./component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class TakModalComponent implements OnInit {\r\n private _isAlert = false;\r\n\r\n private _confirmButton = '';\r\n private _deniedButton = '';\r\n private _okButton = '';\r\n private _hasTopCloseButton = true;\r\n\r\n constructor(\r\n href: ElementRef<HTMLElement>,\r\n private _dialogRef: MatDialogRef<TakModalComponent>,\r\n @Inject(MAT_DIALOG_DATA)\r\n public data: { content: string; title: string; options?: TakModalConfig; type: TakModalType }\r\n ) {\r\n href.nativeElement.classList.add('tak-modal');\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (this.data.type === 'alert') this._isAlert = true;\r\n else this._isAlert = false;\r\n\r\n this._confirmButton = this.data.options?.confirmButton || 'SI';\r\n this._deniedButton = this.data.options?.deniedButton || 'NO';\r\n this._okButton = this.data.options?.okButton || 'OK';\r\n this._hasTopCloseButton = this.data.options?.hasTopCloseButton || true;\r\n }\r\n\r\n public onConfirm(): void {\r\n this._dialogRef.close(true);\r\n }\r\n\r\n public onClose(): void {\r\n this._dialogRef.close(false);\r\n }\r\n\r\n public onCloseFromButton(): void {\r\n this._dialogRef.close(undefined);\r\n }\r\n\r\n get isAlert(): boolean {\r\n return this._isAlert;\r\n }\r\n\r\n get confirmButton(): string {\r\n return this._confirmButton;\r\n }\r\n\r\n get deniedButton(): string {\r\n return this._deniedButton;\r\n }\r\n\r\n get okButton(): string {\r\n return this._okButton;\r\n }\r\n\r\n get hasTopCloseButton(): boolean {\r\n return this._hasTopCloseButton;\r\n }\r\n}\r\n","@if (hasTopCloseButton) {\r\n <div mat-dialog-title>\r\n @if (data.title !== '') {\r\n <span class=\"tak-modal__title\">{{ data.title }}</span>\r\n }\r\n <div>\r\n <button mat-icon-button (click)=\"onCloseFromButton()\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n </div>\r\n}\r\n@if (hasTopCloseButton) {\r\n <mat-divider />\r\n}\r\n<div mat-dialog-content>\r\n <div class=\"tak-modal__content\">\r\n <p>{{ data.content }}</p>\r\n </div>\r\n</div>\r\n<mat-divider />\r\n<mat-dialog-actions align=\"end\">\r\n @if (!isAlert) {\r\n <button mat-button color=\"accent\" (click)=\"onConfirm()\">\r\n {{ confirmButton }}\r\n </button>\r\n }\r\n @if (!isAlert) {\r\n <button mat-button color=\"warn\" (click)=\"onClose()\" cdkFocusInitial>\r\n {{ deniedButton }}\r\n </button>\r\n }\r\n @if (isAlert) {\r\n <button mat-button color=\"accent\" (click)=\"onClose()\" style=\"float: right\" cdkFocusInitial>\r\n {{ okButton }}\r\n </button>\r\n }\r\n</mat-dialog-actions>\r\n","import { NgModule } from '@angular/core';\r\nimport { TakModalComponent } from './component';\r\n\r\n/** @deprecated Use standalone */\r\n@NgModule({\r\n imports: [TakModalComponent],\r\n exports: [TakModalComponent],\r\n})\r\nexport class TakModalModule {}\r\n","import { Injectable } from '@angular/core';\r\nimport { MatDialog } from '@kato-lee/material/dialog';\r\nimport { TakModalComponent } from './component';\r\nimport { TakModalConfig, TakModalType } from './config';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TakModal {\r\n constructor(private dialog: MatDialog) {}\r\n\r\n public alert(content: string, title: string = '', options?: TakModalConfig): Observable<boolean> {\r\n return this._generateDialog(content, title, 'alert', options);\r\n }\r\n\r\n public confirm(\r\n content: string,\r\n title: string = '',\r\n options?: TakModalConfig\r\n ): Observable<boolean> {\r\n return this._generateDialog(content, title, 'confirm', options);\r\n }\r\n\r\n private _generateDialog(\r\n content: string,\r\n title: string,\r\n type: TakModalType,\r\n options?: TakModalConfig\r\n ) {\r\n const dialog = this.dialog.open(TakModalComponent, {\r\n data: {\r\n content,\r\n title,\r\n options,\r\n type,\r\n },\r\n });\r\n return dialog.afterClosed();\r\n }\r\n}\r\n","/*\r\n * Public API Surface of @kato-lee/components/modal\r\n */\r\n\r\nexport * from './config';\r\nexport * from './component';\r\nexport * from './module';\r\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P,IAAI;AACL,aAAA;AACF,SAAA,CAAC,CAAC;AACH,QAAA,OAAO,MAAM,CAAC,WAAW,EAAE,CAAC;KAC7B;8GA9BU,QAAQ,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAR,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,QAAQ,cADK,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,QAAQ,EAAA,UAAA,EAAA,CAAA;kBADpB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACNlC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"kato-lee-components-modal.mjs","sources":["../../../libraries/components/modal/component.ts","../../../libraries/components/modal/component.html","../../../libraries/components/modal/module.ts","../../../libraries/components/modal/service.ts","../../../libraries/components/modal/index.ts","../../../libraries/components/modal/kato-lee-components-modal.ts"],"sourcesContent":["import { Component, ElementRef, Inject, OnInit, ViewEncapsulation } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@kato-lee/material/dialog';\r\nimport { TakModalConfig, TakModalType } from './config';\r\nimport { MatButtonModule } from '@kato-lee/material/button';\r\nimport { MatIconModule } from '@kato-lee/material/icon';\r\nimport { MatDividerModule } from '@kato-lee/material/divider';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [MatButtonModule, MatDialogModule, MatDividerModule, MatIconModule],\r\n selector: 'tak-modal',\r\n templateUrl: './component.html',\r\n styleUrls: ['./component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\nexport class TakModalComponent implements OnInit {\r\n private _isAlert = false;\r\n\r\n private _confirmButton = '';\r\n private _deniedButton = '';\r\n private _okButton = '';\r\n private _hasTopCloseButton = true;\r\n\r\n constructor(\r\n href: ElementRef,\r\n private _dialogRef: MatDialogRef<TakModalComponent>,\r\n @Inject(MAT_DIALOG_DATA)\r\n public data: { content: string; title: string; options?: TakModalConfig; type: TakModalType }\r\n ) {\r\n href.nativeElement.classList.add('tak-modal');\r\n }\r\n\r\n public ngOnInit(): void {\r\n if (this.data.type === 'alert') this._isAlert = true;\r\n else this._isAlert = false;\r\n\r\n this._confirmButton = this.data.options?.confirmButton || 'SI';\r\n this._deniedButton = this.data.options?.deniedButton || 'NO';\r\n this._okButton = this.data.options?.okButton || 'OK';\r\n this._hasTopCloseButton = this.data.options?.hasTopCloseButton || true;\r\n }\r\n\r\n public onConfirm(): void {\r\n this._dialogRef.close(true);\r\n }\r\n\r\n public onClose(): void {\r\n this._dialogRef.close(false);\r\n }\r\n\r\n public onCloseFromButton(): void {\r\n this._dialogRef.close(undefined);\r\n }\r\n\r\n get isAlert(): boolean {\r\n return this._isAlert;\r\n }\r\n\r\n get confirmButton(): string {\r\n return this._confirmButton;\r\n }\r\n\r\n get deniedButton(): string {\r\n return this._deniedButton;\r\n }\r\n\r\n get okButton(): string {\r\n return this._okButton;\r\n }\r\n\r\n get hasTopCloseButton(): boolean {\r\n return this._hasTopCloseButton;\r\n }\r\n}\r\n","@if (hasTopCloseButton) {\r\n <div mat-dialog-title>\r\n <p style=\"padding: 0 !important\">\r\n @if (data.title) {\r\n <h1 class=\"tak-modal__title\">{{ data.title }}</h1>\r\n }\r\n </p>\r\n <button mat-icon-button (click)=\"onCloseFromButton()\"><mat-icon>close</mat-icon></button>\r\n </div>\r\n}\r\n@if (hasTopCloseButton) {\r\n <mat-divider />\r\n}\r\n<div mat-dialog-content>\r\n <div class=\"tak-modal__content\" attr.style=\"text-align: {{ data.options!.textAlign! }};\">\r\n <p>{{ data.content }}</p>\r\n </div>\r\n</div>\r\n<mat-divider />\r\n<mat-dialog-actions>\r\n @if (!isAlert) {\r\n <button mat-button color=\"warn\" (click)=\"onClose()\">\r\n {{ deniedButton }}\r\n </button>\r\n }\r\n @if (!isAlert) {\r\n <button mat-button color=\"accent\" (click)=\"onConfirm()\" cdkFocusInitial>\r\n {{ confirmButton }}\r\n </button>\r\n }\r\n @if (isAlert) {\r\n <button mat-button color=\"accent\" (click)=\"onClose()\" style=\"float: right\" cdkFocusInitial>\r\n {{ okButton }}\r\n </button>\r\n }\r\n</mat-dialog-actions>\r\n","import { NgModule } from '@angular/core';\r\nimport { TakModalComponent } from './component';\r\n\r\n/** @deprecated Use standalone */\r\n@NgModule({\r\n imports: [TakModalComponent],\r\n exports: [TakModalComponent],\r\n})\r\nexport class TakModalModule {}\r\n","import { Injectable } from '@angular/core';\r\nimport { MatDialog } from '@kato-lee/material/dialog';\r\nimport { TakModalComponent } from './component';\r\nimport { TakModalConfig, TakModalType } from './config';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TakModal {\r\n constructor(private dialog: MatDialog) {}\r\n\r\n public alert(content: string, title: string = '', options?: TakModalConfig): Observable<boolean> {\r\n return this._generateDialog(content, title, 'alert', options);\r\n }\r\n\r\n public confirm(\r\n content: string,\r\n title: string = '',\r\n options?: TakModalConfig,\r\n ): Observable<boolean> {\r\n return this._generateDialog(content, title, 'confirm', options);\r\n }\r\n\r\n private _generateDialog(\r\n content: string,\r\n title: string,\r\n type: TakModalType,\r\n options?: TakModalConfig,\r\n ) {\r\n if (!options) options = {};\r\n if (!options.textAlign) options.textAlign = 'justify';\r\n const dialog = this.dialog.open(TakModalComponent, {\r\n data: {\r\n content,\r\n title,\r\n options,\r\n type,\r\n },\r\n });\r\n return dialog.afterClosed();\r\n }\r\n}\r\n","/*\r\n * Public API Surface of @kato-lee/components/modal\r\n */\r\n\r\nexport * from './config';\r\nexport * from './component';\r\nexport * from './module';\r\nexport * from './service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport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AA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAR,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,QAAQ,cADK,MAAM,EAAA,CAAA,CAAA;;4FACnB,QAAQ,EAAA,UAAA,EAAA,CAAA;kBADpB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACNlC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Input, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class TakPrettyBoxComponent {
|
|
5
5
|
constructor(_cd) {
|
|
@@ -68,10 +68,10 @@ class TakPrettyBoxComponent {
|
|
|
68
68
|
get hasFooter() {
|
|
69
69
|
return this._hasFooter;
|
|
70
70
|
}
|
|
71
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
72
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
71
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakPrettyBoxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
72
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: TakPrettyBoxComponent, isStandalone: true, selector: "tak-pretty-box", inputs: { calcHeight: "calcHeight", headerHeightPx: "headerHeightPx", footerHeightPx: "footerHeightPx", encapsulated: "encapsulated" }, viewQueries: [{ propertyName: "header", first: true, predicate: ["header"], descendants: true }, { propertyName: "footer", first: true, predicate: ["footer"], descendants: true }, { propertyName: "scroll", first: true, predicate: ["scroll"], descendants: true }], ngImport: i0, template: "<div class=\"{{ encapsulated ? 'container' : '' }}\">\r\n <div [class]=\"encapsulated ? 'row' : ''\">\r\n <div\r\n [class]=\"encapsulated ? 'col-bt-12 col-bt-md-8 col-bt-lg-6 col-bt-xxl-4' : ''\"\r\n [style]=\"encapsulated ? 'margin: auto' : ''\"\r\n >\r\n <div class=\"tak-pretty-box--container\">\r\n <div\r\n #header\r\n [hidden]=\"!hasHeader\"\r\n class=\"tak-pretty-box--header\"\r\n [style]=\"headerHeightPx ? 'height:' + headerHeightPx + 'px' : ''\"\r\n >\r\n <ng-content select=\"[tak-pretty-box-header]\"></ng-content>\r\n </div>\r\n\r\n <div class=\"tak-pretty-box--scroll\" #scroll [style]=\"'height: ' + minHeightFt\">\r\n <ng-content select=\"[tak-pretty-box-content]\"></ng-content>\r\n </div>\r\n\r\n <div\r\n #footer\r\n [hidden]=\"!hasFooter\"\r\n class=\"tak-pretty-box--footer\"\r\n [style]=\"footerHeightPx ? 'height:' + footerHeightPx + 'px' : ''\"\r\n >\r\n <ng-content select=\"[tak-pretty-box-footer]\"></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
73
73
|
}
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakPrettyBoxComponent, decorators: [{
|
|
75
75
|
type: Component,
|
|
76
76
|
args: [{ standalone: true, selector: 'tak-pretty-box', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"{{ encapsulated ? 'container' : '' }}\">\r\n <div [class]=\"encapsulated ? 'row' : ''\">\r\n <div\r\n [class]=\"encapsulated ? 'col-bt-12 col-bt-md-8 col-bt-lg-6 col-bt-xxl-4' : ''\"\r\n [style]=\"encapsulated ? 'margin: auto' : ''\"\r\n >\r\n <div class=\"tak-pretty-box--container\">\r\n <div\r\n #header\r\n [hidden]=\"!hasHeader\"\r\n class=\"tak-pretty-box--header\"\r\n [style]=\"headerHeightPx ? 'height:' + headerHeightPx + 'px' : ''\"\r\n >\r\n <ng-content select=\"[tak-pretty-box-header]\"></ng-content>\r\n </div>\r\n\r\n <div class=\"tak-pretty-box--scroll\" #scroll [style]=\"'height: ' + minHeightFt\">\r\n <ng-content select=\"[tak-pretty-box-content]\"></ng-content>\r\n </div>\r\n\r\n <div\r\n #footer\r\n [hidden]=\"!hasFooter\"\r\n class=\"tak-pretty-box--footer\"\r\n [style]=\"footerHeightPx ? 'height:' + footerHeightPx + 'px' : ''\"\r\n >\r\n <ng-content select=\"[tak-pretty-box-footer]\"></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
|
|
77
77
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { header: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kato-lee-components-pretty-box.mjs","sources":["../../../libraries/components/pretty-box/component.ts","../../../libraries/components/pretty-box/component.html","../../../libraries/components/pretty-box/index.ts","../../../libraries/components/pretty-box/kato-lee-components-pretty-box.ts"],"sourcesContent":["import {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'tak-pretty-box',\r\n templateUrl: './component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class TakPrettyBoxComponent implements AfterViewInit {\r\n @ViewChild('header') header!: ElementRef;\r\n @ViewChild('footer') footer!: ElementRef;\r\n @ViewChild('scroll') scroll!: ElementRef;\r\n\r\n @Input() calcHeight: string | number = 94;\r\n @Input() headerHeightPx: number = 0;\r\n @Input() footerHeightPx: number = 0;\r\n @Input() encapsulated = true;\r\n\r\n private _hasHeader = false;\r\n private _hasFooter = false;\r\n private _substractFromHeight = 0;\r\n\r\n constructor(private _cd: ChangeDetectorRef) {}\r\n\r\n public ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this._config();\r\n }, 100);\r\n setTimeout(() => {\r\n this._config();\r\n }, 2000);\r\n }\r\n\r\n public scrollTop(): void {\r\n if (this.scroll) this.scroll.nativeElement.scrollTo({ top: 0 });\r\n }\r\n\r\n private _config(): void {\r\n const header = this.header.nativeElement.querySelector('[tak-pretty-box-header]');\r\n const footer = this.footer.nativeElement.querySelector('[tak-pretty-box-footer]');\r\n\r\n this._hasHeader = header ? true : false;\r\n this._hasFooter = footer ? true : false;\r\n\r\n if (typeof this.calcHeight === 'number') {\r\n const refreshInterval = setInterval(() => {\r\n if (this._substractFromHeight === 0) {\r\n const headerHeight = this._hasHeader\r\n ? !this.headerHeightPx\r\n ? this.header.nativeElement.offsetHeight\r\n : this.headerHeightPx\r\n : 0;\r\n\r\n const footerHeight = this._hasFooter\r\n ? !this.footerHeightPx\r\n ? this.footer.nativeElement.offsetHeight\r\n : this.footerHeightPx\r\n : 0;\r\n\r\n this._substractFromHeight = +this.calcHeight + headerHeight + footerHeight;\r\n } else {\r\n clearInterval(refreshInterval);\r\n this._cd.markForCheck();\r\n }\r\n }, 10);\r\n }\r\n\r\n if (!this._hasHeader) this.scroll.nativeElement.classList.add('tak-pretty-box-border-top');\r\n if (!this._hasFooter) this.scroll.nativeElement.classList.add('tak-pretty-box-border-bottom');\r\n\r\n this._cd.markForCheck();\r\n }\r\n\r\n get minHeightFt(): string {\r\n if (typeof this.calcHeight === 'number') return `calc(100vh - ${this._substractFromHeight}px)`;\r\n else return this.calcHeight;\r\n }\r\n\r\n get hasHeader(): boolean {\r\n return this._hasHeader;\r\n }\r\n\r\n get hasFooter(): boolean {\r\n return this._hasFooter;\r\n }\r\n}\r\n","<div class=\"{{ encapsulated ? 'container' : '' }}\">\r\n <div [class]=\"encapsulated ? 'row' : ''\">\r\n <div\r\n [class]=\"encapsulated ? 'col-bt-12 col-bt-md-8 col-bt-lg-6 col-bt-xxl-4' : ''\"\r\n [style]=\"encapsulated ? 'margin: auto' : ''\"\r\n >\r\n <div class=\"tak-pretty-box--container\">\r\n <div\r\n #header\r\n [hidden]=\"!hasHeader\"\r\n class=\"tak-pretty-box--header\"\r\n [style]=\"headerHeightPx ? 'height:' + headerHeightPx + 'px' : ''\"\r\n >\r\n <ng-content select=\"[tak-pretty-box-header]\"></ng-content>\r\n </div>\r\n\r\n <div class=\"tak-pretty-box--scroll\" #scroll [style]=\"'height: ' + minHeightFt\">\r\n <ng-content select=\"[tak-pretty-box-content]\"></ng-content>\r\n </div>\r\n\r\n <div\r\n #footer\r\n [hidden]=\"!hasFooter\"\r\n class=\"tak-pretty-box--footer\"\r\n [style]=\"footerHeightPx ? 'height:' + footerHeightPx + 'px' : ''\"\r\n >\r\n <ng-content select=\"[tak-pretty-box-footer]\"></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","/*\r\n * Public API Surface of @kato-lee/components/pretty-box\r\n */\r\nexport * from './component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAkBa,qBAAqB,CAAA;AAchC,IAAA,WAAA,CAAoB,GAAsB,EAAA;QAAtB,
|
|
1
|
+
{"version":3,"file":"kato-lee-components-pretty-box.mjs","sources":["../../../libraries/components/pretty-box/component.ts","../../../libraries/components/pretty-box/component.html","../../../libraries/components/pretty-box/index.ts","../../../libraries/components/pretty-box/kato-lee-components-pretty-box.ts"],"sourcesContent":["import {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Input,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n standalone: true,\r\n selector: 'tak-pretty-box',\r\n templateUrl: './component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class TakPrettyBoxComponent implements AfterViewInit {\r\n @ViewChild('header') header!: ElementRef;\r\n @ViewChild('footer') footer!: ElementRef;\r\n @ViewChild('scroll') scroll!: ElementRef;\r\n\r\n @Input() calcHeight: string | number = 94;\r\n @Input() headerHeightPx: number = 0;\r\n @Input() footerHeightPx: number = 0;\r\n @Input() encapsulated = true;\r\n\r\n private _hasHeader = false;\r\n private _hasFooter = false;\r\n private _substractFromHeight = 0;\r\n\r\n constructor(private _cd: ChangeDetectorRef) {}\r\n\r\n public ngAfterViewInit(): void {\r\n setTimeout(() => {\r\n this._config();\r\n }, 100);\r\n setTimeout(() => {\r\n this._config();\r\n }, 2000);\r\n }\r\n\r\n public scrollTop(): void {\r\n if (this.scroll) this.scroll.nativeElement.scrollTo({ top: 0 });\r\n }\r\n\r\n private _config(): void {\r\n const header = this.header.nativeElement.querySelector('[tak-pretty-box-header]');\r\n const footer = this.footer.nativeElement.querySelector('[tak-pretty-box-footer]');\r\n\r\n this._hasHeader = header ? true : false;\r\n this._hasFooter = footer ? true : false;\r\n\r\n if (typeof this.calcHeight === 'number') {\r\n const refreshInterval = setInterval(() => {\r\n if (this._substractFromHeight === 0) {\r\n const headerHeight = this._hasHeader\r\n ? !this.headerHeightPx\r\n ? this.header.nativeElement.offsetHeight\r\n : this.headerHeightPx\r\n : 0;\r\n\r\n const footerHeight = this._hasFooter\r\n ? !this.footerHeightPx\r\n ? this.footer.nativeElement.offsetHeight\r\n : this.footerHeightPx\r\n : 0;\r\n\r\n this._substractFromHeight = +this.calcHeight + headerHeight + footerHeight;\r\n } else {\r\n clearInterval(refreshInterval);\r\n this._cd.markForCheck();\r\n }\r\n }, 10);\r\n }\r\n\r\n if (!this._hasHeader) this.scroll.nativeElement.classList.add('tak-pretty-box-border-top');\r\n if (!this._hasFooter) this.scroll.nativeElement.classList.add('tak-pretty-box-border-bottom');\r\n\r\n this._cd.markForCheck();\r\n }\r\n\r\n get minHeightFt(): string {\r\n if (typeof this.calcHeight === 'number') return `calc(100vh - ${this._substractFromHeight}px)`;\r\n else return this.calcHeight;\r\n }\r\n\r\n get hasHeader(): boolean {\r\n return this._hasHeader;\r\n }\r\n\r\n get hasFooter(): boolean {\r\n return this._hasFooter;\r\n }\r\n}\r\n","<div class=\"{{ encapsulated ? 'container' : '' }}\">\r\n <div [class]=\"encapsulated ? 'row' : ''\">\r\n <div\r\n [class]=\"encapsulated ? 'col-bt-12 col-bt-md-8 col-bt-lg-6 col-bt-xxl-4' : ''\"\r\n [style]=\"encapsulated ? 'margin: auto' : ''\"\r\n >\r\n <div class=\"tak-pretty-box--container\">\r\n <div\r\n #header\r\n [hidden]=\"!hasHeader\"\r\n class=\"tak-pretty-box--header\"\r\n [style]=\"headerHeightPx ? 'height:' + headerHeightPx + 'px' : ''\"\r\n >\r\n <ng-content select=\"[tak-pretty-box-header]\"></ng-content>\r\n </div>\r\n\r\n <div class=\"tak-pretty-box--scroll\" #scroll [style]=\"'height: ' + minHeightFt\">\r\n <ng-content select=\"[tak-pretty-box-content]\"></ng-content>\r\n </div>\r\n\r\n <div\r\n #footer\r\n [hidden]=\"!hasFooter\"\r\n class=\"tak-pretty-box--footer\"\r\n [style]=\"footerHeightPx ? 'height:' + footerHeightPx + 'px' : ''\"\r\n >\r\n <ng-content select=\"[tak-pretty-box-footer]\"></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","/*\r\n * Public API Surface of @kato-lee/components/pretty-box\r\n */\r\nexport * from './component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAkBa,qBAAqB,CA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AAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,0dClBlC,kqCAgCA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FDda,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;iCACI,IAAI,EAAA,QAAA,EACN,gBAAgB,EAAA,aAAA,EAEX,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kqCAAA,EAAA;;sBAG9C,SAAS;uBAAC,QAAQ;;sBAClB,SAAS;uBAAC,QAAQ;;sBAClB,SAAS;uBAAC,QAAQ;;sBAElB;;sBACA;;sBACA;;sBACA;;;AE1BH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MatPaginatorIntl, MatPaginatorModule } from '@kato-lee/material/paginator';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@kato-lee/material/progress-spinner';
|
|
5
5
|
import { MatProgressSpinnerModule } from '@kato-lee/material/progress-spinner';
|
|
6
6
|
import { MatSortModule } from '@kato-lee/material/sort';
|
|
@@ -41,24 +41,44 @@ class TakTableNoRecordsComponent {
|
|
|
41
41
|
get secondImage() {
|
|
42
42
|
return this._secondImage;
|
|
43
43
|
}
|
|
44
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
45
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
44
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakTableNoRecordsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
45
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TakTableNoRecordsComponent, isStandalone: true, selector: "tak-table-no-records", inputs: { dataSource: "dataSource", isLoading: "isLoading" }, ngImport: i0, template: `
|
|
46
46
|
@if (isLoading) {
|
|
47
47
|
<div class="tak-progress-circle__container">
|
|
48
48
|
<mat-progress-spinner mode="indeterminate" />
|
|
49
49
|
</div>
|
|
50
50
|
} @else {
|
|
51
51
|
<div class="tak-progress-circle__container">
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
<div class="empty-state">
|
|
53
|
+
<svg
|
|
54
|
+
class="empty-icon"
|
|
55
|
+
width="48"
|
|
56
|
+
height="48"
|
|
57
|
+
viewBox="0 0 24 24"
|
|
58
|
+
fill="none"
|
|
59
|
+
stroke="currentColor"
|
|
60
|
+
stroke-width="1.5"
|
|
61
|
+
stroke-linecap="round"
|
|
62
|
+
stroke-linejoin="round"
|
|
63
|
+
aria-hidden="true"
|
|
64
|
+
>
|
|
65
|
+
<circle cx="11" cy="11" r="8" />
|
|
66
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
67
|
+
</svg>
|
|
68
|
+
<p class="empty-title">Sin resultados</p>
|
|
69
|
+
<p class="empty-description">
|
|
70
|
+
@if (secondImage) {
|
|
71
|
+
No hay resultados que contengan esta palabra clave
|
|
72
|
+
} @else {
|
|
73
|
+
No se encontraron resultados
|
|
74
|
+
}
|
|
75
|
+
</p>
|
|
76
|
+
</div>
|
|
57
77
|
</div>
|
|
58
78
|
}
|
|
59
|
-
`, isInline: true, styles: ["
|
|
79
|
+
`, isInline: true, styles: ["@media only screen and (min-width: 640px){.tak-progress-circle__container{min-height:calc(100vh - 300px)}}.tak-progress-circle__container{min-height:calc(100vh - 300px);display:flex;align-items:center;justify-content:center}.tak-progress-circle__container-image{min-height:calc(100vh - 300px)}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px;text-align:center;color:var(--text-secondary)}.empty-icon{margin-bottom:16px;opacity:.4}.empty-title{font-size:16px;font-weight:600;color:var(--text-primary);margin-bottom:4px}.empty-description{font-size:14px}\n"], dependencies: [{ kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
60
80
|
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakTableNoRecordsComponent, decorators: [{
|
|
62
82
|
type: Component,
|
|
63
83
|
args: [{ standalone: true, imports: [MatProgressSpinnerModule], selector: 'tak-table-no-records', template: `
|
|
64
84
|
@if (isLoading) {
|
|
@@ -67,14 +87,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
|
|
|
67
87
|
</div>
|
|
68
88
|
} @else {
|
|
69
89
|
<div class="tak-progress-circle__container">
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
90
|
+
<div class="empty-state">
|
|
91
|
+
<svg
|
|
92
|
+
class="empty-icon"
|
|
93
|
+
width="48"
|
|
94
|
+
height="48"
|
|
95
|
+
viewBox="0 0 24 24"
|
|
96
|
+
fill="none"
|
|
97
|
+
stroke="currentColor"
|
|
98
|
+
stroke-width="1.5"
|
|
99
|
+
stroke-linecap="round"
|
|
100
|
+
stroke-linejoin="round"
|
|
101
|
+
aria-hidden="true"
|
|
102
|
+
>
|
|
103
|
+
<circle cx="11" cy="11" r="8" />
|
|
104
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
105
|
+
</svg>
|
|
106
|
+
<p class="empty-title">Sin resultados</p>
|
|
107
|
+
<p class="empty-description">
|
|
108
|
+
@if (secondImage) {
|
|
109
|
+
No hay resultados que contengan esta palabra clave
|
|
110
|
+
} @else {
|
|
111
|
+
No se encontraron resultados
|
|
112
|
+
}
|
|
113
|
+
</p>
|
|
114
|
+
</div>
|
|
75
115
|
</div>
|
|
76
116
|
}
|
|
77
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["
|
|
117
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@media only screen and (min-width: 640px){.tak-progress-circle__container{min-height:calc(100vh - 300px)}}.tak-progress-circle__container{min-height:calc(100vh - 300px);display:flex;align-items:center;justify-content:center}.tak-progress-circle__container-image{min-height:calc(100vh - 300px)}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px;text-align:center;color:var(--text-secondary)}.empty-icon{margin-bottom:16px;opacity:.4}.empty-title{font-size:16px;font-weight:600;color:var(--text-primary);margin-bottom:4px}.empty-description{font-size:14px}\n"] }]
|
|
78
118
|
}], propDecorators: { dataSource: [{
|
|
79
119
|
type: Input
|
|
80
120
|
}], isLoading: [{
|
|
@@ -83,11 +123,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
|
|
|
83
123
|
|
|
84
124
|
const modules = [MatTableModule, MatSortModule, MatPaginatorModule, TakTableNoRecordsComponent];
|
|
85
125
|
class TakTablesModule {
|
|
86
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
87
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
88
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakTablesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
127
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: TakTablesModule, imports: [MatTableModule, MatSortModule, MatPaginatorModule, TakTableNoRecordsComponent], exports: [MatTableModule, MatSortModule, MatPaginatorModule, TakTableNoRecordsComponent] }); }
|
|
128
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakTablesModule, providers: [{ provide: MatPaginatorIntl, useValue: getSpanishMatPaginatorIntl() }], imports: [modules, MatTableModule, MatSortModule, MatPaginatorModule] }); }
|
|
89
129
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakTablesModule, decorators: [{
|
|
91
131
|
type: NgModule,
|
|
92
132
|
args: [{
|
|
93
133
|
imports: modules,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kato-lee-components-tables.mjs","sources":["../../../libraries/components/tables/mat-paginator.translation.ts","../../../libraries/components/tables/no-records.component.ts","../../../libraries/components/tables/module.ts","../../../libraries/components/tables/index.ts","../../../libraries/components/tables/kato-lee-components-tables.ts"],"sourcesContent":["import { MatPaginatorIntl } from '@kato-lee/material/paginator';\r\n\r\nconst typeEntity = 'item(s)';\r\n\r\nconst SpanishRangeLabel = (page: number, pageSize: number, length: number) => {\r\n if (length == 0 || pageSize == 0) {\r\n return `0 de ${length} ${typeEntity}`;\r\n }\r\n length = Math.max(length, 0);\r\n const startIndex = page * pageSize;\r\n const endIndex =\r\n startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;\r\n return `${startIndex + 1} - ${endIndex} de ${length} ${typeEntity}`;\r\n};\r\n\r\nexport function getSpanishMatPaginatorIntl() {\r\n const paginatorIntl = new MatPaginatorIntl();\r\n\r\n paginatorIntl.itemsPerPageLabel = 'Items por página:';\r\n paginatorIntl.firstPageLabel = 'Primer página';\r\n paginatorIntl.nextPageLabel = 'Siguiente';\r\n paginatorIntl.previousPageLabel = 'Anterior';\r\n paginatorIntl.lastPageLabel = 'Ultima página';\r\n paginatorIntl.getRangeLabel = SpanishRangeLabel;\r\n\r\n return paginatorIntl;\r\n}\r\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\r\nimport { MatProgressSpinnerModule } from '@kato-lee/material/progress-spinner';\r\nimport { MatTableDataSource } from '@kato-lee/material/table';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [MatProgressSpinnerModule],\r\n selector: 'tak-table-no-records',\r\n template: `\r\n @if (isLoading) {\r\n <div class=\"tak-progress-circle__container\">\r\n <mat-progress-spinner mode=\"indeterminate\" />\r\n </div>\r\n } @else {\r\n <div class=\"tak-progress-circle__container\">\r\n @if (secondImage) {\r\n
|
|
1
|
+
{"version":3,"file":"kato-lee-components-tables.mjs","sources":["../../../libraries/components/tables/mat-paginator.translation.ts","../../../libraries/components/tables/no-records.component.ts","../../../libraries/components/tables/module.ts","../../../libraries/components/tables/index.ts","../../../libraries/components/tables/kato-lee-components-tables.ts"],"sourcesContent":["import { MatPaginatorIntl } from '@kato-lee/material/paginator';\r\n\r\nconst typeEntity = 'item(s)';\r\n\r\nconst SpanishRangeLabel = (page: number, pageSize: number, length: number) => {\r\n if (length == 0 || pageSize == 0) {\r\n return `0 de ${length} ${typeEntity}`;\r\n }\r\n length = Math.max(length, 0);\r\n const startIndex = page * pageSize;\r\n const endIndex =\r\n startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;\r\n return `${startIndex + 1} - ${endIndex} de ${length} ${typeEntity}`;\r\n};\r\n\r\nexport function getSpanishMatPaginatorIntl() {\r\n const paginatorIntl = new MatPaginatorIntl();\r\n\r\n paginatorIntl.itemsPerPageLabel = 'Items por página:';\r\n paginatorIntl.firstPageLabel = 'Primer página';\r\n paginatorIntl.nextPageLabel = 'Siguiente';\r\n paginatorIntl.previousPageLabel = 'Anterior';\r\n paginatorIntl.lastPageLabel = 'Ultima página';\r\n paginatorIntl.getRangeLabel = SpanishRangeLabel;\r\n\r\n return paginatorIntl;\r\n}\r\n","import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\r\nimport { MatProgressSpinnerModule } from '@kato-lee/material/progress-spinner';\r\nimport { MatTableDataSource } from '@kato-lee/material/table';\r\n\r\n@Component({\r\n standalone: true,\r\n imports: [MatProgressSpinnerModule],\r\n selector: 'tak-table-no-records',\r\n template: `\r\n @if (isLoading) {\r\n <div class=\"tak-progress-circle__container\">\r\n <mat-progress-spinner mode=\"indeterminate\" />\r\n </div>\r\n } @else {\r\n <div class=\"tak-progress-circle__container\">\r\n <div class=\"empty-state\">\r\n <svg\r\n class=\"empty-icon\"\r\n width=\"48\"\r\n height=\"48\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n aria-hidden=\"true\"\r\n >\r\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\r\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\" />\r\n </svg>\r\n <p class=\"empty-title\">Sin resultados</p>\r\n <p class=\"empty-description\">\r\n @if (secondImage) {\r\n No hay resultados que contengan esta palabra clave\r\n } @else {\r\n No se encontraron resultados\r\n }\r\n </p>\r\n </div>\r\n </div>\r\n }\r\n `,\r\n styles: `\r\n .tak-progress-circle__container {\r\n min-height: calc(100vh - 300px);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n @media only screen and (min-width: 640px) {\r\n .tak-progress-circle__container {\r\n min-height: calc(100vh - 300px);\r\n }\r\n }\r\n .tak-progress-circle__container {\r\n min-height: calc(100vh - 300px);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n .tak-progress-circle__container-image {\r\n min-height: calc(100vh - 300px);\r\n }\r\n .empty-state {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 48px 24px;\r\n text-align: center;\r\n color: var(--text-secondary);\r\n }\r\n\r\n .empty-icon {\r\n margin-bottom: 16px;\r\n opacity: 0.4;\r\n }\r\n\r\n .empty-title {\r\n font-size: 16px;\r\n font-weight: 600;\r\n color: var(--text-primary);\r\n margin-bottom: 4px;\r\n }\r\n\r\n .empty-description {\r\n font-size: 14px;\r\n }\r\n `,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class TakTableNoRecordsComponent implements OnInit {\r\n @Input() dataSource!: MatTableDataSource<any>;\r\n\r\n @Input() isLoading = false;\r\n\r\n private _secondImage = true;\r\n\r\n public ngOnInit(): void {\r\n if (this.dataSource) {\r\n if (this.dataSource.data.length && !this.dataSource.filteredData.length)\r\n this._secondImage = false;\r\n }\r\n }\r\n\r\n get secondImage(): boolean {\r\n return this._secondImage;\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { MatPaginatorIntl, MatPaginatorModule } from '@kato-lee/material/paginator';\r\nimport { MatSortModule } from '@kato-lee/material/sort';\r\nimport { MatTableModule } from '@kato-lee/material/table';\r\nimport { getSpanishMatPaginatorIntl } from './mat-paginator.translation';\r\nimport { TakTableNoRecordsComponent } from './no-records.component';\r\n\r\nconst modules = [MatTableModule, MatSortModule, MatPaginatorModule, TakTableNoRecordsComponent];\r\n\r\n@NgModule({\r\n imports: modules,\r\n exports: modules,\r\n providers: [{ provide: MatPaginatorIntl, useValue: getSpanishMatPaginatorIntl() }],\r\n})\r\nexport class TakTablesModule {}\r\n","/*\r\n * Public API Surface of @kato-lee/components/tables\r\n */\r\nexport * from './mat-paginator.translation';\r\nexport * from './no-records.component';\r\nexport * from './module';\r\n","/**\n * Generated bundle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E,0BAA0B,EAAE,EAAE,CAAC;AACnF,iBAAA;;;ACbD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -33,10 +33,10 @@ class TakToast {
|
|
|
33
33
|
verticalPosition: payload.verticalPosition || 'bottom',
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
37
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakToast, deps: [{ token: i1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
37
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakToast, providedIn: 'root' }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TakToast, decorators: [{
|
|
40
40
|
type: Injectable,
|
|
41
41
|
args: [{ providedIn: 'root' }]
|
|
42
42
|
}], ctorParameters: () => [{ type: i1.MatSnackBar }] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kato-lee-components-toast.mjs","sources":["../../../libraries/components/toast/service.ts","../../../libraries/components/toast/index.ts","../../../libraries/components/toast/kato-lee-components-toast.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport {\r\n MatSnackBar,\r\n MatSnackBarHorizontalPosition,\r\n MatSnackBarVerticalPosition,\r\n} from '@kato-lee/material/snack-bar';\r\n\r\nexport type TakToastType = 'notification' | 'danger' | 'success';\r\n\r\nexport interface TakToastConfig {\r\n hasDissmissButton?: boolean;\r\n dissmissButtonMessage?: string;\r\n horizontalPosition?: MatSnackBarHorizontalPosition;\r\n verticalPosition?: MatSnackBarVerticalPosition;\r\n duration?: number;\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TakToast {\r\n constructor(private _snackBar: MatSnackBar) {}\r\n\r\n public notification(message: string, payload: TakToastConfig = {}): void {\r\n this._generateTakToast(message, 'notification', this._managePayload(payload));\r\n }\r\n\r\n public success(message: string, payload: TakToastConfig = {}): void {\r\n this._generateTakToast(message, 'success', this._managePayload(payload));\r\n }\r\n public danger(message: string, payload: TakToastConfig = {}): void {\r\n this._generateTakToast(message, 'danger', this._managePayload(payload));\r\n }\r\n\r\n private _generateTakToast(message: string, type: TakToastType, payload: TakToastConfig) {\r\n const {\r\n duration,\r\n verticalPosition,\r\n horizontalPosition,\r\n hasDissmissButton,\r\n dissmissButtonMessage,\r\n } = payload;\r\n\r\n this._snackBar.open(message, `${hasDissmissButton ? dissmissButtonMessage : ''}`, {\r\n duration,\r\n verticalPosition,\r\n horizontalPosition,\r\n panelClass: `tak-snackbar-${type}`,\r\n });\r\n }\r\n\r\n private _managePayload(payload: TakToastConfig): TakToastConfig {\r\n return {\r\n hasDissmissButton: payload.hasDissmissButton || true,\r\n duration: payload.duration || 5000,\r\n dissmissButtonMessage: payload.dissmissButtonMessage || 'Cerrar',\r\n horizontalPosition: payload.horizontalPosition || 'center',\r\n verticalPosition: payload.verticalPosition || 'bottom',\r\n };\r\n }\r\n}\r\n","/*\r\n * Public API Surface of @kato-lee/components/toast\r\n */\r\nexport * from './service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAkBa,QAAQ,CAAA;AACnB,IAAA,WAAA,CAAoB,SAAsB,EAAA;QAAtB,
|
|
1
|
+
{"version":3,"file":"kato-lee-components-toast.mjs","sources":["../../../libraries/components/toast/service.ts","../../../libraries/components/toast/index.ts","../../../libraries/components/toast/kato-lee-components-toast.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport {\r\n MatSnackBar,\r\n MatSnackBarHorizontalPosition,\r\n MatSnackBarVerticalPosition,\r\n} from '@kato-lee/material/snack-bar';\r\n\r\nexport type TakToastType = 'notification' | 'danger' | 'success';\r\n\r\nexport interface TakToastConfig {\r\n hasDissmissButton?: boolean;\r\n dissmissButtonMessage?: string;\r\n horizontalPosition?: MatSnackBarHorizontalPosition;\r\n verticalPosition?: MatSnackBarVerticalPosition;\r\n duration?: number;\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class TakToast {\r\n constructor(private _snackBar: MatSnackBar) {}\r\n\r\n public notification(message: string, payload: TakToastConfig = {}): void {\r\n this._generateTakToast(message, 'notification', this._managePayload(payload));\r\n }\r\n\r\n public success(message: string, payload: TakToastConfig = {}): void {\r\n this._generateTakToast(message, 'success', this._managePayload(payload));\r\n }\r\n public danger(message: string, payload: TakToastConfig = {}): void {\r\n this._generateTakToast(message, 'danger', this._managePayload(payload));\r\n }\r\n\r\n private _generateTakToast(message: string, type: TakToastType, payload: TakToastConfig) {\r\n const {\r\n duration,\r\n verticalPosition,\r\n horizontalPosition,\r\n hasDissmissButton,\r\n dissmissButtonMessage,\r\n } = payload;\r\n\r\n this._snackBar.open(message, `${hasDissmissButton ? dissmissButtonMessage : ''}`, {\r\n duration,\r\n verticalPosition,\r\n horizontalPosition,\r\n panelClass: `tak-snackbar-${type}`,\r\n });\r\n }\r\n\r\n private _managePayload(payload: TakToastConfig): TakToastConfig {\r\n return {\r\n hasDissmissButton: payload.hasDissmissButton || true,\r\n duration: payload.duration || 5000,\r\n dissmissButtonMessage: payload.dissmissButtonMessage || 'Cerrar',\r\n horizontalPosition: payload.horizontalPosition || 'center',\r\n verticalPosition: payload.verticalPosition || 'bottom',\r\n };\r\n }\r\n}\r\n","/*\r\n * Public API Surface of @kato-lee/components/toast\r\n */\r\nexport * from './service';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAkBa,QAAQ,CAAA;AACnB,IAAA,WAAA,CA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