ywana-core8 0.0.658 → 0.0.659

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/index.cjs CHANGED
@@ -9624,6 +9624,29 @@ var TableAPI = function TableAPI(url, host) {
9624
9624
  };
9625
9625
  };
9626
9626
 
9627
+ /**
9628
+ * Wizard Context
9629
+ */
9630
+
9631
+ var WizardContext = React__default["default"].createContext({});
9632
+ /**
9633
+ * Wizard Provider
9634
+ */
9635
+
9636
+ var WizardProvider = function WizardProvider(_ref) {
9637
+ var children = _ref.children;
9638
+
9639
+ var _useState = React.useState(context),
9640
+ form = _useState[0],
9641
+ setForm = _useState[1];
9642
+
9643
+ return /*#__PURE__*/React__default["default"].createElement(WizardContext.Provider, {
9644
+ value: {
9645
+ form: form,
9646
+ setForm: setForm
9647
+ }
9648
+ }, children);
9649
+ };
9627
9650
  var Wizard = function Wizard(props) {
9628
9651
  var finish = function finish() {
9629
9652
  try {
@@ -9650,10 +9673,10 @@ var Wizard = function Wizard(props) {
9650
9673
  onClose = props.onClose,
9651
9674
  children = props.children;
9652
9675
 
9653
- var _useState = React.useState(init),
9654
- _useState$ = _useState[0],
9655
- current = _useState$ === void 0 ? 0 : _useState$,
9656
- setCurrent = _useState[1];
9676
+ var _useState2 = React.useState(init),
9677
+ _useState2$ = _useState2[0],
9678
+ current = _useState2$ === void 0 ? 0 : _useState2$,
9679
+ setCurrent = _useState2[1];
9657
9680
 
9658
9681
  var steps = React__default["default"].Children.toArray(children);
9659
9682
  var stepRef = React.useRef();
@@ -9667,7 +9690,7 @@ var Wizard = function Wizard(props) {
9667
9690
  ref: stepRef
9668
9691
  });
9669
9692
  }, [current]);
9670
- return /*#__PURE__*/React__default["default"].createElement("div", {
9693
+ return /*#__PURE__*/React__default["default"].createElement(WizardProvider, null, /*#__PURE__*/React__default["default"].createElement("div", {
9671
9694
  className: "wizard"
9672
9695
  }, /*#__PURE__*/React__default["default"].createElement("div", {
9673
9696
  className: "wizard-steps"
@@ -9703,7 +9726,7 @@ var Wizard = function Wizard(props) {
9703
9726
  disabled: stepRef.current && stepRef.current.isValid(),
9704
9727
  action: finish,
9705
9728
  raised: true
9706
- })));
9729
+ }))));
9707
9730
  };
9708
9731
 
9709
9732
  var isFunction = function isFunction(value) {