@pisell/materials 1.0.799 → 1.0.801

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 (71) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +3 -3
  6. package/build/lowcode/preview.js +150 -150
  7. package/build/lowcode/render/default/view.js +23 -27
  8. package/build/lowcode/view.js +24 -28
  9. package/es/components/DragSortList/index.js +6 -6
  10. package/es/components/classicLayout/index.js +4 -5
  11. package/es/components/icon/index.js +5 -5
  12. package/es/components/list/index.js +6 -6
  13. package/es/components/pisellCardList/index.d.ts +71 -0
  14. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  15. package/es/components/productCard/components/Header/DeleteButton/index.js +2 -2
  16. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  17. package/es/components/productCard/components/Sales/index.js +2 -1
  18. package/es/components/productCard/locales.d.ts +3 -0
  19. package/es/components/productCard/locales.js +6 -3
  20. package/es/components/qrcode/index.js +1 -1
  21. package/es/components/sort/components/InlineMenu/index.js +1 -1
  22. package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
  23. package/es/components/table/Actions/component/ViewMode/index.js +1 -1
  24. package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +4 -5
  25. package/es/components/table/Header/Buttons/index.js +5 -5
  26. package/es/components/table/Table/AddFieldModal/index.js +6 -6
  27. package/es/components/table/Table/SelectField/index.js +4 -4
  28. package/es/components/table/Table/fields/date/Edit/index.js +1 -1
  29. package/es/components/table/Table/fields/link/Edit/index.js +5 -5
  30. package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
  31. package/es/components/table/Table/fields/search/filterUtil/index.js +0 -1
  32. package/es/components/table/Table/fields/text/Show/index.js +4 -4
  33. package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
  34. package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
  35. package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
  36. package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
  37. package/es/components/table/hooks/useMergeColumnSetting.js +1 -2
  38. package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
  39. package/es/components/table/hooks/useTransFilterSetting.js +5 -5
  40. package/es/components/translation/index.js +10 -10
  41. package/es/components/translation/utils.js +5 -5
  42. package/es/components/walletCard/index.js +66 -45
  43. package/es/hooks/useResponsive.js +2 -2
  44. package/es/utils/hoc.js +1 -1
  45. package/es/utils/miniRedux.js +8 -9
  46. package/es/utils/platform.d.ts +1 -1
  47. package/lib/components/lowCodePage/index.js +1 -2
  48. package/lib/components/pisellCardList/index.d.ts +71 -0
  49. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  50. package/lib/components/productCard/components/Header/DeleteButton/index.js +2 -2
  51. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  52. package/lib/components/productCard/components/Sales/index.js +2 -1
  53. package/lib/components/productCard/locales.d.ts +3 -0
  54. package/lib/components/productCard/locales.js +6 -3
  55. package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
  56. package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
  57. package/lib/components/table/Table/fields/utils/index.js +1 -2
  58. package/lib/components/walletCard/index.js +22 -2
  59. package/lib/hooks/useResponsive.js +3 -6
  60. package/lib/utils/platform.d.ts +1 -1
  61. package/package.json +3 -3
  62. package/dist/umd/materials.min.css +0 -1
  63. package/dist/umd/materials.min.js +0 -1
  64. package/dist/umd/static/DotsSix.57d66266.svg +0 -1
  65. package/dist/umd/static/arrow-left.e542294f.svg +0 -1
  66. package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
  67. package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
  68. package/dist/umd/static/help-circle.31c9be40.svg +0 -1
  69. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
  70. package/es/components/walletCard/index.d.ts +0 -65
  71. package/lib/components/walletCard/index.d.ts +0 -65
@@ -1,15 +1,15 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
+ 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; }
4
+ 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; }
5
5
  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; }
6
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ 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); }
8
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
10
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
11
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
14
  import React, { createContext, useCallback, useReducer } from 'react';
15
15
  export default (function (_ref2) {
@@ -23,7 +23,6 @@ export default (function (_ref2) {
23
23
  var Context = /*#__PURE__*/createContext({});
24
24
  var Provider = function Provider(ComponentUi) {
25
25
  var Components = function Components(props, ref) {
26
- var _objectSpread2, _ref5;
27
26
  var _useReducer = useReducer(function (state, _ref3) {
28
27
  var type = _ref3.type,
29
28
  payload = _ref3.payload;
@@ -48,14 +47,14 @@ export default (function (_ref2) {
48
47
  });
49
48
  }
50
49
  }, []);
51
- var _props = _objectSpread(_objectSpread({}, props), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, namespace, providerState), _defineProperty(_objectSpread2, "dispatch", _dispatch), _objectSpread2));
50
+ var _props = _objectSpread(_objectSpread({}, props), {}, _defineProperty(_defineProperty({}, namespace, providerState), "dispatch", _dispatch));
52
51
  var _ref = ref;
53
52
  // if (_props.forwardedRef) {
54
53
  // _ref = _props.forwardedRef;
55
54
  // delete _props.forwardedRef;
56
55
  // }
57
56
  return /*#__PURE__*/React.createElement(Context.Provider, {
58
- value: (_ref5 = {}, _defineProperty(_ref5, namespace, providerState), _defineProperty(_ref5, "dispatch", _dispatch), _ref5)
57
+ value: _defineProperty(_defineProperty({}, namespace, providerState), "dispatch", _dispatch)
59
58
  }, /*#__PURE__*/React.createElement(ComponentUi, _extends({}, _props, {
60
59
  ref: _ref
61
60
  })));
@@ -1 +1 @@
1
- export declare const isMobile: () => boolean;
1
+ export declare const isMobile: () => any;
@@ -41,8 +41,7 @@ var LowCodePage = (props) => {
41
41
  const context = (0, import_useEngineContext.default)();
42
42
  const { RenderLowCodeByKey, getRenderLowCodeByKey } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
43
43
  const Com = (0, import_utils.isFunction)(getRenderLowCodeByKey) ? getRenderLowCodeByKey() : RenderLowCodeByKey;
44
- if (!Com)
45
- return /* @__PURE__ */ import_react.default.createElement("div", null, "RenderLowCodeByKey is not found");
44
+ if (!Com) return /* @__PURE__ */ import_react.default.createElement("div", null, "RenderLowCodeByKey is not found");
46
45
  return /* @__PURE__ */ import_react.default.createElement(Com, { ...others, id, key: id });
47
46
  };
48
47
  var lowCodePage_default = LowCodePage;
@@ -0,0 +1,71 @@
1
+ import React from 'react';
2
+ import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
3
+ import { PisellContextType } from '../pisell-config-provider/context';
4
+ import { PisellWalletPassCardProps } from '../pisellWalletPassCard';
5
+ import './index.less';
6
+ export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'options'> {
7
+ platform?: PisellContextType['platform'];
8
+ /** 当用户查看完所有记录时,底部会显示此消息 */
9
+ endMessage?: React.ReactNode;
10
+ /** 加载下次数据时的加载站位 */
11
+ loader?: React.ReactNode;
12
+ /** 是否有更多数据 */
13
+ hasMore: boolean;
14
+ /** 加载更多数据回调 */
15
+ loadMoreData?: () => Promise<void>;
16
+ /** 当前list数据 */
17
+ data: PisellWalletPassCardProps[];
18
+ /** list空数据时展示内容 */
19
+ empty?: React.ReactNode;
20
+ /** 是否展示空状态 */
21
+ showEmpty?: boolean;
22
+ /** 是否展示卡片名称 */
23
+ showName?: boolean;
24
+ /** 是否展示店铺名称 */
25
+ showStoreName?: boolean;
26
+ /** 是否展示核销金额 */
27
+ showRedeem?: boolean;
28
+ /** 是否展示余额 */
29
+ showBalance?: boolean;
30
+ /** 是否展示编码 */
31
+ showCode?: boolean;
32
+ /** 是否展示到期时间 */
33
+ showValidDate?: boolean;
34
+ /** 是否展示详情按钮 */
35
+ showDetail?: boolean;
36
+ /** 是否展示二维码 */
37
+ showQrCode?: boolean;
38
+ /** 是否展示封面图 */
39
+ showCover?: boolean;
40
+ /** 是否余额货币单位 */
41
+ showBalanceSymbol?: boolean;
42
+ /** 卡片大小 */
43
+ type?: 'default' | 'mini';
44
+ /** 展示操作按钮 */
45
+ showActions?: boolean;
46
+ /** 操作按钮配置 */
47
+ actions?: {
48
+ /** 按钮展示方式 */
49
+ layout: 'expanded' | 'collapsed';
50
+ /** detail 按钮配置 */
51
+ detail?: {
52
+ visible: boolean;
53
+ iconColor: string;
54
+ };
55
+ /** edit按钮配置 */
56
+ edit?: {
57
+ visible: boolean;
58
+ iconColor: string;
59
+ dialogTitle: string;
60
+ enableDialog: boolean;
61
+ fields: {
62
+ name: string;
63
+ label: string;
64
+ };
65
+ };
66
+ };
67
+ /** 编辑弹窗点击提交 */
68
+ onConfirmEdit?: (value: any, index: number) => void;
69
+ }
70
+ declare const _default: React.NamedExoticComponent<PisellCardListProps>;
71
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const DeleteButton: ({ onDelete, type }: any) => JSX.Element;
3
+ export default DeleteButton;
@@ -37,14 +37,14 @@ var import_react = __toESM(require("react"));
37
37
  var import_iconfont = __toESM(require("../../../../iconfont"));
38
38
  var import_index = require("./index.less");
39
39
  var prefix = "pisell-lowcode-";
40
- var DeleteButton = ({ onClick, type }) => {
40
+ var DeleteButton = ({ onDelete, type }) => {
41
41
  return /* @__PURE__ */ import_react.default.createElement(
42
42
  "div",
43
43
  {
44
44
  className: `${prefix}product-delete`,
45
45
  onClick: (e) => {
46
46
  e.stopPropagation();
47
- onClick();
47
+ onDelete();
48
48
  }
49
49
  },
50
50
  /* @__PURE__ */ import_react.default.createElement(
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
17
17
  * @Author: WangHan
18
18
  * @Date: 2024-11-22 10:58
19
19
  */
20
- export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
36
36
  var import_collapsibleList = __toESM(require("../Packages/components/collapsibleList"));
37
37
  var import_utils = require("../Packages/components/collapsibleList/utils");
38
38
  var import_index = require("./index.less");
39
+ var import_utils2 = require("@pisell/utils");
39
40
  var prefix = "pisell-lowcode-";
40
41
  var Sales = ({ item, isShowNote }) => {
41
42
  let other_products = (item == null ? void 0 : item.relation_products) || [];
@@ -49,7 +50,7 @@ var Sales = ({ item, isShowNote }) => {
49
50
  total: p == null ? void 0 : p.payment_price
50
51
  };
51
52
  });
52
- return (other_products == null ? void 0 : other_products.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-sales-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-sales-title` }, "Sales"), /* @__PURE__ */ import_react.default.createElement(
53
+ return (other_products == null ? void 0 : other_products.length) > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-sales-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-sales-title` }, import_utils2.locales.getText("pisell2.product.card.sales")), /* @__PURE__ */ import_react.default.createElement(
53
54
  import_collapsibleList.default,
54
55
  {
55
56
  list: other_products || [],
@@ -17,6 +17,7 @@ declare const _default: {
17
17
  'pisell2.product.card.add.holder.button.text': (val: string) => string;
18
18
  'pisell2.product.card.add.holder.placeholder': (val: string) => string;
19
19
  'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
20
+ 'pisell2.product.card.sales': string;
20
21
  };
21
22
  'zh-CN': {
22
23
  'pisell2.product.card.edit': string;
@@ -36,6 +37,7 @@ declare const _default: {
36
37
  'pisell2.product.card.add.holder.button.text': (val: string) => string;
37
38
  'pisell2.product.card.add.holder.placeholder': (val: string) => string;
38
39
  'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
40
+ 'pisell2.product.card.sales': string;
39
41
  };
40
42
  'zh-HK': {
41
43
  'pisell2.product.card.edit': string;
@@ -55,6 +57,7 @@ declare const _default: {
55
57
  'pisell2.product.card.add.holder.button.text': (val: string) => string;
56
58
  'pisell2.product.card.add.holder.placeholder': (val: string) => string;
57
59
  'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
60
+ 'pisell2.product.card.sales': string;
58
61
  };
59
62
  };
60
63
  export default _default;
@@ -40,7 +40,8 @@ var locales_default = {
40
40
  "pisell2.product.card.view-less": "View less",
41
41
  "pisell2.product.card.add.holder.button.text": (val) => `Add ${val || ""}`,
42
42
  "pisell2.product.card.add.holder.placeholder": (val) => `Please select ${val || ""}`,
43
- "pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}h` : ""}${hour > 0 && minute > 0 ? " " : ""}${minute > 0 ? `${minute}min` : ""}`
43
+ "pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}h` : ""}${hour > 0 && minute > 0 ? " " : ""}${minute > 0 ? `${minute}min` : ""}`,
44
+ "pisell2.product.card.sales": "Sales"
44
45
  },
45
46
  "zh-CN": {
46
47
  "pisell2.product.card.edit": "编辑",
@@ -59,7 +60,8 @@ var locales_default = {
59
60
  "pisell2.product.card.view-less": "收起",
60
61
  "pisell2.product.card.add.holder.button.text": (val) => `添加${val || ""}`,
61
62
  "pisell2.product.card.add.holder.placeholder": (val) => `请选择${val || ""}`,
62
- "pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}小时` : ""}${minute > 0 ? `${minute}分钟` : ""}`
63
+ "pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}小时` : ""}${minute > 0 ? `${minute}分钟` : ""}`,
64
+ "pisell2.product.card.sales": "销售"
63
65
  },
64
66
  "zh-HK": {
65
67
  "pisell2.product.card.edit": "編輯",
@@ -78,6 +80,7 @@ var locales_default = {
78
80
  "pisell2.product.card.view-less": "收起",
79
81
  "pisell2.product.card.add.holder.button.text": (val) => `添加${val || ""}`,
80
82
  "pisell2.product.card.add.holder.placeholder": (val) => `請選擇${val || ""}`,
81
- "pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}小時` : ""}${minute > 0 ? `${minute}分鐘` : ""}`
83
+ "pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}小時` : ""}${minute > 0 ? `${minute}分鐘` : ""}`,
84
+ "pisell2.product.card.sales": "銷售"
82
85
  }
83
86
  };
@@ -40,17 +40,14 @@ function filterUtil_default({
40
40
  key,
41
41
  item
42
42
  }) {
43
- if (!value)
44
- return true;
43
+ if (!value) return true;
45
44
  const valueDayjsObj = (0, import_dayjs.default)(value);
46
45
  if (!valueDayjsObj.isValid()) {
47
46
  return true;
48
47
  }
49
48
  const dataValue = (0, import_utils2.getValueByKeys)(item, key);
50
- if ((0, import_utils.isUndefined)(dataValue))
51
- return false;
49
+ if ((0, import_utils.isUndefined)(dataValue)) return false;
52
50
  const dataDayjsObj = (0, import_dayjs.default)(dataValue);
53
- if (!dataDayjsObj.isValid())
54
- return false;
51
+ if (!dataDayjsObj.isValid()) return false;
55
52
  return dataDayjsObj.isSame(valueDayjsObj, "day");
56
53
  }
@@ -43,19 +43,15 @@ function filterUtil_default({
43
43
  key,
44
44
  item
45
45
  }) {
46
- if (!value)
47
- return true;
48
- if ((value == null ? void 0 : value.length) !== 2)
49
- return true;
46
+ if (!value) return true;
47
+ if ((value == null ? void 0 : value.length) !== 2) return true;
50
48
  const valueDayjsObj = value.map((item2) => (0, import_dayjs.default)(item2 || ""));
51
49
  if (valueDayjsObj.some((item2) => !item2.isValid())) {
52
50
  return true;
53
51
  }
54
52
  const dataValue = (0, import_utils2.getValueByKeys)(item, key);
55
- if ((0, import_utils.isUndefined)(dataValue))
56
- return false;
53
+ if ((0, import_utils.isUndefined)(dataValue)) return false;
57
54
  const dataDayjsObj = (0, import_dayjs.default)(dataValue);
58
- if (!dataDayjsObj.isValid())
59
- return false;
55
+ if (!dataDayjsObj.isValid()) return false;
60
56
  return isDateInRange(dataDayjsObj, valueDayjsObj);
61
57
  }
@@ -25,8 +25,7 @@ module.exports = __toCommonJS(utils_exports);
25
25
  var import_utils = require("@pisell/utils");
26
26
  var getValueByKeys = (obj, keys) => {
27
27
  var _a;
28
- if (!keys)
29
- return keys;
28
+ if (!keys) return keys;
30
29
  if ((0, import_utils.isString)(keys)) {
31
30
  keys = [keys];
32
31
  }
@@ -89,10 +89,29 @@ var toBooleanValue = (value) => {
89
89
  if (value === 1 || value === "1") return true;
90
90
  return !!value;
91
91
  };
92
- var useCodeModal = (cardNo, onCodeClick) => {
92
+ var useCodeModal = (cardNo, onCodeClick, codeType) => {
93
+ var _a;
93
94
  const [isModalOpen, setIsModalOpen] = (0, import_react.useState)(false);
95
+ const context = (0, import_useEngineContext.default)();
96
+ const { interaction } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
94
97
  const handleCodeClick = (e) => {
98
+ var _a2, _b, _c, _d;
95
99
  e.stopPropagation();
100
+ if ((_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2)) {
101
+ const typeMap = {
102
+ orCode: "qrCode",
103
+ barCode: "barCode"
104
+ };
105
+ (_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.postMessageToApp) == null ? void 0 : _d.call(_c, {
106
+ module: "global",
107
+ key: "openCodeModal",
108
+ data: {
109
+ type: typeMap[codeType] || codeType,
110
+ value: cardNo
111
+ }
112
+ });
113
+ return;
114
+ }
96
115
  if (onCodeClick) {
97
116
  onCodeClick();
98
117
  } else {
@@ -269,7 +288,8 @@ var WalletCard = (props) => {
269
288
  const { utils } = context.appHelper || {};
270
289
  const { isModalOpen, handleCodeClick, closeModal } = useCodeModal(
271
290
  cardNo,
272
- onCodeClick
291
+ onCodeClick,
292
+ codeType
273
293
  );
274
294
  const backgroundStyle = (0, import_react.useMemo)(() => {
275
295
  if (props.customBackgroundImage) {
@@ -35,8 +35,7 @@ var responsiveConfig = {
35
35
  function handleResize() {
36
36
  const oldInfo = info;
37
37
  calculate();
38
- if (oldInfo === info)
39
- return;
38
+ if (oldInfo === info) return;
40
39
  for (const subscriber of subscribers) {
41
40
  subscriber();
42
41
  }
@@ -58,8 +57,7 @@ function calculate() {
58
57
  }
59
58
  function configResponsive(config) {
60
59
  responsiveConfig = config;
61
- if (info)
62
- calculate();
60
+ if (info) calculate();
63
61
  }
64
62
  function useResponsive() {
65
63
  if (import_utils.isBrowser && !listening) {
@@ -70,8 +68,7 @@ function useResponsive() {
70
68
  }
71
69
  const [state, setState] = (0, import_react.useState)(info);
72
70
  (0, import_react.useEffect)(() => {
73
- if (!import_utils.isBrowser)
74
- return;
71
+ if (!import_utils.isBrowser) return;
75
72
  if (!listening) {
76
73
  window.addEventListener("resize", handleResize);
77
74
  }
@@ -1 +1 @@
1
- export declare const isMobile: () => boolean;
1
+ export declare const isMobile: () => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.799",
3
+ "version": "1.0.801",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -71,9 +71,9 @@
71
71
  "swiper": "^8.4.7",
72
72
  "react-barcode": "^1.5.3",
73
73
  "vod-js-sdk-v6": "^1.4.11",
74
- "@pisell/icon": "0.0.10",
75
74
  "@pisell/date-picker": "1.0.115",
76
- "@pisell/utils": "1.0.43"
75
+ "@pisell/utils": "1.0.43",
76
+ "@pisell/icon": "0.0.10"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "react": "^18.0.0",
@@ -1 +0,0 @@
1
- .materials-grid{display:flex;flex-direction:column;height:100%;width:100%}.materials-grid-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-header .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-actions .left-wrap{align-items:center;display:flex;flex:1 1}.materials-grid-actions .left-wrap .pisell-lowcode-form-item{margin-bottom:0}.materials-grid-actions .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions .right-wrap .icon{cursor:pointer;transition:.2s}.materials-grid-actions .right-wrap .icon:hover{color:var(--theme-color)}.materials-grid-actions .right-wrap .button{align-items:center;display:flex;font-size:12px;height:28px;justify-content:center}.filter-dropdown-wrap{display:flex;flex-direction:column;max-height:400px;max-width:calc(100vw - 24px);min-width:250px;padding:4px;width:400px}.filter-dropdown-wrap .filter-dropdown-wrap-content{flex:1 1;overflow:auto}.filter-dropdown-wrap .filter-dropdown-drag-item{align-items:center;background:#f9fafb;background:var(--gray-50,#f9fafb);border-radius:8px;display:flex;margin-bottom:12px;padding:8px 12px 12px}.filter-dropdown-wrap .filter-dropdown-drag-item .dots-six-icon{color:#98a2b3;cursor:pointer;font-size:24px}.filter-dropdown-wrap .filter-dropdown-drag-item .pisell-lowcode-form-item{margin-bottom:0}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right{flex:1 1;margin-left:16px}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right .filter-dropdown-drag-item-title{color:#777;color:var(--text-text-2,#777);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.filter-dropdown-container-wrap{border-bottom:1px solid #e2e2e2;border-bottom:1px solid var(--surface-surface-4,#e2e2e2);margin-bottom:20px;min-height:70px}.filter-dropdown-container-wrap:last-child{border:none}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap{align-items:center;color:#919191;color:var(--text-text-3,#919191);display:flex;font-size:16px;font-style:normal;font-weight:600;line-height:22px;margin-bottom:12px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-title{color:#101828;color:var(--gray-900,#101828);font-size:16px;font-style:normal;font-weight:600;line-height:24px;margin-right:6px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-icon-help{color:#98a2b3;color:var(--gray-400,#98a2b3);font-size:20px}.filter-dropdown-container-wrap .filter-dropdown-container-filter-wrap{min-height:80px}.materials-sort-list-empty{color:#5a5a5a;display:block;padding-top:22px;text-align:center}.materials-grid-summary{margin-bottom:16px}.grid-view-table-wrap{position:relative}.materials-grid-paginator{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:center;margin:0!important;padding:0 20px;width:100%}.materials-grid-paginator .pisell-lowcode-pagination-total-text{color:#667085;color:var(--gray-500,#667085);font-size:14px;font-style:normal;font-weight:500;margin-right:auto}.materials-grid-paginator .pisell-lowcode-pagination-item{border:1px solid #d0d5dd;border-radius:0;border-right:0;margin:0;position:relative}.materials-grid-paginator .pisell-lowcode-pagination-jump-next,.materials-grid-paginator .pisell-lowcode-pagination-jump-prev{border:1px solid #d0d5dd;border-radius:0;border-right:none;margin:0}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover .pisell-lowcode-pagination-item-link-icon{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active:hover{border-color:#d0d5dd!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active{background-color:rgba(0,0,0,.06)}.materials-grid-paginator .pisell-lowcode-pagination-item-active a{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-prev{align-items:center;border:1px solid #d0d5dd;border-radius:8px 0 0 8px;border-right:none;display:flex;justify-content:center;margin:0;min-width:auto}.materials-grid-paginator .pisell-lowcode-pagination-next{align-items:center;border:1px solid #d0d5dd;border-radius:0 8px 8px 0;display:flex;justify-content:center;margin:0;min-width:auto}.paginator-page-btn{align-items:center;border-radius:4px 4px 4px 4px;color:#344054;color:var(--gray-700,#344054);cursor:pointer;display:flex;font-size:12px;font-weight:400;justify-content:center;padding:10px 16px;transition:.2s;-ms-user-select:none;user-select:none}.paginator-page-btn .paginator-page-btn-text{font-weight:600}.paginator-page-btn .paginator-page-btn-left-icon,.paginator-page-btn .paginator-page-btn-right-icon{font-size:20px}.paginator-page-btn .paginator-page-btn-left-icon{margin-right:8px}.paginator-page-btn .paginator-page-btn-right-icon{margin-left:8px}.paginator-page-btn.left{margin-right:auto}.paginator-page-btn.left .icon{font-size:18px;margin-right:8px}.paginator-page-btn.right{margin-left:auto}.paginator-page-btn.right .icon{font-size:18px;margin-left:8px;transform:rotate(180deg)}.materials-grid-paginator-mini{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:space-between;margin:0!important;overflow:hidden;padding:0 20px;width:100%}.materials-grid-paginator-mini .paginator-page-btn{padding:8px}.materials-grid-paginator-mini .materials-grid-paginator-center{align-items:center;display:flex;gap:4px;justify-content:center}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-text{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:400}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-value{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:500}.materials-grid-paginator-mini .pisell-lowcode-pagination-next,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev{border:1px solid #d0d5dd;border-radius:8px;margin:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-left-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-left-icon{margin-right:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-right-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-right-icon{margin-left:0}.react-resizable{position:relative}.react-resizable-handle{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZaIiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+);background-origin:content-box;background-position:100% 100%;background-repeat:no-repeat;box-sizing:border-box;height:20px;padding:0 3px 3px 0;position:absolute;width:20px}.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-resizable-handle-e,.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.materials-grid-table-header-cell{align-items:center;display:flex;height:44px;padding:0 14px}.materials-grid-table-header-cell .field-icon{color:#777;font-size:18px}.materials-grid-table-header-cell .materials-grid-table-header-cell-content{color:#1b1b1b;flex:auto;font-size:14px;font-weight:600;overflow:hidden;padding-right:10px;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.materials-grid-table-header-cell .actions{align-items:center;display:flex;gap:8px}.materials-grid-table-header-cell .actions .action{color:#ababab;cursor:pointer;font-size:14px}.editable-cell-value-wrap{height:100%;width:100%}.materials-grid-table-cell{height:1px;padding:0!important}.cell-provider{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:100%;justify-content:center;padding:12px;position:relative;width:100%}.cell-provider.focus{box-shadow:var(--theme-color) 0 0 0 1px!important}