@pisell/lowcode-renderer 1.0.20 → 1.0.21

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.
@@ -6,6 +6,7 @@ interface RenderProps {
6
6
  className?: string;
7
7
  appHelper?: IRendererAppHelper;
8
8
  locale?: string;
9
+ isShowSkeleton?: boolean;
9
10
  }
10
- declare const Render: (props: RenderProps) => JSX.Element;
11
+ declare const Render: (props: RenderProps) => JSX.Element | null;
11
12
  export default Render;
@@ -25,7 +25,9 @@ var Render = function Render(props) {
25
25
  projectSchema = props.projectSchema,
26
26
  className = props.className,
27
27
  propsAppHelper = props.appHelper,
28
- locale = props.locale;
28
+ locale = props.locale,
29
+ _props$isShowSkeleton = props.isShowSkeleton,
30
+ isShowSkeleton = _props$isShowSkeleton === void 0 ? true : _props$isShowSkeleton;
29
31
  var _useState = useState({}),
30
32
  _useState2 = _slicedToArray(_useState, 2),
31
33
  data = _useState2[0],
@@ -117,6 +119,9 @@ var Render = function Render(props) {
117
119
  }
118
120
  }, [data, projectSchema]);
119
121
  if (!schema || !components) {
122
+ if (!isShowSkeleton) {
123
+ return null;
124
+ }
120
125
  return /*#__PURE__*/React.createElement("div", {
121
126
  style: {
122
127
  padding: 20
package/es/api/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  report: {
3
- getReportList: (values: any, url: "REPORT_DETAILED_TRANSACTIONS" | "REPORT_DETAILED_PRODUCT_SALES" | "REPORT_DAILY_SUMMARY_BY_PAYMETHOD" | "REPORT_DAILY_SUMMARY_BY_ORDER" | "REPORT_DETAILED_ORDERS" | "REPORT_MONTH_SUMMARY_BY_ORDER" | "REPORT_WEEK_SUMMARY_BY_ORDER" | "REPORT_DASHBOARD") => Promise<any>;
3
+ getReportList: (values: any, url: "REPORT_DETAILED_TRANSACTIONS" | "REPORT_DETAILED_PRODUCT_SALES" | "REPORT_DAILY_SUMMARY_BY_PAYMETHOD" | "REPORT_DAILY_SUMMARY_BY_ORDER" | "REPORT_DETAILED_ORDERS" | "REPORT_MONTH_SUMMARY_BY_ORDER" | "REPORT_WEEK_SUMMARY_BY_ORDER") => Promise<any>;
4
4
  };
5
5
  utils: {};
6
6
  };
@@ -6,6 +6,7 @@ interface RenderProps {
6
6
  className?: string;
7
7
  appHelper?: IRendererAppHelper;
8
8
  locale?: string;
9
+ isShowSkeleton?: boolean;
9
10
  }
10
- declare const Render: (props: RenderProps) => JSX.Element;
11
+ declare const Render: (props: RenderProps) => JSX.Element | null;
11
12
  export default Render;
@@ -45,7 +45,8 @@ var Render = (props) => {
45
45
  projectSchema,
46
46
  className,
47
47
  appHelper: propsAppHelper,
48
- locale
48
+ locale,
49
+ isShowSkeleton = true
49
50
  } = props;
50
51
  const [data, setData] = (0, import_react.useState)({});
51
52
  const { schema, components, i18n = {}, projectDataSource = {} } = data;
@@ -99,6 +100,9 @@ var Render = (props) => {
99
100
  }
100
101
  }, [data, projectSchema]);
101
102
  if (!schema || !components) {
103
+ if (!isShowSkeleton) {
104
+ return null;
105
+ }
102
106
  return /* @__PURE__ */ React.createElement("div", { style: { padding: 20 } }, /* @__PURE__ */ React.createElement(import_antd.Skeleton, { loading: true, active: true, round: true }));
103
107
  }
104
108
  function customizer(objValue, srcValue) {
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  report: {
3
- getReportList: (values: any, url: "REPORT_DETAILED_TRANSACTIONS" | "REPORT_DETAILED_PRODUCT_SALES" | "REPORT_DAILY_SUMMARY_BY_PAYMETHOD" | "REPORT_DAILY_SUMMARY_BY_ORDER" | "REPORT_DETAILED_ORDERS" | "REPORT_MONTH_SUMMARY_BY_ORDER" | "REPORT_WEEK_SUMMARY_BY_ORDER" | "REPORT_DASHBOARD") => Promise<any>;
3
+ getReportList: (values: any, url: "REPORT_DETAILED_TRANSACTIONS" | "REPORT_DETAILED_PRODUCT_SALES" | "REPORT_DAILY_SUMMARY_BY_PAYMETHOD" | "REPORT_DAILY_SUMMARY_BY_ORDER" | "REPORT_DETAILED_ORDERS" | "REPORT_MONTH_SUMMARY_BY_ORDER" | "REPORT_WEEK_SUMMARY_BY_ORDER") => Promise<any>;
4
4
  };
5
5
  utils: {};
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/lowcode-renderer",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "sideEffects": false,
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",
@@ -18,7 +18,7 @@
18
18
  "@alifd/next": "^1.25.44",
19
19
  "lodash-es": "^4.17.21",
20
20
  "dayjs": "^1.11.9",
21
- "@pisell/utils": "1.0.7"
21
+ "@pisell/utils": "1.0.8"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": ">=16.9.0",