@agorapulse/ui-components 22.9.5-beta.1 → 22.9.7

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.
Files changed (37) hide show
  1. package/agorapulse-ui-components-22.9.7.tgz +0 -0
  2. package/fesm2022/agorapulse-ui-components-button.mjs +0 -2
  3. package/fesm2022/agorapulse-ui-components-button.mjs.map +1 -1
  4. package/fesm2022/agorapulse-ui-components-confirm-modal.mjs +21 -19
  5. package/fesm2022/agorapulse-ui-components-confirm-modal.mjs.map +1 -1
  6. package/fesm2022/agorapulse-ui-components-datepicker.mjs +33 -14
  7. package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
  8. package/fesm2022/agorapulse-ui-components-directives.mjs +17 -3
  9. package/fesm2022/agorapulse-ui-components-directives.mjs.map +1 -1
  10. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +1 -1
  11. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
  12. package/fesm2022/agorapulse-ui-components-i18n.mjs +0 -8
  13. package/fesm2022/agorapulse-ui-components-i18n.mjs.map +1 -1
  14. package/fesm2022/agorapulse-ui-components-icon-button.mjs +2 -4
  15. package/fesm2022/agorapulse-ui-components-icon-button.mjs.map +1 -1
  16. package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs +93 -100
  17. package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs.map +1 -1
  18. package/fesm2022/agorapulse-ui-components-social-button.mjs +2 -4
  19. package/fesm2022/agorapulse-ui-components-social-button.mjs.map +1 -1
  20. package/fesm2022/agorapulse-ui-components-split-button.mjs +2 -8
  21. package/fesm2022/agorapulse-ui-components-split-button.mjs.map +1 -1
  22. package/fesm2022/agorapulse-ui-components-toggle.mjs +19 -15
  23. package/fesm2022/agorapulse-ui-components-toggle.mjs.map +1 -1
  24. package/fesm2022/agorapulse-ui-components.mjs +1 -1
  25. package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
  26. package/package.json +1 -5
  27. package/types/agorapulse-ui-components-confirm-modal.d.ts +11 -16
  28. package/types/agorapulse-ui-components-datepicker.d.ts +7 -2
  29. package/types/agorapulse-ui-components-directives.d.ts +7 -1
  30. package/types/agorapulse-ui-components-i18n.d.ts +0 -8
  31. package/types/agorapulse-ui-components-snackbars-thread.d.ts +23 -71
  32. package/types/agorapulse-ui-components-toggle.d.ts +5 -4
  33. package/types/agorapulse-ui-components.d.ts +1 -1
  34. package/agorapulse-ui-components-22.9.5-beta.1.tgz +0 -0
  35. package/fesm2022/agorapulse-ui-components-testing.mjs +0 -78
  36. package/fesm2022/agorapulse-ui-components-testing.mjs.map +0 -1
  37. package/types/agorapulse-ui-components-testing.d.ts +0 -54
@@ -1,13 +1,11 @@
1
1
  import { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';
2
2
  import { SymbolRegistry, apCheck, apClose, SymbolComponent } from '@agorapulse/ui-symbol';
3
3
  import * as i0 from '@angular/core';
4
- import { forwardRef, inject, ChangeDetectorRef, input, EventEmitter, booleanAttribute, Output, Input, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { forwardRef, inject, ChangeDetectorRef, EventEmitter, booleanAttribute, Output, Input, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
5
5
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
6
6
  import { MatDialog } from '@angular/material/dialog';
7
7
  import { first } from 'rxjs/operators';
8
8
 
9
- const CONFIRM_TITLE_KEY = 'ui-components.toggle.confirm-title';
10
- const CONFIRM_MESSAGE_KEY = 'ui-components.toggle.confirm-message';
11
9
  const AP_CHECKBOX_CONTROL_VALUE_ACCESSOR = {
12
10
  provide: NG_VALUE_ACCESSOR,
13
11
  useExisting: forwardRef(() => ToggleComponent),
@@ -27,9 +25,10 @@ class ToggleComponent {
27
25
  checked = false;
28
26
  required = false;
29
27
  confirm = false;
30
- /** 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. */
31
- i18n = input({}, /* @ts-ignore */
32
- ...(ngDevMode ? [{ debugName: "i18n" }] : /* istanbul ignore next */ []));
28
+ confirmMessage = 'If you toggle this, it will affect other things. Are you sure';
29
+ confirmOk = 'Confirm';
30
+ confirmCancel = 'Cancel';
31
+ confirmTitle = 'Are you sure?';
33
32
  set name(name) {
34
33
  if (!name.endsWith('Checkbox')) {
35
34
  this._name = name + 'Checkbox';
@@ -69,16 +68,13 @@ class ToggleComponent {
69
68
  this.changeValue();
70
69
  }
71
70
  else {
72
- const i18n = this.i18n();
73
71
  const toggleConfirmModal = {
72
+ contentText: this.confirmMessage,
73
+ headerTitle: this.confirmTitle,
74
+ footerCancelButtonLabel: this.confirmCancel,
75
+ footerConfirmButtonLabel: this.confirmOk,
74
76
  footerConfirmButtonId: 'confirm',
75
77
  footerCancelButtonId: 'cancel',
76
- i18n: {
77
- title: i18n.confirmTitle ?? CONFIRM_TITLE_KEY,
78
- message: i18n.confirmMessage ?? CONFIRM_MESSAGE_KEY,
79
- confirm: i18n.confirm,
80
- cancel: i18n.cancel,
81
- },
82
78
  };
83
79
  const modalConfig = {
84
80
  matDialogConfig: {
@@ -143,7 +139,7 @@ class ToggleComponent {
143
139
  }
144
140
  }
145
141
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
146
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: ToggleComponent, isStandalone: true, selector: "ap-toggle", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: false, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: false, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, confirm: { classPropertyName: "confirm", publicName: "confirm", isSignal: false, isRequired: false, transformFunction: null }, i18n: { classPropertyName: "i18n", publicName: "i18n", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: true, transformFunction: null } }, outputs: { change: "change" }, providers: [
142
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "22.0.5", type: ToggleComponent, isStandalone: true, selector: "ap-toggle", inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], ariaDescribedby: ["aria-describedby", "ariaDescribedby"], labelPosition: "labelPosition", disabled: ["disabled", "disabled", booleanAttribute], checked: "checked", required: ["required", "required", booleanAttribute], confirm: "confirm", confirmMessage: "confirmMessage", confirmOk: "confirmOk", confirmCancel: "confirmCancel", confirmTitle: "confirmTitle", name: "name" }, outputs: { change: "change" }, providers: [
147
143
  AP_CHECKBOX_CONTROL_VALUE_ACCESSOR,
148
144
  {
149
145
  provide: NG_VALIDATORS,
@@ -195,7 +191,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
195
191
  }]
196
192
  }], confirm: [{
197
193
  type: Input
198
- }], i18n: [{ type: i0.Input, args: [{ isSignal: true, alias: "i18n", required: false }] }], name: [{
194
+ }], confirmMessage: [{
195
+ type: Input
196
+ }], confirmOk: [{
197
+ type: Input
198
+ }], confirmCancel: [{
199
+ type: Input
200
+ }], confirmTitle: [{
201
+ type: Input
202
+ }], name: [{
199
203
  type: Input,
200
204
  args: [{
201
205
  required: true,
@@ -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 { 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,OAAO,GAAG,KAAK;IAIxB,QAAQ,GAAG,KAAK;IACP,OAAO,GAAG,KAAK;;IAGf,IAAI,GAAG,KAAK,CAA0E,EAAE;6EAAC;IAElG,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,IA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;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;;;;"}
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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AK,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;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,QAAQ,EAAE,IAAI;AACjB,qBAAA;;sBAYA;;;AErFL;;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 { SnackbarTypeValues, SnackbarsThreadComponent, SnackbarsThreadService } from '@agorapulse/ui-components/snackbars-thread';
38
+ export { CodeStatus, SnackbarTypeValues, SnackbarsThreadComponent, SnackbarsThreadService, generateCodeStatus } 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 { 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,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;YACvB,uBAAuB;YACvB,gBAAgB;;YAEhB,aAAa,CAAA,EAAA,CAAA;AASR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAA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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 {\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,uBAA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E;;wBAEL,eAAe;wBACf,gBAAgB;wBAChB,qBAAqB;wBACrB,mBAAmB;wBACnB,mBAAmB;wBACnB,iBAAiB;wBACjB,gBAAgB;wBAChB,qBAAqB;wBACrB,uBAAuB;wBACvB,sBAAsB;wBACtB,kCAAkC;wBAClC,cAAc;wBACd,sBAAsB;wBACtB,cAAc;wBACd,qBAAqB;wBACrB,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;wBACpB,wBAAwB;;wBAExB,qBAAqB;wBACrB,kBAAkB;wBAClB,uBAAuB;wBACvB,uBAAuB;wBACvB,gBAAgB;wBAChB,mBAAmB;wBACnB,yBAAyB;;wBAEzB,eAAe;AAClB,qBAAA;AACD,oBAAA,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;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agorapulse/ui-components",
3
3
  "description": "Agorapulse UI Components Library",
4
- "version": "22.9.5-beta.1",
4
+ "version": "22.9.7",
5
5
  "author": "Benoit Hediard",
6
6
  "repository": {
7
7
  "type": "git",
@@ -281,10 +281,6 @@
281
281
  "types": "./types/agorapulse-ui-components-tag.d.ts",
282
282
  "default": "./fesm2022/agorapulse-ui-components-tag.mjs"
283
283
  },
284
- "./testing": {
285
- "types": "./types/agorapulse-ui-components-testing.d.ts",
286
- "default": "./fesm2022/agorapulse-ui-components-testing.mjs"
287
- },
288
284
  "./text-measurement": {
289
285
  "types": "./types/agorapulse-ui-components-text-measurement.d.ts",
290
286
  "default": "./fesm2022/agorapulse-ui-components-text-measurement.mjs"
@@ -1,35 +1,30 @@
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';
4
1
  import { ModalConfig } from '@agorapulse/ui-components/modal';
5
2
  import { MatDialogRef, MatDialog } from '@angular/material/dialog';
3
+ import * as i0 from '@angular/core';
6
4
 
7
5
  interface ConfirmModalTexts {
8
6
  footerConfirmButtonId: string | 'confirm';
7
+ footerConfirmButtonLabel: string;
8
+ contentText: string;
9
9
  footerCancelButtonId: string | 'cancel';
10
- /** `title` and `message` are required; `confirm` defaults to “OK”, `cancel` to “Cancel”. Rendered as text. */
11
- i18n: I18nOf<'title' | 'message', 'confirm' | 'cancel'>;
10
+ footerCancelButtonLabel: string;
11
+ headerTitle: string;
12
12
  }
13
13
 
14
14
  declare class ConfirmModalComponent {
15
15
  dialogRef: MatDialogRef<ConfirmModalComponent, boolean>;
16
+ contentText: string;
16
17
  footerCancelButtonId: string;
18
+ footerCancelButtonLabel: string;
17
19
  footerConfirmButtonId: 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
- }>;
20
+ footerConfirmButtonLabel: string;
21
+ headerTitle: string;
27
22
  constructor(dialogRef: MatDialogRef<ConfirmModalComponent, boolean>);
28
23
  onCancel(): void;
29
24
  onConfirm(): void;
30
25
  static open(dialog: MatDialog, confirmModalTexts: ConfirmModalTexts, modalConfig?: ModalConfig | null): MatDialogRef<ConfirmModalComponent, boolean>;
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>;
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>;
33
28
  }
34
29
 
35
30
  export { ConfirmModalComponent };
@@ -58,8 +58,7 @@ declare class DatepickerMonthPickerComponent implements DropdownOverlay {
58
58
  * the arrows alone costs one click per year; through the grid it costs one per page.
59
59
  */
60
60
  readonly showingYears: _angular_core.WritableSignal<boolean>;
61
- private readonly panelTemplate;
62
- private readonly overlay;
61
+ private readonly panel;
63
62
  readonly isOpen: _angular_core.Signal<boolean>;
64
63
  /** Browsable on its own, and re-anchored on the calendar's year whenever that moves. */
65
64
  readonly displayedYear: _angular_core.WritableSignal<number>;
@@ -76,7 +75,10 @@ declare class DatepickerMonthPickerComponent implements DropdownOverlay {
76
75
  readonly months: _angular_core.Signal<MonthOption[]>;
77
76
  readonly years: _angular_core.Signal<YearOption[]>;
78
77
  open(triggerElement?: HTMLElement): void;
78
+ /** The panel gives focus back to the trigger; a gesture (Escape, outside click) closes through it too. */
79
79
  close(): void;
80
+ /** Back to months, so reopening never starts on the year grid the last visit happened to leave on. */
81
+ onPanelClosed(): void;
80
82
  toggle(triggerElement?: HTMLElement): void;
81
83
  onPrevious(): void;
82
84
  onNext(): void;
@@ -84,6 +86,9 @@ declare class DatepickerMonthPickerComponent implements DropdownOverlay {
84
86
  onToggleYears(): void;
85
87
  onSelectYear(year: number): void;
86
88
  onSelectMonth(month: number): void;
89
+ /** An out-of-bounds month is disabled, hence unfocusable: focus then stays on the panel. */
90
+ private focusSelectedMonth;
91
+ private focusInPanel;
87
92
  /** One year at a time through the months, a whole page at a time through the years. */
88
93
  private step;
89
94
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DatepickerMonthPickerComponent, never>;
@@ -72,14 +72,20 @@ declare class CheckboxDirective implements OnInit, OnDestroy {
72
72
  * ```
73
73
  */
74
74
  declare class ClickDirective {
75
- /** Turns the host back into a plain element: no role, no tab stop, no activation at all. */
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
+ */
76
80
  apClickDisabled: i0.InputSignalWithTransform<boolean, unknown>;
77
81
  /** ARIA role applied while the host is interactive. */
78
82
  apClickRole: i0.InputSignal<string>;
79
83
  apClick: i0.OutputEmitterRef<MouseEvent | KeyboardEvent>;
80
84
  private host;
85
+ protected readonly focused: i0.WritableSignal<boolean>;
81
86
  constructor();
82
87
  protected isInteractive(): boolean;
88
+ protected tabIndex(): 0 | -1 | null;
83
89
  /** The two checks are independent, so an anchor without `href` still gets its contenteditable read. */
84
90
  private isNativelyActivated;
85
91
  /**
@@ -3,8 +3,6 @@ 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";
8
6
  readonly 'ui-components.filters.trigger': "Filters";
9
7
  readonly 'ui-components.filters.aria-label': "Filters";
10
8
  readonly 'ui-components.filters.apply': "Apply filters";
@@ -25,13 +23,7 @@ declare const DEFAULT_TEXTS: Readonly<{
25
23
  readonly 'ui-components.selection.options-section': "Options";
26
24
  readonly 'ui-components.selection.select-all': "Select all";
27
25
  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";
32
26
  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?";
35
27
  }>;
36
28
  /**
37
29
  * A key of the DS default texts, the only keys a component may fall back to.
@@ -1,7 +1,8 @@
1
- import * as i0 from '@angular/core';
2
- import { I18nOf, TranslationRequest } from '@agorapulse/ui-components/i18n';
3
1
  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';
5
6
 
6
7
  /**
7
8
  * Info - 0
@@ -21,31 +22,29 @@ declare enum SnackbarTypeValues {
21
22
  WARNING = "warning",
22
23
  ERROR = "error"
23
24
  }
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
- */
30
25
  interface SnackbarsThreadBase {
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. */
34
- snackbarType: internalSnackbarTypeAllowed;
35
- /** URL the action navigates to. */
26
+ actionName?: string;
36
27
  navigateInternalUrl?: string;
37
- /** Opens `navigateInternalUrl` in a new tab instead of navigating. */
28
+ snackbarType: internalSnackbarTypeAllowed;
29
+ snackbarText: string | SafeHtml;
38
30
  openUrlInNewTab?: boolean;
39
- /** Called by the action instead of navigating; the snackbar is removed first. */
40
31
  callback?: () => void;
41
32
  }
42
33
  interface SnackbarsThreadComplete extends SnackbarsThreadBase {
43
34
  id: string;
44
35
  }
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;
45
42
 
46
43
  declare class SnackbarsThreadService {
44
+ private domSanitizer;
47
45
  private _list;
48
46
  snackbarList: BehaviorSubject<SnackbarsThreadComplete[]>;
47
+ constructor(domSanitizer: DomSanitizer);
49
48
  private _emit;
50
49
  add(elem: SnackbarsThreadBase, timeout?: number): void;
51
50
  addWithId(elem: SnackbarsThreadBase, id: string, timeout?: number): void;
@@ -53,78 +52,31 @@ declare class SnackbarsThreadService {
53
52
  * Adds the snackbar and return its ID so it can be closed further
54
53
  */
55
54
  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;
85
55
  remove(id: string | undefined): void;
86
56
  private generateId;
87
57
  static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarsThreadService, never>;
88
58
  static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarsThreadService>;
89
59
  }
90
60
 
91
- /**
92
- * Shows the snackbars added through {@link SnackbarsThreadService}; their texts are resolved while shown, so they follow language changes.
93
- */
94
61
  declare class SnackbarsThreadComponent {
62
+ snackbarsThreadService: SnackbarsThreadService;
63
+ symbolRegistry: SymbolRegistry;
64
+ private readonly router;
95
65
  SnackbarTypesMap: {
96
- readonly 0: "info";
97
- readonly 1: "success";
98
- readonly 2: "warning";
99
- readonly 3: "error";
66
+ 0: string;
67
+ 1: string;
68
+ 2: string;
69
+ 3: string;
100
70
  };
101
71
  SnackbarIconsMap: {
102
72
  [k: number]: string;
103
73
  };
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();
74
+ constructor(snackbarsThreadService: SnackbarsThreadService, symbolRegistry: SymbolRegistry, router: Router);
123
75
  remove(id: string): void;
124
76
  onActionClick(snackbar: SnackbarsThreadBase, id: string): void;
125
77
  static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarsThreadComponent, never>;
126
78
  static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarsThreadComponent, "ap-snackbars-thread", never, {}, {}, never, never, true, never>;
127
79
  }
128
80
 
129
- export { SnackbarTypeValues, SnackbarsThreadComponent, SnackbarsThreadService };
81
+ export { CodeStatus, SnackbarTypeValues, SnackbarsThreadComponent, SnackbarsThreadService, generateCodeStatus };
130
82
  export type { SnackbarsThreadBase, externalSnackbarTypeAllowed };
@@ -1,6 +1,5 @@
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';
4
3
  import { ControlValueAccessor, FormControl } from '@angular/forms';
5
4
 
6
5
  declare const AP_CHECKBOX_CONTROL_VALUE_ACCESSOR: {
@@ -22,8 +21,10 @@ declare class ToggleComponent implements ControlValueAccessor, AfterContentInit,
22
21
  checked: boolean;
23
22
  required: boolean;
24
23
  confirm: boolean;
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">>;
24
+ confirmMessage: string;
25
+ confirmOk: string;
26
+ confirmCancel: string;
27
+ confirmTitle: string;
27
28
  set name(name: string);
28
29
  get name(): string;
29
30
  readonly change: EventEmitter<boolean>;
@@ -46,7 +47,7 @@ declare class ToggleComponent implements ControlValueAccessor, AfterContentInit,
46
47
  };
47
48
  _preventBubblingFromLabel(event: MouseEvent): void;
48
49
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToggleComponent, 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>;
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>;
50
51
  static ngAcceptInputType_disabled: unknown;
51
52
  static ngAcceptInputType_required: unknown;
52
53
  }
@@ -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 { SnackbarTypeValues, SnackbarsThreadBase, SnackbarsThreadComponent, SnackbarsThreadService, externalSnackbarTypeAllowed } from '@agorapulse/ui-components/snackbars-thread';
39
+ export { CodeStatus, SnackbarTypeValues, SnackbarsThreadBase, SnackbarsThreadComponent, SnackbarsThreadService, externalSnackbarTypeAllowed, generateCodeStatus } 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';