@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.
@@ -1 +1 @@
1
- {"version":3,"file":"FormWizard.d.ts","sourceRoot":"","sources":["../../src/components/FormWizard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,UAAU,EACV,YAAY,EACZ,eAAsB,EACtB,SAAiB,EACjB,SAAc,GACf,EAAE,eAAe,2CA6KjB"}
1
+ {"version":3,"file":"FormWizard.d.ts","sourceRoot":"","sources":["../../src/components/FormWizard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,UAAU,EACV,YAAY,EACZ,eAAsB,EACtB,SAAiB,EACjB,SAAc,GACf,EAAE,eAAe,2CA+KjB"}
package/dist/index.esm.js CHANGED
@@ -5368,7 +5368,6 @@ function FormWizard({ steps, onComplete, onStepChange, showStepNumbers = true, a
5368
5368
  const [isSubmitting, setIsSubmitting] = useState(false);
5369
5369
  const isFirstStep = currentStep === 0;
5370
5370
  const isLastStep = currentStep === steps.length - 1;
5371
- const canGoNext = allowSkip || completedSteps.has(currentStep);
5372
5371
  // Go to specific step
5373
5372
  const goToStep = (stepIndex) => {
5374
5373
  if (stepIndex < 0 || stepIndex >= steps.length)
@@ -5403,8 +5402,11 @@ function FormWizard({ steps, onComplete, onStepChange, showStepNumbers = true, a
5403
5402
  }
5404
5403
  }
5405
5404
  else {
5406
- // Go to next step
5407
- goToStep(currentStep + 1);
5405
+ // Advance to next step directly (don't use goToStep which checks completedSteps
5406
+ // before React has re-rendered with the updated state)
5407
+ const nextStepIndex = currentStep + 1;
5408
+ setCurrentStep(nextStepIndex);
5409
+ onStepChange?.(nextStepIndex);
5408
5410
  }
5409
5411
  };
5410
5412
  // Previous step
@@ -5440,7 +5442,7 @@ function FormWizard({ steps, onComplete, onStepChange, showStepNumbers = true, a
5440
5442
  ? 'bg-accent-500'
5441
5443
  : 'bg-paper-200'}
5442
5444
  ` }) }))] }, step.id));
5443
- }) }) }), jsx("div", { className: "mb-8", children: steps.map((step, index) => (jsx("div", { hidden: index !== currentStep, children: step.content }, step.id))) }), jsxs("div", { className: "flex items-center justify-between pt-6 border-t border-paper-200", children: [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" }), jsxs("div", { className: "text-sm text-ink-600", children: ["Step ", currentStep + 1, " of ", steps.length] }), jsx("button", { type: "button", onClick: nextStep, disabled: !allowSkip && !canGoNext && !isLastStep || 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' })] })] }));
5445
+ }) }) }), jsx("div", { className: "mb-8", children: steps.map((step, index) => (jsx("div", { hidden: index !== currentStep, children: step.content }, step.id))) }), jsxs("div", { className: "flex items-center justify-between pt-6 border-t border-paper-200", children: [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" }), jsxs("div", { className: "text-sm text-ink-600", children: ["Step ", currentStep + 1, " of ", steps.length] }), 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' })] })] }));
5444
5446
  }
5445
5447
 
5446
5448
  function InfiniteScroll({ loadMore, hasMore, loading = false, children, threshold = 200, loader, scrollContainer, reverse = false, className = '', }) {
@@ -10332,52 +10334,44 @@ function getAugmentedNamespace(n) {
10332
10334
  * (A1, A1:C5, ...)
10333
10335
  */
10334
10336
 
10335
- var collection;
10336
- var hasRequiredCollection;
10337
-
10338
- function requireCollection () {
10339
- if (hasRequiredCollection) return collection;
10340
- hasRequiredCollection = 1;
10341
- class Collection {
10337
+ let Collection$3 = class Collection {
10342
10338
 
10343
- constructor(data, refs) {
10344
- if (data == null && refs == null) {
10345
- this._data = [];
10346
- this._refs = [];
10347
- } else {
10348
- if (data.length !== refs.length)
10349
- throw Error('Collection: data length should match references length.');
10350
- this._data = data;
10351
- this._refs = refs;
10352
- }
10353
- }
10339
+ constructor(data, refs) {
10340
+ if (data == null && refs == null) {
10341
+ this._data = [];
10342
+ this._refs = [];
10343
+ } else {
10344
+ if (data.length !== refs.length)
10345
+ throw Error('Collection: data length should match references length.');
10346
+ this._data = data;
10347
+ this._refs = refs;
10348
+ }
10349
+ }
10354
10350
 
10355
- get data() {
10356
- return this._data;
10357
- }
10351
+ get data() {
10352
+ return this._data;
10353
+ }
10358
10354
 
10359
- get refs() {
10360
- return this._refs;
10361
- }
10355
+ get refs() {
10356
+ return this._refs;
10357
+ }
10362
10358
 
10363
- get length() {
10364
- return this._data.length;
10365
- }
10359
+ get length() {
10360
+ return this._data.length;
10361
+ }
10366
10362
 
10367
- /**
10368
- * Add data and references to this collection.
10369
- * @param {{}} obj - data
10370
- * @param {{}} ref - reference
10371
- */
10372
- add(obj, ref) {
10373
- this._data.push(obj);
10374
- this._refs.push(ref);
10375
- }
10376
- }
10363
+ /**
10364
+ * Add data and references to this collection.
10365
+ * @param {{}} obj - data
10366
+ * @param {{}} ref - reference
10367
+ */
10368
+ add(obj, ref) {
10369
+ this._data.push(obj);
10370
+ this._refs.push(ref);
10371
+ }
10372
+ };
10377
10373
 
10378
- collection = Collection;
10379
- return collection;
10380
- }
10374
+ var collection = Collection$3;
10381
10375
 
10382
10376
  var helpers;
10383
10377
  var hasRequiredHelpers;
@@ -10386,7 +10380,7 @@ function requireHelpers () {
10386
10380
  if (hasRequiredHelpers) return helpers;
10387
10381
  hasRequiredHelpers = 1;
10388
10382
  const FormulaError = requireError();
10389
- const Collection = requireCollection();
10383
+ const Collection = collection;
10390
10384
 
10391
10385
  const Types = {
10392
10386
  NUMBER: 0,
@@ -20040,7 +20034,7 @@ var engineering = EngineeringFunctions;
20040
20034
 
20041
20035
  const FormulaError$b = requireError();
20042
20036
  const {FormulaHelpers: FormulaHelpers$8, Types: Types$6, WildCard, Address: Address$3} = requireHelpers();
20043
- const Collection$2 = requireCollection();
20037
+ const Collection$2 = collection;
20044
20038
  const H$5 = FormulaHelpers$8;
20045
20039
 
20046
20040
  const ReferenceFunctions$1 = {
@@ -31668,7 +31662,7 @@ var parsing = {
31668
31662
  const FormulaError$4 = requireError();
31669
31663
  const {Address: Address$1} = requireHelpers();
31670
31664
  const {Prefix: Prefix$1, Postfix: Postfix$1, Infix: Infix$1, Operators: Operators$1} = operators;
31671
- const Collection$1 = requireCollection();
31665
+ const Collection$1 = collection;
31672
31666
  const MAX_ROW$1 = 1048576, MAX_COLUMN$1 = 16384;
31673
31667
  const {NotAllInputParsedException} = require$$4;
31674
31668
 
@@ -32430,7 +32424,7 @@ var hooks$1 = {
32430
32424
  const FormulaError$2 = requireError();
32431
32425
  const {FormulaHelpers: FormulaHelpers$1, Types, Address} = requireHelpers();
32432
32426
  const {Prefix, Postfix, Infix, Operators} = operators;
32433
- const Collection = requireCollection();
32427
+ const Collection = collection;
32434
32428
  const MAX_ROW = 1048576, MAX_COLUMN = 16384;
32435
32429
 
32436
32430
  let Utils$1 = class Utils {