@sillsdev/config-r 1.0.0-alpha.16 → 1.0.0-alpha.18

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 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.
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. For now, the only documentation is the code and the storybook stories.
8
8
 
9
9
  ## Screenshots
10
10
 
@@ -12,6 +12,10 @@ A React library for a settings UI similar to that of Chrome.
12
12
 
13
13
  ![image](https://user-images.githubusercontent.com/8448/147994050-d0087afc-db1f-4a88-9744-f93002535239.png)
14
14
 
15
+ ## Demo
16
+
17
+ You can play around with [the disorganized stories](https://sillsdev.github.io/config-r).
18
+
15
19
  ## Running
16
20
 
17
21
  ```
@@ -1,10 +1,10 @@
1
1
  import { ThemeOptions } from '@mui/material';
2
- import { ConfigrGroup } from './ContentPane';
2
+ import { ConfigrPage } from './ContentPane';
3
3
  import * as React from 'react';
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
- selectedAreaIndex?: number;
15
+ initiallySelectedTopLevelPageIndex?: number;
16
16
  }>>;
@@ -4,16 +4,11 @@ import * as React from 'react';
4
4
  type valueGetter = () => Object;
5
5
  export declare const ContentPane: React.FunctionComponent<React.PropsWithChildren<{
6
6
  initialValues: object;
7
- currentAreaIndex?: number;
8
- children: React.ReactElement<typeof InternalGroup> | React.ReactElement<typeof InternalGroup>[];
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
- declare const InternalGroup: 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;
@@ -77,22 +72,24 @@ interface ISelectProps extends IConfigrProps<string> {
77
72
  getErrorMessage?: (data: any) => string | undefined;
78
73
  }
79
74
  export declare const ConfigrSelect: React.FunctionComponent<React.PropsWithChildren<ISelectProps>>;
75
+ export declare const ConfigrStatic: React.FunctionComponent<React.PropsWithChildren<{}>>;
80
76
  export declare const ConfigrGroup: React.FunctionComponent<React.PropsWithChildren<{
81
77
  label?: string;
82
- pageKey?: string;
83
78
  searchTerms?: string;
84
79
  description?: string | React.ReactNode;
85
80
  getErrorMessage?: (data: any) => string | undefined;
86
81
  inFocussedPage?: boolean;
87
82
  }>>;
83
+ export type PageChild = React.ReactElement<typeof ConfigrGroup> | false | undefined | null;
88
84
  export declare const ConfigrPage: React.FunctionComponent<React.PropsWithChildren<{
89
85
  label: string;
90
86
  labelCss?: SerializedStyles;
91
- pageKey?: string;
87
+ pageKey: string;
92
88
  searchTerms?: string;
93
89
  topLevel?: boolean;
94
90
  getErrorMessage?: (data: any) => string | undefined;
95
91
  inFocussedPage?: boolean;
92
+ children: PageChild | PageChild[];
96
93
  }>>;
97
94
  export declare const ConfigrForEach: React.FunctionComponent<React.PropsWithChildren<{
98
95
  path: string;