@wlcm/angular 19.2.5 → 22.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 +37 -0
- package/button/fesm2022/wlcm-angular-button.mjs +25 -31
- package/button/fesm2022/wlcm-angular-button.mjs.map +1 -1
- package/button/package.json +25 -0
- package/button/types/wlcm-angular-button.d.ts +28 -0
- package/core/fesm2022/wlcm-angular-core.mjs +76 -92
- package/core/fesm2022/wlcm-angular-core.mjs.map +1 -1
- package/core/package.json +26 -0
- package/core/types/wlcm-angular-core.d.ts +102 -0
- package/datepicker/fesm2022/wlcm-angular-datepicker.mjs +341 -497
- package/datepicker/fesm2022/wlcm-angular-datepicker.mjs.map +1 -1
- package/datepicker/package.json +33 -0
- package/datepicker/types/wlcm-angular-datepicker.d.ts +285 -0
- package/filters/fesm2022/wlcm-angular-filters.mjs +32 -38
- package/filters/fesm2022/wlcm-angular-filters.mjs.map +1 -1
- package/filters/package.json +25 -0
- package/filters/types/wlcm-angular-filters.d.ts +81 -0
- package/forms/fesm2022/wlcm-angular-forms.mjs +378 -405
- package/forms/fesm2022/wlcm-angular-forms.mjs.map +1 -1
- package/forms/package.json +31 -0
- package/forms/types/wlcm-angular-forms.d.ts +365 -0
- package/package.json +27 -46
- package/phone-input/fesm2022/wlcm-angular-phone-input.mjs +66 -84
- package/phone-input/fesm2022/wlcm-angular-phone-input.mjs.map +1 -1
- package/phone-input/package.json +32 -0
- package/phone-input/types/wlcm-angular-phone-input.d.ts +81 -0
- package/search-field/fesm2022/wlcm-angular-search-field.mjs +25 -30
- package/search-field/fesm2022/wlcm-angular-search-field.mjs.map +1 -1
- package/search-field/package.json +28 -0
- package/search-field/types/wlcm-angular-search-field.d.ts +24 -0
- package/stepper/fesm2022/wlcm-angular-stepper.mjs +171 -294
- package/stepper/fesm2022/wlcm-angular-stepper.mjs.map +1 -1
- package/stepper/package.json +24 -0
- package/stepper/types/wlcm-angular-stepper.d.ts +114 -0
- package/styles/components/button/index.scss +25 -82
- package/styles/components/calendar/_calendar-header.scss +3 -6
- package/styles/components/calendar/_calendar.scss +10 -13
- package/styles/components/common/index.scss +4 -7
- package/styles/components/datepicker/_datepicker-input-container.scss +0 -3
- package/styles/components/datepicker/_datepicker-panel.scss +2 -5
- package/styles/components/datepicker/_datepicker-trigger.scss +0 -3
- package/styles/components/datepicker/date-range-picker/_date-range-picker-body.scss +10 -5
- package/styles/components/datepicker/date-range-picker/_date-range-picker-input.scss +4 -7
- package/styles/components/datepicker/date-range-picker/_date-range-picker-panel.scss +2 -5
- package/styles/components/forms/_autocomplete.scss +0 -3
- package/styles/components/forms/_checkbox-group.scss +0 -3
- package/styles/components/forms/_checkbox.scss +6 -8
- package/styles/components/forms/_error.scss +2 -13
- package/styles/components/forms/_form-field.scss +9 -10
- package/styles/components/forms/_label.scss +2 -11
- package/styles/components/forms/_radio.scss +13 -12
- package/styles/components/forms/_select.scss +5 -8
- package/styles/components/forms/partials/_dropdown-panel.scss +4 -6
- package/styles/components/loader/_loader.scss +5 -9
- package/styles/components/phone-input/_country-code-select.scss +0 -5
- package/styles/components/phone-input/_phone-input-container.scss +1 -6
- package/styles/components/search-field/index.scss +0 -4
- package/styles/components/stepper/_step-header.scss +8 -11
- package/styles/components/stepper/_step.scss +0 -5
- package/styles/components/stepper/_stepper-header.scss +0 -5
- package/styles/components/stepper/_stepper.scss +0 -4
- package/styles/components/table/_table-head-data.scss +6 -9
- package/styles/components/table/_table-head.scss +0 -5
- package/styles/components/table/_table-row-data.scss +2 -7
- package/styles/components/table/_table-row.scss +0 -5
- package/styles/components/table/_table.scss +0 -5
- package/styles/core/_all-theme.scss +8 -3
- package/styles/core/_tokens.scss +41 -0
- package/styles/core/_utils.scss +11 -44
- package/styles/wlcm.scss +1 -3
- package/table/fesm2022/wlcm-angular-table.mjs +130 -160
- package/table/fesm2022/wlcm-angular-table.mjs.map +1 -1
- package/table/package.json +27 -0
- package/table/types/wlcm-angular-table.d.ts +115 -0
- package/button/index.d.ts +0 -2
- package/button/lib/button.module.d.ts +0 -7
- package/button/lib/components/button/button.component.d.ts +0 -19
- package/button/lib/models/button.models.d.ts +0 -4
- package/core/index.d.ts +0 -11
- package/core/lib/components/default-loader/default-loader.component.d.ts +0 -5
- package/core/lib/components/icons/calendar-icon/calendar-icon.component.d.ts +0 -5
- package/core/lib/components/icons/chevron-down-icon/chevron-down-icon.component.d.ts +0 -5
- package/core/lib/components/icons/close-icon/close-icon.component.d.ts +0 -5
- package/core/lib/components/icons/search-icon/search-icon.component.d.ts +0 -5
- package/core/lib/components/loader/loader.component.d.ts +0 -11
- package/core/lib/constants/_index.d.ts +0 -2
- package/core/lib/constants/http.constants.d.ts +0 -2
- package/core/lib/constants/icon.contants.d.ts +0 -4
- package/core/lib/constants/loader.constants.d.ts +0 -2
- package/core/lib/directives/_index.d.ts +0 -1
- package/core/lib/directives/icon.directive.d.ts +0 -15
- package/core/lib/models/_index.d.ts +0 -2
- package/core/lib/models/icon.models.d.ts +0 -9
- package/core/lib/models/option.models.d.ts +0 -14
- package/core/lib/services/scroll-detection.api.d.ts +0 -10
- package/core/lib/utils/paginated-data-emulator.utils.d.ts +0 -9
- package/core/lib/utils/stream.utils.d.ts +0 -6
- package/datepicker/index.d.ts +0 -17
- package/datepicker/lib/components/calendar-header/calendar-header.component.d.ts +0 -24
- package/datepicker/lib/components/range/date-range-calendar-header/date-range-calendar-header.component.d.ts +0 -24
- package/datepicker/lib/components/range/date-range-picker-bottom-panel/date-range-picker-bottom-panel.component.d.ts +0 -8
- package/datepicker/lib/components/range/date-range-picker-input/date-range-picker-input.component.d.ts +0 -36
- package/datepicker/lib/components/range/double-calendar-range-picker/double-calendar-range-picker.component.d.ts +0 -35
- package/datepicker/lib/components/range/single-calendar-range-picker/single-calendar-range-picker.component.d.ts +0 -27
- package/datepicker/lib/components/single/datepicker-input-container/datepicker-input-container.component.d.ts +0 -30
- package/datepicker/lib/components/single/datepicker-panel/datepicker-panel.component.d.ts +0 -17
- package/datepicker/lib/constants/datepicker.constants.d.ts +0 -7
- package/datepicker/lib/constants/range/date-range-picker.constants.d.ts +0 -4
- package/datepicker/lib/constants/range/date-range-selection-model.constants.d.ts +0 -4
- package/datepicker/lib/constants/range/date-range-trigger-selection-model.constants.d.ts +0 -4
- package/datepicker/lib/datepicker.module.d.ts +0 -12
- package/datepicker/lib/directives/calendar.directive.d.ts +0 -5
- package/datepicker/lib/directives/datepicker-input.base.d.ts +0 -33
- package/datepicker/lib/directives/datepicker-trigger.base.d.ts +0 -33
- package/datepicker/lib/directives/ragne/date-range-picker-input-end.directive.d.ts +0 -20
- package/datepicker/lib/directives/ragne/date-range-picker-input-start.directive.d.ts +0 -20
- package/datepicker/lib/directives/ragne/date-range-picker-input.base.d.ts +0 -23
- package/datepicker/lib/directives/ragne/left-calendar.directive.d.ts +0 -17
- package/datepicker/lib/directives/ragne/right-calendar.directive.d.ts +0 -20
- package/datepicker/lib/directives/single/datepicker-input.directive.d.ts +0 -21
- package/datepicker/lib/models/date-picker.models.d.ts +0 -18
- package/datepicker/lib/models/range/data-range-calendar.models.d.ts +0 -25
- package/datepicker/lib/models/range/date-range-picker.models.d.ts +0 -18
- package/datepicker/lib/models/range/date-range-validation.models.d.ts +0 -3
- package/datepicker/lib/utils/range/date-range-input.validators.d.ts +0 -2
- package/datepicker/lib/utils/range/date-range-picker-errors.d.ts +0 -4
- package/filters/index.d.ts +0 -5
- package/filters/lib/components/filters-group/filters-group.component.d.ts +0 -6
- package/filters/lib/constants/filter.constants.d.ts +0 -3
- package/filters/lib/constants/index.d.ts +0 -1
- package/filters/lib/directives/filter.directive.d.ts +0 -5
- package/filters/lib/directives/index.d.ts +0 -1
- package/filters/lib/filters.module.d.ts +0 -9
- package/filters/lib/models/array-filter.models.d.ts +0 -19
- package/filters/lib/models/filter.models.d.ts +0 -19
- package/filters/lib/models/filters-group.models.d.ts +0 -22
- package/filters/lib/models/index.d.ts +0 -3
- package/forms/index.d.ts +0 -12
- package/forms/lib/forms/components/autocomplete/autocomplete.component.d.ts +0 -76
- package/forms/lib/forms/components/checkbox/checkbox.component.d.ts +0 -28
- package/forms/lib/forms/components/checkbox-group/checkbox-group.component.d.ts +0 -25
- package/forms/lib/forms/components/error/error.component.d.ts +0 -5
- package/forms/lib/forms/components/form-field/form-field.component.d.ts +0 -34
- package/forms/lib/forms/components/index.d.ts +0 -8
- package/forms/lib/forms/components/label/label.component.d.ts +0 -7
- package/forms/lib/forms/components/partials/autocomplete-suffix/autocomplete-suffix.component.d.ts +0 -10
- package/forms/lib/forms/components/partials/index.d.ts +0 -1
- package/forms/lib/forms/components/select/select.component.d.ts +0 -90
- package/forms/lib/forms/constants/form-elements.constants.d.ts +0 -6
- package/forms/lib/forms/constants/form-errors.constants.d.ts +0 -4
- package/forms/lib/forms/constants/form-field.constants.d.ts +0 -1
- package/forms/lib/forms/constants/form-state-handlers.constants.d.ts +0 -6
- package/forms/lib/forms/constants/index.d.ts +0 -5
- package/forms/lib/forms/constants/select.constants.d.ts +0 -3
- package/forms/lib/forms/directives/autocomplete.directive.d.ts +0 -16
- package/forms/lib/forms/directives/form-field-custom-container.directive.d.ts +0 -8
- package/forms/lib/forms/directives/form-field-hint.directive.d.ts +0 -5
- package/forms/lib/forms/directives/form-field-prefix.directive.d.ts +0 -6
- package/forms/lib/forms/directives/form-field-suffix.directive.d.ts +0 -5
- package/forms/lib/forms/directives/input.directive.d.ts +0 -14
- package/forms/lib/forms/directives/select-input-binder.directive.d.ts +0 -5
- package/forms/lib/forms/forms.module.d.ts +0 -19
- package/forms/lib/forms/models/_index.d.ts +0 -5
- package/forms/lib/forms/models/autocomplete.models.d.ts +0 -9
- package/forms/lib/forms/models/form-errors.models.d.ts +0 -5
- package/forms/lib/forms/models/form.models.d.ts +0 -11
- package/forms/lib/forms/models/input.models.d.ts +0 -13
- package/forms/lib/forms/models/select.models.d.ts +0 -9
- package/forms/lib/forms/pipes/errors-mapper.pipe.d.ts +0 -17
- package/forms/lib/forms/services/form-state-handler.service.d.ts +0 -10
- package/forms/lib/forms/services/index.d.ts +0 -2
- package/forms/lib/forms/services/places.api.d.ts +0 -11
- package/phone-input/index.d.ts +0 -4
- package/phone-input/lib/components/country-code-select/country-code-select.component.d.ts +0 -15
- package/phone-input/lib/components/phone-input-container/phone-input-container.component.d.ts +0 -30
- package/phone-input/lib/constants/country-code-options.constants.d.ts +0 -3
- package/phone-input/lib/constants/phone-adapter.constants.d.ts +0 -3
- package/phone-input/lib/directives/phone-input.directive.d.ts +0 -36
- package/phone-input/lib/models/country-code.models.d.ts +0 -7
- package/phone-input/lib/models/phone-adapter.models.d.ts +0 -10
- package/phone-input/lib/models/phone.models.d.ts +0 -3
- package/phone-input/lib/phone-input.module.d.ts +0 -9
- package/phone-input/lib/pipes/phone-code.pipe.d.ts +0 -8
- package/search-field/index.d.ts +0 -2
- package/search-field/lib/components/search-field/search-field.component.d.ts +0 -16
- package/search-field/lib/search-field.module.d.ts +0 -8
- package/stepper/index.d.ts +0 -10
- package/stepper/lib/components/step/step.component.d.ts +0 -16
- package/stepper/lib/components/step-header/step-header.component.d.ts +0 -20
- package/stepper/lib/components/stepper/stepper.component.d.ts +0 -6
- package/stepper/lib/components/stepper-header/stepper-header.component.d.ts +0 -8
- package/stepper/lib/constants/step.constants.d.ts +0 -4
- package/stepper/lib/constants/stepper.stepper.d.ts +0 -3
- package/stepper/lib/directives/load-on-active-step.directive.d.ts +0 -13
- package/stepper/lib/models/step.models.d.ts +0 -43
- package/stepper/lib/models/stepper.models.d.ts +0 -44
- package/stepper/lib/stepper.module.d.ts +0 -12
- package/styles/core/_core.scss +0 -10
- package/table/index.d.ts +0 -9
- package/table/lib/components/table/table.component.d.ts +0 -24
- package/table/lib/components/table-head/table-head.component.d.ts +0 -8
- package/table/lib/components/table-head-actions/table-head-actions.component.d.ts +0 -12
- package/table/lib/components/table-head-data/table-head-data.component.d.ts +0 -5
- package/table/lib/components/table-row/table-row.component.d.ts +0 -23
- package/table/lib/components/table-row-actions/table-row-actions.component.d.ts +0 -5
- package/table/lib/components/table-row-data/table-row-data.component.d.ts +0 -5
- package/table/lib/components/table-row-spacer/table-row-spacer.component.d.ts +0 -5
- package/table/lib/constants/table-row.constants.d.ts +0 -3
- package/table/lib/constants/table.constants.d.ts +0 -3
- package/table/lib/directives/scrollable-table-container.directive.d.ts +0 -13
- package/table/lib/models/table-config-manager.models.d.ts +0 -12
- package/table/lib/models/table-row.models.d.ts +0 -10
- package/table/lib/models/table-selection-model.d.ts +0 -25
- package/table/lib/models/table.models.d.ts +0 -4
- package/table/lib/pipes/table-row-injector.pipe.d.ts +0 -9
- package/table/lib/table.module.d.ts +0 -13
- package/table/lib/utils/table-errors.utils.d.ts +0 -3
|
@@ -1,49 +1,44 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, model, signal, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { DEFAULT_QUERY_PARAMS, WlcmIconName, WlcmIconDirective } from '@wlcm/angular/core';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { skip, debounceTime } from 'rxjs';
|
|
6
6
|
import * as i1 from '@wlcm/angular/forms';
|
|
7
7
|
import { WlcmFormsModule } from '@wlcm/angular/forms';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
8
9
|
|
|
9
10
|
class WlcmSearchFieldComponent {
|
|
10
11
|
constructor() {
|
|
11
|
-
this.placeholder = 'Search by'
|
|
12
|
-
|
|
13
|
-
this.
|
|
14
|
-
|
|
12
|
+
this.placeholder = input('Search by', /* @ts-ignore */
|
|
13
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
14
|
+
this.queryParams = model({ ...DEFAULT_QUERY_PARAMS }, /* @ts-ignore */
|
|
15
|
+
...(ngDevMode ? [{ debugName: "queryParams" }] : /* istanbul ignore next */ []));
|
|
16
|
+
this._inputValue = signal('', /* @ts-ignore */
|
|
17
|
+
...(ngDevMode ? [{ debugName: "_inputValue" }] : /* istanbul ignore next */ []));
|
|
15
18
|
this.WlcmIconName = WlcmIconName;
|
|
19
|
+
toObservable(this._inputValue)
|
|
20
|
+
.pipe(skip(1), debounceTime(400), takeUntilDestroyed())
|
|
21
|
+
.subscribe((query) => {
|
|
22
|
+
this.queryParams.set({ ...this.queryParams(), page: 1, query });
|
|
23
|
+
});
|
|
16
24
|
}
|
|
17
25
|
ngOnInit() {
|
|
18
|
-
this._inputValue
|
|
19
|
-
this.handleInputValue();
|
|
20
|
-
}
|
|
21
|
-
handleInputValue() {
|
|
22
|
-
this._inputValue$.pipe(skip(1), debounceTime(400)).subscribe((query) => {
|
|
23
|
-
this.queryParams = { ...this.queryParams, page: 1, query };
|
|
24
|
-
this.queryParamsChange.emit(this.queryParams);
|
|
25
|
-
});
|
|
26
|
+
this._inputValue.set(this.queryParams().query);
|
|
26
27
|
}
|
|
27
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmSearchFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: WlcmSearchFieldComponent, isStandalone: true, selector: "wlcm-search-field", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { queryParams: "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.set(field.value)\"\n />\n</wlcm-form-field>\n", styles: [""], dependencies: [{ 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
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmSearchFieldComponent, decorators: [{
|
|
31
32
|
type: Component,
|
|
32
|
-
args: [{ selector: 'wlcm-search-field',
|
|
33
|
-
}], propDecorators: { placeholder: [{
|
|
34
|
-
type: Input
|
|
35
|
-
}], queryParams: [{
|
|
36
|
-
type: Input
|
|
37
|
-
}], queryParamsChange: [{
|
|
38
|
-
type: Output
|
|
39
|
-
}] } });
|
|
33
|
+
args: [{ selector: 'wlcm-search-field', host: { class: 'wlcm-search-field' }, imports: [WlcmFormsModule, WlcmIconDirective], changeDetection: ChangeDetectionStrategy.OnPush, 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.set(field.value)\"\n />\n</wlcm-form-field>\n" }]
|
|
34
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], queryParams: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryParams", required: false }] }, { type: i0.Output, args: ["queryParamsChange"] }] } });
|
|
40
35
|
|
|
41
36
|
class WlcmSearchFieldModule {
|
|
42
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
43
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
44
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmSearchFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
38
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: WlcmSearchFieldModule, imports: [CommonModule, WlcmSearchFieldComponent], exports: [WlcmSearchFieldComponent] }); }
|
|
39
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmSearchFieldModule, imports: [CommonModule, WlcmSearchFieldComponent] }); }
|
|
45
40
|
}
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmSearchFieldModule, decorators: [{
|
|
47
42
|
type: NgModule,
|
|
48
43
|
args: [{
|
|
49
44
|
declarations: [],
|
|
@@ -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,
|
|
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, OnInit, input, model, signal } from '@angular/core';\nimport { DEFAULT_QUERY_PARAMS, WlcmIconDirective, WlcmIconName } from '@wlcm/angular/core';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport { debounceTime, skip } from 'rxjs';\n\nimport { WlcmFormsModule } from '@wlcm/angular/forms';\nimport { WlcmQueryParams } from '@wlcm/common';\n\n@Component({\n selector: 'wlcm-search-field',\n host: { class: 'wlcm-search-field' },\n imports: [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 readonly placeholder = input('Search by');\n\n readonly queryParams = model<WlcmQueryParams>({ ...DEFAULT_QUERY_PARAMS });\n\n readonly _inputValue = signal('');\n\n readonly WlcmIconName = WlcmIconName;\n\n constructor() {\n toObservable(this._inputValue)\n .pipe(skip(1), debounceTime(400), takeUntilDestroyed())\n .subscribe((query: string) => {\n this.queryParams.set({ ...this.queryParams(), page: 1, query });\n });\n }\n\n ngOnInit(): void {\n this._inputValue.set(this.queryParams().query);\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.set(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":"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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wlcm/angular/search-field",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^22.0.0",
|
|
6
|
+
"@angular/core": "^22.0.0",
|
|
7
|
+
"@wlcm/angular/core": "0.0.1",
|
|
8
|
+
"rxjs": "~7.8.1",
|
|
9
|
+
"@wlcm/angular/forms": "0.0.1",
|
|
10
|
+
"@wlcm/common": "^1.0.2"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"tslib": "^2.3.0"
|
|
14
|
+
},
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"module": "fesm2022/wlcm-angular-search-field.mjs",
|
|
17
|
+
"typings": "types/wlcm-angular-search-field.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./package.json": {
|
|
20
|
+
"default": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./types/wlcm-angular-search-field.d.ts",
|
|
24
|
+
"default": "./fesm2022/wlcm-angular-search-field.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit } from '@angular/core';
|
|
3
|
+
import { WlcmIconName } from '@wlcm/angular/core';
|
|
4
|
+
import { WlcmQueryParams } from '@wlcm/common';
|
|
5
|
+
import * as i1 from '@angular/common';
|
|
6
|
+
|
|
7
|
+
declare class WlcmSearchFieldComponent implements OnInit {
|
|
8
|
+
readonly placeholder: i0.InputSignal<string>;
|
|
9
|
+
readonly queryParams: i0.ModelSignal<WlcmQueryParams>;
|
|
10
|
+
readonly _inputValue: i0.WritableSignal<string>;
|
|
11
|
+
readonly WlcmIconName: typeof WlcmIconName;
|
|
12
|
+
constructor();
|
|
13
|
+
ngOnInit(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WlcmSearchFieldComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WlcmSearchFieldComponent, "wlcm-search-field", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; }, { "queryParams": "queryParamsChange"; }, never, never, true, never>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class WlcmSearchFieldModule {
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WlcmSearchFieldModule, never>;
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<WlcmSearchFieldModule, never, [typeof i1.CommonModule, typeof WlcmSearchFieldComponent], [typeof WlcmSearchFieldComponent]>;
|
|
21
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<WlcmSearchFieldModule>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { WlcmSearchFieldComponent, WlcmSearchFieldModule };
|