@osdk/react-components 0.2.0-beta.10 → 0.2.0-beta.11

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 (102) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/browser/object-table/DefaultCellRenderer.js +5 -2
  3. package/build/browser/object-table/DefaultCellRenderer.js.map +1 -1
  4. package/build/browser/object-table/EditableCell.js +16 -6
  5. package/build/browser/object-table/EditableCell.js.map +1 -1
  6. package/build/browser/object-table/EditableCell.module.css +30 -2
  7. package/build/browser/object-table/EditableCell.module.css.js +2 -1
  8. package/build/browser/object-table/ObjectTable.js +9 -22
  9. package/build/browser/object-table/ObjectTable.js.map +1 -1
  10. package/build/browser/object-table/ObjectTableApi.js.map +1 -1
  11. package/build/browser/object-table/Table.js +23 -15
  12. package/build/browser/object-table/Table.js.map +1 -1
  13. package/build/browser/object-table/Table.module.css +0 -8
  14. package/build/browser/object-table/Table.module.css.js +1 -2
  15. package/build/browser/object-table/TableBody.js +8 -2
  16. package/build/browser/object-table/TableBody.js.map +1 -1
  17. package/build/browser/object-table/TableCell.module.css +0 -8
  18. package/build/browser/object-table/TableEditContainer.js +79 -0
  19. package/build/browser/object-table/TableEditContainer.js.map +1 -0
  20. package/build/browser/object-table/TableEditContainer.module.css +44 -0
  21. package/build/browser/object-table/TableEditContainer.module.css.js +9 -0
  22. package/build/browser/object-table/TableRow.js +12 -4
  23. package/build/browser/object-table/TableRow.js.map +1 -1
  24. package/build/browser/object-table/TableRow.module.css +2 -1
  25. package/build/browser/object-table/hooks/__tests__/useEditableTable.test.js +292 -0
  26. package/build/browser/object-table/hooks/__tests__/useEditableTable.test.js.map +1 -0
  27. package/build/browser/object-table/hooks/useEditableTable.js +20 -11
  28. package/build/browser/object-table/hooks/useEditableTable.js.map +1 -1
  29. package/build/browser/object-table/hooks/useObjectTableData.js +0 -5
  30. package/build/browser/object-table/hooks/useObjectTableData.js.map +1 -1
  31. package/build/browser/object-table/utils/getCellId.js +0 -7
  32. package/build/browser/object-table/utils/getCellId.js.map +1 -1
  33. package/build/browser/object-table/utils/types.js.map +1 -1
  34. package/build/browser/public/experimental.js.map +1 -1
  35. package/build/browser/styles.css +79 -19
  36. package/build/cjs/public/experimental.cjs +179 -90
  37. package/build/cjs/public/experimental.cjs.map +1 -1
  38. package/build/cjs/public/experimental.css +96 -57
  39. package/build/cjs/public/experimental.css.map +1 -1
  40. package/build/cjs/public/experimental.d.cts +40 -18
  41. package/build/esm/object-table/DefaultCellRenderer.js +5 -2
  42. package/build/esm/object-table/DefaultCellRenderer.js.map +1 -1
  43. package/build/esm/object-table/EditableCell.js +16 -6
  44. package/build/esm/object-table/EditableCell.js.map +1 -1
  45. package/build/esm/object-table/EditableCell.module.css +30 -2
  46. package/build/esm/object-table/ObjectTable.js +9 -22
  47. package/build/esm/object-table/ObjectTable.js.map +1 -1
  48. package/build/esm/object-table/ObjectTableApi.js.map +1 -1
  49. package/build/esm/object-table/Table.js +23 -15
  50. package/build/esm/object-table/Table.js.map +1 -1
  51. package/build/esm/object-table/Table.module.css +0 -8
  52. package/build/esm/object-table/TableBody.js +8 -2
  53. package/build/esm/object-table/TableBody.js.map +1 -1
  54. package/build/esm/object-table/TableCell.module.css +0 -8
  55. package/build/esm/object-table/TableEditContainer.js +79 -0
  56. package/build/esm/object-table/TableEditContainer.js.map +1 -0
  57. package/build/esm/object-table/TableEditContainer.module.css +44 -0
  58. package/build/esm/object-table/TableRow.js +12 -4
  59. package/build/esm/object-table/TableRow.js.map +1 -1
  60. package/build/esm/object-table/TableRow.module.css +2 -1
  61. package/build/esm/object-table/hooks/__tests__/useEditableTable.test.js +292 -0
  62. package/build/esm/object-table/hooks/__tests__/useEditableTable.test.js.map +1 -0
  63. package/build/esm/object-table/hooks/useEditableTable.js +20 -11
  64. package/build/esm/object-table/hooks/useEditableTable.js.map +1 -1
  65. package/build/esm/object-table/hooks/useObjectTableData.js +0 -5
  66. package/build/esm/object-table/hooks/useObjectTableData.js.map +1 -1
  67. package/build/esm/object-table/utils/getCellId.js +0 -7
  68. package/build/esm/object-table/utils/getCellId.js.map +1 -1
  69. package/build/esm/object-table/utils/types.js.map +1 -1
  70. package/build/esm/public/experimental.js.map +1 -1
  71. package/build/types/object-table/DefaultCellRenderer.d.ts +2 -2
  72. package/build/types/object-table/DefaultCellRenderer.d.ts.map +1 -1
  73. package/build/types/object-table/EditableCell.d.ts +18 -6
  74. package/build/types/object-table/EditableCell.d.ts.map +1 -1
  75. package/build/types/object-table/ObjectTable.d.ts +1 -1
  76. package/build/types/object-table/ObjectTable.d.ts.map +1 -1
  77. package/build/types/object-table/ObjectTableApi.d.ts +16 -6
  78. package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
  79. package/build/types/object-table/Table.d.ts +5 -10
  80. package/build/types/object-table/Table.d.ts.map +1 -1
  81. package/build/types/object-table/TableBody.d.ts +4 -1
  82. package/build/types/object-table/TableBody.d.ts.map +1 -1
  83. package/build/types/object-table/TableEditContainer.d.ts +9 -0
  84. package/build/types/object-table/TableEditContainer.d.ts.map +1 -0
  85. package/build/types/object-table/TableRow.d.ts +5 -1
  86. package/build/types/object-table/TableRow.d.ts.map +1 -1
  87. package/build/types/object-table/hooks/__tests__/useEditableTable.test.d.ts.map +1 -0
  88. package/build/types/object-table/hooks/useEditableTable.d.ts +4 -9
  89. package/build/types/object-table/hooks/useEditableTable.d.ts.map +1 -1
  90. package/build/types/object-table/utils/getCellId.d.ts +0 -1
  91. package/build/types/object-table/utils/getCellId.d.ts.map +1 -1
  92. package/build/types/object-table/utils/types.d.ts +25 -3
  93. package/build/types/object-table/utils/types.d.ts.map +1 -1
  94. package/build/types/public/experimental.d.ts +1 -1
  95. package/build/types/public/experimental.d.ts.map +1 -1
  96. package/package.json +5 -5
  97. package/build/browser/object-table/__tests__/useEditableTable.test.js +0 -197
  98. package/build/browser/object-table/__tests__/useEditableTable.test.js.map +0 -1
  99. package/build/esm/object-table/__tests__/useEditableTable.test.js +0 -197
  100. package/build/esm/object-table/__tests__/useEditableTable.test.js.map +0 -1
  101. package/build/types/object-table/__tests__/useEditableTable.test.d.ts.map +0 -1
  102. /package/build/types/object-table/{__tests__ → hooks/__tests__}/useEditableTable.test.d.ts +0 -0
@@ -77,8 +77,6 @@ export function useObjectTableData(objectOrInterfaceType, columnDefinitions, fil
77
77
 
78
78
  // Return the appropriate result based on which hook is enabled
79
79
  if (shouldUseObjectSet) {
80
- // eslint-disable-next-line no-console
81
- console.debug("Using useObjectSet for data fetching in ObjectTable because objectSet is provided and objectType is an object.");
82
80
  // Convert UseObjectSetResult to UseOsdkListResult format
83
81
  return {
84
82
  data: objectSetResult.data,
@@ -89,9 +87,6 @@ export function useObjectTableData(objectOrInterfaceType, columnDefinitions, fil
89
87
  isOptimistic: false // ObjectSet doesn't support optimistic updates
90
88
  };
91
89
  }
92
-
93
- // eslint-disable-next-line no-console
94
- console.debug("Using useOsdkObjects for data fetching in ObjectTable because objectSet is not provided or objectType is an interface.");
95
90
  return osdkObjectsResult;
96
91
  }
97
92
  //# sourceMappingURL=useObjectTableData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useObjectTableData.js","names":["useObjectSet","useOsdkObjects","useMemo","PAGE_SIZE","useObjectTableData","objectOrInterfaceType","columnDefinitions","filter","sorting","objectSet","objectSetOptions","orderBy","length","undefined","reduce","acc","sort","id","desc","withProperties","rdpColumns","map","colDef","locator","colLocator","type","cur","creator","isObjectType","shouldUseObjectSet","objectSetResult","where","pageSize","enabled","osdkObjectsResult","console","debug","data","fetchMore","isLoading","error","totalCount","isOptimistic"],"sources":["useObjectTableData.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 DerivedProperty,\n ObjectOrInterfaceDefinition,\n ObjectSet,\n PropertyKeys,\n QueryDefinition,\n SimplePropertyDef,\n WhereClause,\n} from \"@osdk/api\";\nimport type { UseOsdkListResult } from \"@osdk/react/experimental\";\nimport { useObjectSet, useOsdkObjects } from \"@osdk/react/experimental\";\nimport type { SortingState } from \"@tanstack/react-table\";\nimport { useMemo } from \"react\";\nimport type { ColumnDefinition, ObjectSetOptions } from \"../ObjectTableApi.js\";\n\nconst PAGE_SIZE = 50;\n\ntype WithProperties<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<\n string,\n never\n >,\n> = {\n [K in keyof RDPs]: DerivedProperty.Creator<Q, RDPs[K]>;\n};\n/**\n * This hook is a wrapper that conditionally uses either useObjectSet or useOsdkObjects\n * based on whether an objectSet prop is provided.\n * It extracts RDP locators from columnDefinitions and applies withProperties\n * to return data containing the derived properties.\n */\nexport function useObjectTableData<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<\n string,\n never\n >,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n>(\n objectOrInterfaceType: Q,\n columnDefinitions?: Array<ColumnDefinition<Q, RDPs, FunctionColumns>>,\n filter?: WhereClause<Q, RDPs>,\n sorting?: SortingState,\n objectSet?: ObjectSet<Q>,\n objectSetOptions?: ObjectSetOptions<Q>,\n): UseOsdkListResult<Q, RDPs> {\n const orderBy = useMemo(() => {\n if (!sorting || sorting.length === 0) {\n return undefined;\n }\n\n return sorting.reduce<{ [K in PropertyKeys<Q>]?: \"asc\" | \"desc\" }>(\n (acc, sort) => {\n acc[sort.id as PropertyKeys<Q>] = sort.desc ? \"desc\" : \"asc\";\n return acc;\n },\n {},\n );\n }, [sorting]);\n\n // Extract derived properties definition\n const withProperties = useMemo(() => {\n if (!columnDefinitions) {\n return;\n }\n\n const rdpColumns = columnDefinitions.map(colDef => colDef.locator).filter(\n (colLocator) => {\n return colLocator.type === \"rdp\";\n },\n );\n\n if (!rdpColumns.length) {\n return;\n }\n\n return rdpColumns.reduce<WithProperties<Q, RDPs>>(\n (acc, cur) => {\n return {\n ...acc,\n [cur.id]: cur.creator,\n };\n },\n {} as WithProperties<Q, RDPs>,\n );\n }, [columnDefinitions]);\n\n // When objectSet is provided and it's an object type, use useObjectSet. Otherwise, use useOsdkObjects.\n const isObjectType = objectOrInterfaceType.type === \"object\";\n const shouldUseObjectSet = !!objectSet && isObjectType;\n\n // When shouldUseObjectSet is true, we know objectSet is defined\n // and objectOrInterfaceType is an ObjectTypeDefinition\n const objectSetResult = useObjectSet(\n shouldUseObjectSet ? objectSet as ObjectSet<Q> : undefined as any,\n {\n ...(objectSetOptions as ObjectSetOptions<Q>),\n withProperties: withProperties as WithProperties<\n Q,\n RDPs\n >,\n where: filter,\n orderBy,\n pageSize: PAGE_SIZE,\n enabled: shouldUseObjectSet,\n },\n );\n\n const osdkObjectsResult = useOsdkObjects<\n Q,\n RDPs\n >(\n objectOrInterfaceType,\n {\n withProperties,\n pageSize: PAGE_SIZE,\n where: filter,\n orderBy,\n enabled: !shouldUseObjectSet,\n },\n );\n\n // Return the appropriate result based on which hook is enabled\n if (shouldUseObjectSet) {\n // eslint-disable-next-line no-console\n console.debug(\n \"Using useObjectSet for data fetching in ObjectTable because objectSet is provided and objectType is an object.\",\n );\n // Convert UseObjectSetResult to UseOsdkListResult format\n return {\n data: objectSetResult.data,\n fetchMore: objectSetResult.fetchMore,\n isLoading: objectSetResult.isLoading,\n error: objectSetResult.error,\n totalCount: objectSetResult.totalCount,\n isOptimistic: false, // ObjectSet doesn't support optimistic updates\n } as UseOsdkListResult<Q, RDPs>;\n }\n\n // eslint-disable-next-line no-console\n console.debug(\n \"Using useOsdkObjects for data fetching in ObjectTable because objectSet is not provided or objectType is an interface.\",\n );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S,GAAG,CAACC;MAChB,CAAC;IACH,CAAC,EACD,CAAC,CACH,CAAC;EACH,CAAC,EAAE,CAACrB,iBAAiB,CAAC,CAAC;;EAEvB;EACA,MAAMsB,YAAY,GAAGvB,qBAAqB,CAACoB,IAAI,KAAK,QAAQ;EAC5D,MAAMI,kBAAkB,GAAG,CAAC,CAACpB,SAAS,IAAImB,YAAY;;EAEtD;EACA;EACA,MAAME,eAAe,GAAG9B,YAAY,CAClC6B,kBAAkB,GAAGpB,SAAS,GAAmBI,SAAgB,EACjE;IACE,GAAIH,gBAAwC;IAC5CS,cAAc,EAAEA,cAGf;IACDY,KAAK,EAAExB,MAAM;IACbI,OAAO;IACPqB,QAAQ,EAAE7B,SAAS;IACnB8B,OAAO,EAAEJ;EACX,CACF,CAAC;EAED,MAAMK,iBAAiB,GAAGjC,cAAc,CAItCI,qBAAqB,EACrB;IACEc,cAAc;IACda,QAAQ,EAAE7B,SAAS;IACnB4B,KAAK,EAAExB,MAAM;IACbI,OAAO;IACPsB,OAAO,EAAE,CAACJ;EACZ,CACF,CAAC;;EAED;EACA,IAAIA,kBAAkB,EAAE;IACtB;IACAM,OAAO,CAACC,KAAK,CACX,gHACF,CAAC;IACD;IACA,OAAO;MACLC,IAAI,EAAEP,eAAe,CAACO,IAAI;MAC1BC,SAAS,EAAER,eAAe,CAACQ,SAAS;MACpCC,SAAS,EAAET,eAAe,CAACS,SAAS;MACpCC,KAAK,EAAEV,eAAe,CAACU,KAAK;MAC5BC,UAAU,EAAEX,eAAe,CAACW,UAAU;MACtCC,YAAY,EAAE,KAAK,CAAE;IACvB,CAAC;EACH;;EAEA;EACAP,OAAO,CAACC,KAAK,CACX,wHACF,CAAC;EACD,OAAOF,iBAAiB;AAC1B","ignoreList":[]}
1
+ {"version":3,"file":"useObjectTableData.js","names":["useObjectSet","useOsdkObjects","useMemo","PAGE_SIZE","useObjectTableData","objectOrInterfaceType","columnDefinitions","filter","sorting","objectSet","objectSetOptions","orderBy","length","undefined","reduce","acc","sort","id","desc","withProperties","rdpColumns","map","colDef","locator","colLocator","type","cur","creator","isObjectType","shouldUseObjectSet","objectSetResult","where","pageSize","enabled","osdkObjectsResult","data","fetchMore","isLoading","error","totalCount","isOptimistic"],"sources":["useObjectTableData.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 DerivedProperty,\n ObjectOrInterfaceDefinition,\n ObjectSet,\n PropertyKeys,\n QueryDefinition,\n SimplePropertyDef,\n WhereClause,\n} from \"@osdk/api\";\nimport type { UseOsdkListResult } from \"@osdk/react/experimental\";\nimport { useObjectSet, useOsdkObjects } from \"@osdk/react/experimental\";\nimport type { SortingState } from \"@tanstack/react-table\";\nimport { useMemo } from \"react\";\nimport type { ColumnDefinition, ObjectSetOptions } from \"../ObjectTableApi.js\";\n\nconst PAGE_SIZE = 50;\n\ntype WithProperties<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<\n string,\n never\n >,\n> = {\n [K in keyof RDPs]: DerivedProperty.Creator<Q, RDPs[K]>;\n};\n/**\n * This hook is a wrapper that conditionally uses either useObjectSet or useOsdkObjects\n * based on whether an objectSet prop is provided.\n * It extracts RDP locators from columnDefinitions and applies withProperties\n * to return data containing the derived properties.\n */\nexport function useObjectTableData<\n Q extends ObjectOrInterfaceDefinition,\n RDPs extends Record<string, SimplePropertyDef> = Record<\n string,\n never\n >,\n FunctionColumns extends Record<string, QueryDefinition<{}>> = Record<\n string,\n never\n >,\n>(\n objectOrInterfaceType: Q,\n columnDefinitions?: Array<ColumnDefinition<Q, RDPs, FunctionColumns>>,\n filter?: WhereClause<Q, RDPs>,\n sorting?: SortingState,\n objectSet?: ObjectSet<Q>,\n objectSetOptions?: ObjectSetOptions<Q>,\n): UseOsdkListResult<Q, RDPs> {\n const orderBy = useMemo(() => {\n if (!sorting || sorting.length === 0) {\n return undefined;\n }\n\n return sorting.reduce<{ [K in PropertyKeys<Q>]?: \"asc\" | \"desc\" }>(\n (acc, sort) => {\n acc[sort.id as PropertyKeys<Q>] = sort.desc ? \"desc\" : \"asc\";\n return acc;\n },\n {},\n );\n }, [sorting]);\n\n // Extract derived properties definition\n const withProperties = useMemo(() => {\n if (!columnDefinitions) {\n return;\n }\n\n const rdpColumns = columnDefinitions.map(colDef => colDef.locator).filter(\n (colLocator) => {\n return colLocator.type === \"rdp\";\n },\n );\n\n if (!rdpColumns.length) {\n return;\n }\n\n return rdpColumns.reduce<WithProperties<Q, RDPs>>(\n (acc, cur) => {\n return {\n ...acc,\n [cur.id]: cur.creator,\n };\n },\n {} as WithProperties<Q, RDPs>,\n );\n }, [columnDefinitions]);\n\n // When objectSet is provided and it's an object type, use useObjectSet. Otherwise, use useOsdkObjects.\n const isObjectType = objectOrInterfaceType.type === \"object\";\n const shouldUseObjectSet = !!objectSet && isObjectType;\n\n // When shouldUseObjectSet is true, we know objectSet is defined\n // and objectOrInterfaceType is an ObjectTypeDefinition\n const objectSetResult = useObjectSet(\n shouldUseObjectSet ? objectSet as ObjectSet<Q> : undefined as any,\n {\n ...(objectSetOptions as ObjectSetOptions<Q>),\n withProperties: withProperties as WithProperties<\n Q,\n RDPs\n >,\n where: filter,\n orderBy,\n pageSize: PAGE_SIZE,\n enabled: shouldUseObjectSet,\n },\n );\n\n const osdkObjectsResult = useOsdkObjects<\n Q,\n RDPs\n >(\n objectOrInterfaceType,\n {\n withProperties,\n pageSize: PAGE_SIZE,\n where: filter,\n orderBy,\n enabled: !shouldUseObjectSet,\n },\n );\n\n // Return the appropriate result based on which hook is enabled\n if (shouldUseObjectSet) {\n // Convert UseObjectSetResult to UseOsdkListResult format\n return {\n data: objectSetResult.data,\n fetchMore: objectSetResult.fetchMore,\n isLoading: objectSetResult.isLoading,\n error: objectSetResult.error,\n totalCount: objectSetResult.totalCount,\n isOptimistic: false, // ObjectSet doesn't support optimistic updates\n } as UseOsdkListResult<Q, RDPs>;\n }\n\n return osdkObjectsResult;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,SAASA,YAAY,EAAEC,cAAc,QAAQ,0BAA0B;AAEvE,SAASC,OAAO,QAAQ,OAAO;AAG/B,MAAMC,SAAS,GAAG,EAAE;AAWpB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAWhCC,qBAAwB,EACxBC,iBAAqE,EACrEC,MAA6B,EAC7BC,OAAsB,EACtBC,SAAwB,EACxBC,gBAAsC,EACV;EAC5B,MAAMC,OAAO,GAAGT,OAAO,CAAC,MAAM;IAC5B,IAAI,CAACM,OAAO,IAAIA,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;MACpC,OAAOC,SAAS;IAClB;IAEA,OAAOL,OAAO,CAACM,MAAM,CACnB,CAACC,GAAG,EAAEC,IAAI,KAAK;MACbD,GAAG,CAACC,IAAI,CAACC,EAAE,CAAoB,GAAGD,IAAI,CAACE,IAAI,GAAG,MAAM,GAAG,KAAK;MAC5D,OAAOH,GAAG;IACZ,CAAC,EACD,CAAC,CACH,CAAC;EACH,CAAC,EAAE,CAACP,OAAO,CAAC,CAAC;;EAEb;EACA,MAAMW,cAAc,GAAGjB,OAAO,CAAC,MAAM;IACnC,IAAI,CAACI,iBAAiB,EAAE;MACtB;IACF;IAEA,MAAMc,UAAU,GAAGd,iBAAiB,CAACe,GAAG,CAACC,MAAM,IAAIA,MAAM,CAACC,OAAO,CAAC,CAAChB,MAAM,CACtEiB,UAAU,IAAK;MACd,OAAOA,UAAU,CAAC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@@
17
17
  export function getCellId(cellIdentifier) {
18
18
  return JSON.stringify(cellIdentifier);
19
19
  }
20
- export function getCellIdentifier(cellId) {
21
- const parsed = JSON.parse(cellId);
22
- if (typeof parsed === "object" && parsed != null && "rowId" in parsed && "columnId" in parsed) {
23
- return parsed;
24
- }
25
- throw new Error("Parsed cellId does not have required properties");
26
- }
27
20
  //# sourceMappingURL=getCellId.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCellId.js","names":["getCellId","cellIdentifier","JSON","stringify","getCellIdentifier","cellId","parsed","parse","Error"],"sources":["getCellId.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 { CellIdentifier } from \"./types.js\";\n\nexport function getCellId(cellIdentifier: CellIdentifier): string {\n return JSON.stringify(cellIdentifier);\n}\n\nexport function getCellIdentifier(cellId: string): CellIdentifier {\n const parsed = JSON.parse(cellId);\n if (\n typeof parsed === \"object\" && parsed != null && \"rowId\" in parsed\n && \"columnId\" in parsed\n ) {\n return parsed as CellIdentifier;\n }\n throw new Error(\"Parsed cellId does not have required properties\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,SAASA,SAASA,CAACC,cAA8B,EAAU;EAChE,OAAOC,IAAI,CAACC,SAAS,CAACF,cAAc,CAAC;AACvC;AAEA,OAAO,SAASG,iBAAiBA,CAACC,MAAc,EAAkB;EAChE,MAAMC,MAAM,GAAGJ,IAAI,CAACK,KAAK,CAACF,MAAM,CAAC;EACjC,IACE,OAAOC,MAAM,KAAK,QAAQ,IAAIA,MAAM,IAAI,IAAI,IAAI,OAAO,IAAIA,MAAM,IAC9D,UAAU,IAAIA,MAAM,EACvB;IACA,OAAOA,MAAM;EACf;EACA,MAAM,IAAIE,KAAK,CAAC,iDAAiD,CAAC;AACpE","ignoreList":[]}
1
+ {"version":3,"file":"getCellId.js","names":["getCellId","cellIdentifier","JSON","stringify"],"sources":["getCellId.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 { CellIdentifier } from \"./types.js\";\n\nexport function getCellId(cellIdentifier: CellIdentifier): string {\n return JSON.stringify(cellIdentifier);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,SAASA,SAASA,CAACC,cAA8B,EAAU;EAChE,OAAOC,IAAI,CAACC,SAAS,CAACF,cAAc,CAAC;AACvC","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 CellValueState<TData extends RowData = unknown> {\n newValue: TData;\n oldValue: TData;\n}\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;\n oldValue: CellValue;\n originalRowData: TData;\n}\n\nexport type EditMode =\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 editMode: EditMode;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"experimental.js","names":["FilterList","ObjectTable","BaseTable","ColumnConfigDialog"],"sources":["experimental.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\nexport { FilterList } from \"../filter-list/base/FilterList.js\";\nexport type {\n FilterDefinitionUnion,\n FilterListProps,\n} from \"../filter-list/FilterListApi.js\";\nexport type {\n FilterComponentType,\n FilterListItemProps,\n FilterState,\n PropertyFilterDefinition,\n} from \"../filter-list/FilterListItemApi.js\";\n\n// ObjectTable that loads and displays data for a given objectSet\nexport { ObjectTable } from \"../object-table/ObjectTable.js\";\nexport type {\n ColumnDefinition,\n ColumnDefinitionLocator,\n ObjectTableProps,\n} from \"../object-table/ObjectTableApi.js\";\nexport type {\n CellIdentifier,\n CellValueState,\n} from \"../object-table/utils/types.js\";\n\n// BaseTable that does not handle data fetching\nexport type { BaseTableProps } from \"../object-table/Table.js\";\nexport { BaseTable } from \"../object-table/Table.js\";\n\nexport { ColumnConfigDialog } from \"../object-table/ColumnConfigDialog.js\";\nexport type {\n ColumnConfigDialogProps,\n ColumnConfigOptions,\n} from \"../object-table/ColumnConfigDialog.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,mCAAmC;AAY9D;AACA,SAASC,WAAW,QAAQ,gCAAgC;;AAW5D;;AAEA,SAASC,SAAS,QAAQ,0BAA0B;AAEpD,SAASC,kBAAkB,QAAQ,uCAAuC","ignoreList":[]}
1
+ {"version":3,"file":"experimental.js","names":["FilterList","ObjectTable","BaseTable","ColumnConfigDialog"],"sources":["experimental.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\nexport { FilterList } from \"../filter-list/base/FilterList.js\";\nexport type {\n FilterDefinitionUnion,\n FilterListProps,\n} from \"../filter-list/FilterListApi.js\";\nexport type {\n FilterComponentType,\n FilterListItemProps,\n FilterState,\n PropertyFilterDefinition,\n} from \"../filter-list/FilterListItemApi.js\";\n\n// ObjectTable that loads and displays data for a given objectSet\nexport { ObjectTable } from \"../object-table/ObjectTable.js\";\nexport type {\n ColumnDefinition,\n ColumnDefinitionLocator,\n ObjectTableProps,\n} from \"../object-table/ObjectTableApi.js\";\nexport type { CellEditInfo } from \"../object-table/utils/types.js\";\n\n// BaseTable that does not handle data fetching\nexport type { BaseTableProps } from \"../object-table/Table.js\";\nexport { BaseTable } from \"../object-table/Table.js\";\n\nexport { ColumnConfigDialog } from \"../object-table/ColumnConfigDialog.js\";\nexport type {\n ColumnConfigDialogProps,\n ColumnConfigOptions,\n} from \"../object-table/ColumnConfigDialog.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,mCAAmC;AAY9D;AACA,SAASC,WAAW,QAAQ,gCAAgC;;AAQ5D;;AAEA,SAASC,SAAS,QAAQ,0BAA0B;AAEpD,SAASC,kBAAkB,QAAQ,uCAAuC","ignoreList":[]}
@@ -2217,8 +2217,36 @@
2217
2217
 
2218
2218
 
2219
2219
  /* object-table/EditableCell.module.css */
2220
- .EditableCell-module__osdkEditableInput___2BjN5Q4P:focus {
2221
- outline: none;
2220
+ .EditableCell-module__osdkEditableInput___2BjN5Q4P {
2221
+ overflow: hidden;
2222
+ text-overflow: ellipsis;
2223
+ white-space: nowrap;
2224
+ text-align: left;
2225
+ padding: var(--osdk-surface-spacing) calc(var(--osdk-surface-spacing) * 3);
2226
+ width: 100%;
2227
+ border-radius: var(--osdk-surface-border-radius);
2228
+ border: var(--osdk-surface-border-width) solid transparent;
2229
+ background: inherit;
2230
+
2231
+ tr[data-focused="true"] & {
2232
+ border: var(--osdk-table-cell-editable-border);
2233
+ background: var(--osdk-table-cell-editable-bg);
2234
+
2235
+ &.EditableCell-module__osdkEditedInput___HxzrAqJz {
2236
+ border: var(--osdk-table-cell-edited-border);
2237
+ }
2238
+
2239
+ &:focus,
2240
+ &.EditableCell-module__osdkEditedInput___HxzrAqJz:focus {
2241
+ border: var(--osdk-emphasis-focus-width) solid
2242
+ var(--osdk-emphasis-focus-color);
2243
+ }
2244
+ }
2245
+ }
2246
+
2247
+ .EditableCell-module__osdkEditedInput___HxzrAqJz {
2248
+ border: var(--osdk-table-cell-edited-border);
2249
+ background: var(--osdk-table-cell-editable-bg);
2222
2250
  }
2223
2251
 
2224
2252
 
@@ -2540,14 +2568,6 @@
2540
2568
  min-width: 100%;
2541
2569
  }
2542
2570
 
2543
- .Table-module__submitButtonContainer___2UgcHhXl {
2544
- background-color: var(--osdk-surface-background-color-default-rest);
2545
- border-top: var(--osdk-table-border);
2546
- padding: var(--osdk-table-button-container-padding);
2547
- display: flex;
2548
- justify-content: flex-end;
2549
- }
2550
-
2551
2571
 
2552
2572
  /* object-table/TableBody.module.css */
2553
2573
  /*
@@ -2636,14 +2656,6 @@
2636
2656
  padding: 0;
2637
2657
  }
2638
2658
 
2639
- /* Show focus state for editable cells */
2640
- .TableCell-module__osdkTableCell___gVl6jToJ:not(:has([role="checkbox"])):has(input):focus-within {
2641
- border: var(--osdk-emphasis-focus-width) solid
2642
- var(--osdk-emphasis-focus-color);
2643
- border-radius: var(--osdk-surface-border-radius);
2644
- background-color: var(--osdk-table-cell-editable-bg);
2645
- }
2646
-
2647
2659
  .TableCell-module__osdkTableCellContent___tcj6DRaU:not(:has([role="checkbox"])) {
2648
2660
  overflow: hidden;
2649
2661
  text-overflow: ellipsis;
@@ -2660,6 +2672,53 @@
2660
2672
  }
2661
2673
 
2662
2674
 
2675
+ /* object-table/TableEditContainer.module.css */
2676
+ /*
2677
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
2678
+ *
2679
+ * Licensed under the Apache License, Version 2.0 (the "License");
2680
+ * you may not use this file except in compliance with the License.
2681
+ * You may obtain a copy of the License at
2682
+ *
2683
+ * http://www.apache.org/licenses/LICENSE-2.0
2684
+ *
2685
+ * Unless required by applicable law or agreed to in writing, software
2686
+ * distributed under the License is distributed on an "AS IS" BASIS,
2687
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2688
+ * See the License for the specific language governing permissions and
2689
+ * limitations under the License.
2690
+ */
2691
+
2692
+ .TableEditContainer-module__tableEditContainer___cIVjgtld {
2693
+ display: flex;
2694
+ justify-content: space-between;
2695
+ align-items: center;
2696
+ background-color: var(--osdk-surface-background-color-default-rest);
2697
+ border-top: var(--osdk-table-border);
2698
+ padding: var(--osdk-table-edit-container-padding);
2699
+ min-height: var(--osdk-table-edit-container-min-height);
2700
+ }
2701
+
2702
+ .TableEditContainer-module__placeholder___ggxoxvTp {
2703
+ color: var(--osdk-typography-color-muted);
2704
+ font-size: var(--osdk-typography-size-body-small);
2705
+ padding: calc(var(--osdk-surface-spacing) * 2) 0;
2706
+ }
2707
+
2708
+ .TableEditContainer-module__modificationCount___sLN93v77 {
2709
+ color: var(--osdk-intent-primary-rest);
2710
+ font-size: var(--osdk-typography-size-body-small);
2711
+ padding: calc(var(--osdk-surface-spacing) * 2) 0;
2712
+ }
2713
+
2714
+ .TableEditContainer-module__editButtons___xI-Z7kz1 {
2715
+ display: flex;
2716
+ justify-content: flex-end;
2717
+ gap: 8px;
2718
+ flex: 1;
2719
+ }
2720
+
2721
+
2663
2722
  /* object-table/TableHeader.module.css */
2664
2723
  /*
2665
2724
  * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
@@ -2996,7 +3055,8 @@
2996
3055
  border-bottom-color: var(--osdk-table-row-border-color-hover);
2997
3056
  }
2998
3057
 
2999
- &[data-selected="true"] {
3058
+ &[data-selected="true"],
3059
+ &[data-focused="true"] {
3000
3060
  z-index: 2;
3001
3061
  background-color: var(--osdk-table-row-bg-active);
3002
3062
  border-top-color: var(--osdk-table-row-border-color-active);