@faasjs/ant-design 0.0.2-beta.428 → 0.0.2-beta.429

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
@@ -30,7 +30,7 @@ declare type BlankProps = {
30
30
  * <Blank value={undefined} text="Empty" />
31
31
  * ```
32
32
  */
33
- declare function Blank(options?: BlankProps): any;
33
+ declare function Blank(options?: BlankProps): JSX.Element;
34
34
 
35
35
  declare type CalendarProps = CalendarProps$1<Dayjs>;
36
36
  declare const Calendar: (props: antd_es_calendar_generateCalendar_js.CalendarProps<Dayjs>) => JSX.Element;
@@ -137,12 +137,12 @@ declare const DatePicker: antd_es_date_picker_generatePicker_interface.PickerCom
137
137
 
138
138
  declare type ExtendDescriptionTypeProps = {
139
139
  children?: JSX.Element | null;
140
- render?: (value: any, values: any) => JSX.Element | string | number | boolean | null;
140
+ render?: (value: any, values: any) => ReactNode;
141
141
  };
142
142
  declare type ExtendDescriptionItemProps = BaseItemProps;
143
143
  declare type DescriptionItemProps<T = any> = {
144
144
  children?: JSX.Element;
145
- render?: (value: T, values: any) => JSX.Element | string | number | boolean | null;
145
+ render?: (value: T, values: any) => ReactNode;
146
146
  } & FaasItemProps;
147
147
  declare type DescriptionProps<T = any, ExtendItemProps = any> = {
148
148
  renderTitle?: ((values: T) => ReactNode);
@@ -233,15 +233,15 @@ declare type OptionsProps = {
233
233
  };
234
234
  declare type FormItemInputProps = StringProps | StringListProps | NumberProps | NumberListProps | BooleanProps | OptionsProps | DateProps | TimeProps | ObjectProps | ObjectListProps;
235
235
  declare type ExtendFormTypeProps = {
236
- children?: JSX.Element | null;
236
+ children?: ReactNode;
237
237
  };
238
238
  declare type ExtendTypes = {
239
239
  [type: string]: ExtendFormTypeProps;
240
240
  };
241
241
  declare type ExtendFormItemProps = BaseItemProps & FormItemProps$1;
242
242
  declare type FormItemProps<T = any> = {
243
- children?: JSX.Element | null;
244
- render?: () => JSX.Element | null;
243
+ children?: ReactNode;
244
+ render?: () => ReactNode;
245
245
  rules?: RuleObject[];
246
246
  label?: string | false;
247
247
  extendTypes?: ExtendTypes;
package/dist/index.js CHANGED
@@ -907,7 +907,7 @@ var import_react13 = require("@faasjs/react");
907
907
  var import_jsx_runtime11 = require("react/jsx-runtime");
908
908
  function processValue(item, value) {
909
909
  var _a;
910
- if (typeof value === "undefined" && value === null)
910
+ if (typeof value === "undefined" || value === null || value === "")
911
911
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Blank, {});
912
912
  if (item.options) {
913
913
  if (item.type.endsWith("[]"))
package/dist/index.mjs CHANGED
@@ -305,7 +305,10 @@ import {
305
305
  Select
306
306
  } from "antd";
307
307
  import { MinusCircleOutlined, PlusOutlined } from "@ant-design/icons";
308
- import { useEffect as useEffect3, useState as useState4 } from "react";
308
+ import {
309
+ useEffect as useEffect3,
310
+ useState as useState4
311
+ } from "react";
309
312
  import { upperFirst as upperFirst3 } from "lodash";
310
313
 
311
314
  // src/TimePicker.tsx
@@ -901,7 +904,7 @@ import { FaasDataWrapper as FaasDataWrapper2 } from "@faasjs/react";
901
904
  import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
902
905
  function processValue(item, value) {
903
906
  var _a;
904
- if (typeof value === "undefined" && value === null)
907
+ if (typeof value === "undefined" || value === null || value === "")
905
908
  return /* @__PURE__ */ jsx11(Blank, {});
906
909
  if (item.options) {
907
910
  if (item.type.endsWith("[]"))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "0.0.2-beta.428",
3
+ "version": "0.0.2-beta.429",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -28,7 +28,7 @@
28
28
  "lodash": "*",
29
29
  "react": "*",
30
30
  "react-dom": "*",
31
- "@faasjs/react": "^0.0.2-beta.428",
31
+ "@faasjs/react": "^0.0.2-beta.429",
32
32
  "react-router-dom": "*",
33
33
  "dayjs": "*"
34
34
  },