@agorapulse/ui-components 22.9.1-beta.1 → 22.9.3-beta.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-toggle.mjs","sources":["../../../libs/ui-components/toggle/src/toggle.component.ts","../../../libs/ui-components/toggle/src/toggle.component.html","../../../libs/ui-components/toggle/src/agorapulse-ui-components-toggle.ts"],"sourcesContent":["import { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';\nimport { apCheck, apClose, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n OnChanges,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormControl, NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { first } from 'rxjs/operators';\n\nexport const AP_CHECKBOX_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n};\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-toggle',\n styleUrls: ['./toggle.component.scss'],\n imports: [SymbolComponent],\n providers: [\n AP_CHECKBOX_CONTROL_VALUE_ACCESSOR,\n {\n provide: NG_VALIDATORS,\n useExisting: ToggleComponent,\n multi: true,\n },\n MatDialog,\n ],\n templateUrl: './toggle.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class ToggleComponent implements ControlValueAccessor, AfterContentInit, OnChanges, OnInit {\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly dialog = inject(MatDialog);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @ViewChild('input') inputElement!: ElementRef<HTMLInputElement>;\n @ViewChild('label') labelElement!: ElementRef<HTMLInputElement>;\n @Input('aria-label') ariaLabel: string = '';\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n @Input('aria-describedby') ariaDescribedby: string | null = null;\n @Input() labelPosition: 'left' | 'right' = 'right';\n @Input({\n transform: booleanAttribute,\n })\n disabled = false;\n @Input() checked = false;\n @Input({\n transform: booleanAttribute,\n })\n required = false;\n @Input() confirm = false;\n @Input() confirmMessage = 'If you toggle this, it will affect other things. Are you sure';\n @Input() confirmOk = 'Confirm';\n @Input() confirmCancel = 'Cancel';\n @Input() confirmTitle = 'Are you sure?';\n @Input({\n required: true,\n })\n set name(name: string) {\n if (!name.endsWith('Checkbox')) {\n this._name = name + 'Checkbox';\n } else {\n this._name = name;\n }\n }\n get name(): string {\n return this._name;\n }\n // eslint-disable-next-line\n @Output() readonly change: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n hasLabel: boolean = false;\n private _name = '';\n private _controlValueAccessorChangeFn!: (value: boolean) => void;\n onTouched!: () => void;\n\n ngOnChanges(): void {\n if (this.labelElement) {\n this.hasLabel = !!this.labelElement.nativeElement.textContent?.trim();\n }\n }\n\n ngOnInit() {\n this.symbolRegistry.registerSymbols([apCheck, apClose]);\n }\n\n ngAfterContentInit(): void {\n if (this.labelElement) {\n this.hasLabel = !!this.labelElement.nativeElement.textContent?.trim();\n }\n }\n\n onValueChange() {\n if (!this.disabled) {\n if (!this.confirm) {\n if (this.onTouched) {\n this.onTouched();\n }\n this.changeValue();\n } else {\n const toggleConfirmModal = {\n contentText: this.confirmMessage,\n headerTitle: this.confirmTitle,\n footerCancelButtonLabel: this.confirmCancel,\n footerConfirmButtonLabel: this.confirmOk,\n footerConfirmButtonId: 'confirm',\n footerCancelButtonId: 'cancel',\n };\n const modalConfig = {\n matDialogConfig: {\n panelClass: 'design-system',\n width: '550px',\n },\n };\n\n const dialogRef = ConfirmModalComponent.open(this.dialog, toggleConfirmModal, modalConfig);\n dialogRef\n .afterClosed()\n .pipe(first())\n .subscribe(result => {\n if (result) {\n if (this.onTouched) {\n this.onTouched();\n }\n this.changeValue();\n }\n });\n }\n }\n }\n\n changeValue(): void {\n this.checked = !this.checked;\n this.focus();\n this.change.emit(this.checked);\n if (this._controlValueAccessorChangeFn) {\n this._controlValueAccessorChangeFn(this.checked);\n }\n\n // Assigning the value again here is redundant, but we have to do it in case it was\n // changed inside the `change` listener which will cause the input to be out of sync.\n if (this.inputElement) {\n this.inputElement.nativeElement.checked = this.checked;\n }\n this.cdr.markForCheck();\n }\n\n focus() {\n this.inputElement.nativeElement.focus();\n }\n\n writeValue(value: boolean): void {\n this.checked = value;\n this.cdr.markForCheck();\n }\n registerOnChange(fn: (value: boolean) => void): void {\n this._controlValueAccessorChangeFn = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n validate({ value }: FormControl) {\n return (\n this.required &&\n !value && {\n invalid: true,\n }\n );\n }\n\n _preventBubblingFromLabel(event: MouseEvent) {\n if (!!event.target && this.labelElement.nativeElement.contains(event.target as HTMLElement)) {\n event.stopPropagation();\n }\n }\n}\n","<div\n class=\"toggle\"\n (click)=\"_preventBubblingFromLabel($event)\">\n <input\n #input\n class=\"hidden\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"name\"\n [name]=\"name\"\n [checked]=\"checked\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [attr.data-test]=\"name\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-checked]=\"checked\"\n [class.checked]=\"checked\"\n (click)=\"onValueChange()\"\n (change)=\"$event.stopPropagation()\" />\n <div\n class=\"switch-container\"\n [class.label-left]=\"labelPosition === 'left'\">\n <div\n class=\"switch\"\n [class.checked]=\"checked\"\n [class.disabled]=\"disabled\"\n (click)=\"onValueChange()\">\n <div class=\"knob\">\n <ap-symbol\n [class.checked]=\"checked\"\n [symbolId]=\"checked ? 'check' : 'close'\" />\n </div>\n </div>\n <label\n #label\n [class.disabled]=\"disabled\"\n [for]=\"name\">\n <ng-content />\n </label>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAuBO,MAAM,kCAAkC,GAAG;AAC9C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,eAAe,CAAC;AAC9C,IAAA,KAAK,EAAE,IAAI;;MAoBF,eAAe,CAAA;AACP,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,IAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;AAC1B,IAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAE5B,IAAA,YAAY;AACZ,IAAA,YAAY;IACX,SAAS,GAAW,EAAE;IACjB,cAAc,GAAkB,IAAI;IACnC,eAAe,GAAkB,IAAI;IACvD,aAAa,GAAqB,OAAO;IAIlD,QAAQ,GAAG,KAAK;IACP,OAAO,GAAG,KAAK;IAIxB,QAAQ,GAAG,KAAK;IACP,OAAO,GAAG,KAAK;IACf,cAAc,GAAG,+DAA+D;IAChF,SAAS,GAAG,SAAS;IACrB,aAAa,GAAG,QAAQ;IACxB,YAAY,GAAG,eAAe;IACvC,IAGI,IAAI,CAAC,IAAY,EAAA;QACjB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;AAC5B,YAAA,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,UAAU;QAClC;aAAO;AACH,YAAA,IAAI,CAAC,KAAK,GAAG,IAAI;QACrB;IACJ;AACA,IAAA,IAAI,IAAI,GAAA;QACJ,OAAO,IAAI,CAAC,KAAK;IACrB;;AAEmB,IAAA,MAAM,GAA0B,IAAI,YAAY,EAAW;IAE9E,QAAQ,GAAY,KAAK;IACjB,KAAK,GAAG,EAAE;AACV,IAAA,6BA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AiB;;sBACvB,KAAK;uBAAC,kBAAkB;;sBACxB;;sBACA,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,SAAS,EAAE,gBAAgB;AAC9B,qBAAA;;sBAEA;;sBACA,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,SAAS,EAAE,gBAAgB;AAC9B,qBAAA;;sBAEA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,QAAQ,EAAE,IAAI;AACjB,qBAAA;;sBAYA;;;AErFL;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-toggle.mjs","sources":["../../../libs/ui-components/toggle/src/toggle.component.ts","../../../libs/ui-components/toggle/src/toggle.component.html","../../../libs/ui-components/toggle/src/agorapulse-ui-components-toggle.ts"],"sourcesContent":["import { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';\nimport { DefaultTextKey, I18nOf } from '@agorapulse/ui-components/i18n';\nimport { apCheck, apClose, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n inject,\n input,\n Input,\n OnChanges,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ControlValueAccessor, FormControl, NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { first } from 'rxjs/operators';\n\nconst CONFIRM_TITLE_KEY: DefaultTextKey = 'ui-components.toggle.confirm-title';\nconst CONFIRM_MESSAGE_KEY: DefaultTextKey = 'ui-components.toggle.confirm-message';\n\nexport const AP_CHECKBOX_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n};\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-toggle',\n styleUrls: ['./toggle.component.scss'],\n imports: [SymbolComponent],\n providers: [\n AP_CHECKBOX_CONTROL_VALUE_ACCESSOR,\n {\n provide: NG_VALIDATORS,\n useExisting: ToggleComponent,\n multi: true,\n },\n MatDialog,\n ],\n templateUrl: './toggle.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class ToggleComponent implements ControlValueAccessor, AfterContentInit, OnChanges, OnInit {\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly dialog = inject(MatDialog);\n private readonly cdr = inject(ChangeDetectorRef);\n\n @ViewChild('input') inputElement!: ElementRef<HTMLInputElement>;\n @ViewChild('label') labelElement!: ElementRef<HTMLInputElement>;\n @Input('aria-label') ariaLabel: string = '';\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n @Input('aria-describedby') ariaDescribedby: string | null = null;\n @Input() labelPosition: 'left' | 'right' = 'right';\n @Input({\n transform: booleanAttribute,\n })\n disabled = false;\n @Input() checked = false;\n @Input({\n transform: booleanAttribute,\n })\n required = false;\n @Input() confirm = false;\n\n /** Texts of the confirmation shown when `confirm` is set; the title and message default to the DS texts, the buttons to the confirm modal's. */\n readonly i18n = input<I18nOf<never, 'confirmTitle' | 'confirmMessage' | 'confirm' | 'cancel'>>({});\n\n @Input({\n required: true,\n })\n set name(name: string) {\n if (!name.endsWith('Checkbox')) {\n this._name = name + 'Checkbox';\n } else {\n this._name = name;\n }\n }\n get name(): string {\n return this._name;\n }\n // eslint-disable-next-line\n @Output() readonly change: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n hasLabel: boolean = false;\n private _name = '';\n private _controlValueAccessorChangeFn!: (value: boolean) => void;\n onTouched!: () => void;\n\n ngOnChanges(): void {\n if (this.labelElement) {\n this.hasLabel = !!this.labelElement.nativeElement.textContent?.trim();\n }\n }\n\n ngOnInit() {\n this.symbolRegistry.registerSymbols([apCheck, apClose]);\n }\n\n ngAfterContentInit(): void {\n if (this.labelElement) {\n this.hasLabel = !!this.labelElement.nativeElement.textContent?.trim();\n }\n }\n\n onValueChange() {\n if (!this.disabled) {\n if (!this.confirm) {\n if (this.onTouched) {\n this.onTouched();\n }\n this.changeValue();\n } else {\n const i18n = this.i18n();\n const toggleConfirmModal = {\n footerConfirmButtonId: 'confirm',\n footerCancelButtonId: 'cancel',\n i18n: {\n title: i18n.confirmTitle ?? CONFIRM_TITLE_KEY,\n message: i18n.confirmMessage ?? CONFIRM_MESSAGE_KEY,\n confirm: i18n.confirm,\n cancel: i18n.cancel,\n },\n };\n const modalConfig = {\n matDialogConfig: {\n panelClass: 'design-system',\n width: '550px',\n },\n };\n\n const dialogRef = ConfirmModalComponent.open(this.dialog, toggleConfirmModal, modalConfig);\n dialogRef\n .afterClosed()\n .pipe(first())\n .subscribe(result => {\n if (result) {\n if (this.onTouched) {\n this.onTouched();\n }\n this.changeValue();\n }\n });\n }\n }\n }\n\n changeValue(): void {\n this.checked = !this.checked;\n this.focus();\n this.change.emit(this.checked);\n if (this._controlValueAccessorChangeFn) {\n this._controlValueAccessorChangeFn(this.checked);\n }\n\n // Assigning the value again here is redundant, but we have to do it in case it was\n // changed inside the `change` listener which will cause the input to be out of sync.\n if (this.inputElement) {\n this.inputElement.nativeElement.checked = this.checked;\n }\n this.cdr.markForCheck();\n }\n\n focus() {\n this.inputElement.nativeElement.focus();\n }\n\n writeValue(value: boolean): void {\n this.checked = value;\n this.cdr.markForCheck();\n }\n registerOnChange(fn: (value: boolean) => void): void {\n this._controlValueAccessorChangeFn = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n validate({ value }: FormControl) {\n return (\n this.required &&\n !value && {\n invalid: true,\n }\n );\n }\n\n _preventBubblingFromLabel(event: MouseEvent) {\n if (!!event.target && this.labelElement.nativeElement.contains(event.target as HTMLElement)) {\n event.stopPropagation();\n }\n }\n}\n","<div\n class=\"toggle\"\n (click)=\"_preventBubblingFromLabel($event)\">\n <input\n #input\n class=\"hidden\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"name\"\n [name]=\"name\"\n [checked]=\"checked\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [attr.data-test]=\"name\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-checked]=\"checked\"\n [class.checked]=\"checked\"\n (click)=\"onValueChange()\"\n (change)=\"$event.stopPropagation()\" />\n <div\n class=\"switch-container\"\n [class.label-left]=\"labelPosition === 'left'\">\n <div\n class=\"switch\"\n [class.checked]=\"checked\"\n [class.disabled]=\"disabled\"\n (click)=\"onValueChange()\">\n <div class=\"knob\">\n <ap-symbol\n [class.checked]=\"checked\"\n [symbolId]=\"checked ? 'check' : 'close'\" />\n </div>\n </div>\n <label\n #label\n [class.disabled]=\"disabled\"\n [for]=\"name\">\n <ng-content />\n </label>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAyBA,MAAM,iBAAiB,GAAmB,oCAAoC;AAC9E,MAAM,mBAAmB,GAAmB,sCAAsC;AAE3E,MAAM,kCAAkC,GAAG;AAC9C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,eAAe,CAAC;AAC9C,IAAA,KAAK,EAAE,IAAI;;MAoBF,eAAe,CAAA;AACP,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,IAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;AAC1B,IAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAE5B,IAAA,YAAY;AACZ,IAAA,YAAY;IACX,SAAS,GAAW,EAAE;IACjB,cAAc,GAAkB,IAAI;IACnC,eAAe,GAAkB,IAAI;IACvD,aAAa,GAAqB,OAAO;IAIlD,QAAQ,GAAG,KAAK;IACP,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AEZ,CAAC,eAAe,CAAC,EAAA,SAAA,EACf;wBACP,kCAAkC;AAClC,wBAAA;AACI,4BAAA,OAAO,EAAE,aAAa;AACtB,4BAAA,WAAW,EAAA,eAAiB;AAC5B,4BAAA,KAAK,EAAE,IAAI;AACd,yBAAA;wBACD,SAAS;qBACZ,EAAA,aAAA,EAEc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,mxCAAA,EAAA,MAAA,EAAA,CAAA,q2GAAA,CAAA,EAAA;;sBAOpC,SAAS;uBAAC,OAAO;;sBACjB,SAAS;uBAAC,OAAO;;sBACjB,KAAK;uBAAC,YAAY;;sBAClB,KAAK;uBAAC,iBAAiB;;sBACvB,KAAK;uBAAC,kBAAkB;;sBACxB;;sBACA,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,SAAS,EAAE,gBAAgB;AAC9B,qBAAA;;sBAEA;;sBACA,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,SAAS,EAAE,gBAAgB;AAC9B,qBAAA;;sBAEA;;sBAKA,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,QAAQ,EAAE,IAAI;AACjB,qBAAA;;sBAYA;;;AE1FL;;AAEG;;;;"}
@@ -35,7 +35,7 @@ export { PasswordInputComponent } from '@agorapulse/ui-components/password-input
35
35
  import { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';
36
36
  export { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';
37
37
  import { SnackbarsThreadComponent } from '@agorapulse/ui-components/snackbars-thread';
38
- export { CodeStatus, SnackbarTypeValues, SnackbarsThreadComponent, SnackbarsThreadService, generateCodeStatus } from '@agorapulse/ui-components/snackbars-thread';
38
+ export { SnackbarTypeValues, SnackbarsThreadComponent, SnackbarsThreadService } from '@agorapulse/ui-components/snackbars-thread';
39
39
  import { StepperComponent } from '@agorapulse/ui-components/stepper';
40
40
  export { StepperComponent } from '@agorapulse/ui-components/stepper';
41
41
  import { TooltipDirective } from '@agorapulse/ui-components/tooltip';
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components.mjs","sources":["../../../libs/ui-components/src/lib/agorapulse-ui-components.module.ts","../../../libs/ui-components/index.ts","../../../libs/ui-components/agorapulse-ui-components.ts"],"sourcesContent":["// Modules\nimport { AddCommentComponent } from '@agorapulse/ui-components/add-comment';\nimport { AvatarComponent } from '@agorapulse/ui-components/avatar';\nimport { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';\nimport { DatepickerComponent } from '@agorapulse/ui-components/datepicker';\nimport {\n AutosizeTextareaDirective,\n DefaultImageDirective,\n EllipsisDirective,\n EqualValidatorDirective,\n FrozenGifDirective,\n MultiStyleTextDirective,\n} from '@agorapulse/ui-components/directives';\nimport { DotStepperComponent } from '@agorapulse/ui-components/dot-stepper';\nimport { InfoboxComponent } from '@agorapulse/ui-components/infobox';\nimport { LabelComponent } from '@agorapulse/ui-components/labels';\nimport { LabelsSelectorComponent } from '@agorapulse/ui-components/labels-selector';\nimport { MediaDisplayOverlayDialogComponent } from '@agorapulse/ui-components/media-display-overlay';\nimport { ModalComponent } from '@agorapulse/ui-components/modal';\nimport { DayDisabledPipe, NeoDatepickerComponent } from '@agorapulse/ui-components/neo-datepicker';\nimport { NotificationComponent } from '@agorapulse/ui-components/notification';\nimport { OverflowListComponent } from '@agorapulse/ui-components/overflow-list';\nimport { PaginatorButtonComponent, PaginatorComponent } from '@agorapulse/ui-components/paginator';\nimport { PasswordInputComponent } from '@agorapulse/ui-components/password-input';\nimport { PopmenuModule } from '@agorapulse/ui-components/popmenu';\nimport { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';\nimport { SnackbarsThreadComponent } from '@agorapulse/ui-components/snackbars-thread';\nimport { StepperComponent } from '@agorapulse/ui-components/stepper';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { NgModule } from '@angular/core';\nimport { MAT_TABS_CONFIG } from '@angular/material/tabs';\n\n/**\n * @deprecated for better tree-shaking, use standalone component import instead\n */\n@NgModule({\n declarations: [],\n imports: [\n // Components\n AvatarComponent,\n StepperComponent,\n ConfirmModalComponent,\n DatepickerComponent,\n DotStepperComponent,\n EllipsisDirective,\n InfoboxComponent,\n OverflowListComponent,\n LabelsSelectorComponent,\n NeoDatepickerComponent,\n MediaDisplayOverlayDialogComponent,\n ModalComponent,\n PasswordInputComponent,\n LabelComponent,\n NotificationComponent,\n PaginatorComponent,\n PaginatorButtonComponent,\n SlideToggleComponent,\n SnackbarsThreadComponent,\n // Directives\n DefaultImageDirective,\n FrozenGifDirective,\n EqualValidatorDirective,\n MultiStyleTextDirective,\n TooltipDirective,\n AddCommentComponent,\n AutosizeTextareaDirective,\n // Pipes\n DayDisabledPipe,\n ],\n exports: [\n // Components\n AddCommentComponent,\n AvatarComponent,\n StepperComponent,\n ConfirmModalComponent,\n DatepickerComponent,\n NeoDatepickerComponent,\n DotStepperComponent,\n EllipsisDirective,\n InfoboxComponent,\n LabelComponent,\n OverflowListComponent,\n MediaDisplayOverlayDialogComponent,\n ModalComponent,\n PasswordInputComponent,\n LabelsSelectorComponent,\n NotificationComponent,\n PaginatorComponent,\n PaginatorButtonComponent,\n SlideToggleComponent,\n SnackbarsThreadComponent,\n // Pipes\n DayDisabledPipe,\n // Directives\n AutosizeTextareaDirective,\n DefaultImageDirective,\n FrozenGifDirective,\n EqualValidatorDirective,\n MultiStyleTextDirective,\n TooltipDirective,\n // Modules\n PopmenuModule,\n ],\n providers: [\n // Disable ripple effect\n // {provide: MAT_RIPPLE_GLOBAL_OPTIONS, useValue: {disabled: true}},\n // Disable tabs animation\n { provide: MAT_TABS_CONFIG, useValue: { animationDuration: '0ms' } },\n ],\n})\nexport class AgorapulseUiComponentsModule {}\n","/*\n * Public API Surface of ui\n */\n\n// Module\nexport { PopmenuModule } from '@agorapulse/ui-components/popmenu';\nexport { AgorapulseUiComponentsModule } from './src/lib/agorapulse-ui-components.module';\n\n// Directive\nexport {\n AutosizeTextareaDirective,\n CheckboxDirective,\n DefaultImageDirective,\n EllipsisDirective,\n EqualValidatorDirective,\n FrozenGifDirective,\n MultiStyleTextDirective,\n} from '@agorapulse/ui-components/directives';\nexport { PopmenuDirective } from '@agorapulse/ui-components/popmenu';\nexport { TooltipDirective, TooltipExternalTriggerDirective } from '@agorapulse/ui-components/tooltip';\n\n// Dropdown base\nexport { DropdownOptionDirective, DropdownOverlay, DropdownTriggerDirective, createDropdownOverlay } from '@agorapulse/ui-components/dropdown-base';\nexport { DropdownContentDirective, DropdownPanelComponent } from '@agorapulse/ui-components/dropdown-panel';\n\n// Component\nexport { ActionDropdownComponent, ActionDropdownItem, ActionDropdownTriggerDirective } from '@agorapulse/ui-components/action-dropdown';\nexport { AddCommentComponent } from '@agorapulse/ui-components/add-comment';\nexport { AutocompleteComponent } from '@agorapulse/ui-components/autocomplete';\nexport { AvatarComponent, AvatarItem } from '@agorapulse/ui-components/avatar';\nexport { BadgeComponent } from '@agorapulse/ui-components/badge';\nexport { ButtonComponent } from '@agorapulse/ui-components/button';\nexport { CheckboxComponent } from '@agorapulse/ui-components/checkbox';\nexport { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';\nexport { CounterComponent } from '@agorapulse/ui-components/counter';\nexport {\n DatepickerComponent,\n DatepickerMode,\n DatepickerPreset,\n DatepickerSelectComponent,\n DatepickerValue,\n defaultDatepickerPresets,\n isPeriod,\n Period,\n} from '@agorapulse/ui-components/datepicker';\nexport { DotStepperComponent } from '@agorapulse/ui-components/dot-stepper';\nexport { IconButtonComponent } from '@agorapulse/ui-components/icon-button';\nexport { InfoboxComponent } from '@agorapulse/ui-components/infobox';\nexport { LabelComponent } from '@agorapulse/ui-components/labels';\nexport { LabelsSelectorComponent } from '@agorapulse/ui-components/labels-selector';\nexport { InputComponent } from '@agorapulse/ui-components/legacy/input';\nexport { SelectComponent } from '@agorapulse/ui-components/legacy/select';\nexport { TextareaComponent } from '@agorapulse/ui-components/legacy/textarea';\nexport { MediaDisplayOverlayDialogComponent } from '@agorapulse/ui-components/media-display-overlay';\nexport { ModalComponent, ModalConfig } from '@agorapulse/ui-components/modal';\nexport { NavSelectorComponent } from '@agorapulse/ui-components/nav-selector';\nexport {\n DayDisabledPipe,\n NeoDatePickerLocale,\n NeoDatePickerMode,\n NeoDatePickerStartsOn,\n NeoDatepickerComponent,\n} from '@agorapulse/ui-components/neo-datepicker';\nexport { NotificationComponent } from '@agorapulse/ui-components/notification';\nexport { OverflowListComponent, OverflowListDisplayType, OverflowListMode } from '@agorapulse/ui-components/overflow-list';\nexport { PaginatorButtonComponent, PaginatorComponent } from '@agorapulse/ui-components/paginator';\nexport { PasswordInputComponent } from '@agorapulse/ui-components/password-input';\nexport { PopmenuComponent } from '@agorapulse/ui-components/popmenu';\nexport { RadioComponent } from '@agorapulse/ui-components/radio';\nexport { RadioButtonCardComponent } from '@agorapulse/ui-components/radio-button-card';\nexport { SegmentedControlComponent, SegmentedControlOption } from '@agorapulse/ui-components/segmented-control';\nexport {\n SelectionDropdownComponent,\n SelectionDropdownItem,\n SelectionDropdownTriggerDirective,\n} from '@agorapulse/ui-components/selection-dropdown';\nexport { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';\nexport { SnackbarsThreadComponent } from '@agorapulse/ui-components/snackbars-thread';\nexport { SocialButtonComponent } from '@agorapulse/ui-components/social-button';\nexport { StatusComponent } from '@agorapulse/ui-components/status';\nexport { StatusCardActor, StatusCardComponent } from '@agorapulse/ui-components/status-card';\nexport { StepperComponent } from '@agorapulse/ui-components/stepper';\nexport { TagComponent } from '@agorapulse/ui-components/tag';\nexport { ToggleComponent } from '@agorapulse/ui-components/toggle';\n\n// Service\nexport { SnackbarsThreadService } from '@agorapulse/ui-components/snackbars-thread';\n\n// Model\nexport { ConfirmModalTexts } from '@agorapulse/ui-components/confirm-modal';\nexport * from '@agorapulse/ui-components/filter-dropdown';\nexport {\n CodeStatus,\n SnackbarTypeValues,\n SnackbarsThreadBase,\n externalSnackbarTypeAllowed,\n generateCodeStatus,\n} from '@agorapulse/ui-components/snackbars-thread';\nexport { Step } from '@agorapulse/ui-components/stepper';\nexport { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType } from '@agorapulse/ui-components/tooltip';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAgCA;;AAEG;MA4EU,4BAA4B,CAAA;uGAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAA5B,4BAA4B,EAAA,OAAA,EAAA;;YAvEjC,eAAe;YACf,gBAAgB;YAChB,qBAAqB;YACrB,mBAAmB;YACnB,mBAAmB;YACnB,iBAAiB;YACjB,gBAAgB;YAChB,qBAAqB;YACrB,uBAAuB;YACvB,sBAAsB;YACtB,kCAAkC;YAClC,cAAc;YACd,sBAAsB;YACtB,cAAc;YACd,qBAAqB;YACrB,kBAAkB;YAClB,wBAAwB;YACxB,oBAAoB;YACpB,wBAAwB;;YAExB,qBAAqB;YACrB,kBAAkB;YAClB,uBAAuB;YACvB,uBAAuB;YACvB,gBAAgB;YAChB,mBAAmB;YACnB,yBAAyB;;YAEzB,eAAe,CAAA,EAAA,OAAA,EAAA;;YAIf,mBAAmB;YACnB,eAAe;YACf,gBAAgB;YAChB,qBAAqB;YACrB,mBAAmB;YACnB,sBAAsB;YACtB,mBAAmB;YACnB,iBAAiB;YACjB,gBAAgB;YAChB,cAAc;YACd,qBAAqB;YACrB,kCAAkC;YAClC,cAAc;YACd,sBAAsB;YACtB,uBAAuB;YACvB,qBAAqB;YACrB,kBAAkB;YAClB,wBAAwB;YACxB,oBAAoB;YACpB,wBAAwB;;YAExB,eAAe;;YAEf,yBAAyB;YACzB,qBAAqB;YACrB,kBAAkB;YAClB,uBAAuB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BAAA,OAAO,EAAE;;wBAEL,mBAAmB;wBACnB,eAAe;wBACf,gBAAgB;wBAChB,qBAAqB;wBACrB,mBAAmB;wBACnB,sBAAsB;wBACtB,mBAAmB;wBACnB,iBAAiB;wBACjB,gBAAgB;wBAChB,cAAc;wBACd,qBAAqB;wBACrB,kCAAkC;wBAClC,cAAc;wBACd,sBAAsB;wBACtB,uBAAuB;wBACvB,qBAAqB;wBACrB,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;wBACpB,wBAAwB;;wBAExB,eAAe;;wBAEf,yBAAyB;wBACzB,qBAAqB;wBACrB,kBAAkB;wBAClB,uBAAuB;wBACvB,uBAAuB;wBACvB,gBAAgB;;wBAEhB,aAAa;AAChB,qBAAA;AACD,oBAAA,SAAS,EAAE;;;;wBAIP,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE;AACvE,qBAAA;AACJ,iBAAA;;;AC7GD;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components.mjs","sources":["../../../libs/ui-components/src/lib/agorapulse-ui-components.module.ts","../../../libs/ui-components/index.ts","../../../libs/ui-components/agorapulse-ui-components.ts"],"sourcesContent":["// Modules\nimport { AddCommentComponent } from '@agorapulse/ui-components/add-comment';\nimport { AvatarComponent } from '@agorapulse/ui-components/avatar';\nimport { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';\nimport { DatepickerComponent } from '@agorapulse/ui-components/datepicker';\nimport {\n AutosizeTextareaDirective,\n DefaultImageDirective,\n EllipsisDirective,\n EqualValidatorDirective,\n FrozenGifDirective,\n MultiStyleTextDirective,\n} from '@agorapulse/ui-components/directives';\nimport { DotStepperComponent } from '@agorapulse/ui-components/dot-stepper';\nimport { InfoboxComponent } from '@agorapulse/ui-components/infobox';\nimport { LabelComponent } from '@agorapulse/ui-components/labels';\nimport { LabelsSelectorComponent } from '@agorapulse/ui-components/labels-selector';\nimport { MediaDisplayOverlayDialogComponent } from '@agorapulse/ui-components/media-display-overlay';\nimport { ModalComponent } from '@agorapulse/ui-components/modal';\nimport { DayDisabledPipe, NeoDatepickerComponent } from '@agorapulse/ui-components/neo-datepicker';\nimport { NotificationComponent } from '@agorapulse/ui-components/notification';\nimport { OverflowListComponent } from '@agorapulse/ui-components/overflow-list';\nimport { PaginatorButtonComponent, PaginatorComponent } from '@agorapulse/ui-components/paginator';\nimport { PasswordInputComponent } from '@agorapulse/ui-components/password-input';\nimport { PopmenuModule } from '@agorapulse/ui-components/popmenu';\nimport { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';\nimport { SnackbarsThreadComponent } from '@agorapulse/ui-components/snackbars-thread';\nimport { StepperComponent } from '@agorapulse/ui-components/stepper';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { NgModule } from '@angular/core';\nimport { MAT_TABS_CONFIG } from '@angular/material/tabs';\n\n/**\n * @deprecated for better tree-shaking, use standalone component import instead\n */\n@NgModule({\n declarations: [],\n imports: [\n // Components\n AvatarComponent,\n StepperComponent,\n ConfirmModalComponent,\n DatepickerComponent,\n DotStepperComponent,\n EllipsisDirective,\n InfoboxComponent,\n OverflowListComponent,\n LabelsSelectorComponent,\n NeoDatepickerComponent,\n MediaDisplayOverlayDialogComponent,\n ModalComponent,\n PasswordInputComponent,\n LabelComponent,\n NotificationComponent,\n PaginatorComponent,\n PaginatorButtonComponent,\n SlideToggleComponent,\n SnackbarsThreadComponent,\n // Directives\n DefaultImageDirective,\n FrozenGifDirective,\n EqualValidatorDirective,\n MultiStyleTextDirective,\n TooltipDirective,\n AddCommentComponent,\n AutosizeTextareaDirective,\n // Pipes\n DayDisabledPipe,\n ],\n exports: [\n // Components\n AddCommentComponent,\n AvatarComponent,\n StepperComponent,\n ConfirmModalComponent,\n DatepickerComponent,\n NeoDatepickerComponent,\n DotStepperComponent,\n EllipsisDirective,\n InfoboxComponent,\n LabelComponent,\n OverflowListComponent,\n MediaDisplayOverlayDialogComponent,\n ModalComponent,\n PasswordInputComponent,\n LabelsSelectorComponent,\n NotificationComponent,\n PaginatorComponent,\n PaginatorButtonComponent,\n SlideToggleComponent,\n SnackbarsThreadComponent,\n // Pipes\n DayDisabledPipe,\n // Directives\n AutosizeTextareaDirective,\n DefaultImageDirective,\n FrozenGifDirective,\n EqualValidatorDirective,\n MultiStyleTextDirective,\n TooltipDirective,\n // Modules\n PopmenuModule,\n ],\n providers: [\n // Disable ripple effect\n // {provide: MAT_RIPPLE_GLOBAL_OPTIONS, useValue: {disabled: true}},\n // Disable tabs animation\n { provide: MAT_TABS_CONFIG, useValue: { animationDuration: '0ms' } },\n ],\n})\nexport class AgorapulseUiComponentsModule {}\n","/*\n * Public API Surface of ui\n */\n\n// Module\nexport { PopmenuModule } from '@agorapulse/ui-components/popmenu';\nexport { AgorapulseUiComponentsModule } from './src/lib/agorapulse-ui-components.module';\n\n// Directive\nexport {\n AutosizeTextareaDirective,\n CheckboxDirective,\n DefaultImageDirective,\n EllipsisDirective,\n EqualValidatorDirective,\n FrozenGifDirective,\n MultiStyleTextDirective,\n} from '@agorapulse/ui-components/directives';\nexport { PopmenuDirective } from '@agorapulse/ui-components/popmenu';\nexport { TooltipDirective, TooltipExternalTriggerDirective } from '@agorapulse/ui-components/tooltip';\n\n// Dropdown base\nexport { DropdownOptionDirective, DropdownOverlay, DropdownTriggerDirective, createDropdownOverlay } from '@agorapulse/ui-components/dropdown-base';\nexport { DropdownContentDirective, DropdownPanelComponent } from '@agorapulse/ui-components/dropdown-panel';\n\n// Component\nexport { ActionDropdownComponent, ActionDropdownItem, ActionDropdownTriggerDirective } from '@agorapulse/ui-components/action-dropdown';\nexport { AddCommentComponent } from '@agorapulse/ui-components/add-comment';\nexport { AutocompleteComponent } from '@agorapulse/ui-components/autocomplete';\nexport { AvatarComponent, AvatarItem } from '@agorapulse/ui-components/avatar';\nexport { BadgeComponent } from '@agorapulse/ui-components/badge';\nexport { ButtonComponent } from '@agorapulse/ui-components/button';\nexport { CheckboxComponent } from '@agorapulse/ui-components/checkbox';\nexport { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';\nexport { CounterComponent } from '@agorapulse/ui-components/counter';\nexport {\n DatepickerComponent,\n DatepickerMode,\n DatepickerPreset,\n DatepickerSelectComponent,\n DatepickerValue,\n defaultDatepickerPresets,\n isPeriod,\n Period,\n} from '@agorapulse/ui-components/datepicker';\nexport { DotStepperComponent } from '@agorapulse/ui-components/dot-stepper';\nexport { IconButtonComponent } from '@agorapulse/ui-components/icon-button';\nexport { InfoboxComponent } from '@agorapulse/ui-components/infobox';\nexport { LabelComponent } from '@agorapulse/ui-components/labels';\nexport { LabelsSelectorComponent } from '@agorapulse/ui-components/labels-selector';\nexport { InputComponent } from '@agorapulse/ui-components/legacy/input';\nexport { SelectComponent } from '@agorapulse/ui-components/legacy/select';\nexport { TextareaComponent } from '@agorapulse/ui-components/legacy/textarea';\nexport { MediaDisplayOverlayDialogComponent } from '@agorapulse/ui-components/media-display-overlay';\nexport { ModalComponent, ModalConfig } from '@agorapulse/ui-components/modal';\nexport { NavSelectorComponent } from '@agorapulse/ui-components/nav-selector';\nexport {\n DayDisabledPipe,\n NeoDatePickerLocale,\n NeoDatePickerMode,\n NeoDatePickerStartsOn,\n NeoDatepickerComponent,\n} from '@agorapulse/ui-components/neo-datepicker';\nexport { NotificationComponent } from '@agorapulse/ui-components/notification';\nexport { OverflowListComponent, OverflowListDisplayType, OverflowListMode } from '@agorapulse/ui-components/overflow-list';\nexport { PaginatorButtonComponent, PaginatorComponent } from '@agorapulse/ui-components/paginator';\nexport { PasswordInputComponent } from '@agorapulse/ui-components/password-input';\nexport { PopmenuComponent } from '@agorapulse/ui-components/popmenu';\nexport { RadioComponent } from '@agorapulse/ui-components/radio';\nexport { RadioButtonCardComponent } from '@agorapulse/ui-components/radio-button-card';\nexport { SegmentedControlComponent, SegmentedControlOption } from '@agorapulse/ui-components/segmented-control';\nexport {\n SelectionDropdownComponent,\n SelectionDropdownItem,\n SelectionDropdownTriggerDirective,\n} from '@agorapulse/ui-components/selection-dropdown';\nexport { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';\nexport { SnackbarsThreadComponent } from '@agorapulse/ui-components/snackbars-thread';\nexport { SocialButtonComponent } from '@agorapulse/ui-components/social-button';\nexport { StatusComponent } from '@agorapulse/ui-components/status';\nexport { StatusCardActor, StatusCardComponent } from '@agorapulse/ui-components/status-card';\nexport { StepperComponent } from '@agorapulse/ui-components/stepper';\nexport { TagComponent } from '@agorapulse/ui-components/tag';\nexport { ToggleComponent } from '@agorapulse/ui-components/toggle';\n\n// Service\nexport { SnackbarsThreadService } from '@agorapulse/ui-components/snackbars-thread';\n\n// Model\nexport { ConfirmModalTexts } from '@agorapulse/ui-components/confirm-modal';\nexport * from '@agorapulse/ui-components/filter-dropdown';\nexport { SnackbarTypeValues, SnackbarsThreadBase, externalSnackbarTypeAllowed } from '@agorapulse/ui-components/snackbars-thread';\nexport { Step } from '@agorapulse/ui-components/stepper';\nexport { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType } from '@agorapulse/ui-components/tooltip';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAgCA;;AAEG;MA4EU,4BAA4B,CAAA;uGAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAA5B,4BAA4B,EAAA,OAAA,EAAA;;YAvEjC,eAAe;YACf,gBAAgB;YAChB,qBAAqB;YACrB,mBAAmB;YACnB,mBAAmB;YACnB,iBAAiB;YACjB,gBAAgB;YAChB,qBAAqB;YACrB,uBAAuB;YACvB,sBAAsB;YACtB,kCAAkC;YAClC,cAAc;YACd,sBAAsB;YACtB,cAAc;YACd,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 @@
1
1
  {
2
2
  "name": "@agorapulse/ui-components",
3
3
  "description": "Agorapulse UI Components Library",
4
- "version": "22.9.1-beta.1",
4
+ "version": "22.9.3-beta.1",
5
5
  "author": "Benoit Hediard",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,30 +1,35 @@
1
+ import * as _agorapulse_ui_components_i18n from '@agorapulse/ui-components/i18n';
2
+ import { I18nOf } from '@agorapulse/ui-components/i18n';
3
+ import * as _angular_core from '@angular/core';
1
4
  import { ModalConfig } from '@agorapulse/ui-components/modal';
2
5
  import { MatDialogRef, MatDialog } from '@angular/material/dialog';
3
- import * as i0 from '@angular/core';
4
6
 
5
7
  interface ConfirmModalTexts {
6
8
  footerConfirmButtonId: string | 'confirm';
7
- footerConfirmButtonLabel: string;
8
- contentText: string;
9
9
  footerCancelButtonId: string | 'cancel';
10
- footerCancelButtonLabel: string;
11
- headerTitle: string;
10
+ /** `title` and `message` are required; `confirm` defaults to “OK”, `cancel` to “Cancel”. Rendered as text. */
11
+ i18n: I18nOf<'title' | 'message', 'confirm' | 'cancel'>;
12
12
  }
13
13
 
14
14
  declare class ConfirmModalComponent {
15
15
  dialogRef: MatDialogRef<ConfirmModalComponent, boolean>;
16
- contentText: string;
17
16
  footerCancelButtonId: string;
18
- footerCancelButtonLabel: string;
19
17
  footerConfirmButtonId: string;
20
- footerConfirmButtonLabel: string;
21
- headerTitle: string;
18
+ /** Texts of the modal, rendered as text; see {@link ConfirmModalTexts} for the required roles and defaults. */
19
+ readonly i18n: _angular_core.InputSignal<_agorapulse_ui_components_i18n.I18nOf<"title" | "message", "cancel" | "confirm">>;
20
+ private readonly resolveTexts;
21
+ protected readonly texts: _angular_core.Signal<{
22
+ readonly title: string | undefined;
23
+ readonly message: string | undefined;
24
+ readonly confirm: string;
25
+ readonly cancel: string;
26
+ }>;
22
27
  constructor(dialogRef: MatDialogRef<ConfirmModalComponent, boolean>);
23
28
  onCancel(): void;
24
29
  onConfirm(): void;
25
30
  static open(dialog: MatDialog, confirmModalTexts: ConfirmModalTexts, modalConfig?: ModalConfig | null): MatDialogRef<ConfirmModalComponent, boolean>;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmModalComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmModalComponent, "ap-confirm-modal", never, { "contentText": { "alias": "contentText"; "required": false; }; "footerCancelButtonId": { "alias": "footerCancelButtonId"; "required": false; }; "footerCancelButtonLabel": { "alias": "footerCancelButtonLabel"; "required": false; }; "footerConfirmButtonId": { "alias": "footerConfirmButtonId"; "required": false; }; "footerConfirmButtonLabel": { "alias": "footerConfirmButtonLabel"; "required": false; }; "headerTitle": { "alias": "headerTitle"; "required": false; }; }, {}, never, never, true, never>;
31
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmModalComponent, never>;
32
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfirmModalComponent, "ap-confirm-modal", never, { "footerCancelButtonId": { "alias": "footerCancelButtonId"; "required": false; }; "footerConfirmButtonId": { "alias": "footerConfirmButtonId"; "required": false; }; "i18n": { "alias": "i18n"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
28
33
  }
29
34
 
30
35
  export { ConfirmModalComponent };
@@ -72,20 +72,14 @@ declare class CheckboxDirective implements OnInit, OnDestroy {
72
72
  * ```
73
73
  */
74
74
  declare class ClickDirective {
75
- /**
76
- * Turns the host back into a plain element: no role, no tab stop, no activation at all.
77
- * A host disabled while it holds focus keeps `tabindex="-1"` until focus leaves it, so the
78
- * browser does not drop focus to `<body>` (a disclosure that disables itself once open).
79
- */
75
+ /** Turns the host back into a plain element: no role, no tab stop, no activation at all. */
80
76
  apClickDisabled: i0.InputSignalWithTransform<boolean, unknown>;
81
77
  /** ARIA role applied while the host is interactive. */
82
78
  apClickRole: i0.InputSignal<string>;
83
79
  apClick: i0.OutputEmitterRef<MouseEvent | KeyboardEvent>;
84
80
  private host;
85
- protected readonly focused: i0.WritableSignal<boolean>;
86
81
  constructor();
87
82
  protected isInteractive(): boolean;
88
- protected tabIndex(): 0 | -1 | null;
89
83
  /** The two checks are independent, so an anchor without `href` still gets its contenteditable read. */
90
84
  private isNativelyActivated;
91
85
  /**
@@ -3,6 +3,8 @@ import { InjectionToken, PipeTransform, Signal, Provider } from '@angular/core';
3
3
 
4
4
  declare const DEFAULT_TEXTS: Readonly<{
5
5
  readonly 'ui-components.action-dropdown.aria-label': "Action dropdown";
6
+ readonly 'ui-components.confirm-modal.confirm': "OK";
7
+ readonly 'ui-components.confirm-modal.cancel': "Cancel";
6
8
  readonly 'ui-components.filters.trigger': "Filters";
7
9
  readonly 'ui-components.filters.aria-label': "Filters";
8
10
  readonly 'ui-components.filters.apply': "Apply filters";
@@ -23,7 +25,13 @@ declare const DEFAULT_TEXTS: Readonly<{
23
25
  readonly 'ui-components.selection.options-section': "Options";
24
26
  readonly 'ui-components.selection.select-all': "Select all";
25
27
  readonly 'ui-components.selection.select-all-count': "({{selected}} of {{total}})";
28
+ readonly 'ui-components.snackbar.info': "Info";
29
+ readonly 'ui-components.snackbar.success': "Success";
30
+ readonly 'ui-components.snackbar.warning': "Warning";
31
+ readonly 'ui-components.snackbar.error': "Error";
26
32
  readonly 'ui-components.split-button.toggle': "Toggle";
33
+ readonly 'ui-components.toggle.confirm-title': "Are you sure?";
34
+ readonly 'ui-components.toggle.confirm-message': "If you toggle this, it will affect other things. Are you sure?";
27
35
  }>;
28
36
  /**
29
37
  * A key of the DS default texts, the only keys a component may fall back to.
@@ -1,8 +1,7 @@
1
+ import * as i0 from '@angular/core';
2
+ import { I18nOf, TranslationRequest } from '@agorapulse/ui-components/i18n';
1
3
  import { SymbolRegistry } from '@agorapulse/ui-symbol';
2
- import { Router } from '@angular/router';
3
- import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
4
4
  import { BehaviorSubject } from 'rxjs';
5
- import * as i0 from '@angular/core';
6
5
 
7
6
  /**
8
7
  * Info - 0
@@ -22,29 +21,31 @@ declare enum SnackbarTypeValues {
22
21
  WARNING = "warning",
23
22
  ERROR = "error"
24
23
  }
24
+ /**
25
+ * A snackbar to show.
26
+ *
27
+ * @example
28
+ * const snackbar: SnackbarsThreadBase = { i18n: { message: 'post.saved', action: 'common.undo' }, snackbarType: 1, callback: undo };
29
+ */
25
30
  interface SnackbarsThreadBase {
26
- actionName?: string;
27
- navigateInternalUrl?: string;
31
+ /** `message` is rendered as sanitized HTML, whatever its form; `action` is the text of the link, rendered as text. */
32
+ i18n: I18nOf<'message', 'action'>;
33
+ /** 0 info, 1 success, 2 warning, 3 error. */
28
34
  snackbarType: internalSnackbarTypeAllowed;
29
- snackbarText: string | SafeHtml;
35
+ /** URL the action navigates to. */
36
+ navigateInternalUrl?: string;
37
+ /** Opens `navigateInternalUrl` in a new tab instead of navigating. */
30
38
  openUrlInNewTab?: boolean;
39
+ /** Called by the action instead of navigating; the snackbar is removed first. */
31
40
  callback?: () => void;
32
41
  }
33
42
  interface SnackbarsThreadComplete extends SnackbarsThreadBase {
34
43
  id: string;
35
44
  }
36
- declare abstract class CodeStatus {
37
- snackbarText: string;
38
- snackbarType: internalSnackbarTypeAllowed;
39
- protected constructor(snackbarText: string, snackbarType: internalSnackbarTypeAllowed);
40
- }
41
- declare function generateCodeStatus(text: string, type: externalSnackbarTypeAllowed): CodeStatus;
42
45
 
43
46
  declare class SnackbarsThreadService {
44
- private domSanitizer;
45
47
  private _list;
46
48
  snackbarList: BehaviorSubject<SnackbarsThreadComplete[]>;
47
- constructor(domSanitizer: DomSanitizer);
48
49
  private _emit;
49
50
  add(elem: SnackbarsThreadBase, timeout?: number): void;
50
51
  addWithId(elem: SnackbarsThreadBase, id: string, timeout?: number): void;
@@ -52,31 +53,78 @@ declare class SnackbarsThreadService {
52
53
  * Adds the snackbar and return its ID so it can be closed further
53
54
  */
54
55
  addSnackbar(elem: SnackbarsThreadBase, timeout?: number): string;
56
+ /**
57
+ * Shows a success snackbar for `timeout` ms (0 keeps it) and returns its id; `message` is rendered as sanitized HTML.
58
+ *
59
+ * @example
60
+ * snackbars.success('post.saved');
61
+ */
62
+ success(message: TranslationRequest, timeout?: number): string;
63
+ /**
64
+ * Shows an error snackbar; same contract as {@link success}.
65
+ *
66
+ * @example
67
+ * snackbars.error({ key: 'post.failed', params: { count: 2 } });
68
+ */
69
+ error(message: TranslationRequest, timeout?: number): string;
70
+ /**
71
+ * Shows an info snackbar, styled as a success; same contract as {@link success}.
72
+ *
73
+ * @example
74
+ * snackbars.info('post.scheduled');
75
+ */
76
+ info(message: TranslationRequest, timeout?: number): string;
77
+ /**
78
+ * Shows a snackbar whose type is data rather than a literal; same contract as {@link success}.
79
+ * `info` is styled as a success, `warning` as an error.
80
+ *
81
+ * @example
82
+ * snackbars.show('post.saved', status.type);
83
+ */
84
+ show(message: TranslationRequest, type: externalSnackbarTypeAllowed, timeout?: number): string;
55
85
  remove(id: string | undefined): void;
56
86
  private generateId;
57
87
  static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarsThreadService, never>;
58
88
  static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarsThreadService>;
59
89
  }
60
90
 
91
+ /**
92
+ * Shows the snackbars added through {@link SnackbarsThreadService}; their texts are resolved while shown, so they follow language changes.
93
+ */
61
94
  declare class SnackbarsThreadComponent {
62
- snackbarsThreadService: SnackbarsThreadService;
63
- symbolRegistry: SymbolRegistry;
64
- private readonly router;
65
95
  SnackbarTypesMap: {
66
- 0: string;
67
- 1: string;
68
- 2: string;
69
- 3: string;
96
+ readonly 0: "info";
97
+ readonly 1: "success";
98
+ readonly 2: "warning";
99
+ readonly 3: "error";
70
100
  };
71
101
  SnackbarIconsMap: {
72
102
  [k: number]: string;
73
103
  };
74
- constructor(snackbarsThreadService: SnackbarsThreadService, symbolRegistry: SymbolRegistry, router: Router);
104
+ readonly snackbarsThreadService: SnackbarsThreadService;
105
+ readonly symbolRegistry: SymbolRegistry;
106
+ private readonly router;
107
+ private readonly resolveTexts;
108
+ private readonly snackbars;
109
+ protected readonly rows: i0.Signal<{
110
+ snackbar: SnackbarsThreadComplete;
111
+ texts: {
112
+ readonly message: string | undefined;
113
+ readonly action: string | undefined;
114
+ };
115
+ }[]>;
116
+ protected readonly iconLabels: i0.Signal<{
117
+ readonly info: string;
118
+ readonly success: string;
119
+ readonly warning: string;
120
+ readonly error: string;
121
+ }>;
122
+ constructor();
75
123
  remove(id: string): void;
76
124
  onActionClick(snackbar: SnackbarsThreadBase, id: string): void;
77
125
  static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarsThreadComponent, never>;
78
126
  static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarsThreadComponent, "ap-snackbars-thread", never, {}, {}, never, never, true, never>;
79
127
  }
80
128
 
81
- export { CodeStatus, SnackbarTypeValues, SnackbarsThreadComponent, SnackbarsThreadService, generateCodeStatus };
129
+ export { SnackbarTypeValues, SnackbarsThreadComponent, SnackbarsThreadService };
82
130
  export type { SnackbarsThreadBase, externalSnackbarTypeAllowed };
@@ -1,5 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { AfterContentInit, OnChanges, OnInit, ElementRef, EventEmitter } from '@angular/core';
3
+ import { I18nOf } from '@agorapulse/ui-components/i18n';
3
4
  import { ControlValueAccessor, FormControl } from '@angular/forms';
4
5
 
5
6
  declare const AP_CHECKBOX_CONTROL_VALUE_ACCESSOR: {
@@ -21,10 +22,8 @@ declare class ToggleComponent implements ControlValueAccessor, AfterContentInit,
21
22
  checked: boolean;
22
23
  required: boolean;
23
24
  confirm: boolean;
24
- confirmMessage: string;
25
- confirmOk: string;
26
- confirmCancel: string;
27
- confirmTitle: string;
25
+ /** Texts of the confirmation shown when `confirm` is set; the title and message default to the DS texts, the buttons to the confirm modal's. */
26
+ readonly i18n: _angular_core.InputSignal<I18nOf<never, "cancel" | "confirm" | "confirmTitle" | "confirmMessage">>;
28
27
  set name(name: string);
29
28
  get name(): string;
30
29
  readonly change: EventEmitter<boolean>;
@@ -47,7 +46,7 @@ declare class ToggleComponent implements ControlValueAccessor, AfterContentInit,
47
46
  };
48
47
  _preventBubblingFromLabel(event: MouseEvent): void;
49
48
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToggleComponent, never>;
50
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToggleComponent, "ap-toggle", never, { "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "required": { "alias": "required"; "required": false; }; "confirm": { "alias": "confirm"; "required": false; }; "confirmMessage": { "alias": "confirmMessage"; "required": false; }; "confirmOk": { "alias": "confirmOk"; "required": false; }; "confirmCancel": { "alias": "confirmCancel"; "required": false; }; "confirmTitle": { "alias": "confirmTitle"; "required": false; }; "name": { "alias": "name"; "required": true; }; }, { "change": "change"; }, never, ["*"], true, never>;
49
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToggleComponent, "ap-toggle", never, { "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "required": { "alias": "required"; "required": false; }; "confirm": { "alias": "confirm"; "required": false; }; "i18n": { "alias": "i18n"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": true; }; }, { "change": "change"; }, never, ["*"], true, never>;
51
50
  static ngAcceptInputType_disabled: unknown;
52
51
  static ngAcceptInputType_required: unknown;
53
52
  }
@@ -36,7 +36,7 @@ export { PaginatorButtonComponent, PaginatorComponent } from '@agorapulse/ui-com
36
36
  import * as i17 from '@agorapulse/ui-components/slide-toggle';
37
37
  export { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';
38
38
  import * as i18 from '@agorapulse/ui-components/snackbars-thread';
39
- export { CodeStatus, SnackbarTypeValues, SnackbarsThreadBase, SnackbarsThreadComponent, SnackbarsThreadService, externalSnackbarTypeAllowed, generateCodeStatus } from '@agorapulse/ui-components/snackbars-thread';
39
+ export { SnackbarTypeValues, SnackbarsThreadBase, SnackbarsThreadComponent, SnackbarsThreadService, externalSnackbarTypeAllowed } from '@agorapulse/ui-components/snackbars-thread';
40
40
  import * as i19 from '@agorapulse/ui-components/tooltip';
41
41
  export { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType, TooltipDirective, TooltipExternalTriggerDirective } from '@agorapulse/ui-components/tooltip';
42
42
  import * as i20 from '@agorapulse/ui-components/add-comment';