@pisell/materials 6.11.103 → 6.11.105

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 (41) hide show
  1. package/build/lowcode/3.js +1 -1
  2. package/build/lowcode/assets-daily.json +11 -11
  3. package/build/lowcode/assets-dev.json +2 -2
  4. package/build/lowcode/assets-prod.json +11 -11
  5. package/build/lowcode/index.js +1 -1
  6. package/build/lowcode/meta.js +1 -1
  7. package/build/lowcode/preview.js +6 -6
  8. package/build/lowcode/render/default/1.js +1 -1
  9. package/build/lowcode/render/default/view.css +1 -1
  10. package/build/lowcode/render/default/view.js +9 -9
  11. package/build/lowcode/view.css +1 -1
  12. package/build/lowcode/view.js +10 -10
  13. package/es/components/buttonGroupPreview/index.js +2 -1
  14. package/es/components/productCard/cartSkuCard/index.js +0 -3
  15. package/es/components/productCard/cartSkuCard/index.less +2 -0
  16. package/lib/components/buttonGroupPreview/index.js +1 -1
  17. package/lib/components/productCard/cartSkuCard/index.js +0 -3
  18. package/lib/components/productCard/cartSkuCard/index.less +2 -0
  19. package/package.json +3 -3
  20. package/es/components/pisellFind/index.d.ts +0 -40
  21. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +0 -14
  22. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -36
  23. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -12
  24. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -22
  25. package/es/components/productCard/cartSkuCard/hooks/useCompensatedPhysicalTextStyle.js +0 -66
  26. package/es/components/productCard/lineItem/BookingLineItem.d.ts +0 -18
  27. package/es/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
  28. package/es/components/productCard/lineItem/index.d.ts +0 -66
  29. package/es/components/productCard/lineItem/types.d.ts +0 -9
  30. package/es/components/productCard/types.d.ts +0 -95
  31. package/lib/components/pisellFind/index.d.ts +0 -40
  32. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +0 -14
  33. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -36
  34. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -12
  35. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -22
  36. package/lib/components/productCard/cartSkuCard/hooks/useCompensatedPhysicalTextStyle.js +0 -82
  37. package/lib/components/productCard/lineItem/BookingLineItem.d.ts +0 -18
  38. package/lib/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
  39. package/lib/components/productCard/lineItem/index.d.ts +0 -66
  40. package/lib/components/productCard/lineItem/types.d.ts +0 -9
  41. package/lib/components/productCard/types.d.ts +0 -95
@@ -69,7 +69,8 @@ var ButtonGroupPreview = /*#__PURE__*/forwardRef(function (props, ref) {
69
69
  return isMore ? /*#__PURE__*/React.createElement(Dropdown, {
70
70
  menu: {
71
71
  items: menuData
72
- }
72
+ },
73
+ trigger: ['click']
73
74
  }, /*#__PURE__*/React.createElement(Button, _extends({
74
75
  key: id
75
76
  }, dropdownButtonProps), children !== null && children !== void 0 ? children : /*#__PURE__*/React.createElement(MoreOutlined, null))) : /*#__PURE__*/React.createElement(Button, _extends({
@@ -30,7 +30,6 @@ import Iconfont from "../../iconfont";
30
30
  import useEngineContext from "../../../hooks/useEngineContext";
31
31
  import Action from "../components/Action";
32
32
  import { defaultValue } from "../status";
33
- import { useCompensatedPhysicalTextStyle } from "./hooks/useCompensatedPhysicalTextStyle";
34
33
  export var PREFIX = 'pisell-cart-sku-card';
35
34
  var CartSkuCard = function CartSkuCard(props) {
36
35
  var _context$appHelper$ut;
@@ -79,7 +78,6 @@ var CartSkuCard = function CartSkuCard(props) {
79
78
  other = _objectWithoutProperties(props, _excluded);
80
79
  var useOpenNoteRef = useRef();
81
80
  var context = useEngineContext();
82
- var physicalTextStyle = useCompensatedPhysicalTextStyle();
83
81
  locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale')) || 'en');
84
82
  console.log('prodcut props', props);
85
83
  var isShowAction = dataSource.isShowAction,
@@ -270,7 +268,6 @@ var CartSkuCard = function CartSkuCard(props) {
270
268
  escapeDom: escapeDom
271
269
  }, /*#__PURE__*/React.createElement("div", {
272
270
  className: classNames(PREFIX, "".concat(PREFIX, "--").concat(type)),
273
- style: physicalTextStyle,
274
271
  onClick: function onClick(e) {
275
272
  if (disabledClick) return;
276
273
  e.preventDefault();
@@ -5,6 +5,8 @@
5
5
  }
6
6
 
7
7
  .pisell-cart-sku-card {
8
+ --pisell-cart-sku-card-physical-text-height: 30px;
9
+
8
10
  padding: 4px 8px 4px 4px;
9
11
  border-radius: inherit;
10
12
  user-select: none;
@@ -71,7 +71,7 @@ var ButtonGroupPreview = (0, import_react.forwardRef)(
71
71
  } = items;
72
72
  const btnProps = { ...buttonProps, ...props.updateButtonProps };
73
73
  const { children, ...dropdownButtonProps } = btnProps;
74
- return isMore ? /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { menu: { items: menuData } }, /* @__PURE__ */ import_react.default.createElement(import_button.default, { key: id, ...dropdownButtonProps }, children ?? /* @__PURE__ */ import_react.default.createElement(import_icons.MoreOutlined, null))) : /* @__PURE__ */ import_react.default.createElement(
74
+ return isMore ? /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { menu: { items: menuData }, trigger: ["click"] }, /* @__PURE__ */ import_react.default.createElement(import_button.default, { key: id, ...dropdownButtonProps }, children ?? /* @__PURE__ */ import_react.default.createElement(import_icons.MoreOutlined, null))) : /* @__PURE__ */ import_react.default.createElement(
75
75
  import_button.default,
76
76
  {
77
77
  key: id,
@@ -55,7 +55,6 @@ var import_iconfont = __toESM(require("../../iconfont"));
55
55
  var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
56
56
  var import_Action = __toESM(require("../components/Action"));
57
57
  var import_status = require("../status");
58
- var import_useCompensatedPhysicalTextStyle = require("./hooks/useCompensatedPhysicalTextStyle");
59
58
  var PREFIX = "pisell-cart-sku-card";
60
59
  var CartSkuCard = (props) => {
61
60
  var _a, _b;
@@ -91,7 +90,6 @@ var CartSkuCard = (props) => {
91
90
  } = props;
92
91
  const useOpenNoteRef = (0, import_react.useRef)();
93
92
  const context = (0, import_useEngineContext.default)();
94
- const physicalTextStyle = (0, import_useCompensatedPhysicalTextStyle.useCompensatedPhysicalTextStyle)();
95
93
  import_utils.locales.init(
96
94
  import_locales.default,
97
95
  ((_b = (_a = context.appHelper.utils) == null ? void 0 : _a.storage) == null ? void 0 : _b.get("umi_locale")) || "en"
@@ -290,7 +288,6 @@ var CartSkuCard = (props) => {
290
288
  "div",
291
289
  {
292
290
  className: (0, import_classnames.default)(PREFIX, `${PREFIX}--${type}`),
293
- style: physicalTextStyle,
294
291
  onClick: (e) => {
295
292
  if (disabledClick) return;
296
293
  e.preventDefault();
@@ -5,6 +5,8 @@
5
5
  }
6
6
 
7
7
  .pisell-cart-sku-card {
8
+ --pisell-cart-sku-card-physical-text-height: 30px;
9
+
8
10
  padding: 4px 8px 4px 4px;
9
11
  border-radius: inherit;
10
12
  user-select: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "6.11.103",
3
+ "version": "6.11.105",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -99,8 +99,8 @@
99
99
  "antd-mobile": "^5.38.1",
100
100
  "vod-js-sdk-v6": "^1.4.11",
101
101
  "@pisell/date-picker": "3.0.8",
102
- "@pisell/utils": "3.0.2",
103
- "@pisell/icon": "0.0.11"
102
+ "@pisell/icon": "0.0.11",
103
+ "@pisell/utils": "3.0.2"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "react": "^18.0.0",
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import type { PisellLookupProps, PisellLookupRef } from '../pisellLookup';
3
- /**
4
- * PisellFind Props
5
- * 继承 PisellLookup 的所有 Props
6
- */
7
- export declare type PisellFindProps = PisellLookupProps;
8
- /**
9
- * PisellFind Ref
10
- * 继承 PisellLookup 的所有 Ref 方法
11
- */
12
- export declare type PisellFindRef = PisellLookupRef;
13
- /**
14
- * PisellFind 组件
15
- * 基于 PisellLookup 的组件内查找优化版本
16
- *
17
- * 核心特点:
18
- * - 默认使用 button 触发器
19
- * - 默认不显示确认按钮(输入即搜索)
20
- * - 默认开启搜索历史
21
- * - 默认不展示结果区(结果在页面其他位置展示)
22
- *
23
- * @example
24
- * ```tsx
25
- * // 基础用法
26
- * <PisellFind
27
- * onSearch={(keyword) => {
28
- * const filtered = data.filter(item => item.name.includes(keyword));
29
- * setFilteredData(filtered);
30
- * }}
31
- * />
32
- *
33
- * // 切换为 Input 模式
34
- * <PisellFind
35
- * triggerType="input"
36
- * onSearch={(keyword) => filterData(keyword)}
37
- * />
38
- * ```
39
- */
40
- export declare const PisellFind: React.ForwardRefExoticComponent<PisellLookupProps & React.RefAttributes<PisellLookupRef>>;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import type { TableProps } from 'antd';
3
- import type { RecordBoardContextValue } from '../../types';
4
- import './Grid.less';
5
- export interface RecordBoardGridViewProps extends Omit<TableProps<any>, 'dataSource' | 'loading' | 'pagination'>, Partial<Pick<RecordBoardContextValue, 'data' | 'loading'>> {
6
- /** 列配置,同 antd Table columns */
7
- columns?: TableProps<any>['columns'];
8
- className?: string;
9
- style?: React.CSSProperties;
10
- /** 自定义渲染,传入后不再使用内置 Table */
11
- render?: (ctx: RecordBoardContextValue) => React.ReactNode;
12
- }
13
- declare const RecordBoardGridView: React.FC<RecordBoardGridViewProps>;
14
- export default RecordBoardGridView;
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface IProps {
4
- isShowImage?: boolean;
5
- dataSource: {
6
- image?: string;
7
- bundle?: any[];
8
- options?: any[];
9
- product_option_string?: string;
10
- name?: string;
11
- symbol?: string;
12
- price?: string | number;
13
- total?: number;
14
- origin_total?: number;
15
- num?: number;
16
- holder_id?: any;
17
- isFormSubject?: boolean;
18
- totalDifference?: number;
19
- };
20
- style?: React.CSSProperties;
21
- /** 作为主商品卡片展示
22
- * 1. 影响商品数量 tag 的位置
23
- * 2. isMain 且 type 为 a5,展示holder
24
- */
25
- isMainProduct?: boolean;
26
- maxSpecsCount?: number;
27
- type?: 'a2' | 'a5' | 'a9';
28
- isBundle?: boolean;
29
- showFooter?: boolean;
30
- isShowOriginalPrice?: boolean;
31
- isShowEditProduct?: boolean;
32
- onEditProduct?: (val: any) => void;
33
- disabledEditClick?: boolean;
34
- }
35
- declare const BasicInfo: (props: IProps) => React.JSX.Element;
36
- export default BasicInfo;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface IProps {
4
- isShowImage?: boolean;
5
- dataSource: {
6
- bundle?: any[];
7
- symbol?: string;
8
- };
9
- type?: 'a2' | 'a5' | 'a9';
10
- }
11
- declare const Packages: ({ isShowImage, dataSource, type }: IProps) => React.JSX.Element | null;
12
- export default Packages;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface SpecsProps {
4
- /** 数据源 */
5
- dataSource?: {
6
- bundle?: Array<{
7
- title: string;
8
- }>;
9
- options?: Array<{
10
- name: string;
11
- price: number;
12
- num: number;
13
- }>;
14
- product_option_string?: string;
15
- symbol?: string;
16
- };
17
- /** 最大展示数量,默认为 1 */
18
- maxSpecsCount?: number;
19
- type?: 'a2' | 'a5' | 'a9';
20
- }
21
- declare const Specs: (props: SpecsProps) => React.JSX.Element | null;
22
- export default Specs;
@@ -1,66 +0,0 @@
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 _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; }
3
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
- 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); }
5
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
- 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."); }
7
- 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); }
8
- 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; }
9
- 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; } }
10
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { useEffect, useMemo, useState } from 'react';
12
- var CSS_PX_PER_MM = 96 / 25.4;
13
- var PHYSICAL_TEXT_HEIGHT_MM = 4;
14
- var PHYSICAL_TEXT_HEIGHT_VAR = '--pisell-cart-sku-card-physical-text-height';
15
- var getBodyScaleY = function getBodyScaleY() {
16
- if (typeof window === 'undefined' || typeof document === 'undefined') {
17
- return 1;
18
- }
19
- var transform = window.getComputedStyle(document.body).transform;
20
- if (!transform || transform === 'none') {
21
- return 1;
22
- }
23
- var matrix = new DOMMatrixReadOnly(transform);
24
- return Math.sqrt(matrix.c * matrix.c + matrix.d * matrix.d) || 1;
25
- };
26
- var useBodyScaleY = function useBodyScaleY() {
27
- var _useState = useState(getBodyScaleY),
28
- _useState2 = _slicedToArray(_useState, 2),
29
- bodyScaleY = _useState2[0],
30
- setBodyScaleY = _useState2[1];
31
- useEffect(function () {
32
- var _window$visualViewpor;
33
- if (typeof window === 'undefined' || typeof document === 'undefined') {
34
- return undefined;
35
- }
36
- var updateBodyScaleY = function updateBodyScaleY() {
37
- setBodyScaleY(getBodyScaleY());
38
- };
39
- updateBodyScaleY();
40
- window.addEventListener('resize', updateBodyScaleY);
41
- (_window$visualViewpor = window.visualViewport) === null || _window$visualViewpor === void 0 || _window$visualViewpor.addEventListener('resize', updateBodyScaleY);
42
- var bodyObserver = new MutationObserver(updateBodyScaleY);
43
- bodyObserver.observe(document.body, {
44
- attributes: true,
45
- attributeFilter: ['style', 'class']
46
- });
47
- return function () {
48
- var _window$visualViewpor2;
49
- window.removeEventListener('resize', updateBodyScaleY);
50
- (_window$visualViewpor2 = window.visualViewport) === null || _window$visualViewpor2 === void 0 || _window$visualViewpor2.removeEventListener('resize', updateBodyScaleY);
51
- bodyObserver.disconnect();
52
- };
53
- }, []);
54
- return bodyScaleY;
55
- };
56
-
57
- /**
58
- * Keeps weighing text visually close to 4mm even when the low-code host scales body.
59
- */
60
- export var useCompensatedPhysicalTextStyle = function useCompensatedPhysicalTextStyle() {
61
- var bodyScaleY = useBodyScaleY();
62
- return useMemo(function () {
63
- var compensatedHeight = PHYSICAL_TEXT_HEIGHT_MM * CSS_PX_PER_MM / bodyScaleY;
64
- return _defineProperty({}, PHYSICAL_TEXT_HEIGHT_VAR, "".concat(compensatedHeight, "px"));
65
- }, [bodyScaleY]);
66
- };
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import type { ProductCardTypes } from '../types';
3
- import type { LineItemStatusOption, LineItemType } from './types';
4
- interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
5
- dataSource: any;
6
- type: LineItemType;
7
- cartSkuType: 'a2' | 'a5' | 'a9';
8
- relatedProductDataSource?: any;
9
- rightActions?: any[];
10
- escapeDom?: string;
11
- statusOptions?: LineItemStatusOption[];
12
- statusLoading?: boolean;
13
- statusDisabled?: boolean;
14
- isShowRelatedProduct?: boolean;
15
- onBookingStatusChange?: (status: string, item: any) => void;
16
- }
17
- declare const BookingLineItem: (props: BookingLineItemProps) => React.JSX.Element | null;
18
- export default BookingLineItem;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import '../../../cartSkuCard/components/resources/index.less';
3
- interface LineItemResourcesProps {
4
- dataSource?: any;
5
- }
6
- declare const LineItemResources: (props: LineItemResourcesProps) => React.JSX.Element | null;
7
- export default LineItemResources;
@@ -1,66 +0,0 @@
1
- import React from 'react';
2
- import type { ProductCardTypes } from '../types';
3
- import type { itemType, LineItemStatusOption, LineItemType } from './types';
4
- import './index.less';
5
- export declare const PREFIX = "pisell-line-item";
6
- export type { itemType, LineItemStatusOption, LineItemType } from './types';
7
- declare type LocalizedText = string | Record<string, unknown> | null | undefined;
8
- export interface LineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
9
- dataSource: any;
10
- itemType?: itemType;
11
- type?: LineItemType;
12
- rightActions?: any[];
13
- escapeDom?: string;
14
- statusOptions?: LineItemStatusOption[];
15
- statusLoading?: boolean;
16
- statusDisabled?: boolean;
17
- isShowRelatedProduct?: boolean;
18
- onBookingStatusChange?: (status: string, item: any) => void;
19
- }
20
- export declare const convertProductToLineItemProduct: (product: any, translationOriginal: (text: LocalizedText) => string, symbol: string) => {
21
- _id: any;
22
- id: any;
23
- product_id: any;
24
- product_variant_id: any;
25
- title: string;
26
- product_title: string;
27
- name: string;
28
- cover: any;
29
- image: any;
30
- num: any;
31
- quantity: any;
32
- price: any;
33
- total: any;
34
- origin_total: any;
35
- original_total: any;
36
- source_product_price: any;
37
- selling_price: any;
38
- payment_price: any;
39
- tax_fee: any;
40
- symbol: string;
41
- note: any;
42
- product_sku: any;
43
- product_bundle: any;
44
- bundle: any;
45
- product_option_string: string;
46
- discount_list: any;
47
- promotions: any;
48
- isGift: boolean;
49
- giftData: any;
50
- _origin: any;
51
- _extend: {
52
- other: {
53
- product_id: any;
54
- option: any;
55
- bundle: any;
56
- product_variant_id: any;
57
- quantity: any;
58
- };
59
- note: any;
60
- total: any;
61
- origin_total: any;
62
- payment_price: any;
63
- };
64
- };
65
- declare const LineItem: (props: LineItemProps) => React.JSX.Element;
66
- export default LineItem;
@@ -1,9 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export declare type LineItemType = 'a2' | 'a5' | 'a9';
3
- export declare type itemType = 'booking' | 'product';
4
- export interface LineItemStatusOption {
5
- key: string;
6
- label: ReactNode;
7
- color?: string;
8
- danger?: boolean;
9
- }
@@ -1,95 +0,0 @@
1
- export declare type bundleType = {
2
- id: number;
3
- name: string;
4
- num: number;
5
- price: number;
6
- total: number;
7
- origin_total?: number;
8
- price_type?: string;
9
- options?: optionType[];
10
- };
11
- /**
12
- * @description:
13
- * @return {*}
14
- * @Author: WangHan
15
- * @Date: 2025-01-02 23:00
16
- */
17
- export declare type optionType = {
18
- id: number;
19
- name: string;
20
- num: number;
21
- price: number;
22
- total: number;
23
- origin_total?: number;
24
- };
25
- /**
26
- * @title: 商品商品类型
27
- * @description:
28
- * @return {*}
29
- * @Author: WangHan
30
- * @Date: 2025-01-02 22:48
31
- */
32
- export declare type productType = {
33
- _id: string | number;
34
- id: number;
35
- name: string;
36
- price: number;
37
- total: number;
38
- num: number;
39
- origin_total?: number;
40
- image?: string;
41
- isShowNote?: boolean;
42
- note?: string;
43
- like_status?: string;
44
- bundle?: bundleType[];
45
- options?: optionType[];
46
- isShowAction?: boolean;
47
- actionText?: string;
48
- errorMessage?: string;
49
- product_option_string?: string;
50
- discount_reason?: string;
51
- relation_products?: any[];
52
- resource_id?: string | number;
53
- relation_form_name?: string;
54
- holder_title?: string;
55
- start_date?: string;
56
- end_date?: string;
57
- is_show_duration?: boolean;
58
- is_show_week?: boolean;
59
- promotions?: any[];
60
- isGift?: boolean;
61
- giftData?: any;
62
- };
63
- /**
64
- * 排序总配置
65
- */
66
- export declare type ProductCardTypes = {
67
- dataSource: productType;
68
- isShowImage?: boolean;
69
- isShowOriginalPrice?: boolean;
70
- isShowHolder?: boolean;
71
- isShowNote?: boolean;
72
- isShowPackageNote?: boolean;
73
- isShowDelete?: boolean;
74
- isShowEditProduct?: boolean;
75
- isShowAmountFooter?: boolean;
76
- disabledEdit?: boolean;
77
- locale?: string;
78
- symbol?: string;
79
- isShowChangeHolder?: boolean;
80
- isShowChangeResource?: boolean;
81
- isShowChangeDate?: boolean;
82
- disabledClick?: boolean;
83
- disabledEditClick?: boolean;
84
- onAction?: (val: any) => void;
85
- onDelete?: (val: any) => void;
86
- onNote?: (val: any) => void;
87
- onLike?: (val: any) => void;
88
- onCard?: (val: any) => void;
89
- onChangeResource?: (val: any) => void;
90
- onPromotion?: (val: any) => void;
91
- onEditProduct?: (val: any) => void;
92
- onGift?: (val: any) => void;
93
- osWarnTips?: Array<string>;
94
- [key: string]: any;
95
- };
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import type { PisellLookupProps, PisellLookupRef } from '../pisellLookup';
3
- /**
4
- * PisellFind Props
5
- * 继承 PisellLookup 的所有 Props
6
- */
7
- export declare type PisellFindProps = PisellLookupProps;
8
- /**
9
- * PisellFind Ref
10
- * 继承 PisellLookup 的所有 Ref 方法
11
- */
12
- export declare type PisellFindRef = PisellLookupRef;
13
- /**
14
- * PisellFind 组件
15
- * 基于 PisellLookup 的组件内查找优化版本
16
- *
17
- * 核心特点:
18
- * - 默认使用 button 触发器
19
- * - 默认不显示确认按钮(输入即搜索)
20
- * - 默认开启搜索历史
21
- * - 默认不展示结果区(结果在页面其他位置展示)
22
- *
23
- * @example
24
- * ```tsx
25
- * // 基础用法
26
- * <PisellFind
27
- * onSearch={(keyword) => {
28
- * const filtered = data.filter(item => item.name.includes(keyword));
29
- * setFilteredData(filtered);
30
- * }}
31
- * />
32
- *
33
- * // 切换为 Input 模式
34
- * <PisellFind
35
- * triggerType="input"
36
- * onSearch={(keyword) => filterData(keyword)}
37
- * />
38
- * ```
39
- */
40
- export declare const PisellFind: React.ForwardRefExoticComponent<PisellLookupProps & React.RefAttributes<PisellLookupRef>>;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import type { TableProps } from 'antd';
3
- import type { RecordBoardContextValue } from '../../types';
4
- import './Grid.less';
5
- export interface RecordBoardGridViewProps extends Omit<TableProps<any>, 'dataSource' | 'loading' | 'pagination'>, Partial<Pick<RecordBoardContextValue, 'data' | 'loading'>> {
6
- /** 列配置,同 antd Table columns */
7
- columns?: TableProps<any>['columns'];
8
- className?: string;
9
- style?: React.CSSProperties;
10
- /** 自定义渲染,传入后不再使用内置 Table */
11
- render?: (ctx: RecordBoardContextValue) => React.ReactNode;
12
- }
13
- declare const RecordBoardGridView: React.FC<RecordBoardGridViewProps>;
14
- export default RecordBoardGridView;
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface IProps {
4
- isShowImage?: boolean;
5
- dataSource: {
6
- image?: string;
7
- bundle?: any[];
8
- options?: any[];
9
- product_option_string?: string;
10
- name?: string;
11
- symbol?: string;
12
- price?: string | number;
13
- total?: number;
14
- origin_total?: number;
15
- num?: number;
16
- holder_id?: any;
17
- isFormSubject?: boolean;
18
- totalDifference?: number;
19
- };
20
- style?: React.CSSProperties;
21
- /** 作为主商品卡片展示
22
- * 1. 影响商品数量 tag 的位置
23
- * 2. isMain 且 type 为 a5,展示holder
24
- */
25
- isMainProduct?: boolean;
26
- maxSpecsCount?: number;
27
- type?: 'a2' | 'a5' | 'a9';
28
- isBundle?: boolean;
29
- showFooter?: boolean;
30
- isShowOriginalPrice?: boolean;
31
- isShowEditProduct?: boolean;
32
- onEditProduct?: (val: any) => void;
33
- disabledEditClick?: boolean;
34
- }
35
- declare const BasicInfo: (props: IProps) => React.JSX.Element;
36
- export default BasicInfo;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface IProps {
4
- isShowImage?: boolean;
5
- dataSource: {
6
- bundle?: any[];
7
- symbol?: string;
8
- };
9
- type?: 'a2' | 'a5' | 'a9';
10
- }
11
- declare const Packages: ({ isShowImage, dataSource, type }: IProps) => React.JSX.Element | null;
12
- export default Packages;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface SpecsProps {
4
- /** 数据源 */
5
- dataSource?: {
6
- bundle?: Array<{
7
- title: string;
8
- }>;
9
- options?: Array<{
10
- name: string;
11
- price: number;
12
- num: number;
13
- }>;
14
- product_option_string?: string;
15
- symbol?: string;
16
- };
17
- /** 最大展示数量,默认为 1 */
18
- maxSpecsCount?: number;
19
- type?: 'a2' | 'a5' | 'a9';
20
- }
21
- declare const Specs: (props: SpecsProps) => React.JSX.Element | null;
22
- export default Specs;