@osdk/react-components 0.9.0 → 0.10.0-main-b355bc3b41a4d89ec093054dc8d2845c772ef1e2

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 +14 -0
  2. package/README.md +23 -0
  3. package/build/browser/action-form/FormFieldApi.js +8 -0
  4. package/build/browser/action-form/FormFieldApi.js.map +1 -1
  5. package/build/browser/action-form/fields/AsyncDropdownField.js +81 -0
  6. package/build/browser/action-form/fields/AsyncDropdownField.js.map +1 -0
  7. package/build/browser/action-form/fields/AsyncDropdownField.module.css +31 -0
  8. package/build/browser/action-form/fields/AsyncDropdownField.module.css.js +8 -0
  9. package/build/browser/action-form/fields/DropdownField.js +29 -14
  10. package/build/browser/action-form/fields/DropdownField.js.map +1 -1
  11. package/build/browser/action-form/fields/FormFieldRenderer.js +17 -0
  12. package/build/browser/action-form/fields/FormFieldRenderer.js.map +1 -1
  13. package/build/browser/action-form/fields/ObjectSelectField.js +109 -0
  14. package/build/browser/action-form/fields/ObjectSelectField.js.map +1 -0
  15. package/build/browser/action-form/utils/getDefaultFieldDefinitions.js +14 -5
  16. package/build/browser/action-form/utils/getDefaultFieldDefinitions.js.map +1 -1
  17. package/build/browser/base-components/combobox/Combobox.module.css +23 -2
  18. package/build/browser/base-components/combobox/Combobox.module.css.js +3 -3
  19. package/build/browser/filter-list/base/inputs/TextTagsInput.js.map +1 -1
  20. package/build/browser/shared/hooks/useDebouncedValue.js +35 -0
  21. package/build/browser/shared/hooks/useDebouncedValue.js.map +1 -0
  22. package/build/browser/shared/hooks/useEventCallback.js +44 -0
  23. package/build/browser/shared/hooks/useEventCallback.js.map +1 -0
  24. package/build/browser/shared/hooks/useInfiniteScroll.js +81 -0
  25. package/build/browser/shared/hooks/useInfiniteScroll.js.map +1 -0
  26. package/build/browser/styles.css +73 -2
  27. package/build/browser/tokens/component-tokens/async-dropdown.css +16 -0
  28. package/build/browser/tokens.css +1 -0
  29. package/build/browser/util/UserAgent.js +1 -1
  30. package/build/browser/util/UserAgent.js.map +1 -1
  31. package/build/cjs/{chunk-EEES66LS.cjs → chunk-5DVHLBWS.cjs} +3 -3
  32. package/build/cjs/chunk-5DVHLBWS.cjs.map +1 -0
  33. package/build/cjs/{chunk-OXP3XQE4.cjs → chunk-ALZS624H.cjs} +47 -47
  34. package/build/cjs/{chunk-OXP3XQE4.cjs.map → chunk-ALZS624H.cjs.map} +1 -1
  35. package/build/cjs/{chunk-UEY63J2G.cjs → chunk-FURJRQWI.cjs} +9 -9
  36. package/build/cjs/{chunk-UEY63J2G.cjs.map → chunk-FURJRQWI.cjs.map} +1 -1
  37. package/build/cjs/{chunk-RY2GVYT2.cjs → chunk-MVNWOKH2.cjs} +49 -36
  38. package/build/cjs/chunk-MVNWOKH2.cjs.map +1 -0
  39. package/build/cjs/{chunk-O5ZAMFDU.cjs → chunk-QWFJF7IM.cjs} +468 -207
  40. package/build/cjs/chunk-QWFJF7IM.cjs.map +1 -0
  41. package/build/cjs/{chunk-2FPKTOPE.cjs → chunk-XBXC6VAS.cjs} +2 -2
  42. package/build/cjs/{chunk-2FPKTOPE.cjs.map → chunk-XBXC6VAS.cjs.map} +1 -1
  43. package/build/cjs/{chunk-SHTQGKS5.cjs → chunk-Z3CXMFCZ.cjs} +4 -4
  44. package/build/cjs/{chunk-SHTQGKS5.cjs.map → chunk-Z3CXMFCZ.cjs.map} +1 -1
  45. package/build/cjs/public/experimental/action-form.cjs +6 -6
  46. package/build/cjs/public/experimental/action-form.css +24 -1
  47. package/build/cjs/public/experimental/action-form.css.map +1 -1
  48. package/build/cjs/public/experimental/action-form.d.cts +48 -3
  49. package/build/cjs/public/experimental/filter-list.cjs +7 -7
  50. package/build/cjs/public/experimental/filter-list.css +9 -1
  51. package/build/cjs/public/experimental/filter-list.css.map +1 -1
  52. package/build/cjs/public/experimental/object-table.cjs +10 -10
  53. package/build/cjs/public/experimental/object-table.css +9 -1
  54. package/build/cjs/public/experimental/object-table.css.map +1 -1
  55. package/build/cjs/public/experimental/pdf-viewer.cjs +24 -24
  56. package/build/cjs/public/experimental.cjs +41 -41
  57. package/build/cjs/public/experimental.css +24 -1
  58. package/build/cjs/public/experimental.css.map +1 -1
  59. package/build/esm/action-form/FormFieldApi.js +8 -0
  60. package/build/esm/action-form/FormFieldApi.js.map +1 -1
  61. package/build/esm/action-form/fields/AsyncDropdownField.js +81 -0
  62. package/build/esm/action-form/fields/AsyncDropdownField.js.map +1 -0
  63. package/build/esm/action-form/fields/AsyncDropdownField.module.css +31 -0
  64. package/build/esm/action-form/fields/DropdownField.js +29 -14
  65. package/build/esm/action-form/fields/DropdownField.js.map +1 -1
  66. package/build/esm/action-form/fields/FormFieldRenderer.js +17 -0
  67. package/build/esm/action-form/fields/FormFieldRenderer.js.map +1 -1
  68. package/build/esm/action-form/fields/ObjectSelectField.js +109 -0
  69. package/build/esm/action-form/fields/ObjectSelectField.js.map +1 -0
  70. package/build/esm/action-form/utils/getDefaultFieldDefinitions.js +14 -5
  71. package/build/esm/action-form/utils/getDefaultFieldDefinitions.js.map +1 -1
  72. package/build/esm/base-components/combobox/Combobox.module.css +23 -2
  73. package/build/esm/filter-list/base/inputs/TextTagsInput.js.map +1 -1
  74. package/build/esm/shared/hooks/useDebouncedValue.js +35 -0
  75. package/build/esm/shared/hooks/useDebouncedValue.js.map +1 -0
  76. package/build/esm/shared/hooks/useEventCallback.js +44 -0
  77. package/build/esm/shared/hooks/useEventCallback.js.map +1 -0
  78. package/build/esm/shared/hooks/useInfiniteScroll.js +81 -0
  79. package/build/esm/shared/hooks/useInfiniteScroll.js.map +1 -0
  80. package/build/esm/tokens/component-tokens/async-dropdown.css +16 -0
  81. package/build/esm/tokens.css +1 -0
  82. package/build/esm/util/UserAgent.js +1 -1
  83. package/build/esm/util/UserAgent.js.map +1 -1
  84. package/build/types/action-form/FormFieldApi.d.ts +48 -3
  85. package/build/types/action-form/FormFieldApi.d.ts.map +1 -1
  86. package/build/types/action-form/fields/AsyncDropdownField.d.ts +25 -0
  87. package/build/types/action-form/fields/AsyncDropdownField.d.ts.map +1 -0
  88. package/build/types/action-form/fields/DropdownField.d.ts +2 -2
  89. package/build/types/action-form/fields/DropdownField.d.ts.map +1 -1
  90. package/build/types/action-form/fields/FormFieldRenderer.d.ts.map +1 -1
  91. package/build/types/action-form/fields/ObjectSelectField.d.ts +3 -0
  92. package/build/types/action-form/fields/ObjectSelectField.d.ts.map +1 -0
  93. package/build/types/shared/hooks/useDebouncedValue.d.ts +5 -0
  94. package/build/types/shared/hooks/useDebouncedValue.d.ts.map +1 -0
  95. package/build/types/shared/hooks/useEventCallback.d.ts +13 -0
  96. package/build/types/shared/hooks/useEventCallback.d.ts.map +1 -0
  97. package/build/types/shared/hooks/useInfiniteScroll.d.ts +19 -0
  98. package/build/types/shared/hooks/useInfiniteScroll.d.ts.map +1 -0
  99. package/package.json +9 -9
  100. package/build/cjs/chunk-EEES66LS.cjs.map +0 -1
  101. package/build/cjs/chunk-O5ZAMFDU.cjs.map +0 -1
  102. package/build/cjs/chunk-RY2GVYT2.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import type { ActionDefinition, ActionMetadata, ActionParam, CompileTimeMetadata, DataValueClientToWire, ObjectSet, ObjectTypeDefinition } from "@osdk/api";
1
+ import type { ActionDefinition, ActionMetadata, ActionParam, CompileTimeMetadata, DataValueClientToWire, ObjectSet, ObjectTypeDefinition, Osdk } from "@osdk/api";
2
2
  import type React from "react";
3
3
  /**
4
4
  * A form field definition specifies configuration for a single field
@@ -100,6 +100,7 @@ export interface FormFieldPropsByType {
100
100
  DROPDOWN: DropdownFieldProps<unknown, boolean>;
101
101
  FILE_PICKER: FilePickerProps;
102
102
  NUMBER_INPUT: NumberInputFieldProps;
103
+ OBJECT_SELECT: ObjectSelectFieldProps<ObjectTypeDefinition>;
103
104
  OBJECT_SET: ObjectSetFieldProps<ObjectTypeDefinition>;
104
105
  RADIO_BUTTONS: RadioButtonsFieldProps<unknown>;
105
106
  TEXT_AREA: TextAreaFieldProps;
@@ -229,6 +230,33 @@ export interface DropdownFieldProps<
229
230
  * Used to track portaled content for click-outside detection.
230
231
  */
231
232
  portalRef?: React.Ref<HTMLDivElement>;
233
+ /**
234
+ * Controlled search input value. Must be provided together with `onQueryChange`.
235
+ */
236
+ query?: string;
237
+ /**
238
+ * Callback when the search input value changes.
239
+ * Can be used standalone as an event listener or together with `query`
240
+ * for fully controlled search state.
241
+ */
242
+ onQueryChange?: (query: string) => void;
243
+ /**
244
+ * When true, disables the combobox's built-in client-side filtering.
245
+ * Use when items are already filtered server-side (e.g. via `onQueryChange`).
246
+ *
247
+ * @default false
248
+ */
249
+ disableClientSideFiltering?: boolean;
250
+ /**
251
+ * Status message rendered below the search input and above the item list
252
+ * inside the popup. Use for loading/error/empty messages.
253
+ */
254
+ popupStatus?: React.ReactNode;
255
+ /**
256
+ * A React node to render after the item list.
257
+ * Use for infinite scroll sentinels, "load more" buttons, etc.
258
+ */
259
+ trailingItem?: React.ReactNode;
232
260
  }
233
261
  export interface FilePickerProps extends BaseFormFieldProps<File | File[]> {
234
262
  /**
@@ -327,6 +355,19 @@ export interface ObjectSetFieldProps<T extends ObjectTypeDefinition> extends Pic
327
355
  emptyMessage?: string;
328
356
  }
329
357
  /**
358
+ * Object select field props for selecting object instances from the ontology.
359
+ * Used for action parameters that accept a single object or multiple objects.
360
+ *
361
+ * Extends DropdownFieldProps with props that ObjectSelectField
362
+ * manages internally (items, search, filtering) omitted from the public surface.
363
+ */
364
+ export interface ObjectSelectFieldProps<Q extends ObjectTypeDefinition = ObjectTypeDefinition> extends Omit<DropdownFieldProps<Osdk.Instance<Q>>, "items" | "itemToStringLabel" | "itemToKey" | "isItemEqual" | "isSearchable" | "query" | "onQueryChange" | "disableClientSideFiltering" | "renderItemList"> {
365
+ /**
366
+ * The object type definition to search within.
367
+ */
368
+ objectType: Q;
369
+ }
370
+ /**
330
371
  * Custom field props for user-defined renderers
331
372
  */
332
373
  export interface CustomFieldProps<V> extends BaseFormFieldProps<V> {
@@ -393,7 +434,7 @@ export type FieldDescriptorType<
393
434
  /**
394
435
  * Available form field component types
395
436
  */
396
- export type FieldComponent = "DATE_RANGE_INPUT" | "DATETIME_PICKER" | "DROPDOWN" | "FILE_PICKER" | "NUMBER_INPUT" | "RADIO_BUTTONS" | "OBJECT_SET" | "TEXT_AREA" | "TEXT_INPUT" | "CUSTOM";
437
+ export type FieldComponent = "DATE_RANGE_INPUT" | "DATETIME_PICKER" | "DROPDOWN" | "FILE_PICKER" | "NUMBER_INPUT" | "OBJECT_SELECT" | "OBJECT_SET" | "RADIO_BUTTONS" | "TEXT_AREA" | "TEXT_INPUT" | "CUSTOM";
397
438
  /**
398
439
  * Describes the data type of a form field, independent of OSDK.
399
440
  * Mirrors ActionMetadata.DataType to keep the rendering layer OSDK-agnostic.
@@ -442,5 +483,9 @@ export type RendererFieldDefinition = { [K in FieldComponent] : {
442
483
  /**
443
484
  * Gets valid form field types for a given property type
444
485
  */
445
- export type ValidFormFieldForPropertyType<P extends FieldDescriptorType> = P extends "objectSet" ? "OBJECT_SET" : P extends "object" ? "DROPDOWN" : P extends "mediaReference" | "attachment" ? "FILE_PICKER" : P extends "boolean" ? "RADIO_BUTTONS" | "DROPDOWN" : P extends "string" ? "TEXT_INPUT" | "TEXT_AREA" : P extends "datetime" | "timestamp" ? "DATETIME_PICKER" : P extends "double" | "integer" | "long" | "float" | "short" | "byte" | "decimal" ? "NUMBER_INPUT" : never;
486
+ export type ValidFormFieldForPropertyType<P extends FieldDescriptorType> = P extends {
487
+ type: "objectSet"
488
+ } ? "OBJECT_SET" : P extends {
489
+ type: "object"
490
+ } ? "OBJECT_SELECT" : P extends "mediaReference" | "attachment" ? "FILE_PICKER" : P extends "boolean" ? "RADIO_BUTTONS" | "DROPDOWN" : P extends "string" ? "TEXT_INPUT" | "TEXT_AREA" : P extends "datetime" | "timestamp" ? "DATETIME_PICKER" : P extends "double" | "integer" | "long" | "float" | "short" | "by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U,WAAW,eAAe,cACpC,UAAU,aAAa,cAAc,oBACrC,UACE,WACA,YACA,SACA,UACA,UACA,SACA,YAAY","names":["error: ValidationError","value: FieldValueType<Q, K>","date: Date","text: string","EMPTY_RANGE: DateRange","item: V","a: V","b: V","props: BaseFormFieldProps<V>","value: V | null","value: unknown"],"sources":["../../../src/action-form/FormFieldApi.ts"],"version":3,"file":"FormFieldApi.d.ts"}
1
+ {"mappings":"AAgBA,cACE,kBACA,gBACA,aACA,qBACA,uBACA,WACA,sBACA,YACK,WAAY;AACnB,YAAY,WAAW,OAAQ;;;;AAK/B,iBAAiB;CACf,UAAU;CACV,UAAU,SAAS,KAAK,SAAS;EACjC;;;;CAIA,UAAU;;;;CAKV;;;;CAKA,eAAe,eAAe,GAAG;;;;CAKjC,gBAAgB,8BAA8B,oBAAoB,GAAG;;;;CAKrE;;;;CAKA;;;;;CAMA;;;;;;CAOA,sBAAsB,WAAW;;;;CAKjC;;;;;;;;CASA,qBAAqBA,OAAO;;;;;;CAO5B,YAAYC,OAAO,eAAe,GAAG,OAAO;;;;;CAM5C,qBAAqB,KACnB,qBACE,8BACE,oBAAoB,GAAG,MAG3B,iBACE,8BAA8B,oBAAoB,GAAG;AAG1D;;;;;AAMD,YAAY,kBACR;CAAE,MAAM;AAAY,IACpB;CAAE,MAAM;CAAO,cAAc;AAAM,IACnC;CAAE,MAAM;CAAO,cAAc;AAAM,IACnC;CAAE,MAAM;CAAa;AAAmB,IACxC;CAAE,MAAM;CAAa;AAAmB,IACxC;CAAE,MAAM;CAAW;AAAiB,IACpC;CAAE,MAAM;CAAY;AAAiB;;;;AAKzC,iBAAiB,qBAAqB;CACpC,kBAAkB;CAClB,iBAAiB;CACjB,UAAU;CACV,aAAa;CACb,cAAc;CACd,eAAe,uBAAuB;CACtC,YAAY,oBAAoB;CAChC,eAAe;CACf,WAAW;CACX,YAAY;CACZ,QAAQ;AACT;;;;;;AAOD,iBAAiB,iCAAiC,mBAAmB,MAAM;;;;;CAKzE,M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AAE,MAAM;CAAa;AAAmB,IACxC;CAAE,MAAM;CAAU,QAAQ;AAAwB;;;;;;;KAQjD,iBAAiB,UAAU,kBAAkB,yBAC1C,qBAAqB,KAAK,UAAU,aACxC;;;;;;;;;AAUJ,YAAY,6BACT,KAAK,kBAAiB;CACrB;CACA,gBAAgB;CAChB,YAAY;CACZ;CACA;CACA;CACA;CACA,sBAAsB,WAAW;CACjC,YAAYC,mBAAmB;CAC/B,qBAAqBX,OAAO;CAC5B,qBAAqB,KAAK,qBAAqB,IAAI,iBAAiB;AACrE,IACD;;;;AAKF,YAAY,8BAA8B,UAAU,uBAClD,UAAU;CAAE,MAAM;AAAa,IAAG,eAC9B,UAAU;CAAE,MAAM;AAAU,IAAG,kBAC/B,UAAU,mBAAmB,eAAe,gBAC5C,UAAU,YAAY,kBAAkB,aACxC,UAAU,WAAW,eAAe,cACpC,UAAU,aAAa,cAAc,oBACrC,UACE,WACA,YACA,SACA,UACA,UACA,SACA,YAAY","names":["error: ValidationError","value: FieldValueType<Q, K>","date: Date","text: string","EMPTY_RANGE: DateRange","item: V","a: V","b: V","query: string","props: BaseFormFieldProps<V>","value: V | null","value: unknown"],"sources":["../../../src/action-form/FormFieldApi.ts"],"version":3,"file":"FormFieldApi.d.ts"}
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import type { DropdownFieldProps } from "../FormFieldApi.js";
3
+ export interface AsyncDropdownFieldProps<
4
+ V,
5
+ Multiple extends boolean = false
6
+ > extends Omit<DropdownFieldProps<V, Multiple>, "popupStatus" | "trailingItem"> {
7
+ /** Whether the data source is currently loading. */
8
+ isLoading: boolean;
9
+ /** Whether the data source is currently searching. */
10
+ isSearching: boolean;
11
+ /** Whether more pages of data are available to fetch. */
12
+ hasMore: boolean;
13
+ /**
14
+ * Called when the user scrolls to the bottom and more data is available.
15
+ */
16
+ onFetchMore: () => void;
17
+ /**
18
+ * The error from the most recent failed fetch, if any.
19
+ */
20
+ fetchError?: Error;
21
+ }
22
+ export declare const AsyncDropdownField: <
23
+ V,
24
+ Multiple extends boolean = false
25
+ >(props: AsyncDropdownFieldProps<V, Multiple>) => React.ReactElement;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,OAAO,WAAwB,OAAQ;AAIvC,cAAc,0BAA0B,oBAAqB;AAI7D,iBAAiB;CAAwB;CAAG,2BAA2B;UAEnE,KACE,mBAAmB,GAAG,WACtB,gBAAgB,gBAEtB;;CAEE;;CAEA;;CAEA;;;;CAKA;;;;CAKA,aAAa;AACd;AAED,OAAO,cAAMA;CAAqB;CAAG,2BAA2B;EAC9DC,OAAO,wBAAwB,GAAG,cAC/B,MAAM","names":["AsyncDropdownField: <V, Multiple extends boolean = false>(\n props: AsyncDropdownFieldProps<V, Multiple>,\n) => React.ReactElement","props: AsyncDropdownFieldProps<V, Multiple>"],"sources":["../../../../src/action-form/fields/AsyncDropdownField.tsx"],"version":3,"file":"AsyncDropdownField.d.ts"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import type { DropdownFieldProps } from "../FormFieldApi.js";
3
- export declare function DropdownField<
3
+ export declare const DropdownField: <
4
4
  V,
5
5
  Multiple extends boolean = false
6
- >({ isSearchable, isMultiple, itemToStringLabel, itemToKey, value,...rest }: DropdownFieldProps<V, Multiple>): React.ReactElement;
6
+ >(props: DropdownFieldProps<V, Multiple>) => React.ReactElement;
@@ -1 +1 @@
1
- {"mappings":"AAiBA,OAAO,WAAsC,OAAQ;AAMrD,cAAc,0BAA0B,oBAAqB;AAyB7D,OAAO,iBAAS;CAAc;CAAG,2BAA2B;EAAO,EACjE,cACA,YACA,mBACA,WACA,MACA,GAAG,MAC6B,EAA/B,mBAAmB,GAAG,YAAY,MAAM","names":[],"sources":["../../../../src/action-form/fields/DropdownField.tsx"],"version":3,"file":"DropdownField.d.ts"}
1
+ {"mappings":"AAiBA,OAAO,WAAsC,OAAQ;AAMrD,cAAc,0BAA0B,oBAAqB;AA6B7D,OAAO,cAAMA;CAAgB;CAAG,2BAA2B;EACzDC,OAAO,mBAAmB,GAAG,cAC1B,MAAM","names":["DropdownField: <V, Multiple extends boolean = false>(\n props: DropdownFieldProps<V, Multiple>,\n) => React.ReactElement","props: DropdownFieldProps<V, Multiple>"],"sources":["../../../../src/action-form/fields/DropdownField.tsx"],"version":3,"file":"DropdownField.d.ts"}
@@ -1 +1 @@
1
- {"mappings":"AAgBA,OAAO,WAAqB,OAAQ;AAEpC,cAGO,+BACA,oBAAqB;AAY5B,iBAAiB,uBAAuB;CACtC,iBAAiB;CACjB;CACA,qBAAqBA;CACrB,SAASC,GAAG,MAAM,WAAW;CAC7B;AACD;AAED,OAAO,cAAMC,mBAAmB,MAAM,GAAG","names":["value: unknown","e: React.FocusEvent<HTMLDivElement>","FormFieldRenderer: React.FC<FormFieldRendererProps>"],"sources":["../../../../src/action-form/fields/FormFieldRenderer.tsx"],"version":3,"file":"FormFieldRenderer.d.ts"}
1
+ {"mappings":"AAiBA,OAAO,WAAqB,OAAQ;AAEpC,cAGO,+BACA,oBAAqB;AAa5B,iBAAiB,uBAAuB;CACtC,iBAAiB;CACjB;CACA,qBAAqBA;CACrB,SAASC,GAAG,MAAM,WAAW;CAC7B;AACD;AAED,OAAO,cAAMC,mBAAmB,MAAM,GAAG","names":["value: unknown","e: React.FocusEvent<HTMLDivElement>","FormFieldRenderer: React.FC<FormFieldRendererProps>"],"sources":["../../../../src/action-form/fields/FormFieldRenderer.tsx"],"version":3,"file":"FormFieldRenderer.d.ts"}
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { ObjectSelectFieldProps } from "../FormFieldApi.js";
3
+ export declare const ObjectSelectField: React.NamedExoticComponent<ObjectSelectFieldProps>;
@@ -0,0 +1 @@
1
+ {"mappings":"AAmBA,OAAO,WAAqD,OAAQ;AAEpE,cAAc,8BAA8B,oBAAqB;AAajE,OAAO,cAAMA,mBAAmB,MAAM,qBACpC","names":["ObjectSelectField: React.NamedExoticComponent<\n ObjectSelectFieldProps\n>"],"sources":["../../../../src/action-form/fields/ObjectSelectField.tsx"],"version":3,"file":"ObjectSelectField.d.ts"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Returns a debounced version of `value` that only updates after `debounceMs`
3
+ * of inactivity. Each change to `value` resets the timer.
4
+ */
5
+ export declare function useDebouncedValue<T>(value: T, debounceMs: number): T;
@@ -0,0 +1 @@
1
+ {"mappings":";;;;AAsBA,OAAO,iBAAS,kBAAkB,GAAGA,OAAO,GAAGC,qBAAqB","names":["value: T","debounceMs: number"],"sources":["../../../../src/shared/hooks/useDebouncedValue.ts"],"version":3,"file":"useDebouncedValue.d.ts"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Creates a MutableRefObject with a constant reference. This allows us to pass around a constant reference
3
+ * to a callback, but let the consumer change the callback over time without losing that reference.
4
+ * The callback is only updated after render, so any usage of the callback during render will operate on the
5
+ * previous render's callback. Callbacks created by this hook should **only** be used for event handling.
6
+ * If the callback is called on the first render of a component, it will log an error. In the future,
7
+ * this will throw.
8
+ *
9
+ * ```
10
+ *
11
+ * @param callback
12
+ */
13
+ export declare function useEventCallback<T extends Function>(callback: T): T;
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;AA+BA,OAAO,iBAAS,iBAAiB,UAAU,UAAUA,UAAU,IAAI","names":["callback: T"],"sources":["../../../../src/shared/hooks/useEventCallback.ts"],"version":3,"file":"useEventCallback.d.ts"}
@@ -0,0 +1,19 @@
1
+ import type { LegacyRef } from "react";
2
+ export interface UseInfiniteScrollOptions {
3
+ /**
4
+ * Callback to call when new items should be loaded.
5
+ */
6
+ callback: () => void;
7
+ /**
8
+ * The current count of the number of loaded items in the infinite scroll. This is used to
9
+ * detect changes when the height of the container is large and can hold multiple initial
10
+ * loaded pages without making the target element scroll out of the viewport.
11
+ */
12
+ loadedCount: number;
13
+ }
14
+ /**
15
+ * This hooks handles the logic of triggering a callback when the user reaches the target element (e.g. spinner).
16
+ * It returns a callback that must be set as the ref of the target element at the bottom of the
17
+ * scroll container.
18
+ */
19
+ export declare function useInfiniteScroll({ callback, loadedCount }: UseInfiniteScrollOptions): LegacyRef<HTMLDivElement>;
@@ -0,0 +1 @@
1
+ {"mappings":"AAiBA,cAAc,iBAAiB,OAAQ;AASvC,iBAAiB,yBAAyB;;;;CAIxC;;;;;;CAMA;AACD;;;;;;AAOD,OAAO,iBAAS,kBACd,EAAE,UAAU,aAAuC,EAAxB,2BAC1B,UAAU","names":[],"sources":["../../../../src/shared/hooks/useInfiniteScroll.ts"],"version":3,"file":"useInfiniteScroll.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/react-components",
3
- "version": "0.9.0",
3
+ "version": "0.10.0-main-b355bc3b41a4d89ec093054dc8d2845c772ef1e2",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -118,9 +118,9 @@
118
118
  "utif": "^3.1.0"
119
119
  },
120
120
  "peerDependencies": {
121
- "@osdk/api": "^2.8.0",
122
- "@osdk/client": "^2.8.0",
123
- "@osdk/react": "^0.16.0",
121
+ "@osdk/api": ">=2.13.1-beta.0",
122
+ "@osdk/client": ">=2.13.1-beta.0",
123
+ "@osdk/react": ">=0.16.1-beta.0",
124
124
  "@types/react": "^17 || ^18 || ^19",
125
125
  "classnames": "^2.0.0",
126
126
  "react": "^17 || ^18 || ^19",
@@ -138,11 +138,11 @@
138
138
  "react": "^18.3.1",
139
139
  "react-dom": "^18.3.1",
140
140
  "typescript": "~5.5.4",
141
- "@osdk/api": "2.13.0",
141
+ "@osdk/api": "2.13.1-main-b355bc3b41a4d89ec093054dc8d2845c772ef1e2",
142
+ "@osdk/client": "2.13.1-main-b355bc3b41a4d89ec093054dc8d2845c772ef1e2",
142
143
  "@osdk/monorepo.api-extractor": "~0.7.0",
143
- "@osdk/client": "2.13.0",
144
- "@osdk/react": "0.16.0",
145
- "@osdk/monorepo.tsconfig": "~0.7.0"
144
+ "@osdk/monorepo.tsconfig": "~0.7.0",
145
+ "@osdk/react": "0.16.1-main-b355bc3b41a4d89ec093054dc8d2845c772ef1e2"
146
146
  },
147
147
  "publishConfig": {
148
148
  "access": "public"
@@ -172,7 +172,7 @@
172
172
  "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
173
173
  "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)",
174
174
  "lint": "eslint . && dprint check --config $(find-up dprint.json)",
175
- "test": "vitest run",
175
+ "test": "LANG=en_US.UTF-8 vitest run",
176
176
  "transpileAllDeps": "pnpm --filter @osdk/api --filter @osdk/client --filter @osdk/react run transpileBrowser",
177
177
  "transpileBrowser": "monorepo.tool.transpile -f esm -m normal -t browser && node scripts/build-css.mjs",
178
178
  "transpileCjs": "monorepo.tool.transpile -f cjs -m bundle -t node",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/util/UserAgent.ts","../../src/util/withOsdkMetrics.ts"],"names":["useRegisterUserAgent","React"],"mappings":";;;;;;;;;;;;AAgBA,IAAM,kBAAA,GAAqB,yBAAyB,OAA2B,CAAA,CAAA;AACxE,SAAS,mBAAmB,aAAA,EAAe;AAChD,EAAA,OAAO,CAAA,EAAG,kBAAkB,CAAA,CAAA,EAAI,aAAa,CAAA,CAAA;AAC/C;;;ACKO,SAAS,eAAA,CAAgB,WAAW,IAAA,EAAM;AAC/C,EAAA,MAAM,UAAU,CAAA,KAAA,KAAS;AACvB,IAAAA,iCAAA,CAAqB,kBAAA,CAAmB,IAAI,CAAC,CAAA;AAC7C,IAAA,uBAAoBC,sBAAA,CAAM,aAAA,CAAc,SAAA,EAAW,KAAK,CAAA;AAAA,EAC1D,CAAA;AACA,EAAA,OAAA,CAAQ,WAAA,GAAc,mBAAmB,IAAI,CAAA,CAAA,CAAA;AAC7C,EAAA,OAAO,OAAA;AACT","file":"chunk-EEES66LS.cjs","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 = `osdk-react-components/${process.env.PACKAGE_VERSION}`;\nexport function componentUserAgent(componentName) {\n return `${PACKAGE_USER_AGENT}/${componentName}`;\n}","/*\n * Copyright 2026 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 { useRegisterUserAgent } from \"@osdk/react/experimental\";\nimport React from \"react\";\nimport { componentUserAgent } from \"./UserAgent.js\";\n\n// `any` is required: FunctionComponent defaults to FunctionComponent<{}> which\n// rejects components with required props. A generic P parameter doesn't help\n// because TS can't infer both P and C simultaneously from a single argument.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withOsdkMetrics(Component, name) {\n const Wrapped = props => {\n useRegisterUserAgent(componentUserAgent(name));\n return /*#__PURE__*/React.createElement(Component, props);\n };\n Wrapped.displayName = `withOsdkMetrics(${name})`;\n return Wrapped;\n}"]}