@nypl/design-system-react-components 1.6.0-vite-rc-2 → 1.6.0-vite-rc-4

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 (42) hide show
  1. package/README.md +9 -21
  2. package/dist/design-system-react-components.cjs +90 -96
  3. package/dist/design-system-react-components.js +21491 -23947
  4. package/dist/src/components/Icons/IconSvgs.d.ts +6 -0
  5. package/dist/src/components/Link/Link.d.ts +2 -0
  6. package/dist/src/components/List/List.d.ts +3 -2
  7. package/dist/src/components/Logo/Logo.d.ts +3 -2
  8. package/dist/src/components/Logo/logoVariables.d.ts +2 -0
  9. package/dist/src/components/StyleGuide/ColorCard.d.ts +3 -3
  10. package/dist/src/index.d.ts +1 -3
  11. package/dist/src/theme/components/breadcrumb.d.ts +13 -0
  12. package/dist/src/theme/components/select.d.ts +1 -0
  13. package/dist/src/theme/components/textInput.d.ts +6 -0
  14. package/package.json +15 -17
  15. package/dist/src/components/Footer/Footer.d.ts +0 -14
  16. package/dist/src/components/Footer/footerLinks.d.ts +0 -12
  17. package/dist/src/components/Header/Header.d.ts +0 -21
  18. package/dist/src/components/Header/components/HeaderLogin.d.ts +0 -12
  19. package/dist/src/components/Header/components/HeaderLoginButton.d.ts +0 -10
  20. package/dist/src/components/Header/components/HeaderLowerNav.d.ts +0 -6
  21. package/dist/src/components/Header/components/HeaderMobileIconNav.d.ts +0 -6
  22. package/dist/src/components/Header/components/HeaderMobileNav.d.ts +0 -6
  23. package/dist/src/components/Header/components/HeaderMobileNavButton.d.ts +0 -6
  24. package/dist/src/components/Header/components/HeaderSearchButton.d.ts +0 -9
  25. package/dist/src/components/Header/components/HeaderSearchForm.d.ts +0 -10
  26. package/dist/src/components/Header/components/HeaderSitewideAlerts.d.ts +0 -7
  27. package/dist/src/components/Header/components/HeaderUpperNav.d.ts +0 -7
  28. package/dist/src/components/Header/context/headerContext.d.ts +0 -13
  29. package/dist/src/components/Header/utils/googleAnalyticsUtils.d.ts +0 -16
  30. package/dist/src/components/Header/utils/headerUtils.d.ts +0 -94
  31. package/dist/src/theme/components/footer.d.ts +0 -244
  32. package/dist/src/theme/components/header/header.d.ts +0 -72
  33. package/dist/src/theme/components/header/headerLogin.d.ts +0 -327
  34. package/dist/src/theme/components/header/headerLoginButton.d.ts +0 -69
  35. package/dist/src/theme/components/header/headerLowerNav.d.ts +0 -70
  36. package/dist/src/theme/components/header/headerMobileIconNav.d.ts +0 -28
  37. package/dist/src/theme/components/header/headerMobileNav.d.ts +0 -86
  38. package/dist/src/theme/components/header/headerMobileNavButton.d.ts +0 -34
  39. package/dist/src/theme/components/header/headerSearchButton.d.ts +0 -83
  40. package/dist/src/theme/components/header/headerSearchForm.d.ts +0 -183
  41. package/dist/src/theme/components/header/headerSitewideAlerts.d.ts +0 -42
  42. package/dist/src/theme/components/header/headerUpperNav.d.ts +0 -72
@@ -135,6 +135,12 @@ declare const _default: {
135
135
  socialInstagram: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
136
136
  title?: string;
137
137
  }>;
138
+ socialPinterest: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
139
+ title?: string;
140
+ }>;
141
+ socialSoundCloud: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
142
+ title?: string;
143
+ }>;
138
144
  socialTumblr: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
139
145
  title?: string;
140
146
  }>;
@@ -11,6 +11,8 @@ export interface LinkProps {
11
11
  /** ID used for accessibility purposes. */
12
12
  id?: string;
13
13
  onClick?: (event: React.MouseEvent<HTMLDivElement | HTMLAnchorElement, MouseEvent>) => void;
14
+ /** Prop that sets the HTML attribute to target where the link should go. */
15
+ target?: "_blank" | "_parent" | "_self" | "_top";
14
16
  /** Controls the link visuals: action, button, backwards, forwards, or default. */
15
17
  type?: LinkTypes;
16
18
  }
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
- export type ListTypes = "ol" | "ul" | "dl";
3
- interface DescriptionProps {
2
+ export declare const listTypesArray: readonly ["ol", "ul", "dl"];
3
+ export type ListTypes = typeof listTypesArray[number];
4
+ export interface DescriptionProps {
4
5
  term: string;
5
6
  description: string | JSX.Element;
6
7
  }
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
- export type LogoNames = "appleAppStoreBlack" | "appleAppStoreWhite" | "bplBlack" | "bplWhite" | "cleverBadgeColor" | "cleverColor" | "cleverWhite" | "digitalCollectionsBlack" | "digitalCollectionsWhite" | "firstbookColor" | "firstbookColorNegative" | "googlePlayBlack" | "lpaBlack" | "lpaColor" | "lpaWhite" | "mlnBlack" | "mlnColor" | "mlnWhite" | "nycdoeBlack" | "nycdoeColor" | "nycdoeWhite" | "nyplFullBlack" | "nyplFullWhite" | "nyplLionBlack" | "nyplLionWhite" | "nyplTextBlack" | "nyplTextWhite" | "openebooksColor" | "openebooksNegative" | "openebooksWithTextColor" | "openebooksWithTextNegative" | "qplAltBlack" | "qplAltWhite" | "qplBlack" | "qplColor" | "qplWhite" | "reservoirIconColor" | "reservoirVerticalColor" | "schomburgBlack" | "schomburgCircleBlack" | "schomburgCircleColor" | "schomburgCircleWhite" | "schomburgColor" | "schomburgWhite" | "simplyeBlack" | "simplyeWhite" | "simplyeColor" | "snflBlack" | "snflWhite" | "treasuresColor" | "treasuresColorNegative";
3
- export type LogoSizes = "default" | "xxsmall" | "xsmall" | "small" | "medium" | "large";
2
+ import { logoNamesArray, logoSizesArray } from "./logoVariables";
3
+ export type LogoNames = typeof logoNamesArray[number];
4
+ export type LogoSizes = typeof logoSizesArray[number];
4
5
  export interface LogoProps {
5
6
  /** Optional className that will be added to the parent element */
6
7
  className?: string;
@@ -0,0 +1,2 @@
1
+ export declare const logoNamesArray: readonly ["appleAppStoreBlack", "appleAppStoreWhite", "bplBlack", "bplWhite", "cleverBadgeColor", "cleverColor", "cleverWhite", "digitalCollectionsBlack", "digitalCollectionsWhite", "firstbookColor", "firstbookColorNegative", "googlePlayBlack", "lpaBlack", "lpaColor", "lpaWhite", "mlnBlack", "mlnColor", "mlnWhite", "nycdoeBlack", "nycdoeColor", "nycdoeWhite", "nyplFullBlack", "nyplFullWhite", "nyplLionBlack", "nyplLionWhite", "nyplTextBlack", "nyplTextWhite", "openebooksColor", "openebooksNegative", "openebooksWithTextColor", "openebooksWithTextNegative", "qplAltBlack", "qplAltWhite", "qplBlack", "qplColor", "qplWhite", "reservoirIconColor", "reservoirVerticalColor", "schomburgBlack", "schomburgCircleBlack", "schomburgCircleColor", "schomburgCircleWhite", "schomburgColor", "schomburgWhite", "simplyeBlack", "simplyeWhite", "simplyeColor", "snflBlack", "snflWhite", "treasuresColor", "treasuresColorNegative"];
2
+ export declare const logoSizesArray: readonly ["default", "xxsmall", "xsmall", "small", "medium", "large"];
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import { PropsWithChildren } from "react";
2
2
  export declare const colorContrastData: {
3
3
  brand: {
4
4
  primary: {
@@ -337,6 +337,6 @@ export interface ColorCardProps extends DataTableProps {
337
337
  /** The name of the color that the current color is based on. */
338
338
  colorSource: string;
339
339
  }
340
- export declare const DataTable: (props: React.PropsWithChildren<DataTableProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
341
- export declare const ColorCard: (props: React.PropsWithChildren<ColorCardProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
340
+ export declare const DataTable: (props: PropsWithChildren<DataTableProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
341
+ export declare const ColorCard: (props: PropsWithChildren<ColorCardProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
342
342
  export default ColorCard;
@@ -20,9 +20,7 @@ export { default as FeedbackBox, useFeedbackBox, } from "./components/FeedbackBo
20
20
  export type { FeedbackBoxViewType } from "./components/FeedbackBox/FeedbackBox";
21
21
  export { default as Fieldset } from "./components/Fieldset/Fieldset";
22
22
  export { default as FilterBar } from "./components/FilterBar/FilterBar";
23
- export { default as Footer } from "./components/Footer/Footer";
24
23
  export { default as Form, FormField, FormRow } from "./components/Form/Form";
25
- export { default as Header } from "./components/Header/Header";
26
24
  export { default as Heading } from "./components/Heading/Heading";
27
25
  export type { HeadingSizes, HeadingLevels } from "./components/Heading/Heading";
28
26
  export { default as HelperErrorText } from "./components/HelperErrorText/HelperErrorText";
@@ -38,7 +36,7 @@ export type { LayoutTypes } from "./helpers/types";
38
36
  export { default as Link } from "./components/Link/Link";
39
37
  export type { LinkTypes } from "./components/Link/Link";
40
38
  export { default as List } from "./components/List/List";
41
- export type { ListTypes } from "./components/List/List";
39
+ export type { DescriptionProps, ListTypes } from "./components/List/List";
42
40
  export { default as Logo } from "./components/Logo/Logo";
43
41
  export type { LogoNames, LogoSizes } from "./components/Logo/Logo";
44
42
  export { ModalTrigger, useModal } from "./components/Modal/Modal";
@@ -36,9 +36,15 @@ declare const Breadcrumb: {
36
36
  };
37
37
  ".chakra-breadcrumb__link": {
38
38
  _hover: {
39
+ color: string;
39
40
  cursor: string;
40
41
  textDecoration: string;
41
42
  };
43
+ _dark: {
44
+ _hover: {
45
+ color: string;
46
+ };
47
+ };
42
48
  };
43
49
  ".icon": {
44
50
  display: string;
@@ -93,6 +99,13 @@ declare const Breadcrumb: {
93
99
  };
94
100
  };
95
101
  };
102
+ "li:last-child": {
103
+ ".chakra-breadcrumb__link": {
104
+ _hover: {
105
+ color: string;
106
+ };
107
+ };
108
+ };
96
109
  svg: {
97
110
  fill: string;
98
111
  };
@@ -95,6 +95,7 @@ declare const Select: {
95
95
  _dark: {
96
96
  backgroundColor: string;
97
97
  borderColor: string;
98
+ color: string;
98
99
  _hover: {
99
100
  borderColor: string;
100
101
  };
@@ -299,6 +299,12 @@ declare const TextInput: {
299
299
  };
300
300
  };
301
301
  clearButton: {
302
+ borderRadius: string;
303
+ minHeight: {
304
+ base: string;
305
+ md: string;
306
+ };
307
+ height: string;
302
308
  position: string;
303
309
  top: string;
304
310
  px: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nypl/design-system-react-components",
3
- "version": "1.6.0-vite-rc-2",
3
+ "version": "1.6.0-vite-rc-4",
4
4
  "description": "NYPL Reservoir Design System React Components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,13 +57,11 @@
57
57
  "@chakra-ui/react": ">=1.8.5 <=1.8.8",
58
58
  "@chakra-ui/system": ">=1.11.0 <=1.12.1",
59
59
  "@charlietango/use-native-lazy-loading": "1.10.0",
60
- "@emotion/react": ">=11.4.1",
61
- "@emotion/styled": ">=11.3.0",
60
+ "@emotion/react": "11.4.1",
61
+ "@emotion/styled": "11.3.0",
62
62
  "downshift": "6.1.7",
63
63
  "framer-motion": "4.1.17",
64
- "js-cookie": "3.0.1",
65
64
  "react-datepicker": "4.1.1",
66
- "react-ga": "3.3.1",
67
65
  "react-intersection-observer": "9.2.2",
68
66
  "system-font-css": "2.0.2",
69
67
  "tough-cookie": "4.0.0",
@@ -74,8 +72,8 @@
74
72
  "@chakra-ui/focus-lock": ">=1.2.6 <2.0.0",
75
73
  "@chakra-ui/react": ">=1.8.5 <=1.8.8",
76
74
  "@chakra-ui/system": ">=1.11.0 <=1.12.1",
77
- "@emotion/react": ">=11.4.1",
78
- "@emotion/styled": ">=11.3.0",
75
+ "@emotion/react": "11.4.1",
76
+ "@emotion/styled": "11.3.0",
79
77
  "framer-motion": "4.1.17",
80
78
  "react": ">=16.13.0",
81
79
  "react-dom": ">=16.13.0",
@@ -86,15 +84,15 @@
86
84
  "@jest/core": "27.3.1",
87
85
  "@rollup/plugin-commonjs": "24.0.1",
88
86
  "@rollup/plugin-typescript": "11.0.0",
89
- "@storybook/addon-a11y": "7.0.4",
90
- "@storybook/addon-essentials": "7.0.4",
91
- "@storybook/addon-interactions": "7.0.4",
92
- "@storybook/addon-jest": "7.0.4",
93
- "@storybook/addon-links": "7.0.4",
94
- "@storybook/blocks": "7.0.4",
95
- "@storybook/react": "7.0.4",
96
- "@storybook/react-vite": "7.0.4",
97
- "@storybook/testing-library": "0.0.14-next.2",
87
+ "@storybook/addon-a11y": "7.0.18",
88
+ "@storybook/addon-essentials": "7.0.18",
89
+ "@storybook/addon-interactions": "7.0.18",
90
+ "@storybook/addon-jest": "7.0.18",
91
+ "@storybook/addon-links": "7.0.18",
92
+ "@storybook/blocks": "7.0.18",
93
+ "@storybook/react": "7.0.18",
94
+ "@storybook/react-vite": "7.0.18",
95
+ "@storybook/testing-library": "0.1.0",
98
96
  "@svgr/webpack": "5.5.0",
99
97
  "@testing-library/dom": "9.2.0",
100
98
  "@testing-library/jest-dom": "5.14.1",
@@ -132,7 +130,7 @@
132
130
  "remark-gfm": "3.0.1",
133
131
  "sass": "1.60.0",
134
132
  "sass-loader": "10.0.0",
135
- "storybook": "7.0.4",
133
+ "storybook": "7.0.18",
136
134
  "storybook-addon-designs": "7.0.0-beta.2",
137
135
  "style-loader": "2.0.0",
138
136
  "ts-jest": "29.0.5",
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- interface FooterProps {
3
- /** Additional class name to add. */
4
- className?: string;
5
- /** ID that other components can cross reference for accessibility purposes */
6
- id?: string;
7
- }
8
- /**
9
- * This `Footer` component renders the NYPL-branded footer elements such
10
- * as navigational NYPL.org links, social media links, copyright, and
11
- * NYPL building facade image.
12
- */
13
- export declare const Footer: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FooterProps & React.RefAttributes<HTMLDivElement>>, {}>;
14
- export default Footer;
@@ -1,12 +0,0 @@
1
- declare const link: {
2
- nyplLinks: {
3
- text: string;
4
- href: string;
5
- }[][];
6
- socialMedia: {
7
- href: string;
8
- iconName: string;
9
- title: string;
10
- }[];
11
- };
12
- export default link;
@@ -1,21 +0,0 @@
1
- export interface GAOptionProps {
2
- debug?: boolean;
3
- standardImplementation?: boolean;
4
- testMode?: boolean;
5
- titleCase?: boolean;
6
- }
7
- export interface HeaderProps {
8
- /** Whether to render sitewide alerts or not. True by default. */
9
- fetchSitewideAlerts?: boolean;
10
- /** Google Analytics options to override the default settings. */
11
- gaOptions?: GAOptionProps;
12
- /** Whether or not the `Header` is in production mode. True by default. */
13
- isProduction?: boolean;
14
- }
15
- /**
16
- * The NYPL `Header` component is the top-level component of the site. It
17
- * contains features for logging in, logging out, searching, and navigating
18
- * the NYPL.org site.
19
- */
20
- export declare const Header: import("@chakra-ui/react").ChakraComponent<({ fetchSitewideAlerts, gaOptions, isProduction, }: HeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
21
- export default Header;
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- export interface HeaderLoginProps {
3
- catalogRef?: React.RefObject<HTMLDivElement & HTMLAnchorElement>;
4
- isMobile?: boolean;
5
- }
6
- /**
7
- * The content of the login dropdown menu. Initially, this renders links to log
8
- * in and log out. When the patron is logged in, it will also display the patron's
9
- * name, links to the catalogs, and a log out link.
10
- */
11
- declare const HeaderLogin: import("@chakra-ui/react").ChakraComponent<({ catalogRef, isMobile }: HeaderLoginProps) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
12
- export default HeaderLogin;
@@ -1,10 +0,0 @@
1
- export interface HeaderLoginButtonProps {
2
- isMobile?: boolean;
3
- }
4
- /**
5
- * This is the button that will render the login menu when it is clicked
6
- * and keep focus trapped within the menu. Its display text will be "Log In"
7
- * when the user is not logged in and "My Account" when the user is logged in.
8
- */
9
- declare const HeaderLoginButton: import("@chakra-ui/react").ChakraComponent<({ isMobile }: HeaderLoginButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
10
- export default HeaderLoginButton;
@@ -1,6 +0,0 @@
1
- /**
2
- * This component renders the navigational list of links used to
3
- * navigate to different landing pages on NYPL.org.
4
- */
5
- declare const HeaderLowerNav: import("@chakra-ui/react").ChakraComponent<() => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
6
- export default HeaderLowerNav;
@@ -1,6 +0,0 @@
1
- /**
2
- * This component renders the mobile list of icon buttons for
3
- * logging in, searching, and navigating on NYPL.org.
4
- */
5
- declare const HeaderMobileIconNav: import("@chakra-ui/react").ChakraComponent<() => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
6
- export default HeaderMobileIconNav;
@@ -1,6 +0,0 @@
1
- /**
2
- * This component renders the navigational list of links used to navigate
3
- * NYPL.org for mobile devices.
4
- */
5
- declare const HeaderMobileNav: import("@chakra-ui/react").ChakraComponent<() => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
6
- export default HeaderMobileNav;
@@ -1,6 +0,0 @@
1
- /**
2
- * This is the button that will render the navigational list of links
3
- * when it is clicked and keep focus trapped within the menu.
4
- */
5
- declare const HeaderMobileNavButton: import("@chakra-ui/react").ChakraComponent<() => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
6
- export default HeaderMobileNavButton;
@@ -1,9 +0,0 @@
1
- export interface HeaderSearchButtonProps {
2
- isMobile?: boolean;
3
- }
4
- /**
5
- * This is the button that will render the search form when it is clicked and
6
- * keep focus trapped within the menu.
7
- */
8
- declare const HeaderSearchButton: import("@chakra-ui/react").ChakraComponent<({ isMobile }: HeaderSearchButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
9
- export default HeaderSearchButton;
@@ -1,10 +0,0 @@
1
- export interface HeaderSearchFormProps {
2
- isMobile?: boolean;
3
- }
4
- export type SearchOptionType = "circulatingCatalog" | "researchCatalog" | "website";
5
- /**
6
- * Displays the search form for the Header's search interface. On mobile, two
7
- * buttons are displayed and on desktop, two radio inputs are displayed.
8
- */
9
- declare const HeaderSearchForm: import("@chakra-ui/react").ChakraComponent<({ isMobile }: HeaderSearchFormProps) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
10
- export default HeaderSearchForm;
@@ -1,7 +0,0 @@
1
- /**
2
- * The HeaderSitewideAlerts component makes an API request to an NYPL API
3
- * endpoint to fetch NYPL sitewide alerts. While this component can be used in
4
- * isolation, it is already rendered in the DS Header component.
5
- */
6
- export declare const HeaderSitewideAlerts: import("@chakra-ui/react").ChakraComponent<() => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
7
- export default HeaderSitewideAlerts;
@@ -1,7 +0,0 @@
1
- /**
2
- * This renders the navigational list of links for logging in, subscribing
3
- * to the email service, going to the Locations page, getting a Library card,
4
- * donating, and shopping at NYPL.
5
- */
6
- declare const HeaderUpperNav: import("@chakra-ui/react").ChakraComponent<() => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
7
- export default HeaderUpperNav;
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- /**
3
- * Context used for patron and production status data.
4
- */
5
- export declare const HeaderContext: React.Context<any>;
6
- /**
7
- * Context Provider used only in the Header component.
8
- */
9
- export declare const HeaderProvider: ({ children, isProduction, patronName, }: {
10
- children: any;
11
- isProduction?: boolean;
12
- patronName?: string;
13
- }) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,16 +0,0 @@
1
- export declare const envConfig: {
2
- production: string;
3
- development: string;
4
- };
5
- export declare const gaConfig: {
6
- eventCategory: string;
7
- eventAction: string;
8
- customDimensions: {
9
- dimension1: string;
10
- dimension2: string;
11
- dimension4: string;
12
- dimension5: string;
13
- };
14
- };
15
- declare const gaUtils: any;
16
- export default gaUtils;
@@ -1,94 +0,0 @@
1
- export interface Alert {
2
- id: string;
3
- link: string;
4
- description: string;
5
- startDate: string;
6
- endDate: string;
7
- }
8
- export declare const alertsApiUrl = "https://refinery.nypl.org/api/nypl/ndo/v0.1/content/alerts?filter%5Bscope%5D=all";
9
- export declare const patronApiUrl = "https://platform.nypl.org/api/v0.1/auth/patron/tokens/";
10
- export declare const tokenRefreshLink: (isProduction?: boolean) => string;
11
- export declare const getLoginLinks: (patronName?: string, isProduction?: boolean) => {
12
- catalogLink: string;
13
- researchLink: string;
14
- logOutLink: string;
15
- };
16
- export declare const upperNavLinks: {
17
- locations: {
18
- href: string;
19
- text: string;
20
- };
21
- libraryCard: {
22
- href: string;
23
- text: string;
24
- };
25
- emailUpdates: {
26
- href: string;
27
- text: string;
28
- };
29
- donate: {
30
- href: string;
31
- text: string;
32
- };
33
- shop: {
34
- href: string;
35
- text: string;
36
- };
37
- };
38
- export declare const siteNavLinks: {
39
- href: string;
40
- text: string;
41
- }[];
42
- /**
43
- * Replaces the search string's special characters that need to be encoded
44
- * using base64. These characters are "=","/", "\", "?".
45
- */
46
- export declare const encoreEncodeSearchString: (searchString: any) => any;
47
- /**
48
- * Returns the final URL for the NYPL Encore search.
49
- */
50
- export declare const getEncoreCatalogURL: (searchValue: any) => any;
51
- /**
52
- * Returns the final URL for the NYPL Research Catalog search.
53
- */
54
- export declare const getResearchCatalogURL: (searchValue: any) => string;
55
- /**
56
- * Returns the final URL for the NYPL catalog search.
57
- */
58
- export declare const getNYPLSearchURL: (searchString: any) => string;
59
- /**
60
- * The `alertsApiUrl` fetches NYPL alerts from the Refinery API. This API
61
- * returns JSONAPI-formatted data. We could use a better JSONAPI parser, but
62
- * this is the only endpoint we will use that is JSONAPI. Eventually, this
63
- * endpoint will be replaced. This function parses the JSONAPI data in a very
64
- * naive and quick way to get the necessary alerts data. The data is then
65
- * filtered to include active alerts.
66
- */
67
- export declare const parseAlertsData: (data: any) => Alert[];
68
- /**
69
- * `refreshAccessToken` attempts to refresh the "nyplIdentityPatron" cookie's
70
- * `accessToken` by making a request to the `tokenRefreshLink`. If successful,
71
- * it tries to fetch the patron's data again.
72
- */
73
- export declare const refreshAccessToken: (api: any, cb: any, fallBackCb: any) => void;
74
- /**
75
- * getCookieValue uses the js.cookie package to get the value
76
- * of the "nyplIdentityPatron" cookie (if it exists) and extract
77
- * the cookie's `access_token`.
78
- */
79
- export declare const getCookieValue: () => {
80
- cookieValue: any;
81
- accessToken: any;
82
- };
83
- export declare const deleteCookieValue: () => void;
84
- /**
85
- * getLoginData uses the `patronApiUrl` combined with the
86
- * `accessToken` from the "nyplIdentityPatron" cookie to fetch
87
- * the patron's information from the server.
88
- */
89
- export declare const getLoginData: (accessToken: any, cb: any) => void;
90
- /**
91
- * `extractPatronName` locates and returns the `patronName`
92
- * from the nested object that is returned from `getLoginData`.
93
- */
94
- export declare const extractPatronName: (data: any) => any;