@sillsdev/config-r 1.0.0-alpha.1 → 1.0.0-alpha.2

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.
@@ -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,9 @@
1
+ import * as React from 'react';
2
+ export declare const ConfigrColorPicker: React.FunctionComponent<{
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ }>;
6
+ export declare const SwatchButton: React.FunctionComponent<{
7
+ color: string;
8
+ onClick: () => void;
9
+ }>;
@@ -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
  setValueOnRender?: (currentValues: any) => void;
9
+ showAppBar?: boolean;
8
10
  showSearch?: boolean;
9
11
  showAllGroups?: boolean;
10
- themeOverrides?: any;
11
- }>;
12
+ themeOverrides?: ThemeOptions;
13
+ showJson?: boolean;
14
+ className?: string;
15
+ }>>;
@@ -2,84 +2,64 @@ 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
10
  setValueOnRender?: (currentValues: any) => void;
11
- }>;
12
- export declare const VisibleGroups: React.FunctionComponent<{
13
- currentGroup?: number;
14
- focussedSubPagePath?: string;
15
- children: React.ReactElement<typeof ConfigrGroup> | React.ReactElement<typeof ConfigrGroup>[];
16
- }>;
17
- export declare const ConfigrGroup: React.FunctionComponent<{
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;
16
+ }>>;
17
+ type BooleanEditorComponent = React.FunctionComponent<{
18
+ value: boolean;
19
+ onChange: (value: boolean) => void;
21
20
  }>;
22
- export declare const FilterAndJoinWithDividers: React.FunctionComponent<{}>;
23
- export declare const ConfigrRowOneColumn: React.FunctionComponent<{
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;
34
- disabled?: boolean;
35
- height?: string;
36
- indented?: boolean;
37
- onClick?: () => void;
38
- }>;
39
- export declare const ConfigrInput: React.FunctionComponent<{
21
+ export declare const ConfigrInput: React.FunctionComponent<React.PropsWithChildren<{
40
22
  path: string;
41
23
  label: string;
42
24
  className?: string;
43
- suffix?: string;
25
+ type?: 'text' | 'number' | 'email';
26
+ units?: string;
44
27
  getErrorMessage?: (data: any) => string | undefined;
45
- }>;
46
- export declare const ConfigrCustomStringInput: React.FunctionComponent<{
28
+ }>>;
29
+ export declare const ConfigrCustomStringInput: React.FunctionComponent<React.PropsWithChildren<{
47
30
  path: string;
48
31
  label: string;
49
- control: React.ComponentType<{
32
+ control: React.FunctionComponent<{
50
33
  value: string;
51
34
  onChange: (value: string) => void;
52
35
  }>;
53
36
  getErrorMessage?: (data: any) => string | undefined;
54
- }>;
55
- export declare const ConfigrCustomBooleanInput: React.FunctionComponent<{
37
+ }>>;
38
+ export declare const ConfigrCustomBooleanInput: React.FunctionComponent<React.PropsWithChildren<{
56
39
  path: string;
57
40
  label: string;
58
- control: React.ComponentType<{
59
- value: boolean;
60
- onChange: (value: boolean) => void;
61
- }>;
41
+ control: BooleanEditorComponent;
62
42
  getErrorMessage?: (data: any) => string | undefined;
63
- }>;
64
- export declare const ConfigrCustomNumberInput: React.FunctionComponent<{
43
+ }>>;
44
+ export declare const ConfigrCustomNumberInput: React.FunctionComponent<React.PropsWithChildren<{
65
45
  path: string;
66
46
  label: string;
67
- control: React.ComponentType<{
47
+ control: React.FunctionComponent<React.PropsWithChildren<{
68
48
  value: number;
69
49
  onChange: (value: number) => void;
70
- }>;
50
+ }>>;
71
51
  getErrorMessage?: (data: any) => string | undefined;
72
- }>;
73
- export declare const ConfigrCustomObjectInput: React.FunctionComponent<{
52
+ }>>;
53
+ export declare const ConfigrCustomObjectInput: React.FunctionComponent<React.PropsWithChildren<{
74
54
  path: string;
75
55
  label: string;
76
- control: React.ComponentType<{
56
+ control: React.FunctionComponent<React.PropsWithChildren<{
77
57
  value: object;
78
58
  onChange: (value: object) => void;
79
- }>;
59
+ }>>;
80
60
  getErrorMessage?: (data: any) => string | undefined;
81
- }>;
82
- export declare const ConfigrSelect: React.FunctionComponent<{
61
+ }>>;
62
+ export declare const ConfigrSelect: React.FunctionComponent<React.PropsWithChildren<{
83
63
  path: string;
84
64
  label: string;
85
65
  indented?: boolean;
@@ -91,67 +71,68 @@ export declare const ConfigrSelect: React.FunctionComponent<{
91
71
  enableWhen?: string | ((currentValues: object) => boolean);
92
72
  description?: string;
93
73
  getErrorMessage?: (data: any) => string | undefined;
94
- }>;
95
- export declare const ConfigrSubgroup: React.FunctionComponent<{
74
+ }>>;
75
+ export declare const ConfigrSubgroup: React.FunctionComponent<React.PropsWithChildren<{
96
76
  label: string;
97
77
  path: string;
78
+ description?: string | React.ReactNode;
98
79
  getErrorMessage?: (data: any) => string | undefined;
99
- }>;
100
- export declare const ConfigrSubPage: React.FunctionComponent<{
80
+ }>>;
81
+ export declare const ConfigrSubPage: React.FunctionComponent<React.PropsWithChildren<{
101
82
  label: string;
102
83
  labelCss?: SerializedStyles;
103
84
  path: string;
104
85
  getErrorMessage?: (data: any) => string | undefined;
105
- }>;
106
- export declare const ConfigrForEach: React.FunctionComponent<{
86
+ }>>;
87
+ export declare const ConfigrForEach: React.FunctionComponent<React.PropsWithChildren<{
107
88
  path: string;
108
89
  searchTerms: string;
109
90
  render: (pathPrefix: string, index: number) => React.ReactNode;
110
91
  getErrorMessage?: (data: any) => string | undefined;
111
- }>;
112
- export declare const ConfigrBoolean: React.FunctionComponent<{
92
+ }>>;
93
+ export declare const ConfigrBoolean: React.FunctionComponent<React.PropsWithChildren<{
113
94
  path: string;
114
95
  label: string;
115
96
  description?: string;
116
97
  immediateEffect?: boolean;
117
- }>;
118
- export declare const ConfigrRadioGroup: React.FunctionComponent<{
98
+ }>>;
99
+ export declare const ConfigrRadioGroup: React.FunctionComponent<React.PropsWithChildren<{
119
100
  path: string;
120
101
  label: string;
121
102
  row?: boolean;
122
- }>;
123
- export declare const ConfigrRadioGroupRaw: React.FunctionComponent<{
103
+ }>>;
104
+ export declare const ConfigrRadioGroupRaw: React.FunctionComponent<React.PropsWithChildren<{
124
105
  path: string;
125
106
  label: string;
126
107
  row?: boolean;
127
- }>;
128
- export declare const ConfigrRadio: React.FunctionComponent<{
108
+ }>>;
109
+ export declare const ConfigrRadio: React.FunctionComponent<React.PropsWithChildren<{
129
110
  value: any;
130
111
  label?: string;
131
- }>;
132
- export declare const ConfigrToggleGroup: React.FunctionComponent<{
112
+ }>>;
113
+ export declare const ConfigrToggleGroup: React.FunctionComponent<React.PropsWithChildren<{
133
114
  path: string;
134
115
  label: string;
135
116
  row?: boolean;
136
117
  height?: string;
137
- }>;
138
- export declare const ConfigrToggleGroupRaw: React.FunctionComponent<{
118
+ }>>;
119
+ export declare const ConfigrToggleGroupRaw: React.FunctionComponent<React.PropsWithChildren<{
139
120
  path: string;
140
121
  label: string;
141
122
  row?: boolean;
142
123
  height?: string;
143
- }>;
124
+ }>>;
144
125
  export declare function ConfigrMakeToggle(value: any, content: ReactNode): import("@emotion/react/jsx-runtime").JSX.Element;
145
- export declare const ConfigrChooserButton: React.FunctionComponent<{
126
+ export declare const ConfigrChooserButton: React.FunctionComponent<React.PropsWithChildren<{
146
127
  path: string;
147
128
  label: string;
148
129
  description?: string;
149
130
  buttonLabel: string;
150
131
  chooseAction: (currentValue: string) => string;
151
132
  disabled?: boolean;
152
- }>;
153
- export declare const ConfigrConditional: React.FunctionComponent<{
133
+ }>>;
134
+ export declare const ConfigrConditional: React.FunctionComponent<React.PropsWithChildren<{
154
135
  enableWhen?: (currentValues: object) => boolean;
155
136
  visibleWhen?: (currentValues: object) => boolean;
156
- }>;
137
+ }>>;
157
138
  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<{}>>;