@masterteam/components 0.0.184 → 0.0.186
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 +70 -63
- package/assets/common.css +243 -2
- package/fesm2022/masterteam-components-client-page.mjs +2 -2
- package/fesm2022/masterteam-components-client-page.mjs.map +1 -1
- package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +12 -12
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-number-field.mjs +2 -2
- package/fesm2022/masterteam-components-number-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +2 -2
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-table.mjs +5 -4
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-text-field.mjs +8 -3
- package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-toggle-field.mjs +2 -2
- package/fesm2022/masterteam-components-toggle-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-user-search-field.mjs +80 -21
- package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +3 -3
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +2 -2
- package/types/masterteam-components-user-search-field.d.ts +9 -0
- package/fesm2022/masterteam-components-color-picker-field.mjs +0 -102
- package/fesm2022/masterteam-components-color-picker-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-drawer.mjs +0 -261
- package/fesm2022/masterteam-components-drawer.mjs.map +0 -1
- package/fesm2022/masterteam-components-editor-field.mjs +0 -99
- package/fesm2022/masterteam-components-editor-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-formula.mjs +0 -3618
- package/fesm2022/masterteam-components-formula.mjs.map +0 -1
- package/fesm2022/masterteam-components-icon-field.mjs +0 -64
- package/fesm2022/masterteam-components-icon-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-list.mjs +0 -31
- package/fesm2022/masterteam-components-list.mjs.map +0 -1
- package/fesm2022/masterteam-components-location-field.mjs +0 -315
- package/fesm2022/masterteam-components-location-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-menu.mjs +0 -135
- package/fesm2022/masterteam-components-menu.mjs.map +0 -1
- package/fesm2022/masterteam-components-module-summary-card.mjs +0 -34
- package/fesm2022/masterteam-components-module-summary-card.mjs.map +0 -1
- package/fesm2022/masterteam-components-page-header.mjs +0 -42
- package/fesm2022/masterteam-components-page-header.mjs.map +0 -1
- package/fesm2022/masterteam-components-page.mjs +0 -35
- package/fesm2022/masterteam-components-page.mjs.map +0 -1
- package/fesm2022/masterteam-components-pick-list-field.mjs +0 -206
- package/fesm2022/masterteam-components-pick-list-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-property-filter-builder.mjs +0 -386
- package/fesm2022/masterteam-components-property-filter-builder.mjs.map +0 -1
- package/fesm2022/masterteam-components-radio-button-field.mjs +0 -85
- package/fesm2022/masterteam-components-radio-button-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-radio-cards-field.mjs +0 -126
- package/fesm2022/masterteam-components-radio-cards-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-radio-cards.mjs +0 -74
- package/fesm2022/masterteam-components-radio-cards.mjs.map +0 -1
- package/fesm2022/masterteam-components-runtime-action.mjs +0 -406
- package/fesm2022/masterteam-components-runtime-action.mjs.map +0 -1
- package/fesm2022/masterteam-components-sidebar.mjs +0 -37
- package/fesm2022/masterteam-components-sidebar.mjs.map +0 -1
- package/fesm2022/masterteam-components-slider-field.mjs +0 -115
- package/fesm2022/masterteam-components-slider-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-statistic-card.mjs +0 -22
- package/fesm2022/masterteam-components-statistic-card.mjs.map +0 -1
- package/fesm2022/masterteam-components-textarea-field.mjs +0 -122
- package/fesm2022/masterteam-components-textarea-field.mjs.map +0 -1
- package/fesm2022/masterteam-components-toast.mjs +0 -80
- package/fesm2022/masterteam-components-toast.mjs.map +0 -1
- package/fesm2022/masterteam-components-topbar.mjs +0 -32
- package/fesm2022/masterteam-components-topbar.mjs.map +0 -1
- package/fesm2022/masterteam-components-tree.mjs +0 -260
- package/fesm2022/masterteam-components-tree.mjs.map +0 -1
- package/types/masterteam-components-color-picker-field.d.ts +0 -35
- package/types/masterteam-components-drawer.d.ts +0 -61
- package/types/masterteam-components-editor-field.d.ts +0 -35
- package/types/masterteam-components-formula.d.ts +0 -734
- package/types/masterteam-components-icon-field.d.ts +0 -27
- package/types/masterteam-components-list.d.ts +0 -18
- package/types/masterteam-components-location-field.d.ts +0 -95
- package/types/masterteam-components-menu.d.ts +0 -55
- package/types/masterteam-components-module-summary-card.d.ts +0 -18
- package/types/masterteam-components-page-header.d.ts +0 -30
- package/types/masterteam-components-page.d.ts +0 -26
- package/types/masterteam-components-pick-list-field.d.ts +0 -61
- package/types/masterteam-components-property-filter-builder.d.ts +0 -90
- package/types/masterteam-components-radio-button-field.d.ts +0 -41
- package/types/masterteam-components-radio-cards-field.d.ts +0 -35
- package/types/masterteam-components-radio-cards.d.ts +0 -33
- package/types/masterteam-components-runtime-action.d.ts +0 -105
- package/types/masterteam-components-sidebar.d.ts +0 -28
- package/types/masterteam-components-slider-field.d.ts +0 -38
- package/types/masterteam-components-statistic-card.d.ts +0 -18
- package/types/masterteam-components-textarea-field.d.ts +0 -41
- package/types/masterteam-components-toast.d.ts +0 -27
- package/types/masterteam-components-topbar.d.ts +0 -20
- package/types/masterteam-components-tree.d.ts +0 -106
|
@@ -37,6 +37,10 @@ declare class UserSearchField implements ControlValueAccessor, OnInit {
|
|
|
37
37
|
readonly size: _angular_core.InputSignal<"small" | "large" | undefined>;
|
|
38
38
|
filteredUsers: _angular_core.WritableSignal<User[]>;
|
|
39
39
|
private searchTerms;
|
|
40
|
+
private committedValueVersion;
|
|
41
|
+
private blurCleanupHandle;
|
|
42
|
+
private inputFocused;
|
|
43
|
+
private suggestionPointerActive;
|
|
40
44
|
/**
|
|
41
45
|
* In single-select mode, `true` when the currently selected user is no
|
|
42
46
|
* longer linked to the application. Drives the inline info badge/tooltip.
|
|
@@ -70,8 +74,13 @@ declare class UserSearchField implements ControlValueAccessor, OnInit {
|
|
|
70
74
|
registerOnChange(fn: (value: User | null) => void): void;
|
|
71
75
|
registerOnTouched(fn: any): void;
|
|
72
76
|
setDisabledState(disabled: boolean): void;
|
|
77
|
+
onSuggestionPointerDown(): void;
|
|
73
78
|
getUsers(): void;
|
|
74
79
|
private getInputElement;
|
|
80
|
+
private cancelPendingBlurCleanup;
|
|
81
|
+
private resetUncommittedSearch;
|
|
82
|
+
private clearInput;
|
|
83
|
+
private clearSearchState;
|
|
75
84
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserSearchField, never>;
|
|
76
85
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserSearchField, "mt-user-search-field", never, { "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "isMultiple": { "alias": "isMultiple"; "required": false; "isSignal": true; }; "apiUrl": { "alias": "apiUrl"; "required": true; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "paramName": { "alias": "paramName"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
77
86
|
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, output, inject, signal, effect, ViewChild, Component } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/forms';
|
|
4
|
-
import { NgControl, Validators, FormsModule } from '@angular/forms';
|
|
5
|
-
import * as i2 from 'primeng/colorpicker';
|
|
6
|
-
import { ColorPickerModule } from 'primeng/colorpicker';
|
|
7
|
-
import { FieldValidation } from '@masterteam/components/field-validation';
|
|
8
|
-
import { TextField } from '@masterteam/components/text-field';
|
|
9
|
-
import { isInvalid } from '@masterteam/components';
|
|
10
|
-
import * as i3 from '@jsverse/transloco';
|
|
11
|
-
import { TranslocoModule } from '@jsverse/transloco';
|
|
12
|
-
|
|
13
|
-
class ColorPickerField {
|
|
14
|
-
colorPicker;
|
|
15
|
-
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
16
|
-
appendTo = input('body', ...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
17
|
-
placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
18
|
-
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
19
|
-
variant = input('outlined', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
20
|
-
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
21
|
-
pInputs = input(...(ngDevMode ? [undefined, { debugName: "pInputs" }] : /* istanbul ignore next */ []));
|
|
22
|
-
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
23
|
-
onChange = output();
|
|
24
|
-
ngControl = inject(NgControl, { self: true });
|
|
25
|
-
requiredValidator = Validators.required;
|
|
26
|
-
value = signal(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
27
|
-
disabled = signal(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
28
|
-
onTouched = () => { };
|
|
29
|
-
onModelChange = () => { };
|
|
30
|
-
isInvalid = isInvalid;
|
|
31
|
-
constructor() {
|
|
32
|
-
if (this.ngControl) {
|
|
33
|
-
this.ngControl.valueAccessor = this;
|
|
34
|
-
}
|
|
35
|
-
// Effect to apply pInputs reactively when the pInputs signal changes
|
|
36
|
-
effect(() => {
|
|
37
|
-
const currentPInputs = this.pInputs();
|
|
38
|
-
// Ensure colorPicker ViewChild is initialized and pInputs has a value
|
|
39
|
-
// @ViewChild with static: true makes 'colorPicker' available during construction/ngOnInit
|
|
40
|
-
if (this.colorPicker && currentPInputs) {
|
|
41
|
-
this.applyInputsToColorPicker();
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
// Effect to add required validator if required input is true
|
|
45
|
-
effect(() => {
|
|
46
|
-
if (this.ngControl.control && this.required()) {
|
|
47
|
-
this.ngControl.control.addValidators(Validators.required);
|
|
48
|
-
this.ngControl.control.updateValueAndValidity();
|
|
49
|
-
}
|
|
50
|
-
if (this.ngControl.control) {
|
|
51
|
-
this.ngControl.control.addValidators(Validators.pattern(/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
applyInputsToColorPicker() {
|
|
56
|
-
const currentPInputs = this.pInputs();
|
|
57
|
-
if (currentPInputs) {
|
|
58
|
-
Object.assign(this.colorPicker, currentPInputs);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
onValueChange(value) {
|
|
62
|
-
this.onModelChange(value);
|
|
63
|
-
this.onTouched();
|
|
64
|
-
this.value.set(value);
|
|
65
|
-
}
|
|
66
|
-
writeValue(value) {
|
|
67
|
-
this.value.set(value);
|
|
68
|
-
}
|
|
69
|
-
registerOnChange(fn) {
|
|
70
|
-
this.onModelChange = fn;
|
|
71
|
-
}
|
|
72
|
-
registerOnTouched(fn) {
|
|
73
|
-
this.onTouched = fn;
|
|
74
|
-
}
|
|
75
|
-
setDisabledState(disabled) {
|
|
76
|
-
this.disabled.set(disabled);
|
|
77
|
-
}
|
|
78
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ColorPickerField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ColorPickerField, isStandalone: true, selector: "mt-color-picker-field", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, pInputs: { classPropertyName: "pInputs", publicName: "pInputs", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, host: { properties: { "class": "class()" } }, viewQueries: [{ propertyName: "colorPicker", first: true, predicate: ["colorPicker"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"flex w-full min-w-0 flex-col gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n <div\r\n class=\"flex w-full min-w-0 items-center hover:border-(--p-inputtext-hover-border-color)! p-inputtext\"\r\n [class.bg-(--p-inputtext-filled-background)]=\"variant() === 'filled'\"\r\n [class.border-(--p-inputtext-invalid-border-color)!]=\"\r\n ngControl?.control?.invalid && ngControl?.control?.touched\r\n \"\r\n >\r\n <p-colorpicker\r\n #colorPicker=\"\"\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onChange)=\"onChange.emit($event)\"\r\n (blur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\r\n [class.mt-color-picker-empty]=\"!value()\"\r\n class=\"leading-none\"\r\n [appendTo]=\"appendTo()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n ></p-colorpicker>\r\n <div class=\"ms-2 w-full min-w-0\">\r\n <mt-text-field\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (change)=\"onChange.emit($event)\"\r\n (blur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\r\n [placeholder]=\"'components.colorPickerField.placeholder' | transloco\"\r\n class=\"leading-none p-0 input-no-border px-0 w-full\"\r\n [hint]=\"'components.colorPickerField.hint' | transloco\"\r\n ></mt-text-field>\r\n </div>\r\n </div>\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n</div>\r\n", styles: [":host{display:block;width:100%;min-width:0}::ng-deep .input-no-border .p-component{border:none;box-shadow:none;background-color:transparent;width:100%}::ng-deep .input-no-border .p-inputgroupaddon{border-inline:none;border-block-start:none;border-block-end:none;padding:0!important}::ng-deep .input-no-border .p-inputgroupaddon:last-child{border-inline-end:none}::ng-deep .p-inputtext .p-inputtext{padding:0!important}::ng-deep .mt-color-picker-empty .p-colorpicker-preview{background:repeating-conic-gradient(var(--p-inputtext-background) 0% 25%,var(--p-content-background) 0% 50%) 50%/8px 8px!important;background-color:transparent!important;border:1px solid var(--p-inputtext-border-color);position:relative}::ng-deep .mt-color-picker-empty .p-colorpicker-preview:after{content:\"\";position:absolute;inset:0;background:linear-gradient(to top right,transparent calc(50% - 1px),var(--p-red-500, #ef4444) calc(50% - 1px),var(--p-red-500, #ef4444) calc(50% + 1px),transparent calc(50% + 1px));pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ColorPickerModule }, { kind: "component", type: i2.ColorPicker, selector: "p-colorPicker, p-colorpicker, p-color-picker", inputs: ["styleClass", "showTransitionOptions", "hideTransitionOptions", "inline", "format", "tabindex", "inputId", "autoZIndex", "autofocus", "defaultColor", "appendTo", "overlayOptions", "motionOptions"], outputs: ["onChange", "onShow", "onHide"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }] });
|
|
80
|
-
}
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ColorPickerField, decorators: [{
|
|
82
|
-
type: Component,
|
|
83
|
-
args: [{ selector: 'mt-color-picker-field', standalone: true, imports: [
|
|
84
|
-
FormsModule,
|
|
85
|
-
ColorPickerModule,
|
|
86
|
-
FieldValidation,
|
|
87
|
-
TextField,
|
|
88
|
-
TranslocoModule,
|
|
89
|
-
], host: {
|
|
90
|
-
'[class]': 'class()',
|
|
91
|
-
}, template: "<div class=\"flex w-full min-w-0 flex-col gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n <div\r\n class=\"flex w-full min-w-0 items-center hover:border-(--p-inputtext-hover-border-color)! p-inputtext\"\r\n [class.bg-(--p-inputtext-filled-background)]=\"variant() === 'filled'\"\r\n [class.border-(--p-inputtext-invalid-border-color)!]=\"\r\n ngControl?.control?.invalid && ngControl?.control?.touched\r\n \"\r\n >\r\n <p-colorpicker\r\n #colorPicker=\"\"\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onChange)=\"onChange.emit($event)\"\r\n (blur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\r\n [class.mt-color-picker-empty]=\"!value()\"\r\n class=\"leading-none\"\r\n [appendTo]=\"appendTo()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n ></p-colorpicker>\r\n <div class=\"ms-2 w-full min-w-0\">\r\n <mt-text-field\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (change)=\"onChange.emit($event)\"\r\n (blur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\r\n [placeholder]=\"'components.colorPickerField.placeholder' | transloco\"\r\n class=\"leading-none p-0 input-no-border px-0 w-full\"\r\n [hint]=\"'components.colorPickerField.hint' | transloco\"\r\n ></mt-text-field>\r\n </div>\r\n </div>\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n</div>\r\n", styles: [":host{display:block;width:100%;min-width:0}::ng-deep .input-no-border .p-component{border:none;box-shadow:none;background-color:transparent;width:100%}::ng-deep .input-no-border .p-inputgroupaddon{border-inline:none;border-block-start:none;border-block-end:none;padding:0!important}::ng-deep .input-no-border .p-inputgroupaddon:last-child{border-inline-end:none}::ng-deep .p-inputtext .p-inputtext{padding:0!important}::ng-deep .mt-color-picker-empty .p-colorpicker-preview{background:repeating-conic-gradient(var(--p-inputtext-background) 0% 25%,var(--p-content-background) 0% 50%) 50%/8px 8px!important;background-color:transparent!important;border:1px solid var(--p-inputtext-border-color);position:relative}::ng-deep .mt-color-picker-empty .p-colorpicker-preview:after{content:\"\";position:absolute;inset:0;background:linear-gradient(to top right,transparent calc(50% - 1px),var(--p-red-500, #ef4444) calc(50% - 1px),var(--p-red-500, #ef4444) calc(50% + 1px),transparent calc(50% + 1px));pointer-events:none}\n"] }]
|
|
92
|
-
}], ctorParameters: () => [], propDecorators: { colorPicker: [{
|
|
93
|
-
type: ViewChild,
|
|
94
|
-
args: ['colorPicker', { static: true }]
|
|
95
|
-
}], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], pInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "pInputs", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }] } });
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Generated bundle index. Do not edit.
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
|
-
export { ColorPickerField };
|
|
102
|
-
//# sourceMappingURL=masterteam-components-color-picker-field.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-color-picker-field.mjs","sources":["../../../../packages/masterteam/components/color-picker-field/color-picker-field.ts","../../../../packages/masterteam/components/color-picker-field/color-picker-field.html","../../../../packages/masterteam/components/color-picker-field/masterteam-components-color-picker-field.ts"],"sourcesContent":["import {\r\n Component,\r\n ViewChild,\r\n signal,\r\n input,\r\n output,\r\n inject,\r\n effect,\r\n} from '@angular/core';\r\nimport {\r\n ControlValueAccessor,\r\n FormsModule,\r\n NgControl,\r\n Validators,\r\n} from '@angular/forms';\r\nimport {\r\n ColorPickerModule,\r\n ColorPicker,\r\n ColorPickerChangeEvent,\r\n} from 'primeng/colorpicker';\r\nimport { FieldValidation } from '@masterteam/components/field-validation';\r\nimport { TextField } from '@masterteam/components/text-field';\r\nimport { isInvalid } from '@masterteam/components';\r\nimport { TranslocoModule } from '@jsverse/transloco';\r\n\r\n@Component({\r\n selector: 'mt-color-picker-field',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n ColorPickerModule,\r\n FieldValidation,\r\n TextField,\r\n TranslocoModule,\r\n ],\r\n templateUrl: './color-picker-field.html',\r\n styleUrls: ['./color-picker-field.scss'],\r\n host: {\r\n '[class]': 'class()',\r\n },\r\n})\r\nexport class ColorPickerField implements ControlValueAccessor {\r\n @ViewChild('colorPicker', { static: true })\r\n colorPicker: ColorPicker;\r\n label = input<string>();\r\n appendTo = input<string>('body');\r\n placeholder = input<string>();\r\n class = input<string>('');\r\n variant = input<'outlined' | 'filled'>('outlined');\r\n readonly = input<boolean>(false);\r\n pInputs = input<Partial<ColorPicker>>();\r\n required = input<boolean>(false);\r\n\r\n onChange = output<ColorPickerChangeEvent>();\r\n\r\n public ngControl = inject(NgControl, { self: true });\r\n\r\n requiredValidator = Validators.required;\r\n value = signal<string | null>(null);\r\n disabled = signal<boolean>(false);\r\n\r\n onTouched: () => void = () => {};\r\n onModelChange: (value: string | null) => void = () => {};\r\n isInvalid = isInvalid;\r\n\r\n constructor() {\r\n if (this.ngControl) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n\r\n // Effect to apply pInputs reactively when the pInputs signal changes\r\n effect(() => {\r\n const currentPInputs = this.pInputs();\r\n // Ensure colorPicker ViewChild is initialized and pInputs has a value\r\n // @ViewChild with static: true makes 'colorPicker' available during construction/ngOnInit\r\n if (this.colorPicker && currentPInputs) {\r\n this.applyInputsToColorPicker();\r\n }\r\n });\r\n\r\n // Effect to add required validator if required input is true\r\n effect(() => {\r\n if (this.ngControl.control && this.required()) {\r\n this.ngControl.control.addValidators(Validators.required);\r\n this.ngControl.control.updateValueAndValidity();\r\n }\r\n if (this.ngControl.control) {\r\n this.ngControl.control.addValidators(\r\n Validators.pattern(/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/),\r\n );\r\n }\r\n });\r\n }\r\n\r\n applyInputsToColorPicker() {\r\n const currentPInputs = this.pInputs();\r\n if (currentPInputs) {\r\n Object.assign(this.colorPicker, currentPInputs);\r\n }\r\n }\r\n\r\n onValueChange(value: string | null) {\r\n this.onModelChange(value);\r\n this.onTouched();\r\n this.value.set(value);\r\n }\r\n\r\n writeValue(value: string | null) {\r\n this.value.set(value);\r\n }\r\n\r\n registerOnChange(fn: any) {\r\n this.onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any) {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(disabled: boolean) {\r\n this.disabled.set(disabled);\r\n }\r\n}\r\n","<div class=\"flex w-full min-w-0 flex-col gap-1\">\r\n @if (label()) {\r\n <label\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"ngControl?.name || label()\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n <div\r\n class=\"flex w-full min-w-0 items-center hover:border-(--p-inputtext-hover-border-color)! p-inputtext\"\r\n [class.bg-(--p-inputtext-filled-background)]=\"variant() === 'filled'\"\r\n [class.border-(--p-inputtext-invalid-border-color)!]=\"\r\n ngControl?.control?.invalid && ngControl?.control?.touched\r\n \"\r\n >\r\n <p-colorpicker\r\n #colorPicker=\"\"\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (onChange)=\"onChange.emit($event)\"\r\n (blur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"ngControl?.name ? ngControl?.name?.toString() : label()\"\r\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\r\n [class.mt-color-picker-empty]=\"!value()\"\r\n class=\"leading-none\"\r\n [appendTo]=\"appendTo()\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n ></p-colorpicker>\r\n <div class=\"ms-2 w-full min-w-0\">\r\n <mt-text-field\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n (change)=\"onChange.emit($event)\"\r\n (blur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [class.ng-invalid]=\"ngControl?.control?.invalid\"\r\n [placeholder]=\"'components.colorPickerField.placeholder' | transloco\"\r\n class=\"leading-none p-0 input-no-border px-0 w-full\"\r\n [hint]=\"'components.colorPickerField.hint' | transloco\"\r\n ></mt-text-field>\r\n </div>\r\n </div>\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAyCa,gBAAgB,CAAA;AAE3B,IAAA,WAAW;IACX,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;AACvB,IAAA,QAAQ,GAAG,KAAK,CAAS,MAAM,+EAAC;IAChC,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;AAC7B,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AACzB,IAAA,OAAO,GAAG,KAAK,CAAwB,UAAU,8EAAC;AAClD,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;IAChC,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAwB;AACvC,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;IAEhC,QAAQ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A,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAQN,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAhB5B,SAAS;+BACE,uBAAuB,EAAA,UAAA,EACrB,IAAI,EAAA,OAAA,EACP;wBACP,WAAW;wBACX,iBAAiB;wBACjB,eAAe;wBACf,SAAS;wBACT,eAAe;qBAChB,EAAA,IAAA,EAGK;AACJ,wBAAA,SAAS,EAAE,SAAS;AACrB,qBAAA,EAAA,QAAA,EAAA,63DAAA,EAAA,MAAA,EAAA,CAAA,y/BAAA,CAAA,EAAA;;sBAGA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;AE1C5C;;AAEG;;;;"}
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { Button } from '@masterteam/components/button';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, ElementRef, Renderer2, model, output, input, computed, effect, RendererStyleFlags2, Component } from '@angular/core';
|
|
4
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
|
-
import { TranslocoService } from '@jsverse/transloco';
|
|
6
|
-
import * as i1 from 'primeng/drawer';
|
|
7
|
-
import { DrawerModule } from 'primeng/drawer';
|
|
8
|
-
import { blockBodyScroll, unblockBodyScroll } from 'primeng/dom';
|
|
9
|
-
import * as i2 from 'primeng/skeleton';
|
|
10
|
-
import { SkeletonModule } from 'primeng/skeleton';
|
|
11
|
-
|
|
12
|
-
class Drawer {
|
|
13
|
-
static nextInstanceId = 0;
|
|
14
|
-
doc = inject(DOCUMENT);
|
|
15
|
-
host = inject((ElementRef));
|
|
16
|
-
renderer = inject(Renderer2);
|
|
17
|
-
transloco = inject(TranslocoService);
|
|
18
|
-
drawerInstanceClass = `mt-custom-drawer-instance-${Drawer.nextInstanceId++}`;
|
|
19
|
-
customMask = null;
|
|
20
|
-
removeMaskClickListener = null;
|
|
21
|
-
resizeAnimTimer = null;
|
|
22
|
-
RESIZE_ANIM_CLASS = 'mt-drawer--anim-resize';
|
|
23
|
-
RESIZE_ANIM_DURATION_MS = 700;
|
|
24
|
-
visible = model(false, ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
25
|
-
visibleChange = output();
|
|
26
|
-
onShow = output();
|
|
27
|
-
onHide = output();
|
|
28
|
-
position = input('right', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
29
|
-
fullScreen = input(false, ...(ngDevMode ? [{ debugName: "fullScreen" }] : /* istanbul ignore next */ []));
|
|
30
|
-
closeOnEscape = input(false, ...(ngDevMode ? [{ debugName: "closeOnEscape" }] : /* istanbul ignore next */ []));
|
|
31
|
-
blockScroll = input(true, ...(ngDevMode ? [{ debugName: "blockScroll" }] : /* istanbul ignore next */ []));
|
|
32
|
-
dismissible = input(true, ...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
|
|
33
|
-
title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
34
|
-
subtitle = input('', ...(ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []));
|
|
35
|
-
loadingHeader = input(false, ...(ngDevMode ? [{ debugName: "loadingHeader" }] : /* istanbul ignore next */ []));
|
|
36
|
-
styleClass = input('', ...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
37
|
-
transitionOptions = input('200ms cubic-bezier(0, 0, 1, 1)', ...(ngDevMode ? [{ debugName: "transitionOptions" }] : /* istanbul ignore next */ []));
|
|
38
|
-
appendTo = input('self', ...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
39
|
-
modal = input(true, ...(ngDevMode ? [{ debugName: "modal" }] : /* istanbul ignore next */ []));
|
|
40
|
-
showMaximizeToggle = input(true, ...(ngDevMode ? [{ debugName: "showMaximizeToggle" }] : /* istanbul ignore next */ []));
|
|
41
|
-
maximizeTooltip = input('', ...(ngDevMode ? [{ debugName: "maximizeTooltip" }] : /* istanbul ignore next */ []));
|
|
42
|
-
restoreTooltip = input('', ...(ngDevMode ? [{ debugName: "restoreTooltip" }] : /* istanbul ignore next */ []));
|
|
43
|
-
maximized = model(false, ...(ngDevMode ? [{ debugName: "maximized" }] : /* istanbul ignore next */ []));
|
|
44
|
-
canShowMaximizeToggle = computed(() => this.showMaximizeToggle() &&
|
|
45
|
-
!this.fullScreen() &&
|
|
46
|
-
(this.position() === 'left' || this.position() === 'right'), ...(ngDevMode ? [{ debugName: "canShowMaximizeToggle" }] : /* istanbul ignore next */ []));
|
|
47
|
-
resolvedMaximizeTooltip = computed(() => this.maximizeTooltip() ||
|
|
48
|
-
this.transloco.translate('components.drawer.expandFullWidth'), ...(ngDevMode ? [{ debugName: "resolvedMaximizeTooltip" }] : /* istanbul ignore next */ []));
|
|
49
|
-
resolvedRestoreTooltip = computed(() => this.restoreTooltip() ||
|
|
50
|
-
this.transloco.translate('components.drawer.restoreSize'), ...(ngDevMode ? [{ debugName: "resolvedRestoreTooltip" }] : /* istanbul ignore next */ []));
|
|
51
|
-
resolvedAppendTo = computed(() => {
|
|
52
|
-
this.visible();
|
|
53
|
-
const appendTo = this.appendTo();
|
|
54
|
-
if (!appendTo || appendTo === 'self' || appendTo === 'body') {
|
|
55
|
-
return appendTo || 'self';
|
|
56
|
-
}
|
|
57
|
-
if (typeof appendTo !== 'string') {
|
|
58
|
-
return appendTo;
|
|
59
|
-
}
|
|
60
|
-
const selector = appendTo.startsWith('#') || appendTo.startsWith('.')
|
|
61
|
-
? appendTo
|
|
62
|
-
: `#${appendTo}`;
|
|
63
|
-
return this.doc.querySelector(selector) ?? 'self';
|
|
64
|
-
}, ...(ngDevMode ? [{ debugName: "resolvedAppendTo" }] : /* istanbul ignore next */ []));
|
|
65
|
-
resolvedStyleClass = computed(() => [
|
|
66
|
-
this.styleClass(),
|
|
67
|
-
'mt-custom-drawer',
|
|
68
|
-
this.drawerInstanceClass,
|
|
69
|
-
this.maximized() ? 'mt-drawer--maximized' : '',
|
|
70
|
-
]
|
|
71
|
-
.filter(Boolean)
|
|
72
|
-
.join(' '), ...(ngDevMode ? [{ debugName: "resolvedStyleClass" }] : /* istanbul ignore next */ []));
|
|
73
|
-
constructor() {
|
|
74
|
-
effect(() => {
|
|
75
|
-
if (!this.visible() || !this.modal()) {
|
|
76
|
-
this.destroyCustomMask();
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
effect(() => {
|
|
80
|
-
// React only when the user toggles maximize while the drawer is open.
|
|
81
|
-
// Closing/opening is handled by onShowEvent / onHideEvent so we never
|
|
82
|
-
// race with PrimeNG's slide animation.
|
|
83
|
-
const isMaximized = this.maximized();
|
|
84
|
-
if (!this.visible()) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
this.applyMaximizedInlineStyles(isMaximized, true);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
visibleChangeEvent(event) {
|
|
91
|
-
this.visibleChange.emit(event);
|
|
92
|
-
}
|
|
93
|
-
onClose() {
|
|
94
|
-
this.visible.set(false);
|
|
95
|
-
this.visibleChange.emit(false);
|
|
96
|
-
this.onHide.emit(true);
|
|
97
|
-
}
|
|
98
|
-
toggleMaximized() {
|
|
99
|
-
this.maximized.set(!this.maximized());
|
|
100
|
-
}
|
|
101
|
-
onShowEvent() {
|
|
102
|
-
this.syncCustomMask();
|
|
103
|
-
// Drawer DOM only exists after PrimeNG renders it — apply current state
|
|
104
|
-
// instantly so the open animation isn't fighting our resize transition.
|
|
105
|
-
this.applyMaximizedInlineStyles(this.maximized(), false);
|
|
106
|
-
this.onShow.emit(true);
|
|
107
|
-
}
|
|
108
|
-
onHideEvent() {
|
|
109
|
-
this.destroyCustomMask();
|
|
110
|
-
// Instant cleanup — the close animation is already done; we don't want
|
|
111
|
-
// to start a 650ms width transition mid-hide.
|
|
112
|
-
this.applyMaximizedInlineStyles(false, false);
|
|
113
|
-
this.onHide.emit(true);
|
|
114
|
-
}
|
|
115
|
-
applyMaximizedInlineStyles(isMaximized, animate) {
|
|
116
|
-
const drawerEl = this.getDrawerElement();
|
|
117
|
-
if (!drawerEl) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
if (this.resizeAnimTimer) {
|
|
121
|
-
clearTimeout(this.resizeAnimTimer);
|
|
122
|
-
this.resizeAnimTimer = null;
|
|
123
|
-
}
|
|
124
|
-
if (animate) {
|
|
125
|
-
this.renderer.addClass(drawerEl, this.RESIZE_ANIM_CLASS);
|
|
126
|
-
this.resizeAnimTimer = setTimeout(() => {
|
|
127
|
-
this.renderer.removeClass(drawerEl, this.RESIZE_ANIM_CLASS);
|
|
128
|
-
this.resizeAnimTimer = null;
|
|
129
|
-
}, this.RESIZE_ANIM_DURATION_MS);
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
this.renderer.removeClass(drawerEl, this.RESIZE_ANIM_CLASS);
|
|
133
|
-
}
|
|
134
|
-
if (isMaximized) {
|
|
135
|
-
this.renderer.setStyle(drawerEl, 'width', '100%', RendererStyleFlags2.Important);
|
|
136
|
-
this.renderer.setStyle(drawerEl, 'max-width', '100%', RendererStyleFlags2.Important);
|
|
137
|
-
this.renderer.setStyle(drawerEl, 'height', '100%', RendererStyleFlags2.Important);
|
|
138
|
-
this.renderer.setStyle(drawerEl, 'max-height', '100%', RendererStyleFlags2.Important);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
this.renderer.removeStyle(drawerEl, 'width');
|
|
142
|
-
this.renderer.removeStyle(drawerEl, 'max-width');
|
|
143
|
-
this.renderer.removeStyle(drawerEl, 'height');
|
|
144
|
-
this.renderer.removeStyle(drawerEl, 'max-height');
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
ngOnDestroy() {
|
|
148
|
-
if (this.resizeAnimTimer) {
|
|
149
|
-
clearTimeout(this.resizeAnimTimer);
|
|
150
|
-
this.resizeAnimTimer = null;
|
|
151
|
-
}
|
|
152
|
-
this.destroyCustomMask();
|
|
153
|
-
}
|
|
154
|
-
syncCustomMask() {
|
|
155
|
-
if (!this.modal()) {
|
|
156
|
-
this.destroyCustomMask();
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
const parent = this.resolveMaskParent();
|
|
160
|
-
if (!parent) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
if (!this.customMask) {
|
|
164
|
-
const mask = this.renderer.createElement('div');
|
|
165
|
-
this.renderer.addClass(mask, 'p-drawer-mask');
|
|
166
|
-
this.renderer.addClass(mask, 'p-overlay-mask');
|
|
167
|
-
this.renderer.addClass(mask, 'p-overlay-mask-enter-active');
|
|
168
|
-
this.customMask = mask;
|
|
169
|
-
this.renderer.appendChild(parent, mask);
|
|
170
|
-
}
|
|
171
|
-
this.updateCustomMaskAttributes();
|
|
172
|
-
this.bindMaskClickListener();
|
|
173
|
-
if (this.blockScroll()) {
|
|
174
|
-
blockBodyScroll();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
updateCustomMaskAttributes() {
|
|
178
|
-
if (!this.customMask) {
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
this.renderer.setAttribute(this.customMask, 'style', this.getMaskStyle());
|
|
182
|
-
this.renderer.setAttribute(this.customMask, 'data-p', this.getMaskDataP());
|
|
183
|
-
}
|
|
184
|
-
resolveMaskParent() {
|
|
185
|
-
const appendTo = this.resolvedAppendTo();
|
|
186
|
-
if (!appendTo || appendTo === 'self') {
|
|
187
|
-
return this.host.nativeElement;
|
|
188
|
-
}
|
|
189
|
-
if (appendTo === 'body') {
|
|
190
|
-
return this.doc.body;
|
|
191
|
-
}
|
|
192
|
-
return appendTo instanceof HTMLElement ? appendTo : this.host.nativeElement;
|
|
193
|
-
}
|
|
194
|
-
getDrawerElement() {
|
|
195
|
-
return this.doc.querySelector(`.${this.drawerInstanceClass}.p-drawer`);
|
|
196
|
-
}
|
|
197
|
-
getMaskStyle() {
|
|
198
|
-
const drawerElement = this.getDrawerElement();
|
|
199
|
-
const drawerZIndex = Number.parseInt(drawerElement?.style.zIndex ?? '', 10);
|
|
200
|
-
const maskZIndex = Number.isFinite(drawerZIndex)
|
|
201
|
-
? Math.max(drawerZIndex - 1, 0)
|
|
202
|
-
: 1901;
|
|
203
|
-
return `z-index: ${maskZIndex};`;
|
|
204
|
-
}
|
|
205
|
-
getMaskDataP() {
|
|
206
|
-
const parts = [
|
|
207
|
-
this.fullScreen() ? 'full-screen' : null,
|
|
208
|
-
this.position(),
|
|
209
|
-
'open',
|
|
210
|
-
'modal',
|
|
211
|
-
].filter((part) => !!part);
|
|
212
|
-
return parts.join(' ');
|
|
213
|
-
}
|
|
214
|
-
bindMaskClickListener() {
|
|
215
|
-
if (!this.customMask) {
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
if (this.removeMaskClickListener) {
|
|
219
|
-
this.removeMaskClickListener();
|
|
220
|
-
this.removeMaskClickListener = null;
|
|
221
|
-
}
|
|
222
|
-
if (!this.dismissible()) {
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
this.removeMaskClickListener = this.renderer.listen(this.customMask, 'click', (event) => {
|
|
226
|
-
if (this.dismissible()) {
|
|
227
|
-
event.preventDefault();
|
|
228
|
-
this.onClose();
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
destroyCustomMask() {
|
|
233
|
-
if (this.removeMaskClickListener) {
|
|
234
|
-
this.removeMaskClickListener();
|
|
235
|
-
this.removeMaskClickListener = null;
|
|
236
|
-
}
|
|
237
|
-
if (this.customMask) {
|
|
238
|
-
const parent = this.customMask.parentNode;
|
|
239
|
-
if (parent) {
|
|
240
|
-
this.renderer.removeChild(parent, this.customMask);
|
|
241
|
-
}
|
|
242
|
-
this.customMask = null;
|
|
243
|
-
}
|
|
244
|
-
if (this.blockScroll()) {
|
|
245
|
-
unblockBodyScroll();
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Drawer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
249
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Drawer, isStandalone: true, selector: "mt-drawer", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, fullScreen: { classPropertyName: "fullScreen", publicName: "fullScreen", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, blockScroll: { classPropertyName: "blockScroll", publicName: "blockScroll", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, loadingHeader: { classPropertyName: "loadingHeader", publicName: "loadingHeader", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, transitionOptions: { classPropertyName: "transitionOptions", publicName: "transitionOptions", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, showMaximizeToggle: { classPropertyName: "showMaximizeToggle", publicName: "showMaximizeToggle", isSignal: true, isRequired: false, transformFunction: null }, maximizeTooltip: { classPropertyName: "maximizeTooltip", publicName: "maximizeTooltip", isSignal: true, isRequired: false, transformFunction: null }, restoreTooltip: { classPropertyName: "restoreTooltip", publicName: "restoreTooltip", isSignal: true, isRequired: false, transformFunction: null }, maximized: { classPropertyName: "maximized", publicName: "maximized", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", visibleChange: "visibleChange", onShow: "onShow", onHide: "onHide", maximized: "maximizedChange" }, ngImport: i0, template: "<p-drawer\r\n [(visible)]=\"visible\"\r\n [position]=\"position()\"\r\n [fullScreen]=\"fullScreen()\"\r\n [modal]=\"false\"\r\n [closable]=\"false\"\r\n [closeOnEscape]=\"closeOnEscape()\"\r\n [blockScroll]=\"blockScroll()\"\r\n [dismissible]=\"dismissible()\"\r\n [appendTo]=\"resolvedAppendTo()\"\r\n [transitionOptions]=\"transitionOptions()\"\r\n [styleClass]=\"resolvedStyleClass()\"\r\n (visibleChange)=\"visibleChangeEvent($event)\"\r\n (onShow)=\"onShowEvent()\"\r\n (onHide)=\"onHideEvent()\"\r\n>\r\n <ng-template #header>\r\n <div\r\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\r\n >\r\n @if (loadingHeader()) {\r\n <div class=\"flex flex-1 flex-col gap-2\">\r\n <p-skeleton width=\"12rem\" height=\"1.75rem\" borderRadius=\"0.5rem\" />\r\n <p-skeleton width=\"8rem\" height=\"0.875rem\" borderRadius=\"0.5rem\" />\r\n </div>\r\n } @else {\r\n <div class=\"flex flex-1 flex-col\">\r\n <h3 class=\"text-xl font-semibold\" [innerHTML]=\"title()\"></h3>\r\n @if (subtitle()) {\r\n <p class=\"text-sm text-surface-500\" [innerHTML]=\"subtitle()\"></p>\r\n }\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (canShowMaximizeToggle()) {\r\n <mt-button\r\n (onClick)=\"toggleMaximized()\"\r\n variant=\"outlined\"\r\n styleClass=\"!bg-white\"\r\n severity=\"secondary\"\r\n [icon]=\"maximized() ? 'layout.minimize-01' : 'layout.maximize-01'\"\r\n [tooltip]=\"\r\n maximized() ? resolvedRestoreTooltip() : resolvedMaximizeTooltip()\r\n \"\r\n >\r\n </mt-button>\r\n }\r\n <mt-button\r\n (onClick)=\"onClose()\"\r\n variant=\"outlined\"\r\n styleClass=\"!bg-white\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n >\r\n </mt-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-content select=\"[content]\"></ng-content>\r\n\r\n <ng-template #footer>\r\n <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\r\n <ng-content select=\"[footer]\"></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-drawer>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i1.Drawer, selector: "p-drawer", inputs: ["appendTo", "motionOptions", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }] });
|
|
250
|
-
}
|
|
251
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Drawer, decorators: [{
|
|
252
|
-
type: Component,
|
|
253
|
-
args: [{ selector: 'mt-drawer', standalone: true, imports: [CommonModule, DrawerModule, SkeletonModule, Button], template: "<p-drawer\r\n [(visible)]=\"visible\"\r\n [position]=\"position()\"\r\n [fullScreen]=\"fullScreen()\"\r\n [modal]=\"false\"\r\n [closable]=\"false\"\r\n [closeOnEscape]=\"closeOnEscape()\"\r\n [blockScroll]=\"blockScroll()\"\r\n [dismissible]=\"dismissible()\"\r\n [appendTo]=\"resolvedAppendTo()\"\r\n [transitionOptions]=\"transitionOptions()\"\r\n [styleClass]=\"resolvedStyleClass()\"\r\n (visibleChange)=\"visibleChangeEvent($event)\"\r\n (onShow)=\"onShowEvent()\"\r\n (onHide)=\"onHideEvent()\"\r\n>\r\n <ng-template #header>\r\n <div\r\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\r\n >\r\n @if (loadingHeader()) {\r\n <div class=\"flex flex-1 flex-col gap-2\">\r\n <p-skeleton width=\"12rem\" height=\"1.75rem\" borderRadius=\"0.5rem\" />\r\n <p-skeleton width=\"8rem\" height=\"0.875rem\" borderRadius=\"0.5rem\" />\r\n </div>\r\n } @else {\r\n <div class=\"flex flex-1 flex-col\">\r\n <h3 class=\"text-xl font-semibold\" [innerHTML]=\"title()\"></h3>\r\n @if (subtitle()) {\r\n <p class=\"text-sm text-surface-500\" [innerHTML]=\"subtitle()\"></p>\r\n }\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (canShowMaximizeToggle()) {\r\n <mt-button\r\n (onClick)=\"toggleMaximized()\"\r\n variant=\"outlined\"\r\n styleClass=\"!bg-white\"\r\n severity=\"secondary\"\r\n [icon]=\"maximized() ? 'layout.minimize-01' : 'layout.maximize-01'\"\r\n [tooltip]=\"\r\n maximized() ? resolvedRestoreTooltip() : resolvedMaximizeTooltip()\r\n \"\r\n >\r\n </mt-button>\r\n }\r\n <mt-button\r\n (onClick)=\"onClose()\"\r\n variant=\"outlined\"\r\n styleClass=\"!bg-white\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n >\r\n </mt-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-content select=\"[content]\"></ng-content>\r\n\r\n <ng-template #footer>\r\n <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\r\n <ng-content select=\"[footer]\"></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-drawer>\r\n" }]
|
|
254
|
-
}], ctorParameters: () => [], propDecorators: { visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], visibleChange: [{ type: i0.Output, args: ["visibleChange"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], fullScreen: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullScreen", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], blockScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "blockScroll", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], loadingHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingHeader", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], transitionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "transitionOptions", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], modal: [{ type: i0.Input, args: [{ isSignal: true, alias: "modal", required: false }] }], showMaximizeToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showMaximizeToggle", required: false }] }], maximizeTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximizeTooltip", required: false }] }], restoreTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "restoreTooltip", required: false }] }], maximized: [{ type: i0.Input, args: [{ isSignal: true, alias: "maximized", required: false }] }, { type: i0.Output, args: ["maximizedChange"] }] } });
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Generated bundle index. Do not edit.
|
|
258
|
-
*/
|
|
259
|
-
|
|
260
|
-
export { Drawer };
|
|
261
|
-
//# sourceMappingURL=masterteam-components-drawer.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-drawer.mjs","sources":["../../../../packages/masterteam/components/drawer/drawer.ts","../../../../packages/masterteam/components/drawer/drawer.html","../../../../packages/masterteam/components/drawer/masterteam-components-drawer.ts"],"sourcesContent":["import { Button } from '@masterteam/components/button';\r\nimport {\r\n Component,\r\n computed,\r\n effect,\r\n ElementRef,\r\n inject,\r\n input,\r\n output,\r\n Renderer2,\r\n RendererStyleFlags2,\r\n model,\r\n OnDestroy,\r\n} from '@angular/core';\r\nimport { CommonModule, DOCUMENT } from '@angular/common';\r\nimport { TranslocoService } from '@jsverse/transloco';\r\nimport { DrawerModule } from 'primeng/drawer';\r\nimport { blockBodyScroll, unblockBodyScroll } from 'primeng/dom';\r\nimport { SkeletonModule } from 'primeng/skeleton';\r\n\r\n@Component({\r\n selector: 'mt-drawer',\r\n standalone: true,\r\n imports: [CommonModule, DrawerModule, SkeletonModule, Button],\r\n templateUrl: './drawer.html',\r\n styleUrls: ['./drawer.scss'],\r\n})\r\nexport class Drawer implements OnDestroy {\r\n private static nextInstanceId = 0;\r\n private readonly doc = inject(DOCUMENT);\r\n private readonly host = inject(ElementRef<HTMLElement>);\r\n private readonly renderer = inject(Renderer2);\r\n private readonly transloco = inject(TranslocoService);\r\n private readonly drawerInstanceClass = `mt-custom-drawer-instance-${Drawer.nextInstanceId++}`;\r\n private customMask: HTMLElement | null = null;\r\n private removeMaskClickListener: (() => void) | null = null;\r\n private resizeAnimTimer: ReturnType<typeof setTimeout> | null = null;\r\n private readonly RESIZE_ANIM_CLASS = 'mt-drawer--anim-resize';\r\n private readonly RESIZE_ANIM_DURATION_MS = 700;\r\n visible = model<boolean>(false);\r\n visibleChange = output<boolean>();\r\n onShow = output<boolean>();\r\n onHide = output<boolean>();\r\n position = input<'left' | 'right' | 'top' | 'bottom'>('right');\r\n fullScreen = input<boolean>(false);\r\n closeOnEscape = input<boolean>(false);\r\n blockScroll = input<boolean>(true);\r\n dismissible = input<boolean>(true);\r\n title = input<string>('');\r\n subtitle = input<string>('');\r\n loadingHeader = input<boolean>(false);\r\n styleClass = input<string>('');\r\n transitionOptions = input<string>('200ms cubic-bezier(0, 0, 1, 1)');\r\n appendTo = input<string | HTMLElement>('self');\r\n modal = input<boolean>(true);\r\n showMaximizeToggle = input<boolean>(true);\r\n maximizeTooltip = input<string>('');\r\n restoreTooltip = input<string>('');\r\n maximized = model<boolean>(false);\r\n protected readonly canShowMaximizeToggle = computed(\r\n () =>\r\n this.showMaximizeToggle() &&\r\n !this.fullScreen() &&\r\n (this.position() === 'left' || this.position() === 'right'),\r\n );\r\n protected readonly resolvedMaximizeTooltip = computed(\r\n () =>\r\n this.maximizeTooltip() ||\r\n this.transloco.translate('components.drawer.expandFullWidth'),\r\n );\r\n protected readonly resolvedRestoreTooltip = computed(\r\n () =>\r\n this.restoreTooltip() ||\r\n this.transloco.translate('components.drawer.restoreSize'),\r\n );\r\n protected readonly resolvedAppendTo = computed(() => {\r\n this.visible();\r\n\r\n const appendTo = this.appendTo();\r\n\r\n if (!appendTo || appendTo === 'self' || appendTo === 'body') {\r\n return appendTo || 'self';\r\n }\r\n\r\n if (typeof appendTo !== 'string') {\r\n return appendTo;\r\n }\r\n\r\n const selector =\r\n appendTo.startsWith('#') || appendTo.startsWith('.')\r\n ? appendTo\r\n : `#${appendTo}`;\r\n\r\n return (this.doc.querySelector(selector) as HTMLElement | null) ?? 'self';\r\n });\r\n protected readonly resolvedStyleClass = computed(() =>\r\n [\r\n this.styleClass(),\r\n 'mt-custom-drawer',\r\n this.drawerInstanceClass,\r\n this.maximized() ? 'mt-drawer--maximized' : '',\r\n ]\r\n .filter(Boolean)\r\n .join(' '),\r\n );\r\n\r\n constructor() {\r\n effect(() => {\r\n if (!this.visible() || !this.modal()) {\r\n this.destroyCustomMask();\r\n }\r\n });\r\n\r\n effect(() => {\r\n // React only when the user toggles maximize while the drawer is open.\r\n // Closing/opening is handled by onShowEvent / onHideEvent so we never\r\n // race with PrimeNG's slide animation.\r\n const isMaximized = this.maximized();\r\n if (!this.visible()) {\r\n return;\r\n }\r\n this.applyMaximizedInlineStyles(isMaximized, true);\r\n });\r\n }\r\n\r\n visibleChangeEvent(event: boolean) {\r\n this.visibleChange.emit(event);\r\n }\r\n\r\n onClose() {\r\n this.visible.set(false);\r\n this.visibleChange.emit(false);\r\n this.onHide.emit(true);\r\n }\r\n\r\n toggleMaximized() {\r\n this.maximized.set(!this.maximized());\r\n }\r\n onShowEvent() {\r\n this.syncCustomMask();\r\n // Drawer DOM only exists after PrimeNG renders it — apply current state\r\n // instantly so the open animation isn't fighting our resize transition.\r\n this.applyMaximizedInlineStyles(this.maximized(), false);\r\n this.onShow.emit(true);\r\n }\r\n onHideEvent() {\r\n this.destroyCustomMask();\r\n // Instant cleanup — the close animation is already done; we don't want\r\n // to start a 650ms width transition mid-hide.\r\n this.applyMaximizedInlineStyles(false, false);\r\n this.onHide.emit(true);\r\n }\r\n\r\n private applyMaximizedInlineStyles(\r\n isMaximized: boolean,\r\n animate: boolean,\r\n ): void {\r\n const drawerEl = this.getDrawerElement();\r\n if (!drawerEl) {\r\n return;\r\n }\r\n\r\n if (this.resizeAnimTimer) {\r\n clearTimeout(this.resizeAnimTimer);\r\n this.resizeAnimTimer = null;\r\n }\r\n\r\n if (animate) {\r\n this.renderer.addClass(drawerEl, this.RESIZE_ANIM_CLASS);\r\n this.resizeAnimTimer = setTimeout(() => {\r\n this.renderer.removeClass(drawerEl, this.RESIZE_ANIM_CLASS);\r\n this.resizeAnimTimer = null;\r\n }, this.RESIZE_ANIM_DURATION_MS);\r\n } else {\r\n this.renderer.removeClass(drawerEl, this.RESIZE_ANIM_CLASS);\r\n }\r\n\r\n if (isMaximized) {\r\n this.renderer.setStyle(\r\n drawerEl,\r\n 'width',\r\n '100%',\r\n RendererStyleFlags2.Important,\r\n );\r\n this.renderer.setStyle(\r\n drawerEl,\r\n 'max-width',\r\n '100%',\r\n RendererStyleFlags2.Important,\r\n );\r\n this.renderer.setStyle(\r\n drawerEl,\r\n 'height',\r\n '100%',\r\n RendererStyleFlags2.Important,\r\n );\r\n this.renderer.setStyle(\r\n drawerEl,\r\n 'max-height',\r\n '100%',\r\n RendererStyleFlags2.Important,\r\n );\r\n } else {\r\n this.renderer.removeStyle(drawerEl, 'width');\r\n this.renderer.removeStyle(drawerEl, 'max-width');\r\n this.renderer.removeStyle(drawerEl, 'height');\r\n this.renderer.removeStyle(drawerEl, 'max-height');\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.resizeAnimTimer) {\r\n clearTimeout(this.resizeAnimTimer);\r\n this.resizeAnimTimer = null;\r\n }\r\n this.destroyCustomMask();\r\n }\r\n\r\n private syncCustomMask(): void {\r\n if (!this.modal()) {\r\n this.destroyCustomMask();\r\n return;\r\n }\r\n\r\n const parent = this.resolveMaskParent();\r\n if (!parent) {\r\n return;\r\n }\r\n\r\n if (!this.customMask) {\r\n const mask = this.renderer.createElement('div') as HTMLElement;\r\n this.renderer.addClass(mask, 'p-drawer-mask');\r\n this.renderer.addClass(mask, 'p-overlay-mask');\r\n this.renderer.addClass(mask, 'p-overlay-mask-enter-active');\r\n this.customMask = mask;\r\n this.renderer.appendChild(parent, mask);\r\n }\r\n\r\n this.updateCustomMaskAttributes();\r\n this.bindMaskClickListener();\r\n\r\n if (this.blockScroll()) {\r\n blockBodyScroll();\r\n }\r\n }\r\n\r\n private updateCustomMaskAttributes(): void {\r\n if (!this.customMask) {\r\n return;\r\n }\r\n\r\n this.renderer.setAttribute(this.customMask, 'style', this.getMaskStyle());\r\n this.renderer.setAttribute(this.customMask, 'data-p', this.getMaskDataP());\r\n }\r\n\r\n private resolveMaskParent(): HTMLElement | null {\r\n const appendTo = this.resolvedAppendTo();\r\n\r\n if (!appendTo || appendTo === 'self') {\r\n return this.host.nativeElement;\r\n }\r\n\r\n if (appendTo === 'body') {\r\n return this.doc.body;\r\n }\r\n\r\n return appendTo instanceof HTMLElement ? appendTo : this.host.nativeElement;\r\n }\r\n\r\n private getDrawerElement(): HTMLElement | null {\r\n return this.doc.querySelector(\r\n `.${this.drawerInstanceClass}.p-drawer`,\r\n ) as HTMLElement | null;\r\n }\r\n\r\n private getMaskStyle(): string {\r\n const drawerElement = this.getDrawerElement();\r\n const drawerZIndex = Number.parseInt(drawerElement?.style.zIndex ?? '', 10);\r\n const maskZIndex = Number.isFinite(drawerZIndex)\r\n ? Math.max(drawerZIndex - 1, 0)\r\n : 1901;\r\n\r\n return `z-index: ${maskZIndex};`;\r\n }\r\n\r\n private getMaskDataP(): string {\r\n const parts = [\r\n this.fullScreen() ? 'full-screen' : null,\r\n this.position(),\r\n 'open',\r\n 'modal',\r\n ].filter((part): part is string => !!part);\r\n\r\n return parts.join(' ');\r\n }\r\n\r\n private bindMaskClickListener(): void {\r\n if (!this.customMask) {\r\n return;\r\n }\r\n\r\n if (this.removeMaskClickListener) {\r\n this.removeMaskClickListener();\r\n this.removeMaskClickListener = null;\r\n }\r\n\r\n if (!this.dismissible()) {\r\n return;\r\n }\r\n\r\n this.removeMaskClickListener = this.renderer.listen(\r\n this.customMask,\r\n 'click',\r\n (event: Event) => {\r\n if (this.dismissible()) {\r\n event.preventDefault();\r\n this.onClose();\r\n }\r\n },\r\n );\r\n }\r\n\r\n private destroyCustomMask(): void {\r\n if (this.removeMaskClickListener) {\r\n this.removeMaskClickListener();\r\n this.removeMaskClickListener = null;\r\n }\r\n\r\n if (this.customMask) {\r\n const parent = this.customMask.parentNode;\r\n if (parent) {\r\n this.renderer.removeChild(parent, this.customMask);\r\n }\r\n this.customMask = null;\r\n }\r\n\r\n if (this.blockScroll()) {\r\n unblockBodyScroll();\r\n }\r\n }\r\n}\r\n","<p-drawer\r\n [(visible)]=\"visible\"\r\n [position]=\"position()\"\r\n [fullScreen]=\"fullScreen()\"\r\n [modal]=\"false\"\r\n [closable]=\"false\"\r\n [closeOnEscape]=\"closeOnEscape()\"\r\n [blockScroll]=\"blockScroll()\"\r\n [dismissible]=\"dismissible()\"\r\n [appendTo]=\"resolvedAppendTo()\"\r\n [transitionOptions]=\"transitionOptions()\"\r\n [styleClass]=\"resolvedStyleClass()\"\r\n (visibleChange)=\"visibleChangeEvent($event)\"\r\n (onShow)=\"onShowEvent()\"\r\n (onHide)=\"onHideEvent()\"\r\n>\r\n <ng-template #header>\r\n <div\r\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\r\n >\r\n @if (loadingHeader()) {\r\n <div class=\"flex flex-1 flex-col gap-2\">\r\n <p-skeleton width=\"12rem\" height=\"1.75rem\" borderRadius=\"0.5rem\" />\r\n <p-skeleton width=\"8rem\" height=\"0.875rem\" borderRadius=\"0.5rem\" />\r\n </div>\r\n } @else {\r\n <div class=\"flex flex-1 flex-col\">\r\n <h3 class=\"text-xl font-semibold\" [innerHTML]=\"title()\"></h3>\r\n @if (subtitle()) {\r\n <p class=\"text-sm text-surface-500\" [innerHTML]=\"subtitle()\"></p>\r\n }\r\n </div>\r\n }\r\n <div class=\"flex items-center gap-2\">\r\n @if (canShowMaximizeToggle()) {\r\n <mt-button\r\n (onClick)=\"toggleMaximized()\"\r\n variant=\"outlined\"\r\n styleClass=\"!bg-white\"\r\n severity=\"secondary\"\r\n [icon]=\"maximized() ? 'layout.minimize-01' : 'layout.maximize-01'\"\r\n [tooltip]=\"\r\n maximized() ? resolvedRestoreTooltip() : resolvedMaximizeTooltip()\r\n \"\r\n >\r\n </mt-button>\r\n }\r\n <mt-button\r\n (onClick)=\"onClose()\"\r\n variant=\"outlined\"\r\n styleClass=\"!bg-white\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n >\r\n </mt-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <ng-content select=\"[content]\"></ng-content>\r\n\r\n <ng-template #footer>\r\n <div class=\"flex justify-end p-3 gap-2 border-t border-surface-200\">\r\n <ng-content select=\"[footer]\"></ng-content>\r\n </div>\r\n </ng-template>\r\n</p-drawer>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MA2Ba,MAAM,CAAA;AACT,IAAA,OAAO,cAAc,GAAG,CAAC;AAChB,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACtC,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACpC,IAAA,mBAAmB,GAAG,CAAA,0BAAA,EAA6B,MAAM,CAAC,cAAc,EAAE,EAAE;IACrF,UAAU,GAAuB,IAAI;IACrC,uBAAuB,GAAwB,IAAI;IACnD,eAAe,GAAyC,IAAI;IACnD,iBAAiB,GAAG,wBAAwB;IAC5C,uBAAuB,GAAG,GAAG;AAC9C,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,8EAAC;IAC/B,aAAa,GAAG,MAAM,EAAW;IACjC,MAAM,GAAG,MAAM,EAAW;IAC1B,MAAM,GAAG,MAAM,EAAW;AAC1B,IAAA,QAAQ,GAAG,KAAK,CAAsC,OAAO,+EAAC;AAC9D,IAAA,UAAU,GAAG,KAAK,CAAU,KAAK,iFAAC;AAClC,IAAA,aAAa,GAAG,KAAK,CAAU,KAAK,oFAAC;AACrC,IAAA,WAAW,GAAG,KAAK,CAAU,IAAI,kFAAC;AAClC,IAAA,WAAW,GAAG,KAAK,CAAU,IAAI,kFAAC;AAClC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AACzB,IAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,+EAAC;AAC5B,IAAA,aAAa,GAAG,KAAK,CAAU,KAAK,oFAAC;AACrC,IAAA,UAAU,GAAG,KAAK,CAAS,EAAE,iFAAC;AAC9B,IAAA,iBA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