@pisell/materials 6.11.214 → 6.11.216

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 (31) 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.js +2 -2
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/Pagination/index.d.ts +1 -0
  8. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  9. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  10. package/es/components/dataSourceComponents/fields/index.d.ts +9 -9
  11. package/es/components/date-picker/index.d.ts +0 -1
  12. package/es/components/productCard/lineItem/BookingLineItem.d.ts +21 -0
  13. package/es/components/productCard/lineItem/BookingLineItem.js +11 -2
  14. package/es/components/productCard/lineItem/index.d.ts +70 -0
  15. package/es/components/productCard/lineItem/index.js +3 -1
  16. package/es/components/table/BasicTable/index.d.ts +1 -0
  17. package/es/components/table/Table/fields/index.d.ts +2 -2
  18. package/es/components/table/Table/utils.d.ts +1 -1
  19. package/lib/components/Pagination/index.d.ts +1 -0
  20. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  21. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  22. package/lib/components/dataSourceComponents/fields/index.d.ts +9 -9
  23. package/lib/components/date-picker/index.d.ts +0 -1
  24. package/lib/components/productCard/lineItem/BookingLineItem.d.ts +21 -0
  25. package/lib/components/productCard/lineItem/BookingLineItem.js +16 -1
  26. package/lib/components/productCard/lineItem/index.d.ts +70 -0
  27. package/lib/components/productCard/lineItem/index.js +2 -0
  28. package/lib/components/table/BasicTable/index.d.ts +1 -0
  29. package/lib/components/table/Table/fields/index.d.ts +2 -2
  30. package/lib/components/table/Table/utils.d.ts +1 -1
  31. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PaginationProps } from 'antd';
2
3
  import './index.less';
3
4
  declare const Pagination: (props: PaginationProps) => JSX.Element | null;
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
19
19
  */
20
20
  declare const useTableProps: (props: UseTablePropsProps) => {
21
21
  currentComponentId: any;
22
- title: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
22
+ title: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
23
23
  pagination: {
24
24
  total: number;
25
25
  current: number;
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
28
28
  showSizeChanger: boolean;
29
29
  };
30
30
  columns: import("./useColumns").Column[];
31
- subTitle: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
31
+ subTitle: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
32
32
  buttons: any[] | null;
33
33
  filter: {
34
34
  dom: any;
@@ -71,7 +71,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
71
71
  show: boolean;
72
72
  useCustomAction: boolean;
73
73
  actionType: string;
74
- openMode: "modal" | "drawer";
74
+ openMode: "drawer" | "modal";
75
75
  openContentSize: "small" | "middle" | "large";
76
76
  openTitle: string;
77
77
  key: string;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  declare const Subdomain: React.FC<import("antd").InputProps & {
3
3
  onChange: (value: string) => void;
4
4
  onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
5
- rootDomain: "custom" | "saas" | "xzero";
5
+ rootDomain: "custom" | "xzero" | "saas";
6
6
  customDomain?: string | undefined;
7
7
  value?: string | undefined;
8
8
  tenantId: string;
@@ -20,7 +20,7 @@ declare const formFieldMap: {
20
20
  Subdomain: import("react").FC<import("antd").InputProps & {
21
21
  onChange: (value: string) => void;
22
22
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
23
- rootDomain: "custom" | "saas" | "xzero";
23
+ rootDomain: "custom" | "xzero" | "saas";
24
24
  customDomain?: string | undefined;
25
25
  value?: string | undefined;
26
26
  tenantId: string;
@@ -81,7 +81,11 @@ declare const formFieldMap: {
81
81
  extraParams?: Record<string, any> | undefined;
82
82
  }) => JSX.Element;
83
83
  };
84
- declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
84
+ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<any> | (import("react").FC<{}> & {
85
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
86
+ } & {
87
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
88
+ }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
85
89
  JSON: import("react").FC<any>;
86
90
  Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
87
91
  TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
@@ -94,7 +98,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
94
98
  Subdomain: import("react").FC<import("antd").InputProps & {
95
99
  onChange: (value: string) => void;
96
100
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
97
- rootDomain: "custom" | "saas" | "xzero";
101
+ rootDomain: "custom" | "xzero" | "saas";
98
102
  customDomain?: string | undefined;
99
103
  value?: string | undefined;
100
104
  tenantId: string;
@@ -102,10 +106,6 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
102
106
  fieldKey?: string | undefined;
103
107
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
104
108
  }) | (import("react").FC<{}> & {
105
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
106
- } & {
107
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
108
- }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
109
109
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
110
110
  } & {
111
111
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -118,9 +118,9 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
118
118
  } & {
119
119
  dataSource?: any;
120
120
  extraParams?: Record<string, any> | undefined;
121
- }) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
121
+ }) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
122
122
  onChange: (value: string) => void;
123
- } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | ((props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
123
+ } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | ((props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
124
124
  options?: any;
125
125
  optionSourceType?: "default" | "custom" | "api" | undefined;
126
126
  labelField: string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const DatePicker: (props: any) => JSX.Element;
3
2
  export default DatePicker;
@@ -0,0 +1,21 @@
1
+ import type { ProductCardTypes } from '../types';
2
+ import type { LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
3
+ interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
4
+ dataSource: any;
5
+ type: LineItemType;
6
+ cartSkuType: 'a2' | 'a5' | 'a9';
7
+ isShowBookingHeader: boolean;
8
+ relatedProductDataSource?: any;
9
+ addTimeProductDataSources?: any[];
10
+ rightActions?: any[];
11
+ escapeDom?: string;
12
+ statusOptions?: LineItemStatusOption[];
13
+ statusLoading?: boolean;
14
+ statusDisabled?: boolean;
15
+ isShowRelatedProduct?: boolean;
16
+ holderOptions?: LineItemHolderOption[];
17
+ onBookingStatusChange?: (status: string, item: any) => void;
18
+ onAddTimeProductCard?: (item: any) => void;
19
+ }
20
+ declare const BookingLineItem: (props: BookingLineItemProps) => JSX.Element | null;
21
+ export default BookingLineItem;
@@ -1,5 +1,5 @@
1
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
- var _excluded = ["dataSource", "type", "cartSkuType", "isShowBookingHeader", "relatedProductDataSource", "addTimeProductDataSources", "rightActions", "escapeDom", "isShowImage", "isFormSubject", "isShowDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "holderOptions", "onBookingStatusChange", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
2
+ var _excluded = ["dataSource", "type", "cartSkuType", "isShowBookingHeader", "relatedProductDataSource", "addTimeProductDataSources", "rightActions", "escapeDom", "isShowImage", "isFormSubject", "isShowDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "holderOptions", "onBookingStatusChange", "onAddTimeProductCard", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
3
3
  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); }
4
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
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
@@ -102,6 +102,7 @@ var BookingLineItem = function BookingLineItem(props) {
102
102
  isShowRelatedProduct = _props$isShowRelatedP === void 0 ? true : _props$isShowRelatedP,
103
103
  holderOptions = props.holderOptions,
104
104
  onBookingStatusChange = props.onBookingStatusChange,
105
+ onAddTimeProductCard = props.onAddTimeProductCard,
105
106
  _onAction = props.onAction,
106
107
  onDelete = props.onDelete,
107
108
  onNote = props.onNote,
@@ -242,7 +243,15 @@ var BookingLineItem = function BookingLineItem(props) {
242
243
  var key = (_ref3 = (_item$_id = item === null || item === void 0 ? void 0 : item._id) !== null && _item$_id !== void 0 ? _item$_id : item === null || item === void 0 ? void 0 : item.id) !== null && _ref3 !== void 0 ? _ref3 : index;
243
244
  return /*#__PURE__*/React.createElement("div", {
244
245
  className: "".concat(PREFIX, "__add-time-product-card"),
245
- key: "".concat(key)
246
+ key: "".concat(key),
247
+ onClick: function onClick(e) {
248
+ var _item$_origin;
249
+ e.preventDefault();
250
+ e.stopPropagation();
251
+ console.log('item xxxxxxxxxx', item);
252
+ if (disabledClick) return;
253
+ onAddTimeProductCard === null || onAddTimeProductCard === void 0 || onAddTimeProductCard((_item$_origin = item === null || item === void 0 ? void 0 : item._origin) !== null && _item$_origin !== void 0 ? _item$_origin : item);
254
+ }
246
255
  }, renderProductCard(item, item));
247
256
  }), shouldCollapse ? /*#__PURE__*/React.createElement("button", {
248
257
  className: "".concat(PREFIX, "__add-time-products-toggle"),
@@ -0,0 +1,70 @@
1
+ import type { ProductCardTypes } from '../types';
2
+ import type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
3
+ import './index.less';
4
+ export declare const PREFIX = "pisell-line-item";
5
+ export type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType, } from './types';
6
+ declare type LocalizedText = string | Record<string, unknown> | null | undefined;
7
+ export interface LineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
8
+ dataSource: any;
9
+ itemType?: itemType;
10
+ type?: LineItemType;
11
+ isShowBookingHeader: boolean;
12
+ rightActions?: any[];
13
+ escapeDom?: string;
14
+ statusOptions?: LineItemStatusOption[];
15
+ statusLoading?: boolean;
16
+ statusDisabled?: boolean;
17
+ isShowRelatedProduct?: boolean;
18
+ holderOptions?: LineItemHolderOption[];
19
+ onBookingStatusChange?: (status: string, item: any) => void;
20
+ onAddTimeProductCard?: (item: any) => void;
21
+ }
22
+ export declare const convertProductToLineItemProduct: (product: any, translationOriginal: (text: LocalizedText) => string, symbol: string) => {
23
+ _id: any;
24
+ id: any;
25
+ product_id: any;
26
+ product_variant_id: any;
27
+ title: string;
28
+ product_title: string;
29
+ name: string;
30
+ cover: any;
31
+ image: any;
32
+ num: any;
33
+ quantity: any;
34
+ price: any;
35
+ total: any;
36
+ origin_total: string | number | undefined;
37
+ original_total: string | number | undefined;
38
+ source_product_price: any;
39
+ selling_price: any;
40
+ payment_price: any;
41
+ tax_fee: any;
42
+ symbol: string;
43
+ note: any;
44
+ product_sku: any;
45
+ product_bundle: any;
46
+ bundle: any;
47
+ product_option_string: any;
48
+ options: any[];
49
+ discount_list: any;
50
+ promotions: any;
51
+ discount_reason: any;
52
+ isGift: boolean;
53
+ giftData: any;
54
+ _origin: any;
55
+ _extend: {
56
+ other: {
57
+ product_id: any;
58
+ option: any[];
59
+ bundle: any;
60
+ product_variant_id: any;
61
+ quantity: any;
62
+ };
63
+ note: any;
64
+ total: any;
65
+ origin_total: string | number | undefined;
66
+ payment_price: any;
67
+ };
68
+ };
69
+ declare const LineItem: (props: LineItemProps) => JSX.Element;
70
+ export default LineItem;
@@ -1,4 +1,4 @@
1
- var _excluded = ["dataSource", "itemType", "type", "isShowBookingHeader", "rightActions", "escapeDom", "isShowImage", "isShowDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "holderOptions", "onBookingStatusChange", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
1
+ var _excluded = ["dataSource", "itemType", "type", "isShowBookingHeader", "rightActions", "escapeDom", "isShowImage", "isShowDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "holderOptions", "onBookingStatusChange", "onAddTimeProductCard", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
2
2
  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); }
3
3
  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); }
4
4
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -203,6 +203,7 @@ var LineItem = function LineItem(props) {
203
203
  isShowRelatedProduct = _props$isShowRelatedP === void 0 ? true : _props$isShowRelatedP,
204
204
  holderOptions = props.holderOptions,
205
205
  onBookingStatusChange = props.onBookingStatusChange,
206
+ onAddTimeProductCard = props.onAddTimeProductCard,
206
207
  onAction = props.onAction,
207
208
  onDelete = props.onDelete,
208
209
  onNote = props.onNote,
@@ -274,6 +275,7 @@ var LineItem = function LineItem(props) {
274
275
  isShowRelatedProduct: isShowRelatedProduct,
275
276
  holderOptions: holderOptions,
276
277
  onBookingStatusChange: onBookingStatusChange,
278
+ onAddTimeProductCard: onAddTimeProductCard,
277
279
  onAction: onAction,
278
280
  onDelete: onDelete,
279
281
  onNote: onNote,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TableProps } from 'antd';
2
3
  declare const BasicTable: (props: TableProps<any>) => JSX.Element;
3
4
  export default BasicTable;
@@ -198,12 +198,12 @@ export declare const fieldList: ({
198
198
  field_icon: string;
199
199
  field_name: string;
200
200
  field_type: string;
201
- default_value: boolean;
201
+ default_value: string;
202
202
  } | {
203
203
  field_icon: string;
204
204
  field_name: string;
205
205
  field_type: string;
206
- default_value: string;
206
+ default_value: boolean;
207
207
  } | {
208
208
  field_icon: string;
209
209
  field_name: string;
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filter_setting" | "group_by" | "order_by" | "column_setting" | "view_mode" | "gallery_setting" | "filters")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filters" | "filter_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PaginationProps } from 'antd';
2
3
  import './index.less';
3
4
  declare const Pagination: (props: PaginationProps) => JSX.Element | null;
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
19
19
  */
20
20
  declare const useTableProps: (props: UseTablePropsProps) => {
21
21
  currentComponentId: any;
22
- title: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
22
+ title: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
23
23
  pagination: {
24
24
  total: number;
25
25
  current: number;
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
28
28
  showSizeChanger: boolean;
29
29
  };
30
30
  columns: import("./useColumns").Column[];
31
- subTitle: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
31
+ subTitle: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
32
32
  buttons: any[] | null;
33
33
  filter: {
34
34
  dom: any;
@@ -71,7 +71,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
71
71
  show: boolean;
72
72
  useCustomAction: boolean;
73
73
  actionType: string;
74
- openMode: "modal" | "drawer";
74
+ openMode: "drawer" | "modal";
75
75
  openContentSize: "small" | "middle" | "large";
76
76
  openTitle: string;
77
77
  key: string;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  declare const Subdomain: React.FC<import("antd").InputProps & {
3
3
  onChange: (value: string) => void;
4
4
  onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
5
- rootDomain: "custom" | "saas" | "xzero";
5
+ rootDomain: "custom" | "xzero" | "saas";
6
6
  customDomain?: string | undefined;
7
7
  value?: string | undefined;
8
8
  tenantId: string;
@@ -20,7 +20,7 @@ declare const formFieldMap: {
20
20
  Subdomain: import("react").FC<import("antd").InputProps & {
21
21
  onChange: (value: string) => void;
22
22
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
23
- rootDomain: "custom" | "saas" | "xzero";
23
+ rootDomain: "custom" | "xzero" | "saas";
24
24
  customDomain?: string | undefined;
25
25
  value?: string | undefined;
26
26
  tenantId: string;
@@ -81,7 +81,11 @@ declare const formFieldMap: {
81
81
  extraParams?: Record<string, any> | undefined;
82
82
  }) => JSX.Element;
83
83
  };
84
- declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
84
+ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<any> | (import("react").FC<{}> & {
85
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
86
+ } & {
87
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
88
+ }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
85
89
  JSON: import("react").FC<any>;
86
90
  Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
87
91
  TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
@@ -94,7 +98,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
94
98
  Subdomain: import("react").FC<import("antd").InputProps & {
95
99
  onChange: (value: string) => void;
96
100
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
97
- rootDomain: "custom" | "saas" | "xzero";
101
+ rootDomain: "custom" | "xzero" | "saas";
98
102
  customDomain?: string | undefined;
99
103
  value?: string | undefined;
100
104
  tenantId: string;
@@ -102,10 +106,6 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
102
106
  fieldKey?: string | undefined;
103
107
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
104
108
  }) | (import("react").FC<{}> & {
105
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
106
- } & {
107
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
108
- }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
109
109
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
110
110
  } & {
111
111
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -118,9 +118,9 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
118
118
  } & {
119
119
  dataSource?: any;
120
120
  extraParams?: Record<string, any> | undefined;
121
- }) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
121
+ }) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
122
122
  onChange: (value: string) => void;
123
- } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | ((props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
123
+ } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | ((props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
124
124
  options?: any;
125
125
  optionSourceType?: "default" | "custom" | "api" | undefined;
126
126
  labelField: string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const DatePicker: (props: any) => JSX.Element;
3
2
  export default DatePicker;
@@ -0,0 +1,21 @@
1
+ import type { ProductCardTypes } from '../types';
2
+ import type { LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
3
+ interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
4
+ dataSource: any;
5
+ type: LineItemType;
6
+ cartSkuType: 'a2' | 'a5' | 'a9';
7
+ isShowBookingHeader: boolean;
8
+ relatedProductDataSource?: any;
9
+ addTimeProductDataSources?: any[];
10
+ rightActions?: any[];
11
+ escapeDom?: string;
12
+ statusOptions?: LineItemStatusOption[];
13
+ statusLoading?: boolean;
14
+ statusDisabled?: boolean;
15
+ isShowRelatedProduct?: boolean;
16
+ holderOptions?: LineItemHolderOption[];
17
+ onBookingStatusChange?: (status: string, item: any) => void;
18
+ onAddTimeProductCard?: (item: any) => void;
19
+ }
20
+ declare const BookingLineItem: (props: BookingLineItemProps) => JSX.Element | null;
21
+ export default BookingLineItem;
@@ -85,6 +85,7 @@ var BookingLineItem = (props) => {
85
85
  isShowRelatedProduct = true,
86
86
  holderOptions,
87
87
  onBookingStatusChange,
88
+ onAddTimeProductCard,
88
89
  onAction,
89
90
  onDelete,
90
91
  onNote,
@@ -219,7 +220,21 @@ var BookingLineItem = (props) => {
219
220
  const visibleAddTimeProducts = isAddTimeProductsExpanded ? displayAddTimeProducts : displayAddTimeProducts.slice(0, ADD_TIME_PRODUCTS_PREVIEW_COUNT);
220
221
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 0 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__add-time-products` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__section-title` }, import_utils.locales.getText("pisell2.line-item.add-time-products")), visibleAddTimeProducts.map((item, index) => {
221
222
  const key = (item == null ? void 0 : item._id) ?? (item == null ? void 0 : item.id) ?? index;
222
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__add-time-product-card`, key: `${key}` }, renderProductCard(item, item));
223
+ return /* @__PURE__ */ import_react.default.createElement(
224
+ "div",
225
+ {
226
+ className: `${PREFIX}__add-time-product-card`,
227
+ key: `${key}`,
228
+ onClick: (e) => {
229
+ e.preventDefault();
230
+ e.stopPropagation();
231
+ console.log("item xxxxxxxxxx", item);
232
+ if (disabledClick) return;
233
+ onAddTimeProductCard == null ? void 0 : onAddTimeProductCard((item == null ? void 0 : item._origin) ?? item);
234
+ }
235
+ },
236
+ renderProductCard(item, item)
237
+ );
223
238
  }), shouldCollapse ? /* @__PURE__ */ import_react.default.createElement(
224
239
  "button",
225
240
  {
@@ -0,0 +1,70 @@
1
+ import type { ProductCardTypes } from '../types';
2
+ import type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
3
+ import './index.less';
4
+ export declare const PREFIX = "pisell-line-item";
5
+ export type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType, } from './types';
6
+ declare type LocalizedText = string | Record<string, unknown> | null | undefined;
7
+ export interface LineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
8
+ dataSource: any;
9
+ itemType?: itemType;
10
+ type?: LineItemType;
11
+ isShowBookingHeader: boolean;
12
+ rightActions?: any[];
13
+ escapeDom?: string;
14
+ statusOptions?: LineItemStatusOption[];
15
+ statusLoading?: boolean;
16
+ statusDisabled?: boolean;
17
+ isShowRelatedProduct?: boolean;
18
+ holderOptions?: LineItemHolderOption[];
19
+ onBookingStatusChange?: (status: string, item: any) => void;
20
+ onAddTimeProductCard?: (item: any) => void;
21
+ }
22
+ export declare const convertProductToLineItemProduct: (product: any, translationOriginal: (text: LocalizedText) => string, symbol: string) => {
23
+ _id: any;
24
+ id: any;
25
+ product_id: any;
26
+ product_variant_id: any;
27
+ title: string;
28
+ product_title: string;
29
+ name: string;
30
+ cover: any;
31
+ image: any;
32
+ num: any;
33
+ quantity: any;
34
+ price: any;
35
+ total: any;
36
+ origin_total: string | number | undefined;
37
+ original_total: string | number | undefined;
38
+ source_product_price: any;
39
+ selling_price: any;
40
+ payment_price: any;
41
+ tax_fee: any;
42
+ symbol: string;
43
+ note: any;
44
+ product_sku: any;
45
+ product_bundle: any;
46
+ bundle: any;
47
+ product_option_string: any;
48
+ options: any[];
49
+ discount_list: any;
50
+ promotions: any;
51
+ discount_reason: any;
52
+ isGift: boolean;
53
+ giftData: any;
54
+ _origin: any;
55
+ _extend: {
56
+ other: {
57
+ product_id: any;
58
+ option: any[];
59
+ bundle: any;
60
+ product_variant_id: any;
61
+ quantity: any;
62
+ };
63
+ note: any;
64
+ total: any;
65
+ origin_total: string | number | undefined;
66
+ payment_price: any;
67
+ };
68
+ };
69
+ declare const LineItem: (props: LineItemProps) => JSX.Element;
70
+ export default LineItem;
@@ -199,6 +199,7 @@ var LineItem = (props) => {
199
199
  isShowRelatedProduct = true,
200
200
  holderOptions,
201
201
  onBookingStatusChange,
202
+ onAddTimeProductCard,
202
203
  onAction,
203
204
  onDelete,
204
205
  onNote,
@@ -285,6 +286,7 @@ var LineItem = (props) => {
285
286
  isShowRelatedProduct,
286
287
  holderOptions,
287
288
  onBookingStatusChange,
289
+ onAddTimeProductCard,
288
290
  onAction,
289
291
  onDelete,
290
292
  onNote,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TableProps } from 'antd';
2
3
  declare const BasicTable: (props: TableProps<any>) => JSX.Element;
3
4
  export default BasicTable;
@@ -198,12 +198,12 @@ export declare const fieldList: ({
198
198
  field_icon: string;
199
199
  field_name: string;
200
200
  field_type: string;
201
- default_value: boolean;
201
+ default_value: string;
202
202
  } | {
203
203
  field_icon: string;
204
204
  field_name: string;
205
205
  field_type: string;
206
- default_value: string;
206
+ default_value: boolean;
207
207
  } | {
208
208
  field_icon: string;
209
209
  field_name: string;
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filter_setting" | "group_by" | "order_by" | "column_setting" | "view_mode" | "gallery_setting" | "filters")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filters" | "filter_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "6.11.214",
3
+ "version": "6.11.216",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",