@uncinc/uncinc-react-kitchen-sink 2.1.8 → 2.1.12

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) {
@@ -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.8",
3
+ "version": "2.1.12",
4
4
  "description": "Default React components that are easily extended.",
5
5
  "author": "uncinc",
6
6
  "license": "MIT",
@@ -35,13 +35,30 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@apollo/client": "^3.4.16",
38
+ "@babel/cli": "^7.0.0-beta.44",
39
+ "@babel/helper-define-map": "^7.14.5",
40
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
41
+ "@babel/runtime": "^7.9.6",
38
42
  "@elastic/datemath": "^5.0.3",
39
43
  "@elastic/eui": "^40.0.0",
40
44
  "@loadable/component": "^5.15.0",
41
45
  "@searchkit/client": "^3.0.0-canary.45",
42
46
  "@searchkit/elastic-ui": "^3.0.0-canary.45",
47
+ "@storybook/addon-actions": "^6.2.8",
48
+ "@storybook/addon-info": "^5.3.21",
49
+ "@storybook/addon-links": "^6.2.8",
50
+ "@storybook/addons": "^6.2.8",
51
+ "@storybook/react": "^6.2.8",
52
+ "@storybook/theming": "^6.2.8",
53
+ "@testing-library/jest-dom": "^4.2.4",
54
+ "@testing-library/react": "^9.3.2",
55
+ "@testing-library/user-event": "^7.1.2",
43
56
  "apollo-server-micro": "^3.4.0",
44
57
  "bootstrap": "^4.3.1",
58
+ "chai": "^4.2.0",
59
+ "cross-env": "^7.0.2",
60
+ "enzyme": "^3.11.0",
61
+ "enzyme-adapter-react-16": "^1.15.2",
45
62
  "fork-ts-checker-webpack-plugin-alt": "0.4.14",
46
63
  "formik": "^2.2.6",
47
64
  "graphql": "^15.7.0",
@@ -67,9 +84,11 @@
67
84
  "react-redux": "^7.2.4",
68
85
  "react-router": "5.2.0",
69
86
  "react-router-dom": "5.2.0",
87
+ "react-scripts": "3.4.1",
70
88
  "react-select": "^3.1.0",
71
89
  "react-share": "^4.3.1",
72
90
  "react-slick": "^0.27.14",
91
+ "react-test-renderer": "^16.13.1",
73
92
  "redux": "^4.0.5",
74
93
  "sass-loader": "^8.0.2",
75
94
  "slick-carousel": "^1.8.1"
@@ -96,6 +115,7 @@
96
115
  "react-test-renderer": "^16.13.1",
97
116
  "sinon": "^9.0.2",
98
117
  "sinon-chai": "^3.5.0",
118
+ "slick-carousel": "^1.8.1",
99
119
  "storybook-addon-export-stories": "^1.0.0"
100
120
  },
101
121
  "eslintConfig": {