@osdk/react-components 0.15.0 → 0.16.0-main-cf496ff080ba8375b89e85ea47c2568a7caca990

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/build/browser/filter-list/inputs/NumberRangeFilterInput.js +10 -5
  3. package/build/browser/filter-list/inputs/NumberRangeFilterInput.js.map +1 -1
  4. package/build/browser/object-table/DefaultCellRenderer.js +18 -0
  5. package/build/browser/object-table/DefaultCellRenderer.js.map +1 -1
  6. package/build/browser/object-table/EditableCell.js +4 -3
  7. package/build/browser/object-table/EditableCell.js.map +1 -1
  8. package/build/browser/object-table/ObjectTableApi.js.map +1 -1
  9. package/build/browser/object-table/utils/types.js.map +1 -1
  10. package/build/browser/util/UserAgent.js +1 -1
  11. package/build/browser/util/UserAgent.js.map +1 -1
  12. package/build/cjs/{chunk-4MKY6RU2.cjs → chunk-JLSIIL5M.cjs} +20 -6
  13. package/build/cjs/chunk-JLSIIL5M.cjs.map +1 -0
  14. package/build/cjs/{chunk-VWMSVA2B.cjs → chunk-KOH3HIJX.cjs} +3 -3
  15. package/build/cjs/chunk-KOH3HIJX.cjs.map +1 -0
  16. package/build/cjs/{chunk-HTGC4GAZ.cjs → chunk-O7L3KWPU.cjs} +4 -4
  17. package/build/cjs/{chunk-HTGC4GAZ.cjs.map → chunk-O7L3KWPU.cjs.map} +1 -1
  18. package/build/cjs/{chunk-IMOIQYNW.cjs → chunk-U6QUBJUK.cjs} +4 -4
  19. package/build/cjs/{chunk-IMOIQYNW.cjs.map → chunk-U6QUBJUK.cjs.map} +1 -1
  20. package/build/cjs/{chunk-JWNRU2TC.cjs → chunk-ZGCXYPDR.cjs} +15 -8
  21. package/build/cjs/chunk-ZGCXYPDR.cjs.map +1 -0
  22. package/build/cjs/public/experimental/action-form.cjs +4 -4
  23. package/build/cjs/public/experimental/filter-list.cjs +13 -13
  24. package/build/cjs/public/experimental/object-table.cjs +8 -8
  25. package/build/cjs/public/experimental/object-table.d.cts +9 -6
  26. package/build/cjs/public/experimental/pdf-viewer.cjs +24 -24
  27. package/build/cjs/public/experimental.cjs +46 -46
  28. package/build/esm/filter-list/inputs/NumberRangeFilterInput.js +10 -5
  29. package/build/esm/filter-list/inputs/NumberRangeFilterInput.js.map +1 -1
  30. package/build/esm/object-table/DefaultCellRenderer.js +18 -0
  31. package/build/esm/object-table/DefaultCellRenderer.js.map +1 -1
  32. package/build/esm/object-table/EditableCell.js +4 -3
  33. package/build/esm/object-table/EditableCell.js.map +1 -1
  34. package/build/esm/object-table/ObjectTableApi.js.map +1 -1
  35. package/build/esm/object-table/utils/types.js.map +1 -1
  36. package/build/esm/util/UserAgent.js +1 -1
  37. package/build/esm/util/UserAgent.js.map +1 -1
  38. package/build/types/filter-list/inputs/NumberRangeFilterInput.d.ts.map +1 -1
  39. package/build/types/object-table/DefaultCellRenderer.d.ts.map +1 -1
  40. package/build/types/object-table/EditableCell.d.ts +8 -1
  41. package/build/types/object-table/EditableCell.d.ts.map +1 -1
  42. package/build/types/object-table/ObjectTableApi.d.ts +4 -3
  43. package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
  44. package/build/types/object-table/utils/types.d.ts +5 -3
  45. package/build/types/object-table/utils/types.d.ts.map +1 -1
  46. package/package.json +7 -7
  47. package/build/cjs/chunk-4MKY6RU2.cjs.map +0 -1
  48. package/build/cjs/chunk-JWNRU2TC.cjs.map +0 -1
  49. package/build/cjs/chunk-VWMSVA2B.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @osdk/react-components
2
2
 
3
+ ## 0.16.0-main-cf496ff080ba8375b89e85ea47c2568a7caca990
4
+
5
+ ### Minor Changes
6
+
7
+ - 7ee1fa3: ObjectTable `EditFieldConfig.getFieldComponentProps` now receives a second `edits` argument with the row's pending cell edits (keyed by columnId), so editor configuration can react to other in-progress edits within the same row.
8
+
9
+ ### Patch Changes
10
+
11
+ - cf496ff: filter-list: round number range histogram min/max to integers for integer property types so dragging or clicking a bucket no longer emits fractional values that break downstream filters
12
+ - Updated dependencies [9eb67e4]
13
+ - @osdk/client@2.20.0-main-cf496ff080ba8375b89e85ea47c2568a7caca990
14
+ - @osdk/api@2.20.0-main-cf496ff080ba8375b89e85ea47c2568a7caca990
15
+ - @osdk/react@2.20.0-main-cf496ff080ba8375b89e85ea47c2568a7caca990
16
+
3
17
  ## 0.15.0
4
18
 
5
19
  ### Minor Changes
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { useOsdkAggregation } from "@osdk/react";
17
+ import { useOsdkAggregation, useOsdkMetadata } from "@osdk/react";
18
18
  import React, { memo, useCallback, useMemo } from "react";
19
19
  import { NullValueWrapper } from "../base/inputs/NullValueWrapper.js";
20
20
  import { NumberRangeInput } from "../base/inputs/NumberRangeInput.js";
@@ -30,6 +30,11 @@ function NumberRangeFilterInputInner({
30
30
  }) {
31
31
  const numberRangeState = filterState?.type === "NUMBER_RANGE" ? filterState : undefined;
32
32
  const includeNull = filterState?.includeNull;
33
+ const {
34
+ metadata
35
+ } = useOsdkMetadata(objectType);
36
+ const propertyType = metadata?.properties?.[propertyKey]?.type;
37
+ const isInteger = propertyType === "integer" || propertyType === "long" || propertyType === "short" || propertyType === "byte";
33
38
  const handleNullChange = useCallback(includeNull => {
34
39
  onFilterStateChanged({
35
40
  type: "NUMBER_RANGE",
@@ -41,11 +46,11 @@ function NumberRangeFilterInputInner({
41
46
  const handleRangeChange = useCallback((minValue, maxValue) => {
42
47
  onFilterStateChanged({
43
48
  type: "NUMBER_RANGE",
44
- minValue,
45
- maxValue,
49
+ minValue: (v => isInteger && v !== undefined ? Math.ceil(v) : v)(minValue),
50
+ maxValue: (v => isInteger && v !== undefined ? Math.floor(v) : v)(maxValue),
46
51
  includeNull
47
52
  });
48
- }, [onFilterStateChanged, includeNull]);
53
+ }, [onFilterStateChanged, includeNull, isInteger]);
49
54
  const aggregateOptions = useMemo(() => createGroupByAggregateOptions(propertyKey), [propertyKey]);
50
55
  const histogramArgs = useMemo(() => ({
51
56
  aggregate: aggregateOptions,
@@ -111,7 +116,7 @@ function NumberRangeFilterInputInner({
111
116
  minValue: numberRangeState?.minValue,
112
117
  maxValue: numberRangeState?.maxValue,
113
118
  onChange: handleRangeChange,
114
- clickToFilter: clickToFilter
119
+ clickToFilter: clickToFilter && metadata != null
115
120
  }));
116
121
  }
117
122
  export const NumberRangeFilterInput = /*#__PURE__*/memo(NumberRangeFilterInputInner);
@@ -1 +1 @@
1
- {"version":3,"file":"NumberRangeFilterInput.js","names":["useOsdkAggregation","React","memo","useCallback","useMemo","NullValueWrapper","NumberRangeInput","createGroupByAggregateOptions","createNullCountAggregateOptions","createNullWhereClause","NumberRangeFilterInputInner","objectType","objectSet","propertyKey","filterState","onFilterStateChanged","whereClause","clickToFilter","numberRangeState","type","undefined","includeNull","handleNullChange","minValue","maxValue","handleRangeChange","aggregateOptions","histogramArgs","aggregate","where","data","aggregateData","isLoading","histLoading","valueCountPairs","pairs","item","rawValue","$group","parsed","parseFloat","String","isNaN","push","value","count","$count","nullCountAggregateOptions","nullCountWhereClause","$and","nullCountArgs","nullCountData","nullLoading","error","nullError","nullCount","result","createElement","onIncludeNullChange","onChange","NumberRangeFilterInput"],"sources":["NumberRangeFilterInput.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ObjectSet, ObjectTypeDefinition, WhereClause } from \"@osdk/api\";\nimport { useOsdkAggregation } from \"@osdk/react\";\nimport React, { memo, useCallback, useMemo } from \"react\";\nimport { NullValueWrapper } from \"../base/inputs/NullValueWrapper.js\";\nimport { NumberRangeInput } from \"../base/inputs/NumberRangeInput.js\";\nimport type { FilterState } from \"../FilterListItemApi.js\";\nimport {\n createGroupByAggregateOptions,\n createNullCountAggregateOptions,\n createNullWhereClause,\n} from \"../utils/aggregationHelpers.js\";\n\ninterface NumberRangeFilterInputProps<Q extends ObjectTypeDefinition> {\n objectType: Q;\n objectSet?: ObjectSet<Q>;\n propertyKey: string;\n filterState: FilterState | undefined;\n onFilterStateChanged: (state: FilterState) => void;\n whereClause: WhereClause<Q>;\n clickToFilter?: boolean;\n}\n\nfunction NumberRangeFilterInputInner<Q extends ObjectTypeDefinition>({\n objectType,\n objectSet,\n propertyKey,\n filterState,\n onFilterStateChanged,\n whereClause,\n clickToFilter,\n}: NumberRangeFilterInputProps<Q>): React.ReactElement {\n const numberRangeState = filterState?.type === \"NUMBER_RANGE\"\n ? filterState\n : undefined;\n const includeNull = filterState?.includeNull;\n\n const handleNullChange = useCallback(\n (includeNull: boolean) => {\n onFilterStateChanged({\n type: \"NUMBER_RANGE\",\n minValue: numberRangeState?.minValue,\n maxValue: numberRangeState?.maxValue,\n includeNull,\n });\n },\n [\n onFilterStateChanged,\n numberRangeState?.minValue,\n numberRangeState?.maxValue,\n ],\n );\n\n const handleRangeChange = useCallback(\n (minValue: number | undefined, maxValue: number | undefined) => {\n onFilterStateChanged({\n type: \"NUMBER_RANGE\",\n minValue,\n maxValue,\n includeNull,\n });\n },\n [onFilterStateChanged, includeNull],\n );\n\n const aggregateOptions = useMemo(\n () => createGroupByAggregateOptions<Q>(propertyKey),\n [propertyKey],\n );\n\n const histogramArgs = useMemo(\n () => ({ aggregate: aggregateOptions, objectSet, where: whereClause }),\n [aggregateOptions, objectSet, whereClause],\n );\n\n const { data: aggregateData, isLoading: histLoading } = useOsdkAggregation(\n objectType,\n histogramArgs,\n );\n\n const valueCountPairs = useMemo<Array<{ value: number; count: number }>>(\n () => {\n if (!aggregateData) return [];\n const dataArray = aggregateData as Iterable<{\n $group: Record<string, unknown>;\n $count?: number;\n }>;\n const pairs: Array<{ value: number; count: number }> = [];\n for (const item of dataArray) {\n const rawValue = item.$group[propertyKey];\n if (rawValue != null) {\n const parsed = parseFloat(String(rawValue));\n if (!isNaN(parsed)) {\n pairs.push({ value: parsed, count: item.$count ?? 0 });\n }\n }\n }\n return pairs;\n },\n [aggregateData, propertyKey],\n );\n\n const nullCountAggregateOptions = useMemo(\n () => createNullCountAggregateOptions<Q>(),\n [],\n );\n\n // Combine null-check with cross-filter where clause so the null count\n // reflects the filtered dataset, not the full dataset\n const nullCountWhereClause = useMemo(\n () =>\n ({\n $and: [createNullWhereClause<Q>(propertyKey), whereClause],\n }) as WhereClause<Q>,\n [propertyKey, whereClause],\n );\n\n const nullCountArgs = useMemo(\n () => ({\n where: nullCountWhereClause,\n aggregate: nullCountAggregateOptions,\n objectSet,\n }),\n [nullCountWhereClause, nullCountAggregateOptions, objectSet],\n );\n\n const {\n data: nullCountData,\n isLoading: nullLoading,\n error: nullError,\n } = useOsdkAggregation(\n objectType,\n nullCountArgs,\n );\n\n const nullCount = useMemo(() => {\n if (!nullCountData) return 0;\n const result = nullCountData as { $count?: number } | Iterable<unknown>;\n if (\"$count\" in result && typeof result.$count === \"number\") {\n return result.$count;\n }\n return 0;\n }, [nullCountData]);\n\n const isLoading = histLoading || nullLoading;\n\n return (\n <NullValueWrapper\n nullCount={nullCount}\n isLoading={isLoading}\n error={nullError}\n includeNull={includeNull}\n onIncludeNullChange={handleNullChange}\n >\n <NumberRangeInput\n valueCountPairs={valueCountPairs}\n isLoading={isLoading}\n minValue={numberRangeState?.minValue}\n maxValue={numberRangeState?.maxValue}\n onChange={handleRangeChange}\n clickToFilter={clickToFilter}\n />\n </NullValueWrapper>\n );\n}\n\nexport const NumberRangeFilterInput: typeof NumberRangeFilterInputInner = memo(\n NumberRangeFilterInputInner,\n) as typeof NumberRangeFilterInputInner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version":3,"file":"NumberRangeFilterInput.js","names":["useOsdkAggregation","useOsdkMetadata","React","memo","useCallback","useMemo","NullValueWrapper","NumberRangeInput","createGroupByAggregateOptions","createNullCountAggregateOptions","createNullWhereClause","NumberRangeFilterInputInner","objectType","objectSet","propertyKey","filterState","onFilterStateChanged","whereClause","clickToFilter","numberRangeState","type","undefined","includeNull","metadata","propertyType","properties","isInteger","handleNullChange","minValue","maxValue","handleRangeChange","v","Math","ceil","floor","aggregateOptions","histogramArgs","aggregate","where","data","aggregateData","isLoading","histLoading","valueCountPairs","pairs","item","rawValue","$group","parsed","parseFloat","String","isNaN","push","value","count","$count","nullCountAggregateOptions","nullCountWhereClause","$and","nullCountArgs","nullCountData","nullLoading","error","nullError","nullCount","result","createElement","onIncludeNullChange","onChange","NumberRangeFilterInput"],"sources":["NumberRangeFilterInput.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ObjectSet, ObjectTypeDefinition, WhereClause } from \"@osdk/api\";\nimport { useOsdkAggregation, useOsdkMetadata } from \"@osdk/react\";\nimport React, { memo, useCallback, useMemo } from \"react\";\nimport { NullValueWrapper } from \"../base/inputs/NullValueWrapper.js\";\nimport { NumberRangeInput } from \"../base/inputs/NumberRangeInput.js\";\nimport type { FilterState } from \"../FilterListItemApi.js\";\nimport {\n createGroupByAggregateOptions,\n createNullCountAggregateOptions,\n createNullWhereClause,\n} from \"../utils/aggregationHelpers.js\";\n\ninterface NumberRangeFilterInputProps<Q extends ObjectTypeDefinition> {\n objectType: Q;\n objectSet?: ObjectSet<Q>;\n propertyKey: string;\n filterState: FilterState | undefined;\n onFilterStateChanged: (state: FilterState) => void;\n whereClause: WhereClause<Q>;\n clickToFilter?: boolean;\n}\n\nfunction NumberRangeFilterInputInner<Q extends ObjectTypeDefinition>({\n objectType,\n objectSet,\n propertyKey,\n filterState,\n onFilterStateChanged,\n whereClause,\n clickToFilter,\n}: NumberRangeFilterInputProps<Q>): React.ReactElement {\n const numberRangeState = filterState?.type === \"NUMBER_RANGE\"\n ? filterState\n : undefined;\n const includeNull = filterState?.includeNull;\n\n const { metadata } = useOsdkMetadata(objectType);\n const propertyType = metadata?.properties?.[propertyKey]?.type;\n const isInteger = propertyType === \"integer\"\n || propertyType === \"long\"\n || propertyType === \"short\"\n || propertyType === \"byte\";\n\n const handleNullChange = useCallback(\n (includeNull: boolean) => {\n onFilterStateChanged({\n type: \"NUMBER_RANGE\",\n minValue: numberRangeState?.minValue,\n maxValue: numberRangeState?.maxValue,\n includeNull,\n });\n },\n [\n onFilterStateChanged,\n numberRangeState?.minValue,\n numberRangeState?.maxValue,\n ],\n );\n\n const handleRangeChange = useCallback(\n (minValue: number | undefined, maxValue: number | undefined) => {\n const coerceMin = (v: number | undefined): number | undefined =>\n isInteger && v !== undefined ? Math.ceil(v) : v;\n const coerceMax = (v: number | undefined): number | undefined =>\n isInteger && v !== undefined ? Math.floor(v) : v;\n onFilterStateChanged({\n type: \"NUMBER_RANGE\",\n minValue: coerceMin(minValue),\n maxValue: coerceMax(maxValue),\n includeNull,\n });\n },\n [onFilterStateChanged, includeNull, isInteger],\n );\n\n const aggregateOptions = useMemo(\n () => createGroupByAggregateOptions<Q>(propertyKey),\n [propertyKey],\n );\n\n const histogramArgs = useMemo(\n () => ({ aggregate: aggregateOptions, objectSet, where: whereClause }),\n [aggregateOptions, objectSet, whereClause],\n );\n\n const { data: aggregateData, isLoading: histLoading } = useOsdkAggregation(\n objectType,\n histogramArgs,\n );\n\n const valueCountPairs = useMemo<Array<{ value: number; count: number }>>(\n () => {\n if (!aggregateData) return [];\n const dataArray = aggregateData as Iterable<{\n $group: Record<string, unknown>;\n $count?: number;\n }>;\n const pairs: Array<{ value: number; count: number }> = [];\n for (const item of dataArray) {\n const rawValue = item.$group[propertyKey];\n if (rawValue != null) {\n const parsed = parseFloat(String(rawValue));\n if (!isNaN(parsed)) {\n pairs.push({ value: parsed, count: item.$count ?? 0 });\n }\n }\n }\n return pairs;\n },\n [aggregateData, propertyKey],\n );\n\n const nullCountAggregateOptions = useMemo(\n () => createNullCountAggregateOptions<Q>(),\n [],\n );\n\n // Combine null-check with cross-filter where clause so the null count\n // reflects the filtered dataset, not the full dataset\n const nullCountWhereClause = useMemo(\n () =>\n ({\n $and: [createNullWhereClause<Q>(propertyKey), whereClause],\n }) as WhereClause<Q>,\n [propertyKey, whereClause],\n );\n\n const nullCountArgs = useMemo(\n () => ({\n where: nullCountWhereClause,\n aggregate: nullCountAggregateOptions,\n objectSet,\n }),\n [nullCountWhereClause, nullCountAggregateOptions, objectSet],\n );\n\n const {\n data: nullCountData,\n isLoading: nullLoading,\n error: nullError,\n } = useOsdkAggregation(\n objectType,\n nullCountArgs,\n );\n\n const nullCount = useMemo(() => {\n if (!nullCountData) return 0;\n const result = nullCountData as { $count?: number } | Iterable<unknown>;\n if (\"$count\" in result && typeof result.$count === \"number\") {\n return result.$count;\n }\n return 0;\n }, [nullCountData]);\n\n const isLoading = histLoading || nullLoading;\n\n return (\n <NullValueWrapper\n nullCount={nullCount}\n isLoading={isLoading}\n error={nullError}\n includeNull={includeNull}\n onIncludeNullChange={handleNullChange}\n >\n <NumberRangeInput\n valueCountPairs={valueCountPairs}\n isLoading={isLoading}\n minValue={numberRangeState?.minValue}\n maxValue={numberRangeState?.maxValue}\n onChange={handleRangeChange}\n clickToFilter={clickToFilter && metadata != null}\n />\n </NullValueWrapper>\n );\n}\n\nexport const NumberRangeFilterInput: typeof NumberRangeFilterInputInner = memo(\n NumberRangeFilterInputInner,\n) as typeof NumberRangeFilterInputInner;\n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GC,WAAW,IAAImB,WAAW;EAE5C,oBACE3D,KAAA,CAAAgE,aAAA,CAAC5D,gBAAgB;IACf0D,SAAS,EAAEA,SAAU;IACrBvB,SAAS,EAAEA,SAAU;IACrBqB,KAAK,EAAEC,SAAU;IACjBzC,WAAW,EAAEA,WAAY;IACzB6C,mBAAmB,EAAExC;EAAiB,gBAEtCzB,KAAA,CAAAgE,aAAA,CAAC3D,gBAAgB;IACfoC,eAAe,EAAEA,eAAgB;IACjCF,SAAS,EAAEA,SAAU;IACrBb,QAAQ,EAAET,gBAAgB,EAAES,QAAS;IACrCC,QAAQ,EAAEV,gBAAgB,EAAEU,QAAS;IACrCuC,QAAQ,EAAEtC,iBAAkB;IAC5BZ,aAAa,EAAEA,aAAa,IAAIK,QAAQ,IAAI;EAAK,CAClD,CACe,CAAC;AAEvB;AAEA,OAAO,MAAM8C,sBAA0D,gBAAGlE,IAAI,CAC5EQ,2BACF,CAAuC","ignoreList":[]}
@@ -28,6 +28,22 @@ function toDisplayValue(value) {
28
28
  }
29
29
  return value;
30
30
  }
31
+
32
+ // Returns the subset of `cellEdits` belonging to `rowId`, re-keyed by columnId.
33
+ // Returns `undefined` (stable reference) when the row has no pending edits, so
34
+ // that `React.memo` on `EditableCell` can skip re-renders of unedited rows when
35
+ // edits change elsewhere in the table.
36
+ function filterCellEditsToRow(cellEdits, rowId) {
37
+ if (!cellEdits) return undefined;
38
+ let result;
39
+ for (const edit of Object.values(cellEdits)) {
40
+ if (edit.rowId === rowId) {
41
+ result ??= {};
42
+ result[edit.columnId] = edit;
43
+ }
44
+ }
45
+ return result;
46
+ }
31
47
  export function renderDefaultCell(cellContext) {
32
48
  const meta = cellContext.table.options.meta;
33
49
  const columnMeta = cellContext.column.columnDef.meta;
@@ -63,12 +79,14 @@ export function renderDefaultCell(cellContext) {
63
79
  const currentValue = editedValue?.newValue === undefined ? cellValue : editedValue?.newValue;
64
80
  const validationError = meta.validationErrors?.get(cellId);
65
81
  const isRowFocused = meta.focusedRowId === rowId;
82
+ const rowCellEdits = filterCellEditsToRow(cellEdits, rowId);
66
83
  return /*#__PURE__*/React.createElement(EditableCell, {
67
84
  initialValue: cellValue,
68
85
  currentValue: currentValue,
69
86
  cellId: cellId,
70
87
  dataType: columnMeta?.dataType,
71
88
  editFieldConfig: columnMeta?.editFieldConfig,
89
+ rowCellEdits: rowCellEdits,
72
90
  onCellEdit: meta.onCellEdit,
73
91
  onCellValidationError: meta.onCellValidationError,
74
92
  clearCellValidationError: meta.clearCellValidationError,
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultCellRenderer.js","names":["React","AsyncValueCell","EditableCell","styles","isAsyncCellData","isCellEditable","getCellId","shouldShowEditableCell","toDisplayValue","value","String","renderDefaultCell","cellContext","meta","table","options","columnMeta","column","columnDef","cellValue","getValue","asyncCellData","undefined","isAsyncColumn","createElement","rowData","row","original","isEditable","editable","onCellEdit","isInEditMode","className","nonEditableCellInEditMode","Fragment","rowId","id","columnId","cellId","cellEdits","editedValue","currentValue","newValue","validationError","validationErrors","get","isRowFocused","focusedRowId","initialValue","dataType","editFieldConfig","onCellValidationError","clearCellValidationError","originalRowData","validateEdit"],"sources":["DefaultCellRenderer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { CellContext, RowData } from \"@tanstack/react-table\";\nimport React from \"react\";\nimport { AsyncValueCell } from \"./components/AsyncValueCell.js\";\nimport { EditableCell } from \"./EditableCell.js\";\nimport styles from \"./EditableCell.module.css\";\nimport { isAsyncCellData } from \"./utils/AsyncCellData.js\";\nimport { isCellEditable } from \"./utils/editableUtils.js\";\nimport { getCellId } from \"./utils/getCellId.js\";\nimport { shouldShowEditableCell } from \"./utils/shouldShowEditableCell.js\";\n\nfunction toDisplayValue(value: unknown): React.ReactNode {\n if (typeof value === \"boolean\") {\n return String(value);\n }\n return value as React.ReactNode;\n}\n\nexport function renderDefaultCell<TData extends RowData>(\n cellContext: CellContext<TData, unknown>,\n): React.ReactNode {\n const meta = cellContext.table.options.meta;\n const columnMeta = cellContext.column.columnDef.meta;\n\n const cellValue = cellContext.getValue();\n\n const asyncCellData = isAsyncCellData(cellValue)\n ? cellValue\n : undefined;\n\n // Function-backed columns are read-only: the value is server-computed\n // and cannot be edited in the table. Return the async cell directly.\n if (columnMeta?.isAsyncColumn && asyncCellData) {\n return <AsyncValueCell {...asyncCellData} />;\n }\n\n const rowData = cellContext.row.original;\n const isEditable = isCellEditable(columnMeta?.editable, rowData);\n\n if (\n !meta?.onCellEdit // Type guard\n || !shouldShowEditableCell(\n isEditable,\n meta?.onCellEdit,\n meta?.isInEditMode,\n )\n ) {\n // Align non editable cells with the editable cells\n if (meta?.isInEditMode) {\n return (\n <span className={styles.nonEditableCellInEditMode}>\n {toDisplayValue(cellValue)}\n </span>\n );\n }\n\n return <>{toDisplayValue(cellValue)}</>;\n }\n\n const rowId = cellContext.row.id;\n const columnId = cellContext.column.id;\n const cellId = getCellId({ rowId, columnId });\n\n const cellEdits = meta.cellEdits;\n const editedValue = cellEdits?.[cellId];\n // If newValue is explicitly set to null, treat it as null. Otherwise, fall back to the original cell value.\n const currentValue = editedValue?.newValue === undefined\n ? cellValue\n : editedValue?.newValue;\n const validationError = meta.validationErrors?.get(cellId);\n const isRowFocused = meta.focusedRowId === rowId;\n\n return (\n <EditableCell<TData>\n initialValue={cellValue}\n currentValue={currentValue}\n cellId={cellId}\n dataType={columnMeta?.dataType}\n editFieldConfig={columnMeta?.editFieldConfig}\n onCellEdit={meta.onCellEdit}\n onCellValidationError={meta.onCellValidationError}\n clearCellValidationError={meta.clearCellValidationError}\n originalRowData={rowData}\n rowId={rowId}\n columnId={columnId}\n validateEdit={columnMeta?.validateEdit}\n validationError={validationError}\n isRowFocused={isRowFocused}\n />\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,gCAAgC;AAC/D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,OAAOC,MAAM,MAAM,2BAA2B;AAC9C,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,SAAS,QAAQ,sBAAsB;AAChD,SAASC,sBAAsB,QAAQ,mCAAmC;AAE1E,SAASC,cAAcA,CAACC,KAAc,EAAmB;EACvD,IAAI,OAAOA,KAAK,KAAK,SAAS,EAAE;IAC9B,OAAOC,MAAM,CAACD,KAAK,CAAC;EACtB;EACA,OAAOA,KAAK;AACd;AAEA,OAAO,SAASE,iBAAiBA,CAC/BC,WAAwC,EACvB;EACjB,MAAMC,IAAI,GAAGD,WAAW,CAACE,KAAK,CAACC,OAAO,CAACF,IAAI;EAC3C,MAAMG,UAAU,GAAGJ,WAAW,CAACK,MAAM,CAACC,SAAS,CAACL,IAAI;EAEpD,MAAMM,SAAS,GAAGP,WAAW,CAACQ,QAAQ,CAAC,CAAC;EAExC,MAAMC,aAAa,GAAGjB,eAAe,CAACe,SAAS,CAAC,GAC5CA,SAAS,GACTG,SAAS;;EAEb;EACA;EACA,IAAIN,UAAU,EAAEO,aAAa,IAAIF,aAAa,EAAE;IAC9C,oBAAOrB,KAAA,CAAAwB,aAAA,CAACvB,cAAc,EAAKoB,aAAgB,CAAC;EAC9C;EAEA,MAAMI,OAAO,GAAGb,WAAW,CAACc,GAAG,CAACC,QAAQ;EACxC,MAAMC,UAAU,GAAGvB,cAAc,CAACW,UAAU,EAAEa,QAAQ,EAAEJ,O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,IAAI,CAACiB,UAAW;IAC5BqB,qBAAqB,EAAEtC,IAAI,CAACsC,qBAAsB;IAClDC,wBAAwB,EAAEvC,IAAI,CAACuC,wBAAyB;IACxDC,eAAe,EAAE5B,OAAQ;IACzBU,KAAK,EAAEA,KAAM;IACbE,QAAQ,EAAEA,QAAS;IACnBiB,YAAY,EAAEtC,UAAU,EAAEsC,YAAa;IACvCX,eAAe,EAAEA,eAAgB;IACjCG,YAAY,EAAEA;EAAa,CAC5B,CAAC;AAEN","ignoreList":[]}
1
+ {"version":3,"file":"DefaultCellRenderer.js","names":["React","AsyncValueCell","EditableCell","styles","isAsyncCellData","isCellEditable","getCellId","shouldShowEditableCell","toDisplayValue","value","String","filterCellEditsToRow","cellEdits","rowId","undefined","result","edit","Object","values","columnId","renderDefaultCell","cellContext","meta","table","options","columnMeta","column","columnDef","cellValue","getValue","asyncCellData","isAsyncColumn","createElement","rowData","row","original","isEditable","editable","onCellEdit","isInEditMode","className","nonEditableCellInEditMode","Fragment","id","cellId","editedValue","currentValue","newValue","validationError","validationErrors","get","isRowFocused","focusedRowId","rowCellEdits","initialValue","dataType","editFieldConfig","onCellValidationError","clearCellValidationError","originalRowData","validateEdit"],"sources":["DefaultCellRenderer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { CellContext, RowData } from \"@tanstack/react-table\";\nimport React from \"react\";\nimport { AsyncValueCell } from \"./components/AsyncValueCell.js\";\nimport { EditableCell } from \"./EditableCell.js\";\nimport styles from \"./EditableCell.module.css\";\nimport { isAsyncCellData } from \"./utils/AsyncCellData.js\";\nimport { isCellEditable } from \"./utils/editableUtils.js\";\nimport { getCellId } from \"./utils/getCellId.js\";\nimport { shouldShowEditableCell } from \"./utils/shouldShowEditableCell.js\";\nimport type { CellEditInfo } from \"./utils/types.js\";\n\nfunction toDisplayValue(value: unknown): React.ReactNode {\n if (typeof value === \"boolean\") {\n return String(value);\n }\n return value as React.ReactNode;\n}\n\n// Returns the subset of `cellEdits` belonging to `rowId`, re-keyed by columnId.\n// Returns `undefined` (stable reference) when the row has no pending edits, so\n// that `React.memo` on `EditableCell` can skip re-renders of unedited rows when\n// edits change elsewhere in the table.\nfunction filterCellEditsToRow<TData extends RowData>(\n cellEdits: Record<string, CellEditInfo<TData, unknown>> | undefined,\n rowId: string,\n): Record<string, CellEditInfo<TData, unknown>> | undefined {\n if (!cellEdits) return undefined;\n let result: Record<string, CellEditInfo<TData, unknown>> | undefined;\n for (const edit of Object.values(cellEdits)) {\n if (edit.rowId === rowId) {\n result ??= {};\n result[edit.columnId] = edit;\n }\n }\n return result;\n}\n\nexport function renderDefaultCell<TData extends RowData>(\n cellContext: CellContext<TData, unknown>,\n): React.ReactNode {\n const meta = cellContext.table.options.meta;\n const columnMeta = cellContext.column.columnDef.meta;\n\n const cellValue = cellContext.getValue();\n\n const asyncCellData = isAsyncCellData(cellValue)\n ? cellValue\n : undefined;\n\n // Function-backed columns are read-only: the value is server-computed\n // and cannot be edited in the table. Return the async cell directly.\n if (columnMeta?.isAsyncColumn && asyncCellData) {\n return <AsyncValueCell {...asyncCellData} />;\n }\n\n const rowData = cellContext.row.original;\n const isEditable = isCellEditable(columnMeta?.editable, rowData);\n\n if (\n !meta?.onCellEdit // Type guard\n || !shouldShowEditableCell(\n isEditable,\n meta?.onCellEdit,\n meta?.isInEditMode,\n )\n ) {\n // Align non editable cells with the editable cells\n if (meta?.isInEditMode) {\n return (\n <span className={styles.nonEditableCellInEditMode}>\n {toDisplayValue(cellValue)}\n </span>\n );\n }\n\n return <>{toDisplayValue(cellValue)}</>;\n }\n\n const rowId = cellContext.row.id;\n const columnId = cellContext.column.id;\n const cellId = getCellId({ rowId, columnId });\n\n const cellEdits = meta.cellEdits;\n const editedValue = cellEdits?.[cellId];\n // If newValue is explicitly set to null, treat it as null. Otherwise, fall back to the original cell value.\n const currentValue = editedValue?.newValue === undefined\n ? cellValue\n : editedValue?.newValue;\n const validationError = meta.validationErrors?.get(cellId);\n const isRowFocused = meta.focusedRowId === rowId;\n const rowCellEdits = filterCellEditsToRow(cellEdits, rowId);\n\n return (\n <EditableCell<TData>\n initialValue={cellValue}\n currentValue={currentValue}\n cellId={cellId}\n dataType={columnMeta?.dataType}\n editFieldConfig={columnMeta?.editFieldConfig}\n rowCellEdits={rowCellEdits}\n onCellEdit={meta.onCellEdit}\n onCellValidationError={meta.onCellValidationError}\n clearCellValidationError={meta.clearCellValidationError}\n originalRowData={rowData}\n rowId={rowId}\n columnId={columnId}\n validateEdit={columnMeta?.validateEdit}\n validationError={validationError}\n isRowFocused={isRowFocused}\n />\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,gCAAgC;AAC/D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,OAAOC,MAAM,MAAM,2BAA2B;AAC9C,SAASC,eAAe,QAAQ,0BAA0B;AAC1D,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,SAAS,QAAQ,sBAAsB;AAChD,SAASC,sBAAsB,QAAQ,mCAAmC;AAG1E,SAASC,cAAcA,CAACC,KAAc,EAAmB;EACvD,IAAI,OAAOA,KAAK,KAAK,SAAS,EAAE;IAC9B,OAAOC,MAAM,CAACD,KAAK,CAAC;EACtB;EACA,OAAOA,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA,SAASE,oBAAoBA,CAC3BC,SAAmE,EACnEC,KAAa,EAC6C;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U,EAAEmC,YAAa;IACvCZ,eAAe,EAAEA,eAAgB;IACjCG,YAAY,EAAEA;EAAa,CAC5B,CAAC;AAEN","ignoreList":[]}
@@ -61,6 +61,7 @@ function EditableCellInner({
61
61
  validateEdit,
62
62
  validationError,
63
63
  editFieldConfig,
64
+ rowCellEdits,
64
65
  isRowFocused = false
65
66
  }) {
66
67
  const [inputValue, setInputValue] = useState(valueToString(currentValue));
@@ -157,10 +158,10 @@ function EditableCellInner({
157
158
  }, [commitEdit, currentValue]);
158
159
  const inputType = dataType && NUMBER_TYPES.includes(dataType) ? "number" : "text";
159
160
 
160
- // Compute field-component props once per (editFieldConfig, originalRowData).
161
+ // Compute field-component props once per (editFieldConfig, originalRowData, rowCellEdits).
161
162
  // The narrowed return type is preserved in each useMemo
162
- const dropdownFieldProps = useMemo(() => editFieldConfig?.fieldComponent === "DROPDOWN" ? editFieldConfig.getFieldComponentProps(originalRowData) : undefined, [editFieldConfig, originalRowData]);
163
- const datePickerFieldProps = useMemo(() => editFieldConfig?.fieldComponent === "DATE_PICKER" ? editFieldConfig.getFieldComponentProps(originalRowData) : undefined, [editFieldConfig, originalRowData]);
163
+ const dropdownFieldProps = useMemo(() => editFieldConfig?.fieldComponent === "DROPDOWN" ? editFieldConfig.getFieldComponentProps(originalRowData, rowCellEdits) : undefined, [editFieldConfig, originalRowData, rowCellEdits]);
164
+ const datePickerFieldProps = useMemo(() => editFieldConfig?.fieldComponent === "DATE_PICKER" ? editFieldConfig.getFieldComponentProps(originalRowData, rowCellEdits) : undefined, [editFieldConfig, originalRowData, rowCellEdits]);
164
165
  return /*#__PURE__*/React.createElement(Tooltip.Provider, null, /*#__PURE__*/React.createElement(Tooltip.Root, {
165
166
  disabled: !hasValidationError
166
167
  }, /*#__PURE__*/React.createElement(Tooltip.Trigger, {
@@ -1 +1 @@
1
- {"version":3,"file":"EditableCell.js","names":["Error","React","useCallback","useEffect","useMemo","useRef","useState","Tooltip","DatePickerCellField","DropdownCellField","TextInputCellField","styles","NUMBER_TYPES","DATE_TYPES","VALIDATION_ERROR_MESSAGE","valueToString","value","JSON","stringify","String","parseValueByType","dataType","includes","parsedNumber","Number","isNaN","EditableCellInner","initialValue","currentValue","cellId","onCellEdit","onCellValidationError","clearCellValidationError","originalRowData","rowId","columnId","validateEdit","validationError","editFieldConfig","isRowFocused","inputValue","setInputValue","isCancelled","validationAbortControllerRef","abortValidation","current","abort","hasValidationError","isEdited","runValidation","parsedValue","controller","AbortController","validationPromise","Promise","race","_","reject","signal","addEventListener","DOMException","then","errorMessage","aborted","error","name","commitEdit","newValue","oldValue","handleBlur","handleInputChange","handleKeyDown","e","key","currentTarget","blur","handleCommit","inputType","dropdownFieldProps","fieldComponent","getFieldComponentProps","undefined","datePickerFieldProps","createElement","Provider","Root","disabled","Trigger","className","osdkEditableCellTrigger","render","osdkTooltipTriggerWrapper","fieldComponentProps","onChange","onValueChange","onBlur","onKeyDown","Portal","Positioner","sideOffset","side","Popup","errorIcon","Arrow","EditableCell","memo"],"sources":["EditableCell.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error } from \"@blueprintjs/icons\";\nimport type { RowData } from \"@tanstack/react-table\";\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { Tooltip } from \"../base-components/tooltip/Tooltip.js\";\nimport { DatePickerCellField } from \"./components/DatePickerCellField.js\";\nimport { DropdownCellField } from \"./components/DropdownCellField.js\";\nimport { TextInputCellField } from \"./components/TextInputCellField.js\";\nimport styles from \"./EditableCell.module.css\";\nimport type { CellEditInfo, EditFieldConfig } from \"./utils/types.js\";\n\nconst NUMBER_TYPES: readonly string[] = [\n \"double\",\n \"integer\",\n \"long\",\n \"float\",\n \"decimal\",\n \"byte\",\n \"short\",\n];\n\nconst DATE_TYPES: readonly string[] = [\n \"datetime\",\n \"timestamp\",\n];\n\nconst VALIDATION_ERROR_MESSAGE = \"Validation error\";\n\nexport interface EditableCellProps<TData extends RowData, CellValue = unknown> {\n initialValue: CellValue;\n currentValue: CellValue;\n cellId: string;\n dataType?: string;\n onCellEdit: (cellId: string, info: CellEditInfo<TData, CellValue>) => void;\n onCellValidationError?: (\n cellId: string,\n error: string,\n ) => void;\n clearCellValidationError?: (cellId: string) => void;\n validationError?: string;\n originalRowData: TData;\n rowId: string;\n columnId: string;\n validateEdit?: (value: unknown) => Promise<string | undefined>;\n editFieldConfig?: EditFieldConfig<TData>;\n isRowFocused?: boolean;\n}\n\nfunction valueToString(value: unknown): string {\n if (value == null) {\n return \"\";\n }\n if (typeof value === \"object\") {\n return JSON.stringify(value);\n }\n // At this point, value is a primitive (string, number, boolean, symbol, bigint)\n return String(value as string | number | boolean | symbol | bigint);\n}\n\nfunction parseValueByType(\n value: string,\n dataType?: string,\n): unknown {\n if (!dataType || !NUMBER_TYPES.includes(dataType)) {\n return value;\n }\n\n if (value === \"\") {\n return null;\n }\n\n const parsedNumber = Number(value);\n\n if (isNaN(parsedNumber)) {\n return value;\n }\n\n return parsedNumber;\n}\n\nfunction EditableCellInner<TData extends RowData, CellValue = unknown>({\n initialValue,\n currentValue,\n cellId,\n dataType,\n onCellEdit,\n onCellValidationError,\n clearCellValidationError,\n originalRowData,\n rowId,\n columnId,\n validateEdit,\n validationError,\n editFieldConfig,\n isRowFocused = false,\n}: EditableCellProps<TData, CellValue>): React.ReactElement {\n const [inputValue, setInputValue] = useState<string>(\n valueToString(currentValue),\n );\n const isCancelled = useRef(false);\n const validationAbortControllerRef = useRef<AbortController | null>(null);\n\n const abortValidation = useCallback(() => {\n if (validationAbortControllerRef.current) {\n validationAbortControllerRef.current.abort();\n validationAbortControllerRef.current = null;\n }\n }, []);\n\n const hasValidationError = validationError != null;\n const isEdited = (currentValue ?? null) !== (initialValue ?? null);\n\n useEffect(() => {\n setInputValue(valueToString(currentValue));\n }, [currentValue]);\n\n useEffect(() => {\n return () => {\n abortValidation();\n };\n }, [abortValidation]);\n\n const runValidation = useCallback(\n (parsedValue: unknown) => {\n if (!validateEdit) {\n return;\n }\n\n const controller = new AbortController();\n validationAbortControllerRef.current = controller;\n\n const validationPromise = validateEdit(parsedValue);\n\n // Race between validation and abort\n Promise.race([\n validationPromise,\n new Promise<string | undefined>((_, reject) => {\n controller.signal.addEventListener(\"abort\", () => {\n reject(new DOMException(\"Aborted\", \"AbortError\"));\n });\n }),\n ]).then(\n (errorMessage) => {\n if (controller.signal.aborted) {\n return;\n }\n if (errorMessage) {\n onCellValidationError?.(cellId, errorMessage);\n } else {\n clearCellValidationError?.(cellId);\n }\n },\n (error) => {\n if (\n !controller.signal.aborted\n && error.name !== \"AbortError\"\n ) {\n onCellValidationError?.(cellId, VALIDATION_ERROR_MESSAGE);\n }\n },\n );\n },\n [validateEdit, onCellValidationError, clearCellValidationError, cellId],\n );\n\n const commitEdit = useCallback(\n (newValue: CellValue) => {\n abortValidation();\n\n onCellEdit(cellId, {\n rowId,\n columnId,\n newValue,\n oldValue: initialValue,\n originalRowData,\n });\n\n runValidation(newValue);\n },\n [\n abortValidation,\n onCellEdit,\n cellId,\n rowId,\n columnId,\n initialValue,\n originalRowData,\n runValidation,\n ],\n );\n\n // Text/number input: commit on blur\n const handleBlur = useCallback(() => {\n if (isCancelled.current) {\n isCancelled.current = false;\n return;\n }\n\n // No-op when the input wasn't actually changed by the user\n if (inputValue === valueToString(currentValue)) {\n return;\n }\n\n const parsedValue = parseValueByType(inputValue, dataType) as CellValue;\n commitEdit(parsedValue);\n }, [inputValue, currentValue, dataType, commitEdit]);\n\n const handleInputChange = useCallback((value: string) => {\n // Cancel any in-flight validation\n abortValidation();\n setInputValue(value);\n }, [abortValidation]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === \"Enter\") {\n e.currentTarget.blur();\n }\n if (e.key === \"Escape\") {\n isCancelled.current = true;\n setInputValue(valueToString(currentValue));\n e.currentTarget.blur();\n }\n },\n [currentValue],\n );\n\n const handleCommit = useCallback(\n (newValue: unknown) => {\n if ((newValue ?? null) === (currentValue ?? null)) return;\n commitEdit(newValue as CellValue);\n },\n [commitEdit, currentValue],\n );\n\n const inputType = dataType && NUMBER_TYPES.includes(dataType)\n ? \"number\"\n : \"text\";\n\n // Compute field-component props once per (editFieldConfig, originalRowData).\n // The narrowed return type is preserved in each useMemo\n const dropdownFieldProps = useMemo(\n () =>\n editFieldConfig?.fieldComponent === \"DROPDOWN\"\n ? editFieldConfig.getFieldComponentProps(originalRowData)\n : undefined,\n [editFieldConfig, originalRowData],\n );\n\n const datePickerFieldProps = useMemo(\n () =>\n editFieldConfig?.fieldComponent === \"DATE_PICKER\"\n ? editFieldConfig.getFieldComponentProps(originalRowData)\n : undefined,\n [editFieldConfig, originalRowData],\n );\n\n const renderFieldInput = () => {\n switch (editFieldConfig?.fieldComponent) {\n case \"DROPDOWN\":\n return (\n <DropdownCellField\n fieldComponentProps={dropdownFieldProps!}\n isRowFocused={isRowFocused}\n inputValue={inputValue}\n hasValidationError={hasValidationError}\n isEdited={isEdited}\n onChange={handleCommit}\n />\n );\n case \"DATE_PICKER\":\n return (\n <DatePickerCellField\n fieldComponentProps={datePickerFieldProps}\n inputValue={inputValue}\n hasValidationError={hasValidationError}\n isEdited={isEdited}\n onChange={handleCommit}\n />\n );\n default:\n if (dataType != null && DATE_TYPES.includes(dataType)) {\n return (\n <DatePickerCellField\n inputValue={inputValue}\n hasValidationError={hasValidationError}\n isEdited={isEdited}\n onChange={handleCommit}\n dataType={dataType}\n />\n );\n }\n return (\n <TextInputCellField\n inputType={inputType}\n inputValue={inputValue}\n hasValidationError={hasValidationError}\n isEdited={isEdited}\n onValueChange={handleInputChange}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n />\n );\n }\n };\n\n return (\n <Tooltip.Provider>\n <Tooltip.Root disabled={!hasValidationError}>\n <Tooltip.Trigger\n className={styles.osdkEditableCellTrigger}\n render={<span className={styles.osdkTooltipTriggerWrapper} />}\n >\n {renderFieldInput()}\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Positioner sideOffset={4} side={\"bottom\"}>\n <Tooltip.Popup>\n <div className={styles.validationError}>\n <Error className={styles.errorIcon} />\n {validationError}\n </div>\n <Tooltip.Arrow />\n </Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n </Tooltip.Provider>\n );\n}\n\nexport const EditableCell = React.memo(\n EditableCellInner,\n) as typeof EditableCellInner;\n\"\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,oBAAoB;AAE1C,OAAOC,KAAK,IACVC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,OAAO,QAAQ,uCAAuC;AAC/D,SAASC,mBAAmB,QAAQ,qCAAqC;AACzE,SAASC,iBAAiB,QAAQ,mCAAmC;AACrE,SAASC,kBAAkB,QAAQ,oCAAoC;AACvE,OAAOC,MAAM,MAAM,2BAA2B;AAG9C,MAAMC,YAA+B,GAAG,CACtC,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,SAAS,EACT,MAAM,EACN,OAAO,CACR;AAED,MAAMC,UAA6B,GAAG,CACpC,UAAU,EACV,WAAW,CACZ;AAED,MAAMC,wBAAwB,GAAG,kBAAkB;AAsBnD,SAASC,aAAaA,CAACC,KAAc,EAAU;EAC7C,IAAIA,KAAK,IAAI,IAAI,EAAE;IACjB,OAAO,EAA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H,CAAC,eAClBtE,KAAA,CAAAkF,aAAA,CAAC5E,OAAO,CAAC0F,MAAM,qBACbhG,KAAA,CAAAkF,aAAA,CAAC5E,OAAO,CAAC2F,UAAU;IAACC,UAAU,EAAE,CAAE;IAACC,IAAI,EAAE;EAAS,gBAChDnG,KAAA,CAAAkF,aAAA,CAAC5E,OAAO,CAAC8F,KAAK,qBACZpG,KAAA,CAAAkF,aAAA;IAAKK,SAAS,EAAE7E,MAAM,CAAC0B;EAAgB,gBACrCpC,KAAA,CAAAkF,aAAA,CAACnF,KAAK;IAACwF,SAAS,EAAE7E,MAAM,CAAC2F;EAAU,CAAE,CAAC,EACrCjE,eACE,CAAC,eACNpC,KAAA,CAAAkF,aAAA,CAAC5E,OAAO,CAACgG,KAAK,MAAE,CACH,CACG,CACN,CACJ,CACE,CAAC;AAEvB;AAEA,OAAO,MAAMC,YAAY,gBAAGvG,KAAK,CAACwG,IAAI,CACpC/E,iBACF,CAA6B","ignoreList":[]}
1
+ {"version":3,"file":"EditableCell.js","names":["Error","React","useCallback","useEffect","useMemo","useRef","useState","Tooltip","DatePickerCellField","DropdownCellField","TextInputCellField","styles","NUMBER_TYPES","DATE_TYPES","VALIDATION_ERROR_MESSAGE","valueToString","value","JSON","stringify","String","parseValueByType","dataType","includes","parsedNumber","Number","isNaN","EditableCellInner","initialValue","currentValue","cellId","onCellEdit","onCellValidationError","clearCellValidationError","originalRowData","rowId","columnId","validateEdit","validationError","editFieldConfig","rowCellEdits","isRowFocused","inputValue","setInputValue","isCancelled","validationAbortControllerRef","abortValidation","current","abort","hasValidationError","isEdited","runValidation","parsedValue","controller","AbortController","validationPromise","Promise","race","_","reject","signal","addEventListener","DOMException","then","errorMessage","aborted","error","name","commitEdit","newValue","oldValue","handleBlur","handleInputChange","handleKeyDown","e","key","currentTarget","blur","handleCommit","inputType","dropdownFieldProps","fieldComponent","getFieldComponentProps","undefined","datePickerFieldProps","createElement","Provider","Root","disabled","Trigger","className","osdkEditableCellTrigger","render","osdkTooltipTriggerWrapper","fieldComponentProps","onChange","onValueChange","onBlur","onKeyDown","Portal","Positioner","sideOffset","side","Popup","errorIcon","Arrow","EditableCell","memo"],"sources":["EditableCell.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error } from \"@blueprintjs/icons\";\nimport type { RowData } from \"@tanstack/react-table\";\nimport React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { Tooltip } from \"../base-components/tooltip/Tooltip.js\";\nimport { DatePickerCellField } from \"./components/DatePickerCellField.js\";\nimport { DropdownCellField } from \"./components/DropdownCellField.js\";\nimport { TextInputCellField } from \"./components/TextInputCellField.js\";\nimport styles from \"./EditableCell.module.css\";\nimport type { CellEditInfo, EditFieldConfig } from \"./utils/types.js\";\n\nconst NUMBER_TYPES: readonly string[] = [\n \"double\",\n \"integer\",\n \"long\",\n \"float\",\n \"decimal\",\n \"byte\",\n \"short\",\n];\n\nconst DATE_TYPES: readonly string[] = [\n \"datetime\",\n \"timestamp\",\n];\n\nconst VALIDATION_ERROR_MESSAGE = \"Validation error\";\n\nexport interface EditableCellProps<TData extends RowData, CellValue = unknown> {\n initialValue: CellValue;\n currentValue: CellValue;\n cellId: string;\n dataType?: string;\n onCellEdit: (cellId: string, info: CellEditInfo<TData, CellValue>) => void;\n onCellValidationError?: (\n cellId: string,\n error: string,\n ) => void;\n clearCellValidationError?: (cellId: string) => void;\n validationError?: string;\n originalRowData: TData;\n rowId: string;\n columnId: string;\n validateEdit?: (value: unknown) => Promise<string | undefined>;\n editFieldConfig?: EditFieldConfig<TData>;\n /**\n * Pending edits for this row, keyed by `columnId`. Forwarded to\n * `EditFieldConfig#getFieldComponentProps`. Filtering happens in\n * `DefaultCellRenderer` so unedited rows receive a stable `undefined`\n * reference and `React.memo` can skip them.\n */\n rowCellEdits?: Record<string, CellEditInfo<TData, unknown>>;\n isRowFocused?: boolean;\n}\n\nfunction valueToString(value: unknown): string {\n if (value == null) {\n return \"\";\n }\n if (typeof value === \"object\") {\n return JSON.stringify(value);\n }\n // At this point, value is a primitive (string, number, boolean, symbol, bigint)\n return String(value as string | number | boolean | symbol | bigint);\n}\n\nfunction parseValueByType(\n value: string,\n dataType?: string,\n): unknown {\n if (!dataType || !NUMBER_TYPES.includes(dataType)) {\n return value;\n }\n\n if (value === \"\") {\n return null;\n }\n\n const parsedNumber = Number(value);\n\n if (isNaN(parsedNumber)) {\n return value;\n }\n\n return parsedNumber;\n}\n\nfunction EditableCellInner<TData extends RowData, CellValue = unknown>({\n initialValue,\n currentValue,\n cellId,\n dataType,\n onCellEdit,\n onCellValidationError,\n clearCellValidationError,\n originalRowData,\n rowId,\n columnId,\n validateEdit,\n validationError,\n editFieldConfig,\n rowCellEdits,\n isRowFocused = false,\n}: EditableCellProps<TData, CellValue>): React.ReactElement {\n const [inputValue, setInputValue] = useState<string>(\n valueToString(currentValue),\n );\n const isCancelled = useRef(false);\n const validationAbortControllerRef = useRef<AbortController | null>(null);\n\n const abortValidation = useCallback(() => {\n if (validationAbortControllerRef.current) {\n validationAbortControllerRef.current.abort();\n validationAbortControllerRef.current = null;\n }\n }, []);\n\n const hasValidationError = validationError != null;\n const isEdited = (currentValue ?? null) !== (initialValue ?? null);\n\n useEffect(() => {\n setInputValue(valueToString(currentValue));\n }, [currentValue]);\n\n useEffect(() => {\n return () => {\n abortValidation();\n };\n }, [abortValidation]);\n\n const runValidation = useCallback(\n (parsedValue: unknown) => {\n if (!validateEdit) {\n return;\n }\n\n const controller = new AbortController();\n validationAbortControllerRef.current = controller;\n\n const validationPromise = validateEdit(parsedValue);\n\n // Race between validation and abort\n Promise.race([\n validationPromise,\n new Promise<string | undefined>((_, reject) => {\n controller.signal.addEventListener(\"abort\", () => {\n reject(new DOMException(\"Aborted\", \"AbortError\"));\n });\n }),\n ]).then(\n (errorMessage) => {\n if (controller.signal.aborted) {\n return;\n }\n if (errorMessage) {\n onCellValidationError?.(cellId, errorMessage);\n } else {\n clearCellValidationError?.(cellId);\n }\n },\n (error) => {\n if (\n !controller.signal.aborted\n && error.name !== \"AbortError\"\n ) {\n onCellValidationError?.(cellId, VALIDATION_ERROR_MESSAGE);\n }\n },\n );\n },\n [validateEdit, onCellValidationError, clearCellValidationError, cellId],\n );\n\n const commitEdit = useCallback(\n (newValue: CellValue) => {\n abortValidation();\n\n onCellEdit(cellId, {\n rowId,\n columnId,\n newValue,\n oldValue: initialValue,\n originalRowData,\n });\n\n runValidation(newValue);\n },\n [\n abortValidation,\n onCellEdit,\n cellId,\n rowId,\n columnId,\n initialValue,\n originalRowData,\n runValidation,\n ],\n );\n\n // Text/number input: commit on blur\n const handleBlur = useCallback(() => {\n if (isCancelled.current) {\n isCancelled.current = false;\n return;\n }\n\n // No-op when the input wasn't actually changed by the user\n if (inputValue === valueToString(currentValue)) {\n return;\n }\n\n const parsedValue = parseValueByType(inputValue, dataType) as CellValue;\n commitEdit(parsedValue);\n }, [inputValue, currentValue, dataType, commitEdit]);\n\n const handleInputChange = useCallback((value: string) => {\n // Cancel any in-flight validation\n abortValidation();\n setInputValue(value);\n }, [abortValidation]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === \"Enter\") {\n e.currentTarget.blur();\n }\n if (e.key === \"Escape\") {\n isCancelled.current = true;\n setInputValue(valueToString(currentValue));\n e.currentTarget.blur();\n }\n },\n [currentValue],\n );\n\n const handleCommit = useCallback(\n (newValue: unknown) => {\n if ((newValue ?? null) === (currentValue ?? null)) return;\n commitEdit(newValue as CellValue);\n },\n [commitEdit, currentValue],\n );\n\n const inputType = dataType && NUMBER_TYPES.includes(dataType)\n ? \"number\"\n : \"text\";\n\n // Compute field-component props once per (editFieldConfig, originalRowData, rowCellEdits).\n // The narrowed return type is preserved in each useMemo\n const dropdownFieldProps = useMemo(\n () =>\n editFieldConfig?.fieldComponent === \"DROPDOWN\"\n ? editFieldConfig.getFieldComponentProps(originalRowData, rowCellEdits)\n : undefined,\n [editFieldConfig, originalRowData, rowCellEdits],\n );\n\n const datePickerFieldProps = useMemo(\n () =>\n editFieldConfig?.fieldComponent === \"DATE_PICKER\"\n ? editFieldConfig.getFieldComponentProps(originalRowData, rowCellEdits)\n : undefined,\n [editFieldConfig, originalRowData, rowCellEdits],\n );\n\n const renderFieldInput = () => {\n switch (editFieldConfig?.fieldComponent) {\n case \"DROPDOWN\":\n return (\n <DropdownCellField\n fieldComponentProps={dropdownFieldProps!}\n isRowFocused={isRowFocused}\n inputValue={inputValue}\n hasValidationError={hasValidationError}\n isEdited={isEdited}\n onChange={handleCommit}\n />\n );\n case \"DATE_PICKER\":\n return (\n <DatePickerCellField\n fieldComponentProps={datePickerFieldProps}\n inputValue={inputValue}\n hasValidationError={hasValidationError}\n isEdited={isEdited}\n onChange={handleCommit}\n />\n );\n default:\n if (dataType != null && DATE_TYPES.includes(dataType)) {\n return (\n <DatePickerCellField\n inputValue={inputValue}\n hasValidationError={hasValidationError}\n isEdited={isEdited}\n onChange={handleCommit}\n dataType={dataType}\n />\n );\n }\n return (\n <TextInputCellField\n inputType={inputType}\n inputValue={inputValue}\n hasValidationError={hasValidationError}\n isEdited={isEdited}\n onValueChange={handleInputChange}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n />\n );\n }\n };\n\n return (\n <Tooltip.Provider>\n <Tooltip.Root disabled={!hasValidationError}>\n <Tooltip.Trigger\n className={styles.osdkEditableCellTrigger}\n render={<span className={styles.osdkTooltipTriggerWrapper} />}\n >\n {renderFieldInput()}\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Positioner sideOffset={4} side={\"bottom\"}>\n <Tooltip.Popup>\n <div className={styles.validationError}>\n <Error className={styles.errorIcon} />\n {validationError}\n </div>\n <Tooltip.Arrow />\n </Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n </Tooltip.Provider>\n );\n}\n\nexport const EditableCell = React.memo(\n EditableCellInner,\n) as typeof EditableCellInner;\n\"\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,oBAAoB;AAE1C,OAAOC,KAAK,IACVC,WAAW,EACXC,SAAS,EACTC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,OAAO,QAAQ,uCAAuC;AAC/D,SAASC,mBAAmB,QAAQ,qCAAqC;AACzE,SAASC,iBAAiB,QAAQ,mCAAmC;AACrE,SAASC,kBAAkB,QAAQ,oCAAoC;AACvE,OAAOC,MAAM,MAAM,2BAA2B;AAG9C,MAAMC,YAA+B,GAAG,CACtC,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,SAAS,EACT,MAAM,EACN,OAAO,CACR;AAED,MAAMC,UAA6B,GAAG,CACpC,UAAU,EACV,WAAW,CACZ;AAED,MAAMC,wBAAwB,GAAG,kBAAkB;AA6BnD,SAASC,aAAaA,CAACC,KAAc,EAAU;EAC7C,IAAIA,KAAK,IAAI,IAAI,EAAE;IACjB,OAAO,EAAE;EACX;EACA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOC,IAAI,CAACC,SAAS,CAACF,KAAK,CAAC;EAC9B;EACA;EACA,OAAOG,MAAM,CAACH,KAAoD,CAAC;AACrE;AAEA,SAASI,gBAAgBA,CACvBJ,KAAa,EACbK,QAAiB,EACR;EACT,IAAI,CAACA,QAAQ,IAAI,CAACT,YAAY,CAACU,QAAQ,CAACD,QAAQ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,CAAC+F,KAAK,qBACZrG,KAAA,CAAAmF,aAAA;IAAKK,SAAS,EAAE9E,MAAM,CAAC0B;EAAgB,gBACrCpC,KAAA,CAAAmF,aAAA,CAACpF,KAAK;IAACyF,SAAS,EAAE9E,MAAM,CAAC4F;EAAU,CAAE,CAAC,EACrClE,eACE,CAAC,eACNpC,KAAA,CAAAmF,aAAA,CAAC7E,OAAO,CAACiG,KAAK,MAAE,CACH,CACG,CACN,CACJ,CACE,CAAC;AAEvB;AAEA,OAAO,MAAMC,YAAY,gBAAGxG,KAAK,CAACyG,IAAI,CACpChF,iBACF,CAA6B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ObjectTableApi.js","names":[],"sources":["ObjectTableApi.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n CompileTimeMetadata,\n DerivedProperty,\n ObjectOrInterfaceDefinition,\n ObjectSet,\n Osdk,\n PrimaryKeyType,\n PropertyKeys,\n QueryDefinition,\n SimplePropertyDef,\n WhereClause,\n} from \"@osdk/api\";\nimport type { QueryParameterType } from \"@osdk/client/observable\";\nimport type * as React from \"react\";\nimport type { CellEditInfo, EditFieldConfig } from \"./utils/types.js\";\n\nexport type { EditFieldConfig } from \"./utils/types.js\";\n\nexport type ColumnDefinition<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> =\n | EditableColumnDefinition<Q, RDPs, FunctionColumns>\n | ReadonlyColumnDefinition<Q, RDPs, FunctionColumns>;\n\ninterface SharedColumnDefinition<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> {\n locator: ColumnDefinitionLocator<Q, RDPs, FunctionColumns>;\n\n /**\n * @default true\n */\n isVisible?: boolean;\n\n /**\n * @default none\n */\n pinned?: \"left\" | \"right\" | \"none\";\n width?: number;\n minWidth?: number;\n maxWidth?: number;\n resizable?: boolean;\n orderable?: boolean;\n filterable?: boolean;\n\n /**\n * Custom renderer for the cell value.\n *\n * Interaction with `editable` columns:\n * - When `editMode: \"manual\"` (default), `renderCell` is used while the\n * table is read-only (Edit Table button visible) and the editable cell\n * takes over once the user enters edit mode.\n * - When `editMode: \"always\"`, the editable cell always wins on editable\n * columns and `renderCell` is ignored — `editMode: \"always\"` opts the\n * column into a permanently-editable surface, leaving no read-only\n * state for `renderCell` to render. Use `editMode: \"manual\"` if you\n * need a custom display alongside editing.\n */\n renderCell?: (\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n locator: ColumnDefinitionLocator<Q, RDPs, FunctionColumns>,\n ) => React.ReactNode;\n\n /**\n * If provided, this will be used in the column header.\n * If both columnName and renderHeader are provided, renderHeader will take precedence in the table header.\n * columnName will still be used in other parts where the column name is displayed.\n *\n * If not provided,\n * for a property column, the property displayName will be used\n * for other columns, the id will be used.\n */\n columnName?: string;\n\n /**\n * If provided, this will be used to render the header component.\n * When both columnName and renderHeader are provided, renderHeader will take precedence in the table header.\n */\n renderHeader?: () => React.ReactNode;\n}\n\ninterface EditableColumnDefinition<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> extends SharedColumnDefinition<Q, RDPs, FunctionColumns> {\n /**\n * `editable` can be a boolean or a predicate that receives the row's object\n * and returns whether the cell is editable\n */\n editable:\n | true\n | ((\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n ) => boolean);\n\n /**\n * Configuration for the cell editor component.\n *\n * When provided, the column uses the specified field component\n * (e.g. dropdown) instead of the default auto-detected text/number input.\n *\n * `getFieldComponentProps` receives the row's object and returns the props\n * to pass to the field component, so editor configuration can depend on the\n * current row.\n */\n editFieldConfig?: EditFieldConfig<\n Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>\n >;\n\n /**\n * Additional function to validate the cell value during edit.\n *\n * @param value the current cell value\n * @returns a promise that resolves to an error message string if validation fails, or undefined if validation succeeds\n */\n validateEdit?: (\n value: unknown,\n ) => Promise<string | undefined>;\n}\n\n/**\n * Column definition for a read-only column (default).\n * `editFieldConfig` and `validateEdit` are not available.\n */\ninterface ReadonlyColumnDefinition<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> extends SharedColumnDefinition<Q, RDPs, FunctionColumns> {\n editable?: false;\n}\n\nexport type ExtractQueryParameters<\n Q extends QueryDefinition,\n> = CompileTimeMetadata<Q>[\"parameters\"] extends Record<string, never>\n ? undefined\n : QueryParameterType<CompileTimeMetadata<Q>[\"parameters\"]>;\n\nexport interface PropertyColumnLocator<Q extends ObjectOrInterfaceDefinition> {\n type: \"property\";\n id: PropertyKeys<Q>;\n}\n\n/**\n * Concrete function column locator for a single key K.\n * Correlates the id, queryDefinition, and getFunctionParams types.\n */\ninterface FunctionColumnLocatorForKey<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n FunctionColumns extends Record<string, QueryDefinition<{}>>,\n K extends keyof FunctionColumns,\n> {\n /**\n * This is equivalent to workshop's function-backed columns.\n * The function needs to meet the specifications stated in https://www.palantir.com/docs/foundry/workshop/widgets-object-table/#function-backed-columns\n */\n type: \"function\";\n id: K;\n queryDefinition: FunctionColumns[K];\n\n /**\n * The function will be called with the current object set to get the input parameters for the function query.\n * @param objectSet - The current object set.\n * @returns - The function's input parameters including the object set.\n */\n getFunctionParams: (\n objectSet: ObjectSet<Q, RDPs>,\n ) => ExtractQueryParameters<FunctionColumns[K]>;\n\n /**\n * Function to generate keys for looking up results in the FunctionsMap.\n * @param object - The object instance\n * @returns - The key to use for looking up this object's result in the FunctionsMap\n */\n getKey: (\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n ) => string;\n\n /**\n * Function to extract the cell value from the raw cell data returned by the function.\n * This is useful when functions return custom types with multiple properties.\n * @param cellData - The raw data returned by the function for this object\n * @returns - The value to display in the cell\n */\n getValue?: (cellData?: unknown) => unknown;\n\n /**\n * Minimum time between re-fetches of the same function with the same parameters, in milliseconds.\n * Defaults to 5 minutes as it is expensive to fetch function columns for a large object set\n * and they are expected to be relatively static in the context of an object table\n *\n * @default 300_000 (5 minutes)\n */\n dedupeIntervalMs?: number;\n\n /**\n * Object type apiNames the function reads but doesn't take as a parameter (e.g.\n * linked object types the function traverses internally). The column auto-revalidates\n * when an action edits an object of any of these types. Param-derived types are\n * tracked automatically and don't need to be listed here.\n */\n dependsOn?: string[];\n}\n\n/**\n * Distributes over each key in FunctionColumns so that id, queryDefinition,\n * and getFunctionParams are correlated per key.\n */\nexport type FunctionColumnLocator<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> = keyof FunctionColumns extends infer K\n ? K extends keyof FunctionColumns\n ? FunctionColumnLocatorForKey<Q, RDPs, FunctionColumns, K>\n : never\n : never;\n\nexport interface RdpColumnLocator<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n> {\n type: \"rdp\";\n id: keyof RDPs;\n creator: DerivedProperty.Creator<Q, RDPs[keyof RDPs]>;\n}\n\nexport interface CustomColumnLocator {\n type: \"custom\";\n id: string;\n}\n\nexport type ColumnDefinitionLocator<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> =\n | PropertyColumnLocator<Q>\n | FunctionColumnLocator<Q, RDPs, FunctionColumns>\n | RdpColumnLocator<Q, RDPs>\n | CustomColumnLocator;\n\nexport interface ObjectTableProps<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> {\n /**\n * The object or interface type of the object\n * If objectSet is not provided, objects will be fetched based on this type.\n */\n objectType: Q;\n\n /**\n * The set of objects to show in the table.\n * If provided and the objectType is not an interface, the table will use objectSet to fetch objects instead of fetching based on objectType.\n */\n objectSet?: ObjectSet<Q>;\n\n objectSetOptions?: ObjectSetOptions<Q>;\n\n /**\n * Minimum time between fetch requests in milliseconds.\n * Increasing this value reduces redundant network calls when the same data\n * is requested multiple times in quick succession.\n *\n * @default 60_000 1 minute\n */\n dedupeIntervalMs?: number;\n\n /**\n * Number of objects to fetch per page.\n *\n * @default 50\n */\n pageSize?: number;\n\n /**\n * Ordered list of column definitions to show in the table\n *\n * If not provided, all of the properties of the object type will be shown in default order.\n */\n columnDefinitions?: Array<ColumnDefinition<Q, RDPs, FunctionColumns>>;\n\n /**\n * Whether the table is filterable by the user.\n *\n * @default true\n */\n enableFiltering?: boolean;\n\n /**\n * The current where clause to filter the objects in the table.\n * If provided, the filter is controlled.\n */\n filter?: WhereClause<Q, RDPs>;\n\n /**\n * Called when the where clause is changed.\n * Required when filter is controlled.\n *\n * @param newWhere The new where clause\n */\n onFilterChanged?: (newWhere: WhereClause<Q, RDPs>) => void;\n\n /**\n * Whether the table is sortable by the user.\n *\n * @default true\n */\n enableOrdering?: boolean;\n\n /**\n * Whether columns can be pinned by the user.\n *\n * @default true\n */\n enableColumnPinning?: boolean;\n\n /**\n * Whether columns can be resized by the user.\n *\n * @default true\n */\n enableColumnResizing?: boolean;\n\n /**\n * Whether the column configuration dialog for column visibility and ordering is available to the user.\n *\n * @default true\n */\n enableColumnConfig?: boolean;\n\n /**\n * Controls the edit mode behavior of the table.\n * - \"always\": Editable cells are immediately in edit mode on row clicked.\n * - \"manual\": User can toggle edit mode on/off via the Edit Table button.\n *\n * @default \"manual\"\n */\n editMode?: \"always\" | \"manual\";\n\n /**\n * Whether to render the bottom edit footer that hosts the\n * \"Edit Table\" / \"Cancel\" / \"Submit Edits\" buttons and the edit-state\n * indicators (modification count, validation errors).\n *\n * @default true whenever the table has at least one column declared\n * editable (i.e. any column with `editable: true` or `editable: (object) => boolean`).\n * When `false`, the \"Edit Table\" and \"Submit Edits\" buttons will not be shown.\n */\n showEditFooter?: boolean;\n\n /**\n * The default order by clause to sort the objects in the table.\n * If provided without orderBy prop, the sorting is uncontrolled.\n * If both orderBy and defaultOrderBy are provided, orderBy takes precedence.\n */\n defaultOrderBy?: Array<{\n property: PropertyKeys<Q> | keyof RDPs;\n direction: \"asc\" | \"desc\";\n }>;\n\n /**\n * The current order by clause to sort the objects in the table.\n * If provided, the sorting is controlled.\n * If both orderBy and defaultOrderBy are provided, orderBy takes precedence.\n */\n orderBy?: Array<{\n property: PropertyKeys<Q> | keyof RDPs;\n direction: \"asc\" | \"desc\";\n }>;\n\n /**\n * Called when the order by clause is changed.\n * Required when sorting is controlled.\n *\n * @param newOrderBy The new order by clause\n */\n onOrderByChanged?: (\n newOrderBy: Array<{\n property: PropertyKeys<Q> | keyof RDPs;\n direction: \"asc\" | \"desc\";\n }>,\n ) => void;\n\n /**\n * Called after the value of a cell is edited and committed by the user.\n *\n * @param info An object containing details about the cell that was edited,\n * including the rowId, columnId, new and old values, and the row data before the edit\n */\n onCellValueChanged?: (\n info: CellEditInfo<\n Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n unknown\n >,\n ) => void;\n\n /**\n * If provided, the \"Submit Edits\" button will be shown in the edit footer.\n *\n * @param edits an array of edit info containing details about the edited cells\n * including the rowId, columnId, new and old values, and the row data before the edit\n * @return a promise that resolves to true if the edits were successfully submitted\n */\n onSubmitEdits?: (edits: CellEditInfo<\n Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n unknown\n >[]) => Promise<boolean>;\n\n /**\n * Called when the column visibility or ordering changed.\n *\n * If provided, the table will allow the user to show/hide columns.\n *\n * @param newStates The columns sorted in their display order in the table and their visibility state.\n */\n onColumnVisibilityChanged?: (\n newStates: Array<{\n columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns;\n isVisible: boolean;\n }>,\n ) => void;\n\n /**\n * Called when the pinned columns change.\n *\n * If provided, the table will allow the user to pin/unpin columns.\n *\n * @param newStates The new list of column pin states\n */\n onColumnsPinnedChanged?: (\n newStates: Array<{\n columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns;\n pinned: \"left\" | \"right\" | \"none\";\n }>,\n ) => void;\n\n /**\n * Called when a column is resized.\n *\n * @param columnId The ID of the resized column\n * @param newWidth The new width of the column. When newWidth = null, the column size is reset.\n */\n onColumnResize?: (\n columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns,\n newWidth: number | null,\n ) => void;\n\n /**\n * Called when a row is clicked.\n *\n * @param object The object representing the clicked row\n */\n onRowClick?: (\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n ) => void;\n\n /**\n * Called when a column header is clicked.\n *\n * The columnId matches the `locator.id` configured on the column definition.\n * The dropdown menu trigger is excluded — clicking the chevron opens the\n * header menu instead of firing this callback.\n *\n * @param columnId The id of the clicked column\n */\n onColumnHeaderClick?: (\n columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns,\n ) => void;\n\n /**\n * Selection mode for the table rows.\n *\n * If multiple, a checkbox will be shown for each row to allow selecting multiple rows\n * as well as a top-level checkbox in the header to select all rows.\n *\n * @default \"none\"\n */\n selectionMode?: \"single\" | \"multiple\" | \"none\";\n\n /**\n * The currently selected rows in the table.\n * If provided, the row selection is controlled.\n */\n selectedRows?: PrimaryKeyType<Q>[];\n\n /**\n * Indicates whether all rows are selected in controlled mode.\n * When true, the table will show all rows as selected regardless of the selectedRows array.\n */\n isAllSelected?: boolean;\n\n /**\n * Called when the row selection changes.\n * Required when row selection is controlled.\n *\n * @param selectedRowIds The primary keys of currently selected rows\n * @param isSelectAll Whether the change was triggered by a \"select all\" action. Defaults to false\n */\n onRowSelection?: (\n selectedRowIds: PrimaryKeyType<Q>[],\n isSelectAll?: boolean,\n ) => void;\n /**\n * If provided, will render this context menu when right clicking on a cell\n */\n renderCellContextMenu?: (\n row: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n cellValue: unknown,\n ) => React.ReactNode;\n\n /**\n * The height of each row in pixels.\n *\n * @default 40\n */\n rowHeight?: number;\n\n /**\n * Returns extra HTML attributes (typically `data-*`) to apply to each\n * row element. Use this to drive conditional row styling\n */\n getRowAttributes?: (\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n ) => Record<string, string | undefined>;\n\n className?: string;\n}\n\nexport interface ObjectSetOptions<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Object sets to union with\n */\n union?: ObjectSet<Q>[];\n\n /**\n * Object sets to intersect with\n */\n intersect?: ObjectSet<Q>[];\n\n /**\n * Object sets to subtract from\n */\n subtract?: ObjectSet<Q>[];\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ObjectTableApi.js","names":[],"sources":["ObjectTableApi.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n CompileTimeMetadata,\n DerivedProperty,\n ObjectOrInterfaceDefinition,\n ObjectSet,\n Osdk,\n PrimaryKeyType,\n PropertyKeys,\n QueryDefinition,\n SimplePropertyDef,\n WhereClause,\n} from \"@osdk/api\";\nimport type { QueryParameterType } from \"@osdk/client/observable\";\nimport type * as React from \"react\";\nimport type { CellEditInfo, EditFieldConfig } from \"./utils/types.js\";\n\nexport type { EditFieldConfig } from \"./utils/types.js\";\n\nexport type ColumnDefinition<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> =\n | EditableColumnDefinition<Q, RDPs, FunctionColumns>\n | ReadonlyColumnDefinition<Q, RDPs, FunctionColumns>;\n\ninterface SharedColumnDefinition<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> {\n locator: ColumnDefinitionLocator<Q, RDPs, FunctionColumns>;\n\n /**\n * @default true\n */\n isVisible?: boolean;\n\n /**\n * @default none\n */\n pinned?: \"left\" | \"right\" | \"none\";\n width?: number;\n minWidth?: number;\n maxWidth?: number;\n resizable?: boolean;\n orderable?: boolean;\n filterable?: boolean;\n\n /**\n * Custom renderer for the cell value.\n *\n * Interaction with `editable` columns:\n * - When `editMode: \"manual\"` (default), `renderCell` is used while the\n * table is read-only (Edit Table button visible) and the editable cell\n * takes over once the user enters edit mode.\n * - When `editMode: \"always\"`, the editable cell always wins on editable\n * columns and `renderCell` is ignored — `editMode: \"always\"` opts the\n * column into a permanently-editable surface, leaving no read-only\n * state for `renderCell` to render. Use `editMode: \"manual\"` if you\n * need a custom display alongside editing.\n */\n renderCell?: (\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n locator: ColumnDefinitionLocator<Q, RDPs, FunctionColumns>,\n ) => React.ReactNode;\n\n /**\n * If provided, this will be used in the column header.\n * If both columnName and renderHeader are provided, renderHeader will take precedence in the table header.\n * columnName will still be used in other parts where the column name is displayed.\n *\n * If not provided,\n * for a property column, the property displayName will be used\n * for other columns, the id will be used.\n */\n columnName?: string;\n\n /**\n * If provided, this will be used to render the header component.\n * When both columnName and renderHeader are provided, renderHeader will take precedence in the table header.\n */\n renderHeader?: () => React.ReactNode;\n}\n\ninterface EditableColumnDefinition<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> extends SharedColumnDefinition<Q, RDPs, FunctionColumns> {\n /**\n * `editable` can be a boolean or a predicate that receives the row's object\n * and returns whether the cell is editable\n */\n editable:\n | true\n | ((\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n ) => boolean);\n\n /**\n * Configuration for the cell editor component.\n *\n * When provided, the column uses the specified field component\n * (e.g. dropdown) instead of the default auto-detected text/number input.\n *\n * `getFieldComponentProps` receives the row's object and a map of any\n * pending edits for that row (keyed by column id), and returns the props to\n * pass to the field component. Editor configuration can depend on the\n * current row or on other in-progress edits within the row.\n */\n editFieldConfig?: EditFieldConfig<\n Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>\n >;\n\n /**\n * Additional function to validate the cell value during edit.\n *\n * @param value the current cell value\n * @returns a promise that resolves to an error message string if validation fails, or undefined if validation succeeds\n */\n validateEdit?: (\n value: unknown,\n ) => Promise<string | undefined>;\n}\n\n/**\n * Column definition for a read-only column (default).\n * `editFieldConfig` and `validateEdit` are not available.\n */\ninterface ReadonlyColumnDefinition<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> extends SharedColumnDefinition<Q, RDPs, FunctionColumns> {\n editable?: false;\n}\n\nexport type ExtractQueryParameters<\n Q extends QueryDefinition,\n> = CompileTimeMetadata<Q>[\"parameters\"] extends Record<string, never>\n ? undefined\n : QueryParameterType<CompileTimeMetadata<Q>[\"parameters\"]>;\n\nexport interface PropertyColumnLocator<Q extends ObjectOrInterfaceDefinition> {\n type: \"property\";\n id: PropertyKeys<Q>;\n}\n\n/**\n * Concrete function column locator for a single key K.\n * Correlates the id, queryDefinition, and getFunctionParams types.\n */\ninterface FunctionColumnLocatorForKey<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef>,\n FunctionColumns extends Record<string, QueryDefinition<{}>>,\n K extends keyof FunctionColumns,\n> {\n /**\n * This is equivalent to workshop's function-backed columns.\n * The function needs to meet the specifications stated in https://www.palantir.com/docs/foundry/workshop/widgets-object-table/#function-backed-columns\n */\n type: \"function\";\n id: K;\n queryDefinition: FunctionColumns[K];\n\n /**\n * The function will be called with the current object set to get the input parameters for the function query.\n * @param objectSet - The current object set.\n * @returns - The function's input parameters including the object set.\n */\n getFunctionParams: (\n objectSet: ObjectSet<Q, RDPs>,\n ) => ExtractQueryParameters<FunctionColumns[K]>;\n\n /**\n * Function to generate keys for looking up results in the FunctionsMap.\n * @param object - The object instance\n * @returns - The key to use for looking up this object's result in the FunctionsMap\n */\n getKey: (\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n ) => string;\n\n /**\n * Function to extract the cell value from the raw cell data returned by the function.\n * This is useful when functions return custom types with multiple properties.\n * @param cellData - The raw data returned by the function for this object\n * @returns - The value to display in the cell\n */\n getValue?: (cellData?: unknown) => unknown;\n\n /**\n * Minimum time between re-fetches of the same function with the same parameters, in milliseconds.\n * Defaults to 5 minutes as it is expensive to fetch function columns for a large object set\n * and they are expected to be relatively static in the context of an object table\n *\n * @default 300_000 (5 minutes)\n */\n dedupeIntervalMs?: number;\n\n /**\n * Object type apiNames the function reads but doesn't take as a parameter (e.g.\n * linked object types the function traverses internally). The column auto-revalidates\n * when an action edits an object of any of these types. Param-derived types are\n * tracked automatically and don't need to be listed here.\n */\n dependsOn?: string[];\n}\n\n/**\n * Distributes over each key in FunctionColumns so that id, queryDefinition,\n * and getFunctionParams are correlated per key.\n */\nexport type FunctionColumnLocator<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> = keyof FunctionColumns extends infer K\n ? K extends keyof FunctionColumns\n ? FunctionColumnLocatorForKey<Q, RDPs, FunctionColumns, K>\n : never\n : never;\n\nexport interface RdpColumnLocator<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n> {\n type: \"rdp\";\n id: keyof RDPs;\n creator: DerivedProperty.Creator<Q, RDPs[keyof RDPs]>;\n}\n\nexport interface CustomColumnLocator {\n type: \"custom\";\n id: string;\n}\n\nexport type ColumnDefinitionLocator<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> =\n | PropertyColumnLocator<Q>\n | FunctionColumnLocator<Q, RDPs, FunctionColumns>\n | RdpColumnLocator<Q, RDPs>\n | CustomColumnLocator;\n\nexport interface ObjectTableProps<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<string, never>,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n> {\n /**\n * The object or interface type of the object\n * If objectSet is not provided, objects will be fetched based on this type.\n */\n objectType: Q;\n\n /**\n * The set of objects to show in the table.\n * If provided and the objectType is not an interface, the table will use objectSet to fetch objects instead of fetching based on objectType.\n */\n objectSet?: ObjectSet<Q>;\n\n objectSetOptions?: ObjectSetOptions<Q>;\n\n /**\n * Minimum time between fetch requests in milliseconds.\n * Increasing this value reduces redundant network calls when the same data\n * is requested multiple times in quick succession.\n *\n * @default 60_000 1 minute\n */\n dedupeIntervalMs?: number;\n\n /**\n * Number of objects to fetch per page.\n *\n * @default 50\n */\n pageSize?: number;\n\n /**\n * Ordered list of column definitions to show in the table\n *\n * If not provided, all of the properties of the object type will be shown in default order.\n */\n columnDefinitions?: Array<ColumnDefinition<Q, RDPs, FunctionColumns>>;\n\n /**\n * Whether the table is filterable by the user.\n *\n * @default true\n */\n enableFiltering?: boolean;\n\n /**\n * The current where clause to filter the objects in the table.\n * If provided, the filter is controlled.\n */\n filter?: WhereClause<Q, RDPs>;\n\n /**\n * Called when the where clause is changed.\n * Required when filter is controlled.\n *\n * @param newWhere The new where clause\n */\n onFilterChanged?: (newWhere: WhereClause<Q, RDPs>) => void;\n\n /**\n * Whether the table is sortable by the user.\n *\n * @default true\n */\n enableOrdering?: boolean;\n\n /**\n * Whether columns can be pinned by the user.\n *\n * @default true\n */\n enableColumnPinning?: boolean;\n\n /**\n * Whether columns can be resized by the user.\n *\n * @default true\n */\n enableColumnResizing?: boolean;\n\n /**\n * Whether the column configuration dialog for column visibility and ordering is available to the user.\n *\n * @default true\n */\n enableColumnConfig?: boolean;\n\n /**\n * Controls the edit mode behavior of the table.\n * - \"always\": Editable cells are immediately in edit mode on row clicked.\n * - \"manual\": User can toggle edit mode on/off via the Edit Table button.\n *\n * @default \"manual\"\n */\n editMode?: \"always\" | \"manual\";\n\n /**\n * Whether to render the bottom edit footer that hosts the\n * \"Edit Table\" / \"Cancel\" / \"Submit Edits\" buttons and the edit-state\n * indicators (modification count, validation errors).\n *\n * @default true whenever the table has at least one column declared\n * editable (i.e. any column with `editable: true` or `editable: (object) => boolean`).\n * When `false`, the \"Edit Table\" and \"Submit Edits\" buttons will not be shown.\n */\n showEditFooter?: boolean;\n\n /**\n * The default order by clause to sort the objects in the table.\n * If provided without orderBy prop, the sorting is uncontrolled.\n * If both orderBy and defaultOrderBy are provided, orderBy takes precedence.\n */\n defaultOrderBy?: Array<{\n property: PropertyKeys<Q> | keyof RDPs;\n direction: \"asc\" | \"desc\";\n }>;\n\n /**\n * The current order by clause to sort the objects in the table.\n * If provided, the sorting is controlled.\n * If both orderBy and defaultOrderBy are provided, orderBy takes precedence.\n */\n orderBy?: Array<{\n property: PropertyKeys<Q> | keyof RDPs;\n direction: \"asc\" | \"desc\";\n }>;\n\n /**\n * Called when the order by clause is changed.\n * Required when sorting is controlled.\n *\n * @param newOrderBy The new order by clause\n */\n onOrderByChanged?: (\n newOrderBy: Array<{\n property: PropertyKeys<Q> | keyof RDPs;\n direction: \"asc\" | \"desc\";\n }>,\n ) => void;\n\n /**\n * Called after the value of a cell is edited and committed by the user.\n *\n * @param info An object containing details about the cell that was edited,\n * including the rowId, columnId, new and old values, and the row data before the edit\n */\n onCellValueChanged?: (\n info: CellEditInfo<\n Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n unknown\n >,\n ) => void;\n\n /**\n * If provided, the \"Submit Edits\" button will be shown in the edit footer.\n *\n * @param edits an array of edit info containing details about the edited cells\n * including the rowId, columnId, new and old values, and the row data before the edit\n * @return a promise that resolves to true if the edits were successfully submitted\n */\n onSubmitEdits?: (edits: CellEditInfo<\n Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n unknown\n >[]) => Promise<boolean>;\n\n /**\n * Called when the column visibility or ordering changed.\n *\n * If provided, the table will allow the user to show/hide columns.\n *\n * @param newStates The columns sorted in their display order in the table and their visibility state.\n */\n onColumnVisibilityChanged?: (\n newStates: Array<{\n columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns;\n isVisible: boolean;\n }>,\n ) => void;\n\n /**\n * Called when the pinned columns change.\n *\n * If provided, the table will allow the user to pin/unpin columns.\n *\n * @param newStates The new list of column pin states\n */\n onColumnsPinnedChanged?: (\n newStates: Array<{\n columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns;\n pinned: \"left\" | \"right\" | \"none\";\n }>,\n ) => void;\n\n /**\n * Called when a column is resized.\n *\n * @param columnId The ID of the resized column\n * @param newWidth The new width of the column. When newWidth = null, the column size is reset.\n */\n onColumnResize?: (\n columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns,\n newWidth: number | null,\n ) => void;\n\n /**\n * Called when a row is clicked.\n *\n * @param object The object representing the clicked row\n */\n onRowClick?: (\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n ) => void;\n\n /**\n * Called when a column header is clicked.\n *\n * The columnId matches the `locator.id` configured on the column definition.\n * The dropdown menu trigger is excluded — clicking the chevron opens the\n * header menu instead of firing this callback.\n *\n * @param columnId The id of the clicked column\n */\n onColumnHeaderClick?: (\n columnId: PropertyKeys<Q> | keyof RDPs | keyof FunctionColumns,\n ) => void;\n\n /**\n * Selection mode for the table rows.\n *\n * If multiple, a checkbox will be shown for each row to allow selecting multiple rows\n * as well as a top-level checkbox in the header to select all rows.\n *\n * @default \"none\"\n */\n selectionMode?: \"single\" | \"multiple\" | \"none\";\n\n /**\n * The currently selected rows in the table.\n * If provided, the row selection is controlled.\n */\n selectedRows?: PrimaryKeyType<Q>[];\n\n /**\n * Indicates whether all rows are selected in controlled mode.\n * When true, the table will show all rows as selected regardless of the selectedRows array.\n */\n isAllSelected?: boolean;\n\n /**\n * Called when the row selection changes.\n * Required when row selection is controlled.\n *\n * @param selectedRowIds The primary keys of currently selected rows\n * @param isSelectAll Whether the change was triggered by a \"select all\" action. Defaults to false\n */\n onRowSelection?: (\n selectedRowIds: PrimaryKeyType<Q>[],\n isSelectAll?: boolean,\n ) => void;\n /**\n * If provided, will render this context menu when right clicking on a cell\n */\n renderCellContextMenu?: (\n row: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n cellValue: unknown,\n ) => React.ReactNode;\n\n /**\n * The height of each row in pixels.\n *\n * @default 40\n */\n rowHeight?: number;\n\n /**\n * Returns extra HTML attributes (typically `data-*`) to apply to each\n * row element. Use this to drive conditional row styling\n */\n getRowAttributes?: (\n object: Osdk.Instance<Q, \"$allBaseProperties\", PropertyKeys<Q>, RDPs>,\n ) => Record<string, string | undefined>;\n\n className?: string;\n}\n\nexport interface ObjectSetOptions<\n Q extends ObjectOrInterfaceDefinition,\n> {\n /**\n * Object sets to union with\n */\n union?: ObjectSet<Q>[];\n\n /**\n * Object sets to intersect with\n */\n intersect?: ObjectSet<Q>[];\n\n /**\n * Object sets to subtract from\n */\n subtract?: ObjectSet<Q>[];\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["types.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { RowData } from \"@tanstack/react-table\";\n\nexport interface ColumnOption {\n id: string;\n name: string;\n canSort: boolean;\n}\n\nexport interface CellIdentifier {\n rowId: string;\n columnId: string;\n}\n\nexport interface CellEditInfo<\n TData extends RowData = unknown,\n CellValue = unknown,\n> extends CellIdentifier {\n newValue: CellValue | null;\n oldValue: CellValue | null;\n originalRowData: TData;\n}\n\nexport type EditModeState =\n | { type: \"always\"; isActive: true }\n | { type: \"manual\"; isActive: boolean; setActive: (value: boolean) => void };\n\nexport interface EditableConfig<\n TData extends RowData = unknown,\n CellValue = unknown,\n> {\n cellEdits: Record<string, CellEditInfo<TData, CellValue>>;\n onCellEdit: (\n cellId: string,\n info: CellEditInfo<TData, CellValue>,\n ) => void;\n onSubmitEdits?: () => Promise<boolean>;\n clearEdits: () => void;\n editModeState: EditModeState;\n onCellValidationError: (\n cellId: string,\n error: string,\n ) => void;\n validationErrors: Map<string, string>;\n clearCellValidationError: (cellId: string) => void;\n}\n\n/**\n * User-facing configuration for a dropdown editor in a table cell.\n *\n * This is intentionally a standalone interface rather than re-exporting\n * `DropdownFieldProps` from ActionForm, so the table API doesn't break\n * when ActionForm's prop shape changes (e.g. adding form-specific fields).\n */\nexport interface DropdownEditConfig<V = unknown> {\n /**\n * Available items for the dropdown.\n */\n items: V[];\n\n /**\n * Converts an item to a display string. Defaults to `String()`.\n */\n itemToStringLabel?: (item: V) => string;\n\n /**\n * Returns a unique string key for a list item. Used as the React `key`.\n * Falls back to the item's index when not provided.\n */\n itemToKey?: (item: V) => string;\n\n /**\n * Custom equality check for item values. Defaults to `Object.is`.\n * Required when items are objects to ensure correct selection matching.\n */\n isItemEqual?: (a: V, b: V) => boolean;\n\n /**\n * Whether the dropdown allows searching/filtering.\n * When true, renders a Combobox with a search input.\n * When false (default), renders a Select dropdown.\n */\n isSearchable?: boolean;\n\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n\n /**\n * Whether multiple values can be selected.\n */\n isMultiple?: boolean;\n}\n\n/**\n * User-facing configuration for a date picker editor in a table cell.\n *\n * Standalone by design rather than re-exporting `DatePickerProps` so the\n * table API doesn't break when the picker's prop shape changes.\n */\nexport interface DatePickerEditConfig {\n /**\n * The earliest date the user can select.\n */\n min?: Date;\n\n /**\n * The latest date the user can select.\n */\n max?: Date;\n\n /**\n * Whether to show a time picker alongside the calendar.\n */\n showTime?: boolean;\n\n /**\n * Whether to close the popover after selecting a date.\n * @default true when `showTime` is false, false when `showTime` is true\n */\n closeOnSelection?: boolean;\n\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n\n /**\n * Formats a Date for display in the input field when not editing.\n * Provide a matching `parseDate` if using a custom format.\n */\n formatDate?: (date: Date) => string;\n\n /**\n * Parses a user-typed string back into a Date.\n * Must be the inverse of `formatDate`.\n */\n parseDate?: (text: string) => Date | undefined;\n}\n\n/**\n * Maps each supported editable field component to its user-facing config.\n */\ninterface EditFieldPropsByType {\n DROPDOWN: DropdownEditConfig;\n DATE_PICKER: DatePickerEditConfig;\n}\n\ntype EditFieldComponent = keyof EditFieldPropsByType;\n\n/**\n * Configuration for an editable cell's field component.\n *\n * `getFieldComponentProps` is called with the row's object so the configuration\n * can vary per row (e.g. dropdown items that depend on row state).\n */\nexport type EditFieldConfig<TData = unknown> = {\n [K in EditFieldComponent]: {\n fieldComponent: K;\n getFieldComponentProps: (object: TData) => EditFieldPropsByType[K];\n };\n}[EditFieldComponent];\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":[],"sources":["types.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { RowData } from \"@tanstack/react-table\";\n\nexport interface ColumnOption {\n id: string;\n name: string;\n canSort: boolean;\n}\n\nexport interface CellIdentifier {\n rowId: string;\n columnId: string;\n}\n\nexport interface CellEditInfo<\n TData extends RowData = unknown,\n CellValue = unknown,\n> extends CellIdentifier {\n newValue: CellValue | null;\n oldValue: CellValue | null;\n originalRowData: TData;\n}\n\nexport type EditModeState =\n | { type: \"always\"; isActive: true }\n | { type: \"manual\"; isActive: boolean; setActive: (value: boolean) => void };\n\nexport interface EditableConfig<\n TData extends RowData = unknown,\n CellValue = unknown,\n> {\n cellEdits: Record<string, CellEditInfo<TData, CellValue>>;\n onCellEdit: (\n cellId: string,\n info: CellEditInfo<TData, CellValue>,\n ) => void;\n onSubmitEdits?: () => Promise<boolean>;\n clearEdits: () => void;\n editModeState: EditModeState;\n onCellValidationError: (\n cellId: string,\n error: string,\n ) => void;\n validationErrors: Map<string, string>;\n clearCellValidationError: (cellId: string) => void;\n}\n\n/**\n * User-facing configuration for a dropdown editor in a table cell.\n *\n * This is intentionally a standalone interface rather than re-exporting\n * `DropdownFieldProps` from ActionForm, so the table API doesn't break\n * when ActionForm's prop shape changes (e.g. adding form-specific fields).\n */\nexport interface DropdownEditConfig<V = unknown> {\n /**\n * Available items for the dropdown.\n */\n items: V[];\n\n /**\n * Converts an item to a display string. Defaults to `String()`.\n */\n itemToStringLabel?: (item: V) => string;\n\n /**\n * Returns a unique string key for a list item. Used as the React `key`.\n * Falls back to the item's index when not provided.\n */\n itemToKey?: (item: V) => string;\n\n /**\n * Custom equality check for item values. Defaults to `Object.is`.\n * Required when items are objects to ensure correct selection matching.\n */\n isItemEqual?: (a: V, b: V) => boolean;\n\n /**\n * Whether the dropdown allows searching/filtering.\n * When true, renders a Combobox with a search input.\n * When false (default), renders a Select dropdown.\n */\n isSearchable?: boolean;\n\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n\n /**\n * Whether multiple values can be selected.\n */\n isMultiple?: boolean;\n}\n\n/**\n * User-facing configuration for a date picker editor in a table cell.\n *\n * Standalone by design rather than re-exporting `DatePickerProps` so the\n * table API doesn't break when the picker's prop shape changes.\n */\nexport interface DatePickerEditConfig {\n /**\n * The earliest date the user can select.\n */\n min?: Date;\n\n /**\n * The latest date the user can select.\n */\n max?: Date;\n\n /**\n * Whether to show a time picker alongside the calendar.\n */\n showTime?: boolean;\n\n /**\n * Whether to close the popover after selecting a date.\n * @default true when `showTime` is false, false when `showTime` is true\n */\n closeOnSelection?: boolean;\n\n /**\n * Placeholder text shown when no value is selected.\n */\n placeholder?: string;\n\n /**\n * Formats a Date for display in the input field when not editing.\n * Provide a matching `parseDate` if using a custom format.\n */\n formatDate?: (date: Date) => string;\n\n /**\n * Parses a user-typed string back into a Date.\n * Must be the inverse of `formatDate`.\n */\n parseDate?: (text: string) => Date | undefined;\n}\n\n/**\n * Maps each supported editable field component to its user-facing config.\n */\ninterface EditFieldPropsByType {\n DROPDOWN: DropdownEditConfig;\n DATE_PICKER: DatePickerEditConfig;\n}\n\ntype EditFieldComponent = keyof EditFieldPropsByType;\n\n/**\n * Configuration for an editable cell's field component.\n *\n * `getFieldComponentProps` is called with the row's object and a map of any\n * pending cell edits for the same row, keyed by `columnId`. This lets the\n * configuration depend on row state or on other in-progress edits within the\n * row (e.g. dropdown items that change once another column is edited).\n */\nexport type EditFieldConfig<TData = unknown> = {\n [K in EditFieldComponent]: {\n fieldComponent: K;\n getFieldComponentProps: (\n object: TData,\n edits?: Record<string, CellEditInfo<TData, unknown>>,\n ) => EditFieldPropsByType[K];\n };\n}[EditFieldComponent];\n"],"mappings":"","ignoreList":[]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- const PACKAGE_USER_AGENT = `osdk-react-components/${"0.15.0"}`;
17
+ const PACKAGE_USER_AGENT = `osdk-react-components/${"0.16.0-main-cf496ff080ba8375b89e85ea47c2568a7caca990"}`;
18
18
  export function componentUserAgent(componentName) {
19
19
  return `${PACKAGE_USER_AGENT}/${componentName}`;
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UserAgent.js","names":["PACKAGE_USER_AGENT","componentUserAgent","componentName"],"sources":["UserAgent.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst PACKAGE_USER_AGENT =\n `osdk-react-components/${process.env.PACKAGE_VERSION}`;\n\nexport function componentUserAgent(componentName: string): string {\n return `${PACKAGE_USER_AGENT}/${componentName}`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,kBAAkB,GACtB,mCAAsD;AAExD,OAAO,SAASC,kBAAkBA,CAACC,aAAqB,EAAU;EAChE,OAAO,GAAGF,kBAAkB,IAAIE,aAAa,EAAE;AACjD","ignoreList":[]}
1
+ {"version":3,"file":"UserAgent.js","names":["PACKAGE_USER_AGENT","componentUserAgent","componentName"],"sources":["UserAgent.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst PACKAGE_USER_AGENT =\n `osdk-react-components/${process.env.PACKAGE_VERSION}`;\n\nexport function componentUserAgent(componentName: string): string {\n return `${PACKAGE_USER_AGENT}/${componentName}`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,kBAAkB,GACtB,iFAAsD;AAExD,OAAO,SAASC,kBAAkBA,CAACC,aAAqB,EAAU;EAChE,OAAO,GAAGF,kBAAkB,IAAIE,aAAa,EAAE;AACjD","ignoreList":[]}
@@ -5,7 +5,7 @@ var chunkZBJEZKOD_cjs = require('./chunk-ZBJEZKOD.cjs');
5
5
  var chunkI3OSD6CF_cjs = require('./chunk-I3OSD6CF.cjs');
6
6
  var chunkEWLPXTKT_cjs = require('./chunk-EWLPXTKT.cjs');
7
7
  var chunkZ4JDLERD_cjs = require('./chunk-Z4JDLERD.cjs');
8
- var chunkVWMSVA2B_cjs = require('./chunk-VWMSVA2B.cjs');
8
+ var chunkKOH3HIJX_cjs = require('./chunk-KOH3HIJX.cjs');
9
9
  var chunkJBRNNWYC_cjs = require('./chunk-JBRNNWYC.cjs');
10
10
  var chunk7LXS66DW_cjs = require('./chunk-7LXS66DW.cjs');
11
11
  var chunkMD4KDE44_cjs = require('./chunk-MD4KDE44.cjs');
@@ -295,6 +295,7 @@ function EditableCellInner({
295
295
  validateEdit,
296
296
  validationError,
297
297
  editFieldConfig,
298
+ rowCellEdits,
298
299
  isRowFocused = false
299
300
  }) {
300
301
  const [inputValue, setInputValue] = React14.useState(valueToString(currentValue));
@@ -383,8 +384,8 @@ function EditableCellInner({
383
384
  commitEdit(newValue);
384
385
  }, [commitEdit, currentValue]);
385
386
  const inputType = dataType && NUMBER_TYPES.includes(dataType) ? "number" : "text";
386
- const dropdownFieldProps = React14.useMemo(() => editFieldConfig?.fieldComponent === "DROPDOWN" ? editFieldConfig.getFieldComponentProps(originalRowData) : void 0, [editFieldConfig, originalRowData]);
387
- const datePickerFieldProps = React14.useMemo(() => editFieldConfig?.fieldComponent === "DATE_PICKER" ? editFieldConfig.getFieldComponentProps(originalRowData) : void 0, [editFieldConfig, originalRowData]);
387
+ const dropdownFieldProps = React14.useMemo(() => editFieldConfig?.fieldComponent === "DROPDOWN" ? editFieldConfig.getFieldComponentProps(originalRowData, rowCellEdits) : void 0, [editFieldConfig, originalRowData, rowCellEdits]);
388
+ const datePickerFieldProps = React14.useMemo(() => editFieldConfig?.fieldComponent === "DATE_PICKER" ? editFieldConfig.getFieldComponentProps(originalRowData, rowCellEdits) : void 0, [editFieldConfig, originalRowData, rowCellEdits]);
388
389
  const renderFieldInput = () => {
389
390
  switch (editFieldConfig?.fieldComponent) {
390
391
  case "DROPDOWN":
@@ -486,6 +487,17 @@ function toDisplayValue(value) {
486
487
  }
487
488
  return value;
488
489
  }
490
+ function filterCellEditsToRow(cellEdits, rowId) {
491
+ if (!cellEdits) return void 0;
492
+ let result;
493
+ for (const edit of Object.values(cellEdits)) {
494
+ if (edit.rowId === rowId) {
495
+ result ??= {};
496
+ result[edit.columnId] = edit;
497
+ }
498
+ }
499
+ return result;
500
+ }
489
501
  function renderDefaultCell(cellContext) {
490
502
  const meta = cellContext.table.options.meta;
491
503
  const columnMeta = cellContext.column.columnDef.meta;
@@ -515,12 +527,14 @@ function renderDefaultCell(cellContext) {
515
527
  const currentValue = editedValue?.newValue === void 0 ? cellValue : editedValue?.newValue;
516
528
  const validationError = meta.validationErrors?.get(cellId);
517
529
  const isRowFocused = meta.focusedRowId === rowId;
530
+ const rowCellEdits = filterCellEditsToRow(cellEdits, rowId);
518
531
  return /* @__PURE__ */ React14__default.default.createElement(EditableCell, {
519
532
  initialValue: cellValue,
520
533
  currentValue,
521
534
  cellId,
522
535
  dataType: columnMeta?.dataType,
523
536
  editFieldConfig: columnMeta?.editFieldConfig,
537
+ rowCellEdits,
524
538
  onCellEdit: meta.onCellEdit,
525
539
  onCellValidationError: meta.onCellValidationError,
526
540
  clearCellValidationError: meta.clearCellValidationError,
@@ -2867,7 +2881,7 @@ function ObjectTable({
2867
2881
  }
2868
2882
 
2869
2883
  // src/public/experimental/object-table.ts
2870
- var ObjectTable2 = chunkVWMSVA2B_cjs.withOsdkMetrics(ObjectTable, "ObjectTable");
2884
+ var ObjectTable2 = chunkKOH3HIJX_cjs.withOsdkMetrics(ObjectTable, "ObjectTable");
2871
2885
 
2872
2886
  exports.BaseTable = BaseTable;
2873
2887
  exports.ColumnConfigDialog = ColumnConfigDialog;
@@ -2875,5 +2889,5 @@ exports.LoadingCell = LoadingCell;
2875
2889
  exports.LoadingCellContent = LoadingCellContent;
2876
2890
  exports.MultiColumnSortDialog = MultiColumnSortDialog;
2877
2891
  exports.ObjectTable = ObjectTable2;
2878
- //# sourceMappingURL=chunk-4MKY6RU2.cjs.map
2879
- //# sourceMappingURL=chunk-4MKY6RU2.cjs.map
2892
+ //# sourceMappingURL=chunk-JLSIIL5M.cjs.map
2893
+ //# sourceMappingURL=chunk-JLSIIL5M.cjs.map