@doreamonjs/page-detail 1.10.85 → 1.10.88

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,25 @@
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.10.88](https://github.com/doreamonjs/doreamon/compare/v1.10.87...v1.10.88) (2024-02-26)
7
+
8
+ **Note:** Version bump only for package @doreamonjs/page-detail
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.10.86](https://github.com/doreamonjs/doreamon/compare/v1.10.85...v1.10.86) (2024-02-26)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **page:** page-detail subTitle should not have default value ([0d90ff5](https://github.com/doreamonjs/doreamon/commit/0d90ff53c1aa362e8c31e4af36f0c7609968ff39))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.10.85](https://github.com/doreamonjs/doreamon/compare/v1.10.84...v1.10.85) (2024-02-23)
7
26
 
8
27
  **Note:** Version bump only for package @doreamonjs/page-detail
package/lib/index.js CHANGED
@@ -11,11 +11,11 @@ const antd_1 = require("antd");
11
11
  require("./index.less");
12
12
  const componentName = 'doreamonjs-design-page-detail';
13
13
  const DetailPage = (props) => {
14
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
14
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
15
15
  const values = (_b = (_a = props === null || props === void 0 ? void 0 : props.datasets) === null || _a === void 0 ? void 0 : _a.values) !== null && _b !== void 0 ? _b : {};
16
16
  let title = (_f = (_d = (_c = values === null || values === void 0 ? void 0 : values.title) !== null && _c !== void 0 ? _c : values === null || values === void 0 ? void 0 : values.name) !== null && _d !== void 0 ? _d : (_e = props.attributes) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : '-';
17
- let subTitle = (_j = (_g = values === null || values === void 0 ? void 0 : values.subTitle) !== null && _g !== void 0 ? _g : (_h = props.attributes) === null || _h === void 0 ? void 0 : _h.subTitle) !== null && _j !== void 0 ? _j : '-';
18
- if (!!((_l = (_k = props.attributes.detail) === null || _k === void 0 ? void 0 : _k.basis) === null || _l === void 0 ? void 0 : _l.title)) {
17
+ let subTitle = (_g = values === null || values === void 0 ? void 0 : values.subTitle) !== null && _g !== void 0 ? _g : (_h = props.attributes) === null || _h === void 0 ? void 0 : _h.subTitle;
18
+ if (!!((_k = (_j = props.attributes.detail) === null || _j === void 0 ? void 0 : _j.basis) === null || _k === void 0 ? void 0 : _k.title)) {
19
19
  const title_ = props.attributes.detail.basis.title;
20
20
  if (typeof title_ === 'function') {
21
21
  title = title_(values, props);
@@ -24,7 +24,7 @@ const DetailPage = (props) => {
24
24
  title = title_;
25
25
  }
26
26
  }
27
- if (!!((_o = (_m = props.attributes.detail) === null || _m === void 0 ? void 0 : _m.basis) === null || _o === void 0 ? void 0 : _o.subTitle)) {
27
+ if (!!((_m = (_l = props.attributes.detail) === null || _l === void 0 ? void 0 : _l.basis) === null || _m === void 0 ? void 0 : _m.subTitle)) {
28
28
  const subTitle_ = props.attributes.detail.basis.subTitle;
29
29
  if (typeof subTitle_ === 'function') {
30
30
  subTitle = subTitle_(values, props);
@@ -33,9 +33,9 @@ const DetailPage = (props) => {
33
33
  subTitle = subTitle_;
34
34
  }
35
35
  }
36
- const details = (_p = props.attributes.detail.basis) === null || _p === void 0 ? void 0 : _p.items;
37
- const defaultTab = (_q = props.attributes.detail.modules) === null || _q === void 0 ? void 0 : _q.default;
38
- const tabs = (_s = (_r = props.attributes.detail.modules) === null || _r === void 0 ? void 0 : _r.items) === null || _s === void 0 ? void 0 : _s.filter((tab, index) => {
36
+ const details = (_o = props.attributes.detail.basis) === null || _o === void 0 ? void 0 : _o.items;
37
+ const defaultTab = (_p = props.attributes.detail.modules) === null || _p === void 0 ? void 0 : _p.default;
38
+ const tabs = (_r = (_q = props.attributes.detail.modules) === null || _q === void 0 ? void 0 : _q.items) === null || _r === void 0 ? void 0 : _r.filter((tab, index) => {
39
39
  let isVisible = tab.visible;
40
40
  if (typeof tab.visible === 'function') {
41
41
  isVisible = tab.visible(values, tab, index, props);
@@ -49,7 +49,7 @@ const DetailPage = (props) => {
49
49
  },
50
50
  };
51
51
  });
52
- if (+((_t = doreamon_1.default.dom.router.getQuery()) === null || _t === void 0 ? void 0 : _t.id) !== (values === null || values === void 0 ? void 0 : values.id)) {
52
+ if (+((_s = doreamon_1.default.dom.router.getQuery()) === null || _s === void 0 ? void 0 : _s.id) !== (values === null || values === void 0 ? void 0 : values.id)) {
53
53
  return (react_1.default.createElement("div", { style: {
54
54
  width: '100%',
55
55
  height: '500px',
@@ -59,7 +59,7 @@ const DetailPage = (props) => {
59
59
  react_1.default.createElement(antd_1.Skeleton, { paragraph: { rows: 10 } })));
60
60
  }
61
61
  return (react_1.default.createElement("div", { className: doreamon_1.default.classnames('page', componentName, props.className) },
62
- react_1.default.createElement(components_1.Card.Information, { title: title, subTitle: subTitle, actions: props.attributes.actions, allowActionTypes: ['custom'], column: (_w = (_v = (_u = props.attributes.detail) === null || _u === void 0 ? void 0 : _u.basis) === null || _v === void 0 ? void 0 : _v.column) !== null && _w !== void 0 ? _w : 2, items: details, data: values, onActionClick: (action, values) => {
62
+ react_1.default.createElement(components_1.Card.Information, { title: 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) => {
63
63
  props.onActionTrigger(action, {
64
64
  values,
65
65
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doreamonjs/page-detail",
3
- "version": "1.10.85",
3
+ "version": "1.10.88",
4
4
  "description": "detail page",
5
5
  "keywords": [
6
6
  "doreamonjs",
@@ -71,7 +71,7 @@
71
71
  "@znode/fs": "^1.0.2"
72
72
  },
73
73
  "dependencies": {
74
- "@doreamonjs/components": "^1.10.84",
74
+ "@doreamonjs/components": "^1.10.88",
75
75
  "@zodash/doreamon": "^1.1.5",
76
76
  "antd": "4.18.9",
77
77
  "react-monaco-editor": "^0.50.1",
@@ -80,5 +80,5 @@
80
80
  "xterm-addon-attach": "^0.6.0",
81
81
  "xterm-addon-fit": "^0.5.0"
82
82
  },
83
- "gitHead": "8a205edd48829490b5081736d24fdb122837c4cc"
83
+ "gitHead": "b95c724d3e43dea924e902b2893d4bb370fe886d"
84
84
  }