@arim-aisdc/public-components 0.0.42 → 0.0.43
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 {
|
|
10
|
+
import { _setTheme } from "../ThemeProvider/theme";
|
|
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,8 +19,8 @@ export var ConfigProvider = function ConfigProvider(_ref) {
|
|
|
19
19
|
var _config$variablesJson = config.variablesJson,
|
|
20
20
|
variablesJson = _config$variablesJson === void 0 ? PublicThemeVariablesConfig['light'] : _config$variablesJson;
|
|
21
21
|
useEffect(function () {
|
|
22
|
-
|
|
23
|
-
}, [variablesJson]);
|
|
22
|
+
_setTheme(variablesJson);
|
|
23
|
+
}, [memoedConfig.variablesJson]);
|
|
24
24
|
return /*#__PURE__*/_jsx(ConfigContext.Provider, {
|
|
25
25
|
value: memoedConfig,
|
|
26
26
|
children: children
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import cssVars from 'css-vars-ponyfill';
|
|
2
|
+
export var _setTheme = function _setTheme(variablesJson) {
|
|
3
|
+
cssVars({
|
|
4
|
+
onlyLegacy: true,
|
|
5
|
+
variables: variablesJson,
|
|
6
|
+
onError: function onError() {
|
|
7
|
+
cssVars({
|
|
8
|
+
onlyLegacy: true,
|
|
9
|
+
variables: variablesJson
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TableMaxColumnType } from "../../type";
|
|
2
|
-
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
3
|
-
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
4
|
-
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
5
|
-
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
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;
|
|
6
6
|
declare const customSortFns: {
|
|
7
|
-
numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
8
|
-
stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
9
|
-
timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
10
|
-
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
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;
|
|
11
11
|
};
|
|
12
12
|
export default customSortFns;
|
|
13
13
|
export type SortFnType = keyof typeof customSortFns | undefined;
|