@osdk/react-components 0.2.0-beta.24 → 0.2.0-beta.26
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 +4 -0
- package/CHANGELOG.md +38 -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/{TextInputField.module.css → BaseInput.module.css} +2 -2
- package/build/browser/action-form/fields/BaseInput.module.css.js +6 -0
- 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 +26 -16
- package/build/browser/action-form/fields/FormFieldRenderer.js.map +1 -1
- package/build/browser/action-form/fields/RadioButtonsField.js +57 -0
- package/build/browser/action-form/fields/RadioButtonsField.js.map +1 -0
- package/build/browser/action-form/fields/RadioButtonsField.module.css +83 -0
- package/build/browser/action-form/fields/RadioButtonsField.module.css.js +10 -0
- package/build/browser/action-form/fields/TextAreaField.js +50 -0
- package/build/browser/action-form/fields/TextAreaField.js.map +1 -0
- package/build/browser/action-form/fields/TextInputField.js +3 -3
- package/build/browser/action-form/fields/TextInputField.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 +49 -8
- 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/components/PdfViewerAnnotationLayer.js +85 -18
- package/build/browser/pdf-viewer/components/PdfViewerAnnotationLayer.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerAnnotationLayer.module.css +18 -0
- package/build/browser/pdf-viewer/components/PdfViewerAnnotationLayer.module.css.js +1 -0
- package/build/browser/pdf-viewer/components/PdfViewerContent.js +15 -3
- package/build/browser/pdf-viewer/components/PdfViewerContent.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerOutlineSidebar.module.css +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerSidebar.module.css +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerSidebarHeader.module.css +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerToolbar.js +29 -2
- package/build/browser/pdf-viewer/components/PdfViewerToolbar.js.map +1 -1
- package/build/browser/pdf-viewer/components/PdfViewerToolbar.module.css +5 -0
- package/build/browser/pdf-viewer/components/PdfViewerToolbar.module.css.js +1 -0
- package/build/browser/pdf-viewer/constants.js +2 -1
- package/build/browser/pdf-viewer/constants.js.map +1 -1
- package/build/browser/pdf-viewer/hooks/usePdfAnnotationsByPage.js +30 -0
- package/build/browser/pdf-viewer/hooks/usePdfAnnotationsByPage.js.map +1 -0
- package/build/browser/pdf-viewer/hooks/usePdfFormFields.js +341 -0
- package/build/browser/pdf-viewer/hooks/usePdfFormFields.js.map +1 -0
- package/build/browser/pdf-viewer/hooks/usePdfHighlightMode.js +227 -0
- package/build/browser/pdf-viewer/hooks/usePdfHighlightMode.js.map +1 -0
- package/build/browser/pdf-viewer/hooks/usePdfViewer.js +16 -10
- package/build/browser/pdf-viewer/hooks/usePdfViewer.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 +5 -0
- package/build/browser/public/experimental.js.map +1 -1
- package/build/browser/styles.css +144 -35
- 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 +1981 -1314
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/cjs/public/experimental.css +82 -5
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/cjs/public/experimental.d.cts +267 -26
- 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/{TextInputField.module.css → BaseInput.module.css} +2 -2
- 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 +26 -16
- package/build/esm/action-form/fields/FormFieldRenderer.js.map +1 -1
- package/build/esm/action-form/fields/RadioButtonsField.js +57 -0
- package/build/esm/action-form/fields/RadioButtonsField.js.map +1 -0
- package/build/esm/action-form/fields/RadioButtonsField.module.css +83 -0
- package/build/esm/action-form/fields/TextAreaField.js +50 -0
- package/build/esm/action-form/fields/TextAreaField.js.map +1 -0
- package/build/esm/action-form/fields/TextInputField.js +3 -3
- package/build/esm/action-form/fields/TextInputField.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 +49 -8
- 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/components/PdfViewerAnnotationLayer.js +85 -18
- package/build/esm/pdf-viewer/components/PdfViewerAnnotationLayer.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerAnnotationLayer.module.css +18 -0
- package/build/esm/pdf-viewer/components/PdfViewerContent.js +15 -3
- package/build/esm/pdf-viewer/components/PdfViewerContent.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerOutlineSidebar.module.css +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerSidebar.module.css +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerSidebarHeader.module.css +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerToolbar.js +29 -2
- package/build/esm/pdf-viewer/components/PdfViewerToolbar.js.map +1 -1
- package/build/esm/pdf-viewer/components/PdfViewerToolbar.module.css +5 -0
- package/build/esm/pdf-viewer/constants.js +2 -1
- package/build/esm/pdf-viewer/constants.js.map +1 -1
- package/build/esm/pdf-viewer/hooks/usePdfAnnotationsByPage.js +30 -0
- package/build/esm/pdf-viewer/hooks/usePdfAnnotationsByPage.js.map +1 -0
- package/build/esm/pdf-viewer/hooks/usePdfFormFields.js +341 -0
- package/build/esm/pdf-viewer/hooks/usePdfFormFields.js.map +1 -0
- package/build/esm/pdf-viewer/hooks/usePdfHighlightMode.js +227 -0
- package/build/esm/pdf-viewer/hooks/usePdfHighlightMode.js.map +1 -0
- package/build/esm/pdf-viewer/hooks/usePdfViewer.js +16 -10
- package/build/esm/pdf-viewer/hooks/usePdfViewer.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 +5 -0
- package/build/esm/public/experimental.js.map +1 -1
- package/build/types/action-form/FormFieldApi.d.ts +11 -5
- 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 +3 -0
- package/build/types/action-form/fields/RadioButtonsField.d.ts.map +1 -0
- package/build/types/action-form/fields/TextAreaField.d.ts +3 -0
- package/build/types/action-form/fields/TextAreaField.d.ts.map +1 -0
- 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/components/PdfViewerAnnotationLayer.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerContent.d.ts +8 -4
- package/build/types/pdf-viewer/components/PdfViewerContent.d.ts.map +1 -1
- package/build/types/pdf-viewer/components/PdfViewerToolbar.d.ts +6 -1
- package/build/types/pdf-viewer/components/PdfViewerToolbar.d.ts.map +1 -1
- package/build/types/pdf-viewer/constants.d.ts +1 -1
- package/build/types/pdf-viewer/constants.d.ts.map +1 -1
- package/build/types/pdf-viewer/hooks/usePdfAnnotationsByPage.d.ts +5 -0
- package/build/types/pdf-viewer/hooks/usePdfAnnotationsByPage.d.ts.map +1 -0
- package/build/types/pdf-viewer/hooks/usePdfFormFields.d.ts +24 -0
- package/build/types/pdf-viewer/hooks/usePdfFormFields.d.ts.map +1 -0
- package/build/types/pdf-viewer/hooks/usePdfHighlightMode.d.ts +36 -0
- package/build/types/pdf-viewer/hooks/usePdfHighlightMode.d.ts.map +1 -0
- package/build/types/pdf-viewer/hooks/usePdfViewer.d.ts.map +1 -1
- package/build/types/pdf-viewer/types.d.ts +137 -13
- package/build/types/pdf-viewer/types.d.ts.map +1 -1
- package/build/types/public/experimental.d.ts +6 -1
- package/build/types/public/experimental.d.ts.map +1 -1
- package/package.json +6 -6
- package/build/browser/action-form/fields/TextInputField.module.css.js +0 -6
- 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
|
@@ -10,27 +10,49 @@ export interface OutlineItem {
|
|
|
10
10
|
italic: boolean;
|
|
11
11
|
}
|
|
12
12
|
/** The visual style of an annotation rendered on the PDF. */
|
|
13
|
-
export type AnnotationType = "highlight" | "underline" | "comment" | "pin";
|
|
14
|
-
/** A
|
|
15
|
-
export interface
|
|
13
|
+
export type AnnotationType = "highlight" | "underline" | "comment" | "pin" | "custom";
|
|
14
|
+
/** A rectangle in PDF coordinate space (origin: bottom-left of page). */
|
|
15
|
+
export interface PdfRect {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
}
|
|
21
|
+
/** Props passed to a custom annotation renderer. */
|
|
22
|
+
export interface PdfAnnotationRenderProps {
|
|
23
|
+
annotation: PdfAnnotation;
|
|
24
|
+
scale: number;
|
|
25
|
+
pageHeight: number;
|
|
26
|
+
}
|
|
27
|
+
/** Common fields shared by all annotation types. */
|
|
28
|
+
interface PdfAnnotationBase {
|
|
16
29
|
/** Unique identifier for this annotation */
|
|
17
30
|
id: string;
|
|
18
|
-
/** The type of annotation to render */
|
|
19
|
-
type: AnnotationType;
|
|
20
31
|
/** Page number (1-indexed) */
|
|
21
32
|
page: number;
|
|
22
33
|
/** Coordinates in PDF points (origin: bottom-left of page) */
|
|
23
|
-
rect:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
width: number
|
|
27
|
-
height: number
|
|
28
|
-
};
|
|
34
|
+
rect: PdfRect;
|
|
35
|
+
/** Additional rects for multi-line text highlights. When present, all rects are rendered. */
|
|
36
|
+
rects?: PdfRect[];
|
|
29
37
|
/** Optional label or tooltip text */
|
|
30
38
|
label?: string;
|
|
31
39
|
/** Optional color override (CSS color string) */
|
|
32
40
|
color?: string;
|
|
33
41
|
}
|
|
42
|
+
/** A built-in annotation type (highlight, underline, comment, pin). */
|
|
43
|
+
interface PdfStandardAnnotation extends PdfAnnotationBase {
|
|
44
|
+
/** The type of annotation to render */
|
|
45
|
+
type: "highlight" | "underline" | "comment" | "pin";
|
|
46
|
+
}
|
|
47
|
+
/** A custom annotation with a user-provided renderer. */
|
|
48
|
+
export interface PdfCustomAnnotation extends PdfAnnotationBase {
|
|
49
|
+
/** Must be "custom" for custom-rendered annotations */
|
|
50
|
+
type: "custom";
|
|
51
|
+
/** Render function for the custom annotation content (required for custom type) */
|
|
52
|
+
render: (props: PdfAnnotationRenderProps) => React.ReactNode;
|
|
53
|
+
}
|
|
54
|
+
/** A single annotation positioned on a specific page of the PDF. */
|
|
55
|
+
export type PdfAnnotation = PdfStandardAnnotation | PdfCustomAnnotation;
|
|
34
56
|
/** Result passed to the {@link PdfViewerProps.onDownload} callback. */
|
|
35
57
|
export type PdfDownloadResult = {
|
|
36
58
|
success: true
|
|
@@ -39,12 +61,72 @@ export type PdfDownloadResult = {
|
|
|
39
61
|
success: false
|
|
40
62
|
error: Error
|
|
41
63
|
};
|
|
64
|
+
/** Possible values for a PDF form field. */
|
|
65
|
+
export type PdfFormFieldValue = string | boolean | string[];
|
|
66
|
+
/** Data emitted when the user creates a text highlight via the highlight editor. */
|
|
67
|
+
export interface PdfTextHighlightEvent {
|
|
68
|
+
/** Internal PDF.js editor ID. Use with `deleteHighlight` to programmatically remove. */
|
|
69
|
+
editorId: string;
|
|
70
|
+
/** Page number (1-indexed) */
|
|
71
|
+
page: number;
|
|
72
|
+
/** Bounding rects in PDF coordinate space (bottom-left origin) */
|
|
73
|
+
rects: PdfRect[];
|
|
74
|
+
/** The selected text content */
|
|
75
|
+
selectedText: string;
|
|
76
|
+
/** Highlight color as CSS color string */
|
|
77
|
+
color: string;
|
|
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
|
+
}
|
|
42
124
|
/** Props for the {@link PdfViewer} component. */
|
|
43
125
|
export interface PdfViewerProps {
|
|
44
126
|
/** PDF source — URL string or ArrayBuffer */
|
|
45
127
|
src: string | ArrayBuffer;
|
|
46
|
-
/** Annotations to overlay on the PDF
|
|
47
|
-
annotations?:
|
|
128
|
+
/** Annotations to overlay on the PDF */
|
|
129
|
+
annotations?: PdfAnnotation[];
|
|
48
130
|
/**
|
|
49
131
|
* Callback fired when an annotation is clicked.
|
|
50
132
|
*
|
|
@@ -59,6 +141,26 @@ export interface PdfViewerProps {
|
|
|
59
141
|
* @returns void
|
|
60
142
|
*/
|
|
61
143
|
onDownload?: (result: PdfDownloadResult) => void;
|
|
144
|
+
/**
|
|
145
|
+
* Whether the highlight toggle button is shown in the toolbar.
|
|
146
|
+
* @default false
|
|
147
|
+
*/
|
|
148
|
+
enableHighlight?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Callback fired when the user creates a text highlight.
|
|
151
|
+
* Only fires when highlight mode is active.
|
|
152
|
+
*
|
|
153
|
+
* @param event - The highlight event with page, rects, text, and color
|
|
154
|
+
* @returns void
|
|
155
|
+
*/
|
|
156
|
+
onTextHighlight?: (event: PdfTextHighlightEvent) => void;
|
|
157
|
+
/**
|
|
158
|
+
* Callback fired when the user deletes a highlight via the PDF.js editor UI.
|
|
159
|
+
*
|
|
160
|
+
* @param event - The highlight event that was deleted
|
|
161
|
+
* @returns void
|
|
162
|
+
*/
|
|
163
|
+
onHighlightDelete?: (event: PdfTextHighlightEvent) => void;
|
|
62
164
|
/** Initial page number (1-indexed, default 1) */
|
|
63
165
|
initialPage?: number;
|
|
64
166
|
/** Initial zoom scale (default 1.0) */
|
|
@@ -81,6 +183,28 @@ export interface PdfViewerProps {
|
|
|
81
183
|
* If omitted, no icons are rendered.
|
|
82
184
|
*/
|
|
83
185
|
outlineIcons?: Partial<Record<number, React.ComponentType>>;
|
|
186
|
+
/**
|
|
187
|
+
* Initial form field values keyed by field name. Applied when the document loads.
|
|
188
|
+
* Use this to pre-populate form fields when resuming a previously edited PDF.
|
|
189
|
+
*/
|
|
190
|
+
formData?: Record<string, PdfFormFieldValue>;
|
|
191
|
+
/**
|
|
192
|
+
* Callback fired when the user clicks the save button in the toolbar.
|
|
193
|
+
* Receives all current form field values keyed by field name.
|
|
194
|
+
*
|
|
195
|
+
* @param data - All form field values keyed by field name
|
|
196
|
+
* @returns void
|
|
197
|
+
*/
|
|
198
|
+
onFormSubmit?: (data: Record<string, PdfFormFieldValue>) => void;
|
|
199
|
+
/**
|
|
200
|
+
* Callback fired when any form field value changes.
|
|
201
|
+
*
|
|
202
|
+
* @param fieldName - The name of the field that changed
|
|
203
|
+
* @param value - The new value
|
|
204
|
+
* @returns void
|
|
205
|
+
*/
|
|
206
|
+
onFormChange?: (fieldName: string, value: PdfFormFieldValue) => void;
|
|
84
207
|
/** Additional CSS class name for the root element */
|
|
85
208
|
className?: string;
|
|
86
209
|
}
|
|
210
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,YAAY,WAAW,OAAQ;;AAG/B,YAAY,cAAc,eAAe;;AAGzC,iBAAiB,YAAY;CAC3B;CACA;CACA;CACA;CACA;AACD;;AAGD,YAAY,
|
|
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;;CAEA,OAAO;;CAEP;;CAEA;AACD;;AAGD,iBAAiB,gBAAgB;;CAE/B,eAAeC;;CAEf,kBAAkBC;AACnB;;;;;AAMD,iBAAiB,yBAAyB;;CAExC,cAAc;;CAEd,cAAc;;CAEd,qBAAqBC,YAAY;;CAEjC,cAAcC,QAAQ;;CAEtB;;CAEA,mBAAmBC,OAAO;;CAE1B,qBAAqBA,OAAO;;CAE5B,WAAW,eAAe;;CAE1B,gBAAgBC,MAAM,eAAe;;CAErC,gBAAgBC,mBAAmBC,OAAO;;CAE1C;;CAEA;;CAEA;;CAEA;;CAEA,cAAc;;CAEd,eAAe,QAAQ,eAAe,MAAM;AAC7C;;AAGD,iBAAiB,eAAe;;CAE9B,cAAc;;CAEd,cAAc;;;;;;;CAOd,qBAAqBL,YAAY;;;;;;;CAOjC,cAAcC,QAAQ;;;;;CAKtB;;;;;;;;CAQA,mBAAmBC,OAAO;;;;;;;CAO1B,qBAAqBA,OAAO;;CAE5B;;CAEA;;CAEA;;;;;CAKA;;;;;CAKA,cAAc;;;;;;CAMd,eAAe,QAAQ,eAAe,MAAM;;;;;CAK5C,WAAW,eAAe;;;;;;;;CAQ1B,gBAAgBC,MAAM,eAAe;;;;;;;;CAQrC,gBAAgBC,mBAAmBC,OAAO;;CAE1C;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"}
|
|
@@ -12,7 +12,7 @@ export { BaseTable } from "../object-table/Table.js";
|
|
|
12
12
|
export { ColumnConfigDialog } from "../object-table/ColumnConfigDialog.js";
|
|
13
13
|
export type { ColumnConfigDialogProps, ColumnConfigOptions } from "../object-table/ColumnConfigDialog.js";
|
|
14
14
|
export { BasePdfViewer } from "../pdf-viewer/PdfViewer.js";
|
|
15
|
-
export type { AnnotationType, PdfAnnotation, PdfDownloadResult, PdfViewerProps, SidebarMode } from "../pdf-viewer/types.js";
|
|
15
|
+
export type { AnnotationType, PdfAnnotation, PdfAnnotationRenderProps, PdfCustomAnnotation, PdfDownloadResult, PdfFormFieldValue, PdfRect, PdfTextHighlightEvent, PdfViewerProps, SidebarMode } from "../pdf-viewer/types.js";
|
|
16
16
|
export { PdfViewerAnnotationLayer, type PdfViewerAnnotationLayerProps } from "../pdf-viewer/components/PdfViewerAnnotationLayer.js";
|
|
17
17
|
export { PdfViewerContent, type PdfViewerContentProps } from "../pdf-viewer/components/PdfViewerContent.js";
|
|
18
18
|
export { PdfViewerOutlineSidebar, type PdfViewerOutlineSidebarProps } from "../pdf-viewer/components/PdfViewerOutlineSidebar.js";
|
|
@@ -20,12 +20,17 @@ export { PdfViewerSearchBar, type PdfViewerSearchBarProps } from "../pdf-viewer/
|
|
|
20
20
|
export { PdfViewerSidebar, type PdfViewerSidebarProps } from "../pdf-viewer/components/PdfViewerSidebar.js";
|
|
21
21
|
export { PdfViewerToolbar, type PdfViewerToolbarProps } from "../pdf-viewer/components/PdfViewerToolbar.js";
|
|
22
22
|
export { type AnnotationPortalTarget, usePdfAnnotationPortals } from "../pdf-viewer/hooks/usePdfAnnotationPortals.js";
|
|
23
|
+
export { usePdfAnnotationsByPage } from "../pdf-viewer/hooks/usePdfAnnotationsByPage.js";
|
|
23
24
|
export { usePdfDocument } from "../pdf-viewer/hooks/usePdfDocument.js";
|
|
25
|
+
export { usePdfFormFields, type UsePdfFormFieldsOptions, type UsePdfFormFieldsResult } from "../pdf-viewer/hooks/usePdfFormFields.js";
|
|
26
|
+
export { usePdfHighlightMode, type UsePdfHighlightModeOptions, type UsePdfHighlightModeResult } from "../pdf-viewer/hooks/usePdfHighlightMode.js";
|
|
24
27
|
export { usePdfOutline } from "../pdf-viewer/hooks/usePdfOutline.js";
|
|
25
28
|
export { usePdfViewer, type UsePdfViewerResult } from "../pdf-viewer/hooks/usePdfViewer.js";
|
|
26
29
|
export { usePdfViewerSearch, type UsePdfViewerSearchResult } from "../pdf-viewer/hooks/usePdfViewerSearch.js";
|
|
27
30
|
export { usePdfViewerSync } from "../pdf-viewer/hooks/usePdfViewerSync.js";
|
|
28
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";
|
|
29
34
|
export { usePdfViewerCore, type UsePdfViewerCoreOptions, type UsePdfViewerCoreResult } from "../pdf-viewer/hooks/usePdfViewerCore.js";
|
|
30
35
|
export { usePdfViewerState, type UsePdfViewerStateOptions, type UsePdfViewerStateResult } from "../pdf-viewer/hooks/usePdfViewerState.js";
|
|
31
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,mBACA,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,sBAAsB;AAC/B,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.26",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -55,7 +55,7 @@
|
|
|
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": {
|
|
@@ -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.29",
|
|
82
|
+
"@osdk/client": "2.8.0-beta.29",
|
|
81
83
|
"@osdk/monorepo.api-extractor": "~0.7.0-beta.1",
|
|
82
|
-
"@osdk/
|
|
83
|
-
"@osdk/
|
|
84
|
-
"@osdk/monorepo.tsconfig": "~0.7.0-beta.1",
|
|
85
|
-
"@osdk/react": "0.10.0-beta.12"
|
|
84
|
+
"@osdk/react": "0.10.0-beta.14",
|
|
85
|
+
"@osdk/monorepo.tsconfig": "~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,CAAA;AAAG;AAqBnR,SAAS,WAAY,CAAA;AAAA,EACnB,QAAA;AAAA,EACA,GAAG;AACL,CAAG,EAAA;AACD,EAAA,uBAA0BA,sBAAA,CAAA,aAAA,CAAcC,eAAc,CAAA,IAAA,EAAM,MAAM,QAAQ,CAAA;AAC5E;AACA,SAAS,eAAgB,CAAA;AAAA,EACvB,QAAA;AAAA,EACA,GAAG;AACL,CAAG,EAAA;AACD,EAAA,uBAA0BD,sBAAA,CAAA,aAAA,CAAcC,eAAc,CAAA,QAAA,EAAU,MAAM,QAAQ,CAAA;AAChF;AACA,SAAS,cAAe,CAAA;AAAA,EACtB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAG,EAAA;AACD,EAAA,uBAA0BD,sBAAA,CAAA,aAAA,CAAcC,eAAc,CAAA,OAAA,EAAS,QAAS,CAAA;AAAA,IACtE,SAAW,EAAAC,2BAAA,CAAW,eAAO,CAAA,kBAAA,EAAoB,SAAS;AAAA,GAC5D,EAAG,IAAI,CAAA,EAAG,QAAQ,CAAA;AACpB;AACA,SAAS,iBAAkB,CAAA;AAAA,EACzB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAa,GAAA,CAAA;AAAA,EACb,GAAG;AACL,CAAG,EAAA;AACD,EAAA,uBAA0BF,sBAAA,CAAA,aAAA,CAAcC,eAAc,CAAA,UAAA,EAAY,QAAS,CAAA;AAAA,IACzE,SAAW,EAAAC,2BAAA,CAAW,eAAO,CAAA,qBAAA,EAAuB,SAAS,CAAA;AAAA,IAC7D;AAAA,GACF,EAAG,IAAI,CAAA,EAAG,QAAQ,CAAA;AACpB;AACA,SAAS,YAAa,CAAA;AAAA,EACpB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAG,EAAA;AACD,EAAA,uBAA0BF,sBAAA,CAAA,aAAA,CAAcC,eAAc,CAAA,KAAA,EAAO,QAAS,CAAA;AAAA,IACpE,SAAW,EAAAC,2BAAA,CAAW,eAAO,CAAA,gBAAA,EAAkB,SAAS;AAAA,GAC1D,EAAG,IAAI,CAAA,EAAG,QAAQ,CAAA;AACpB;AACO,SAAS,YAAe,GAAA;AAC7B,EAAoB,uBAAAF,sBAAA,CAAM,aAAc,CAAAC,eAAA,CAAc,KAAO,EAAA;AAAA,IAC3D,WAAW,eAAO,CAAA;AAAA,GACJ,kBAAAD,sBAAA,CAAM,aAAc,CAAA,QAAA,EAAU,IAAI,CAAC,CAAA;AACrD;AACA,SAAS,SAAS,KAAO,EAAA;AACvB,EAAoB,uBAAAA,sBAAA,CAAM,aAAc,CAAA,KAAA,EAAO,QAAS,CAAA;AAAA,IACtD,KAAO,EAAA,IAAA;AAAA,IACP,MAAQ,EAAA,IAAA;AAAA,IACR,OAAS,EAAA,WAAA;AAAA,IACT,IAAM,EAAA;AAAA,GACL,EAAA,KAAK,CAAgB,kBAAAA,sBAAA,CAAM,cAAc,MAAQ,EAAA;AAAA,IAClD,CAAG,EAAA,iMAAA;AAAA,IACH,WAAW,eAAO,CAAA;AAAA,GACnB,CAAA,kBAAsBA,sBAAA,CAAA,aAAA,CAAc,MAAQ,EAAA;AAAA,IAC3C,CAAG,EAAA,kSAAA;AAAA,IACH,WAAW,eAAO,CAAA;AAAA,GACnB,CAAC,CAAA;AACJ;AACO,IAAM,OAAU,GAAA;AAAA,EACrB,IAAM,EAAA,WAAA;AAAA,EACN,QAAU,EAAA,eAAA;AAAA,EACV,OAAS,EAAA,cAAA;AAAA,EACT,QAAQC,eAAc,CAAA,MAAA;AAAA,EACtB,UAAY,EAAA,iBAAA;AAAA,EACZ,KAAO,EAAA,YAAA;AAAA,EACP,KAAO,EAAA;AACT;;;ACzFA,IAAA,oBAAA,GAAA,EAAA;;;ACAA,SAASE,SAAW,GAAA;AAAE,EAAOA,OAAAA,SAAAA,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,GAAMA,EAAAA,SAAAA,CAAS,KAAM,CAAA,IAAA,EAAM,SAAS,CAAA;AAAG;AAqB5Q,SAAS,YAAa,CAAA;AAAA,EAC3B,OAAU,GAAA,WAAA;AAAA,EACV,SAAA;AAAA,EACA,GAAG;AACL,CAAG,EAAA;AACD,EAAA,uBAAoBH,sBAAAA,CAAM,aAAc,CAAAI,aAAA,EAAQD,SAAS,CAAA;AAAA,IACvD,SAAA,EAAWE,2BAAW,CAAA,oBAAA,CAAO,MAAQ,EAAA,OAAA,KAAY,YAAY,oBAAO,CAAA,aAAA,GAAgB,oBAAO,CAAA,eAAA,EAAiB,SAAS;AAAA,GACvH,EAAG,IAAI,CAAC,CAAA;AACV;;;AC7BA,IAAA,cAAA,GAAA,EAAA;;;ACqBO,SAAS,MAAO,CAAA;AAAA,EACrB,MAAA;AAAA,EACA,YAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAG,EAAA;AACD,EAAA,uBAAoBL,sBAAAA,CAAM,aAAc,CAAAM,aAAA,CAAa,IAAM,EAAA;AAAA,IACzD,IAAM,EAAA,MAAA;AAAA,IACN;AAAA,GACF,kBAAgBN,sBAAAA,CAAM,aAAc,CAAAM,aAAA,CAAa,MAAQ,EAAA,IAAA,kBAAmBN,sBAAAA,CAAM,aAAc,CAAAM,aAAA,CAAa,QAAU,EAAA;AAAA,IACrH,WAAW,cAAO,CAAA;AAAA,GACnB,CAAgB,kBAAAN,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"}
|