@pisell/materials 6.1.2 → 6.1.4

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 (82) 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 +1 -1
  6. package/build/lowcode/preview.js +146 -146
  7. package/build/lowcode/render/default/view.js +29 -23
  8. package/build/lowcode/view.js +29 -23
  9. package/es/components/DragSortList/index.js +6 -6
  10. package/es/components/classicLayout/index.js +4 -5
  11. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  12. package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
  13. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  14. package/es/components/dataSourceComponents/fields/index.d.ts +9 -8
  15. package/es/components/icon/index.js +5 -5
  16. package/es/components/list/index.js +6 -6
  17. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
  18. package/es/components/pisellWalletPassCard/index.d.ts +1 -0
  19. package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +1 -0
  20. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +1 -0
  21. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +1 -0
  22. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +1 -0
  23. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +1 -0
  24. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +1 -0
  25. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +1 -0
  26. package/es/components/qrcode/index.js +1 -1
  27. package/es/components/sort/components/InlineMenu/index.js +1 -1
  28. package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
  29. package/es/components/table/Actions/component/ViewMode/index.js +1 -1
  30. package/es/components/table/BasicTable/index.d.ts +1 -0
  31. package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +4 -5
  32. package/es/components/table/Header/Buttons/index.js +5 -5
  33. package/es/components/table/Table/AddFieldModal/index.js +6 -6
  34. package/es/components/table/Table/SelectField/index.d.ts +1 -0
  35. package/es/components/table/Table/SelectField/index.js +4 -4
  36. package/es/components/table/Table/fields/date/Edit/index.js +1 -1
  37. package/es/components/table/Table/fields/index.d.ts +1 -0
  38. package/es/components/table/Table/fields/link/Edit/index.js +5 -5
  39. package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
  40. package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
  41. package/es/components/table/Table/fields/search/filterUtil/index.js +0 -1
  42. package/es/components/table/Table/fields/text/Show/index.js +4 -4
  43. package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
  44. package/es/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
  45. package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
  46. package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
  47. package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
  48. package/es/components/table/Table/utils.d.ts +1 -1
  49. package/es/components/table/View/index.d.ts +1 -0
  50. package/es/components/table/hooks/useMergeColumnSetting.js +1 -2
  51. package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
  52. package/es/components/table/hooks/useTransFilterSetting.js +5 -5
  53. package/es/components/translation/utils.js +5 -5
  54. package/es/hooks/useResponsive.js +2 -2
  55. package/es/utils/hoc.js +1 -1
  56. package/es/utils/miniRedux.js +8 -9
  57. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  58. package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
  59. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  60. package/lib/components/dataSourceComponents/fields/index.d.ts +9 -8
  61. package/lib/components/lowCodePage/index.js +1 -2
  62. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
  63. package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
  64. package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +1 -0
  65. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +1 -0
  66. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +1 -0
  67. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +1 -0
  68. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +1 -0
  69. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +1 -0
  70. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +1 -0
  71. package/lib/components/table/BasicTable/index.d.ts +1 -0
  72. package/lib/components/table/Table/SelectField/index.d.ts +1 -0
  73. package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
  74. package/lib/components/table/Table/fields/index.d.ts +1 -0
  75. package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
  76. package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
  77. package/lib/components/table/Table/fields/utils/index.js +1 -2
  78. package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
  79. package/lib/components/table/Table/utils.d.ts +1 -1
  80. package/lib/components/table/View/index.d.ts +1 -0
  81. package/lib/hooks/useResponsive.js +3 -6
  82. package/package.json +2 -1
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface IProps {
3
4
  isShowImage?: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Resources: (props: any) => JSX.Element;
3
4
  export default Resources;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface IProps {
3
4
  hideDivider?: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Specs: (props: any) => JSX.Element | null;
3
4
  export default Specs;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import 'dayjs/locale/zh-cn';
2
3
  import 'dayjs/locale/en';
3
4
  import 'dayjs/locale/zh-tw';
@@ -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;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SelectField: () => JSX.Element;
2
3
  export default SelectField;
@@ -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
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const fieldMaps: {
2
3
  text: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -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
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const SortRow: ({ children, rowKey, onSortChange }: any) => JSX.Element;
3
4
  export default SortRow;
@@ -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" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "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 { GridViewProps } from '../types';
2
3
  declare const View: (props: GridViewProps & {
3
4
  setTableSetting: (values: Record<string, any>) => void;
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "6.1.2",
3
+ "version": "6.1.4",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -71,6 +71,7 @@
71
71
  "swiper": "^8.4.7",
72
72
  "react-barcode": "^1.5.3",
73
73
  "vod-js-sdk-v6": "^1.4.11",
74
+ "antd-mobile": "^5.38.1",
74
75
  "@pisell/date-picker": "3.0.4",
75
76
  "@pisell/icon": "0.0.11",
76
77
  "@pisell/utils": "3.0.0"