ecabs-components 1.1.1 → 1.1.2
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 +2 -0
- package/esm2022/lib/base/element-base.mjs +15 -7
- package/esm2022/lib/base/element-wrapper/element-wrapper.component.mjs +6 -6
- package/esm2022/lib/base/element-wrapper/element-wrapper.module.mjs +6 -6
- package/esm2022/lib/base/models/element.models.mjs +1 -1
- package/esm2022/lib/base/utils/object-utils.mjs +33 -1
- package/esm2022/lib/ecabs-checkbox-toggle/ecabs-checkbox-toggle.component.mjs +5 -5
- package/esm2022/lib/ecabs-date-picker/ecabs-date-picker.component.mjs +5 -5
- package/esm2022/lib/ecabs-date-range-picker/ecabs-date-range-picker.component.mjs +5 -5
- package/esm2022/lib/ecabs-date-time-picker/ecabs-date-time-picker.component.mjs +5 -5
- package/esm2022/lib/ecabs-date-time-range-picker/ecabs-date-time-range-picker.component.mjs +5 -5
- package/esm2022/lib/ecabs-increment/ecabs-increment.component.mjs +5 -5
- package/esm2022/lib/ecabs-input/ecabs-input.component.mjs +5 -5
- package/esm2022/lib/ecabs-multiple-dates-picker/ecabs-multiple-dates-picker.component.mjs +5 -5
- package/esm2022/lib/ecabs-phone/ecabs-phone.component.mjs +5 -5
- package/esm2022/lib/ecabs-place-autocomplete/ecabs-place-autocomplete.component.mjs +5 -5
- package/esm2022/lib/ecabs-radio-button-list/ecabs-radio-button-list.component.mjs +5 -5
- package/esm2022/lib/ecabs-select/ecabs-select.component.mjs +5 -5
- package/esm2022/lib/ecabs-select-v2/ecabs-select-v2.component.mjs +216 -0
- package/esm2022/lib/ecabs-select-v2/ecabs-select-v2.module.mjs +51 -0
- package/esm2022/lib/ecabs-textarea/ecabs-textarea.component.mjs +5 -5
- package/esm2022/lib/ecabs-timepicker/ecabs-timepicker.component.mjs +5 -5
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/ecabs-components.mjs +420 -135
- package/fesm2022/ecabs-components.mjs.map +1 -1
- package/lib/base/element-base.d.ts +5 -3
- package/lib/base/element-wrapper/element-wrapper.component.d.ts +3 -3
- package/lib/base/element-wrapper/element-wrapper.module.d.ts +1 -1
- package/lib/base/models/element.models.d.ts +1 -0
- package/lib/base/utils/object-utils.d.ts +2 -0
- package/lib/ecabs-checkbox-toggle/ecabs-checkbox-toggle.component.d.ts +2 -2
- package/lib/ecabs-date-picker/ecabs-date-picker.component.d.ts +2 -2
- package/lib/ecabs-date-range-picker/ecabs-date-range-picker.component.d.ts +2 -2
- package/lib/ecabs-date-time-picker/ecabs-date-time-picker.component.d.ts +2 -2
- package/lib/ecabs-date-time-range-picker/ecabs-date-time-range-picker.component.d.ts +2 -2
- package/lib/ecabs-increment/ecabs-increment.component.d.ts +2 -2
- package/lib/ecabs-input/ecabs-input.component.d.ts +2 -2
- package/lib/ecabs-multiple-dates-picker/ecabs-multiple-dates-picker.component.d.ts +2 -2
- package/lib/ecabs-phone/ecabs-phone.component.d.ts +2 -2
- package/lib/ecabs-place-autocomplete/ecabs-place-autocomplete.component.d.ts +2 -2
- package/lib/ecabs-radio-button-list/ecabs-radio-button-list.component.d.ts +2 -2
- package/lib/ecabs-select/ecabs-select.component.d.ts +2 -2
- package/lib/ecabs-select-v2/ecabs-select-v2.component.d.ts +58 -0
- package/lib/ecabs-select-v2/ecabs-select-v2.module.d.ts +15 -0
- package/lib/ecabs-textarea/ecabs-textarea.component.d.ts +2 -2
- package/lib/ecabs-timepicker/ecabs-timepicker.component.d.ts +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/src/assets/styles/material/overrides/_form.scss +2 -6
- package/src/assets/styles/material/overrides/_select.scss +126 -2
- package/src/assets/styles/scss/modules/_datepicker.scss +1 -1
- package/src/assets/styles/scss/modules/_form.scss +1 -0
- package/src/assets/styles/tailwind/index.scss +1 -1
|
@@ -2,13 +2,14 @@ import { EventEmitter } from '@angular/core';
|
|
|
2
2
|
import { UntypedFormControl } from '@angular/forms';
|
|
3
3
|
import { ElementData } from './models/element.models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export default class
|
|
5
|
+
export default class EcabsElementBaseComponent {
|
|
6
6
|
type: string;
|
|
7
7
|
name: string;
|
|
8
8
|
label: string;
|
|
9
9
|
placeholder: string;
|
|
10
10
|
validationLabel: string;
|
|
11
11
|
disabled: boolean;
|
|
12
|
+
readonly: boolean;
|
|
12
13
|
showValidation: boolean;
|
|
13
14
|
showValidationOnNotTouched: boolean;
|
|
14
15
|
hideValidationMessage: boolean;
|
|
@@ -20,6 +21,7 @@ export default class ElementBaseComponent {
|
|
|
20
21
|
showAsterisk: boolean;
|
|
21
22
|
labelNote: string;
|
|
22
23
|
showLabel: boolean;
|
|
24
|
+
showLocalLoading: boolean;
|
|
23
25
|
focused: EventEmitter<any>;
|
|
24
26
|
focusOuted: EventEmitter<any>;
|
|
25
27
|
control: UntypedFormControl;
|
|
@@ -31,6 +33,6 @@ export default class ElementBaseComponent {
|
|
|
31
33
|
private disableControl;
|
|
32
34
|
private toggleDisableState;
|
|
33
35
|
private isRequired;
|
|
34
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EcabsElementBaseComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EcabsElementBaseComponent, "ng-component", never, { "type": { "alias": "type"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "validationLabel": { "alias": "validationLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "showValidation": { "alias": "showValidation"; "required": false; }; "showValidationOnNotTouched": { "alias": "showValidationOnNotTouched"; "required": false; }; "hideValidationMessage": { "alias": "hideValidationMessage"; "required": false; }; "iconClass": { "alias": "iconClass"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "showHint": { "alias": "showHint"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "showAsterisk": { "alias": "showAsterisk"; "required": false; }; "labelNote": { "alias": "labelNote"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "showLocalLoading": { "alias": "showLocalLoading"; "required": false; }; }, { "focused": "focused"; "focusOuted": "focusOuted"; }, never, never, true, never>;
|
|
36
38
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class EcabsElementWrapperComponent {
|
|
4
4
|
data: any;
|
|
5
5
|
showCloseIcon: boolean;
|
|
6
6
|
focusedFlag: any;
|
|
@@ -14,6 +14,6 @@ export declare class ElementWrapperComponent {
|
|
|
14
14
|
clearFn(): void;
|
|
15
15
|
increaseFn(): void;
|
|
16
16
|
decreaseFn(): void;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EcabsElementWrapperComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EcabsElementWrapperComponent, "ecabs-element-wrapper", never, { "data": { "alias": "data"; "required": false; }; "showCloseIcon": { "alias": "showCloseIcon"; "required": false; }; "focusedFlag": { "alias": "focusedFlag"; "required": false; }; "showPassword": { "alias": "showPassword"; "required": false; }; "control": { "alias": "control"; "required": false; }; }, { "showHidePassword": "showHidePassword"; "clear": "clear"; "increase": "increase"; "decrease": "decrease"; }, never, ["*"], false, never>;
|
|
19
19
|
}
|
|
@@ -12,6 +12,6 @@ import * as i9 from "../../ecabs-hint/ecabs-hint.module";
|
|
|
12
12
|
export declare function scrollFactory(overlay: Overlay): () => BlockScrollStrategy;
|
|
13
13
|
export declare class ElementWrapperModule {
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElementWrapperModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ElementWrapperModule, [typeof i1.
|
|
15
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ElementWrapperModule, [typeof i1.EcabsElementWrapperComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.EcabsLoadingModule, typeof i5.EcabsValidationModule, typeof i6.MatFormFieldModule, typeof i7.MatIconModule, typeof i8.MatTooltipModule, typeof i9.EcabsHintModule], [typeof i1.EcabsElementWrapperComponent]>;
|
|
16
16
|
static ɵinj: i0.ɵɵInjectorDeclaration<ElementWrapperModule>;
|
|
17
17
|
}
|
|
@@ -4,3 +4,5 @@ export interface Sorter<T> {
|
|
|
4
4
|
dataType?: 'string' | 'number' | 'date';
|
|
5
5
|
}
|
|
6
6
|
export declare const sortGeneric: <T>(objX: T, objY: T, sortParams: Sorter<T>) => number;
|
|
7
|
+
export declare const removeNullUndefineds: <T>(obj: any, exceptProperties?: string[]) => T;
|
|
8
|
+
export declare const removeEmpty: <T>(o: any, exceptProperties?: string[]) => T;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AfterViewInit, DestroyRef, EventEmitter, Injector, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import
|
|
3
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class EcabsCheckboxToggleComponent extends
|
|
5
|
+
export declare class EcabsCheckboxToggleComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit, OnChanges {
|
|
6
6
|
private readonly injector;
|
|
7
7
|
private readonly destroyRef;
|
|
8
8
|
type: 'checkbox' | 'toggle';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AfterViewInit, EventEmitter, Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import
|
|
3
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
4
4
|
import { EcabsDatePickerHolidayOptions, EcabsDatePickerTranslations } from '../base/models/ecabs-date-picker-translations.models';
|
|
5
5
|
import { EcabsDatePickerHeaderService } from '../base/services/ecabs-date-picker-translations.service';
|
|
6
6
|
import { UnsubscribeService } from '../base/services/unsubscribe.service';
|
|
7
7
|
import { EcabsDatePickerHeaderComponent } from './components/ecabs-date-picker-header/ecabs-date-picker-header.component';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class EcabsDatePickerComponent extends
|
|
9
|
+
export declare class EcabsDatePickerComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit, OnInit {
|
|
10
10
|
private readonly injector;
|
|
11
11
|
private readonly ecabsDatePickerHeaderService;
|
|
12
12
|
private readonly unsubscribeService;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AfterViewInit, EventEmitter, Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import
|
|
3
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
4
4
|
import { EcabsDatePickerTranslations } from '../base/models/ecabs-date-picker-translations.models';
|
|
5
5
|
import { EcabsDatePickerHeaderService } from '../base/services/ecabs-date-picker-translations.service';
|
|
6
6
|
import { UnsubscribeService } from '../base/services/unsubscribe.service';
|
|
7
7
|
import { EcabsDateRangePickerHeaderComponent } from './components/ecabs-date-range-picker-header/ecabs-date-range-picker-header.component';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class EcabsDateRangePickerComponent extends
|
|
9
|
+
export declare class EcabsDateRangePickerComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit, OnInit {
|
|
10
10
|
private readonly injector;
|
|
11
11
|
private readonly ecabsDatePickerHeaderService;
|
|
12
12
|
private readonly unsubscribeService;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DecimalPipe } from '@angular/common';
|
|
2
2
|
import { AfterViewInit, ChangeDetectorRef, EventEmitter, Injector, OnInit } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
-
import
|
|
4
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
5
5
|
import { EcabsDatePickerTranslations } from '../base/models/ecabs-date-picker-translations.models';
|
|
6
6
|
import { EcabsDatePickerHeaderService } from '../base/services/ecabs-date-picker-translations.service';
|
|
7
7
|
import { UnsubscribeService } from '../base/services/unsubscribe.service';
|
|
8
8
|
import { EcabsDateTimePickerHeaderComponent } from './components/ecabs-date-time-picker-header/ecabs-date-time-picker-header.component';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class EcabsDateTimePickerComponent extends
|
|
10
|
+
export declare class EcabsDateTimePickerComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit, OnInit {
|
|
11
11
|
private readonly injector;
|
|
12
12
|
private readonly decimalPipe;
|
|
13
13
|
private readonly cd;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DecimalPipe } from '@angular/common';
|
|
2
2
|
import { AfterViewInit, EventEmitter, Injector, OnInit } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, UntypedFormControl } from '@angular/forms';
|
|
4
|
-
import
|
|
4
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
5
5
|
import { EcabsDatePickerTranslations } from '../base/models/ecabs-date-picker-translations.models';
|
|
6
6
|
import { EcabsDatePickerHeaderService } from '../base/services/ecabs-date-picker-translations.service';
|
|
7
7
|
import { UnsubscribeService } from '../base/services/unsubscribe.service';
|
|
8
8
|
import { EcabsDateTimeRangePickerHeaderComponent } from './components/ecabs-date-time-range-picker-header/ecabs-date-time-range-picker-header.component';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class EcabsDateTimeRangePickerComponent extends
|
|
10
|
+
export declare class EcabsDateTimeRangePickerComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit, OnInit {
|
|
11
11
|
private readonly injector;
|
|
12
12
|
private readonly decimalPipe;
|
|
13
13
|
private readonly ecabsDatePickerHeaderService;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AfterViewInit, EventEmitter, Injector } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import
|
|
3
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class EcabsIncrementComponent extends
|
|
5
|
+
export declare class EcabsIncrementComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit {
|
|
6
6
|
private injector;
|
|
7
7
|
digitsOnly: boolean;
|
|
8
8
|
allowDecimal: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AfterViewInit, DestroyRef, EventEmitter, Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import
|
|
3
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class EcabsInputComponent extends
|
|
5
|
+
export declare class EcabsInputComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit, OnInit {
|
|
6
6
|
private injector;
|
|
7
7
|
private readonly destroyRef;
|
|
8
8
|
digitsOnly: boolean;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AfterViewInit, EventEmitter, Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
|
|
4
|
-
import
|
|
4
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
5
5
|
import { EcabsDatePickerHolidayOptions, EcabsDatePickerTranslations } from '../base/models/ecabs-date-picker-translations.models';
|
|
6
6
|
import { EcabsDatePickerHeaderService } from '../base/services/ecabs-date-picker-translations.service';
|
|
7
7
|
import { UnsubscribeService } from '../base/services/unsubscribe.service';
|
|
8
8
|
import { EcabsDatePickerHeaderComponent } from '../../public-api';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
|
-
export declare class EcabsMultipleDatesPickerComponent extends
|
|
10
|
+
export declare class EcabsMultipleDatesPickerComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit, OnInit {
|
|
11
11
|
private readonly injector;
|
|
12
12
|
private readonly ecabsDatePickerHeaderService;
|
|
13
13
|
private readonly unsubscribeService;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AfterViewInit, EventEmitter, Injector, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor, UntypedFormGroup } from '@angular/forms';
|
|
3
3
|
import { NgxMatIntlTelInputComponent } from 'ngx-mat-intl-tel-input';
|
|
4
|
-
import
|
|
4
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
5
5
|
import { EcabsComponentsService } from '../base/services/ecabs-components.service';
|
|
6
6
|
import { UnsubscribeService } from '../base/services/unsubscribe.service';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class EcabsPhoneComponent extends
|
|
8
|
+
export declare class EcabsPhoneComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit, OnDestroy, OnInit, OnChanges {
|
|
9
9
|
private readonly injector;
|
|
10
10
|
private readonly ecabsComponentsService;
|
|
11
11
|
private unsubscribeService;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { AfterViewInit, ElementRef, EventEmitter, Injector, NgZone, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
4
|
import { UnsubscribeService } from '../../public-api';
|
|
5
|
-
import
|
|
5
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
6
6
|
import PlaceResult = google.maps.places.PlaceResult;
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class EcabsPlaceAutocompleteComponent extends
|
|
8
|
+
export declare class EcabsPlaceAutocompleteComponent extends EcabsElementBaseComponent implements OnDestroy, OnChanges, AfterViewInit, ControlValueAccessor {
|
|
9
9
|
private readonly ngZone;
|
|
10
10
|
private readonly unsubscribeService;
|
|
11
11
|
private readonly elementRef;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AfterViewInit, EventEmitter, Injector } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import
|
|
3
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
4
4
|
import { SelectOption } from '../base/models/select.models';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class EcabsRadioButtonListComponent extends
|
|
6
|
+
export declare class EcabsRadioButtonListComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit {
|
|
7
7
|
private injector;
|
|
8
8
|
items: SelectOption[];
|
|
9
9
|
direction: 'horizontal' | 'vertical';
|
|
@@ -3,10 +3,10 @@ import { UntypedFormControl } from '@angular/forms';
|
|
|
3
3
|
import { MatOption } from '@angular/material/core';
|
|
4
4
|
import { MatSelectSearchComponent } from 'ngx-mat-select-search';
|
|
5
5
|
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
6
|
-
import
|
|
6
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
7
7
|
import { SelectOption } from '../base/models/select.models';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class EcabsSelectComponent extends
|
|
9
|
+
export declare class EcabsSelectComponent extends EcabsElementBaseComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
10
10
|
private readonly injector;
|
|
11
11
|
private readonly changeDetectorRef;
|
|
12
12
|
private readonly destroyRef;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AfterViewInit, DestroyRef, Injector, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { NgSelectComponent } from '@ng-select/ng-select';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
6
|
+
import { SelectValue } from '../base/models/element.models';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class EcabsSelectV2Component extends EcabsElementBaseComponent implements AfterViewInit, ControlValueAccessor, OnChanges, OnInit {
|
|
9
|
+
private readonly injector;
|
|
10
|
+
private readonly destroyRef;
|
|
11
|
+
ngSelect: NgSelectComponent;
|
|
12
|
+
appearance: 'underline' | 'outline';
|
|
13
|
+
items: SelectValue[];
|
|
14
|
+
bindLabel: string;
|
|
15
|
+
bindValue: string;
|
|
16
|
+
editableSearchTerm: boolean;
|
|
17
|
+
searchable: boolean;
|
|
18
|
+
clearable: boolean;
|
|
19
|
+
multiple: boolean;
|
|
20
|
+
notFoundText: string;
|
|
21
|
+
hideSelected: boolean;
|
|
22
|
+
clearOnBackspace: boolean;
|
|
23
|
+
clearSearchOnAdd: boolean;
|
|
24
|
+
trackByFn: any;
|
|
25
|
+
minLength: number;
|
|
26
|
+
searchPlaceholder: string;
|
|
27
|
+
typeahead: Subject<string>;
|
|
28
|
+
closeOnSelect: boolean;
|
|
29
|
+
clearAllText: string;
|
|
30
|
+
selectAllLabel: string;
|
|
31
|
+
otherLabel: string;
|
|
32
|
+
othersLabel: string;
|
|
33
|
+
touched: boolean;
|
|
34
|
+
val: string | number;
|
|
35
|
+
isOpen: boolean;
|
|
36
|
+
groupByKey: string;
|
|
37
|
+
selectedMulti: any[];
|
|
38
|
+
itemsList: SelectValue[];
|
|
39
|
+
isTypeAhead: boolean;
|
|
40
|
+
get value(): string | number;
|
|
41
|
+
set value(val: string | number);
|
|
42
|
+
constructor(injector: Injector, destroyRef: DestroyRef);
|
|
43
|
+
ngOnInit(): void;
|
|
44
|
+
ngAfterViewInit(): void;
|
|
45
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
46
|
+
writeValue(value: number): void;
|
|
47
|
+
registerOnChange(onChange: any): void;
|
|
48
|
+
registerOnTouched(onTouched: any): void;
|
|
49
|
+
markAsTouched(): void;
|
|
50
|
+
onChange: any;
|
|
51
|
+
onTouch: any;
|
|
52
|
+
onBlur(): void;
|
|
53
|
+
selectAllFn(items: SelectValue[]): void;
|
|
54
|
+
changed(event: SelectValue[]): void;
|
|
55
|
+
protected initTrackBy(): void;
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EcabsSelectV2Component, never>;
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EcabsSelectV2Component, "ecabs-select-v2", never, { "appearance": { "alias": "appearance"; "required": false; }; "items": { "alias": "items"; "required": false; }; "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "editableSearchTerm": { "alias": "editableSearchTerm"; "required": false; }; "searchable": { "alias": "searchable"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "notFoundText": { "alias": "notFoundText"; "required": false; }; "hideSelected": { "alias": "hideSelected"; "required": false; }; "clearOnBackspace": { "alias": "clearOnBackspace"; "required": false; }; "clearSearchOnAdd": { "alias": "clearSearchOnAdd"; "required": false; }; "trackByFn": { "alias": "trackByFn"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; }; "typeahead": { "alias": "typeahead"; "required": false; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; }; "clearAllText": { "alias": "clearAllText"; "required": false; }; "selectAllLabel": { "alias": "selectAllLabel"; "required": false; }; "otherLabel": { "alias": "otherLabel"; "required": false; }; "othersLabel": { "alias": "othersLabel"; "required": false; }; }, {}, never, never, false, never>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./ecabs-select-v2.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "../base/element-wrapper/element-wrapper.module";
|
|
5
|
+
import * as i4 from "@angular/material/select";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "@ng-select/ng-select";
|
|
8
|
+
import * as i7 from "../ecabs-loading/ecabs-loading.module";
|
|
9
|
+
import * as i8 from "../ecabs-checkbox-toggle/ecabs-checkbox-toggle.module";
|
|
10
|
+
import * as i9 from "@angular/material/checkbox";
|
|
11
|
+
export declare class EcabsSelectV2Module {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EcabsSelectV2Module, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EcabsSelectV2Module, [typeof i1.EcabsSelectV2Component], [typeof i2.CommonModule, typeof i3.ElementWrapperModule, typeof i4.MatSelectModule, typeof i5.FormsModule, typeof i5.ReactiveFormsModule, typeof i6.NgSelectModule, typeof i7.EcabsLoadingModule, typeof i8.EcabsCheckboxToggleModule, typeof i9.MatCheckboxModule], [typeof i1.EcabsSelectV2Component]>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<EcabsSelectV2Module>;
|
|
15
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AfterViewInit, Injector } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import
|
|
3
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class EcabsTextareaComponent extends
|
|
5
|
+
export declare class EcabsTextareaComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit {
|
|
6
6
|
private injector;
|
|
7
7
|
rows: number;
|
|
8
8
|
val: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AfterViewInit, DestroyRef, ElementRef, Injector } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { FormTimePickerService } from './ecabs-timepicker.service';
|
|
4
|
-
import
|
|
4
|
+
import EcabsElementBaseComponent from '../base/element-base';
|
|
5
5
|
import { ListPlacement, ListPosition } from '../base/models/timepicker.models';
|
|
6
6
|
import { EcabsDatePickerTranslations } from '../base/models/ecabs-date-picker-translations.models';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class EcabsTimepickerComponent extends
|
|
8
|
+
export declare class EcabsTimepickerComponent extends EcabsElementBaseComponent implements ControlValueAccessor, AfterViewInit {
|
|
9
9
|
private readonly elementRef;
|
|
10
10
|
private readonly timepickerService;
|
|
11
11
|
private readonly injector;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export * from './lib/ecabs-input/ecabs-input.component';
|
|
|
7
7
|
export * from './lib/ecabs-input/ecabs-input.module';
|
|
8
8
|
export * from './lib/ecabs-select/ecabs-select.module';
|
|
9
9
|
export * from './lib/ecabs-select/ecabs-select.component';
|
|
10
|
+
export * from './lib/ecabs-select-v2/ecabs-select-v2.module';
|
|
11
|
+
export * from './lib/ecabs-select-v2/ecabs-select-v2.component';
|
|
10
12
|
export * from './lib/ecabs-textarea/ecabs-textarea.component';
|
|
11
13
|
export * from './lib/ecabs-textarea/ecabs-textarea.module';
|
|
12
14
|
export * from './lib/base/services/ecabs-components.service';
|
|
@@ -58,10 +58,6 @@
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
label {
|
|
62
|
-
@extend .form-field__label;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
61
|
.mat-mdc-slide-toggle-label,
|
|
66
62
|
.mat-mdc-checkbox .mdc-form-field .mdc-label,
|
|
67
63
|
.mat-mdc-radio-button .mdc-form-field .mdc-label {
|
|
@@ -74,13 +70,13 @@ label {
|
|
|
74
70
|
.newline-validation .form-field {
|
|
75
71
|
flex-wrap: wrap;
|
|
76
72
|
|
|
77
|
-
|
|
73
|
+
ecabs-validations-messages {
|
|
78
74
|
flex-basis: 100%;
|
|
79
75
|
}
|
|
80
76
|
}
|
|
81
77
|
|
|
82
78
|
.form-field--required {
|
|
83
|
-
.form-field__label
|
|
79
|
+
.form-field__label {
|
|
84
80
|
&:not([class*=mat-slide-toggle-label], [class*=mat-radio-label]) {
|
|
85
81
|
&:after {
|
|
86
82
|
@extend %required;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@import "../../scss/utilities/index";
|
|
2
2
|
|
|
3
3
|
.mat-mdc-select {
|
|
4
|
-
&, &.form-field__select {
|
|
4
|
+
&, &.form-field__select, {
|
|
5
5
|
@extend .select;
|
|
6
6
|
|
|
7
7
|
.mat-mdc-select-arrow {
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.form-field--invalid {
|
|
50
|
-
.mat-mdc-form-field .mat-mdc-select
|
|
50
|
+
.mat-mdc-form-field .mat-mdc-select,
|
|
51
|
+
.form-field__select.ng-select .ng-select-container {
|
|
51
52
|
@extend .form-field--invalid;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
@@ -67,3 +68,126 @@
|
|
|
67
68
|
.mat-mdc-select-search-input {
|
|
68
69
|
color: var(--color-black) !important;
|
|
69
70
|
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* #@ng-select
|
|
74
|
+
*/
|
|
75
|
+
.form-field__select.ng-select {
|
|
76
|
+
.ng-select-container,
|
|
77
|
+
[class*="form-field__select ng-select"] .ng-select-container {
|
|
78
|
+
@extend .select;
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
box-shadow: unset;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.ng-select-disabled > .ng-select-container {
|
|
86
|
+
background-color: var(--color-white-opacity-05);
|
|
87
|
+
border-color: var(--color-gray-300);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.mdc-checkbox {
|
|
91
|
+
box-sizing: unset;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ng-clear-wrapper {
|
|
95
|
+
width: calc-rem(24px);
|
|
96
|
+
height: calc-rem(24px);
|
|
97
|
+
text-align: center;
|
|
98
|
+
|
|
99
|
+
.ng-clear {
|
|
100
|
+
@include fontSize(24px);
|
|
101
|
+
|
|
102
|
+
color: var(--color-gray-500);
|
|
103
|
+
font-weight: $font-weight-semibold;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.ng-select-focused:not(.ng-select-opened) > .ng-select-container {
|
|
108
|
+
border-color: var(--color-brand-dark);
|
|
109
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 2px rgb(50 95 218 / 10%);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&.ng-select-typeahead.ng-select-opened .ng-value {
|
|
113
|
+
color: var(--color-gray-400);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&.ng-select-multiple .ng-select-container .ng-value-container {
|
|
117
|
+
&, .ng-input {
|
|
118
|
+
padding: 0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.ng-select-single .ng-select-container .ng-value-container .ng-input {
|
|
123
|
+
top: .5rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&, &.ng-select-multiple .ng-select-container .ng-value-container {
|
|
127
|
+
.ng-placeholder {
|
|
128
|
+
top: unset;
|
|
129
|
+
padding-bottom: unset;
|
|
130
|
+
padding-left: unset;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.ng-select-container .ng-value-container {
|
|
135
|
+
padding-left: 0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&.ng-select-single .ng-select-container {
|
|
139
|
+
height: unset;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.ng-dropdown-panel {
|
|
143
|
+
box-shadow: $box-shadow-default;
|
|
144
|
+
border: unset;
|
|
145
|
+
|
|
146
|
+
&.ng-select-bottom {
|
|
147
|
+
margin-top: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.ng-dropdown-panel-items {
|
|
151
|
+
.ng-optgroup {
|
|
152
|
+
color: inherit;
|
|
153
|
+
font-weight: inherit;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.ng-option.ng-option-child {
|
|
157
|
+
padding-left: 10px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.ng-option,
|
|
161
|
+
.ng-optgroup.ng-option-marked {
|
|
162
|
+
&.ng-option-selected,
|
|
163
|
+
&.ng-option-selected.ng-option-marked,
|
|
164
|
+
&.ng-optgroup.ng-option-marked,
|
|
165
|
+
&.ng-option-marked {
|
|
166
|
+
background-color: var(--color-gray-100);
|
|
167
|
+
color: var(--color-brand-dark);
|
|
168
|
+
|
|
169
|
+
.ng-option-label {
|
|
170
|
+
font-weight: $font-weight-regular;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.ng-arrow-wrapper, &.ng-select-opened > .ng-select-container {
|
|
178
|
+
.ng-arrow {
|
|
179
|
+
border-width: 0;
|
|
180
|
+
border-color: unset;
|
|
181
|
+
width: calc-rem(12px);
|
|
182
|
+
height: calc-rem(12px);
|
|
183
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEyIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02IDcuNDEwMTZMMCAxLjQxMDE2TDEuNDEgMC4wMDAxNTY0MDNMNiA0LjU4MDE2TDEwLjU5IDAuMDAwMTU2NDAzTDEyIDEuNDEwMTZMNiA3LjQxMDE2WiIgZmlsbD0iIzZCNkQ3MyIvPgo8L3N2Zz4K);
|
|
184
|
+
background-size: 0.75rem 1rem;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&.ng-select-opened > .ng-select-container .ng-arrow {
|
|
189
|
+
transform: scaleY(-1);
|
|
190
|
+
background-size: 0.75rem 0.6rem;
|
|
191
|
+
height: 0.6rem;
|
|
192
|
+
}
|
|
193
|
+
}
|