@elliemae/ds-global-header 3.0.0-next.46 → 3.0.0-next.49

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.
Files changed (53) hide show
  1. package/dist/cjs/GlobalHeader.js +9 -16
  2. package/dist/cjs/GlobalHeader.js.map +1 -1
  3. package/dist/cjs/GlobalHeaderContainer.js +9 -16
  4. package/dist/cjs/GlobalHeaderContainer.js.map +1 -1
  5. package/dist/cjs/GlobalHeaderContext.js +9 -16
  6. package/dist/cjs/GlobalHeaderContext.js.map +1 -1
  7. package/dist/cjs/GlobalHeaderTypes.js +9 -16
  8. package/dist/cjs/GlobalHeaderTypes.js.map +1 -1
  9. package/dist/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js +9 -16
  10. package/dist/cjs/components/Breadcrumb/GlobalHeaderBreadcrumb.js.map +1 -1
  11. package/dist/cjs/components/Breadcrumb/PureBreadcrumb.js +9 -16
  12. package/dist/cjs/components/Breadcrumb/PureBreadcrumb.js.map +1 -1
  13. package/dist/cjs/components/Breadcrumb/styles.js +9 -16
  14. package/dist/cjs/components/Breadcrumb/styles.js.map +1 -1
  15. package/dist/cjs/components/Title/GlobalHeaderTitle.js +9 -16
  16. package/dist/cjs/components/Title/GlobalHeaderTitle.js.map +1 -1
  17. package/dist/cjs/components/Toolbar/GlobalHeaderToolbar.js +9 -16
  18. package/dist/cjs/components/Toolbar/GlobalHeaderToolbar.js.map +1 -1
  19. package/dist/cjs/components/Toolbar/ToolbarItems.js +9 -16
  20. package/dist/cjs/components/Toolbar/ToolbarItems.js.map +1 -1
  21. package/dist/cjs/components/Toolbar/styles.js +9 -16
  22. package/dist/cjs/components/Toolbar/styles.js.map +1 -1
  23. package/dist/cjs/config/useGetPropsWithDefaults.js +9 -16
  24. package/dist/cjs/config/useGetPropsWithDefaults.js.map +1 -1
  25. package/dist/cjs/config/useGlobalHeader.js +9 -16
  26. package/dist/cjs/config/useGlobalHeader.js.map +1 -1
  27. package/dist/cjs/config/useValidateProps.js +9 -16
  28. package/dist/cjs/config/useValidateProps.js.map +1 -1
  29. package/dist/cjs/config/validateHelpers.js +9 -16
  30. package/dist/cjs/config/validateHelpers.js.map +1 -1
  31. package/dist/cjs/defaultProps.js +9 -16
  32. package/dist/cjs/defaultProps.js.map +1 -1
  33. package/dist/cjs/index.js +11 -17
  34. package/dist/cjs/index.js.map +1 -1
  35. package/dist/cjs/outOfTheBox/AppPicker/AppPicker.js +9 -16
  36. package/dist/cjs/outOfTheBox/AppPicker/AppPicker.js.map +1 -1
  37. package/dist/cjs/outOfTheBox/PopupMenu/PopupMenu.js +9 -16
  38. package/dist/cjs/outOfTheBox/PopupMenu/PopupMenu.js.map +1 -1
  39. package/dist/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js +9 -16
  40. package/dist/cjs/outOfTheBox/PopupMenu/PopupMenuContent.js.map +1 -1
  41. package/dist/cjs/outOfTheBox/PopupMenu/styles.js +9 -16
  42. package/dist/cjs/outOfTheBox/PopupMenu/styles.js.map +1 -1
  43. package/dist/cjs/outOfTheBox/SearchToggle/SearchToggle.js +9 -16
  44. package/dist/cjs/outOfTheBox/SearchToggle/SearchToggle.js.map +1 -1
  45. package/dist/cjs/outOfTheBox/SearchToggle/styles.js +9 -16
  46. package/dist/cjs/outOfTheBox/SearchToggle/styles.js.map +1 -1
  47. package/dist/cjs/outOfTheBox/index.js +13 -19
  48. package/dist/cjs/outOfTheBox/index.js.map +1 -1
  49. package/dist/cjs/propTypes.js +9 -16
  50. package/dist/cjs/propTypes.js.map +1 -1
  51. package/dist/cjs/styles.js +9 -16
  52. package/dist/cjs/styles.js.map +1 -1
  53. package/package.json +8 -8
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/Toolbar/ToolbarItems.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* 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-utilities';\n\nexport const ToolbarItems = (): JSX.Element => {\n const {\n props: { toolbar },\n instanceUID,\n } = useContext(GlobalHeaderContext);\n\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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAA2C;AAC3C,yBAAmD;AACnD,oBAAuB;AACvB,iCAAoC;AACpC,0BAA6B;AAEtB,MAAM,eAAe,MAAmB;AAC7C,QAAM;AAAA,IACJ,OAAO,EAAE;AAAA,IACT;AAAA,M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A,IACT;AAAA,MACE,6BAAW,8CAAmB;AAElC,QAAM,YAAY,0BAChB,MACE,SAAS,IAAI,CAAC,SAAS;AACrB,UAAuG,WAA/F,QAAM,MAAM,SAAS,gBAAgB,OAAO,YAAY,IAAI,oBAAmC,IAAf,uBAAe,IAAf,CAAhF,QAAM,QAAM,WAAS,kBAAgB,SAAO,cAAY,MAAI;AAEpE,YAAQ;AAAA,WACD;AACH,eACE,mDAAC;AAAA,UACC,OAAO;AAAA,UACP;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,KAAK,GAAG,6BAA6B;AAAA,WACjC,aAPL;AAAA,UAQC;AAAA,UACF;AAAA,WAEC;AACH,eACE,mDAAC;AAAA,UACC;AAAA,UACA,KAAK,GAAG,6BAA6B;AAAA,UACrC;AAAA,UACA;AAAA,WACI,WACN;AAAA,WAEC;AACH,eACE,mDAAC;AAAA,UACC,KAAK,GAAG,gCAAgC;AAAA,UACxC;AAAA,UACA;AAAA,WACI,WACN;AAAA,WAEC;AACH,YAAI;AAAiB,iBAAO,mDAAC;AAAA,YAAgB;AAAA,WAAY;AACzD,eAAO;AAAA;AAEP,eACE,mDAAC;AAAA,UACC;AAAA,UACA,KAAK,GAAG,iCAAiC;AAAA,UACzC,OAAO;AAAA,UACP,eAAY;AAAA,UACZ;AAAA,WACI,sCAAa,UAAU,IAE3B,mDAAC;AAAA,UAAK,MAAK;AAAA,UAAO,MAAK;AAAA,SAAI,CAC7B;AAAA;AAAA,EAGR,CAAC,GACH,CAAC,SAAS,WAAW,CACvB;AAEA,SAAO,wFAAG,SAAU;AACtB;",
6
6
  "names": []
7
7
  }
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var styles_exports = {};
29
22
  __export(styles_exports, {
30
23
  Button: () => Button
31
24
  });
25
+ module.exports = __toCommonJS(styles_exports);
32
26
  var React = __toESM(require("react"));
33
27
  var import_styled_components = __toESM(require("styled-components"));
34
28
  const Button = import_styled_components.default.button`
@@ -57,5 +51,4 @@ const Button = import_styled_components.default.button`
57
51
  }
58
52
  }
59
53
  `;
60
- module.exports = __toCommonJS(styles_exports);
61
54
  //# sourceMappingURL=styles.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/Toolbar/styles.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AAEZ,MAAM,SAAS,iCAAO;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;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AAEZ,MAAM,SAAS,iCAAO;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
6
  "names": []
7
7
  }
@@ -18,31 +18,25 @@ var __spreadValues = (a, b) => {
18
18
  }
19
19
  return a;
20
20
  };
21
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
21
  var __export = (target, all) => {
23
22
  for (var name in all)
24
23
  __defProp(target, name, { get: all[name], enumerable: true });
25
24
  };
26
- var __reExport = (target, module2, copyDefault, desc) => {
27
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
28
- for (let key of __getOwnPropNames(module2))
29
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
30
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
25
+ var __copyProps = (to, from, except, desc) => {
26
+ if (from && typeof from === "object" || typeof from === "function") {
27
+ for (let key of __getOwnPropNames(from))
28
+ if (!__hasOwnProp.call(to, key) && key !== except)
29
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
31
30
  }
32
- return target;
31
+ return to;
33
32
  };
34
- var __toESM = (module2, isNodeMode) => {
35
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
36
- };
37
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
38
- return (module2, temp) => {
39
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
40
- };
41
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
33
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
34
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
42
35
  var useGetPropsWithDefaults_exports = {};
43
36
  __export(useGetPropsWithDefaults_exports, {
44
37
  useGetPropsWithDefaults: () => useGetPropsWithDefaults
45
38
  });
39
+ module.exports = __toCommonJS(useGetPropsWithDefaults_exports);
46
40
  var React = __toESM(require("react"));
47
41
  var import_react = require("react");
48
42
  var import_defaultProps = require("../defaultProps");
@@ -50,5 +44,4 @@ const useGetPropsWithDefaults = (props) => {
50
44
  const { toolbar, breadcrumb, Logo, LogoWithBrand } = props;
51
45
  return (0, import_react.useMemo)(() => __spreadValues(__spreadValues({}, import_defaultProps.defaultProps), props), [toolbar, breadcrumb, Logo, LogoWithBrand]);
52
46
  };
53
- module.exports = __toCommonJS(useGetPropsWithDefaults_exports);
54
47
  //# sourceMappingURL=useGetPropsWithDefaults.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useGetPropsWithDefaults.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAwB;AAExB,0BAA6B;AAEtB,MAAM,0BAA0B,CAAC,UAAkD;AACxF,QAAM,EAAE,SAAS,YAAY,MAAM,kBAAkB;AAErD,SAAO,0BACL,MAAO,kCACF,mCACA,QAEL,CAAC,SAAS,YAAY,MAAM,aAAa,CAC3C;AACF;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAwB;AAExB,0BAA6B;AAEtB,MAAM,0BAA0B,CAAC,UAAkD;AACxF,QAAM,EAAE,SAAS,YAAY,MAAM,kBAAkB;AAErD,SAAO,0BACL,MAAO,kCACF,mCACA,QAEL,CAAC,SAAS,YAAY,MAAM,aAAa,CAC3C;AACF;",
6
6
  "names": []
7
7
  }
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var useGlobalHeader_exports = {};
29
22
  __export(useGlobalHeader_exports, {
30
23
  useGlobalHeader: () => useGlobalHeader
31
24
  });
25
+ module.exports = __toCommonJS(useGlobalHeader_exports);
32
26
  var React = __toESM(require("react"));
33
27
  var import_react = __toESM(require("react"));
34
28
  var import_uid = require("uid");
@@ -49,5 +43,4 @@ const useGlobalHeader = (props) => {
49
43
  }), [propsWithDefaults, showIconOnly, instanceUID, globalHeaderToolbarGrid, globalHeaderBreadcrumbGrid]);
50
44
  return ctx;
51
45
  };
52
- module.exports = __toCommonJS(useGlobalHeader_exports);
53
46
  //# sourceMappingURL=useGlobalHeader.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useGlobalHeader.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyC;AACzC,iBAAoB;AAEpB,qCAAwC;AAEjC,MAAM,kBAAkB,CAAC,UAAwC;AACtE,QAAM,CAAC,cAAc,mBAAmB,2BAAkB,KAAK;AAE/D,QAAM,cAAc,0BAAQ,MAAM,oBAAI,CAAC,GAAG,CAAC,CAAC;AAE5C,QAAM,0BAA0B,0BAAQ,MAAM,IAAI,MAAM,OAAO,SAAS,UAAU,CAAC,EAAE,KAAK,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC;AAClH,QAAM,6BAA6B,0BACjC,MAAM,CAAC,QAAQ,GAAG,IAAI,MAAM,OAAO,YAAY,UAAU,CAAC,EAAE,KAAK,MAAM,GAAG,KAAK,GAC/E,CAAC,MAAM,UAAU,CACnB;AAEA,QAAM,oBAAoB,4DAAwB,KAAK;AAEvD,QAAM,MAAM,qBAAM,QAChB,MAAO;AAAA,IACL,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IACA,CAAC,mBAAmB,cAAc,aAAa,yBAAyB,0BAA0B,CACpG;AAEA,SAAO;AACT;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAyC;AACzC,iBAAoB;AAEpB,qCAAwC;AAEjC,MAAM,kBAAkB,CAAC,UAAwC;AACtE,QAAM,CAAC,cAAc,mBAAmB,2BAAkB,KAAK;AAE/D,QAAM,cAAc,0BAAQ,MAAM,oBAAI,CAAC,GAAG,CAAC,CAAC;AAE5C,QAAM,0BAA0B,0BAAQ,MAAM,IAAI,MAAM,OAAO,SAAS,UAAU,CAAC,EAAE,KAAK,MAAM,GAAG,CAAC,MAAM,OAAO,CAAC;AAClH,QAAM,6BAA6B,0BACjC,MAAM,CAAC,QAAQ,GAAG,IAAI,MAAM,OAAO,YAAY,UAAU,CAAC,EAAE,KAAK,MAAM,GAAG,KAAK,GAC/E,CAAC,MAAM,UAAU,CACnB;AAEA,QAAM,oBAAoB,4DAAwB,KAAK;AAEvD,QAAM,MAAM,qBAAM,QAChB,MAAO;AAAA,IACL,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IACA,CAAC,mBAAmB,cAAc,aAAa,yBAAyB,0BAA0B,CACpG;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var useValidateProps_exports = {};
29
22
  __export(useValidateProps_exports, {
30
23
  useValidateProps: () => useValidateProps
31
24
  });
25
+ module.exports = __toCommonJS(useValidateProps_exports);
32
26
  var React = __toESM(require("react"));
33
27
  var import_validateHelpers = require("./validateHelpers");
34
28
  const validatePopupItem = (componentProps) => {
@@ -105,5 +99,4 @@ const useValidateProps = (props) => {
105
99
  }
106
100
  });
107
101
  };
108
- module.exports = __toCommonJS(useValidateProps_exports);
109
102
  //# sourceMappingURL=useValidateProps.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/useValidateProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,6BAQO;AAEP,MAAM,oBAAoB,CAAC,mBAAsC;AAC/D,MAAI,eAAe,WAAW,CAAC,MAAM,QAAQ,eAAe,OAAO,GAAG;AACpE,2DAA2B,WAAW,eAAe,OAAO;AAAA,EAC9D;AACA,MAAI,eAAe,gBAAgB,OAAO,eAAe,iBAAiB,WAAW;AACnF,2DAA2B,gBAAgB,eAAe,YAAY;AAAA,EACxE;AACF;AAEA,MAAM,wBAAwB,CAAC,mBAAyC;AACtE,MAAI,eAAe,QAAQ,CAAC,MAAM,QAAQ,eAAe,IAAI,GAAG;AAC9D,+DAA+B,QAAQ,eAAe,IAAI;AAAA,EAC5D;AACA,MAAI,eAAe,cAAc,CAAC,MAAM,QAAQ,eAAe,UAAU,GAAG;AAC1E,+DAA+B,cAAc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BAAkB,YAAY,cAAc;AAAA,MAC3E;AACA,UAAI,YAAY,SAAS,iBAAiB;AACxC,0BAAkB,YAAY,cAA6B;AAAA,MAC7D;AACA,UAAI,YAAY,SAAS,iBAAiB;AACxC,8BAAsB,YAAY,cAAgC;AAAA,MACpE;AAAA,IACF;AAAA,EACF,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var validateHelpers_exports = {};
29
22
  __export(validateHelpers_exports, {
30
23
  breadcrumbProps: () => breadcrumbProps,
@@ -38,6 +31,7 @@ __export(validateHelpers_exports, {
38
31
  throwToolbarPopupItemError: () => throwToolbarPopupItemError,
39
32
  toolbarProps: () => toolbarProps
40
33
  });
34
+ module.exports = __toCommonJS(validateHelpers_exports);
41
35
  var React = __toESM(require("react"));
42
36
  const breadcrumbProps = {
43
37
  label: "string",
@@ -107,5 +101,4 @@ const throwLogoError = (validPropKey, invalidProp) => {
107
101
  Expected: (react component).
108
102
  `);
109
103
  };
110
- module.exports = __toCommonJS(validateHelpers_exports);
111
104
  //# sourceMappingURL=validateHelpers.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/config/validateHelpers.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const breadcrumbProps = {\n label: 'string',\n onClick: 'function',\n hasNext: 'boolean',\n isSelected: 'boolean',\n};\n\nexport const toolbarProps = {\n label: 'string',\n type: '\"ds-app-picker\" or \"ds-popup-menu\" or \"ds-search-toggle\"',\n componentProps: 'object',\n Icon: 'react component',\n onClick: 'function',\n options: 'array',\n closeOnClick: 'boolean',\n apps: 'array',\n customApps: 'array',\n sectionTitle: 'string',\n customSectionTitle: 'string',\n};\n\nexport const isObject = (obj: unknown): boolean => typeof obj === 'object' && !!obj && !Array.isArray(obj);\n\nexport const getVariableType = (arg: unknown): string => {\n if (Array.isArray(arg)) return 'array';\n if (arg === null) return 'null';\n if (arg === undefined) return 'undefined';\n return typeof arg;\n};\n\nexport const isValidToolbarType = (string: unknown): boolean =>\n string === 'ds-app-picker' || string === 'ds-popup-menu' || string === 'ds-search-toggle' || string === 'custom';\n\nexport const throwBreadcrumbItemError = (validPropKey: keyof typeof breadcrumbProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a breadcrumb item, please provide a valid type.\n\n Received: ${invalidProp} (${typeof invalidProp})\n Expected: (${breadcrumbProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarPopupItemError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property inside componentProps for a ds-popup-menu \n toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarAppPickerItemError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property inside componentProps for a ds-app-picker \n toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwToolbarItemGenericError = (validPropKey: keyof typeof toolbarProps, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a toolbar item, please provide a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)})\n Expected: (${toolbarProps[validPropKey]})\n `,\n );\n};\n\nexport const throwLogoError = (validPropKey: string, invalidProp: unknown): void => {\n throw new Error(\n `You are trying to pass a not valid \"${validPropKey}\" property for a global header, \n remember to provide both Logo and LogoWithBrand properties with a valid type.\n\n Received: ${invalidProp} (${getVariableType(invalidProp)}).\n Expected: (react component).\n `,\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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ACjH,QAAM,IAAI,MACR,uCAAuC;AAAA;AAAA;AAAA,cAG7B,gBAAgB,gBAAgB,WAAW;AAAA,eAC1C,aAAa;AAAA,GAE1B;AACF;AAEO,MAAM,iCAAiC,CAAC,cAAyC,gBAA+B;AACrH,QAAM,IAAI,MACR,uCAAuC;AAAA;AAAA;AAAA,cAG7B,gBAAgB,gBAAgB,WAAW;AAAA,eAC1C,aAAa;AAAA,GAE1B;AACF;AAEO,MAAM,+BAA+B,CAAC,cAAyC,gBAA+B;AACnH,QAAM,IAAI,MACR,uCAAuC;AAAA;AAAA,cAE7B,gBAAgB,gBAAgB,WAAW;AAAA,eAC1C,aAAa;AAAA,GAE1B;AACF;AAEO,MAAM,iBAAiB,CAAC,cAAsB,gBAA+B;AAClF,QAAM,IAAI,MACR,uCAAuC;AAAA;AAAA;AAAA,cAG7B,gBAAgB,gBAAgB,WAAW;AAAA;AAAA,GAGvD;AACF;",
6
6
  "names": []
7
7
  }
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var defaultProps_exports = {};
29
22
  __export(defaultProps_exports, {
30
23
  defaultProps: () => defaultProps
31
24
  });
25
+ module.exports = __toCommonJS(defaultProps_exports);
32
26
  var React = __toESM(require("react"));
33
27
  const emptyComp = () => null;
34
28
  const defaultProps = {
@@ -37,5 +31,4 @@ const defaultProps = {
37
31
  LogoWithBrand: emptyComp,
38
32
  Logo: emptyComp
39
33
  };
40
- module.exports = __toCommonJS(defaultProps_exports);
41
34
  //# sourceMappingURL=defaultProps.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/defaultProps.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type { GlobalHeaderPropsT } from './GlobalHeaderTypes';\n\nconst emptyComp = () => null;\n\nexport const defaultProps: GlobalHeaderPropsT = {\n breadcrumb: [],\n toolbar: [],\n LogoWithBrand: emptyComp,\n Logo: emptyComp,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,MAAM,YAAY,MAAM;AAEjB,MAAM,eAAmC;AAAA,EAC9C,YAAY,CAAC;AAAA,EACb,SAAS,CAAC;AAAA,EACV,eAAe;AAAA,EACf,MAAM;AACR;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,MAAM,YAAY,MAAM;AAEjB,MAAM,eAAmC;AAAA,EAC9C,YAAY,CAAC;AAAA,EACb,SAAS,CAAC;AAAA,EACV,eAAe;AAAA,EACf,MAAM;AACR;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -4,33 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
22
  var src_exports = {};
29
23
  __export(src_exports, {
30
24
  default: () => import_GlobalHeader.GlobalHeader
31
25
  });
26
+ module.exports = __toCommonJS(src_exports);
32
27
  var React = __toESM(require("react"));
33
- __reExport(src_exports, require("./GlobalHeader"));
28
+ __reExport(src_exports, require("./GlobalHeader"), module.exports);
34
29
  var import_GlobalHeader = require("./GlobalHeader");
35
- module.exports = __toCommonJS(src_exports);
36
30
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export * from './GlobalHeader';\nexport { GlobalHeader as default } from './GlobalHeader';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,0BAAwC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,2BAAd;AACA,0BAAwC;",
6
6
  "names": []
7
7
  }
@@ -18,7 +18,6 @@ var __spreadValues = (a, b) => {
18
18
  }
19
19
  return a;
20
20
  };
21
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
21
  var __objRest = (source, exclude) => {
23
22
  var target = {};
24
23
  for (var prop in source)
@@ -35,26 +34,21 @@ var __export = (target, all) => {
35
34
  for (var name in all)
36
35
  __defProp(target, name, { get: all[name], enumerable: true });
37
36
  };
38
- var __reExport = (target, module2, copyDefault, desc) => {
39
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
40
- for (let key of __getOwnPropNames(module2))
41
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
42
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
37
+ var __copyProps = (to, from, except, desc) => {
38
+ if (from && typeof from === "object" || typeof from === "function") {
39
+ for (let key of __getOwnPropNames(from))
40
+ if (!__hasOwnProp.call(to, key) && key !== except)
41
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
43
42
  }
44
- return target;
45
- };
46
- var __toESM = (module2, isNodeMode) => {
47
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
43
+ return to;
48
44
  };
49
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
50
- return (module2, temp) => {
51
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
52
- };
53
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
45
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
46
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
54
47
  var AppPicker_exports = {};
55
48
  __export(AppPicker_exports, {
56
49
  AppPicker: () => AppPicker
57
50
  });
51
+ module.exports = __toCommonJS(AppPicker_exports);
58
52
  var React = __toESM(require("react"));
59
53
  var import_react = __toESM(require("react"));
60
54
  var import_ds_app_picker = require("@elliemae/ds-app-picker");
@@ -135,5 +129,4 @@ const AppPicker = (_a) => {
135
129
  triggerRef
136
130
  });
137
131
  };
138
- module.exports = __toCommonJS(AppPicker_exports);
139
132
  //# sourceMappingURL=AppPicker.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/outOfTheBox/AppPicker/AppPicker.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React, { useState, useRef, useCallback, useMemo } from 'react';\nimport { DSAppPicker } from '@elliemae/ds-app-picker';\nimport { mergeRefs } from '@elliemae/ds-utilities';\nimport { MenuPicker } from '@elliemae/ds-icons';\nimport { getDataProps } from '@elliemae/ds-utilities';\nimport { Button } from '../../components/Toolbar/styles';\n\ntype AppPickerProps = React.ComponentProps<typeof DSAppPicker>;\n\nexport const AppPicker = ({\n label,\n id,\n componentProps,\n ...otherProps\n}: AppPickerProps & {\n label: string;\n triggerOnClick?: React.MouseEventHandler;\n}): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n const {\n apps,\n icon,\n customApps,\n sectionTitle,\n customSectionTitle,\n actionRef,\n isOpen: userIsOpen,\n onKeyDown: userOnKeyDown,\n onClickOutside: userOnClickOutside,\n renderTrigger: userRenderTrigger,\n onClose,\n triggerRef,\n triggerOnClick,\n } = componentProps;\n\n const handleTriggerKeyDown: React.KeyboardEventHandler = useCallback((e) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n setIsOpen(true);\n }\n }, []);\n\n const handleAppPickerOnKeyDown: AppPickerProps['onKeyDown'] = useCallback((e) => {\n if (e.code === 'Escape') {\n setIsOpen(false);\n buttonRef?.current?.focus();\n }\n }, []);\n\n const handleOnClickOutside: AppPickerProps['onClickOutside'] = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n const handleOnClick: React.MouseEventHandler = useCallback(() => {\n setIsOpen(true);\n }, []);\n\n const renderTrigger: AppPickerProps['renderTrigger'] = useMemo(\n () =>\n ({ ref }) =>\n (\n <div ref={ref}>\n <Button\n onClick={triggerOnClick ?? handleOnClick}\n onKeyDown={handleTriggerKeyDown}\n ref={mergeRefs(buttonRef, triggerRef)}\n title={label}\n data-testid=\"gh-toolbar-item\"\n id={id}\n {...getDataProps(otherProps)}\n >\n <MenuPicker fill=\"#FFF\" width={20.73} height={20.73} />\n </Button>\n </div>\n ),\n [triggerOnClick, handleOnClick, handleTriggerKeyDown, triggerRef, label, id, otherProps],\n );\n\n return (\n <DSAppPicker\n apps={apps}\n customApps={customApps}\n sectionTitle={sectionTitle}\n customSectionTitle={customSectionTitle}\n icon={icon}\n onKeyDown={userOnKeyDown ?? handleAppPickerOnKeyDown}\n actionRef={actionRef}\n onClickOutside={userOnClickOutside ?? handleOnClickOutside}\n renderTrigger={userRenderTrigger ?? renderTrigger}\n isOpen={userIsOpen ?? isOpen}\n onClose={onClose}\n triggerRef={triggerRef}\n />\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA8D;AAC9D,2BAA4B;AAC5B,0BAA0B;AAC1B,sBAA2B;AAC3B,2BAA6B;AAC7B,oBAAuB;AAIhB,MAAM,YAAY,CAAC,OAQP;AARO,eACxB;AAAA;AAAA,IACA;AAAA,IACA;AAAA,MAHwB,IAIrB,uBAJqB,IAIrB;AAAA,IAHH;AAAA,IACA;AAAA,IACA;AAAA;AAMA,QAAM,CAAC,QAAQ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gBAAiD,0BACrD,MACE,CAAC,EAAE,UAEC,mDAAC;AAAA,IAAI;AAAA,KACH,mDAAC;AAAA,IACC,SAAS,kBAAkB;AAAA,IAC3B,WAAW;AAAA,IACX,KAAK,mCAAU,WAAW,UAAU;AAAA,IACpC,OAAO;AAAA,IACP,eAAY;AAAA,IACZ;AAAA,KACI,uCAAa,UAAU,IAE3B,mDAAC;AAAA,IAAW,MAAK;AAAA,IAAO,OAAO;AAAA,IAAO,QAAQ;AAAA,GAAO,CACvD,CACF,GAEN,CAAC,gBAAgB,eAAe,sBAAsB,YAAY,OAAO,IAAI,UAAU,CACzF;AAEA,SACE,mDAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW,iBAAiB;AAAA,IAC5B;AAAA,IACA,gBAAgB,sBAAsB;AAAA,IACtC,eAAe,qBAAqB;AAAA,IACpC,QAAQ,cAAc;AAAA,IACtB;AAAA,IACA;AAAA,GACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -18,7 +18,6 @@ var __spreadValues = (a, b) => {
18
18
  }
19
19
  return a;
20
20
  };
21
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
21
  var __objRest = (source, exclude) => {
23
22
  var target = {};
24
23
  for (var prop in source)
@@ -35,26 +34,21 @@ var __export = (target, all) => {
35
34
  for (var name in all)
36
35
  __defProp(target, name, { get: all[name], enumerable: true });
37
36
  };
38
- var __reExport = (target, module2, copyDefault, desc) => {
39
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
40
- for (let key of __getOwnPropNames(module2))
41
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
42
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
37
+ var __copyProps = (to, from, except, desc) => {
38
+ if (from && typeof from === "object" || typeof from === "function") {
39
+ for (let key of __getOwnPropNames(from))
40
+ if (!__hasOwnProp.call(to, key) && key !== except)
41
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
43
42
  }
44
- return target;
45
- };
46
- var __toESM = (module2, isNodeMode) => {
47
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
43
+ return to;
48
44
  };
49
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
50
- return (module2, temp) => {
51
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
52
- };
53
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
45
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
46
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
54
47
  var PopupMenu_exports = {};
55
48
  __export(PopupMenu_exports, {
56
49
  PopupMenu: () => PopupMenu
57
50
  });
51
+ module.exports = __toCommonJS(PopupMenu_exports);
58
52
  var React = __toESM(require("react"));
59
53
  var import_react = __toESM(require("react"));
60
54
  var import_ds_popperjs = require("@elliemae/ds-popperjs");
@@ -118,5 +112,4 @@ const PopupMenu = (_a) => {
118
112
  onClickOutside
119
113
  }, content));
120
114
  };
121
- module.exports = __toCommonJS(PopupMenu_exports);
122
115
  //# sourceMappingURL=PopupMenu.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/outOfTheBox/PopupMenu/PopupMenu.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React, { useState, useCallback, useMemo } from 'react';\nimport { DSPopperJS } from '@elliemae/ds-popperjs';\nimport { PopupMenuContent } from './PopupMenuContent';\nimport { Button } from '../../components/Toolbar/styles';\nimport { getDataProps } from '@elliemae/ds-utilities';\nimport type { PopupPropsT as Props } from '../../GlobalHeaderTypes';\n\nexport const PopupMenu = ({ Icon, title, onClick, id, componentProps, ...otherProps }: Props): JSX.Element => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const [buttonRef, setButtonRef] = useState<HTMLButtonElement | null>(null);\n\n const {\n onClickOutside = () => null,\n onKeyPress,\n popupOnKeyPress,\n isOpen: userIsOpen,\n options,\n closeOnClick,\n } = componentProps;\n\n const handleKeyPress = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.code === 'Enter' || e.code === 'Space') {\n setIsOpen(true);\n }\n if (onKeyPress) onKeyPress(e);\n },\n [onKeyPress],\n );\n\n const handleOnClose = useCallback(() => {\n if (userIsOpen === undefined) {\n setIsOpen(false);\n }\n buttonRef?.focus();\n }, [buttonRef, userIsOpen]);\n\n const handleTriggerOnClick = useCallback(\n (e) => {\n if (userIsOpen === undefined) setIsOpen(true);\n onClick(e);\n },\n [onClick, userIsOpen],\n );\n\n const handleItemClick = useCallback(() => {\n if (closeOnClick && userIsOpen === undefined) handleOnClose();\n }, [closeOnClick, handleOnClose, userIsOpen]);\n\n const content = useMemo(\n () => (\n <PopupMenuContent\n options={options}\n onItemClick={handleItemClick}\n onClose={handleOnClose}\n popupOnKeyPress={popupOnKeyPress}\n />\n ),\n [options, handleItemClick, handleOnClose, popupOnKeyPress],\n );\n\n return (\n <div>\n <Button\n onClick={handleTriggerOnClick}\n onKeyPress={handleKeyPress}\n title={title}\n ref={setButtonRef}\n data-testid=\"gh-toolbar-item\"\n id={id}\n {...getDataProps(otherProps)}\n >\n {Icon && <Icon fill=\"#FFF\" size=\"m\" />}\n </Button>\n <DSPopperJS\n referenceElement={buttonRef}\n showPopover={userIsOpen ?? isOpen}\n closeContextMenu={handleOnClose}\n onClickOutside={onClickOutside}\n >\n {content}\n </DSPopperJS>\n </div>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;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