@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
|
@@ -92,12 +92,7 @@
|
|
|
92
92
|
providers: [base.provideAsWidgetRef(AudioComponent)],
|
|
93
93
|
usesInheritance: true,
|
|
94
94
|
ngImport: i0__namespace,
|
|
95
|
-
template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format
|
|
96
|
-
dependencies: [{
|
|
97
|
-
kind: "pipe",
|
|
98
|
-
type: base.TrustAsPipe,
|
|
99
|
-
name: "trustAs"
|
|
100
|
-
}],
|
|
95
|
+
template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format\"\n name=\"wmAudio\" [tabindex]=\"tabindex\">\n <source type=\"audio/mp3\" [src]=\"mp3format\">\n {{audiosupportmessage}}\n</audio>\n",
|
|
101
96
|
changeDetection: i0__namespace.ChangeDetectionStrategy.Eager
|
|
102
97
|
});
|
|
103
98
|
}
|
|
@@ -112,10 +107,9 @@
|
|
|
112
107
|
args: [{
|
|
113
108
|
changeDetection: i0.ChangeDetectionStrategy.Eager,
|
|
114
109
|
standalone: true,
|
|
115
|
-
imports: [base.TrustAsPipe],
|
|
116
110
|
selector: "[wmAudio]",
|
|
117
111
|
providers: [base.provideAsWidgetRef(AudioComponent)],
|
|
118
|
-
template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format
|
|
112
|
+
template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format\"\n name=\"wmAudio\" [tabindex]=\"tabindex\">\n <source type=\"audio/mp3\" [src]=\"mp3format\">\n {{audiosupportmessage}}\n</audio>\n"
|
|
119
113
|
}]
|
|
120
114
|
}],
|
|
121
115
|
ctorParameters: () => [{ type: i0__namespace.Injector }, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { ChangeDetectionStrategy, Component, Inject, Optional } from "@angular/core";
|
|
3
|
-
import { DISPLAY_TYPE, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, StylableComponent,
|
|
3
|
+
import { DISPLAY_TYPE, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, StylableComponent, provideAsWidgetRef, register, styler } from "@wm/components/base";
|
|
4
4
|
const registerProps = () => {
|
|
5
5
|
register("wm-audio", /* @__PURE__ */ new Map([
|
|
6
6
|
["audiopreload", {
|
|
@@ -70,12 +70,7 @@ var AudioComponent = class AudioComponent extends StylableComponent {
|
|
|
70
70
|
providers: [provideAsWidgetRef(AudioComponent)],
|
|
71
71
|
usesInheritance: true,
|
|
72
72
|
ngImport: i0,
|
|
73
|
-
template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format
|
|
74
|
-
dependencies: [{
|
|
75
|
-
kind: "pipe",
|
|
76
|
-
type: TrustAsPipe,
|
|
77
|
-
name: "trustAs"
|
|
78
|
-
}],
|
|
73
|
+
template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format\"\n name=\"wmAudio\" [tabindex]=\"tabindex\">\n <source type=\"audio/mp3\" [src]=\"mp3format\">\n {{audiosupportmessage}}\n</audio>\n",
|
|
79
74
|
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
80
75
|
});
|
|
81
76
|
}
|
|
@@ -90,10 +85,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
90
85
|
args: [{
|
|
91
86
|
changeDetection: ChangeDetectionStrategy.Eager,
|
|
92
87
|
standalone: true,
|
|
93
|
-
imports: [TrustAsPipe],
|
|
94
88
|
selector: "[wmAudio]",
|
|
95
89
|
providers: [provideAsWidgetRef(AudioComponent)],
|
|
96
|
-
template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format
|
|
90
|
+
template: "<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format\"\n name=\"wmAudio\" [tabindex]=\"tabindex\">\n <source type=\"audio/mp3\" [src]=\"mp3format\">\n {{audiosupportmessage}}\n</audio>\n"
|
|
97
91
|
}]
|
|
98
92
|
}],
|
|
99
93
|
ctorParameters: () => [{ type: i0.Injector }, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../projects/components/widgets/basic/audio/src/audio.props.ts","../../../../../projects/components/widgets/basic/audio/src/audio.component.ts","../../../../../projects/components/widgets/basic/audio/src/audio.component.html"],"sourcesContent":["import {PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-audio',\n new Map(\n [\n ['audiopreload', {value: 'none', ...PROP_STRING}],\n ['audiosupportmessage', {value: 'Your browser does not support the audio tag.', ...PROP_STRING}],\n ['autoplay', PROP_BOOLEAN],\n ['class', PROP_STRING],\n ['controls', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['loop', PROP_BOOLEAN],\n ['mp3format', PROP_STRING],\n ['muted', PROP_BOOLEAN],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}]\n ]\n )\n );\n};\n","import {Component, Inject, Injector, Optional, ChangeDetectionStrategy} from '@angular/core';\n\nimport {DISPLAY_TYPE, IWidgetConfig, provideAsWidgetRef, StylableComponent, styler
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../../projects/components/widgets/basic/audio/src/audio.props.ts","../../../../../projects/components/widgets/basic/audio/src/audio.component.ts","../../../../../projects/components/widgets/basic/audio/src/audio.component.html"],"sourcesContent":["import {PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register} from '@wm/components/base';\n\nexport const registerProps = () => {\n register(\n 'wm-audio',\n new Map(\n [\n ['audiopreload', {value: 'none', ...PROP_STRING}],\n ['audiosupportmessage', {value: 'Your browser does not support the audio tag.', ...PROP_STRING}],\n ['autoplay', PROP_BOOLEAN],\n ['class', PROP_STRING],\n ['controls', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['loop', PROP_BOOLEAN],\n ['mp3format', PROP_STRING],\n ['muted', PROP_BOOLEAN],\n ['name', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}]\n ]\n )\n );\n};\n","import {Component, Inject, Injector, Optional, ChangeDetectionStrategy} from '@angular/core';\n\nimport {DISPLAY_TYPE, IWidgetConfig, provideAsWidgetRef, StylableComponent, styler} from '@wm/components/base';\nimport {registerProps} from './audio.props';\n\nconst DEFAULT_CLS = 'app-audio';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-audio',\n hostClass: DEFAULT_CLS,\n displayType: DISPLAY_TYPE.INLINE_BLOCK\n};\n\n@Component({\n changeDetection: ChangeDetectionStrategy.Eager,\n standalone: true,\n selector: '[wmAudio]',\n templateUrl: './audio.component.html',\n providers: [\n provideAsWidgetRef(AudioComponent)\n ]\n})\nexport class AudioComponent extends StylableComponent {\n static readonly initializeProps = registerProps();\n\n public mp3format: string;\n public muted: boolean;\n public controls: boolean;\n public loop: boolean;\n public audiopreload: any;\n public audiosupportmessage: any;\n public autoplay: boolean;\n public hint: string;\n public arialabel: string;\n public tabindex: string;\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n\n styler(this.nativeElement, this);\n }\n\n onPropertyChange(key, nv, ov) {\n if (key === 'tabindex') {\n return\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n}\n","<audio [attr.aria-label]=\"arialabel || 'Audio'\" [attr.hint]=\"hint\" [autoplay]=\"autoplay\"\n [controls]=\"controls\" [loop]=\"loop\" [muted]=\"muted\" [preload]=\"audiopreload\" [src]=\"mp3format\"\n name=\"wmAudio\" [tabindex]=\"tabindex\">\n <source type=\"audio/mp3\" [src]=\"mp3format\">\n {{audiosupportmessage}}\n</audio>\n"],"mappings":";;;AAEA,MAAa,sBAAqB;CAC9B,SACI,4BACA,IAAI,IACA;EACI,CAAC,gBAAgB;GAAC,OAAO;GAAQ,GAAG;EAAW,CAAC;EAChD,CAAC,uBAAuB;GAAC,OAAO;GAAgD,GAAG;EAAW,CAAC;EAC/F,CAAC,YAAY,YAAY;EACzB,CAAC,SAAS,WAAW;EACrB,CAAC,YAAY,YAAY;EACzB,CAAC,QAAQ,WAAW;EACpB,CAAC,aAAa,WAAW;EACzB,CAAC,QAAQ,YAAY;EACrB,CAAC,aAAa,WAAW;EACzB,CAAC,SAAS,YAAY;EACtB,CAAC,QAAQ,WAAW;EACpB,CAAC,QAAQ;GAAC,OAAO;GAAM,GAAG;EAAY,CAAC;EACvC,CAAC,YAAY;GAAC,OAAO;GAAG,GAAG;EAAW,CAAC;CAC1C,CAAA,CACJ;AAET;ACjBA,MAAM,gBAA+B;CACjC,YAAY;CACZ,WAAW;CACX,aAAa,aAAa;AAC7B;AAWD,IAAa,iBAAb,MAAa,uBAAuB,kBAAiB;CACjC;EAAA,KAAA,kBAAkB,cAAa;CAAG;CAalD,YAAY,KAAuD,iBAAoB;EACnF,MAAM,KAAK,eAAe,eAAe;EAEzC,OAAO,KAAK,eAAe,IAAI;CACnC;CAEA,iBAAiB,KAAK,IAAI,IAAE;EACxB,IAAI,QAAQ,YACR;OAEA,MAAM,iBAAiB,KAAK,IAAI,EAAE;CAE1C;CA1BS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAc,MAAA,CAAA,EAAA,OAAA,GAAA,SAAA,GAAA;IAAA,OAcY;IAAkB,UAAA;GAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAd5C;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAc,cAAA;GAAA,UAAA;GAAA,WAJZ,CACP,mBAAmB,cAAc,CACpC;GAAA,iBAAA;GAAA,UAAA;GAAA,UCnBL;GAMA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;ADea,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAT1B,MAAA;EACoB,MAAA,CAAA;GAAA,iBAAA,wBAAwB;GAAK,YAClC;GAAI,UACN;GAAW,WAEV,CACP,mBAAkB,cAAA,CACrB;GAAA,UAAA;EAAA,CAAA;;;;;GAgB2B,MAAA;GAAO,MAAA,CAAA,kBAAkB;E,KAAG,MAAA,S"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@wm/components/base'), require('@angular/core'), require('@wm/core'), require('@angular/forms'), require('lodash-es')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@wm/components/base', '@angular/core', '@wm/core', '@angular/forms', 'lodash-es'], 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.wizard = {}), global.ng.common, global.wm.components.base, global.ng.core, global.wm.core, global.ng.forms, global._));
|
|
5
|
-
})(this, (function (exports, i2, base, i0, i1, i1$1, lodashEs) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@wm/components/base'), require('@angular/core'), require('@wm/core'), require('@wm/components/containers/wizardstepper'), require('@angular/forms'), require('lodash-es')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@wm/components/base', '@angular/core', '@wm/core', '@wm/components/containers/wizardstepper', '@angular/forms', 'lodash-es'], 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.wizard = {}), global.ng.common, global.wm.components.base, global.ng.core, global.wm.core, global.wm.components.containers.wizardstepper, global.ng.forms, global._));
|
|
5
|
+
})(this, (function (exports, i2, base, i0, i1, wizardstepper, i1$1, lodashEs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
var n = Object.create(null);
|
|
@@ -131,6 +131,9 @@
|
|
|
131
131
|
get currentClass() {
|
|
132
132
|
return !this.isPrism && this.active;
|
|
133
133
|
}
|
|
134
|
+
get isHidden() {
|
|
135
|
+
return !this.active || this.show === false;
|
|
136
|
+
}
|
|
134
137
|
get isCurrent() {
|
|
135
138
|
return this.active;
|
|
136
139
|
}
|
|
@@ -268,7 +271,8 @@
|
|
|
268
271
|
selector: "form[wmWizardStep]",
|
|
269
272
|
host: { properties: {
|
|
270
273
|
"class.active": "this.activeClass",
|
|
271
|
-
"class.current": "this.currentClass"
|
|
274
|
+
"class.current": "this.currentClass",
|
|
275
|
+
"hidden": "this.isHidden"
|
|
272
276
|
} },
|
|
273
277
|
providers: [base.provideAsWidgetRef(WizardStepComponent), i1$1.NgForm],
|
|
274
278
|
queries: [{
|
|
@@ -327,6 +331,10 @@
|
|
|
327
331
|
currentClass: [{
|
|
328
332
|
type: i0.HostBinding,
|
|
329
333
|
args: ["class.current"]
|
|
334
|
+
}],
|
|
335
|
+
isHidden: [{
|
|
336
|
+
type: i0.HostBinding,
|
|
337
|
+
args: ["hidden"]
|
|
330
338
|
}]
|
|
331
339
|
}
|
|
332
340
|
});
|
|
@@ -357,9 +365,13 @@
|
|
|
357
365
|
return this.enablenext ? true : this.currentStep.enableNext && this.currentStep.isValid;
|
|
358
366
|
}
|
|
359
367
|
wizardHostClassString() {
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
|
|
368
|
+
const header = this.explicitHeader || this.resolveStandaloneHeader();
|
|
369
|
+
return header && typeof header.class === "string" ? header.class : "";
|
|
370
|
+
}
|
|
371
|
+
resolveStandaloneHeader() {
|
|
372
|
+
const widgets = this.viewParent?.Widgets;
|
|
373
|
+
if (!widgets) return;
|
|
374
|
+
return Object.keys(widgets).map((key) => widgets[key]).find((w) => w && w.widgetType === "wm-wizardstepper" && w.wizardname === this.name);
|
|
363
375
|
}
|
|
364
376
|
get showWizardStepIcons() {
|
|
365
377
|
const c = this.wizardHostClassString();
|
|
@@ -416,6 +428,7 @@
|
|
|
416
428
|
super(inj, WIDGET_CONFIG, explicitContext, new Promise((res) => resolveFn = res));
|
|
417
429
|
this._isFirstLoad = true;
|
|
418
430
|
this.isPromise = (obj) => obj instanceof Promise || obj !== null && typeof obj === "object" && typeof obj.then === "function" && typeof obj.catch === "function";
|
|
431
|
+
this.nestedHeaderVerticalClassReady = false;
|
|
419
432
|
base.styler(this.nativeElement, this, base.APPLY_STYLES_TYPE.SHELL);
|
|
420
433
|
this.promiseResolverFn = resolveFn;
|
|
421
434
|
this.message = {
|
|
@@ -518,7 +531,7 @@
|
|
|
518
531
|
}
|
|
519
532
|
this.addMoreText();
|
|
520
533
|
}
|
|
521
|
-
|
|
534
|
+
onWizardStepperClick($event, currentStep) {
|
|
522
535
|
if (currentStep.done) {
|
|
523
536
|
this.steps.forEach((step, index) => {
|
|
524
537
|
if (index < this.getStepIndexByRef(currentStep)) {
|
|
@@ -650,7 +663,7 @@
|
|
|
650
663
|
return;
|
|
651
664
|
}
|
|
652
665
|
const gotoStep = this.getStepRefByIndex(gotoStepIndex);
|
|
653
|
-
if (gotoStep?.show) this.
|
|
666
|
+
if (gotoStep?.show) this.onWizardStepperClick(event, gotoStep);
|
|
654
667
|
else console.error("The gotoStep function cannot navigate to hidden steps");
|
|
655
668
|
}
|
|
656
669
|
done() {
|
|
@@ -719,6 +732,10 @@
|
|
|
719
732
|
ngAfterContentInit() {
|
|
720
733
|
super.ngAfterContentInit();
|
|
721
734
|
this.promiseResolverFn();
|
|
735
|
+
Promise.resolve().then(() => {
|
|
736
|
+
this.nestedHeaderVerticalClassReady = true;
|
|
737
|
+
this.syncNestedHeaderVerticalClass();
|
|
738
|
+
});
|
|
722
739
|
this.wizContext.hasNextStep = () => this.hasNextStep;
|
|
723
740
|
this.wizContext.hasPreviousStep = () => this.hasPrevStep;
|
|
724
741
|
this.wizContext.hasNoNextStep = () => this.showDoneBtn;
|
|
@@ -737,12 +754,28 @@
|
|
|
737
754
|
this.wizContext.disableNext = () => !this.enableNext;
|
|
738
755
|
this.wizContext.disablePrevious = () => !this.enablePrev;
|
|
739
756
|
this.wizContext.disableDone = () => !this.enableDone;
|
|
757
|
+
this.wizContext.steps = this.steps;
|
|
758
|
+
this.wizContext.getWizardClass = () => this.wizardHostClassString();
|
|
759
|
+
this.wizContext.getStepClass = () => this.stepClass;
|
|
760
|
+
this.wizContext.onHeaderClick = (event, step) => this.onWizardStepperClick(event, step);
|
|
761
|
+
this.wizContext.onHeaderKeyDown = (event) => this.onkeydown(event);
|
|
762
|
+
this.wizContext.shouldRenderStepNumberSpan = (step) => this.shouldRenderWizardStepNumberSpan(step);
|
|
763
|
+
this.wizContext.shouldShowPrimaryStepIcon = (step) => this.shouldShowPrimaryStepIcon(step);
|
|
764
|
+
this.wizContext.hasNonEmptyDoneIconClass = (step) => this.hasNonEmptyDoneIconClass(step);
|
|
765
|
+
this.wizContext.stepIconClassOrDefault = (step) => this.stepIconClassOrDefault(step);
|
|
766
|
+
this.wizContext.showWizardStepIcons = () => this.showWizardStepIcons;
|
|
767
|
+
this.wizContext.isTabStepperWizard = () => this.isTabStepperWizard;
|
|
768
|
+
this.wizContext.readMoreSubtitle = () => this.readMoreSubtitle();
|
|
740
769
|
this.stepsSubscription = this.steps.changes.subscribe(() => {
|
|
741
770
|
if (this.steps.length > 1 && this.type === "dynamic" && this._isFirstLoad) {
|
|
742
771
|
this.setDefaultStep(this.getStepRefByIndex(this.defaultstepindex));
|
|
743
772
|
this._isFirstLoad = false;
|
|
744
773
|
}
|
|
745
774
|
});
|
|
775
|
+
setTimeout(() => {
|
|
776
|
+
const cdr = this.inj.get(i0.ChangeDetectorRef, null);
|
|
777
|
+
if (cdr && !cdr.destroyed) cdr.detectChanges();
|
|
778
|
+
});
|
|
746
779
|
}
|
|
747
780
|
isSelectableStep(stepRef) {
|
|
748
781
|
return stepRef.show && !stepRef.disabled;
|
|
@@ -815,14 +848,14 @@
|
|
|
815
848
|
event.preventDefault();
|
|
816
849
|
setTimeout(() => {
|
|
817
850
|
const activeElement = this.nativeElement.querySelector("li.active");
|
|
818
|
-
const stepLi = activeElement
|
|
819
|
-
const
|
|
820
|
-
if (stepLi &&
|
|
851
|
+
const stepLi = activeElement?.closest("li[data-stepid]");
|
|
852
|
+
const isInWizardStepper = activeElement?.closest(".app-wizard-heading");
|
|
853
|
+
if (stepLi && isInWizardStepper) {
|
|
821
854
|
const stepId = stepLi.getAttribute("data-stepid");
|
|
822
855
|
const stepIndex = this.steps.toArray().findIndex((step) => step.widgetId === stepId);
|
|
823
856
|
const currentStep = this.steps.toArray()[stepIndex];
|
|
824
857
|
if (currentStep && currentStep !== this.currentStep) {
|
|
825
|
-
this.
|
|
858
|
+
this.onWizardStepperClick(event, currentStep);
|
|
826
859
|
this.nativeElement.querySelectorAll("li[data-stepid]").forEach((el) => {
|
|
827
860
|
el.setAttribute("tabindex", "-1");
|
|
828
861
|
});
|
|
@@ -844,7 +877,7 @@
|
|
|
844
877
|
this.nativeElement.querySelectorAll("li[data-stepid] a").forEach((el) => {
|
|
845
878
|
el.setAttribute("tabindex", "-1");
|
|
846
879
|
});
|
|
847
|
-
stepLi
|
|
880
|
+
stepLi?.setAttribute("tabindex", "0");
|
|
848
881
|
stepLi?.focus();
|
|
849
882
|
}
|
|
850
883
|
}
|
|
@@ -852,6 +885,25 @@
|
|
|
852
885
|
const index = this.steps.toArray().findIndex((step) => this.nativeElement.querySelector(`li[data-stepid="${step.widgetId}"]`)?.classList.contains("active"));
|
|
853
886
|
return index >= 0 ? index : this.getActiveStepIndex();
|
|
854
887
|
}
|
|
888
|
+
get hasExternalHeader() {
|
|
889
|
+
const widgets = this.viewParent?.Widgets;
|
|
890
|
+
if (!widgets) return false;
|
|
891
|
+
const explicitHeaderName = this.explicitHeader?.name;
|
|
892
|
+
return Object.keys(widgets).some((key) => {
|
|
893
|
+
const w = widgets[key];
|
|
894
|
+
return w && (!explicitHeaderName || w.name !== explicitHeaderName) && w.widgetType === "wm-wizardstepper" && w.wizardname === this.name;
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
get isNestedHeaderVertical() {
|
|
898
|
+
if (this.hasExternalHeader) return false;
|
|
899
|
+
return !!(this.explicitHeader?.class)?.includes("wizardstepper-vertical");
|
|
900
|
+
}
|
|
901
|
+
syncNestedHeaderVerticalClass() {
|
|
902
|
+
this.nativeElement.classList.toggle("wizardstepper-vertical", this.isNestedHeaderVertical);
|
|
903
|
+
}
|
|
904
|
+
ngAfterContentChecked() {
|
|
905
|
+
if (this.nestedHeaderVerticalClassReady) this.syncNestedHeaderVerticalClass();
|
|
906
|
+
}
|
|
855
907
|
ngOnDestroy() {
|
|
856
908
|
if (this.stepsSubscription) {
|
|
857
909
|
this.stepsSubscription.unsubscribe();
|
|
@@ -909,61 +961,40 @@
|
|
|
909
961
|
},
|
|
910
962
|
multi: true
|
|
911
963
|
}],
|
|
912
|
-
queries: [
|
|
913
|
-
propertyName: "wizardAction",
|
|
914
|
-
first: true,
|
|
915
|
-
predicate: ["wizardAction"],
|
|
916
|
-
read: i0.TemplateRef
|
|
917
|
-
}, {
|
|
918
|
-
propertyName: "steps",
|
|
919
|
-
predicate: WizardStepComponent
|
|
920
|
-
}],
|
|
921
|
-
exportAs: ["wmWizard"],
|
|
922
|
-
usesInheritance: true,
|
|
923
|
-
ngImport: i0__namespace,
|
|
924
|
-
template: "<div class=\"app-wizard-heading\">\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)=\"onWizardHeaderClick($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':class && class.includes('classic') && !step.subtitle}\" [tabindex]=\"step.active ? '0' : '-1'\" (keydown)=\"onkeydown($event)\">\n @if (class && class.includes('classic')) {\n <span class=\"arrow\"></span>\n }\n @if (shouldRenderWizardStepNumberSpan(step)) {\n <span class=\"wizard-step-number\">\n @if (class && class.includes('number') && !step.isDone && !showWizardStepIcons) {\n <span class=\"count\">{{i+1}}</span>\n }\n @if (class && (class.includes('dottedstepper') || class.includes('text-inline') && !showWizardStepIcons) && !step.isDone) {\n <i class=\"dottedstepper\"></i>\n }\n @if (class && (class.includes('dottedstepper') || class.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 (class && class.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</div>\n@if (type !== 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if (message.caption) {\n <p wmMessage caption.bind=\"message.caption\" type.bind=\"message.type\"></p>\n }\n <ng-content ngProjectAs=\"form[wmWizardStep]\"></ng-content>\n</div>\n}\n@if (type === 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if(!fieldDefs?.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n</div>\n}\n@if(fieldDefs && fieldDefs.length || type !== 'dynamic') {\n <ng-container *ngTemplateOutlet=\"wizardAction\"></ng-container>\n}\n",
|
|
925
|
-
dependencies: [
|
|
926
|
-
{
|
|
927
|
-
kind: "ngmodule",
|
|
928
|
-
type: i2.CommonModule
|
|
929
|
-
},
|
|
930
|
-
{
|
|
931
|
-
kind: "directive",
|
|
932
|
-
type: i2__namespace.NgClass,
|
|
933
|
-
selector: "[ngClass]",
|
|
934
|
-
inputs: ["class", "ngClass"]
|
|
935
|
-
},
|
|
964
|
+
queries: [
|
|
936
965
|
{
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
"ngTemplateOutletContext",
|
|
942
|
-
"ngTemplateOutlet",
|
|
943
|
-
"ngTemplateOutletInjector"
|
|
944
|
-
]
|
|
966
|
+
propertyName: "wizardAction",
|
|
967
|
+
first: true,
|
|
968
|
+
predicate: ["wizardAction"],
|
|
969
|
+
read: i0.TemplateRef
|
|
945
970
|
},
|
|
946
971
|
{
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
inputs: ["textContent"]
|
|
972
|
+
propertyName: "explicitHeader",
|
|
973
|
+
first: true,
|
|
974
|
+
predicate: wizardstepper.WizardStepperComponent
|
|
951
975
|
},
|
|
952
976
|
{
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
selector: "wm-app-icon",
|
|
956
|
-
inputs: [
|
|
957
|
-
"icon",
|
|
958
|
-
"iconclass",
|
|
959
|
-
"iconurl",
|
|
960
|
-
"defaultIconClass",
|
|
961
|
-
"defaultClasses",
|
|
962
|
-
"iconStyle",
|
|
963
|
-
"alt"
|
|
964
|
-
]
|
|
977
|
+
propertyName: "steps",
|
|
978
|
+
predicate: WizardStepComponent
|
|
965
979
|
}
|
|
966
980
|
],
|
|
981
|
+
exportAs: ["wmWizard"],
|
|
982
|
+
usesInheritance: true,
|
|
983
|
+
ngImport: i0__namespace,
|
|
984
|
+
template: "<!--\n 002-stepper-header-widget: the header is the standalone `wm-wizardstepper` widget. The page\n markup authors one explicitly (as a child, same as wm-wizardstep/wm-wizardaction), and it is\n projected here, selectable/movable on canvas like any other widget. See wizard.component.ts\n ngAfterContentInit for the wizContext handshake this component reads from.\n-->\n<ng-content select=\"div[wmWizardStepper]\"></ng-content>\n@if (type !== 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if (message.caption) {\n <p wmMessage caption.bind=\"message.caption\" type.bind=\"message.type\"></p>\n }\n <ng-content ngProjectAs=\"form[wmWizardStep]\"></ng-content>\n</div>\n}\n@if (type === 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if(!fieldDefs?.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n</div>\n}\n@if(fieldDefs && fieldDefs.length || type !== 'dynamic') {\n <ng-container *ngTemplateOutlet=\"wizardAction\"></ng-container>\n}\n",
|
|
985
|
+
dependencies: [{
|
|
986
|
+
kind: "ngmodule",
|
|
987
|
+
type: i2.CommonModule
|
|
988
|
+
}, {
|
|
989
|
+
kind: "directive",
|
|
990
|
+
type: i2__namespace.NgTemplateOutlet,
|
|
991
|
+
selector: "[ngTemplateOutlet]",
|
|
992
|
+
inputs: [
|
|
993
|
+
"ngTemplateOutletContext",
|
|
994
|
+
"ngTemplateOutlet",
|
|
995
|
+
"ngTemplateOutletInjector"
|
|
996
|
+
]
|
|
997
|
+
}],
|
|
967
998
|
changeDetection: i0__namespace.ChangeDetectionStrategy.Eager
|
|
968
999
|
});
|
|
969
1000
|
}
|
|
@@ -981,7 +1012,8 @@
|
|
|
981
1012
|
imports: [
|
|
982
1013
|
i2.CommonModule,
|
|
983
1014
|
base.TextContentDirective,
|
|
984
|
-
base.WmAppIconComponent
|
|
1015
|
+
base.WmAppIconComponent,
|
|
1016
|
+
wizardstepper.WizardStepperComponent
|
|
985
1017
|
],
|
|
986
1018
|
selector: "div[wmWizard]",
|
|
987
1019
|
providers: [base.provideAsWidgetRef(WizardComponent), {
|
|
@@ -992,7 +1024,7 @@
|
|
|
992
1024
|
multi: true
|
|
993
1025
|
}],
|
|
994
1026
|
exportAs: "wmWizard",
|
|
995
|
-
template: "
|
|
1027
|
+
template: "<!--\n 002-stepper-header-widget: the header is the standalone `wm-wizardstepper` widget. The page\n markup authors one explicitly (as a child, same as wm-wizardstep/wm-wizardaction), and it is\n projected here, selectable/movable on canvas like any other widget. See wizard.component.ts\n ngAfterContentInit for the wizContext handshake this component reads from.\n-->\n<ng-content select=\"div[wmWizardStepper]\"></ng-content>\n@if (type !== 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if (message.caption) {\n <p wmMessage caption.bind=\"message.caption\" type.bind=\"message.type\"></p>\n }\n <ng-content ngProjectAs=\"form[wmWizardStep]\"></ng-content>\n</div>\n}\n@if (type === 'dynamic') {\n<div class=\"app-wizard-body panel-body\">\n @if(!fieldDefs?.length) {\n <div>{{nodatamessage}}</div>\n }\n <ng-content select=\"div[wmRepeatTemplate]\"></ng-content>\n</div>\n}\n@if(fieldDefs && fieldDefs.length || type !== 'dynamic') {\n <ng-container *ngTemplateOutlet=\"wizardAction\"></ng-container>\n}\n"
|
|
996
1028
|
}]
|
|
997
1029
|
}],
|
|
998
1030
|
ctorParameters: () => [
|
|
@@ -1024,6 +1056,10 @@
|
|
|
1024
1056
|
read: i0.TemplateRef,
|
|
1025
1057
|
descendants: false
|
|
1026
1058
|
}]
|
|
1059
|
+
}],
|
|
1060
|
+
explicitHeader: [{
|
|
1061
|
+
type: i0.ContentChild,
|
|
1062
|
+
args: [wizardstepper.WizardStepperComponent, { descendants: false }]
|
|
1027
1063
|
}]
|
|
1028
1064
|
}
|
|
1029
1065
|
});
|