@osdk/react-components 0.2.0-beta.25 → 0.2.0-beta.27
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/AGENTS.md +1 -0
- package/CHANGELOG.md +28 -0
- package/build/browser/action-form/ActionForm.js +15 -11
- package/build/browser/action-form/ActionForm.js.map +1 -1
- package/build/browser/action-form/FormFieldApi.js.map +1 -1
- package/build/browser/action-form/fields/CustomField.js +30 -0
- package/build/browser/action-form/fields/CustomField.js.map +1 -0
- package/build/browser/action-form/fields/FormFieldRenderer.js +13 -21
- package/build/browser/action-form/fields/FormFieldRenderer.js.map +1 -1
- package/build/browser/action-form/fields/RadioButtonsField.js +1 -1
- package/build/browser/action-form/fields/RadioButtonsField.js.map +1 -1
- package/build/browser/action-form/utils/getDefaultFieldDefinitions.js +97 -10
- package/build/browser/action-form/utils/getDefaultFieldDefinitions.js.map +1 -1
- package/build/browser/base-components/dialog/Dialog.js +4 -2
- package/build/browser/base-components/dialog/Dialog.js.map +1 -1
- package/build/browser/object-table/ObjectTableApi.js.map +1 -1
- package/build/browser/object-table/hooks/useFunctionColumnsData.js +57 -192
- package/build/browser/object-table/hooks/useFunctionColumnsData.js.map +1 -1
- package/build/browser/pdf-viewer/PdfViewer.js +10 -5
- package/build/browser/pdf-viewer/PdfViewer.js.map +1 -1
- package/build/browser/pdf-viewer/PdfViewerContext.js +108 -0
- package/build/browser/pdf-viewer/PdfViewerContext.js.map +1 -0
- package/build/browser/pdf-viewer/hooks/usePdfFormFields.js +26 -11
- package/build/browser/pdf-viewer/hooks/usePdfFormFields.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfHighlightMode.js +29 -1
- package/build/browser/pdf-viewer/hooks/usePdfHighlightMode.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewerCore.js +3 -3
- package/build/browser/pdf-viewer/hooks/usePdfViewerCore.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewerSearch.js +3 -3
- package/build/browser/pdf-viewer/hooks/usePdfViewerSearch.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfViewerState.js +3 -3
- package/build/browser/pdf-viewer/hooks/usePdfViewerState.js.map +1 -1
- package/build/browser/pdf-viewer/types.js.map +1 -1
- package/build/browser/public/experimental.js +2 -0
- package/build/browser/public/experimental.js.map +1 -1
- package/build/cjs/{chunk-GT6IV6LV.cjs → chunk-MRRRZN44.cjs} +6 -4
- package/build/cjs/chunk-MRRRZN44.cjs.map +1 -0
- package/build/cjs/public/experimental.cjs +1384 -1343
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/cjs/public/experimental.d.cts +115 -8
- package/build/cjs/public/primitives.cjs +5 -5
- package/build/cjs/public/primitives.d.cts +3 -2
- package/build/esm/action-form/ActionForm.js +15 -11
- package/build/esm/action-form/ActionForm.js.map +1 -1
- package/build/esm/action-form/FormFieldApi.js.map +1 -1
- package/build/esm/action-form/fields/CustomField.js +30 -0
- package/build/esm/action-form/fields/CustomField.js.map +1 -0
- package/build/esm/action-form/fields/FormFieldRenderer.js +13 -21
- package/build/esm/action-form/fields/FormFieldRenderer.js.map +1 -1
- package/build/esm/action-form/fields/RadioButtonsField.js +1 -1
- package/build/esm/action-form/fields/RadioButtonsField.js.map +1 -1
- package/build/esm/action-form/utils/getDefaultFieldDefinitions.js +97 -10
- package/build/esm/action-form/utils/getDefaultFieldDefinitions.js.map +1 -1
- package/build/esm/base-components/dialog/Dialog.js +4 -2
- package/build/esm/base-components/dialog/Dialog.js.map +1 -1
- package/build/esm/object-table/ObjectTableApi.js.map +1 -1
- package/build/esm/object-table/hooks/useFunctionColumnsData.js +57 -192
- package/build/esm/object-table/hooks/useFunctionColumnsData.js.map +1 -1
- package/build/esm/pdf-viewer/PdfViewer.js +10 -5
- package/build/esm/pdf-viewer/PdfViewer.js.map +1 -1
- package/build/esm/pdf-viewer/PdfViewerContext.js +108 -0
- package/build/esm/pdf-viewer/PdfViewerContext.js.map +1 -0
- package/build/esm/pdf-viewer/hooks/usePdfFormFields.js +26 -11
- package/build/esm/pdf-viewer/hooks/usePdfFormFields.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfHighlightMode.js +29 -1
- package/build/esm/pdf-viewer/hooks/usePdfHighlightMode.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewerCore.js +3 -3
- package/build/esm/pdf-viewer/hooks/usePdfViewerCore.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewerSearch.js +3 -3
- package/build/esm/pdf-viewer/hooks/usePdfViewerSearch.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfViewerState.js +3 -3
- package/build/esm/pdf-viewer/hooks/usePdfViewerState.js.map +1 -1
- package/build/esm/pdf-viewer/types.js.map +1 -1
- package/build/esm/public/experimental.js +2 -0
- package/build/esm/public/experimental.js.map +1 -1
- package/build/types/action-form/FormFieldApi.d.ts +3 -3
- package/build/types/action-form/FormFieldApi.d.ts.map +1 -1
- package/build/types/action-form/fields/CustomField.d.ts +9 -0
- package/build/types/action-form/fields/CustomField.d.ts.map +1 -0
- package/build/types/action-form/fields/FormFieldRenderer.d.ts.map +1 -1
- package/build/types/action-form/fields/RadioButtonsField.d.ts +2 -2
- package/build/types/action-form/fields/RadioButtonsField.d.ts.map +1 -1
- package/build/types/action-form/utils/getDefaultFieldDefinitions.d.ts +7 -4
- package/build/types/action-form/utils/getDefaultFieldDefinitions.d.ts.map +1 -1
- package/build/types/base-components/dialog/Dialog.d.ts +3 -2
- package/build/types/base-components/dialog/Dialog.d.ts.map +1 -1
- package/build/types/object-table/ObjectTableApi.d.ts +4 -3
- package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
- package/build/types/object-table/hooks/useFunctionColumnsData.d.ts.map +1 -1
- package/build/types/pdf-viewer/PdfViewer.d.ts +2 -2
- package/build/types/pdf-viewer/PdfViewer.d.ts.map +1 -1
- package/build/types/pdf-viewer/PdfViewerContext.d.ts +64 -0
- package/build/types/pdf-viewer/PdfViewerContext.d.ts.map +1 -0
- package/build/types/pdf-viewer/hooks/usePdfHighlightMode.d.ts +1 -0
- package/build/types/pdf-viewer/hooks/usePdfHighlightMode.d.ts.map +1 -1
- package/build/types/pdf-viewer/types.d.ts +47 -0
- package/build/types/pdf-viewer/types.d.ts.map +1 -1
- package/build/types/public/experimental.d.ts +2 -0
- package/build/types/public/experimental.d.ts.map +1 -1
- package/package.json +9 -9
- package/build/browser/action-form/utils/getDefaultFieldComponent.js +0 -56
- package/build/browser/action-form/utils/getDefaultFieldComponent.js.map +0 -1
- package/build/cjs/chunk-GT6IV6LV.cjs.map +0 -1
- package/build/esm/action-form/utils/getDefaultFieldComponent.js +0 -56
- package/build/esm/action-form/utils/getDefaultFieldComponent.js.map +0 -1
- package/build/types/action-form/utils/getDefaultFieldComponent.d.ts +0 -6
- package/build/types/action-form/utils/getDefaultFieldComponent.d.ts.map +0 -1
|
@@ -65,6 +65,8 @@ export type PdfDownloadResult = {
|
|
|
65
65
|
export type PdfFormFieldValue = string | boolean | string[];
|
|
66
66
|
/** Data emitted when the user creates a text highlight via the highlight editor. */
|
|
67
67
|
export interface PdfTextHighlightEvent {
|
|
68
|
+
/** Internal PDF.js editor ID. Use with `deleteHighlight` to programmatically remove. */
|
|
69
|
+
editorId: string;
|
|
68
70
|
/** Page number (1-indexed) */
|
|
69
71
|
page: number;
|
|
70
72
|
/** Bounding rects in PDF coordinate space (bottom-left origin) */
|
|
@@ -74,6 +76,51 @@ export interface PdfTextHighlightEvent {
|
|
|
74
76
|
/** Highlight color as CSS color string */
|
|
75
77
|
color: string;
|
|
76
78
|
}
|
|
79
|
+
/** Imperative handle for programmatic control of a {@link PdfViewer} or {@link BasePdfViewer}. */
|
|
80
|
+
export interface PdfViewerHandle {
|
|
81
|
+
/** Scroll the viewer to the given page number (1-indexed). */
|
|
82
|
+
scrollToPage: (page: number) => void;
|
|
83
|
+
/** Programmatically delete a highlight by its `editorId` (from {@link PdfTextHighlightEvent}). */
|
|
84
|
+
deleteHighlight: (editorId: string) => void;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Options for {@link usePdfViewerInstance}.
|
|
88
|
+
* Equivalent to {@link PdfViewerProps} minus the `className` rendering concern.
|
|
89
|
+
*/
|
|
90
|
+
export interface PdfViewerInstanceOptions {
|
|
91
|
+
/** PDF source — URL string or ArrayBuffer */
|
|
92
|
+
src: string | ArrayBuffer;
|
|
93
|
+
/** Annotations to overlay on the PDF */
|
|
94
|
+
annotations?: PdfAnnotation[];
|
|
95
|
+
/** Callback fired when an annotation is clicked */
|
|
96
|
+
onAnnotationClick?: (annotation: PdfAnnotation) => void;
|
|
97
|
+
/** Callback fired when a download completes or fails */
|
|
98
|
+
onDownload?: (result: PdfDownloadResult) => void;
|
|
99
|
+
/** Whether the highlight toggle button is shown in the toolbar */
|
|
100
|
+
highlightEnabled?: boolean;
|
|
101
|
+
/** Callback fired when the user creates a text highlight */
|
|
102
|
+
onTextHighlight?: (event: PdfTextHighlightEvent) => void;
|
|
103
|
+
/** Callback fired when the user deletes a highlight */
|
|
104
|
+
onHighlightDelete?: (event: PdfTextHighlightEvent) => void;
|
|
105
|
+
/** Initial form field values keyed by field name */
|
|
106
|
+
formData?: Record<string, PdfFormFieldValue>;
|
|
107
|
+
/** Callback fired when the user clicks the save button */
|
|
108
|
+
onFormSubmit?: (data: Record<string, PdfFormFieldValue>) => void;
|
|
109
|
+
/** Callback fired when any form field value changes */
|
|
110
|
+
onFormChange?: (fieldName: string, value: PdfFormFieldValue) => void;
|
|
111
|
+
/** Initial page number (1-indexed, default 1) */
|
|
112
|
+
initialPage?: number;
|
|
113
|
+
/** Initial zoom scale (default 1.0) */
|
|
114
|
+
initialScale?: number;
|
|
115
|
+
/** Whether the sidebar is initially open (default false) */
|
|
116
|
+
initialSidebarOpen?: boolean;
|
|
117
|
+
/** Whether the download button is shown in the toolbar */
|
|
118
|
+
enableDownload?: boolean;
|
|
119
|
+
/** Which sidebar panel to show: thumbnails or document outline */
|
|
120
|
+
sidebarMode?: SidebarMode;
|
|
121
|
+
/** Custom icon components for each outline depth level (0-indexed) */
|
|
122
|
+
outlineIcons?: Partial<Record<number, React.ComponentType>>;
|
|
123
|
+
}
|
|
77
124
|
/** Props for the {@link PdfViewer} component. */
|
|
78
125
|
export interface PdfViewerProps {
|
|
79
126
|
/** PDF source — URL string or ArrayBuffer */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,YAAY,WAAW,OAAQ;;AAG/B,YAAY,cAAc,eAAe;;AAGzC,iBAAiB,YAAY;CAC3B;CACA;CACA;CACA;CACA;AACD;;AAGD,YAAY,iBACR,cACA,cACA,YACA,QACA;;AAGJ,iBAAiB,QAAQ;CACvB;CACA;CACA;CACA;AACD;;AAGD,iBAAiB,yBAAyB;CACxC,YAAY;CACZ;CACA;AACD;;UAGS,kBAAkB;;CAE1B;;CAEA;;CAEA,MAAM;;CAEN,QAAQ;;CAER;;CAEA;AACD;;UAGS,8BAA8B,kBAAkB;;CAExD,MAAM,cAAc,cAAc,YAAY;AAC/C;;AAGD,iBAAiB,4BAA4B,kBAAkB;;CAE7D,MAAM;;CAEN,SAASA,OAAO,6BAA6B,MAAM;AACpD;;AAGD,YAAY,gBAAgB,wBAAwB;;AAGpD,YAAY,oBACR;CAAE,SAAS;CAAM;AAAkB,IACnC;CAAE,SAAS;CAAO,OAAO;AAAO;;AAGpC,YAAY;;AAGZ,iBAAiB,sBAAsB;;CAErC;;CAEA,OAAO;;CAEP;;CAEA;AACD;;AAGD,iBAAiB,eAAe;;CAE9B,cAAc;;CAEd,cAAc;;;;;;;CAOd,
|
|
1
|
+
{"mappings":"AAgBA,YAAY,WAAW,OAAQ;;AAG/B,YAAY,cAAc,eAAe;;AAGzC,iBAAiB,YAAY;CAC3B;CACA;CACA;CACA;CACA;AACD;;AAGD,YAAY,iBACR,cACA,cACA,YACA,QACA;;AAGJ,iBAAiB,QAAQ;CACvB;CACA;CACA;CACA;AACD;;AAGD,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AACD","names":["props: PdfAnnotationRenderProps","page: number","editorId: string","annotation: PdfAnnotation","result: PdfDownloadResult","event: PdfTextHighlightEvent","data: Record<string, PdfFormFieldValue>","fieldName: string","value: PdfFormFieldValue"],"sources":["../../../src/pdf-viewer/types.ts"],"version":3,"file":"types.d.ts"}
|
|
@@ -29,6 +29,8 @@ export { usePdfViewer, type UsePdfViewerResult } from "../pdf-viewer/hooks/usePd
|
|
|
29
29
|
export { usePdfViewerSearch, type UsePdfViewerSearchResult } from "../pdf-viewer/hooks/usePdfViewerSearch.js";
|
|
30
30
|
export { usePdfViewerSync } from "../pdf-viewer/hooks/usePdfViewerSync.js";
|
|
31
31
|
export { type OutlineItem } from "../pdf-viewer/types.js";
|
|
32
|
+
export { type PdfViewerContextValue, PdfViewerProvider, usePdfViewerContext, usePdfViewerInstance } from "../pdf-viewer/PdfViewerContext.js";
|
|
33
|
+
export type { PdfViewerHandle, PdfViewerInstanceOptions } from "../pdf-viewer/types.js";
|
|
32
34
|
export { usePdfViewerCore, type UsePdfViewerCoreOptions, type UsePdfViewerCoreResult } from "../pdf-viewer/hooks/usePdfViewerCore.js";
|
|
33
35
|
export { usePdfViewerState, type UsePdfViewerStateOptions, type UsePdfViewerStateResult } from "../pdf-viewer/hooks/usePdfViewerState.js";
|
|
34
36
|
export { PdfViewer, type PdfViewerMediaProps } from "../pdf-viewer/PdfRenderer.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,SAAS,sBAAsB;AAC/B,cACE,qBACA,yBACK;AACP,SAAS,kBAAkB;AAE3B,cACE,uBACA,uBACK;AACP,cACE,qBACA,qBACA,aACA,gCACK;AACP,SACE,yBACA,6BACK;AAGP,SAAS,mBAAmB;AAC5B,cACE,kBACA,yBACA,qBACA,uBACA,kBACA,uBACA,wBACK;AACP,cAAc,oBAAoB;AAGlC,cAAc,sBAAsB;AACpC,SAAS,iBAAiB;AAE1B,SAAS,0BAA0B;AACnC,cACE,yBACA,2BACK;AAGP,SAAS,qBAAqB;AAC9B,cACE,gBACA,eACA,0BACA,qBACA,mBACA,mBACA,SACA,uBACA,gBACA,mBACK;AAGP,SACE,+BACK,qCACA;AACP,SACE,uBACK,6BACA;AACP,SACE,8BACK,oCACA;AACP,SACE,yBACK,+BACA;AACP,SACE,uBACK,6BACA;AACP,SACE,uBACK,6BACA;AAGP,cACO,wBACL,+BACK;AACP,SAAS,+BAA+B;AACxC,SAAS,sBAAsB;AAC/B,SACE,uBACK,8BACA,8BACA;AACP,SACE,0BACK,iCACA,iCACA;AACP,SAAS,qBAAqB;AAC9B,SACE,mBACK,0BACA;AACP,SACE,yBACK,gCACA;AACP,SAAS,wBAAwB;AACjC,cAAc,mBAAmB;AAGjC,SACE,uBACK,8BACA,8BACA;AACP,SACE,wBACK,+BACA,+BACA;AAGP,SACE,gBACK,2BACA;AAEP,SAAS,kBAAkB;AAC3B,cACE,iBACA,eACA,WACA,iBACK;AACP,SAAS,gBAAgB;AACzB,cACE,kBACA,oBACA,kBACA,0BACA,oBACA,gBACA,gBACA,iBACA,qBACA,sBACA,uBACA,qBACA,QACA,wBACA,yBACA,oBACA,2BACK","names":[],"sources":["../../../src/public/experimental.ts"],"version":3,"file":"experimental.d.ts"}
|
|
1
|
+
{"mappings":"AAgBA,SAAS,sBAAsB;AAC/B,cACE,qBACA,yBACK;AACP,SAAS,kBAAkB;AAE3B,cACE,uBACA,uBACK;AACP,cACE,qBACA,qBACA,aACA,gCACK;AACP,SACE,yBACA,6BACK;AAGP,SAAS,mBAAmB;AAC5B,cACE,kBACA,yBACA,qBACA,uBACA,kBACA,uBACA,wBACK;AACP,cAAc,oBAAoB;AAGlC,cAAc,sBAAsB;AACpC,SAAS,iBAAiB;AAE1B,SAAS,0BAA0B;AACnC,cACE,yBACA,2BACK;AAGP,SAAS,qBAAqB;AAC9B,cACE,gBACA,eACA,0BACA,qBACA,mBACA,mBACA,SACA,uBACA,gBACA,mBACK;AAGP,SACE,+BACK,qCACA;AACP,SACE,uBACK,6BACA;AACP,SACE,8BACK,oCACA;AACP,SACE,yBACK,+BACA;AACP,SACE,uBACK,6BACA;AACP,SACE,uBACK,6BACA;AAGP,cACO,wBACL,+BACK;AACP,SAAS,+BAA+B;AACxC,SAAS,sBAAsB;AAC/B,SACE,uBACK,8BACA,8BACA;AACP,SACE,0BACK,iCACA,iCACA;AACP,SAAS,qBAAqB;AAC9B,SACE,mBACK,0BACA;AACP,SACE,yBACK,gCACA;AACP,SAAS,wBAAwB;AACjC,cAAc,mBAAmB;AAGjC,cACO,uBACL,mBACA,qBACA,4BACK;AACP,cACE,iBACA,gCACK;AAGP,SACE,uBACK,8BACA,8BACA;AACP,SACE,wBACK,+BACA,+BACA;AAGP,SACE,gBACK,2BACA;AAEP,SAAS,kBAAkB;AAC3B,cACE,iBACA,eACA,WACA,iBACK;AACP,SAAS,gBAAgB;AACzB,cACE,kBACA,oBACA,kBACA,0BACA,oBACA,gBACA,gBACA,iBACA,qBACA,sBACA,uBACA,qBACA,QACA,wBACA,yBACA,oBACA,2BACK","names":[],"sources":["../../../src/public/experimental.ts"],"version":3,"file":"experimental.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/react-components",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.27",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
"@tanstack/react-virtual": "^3.13.13",
|
|
56
56
|
"lodash-es": "^4.17.21",
|
|
57
57
|
"pdfjs-dist": "^4.9.155",
|
|
58
|
-
"react-day-picker": "
|
|
58
|
+
"react-day-picker": "9.1.0",
|
|
59
59
|
"react-hook-form": "^7.54.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@osdk/api": "
|
|
63
|
-
"@osdk/client": "
|
|
64
|
-
"@osdk/react": "
|
|
62
|
+
"@osdk/api": ">=2.8.0-beta.0",
|
|
63
|
+
"@osdk/client": ">=2.8.0-beta.0",
|
|
64
|
+
"@osdk/react": ">=0.10.0-beta.0",
|
|
65
65
|
"@types/react": "^17 || ^18 || ^19",
|
|
66
66
|
"classnames": "^2.0.0",
|
|
67
67
|
"react": "^17 || ^18 || ^19",
|
|
@@ -78,11 +78,11 @@
|
|
|
78
78
|
"react": "^18.3.1",
|
|
79
79
|
"react-dom": "^18.3.1",
|
|
80
80
|
"typescript": "~5.5.4",
|
|
81
|
-
"@osdk/api": "2.8.0-beta.
|
|
82
|
-
"@osdk/client": "2.8.0-beta.
|
|
81
|
+
"@osdk/api": "2.8.0-beta.30",
|
|
82
|
+
"@osdk/client": "2.8.0-beta.30",
|
|
83
|
+
"@osdk/react": "0.10.0-beta.15",
|
|
83
84
|
"@osdk/monorepo.tsconfig": "~0.7.0-beta.1",
|
|
84
|
-
"@osdk/monorepo.api-extractor": "~0.7.0-beta.1"
|
|
85
|
-
"@osdk/react": "0.10.0-beta.13"
|
|
85
|
+
"@osdk/monorepo.api-extractor": "~0.7.0-beta.1"
|
|
86
86
|
},
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { assertUnreachable } from "../../shared/assertUnreachable.js";
|
|
18
|
-
/**
|
|
19
|
-
* Maps an ActionMetadata parameter type to the default FieldComponent.
|
|
20
|
-
*/
|
|
21
|
-
export function getDefaultFieldComponent(paramType) {
|
|
22
|
-
if (typeof paramType === "object") {
|
|
23
|
-
switch (paramType.type) {
|
|
24
|
-
case "objectSet":
|
|
25
|
-
return "OBJECT_SET";
|
|
26
|
-
case "object":
|
|
27
|
-
case "interface":
|
|
28
|
-
return "DROPDOWN";
|
|
29
|
-
case "struct":
|
|
30
|
-
return "TEXT_INPUT";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
switch (paramType) {
|
|
34
|
-
case "string":
|
|
35
|
-
case "marking":
|
|
36
|
-
case "geohash":
|
|
37
|
-
case "geoshape":
|
|
38
|
-
case "objectType":
|
|
39
|
-
return "TEXT_INPUT";
|
|
40
|
-
case "boolean":
|
|
41
|
-
return "DROPDOWN";
|
|
42
|
-
case "integer":
|
|
43
|
-
case "double":
|
|
44
|
-
case "long":
|
|
45
|
-
return "NUMBER_INPUT";
|
|
46
|
-
case "datetime":
|
|
47
|
-
case "timestamp":
|
|
48
|
-
return "DATETIME_PICKER";
|
|
49
|
-
case "attachment":
|
|
50
|
-
case "mediaReference":
|
|
51
|
-
return "FILE_PICKER";
|
|
52
|
-
default:
|
|
53
|
-
return assertUnreachable(paramType);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=getDefaultFieldComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDefaultFieldComponent.js","names":["assertUnreachable","getDefaultFieldComponent","paramType","type"],"sources":["getDefaultFieldComponent.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 { ActionMetadata } from \"@osdk/api\";\nimport { assertUnreachable } from \"../../shared/assertUnreachable.js\";\nimport type { FieldComponent } from \"../FormFieldApi.js\";\n\n/**\n * Maps an ActionMetadata parameter type to the default FieldComponent.\n */\nexport function getDefaultFieldComponent(\n paramType: ActionMetadata.Parameter[\"type\"],\n): FieldComponent {\n if (typeof paramType === \"object\") {\n switch (paramType.type) {\n case \"objectSet\":\n return \"OBJECT_SET\";\n case \"object\":\n case \"interface\":\n return \"DROPDOWN\";\n case \"struct\":\n return \"TEXT_INPUT\";\n }\n }\n\n switch (paramType) {\n case \"string\":\n case \"marking\":\n case \"geohash\":\n case \"geoshape\":\n case \"objectType\":\n return \"TEXT_INPUT\";\n case \"boolean\":\n return \"DROPDOWN\";\n case \"integer\":\n case \"double\":\n case \"long\":\n return \"NUMBER_INPUT\";\n case \"datetime\":\n case \"timestamp\":\n return \"DATETIME_PICKER\";\n case \"attachment\":\n case \"mediaReference\":\n return \"FILE_PICKER\";\n default:\n return assertUnreachable(paramType);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,iBAAiB,QAAQ,mCAAmC;AAGrE;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CACtCC,SAA2C,EAC3B;EAChB,IAAI,OAAOA,SAAS,KAAK,QAAQ,EAAE;IACjC,QAAQA,SAAS,CAACC,IAAI;MACpB,KAAK,WAAW;QACd,OAAO,YAAY;MACrB,KAAK,QAAQ;MACb,KAAK,WAAW;QACd,OAAO,UAAU;MACnB,KAAK,QAAQ;QACX,OAAO,YAAY;IACvB;EACF;EAEA,QAAQD,SAAS;IACf,KAAK,QAAQ;IACb,KAAK,SAAS;IACd,KAAK,SAAS;IACd,KAAK,UAAU;IACf,KAAK,YAAY;MACf,OAAO,YAAY;IACrB,KAAK,SAAS;MACZ,OAAO,UAAU;IACnB,KAAK,SAAS;IACd,KAAK,QAAQ;IACb,KAAK,MAAM;MACT,OAAO,cAAc;IACvB,KAAK,UAAU;IACf,KAAK,WAAW;MACd,OAAO,iBAAiB;IAC1B,KAAK,YAAY;IACjB,KAAK,gBAAgB;MACnB,OAAO,aAAa;IACtB;MACE,OAAOF,iBAAiB,CAACE,SAAS,CAAC;EACvC;AACF","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/base-components/tooltip/Tooltip.module.css","../../src/base-components/tooltip/Tooltip.tsx","../../src/base-components/action-button/ActionButton.module.css","../../src/base-components/action-button/ActionButton.tsx","../../src/base-components/dialog/Dialog.module.css","../../src/base-components/dialog/Dialog.tsx"],"names":["React","BaseUITooltip","classnames","_extends","Button","classNames","BaseUIDialog","Cross"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAA,eAAA,GAAA,EAAA;;;ACAA,SAAS,QAAW,GAAA;AAAE,EAAO,OAAA,QAAA,GAAW,OAAO,MAAS,GAAA,MAAA,CAAO,OAAO,IAAK,EAAA,GAAI,SAAU,CAAG,EAAA;AAAE,IAAA,KAAA,IAAS,CAAI,GAAA,CAAA,EAAG,CAAI,GAAA,SAAA,CAAU,QAAQ,CAAK,EAAA,EAAA;AAAE,MAAI,IAAA,CAAA,GAAI,UAAU,CAAC,CAAA;AAAG,MAAA,KAAA,IAAS,CAAK,IAAA,CAAA,EAAI,CAAA,IAAI,cAAe,CAAA,IAAA,CAAK,CAAG,EAAA,CAAC,CAAM,KAAA,CAAA,CAAE,CAAC,CAAA,GAAI,EAAE,CAAC,CAAA,CAAA;AAAA;AAAM,IAAO,OAAA,CAAA;AAAA,GAAM,EAAA,QAAA,CAAS,KAAM,CAAA,IAAA,EAAM,SAAS,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N,sBAAM,CAAA,aAAA,CAAcM,cAAa,KAAO,EAAA;AAAA,IACvD,SAAWJ,EAAAA,2BAAAA,CAAW,cAAO,CAAA,KAAA,EAAO,SAAS;AAAA,GAC/B,kBAAAF,sBAAM,CAAA,aAAA,CAAc,KAAO,EAAA;AAAA,IACzC,WAAW,cAAO,CAAA;AAAA,GACJ,kBAAAA,sBAAM,CAAA,aAAA,CAAcM,cAAa,KAAO,EAAA;AAAA,IACtD,WAAW,cAAO,CAAA;AAAA,KACjB,KAAK,CAAA,kBAAgBN,sBAAM,CAAA,aAAA,CAAcM,cAAa,KAAO,EAAA;AAAA,IAC9D,WAAW,cAAO,CAAA,WAAA;AAAA,IAClB,YAAc,EAAA;AAAA,GACA,kBAAAN,sBAAM,CAAA,aAAA,CAAcO,WAAO,EAAA;AAAA,IACzC,WAAW,cAAO,CAAA;AAAA,GACnB,CAAC,CAAC,mBAAgBP,sBAAAA,CAAM,cAAc,KAAO,EAAA;AAAA,IAC5C,WAAW,cAAO,CAAA;AAAA,GACpB,EAAG,QAAQ,CAAG,EAAA,MAAA,IAAU,wBAAqBA,sBAAAA,CAAM,cAAc,KAAO,EAAA;AAAA,IACtE,WAAW,cAAO,CAAA;AAAA,GACjB,EAAA,MAAM,CAAC,CAAC,CAAC,CAAA;AACd","file":"chunk-GT6IV6LV.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.osdkTooltipTrigger {\n border: none;\n background: inherit;\n}\n\n.osdkTooltipPositioner {\n z-index: var(--osdk-tooltip-z-index);\n}\n\n.osdkTooltipPopup {\n padding: var(--osdk-tooltip-padding);\n background-color: var(--osdk-tooltip-bg);\n border-radius: var(--osdk-surface-border-radius);\n box-shadow: var(--osdk-tooltip-shadow);\n max-width: var(--osdk-tooltip-max-width);\n font-size: var(--osdk-tooltip-font-size);\n}\n\n/* \n * Hardcoded values are copied from base ui example \n * https://base-ui.com/react/components/tooltip \n *\n * */\n.osdkTooltipArrow {\n display: flex;\n\n &[data-side=\"top\"] {\n bottom: -8px;\n rotate: 180deg;\n }\n\n &[data-side=\"bottom\"] {\n top: -8px;\n rotate: 0deg;\n }\n\n &[data-side=\"left\"] {\n right: -13px;\n rotate: 90deg;\n }\n\n &[data-side=\"right\"] {\n left: -13px;\n rotate: -90deg;\n }\n}\n\n.tooltipArrowFill {\n fill: var(--osdk-tooltip-bg);\n}\n\n.tooltipArrowOuterStroke {\n fill: var(--osdk-tooltip-border-color);\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 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 { Tooltip as BaseUITooltip } from \"@base-ui/react/tooltip\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Tooltip.module.css\";\nfunction TooltipRoot({\n children,\n ...rest\n}) {\n return /*#__PURE__*/React.createElement(BaseUITooltip.Root, rest, children);\n}\nfunction TooltipProvider({\n children,\n ...rest\n}) {\n return /*#__PURE__*/React.createElement(BaseUITooltip.Provider, rest, children);\n}\nfunction TooltipTrigger({\n className,\n children,\n ...rest\n}) {\n return /*#__PURE__*/React.createElement(BaseUITooltip.Trigger, _extends({\n className: classnames(styles.osdkTooltipTrigger, className)\n }, rest), children);\n}\nfunction TooltipPositioner({\n className,\n children,\n sideOffset = 4,\n ...rest\n}) {\n return /*#__PURE__*/React.createElement(BaseUITooltip.Positioner, _extends({\n className: classnames(styles.osdkTooltipPositioner, className),\n sideOffset: sideOffset\n }, rest), children);\n}\nfunction TooltipPopup({\n className,\n children,\n ...rest\n}) {\n return /*#__PURE__*/React.createElement(BaseUITooltip.Popup, _extends({\n className: classnames(styles.osdkTooltipPopup, className)\n }, rest), children);\n}\nexport function TooltipArrow() {\n return /*#__PURE__*/React.createElement(BaseUITooltip.Arrow, {\n className: styles.osdkTooltipArrow\n }, /*#__PURE__*/React.createElement(ArrowSvg, null));\n}\nfunction ArrowSvg(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: \"20\",\n height: \"10\",\n viewBox: \"0 0 20 10\",\n fill: \"none\"\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z\",\n className: styles.tooltipArrowFill\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z\",\n className: styles.tooltipArrowOuterStroke\n }));\n}\nexport const Tooltip = {\n Root: TooltipRoot,\n Provider: TooltipProvider,\n Trigger: TooltipTrigger,\n Portal: BaseUITooltip.Portal,\n Positioner: TooltipPositioner,\n Popup: TooltipPopup,\n Arrow: TooltipArrow\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\n.button {\n padding: calc(var(--osdk-surface-spacing) * 2)\n calc(var(--osdk-surface-spacing) * 4);\n border-radius: var(--osdk-surface-border-radius);\n font-size: var(--osdk-typography-size-body-medium);\n cursor: pointer;\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.secondaryButton {\n background-color: var(--osdk-button-secondary-bg);\n border: var(--osdk-surface-border);\n color: var(--osdk-button-secondary-color);\n\n &:hover:not(:disabled) {\n background-color: var(--osdk-button-secondary-bg-hover);\n }\n\n &:active:not(:disabled) {\n background-color: var(--osdk-button-secondary-bg-active);\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n}\n\n.primaryButton {\n background-color: var(--osdk-button-primary-bg);\n border: none;\n color: var(--osdk-button-primary-color);\n\n &:hover:not(:disabled) {\n background-color: var(--osdk-button-primary-bg-hover);\n }\n\n &:active:not(:disabled) {\n background-color: var(--osdk-button-primary-bg-active);\n }\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\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 { Button } from \"@base-ui/react/button\";\nimport classNames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./ActionButton.module.css\";\nexport function ActionButton({\n variant = \"secondary\",\n className,\n ...rest\n}) {\n return /*#__PURE__*/React.createElement(Button, _extends({\n className: classNames(styles.button, variant === \"primary\" ? styles.primaryButton : styles.secondaryButton, className)\n }, rest));\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\n.backdrop {\n position: fixed;\n inset: 0;\n background-color: var(--osdk-dialog-backdrop-bg);\n z-index: var(--osdk-surface-z-index-1);\n}\n\n.popup {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n min-width: var(--osdk-dialog-min-width);\n max-width: var(--osdk-dialog-max-width);\n min-height: var(--osdk-dialog-min-height);\n max-height: var(--osdk-dialog-max-height);\n background-color: var(--osdk-dialog-bg);\n border-radius: var(--osdk-surface-border-radius);\n box-shadow: var(--osdk-dialog-shadow);\n z-index: var(--osdk-surface-z-index-2);\n display: flex;\n flex-direction: column;\n}\n\n.header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(--osdk-dialog-header-padding);\n border-bottom: var(--osdk-surface-border);\n}\n\n.title {\n font-size: var(--osdk-dialog-title-font-size);\n font-weight: var(--osdk-dialog-title-font-weight);\n}\n\n.body {\n display: flex;\n padding: var(--osdk-dialog-body-padding);\n overflow-y: auto;\n flex: 1;\n}\n\n.footer {\n display: flex;\n justify-content: flex-end;\n gap: calc(var(--osdk-surface-spacing) * 2);\n padding: var(--osdk-dialog-footer-padding);\n border-top: var(--osdk-surface-border);\n}\n\n.closeButton {\n background: none;\n border: none;\n padding: calc(var(--osdk-surface-spacing) * 0.5);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--osdk-surface-border-radius);\n\n &:hover {\n background-color: var(--osdk-surface-background-color-default-hover);\n }\n\n &:focus-visible {\n outline: var(--osdk-focus-outline);\n outline-offset: var(--osdk-focus-visible-outline-offset);\n }\n}\n\n.closeIcon {\n width: var(--osdk-iconography-size-small);\n height: var(--osdk-iconography-size-small);\n color: var(--osdk-typography-color-muted);\n}\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 { Dialog as BaseUIDialog } from \"@base-ui/react/dialog\";\nimport { Cross } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Dialog.module.css\";\nexport function Dialog({\n isOpen,\n onOpenChange,\n title,\n children,\n footer,\n className\n}) {\n return /*#__PURE__*/React.createElement(BaseUIDialog.Root, {\n open: isOpen,\n onOpenChange: onOpenChange\n }, /*#__PURE__*/React.createElement(BaseUIDialog.Portal, null, /*#__PURE__*/React.createElement(BaseUIDialog.Backdrop, {\n className: styles.backdrop\n }), /*#__PURE__*/React.createElement(BaseUIDialog.Popup, {\n className: classnames(styles.popup, className)\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: styles.header\n }, /*#__PURE__*/React.createElement(BaseUIDialog.Title, {\n className: styles.title\n }, title), /*#__PURE__*/React.createElement(BaseUIDialog.Close, {\n className: styles.closeButton,\n \"aria-label\": \"Close dialog\"\n }, /*#__PURE__*/React.createElement(Cross, {\n className: styles.closeIcon\n }))), /*#__PURE__*/React.createElement(\"div\", {\n className: styles.body\n }, children), footer != null && /*#__PURE__*/React.createElement(\"div\", {\n className: styles.footer\n }, footer))));\n}"]}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { assertUnreachable } from "../../shared/assertUnreachable.js";
|
|
18
|
-
/**
|
|
19
|
-
* Maps an ActionMetadata parameter type to the default FieldComponent.
|
|
20
|
-
*/
|
|
21
|
-
export function getDefaultFieldComponent(paramType) {
|
|
22
|
-
if (typeof paramType === "object") {
|
|
23
|
-
switch (paramType.type) {
|
|
24
|
-
case "objectSet":
|
|
25
|
-
return "OBJECT_SET";
|
|
26
|
-
case "object":
|
|
27
|
-
case "interface":
|
|
28
|
-
return "DROPDOWN";
|
|
29
|
-
case "struct":
|
|
30
|
-
return "TEXT_INPUT";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
switch (paramType) {
|
|
34
|
-
case "string":
|
|
35
|
-
case "marking":
|
|
36
|
-
case "geohash":
|
|
37
|
-
case "geoshape":
|
|
38
|
-
case "objectType":
|
|
39
|
-
return "TEXT_INPUT";
|
|
40
|
-
case "boolean":
|
|
41
|
-
return "DROPDOWN";
|
|
42
|
-
case "integer":
|
|
43
|
-
case "double":
|
|
44
|
-
case "long":
|
|
45
|
-
return "NUMBER_INPUT";
|
|
46
|
-
case "datetime":
|
|
47
|
-
case "timestamp":
|
|
48
|
-
return "DATETIME_PICKER";
|
|
49
|
-
case "attachment":
|
|
50
|
-
case "mediaReference":
|
|
51
|
-
return "FILE_PICKER";
|
|
52
|
-
default:
|
|
53
|
-
return assertUnreachable(paramType);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=getDefaultFieldComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDefaultFieldComponent.js","names":["assertUnreachable","getDefaultFieldComponent","paramType","type"],"sources":["getDefaultFieldComponent.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 { ActionMetadata } from \"@osdk/api\";\nimport { assertUnreachable } from \"../../shared/assertUnreachable.js\";\nimport type { FieldComponent } from \"../FormFieldApi.js\";\n\n/**\n * Maps an ActionMetadata parameter type to the default FieldComponent.\n */\nexport function getDefaultFieldComponent(\n paramType: ActionMetadata.Parameter[\"type\"],\n): FieldComponent {\n if (typeof paramType === \"object\") {\n switch (paramType.type) {\n case \"objectSet\":\n return \"OBJECT_SET\";\n case \"object\":\n case \"interface\":\n return \"DROPDOWN\";\n case \"struct\":\n return \"TEXT_INPUT\";\n }\n }\n\n switch (paramType) {\n case \"string\":\n case \"marking\":\n case \"geohash\":\n case \"geoshape\":\n case \"objectType\":\n return \"TEXT_INPUT\";\n case \"boolean\":\n return \"DROPDOWN\";\n case \"integer\":\n case \"double\":\n case \"long\":\n return \"NUMBER_INPUT\";\n case \"datetime\":\n case \"timestamp\":\n return \"DATETIME_PICKER\";\n case \"attachment\":\n case \"mediaReference\":\n return \"FILE_PICKER\";\n default:\n return assertUnreachable(paramType);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,iBAAiB,QAAQ,mCAAmC;AAGrE;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CACtCC,SAA2C,EAC3B;EAChB,IAAI,OAAOA,SAAS,KAAK,QAAQ,EAAE;IACjC,QAAQA,SAAS,CAACC,IAAI;MACpB,KAAK,WAAW;QACd,OAAO,YAAY;MACrB,KAAK,QAAQ;MACb,KAAK,WAAW;QACd,OAAO,UAAU;MACnB,KAAK,QAAQ;QACX,OAAO,YAAY;IACvB;EACF;EAEA,QAAQD,SAAS;IACf,KAAK,QAAQ;IACb,KAAK,SAAS;IACd,KAAK,SAAS;IACd,KAAK,UAAU;IACf,KAAK,YAAY;MACf,OAAO,YAAY;IACrB,KAAK,SAAS;MACZ,OAAO,UAAU;IACnB,KAAK,SAAS;IACd,KAAK,QAAQ;IACb,KAAK,MAAM;MACT,OAAO,cAAc;IACvB,KAAK,UAAU;IACf,KAAK,WAAW;MACd,OAAO,iBAAiB;IAC1B,KAAK,YAAY;IACjB,KAAK,gBAAgB;MACnB,OAAO,aAAa;IACtB;MACE,OAAOF,iBAAiB,CAACE,SAAS,CAAC;EACvC;AACF","ignoreList":[]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ActionMetadata } from "@osdk/api";
|
|
2
|
-
import type { FieldComponent } from "../FormFieldApi.js";
|
|
3
|
-
/**
|
|
4
|
-
* Maps an ActionMetadata parameter type to the default FieldComponent.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getDefaultFieldComponent(paramType: ActionMetadata.Parameter["type"]): FieldComponent;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,sBAAsB,WAAY;AAEhD,cAAc,sBAAsB,oBAAqB;;;;AAKzD,OAAO,iBAAS,yBACdA,WAAW,eAAe,UAAU,UACnC","names":["paramType: ActionMetadata.Parameter[\"type\"]"],"sources":["../../../../src/action-form/utils/getDefaultFieldComponent.ts"],"version":3,"file":"getDefaultFieldComponent.d.ts"}
|