@pisell/materials 1.0.568 → 1.0.570

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.
@@ -241,7 +241,7 @@ var useActions = function useActions() {
241
241
  // 更新数据
242
242
  var update = useMemoizedFn( /*#__PURE__*/function () {
243
243
  var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(values) {
244
- var actions, updateApi, id;
244
+ var actions, updateApi, id, res;
245
245
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
246
246
  while (1) switch (_context4.prev = _context4.next) {
247
247
  case 0:
@@ -276,19 +276,28 @@ var useActions = function useActions() {
276
276
  });
277
277
  return _context4.abrupt("return", Promise.reject());
278
278
  case 15:
279
- return _context4.abrupt("return", updateNocobaseData({
279
+ _context4.prev = 15;
280
+ _context4.next = 18;
281
+ return updateNocobaseData({
280
282
  key: name,
281
283
  data: formatCreateUpdateParams(values),
282
284
  headers: getHeaders(),
283
285
  query: _objectSpread({
284
286
  filterByTk: id
285
287
  }, extraParams === null || extraParams === void 0 ? void 0 : extraParams.update)
286
- }));
287
- case 16:
288
+ });
289
+ case 18:
290
+ res = _context4.sent;
291
+ return _context4.abrupt("return", res);
292
+ case 22:
293
+ _context4.prev = 22;
294
+ _context4.t0 = _context4["catch"](15);
295
+ return _context4.abrupt("return", Promise.reject());
296
+ case 25:
288
297
  case "end":
289
298
  return _context4.stop();
290
299
  }
291
- }, _callee4);
300
+ }, _callee4, null, [[15, 22]]);
292
301
  }));
293
302
  return function (_x4) {
294
303
  return _ref12.apply(this, arguments);
@@ -15,7 +15,6 @@
15
15
  .saas-login-logo {
16
16
  width: fit-content;
17
17
  height: 48px;
18
- margin-bottom: 24px;
19
18
  border-radius: 8px;
20
19
 
21
20
  &.left {
@@ -42,7 +41,7 @@
42
41
  font-size: 24px;
43
42
  font-weight: 600;
44
43
  color: #101828;
45
- margin-top: 0;
44
+ margin-top: 24px;
46
45
  margin-bottom: 12px;
47
46
  }
48
47
 
@@ -80,6 +80,7 @@
80
80
  width: 40px;
81
81
  height: 40px;
82
82
  border-radius: 6px;
83
+ object-fit: contain;
83
84
  }
84
85
 
85
86
  .organization-tenant-switcher-switch-chevron {
@@ -66,7 +66,9 @@ var createNocobaseData = async (params) => {
66
66
  });
67
67
  };
68
68
  var formatQueryObjString = (query = {}) => {
69
- return Object.entries(query || {}).map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`).join("&");
69
+ return Object.entries(query || {}).map(
70
+ ([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`
71
+ ).join("&");
70
72
  };
71
73
  var getNocobaseData = async (params) => {
72
74
  const { key, query, headers } = params;
@@ -105,7 +107,10 @@ var customApi = async (url, data, options) => {
105
107
  const requestUrl = formatRequestUrl(url, baseUrl, queryString);
106
108
  const requestData = method === "GET" ? data : { ...body, ...data };
107
109
  const requestMethod = methodMap[method];
108
- return import_utils.request.getRequest()[requestMethod](requestUrl, requestData, { headers: requestHeaders, isCustomApi: true });
110
+ return import_utils.request.getRequest()[requestMethod](requestUrl, requestData, {
111
+ headers: requestHeaders,
112
+ isCustomApi: true
113
+ });
109
114
  };
110
115
  var updateNocobaseData = async (params) => {
111
116
  const { key, data, headers, query } = params;
@@ -181,12 +181,17 @@ var useActions = ({
181
181
  });
182
182
  return Promise.reject();
183
183
  }
184
- return (0, import_serve.updateNocobaseData)({
185
- key: name,
186
- data: formatCreateUpdateParams(values),
187
- headers: getHeaders(),
188
- query: { filterByTk: id, ...extraParams == null ? void 0 : extraParams.update }
189
- });
184
+ try {
185
+ const res = await (0, import_serve.updateNocobaseData)({
186
+ key: name,
187
+ data: formatCreateUpdateParams(values),
188
+ headers: getHeaders(),
189
+ query: { filterByTk: id, ...extraParams == null ? void 0 : extraParams.update }
190
+ });
191
+ return res;
192
+ } catch (error) {
193
+ return Promise.reject();
194
+ }
190
195
  }
191
196
  });
192
197
  const list = (0, import_ahooks.useMemoizedFn)(
@@ -15,7 +15,6 @@
15
15
  .saas-login-logo {
16
16
  width: fit-content;
17
17
  height: 48px;
18
- margin-bottom: 24px;
19
18
  border-radius: 8px;
20
19
 
21
20
  &.left {
@@ -42,7 +41,7 @@
42
41
  font-size: 24px;
43
42
  font-weight: 600;
44
43
  color: #101828;
45
- margin-top: 0;
44
+ margin-top: 24px;
46
45
  margin-bottom: 12px;
47
46
  }
48
47
 
@@ -80,6 +80,7 @@
80
80
  width: 40px;
81
81
  height: 40px;
82
82
  border-radius: 6px;
83
+ object-fit: contain;
83
84
  }
84
85
 
85
86
  .organization-tenant-switcher-switch-chevron {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.568",
3
+ "version": "1.0.570",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -70,8 +70,8 @@
70
70
  "swiper": "^8.4.7",
71
71
  "react-barcode": "^1.5.3",
72
72
  "@pisell/date-picker": "1.0.115",
73
- "@pisell/icon": "0.0.10",
74
- "@pisell/utils": "1.0.43"
73
+ "@pisell/utils": "1.0.43",
74
+ "@pisell/icon": "0.0.10"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "react": "^18.0.0",