@wlcm/angular 17.1.10 → 17.3.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.
- package/core/esm2022/lib/components/chevron-down-icon/chevron-down-icon.component.mjs +3 -3
- package/core/fesm2022/wlcm-angular-core.mjs +2 -2
- package/core/fesm2022/wlcm-angular-core.mjs.map +1 -1
- package/forms/esm2022/index.mjs +2 -1
- package/forms/esm2022/lib/forms/components/checkbox/checkbox.component.mjs +10 -7
- package/forms/esm2022/lib/forms/components/select/select.component.mjs +17 -16
- package/forms/esm2022/lib/forms/constants/form-field.constants.mjs +2 -0
- package/forms/esm2022/lib/forms/directives/input.directive.mjs +3 -2
- package/forms/fesm2022/wlcm-angular-forms.mjs +26 -21
- package/forms/fesm2022/wlcm-angular-forms.mjs.map +1 -1
- package/forms/index.d.ts +1 -0
- package/forms/lib/forms/components/checkbox/checkbox.component.d.ts +3 -2
- package/forms/lib/forms/components/select/select.component.d.ts +13 -7
- package/forms/lib/forms/constants/form-field.constants.d.ts +1 -0
- package/package.json +5 -1
- package/styles/components/forms/_checkbox.scss +1 -1
- package/styles/components/phone-input/_country-code-select.scss +18 -0
- package/styles/components/phone-input/_phone-input-container.scss +20 -0
- package/styles/components/phone-input/indes.scss +7 -0
- package/styles/components/table/_table-head-data.scss +43 -0
- package/styles/components/table/_table-head.scss +13 -0
- package/styles/components/table/_table-row-data.scss +47 -0
- package/styles/components/table/_table-row.scss +21 -0
- package/styles/components/table/_table.scss +30 -0
- package/styles/components/table/index.scss +13 -0
- package/styles/core/_all-theme.scss +4 -0
@@ -1,25 +1,32 @@
|
|
1
|
-
import { ChangeDetectorRef } from '@angular/core';
|
2
|
-
import {
|
3
|
-
import { MatSelect, MatSelectChange } from '@angular/material/select';
|
1
|
+
import { ChangeDetectorRef, InputSignal, OutputEmitterRef, TemplateRef } from '@angular/core';
|
2
|
+
import { ControlValueAccessor, FormControl, ValidationErrors, Validator } from '@angular/forms';
|
3
|
+
import { MatOption, MatSelect, MatSelectChange } from '@angular/material/select';
|
4
4
|
import { WlcmIconName, WlcmOption } from '@wlcm/angular/core';
|
5
5
|
import { WlcmFormControl, WlcmFormField, WlcmFormFieldInput } from '../../models/_index';
|
6
6
|
import { Observable } from 'rxjs';
|
7
7
|
import * as i0 from "@angular/core";
|
8
8
|
import * as i1 from "../../directives/select-input-binder.directive";
|
9
9
|
type SelectValue = string[] | string;
|
10
|
-
|
10
|
+
type OptionTemplateContext = TemplateRef<{
|
11
|
+
$implicit: WlcmOption;
|
12
|
+
}>;
|
13
|
+
export declare class WlcmSelectComponent implements WlcmFormFieldInput, ControlValueAccessor, Validator {
|
11
14
|
private changeDetectorRef;
|
12
15
|
private formField;
|
13
16
|
private parentFormMember;
|
14
17
|
multiple: boolean;
|
15
18
|
placeholder: string;
|
16
19
|
options: WlcmOption[];
|
20
|
+
optionTemplate: InputSignal<TemplateRef<OptionTemplateContext> | null>;
|
21
|
+
triggerTemplate: InputSignal<TemplateRef<MatOption<any> | MatOption<any>[]> | null>;
|
22
|
+
selectionChange: OutputEmitterRef<MatSelectChange>;
|
17
23
|
readonly control: FormControl;
|
18
24
|
readonly WlcmIconName: typeof WlcmIconName;
|
19
25
|
private _changed?;
|
20
26
|
private _touched?;
|
21
27
|
private _validatorChanged?;
|
22
28
|
matSelect: MatSelect;
|
29
|
+
openPanel(): void;
|
23
30
|
private readonly _focusStream$;
|
24
31
|
private readonly _blurStream$;
|
25
32
|
focus$: Observable<unknown>;
|
@@ -29,18 +36,17 @@ export declare class WlcmSelectComponent implements WlcmFormFieldInput, ControlV
|
|
29
36
|
focus: () => void;
|
30
37
|
isFocused: () => boolean;
|
31
38
|
select(event: MatSelectChange): void;
|
32
|
-
openPanel(): void;
|
33
39
|
closePanel(): void;
|
34
40
|
panelOpened(): void;
|
35
41
|
writeValue(value: SelectValue): void;
|
36
42
|
registerOnChange(callback: (value: WlcmOption) => void): void;
|
37
43
|
registerOnTouched(callback: () => void): void;
|
38
44
|
registerOnValidatorChange(callback: () => void): void;
|
39
|
-
validate(
|
45
|
+
validate(): ValidationErrors | null;
|
40
46
|
get isOpen(): boolean;
|
41
47
|
private handleStateChange;
|
42
48
|
private handleClickOutside;
|
43
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<WlcmSelectComponent, [null, null, { optional: true; }]>;
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WlcmSelectComponent, "wlcm-select", never, { "multiple": { "alias": "multiple"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.WlcmSelectInputBinderDirective; inputs: {}; outputs: {}; }]>;
|
50
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WlcmSelectComponent, "wlcm-select", never, { "multiple": { "alias": "multiple"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; "isSignal": true; }; "triggerTemplate": { "alias": "triggerTemplate"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; }, never, never, true, [{ directive: typeof i1.WlcmSelectInputBinderDirective; inputs: {}; outputs: {}; }]>;
|
45
51
|
}
|
46
52
|
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const WLCM_FORM_FIELD_INPUT_CLASS: string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wlcm/angular",
|
3
|
-
"version": "17.
|
3
|
+
"version": "17.3.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"module": "./index.mjs",
|
@@ -66,10 +66,14 @@
|
|
66
66
|
"@ngneat/until-destroy": "^10.0.0",
|
67
67
|
"@nx/angular": "18.3.2",
|
68
68
|
"@rx-angular/template": "^17.1.0",
|
69
|
+
"countries-list": "^3.1.0",
|
69
70
|
"date-fns": "^3.6.0",
|
71
|
+
"imask": "^7.6.1",
|
72
|
+
"libphonenumber-js": "^1.11.3",
|
70
73
|
"moment": "^2.30.1",
|
71
74
|
"rxjs": "~7.8.0",
|
72
75
|
"tslib": "^2.3.0",
|
76
|
+
"uuid": "^9.0.1",
|
73
77
|
"zone.js": "~0.14.3"
|
74
78
|
},
|
75
79
|
"devDependencies": {}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
@use 'sass:map';
|
2
|
+
@use '../../core/utils' as utils;
|
3
|
+
|
4
|
+
@mixin theme($theme-config) {
|
5
|
+
$theme: utils.using-theme($theme_config);
|
6
|
+
|
7
|
+
.wlcm-country-code-select {
|
8
|
+
cursor: pointer;
|
9
|
+
|
10
|
+
.wlcm-select-arrow {
|
11
|
+
margin-left: 8px;
|
12
|
+
}
|
13
|
+
|
14
|
+
.wlcm-country-code-select-trigger {
|
15
|
+
font-size: 14px;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
@use 'sass:map';
|
2
|
+
@use '../../core/utils' as utils;
|
3
|
+
|
4
|
+
@mixin theme($theme-config) {
|
5
|
+
$theme: utils.using-theme($theme_config);
|
6
|
+
|
7
|
+
.wlcm-phone-input-container {
|
8
|
+
width: 100%;
|
9
|
+
height: 18px;
|
10
|
+
display: flex;
|
11
|
+
align-items: center;
|
12
|
+
}
|
13
|
+
|
14
|
+
.wlcm-phone-input-container-divider {
|
15
|
+
width: 1.5px;
|
16
|
+
height: 100%;
|
17
|
+
margin: 0 12px;
|
18
|
+
background: map-get($theme, field-outline-color);
|
19
|
+
}
|
20
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
@use 'sass:map';
|
2
|
+
@use '../../core/utils' as utils;
|
3
|
+
|
4
|
+
@mixin theme($theme-config) {
|
5
|
+
$theme: utils.using-theme($theme_config);
|
6
|
+
|
7
|
+
.wlcm-table-head-data,
|
8
|
+
.wlcm-table-head-actions {
|
9
|
+
min-width: min-content;
|
10
|
+
display: table-cell;
|
11
|
+
vertical-align: inherit;
|
12
|
+
unicode-bidi: isolate;
|
13
|
+
background: #eceff1;
|
14
|
+
white-space: nowrap;
|
15
|
+
font-family: map-get($theme, regular-font-family);
|
16
|
+
color: map-get($theme, placeholder-color);
|
17
|
+
font-size: 14px;
|
18
|
+
height: 32px;
|
19
|
+
|
20
|
+
&:first-child {
|
21
|
+
border-top-left-radius: 8px;
|
22
|
+
border-bottom-left-radius: 8px;
|
23
|
+
}
|
24
|
+
|
25
|
+
&:last-child {
|
26
|
+
border-top-right-radius: 8px;
|
27
|
+
border-bottom-right-radius: 8px;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
.wlcm-table-head-data {
|
32
|
+
padding: 0px 16px;
|
33
|
+
}
|
34
|
+
|
35
|
+
.wlcm-table-head-actions {
|
36
|
+
width: 16px;
|
37
|
+
padding: 0px 8px;
|
38
|
+
|
39
|
+
& + .wlcm-table-head-data {
|
40
|
+
padding-left: 0px;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@use 'sass:map';
|
2
|
+
@use '../../core/utils' as utils;
|
3
|
+
|
4
|
+
@mixin theme($theme-config) {
|
5
|
+
$theme: utils.using-theme($theme_config);
|
6
|
+
|
7
|
+
.wlcm-table-head {
|
8
|
+
display: table-header-group;
|
9
|
+
vertical-align: middle;
|
10
|
+
unicode-bidi: isolate;
|
11
|
+
border-color: inherit;
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
@use 'sass:map';
|
2
|
+
@use '../../core/utils' as utils;
|
3
|
+
|
4
|
+
@mixin theme($theme-config) {
|
5
|
+
$theme: utils.using-theme($theme_config);
|
6
|
+
|
7
|
+
.wlcm-table-row-data,
|
8
|
+
.wlcm-table-row-actions {
|
9
|
+
display: table-cell;
|
10
|
+
white-space: nowrap;
|
11
|
+
min-width: min-content;
|
12
|
+
vertical-align: inherit;
|
13
|
+
unicode-bidi: isolate;
|
14
|
+
box-sizing: border-box;
|
15
|
+
background: #ffffff;
|
16
|
+
font-size: 16px;
|
17
|
+
|
18
|
+
&:first-child {
|
19
|
+
border-top-left-radius: 8px;
|
20
|
+
border-bottom-left-radius: 8px;
|
21
|
+
}
|
22
|
+
|
23
|
+
&:last-child {
|
24
|
+
border-top-right-radius: 8px;
|
25
|
+
border-bottom-right-radius: 8px;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
.wlcm-table-row-data {
|
30
|
+
padding: 16px;
|
31
|
+
}
|
32
|
+
|
33
|
+
.wlcm-table-row-actions {
|
34
|
+
width: 16px;
|
35
|
+
padding: 16px 8px;
|
36
|
+
|
37
|
+
& + .wlcm-table-row-data {
|
38
|
+
padding-left: 0px;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
.wlcm-table-row-selected {
|
43
|
+
.wlcm-table-row-data {
|
44
|
+
color: map-get($theme, primary-color);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
@use 'sass:map';
|
2
|
+
@use '../../core/utils' as utils;
|
3
|
+
|
4
|
+
@mixin theme($theme-config) {
|
5
|
+
$theme: utils.using-theme($theme_config);
|
6
|
+
|
7
|
+
.wlcm-table-row {
|
8
|
+
display: table-row;
|
9
|
+
vertical-align: inherit;
|
10
|
+
unicode-bidi: isolate;
|
11
|
+
border-color: inherit;
|
12
|
+
}
|
13
|
+
|
14
|
+
.wlcm-table-row-spacer {
|
15
|
+
display: table-row;
|
16
|
+
vertical-align: inherit;
|
17
|
+
unicode-bidi: isolate;
|
18
|
+
border-color: inherit;
|
19
|
+
height: 12px;
|
20
|
+
}
|
21
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
@use 'sass:map';
|
2
|
+
@use '../../core/utils' as utils;
|
3
|
+
|
4
|
+
@mixin theme($theme-config) {
|
5
|
+
$theme: utils.using-theme($theme_config);
|
6
|
+
|
7
|
+
.wlcm-table {
|
8
|
+
width: 100%;
|
9
|
+
display: table;
|
10
|
+
border-collapse: collapse;
|
11
|
+
table-layout: auto;
|
12
|
+
box-sizing: border-box;
|
13
|
+
text-indent: initial;
|
14
|
+
unicode-bidi: isolate;
|
15
|
+
}
|
16
|
+
|
17
|
+
.wlcm-scrollable-table-container {
|
18
|
+
position: relative;
|
19
|
+
overflow-y: auto;
|
20
|
+
|
21
|
+
.wlcm-table-head {
|
22
|
+
.wlcm-table-head-data,
|
23
|
+
.wlcm-table-head-actions {
|
24
|
+
top: 0;
|
25
|
+
position: sticky;
|
26
|
+
z-index: 1;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
@use './table' as table;
|
2
|
+
@use './table-head' as tableHead;
|
3
|
+
@use './table-head-data' as tableHeadData;
|
4
|
+
@use './table-row-data' as tableRowData;
|
5
|
+
@use './table-row' as tableRow;
|
6
|
+
|
7
|
+
@mixin theme($theme-config) {
|
8
|
+
@include table.theme($theme-config);
|
9
|
+
@include tableHead.theme($theme-config);
|
10
|
+
@include tableHeadData.theme($theme-config);
|
11
|
+
@include tableRowData.theme($theme-config);
|
12
|
+
@include tableRow.theme($theme-config);
|
13
|
+
}
|
@@ -6,6 +6,8 @@
|
|
6
6
|
@use '../components/button/index' as button;
|
7
7
|
@use '../components/search-field/index' as searchField;
|
8
8
|
@use '../components/date-range-picker/index' as dateRangePicker;
|
9
|
+
@use '../components/phone-input/indes.scss' as phoneInput;
|
10
|
+
@use '../components/table/index.scss' as table;
|
9
11
|
|
10
12
|
@mixin all-component-themes($theme-config) {
|
11
13
|
@include common.theme($theme-config);
|
@@ -14,4 +16,6 @@
|
|
14
16
|
@include button.theme($theme-config);
|
15
17
|
@include searchField.theme($theme-config);
|
16
18
|
@include dateRangePicker.theme($theme-config);
|
19
|
+
@include phoneInput.theme($theme-config);
|
20
|
+
@include table.theme($theme-config);
|
17
21
|
}
|