@oliasoft-open-source/react-ui-library 1.0.0 → 2.1.0
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/.gitlab-ci.yml
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
image: node:18
|
|
2
|
+
|
|
3
|
+
stages:
|
|
4
|
+
- test
|
|
5
|
+
- release
|
|
6
|
+
|
|
1
7
|
test:
|
|
2
|
-
image: node:18
|
|
3
8
|
stage: test
|
|
4
9
|
only:
|
|
5
10
|
- merge_requests
|
|
@@ -13,33 +18,57 @@ cache:
|
|
|
13
18
|
- node_modules/
|
|
14
19
|
- public/
|
|
15
20
|
|
|
21
|
+
# Public the static docs site (including Storybook) upon merge to master
|
|
16
22
|
pages:
|
|
17
|
-
|
|
23
|
+
stage: release
|
|
24
|
+
only:
|
|
25
|
+
- master
|
|
18
26
|
script:
|
|
19
|
-
- npm install
|
|
27
|
+
- npm install --progress=false --no-save
|
|
20
28
|
- npm run build
|
|
21
29
|
- cp public/index.html public/404.html
|
|
22
30
|
artifacts:
|
|
23
31
|
paths:
|
|
24
32
|
- public
|
|
25
|
-
only:
|
|
26
|
-
- master
|
|
27
|
-
|
|
28
|
-
publish:
|
|
29
|
-
stage: publish
|
|
30
|
-
only:
|
|
31
|
-
- tags
|
|
32
|
-
script:
|
|
33
|
-
- npm run ci-publish
|
|
34
33
|
|
|
34
|
+
# Push a tag and publish to the public NPM registry upon merge to master
|
|
35
35
|
publish:
|
|
36
|
-
stage:
|
|
36
|
+
stage: release
|
|
37
37
|
only:
|
|
38
38
|
- master
|
|
39
39
|
script:
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
-
|
|
40
|
+
# Get the version from package.json
|
|
41
|
+
- VERSION=$(node -p "require('./package.json').version")
|
|
42
|
+
# Prepare .npmrc
|
|
43
|
+
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
|
44
|
+
# Configure git
|
|
45
|
+
- mkdir -p ~/.ssh
|
|
46
|
+
- echo "$SSH_PRIVATE_KEY_TOOLKIT" > ~/.ssh/id_rsa; chmod 0600 ~/.ssh/id_rsa
|
|
47
|
+
- echo "StrictHostKeyChecking no " > /root/.ssh/config
|
|
48
|
+
- git config --global http.sslVerify false
|
|
49
|
+
- git config --global user.email "$GITLAB_USER_EMAIL"
|
|
50
|
+
- git config --global user.name "🤖 GitLab CI/CD"
|
|
51
|
+
- echo "setting origin remote to 'git@$CI_SERVER_HOST:$CI_PROJECT_PATH.git'"
|
|
52
|
+
- git remote -v
|
|
53
|
+
- git remote rm origin
|
|
54
|
+
- git remote add origin git@$CI_SERVER_HOST:$CI_PROJECT_PATH.git
|
|
55
|
+
- git remote -v
|
|
56
|
+
- git branch
|
|
57
|
+
- git fetch --quiet
|
|
58
|
+
- git checkout "$CI_BUILD_REF_NAME"
|
|
59
|
+
- git fetch --tags --quiet
|
|
60
|
+
# Only complete pipeline if version does not already exist
|
|
61
|
+
- >
|
|
62
|
+
if [ $(git tag -l "$VERSION") ]; then
|
|
63
|
+
echo "Version $VERSION already exists"
|
|
64
|
+
exit 1
|
|
65
|
+
else
|
|
66
|
+
# Tag a release in gitlab
|
|
67
|
+
echo "Tagging release in git"
|
|
68
|
+
git tag $VERSION -m "🤖 Tagged by Gitlab CI/CD Pipeline" -m "For further reference see $CI_PIPELINE_URL" -m "[skip ci]"
|
|
69
|
+
echo "Pushing tag to remote repository"
|
|
70
|
+
git push origin $VERSION --no-verify
|
|
71
|
+
# Publish the NPM package to the public NPM registry
|
|
72
|
+
echo "Publishing package to NPM registry"
|
|
73
|
+
npm publish
|
|
74
|
+
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/react-ui-library",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Reusable UI components for React projects",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
108
|
"@babel/polyfill": "^7.8.7",
|
|
109
|
+
"@infinium/react-keyboard-event-handler": "^1.5.8",
|
|
109
110
|
"@mdx-js/loader": "^1.6.22",
|
|
110
111
|
"@mdx-js/react": "^1.6.22",
|
|
111
112
|
"@minoru/react-dnd-treeview": "^1.6.1",
|
|
@@ -124,7 +125,6 @@
|
|
|
124
125
|
"react-faux-dom": "^4.5.0",
|
|
125
126
|
"react-icons": "^4.2.0",
|
|
126
127
|
"react-infinite-scroll-component": "^6.1.0",
|
|
127
|
-
"react-keyboard-event-handler": "^1.5.4",
|
|
128
128
|
"react-laag": "^2.0.3",
|
|
129
129
|
"react-router-dom": "^5.3.0",
|
|
130
130
|
"react-svg": "^14.0.12",
|
|
@@ -3,7 +3,7 @@ import React, { useRef, useReducer, useEffect, useContext } from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { useLayer, mergeRefs } from 'react-laag';
|
|
5
5
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
6
|
-
import KeyboardEventHandler from 'react-keyboard-event-handler';
|
|
6
|
+
import KeyboardEventHandler from '@infinium/react-keyboard-event-handler';
|
|
7
7
|
import { useFocus } from '../../../hooks';
|
|
8
8
|
import { placementOptions } from './layer/placementOptions';
|
|
9
9
|
import { Layer } from './layer/layer';
|