myrta-ui 1.1.100 → 13.0.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.
- package/README.md +1 -1
- package/esm2020/lib/components/form/select/enums/index.mjs +2 -0
- package/esm2020/lib/components/form/select/enums/select-size.enum.mjs +6 -0
- package/esm2020/lib/components/form/select/helpers/clean-selected-items.helper.mjs +3 -0
- package/esm2020/lib/components/form/select/helpers/get-inner-items.helper.mjs +13 -0
- package/esm2020/lib/components/form/select/helpers/get-inner-selected.helper.mjs +13 -0
- package/esm2020/lib/components/form/select/helpers/get-selected-items.helper.mjs +6 -0
- package/esm2020/lib/components/form/select/helpers/modify-origin-items.helper.mjs +21 -0
- package/esm2020/lib/components/form/select/models/index.mjs +4 -0
- package/esm2020/lib/components/form/select/models/select-inner-item.model.mjs +2 -0
- package/esm2020/lib/components/form/select/models/select-item.model.mjs +2 -0
- package/esm2020/lib/components/form/select/models/template-output.model.mjs +2 -0
- package/esm2020/lib/components/form/select/select.component.mjs +339 -0
- package/esm2020/lib/components/form/select/select.enum.mjs +2 -0
- package/esm2020/lib/components/form/select/select.module.mjs +67 -0
- package/esm2020/lib/components/popup/components/popup/popup.component.mjs +26 -8
- package/esm2020/lib/components/popup/components/popup-item/popup-item.component.mjs +19 -5
- package/esm2020/lib/components/popup/directives/popup-trigger.directive.mjs +83 -16
- package/esm2020/lib/components/popup/popup.module.mjs +10 -5
- package/esm2020/public-api.mjs +6 -1
- package/fesm2015/myrta-ui.mjs +694 -158
- package/fesm2015/myrta-ui.mjs.map +1 -1
- package/fesm2020/myrta-ui.mjs +691 -158
- package/fesm2020/myrta-ui.mjs.map +1 -1
- package/lib/components/form/select/enums/index.d.ts +1 -0
- package/lib/components/form/select/enums/select-size.enum.d.ts +5 -0
- package/lib/components/form/select/helpers/clean-selected-items.helper.d.ts +3 -0
- package/lib/components/form/select/helpers/get-inner-items.helper.d.ts +3 -0
- package/lib/components/form/select/helpers/get-inner-selected.helper.d.ts +2 -0
- package/lib/components/form/select/helpers/get-selected-items.helper.d.ts +2 -0
- package/lib/components/form/select/helpers/modify-origin-items.helper.d.ts +2 -0
- package/lib/components/form/select/models/index.d.ts +3 -0
- package/lib/components/form/select/models/select-inner-item.model.d.ts +6 -0
- package/lib/components/form/select/models/select-item.model.d.ts +5 -0
- package/lib/components/form/select/models/template-output.model.d.ts +8 -0
- package/lib/components/form/select/select.component.d.ts +96 -0
- package/lib/components/form/select/select.enum.d.ts +5 -0
- package/lib/components/form/select/select.module.d.ts +17 -0
- package/lib/components/popup/components/popup/popup.component.d.ts +9 -3
- package/lib/components/popup/components/popup-item/popup-item.component.d.ts +5 -1
- package/lib/components/popup/directives/popup-trigger.directive.d.ts +22 -9
- package/lib/components/popup/popup.module.d.ts +4 -3
- package/package.json +1 -1
- package/public-api.d.ts +5 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './select-size.enum';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SelectItemModel } from '../models/select-item.model';
|
|
2
|
+
import { SelectInnerItemModel } from '../models/select-inner-item.model';
|
|
3
|
+
export declare const getInnerItems: (items: SelectItemModel[], selectedItems: SelectItemModel[] | undefined, bindValue: string | null) => SelectInnerItemModel[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SelectItemModel } from './select-item.model';
|
|
2
|
+
import { SelectInnerItemModel } from './select-inner-item.model';
|
|
3
|
+
export interface TemplateOutputModel {
|
|
4
|
+
item: SelectItemModel;
|
|
5
|
+
first: boolean;
|
|
6
|
+
last: boolean;
|
|
7
|
+
clear?: (item: SelectInnerItemModel) => void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { SelectSizeTypes } from './enums';
|
|
4
|
+
import { PopupComponent } from '../../popup/components/popup/popup.component';
|
|
5
|
+
import { SelectInnerItemModel, AddOptionFn, CustomSearchFn, SelectItemModel, TemplateOutputModel } from './models';
|
|
6
|
+
import { PositionType } from '../../../enums/overlay';
|
|
7
|
+
import { MrxFormValidator } from '../../../services';
|
|
8
|
+
import { SelectValueTypes, SelectValueWithId } from './select.enum';
|
|
9
|
+
import { Field } from '../../../services';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export declare class SelectComponent implements ControlValueAccessor, OnInit {
|
|
12
|
+
searchValue: string;
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
originSelected: any | any[];
|
|
15
|
+
originItems: SelectItemModel[];
|
|
16
|
+
selected: SelectItemModel[];
|
|
17
|
+
innerItems: SelectInnerItemModel[];
|
|
18
|
+
form: MrxFormValidator;
|
|
19
|
+
model: {
|
|
20
|
+
label: string;
|
|
21
|
+
};
|
|
22
|
+
uuid: string;
|
|
23
|
+
fields: Field[];
|
|
24
|
+
set items(items: any[]);
|
|
25
|
+
multiple: boolean;
|
|
26
|
+
isLoading: boolean;
|
|
27
|
+
searchable: boolean;
|
|
28
|
+
clearable: boolean;
|
|
29
|
+
closable: boolean;
|
|
30
|
+
size: SelectSizeTypes;
|
|
31
|
+
bindValue: string | null;
|
|
32
|
+
bindLabel: string | null;
|
|
33
|
+
bindIcon: string | null;
|
|
34
|
+
emptyText: string;
|
|
35
|
+
placeholder: string;
|
|
36
|
+
searchPlaceholder: string;
|
|
37
|
+
multiCollapseCount: number | null;
|
|
38
|
+
optionValidation: {
|
|
39
|
+
label: {
|
|
40
|
+
required: boolean;
|
|
41
|
+
minLength: number;
|
|
42
|
+
};
|
|
43
|
+
} | null;
|
|
44
|
+
extraOptionPlaceholder: string;
|
|
45
|
+
use: 'default' | 'link';
|
|
46
|
+
sortIcon: 'asc' | 'desc' | null;
|
|
47
|
+
sortPlaceholder: string;
|
|
48
|
+
isFullWidthDropdown: boolean;
|
|
49
|
+
withoutSelected: boolean;
|
|
50
|
+
hideSelected: boolean;
|
|
51
|
+
addOption: AddOptionFn;
|
|
52
|
+
customSearchFn?: CustomSearchFn;
|
|
53
|
+
disabled: boolean;
|
|
54
|
+
readonly: boolean;
|
|
55
|
+
invalid: boolean;
|
|
56
|
+
invalidMessage: string | string[];
|
|
57
|
+
checkInvalid: true | false | null;
|
|
58
|
+
popupPosition: PositionType;
|
|
59
|
+
singleChange: boolean;
|
|
60
|
+
scrollContainer?: ElementRef;
|
|
61
|
+
scrollStrategy: 'reposition' | 'close';
|
|
62
|
+
dropdown: PopupComponent;
|
|
63
|
+
optionTemplate: TemplateRef<TemplateOutputModel>;
|
|
64
|
+
labelTemplate: TemplateRef<TemplateOutputModel>;
|
|
65
|
+
popupHeaderTemplate: TemplateRef<TemplateOutputModel>;
|
|
66
|
+
popupFooterTemplate: TemplateRef<TemplateOutputModel>;
|
|
67
|
+
contentTemplate: TemplateRef<any>;
|
|
68
|
+
changed: EventEmitter<SelectValueTypes>;
|
|
69
|
+
modelChange: EventEmitter<SelectValueWithId>;
|
|
70
|
+
ngOnInit(): void;
|
|
71
|
+
get readonlyClass(): string;
|
|
72
|
+
get checkValidClasses(): string;
|
|
73
|
+
get getClasses(): string;
|
|
74
|
+
get getSelectedLabels(): SelectInnerItemModel[];
|
|
75
|
+
get filteredItems(): SelectInnerItemModel[];
|
|
76
|
+
get isInvalidMessage(): boolean;
|
|
77
|
+
get getIconSize(): string;
|
|
78
|
+
onSelect(item: SelectInnerItemModel): void;
|
|
79
|
+
clearItem(item: SelectInnerItemModel): void;
|
|
80
|
+
onUnselect(item: SelectInnerItemModel): void;
|
|
81
|
+
onClear(event: MouseEvent): void;
|
|
82
|
+
togglePopup(isOpen: boolean): void;
|
|
83
|
+
asOption(option: SelectInnerItemModel): SelectInnerItemModel;
|
|
84
|
+
asLabel(label: SelectInnerItemModel): SelectInnerItemModel;
|
|
85
|
+
writeValue(selected?: any | any[]): void;
|
|
86
|
+
changeTextValueEmpty(): void;
|
|
87
|
+
onAddNewCustomOption(): void;
|
|
88
|
+
private _updateSelected;
|
|
89
|
+
private _updateValue;
|
|
90
|
+
private onChange;
|
|
91
|
+
private onTouched;
|
|
92
|
+
registerOnChange(fn: any): void;
|
|
93
|
+
registerOnTouched(fn: () => {}): void;
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "mrx-select", never, { "fields": "fields"; "items": "items"; "multiple": "multiple"; "isLoading": "isLoading"; "searchable": "searchable"; "clearable": "clearable"; "closable": "closable"; "size": "size"; "bindValue": "bindValue"; "bindLabel": "bindLabel"; "bindIcon": "bindIcon"; "emptyText": "emptyText"; "placeholder": "placeholder"; "searchPlaceholder": "searchPlaceholder"; "multiCollapseCount": "multiCollapseCount"; "optionValidation": "isExtraOption"; "extraOptionPlaceholder": "extraOptionPlaceholder"; "use": "use"; "sortIcon": "sortIcon"; "sortPlaceholder": "sortPlaceholder"; "isFullWidthDropdown": "isFullWidthDropdown"; "withoutSelected": "withoutSelected"; "hideSelected": "hideSelected"; "addOption": "addOption"; "customSearchFn": "customSearchFn"; "disabled": "disabled"; "readonly": "readonly"; "invalid": "invalid"; "invalidMessage": "invalidMessage"; "checkInvalid": "checkInvalid"; "popupPosition": "popupPosition"; "singleChange": "singleChange"; "scrollContainer": "scrollContainer"; "scrollStrategy": "scrollStrategy"; }, { "changed": "changed"; "modelChange": "modelChange"; }, ["optionTemplate", "labelTemplate", "popupHeaderTemplate", "popupFooterTemplate", "contentTemplate"], never>;
|
|
96
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./select.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "../../popup/popup.module";
|
|
6
|
+
import * as i5 from "../../loader/loader.module";
|
|
7
|
+
import * as i6 from "../input-text/input-text.module";
|
|
8
|
+
import * as i7 from "../../error-message/error-message.module";
|
|
9
|
+
import * as i8 from "../../save-state/save-state.module";
|
|
10
|
+
import * as i9 from "../../button/button.module";
|
|
11
|
+
import * as i10 from "../input-search/input-search.module";
|
|
12
|
+
import * as i11 from "ngx-mask";
|
|
13
|
+
export declare class SelectModule {
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectModule, never>;
|
|
15
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SelectModule, [typeof i1.SelectComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.PopupModule, typeof i5.LoaderModule, typeof i6.InputTextModule, typeof i7.ErrorMessageModule, typeof i8.SaveStateModule, typeof i9.ButtonModule, typeof i10.InputSearchModule, typeof i11.NgxMaskModule], [typeof i1.SelectComponent]>;
|
|
16
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SelectModule>;
|
|
17
|
+
}
|
|
@@ -3,10 +3,16 @@ import { PopupItemComponent } from '../popup-item/popup-item.component';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class PopupComponent {
|
|
5
5
|
closeAfterClick: boolean;
|
|
6
|
-
|
|
6
|
+
minWidth: string;
|
|
7
7
|
templateRef: TemplateRef<any>;
|
|
8
|
+
headerTemplate: TemplateRef<HTMLElement>;
|
|
9
|
+
footerTemplate: TemplateRef<HTMLElement>;
|
|
8
10
|
popupItemComponents: QueryList<PopupItemComponent>;
|
|
9
|
-
|
|
11
|
+
toggle: EventEmitter<boolean>;
|
|
12
|
+
_toggleInner: EventEmitter<boolean>;
|
|
13
|
+
_updateInner: EventEmitter<void>;
|
|
14
|
+
togglePopup(value: boolean): void;
|
|
15
|
+
updatePopup(): void;
|
|
10
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<PopupComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PopupComponent, "mrx-popup", never, { "closeAfterClick": "closeAfterClick"; "
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PopupComponent, "mrx-popup", never, { "closeAfterClick": "closeAfterClick"; "minWidth": "minWidth"; }, { "toggle": "toggle"; "_toggleInner": "_toggleInner"; "_updateInner": "_updateInner"; }, ["headerTemplate", "footerTemplate", "popupItemComponents"], never>;
|
|
12
18
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class PopupItemComponent {
|
|
4
|
+
custom: boolean;
|
|
5
|
+
id: string | number;
|
|
6
|
+
disabled: boolean;
|
|
4
7
|
templateRef: TemplateRef<any>;
|
|
5
8
|
clicked: EventEmitter<void>;
|
|
9
|
+
itemClick(): void;
|
|
6
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<PopupItemComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PopupItemComponent, "mrx-popup-item", never, {}, { "clicked": "clicked"; }, never, ["*"]>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PopupItemComponent, "mrx-popup-item", never, { "custom": "custom"; "id": "id"; "disabled": "disabled"; }, { "clicked": "clicked"; }, never, ["*"]>;
|
|
8
12
|
}
|
|
@@ -1,27 +1,40 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy, ViewContainerRef } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ElementRef, OnDestroy, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { PopupComponent } from '../components/popup/popup.component';
|
|
3
|
-
import { Overlay, OverlayOutsideClickDispatcher } from '@angular/cdk/overlay';
|
|
4
|
-
import {
|
|
3
|
+
import { Overlay, OverlayOutsideClickDispatcher, ScrollDispatcher } from '@angular/cdk/overlay';
|
|
4
|
+
import { PositionType } from '../../../enums/overlay';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class PopupTriggerDirective implements OnDestroy {
|
|
6
|
+
export declare class PopupTriggerDirective implements AfterViewInit, OnDestroy {
|
|
7
7
|
private overlay;
|
|
8
8
|
private elementRef;
|
|
9
9
|
private viewContainerRef;
|
|
10
10
|
private dispatcher;
|
|
11
|
-
private
|
|
11
|
+
private scrollDispatcher;
|
|
12
|
+
private _subscriberDetach$;
|
|
13
|
+
private _subscriberAttach$;
|
|
12
14
|
private _isDropdownOpen;
|
|
13
15
|
private _overlayRef;
|
|
14
16
|
popupPanel: PopupComponent;
|
|
15
|
-
popupPosition:
|
|
16
|
-
|
|
17
|
+
popupPosition: PositionType;
|
|
18
|
+
isFullWidthDropdown: boolean;
|
|
19
|
+
minWidthDropdown: number | string;
|
|
20
|
+
maxWidthDropdown: number | string;
|
|
21
|
+
scrollContainerRef?: ElementRef;
|
|
22
|
+
scrollStrategy: 'reposition' | 'close';
|
|
23
|
+
get getMinWidthDropdown(): string | number;
|
|
24
|
+
get getMaxWidthDropdown(): string | number | undefined;
|
|
25
|
+
constructor(overlay: Overlay, elementRef: ElementRef<HTMLElement>, viewContainerRef: ViewContainerRef, dispatcher: OverlayOutsideClickDispatcher, scrollDispatcher: ScrollDispatcher);
|
|
26
|
+
ngAfterViewInit(): void;
|
|
17
27
|
togglePopup(): void;
|
|
18
28
|
openDropdown(): void;
|
|
19
|
-
|
|
29
|
+
closeDropdown(): void;
|
|
30
|
+
updatePosition(): void;
|
|
31
|
+
updateSize(): void;
|
|
20
32
|
private getPositionStrategy;
|
|
21
33
|
private destroyDropdown;
|
|
22
34
|
private hideOtherOverlays;
|
|
23
35
|
ngOnDestroy(): void;
|
|
24
36
|
handleClick(event: any): void;
|
|
37
|
+
handleResize(): void;
|
|
25
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<PopupTriggerDirective, never>;
|
|
26
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<PopupTriggerDirective, "[mrxPopupTrigger]", never, { "popupPanel": "mrxPopupTrigger"; "popupPosition": "popupPosition"; }, {}, never>;
|
|
39
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PopupTriggerDirective, "[mrxPopupTrigger]", never, { "popupPanel": "mrxPopupTrigger"; "popupPosition": "popupPosition"; "isFullWidthDropdown": "isFullWidthDropdown"; "minWidthDropdown": "minWidthDropdown"; "maxWidthDropdown": "maxWidthDropdown"; "scrollContainerRef": "scrollContainerRef"; "scrollStrategy": "scrollStrategy"; }, {}, never>;
|
|
27
40
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./components/popup/popup.component";
|
|
3
3
|
import * as i2 from "./components/popup-item/popup-item.component";
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "@angular/
|
|
4
|
+
import * as i3 from "./directives/popup-trigger.directive";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@angular/cdk/overlay";
|
|
6
7
|
export declare class PopupModule {
|
|
7
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<PopupModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PopupModule, [typeof i1.PopupComponent, typeof i2.PopupItemComponent], [typeof
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PopupModule, [typeof i1.PopupComponent, typeof i2.PopupItemComponent, typeof i3.PopupTriggerDirective], [typeof i4.CommonModule, typeof i5.OverlayModule], [typeof i1.PopupComponent, typeof i2.PopupItemComponent, typeof i3.PopupTriggerDirective]>;
|
|
9
10
|
static ɵinj: i0.ɵɵInjectorDeclaration<PopupModule>;
|
|
10
11
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -131,6 +131,11 @@ export * from './lib/components/form/input-number/input-number.enum';
|
|
|
131
131
|
export * from './lib/components/form/input-select/input-select.module';
|
|
132
132
|
export * from './lib/components/form/input-select/input-select.component';
|
|
133
133
|
export * from './lib/components/form/input-select/input-select.enum';
|
|
134
|
+
export * from './lib/components/form/select/select.module';
|
|
135
|
+
export * from './lib/components/form/select/select.component';
|
|
136
|
+
export * from './lib/components/form/select/select.enum';
|
|
137
|
+
export * from './lib/components/form/select/models';
|
|
138
|
+
export * from './lib/components/form/select/enums';
|
|
134
139
|
export * from './lib/components/form/input-file/input-file.module';
|
|
135
140
|
export * from './lib/components/form/input-file/input-file.component';
|
|
136
141
|
export * from './lib/components/form/input-file-image/input-file-image.module';
|