@wix/form-public 0.13.0 → 0.14.0

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.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React30 from 'react';
2
2
  import React30__default, { createContext, forwardRef, useState, useMemo, useRef, useEffect, useCallback, useImperativeHandle, useContext } from 'react';
3
3
  import ReactDOM from 'react-dom';
4
- import { jsx, Fragment } from 'react/jsx-runtime';
4
+ import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  var __create = Object.create;
7
7
  var __defProp = Object.defineProperty;
@@ -4449,7 +4449,7 @@ var require_react_is_development = __commonJS({
4449
4449
  var ContextProvider = REACT_PROVIDER_TYPE;
4450
4450
  var Element2 = REACT_ELEMENT_TYPE;
4451
4451
  var ForwardRef = REACT_FORWARD_REF_TYPE;
4452
- var Fragment2 = REACT_FRAGMENT_TYPE;
4452
+ var Fragment = REACT_FRAGMENT_TYPE;
4453
4453
  var Lazy = REACT_LAZY_TYPE;
4454
4454
  var Memo = REACT_MEMO_TYPE;
4455
4455
  var Portal = REACT_PORTAL_TYPE;
@@ -4508,7 +4508,7 @@ var require_react_is_development = __commonJS({
4508
4508
  exports.ContextProvider = ContextProvider;
4509
4509
  exports.Element = Element2;
4510
4510
  exports.ForwardRef = ForwardRef;
4511
- exports.Fragment = Fragment2;
4511
+ exports.Fragment = Fragment;
4512
4512
  exports.Lazy = Lazy;
4513
4513
  exports.Memo = Memo;
4514
4514
  exports.Portal = Portal;
@@ -29963,27 +29963,39 @@ var mapFieldTypes = (fields, typeMap) => ({
29963
29963
  Object.entries(typeMap).filter(([, targetType]) => fields[targetType]).map(([newName, targetType]) => [newName, fields[targetType]])
29964
29964
  )
29965
29965
  });
29966
- var Form2 = (props) => {
29966
+ var Form2 = ({
29967
+ form,
29968
+ fields,
29969
+ values,
29970
+ onChange,
29971
+ errors,
29972
+ onValidate
29973
+ }) => {
29967
29974
  const siteConfig = {
29968
29975
  locale: {
29969
29976
  languageCode: "en"
29970
29977
  }
29971
29978
  };
29972
29979
  const i18n2 = initI18n({ locale: siteConfig.locale.languageCode });
29973
- const mappedFieldProps = mapFieldProps(props.fields, FIELD_PROP_MAP);
29980
+ const mappedFieldProps = mapFieldProps(fields, FIELD_PROP_MAP);
29974
29981
  const mappedFieldTypes = mapFieldTypes(mappedFieldProps, FIELD_TYPE_MAP);
29975
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
29982
+ return /* @__PURE__ */ jsx(
29976
29983
  FormViewerStatic,
29977
29984
  {
29978
- form: props.form || {},
29979
- values: props.values,
29980
- onChange: props.onChange,
29981
- errors: props.errors,
29982
- onValidate: props.onValidate,
29985
+ form,
29986
+ values,
29987
+ onChange,
29988
+ errors,
29989
+ onValidate,
29983
29990
  fields: mappedFieldTypes,
29984
- i18n: i18n2
29991
+ i18n: i18n2,
29992
+ WixRicosViewer: () => null,
29993
+ config: {
29994
+ locale: siteConfig.locale.languageCode,
29995
+ regionalFormat: siteConfig.locale.languageCode
29996
+ }
29985
29997
  }
29986
- ) });
29998
+ );
29987
29999
  };
29988
30000
  /*! Bundled license information:
29989
30001