@osdk/react-components 0.2.0-beta.17 → 0.2.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +86 -0
- package/build/browser/action-form/ActionForm.js +109 -0
- package/build/browser/action-form/ActionForm.js.map +1 -0
- package/build/browser/action-form/ActionFormApi.js.map +1 -1
- package/build/browser/action-form/BaseForm.js +74 -0
- package/build/browser/action-form/BaseForm.js.map +1 -0
- package/build/browser/action-form/FormFieldApi.js.map +1 -1
- package/build/browser/action-form/fields/FieldBridge.js +45 -0
- package/build/browser/action-form/fields/FieldBridge.js.map +1 -0
- package/build/browser/action-form/fields/FormFieldRenderer.js +68 -0
- package/build/browser/action-form/fields/FormFieldRenderer.js.map +1 -0
- package/build/browser/action-form/fields/TextInputField.js +38 -0
- package/build/browser/action-form/fields/TextInputField.js.map +1 -0
- package/build/browser/action-form/utils/coerceFieldValue.js +93 -0
- package/build/browser/action-form/utils/coerceFieldValue.js.map +1 -0
- package/build/browser/action-form/utils/getDefaultFieldComponent.js +56 -0
- package/build/browser/action-form/utils/getDefaultFieldComponent.js.map +1 -0
- package/build/browser/action-form/utils/getDefaultFieldDefinitions.js +33 -0
- package/build/browser/action-form/utils/getDefaultFieldDefinitions.js.map +1 -0
- package/build/browser/filter-list/base/BaseFilterList.js +23 -11
- package/build/browser/filter-list/base/BaseFilterList.js.map +1 -1
- package/build/browser/filter-list/base/FilterIcons.js +48 -13
- package/build/browser/filter-list/base/FilterIcons.js.map +1 -1
- package/build/browser/filter-list/base/FilterList.module.css +57 -13
- package/build/browser/filter-list/base/FilterList.module.css.js +5 -2
- package/build/browser/filter-list/base/FilterListHeader.js +10 -15
- package/build/browser/filter-list/base/FilterListHeader.js.map +1 -1
- package/build/browser/filter-list/base/FilterListHeader.module.css +13 -41
- package/build/browser/filter-list/base/FilterListHeader.module.css.js +1 -4
- package/build/browser/filter-list/hooks/useFilterListState.js +30 -11
- package/build/browser/filter-list/hooks/useFilterListState.js.map +1 -1
- package/build/browser/filter-list/inputs/LinkedPropertyInput.js +1 -1
- package/build/browser/filter-list/inputs/LinkedPropertyInput.js.map +1 -1
- package/build/browser/filter-list/utils/filterStateToWhereClause.js +120 -105
- package/build/browser/filter-list/utils/filterStateToWhereClause.js.map +1 -1
- package/build/browser/filter-list/utils/getFilterKey.js +1 -1
- package/build/browser/filter-list/utils/getFilterKey.js.map +1 -1
- package/build/browser/filter-list/utils/getFilterLabel.js +1 -1
- package/build/browser/filter-list/utils/getFilterLabel.js.map +1 -1
- package/build/browser/object-table/TableHeader.js +4 -1
- package/build/browser/object-table/TableHeader.js.map +1 -1
- package/build/browser/object-table/TableHeader.module.css +2 -1
- package/build/browser/object-table/TableHeader.module.css.js +1 -0
- package/build/browser/{filter-list/utils → shared}/assertUnreachable.js +1 -1
- package/build/browser/{filter-list/utils → shared}/assertUnreachable.js.map +1 -1
- package/build/browser/shared/typedMemo.js +25 -0
- package/build/browser/shared/typedMemo.js.map +1 -0
- package/build/browser/styles.css +72 -55
- package/build/cjs/public/experimental.cjs +293 -244
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/cjs/public/experimental.css +64 -47
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/esm/action-form/ActionForm.js +109 -0
- package/build/esm/action-form/ActionForm.js.map +1 -0
- package/build/esm/action-form/ActionFormApi.js.map +1 -1
- package/build/esm/action-form/BaseForm.js +74 -0
- package/build/esm/action-form/BaseForm.js.map +1 -0
- package/build/esm/action-form/FormFieldApi.js.map +1 -1
- package/build/esm/action-form/fields/FieldBridge.js +45 -0
- package/build/esm/action-form/fields/FieldBridge.js.map +1 -0
- package/build/esm/action-form/fields/FormFieldRenderer.js +68 -0
- package/build/esm/action-form/fields/FormFieldRenderer.js.map +1 -0
- package/build/esm/action-form/fields/TextInputField.js +38 -0
- package/build/esm/action-form/fields/TextInputField.js.map +1 -0
- package/build/esm/action-form/utils/coerceFieldValue.js +93 -0
- package/build/esm/action-form/utils/coerceFieldValue.js.map +1 -0
- package/build/esm/action-form/utils/getDefaultFieldComponent.js +56 -0
- package/build/esm/action-form/utils/getDefaultFieldComponent.js.map +1 -0
- package/build/esm/action-form/utils/getDefaultFieldDefinitions.js +33 -0
- package/build/esm/action-form/utils/getDefaultFieldDefinitions.js.map +1 -0
- package/build/esm/filter-list/base/BaseFilterList.js +23 -11
- package/build/esm/filter-list/base/BaseFilterList.js.map +1 -1
- package/build/esm/filter-list/base/FilterIcons.js +48 -13
- package/build/esm/filter-list/base/FilterIcons.js.map +1 -1
- package/build/esm/filter-list/base/FilterList.module.css +57 -13
- package/build/esm/filter-list/base/FilterListHeader.js +10 -15
- package/build/esm/filter-list/base/FilterListHeader.js.map +1 -1
- package/build/esm/filter-list/base/FilterListHeader.module.css +13 -41
- package/build/esm/filter-list/hooks/useFilterListState.js +30 -11
- package/build/esm/filter-list/hooks/useFilterListState.js.map +1 -1
- package/build/esm/filter-list/inputs/LinkedPropertyInput.js +1 -1
- package/build/esm/filter-list/inputs/LinkedPropertyInput.js.map +1 -1
- package/build/esm/filter-list/utils/filterStateToWhereClause.js +120 -105
- package/build/esm/filter-list/utils/filterStateToWhereClause.js.map +1 -1
- package/build/esm/filter-list/utils/getFilterKey.js +1 -1
- package/build/esm/filter-list/utils/getFilterKey.js.map +1 -1
- package/build/esm/filter-list/utils/getFilterLabel.js +1 -1
- package/build/esm/filter-list/utils/getFilterLabel.js.map +1 -1
- package/build/esm/object-table/TableHeader.js +4 -1
- package/build/esm/object-table/TableHeader.js.map +1 -1
- package/build/esm/object-table/TableHeader.module.css +2 -1
- package/build/esm/{filter-list/utils → shared}/assertUnreachable.js +1 -1
- package/build/esm/{filter-list/utils → shared}/assertUnreachable.js.map +1 -1
- package/build/esm/shared/typedMemo.js +25 -0
- package/build/esm/shared/typedMemo.js.map +1 -0
- package/build/types/action-form/ActionForm.d.ts +4 -0
- package/build/types/action-form/ActionForm.d.ts.map +1 -0
- package/build/types/action-form/ActionFormApi.d.ts +48 -32
- package/build/types/action-form/ActionFormApi.d.ts.map +1 -1
- package/build/types/action-form/BaseForm.d.ts +3 -0
- package/build/types/action-form/BaseForm.d.ts.map +1 -0
- package/build/types/action-form/FormFieldApi.d.ts +58 -18
- package/build/types/action-form/FormFieldApi.d.ts.map +1 -1
- package/build/types/action-form/fields/FieldBridge.d.ts +9 -0
- package/build/types/action-form/fields/FieldBridge.d.ts.map +1 -0
- package/build/types/action-form/fields/FormFieldRenderer.d.ts +8 -0
- package/build/types/action-form/fields/FormFieldRenderer.d.ts.map +1 -0
- package/build/types/action-form/fields/TextInputField.d.ts +3 -0
- package/build/types/action-form/fields/TextInputField.d.ts.map +1 -0
- package/build/types/action-form/utils/coerceFieldValue.d.ts +10 -0
- package/build/types/action-form/utils/coerceFieldValue.d.ts.map +1 -0
- package/build/types/action-form/utils/getDefaultFieldComponent.d.ts +6 -0
- package/build/types/action-form/utils/getDefaultFieldComponent.d.ts.map +1 -0
- package/build/types/action-form/utils/getDefaultFieldDefinitions.d.ts +6 -0
- package/build/types/action-form/utils/getDefaultFieldDefinitions.d.ts.map +1 -0
- package/build/types/filter-list/base/BaseFilterList.d.ts.map +1 -1
- package/build/types/filter-list/base/FilterIcons.d.ts +7 -0
- package/build/types/filter-list/base/FilterIcons.d.ts.map +1 -1
- package/build/types/filter-list/base/FilterListHeader.d.ts.map +1 -1
- package/build/types/filter-list/hooks/useFilterListState.d.ts.map +1 -1
- package/build/types/filter-list/inputs/LinkedPropertyInput.d.ts.map +1 -1
- package/build/types/filter-list/utils/filterStateToWhereClause.d.ts +5 -1
- package/build/types/filter-list/utils/filterStateToWhereClause.d.ts.map +1 -1
- package/build/types/filter-list/utils/getFilterKey.d.ts.map +1 -1
- package/build/types/filter-list/utils/getFilterLabel.d.ts.map +1 -1
- package/build/types/object-table/TableHeader.d.ts.map +1 -1
- package/build/types/shared/assertUnreachable.d.ts.map +1 -0
- package/build/types/shared/typedMemo.d.ts +6 -0
- package/build/types/shared/typedMemo.d.ts.map +1 -0
- package/package.json +7 -6
- package/build/types/filter-list/utils/assertUnreachable.d.ts.map +0 -1
- /package/build/types/{filter-list/utils → shared}/assertUnreachable.d.ts +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 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 React from "react";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* TODO: Delete this once `React.memo` is typed to not lose generics to `unknown`
|
|
21
|
+
*
|
|
22
|
+
* Context: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087
|
|
23
|
+
*/
|
|
24
|
+
export const typedReactMemo = React.memo;
|
|
25
|
+
//# sourceMappingURL=typedMemo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typedMemo.js","names":["React","typedReactMemo","memo"],"sources":["typedMemo.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\n\n/**\n * TODO: Delete this once `React.memo` is typed to not lose generics to `unknown`\n *\n * Context: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087\n */\nexport const typedReactMemo: <T>(component: T) => T = React.memo;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAsC,GAAGD,KAAK,CAACE,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc,wBAAwB,WAAY;AAGlD,OAAO,WAAgD,OAAQ;AAE/D,cAAc,uBAAkC,oBAAqB;AAQrE,OAAO,cAAMA,aAAa,UAAU,2BAClCC,OAAO,gBAAgB,OACpB,MAAM","names":["ActionForm: <Q extends ActionDefinition<unknown>>(\n props: ActionFormProps<Q>,\n) => React.ReactElement","props: ActionFormProps<Q>"],"sources":["../../../src/action-form/ActionForm.tsx"],"version":3,"file":"ActionForm.d.ts"}
|
|
@@ -1,43 +1,34 @@
|
|
|
1
|
-
import type { ActionDefinition, ActionEditResponse,
|
|
2
|
-
import type { ActionValidationError
|
|
3
|
-
import type { ActionParameters, FieldKey, FieldValueType, FormFieldDefinition } from "./FormFieldApi.js";
|
|
1
|
+
import type { ActionDefinition, ActionEditResponse, ActionValidationResponse } from "@osdk/api";
|
|
2
|
+
import type { ActionValidationError } from "@osdk/client";
|
|
3
|
+
import type { ActionParameters, FieldKey, FieldValueType, FormFieldDefinition, RendererFieldDefinition } from "./FormFieldApi.js";
|
|
4
4
|
/**
|
|
5
|
-
* Props for the ActionForm component
|
|
5
|
+
* Props for the ActionForm component.
|
|
6
|
+
*
|
|
7
|
+
* A discriminated union ensures that controlled mode (formState provided)
|
|
8
|
+
* always requires onFormStateChange, and uncontrolled mode makes `onFormStateChange` optional
|
|
6
9
|
*/
|
|
7
|
-
export
|
|
10
|
+
export type ActionFormProps<Q extends ActionDefinition<unknown>> = (ActionFormConfigProps<Q> & {
|
|
11
|
+
formState: FormState<Q>
|
|
12
|
+
onFormStateChange: (updater: (prevState: FormState<Q>) => FormState<Q>) => void
|
|
13
|
+
}) | (ActionFormConfigProps<Q> & {
|
|
14
|
+
formState?: undefined
|
|
15
|
+
onFormStateChange?: (updater: (prevState: FormState<Q>) => FormState<Q>) => void
|
|
16
|
+
});
|
|
17
|
+
interface ActionFormConfigProps<Q extends ActionDefinition<unknown>> extends Pick<BaseFormProps, "formTitle" | "isSubmitDisabled"> {
|
|
8
18
|
actionDefinition: Q;
|
|
9
19
|
/**
|
|
10
|
-
* If not supplied,
|
|
20
|
+
* If not supplied, field definitions are constructed from `ActionParameters`.
|
|
11
21
|
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* If not supplied, this will be constructed from ActionParameters
|
|
15
|
-
*/
|
|
16
|
-
formFieldDefinition?: Array<FormFieldDefinition<Q>>;
|
|
17
|
-
/**
|
|
18
|
-
* Called when a field value changed.
|
|
19
|
-
* Required when a field is in controlled mode, i.e. value is provided via formFieldDefinition.
|
|
20
|
-
*
|
|
21
|
-
* @param fieldKey The key of the changed field
|
|
22
|
-
* @param value the updated value of the field
|
|
23
|
-
*/
|
|
24
|
-
onFieldValueChanged?: <K extends FieldKey<Q>>(fieldKey: K, value: FieldValueType<Q, K>) => void;
|
|
25
|
-
/**
|
|
26
|
-
* Override to disable submit button
|
|
27
|
-
* If not provided, button is disabled when form is submitting or has validation errors
|
|
28
|
-
*
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
isSubmitDisabled?: boolean;
|
|
22
|
+
formFieldDefinitions?: ReadonlyArray<FormFieldDefinition<Q>>;
|
|
32
23
|
/**
|
|
33
24
|
* If supplied, this will override the default submit action
|
|
34
|
-
* By default, the action's applyAction will be called
|
|
25
|
+
* By default, the action's applyAction will be called
|
|
35
26
|
*
|
|
36
27
|
* @param formState all field values when onSubmit is called
|
|
37
|
-
* @param applyAction the function to execute the action
|
|
28
|
+
* @param applyAction the function to execute the action
|
|
38
29
|
* @returns a promise of the submission response
|
|
39
30
|
*/
|
|
40
|
-
onSubmit?:
|
|
31
|
+
onSubmit?: (formState: FormState<Q>, applyAction: (args: ActionParameters<Q>) => Promise<ActionEditResponse | undefined>) => Promise<unknown> | void;
|
|
41
32
|
/**
|
|
42
33
|
* Called when the validation response is returned from a validateOnly submission
|
|
43
34
|
*
|
|
@@ -49,7 +40,7 @@ export interface ActionFormProps<Q extends ActionDefinition<unknown>> {
|
|
|
49
40
|
*
|
|
50
41
|
* @param results the submission response
|
|
51
42
|
*/
|
|
52
|
-
onSuccess?: (results: ActionEditResponse) => void;
|
|
43
|
+
onSuccess?: (results: ActionEditResponse | undefined) => void;
|
|
53
44
|
/**
|
|
54
45
|
* Called when there is an error in form submission
|
|
55
46
|
*
|
|
@@ -60,7 +51,7 @@ export interface ActionFormProps<Q extends ActionDefinition<unknown>> {
|
|
|
60
51
|
/**
|
|
61
52
|
* Form values mapping parameter names to their values
|
|
62
53
|
*/
|
|
63
|
-
export type FormState<Q extends ActionDefinition<unknown>> = { [K in FieldKey<Q>] : FieldValueType<Q, K> };
|
|
54
|
+
export type FormState<Q extends ActionDefinition<unknown>> = { [K in FieldKey<Q>]? : FieldValueType<Q, K> };
|
|
64
55
|
/**
|
|
65
56
|
* Form error discriminated union
|
|
66
57
|
*/
|
|
@@ -69,8 +60,33 @@ export type FormError = {
|
|
|
69
60
|
error: ActionValidationError
|
|
70
61
|
} | {
|
|
71
62
|
type: "submission"
|
|
72
|
-
error:
|
|
63
|
+
error: unknown
|
|
73
64
|
} | {
|
|
74
65
|
type: "unknown"
|
|
75
66
|
error: unknown
|
|
76
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* Props for the `BaseForm` component, which renders a form without
|
|
70
|
+
* OSDK data fetching.
|
|
71
|
+
*
|
|
72
|
+
* Uses a discriminated union so that controlled mode (`formState` provided)
|
|
73
|
+
* always requires `onFieldValueChange`, and uncontrolled mode omits both.
|
|
74
|
+
* `onSubmit` receives the current form state so callers can access values
|
|
75
|
+
* even in uncontrolled mode.
|
|
76
|
+
*/
|
|
77
|
+
export type BaseFormProps = BaseFormCommonProps & ({
|
|
78
|
+
formState: Record<string, unknown>
|
|
79
|
+
onFieldValueChange: (fieldKey: string, value: unknown) => void
|
|
80
|
+
} | {
|
|
81
|
+
formState?: undefined
|
|
82
|
+
onFieldValueChange?: (fieldKey: string, value: unknown) => void
|
|
83
|
+
});
|
|
84
|
+
interface BaseFormCommonProps {
|
|
85
|
+
formTitle?: string;
|
|
86
|
+
fieldDefinitions: ReadonlyArray<RendererFieldDefinition>;
|
|
87
|
+
onSubmit: (formState: Record<string, unknown>) => void;
|
|
88
|
+
isSubmitDisabled?: boolean;
|
|
89
|
+
isPending?: boolean;
|
|
90
|
+
isLoading?: boolean;
|
|
91
|
+
}
|
|
92
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,kBACA,oBACA,
|
|
1
|
+
{"mappings":"AAgBA,cACE,kBACA,oBACA,gCACK,WAAY;AACnB,cAAc,6BAA6B,cAAe;AAC1D,cACE,kBACA,UACA,gBACA,qBACA,+BACK,mBAAoB;;;;;;;AAQ3B,YAAY,gBAAgB,UAAU,8BACjC,sBAAsB,KAAK;CAC5B,WAAW,UAAU;CACrB,oBACEA,UAAUC,WAAW,UAAU,OAAO,UAAU;AAEnD,MACE,sBAAsB,KAAK;CAC5B;CACA,qBACED,UAAUC,WAAW,UAAU,OAAO,UAAU;AAEnD;UAEO,sBAAsB,UAAU,mCAChC,KAAK,eAAe,cAAc,oBAC5C;CACE,kBAAkB;;;;CAKlB,uBAAuB,cAAc,oBAAoB;;;;;;;;;CAUzD,YACEC,WAAW,UAAU,IACrBC,cACEC,MAAM,iBAAiB,OACpB,QAAQ,oCACV;;;;;;CAOL,wBAAwBC,SAAS;;;;;;CAOjC,aAAaC,SAAS;;;;;;CAOtB,WAAWC,OAAO;AACnB;;;;AAKD,YAAY,UAAU,UAAU,gCAC7B,KAAK,SAAS,OAAM,eAAe,GAAG;;;;AAMzC,YAAY,YACR;CAAE,MAAM;CAAc,OAAO;AAAuB,IACpD;CAAE,MAAM;CAAc;AAAgB,IACtC;CAAE,MAAM;CAAW;AAAgB;;;;;;;;;;AAWvC,YAAY,gBACR,uBAEE;CACA,WAAW;CACX,qBAAqBC,kBAAkBC;AACxC,IACC;CACA;CACA,sBAAsBD,kBAAkBC;AACzC;UAGK,oBAAoB;CAC5B;CACA,kBAAkB,cAAc;CAChC,WAAWC,WAAW;CACtB;CACA;CACA;AACD","names":["updater: (prevState: FormState<Q>) => FormState<Q>","prevState: FormState<Q>","formState: FormState<Q>","applyAction: (\n args: ActionParameters<Q>,\n ) => Promise<ActionEditResponse | undefined>","args: ActionParameters<Q>","results: ActionValidationResponse","results: ActionEditResponse | undefined","error: FormError","fieldKey: string","value: unknown","formState: Record<string, unknown>"],"sources":["../../../src/action-form/ActionFormApi.ts"],"version":3,"file":"ActionFormApi.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,OAAO,WAA2C,OAAQ;AAE1D,cAAc,qBAAqB,oBAAqB;AAIxD,OAAO,cAAMA,UAAU,MAAM,GAAG","names":["BaseForm: React.FC<BaseFormProps>"],"sources":["../../../src/action-form/BaseForm.tsx"],"version":3,"file":"BaseForm.d.ts"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type { ActionDefinition, CompileTimeMetadata, ObjectSet, ObjectTypeDefinition } from "@osdk/api";
|
|
1
|
+
import type { ActionDefinition, ActionMetadata, ActionParam, CompileTimeMetadata, DataValueClientToWire, ObjectSet, ObjectTypeDefinition } from "@osdk/api";
|
|
2
2
|
import type React from "react";
|
|
3
3
|
/**
|
|
4
4
|
* A form field definition specifies configuration for a single field
|
|
5
5
|
*/
|
|
6
6
|
export interface FormFieldDefinition<
|
|
7
7
|
Q extends ActionDefinition<unknown>,
|
|
8
|
-
K extends FieldKey<Q> = FieldKey<Q
|
|
9
|
-
V extends FieldValueType<Q, K> = FieldValueType<Q, K>,
|
|
10
|
-
C extends ValidFormFieldForPropertyType<V> = ValidFormFieldForPropertyType<V>
|
|
8
|
+
K extends FieldKey<Q> = FieldKey<Q>
|
|
11
9
|
> {
|
|
12
10
|
/**
|
|
13
11
|
* The field's unique key
|
|
@@ -19,18 +17,13 @@ export interface FormFieldDefinition<
|
|
|
19
17
|
*/
|
|
20
18
|
label?: string;
|
|
21
19
|
/**
|
|
22
|
-
* Current value of the field
|
|
23
|
-
* If provided, the field operates in controlled mode
|
|
24
|
-
*/
|
|
25
|
-
value?: V;
|
|
26
|
-
/**
|
|
27
20
|
* Default value of the field
|
|
28
21
|
*/
|
|
29
|
-
defaultValue?:
|
|
22
|
+
defaultValue?: FieldValueType<Q, K>;
|
|
30
23
|
/**
|
|
31
24
|
* The form field component type to render
|
|
32
25
|
*/
|
|
33
|
-
fieldComponent:
|
|
26
|
+
fieldComponent: ValidFormFieldForPropertyType<FieldDescriptorType<Q, K>>;
|
|
34
27
|
/**
|
|
35
28
|
* Whether the field is required
|
|
36
29
|
*/
|
|
@@ -67,12 +60,12 @@ export interface FormFieldDefinition<
|
|
|
67
60
|
* @param value the current field value
|
|
68
61
|
* @returns a boolean promise indicating whether the value is valid
|
|
69
62
|
*/
|
|
70
|
-
validate?: (value:
|
|
63
|
+
validate?: (value: FieldValueType<Q, K>) => Promise<boolean>;
|
|
71
64
|
/**
|
|
72
65
|
* The component props for the form field
|
|
73
66
|
* Excludes runtime props (key, onChange) which are managed by ActionForm
|
|
74
67
|
*/
|
|
75
|
-
fieldComponentProps?: Omit<FormFieldPropsByType[
|
|
68
|
+
fieldComponentProps?: Omit<FormFieldPropsByType[ValidFormFieldForPropertyType<FieldDescriptorType<Q, K>>], "key" | "onChange">;
|
|
76
69
|
}
|
|
77
70
|
type ValidationError = {
|
|
78
71
|
type: ValidationRule
|
|
@@ -161,6 +154,7 @@ export interface TextAreaFieldProps extends BaseFormFieldProps<string>, Pick<Rea
|
|
|
161
154
|
}
|
|
162
155
|
export interface TextInputFieldProps extends BaseFormFieldProps<string>, Pick<React.InputHTMLAttributes<HTMLInputElement>, "minLength" | "maxLength"> {
|
|
163
156
|
fieldComponent: "TEXT_INPUT";
|
|
157
|
+
placeholder?: string;
|
|
164
158
|
}
|
|
165
159
|
/**
|
|
166
160
|
* Number input field props
|
|
@@ -202,15 +196,18 @@ export interface CustomFieldProps<V> extends BaseFormFieldProps<V> {
|
|
|
202
196
|
customRenderer: (props: BaseFormFieldProps<V>) => React.ReactNode;
|
|
203
197
|
}
|
|
204
198
|
export interface BaseFormFieldProps<V> {
|
|
205
|
-
fieldComponent: FieldComponent;
|
|
206
199
|
/**
|
|
207
|
-
*
|
|
200
|
+
* The value of the form field
|
|
201
|
+
*/
|
|
202
|
+
value: V;
|
|
203
|
+
/**
|
|
204
|
+
* Called when the field value changes.
|
|
208
205
|
*
|
|
209
|
-
* ActionForm internally wraps this to pass the key to
|
|
206
|
+
* ActionForm internally wraps this to pass the key to `onFieldValueChange`:
|
|
210
207
|
* ```
|
|
211
208
|
* <DropdownField
|
|
212
209
|
* {...fieldDef}
|
|
213
|
-
* onChange={(value) =>
|
|
210
|
+
* onChange={(value) => onFieldValueChange(fieldDef.key, value)}
|
|
214
211
|
* />
|
|
215
212
|
* ```
|
|
216
213
|
*
|
|
@@ -225,8 +222,17 @@ export type FieldKey<Q extends ActionDefinition<unknown>> = keyof ActionParamete
|
|
|
225
222
|
export type ActionParameters<Q extends ActionDefinition<unknown>> = CompileTimeMetadata<Q>["parameters"];
|
|
226
223
|
/**
|
|
227
224
|
* Extracts the value type for a specific parameter
|
|
225
|
+
*
|
|
226
|
+
* TODO: Re-use `BaseType`
|
|
228
227
|
*/
|
|
229
228
|
export type FieldValueType<
|
|
229
|
+
Q extends ActionDefinition<unknown>,
|
|
230
|
+
K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>
|
|
231
|
+
> = ActionParameters<Q>[K]["type"] extends ActionMetadata.DataType.Object<infer T> ? ActionParam.ObjectType<T> : ActionParameters<Q>[K]["type"] extends ActionMetadata.DataType.ObjectSet<infer T> ? ActionParam.ObjectSetType<T> : ActionParameters<Q>[K]["type"] extends ActionMetadata.DataType.Struct<infer T> ? ActionParam.StructType<T> : ActionParameters<Q>[K]["type"] extends keyof DataValueClientToWire ? DataValueClientToWire[ActionParameters<Q>[K]["type"]] : never;
|
|
232
|
+
/**
|
|
233
|
+
* Extracts the parameter type descriptor for a specific action parameter.
|
|
234
|
+
*/
|
|
235
|
+
export type FieldDescriptorType<
|
|
230
236
|
Q extends ActionDefinition<unknown> = ActionDefinition<unknown>,
|
|
231
237
|
K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>
|
|
232
238
|
> = ActionParameters<Q>[K]["type"];
|
|
@@ -235,7 +241,41 @@ export type FieldValueType<
|
|
|
235
241
|
*/
|
|
236
242
|
export type FieldComponent = "DATETIME_PICKER" | "DROPDOWN" | "FILE_PICKER" | "NUMBER_INPUT" | "RADIO_BUTTONS" | "OBJECT_SET" | "TEXT_AREA" | "TEXT_INPUT" | "CUSTOM";
|
|
237
243
|
/**
|
|
244
|
+
* Describes the data type of a form field, independent of OSDK.
|
|
245
|
+
* Mirrors ActionMetadata.DataType to keep the rendering layer OSDK-agnostic.
|
|
246
|
+
*/
|
|
247
|
+
export type FieldType = "boolean" | "string" | "integer" | "long" | "double" | "datetime" | "timestamp" | "attachment" | "marking" | "mediaReference" | "objectType" | "geoshape" | "geohash" | {
|
|
248
|
+
type: "object"
|
|
249
|
+
object: string
|
|
250
|
+
} | {
|
|
251
|
+
type: "objectSet"
|
|
252
|
+
objectSet: string
|
|
253
|
+
} | {
|
|
254
|
+
type: "interface"
|
|
255
|
+
interface: string
|
|
256
|
+
} | {
|
|
257
|
+
type: "struct"
|
|
258
|
+
struct: Record<string, string>
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* An OSDK-agnostic field definition used by BaseForm and FormFieldRenderer.
|
|
262
|
+
* Contains only the information needed to render a single field — no generics,
|
|
263
|
+
* no compile-time parameter constraints.
|
|
264
|
+
*/
|
|
265
|
+
export interface RendererFieldDefinition {
|
|
266
|
+
fieldKey: string;
|
|
267
|
+
fieldComponent: FieldComponent;
|
|
268
|
+
fieldType?: FieldType;
|
|
269
|
+
label?: string;
|
|
270
|
+
defaultValue?: unknown;
|
|
271
|
+
isRequired?: boolean;
|
|
272
|
+
placeholder?: string;
|
|
273
|
+
helperText?: string;
|
|
274
|
+
helperTextPlacement?: "bottom" | "tooltip";
|
|
275
|
+
fieldComponentProps?: Record<string, unknown>;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
238
278
|
* Gets valid form field types for a given property type
|
|
239
279
|
*/
|
|
240
|
-
export type ValidFormFieldForPropertyType<P extends
|
|
280
|
+
export type ValidFormFieldForPropertyType<P extends FieldDescriptorType> = P extends "objectSet" ? "OBJECT_SET" : P extends "object" ? "DROPDOWN" : P extends "mediaReference" | "attachment" ? "FILE_PICKER" : P extends "boolean" ? "RADIO_BUTTONS" | "DROPDOWN" : P extends "string" ? "TEXT_INPUT" | "TEXT_AREA" : P extends "datetime" | "timestamp" ? "DATETIME_PICKER" : P extends "double" | "integer" | "long" | "float" | "short" | "byte" | "decimal" ? "NUMBER_INPUT" : never;
|
|
241
281
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,kBACA,qBACA,WACA,4BACK,WAAY;AACnB,YAAY,WAAW,OAAQ;;;;AAK/B,iBAAiB;CACf,UAAU;CACV,UAAU,SAAS,KAAK,SAAS;
|
|
1
|
+
{"mappings":"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","names":["error: ValidationError","value: FieldValueType<Q, K>","date: Date","props: BaseFormFieldProps<V>","value?: V"],"sources":["../../../src/action-form/FormFieldApi.ts"],"version":3,"file":"FormFieldApi.d.ts"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Control } from "react-hook-form";
|
|
3
|
+
import type { RendererFieldDefinition } from "../FormFieldApi.js";
|
|
4
|
+
export interface FieldBridgeProps {
|
|
5
|
+
fieldDef: RendererFieldDefinition;
|
|
6
|
+
control: Control<Record<string, unknown>>;
|
|
7
|
+
onExternalChange?: (fieldKey: string, value: unknown) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const FieldBridge: React.FC<FieldBridgeProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,OAAO,WAAkC,OAAQ;AACjD,cAAc,eAAe,iBAAkB;AAE/C,cAAc,+BAA+B,oBAAqB;AAGlE,iBAAiB,iBAAiB;CAChC,UAAU;CACV,SAAS,QAAQ;CACjB,oBAAoBA,kBAAkBC;AACvC;AACD,OAAO,cAAMC,aAAa,MAAM,GAAG","names":["fieldKey: string","value: unknown","FieldBridge: React.FC<FieldBridgeProps>"],"sources":["../../../../src/action-form/fields/FieldBridge.tsx"],"version":3,"file":"FieldBridge.d.ts"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { RendererFieldDefinition } from "../FormFieldApi.js";
|
|
3
|
+
export interface FormFieldRendererProps {
|
|
4
|
+
fieldDefinition: RendererFieldDefinition;
|
|
5
|
+
value: unknown;
|
|
6
|
+
onFieldValueChange: (value: unknown) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const FormFieldRenderer: React.FC<FormFieldRendererProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,OAAO,WAAqB,OAAQ;AACpC,cAAc,+BAA+B,oBAAqB;AAGlE,iBAAiB,uBAAuB;CACtC,iBAAiB;CACjB;CACA,qBAAqBA;AACtB;AAED,OAAO,cAAMC,mBAAmB,MAAM,GAAG","names":["value: unknown","FormFieldRenderer: React.FC<FormFieldRendererProps>"],"sources":["../../../../src/action-form/fields/FormFieldRenderer.tsx"],"version":3,"file":"FormFieldRenderer.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,OAAO,WAA4B,OAAQ;AAC3C,cAAc,2BAA2B,oBAAqB;AAE9D,OAAO,iBAAS,eAAe,EAC7B,OACA,UACA,aACA,WACA,WACoB,EAAnB,sBAAsB,MAAM","names":[],"sources":["../../../../src/action-form/fields/TextInputField.tsx"],"version":3,"file":"TextInputField.d.ts"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FieldType } from "../FormFieldApi.js";
|
|
2
|
+
/**
|
|
3
|
+
* Coerces a raw form field value to match the expected type for the given
|
|
4
|
+
* field type. Returns `undefined` when coercion fails
|
|
5
|
+
* (e.g. non-numeric string for a number field).
|
|
6
|
+
*
|
|
7
|
+
* Complex types (object, objectSet, struct, interface) are passed through
|
|
8
|
+
* unchanged since they cannot be meaningfully coerced.
|
|
9
|
+
*/
|
|
10
|
+
export declare function coerceFieldValue(parameterType: FieldType | undefined, rawValue: unknown): unknown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc,iBAAiB,oBAAqB;;;;;;;;;AAUpD,OAAO,iBAAS,iBACdA,eAAe,uBACfC","names":["parameterType: FieldType | undefined","rawValue: unknown"],"sources":["../../../../src/action-form/utils/coerceFieldValue.ts"],"version":3,"file":"coerceFieldValue.d.ts"}
|
|
@@ -0,0 +1,6 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ActionDefinition, ActionMetadata } from "@osdk/api";
|
|
2
|
+
import type { FormFieldDefinition } from "../FormFieldApi.js";
|
|
3
|
+
/**
|
|
4
|
+
* Derives default field definitions from fetched ActionMetadata.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getDefaultFieldDefinitions<Q extends ActionDefinition<unknown>>(metadata: ActionMetadata): ReadonlyArray<FormFieldDefinition<Q>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cAAc,kBAAkB,sBAAsB,WAAY;AAClE,cAIE,2BAEK,oBAAqB;;;;AAM5B,OAAO,iBAAS,2BACd,UAAU,2BACVA,UAAU,iBAAiB,cAAc,oBAAoB","names":["metadata: ActionMetadata"],"sources":["../../../../src/action-form/utils/getDefaultFieldDefinitions.ts"],"version":3,"file":"getDefaultFieldDefinitions.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAkBA,OAAO,
|
|
1
|
+
{"mappings":"AAkBA,OAAO,WAA4B,OAAQ;AAC3C,cAAc,2BAA2B,wBAAyB;AAMlE,OAAO,iBAAS,eAAe,GAC7BA,OAAO,oBAAoB,KAC1B,MAAM","names":["props: BaseFilterListProps<D>"],"sources":["../../../../src/filter-list/base/BaseFilterList.tsx"],"version":3,"file":"BaseFilterList.d.ts"}
|
|
@@ -2,3 +2,10 @@ import React from "react";
|
|
|
2
2
|
export declare function IncludeIcon(): React.ReactElement;
|
|
3
3
|
export declare function ExcludeIcon(): React.ReactElement;
|
|
4
4
|
export declare function RemoveIcon(): React.ReactElement;
|
|
5
|
+
export declare function SearchIcon(): React.ReactElement;
|
|
6
|
+
export declare function OverflowMenuIcon(): React.ReactElement;
|
|
7
|
+
export declare function ChevronDownIcon(): React.ReactElement;
|
|
8
|
+
export declare function CollapseIcon(): React.ReactElement;
|
|
9
|
+
export declare function ExpandIcon(): React.ReactElement;
|
|
10
|
+
export declare function ResetIcon(): React.ReactElement;
|
|
11
|
+
export declare function CheckIcon(): React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AA0BA,OAAO,WAAW,OAAQ;AAE1B,OAAO,iBAAS,eAAe,MAAM;AAgBrC,OAAO,iBAAS,eAAe,MAAM;AAiBrC,OAAO,iBAAS,cAAc,MAAM;AAIpC,OAAO,iBAAS,cAAc,MAAM;AAIpC,OAAO,iBAAS,oBAAoB,MAAM;AAI1C,OAAO,iBAAS,mBAAmB,MAAM;AAIzC,OAAO,iBAAS,gBAAgB,MAAM;AAItC,OAAO,iBAAS,cAAc,MAAM;AAIpC,OAAO,iBAAS,aAAa,MAAM;AAInC,OAAO,iBAAS,aAAa,MAAM","names":[],"sources":["../../../../src/filter-list/base/FilterIcons.tsx"],"version":3,"file":"FilterIcons.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AAiBA,OAAO,cAAoB,iBAA8B,OAAQ;UAIvD,sBAAsB;CAC9B;CACA,YAAY;CACZ;CACA,qBAAqBA;CACrB;CACA;CACA;CACA;AACD;AAED,iBAAS,sBAAsB,EAC7B,OACA,WACA,WACA,mBACA,iBACA,SACA,uBACA,mBACsB,EAArB,wBAAwB,MAAM;AAqDjC,OAAO,cAAMC,kBAAkB,MAAM,2BAC5B","names":["collapsed: boolean","FilterListHeader: React.MemoExoticComponent<\n typeof FilterListHeaderInner\n>"],"sources":["../../../../src/filter-list/base/FilterListHeader.tsx"],"version":3,"file":"FilterListHeader.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,sBAAsB,mBAAmB,WAAY;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,sBAAsB,mBAAmB,WAAY;AAInE,cAAc,uBAAuB,qBAAsB;AAC3D,cAAc,mBAAmB,yBAA0B;AAS3D,iBAAiB,yBAAyB,UAAU,sBAAsB;CACxE,cAAc,YAAY;CAC1B,iBACEA,mBACAC,OAAO;CAET,aAAa,YAAY;CACzB,uBAAuB,YAAY,YAAY;CAC/C;CACA;AACD;AAqDD,OAAO,iBAAS,mBAAmB,UAAU,sBAC3CC,OAAO,gBAAgB,KACtB,yBAAyB","names":["filterKey: string","state: FilterState","props: FilterListProps<Q>"],"sources":["../../../../src/filter-list/hooks/useFilterListState.ts"],"version":3,"file":"useFilterListState.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cACE,WACA,WACA,sBACA,oBACK,WAAY;AAGnB,OAAO,WAA2C,OAAQ;
|
|
1
|
+
{"mappings":"AAgBA,cACE,WACA,WACA,sBACA,oBACK,WAAY;AAGnB,OAAO,WAA2C,OAAQ;AAgB1D,cAAc,mBAAmB,yBAA0B;AAE3D,cAAc,sCAAsC,+BAAgC;UAW1E;CACR,UAAU;CACV,UAAU,UAAU;EACpB;CACA,WAAW,UAAU;CACrB,YAAY,+BACV,GACA,GACA,sBACA,aAAa;CAEf,aAAa;CACb,uBAAuBA,OAAO;CAC9B;CACA,QAAQ,MAAM;AACf;AAED,iBAAS;CACP,UAAU;CACV,UAAU,UAAU;EACpB,EACA,WACA,YACA,aACA,sBACA,WACA,OAC+B,EAA9B,yBAAyB,GAAG,KAAK,MAAM;AA+U1C,OAAO,cAAMC,4BAA4B","names":["state: FilterState","LinkedPropertyInput: typeof LinkedPropertyInputInner"],"sources":["../../../../src/filter-list/inputs/LinkedPropertyInput.tsx"],"version":3,"file":"LinkedPropertyInput.d.ts"}
|
|
@@ -13,4 +13,8 @@ import type { FilterState } from "../FilterListItemApi.js";
|
|
|
13
13
|
* cannot verify that the constructed clause structure matches the generic Q's
|
|
14
14
|
* expected shape, but the structure is guaranteed to be valid by construction.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export interface PropertyTypeInfo {
|
|
17
|
+
type: string;
|
|
18
|
+
multiplicity: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare function buildWhereClause<Q extends ObjectTypeDefinition>(definitions: Array<FilterDefinitionUnion<Q>> | undefined, filterStates: Map<string, FilterState>, operator: "and" | "or", propertyTypes?: Map<string, PropertyTypeInfo>, excludeFilterKey?: string): WhereClause<Q>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,sBAAsB,mBAAmB,WAAY;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,sBAAsB,mBAAmB,WAAY;AAGnE,cAAc,6BAA6B,qBAAsB;AACjE,cAAc,mBAAmB,yBAA0B;;;;;;;;;;;;;AA0M3D,iBAAiB,iBAAiB;CAChC;CACA;AACD;AAED,OAAO,iBAAS,iBAAiB,UAAU,sBACzCA,aAAa,MAAM,sBAAsB,iBACzCC,cAAc,YAAY,cAC1BC,UAAU,QAAQ,MAClBC,gBAAgB,YAAY,mBAC5BC,4BACC,YAAY","names":["definitions: Array<FilterDefinitionUnion<Q>> | undefined","filterStates: Map<string, FilterState>","operator: \"and\" | \"or\"","propertyTypes?: Map<string, PropertyTypeInfo>","excludeFilterKey?: string"],"sources":["../../../../src/filter-list/utils/filterStateToWhereClause.ts"],"version":3,"file":"filterStateToWhereClause.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,4BAA4B,WAAY;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,4BAA4B,WAAY;AAEtD,cAAc,6BAA6B,qBAAsB;AAEjE,OAAO,iBAAS,aAAa,UAAU,sBACrCA,YAAY,sBAAsB","names":["definition: FilterDefinitionUnion<Q>"],"sources":["../../../../src/filter-list/utils/getFilterKey.ts"],"version":3,"file":"getFilterKey.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,4BAA4B,WAAY;
|
|
1
|
+
{"mappings":"AAgBA,cAAc,4BAA4B,WAAY;AAEtD,cAAc,6BAA6B,qBAAsB;AAEjE,OAAO,iBAAS,eAAe,UAAU,sBACvCA,YAAY,sBAAsB","names":["definition: FilterDefinitionUnion<Q>"],"sources":["../../../../src/filter-list/utils/getFilterLabel.ts"],"version":3,"file":"getFilterLabel.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAGE,SAEA,aAEK,uBAAwB;
|
|
1
|
+
{"mappings":"AAgBA,cAGE,SAEA,aAEK,uBAAwB;AAE/B,OAAO,WAA+C,OAAQ;AAK9D,cACO,8BAEA,6BAA8B;UAK3B,iBACR,cAAc,SACd;CACA,OAAO,MAAM;CACb,yBAAyB;AAC1B;AAyBD,OAAO,iBAAS,YACd,cAAc,SACd,EACA,OACA,wBACwB,EAAvB,iBAAiB,SAAS,MAAM","names":[],"sources":["../../../src/object-table/TableHeader.tsx"],"version":3,"file":"TableHeader.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;AAqBA,OAAO,iBAAS,kBAAkBA","names":["value: never"],"sources":["../../../src/shared/assertUnreachable.ts"],"version":3,"file":"assertUnreachable.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;AAuBA,OAAO,cAAMA,iBAAiB,GAAGC,WAAW,MAAM","names":["typedReactMemo: <T>(component: T) => T","component: T"],"sources":["../../../src/shared/typedMemo.ts"],"version":3,"file":"typedMemo.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.19",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"@dnd-kit/utilities": "^3.2.2",
|
|
45
45
|
"@tanstack/react-table": "^8.21.3",
|
|
46
46
|
"@tanstack/react-virtual": "^3.13.13",
|
|
47
|
-
"lodash-es": "^4.17.21"
|
|
47
|
+
"lodash-es": "^4.17.21",
|
|
48
|
+
"react-hook-form": "^7.54.0"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|
|
50
51
|
"@osdk/api": "*",
|
|
@@ -66,11 +67,11 @@
|
|
|
66
67
|
"react": "^18.3.1",
|
|
67
68
|
"react-dom": "^18.3.1",
|
|
68
69
|
"typescript": "~5.5.4",
|
|
69
|
-
"@osdk/api": "2.8.0-beta.
|
|
70
|
-
"@osdk/client": "2.8.0-beta.20",
|
|
70
|
+
"@osdk/api": "2.8.0-beta.22",
|
|
71
71
|
"@osdk/monorepo.api-extractor": "~0.7.0-beta.1",
|
|
72
|
-
"@osdk/
|
|
73
|
-
"@osdk/monorepo.tsconfig": "~0.7.0-beta.1"
|
|
72
|
+
"@osdk/client": "2.8.0-beta.22",
|
|
73
|
+
"@osdk/monorepo.tsconfig": "~0.7.0-beta.1",
|
|
74
|
+
"@osdk/react": "0.10.0-beta.10"
|
|
74
75
|
},
|
|
75
76
|
"publishConfig": {
|
|
76
77
|
"access": "public"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;AAqBA,OAAO,iBAAS,kBAAkBA","names":["value: never"],"sources":["../../../../src/filter-list/utils/assertUnreachable.ts"],"version":3,"file":"assertUnreachable.d.ts"}
|
|
File without changes
|