@teselagen/ui 0.3.36 → 0.3.38

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 CHANGED
@@ -18494,10 +18494,10 @@ var _objectKeysInternal = /* @__PURE__ */ __name(function(object2, names2) {
18494
18494
  return result;
18495
18495
  }, "_objectKeysInternal");
18496
18496
  var _enumBugKeys = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
18497
- var $keys$3 = _objectKeysInternal;
18497
+ var $keys$2 = _objectKeysInternal;
18498
18498
  var enumBugKeys = _enumBugKeys;
18499
18499
  var _objectKeys = Object.keys || /* @__PURE__ */ __name(function keys(O2) {
18500
- return $keys$3(O2, enumBugKeys);
18500
+ return $keys$2(O2, enumBugKeys);
18501
18501
  }, "keys");
18502
18502
  var _objectGops = {};
18503
18503
  _objectGops.f = Object.getOwnPropertySymbols;
@@ -19200,13 +19200,21 @@ var _isArray = Array.isArray || /* @__PURE__ */ __name(function isArray(arg) {
19200
19200
  }, "isArray");
19201
19201
  var _objectGopnExt = {};
19202
19202
  var _objectGopn = {};
19203
- var $keys$2 = _objectKeysInternal;
19204
- var hiddenKeys = _enumBugKeys.concat("length", "prototype");
19205
- _objectGopn.f = Object.getOwnPropertyNames || /* @__PURE__ */ __name(function getOwnPropertyNames(O2) {
19206
- return $keys$2(O2, hiddenKeys);
19207
- }, "getOwnPropertyNames");
19203
+ var hasRequired_objectGopn;
19204
+ function require_objectGopn() {
19205
+ if (hasRequired_objectGopn)
19206
+ return _objectGopn;
19207
+ hasRequired_objectGopn = 1;
19208
+ var $keys2 = _objectKeysInternal;
19209
+ var hiddenKeys = _enumBugKeys.concat("length", "prototype");
19210
+ _objectGopn.f = Object.getOwnPropertyNames || /* @__PURE__ */ __name(function getOwnPropertyNames4(O2) {
19211
+ return $keys2(O2, hiddenKeys);
19212
+ }, "getOwnPropertyNames");
19213
+ return _objectGopn;
19214
+ }
19215
+ __name(require_objectGopn, "require_objectGopn");
19208
19216
  var toIObject$2 = _toIobject;
19209
- var gOPN$1 = _objectGopn.f;
19217
+ var gOPN$1 = require_objectGopn().f;
19210
19218
  var toString$5 = {}.toString;
19211
19219
  var windowNames = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
19212
19220
  var getWindowNames = /* @__PURE__ */ __name(function(it) {
@@ -19216,7 +19224,7 @@ var getWindowNames = /* @__PURE__ */ __name(function(it) {
19216
19224
  return windowNames.slice();
19217
19225
  }
19218
19226
  }, "getWindowNames");
19219
- _objectGopnExt.f = /* @__PURE__ */ __name(function getOwnPropertyNames2(it) {
19227
+ _objectGopnExt.f = /* @__PURE__ */ __name(function getOwnPropertyNames(it) {
19220
19228
  return windowNames && toString$5.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
19221
19229
  }, "getOwnPropertyNames");
19222
19230
  var _objectGopd = {};
@@ -19355,7 +19363,7 @@ var $getOwnPropertyDescriptor = /* @__PURE__ */ __name(function getOwnPropertyDe
19355
19363
  D2.enumerable = true;
19356
19364
  return D2;
19357
19365
  }, "getOwnPropertyDescriptor");
19358
- var $getOwnPropertyNames = /* @__PURE__ */ __name(function getOwnPropertyNames3(it) {
19366
+ var $getOwnPropertyNames = /* @__PURE__ */ __name(function getOwnPropertyNames2(it) {
19359
19367
  var names2 = gOPN(toIObject(it));
19360
19368
  var result = [];
19361
19369
  var i = 0;
@@ -19399,7 +19407,7 @@ if (!USE_NATIVE) {
19399
19407
  }, "toString"));
19400
19408
  $GOPD.f = $getOwnPropertyDescriptor;
19401
19409
  $DP.f = $defineProperty;
19402
- _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
19410
+ require_objectGopn().f = gOPNExt.f = $getOwnPropertyNames;
19403
19411
  require_objectPie().f = $propertyIsEnumerable;
19404
19412
  $GOPS.f = $getOwnPropertySymbols;
19405
19413
  if (DESCRIPTORS && !_library) {
@@ -25290,6 +25298,28 @@ var ReactTable = function(_Methods) {
25290
25298
  _this.resizeColumnStart = _this.resizeColumnStart.bind(_this);
25291
25299
  _this.resizeColumnEnd = _this.resizeColumnEnd.bind(_this);
25292
25300
  _this.resizeColumnMoving = _this.resizeColumnMoving.bind(_this);
25301
+ setTimeout(function() {
25302
+ try {
25303
+ var newResized = _this.props.defaultResized || [];
25304
+ _this.tableRef.querySelectorAll(".tg-react-table-column-header").forEach(function(th) {
25305
+ var _th$parentNode$parent = th.parentNode.parentNode.getBoundingClientRect(), width = _th$parentNode$parent.width;
25306
+ var id2 = th.getAttribute("data-path");
25307
+ if (!newResized.find(function(x2) {
25308
+ return x2.id === id2;
25309
+ })) {
25310
+ newResized.push({
25311
+ id: id2,
25312
+ value: width
25313
+ });
25314
+ }
25315
+ });
25316
+ _this.setState({
25317
+ resized: newResized
25318
+ });
25319
+ } catch (e2) {
25320
+ console.warn("TNW: Error setting initial table column widths (please contact @tnrich if you see this error. thanks!):", e2);
25321
+ }
25322
+ }, 0);
25293
25323
  _this.state = {
25294
25324
  page: props.defaultPage,
25295
25325
  pageSize: props.defaultPageSize,
@@ -25824,7 +25854,16 @@ var ReactTable = function(_Methods) {
25824
25854
  _extends$i({
25825
25855
  className: classNames("ReactTable", className, rootProps.className),
25826
25856
  style: _extends$i({}, style2, rootProps.style)
25827
- }, rootProps.rest),
25857
+ }, rootProps.rest, {
25858
+ ref: /* @__PURE__ */ __name(function ref(r2) {
25859
+ if (!r2)
25860
+ return;
25861
+ if (rootProps.rest.ref) {
25862
+ rootProps.rest.ref(r2);
25863
+ }
25864
+ _this2.tableRef = r2;
25865
+ }, "ref")
25866
+ }),
25828
25867
  showPagination && showPaginationTop ? React$1.createElement(
25829
25868
  "div",
25830
25869
  { className: "pagination-top" },
@@ -40008,6 +40047,13 @@ const popoverOverflowModifiers = {
40008
40047
  const _TgSelect = class _TgSelect extends React$1.Component {
40009
40048
  constructor(props) {
40010
40049
  super(props);
40050
+ __publicField(this, "setOpenState", /* @__PURE__ */ __name((isOpen) => {
40051
+ const { handleOpenChange } = this.props;
40052
+ if (handleOpenChange) {
40053
+ handleOpenChange(isOpen);
40054
+ }
40055
+ this.setState({ isOpen });
40056
+ }, "setOpenState"));
40011
40057
  __publicField(this, "itemRenderer", /* @__PURE__ */ __name((i, { index: index2, handleClick, modifiers }) => {
40012
40058
  const optionRenderer = this.getOptionRenderer();
40013
40059
  const onClick = i.onClick || handleClick;
@@ -40040,7 +40086,7 @@ const _TgSelect = class _TgSelect extends React$1.Component {
40040
40086
  if (multi) {
40041
40087
  let valArray = getValueArray(value);
40042
40088
  if (closeOnSelect || item.closeOnSelect) {
40043
- this.setState({ isOpen: false });
40089
+ this.setOpenState(false);
40044
40090
  this.input && this.input.blur();
40045
40091
  }
40046
40092
  if (isTagSelect && item.value && item.value.includes && item.value.includes(":")) {
@@ -40057,7 +40103,7 @@ const _TgSelect = class _TgSelect extends React$1.Component {
40057
40103
  }
40058
40104
  return onChange([...valArray, item]);
40059
40105
  } else {
40060
- this.setState({ isOpen: false });
40106
+ this.setOpenState(false);
40061
40107
  this.input && this.input.blur();
40062
40108
  return onChange(item);
40063
40109
  }
@@ -40070,7 +40116,7 @@ const _TgSelect = class _TgSelect extends React$1.Component {
40070
40116
  );
40071
40117
  e2.stopPropagation();
40072
40118
  onChange(filteredVals);
40073
- this.setState({ isOpen: false });
40119
+ this.setOpenState(false);
40074
40120
  this.input.focus();
40075
40121
  }, "handleTagRemove"));
40076
40122
  __publicField(this, "handleTagInputRemove", /* @__PURE__ */ __name((val, index2) => {
@@ -40091,7 +40137,7 @@ const _TgSelect = class _TgSelect extends React$1.Component {
40091
40137
  const { onChange } = this.props;
40092
40138
  this.setState({ query: "" });
40093
40139
  onChange(newValue);
40094
- this.setState({ isOpen: false });
40140
+ this.setOpenState(false);
40095
40141
  this.input.focus();
40096
40142
  }, "handleClear"));
40097
40143
  __publicField(this, "itemListPredicate", /* @__PURE__ */ __name((queryString2, item) => {
@@ -40114,9 +40160,12 @@ const _TgSelect = class _TgSelect extends React$1.Component {
40114
40160
  }, "handleActiveItemChange"));
40115
40161
  __publicField(this, "onInteraction", /* @__PURE__ */ __name(() => {
40116
40162
  if (this.input != null && this.input !== document.activeElement) {
40117
- this.setState({ isOpen: false, query: "" });
40163
+ this.setOpenState(false);
40164
+ this.setState({
40165
+ query: ""
40166
+ });
40118
40167
  } else if (!this.props.openOnKeyDown) {
40119
- this.setState({ isOpen: true });
40168
+ this.setOpenState(true);
40120
40169
  }
40121
40170
  }, "onInteraction"));
40122
40171
  __publicField(this, "queryHasExactOptionMatch", /* @__PURE__ */ __name(() => {
@@ -40225,7 +40274,7 @@ const _TgSelect = class _TgSelect extends React$1.Component {
40225
40274
  onClick: (e2) => {
40226
40275
  if (this.state.isOpen) {
40227
40276
  e2.stopPropagation();
40228
- this.setState({ isOpen: false });
40277
+ this.setOpenState(false);
40229
40278
  }
40230
40279
  },
40231
40280
  disabled,
@@ -40298,11 +40347,11 @@ const _TgSelect = class _TgSelect extends React$1.Component {
40298
40347
  if (this.input != null) {
40299
40348
  this.input.blur();
40300
40349
  }
40301
- this.setState({ isOpen: false });
40350
+ this.setOpenState(false);
40302
40351
  e2.preventDefault();
40303
40352
  e2.stopPropagation();
40304
40353
  } else if (!(which === core$5.Keys.BACKSPACE || which === core$5.Keys.ARROW_LEFT || which === core$5.Keys.ARROW_RIGHT)) {
40305
- this.setState({ isOpen: true });
40354
+ this.setOpenState(true);
40306
40355
  }
40307
40356
  },
40308
40357
  inputProps: __spreadValues({
@@ -55336,7 +55385,7 @@ var KNOWN_STATICS = {
55336
55385
  arity: true
55337
55386
  };
55338
55387
  var defineProperty5 = Object.defineProperty;
55339
- var getOwnPropertyNames4 = Object.getOwnPropertyNames;
55388
+ var getOwnPropertyNames3 = Object.getOwnPropertyNames;
55340
55389
  var getOwnPropertySymbols3 = Object.getOwnPropertySymbols;
55341
55390
  var getOwnPropertyDescriptor3 = Object.getOwnPropertyDescriptor;
55342
55391
  var getPrototypeOf = Object.getPrototypeOf;
@@ -55349,7 +55398,7 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
55349
55398
  hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
55350
55399
  }
55351
55400
  }
55352
- var keys3 = getOwnPropertyNames4(sourceComponent);
55401
+ var keys3 = getOwnPropertyNames3(sourceComponent);
55353
55402
  if (getOwnPropertySymbols3) {
55354
55403
  keys3 = keys3.concat(getOwnPropertySymbols3(sourceComponent));
55355
55404
  }
@@ -56594,13 +56643,24 @@ const _DataTable = class _DataTable extends React$1.Component {
56594
56643
  }, 0);
56595
56644
  }
56596
56645
  }, "updateFromProps"));
56597
- __publicField(this, "formatAndValidateEntities", /* @__PURE__ */ __name((entities) => {
56646
+ __publicField(this, "formatAndValidateEntities", /* @__PURE__ */ __name((entities, { useDefaultValues, indexToStartAt } = {}) => {
56598
56647
  const { schema } = this.props;
56599
56648
  const editableFields = schema.fields.filter((f2) => !f2.isNotEditable);
56600
56649
  const validationErrors = {};
56601
56650
  const newEnts = immer(entities, (entities2) => {
56602
56651
  entities2.forEach((e2, index2) => {
56603
56652
  editableFields.forEach((columnSchema) => {
56653
+ if (useDefaultValues) {
56654
+ if (e2[columnSchema.path] === void 0) {
56655
+ if (lodashExports.isFunction(columnSchema.defaultValue)) {
56656
+ e2[columnSchema.path] = columnSchema.defaultValue(
56657
+ index2 + indexToStartAt,
56658
+ e2
56659
+ );
56660
+ } else
56661
+ e2[columnSchema.path] = columnSchema.defaultValue;
56662
+ }
56663
+ }
56604
56664
  const { error } = editCellHelper({
56605
56665
  entity: e2,
56606
56666
  columnSchema,
@@ -56924,8 +56984,9 @@ const _DataTable = class _DataTable extends React$1.Component {
56924
56984
  }, "handleCut"));
56925
56985
  __publicField(this, "getCellCopyText", /* @__PURE__ */ __name((cellWrapper) => {
56926
56986
  const text2 = cellWrapper && cellWrapper.getAttribute("data-copy-text");
56987
+ const jsonText = cellWrapper && cellWrapper.getAttribute("data-copy-json");
56927
56988
  const toRet = text2 || cellWrapper.textContent || "";
56928
- return toRet;
56989
+ return [toRet, jsonText];
56929
56990
  }, "getCellCopyText"));
56930
56991
  __publicField(this, "handleCopyRow", /* @__PURE__ */ __name((rowEl) => {
56931
56992
  const text2 = this.getRowCopyText(rowEl);
@@ -56933,13 +56994,26 @@ const _DataTable = class _DataTable extends React$1.Component {
56933
56994
  return window.toastr.warning("No text to copy");
56934
56995
  this.handleCopyHelper(text2, "Row Copied");
56935
56996
  }, "handleCopyRow"));
56936
- __publicField(this, "handleCopyColumn", /* @__PURE__ */ __name((e2, cellWrapper) => {
56997
+ __publicField(this, "handleCopyColumn", /* @__PURE__ */ __name((e2, cellWrapper, selectedRecords) => {
56937
56998
  const cellType = cellWrapper.getAttribute("data-test");
56938
- const allRowEls = getAllRows(e2);
56939
- if (!allRowEls)
56999
+ let rowElsToCopy = getAllRows(e2);
57000
+ if (!rowElsToCopy)
57001
+ return;
57002
+ if (selectedRecords) {
57003
+ const ids = selectedRecords.map((e22) => {
57004
+ var _a2;
57005
+ return (_a2 = getIdOrCodeOrIndex(e22)) == null ? void 0 : _a2.toString();
57006
+ });
57007
+ rowElsToCopy = Array.from(rowElsToCopy).filter((rowEl) => {
57008
+ var _a2;
57009
+ const id2 = (_a2 = rowEl.closest(".rt-tr-group")) == null ? void 0 : _a2.getAttribute("data-test-id");
57010
+ return id2 !== void 0 && ids.includes(id2);
57011
+ });
57012
+ }
57013
+ if (!rowElsToCopy)
56940
57014
  return;
56941
57015
  const textToCopy = lodashExports.map(
56942
- allRowEls,
57016
+ rowElsToCopy,
56943
57017
  (rowEl) => this.getRowCopyText(rowEl, { cellType })
56944
57018
  ).filter((text2) => text2).join("\n");
56945
57019
  if (!textToCopy)
@@ -56980,9 +57054,10 @@ const _DataTable = class _DataTable extends React$1.Component {
56980
57054
  return this.getCellCopyText(cellChild);
56981
57055
  }).join(" ");
56982
57056
  }, "getRowCopyText"));
56983
- __publicField(this, "handleCopyHelper", /* @__PURE__ */ __name((stringToCopy, message) => {
57057
+ __publicField(this, "handleCopyHelper", /* @__PURE__ */ __name((stringToCopy, objToCopy, message) => {
56984
57058
  const copyHandler = /* @__PURE__ */ __name((e2) => {
56985
57059
  e2.preventDefault();
57060
+ e2.clipboardData.setData("application/json", JSON.stringify(objToCopy));
56986
57061
  e2.clipboardData.setData("text/plain", stringToCopy);
56987
57062
  }, "copyHandler");
56988
57063
  document.addEventListener("copy", copyHandler);
@@ -57824,40 +57899,63 @@ const _DataTable = class _DataTable extends React$1.Component {
57824
57899
  const oldVal = val;
57825
57900
  const text2 = this.getCopyTextForCell(val, row, column);
57826
57901
  const isBool = column.type === "boolean";
57902
+ const dataTest = {
57903
+ "data-test": "tgCell_" + column.path
57904
+ };
57827
57905
  if (isCellEditable && isBool) {
57828
57906
  val = /* @__PURE__ */ React$1.createElement(
57829
57907
  core$5.Checkbox,
57830
- {
57908
+ __spreadProps(__spreadValues({
57831
57909
  disabled: isEntityDisabled(row.original),
57832
- className: "tg-cell-edit-boolean-checkbox",
57910
+ className: "tg-cell-edit-boolean-checkbox"
57911
+ }, dataTest), {
57833
57912
  checked: oldVal === "True",
57834
57913
  onChange: (e2) => {
57835
57914
  const checked = e2.target.checked;
57836
57915
  this.finishCellEdit(cellId, checked);
57837
57916
  }
57838
- }
57917
+ })
57839
57918
  );
57840
57919
  noEllipsis = true;
57841
57920
  } else {
57842
57921
  if (reduxFormEditingCell === cellId) {
57922
+ if (column.type === "genericSelect") {
57923
+ const GenericSelectComp = column.GenericSelectComp;
57924
+ return /* @__PURE__ */ React$1.createElement(
57925
+ GenericSelectComp,
57926
+ __spreadProps(__spreadValues({
57927
+ rowId,
57928
+ initialValue: text2
57929
+ }, dataTest), {
57930
+ finishEdit: (newVal, doNotStopEditing) => {
57931
+ this.finishCellEdit(cellId, newVal, doNotStopEditing);
57932
+ },
57933
+ dataTest,
57934
+ cancelEdit: this.cancelCellEdit
57935
+ })
57936
+ );
57937
+ }
57843
57938
  if (column.type === "dropdown" || column.type === "dropdownMulti") {
57844
57939
  return /* @__PURE__ */ React$1.createElement(
57845
57940
  DropdownCell,
57846
- {
57941
+ __spreadProps(__spreadValues({
57847
57942
  isMulti: column.type === "dropdownMulti",
57848
- initialValue: text2,
57943
+ initialValue: text2
57944
+ }, dataTest), {
57849
57945
  options: getVals(column.values),
57850
57946
  finishEdit: (newVal, doNotStopEditing) => {
57851
57947
  this.finishCellEdit(cellId, newVal, doNotStopEditing);
57852
57948
  },
57949
+ dataTest,
57853
57950
  cancelEdit: this.cancelCellEdit
57854
- }
57951
+ })
57855
57952
  );
57856
57953
  } else {
57857
57954
  return /* @__PURE__ */ React$1.createElement(
57858
57955
  EditableCell,
57859
57956
  {
57860
57957
  stopSelectAll: () => change("reduxFormEditingCellSelectAll", false),
57958
+ dataTest,
57861
57959
  shouldSelectAll: reduxFormEditingCellSelectAll,
57862
57960
  cancelEdit: this.cancelCellEdit,
57863
57961
  isNumeric: column.type === "number",
@@ -57886,18 +57984,18 @@ const _DataTable = class _DataTable extends React$1.Component {
57886
57984
  } = this.isSelectionARectangle();
57887
57985
  return /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, /* @__PURE__ */ React$1.createElement(
57888
57986
  "div",
57889
- {
57987
+ __spreadProps(__spreadValues({
57890
57988
  style: __spreadValues({}, !noEllipsis && {
57891
57989
  textOverflow: "ellipsis",
57892
57990
  overflow: "hidden"
57893
- }),
57894
- "data-test": "tgCell_" + column.path,
57991
+ })
57992
+ }, dataTest), {
57895
57993
  className: "tg-cell-wrapper",
57896
57994
  "data-copy-text": text2,
57897
57995
  title: title || void 0
57898
- },
57996
+ }),
57899
57997
  val
57900
- ), isCellEditable && (column.type === "dropdown" || column.type === "dropdownMulti") && /* @__PURE__ */ React$1.createElement(
57998
+ ), isCellEditable && (column.type === "dropdown" || column.type === "dropdownMulti" || column.type === "genericSelect") && /* @__PURE__ */ React$1.createElement(
57901
57999
  core$5.Icon,
57902
58000
  {
57903
58001
  icon: "caret-down",
@@ -58040,7 +58138,7 @@ const _DataTable = class _DataTable extends React$1.Component {
58040
58138
  const cellNumStr2 = getNumberStrAtEnd(cellVal);
58041
58139
  const cellNum2 = Number(cellNumStr2);
58042
58140
  const cellTextNoNum = stripNumberAtEnd(cellVal);
58043
- if (cellNumStr2.startsWith("0")) {
58141
+ if (cellNumStr2 == null ? void 0 : cellNumStr2.startsWith("0")) {
58044
58142
  maybePad = cellNumStr2.length;
58045
58143
  }
58046
58144
  if (cellTextNoNum && !prefix) {
@@ -58187,16 +58285,19 @@ const _DataTable = class _DataTable extends React$1.Component {
58187
58285
  return getIdOrCodeOrIndex(e2, i) === rowId;
58188
58286
  });
58189
58287
  const insertIndex = above ? indexToInsert : indexToInsert + 1;
58190
- let { newEnts, validationErrors } = this.formatAndValidateEntities(newEntities);
58288
+ const insertIndexToUse = appendToBottom ? entities2.length : insertIndex;
58289
+ let { newEnts, validationErrors } = this.formatAndValidateEntities(
58290
+ newEntities,
58291
+ {
58292
+ useDefaultValues: true,
58293
+ indexToStartAt: insertIndexToUse
58294
+ }
58295
+ );
58191
58296
  newEnts = newEnts.map((e2) => __spreadProps(__spreadValues({}, e2), {
58192
58297
  _isClean: true
58193
58298
  }));
58194
58299
  this.updateValidation(entities2, __spreadValues(__spreadValues({}, reduxFormCellValidation), validationErrors));
58195
- entities2.splice(
58196
- appendToBottom ? entities2.length : insertIndex,
58197
- 0,
58198
- ...newEnts
58199
- );
58300
+ entities2.splice(insertIndexToUse, 0, ...newEnts);
58200
58301
  });
58201
58302
  this.refocusTable();
58202
58303
  }, "insertRows"));
@@ -58237,8 +58338,8 @@ const _DataTable = class _DataTable extends React$1.Component {
58237
58338
  {
58238
58339
  key: "copyCell",
58239
58340
  onClick: () => {
58240
- const text2 = this.getCellCopyText(cellWrapper);
58241
- this.handleCopyHelper(text2, "Cell copied");
58341
+ const [text2, jsonText] = this.getCellCopyText(cellWrapper);
58342
+ this.handleCopyHelper(text2, jsonText, "Cell copied");
58242
58343
  },
58243
58344
  text: "Cell"
58244
58345
  }
@@ -58256,6 +58357,20 @@ const _DataTable = class _DataTable extends React$1.Component {
58256
58357
  }
58257
58358
  )
58258
58359
  );
58360
+ if (selectedRecords.length > 1) {
58361
+ copyMenuItems.push(
58362
+ /* @__PURE__ */ React$1.createElement(
58363
+ core$5.MenuItem,
58364
+ {
58365
+ key: "copyColumnSelected",
58366
+ onClick: () => {
58367
+ this.handleCopyColumn(e2, cellWrapper, selectedRecords);
58368
+ },
58369
+ text: "Column (Selected)"
58370
+ }
58371
+ )
58372
+ );
58373
+ }
58259
58374
  }
58260
58375
  if (selectedRecords.length === 0 || selectedRecords.length === 1) {
58261
58376
  const cell = e2.target.querySelector(".tg-cell-wrapper") || e2.target.closest(".tg-cell-wrapper") || e2.target.closest(".rt-td");
@@ -59374,12 +59489,13 @@ function EditableCell({
59374
59489
  initialValue,
59375
59490
  finishEdit,
59376
59491
  cancelEdit,
59377
- isNumeric
59492
+ isNumeric,
59493
+ dataTest
59378
59494
  }) {
59379
59495
  const [v2, setV] = React$1.useState(initialValue);
59380
59496
  return /* @__PURE__ */ React$1.createElement(
59381
59497
  "input",
59382
- {
59498
+ __spreadProps(__spreadValues({
59383
59499
  style: {
59384
59500
  border: 0,
59385
59501
  width: "95%",
@@ -59391,7 +59507,8 @@ function EditableCell({
59391
59507
  r2 == null ? void 0 : r2.select();
59392
59508
  stopSelectAll();
59393
59509
  }
59394
- },
59510
+ }
59511
+ }, dataTest), {
59395
59512
  type: isNumeric ? "number" : void 0,
59396
59513
  value: v2,
59397
59514
  autoFocus: true,
@@ -59410,7 +59527,7 @@ function EditableCell({
59410
59527
  onChange: (e2) => {
59411
59528
  setV(e2.target.value);
59412
59529
  }
59413
- }
59530
+ })
59414
59531
  );
59415
59532
  }
59416
59533
  __name(EditableCell, "EditableCell");
@@ -59419,7 +59536,8 @@ function DropdownCell({
59419
59536
  isMulti,
59420
59537
  initialValue,
59421
59538
  finishEdit,
59422
- cancelEdit
59539
+ cancelEdit,
59540
+ dataTest
59423
59541
  }) {
59424
59542
  const [v2, setV] = React$1.useState(
59425
59543
  isMulti ? initialValue.split(",").map((v22) => ({ value: v22, label: v22 })) : initialValue
@@ -59433,7 +59551,7 @@ function DropdownCell({
59433
59551
  },
59434
59552
  /* @__PURE__ */ React$1.createElement(
59435
59553
  TgSelect$1,
59436
- {
59554
+ __spreadProps(__spreadValues({
59437
59555
  small: true,
59438
59556
  multi: isMulti,
59439
59557
  autoOpen: true,
@@ -59444,7 +59562,8 @@ function DropdownCell({
59444
59562
  return;
59445
59563
  }
59446
59564
  finishEdit(val ? val.value : null);
59447
- },
59565
+ }
59566
+ }, dataTest), {
59448
59567
  popoverProps: {
59449
59568
  onClose: (e2) => {
59450
59569
  if (isMulti) {
@@ -59461,7 +59580,7 @@ function DropdownCell({
59461
59580
  }
59462
59581
  },
59463
59582
  options: options.map((value) => ({ label: value, value }))
59464
- }
59583
+ })
59465
59584
  )
59466
59585
  );
59467
59586
  }
@@ -59505,7 +59624,8 @@ function getNumberStrAtEnd(str) {
59505
59624
  }
59506
59625
  __name(getNumberStrAtEnd, "getNumberStrAtEnd");
59507
59626
  function stripNumberAtEnd(str) {
59508
- return str.replace(getNumberStrAtEnd(str), "");
59627
+ var _a2;
59628
+ return (_a2 = str == null ? void 0 : str.replace) == null ? void 0 : _a2.call(str, getNumberStrAtEnd(str), "");
59509
59629
  }
59510
59630
  __name(stripNumberAtEnd, "stripNumberAtEnd");
59511
59631
  function isEntityClean(e2) {
@@ -61895,7 +62015,7 @@ const PreviewCsvData = observer(function(props) {
61895
62015
  } = props;
61896
62016
  const rerenderKey = React$1.useRef(0);
61897
62017
  rerenderKey.current = rerenderKey.current + 1;
61898
- const data = userSchema.userData && userSchema.userData.length && userSchema.userData.map((row) => {
62018
+ const data = userSchema.userData && userSchema.userData.length && userSchema.userData.map((row, i) => {
61899
62019
  const toRet = {
61900
62020
  _isClean: row._isClean
61901
62021
  };
@@ -61908,7 +62028,10 @@ const PreviewCsvData = observer(function(props) {
61908
62028
  }
61909
62029
  if (toRet[path2] === void 0 || toRet[path2] === "") {
61910
62030
  if (defaultValue) {
61911
- toRet[path2] = defaultValue;
62031
+ if (lodashExports.isFunction(defaultValue)) {
62032
+ toRet[path2] = defaultValue(i, row);
62033
+ } else
62034
+ toRet[path2] = defaultValue;
61912
62035
  } else {
61913
62036
  toRet[path2] = "";
61914
62037
  }
@@ -71668,6 +71791,7 @@ function UploaderInner({
71668
71791
  overflowList,
71669
71792
  autoUnzip,
71670
71793
  disabled,
71794
+ noBuildCsvOption,
71671
71795
  initializeForm,
71672
71796
  showFilesCount,
71673
71797
  threeDotMenuItems,
@@ -71846,12 +71970,14 @@ function UploaderInner({
71846
71970
  subtext: "Includes Upload Instructions and Column Info",
71847
71971
  exampleFile: handleDownloadXlsxFile
71848
71972
  },
71849
- {
71850
- description: manualEnterMessage,
71851
- subtext: manualEnterSubMessage,
71852
- icon: "manually-entered-data",
71853
- exampleFile: handleManuallyEnterData
71854
- }
71973
+ ...noBuildCsvOption ? [] : [
71974
+ {
71975
+ description: manualEnterMessage,
71976
+ subtext: manualEnterSubMessage,
71977
+ icon: "manually-entered-data",
71978
+ exampleFile: handleManuallyEnterData
71979
+ }
71980
+ ]
71855
71981
  ];
71856
71982
  delete a2.exampleFile;
71857
71983
  }
@@ -72300,7 +72426,7 @@ function UploaderInner({
72300
72426
  },
72301
72427
  innerIcon || /* @__PURE__ */ React$1.createElement(core$5.Icon, { icon: "upload", iconSize: minimal ? 15 : 30 }),
72302
72428
  innerText || (minimal ? "Upload" : "Click or drag to upload"),
72303
- validateAgainstSchema && /* @__PURE__ */ React$1.createElement(
72429
+ validateAgainstSchema && !noBuildCsvOption && /* @__PURE__ */ React$1.createElement(
72304
72430
  "div",
72305
72431
  {
72306
72432
  style: {
@@ -78698,6 +78824,7 @@ exports.cardDetailsIcon = cardDetailsIcon;
78698
78824
  exports.combineReducersWithFullState = combineReducers;
78699
78825
  exports.comboToLabel = comboToLabel;
78700
78826
  exports.commandMenuEnhancer = commandMenuEnhancer;
78827
+ exports.convertSchema = convertSchema;
78701
78828
  exports.createCommandBarMenu = createCommandBarMenu;
78702
78829
  exports.createCommandMenu = createCommandMenu;
78703
78830
  exports.createDynamicBarMenu = createDynamicBarMenu;
@@ -78739,6 +78866,7 @@ exports.orfIcon = orfIcon;
78739
78866
  exports.popoverOverflowModifiers = popoverOverflowModifiers;
78740
78867
  exports.proteinIcon = proteinIcon;
78741
78868
  exports.pureNoFunc = pure;
78869
+ exports.removeCleanRows = removeCleanRows;
78742
78870
  exports.removeDuplicatesIcon = removeDuplicatesIcon;
78743
78871
  exports.renderBlueprintCheckbox = renderBlueprintCheckbox;
78744
78872
  exports.renderBlueprintDateInput = renderBlueprintDateInput;
@@ -78764,6 +78892,7 @@ exports.showContextMenu = showContextMenu;
78764
78892
  exports.showDialogOnDocBody = showDialogOnDocBody;
78765
78893
  exports.showProgressToast = showProgressToast;
78766
78894
  exports.strainIcon = strainIcon;
78895
+ exports.tgFormValueSelector = tgFormValueSelector;
78767
78896
  exports.tgFormValues = tgFormValues;
78768
78897
  exports.tg_modalState = tg_modalState;
78769
78898
  exports.tickMenuEnhancer = tickMenuEnhancer;