@plasmicpkgs/antd5 0.0.232 → 0.0.234

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/antd.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Result, Form, Checkbox, DatePicker, Radio, Select, Input, InputNumber, Avatar, Button, Collapse, ColorPicker, ConfigProvider, theme, message, notification, Drawer, Menu, Dropdown, Modal, Pagination, Popover, Progress, Rate, Segmented, Slider, Steps, Switch, Table, Tabs, Tooltip, Tree, Upload } from 'antd';
1
+ import { Result, Form, Checkbox, DatePicker, Radio, Select, Input, InputNumber, Avatar, Breadcrumb, Button, Collapse, ColorPicker, ConfigProvider, theme, message, notification, Drawer, Menu, Dropdown, Modal, Pagination, Popover, Progress, Rate, Segmented, Slider, Steps, Switch, Table, Tabs, Tooltip, Tree, Upload } from 'antd';
2
2
  import equal from 'fast-deep-equal';
3
3
  import React, { isValidElement, cloneElement, useMemo, useEffect, useState, useRef } from 'react';
4
4
  import registerComponent from '@plasmicapp/host/registerComponent';
@@ -7,7 +7,6 @@ import { deriveFieldConfigs, normalizeData, usePlasmicDataOp } from '@plasmicapp
7
7
  import dayjs from 'dayjs';
8
8
  import classNames from 'classnames';
9
9
  import { usePlasmicCanvasContext, DataProvider, repeatedElement, usePlasmicLink, useSelector, GlobalActionsProvider } from '@plasmicapp/host';
10
- import { Breadcrumb } from 'antd/lib';
11
10
  import uniqueId from 'lodash/uniqueId';
12
11
  import registerToken from '@plasmicapp/host/registerToken';
13
12
  import { addLoadingStateListener } from '@plasmicapp/query';
@@ -210,7 +209,7 @@ var __spreadValues$A = (a, b) => {
210
209
  return a;
211
210
  };
212
211
  var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
213
- var __objRest$o = (source, exclude) => {
212
+ var __objRest$p = (source, exclude) => {
214
213
  var target = {};
215
214
  for (var prop in source)
216
215
  if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -257,7 +256,7 @@ const Internal = React.forwardRef(
257
256
  internalFieldCtx,
258
257
  setInternalFieldCtx,
259
258
  autoDisableWhileSubmitting = true
260
- } = _a, rest = __objRest$o(_a, [
259
+ } = _a, rest = __objRest$p(_a, [
261
260
  "extendedOnValuesChange",
262
261
  "forceRemount",
263
262
  "formLayout",
@@ -495,7 +494,7 @@ var __spreadValues$z = (a, b) => {
495
494
  return a;
496
495
  };
497
496
  var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
498
- var __objRest$n = (source, exclude) => {
497
+ var __objRest$o = (source, exclude) => {
499
498
  var target = {};
500
499
  for (var prop in source)
501
500
  if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -508,7 +507,7 @@ var __objRest$n = (source, exclude) => {
508
507
  return target;
509
508
  };
510
509
  function AntdCheckbox(props) {
511
- const _a = props, { onChange } = _a, rest = __objRest$n(_a, ["onChange"]);
510
+ const _a = props, { onChange } = _a, rest = __objRest$o(_a, ["onChange"]);
512
511
  const wrappedOnChange = React.useMemo(() => {
513
512
  if (onChange) {
514
513
  return (event) => onChange(event.target.checked);
@@ -651,7 +650,7 @@ var __spreadValues$y = (a, b) => {
651
650
  return a;
652
651
  };
653
652
  var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
654
- var __objRest$m = (source, exclude) => {
653
+ var __objRest$n = (source, exclude) => {
655
654
  var target = {};
656
655
  for (var prop in source)
657
656
  if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -664,7 +663,7 @@ var __objRest$m = (source, exclude) => {
664
663
  return target;
665
664
  };
666
665
  function AntdDatePicker(props) {
667
- const _a = props, { picker, popupScopeClassName } = _a, rest = __objRest$m(_a, ["picker", "popupScopeClassName"]);
666
+ const _a = props, { picker, popupScopeClassName } = _a, rest = __objRest$n(_a, ["picker", "popupScopeClassName"]);
668
667
  const css = `
669
668
 
670
669
  @media(max-width: 500px) {
@@ -908,7 +907,7 @@ var __spreadValues$x = (a, b) => {
908
907
  return a;
909
908
  };
910
909
  var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
911
- var __objRest$l = (source, exclude) => {
910
+ var __objRest$m = (source, exclude) => {
912
911
  var target = {};
913
912
  for (var prop in source)
914
913
  if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -924,7 +923,7 @@ const RadioGroup = Radio.Group;
924
923
  const AntdRadio = Radio;
925
924
  const AntdRadioButton = Radio.Button;
926
925
  function AntdRadioGroup(props) {
927
- const _a = props, { onChange, useChildren } = _a, rest = __objRest$l(_a, ["onChange", "useChildren"]);
926
+ const _a = props, { onChange, useChildren } = _a, rest = __objRest$m(_a, ["onChange", "useChildren"]);
928
927
  const wrappedOnChange = React.useMemo(() => {
929
928
  if (onChange) {
930
929
  return (event) => onChange(event.target.value);
@@ -1255,7 +1254,7 @@ var __spreadValues$v = (a, b) => {
1255
1254
  return a;
1256
1255
  };
1257
1256
  var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
1258
- var __objRest$k = (source, exclude) => {
1257
+ var __objRest$l = (source, exclude) => {
1259
1258
  var target = {};
1260
1259
  for (var prop in source)
1261
1260
  if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1277,7 +1276,7 @@ function AntdSelect(props) {
1277
1276
  suffixIcon,
1278
1277
  mode,
1279
1278
  useChildren
1280
- } = _a, rest = __objRest$k(_a, [
1279
+ } = _a, rest = __objRest$l(_a, [
1281
1280
  "popupClassName",
1282
1281
  "popupScopeClassName",
1283
1282
  "defaultStylesClassName",
@@ -1619,7 +1618,7 @@ var __spreadValues$u = (a, b) => {
1619
1618
  return a;
1620
1619
  };
1621
1620
  var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
1622
- var __objRest$j = (source, exclude) => {
1621
+ var __objRest$k = (source, exclude) => {
1623
1622
  var target = {};
1624
1623
  for (var prop in source)
1625
1624
  if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1698,7 +1697,7 @@ function FormItemWrapper(props) {
1698
1697
  customizeProps,
1699
1698
  setControlContextData,
1700
1699
  alignLabellessWithControls = true
1701
- } = _a, rest = __objRest$j(_a, [
1700
+ } = _a, rest = __objRest$k(_a, [
1702
1701
  "rules",
1703
1702
  "description",
1704
1703
  "noLabel",
@@ -1840,7 +1839,7 @@ function deriveOnChangePropName(props) {
1840
1839
  return void 0;
1841
1840
  }
1842
1841
  function FormItemForwarder(_a) {
1843
- var _b = _a, { formItemProps } = _b, props = __objRest$j(_b, ["formItemProps"]);
1842
+ var _b = _a, { formItemProps } = _b, props = __objRest$k(_b, ["formItemProps"]);
1844
1843
  var _a2;
1845
1844
  const status = Form.Item.useStatus();
1846
1845
  const internalFormCtx = React.useContext(InternalFormInstanceContext);
@@ -1891,7 +1890,7 @@ var __spreadValues$t = (a, b) => {
1891
1890
  return a;
1892
1891
  };
1893
1892
  var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
1894
- var __objRest$i = (source, exclude) => {
1893
+ var __objRest$j = (source, exclude) => {
1895
1894
  var target = {};
1896
1895
  for (var prop in source)
1897
1896
  if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -1964,7 +1963,7 @@ const SchemaForm = React.forwardRef(
1964
1963
  forceRemount();
1965
1964
  }
1966
1965
  }, [props.data]);
1967
- const _a = props, { dataFormItems, formItems, data } = _a, rest = __objRest$i(_a, ["dataFormItems", "formItems", "data"]);
1966
+ const _a = props, { dataFormItems, formItems, data } = _a, rest = __objRest$j(_a, ["dataFormItems", "formItems", "data"]);
1968
1967
  const actualFormItems = props.mode === "simplified" && formItemDefinitions ? formItemDefinitions.mergedFields : data ? dataFormItems : formItems;
1969
1968
  const previousFormItems = React.useRef([]);
1970
1969
  React.useEffect(() => {
@@ -3185,7 +3184,7 @@ var __spreadValues$o = (a, b) => {
3185
3184
  return a;
3186
3185
  };
3187
3186
  var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
3188
- var __objRest$h = (source, exclude) => {
3187
+ var __objRest$i = (source, exclude) => {
3189
3188
  var target = {};
3190
3189
  for (var prop in source)
3191
3190
  if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -3202,7 +3201,7 @@ function AntdAvatar(_a) {
3202
3201
  letters,
3203
3202
  href,
3204
3203
  target
3205
- } = _b, props = __objRest$h(_b, [
3204
+ } = _b, props = __objRest$i(_b, [
3206
3205
  "letters",
3207
3206
  "href",
3208
3207
  "target"
@@ -3319,11 +3318,23 @@ var __spreadValues$n = (a, b) => {
3319
3318
  return a;
3320
3319
  };
3321
3320
  var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
3321
+ var __objRest$h = (source, exclude) => {
3322
+ var target = {};
3323
+ for (var prop in source)
3324
+ if (__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0)
3325
+ target[prop] = source[prop];
3326
+ if (source != null && __getOwnPropSymbols$n)
3327
+ for (var prop of __getOwnPropSymbols$n(source)) {
3328
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop))
3329
+ target[prop] = source[prop];
3330
+ }
3331
+ return target;
3332
+ };
3322
3333
  function AntdBreadcrumbItem(props) {
3323
3334
  return props.children;
3324
3335
  }
3325
3336
  function AntdBreadcrumb(props) {
3326
- const itemsRaw = props.itemsRaw;
3337
+ const _a = props, { itemsRaw } = _a, rest = __objRest$h(_a, ["itemsRaw"]);
3327
3338
  const items = React.useMemo(() => {
3328
3339
  if (!React.isValidElement(itemsRaw) && !Array.isArray(itemsRaw))
3329
3340
  return [];
@@ -3333,7 +3344,7 @@ function AntdBreadcrumb(props) {
3333
3344
  });
3334
3345
  }).filter((i) => i != null);
3335
3346
  }, [itemsRaw]);
3336
- return /* @__PURE__ */ React.createElement(Breadcrumb, __spreadProps$f(__spreadValues$n({}, props), { items }));
3347
+ return /* @__PURE__ */ React.createElement(Breadcrumb, __spreadProps$f(__spreadValues$n({}, rest), { items }));
3337
3348
  }
3338
3349
  const breadcrumbItemComponentName = "plasmic-antd5-breadcrumb-item";
3339
3350
  const breadcrumbComponentName = "plasmic-antd5-breadcrumb";