@masterteam/components 0.0.273 → 0.0.274
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/masterteam-components-entities.mjs +109 -6
- package/fesm2022/masterteam-components-entities.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 +3 -0
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-entities.d.ts +37 -1
|
@@ -379,7 +379,7 @@ class SelectField {
|
|
|
379
379
|
optionOrValue);
|
|
380
380
|
}
|
|
381
381
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SelectField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
382
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SelectField, isStandalone: true, selector: "mt-select-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hasPlaceholderPrefix: { classPropertyName: "hasPlaceholderPrefix", publicName: "hasPlaceholderPrefix", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", 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 }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, clearAfterSelect: { classPropertyName: "clearAfterSelect", publicName: "clearAfterSelect", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, optionIcon: { classPropertyName: "optionIcon", publicName: "optionIcon", isSignal: true, isRequired: false, transformFunction: null }, optionIconColor: { classPropertyName: "optionIconColor", publicName: "optionIconColor", isSignal: true, isRequired: false, transformFunction: null }, optionIconShape: { classPropertyName: "optionIconShape", publicName: "optionIconShape", isSignal: true, isRequired: false, transformFunction: null }, optionAvatarShape: { classPropertyName: "optionAvatarShape", publicName: "optionAvatarShape", isSignal: true, isRequired: false, transformFunction: null }, optionGroupIcon: { classPropertyName: "optionGroupIcon", publicName: "optionGroupIcon", isSignal: true, isRequired: false, transformFunction: null }, optionGroupIconColor: { classPropertyName: "optionGroupIconColor", publicName: "optionGroupIconColor", isSignal: true, isRequired: false, transformFunction: null }, optionGroupIconShape: { classPropertyName: "optionGroupIconShape", publicName: "optionGroupIconShape", isSignal: true, isRequired: false, transformFunction: null }, optionGroupAvatarShape: { classPropertyName: "optionGroupAvatarShape", publicName: "optionGroupAvatarShape", isSignal: true, isRequired: false, transformFunction: null }, markCurrentUser: { classPropertyName: "markCurrentUser", publicName: "markCurrentUser", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, host: { properties: { "class.gap-1": "label() || hint()", "class": "this.styleClass" }, classAttribute: "grid" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n (click)=\"dropdown.show(); dropdown.focus()\"\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<!-- `inputId` only, never `id`: PrimeNG puts `inputId` on the focusable inner\r\n input and `id` on the host, so binding both stamped one id onto two\r\n elements. That is invalid HTML, and `<label for>` then resolves to\r\n whichever comes first in the document. The label needs the input. -->\r\n<p-select\r\n #dropdown\r\n appendTo=\"body\"\r\n [overlayOptions]=\"{ baseZIndex: 1051 }\"\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n [options]=\"displayOptions()\"\r\n [optionLabel]=\"optionLabel()\"\r\n [optionValue]=\"optionValue()\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"fieldId\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [placeholder]=\"placeholder() || label() || ''\"\r\n [filter]=\"filter()\"\r\n [filterBy]=\"filterBy()\"\r\n [dataKey]=\"dataKey()\"\r\n [styleClass]=\"size() === 'small' ? ' mt-select-sm' : ''\"\r\n [showClear]=\"showClear()\"\r\n [group]=\"isGrouped()\"\r\n [optionGroupLabel]=\"optionGroupLabel()\"\r\n [optionGroupChildren]=\"optionGroupChildren()\"\r\n [loading]=\"loading()\"\r\n [fluid]=\"true\"\r\n [size]=\"pSelectSize()\"\r\n [panelStyleClass]=\"panelSizeClass()\"\r\n [panelStyle]=\"panelStyle()\"\r\n>\r\n <ng-template let-option #selectedItem>\r\n @if (option) {\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n </div>\r\n } @else {\r\n <span class=\"text-color-secondary\">{{\r\n placeholder() || label() || \"\"\r\n }}</span>\r\n }\r\n </ng-template>\r\n\r\n <ng-template let-option #item>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n @if (isCurrentUserOption(option)) {\r\n <span\r\n class=\"shrink-0 text-xs px-1.5 py-0.5 rounded bg-primary-100 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300 font-medium\"\r\n >\r\n {{ \"components.selectField.you\" | transloco }}\r\n </span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template let-group #group>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderGroupColorSwatch(group)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getGroupSwatchColor(group)\"\r\n ></span>\r\n } @else if (getGroupIcon(group)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getGroupAvatarBackground(group)\"\r\n [style.--p-avatar-color]=\"getGroupAvatarColor(group)\"\r\n [icon]=\"getGroupIcon(group)\"\r\n [shape]=\"getGroupAvatarShape(group)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate font-medium\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getGroupDisplayLabel(group) }}</span\r\n >\r\n </div>\r\n </ng-template>\r\n</p-select>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n", styles: [""], 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: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched", "messageId"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "pipe", type: i2.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
382
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SelectField, isStandalone: true, selector: "mt-select-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hasPlaceholderPrefix: { classPropertyName: "hasPlaceholderPrefix", publicName: "hasPlaceholderPrefix", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", 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 }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, clearAfterSelect: { classPropertyName: "clearAfterSelect", publicName: "clearAfterSelect", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, optionIcon: { classPropertyName: "optionIcon", publicName: "optionIcon", isSignal: true, isRequired: false, transformFunction: null }, optionIconColor: { classPropertyName: "optionIconColor", publicName: "optionIconColor", isSignal: true, isRequired: false, transformFunction: null }, optionIconShape: { classPropertyName: "optionIconShape", publicName: "optionIconShape", isSignal: true, isRequired: false, transformFunction: null }, optionAvatarShape: { classPropertyName: "optionAvatarShape", publicName: "optionAvatarShape", isSignal: true, isRequired: false, transformFunction: null }, optionGroupIcon: { classPropertyName: "optionGroupIcon", publicName: "optionGroupIcon", isSignal: true, isRequired: false, transformFunction: null }, optionGroupIconColor: { classPropertyName: "optionGroupIconColor", publicName: "optionGroupIconColor", isSignal: true, isRequired: false, transformFunction: null }, optionGroupIconShape: { classPropertyName: "optionGroupIconShape", publicName: "optionGroupIconShape", isSignal: true, isRequired: false, transformFunction: null }, optionGroupAvatarShape: { classPropertyName: "optionGroupAvatarShape", publicName: "optionGroupAvatarShape", isSignal: true, isRequired: false, transformFunction: null }, markCurrentUser: { classPropertyName: "markCurrentUser", publicName: "markCurrentUser", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, host: { properties: { "class.gap-1": "label() || hint()", "class": "this.styleClass" }, classAttribute: "grid" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n (click)=\"dropdown.show(); dropdown.focus()\"\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<!-- `inputId` only, never `id`: PrimeNG puts `inputId` on the focusable inner\r\n input and `id` on the host, so binding both stamped one id onto two\r\n elements. That is invalid HTML, and `<label for>` then resolves to\r\n whichever comes first in the document. The label needs the input. -->\r\n<p-select\r\n #dropdown\r\n appendTo=\"body\"\r\n [overlayOptions]=\"{ baseZIndex: 1051 }\"\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n [options]=\"displayOptions()\"\r\n [optionLabel]=\"optionLabel()\"\r\n [optionValue]=\"optionValue()\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"fieldId\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [placeholder]=\"placeholder() || label() || ''\"\r\n [filter]=\"filter()\"\r\n [filterBy]=\"filterBy()\"\r\n [dataKey]=\"dataKey()\"\r\n [styleClass]=\"size() === 'small' ? ' mt-select-sm' : ''\"\r\n [showClear]=\"showClear()\"\r\n [group]=\"isGrouped()\"\r\n [optionGroupLabel]=\"optionGroupLabel()\"\r\n [optionGroupChildren]=\"optionGroupChildren()\"\r\n [loading]=\"loading()\"\r\n [fluid]=\"true\"\r\n [size]=\"pSelectSize()\"\r\n [panelStyleClass]=\"panelSizeClass()\"\r\n [panelStyle]=\"panelStyle()\"\r\n>\r\n <ng-template let-option #selectedItem>\r\n @if (option) {\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n </div>\r\n } @else {\r\n <span class=\"text-color-secondary\">{{\r\n placeholder() || label() || \"\"\r\n }}</span>\r\n }\r\n </ng-template>\r\n\r\n <ng-template let-option #item>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n @if (isCurrentUserOption(option)) {\r\n <span\r\n class=\"shrink-0 text-xs px-1.5 py-0.5 rounded bg-primary-100 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300 font-medium\"\r\n >\r\n {{ \"components.selectField.you\" | transloco }}\r\n </span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template let-group #group>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderGroupColorSwatch(group)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getGroupSwatchColor(group)\"\r\n ></span>\r\n } @else if (getGroupIcon(group)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getGroupAvatarBackground(group)\"\r\n [style.--p-avatar-color]=\"getGroupAvatarColor(group)\"\r\n [icon]=\"getGroupIcon(group)\"\r\n [shape]=\"getGroupAvatarShape(group)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate font-medium\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getGroupDisplayLabel(group) }}</span\r\n >\r\n </div>\r\n </ng-template>\r\n</p-select>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n", styles: [":host{grid-template-columns:minmax(0,1fr)}\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: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: FieldValidation, selector: "mt-field-validation", inputs: ["control", "touched", "messageId"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: Avatar, selector: "mt-avatar", inputs: ["label", "icon", "image", "styleClass", "size", "shape", "badge", "badgeSize", "badgeSeverity"], outputs: ["onImageError"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "directive", type: TruncateTooltip, selector: "[mtTruncateTooltip]" }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "pipe", type: i2.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
383
383
|
}
|
|
384
384
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SelectField, decorators: [{
|
|
385
385
|
type: Component,
|
|
@@ -398,7 +398,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
398
398
|
// no hint that row is not rendered, so the gap becomes dead space under the
|
|
399
399
|
// control and knocks it out of vertical alignment with sibling fields.
|
|
400
400
|
'[class.gap-1]': 'label() || hint()',
|
|
401
|
-
}, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n (click)=\"dropdown.show(); dropdown.focus()\"\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<!-- `inputId` only, never `id`: PrimeNG puts `inputId` on the focusable inner\r\n input and `id` on the host, so binding both stamped one id onto two\r\n elements. That is invalid HTML, and `<label for>` then resolves to\r\n whichever comes first in the document. The label needs the input. -->\r\n<p-select\r\n #dropdown\r\n appendTo=\"body\"\r\n [overlayOptions]=\"{ baseZIndex: 1051 }\"\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n [options]=\"displayOptions()\"\r\n [optionLabel]=\"optionLabel()\"\r\n [optionValue]=\"optionValue()\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"fieldId\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [placeholder]=\"placeholder() || label() || ''\"\r\n [filter]=\"filter()\"\r\n [filterBy]=\"filterBy()\"\r\n [dataKey]=\"dataKey()\"\r\n [styleClass]=\"size() === 'small' ? ' mt-select-sm' : ''\"\r\n [showClear]=\"showClear()\"\r\n [group]=\"isGrouped()\"\r\n [optionGroupLabel]=\"optionGroupLabel()\"\r\n [optionGroupChildren]=\"optionGroupChildren()\"\r\n [loading]=\"loading()\"\r\n [fluid]=\"true\"\r\n [size]=\"pSelectSize()\"\r\n [panelStyleClass]=\"panelSizeClass()\"\r\n [panelStyle]=\"panelStyle()\"\r\n>\r\n <ng-template let-option #selectedItem>\r\n @if (option) {\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n </div>\r\n } @else {\r\n <span class=\"text-color-secondary\">{{\r\n placeholder() || label() || \"\"\r\n }}</span>\r\n }\r\n </ng-template>\r\n\r\n <ng-template let-option #item>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n @if (isCurrentUserOption(option)) {\r\n <span\r\n class=\"shrink-0 text-xs px-1.5 py-0.5 rounded bg-primary-100 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300 font-medium\"\r\n >\r\n {{ \"components.selectField.you\" | transloco }}\r\n </span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template let-group #group>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderGroupColorSwatch(group)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getGroupSwatchColor(group)\"\r\n ></span>\r\n } @else if (getGroupIcon(group)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getGroupAvatarBackground(group)\"\r\n [style.--p-avatar-color]=\"getGroupAvatarColor(group)\"\r\n [icon]=\"getGroupIcon(group)\"\r\n [shape]=\"getGroupAvatarShape(group)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate font-medium\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getGroupDisplayLabel(group) }}</span\r\n >\r\n </div>\r\n </ng-template>\r\n</p-select>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n" }]
|
|
401
|
+
}, template: "@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n (click)=\"dropdown.show(); dropdown.focus()\"\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<!-- `inputId` only, never `id`: PrimeNG puts `inputId` on the focusable inner\r\n input and `id` on the host, so binding both stamped one id onto two\r\n elements. That is invalid HTML, and `<label for>` then resolves to\r\n whichever comes first in the document. The label needs the input. -->\r\n<p-select\r\n #dropdown\r\n appendTo=\"body\"\r\n [overlayOptions]=\"{ baseZIndex: 1051 }\"\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n [options]=\"displayOptions()\"\r\n [optionLabel]=\"optionLabel()\"\r\n [optionValue]=\"optionValue()\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"fieldId\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [placeholder]=\"placeholder() || label() || ''\"\r\n [filter]=\"filter()\"\r\n [filterBy]=\"filterBy()\"\r\n [dataKey]=\"dataKey()\"\r\n [styleClass]=\"size() === 'small' ? ' mt-select-sm' : ''\"\r\n [showClear]=\"showClear()\"\r\n [group]=\"isGrouped()\"\r\n [optionGroupLabel]=\"optionGroupLabel()\"\r\n [optionGroupChildren]=\"optionGroupChildren()\"\r\n [loading]=\"loading()\"\r\n [fluid]=\"true\"\r\n [size]=\"pSelectSize()\"\r\n [panelStyleClass]=\"panelSizeClass()\"\r\n [panelStyle]=\"panelStyle()\"\r\n>\r\n <ng-template let-option #selectedItem>\r\n @if (option) {\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n </div>\r\n } @else {\r\n <span class=\"text-color-secondary\">{{\r\n placeholder() || label() || \"\"\r\n }}</span>\r\n }\r\n </ng-template>\r\n\r\n <ng-template let-option #item>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n @if (isCurrentUserOption(option)) {\r\n <span\r\n class=\"shrink-0 text-xs px-1.5 py-0.5 rounded bg-primary-100 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300 font-medium\"\r\n >\r\n {{ \"components.selectField.you\" | transloco }}\r\n </span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template let-group #group>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderGroupColorSwatch(group)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getGroupSwatchColor(group)\"\r\n ></span>\r\n } @else if (getGroupIcon(group)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getGroupAvatarBackground(group)\"\r\n [style.--p-avatar-color]=\"getGroupAvatarColor(group)\"\r\n [icon]=\"getGroupIcon(group)\"\r\n [shape]=\"getGroupAvatarShape(group)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate font-medium\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getGroupDisplayLabel(group) }}</span\r\n >\r\n </div>\r\n </ng-template>\r\n</p-select>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n", styles: [":host{grid-template-columns:minmax(0,1fr)}\n"] }]
|
|
402
402
|
}], ctorParameters: () => [], propDecorators: { dropdown: [{
|
|
403
403
|
type: ViewChild,
|
|
404
404
|
args: ['dropdown', { static: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masterteam-components-select-field.mjs","sources":["../../../../packages/masterteam/components/select-field/current-user.util.ts","../../../../packages/masterteam/components/select-field/select-field.ts","../../../../packages/masterteam/components/select-field/select-field.html","../../../../packages/masterteam/components/select-field/masterteam-components-select-field.ts"],"sourcesContent":["/**\r\n * Resolves the current authenticated user (id + displayName) from\r\n * `localStorage`, where the host application persists its NGXS `auth`\r\n * slice. Used by table filters to mark \"You\" on options that match the\r\n * logged-in user.\r\n *\r\n * The persisted shape can vary slightly between apps, so we look for the\r\n * id/displayName under a few well-known paths.\r\n */\r\nexport interface CurrentUserInfo {\r\n id?: string | number | null;\r\n displayName?: string | null;\r\n}\r\n\r\nexport function getCurrentUserFromLocalStorage(): CurrentUserInfo | null {\r\n if (typeof localStorage === 'undefined') {\r\n return null;\r\n }\r\n\r\n try {\r\n const raw = localStorage.getItem('auth');\r\n if (!raw) return null;\r\n\r\n const parsed = JSON.parse(raw) as Record<string, unknown> | null;\r\n if (!parsed || typeof parsed !== 'object') return null;\r\n\r\n const user =\r\n (parsed['user'] as Record<string, unknown> | undefined) ??\r\n ((parsed['state'] as Record<string, unknown> | undefined)?.['user'] as\r\n | Record<string, unknown>\r\n | undefined);\r\n if (!user || typeof user !== 'object') return null;\r\n\r\n const nested = user['user'] as Record<string, unknown> | undefined;\r\n\r\n const id =\r\n (user['id'] as string | number | undefined) ??\r\n (nested?.['id'] as string | number | undefined) ??\r\n (user['userId'] as string | number | undefined) ??\r\n null;\r\n\r\n const displayName =\r\n (user['displayName'] as string | undefined) ??\r\n (nested?.['displayName'] as string | undefined) ??\r\n (user['name'] as string | undefined) ??\r\n null;\r\n\r\n if (id == null && !displayName) return null;\r\n\r\n return { id, displayName };\r\n } catch {\r\n return null;\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n NgZone,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n signal,\r\n input,\r\n inject,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n effect,\r\n computed,\r\n} from '@angular/core';\r\n\r\nimport {\r\n ControlValueAccessor,\r\n FormsModule,\r\n NgControl,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { Select } from 'primeng/select';\r\nimport { FieldValidation } from '@masterteam/components/field-validation';\r\nimport { isInvalid, newFieldId } from '@masterteam/components';\r\nimport { TranslocoModule } from '@jsverse/transloco';\r\nimport { Avatar } from '@masterteam/components/avatar';\r\nimport { Tooltip, TruncateTooltip } from '@masterteam/components/tooltip';\r\nimport { Icon } from '@masterteam/icons';\r\nimport { getCurrentUserFromLocalStorage } from './current-user.util';\r\n\r\n/** Rendered in place of an option/group label that resolves to an empty value. */\r\nconst EMPTY_LABEL_PLACEHOLDER = '-';\r\n\r\n@Component({\r\n selector: 'mt-select-field',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n Select,\r\n FieldValidation,\r\n TranslocoModule,\r\n Avatar,\r\n Tooltip,\r\n TruncateTooltip,\r\n Icon,\r\n ],\r\n templateUrl: './select-field.html',\r\n styleUrls: ['./select-field.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'grid',\r\n // The gap only separates the label row from the control. With no label and\r\n // no hint that row is not rendered, so the gap becomes dead space under the\r\n // control and knocks it out of vertical alignment with sibling fields.\r\n '[class.gap-1]': 'label() || hint()',\r\n },\r\n})\r\nexport class SelectField\r\n implements ControlValueAccessor, OnInit, OnChanges, AfterViewInit\r\n{\r\n cdr = inject(ChangeDetectorRef);\r\n private el = inject(ElementRef);\r\n private zone = inject(NgZone);\r\n private destroyRef = inject(DestroyRef);\r\n\r\n @ViewChild('dropdown', { static: true })\r\n dropdown: Select;\r\n\r\n protected readonly panelStyle = signal<Record<string, string>>({});\r\n\r\n ngAfterViewInit(): void {\r\n this.zone.runOutsideAngular(() => {\r\n const ro = new ResizeObserver(() => {\r\n const width = this.el.nativeElement.offsetWidth;\r\n if (width > 0 && `${width}px` !== this.panelStyle()['width']) {\r\n this.panelStyle.set({ width: `${width}px` });\r\n }\r\n });\r\n ro.observe(this.el.nativeElement);\r\n this.destroyRef.onDestroy(() => ro.disconnect());\r\n });\r\n }\r\n\r\n readonly field = input<boolean>(true);\r\n readonly hint = input<string>();\r\n readonly label = input<string>('');\r\n\r\n /** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */\r\n readonly fieldId = newFieldId('mt-select-field');\r\n readonly placeholder = input<string>('');\r\n readonly hasPlaceholderPrefix = input<boolean>(true);\r\n readonly class = input<string>('');\r\n readonly readonly = input<boolean>(false);\r\n readonly pInputs = input<Partial<Select>>();\r\n readonly options = input<any[] | undefined>(undefined);\r\n readonly optionValue = input<string | undefined>(undefined);\r\n readonly optionLabel = input<string | undefined>(undefined);\r\n readonly filter = input<boolean | undefined>(undefined);\r\n readonly filterBy = input<string | undefined>(undefined);\r\n readonly dataKey = input<string | undefined>(undefined);\r\n readonly showClear = input<boolean | undefined>(undefined);\r\n readonly clearAfterSelect = input<boolean | undefined>(undefined);\r\n readonly required = input<boolean>(false); // Add readonly required input\r\n readonly group = input<boolean>(false);\r\n readonly size = input<'small' | 'large' | ''>('');\r\n\r\n readonly pSelectSize = computed(() => this.size() as 'small' | 'large' | '');\r\n\r\n readonly panelSizeClass = computed(() =>\r\n this.size() === 'small' ? 'mt-select-panel-small' : '',\r\n );\r\n readonly optionGroupLabel = input<string>('label');\r\n readonly optionGroupChildren = input<string>('items');\r\n readonly loading = input<boolean>(false);\r\n readonly optionIcon = input<string>('icon');\r\n readonly optionIconColor = input<string>('color');\r\n readonly optionIconShape = input<string>('shape');\r\n readonly optionAvatarShape = input<'circle' | 'square'>('square');\r\n readonly optionGroupIcon = input<string>('icon');\r\n readonly optionGroupIconColor = input<string>('color');\r\n readonly optionGroupIconShape = input<string>('shape');\r\n readonly optionGroupAvatarShape = input<'circle' | 'square'>('square');\r\n\r\n /**\r\n * When true, this select represents a user picker (e.g. a table filter for\r\n * a user column). The component reads the logged-in user from\r\n * `localStorage` and marks the matching option with a \"You\" badge.\r\n */\r\n readonly markCurrentUser = input<boolean>(false);\r\n\r\n protected readonly currentUser = computed(() =>\r\n this.markCurrentUser() ? getCurrentUserFromLocalStorage() : null,\r\n );\r\n\r\n /**\r\n * When `markCurrentUser` is on, hoist the option matching the current user\r\n * to the top of the list so it surfaces first in the dropdown.\r\n */\r\n protected readonly displayOptions = computed(() => {\r\n const options = this.options();\r\n if (!options?.length || !this.markCurrentUser() || !this.currentUser()) {\r\n return options;\r\n }\r\n\r\n const index = options.findIndex((option) =>\r\n this.isCurrentUserOption(option),\r\n );\r\n if (index <= 0) return options;\r\n\r\n const reordered = options.slice();\r\n const [currentUserOption] = reordered.splice(index, 1);\r\n reordered.unshift(currentUserOption);\r\n return reordered;\r\n });\r\n\r\n @Output() onChange: EventEmitter<any> = new EventEmitter();\r\n\r\n @HostBinding('class') styleClass: string;\r\n\r\n requiredValidator = Validators.required;\r\n value = signal<any>(null);\r\n disabled = signal<boolean>(false);\r\n\r\n onTouched: () => void = () => {};\r\n onModelChange: (value: any) => void = () => {};\r\n\r\n public ngControl: NgControl | null = null;\r\n\r\n isInvalid = isInvalid;\r\n\r\n constructor() {\r\n try {\r\n this.ngControl = inject(NgControl, { self: true, optional: true });\r\n if (this.ngControl) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n } catch {\r\n this.ngControl = null;\r\n }\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 });\r\n }\r\n\r\n applyInputsToDropdown() {\r\n // Object.assign(this.dropdown, this.pInputs());\r\n }\r\n\r\n ngOnInit() {\r\n this.styleClass = this.class();\r\n if (this.pInputs()) {\r\n this.applyInputsToDropdown();\r\n }\r\n }\r\n\r\n onValueChange(value: any) {\r\n this.onModelChange(value);\r\n this.value.set(value);\r\n this.onChange.emit(value);\r\n if (this.clearAfterSelect()) {\r\n this.clearSelection();\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes['pInputs']) {\r\n this.applyInputsToDropdown();\r\n }\r\n }\r\n\r\n writeValue(value: string) {\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 isGrouped(): boolean {\r\n return this.group();\r\n }\r\n\r\n // TODO: make this method work\r\n public clearSelection() {\r\n this.dropdown.clear(this.value());\r\n this.dropdown.value = null;\r\n this.value.set(null);\r\n this.onModelChange(null);\r\n this.onChange.emit(null);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n getOptionLabelValue(option: any): string {\r\n const resolvedOption = this.resolveOption(option);\r\n if (resolvedOption == null) return '';\r\n\r\n const labelKey = this.optionLabel();\r\n if (labelKey && typeof resolvedOption === 'object') {\r\n return this.resolveNestedValue(resolvedOption, labelKey) ?? '';\r\n }\r\n\r\n return typeof resolvedOption === 'object'\r\n ? (resolvedOption.label ?? '')\r\n : String(resolvedOption);\r\n }\r\n\r\n /**\r\n * Label used for rendering. Options whose label resolves to an empty string\r\n * would otherwise paint a blank, unreadable row, so they fall back to a dash.\r\n * Kept separate from {@link getOptionLabelValue} so value comparisons (e.g.\r\n * current-user matching) still see the real, empty label.\r\n */\r\n getOptionDisplayLabel(option: any): string {\r\n return this.getOptionLabelValue(option).trim() || EMPTY_LABEL_PLACEHOLDER;\r\n }\r\n\r\n getOptionIcon(option: any): string | undefined {\r\n const resolvedOption = this.resolveOption(option);\r\n if (!resolvedOption || typeof resolvedOption !== 'object') return undefined;\r\n return resolvedOption[this.optionIcon()];\r\n }\r\n\r\n shouldRenderOptionColorSwatch(option: any): boolean {\r\n return !!this.getOptionSwatchColor(option) && !this.getOptionIcon(option);\r\n }\r\n\r\n getOptionSwatchColor(option: any): string | null {\r\n return this.resolveDisplayColor(this.getOptionColor(option));\r\n }\r\n\r\n getOptionAvatarBackground(option: any): string | null {\r\n return this.getAvatarBackgroundByColor(this.getOptionColor(option));\r\n }\r\n\r\n getOptionAvatarColor(option: any): string | null {\r\n return this.getAvatarColorByColor(this.getOptionColor(option));\r\n }\r\n\r\n getOptionAvatarShape(option: any): 'circle' | 'square' {\r\n const resolvedOption = this.resolveOption(option);\r\n if (!resolvedOption || typeof resolvedOption !== 'object') {\r\n return this.normalizeAvatarShape(this.optionAvatarShape());\r\n }\r\n\r\n return this.normalizeAvatarShape(\r\n resolvedOption[this.optionIconShape()] ?? this.optionAvatarShape(),\r\n );\r\n }\r\n\r\n getGroupLabelValue(group: any): string {\r\n if (group == null) return '';\r\n\r\n const groupLabelKey = this.optionGroupLabel();\r\n if (groupLabelKey && typeof group === 'object') {\r\n return group[groupLabelKey] ?? '';\r\n }\r\n\r\n return typeof group === 'object' ? (group.label ?? '') : String(group);\r\n }\r\n\r\n getGroupDisplayLabel(group: any): string {\r\n return this.getGroupLabelValue(group).trim() || EMPTY_LABEL_PLACEHOLDER;\r\n }\r\n\r\n getGroupIcon(group: any): string | undefined {\r\n if (!group || typeof group !== 'object') return undefined;\r\n return group[this.optionGroupIcon()];\r\n }\r\n\r\n shouldRenderGroupColorSwatch(group: any): boolean {\r\n return !!this.getGroupSwatchColor(group) && !this.getGroupIcon(group);\r\n }\r\n\r\n getGroupSwatchColor(group: any): string | null {\r\n return this.resolveDisplayColor(this.getGroupColor(group));\r\n }\r\n\r\n getGroupAvatarBackground(group: any): string | null {\r\n return this.getAvatarBackgroundByColor(this.getGroupColor(group));\r\n }\r\n\r\n getGroupAvatarColor(group: any): string | null {\r\n return this.getAvatarColorByColor(this.getGroupColor(group));\r\n }\r\n\r\n getGroupAvatarShape(group: any): 'circle' | 'square' {\r\n if (!group || typeof group !== 'object') {\r\n return this.normalizeAvatarShape(this.optionGroupAvatarShape());\r\n }\r\n\r\n return this.normalizeAvatarShape(\r\n group[this.optionGroupIconShape()] ?? this.optionGroupAvatarShape(),\r\n );\r\n }\r\n\r\n private getOptionColor(option: any): string | undefined {\r\n const resolvedOption = this.resolveOption(option);\r\n if (!resolvedOption || typeof resolvedOption !== 'object') return undefined;\r\n return resolvedOption[this.optionIconColor()];\r\n }\r\n\r\n private getGroupColor(group: any): string | undefined {\r\n if (!group || typeof group !== 'object') return undefined;\r\n return group[this.optionGroupIconColor()];\r\n }\r\n\r\n private getAvatarBackgroundByColor(color: string | undefined): string | null {\r\n if (!color) return null;\r\n if (color.startsWith('#')) return `${color}1a`;\r\n return `var(--p-${color}-100)`;\r\n }\r\n\r\n private getAvatarColorByColor(color: string | undefined): string | null {\r\n if (!color) return null;\r\n if (color.startsWith('#')) return color;\r\n return `var(--p-${color}-600)`;\r\n }\r\n\r\n private resolveDisplayColor(color: string | undefined): string | null {\r\n if (!color) return null;\r\n if (\r\n color.startsWith('#') ||\r\n color.startsWith('rgb') ||\r\n color.startsWith('hsl') ||\r\n color.startsWith('var(')\r\n ) {\r\n return color;\r\n }\r\n\r\n return `var(--p-${color}-500)`;\r\n }\r\n\r\n private normalizeAvatarShape(shape: unknown): 'circle' | 'square' {\r\n return shape === 'square' ? 'square' : 'circle';\r\n }\r\n\r\n /**\r\n * Resolves a nested dot-notation path (e.g. \"name.display\") on an object.\r\n * Falls back to direct property access for non-nested keys.\r\n */\r\n private resolveNestedValue(obj: any, path: string): any {\r\n if (!path.includes('.')) {\r\n return obj[path];\r\n }\r\n return path.split('.').reduce((current, key) => current?.[key], obj);\r\n }\r\n\r\n isCurrentUserOption(option: any): boolean {\r\n const user = this.currentUser();\r\n if (!user) return false;\r\n\r\n const id = user.id;\r\n const displayName = user.displayName;\r\n if (id == null && !displayName) return false;\r\n\r\n const resolvedOption = this.resolveOption(option);\r\n if (resolvedOption == null) return false;\r\n\r\n const optionValueKey = this.optionValue();\r\n const value =\r\n optionValueKey && typeof resolvedOption === 'object'\r\n ? this.resolveNestedValue(resolvedOption, optionValueKey)\r\n : typeof resolvedOption === 'object'\r\n ? (resolvedOption.value ?? resolvedOption)\r\n : resolvedOption;\r\n\r\n if (id != null && value != null && String(value) === String(id)) {\r\n return true;\r\n }\r\n\r\n if (displayName) {\r\n const label = this.getOptionLabelValue(option);\r\n if (label && label === displayName) return true;\r\n if (value != null && String(value) === displayName) return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private resolveOption(optionOrValue: any): any {\r\n if (optionOrValue == null || typeof optionOrValue === 'object') {\r\n return optionOrValue;\r\n }\r\n\r\n const options = this.options() ?? [];\r\n const optionValueKey = this.optionValue();\r\n\r\n if (!optionValueKey) {\r\n return (\r\n options.find((option) => option === optionOrValue) ?? optionOrValue\r\n );\r\n }\r\n\r\n if (this.group()) {\r\n const groupChildrenKey = this.optionGroupChildren();\r\n for (const group of options) {\r\n const children = group?.[groupChildrenKey];\r\n if (!Array.isArray(children)) continue;\r\n\r\n const match = children.find(\r\n (item: any) => item?.[optionValueKey] === optionOrValue,\r\n );\r\n if (match) return match;\r\n }\r\n return optionOrValue;\r\n }\r\n\r\n return (\r\n options.find((option) => option?.[optionValueKey] === optionOrValue) ??\r\n optionOrValue\r\n );\r\n }\r\n}\r\n","@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n (click)=\"dropdown.show(); dropdown.focus()\"\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<!-- `inputId` only, never `id`: PrimeNG puts `inputId` on the focusable inner\r\n input and `id` on the host, so binding both stamped one id onto two\r\n elements. That is invalid HTML, and `<label for>` then resolves to\r\n whichever comes first in the document. The label needs the input. -->\r\n<p-select\r\n #dropdown\r\n appendTo=\"body\"\r\n [overlayOptions]=\"{ baseZIndex: 1051 }\"\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n [options]=\"displayOptions()\"\r\n [optionLabel]=\"optionLabel()\"\r\n [optionValue]=\"optionValue()\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"fieldId\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [placeholder]=\"placeholder() || label() || ''\"\r\n [filter]=\"filter()\"\r\n [filterBy]=\"filterBy()\"\r\n [dataKey]=\"dataKey()\"\r\n [styleClass]=\"size() === 'small' ? ' mt-select-sm' : ''\"\r\n [showClear]=\"showClear()\"\r\n [group]=\"isGrouped()\"\r\n [optionGroupLabel]=\"optionGroupLabel()\"\r\n [optionGroupChildren]=\"optionGroupChildren()\"\r\n [loading]=\"loading()\"\r\n [fluid]=\"true\"\r\n [size]=\"pSelectSize()\"\r\n [panelStyleClass]=\"panelSizeClass()\"\r\n [panelStyle]=\"panelStyle()\"\r\n>\r\n <ng-template let-option #selectedItem>\r\n @if (option) {\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n </div>\r\n } @else {\r\n <span class=\"text-color-secondary\">{{\r\n placeholder() || label() || \"\"\r\n }}</span>\r\n }\r\n </ng-template>\r\n\r\n <ng-template let-option #item>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n @if (isCurrentUserOption(option)) {\r\n <span\r\n class=\"shrink-0 text-xs px-1.5 py-0.5 rounded bg-primary-100 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300 font-medium\"\r\n >\r\n {{ \"components.selectField.you\" | transloco }}\r\n </span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template let-group #group>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderGroupColorSwatch(group)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getGroupSwatchColor(group)\"\r\n ></span>\r\n } @else if (getGroupIcon(group)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getGroupAvatarBackground(group)\"\r\n [style.--p-avatar-color]=\"getGroupAvatarColor(group)\"\r\n [icon]=\"getGroupIcon(group)\"\r\n [shape]=\"getGroupAvatarShape(group)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate font-medium\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getGroupDisplayLabel(group) }}</span\r\n >\r\n </div>\r\n </ng-template>\r\n</p-select>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;SAcgB,8BAA8B,GAAA;AAC5C,IAAA,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;AACvC,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,IAAI;QACF,MAAM,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC;AACxC,QAAA,IAAI,CAAC,GAAG;AAAE,Y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AAA,QAAA,EAAA,uuKAAA,EAAA;;sBAUA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;sBA0FtC;;sBAEA,WAAW;uBAAC,OAAO;;;AEpKtB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"masterteam-components-select-field.mjs","sources":["../../../../packages/masterteam/components/select-field/current-user.util.ts","../../../../packages/masterteam/components/select-field/select-field.ts","../../../../packages/masterteam/components/select-field/select-field.html","../../../../packages/masterteam/components/select-field/masterteam-components-select-field.ts"],"sourcesContent":["/**\r\n * Resolves the current authenticated user (id + displayName) from\r\n * `localStorage`, where the host application persists its NGXS `auth`\r\n * slice. Used by table filters to mark \"You\" on options that match the\r\n * logged-in user.\r\n *\r\n * The persisted shape can vary slightly between apps, so we look for the\r\n * id/displayName under a few well-known paths.\r\n */\r\nexport interface CurrentUserInfo {\r\n id?: string | number | null;\r\n displayName?: string | null;\r\n}\r\n\r\nexport function getCurrentUserFromLocalStorage(): CurrentUserInfo | null {\r\n if (typeof localStorage === 'undefined') {\r\n return null;\r\n }\r\n\r\n try {\r\n const raw = localStorage.getItem('auth');\r\n if (!raw) return null;\r\n\r\n const parsed = JSON.parse(raw) as Record<string, unknown> | null;\r\n if (!parsed || typeof parsed !== 'object') return null;\r\n\r\n const user =\r\n (parsed['user'] as Record<string, unknown> | undefined) ??\r\n ((parsed['state'] as Record<string, unknown> | undefined)?.['user'] as\r\n | Record<string, unknown>\r\n | undefined);\r\n if (!user || typeof user !== 'object') return null;\r\n\r\n const nested = user['user'] as Record<string, unknown> | undefined;\r\n\r\n const id =\r\n (user['id'] as string | number | undefined) ??\r\n (nested?.['id'] as string | number | undefined) ??\r\n (user['userId'] as string | number | undefined) ??\r\n null;\r\n\r\n const displayName =\r\n (user['displayName'] as string | undefined) ??\r\n (nested?.['displayName'] as string | undefined) ??\r\n (user['name'] as string | undefined) ??\r\n null;\r\n\r\n if (id == null && !displayName) return null;\r\n\r\n return { id, displayName };\r\n } catch {\r\n return null;\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n NgZone,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n signal,\r\n input,\r\n inject,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n effect,\r\n computed,\r\n} from '@angular/core';\r\n\r\nimport {\r\n ControlValueAccessor,\r\n FormsModule,\r\n NgControl,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { Select } from 'primeng/select';\r\nimport { FieldValidation } from '@masterteam/components/field-validation';\r\nimport { isInvalid, newFieldId } from '@masterteam/components';\r\nimport { TranslocoModule } from '@jsverse/transloco';\r\nimport { Avatar } from '@masterteam/components/avatar';\r\nimport { Tooltip, TruncateTooltip } from '@masterteam/components/tooltip';\r\nimport { Icon } from '@masterteam/icons';\r\nimport { getCurrentUserFromLocalStorage } from './current-user.util';\r\n\r\n/** Rendered in place of an option/group label that resolves to an empty value. */\r\nconst EMPTY_LABEL_PLACEHOLDER = '-';\r\n\r\n@Component({\r\n selector: 'mt-select-field',\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n Select,\r\n FieldValidation,\r\n TranslocoModule,\r\n Avatar,\r\n Tooltip,\r\n TruncateTooltip,\r\n Icon,\r\n ],\r\n templateUrl: './select-field.html',\r\n styleUrls: ['./select-field.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n class: 'grid',\r\n // The gap only separates the label row from the control. With no label and\r\n // no hint that row is not rendered, so the gap becomes dead space under the\r\n // control and knocks it out of vertical alignment with sibling fields.\r\n '[class.gap-1]': 'label() || hint()',\r\n },\r\n})\r\nexport class SelectField\r\n implements ControlValueAccessor, OnInit, OnChanges, AfterViewInit\r\n{\r\n cdr = inject(ChangeDetectorRef);\r\n private el = inject(ElementRef);\r\n private zone = inject(NgZone);\r\n private destroyRef = inject(DestroyRef);\r\n\r\n @ViewChild('dropdown', { static: true })\r\n dropdown: Select;\r\n\r\n protected readonly panelStyle = signal<Record<string, string>>({});\r\n\r\n ngAfterViewInit(): void {\r\n this.zone.runOutsideAngular(() => {\r\n const ro = new ResizeObserver(() => {\r\n const width = this.el.nativeElement.offsetWidth;\r\n if (width > 0 && `${width}px` !== this.panelStyle()['width']) {\r\n this.panelStyle.set({ width: `${width}px` });\r\n }\r\n });\r\n ro.observe(this.el.nativeElement);\r\n this.destroyRef.onDestroy(() => ro.disconnect());\r\n });\r\n }\r\n\r\n readonly field = input<boolean>(true);\r\n readonly hint = input<string>();\r\n readonly label = input<string>('');\r\n\r\n /** Unique; shared by the control and its <label for>. See src/lib/utils/field-id. */\r\n readonly fieldId = newFieldId('mt-select-field');\r\n readonly placeholder = input<string>('');\r\n readonly hasPlaceholderPrefix = input<boolean>(true);\r\n readonly class = input<string>('');\r\n readonly readonly = input<boolean>(false);\r\n readonly pInputs = input<Partial<Select>>();\r\n readonly options = input<any[] | undefined>(undefined);\r\n readonly optionValue = input<string | undefined>(undefined);\r\n readonly optionLabel = input<string | undefined>(undefined);\r\n readonly filter = input<boolean | undefined>(undefined);\r\n readonly filterBy = input<string | undefined>(undefined);\r\n readonly dataKey = input<string | undefined>(undefined);\r\n readonly showClear = input<boolean | undefined>(undefined);\r\n readonly clearAfterSelect = input<boolean | undefined>(undefined);\r\n readonly required = input<boolean>(false); // Add readonly required input\r\n readonly group = input<boolean>(false);\r\n readonly size = input<'small' | 'large' | ''>('');\r\n\r\n readonly pSelectSize = computed(() => this.size() as 'small' | 'large' | '');\r\n\r\n readonly panelSizeClass = computed(() =>\r\n this.size() === 'small' ? 'mt-select-panel-small' : '',\r\n );\r\n readonly optionGroupLabel = input<string>('label');\r\n readonly optionGroupChildren = input<string>('items');\r\n readonly loading = input<boolean>(false);\r\n readonly optionIcon = input<string>('icon');\r\n readonly optionIconColor = input<string>('color');\r\n readonly optionIconShape = input<string>('shape');\r\n readonly optionAvatarShape = input<'circle' | 'square'>('square');\r\n readonly optionGroupIcon = input<string>('icon');\r\n readonly optionGroupIconColor = input<string>('color');\r\n readonly optionGroupIconShape = input<string>('shape');\r\n readonly optionGroupAvatarShape = input<'circle' | 'square'>('square');\r\n\r\n /**\r\n * When true, this select represents a user picker (e.g. a table filter for\r\n * a user column). The component reads the logged-in user from\r\n * `localStorage` and marks the matching option with a \"You\" badge.\r\n */\r\n readonly markCurrentUser = input<boolean>(false);\r\n\r\n protected readonly currentUser = computed(() =>\r\n this.markCurrentUser() ? getCurrentUserFromLocalStorage() : null,\r\n );\r\n\r\n /**\r\n * When `markCurrentUser` is on, hoist the option matching the current user\r\n * to the top of the list so it surfaces first in the dropdown.\r\n */\r\n protected readonly displayOptions = computed(() => {\r\n const options = this.options();\r\n if (!options?.length || !this.markCurrentUser() || !this.currentUser()) {\r\n return options;\r\n }\r\n\r\n const index = options.findIndex((option) =>\r\n this.isCurrentUserOption(option),\r\n );\r\n if (index <= 0) return options;\r\n\r\n const reordered = options.slice();\r\n const [currentUserOption] = reordered.splice(index, 1);\r\n reordered.unshift(currentUserOption);\r\n return reordered;\r\n });\r\n\r\n @Output() onChange: EventEmitter<any> = new EventEmitter();\r\n\r\n @HostBinding('class') styleClass: string;\r\n\r\n requiredValidator = Validators.required;\r\n value = signal<any>(null);\r\n disabled = signal<boolean>(false);\r\n\r\n onTouched: () => void = () => {};\r\n onModelChange: (value: any) => void = () => {};\r\n\r\n public ngControl: NgControl | null = null;\r\n\r\n isInvalid = isInvalid;\r\n\r\n constructor() {\r\n try {\r\n this.ngControl = inject(NgControl, { self: true, optional: true });\r\n if (this.ngControl) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n } catch {\r\n this.ngControl = null;\r\n }\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 });\r\n }\r\n\r\n applyInputsToDropdown() {\r\n // Object.assign(this.dropdown, this.pInputs());\r\n }\r\n\r\n ngOnInit() {\r\n this.styleClass = this.class();\r\n if (this.pInputs()) {\r\n this.applyInputsToDropdown();\r\n }\r\n }\r\n\r\n onValueChange(value: any) {\r\n this.onModelChange(value);\r\n this.value.set(value);\r\n this.onChange.emit(value);\r\n if (this.clearAfterSelect()) {\r\n this.clearSelection();\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes['pInputs']) {\r\n this.applyInputsToDropdown();\r\n }\r\n }\r\n\r\n writeValue(value: string) {\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 isGrouped(): boolean {\r\n return this.group();\r\n }\r\n\r\n // TODO: make this method work\r\n public clearSelection() {\r\n this.dropdown.clear(this.value());\r\n this.dropdown.value = null;\r\n this.value.set(null);\r\n this.onModelChange(null);\r\n this.onChange.emit(null);\r\n this.cdr.detectChanges();\r\n }\r\n\r\n getOptionLabelValue(option: any): string {\r\n const resolvedOption = this.resolveOption(option);\r\n if (resolvedOption == null) return '';\r\n\r\n const labelKey = this.optionLabel();\r\n if (labelKey && typeof resolvedOption === 'object') {\r\n return this.resolveNestedValue(resolvedOption, labelKey) ?? '';\r\n }\r\n\r\n return typeof resolvedOption === 'object'\r\n ? (resolvedOption.label ?? '')\r\n : String(resolvedOption);\r\n }\r\n\r\n /**\r\n * Label used for rendering. Options whose label resolves to an empty string\r\n * would otherwise paint a blank, unreadable row, so they fall back to a dash.\r\n * Kept separate from {@link getOptionLabelValue} so value comparisons (e.g.\r\n * current-user matching) still see the real, empty label.\r\n */\r\n getOptionDisplayLabel(option: any): string {\r\n return this.getOptionLabelValue(option).trim() || EMPTY_LABEL_PLACEHOLDER;\r\n }\r\n\r\n getOptionIcon(option: any): string | undefined {\r\n const resolvedOption = this.resolveOption(option);\r\n if (!resolvedOption || typeof resolvedOption !== 'object') return undefined;\r\n return resolvedOption[this.optionIcon()];\r\n }\r\n\r\n shouldRenderOptionColorSwatch(option: any): boolean {\r\n return !!this.getOptionSwatchColor(option) && !this.getOptionIcon(option);\r\n }\r\n\r\n getOptionSwatchColor(option: any): string | null {\r\n return this.resolveDisplayColor(this.getOptionColor(option));\r\n }\r\n\r\n getOptionAvatarBackground(option: any): string | null {\r\n return this.getAvatarBackgroundByColor(this.getOptionColor(option));\r\n }\r\n\r\n getOptionAvatarColor(option: any): string | null {\r\n return this.getAvatarColorByColor(this.getOptionColor(option));\r\n }\r\n\r\n getOptionAvatarShape(option: any): 'circle' | 'square' {\r\n const resolvedOption = this.resolveOption(option);\r\n if (!resolvedOption || typeof resolvedOption !== 'object') {\r\n return this.normalizeAvatarShape(this.optionAvatarShape());\r\n }\r\n\r\n return this.normalizeAvatarShape(\r\n resolvedOption[this.optionIconShape()] ?? this.optionAvatarShape(),\r\n );\r\n }\r\n\r\n getGroupLabelValue(group: any): string {\r\n if (group == null) return '';\r\n\r\n const groupLabelKey = this.optionGroupLabel();\r\n if (groupLabelKey && typeof group === 'object') {\r\n return group[groupLabelKey] ?? '';\r\n }\r\n\r\n return typeof group === 'object' ? (group.label ?? '') : String(group);\r\n }\r\n\r\n getGroupDisplayLabel(group: any): string {\r\n return this.getGroupLabelValue(group).trim() || EMPTY_LABEL_PLACEHOLDER;\r\n }\r\n\r\n getGroupIcon(group: any): string | undefined {\r\n if (!group || typeof group !== 'object') return undefined;\r\n return group[this.optionGroupIcon()];\r\n }\r\n\r\n shouldRenderGroupColorSwatch(group: any): boolean {\r\n return !!this.getGroupSwatchColor(group) && !this.getGroupIcon(group);\r\n }\r\n\r\n getGroupSwatchColor(group: any): string | null {\r\n return this.resolveDisplayColor(this.getGroupColor(group));\r\n }\r\n\r\n getGroupAvatarBackground(group: any): string | null {\r\n return this.getAvatarBackgroundByColor(this.getGroupColor(group));\r\n }\r\n\r\n getGroupAvatarColor(group: any): string | null {\r\n return this.getAvatarColorByColor(this.getGroupColor(group));\r\n }\r\n\r\n getGroupAvatarShape(group: any): 'circle' | 'square' {\r\n if (!group || typeof group !== 'object') {\r\n return this.normalizeAvatarShape(this.optionGroupAvatarShape());\r\n }\r\n\r\n return this.normalizeAvatarShape(\r\n group[this.optionGroupIconShape()] ?? this.optionGroupAvatarShape(),\r\n );\r\n }\r\n\r\n private getOptionColor(option: any): string | undefined {\r\n const resolvedOption = this.resolveOption(option);\r\n if (!resolvedOption || typeof resolvedOption !== 'object') return undefined;\r\n return resolvedOption[this.optionIconColor()];\r\n }\r\n\r\n private getGroupColor(group: any): string | undefined {\r\n if (!group || typeof group !== 'object') return undefined;\r\n return group[this.optionGroupIconColor()];\r\n }\r\n\r\n private getAvatarBackgroundByColor(color: string | undefined): string | null {\r\n if (!color) return null;\r\n if (color.startsWith('#')) return `${color}1a`;\r\n return `var(--p-${color}-100)`;\r\n }\r\n\r\n private getAvatarColorByColor(color: string | undefined): string | null {\r\n if (!color) return null;\r\n if (color.startsWith('#')) return color;\r\n return `var(--p-${color}-600)`;\r\n }\r\n\r\n private resolveDisplayColor(color: string | undefined): string | null {\r\n if (!color) return null;\r\n if (\r\n color.startsWith('#') ||\r\n color.startsWith('rgb') ||\r\n color.startsWith('hsl') ||\r\n color.startsWith('var(')\r\n ) {\r\n return color;\r\n }\r\n\r\n return `var(--p-${color}-500)`;\r\n }\r\n\r\n private normalizeAvatarShape(shape: unknown): 'circle' | 'square' {\r\n return shape === 'square' ? 'square' : 'circle';\r\n }\r\n\r\n /**\r\n * Resolves a nested dot-notation path (e.g. \"name.display\") on an object.\r\n * Falls back to direct property access for non-nested keys.\r\n */\r\n private resolveNestedValue(obj: any, path: string): any {\r\n if (!path.includes('.')) {\r\n return obj[path];\r\n }\r\n return path.split('.').reduce((current, key) => current?.[key], obj);\r\n }\r\n\r\n isCurrentUserOption(option: any): boolean {\r\n const user = this.currentUser();\r\n if (!user) return false;\r\n\r\n const id = user.id;\r\n const displayName = user.displayName;\r\n if (id == null && !displayName) return false;\r\n\r\n const resolvedOption = this.resolveOption(option);\r\n if (resolvedOption == null) return false;\r\n\r\n const optionValueKey = this.optionValue();\r\n const value =\r\n optionValueKey && typeof resolvedOption === 'object'\r\n ? this.resolveNestedValue(resolvedOption, optionValueKey)\r\n : typeof resolvedOption === 'object'\r\n ? (resolvedOption.value ?? resolvedOption)\r\n : resolvedOption;\r\n\r\n if (id != null && value != null && String(value) === String(id)) {\r\n return true;\r\n }\r\n\r\n if (displayName) {\r\n const label = this.getOptionLabelValue(option);\r\n if (label && label === displayName) return true;\r\n if (value != null && String(value) === displayName) return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private resolveOption(optionOrValue: any): any {\r\n if (optionOrValue == null || typeof optionOrValue === 'object') {\r\n return optionOrValue;\r\n }\r\n\r\n const options = this.options() ?? [];\r\n const optionValueKey = this.optionValue();\r\n\r\n if (!optionValueKey) {\r\n return (\r\n options.find((option) => option === optionOrValue) ?? optionOrValue\r\n );\r\n }\r\n\r\n if (this.group()) {\r\n const groupChildrenKey = this.optionGroupChildren();\r\n for (const group of options) {\r\n const children = group?.[groupChildrenKey];\r\n if (!Array.isArray(children)) continue;\r\n\r\n const match = children.find(\r\n (item: any) => item?.[optionValueKey] === optionOrValue,\r\n );\r\n if (match) return match;\r\n }\r\n return optionOrValue;\r\n }\r\n\r\n return (\r\n options.find((option) => option?.[optionValueKey] === optionOrValue) ??\r\n optionOrValue\r\n );\r\n }\r\n}\r\n","@if (label() || hint()) {\r\n <div class=\"flex items-center gap-1\">\r\n @if (label()) {\r\n <label\r\n (click)=\"dropdown.show(); dropdown.focus()\"\r\n [class.required]=\"ngControl?.control?.hasValidator(requiredValidator)\"\r\n [for]=\"fieldId\"\r\n >{{ label() }}</label\r\n >\r\n }\r\n @if (hint()) {\r\n <span\r\n class=\"inline-flex text-surface-400\"\r\n [mtTooltip]=\"hint()\"\r\n tooltipPosition=\"top\"\r\n >\r\n <mt-icon icon=\"general.help-circle\" />\r\n </span>\r\n }\r\n </div>\r\n}\r\n<!-- `inputId` only, never `id`: PrimeNG puts `inputId` on the focusable inner\r\n input and `id` on the host, so binding both stamped one id onto two\r\n elements. That is invalid HTML, and `<label for>` then resolves to\r\n whichever comes first in the document. The label needs the input. -->\r\n<p-select\r\n #dropdown\r\n appendTo=\"body\"\r\n [overlayOptions]=\"{ baseZIndex: 1051 }\"\r\n [ngModel]=\"value()\"\r\n (ngModelChange)=\"onValueChange($event)\"\r\n [options]=\"displayOptions()\"\r\n [optionLabel]=\"optionLabel()\"\r\n [optionValue]=\"optionValue()\"\r\n (onBlur)=\"onTouched()\"\r\n [disabled]=\"disabled() || readonly()\"\r\n [inputId]=\"fieldId\"\r\n [invalid]=\"isInvalid(ngControl?.control)\"\r\n [placeholder]=\"placeholder() || label() || ''\"\r\n [filter]=\"filter()\"\r\n [filterBy]=\"filterBy()\"\r\n [dataKey]=\"dataKey()\"\r\n [styleClass]=\"size() === 'small' ? ' mt-select-sm' : ''\"\r\n [showClear]=\"showClear()\"\r\n [group]=\"isGrouped()\"\r\n [optionGroupLabel]=\"optionGroupLabel()\"\r\n [optionGroupChildren]=\"optionGroupChildren()\"\r\n [loading]=\"loading()\"\r\n [fluid]=\"true\"\r\n [size]=\"pSelectSize()\"\r\n [panelStyleClass]=\"panelSizeClass()\"\r\n [panelStyle]=\"panelStyle()\"\r\n>\r\n <ng-template let-option #selectedItem>\r\n @if (option) {\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n </div>\r\n } @else {\r\n <span class=\"text-color-secondary\">{{\r\n placeholder() || label() || \"\"\r\n }}</span>\r\n }\r\n </ng-template>\r\n\r\n <ng-template let-option #item>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderOptionColorSwatch(option)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getOptionSwatchColor(option)\"\r\n ></span>\r\n } @else if (getOptionIcon(option)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getOptionAvatarBackground(option)\"\r\n [style.--p-avatar-color]=\"getOptionAvatarColor(option)\"\r\n [icon]=\"getOptionIcon(option)\"\r\n [shape]=\"getOptionAvatarShape(option)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getOptionDisplayLabel(option) }}</span\r\n >\r\n @if (isCurrentUserOption(option)) {\r\n <span\r\n class=\"shrink-0 text-xs px-1.5 py-0.5 rounded bg-primary-100 text-primary-700 dark:bg-primary-900/40 dark:text-primary-300 font-medium\"\r\n >\r\n {{ \"components.selectField.you\" | transloco }}\r\n </span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template let-group #group>\r\n <div class=\"flex items-center gap-2 overflow-hidden\">\r\n @if (shouldRenderGroupColorSwatch(group)) {\r\n <span\r\n class=\"h-3 w-3 shrink-0 rounded-[4px] border border-surface-300\"\r\n [style.backgroundColor]=\"getGroupSwatchColor(group)\"\r\n ></span>\r\n } @else if (getGroupIcon(group)) {\r\n <mt-avatar\r\n [style.--p-avatar-background]=\"getGroupAvatarBackground(group)\"\r\n [style.--p-avatar-color]=\"getGroupAvatarColor(group)\"\r\n [icon]=\"getGroupIcon(group)\"\r\n [shape]=\"getGroupAvatarShape(group)\"\r\n size=\"normal\"\r\n />\r\n }\r\n <span\r\n class=\"min-w-0 flex-1 truncate font-medium\"\r\n mtTruncateTooltip\r\n tooltipPosition=\"top\"\r\n >{{ getGroupDisplayLabel(group) }}</span\r\n >\r\n </div>\r\n </ng-template>\r\n</p-select>\r\n\r\n@if (ngControl) {\r\n <mt-field-validation [control]=\"ngControl?.control\"></mt-field-validation>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;SAcgB,8BAA8B,GAAA;AAC5C,IAAA,IAAI,OAAO,YAAY,KAAK,WAAW,EAAE;AACvC,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,IAAI;QACF,MAAM,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC;AACxC,QAAA,IAAI,CAAC,GAAG;AAAE,YAAA,OAAO,IAAI;QAErB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAmC;AAChE,QAAA,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ;AAAE,YAAA,OAAO,IAAI;AAEtD,QAAA,MAAM,IAAI,GACP,MAAM,CAAC,MAAM,CAAyC;AACrD,YAAA,MAAM,CAAC,OAAO,CAAyC,GAAG,MAAM,CAEpD;AAChB,QAAA,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;AAAE,YAAA,OAAO,IAAI;AAElD,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAwC;AAElE,QAAA,MAAM,EAAE,GACL,IAAI,CAAC,IAAI,CAAiC;YAC1C,MAAM,GAAG,IAAI,CAAiC;YAC9C,IAAI,CAAC,QAAQ,CAAiC;AAC/C,YAAA,IAAI;AAEN,Q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QAAA,EAAA,aAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACP,eAAe,gEACf,IAAI,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAaK,WAAW,EAAA,UAAA,EAAA,CAAA;kBAxBvB,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP;wBACP,WAAW;wBACX,MAAM;wBACN,eAAe;wBACf,eAAe;wBACf,MAAM;wBACN,OAAO;wBACP,eAAe;wBACf,IAAI;qBACL,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,MAAM;;;;AAIb,wBAAA,eAAe,EAAE,mBAAmB;AACrC,qBAAA,EAAA,QAAA,EAAA,uuKAAA,EAAA,MAAA,EAAA,CAAA,8CAAA,CAAA,EAAA;;sBAUA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;sBA0FtC;;sBAEA,WAAW;uBAAC,OAAO;;;AEpKtB;;AAEG;;;;"}
|
|
@@ -451,6 +451,9 @@ class TableValueResolver {
|
|
|
451
451
|
.toLowerCase()
|
|
452
452
|
.includes(String(filterValue).trim().toLowerCase());
|
|
453
453
|
}
|
|
454
|
+
if (filterType === 'text' && typeof filterValue === 'string') {
|
|
455
|
+
return TableValueResolver.matchesSearchTerm(itemValue, filterValue.trim().toLowerCase());
|
|
456
|
+
}
|
|
454
457
|
return normalizedFilterValue === filterValue;
|
|
455
458
|
}
|
|
456
459
|
/**
|