@faasjs/ant-design 0.0.3-beta.74 → 0.0.3-beta.76

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.d.ts CHANGED
@@ -332,7 +332,7 @@ type FaasItemTypeValue = {
332
332
  };
333
333
  type BaseOption = string | number | {
334
334
  label: string;
335
- value?: string | number;
335
+ value?: any;
336
336
  };
337
337
  interface BaseItemProps {
338
338
  id: string;
package/dist/index.js CHANGED
@@ -1723,29 +1723,24 @@ function FaasDataTable({
1723
1723
 
1724
1724
  // src/Tabs.tsx
1725
1725
  var import_antd13 = require("antd");
1726
- var import_react14 = require("react");
1727
1726
  var import_jsx_runtime = require("react/jsx-runtime");
1728
1727
  function Tabs(props) {
1729
- const [items, setItems] = (0, import_react14.useState)([]);
1730
- (0, import_react14.useEffect)(() => {
1731
- setItems(props.items.filter(Boolean).map((item) => ({
1732
- ...item,
1733
- key: item.id,
1734
- label: item.title || item.id
1735
- })));
1736
- }, [props.items.filter(Boolean).map((i) => i.id).join("")]);
1737
1728
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd13.Tabs, {
1738
1729
  ...props,
1739
- items
1730
+ items: props.items.filter(Boolean).map((i) => ({
1731
+ ...i,
1732
+ key: i.key || i.id,
1733
+ label: i.label || i.title || i.id
1734
+ }))
1740
1735
  });
1741
1736
  }
1742
1737
 
1743
1738
  // src/Title.tsx
1744
- var import_react15 = require("react");
1739
+ var import_react14 = require("react");
1745
1740
  var import_jsx_runtime = require("react/jsx-runtime");
1746
1741
  function Title(props) {
1747
1742
  const { Title: Title2 } = useConfigContext();
1748
- (0, import_react15.useEffect)(() => {
1743
+ (0, import_react14.useEffect)(() => {
1749
1744
  const title = Array.isArray(props.title) ? props.title : [props.title];
1750
1745
  document.title = title.concat(props.suffix || Title2.suffix).filter((t) => !!t).join(props.separator || Title2.separator);
1751
1746
  }, [props]);
@@ -1765,7 +1760,7 @@ function Title(props) {
1765
1760
  children: Array.isArray(props.title) ? props.title[0] : props.title
1766
1761
  });
1767
1762
  if (props.children)
1768
- return (0, import_react15.cloneElement)(props.children, { title: props.title });
1763
+ return (0, import_react14.cloneElement)(props.children, { title: props.title });
1769
1764
  return null;
1770
1765
  }
1771
1766
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.mjs CHANGED
@@ -1730,29 +1730,24 @@ function FaasDataTable({
1730
1730
 
1731
1731
  // src/Tabs.tsx
1732
1732
  import { Tabs as Origin2 } from "antd";
1733
- import { useEffect as useEffect7, useState as useState8 } from "react";
1734
1733
  import { jsx as jsx15 } from "react/jsx-runtime";
1735
1734
  function Tabs(props) {
1736
- const [items, setItems] = useState8([]);
1737
- useEffect7(() => {
1738
- setItems(props.items.filter(Boolean).map((item) => ({
1739
- ...item,
1740
- key: item.id,
1741
- label: item.title || item.id
1742
- })));
1743
- }, [props.items.filter(Boolean).map((i) => i.id).join("")]);
1744
1735
  return /* @__PURE__ */ jsx15(Origin2, {
1745
1736
  ...props,
1746
- items
1737
+ items: props.items.filter(Boolean).map((i) => ({
1738
+ ...i,
1739
+ key: i.key || i.id,
1740
+ label: i.label || i.title || i.id
1741
+ }))
1747
1742
  });
1748
1743
  }
1749
1744
 
1750
1745
  // src/Title.tsx
1751
- import { useEffect as useEffect8, cloneElement as cloneElement4 } from "react";
1746
+ import { useEffect as useEffect7, cloneElement as cloneElement4 } from "react";
1752
1747
  import { Fragment as Fragment6, jsx as jsx16 } from "react/jsx-runtime";
1753
1748
  function Title(props) {
1754
1749
  const { Title: Title2 } = useConfigContext();
1755
- useEffect8(() => {
1750
+ useEffect7(() => {
1756
1751
  const title = Array.isArray(props.title) ? props.title : [props.title];
1757
1752
  document.title = title.concat(props.suffix || Title2.suffix).filter((t) => !!t).join(props.separator || Title2.separator);
1758
1753
  }, [props]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "0.0.3-beta.74",
3
+ "version": "0.0.3-beta.76",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",