@papernote/ui 1.7.3 → 1.7.5
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/FormWizard.d.ts.map +1 -1
- package/dist/index.esm.js +42 -48
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +42 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FormWizard.tsx +6 -4
package/dist/index.js
CHANGED
|
@@ -5388,7 +5388,6 @@ function FormWizard({ steps, onComplete, onStepChange, showStepNumbers = true, a
|
|
|
5388
5388
|
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
5389
5389
|
const isFirstStep = currentStep === 0;
|
|
5390
5390
|
const isLastStep = currentStep === steps.length - 1;
|
|
5391
|
-
const canGoNext = allowSkip || completedSteps.has(currentStep);
|
|
5392
5391
|
// Go to specific step
|
|
5393
5392
|
const goToStep = (stepIndex) => {
|
|
5394
5393
|
if (stepIndex < 0 || stepIndex >= steps.length)
|
|
@@ -5423,8 +5422,11 @@ function FormWizard({ steps, onComplete, onStepChange, showStepNumbers = true, a
|
|
|
5423
5422
|
}
|
|
5424
5423
|
}
|
|
5425
5424
|
else {
|
|
5426
|
-
//
|
|
5427
|
-
|
|
5425
|
+
// Advance to next step directly (don't use goToStep which checks completedSteps
|
|
5426
|
+
// before React has re-rendered with the updated state)
|
|
5427
|
+
const nextStepIndex = currentStep + 1;
|
|
5428
|
+
setCurrentStep(nextStepIndex);
|
|
5429
|
+
onStepChange?.(nextStepIndex);
|
|
5428
5430
|
}
|
|
5429
5431
|
};
|
|
5430
5432
|
// Previous step
|
|
@@ -5460,7 +5462,7 @@ function FormWizard({ steps, onComplete, onStepChange, showStepNumbers = true, a
|
|
|
5460
5462
|
? 'bg-accent-500'
|
|
5461
5463
|
: 'bg-paper-200'}
|
|
5462
5464
|
` }) }))] }, step.id));
|
|
5463
|
-
}) }) }), jsxRuntime.jsx("div", { className: "mb-8", children: steps.map((step, index) => (jsxRuntime.jsx("div", { hidden: index !== currentStep, children: step.content }, step.id))) }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-6 border-t border-paper-200", children: [jsxRuntime.jsx("button", { type: "button", onClick: prevStep, disabled: isFirstStep, className: "px-4 py-2 text-sm font-medium text-ink-700 bg-white border border-paper-300 rounded-lg hover:bg-paper-50 disabled:opacity-40 disabled:cursor-not-allowed transition-all", children: "Previous" }), jsxRuntime.jsxs("div", { className: "text-sm text-ink-600", children: ["Step ", currentStep + 1, " of ", steps.length] }), jsxRuntime.jsx("button", { type: "button", onClick: nextStep, disabled:
|
|
5465
|
+
}) }) }), jsxRuntime.jsx("div", { className: "mb-8", children: steps.map((step, index) => (jsxRuntime.jsx("div", { hidden: index !== currentStep, children: step.content }, step.id))) }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-6 border-t border-paper-200", children: [jsxRuntime.jsx("button", { type: "button", onClick: prevStep, disabled: isFirstStep, className: "px-4 py-2 text-sm font-medium text-ink-700 bg-white border border-paper-300 rounded-lg hover:bg-paper-50 disabled:opacity-40 disabled:cursor-not-allowed transition-all", children: "Previous" }), jsxRuntime.jsxs("div", { className: "text-sm text-ink-600", children: ["Step ", currentStep + 1, " of ", steps.length] }), jsxRuntime.jsx("button", { type: "button", onClick: nextStep, disabled: isSubmitting, className: "px-4 py-2 text-sm font-medium text-white bg-accent-500 rounded-lg hover:bg-accent-600 disabled:opacity-40 disabled:cursor-not-allowed transition-all", children: isSubmitting ? 'Submitting...' : isLastStep ? 'Complete' : 'Next' })] })] }));
|
|
5464
5466
|
}
|
|
5465
5467
|
|
|
5466
5468
|
function InfiniteScroll({ loadMore, hasMore, loading = false, children, threshold = 200, loader, scrollContainer, reverse = false, className = '', }) {
|
|
@@ -10352,52 +10354,44 @@ function getAugmentedNamespace(n) {
|
|
|
10352
10354
|
* (A1, A1:C5, ...)
|
|
10353
10355
|
*/
|
|
10354
10356
|
|
|
10355
|
-
|
|
10356
|
-
var hasRequiredCollection;
|
|
10357
|
-
|
|
10358
|
-
function requireCollection () {
|
|
10359
|
-
if (hasRequiredCollection) return collection;
|
|
10360
|
-
hasRequiredCollection = 1;
|
|
10361
|
-
class Collection {
|
|
10357
|
+
let Collection$3 = class Collection {
|
|
10362
10358
|
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10359
|
+
constructor(data, refs) {
|
|
10360
|
+
if (data == null && refs == null) {
|
|
10361
|
+
this._data = [];
|
|
10362
|
+
this._refs = [];
|
|
10363
|
+
} else {
|
|
10364
|
+
if (data.length !== refs.length)
|
|
10365
|
+
throw Error('Collection: data length should match references length.');
|
|
10366
|
+
this._data = data;
|
|
10367
|
+
this._refs = refs;
|
|
10368
|
+
}
|
|
10369
|
+
}
|
|
10374
10370
|
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10371
|
+
get data() {
|
|
10372
|
+
return this._data;
|
|
10373
|
+
}
|
|
10378
10374
|
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10375
|
+
get refs() {
|
|
10376
|
+
return this._refs;
|
|
10377
|
+
}
|
|
10382
10378
|
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10379
|
+
get length() {
|
|
10380
|
+
return this._data.length;
|
|
10381
|
+
}
|
|
10386
10382
|
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10383
|
+
/**
|
|
10384
|
+
* Add data and references to this collection.
|
|
10385
|
+
* @param {{}} obj - data
|
|
10386
|
+
* @param {{}} ref - reference
|
|
10387
|
+
*/
|
|
10388
|
+
add(obj, ref) {
|
|
10389
|
+
this._data.push(obj);
|
|
10390
|
+
this._refs.push(ref);
|
|
10391
|
+
}
|
|
10392
|
+
};
|
|
10397
10393
|
|
|
10398
|
-
|
|
10399
|
-
return collection;
|
|
10400
|
-
}
|
|
10394
|
+
var collection = Collection$3;
|
|
10401
10395
|
|
|
10402
10396
|
var helpers;
|
|
10403
10397
|
var hasRequiredHelpers;
|
|
@@ -10406,7 +10400,7 @@ function requireHelpers () {
|
|
|
10406
10400
|
if (hasRequiredHelpers) return helpers;
|
|
10407
10401
|
hasRequiredHelpers = 1;
|
|
10408
10402
|
const FormulaError = requireError();
|
|
10409
|
-
const Collection =
|
|
10403
|
+
const Collection = collection;
|
|
10410
10404
|
|
|
10411
10405
|
const Types = {
|
|
10412
10406
|
NUMBER: 0,
|
|
@@ -20060,7 +20054,7 @@ var engineering = EngineeringFunctions;
|
|
|
20060
20054
|
|
|
20061
20055
|
const FormulaError$b = requireError();
|
|
20062
20056
|
const {FormulaHelpers: FormulaHelpers$8, Types: Types$6, WildCard, Address: Address$3} = requireHelpers();
|
|
20063
|
-
const Collection$2 =
|
|
20057
|
+
const Collection$2 = collection;
|
|
20064
20058
|
const H$5 = FormulaHelpers$8;
|
|
20065
20059
|
|
|
20066
20060
|
const ReferenceFunctions$1 = {
|
|
@@ -31688,7 +31682,7 @@ var parsing = {
|
|
|
31688
31682
|
const FormulaError$4 = requireError();
|
|
31689
31683
|
const {Address: Address$1} = requireHelpers();
|
|
31690
31684
|
const {Prefix: Prefix$1, Postfix: Postfix$1, Infix: Infix$1, Operators: Operators$1} = operators;
|
|
31691
|
-
const Collection$1 =
|
|
31685
|
+
const Collection$1 = collection;
|
|
31692
31686
|
const MAX_ROW$1 = 1048576, MAX_COLUMN$1 = 16384;
|
|
31693
31687
|
const {NotAllInputParsedException} = require$$4;
|
|
31694
31688
|
|
|
@@ -32450,7 +32444,7 @@ var hooks$1 = {
|
|
|
32450
32444
|
const FormulaError$2 = requireError();
|
|
32451
32445
|
const {FormulaHelpers: FormulaHelpers$1, Types, Address} = requireHelpers();
|
|
32452
32446
|
const {Prefix, Postfix, Infix, Operators} = operators;
|
|
32453
|
-
const Collection =
|
|
32447
|
+
const Collection = collection;
|
|
32454
32448
|
const MAX_ROW = 1048576, MAX_COLUMN = 16384;
|
|
32455
32449
|
|
|
32456
32450
|
let Utils$1 = class Utils {
|