@constructor-io/constructorio-ui-autocomplete 1.23.2 → 1.23.3

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.
@@ -116,6 +116,8 @@ const useCioAutocomplete = (options) => {
116
116
  }
117
117
  }, className: 'cio-input', 'data-testid': 'cio-input', placeholder, onKeyDownCapture: ({ code, key, nativeEvent }) => {
118
118
  const isEnter = code === 'Enter' || key === 'Enter';
119
+ const isHome = code === 'Home' || key === 'Home';
120
+ const isEnd = code === 'End' || key === 'End';
119
121
  const isUserInput = highlightedIndex < 0;
120
122
  if (isOpen && isEnter && isUserInput && (query === null || query === void 0 ? void 0 : query.length)) {
121
123
  if (onSubmit) {
@@ -129,7 +131,7 @@ const useCioAutocomplete = (options) => {
129
131
  console.log(error);
130
132
  }
131
133
  }
132
- if (code === 'Home' || code === 'End') {
134
+ if (isHome || isEnd) {
133
135
  // eslint-disable-next-line no-param-reassign
134
136
  nativeEvent.preventDownshiftDefault = true;
135
137
  }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '1.23.2';
3
+ exports.default = '1.23.3';
@@ -125,6 +125,8 @@ const useCioAutocomplete = (options) => {
125
125
  placeholder,
126
126
  onKeyDownCapture: ({ code, key, nativeEvent }) => {
127
127
  const isEnter = code === 'Enter' || key === 'Enter';
128
+ const isHome = code === 'Home' || key === 'Home';
129
+ const isEnd = code === 'End' || key === 'End';
128
130
  const isUserInput = highlightedIndex < 0;
129
131
  if (isOpen && isEnter && isUserInput && query?.length) {
130
132
  if (onSubmit) {
@@ -138,7 +140,7 @@ const useCioAutocomplete = (options) => {
138
140
  console.log(error);
139
141
  }
140
142
  }
141
- if (code === 'Home' || code === 'End') {
143
+ if (isHome || isEnd) {
142
144
  // eslint-disable-next-line no-param-reassign
143
145
  nativeEvent.preventDownshiftDefault = true;
144
146
  }
@@ -1 +1 @@
1
- export default '1.23.2';
1
+ export default '1.23.3';
@@ -1,2 +1,2 @@
1
- declare const _default: "1.23.2";
1
+ declare const _default: "1.23.3";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-ui-autocomplete",
3
- "version": "1.23.2",
3
+ "version": "1.23.3",
4
4
  "description": "Constructor.io Autocomplete UI library for web applications",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -64,13 +64,13 @@
64
64
  },
65
65
  "devDependencies": {
66
66
  "@cspell/eslint-plugin": "^6.18.1",
67
- "@storybook/addon-a11y": "^7.6.6",
68
- "@storybook/addon-actions": "^7.6.6",
69
- "@storybook/addon-essentials": "^7.6.6",
70
- "@storybook/addon-interactions": "^7.6.6",
71
- "@storybook/addon-links": "^7.6.6",
67
+ "@storybook/addon-a11y": "^7.6.20",
68
+ "@storybook/addon-actions": "^7.6.20",
69
+ "@storybook/addon-essentials": "^7.6.20",
70
+ "@storybook/addon-interactions": "^7.6.20",
71
+ "@storybook/addon-links": "^7.6.20",
72
72
  "@storybook/jest": "^0.2.3",
73
- "@storybook/react-webpack5": "7.6.6",
73
+ "@storybook/react-webpack5": "^7.6.20",
74
74
  "@storybook/test-runner": "^0.16.0",
75
75
  "@storybook/testing-library": "^0.1.0",
76
76
  "@testing-library/jest-dom": "^6.4.5",
@@ -98,7 +98,7 @@
98
98
  "react": "^18.2.0",
99
99
  "react-dom": "^18.2.0",
100
100
  "start-server-and-test": "^2.0.3",
101
- "storybook": "^7.6.6",
101
+ "storybook": "^7.6.20",
102
102
  "ts-jest": "^29.1.5",
103
103
  "typescript": "^4.8.3",
104
104
  "vite": "^4.3.7",