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.
@@ -9616,6 +9616,29 @@ var TableAPI = function TableAPI(url, host) {
9616
9616
  };
9617
9617
  };
9618
9618
 
9619
+ /**
9620
+ * Wizard Context
9621
+ */
9622
+
9623
+ var WizardContext = React.createContext({});
9624
+ /**
9625
+ * Wizard Provider
9626
+ */
9627
+
9628
+ var WizardProvider = function WizardProvider(_ref) {
9629
+ var children = _ref.children;
9630
+
9631
+ var _useState = useState(context),
9632
+ form = _useState[0],
9633
+ setForm = _useState[1];
9634
+
9635
+ return /*#__PURE__*/React.createElement(WizardContext.Provider, {
9636
+ value: {
9637
+ form: form,
9638
+ setForm: setForm
9639
+ }
9640
+ }, children);
9641
+ };
9619
9642
  var Wizard = function Wizard(props) {
9620
9643
  var finish = function finish() {
9621
9644
  try {
@@ -9642,10 +9665,10 @@ var Wizard = function Wizard(props) {
9642
9665
  onClose = props.onClose,
9643
9666
  children = props.children;
9644
9667
 
9645
- var _useState = useState(init),
9646
- _useState$ = _useState[0],
9647
- current = _useState$ === void 0 ? 0 : _useState$,
9648
- setCurrent = _useState[1];
9668
+ var _useState2 = useState(init),
9669
+ _useState2$ = _useState2[0],
9670
+ current = _useState2$ === void 0 ? 0 : _useState2$,
9671
+ setCurrent = _useState2[1];
9649
9672
 
9650
9673
  var steps = React.Children.toArray(children);
9651
9674
  var stepRef = useRef();
@@ -9659,7 +9682,7 @@ var Wizard = function Wizard(props) {
9659
9682
  ref: stepRef
9660
9683
  });
9661
9684
  }, [current]);
9662
- return /*#__PURE__*/React.createElement("div", {
9685
+ return /*#__PURE__*/React.createElement(WizardProvider, null, /*#__PURE__*/React.createElement("div", {
9663
9686
  className: "wizard"
9664
9687
  }, /*#__PURE__*/React.createElement("div", {
9665
9688
  className: "wizard-steps"
@@ -9695,7 +9718,7 @@ var Wizard = function Wizard(props) {
9695
9718
  disabled: stepRef.current && stepRef.current.isValid(),
9696
9719
  action: finish,
9697
9720
  raised: true
9698
- })));
9721
+ }))));
9699
9722
  };
9700
9723
 
9701
9724
  var isFunction = function isFunction(value) {