@teselagen/ui 0.5.23-beta.16 → 0.5.23-beta.17
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.
- package/index.cjs.js +1073 -1073
- package/index.es.js +18 -18
- package/package.json +1 -1
- package/src/DataTable/utils/withTableParams.js +3 -4
package/index.es.js
CHANGED
|
@@ -56,7 +56,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
56
56
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
-
import * as React$
|
|
59
|
+
import * as React$1 from "react";
|
|
60
60
|
import React__default, { useState, useEffect, forwardRef, useImperativeHandle, Fragment, useMemo, useRef, useReducer, useCallback, createElement, Component, useLayoutEffect, createContext, memo, useContext, isValidElement, PureComponent, createPortal as createPortal$1 } from "react";
|
|
61
61
|
import { Icon, Classes, Button, Intent, Keys, MenuItem, Tag, Popover, Tooltip, Spinner, InputGroup, Checkbox, Switch, TextArea, EditableText, NumericInput, RadioGroup, Position, FormGroup, Menu, Toaster, MenuDivider, useHotkeys, ContextMenu, Callout, Dialog, Card, Tabs, Tab, Colors, Overlay, KeyCombo, ProgressBar } from "@blueprintjs/core";
|
|
62
62
|
import { formValueSelector, initialize, change, Field, reduxForm, SubmissionError, destroy, touch, FormName, Fields } from "redux-form";
|
|
@@ -29146,19 +29146,19 @@ function dequal(foo, bar) {
|
|
|
29146
29146
|
}
|
|
29147
29147
|
__name(dequal, "dequal");
|
|
29148
29148
|
function useDeepCompareMemoize(value) {
|
|
29149
|
-
var ref2 = React$
|
|
29150
|
-
var signalRef = React$
|
|
29149
|
+
var ref2 = React$1.useRef(value);
|
|
29150
|
+
var signalRef = React$1.useRef(0);
|
|
29151
29151
|
if (!dequal(value, ref2.current)) {
|
|
29152
29152
|
ref2.current = value;
|
|
29153
29153
|
signalRef.current += 1;
|
|
29154
29154
|
}
|
|
29155
|
-
return React$
|
|
29155
|
+
return React$1.useMemo(function() {
|
|
29156
29156
|
return ref2.current;
|
|
29157
29157
|
}, [signalRef.current]);
|
|
29158
29158
|
}
|
|
29159
29159
|
__name(useDeepCompareMemoize, "useDeepCompareMemoize");
|
|
29160
29160
|
function useDeepCompareEffect(callback, dependencies) {
|
|
29161
|
-
return React$
|
|
29161
|
+
return React$1.useEffect(callback, useDeepCompareMemoize(dependencies));
|
|
29162
29162
|
}
|
|
29163
29163
|
__name(useDeepCompareEffect, "useDeepCompareEffect");
|
|
29164
29164
|
function fuzzysearch(needle, haystack) {
|
|
@@ -64447,7 +64447,6 @@ const useTableParams = /* @__PURE__ */ __name((props) => {
|
|
|
64447
64447
|
);
|
|
64448
64448
|
}
|
|
64449
64449
|
}
|
|
64450
|
-
const _tableConfig = getTableConfigFromStorage(formName);
|
|
64451
64450
|
const {
|
|
64452
64451
|
reduxFormQueryParams: _reduxFormQueryParams = {},
|
|
64453
64452
|
reduxFormSearchInput: _reduxFormSearchInput = "",
|
|
@@ -64481,6 +64480,7 @@ const useTableParams = /* @__PURE__ */ __name((props) => {
|
|
|
64481
64480
|
);
|
|
64482
64481
|
const currentParams = useDeepEqualMemo(_currentParams);
|
|
64483
64482
|
const defaultsToUse = useMemo(() => {
|
|
64483
|
+
const _tableConfig = getTableConfigFromStorage(formName);
|
|
64484
64484
|
const userSetPageSize = (_tableConfig == null ? void 0 : _tableConfig.userSetPageSize) && parseInt(_tableConfig.userSetPageSize, 10);
|
|
64485
64485
|
let _defaultsToUse = defaults2;
|
|
64486
64486
|
if (!syncDisplayOptionsToDb && userSetPageSize) {
|
|
@@ -64488,7 +64488,7 @@ const useTableParams = /* @__PURE__ */ __name((props) => {
|
|
|
64488
64488
|
_defaultsToUse.pageSize = userSetPageSize;
|
|
64489
64489
|
}
|
|
64490
64490
|
return _defaultsToUse;
|
|
64491
|
-
}, [
|
|
64491
|
+
}, [defaults2, formName, syncDisplayOptionsToDb]);
|
|
64492
64492
|
const passingProps = useMemo(
|
|
64493
64493
|
() => __spreadProps(__spreadValues({
|
|
64494
64494
|
formName: "tgDataTable"
|
|
@@ -64604,7 +64604,7 @@ const withTableParams = /* @__PURE__ */ __name((topLevelOptions) => compose(
|
|
|
64604
64604
|
branch(({ noRouter }) => !noRouter, withRouter),
|
|
64605
64605
|
(Comp) => (props) => {
|
|
64606
64606
|
const tableParams = useTableParams(__spreadValues(__spreadValues({}, topLevelOptions), props));
|
|
64607
|
-
return /* @__PURE__ */
|
|
64607
|
+
return /* @__PURE__ */ React__default.createElement(Comp, __spreadValues(__spreadValues({}, props), tableParams));
|
|
64608
64608
|
}
|
|
64609
64609
|
), "withTableParams");
|
|
64610
64610
|
function showAppSpinner() {
|
|
@@ -65233,7 +65233,7 @@ Object.defineProperty(DraggableCore$2, "__esModule", {
|
|
|
65233
65233
|
value: true
|
|
65234
65234
|
});
|
|
65235
65235
|
DraggableCore$2.default = void 0;
|
|
65236
|
-
var React
|
|
65236
|
+
var React = _interopRequireWildcard$1(React__default);
|
|
65237
65237
|
var _propTypes = _interopRequireDefault$2(requirePropTypes());
|
|
65238
65238
|
var _reactDom$1 = _interopRequireDefault$2(require$$2$1);
|
|
65239
65239
|
var _domFns = domFns;
|
|
@@ -65651,7 +65651,7 @@ var DraggableCore$1 = /* @__PURE__ */ function(_React$Component) {
|
|
|
65651
65651
|
}, {
|
|
65652
65652
|
key: "render",
|
|
65653
65653
|
value: /* @__PURE__ */ __name(function render3() {
|
|
65654
|
-
return /* @__PURE__ */ React
|
|
65654
|
+
return /* @__PURE__ */ React.cloneElement(React.Children.only(this.props.children), {
|
|
65655
65655
|
// Note: mouseMove handler is attached to document so it will still function
|
|
65656
65656
|
// when the user drags quickly and leaves the bounds of the element.
|
|
65657
65657
|
onMouseDown: this.onMouseDown,
|
|
@@ -65664,7 +65664,7 @@ var DraggableCore$1 = /* @__PURE__ */ function(_React$Component) {
|
|
|
65664
65664
|
}, "render")
|
|
65665
65665
|
}]);
|
|
65666
65666
|
return DraggableCore2;
|
|
65667
|
-
}(React
|
|
65667
|
+
}(React.Component);
|
|
65668
65668
|
DraggableCore$2.default = DraggableCore$1;
|
|
65669
65669
|
_defineProperty(DraggableCore$1, "displayName", "DraggableCore");
|
|
65670
65670
|
_defineProperty(DraggableCore$1, "propTypes", {
|
|
@@ -66531,10 +66531,10 @@ var Resizer = (
|
|
|
66531
66531
|
}
|
|
66532
66532
|
__name(Resizer2, "Resizer");
|
|
66533
66533
|
Resizer2.prototype.render = function() {
|
|
66534
|
-
return React$
|
|
66534
|
+
return React$1.createElement("div", { className: this.props.className || "", style: __assign$2(__assign$2({ position: "absolute", userSelect: "none" }, styles[this.props.direction]), this.props.replaceStyles || {}), onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart }, this.props.children);
|
|
66535
66535
|
};
|
|
66536
66536
|
return Resizer2;
|
|
66537
|
-
}(React$
|
|
66537
|
+
}(React$1.PureComponent)
|
|
66538
66538
|
);
|
|
66539
66539
|
var src = { exports: {} };
|
|
66540
66540
|
function memoize(fn4, options) {
|
|
@@ -67307,11 +67307,11 @@ var Resizable = (
|
|
|
67307
67307
|
}
|
|
67308
67308
|
var resizers = Object.keys(enable).map(function(dir) {
|
|
67309
67309
|
if (enable[dir] !== false) {
|
|
67310
|
-
return React$
|
|
67310
|
+
return React$1.createElement(Resizer, { key: dir, direction: dir, onResizeStart: _this.onResizeStart, replaceStyles: handleStyles && handleStyles[dir], className: handleClasses && handleClasses[dir] }, handleComponent && handleComponent[dir] ? handleComponent[dir] : null);
|
|
67311
67311
|
}
|
|
67312
67312
|
return null;
|
|
67313
67313
|
});
|
|
67314
|
-
return React$
|
|
67314
|
+
return React$1.createElement("div", { className: handleWrapperClass, style: handleWrapperStyle }, resizers);
|
|
67315
67315
|
};
|
|
67316
67316
|
Resizable2.prototype.render = function() {
|
|
67317
67317
|
var _this = this;
|
|
@@ -67327,10 +67327,10 @@ var Resizable = (
|
|
|
67327
67327
|
style.flexBasis = this.state.flexBasis;
|
|
67328
67328
|
}
|
|
67329
67329
|
var Wrapper = this.props.as || "div";
|
|
67330
|
-
return React$
|
|
67330
|
+
return React$1.createElement(
|
|
67331
67331
|
Wrapper,
|
|
67332
67332
|
__assign$1({ ref: this.ref, style, className: this.props.className }, extendsProps),
|
|
67333
|
-
this.state.isResizing && React$
|
|
67333
|
+
this.state.isResizing && React$1.createElement("div", { style: this.state.backgroundStyle }),
|
|
67334
67334
|
this.props.children,
|
|
67335
67335
|
this.renderResizer()
|
|
67336
67336
|
);
|
|
@@ -67363,7 +67363,7 @@ var Resizable = (
|
|
|
67363
67363
|
snapGap: 0
|
|
67364
67364
|
};
|
|
67365
67365
|
return Resizable2;
|
|
67366
|
-
}(React$
|
|
67366
|
+
}(React$1.PureComponent)
|
|
67367
67367
|
);
|
|
67368
67368
|
/*! *****************************************************************************
|
|
67369
67369
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
1
2
|
import { change as _change, formValueSelector } from "redux-form";
|
|
2
3
|
import { useDispatch, useSelector } from "react-redux";
|
|
3
4
|
import convertSchema from "./convertSchema";
|
|
@@ -10,7 +11,6 @@ import {
|
|
|
10
11
|
} from "./queryParams";
|
|
11
12
|
import { withRouter } from "react-router-dom";
|
|
12
13
|
import getTableConfigFromStorage from "./getTableConfigFromStorage";
|
|
13
|
-
import { useMemo } from "react";
|
|
14
14
|
import { useDeepEqualMemo } from "./useDeepEqualMemo";
|
|
15
15
|
import { branch, compose } from "recompose";
|
|
16
16
|
|
|
@@ -97,8 +97,6 @@ export const useTableParams = props => {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
const _tableConfig = getTableConfigFromStorage(formName);
|
|
101
|
-
|
|
102
100
|
const {
|
|
103
101
|
reduxFormQueryParams: _reduxFormQueryParams = {},
|
|
104
102
|
reduxFormSearchInput: _reduxFormSearchInput = "",
|
|
@@ -148,6 +146,7 @@ export const useTableParams = props => {
|
|
|
148
146
|
const currentParams = useDeepEqualMemo(_currentParams);
|
|
149
147
|
|
|
150
148
|
const defaultsToUse = useMemo(() => {
|
|
149
|
+
const _tableConfig = getTableConfigFromStorage(formName);
|
|
151
150
|
const userSetPageSize =
|
|
152
151
|
_tableConfig?.userSetPageSize &&
|
|
153
152
|
parseInt(_tableConfig.userSetPageSize, 10);
|
|
@@ -158,7 +157,7 @@ export const useTableParams = props => {
|
|
|
158
157
|
}
|
|
159
158
|
|
|
160
159
|
return _defaultsToUse;
|
|
161
|
-
}, [
|
|
160
|
+
}, [defaults, formName, syncDisplayOptionsToDb]);
|
|
162
161
|
|
|
163
162
|
const passingProps = useMemo(
|
|
164
163
|
() => ({
|