@elliemae/ds-global-header 2.3.0-alpha.9 → 2.3.0-next.0
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/cjs/GlobalHeader.js +37 -0
- package/cjs/GlobalHeaderContainer.js +24 -0
- package/cjs/GlobalHeaderContext.js +20 -0
- package/cjs/GlobalHeaderTypes.js +2 -0
- package/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js +85 -0
- package/cjs/components/Breadcrumb/PureBreadcrumb.js +60 -0
- package/cjs/components/Breadcrumb/styles.js +59 -0
- package/cjs/components/Title/GlobalHeaderTitle.js +29 -0
- package/cjs/components/Toolbar/GlobalHeaderToolbar.js +30 -0
- package/cjs/components/Toolbar/ToolbarItems.js +107 -0
- package/cjs/components/Toolbar/styles.js +25 -0
- package/cjs/config/useGetPropsWithDefaults.js +31 -0
- package/cjs/config/useGlobalHeader.js +39 -0
- package/cjs/config/useValidateProps.js +92 -0
- package/cjs/config/validateHelpers.js +57 -0
- package/cjs/defaultProps.js +14 -0
- package/cjs/index.js +11 -0
- package/cjs/outOfTheBox/AppPicker/AppPicker.js +117 -0
- package/cjs/outOfTheBox/PopupMenu/PopupMenu.js +101 -0
- package/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js +96 -0
- package/cjs/outOfTheBox/PopupMenu/styles.js +32 -0
- package/cjs/outOfTheBox/SearchToggle/SearchToggle.js +113 -0
- package/cjs/outOfTheBox/SearchToggle/styles.js +15 -0
- package/cjs/outOfTheBox/index.js +13 -0
- package/cjs/propTypes.js +29 -0
- package/cjs/styles.js +21 -0
- package/esm/GlobalHeader.js +28 -0
- package/esm/GlobalHeaderContainer.js +16 -0
- package/esm/GlobalHeaderContext.js +16 -0
- package/esm/GlobalHeaderTypes.js +1 -0
- package/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js +75 -0
- package/esm/components/Breadcrumb/PureBreadcrumb.js +49 -0
- package/esm/components/Breadcrumb/styles.js +48 -0
- package/esm/components/Title/GlobalHeaderTitle.js +21 -0
- package/esm/components/Toolbar/GlobalHeaderToolbar.js +22 -0
- package/esm/components/Toolbar/ToolbarItems.js +97 -0
- package/esm/components/Toolbar/styles.js +17 -0
- package/esm/config/useGetPropsWithDefaults.js +23 -0
- package/esm/config/useGlobalHeader.js +31 -0
- package/esm/config/useValidateProps.js +88 -0
- package/esm/config/validateHelpers.js +44 -0
- package/{dist/esm → esm}/defaultProps.js +3 -5
- package/esm/index.js +1 -0
- package/esm/outOfTheBox/AppPicker/AppPicker.js +107 -0
- package/esm/outOfTheBox/PopupMenu/PopupMenu.js +91 -0
- package/esm/outOfTheBox/PopupMenu/PopupMenuContent.js +86 -0
- package/esm/outOfTheBox/PopupMenu/styles.js +21 -0
- package/esm/outOfTheBox/SearchToggle/SearchToggle.js +103 -0
- package/esm/outOfTheBox/SearchToggle/styles.js +7 -0
- package/esm/outOfTheBox/index.js +3 -0
- package/esm/propTypes.js +23 -0
- package/esm/styles.js +13 -0
- package/package.json +72 -76
- package/{dist/types → types}/GlobalHeader.d.ts +0 -0
- package/{dist/types → types}/GlobalHeaderContainer.d.ts +0 -0
- package/{dist/types → types}/GlobalHeaderContext.d.ts +0 -0
- package/{dist/types → types}/GlobalHeaderTypes.d.ts +0 -0
- package/{dist/types → types}/components/Breadcrumb/GlobalHeaderBreadcrumb.d.ts +0 -0
- package/{dist/types → types}/components/Breadcrumb/PureBreadcrumb.d.ts +0 -0
- package/{dist/types → types}/components/Breadcrumb/styles.d.ts +0 -0
- package/{dist/types → types}/components/Title/GlobalHeaderTitle.d.ts +0 -0
- package/{dist/types → types}/components/Toolbar/GlobalHeaderToolbar.d.ts +0 -0
- package/{dist/types → types}/components/Toolbar/ToolbarItems.d.ts +0 -0
- package/{dist/types → types}/components/Toolbar/styles.d.ts +0 -0
- package/{dist/types → types}/config/useGetPropsWithDefaults.d.ts +0 -0
- package/{dist/types → types}/config/useGlobalHeader.d.ts +0 -0
- package/{dist/types → types}/config/useValidateProps.d.ts +0 -0
- package/{dist/types → types}/config/validateHelpers.d.ts +0 -0
- package/{dist/types → types}/defaultProps.d.ts +0 -0
- package/{dist/types → types}/index.d.ts +0 -0
- package/{dist/types → types}/outOfTheBox/AppPicker/AppPicker.d.ts +0 -0
- package/{dist/types → types}/outOfTheBox/PopupMenu/PopupMenu.d.ts +0 -0
- package/{dist/types → types}/outOfTheBox/PopupMenu/PopupMenuContent.d.ts +0 -0
- package/{dist/types → types}/outOfTheBox/PopupMenu/styles.d.ts +0 -0
- package/{dist/types → types}/outOfTheBox/SearchToggle/SearchToggle.d.ts +0 -0
- package/{dist/types → types}/outOfTheBox/SearchToggle/styles.d.ts +0 -0
- package/{dist/types → types}/outOfTheBox/index.d.ts +0 -0
- package/{dist/types → types}/propTypes.d.ts +0 -0
- package/{dist/types → types}/styles.d.ts +1 -1
- package/dist/cjs/GlobalHeader.js +0 -57
- package/dist/cjs/GlobalHeader.js.map +0 -7
- package/dist/cjs/GlobalHeaderContainer.js +0 -41
- package/dist/cjs/GlobalHeaderContainer.js.map +0 -7
- package/dist/cjs/GlobalHeaderContext.js +0 -46
- package/dist/cjs/GlobalHeaderContext.js.map +0 -7
- package/dist/cjs/GlobalHeaderTypes.js +0 -27
- package/dist/cjs/GlobalHeaderTypes.js.map +0 -7
- package/dist/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js +0 -85
- package/dist/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +0 -7
- package/dist/cjs/components/Breadcrumb/PureBreadcrumb.js +0 -51
- package/dist/cjs/components/Breadcrumb/PureBreadcrumb.js.map +0 -7
- package/dist/cjs/components/Breadcrumb/styles.js +0 -83
- package/dist/cjs/components/Breadcrumb/styles.js.map +0 -7
- package/dist/cjs/components/Title/GlobalHeaderTitle.js +0 -48
- package/dist/cjs/components/Title/GlobalHeaderTitle.js.map +0 -7
- package/dist/cjs/components/Toolbar/GlobalHeaderToolbar.js +0 -49
- package/dist/cjs/components/Toolbar/GlobalHeaderToolbar.js.map +0 -7
- package/dist/cjs/components/Toolbar/ToolbarItems.js +0 -96
- package/dist/cjs/components/Toolbar/ToolbarItems.js.map +0 -7
- package/dist/cjs/components/Toolbar/styles.js +0 -61
- package/dist/cjs/components/Toolbar/styles.js.map +0 -7
- package/dist/cjs/config/useGetPropsWithDefaults.js +0 -43
- package/dist/cjs/config/useGetPropsWithDefaults.js.map +0 -7
- package/dist/cjs/config/useGlobalHeader.js +0 -53
- package/dist/cjs/config/useGlobalHeader.js.map +0 -7
- package/dist/cjs/config/useValidateProps.js +0 -109
- package/dist/cjs/config/useValidateProps.js.map +0 -7
- package/dist/cjs/config/validateHelpers.js +0 -111
- package/dist/cjs/config/validateHelpers.js.map +0 -7
- package/dist/cjs/defaultProps.js +0 -41
- package/dist/cjs/defaultProps.js.map +0 -7
- package/dist/cjs/index.js +0 -36
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/outOfTheBox/AppPicker/AppPicker.js +0 -110
- package/dist/cjs/outOfTheBox/AppPicker/AppPicker.js.map +0 -7
- package/dist/cjs/outOfTheBox/PopupMenu/PopupMenu.js +0 -96
- package/dist/cjs/outOfTheBox/PopupMenu/PopupMenu.js.map +0 -7
- package/dist/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js +0 -89
- package/dist/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js.map +0 -7
- package/dist/cjs/outOfTheBox/PopupMenu/styles.js +0 -67
- package/dist/cjs/outOfTheBox/PopupMenu/styles.js.map +0 -7
- package/dist/cjs/outOfTheBox/SearchToggle/SearchToggle.js +0 -108
- package/dist/cjs/outOfTheBox/SearchToggle/SearchToggle.js.map +0 -7
- package/dist/cjs/outOfTheBox/SearchToggle/styles.js +0 -82
- package/dist/cjs/outOfTheBox/SearchToggle/styles.js.map +0 -7
- package/dist/cjs/outOfTheBox/index.js +0 -30
- package/dist/cjs/outOfTheBox/index.js.map +0 -7
- package/dist/cjs/propTypes.js +0 -56
- package/dist/cjs/propTypes.js.map +0 -7
- package/dist/cjs/styles.js +0 -43
- package/dist/cjs/styles.js.map +0 -7
- package/dist/esm/GlobalHeader.js +0 -28
- package/dist/esm/GlobalHeader.js.map +0 -7
- package/dist/esm/GlobalHeaderContainer.js +0 -12
- package/dist/esm/GlobalHeaderContainer.js.map +0 -7
- package/dist/esm/GlobalHeaderContext.js +0 -17
- package/dist/esm/GlobalHeaderContext.js.map +0 -7
- package/dist/esm/GlobalHeaderTypes.js +0 -2
- package/dist/esm/GlobalHeaderTypes.js.map +0 -7
- package/dist/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js +0 -56
- package/dist/esm/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +0 -7
- package/dist/esm/components/Breadcrumb/PureBreadcrumb.js +0 -22
- package/dist/esm/components/Breadcrumb/PureBreadcrumb.js.map +0 -7
- package/dist/esm/components/Breadcrumb/styles.js +0 -54
- package/dist/esm/components/Breadcrumb/styles.js.map +0 -7
- package/dist/esm/components/Title/GlobalHeaderTitle.js +0 -19
- package/dist/esm/components/Title/GlobalHeaderTitle.js.map +0 -7
- package/dist/esm/components/Toolbar/GlobalHeaderToolbar.js +0 -20
- package/dist/esm/components/Toolbar/GlobalHeaderToolbar.js.map +0 -7
- package/dist/esm/components/Toolbar/ToolbarItems.js +0 -67
- package/dist/esm/components/Toolbar/ToolbarItems.js.map +0 -7
- package/dist/esm/components/Toolbar/styles.js +0 -32
- package/dist/esm/components/Toolbar/styles.js.map +0 -7
- package/dist/esm/config/useGetPropsWithDefaults.js +0 -14
- package/dist/esm/config/useGetPropsWithDefaults.js.map +0 -7
- package/dist/esm/config/useGlobalHeader.js +0 -24
- package/dist/esm/config/useGlobalHeader.js.map +0 -7
- package/dist/esm/config/useValidateProps.js +0 -88
- package/dist/esm/config/useValidateProps.js.map +0 -7
- package/dist/esm/config/validateHelpers.js +0 -82
- package/dist/esm/config/validateHelpers.js.map +0 -7
- package/dist/esm/defaultProps.js.map +0 -7
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/outOfTheBox/AppPicker/AppPicker.js +0 -81
- package/dist/esm/outOfTheBox/AppPicker/AppPicker.js.map +0 -7
- package/dist/esm/outOfTheBox/PopupMenu/PopupMenu.js +0 -67
- package/dist/esm/outOfTheBox/PopupMenu/PopupMenu.js.map +0 -7
- package/dist/esm/outOfTheBox/PopupMenu/PopupMenuContent.js +0 -60
- package/dist/esm/outOfTheBox/PopupMenu/PopupMenuContent.js.map +0 -7
- package/dist/esm/outOfTheBox/PopupMenu/styles.js +0 -38
- package/dist/esm/outOfTheBox/PopupMenu/styles.js.map +0 -7
- package/dist/esm/outOfTheBox/SearchToggle/SearchToggle.js +0 -79
- package/dist/esm/outOfTheBox/SearchToggle/SearchToggle.js.map +0 -7
- package/dist/esm/outOfTheBox/SearchToggle/styles.js +0 -53
- package/dist/esm/outOfTheBox/SearchToggle/styles.js.map +0 -7
- package/dist/esm/outOfTheBox/index.js +0 -5
- package/dist/esm/outOfTheBox/index.js.map +0 -7
- package/dist/esm/propTypes.js +0 -27
- package/dist/esm/propTypes.js.map +0 -7
- package/dist/esm/styles.js +0 -14
- package/dist/esm/styles.js.map +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/GlobalHeaderContext.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { createContext } from 'react';\nimport { defaultProps } from './defaultProps';\nimport type { ContextT } from './GlobalHeaderTypes';\n\nconst noop = () => null;\n\nconst defaultContext = {\n props: defaultProps,\n showIconOnly: false,\n setShowIconOnly: noop,\n instanceUID: '',\n globalHeaderToolbarGrid: [],\n globalHeaderBreadcrumbGrid: [],\n};\n\nexport const GlobalHeaderContext = createContext<ContextT>(defaultContext);\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AAGA,MAAM,OAAO,MAAM;AAEnB,MAAM,iBAAiB;AAAA,EACrB,OAAO;AAAA,EACP,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,yBAAyB;AAAA,EACzB,4BAA4B;AAAA;AAGvB,MAAM,sBAAsB,cAAwB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useEffect, useContext, useRef } from "react";
|
|
3
|
-
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
-
import { Pipe } from "./styles";
|
|
5
|
-
import { GlobalHeaderContext } from "../../GlobalHeaderContext";
|
|
6
|
-
import { PureBreadcrumb } from "./PureBreadcrumb";
|
|
7
|
-
const GlobalHeaderBreadcrumb = () => {
|
|
8
|
-
const {
|
|
9
|
-
props: { breadcrumb },
|
|
10
|
-
instanceUID,
|
|
11
|
-
showIconOnly,
|
|
12
|
-
setShowIconOnly,
|
|
13
|
-
globalHeaderBreadcrumbGrid
|
|
14
|
-
} = useContext(GlobalHeaderContext);
|
|
15
|
-
const breakpoint = useRef(null);
|
|
16
|
-
const flexRegion = useRef(null);
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
const evaluateShowIconOnly = () => {
|
|
19
|
-
if (flexRegion && flexRegion.current && flexRegion?.current.offsetWidth <= 0 && !breakpoint.current) {
|
|
20
|
-
setShowIconOnly(true);
|
|
21
|
-
breakpoint.current = window.innerWidth;
|
|
22
|
-
} else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {
|
|
23
|
-
setShowIconOnly(false);
|
|
24
|
-
breakpoint.current = null;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
evaluateShowIconOnly();
|
|
28
|
-
window.addEventListener("resize", evaluateShowIconOnly);
|
|
29
|
-
return () => window.removeEventListener("resize", evaluateShowIconOnly);
|
|
30
|
-
}, [breakpoint, flexRegion, setShowIconOnly]);
|
|
31
|
-
return /* @__PURE__ */ React2.createElement(Grid, {
|
|
32
|
-
height: "100%",
|
|
33
|
-
alignItems: "center",
|
|
34
|
-
justifyContent: "flex-start",
|
|
35
|
-
"aria-label": "breadcrumbs",
|
|
36
|
-
cols: globalHeaderBreadcrumbGrid,
|
|
37
|
-
role: "navigation"
|
|
38
|
-
}, /* @__PURE__ */ React2.createElement(Pipe, {
|
|
39
|
-
showIconOnly
|
|
40
|
-
}), breadcrumb?.map((item) => {
|
|
41
|
-
const { label, ...rest } = item;
|
|
42
|
-
return /* @__PURE__ */ React2.createElement(PureBreadcrumb, {
|
|
43
|
-
label,
|
|
44
|
-
length: breadcrumb.length,
|
|
45
|
-
key: `${instanceUID}-breadcrumb-item-${label}`,
|
|
46
|
-
...rest
|
|
47
|
-
});
|
|
48
|
-
}), /* @__PURE__ */ React2.createElement("div", {
|
|
49
|
-
id: "global-header-flex-region",
|
|
50
|
-
ref: flexRegion
|
|
51
|
-
}));
|
|
52
|
-
};
|
|
53
|
-
export {
|
|
54
|
-
GlobalHeaderBreadcrumb
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=GlobalHeaderBreadcrumb.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Breadcrumb/GlobalHeaderBreadcrumb.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useEffect, useContext, useRef } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Pipe } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { PureBreadcrumb } from './PureBreadcrumb';\n\nexport const GlobalHeaderBreadcrumb = (): JSX.Element => {\n const {\n props: { breadcrumb },\n instanceUID,\n showIconOnly,\n setShowIconOnly,\n globalHeaderBreadcrumbGrid,\n } = useContext(GlobalHeaderContext);\n const breakpoint = useRef<number | null>(null);\n const flexRegion = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const evaluateShowIconOnly = () => {\n if (flexRegion && flexRegion.current && flexRegion?.current.offsetWidth <= 0 && !breakpoint.current) {\n setShowIconOnly(true);\n breakpoint.current = window.innerWidth;\n } else if (breakpoint && breakpoint.current !== null && window.innerWidth >= breakpoint.current) {\n setShowIconOnly(false);\n breakpoint.current = null;\n }\n };\n\n evaluateShowIconOnly();\n\n window.addEventListener('resize', evaluateShowIconOnly);\n return () => window.removeEventListener('resize', evaluateShowIconOnly);\n }, [breakpoint, flexRegion, setShowIconOnly]);\n\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"flex-start\"\n aria-label=\"breadcrumbs\"\n cols={globalHeaderBreadcrumbGrid}\n role=\"navigation\"\n >\n <Pipe showIconOnly={showIconOnly} />\n {breadcrumb?.map((item) => {\n const { label, ...rest } = item;\n return (\n <PureBreadcrumb\n label={label}\n length={breadcrumb.length}\n key={`${instanceUID}-breadcrumb-item-${label}`}\n {...rest}\n />\n );\n })}\n <div id=\"global-header-flex-region\" ref={flexRegion}></div>\n </Grid>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEO,MAAM,yBAAyB,MAAmB;AACvD,QAAM;AAAA,IACJ,OAAO,EAAE;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,WAAW;AACf,QAAM,aAAa,OAAsB;AACzC,QAAM,aAAa,OAAuB;AAE1C,YAAU,MAAM;AACd,UAAM,uBAAuB,MAAM;AACjC,UAAI,cAAc,WAAW,WAAW,YAAY,QAAQ,eAAe,KAAK,CAAC,WAAW,SAAS;AACnG,wBAAgB;AAChB,mBAAW,UAAU,OAAO;AAAA,iBACnB,cAAc,WAAW,YAAY,QAAQ,OAAO,cAAc,WAAW,SAAS;AAC/F,wBAAgB;AAChB,mBAAW,UAAU;AAAA;AAAA;AAIzB;AAEA,WAAO,iBAAiB,UAAU;AAClC,WAAO,MAAM,OAAO,oBAAoB,UAAU;AAAA,KACjD,CAAC,YAAY,YAAY;AAE5B,SACE,qCAAC,MAAD;AAAA,IACE,QAAO;AAAA,IACP,YAAW;AAAA,IACX,gBAAe;AAAA,IACf,cAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAK;AAAA,KAEL,qCAAC,MAAD;AAAA,IAAM;AAAA,MACL,YAAY,IAAI,CAAC,SAAS;AACzB,UAAM,EAAE,UAAU,SAAS;AAC3B,WACE,qCAAC,gBAAD;AAAA,MACE;AAAA,MACA,QAAQ,WAAW;AAAA,MACnB,KAAK,GAAG,+BAA+B;AAAA,SACnC;AAAA;AAAA,MAIV,qCAAC,OAAD;AAAA,IAAK,IAAG;AAAA,IAA4B,KAAK;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import { ChevronSmallRight } from "@elliemae/ds-icons";
|
|
4
|
-
import { getDataProps } from "@elliemae/ds-props-helpers";
|
|
5
|
-
import { BreadcrumbItem, LabelButton, Label } from "./styles";
|
|
6
|
-
const PureBreadcrumb = React2.memo(({ onClick, isSelected, length, label, hasNext, id, ...rest }) => /* @__PURE__ */ React2.createElement(BreadcrumbItem, null, /* @__PURE__ */ React2.createElement(LabelButton, {
|
|
7
|
-
onClick,
|
|
8
|
-
"aria-selected": isSelected,
|
|
9
|
-
"data-testid": "gh-breadcrumb-btn",
|
|
10
|
-
id,
|
|
11
|
-
...getDataProps(rest)
|
|
12
|
-
}, /* @__PURE__ */ React2.createElement(Label, {
|
|
13
|
-
isSelected: !!isSelected,
|
|
14
|
-
isOnlyItem: length === 1
|
|
15
|
-
}, label)), hasNext && /* @__PURE__ */ React2.createElement(ChevronSmallRight, {
|
|
16
|
-
size: "m",
|
|
17
|
-
fill: "#FFF"
|
|
18
|
-
})));
|
|
19
|
-
export {
|
|
20
|
-
PureBreadcrumb
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=PureBreadcrumb.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Breadcrumb/PureBreadcrumb.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { ChevronSmallRight } from '@elliemae/ds-icons';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\nimport { BreadcrumbItem, LabelButton, Label } from './styles';\nimport type { BreadcrumbItemT as Props } from '../../GlobalHeaderTypes';\n\nexport const PureBreadcrumb = React.memo(({ onClick, isSelected, length, label, hasNext, id, ...rest }: Props) => (\n <BreadcrumbItem>\n <LabelButton\n onClick={onClick}\n aria-selected={isSelected}\n data-testid=\"gh-breadcrumb-btn\"\n id={id}\n {...getDataProps(rest)}\n >\n <Label isSelected={!!isSelected} isOnlyItem={length === 1}>\n {label}\n </Label>\n </LabelButton>\n {hasNext && <ChevronSmallRight size=\"m\" fill=\"#FFF\" />}\n </BreadcrumbItem>\n));\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAGO,MAAM,iBAAiB,OAAM,KAAK,CAAC,EAAE,SAAS,YAAY,QAAQ,OAAO,SAAS,OAAO,WAC9F,qCAAC,gBAAD,MACE,qCAAC,aAAD;AAAA,EACE;AAAA,EACA,iBAAe;AAAA,EACf,eAAY;AAAA,EACZ;AAAA,KACI,aAAa;AAAA,GAEjB,qCAAC,OAAD;AAAA,EAAO,YAAY,CAAC,CAAC;AAAA,EAAY,YAAY,WAAW;AAAA,GACrD,SAGJ,WAAW,qCAAC,mBAAD;AAAA,EAAmB,MAAK;AAAA,EAAI,MAAK;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
const Pipe = styled.span`
|
|
4
|
-
margin: 0 7px 0 0;
|
|
5
|
-
border-left: ${({ showIconOnly }) => showIconOnly ? "none" : "1px solid #fff"};
|
|
6
|
-
height: 20px;
|
|
7
|
-
`;
|
|
8
|
-
const BreadcrumbItem = styled.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
height: 100%;
|
|
12
|
-
`;
|
|
13
|
-
const LabelButton = styled.button`
|
|
14
|
-
width: fit-content;
|
|
15
|
-
height: 100%;
|
|
16
|
-
margin: 0;
|
|
17
|
-
padding: 0;
|
|
18
|
-
border: 1px solid transparent;
|
|
19
|
-
background-color: transparent;
|
|
20
|
-
outline: none;
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
position: relative;
|
|
23
|
-
&:focus {
|
|
24
|
-
:before {
|
|
25
|
-
content: '';
|
|
26
|
-
position: absolute;
|
|
27
|
-
z-index: 2;
|
|
28
|
-
top: 2px;
|
|
29
|
-
left: -5px;
|
|
30
|
-
width: calc(100% + 10px);
|
|
31
|
-
height: calc(100% - 4px);
|
|
32
|
-
border: 2px solid ${({ theme }) => theme.colors.neutral["000"]};
|
|
33
|
-
border-radius: 4px;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
const Label = styled.p`
|
|
38
|
-
color: ${({ theme }) => theme.colors.neutral["000"]};
|
|
39
|
-
${({ theme, isSelected }) => `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral["000"] : "transparent"}`};
|
|
40
|
-
font-size: 16px;
|
|
41
|
-
text-transform: uppercase;
|
|
42
|
-
border-bottom: ${({ isSelected, isOnlyItem }) => `2px solid ${isSelected && !isOnlyItem ? "#FFF" : "transparent"}`};
|
|
43
|
-
margin: 3px 5px 0 5px;
|
|
44
|
-
:hover {
|
|
45
|
-
${({ theme }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral["000"]}`};
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
export {
|
|
49
|
-
BreadcrumbItem,
|
|
50
|
-
Label,
|
|
51
|
-
LabelButton,
|
|
52
|
-
Pipe
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Breadcrumb/styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport type { LabelT, PipeT } from '../../GlobalHeaderTypes';\n\nexport const Pipe = styled.span<PipeT>`\n margin: 0 7px 0 0;\n border-left: ${({ showIconOnly }) => (showIconOnly ? 'none' : '1px solid #fff')};\n height: 20px;\n`;\n\nexport const BreadcrumbItem = styled.div`\n display: flex;\n align-items: center;\n height: 100%;\n`;\n\nexport const LabelButton = styled.button`\n width: fit-content;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 1px solid transparent;\n background-color: transparent;\n outline: none;\n cursor: pointer;\n position: relative;\n &:focus {\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: -5px;\n width: calc(100% + 10px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n\nexport const Label = styled.p<LabelT>`\n color: ${({ theme }) => theme.colors.neutral['000']};\n ${({ theme, isSelected }) =>\n `-webkit-text-stroke: 0.4px ${isSelected ? theme.colors.neutral['000'] : 'transparent'}`};\n font-size: 16px;\n text-transform: uppercase;\n border-bottom: ${({ isSelected, isOnlyItem }) => `2px solid ${isSelected && !isOnlyItem ? '#FFF' : 'transparent'}`};\n margin: 3px 5px 0 5px;\n :hover {\n ${({ theme }) => `-webkit-text-stroke: 0.4px ${theme.colors.neutral['000']}`};\n }\n`;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAGO,MAAM,OAAO,OAAO;AAAA;AAAA,iBAEV,CAAC,EAAE,mBAAoB,eAAe,SAAS;AAAA;AAAA;AAIzD,MAAM,iBAAiB,OAAO;AAAA;AAAA;AAAA;AAAA;AAM9B,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAmBR,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAMvD,MAAM,QAAQ,OAAO;AAAA,WACjB,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA,IAC3C,CAAC,EAAE,OAAO,iBACV,+BAA+B,aAAa,MAAM,OAAO,QAAQ,SAAS;AAAA;AAAA;AAAA,mBAG3D,CAAC,EAAE,YAAY,iBAAiB,aAAa,cAAc,CAAC,aAAa,SAAS;AAAA;AAAA;AAAA,MAG/F,CAAC,EAAE,YAAY,8BAA8B,MAAM,OAAO,QAAQ;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useContext } from "react";
|
|
3
|
-
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
-
import { GlobalHeaderContext } from "../../GlobalHeaderContext";
|
|
5
|
-
const GlobalHeaderTitle = () => {
|
|
6
|
-
const {
|
|
7
|
-
props: { Logo, LogoWithBrand },
|
|
8
|
-
showIconOnly
|
|
9
|
-
} = useContext(GlobalHeaderContext);
|
|
10
|
-
return /* @__PURE__ */ React2.createElement(Grid, {
|
|
11
|
-
alignItems: "center",
|
|
12
|
-
pr: showIconOnly ? "0px" : "36px",
|
|
13
|
-
cols: showIconOnly ? ["auto"] : ["auto", "1fr"]
|
|
14
|
-
}, Logo && showIconOnly && /* @__PURE__ */ React2.createElement(Logo, null), LogoWithBrand && !showIconOnly && /* @__PURE__ */ React2.createElement(LogoWithBrand, null));
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
GlobalHeaderTitle
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=GlobalHeaderTitle.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Title/GlobalHeaderTitle.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const GlobalHeaderTitle = (): JSX.Element => {\n const {\n props: { Logo, LogoWithBrand },\n showIconOnly,\n } = useContext(GlobalHeaderContext);\n\n return (\n <Grid alignItems=\"center\" pr={showIconOnly ? '0px' : '36px'} cols={showIconOnly ? ['auto'] : ['auto', '1fr']}>\n {Logo && showIconOnly && <Logo />}\n {LogoWithBrand && !showIconOnly && <LogoWithBrand />}\n </Grid>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AAEO,MAAM,oBAAoB,MAAmB;AAClD,QAAM;AAAA,IACJ,OAAO,EAAE,MAAM;AAAA,IACf;AAAA,MACE,WAAW;AAEf,SACE,qCAAC,MAAD;AAAA,IAAM,YAAW;AAAA,IAAS,IAAI,eAAe,QAAQ;AAAA,IAAQ,MAAM,eAAe,CAAC,UAAU,CAAC,QAAQ;AAAA,KACnG,QAAQ,gBAAgB,qCAAC,MAAD,OACxB,iBAAiB,CAAC,gBAAgB,qCAAC,eAAD;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useContext } from "react";
|
|
3
|
-
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
-
import { ToolbarItems } from "./ToolbarItems";
|
|
5
|
-
import { GlobalHeaderContext } from "../../GlobalHeaderContext";
|
|
6
|
-
const GlobalHeaderToolbar = () => {
|
|
7
|
-
const { globalHeaderToolbarGrid } = useContext(GlobalHeaderContext);
|
|
8
|
-
return /* @__PURE__ */ React2.createElement(Grid, {
|
|
9
|
-
height: "100%",
|
|
10
|
-
alignItems: "center",
|
|
11
|
-
justifyContent: "center",
|
|
12
|
-
gutter: "xxs",
|
|
13
|
-
cols: globalHeaderToolbarGrid,
|
|
14
|
-
role: "toolbar"
|
|
15
|
-
}, /* @__PURE__ */ React2.createElement(ToolbarItems, null));
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
GlobalHeaderToolbar
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=GlobalHeaderToolbar.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Toolbar/GlobalHeaderToolbar.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { ToolbarItems } from './ToolbarItems';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\n\nexport const GlobalHeaderToolbar = (): JSX.Element => {\n const { globalHeaderToolbarGrid } = useContext(GlobalHeaderContext);\n return (\n <Grid\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gutter=\"xxs\"\n cols={globalHeaderToolbarGrid}\n role=\"toolbar\"\n >\n <ToolbarItems />\n </Grid>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEO,MAAM,sBAAsB,MAAmB;AACpD,QAAM,EAAE,4BAA4B,WAAW;AAC/C,SACE,qCAAC,MAAD;AAAA,IACE,QAAO;AAAA,IACP,YAAW;AAAA,IACX,gBAAe;AAAA,IACf,QAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAK;AAAA,KAEL,qCAAC,cAAD;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useContext, useMemo } from "react";
|
|
3
|
-
import { AppPicker, PopupMenu, SearchToggle } from "../../outOfTheBox";
|
|
4
|
-
import { Button } from "./styles";
|
|
5
|
-
import { GlobalHeaderContext } from "../../GlobalHeaderContext";
|
|
6
|
-
import { getDataProps } from "@elliemae/ds-props-helpers";
|
|
7
|
-
const ToolbarItems = () => {
|
|
8
|
-
const {
|
|
9
|
-
props: { toolbar },
|
|
10
|
-
instanceUID
|
|
11
|
-
} = useContext(GlobalHeaderContext);
|
|
12
|
-
console.log(`toolbar`, toolbar);
|
|
13
|
-
const itemsList = useMemo(() => toolbar?.map((item) => {
|
|
14
|
-
const { Icon, type, onClick, componentProps, label, onKeyPress, id, CustomComponent, ...otherProps } = item;
|
|
15
|
-
switch (type) {
|
|
16
|
-
case "ds-popup-menu":
|
|
17
|
-
return /* @__PURE__ */ React2.createElement(PopupMenu, {
|
|
18
|
-
title: label,
|
|
19
|
-
Icon,
|
|
20
|
-
onClick,
|
|
21
|
-
onKeyPress,
|
|
22
|
-
id,
|
|
23
|
-
key: `${instanceUID}-ds-popup-menu-${label}`,
|
|
24
|
-
...otherProps,
|
|
25
|
-
componentProps
|
|
26
|
-
});
|
|
27
|
-
case "ds-app-picker":
|
|
28
|
-
return /* @__PURE__ */ React2.createElement(AppPicker, {
|
|
29
|
-
label,
|
|
30
|
-
key: `${instanceUID}-ds-app-picker-${label}`,
|
|
31
|
-
id,
|
|
32
|
-
componentProps,
|
|
33
|
-
...otherProps
|
|
34
|
-
});
|
|
35
|
-
case "ds-search-toggle":
|
|
36
|
-
return /* @__PURE__ */ React2.createElement(SearchToggle, {
|
|
37
|
-
key: `${instanceUID}-ds-search-toggle-${id}`,
|
|
38
|
-
id,
|
|
39
|
-
componentProps,
|
|
40
|
-
...otherProps
|
|
41
|
-
});
|
|
42
|
-
case "custom":
|
|
43
|
-
if (CustomComponent)
|
|
44
|
-
return /* @__PURE__ */ React2.createElement(CustomComponent, {
|
|
45
|
-
item
|
|
46
|
-
});
|
|
47
|
-
return null;
|
|
48
|
-
default:
|
|
49
|
-
return /* @__PURE__ */ React2.createElement(Button, {
|
|
50
|
-
onClick,
|
|
51
|
-
key: `${instanceUID}-ds-toolbar-button-${label}`,
|
|
52
|
-
title: label,
|
|
53
|
-
"data-testid": "gh-toolbar-item",
|
|
54
|
-
id,
|
|
55
|
-
...getDataProps(otherProps)
|
|
56
|
-
}, /* @__PURE__ */ React2.createElement(Icon, {
|
|
57
|
-
fill: "#FFF",
|
|
58
|
-
size: "m"
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
}), [toolbar, instanceUID]);
|
|
62
|
-
return /* @__PURE__ */ React2.createElement(React2.Fragment, null, itemsList);
|
|
63
|
-
};
|
|
64
|
-
export {
|
|
65
|
-
ToolbarItems
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=ToolbarItems.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Toolbar/ToolbarItems.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-case-declarations */\nimport React, { useContext, useMemo } from 'react';\nimport { AppPicker, PopupMenu, SearchToggle } from '../../outOfTheBox';\nimport { Button } from './styles';\nimport { GlobalHeaderContext } from '../../GlobalHeaderContext';\nimport { getDataProps } from '@elliemae/ds-props-helpers';\n\nexport const ToolbarItems = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n } = useContext(GlobalHeaderContext);\n\n console.log(`toolbar`, toolbar);\n const itemsList = useMemo(\n () =>\n toolbar?.map((item) => {\n const { Icon, type, onClick, componentProps, label, onKeyPress, id, CustomComponent, ...otherProps } = item;\n\n switch (type) {\n case 'ds-popup-menu':\n return (\n <PopupMenu\n title={label}\n Icon={Icon}\n onClick={onClick}\n onKeyPress={onKeyPress}\n id={id}\n key={`${instanceUID}-ds-popup-menu-${label}`}\n {...otherProps}\n componentProps={componentProps}\n />\n );\n case 'ds-app-picker':\n return (\n <AppPicker\n label={label}\n key={`${instanceUID}-ds-app-picker-${label}`}\n id={id}\n componentProps={componentProps}\n {...otherProps}\n />\n );\n case 'ds-search-toggle':\n return (\n <SearchToggle\n key={`${instanceUID}-ds-search-toggle-${id}`}\n id={id}\n componentProps={componentProps}\n {...otherProps}\n />\n );\n case 'custom':\n if (CustomComponent) return <CustomComponent item={item} />;\n return null;\n default:\n return (\n <Button\n onClick={onClick}\n key={`${instanceUID}-ds-toolbar-button-${label}`}\n title={label}\n data-testid=\"gh-toolbar-item\"\n id={id}\n {...getDataProps(otherProps)}\n >\n <Icon fill=\"#FFF\" size=\"m\" />\n </Button>\n );\n }\n }),\n [toolbar, instanceUID],\n );\n\n return <>{itemsList}</>;\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AAEO,MAAM,eAAe,MAAmB;AAC7C,QAAM;AAAA,IACJ,OAAO,EAAE;AAAA,IACT;AAAA,MACE,WAAW;AAEf,UAAQ,IAAI,WAAW;AACvB,QAAM,YAAY,QAChB,MACE,SAAS,IAAI,CAAC,SAAS;AACrB,UAAM,EAAE,MAAM,MAAM,SAAS,gBAAgB,OAAO,YAAY,IAAI,oBAAoB,eAAe;AAEvG,YAAQ;AAAA,WACD;AACH,eACE,qCAAC,WAAD;AAAA,UACE,OAAO;AAAA,UACP;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,KAAK,GAAG,6BAA6B;AAAA,aACjC;AAAA,UACJ;AAAA;AAAA,WAGD;AACH,eACE,qCAAC,WAAD;AAAA,UACE;AAAA,UACA,KAAK,GAAG,6BAA6B;AAAA,UACrC;AAAA,UACA;AAAA,aACI;AAAA;AAAA,WAGL;AACH,eACE,qCAAC,cAAD;AAAA,UACE,KAAK,GAAG,gCAAgC;AAAA,UACxC;AAAA,UACA;AAAA,aACI;AAAA;AAAA,WAGL;AACH,YAAI;AAAiB,iBAAO,qCAAC,iBAAD;AAAA,YAAiB;AAAA;AAC7C,eAAO;AAAA;AAEP,eACE,qCAAC,QAAD;AAAA,UACE;AAAA,UACA,KAAK,GAAG,iCAAiC;AAAA,UACzC,OAAO;AAAA,UACP,eAAY;AAAA,UACZ;AAAA,aACI,aAAa;AAAA,WAEjB,qCAAC,MAAD;AAAA,UAAM,MAAK;AAAA,UAAO,MAAK;AAAA;AAAA;AAAA,MAKnC,CAAC,SAAS;AAGZ,SAAO,4DAAG;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
const Button = styled.button`
|
|
4
|
-
height: 40px;
|
|
5
|
-
width: 40px;
|
|
6
|
-
border: none;
|
|
7
|
-
background-color: transparent;
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
position: relative;
|
|
10
|
-
outline: none;
|
|
11
|
-
&:hover:not(:focus) {
|
|
12
|
-
background-color: ${({ theme }) => theme.colors.brand[700]};
|
|
13
|
-
outline: none;
|
|
14
|
-
}
|
|
15
|
-
&:focus {
|
|
16
|
-
:before {
|
|
17
|
-
content: '';
|
|
18
|
-
position: absolute;
|
|
19
|
-
z-index: 2;
|
|
20
|
-
top: 2px;
|
|
21
|
-
left: 2px;
|
|
22
|
-
width: calc(100% - 4px);
|
|
23
|
-
height: calc(100% - 4px);
|
|
24
|
-
border: 2px solid ${({ theme }) => theme.colors.neutral["000"]};
|
|
25
|
-
border-radius: 4px;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
`;
|
|
29
|
-
export {
|
|
30
|
-
Button
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/components/Toolbar/styles.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\n\nexport const Button = styled.button`\n height: 40px;\n width: 40px;\n border: none;\n background-color: transparent;\n cursor: pointer;\n position: relative;\n outline: none;\n &:hover:not(:focus) {\n background-color: ${({ theme }) => theme.colors.brand[700]};\n outline: none;\n }\n &:focus {\n :before {\n content: '';\n position: absolute;\n z-index: 2;\n top: 2px;\n left: 2px;\n width: calc(100% - 4px);\n height: calc(100% - 4px);\n border: 2px solid ${({ theme }) => theme.colors.neutral['000']};\n border-radius: 4px;\n }\n }\n`;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAEO,MAAM,SAAS,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBASL,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAYhC,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useMemo } from "react";
|
|
3
|
-
import { defaultProps } from "../defaultProps";
|
|
4
|
-
const useGetPropsWithDefaults = (props) => {
|
|
5
|
-
const { toolbar, breadcrumb, Logo, LogoWithBrand } = props;
|
|
6
|
-
return useMemo(() => ({
|
|
7
|
-
...defaultProps,
|
|
8
|
-
...props
|
|
9
|
-
}), [toolbar, breadcrumb, Logo, LogoWithBrand]);
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
useGetPropsWithDefaults
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=useGetPropsWithDefaults.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useGetPropsWithDefaults.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react-hooks/exhaustive-deps */\nimport { useMemo } from 'react';\nimport type { GlobalHeaderPropsT } from '../GlobalHeaderTypes';\nimport { defaultProps } from '../defaultProps';\n\nexport const useGetPropsWithDefaults = (props: GlobalHeaderPropsT): GlobalHeaderPropsT => {\n const { toolbar, breadcrumb, Logo, LogoWithBrand } = props;\n\n return useMemo(\n () => ({\n ...defaultProps,\n ...props,\n }),\n [toolbar, breadcrumb, Logo, LogoWithBrand],\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AAEA;AAEO,MAAM,0BAA0B,CAAC,UAAkD;AACxF,QAAM,EAAE,SAAS,YAAY,MAAM,kBAAkB;AAErD,SAAO,QACL,MAAO;AAAA,OACF;AAAA,OACA;AAAA,MAEL,CAAC,SAAS,YAAY,MAAM;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2, { useState, useMemo } from "react";
|
|
3
|
-
import { uid } from "uid";
|
|
4
|
-
import { useGetPropsWithDefaults } from "./useGetPropsWithDefaults";
|
|
5
|
-
const useGlobalHeader = (props) => {
|
|
6
|
-
const [showIconOnly, setShowIconOnly] = useState(false);
|
|
7
|
-
const instanceUID = useMemo(() => uid(5), []);
|
|
8
|
-
const globalHeaderToolbarGrid = useMemo(() => new Array(props?.toolbar?.length ?? 0).fill("auto"), [props.toolbar]);
|
|
9
|
-
const globalHeaderBreadcrumbGrid = useMemo(() => ["auto", ...new Array(props?.breadcrumb?.length ?? 0).fill("auto"), "1fr"], [props.breadcrumb]);
|
|
10
|
-
const propsWithDefaults = useGetPropsWithDefaults(props);
|
|
11
|
-
const ctx = React2.useMemo(() => ({
|
|
12
|
-
props: propsWithDefaults,
|
|
13
|
-
showIconOnly,
|
|
14
|
-
setShowIconOnly,
|
|
15
|
-
instanceUID,
|
|
16
|
-
globalHeaderToolbarGrid,
|
|
17
|
-
globalHeaderBreadcrumbGrid
|
|
18
|
-
}), [propsWithDefaults, showIconOnly, instanceUID, globalHeaderToolbarGrid, globalHeaderBreadcrumbGrid]);
|
|
19
|
-
return ctx;
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
useGlobalHeader
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=useGlobalHeader.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useGlobalHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useState, useMemo } from 'react';\nimport { uid } from 'uid';\nimport type { ContextT, GlobalHeaderPropsT } from '../GlobalHeaderTypes';\nimport { useGetPropsWithDefaults } from './useGetPropsWithDefaults';\n\nexport const useGlobalHeader = (props: GlobalHeaderPropsT): ContextT => {\n const [showIconOnly, setShowIconOnly] = useState<boolean>(false);\n\n const instanceUID = useMemo(() => uid(5), []);\n\n const globalHeaderToolbarGrid = useMemo(() => new Array(props?.toolbar?.length ?? 0).fill('auto'), [props.toolbar]);\n const globalHeaderBreadcrumbGrid = useMemo(\n () => ['auto', ...new Array(props?.breadcrumb?.length ?? 0).fill('auto'), '1fr'],\n [props.breadcrumb],\n );\n\n const propsWithDefaults = useGetPropsWithDefaults(props);\n\n const ctx = React.useMemo(\n () => ({\n props: propsWithDefaults,\n showIconOnly,\n setShowIconOnly,\n instanceUID,\n globalHeaderToolbarGrid,\n globalHeaderBreadcrumbGrid,\n }),\n [propsWithDefaults, showIconOnly, instanceUID, globalHeaderToolbarGrid, globalHeaderBreadcrumbGrid],\n );\n\n return ctx;\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AAEA;AAEO,MAAM,kBAAkB,CAAC,UAAwC;AACtE,QAAM,CAAC,cAAc,mBAAmB,SAAkB;AAE1D,QAAM,cAAc,QAAQ,MAAM,IAAI,IAAI;AAE1C,QAAM,0BAA0B,QAAQ,MAAM,IAAI,MAAM,OAAO,SAAS,UAAU,GAAG,KAAK,SAAS,CAAC,MAAM;AAC1G,QAAM,6BAA6B,QACjC,MAAM,CAAC,QAAQ,GAAG,IAAI,MAAM,OAAO,YAAY,UAAU,GAAG,KAAK,SAAS,QAC1E,CAAC,MAAM;AAGT,QAAM,oBAAoB,wBAAwB;AAElD,QAAM,MAAM,OAAM,QAChB,MAAO;AAAA,IACL,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MAEF,CAAC,mBAAmB,cAAc,aAAa,yBAAyB;AAG1E,SAAO;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
throwToolbarPopupItemError,
|
|
4
|
-
throwToolbarAppPickerItemError,
|
|
5
|
-
throwToolbarItemGenericError,
|
|
6
|
-
throwLogoError,
|
|
7
|
-
throwBreadcrumbItemError,
|
|
8
|
-
isValidToolbarType,
|
|
9
|
-
isObject
|
|
10
|
-
} from "./validateHelpers";
|
|
11
|
-
const validatePopupItem = (componentProps) => {
|
|
12
|
-
if (componentProps.options && !Array.isArray(componentProps.options)) {
|
|
13
|
-
throwToolbarPopupItemError("options", componentProps.options);
|
|
14
|
-
}
|
|
15
|
-
if (componentProps.closeOnClick && typeof componentProps.closeOnClick !== "boolean") {
|
|
16
|
-
throwToolbarPopupItemError("closeOnClick", componentProps.closeOnClick);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
const validateAppPickerItem = (componentProps) => {
|
|
20
|
-
if (componentProps.apps && !Array.isArray(componentProps.apps)) {
|
|
21
|
-
throwToolbarAppPickerItemError("apps", componentProps.apps);
|
|
22
|
-
}
|
|
23
|
-
if (componentProps.customApps && !Array.isArray(componentProps.customApps)) {
|
|
24
|
-
throwToolbarAppPickerItemError("customApps", componentProps.customApps);
|
|
25
|
-
}
|
|
26
|
-
if (componentProps.sectionTitle && typeof componentProps.sectionTitle !== "string") {
|
|
27
|
-
throwToolbarAppPickerItemError("sectionTitle", componentProps.sectionTitle);
|
|
28
|
-
}
|
|
29
|
-
if (componentProps.customSectionTitle && typeof componentProps.customSectionTitle !== "string") {
|
|
30
|
-
throwToolbarAppPickerItemError("customSectionTitle", componentProps.customSectionTitle);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
const validateGenericToolbarItem = (item) => {
|
|
34
|
-
if (item.label && typeof item.label !== "string") {
|
|
35
|
-
throwToolbarItemGenericError("label", item.label);
|
|
36
|
-
}
|
|
37
|
-
if (item.onClick && typeof item.onClick !== "function") {
|
|
38
|
-
throwToolbarItemGenericError("onClick", item.onClick);
|
|
39
|
-
}
|
|
40
|
-
if (item.Icon && typeof item.Icon !== "function") {
|
|
41
|
-
if (item.type === "ds-app-picker")
|
|
42
|
-
return;
|
|
43
|
-
throwToolbarItemGenericError("Icon", item.Icon);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const useValidateProps = (props) => {
|
|
47
|
-
const { breadcrumb, toolbar, Logo, LogoWithBrand } = props;
|
|
48
|
-
if (Logo && typeof Logo !== "function") {
|
|
49
|
-
throwLogoError("Logo", Logo);
|
|
50
|
-
}
|
|
51
|
-
if (LogoWithBrand && typeof LogoWithBrand !== "function") {
|
|
52
|
-
throwLogoError("LogoWithBrand", LogoWithBrand);
|
|
53
|
-
}
|
|
54
|
-
breadcrumb?.forEach((breadcrumbItem) => {
|
|
55
|
-
if (breadcrumbItem.label && typeof breadcrumbItem.label !== "string") {
|
|
56
|
-
throwBreadcrumbItemError("label", breadcrumbItem.label);
|
|
57
|
-
}
|
|
58
|
-
if (breadcrumbItem.onClick && typeof breadcrumbItem.onClick !== "function") {
|
|
59
|
-
throwBreadcrumbItemError("onClick", breadcrumbItem.onClick);
|
|
60
|
-
}
|
|
61
|
-
if (breadcrumbItem.hasNext && typeof breadcrumbItem.hasNext !== "boolean") {
|
|
62
|
-
throwBreadcrumbItemError("hasNext", breadcrumbItem.hasNext);
|
|
63
|
-
}
|
|
64
|
-
if (breadcrumbItem.isSelected && typeof breadcrumbItem.isSelected !== "boolean") {
|
|
65
|
-
throwBreadcrumbItemError("isSelected", breadcrumbItem.isSelected);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
toolbar?.forEach((toolbarItem) => {
|
|
69
|
-
if (toolbarItem.type) {
|
|
70
|
-
if (!isValidToolbarType(toolbarItem.type)) {
|
|
71
|
-
throwToolbarItemGenericError("type", toolbarItem.type);
|
|
72
|
-
}
|
|
73
|
-
if (toolbarItem.componentProps && !isObject(toolbarItem.componentProps)) {
|
|
74
|
-
throwToolbarItemGenericError("componentProps", toolbarItem.componentProps);
|
|
75
|
-
}
|
|
76
|
-
if (toolbarItem.type === "ds-popup-menu") {
|
|
77
|
-
validatePopupItem(toolbarItem.componentProps);
|
|
78
|
-
}
|
|
79
|
-
if (toolbarItem.type === "ds-app-picker") {
|
|
80
|
-
validateAppPickerItem(toolbarItem.componentProps);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
useValidateProps
|
|
87
|
-
};
|
|
88
|
-
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/config/useValidateProps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { AppPickerProps, GlobalHeaderPropsT, PopupPropsT, ToolbarItemT } from '../GlobalHeaderTypes';\nimport {\n throwToolbarPopupItemError,\n throwToolbarAppPickerItemError,\n throwToolbarItemGenericError,\n throwLogoError,\n throwBreadcrumbItemError,\n isValidToolbarType,\n isObject,\n} from './validateHelpers';\n\nconst validatePopupItem = (componentProps: PopupPropsT): void => {\n if (componentProps.options && !Array.isArray(componentProps.options)) {\n throwToolbarPopupItemError('options', componentProps.options);\n }\n if (componentProps.closeOnClick && typeof componentProps.closeOnClick !== 'boolean') {\n throwToolbarPopupItemError('closeOnClick', componentProps.closeOnClick);\n }\n};\n\nconst validateAppPickerItem = (componentProps: AppPickerProps): void => {\n if (componentProps.apps && !Array.isArray(componentProps.apps)) {\n throwToolbarAppPickerItemError('apps', componentProps.apps);\n }\n if (componentProps.customApps && !Array.isArray(componentProps.customApps)) {\n throwToolbarAppPickerItemError('customApps', componentProps.customApps);\n }\n if (componentProps.sectionTitle && typeof componentProps.sectionTitle !== 'string') {\n throwToolbarAppPickerItemError('sectionTitle', componentProps.sectionTitle);\n }\n if (componentProps.customSectionTitle && typeof componentProps.customSectionTitle !== 'string') {\n throwToolbarAppPickerItemError('customSectionTitle', componentProps.customSectionTitle);\n }\n};\n\nconst validateGenericToolbarItem = (item: ToolbarItemT): void => {\n if (item.label && typeof item.label !== 'string') {\n throwToolbarItemGenericError('label', item.label);\n }\n if (item.onClick && typeof item.onClick !== 'function') {\n throwToolbarItemGenericError('onClick', item.onClick);\n }\n if (item.Icon && typeof item.Icon !== 'function') {\n if (item.type === 'ds-app-picker') return;\n throwToolbarItemGenericError('Icon', item.Icon);\n }\n};\n\nexport const useValidateProps = (props: GlobalHeaderPropsT): void => {\n const { breadcrumb, toolbar, Logo, LogoWithBrand } = props;\n\n if (Logo && typeof Logo !== 'function') {\n throwLogoError('Logo', Logo);\n }\n\n if (LogoWithBrand && typeof LogoWithBrand !== 'function') {\n throwLogoError('LogoWithBrand', LogoWithBrand);\n }\n\n breadcrumb?.forEach((breadcrumbItem) => {\n if (breadcrumbItem.label && typeof breadcrumbItem.label !== 'string') {\n throwBreadcrumbItemError('label', breadcrumbItem.label);\n }\n if (breadcrumbItem.onClick && typeof breadcrumbItem.onClick !== 'function') {\n throwBreadcrumbItemError('onClick', breadcrumbItem.onClick);\n }\n if (breadcrumbItem.hasNext && typeof breadcrumbItem.hasNext !== 'boolean') {\n throwBreadcrumbItemError('hasNext', breadcrumbItem.hasNext);\n }\n if (breadcrumbItem.isSelected && typeof breadcrumbItem.isSelected !== 'boolean') {\n throwBreadcrumbItemError('isSelected', breadcrumbItem.isSelected);\n }\n });\n\n toolbar?.forEach((toolbarItem) => {\n if (toolbarItem.type) {\n if (!isValidToolbarType(toolbarItem.type)) {\n throwToolbarItemGenericError('type', toolbarItem.type);\n }\n if (toolbarItem.componentProps && !isObject(toolbarItem.componentProps)) {\n throwToolbarItemGenericError('componentProps', toolbarItem.componentProps);\n }\n if (toolbarItem.type === 'ds-popup-menu') {\n validatePopupItem(toolbarItem.componentProps as PopupPropsT);\n }\n if (toolbarItem.type === 'ds-app-picker') {\n validateAppPickerItem(toolbarItem.componentProps as AppPickerProps);\n }\n }\n });\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,MAAM,oBAAoB,CAAC,mBAAsC;AAC/D,MAAI,eAAe,WAAW,CAAC,MAAM,QAAQ,eAAe,UAAU;AACpE,+BAA2B,WAAW,eAAe;AAAA;AAEvD,MAAI,eAAe,gBAAgB,OAAO,eAAe,iBAAiB,WAAW;AACnF,+BAA2B,gBAAgB,eAAe;AAAA;AAAA;AAI9D,MAAM,wBAAwB,CAAC,mBAAyC;AACtE,MAAI,eAAe,QAAQ,CAAC,MAAM,QAAQ,eAAe,OAAO;AAC9D,mCAA+B,QAAQ,eAAe;AAAA;AAExD,MAAI,eAAe,cAAc,CAAC,MAAM,QAAQ,eAAe,aAAa;AAC1E,mCAA+B,cAAc,eAAe;AAAA;AAE9D,MAAI,eAAe,gBAAgB,OAAO,eAAe,iBAAiB,UAAU;AAClF,mCAA+B,gBAAgB,eAAe;AAAA;AAEhE,MAAI,eAAe,sBAAsB,OAAO,eAAe,uBAAuB,UAAU;AAC9F,mCAA+B,sBAAsB,eAAe;AAAA;AAAA;AAIxE,MAAM,6BAA6B,CAAC,SAA6B;AAC/D,MAAI,KAAK,SAAS,OAAO,KAAK,UAAU,UAAU;AAChD,iCAA6B,SAAS,KAAK;AAAA;AAE7C,MAAI,KAAK,WAAW,OAAO,KAAK,YAAY,YAAY;AACtD,iCAA6B,WAAW,KAAK;AAAA;AAE/C,MAAI,KAAK,QAAQ,OAAO,KAAK,SAAS,YAAY;AAChD,QAAI,KAAK,SAAS;AAAiB;AACnC,iCAA6B,QAAQ,KAAK;AAAA;AAAA;AAIvC,MAAM,mBAAmB,CAAC,UAAoC;AACnE,QAAM,EAAE,YAAY,SAAS,MAAM,kBAAkB;AAErD,MAAI,QAAQ,OAAO,SAAS,YAAY;AACtC,mBAAe,QAAQ;AAAA;AAGzB,MAAI,iBAAiB,OAAO,kBAAkB,YAAY;AACxD,mBAAe,iBAAiB;AAAA;AAGlC,cAAY,QAAQ,CAAC,mBAAmB;AACtC,QAAI,eAAe,SAAS,OAAO,eAAe,UAAU,UAAU;AACpE,+BAAyB,SAAS,eAAe;AAAA;AAEnD,QAAI,eAAe,WAAW,OAAO,eAAe,YAAY,YAAY;AAC1E,+BAAyB,WAAW,eAAe;AAAA;AAErD,QAAI,eAAe,WAAW,OAAO,eAAe,YAAY,WAAW;AACzE,+BAAyB,WAAW,eAAe;AAAA;AAErD,QAAI,eAAe,cAAc,OAAO,eAAe,eAAe,WAAW;AAC/E,+BAAyB,cAAc,eAAe;AAAA;AAAA;AAI1D,WAAS,QAAQ,CAAC,gBAAgB;AAChC,QAAI,YAAY,MAAM;AACpB,UAAI,CAAC,mBAAmB,YAAY,OAAO;AACzC,qCAA6B,QAAQ,YAAY;AAAA;AAEnD,UAAI,YAAY,kBAAkB,CAAC,SAAS,YAAY,iBAAiB;AACvE,qCAA6B,kBAAkB,YAAY;AAAA;AAE7D,UAAI,YAAY,SAAS,iBAAiB;AACxC,0BAAkB,YAAY;AAAA;AAEhC,UAAI,YAAY,SAAS,iBAAiB;AACxC,8BAAsB,YAAY;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
const breadcrumbProps = {
|
|
3
|
-
label: "string",
|
|
4
|
-
onClick: "function",
|
|
5
|
-
hasNext: "boolean",
|
|
6
|
-
isSelected: "boolean"
|
|
7
|
-
};
|
|
8
|
-
const toolbarProps = {
|
|
9
|
-
label: "string",
|
|
10
|
-
type: '"ds-app-picker" or "ds-popup-menu" or "ds-search-toggle"',
|
|
11
|
-
componentProps: "object",
|
|
12
|
-
Icon: "react component",
|
|
13
|
-
onClick: "function",
|
|
14
|
-
options: "array",
|
|
15
|
-
closeOnClick: "boolean",
|
|
16
|
-
apps: "array",
|
|
17
|
-
customApps: "array",
|
|
18
|
-
sectionTitle: "string",
|
|
19
|
-
customSectionTitle: "string"
|
|
20
|
-
};
|
|
21
|
-
const isObject = (obj) => typeof obj === "object" && !!obj && !Array.isArray(obj);
|
|
22
|
-
const getVariableType = (arg) => {
|
|
23
|
-
if (Array.isArray(arg))
|
|
24
|
-
return "array";
|
|
25
|
-
if (arg === null)
|
|
26
|
-
return "null";
|
|
27
|
-
if (arg === void 0)
|
|
28
|
-
return "undefined";
|
|
29
|
-
return typeof arg;
|
|
30
|
-
};
|
|
31
|
-
const isValidToolbarType = (string) => string === "ds-app-picker" || string === "ds-popup-menu" || string === "ds-search-toggle" || string === "custom";
|
|
32
|
-
const throwBreadcrumbItemError = (validPropKey, invalidProp) => {
|
|
33
|
-
throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a breadcrumb item, please provide a valid type.
|
|
34
|
-
|
|
35
|
-
Received: ${invalidProp} (${typeof invalidProp})
|
|
36
|
-
Expected: (${breadcrumbProps[validPropKey]})
|
|
37
|
-
`);
|
|
38
|
-
};
|
|
39
|
-
const throwToolbarPopupItemError = (validPropKey, invalidProp) => {
|
|
40
|
-
throw new Error(`You are trying to pass a not valid "${validPropKey}" property inside componentProps for a ds-popup-menu
|
|
41
|
-
toolbar item, please provide a valid type.
|
|
42
|
-
|
|
43
|
-
Received: ${invalidProp} (${getVariableType(invalidProp)})
|
|
44
|
-
Expected: (${toolbarProps[validPropKey]})
|
|
45
|
-
`);
|
|
46
|
-
};
|
|
47
|
-
const throwToolbarAppPickerItemError = (validPropKey, invalidProp) => {
|
|
48
|
-
throw new Error(`You are trying to pass a not valid "${validPropKey}" property inside componentProps for a ds-app-picker
|
|
49
|
-
toolbar item, please provide a valid type.
|
|
50
|
-
|
|
51
|
-
Received: ${invalidProp} (${getVariableType(invalidProp)})
|
|
52
|
-
Expected: (${toolbarProps[validPropKey]})
|
|
53
|
-
`);
|
|
54
|
-
};
|
|
55
|
-
const throwToolbarItemGenericError = (validPropKey, invalidProp) => {
|
|
56
|
-
throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a toolbar item, please provide a valid type.
|
|
57
|
-
|
|
58
|
-
Received: ${invalidProp} (${getVariableType(invalidProp)})
|
|
59
|
-
Expected: (${toolbarProps[validPropKey]})
|
|
60
|
-
`);
|
|
61
|
-
};
|
|
62
|
-
const throwLogoError = (validPropKey, invalidProp) => {
|
|
63
|
-
throw new Error(`You are trying to pass a not valid "${validPropKey}" property for a global header,
|
|
64
|
-
remember to provide both Logo and LogoWithBrand properties with a valid type.
|
|
65
|
-
|
|
66
|
-
Received: ${invalidProp} (${getVariableType(invalidProp)}).
|
|
67
|
-
Expected: (react component).
|
|
68
|
-
`);
|
|
69
|
-
};
|
|
70
|
-
export {
|
|
71
|
-
breadcrumbProps,
|
|
72
|
-
getVariableType,
|
|
73
|
-
isObject,
|
|
74
|
-
isValidToolbarType,
|
|
75
|
-
throwBreadcrumbItemError,
|
|
76
|
-
throwLogoError,
|
|
77
|
-
throwToolbarAppPickerItemError,
|
|
78
|
-
throwToolbarItemGenericError,
|
|
79
|
-
throwToolbarPopupItemError,
|
|
80
|
-
toolbarProps
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=validateHelpers.js.map
|