@sillsdev/config-r 1.0.0-alpha.15 → 1.0.0-alpha.17

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/README.md CHANGED
@@ -4,7 +4,7 @@ A React library for a settings UI similar to that of Chrome.
4
4
 
5
5
  [![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
6
6
 
7
- > :warning: We ship this as part of our [product](https://github.com/BloomBooks/BloomDesktop), but some features (search and nested screens) have not made it to production yet. In addition, we may make visual changes over time. Finally, the only documentation is the code and the storybook stories.
7
+ > :warning: We ship this as part of our [product](https://github.com/BloomBooks/BloomDesktop), but search has not made it to production yet. In addition, we may make visual changes over time. Finally, the only documentation is the code and the storybook stories.
8
8
 
9
9
  ## Screenshots
10
10
 
@@ -1,10 +1,10 @@
1
1
  import { ThemeOptions } from '@mui/material';
2
2
  import * as React from 'react';
3
- import { ConfigrGroup } from './ContentPane';
3
+ import { ConfigrPage } from './ContentPane';
4
4
  export declare const ConfigrPane: React.FunctionComponent<React.PropsWithChildren<{
5
5
  label: string;
6
6
  initialValues: object;
7
- children: React.ReactElement<typeof ConfigrGroup> | React.ReactElement<typeof ConfigrGroup>[];
7
+ children: React.ReactElement<typeof ConfigrPage> | React.ReactElement<typeof ConfigrPage>[];
8
8
  onChange?: (currentValues: any) => void;
9
9
  showAppBar?: boolean;
10
10
  showSearch?: boolean;
@@ -12,5 +12,5 @@ export declare const ConfigrPane: React.FunctionComponent<React.PropsWithChildre
12
12
  themeOverrides?: ThemeOptions;
13
13
  showJson?: boolean;
14
14
  className?: string;
15
- selectedGroupIndex?: number;
15
+ initiallySelectedTopLevelPageIndex?: number;
16
16
  }>>;
@@ -4,16 +4,11 @@ import { ReactNode } from 'react';
4
4
  type valueGetter = () => Object;
5
5
  export declare const ContentPane: React.FunctionComponent<React.PropsWithChildren<{
6
6
  initialValues: object;
7
- currentGroupIndex?: number;
8
- children: React.ReactElement<typeof ConfigrGroup> | React.ReactElement<typeof ConfigrGroup>[];
7
+ currentTopLevelPageIndex?: number;
8
+ children: React.ReactElement<typeof ConfigrPage> | React.ReactElement<typeof ConfigrPage>[];
9
9
  setValueGetter?: (vg: valueGetter) => void;
10
10
  onChange?: (currentValues: any) => void;
11
11
  }>>;
12
- export declare const ConfigrGroup: React.FunctionComponent<React.PropsWithChildren<{
13
- label: string;
14
- description?: string | React.ReactNode;
15
- level?: undefined | 1 | 2;
16
- }>>;
17
12
  type BooleanEditorComponent = React.FunctionComponent<{
18
13
  value: boolean;
19
14
  disabled?: boolean;
@@ -26,6 +21,7 @@ interface IConfigrProps<T> {
26
21
  disabled?: boolean;
27
22
  overrideValue?: T;
28
23
  overrideDescription?: string;
24
+ pageKey?: string;
29
25
  }
30
26
  export declare const ConfigrInput: React.FunctionComponent<React.PropsWithChildren<IConfigrProps<string | number> & {
31
27
  className?: string;
@@ -76,21 +72,28 @@ interface ISelectProps extends IConfigrProps<string> {
76
72
  getErrorMessage?: (data: any) => string | undefined;
77
73
  }
78
74
  export declare const ConfigrSelect: React.FunctionComponent<React.PropsWithChildren<ISelectProps>>;
79
- export declare const ConfigrSubgroup: React.FunctionComponent<React.PropsWithChildren<{
80
- label: string;
81
- path: string;
75
+ export declare const ConfigrGroup: React.FunctionComponent<React.PropsWithChildren<{
76
+ label?: string;
77
+ searchTerms?: string;
82
78
  description?: string | React.ReactNode;
83
79
  getErrorMessage?: (data: any) => string | undefined;
80
+ inFocussedPage?: boolean;
84
81
  }>>;
85
- export declare const ConfigrSubPage: React.FunctionComponent<React.PropsWithChildren<{
82
+ export type PageChild = React.ReactElement<typeof ConfigrGroup> | false | undefined | null;
83
+ export declare const ConfigrPage: React.FunctionComponent<React.PropsWithChildren<{
86
84
  label: string;
87
85
  labelCss?: SerializedStyles;
88
- path: string;
86
+ pageKey?: string;
87
+ searchTerms?: string;
88
+ topLevel?: boolean;
89
89
  getErrorMessage?: (data: any) => string | undefined;
90
+ inFocussedPage?: boolean;
91
+ children: PageChild | PageChild[];
90
92
  }>>;
91
93
  export declare const ConfigrForEach: React.FunctionComponent<React.PropsWithChildren<{
92
94
  path: string;
93
95
  searchTerms: string;
96
+ inFocussedPage?: boolean;
94
97
  render: (pathPrefix: string, index: number) => React.ReactNode;
95
98
  getErrorMessage?: (data: any) => string | undefined;
96
99
  }>>;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  export declare const FilterForSearchText: React.FunctionComponent<React.PropsWithChildren<{
3
- label: string;
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
2
  export declare const HighlightSearchTerms: React.FunctionComponent<React.PropsWithChildren<{
3
3
  searchString: string | null;
4
- focussedSubPagePath: any;
4
+ focussedPageKey: any;
5
5
  }>>;