@rpg-engine/long-bow 0.6.7 → 0.6.8
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/components/Stepper.d.ts +3 -0
- package/dist/long-bow.cjs.development.js +386 -9
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +386 -9
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Stepper.tsx +33 -3
package/dist/long-bow.esm.js
CHANGED
|
@@ -136,6 +136,337 @@ var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
|
|
|
136
136
|
return props.opensUp ? 'auto' : '100%';
|
|
137
137
|
});
|
|
138
138
|
|
|
139
|
+
function _regeneratorRuntime() {
|
|
140
|
+
_regeneratorRuntime = function () {
|
|
141
|
+
return exports;
|
|
142
|
+
};
|
|
143
|
+
var exports = {},
|
|
144
|
+
Op = Object.prototype,
|
|
145
|
+
hasOwn = Op.hasOwnProperty,
|
|
146
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
147
|
+
obj[key] = desc.value;
|
|
148
|
+
},
|
|
149
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
150
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
151
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
152
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
153
|
+
function define(obj, key, value) {
|
|
154
|
+
return Object.defineProperty(obj, key, {
|
|
155
|
+
value: value,
|
|
156
|
+
enumerable: !0,
|
|
157
|
+
configurable: !0,
|
|
158
|
+
writable: !0
|
|
159
|
+
}), obj[key];
|
|
160
|
+
}
|
|
161
|
+
try {
|
|
162
|
+
define({}, "");
|
|
163
|
+
} catch (err) {
|
|
164
|
+
define = function (obj, key, value) {
|
|
165
|
+
return obj[key] = value;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
169
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
170
|
+
generator = Object.create(protoGenerator.prototype),
|
|
171
|
+
context = new Context(tryLocsList || []);
|
|
172
|
+
return defineProperty(generator, "_invoke", {
|
|
173
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
174
|
+
}), generator;
|
|
175
|
+
}
|
|
176
|
+
function tryCatch(fn, obj, arg) {
|
|
177
|
+
try {
|
|
178
|
+
return {
|
|
179
|
+
type: "normal",
|
|
180
|
+
arg: fn.call(obj, arg)
|
|
181
|
+
};
|
|
182
|
+
} catch (err) {
|
|
183
|
+
return {
|
|
184
|
+
type: "throw",
|
|
185
|
+
arg: err
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
exports.wrap = wrap;
|
|
190
|
+
var ContinueSentinel = {};
|
|
191
|
+
function Generator() {}
|
|
192
|
+
function GeneratorFunction() {}
|
|
193
|
+
function GeneratorFunctionPrototype() {}
|
|
194
|
+
var IteratorPrototype = {};
|
|
195
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
196
|
+
return this;
|
|
197
|
+
});
|
|
198
|
+
var getProto = Object.getPrototypeOf,
|
|
199
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
200
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
201
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
202
|
+
function defineIteratorMethods(prototype) {
|
|
203
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
204
|
+
define(prototype, method, function (arg) {
|
|
205
|
+
return this._invoke(method, arg);
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
210
|
+
function invoke(method, arg, resolve, reject) {
|
|
211
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
212
|
+
if ("throw" !== record.type) {
|
|
213
|
+
var result = record.arg,
|
|
214
|
+
value = result.value;
|
|
215
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
216
|
+
invoke("next", value, resolve, reject);
|
|
217
|
+
}, function (err) {
|
|
218
|
+
invoke("throw", err, resolve, reject);
|
|
219
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
220
|
+
result.value = unwrapped, resolve(result);
|
|
221
|
+
}, function (error) {
|
|
222
|
+
return invoke("throw", error, resolve, reject);
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
reject(record.arg);
|
|
226
|
+
}
|
|
227
|
+
var previousPromise;
|
|
228
|
+
defineProperty(this, "_invoke", {
|
|
229
|
+
value: function (method, arg) {
|
|
230
|
+
function callInvokeWithMethodAndArg() {
|
|
231
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
232
|
+
invoke(method, arg, resolve, reject);
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
240
|
+
var state = "suspendedStart";
|
|
241
|
+
return function (method, arg) {
|
|
242
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
243
|
+
if ("completed" === state) {
|
|
244
|
+
if ("throw" === method) throw arg;
|
|
245
|
+
return doneResult();
|
|
246
|
+
}
|
|
247
|
+
for (context.method = method, context.arg = arg;;) {
|
|
248
|
+
var delegate = context.delegate;
|
|
249
|
+
if (delegate) {
|
|
250
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
251
|
+
if (delegateResult) {
|
|
252
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
253
|
+
return delegateResult;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
257
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
258
|
+
context.dispatchException(context.arg);
|
|
259
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
260
|
+
state = "executing";
|
|
261
|
+
var record = tryCatch(innerFn, self, context);
|
|
262
|
+
if ("normal" === record.type) {
|
|
263
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
264
|
+
return {
|
|
265
|
+
value: record.arg,
|
|
266
|
+
done: context.done
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
274
|
+
var methodName = context.method,
|
|
275
|
+
method = delegate.iterator[methodName];
|
|
276
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
277
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
278
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
279
|
+
var info = record.arg;
|
|
280
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
281
|
+
}
|
|
282
|
+
function pushTryEntry(locs) {
|
|
283
|
+
var entry = {
|
|
284
|
+
tryLoc: locs[0]
|
|
285
|
+
};
|
|
286
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
287
|
+
}
|
|
288
|
+
function resetTryEntry(entry) {
|
|
289
|
+
var record = entry.completion || {};
|
|
290
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
291
|
+
}
|
|
292
|
+
function Context(tryLocsList) {
|
|
293
|
+
this.tryEntries = [{
|
|
294
|
+
tryLoc: "root"
|
|
295
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
296
|
+
}
|
|
297
|
+
function values(iterable) {
|
|
298
|
+
if (iterable) {
|
|
299
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
300
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
301
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
302
|
+
if (!isNaN(iterable.length)) {
|
|
303
|
+
var i = -1,
|
|
304
|
+
next = function next() {
|
|
305
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
306
|
+
return next.value = undefined, next.done = !0, next;
|
|
307
|
+
};
|
|
308
|
+
return next.next = next;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return {
|
|
312
|
+
next: doneResult
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
function doneResult() {
|
|
316
|
+
return {
|
|
317
|
+
value: undefined,
|
|
318
|
+
done: !0
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
322
|
+
value: GeneratorFunctionPrototype,
|
|
323
|
+
configurable: !0
|
|
324
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
325
|
+
value: GeneratorFunction,
|
|
326
|
+
configurable: !0
|
|
327
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
328
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
329
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
330
|
+
}, exports.mark = function (genFun) {
|
|
331
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
332
|
+
}, exports.awrap = function (arg) {
|
|
333
|
+
return {
|
|
334
|
+
__await: arg
|
|
335
|
+
};
|
|
336
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
337
|
+
return this;
|
|
338
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
339
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
340
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
341
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
342
|
+
return result.done ? result.value : iter.next();
|
|
343
|
+
});
|
|
344
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
345
|
+
return this;
|
|
346
|
+
}), define(Gp, "toString", function () {
|
|
347
|
+
return "[object Generator]";
|
|
348
|
+
}), exports.keys = function (val) {
|
|
349
|
+
var object = Object(val),
|
|
350
|
+
keys = [];
|
|
351
|
+
for (var key in object) keys.push(key);
|
|
352
|
+
return keys.reverse(), function next() {
|
|
353
|
+
for (; keys.length;) {
|
|
354
|
+
var key = keys.pop();
|
|
355
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
356
|
+
}
|
|
357
|
+
return next.done = !0, next;
|
|
358
|
+
};
|
|
359
|
+
}, exports.values = values, Context.prototype = {
|
|
360
|
+
constructor: Context,
|
|
361
|
+
reset: function (skipTempReset) {
|
|
362
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
363
|
+
},
|
|
364
|
+
stop: function () {
|
|
365
|
+
this.done = !0;
|
|
366
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
367
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
368
|
+
return this.rval;
|
|
369
|
+
},
|
|
370
|
+
dispatchException: function (exception) {
|
|
371
|
+
if (this.done) throw exception;
|
|
372
|
+
var context = this;
|
|
373
|
+
function handle(loc, caught) {
|
|
374
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
375
|
+
}
|
|
376
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
377
|
+
var entry = this.tryEntries[i],
|
|
378
|
+
record = entry.completion;
|
|
379
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
380
|
+
if (entry.tryLoc <= this.prev) {
|
|
381
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
382
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
383
|
+
if (hasCatch && hasFinally) {
|
|
384
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
385
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
386
|
+
} else if (hasCatch) {
|
|
387
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
388
|
+
} else {
|
|
389
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
390
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
abrupt: function (type, arg) {
|
|
396
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
397
|
+
var entry = this.tryEntries[i];
|
|
398
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
399
|
+
var finallyEntry = entry;
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
404
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
405
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
406
|
+
},
|
|
407
|
+
complete: function (record, afterLoc) {
|
|
408
|
+
if ("throw" === record.type) throw record.arg;
|
|
409
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
410
|
+
},
|
|
411
|
+
finish: function (finallyLoc) {
|
|
412
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
413
|
+
var entry = this.tryEntries[i];
|
|
414
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
catch: function (tryLoc) {
|
|
418
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
419
|
+
var entry = this.tryEntries[i];
|
|
420
|
+
if (entry.tryLoc === tryLoc) {
|
|
421
|
+
var record = entry.completion;
|
|
422
|
+
if ("throw" === record.type) {
|
|
423
|
+
var thrown = record.arg;
|
|
424
|
+
resetTryEntry(entry);
|
|
425
|
+
}
|
|
426
|
+
return thrown;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
throw new Error("illegal catch attempt");
|
|
430
|
+
},
|
|
431
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
432
|
+
return this.delegate = {
|
|
433
|
+
iterator: values(iterable),
|
|
434
|
+
resultName: resultName,
|
|
435
|
+
nextLoc: nextLoc
|
|
436
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
437
|
+
}
|
|
438
|
+
}, exports;
|
|
439
|
+
}
|
|
440
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
441
|
+
try {
|
|
442
|
+
var info = gen[key](arg);
|
|
443
|
+
var value = info.value;
|
|
444
|
+
} catch (error) {
|
|
445
|
+
reject(error);
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
if (info.done) {
|
|
449
|
+
resolve(value);
|
|
450
|
+
} else {
|
|
451
|
+
Promise.resolve(value).then(_next, _throw);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
function _asyncToGenerator(fn) {
|
|
455
|
+
return function () {
|
|
456
|
+
var self = this,
|
|
457
|
+
args = arguments;
|
|
458
|
+
return new Promise(function (resolve, reject) {
|
|
459
|
+
var gen = fn.apply(self, args);
|
|
460
|
+
function _next(value) {
|
|
461
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
462
|
+
}
|
|
463
|
+
function _throw(err) {
|
|
464
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
465
|
+
}
|
|
466
|
+
_next(undefined);
|
|
467
|
+
});
|
|
468
|
+
};
|
|
469
|
+
}
|
|
139
470
|
function _extends() {
|
|
140
471
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
141
472
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -19118,15 +19449,61 @@ var SpellList = /*#__PURE__*/styled.div.withConfig({
|
|
|
19118
19449
|
var Stepper = function Stepper(_ref) {
|
|
19119
19450
|
var _steps$currentStep;
|
|
19120
19451
|
var steps = _ref.steps,
|
|
19121
|
-
finalCTAButton = _ref.finalCTAButton
|
|
19452
|
+
finalCTAButton = _ref.finalCTAButton,
|
|
19453
|
+
onError = _ref.onError;
|
|
19122
19454
|
var _useState = useState(0),
|
|
19123
19455
|
currentStep = _useState[0],
|
|
19124
19456
|
setCurrentStep = _useState[1];
|
|
19125
19457
|
var currentComponent = (_steps$currentStep = steps[currentStep]) == null ? void 0 : _steps$currentStep.component;
|
|
19126
19458
|
var totalSteps = steps.length;
|
|
19127
|
-
var onStepChange = function
|
|
19128
|
-
|
|
19129
|
-
|
|
19459
|
+
var onStepChange = /*#__PURE__*/function () {
|
|
19460
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(step) {
|
|
19461
|
+
var _steps$currentStep2;
|
|
19462
|
+
var isValid;
|
|
19463
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19464
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19465
|
+
case 0:
|
|
19466
|
+
if (!((_steps$currentStep2 = steps[currentStep]) != null && _steps$currentStep2.validate)) {
|
|
19467
|
+
_context.next = 14;
|
|
19468
|
+
break;
|
|
19469
|
+
}
|
|
19470
|
+
_context.prev = 1;
|
|
19471
|
+
_context.next = 4;
|
|
19472
|
+
return steps[currentStep].validate();
|
|
19473
|
+
case 4:
|
|
19474
|
+
isValid = _context.sent;
|
|
19475
|
+
if (isValid) {
|
|
19476
|
+
_context.next = 8;
|
|
19477
|
+
break;
|
|
19478
|
+
}
|
|
19479
|
+
// If the current step is not valid, prevent navigation and trigger onError
|
|
19480
|
+
if (onError) {
|
|
19481
|
+
onError(steps[currentStep].errorMessage || "Validation failed on step " + (currentStep + 1));
|
|
19482
|
+
}
|
|
19483
|
+
return _context.abrupt("return");
|
|
19484
|
+
case 8:
|
|
19485
|
+
_context.next = 14;
|
|
19486
|
+
break;
|
|
19487
|
+
case 10:
|
|
19488
|
+
_context.prev = 10;
|
|
19489
|
+
_context.t0 = _context["catch"](1);
|
|
19490
|
+
// Handle unexpected validation errors
|
|
19491
|
+
if (onError) {
|
|
19492
|
+
onError("An error occurred during validation on step " + (currentStep + 1));
|
|
19493
|
+
}
|
|
19494
|
+
return _context.abrupt("return");
|
|
19495
|
+
case 14:
|
|
19496
|
+
setCurrentStep(step);
|
|
19497
|
+
case 15:
|
|
19498
|
+
case "end":
|
|
19499
|
+
return _context.stop();
|
|
19500
|
+
}
|
|
19501
|
+
}, _callee, null, [[1, 10]]);
|
|
19502
|
+
}));
|
|
19503
|
+
return function onStepChange(_x) {
|
|
19504
|
+
return _ref2.apply(this, arguments);
|
|
19505
|
+
};
|
|
19506
|
+
}();
|
|
19130
19507
|
return React.createElement(StepperContainer, {
|
|
19131
19508
|
className: "stepper-container"
|
|
19132
19509
|
}, React.createElement(StepperTop, null, Array.from({
|
|
@@ -19151,7 +19528,7 @@ var Stepper = function Stepper(_ref) {
|
|
|
19151
19528
|
}
|
|
19152
19529
|
}), currentStep === totalSteps - 1 && finalCTAButton && React.createElement(Button, {
|
|
19153
19530
|
buttonType: ButtonTypes.RPGUIButton,
|
|
19154
|
-
|
|
19531
|
+
onClick: finalCTAButton.onClick
|
|
19155
19532
|
}, finalCTAButton.label)));
|
|
19156
19533
|
};
|
|
19157
19534
|
var StepperContainer = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -19173,11 +19550,11 @@ var StepperFooter = /*#__PURE__*/styled.div.withConfig({
|
|
|
19173
19550
|
var ProgressIndicator = /*#__PURE__*/styled.div.withConfig({
|
|
19174
19551
|
displayName: "Stepper__ProgressIndicator",
|
|
19175
19552
|
componentId: "sc-13obf1-4"
|
|
19176
|
-
})(["width:20px;height:20px;border-radius:50%;background-color:", ";margin:0 5px;transition:background-color 0.3s;opacity:", ";border:1px solid ", ";cursor:pointer;"], function (
|
|
19177
|
-
var isActive = _ref2.isActive;
|
|
19178
|
-
return isActive ? uiColors.orange : uiColors.lightGray;
|
|
19179
|
-
}, function (_ref3) {
|
|
19553
|
+
})(["width:20px;height:20px;border-radius:50%;background-color:", ";margin:0 5px;transition:background-color 0.3s;opacity:", ";border:1px solid ", ";cursor:pointer;"], function (_ref3) {
|
|
19180
19554
|
var isActive = _ref3.isActive;
|
|
19555
|
+
return isActive ? uiColors.orange : uiColors.lightGray;
|
|
19556
|
+
}, function (_ref4) {
|
|
19557
|
+
var isActive = _ref4.isActive;
|
|
19181
19558
|
return isActive ? 1 : 0.25;
|
|
19182
19559
|
}, uiColors.raisinBlack);
|
|
19183
19560
|
|