@superblocksteam/library 2.0.3-next.89 → 2.0.3-next.92

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.
@@ -2703,14 +2703,14 @@ function getLoaderFn$1(options) {
2703
2703
  if (!(loader === "all")) return [3, 3];
2704
2704
  return [4, import(
2705
2705
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
2706
- "./allPathsLoader-BP4zIRze.js"
2706
+ "./allPathsLoader-7mZouuZs.js"
2707
2707
  )];
2708
2708
  case 2:
2709
2709
  return [2, _b2.sent().allPathsLoader];
2710
2710
  case 3:
2711
2711
  return [4, import(
2712
2712
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
2713
- "./splitPathsBySizeLoader-CELIsf7I.js"
2713
+ "./splitPathsBySizeLoader-CN4G9dEQ.js"
2714
2714
  )];
2715
2715
  case 4:
2716
2716
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -4639,7 +4639,7 @@ Transition.propTypes = define_process_env_default$1y.NODE_ENV !== "production" ?
4639
4639
  */
4640
4640
  onExited: PropTypes.func
4641
4641
  } : {};
4642
- function noop$7() {
4642
+ function noop$8() {
4643
4643
  }
4644
4644
  Transition.defaultProps = {
4645
4645
  in: false,
@@ -4648,12 +4648,12 @@ Transition.defaultProps = {
4648
4648
  appear: false,
4649
4649
  enter: true,
4650
4650
  exit: true,
4651
- onEnter: noop$7,
4652
- onEntering: noop$7,
4653
- onEntered: noop$7,
4654
- onExit: noop$7,
4655
- onExiting: noop$7,
4656
- onExited: noop$7
4651
+ onEnter: noop$8,
4652
+ onEntering: noop$8,
4653
+ onEntered: noop$8,
4654
+ onExit: noop$8,
4655
+ onExiting: noop$8,
4656
+ onExited: noop$8
4657
4657
  };
4658
4658
  Transition.UNMOUNTED = UNMOUNTED;
4659
4659
  Transition.EXITED = EXITED;
@@ -8315,7 +8315,7 @@ var Popover$2 = (
8315
8315
  if (!disabled && isOpen !== false && !isNodeEnv$3("production")) {
8316
8316
  console.warn(POPOVER_WARN_EMPTY_CONTENT$1);
8317
8317
  }
8318
- return this.renderTarget({ ref: noop$6 });
8318
+ return this.renderTarget({ ref: noop$7 });
8319
8319
  }
8320
8320
  return React.createElement(
8321
8321
  Manager,
@@ -8459,7 +8459,7 @@ var Popover$2 = (
8459
8459
  function isEscapeKeypressEvent$1(e3) {
8460
8460
  return e3 instanceof KeyboardEvent && e3.key === "Escape";
8461
8461
  }
8462
- function noop$6() {
8462
+ function noop$7() {
8463
8463
  }
8464
8464
  var MenuItem$5 = React.forwardRef(function(props, ref2) {
8465
8465
  var _a2, _b2;
@@ -50403,7 +50403,7 @@ function once(func) {
50403
50403
  return func.apply(this, arguments);
50404
50404
  };
50405
50405
  }
50406
- var noop$5 = function noop2() {
50406
+ var noop$6 = function noop2() {
50407
50407
  };
50408
50408
  function isFunction$3(fn3) {
50409
50409
  return typeof fn3 === "function";
@@ -50720,16 +50720,16 @@ Atom.diffValueMask_ = 4;
50720
50720
  var isAtom = /* @__PURE__ */ createInstanceofPredicate("Atom", Atom);
50721
50721
  function createAtom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) {
50722
50722
  if (onBecomeObservedHandler === void 0) {
50723
- onBecomeObservedHandler = noop$5;
50723
+ onBecomeObservedHandler = noop$6;
50724
50724
  }
50725
50725
  if (onBecomeUnobservedHandler === void 0) {
50726
- onBecomeUnobservedHandler = noop$5;
50726
+ onBecomeUnobservedHandler = noop$6;
50727
50727
  }
50728
50728
  var atom = new Atom(name);
50729
- if (onBecomeObservedHandler !== noop$5) {
50729
+ if (onBecomeObservedHandler !== noop$6) {
50730
50730
  onBecomeObserved(atom, onBecomeObservedHandler);
50731
50731
  }
50732
- if (onBecomeUnobservedHandler !== noop$5) {
50732
+ if (onBecomeUnobservedHandler !== noop$6) {
50733
50733
  onBecomeUnobserved(atom, onBecomeUnobservedHandler);
50734
50734
  }
50735
50735
  return atom;
@@ -52830,7 +52830,7 @@ var flow = /* @__PURE__ */ Object.assign(function flow2(arg1, arg2) {
52830
52830
  }
52831
52831
  var _res = gen["return"](void 0);
52832
52832
  var yieldedPromise = Promise.resolve(_res.value);
52833
- yieldedPromise.then(noop$5, noop$5);
52833
+ yieldedPromise.then(noop$6, noop$6);
52834
52834
  cancelPromise(yieldedPromise);
52835
52835
  rejector(new FlowCancellationError());
52836
52836
  } catch (e3) {
@@ -76869,9 +76869,9 @@ function merge$1() {
76869
76869
  }
76870
76870
  const ValidateMessagesContext = /* @__PURE__ */ createContext(void 0);
76871
76871
  var define_process_env_default$1n = {};
76872
- function noop$4() {
76872
+ function noop$5() {
76873
76873
  }
76874
- var warning$5 = noop$4;
76874
+ var warning$5 = noop$5;
76875
76875
  if (define_process_env_default$1n.NODE_ENV !== "production") {
76876
76876
  warning$5 = function warning22(valid, component, message2) {
76877
76877
  warningOnce$1(valid, "[antd: ".concat(component, "] ").concat(message2));
@@ -84687,7 +84687,7 @@ var Popup$1 = /* @__PURE__ */ React.forwardRef(function(_ref2, ref2) {
84687
84687
  });
84688
84688
  Popup$1.displayName = "Popup";
84689
84689
  var TriggerContext = /* @__PURE__ */ React.createContext(null);
84690
- function noop$3() {
84690
+ function noop$4() {
84691
84691
  }
84692
84692
  function returnEmptyString() {
84693
84693
  return "";
@@ -85256,9 +85256,9 @@ function generateTrigger(PortalComponent) {
85256
85256
  prefixCls: "rc-trigger-popup",
85257
85257
  getPopupClassNameFromAlign: returnEmptyString,
85258
85258
  getDocument: returnDocument,
85259
- onPopupVisibleChange: noop$3,
85260
- afterPopupVisibleChange: noop$3,
85261
- onPopupAlign: noop$3,
85259
+ onPopupVisibleChange: noop$4,
85260
+ afterPopupVisibleChange: noop$4,
85261
+ onPopupAlign: noop$4,
85262
85262
  popupClassName: "",
85263
85263
  mouseEnterDelay: 0,
85264
85264
  mouseLeaveDelay: 0.1,
@@ -109621,7 +109621,7 @@ var Action$1;
109621
109621
  Action2["SetDroppableDisabled"] = "setDroppableDisabled";
109622
109622
  Action2["UnregisterDroppable"] = "unregisterDroppable";
109623
109623
  })(Action$1 || (Action$1 = {}));
109624
- function noop$2() {
109624
+ function noop$3() {
109625
109625
  }
109626
109626
  function useSensor(sensor, options) {
109627
109627
  return useMemo$2(
@@ -111451,12 +111451,12 @@ const defaultPublicContext = {
111451
111451
  current: null
111452
111452
  },
111453
111453
  rect: null,
111454
- setRef: noop$2
111454
+ setRef: noop$3
111455
111455
  },
111456
111456
  scrollableAncestors: [],
111457
111457
  scrollableAncestorRects: [],
111458
111458
  measuringConfiguration: defaultMeasuringConfiguration,
111459
- measureDroppableContainers: noop$2,
111459
+ measureDroppableContainers: noop$3,
111460
111460
  windowRect: null,
111461
111461
  measuringScheduled: false
111462
111462
  };
@@ -111468,10 +111468,10 @@ const defaultInternalContext = {
111468
111468
  ariaDescribedById: {
111469
111469
  draggable: ""
111470
111470
  },
111471
- dispatch: noop$2,
111471
+ dispatch: noop$3,
111472
111472
  draggableNodes: /* @__PURE__ */ new Map(),
111473
111473
  over: null,
111474
- measureDroppableContainers: noop$2
111474
+ measureDroppableContainers: noop$3
111475
111475
  };
111476
111476
  const InternalContext = /* @__PURE__ */ createContext(defaultInternalContext);
111477
111477
  const PublicContext = /* @__PURE__ */ createContext(defaultPublicContext);
@@ -137921,149 +137921,6 @@ const tagsColumnProperties = {
137921
137921
  })
137922
137922
  }
137923
137923
  };
137924
- const propsForEditingType = {
137925
- [EditInputType.Text]: {
137926
- editMinLength: Prop.number().readAndWrite().propertiesPanel({
137927
- label: "Min length",
137928
- controlType: "INPUT_TEXT"
137929
- }),
137930
- editMaxLength: Prop.number().readAndWrite().propertiesPanel({
137931
- label: "Max length",
137932
- controlType: "INPUT_TEXT"
137933
- }),
137934
- editCustomValidationRule: Prop.string().readAndWrite().propertiesPanel({
137935
- label: "Custom validation rule",
137936
- controlType: "INPUT_TEXT"
137937
- }),
137938
- editCustomErrorMessage: Prop.string().readAndWrite().propertiesPanel({
137939
- label: "Custom error message",
137940
- controlType: "INPUT_TEXT"
137941
- }),
137942
- onFocusOut: Prop.event().propertiesPanel({
137943
- label: "onFocusOut"
137944
- })
137945
- },
137946
- [EditInputType.Number]: {
137947
- editCustomValidationRule: Prop.string().readAndWrite().propertiesPanel({
137948
- label: "Custom validation rule",
137949
- controlType: "INPUT_TEXT"
137950
- }),
137951
- editCustomErrorMessage: Prop.string().readAndWrite().propertiesPanel({
137952
- label: "Custom error message",
137953
- controlType: "INPUT_TEXT"
137954
- }),
137955
- onFocusOut: Prop.event().propertiesPanel({
137956
- label: "onFocusOut"
137957
- })
137958
- },
137959
- [EditInputType.Email]: {
137960
- editCustomValidationRule: Prop.string().readAndWrite().propertiesPanel({
137961
- label: "Custom validation rule",
137962
- controlType: "INPUT_TEXT"
137963
- }),
137964
- editCustomErrorMessage: Prop.string().readAndWrite().propertiesPanel({
137965
- label: "Custom error message",
137966
- controlType: "INPUT_TEXT"
137967
- }),
137968
- onFocusOut: Prop.event().propertiesPanel({
137969
- label: "onFocusOut"
137970
- })
137971
- },
137972
- [EditInputType.Dropdown]: {
137973
- editOptions: Prop.any().readAndWrite().propertiesPanel({
137974
- label: "Options",
137975
- controlType: "TABLE_LABEL_VALUE_CONTROL"
137976
- }),
137977
- useLabelAsDisplayValue: Prop.boolean().readAndWrite().propertiesPanel({
137978
- label: "Use label for cell display",
137979
- controlType: "SWITCH"
137980
- }),
137981
- editMultiSelect: Prop.boolean().readAndWrite().propertiesPanel({
137982
- label: "Multi-select",
137983
- controlType: "SWITCH"
137984
- }),
137985
- allowClearing: Prop.boolean().readAndWrite().propertiesPanel({
137986
- label: "Allow clearing",
137987
- controlType: "SWITCH"
137988
- }),
137989
- editDropdownClientSideFiltering: Prop.boolean().readAndWrite().propertiesPanel({
137990
- label: "Client-side filtering",
137991
- controlType: "SWITCH"
137992
- }),
137993
- onDropdownSearchTextChanged: Prop.event().propertiesPanel({
137994
- label: "onDropdownSearchTextChanged"
137995
- }),
137996
- onOptionChange: Prop.event().propertiesPanel({
137997
- label: "onOptionChange"
137998
- })
137999
- },
138000
- [EditInputType.Checkbox]: {
138001
- onCheckChange: Prop.event().propertiesPanel({
138002
- label: "onCheckChange"
138003
- })
138004
- },
138005
- [EditInputType.Date]: {
138006
- editMinDate: Prop.string().readAndWrite().propertiesPanel({
138007
- label: "Min date",
138008
- controlType: "DATE_PICKER"
138009
- }),
138010
- editMaxDate: Prop.string().readAndWrite().propertiesPanel({
138011
- label: "Max date",
138012
- controlType: "DATE_PICKER"
138013
- }),
138014
- editTwentyFourHourTime: Prop.boolean().readAndWrite().propertiesPanel({
138015
- label: "24 hour time",
138016
- controlType: "SWITCH"
138017
- }),
138018
- onDateSelected: Prop.event().propertiesPanel({
138019
- label: "onDateSelected"
138020
- })
138021
- }
138022
- };
138023
- const EDITABLE_ON_UPDATE_VALUES = [true, false];
138024
- const EDITABLE_ON_INSERTION_VALUES = [true, false];
138025
- const EDIT_COLUMN_TYPE_VALUES = Object.values(EditInputType);
138026
- const getEditingConfigs = () => {
138027
- const allVariants = [];
138028
- const isRequiredOnUpdate = Prop.boolean().readAndWrite().propertiesPanel({
138029
- label: "Required on update",
138030
- controlType: "SWITCH"
138031
- });
138032
- const isRequiredOnInsertion = Prop.boolean().readAndWrite().propertiesPanel({
138033
- label: "Required on insertion",
138034
- controlType: "SWITCH"
138035
- });
138036
- const defaultValue2 = Prop.string().readAndWrite().propertiesPanel({
138037
- label: "Default value",
138038
- controlType: "INPUT_TEXT"
138039
- });
138040
- for (const editableOnUpdate of EDITABLE_ON_UPDATE_VALUES) {
138041
- for (const editableOnInsertion of EDITABLE_ON_INSERTION_VALUES) {
138042
- for (const editColumnType of EDIT_COLUMN_TYPE_VALUES) {
138043
- if (editableOnUpdate || editableOnInsertion) {
138044
- allVariants.push({
138045
- isEditableOnUpdate: Prop.literal(editableOnUpdate),
138046
- ...editableOnUpdate ? { isRequiredOnUpdate } : {},
138047
- isEditableOnInsertion: Prop.literal(editableOnInsertion),
138048
- ...editableOnInsertion ? {
138049
- isRequiredOnInsertion,
138050
- defaultValue: defaultValue2
138051
- } : {},
138052
- editColumnType: Prop.literal(editColumnType),
138053
- ...propsForEditingType[editColumnType]
138054
- });
138055
- } else {
138056
- allVariants.push({
138057
- isEditableOnUpdate: Prop.literal(editableOnUpdate),
138058
- isEditableOnInsertion: Prop.literal(editableOnInsertion),
138059
- editColumnType: Prop.literal(editColumnType)
138060
- });
138061
- }
138062
- }
138063
- }
138064
- }
138065
- return allVariants;
138066
- };
138067
137924
  const columnPanelConfig = {
138068
137925
  general: Section.category(PropsPanelCategory.Content).children({
138069
137926
  label: Prop.string().readAndWrite().propertiesPanel({
@@ -138237,52 +138094,54 @@ const columnPanelConfig = {
138237
138094
  }
138238
138095
  ]
138239
138096
  })
138240
- ),
138241
- editing: Section.category(PropsPanelCategory.Interaction).add(
138242
- Prop.union({
138243
- shared: {
138244
- isEditableOnUpdate: Prop.boolean().readAndWrite().propertiesPanel({
138245
- label: "Editable on update",
138246
- controlType: "SWITCH"
138247
- }),
138248
- isEditableOnInsertion: Prop.boolean().readAndWrite().propertiesPanel({
138249
- label: "Editable on insertion",
138250
- controlType: "SWITCH"
138251
- }),
138252
- editColumnType: Prop.string().readAndWrite().propertiesPanel({
138253
- label: "Editing type",
138254
- controlType: "DROP_DOWN",
138255
- options: [
138256
- {
138257
- label: "Text",
138258
- value: EditInputType.Text
138259
- },
138260
- {
138261
- label: "Number",
138262
- value: EditInputType.Number
138263
- },
138264
- {
138265
- label: "Email",
138266
- value: EditInputType.Email
138267
- },
138268
- {
138269
- label: "Dropdown",
138270
- value: EditInputType.Dropdown
138271
- },
138272
- {
138273
- label: "Checkbox",
138274
- value: EditInputType.Checkbox
138275
- },
138276
- {
138277
- label: "Date picker",
138278
- value: EditInputType.Date
138279
- }
138280
- ]
138281
- })
138282
- },
138283
- variants: getEditingConfigs()
138284
- })
138285
138097
  )
138098
+ // editing: Section.category(PropsPanelCategory.Interaction).add(
138099
+ // Prop.union({
138100
+ // shared: {
138101
+ // isEditableOnUpdate: Prop.boolean().readAndWrite().propertiesPanel({
138102
+ // label: "Editable on update",
138103
+ // controlType: "SWITCH",
138104
+ // }),
138105
+ // isEditableOnInsertion: Prop.boolean().readAndWrite().propertiesPanel({
138106
+ // label: "Editable on insertion",
138107
+ // controlType: "SWITCH",
138108
+ // }),
138109
+ // editColumnType: Prop.string<EditInputType>()
138110
+ // .readAndWrite()
138111
+ // .propertiesPanel({
138112
+ // label: "Editing type",
138113
+ // controlType: "DROP_DOWN",
138114
+ // options: [
138115
+ // {
138116
+ // label: "Text",
138117
+ // value: EditInputType.Text,
138118
+ // },
138119
+ // {
138120
+ // label: "Number",
138121
+ // value: EditInputType.Number,
138122
+ // },
138123
+ // {
138124
+ // label: "Email",
138125
+ // value: EditInputType.Email,
138126
+ // },
138127
+ // {
138128
+ // label: "Dropdown",
138129
+ // value: EditInputType.Dropdown,
138130
+ // },
138131
+ // {
138132
+ // label: "Checkbox",
138133
+ // value: EditInputType.Checkbox,
138134
+ // },
138135
+ // {
138136
+ // label: "Date picker",
138137
+ // value: EditInputType.Date,
138138
+ // },
138139
+ // ],
138140
+ // }),
138141
+ // },
138142
+ // variants: getEditingConfigs(),
138143
+ // }),
138144
+ // ),
138286
138145
  };
138287
138146
  const JUSTIFY_CONTENT = {
138288
138147
  LEFT: "flex-start",
@@ -147478,14 +147337,14 @@ function getLoaderFn(options) {
147478
147337
  if (!(loader === "all")) return [3, 3];
147479
147338
  return [4, import(
147480
147339
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
147481
- "./allPathsLoader-BvaaZMn9.js"
147340
+ "./allPathsLoader-BW4c5e6b.js"
147482
147341
  )];
147483
147342
  case 2:
147484
147343
  return [2, _b2.sent().allPathsLoader];
147485
147344
  case 3:
147486
147345
  return [4, import(
147487
147346
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
147488
- "./splitPathsBySizeLoader-psMb-p7U.js"
147347
+ "./splitPathsBySizeLoader-Dvt-fluR.js"
147489
147348
  )];
147490
147349
  case 4:
147491
147350
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -149124,7 +148983,7 @@ var Popover = (
149124
148983
  if (!disabled && isOpen !== false && !isNodeEnv$1("production")) {
149125
148984
  console.warn(POPOVER_WARN_EMPTY_CONTENT);
149126
148985
  }
149127
- return this.renderTarget({ ref: noop$1 });
148986
+ return this.renderTarget({ ref: noop$2 });
149128
148987
  }
149129
148988
  return React.createElement(
149130
148989
  Manager,
@@ -149268,7 +149127,7 @@ var Popover = (
149268
149127
  function isEscapeKeypressEvent(e3) {
149269
149128
  return e3 instanceof KeyboardEvent && e3.key === "Escape";
149270
149129
  }
149271
- function noop$1() {
149130
+ function noop$2() {
149272
149131
  }
149273
149132
  var MenuItem = React.forwardRef(function(props, ref2) {
149274
149133
  var _a2, _b2;
@@ -158556,162 +158415,6 @@ function getSelectedRows(props) {
158556
158415
  const selectedRows = selectedRowIndices.map((ind) => filteredTableData[ind]).filter(Boolean);
158557
158416
  return selectedRows;
158558
158417
  }
158559
- function getAllValidationErrors(props) {
158560
- var _a2;
158561
- if (!props.editOverrides && !props.inserts) {
158562
- return [];
158563
- }
158564
- const editOverrides = props.editOverrides ?? {};
158565
- const insertValidationErrors = ((_a2 = props.inserts) == null ? void 0 : _a2.insertedRowValidations) ?? {};
158566
- const validationMessages = [];
158567
- const getCurrentRowIndex = (index2) => {
158568
- var _a3;
158569
- return ((_a3 = props.filteredOrderMap) == null ? void 0 : _a3.indexOf(index2)) ?? index2;
158570
- };
158571
- Object.entries(editOverrides).forEach(([row, edits]) => {
158572
- if (edits) {
158573
- const rowNumber = getCurrentRowIndex(Number(row));
158574
- Object.entries(edits).forEach(([column2, { validationErrors }]) => {
158575
- if (validationErrors && validationErrors.length > 0) {
158576
- validationMessages.push(
158577
- `Row ${rowNumber + 1} ${column2}: ${validationErrors.join(", ")}`
158578
- );
158579
- }
158580
- });
158581
- }
158582
- });
158583
- Object.entries(insertValidationErrors).forEach(([row, validations]) => {
158584
- if (validations) {
158585
- const rowNumber = getCurrentRowIndex(Number(row));
158586
- Object.entries(validations).forEach(([column2, errors2]) => {
158587
- if (errors2 && errors2.length > 0) {
158588
- validationMessages.push(
158589
- `Row ${rowNumber + 1} ${column2}: ${errors2.join(", ")}`
158590
- );
158591
- }
158592
- });
158593
- }
158594
- });
158595
- return validationMessages;
158596
- }
158597
- function getEditedRows(props) {
158598
- var _a2;
158599
- if (!props.tableData) {
158600
- return {
158601
- insertedRows: [],
158602
- updatedRows: [],
158603
- deletedRows: [],
158604
- originalRows: []
158605
- };
158606
- }
158607
- if (props.editOverrides || props.deletedRowIndices || props.inserts) {
158608
- let deletedRows = [];
158609
- let updatedRows = [];
158610
- let originalRows = [];
158611
- let insertedRows = [];
158612
- if (props.deletedRowIndices) {
158613
- deletedRows = Object.entries(props.deletedRowIndices).map(([index2, isDeleted]) => {
158614
- if (isDeleted) {
158615
- return props.tableData[index2];
158616
- }
158617
- return null;
158618
- }).filter(Boolean);
158619
- }
158620
- if ((_a2 = props.inserts) == null ? void 0 : _a2.insertedRowsById) {
158621
- insertedRows = Object.values(props.inserts.insertedRowsById).map(
158622
- (row) => lodashExports.omit(row, ["$originalIndex", "$relativePosition"])
158623
- );
158624
- }
158625
- if (props.editOverrides) {
158626
- const rowIndexedOverrides = Object.entries(props.editOverrides).filter(
158627
- ([rowIndex, override]) => {
158628
- var _a3;
158629
- return !((_a3 = props.deletedRowIndices) == null ? void 0 : _a3[rowIndex]) && Object.keys(override).length > 0;
158630
- }
158631
- );
158632
- rowIndexedOverrides.sort((a3, b3) => Number(a3[0]) - Number(b3[0]));
158633
- originalRows = rowIndexedOverrides.map(([index2]) => {
158634
- const derivedData = {};
158635
- Object.entries(props.columns ?? {}).forEach(
158636
- ([derivedColId, derivedColData]) => {
158637
- var _a3;
158638
- if (derivedColData == null ? void 0 : derivedColData.isDerived) {
158639
- derivedData[derivedColId] = ((_a3 = derivedColData == null ? void 0 : derivedColData.computedValue) == null ? void 0 : _a3[index2]) ?? "";
158640
- }
158641
- }
158642
- );
158643
- return { ...props.tableData[index2], ...derivedData };
158644
- });
158645
- updatedRows = rowIndexedOverrides.map(
158646
- ([_rowIndex, perColumnData], index2) => {
158647
- const perColumnOverrides = {};
158648
- Object.entries(perColumnData).forEach(
158649
- ([column2, editData]) => {
158650
- perColumnOverrides[column2] = editData.value;
158651
- }
158652
- );
158653
- return { ...originalRows[index2], ...perColumnOverrides };
158654
- }
158655
- );
158656
- }
158657
- return {
158658
- insertedRows,
158659
- updatedRows,
158660
- deletedRows,
158661
- originalRows
158662
- };
158663
- }
158664
- return {
158665
- insertedRows: [],
158666
- updatedRows: [],
158667
- deletedRows: [],
158668
- originalRows: []
158669
- };
158670
- }
158671
- function getAllEdits(props) {
158672
- var _a2, _b2, _c2, _d2, _e2, _f2;
158673
- if (!props.tableData) {
158674
- return [];
158675
- }
158676
- if (props.editOverrides || props.deletedRowIndices || props.inserts) {
158677
- const allEdits = [];
158678
- for (let i3 = 0; i3 < props.tableData.length; i3++) {
158679
- if ((_b2 = (_a2 = props.inserts) == null ? void 0 : _a2.insertedRowIdsByIndex) == null ? void 0 : _b2[i3]) {
158680
- allEdits.push(
158681
- ...props.inserts.insertedRowIdsByIndex[i3].map(
158682
- (id2) => lodashExports.omit(props.inserts.insertedRowsById[id2], [
158683
- "$originalIndex",
158684
- "$relativePosition"
158685
- ])
158686
- )
158687
- );
158688
- }
158689
- if ((_c2 = props.deletedRowIndices) == null ? void 0 : _c2[i3]) {
158690
- continue;
158691
- } else if ((_d2 = props.editOverrides) == null ? void 0 : _d2[i3]) {
158692
- const perColumnOverrides = {};
158693
- Object.entries(props.editOverrides[i3]).forEach(
158694
- ([column2, editData]) => perColumnOverrides[column2] = editData.value
158695
- );
158696
- allEdits.push({ ...props.tableData[i3], ...perColumnOverrides });
158697
- } else {
158698
- allEdits.push(props.tableData[i3]);
158699
- }
158700
- }
158701
- if ((_f2 = (_e2 = props.inserts) == null ? void 0 : _e2.insertedRowIdsByIndex) == null ? void 0 : _f2[props.tableData.length]) {
158702
- allEdits.push(
158703
- ...props.inserts.insertedRowIdsByIndex[props.tableData.length].map(
158704
- (id2) => lodashExports.omit(props.inserts.insertedRowsById[id2], [
158705
- "$originalIndex",
158706
- "$relativePosition"
158707
- ])
158708
- )
158709
- );
158710
- }
158711
- return allEdits;
158712
- }
158713
- return props.tableData;
158714
- }
158715
158418
  function getPageSize(props) {
158716
158419
  var _a2, _b2, _c2, _d2;
158717
158420
  if (props.configuredPageSize && typeof props.configuredPageSize === "number" && props.configuredPageSize > 0) {
@@ -159040,31 +158743,6 @@ function getFilteredTableData(props) {
159040
158743
  finalTableData.map(({ $originalIndex }) => $originalIndex)
159041
158744
  ];
159042
158745
  }
159043
- function getEditedRowIndices(props) {
159044
- const absoluteIndices = [];
159045
- const relativeIndices = [];
159046
- if (props.deletedRowIndices) {
159047
- Object.entries(props.deletedRowIndices).forEach(([index2, value]) => {
159048
- var _a2, _b2;
159049
- if (value) {
159050
- const absolute = ((_a2 = props.tableDataWithInsertsOrderMap) == null ? void 0 : _a2[Number(index2)]) ?? -1;
159051
- if (absolute !== -1) {
159052
- absoluteIndices.push(absolute);
159053
- }
159054
- const relative = ((_b2 = props.filteredOrderMap) == null ? void 0 : _b2.indexOf(Number(index2))) ?? -1;
159055
- if (relative !== -1) {
159056
- relativeIndices.push(relative);
159057
- }
159058
- }
159059
- });
159060
- }
159061
- return {
159062
- deletedRows: {
159063
- absolute: absoluteIndices,
159064
- relative: relativeIndices
159065
- }
159066
- };
159067
- }
159068
158746
  const propertiesDefinition$a = {
159069
158747
  general: Section.category(PropsPanelCategory.Content).children({
159070
158748
  tableHeader: Prop.string().readAndWrite().default("").propertiesPanel({
@@ -159108,14 +158786,20 @@ const propertiesDefinition$a = {
159108
158786
  label: "Filters",
159109
158787
  helpText: "Allows specifying the filters that will be used on page load"
159110
158788
  }),
159111
- enableRowInsertion: Prop.boolean().readAndWrite().default(false).propertiesPanel({
159112
- label: "Row insertion",
159113
- helpText: "Enable row insertion"
159114
- }),
159115
- enableRowDeletion: Prop.boolean().readAndWrite().default(false).propertiesPanel({
159116
- label: "Row deletion",
159117
- helpText: "Enable row deletion"
159118
- }),
158789
+ // enableRowInsertion: Prop.boolean()
158790
+ // .readAndWrite()
158791
+ // .default(false)
158792
+ // .propertiesPanel({
158793
+ // label: "Row insertion",
158794
+ // helpText: "Enable row insertion",
158795
+ // }),
158796
+ // enableRowDeletion: Prop.boolean()
158797
+ // .readAndWrite()
158798
+ // .default(false)
158799
+ // .propertiesPanel({
158800
+ // label: "Row deletion",
158801
+ // helpText: "Enable row deletion",
158802
+ // }),
159119
158803
  multiRowSelection: Prop.boolean().readAndWrite().default(false).propertiesPanel({
159120
158804
  label: "Multi row selection",
159121
158805
  helpText: "Enable multi row selection"
@@ -159280,21 +158964,21 @@ const propertiesDefinition$a = {
159280
158964
  onRowClick: Prop.event().propertiesPanel({
159281
158965
  label: "onRowClicked"
159282
158966
  }),
159283
- onSaveChanges: Prop.event().propertiesPanel({
159284
- label: "onSaveChanges"
159285
- }),
159286
- onCancelChanges: Prop.event().propertiesPanel({
159287
- label: "onCancelChanges"
159288
- }),
158967
+ // onSaveChanges: Prop.event().propertiesPanel({
158968
+ // label: "onSaveChanges",
158969
+ // }),
158970
+ // onCancelChanges: Prop.event().propertiesPanel({
158971
+ // label: "onCancelChanges",
158972
+ // }),
159289
158973
  onRowSelected: Prop.event().propertiesPanel({
159290
158974
  label: "onRowSelected"
159291
158975
  }),
159292
- onRowInserted: Prop.event().propertiesPanel({
159293
- label: "onRowInserted"
159294
- }),
159295
- onRowDeleted: Prop.event().propertiesPanel({
159296
- label: "onRowsDeleted"
159297
- }),
158976
+ // onRowInserted: Prop.event().propertiesPanel({
158977
+ // label: "onRowInserted",
158978
+ // }),
158979
+ // onRowDeleted: Prop.event().propertiesPanel({
158980
+ // label: "onRowsDeleted",
158981
+ // }),
159298
158982
  onPageChange: Prop.event().propertiesPanel({
159299
158983
  label: "onPageChange"
159300
158984
  }),
@@ -159306,6 +158990,8 @@ const propertiesDefinition$a = {
159306
158990
  })
159307
158991
  }),
159308
158992
  derived: Section.category(PropsPanelCategory.Derived).children({
158993
+ // leaving tableDataWithInserts in because filteredTableData depends on them
158994
+ // because we won't have editing, tableDataWithInserts will be the same as tableData
159309
158995
  tableDataWithInserts: Prop.any().readable().default(function() {
159310
158996
  return getTableDataWithInserts(this)[0];
159311
158997
  }),
@@ -159323,11 +159009,11 @@ const propertiesDefinition$a = {
159323
159009
  filteredOrderMap: Prop.any().readable().default(function() {
159324
159010
  if (!this) return [];
159325
159011
  return getFilteredTableData(this)[1];
159326
- }),
159327
- editedRows: Prop.any().readable().default(getEditedRows),
159328
- allEdits: Prop.any().readable().default(getAllEdits),
159329
- validationErrors: Prop.any().readable().default(getAllValidationErrors),
159330
- editedRowIndices: Prop.any().readable().default(getEditedRowIndices)
159012
+ })
159013
+ // editedRows: Prop.any().readable().default(getEditedRows),
159014
+ // allEdits: Prop.any().readable().default(getAllEdits),
159015
+ // validationErrors: Prop.any().readable().default(getAllValidationErrors),
159016
+ // editedRowIndices: Prop.any().readable().default(getEditedRowIndices),
159331
159017
  }),
159332
159018
  meta: Section.category(PropsPanelCategory.Meta).children({
159333
159019
  selectedRowIndex: Prop.number().readable(),
@@ -159338,13 +159024,13 @@ const propertiesDefinition$a = {
159338
159024
  filters: Prop.any().readable(),
159339
159025
  hiddenColumns: Prop.any().readable(),
159340
159026
  columnFreezes: Prop.any().readable(),
159341
- tagsColorAssignment: Prop.any().readable(),
159342
- editOverrides: Prop.any().readable(),
159343
- currentEditFocus: Prop.any().readable(),
159344
- currentEditDropdownSearchText: Prop.string().default("").readable(),
159345
- currentEditValue: Prop.any().readable(),
159346
- deletedRowIndices: Prop.any().readable(),
159347
- inserts: Prop.any().readable()
159027
+ tagsColorAssignment: Prop.any().readable()
159028
+ // editOverrides: Prop.any().readable(),
159029
+ // currentEditFocus: Prop.any().readable(),
159030
+ // currentEditDropdownSearchText: Prop.string().default("").readable(),
159031
+ // currentEditValue: Prop.any().readable(),
159032
+ // deletedRowIndices: Prop.any().readable(),
159033
+ // inserts: Prop.any().readable(),
159348
159034
  })
159349
159035
  };
159350
159036
  var fastDeepEqual;
@@ -164748,7 +164434,7 @@ function joinProc(...procs) {
164748
164434
  function isDefined$1(arg) {
164749
164435
  return arg !== void 0;
164750
164436
  }
164751
- function noop() {
164437
+ function noop$1() {
164752
164438
  }
164753
164439
  function subscribe2(emitter, subscription) {
164754
164440
  return emitter(SUBSCRIBE, subscription);
@@ -164832,7 +164518,7 @@ function eventHandler$1(emitter) {
164832
164518
  return unsub;
164833
164519
  } else {
164834
164520
  cleanup2();
164835
- return noop;
164521
+ return noop$1;
164836
164522
  }
164837
164523
  case RESET:
164838
164524
  cleanup2();
@@ -165293,7 +164979,7 @@ function correctItemSize(el2, dimension) {
165293
164979
  function approximatelyEqual(num1, num2) {
165294
164980
  return Math.abs(num1 - num2) < 1.01;
165295
164981
  }
165296
- function useScrollTop(scrollContainerStateCallback, smoothScrollTargetReached, scrollerElement, scrollerRefCallback = noop, customScrollParent) {
164982
+ function useScrollTop(scrollContainerStateCallback, smoothScrollTargetReached, scrollerElement, scrollerRefCallback = noop$1, customScrollParent) {
165297
164983
  const scrollerRef = React__default.useRef(null);
165298
164984
  const scrollTopTarget = React__default.useRef(null);
165299
164985
  const timeoutRef = React__default.useRef(null);
@@ -167743,7 +167429,7 @@ const listComponentPropsSystem = /* @__PURE__ */ system(() => {
167743
167429
  const components = statefulStream({});
167744
167430
  const computeItemKey = statefulStream(identity);
167745
167431
  const headerFooterTag = statefulStream("div");
167746
- const scrollerRef = statefulStream(noop);
167432
+ const scrollerRef = statefulStream(noop$1);
167747
167433
  const distinctProp = (propName, defaultValue2 = null) => {
167748
167434
  return statefulStreamFromEmitter(
167749
167435
  pipe(
@@ -167847,7 +167533,7 @@ function buildWindowScroller({ usePublisher: usePublisher2, useEmitter: useEmitt
167847
167533
  scrollContainerStateCallback,
167848
167534
  smoothScrollTargetReached,
167849
167535
  ScrollerComponent,
167850
- noop,
167536
+ noop$1,
167851
167537
  customScrollParent
167852
167538
  );
167853
167539
  useIsomorphicLayoutEffect$1$1(() => {
@@ -168263,7 +167949,7 @@ const gridComponentPropsSystem = /* @__PURE__ */ system(() => {
168263
167949
  const listClassName = statefulStream("virtuoso-grid-list");
168264
167950
  const computeItemKey = statefulStream(identity);
168265
167951
  const headerFooterTag = statefulStream("div");
168266
- const scrollerRef = statefulStream(noop);
167952
+ const scrollerRef = statefulStream(noop$1);
168267
167953
  const distinctProp = (propName, defaultValue2 = null) => {
168268
167954
  return statefulStreamFromEmitter(
168269
167955
  pipe(
@@ -168465,7 +168151,7 @@ const tableComponentPropsSystem = /* @__PURE__ */ system(() => {
168465
168151
  const fixedFooterContent = statefulStream(null);
168466
168152
  const components = statefulStream({});
168467
168153
  const computeItemKey = statefulStream(identity);
168468
- const scrollerRef = statefulStream(noop);
168154
+ const scrollerRef = statefulStream(noop$1);
168469
168155
  const distinctProp = (propName, defaultValue2 = null) => {
168470
168156
  return statefulStreamFromEmitter(
168471
168157
  pipe(
@@ -174687,6 +174373,8 @@ __publicField(_TableWidget, "transformData", (tableData, filteredOrderMap, colum
174687
174373
  let TableWidget = _TableWidget;
174688
174374
  const EMPTY_ARRAY = [];
174689
174375
  const EMPTY_OBJ = {};
174376
+ const noop = () => {
174377
+ };
174690
174378
  const SbTable = registerSbComponent(
174691
174379
  "SbTable",
174692
174380
  {
@@ -174701,10 +174389,10 @@ const SbTable = registerSbComponent(
174701
174389
  onPageChange,
174702
174390
  onSearchTextChanged,
174703
174391
  onRowClick: propsOnRowClick,
174704
- onCancelChanges: propsOnCancelChanges,
174705
- onSaveChanges: propsOnSaveChanges,
174706
- onRowDeleted: propsOnRowDeleted,
174707
- onRowInserted: propsOnRowInserted,
174392
+ // onCancelChanges: propsOnCancelChanges,
174393
+ // onSaveChanges: propsOnSaveChanges,
174394
+ // onRowDeleted: propsOnRowDeleted,
174395
+ // onRowInserted: propsOnRowInserted,
174708
174396
  onFiltersChanged
174709
174397
  } = props;
174710
174398
  const setSelectedRowData = useCallback(
@@ -174770,44 +174458,6 @@ const SbTable = registerSbComponent(
174770
174458
  },
174771
174459
  [update, onRowSelected]
174772
174460
  );
174773
- const cancelChanges = useCallback(async () => {
174774
- await (propsOnCancelChanges == null ? void 0 : propsOnCancelChanges());
174775
- update((e3) => {
174776
- e3.currentEditFocus = void 0;
174777
- e3.currentEditValue = void 0;
174778
- e3.editOverrides = void 0;
174779
- e3.inserts = void 0;
174780
- e3.deletedRowIndices = void 0;
174781
- });
174782
- }, [propsOnCancelChanges, update]);
174783
- const saveChanges = useCallback(
174784
- async (onComplete) => {
174785
- await (propsOnSaveChanges == null ? void 0 : propsOnSaveChanges());
174786
- onComplete();
174787
- update((e3) => {
174788
- e3.currentEditFocus = void 0;
174789
- e3.currentEditValue = void 0;
174790
- e3.editOverrides = void 0;
174791
- e3.inserts = void 0;
174792
- e3.deletedRowIndices = void 0;
174793
- });
174794
- },
174795
- [propsOnSaveChanges, update]
174796
- );
174797
- const handleRowDeleted = useCallback(
174798
- (rowIndices) => {
174799
- propsOnRowDeleted == null ? void 0 : propsOnRowDeleted({
174800
- rowIndices
174801
- });
174802
- },
174803
- [propsOnRowDeleted]
174804
- );
174805
- const handleRowInserted = useCallback(
174806
- (rowContext) => {
174807
- propsOnRowInserted == null ? void 0 : propsOnRowInserted(rowContext);
174808
- },
174809
- [propsOnRowInserted]
174810
- );
174811
174461
  const setColumnOrder = useCallback(
174812
174462
  (value) => {
174813
174463
  update((e3) => e3.columnOrder = value);
@@ -174907,6 +174557,8 @@ const SbTable = registerSbComponent(
174907
174557
  TableWidget,
174908
174558
  {
174909
174559
  ...props,
174560
+ enableRowInsertion: false,
174561
+ enableRowDeletion: false,
174910
174562
  defaultSearchText: props.defaultSearchText ?? "",
174911
174563
  searchPlaceholder: props.searchPlaceholder ?? "",
174912
174564
  searchText: props.searchText ?? "",
@@ -174935,10 +174587,10 @@ const SbTable = registerSbComponent(
174935
174587
  setTableFilters,
174936
174588
  setCurrentCellFocus,
174937
174589
  setCurrentEditFocus,
174938
- cancelChanges,
174939
- saveChanges,
174940
- onRowsDeleted: handleRowDeleted,
174941
- onRowInserted: handleRowInserted,
174590
+ cancelChanges: noop,
174591
+ saveChanges: noop,
174592
+ onRowsDeleted: noop,
174593
+ onRowInserted: noop,
174942
174594
  updateProperties,
174943
174595
  canvasScaleFactor: 1,
174944
174596
  sourceId: "sourceId",
@@ -195987,4 +195639,4 @@ export {
195987
195639
  SbProvider as y,
195988
195640
  SbEventFlow as z
195989
195641
  };
195990
- //# sourceMappingURL=index-DKNEuHsi.js.map
195642
+ //# sourceMappingURL=index-A8dBVQWW.js.map