@osdk/react-components 0.44.0 → 0.44.1-main-fd00f48adf2cf8cfc916d9ecb942bd3795ef7931
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.
- package/CHANGELOG.md +6 -0
- package/build/browser/action-form/ActionFormApi.js.map +1 -1
- package/build/browser/util/UserAgent.js +1 -1
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/chunk-4T5AHE5X.cjs +11 -0
- package/build/cjs/{chunk-YLXJJD54.cjs.map → chunk-4T5AHE5X.cjs.map} +1 -1
- package/build/cjs/{chunk-D7BAQUGI.cjs → chunk-524WG5UI.cjs} +4 -4
- package/build/cjs/{chunk-D7BAQUGI.cjs.map → chunk-524WG5UI.cjs.map} +1 -1
- package/build/cjs/{chunk-KOBBEHQ5.cjs → chunk-5KX3ULTL.cjs} +4 -4
- package/build/cjs/{chunk-KOBBEHQ5.cjs.map → chunk-5KX3ULTL.cjs.map} +1 -1
- package/build/cjs/chunk-6RUPK24T.cjs +11 -0
- package/build/cjs/{chunk-RQM6LNLG.cjs.map → chunk-6RUPK24T.cjs.map} +1 -1
- package/build/cjs/{chunk-X65WLOZN.cjs → chunk-ATA7O6HZ.cjs} +4 -4
- package/build/cjs/{chunk-X65WLOZN.cjs.map → chunk-ATA7O6HZ.cjs.map} +1 -1
- package/build/cjs/chunk-B7NGJR7W.cjs +11 -0
- package/build/cjs/{chunk-W5LEU56M.cjs.map → chunk-B7NGJR7W.cjs.map} +1 -1
- package/build/cjs/chunk-CQVLO3OO.cjs +11 -0
- package/build/cjs/{chunk-PBJYYMMU.cjs.map → chunk-CQVLO3OO.cjs.map} +1 -1
- package/build/cjs/{chunk-7ENXFKYI.cjs → chunk-KNWSEXGL.cjs} +4 -4
- package/build/cjs/{chunk-7ENXFKYI.cjs.map → chunk-KNWSEXGL.cjs.map} +1 -1
- package/build/cjs/{chunk-7ZXDJEGV.cjs → chunk-NYCFURNM.cjs} +4 -4
- package/build/cjs/{chunk-7ZXDJEGV.cjs.map → chunk-NYCFURNM.cjs.map} +1 -1
- package/build/cjs/{chunk-KTPA2XHA.cjs → chunk-UTWVGJ36.cjs} +4 -4
- package/build/cjs/{chunk-KTPA2XHA.cjs.map → chunk-UTWVGJ36.cjs.map} +1 -1
- package/build/cjs/chunk-VRQYG6SA.cjs +11 -0
- package/build/cjs/{chunk-ZGMU42DU.cjs.map → chunk-VRQYG6SA.cjs.map} +1 -1
- package/build/cjs/{chunk-N45BQ26H.cjs → chunk-XNLGPGCH.cjs} +3 -3
- package/build/cjs/chunk-XNLGPGCH.cjs.map +1 -0
- package/build/cjs/{chunk-EM7DJHRL.cjs → chunk-YGPA53OW.cjs} +4 -4
- package/build/cjs/{chunk-EM7DJHRL.cjs.map → chunk-YGPA53OW.cjs.map} +1 -1
- package/build/cjs/{chunk-EM5ILZLP.cjs → chunk-Z4YCKHMT.cjs} +4 -4
- package/build/cjs/{chunk-EM5ILZLP.cjs.map → chunk-Z4YCKHMT.cjs.map} +1 -1
- package/build/cjs/public/experimental/action-form.cjs +4 -4
- package/build/cjs/public/experimental/action-form.d.cts +27 -5
- package/build/cjs/public/experimental/cbac-picker.cjs +11 -11
- package/build/cjs/public/experimental/document-viewer.cjs +4 -4
- package/build/cjs/public/experimental/email-viewer.cjs +3 -3
- package/build/cjs/public/experimental/excel-viewer.cjs +3 -3
- package/build/cjs/public/experimental/filter-list.cjs +15 -15
- package/build/cjs/public/experimental/image-viewer.cjs +3 -3
- package/build/cjs/public/experimental/markdown-renderer.cjs +3 -3
- package/build/cjs/public/experimental/object-table.cjs +21 -21
- package/build/cjs/public/experimental/pdf-viewer.cjs +7 -7
- package/build/cjs/public/experimental/tiff-renderer.cjs +3 -3
- package/build/cjs/public/experimental/video-viewer.cjs +3 -3
- package/build/cjs/public/experimental/xml-viewer.cjs +3 -3
- package/build/cjs/public/experimental.cjs +71 -71
- package/build/esm/action-form/ActionFormApi.js.map +1 -1
- package/build/esm/util/UserAgent.js +1 -1
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/action-form/ActionFormApi.d.ts +27 -5
- package/build/types/action-form/ActionFormApi.d.ts.map +1 -1
- package/docs/ActionForm.md +13 -13
- package/docs/ActionFormOverview.md +96 -0
- package/docs/ObjectTable.md +1 -1
- package/docs/ObjectTableOverview.md +1 -1
- package/package.json +2 -2
- package/build/cjs/chunk-N45BQ26H.cjs.map +0 -1
- package/build/cjs/chunk-PBJYYMMU.cjs +0 -11
- package/build/cjs/chunk-RQM6LNLG.cjs +0 -11
- package/build/cjs/chunk-W5LEU56M.cjs +0 -11
- package/build/cjs/chunk-YLXJJD54.cjs +0 -11
- package/build/cjs/chunk-ZGMU42DU.cjs +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @osdk/react-components
|
|
2
2
|
|
|
3
|
+
## 0.44.1-main-fd00f48adf2cf8cfc916d9ecb942bd3795ef7931
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5d63ff0: Add an `ActionFormOverview.md` one-pager (usage, an `ActionFormProps` props reference, a `Style API` token summary, and an Advanced section covering `BaseForm`) rendered by the Storybook ActionForm Docs page.
|
|
8
|
+
|
|
3
9
|
## 0.44.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -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\";\nimport type { ActionValidationError } from \"@osdk/client\";\n\nimport type {\n ActionParameters,\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 *
|
|
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\";\nimport type { ActionValidationError } from \"@osdk/client\";\n\nimport type {\n ActionParameters,\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\ninterface ActionFormConfigProps<\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 not supplied, field definitions are constructed from `ActionParameters`.\n */\n formFieldDefinitions?: ReadonlyArray<FormFieldDefinition<Q>>;\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 args: ActionParameters<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 there is an error in form submission\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: \"validation\"; error: ActionValidationError }\n | { type: \"submission\"; error: unknown }\n | { type: \"unknown\"; error: unknown };\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 =\n | { type: \"field\"; definition: RendererFieldDefinition }\n | { type: \"section\"; key: string; definition: FormSectionDefinition };\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 {\n title: string;\n description?: string;\n fields: ReadonlyArray<RendererFieldDefinition>;\n /** Whether the section starts collapsed. Default `false`. */\n collapsedByDefault?: boolean;\n /** Whether to show the title bar. Default `true`. */\n showTitleBar?: boolean;\n /** Number of columns for fields. Default `1`. */\n columnCount?: 1 | 2;\n /** Visual style. `\"box\"` = bordered card, `\"minimal\"` = heading only. Default `\"box\"`. */\n style?: \"box\" | \"minimal\";\n}\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":[]}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const PACKAGE_USER_AGENT = `osdk-react-components/${"0.44.
|
|
17
|
+
const PACKAGE_USER_AGENT = `osdk-react-components/${"0.44.1-main-fd00f48adf2cf8cfc916d9ecb942bd3795ef7931"}`;
|
|
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,
|
|
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":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkRVZE7LPI_cjs = require('./chunk-RVZE7LPI.cjs');
|
|
4
|
+
var chunkXNLGPGCH_cjs = require('./chunk-XNLGPGCH.cjs');
|
|
5
|
+
|
|
6
|
+
// src/public/experimental/xml-viewer.ts
|
|
7
|
+
var XmlViewer2 = chunkXNLGPGCH_cjs.withOsdkMetrics(chunkRVZE7LPI_cjs.XmlViewer, "XmlViewer");
|
|
8
|
+
|
|
9
|
+
exports.XmlViewer = XmlViewer2;
|
|
10
|
+
//# sourceMappingURL=chunk-4T5AHE5X.cjs.map
|
|
11
|
+
//# sourceMappingURL=chunk-4T5AHE5X.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/public/experimental/xml-viewer.ts"],"names":["XmlViewer","withOsdkMetrics"],"mappings":";;;;;;AAqBO,IAAMA,UAAAA,GAAYC,iCAAA,CAAgBD,2BAAA,EAAY,WAAW","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../../src/public/experimental/xml-viewer.ts"],"names":["XmlViewer","withOsdkMetrics"],"mappings":";;;;;;AAqBO,IAAMA,UAAAA,GAAYC,iCAAA,CAAgBD,2BAAA,EAAY,WAAW","file":"chunk-4T5AHE5X.cjs","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\n// BaseXmlViewer\nexport { BaseXmlViewer } from \"../../xml-viewer/BaseXmlViewer.js\";\n// XmlViewer (Media wrapper)\nimport { withOsdkMetrics } from \"../../util/withOsdkMetrics.js\";\nimport { XmlViewer as _XmlViewer } from \"../../xml-viewer/XmlViewer.js\";\nexport const XmlViewer = withOsdkMetrics(_XmlViewer, \"XmlViewer\");"]}
|
|
@@ -6,7 +6,7 @@ var chunk3KMJ6NKF_cjs = require('./chunk-3KMJ6NKF.cjs');
|
|
|
6
6
|
var chunkYE4F6HIR_cjs = require('./chunk-YE4F6HIR.cjs');
|
|
7
7
|
var chunk7LXS66DW_cjs = require('./chunk-7LXS66DW.cjs');
|
|
8
8
|
var chunkUCTQICPR_cjs = require('./chunk-UCTQICPR.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunkXNLGPGCH_cjs = require('./chunk-XNLGPGCH.cjs');
|
|
10
10
|
var button = require('@base-ui/react/button');
|
|
11
11
|
var classnames3 = require('classnames');
|
|
12
12
|
var React15 = require('react');
|
|
@@ -5577,7 +5577,7 @@ function summarizeFilterValue(definition, state) {
|
|
|
5577
5577
|
}
|
|
5578
5578
|
|
|
5579
5579
|
// src/public/experimental/filter-list.ts
|
|
5580
|
-
var FilterList2 =
|
|
5580
|
+
var FilterList2 = chunkXNLGPGCH_cjs.withOsdkMetrics(FilterList, "FilterList");
|
|
5581
5581
|
|
|
5582
5582
|
exports.BaseFilterList = BaseFilterList;
|
|
5583
5583
|
exports.FilterInput = FilterInput;
|
|
@@ -5592,5 +5592,5 @@ exports.narrowObjectSet = narrowObjectSet;
|
|
|
5592
5592
|
exports.serializeFilterStates = serializeFilterStates;
|
|
5593
5593
|
exports.summarizeFilterValue = summarizeFilterValue;
|
|
5594
5594
|
exports.useFilterListState = useFilterListState;
|
|
5595
|
-
//# sourceMappingURL=chunk-
|
|
5596
|
-
//# sourceMappingURL=chunk-
|
|
5595
|
+
//# sourceMappingURL=chunk-524WG5UI.cjs.map
|
|
5596
|
+
//# sourceMappingURL=chunk-524WG5UI.cjs.map
|