aw-wizard-forms 4.12.0 → 4.13.0
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/dist/wizard-form.esm.js
CHANGED
|
@@ -1504,6 +1504,7 @@ let WizardForm = class extends i {
|
|
|
1504
1504
|
this.autoAdvance = true;
|
|
1505
1505
|
this.hideBack = true;
|
|
1506
1506
|
this.submitOnStep = false;
|
|
1507
|
+
this.noAutofocus = false;
|
|
1507
1508
|
this._steps = [];
|
|
1508
1509
|
this._currentStep = 1;
|
|
1509
1510
|
this._totalSteps = 0;
|
|
@@ -1677,6 +1678,7 @@ let WizardForm = class extends i {
|
|
|
1677
1678
|
}
|
|
1678
1679
|
this._steps.forEach((step, index) => {
|
|
1679
1680
|
step.step = index + 1;
|
|
1681
|
+
step.noAutofocus = this.noAutofocus;
|
|
1680
1682
|
});
|
|
1681
1683
|
this._totalSteps = this._steps.length;
|
|
1682
1684
|
this._stateController.setTotalSteps(this._totalSteps);
|
|
@@ -2115,6 +2117,9 @@ __decorateClass$g([
|
|
|
2115
2117
|
__decorateClass$g([
|
|
2116
2118
|
n2({ type: Boolean, attribute: "submit-on-step" })
|
|
2117
2119
|
], WizardForm.prototype, "submitOnStep", 2);
|
|
2120
|
+
__decorateClass$g([
|
|
2121
|
+
n2({ type: Boolean, attribute: "no-autofocus" })
|
|
2122
|
+
], WizardForm.prototype, "noAutofocus", 2);
|
|
2118
2123
|
__decorateClass$g([
|
|
2119
2124
|
r()
|
|
2120
2125
|
], WizardForm.prototype, "_steps", 2);
|
|
@@ -2233,6 +2238,7 @@ let WfStep = class extends i {
|
|
|
2233
2238
|
this.direction = "forward";
|
|
2234
2239
|
this.leaving = false;
|
|
2235
2240
|
this.skipIf = "";
|
|
2241
|
+
this.noAutofocus = false;
|
|
2236
2242
|
this._fields = [];
|
|
2237
2243
|
}
|
|
2238
2244
|
render() {
|
|
@@ -2275,6 +2281,9 @@ let WfStep = class extends i {
|
|
|
2275
2281
|
* Focus the first focusable field in this step
|
|
2276
2282
|
*/
|
|
2277
2283
|
_focusFirstField() {
|
|
2284
|
+
if (this.noAutofocus) {
|
|
2285
|
+
return;
|
|
2286
|
+
}
|
|
2278
2287
|
requestAnimationFrame(() => {
|
|
2279
2288
|
for (const el of this.children) {
|
|
2280
2289
|
const focusable = this._findFocusable(el);
|
|
@@ -2423,6 +2432,9 @@ __decorateClass$f([
|
|
|
2423
2432
|
__decorateClass$f([
|
|
2424
2433
|
n2({ type: String, attribute: "data-skip-if" })
|
|
2425
2434
|
], WfStep.prototype, "skipIf", 2);
|
|
2435
|
+
__decorateClass$f([
|
|
2436
|
+
n2({ type: Boolean, attribute: "no-autofocus" })
|
|
2437
|
+
], WfStep.prototype, "noAutofocus", 2);
|
|
2426
2438
|
__decorateClass$f([
|
|
2427
2439
|
r()
|
|
2428
2440
|
], WfStep.prototype, "_fields", 2);
|