@servicetitan/anvil2-ext-common 0.5.0 → 0.6.0
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 +20 -0
- package/dist/index.js +36 -35341
- package/dist/index.js.map +1 -1
- package/dist/src/form/components/FormMultiSelect/FormMultiSelect.d.ts +1 -1
- package/dist/src/form/components/FormMultiSelect/FormMultiSelectSync.d.ts +12 -0
- package/dist/src/form/components/FormMultiSelect/index.d.ts +1 -0
- package/dist/src/form/components/FormSelect/FormSelect.d.ts +1 -1
- package/dist/src/form/components/FormSelect/FormSelectSync.d.ts +12 -0
- package/dist/src/form/components/FormSelect/index.d.ts +1 -0
- package/package.json +5 -4
- package/dist/index.css +0 -2915
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MultiSelectFieldOption, MultiSelectFieldProps } from '@servicetitan/anvil2
|
|
1
|
+
import { MultiSelectFieldOption, MultiSelectFieldProps } from '@servicetitan/anvil2';
|
|
2
2
|
import { A2InputFieldState, DistributiveOmit } from '../../state';
|
|
3
3
|
/**
|
|
4
4
|
* FormMultiSelect wraps the beta MultiSelectField and binds it to an
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MultiSelectFieldSyncProps, MultiSelectFieldOption } from '@servicetitan/anvil2';
|
|
2
|
+
import { A2InputFieldState } from '../../state';
|
|
3
|
+
/**
|
|
4
|
+
* FormMultiSelectSync wraps the beta MultiSelectFieldSync and binds it to an
|
|
5
|
+
* A2InputFieldState. Use this when the full option set is available client-side
|
|
6
|
+
* (passed via `options`) instead of loaded asynchronously through `loadOptions`.
|
|
7
|
+
* MultiSelectFieldSyncProps is a flat (non-union) type so we can use Omit directly.
|
|
8
|
+
*/
|
|
9
|
+
export interface FormMultiSelectSyncProps extends Omit<MultiSelectFieldSyncProps, "value" | "onSelectedOptionsChange" | "error" | "warning"> {
|
|
10
|
+
fieldState: A2InputFieldState<MultiSelectFieldOption[]>;
|
|
11
|
+
}
|
|
12
|
+
export declare const FormMultiSelectSync: ({ fieldState, disabled, ...props }: FormMultiSelectSyncProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SelectFieldOption, SelectFieldProps } from '@servicetitan/anvil2
|
|
1
|
+
import { SelectFieldOption, SelectFieldProps } from '@servicetitan/anvil2';
|
|
2
2
|
import { A2InputFieldState, DistributiveOmit } from '../../state';
|
|
3
3
|
/**
|
|
4
4
|
* FormSelect wraps the beta SelectField and binds it to an A2InputFieldState.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SelectFieldSyncProps, SelectFieldOption } from '@servicetitan/anvil2';
|
|
2
|
+
import { A2InputFieldState } from '../../state';
|
|
3
|
+
/**
|
|
4
|
+
* FormSelectSync wraps the beta SelectFieldSync and binds it to an
|
|
5
|
+
* A2InputFieldState. Use this when the full option set is available client-side
|
|
6
|
+
* (passed via `options`) instead of loaded asynchronously through `loadOptions`.
|
|
7
|
+
* SelectFieldSyncProps is a flat (non-union) type so we can use Omit directly.
|
|
8
|
+
*/
|
|
9
|
+
export interface FormSelectSyncProps extends Omit<SelectFieldSyncProps, "value" | "onSelectedOptionChange" | "error" | "warning"> {
|
|
10
|
+
fieldState: A2InputFieldState<SelectFieldOption | null>;
|
|
11
|
+
}
|
|
12
|
+
export declare const FormSelectSync: ({ fieldState, disabled, ...props }: FormSelectSyncProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/anvil2-ext-common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/src/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"classnames": "^2.5.1",
|
|
31
31
|
"tabbable": "^6.2.0",
|
|
32
32
|
"tinycolor2": "^1.6.0",
|
|
33
|
-
"uuid": "^14.0.0"
|
|
34
|
-
"@servicetitan/anvil2": "^3.2.0"
|
|
33
|
+
"uuid": "^14.0.0"
|
|
35
34
|
},
|
|
36
35
|
"peerDependencies": {
|
|
36
|
+
"@servicetitan/anvil2": "^3.4.0",
|
|
37
37
|
"@types/react": "^18 || ^19",
|
|
38
38
|
"@types/react-dom": "^18 || ^19",
|
|
39
39
|
"formstate": "^2.1.0",
|
|
@@ -83,7 +83,8 @@
|
|
|
83
83
|
"unified": "^11.0.5",
|
|
84
84
|
"vite": "6.4.2",
|
|
85
85
|
"vitest": "^3.2.4",
|
|
86
|
-
"vitest-axe": "^0.1.0"
|
|
86
|
+
"vitest-axe": "^0.1.0",
|
|
87
|
+
"@servicetitan/anvil2": "3.4.0"
|
|
87
88
|
},
|
|
88
89
|
"scripts": {
|
|
89
90
|
"dev": "vite",
|