@pisell/materials 1.0.757 → 1.0.758

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.
@@ -13,9 +13,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import React, { useEffect, useMemo } from 'react';
14
14
  import classNames from 'classnames';
15
15
  import { CheckCircleFilled, EditOutlined, ExclamationCircleOutlined, MoreOutlined } from '@ant-design/icons';
16
- import { Button, Dropdown, Form, Modal, Input, InputNumber, DatePicker } from 'antd';
16
+ import { Dropdown, Form, Input, InputNumber, DatePicker } from 'antd';
17
17
  import dayjs from 'dayjs';
18
18
  import Iconfont from "../iconfont";
19
+ import { PisellModal } from "../../index";
19
20
  import Amount from "../pisellText/components/Amount";
20
21
 
21
22
  // @ts-ignore
@@ -168,6 +169,7 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
168
169
  form.validateFields().then(function (values) {
169
170
  var _values$validDate;
170
171
  onConfirmEdit === null || onConfirmEdit === void 0 ? void 0 : onConfirmEdit(_objectSpread(_objectSpread({
172
+ id: id,
171
173
  name: name,
172
174
  storeName: storeName,
173
175
  balance: balance,
@@ -310,7 +312,7 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
310
312
  };
311
313
  var renderEditModal = function renderEditModal() {
312
314
  var _actions$edit4, _actions$edit5;
313
- return /*#__PURE__*/React.createElement(Modal, {
315
+ return /*#__PURE__*/React.createElement(PisellModal, {
314
316
  title: (actions === null || actions === void 0 ? void 0 : (_actions$edit4 = actions.edit) === null || _actions$edit4 === void 0 ? void 0 : _actions$edit4.dialogTitle) || getText('pisell-wallet-pass-card-edit'),
315
317
  open: isShowEdit,
316
318
  className: "pisell-wallet-pass-card-edit-modal",
@@ -318,26 +320,15 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
318
320
  return setIsShowEdit(false);
319
321
  },
320
322
  width: 480,
321
- footer: /*#__PURE__*/React.createElement("div", {
322
- style: {
323
- display: 'flex',
324
- justifyContent: 'space-between',
325
- padding: '16px 24px',
326
- gap: 12
327
- }
328
- }, /*#__PURE__*/React.createElement(Button, {
329
- block: true,
330
- onClick: function onClick() {
331
- return setIsShowEdit(false);
332
- }
333
- }, getText('pisell-wallet-pass-card-cancel')), /*#__PURE__*/React.createElement(Button, {
334
- type: "primary",
335
- block: true,
336
- onClick: _onConfirmEdit
337
- }, getText('pisell-wallet-pass-card-confirm')))
323
+ onOk: _onConfirmEdit,
324
+ okText: getText('pisell-wallet-pass-card-confirm'),
325
+ cancelText: getText('pisell-wallet-pass-card-cancel')
338
326
  }, /*#__PURE__*/React.createElement(Form, {
339
327
  form: form,
340
- layout: 'vertical'
328
+ layout: 'vertical',
329
+ style: {
330
+ padding: '16px 0'
331
+ }
341
332
  }, Array.isArray(actions === null || actions === void 0 ? void 0 : (_actions$edit5 = actions.edit) === null || _actions$edit5 === void 0 ? void 0 : _actions$edit5.fields) && actions.edit.fields.map(function (item) {
342
333
  return /*#__PURE__*/React.createElement(Form.Item, {
343
334
  key: item.name,
@@ -351,7 +342,7 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
351
342
  })));
352
343
  };
353
344
  var renderDetailModal = function renderDetailModal() {
354
- return /*#__PURE__*/React.createElement(Modal, {
345
+ return /*#__PURE__*/React.createElement(PisellModal, {
355
346
  title: getText('pisell-wallet-pass-card-detail'),
356
347
  open: isShowDetail,
357
348
  onCancel: function onCancel() {
@@ -363,7 +354,10 @@ var PisellWalletPassCard = function PisellWalletPassCard(props) {
363
354
  }, /*#__PURE__*/React.createElement(Form, {
364
355
  form: form2,
365
356
  disabled: true,
366
- layout: 'vertical'
357
+ layout: 'vertical',
358
+ style: {
359
+ padding: '16px 0'
360
+ }
367
361
  }, /*#__PURE__*/React.createElement(Form.Item, {
368
362
  name: "name",
369
363
  label: getText('pisell-wallet-pass-card-name')
@@ -246,24 +246,6 @@
246
246
 
247
247
  .pisell-wallet-pass-card-detail-modal,
248
248
  .pisell-wallet-pass-card-edit-modal {
249
- .pisell-lowcode-modal-content {
250
- padding: 0;
251
- }
252
-
253
- .pisell-lowcode-modal-header,
254
- .pisell-lowcode-modal-body {
255
- padding: 16px 24px;
256
- }
257
-
258
- .pisell-lowcode-modal-body {
259
- border-top: 1px solid var(--Gray-200, #eaecf0);
260
- }
261
-
262
- .pisell-lowcode-modal-footer {
263
- margin-top: 0;
264
- border-top: 1px solid var(--Gray-200, #eaecf0);
265
- }
266
-
267
249
  .pisell-lowcode-form-item {
268
250
  margin-bottom: 20px;
269
251
  }
@@ -38,6 +38,7 @@ var import_icons = require("@ant-design/icons");
38
38
  var import_antd = require("antd");
39
39
  var import_dayjs = __toESM(require("dayjs"));
40
40
  var import_iconfont = __toESM(require("../iconfont"));
41
+ var import__ = require("../../index");
41
42
  var import_Amount = __toESM(require("../pisellText/components/Amount"));
42
43
  var import_index = require("./index.less");
43
44
  var import_locales = require("../../locales");
@@ -155,6 +156,7 @@ var PisellWalletPassCard = (props) => {
155
156
  form.validateFields().then((values) => {
156
157
  var _a;
157
158
  onConfirmEdit == null ? void 0 : onConfirmEdit({
159
+ id,
158
160
  name,
159
161
  storeName,
160
162
  balance,
@@ -265,28 +267,18 @@ var PisellWalletPassCard = (props) => {
265
267
  const renderEditModal = () => {
266
268
  var _a, _b;
267
269
  return /* @__PURE__ */ import_react.default.createElement(
268
- import_antd.Modal,
270
+ import__.PisellModal,
269
271
  {
270
272
  title: ((_a = actions == null ? void 0 : actions.edit) == null ? void 0 : _a.dialogTitle) || (0, import_locales.getText)("pisell-wallet-pass-card-edit"),
271
273
  open: isShowEdit,
272
274
  className: "pisell-wallet-pass-card-edit-modal",
273
275
  onCancel: () => setIsShowEdit(false),
274
276
  width: 480,
275
- footer: /* @__PURE__ */ import_react.default.createElement(
276
- "div",
277
- {
278
- style: {
279
- display: "flex",
280
- justifyContent: "space-between",
281
- padding: "16px 24px",
282
- gap: 12
283
- }
284
- },
285
- /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { block: true, onClick: () => setIsShowEdit(false) }, (0, import_locales.getText)("pisell-wallet-pass-card-cancel")),
286
- /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "primary", block: true, onClick: _onConfirmEdit }, (0, import_locales.getText)("pisell-wallet-pass-card-confirm"))
287
- )
277
+ onOk: _onConfirmEdit,
278
+ okText: (0, import_locales.getText)("pisell-wallet-pass-card-confirm"),
279
+ cancelText: (0, import_locales.getText)("pisell-wallet-pass-card-cancel")
288
280
  },
289
- /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { form, layout: "vertical" }, Array.isArray((_b = actions == null ? void 0 : actions.edit) == null ? void 0 : _b.fields) && actions.edit.fields.map((item) => {
281
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { form, layout: "vertical", style: { padding: "16px 0" } }, Array.isArray((_b = actions == null ? void 0 : actions.edit) == null ? void 0 : _b.fields) && actions.edit.fields.map((item) => {
290
282
  return /* @__PURE__ */ import_react.default.createElement(
291
283
  import_antd.Form.Item,
292
284
  {
@@ -307,7 +299,7 @@ var PisellWalletPassCard = (props) => {
307
299
  };
308
300
  const renderDetailModal = () => {
309
301
  return /* @__PURE__ */ import_react.default.createElement(
310
- import_antd.Modal,
302
+ import__.PisellModal,
311
303
  {
312
304
  title: (0, import_locales.getText)("pisell-wallet-pass-card-detail"),
313
305
  open: isShowDetail,
@@ -318,61 +310,75 @@ var PisellWalletPassCard = (props) => {
318
310
  className: "pisell-wallet-pass-card-detail-modal",
319
311
  footer: null
320
312
  },
321
- /* @__PURE__ */ import_react.default.createElement(import_antd.Form, { form: form2, disabled: true, layout: "vertical" }, /* @__PURE__ */ import_react.default.createElement(
322
- import_antd.Form.Item,
323
- {
324
- name: "name",
325
- label: (0, import_locales.getText)("pisell-wallet-pass-card-name")
326
- },
327
- /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)
328
- ), /* @__PURE__ */ import_react.default.createElement(
329
- import_antd.Form.Item,
313
+ /* @__PURE__ */ import_react.default.createElement(
314
+ import_antd.Form,
330
315
  {
331
- name: "storeName",
332
- label: (0, import_locales.getText)("pisell-wallet-pass-card-store-name")
333
- },
334
- /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)
335
- ), /* @__PURE__ */ import_react.default.createElement(
336
- import_antd.Form.Item,
337
- {
338
- name: "balance",
339
- label: (0, import_locales.getText)("pisell-wallet-pass-card-balance")
316
+ form: form2,
317
+ disabled: true,
318
+ layout: "vertical",
319
+ style: { padding: "16px 0" }
340
320
  },
341
321
  /* @__PURE__ */ import_react.default.createElement(
342
- import_antd.InputNumber,
322
+ import_antd.Form.Item,
343
323
  {
344
- formatter: (value) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ","),
345
- style: { width: "100%" }
346
- }
347
- )
348
- ), /* @__PURE__ */ import_react.default.createElement(
349
- import_antd.Form.Item,
350
- {
351
- name: "redeem",
352
- label: (0, import_locales.getText)("pisell-wallet-pass-card-redeem")
353
- },
324
+ name: "name",
325
+ label: (0, import_locales.getText)("pisell-wallet-pass-card-name")
326
+ },
327
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)
328
+ ),
354
329
  /* @__PURE__ */ import_react.default.createElement(
355
- import_antd.InputNumber,
330
+ import_antd.Form.Item,
356
331
  {
357
- formatter: (value) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ","),
358
- style: { width: "100%" }
359
- }
332
+ name: "storeName",
333
+ label: (0, import_locales.getText)("pisell-wallet-pass-card-store-name")
334
+ },
335
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)
336
+ ),
337
+ /* @__PURE__ */ import_react.default.createElement(
338
+ import_antd.Form.Item,
339
+ {
340
+ name: "balance",
341
+ label: (0, import_locales.getText)("pisell-wallet-pass-card-balance")
342
+ },
343
+ /* @__PURE__ */ import_react.default.createElement(
344
+ import_antd.InputNumber,
345
+ {
346
+ formatter: (value) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ","),
347
+ style: { width: "100%" }
348
+ }
349
+ )
350
+ ),
351
+ /* @__PURE__ */ import_react.default.createElement(
352
+ import_antd.Form.Item,
353
+ {
354
+ name: "redeem",
355
+ label: (0, import_locales.getText)("pisell-wallet-pass-card-redeem")
356
+ },
357
+ /* @__PURE__ */ import_react.default.createElement(
358
+ import_antd.InputNumber,
359
+ {
360
+ formatter: (value) => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ","),
361
+ style: { width: "100%" }
362
+ }
363
+ )
364
+ ),
365
+ /* @__PURE__ */ import_react.default.createElement(
366
+ import_antd.Form.Item,
367
+ {
368
+ name: "code",
369
+ label: (0, import_locales.getText)("pisell-wallet-pass-card-code")
370
+ },
371
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)
372
+ ),
373
+ /* @__PURE__ */ import_react.default.createElement(
374
+ import_antd.Form.Item,
375
+ {
376
+ name: "validDate",
377
+ label: (0, import_locales.getText)("pisell-wallet-pass-card-valid-to")
378
+ },
379
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)
360
380
  )
361
- ), /* @__PURE__ */ import_react.default.createElement(
362
- import_antd.Form.Item,
363
- {
364
- name: "code",
365
- label: (0, import_locales.getText)("pisell-wallet-pass-card-code")
366
- },
367
- /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)
368
- ), /* @__PURE__ */ import_react.default.createElement(
369
- import_antd.Form.Item,
370
- {
371
- name: "validDate",
372
- label: (0, import_locales.getText)("pisell-wallet-pass-card-valid-to")
373
- },
374
- /* @__PURE__ */ import_react.default.createElement(import_antd.Input, null)
375
- ))
381
+ )
376
382
  );
377
383
  };
378
384
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderDetailModal(), renderEditModal(), /* @__PURE__ */ import_react.default.createElement(
@@ -246,24 +246,6 @@
246
246
 
247
247
  .pisell-wallet-pass-card-detail-modal,
248
248
  .pisell-wallet-pass-card-edit-modal {
249
- .pisell-lowcode-modal-content {
250
- padding: 0;
251
- }
252
-
253
- .pisell-lowcode-modal-header,
254
- .pisell-lowcode-modal-body {
255
- padding: 16px 24px;
256
- }
257
-
258
- .pisell-lowcode-modal-body {
259
- border-top: 1px solid var(--Gray-200, #eaecf0);
260
- }
261
-
262
- .pisell-lowcode-modal-footer {
263
- margin-top: 0;
264
- border-top: 1px solid var(--Gray-200, #eaecf0);
265
- }
266
-
267
249
  .pisell-lowcode-form-item {
268
250
  margin-bottom: 20px;
269
251
  }
@@ -164,6 +164,7 @@ export const actionsMeta = {
164
164
  itemSetter: {
165
165
  componentName: 'ObjectSetter',
166
166
  props: {
167
+ descriptor: 'name',
167
168
  config: {
168
169
  items: [
169
170
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.757",
3
+ "version": "1.0.758",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",