@uncinc/uncinc-react-kitchen-sink 2.1.9 → 2.1.10

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.
@@ -33,11 +33,19 @@ const MagicLine = ({
33
33
 
34
34
  const hoverMagicLine = e => {
35
35
  currentActiveItem.current = e.target;
36
+
37
+ _setActiveItemInNavigation(true);
38
+
36
39
  alignMagicLine();
37
40
  };
38
41
 
39
42
  const setInitialMagicLine = () => {
40
43
  currentActiveItem.current = document.getElementsByClassName(activeClassName)[0];
44
+
45
+ if (!currentActiveItem.current) {
46
+ _setActiveItemInNavigation(false);
47
+ }
48
+
41
49
  alignMagicLine();
42
50
  };
43
51
 
@@ -30,4 +30,22 @@ export const Default = () => /*#__PURE__*/React.createElement(MagicLine, null, (
30
30
  }
31
31
  }, item);
32
32
  }));
33
+ });
34
+ export const NoActiveItem = () => /*#__PURE__*/React.createElement(MagicLine, null, (setInitialMagicLine, hoverMagicLine, setActiveItemInNavigation) => {
35
+ const items = ["one", "two with a longer name", "three"];
36
+ return /*#__PURE__*/React.createElement("div", {
37
+ className: "Menu"
38
+ }, items.map(item => {
39
+ const classes = c('Menu__item');
40
+ return /*#__PURE__*/React.createElement("div", {
41
+ key: item,
42
+ className: classes,
43
+ onMouseEnter: e => {
44
+ hoverMagicLine(e);
45
+ },
46
+ onMouseLeave: e => {
47
+ setInitialMagicLine();
48
+ }
49
+ }, item);
50
+ }));
33
51
  });
@@ -6,7 +6,6 @@ const SearchPage = ({
6
6
  children
7
7
  }) => /*#__PURE__*/React.createElement(EuiPage, null, children);
8
8
 
9
- console.log('W', typeof withSearchkitRouting, withSearchkitRouting.getInitialProps);
10
9
  export const routeToStateFn = routeState => {
11
10
  const value = {
12
11
  query: routeState.query || '',
@@ -31,7 +30,7 @@ export const routeToStateFn = routeState => {
31
30
  }
32
31
 
33
32
  if (item.boolValue) {
34
- item.boolValue = !!(item.boolValue.toString() === 'true');
33
+ item.boolValue = !!item.boolValue;
35
34
  }
36
35
 
37
36
  if (item.geoBoundingBox) {
@@ -14,17 +14,17 @@ export default function useValueForCurrentViewPort(val1, val2, val3, val4, val5)
14
14
  return;
15
15
  } // 768 & 992
16
16
  else if (width >= viewportContext.screenSizes.SCREEN_TABLET && width <= viewportContext.screenSizes.SCREEN_NORMAL) {
17
- setValueForCurrentViewPort(val2);
18
- return;
19
- } // 992 & 1240
20
- else if (width >= viewportContext.screenSizes.SCREEN_NORMAL && width <= viewportContext.screenSizes.SCREEN_WIDE) {
21
- setValueForCurrentViewPort(val3);
22
- return;
23
- } // 1240 & 2000
24
- else if (width >= viewportContext.screenSizes.SCREEN_WIDE && width <= viewportContext.screenSizes.SCREEN_HUGE) {
25
- setValueForCurrentViewPort(val4);
26
- return;
27
- } // SCREEN_HUGE and larger
17
+ setValueForCurrentViewPort(val2);
18
+ return;
19
+ } // 992 & 1240
20
+ else if (width >= viewportContext.screenSizes.SCREEN_NORMAL && width <= viewportContext.screenSizes.SCREEN_WIDE) {
21
+ setValueForCurrentViewPort(val3);
22
+ return;
23
+ } // 1240 & 2000
24
+ else if (width >= viewportContext.screenSizes.SCREEN_WIDE && width <= viewportContext.screenSizes.SCREEN_HUGE) {
25
+ setValueForCurrentViewPort(val4);
26
+ return;
27
+ } // SCREEN_HUGE and larger
28
28
 
29
29
 
30
30
  setValueForCurrentViewPort(val5);
@@ -0,0 +1,25 @@
1
+ import { ApolloServer, gql } from 'apollo-server-micro';
2
+ export const config = {
3
+ api: {
4
+ bodyParser: false
5
+ }
6
+ };
7
+ const typeDefs = [gql`
8
+ type Query {
9
+ root: String
10
+ }
11
+
12
+ type Mutation {
13
+ root: String
14
+ }
15
+ `];
16
+ const server = new ApolloServer({
17
+ typeDefs,
18
+ resolvers: {},
19
+ introspection: true,
20
+ playground: true,
21
+ context: {}
22
+ });
23
+ export default server.createHandler({
24
+ path: '/api/graphql'
25
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uncinc/uncinc-react-kitchen-sink",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "description": "Default React components that are easily extended.",
5
5
  "author": "uncinc",
6
6
  "license": "MIT",