zds-pickers 4.0.17 → 4.0.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/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/types/pickers/CCPicker.d.ts +1 -1
- package/dist/types/pickers/ChannelPicker.d.ts +1 -1
- package/dist/types/pickers/KnobPicker.d.ts +23 -1
- package/dist/types/pickers/LatchPicker.d.ts +1 -1
- package/dist/types/pickers/MappingPicker.d.ts +2 -2
- package/dist/types/pickers/NotePicker.d.ts +2 -2
- package/dist/types/pickers/PolarityPicker.d.ts +2 -2
- package/dist/types/pickers/ResponseCurvePicker.d.ts +23 -1
- package/dist/types/pickers/Select.d.ts +2 -2
- package/dist/types/pickers/StatusPicker.d.ts +2 -2
- package/lib/pickers/CCPicker.tsx +1 -1
- package/lib/pickers/ChannelPicker.tsx +1 -1
- package/lib/pickers/LatchPicker.tsx +1 -1
- package/lib/pickers/MappingPicker.tsx +1 -1
- package/lib/pickers/NotePicker.tsx +1 -1
- package/lib/pickers/PolarityPicker.tsx +1 -1
- package/lib/pickers/Select.tsx +6 -1
- package/lib/pickers/StatusPicker.tsx +3 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GroupBase, SelectInstance } from 'react-select';
|
|
2
2
|
import type { Option, SelectProps } from './Select';
|
|
3
|
-
type CCPickerProps = SelectProps<number>;
|
|
3
|
+
type CCPickerProps = Omit<SelectProps<number>, 'options'>;
|
|
4
4
|
type CCPickerRef = SelectInstance<Option<number>, false, GroupBase<Option<number>>>;
|
|
5
5
|
declare const CCPicker: import("react").ForwardRefExoticComponent<CCPickerProps & import("react").RefAttributes<SelectInstance<Option<number>, false, GroupBase<Option<number>>>>>;
|
|
6
6
|
export { CCPicker };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GroupBase, SelectInstance } from 'react-select';
|
|
2
2
|
import type { Option, SelectProps } from './Select';
|
|
3
3
|
type Channel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
4
|
-
type ChannelPickerProps = SelectProps<Channel>;
|
|
4
|
+
type ChannelPickerProps = Omit<SelectProps<Channel>, 'options'>;
|
|
5
5
|
type ChannelPickerRef = SelectInstance<Option<Channel>, false, GroupBase<Option<Channel>>>;
|
|
6
6
|
declare const ChannelPicker: import("react").ForwardRefExoticComponent<ChannelPickerProps & import("react").RefAttributes<SelectInstance<Option<Channel>, false, GroupBase<Option<Channel>>>>>;
|
|
7
7
|
export { ChannelPicker };
|
|
@@ -12,7 +12,29 @@ type KnobPickerProps = SelectProps<number> & {
|
|
|
12
12
|
value: number;
|
|
13
13
|
};
|
|
14
14
|
type KnobPickerRef = SelectInstance<Option<number>, false, GroupBase<Option<number>>>;
|
|
15
|
-
declare const KnobPicker: import("react").ForwardRefExoticComponent<
|
|
15
|
+
declare const KnobPicker: import("react").ForwardRefExoticComponent<Partial<import("node_modules/react-select/dist/declarations/src/components").SelectComponents<Option<number>, false, GroupBase<Option<number>>>> & {
|
|
16
|
+
className?: string;
|
|
17
|
+
components?: object;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
filterOptions?: ((candidate: Option<number>, inputValue: string) => boolean) | undefined;
|
|
20
|
+
formatOptionLabel?: (option: Option<unknown>, { context }: {
|
|
21
|
+
context: "menu" | "value";
|
|
22
|
+
}) => React.ReactNode;
|
|
23
|
+
isSearchable?: boolean;
|
|
24
|
+
label?: string;
|
|
25
|
+
onChange: (value: number) => void;
|
|
26
|
+
options: Option<number>[] | {
|
|
27
|
+
entries: Option<number>[];
|
|
28
|
+
}[];
|
|
29
|
+
preserveMenuWidth?: boolean;
|
|
30
|
+
selectProps?: {
|
|
31
|
+
actionButton?: React.ReactNode;
|
|
32
|
+
inputValue?: string;
|
|
33
|
+
placeholder?: React.ReactNode;
|
|
34
|
+
};
|
|
35
|
+
shrinkLabel?: boolean;
|
|
36
|
+
value: number;
|
|
37
|
+
} & {
|
|
16
38
|
highToLow?: boolean;
|
|
17
39
|
includeLabel?: boolean;
|
|
18
40
|
includePicker?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GroupBase, SelectInstance } from 'react-select';
|
|
2
2
|
import type { Polarity } from './PolarityPicker';
|
|
3
3
|
import type { Option, SelectProps } from './Select';
|
|
4
|
-
type LatchPickerProps = SelectProps<Polarity>;
|
|
4
|
+
type LatchPickerProps = Omit<SelectProps<Polarity>, 'options'>;
|
|
5
5
|
type LatchPickerRef = SelectInstance<Option<Polarity>, false, GroupBase<Option<Polarity>>>;
|
|
6
6
|
declare const LatchPicker: import("react").ForwardRefExoticComponent<LatchPickerProps & import("react").RefAttributes<SelectInstance<Option<Polarity>, false, GroupBase<Option<Polarity>>>>>;
|
|
7
7
|
export { LatchPicker };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { GroupBase, SelectInstance } from 'react-select';
|
|
2
2
|
import type { Option, SelectProps } from './Select';
|
|
3
|
-
type MappingPickerProps = SelectProps<string> & {
|
|
3
|
+
type MappingPickerProps = Omit<SelectProps<string>, 'options'> & {
|
|
4
4
|
allowClearing: boolean;
|
|
5
5
|
};
|
|
6
6
|
type MappingPickerRef = SelectInstance<Option<string>, false, GroupBase<Option<string>>>;
|
|
7
|
-
declare const MappingPicker: import("react").ForwardRefExoticComponent<SelectProps<string> & {
|
|
7
|
+
declare const MappingPicker: import("react").ForwardRefExoticComponent<Omit<SelectProps<string>, "options"> & {
|
|
8
8
|
allowClearing: boolean;
|
|
9
9
|
} & import("react").RefAttributes<SelectInstance<Option<string>, false, GroupBase<Option<string>>>>>;
|
|
10
10
|
export { MappingPicker };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GroupBase, SelectInstance } from 'react-select';
|
|
2
2
|
import { type Mapping } from 'zds-mappings';
|
|
3
3
|
import type { Option, SelectProps } from './Select';
|
|
4
|
-
type NotePickerProps = SelectProps<number> & {
|
|
4
|
+
type NotePickerProps = Omit<SelectProps<number>, 'options'> & {
|
|
5
5
|
channel: number;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
isMelodicMode?: boolean;
|
|
@@ -9,7 +9,7 @@ type NotePickerProps = SelectProps<number> & {
|
|
|
9
9
|
onChange: (value: number) => void;
|
|
10
10
|
};
|
|
11
11
|
type NotePickerRef = SelectInstance<Option<number>, false, GroupBase<Option<number>>>;
|
|
12
|
-
declare const NotePicker: import("react").ForwardRefExoticComponent<SelectProps<number> & {
|
|
12
|
+
declare const NotePicker: import("react").ForwardRefExoticComponent<Omit<SelectProps<number>, "options"> & {
|
|
13
13
|
channel: number;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
isMelodicMode?: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { GroupBase, SelectInstance } from 'react-select';
|
|
2
2
|
import type { Option, SelectProps } from './Select';
|
|
3
3
|
type Polarity = 0 | 1;
|
|
4
|
-
type PolarityPickerProps = SelectProps<Polarity> & {
|
|
4
|
+
type PolarityPickerProps = Omit<SelectProps<Polarity>, 'options'> & {
|
|
5
5
|
labelOff?: string;
|
|
6
6
|
labelOn?: string;
|
|
7
7
|
};
|
|
8
8
|
type PolarityPickerRef = SelectInstance<Option<Polarity>, false, GroupBase<Option<Polarity>>>;
|
|
9
|
-
declare const PolarityPicker: import("react").ForwardRefExoticComponent<SelectProps<Polarity> & {
|
|
9
|
+
declare const PolarityPicker: import("react").ForwardRefExoticComponent<Omit<SelectProps<Polarity>, "options"> & {
|
|
10
10
|
labelOff?: string;
|
|
11
11
|
labelOn?: string;
|
|
12
12
|
} & import("react").RefAttributes<SelectInstance<Option<Polarity>, false, GroupBase<Option<Polarity>>>>>;
|
|
@@ -7,7 +7,29 @@ type ResponseCurvePickerProps = SelectProps<Curve> & {
|
|
|
7
7
|
Tooltip?: React.FC<TooltipProps>;
|
|
8
8
|
};
|
|
9
9
|
type ResponseCurvePickerRef = SelectInstance<Option<Curve>, false, GroupBase<Option<Curve>>>;
|
|
10
|
-
declare const ResponseCurvePicker: import("react").ForwardRefExoticComponent<
|
|
10
|
+
declare const ResponseCurvePicker: import("react").ForwardRefExoticComponent<Partial<import("node_modules/react-select/dist/declarations/src/components").SelectComponents<Option<Curve>, false, GroupBase<Option<Curve>>>> & {
|
|
11
|
+
className?: string;
|
|
12
|
+
components?: object;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
filterOptions?: ((candidate: Option<Curve>, inputValue: string) => boolean) | undefined;
|
|
15
|
+
formatOptionLabel?: (option: Option<unknown>, { context }: {
|
|
16
|
+
context: "menu" | "value";
|
|
17
|
+
}) => React.ReactNode;
|
|
18
|
+
isSearchable?: boolean;
|
|
19
|
+
label?: string;
|
|
20
|
+
onChange: (value: Curve) => void;
|
|
21
|
+
options: Option<Curve>[] | {
|
|
22
|
+
entries: Option<Curve>[];
|
|
23
|
+
}[];
|
|
24
|
+
preserveMenuWidth?: boolean;
|
|
25
|
+
selectProps?: {
|
|
26
|
+
actionButton?: React.ReactNode;
|
|
27
|
+
inputValue?: string;
|
|
28
|
+
placeholder?: React.ReactNode;
|
|
29
|
+
};
|
|
30
|
+
shrinkLabel?: boolean;
|
|
31
|
+
value: Curve;
|
|
32
|
+
} & {
|
|
11
33
|
inverted?: boolean;
|
|
12
34
|
Tooltip?: React.FC<TooltipProps>;
|
|
13
35
|
} & import("react").RefAttributes<SelectInstance<Option<Curve>, false, GroupBase<Option<Curve>>>>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
|
-
import { type GroupBase, type SelectInstance } from 'react-select';
|
|
2
|
+
import { type GroupBase, type SelectComponentsConfig, type SelectInstance } from 'react-select';
|
|
3
3
|
type PassedSelectProps = {
|
|
4
4
|
actionButton?: React.ReactNode;
|
|
5
5
|
inputValue?: string;
|
|
@@ -9,7 +9,7 @@ type Option<T> = {
|
|
|
9
9
|
label: React.ReactNode;
|
|
10
10
|
value: T;
|
|
11
11
|
};
|
|
12
|
-
type SelectProps<T> = {
|
|
12
|
+
type SelectProps<T> = SelectComponentsConfig<Option<T>, false, GroupBase<Option<T>>> & {
|
|
13
13
|
className?: string;
|
|
14
14
|
components?: object;
|
|
15
15
|
disabled?: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Status } from 'lib/midi/export';
|
|
2
2
|
import type { GroupBase, SelectInstance } from 'react-select';
|
|
3
3
|
import type { Option, SelectProps } from './Select';
|
|
4
|
-
type StatusPickerProps = SelectProps<Status> & {
|
|
4
|
+
type StatusPickerProps = Omit<SelectProps<Status>, 'options'> & {
|
|
5
5
|
statuses: Option<Status>[];
|
|
6
6
|
};
|
|
7
7
|
type StatusPickerRef = SelectInstance<Option<Status>, false, GroupBase<Option<Status>>>;
|
|
8
|
-
declare const StatusPicker: import("react").ForwardRefExoticComponent<SelectProps<Status> & {
|
|
8
|
+
declare const StatusPicker: import("react").ForwardRefExoticComponent<Omit<SelectProps<Status>, "options"> & {
|
|
9
9
|
statuses: Option<Status>[];
|
|
10
10
|
} & import("react").RefAttributes<SelectInstance<Option<Status>, false, GroupBase<Option<Status>>>>>;
|
|
11
11
|
export { StatusPicker };
|
package/lib/pickers/CCPicker.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { changeControllerOptions } from '../midi/ccValues'
|
|
|
4
4
|
import { Select } from './Select'
|
|
5
5
|
import type { Option, SelectProps } from './Select'
|
|
6
6
|
|
|
7
|
-
type CCPickerProps = SelectProps<number>
|
|
7
|
+
type CCPickerProps = Omit<SelectProps<number>, 'options'>
|
|
8
8
|
|
|
9
9
|
type CCPickerRef = SelectInstance<
|
|
10
10
|
Option<number>,
|
|
@@ -4,7 +4,7 @@ import { getStockNames, getUserMappingNames } from 'zds-mappings'
|
|
|
4
4
|
import { Select } from './Select'
|
|
5
5
|
import type { Option, SelectProps } from './Select'
|
|
6
6
|
|
|
7
|
-
type MappingPickerProps = SelectProps<string> & {
|
|
7
|
+
type MappingPickerProps = Omit<SelectProps<string>, 'options'> & {
|
|
8
8
|
allowClearing: boolean
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ const formattedListEntry = (label: string, idx: number) => ({
|
|
|
16
16
|
value: idx + 1,
|
|
17
17
|
})
|
|
18
18
|
|
|
19
|
-
type NotePickerProps = SelectProps<number> & {
|
|
19
|
+
type NotePickerProps = Omit<SelectProps<number>, 'options'> & {
|
|
20
20
|
channel: number
|
|
21
21
|
disabled?: boolean
|
|
22
22
|
isMelodicMode?: boolean
|
package/lib/pickers/Select.tsx
CHANGED
|
@@ -11,6 +11,7 @@ import ReactSelect, {
|
|
|
11
11
|
type IndicatorsContainerProps,
|
|
12
12
|
components as originalComponents,
|
|
13
13
|
type PlaceholderProps,
|
|
14
|
+
type SelectComponentsConfig,
|
|
14
15
|
type SelectInstance,
|
|
15
16
|
type SingleValue,
|
|
16
17
|
type StylesConfig,
|
|
@@ -86,7 +87,11 @@ const CustomValueContainer = <T,>({
|
|
|
86
87
|
</ValueContainer>
|
|
87
88
|
)
|
|
88
89
|
|
|
89
|
-
type SelectProps<T> =
|
|
90
|
+
type SelectProps<T> = SelectComponentsConfig<
|
|
91
|
+
Option<T>,
|
|
92
|
+
false,
|
|
93
|
+
GroupBase<Option<T>>
|
|
94
|
+
> & {
|
|
90
95
|
className?: string
|
|
91
96
|
components?: object
|
|
92
97
|
disabled?: boolean
|
|
@@ -4,7 +4,9 @@ import type { GroupBase, SelectInstance } from 'react-select'
|
|
|
4
4
|
import { Select } from './Select'
|
|
5
5
|
import type { Option, SelectProps } from './Select'
|
|
6
6
|
|
|
7
|
-
type StatusPickerProps = SelectProps<Status> & {
|
|
7
|
+
type StatusPickerProps = Omit<SelectProps<Status>, 'options'> & {
|
|
8
|
+
statuses: Option<Status>[]
|
|
9
|
+
}
|
|
8
10
|
|
|
9
11
|
type StatusPickerRef = SelectInstance<
|
|
10
12
|
Option<Status>,
|