@agorapulse/ui-components 22.9.6-beta.1 → 22.9.8-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.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 {\n DropdownOptionDirective,\n DropdownOverlay,\n DropdownTriggerDirective,\n createDropdownOverlay,\n} 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 Period,\n defaultDatepickerPresets,\n isPeriod,\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 SnackbarOptions,\n SnackbarTypeValues,\n SnackbarsThreadBase,\n externalSnackbarTypeAllowed,\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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AuB;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;;;;"}
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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;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.6-beta.1",
4
+ "version": "22.9.8-beta.1",
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"
@@ -287,9 +287,9 @@ declare class FilterDropdownComponent implements DropdownOverlay {
287
287
  href: string | undefined;
288
288
  label: string | undefined;
289
289
  } | undefined;
290
- title: string | undefined;
291
290
  message: string | undefined;
292
291
  type: _agorapulse_ui_components_infobox.InfoboxType;
292
+ titleRequest: _agorapulse_ui_components_i18n.TranslationRequest | undefined;
293
293
  } | null>;
294
294
  /**
295
295
  * The filter groups to display: STRUCTURE only (keys, titles, options, locks, display type, and the
@@ -1,17 +1,23 @@
1
1
  import * as _angular_core from '@angular/core';
2
+ import { I18nOf } from '@agorapulse/ui-components/i18n';
2
3
 
3
4
  type MessageType = 'error' | 'success';
4
5
  declare class FormMessageComponent {
5
6
  set messageType(messageType: MessageType);
6
- message: string;
7
+ /** The `message` shown next to the status symbol, rendered as text. */
8
+ readonly i18n: _angular_core.InputSignal<I18nOf<"message">>;
9
+ protected readonly texts: _angular_core.Signal<{
10
+ readonly message: string | undefined;
11
+ }>;
7
12
  messageTypeSignal: _angular_core.WritableSignal<MessageType>;
8
13
  symbolIdSignal: _angular_core.Signal<"error_fill" | "rounded-check_fill">;
9
14
  /** The id this message is referenced by. A bound `[id]` would land after construction and leave the reference dangling. */
10
15
  readonly messageId: string;
11
16
  private symbolRegistry;
17
+ private readonly resolveTexts;
12
18
  constructor();
13
19
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormMessageComponent, never>;
14
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormMessageComponent, "ap-form-message", never, { "messageType": { "alias": "messageType"; "required": true; }; "message": { "alias": "message"; "required": true; }; }, {}, never, never, true, never>;
20
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormMessageComponent, "ap-form-message", never, { "messageType": { "alias": "messageType"; "required": true; }; "i18n": { "alias": "i18n"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
15
21
  }
16
22
 
17
23
  export { FormMessageComponent };
@@ -27,6 +27,7 @@ declare const DEFAULT_TEXTS: Readonly<{
27
27
  readonly 'ui-components.selection.select-all-count': "({{selected}} of {{total}})";
28
28
  readonly 'ui-components.snackbar.info': "Info";
29
29
  readonly 'ui-components.snackbar.success': "Success";
30
+ readonly 'ui-components.snackbar.warning': "Warning";
30
31
  readonly 'ui-components.snackbar.error': "Error";
31
32
  readonly 'ui-components.split-button.toggle': "Toggle";
32
33
  readonly 'ui-components.toggle.confirm-title': "Are you sure?";
@@ -1,17 +1,25 @@
1
- import * as i0 from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
2
  import { EventEmitter } from '@angular/core';
3
+ import { I18nOf } from '@agorapulse/ui-components/i18n';
3
4
  import { agorapulseSymbol } from '@agorapulse/ui-symbol';
4
5
 
5
6
  type InfoboxType = 'info' | 'warning' | 'error' | 'success' | 'feature-lock';
6
7
  declare class InfoboxComponent {
7
8
  private readonly symbolRegistry;
8
9
  private readonly elementRef;
10
+ private readonly resolveTexts;
11
+ /** `title` is shown above the projected text; `action` is the label of the button, which is shown only when set. Rendered as text. */
12
+ readonly i18n: _angular_core.InputSignal<I18nOf<never, "title" | "action">>;
13
+ /** Not a way to pass the title: use `i18n.title`. Typed `never` so that a `title` left on `<ap-infobox>` fails to compile instead of becoming the native tooltip. */
14
+ readonly title: _angular_core.InputSignal<undefined>;
15
+ protected readonly texts: _angular_core.Signal<{
16
+ readonly title: string | undefined;
17
+ readonly action: string | undefined;
18
+ }>;
9
19
  buttonId: string | null;
10
- buttonLabel: string | undefined;
11
20
  buttonDataTrack: string | null;
12
- buttonSymbolId: i0.InputSignal<string | undefined>;
21
+ buttonSymbolId: _angular_core.InputSignal<string | undefined>;
13
22
  closable: boolean;
14
- title?: string;
15
23
  type: InfoboxType;
16
24
  buttonClicked: EventEmitter<void>;
17
25
  closed: EventEmitter<void>;
@@ -23,8 +31,8 @@ declare class InfoboxComponent {
23
31
  constructor();
24
32
  onClickButton(): void;
25
33
  onCloseInfobox(): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<InfoboxComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<InfoboxComponent, "ap-infobox", never, { "buttonId": { "alias": "buttonId"; "required": false; }; "buttonLabel": { "alias": "buttonLabel"; "required": false; }; "buttonDataTrack": { "alias": "buttonDataTrack"; "required": false; }; "buttonSymbolId": { "alias": "buttonSymbolId"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; }; "title": { "alias": "title"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "buttonClicked": "buttonClicked"; "closed": "closed"; }, never, ["*"], true, never>;
34
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<InfoboxComponent, never>;
35
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<InfoboxComponent, "ap-infobox", never, { "i18n": { "alias": "i18n"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "buttonId": { "alias": "buttonId"; "required": false; }; "buttonDataTrack": { "alias": "buttonDataTrack"; "required": false; }; "buttonSymbolId": { "alias": "buttonSymbolId"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "buttonClicked": "buttonClicked"; "closed": "closed"; }, never, ["*"], true, never>;
28
36
  static ngAcceptInputType_closable: unknown;
29
37
  }
30
38
 
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { TranslationRequest, I18nOf } from '@agorapulse/ui-components/i18n';
2
+ import { I18nOf, TranslationRequest } from '@agorapulse/ui-components/i18n';
3
3
  import { SymbolRegistry } from '@agorapulse/ui-symbol';
4
4
  import { BehaviorSubject } from 'rxjs';
5
5
 
@@ -9,8 +9,8 @@ import { BehaviorSubject } from 'rxjs';
9
9
  * Warning - 2
10
10
  * Error - 3
11
11
  */
12
- type externalSnackbarTypeAllowed = 'info' | 'success' | 'error';
13
- type internalSnackbarTypeAllowed = 0 | 1 | 3;
12
+ type externalSnackbarTypeAllowed = 'info' | 'success' | 'warning' | 'error';
13
+ type internalSnackbarTypeAllowed = 0 | 1 | 2 | 3;
14
14
  /**
15
15
  * We use enum to avoid problem with isolatedModules when export const enum
16
16
  * https://ncjamieson.com/dont-export-const-enums/
@@ -18,6 +18,7 @@ type internalSnackbarTypeAllowed = 0 | 1 | 3;
18
18
  declare enum SnackbarTypeValues {
19
19
  INFO = "info",
20
20
  SUCCESS = "success",
21
+ WARNING = "warning",
21
22
  ERROR = "error"
22
23
  }
23
24
  /**
@@ -29,7 +30,7 @@ declare enum SnackbarTypeValues {
29
30
  interface SnackbarsThreadBase {
30
31
  /** `message` is rendered as sanitized HTML, whatever its form; `action` is the text of the link, rendered as text. */
31
32
  i18n: I18nOf<'message', 'action'>;
32
- /** 0 info, 1 success, 3 error. */
33
+ /** 0 info, 1 success, 2 warning, 3 error. */
33
34
  snackbarType: internalSnackbarTypeAllowed;
34
35
  /** URL the action navigates to. */
35
36
  navigateInternalUrl?: string;
@@ -38,24 +39,6 @@ interface SnackbarsThreadBase {
38
39
  /** Called by the action instead of navigating; the snackbar is removed first. */
39
40
  callback?: () => void;
40
41
  }
41
- /**
42
- * What a snackbar shown by tone can carry besides its message.
43
- *
44
- * @example
45
- * snackbars.success('rule.created', { action: 'rule.open', navigateInternalUrl: `/rules/${id}` });
46
- */
47
- interface SnackbarOptions {
48
- /** Text of the link; shown only with `callback` or `navigateInternalUrl`, rendered as text. */
49
- action?: TranslationRequest;
50
- /** Runs when the link is clicked. */
51
- callback?: () => void;
52
- /** App route the link opens. */
53
- navigateInternalUrl?: string;
54
- /** Opens `navigateInternalUrl` in a new tab. */
55
- openUrlInNewTab?: boolean;
56
- /** Milliseconds before the snackbar closes; 0 keeps it open. Defaults to 5000. */
57
- timeout?: number;
58
- }
59
42
  interface SnackbarsThreadComplete extends SnackbarsThreadBase {
60
43
  id: string;
61
44
  }
@@ -71,36 +54,34 @@ declare class SnackbarsThreadService {
71
54
  */
72
55
  addSnackbar(elem: SnackbarsThreadBase, timeout?: number): string;
73
56
  /**
74
- * Shows a success snackbar and returns its id; `message` is rendered as sanitized HTML.
75
- * `options` adds a link (`action` with `callback` or `navigateInternalUrl`) and sets the `timeout`.
57
+ * Shows a success snackbar for `timeout` ms (0 keeps it) and returns its id; `message` is rendered as sanitized HTML.
76
58
  *
77
59
  * @example
78
60
  * snackbars.success('post.saved');
79
- * snackbars.success('rule.created', { action: 'rule.open', navigateInternalUrl: `/rules/${id}` });
80
61
  */
81
- success(message: TranslationRequest, options?: SnackbarOptions): string;
62
+ success(message: TranslationRequest, timeout?: number): string;
82
63
  /**
83
64
  * Shows an error snackbar; same contract as {@link success}.
84
65
  *
85
66
  * @example
86
67
  * snackbars.error({ key: 'post.failed', params: { count: 2 } });
87
68
  */
88
- error(message: TranslationRequest, options?: SnackbarOptions): string;
69
+ error(message: TranslationRequest, timeout?: number): string;
89
70
  /**
90
71
  * Shows an info snackbar, styled as a success; same contract as {@link success}.
91
72
  *
92
73
  * @example
93
74
  * snackbars.info('post.scheduled');
94
75
  */
95
- info(message: TranslationRequest, options?: SnackbarOptions): string;
76
+ info(message: TranslationRequest, timeout?: number): string;
96
77
  /**
97
78
  * Shows a snackbar whose type is data rather than a literal; same contract as {@link success}.
98
- * `info` is styled as a success.
79
+ * `info` is styled as a success, `warning` as an error.
99
80
  *
100
81
  * @example
101
82
  * snackbars.show('post.saved', status.type);
102
83
  */
103
- show(message: TranslationRequest, type: externalSnackbarTypeAllowed, options?: SnackbarOptions): string;
84
+ show(message: TranslationRequest, type: externalSnackbarTypeAllowed, timeout?: number): string;
104
85
  remove(id: string | undefined): void;
105
86
  private generateId;
106
87
  static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarsThreadService, never>;
@@ -114,6 +95,7 @@ declare class SnackbarsThreadComponent {
114
95
  SnackbarTypesMap: {
115
96
  readonly 0: "info";
116
97
  readonly 1: "success";
98
+ readonly 2: "warning";
117
99
  readonly 3: "error";
118
100
  };
119
101
  SnackbarIconsMap: {
@@ -134,6 +116,7 @@ declare class SnackbarsThreadComponent {
134
116
  protected readonly iconLabels: i0.Signal<{
135
117
  readonly info: string;
136
118
  readonly success: string;
119
+ readonly warning: string;
137
120
  readonly error: string;
138
121
  }>;
139
122
  constructor();
@@ -144,4 +127,4 @@ declare class SnackbarsThreadComponent {
144
127
  }
145
128
 
146
129
  export { SnackbarTypeValues, SnackbarsThreadComponent, SnackbarsThreadService };
147
- export type { SnackbarOptions, SnackbarsThreadBase, externalSnackbarTypeAllowed };
130
+ export type { SnackbarsThreadBase, externalSnackbarTypeAllowed };
@@ -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 { SnackbarOptions, SnackbarTypeValues, SnackbarsThreadBase, SnackbarsThreadComponent, SnackbarsThreadService, externalSnackbarTypeAllowed } 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';
@@ -1,77 +0,0 @@
1
- import { SnackbarsThreadService } from '@agorapulse/ui-components/snackbars-thread';
2
- import * as i0 from '@angular/core';
3
- import { Injectable } from '@angular/core';
4
-
5
- const DEFAULT_TIMEOUT = 5000;
6
- const TYPE_OF_INDEX = {
7
- 0: 'info',
8
- 1: 'success',
9
- 3: 'error',
10
- };
11
- function shownText(request) {
12
- if (typeof request === 'string') {
13
- return { key: request };
14
- }
15
- if ('raw' in request) {
16
- return { raw: request.raw };
17
- }
18
- return request.params === undefined ? { key: request.key } : { key: request.key, params: request.params };
19
- }
20
- /**
21
- * A {@link SnackbarsThreadService} for specs: it records every snackbar in {@link shown}, with its tone and its texts,
22
- * and never starts a timer. It needs no test runner, so it works under Jest and Vitest alike.
23
- *
24
- * @example
25
- * TestBed.configureTestingModule({ providers: [provideFakeSnackbars()] });
26
- * const snackbars = TestBed.inject(FakeSnackbarsThreadService);
27
- * // ...act...
28
- * expect(snackbars.shown).toEqual([{ type: 'error', message: { key: 'post.failed' } }]);
29
- */
30
- class FakeSnackbarsThreadService extends SnackbarsThreadService {
31
- /** Every snackbar shown, oldest first; removing one does not drop it from here. */
32
- shown = [];
33
- pendingType;
34
- show(message, type, options) {
35
- this.pendingType = type;
36
- return super.show(message, type, options);
37
- }
38
- addWithId(elem, id, timeout = DEFAULT_TIMEOUT) {
39
- const type = this.pendingType ?? TYPE_OF_INDEX[elem.snackbarType];
40
- this.pendingType = undefined;
41
- this.shown.push({
42
- type,
43
- message: shownText(elem.i18n.message),
44
- ...(elem.i18n.action === undefined ? {} : { action: shownText(elem.i18n.action) }),
45
- ...(elem.navigateInternalUrl === undefined ? {} : { navigateInternalUrl: elem.navigateInternalUrl }),
46
- ...(elem.openUrlInNewTab === undefined ? {} : { openUrlInNewTab: elem.openUrlInNewTab }),
47
- ...(elem.callback === undefined ? {} : { callback: elem.callback }),
48
- ...(timeout === DEFAULT_TIMEOUT ? {} : { timeout }),
49
- });
50
- super.addWithId(elem, id, 0);
51
- }
52
- /** Forgets every snackbar shown so far, e.g. the ones a spec's setup raised. */
53
- clear() {
54
- this.shown.length = 0;
55
- }
56
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FakeSnackbarsThreadService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
57
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FakeSnackbarsThreadService });
58
- }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FakeSnackbarsThreadService, decorators: [{
60
- type: Injectable
61
- }] });
62
- /**
63
- * Provides {@link FakeSnackbarsThreadService} in place of {@link SnackbarsThreadService}; inject the fake to read what was shown.
64
- *
65
- * @example
66
- * providers: [provideFakeSnackbars()]
67
- */
68
- function provideFakeSnackbars() {
69
- return [FakeSnackbarsThreadService, { provide: SnackbarsThreadService, useExisting: FakeSnackbarsThreadService }];
70
- }
71
-
72
- /**
73
- * Generated bundle index. Do not edit.
74
- */
75
-
76
- export { FakeSnackbarsThreadService, provideFakeSnackbars };
77
- //# sourceMappingURL=agorapulse-ui-components-testing.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agorapulse-ui-components-testing.mjs","sources":["../../../libs/ui-components/testing/src/fake-snackbars-thread.service.ts","../../../libs/ui-components/testing/src/agorapulse-ui-components-testing.ts"],"sourcesContent":["import { TranslationRequest } from '@agorapulse/ui-components/i18n';\nimport {\n externalSnackbarTypeAllowed,\n SnackbarOptions,\n SnackbarsThreadBase,\n SnackbarsThreadService,\n} from '@agorapulse/ui-components/snackbars-thread';\nimport { Injectable, Provider } from '@angular/core';\n\n/** A text as a spec compares it: a key with its optional params, or raw text. A bare key string becomes `{ key }`. */\nexport type ShownText = { key: string; params?: Record<string, unknown> } | { raw: string };\n\n/** One snackbar the code under test showed. */\nexport interface ShownSnackbar {\n type: externalSnackbarTypeAllowed;\n message: ShownText;\n action?: ShownText;\n navigateInternalUrl?: string;\n openUrlInNewTab?: boolean;\n callback?: () => void;\n /** Present only when it differs from the service's default of 5000 ms; 0 keeps the snackbar open. */\n timeout?: number;\n}\n\nconst DEFAULT_TIMEOUT = 5000;\n\nconst TYPE_OF_INDEX: Record<SnackbarsThreadBase['snackbarType'], externalSnackbarTypeAllowed> = {\n 0: 'info',\n 1: 'success',\n 3: 'error',\n};\n\nfunction shownText(request: TranslationRequest): ShownText {\n if (typeof request === 'string') {\n return { key: request };\n }\n if ('raw' in request) {\n return { raw: request.raw };\n }\n return request.params === undefined ? { key: request.key } : { key: request.key, params: request.params };\n}\n\n/**\n * A {@link SnackbarsThreadService} for specs: it records every snackbar in {@link shown}, with its tone and its texts,\n * and never starts a timer. It needs no test runner, so it works under Jest and Vitest alike.\n *\n * @example\n * TestBed.configureTestingModule({ providers: [provideFakeSnackbars()] });\n * const snackbars = TestBed.inject(FakeSnackbarsThreadService);\n * // ...act...\n * expect(snackbars.shown).toEqual([{ type: 'error', message: { key: 'post.failed' } }]);\n */\n@Injectable()\nexport class FakeSnackbarsThreadService extends SnackbarsThreadService {\n /** Every snackbar shown, oldest first; removing one does not drop it from here. */\n readonly shown: ShownSnackbar[] = [];\n\n private pendingType: externalSnackbarTypeAllowed | undefined;\n\n override show(message: TranslationRequest, type: externalSnackbarTypeAllowed, options?: SnackbarOptions): string {\n this.pendingType = type;\n return super.show(message, type, options);\n }\n\n override addWithId(elem: SnackbarsThreadBase, id: string, timeout: number = DEFAULT_TIMEOUT): void {\n const type = this.pendingType ?? TYPE_OF_INDEX[elem.snackbarType];\n this.pendingType = undefined;\n this.shown.push({\n type,\n message: shownText(elem.i18n.message),\n ...(elem.i18n.action === undefined ? {} : { action: shownText(elem.i18n.action) }),\n ...(elem.navigateInternalUrl === undefined ? {} : { navigateInternalUrl: elem.navigateInternalUrl }),\n ...(elem.openUrlInNewTab === undefined ? {} : { openUrlInNewTab: elem.openUrlInNewTab }),\n ...(elem.callback === undefined ? {} : { callback: elem.callback }),\n ...(timeout === DEFAULT_TIMEOUT ? {} : { timeout }),\n });\n super.addWithId(elem, id, 0);\n }\n\n /** Forgets every snackbar shown so far, e.g. the ones a spec's setup raised. */\n clear(): void {\n this.shown.length = 0;\n }\n}\n\n/**\n * Provides {@link FakeSnackbarsThreadService} in place of {@link SnackbarsThreadService}; inject the fake to read what was shown.\n *\n * @example\n * providers: [provideFakeSnackbars()]\n */\nexport function provideFakeSnackbars(): Provider[] {\n return [FakeSnackbarsThreadService, { provide: SnackbarsThreadService, useExisting: FakeSnackbarsThreadService }];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAwBA,MAAM,eAAe,GAAG,IAAI;AAE5B,MAAM,aAAa,GAA6E;AAC5F,IAAA,CAAC,EAAE,MAAM;AACT,IAAA,CAAC,EAAE,SAAS;AACZ,IAAA,CAAC,EAAE,OAAO;CACb;AAED,SAAS,SAAS,CAAC,OAA2B,EAAA;AAC1C,IAAA,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;AAC7B,QAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;IAC3B;AACA,IAAA,IAAI,KAAK,IAAI,OAAO,EAAE;AAClB,QAAA,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;IAC/B;AACA,IAAA,OAAO,OAAO,CAAC,MAAM,KAAK,SAAS,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE;AAC7G;AAEA;;;;;;;;;AAS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,EAAE,CAAC,CAAC;IAChC;;IAGA,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;IACzB;uGA7BS,0BAA0B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAA1B,0BAA0B,EAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC;;AAiCD;;;;;AAKG;SACa,oBAAoB,GAAA;AAChC,IAAA,OAAO,CAAC,0BAA0B,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;AACrH;;AC7FA;;AAEG;;;;"}
@@ -1,54 +0,0 @@
1
- import { TranslationRequest } from '@agorapulse/ui-components/i18n';
2
- import { SnackbarsThreadService, externalSnackbarTypeAllowed, SnackbarOptions, SnackbarsThreadBase } from '@agorapulse/ui-components/snackbars-thread';
3
- import * as i0 from '@angular/core';
4
- import { Provider } from '@angular/core';
5
-
6
- /** A text as a spec compares it: a key with its optional params, or raw text. A bare key string becomes `{ key }`. */
7
- type ShownText = {
8
- key: string;
9
- params?: Record<string, unknown>;
10
- } | {
11
- raw: string;
12
- };
13
- /** One snackbar the code under test showed. */
14
- interface ShownSnackbar {
15
- type: externalSnackbarTypeAllowed;
16
- message: ShownText;
17
- action?: ShownText;
18
- navigateInternalUrl?: string;
19
- openUrlInNewTab?: boolean;
20
- callback?: () => void;
21
- /** Present only when it differs from the service's default of 5000 ms; 0 keeps the snackbar open. */
22
- timeout?: number;
23
- }
24
- /**
25
- * A {@link SnackbarsThreadService} for specs: it records every snackbar in {@link shown}, with its tone and its texts,
26
- * and never starts a timer. It needs no test runner, so it works under Jest and Vitest alike.
27
- *
28
- * @example
29
- * TestBed.configureTestingModule({ providers: [provideFakeSnackbars()] });
30
- * const snackbars = TestBed.inject(FakeSnackbarsThreadService);
31
- * // ...act...
32
- * expect(snackbars.shown).toEqual([{ type: 'error', message: { key: 'post.failed' } }]);
33
- */
34
- declare class FakeSnackbarsThreadService extends SnackbarsThreadService {
35
- /** Every snackbar shown, oldest first; removing one does not drop it from here. */
36
- readonly shown: ShownSnackbar[];
37
- private pendingType;
38
- show(message: TranslationRequest, type: externalSnackbarTypeAllowed, options?: SnackbarOptions): string;
39
- addWithId(elem: SnackbarsThreadBase, id: string, timeout?: number): void;
40
- /** Forgets every snackbar shown so far, e.g. the ones a spec's setup raised. */
41
- clear(): void;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<FakeSnackbarsThreadService, never>;
43
- static ɵprov: i0.ɵɵInjectableDeclaration<FakeSnackbarsThreadService>;
44
- }
45
- /**
46
- * Provides {@link FakeSnackbarsThreadService} in place of {@link SnackbarsThreadService}; inject the fake to read what was shown.
47
- *
48
- * @example
49
- * providers: [provideFakeSnackbars()]
50
- */
51
- declare function provideFakeSnackbars(): Provider[];
52
-
53
- export { FakeSnackbarsThreadService, provideFakeSnackbars };
54
- export type { ShownSnackbar, ShownText };