@teselagen/ui 0.5.21-beta.3 → 0.5.21-beta.5
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 +81 -66
- package/index.es.js +84 -69
- package/package.json +1 -1
- package/src/DataTable/index.js +74 -48
- package/src/DataTable/utils/withTableParams.js +5 -14
- package/src/FormComponents/Uploader.js +2 -1
- package/src/UploadCsvWizard.js +0 -1
package/index.cjs.js
CHANGED
|
@@ -48395,57 +48395,81 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
|
|
|
48395
48395
|
reduxFormSearchInput,
|
|
48396
48396
|
urlConnected
|
|
48397
48397
|
]);
|
|
48398
|
-
|
|
48399
|
-
|
|
48400
|
-
|
|
48401
|
-
|
|
48402
|
-
|
|
48403
|
-
|
|
48404
|
-
|
|
48405
|
-
|
|
48406
|
-
|
|
48407
|
-
|
|
48408
|
-
|
|
48409
|
-
|
|
48410
|
-
|
|
48411
|
-
|
|
48412
|
-
|
|
48413
|
-
|
|
48414
|
-
|
|
48415
|
-
|
|
48416
|
-
|
|
48417
|
-
|
|
48418
|
-
|
|
48419
|
-
|
|
48420
|
-
|
|
48421
|
-
|
|
48422
|
-
|
|
48423
|
-
|
|
48424
|
-
|
|
48425
|
-
|
|
48426
|
-
|
|
48427
|
-
|
|
48428
|
-
|
|
48429
|
-
|
|
48430
|
-
|
|
48431
|
-
|
|
48432
|
-
|
|
48433
|
-
|
|
48434
|
-
|
|
48435
|
-
|
|
48436
|
-
|
|
48437
|
-
|
|
48438
|
-
|
|
48439
|
-
|
|
48440
|
-
|
|
48441
|
-
|
|
48442
|
-
|
|
48443
|
-
|
|
48444
|
-
|
|
48445
|
-
|
|
48446
|
-
|
|
48447
|
-
|
|
48448
|
-
|
|
48398
|
+
const tableParams = React$1.useMemo(() => {
|
|
48399
|
+
if (!isTableParamsConnected) {
|
|
48400
|
+
const updateSearch = /* @__PURE__ */ __name((val) => {
|
|
48401
|
+
change("reduxFormSearchInput", val || "");
|
|
48402
|
+
}, "updateSearch");
|
|
48403
|
+
const setNewParams2 = /* @__PURE__ */ __name((newParams) => {
|
|
48404
|
+
urlConnected && setCurrentParamsOnUrl(newParams, history.replace);
|
|
48405
|
+
change("reduxFormQueryParams", newParams);
|
|
48406
|
+
}, "setNewParams2");
|
|
48407
|
+
const bindThese = makeDataTableHandlers({
|
|
48408
|
+
setNewParams: setNewParams2,
|
|
48409
|
+
updateSearch,
|
|
48410
|
+
defaults: props.defaults,
|
|
48411
|
+
onlyOneFilter: props.onlyOneFilter
|
|
48412
|
+
});
|
|
48413
|
+
const boundDispatchProps = {};
|
|
48414
|
+
Object.keys(bindThese).forEach(function(key) {
|
|
48415
|
+
const action = bindThese[key];
|
|
48416
|
+
boundDispatchProps[key] = function(...args) {
|
|
48417
|
+
action(...args, currentParams);
|
|
48418
|
+
};
|
|
48419
|
+
});
|
|
48420
|
+
const changeFormValue = /* @__PURE__ */ __name((...args) => change(...args), "changeFormValue");
|
|
48421
|
+
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
48422
|
+
changeFormValue,
|
|
48423
|
+
selectedEntities
|
|
48424
|
+
}, _tableParams), props), boundDispatchProps), {
|
|
48425
|
+
isTableParamsConnected: true
|
|
48426
|
+
//let the table know not to do local sorting/filtering etc.
|
|
48427
|
+
});
|
|
48428
|
+
}
|
|
48429
|
+
return _tableParams;
|
|
48430
|
+
}, [
|
|
48431
|
+
_tableParams,
|
|
48432
|
+
change,
|
|
48433
|
+
currentParams,
|
|
48434
|
+
history.replace,
|
|
48435
|
+
isTableParamsConnected,
|
|
48436
|
+
props,
|
|
48437
|
+
selectedEntities,
|
|
48438
|
+
urlConnected
|
|
48439
|
+
]);
|
|
48440
|
+
props = __spreadValues(__spreadValues({}, props), tableParams);
|
|
48441
|
+
const queryParams = React$1.useMemo(() => {
|
|
48442
|
+
if (!isTableParamsConnected) {
|
|
48443
|
+
const additionalFilterToUse = typeof props.additionalFilter === "function" ? props.additionalFilter.bind(void 0, ownProps) : () => props.additionalFilter;
|
|
48444
|
+
const additionalOrFilterToUse = typeof props.additionalOrFilter === "function" ? props.additionalOrFilter.bind(void 0, ownProps) : () => props.additionalOrFilter;
|
|
48445
|
+
return getQueryParams({
|
|
48446
|
+
doNotCoercePageSize,
|
|
48447
|
+
currentParams,
|
|
48448
|
+
entities: props.entities,
|
|
48449
|
+
// for local table
|
|
48450
|
+
urlConnected,
|
|
48451
|
+
defaults: props.defaults,
|
|
48452
|
+
schema: convertedSchema,
|
|
48453
|
+
isInfinite,
|
|
48454
|
+
isLocalCall,
|
|
48455
|
+
additionalFilter: additionalFilterToUse,
|
|
48456
|
+
additionalOrFilter: additionalOrFilterToUse,
|
|
48457
|
+
noOrderError: props.noOrderError,
|
|
48458
|
+
isCodeModel: props.isCodeModel,
|
|
48459
|
+
ownProps: props
|
|
48460
|
+
});
|
|
48461
|
+
}
|
|
48462
|
+
return {};
|
|
48463
|
+
}, [
|
|
48464
|
+
convertedSchema,
|
|
48465
|
+
currentParams,
|
|
48466
|
+
doNotCoercePageSize,
|
|
48467
|
+
isInfinite,
|
|
48468
|
+
isLocalCall,
|
|
48469
|
+
isTableParamsConnected,
|
|
48470
|
+
urlConnected
|
|
48471
|
+
]);
|
|
48472
|
+
props = __spreadValues(__spreadValues({}, props), queryParams);
|
|
48449
48473
|
const {
|
|
48450
48474
|
addFilters = noop$3,
|
|
48451
48475
|
additionalFilters,
|
|
@@ -53513,7 +53537,6 @@ const UploadCsvWizardDialog = compose(
|
|
|
53513
53537
|
}
|
|
53514
53538
|
});
|
|
53515
53539
|
const reduxFormEntitiesArray = useDeepEqualMemo(_reduxFormEntitiesArray);
|
|
53516
|
-
console.log({ _finishedFiles });
|
|
53517
53540
|
const finishedFiles = useDeepEqualMemo(_finishedFiles);
|
|
53518
53541
|
const [hasSubmittedOuter, setSubmittedOuter] = React$1.useState();
|
|
53519
53542
|
const [steps, setSteps] = React$1.useState(getInitialSteps(true));
|
|
@@ -63268,6 +63291,7 @@ const Uploader = /* @__PURE__ */ __name(({
|
|
|
63268
63291
|
if (noRedux) {
|
|
63269
63292
|
return _onChange(val);
|
|
63270
63293
|
}
|
|
63294
|
+
dispatch(reduxForm.touch(formName, name));
|
|
63271
63295
|
return dispatch(reduxForm.change(formName, name, val));
|
|
63272
63296
|
}, "onChange");
|
|
63273
63297
|
const handleSecondHalfOfUpload = /* @__PURE__ */ __name((_0) => __async(exports, [_0], function* ({
|
|
@@ -64431,22 +64455,13 @@ function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
64431
64455
|
const mergedOpts = getMergedOpts(topLevelOptions, ownProps);
|
|
64432
64456
|
const { formName, urlConnected, history, defaults: defaults2, onlyOneFilter } = mergedOpts;
|
|
64433
64457
|
function updateSearch(val) {
|
|
64434
|
-
|
|
64435
|
-
dispatch(reduxForm.change(formName, "reduxFormSearchInput", val || ""));
|
|
64436
|
-
});
|
|
64458
|
+
dispatch(reduxForm.change(formName, "reduxFormSearchInput", val || ""));
|
|
64437
64459
|
}
|
|
64438
64460
|
__name(updateSearch, "updateSearch");
|
|
64439
|
-
|
|
64440
|
-
|
|
64441
|
-
|
|
64442
|
-
|
|
64443
|
-
dispatch(reduxForm.change(formName, "reduxFormQueryParams", newParams));
|
|
64444
|
-
}, "setNewParams");
|
|
64445
|
-
} else {
|
|
64446
|
-
setNewParams = /* @__PURE__ */ __name(function(newParams) {
|
|
64447
|
-
dispatch(reduxForm.change(formName, "reduxFormQueryParams", newParams));
|
|
64448
|
-
}, "setNewParams");
|
|
64449
|
-
}
|
|
64461
|
+
const setNewParams = /* @__PURE__ */ __name((newParams) => {
|
|
64462
|
+
urlConnected && setCurrentParamsOnUrl(newParams, history.replace);
|
|
64463
|
+
dispatch(reduxForm.change(formName, "reduxFormQueryParams", newParams));
|
|
64464
|
+
}, "setNewParams");
|
|
64450
64465
|
return {
|
|
64451
64466
|
bindThese: makeDataTableHandlers({
|
|
64452
64467
|
setNewParams,
|
package/index.es.js
CHANGED
|
@@ -59,7 +59,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
59
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
|
-
import { formValueSelector, Field, change, reduxForm, SubmissionError, destroy, initialize, FormName, Fields } from "redux-form";
|
|
62
|
+
import { formValueSelector, Field, change, reduxForm, SubmissionError, destroy, initialize, touch, FormName, Fields } from "redux-form";
|
|
63
63
|
import require$$2$1, { unstable_batchedUpdates, createPortal } from "react-dom";
|
|
64
64
|
import { connect, useDispatch, useSelector, useStore } from "react-redux";
|
|
65
65
|
import { DateInput, DateRangeInput } from "@blueprintjs/datetime";
|
|
@@ -2024,8 +2024,8 @@ function createTippy(reference2, passedProps) {
|
|
|
2024
2024
|
});
|
|
2025
2025
|
return instance;
|
|
2026
2026
|
function getNormalizedTouchSettings() {
|
|
2027
|
-
var
|
|
2028
|
-
return Array.isArray(
|
|
2027
|
+
var touch2 = instance.props.touch;
|
|
2028
|
+
return Array.isArray(touch2) ? touch2 : [touch2, 0];
|
|
2029
2029
|
}
|
|
2030
2030
|
__name(getNormalizedTouchSettings, "getNormalizedTouchSettings");
|
|
2031
2031
|
function getIsCustomTouchBehavior() {
|
|
@@ -48377,57 +48377,81 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
|
|
|
48377
48377
|
reduxFormSearchInput,
|
|
48378
48378
|
urlConnected
|
|
48379
48379
|
]);
|
|
48380
|
-
|
|
48381
|
-
|
|
48382
|
-
|
|
48383
|
-
|
|
48384
|
-
|
|
48385
|
-
|
|
48386
|
-
|
|
48387
|
-
|
|
48388
|
-
|
|
48389
|
-
|
|
48390
|
-
|
|
48391
|
-
|
|
48392
|
-
|
|
48393
|
-
|
|
48394
|
-
|
|
48395
|
-
|
|
48396
|
-
|
|
48397
|
-
|
|
48398
|
-
|
|
48399
|
-
|
|
48400
|
-
|
|
48401
|
-
|
|
48402
|
-
|
|
48403
|
-
|
|
48404
|
-
|
|
48405
|
-
|
|
48406
|
-
|
|
48407
|
-
|
|
48408
|
-
|
|
48409
|
-
|
|
48410
|
-
|
|
48411
|
-
|
|
48412
|
-
|
|
48413
|
-
|
|
48414
|
-
|
|
48415
|
-
|
|
48416
|
-
|
|
48417
|
-
|
|
48418
|
-
|
|
48419
|
-
|
|
48420
|
-
|
|
48421
|
-
|
|
48422
|
-
|
|
48423
|
-
|
|
48424
|
-
|
|
48425
|
-
|
|
48426
|
-
|
|
48427
|
-
|
|
48428
|
-
|
|
48429
|
-
|
|
48430
|
-
|
|
48380
|
+
const tableParams = useMemo(() => {
|
|
48381
|
+
if (!isTableParamsConnected) {
|
|
48382
|
+
const updateSearch = /* @__PURE__ */ __name((val) => {
|
|
48383
|
+
change2("reduxFormSearchInput", val || "");
|
|
48384
|
+
}, "updateSearch");
|
|
48385
|
+
const setNewParams2 = /* @__PURE__ */ __name((newParams) => {
|
|
48386
|
+
urlConnected && setCurrentParamsOnUrl(newParams, history.replace);
|
|
48387
|
+
change2("reduxFormQueryParams", newParams);
|
|
48388
|
+
}, "setNewParams2");
|
|
48389
|
+
const bindThese = makeDataTableHandlers({
|
|
48390
|
+
setNewParams: setNewParams2,
|
|
48391
|
+
updateSearch,
|
|
48392
|
+
defaults: props.defaults,
|
|
48393
|
+
onlyOneFilter: props.onlyOneFilter
|
|
48394
|
+
});
|
|
48395
|
+
const boundDispatchProps = {};
|
|
48396
|
+
Object.keys(bindThese).forEach(function(key) {
|
|
48397
|
+
const action = bindThese[key];
|
|
48398
|
+
boundDispatchProps[key] = function(...args) {
|
|
48399
|
+
action(...args, currentParams);
|
|
48400
|
+
};
|
|
48401
|
+
});
|
|
48402
|
+
const changeFormValue = /* @__PURE__ */ __name((...args) => change2(...args), "changeFormValue");
|
|
48403
|
+
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
48404
|
+
changeFormValue,
|
|
48405
|
+
selectedEntities
|
|
48406
|
+
}, _tableParams), props), boundDispatchProps), {
|
|
48407
|
+
isTableParamsConnected: true
|
|
48408
|
+
//let the table know not to do local sorting/filtering etc.
|
|
48409
|
+
});
|
|
48410
|
+
}
|
|
48411
|
+
return _tableParams;
|
|
48412
|
+
}, [
|
|
48413
|
+
_tableParams,
|
|
48414
|
+
change2,
|
|
48415
|
+
currentParams,
|
|
48416
|
+
history.replace,
|
|
48417
|
+
isTableParamsConnected,
|
|
48418
|
+
props,
|
|
48419
|
+
selectedEntities,
|
|
48420
|
+
urlConnected
|
|
48421
|
+
]);
|
|
48422
|
+
props = __spreadValues(__spreadValues({}, props), tableParams);
|
|
48423
|
+
const queryParams = useMemo(() => {
|
|
48424
|
+
if (!isTableParamsConnected) {
|
|
48425
|
+
const additionalFilterToUse = typeof props.additionalFilter === "function" ? props.additionalFilter.bind(void 0, ownProps) : () => props.additionalFilter;
|
|
48426
|
+
const additionalOrFilterToUse = typeof props.additionalOrFilter === "function" ? props.additionalOrFilter.bind(void 0, ownProps) : () => props.additionalOrFilter;
|
|
48427
|
+
return getQueryParams({
|
|
48428
|
+
doNotCoercePageSize,
|
|
48429
|
+
currentParams,
|
|
48430
|
+
entities: props.entities,
|
|
48431
|
+
// for local table
|
|
48432
|
+
urlConnected,
|
|
48433
|
+
defaults: props.defaults,
|
|
48434
|
+
schema: convertedSchema,
|
|
48435
|
+
isInfinite,
|
|
48436
|
+
isLocalCall,
|
|
48437
|
+
additionalFilter: additionalFilterToUse,
|
|
48438
|
+
additionalOrFilter: additionalOrFilterToUse,
|
|
48439
|
+
noOrderError: props.noOrderError,
|
|
48440
|
+
isCodeModel: props.isCodeModel,
|
|
48441
|
+
ownProps: props
|
|
48442
|
+
});
|
|
48443
|
+
}
|
|
48444
|
+
return {};
|
|
48445
|
+
}, [
|
|
48446
|
+
convertedSchema,
|
|
48447
|
+
currentParams,
|
|
48448
|
+
doNotCoercePageSize,
|
|
48449
|
+
isInfinite,
|
|
48450
|
+
isLocalCall,
|
|
48451
|
+
isTableParamsConnected,
|
|
48452
|
+
urlConnected
|
|
48453
|
+
]);
|
|
48454
|
+
props = __spreadValues(__spreadValues({}, props), queryParams);
|
|
48431
48455
|
const {
|
|
48432
48456
|
addFilters = noop$3,
|
|
48433
48457
|
additionalFilters,
|
|
@@ -53495,7 +53519,6 @@ const UploadCsvWizardDialog = compose(
|
|
|
53495
53519
|
}
|
|
53496
53520
|
});
|
|
53497
53521
|
const reduxFormEntitiesArray = useDeepEqualMemo(_reduxFormEntitiesArray);
|
|
53498
|
-
console.log({ _finishedFiles });
|
|
53499
53522
|
const finishedFiles = useDeepEqualMemo(_finishedFiles);
|
|
53500
53523
|
const [hasSubmittedOuter, setSubmittedOuter] = useState();
|
|
53501
53524
|
const [steps, setSteps] = useState(getInitialSteps(true));
|
|
@@ -63250,6 +63273,7 @@ const Uploader = /* @__PURE__ */ __name(({
|
|
|
63250
63273
|
if (noRedux) {
|
|
63251
63274
|
return _onChange(val);
|
|
63252
63275
|
}
|
|
63276
|
+
dispatch(touch(formName, name));
|
|
63253
63277
|
return dispatch(change(formName, name, val));
|
|
63254
63278
|
}, "onChange");
|
|
63255
63279
|
const handleSecondHalfOfUpload = /* @__PURE__ */ __name((_0) => __async(void 0, [_0], function* ({
|
|
@@ -64413,22 +64437,13 @@ function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
64413
64437
|
const mergedOpts = getMergedOpts(topLevelOptions, ownProps);
|
|
64414
64438
|
const { formName, urlConnected, history, defaults: defaults2, onlyOneFilter } = mergedOpts;
|
|
64415
64439
|
function updateSearch(val) {
|
|
64416
|
-
|
|
64417
|
-
dispatch(change(formName, "reduxFormSearchInput", val || ""));
|
|
64418
|
-
});
|
|
64440
|
+
dispatch(change(formName, "reduxFormSearchInput", val || ""));
|
|
64419
64441
|
}
|
|
64420
64442
|
__name(updateSearch, "updateSearch");
|
|
64421
|
-
|
|
64422
|
-
|
|
64423
|
-
|
|
64424
|
-
|
|
64425
|
-
dispatch(change(formName, "reduxFormQueryParams", newParams));
|
|
64426
|
-
}, "setNewParams");
|
|
64427
|
-
} else {
|
|
64428
|
-
setNewParams = /* @__PURE__ */ __name(function(newParams) {
|
|
64429
|
-
dispatch(change(formName, "reduxFormQueryParams", newParams));
|
|
64430
|
-
}, "setNewParams");
|
|
64431
|
-
}
|
|
64443
|
+
const setNewParams = /* @__PURE__ */ __name((newParams) => {
|
|
64444
|
+
urlConnected && setCurrentParamsOnUrl(newParams, history.replace);
|
|
64445
|
+
dispatch(change(formName, "reduxFormQueryParams", newParams));
|
|
64446
|
+
}, "setNewParams");
|
|
64432
64447
|
return {
|
|
64433
64448
|
bindThese: makeDataTableHandlers({
|
|
64434
64449
|
setNewParams,
|
package/package.json
CHANGED
package/src/DataTable/index.js
CHANGED
|
@@ -278,63 +278,74 @@ const DataTable = ({
|
|
|
278
278
|
urlConnected
|
|
279
279
|
]);
|
|
280
280
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
281
|
+
const tableParams = useMemo(() => {
|
|
282
|
+
if (!isTableParamsConnected) {
|
|
283
|
+
const updateSearch = val => {
|
|
284
|
+
change("reduxFormSearchInput", val || "");
|
|
285
|
+
};
|
|
285
286
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
const setNewParams = newParams => {
|
|
288
|
+
urlConnected && setCurrentParamsOnUrl(newParams, history.replace);
|
|
289
|
+
change("reduxFormQueryParams", newParams); //we always will update the redux params as a workaround for withRouter not always working if inside a redux-connected container https://github.com/ReactTraining/react-router/issues/5037
|
|
290
|
+
};
|
|
290
291
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
292
|
+
const bindThese = makeDataTableHandlers({
|
|
293
|
+
setNewParams,
|
|
294
|
+
updateSearch,
|
|
295
|
+
defaults: props.defaults,
|
|
296
|
+
onlyOneFilter: props.onlyOneFilter
|
|
297
|
+
});
|
|
297
298
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
299
|
+
const boundDispatchProps = {};
|
|
300
|
+
//bind currentParams to actions
|
|
301
|
+
Object.keys(bindThese).forEach(function (key) {
|
|
302
|
+
const action = bindThese[key];
|
|
303
|
+
boundDispatchProps[key] = function (...args) {
|
|
304
|
+
action(...args, currentParams);
|
|
305
|
+
};
|
|
306
|
+
});
|
|
306
307
|
|
|
307
|
-
|
|
308
|
+
const changeFormValue = (...args) => change(...args);
|
|
308
309
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
310
|
+
return {
|
|
311
|
+
changeFormValue,
|
|
312
|
+
selectedEntities,
|
|
313
|
+
..._tableParams,
|
|
314
|
+
...props,
|
|
315
|
+
...boundDispatchProps,
|
|
316
|
+
isTableParamsConnected: true //let the table know not to do local sorting/filtering etc.
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
return _tableParams;
|
|
320
|
+
}, [
|
|
321
|
+
_tableParams,
|
|
322
|
+
change,
|
|
323
|
+
currentParams,
|
|
324
|
+
history.replace,
|
|
325
|
+
isTableParamsConnected,
|
|
326
|
+
props,
|
|
327
|
+
selectedEntities,
|
|
328
|
+
urlConnected
|
|
329
|
+
]);
|
|
318
330
|
|
|
319
331
|
props = {
|
|
320
332
|
...props,
|
|
321
|
-
...
|
|
333
|
+
...tableParams
|
|
322
334
|
};
|
|
323
335
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
336
|
+
const queryParams = useMemo(() => {
|
|
337
|
+
if (!isTableParamsConnected) {
|
|
338
|
+
const additionalFilterToUse =
|
|
339
|
+
typeof props.additionalFilter === "function"
|
|
340
|
+
? props.additionalFilter.bind(this, ownProps)
|
|
341
|
+
: () => props.additionalFilter;
|
|
329
342
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
343
|
+
const additionalOrFilterToUse =
|
|
344
|
+
typeof props.additionalOrFilter === "function"
|
|
345
|
+
? props.additionalOrFilter.bind(this, ownProps)
|
|
346
|
+
: () => props.additionalOrFilter;
|
|
334
347
|
|
|
335
|
-
|
|
336
|
-
...props,
|
|
337
|
-
...getQueryParams({
|
|
348
|
+
return getQueryParams({
|
|
338
349
|
doNotCoercePageSize,
|
|
339
350
|
currentParams,
|
|
340
351
|
entities: props.entities, // for local table
|
|
@@ -348,9 +359,24 @@ const DataTable = ({
|
|
|
348
359
|
noOrderError: props.noOrderError,
|
|
349
360
|
isCodeModel: props.isCodeModel,
|
|
350
361
|
ownProps: props
|
|
351
|
-
})
|
|
352
|
-
}
|
|
353
|
-
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
return {};
|
|
365
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
366
|
+
}, [
|
|
367
|
+
convertedSchema,
|
|
368
|
+
currentParams,
|
|
369
|
+
doNotCoercePageSize,
|
|
370
|
+
isInfinite,
|
|
371
|
+
isLocalCall,
|
|
372
|
+
isTableParamsConnected,
|
|
373
|
+
urlConnected
|
|
374
|
+
]);
|
|
375
|
+
|
|
376
|
+
props = {
|
|
377
|
+
...props,
|
|
378
|
+
...queryParams
|
|
379
|
+
};
|
|
354
380
|
|
|
355
381
|
const {
|
|
356
382
|
addFilters = noop,
|
|
@@ -182,22 +182,13 @@ export default function withTableParams(compOrOpts, pTopLevelOpts) {
|
|
|
182
182
|
mergedOpts;
|
|
183
183
|
|
|
184
184
|
function updateSearch(val) {
|
|
185
|
-
|
|
186
|
-
dispatch(change(formName, "reduxFormSearchInput", val || ""));
|
|
187
|
-
});
|
|
185
|
+
dispatch(change(formName, "reduxFormSearchInput", val || ""));
|
|
188
186
|
}
|
|
189
187
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
dispatch(change(formName, "reduxFormQueryParams", newParams)); //we always will update the redux params as a workaround for withRouter not always working if inside a redux-connected container https://github.com/ReactTraining/react-router/issues/5037
|
|
195
|
-
};
|
|
196
|
-
} else {
|
|
197
|
-
setNewParams = function (newParams) {
|
|
198
|
-
dispatch(change(formName, "reduxFormQueryParams", newParams));
|
|
199
|
-
};
|
|
200
|
-
}
|
|
188
|
+
const setNewParams = newParams => {
|
|
189
|
+
urlConnected && setCurrentParamsOnUrl(newParams, history.replace);
|
|
190
|
+
dispatch(change(formName, "reduxFormQueryParams", newParams)); //we always will update the redux params as a workaround for withRouter not always working if inside a redux-connected container https://github.com/ReactTraining/react-router/issues/5037
|
|
191
|
+
};
|
|
201
192
|
return {
|
|
202
193
|
bindThese: makeDataTableHandlers({
|
|
203
194
|
setNewParams,
|
|
@@ -36,7 +36,7 @@ import writeXlsxFile from "write-excel-file";
|
|
|
36
36
|
import { startCase } from "lodash-es";
|
|
37
37
|
import { getNewName } from "./getNewName";
|
|
38
38
|
import { isObject } from "lodash-es";
|
|
39
|
-
import { change, initialize } from "redux-form";
|
|
39
|
+
import { change, touch, initialize } from "redux-form";
|
|
40
40
|
import classNames from "classnames";
|
|
41
41
|
import convertSchema from "../DataTable/utils/convertSchema";
|
|
42
42
|
import { LoadingDots } from "./LoadingDots";
|
|
@@ -252,6 +252,7 @@ const Uploader = ({
|
|
|
252
252
|
if (noRedux) {
|
|
253
253
|
return _onChange(val);
|
|
254
254
|
}
|
|
255
|
+
dispatch(touch(formName, name));
|
|
255
256
|
return dispatch(change(formName, name, val));
|
|
256
257
|
};
|
|
257
258
|
|
package/src/UploadCsvWizard.js
CHANGED
|
@@ -658,7 +658,6 @@ const UploadCsvWizardDialog = compose(
|
|
|
658
658
|
}
|
|
659
659
|
});
|
|
660
660
|
const reduxFormEntitiesArray = useDeepEqualMemo(_reduxFormEntitiesArray);
|
|
661
|
-
console.log({ _finishedFiles });
|
|
662
661
|
const finishedFiles = useDeepEqualMemo(_finishedFiles);
|
|
663
662
|
|
|
664
663
|
const [hasSubmittedOuter, setSubmittedOuter] = useState();
|