@wlcm/angular 17.7.24 → 17.7.26
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/forms/esm2022/lib/forms/components/autocomplete/autocomplete.component.mjs +15 -10
- package/forms/esm2022/lib/forms/components/select/select.component.mjs +8 -6
- package/forms/fesm2022/wlcm-angular-forms.mjs +20 -14
- package/forms/fesm2022/wlcm-angular-forms.mjs.map +1 -1
- package/forms/lib/forms/components/autocomplete/autocomplete.component.d.ts +2 -0
- package/forms/lib/forms/components/select/select.component.d.ts +2 -0
- package/package.json +1 -1
- package/search-field/esm2022/lib/components/search-field/search-field.component.mjs +8 -6
- package/search-field/fesm2022/wlcm-angular-search-field.mjs +7 -5
- package/search-field/fesm2022/wlcm-angular-search-field.mjs.map +1 -1
- package/search-field/lib/components/search-field/search-field.component.d.ts +2 -0
@@ -3,12 +3,13 @@ import { DEFAULT_QUERY_PARAMS, SearchIconComponent, WlcmIconDirective, WlcmIconN
|
|
3
3
|
import { BehaviorSubject, debounceTime, skip } from 'rxjs';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
import { WlcmFormsModule } from '@wlcm/angular/forms';
|
6
|
+
import { cloneDeep } from 'lodash-es';
|
6
7
|
import * as i0 from "@angular/core";
|
7
8
|
import * as i1 from "@wlcm/angular/forms";
|
8
9
|
export class WlcmSearchFieldComponent {
|
9
10
|
constructor() {
|
10
11
|
this.placeholder = 'Search by';
|
11
|
-
this.queryParams =
|
12
|
+
this.queryParams = cloneDeep(DEFAULT_QUERY_PARAMS);
|
12
13
|
this.queryParamsChange = new EventEmitter();
|
13
14
|
this._inputValue$ = new BehaviorSubject('');
|
14
15
|
this.WlcmIconName = WlcmIconName;
|
@@ -19,12 +20,12 @@ export class WlcmSearchFieldComponent {
|
|
19
20
|
}
|
20
21
|
handleInputValue() {
|
21
22
|
this._inputValue$.pipe(skip(1), debounceTime(400)).subscribe((query) => {
|
22
|
-
|
23
|
-
this.queryParamsChange.emit(
|
23
|
+
this.queryParams = { ...this.queryParams, page: 1, query };
|
24
|
+
this.queryParamsChange.emit(this.queryParams);
|
24
25
|
});
|
25
26
|
}
|
26
27
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmSearchFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
27
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.5", type: WlcmSearchFieldComponent, isStandalone: true, selector: "wlcm-search-field", inputs: { placeholder: "placeholder", queryParams: ["queryParams", "queryParams", (params) => cloneDeep(params)] }, outputs: { queryParamsChange: "queryParamsChange" }, host: { classAttribute: "wlcm-search-field" }, ngImport: i0, template: "<wlcm-form-field>\n <ng-container\n [wlcmIcon]=\"WlcmIconName.SEARCH\"\n wlcmFormFieldPrefix\n ></ng-container>\n\n <input\n #field\n wlcmInput\n type=\"text\"\n class=\"wlcm-search-field__input\"\n [placeholder]=\"placeholder\"\n [value]=\"queryParams.query\"\n (input)=\"_inputValue$.next(field.value)\"\n />\n</wlcm-form-field>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: WlcmFormsModule }, { kind: "component", type: i1.WlcmFormFieldComponent, selector: "wlcm-form-field", inputs: ["displayErrorMessages"] }, { kind: "directive", type: i1.WlcmInputDirective, selector: "[wlcmInput]" }, { kind: "directive", type: i1.WlcmFormFieldPrefixDirective, selector: "[wlcmFormFieldPrefix]" }, { kind: "directive", type: WlcmIconDirective, selector: "[wlcmIcon]", inputs: ["wlcmIcon", "wlcmIconStopPropagation"], outputs: ["wlcmIconClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
28
29
|
}
|
29
30
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmSearchFieldComponent, decorators: [{
|
30
31
|
type: Component,
|
@@ -32,8 +33,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
32
33
|
}], propDecorators: { placeholder: [{
|
33
34
|
type: Input
|
34
35
|
}], queryParams: [{
|
35
|
-
type: Input
|
36
|
+
type: Input,
|
37
|
+
args: [{ transform: (params) => cloneDeep(params) }]
|
36
38
|
}], queryParamsChange: [{
|
37
39
|
type: Output
|
38
40
|
}] } });
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhcmNoLWZpZWxkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL21vZHVsZXMvc2VhcmNoLWZpZWxkL3NyYy9saWIvY29tcG9uZW50cy9zZWFyY2gtZmllbGQvc2VhcmNoLWZpZWxkLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL21vZHVsZXMvc2VhcmNoLWZpZWxkL3NyYy9saWIvY29tcG9uZW50cy9zZWFyY2gtZmllbGQvc2VhcmNoLWZpZWxkLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBVSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDeEcsT0FBTyxFQUFFLG9CQUFvQixFQUFFLG1CQUFtQixFQUFFLGlCQUFpQixFQUFFLFlBQVksRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQ2hILE9BQU8sRUFBRSxlQUFlLEVBQUUsWUFBWSxFQUFFLElBQUksRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMzRCxPQUFPLEVBQUUsWUFBWSxFQ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Il9pbnB1dFZhbHVlJC5uZXh0KGZpZWxkLnZhbHVlKVwiXG4gIC8+XG48L3dsY20tZm9ybS1maWVsZD5cbiJdfQ==
|
@@ -5,11 +5,12 @@ import { BehaviorSubject, skip, debounceTime } from 'rxjs';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
6
6
|
import * as i1 from '@wlcm/angular/forms';
|
7
7
|
import { WlcmFormsModule } from '@wlcm/angular/forms';
|
8
|
+
import { cloneDeep } from 'lodash-es';
|
8
9
|
|
9
10
|
class WlcmSearchFieldComponent {
|
10
11
|
constructor() {
|
11
12
|
this.placeholder = 'Search by';
|
12
|
-
this.queryParams =
|
13
|
+
this.queryParams = cloneDeep(DEFAULT_QUERY_PARAMS);
|
13
14
|
this.queryParamsChange = new EventEmitter();
|
14
15
|
this._inputValue$ = new BehaviorSubject('');
|
15
16
|
this.WlcmIconName = WlcmIconName;
|
@@ -20,12 +21,12 @@ class WlcmSearchFieldComponent {
|
|
20
21
|
}
|
21
22
|
handleInputValue() {
|
22
23
|
this._inputValue$.pipe(skip(1), debounceTime(400)).subscribe((query) => {
|
23
|
-
|
24
|
-
this.queryParamsChange.emit(
|
24
|
+
this.queryParams = { ...this.queryParams, page: 1, query };
|
25
|
+
this.queryParamsChange.emit(this.queryParams);
|
25
26
|
});
|
26
27
|
}
|
27
28
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmSearchFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
29
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.5", type: WlcmSearchFieldComponent, isStandalone: true, selector: "wlcm-search-field", inputs: { placeholder: "placeholder", queryParams: ["queryParams", "queryParams", (params) => cloneDeep(params)] }, outputs: { queryParamsChange: "queryParamsChange" }, host: { classAttribute: "wlcm-search-field" }, ngImport: i0, template: "<wlcm-form-field>\n <ng-container\n [wlcmIcon]=\"WlcmIconName.SEARCH\"\n wlcmFormFieldPrefix\n ></ng-container>\n\n <input\n #field\n wlcmInput\n type=\"text\"\n class=\"wlcm-search-field__input\"\n [placeholder]=\"placeholder\"\n [value]=\"queryParams.query\"\n (input)=\"_inputValue$.next(field.value)\"\n />\n</wlcm-form-field>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: WlcmFormsModule }, { kind: "component", type: i1.WlcmFormFieldComponent, selector: "wlcm-form-field", inputs: ["displayErrorMessages"] }, { kind: "directive", type: i1.WlcmInputDirective, selector: "[wlcmInput]" }, { kind: "directive", type: i1.WlcmFormFieldPrefixDirective, selector: "[wlcmFormFieldPrefix]" }, { kind: "directive", type: WlcmIconDirective, selector: "[wlcmIcon]", inputs: ["wlcmIcon", "wlcmIconStopPropagation"], outputs: ["wlcmIconClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
29
30
|
}
|
30
31
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: WlcmSearchFieldComponent, decorators: [{
|
31
32
|
type: Component,
|
@@ -33,7 +34,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImpor
|
|
33
34
|
}], propDecorators: { placeholder: [{
|
34
35
|
type: Input
|
35
36
|
}], queryParams: [{
|
36
|
-
type: Input
|
37
|
+
type: Input,
|
38
|
+
args: [{ transform: (params) => cloneDeep(params) }]
|
37
39
|
}], queryParamsChange: [{
|
38
40
|
type: Output
|
39
41
|
}] } });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"wlcm-angular-search-field.mjs","sources":["../../../../modules/search-field/src/lib/components/search-field/search-field.component.ts","../../../../modules/search-field/src/lib/components/search-field/search-field.component.html","../../../../modules/search-field/src/lib/search-field.module.ts","../../../../modules/search-field/src/wlcm-angular-search-field.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { DEFAULT_QUERY_PARAMS, SearchIconComponent, WlcmIconDirective, WlcmIconName } from '@wlcm/angular/core';\nimport { BehaviorSubject, debounceTime, skip } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { WlcmFormsModule } from '@wlcm/angular/forms';\nimport { WlcmQueryParams } from '@wlcm/common';\n\n@Component({\n selector: 'wlcm-search-field',\n standalone: true,\n host: { class: 'wlcm-search-field' },\n imports: [CommonModule, SearchIconComponent, WlcmFormsModule, WlcmIconDirective],\n templateUrl: './search-field.component.html',\n styleUrls: ['./search-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WlcmSearchFieldComponent implements OnInit {\n @Input() placeholder: string = 'Search by';\n\n @Input() queryParams: WlcmQueryParams
|
1
|
+
{"version":3,"file":"wlcm-angular-search-field.mjs","sources":["../../../../modules/search-field/src/lib/components/search-field/search-field.component.ts","../../../../modules/search-field/src/lib/components/search-field/search-field.component.html","../../../../modules/search-field/src/lib/search-field.module.ts","../../../../modules/search-field/src/wlcm-angular-search-field.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { DEFAULT_QUERY_PARAMS, SearchIconComponent, WlcmIconDirective, WlcmIconName } from '@wlcm/angular/core';\nimport { BehaviorSubject, debounceTime, skip } from 'rxjs';\nimport { CommonModule } from '@angular/common';\nimport { WlcmFormsModule } from '@wlcm/angular/forms';\nimport { WlcmQueryParams } from '@wlcm/common';\nimport { cloneDeep } from 'lodash-es';\n\n@Component({\n selector: 'wlcm-search-field',\n standalone: true,\n host: { class: 'wlcm-search-field' },\n imports: [CommonModule, SearchIconComponent, WlcmFormsModule, WlcmIconDirective],\n templateUrl: './search-field.component.html',\n styleUrls: ['./search-field.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WlcmSearchFieldComponent implements OnInit {\n @Input() placeholder: string = 'Search by';\n\n @Input({ transform: (params: WlcmQueryParams) => cloneDeep(params) }) queryParams: WlcmQueryParams =\n cloneDeep(DEFAULT_QUERY_PARAMS);\n\n @Output() queryParamsChange: EventEmitter<WlcmQueryParams> = new EventEmitter();\n\n readonly _inputValue$: BehaviorSubject<string> = new BehaviorSubject('');\n\n readonly WlcmIconName = WlcmIconName;\n\n ngOnInit(): void {\n this._inputValue$.next(this.queryParams.query);\n\n this.handleInputValue();\n }\n\n private handleInputValue(): void {\n this._inputValue$.pipe(skip(1), debounceTime(400)).subscribe((query: string) => {\n this.queryParams = { ...this.queryParams, page: 1, query };\n\n this.queryParamsChange.emit(this.queryParams);\n });\n }\n}\n","<wlcm-form-field>\n <ng-container\n [wlcmIcon]=\"WlcmIconName.SEARCH\"\n wlcmFormFieldPrefix\n ></ng-container>\n\n <input\n #field\n wlcmInput\n type=\"text\"\n class=\"wlcm-search-field__input\"\n [placeholder]=\"placeholder\"\n [value]=\"queryParams.query\"\n (input)=\"_inputValue$.next(field.value)\"\n />\n</wlcm-form-field>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { WlcmSearchFieldComponent } from './components/search-field/search-field.component';\n@NgModule({\n declarations: [],\n imports: [CommonModule, WlcmSearchFieldComponent],\n exports: [WlcmSearchFieldComponent],\n})\nexport class WlcmSearchFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAiBa,wBAAwB,CAAA;AATrC,IAAA,WAAA,GAAA;QAUW,IAAW,CAAA,WAAA,GAAW,WAAW,CAAC;AAE2B,QAAA,IAAA,CAAA,WAAW,GAC/E,SAAS,CAAC,oBAAoB,CAAC,CAAC;AAExB,QAAA,IAAA,CAAA,iBAAiB,GAAkC,IAAI,YAAY,EAAE,CAAC;AAEvE,QAAA,IAAA,CAAA,YAAY,GAA4B,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QAEhE,IAAY,CAAA,YA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AAC;AACpC,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
@@ -3,6 +3,7 @@ import { WlcmIconName } from '@wlcm/angular/core';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
4
4
|
import { WlcmQueryParams } from '@wlcm/common';
|
5
5
|
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "@wlcm/common";
|
6
7
|
export declare class WlcmSearchFieldComponent implements OnInit {
|
7
8
|
placeholder: string;
|
8
9
|
queryParams: WlcmQueryParams;
|
@@ -13,4 +14,5 @@ export declare class WlcmSearchFieldComponent implements OnInit {
|
|
13
14
|
private handleInputValue;
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<WlcmSearchFieldComponent, never>;
|
15
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<WlcmSearchFieldComponent, "wlcm-search-field", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "queryParams": { "alias": "queryParams"; "required": false; }; }, { "queryParamsChange": "queryParamsChange"; }, never, never, true, never>;
|
17
|
+
static ngAcceptInputType_queryParams: i1.WlcmQueryParams;
|
16
18
|
}
|