@wavemaker-ai/app-ng-runtime 12.1.1-rc.352 → 12.1.2-rc.353
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/build-task/bundles/index.umd.js +153 -139
- package/build-task/fesm2022/index.mjs +154 -141
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/build-task/types/index-rolldown-runtime-C25Le4-w.d.ts +1 -0
- package/build-task/types/index.d.ts +41 -37
- package/components/base/bundles/index.umd.js +16 -9
- package/components/base/fesm2022/index.mjs +18 -11
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/basic/audio/bundles/index.umd.js +2 -8
- package/components/basic/audio/fesm2022/index.mjs +3 -9
- package/components/basic/audio/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/bundles/index.umd.js +101 -65
- package/components/containers/wizard/fesm2022/index.mjs +99 -62
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/types/index.d.ts +79 -5
- package/components/containers/wizardstepper/bundles/index.umd.js +237 -0
- package/components/containers/wizardstepper/fesm2022/index.mjs +215 -0
- package/components/containers/wizardstepper/fesm2022/index.mjs.map +1 -0
- package/components/containers/wizardstepper/package.json +19 -0
- package/components/containers/wizardstepper/types/index.d.ts +71 -0
- package/components/data/list/bundles/index.umd.js +4 -0
- package/components/data/list/fesm2022/index.mjs +4 -0
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/types/index.d.ts +1 -0
- package/components/data/pagination/bundles/index.umd.js +26 -8
- package/components/data/pagination/fesm2022/index.mjs +24 -5
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/types/index.d.ts +5 -3
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/core/bundles/index.umd.js +20 -14
- package/core/fesm2022/index.mjs +23 -17
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/types/index.d.ts +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +20 -15
- package/runtime/base/fesm2022/index.mjs +52 -46
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/types/index.d.ts +23 -21
- package/runtime/dynamic/bundles/index.umd.js +6 -1
- package/runtime/dynamic/fesm2022/index.mjs +6 -1
- package/runtime/dynamic/fesm2022/index.mjs.map +1 -1
- package/variables/bundles/index.umd.js +13 -13
- package/variables/fesm2022/index.mjs +18 -18
- package/variables/fesm2022/index.mjs.map +1 -1
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@wm/components/base'), require('@angular/core')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@wm/components/base', '@angular/core'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.containers = global.wm.components.containers || {}, global.wm.components.containers.wizardstepper = {}), global.ng.common, global.wm.components.base, global.ng.core));
|
|
5
|
+
})(this, (function (exports, i1, base, i0) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
var n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
Object.keys(e).forEach(function (k) {
|
|
11
|
+
if (k !== 'default') {
|
|
12
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return e[k]; }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var i1__namespace = /*#__PURE__*/_interopNamespaceDefault(i1);
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespaceDefault(i0);
|
|
26
|
+
|
|
27
|
+
const registerProps = () => {
|
|
28
|
+
base.register("wm-wizardstepper", /* @__PURE__ */ new Map([
|
|
29
|
+
["class", base.PROP_STRING],
|
|
30
|
+
["name", base.PROP_STRING],
|
|
31
|
+
["show", {
|
|
32
|
+
value: true,
|
|
33
|
+
...base.PROP_BOOLEAN
|
|
34
|
+
}],
|
|
35
|
+
["stepstyle", base.PROP_STRING],
|
|
36
|
+
["tabindex", {
|
|
37
|
+
value: 0,
|
|
38
|
+
...base.PROP_NUMBER
|
|
39
|
+
}],
|
|
40
|
+
["wizardname", base.PROP_STRING]
|
|
41
|
+
]));
|
|
42
|
+
};
|
|
43
|
+
const WIDGET_CONFIG = {
|
|
44
|
+
widgetType: "wm-wizardstepper",
|
|
45
|
+
hostClass: "app-wizardstepper"
|
|
46
|
+
};
|
|
47
|
+
var WizardStepperComponent = class WizardStepperComponent extends base.StylableComponent {
|
|
48
|
+
static {
|
|
49
|
+
this.initializeProps = registerProps();
|
|
50
|
+
}
|
|
51
|
+
constructor(inj, contexts, explicitContext) {
|
|
52
|
+
super(inj, WIDGET_CONFIG, explicitContext);
|
|
53
|
+
base.styler(this.nativeElement, this, base.APPLY_STYLES_TYPE.SHELL);
|
|
54
|
+
this.nestedWizContext = contexts && contexts[0];
|
|
55
|
+
}
|
|
56
|
+
ngOnInit() {
|
|
57
|
+
super.ngOnInit();
|
|
58
|
+
if (!this.nestedWizContext && this.wizardname) setTimeout(() => {
|
|
59
|
+
const cdr = this.inj.get(i0.ChangeDetectorRef, null);
|
|
60
|
+
if (cdr && !cdr.destroyed) cdr.detectChanges();
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
get isNested() {
|
|
64
|
+
return !!this.nestedWizContext;
|
|
65
|
+
}
|
|
66
|
+
get role() {
|
|
67
|
+
return this.isNested ? "tab" : null;
|
|
68
|
+
}
|
|
69
|
+
get wizContext() {
|
|
70
|
+
return this.nestedWizContext || this.resolveWizardByName()?.wizContext;
|
|
71
|
+
}
|
|
72
|
+
resolveWizardByName() {
|
|
73
|
+
if (this.nestedWizContext || !this.wizardname) return;
|
|
74
|
+
return this.viewParent?.Widgets?.[this.wizardname];
|
|
75
|
+
}
|
|
76
|
+
get steps() {
|
|
77
|
+
return this.wizContext?.steps || [];
|
|
78
|
+
}
|
|
79
|
+
get wizardClass() {
|
|
80
|
+
return this.wizContext?.getWizardClass?.() || "";
|
|
81
|
+
}
|
|
82
|
+
get stepClass() {
|
|
83
|
+
if (this.stepstyle) return this.stepstyle === "justified" ? "nav-justified" : "";
|
|
84
|
+
return this.wizContext?.getStepClass?.() || "";
|
|
85
|
+
}
|
|
86
|
+
get showWizardStepIcons() {
|
|
87
|
+
return this.wizContext?.showWizardStepIcons?.() ?? false;
|
|
88
|
+
}
|
|
89
|
+
get isTabStepperWizard() {
|
|
90
|
+
return this.wizContext?.isTabStepperWizard?.() ?? false;
|
|
91
|
+
}
|
|
92
|
+
onStepClick(event, step) {
|
|
93
|
+
this.wizContext?.onHeaderClick?.(event, step);
|
|
94
|
+
}
|
|
95
|
+
onKeyDown(event) {
|
|
96
|
+
this.wizContext?.onHeaderKeyDown?.(event);
|
|
97
|
+
}
|
|
98
|
+
shouldRenderWizardStepNumberSpan(step) {
|
|
99
|
+
return this.wizContext?.shouldRenderStepNumberSpan?.(step) ?? true;
|
|
100
|
+
}
|
|
101
|
+
shouldShowPrimaryStepIcon(step) {
|
|
102
|
+
return this.wizContext?.shouldShowPrimaryStepIcon?.(step) ?? false;
|
|
103
|
+
}
|
|
104
|
+
hasNonEmptyDoneIconClass(step) {
|
|
105
|
+
return this.wizContext?.hasNonEmptyDoneIconClass?.(step) ?? false;
|
|
106
|
+
}
|
|
107
|
+
stepIconClassOrDefault(step) {
|
|
108
|
+
return this.wizContext?.stepIconClassOrDefault?.(step) ?? "wi wi-person";
|
|
109
|
+
}
|
|
110
|
+
readMoreSubtitle() {
|
|
111
|
+
this.wizContext?.readMoreSubtitle?.();
|
|
112
|
+
}
|
|
113
|
+
static {
|
|
114
|
+
this.ɵfac = i0__namespace.ɵɵngDeclareFactory({
|
|
115
|
+
minVersion: "12.0.0",
|
|
116
|
+
version: "22.2.1",
|
|
117
|
+
ngImport: i0__namespace,
|
|
118
|
+
type: WizardStepperComponent,
|
|
119
|
+
deps: [
|
|
120
|
+
{ token: i0__namespace.Injector },
|
|
121
|
+
{
|
|
122
|
+
token: base.Context,
|
|
123
|
+
optional: true
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
token: "EXPLICIT_CONTEXT",
|
|
127
|
+
optional: true
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
target: i0__namespace.ɵɵFactoryTarget.Component
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
static {
|
|
134
|
+
this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({
|
|
135
|
+
minVersion: "17.0.0",
|
|
136
|
+
version: "22.2.1",
|
|
137
|
+
type: WizardStepperComponent,
|
|
138
|
+
isStandalone: true,
|
|
139
|
+
selector: "div[wmWizardStepper]",
|
|
140
|
+
host: { properties: {
|
|
141
|
+
"class.app-wizard-heading": "this.isNested",
|
|
142
|
+
"attr.role": "this.role"
|
|
143
|
+
} },
|
|
144
|
+
providers: [base.provideAsWidgetRef(WizardStepperComponent)],
|
|
145
|
+
exportAs: ["wmWizardStepper"],
|
|
146
|
+
usesInheritance: true,
|
|
147
|
+
ngImport: i0__namespace,
|
|
148
|
+
template: "@if (wizContext) {\n <ul class=\"app-wizard-steps nav nav-pills {{stepClass}}\">\n @for (step of steps; track step; let i = $index) {\n <li class=\"app-wizard-step\" [hidden]=\"!step.show\"\n [ngClass]=\"{finished: step.done, active: step.active, default: step.disabled}\"\n (click)=\"onStepClick($event, step)\" [attr.data-stepid]=\"step.widgetId\">\n <a href=\"javascript:void(0)\" [attr.aria-current]=\"step.active ? 'step' : null\"\n [attr.aria-disabled]=\"step.disabled\" [attr.aria-label]='step.subtitle ? \"step \" + (i + 1) + \" \" + step.title + \" \" + step.subtitle : \"step \" + (i + 1) + \" \" + step.title' [attr.title]= \"step.title\"\n [ngClass]=\"{'title-center-align':wizardClass && wizardClass.includes('classic') && !step.subtitle}\" [tabindex]=\"step.active ? '0' : '-1'\" (keydown)=\"onKeyDown($event)\">\n @if (wizardClass && wizardClass.includes('classic')) {\n <span class=\"arrow\"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class=\"wizard-step-number\">\n @if (wizardClass && wizardClass.includes('number') && !step.isDone && !showWizardStepIcons) {\n <span class=\"count\">{{i+1}}</span>\n }\n @if (wizardClass && (wizardClass.includes('dottedstepper') || wizardClass.includes('text-inline') && !showWizardStepIcons) && !step.isDone) {\n <i class=\"dottedstepper\"></i>\n }\n @if (wizardClass && (wizardClass.includes('dottedstepper') || wizardClass.includes('number')) && step.isDone) {\n <i class=\"app-icon wi wi-done\"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <wm-app-icon [iconclass]=\"stepIconClassOrDefault(step)\" [iconurl]=\"step.iconurl\"></wm-app-icon>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <wm-app-icon [iconclass]=\"step.doneiconclass\" [iconurl]=\"step.doneiconurl\"></wm-app-icon>\n }\n </span>\n }\n <span class=\"title-wrapper\">\n @if (wizardClass && wizardClass.includes('text-inline')) {\n <span>{{'0' + (i+1)}}</span>\n }\n <span class=\"step-title\" [textContent]=\"step.title\"></span>\n </span>\n @if (step.subtitle) {\n <span class=\"subtitle-wrapper\" [attr.title]=\"step.subtitle\">\n <span class=\"step-title\" [textContent]=\"step.subtitle\"></span>\n <a class=\"read_more\" (click)=\"readMoreSubtitle()\" style=\"display:none\">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n}\n",
|
|
149
|
+
dependencies: [
|
|
150
|
+
{
|
|
151
|
+
kind: "ngmodule",
|
|
152
|
+
type: i1.CommonModule
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
kind: "directive",
|
|
156
|
+
type: i1__namespace.NgClass,
|
|
157
|
+
selector: "[ngClass]",
|
|
158
|
+
inputs: ["class", "ngClass"]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
kind: "directive",
|
|
162
|
+
type: base.TextContentDirective,
|
|
163
|
+
selector: "[textContent]",
|
|
164
|
+
inputs: ["textContent"]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
kind: "component",
|
|
168
|
+
type: base.WmAppIconComponent,
|
|
169
|
+
selector: "wm-app-icon",
|
|
170
|
+
inputs: [
|
|
171
|
+
"icon",
|
|
172
|
+
"iconclass",
|
|
173
|
+
"iconurl",
|
|
174
|
+
"defaultIconClass",
|
|
175
|
+
"defaultClasses",
|
|
176
|
+
"iconStyle",
|
|
177
|
+
"alt"
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
changeDetection: i0__namespace.ChangeDetectionStrategy.Eager
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
i0__namespace.ɵɵngDeclareClassMetadata({
|
|
186
|
+
minVersion: "12.0.0",
|
|
187
|
+
version: "22.2.1",
|
|
188
|
+
ngImport: i0__namespace,
|
|
189
|
+
type: WizardStepperComponent,
|
|
190
|
+
decorators: [{
|
|
191
|
+
type: i0.Component,
|
|
192
|
+
args: [{
|
|
193
|
+
standalone: true,
|
|
194
|
+
imports: [
|
|
195
|
+
i1.CommonModule,
|
|
196
|
+
base.TextContentDirective,
|
|
197
|
+
base.WmAppIconComponent
|
|
198
|
+
],
|
|
199
|
+
selector: "div[wmWizardStepper]",
|
|
200
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager,
|
|
201
|
+
providers: [base.provideAsWidgetRef(WizardStepperComponent)],
|
|
202
|
+
exportAs: "wmWizardStepper",
|
|
203
|
+
template: "@if (wizContext) {\n <ul class=\"app-wizard-steps nav nav-pills {{stepClass}}\">\n @for (step of steps; track step; let i = $index) {\n <li class=\"app-wizard-step\" [hidden]=\"!step.show\"\n [ngClass]=\"{finished: step.done, active: step.active, default: step.disabled}\"\n (click)=\"onStepClick($event, step)\" [attr.data-stepid]=\"step.widgetId\">\n <a href=\"javascript:void(0)\" [attr.aria-current]=\"step.active ? 'step' : null\"\n [attr.aria-disabled]=\"step.disabled\" [attr.aria-label]='step.subtitle ? \"step \" + (i + 1) + \" \" + step.title + \" \" + step.subtitle : \"step \" + (i + 1) + \" \" + step.title' [attr.title]= \"step.title\"\n [ngClass]=\"{'title-center-align':wizardClass && wizardClass.includes('classic') && !step.subtitle}\" [tabindex]=\"step.active ? '0' : '-1'\" (keydown)=\"onKeyDown($event)\">\n @if (wizardClass && wizardClass.includes('classic')) {\n <span class=\"arrow\"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class=\"wizard-step-number\">\n @if (wizardClass && wizardClass.includes('number') && !step.isDone && !showWizardStepIcons) {\n <span class=\"count\">{{i+1}}</span>\n }\n @if (wizardClass && (wizardClass.includes('dottedstepper') || wizardClass.includes('text-inline') && !showWizardStepIcons) && !step.isDone) {\n <i class=\"dottedstepper\"></i>\n }\n @if (wizardClass && (wizardClass.includes('dottedstepper') || wizardClass.includes('number')) && step.isDone) {\n <i class=\"app-icon wi wi-done\"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <wm-app-icon [iconclass]=\"stepIconClassOrDefault(step)\" [iconurl]=\"step.iconurl\"></wm-app-icon>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <wm-app-icon [iconclass]=\"step.doneiconclass\" [iconurl]=\"step.doneiconurl\"></wm-app-icon>\n }\n </span>\n }\n <span class=\"title-wrapper\">\n @if (wizardClass && wizardClass.includes('text-inline')) {\n <span>{{'0' + (i+1)}}</span>\n }\n <span class=\"step-title\" [textContent]=\"step.title\"></span>\n </span>\n @if (step.subtitle) {\n <span class=\"subtitle-wrapper\" [attr.title]=\"step.subtitle\">\n <span class=\"step-title\" [textContent]=\"step.subtitle\"></span>\n <a class=\"read_more\" (click)=\"readMoreSubtitle()\" style=\"display:none\">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n}\n"
|
|
204
|
+
}]
|
|
205
|
+
}],
|
|
206
|
+
ctorParameters: () => [
|
|
207
|
+
{ type: i0__namespace.Injector },
|
|
208
|
+
{
|
|
209
|
+
type: Array,
|
|
210
|
+
decorators: [{ type: i0.Optional }, {
|
|
211
|
+
type: i0.Inject,
|
|
212
|
+
args: [base.Context]
|
|
213
|
+
}]
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
type: void 0,
|
|
217
|
+
decorators: [{
|
|
218
|
+
type: i0.Inject,
|
|
219
|
+
args: ["EXPLICIT_CONTEXT"]
|
|
220
|
+
}, { type: i0.Optional }]
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
propDecorators: {
|
|
224
|
+
isNested: [{
|
|
225
|
+
type: i0.HostBinding,
|
|
226
|
+
args: ["class.app-wizard-heading"]
|
|
227
|
+
}],
|
|
228
|
+
role: [{
|
|
229
|
+
type: i0.HostBinding,
|
|
230
|
+
args: ["attr.role"]
|
|
231
|
+
}]
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
exports.WizardStepperComponent = WizardStepperComponent;
|
|
236
|
+
|
|
237
|
+
}));
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import * as i1 from "@angular/common";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { APPLY_STYLES_TYPE, Context, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, StylableComponent, TextContentDirective, WmAppIconComponent, provideAsWidgetRef, register, styler } from "@wm/components/base";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, Inject, Optional } from "@angular/core";
|
|
6
|
+
const registerProps = () => {
|
|
7
|
+
register("wm-wizardstepper", /* @__PURE__ */ new Map([
|
|
8
|
+
["class", PROP_STRING],
|
|
9
|
+
["name", PROP_STRING],
|
|
10
|
+
["show", {
|
|
11
|
+
value: true,
|
|
12
|
+
...PROP_BOOLEAN
|
|
13
|
+
}],
|
|
14
|
+
["stepstyle", PROP_STRING],
|
|
15
|
+
["tabindex", {
|
|
16
|
+
value: 0,
|
|
17
|
+
...PROP_NUMBER
|
|
18
|
+
}],
|
|
19
|
+
["wizardname", PROP_STRING]
|
|
20
|
+
]));
|
|
21
|
+
};
|
|
22
|
+
const WIDGET_CONFIG = {
|
|
23
|
+
widgetType: "wm-wizardstepper",
|
|
24
|
+
hostClass: "app-wizardstepper"
|
|
25
|
+
};
|
|
26
|
+
var WizardStepperComponent = class WizardStepperComponent extends StylableComponent {
|
|
27
|
+
static {
|
|
28
|
+
this.initializeProps = registerProps();
|
|
29
|
+
}
|
|
30
|
+
constructor(inj, contexts, explicitContext) {
|
|
31
|
+
super(inj, WIDGET_CONFIG, explicitContext);
|
|
32
|
+
styler(this.nativeElement, this, APPLY_STYLES_TYPE.SHELL);
|
|
33
|
+
this.nestedWizContext = contexts && contexts[0];
|
|
34
|
+
}
|
|
35
|
+
ngOnInit() {
|
|
36
|
+
super.ngOnInit();
|
|
37
|
+
if (!this.nestedWizContext && this.wizardname) setTimeout(() => {
|
|
38
|
+
const cdr = this.inj.get(ChangeDetectorRef, null);
|
|
39
|
+
if (cdr && !cdr.destroyed) cdr.detectChanges();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
get isNested() {
|
|
43
|
+
return !!this.nestedWizContext;
|
|
44
|
+
}
|
|
45
|
+
get role() {
|
|
46
|
+
return this.isNested ? "tab" : null;
|
|
47
|
+
}
|
|
48
|
+
get wizContext() {
|
|
49
|
+
return this.nestedWizContext || this.resolveWizardByName()?.wizContext;
|
|
50
|
+
}
|
|
51
|
+
resolveWizardByName() {
|
|
52
|
+
if (this.nestedWizContext || !this.wizardname) return;
|
|
53
|
+
return this.viewParent?.Widgets?.[this.wizardname];
|
|
54
|
+
}
|
|
55
|
+
get steps() {
|
|
56
|
+
return this.wizContext?.steps || [];
|
|
57
|
+
}
|
|
58
|
+
get wizardClass() {
|
|
59
|
+
return this.wizContext?.getWizardClass?.() || "";
|
|
60
|
+
}
|
|
61
|
+
get stepClass() {
|
|
62
|
+
if (this.stepstyle) return this.stepstyle === "justified" ? "nav-justified" : "";
|
|
63
|
+
return this.wizContext?.getStepClass?.() || "";
|
|
64
|
+
}
|
|
65
|
+
get showWizardStepIcons() {
|
|
66
|
+
return this.wizContext?.showWizardStepIcons?.() ?? false;
|
|
67
|
+
}
|
|
68
|
+
get isTabStepperWizard() {
|
|
69
|
+
return this.wizContext?.isTabStepperWizard?.() ?? false;
|
|
70
|
+
}
|
|
71
|
+
onStepClick(event, step) {
|
|
72
|
+
this.wizContext?.onHeaderClick?.(event, step);
|
|
73
|
+
}
|
|
74
|
+
onKeyDown(event) {
|
|
75
|
+
this.wizContext?.onHeaderKeyDown?.(event);
|
|
76
|
+
}
|
|
77
|
+
shouldRenderWizardStepNumberSpan(step) {
|
|
78
|
+
return this.wizContext?.shouldRenderStepNumberSpan?.(step) ?? true;
|
|
79
|
+
}
|
|
80
|
+
shouldShowPrimaryStepIcon(step) {
|
|
81
|
+
return this.wizContext?.shouldShowPrimaryStepIcon?.(step) ?? false;
|
|
82
|
+
}
|
|
83
|
+
hasNonEmptyDoneIconClass(step) {
|
|
84
|
+
return this.wizContext?.hasNonEmptyDoneIconClass?.(step) ?? false;
|
|
85
|
+
}
|
|
86
|
+
stepIconClassOrDefault(step) {
|
|
87
|
+
return this.wizContext?.stepIconClassOrDefault?.(step) ?? "wi wi-person";
|
|
88
|
+
}
|
|
89
|
+
readMoreSubtitle() {
|
|
90
|
+
this.wizContext?.readMoreSubtitle?.();
|
|
91
|
+
}
|
|
92
|
+
static {
|
|
93
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
94
|
+
minVersion: "12.0.0",
|
|
95
|
+
version: "22.2.1",
|
|
96
|
+
ngImport: i0,
|
|
97
|
+
type: WizardStepperComponent,
|
|
98
|
+
deps: [
|
|
99
|
+
{ token: i0.Injector },
|
|
100
|
+
{
|
|
101
|
+
token: Context,
|
|
102
|
+
optional: true
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
token: "EXPLICIT_CONTEXT",
|
|
106
|
+
optional: true
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
static {
|
|
113
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
114
|
+
minVersion: "17.0.0",
|
|
115
|
+
version: "22.2.1",
|
|
116
|
+
type: WizardStepperComponent,
|
|
117
|
+
isStandalone: true,
|
|
118
|
+
selector: "div[wmWizardStepper]",
|
|
119
|
+
host: { properties: {
|
|
120
|
+
"class.app-wizard-heading": "this.isNested",
|
|
121
|
+
"attr.role": "this.role"
|
|
122
|
+
} },
|
|
123
|
+
providers: [provideAsWidgetRef(WizardStepperComponent)],
|
|
124
|
+
exportAs: ["wmWizardStepper"],
|
|
125
|
+
usesInheritance: true,
|
|
126
|
+
ngImport: i0,
|
|
127
|
+
template: "@if (wizContext) {\n <ul class=\"app-wizard-steps nav nav-pills {{stepClass}}\">\n @for (step of steps; track step; let i = $index) {\n <li class=\"app-wizard-step\" [hidden]=\"!step.show\"\n [ngClass]=\"{finished: step.done, active: step.active, default: step.disabled}\"\n (click)=\"onStepClick($event, step)\" [attr.data-stepid]=\"step.widgetId\">\n <a href=\"javascript:void(0)\" [attr.aria-current]=\"step.active ? 'step' : null\"\n [attr.aria-disabled]=\"step.disabled\" [attr.aria-label]='step.subtitle ? \"step \" + (i + 1) + \" \" + step.title + \" \" + step.subtitle : \"step \" + (i + 1) + \" \" + step.title' [attr.title]= \"step.title\"\n [ngClass]=\"{'title-center-align':wizardClass && wizardClass.includes('classic') && !step.subtitle}\" [tabindex]=\"step.active ? '0' : '-1'\" (keydown)=\"onKeyDown($event)\">\n @if (wizardClass && wizardClass.includes('classic')) {\n <span class=\"arrow\"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class=\"wizard-step-number\">\n @if (wizardClass && wizardClass.includes('number') && !step.isDone && !showWizardStepIcons) {\n <span class=\"count\">{{i+1}}</span>\n }\n @if (wizardClass && (wizardClass.includes('dottedstepper') || wizardClass.includes('text-inline') && !showWizardStepIcons) && !step.isDone) {\n <i class=\"dottedstepper\"></i>\n }\n @if (wizardClass && (wizardClass.includes('dottedstepper') || wizardClass.includes('number')) && step.isDone) {\n <i class=\"app-icon wi wi-done\"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <wm-app-icon [iconclass]=\"stepIconClassOrDefault(step)\" [iconurl]=\"step.iconurl\"></wm-app-icon>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <wm-app-icon [iconclass]=\"step.doneiconclass\" [iconurl]=\"step.doneiconurl\"></wm-app-icon>\n }\n </span>\n }\n <span class=\"title-wrapper\">\n @if (wizardClass && wizardClass.includes('text-inline')) {\n <span>{{'0' + (i+1)}}</span>\n }\n <span class=\"step-title\" [textContent]=\"step.title\"></span>\n </span>\n @if (step.subtitle) {\n <span class=\"subtitle-wrapper\" [attr.title]=\"step.subtitle\">\n <span class=\"step-title\" [textContent]=\"step.subtitle\"></span>\n <a class=\"read_more\" (click)=\"readMoreSubtitle()\" style=\"display:none\">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n}\n",
|
|
128
|
+
dependencies: [
|
|
129
|
+
{
|
|
130
|
+
kind: "ngmodule",
|
|
131
|
+
type: CommonModule
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
kind: "directive",
|
|
135
|
+
type: i1.NgClass,
|
|
136
|
+
selector: "[ngClass]",
|
|
137
|
+
inputs: ["class", "ngClass"]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
kind: "directive",
|
|
141
|
+
type: TextContentDirective,
|
|
142
|
+
selector: "[textContent]",
|
|
143
|
+
inputs: ["textContent"]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
kind: "component",
|
|
147
|
+
type: WmAppIconComponent,
|
|
148
|
+
selector: "wm-app-icon",
|
|
149
|
+
inputs: [
|
|
150
|
+
"icon",
|
|
151
|
+
"iconclass",
|
|
152
|
+
"iconurl",
|
|
153
|
+
"defaultIconClass",
|
|
154
|
+
"defaultClasses",
|
|
155
|
+
"iconStyle",
|
|
156
|
+
"alt"
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
165
|
+
minVersion: "12.0.0",
|
|
166
|
+
version: "22.2.1",
|
|
167
|
+
ngImport: i0,
|
|
168
|
+
type: WizardStepperComponent,
|
|
169
|
+
decorators: [{
|
|
170
|
+
type: Component,
|
|
171
|
+
args: [{
|
|
172
|
+
standalone: true,
|
|
173
|
+
imports: [
|
|
174
|
+
CommonModule,
|
|
175
|
+
TextContentDirective,
|
|
176
|
+
WmAppIconComponent
|
|
177
|
+
],
|
|
178
|
+
selector: "div[wmWizardStepper]",
|
|
179
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
180
|
+
providers: [provideAsWidgetRef(WizardStepperComponent)],
|
|
181
|
+
exportAs: "wmWizardStepper",
|
|
182
|
+
template: "@if (wizContext) {\n <ul class=\"app-wizard-steps nav nav-pills {{stepClass}}\">\n @for (step of steps; track step; let i = $index) {\n <li class=\"app-wizard-step\" [hidden]=\"!step.show\"\n [ngClass]=\"{finished: step.done, active: step.active, default: step.disabled}\"\n (click)=\"onStepClick($event, step)\" [attr.data-stepid]=\"step.widgetId\">\n <a href=\"javascript:void(0)\" [attr.aria-current]=\"step.active ? 'step' : null\"\n [attr.aria-disabled]=\"step.disabled\" [attr.aria-label]='step.subtitle ? \"step \" + (i + 1) + \" \" + step.title + \" \" + step.subtitle : \"step \" + (i + 1) + \" \" + step.title' [attr.title]= \"step.title\"\n [ngClass]=\"{'title-center-align':wizardClass && wizardClass.includes('classic') && !step.subtitle}\" [tabindex]=\"step.active ? '0' : '-1'\" (keydown)=\"onKeyDown($event)\">\n @if (wizardClass && wizardClass.includes('classic')) {\n <span class=\"arrow\"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class=\"wizard-step-number\">\n @if (wizardClass && wizardClass.includes('number') && !step.isDone && !showWizardStepIcons) {\n <span class=\"count\">{{i+1}}</span>\n }\n @if (wizardClass && (wizardClass.includes('dottedstepper') || wizardClass.includes('text-inline') && !showWizardStepIcons) && !step.isDone) {\n <i class=\"dottedstepper\"></i>\n }\n @if (wizardClass && (wizardClass.includes('dottedstepper') || wizardClass.includes('number')) && step.isDone) {\n <i class=\"app-icon wi wi-done\"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <wm-app-icon [iconclass]=\"stepIconClassOrDefault(step)\" [iconurl]=\"step.iconurl\"></wm-app-icon>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <wm-app-icon [iconclass]=\"step.doneiconclass\" [iconurl]=\"step.doneiconurl\"></wm-app-icon>\n }\n </span>\n }\n <span class=\"title-wrapper\">\n @if (wizardClass && wizardClass.includes('text-inline')) {\n <span>{{'0' + (i+1)}}</span>\n }\n <span class=\"step-title\" [textContent]=\"step.title\"></span>\n </span>\n @if (step.subtitle) {\n <span class=\"subtitle-wrapper\" [attr.title]=\"step.subtitle\">\n <span class=\"step-title\" [textContent]=\"step.subtitle\"></span>\n <a class=\"read_more\" (click)=\"readMoreSubtitle()\" style=\"display:none\">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n}\n"
|
|
183
|
+
}]
|
|
184
|
+
}],
|
|
185
|
+
ctorParameters: () => [
|
|
186
|
+
{ type: i0.Injector },
|
|
187
|
+
{
|
|
188
|
+
type: Array,
|
|
189
|
+
decorators: [{ type: Optional }, {
|
|
190
|
+
type: Inject,
|
|
191
|
+
args: [Context]
|
|
192
|
+
}]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
type: void 0,
|
|
196
|
+
decorators: [{
|
|
197
|
+
type: Inject,
|
|
198
|
+
args: ["EXPLICIT_CONTEXT"]
|
|
199
|
+
}, { type: Optional }]
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
propDecorators: {
|
|
203
|
+
isNested: [{
|
|
204
|
+
type: HostBinding,
|
|
205
|
+
args: ["class.app-wizard-heading"]
|
|
206
|
+
}],
|
|
207
|
+
role: [{
|
|
208
|
+
type: HostBinding,
|
|
209
|
+
args: ["attr.role"]
|
|
210
|
+
}]
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
export { WizardStepperComponent };
|
|
214
|
+
|
|
215
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../projects/components/widgets/containers/wizardstepper/src/wizardstepper.props.ts","../../../../../projects/components/widgets/containers/wizardstepper/src/wizardstepper.component.ts","../../../../../projects/components/widgets/containers/wizardstepper/src/wizardstepper.component.html"],"sourcesContent":["import {PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-wizardstepper',\n new Map(\n [\n ['class', PROP_STRING],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n // No registered default: an unset stepstyle falls back to the wizard's (see\n // WizardStepperComponent.stepClass); the effective default is still 'auto'.\n ['stepstyle', PROP_STRING],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['wizardname', PROP_STRING]\n ]\n )\n );\n};\n","import {CommonModule} from '@angular/common';\nimport {\n APPLY_STYLES_TYPE,\n Context,\n IWidgetConfig,\n provideAsWidgetRef,\n StylableComponent,\n styler,\n TextContentDirective,\n WmAppIconComponent\n} from '@wm/components/base';\nimport {ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, Inject, Injector, Optional} from '@angular/core';\n\nimport {registerProps} from './wizardstepper.props';\n\nconst DEFAULT_CLS = 'app-wizardstepper';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-wizardstepper',\n hostClass: DEFAULT_CLS\n};\n\n/**\n * Standalone wizard-header widget, extracted from the wizard's inline header.\n *\n * Association seam #1 (nested): an ancestor `WizardComponent` provides a shared `Context`\n * object (`wizContext`) via its own `providers` array. This component injects that SAME\n * token WITHOUT `@Self()` so it resolves the nearest ancestor wizard's context when nested —\n * this mirrors the existing wizard-action seam and avoids a circular package dependency\n * between `@wm/components/containers/wizardstepper` and `@wm/components/containers/wizard`\n * (neither package imports the other's component class).\n *\n * Association seam #2 (standalone-by-reference, 002-stepper-header-widget US2): when there is\n * no ancestor wizard, `wizardname` is resolved against `viewParent.Widgets[wizardname]` — the\n * same page-level widget registry every named widget registers into (see\n * `@wm/components/base`'s `widget-registry.ts`). The wizard's `wizContext` object is read off\n * that resolved instance directly; because this happens in a getter (re-evaluated on every\n * template read), it is immune to component-construction-order races between the header and\n * its wizard — including the wizard's OWN registration into `Widgets` being deliberately\n * deferred to its `ngAfterContentInit` (see `wizard.component.ts`'s `initPromise`). The wizard's\n * own `hasExternalHeader` getter does the mirror-image scan to distinguish an externally-bound\n * header from its own nested one — see `wizard.component.ts` for why that is ALSO a stateless\n * read-time scan rather than an imperative register/unregister call.\n */\n@Component({\n standalone: true,\n imports: [CommonModule, TextContentDirective, WmAppIconComponent],\n selector: 'div[wmWizardStepper]',\n templateUrl: './wizardstepper.component.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n providers: [\n provideAsWidgetRef(WizardStepperComponent)\n ],\n exportAs: 'wmWizardStepper'\n})\nexport class WizardStepperComponent extends StylableComponent {\n static initializeProps = registerProps();\n\n public class;\n public name;\n public show;\n public stepstyle;\n public tabindex;\n public wizardname;\n\n private readonly nestedWizContext: any;\n\n constructor(inj: Injector, @Optional() @Inject(Context) contexts: Array<any>, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this, APPLY_STYLES_TYPE.SHELL);\n this.nestedWizContext = contexts && contexts[0];\n }\n\n ngOnInit() {\n super.ngOnInit();\n // Standalone-by-reference (US2): the target wizard's OWN registration into\n // `viewParent.Widgets` (and the `wizContext` properties this component's `steps`/etc.\n // getters read) may be populated via a microtask that resolves strictly AFTER this\n // initial change-detection pass returns (see `wizard.component.ts`'s `initPromise`\n // handling). Force one more check once the JS event loop guarantees that microtask has\n // drained — a `setTimeout` macrotask always runs after ALL pending microtasks — so this\n // renders correctly regardless of whether the host environment automatically re-ticks\n // change detection afterward.\n if (!this.nestedWizContext && this.wizardname) {\n setTimeout(() => {\n const cdr = this.inj.get(ChangeDetectorRef, null);\n if (cdr && !(cdr as any).destroyed) {\n cdr.detectChanges();\n }\n });\n }\n }\n\n /**\n * Whether this header is nested inside an ancestor `wm-wizard` (as opposed to a\n * standalone-by-reference header elsewhere on the page, associated only via `wizardname`).\n * Mirrors `wavemaker-react-runtime`'s `WmWizardstepper`, which computes\n * `isNested = !!context` (a React context provided by the ancestor wizard) and applies\n * `app-wizard-heading` only in that case.\n */\n @HostBinding('class.app-wizard-heading')\n get isNested(): boolean {\n return !!this.nestedWizContext;\n }\n\n /**\n * Legacy accessibility parity: the pre-002 auto-embedded header markup rendered\n * `<div class=\"app-wizard-heading\" role=\"tab\">` for a nested header. A standalone-by-\n * reference header has no such role, since it never was the wizard's own inline markup.\n */\n @HostBinding('attr.role')\n get role(): string | null {\n return this.isNested ? 'tab' : null;\n }\n\n get wizContext(): any {\n return this.nestedWizContext || this.resolveWizardByName()?.wizContext;\n }\n\n private resolveWizardByName(): any {\n if (this.nestedWizContext || !this.wizardname) {\n return undefined;\n }\n return (this.viewParent as any)?.Widgets?.[this.wizardname];\n }\n\n get steps(): any[] {\n return this.wizContext?.steps || [];\n }\n\n get wizardClass(): string {\n return this.wizContext?.getWizardClass?.() || '';\n }\n\n // The stepper's own authored stepstyle wins; unset falls back to the wizard's.\n get stepClass(): string {\n if (this.stepstyle) {\n return this.stepstyle === 'justified' ? 'nav-justified' : '';\n }\n return this.wizContext?.getStepClass?.() || '';\n }\n\n get showWizardStepIcons(): boolean {\n return this.wizContext?.showWizardStepIcons?.() ?? false;\n }\n\n get isTabStepperWizard(): boolean {\n return this.wizContext?.isTabStepperWizard?.() ?? false;\n }\n\n onStepClick(event: Event, step: any) {\n this.wizContext?.onHeaderClick?.(event, step);\n }\n\n onKeyDown(event: KeyboardEvent) {\n this.wizContext?.onHeaderKeyDown?.(event);\n }\n\n shouldRenderWizardStepNumberSpan(step: any): boolean {\n return this.wizContext?.shouldRenderStepNumberSpan?.(step) ?? true;\n }\n\n shouldShowPrimaryStepIcon(step: any): boolean {\n return this.wizContext?.shouldShowPrimaryStepIcon?.(step) ?? false;\n }\n\n hasNonEmptyDoneIconClass(step: any): boolean {\n return this.wizContext?.hasNonEmptyDoneIconClass?.(step) ?? false;\n }\n\n stepIconClassOrDefault(step: any): string {\n return this.wizContext?.stepIconClassOrDefault?.(step) ?? 'wi wi-person';\n }\n\n readMoreSubtitle() {\n this.wizContext?.readMoreSubtitle?.();\n }\n}\n","@if (wizContext) {\n <ul class=\"app-wizard-steps nav nav-pills {{stepClass}}\">\n @for (step of steps; track step; let i = $index) {\n <li class=\"app-wizard-step\" [hidden]=\"!step.show\"\n [ngClass]=\"{finished: step.done, active: step.active, default: step.disabled}\"\n (click)=\"onStepClick($event, step)\" [attr.data-stepid]=\"step.widgetId\">\n <a href=\"javascript:void(0)\" [attr.aria-current]=\"step.active ? 'step' : null\"\n [attr.aria-disabled]=\"step.disabled\" [attr.aria-label]='step.subtitle ? \"step \" + (i + 1) + \" \" + step.title + \" \" + step.subtitle : \"step \" + (i + 1) + \" \" + step.title' [attr.title]= \"step.title\"\n [ngClass]=\"{'title-center-align':wizardClass && wizardClass.includes('classic') && !step.subtitle}\" [tabindex]=\"step.active ? '0' : '-1'\" (keydown)=\"onKeyDown($event)\">\n @if (wizardClass && wizardClass.includes('classic')) {\n <span class=\"arrow\"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class=\"wizard-step-number\">\n @if (wizardClass && wizardClass.includes('number') && !step.isDone && !showWizardStepIcons) {\n <span class=\"count\">{{i+1}}</span>\n }\n @if (wizardClass && (wizardClass.includes('dottedstepper') || wizardClass.includes('text-inline') && !showWizardStepIcons) && !step.isDone) {\n <i class=\"dottedstepper\"></i>\n }\n @if (wizardClass && (wizardClass.includes('dottedstepper') || wizardClass.includes('number')) && step.isDone) {\n <i class=\"app-icon wi wi-done\"></i>\n }\n @if (shouldShowPrimaryStepIcon(step)) {\n <wm-app-icon [iconclass]=\"stepIconClassOrDefault(step)\" [iconurl]=\"step.iconurl\"></wm-app-icon>\n }\n @if (showWizardStepIcons && step.isDone && hasNonEmptyDoneIconClass(step)) {\n <wm-app-icon [iconclass]=\"step.doneiconclass\" [iconurl]=\"step.doneiconurl\"></wm-app-icon>\n }\n </span>\n }\n <span class=\"title-wrapper\">\n @if (wizardClass && wizardClass.includes('text-inline')) {\n <span>{{'0' + (i+1)}}</span>\n }\n <span class=\"step-title\" [textContent]=\"step.title\"></span>\n </span>\n @if (step.subtitle) {\n <span class=\"subtitle-wrapper\" [attr.title]=\"step.subtitle\">\n <span class=\"step-title\" [textContent]=\"step.subtitle\"></span>\n <a class=\"read_more\" (click)=\"readMoreSubtitle()\" style=\"display:none\">more</a>\n </span>\n }\n </a>\n </li>\n }\n </ul>\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wm/components/containers/wizardstepper",
|
|
3
|
+
"sideEffects": false,
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"tslib": "^2.0.0"
|
|
6
|
+
},
|
|
7
|
+
"module": "fesm2022/index.mjs",
|
|
8
|
+
"typings": "types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
"./package.json": {
|
|
11
|
+
"default": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./types/index.d.ts",
|
|
15
|
+
"default": "./fesm2022/index.mjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"type": "module"
|
|
19
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { StylableComponent } from "@wm/components/base";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Injector } from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Standalone wizard-header widget, extracted from the wizard's inline header.
|
|
6
|
+
*
|
|
7
|
+
* Association seam #1 (nested): an ancestor `WizardComponent` provides a shared `Context`
|
|
8
|
+
* object (`wizContext`) via its own `providers` array. This component injects that SAME
|
|
9
|
+
* token WITHOUT `@Self()` so it resolves the nearest ancestor wizard's context when nested —
|
|
10
|
+
* this mirrors the existing wizard-action seam and avoids a circular package dependency
|
|
11
|
+
* between `@wm/components/containers/wizardstepper` and `@wm/components/containers/wizard`
|
|
12
|
+
* (neither package imports the other's component class).
|
|
13
|
+
*
|
|
14
|
+
* Association seam #2 (standalone-by-reference, 002-stepper-header-widget US2): when there is
|
|
15
|
+
* no ancestor wizard, `wizardname` is resolved against `viewParent.Widgets[wizardname]` — the
|
|
16
|
+
* same page-level widget registry every named widget registers into (see
|
|
17
|
+
* `@wm/components/base`'s `widget-registry.ts`). The wizard's `wizContext` object is read off
|
|
18
|
+
* that resolved instance directly; because this happens in a getter (re-evaluated on every
|
|
19
|
+
* template read), it is immune to component-construction-order races between the header and
|
|
20
|
+
* its wizard — including the wizard's OWN registration into `Widgets` being deliberately
|
|
21
|
+
* deferred to its `ngAfterContentInit` (see `wizard.component.ts`'s `initPromise`). The wizard's
|
|
22
|
+
* own `hasExternalHeader` getter does the mirror-image scan to distinguish an externally-bound
|
|
23
|
+
* header from its own nested one — see `wizard.component.ts` for why that is ALSO a stateless
|
|
24
|
+
* read-time scan rather than an imperative register/unregister call.
|
|
25
|
+
*/
|
|
26
|
+
export declare class WizardStepperComponent extends StylableComponent {
|
|
27
|
+
static initializeProps: void;
|
|
28
|
+
class: any;
|
|
29
|
+
name: any;
|
|
30
|
+
show: any;
|
|
31
|
+
stepstyle: any;
|
|
32
|
+
tabindex: any;
|
|
33
|
+
wizardname: any;
|
|
34
|
+
private readonly nestedWizContext;
|
|
35
|
+
constructor(inj: Injector, contexts: Array<any>, explicitContext: any);
|
|
36
|
+
ngOnInit(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Whether this header is nested inside an ancestor `wm-wizard` (as opposed to a
|
|
39
|
+
* standalone-by-reference header elsewhere on the page, associated only via `wizardname`).
|
|
40
|
+
* Mirrors `wavemaker-react-runtime`'s `WmWizardstepper`, which computes
|
|
41
|
+
* `isNested = !!context` (a React context provided by the ancestor wizard) and applies
|
|
42
|
+
* `app-wizard-heading` only in that case.
|
|
43
|
+
*/
|
|
44
|
+
get isNested(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Legacy accessibility parity: the pre-002 auto-embedded header markup rendered
|
|
47
|
+
* `<div class="app-wizard-heading" role="tab">` for a nested header. A standalone-by-
|
|
48
|
+
* reference header has no such role, since it never was the wizard's own inline markup.
|
|
49
|
+
*/
|
|
50
|
+
get role(): string | null;
|
|
51
|
+
get wizContext(): any;
|
|
52
|
+
private resolveWizardByName;
|
|
53
|
+
get steps(): any[];
|
|
54
|
+
get wizardClass(): string;
|
|
55
|
+
get stepClass(): string;
|
|
56
|
+
get showWizardStepIcons(): boolean;
|
|
57
|
+
get isTabStepperWizard(): boolean;
|
|
58
|
+
onStepClick(event: Event, step: any): void;
|
|
59
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
60
|
+
shouldRenderWizardStepNumberSpan(step: any): boolean;
|
|
61
|
+
shouldShowPrimaryStepIcon(step: any): boolean;
|
|
62
|
+
hasNonEmptyDoneIconClass(step: any): boolean;
|
|
63
|
+
stepIconClassOrDefault(step: any): string;
|
|
64
|
+
readMoreSubtitle(): void;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WizardStepperComponent, [null, {
|
|
66
|
+
optional: true;
|
|
67
|
+
}, {
|
|
68
|
+
optional: true;
|
|
69
|
+
}]>;
|
|
70
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WizardStepperComponent, "div[wmWizardStepper]", ["wmWizardStepper"], {}, {}, never, never, true, never>;
|
|
71
|
+
}
|
|
@@ -449,6 +449,10 @@
|
|
|
449
449
|
else this.selectItem(items);
|
|
450
450
|
i1$1.$appDigest();
|
|
451
451
|
}
|
|
452
|
+
get item() {
|
|
453
|
+
if (lodashEs.isEmpty(this._items)) return {};
|
|
454
|
+
return lodashEs.last(this._items);
|
|
455
|
+
}
|
|
452
456
|
getWidgets(widgteName, index) {
|
|
453
457
|
let $target;
|
|
454
458
|
const retVal = [];
|
|
@@ -435,6 +435,10 @@ let ListComponent = class ListComponent extends StylableComponent {
|
|
|
435
435
|
else this.selectItem(items);
|
|
436
436
|
$appDigest();
|
|
437
437
|
}
|
|
438
|
+
get item() {
|
|
439
|
+
if (isEmpty(this._items)) return {};
|
|
440
|
+
return last(this._items);
|
|
441
|
+
}
|
|
438
442
|
getWidgets(widgteName, index) {
|
|
439
443
|
let $target;
|
|
440
444
|
const retVal = [];
|