@sillsdev/config-r 1.0.0-alpha.1 → 1.0.0-alpha.11
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/ConfigrAppBar.d.ts +2 -2
- package/dist/ConfigrColorPicker.d.ts +11 -0
- package/dist/ConfigrPane.d.ts +8 -4
- package/dist/ContentPane.d.ts +65 -100
- package/dist/FilterForSearch.d.ts +2 -2
- package/dist/HighlightSearchTerms.d.ts +2 -2
- package/dist/SearchContextProvider.d.ts +1 -1
- package/dist/configr.es.js +11967 -19967
- package/dist/configr.umd.js +165 -250
- package/dist/index.d.ts +2 -1
- package/package.json +23 -21
package/dist/ConfigrAppBar.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const ConfigrAppBar: React.FunctionComponent<{
|
|
2
|
+
export declare const ConfigrAppBar: React.FunctionComponent<React.PropsWithChildren<{
|
|
3
3
|
label: string;
|
|
4
4
|
showSearch?: boolean;
|
|
5
5
|
searchValue: string | null;
|
|
6
6
|
setSearchString: (s: string) => void;
|
|
7
|
-
}
|
|
7
|
+
}>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const ConfigrColorPicker: React.FunctionComponent<{
|
|
3
|
+
value: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const SwatchButton: React.FunctionComponent<{
|
|
8
|
+
color: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
}>;
|
package/dist/ConfigrPane.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { ThemeOptions } from '@mui/material';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { ConfigrGroup } from './ContentPane';
|
|
3
|
-
export declare const ConfigrPane: React.FunctionComponent<{
|
|
4
|
+
export declare const ConfigrPane: React.FunctionComponent<React.PropsWithChildren<{
|
|
4
5
|
label: string;
|
|
5
6
|
initialValues: object;
|
|
6
7
|
children: React.ReactElement<typeof ConfigrGroup> | React.ReactElement<typeof ConfigrGroup>[];
|
|
7
|
-
|
|
8
|
+
onChange?: (currentValues: any) => void;
|
|
9
|
+
showAppBar?: boolean;
|
|
8
10
|
showSearch?: boolean;
|
|
9
11
|
showAllGroups?: boolean;
|
|
10
|
-
themeOverrides?:
|
|
11
|
-
|
|
12
|
+
themeOverrides?: ThemeOptions;
|
|
13
|
+
showJson?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
}>>;
|
package/dist/ContentPane.d.ts
CHANGED
|
@@ -2,86 +2,70 @@ import { SerializedStyles } from '@emotion/react';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
type valueGetter = () => Object;
|
|
5
|
-
export declare const ContentPane: React.FunctionComponent<{
|
|
5
|
+
export declare const ContentPane: React.FunctionComponent<React.PropsWithChildren<{
|
|
6
6
|
initialValues: object;
|
|
7
7
|
currentGroupIndex?: number;
|
|
8
8
|
children: React.ReactElement<typeof ConfigrGroup> | React.ReactElement<typeof ConfigrGroup>[];
|
|
9
9
|
setValueGetter?: (vg: valueGetter) => void;
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export declare const
|
|
13
|
-
currentGroup?: number;
|
|
14
|
-
focussedSubPagePath?: string;
|
|
15
|
-
children: React.ReactElement<typeof ConfigrGroup> | React.ReactElement<typeof ConfigrGroup>[];
|
|
16
|
-
}>;
|
|
17
|
-
export declare const ConfigrGroup: React.FunctionComponent<{
|
|
10
|
+
onChange?: (currentValues: any) => void;
|
|
11
|
+
}>>;
|
|
12
|
+
export declare const ConfigrGroup: React.FunctionComponent<React.PropsWithChildren<{
|
|
18
13
|
label: string;
|
|
19
14
|
description?: string | React.ReactNode;
|
|
20
15
|
level?: undefined | 1 | 2;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
label: string;
|
|
25
|
-
description?: string | React.ReactNode;
|
|
26
|
-
control: React.ReactNode;
|
|
27
|
-
}>;
|
|
28
|
-
export declare const ConfigrRowTwoColumns: React.FunctionComponent<{
|
|
29
|
-
label: string;
|
|
30
|
-
labelCss?: SerializedStyles;
|
|
31
|
-
path: string;
|
|
32
|
-
description?: string;
|
|
33
|
-
control: React.ReactNode;
|
|
16
|
+
}>>;
|
|
17
|
+
type BooleanEditorComponent = React.FunctionComponent<{
|
|
18
|
+
value: boolean;
|
|
34
19
|
disabled?: boolean;
|
|
35
|
-
|
|
36
|
-
indented?: boolean;
|
|
37
|
-
onClick?: () => void;
|
|
20
|
+
onChange: (value: boolean) => void;
|
|
38
21
|
}>;
|
|
39
|
-
|
|
22
|
+
interface IConfigrProps<T> {
|
|
40
23
|
path: string;
|
|
41
24
|
label: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
overrideValue?: T;
|
|
28
|
+
overrideDescription?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const ConfigrInput: React.FunctionComponent<React.PropsWithChildren<IConfigrProps<string | number> & {
|
|
42
31
|
className?: string;
|
|
43
|
-
|
|
32
|
+
type?: 'text' | 'number' | 'email';
|
|
33
|
+
units?: string;
|
|
44
34
|
getErrorMessage?: (data: any) => string | undefined;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
label: string;
|
|
49
|
-
control: React.ComponentType<{
|
|
35
|
+
}>>;
|
|
36
|
+
interface ICustomStringInputProps extends IConfigrProps<string> {
|
|
37
|
+
control: React.FunctionComponent<{
|
|
50
38
|
value: string;
|
|
39
|
+
disabled?: boolean;
|
|
51
40
|
onChange: (value: string) => void;
|
|
52
41
|
}>;
|
|
53
42
|
getErrorMessage?: (data: any) => string | undefined;
|
|
54
|
-
}
|
|
55
|
-
export declare const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
control: React.ComponentType<{
|
|
59
|
-
value: boolean;
|
|
60
|
-
onChange: (value: boolean) => void;
|
|
61
|
-
}>;
|
|
43
|
+
}
|
|
44
|
+
export declare const ConfigrCustomStringInput: React.FunctionComponent<React.PropsWithChildren<ICustomStringInputProps>>;
|
|
45
|
+
interface ICustomBooleanInputProps extends IConfigrProps<boolean> {
|
|
46
|
+
control: BooleanEditorComponent;
|
|
62
47
|
getErrorMessage?: (data: any) => string | undefined;
|
|
63
|
-
}
|
|
64
|
-
export declare const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
control: React.ComponentType<{
|
|
48
|
+
}
|
|
49
|
+
export declare const ConfigrCustomBooleanInput: React.FunctionComponent<React.PropsWithChildren<ICustomBooleanInputProps>>;
|
|
50
|
+
interface ICustomNumberInputProps extends IConfigrProps<number> {
|
|
51
|
+
control: React.FunctionComponent<React.PropsWithChildren<{
|
|
68
52
|
value: number;
|
|
53
|
+
disabled?: boolean;
|
|
69
54
|
onChange: (value: number) => void;
|
|
70
|
-
}
|
|
55
|
+
}>>;
|
|
71
56
|
getErrorMessage?: (data: any) => string | undefined;
|
|
72
|
-
}
|
|
73
|
-
export declare const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
onChange: (value:
|
|
79
|
-
}
|
|
57
|
+
}
|
|
58
|
+
export declare const ConfigrCustomNumberInput: React.FunctionComponent<React.PropsWithChildren<ICustomNumberInputProps>>;
|
|
59
|
+
interface ICustomObjectInputProps<T> extends IConfigrProps<unknown> {
|
|
60
|
+
control: React.FunctionComponent<React.PropsWithChildren<{
|
|
61
|
+
value: T;
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
onChange: (value: T) => void;
|
|
64
|
+
}>>;
|
|
80
65
|
getErrorMessage?: (data: any) => string | undefined;
|
|
81
|
-
}
|
|
82
|
-
export declare
|
|
83
|
-
|
|
84
|
-
label: string;
|
|
66
|
+
}
|
|
67
|
+
export declare function ConfigrCustomObjectInput<T>(props: React.PropsWithChildren<ICustomObjectInputProps<T>>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
68
|
+
interface ISelectProps extends IConfigrProps<string> {
|
|
85
69
|
indented?: boolean;
|
|
86
70
|
options: Array<{
|
|
87
71
|
value: string;
|
|
@@ -89,69 +73,50 @@ export declare const ConfigrSelect: React.FunctionComponent<{
|
|
|
89
73
|
description?: string;
|
|
90
74
|
} | number>;
|
|
91
75
|
enableWhen?: string | ((currentValues: object) => boolean);
|
|
92
|
-
description?: string;
|
|
93
76
|
getErrorMessage?: (data: any) => string | undefined;
|
|
94
|
-
}
|
|
95
|
-
export declare const
|
|
77
|
+
}
|
|
78
|
+
export declare const ConfigrSelect: React.FunctionComponent<React.PropsWithChildren<ISelectProps>>;
|
|
79
|
+
export declare const ConfigrSubgroup: React.FunctionComponent<React.PropsWithChildren<{
|
|
96
80
|
label: string;
|
|
97
81
|
path: string;
|
|
82
|
+
description?: string | React.ReactNode;
|
|
98
83
|
getErrorMessage?: (data: any) => string | undefined;
|
|
99
|
-
}
|
|
100
|
-
export declare const ConfigrSubPage: React.FunctionComponent<{
|
|
84
|
+
}>>;
|
|
85
|
+
export declare const ConfigrSubPage: React.FunctionComponent<React.PropsWithChildren<{
|
|
101
86
|
label: string;
|
|
102
87
|
labelCss?: SerializedStyles;
|
|
103
88
|
path: string;
|
|
104
89
|
getErrorMessage?: (data: any) => string | undefined;
|
|
105
|
-
}
|
|
106
|
-
export declare const ConfigrForEach: React.FunctionComponent<{
|
|
90
|
+
}>>;
|
|
91
|
+
export declare const ConfigrForEach: React.FunctionComponent<React.PropsWithChildren<{
|
|
107
92
|
path: string;
|
|
108
93
|
searchTerms: string;
|
|
109
94
|
render: (pathPrefix: string, index: number) => React.ReactNode;
|
|
110
95
|
getErrorMessage?: (data: any) => string | undefined;
|
|
111
|
-
}
|
|
112
|
-
export declare const ConfigrBoolean: React.FunctionComponent<{
|
|
113
|
-
path: string;
|
|
114
|
-
label: string;
|
|
115
|
-
description?: string;
|
|
96
|
+
}>>;
|
|
97
|
+
export declare const ConfigrBoolean: React.FunctionComponent<React.PropsWithChildren<IConfigrProps<boolean> & {
|
|
116
98
|
immediateEffect?: boolean;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
path: string;
|
|
120
|
-
label: string;
|
|
121
|
-
row?: boolean;
|
|
122
|
-
}>;
|
|
123
|
-
export declare const ConfigrRadioGroupRaw: React.FunctionComponent<{
|
|
124
|
-
path: string;
|
|
125
|
-
label: string;
|
|
99
|
+
}>>;
|
|
100
|
+
interface IRadioGroupProps extends IConfigrProps<string> {
|
|
126
101
|
row?: boolean;
|
|
127
|
-
}
|
|
128
|
-
export declare const
|
|
102
|
+
}
|
|
103
|
+
export declare const ConfigrRadioGroup: React.FunctionComponent<React.PropsWithChildren<IRadioGroupProps>>;
|
|
104
|
+
export declare const ConfigrRadio: React.FunctionComponent<React.PropsWithChildren<{
|
|
129
105
|
value: any;
|
|
130
106
|
label?: string;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
path: string;
|
|
134
|
-
label: string;
|
|
135
|
-
row?: boolean;
|
|
136
|
-
height?: string;
|
|
137
|
-
}>;
|
|
138
|
-
export declare const ConfigrToggleGroupRaw: React.FunctionComponent<{
|
|
139
|
-
path: string;
|
|
140
|
-
label: string;
|
|
107
|
+
}>>;
|
|
108
|
+
interface IToggleGroupProps extends IConfigrProps<string> {
|
|
141
109
|
row?: boolean;
|
|
142
110
|
height?: string;
|
|
143
|
-
}
|
|
111
|
+
}
|
|
112
|
+
export declare const ConfigrToggleGroup: React.FunctionComponent<React.PropsWithChildren<IToggleGroupProps>>;
|
|
144
113
|
export declare function ConfigrMakeToggle(value: any, content: ReactNode): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
145
|
-
export declare const ConfigrChooserButton: React.FunctionComponent<{
|
|
146
|
-
path: string;
|
|
147
|
-
label: string;
|
|
148
|
-
description?: string;
|
|
114
|
+
export declare const ConfigrChooserButton: React.FunctionComponent<React.PropsWithChildren<IConfigrProps<string> & {
|
|
149
115
|
buttonLabel: string;
|
|
150
116
|
chooseAction: (currentValue: string) => string;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
export declare const ConfigrConditional: React.FunctionComponent<{
|
|
117
|
+
}>>;
|
|
118
|
+
export declare const ConfigrConditional: React.FunctionComponent<React.PropsWithChildren<{
|
|
154
119
|
enableWhen?: (currentValues: object) => boolean;
|
|
155
120
|
visibleWhen?: (currentValues: object) => boolean;
|
|
156
|
-
}
|
|
121
|
+
}>>;
|
|
157
122
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const FilterForSearchText: React.FunctionComponent<{
|
|
2
|
+
export declare const FilterForSearchText: React.FunctionComponent<React.PropsWithChildren<{
|
|
3
3
|
label: string;
|
|
4
4
|
description?: string | React.ReactNode;
|
|
5
5
|
kids: React.ReactNode;
|
|
6
|
-
}
|
|
6
|
+
}>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const HighlightSearchTerms: React.FunctionComponent<{
|
|
2
|
+
export declare const HighlightSearchTerms: React.FunctionComponent<React.PropsWithChildren<{
|
|
3
3
|
searchString: string | null;
|
|
4
4
|
focussedSubPagePath: any;
|
|
5
|
-
}
|
|
5
|
+
}>>;
|
|
@@ -4,4 +4,4 @@ export declare const SearchContext: React.Context<{
|
|
|
4
4
|
searchRegEx: RegExp | null;
|
|
5
5
|
setSearchString: (searchString: string | null) => void;
|
|
6
6
|
}>;
|
|
7
|
-
export declare const SearchContextProvider: React.FunctionComponent<{}
|
|
7
|
+
export declare const SearchContextProvider: React.FunctionComponent<React.PropsWithChildren<{}>>;
|