@doreamonjs/page-detail 1.12.71 → 1.12.72

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.12.72](https://github.com/doreamonjs/doreamon/compare/v1.12.71...v1.12.72) (2025-02-14)
7
+
8
+ **Note:** Version bump only for package @doreamonjs/page-detail
9
+
10
+
11
+
12
+
13
+
6
14
  ## [1.12.71](https://github.com/doreamonjs/doreamon/compare/v1.12.70...v1.12.71) (2024-12-13)
7
15
 
8
16
  **Note:** Version bump only for package @doreamonjs/page-detail
package/lib/index.d.ts CHANGED
@@ -40,6 +40,7 @@ export interface DetailBasis {
40
40
  title?: string | ((values: any, context: any) => string);
41
41
  subTitle?: string | ((values: any, context: any) => string);
42
42
  column?: number;
43
+ hideContentInMobile?: boolean;
43
44
  renderBottom?(values: any, context: any): JSX.Element;
44
45
  }
45
46
  export interface InfoItem {
package/lib/index.js CHANGED
@@ -31,19 +31,19 @@ const icons_1 = require("@ant-design/icons");
31
31
  require("./index.less");
32
32
  const componentName = 'doreamonjs-design-page-detail';
33
33
  const DetailPage = (props) => {
34
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
34
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
35
35
  const [isMobile] = react_1.useState((_b = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, "(max-width: 767px)")) === null || _b === void 0 ? void 0 : _b.matches);
36
36
  const values = (_d = (_c = props === null || props === void 0 ? void 0 : props.datasets) === null || _c === void 0 ? void 0 : _c.values) !== null && _d !== void 0 ? _d : {};
37
37
  let basisNode = null;
38
- if (typeof props.attributes.detail.basis === 'function') {
38
+ if (typeof ((_e = props.attributes.detail) === null || _e === void 0 ? void 0 : _e.basis) === 'function') {
39
39
  basisNode = props.attributes.detail.basis(props.datasets.values, props);
40
40
  }
41
41
  else {
42
- const details = (_e = props.attributes.detail.basis) === null || _e === void 0 ? void 0 : _e.items;
43
- const renderBasisBottom = (_g = (_f = props.attributes.detail) === null || _f === void 0 ? void 0 : _f.basis) === null || _g === void 0 ? void 0 : _g.renderBottom;
44
- let title = (_l = (_j = (_h = values === null || values === void 0 ? void 0 : values.title) !== null && _h !== void 0 ? _h : values === null || values === void 0 ? void 0 : values.name) !== null && _j !== void 0 ? _j : (_k = props.attributes) === null || _k === void 0 ? void 0 : _k.title) !== null && _l !== void 0 ? _l : '-';
45
- let subTitle = (_m = values === null || values === void 0 ? void 0 : values.subTitle) !== null && _m !== void 0 ? _m : (_o = props.attributes) === null || _o === void 0 ? void 0 : _o.subTitle;
46
- if (!!((_q = (_p = props.attributes.detail) === null || _p === void 0 ? void 0 : _p.basis) === null || _q === void 0 ? void 0 : _q.title)) {
42
+ const details = (_f = props.attributes.detail.basis) === null || _f === void 0 ? void 0 : _f.items;
43
+ const renderBasisBottom = (_h = (_g = props.attributes.detail) === null || _g === void 0 ? void 0 : _g.basis) === null || _h === void 0 ? void 0 : _h.renderBottom;
44
+ let title = (_m = (_k = (_j = values === null || values === void 0 ? void 0 : values.title) !== null && _j !== void 0 ? _j : values === null || values === void 0 ? void 0 : values.name) !== null && _k !== void 0 ? _k : (_l = props.attributes) === null || _l === void 0 ? void 0 : _l.title) !== null && _m !== void 0 ? _m : '-';
45
+ let subTitle = (_o = values === null || values === void 0 ? void 0 : values.subTitle) !== null && _o !== void 0 ? _o : (_p = props.attributes) === null || _p === void 0 ? void 0 : _p.subTitle;
46
+ if (!!((_r = (_q = props.attributes.detail) === null || _q === void 0 ? void 0 : _q.basis) === null || _r === void 0 ? void 0 : _r.title)) {
47
47
  const title_ = props.attributes.detail.basis.title;
48
48
  if (typeof title_ === 'function') {
49
49
  title = title_(values, props);
@@ -52,7 +52,7 @@ const DetailPage = (props) => {
52
52
  title = title_;
53
53
  }
54
54
  }
55
- if (!!((_s = (_r = props.attributes.detail) === null || _r === void 0 ? void 0 : _r.basis) === null || _s === void 0 ? void 0 : _s.subTitle)) {
55
+ if (!!((_t = (_s = props.attributes.detail) === null || _s === void 0 ? void 0 : _s.basis) === null || _t === void 0 ? void 0 : _t.subTitle)) {
56
56
  const subTitle_ = props.attributes.detail.basis.subTitle;
57
57
  if (typeof subTitle_ === 'function') {
58
58
  subTitle = subTitle_(values, props);
@@ -61,26 +61,41 @@ const DetailPage = (props) => {
61
61
  subTitle = subTitle_;
62
62
  }
63
63
  }
64
- basisNode = (react_1.default.createElement(react_1.default.Fragment, null,
65
- react_1.default.createElement(components_1.Card.Information, { title: !isMobile ? title : (react_1.default.createElement("div", null,
66
- react_1.default.createElement(icons_1.ArrowLeftOutlined, { style: { marginRight: 8 }, onClick: () => { var _a, _b, _c, _d, _e; return (_e = (_d = (_c = (_b = (_a = window) === null || _a === void 0 ? void 0 : _a.__DOREAMONJS_SDK) === null || _b === void 0 ? void 0 : _b.shared) === null || _c === void 0 ? void 0 : _c.router) === null || _d === void 0 ? void 0 : _d.goBack) === null || _e === void 0 ? void 0 : _e.call(_d); } }),
67
- react_1.default.createElement("div", { style: { display: 'inline-block' } }, title))), subTitle: subTitle, actions: props.attributes.actions, allowActionTypes: ['custom'], column: (_v = (_u = (_t = props.attributes.detail) === null || _t === void 0 ? void 0 : _t.basis) === null || _u === void 0 ? void 0 : _u.column) !== null && _v !== void 0 ? _v : 2, items: details, data: values, onActionClick: (action, values) => {
68
- props.onActionTrigger(action, {
69
- values,
70
- });
71
- } }),
72
- !!renderBasisBottom && (react_1.default.createElement("div", { style: {
73
- padding: 24,
74
- paddingTop: 0,
75
- } }, renderBasisBottom(values, props)))));
64
+ if (((_v = (_u = props.attributes.detail) === null || _u === void 0 ? void 0 : _u.basis) === null || _v === void 0 ? void 0 : _v.hideContentInMobile) && isMobile) {
65
+ basisNode = (react_1.default.createElement(react_1.default.Fragment, null,
66
+ react_1.default.createElement(components_1.Card, { title: !isMobile ? title : (react_1.default.createElement("div", null,
67
+ react_1.default.createElement(icons_1.ArrowLeftOutlined, { style: { marginRight: 8 }, onClick: () => { var _a, _b, _c, _d, _e; return (_e = (_d = (_c = (_b = (_a = window) === null || _a === void 0 ? void 0 : _a.__DOREAMONJS_SDK) === null || _b === void 0 ? void 0 : _b.shared) === null || _c === void 0 ? void 0 : _c.router) === null || _d === void 0 ? void 0 : _d.goBack) === null || _e === void 0 ? void 0 : _e.call(_d); } }),
68
+ react_1.default.createElement("div", { style: { display: 'inline-block' } }, title))), bodyStyle: {
69
+ paddingTop: 0,
70
+ paddingBottom: 0,
71
+ } }),
72
+ !!renderBasisBottom && (react_1.default.createElement("div", { style: {
73
+ padding: 24,
74
+ paddingTop: 0,
75
+ } }, renderBasisBottom(values, props)))));
76
+ }
77
+ else {
78
+ basisNode = (react_1.default.createElement(react_1.default.Fragment, null,
79
+ react_1.default.createElement(components_1.Card.Information, { title: !isMobile ? title : (react_1.default.createElement("div", null,
80
+ react_1.default.createElement(icons_1.ArrowLeftOutlined, { style: { marginRight: 8 }, onClick: () => { var _a, _b, _c, _d, _e; return (_e = (_d = (_c = (_b = (_a = window) === null || _a === void 0 ? void 0 : _a.__DOREAMONJS_SDK) === null || _b === void 0 ? void 0 : _b.shared) === null || _c === void 0 ? void 0 : _c.router) === null || _d === void 0 ? void 0 : _d.goBack) === null || _e === void 0 ? void 0 : _e.call(_d); } }),
81
+ react_1.default.createElement("div", { style: { display: 'inline-block' } }, title))), subTitle: subTitle, actions: props.attributes.actions, allowActionTypes: ['custom'], column: (_y = (_x = (_w = props.attributes.detail) === null || _w === void 0 ? void 0 : _w.basis) === null || _x === void 0 ? void 0 : _x.column) !== null && _y !== void 0 ? _y : 2, items: details, data: values, onActionClick: (action, values) => {
82
+ props.onActionTrigger(action, {
83
+ values,
84
+ });
85
+ } }),
86
+ !!renderBasisBottom && (react_1.default.createElement("div", { style: {
87
+ padding: 24,
88
+ paddingTop: 0,
89
+ } }, renderBasisBottom(values, props)))));
90
+ }
76
91
  }
77
92
  let detailNode = null;
78
93
  if (typeof props.attributes.detail.modules === 'function') {
79
94
  detailNode = props.attributes.detail.modules(values, props);
80
95
  }
81
96
  else {
82
- const defaultTab = (_w = props.attributes.detail.modules) === null || _w === void 0 ? void 0 : _w.default;
83
- const tabs = (_y = (_x = props.attributes.detail.modules) === null || _x === void 0 ? void 0 : _x.items) === null || _y === void 0 ? void 0 : _y.filter((tab, index) => {
97
+ const defaultTab = (_z = props.attributes.detail.modules) === null || _z === void 0 ? void 0 : _z.default;
98
+ const tabs = (_1 = (_0 = props.attributes.detail.modules) === null || _0 === void 0 ? void 0 : _0.items) === null || _1 === void 0 ? void 0 : _1.filter((tab, index) => {
84
99
  let isVisible = tab.visible;
85
100
  if (typeof tab.visible === 'function') {
86
101
  isVisible = tab.visible(values, tab, index, props);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doreamonjs/page-detail",
3
- "version": "1.12.71",
3
+ "version": "1.12.72",
4
4
  "description": "detail page",
5
5
  "keywords": [
6
6
  "doreamonjs",
@@ -80,5 +80,5 @@
80
80
  "xterm-addon-attach": "^0.6.0",
81
81
  "xterm-addon-fit": "^0.5.0"
82
82
  },
83
- "gitHead": "fb118df3ce6f840c6b65b03def616b1083b73152"
83
+ "gitHead": "7b391cad39e39dab8b40407683463dbadb028101"
84
84
  }