@pisell/private-materials 3.4.103 → 3.4.104

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.
Files changed (191) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  10. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  11. package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +1 -0
  12. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  13. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  14. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  15. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  16. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  17. package/es/components/booking/forms/single/index.d.ts +1 -0
  18. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  19. package/es/components/booking/info/notes/index.d.ts +1 -0
  20. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  21. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  22. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  23. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  24. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  25. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  26. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  27. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  28. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  29. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  30. package/es/components/ecocup/components/CupInfoCard/index.d.ts +1 -0
  31. package/es/components/ecocup/components/CustomerCard/index.d.ts +1 -0
  32. package/es/components/ecocup/components/MoreDropdown/index.d.ts +0 -1
  33. package/es/components/ecocup/cupList/hooks/useColumns.d.ts +0 -1
  34. package/es/components/ecocup/cupList/hooks/useSummary.d.ts +0 -1
  35. package/es/components/eftpos/hooks.d.ts +1 -0
  36. package/es/components/eftpos/index.d.ts +1 -0
  37. package/es/components/eftpos/pos.d.ts +1 -0
  38. package/es/components/eftposPay/amount.d.ts +1 -0
  39. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  40. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  41. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  42. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  43. package/es/components/eftposPay/payo/config.d.ts +1 -0
  44. package/es/components/eftposPay/tip.d.ts +1 -0
  45. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  46. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  47. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  48. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  49. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  50. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  51. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  52. package/es/components/login/index.d.ts +1 -0
  53. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  54. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  55. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  56. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  57. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  58. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  59. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  60. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  61. package/es/components/schedules/calendar/index.d.ts +1 -0
  62. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  63. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  64. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  65. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  66. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  67. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  68. package/es/components/schedules/products/index.d.ts +1 -0
  69. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  70. package/es/components/schedules/products/list/index.d.ts +1 -0
  71. package/es/components/schedules/resources/index.d.ts +1 -0
  72. package/es/components/schedules/resources/list/index.d.ts +1 -0
  73. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  74. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  75. package/es/components/schedules/schedules/index.d.ts +1 -0
  76. package/es/components/shoppingCart/index.d.ts +1 -0
  77. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  78. package/es/hooks/usePaymentLogger.d.ts +1 -0
  79. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
  80. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
  81. package/es/plus/orderList/components/HandleActions.d.ts +0 -1
  82. package/es/plus/orderList/components/QuickFilter.d.ts +0 -1
  83. package/es/plus/orderList/components/Reset.d.ts +0 -1
  84. package/es/plus/orderList/components/Toolbar.d.ts +0 -1
  85. package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  86. package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.js +169 -8
  87. package/es/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.less +141 -5
  88. package/es/plus/saasDevice/devicePlanning/locales.d.ts +125 -0
  89. package/es/plus/saasDevice/devicePlanning/locales.js +125 -0
  90. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  91. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  92. package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
  93. package/es/plus/saasRegister/components/Header.d.ts +1 -0
  94. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  95. package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  96. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  97. package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +1 -0
  98. package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  99. package/es/pro/pisellPaymentList/example.d.ts +1 -0
  100. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  101. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  102. package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +1 -0
  103. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  104. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  105. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  106. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  107. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  108. package/lib/components/booking/forms/single/index.d.ts +1 -0
  109. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  110. package/lib/components/booking/info/notes/index.d.ts +1 -0
  111. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  112. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  113. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  114. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  115. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  116. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  117. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  118. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  119. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  120. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  121. package/lib/components/ecocup/components/CupInfoCard/index.d.ts +1 -0
  122. package/lib/components/ecocup/components/CustomerCard/index.d.ts +1 -0
  123. package/lib/components/ecocup/components/MoreDropdown/index.d.ts +0 -1
  124. package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +0 -1
  125. package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +0 -1
  126. package/lib/components/eftpos/hooks.d.ts +1 -0
  127. package/lib/components/eftpos/index.d.ts +1 -0
  128. package/lib/components/eftpos/pos.d.ts +1 -0
  129. package/lib/components/eftposPay/amount.d.ts +1 -0
  130. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  131. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  132. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  133. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  134. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  135. package/lib/components/eftposPay/tip.d.ts +1 -0
  136. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  137. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  138. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  139. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  140. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  141. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  142. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  143. package/lib/components/login/index.d.ts +1 -0
  144. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  145. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  146. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  147. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  148. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  149. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  150. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  151. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  152. package/lib/components/schedules/calendar/index.d.ts +1 -0
  153. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  154. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  155. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  156. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  157. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  158. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  159. package/lib/components/schedules/products/index.d.ts +1 -0
  160. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  161. package/lib/components/schedules/products/list/index.d.ts +1 -0
  162. package/lib/components/schedules/resources/index.d.ts +1 -0
  163. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  164. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  165. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  166. package/lib/components/schedules/schedules/index.d.ts +1 -0
  167. package/lib/components/shoppingCart/index.d.ts +1 -0
  168. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  169. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  170. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
  171. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
  172. package/lib/plus/orderList/components/HandleActions.d.ts +0 -1
  173. package/lib/plus/orderList/components/QuickFilter.d.ts +0 -1
  174. package/lib/plus/orderList/components/Reset.d.ts +0 -1
  175. package/lib/plus/orderList/components/Toolbar.d.ts +0 -1
  176. package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  177. package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.js +174 -16
  178. package/lib/plus/saasDevice/devicePlanning/components/DeviceDetailDrawer/index.less +141 -5
  179. package/lib/plus/saasDevice/devicePlanning/locales.d.ts +125 -0
  180. package/lib/plus/saasDevice/devicePlanning/locales.js +125 -0
  181. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  182. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  183. package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
  184. package/lib/plus/saasRegister/components/Header.d.ts +1 -0
  185. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  186. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  187. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  188. package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +1 -0
  189. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  190. package/lib/pro/pisellPaymentList/example.d.ts +1 -0
  191. package/package.json +3 -3
@@ -1,9 +1,121 @@
1
- import React from 'react';
2
- import { Drawer } from 'antd';
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import React, { useMemo } from 'react';
8
+ import { Card, Drawer, Empty } from 'antd';
3
9
  import { Button, Icon, Tag } from '@pisell/materials';
4
10
  import { CloseOutlined } from '@ant-design/icons';
5
11
  import classNames from 'classnames';
6
12
  import "./index.less";
13
+ var EMPTY_VALUE = '-';
14
+ var BYTE_PER_GB = 1024 * 1024 * 1024;
15
+ var REPORT_GROUPS = [{
16
+ key: 'software',
17
+ fields: [{
18
+ key: 'name'
19
+ }, {
20
+ key: 'version'
21
+ }]
22
+ }, {
23
+ key: 'battery',
24
+ fields: [{
25
+ key: 'level',
26
+ value: function value(data, getText) {
27
+ return renderBatteryValue(data, getText);
28
+ }
29
+ }]
30
+ }, {
31
+ key: 'network',
32
+ fields: [{
33
+ key: 'type'
34
+ }, {
35
+ key: 'local_ip'
36
+ }, {
37
+ key: 'gateway'
38
+ }, {
39
+ key: 'subnet_mask'
40
+ }, {
41
+ key: 'ssid'
42
+ }]
43
+ }, {
44
+ key: 'hardware',
45
+ fields: [{
46
+ key: 'model'
47
+ }, {
48
+ key: 'os_version'
49
+ }]
50
+ }, {
51
+ key: 'storage',
52
+ fields: [{
53
+ key: 'used',
54
+ value: function value(data) {
55
+ return formatStorageValue(data.used);
56
+ }
57
+ }, {
58
+ key: 'total',
59
+ value: function value(data) {
60
+ return formatStorageValue(data.total);
61
+ }
62
+ }]
63
+ }];
64
+ var isPlainObject = function isPlainObject(value) {
65
+ return Object.prototype.toString.call(value) === '[object Object]';
66
+ };
67
+ var getReportText = function getReportText(getText, key) {
68
+ return getText("pisell2.saas.device-planning.detail.report.".concat(key));
69
+ };
70
+ var formatReportValue = function formatReportValue(value, getText) {
71
+ if (value === null || value === undefined || value === '') {
72
+ return EMPTY_VALUE;
73
+ }
74
+ if (typeof value === 'boolean') {
75
+ return getText("pisell2.saas.device-planning.detail.".concat(value ? 'yes' : 'no'));
76
+ }
77
+ if (Array.isArray(value) || isPlainObject(value)) {
78
+ return /*#__PURE__*/React.createElement("span", {
79
+ className: "device-detail-drawer__json-value"
80
+ }, JSON.stringify(value));
81
+ }
82
+ return String(value);
83
+ };
84
+ var formatStorageValue = function formatStorageValue(value) {
85
+ var byteValue = typeof value === 'number' || typeof value === 'string' ? Number(value) : Number.NaN;
86
+ if (!Number.isFinite(byteValue)) {
87
+ return EMPTY_VALUE;
88
+ }
89
+ var gbValue = byteValue / BYTE_PER_GB;
90
+ var text = gbValue >= 10 ? String(Math.round(gbValue)) : gbValue.toFixed(2).replace(/\.?0+$/, '');
91
+ return "".concat(text, " GB");
92
+ };
93
+ var formatLastSeen = function formatLastSeen(value) {
94
+ return typeof value === 'string' && value.trim() ? value : EMPTY_VALUE;
95
+ };
96
+ var renderBatteryValue = function renderBatteryValue(data, getText) {
97
+ var rawLevel = typeof data.level === 'number' || typeof data.level === 'string' ? Number(data.level) : Number.NaN;
98
+ var hasLevel = Number.isFinite(rawLevel);
99
+ var levelValue = hasLevel ? Math.max(0, Math.min(rawLevel, 100)) : 0;
100
+ var level = hasLevel ? "".concat(rawLevel, "%") : EMPTY_VALUE;
101
+ var charging = (data === null || data === void 0 ? void 0 : data.charging) === true;
102
+ return /*#__PURE__*/React.createElement("span", {
103
+ className: "device-detail-drawer__battery-value"
104
+ }, /*#__PURE__*/React.createElement("span", {
105
+ className: classNames('device-detail-drawer__battery-icon', {
106
+ 'is-charging': charging
107
+ })
108
+ }, /*#__PURE__*/React.createElement("span", {
109
+ className: "device-detail-drawer__battery-fill",
110
+ style: {
111
+ width: "".concat(levelValue, "%")
112
+ }
113
+ }), charging ? /*#__PURE__*/React.createElement("span", {
114
+ className: "device-detail-drawer__battery-bolt"
115
+ }) : null), /*#__PURE__*/React.createElement("span", null, level), /*#__PURE__*/React.createElement("span", {
116
+ className: "device-detail-drawer__battery-status"
117
+ }, getReportText(getText, charging ? 'charging' : 'not-charging')));
118
+ };
7
119
  var DeviceDetailDrawer = function DeviceDetailDrawer(_ref) {
8
120
  var _device$type;
9
121
  var open = _ref.open,
@@ -14,7 +126,21 @@ var DeviceDetailDrawer = function DeviceDetailDrawer(_ref) {
14
126
  onEdit = _ref.onEdit,
15
127
  onDelete = _ref.onDelete;
16
128
  var device = record === null || record === void 0 ? void 0 : record._raw;
129
+ var reportData = device === null || device === void 0 ? void 0 : device.data;
17
130
  var online = (record === null || record === void 0 ? void 0 : record.status) === 'online';
131
+ var lastSeen = formatLastSeen(device === null || device === void 0 ? void 0 : device.last_seen);
132
+ var reportGroups = useMemo(function () {
133
+ if (!isPlainObject(reportData)) return [];
134
+ return REPORT_GROUPS.reduce(function (list, group) {
135
+ var data = reportData[group.key];
136
+ if (isPlainObject(data)) {
137
+ list.push(_objectSpread(_objectSpread({}, group), {}, {
138
+ data: data
139
+ }));
140
+ }
141
+ return list;
142
+ }, []);
143
+ }, [reportData]);
18
144
  return /*#__PURE__*/React.createElement(Drawer, {
19
145
  open: open,
20
146
  onClose: onClose,
@@ -51,9 +177,11 @@ var DeviceDetailDrawer = function DeviceDetailDrawer(_ref) {
51
177
  onClick: onClose
52
178
  })), /*#__PURE__*/React.createElement("div", {
53
179
  className: "device-detail-drawer__content"
180
+ }, /*#__PURE__*/React.createElement(Card, {
181
+ size: "small",
182
+ title: getText('pisell2.saas.device-planning.detail.basic-info'),
183
+ className: "device-detail-drawer__card"
54
184
  }, /*#__PURE__*/React.createElement("div", {
55
- className: "device-detail-drawer__section-title"
56
- }, getText('pisell2.saas.device-planning.detail.basic-info')), /*#__PURE__*/React.createElement("div", {
57
185
  className: "device-detail-drawer__info-list"
58
186
  }, /*#__PURE__*/React.createElement("div", {
59
187
  className: "device-detail-drawer__info-row"
@@ -67,9 +195,11 @@ var DeviceDetailDrawer = function DeviceDetailDrawer(_ref) {
67
195
  className: "device-detail-drawer__profile-card"
68
196
  }, /*#__PURE__*/React.createElement(Icon, {
69
197
  type: "FileTextOutlined"
70
- }), record.profileName))), /*#__PURE__*/React.createElement("div", {
71
- className: "device-detail-drawer__section-title"
72
- }, getText('pisell2.saas.device-planning.detail.status')), /*#__PURE__*/React.createElement("div", {
198
+ }), record.profileName)))), /*#__PURE__*/React.createElement(Card, {
199
+ size: "small",
200
+ title: getText('pisell2.saas.device-planning.detail.status'),
201
+ className: "device-detail-drawer__card"
202
+ }, /*#__PURE__*/React.createElement("div", {
73
203
  className: "device-detail-drawer__info-list"
74
204
  }, /*#__PURE__*/React.createElement("div", {
75
205
  className: "device-detail-drawer__info-row"
@@ -86,7 +216,38 @@ var DeviceDetailDrawer = function DeviceDetailDrawer(_ref) {
86
216
  className: classNames('device-detail-drawer__status-dot', {
87
217
  'is-online': online
88
218
  })
89
- }), getText("pisell2.saas.device-planning.status.".concat(record.status)) || record.status)))), /*#__PURE__*/React.createElement("div", {
219
+ }), getText("pisell2.saas.device-planning.status.".concat(record.status)) || record.status)))), /*#__PURE__*/React.createElement(Card, {
220
+ size: "small",
221
+ title: getText('pisell2.saas.device-planning.detail.report-info'),
222
+ extra: /*#__PURE__*/React.createElement("span", {
223
+ className: "device-detail-drawer__last-seen"
224
+ }, getText('pisell2.saas.device-planning.detail.last-seen'), lastSeen),
225
+ className: "device-detail-drawer__card"
226
+ }, reportGroups.length > 0 ? /*#__PURE__*/React.createElement("div", {
227
+ className: "device-detail-drawer__report-list"
228
+ }, reportGroups.map(function (group) {
229
+ return /*#__PURE__*/React.createElement(Card, {
230
+ key: group.key,
231
+ size: "small",
232
+ type: "inner",
233
+ title: getReportText(getText, "group.".concat(group.key)),
234
+ className: "device-detail-drawer__report-card"
235
+ }, /*#__PURE__*/React.createElement("div", {
236
+ className: "device-detail-drawer__report-rows"
237
+ }, group.fields.map(function (field) {
238
+ return /*#__PURE__*/React.createElement("div", {
239
+ key: field.key,
240
+ className: "device-detail-drawer__report-row"
241
+ }, /*#__PURE__*/React.createElement("span", {
242
+ className: "device-detail-drawer__report-label"
243
+ }, getReportText(getText, "field.".concat(field.key))), /*#__PURE__*/React.createElement("span", {
244
+ className: "device-detail-drawer__report-value"
245
+ }, field.value ? field.value(group.data, getText) : formatReportValue(group.data[field.key], getText)));
246
+ })));
247
+ })) : /*#__PURE__*/React.createElement(Empty, {
248
+ image: Empty.PRESENTED_IMAGE_SIMPLE,
249
+ description: getText('pisell2.saas.device-planning.detail.no-report-info')
250
+ }))), /*#__PURE__*/React.createElement("div", {
90
251
  className: "device-detail-drawer__footer"
91
252
  }, /*#__PURE__*/React.createElement(Button, {
92
253
  danger: true,
@@ -61,14 +61,32 @@
61
61
  &__content {
62
62
  flex: 1;
63
63
  min-height: 0;
64
- padding: 20px 24px;
64
+ padding: 20px 10px;
65
65
  overflow: auto;
66
+ background: #f5f6f8;
66
67
  }
67
68
 
68
- &__section-title {
69
- margin: 10px 0 12px;
70
- font-size: 13px;
71
- color: rgba(0, 0, 0, 0.45);
69
+ &__card {
70
+ border-radius: 10px;
71
+
72
+ & + & {
73
+ margin-top: 12px;
74
+ }
75
+
76
+ .ant-card-head {
77
+ min-height: 42px;
78
+ padding: 0 16px;
79
+ }
80
+
81
+ .ant-card-head-title {
82
+ padding: 10px 0;
83
+ font-size: 14px;
84
+ font-weight: 600;
85
+ }
86
+
87
+ .ant-card-body {
88
+ padding: 16px;
89
+ }
72
90
  }
73
91
 
74
92
  &__info-list {
@@ -123,6 +141,124 @@
123
141
  color: rgba(0, 0, 0, 0.72);
124
142
  }
125
143
 
144
+ &__report-list {
145
+ display: flex;
146
+ flex-direction: column;
147
+ gap: 12px;
148
+ }
149
+
150
+ &__last-seen {
151
+ font-size: 12px;
152
+ font-weight: 400;
153
+ color: rgba(0, 0, 0, 0.45);
154
+ }
155
+
156
+ &__report-card {
157
+ border-radius: 8px;
158
+ background: #fafafa;
159
+
160
+ .ant-card-head {
161
+ min-height: 38px;
162
+ padding: 0 12px;
163
+ }
164
+
165
+ .ant-card-head-title {
166
+ padding: 8px 0;
167
+ font-size: 13px;
168
+ font-weight: 600;
169
+ }
170
+
171
+ .ant-card-body {
172
+ padding: 12px;
173
+ }
174
+ }
175
+
176
+ &__report-rows {
177
+ display: flex;
178
+ flex-direction: column;
179
+ gap: 12px;
180
+ }
181
+
182
+ &__report-row {
183
+ display: flex;
184
+ align-items: center;
185
+ justify-content: space-between;
186
+ gap: 16px;
187
+ font-size: 14px;
188
+ }
189
+
190
+ &__report-label {
191
+ flex-shrink: 0;
192
+ color: rgba(0, 0, 0, 0.55);
193
+ }
194
+
195
+ &__report-value,
196
+ &__json-value {
197
+ min-width: 0;
198
+ color: rgba(0, 0, 0, 0.88);
199
+ text-align: right;
200
+ word-break: break-word;
201
+ }
202
+
203
+ &__battery-value {
204
+ display: inline-flex;
205
+ align-items: center;
206
+ justify-content: flex-end;
207
+ gap: 8px;
208
+ }
209
+
210
+ &__battery-icon {
211
+ position: relative;
212
+ box-sizing: border-box;
213
+ width: 24px;
214
+ height: 12px;
215
+ border: 1.5px solid rgba(0, 0, 0, 0.65);
216
+ border-radius: 3px;
217
+
218
+ &::before {
219
+ position: absolute;
220
+ top: 2px;
221
+ right: -4px;
222
+ width: 2px;
223
+ height: 6px;
224
+ border-radius: 0 2px 2px 0;
225
+ background: rgba(0, 0, 0, 0.65);
226
+ content: '';
227
+ }
228
+
229
+ &.is-charging {
230
+ border-color: #16a34a;
231
+
232
+ &::before {
233
+ background: #16a34a;
234
+ }
235
+ }
236
+ }
237
+
238
+ &__battery-fill {
239
+ position: absolute;
240
+ top: 2px;
241
+ left: 2px;
242
+ max-width: 17px;
243
+ height: 5px;
244
+ border-radius: 1px;
245
+ background: #16a34a;
246
+ }
247
+
248
+ &__battery-bolt {
249
+ position: absolute;
250
+ top: -3px;
251
+ left: 8px;
252
+ width: 7px;
253
+ height: 14px;
254
+ background: #f59e0b;
255
+ clip-path: polygon(45% 0, 100% 0, 62% 42%, 100% 42%, 35% 100%, 48% 56%, 0 56%);
256
+ }
257
+
258
+ &__battery-status {
259
+ color: #16a34a;
260
+ }
261
+
126
262
  &__online-status {
127
263
  display: inline-flex;
128
264
  align-items: center;
@@ -82,6 +82,31 @@ declare const _default: {
82
82
  'pisell2.saas.device-planning.detail.delete': string;
83
83
  'pisell2.saas.device-planning.detail.save': string;
84
84
  'pisell2.saas.device-planning.detail.cancel': string;
85
+ 'pisell2.saas.device-planning.detail.report-info': string;
86
+ 'pisell2.saas.device-planning.detail.last-seen': string;
87
+ 'pisell2.saas.device-planning.detail.no-report-info': string;
88
+ 'pisell2.saas.device-planning.detail.yes': string;
89
+ 'pisell2.saas.device-planning.detail.no': string;
90
+ 'pisell2.saas.device-planning.detail.report.group.software': string;
91
+ 'pisell2.saas.device-planning.detail.report.group.battery': string;
92
+ 'pisell2.saas.device-planning.detail.report.group.network': string;
93
+ 'pisell2.saas.device-planning.detail.report.group.hardware': string;
94
+ 'pisell2.saas.device-planning.detail.report.group.storage': string;
95
+ 'pisell2.saas.device-planning.detail.report.field.name': string;
96
+ 'pisell2.saas.device-planning.detail.report.field.type': string;
97
+ 'pisell2.saas.device-planning.detail.report.field.version': string;
98
+ 'pisell2.saas.device-planning.detail.report.field.level': string;
99
+ 'pisell2.saas.device-planning.detail.report.field.ssid': string;
100
+ 'pisell2.saas.device-planning.detail.report.field.gateway': string;
101
+ 'pisell2.saas.device-planning.detail.report.field.internet': string;
102
+ 'pisell2.saas.device-planning.detail.report.field.local_ip': string;
103
+ 'pisell2.saas.device-planning.detail.report.field.subnet_mask': string;
104
+ 'pisell2.saas.device-planning.detail.report.field.model': string;
105
+ 'pisell2.saas.device-planning.detail.report.field.os_version': string;
106
+ 'pisell2.saas.device-planning.detail.report.field.used': string;
107
+ 'pisell2.saas.device-planning.detail.report.field.total': string;
108
+ 'pisell2.saas.device-planning.detail.report.charging': string;
109
+ 'pisell2.saas.device-planning.detail.report.not-charging': string;
85
110
  'pisell2.saas.device-planning.edit.title': string;
86
111
  'pisell2.saas.device-planning.edit.online-title': string;
87
112
  'pisell2.saas.device-planning.edit.online-desc': string;
@@ -178,6 +203,31 @@ declare const _default: {
178
203
  'pisell2.saas.device-planning.detail.delete': string;
179
204
  'pisell2.saas.device-planning.detail.save': string;
180
205
  'pisell2.saas.device-planning.detail.cancel': string;
206
+ 'pisell2.saas.device-planning.detail.report-info': string;
207
+ 'pisell2.saas.device-planning.detail.last-seen': string;
208
+ 'pisell2.saas.device-planning.detail.no-report-info': string;
209
+ 'pisell2.saas.device-planning.detail.yes': string;
210
+ 'pisell2.saas.device-planning.detail.no': string;
211
+ 'pisell2.saas.device-planning.detail.report.group.software': string;
212
+ 'pisell2.saas.device-planning.detail.report.group.battery': string;
213
+ 'pisell2.saas.device-planning.detail.report.group.network': string;
214
+ 'pisell2.saas.device-planning.detail.report.group.hardware': string;
215
+ 'pisell2.saas.device-planning.detail.report.group.storage': string;
216
+ 'pisell2.saas.device-planning.detail.report.field.name': string;
217
+ 'pisell2.saas.device-planning.detail.report.field.type': string;
218
+ 'pisell2.saas.device-planning.detail.report.field.version': string;
219
+ 'pisell2.saas.device-planning.detail.report.field.level': string;
220
+ 'pisell2.saas.device-planning.detail.report.field.ssid': string;
221
+ 'pisell2.saas.device-planning.detail.report.field.gateway': string;
222
+ 'pisell2.saas.device-planning.detail.report.field.internet': string;
223
+ 'pisell2.saas.device-planning.detail.report.field.local_ip': string;
224
+ 'pisell2.saas.device-planning.detail.report.field.subnet_mask': string;
225
+ 'pisell2.saas.device-planning.detail.report.field.model': string;
226
+ 'pisell2.saas.device-planning.detail.report.field.os_version': string;
227
+ 'pisell2.saas.device-planning.detail.report.field.used': string;
228
+ 'pisell2.saas.device-planning.detail.report.field.total': string;
229
+ 'pisell2.saas.device-planning.detail.report.charging': string;
230
+ 'pisell2.saas.device-planning.detail.report.not-charging': string;
181
231
  'pisell2.saas.device-planning.edit.title': string;
182
232
  'pisell2.saas.device-planning.edit.online-title': string;
183
233
  'pisell2.saas.device-planning.edit.online-desc': string;
@@ -274,6 +324,31 @@ declare const _default: {
274
324
  'pisell2.saas.device-planning.detail.delete': string;
275
325
  'pisell2.saas.device-planning.detail.save': string;
276
326
  'pisell2.saas.device-planning.detail.cancel': string;
327
+ 'pisell2.saas.device-planning.detail.report-info': string;
328
+ 'pisell2.saas.device-planning.detail.last-seen': string;
329
+ 'pisell2.saas.device-planning.detail.no-report-info': string;
330
+ 'pisell2.saas.device-planning.detail.yes': string;
331
+ 'pisell2.saas.device-planning.detail.no': string;
332
+ 'pisell2.saas.device-planning.detail.report.group.software': string;
333
+ 'pisell2.saas.device-planning.detail.report.group.battery': string;
334
+ 'pisell2.saas.device-planning.detail.report.group.network': string;
335
+ 'pisell2.saas.device-planning.detail.report.group.hardware': string;
336
+ 'pisell2.saas.device-planning.detail.report.group.storage': string;
337
+ 'pisell2.saas.device-planning.detail.report.field.name': string;
338
+ 'pisell2.saas.device-planning.detail.report.field.type': string;
339
+ 'pisell2.saas.device-planning.detail.report.field.version': string;
340
+ 'pisell2.saas.device-planning.detail.report.field.level': string;
341
+ 'pisell2.saas.device-planning.detail.report.field.ssid': string;
342
+ 'pisell2.saas.device-planning.detail.report.field.gateway': string;
343
+ 'pisell2.saas.device-planning.detail.report.field.internet': string;
344
+ 'pisell2.saas.device-planning.detail.report.field.local_ip': string;
345
+ 'pisell2.saas.device-planning.detail.report.field.subnet_mask': string;
346
+ 'pisell2.saas.device-planning.detail.report.field.model': string;
347
+ 'pisell2.saas.device-planning.detail.report.field.os_version': string;
348
+ 'pisell2.saas.device-planning.detail.report.field.used': string;
349
+ 'pisell2.saas.device-planning.detail.report.field.total': string;
350
+ 'pisell2.saas.device-planning.detail.report.charging': string;
351
+ 'pisell2.saas.device-planning.detail.report.not-charging': string;
277
352
  'pisell2.saas.device-planning.edit.title': string;
278
353
  'pisell2.saas.device-planning.edit.online-title': string;
279
354
  'pisell2.saas.device-planning.edit.online-desc': string;
@@ -370,6 +445,31 @@ declare const _default: {
370
445
  'pisell2.saas.device-planning.detail.delete': string;
371
446
  'pisell2.saas.device-planning.detail.save': string;
372
447
  'pisell2.saas.device-planning.detail.cancel': string;
448
+ 'pisell2.saas.device-planning.detail.report-info': string;
449
+ 'pisell2.saas.device-planning.detail.last-seen': string;
450
+ 'pisell2.saas.device-planning.detail.no-report-info': string;
451
+ 'pisell2.saas.device-planning.detail.yes': string;
452
+ 'pisell2.saas.device-planning.detail.no': string;
453
+ 'pisell2.saas.device-planning.detail.report.group.software': string;
454
+ 'pisell2.saas.device-planning.detail.report.group.battery': string;
455
+ 'pisell2.saas.device-planning.detail.report.group.network': string;
456
+ 'pisell2.saas.device-planning.detail.report.group.hardware': string;
457
+ 'pisell2.saas.device-planning.detail.report.group.storage': string;
458
+ 'pisell2.saas.device-planning.detail.report.field.name': string;
459
+ 'pisell2.saas.device-planning.detail.report.field.type': string;
460
+ 'pisell2.saas.device-planning.detail.report.field.version': string;
461
+ 'pisell2.saas.device-planning.detail.report.field.level': string;
462
+ 'pisell2.saas.device-planning.detail.report.field.ssid': string;
463
+ 'pisell2.saas.device-planning.detail.report.field.gateway': string;
464
+ 'pisell2.saas.device-planning.detail.report.field.internet': string;
465
+ 'pisell2.saas.device-planning.detail.report.field.local_ip': string;
466
+ 'pisell2.saas.device-planning.detail.report.field.subnet_mask': string;
467
+ 'pisell2.saas.device-planning.detail.report.field.model': string;
468
+ 'pisell2.saas.device-planning.detail.report.field.os_version': string;
469
+ 'pisell2.saas.device-planning.detail.report.field.used': string;
470
+ 'pisell2.saas.device-planning.detail.report.field.total': string;
471
+ 'pisell2.saas.device-planning.detail.report.charging': string;
472
+ 'pisell2.saas.device-planning.detail.report.not-charging': string;
373
473
  'pisell2.saas.device-planning.edit.title': string;
374
474
  'pisell2.saas.device-planning.edit.online-title': string;
375
475
  'pisell2.saas.device-planning.edit.online-desc': string;
@@ -466,6 +566,31 @@ declare const _default: {
466
566
  'pisell2.saas.device-planning.detail.delete': string;
467
567
  'pisell2.saas.device-planning.detail.save': string;
468
568
  'pisell2.saas.device-planning.detail.cancel': string;
569
+ 'pisell2.saas.device-planning.detail.report-info': string;
570
+ 'pisell2.saas.device-planning.detail.last-seen': string;
571
+ 'pisell2.saas.device-planning.detail.no-report-info': string;
572
+ 'pisell2.saas.device-planning.detail.yes': string;
573
+ 'pisell2.saas.device-planning.detail.no': string;
574
+ 'pisell2.saas.device-planning.detail.report.group.software': string;
575
+ 'pisell2.saas.device-planning.detail.report.group.battery': string;
576
+ 'pisell2.saas.device-planning.detail.report.group.network': string;
577
+ 'pisell2.saas.device-planning.detail.report.group.hardware': string;
578
+ 'pisell2.saas.device-planning.detail.report.group.storage': string;
579
+ 'pisell2.saas.device-planning.detail.report.field.name': string;
580
+ 'pisell2.saas.device-planning.detail.report.field.type': string;
581
+ 'pisell2.saas.device-planning.detail.report.field.version': string;
582
+ 'pisell2.saas.device-planning.detail.report.field.level': string;
583
+ 'pisell2.saas.device-planning.detail.report.field.ssid': string;
584
+ 'pisell2.saas.device-planning.detail.report.field.gateway': string;
585
+ 'pisell2.saas.device-planning.detail.report.field.internet': string;
586
+ 'pisell2.saas.device-planning.detail.report.field.local_ip': string;
587
+ 'pisell2.saas.device-planning.detail.report.field.subnet_mask': string;
588
+ 'pisell2.saas.device-planning.detail.report.field.model': string;
589
+ 'pisell2.saas.device-planning.detail.report.field.os_version': string;
590
+ 'pisell2.saas.device-planning.detail.report.field.used': string;
591
+ 'pisell2.saas.device-planning.detail.report.field.total': string;
592
+ 'pisell2.saas.device-planning.detail.report.charging': string;
593
+ 'pisell2.saas.device-planning.detail.report.not-charging': string;
469
594
  'pisell2.saas.device-planning.edit.title': string;
470
595
  'pisell2.saas.device-planning.edit.online-title': string;
471
596
  'pisell2.saas.device-planning.edit.online-desc': string;