@teselagen/ui 0.3.28 → 0.3.30
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 +21 -2
- package/index.es.js +21 -2
- package/package.json +1 -1
- package/src/DataTable/index.js +19 -2
- package/src/UploadCsvWizard.js +2 -2
- package/src/index.js +1 -0
- package/src/utils/browserUtils.js +3 -0
package/index.cjs.js
CHANGED
|
@@ -57287,7 +57287,7 @@ const _DataTable = class _DataTable extends React$1.Component {
|
|
|
57287
57287
|
isEntityDisabled,
|
|
57288
57288
|
entity
|
|
57289
57289
|
});
|
|
57290
|
-
const _isClean = entity._isClean && doNotValidateUntouchedRows;
|
|
57290
|
+
const _isClean = entity._isClean && doNotValidateUntouchedRows || isEntityClean(entity);
|
|
57291
57291
|
const err = !_isClean && reduxFormCellValidation[cellId];
|
|
57292
57292
|
let selectedTopBorder, selectedRightBorder, selectedBottomBorder, selectedLeftBorder;
|
|
57293
57293
|
if (reduxFormSelectedCells[cellId]) {
|
|
@@ -59483,6 +59483,21 @@ function stripNumberAtEnd(str) {
|
|
|
59483
59483
|
return str.replace(getNumberStrAtEnd(str), "");
|
|
59484
59484
|
}
|
|
59485
59485
|
__name(stripNumberAtEnd, "stripNumberAtEnd");
|
|
59486
|
+
function isEntityClean(e2) {
|
|
59487
|
+
let isClean = true;
|
|
59488
|
+
lodashExports.some(e2, (val, key) => {
|
|
59489
|
+
if (key === "id")
|
|
59490
|
+
return;
|
|
59491
|
+
if (key === "_isClean")
|
|
59492
|
+
return;
|
|
59493
|
+
if (val) {
|
|
59494
|
+
isClean = false;
|
|
59495
|
+
return true;
|
|
59496
|
+
}
|
|
59497
|
+
});
|
|
59498
|
+
return isClean;
|
|
59499
|
+
}
|
|
59500
|
+
__name(isEntityClean, "isEntityClean");
|
|
59486
59501
|
const wrapDialog = /* @__PURE__ */ __name((topLevelDialogProps = {}) => (Component) => (props) => {
|
|
59487
59502
|
const r2 = React$1.useRef();
|
|
59488
59503
|
const memoedHotkeys = React$1.useMemo(
|
|
@@ -62011,7 +62026,7 @@ __name(asyncValidateHelper, "asyncValidateHelper");
|
|
|
62011
62026
|
function removeCleanRows(reduxFormEntities, reduxFormCellValidation) {
|
|
62012
62027
|
const toFilterOut = {};
|
|
62013
62028
|
const entsToUse = (reduxFormEntities || []).filter((e2) => {
|
|
62014
|
-
if (!e2._isClean)
|
|
62029
|
+
if (!(e2._isClean || isEntityClean(e2)))
|
|
62015
62030
|
return true;
|
|
62016
62031
|
else {
|
|
62017
62032
|
toFilterOut[getIdOrCodeOrIndex(e2)] = true;
|
|
@@ -77420,6 +77435,9 @@ function withSelectTableRecords(_tableFormName, propName = "selectTableRecords")
|
|
|
77420
77435
|
);
|
|
77421
77436
|
}
|
|
77422
77437
|
__name(withSelectTableRecords, "withSelectTableRecords");
|
|
77438
|
+
const isSafari = /^((?!chrome|android).)*safari/i.test(
|
|
77439
|
+
navigator.userAgent
|
|
77440
|
+
);
|
|
77423
77441
|
function genericCommandFactory(config) {
|
|
77424
77442
|
const out = {};
|
|
77425
77443
|
for (const cmdId in config.commandDefs) {
|
|
@@ -78684,6 +78702,7 @@ exports.getTagsAndTagOptions = getTagsAndTagOptions;
|
|
|
78684
78702
|
exports.getTextFromEl = getTextFromEl;
|
|
78685
78703
|
exports.hotkeysById = hotkeysById;
|
|
78686
78704
|
exports.inventoryIcon = inventoryIcon;
|
|
78705
|
+
exports.isSafari = isSafari;
|
|
78687
78706
|
exports.keyboardIcon = keyboardIcon;
|
|
78688
78707
|
exports.mergeSchemas = mergeSchemas;
|
|
78689
78708
|
exports.moleculeIcon = moleculeIcon;
|
package/index.es.js
CHANGED
|
@@ -57269,7 +57269,7 @@ const _DataTable = class _DataTable extends React__default.Component {
|
|
|
57269
57269
|
isEntityDisabled,
|
|
57270
57270
|
entity
|
|
57271
57271
|
});
|
|
57272
|
-
const _isClean = entity._isClean && doNotValidateUntouchedRows;
|
|
57272
|
+
const _isClean = entity._isClean && doNotValidateUntouchedRows || isEntityClean(entity);
|
|
57273
57273
|
const err = !_isClean && reduxFormCellValidation[cellId];
|
|
57274
57274
|
let selectedTopBorder, selectedRightBorder, selectedBottomBorder, selectedLeftBorder;
|
|
57275
57275
|
if (reduxFormSelectedCells[cellId]) {
|
|
@@ -59465,6 +59465,21 @@ function stripNumberAtEnd(str) {
|
|
|
59465
59465
|
return str.replace(getNumberStrAtEnd(str), "");
|
|
59466
59466
|
}
|
|
59467
59467
|
__name(stripNumberAtEnd, "stripNumberAtEnd");
|
|
59468
|
+
function isEntityClean(e2) {
|
|
59469
|
+
let isClean = true;
|
|
59470
|
+
lodashExports.some(e2, (val, key) => {
|
|
59471
|
+
if (key === "id")
|
|
59472
|
+
return;
|
|
59473
|
+
if (key === "_isClean")
|
|
59474
|
+
return;
|
|
59475
|
+
if (val) {
|
|
59476
|
+
isClean = false;
|
|
59477
|
+
return true;
|
|
59478
|
+
}
|
|
59479
|
+
});
|
|
59480
|
+
return isClean;
|
|
59481
|
+
}
|
|
59482
|
+
__name(isEntityClean, "isEntityClean");
|
|
59468
59483
|
const wrapDialog = /* @__PURE__ */ __name((topLevelDialogProps = {}) => (Component2) => (props) => {
|
|
59469
59484
|
const r2 = useRef();
|
|
59470
59485
|
const memoedHotkeys = useMemo(
|
|
@@ -61993,7 +62008,7 @@ __name(asyncValidateHelper, "asyncValidateHelper");
|
|
|
61993
62008
|
function removeCleanRows(reduxFormEntities, reduxFormCellValidation) {
|
|
61994
62009
|
const toFilterOut = {};
|
|
61995
62010
|
const entsToUse = (reduxFormEntities || []).filter((e2) => {
|
|
61996
|
-
if (!e2._isClean)
|
|
62011
|
+
if (!(e2._isClean || isEntityClean(e2)))
|
|
61997
62012
|
return true;
|
|
61998
62013
|
else {
|
|
61999
62014
|
toFilterOut[getIdOrCodeOrIndex(e2)] = true;
|
|
@@ -77402,6 +77417,9 @@ function withSelectTableRecords(_tableFormName, propName = "selectTableRecords")
|
|
|
77402
77417
|
);
|
|
77403
77418
|
}
|
|
77404
77419
|
__name(withSelectTableRecords, "withSelectTableRecords");
|
|
77420
|
+
const isSafari = /^((?!chrome|android).)*safari/i.test(
|
|
77421
|
+
navigator.userAgent
|
|
77422
|
+
);
|
|
77405
77423
|
function genericCommandFactory(config) {
|
|
77406
77424
|
const out = {};
|
|
77407
77425
|
for (const cmdId in config.commandDefs) {
|
|
@@ -78667,6 +78685,7 @@ export {
|
|
|
78667
78685
|
getTextFromEl,
|
|
78668
78686
|
hotkeysById,
|
|
78669
78687
|
inventoryIcon,
|
|
78688
|
+
isSafari,
|
|
78670
78689
|
keyboardIcon,
|
|
78671
78690
|
mergeSchemas,
|
|
78672
78691
|
moleculeIcon,
|
package/package.json
CHANGED
package/src/DataTable/index.js
CHANGED
|
@@ -25,7 +25,8 @@ import {
|
|
|
25
25
|
get,
|
|
26
26
|
padStart,
|
|
27
27
|
omitBy,
|
|
28
|
-
times
|
|
28
|
+
times,
|
|
29
|
+
some
|
|
29
30
|
} from "lodash";
|
|
30
31
|
import joinUrl from "url-join";
|
|
31
32
|
|
|
@@ -1909,7 +1910,10 @@ class DataTable extends React.Component {
|
|
|
1909
1910
|
isEntityDisabled,
|
|
1910
1911
|
entity
|
|
1911
1912
|
});
|
|
1912
|
-
|
|
1913
|
+
|
|
1914
|
+
const _isClean =
|
|
1915
|
+
(entity._isClean && doNotValidateUntouchedRows) ||
|
|
1916
|
+
(isEntityClean(entity));
|
|
1913
1917
|
|
|
1914
1918
|
const err = !_isClean && reduxFormCellValidation[cellId];
|
|
1915
1919
|
let selectedTopBorder,
|
|
@@ -3546,3 +3550,16 @@ function getNumberStrAtEnd(str) {
|
|
|
3546
3550
|
function stripNumberAtEnd(str) {
|
|
3547
3551
|
return str.replace(getNumberStrAtEnd(str), "");
|
|
3548
3552
|
}
|
|
3553
|
+
|
|
3554
|
+
export function isEntityClean(e) {
|
|
3555
|
+
let isClean = true;
|
|
3556
|
+
some(e, (val, key) => {
|
|
3557
|
+
if (key === "id") return;
|
|
3558
|
+
if (key === "_isClean") return;
|
|
3559
|
+
if (val) {
|
|
3560
|
+
isClean = false;
|
|
3561
|
+
return true;
|
|
3562
|
+
}
|
|
3563
|
+
});
|
|
3564
|
+
return isClean;
|
|
3565
|
+
}
|
package/src/UploadCsvWizard.js
CHANGED
|
@@ -12,7 +12,7 @@ import { tgFormValueSelector } from "./utils/tgFormValues";
|
|
|
12
12
|
import { some } from "lodash";
|
|
13
13
|
import { times } from "lodash";
|
|
14
14
|
import DialogFooter from "./DialogFooter";
|
|
15
|
-
import DataTable from "./DataTable";
|
|
15
|
+
import DataTable, { isEntityClean } from "./DataTable";
|
|
16
16
|
import wrapDialog from "./wrapDialog";
|
|
17
17
|
import { omit } from "lodash";
|
|
18
18
|
import { connect } from "react-redux";
|
|
@@ -703,7 +703,7 @@ async function asyncValidateHelper(
|
|
|
703
703
|
function removeCleanRows(reduxFormEntities, reduxFormCellValidation) {
|
|
704
704
|
const toFilterOut = {};
|
|
705
705
|
const entsToUse = (reduxFormEntities || []).filter(e => {
|
|
706
|
-
if (!e._isClean) return true;
|
|
706
|
+
if (!(e._isClean || isEntityClean(e))) return true;
|
|
707
707
|
else {
|
|
708
708
|
toFilterOut[getIdOrCodeOrIndex(e)] = true;
|
|
709
709
|
return false;
|
package/src/index.js
CHANGED
|
@@ -63,6 +63,7 @@ export { default as pureNoFunc } from "./utils/pureNoFunc";
|
|
|
63
63
|
export * from "./utils/tagUtils";
|
|
64
64
|
export * from "./utils/hotkeyUtils";
|
|
65
65
|
export * from "./utils/menuUtils";
|
|
66
|
+
export * from "./utils/browserUtils";
|
|
66
67
|
export * from "./utils/commandUtils";
|
|
67
68
|
export * from "./utils/commandControls";
|
|
68
69
|
|