@arim-aisdc/public-components 0.0.44 → 0.0.46

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.
@@ -7,7 +7,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
7
7
  import { PublicThemeVariablesConfig } from "../../themes/variablesConfig";
8
8
  import { useContext, useEffect, useMemo } from 'react';
9
9
  import ConfigContext, { DEFAULT_CONTEXT } from "./context";
10
- import { _setTheme } from "../ThemeProvider/theme";
10
+ import { setCssVars } from "./cssVars";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  export var ConfigProvider = function ConfigProvider(_ref) {
13
13
  var _ref$config = _ref.config,
@@ -19,7 +19,7 @@ export var ConfigProvider = function ConfigProvider(_ref) {
19
19
  var theme = config.theme,
20
20
  variablesJson = config.variablesJson;
21
21
  useEffect(function () {
22
- _setTheme(_objectSpread(_objectSpread({}, PublicThemeVariablesConfig[theme]), variablesJson));
22
+ setCssVars(_objectSpread(_objectSpread({}, PublicThemeVariablesConfig[theme]), variablesJson));
23
23
  }, [theme, variablesJson]);
24
24
  return /*#__PURE__*/_jsx(ConfigContext.Provider, {
25
25
  value: memoedConfig,
@@ -13,6 +13,10 @@ import { CustomDragLayer } from "../components/CustomDragerLayer";
13
13
  // import RowContent from "../components/RowContent";
14
14
 
15
15
  import { createPortal } from 'react-dom';
16
+ // @ts-ignore
17
+ import DataEmptyDarkPng from "../../../assets/images/data-empty-dark.png";
18
+ // @ts-ignore
19
+ import DataEmptyLightPng from "../../../assets/images/data-empty-light.png";
16
20
  import { ColumnType } from "../TableMax";
17
21
  import Row from "./Row";
18
22
  import "./index.less";
@@ -177,7 +181,7 @@ var TableBody = function TableBody(_ref) {
177
181
  ref: dropRef,
178
182
  children: [/*#__PURE__*/_jsx("img", {
179
183
  className: "empty-img",
180
- src: "/images/data-empty-".concat(theme, ".png"),
184
+ src: theme === 'dark' ? DataEmptyDarkPng : DataEmptyLightPng,
181
185
  height: "60"
182
186
  }), /*#__PURE__*/_jsx("span", {
183
187
  className: "empty-text",
@@ -61,8 +61,6 @@ var TableMax = function TableMax(_ref) {
61
61
  originColumns = _ref.columns,
62
62
  _ref$datas = _ref.datas,
63
63
  datas = _ref$datas === void 0 ? [] : _ref$datas,
64
- _ref$theme = _ref.theme,
65
- propsTheme = _ref$theme === void 0 ? 'light' : _ref$theme,
66
64
  totalCount = _ref.totalCount,
67
65
  _ref$columnVisibleCon = _ref.columnVisibleConfig,
68
66
  columnVisibleConfig = _ref$columnVisibleCon === void 0 ? {} : _ref$columnVisibleCon,
@@ -999,7 +997,7 @@ var TableMax = function TableMax(_ref) {
999
997
  disableDragRowIds: disableDragRowIds,
1000
998
  selectRowWhenClick: selectRowWhenClick,
1001
999
  datas: datas,
1002
- theme: propsTheme || theme,
1000
+ theme: theme,
1003
1001
  dragBeforeStart: dragBeforeStart,
1004
1002
  hasVerticalScrollBar: hasVerticalScrollBar,
1005
1003
  shadowColumnInfo: shadowColumnInfo
@@ -1,13 +1,13 @@
1
1
  import { TableMaxColumnType } from "../../type";
2
- export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
3
- export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
4
- export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
5
- export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
2
+ export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
3
+ export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
4
+ export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
5
+ export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
6
6
  declare const customSortFns: {
7
- numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
8
- stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
9
- timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
10
- numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
7
+ numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
8
+ stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
9
+ timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
10
+ numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
11
11
  };
12
12
  export default customSortFns;
13
13
  export type SortFnType = keyof typeof customSortFns | undefined;
@@ -1,5 +1,5 @@
1
1
 
2
- @primary-color: #fa541c; // 全局主色
2
+ // @primary-color: #fa541c; // 全局主色
3
3
 
4
4
  @scrollThumb: var(--scrollThumb, rgba(255, 255, 255, 0.2));
5
5
  @scrollThumbHover: var(--scrollThumbHover, rgba(255, 255, 255, 0.3));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",