ecabs-components 1.1.75 → 1.1.77
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.
- package/README.md +146 -143
- package/esm2022/lib/base/models/phone.models.mjs +1 -1
- package/esm2022/lib/base/models/waypoint.models.mjs +1 -4
- package/esm2022/lib/base/utils/phone-number.utils.mjs +32 -2
- package/esm2022/lib/ecabs-button-toggle/ecabs-button-toggle.component.mjs +12 -7
- package/esm2022/lib/ecabs-buttons-v2/ecabs-buttons-v2.component.mjs +2 -2
- package/esm2022/lib/ecabs-checkbox-toggle/ecabs-checkbox-toggle.component.mjs +2 -2
- package/esm2022/lib/ecabs-checkbox-v2/ecabs-checkbox-v2.component.mjs +2 -2
- package/esm2022/lib/ecabs-chip-autocomplete/ecabs-chip-autocomplete.component.mjs +2 -4
- package/esm2022/lib/ecabs-date-range-picker/ecabs-date-range-picker.component.mjs +2 -2
- package/esm2022/lib/ecabs-dialog-message/ecabs-dialog-message.component.mjs +2 -2
- package/esm2022/lib/ecabs-increment/ecabs-increment.component.mjs +2 -2
- package/esm2022/lib/ecabs-input/ecabs-input.component.mjs +3 -3
- package/esm2022/lib/ecabs-language-selector/ecabs-language-selector.component.mjs +2 -2
- package/esm2022/lib/ecabs-multiple-dates-picker/ecabs-multiple-dates-picker.component.mjs +2 -2
- package/esm2022/lib/ecabs-note/ecabs-note.component.mjs +2 -2
- package/esm2022/lib/ecabs-picker-header/ecabs-picker-header.component.mjs +2 -2
- package/esm2022/lib/ecabs-place-autocomplete-v2/ecabs-place-autocomplete-v2.component.mjs +89 -59
- package/esm2022/lib/ecabs-table/ecabs-table-filter-wrapper/ecabs-table-filter-wrapper.component.mjs +2 -2
- package/fesm2022/ecabs-components.mjs +156 -97
- package/fesm2022/ecabs-components.mjs.map +1 -1
- package/lib/base/models/phone.models.d.ts +7 -1
- package/lib/base/models/waypoint.models.d.ts +1 -2
- package/lib/base/utils/phone-number.utils.d.ts +4 -1
- package/lib/ecabs-button-toggle/ecabs-button-toggle.component.d.ts +1 -1
- package/lib/ecabs-place-autocomplete-v2/ecabs-place-autocomplete-v2.component.d.ts +21 -13
- package/package.json +1 -1
- package/src/assets/styles/material/overrides/_menu.scss +4 -0
- package/src/assets/styles/scss/modules/_chip.scss +64 -64
- package/src/assets/styles/scss/modules/_form.scss +312 -312
- package/src/assets/styles/scss/modules/_statuses.scss +36 -36
- package/src/assets/styles/scss/utilities/_colors.scss +56 -58
- package/src/assets/styles/tailwind/index.scss +1 -1
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface CountryPrefix {
|
|
2
|
+
dialing_code: string;
|
|
3
|
+
iso: string;
|
|
4
|
+
name: string;
|
|
5
|
+
phone_number?: string;
|
|
6
|
+
}
|
|
2
7
|
export type Country = {
|
|
3
8
|
name: string;
|
|
4
9
|
iso2: string;
|
|
@@ -9,3 +14,4 @@ export type Country = {
|
|
|
9
14
|
placeHolder?: string;
|
|
10
15
|
};
|
|
11
16
|
export type PhoneNumberCodeType = 'iso' | 'calling';
|
|
17
|
+
export type PhoneNumberFormat = 'default' | 'national' | 'international';
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
2
|
import PlaceResult = google.maps.places.PlaceResult;
|
|
3
|
-
import { WaypointTypeEnum } from '../consts/waypoint.consts';
|
|
4
3
|
import PredictionTerm = google.maps.places.PredictionTerm;
|
|
4
|
+
import { WaypointTypeEnum } from '../consts/waypoint.consts';
|
|
5
5
|
export interface WaypointSuggestion {
|
|
6
6
|
suggestion_id?: string;
|
|
7
7
|
additional_info?: string;
|
|
8
8
|
location?: GeoPoint;
|
|
9
9
|
place_id: string;
|
|
10
|
-
source?: string;
|
|
11
10
|
frequency?: number;
|
|
12
11
|
last_visit?: string | Date;
|
|
13
12
|
geo_key?: string;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { PhoneNumberCodeType } from '../models/phone.models';
|
|
1
|
+
import { CountryPrefix, PhoneNumberCodeType } from '../models/phone.models';
|
|
2
2
|
export declare function extractPhoneNumberCode(phoneNumber: string | null, type?: PhoneNumberCodeType, withFlagClass?: boolean): string | null;
|
|
3
3
|
export declare function extractDialingCode(phoneNumber: string | null): string | null;
|
|
4
4
|
export declare function extractCountryFromIso(isoCode: string | null, region?: string[]): string | null;
|
|
5
|
+
export declare function extractCallingCodeFromIso(isoCode: string | null): string | null;
|
|
6
|
+
export declare function getSupportedCountryIsoCodes(): string[];
|
|
7
|
+
export declare function extractCountryPrefixFromNumber(phone_number: string, regions: string[]): CountryPrefix | null;
|
|
@@ -13,7 +13,7 @@ export declare class EcabsButtonToggleComponent<T = unknown> implements ControlV
|
|
|
13
13
|
isDisabled: boolean;
|
|
14
14
|
private onChange;
|
|
15
15
|
private onTouched;
|
|
16
|
-
|
|
16
|
+
private readonly cdr;
|
|
17
17
|
onGroupChange(event: MatButtonToggleChange): void;
|
|
18
18
|
trackByOptionValue(index: number, option: SelectOption<T>): T | number;
|
|
19
19
|
writeValue(value: T | T[]): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, EventEmitter,
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import EcabsElementBaseComponent from '../base/element-base';
|
|
4
4
|
import { WaypointTypeEnum } from '../base/consts/waypoint.consts';
|
|
@@ -6,49 +6,57 @@ import { GooglePlaceResult, WaypointQueryChange, WaypointSuggestion } from '../b
|
|
|
6
6
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class EcabsPlaceAutocompleteV2Component extends EcabsElementBaseComponent implements OnChanges, AfterViewInit, ControlValueAccessor {
|
|
9
|
-
private readonly ngZone;
|
|
10
|
-
private readonly injector;
|
|
11
9
|
matCustomInput: ElementRef;
|
|
12
10
|
showDeleteItem: boolean;
|
|
13
|
-
waypointsHistory: WaypointSuggestion[];
|
|
11
|
+
set waypointsHistory(value: WaypointSuggestion[]);
|
|
14
12
|
showSuffix: boolean;
|
|
15
13
|
countryCode: string;
|
|
16
14
|
googleLoaded: boolean;
|
|
17
15
|
waypointType: WaypointTypeEnum;
|
|
18
|
-
|
|
16
|
+
debounceMs: number;
|
|
19
17
|
readonly placeResult: EventEmitter<GooglePlaceResult>;
|
|
20
18
|
readonly deleteItem: EventEmitter<any>;
|
|
21
19
|
readonly queryChanged: EventEmitter<WaypointQueryChange>;
|
|
22
20
|
isFocused$: BehaviorSubject<boolean>;
|
|
23
|
-
value$: BehaviorSubject<string>;
|
|
24
21
|
waypointSuggestions$: Observable<WaypointSuggestion[]>;
|
|
22
|
+
value$: BehaviorSubject<string>;
|
|
25
23
|
selectedIndex: number;
|
|
26
24
|
displayedSuggestions: WaypointSuggestion[];
|
|
25
|
+
private readonly inputQuery$;
|
|
26
|
+
private readonly waypointsHistory$;
|
|
27
27
|
private _value;
|
|
28
|
-
private
|
|
28
|
+
private autocompleteService;
|
|
29
29
|
private placesService;
|
|
30
30
|
private sessionToken;
|
|
31
|
+
private isResolvingPlace;
|
|
32
|
+
private readonly MAX_SUGGESTIONS;
|
|
33
|
+
private readonly emptySuggestions;
|
|
34
|
+
private readonly ngZone;
|
|
35
|
+
private readonly injector;
|
|
36
|
+
private readonly destroyRef;
|
|
31
37
|
get value(): string;
|
|
32
38
|
set value(value: string);
|
|
33
|
-
constructor(
|
|
39
|
+
constructor();
|
|
34
40
|
ngOnChanges(changes: SimpleChanges): void;
|
|
35
41
|
ngAfterViewInit(): void;
|
|
36
42
|
private onChange;
|
|
37
43
|
private onTouch;
|
|
38
|
-
private getWaypointResults;
|
|
39
44
|
private getPlacesResults;
|
|
40
45
|
private toWaypointSuggestions;
|
|
46
|
+
onUserInput(query: string): void;
|
|
47
|
+
trackBySuggestion(index: number, suggestion: WaypointSuggestion): string;
|
|
41
48
|
onSelectSuggestion(suggestion: WaypointSuggestion): void;
|
|
49
|
+
private resolveByPlaceId;
|
|
42
50
|
onKeyDown(event: KeyboardEvent): void;
|
|
43
51
|
onBlur(): void;
|
|
44
52
|
onFocus(): void;
|
|
45
|
-
writeValue(nextValue?: string): void;
|
|
53
|
+
writeValue(nextValue?: string | null): void;
|
|
46
54
|
registerOnChange(fn: (value: string) => void): void;
|
|
47
55
|
registerOnTouched(fn: () => void): void;
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
delete(): void;
|
|
57
|
+
clear(): void;
|
|
50
58
|
private initGoogle;
|
|
51
59
|
private resetSessionToken;
|
|
52
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<EcabsPlaceAutocompleteV2Component, never>;
|
|
53
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EcabsPlaceAutocompleteV2Component, "ecabs-place-autocomplete-v2", never, { "showDeleteItem": { "alias": "showDeleteItem"; "required": false; }; "waypointsHistory": { "alias": "waypointsHistory"; "required": false; }; "showSuffix": { "alias": "showSuffix"; "required": false; }; "countryCode": { "alias": "countryCode"; "required": false; }; "googleLoaded": { "alias": "googleLoaded"; "required": false; }; "waypointType": { "alias": "waypointType"; "required": false; }; "
|
|
61
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EcabsPlaceAutocompleteV2Component, "ecabs-place-autocomplete-v2", never, { "showDeleteItem": { "alias": "showDeleteItem"; "required": false; }; "waypointsHistory": { "alias": "waypointsHistory"; "required": false; }; "showSuffix": { "alias": "showSuffix"; "required": false; }; "countryCode": { "alias": "countryCode"; "required": false; }; "googleLoaded": { "alias": "googleLoaded"; "required": false; }; "waypointType": { "alias": "waypointType"; "required": false; }; "debounceMs": { "alias": "debounceMs"; "required": false; }; }, { "placeResult": "placeResult"; "deleteItem": "deleteItem"; "queryChanged": "queryChanged"; }, never, never, false, never>;
|
|
54
62
|
}
|
package/package.json
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
.chip {
|
|
2
|
-
@include fontSize($font-size-base);
|
|
3
|
-
|
|
4
|
-
border-radius: $border-radius-base;
|
|
5
|
-
display: flex;
|
|
6
|
-
width: fit-content;
|
|
7
|
-
min-width: calc-rem(56px);
|
|
8
|
-
padding: calc-rem(8px 12px);
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
background-color: var(--color-gray-50);
|
|
12
|
-
color: var(--color-gray-500);
|
|
13
|
-
font-weight: $font-weight-regular;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
|
|
16
|
-
&:hover {
|
|
17
|
-
border-color: var(--color-gray-300);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@include e(standard) {
|
|
21
|
-
width: 7.2rem;
|
|
22
|
-
max-width: 7.2rem;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// #Info
|
|
26
|
-
@include m(info) {
|
|
27
|
-
background-color: rgba(var(--color-info-rgb), .06);
|
|
28
|
-
color: var(--color-info);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// #Warn
|
|
32
|
-
@include m(warn) {
|
|
33
|
-
background-color:
|
|
34
|
-
color: var(--color-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// #Danger
|
|
38
|
-
@include m(danger) {
|
|
39
|
-
background-color: rgba(var(--color-error-rgb), .06);
|
|
40
|
-
color: var(--color-error);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// #Success
|
|
44
|
-
@include m(success) {
|
|
45
|
-
background-color: var(--color-success--opacity);
|
|
46
|
-
color: var(--color-success);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// #Selected
|
|
50
|
-
@include m(selected) {
|
|
51
|
-
&, * {
|
|
52
|
-
color: var(--color-white);
|
|
53
|
-
border-color: var(--color-brand-light);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
background-color: var(--color-brand-light);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@include m(not-selected) {
|
|
60
|
-
border: 1px solid var(--color-gray-300);
|
|
61
|
-
background-color: var(--color-white);
|
|
62
|
-
color: var(--color-black);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
1
|
+
.chip {
|
|
2
|
+
@include fontSize($font-size-base);
|
|
3
|
+
|
|
4
|
+
border-radius: $border-radius-base;
|
|
5
|
+
display: flex;
|
|
6
|
+
width: fit-content;
|
|
7
|
+
min-width: calc-rem(56px);
|
|
8
|
+
padding: calc-rem(8px 12px);
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
background-color: var(--color-gray-50);
|
|
12
|
+
color: var(--color-gray-500);
|
|
13
|
+
font-weight: $font-weight-regular;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
border-color: var(--color-gray-300);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@include e(standard) {
|
|
21
|
+
width: 7.2rem;
|
|
22
|
+
max-width: 7.2rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// #Info
|
|
26
|
+
@include m(info) {
|
|
27
|
+
background-color: rgba(var(--color-info-rgb), .06);
|
|
28
|
+
color: var(--color-info);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// #Warn
|
|
32
|
+
@include m(warn) {
|
|
33
|
+
background-color: var(--color-warning-opacity);
|
|
34
|
+
color: var(--color-warning);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// #Danger
|
|
38
|
+
@include m(danger) {
|
|
39
|
+
background-color: rgba(var(--color-error-rgb), .06);
|
|
40
|
+
color: var(--color-error);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// #Success
|
|
44
|
+
@include m(success) {
|
|
45
|
+
background-color: var(--color-success--opacity);
|
|
46
|
+
color: var(--color-success);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// #Selected
|
|
50
|
+
@include m(selected) {
|
|
51
|
+
&, * {
|
|
52
|
+
color: var(--color-white);
|
|
53
|
+
border-color: var(--color-brand-light);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
background-color: var(--color-brand-light);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@include m(not-selected) {
|
|
60
|
+
border: 1px solid var(--color-gray-300);
|
|
61
|
+
background-color: var(--color-white);
|
|
62
|
+
color: var(--color-black);
|
|
63
|
+
}
|
|
64
|
+
}
|