grep-components 2.10.0-GREPF-2677.1 → 2.10.0-GREPF-2713.1
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/components/AppBar/stories/AppBarStory.stories.d.ts +2 -6
- package/dist/components/AppBarNavList/stories/AppBarNavList.stories.d.ts +2 -4
- package/dist/components/AppBarProfile/stories/AppBarProfile.stories.d.ts +2 -4
- package/dist/components/CircularLoading/stories/CircularLoading.stories.d.ts +4 -8
- package/dist/components/ConfirmationDialog/stories/dialog.stories.d.ts +4 -8
- package/dist/components/ContainedLinkList/stories/ContainedLinkList.stories.d.ts +2 -4
- package/dist/components/DropdownMenu/stories/DropDownMenu.stories.d.ts +3 -5
- package/dist/components/Footer/stories/Footer.stories.d.ts +4 -8
- package/dist/components/GDPR/stories/GDPR.stories.d.ts +2 -4
- package/dist/components/GrepCrumbs/stories/GrepCrumbs.stories.d.ts +4 -8
- package/dist/components/GrepDialog/stories/dialog.stories.d.ts +5 -16
- package/dist/components/GrepEditor/stories/GrepEditor.stories.d.ts +20 -40
- package/dist/components/GrepInput/stories/GrepInput.stories.d.ts +2 -4
- package/dist/components/GrepSelect/stories/GrepSelect.stories.d.ts +1 -1
- package/dist/components/GrepTable/stories/GrepTable.stories.d.ts +20 -40
- package/dist/components/GrepTableCard/stories/GrepTableCard.stories.d.ts +2 -4
- package/dist/components/GreyCover/stories/GreyCover.stories.d.ts +2 -4
- package/dist/components/InfoContainer/stories/infoContainer.stories.d.ts +4 -8
- package/dist/components/LinkList/stories/LinkList.stories.d.ts +2 -4
- package/dist/components/LoadingOverlay/stories/LoadingOverlay.stories.d.ts +5 -4
- package/dist/components/MainLayout/stories/MainLayout.stories.d.ts +2 -4
- package/dist/components/NavGuard/stories/NavGuard.stories.d.ts +6 -6
- package/dist/components/ProfileInfo/stories/ProfileInfo.stories.d.ts +2 -4
- package/dist/components/SearchBar/stories/SearchBar.stories.d.ts +2 -4
- package/dist/components/Sidebar/stories/Sidebar.stories.d.ts +4 -8
- package/dist/components/SortableTable/stories/SortableTable.stories.d.ts +2 -4
- package/dist/components/ToC/components/nav-tree-node.d.ts +9 -0
- package/dist/components/ToC/stories/ToC.stories.d.ts +2 -4
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/setupTests.d.ts +0 -1
- package/dist/stories/index.stories.d.ts +2 -4
- package/package.json +17 -24
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { IAuthorizedPage } from '../types';
|
|
3
2
|
export declare const v0colors: {
|
|
4
3
|
primary: string;
|
|
5
4
|
secondary: string;
|
|
@@ -15,15 +14,12 @@ export declare const v0colors: {
|
|
|
15
14
|
white: string;
|
|
16
15
|
lightGrey: string;
|
|
17
16
|
};
|
|
18
|
-
export declare const navbarPages: IAuthorizedPage[];
|
|
19
17
|
declare const _default: {
|
|
20
18
|
title: string;
|
|
21
19
|
excludeStories: string[];
|
|
22
20
|
};
|
|
23
21
|
export default _default;
|
|
24
22
|
export declare const WithContent: {
|
|
25
|
-
()
|
|
26
|
-
|
|
27
|
-
name: string;
|
|
28
|
-
};
|
|
23
|
+
render: () => React.JSX.Element;
|
|
24
|
+
name: string;
|
|
29
25
|
};
|
|
@@ -4,14 +4,10 @@ declare const _default: {
|
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Standard: {
|
|
7
|
-
()
|
|
8
|
-
|
|
9
|
-
name: string;
|
|
10
|
-
};
|
|
7
|
+
render: () => React.JSX.Element;
|
|
8
|
+
name: string;
|
|
11
9
|
};
|
|
12
10
|
export declare const CustomHeight: {
|
|
13
|
-
()
|
|
14
|
-
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
11
|
+
render: () => React.JSX.Element;
|
|
12
|
+
name: string;
|
|
17
13
|
};
|
|
@@ -5,14 +5,10 @@ declare const _default: {
|
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|
|
7
7
|
export declare const Standard: {
|
|
8
|
-
()
|
|
9
|
-
|
|
10
|
-
name: string;
|
|
11
|
-
};
|
|
8
|
+
render: () => React.JSX.Element;
|
|
9
|
+
name: string;
|
|
12
10
|
};
|
|
13
11
|
export declare const Warning: {
|
|
14
|
-
()
|
|
15
|
-
|
|
16
|
-
name: string;
|
|
17
|
-
};
|
|
12
|
+
render: () => React.JSX.Element;
|
|
13
|
+
name: string;
|
|
18
14
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { DropdownMenuItem } from '../..';
|
|
3
3
|
interface TestMenuItem {
|
|
4
4
|
label: string;
|
|
@@ -12,8 +12,6 @@ declare const _default: {
|
|
|
12
12
|
};
|
|
13
13
|
export default _default;
|
|
14
14
|
export declare const Standard: {
|
|
15
|
-
()
|
|
16
|
-
|
|
17
|
-
name: string;
|
|
18
|
-
};
|
|
15
|
+
render: () => React.JSX.Element;
|
|
16
|
+
name: string;
|
|
19
17
|
};
|
|
@@ -7,14 +7,10 @@ declare const _default: {
|
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
export declare const FooterWithContent: {
|
|
10
|
-
()
|
|
11
|
-
|
|
12
|
-
name: string;
|
|
13
|
-
};
|
|
10
|
+
render: () => React.JSX.Element;
|
|
11
|
+
name: string;
|
|
14
12
|
};
|
|
15
13
|
export declare const FooterWithContentLongerThan100: {
|
|
16
|
-
()
|
|
17
|
-
|
|
18
|
-
name: string;
|
|
19
|
-
};
|
|
14
|
+
render: () => React.JSX.Element;
|
|
15
|
+
name: string;
|
|
20
16
|
};
|
|
@@ -7,14 +7,10 @@ declare const _default: {
|
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
export declare const Standard: {
|
|
10
|
-
()
|
|
11
|
-
|
|
12
|
-
name: string;
|
|
13
|
-
};
|
|
10
|
+
render: () => React.JSX.Element;
|
|
11
|
+
name: string;
|
|
14
12
|
};
|
|
15
13
|
export declare const OverflowAsTooltip: {
|
|
16
|
-
()
|
|
17
|
-
|
|
18
|
-
name: string;
|
|
19
|
-
};
|
|
14
|
+
render: () => React.JSX.Element;
|
|
15
|
+
name: string;
|
|
20
16
|
};
|
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const content = "Some content";
|
|
3
|
-
export declare const openText = "Open dialog";
|
|
4
|
-
export declare const title = "Title text";
|
|
5
|
-
export declare const Component: React.FC<{
|
|
6
|
-
actions?: JSX.Element[];
|
|
7
|
-
}>;
|
|
1
|
+
import { JSX } from 'react';
|
|
8
2
|
declare const _default: {
|
|
9
3
|
title: string;
|
|
10
4
|
decorators: ((storyFn: any) => JSX.Element)[];
|
|
11
|
-
excludeStories: string[];
|
|
12
5
|
};
|
|
13
6
|
export default _default;
|
|
14
7
|
export declare const Standard: {
|
|
15
|
-
()
|
|
16
|
-
|
|
17
|
-
name: string;
|
|
18
|
-
};
|
|
8
|
+
render: () => JSX.Element;
|
|
9
|
+
name: string;
|
|
19
10
|
};
|
|
20
11
|
export declare const WithCustomActions: {
|
|
21
|
-
()
|
|
22
|
-
|
|
23
|
-
name: string;
|
|
24
|
-
};
|
|
12
|
+
render: () => JSX.Element;
|
|
13
|
+
name: string;
|
|
25
14
|
};
|
|
@@ -6,62 +6,42 @@ declare const _default: {
|
|
|
6
6
|
export default _default;
|
|
7
7
|
export declare const Standard: () => React.JSX.Element;
|
|
8
8
|
export declare const CustomStyles: {
|
|
9
|
-
()
|
|
10
|
-
|
|
11
|
-
name: string;
|
|
12
|
-
};
|
|
9
|
+
render: () => React.JSX.Element;
|
|
10
|
+
name: string;
|
|
13
11
|
};
|
|
14
12
|
export declare const CustomToolbar: {
|
|
15
|
-
()
|
|
16
|
-
|
|
17
|
-
name: string;
|
|
18
|
-
};
|
|
13
|
+
render: () => React.JSX.Element;
|
|
14
|
+
name: string;
|
|
19
15
|
};
|
|
20
16
|
export declare const CustomButtons: {
|
|
21
|
-
()
|
|
22
|
-
|
|
23
|
-
name: string;
|
|
24
|
-
};
|
|
17
|
+
render: () => React.JSX.Element;
|
|
18
|
+
name: string;
|
|
25
19
|
};
|
|
26
20
|
export declare const PasteStrippingAndBlockedInlineStyles: {
|
|
27
|
-
()
|
|
28
|
-
|
|
29
|
-
name: string;
|
|
30
|
-
};
|
|
21
|
+
render: () => React.JSX.Element;
|
|
22
|
+
name: string;
|
|
31
23
|
};
|
|
32
24
|
export declare const WithCharacterCount: {
|
|
33
|
-
()
|
|
34
|
-
|
|
35
|
-
name: string;
|
|
36
|
-
};
|
|
25
|
+
render: () => React.JSX.Element;
|
|
26
|
+
name: string;
|
|
37
27
|
};
|
|
38
28
|
export declare const DisableAndStripNewlines: {
|
|
39
|
-
()
|
|
40
|
-
|
|
41
|
-
name: string;
|
|
42
|
-
};
|
|
29
|
+
render: () => React.JSX.Element;
|
|
30
|
+
name: string;
|
|
43
31
|
};
|
|
44
32
|
export declare const DisablePasting: {
|
|
45
|
-
()
|
|
46
|
-
|
|
47
|
-
name: string;
|
|
48
|
-
};
|
|
33
|
+
render: () => React.JSX.Element;
|
|
34
|
+
name: string;
|
|
49
35
|
};
|
|
50
36
|
export declare const WithLabel: {
|
|
51
|
-
()
|
|
52
|
-
|
|
53
|
-
name: string;
|
|
54
|
-
};
|
|
37
|
+
render: () => React.JSX.Element;
|
|
38
|
+
name: string;
|
|
55
39
|
};
|
|
56
40
|
export declare const OnlyHeading: {
|
|
57
|
-
()
|
|
58
|
-
|
|
59
|
-
name: string;
|
|
60
|
-
};
|
|
41
|
+
render: () => React.JSX.Element;
|
|
42
|
+
name: string;
|
|
61
43
|
};
|
|
62
44
|
export declare const ReadOnly: {
|
|
63
|
-
()
|
|
64
|
-
|
|
65
|
-
name: string;
|
|
66
|
-
};
|
|
45
|
+
render: () => React.JSX.Element;
|
|
46
|
+
name: string;
|
|
67
47
|
};
|
|
@@ -6,8 +6,6 @@ declare const _default: {
|
|
|
6
6
|
export default _default;
|
|
7
7
|
export declare const Input: () => React.JSX.Element;
|
|
8
8
|
export declare const InputOutlined: {
|
|
9
|
-
()
|
|
10
|
-
|
|
11
|
-
name: string;
|
|
12
|
-
};
|
|
9
|
+
render: () => React.JSX.Element;
|
|
10
|
+
name: string;
|
|
13
11
|
};
|
|
@@ -16,62 +16,42 @@ declare const _default: {
|
|
|
16
16
|
};
|
|
17
17
|
export default _default;
|
|
18
18
|
export declare const Standard: {
|
|
19
|
-
()
|
|
20
|
-
|
|
21
|
-
name: string;
|
|
22
|
-
};
|
|
19
|
+
render: () => React.JSX.Element;
|
|
20
|
+
name: string;
|
|
23
21
|
};
|
|
24
22
|
export declare const Outlined: {
|
|
25
|
-
()
|
|
26
|
-
|
|
27
|
-
name: string;
|
|
28
|
-
};
|
|
23
|
+
render: () => React.JSX.Element;
|
|
24
|
+
name: string;
|
|
29
25
|
};
|
|
30
26
|
export declare const Clickable: {
|
|
31
|
-
()
|
|
32
|
-
|
|
33
|
-
name: string;
|
|
34
|
-
};
|
|
27
|
+
render: () => React.JSX.Element;
|
|
28
|
+
name: string;
|
|
35
29
|
};
|
|
36
30
|
export declare const WithoutData: {
|
|
37
|
-
()
|
|
38
|
-
|
|
39
|
-
name: string;
|
|
40
|
-
};
|
|
31
|
+
render: () => React.JSX.Element;
|
|
32
|
+
name: string;
|
|
41
33
|
};
|
|
42
34
|
export declare const WithDropdownMenu: {
|
|
43
|
-
()
|
|
44
|
-
|
|
45
|
-
name: string;
|
|
46
|
-
};
|
|
35
|
+
render: () => React.JSX.Element;
|
|
36
|
+
name: string;
|
|
47
37
|
};
|
|
48
38
|
export declare const WithPagination: {
|
|
49
|
-
()
|
|
50
|
-
|
|
51
|
-
name: string;
|
|
52
|
-
};
|
|
39
|
+
render: () => React.JSX.Element;
|
|
40
|
+
name: string;
|
|
53
41
|
};
|
|
54
42
|
export declare const WithoutHeader: {
|
|
55
|
-
()
|
|
56
|
-
|
|
57
|
-
name: string;
|
|
58
|
-
};
|
|
43
|
+
render: () => React.JSX.Element;
|
|
44
|
+
name: string;
|
|
59
45
|
};
|
|
60
46
|
export declare const WithoutPadding: {
|
|
61
|
-
()
|
|
62
|
-
|
|
63
|
-
name: string;
|
|
64
|
-
};
|
|
47
|
+
render: () => React.JSX.Element;
|
|
48
|
+
name: string;
|
|
65
49
|
};
|
|
66
50
|
export declare const WithRowStyle: {
|
|
67
|
-
()
|
|
68
|
-
|
|
69
|
-
name: string;
|
|
70
|
-
};
|
|
51
|
+
render: () => React.JSX.Element;
|
|
52
|
+
name: string;
|
|
71
53
|
};
|
|
72
54
|
export declare const WithRowStyleFunction: {
|
|
73
|
-
()
|
|
74
|
-
|
|
75
|
-
name: string;
|
|
76
|
-
};
|
|
55
|
+
render: () => React.JSX.Element;
|
|
56
|
+
name: string;
|
|
77
57
|
};
|
|
@@ -4,14 +4,10 @@ declare const _default: {
|
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const HorizontalFields: {
|
|
7
|
-
()
|
|
8
|
-
|
|
9
|
-
name: string;
|
|
10
|
-
};
|
|
7
|
+
render: () => React.JSX.Element;
|
|
8
|
+
name: string;
|
|
11
9
|
};
|
|
12
10
|
export declare const VerticalFields: {
|
|
13
|
-
()
|
|
14
|
-
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
11
|
+
render: () => React.JSX.Element;
|
|
12
|
+
name: string;
|
|
17
13
|
};
|
|
@@ -4,8 +4,9 @@ declare const _default: {
|
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Standard: {
|
|
7
|
-
()
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
render: () => React.JSX.Element;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const CustomOverlay: {
|
|
11
|
+
render: () => React.JSX.Element;
|
|
11
12
|
};
|
|
@@ -20,14 +20,14 @@ declare const _default: {
|
|
|
20
20
|
};
|
|
21
21
|
export default _default;
|
|
22
22
|
export declare const Default: {
|
|
23
|
-
()
|
|
24
|
-
|
|
23
|
+
render: () => React.JSX.Element;
|
|
24
|
+
name: string;
|
|
25
25
|
};
|
|
26
26
|
export declare const WithAppBar: {
|
|
27
|
-
()
|
|
28
|
-
|
|
27
|
+
render: () => React.JSX.Element;
|
|
28
|
+
name: string;
|
|
29
29
|
};
|
|
30
30
|
export declare const WithExclude: {
|
|
31
|
-
()
|
|
32
|
-
|
|
31
|
+
render: () => React.JSX.Element;
|
|
32
|
+
name: string;
|
|
33
33
|
};
|
|
@@ -7,14 +7,10 @@ declare const _default: {
|
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
export declare const Standard: {
|
|
10
|
-
()
|
|
11
|
-
|
|
12
|
-
name: string;
|
|
13
|
-
};
|
|
10
|
+
render: () => React.JSX.Element;
|
|
11
|
+
name: string;
|
|
14
12
|
};
|
|
15
13
|
export declare const ExpandAndClick: {
|
|
16
|
-
()
|
|
17
|
-
|
|
18
|
-
name: string;
|
|
19
|
-
};
|
|
14
|
+
render: () => React.JSX.Element;
|
|
15
|
+
name: string;
|
|
20
16
|
};
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
2
|
import { ContextTreeElement, ContextTree } from '../utils/tree-builder';
|
|
3
|
+
/**
|
|
4
|
+
* @TODO fix later
|
|
5
|
+
* cheat, https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoViewIfNeeded
|
|
6
|
+
*/
|
|
7
|
+
declare global {
|
|
8
|
+
interface HTMLElement {
|
|
9
|
+
scrollIntoViewIfNeeded: VoidFunction;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
3
12
|
export interface GrepTableOfContentNavTreeNodeProps {
|
|
4
13
|
node: ContextTreeElement;
|
|
5
14
|
className?: string;
|
package/dist/index.js
CHANGED
|
@@ -3170,9 +3170,11 @@ const useContentElements = (container, selector, options) => {
|
|
|
3170
3170
|
});
|
|
3171
3171
|
// start observing
|
|
3172
3172
|
observer.observe(container, config);
|
|
3173
|
+
console.debug('observing container', container);
|
|
3173
3174
|
// stop observing when unmounted
|
|
3174
3175
|
return () => {
|
|
3175
3176
|
observer.disconnect();
|
|
3177
|
+
console.debug('observing disconnected', container);
|
|
3176
3178
|
};
|
|
3177
3179
|
}, [container, config, getElements]);
|
|
3178
3180
|
return elements;
|
|
@@ -12887,7 +12889,7 @@ var lodash_throttleExports = requireLodash_throttle();
|
|
|
12887
12889
|
var throttle = /*@__PURE__*/getDefaultExportFromCjs(lodash_throttleExports);
|
|
12888
12890
|
|
|
12889
12891
|
const generateElementId = (element) => {
|
|
12890
|
-
const tmpId = element.innerText
|
|
12892
|
+
const tmpId = element.innerText.replace(/\s/g, '-').toLowerCase();
|
|
12891
12893
|
let id = tmpId, index = 1;
|
|
12892
12894
|
while (document.getElementById(id)) {
|
|
12893
12895
|
id = `${tmpId}-${++index}`;
|
|
@@ -12957,7 +12959,9 @@ const GrepTableOfContentProvider = ({ ...props }) => {
|
|
|
12957
12959
|
setSelected(element);
|
|
12958
12960
|
}, 50);
|
|
12959
12961
|
target.addEventListener('scroll', onScroll, false);
|
|
12962
|
+
console.debug('scroll observer attached');
|
|
12960
12963
|
return () => {
|
|
12964
|
+
console.debug('scroll observer detached');
|
|
12961
12965
|
return target.removeEventListener('scroll', onScroll);
|
|
12962
12966
|
};
|
|
12963
12967
|
}, [scrollTarget, setSelected, offsetTop, getViewportElement]);
|
|
@@ -12968,11 +12972,13 @@ const GrepTableOfContentProvider = ({ ...props }) => {
|
|
|
12968
12972
|
// observe changes in hash
|
|
12969
12973
|
useEffect(() => {
|
|
12970
12974
|
if (hash && elements[hash]) {
|
|
12975
|
+
console.debug('anchor change, setting selected element');
|
|
12971
12976
|
setSelected(elements[hash], true);
|
|
12972
12977
|
}
|
|
12973
12978
|
}, [hash, setSelected]);
|
|
12974
12979
|
// set selected element on initial load
|
|
12975
12980
|
if (!initialized && elements && elements[hash]) {
|
|
12981
|
+
console.debug('setting initial selected element');
|
|
12976
12982
|
setSelected(elements[hash], true);
|
|
12977
12983
|
setInitialized(true);
|
|
12978
12984
|
}
|
|
@@ -13025,7 +13031,8 @@ const GrepTableOfContentNavTreeNode = (props) => {
|
|
|
13025
13031
|
useEffect(() => {
|
|
13026
13032
|
const link = linkRef.current;
|
|
13027
13033
|
if (isSelected) {
|
|
13028
|
-
link?.
|
|
13034
|
+
link?.scrollIntoViewIfNeeded();
|
|
13035
|
+
//setTimeout(() => link?.scrollIntoViewIfNeeded(), 2000);
|
|
13029
13036
|
}
|
|
13030
13037
|
else if (link === document.activeElement) {
|
|
13031
13038
|
link?.blur();
|
|
@@ -13050,6 +13057,7 @@ const GrepTableOfContentNavTreeNode = (props) => {
|
|
|
13050
13057
|
};
|
|
13051
13058
|
return (React__default.createElement("li", { key: index, "data-lvl": lvl, className: className, style: style },
|
|
13052
13059
|
React__default.createElement(Link, { ref: linkRef, className: clsx(styles.link, isSelected && `${styles.link}--selected`), href: url, tabIndex: tabIndex, onClick: (event) => {
|
|
13060
|
+
console.debug('node click', node);
|
|
13053
13061
|
event.preventDefault();
|
|
13054
13062
|
event.stopPropagation();
|
|
13055
13063
|
doSelect(true);
|