@agorapulse/ui-components 20.3.3 → 20.3.4
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.
|
Binary file
|
|
@@ -2,7 +2,7 @@ import { ButtonComponent } from '@agorapulse/ui-components/button';
|
|
|
2
2
|
import { CloseButtonComponent } from '@agorapulse/ui-components/close-button';
|
|
3
3
|
import { SymbolRegistry, apInfoFill, apErrorFill, apWarningFill, apTrash, apRoundedCheckFill, apClose, SymbolComponent } from '@agorapulse/ui-symbol';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { inject, ElementRef, EventEmitter, booleanAttribute, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
|
+
import { inject, ElementRef, input, EventEmitter, booleanAttribute, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
6
|
|
|
7
7
|
// Increasing integer for generating unique ids for infobox components.
|
|
8
8
|
let nextUniqueId = 0;
|
|
@@ -12,6 +12,7 @@ class InfoboxComponent {
|
|
|
12
12
|
buttonId = null;
|
|
13
13
|
buttonLabel = undefined;
|
|
14
14
|
buttonDataTrack = null;
|
|
15
|
+
buttonSymbolId = input(...(ngDevMode ? [undefined, { debugName: "buttonSymbolId" }] : []));
|
|
15
16
|
closable = false;
|
|
16
17
|
title;
|
|
17
18
|
type = 'info';
|
|
@@ -37,11 +38,11 @@ class InfoboxComponent {
|
|
|
37
38
|
this.closed.emit();
|
|
38
39
|
}
|
|
39
40
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: InfoboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: InfoboxComponent, isStandalone: true, selector: "ap-infobox", inputs: { buttonId: "buttonId", buttonLabel: "buttonLabel", buttonDataTrack: "buttonDataTrack", closable:
|
|
41
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: InfoboxComponent, isStandalone: true, selector: "ap-infobox", inputs: { buttonId: { classPropertyName: "buttonId", publicName: "buttonId", isSignal: false, isRequired: false, transformFunction: null }, buttonLabel: { classPropertyName: "buttonLabel", publicName: "buttonLabel", isSignal: false, isRequired: false, transformFunction: null }, buttonDataTrack: { classPropertyName: "buttonDataTrack", publicName: "buttonDataTrack", isSignal: false, isRequired: false, transformFunction: null }, buttonSymbolId: { classPropertyName: "buttonSymbolId", publicName: "buttonSymbolId", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, title: { classPropertyName: "title", publicName: "title", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { buttonClicked: "buttonClicked", closed: "closed" }, ngImport: i0, template: "<div\n class=\"main\"\n [class.info]=\"type === 'info'\"\n [class.warning]=\"type === 'warning'\"\n [class.error]=\"type === 'error'\"\n [class.success]=\"type === 'success'\"\n [class.has-title]=\"!!title\">\n <div class=\"status-banner\"></div>\n <div class=\"wrapper\">\n <div class=\"symbol-content\">\n <div class=\"symbol-wrapper\">\n <ap-symbol\n class=\"status\"\n size=\"sm\"\n [symbolId]=\"symbolIds[type]\" />\n </div>\n <div class=\"content\">\n <div class=\"texts\">\n @if (title) {\n <span class=\"title\">\n {{ title }}\n </span>\n }\n <span class=\"text\">\n <ng-content />\n </span>\n </div>\n @if (buttonLabel) {\n <ap-button\n name=\"infobox-button\"\n symbolPosition=\"left\"\n [symbolId]=\"buttonSymbolId()\"\n [id]=\"buttonId ?? defaultButtonId\"\n [attr.data-track]=\"buttonDataTrack\"\n [config]=\"{\n style: 'stroked',\n color: 'grey'\n }\"\n (click)=\"onClickButton()\">\n {{ buttonLabel }}\n </ap-button>\n }\n </div>\n </div>\n @if (closable) {\n <ap-close-button (closed)=\"onCloseInfobox()\" />\n }\n </div>\n</div>\n", styles: ["ap-infobox{--comp-icon-size: 20px;container:infobox/inline-size;display:block;width:100%;max-width:100%}ap-infobox .main{display:flex;font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm);align-items:center;color:var(--ref-color-grey-100);padding:var(--comp-infobox-padding-top) var(--comp-infobox-padding-right) var(--comp-infobox-padding-bottom) var(--comp-infobox-padding-left);border-radius:var(--comp-infobox-border-radius);overflow:hidden;font-family:var(--comp-infobox-text-title-font-family);box-sizing:border-box;position:relative;gap:var(--comp-infobox-button-margin-left)}ap-infobox .main .status-banner{position:absolute;left:0;top:0;width:4px;height:100%}ap-infobox .main ap-symbol{align-self:center}ap-infobox .main .symbol-wrapper{margin-top:1px}ap-infobox .main.has-title .symbol-wrapper{margin-top:var(--ref-spacing-xxxs)}ap-infobox .main .wrapper{display:flex;justify-content:space-between;width:100%;align-items:flex-start;gap:var(--ref-spacing-xxs)}ap-infobox .main .wrapper .symbol-content{display:flex;gap:var(--ref-spacing-xs);align-items:flex-start;flex:1}ap-infobox .main .wrapper .symbol-content .content{display:flex;flex-direction:column;align-items:flex-start;flex:1;justify-content:space-between;gap:var(--ref-spacing-xxs)}ap-infobox .main .wrapper .symbol-content .content ap-button button{width:unset}ap-infobox .main .wrapper .symbol-content .content .texts{display:flex;flex-direction:column;overflow-wrap:anywhere}ap-infobox .main .wrapper .symbol-content .content .texts .title{font-weight:var(--comp-infobox-text-title-weight);font-family:var(--comp-infobox-text-title-font-family);font-size:var(--comp-infobox-text-title-size);line-height:var(--comp-infobox-text-title-line-height)}ap-infobox .main.info{background-color:var(--comp-infobox-info-background-color)}ap-infobox .main.info ap-symbol.status{align-self:baseline;color:var(--comp-infobox-info-icon-color)}ap-infobox .main.info .status-banner{background-color:var(--comp-infobox-info-border-left-color)}ap-infobox .main.warning{background-color:var(--comp-infobox-warning-background-color)}ap-infobox .main.warning ap-symbol.status{color:var(--comp-infobox-warning-icon-color)}ap-infobox .main.warning .status-banner{background-color:var(--comp-infobox-warning-border-left-color)}ap-infobox .main.error{background-color:var(--comp-infobox-error-background-color)}ap-infobox .main.error ap-symbol.status{color:var(--comp-infobox-error-icon-color)}ap-infobox .main.error .status-banner{background-color:var(--comp-infobox-error-border-left-color)}ap-infobox .main.success{background-color:var(--comp-infobox-success-background-color)}ap-infobox .main.success ap-symbol.status{color:var(--comp-infobox-success-icon-color)}ap-infobox .main.success .status-banner{background-color:var(--comp-infobox-success-border-left-color)}@container infobox (min-width: 588px){.main .wrapper{align-items:center!important}.main .wrapper .symbol-wrapper{margin-top:0!important}.main .wrapper .symbol-content{align-items:center!important}.main .wrapper .symbol-content .content{flex-direction:row!important;align-items:center!important}}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }, { kind: "component", type: ButtonComponent, selector: "ap-button", inputs: ["ariaLabel", "disabled", "name", "form", "config", "loading", "locked", "menuTrigger", "symbolPosition", "symbolId"], outputs: ["menuOpened", "menuClosed", "click", "focus", "blur"] }, { kind: "component", type: CloseButtonComponent, selector: "ap-close-button", inputs: ["disabled", "ariaLabel", "dataTest"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
41
42
|
}
|
|
42
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: InfoboxComponent, decorators: [{
|
|
43
44
|
type: Component,
|
|
44
|
-
args: [{ selector: 'ap-infobox', imports: [SymbolComponent, ButtonComponent, CloseButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"main\"\n [class.info]=\"type === 'info'\"\n [class.warning]=\"type === 'warning'\"\n [class.error]=\"type === 'error'\"\n [class.success]=\"type === 'success'\"\n [class.has-title]=\"!!title\">\n <div class=\"status-banner\"></div>\n <div class=\"wrapper\">\n <div class=\"symbol-content\">\n <div class=\"symbol-wrapper\">\n <ap-symbol\n class=\"status\"\n size=\"sm\"\n [symbolId]=\"symbolIds[type]\" />\n </div>\n <div class=\"content\">\n <div class=\"texts\">\n @if (title) {\n <span class=\"title\">\n {{ title }}\n </span>\n }\n <span class=\"text\">\n <ng-content />\n </span>\n </div>\n @if (buttonLabel) {\n <ap-button\n name=\"infobox-button\"\n [id]=\"buttonId ?? defaultButtonId\"\n [attr.data-track]=\"buttonDataTrack\"\n [config]=\"{\n style: 'stroked',\n color: 'grey'\n }\"\n (click)=\"onClickButton()\">\n {{ buttonLabel }}\n </ap-button>\n }\n </div>\n </div>\n @if (closable) {\n <ap-close-button (closed)=\"onCloseInfobox()\" />\n }\n </div>\n</div>\n", styles: ["ap-infobox{--comp-icon-size: 20px;container:infobox/inline-size;display:block;width:100%;max-width:100%}ap-infobox .main{display:flex;font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm);align-items:center;color:var(--ref-color-grey-100);padding:var(--comp-infobox-padding-top) var(--comp-infobox-padding-right) var(--comp-infobox-padding-bottom) var(--comp-infobox-padding-left);border-radius:var(--comp-infobox-border-radius);overflow:hidden;font-family:var(--comp-infobox-text-title-font-family);box-sizing:border-box;position:relative;gap:var(--comp-infobox-button-margin-left)}ap-infobox .main .status-banner{position:absolute;left:0;top:0;width:4px;height:100%}ap-infobox .main ap-symbol{align-self:center}ap-infobox .main .symbol-wrapper{margin-top:1px}ap-infobox .main.has-title .symbol-wrapper{margin-top:var(--ref-spacing-xxxs)}ap-infobox .main .wrapper{display:flex;justify-content:space-between;width:100%;align-items:flex-start;gap:var(--ref-spacing-xxs)}ap-infobox .main .wrapper .symbol-content{display:flex;gap:var(--ref-spacing-xs);align-items:flex-start;flex:1}ap-infobox .main .wrapper .symbol-content .content{display:flex;flex-direction:column;align-items:flex-start;flex:1;justify-content:space-between;gap:var(--ref-spacing-xxs)}ap-infobox .main .wrapper .symbol-content .content ap-button button{width:unset}ap-infobox .main .wrapper .symbol-content .content .texts{display:flex;flex-direction:column;overflow-wrap:anywhere}ap-infobox .main .wrapper .symbol-content .content .texts .title{font-weight:var(--comp-infobox-text-title-weight);font-family:var(--comp-infobox-text-title-font-family);font-size:var(--comp-infobox-text-title-size);line-height:var(--comp-infobox-text-title-line-height)}ap-infobox .main.info{background-color:var(--comp-infobox-info-background-color)}ap-infobox .main.info ap-symbol.status{align-self:baseline;color:var(--comp-infobox-info-icon-color)}ap-infobox .main.info .status-banner{background-color:var(--comp-infobox-info-border-left-color)}ap-infobox .main.warning{background-color:var(--comp-infobox-warning-background-color)}ap-infobox .main.warning ap-symbol.status{color:var(--comp-infobox-warning-icon-color)}ap-infobox .main.warning .status-banner{background-color:var(--comp-infobox-warning-border-left-color)}ap-infobox .main.error{background-color:var(--comp-infobox-error-background-color)}ap-infobox .main.error ap-symbol.status{color:var(--comp-infobox-error-icon-color)}ap-infobox .main.error .status-banner{background-color:var(--comp-infobox-error-border-left-color)}ap-infobox .main.success{background-color:var(--comp-infobox-success-background-color)}ap-infobox .main.success ap-symbol.status{color:var(--comp-infobox-success-icon-color)}ap-infobox .main.success .status-banner{background-color:var(--comp-infobox-success-border-left-color)}@container infobox (min-width: 588px){.main .wrapper{align-items:center!important}.main .wrapper .symbol-wrapper{margin-top:0!important}.main .wrapper .symbol-content{align-items:center!important}.main .wrapper .symbol-content .content{flex-direction:row!important;align-items:center!important}}\n"] }]
|
|
45
|
+
args: [{ selector: 'ap-infobox', imports: [SymbolComponent, ButtonComponent, CloseButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"main\"\n [class.info]=\"type === 'info'\"\n [class.warning]=\"type === 'warning'\"\n [class.error]=\"type === 'error'\"\n [class.success]=\"type === 'success'\"\n [class.has-title]=\"!!title\">\n <div class=\"status-banner\"></div>\n <div class=\"wrapper\">\n <div class=\"symbol-content\">\n <div class=\"symbol-wrapper\">\n <ap-symbol\n class=\"status\"\n size=\"sm\"\n [symbolId]=\"symbolIds[type]\" />\n </div>\n <div class=\"content\">\n <div class=\"texts\">\n @if (title) {\n <span class=\"title\">\n {{ title }}\n </span>\n }\n <span class=\"text\">\n <ng-content />\n </span>\n </div>\n @if (buttonLabel) {\n <ap-button\n name=\"infobox-button\"\n symbolPosition=\"left\"\n [symbolId]=\"buttonSymbolId()\"\n [id]=\"buttonId ?? defaultButtonId\"\n [attr.data-track]=\"buttonDataTrack\"\n [config]=\"{\n style: 'stroked',\n color: 'grey'\n }\"\n (click)=\"onClickButton()\">\n {{ buttonLabel }}\n </ap-button>\n }\n </div>\n </div>\n @if (closable) {\n <ap-close-button (closed)=\"onCloseInfobox()\" />\n }\n </div>\n</div>\n", styles: ["ap-infobox{--comp-icon-size: 20px;container:infobox/inline-size;display:block;width:100%;max-width:100%}ap-infobox .main{display:flex;font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm);align-items:center;color:var(--ref-color-grey-100);padding:var(--comp-infobox-padding-top) var(--comp-infobox-padding-right) var(--comp-infobox-padding-bottom) var(--comp-infobox-padding-left);border-radius:var(--comp-infobox-border-radius);overflow:hidden;font-family:var(--comp-infobox-text-title-font-family);box-sizing:border-box;position:relative;gap:var(--comp-infobox-button-margin-left)}ap-infobox .main .status-banner{position:absolute;left:0;top:0;width:4px;height:100%}ap-infobox .main ap-symbol{align-self:center}ap-infobox .main .symbol-wrapper{margin-top:1px}ap-infobox .main.has-title .symbol-wrapper{margin-top:var(--ref-spacing-xxxs)}ap-infobox .main .wrapper{display:flex;justify-content:space-between;width:100%;align-items:flex-start;gap:var(--ref-spacing-xxs)}ap-infobox .main .wrapper .symbol-content{display:flex;gap:var(--ref-spacing-xs);align-items:flex-start;flex:1}ap-infobox .main .wrapper .symbol-content .content{display:flex;flex-direction:column;align-items:flex-start;flex:1;justify-content:space-between;gap:var(--ref-spacing-xxs)}ap-infobox .main .wrapper .symbol-content .content ap-button button{width:unset}ap-infobox .main .wrapper .symbol-content .content .texts{display:flex;flex-direction:column;overflow-wrap:anywhere}ap-infobox .main .wrapper .symbol-content .content .texts .title{font-weight:var(--comp-infobox-text-title-weight);font-family:var(--comp-infobox-text-title-font-family);font-size:var(--comp-infobox-text-title-size);line-height:var(--comp-infobox-text-title-line-height)}ap-infobox .main.info{background-color:var(--comp-infobox-info-background-color)}ap-infobox .main.info ap-symbol.status{align-self:baseline;color:var(--comp-infobox-info-icon-color)}ap-infobox .main.info .status-banner{background-color:var(--comp-infobox-info-border-left-color)}ap-infobox .main.warning{background-color:var(--comp-infobox-warning-background-color)}ap-infobox .main.warning ap-symbol.status{color:var(--comp-infobox-warning-icon-color)}ap-infobox .main.warning .status-banner{background-color:var(--comp-infobox-warning-border-left-color)}ap-infobox .main.error{background-color:var(--comp-infobox-error-background-color)}ap-infobox .main.error ap-symbol.status{color:var(--comp-infobox-error-icon-color)}ap-infobox .main.error .status-banner{background-color:var(--comp-infobox-error-border-left-color)}ap-infobox .main.success{background-color:var(--comp-infobox-success-background-color)}ap-infobox .main.success ap-symbol.status{color:var(--comp-infobox-success-icon-color)}ap-infobox .main.success .status-banner{background-color:var(--comp-infobox-success-border-left-color)}@container infobox (min-width: 588px){.main .wrapper{align-items:center!important}.main .wrapper .symbol-wrapper{margin-top:0!important}.main .wrapper .symbol-content{align-items:center!important}.main .wrapper .symbol-content .content{flex-direction:row!important;align-items:center!important}}\n"] }]
|
|
45
46
|
}], ctorParameters: () => [], propDecorators: { buttonId: [{
|
|
46
47
|
type: Input
|
|
47
48
|
}], buttonLabel: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-infobox.mjs","sources":["../../../libs/ui-components/infobox/src/infobox.component.ts","../../../libs/ui-components/infobox/src/infobox.component.html","../../../libs/ui-components/infobox/src/agorapulse-ui-components-infobox.ts"],"sourcesContent":["import { ButtonComponent } from '@agorapulse/ui-components/button';\nimport { CloseButtonComponent } from '@agorapulse/ui-components/close-button';\nimport {\n SymbolComponent,\n SymbolRegistry,\n agorapulseSymbol,\n apClose,\n apErrorFill,\n apInfoFill,\n apRoundedCheckFill,\n apTrash,\n apWarningFill,\n} from '@agorapulse/ui-symbol';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n} from '@angular/core';\n\n// Increasing integer for generating unique ids for infobox components.\nlet nextUniqueId = 0;\n\n@Component({\n selector: 'ap-infobox',\n templateUrl: './infobox.component.html',\n styleUrls: ['./infobox.component.scss'],\n imports: [SymbolComponent, ButtonComponent, CloseButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class InfoboxComponent {\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly elementRef = inject(ElementRef);\n\n @Input() buttonId: string | null = null;\n @Input() buttonLabel: string | undefined = undefined;\n @Input() buttonDataTrack: string | null = null;\n @Input({\n transform: booleanAttribute,\n })\n closable = false;\n @Input() title?: string;\n @Input() type: 'info' | 'warning' | 'error' | 'success' = 'info';\n\n @Output() buttonClicked = new EventEmitter<void>();\n @Output() closed = new EventEmitter<void>();\n\n displayDirection: 'horizontal' | 'vertical' = 'horizontal';\n defaultButtonId: string = '';\n\n readonly symbolIds: { [k: string]: agorapulseSymbol } = {\n info: 'info_fill',\n warning: 'warning_fill',\n error: 'error_fill',\n success: 'rounded-check_fill',\n };\n\n constructor() {\n this.symbolRegistry.registerSymbols([apInfoFill, apErrorFill, apWarningFill, apTrash, apRoundedCheckFill, apClose]);\n this.defaultButtonId = `infobox-button-${++nextUniqueId}`;\n }\n\n onClickButton(): void {\n this.buttonClicked.emit();\n }\n\n onCloseInfobox(): void {\n this.elementRef.nativeElement.remove();\n this.closed.emit();\n }\n}\n","<div\n class=\"main\"\n [class.info]=\"type === 'info'\"\n [class.warning]=\"type === 'warning'\"\n [class.error]=\"type === 'error'\"\n [class.success]=\"type === 'success'\"\n [class.has-title]=\"!!title\">\n <div class=\"status-banner\"></div>\n <div class=\"wrapper\">\n <div class=\"symbol-content\">\n <div class=\"symbol-wrapper\">\n <ap-symbol\n class=\"status\"\n size=\"sm\"\n [symbolId]=\"symbolIds[type]\" />\n </div>\n <div class=\"content\">\n <div class=\"texts\">\n @if (title) {\n <span class=\"title\">\n {{ title }}\n </span>\n }\n <span class=\"text\">\n <ng-content />\n </span>\n </div>\n @if (buttonLabel) {\n <ap-button\n name=\"infobox-button\"\n [id]=\"buttonId ?? defaultButtonId\"\n [attr.data-track]=\"buttonDataTrack\"\n [config]=\"{\n style: 'stroked',\n color: 'grey'\n }\"\n (click)=\"onClickButton()\">\n {{ buttonLabel }}\n </ap-button>\n }\n </div>\n </div>\n @if (closable) {\n <ap-close-button (closed)=\"onCloseInfobox()\" />\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-infobox.mjs","sources":["../../../libs/ui-components/infobox/src/infobox.component.ts","../../../libs/ui-components/infobox/src/infobox.component.html","../../../libs/ui-components/infobox/src/agorapulse-ui-components-infobox.ts"],"sourcesContent":["import { ButtonComponent } from '@agorapulse/ui-components/button';\nimport { CloseButtonComponent } from '@agorapulse/ui-components/close-button';\nimport {\n SymbolComponent,\n SymbolRegistry,\n agorapulseSymbol,\n apClose,\n apErrorFill,\n apInfoFill,\n apRoundedCheckFill,\n apTrash,\n apWarningFill,\n} from '@agorapulse/ui-symbol';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n Output,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n input,\n} from '@angular/core';\n\n// Increasing integer for generating unique ids for infobox components.\nlet nextUniqueId = 0;\n\n@Component({\n selector: 'ap-infobox',\n templateUrl: './infobox.component.html',\n styleUrls: ['./infobox.component.scss'],\n imports: [SymbolComponent, ButtonComponent, CloseButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class InfoboxComponent {\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly elementRef = inject(ElementRef);\n\n @Input() buttonId: string | null = null;\n @Input() buttonLabel: string | undefined = undefined;\n @Input() buttonDataTrack: string | null = null;\n buttonSymbolId = input<agorapulseSymbol>();\n @Input({\n transform: booleanAttribute,\n })\n closable = false;\n @Input() title?: string;\n @Input() type: 'info' | 'warning' | 'error' | 'success' = 'info';\n\n @Output() buttonClicked = new EventEmitter<void>();\n @Output() closed = new EventEmitter<void>();\n\n displayDirection: 'horizontal' | 'vertical' = 'horizontal';\n defaultButtonId: string = '';\n\n readonly symbolIds: { [k: string]: agorapulseSymbol } = {\n info: 'info_fill',\n warning: 'warning_fill',\n error: 'error_fill',\n success: 'rounded-check_fill',\n };\n\n constructor() {\n this.symbolRegistry.registerSymbols([apInfoFill, apErrorFill, apWarningFill, apTrash, apRoundedCheckFill, apClose]);\n this.defaultButtonId = `infobox-button-${++nextUniqueId}`;\n }\n\n onClickButton(): void {\n this.buttonClicked.emit();\n }\n\n onCloseInfobox(): void {\n this.elementRef.nativeElement.remove();\n this.closed.emit();\n }\n}\n","<div\n class=\"main\"\n [class.info]=\"type === 'info'\"\n [class.warning]=\"type === 'warning'\"\n [class.error]=\"type === 'error'\"\n [class.success]=\"type === 'success'\"\n [class.has-title]=\"!!title\">\n <div class=\"status-banner\"></div>\n <div class=\"wrapper\">\n <div class=\"symbol-content\">\n <div class=\"symbol-wrapper\">\n <ap-symbol\n class=\"status\"\n size=\"sm\"\n [symbolId]=\"symbolIds[type]\" />\n </div>\n <div class=\"content\">\n <div class=\"texts\">\n @if (title) {\n <span class=\"title\">\n {{ title }}\n </span>\n }\n <span class=\"text\">\n <ng-content />\n </span>\n </div>\n @if (buttonLabel) {\n <ap-button\n name=\"infobox-button\"\n symbolPosition=\"left\"\n [symbolId]=\"buttonSymbolId()\"\n [id]=\"buttonId ?? defaultButtonId\"\n [attr.data-track]=\"buttonDataTrack\"\n [config]=\"{\n style: 'stroked',\n color: 'grey'\n }\"\n (click)=\"onClickButton()\">\n {{ buttonLabel }}\n </ap-button>\n }\n </div>\n </div>\n @if (closable) {\n <ap-close-button (closed)=\"onCloseInfobox()\" />\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AA0BA;AACA,IAAI,YAAY,GAAG,CAAC;MAUP,gBAAgB,CAAA;AACR,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IAEvC,QAAQ,GAAkB,IAAI;IAC9B,WAAW,GAAuB,SAAS;IAC3C,eAAe,GAAkB,IAAI;IAC9C,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAoB;IAI1C,QAAQ,GAAG,KAAK;AACP,IAAA,KAAK;IACL,IAAI,GAA6C,MAAM;AAEtD,IAAA,aAAa,GAAG,IAAI,YAAY,EAAQ;AACxC,IAAA,MAAM,GAAG,IAAI,YAAY,EAAQ;IAE3C,gBAAgB,GAA8B,YAAY;IAC1D,eAAe,GAAW,EAAE;AAEnB,IAAA,SAAS,GAAsC;AACpD,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,OAAO,EAAE,cAAc;AACvB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,OAAO,EAAE,oBAAoB;KAChC;AAED,IAAA,WAAA,GAAA;AACI,QAAA,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;AACnH,QAAA,IAAI,CAAC,eAAe,GAAG,kBAAkB,EAAE,YAAY,EAAE;;IAG7D,aAAa,GAAA;AACT,QAAA,IA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uB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,kuDAAA,EAAA,MAAA,EAAA,CAAA,okGAAA,CAAA,EAAA;wDAM5B,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,WAAW,EAAA,CAAA;sBAAnB;gBACQ,eAAe,EAAA,CAAA;sBAAvB;gBAKD,QAAQ,EAAA,CAAA;sBAHP,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,SAAS,EAAE,gBAAgB;AAC9B,qBAAA;gBAEQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBAES,aAAa,EAAA,CAAA;sBAAtB;gBACS,MAAM,EAAA,CAAA;sBAAf;;;AErDL;;AAEG;;;;"}
|
package/infobox/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { agorapulseSymbol } from '@agorapulse/ui-symbol';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
2
|
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import { agorapulseSymbol } from '@agorapulse/ui-symbol';
|
|
4
4
|
|
|
5
5
|
declare class InfoboxComponent {
|
|
6
6
|
private readonly symbolRegistry;
|
|
@@ -8,6 +8,7 @@ declare class InfoboxComponent {
|
|
|
8
8
|
buttonId: string | null;
|
|
9
9
|
buttonLabel: string | undefined;
|
|
10
10
|
buttonDataTrack: string | null;
|
|
11
|
+
buttonSymbolId: i0.InputSignal<string | undefined>;
|
|
11
12
|
closable: boolean;
|
|
12
13
|
title?: string;
|
|
13
14
|
type: 'info' | 'warning' | 'error' | 'success';
|
|
@@ -22,7 +23,7 @@ declare class InfoboxComponent {
|
|
|
22
23
|
onClickButton(): void;
|
|
23
24
|
onCloseInfobox(): void;
|
|
24
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<InfoboxComponent, never>;
|
|
25
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InfoboxComponent, "ap-infobox", never, { "buttonId": { "alias": "buttonId"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "buttonDataTrack": { "alias": "buttonDataTrack"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "title": { "alias": "title"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "buttonClicked": "buttonClicked"; "closed": "closed"; }, never, ["*"], true, never>;
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InfoboxComponent, "ap-infobox", never, { "buttonId": { "alias": "buttonId"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "buttonDataTrack": { "alias": "buttonDataTrack"; "required": false; }; "buttonSymbolId": { "alias": "buttonSymbolId"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; }; "title": { "alias": "title"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "buttonClicked": "buttonClicked"; "closed": "closed"; }, never, ["*"], true, never>;
|
|
26
27
|
static ngAcceptInputType_closable: unknown;
|
|
27
28
|
}
|
|
28
29
|
|
package/package.json
CHANGED
|
Binary file
|