@osdk/react-components 0.70.0 → 0.71.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da

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 (139) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/build/browser/action-form/ActionForm.js +86 -5
  3. package/build/browser/action-form/ActionForm.js.map +1 -1
  4. package/build/browser/action-form/ActionFormApi.js.map +1 -1
  5. package/build/browser/action-form/BaseForm.js +8 -6
  6. package/build/browser/action-form/BaseForm.js.map +1 -1
  7. package/build/browser/action-form/BaseForm.module.css +2 -2
  8. package/build/browser/public/action-form.js.map +1 -1
  9. package/build/browser/public/experimental/action-form.js +2 -0
  10. package/build/browser/public/experimental/action-form.js.map +1 -1
  11. package/build/browser/styles.css +2 -2
  12. package/build/browser/util/UserAgent.js +1 -1
  13. package/build/browser/util/UserAgent.js.map +1 -1
  14. package/build/cjs/{action-form-B6wbHrW1.d.cts → action-form-Iq1Ru5RI.d.cts} +18 -1
  15. package/build/cjs/{chunk-WUTJ2FYF.cjs → chunk-542S5PB4.cjs} +3 -3
  16. package/build/cjs/chunk-542S5PB4.cjs.map +1 -0
  17. package/build/cjs/{chunk-PKLHZUNU.cjs → chunk-6GHPHLCW.cjs} +8 -8
  18. package/build/cjs/{chunk-PKLHZUNU.cjs.map → chunk-6GHPHLCW.cjs.map} +1 -1
  19. package/build/cjs/chunk-6MRSW5XP.cjs +11 -0
  20. package/build/cjs/{chunk-DUH54L3A.cjs.map → chunk-6MRSW5XP.cjs.map} +1 -1
  21. package/build/cjs/{chunk-7EUTWZMR.cjs → chunk-6ZZTHO32.cjs} +4 -4
  22. package/build/cjs/{chunk-7EUTWZMR.cjs.map → chunk-6ZZTHO32.cjs.map} +1 -1
  23. package/build/cjs/{chunk-WVORK4J6.cjs → chunk-ALQZBG2D.cjs} +5 -5
  24. package/build/cjs/{chunk-WVORK4J6.cjs.map → chunk-ALQZBG2D.cjs.map} +1 -1
  25. package/build/cjs/{chunk-V6EHMYW3.cjs → chunk-AMNNLWCS.cjs} +4 -4
  26. package/build/cjs/{chunk-V6EHMYW3.cjs.map → chunk-AMNNLWCS.cjs.map} +1 -1
  27. package/build/cjs/chunk-AQD2HXGI.cjs +12 -0
  28. package/build/cjs/{chunk-BPC7IVVD.cjs.map → chunk-AQD2HXGI.cjs.map} +1 -1
  29. package/build/cjs/chunk-DSCFS24S.cjs +12 -0
  30. package/build/cjs/{chunk-Z4BT3QO3.cjs.map → chunk-DSCFS24S.cjs.map} +1 -1
  31. package/build/cjs/{chunk-UQTGPL5X.cjs → chunk-G6QCEAJR.cjs} +5 -5
  32. package/build/cjs/{chunk-UQTGPL5X.cjs.map → chunk-G6QCEAJR.cjs.map} +1 -1
  33. package/build/cjs/{chunk-T6TEMUKX.cjs → chunk-I2JZPI2A.cjs} +4 -4
  34. package/build/cjs/{chunk-T6TEMUKX.cjs.map → chunk-I2JZPI2A.cjs.map} +1 -1
  35. package/build/cjs/chunk-IAMQG4QK.cjs +11 -0
  36. package/build/cjs/{chunk-RWM5Q2TL.cjs.map → chunk-IAMQG4QK.cjs.map} +1 -1
  37. package/build/cjs/{chunk-JQTXDYGJ.cjs → chunk-IGOX32AB.cjs} +4 -4
  38. package/build/cjs/{chunk-JQTXDYGJ.cjs.map → chunk-IGOX32AB.cjs.map} +1 -1
  39. package/build/cjs/{chunk-HDSFUQBQ.cjs → chunk-IR3VWN44.cjs} +4 -4
  40. package/build/cjs/{chunk-HDSFUQBQ.cjs.map → chunk-IR3VWN44.cjs.map} +1 -1
  41. package/build/cjs/chunk-JUFROKPP.cjs +11 -0
  42. package/build/cjs/{chunk-34K44M7E.cjs.map → chunk-JUFROKPP.cjs.map} +1 -1
  43. package/build/cjs/chunk-LGFXDJ5F.cjs +11 -0
  44. package/build/cjs/{chunk-A3DQM47Z.cjs.map → chunk-LGFXDJ5F.cjs.map} +1 -1
  45. package/build/cjs/chunk-LZPDNV7J.cjs +11 -0
  46. package/build/cjs/{chunk-RSRRWH6V.cjs.map → chunk-LZPDNV7J.cjs.map} +1 -1
  47. package/build/cjs/{chunk-DNQRRSU2.cjs → chunk-MO2UJAQG.cjs} +4 -4
  48. package/build/cjs/{chunk-DNQRRSU2.cjs.map → chunk-MO2UJAQG.cjs.map} +1 -1
  49. package/build/cjs/{chunk-ZYBJ3LNA.cjs → chunk-MPEC5BN5.cjs} +4 -4
  50. package/build/cjs/{chunk-ZYBJ3LNA.cjs.map → chunk-MPEC5BN5.cjs.map} +1 -1
  51. package/build/cjs/{chunk-J4NBM6OE.cjs → chunk-NHQZGVEZ.cjs} +4 -4
  52. package/build/cjs/{chunk-J4NBM6OE.cjs.map → chunk-NHQZGVEZ.cjs.map} +1 -1
  53. package/build/cjs/chunk-RPYPKJAY.cjs +48 -0
  54. package/build/cjs/{chunk-NSPWQRJC.cjs.map → chunk-RPYPKJAY.cjs.map} +1 -1
  55. package/build/cjs/{chunk-P6SBA35V.cjs → chunk-RRIT3OA2.cjs} +4 -4
  56. package/build/cjs/{chunk-P6SBA35V.cjs.map → chunk-RRIT3OA2.cjs.map} +1 -1
  57. package/build/cjs/chunk-TBVC3WFI.cjs +11 -0
  58. package/build/cjs/{chunk-KPCU4HM4.cjs.map → chunk-TBVC3WFI.cjs.map} +1 -1
  59. package/build/cjs/{chunk-KIJIMTQX.cjs → chunk-TFK2W7YJ.cjs} +369 -428
  60. package/build/cjs/chunk-TFK2W7YJ.cjs.map +1 -0
  61. package/build/cjs/{chunk-IXXUU66T.cjs → chunk-TQOVHE6M.cjs} +4 -4
  62. package/build/cjs/{chunk-IXXUU66T.cjs.map → chunk-TQOVHE6M.cjs.map} +1 -1
  63. package/build/cjs/{chunk-JDOJZGDO.cjs → chunk-W7LK7SRO.cjs} +92 -51
  64. package/build/cjs/chunk-W7LK7SRO.cjs.map +1 -0
  65. package/build/cjs/{chunk-MNJON7D3.cjs → chunk-YKZ6DBDN.cjs} +98 -22
  66. package/build/cjs/chunk-YKZ6DBDN.cjs.map +1 -0
  67. package/build/cjs/chunk-ZMH2RDYW.cjs +34 -0
  68. package/build/cjs/{chunk-TPLDHL43.cjs.map → chunk-ZMH2RDYW.cjs.map} +1 -1
  69. package/build/cjs/public/action-form.cjs +5 -5
  70. package/build/cjs/public/action-form.css +2 -2
  71. package/build/cjs/public/action-form.css.map +1 -1
  72. package/build/cjs/public/action-form.d.cts +1 -1
  73. package/build/cjs/public/document-viewer.cjs +4 -4
  74. package/build/cjs/public/email-viewer.cjs +3 -3
  75. package/build/cjs/public/experimental/action-form.cjs +6 -6
  76. package/build/cjs/public/experimental/action-form.css +2 -2
  77. package/build/cjs/public/experimental/action-form.css.map +1 -1
  78. package/build/cjs/public/experimental/action-form.d.cts +4 -2
  79. package/build/cjs/public/experimental/cbac-picker.cjs +8 -8
  80. package/build/cjs/public/experimental/document-viewer.cjs +5 -5
  81. package/build/cjs/public/experimental/email-viewer.cjs +5 -5
  82. package/build/cjs/public/experimental/filter-list.cjs +16 -16
  83. package/build/cjs/public/experimental/image-viewer.cjs +5 -5
  84. package/build/cjs/public/experimental/markdown-renderer.cjs +7 -7
  85. package/build/cjs/public/experimental/object-table.cjs +24 -24
  86. package/build/cjs/public/experimental/pdf-viewer.cjs +25 -25
  87. package/build/cjs/public/experimental/spreadsheet-viewer.cjs +5 -5
  88. package/build/cjs/public/experimental/tiff-renderer.cjs +7 -7
  89. package/build/cjs/public/experimental/video-viewer.cjs +5 -5
  90. package/build/cjs/public/experimental/workshop-module.cjs +2 -2
  91. package/build/cjs/public/experimental/xml-viewer.cjs +5 -5
  92. package/build/cjs/public/experimental.cjs +110 -110
  93. package/build/cjs/public/experimental.css +2 -2
  94. package/build/cjs/public/experimental.css.map +1 -1
  95. package/build/cjs/public/experimental.d.cts +2 -2
  96. package/build/cjs/public/filter-list.cjs +15 -15
  97. package/build/cjs/public/image-viewer.cjs +3 -3
  98. package/build/cjs/public/markdown-viewer.cjs +3 -3
  99. package/build/cjs/public/object-table.cjs +23 -23
  100. package/build/cjs/public/pdf-viewer.cjs +7 -7
  101. package/build/cjs/public/spreadsheet-viewer.cjs +3 -3
  102. package/build/cjs/public/tiff-viewer.cjs +3 -3
  103. package/build/cjs/public/video-viewer.cjs +3 -3
  104. package/build/cjs/public/xml-viewer.cjs +3 -3
  105. package/build/esm/action-form/ActionForm.js +86 -5
  106. package/build/esm/action-form/ActionForm.js.map +1 -1
  107. package/build/esm/action-form/ActionFormApi.js.map +1 -1
  108. package/build/esm/action-form/BaseForm.js +8 -6
  109. package/build/esm/action-form/BaseForm.js.map +1 -1
  110. package/build/esm/action-form/BaseForm.module.css +2 -2
  111. package/build/esm/public/action-form.js.map +1 -1
  112. package/build/esm/public/experimental/action-form.js +2 -0
  113. package/build/esm/public/experimental/action-form.js.map +1 -1
  114. package/build/esm/util/UserAgent.js +1 -1
  115. package/build/esm/util/UserAgent.js.map +1 -1
  116. package/build/types/action-form/ActionForm.d.ts.map +1 -1
  117. package/build/types/action-form/ActionFormApi.d.ts +17 -0
  118. package/build/types/action-form/ActionFormApi.d.ts.map +1 -1
  119. package/build/types/action-form/BaseForm.d.ts.map +1 -1
  120. package/build/types/public/action-form.d.ts +1 -1
  121. package/build/types/public/action-form.d.ts.map +1 -1
  122. package/build/types/public/experimental/action-form.d.ts +2 -0
  123. package/build/types/public/experimental/action-form.d.ts.map +1 -1
  124. package/docs/ActionFormOverview.md +14 -13
  125. package/package.json +7 -7
  126. package/build/cjs/chunk-34K44M7E.cjs +0 -11
  127. package/build/cjs/chunk-A3DQM47Z.cjs +0 -11
  128. package/build/cjs/chunk-BPC7IVVD.cjs +0 -12
  129. package/build/cjs/chunk-DUH54L3A.cjs +0 -11
  130. package/build/cjs/chunk-JDOJZGDO.cjs.map +0 -1
  131. package/build/cjs/chunk-KIJIMTQX.cjs.map +0 -1
  132. package/build/cjs/chunk-KPCU4HM4.cjs +0 -11
  133. package/build/cjs/chunk-MNJON7D3.cjs.map +0 -1
  134. package/build/cjs/chunk-NSPWQRJC.cjs +0 -48
  135. package/build/cjs/chunk-RSRRWH6V.cjs +0 -11
  136. package/build/cjs/chunk-RWM5Q2TL.cjs +0 -11
  137. package/build/cjs/chunk-TPLDHL43.cjs +0 -34
  138. package/build/cjs/chunk-WUTJ2FYF.cjs.map +0 -1
  139. package/build/cjs/chunk-Z4BT3QO3.cjs +0 -12
@@ -1 +1 @@
1
- {"version":3,"file":"ActionFormApi.js","names":[],"sources":["ActionFormApi.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 ActionDefinition,\n ActionEditResponse,\n ActionValidationResponse,\n} from \"@osdk/api\";\n\nimport type {\n FieldKey,\n FieldValueType,\n FormFieldDefinition,\n RendererFieldDefinition,\n} from \"./FormFieldApi.js\";\n\n/**\n * Props for the ActionForm component.\n *\n * A discriminated union ensures that controlled mode (formState provided)\n * always requires onFormStateChange, and uncontrolled mode makes `onFormStateChange` optional\n */\nexport type ActionFormProps<Q extends ActionDefinition<unknown>> =\n | (ActionFormConfigProps<Q> & {\n /**\n * The current form values.\n * If provided, the form state is controlled.\n */\n formState: FormState<Q>;\n /**\n * Called when a field value changes, with a state updater.\n * Required when the form state is controlled; also fires in\n * uncontrolled mode so callers can observe changes.\n */\n onFormStateChange: (\n updater: (prevState: FormState<Q>) => FormState<Q>,\n ) => void;\n })\n | (ActionFormConfigProps<Q> & {\n formState?: undefined;\n onFormStateChange?: (\n updater: (prevState: FormState<Q>) => FormState<Q>,\n ) => void;\n });\n\n/**\n * Determines how the form fields are specified. Exactly one of the three\n * branches may be used:\n *\n * 1. Neither prop — fields are auto-generated from action metadata.\n * 2. `formFieldDefinitions` — a flat list of field definitions.\n * 3. `formContentDefinitions` — fields and sections for richer layout.\n */\ntype ActionFormContentConfig<Q extends ActionDefinition<unknown>> =\n | { formFieldDefinitions?: undefined; formContentDefinitions?: undefined }\n | {\n /** Custom flat list of field definitions. */\n formFieldDefinitions: ReadonlyArray<FormFieldDefinition<Q>>;\n formContentDefinitions?: never;\n }\n | {\n /** Ordered list of fields and sections that define the form layout. */\n formContentDefinitions: ReadonlyArray<ActionFormContentItem<Q>>;\n formFieldDefinitions?: never;\n };\n\ntype ActionFormConfigProps<Q extends ActionDefinition<unknown>> =\n ActionFormBaseConfigProps<Q> & ActionFormContentConfig<Q>;\n\ninterface ActionFormBaseConfigProps<\n Q extends ActionDefinition<unknown>,\n> extends Pick<BaseFormProps, \"formTitle\" | \"isSubmitDisabled\"> {\n /**\n * The OSDK action definition. Its parameters drive the rendered fields\n * and the submission.\n */\n actionDefinition: Q;\n\n /**\n * Whether to show the form title.\n *\n * @default false\n */\n showFormTitle?: boolean;\n\n /**\n * If supplied, this will override the default submit action.\n * By default, the action's applyAction will be called.\n *\n * @param formState all field values when onSubmit is called\n * @param applyAction the function to execute the action\n * @returns a promise of the submission response\n */\n onSubmit?: (\n formState: FormState<Q>,\n applyAction: (\n formState: FormState<Q>,\n ) => Promise<ActionEditResponse | undefined>,\n ) => Promise<unknown> | void;\n\n /**\n * Called when the validation response is returned from a validateOnly submission\n *\n * @param results the validation response\n */\n onValidationResponse?: (results: ActionValidationResponse) => void;\n\n /**\n * Called when the action is successfully executed from a non-validateOnly submission\n *\n * @param results the submission response\n */\n onSuccess?: (results: ActionEditResponse | undefined) => void;\n\n /**\n * Called when action metadata fails to load or form submission fails.\n *\n * @param error the error that occurred\n */\n onError?: (error: FormError) => void;\n}\n\n/**\n * Form values mapping parameter names to their values\n */\nexport type FormState<Q extends ActionDefinition<unknown>> = {\n [K in FieldKey<Q>]?: FieldValueType<Q, K>;\n};\n\n/**\n * Form error discriminated union\n */\nexport type FormError =\n | { type: \"submission\"; error: unknown }\n | { type: \"unknown\"; error: unknown };\n\n/**\n * Generic content item parameterized by its field-definition type.\n * Both the OSDK-typed and renderer-level content items derive from this\n * so their structure cannot diverge.\n */\ntype BaseContentItem<F, S extends BaseSectionDefinition<F>> =\n | { type: \"field\"; definition: F }\n | { type: \"section\"; key: string; definition: S };\n\n/**\n * Generic section definition parameterized by its field-definition type.\n */\ninterface BaseSectionDefinition<F> {\n /** Section heading. */\n title: string;\n /** Optional description below the heading. */\n description?: string;\n /** The fields rendered inside this section. */\n fields: ReadonlyArray<F>;\n /**\n * Whether the section starts collapsed.\n * @default false\n */\n collapsedByDefault?: boolean;\n /**\n * Whether to show the title bar.\n * @default true\n */\n showTitleBar?: boolean;\n /**\n * Number of columns for fields.\n * @default 1\n */\n columnCount?: 1 | 2;\n /**\n * Visual style. `\"box\"` = bordered card, `\"minimal\"` = heading only.\n * @default \"box\"\n */\n style?: \"box\" | \"minimal\";\n}\n\n/**\n * A single item in the ActionForm content array — either a standalone\n * field or a section that groups multiple fields.\n */\nexport type ActionFormContentItem<Q extends ActionDefinition<unknown>> =\n BaseContentItem<FormFieldDefinition<Q>, ActionFormSectionDefinition<Q>>;\n\n/**\n * Configuration for a section in the ActionForm.\n */\nexport interface ActionFormSectionDefinition<\n Q extends ActionDefinition<unknown>,\n> extends BaseSectionDefinition<FormFieldDefinition<Q>> {}\n\n/**\n * A single item in the form content array — either a standalone field\n * or a section that groups multiple fields.\n */\nexport type FormContentItem = BaseContentItem<\n RendererFieldDefinition,\n FormSectionDefinition\n>;\n\n/**\n * Configuration for a form section — a visual group of fields with\n * optional title bar, collapse behavior, and multi-column layout.\n */\nexport interface FormSectionDefinition extends BaseSectionDefinition<RendererFieldDefinition> {}\n\n/**\n * Props for the `BaseForm` component, which renders a form without\n * OSDK data fetching.\n *\n * Uses a discriminated union so that controlled mode (`formState` provided)\n * always requires `onFieldValueChange`; uncontrolled mode omits `formState`\n * (`onFieldValueChange` stays optional).\n * `onSubmit` receives the current form state so callers can access values\n * even in uncontrolled mode.\n */\nexport type BaseFormProps = BaseFormCommonProps &\n (\n | {\n /**\n * The current field values keyed by field key.\n * If provided, the form state is controlled.\n */\n formState: Record<string, unknown>;\n /**\n * Called when a field value changes.\n * Required when the form state is controlled; also fires in\n * uncontrolled mode so callers can observe changes.\n */\n onFieldValueChange: (fieldKey: string, value: unknown) => void;\n }\n | {\n formState?: undefined;\n onFieldValueChange?: (fieldKey: string, value: unknown) => void;\n }\n );\n\ninterface BaseFormCommonProps {\n /** Title shown in the form header. Omit to hide the header. */\n formTitle?: string;\n /** The fields and sections to render, in order. */\n formContent: ReadonlyArray<FormContentItem>;\n /** Called when the form is submitted with valid values. Receives the current form state. */\n onSubmit: (formState: Record<string, unknown>) => Promise<void> | void;\n /** Whether the submit button is disabled. Default `false`. */\n isSubmitDisabled?: boolean;\n /** Whether a submission is in progress. Shows the submit button in a pending state. Default `false`. */\n isPending?: boolean;\n /** Whether the form is loading its fields. Shows a skeleton placeholder. Default `false`. */\n isLoading?: boolean;\n /** Additional CSS class name for the root element. */\n className?: string;\n /** Label for the submit button. Default `\"Submit\"`. */\n submitButtonText?: string;\n /** Visual variant of the submit button. Default `\"primary\"`. */\n submitButtonVariant?: \"primary\" | \"secondary\";\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"ActionFormApi.js","names":[],"sources":["ActionFormApi.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 ActionDefinition,\n ActionEditResponse,\n ActionValidationResponse,\n} from \"@osdk/api\";\n\nimport type {\n FieldKey,\n FieldValueType,\n FormFieldDefinition,\n RendererFieldDefinition,\n} from \"./FormFieldApi.js\";\n\n/**\n * Props for the ActionForm component.\n *\n * A discriminated union ensures that controlled mode (formState provided)\n * always requires onFormStateChange, and uncontrolled mode makes `onFormStateChange` optional\n */\nexport type ActionFormProps<Q extends ActionDefinition<unknown>> =\n | (ActionFormConfigProps<Q> & {\n /**\n * The current form values.\n * If provided, the form state is controlled.\n */\n formState: FormState<Q>;\n /**\n * Called when a field value changes, with a state updater.\n * Required when the form state is controlled; also fires in\n * uncontrolled mode so callers can observe changes.\n */\n onFormStateChange: (\n updater: (prevState: FormState<Q>) => FormState<Q>,\n ) => void;\n })\n | (ActionFormConfigProps<Q> & {\n formState?: undefined;\n onFormStateChange?: (\n updater: (prevState: FormState<Q>) => FormState<Q>,\n ) => void;\n });\n\n/**\n * Determines how the form fields are specified. Exactly one of the three\n * branches may be used:\n *\n * 1. Neither prop — fields are auto-generated from action metadata.\n * 2. `formFieldDefinitions` — a flat list of field definitions.\n * 3. `formContentDefinitions` — fields and sections for richer layout.\n */\ntype ActionFormContentConfig<Q extends ActionDefinition<unknown>> =\n | { formFieldDefinitions?: undefined; formContentDefinitions?: undefined }\n | {\n /** Custom flat list of field definitions. */\n formFieldDefinitions: ReadonlyArray<FormFieldDefinition<Q>>;\n formContentDefinitions?: never;\n }\n | {\n /** Ordered list of fields and sections that define the form layout. */\n formContentDefinitions: ReadonlyArray<ActionFormContentItem<Q>>;\n formFieldDefinitions?: never;\n };\n\ntype ActionFormConfigProps<Q extends ActionDefinition<unknown>> =\n ActionFormBaseConfigProps<Q> & ActionFormContentConfig<Q>;\n\ninterface ActionFormBaseConfigProps<\n Q extends ActionDefinition<unknown>,\n> extends Pick<BaseFormProps, \"formTitle\" | \"isSubmitDisabled\"> {\n /**\n * The OSDK action definition. Its parameters drive the rendered fields\n * and the submission.\n */\n actionDefinition: Q;\n\n /**\n * Whether to show the form title.\n *\n * @default false\n */\n showFormTitle?: boolean;\n\n /**\n * If supplied, this will override the default submit action.\n * By default, the action's applyAction will be called.\n *\n * @param formState all field values when onSubmit is called\n * @param applyAction the function to execute the action\n * @returns a promise of the submission response\n */\n onSubmit?: (\n formState: FormState<Q>,\n applyAction: (\n formState: FormState<Q>,\n ) => Promise<ActionEditResponse | undefined>,\n ) => Promise<unknown> | void;\n\n /**\n * Called when the validation response is returned from a validateOnly submission\n *\n * @param results the validation response\n */\n onValidationResponse?: (results: ActionValidationResponse) => void;\n\n /**\n * Called when the action is successfully executed from a non-validateOnly submission\n *\n * @param results the submission response\n */\n onSuccess?: (results: ActionEditResponse | undefined) => void;\n\n /**\n * Called when action metadata fails to load or form submission fails.\n *\n * @param error the error that occurred\n */\n onError?: (error: FormError) => void;\n}\n\n/**\n * Form values mapping parameter names to their values\n */\nexport type FormState<Q extends ActionDefinition<unknown>> = {\n [K in FieldKey<Q>]?: FieldValueType<Q, K>;\n};\n\n/**\n * Form error discriminated union\n */\nexport type FormError =\n | { type: \"submission\"; error: unknown }\n | { type: \"unknown\"; error: unknown };\n\n/**\n * Generic content item parameterized by its field-definition type.\n * Both the OSDK-typed and renderer-level content items derive from this\n * so their structure cannot diverge.\n */\ntype BaseContentItem<F, S extends BaseSectionDefinition<F>> =\n | { type: \"field\"; definition: F }\n | { type: \"section\"; key: string; definition: S };\n\n/**\n * Generic section definition parameterized by its field-definition type.\n */\ninterface BaseSectionDefinition<F> {\n /** Section heading. */\n title: string;\n /** Optional description below the heading. */\n description?: string;\n /** The fields rendered inside this section. */\n fields: ReadonlyArray<F>;\n /**\n * Whether the section starts collapsed.\n * @default false\n */\n collapsedByDefault?: boolean;\n /**\n * Whether to show the title bar.\n * @default true\n */\n showTitleBar?: boolean;\n /**\n * Number of columns for fields.\n * @default 1\n */\n columnCount?: 1 | 2;\n /**\n * Visual style. `\"box\"` = bordered card, `\"minimal\"` = heading only.\n * @default \"box\"\n */\n style?: \"box\" | \"minimal\";\n}\n\n/**\n * A single item in the ActionForm content array — either a standalone\n * field or a section that groups multiple fields.\n */\nexport type ActionFormContentItem<Q extends ActionDefinition<unknown>> =\n BaseContentItem<FormFieldDefinition<Q>, ActionFormSectionDefinition<Q>>;\n\n/**\n * Configuration for a section in the ActionForm.\n */\nexport interface ActionFormSectionDefinition<\n Q extends ActionDefinition<unknown>,\n> extends BaseSectionDefinition<FormFieldDefinition<Q>> {}\n\n/**\n * A single item in the form content array — either a standalone field\n * or a section that groups multiple fields.\n */\nexport type FormContentItem = BaseContentItem<\n RendererFieldDefinition,\n FormSectionDefinition\n>;\n\n/**\n * Configuration for a form section — a visual group of fields with\n * optional title bar, collapse behavior, and multi-column layout.\n */\nexport interface FormSectionDefinition extends BaseSectionDefinition<RendererFieldDefinition> {}\n\n/**\n * Props for the `BaseForm` component, which renders a form without\n * OSDK data fetching.\n *\n * Uses a discriminated union so that controlled mode (`formState` provided)\n * always requires `onFieldValueChange`; uncontrolled mode omits `formState`\n * (`onFieldValueChange` stays optional).\n * `onSubmit` receives the current form state so callers can access values\n * even in uncontrolled mode.\n */\nexport type BaseFormProps = BaseFormCommonProps &\n (\n | {\n /**\n * The current field values keyed by field key.\n * If provided, the form state is controlled.\n */\n formState: Record<string, unknown>;\n /**\n * Called when a field value changes.\n * Required when the form state is controlled; also fires in\n * uncontrolled mode so callers can observe changes.\n */\n onFieldValueChange: (fieldKey: string, value: unknown) => void;\n }\n | {\n formState?: undefined;\n onFieldValueChange?: (fieldKey: string, value: unknown) => void;\n }\n );\n\n/**\n * A message surfaced in the form footer error indicator.\n * The label is optional — omit it for errors not tied to a specific field.\n */\nexport interface FormErrorEntry {\n label?: string;\n message: string;\n}\n\ninterface BaseFormCommonProps {\n /** Title shown in the form header. Omit to hide the header. */\n formTitle?: string;\n /** The fields and sections to render, in order. */\n formContent: ReadonlyArray<FormContentItem>;\n /** Called when the form is submitted with valid values. Receives the current form state. */\n onSubmit: (formState: Record<string, unknown>) => Promise<void> | void;\n /** Whether the submit button is disabled. Default `false`. */\n isSubmitDisabled?: boolean;\n /** Whether a submission is in progress. Shows the submit button in a pending state. Default `false`. */\n isPending?: boolean;\n /** Whether the form is loading its fields. Shows a skeleton placeholder. Default `false`. */\n isLoading?: boolean;\n /** Additional CSS class name for the root element. */\n className?: string;\n /** Label for the submit button. Default `\"Submit\"`. */\n submitButtonText?: string;\n /** Visual variant of the submit button. Default `\"primary\"`. */\n submitButtonVariant?: \"primary\" | \"secondary\";\n /**\n * External validation errors to display in the footer error indicator\n * alongside field errors. Controlled: the caller owns the array and is\n * responsible for clearing it (e.g. on field change). BaseForm never\n * modifies this value.\n *\n * @default undefined (no external errors)\n */\n validationErrors?: ReadonlyArray<FormErrorEntry>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -37,7 +37,8 @@ export const BaseForm = /*#__PURE__*/memo(function ({
37
37
  isLoading = false,
38
38
  className,
39
39
  submitButtonText = "Submit",
40
- submitButtonVariant = "primary"
40
+ submitButtonVariant = "primary",
41
+ validationErrors
41
42
  }) {
42
43
  const portalContainerRef = useRef(null);
43
44
  const allFieldDefinitions = useMemo(() => flattenFieldDefinitions(formContent), [formContent]);
@@ -91,12 +92,13 @@ export const BaseForm = /*#__PURE__*/memo(function ({
91
92
  const labelByFieldKey = useMemo(() => new Map(allFieldDefinitions.map(d => [d.fieldKey, d.label])), [allFieldDefinitions]);
92
93
 
93
94
  // RHF reuses the same errors object reference across renders so we cannot memoize errorEntries
94
- const errorEntries = Object.entries(errors).map(([key, entry]) => ({
95
+ const fieldErrorEntries = Object.entries(errors).map(([key, entry]) => ({
95
96
  label: labelByFieldKey.get(key) ?? key,
96
- message: entry?.message ?? "Invalid"
97
+ message: entry?.message ?? "The parameter value is invalid"
97
98
  }));
99
+ const errorEntries = validationErrors != null && validationErrors.length > 0 ? [...fieldErrorEntries, ...validationErrors] : fieldErrorEntries;
98
100
  const areErrorsPresent = errorEntries.length > 0;
99
- const buttonErrorMessage = areErrorsPresent ? "Some fields are invalid" : submissionErrorMessage;
101
+ const buttonErrorMessage = areErrorsPresent ? fieldErrorEntries.length > 0 ? "Some fields are invalid" : "Submission criteria not met" : submissionErrorMessage;
100
102
  return /*#__PURE__*/React.createElement("form", {
101
103
  ref: portalContainerRef,
102
104
  className: classNames(styles.osdkForm, className)
@@ -233,7 +235,7 @@ function ErrorIndicator({
233
235
  }), count === 1 ? "1 issue" : `${count} issues`)), /*#__PURE__*/React.createElement(Tooltip.Portal, null, /*#__PURE__*/React.createElement(Tooltip.Positioner, null, /*#__PURE__*/React.createElement(Tooltip.Popup, null, /*#__PURE__*/React.createElement(Tooltip.Arrow, null), /*#__PURE__*/React.createElement("ul", {
234
236
  className: styles.osdkFormErrorList
235
237
  }, errorEntries.map(entry => /*#__PURE__*/React.createElement("li", {
236
- key: entry.label
237
- }, /*#__PURE__*/React.createElement("strong", null, entry.label, ":"), " ", entry.message)))))));
238
+ key: `${entry.label ?? ""}:${entry.message}`
239
+ }, entry.label != null && /*#__PURE__*/React.createElement("strong", null, entry.label, ": "), entry.message)))))));
238
240
  }
239
241
  //# sourceMappingURL=BaseForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseForm.js","names":["Error","ErrorIcon","classNames","React","memo","useCallback","useMemo","useRef","useState","useForm","ActionButton","SkeletonBar","Tooltip","useAsyncAction","FieldBridge","FormHeader","FormSection","styles","BaseForm","formTitle","formContent","formState","controlledFormState","onFieldValueChange","onSubmit","isSubmitDisabled","isPending","isLoading","className","submitButtonText","submitButtonVariant","portalContainerRef","allFieldDefinitions","flattenFieldDefinitions","defaultValues","buildDefaultValues","control","trigger","getValues","errors","mode","values","hasAttemptedSubmit","setHasAttemptedSubmit","isSubmitting","error","submissionError","execute","executeSubmit","clearError","submissionErrorMessage","message","undefined","submitForm","isValid","handleFieldChange","fieldKey","value","labelByFieldKey","Map","map","d","label","errorEntries","Object","entries","key","entry","get","areErrorsPresent","length","buttonErrorMessage","createElement","ref","osdkForm","title","role","osdkFormFields","FORM_SKELETON","item","type","definition","fieldDef","onExternalChange","portalContainer","sectionErrorCount","fields","reduce","count","field","errorCount","osdkFormFooter","ErrorIndicator","osdkFormSubmitButton","SubmitButton","errorMessage","buttonText","buttonVariant","onClick","result","push","SKELETON_FIELD_COUNT","Array","from","_","i","osdkFormSkeletonField","osdkFormSkeletonLabel","osdkFormSkeletonInput","fieldDefinitions","def","props","fieldComponentProps","defaultValue","buttonLabel","button","variant","disabled","Root","defaultOpen","Trigger","render","osdkTooltipTriggerWrapper","Portal","Positioner","Popup","Arrow","osdkFormErrorIndicator","size","osdkFormErrorList"],"sources":["BaseForm.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 as ErrorIcon } from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport React, { memo, useCallback, useMemo, useRef, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { ActionButton } from \"../base-components/action-button/ActionButton.js\";\nimport { SkeletonBar } from \"../base-components/skeleton/SkeletonBar.js\";\nimport { Tooltip } from \"../base-components/tooltip/Tooltip.js\";\nimport { useAsyncAction } from \"../shared/hooks/useAsyncAction.js\";\nimport type { BaseFormProps, FormContentItem } from \"./ActionFormApi.js\";\nimport { FieldBridge } from \"./fields/FieldBridge.js\";\nimport type { RendererFieldDefinition } from \"./FormFieldApi.js\";\nimport { FormHeader } from \"./FormHeader.js\";\nimport { FormSection } from \"./FormSection.js\";\n\nimport styles from \"./BaseForm.module.css\";\n\nexport const BaseForm: React.FC<BaseFormProps> = memo(function BaseFormFn({\n formTitle,\n formContent,\n formState: controlledFormState,\n onFieldValueChange,\n onSubmit,\n isSubmitDisabled = false,\n isPending = false,\n isLoading = false,\n className,\n submitButtonText = \"Submit\",\n submitButtonVariant = \"primary\",\n}: BaseFormProps): React.ReactElement {\n const portalContainerRef = useRef<HTMLFormElement>(null);\n const isControlled = controlledFormState != null;\n\n const allFieldDefinitions = useMemo(\n () => flattenFieldDefinitions(formContent),\n [formContent],\n );\n\n const defaultValues = useMemo(\n () => buildDefaultValues(allFieldDefinitions),\n [allFieldDefinitions],\n );\n\n const {\n control,\n trigger,\n getValues,\n formState: { errors },\n } = useForm<Record<string, unknown>>({\n // Validate on blur first, then revalidate on change after the first\n // error. This gives the user a chance to finish typing before seeing\n // errors, while staying responsive once an error is surfaced.\n mode: \"onTouched\",\n ...(isControlled ? { values: controlledFormState } : { defaultValues }),\n });\n\n const [hasAttemptedSubmit, setHasAttemptedSubmit] = useState(false);\n\n const {\n isPending: isSubmitting,\n error: submissionError,\n execute: executeSubmit,\n clearError,\n } = useAsyncAction(onSubmit);\n const submissionErrorMessage =\n submissionError != null\n ? submissionError instanceof Error\n ? submissionError.message\n : // TODO: provide better error message\n \"Submission failed\"\n : undefined;\n\n const submitForm = useCallback(async () => {\n setHasAttemptedSubmit(true);\n\n const isValid = await trigger();\n if (!isValid) {\n return;\n }\n\n // In controlled mode, always submit the controlled state, not RHF's\n // internal state. Between a user keystroke and the parent re-rendering,\n // RHF's store may hold the user-typed value rather than the parent's\n // value. Using controlledFormState directly preserves the existing\n // guarantee that controlled mode submits the parent's state.\n await executeSubmit(controlledFormState ?? getValues());\n }, [trigger, executeSubmit, controlledFormState, getValues]);\n\n const handleFieldChange = useCallback(\n (fieldKey: string, value: unknown) => {\n clearError();\n onFieldValueChange?.(fieldKey, value);\n },\n [clearError, onFieldValueChange],\n );\n\n const labelByFieldKey = useMemo(\n () => new Map(allFieldDefinitions.map((d) => [d.fieldKey, d.label])),\n [allFieldDefinitions],\n );\n\n // RHF reuses the same errors object reference across renders so we cannot memoize errorEntries\n const errorEntries = Object.entries(errors).map(([key, entry]) => ({\n label: labelByFieldKey.get(key) ?? key,\n message: entry?.message ?? \"Invalid\",\n }));\n const areErrorsPresent = errorEntries.length > 0;\n const buttonErrorMessage = areErrorsPresent\n ? \"Some fields are invalid\"\n : submissionErrorMessage;\n const isFormPending = isPending || isSubmitting;\n const isSubmitButtonDisabled =\n isSubmitDisabled || (hasAttemptedSubmit && areErrorsPresent);\n\n return (\n <form\n ref={portalContainerRef}\n className={classNames(styles.osdkForm, className)}\n // Workshop widgets can run in iframes without `allow-forms`, where\n // native form submission is blocked. Keep the form landmark, but do not\n // wire any form-level submit handlers; the submit button invokes our\n // JavaScript submit path directly.\n >\n {formTitle != null && <FormHeader title={formTitle} />}\n {isLoading && allFieldDefinitions.length === 0 && (\n <div\n role=\"status\"\n aria-label=\"Loading form fields\"\n className={styles.osdkFormFields}\n >\n {FORM_SKELETON}\n </div>\n )}\n <div className={styles.osdkFormFields}>\n {formContent.map((item) => {\n if (item.type === \"field\") {\n return (\n <FieldBridge\n key={item.definition.fieldKey}\n fieldDef={item.definition}\n control={control}\n onExternalChange={handleFieldChange}\n portalContainer={portalContainerRef}\n />\n );\n }\n const sectionErrorCount = item.definition.fields.reduce(\n (count, field) => count + (errors[field.fieldKey] != null ? 1 : 0),\n 0,\n );\n return (\n <FormSection\n key={item.key}\n definition={item.definition}\n errorCount={sectionErrorCount}\n >\n {item.definition.fields.map((fieldDef) => (\n <FieldBridge\n key={fieldDef.fieldKey}\n fieldDef={fieldDef}\n control={control}\n onExternalChange={handleFieldChange}\n portalContainer={portalContainerRef}\n />\n ))}\n </FormSection>\n );\n })}\n </div>\n <div className={styles.osdkFormFooter}>\n <ErrorIndicator errorEntries={errorEntries} />\n <div className={styles.osdkFormSubmitButton}>\n <SubmitButton\n isPending={isFormPending}\n isSubmitDisabled={isSubmitButtonDisabled}\n errorMessage={buttonErrorMessage}\n buttonText={submitButtonText}\n buttonVariant={submitButtonVariant}\n onClick={submitForm}\n />\n </div>\n </div>\n </form>\n );\n});\n\n/**\n * Extracts all RendererFieldDefinitions from formContent, flattening\n * section fields into a single array. RHF sees a flat field namespace\n * regardless of visual grouping, so this is used to build default values\n * and the field-key-to-label map for error display.\n */\nfunction flattenFieldDefinitions(\n formContent: ReadonlyArray<FormContentItem>,\n): ReadonlyArray<RendererFieldDefinition> {\n const result: RendererFieldDefinition[] = [];\n for (const item of formContent) {\n if (item.type === \"field\") {\n result.push(item.definition);\n } else {\n for (const fieldDef of item.definition.fields) {\n result.push(fieldDef);\n }\n }\n }\n return result;\n}\n\nconst SKELETON_FIELD_COUNT = 3;\n\n// Mimics the label + input layout of real form fields.\nconst FORM_SKELETON = Array.from({ length: SKELETON_FIELD_COUNT }, (_, i) => (\n <div key={i} className={styles.osdkFormSkeletonField}>\n <SkeletonBar className={styles.osdkFormSkeletonLabel} />\n <SkeletonBar className={styles.osdkFormSkeletonInput} />\n </div>\n));\n\nfunction buildDefaultValues(\n fieldDefinitions: ReadonlyArray<RendererFieldDefinition>,\n): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n for (const def of fieldDefinitions) {\n const props: Record<string, unknown> = def.fieldComponentProps;\n if (\"defaultValue\" in props) {\n values[def.fieldKey] = props.defaultValue;\n }\n }\n return values;\n}\n\ninterface ErrorEntry {\n label: string;\n message: string;\n}\n\ninterface SubmitButtonProps {\n isPending: boolean;\n isSubmitDisabled: boolean;\n errorMessage: string | undefined;\n buttonText: string;\n buttonVariant: \"primary\" | \"secondary\";\n onClick: () => void;\n}\n\nconst SubmitButton = memo(function SubmitButtonFn({\n isPending,\n isSubmitDisabled,\n errorMessage,\n buttonText,\n buttonVariant,\n onClick,\n}: SubmitButtonProps): React.ReactElement {\n const buttonLabel = isPending ? \"Submitting\\u2026\" : buttonText;\n const button = (\n <ActionButton\n type=\"button\"\n variant={buttonVariant}\n disabled={isSubmitDisabled || isPending}\n onClick={onClick}\n >\n {buttonLabel}\n </ActionButton>\n );\n\n if (errorMessage == null) {\n return button;\n }\n\n return (\n <Tooltip.Root defaultOpen={true}>\n <Tooltip.Trigger\n render={<span className={styles.osdkTooltipTriggerWrapper} />}\n >\n {button}\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Positioner>\n <Tooltip.Popup>\n <Tooltip.Arrow />\n {errorMessage}\n </Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n});\n\ninterface ErrorIndicatorProps {\n errorEntries: ReadonlyArray<ErrorEntry>;\n}\n\n// memo omitted: errorEntries is always a new array (RHF reuses the same errors ref)\nfunction ErrorIndicator({\n errorEntries,\n}: ErrorIndicatorProps): React.ReactElement | null {\n if (errorEntries.length === 0) {\n return null;\n }\n\n const count = errorEntries.length;\n\n return (\n <Tooltip.Root>\n <Tooltip.Trigger>\n <span className={styles.osdkFormErrorIndicator}>\n <ErrorIcon size={14} />\n {count === 1 ? \"1 issue\" : `${count} issues`}\n </span>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Positioner>\n <Tooltip.Popup>\n <Tooltip.Arrow />\n <ul className={styles.osdkFormErrorList}>\n {errorEntries.map((entry) => (\n <li key={entry.label}>\n <strong>{entry.label}:</strong> {entry.message}\n </li>\n ))}\n </ul>\n </Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,IAAIC,SAAS,QAAQ,oBAAoB;AACvD,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC3E,SAASC,OAAO,QAAQ,iBAAiB;AAEzC,SAASC,YAAY,QAAQ,kDAAkD;AAC/E,SAASC,WAAW,QAAQ,4CAA4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,gBAC7C5H,KAAA,CAAAqE,aAAA,CAACvE,SAAS;IAAC+H,IAAI,EAAE;EAAG,CAAE,CAAC,EACtBxC,KAAK,KAAK,CAAC,GAAG,SAAS,GAAG,GAAGA,KAAK,SAC/B,CACS,CAAC,eAClBrF,KAAA,CAAAqE,aAAA,CAAC5D,OAAO,CAAC+G,MAAM,qBACbxH,KAAA,CAAAqE,aAAA,CAAC5D,OAAO,CAACgH,UAAU,qBACjBzH,KAAA,CAAAqE,aAAA,CAAC5D,OAAO,CAACiH,KAAK,qBACZ1H,KAAA,CAAAqE,aAAA,CAAC5D,OAAO,CAACkH,KAAK,MAAE,CAAC,eACjB3H,KAAA,CAAAqE,aAAA;IAAI5C,SAAS,EAAEX,MAAM,CAACgH;EAAkB,GACrClE,YAAY,CAACH,GAAG,CAAEO,KAAK,iBACtBhE,KAAA,CAAAqE,aAAA;IAAIN,GAAG,EAAEC,KAAK,CAACL;EAAM,gBACnB3D,KAAA,CAAAqE,aAAA,iBAASL,KAAK,CAACL,KAAK,EAAC,GAAS,CAAC,KAAC,EAACK,KAAK,CAAChB,OACrC,CACL,CACC,CACS,CACG,CACN,CACJ,CAAC;AAEnB","ignoreList":[]}
1
+ {"version":3,"file":"BaseForm.js","names":["Error","ErrorIcon","classNames","React","memo","useCallback","useMemo","useRef","useState","useForm","ActionButton","SkeletonBar","Tooltip","useAsyncAction","FieldBridge","FormHeader","FormSection","styles","BaseForm","formTitle","formContent","formState","controlledFormState","onFieldValueChange","onSubmit","isSubmitDisabled","isPending","isLoading","className","submitButtonText","submitButtonVariant","validationErrors","portalContainerRef","allFieldDefinitions","flattenFieldDefinitions","defaultValues","buildDefaultValues","control","trigger","getValues","errors","mode","values","hasAttemptedSubmit","setHasAttemptedSubmit","isSubmitting","error","submissionError","execute","executeSubmit","clearError","submissionErrorMessage","message","undefined","submitForm","isValid","handleFieldChange","fieldKey","value","labelByFieldKey","Map","map","d","label","fieldErrorEntries","Object","entries","key","entry","get","errorEntries","length","areErrorsPresent","buttonErrorMessage","createElement","ref","osdkForm","title","role","osdkFormFields","FORM_SKELETON","item","type","definition","fieldDef","onExternalChange","portalContainer","sectionErrorCount","fields","reduce","count","field","errorCount","osdkFormFooter","ErrorIndicator","osdkFormSubmitButton","SubmitButton","errorMessage","buttonText","buttonVariant","onClick","result","push","SKELETON_FIELD_COUNT","Array","from","_","i","osdkFormSkeletonField","osdkFormSkeletonLabel","osdkFormSkeletonInput","fieldDefinitions","def","props","fieldComponentProps","defaultValue","buttonLabel","button","variant","disabled","Root","defaultOpen","Trigger","render","osdkTooltipTriggerWrapper","Portal","Positioner","Popup","Arrow","osdkFormErrorIndicator","size","osdkFormErrorList"],"sources":["BaseForm.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 as ErrorIcon } from \"@blueprintjs/icons\";\nimport classNames from \"classnames\";\nimport React, { memo, useCallback, useMemo, useRef, useState } from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport { ActionButton } from \"../base-components/action-button/ActionButton.js\";\nimport { SkeletonBar } from \"../base-components/skeleton/SkeletonBar.js\";\nimport { Tooltip } from \"../base-components/tooltip/Tooltip.js\";\nimport { useAsyncAction } from \"../shared/hooks/useAsyncAction.js\";\nimport type {\n BaseFormProps,\n FormErrorEntry,\n FormContentItem,\n} from \"./ActionFormApi.js\";\nimport { FieldBridge } from \"./fields/FieldBridge.js\";\nimport type { RendererFieldDefinition } from \"./FormFieldApi.js\";\nimport { FormHeader } from \"./FormHeader.js\";\nimport { FormSection } from \"./FormSection.js\";\n\nimport styles from \"./BaseForm.module.css\";\n\nexport const BaseForm: React.FC<BaseFormProps> = memo(function BaseFormFn({\n formTitle,\n formContent,\n formState: controlledFormState,\n onFieldValueChange,\n onSubmit,\n isSubmitDisabled = false,\n isPending = false,\n isLoading = false,\n className,\n submitButtonText = \"Submit\",\n submitButtonVariant = \"primary\",\n validationErrors,\n}: BaseFormProps): React.ReactElement {\n const portalContainerRef = useRef<HTMLFormElement>(null);\n const isControlled = controlledFormState != null;\n\n const allFieldDefinitions = useMemo(\n () => flattenFieldDefinitions(formContent),\n [formContent],\n );\n\n const defaultValues = useMemo(\n () => buildDefaultValues(allFieldDefinitions),\n [allFieldDefinitions],\n );\n\n const {\n control,\n trigger,\n getValues,\n formState: { errors },\n } = useForm<Record<string, unknown>>({\n // Validate on blur first, then revalidate on change after the first\n // error. This gives the user a chance to finish typing before seeing\n // errors, while staying responsive once an error is surfaced.\n mode: \"onTouched\",\n ...(isControlled ? { values: controlledFormState } : { defaultValues }),\n });\n\n const [hasAttemptedSubmit, setHasAttemptedSubmit] = useState(false);\n\n const {\n isPending: isSubmitting,\n error: submissionError,\n execute: executeSubmit,\n clearError,\n } = useAsyncAction(onSubmit);\n const submissionErrorMessage =\n submissionError != null\n ? submissionError instanceof Error\n ? submissionError.message\n : // TODO: provide better error message\n \"Submission failed\"\n : undefined;\n\n const submitForm = useCallback(async () => {\n setHasAttemptedSubmit(true);\n\n const isValid = await trigger();\n if (!isValid) {\n return;\n }\n\n // In controlled mode, always submit the controlled state, not RHF's\n // internal state. Between a user keystroke and the parent re-rendering,\n // RHF's store may hold the user-typed value rather than the parent's\n // value. Using controlledFormState directly preserves the existing\n // guarantee that controlled mode submits the parent's state.\n await executeSubmit(controlledFormState ?? getValues());\n }, [trigger, executeSubmit, controlledFormState, getValues]);\n\n const handleFieldChange = useCallback(\n (fieldKey: string, value: unknown) => {\n clearError();\n onFieldValueChange?.(fieldKey, value);\n },\n [clearError, onFieldValueChange],\n );\n\n const labelByFieldKey = useMemo(\n () => new Map(allFieldDefinitions.map((d) => [d.fieldKey, d.label])),\n [allFieldDefinitions],\n );\n\n // RHF reuses the same errors object reference across renders so we cannot memoize errorEntries\n const fieldErrorEntries: FormErrorEntry[] = Object.entries(errors).map(\n ([key, entry]) => ({\n label: labelByFieldKey.get(key) ?? key,\n message: entry?.message ?? \"The parameter value is invalid\",\n }),\n );\n const errorEntries: ReadonlyArray<FormErrorEntry> =\n validationErrors != null && validationErrors.length > 0\n ? [...fieldErrorEntries, ...validationErrors]\n : fieldErrorEntries;\n const areErrorsPresent = errorEntries.length > 0;\n const buttonErrorMessage = areErrorsPresent\n ? fieldErrorEntries.length > 0\n ? \"Some fields are invalid\"\n : \"Submission criteria not met\"\n : submissionErrorMessage;\n const isFormPending = isPending || isSubmitting;\n const isSubmitButtonDisabled =\n isSubmitDisabled || (hasAttemptedSubmit && areErrorsPresent);\n\n return (\n <form\n ref={portalContainerRef}\n className={classNames(styles.osdkForm, className)}\n // Workshop widgets can run in iframes without `allow-forms`, where\n // native form submission is blocked. Keep the form landmark, but do not\n // wire any form-level submit handlers; the submit button invokes our\n // JavaScript submit path directly.\n >\n {formTitle != null && <FormHeader title={formTitle} />}\n {isLoading && allFieldDefinitions.length === 0 && (\n <div\n role=\"status\"\n aria-label=\"Loading form fields\"\n className={styles.osdkFormFields}\n >\n {FORM_SKELETON}\n </div>\n )}\n <div className={styles.osdkFormFields}>\n {formContent.map((item) => {\n if (item.type === \"field\") {\n return (\n <FieldBridge\n key={item.definition.fieldKey}\n fieldDef={item.definition}\n control={control}\n onExternalChange={handleFieldChange}\n portalContainer={portalContainerRef}\n />\n );\n }\n const sectionErrorCount = item.definition.fields.reduce(\n (count, field) => count + (errors[field.fieldKey] != null ? 1 : 0),\n 0,\n );\n return (\n <FormSection\n key={item.key}\n definition={item.definition}\n errorCount={sectionErrorCount}\n >\n {item.definition.fields.map((fieldDef) => (\n <FieldBridge\n key={fieldDef.fieldKey}\n fieldDef={fieldDef}\n control={control}\n onExternalChange={handleFieldChange}\n portalContainer={portalContainerRef}\n />\n ))}\n </FormSection>\n );\n })}\n </div>\n <div className={styles.osdkFormFooter}>\n <ErrorIndicator errorEntries={errorEntries} />\n <div className={styles.osdkFormSubmitButton}>\n <SubmitButton\n isPending={isFormPending}\n isSubmitDisabled={isSubmitButtonDisabled}\n errorMessage={buttonErrorMessage}\n buttonText={submitButtonText}\n buttonVariant={submitButtonVariant}\n onClick={submitForm}\n />\n </div>\n </div>\n </form>\n );\n});\n\n/**\n * Extracts all RendererFieldDefinitions from formContent, flattening\n * section fields into a single array. RHF sees a flat field namespace\n * regardless of visual grouping, so this is used to build default values\n * and the field-key-to-label map for error display.\n */\nfunction flattenFieldDefinitions(\n formContent: ReadonlyArray<FormContentItem>,\n): ReadonlyArray<RendererFieldDefinition> {\n const result: RendererFieldDefinition[] = [];\n for (const item of formContent) {\n if (item.type === \"field\") {\n result.push(item.definition);\n } else {\n for (const fieldDef of item.definition.fields) {\n result.push(fieldDef);\n }\n }\n }\n return result;\n}\n\nconst SKELETON_FIELD_COUNT = 3;\n\n// Mimics the label + input layout of real form fields.\nconst FORM_SKELETON = Array.from({ length: SKELETON_FIELD_COUNT }, (_, i) => (\n <div key={i} className={styles.osdkFormSkeletonField}>\n <SkeletonBar className={styles.osdkFormSkeletonLabel} />\n <SkeletonBar className={styles.osdkFormSkeletonInput} />\n </div>\n));\n\nfunction buildDefaultValues(\n fieldDefinitions: ReadonlyArray<RendererFieldDefinition>,\n): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n for (const def of fieldDefinitions) {\n const props: Record<string, unknown> = def.fieldComponentProps;\n if (\"defaultValue\" in props) {\n values[def.fieldKey] = props.defaultValue;\n }\n }\n return values;\n}\n\ninterface SubmitButtonProps {\n isPending: boolean;\n isSubmitDisabled: boolean;\n errorMessage: string | undefined;\n buttonText: string;\n buttonVariant: \"primary\" | \"secondary\";\n onClick: () => void;\n}\n\nconst SubmitButton = memo(function SubmitButtonFn({\n isPending,\n isSubmitDisabled,\n errorMessage,\n buttonText,\n buttonVariant,\n onClick,\n}: SubmitButtonProps): React.ReactElement {\n const buttonLabel = isPending ? \"Submitting\\u2026\" : buttonText;\n const button = (\n <ActionButton\n type=\"button\"\n variant={buttonVariant}\n disabled={isSubmitDisabled || isPending}\n onClick={onClick}\n >\n {buttonLabel}\n </ActionButton>\n );\n\n if (errorMessage == null) {\n return button;\n }\n\n return (\n <Tooltip.Root defaultOpen={true}>\n <Tooltip.Trigger\n render={<span className={styles.osdkTooltipTriggerWrapper} />}\n >\n {button}\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Positioner>\n <Tooltip.Popup>\n <Tooltip.Arrow />\n {errorMessage}\n </Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n});\n\ninterface ErrorIndicatorProps {\n errorEntries: ReadonlyArray<FormErrorEntry>;\n}\n\n// memo omitted: errorEntries is always a new array (RHF reuses the same errors ref)\nfunction ErrorIndicator({\n errorEntries,\n}: ErrorIndicatorProps): React.ReactElement | null {\n if (errorEntries.length === 0) {\n return null;\n }\n\n const count = errorEntries.length;\n\n return (\n <Tooltip.Root>\n <Tooltip.Trigger>\n <span className={styles.osdkFormErrorIndicator}>\n <ErrorIcon size={14} />\n {count === 1 ? \"1 issue\" : `${count} issues`}\n </span>\n </Tooltip.Trigger>\n <Tooltip.Portal>\n <Tooltip.Positioner>\n <Tooltip.Popup>\n <Tooltip.Arrow />\n <ul className={styles.osdkFormErrorList}>\n {errorEntries.map((entry) => (\n <li key={`${entry.label ?? \"\"}:${entry.message}`}>\n {entry.label != null && <strong>{entry.label}: </strong>}\n {entry.message}\n </li>\n ))}\n </ul>\n </Tooltip.Popup>\n </Tooltip.Positioner>\n </Tooltip.Portal>\n </Tooltip.Root>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,IAAIC,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,CAAC,EACvDK,KAAK,CAAChB,OACL,CACL,CACC,CACS,CACG,CACN,CACJ,CAAC;AAEnB","ignoreList":[]}
@@ -87,7 +87,7 @@
87
87
  }
88
88
 
89
89
  .osdkFormErrorList {
90
- list-style: none;
90
+ list-style: disc;
91
91
  margin: 0;
92
- padding: 0;
92
+ padding-left: calc(var(--osdk-surface-spacing) * 2.5);
93
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"action-form.js","names":["ActionForm","_ActionForm","withOsdkMetrics","BaseForm"],"sources":["action-form.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 { ActionForm as _ActionForm } from \"../action-form/ActionForm.js\";\nimport { withOsdkMetrics } from \"../util/withOsdkMetrics.js\";\nexport const ActionForm: typeof _ActionForm = withOsdkMetrics(\n _ActionForm,\n \"ActionForm\",\n);\nexport type {\n ActionFormContentItem,\n ActionFormProps,\n ActionFormSectionDefinition,\n BaseFormProps,\n FormContentItem,\n FormError,\n FormSectionDefinition,\n FormState,\n} from \"../action-form/ActionFormApi.js\";\nexport { BaseForm } from \"../action-form/BaseForm.js\";\nexport type {\n ActionParameters,\n BaseFormFieldProps,\n CustomFieldProps,\n DropdownFieldProps,\n FieldComponent,\n FieldValueType,\n FilePickerProps,\n FormFieldDefinition,\n FormFieldPropsByType,\n NumberInputFieldProps,\n ObjectSelectFieldProps,\n ObjectSetFieldProps,\n Option,\n PortalContainer,\n RadioButtonsFieldProps,\n RendererFieldDefinition,\n TextAreaFieldProps,\n TextInputFieldProps,\n UnsupportedFieldProps,\n ValidationError,\n} from \"../action-form/FormFieldApi.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,IAAIC,WAAW,QAAQ,8BAA8B;AACxE,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,OAAO,MAAMF,UAA8B,GAAGE,eAAe,CAC3DD,WAAW,EACX,YACF,CAAC;AAWD,SAASE,QAAQ,QAAQ,4BAA4B","ignoreList":[]}
1
+ {"version":3,"file":"action-form.js","names":["ActionForm","_ActionForm","withOsdkMetrics","BaseForm"],"sources":["action-form.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 { ActionForm as _ActionForm } from \"../action-form/ActionForm.js\";\nimport { withOsdkMetrics } from \"../util/withOsdkMetrics.js\";\nexport const ActionForm: typeof _ActionForm = withOsdkMetrics(\n _ActionForm,\n \"ActionForm\",\n);\nexport type {\n ActionFormContentItem,\n ActionFormProps,\n ActionFormSectionDefinition,\n BaseFormProps,\n FormErrorEntry,\n FormContentItem,\n FormError,\n FormSectionDefinition,\n FormState,\n} from \"../action-form/ActionFormApi.js\";\nexport { BaseForm } from \"../action-form/BaseForm.js\";\nexport type {\n ActionParameters,\n BaseFormFieldProps,\n CustomFieldProps,\n DropdownFieldProps,\n FieldComponent,\n FieldValueType,\n FilePickerProps,\n FormFieldDefinition,\n FormFieldPropsByType,\n NumberInputFieldProps,\n ObjectSelectFieldProps,\n ObjectSetFieldProps,\n Option,\n PortalContainer,\n RadioButtonsFieldProps,\n RendererFieldDefinition,\n TextAreaFieldProps,\n TextInputFieldProps,\n UnsupportedFieldProps,\n ValidationError,\n} from \"../action-form/FormFieldApi.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,IAAIC,WAAW,QAAQ,8BAA8B;AACxE,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,OAAO,MAAMF,UAA8B,GAAGE,eAAe,CAC3DD,WAAW,EACX,YACF,CAAC;AAYD,SAASE,QAAQ,QAAQ,4BAA4B","ignoreList":[]}
@@ -35,6 +35,8 @@ export const ActionForm = Stable.ActionForm;
35
35
 
36
36
  /** @deprecated Import from `@osdk/react-components/action-form` instead. */
37
37
 
38
+ /** @deprecated Import from `@osdk/react-components/action-form` instead. */
39
+
38
40
  /** @deprecated Import from `@osdk/react-components/action-form` instead. */
39
41
  export const BaseForm = Stable.BaseForm;
40
42
 
@@ -1 +1 @@
1
- {"version":3,"file":"action-form.js","names":["Stable","ActionForm","BaseForm"],"sources":["action-form.ts"],"sourcesContent":["/*\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 type * as Api from \"@osdk/api\";\n\nimport type * as FormFieldApi from \"../../action-form/FormFieldApi.js\";\nimport * as Stable from \"../action-form.js\";\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport const ActionForm: typeof Stable.ActionForm = Stable.ActionForm;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ActionFormContentItem<Q extends Api.ActionDefinition<unknown>> =\n Stable.ActionFormContentItem<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ActionFormProps<Q extends Api.ActionDefinition<unknown>> =\n Stable.ActionFormProps<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ActionFormSectionDefinition<\n Q extends Api.ActionDefinition<unknown>,\n> = Stable.ActionFormSectionDefinition<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type BaseFormProps = Stable.BaseFormProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormContentItem = Stable.FormContentItem;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormError = Stable.FormError;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormSectionDefinition = Stable.FormSectionDefinition;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormState<Q extends Api.ActionDefinition<unknown>> =\n Stable.FormState<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport const BaseForm: typeof Stable.BaseForm = Stable.BaseForm;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ActionParameters<Q extends Api.ActionDefinition<unknown>> =\n Stable.ActionParameters<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type BaseFormFieldProps<V> = Stable.BaseFormFieldProps<V>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type CustomFieldProps<V> = Stable.CustomFieldProps<V>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type DropdownFieldProps<\n V,\n Multiple extends boolean = false,\n> = Stable.DropdownFieldProps<V, Multiple>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FieldComponent = Stable.FieldComponent;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FieldValueType<\n Q extends Api.ActionDefinition<unknown>,\n K extends keyof Stable.ActionParameters<Q> = keyof Stable.ActionParameters<Q>,\n> = Stable.FieldValueType<Q, K>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FilePickerProps = Stable.FilePickerProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormFieldDefinition<\n Q extends Api.ActionDefinition<unknown>,\n K extends FormFieldApi.FieldKey<Q> = FormFieldApi.FieldKey<Q>,\n> = Stable.FormFieldDefinition<Q, K>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormFieldPropsByType = Stable.FormFieldPropsByType;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type NumberInputFieldProps = Stable.NumberInputFieldProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ObjectSelectFieldProps<\n Q extends Api.ObjectTypeDefinition = Api.ObjectTypeDefinition,\n> = Stable.ObjectSelectFieldProps<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ObjectSetFieldProps<T extends Api.ObjectTypeDefinition> =\n Stable.ObjectSetFieldProps<T>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type Option<V> = Stable.Option<V>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type PortalContainer = Stable.PortalContainer;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type RadioButtonsFieldProps<V> = Stable.RadioButtonsFieldProps<V>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type RendererFieldDefinition = Stable.RendererFieldDefinition;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type TextAreaFieldProps = Stable.TextAreaFieldProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type TextInputFieldProps = Stable.TextInputFieldProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type UnsupportedFieldProps = Stable.UnsupportedFieldProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ValidationError = Stable.ValidationError;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,KAAKA,MAAM,MAAM,mBAAmB;;AAE3C;AACA,OAAO,MAAMC,UAAoC,GAAGD,MAAM,CAACC,UAAU;;AAErE;;AAIA;;AAIA;;AAKA;;AAGA;;AAGA;;AAGA;;AAGA;;AAIA;AACA,OAAO,MAAMC,QAAgC,GAAGF,MAAM,CAACE,QAAQ;;AAE/D;;AAIA;;AAGA;;AAGA;;AAMA;;AAGA;;AAMA;;AAGA;;AAMA;;AAGA;;AAGA;;AAKA;;AAIA;;AAGA;;AAGA;;AAGA;;AAGA;;AAGA;;AAGA;;AAGA","ignoreList":[]}
1
+ {"version":3,"file":"action-form.js","names":["Stable","ActionForm","BaseForm"],"sources":["action-form.ts"],"sourcesContent":["/*\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 type * as Api from \"@osdk/api\";\n\nimport type * as FormFieldApi from \"../../action-form/FormFieldApi.js\";\nimport * as Stable from \"../action-form.js\";\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport const ActionForm: typeof Stable.ActionForm = Stable.ActionForm;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ActionFormContentItem<Q extends Api.ActionDefinition<unknown>> =\n Stable.ActionFormContentItem<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ActionFormProps<Q extends Api.ActionDefinition<unknown>> =\n Stable.ActionFormProps<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ActionFormSectionDefinition<\n Q extends Api.ActionDefinition<unknown>,\n> = Stable.ActionFormSectionDefinition<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type BaseFormProps = Stable.BaseFormProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormContentItem = Stable.FormContentItem;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormError = Stable.FormError;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormErrorEntry = Stable.FormErrorEntry;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormSectionDefinition = Stable.FormSectionDefinition;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormState<Q extends Api.ActionDefinition<unknown>> =\n Stable.FormState<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport const BaseForm: typeof Stable.BaseForm = Stable.BaseForm;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ActionParameters<Q extends Api.ActionDefinition<unknown>> =\n Stable.ActionParameters<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type BaseFormFieldProps<V> = Stable.BaseFormFieldProps<V>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type CustomFieldProps<V> = Stable.CustomFieldProps<V>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type DropdownFieldProps<\n V,\n Multiple extends boolean = false,\n> = Stable.DropdownFieldProps<V, Multiple>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FieldComponent = Stable.FieldComponent;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FieldValueType<\n Q extends Api.ActionDefinition<unknown>,\n K extends keyof Stable.ActionParameters<Q> = keyof Stable.ActionParameters<Q>,\n> = Stable.FieldValueType<Q, K>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FilePickerProps = Stable.FilePickerProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormFieldDefinition<\n Q extends Api.ActionDefinition<unknown>,\n K extends FormFieldApi.FieldKey<Q> = FormFieldApi.FieldKey<Q>,\n> = Stable.FormFieldDefinition<Q, K>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type FormFieldPropsByType = Stable.FormFieldPropsByType;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type NumberInputFieldProps = Stable.NumberInputFieldProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ObjectSelectFieldProps<\n Q extends Api.ObjectTypeDefinition = Api.ObjectTypeDefinition,\n> = Stable.ObjectSelectFieldProps<Q>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ObjectSetFieldProps<T extends Api.ObjectTypeDefinition> =\n Stable.ObjectSetFieldProps<T>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type Option<V> = Stable.Option<V>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type PortalContainer = Stable.PortalContainer;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type RadioButtonsFieldProps<V> = Stable.RadioButtonsFieldProps<V>;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type RendererFieldDefinition = Stable.RendererFieldDefinition;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type TextAreaFieldProps = Stable.TextAreaFieldProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type TextInputFieldProps = Stable.TextInputFieldProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type UnsupportedFieldProps = Stable.UnsupportedFieldProps;\n\n/** @deprecated Import from `@osdk/react-components/action-form` instead. */\nexport type ValidationError = Stable.ValidationError;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,OAAO,KAAKA,MAAM,MAAM,mBAAmB;;AAE3C;AACA,OAAO,MAAMC,UAAoC,GAAGD,MAAM,CAACC,UAAU;;AAErE;;AAIA;;AAIA;;AAKA;;AAGA;;AAGA;;AAGA;;AAGA;;AAGA;;AAIA;AACA,OAAO,MAAMC,QAAgC,GAAGF,MAAM,CAACE,QAAQ;;AAE/D;;AAIA;;AAGA;;AAGA;;AAMA;;AAGA;;AAMA;;AAGA;;AAMA;;AAGA;;AAGA;;AAKA;;AAIA;;AAGA;;AAGA;;AAGA;;AAGA;;AAGA;;AAGA;;AAGA","ignoreList":[]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- const PACKAGE_USER_AGENT = `osdk-react-components/${"0.70.0"}`;
17
+ const PACKAGE_USER_AGENT = `osdk-react-components/${"0.71.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da"}`;
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 = `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,GAAG,mCAAsD;AAEjF,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 = `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,GAAG,iFAAsD;AAEjF,OAAO,SAASC,kBAAkBA,CAACC,aAAqB,EAAU;EAChE,OAAO,GAAGF,kBAAkB,IAAIE,aAAa,EAAE;AACjD","ignoreList":[]}
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAAc,wBAAwC,WAAY;AAElE,OAAO,WAAgD,OAAQ;AAG/D,cACE,uBAGK,oBAAqB;AA2B5B,OAAO,cAAMA,aAAa,UAAU,2BAClCC,OAAO,gBAAgB,OACpB,MAAM","names":["ActionForm: <Q extends ActionDefinition<unknown>>(\n props: ActionFormProps<Q>,\n) => React.ReactElement","props: ActionFormProps<Q>"],"sources":["../../../src/action-form/ActionForm.tsx"],"version":3,"file":"ActionForm.d.ts"}
1
+ {"mappings":"AAgBA,cACE,wBAGK,WAAY;AAEnB,OAAO,WAMA,OAAQ;AAIf,cACE,uBAIK,oBAAqB;AA4E5B,OAAO,cAAMA,aAAa,UAAU,2BAClCC,OAAO,gBAAgB,OACpB,MAAM","names":["ActionForm: <Q extends ActionDefinition<unknown>>(\n props: ActionFormProps<Q>,\n) => React.ReactElement","props: ActionFormProps<Q>"],"sources":["../../../src/action-form/ActionForm.tsx"],"version":3,"file":"ActionForm.d.ts"}
@@ -189,6 +189,14 @@ export type BaseFormProps = BaseFormCommonProps & ({
189
189
  formState?: undefined
190
190
  onFieldValueChange?: (fieldKey: string, value: unknown) => void
191
191
  });
192
+ /**
193
+ * A message surfaced in the form footer error indicator.
194
+ * The label is optional — omit it for errors not tied to a specific field.
195
+ */
196
+ export interface FormErrorEntry {
197
+ label?: string;
198
+ message: string;
199
+ }
192
200
  interface BaseFormCommonProps {
193
201
  /** Title shown in the form header. Omit to hide the header. */
194
202
  formTitle?: string;
@@ -208,5 +216,14 @@ interface BaseFormCommonProps {
208
216
  submitButtonText?: string;
209
217
  /** Visual variant of the submit button. Default `"primary"`. */
210
218
  submitButtonVariant?: "primary" | "secondary";
219
+ /**
220
+ * External validation errors to display in the footer error indicator
221
+ * alongside field errors. Controlled: the caller owns the array and is
222
+ * responsible for clearing it (e.g. on field change). BaseForm never
223
+ * modifies this value.
224
+ *
225
+ * @default undefined (no external errors)
226
+ */
227
+ validationErrors?: ReadonlyArray<FormErrorEntry>;
211
228
  }
212
229
  export {};
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,kBACA,oBACA,gCACK,WAAY;AAEnB,cACE,UACA,gBACA,qBACA,+BACK,mBAAoB;;;;;;;AAQ3B,YAAY,gBAAgB,UAAU,8BACjC,sBAAsB,KAAK;;;;;CAK1B,WAAW,UAAU;;;;;;CAMrB,oBACEA,UAAUC,WA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;;CAKE,WAAW;;;;;;CAMX,qBAAqBC,kBAAkBC;AACxC,IACD;CACE;CACA,sBAAsBD,kBAAkBC;AACzC;UAGG,oBAAoB;;CAE5B;;CAEA,aAAa,cAAc;;CAE3B,WAAWC,WAAW,4BAA4B;;CAElD;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA,sBAAsB,YAAY;AACnC","names":["updater: (prevState: FormState<Q>) => FormState<Q>","prevState: FormState<Q>","formState: FormState<Q>","applyAction: (\n formState: FormState<Q>,\n ) => Promise<ActionEditResponse | undefined>","results: ActionValidationResponse","results: ActionEditResponse | undefined","error: FormError","fieldKey: string","value: unknown","formState: Record<string, unknown>"],"sources":["../../../src/action-form/ActionFormApi.ts"],"version":3,"file":"ActionFormApi.d.ts"}
1
+ {"mappings":"AAgBA,cACE,kBACA,oBACA,gCACK,WAAY;AAEnB,cACE,UACA,gBACA,qBACA,+BACK,mBAAoB;;;;;;;AAQ3B,YAAY,gBAAgB,UAAU,8BACjC,sBAAsB,KAAK;;;;;CAK1B,WAAW,UAAU;;;;;;CAMrB,oBACEA,UAAUC,WAAW,UAAU,OAAO,UAAU;AAEnD,MACA,sBAAsB,KAAK;CAC1B;CACA,qBACED,UAAUC,WAAW,UAAU,OAAO,UAAU;AAEnD;;;;;;;;;KAUA,wBAAwB,UAAU,6BACnC;CAAE;CAAkC;AAAoC,IACxE;;CAEE,sBAAsB,cAAc,oBAAoB;CACxD;AACD,IACD;;CAEE,wBAAwB,cAAc,sBAAsB;CAC5D;AACD;KAEA,sBAAsB,UAAU,6BACnC,0BAA0B,KAAK,wBAAwB;UAE/C,0BACR,UAAU,mCACF,KAAK,eAAe,cAAc,oBAAoB;;;;;CAK9D,kBAAkB;;;;;;CAOlB;;;;;;;;;CAUA,YACEC,WAAW,UAAU,IACrBC,cACED,WAAW,UAAU,OAClB,QAAQ,oCACV;;;;;;CAOL,wBAAwBE,SAAS;;;;;;CAOjC,aAAaC,SAAS;;;;;;CAOtB,WAAWC,OAAO;AACnB;;;;AAKD,YAAY,UAAU,UAAU,gCAC7B,KAAK,SAAS,OAAM,eAAe,GAAG;;;;AAMzC,YAAY,YACR;CAAE,MAAM;CAAc;AAAgB,IACtC;CAAE,MAAM;CAAW;AAAgB;;;;;;KAOlC;CAAgB;CAAG,UAAU,sBAAsB;IACpD;CAAE,MAAM;CAAS,YAAY;AAAG,IAChC;CAAE,MAAM;CAAW;CAAa,YAAY;AAAG;;;;UAKzC,sBAAsB,GAAG;;CAEjC;;CAEA;;CAEA,QAAQ,cAAc;;;;;CAKtB;;;;;CAKA;;;;;CAKA,cAAc,IAAI;;;;;CAKlB,QAAQ,QAAQ;AACjB;;;;;AAMD,YAAY,sBAAsB,UAAU,6BAC1C,gBAAgB,oBAAoB,IAAI,4BAA4B;;;;AAKtE,iBAAiB,4BACf,UAAU,mCACF,sBAAsB,oBAAoB,IAAI,CAAE;;;;;AAM1D,YAAY,kBAAkB,gBAC5B,yBACA;;;;;AAOF,iBAAiB,8BAA8B,sBAAsB,yBAAyB,CAAE;;;;;;;;;;;AAYhG,YAAY,gBAAgB,uBAEtB;;;;;CAKE,WAAW;;;;;;CAMX,qBAAqBC,kBAAkBC;AACxC,IACD;CACE;CACA,sBAAsBD,kBAAkBC;AACzC;;;;;AAOP,iBAAiB,eAAe;CAC9B;CACA;AACD;UAES,oBAAoB;;CAE5B;;CAEA,aAAa,cAAc;;CAE3B,WAAWC,WAAW,4BAA4B;;CAElD;;CAEA;;CAEA;;CAEA;;CAEA;;CAEA,sBAAsB,YAAY;;;;;;;;;CASlC,mBAAmB,cAAc;AAClC","names":["updater: (prevState: FormState<Q>) => FormState<Q>","prevState: FormState<Q>","formState: FormState<Q>","applyAction: (\n formState: FormState<Q>,\n ) => Promise<ActionEditResponse | undefined>","results: ActionValidationResponse","results: ActionEditResponse | undefined","error: FormError","fieldKey: string","value: unknown","formState: Record<string, unknown>"],"sources":["../../../src/action-form/ActionFormApi.ts"],"version":3,"file":"ActionFormApi.d.ts"}
@@ -1 +1 @@
1
- {"mappings":"AAkBA,OAAO,WAA6D,OAAQ;AAO5E,cAAc,qBAAsC,oBAAqB;AAQzE,OAAO,cAAMA,UAAU,MAAM,GAAG","names":["BaseForm: React.FC<BaseFormProps>"],"sources":["../../../src/action-form/BaseForm.tsx"],"version":3,"file":"BaseForm.d.ts"}
1
+ {"mappings":"AAkBA,OAAO,WAA6D,OAAQ;AAO5E,cACE,qBAGK,oBAAqB;AAQ5B,OAAO,cAAMA,UAAU,MAAM,GAAG","names":["BaseForm: React.FC<BaseFormProps>"],"sources":["../../../src/action-form/BaseForm.tsx"],"version":3,"file":"BaseForm.d.ts"}
@@ -1,5 +1,5 @@
1
1
  import { ActionForm as _ActionForm } from "../action-form/ActionForm.js";
2
2
  export declare const ActionForm: typeof _ActionForm;
3
- export type { ActionFormContentItem, ActionFormProps, ActionFormSectionDefinition, BaseFormProps, FormContentItem, FormError, FormSectionDefinition, FormState } from "../action-form/ActionFormApi.js";
3
+ export type { ActionFormContentItem, ActionFormProps, ActionFormSectionDefinition, BaseFormProps, FormErrorEntry, FormContentItem, FormError, FormSectionDefinition, FormState } from "../action-form/ActionFormApi.js";
4
4
  export { BaseForm } from "../action-form/BaseForm.js";
5
5
  export type { ActionParameters, BaseFormFieldProps, CustomFieldProps, DropdownFieldProps, FieldComponent, FieldValueType, FilePickerProps, FormFieldDefinition, FormFieldPropsByType, NumberInputFieldProps, ObjectSelectFieldProps, ObjectSetFieldProps, Option, PortalContainer, RadioButtonsFieldProps, RendererFieldDefinition, TextAreaFieldProps, TextInputFieldProps, UnsupportedFieldProps, ValidationError } from "../action-form/FormFieldApi.js";
@@ -1 +1 @@
1
- {"mappings":"AAgBA,SAAS,cAAc,mBAAmB,8BAA+B;AAEzE,OAAO,cAAMA,mBAAmB;AAIhC,cACE,uBACA,iBACA,6BACA,eACA,iBACA,WACA,uBACA,iBACK;AACP,SAAS,gBAAgB;AACzB,cACE,kBACA,oBACA,kBACA,oBACA,gBACA,gBACA,iBACA,qBACA,sBACA,uBACA,wBACA,qBACA,QACA,iBACA,wBACA,yBACA,oBACA,qBACA,uBACA,uBACK","names":["ActionForm: typeof _ActionForm"],"sources":["../../../src/public/action-form.ts"],"version":3,"file":"action-form.d.ts"}
1
+ {"mappings":"AAgBA,SAAS,cAAc,mBAAmB,8BAA+B;AAEzE,OAAO,cAAMA,mBAAmB;AAIhC,cACE,uBACA,iBACA,6BACA,eACA,gBACA,iBACA,WACA,uBACA,iBACK;AACP,SAAS,gBAAgB;AACzB,cACE,kBACA,oBACA,kBACA,oBACA,gBACA,gBACA,iBACA,qBACA,sBACA,uBACA,wBACA,qBACA,QACA,iBACA,wBACA,yBACA,oBACA,qBACA,uBACA,uBACK","names":["ActionForm: typeof _ActionForm"],"sources":["../../../src/public/action-form.ts"],"version":3,"file":"action-form.d.ts"}
@@ -16,6 +16,8 @@ export type FormContentItem = Stable.FormContentItem;
16
16
  /** @deprecated Import from `@osdk/react-components/action-form` instead. */
17
17
  export type FormError = Stable.FormError;
18
18
  /** @deprecated Import from `@osdk/react-components/action-form` instead. */
19
+ export type FormErrorEntry = Stable.FormErrorEntry;
20
+ /** @deprecated Import from `@osdk/react-components/action-form` instead. */
19
21
  export type FormSectionDefinition = Stable.FormSectionDefinition;
20
22
  /** @deprecated Import from `@osdk/react-components/action-form` instead. */
21
23
  export type FormState<Q extends Api.ActionDefinition<unknown>> = Stable.FormState<Q>;
@@ -1 +1 @@
1
- {"mappings":"AAgBA,iBAAiB,SAAS,WAAY;AAEtC,iBAAiB,kBAAkB,mCAAoC;AACvE,YAAY,YAAY,mBAAoB;;AAG5C,OAAO,cAAMA,mBAAmB,OAAO;;AAGvC,YAAY,sBAAsB,UAAU,IAAI,6BAC9C,OAAO,sBAAsB;;AAG/B,YAAY,gBAAgB,UAAU,IAAI,6BACxC,OAAO,gBAAgB;;AAGzB,YAAY,4BACV,UAAU,IAAI,6BACZ,OAAO,4BAA4B;;AAGvC,YAAY,gBAAgB,OAAO;;AAGnC,YAAY,kBAAkB,OAAO;;AAGrC,YAAY,YAAY,OAAO;;AAG/B,YAAY,wBAAwB,OAAO;;AAG3C,YAAY,UAAU,UAAU,IAAI,6BAClC,OAAO,UAAU;;AAGnB,OAAO,cAAMC,iBAAiB,OAAO;;AAGrC,YAAY,iBAAiB,UAAU,IAAI,6BACzC,OAAO,iBAAiB;;AAG1B,YAAY,mBAAmB,KAAK,OAAO,mBAAmB;;AAG9D,YAAY,iBAAiB,KAAK,OAAO,iBAAiB;;AAG1D,YAAY;CACV;CACA,2BAA2B;IACzB,OAAO,mBAAmB,GAAG;;AAGjC,YAAY,iBAAiB,OAAO;;AAGpC,YAAY;CACV,UAAU,IAAI;CACd,gBAAgB,OAAO,iBAAiB,WAAW,OAAO,iBAAiB;IACzE,OAAO,eAAe,GAAG;;AAG7B,YAAY,kBAAkB,OAAO;;AAGrC,YAAY;CACV,UAAU,IAAI;CACd,UAAU,aAAa,SAAS,KAAK,aAAa,SAAS;IACzD,OAAO,oBAAoB,GAAG;;AAGlC,YAAY,uBAAuB,OAAO;;AAG1C,YAAY,wBAAwB,OAAO;;AAG3C,YAAY,uBACV,UAAU,IAAI,uBAAuB,IAAI,wBACvC,OAAO,uBAAuB;;AAGlC,YAAY,oBAAoB,UAAU,IAAI,wBAC5C,OAAO,oBAAoB;;AAG7B,YAAY,OAAO,KAAK,OAAO,OAAO;;AAGtC,YAAY,kBAAkB,OAAO;;AAGrC,YAAY,uBAAuB,KAAK,OAAO,uBAAuB;;AAGtE,YAAY,0BAA0B,OAAO;;AAG7C,YAAY,qBAAqB,OAAO;;AAGxC,YAAY,sBAAsB,OAAO;;AAGzC,YAAY,wBAAwB,OAAO;;AAG3C,YAAY,kBAAkB,OAAO","names":["ActionForm: typeof Stable.ActionForm","BaseForm: typeof Stable.BaseForm"],"sources":["../../../../src/public/experimental/action-form.ts"],"version":3,"file":"action-form.d.ts"}
1
+ {"mappings":"AAgBA,iBAAiB,SAAS,WAAY;AAEtC,iBAAiB,kBAAkB,mCAAoC;AACv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A0B,OAAO;;AAG7C,YAAY,qBAAqB,OAAO;;AAGxC,YAAY,sBAAsB,OAAO;;AAGzC,YAAY,wBAAwB,OAAO;;AAG3C,YAAY,kBAAkB,OAAO","names":["ActionForm: typeof Stable.ActionForm","BaseForm: typeof Stable.BaseForm"],"sources":["../../../../src/public/experimental/action-form.ts"],"version":3,"file":"action-form.d.ts"}
@@ -80,18 +80,19 @@ This form is generated from the `BaseFormProps` type in [`ActionFormApi.ts`](htt
80
80
 
81
81
  <!-- AUTOGEN:props START src=src/action-form/ActionFormApi.ts interface=BaseFormProps — generated by scripts/gen-props.mjs; run `pnpm --filter @osdk/react-components gen-props` -->
82
82
 
83
- | Name | Type | Description |
84
- | --------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
85
- | `formTitle` | `string` | Title shown in the form header. Omit to hide the header. |
86
- | `formContent` | `ReadonlyArray<FormContentItem>` | **Required.** The fields and sections to render, in order. |
87
- | `onSubmit` | `(formState: Record<string, unknown>) => Promise<void> \| void` | **Required.** Called when the form is submitted with valid values. Receives the current form state. |
88
- | `isSubmitDisabled` | `boolean` | Whether the submit button is disabled. Default `false`. |
89
- | `isPending` | `boolean` | Whether a submission is in progress. Shows the submit button in a pending state. Default `false`. |
90
- | `isLoading` | `boolean` | Whether the form is loading its fields. Shows a skeleton placeholder. Default `false`. |
91
- | `className` | `string` | Additional CSS class name for the root element. |
92
- | `submitButtonText` | `string` | Label for the submit button. Default `"Submit"`. |
93
- | `submitButtonVariant` | `"primary" \| "secondary"` | Visual variant of the submit button. Default `"primary"`. |
94
- | `formState` | `Record<string, unknown>` | The current field values keyed by field key. If provided, the form state is controlled. |
95
- | `onFieldValueChange` | `(fieldKey: string, value: unknown) => void` | Called when a field value changes. Required when the form state is controlled; also fires in uncontrolled mode so callers can observe changes. |
83
+ | Name | Type | Description |
84
+ | --------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
85
+ | `formTitle` | `string` | Title shown in the form header. Omit to hide the header. |
86
+ | `formContent` | `ReadonlyArray<FormContentItem>` | **Required.** The fields and sections to render, in order. |
87
+ | `onSubmit` | `(formState: Record<string, unknown>) => Promise<void> \| void` | **Required.** Called when the form is submitted with valid values. Receives the current form state. |
88
+ | `isSubmitDisabled` | `boolean` | Whether the submit button is disabled. Default `false`. |
89
+ | `isPending` | `boolean` | Whether a submission is in progress. Shows the submit button in a pending state. Default `false`. |
90
+ | `isLoading` | `boolean` | Whether the form is loading its fields. Shows a skeleton placeholder. Default `false`. |
91
+ | `className` | `string` | Additional CSS class name for the root element. |
92
+ | `submitButtonText` | `string` | Label for the submit button. Default `"Submit"`. |
93
+ | `submitButtonVariant` | `"primary" \| "secondary"` | Visual variant of the submit button. Default `"primary"`. |
94
+ | `validationErrors` | `ReadonlyArray<FormErrorEntry>` | External validation errors to display in the footer error indicator alongside field errors. Controlled: the caller owns the array and is responsible for clearing it (e.g. on field change). BaseForm never modifies this value. Defaults to `undefined (no external errors)`. |
95
+ | `formState` | `Record<string, unknown>` | The current field values keyed by field key. If provided, the form state is controlled. |
96
+ | `onFieldValueChange` | `(fieldKey: string, value: unknown) => void` | Called when a field value changes. Required when the form state is controlled; also fires in uncontrolled mode so callers can observe changes. |
96
97
 
97
98
  <!-- AUTOGEN:props END -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/react-components",
3
- "version": "0.70.0",
3
+ "version": "0.71.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -326,9 +326,9 @@
326
326
  "classnames": "^2.0.0",
327
327
  "react": "^17 || ^18 || ^19",
328
328
  "react-dom": "^17 || ^18 || ^19",
329
- "@osdk/api": "^2.88.0",
330
- "@osdk/client": "^2.88.0",
331
- "@osdk/react": "^2.88.0"
329
+ "@osdk/api": "^2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da",
330
+ "@osdk/client": "^2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da",
331
+ "@osdk/react": "^2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da"
332
332
  },
333
333
  "devDependencies": {
334
334
  "@testing-library/react": "^16.3.0",
@@ -341,11 +341,11 @@
341
341
  "react": "^18.3.1",
342
342
  "react-dom": "^18.3.1",
343
343
  "typescript": "~5.5.4",
344
- "@osdk/api": "2.88.0",
345
- "@osdk/client": "2.88.0",
344
+ "@osdk/api": "2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da",
345
+ "@osdk/client": "2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da",
346
346
  "@osdk/monorepo.api-extractor": "~0.7.0",
347
347
  "@osdk/monorepo.tsconfig": "~0.7.0",
348
- "@osdk/react": "2.88.0"
348
+ "@osdk/react": "2.89.0-main-b8cfd7cc0d80e486c4ac145e259bf97e220d93da"
349
349
  },
350
350
  "publishConfig": {
351
351
  "access": "public"
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkPA7IYPBX_cjs = require('./chunk-PA7IYPBX.cjs');
4
- var chunkWUTJ2FYF_cjs = require('./chunk-WUTJ2FYF.cjs');
5
-
6
- // src/public/email-viewer.ts
7
- var EmailViewer2 = chunkWUTJ2FYF_cjs.withOsdkMetrics(chunkPA7IYPBX_cjs.EmailViewer, "EmailViewer");
8
-
9
- exports.EmailViewer = EmailViewer2;
10
- //# sourceMappingURL=chunk-34K44M7E.cjs.map
11
- //# sourceMappingURL=chunk-34K44M7E.cjs.map
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkRVZE7LPI_cjs = require('./chunk-RVZE7LPI.cjs');
4
- var chunkWUTJ2FYF_cjs = require('./chunk-WUTJ2FYF.cjs');
5
-
6
- // src/public/xml-viewer.ts
7
- var XmlViewer2 = chunkWUTJ2FYF_cjs.withOsdkMetrics(chunkRVZE7LPI_cjs.XmlViewer, "XmlViewer");
8
-
9
- exports.XmlViewer = XmlViewer2;
10
- //# sourceMappingURL=chunk-A3DQM47Z.cjs.map
11
- //# sourceMappingURL=chunk-A3DQM47Z.cjs.map
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkMNJON7D3_cjs = require('./chunk-MNJON7D3.cjs');
4
-
5
- // src/public/experimental/action-form.ts
6
- var ActionForm2 = chunkMNJON7D3_cjs.ActionForm;
7
- var BaseForm2 = chunkMNJON7D3_cjs.BaseForm;
8
-
9
- exports.ActionForm = ActionForm2;
10
- exports.BaseForm = BaseForm2;
11
- //# sourceMappingURL=chunk-BPC7IVVD.cjs.map
12
- //# sourceMappingURL=chunk-BPC7IVVD.cjs.map
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkDTYFQRFD_cjs = require('./chunk-DTYFQRFD.cjs');
4
- var chunkWUTJ2FYF_cjs = require('./chunk-WUTJ2FYF.cjs');
5
-
6
- // src/public/tiff-viewer.ts
7
- var TiffViewer2 = chunkWUTJ2FYF_cjs.withOsdkMetrics(chunkDTYFQRFD_cjs.TiffViewer, "TiffViewer");
8
-
9
- exports.TiffViewer = TiffViewer2;
10
- //# sourceMappingURL=chunk-DUH54L3A.cjs.map
11
- //# sourceMappingURL=chunk-DUH54L3A.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/shared/typedMemo.ts","../../src/shared/hooks/useEventCallback.ts","../../src/action-form/fields/DropdownField.module.css","../../src/action-form/fields/DropdownField.tsx"],"names":["React","React2","useCallback","useState","Select","Select_default","SmallCross","CaretDown","PortalDismissLayer","Combobox","Tick","Combobox_default","Cross"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,IAAM,iBAAiBA,yBAAA,CAAM;ACQ7B,SAAS,iBAAiB,QAAA,EAAU;AACzC,EAAA,MAAM,0BAAA,GAAmCC,iBAAA,CAAA,MAAA,CAAO,CAAA,GAAI,IAAA,KAAS;AAC3D,IA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yright 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 React from \"react\";\n\n/**\n * TODO: Delete this once `React.memo` is typed to not lose generics to `unknown`\n *\n * Context: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087\n */\nexport const typedReactMemo = React.memo;","/*\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 * as React from \"react\";\n\n/**\n * Creates a MutableRefObject with a constant reference. This allows us to pass around a constant reference\n * to a callback, but let the consumer change the callback over time without losing that reference.\n * The callback is only updated after render, so any usage of the callback during render will operate on the\n * previous render's callback. Callbacks created by this hook should **only** be used for event handling.\n * If the callback is called on the first render of a component, it will log an error. In the future,\n * this will throw.\n *\n * ```\n *\n * @param callback\n */\n/* eslint-disable-next-line @typescript-eslint/no-unsafe-function-type */\nexport function useEventCallback(callback) {\n const latestCallbackValueWrapper = React.useRef((...args) => {\n if (typeof globalThis.console !== \"undefined\") {\n globalThis.console.error(\"A callback created with `useEventCallback` was called during the initial render of a component. This will throw an error in the future.\");\n }\n return callback(...args);\n });\n React.useEffect(() => {\n latestCallbackValueWrapper.current = callback;\n }, [callback]);\n return React.useCallback((...args) => latestCallbackValueWrapper.current(...args), []);\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\n.osdkSelectDismissLayer {\n --osdk-portal-dismiss-layer-z-index: var(--osdk-select-z-index);\n}\n\n.osdkComboboxDismissLayer {\n --osdk-portal-dismiss-layer-z-index: var(--osdk-combobox-z-index);\n}\n","function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\n/*\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 { CaretDown, Cross, SmallCross, Tick } from \"@blueprintjs/icons\";\nimport React, { useCallback, useState } from \"react\";\nimport { Combobox } from \"../../base-components/combobox/Combobox.js\";\nimport { Select } from \"../../base-components/select/Select.js\";\nimport { PortalDismissLayer } from \"../../shared/PortalDismissLayer.js\";\nimport { typedReactMemo } from \"../../shared/typedMemo.js\";\nimport comboboxStyles from \"../../base-components/combobox/Combobox.module.css\";\nimport selectStyles from \"../../base-components/select/Select.module.css\";\nimport dropdownStyles from \"./DropdownField.module.css\";\nconst EMPTY_ARRAY = [];\n\n/**\n * SelectDropdown is only used for single-select (the multi-select path\n * always routes to ComboboxDropdown). We keep the `Multiple` generic so\n * the spread from DropdownField type-checks, but SelectDropdown never\n * reads `isMultiple`.\n */\n\nexport const DropdownField = typedReactMemo(function DropdownFieldFn({\n isSearchable = false,\n isMultiple,\n itemToStringLabel,\n renderItemLabel,\n itemToKey,\n value,\n query,\n onQueryChange,\n disableClientSideFiltering,\n popupStatus,\n trailingItem,\n modal = true,\n ...rest\n}) {\n // Ensure always controlled from first render: multi-select needs [],\n // single-select needs null. Passing undefined switches Base UI from\n // uncontrolled to controlled and triggers a warning.\n const normalizedValue = value ?? (isMultiple ? EMPTY_ARRAY : null);\n const resolvedItemToStringLabel = itemToStringLabel ?? defaultItemToStringLabel;\n const resolvedRenderItemLabel = renderItemLabel ?? resolvedItemToStringLabel;\n const getKey = useCallback(item => itemToKey?.(item) ?? resolvedItemToStringLabel(item), [itemToKey, resolvedItemToStringLabel]);\n\n // Multi-select always uses Combobox for the chip-based UI because it looks better\n if (isSearchable || isMultiple) {\n return /*#__PURE__*/React.createElement(ComboboxDropdown, _extends({}, rest, {\n isMultiple: isMultiple,\n value: normalizedValue,\n itemToStringLabel: resolvedItemToStringLabel,\n renderItemLabel: resolvedRenderItemLabel,\n getKey: getKey,\n isSearchable: isSearchable,\n query: query,\n onQueryChange: onQueryChange,\n disableClientSideFiltering: disableClientSideFiltering,\n popupStatus: popupStatus,\n trailingItem: trailingItem,\n modal: modal\n }));\n }\n\n // TODO: Support trailingItem\n return /*#__PURE__*/React.createElement(SelectDropdown, _extends({}, rest, {\n value: normalizedValue,\n itemToStringLabel: resolvedItemToStringLabel,\n renderItemLabel: resolvedRenderItemLabel,\n getKey: getKey,\n modal: modal\n }));\n});\nconst SelectDropdown = typedReactMemo(function SelectDropdownFn({\n id,\n value,\n onChange,\n items,\n itemToStringLabel,\n renderItemLabel,\n getKey,\n isItemEqual,\n placeholder,\n portalRef,\n portalContainer,\n onBlur,\n modal = true,\n disabled\n}) {\n const [open, setOpen] = useState(false);\n const isOpen = !disabled && open;\n const hasValue = value != null;\n const renderSingleSelectedItemLabel = useCallback(selectedValue => selectedValue == null ? null : renderItemLabel(selectedValue), [renderItemLabel]);\n const handleOpenChange = useCallback(nextOpen => {\n if (disabled) {\n return;\n }\n setOpen(nextOpen);\n // Mark the field as touched when the popover closes so RHF validates.\n // Opening the popover does not trigger validation.\n if (!nextOpen) {\n onBlur?.();\n }\n }, [disabled, onBlur]);\n const handleClear = useCallback(() => {\n // SelectDropdown is always single-select, so cleared value is null.\n onChange?.(null);\n handleOpenChange(false);\n }, [onChange, handleOpenChange]);\n const handleDismiss = useCallback(() => {\n handleOpenChange(false);\n }, [handleOpenChange]);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(Select.Root, {\n value: value,\n onValueChange: onChange,\n open: isOpen,\n onOpenChange: handleOpenChange,\n isItemEqualToValue: isItemEqual,\n itemToStringLabel: itemToStringLabel,\n modal: modal,\n disabled: disabled\n }, /*#__PURE__*/React.createElement(Select.Trigger, {\n id: id,\n placeholder: placeholder,\n disabled: disabled\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: selectStyles.osdkSelectValueContainer\n }, /*#__PURE__*/React.createElement(Select.Value, null, renderSingleSelectedItemLabel), placeholder != null && /*#__PURE__*/React.createElement(\"span\", {\n className: selectStyles.osdkSelectPlaceholder\n }, placeholder)), hasValue && /*#__PURE__*/React.createElement(\"span\", {\n role: \"button\",\n \"aria-label\": \"Clear\",\n className: selectStyles.osdkSelectClear,\n \"aria-disabled\": disabled || undefined,\n onMouseDown: disabled ? undefined : preventTriggerOpen,\n onClick: disabled ? undefined : handleClear\n }, /*#__PURE__*/React.createElement(SmallCross, null)), /*#__PURE__*/React.createElement(\"span\", {\n className: selectStyles.osdkSelectIcon\n }, /*#__PURE__*/React.createElement(CaretDown, null))), /*#__PURE__*/React.createElement(Select.Portal, {\n ref: portalRef,\n container: portalContainer\n }, isOpen && modal && /*#__PURE__*/React.createElement(PortalDismissLayer, {\n className: dropdownStyles.osdkSelectDismissLayer,\n onDismiss: handleDismiss\n }), /*#__PURE__*/React.createElement(Select.Positioner, null, /*#__PURE__*/React.createElement(Select.Popup, null, items.map(item => {\n const itemLabel = itemToStringLabel(item);\n return /*#__PURE__*/React.createElement(Select.Item, {\n key: getKey(item),\n value: item,\n label: itemLabel,\n \"aria-label\": itemLabel\n }, renderItemLabel(item));\n }))))));\n});\nconst ComboboxDropdown = typedReactMemo(function ComboboxDropdownFn({\n id,\n value,\n onChange,\n items,\n itemToStringLabel,\n renderItemLabel,\n getKey,\n isItemEqual,\n isMultiple,\n isSearchable,\n placeholder,\n portalRef,\n portalContainer,\n query,\n onQueryChange,\n disableClientSideFiltering,\n popupStatus,\n trailingItem,\n onBlur,\n modal = true,\n disabled\n}) {\n const [open, setOpen] = useState(false);\n const isOpen = !disabled && open;\n const hasValue = isMultiple ? Array.isArray(value) && value.length > 0 : value != null;\n const renderSingleSelectedItemLabel = useCallback(selectedValue => selectedValue == null ? null : renderItemLabel(selectedValue), [renderItemLabel]);\n const handleOpenChange = useCallback(nextOpen => {\n setOpen(nextOpen);\n if (!nextOpen) {\n onBlur?.();\n }\n }, [onBlur]);\n\n // Mark the field as touched on every value change so RHF revalidates\n // immediately — especially important for multi-select where the popup\n // stays open after toggling an item.\n const handleValueChange = useCallback((...args) => {\n onChange?.(...args);\n // Multi-select: popover stays open, so fire onBlur directly.\n // Single-select: popover closes on selection, handleOpenChange(false)\n // already fires onBlur.\n if (isMultiple) {\n onBlur?.();\n }\n }, [onChange, onBlur, isMultiple]);\n const handleClear = useCallback(() => {\n // TypeScript can't narrow the conditional type `Multiple extends true ? V[] : V`\n // at runtime, so we cast through the known parameter type at this single call site.\n const cleared = isMultiple ? EMPTY_ARRAY : null;\n handleValueChange(cleared);\n // Single-select: close after clearing. Multi-select: keep open for continued selection.\n if (!isMultiple) {\n handleOpenChange(false);\n }\n }, [isMultiple, handleValueChange, handleOpenChange]);\n const handleRemoveItem = useCallback(itemToRemove => {\n if (!isMultiple || !Array.isArray(value)) {\n return;\n }\n const next = value.filter(v => isItemEqual != null ? !isItemEqual(v, itemToRemove) : v !== itemToRemove);\n handleValueChange(next);\n }, [isMultiple, value, handleValueChange, isItemEqual]);\n const handleDismiss = useCallback(() => {\n handleOpenChange(false);\n }, [handleOpenChange]);\n const renderItem = useCallback(item => {\n const itemLabel = itemToStringLabel(item);\n return /*#__PURE__*/React.createElement(Combobox.Item, {\n key: getKey(item),\n value: item,\n \"aria-label\": itemLabel\n }, isMultiple && /*#__PURE__*/React.createElement(Combobox.ItemIndicator, null, /*#__PURE__*/React.createElement(Tick, null)), renderItemLabel(item));\n }, [getKey, isMultiple, itemToStringLabel, renderItemLabel]);\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(Combobox.Root, {\n value: value,\n onValueChange: handleValueChange,\n open: isOpen,\n onOpenChange: handleOpenChange,\n multiple: isMultiple,\n itemToStringLabel: itemToStringLabel,\n isItemEqualToValue: isItemEqual,\n items: items,\n inputValue: query,\n onInputValueChange: onQueryChange,\n filter: disableClientSideFiltering ? null : undefined,\n disabled: disabled\n }, /*#__PURE__*/React.createElement(Combobox.Trigger, {\n id: id,\n disabled: disabled,\n className: isMultiple ? comboboxStyles.osdkComboboxTriggerMulti : undefined\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: comboboxStyles.osdkComboboxValueContainer\n }, isMultiple && Array.isArray(value) && value.length > 0 ? /*#__PURE__*/React.createElement(\"div\", {\n className: comboboxStyles.osdkComboboxTriggerChips\n }, value.map(item => /*#__PURE__*/React.createElement(\"span\", {\n key: getKey(item),\n className: comboboxStyles.osdkComboboxTriggerChip\n }, renderItemLabel(item), /*#__PURE__*/React.createElement(\"span\", {\n role: \"button\",\n \"aria-label\": `Remove ${itemToStringLabel(item)}`,\n className: comboboxStyles.osdkComboboxTriggerChipRemove,\n \"aria-disabled\": disabled || undefined,\n onMouseDown: disabled ? undefined : preventTriggerOpen,\n onClick: disabled ? undefined : () => handleRemoveItem(item)\n }, /*#__PURE__*/React.createElement(Cross, {\n size: 12\n }))))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Combobox.Value, null, renderSingleSelectedItemLabel), !hasValue && placeholder != null && /*#__PURE__*/React.createElement(\"span\", {\n className: comboboxStyles.osdkComboboxPlaceholder\n }, placeholder))), hasValue && /*#__PURE__*/React.createElement(\"span\", {\n role: \"button\",\n \"aria-label\": \"Clear\",\n className: comboboxStyles.osdkComboboxClear,\n \"aria-disabled\": disabled || undefined,\n onMouseDown: disabled ? undefined : preventTriggerOpen,\n onClick: disabled ? undefined : handleClear\n }, /*#__PURE__*/React.createElement(SmallCross, null)), /*#__PURE__*/React.createElement(Combobox.Icon, null, /*#__PURE__*/React.createElement(CaretDown, null))), /*#__PURE__*/React.createElement(Combobox.Portal, {\n ref: portalRef,\n container: portalContainer\n }, isOpen && modal && /*#__PURE__*/React.createElement(PortalDismissLayer, {\n className: dropdownStyles.osdkComboboxDismissLayer,\n onDismiss: handleDismiss\n }), /*#__PURE__*/React.createElement(Combobox.Positioner, null, /*#__PURE__*/React.createElement(Combobox.Popup, {\n \"aria-label\": placeholder || \"Options\"\n }, isSearchable && /*#__PURE__*/React.createElement(\"div\", {\n className: comboboxStyles.osdkComboboxPopupSearchInput\n }, /*#__PURE__*/React.createElement(Combobox.SearchInput, {\n placeholder: \"Search\\u2026\"\n })), popupStatus, popupStatus == null && /*#__PURE__*/React.createElement(Combobox.Empty, null, \"No results\"), /*#__PURE__*/React.createElement(Combobox.List, null, /*#__PURE__*/React.createElement(Combobox.Collection, null, renderItem), trailingItem))))));\n});\n\n// Prevent the clear/remove click from bubbling into the trigger\n// and toggling the dropdown open/closed.\nfunction preventTriggerOpen(e) {\n e.stopPropagation();\n e.preventDefault();\n}\nfunction defaultItemToStringLabel(item) {\n if (item == null || typeof item !== \"object\") {\n return String(item);\n }\n if (\"label\" in item && item.label != null && typeof item.label === \"string\") {\n return item.label;\n }\n return String(item);\n}"]}