@constructor-io/constructorio-ui-autocomplete 1.2.2 → 1.2.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.
- package/README.md +19 -2
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ There are two main methods for consuming this UI Library in a React project:
|
|
|
17
17
|
The `CioAutocomplete` component handles state management, data fetching, and rendering logic.
|
|
18
18
|
|
|
19
19
|
```jsx
|
|
20
|
-
import { CioAutocomplete } from 'constructorio-ui-autocomplete';
|
|
20
|
+
import { CioAutocomplete } from '@constructor-io/constructorio-ui-autocomplete';
|
|
21
21
|
|
|
22
22
|
function YourComponent() {
|
|
23
23
|
return (
|
|
@@ -32,7 +32,7 @@ function YourComponent() {
|
|
|
32
32
|
The `useCioAutocomplete` hook handles state management and data fetching, but leaves rendering logic up to you.
|
|
33
33
|
|
|
34
34
|
```jsx
|
|
35
|
-
import { useCioAutocomplete } from 'constructorio-ui-autocomplete';
|
|
35
|
+
import { useCioAutocomplete } from '@constructor-io/constructorio-ui-autocomplete';
|
|
36
36
|
|
|
37
37
|
function YourComponent() {
|
|
38
38
|
const {
|
|
@@ -120,6 +120,23 @@ import '@constructor-io/constructorio-ui-autocomplete/styles.css';
|
|
|
120
120
|
- If you like, you can pass additional className(s) of your choosing like so:
|
|
121
121
|
`autocompleteClassName='cio-autocomplete custom-autocomplete-container'`
|
|
122
122
|
|
|
123
|
+
## Troubleshooting
|
|
124
|
+
|
|
125
|
+
### Known Issues
|
|
126
|
+
|
|
127
|
+
**ESLint**
|
|
128
|
+
|
|
129
|
+
There is a known issue with ESLint where it fails to resolve the paths exposed in the `exports` statement of NPM packages. If you are receiving the following error, you can safely disable ESLint using `// eslint-disable-line` for that line.
|
|
130
|
+
|
|
131
|
+
`Unable to resolve path to module '@constructor-io/constructorio-ui-autocomplete/styles.css'`
|
|
132
|
+
|
|
133
|
+
Relevant open issues:
|
|
134
|
+
|
|
135
|
+
[Issue 1868](https://github.com/import-js/eslint-plugin-import/issues/1868)
|
|
136
|
+
|
|
137
|
+
[Issue 1810](https://github.com/import-js/eslint-plugin-import/issues/1810)
|
|
138
|
+
|
|
139
|
+
|
|
123
140
|
## Local Development
|
|
124
141
|
|
|
125
142
|
### Development scripts
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructor-io/constructorio-ui-autocomplete",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.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",
|
|
7
7
|
"exports": {
|
|
8
|
-
"./styles.css":
|
|
8
|
+
"./styles.css": {
|
|
9
|
+
"import": "./lib/styles.css",
|
|
10
|
+
"require": "./lib/styles.css"
|
|
11
|
+
},
|
|
9
12
|
".": {
|
|
10
13
|
"import": "./lib/mjs/index.js",
|
|
11
14
|
"require": "./lib/cjs/index.js"
|
|
@@ -24,7 +27,8 @@
|
|
|
24
27
|
"test-storybook:ci": "start-server-and-test storybook:ci http://localhost:6006 test-storybook",
|
|
25
28
|
"build-storybook": "storybook build -o 'docs'",
|
|
26
29
|
"serve-built-storybook": "npx http-server docs",
|
|
27
|
-
"version": "
|
|
30
|
+
"verify-node-version": "chmod +x ./scripts/verify-node-version.sh && ./scripts/verify-node-version.sh",
|
|
31
|
+
"version": "npm run verify-node-version && npm run build-storybook && git add -u ./docs && git add ./docs/* && npm run compile",
|
|
28
32
|
"compile": "rm -rf lib && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && npm run copy-styles"
|
|
29
33
|
},
|
|
30
34
|
"author": "constructor.io",
|