@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,13 +1,78 @@
|
|
|
1
|
-
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import * as i1 from '@angular/common';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
1
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken,
|
|
6
|
-
import {
|
|
7
|
-
import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
|
|
2
|
+
import { InjectionToken, input, inject, computed, ChangeDetectionStrategy, Component, model, Directive, forwardRef, contentChildren, signal, effect, TemplateRef, ViewContainerRef, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
8
4
|
|
|
9
5
|
const WLCM_STEPS_NAVIGATOR = new InjectionToken('WLCM_STEPS_NAVIGATOR');
|
|
10
6
|
|
|
7
|
+
class WlcmStepHeaderComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.step = input.required(/* @ts-ignore */
|
|
10
|
+
...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
11
|
+
this.navigator = inject(WLCM_STEPS_NAVIGATOR);
|
|
12
|
+
this.isPassed = computed(() => {
|
|
13
|
+
const key = this.step().key();
|
|
14
|
+
return !!key && this.navigator.isCurrentOrPrevious(key);
|
|
15
|
+
}, /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "isPassed" }] : /* istanbul ignore next */ []));
|
|
17
|
+
this.isCompleted = computed(() => this.step().completed(), /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "isCompleted" }] : /* istanbul ignore next */ []));
|
|
19
|
+
this.isDisabled = computed(() => {
|
|
20
|
+
const disabled = this.step().disabled();
|
|
21
|
+
if (disabled !== 'on_any_previous_incomplete')
|
|
22
|
+
return disabled;
|
|
23
|
+
const minIndex = this.navigator.minIncompleteStepIndex$();
|
|
24
|
+
if (minIndex < 0)
|
|
25
|
+
return false;
|
|
26
|
+
return minIndex < this.navigator.getStepIndex(this.step().key());
|
|
27
|
+
}, /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
29
|
+
}
|
|
30
|
+
activate() {
|
|
31
|
+
if (this.navigator.active?.key() === this.step().key())
|
|
32
|
+
return;
|
|
33
|
+
this.navigator.activate(this.step().key());
|
|
34
|
+
}
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.5", type: WlcmStepHeaderComponent, isStandalone: true, selector: "wlcm-step-header", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.wlcm-step-header-passed": "isPassed()", "class.wlcm-step-header-completed": "isCompleted()", "class.wlcm-step-header-disabled": "isDisabled()" }, classAttribute: "wlcm-step-header" }, ngImport: i0, template: "<button class=\"wlcm-step-header-button\" (click)=\"activate()\">\n <span class=\"wlcm-step-header-label\">{{ step().label() }}</span>\n\n <div class=\"wlcm-step-header-progress-bar\">\n <div class=\"wlcm-step-header-complete-indicator\"></div>\n\n <div class=\"wlcm-step-header-pass-indicator\"></div>\n </div>\n</button>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepHeaderComponent, decorators: [{
|
|
39
|
+
type: Component,
|
|
40
|
+
args: [{ selector: 'wlcm-step-header', host: {
|
|
41
|
+
class: 'wlcm-step-header',
|
|
42
|
+
'[class.wlcm-step-header-passed]': 'isPassed()',
|
|
43
|
+
'[class.wlcm-step-header-completed]': 'isCompleted()',
|
|
44
|
+
'[class.wlcm-step-header-disabled]': 'isDisabled()',
|
|
45
|
+
}, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button class=\"wlcm-step-header-button\" (click)=\"activate()\">\n <span class=\"wlcm-step-header-label\">{{ step().label() }}</span>\n\n <div class=\"wlcm-step-header-progress-bar\">\n <div class=\"wlcm-step-header-complete-indicator\"></div>\n\n <div class=\"wlcm-step-header-pass-indicator\"></div>\n </div>\n</button>\n" }]
|
|
46
|
+
}], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: true }] }] } });
|
|
47
|
+
|
|
48
|
+
class WlcmStep {
|
|
49
|
+
}
|
|
50
|
+
class WlcmStepBase extends WlcmStep {
|
|
51
|
+
constructor(options) {
|
|
52
|
+
super();
|
|
53
|
+
this.options = options;
|
|
54
|
+
this.key = model(null, /* @ts-ignore */
|
|
55
|
+
...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
56
|
+
this.label = input.required(/* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
58
|
+
this.completed = model(false, /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "completed" }] : /* istanbul ignore next */ []));
|
|
60
|
+
this.disabled = model('on_any_previous_incomplete', /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
62
|
+
if (Object.prototype.hasOwnProperty.call(this.options, 'completed')) {
|
|
63
|
+
this.completed.set(this.options.completed);
|
|
64
|
+
}
|
|
65
|
+
if (Object.prototype.hasOwnProperty.call(this.options, 'disabled')) {
|
|
66
|
+
this.disabled.set(this.options.disabled);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
|
70
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: WlcmStepBase, isStandalone: true, inputs: { key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, completed: { classPropertyName: "completed", publicName: "completed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { key: "keyChange", completed: "completedChange", disabled: "disabledChange" }, usesInheritance: true, ngImport: i0 }); }
|
|
71
|
+
}
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepBase, decorators: [{
|
|
73
|
+
type: Directive
|
|
74
|
+
}], ctorParameters: () => [{ type: undefined }], propDecorators: { key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }, { type: i0.Output, args: ["keyChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], completed: [{ type: i0.Input, args: [{ isSignal: true, alias: "completed", required: false }] }, { type: i0.Output, args: ["completedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }] } });
|
|
75
|
+
|
|
11
76
|
const WLCM_STEP = new InjectionToken('WLCM_STEP');
|
|
12
77
|
const WLCM_STEP_OPTIONS = new InjectionToken('WLCM_STEP_OPTIONS', {
|
|
13
78
|
factory: () => ({
|
|
@@ -16,342 +81,154 @@ const WLCM_STEP_OPTIONS = new InjectionToken('WLCM_STEP_OPTIONS', {
|
|
|
16
81
|
}),
|
|
17
82
|
});
|
|
18
83
|
|
|
84
|
+
class WlcmStepComponent extends WlcmStepBase {
|
|
85
|
+
constructor() {
|
|
86
|
+
super(inject(WLCM_STEP_OPTIONS));
|
|
87
|
+
this.stepsNavigator = inject(WLCM_STEPS_NAVIGATOR);
|
|
88
|
+
this.isActive = computed(() => this.stepsNavigator.active$()?.key() === this.key(), /* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
|
|
90
|
+
}
|
|
91
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
92
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: WlcmStepComponent, isStandalone: true, selector: "wlcm-step", host: { properties: { "class.wlcm-step-active": "isActive()" }, classAttribute: "wlcm-step" }, providers: [{ provide: WLCM_STEP, useExisting: forwardRef(() => WlcmStepComponent) }], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
93
|
+
}
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepComponent, decorators: [{
|
|
95
|
+
type: Component,
|
|
96
|
+
args: [{ selector: 'wlcm-step', host: {
|
|
97
|
+
class: 'wlcm-step',
|
|
98
|
+
'[class.wlcm-step-active]': 'isActive()',
|
|
99
|
+
}, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: WLCM_STEP, useExisting: forwardRef(() => WlcmStepComponent) }], template: "<ng-content></ng-content>\n" }]
|
|
100
|
+
}], ctorParameters: () => [] });
|
|
101
|
+
|
|
102
|
+
class WlcmStepperHeaderComponent {
|
|
103
|
+
constructor() {
|
|
104
|
+
this.steps = input.required(/* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
|
|
106
|
+
}
|
|
107
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepperHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
108
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: WlcmStepperHeaderComponent, isStandalone: true, selector: "wlcm-stepper-header", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "wlcm-stepper-header" }, ngImport: i0, template: "@for (step of steps(); track step) {\n<wlcm-step-header [step]=\"step\"></wlcm-step-header>\n}\n", styles: [""], dependencies: [{ kind: "component", type: WlcmStepHeaderComponent, selector: "wlcm-step-header", inputs: ["step"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
109
|
+
}
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepperHeaderComponent, decorators: [{
|
|
111
|
+
type: Component,
|
|
112
|
+
args: [{ selector: 'wlcm-stepper-header', host: { class: 'wlcm-stepper-header' }, imports: [WlcmStepHeaderComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@for (step of steps(); track step) {\n<wlcm-step-header [step]=\"step\"></wlcm-step-header>\n}\n" }]
|
|
113
|
+
}], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: true }] }] } });
|
|
114
|
+
|
|
19
115
|
class WlcmStepsNavigator {
|
|
20
116
|
}
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
117
|
+
class WlcmStepperBase extends WlcmStepsNavigator {
|
|
118
|
+
constructor() {
|
|
23
119
|
super();
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
26
|
-
|
|
27
|
-
this.
|
|
28
|
-
this.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
120
|
+
this._steps = contentChildren(WLCM_STEP, { ...(ngDevMode ? { debugName: "_steps" } : /* istanbul ignore next */ {}), descendants: true });
|
|
121
|
+
this._active = signal(null, /* @ts-ignore */
|
|
122
|
+
...(ngDevMode ? [{ debugName: "_active" }] : /* istanbul ignore next */ []));
|
|
123
|
+
this.active$ = this._active.asReadonly();
|
|
124
|
+
this._keyToIndexMap = computed(() => {
|
|
125
|
+
const map = new Map();
|
|
126
|
+
this._steps().forEach((step, index) => map.set(step.key(), index));
|
|
127
|
+
return map;
|
|
128
|
+
}, /* @ts-ignore */
|
|
129
|
+
...(ngDevMode ? [{ debugName: "_keyToIndexMap" }] : /* istanbul ignore next */ []));
|
|
130
|
+
this.minIncompleteStepIndex$ = computed(() => {
|
|
131
|
+
const steps = this._steps();
|
|
132
|
+
const minIndex = Math.min(...steps.map((step, index) => (step.completed() ? Infinity : index)));
|
|
133
|
+
return minIndex !== Infinity ? minIndex : -1;
|
|
134
|
+
}, /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "minIncompleteStepIndex$" }] : /* istanbul ignore next */ []));
|
|
136
|
+
// Auto-assign a positional key to any step that was declared without one.
|
|
137
|
+
effect(() => {
|
|
138
|
+
this._steps().forEach((step, index) => {
|
|
139
|
+
if (!step.key())
|
|
140
|
+
step.key.set(`${index}`);
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
// Activate the first step once the list is populated and nothing is active yet.
|
|
144
|
+
effect(() => {
|
|
145
|
+
const steps = this._steps();
|
|
146
|
+
if (!this._active() && steps.length)
|
|
147
|
+
this.activate(steps[0].key());
|
|
148
|
+
});
|
|
35
149
|
}
|
|
36
150
|
get active() {
|
|
37
|
-
return this._active
|
|
151
|
+
return this._active();
|
|
38
152
|
}
|
|
39
153
|
get isActiveCompleted() {
|
|
40
|
-
return this.active.completed;
|
|
154
|
+
return this.active.completed();
|
|
41
155
|
}
|
|
42
156
|
get minIncompleteStepIndex() {
|
|
43
|
-
return this.
|
|
157
|
+
return this.minIncompleteStepIndex$();
|
|
44
158
|
}
|
|
45
159
|
next() {
|
|
46
160
|
if (!this.canActivateNext())
|
|
47
161
|
return;
|
|
48
162
|
const index = this._activeIndex + 1;
|
|
49
163
|
if (index < this._steps().length)
|
|
50
|
-
this.activate(this._steps()[index].key);
|
|
164
|
+
this.activate(this._steps()[index].key());
|
|
51
165
|
}
|
|
52
166
|
previous() {
|
|
53
167
|
const index = this._activeIndex - 1;
|
|
54
168
|
if (index >= 0)
|
|
55
|
-
this.activate(this._steps()[index].key);
|
|
169
|
+
this.activate(this._steps()[index].key());
|
|
56
170
|
}
|
|
57
171
|
activate(key) {
|
|
58
|
-
if (!this._keyToIndexMap.has(key))
|
|
172
|
+
if (!this._keyToIndexMap().has(key))
|
|
59
173
|
return;
|
|
60
|
-
|
|
61
|
-
this._active$.next(step);
|
|
62
|
-
this.changeDetector.markForCheck();
|
|
174
|
+
this._active.set(this._getStep(key));
|
|
63
175
|
}
|
|
64
176
|
canActivateNext() {
|
|
65
177
|
return this.isActiveCompleted;
|
|
66
178
|
}
|
|
67
179
|
isCurrentOrPrevious(key) {
|
|
68
|
-
const index = this._keyToIndexMap.get(key);
|
|
180
|
+
const index = this._keyToIndexMap().get(key);
|
|
69
181
|
const activeIndex = this._activeIndex;
|
|
70
182
|
return index === activeIndex || activeIndex > index;
|
|
71
183
|
}
|
|
72
184
|
getStepIndex(key) {
|
|
73
|
-
return this._keyToIndexMap.get(key);
|
|
185
|
+
return this._keyToIndexMap().get(key);
|
|
74
186
|
}
|
|
75
187
|
get _activeIndex() {
|
|
76
|
-
return this._keyToIndexMap.get(this.active.key);
|
|
188
|
+
return this._keyToIndexMap().get(this.active.key());
|
|
77
189
|
}
|
|
78
190
|
_getStep(key) {
|
|
79
|
-
return this._steps()[this._keyToIndexMap.get(key)];
|
|
80
|
-
}
|
|
81
|
-
_handleUpdatedList(list) {
|
|
82
|
-
this._listUpdated$.next();
|
|
83
|
-
this._keyToIndexMap.clear();
|
|
84
|
-
list.forEach((step, index) => {
|
|
85
|
-
if (!step.key)
|
|
86
|
-
step.key = `${index}`;
|
|
87
|
-
this._keyToIndexMap.set(step.key, index);
|
|
88
|
-
this._handleKeyChanges(step, index);
|
|
89
|
-
});
|
|
90
|
-
this._handleCompleteChanges(list);
|
|
91
|
-
if (!this._active$.value)
|
|
92
|
-
this.activate(list[0].key);
|
|
93
|
-
}
|
|
94
|
-
_handleKeyChanges(step, index) {
|
|
95
|
-
let previousKey = step.key;
|
|
96
|
-
step.key$
|
|
97
|
-
.pipe(skip(1))
|
|
98
|
-
.pipe(untilDestroyed(this), takeUntil(this._listUpdated$))
|
|
99
|
-
.subscribe((newKey) => {
|
|
100
|
-
this._keyToIndexMap.delete(previousKey);
|
|
101
|
-
this._keyToIndexMap.set(newKey, index);
|
|
102
|
-
previousKey = newKey;
|
|
103
|
-
});
|
|
191
|
+
return this._steps()[this._keyToIndexMap().get(key)];
|
|
104
192
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
.pipe(distinctUntilChanged())
|
|
108
|
-
.pipe(map((isCompleted) => (isCompleted ? Infinity : index)))))
|
|
109
|
-
.pipe(untilDestroyed(this), takeUntil(this._listUpdated$))
|
|
110
|
-
.subscribe((indexes) => {
|
|
111
|
-
const minIndex = Math.min(...indexes);
|
|
112
|
-
this._minIncompleteStepIndex$.next(minIndex !== Infinity ? minIndex : -1);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmStepperBase, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
116
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.1.4", type: WlcmStepperBase, isStandalone: true, queries: [{ propertyName: "_steps", predicate: WLCM_STEP, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
|
|
117
|
-
};
|
|
118
|
-
WlcmStepperBase = __decorate([
|
|
119
|
-
UntilDestroy(),
|
|
120
|
-
__metadata("design:paramtypes", [ChangeDetectorRef])
|
|
121
|
-
], WlcmStepperBase);
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmStepperBase, decorators: [{
|
|
123
|
-
type: Directive
|
|
124
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
125
|
-
|
|
126
|
-
let WlcmStepHeaderComponent = class WlcmStepHeaderComponent {
|
|
127
|
-
get isPassed() {
|
|
128
|
-
return this._key && this.navigator.isCurrentOrPrevious(this._key);
|
|
129
|
-
}
|
|
130
|
-
get isCompleted() {
|
|
131
|
-
return this._step.completed;
|
|
132
|
-
}
|
|
133
|
-
constructor(elementRef, navigator) {
|
|
134
|
-
this.elementRef = elementRef;
|
|
135
|
-
this.navigator = navigator;
|
|
136
|
-
this.step = input.required();
|
|
137
|
-
this._stepUpdated$ = new Subject();
|
|
138
|
-
effect(() => this._handleDisableStatusChanges());
|
|
139
|
-
}
|
|
140
|
-
activate() {
|
|
141
|
-
if (this.navigator.active?.key === this.step().key)
|
|
142
|
-
return;
|
|
143
|
-
this.navigator.activate(this.step().key);
|
|
144
|
-
}
|
|
145
|
-
get element() {
|
|
146
|
-
return this.elementRef.nativeElement;
|
|
147
|
-
}
|
|
148
|
-
get _key() {
|
|
149
|
-
return this.step().key;
|
|
150
|
-
}
|
|
151
|
-
get _step() {
|
|
152
|
-
return this.step();
|
|
153
|
-
}
|
|
154
|
-
_handleDisableStatusChanges() {
|
|
155
|
-
this._stepUpdated$.next();
|
|
156
|
-
this.step()
|
|
157
|
-
.disabled$.pipe(switchMap((value) => {
|
|
158
|
-
if (value === 'on_any_previous_incomplete') {
|
|
159
|
-
return this.navigator.minIncompleteStepIndex$.pipe(map((minIndex) => {
|
|
160
|
-
if (minIndex < 0)
|
|
161
|
-
return false;
|
|
162
|
-
return minIndex < this.navigator.getStepIndex(this.step().key);
|
|
163
|
-
}));
|
|
164
|
-
}
|
|
165
|
-
return of(value);
|
|
166
|
-
}))
|
|
167
|
-
.pipe(untilDestroyed(this), takeUntil(this._stepUpdated$))
|
|
168
|
-
.subscribe((isDisabled) => {
|
|
169
|
-
if (isDisabled) {
|
|
170
|
-
return this.element.classList.add('wlcm-step-header-disabled');
|
|
171
|
-
}
|
|
172
|
-
this.element.classList.remove('wlcm-step-header-disabled');
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmStepHeaderComponent, deps: [{ token: i0.ElementRef }, { token: WLCM_STEPS_NAVIGATOR }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
176
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.4", type: WlcmStepHeaderComponent, isStandalone: true, selector: "wlcm-step-header", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.wlcm-step-header-passed": "this.isPassed", "class.wlcm-step-header-completed": "this.isCompleted" }, classAttribute: "wlcm-step-header" }, ngImport: i0, template: "<button class=\"wlcm-step-header-button\" (click)=\"activate()\">\n <span class=\"wlcm-step-header-label\">{{ step().label$ | async }}</span>\n\n <div class=\"wlcm-step-header-progress-bar\">\n <div class=\"wlcm-step-header-complete-indicator\"></div>\n\n <div class=\"wlcm-step-header-pass-indicator\"></div>\n </div>\n</button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
|
|
177
|
-
};
|
|
178
|
-
WlcmStepHeaderComponent = __decorate([
|
|
179
|
-
UntilDestroy(),
|
|
180
|
-
__metadata("design:paramtypes", [ElementRef, WlcmStepsNavigator])
|
|
181
|
-
], WlcmStepHeaderComponent);
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmStepHeaderComponent, decorators: [{
|
|
183
|
-
type: Component,
|
|
184
|
-
args: [{ selector: 'wlcm-step-header', host: { class: 'wlcm-step-header' }, standalone: true, imports: [CommonModule], template: "<button class=\"wlcm-step-header-button\" (click)=\"activate()\">\n <span class=\"wlcm-step-header-label\">{{ step().label$ | async }}</span>\n\n <div class=\"wlcm-step-header-progress-bar\">\n <div class=\"wlcm-step-header-complete-indicator\"></div>\n\n <div class=\"wlcm-step-header-pass-indicator\"></div>\n </div>\n</button>\n" }]
|
|
185
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: WlcmStepsNavigator, decorators: [{
|
|
186
|
-
type: Inject,
|
|
187
|
-
args: [WLCM_STEPS_NAVIGATOR]
|
|
188
|
-
}] }], propDecorators: { isPassed: [{
|
|
189
|
-
type: HostBinding,
|
|
190
|
-
args: ['class.wlcm-step-header-passed']
|
|
191
|
-
}], isCompleted: [{
|
|
192
|
-
type: HostBinding,
|
|
193
|
-
args: ['class.wlcm-step-header-completed']
|
|
194
|
-
}] } });
|
|
195
|
-
|
|
196
|
-
class WlcmStep {
|
|
197
|
-
}
|
|
198
|
-
class WlcmStepBase extends WlcmStep {
|
|
199
|
-
set key(value) {
|
|
200
|
-
this._key$.next(value);
|
|
201
|
-
}
|
|
202
|
-
get key() {
|
|
203
|
-
return this._key$.value;
|
|
204
|
-
}
|
|
205
|
-
set label(value) {
|
|
206
|
-
this._label$.next(value);
|
|
207
|
-
}
|
|
208
|
-
get label() {
|
|
209
|
-
return this._label$.value;
|
|
210
|
-
}
|
|
211
|
-
set completed(value) {
|
|
212
|
-
this._completed$.next(value);
|
|
213
|
-
}
|
|
214
|
-
get completed() {
|
|
215
|
-
return this._completed$.value;
|
|
216
|
-
}
|
|
217
|
-
set disabled(value) {
|
|
218
|
-
this._disabled$.next(value);
|
|
219
|
-
}
|
|
220
|
-
get disabled() {
|
|
221
|
-
return this._disabled$.value;
|
|
222
|
-
}
|
|
223
|
-
constructor(options) {
|
|
224
|
-
super();
|
|
225
|
-
this.options = options;
|
|
226
|
-
this._key$ = new BehaviorSubject(null);
|
|
227
|
-
this.key$ = this._key$.asObservable();
|
|
228
|
-
this._label$ = new BehaviorSubject('');
|
|
229
|
-
this.label$ = this._label$.asObservable();
|
|
230
|
-
this._completed$ = new BehaviorSubject(false);
|
|
231
|
-
this.completed$ = this._completed$.asObservable();
|
|
232
|
-
this._disabled$ = new BehaviorSubject(false);
|
|
233
|
-
this.disabled$ = this._disabled$.asObservable();
|
|
234
|
-
this.disabled = this.options.hasOwnProperty('completed') ? this.options.completed : false;
|
|
235
|
-
this.disabled = this.options.hasOwnProperty('disabled') ? this.options.disabled : 'on_any_previous_incomplete';
|
|
236
|
-
}
|
|
237
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmStepBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
|
238
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: WlcmStepBase, isStandalone: true, inputs: { key: "key", label: "label", completed: "completed", disabled: "disabled" }, usesInheritance: true, ngImport: i0 }); }
|
|
193
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepperBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
194
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.5", type: WlcmStepperBase, isStandalone: true, queries: [{ propertyName: "_steps", predicate: WLCM_STEP, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0 }); }
|
|
239
195
|
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepperBase, decorators: [{
|
|
241
197
|
type: Directive
|
|
242
|
-
}], ctorParameters: () => [{ type:
|
|
243
|
-
type: Input
|
|
244
|
-
}], label: [{
|
|
245
|
-
type: Input,
|
|
246
|
-
args: [{ required: true }]
|
|
247
|
-
}], completed: [{
|
|
248
|
-
type: Input
|
|
249
|
-
}], disabled: [{
|
|
250
|
-
type: Input
|
|
251
|
-
}] } });
|
|
252
|
-
|
|
253
|
-
let WlcmStepComponent = class WlcmStepComponent extends WlcmStepBase {
|
|
254
|
-
constructor(zone, elementRef, changeDetectorRef, options, stepsNavigator) {
|
|
255
|
-
super(options);
|
|
256
|
-
this.zone = zone;
|
|
257
|
-
this.elementRef = elementRef;
|
|
258
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
259
|
-
this.options = options;
|
|
260
|
-
this.stepsNavigator = stepsNavigator;
|
|
261
|
-
this.zone.runOutsideAngular(() => this._handleActiveChanges());
|
|
262
|
-
}
|
|
263
|
-
get element() {
|
|
264
|
-
return this.elementRef.nativeElement;
|
|
265
|
-
}
|
|
266
|
-
_handleActiveChanges() {
|
|
267
|
-
this.stepsNavigator.active$.pipe(untilDestroyed(this)).subscribe((active) => {
|
|
268
|
-
if (active?.key === this.key) {
|
|
269
|
-
this.element.classList.add('wlcm-step-active');
|
|
270
|
-
return this.changeDetectorRef.markForCheck();
|
|
271
|
-
}
|
|
272
|
-
this.element.classList.remove('wlcm-step-active');
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmStepComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: WLCM_STEP_OPTIONS }, { token: WLCM_STEPS_NAVIGATOR }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
276
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.4", type: WlcmStepComponent, isStandalone: true, selector: "wlcm-step", host: { classAttribute: "wlcm-step" }, providers: [{ provide: WLCM_STEP, useExisting: forwardRef(() => WlcmStepComponent) }], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
277
|
-
};
|
|
278
|
-
WlcmStepComponent = __decorate([
|
|
279
|
-
UntilDestroy(),
|
|
280
|
-
__metadata("design:paramtypes", [NgZone,
|
|
281
|
-
ElementRef,
|
|
282
|
-
ChangeDetectorRef, Object, WlcmStepsNavigator])
|
|
283
|
-
], WlcmStepComponent);
|
|
284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmStepComponent, decorators: [{
|
|
285
|
-
type: Component,
|
|
286
|
-
args: [{ selector: 'wlcm-step', host: { class: 'wlcm-step' }, standalone: true, imports: [CommonModule], providers: [{ provide: WLCM_STEP, useExisting: forwardRef(() => WlcmStepComponent) }], template: "<ng-content></ng-content>\n" }]
|
|
287
|
-
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
288
|
-
type: Inject,
|
|
289
|
-
args: [WLCM_STEP_OPTIONS]
|
|
290
|
-
}] }, { type: WlcmStepsNavigator, decorators: [{
|
|
291
|
-
type: Inject,
|
|
292
|
-
args: [WLCM_STEPS_NAVIGATOR]
|
|
293
|
-
}] }] });
|
|
294
|
-
|
|
295
|
-
class WlcmStepperHeaderComponent {
|
|
296
|
-
constructor() {
|
|
297
|
-
this.steps = input.required();
|
|
298
|
-
}
|
|
299
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmStepperHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
300
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.4", type: WlcmStepperHeaderComponent, isStandalone: true, selector: "wlcm-stepper-header", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "wlcm-stepper-header" }, ngImport: i0, template: "@for (step of steps(); track step) {\n<wlcm-step-header [step]=\"step\"></wlcm-step-header>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: WlcmStepHeaderComponent, selector: "wlcm-step-header", inputs: ["step"] }] }); }
|
|
301
|
-
}
|
|
302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmStepperHeaderComponent, decorators: [{
|
|
303
|
-
type: Component,
|
|
304
|
-
args: [{ selector: 'wlcm-stepper-header', host: { class: 'wlcm-stepper-header' }, standalone: true, imports: [CommonModule, WlcmStepHeaderComponent], template: "@for (step of steps(); track step) {\n<wlcm-step-header [step]=\"step\"></wlcm-step-header>\n}\n" }]
|
|
305
|
-
}] });
|
|
198
|
+
}], ctorParameters: () => [], propDecorators: { _steps: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => WLCM_STEP), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
306
199
|
|
|
307
200
|
class WlcmStepperComponent extends WlcmStepperBase {
|
|
308
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
309
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
201
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
202
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: WlcmStepperComponent, isStandalone: true, selector: "wlcm-stepper", host: { classAttribute: "wlcm-stepper" }, providers: [{ provide: WLCM_STEPS_NAVIGATOR, useExisting: forwardRef(() => WlcmStepperComponent) }], usesInheritance: true, ngImport: i0, template: "<wlcm-stepper-header [steps]=\"_steps()\"></wlcm-stepper-header>\n\n<ng-content select=\"wlcm-step\"></ng-content>\n", styles: [""], dependencies: [{ kind: "component", type: WlcmStepperHeaderComponent, selector: "wlcm-stepper-header", inputs: ["steps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
310
203
|
}
|
|
311
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepperComponent, decorators: [{
|
|
312
205
|
type: Component,
|
|
313
|
-
args: [{ selector: 'wlcm-stepper', host: { class: 'wlcm-stepper' },
|
|
206
|
+
args: [{ selector: 'wlcm-stepper', host: { class: 'wlcm-stepper' }, imports: [WlcmStepperHeaderComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: WLCM_STEPS_NAVIGATOR, useExisting: forwardRef(() => WlcmStepperComponent) }], template: "<wlcm-stepper-header [steps]=\"_steps()\"></wlcm-stepper-header>\n\n<ng-content select=\"wlcm-step\"></ng-content>\n" }]
|
|
314
207
|
}] });
|
|
315
208
|
|
|
316
|
-
|
|
317
|
-
constructor(
|
|
318
|
-
this.step =
|
|
319
|
-
this.navigator =
|
|
320
|
-
this.templateRef =
|
|
321
|
-
this.viewContainer =
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
209
|
+
class WlcmLoadOnActiveStepDirective {
|
|
210
|
+
constructor() {
|
|
211
|
+
this.step = inject(WLCM_STEP);
|
|
212
|
+
this.navigator = inject(WLCM_STEPS_NAVIGATOR);
|
|
213
|
+
this.templateRef = inject(TemplateRef);
|
|
214
|
+
this.viewContainer = inject(ViewContainerRef);
|
|
215
|
+
effect(() => {
|
|
216
|
+
const active = this.navigator.active$();
|
|
217
|
+
this.viewContainer.clear();
|
|
218
|
+
if (active?.key() === this.step.key()) {
|
|
325
219
|
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
326
220
|
}
|
|
327
|
-
else {
|
|
328
|
-
this.viewContainer.clear();
|
|
329
|
-
}
|
|
330
221
|
});
|
|
331
222
|
}
|
|
332
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
333
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
334
|
-
}
|
|
335
|
-
WlcmLoadOnActiveStepDirective
|
|
336
|
-
UntilDestroy(),
|
|
337
|
-
__metadata("design:paramtypes", [WlcmStep,
|
|
338
|
-
WlcmStepsNavigator,
|
|
339
|
-
TemplateRef,
|
|
340
|
-
ViewContainerRef])
|
|
341
|
-
], WlcmLoadOnActiveStepDirective);
|
|
342
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: WlcmLoadOnActiveStepDirective, decorators: [{
|
|
223
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmLoadOnActiveStepDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
224
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: WlcmLoadOnActiveStepDirective, isStandalone: true, selector: "[wlcmLoadOnActiveStep]", ngImport: i0 }); }
|
|
225
|
+
}
|
|
226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmLoadOnActiveStepDirective, decorators: [{
|
|
343
227
|
type: Directive,
|
|
344
228
|
args: [{
|
|
345
229
|
selector: '[wlcmLoadOnActiveStep]',
|
|
346
|
-
standalone: true,
|
|
347
230
|
}]
|
|
348
|
-
}], ctorParameters: () => [
|
|
349
|
-
type: Inject,
|
|
350
|
-
args: [WLCM_STEP]
|
|
351
|
-
}] }, { type: WlcmStepsNavigator, decorators: [{
|
|
352
|
-
type: Inject,
|
|
353
|
-
args: [WLCM_STEPS_NAVIGATOR]
|
|
354
|
-
}] }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }] });
|
|
231
|
+
}], ctorParameters: () => [] });
|
|
355
232
|
|
|
356
233
|
const publicComponents = [
|
|
357
234
|
WlcmStepComponent,
|
|
@@ -361,17 +238,17 @@ const publicComponents = [
|
|
|
361
238
|
];
|
|
362
239
|
const publicDirectives = [WlcmLoadOnActiveStepDirective];
|
|
363
240
|
class WlcmStepperModule {
|
|
364
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
365
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
241
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
242
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepperModule, imports: [CommonModule, WlcmStepComponent,
|
|
366
243
|
WlcmStepperComponent,
|
|
367
244
|
WlcmStepHeaderComponent,
|
|
368
245
|
WlcmStepperHeaderComponent, WlcmLoadOnActiveStepDirective], exports: [WlcmStepComponent,
|
|
369
246
|
WlcmStepperComponent,
|
|
370
247
|
WlcmStepHeaderComponent,
|
|
371
248
|
WlcmStepperHeaderComponent, WlcmLoadOnActiveStepDirective] }); }
|
|
372
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
249
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepperModule, imports: [CommonModule] }); }
|
|
373
250
|
}
|
|
374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: WlcmStepperModule, decorators: [{
|
|
375
252
|
type: NgModule,
|
|
376
253
|
args: [{
|
|
377
254
|
imports: [CommonModule, ...publicComponents, ...publicDirectives],
|