asksuite-citrus 3.17.30-beta.2 → 3.18.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 (35) hide show
  1. package/esm2022/lib/components/accordion/extendable-panel/extendable-panel.component.mjs +2 -2
  2. package/esm2022/lib/components/arrow-tag/arrow-tag.component.mjs +2 -2
  3. package/esm2022/lib/components/autocomplete/autocomplete.component.mjs +22 -3
  4. package/esm2022/lib/components/avatar/avatar.component.mjs +2 -2
  5. package/esm2022/lib/components/box/box.component.mjs +2 -2
  6. package/esm2022/lib/components/button/button.component.mjs +2 -2
  7. package/esm2022/lib/components/character-counter/character-counter.component.mjs +2 -2
  8. package/esm2022/lib/components/checkbox/checkbox.component.mjs +2 -2
  9. package/esm2022/lib/components/checkbox-v2/checkbox-v2.component.mjs +2 -2
  10. package/esm2022/lib/components/chips/chips.component.mjs +2 -2
  11. package/esm2022/lib/components/date-picker/date-picker-calendar/date-picker-calendar.component.mjs +2 -2
  12. package/esm2022/lib/components/date-picker/date-picker.component.mjs +2 -2
  13. package/esm2022/lib/components/dropdown-container/dropdown-container.component.mjs +2 -2
  14. package/esm2022/lib/components/input/input.component.mjs +2 -2
  15. package/esm2022/lib/components/modal/confirmation-modal/confirmation-modal.component.mjs +2 -2
  16. package/esm2022/lib/components/modal/modal.component.mjs +2 -2
  17. package/esm2022/lib/components/pagination/pagination.component.mjs +2 -2
  18. package/esm2022/lib/components/phone-ddi/phone-ddi.component.mjs +57 -92
  19. package/esm2022/lib/components/richtext-toolbox/richtext-toolbox.component.mjs +2 -2
  20. package/esm2022/lib/components/richtext-url-prompt/richtext-url-prompt.component.mjs +2 -2
  21. package/esm2022/lib/components/select/select.component.mjs +2 -2
  22. package/esm2022/lib/components/tab-group/tab/tab.component.mjs +2 -2
  23. package/esm2022/lib/components/tab-group/tab-group.component.mjs +2 -2
  24. package/esm2022/lib/components/table/table.component.mjs +2 -2
  25. package/esm2022/lib/components/toast/toast.component.mjs +2 -2
  26. package/esm2022/lib/helpers/phone.helper.mjs +3 -1
  27. package/esm2022/shared/services/country-flag.service.mjs +3 -9
  28. package/fesm2022/asksuite-citrus.mjs +126 -145
  29. package/fesm2022/asksuite-citrus.mjs.map +1 -1
  30. package/lib/components/autocomplete/autocomplete.component.d.ts +11 -1
  31. package/lib/components/phone-ddi/phone-ddi.component.d.ts +5 -11
  32. package/lib/helpers/phone.helper.d.ts +1 -1
  33. package/package.json +1 -1
  34. package/shared/services/country-flag.service.d.ts +1 -3
  35. package/styles/styles.scss +4 -0
@@ -4,6 +4,10 @@ import { Overlay } from '@angular/cdk/overlay';
4
4
  import { TranslateService } from '@ngx-translate/core';
5
5
  import { OverlayComponent } from '../../classes/overlay.component';
6
6
  import * as i0 from "@angular/core";
7
+ export type SubChoice = {
8
+ label: string;
9
+ value: any;
10
+ };
7
11
  export declare class AutocompleteComponent extends OverlayComponent implements AfterViewInit, ControlValueAccessor, OnChanges {
8
12
  private formBuilder;
9
13
  private change;
@@ -61,6 +65,11 @@ export declare class AutocompleteComponent extends OverlayComponent implements A
61
65
  title?: string;
62
66
  chipBackgroundOrangeGradient: boolean;
63
67
  keepChipsUncollapsed: boolean;
68
+ subChoices: SubChoice[] | null;
69
+ subChoice: SubChoice | null;
70
+ subChoiceChange: EventEmitter<SubChoice>;
71
+ subChoiceSelectorTitle: string;
72
+ subChoiceSelectorSubtitle: string;
64
73
  position: 'above' | 'below';
65
74
  itemCheck: EventEmitter<any>;
66
75
  selectionDone: EventEmitter<any>;
@@ -86,6 +95,7 @@ export declare class AutocompleteComponent extends OverlayComponent implements A
86
95
  shouldProcessMaxOptions(option: any, value: boolean): boolean;
87
96
  selectAllOptions(selected: boolean): void;
88
97
  handleChipAction(option: any): void;
98
+ setSubChoice(subChoice: SubChoice): void;
89
99
  display(option: any): string | undefined;
90
100
  getMoreItems(firstLoad?: boolean): void;
91
101
  sortSelectedFirst(items: Array<any>, selectedItems: Array<any>, prop: string): void;
@@ -97,5 +107,5 @@ export declare class AutocompleteComponent extends OverlayComponent implements A
97
107
  registerOnTouched(fn: any): void;
98
108
  setDisabledState(isDisabled: boolean): void;
99
109
  static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, never>;
100
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "ask-autocomplete", never, { "filterFn": { "alias": "filterFn"; "required": false; }; "displayFn": { "alias": "displayFn"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "maxOptions": { "alias": "maxOptions"; "required": false; }; "valueProp": { "alias": "valueProp"; "required": false; }; "options": { "alias": "options"; "required": false; }; "fixedOptions": { "alias": "fixedOptions"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "allOptionsSelectedText": { "alias": "allOptionsSelectedText"; "required": false; }; "selectAllMessage": { "alias": "selectAllMessage"; "required": false; }; "iconPropReference": { "alias": "iconPropReference"; "required": false; }; "enableRemove": { "alias": "enableRemove"; "required": false; }; "title": { "alias": "title"; "required": false; }; "chipBackgroundOrangeGradient": { "alias": "chipBackgroundOrangeGradient"; "required": false; }; "keepChipsUncollapsed": { "alias": "keepChipsUncollapsed"; "required": false; }; }, { "itemCheck": "itemCheck"; "selectionDone": "selectionDone"; "optionRemoved": "optionRemoved"; }, never, never, false, never>;
110
+ static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "ask-autocomplete", never, { "filterFn": { "alias": "filterFn"; "required": false; }; "displayFn": { "alias": "displayFn"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "maxOptions": { "alias": "maxOptions"; "required": false; }; "valueProp": { "alias": "valueProp"; "required": false; }; "options": { "alias": "options"; "required": false; }; "fixedOptions": { "alias": "fixedOptions"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "allOptionsSelectedText": { "alias": "allOptionsSelectedText"; "required": false; }; "selectAllMessage": { "alias": "selectAllMessage"; "required": false; }; "iconPropReference": { "alias": "iconPropReference"; "required": false; }; "enableRemove": { "alias": "enableRemove"; "required": false; }; "title": { "alias": "title"; "required": false; }; "chipBackgroundOrangeGradient": { "alias": "chipBackgroundOrangeGradient"; "required": false; }; "keepChipsUncollapsed": { "alias": "keepChipsUncollapsed"; "required": false; }; "subChoices": { "alias": "subChoices"; "required": false; }; "subChoice": { "alias": "subChoice"; "required": false; }; "subChoiceSelectorTitle": { "alias": "subChoiceSelectorTitle"; "required": false; }; "subChoiceSelectorSubtitle": { "alias": "subChoiceSelectorSubtitle"; "required": false; }; }, { "subChoiceChange": "subChoiceChange"; "itemCheck": "itemCheck"; "selectionDone": "selectionDone"; "optionRemoved": "optionRemoved"; }, never, never, false, never>;
101
111
  }
@@ -5,7 +5,6 @@ import { AskDropdownDirective } from "../../directives";
5
5
  import CountryFlagService from "../../../shared/services/country-flag.service";
6
6
  import { CountryData } from "../../../shared/providers/flag.provider";
7
7
  import { OverlayComponent } from "../../classes/overlay.component";
8
- import { NgxMaskDirective } from 'ngx-mask';
9
8
  import * as i0 from "@angular/core";
10
9
  export declare class PhoneDdiComponent extends OverlayComponent implements OnInit, ControlValueAccessor {
11
10
  private countryFlagService;
@@ -22,8 +21,6 @@ export declare class PhoneDdiComponent extends OverlayComponent implements OnIni
22
21
  wrapper: ElementRef | undefined;
23
22
  menuContainer: ElementRef | undefined;
24
23
  overlayContent: TemplateRef<any> | undefined;
25
- inputMask?: NgxMaskDirective;
26
- inputElement?: ElementRef;
27
24
  dropdownList?: QueryList<AskDropdownDirective>;
28
25
  _selectedFlag?: CountryData;
29
26
  set selectedFlag(item: CountryData | undefined);
@@ -32,17 +29,13 @@ export declare class PhoneDdiComponent extends OverlayComponent implements OnIni
32
29
  onChange: (value?: any) => void;
33
30
  onTouch: () => void;
34
31
  protected closed: boolean;
35
- set inputValue(value: string);
36
- get inputValue(): string;
37
- get prefix(): string;
32
+ protected inputValue: string;
38
33
  protected searchFieldControl: FormControl<string | null>;
39
34
  protected filteredOptions: any[];
40
35
  private _destroy;
41
36
  private scrollSub?;
42
37
  constructor(overlay: Overlay, viewContainerRef: ViewContainerRef, countryFlagService: CountryFlagService, destroyRef: DestroyRef);
43
38
  ngOnInit(): void;
44
- private loadCountries;
45
- private getFullValue;
46
39
  onPaste(event: any): void;
47
40
  handleOptionSelected(item: any): void;
48
41
  display(option: any): string;
@@ -51,17 +44,18 @@ export declare class PhoneDdiComponent extends OverlayComponent implements OnIni
51
44
  handleFlagClick(event?: Event): void;
52
45
  showOptions(): void;
53
46
  hideOptions(): void;
54
- onChangePhoneNumber(number: string, removeDdi?: boolean, changeValue?: boolean): void;
55
- private normalizePhoneInput;
56
- private removeDdiFromNumber;
47
+ onChangePhoneNumber(number: string): void;
57
48
  registerOnChange(fn: any): void;
58
49
  registerOnTouched(fn: any): void;
59
50
  writeValue(value: any): void;
60
51
  protected readonly displayFn: (countryFlag: any) => string;
61
52
  protected readonly filterFn: (search: string) => CountryData[];
53
+ private addAvailableFlags;
62
54
  private initSelectedFlag;
63
55
  private getDefaultCountryFlag;
64
56
  private handleInputChange;
57
+ handlePhoneChange(event: any): void;
58
+ normalizePhoneNumberBr(input: string): string;
65
59
  static ɵfac: i0.ɵɵFactoryDeclaration<PhoneDdiComponent, never>;
66
60
  static ɵcmp: i0.ɵɵComponentDeclaration<PhoneDdiComponent, "ask-phone-ddi", never, { "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "useCountryCode": { "alias": "useCountryCode"; "required": false; }; "disableMask": { "alias": "disableMask"; "required": false; }; "inferCountryCodeByNumber": { "alias": "inferCountryCodeByNumber"; "required": false; }; }, { "valueChange": "valueChange"; "onChangeFlag": "onChangeFlag"; }, never, never, false, never>;
67
61
  }
@@ -1 +1 @@
1
- export declare function getCountryFromPhone(phone: string): string;
1
+ export declare function getCountryFromPhone(phone: string): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asksuite-citrus",
3
- "version": "3.17.30-beta.2",
3
+ "version": "3.18.0-beta.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.7",
6
6
  "@angular/core": "^17.3.7",
@@ -1,6 +1,5 @@
1
1
  import { CountryData } from "../providers/flag.provider";
2
2
  import { HttpClient } from "@angular/common/http";
3
- import { Observable } from "rxjs";
4
3
  import { TranslateService } from "@ngx-translate/core";
5
4
  import * as i0 from "@angular/core";
6
5
  export default class CountryFlagService {
@@ -10,9 +9,8 @@ export default class CountryFlagService {
10
9
  private defaultCountryCode;
11
10
  private defaultCountryLanguage;
12
11
  private cacheList;
13
- private listCache$?;
14
12
  constructor(flagUrl: string, http: HttpClient, translateService: TranslateService);
15
- list: () => Observable<CountryData[]>;
13
+ list: () => import("rxjs").Observable<CountryData[]>;
16
14
  getDefaultCountryFlag(searchData: CountryData[], useCountryCode?: string): CountryData;
17
15
  getCountryDataForFlag(searchData: CountryData[], countryCode: string): CountryData;
18
16
  private getDefaultCountryLanguage;
@@ -62,3 +62,7 @@ input {
62
62
  .ask-tooltip {
63
63
  white-space: break-spaces;
64
64
  }
65
+
66
+ .menu-container .operator-selector .helper-text b {
67
+ font-weight: 700;
68
+ }