@agorapulse/ui-components 17.2.6 → 17.2.7-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/avatar/avatar.component.d.ts +63 -41
- package/esm2022/autocomplete/autocomplete.component.mjs +2 -2
- package/esm2022/avatar/avatar.component.mjs +105 -159
- package/esm2022/form-message/form-message.component.mjs +1 -1
- package/esm2022/infobox/infobox.component.mjs +1 -1
- package/esm2022/legacy/input/input.component.mjs +2 -2
- package/esm2022/legacy/select/select.component.mjs +2 -2
- package/esm2022/select/dropdown-item-multiple-one-line/dropdown-item-multiple-one-line.component.mjs +2 -2
- package/esm2022/select/dropdown-item-multiple-two-lines/dropdown-item-multiple-two-lines.component.mjs +2 -2
- package/esm2022/select/dropdown-item-single-one-line/dropdown-item-single-one-line.component.mjs +2 -2
- package/esm2022/select/dropdown-item-single-two-lines/dropdown-item-single-two-lines.component.mjs +2 -2
- package/esm2022/select/select-base.directive.mjs +1 -1
- package/esm2022/select/select-label-multiple/select-label-multiple.component.mjs +5 -4
- package/esm2022/select/select-label-single/select-label-single.component.mjs +1 -1
- package/esm2022/snackbars-thread/utils/const/snackbars-thread.const.mjs +1 -1
- package/esm2022/social-button/social-button.component.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-avatar.mjs +104 -158
- package/fesm2022/agorapulse-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-form-message.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-infobox.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-select.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-select.mjs +9 -8
- package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-social-button.mjs.map +1 -1
- package/form-message/form-message.component.d.ts +2 -1
- package/infobox/infobox.component.d.ts +2 -2
- package/legacy/input/input.component.d.ts +2 -2
- package/package.json +78 -78
- package/select/dropdown-item-multiple-one-line/dropdown-item-multiple-one-line.component.d.ts +2 -1
- package/select/dropdown-item-multiple-two-lines/dropdown-item-multiple-two-lines.component.d.ts +2 -1
- package/select/dropdown-item-single-one-line/dropdown-item-single-one-line.component.d.ts +2 -1
- package/select/dropdown-item-single-two-lines/dropdown-item-single-two-lines.component.d.ts +2 -1
- package/select/select-base.directive.d.ts +2 -1
- package/select/select-label-multiple/select-label-multiple.component.d.ts +3 -2
- package/snackbars-thread/component/snackbars-thread.component.d.ts +1 -1
- package/snackbars-thread/utils/const/snackbars-thread.const.d.ts +2 -2
- package/social-button/social-button.component.d.ts +2 -2
- package/agorapulse-ui-components-17.2.6.tgz +0 -0
|
@@ -76,7 +76,7 @@ class AutocompleteComponent {
|
|
|
76
76
|
this.resultsLoadingSignal.set(false);
|
|
77
77
|
}
|
|
78
78
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: AutocompleteComponent, isStandalone: true, selector: "ap-autocomplete", inputs: { placeholder: "placeholder", label: "label", inputId: "inputId", loadingText: "loadingText", notFoundText: "notFoundText", searchFn: "searchFn", trackByFn: "trackByFn", disabled: "disabled", optionLabel: "optionLabel", optionCaption: "optionCaption", optionImageUrl: "optionImageUrl", optionValue: "optionValue", optionTextTemplate: "optionTextTemplate" }, outputs: { selectOption: "selectOption" }, viewQueries: [{ propertyName: "formField", first: true, predicate: ["formField"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"input-autocomplete-wrapper\">\n <ap-form-field\n #formField\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin>\n <label [for]=\"inputId\">\n {{ label }}\n </label>\n <ap-input-group>\n <ap-symbol symbolId=\"search\" />\n <input\n apInput\n [id]=\"inputId\"\n [disabled]=\"disabledSignal()\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"searchTermSignal()\"\n (ngModelChange)=\"searchTerm$.next($event)\" />\n </ap-input-group>\n </ap-form-field>\n <div class=\"search-results-wrapper\">\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayWidth]=\"inputWidthSignal()\"\n [cdkConnectedOverlayOpen]=\"showResultsSignal()\">\n <div class=\"ap-autocomplete-search-results\">\n @if (resultsLoadingSignal()) {\n <div class=\"ap-autocomplete-search-results-loading\">\n <ap-loader [diameter]=\"30\" />\n <span class=\"search-results-loading-label\">{{ loadingText }}</span>\n </div>\n } @else {\n @if (searchResultsSignal()?.length) {\n @for (option of searchResultsSignal(); track trackByFn($index, option)) {\n <div\n class=\"ap-autocomplete-search-results-item\"\n tabindex=\"0\"\n (keydown.enter)=\"onSelectOption(option)\"\n (click)=\"onSelectOption(option)\">\n @if (!optionTextTemplate) {\n @if (!optionLabel || !option[optionLabel]) {\n <div class=\"option\">\n <span\n class=\"option-item\"\n [title]=\"option\">\n {{ option }}\n </span>\n </div>\n }\n @if (optionLabel && option[optionLabel]) {\n <div\n class=\"option\"\n [class.with-caption]=\"optionLabel && optionCaption && option[optionCaption]\">\n @if (!optionLabel) {\n <span class=\"item\">\n {{ option }}\n </span>\n }\n @if (optionImageUrl) {\n <ap-avatar\n [size]=\"24\"\n [showInitials]=\"true\"\n [username]=\"optionLabel ? option[optionLabel] : option\"\n [profilePicture]=\"option[optionImageUrl]\" />\n }\n @if (optionLabel && option[optionLabel]) {\n <div class=\"texts\">\n <div class=\"first-line\">\n <span\n class=\"label\"\n [title]=\"option[optionLabel]\">\n {{ option[optionLabel] }}\n </span>\n </div>\n @if (optionCaption && option[optionCaption]) {\n <span\n class=\"caption\"\n [title]=\"option[optionCaption]\">\n {{ option[optionCaption] }}\n </span>\n }\n </div>\n }\n </div>\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"optionTextTemplate; context: { option: option }\" />\n }\n </div>\n }\n } @else {\n <div class=\"ap-autocomplete-search-results-not-found\">\n {{ notFoundText }}\n </div>\n }\n }\n </div>\n </ng-template>\n </div>\n</div>\n", styles: ["ap-autocomplete{display:block}ap-autocomplete .input-autocomplete-wrapper{display:flex;flex-direction:column}ap-autocomplete .search-results-wrapper{position:relative}.ap-autocomplete-search-results{width:100%;display:flex;flex-direction:column;border-radius:var(--ref-border-radius-sm);box-shadow:var(--comp-select-shadow);padding:var(--comp-select-padding-vertical) 0;background-color:var(--comp-select-background-color);margin-top:var(--ref-spacing-xxxs);max-height:250px;overflow:auto}.ap-autocomplete-search-results-loading{display:flex;padding:var(--ref-spacing-sm) 0;flex-direction:column;justify-content:center;align-items:center;gap:var(--ref-spacing-xs)}.ap-autocomplete-search-results-loading .search-results-loading-label{font-style:italic;font-size:var(--ref-font-size-sm);color:var(--ref-color-grey-80)}.ap-autocomplete-search-results-not-found{padding:var(--ref-spacing-xs) var(--ref-spacing-sm);font-style:italic;font-size:var(--ref-font-size-sm);color:var(--ref-color-grey-80);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ap-autocomplete-search-results-item{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm)}.ap-autocomplete-search-results-item .option{display:flex;align-items:center;font-size:var(--comp-select-one-line-text-size);font-weight:var(--comp-select-one-line-text-font-weight);color:var(--comp-select-one-line-text-color);line-height:var(--comp-select-one-line-text-line-height);font-family:var(--comp-select-one-line-text-font-family);gap:var(--ref-spacing-xs);min-height:24px}.ap-autocomplete-search-results-item .option .option-item{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ap-autocomplete-search-results-item .option .texts{flex:1;overflow:auto}.ap-autocomplete-search-results-item .option .texts .first-line{display:flex}.ap-autocomplete-search-results-item .option .texts .label{display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.ap-autocomplete-search-results-item .option.with-caption .texts{display:flex;flex-direction:column}.ap-autocomplete-search-results-item .option.with-caption .texts .label{color:var(--comp-select-two-line-title-text-color);font-size:var(--comp-select-two-line-title-text-size);line-height:var(--comp-select-two-line-title-text-line-height);font-weight:var(--comp-select-two-line-title-text-font-weight)}.ap-autocomplete-search-results-item .option.with-caption .texts .caption{color:var(--comp-select-two-line-caption-text-color);font-size:var(--comp-select-two-line-caption-text-size);line-height:var(--comp-select-two-line-caption-text-line-height);font-weight:var(--comp-select-two-line-caption-text-font-weight);display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.ap-autocomplete-search-results-item:hover{cursor:pointer;background-color:var(--ref-color-electric-blue-10)}.ap-autocomplete-search-results-item:active{background-color:var(--ref-color-electric-blue-20)}.ap-autocomplete-search-results-item:focus{background-color:var(--ref-color-electric-blue-20)}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }, { kind: "component", type: FormFieldComponent, selector: "ap-form-field" }, { kind: "component", type: InputGroupComponent, selector: "ap-input-group", inputs: ["symbolPosition"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: LoaderComponent, selector: "ap-loader", inputs: ["color", "diameter"] }, { kind: "directive", type: InputDirective, selector: "[apInput]" }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["alternativeText", "anonymous", "username", "network", "online", "profilePicture", "showInitials", "alt", "rounded", "size"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: AutocompleteComponent, isStandalone: true, selector: "ap-autocomplete", inputs: { placeholder: "placeholder", label: "label", inputId: "inputId", loadingText: "loadingText", notFoundText: "notFoundText", searchFn: "searchFn", trackByFn: "trackByFn", disabled: "disabled", optionLabel: "optionLabel", optionCaption: "optionCaption", optionImageUrl: "optionImageUrl", optionValue: "optionValue", optionTextTemplate: "optionTextTemplate" }, outputs: { selectOption: "selectOption" }, viewQueries: [{ propertyName: "formField", first: true, predicate: ["formField"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"input-autocomplete-wrapper\">\n <ap-form-field\n #formField\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin>\n <label [for]=\"inputId\">\n {{ label }}\n </label>\n <ap-input-group>\n <ap-symbol symbolId=\"search\" />\n <input\n apInput\n [id]=\"inputId\"\n [disabled]=\"disabledSignal()\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"searchTermSignal()\"\n (ngModelChange)=\"searchTerm$.next($event)\" />\n </ap-input-group>\n </ap-form-field>\n <div class=\"search-results-wrapper\">\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayWidth]=\"inputWidthSignal()\"\n [cdkConnectedOverlayOpen]=\"showResultsSignal()\">\n <div class=\"ap-autocomplete-search-results\">\n @if (resultsLoadingSignal()) {\n <div class=\"ap-autocomplete-search-results-loading\">\n <ap-loader [diameter]=\"30\" />\n <span class=\"search-results-loading-label\">{{ loadingText }}</span>\n </div>\n } @else {\n @if (searchResultsSignal()?.length) {\n @for (option of searchResultsSignal(); track trackByFn($index, option)) {\n <div\n class=\"ap-autocomplete-search-results-item\"\n tabindex=\"0\"\n (keydown.enter)=\"onSelectOption(option)\"\n (click)=\"onSelectOption(option)\">\n @if (!optionTextTemplate) {\n @if (!optionLabel || !option[optionLabel]) {\n <div class=\"option\">\n <span\n class=\"option-item\"\n [title]=\"option\">\n {{ option }}\n </span>\n </div>\n }\n @if (optionLabel && option[optionLabel]) {\n <div\n class=\"option\"\n [class.with-caption]=\"optionLabel && optionCaption && option[optionCaption]\">\n @if (!optionLabel) {\n <span class=\"item\">\n {{ option }}\n </span>\n }\n @if (optionImageUrl) {\n <ap-avatar\n [size]=\"24\"\n [showInitials]=\"true\"\n [username]=\"optionLabel ? option[optionLabel] : option\"\n [profilePicture]=\"option[optionImageUrl]\" />\n }\n @if (optionLabel && option[optionLabel]) {\n <div class=\"texts\">\n <div class=\"first-line\">\n <span\n class=\"label\"\n [title]=\"option[optionLabel]\">\n {{ option[optionLabel] }}\n </span>\n </div>\n @if (optionCaption && option[optionCaption]) {\n <span\n class=\"caption\"\n [title]=\"option[optionCaption]\">\n {{ option[optionCaption] }}\n </span>\n }\n </div>\n }\n </div>\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"optionTextTemplate; context: { option: option }\" />\n }\n </div>\n }\n } @else {\n <div class=\"ap-autocomplete-search-results-not-found\">\n {{ notFoundText }}\n </div>\n }\n }\n </div>\n </ng-template>\n </div>\n</div>\n", styles: ["ap-autocomplete{display:block}ap-autocomplete .input-autocomplete-wrapper{display:flex;flex-direction:column}ap-autocomplete .search-results-wrapper{position:relative}.ap-autocomplete-search-results{width:100%;display:flex;flex-direction:column;border-radius:var(--ref-border-radius-sm);box-shadow:var(--comp-select-shadow);padding:var(--comp-select-padding-vertical) 0;background-color:var(--comp-select-background-color);margin-top:var(--ref-spacing-xxxs);max-height:250px;overflow:auto}.ap-autocomplete-search-results-loading{display:flex;padding:var(--ref-spacing-sm) 0;flex-direction:column;justify-content:center;align-items:center;gap:var(--ref-spacing-xs)}.ap-autocomplete-search-results-loading .search-results-loading-label{font-style:italic;font-size:var(--ref-font-size-sm);color:var(--ref-color-grey-80)}.ap-autocomplete-search-results-not-found{padding:var(--ref-spacing-xs) var(--ref-spacing-sm);font-style:italic;font-size:var(--ref-font-size-sm);color:var(--ref-color-grey-80);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ap-autocomplete-search-results-item{padding:var(--ref-spacing-xxs) var(--ref-spacing-sm)}.ap-autocomplete-search-results-item .option{display:flex;align-items:center;font-size:var(--comp-select-one-line-text-size);font-weight:var(--comp-select-one-line-text-font-weight);color:var(--comp-select-one-line-text-color);line-height:var(--comp-select-one-line-text-line-height);font-family:var(--comp-select-one-line-text-font-family);gap:var(--ref-spacing-xs);min-height:24px}.ap-autocomplete-search-results-item .option .option-item{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ap-autocomplete-search-results-item .option .texts{flex:1;overflow:auto}.ap-autocomplete-search-results-item .option .texts .first-line{display:flex}.ap-autocomplete-search-results-item .option .texts .label{display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.ap-autocomplete-search-results-item .option.with-caption .texts{display:flex;flex-direction:column}.ap-autocomplete-search-results-item .option.with-caption .texts .label{color:var(--comp-select-two-line-title-text-color);font-size:var(--comp-select-two-line-title-text-size);line-height:var(--comp-select-two-line-title-text-line-height);font-weight:var(--comp-select-two-line-title-text-font-weight)}.ap-autocomplete-search-results-item .option.with-caption .texts .caption{color:var(--comp-select-two-line-caption-text-color);font-size:var(--comp-select-two-line-caption-text-size);line-height:var(--comp-select-two-line-caption-text-line-height);font-weight:var(--comp-select-two-line-caption-text-font-weight);display:inline-block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%}.ap-autocomplete-search-results-item:hover{cursor:pointer;background-color:var(--ref-color-electric-blue-10)}.ap-autocomplete-search-results-item:active{background-color:var(--ref-color-electric-blue-20)}.ap-autocomplete-search-results-item:focus{background-color:var(--ref-color-electric-blue-20)}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }, { kind: "component", type: FormFieldComponent, selector: "ap-form-field" }, { kind: "component", type: InputGroupComponent, selector: "ap-input-group", inputs: ["symbolPosition"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: LoaderComponent, selector: "ap-loader", inputs: ["color", "diameter"] }, { kind: "directive", type: InputDirective, selector: "[apInput]" }, { kind: "component", type: AvatarComponent, selector: "ap-avatar", inputs: ["profilePicture", "alt", "network", "size", "username", "showInitials", "anonymous", "online", "rounded"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
80
80
|
}
|
|
81
81
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
82
82
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-autocomplete.mjs","sources":["../../../libs/ui-components/autocomplete/src/autocomplete.component.ts","../../../libs/ui-components/autocomplete/src/autocomplete.component.html","../../../libs/ui-components/autocomplete/src/agorapulse-ui-components-autocomplete.ts"],"sourcesContent":["import { LoaderComponent } from '@agorapulse/ui-animations';\nimport { AvatarComponent } from '@agorapulse/ui-components/avatar';\nimport { FormFieldComponent } from '@agorapulse/ui-components/form-field';\nimport { InputDirective } from '@agorapulse/ui-components/input';\nimport { InputGroupComponent } from '@agorapulse/ui-components/input-group';\nimport { SymbolComponent, SymbolRegistry, apSearch } from '@agorapulse/ui-symbol';\nimport { OverlayModule } from '@angular/cdk/overlay';\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n Output,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n inject,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport { BehaviorSubject, Observable, debounceTime, distinctUntilChanged, filter, fromEvent, skip, switchMap, tap } from 'rxjs';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-autocomplete',\n styleUrls: ['./autocomplete.component.scss'],\n standalone: true,\n imports: [\n SymbolComponent,\n FormFieldComponent,\n InputGroupComponent,\n FormsModule,\n LoaderComponent,\n InputDirective,\n AvatarComponent,\n OverlayModule,\n ],\n templateUrl: './autocomplete.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AutocompleteComponent<T extends Record<string, unknown> | string> implements AfterViewInit {\n @Input() placeholder = 'Search...';\n @Input() label = '';\n @Input() inputId = '';\n @Input() loadingText = 'Loading Items';\n @Input() notFoundText = 'No result found';\n @Input({ required: true }) searchFn!: (term: string) => Observable<T[]>;\n @Input() trackByFn: (index: number, item: T) => T | T[keyof T] = (_: number, item: T) => item;\n @Input() set disabled(value: boolean) {\n this.disabledSignal.set(value);\n }\n @Input() optionLabel?: string;\n @Input() optionCaption?: string;\n @Input() optionImageUrl?: string;\n @Input() optionValue?: string;\n @Input() optionTextTemplate?: TemplateRef<{ option: T }>;\n\n @ViewChild('formField', { read: ElementRef }) formField!: ElementRef<FormFieldComponent>;\n\n @Output()\n selectOption: EventEmitter<unknown> = new EventEmitter<unknown>();\n\n readonly disabledSignal = signal(false);\n readonly symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n readonly searchTerm$ = new BehaviorSubject<string>('');\n readonly searchTermSignal = toSignal(this.searchTerm$);\n readonly showResultsSignal = signal(false);\n readonly resultsLoadingSignal = signal(false);\n readonly searchResultsSignal = toSignal<any[]>(\n this.searchTerm$.pipe(\n skip(1),\n debounceTime(250),\n distinctUntilChanged(),\n tap(() => this.showResultsSignal.set(false)),\n filter(term => term.length > 0),\n tap(() => this.showResultsSignal.set(true)),\n tap(() => this.resultsLoadingSignal.set(true)),\n switchMap(term => {\n return this.searchFn(term);\n }),\n tap(() => this.resultsLoadingSignal.set(false))\n )\n );\n private readonly ngZone = inject(NgZone);\n private readonly el = inject(ElementRef);\n readonly inputWidthSignal = signal(0);\n\n constructor() {\n this.symbolRegistry.registerSymbols([apSearch]);\n this.ngZone.runOutsideAngular(() => {\n fromEvent(document, 'click')\n .pipe(takeUntilDestroyed())\n .subscribe(e => {\n const clickedInside = this.el.nativeElement.contains(e.target);\n if (!clickedInside) {\n this.ngZone.run(() => {\n this.resetAutocomplete();\n });\n }\n });\n });\n }\n\n ngAfterViewInit(): void {\n this.inputWidthSignal.set((this.formField.nativeElement as HTMLElement).offsetWidth);\n }\n\n onSelectOption(option: T) {\n if (typeof option !== 'string' && this.optionValue && option[this.optionValue]) {\n this.selectOption.emit(option[this.optionValue]);\n } else {\n this.selectOption.emit(option);\n }\n this.resetAutocomplete();\n }\n\n private resetAutocomplete() {\n this.searchTerm$.next('');\n this.showResultsSignal.set(false);\n this.resultsLoadingSignal.set(false);\n }\n}\n","<div class=\"input-autocomplete-wrapper\">\n <ap-form-field\n #formField\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin>\n <label [for]=\"inputId\">\n {{ label }}\n </label>\n <ap-input-group>\n <ap-symbol symbolId=\"search\" />\n <input\n apInput\n [id]=\"inputId\"\n [disabled]=\"disabledSignal()\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"searchTermSignal()\"\n (ngModelChange)=\"searchTerm$.next($event)\" />\n </ap-input-group>\n </ap-form-field>\n <div class=\"search-results-wrapper\">\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayWidth]=\"inputWidthSignal()\"\n [cdkConnectedOverlayOpen]=\"showResultsSignal()\">\n <div class=\"ap-autocomplete-search-results\">\n @if (resultsLoadingSignal()) {\n <div class=\"ap-autocomplete-search-results-loading\">\n <ap-loader [diameter]=\"30\" />\n <span class=\"search-results-loading-label\">{{ loadingText }}</span>\n </div>\n } @else {\n @if (searchResultsSignal()?.length) {\n @for (option of searchResultsSignal(); track trackByFn($index, option)) {\n <div\n class=\"ap-autocomplete-search-results-item\"\n tabindex=\"0\"\n (keydown.enter)=\"onSelectOption(option)\"\n (click)=\"onSelectOption(option)\">\n @if (!optionTextTemplate) {\n @if (!optionLabel || !option[optionLabel]) {\n <div class=\"option\">\n <span\n class=\"option-item\"\n [title]=\"option\">\n {{ option }}\n </span>\n </div>\n }\n @if (optionLabel && option[optionLabel]) {\n <div\n class=\"option\"\n [class.with-caption]=\"optionLabel && optionCaption && option[optionCaption]\">\n @if (!optionLabel) {\n <span class=\"item\">\n {{ option }}\n </span>\n }\n @if (optionImageUrl) {\n <ap-avatar\n [size]=\"24\"\n [showInitials]=\"true\"\n [username]=\"optionLabel ? option[optionLabel] : option\"\n [profilePicture]=\"option[optionImageUrl]\" />\n }\n @if (optionLabel && option[optionLabel]) {\n <div class=\"texts\">\n <div class=\"first-line\">\n <span\n class=\"label\"\n [title]=\"option[optionLabel]\">\n {{ option[optionLabel] }}\n </span>\n </div>\n @if (optionCaption && option[optionCaption]) {\n <span\n class=\"caption\"\n [title]=\"option[optionCaption]\">\n {{ option[optionCaption] }}\n </span>\n }\n </div>\n }\n </div>\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"optionTextTemplate; context: { option: option }\" />\n }\n </div>\n }\n } @else {\n <div class=\"ap-autocomplete-search-results-not-found\">\n {{ notFoundText }}\n </div>\n }\n }\n </div>\n </ng-template>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA6Ca,qBAAqB,CAAA;IACrB,WAAW,GAAG,WAAW,CAAC;IAC1B,KAAK,GAAG,EAAE,CAAC;IACX,OAAO,GAAG,EAAE,CAAC;IACb,WAAW,GAAG,eAAe,CAAC;IAC9B,YAAY,GAAG,iBAAiB,CAAC;AACf,IAAA,QAAQ,CAAqC;IAC/D,SAAS,GAA+C,CAAC,CAAS,EAAE,IAAO,KAAK,IAAI,CAAC;IAC9F,IAAa,QAAQ,CAAC,KAAc,EAAA;AAChC,QAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KAClC;AACQ,IAAA,WAAW,CAAU;AACrB,IAAA,aAAa,CAAU;AACvB,IAAA,cAAc,CAAU;AACxB,IAAA,WAAW,CAAU;AACrB,IAAA,kBAAkB,CAA8B;AAEX,IAAA,SAAS,CAAkC;AAGzF,IAAA,YAAY,GAA0B,IAAI,YAAY,EAAW,CAAC;AAEzD,IAAA,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC,CAAC;AACxD,IAAA,WAAW,GAAG,IAAI,eAAe,CAAS,EAAE,CAAC,CAAC;AAC9C,IAAA,gBAAgB,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC9C,IAAA,iBAAiB,GAAG,MAAM,CAAC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AAS,EAAA,CAAA;sBAAtD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;gBAG5C,YAAY,EAAA,CAAA;sBADX,MAAM;;;AEhEX;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-autocomplete.mjs","sources":["../../../libs/ui-components/autocomplete/src/autocomplete.component.ts","../../../libs/ui-components/autocomplete/src/autocomplete.component.html","../../../libs/ui-components/autocomplete/src/agorapulse-ui-components-autocomplete.ts"],"sourcesContent":["import { LoaderComponent } from '@agorapulse/ui-animations';\nimport { AvatarComponent } from '@agorapulse/ui-components/avatar';\nimport { FormFieldComponent } from '@agorapulse/ui-components/form-field';\nimport { InputDirective } from '@agorapulse/ui-components/input';\nimport { InputGroupComponent } from '@agorapulse/ui-components/input-group';\nimport { SymbolComponent, SymbolRegistry, apSearch } from '@agorapulse/ui-symbol';\nimport { OverlayModule } from '@angular/cdk/overlay';\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n Output,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n inject,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport { BehaviorSubject, Observable, debounceTime, distinctUntilChanged, filter, fromEvent, skip, switchMap, tap } from 'rxjs';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-autocomplete',\n styleUrls: ['./autocomplete.component.scss'],\n standalone: true,\n imports: [\n SymbolComponent,\n FormFieldComponent,\n InputGroupComponent,\n FormsModule,\n LoaderComponent,\n InputDirective,\n AvatarComponent,\n OverlayModule,\n ],\n templateUrl: './autocomplete.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AutocompleteComponent<T extends Record<string, unknown> | string> implements AfterViewInit {\n @Input() placeholder = 'Search...';\n @Input() label = '';\n @Input() inputId = '';\n @Input() loadingText = 'Loading Items';\n @Input() notFoundText = 'No result found';\n @Input({ required: true }) searchFn!: (term: string) => Observable<T[]>;\n @Input() trackByFn: (index: number, item: T) => T | T[keyof T] = (_: number, item: T) => item;\n @Input() set disabled(value: boolean) {\n this.disabledSignal.set(value);\n }\n @Input() optionLabel?: string;\n @Input() optionCaption?: string;\n @Input() optionImageUrl?: string;\n @Input() optionValue?: string;\n @Input() optionTextTemplate?: TemplateRef<{ option: T }>;\n\n @ViewChild('formField', { read: ElementRef }) formField!: ElementRef<FormFieldComponent>;\n\n @Output()\n selectOption: EventEmitter<unknown> = new EventEmitter<unknown>();\n\n readonly disabledSignal = signal(false);\n readonly symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n readonly searchTerm$ = new BehaviorSubject<string>('');\n readonly searchTermSignal = toSignal(this.searchTerm$);\n readonly showResultsSignal = signal(false);\n readonly resultsLoadingSignal = signal(false);\n readonly searchResultsSignal = toSignal<any[]>(\n this.searchTerm$.pipe(\n skip(1),\n debounceTime(250),\n distinctUntilChanged(),\n tap(() => this.showResultsSignal.set(false)),\n filter(term => term.length > 0),\n tap(() => this.showResultsSignal.set(true)),\n tap(() => this.resultsLoadingSignal.set(true)),\n switchMap(term => {\n return this.searchFn(term);\n }),\n tap(() => this.resultsLoadingSignal.set(false))\n )\n );\n private readonly ngZone = inject(NgZone);\n private readonly el = inject(ElementRef);\n readonly inputWidthSignal = signal(0);\n\n constructor() {\n this.symbolRegistry.registerSymbols([apSearch]);\n this.ngZone.runOutsideAngular(() => {\n fromEvent(document, 'click')\n .pipe(takeUntilDestroyed())\n .subscribe(e => {\n const clickedInside = this.el.nativeElement.contains(e.target);\n if (!clickedInside) {\n this.ngZone.run(() => {\n this.resetAutocomplete();\n });\n }\n });\n });\n }\n\n ngAfterViewInit(): void {\n this.inputWidthSignal.set((this.formField.nativeElement as HTMLElement).offsetWidth);\n }\n\n onSelectOption(option: T) {\n if (typeof option !== 'string' && this.optionValue && option[this.optionValue]) {\n this.selectOption.emit(option[this.optionValue]);\n } else {\n this.selectOption.emit(option);\n }\n this.resetAutocomplete();\n }\n\n private resetAutocomplete() {\n this.searchTerm$.next('');\n this.showResultsSignal.set(false);\n this.resultsLoadingSignal.set(false);\n }\n}\n","<div class=\"input-autocomplete-wrapper\">\n <ap-form-field\n #formField\n #trigger=\"cdkOverlayOrigin\"\n cdkOverlayOrigin>\n <label [for]=\"inputId\">\n {{ label }}\n </label>\n <ap-input-group>\n <ap-symbol symbolId=\"search\" />\n <input\n apInput\n [id]=\"inputId\"\n [disabled]=\"disabledSignal()\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"searchTermSignal()\"\n (ngModelChange)=\"searchTerm$.next($event)\" />\n </ap-input-group>\n </ap-form-field>\n <div class=\"search-results-wrapper\">\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayWidth]=\"inputWidthSignal()\"\n [cdkConnectedOverlayOpen]=\"showResultsSignal()\">\n <div class=\"ap-autocomplete-search-results\">\n @if (resultsLoadingSignal()) {\n <div class=\"ap-autocomplete-search-results-loading\">\n <ap-loader [diameter]=\"30\" />\n <span class=\"search-results-loading-label\">{{ loadingText }}</span>\n </div>\n } @else {\n @if (searchResultsSignal()?.length) {\n @for (option of searchResultsSignal(); track trackByFn($index, option)) {\n <div\n class=\"ap-autocomplete-search-results-item\"\n tabindex=\"0\"\n (keydown.enter)=\"onSelectOption(option)\"\n (click)=\"onSelectOption(option)\">\n @if (!optionTextTemplate) {\n @if (!optionLabel || !option[optionLabel]) {\n <div class=\"option\">\n <span\n class=\"option-item\"\n [title]=\"option\">\n {{ option }}\n </span>\n </div>\n }\n @if (optionLabel && option[optionLabel]) {\n <div\n class=\"option\"\n [class.with-caption]=\"optionLabel && optionCaption && option[optionCaption]\">\n @if (!optionLabel) {\n <span class=\"item\">\n {{ option }}\n </span>\n }\n @if (optionImageUrl) {\n <ap-avatar\n [size]=\"24\"\n [showInitials]=\"true\"\n [username]=\"optionLabel ? option[optionLabel] : option\"\n [profilePicture]=\"option[optionImageUrl]\" />\n }\n @if (optionLabel && option[optionLabel]) {\n <div class=\"texts\">\n <div class=\"first-line\">\n <span\n class=\"label\"\n [title]=\"option[optionLabel]\">\n {{ option[optionLabel] }}\n </span>\n </div>\n @if (optionCaption && option[optionCaption]) {\n <span\n class=\"caption\"\n [title]=\"option[optionCaption]\">\n {{ option[optionCaption] }}\n </span>\n }\n </div>\n }\n </div>\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"optionTextTemplate; context: { option: option }\" />\n }\n </div>\n }\n } @else {\n <div class=\"ap-autocomplete-search-results-not-found\">\n {{ notFoundText }}\n </div>\n }\n }\n </div>\n </ng-template>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA6Ca,qBAAqB,CAAA;IACrB,WAAW,GAAG,WAAW,CAAC;IAC1B,KAAK,GAAG,EAAE,CAAC;IACX,OAAO,GAAG,EAAE,CAAC;IACb,WAAW,GAAG,eAAe,CAAC;IAC9B,YAAY,GAAG,iBAAiB,CAAC;AACf,IAAA,QAAQ,CAAqC;IAC/D,SAAS,GAA+C,CAAC,CAAS,EAAE,IAAO,KAAK,IAAI,CAAC;IAC9F,IAAa,QAAQ,CAAC,KAAc,EAAA;AAChC,QAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KAClC;AACQ,IAAA,WAAW,CAAU;AACrB,IAAA,aAAa,CAAU;AACvB,IAAA,cAAc,CAAU;AACxB,IAAA,WAAW,CAAU;AACrB,IAAA,kBAAkB,CAA8B;AAEX,IAAA,SAAS,CAAkC;AAGzF,IAAA,YAAY,GAA0B,IAAI,YAAY,EAAW,CAAC;AAEzD,IAAA,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,IAAA,cAAc,GAAmB,MAAM,CAAC,c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,CAAA;sBAAnB,KAAK;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,kBAAkB,EAAA,CAAA;sBAA1B,KAAK;gBAEwC,SAAS,EAAA,CAAA;sBAAtD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;gBAG5C,YAAY,EAAA,CAAA;sBADX,MAAM;;;AEhEX;;AAEG;;;;"}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import * as i1 from '@agorapulse/ui-symbol';
|
|
2
2
|
import { apSingleNeutral, apShowTheaterMaskHappy, apFacebookOfficial, apLinkedinOfficial, apYoutubeOfficial, apTiktokOfficial, apGoogleMyBusinessOfficial, apPinterestOfficial, apXOfficial, apWebBlogs, apWebNews, SymbolComponent } from '@agorapulse/ui-symbol';
|
|
3
|
-
import
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { NgOptimizedImage, NgClass, NgStyle } from '@angular/common';
|
|
4
5
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { booleanAttribute,
|
|
6
|
-
import { LetDirective } from '@ngrx/component';
|
|
7
|
-
import { BehaviorSubject, Observable, of, map, combineLatest } from 'rxjs';
|
|
6
|
+
import { input, booleanAttribute, signal, computed, effect, untracked, Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
|
8
7
|
|
|
8
|
+
const networkSymbolByNetwork = {
|
|
9
|
+
facebook: 'facebook-official',
|
|
10
|
+
instagram: 'instagram-official',
|
|
11
|
+
X: 'x-official',
|
|
12
|
+
twitter: 'x-official',
|
|
13
|
+
linkedin: 'linkedin-official',
|
|
14
|
+
tiktok: 'tiktok-official',
|
|
15
|
+
youtube: 'youtube-official',
|
|
16
|
+
pinterest: 'pinterest-official',
|
|
17
|
+
googleMyBusiness: 'google-my-business-official',
|
|
18
|
+
google: 'google-my-business-official',
|
|
19
|
+
webNews: 'web-news',
|
|
20
|
+
webBlog: 'web-blogs',
|
|
21
|
+
};
|
|
9
22
|
const onlineIconSizeByAvatarSize = {
|
|
10
23
|
56: 16,
|
|
11
24
|
48: 12,
|
|
@@ -43,80 +56,24 @@ const initialSizeByAvatarSize = {
|
|
|
43
56
|
16: 10,
|
|
44
57
|
};
|
|
45
58
|
class AvatarComponent {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
network$ = new BehaviorSubject(undefined);
|
|
65
|
-
alternativeText$ = new BehaviorSubject('');
|
|
66
|
-
anonymous$ = new BehaviorSubject(false);
|
|
67
|
-
username$ = new BehaviorSubject('');
|
|
68
|
-
online$ = new BehaviorSubject(false);
|
|
69
|
-
showInitials$ = new BehaviorSubject(false);
|
|
70
|
-
rounded$ = new BehaviorSubject(true);
|
|
71
|
-
set alternativeText(alternativeText) {
|
|
72
|
-
this.alternativeText$.next(alternativeText);
|
|
73
|
-
}
|
|
74
|
-
set anonymous(anonymous) {
|
|
75
|
-
this.anonymous$.next(anonymous);
|
|
76
|
-
}
|
|
77
|
-
set username(username) {
|
|
78
|
-
this.username$.next(username);
|
|
79
|
-
}
|
|
80
|
-
set network(network) {
|
|
81
|
-
this.network$.next(network);
|
|
82
|
-
this.elementRef.nativeElement.style.setProperty('--ap-avatar-network-size', `${networkSizeByAvatarSize[this.size$.value]}px`);
|
|
83
|
-
}
|
|
84
|
-
set online(online) {
|
|
85
|
-
this.online$.next(online);
|
|
86
|
-
}
|
|
87
|
-
set profilePicture(profilePicture) {
|
|
88
|
-
this.profilePicture$.next(profilePicture);
|
|
89
|
-
this.imageError$.next(false);
|
|
90
|
-
}
|
|
91
|
-
set showInitials(showInitials) {
|
|
92
|
-
this.showInitials$.next(showInitials);
|
|
93
|
-
}
|
|
94
|
-
alt = '';
|
|
95
|
-
roundedAvatar = true;
|
|
96
|
-
set rounded(rounded) {
|
|
97
|
-
this.roundedAvatar = rounded;
|
|
98
|
-
this.rounded$.next(rounded);
|
|
99
|
-
}
|
|
100
|
-
// TODO - migrate to signal input and remove size input
|
|
101
|
-
set size(size) {
|
|
102
|
-
this.size$.next(+size);
|
|
103
|
-
this.elementRef.nativeElement.style.setProperty('--ap-avatar-size', `${size}px`);
|
|
104
|
-
this.elementRef.nativeElement.style.setProperty('--ap-avatar-symbol-size', `${symbolSizeByAvatarSize[size]}px`);
|
|
105
|
-
this.elementRef.nativeElement.style.setProperty('--ap-avatar-online-icon-size', `${onlineIconSizeByAvatarSize[size]}px`);
|
|
106
|
-
}
|
|
107
|
-
displayProfilePicture$ = new Observable();
|
|
108
|
-
displaySingleNeutralSvg$ = new Observable();
|
|
109
|
-
displayInitials$ = new Observable();
|
|
110
|
-
displayAnonymous$ = new Observable();
|
|
111
|
-
displayNetwork$ = new Observable();
|
|
112
|
-
displayOnline$ = new Observable();
|
|
113
|
-
imageError$ = new BehaviorSubject(false);
|
|
114
|
-
initials$ = new Observable();
|
|
115
|
-
initialsAvailable$ = of(false);
|
|
116
|
-
constructor(symbolRegistry, elementRef) {
|
|
117
|
-
this.symbolRegistry = symbolRegistry;
|
|
118
|
-
this.elementRef = elementRef;
|
|
119
|
-
this.symbolRegistry.registerSymbols([
|
|
59
|
+
ngStyle;
|
|
60
|
+
profilePicture = input();
|
|
61
|
+
alt = input('');
|
|
62
|
+
network = input(undefined);
|
|
63
|
+
size = input(40);
|
|
64
|
+
username = input('');
|
|
65
|
+
showInitials = input(false);
|
|
66
|
+
anonymous = input(false);
|
|
67
|
+
online = input(false);
|
|
68
|
+
rounded = input(true, {
|
|
69
|
+
transform: booleanAttribute,
|
|
70
|
+
});
|
|
71
|
+
imageError = signal(false);
|
|
72
|
+
backgroundView = computed(() => this.buildBackgroundView());
|
|
73
|
+
overlayView = computed(() => this.buildOverlayView());
|
|
74
|
+
constructor(symbolRegistry, ngStyle) {
|
|
75
|
+
this.ngStyle = ngStyle;
|
|
76
|
+
symbolRegistry.registerSymbols([
|
|
120
77
|
apSingleNeutral,
|
|
121
78
|
apShowTheaterMaskHappy,
|
|
122
79
|
apFacebookOfficial,
|
|
@@ -129,96 +86,85 @@ class AvatarComponent {
|
|
|
129
86
|
apWebBlogs,
|
|
130
87
|
apWebNews,
|
|
131
88
|
]);
|
|
132
|
-
|
|
133
|
-
|
|
89
|
+
effect(() => {
|
|
90
|
+
this.ngStyle.ngStyle = this.buildHostStyle();
|
|
91
|
+
});
|
|
92
|
+
effect(() => {
|
|
93
|
+
this.profilePicture(); // on change
|
|
94
|
+
untracked(() => this.imageError.set(false));
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
onImageError() {
|
|
98
|
+
this.imageError.set(true);
|
|
134
99
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
this.
|
|
144
|
-
this.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
this.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
!displayInitials &&
|
|
162
|
-
!displayProfilePicture);
|
|
163
|
-
}));
|
|
164
|
-
this.displayAnonymous$ = combineLatest([this.anonymous$, this.rounded$]).pipe(map(([anonymous, rounded]) => {
|
|
165
|
-
return anonymous && rounded;
|
|
166
|
-
}));
|
|
167
|
-
this.displayOnline$ = combineLatest([this.online$, this.rounded$]).pipe(map(([online, rounded]) => {
|
|
168
|
-
return online && rounded;
|
|
169
|
-
}));
|
|
170
|
-
this.displayNetwork$ = combineLatest([this.network$, this.rounded$]).pipe(map(([network, rounded]) => {
|
|
171
|
-
return !!network && rounded;
|
|
172
|
-
}));
|
|
173
|
-
this.initials$ = combineLatest([this.displayInitials$, this.username$]).pipe(map(([displayInitials, username]) => {
|
|
174
|
-
if ((displayInitials && !username) || !displayInitials) {
|
|
175
|
-
return '';
|
|
100
|
+
buildBackgroundView() {
|
|
101
|
+
let bgView = {};
|
|
102
|
+
if (this.anonymous()) {
|
|
103
|
+
if (this.rounded()) {
|
|
104
|
+
bgView = { mode: 'symbol', symbolId: 'show-theater-mask-happy' };
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const profilePicture = this.profilePicture();
|
|
109
|
+
if (profilePicture && !this.imageError()) {
|
|
110
|
+
bgView = {
|
|
111
|
+
mode: 'image',
|
|
112
|
+
image: {
|
|
113
|
+
src: profilePicture,
|
|
114
|
+
size: +this.size(),
|
|
115
|
+
alt: this.alt(),
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
else if (this.rounded()) {
|
|
120
|
+
if (this.showInitials() && this.username()) {
|
|
121
|
+
bgView = { mode: 'initials', text: this.username().charAt(0).toUpperCase() };
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
bgView = { mode: 'symbol', symbolId: 'single-neutral' };
|
|
125
|
+
}
|
|
176
126
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return `${names[0].charAt(0).toUpperCase()}`;
|
|
180
|
-
}));
|
|
127
|
+
}
|
|
128
|
+
return bgView;
|
|
181
129
|
}
|
|
182
|
-
|
|
183
|
-
|
|
130
|
+
buildOverlayView() {
|
|
131
|
+
let ovlView = {};
|
|
132
|
+
if (this.rounded()) {
|
|
133
|
+
const network = this.network();
|
|
134
|
+
if (network) {
|
|
135
|
+
ovlView = { mode: 'network', network, symbolId: networkSymbolByNetwork[network] };
|
|
136
|
+
}
|
|
137
|
+
else if (this.online()) {
|
|
138
|
+
ovlView = { mode: 'online' };
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return ovlView;
|
|
142
|
+
}
|
|
143
|
+
buildHostStyle() {
|
|
144
|
+
const bgMode = this.backgroundView().mode;
|
|
145
|
+
const ovlMode = this.overlayView().mode;
|
|
146
|
+
const size = this.size();
|
|
147
|
+
return {
|
|
148
|
+
'--ap-avatar-size': `${size}px`,
|
|
149
|
+
'--ap-avatar-initials-size': bgMode == 'initials' ? `${initialSizeByAvatarSize[size]}px` : '',
|
|
150
|
+
'--ap-avatar-symbol-size': bgMode == 'symbol' ? `${symbolSizeByAvatarSize[size]}px` : '',
|
|
151
|
+
'--ap-avatar-network-size': ovlMode == 'network' ? `${networkSizeByAvatarSize[size]}px` : '',
|
|
152
|
+
'--ap-avatar-online-icon-size': ovlMode == 'online' ? `${onlineIconSizeByAvatarSize[size]}px` : '',
|
|
153
|
+
};
|
|
184
154
|
}
|
|
185
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AvatarComponent, deps: [{ token: i1.SymbolRegistry }, { token:
|
|
186
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: AvatarComponent, isStandalone: true, selector: "ap-avatar", inputs: {
|
|
155
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AvatarComponent, deps: [{ token: i1.SymbolRegistry }, { token: i2.NgStyle }], target: i0.ɵɵFactoryTarget.Component });
|
|
156
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: AvatarComponent, isStandalone: true, selector: "ap-avatar", inputs: { profilePicture: { classPropertyName: "profilePicture", publicName: "profilePicture", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, network: { classPropertyName: "network", publicName: "network", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, username: { classPropertyName: "username", publicName: "username", isSignal: true, isRequired: false, transformFunction: null }, showInitials: { classPropertyName: "showInitials", publicName: "showInitials", isSignal: true, isRequired: false, transformFunction: null }, anonymous: { classPropertyName: "anonymous", publicName: "anonymous", isSignal: true, isRequired: false, transformFunction: null }, online: { classPropertyName: "online", publicName: "online", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.rounded-avatar": "rounded()" } }, hostDirectives: [{ directive: i2.NgStyle }], ngImport: i0, template: "<!-- background -->\n@if (backgroundView(); as bgView) {\n @switch (bgView.mode) {\n @case ('image') {\n <img\n [ngSrc]=\"bgView.image.src\"\n [width]=\"bgView.image.size\"\n [height]=\"bgView.image.size\"\n [alt]=\"bgView.image.alt\"\n (error)=\"onImageError()\" />\n }\n @case ('initials') {\n <div class=\"initials\">\n {{ bgView.text }}\n </div>\n }\n @case ('symbol') {\n <div class=\"symbol\" [ngClass]=\"'sym-' + bgView.symbolId\">\n <ap-symbol [symbolId]=\"bgView.symbolId\" />\n </div>\n }\n }\n}\n\n<!-- overlay -->\n@if (overlayView(); as ovlView) {\n @switch (ovlView.mode) {\n @case ('network') {\n <div\n class=\"network\"\n [ngClass]=\"ovlView.network\">\n <ap-symbol [symbolId]=\"ovlView.symbolId\" />\n </div>\n }\n @case ('online') {\n <div class=\"online\"></div>\n }\n }\n}\n", styles: ["ap-avatar{display:flex;justify-content:center;align-items:center;height:var(--ap-avatar-size);min-height:var(--ap-avatar-size);max-height:var(--ap-avatar-size);width:var(--ap-avatar-size);min-width:var(--ap-avatar-size);max-width:var(--ap-avatar-size);border-radius:var(--sys-border-radius-sm);background:var(--ref-color-grey-40);box-sizing:border-box;position:relative;box-shadow:0 0 0 1px var(--ref-color-grey-10)}ap-avatar.rounded-avatar{border-radius:100%}ap-avatar.rounded-avatar img,ap-avatar.rounded-avatar .symbol{border-radius:100%}ap-avatar img{overflow:hidden;border-radius:var(--sys-border-radius-sm);box-sizing:border-box}ap-avatar .symbol{display:flex;justify-content:center;align-items:center;background:var(--ref-color-grey-40);border-radius:var(--sys-border-radius-sm)}ap-avatar .symbol ap-symbol{color:var(--ref-color-white);width:var(--ap-avatar-symbol-size);min-width:var(--ap-avatar-symbol-size);max-width:var(--ap-avatar-symbol-size);height:var(--ap-avatar-symbol-size);min-height:var(--ap-avatar-symbol-size);max-height:var(--ap-avatar-symbol-size)}ap-avatar .sym-show-theater-mask-happy{margin-top:7%}ap-avatar .online{position:absolute;height:var(--ap-avatar-online-icon-size);min-height:var(--ap-avatar-online-icon-size);max-height:var(--ap-avatar-online-icon-size);width:var(--ap-avatar-online-icon-size);min-width:var(--ap-avatar-online-icon-size);max-width:var(--ap-avatar-online-icon-size);border-radius:100%;overflow:hidden;background:var(--ref-color-grey-40);box-sizing:border-box;border:1px solid var(--ref-color-white);bottom:0;right:0;background:var(--ref-color-green-100)}ap-avatar .initials{font-weight:var(--ref-font-weight-bold);font-size:var(--ap-avatar-initials-size);line-height:var(--ref-font-line-height-xl);font-family:Averta;color:var(--ref-color-white)}ap-avatar .network{position:absolute;height:var(--ap-avatar-online-icon-size);min-height:var(--ap-avatar-network-size);max-height:var(--ap-avatar-network-size);width:var(--ap-avatar-network-size);min-width:var(--ap-avatar-network-size);max-width:var(--ap-avatar-network-size);overflow:hidden;box-sizing:border-box;bottom:0;right:0;box-shadow:0 0 0 1px var(--ref-color-grey-10)}ap-avatar .network.facebook,ap-avatar .network.twitter,ap-avatar .network.youtube,ap-avatar .network.tiktok,ap-avatar .network.X,ap-avatar .network.pinterest,ap-avatar .network.webBlog,ap-avatar .network.webNews{border-radius:100%}ap-avatar .network.instagram{border-radius:28%}ap-avatar .network.linkedin{border-radius:6%}ap-avatar .network.googleMyBusiness,ap-avatar .network.google{box-shadow:none;border-radius:unset}ap-avatar .network ap-symbol img{border-radius:0;border:none}\n"], dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
187
157
|
}
|
|
188
158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
189
159
|
type: Component,
|
|
190
|
-
args: [{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
type: Input
|
|
195
|
-
}], username: [{
|
|
196
|
-
type: Input
|
|
197
|
-
}], network: [{
|
|
198
|
-
type: Input
|
|
199
|
-
}], online: [{
|
|
200
|
-
type: Input
|
|
201
|
-
}], profilePicture: [{
|
|
202
|
-
type: Input
|
|
203
|
-
}], showInitials: [{
|
|
204
|
-
type: Input
|
|
205
|
-
}], alt: [{
|
|
206
|
-
type: Input
|
|
207
|
-
}], roundedAvatar: [{
|
|
208
|
-
type: HostBinding,
|
|
209
|
-
args: ['class.rounded-avatar']
|
|
210
|
-
}], rounded: [{
|
|
211
|
-
type: Input,
|
|
212
|
-
args: [{
|
|
213
|
-
transform: booleanAttribute,
|
|
214
|
-
}]
|
|
215
|
-
}], size: [{
|
|
216
|
-
type: Input
|
|
217
|
-
}] } });
|
|
160
|
+
args: [{ selector: 'ap-avatar', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: true, imports: [NgOptimizedImage, SymbolComponent, NgClass], hostDirectives: [NgStyle], host: {
|
|
161
|
+
'[class.rounded-avatar]': 'rounded()'
|
|
162
|
+
}, template: "<!-- background -->\n@if (backgroundView(); as bgView) {\n @switch (bgView.mode) {\n @case ('image') {\n <img\n [ngSrc]=\"bgView.image.src\"\n [width]=\"bgView.image.size\"\n [height]=\"bgView.image.size\"\n [alt]=\"bgView.image.alt\"\n (error)=\"onImageError()\" />\n }\n @case ('initials') {\n <div class=\"initials\">\n {{ bgView.text }}\n </div>\n }\n @case ('symbol') {\n <div class=\"symbol\" [ngClass]=\"'sym-' + bgView.symbolId\">\n <ap-symbol [symbolId]=\"bgView.symbolId\" />\n </div>\n }\n }\n}\n\n<!-- overlay -->\n@if (overlayView(); as ovlView) {\n @switch (ovlView.mode) {\n @case ('network') {\n <div\n class=\"network\"\n [ngClass]=\"ovlView.network\">\n <ap-symbol [symbolId]=\"ovlView.symbolId\" />\n </div>\n }\n @case ('online') {\n <div class=\"online\"></div>\n }\n }\n}\n", styles: ["ap-avatar{display:flex;justify-content:center;align-items:center;height:var(--ap-avatar-size);min-height:var(--ap-avatar-size);max-height:var(--ap-avatar-size);width:var(--ap-avatar-size);min-width:var(--ap-avatar-size);max-width:var(--ap-avatar-size);border-radius:var(--sys-border-radius-sm);background:var(--ref-color-grey-40);box-sizing:border-box;position:relative;box-shadow:0 0 0 1px var(--ref-color-grey-10)}ap-avatar.rounded-avatar{border-radius:100%}ap-avatar.rounded-avatar img,ap-avatar.rounded-avatar .symbol{border-radius:100%}ap-avatar img{overflow:hidden;border-radius:var(--sys-border-radius-sm);box-sizing:border-box}ap-avatar .symbol{display:flex;justify-content:center;align-items:center;background:var(--ref-color-grey-40);border-radius:var(--sys-border-radius-sm)}ap-avatar .symbol ap-symbol{color:var(--ref-color-white);width:var(--ap-avatar-symbol-size);min-width:var(--ap-avatar-symbol-size);max-width:var(--ap-avatar-symbol-size);height:var(--ap-avatar-symbol-size);min-height:var(--ap-avatar-symbol-size);max-height:var(--ap-avatar-symbol-size)}ap-avatar .sym-show-theater-mask-happy{margin-top:7%}ap-avatar .online{position:absolute;height:var(--ap-avatar-online-icon-size);min-height:var(--ap-avatar-online-icon-size);max-height:var(--ap-avatar-online-icon-size);width:var(--ap-avatar-online-icon-size);min-width:var(--ap-avatar-online-icon-size);max-width:var(--ap-avatar-online-icon-size);border-radius:100%;overflow:hidden;background:var(--ref-color-grey-40);box-sizing:border-box;border:1px solid var(--ref-color-white);bottom:0;right:0;background:var(--ref-color-green-100)}ap-avatar .initials{font-weight:var(--ref-font-weight-bold);font-size:var(--ap-avatar-initials-size);line-height:var(--ref-font-line-height-xl);font-family:Averta;color:var(--ref-color-white)}ap-avatar .network{position:absolute;height:var(--ap-avatar-online-icon-size);min-height:var(--ap-avatar-network-size);max-height:var(--ap-avatar-network-size);width:var(--ap-avatar-network-size);min-width:var(--ap-avatar-network-size);max-width:var(--ap-avatar-network-size);overflow:hidden;box-sizing:border-box;bottom:0;right:0;box-shadow:0 0 0 1px var(--ref-color-grey-10)}ap-avatar .network.facebook,ap-avatar .network.twitter,ap-avatar .network.youtube,ap-avatar .network.tiktok,ap-avatar .network.X,ap-avatar .network.pinterest,ap-avatar .network.webBlog,ap-avatar .network.webNews{border-radius:100%}ap-avatar .network.instagram{border-radius:28%}ap-avatar .network.linkedin{border-radius:6%}ap-avatar .network.googleMyBusiness,ap-avatar .network.google{box-shadow:none;border-radius:unset}ap-avatar .network ap-symbol img{border-radius:0;border:none}\n"] }]
|
|
163
|
+
}], ctorParameters: () => [{ type: i1.SymbolRegistry }, { type: i2.NgStyle }] });
|
|
218
164
|
|
|
219
165
|
/**
|
|
220
166
|
* Generated bundle index. Do not edit.
|
|
221
167
|
*/
|
|
222
168
|
|
|
223
|
-
export { AvatarComponent };
|
|
169
|
+
export { AvatarComponent, networkSymbolByNetwork };
|
|
224
170
|
//# sourceMappingURL=agorapulse-ui-components-avatar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-avatar.mjs","sources":["../../../libs/ui-components/avatar/src/avatar.component.ts","../../../libs/ui-components/avatar/src/avatar.component.html","../../../libs/ui-components/avatar/src/agorapulse-ui-components-avatar.ts"],"sourcesContent":["import {\n SymbolComponent,\n SymbolRegistry,\n apFacebookOfficial,\n apGoogleMyBusinessOfficial,\n apLinkedinOfficial,\n apPinterestOfficial,\n apShowTheaterMaskHappy,\n apSingleNeutral,\n apTiktokOfficial,\n apWebBlogs,\n apWebNews,\n apXOfficial,\n apYoutubeOfficial,\n} from '@agorapulse/ui-symbol';\nimport { NgOptimizedImage } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Input,\n OnInit,\n ViewEncapsulation,\n booleanAttribute,\n} from '@angular/core';\nimport { LetDirective } from '@ngrx/component';\nimport { BehaviorSubject, Observable, combineLatest, map, of } from 'rxjs';\n\nexport type AvatarSize = 56 | 48 | 40 | 36 | 32 | 24 | 16;\nexport type AvatarNetwork =\n | 'facebook'\n | 'instagram'\n | 'twitter'\n | 'linkedin'\n | 'tiktok'\n | 'youtube'\n | 'pinterest'\n | 'googleMyBusiness'\n | 'google'\n | 'webNews'\n | 'webBlog'\n | 'X';\n\nconst onlineIconSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 12,\n 40: 12,\n 36: 8,\n 32: 8,\n 24: 6,\n 16: 6,\n};\n\nconst symbolSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 20,\n 36: 18,\n 32: 16,\n 24: 12,\n 16: 8,\n};\n\nconst networkSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 16,\n 40: 16,\n 36: 16,\n 32: 12,\n 24: 12,\n 16: 8,\n};\n\nconst initialSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 22,\n 36: 18,\n 32: 18,\n 24: 14,\n 16: 10,\n};\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-avatar',\n styleUrls: ['./avatar.component.scss'],\n standalone: true,\n imports: [NgOptimizedImage, SymbolComponent, LetDirective],\n templateUrl: './avatar.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class AvatarComponent implements OnInit {\n readonly networkSymbolByNetwork: Record<AvatarNetwork, string> = {\n facebook: 'facebook-official',\n instagram: 'instagram-official',\n X: 'x-official',\n twitter: 'x-official',\n linkedin: 'linkedin-official',\n tiktok: 'tiktok-official',\n youtube: 'youtube-official',\n pinterest: 'pinterest-official',\n googleMyBusiness: 'google-my-business-official',\n google: 'google-my-business-official',\n webNews: 'web-news',\n webBlog: 'web-blogs',\n };\n\n size$: BehaviorSubject<AvatarSize> = new BehaviorSubject<AvatarSize>(40);\n profilePicture$: BehaviorSubject<string | undefined> = new BehaviorSubject<string | undefined>('');\n network$: BehaviorSubject<AvatarNetwork | undefined> = new BehaviorSubject<AvatarNetwork | undefined>(undefined);\n\n private alternativeText$: BehaviorSubject<string> = new BehaviorSubject<string>('');\n private anonymous$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n private username$: BehaviorSubject<string> = new BehaviorSubject<string>('');\n private online$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n private showInitials$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n private rounded$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);\n\n @Input() set alternativeText(alternativeText: string) {\n this.alternativeText$.next(alternativeText);\n }\n\n @Input() set anonymous(anonymous: boolean) {\n this.anonymous$.next(anonymous);\n }\n\n @Input() set username(username: string) {\n this.username$.next(username);\n }\n\n @Input() set network(network: AvatarNetwork | undefined) {\n this.network$.next(network);\n this.elementRef.nativeElement.style.setProperty('--ap-avatar-network-size', `${networkSizeByAvatarSize[this.size$.value]}px`);\n }\n\n @Input() set online(online: boolean) {\n this.online$.next(online);\n }\n\n @Input() set profilePicture(profilePicture: string | undefined) {\n this.profilePicture$.next(profilePicture);\n this.imageError$.next(false);\n }\n\n @Input() set showInitials(showInitials: boolean) {\n this.showInitials$.next(showInitials);\n }\n @Input() alt = '';\n\n @HostBinding('class.rounded-avatar')\n roundedAvatar = true;\n\n @Input({\n transform: booleanAttribute,\n })\n set rounded(rounded: boolean) {\n this.roundedAvatar = rounded;\n this.rounded$.next(rounded);\n }\n\n // TODO - migrate to signal input and remove size input\n @Input()\n set size(size: AvatarSize | `${AvatarSize}`) {\n this.size$.next(+size as AvatarSize);\n this.elementRef.nativeElement.style.setProperty('--ap-avatar-size', `${size}px`);\n this.elementRef.nativeElement.style.setProperty('--ap-avatar-symbol-size', `${symbolSizeByAvatarSize[size]}px`);\n this.elementRef.nativeElement.style.setProperty('--ap-avatar-online-icon-size', `${onlineIconSizeByAvatarSize[size]}px`);\n }\n\n displayProfilePicture$: Observable<boolean> = new Observable<boolean>();\n displaySingleNeutralSvg$: Observable<boolean> = new Observable<boolean>();\n displayInitials$: Observable<boolean> = new Observable<boolean>();\n displayAnonymous$: Observable<boolean> = new Observable<boolean>();\n displayNetwork$: Observable<boolean> = new Observable<boolean>();\n displayOnline$: Observable<boolean> = new Observable<boolean>();\n imageError$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n initials$: Observable<string> = new Observable<string>();\n initialsAvailable$: Observable<boolean> = of(false);\n\n constructor(\n private symbolRegistry: SymbolRegistry,\n private elementRef: ElementRef\n ) {\n this.symbolRegistry.registerSymbols([\n apSingleNeutral,\n apShowTheaterMaskHappy,\n apFacebookOfficial,\n apLinkedinOfficial,\n apYoutubeOfficial,\n apTiktokOfficial,\n apGoogleMyBusinessOfficial,\n apPinterestOfficial,\n apXOfficial,\n apWebBlogs,\n apWebNews,\n ]);\n this.elementRef.nativeElement.style.setProperty('--ap-avatar-size', `40px`);\n this.elementRef.nativeElement.style.setProperty('--ap-avatar-symbol-size', `${symbolSizeByAvatarSize[this.size$.value]}px`);\n }\n\n ngOnInit(): void {\n this.initialsAvailable$ = this.username$.pipe(\n map(username => {\n return !!username;\n })\n );\n\n this.displayProfilePicture$ = combineLatest([this.profilePicture$, this.anonymous$, this.imageError$, this.showInitials$]).pipe(\n map(([profilePicture, anonymous, imageError]) => {\n return !!profilePicture && !anonymous && !imageError;\n })\n );\n\n this.displayInitials$ = combineLatest([\n this.showInitials$,\n this.anonymous$,\n this.initialsAvailable$,\n this.displayProfilePicture$,\n ]).pipe(\n map(([showInitials, anonymous, initialsAvailable, displayProfilePicture]) => {\n return showInitials && !anonymous && initialsAvailable && !displayProfilePicture;\n })\n );\n\n this.displaySingleNeutralSvg$ = combineLatest([\n this.profilePicture$,\n this.imageError$,\n this.initialsAvailable$,\n this.showInitials$,\n this.anonymous$,\n this.displayInitials$,\n this.displayProfilePicture$,\n ]).pipe(\n map(([profilePicture, imageError, initialsAvailable, showInitials, anonymous, displayInitials, displayProfilePicture]) => {\n return (\n (!profilePicture || imageError || !initialsAvailable || (initialsAvailable && !showInitials)) &&\n !anonymous &&\n !displayInitials &&\n !displayProfilePicture\n );\n })\n );\n\n this.displayAnonymous$ = combineLatest([this.anonymous$, this.rounded$]).pipe(\n map(([anonymous, rounded]) => {\n return anonymous && rounded;\n })\n );\n\n this.displayOnline$ = combineLatest([this.online$, this.rounded$]).pipe(\n map(([online, rounded]) => {\n return online && rounded;\n })\n );\n\n this.displayNetwork$ = combineLatest([this.network$, this.rounded$]).pipe(\n map(([network, rounded]) => {\n return !!network && rounded;\n })\n );\n\n this.initials$ = combineLatest([this.displayInitials$, this.username$]).pipe(\n map(([displayInitials, username]) => {\n if ((displayInitials && !username) || !displayInitials) {\n return '';\n }\n this.elementRef.nativeElement.style.setProperty(\n '--ap-avatar-initials-size',\n `${initialSizeByAvatarSize[this.size$.value]}px`\n );\n const names = username?.split(' ');\n return `${names[0].charAt(0).toUpperCase()}`;\n })\n );\n }\n\n onImageError(): void {\n this.imageError$.next(true);\n }\n}\n","<ng-container\n *ngrxLet=\"{\n displayProfilePicture: displayProfilePicture$,\n displaySingleNeutralSvg: displaySingleNeutralSvg$,\n displayInitials: displayInitials$,\n displayAnonymous: displayAnonymous$,\n displayOnline: displayOnline$,\n displayNetwork: displayNetwork$,\n initials: initials$,\n profilePicture: profilePicture$,\n size: size$,\n network: network$\n } as avatarViewModel\">\n @if (avatarViewModel.displayProfilePicture) {\n <img\n [src]=\"avatarViewModel.profilePicture\"\n [width]=\"avatarViewModel.size\"\n [height]=\"avatarViewModel.size\"\n [alt]=\"alt\"\n (error)=\"onImageError()\" />\n }\n @if (avatarViewModel.displaySingleNeutralSvg) {\n <div class=\"no-profile-picture\">\n <ap-symbol symbolId=\"single-neutral\" />\n </div>\n }\n\n @if (avatarViewModel.displayAnonymous) {\n <div class=\"anonymous\">\n <ap-symbol symbolId=\"show-theater-mask-happy\" />\n </div>\n }\n @if (avatarViewModel.displayOnline) {\n <div class=\"online\"></div>\n }\n @if (avatarViewModel.displayNetwork) {\n <div\n class=\"network\"\n [class.facebook]=\"avatarViewModel.network === 'facebook'\"\n [class.linkedin]=\"avatarViewModel.network === 'linkedin'\"\n [class.twitter]=\"avatarViewModel.network === 'twitter'\"\n [class.x]=\"avatarViewModel.network === 'X'\"\n [class.youtube]=\"avatarViewModel.network === 'youtube'\"\n [class.googleMyBusiness]=\"avatarViewModel.network === 'googleMyBusiness' || avatarViewModel.network === 'google'\"\n [class.instagram]=\"avatarViewModel.network === 'instagram'\"\n [class.tiktok]=\"avatarViewModel.network === 'tiktok'\"\n [class.pinterest]=\"avatarViewModel.network === 'pinterest'\"\n [class.web]=\"avatarViewModel.network === 'webBlog' || avatarViewModel.network === 'webNews'\">\n @if (avatarViewModel.network) {\n <ap-symbol [symbolId]=\"networkSymbolByNetwork[avatarViewModel.network]\" />\n }\n </div>\n }\n\n @if (avatarViewModel.displayInitials) {\n <div class=\"initials\">\n {{ avatarViewModel.initials }}\n </div>\n }\n</ng-container>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AA4CA,MAAM,0BAA0B,GAA+B;AAC3D,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAA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AAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAIhD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAT3B,SAAS;AACW,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,WAAW,EAAA,UAAA,EAET,IAAI,EACP,OAAA,EAAA,CAAC,gBAAgB,EAAE,eAAe,EAAE,YAAY,CAAC,EAE3C,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,83EAAA,EAAA,MAAA,EAAA,CAAA,krFAAA,CAAA,EAAA,CAAA;4GA6BxB,eAAe,EAAA,CAAA;sBAA3B,KAAK;gBAIO,SAAS,EAAA,CAAA;sBAArB,KAAK;gBAIO,QAAQ,EAAA,CAAA;sBAApB,KAAK;gBAIO,OAAO,EAAA,CAAA;sBAAnB,KAAK;gBAKO,MAAM,EAAA,CAAA;sBAAlB,KAAK;gBAIO,cAAc,EAAA,CAAA;sBAA1B,KAAK;gBAKO,YAAY,EAAA,CAAA;sBAAxB,KAAK;gBAGG,GAAG,EAAA,CAAA;sBAAX,KAAK;gBAGN,aAAa,EAAA,CAAA;sBADZ,WAAW;uBAAC,sBAAsB,CAAA;gBAM/B,OAAO,EAAA,CAAA;sBAHV,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,SAAS,EAAE,gBAAgB;AAC9B,qBAAA,CAAA;gBAQG,IAAI,EAAA,CAAA;sBADP,KAAK;;;AEnKV;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-avatar.mjs","sources":["../../../libs/ui-components/avatar/src/avatar.component.ts","../../../libs/ui-components/avatar/src/avatar.component.html","../../../libs/ui-components/avatar/src/agorapulse-ui-components-avatar.ts"],"sourcesContent":["import {\n apFacebookOfficial,\n apGoogleMyBusinessOfficial,\n apLinkedinOfficial,\n apPinterestOfficial,\n apShowTheaterMaskHappy,\n apSingleNeutral,\n APSymbolName,\n apTiktokOfficial,\n apWebBlogs,\n apWebNews,\n apXOfficial,\n apYoutubeOfficial,\n SymbolComponent,\n SymbolRegistry,\n} from '@agorapulse/ui-symbol';\nimport { NgClass, NgOptimizedImage, NgStyle } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n input,\n signal,\n untracked,\n ViewEncapsulation,\n} from '@angular/core';\n\nexport const networkSymbolByNetwork = {\n facebook: 'facebook-official',\n instagram: 'instagram-official',\n X: 'x-official',\n twitter: 'x-official',\n linkedin: 'linkedin-official',\n tiktok: 'tiktok-official',\n youtube: 'youtube-official',\n pinterest: 'pinterest-official',\n googleMyBusiness: 'google-my-business-official',\n google: 'google-my-business-official',\n webNews: 'web-news',\n webBlog: 'web-blogs',\n} satisfies Record<string, APSymbolName>;\n\nexport type AvatarNetwork = keyof typeof networkSymbolByNetwork;\n\nexport type AvatarSize = 56 | 48 | 40 | 36 | 32 | 24 | 16;\n\nconst onlineIconSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 12,\n 40: 12,\n 36: 8,\n 32: 8,\n 24: 6,\n 16: 6,\n};\n\nconst symbolSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 20,\n 36: 18,\n 32: 16,\n 24: 12,\n 16: 8,\n};\n\nconst networkSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 16,\n 48: 16,\n 40: 16,\n 36: 16,\n 32: 12,\n 24: 12,\n 16: 8,\n};\n\nconst initialSizeByAvatarSize: Record<AvatarSize, number> = {\n 56: 28,\n 48: 24,\n 40: 22,\n 36: 18,\n 32: 18,\n 24: 14,\n 16: 10,\n};\n\ntype BackgroundView =\n | { mode: 'image'; image: { src: string; size: number; alt?: string } }\n | { mode: 'initials'; text: string }\n | { mode: 'symbol'; symbolId: APSymbolName }\n | { mode?: never };\n\ntype OverlayView =\n | { mode: 'online' }\n | { mode: 'network'; network: AvatarNetwork; symbolId: APSymbolName }\n | { mode?: never };\n\n@Component({\n selector: 'ap-avatar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './avatar.component.html',\n styleUrls: ['./avatar.component.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NgOptimizedImage, SymbolComponent, NgClass],\n hostDirectives: [NgStyle],\n host: {\n '[class.rounded-avatar]': 'rounded()'\n },\n})\nexport class AvatarComponent {\n profilePicture = input<string>();\n alt = input<string>('');\n network = input<AvatarNetwork | undefined>(undefined);\n size = input<AvatarSize | `${AvatarSize}`>(40);\n username = input<string>('');\n showInitials = input<boolean>(false);\n anonymous = input<boolean>(false);\n online = input<boolean>(false);\n rounded = input(true, {\n transform: booleanAttribute,\n });\n\n private imageError = signal<boolean>(false);\n\n backgroundView = computed<BackgroundView>(() => this.buildBackgroundView());\n overlayView = computed<OverlayView>(() => this.buildOverlayView());\n\n constructor(\n symbolRegistry: SymbolRegistry,\n private ngStyle: NgStyle\n ) {\n symbolRegistry.registerSymbols([\n apSingleNeutral,\n apShowTheaterMaskHappy,\n apFacebookOfficial,\n apLinkedinOfficial,\n apYoutubeOfficial,\n apTiktokOfficial,\n apGoogleMyBusinessOfficial,\n apPinterestOfficial,\n apXOfficial,\n apWebBlogs,\n apWebNews,\n ]);\n\n effect(() => {\n this.ngStyle.ngStyle = this.buildHostStyle();\n });\n effect(() => {\n this.profilePicture(); // on change\n untracked(() => this.imageError.set(false));\n });\n }\n\n onImageError(): void {\n this.imageError.set(true);\n }\n\n private buildBackgroundView(): BackgroundView {\n let bgView: BackgroundView = {};\n\n if (this.anonymous()) {\n if (this.rounded()) {\n bgView = { mode: 'symbol', symbolId: 'show-theater-mask-happy' };\n }\n } else {\n const profilePicture = this.profilePicture();\n\n if (profilePicture && !this.imageError()) {\n bgView = {\n mode: 'image',\n image: {\n src: profilePicture,\n size: +this.size(),\n alt: this.alt(),\n },\n };\n } else if (this.rounded()) {\n if (this.showInitials() && this.username()) {\n bgView = { mode: 'initials', text: this.username().charAt(0).toUpperCase() };\n } else {\n bgView = { mode: 'symbol', symbolId: 'single-neutral' };\n }\n }\n }\n\n return bgView;\n }\n\n private buildOverlayView(): OverlayView {\n let ovlView: OverlayView = {};\n\n if (this.rounded()) {\n const network = this.network();\n\n if (network) {\n ovlView = { mode: 'network', network, symbolId: networkSymbolByNetwork[network] };\n } else if (this.online()) {\n ovlView = { mode: 'online' };\n }\n }\n\n return ovlView;\n }\n\n private buildHostStyle() {\n const bgMode = this.backgroundView().mode;\n const ovlMode = this.overlayView().mode;\n const size = this.size();\n\n return {\n '--ap-avatar-size': `${size}px`,\n '--ap-avatar-initials-size': bgMode == 'initials' ? `${initialSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-symbol-size': bgMode == 'symbol' ? `${symbolSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-network-size': ovlMode == 'network' ? `${networkSizeByAvatarSize[size]}px` : '',\n '--ap-avatar-online-icon-size': ovlMode == 'online' ? `${onlineIconSizeByAvatarSize[size]}px` : '',\n };\n }\n}\n","<!-- background -->\n@if (backgroundView(); as bgView) {\n @switch (bgView.mode) {\n @case ('image') {\n <img\n [ngSrc]=\"bgView.image.src\"\n [width]=\"bgView.image.size\"\n [height]=\"bgView.image.size\"\n [alt]=\"bgView.image.alt\"\n (error)=\"onImageError()\" />\n }\n @case ('initials') {\n <div class=\"initials\">\n {{ bgView.text }}\n </div>\n }\n @case ('symbol') {\n <div class=\"symbol\" [ngClass]=\"'sym-' + bgView.symbolId\">\n <ap-symbol [symbolId]=\"bgView.symbolId\" />\n </div>\n }\n }\n}\n\n<!-- overlay -->\n@if (overlayView(); as ovlView) {\n @switch (ovlView.mode) {\n @case ('network') {\n <div\n class=\"network\"\n [ngClass]=\"ovlView.network\">\n <ap-symbol [symbolId]=\"ovlView.symbolId\" />\n </div>\n }\n @case ('online') {\n <div class=\"online\"></div>\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":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,CAAA;kBAb3B,SAAS;+BACI,WAAW,EAAA,eAAA,EACJ,uBAAuB,CAAC,MAAM,iBAGhC,iBAAiB,CAAC,IAAI,EAAA,UAAA,EACzB,IAAI,EAAA,OAAA,EACP,CAAC,gBAAgB,EAAE,eAAe,EAAE,OAAO,CAAC,EACrC,cAAA,EAAA,CAAC,OAAO,CAAC,EACnB,IAAA,EAAA;AACF,wBAAA,wBAAwB,EAAE,WAAW;AACxC,qBAAA,EAAA,QAAA,EAAA,6lCAAA,EAAA,MAAA,EAAA,CAAA,umFAAA,CAAA,EAAA,CAAA;;;AE9GL;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-form-message.mjs","sources":["../../../libs/ui-components/form-message/src/form-message.component.ts","../../../libs/ui-components/form-message/src/form-message.component.html","../../../libs/ui-components/form-message/src/agorapulse-ui-components-form-message.ts"],"sourcesContent":["import { SymbolComponent, SymbolRegistry, apErrorFill, apRoundedCheckFill } from '@agorapulse/ui-symbol';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, computed, inject, signal } from '@angular/core';\n\nexport type MessageType = 'error' | 'success';\n\n@Component({\n selector: 'ap-form-message',\n templateUrl: './form-message.component.html',\n styleUrls: ['./form-message.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [SymbolComponent],\n host: {\n class: 'ap-form-message',\n '[class.error]': \"messageTypeSignal() === 'error'\",\n '[class.success]': \"messageTypeSignal() === 'success'\",\n },\n})\nexport class FormMessageComponent {\n @Input({ required: true })\n set messageType(messageType: MessageType) {\n this.messageTypeSignal.set(messageType);\n }\n\n @Input({ required: true })\n message!: string;\n\n messageTypeSignal = signal<MessageType>('error');\n\n symbolIdSignal = computed(() => {\n return this.messageTypeSignal() === 'error' ? 'error_fill' : 'rounded-check_fill';\n });\n\n private symbolRegistry = inject(SymbolRegistry);\n\n constructor() {\n this.symbolRegistry.registerSymbols([apErrorFill, apRoundedCheckFill]);\n }\n}\n","<ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolIdSignal()\" />\n<span>\n {{ message }}\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAmBa,oBAAoB,CAAA;IAC7B,IACI,WAAW,CAAC,WAAwB,EAAA;AACpC,QAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;KAC3C;AAGD,IAAA,OAAO,CAAU;AAEjB,IAAA,iBAAiB,GAAG,MAAM,CAAc,OAAO,CAAC,CAAC;AAEjD,IAAA,cAAc,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-form-message.mjs","sources":["../../../libs/ui-components/form-message/src/form-message.component.ts","../../../libs/ui-components/form-message/src/form-message.component.html","../../../libs/ui-components/form-message/src/agorapulse-ui-components-form-message.ts"],"sourcesContent":["import { SymbolComponent, SymbolRegistry, apErrorFill, apRoundedCheckFill, APSymbolName } from '@agorapulse/ui-symbol';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, computed, inject, signal } from '@angular/core';\n\nexport type MessageType = 'error' | 'success';\n\n@Component({\n selector: 'ap-form-message',\n templateUrl: './form-message.component.html',\n styleUrls: ['./form-message.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [SymbolComponent],\n host: {\n class: 'ap-form-message',\n '[class.error]': \"messageTypeSignal() === 'error'\",\n '[class.success]': \"messageTypeSignal() === 'success'\",\n },\n})\nexport class FormMessageComponent {\n @Input({ required: true })\n set messageType(messageType: MessageType) {\n this.messageTypeSignal.set(messageType);\n }\n\n @Input({ required: true })\n message!: string;\n\n messageTypeSignal = signal<MessageType>('error');\n\n symbolIdSignal = computed<APSymbolName>(() => {\n return this.messageTypeSignal() === 'error' ? 'error_fill' : 'rounded-check_fill';\n });\n\n private symbolRegistry = inject(SymbolRegistry);\n\n constructor() {\n this.symbolRegistry.registerSymbols([apErrorFill, apRoundedCheckFill]);\n }\n}\n","<ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolIdSignal()\" />\n<span>\n {{ message }}\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAmBa,oBAAoB,CAAA;IAC7B,IACI,WAAW,CAAC,WAAwB,EAAA;AACpC,QAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;KAC3C;AAGD,IAAA,OAAO,CAAU;AAEjB,IAAA,iBAAiB,GAAG,MAAM,CAAc,OAAO,CAAC,CAAC;AAEjD,IAAA,cAAc,GAAG,QAAQ,CAAe,MAAK;AACzC,QAAA,OAAO,IAAI,CAAC,iBAAiB,EAAE,KAAK,OAAO,GAAG,YAAY,GAAG,oBAAoB,CAAC;AACtF,KAAC,CAAC,CAAC;AAEK,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAEhD,IAAA,WAAA,GAAA;QACI,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,CAAC;KAC1E;uGAnBQ,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,aAAA,EAAA,iCAAA,EAAA,eAAA,EAAA,mCAAA,EAAA,EAAA,cAAA,EAAA,iBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnBjC,2GAMA,EAAA,MAAA,EAAA,CAAA,glBAAA,CAAA,EAAA,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