asksuite-citrus 3.11.3 → 3.12.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/esm2022/lib/components/accordion/extendable-panel/extendable-panel.component.mjs +2 -2
  2. package/esm2022/lib/components/autocomplete/autocomplete.component.mjs +2 -2
  3. package/esm2022/lib/components/avatar/avatar.component.mjs +2 -2
  4. package/esm2022/lib/components/box/box.component.mjs +2 -2
  5. package/esm2022/lib/components/button/button.component.mjs +2 -2
  6. package/esm2022/lib/components/character-counter/character-counter.component.mjs +2 -2
  7. package/esm2022/lib/components/checkbox/checkbox.component.mjs +2 -2
  8. package/esm2022/lib/components/chips/chips.component.mjs +2 -2
  9. package/esm2022/lib/components/date-picker/date-picker-calendar/date-picker-calendar.component.mjs +2 -2
  10. package/esm2022/lib/components/date-picker/date-picker.component.mjs +2 -2
  11. package/esm2022/lib/components/dropdown-container/dropdown-container.component.mjs +2 -2
  12. package/esm2022/lib/components/input/input.component.mjs +2 -2
  13. package/esm2022/lib/components/modal/confirmation-modal/confirmation-modal.component.mjs +2 -2
  14. package/esm2022/lib/components/modal/modal.component.mjs +2 -2
  15. package/esm2022/lib/components/pagination/pagination.component.mjs +2 -2
  16. package/esm2022/lib/components/phone-ddi/phone-ddi.component.mjs +2 -2
  17. package/esm2022/lib/components/richtext-toolbox/richtext-toolbox.component.mjs +2 -2
  18. package/esm2022/lib/components/richtext-url-prompt/richtext-url-prompt.component.mjs +2 -2
  19. package/esm2022/lib/components/select/select.component.mjs +2 -2
  20. package/esm2022/lib/components/table/table.component.mjs +2 -2
  21. package/esm2022/lib/components/toast/toast.component.mjs +2 -2
  22. package/esm2022/lib/directives/ask-dropdown.directive.mjs +9 -9
  23. package/esm2022/lib/services/dynamic-dropdown/dynamic-dropdown.service.mjs +126 -0
  24. package/esm2022/lib/services/modal/modal.service.mjs +45 -6
  25. package/esm2022/public-api.mjs +2 -1
  26. package/fesm2022/asksuite-citrus.mjs +215 -57
  27. package/fesm2022/asksuite-citrus.mjs.map +1 -1
  28. package/lib/directives/ask-dropdown.directive.d.ts +1 -2
  29. package/lib/services/dynamic-dropdown/dynamic-dropdown.service.d.ts +63 -0
  30. package/lib/services/modal/modal.service.d.ts +7 -3
  31. package/package.json +1 -1
  32. package/public-api.d.ts +1 -0
  33. package/styles/colors.scss +3 -1
@@ -19,8 +19,6 @@ export declare class AskDropdownDirective implements OnInit {
19
19
  private overlayConfig;
20
20
  private overlayRef;
21
21
  private containerRef;
22
- private mouseOutSubscription?;
23
- private mouseDistanceSubscription?;
24
22
  private readonly AVAILABLE_POSITIONS;
25
23
  constructor(overlayPositionBuilder: OverlayPositionBuilder, elementRef: ElementRef, overlay: Overlay, _destroyRef: DestroyRef);
26
24
  ngOnInit(): void;
@@ -28,6 +26,7 @@ export declare class AskDropdownDirective implements OnInit {
28
26
  private createOverlay;
29
27
  private getOverlayPosition;
30
28
  private listenOutsideClicks;
29
+ ngOnDestroy(): void;
31
30
  showOnHoverIn(): void;
32
31
  hideOnHoverOut(): void;
33
32
  show(): void;
@@ -0,0 +1,63 @@
1
+ import { TemplateRef, ViewContainerRef, Injector } from '@angular/core';
2
+ import { Overlay } from '@angular/cdk/overlay';
3
+ import { Subject } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export interface DropdownConfig {
6
+ templateToRender: TemplateRef<any>;
7
+ viewContainerRef: ViewContainerRef;
8
+ referenceElement: HTMLElement;
9
+ positionParams: any;
10
+ closeOnOutsideClick?: boolean;
11
+ }
12
+ export interface DropdownRef {
13
+ close: (result?: any) => void;
14
+ afterClosed: Subject<any>;
15
+ }
16
+ export declare class DynamicDropdownService {
17
+ private overlay;
18
+ private injector;
19
+ private overlayRefs;
20
+ constructor(overlay: Overlay, injector: Injector);
21
+ /**
22
+ * Opens a new modal with the given configuration.
23
+ */
24
+ open(config: DropdownConfig): DropdownRef;
25
+ /**
26
+ * Creates an overlay with the specified position and configuration.
27
+ */
28
+ private createOverlay;
29
+ /**
30
+ * Creates a flexible position strategy for the modal based on the base element.
31
+ */
32
+ private createPositionStrategy;
33
+ /**
34
+ * Creates the configuration for the overlay.
35
+ */
36
+ private createOverlayConfig;
37
+ /**
38
+ * Attaches the specified template to the overlay.
39
+ */
40
+ private attachTemplateToOverlay;
41
+ /**
42
+ * Sets up listeners for the overlay, such as closing on backdrop click or escape key.
43
+ */
44
+ private setupOverlayListeners;
45
+ /**
46
+ * Creates a subject that will emit when the modal is closed.
47
+ */
48
+ private createAfterClosedSubject;
49
+ /**
50
+ * Creates a reference for the modal that can be used to control the modal's lifecycle.
51
+ */
52
+ private createModalRef;
53
+ /**
54
+ * Closes the modal and cleans up resources.
55
+ */
56
+ private closeModal;
57
+ /**
58
+ * Closes all open modals.
59
+ */
60
+ closeAll(): void;
61
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicDropdownService, never>;
62
+ static ɵprov: i0.ɵɵInjectableDeclaration<DynamicDropdownService>;
63
+ }
@@ -1,4 +1,4 @@
1
- import { Overlay } from '@angular/cdk/overlay';
1
+ import { Overlay, OverlayPositionBuilder } from '@angular/cdk/overlay';
2
2
  import { Injector } from '@angular/core';
3
3
  import { AskModalConfirmData } from '../../components/modal/confirmation-modal/confirmation-modal.component';
4
4
  import { ComponentType } from '../../components/modal/modal.component';
@@ -8,11 +8,15 @@ import * as i0 from "@angular/core";
8
8
  export declare class ModalService {
9
9
  private overlay;
10
10
  private injector;
11
- constructor(overlay: Overlay, injector: Injector);
12
- open<T>(component: ComponentType<T>, config?: ModalConfig): ModalRef;
11
+ private overlayPositionBuilder;
12
+ private readonly AVAILABLE_POSITIONS;
13
+ constructor(overlay: Overlay, injector: Injector, overlayPositionBuilder: OverlayPositionBuilder);
14
+ open<T>(component: ComponentType<T>, config?: ModalConfig, baseElement?: HTMLElement): ModalRef;
13
15
  confirmModal(data: AskModalConfirmData): ModalRef;
14
16
  private createInjector;
15
17
  private getPositionStrategy;
18
+ private setOverlayConfig;
19
+ private getOverlayPosition;
16
20
  getOverlay(config?: ModalConfig): import("@angular/cdk/overlay").OverlayRef;
17
21
  static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
18
22
  static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asksuite-citrus",
3
- "version": "3.11.3",
3
+ "version": "3.12.0-beta.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.7",
6
6
  "@angular/core": "^17.3.7",
package/public-api.d.ts CHANGED
@@ -23,6 +23,7 @@ export * from './lib/directives';
23
23
  export * from './lib/components/modal/directives';
24
24
  export * from './lib/services/toast/toast.service';
25
25
  export * from './lib/services/modal';
26
+ export * from './lib/services/dynamic-dropdown/dynamic-dropdown.service';
26
27
  export * from './lib/pipes/paginate/paginate.pipe';
27
28
  export * from './lib/pipes/force-break-line/force-break-line.pipe';
28
29
  export * from './lib/services/toast/toast.config';
@@ -491,7 +491,7 @@ $color-border-warning: $color-y-700;
491
491
 
492
492
  $color-divider-default: $color-nl-400;
493
493
 
494
- $color-elevation-surface-default-default: $color-nl-100;
494
+ $color-elevation-surface-primary-default: $color-nl-100;
495
495
  $color-elevation-surface-default-hovered: $color-nl-200;
496
496
  $color-elevation-surface-sunken-default: $color-nl-0;
497
497
  $color-elevation-surface-sunken-hovered: $color-nl-100;
@@ -702,5 +702,7 @@ $color-texticon-danger: $color-r-600;
702
702
  --color-background-accent-green-contrast-default: #{$color-background-accent-green-contrast-default};
703
703
  --color-background-accent-green-contrast-hovered: #{$color-background-accent-green-contrast-hovered};
704
704
  --color-background-accent-green-contrast-pressed: #{$color-background-accent-green-contrast-pressed};
705
+ --color-background-brand-asksuite-subtler-default: #{$color-background-brand-asksuite-subtler-default};
705
706
  --color-border-matted-alpha-primary: #{$color-nl-0};
707
+ --color-elevation-surface-primary-default: #{$color-elevation-surface-primary-default};
706
708
  }