tenjin-ui-kit 0.2.151 → 0.2.156
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/.dockerignore +6 -0
- package/.storybook/main.js +16 -0
- package/.storybook/preview.js +11 -0
- package/Dockerfile +17 -0
- package/Jenkinsfile +66 -0
- package/README.md +13 -0
- package/{components → dist/components}/RightContext/index.css +20 -20
- package/{components → dist/components}/browsingTestCaseLayout/style.css +82 -82
- package/{components → dist/components}/optionMenu/index.js +25 -25
- package/{components → dist/components}/select/SimpleSelect.js +22 -12
- package/dist/package.json +119 -0
- package/package.json +119 -119
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/public/tenjinLogo.png +0 -0
- /package/{assets → dist/assets}/images/MicrosoftTeams-image (1).png +0 -0
- /package/{assets → dist/assets}/images/tenjin-4.0-logo.png +0 -0
- /package/{common → dist/common}/hooks/apiHooks.js +0 -0
- /package/{common → dist/common}/hooks/newApiHook.js +0 -0
- /package/{common → dist/common}/utils/security/index.js +0 -0
- /package/{common → dist/common}/utils/security/securityConfig.js +0 -0
- /package/{components → dist/components}/Canvas.js +0 -0
- /package/{components → dist/components}/DragBox/index.js +0 -0
- /package/{components → dist/components}/InputWithChip/index.js +0 -0
- /package/{components → dist/components}/RightContext/index.js +0 -0
- /package/{components → dist/components}/WorkFlow.js +0 -0
- /package/{components → dist/components}/WorkFlowBuilder.js +0 -0
- /package/{components → dist/components}/alert/Style.js +0 -0
- /package/{components → dist/components}/alert/index.js +0 -0
- /package/{components → dist/components}/attachment/index.js +0 -0
- /package/{components → dist/components}/authenticationProvider/AuthError.js +0 -0
- /package/{components → dist/components}/authenticationProvider/AuthLoader.js +0 -0
- /package/{components → dist/components}/authenticationProvider/index.js +0 -0
- /package/{components → dist/components}/avatar/index.js +0 -0
- /package/{components → dist/components}/avatar/styles.js +0 -0
- /package/{components → dist/components}/breadCrumbs/index.js +0 -0
- /package/{components → dist/components}/breadCrumbs/style.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/index.js +0 -0
- /package/{components → dist/components}/button/index.js +0 -0
- /package/{components → dist/components}/checkBox/index.js +0 -0
- /package/{components → dist/components}/divider/index.js +0 -0
- /package/{components → dist/components}/editableField/index.js +0 -0
- /package/{components → dist/components}/error/index.js +0 -0
- /package/{components → dist/components}/errorBoundary/Error.jpg +0 -0
- /package/{components → dist/components}/errorBoundary/index.js +0 -0
- /package/{components → dist/components}/fileUploader/index.js +0 -0
- /package/{components → dist/components}/fileUploader/style.js +0 -0
- /package/{components → dist/components}/iconButton/index.js +0 -0
- /package/{components → dist/components}/iconButton/style.js +0 -0
- /package/{components → dist/components}/input/index.js +0 -0
- /package/{components → dist/components}/layout/index.js +0 -0
- /package/{components → dist/components}/layout/main/index.js +0 -0
- /package/{components → dist/components}/layout/main/style.js +0 -0
- /package/{components → dist/components}/layout/pageContent/index.js +0 -0
- /package/{components → dist/components}/layout/sidebar/FlatMenu.js +0 -0
- /package/{components → dist/components}/layout/sidebar/GroupedIconMenu.js +0 -0
- /package/{components → dist/components}/layout/sidebar/GroupedMenu.js +0 -0
- /package/{components → dist/components}/layout/sidebar/ProjectMenu.js +0 -0
- /package/{components → dist/components}/layout/sidebar/index.js +0 -0
- /package/{components → dist/components}/layout/sidebar/style.js +0 -0
- /package/{components → dist/components}/layout/topBar/ProjectTopbar.js +0 -0
- /package/{components → dist/components}/layout/topBar/UserAvatar.js +0 -0
- /package/{components → dist/components}/layout/topBar/index.js +0 -0
- /package/{components → dist/components}/loader/index.js +0 -0
- /package/{components → dist/components}/menu/index.js +0 -0
- /package/{components → dist/components}/modal/Modal.js +0 -0
- /package/{components → dist/components}/modal/index.js +0 -0
- /package/{components → dist/components}/modal/style.js +0 -0
- /package/{components → dist/components}/pagination/index.js +0 -0
- /package/{components → dist/components}/pagination/style.js +0 -0
- /package/{components → dist/components}/paper/index.js +0 -0
- /package/{components → dist/components}/paper/style.js +0 -0
- /package/{components → dist/components}/reactSelect/index.js +0 -0
- /package/{components → dist/components}/reactSelect/style.js +0 -0
- /package/{components → dist/components}/richTextEditor/index.js +0 -0
- /package/{components → dist/components}/richTextEditor/style.js +0 -0
- /package/{components → dist/components}/select/index.js +0 -0
- /package/{components → dist/components}/simpleSelect/index.js +0 -0
- /package/{components → dist/components}/switch/index.js +0 -0
- /package/{components → dist/components}/switch/style.js +0 -0
- /package/{components → dist/components}/switch/switch.js +0 -0
- /package/{components → dist/components}/table/ReactTable.js +0 -0
- /package/{components → dist/components}/table/SimpleTable.js +0 -0
- /package/{components → dist/components}/table/index.js +0 -0
- /package/{components → dist/components}/text/index.js +0 -0
- /package/{components → dist/components}/timeStamp/index.js +0 -0
- /package/{components → dist/components}/timeStamp/style.js +0 -0
- /package/{components → dist/components}/topBar/index.js +0 -0
- /package/{components → dist/components}/tree/index.js +0 -0
- /package/{components → dist/components}/tree/style.js +0 -0
- /package/{components → dist/components}/valuePicker/ValueSelector.js +0 -0
- /package/{components → dist/components}/valuePicker/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/layout/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/layout/style.js +0 -0
- /package/{components → dist/components}/wrapperLayout/main/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/main/pageContainer/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/main/sideBar/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/main/sideBar/style.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/UserAvatar.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/avatar.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/menuIcon.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/style.js +0 -0
- /package/{http → dist/http}/index.js +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{templates → dist/templates}/listPage/index.js +0 -0
- /package/{themes → dist/themes}/default.js +0 -0
- /package/{themes → dist/themes}/defaultSmall.js +0 -0
- /package/{themes → dist/themes}/responsiveTheme.js +0 -0
package/.dockerignore
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"stories": [
|
|
3
|
+
"../src/**/*.stories.mdx",
|
|
4
|
+
"../src/**/*.stories.@(js|jsx|ts|tsx)"
|
|
5
|
+
],
|
|
6
|
+
"addons": [
|
|
7
|
+
"@storybook/addon-links",
|
|
8
|
+
"@storybook/addon-essentials",
|
|
9
|
+
"@storybook/addon-interactions",
|
|
10
|
+
"@storybook/preset-create-react-app"
|
|
11
|
+
],
|
|
12
|
+
"framework": "@storybook/react",
|
|
13
|
+
"core": {
|
|
14
|
+
"builder": "@storybook/builder-webpack5"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# build environment
|
|
2
|
+
FROM node:16-alpine as build
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
ENV PATH /app/node_modules/.bin:$PATH
|
|
5
|
+
COPY package.json ./
|
|
6
|
+
COPY package-lock.json ./
|
|
7
|
+
COPY . ./
|
|
8
|
+
RUN npm install
|
|
9
|
+
RUN npm run build-storybook
|
|
10
|
+
RUN npm run compile
|
|
11
|
+
RUN npm version patch -m "CI patch version bump"
|
|
12
|
+
RUN cp ./package.json ./dist
|
|
13
|
+
RUN cp ./README.md ./dist
|
|
14
|
+
RUN cd dist
|
|
15
|
+
RUN npm publish
|
|
16
|
+
# TEST COMMIT 2
|
|
17
|
+
|
package/Jenkinsfile
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
pipeline {
|
|
2
|
+
agent {label 'tjui-kit'}
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
stages {
|
|
8
|
+
stage ("Build") {
|
|
9
|
+
steps {
|
|
10
|
+
dir("./") {
|
|
11
|
+
sh 'npm install'
|
|
12
|
+
sh 'npm run compile'
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
stage ("Upgrade version") {
|
|
17
|
+
steps {
|
|
18
|
+
dir("./") {
|
|
19
|
+
sh 'git restore package-lock.json'
|
|
20
|
+
|
|
21
|
+
sh 'npm version patch'
|
|
22
|
+
sh 'git remote set-url origin https://vybhavkadam:glpat-Ee-CqdVnwzURCGPzFwys@gitlab.com/yethi/react/tenjin-ui-kit.git'
|
|
23
|
+
sh 'git push origin HEAD:main --tags'
|
|
24
|
+
//sh 'git push --tags'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
stage ("Publish library") {
|
|
30
|
+
steps {
|
|
31
|
+
dir("./") {
|
|
32
|
+
sh 'cp ./package.json ./dist'
|
|
33
|
+
sh 'cp ./README.md ./dist'
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
dir("./dist") {
|
|
37
|
+
//sh 'npm config set //registry.npmjs.org/:_authToken=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'
|
|
38
|
+
sh 'export NPM_TOKEN=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'
|
|
39
|
+
sh 'npm publish'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
stage ("Build Storybook") {
|
|
45
|
+
steps {
|
|
46
|
+
dir("./") {
|
|
47
|
+
sh 'npm run build-storybook'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
stage ("Deploy Storybook") {
|
|
53
|
+
steps {
|
|
54
|
+
dir("./") {
|
|
55
|
+
sh 'npx netlify deploy --auth xZ5gRrdcq6pPShzAcOtxCqD3e5MzwWxwBevsrQdyIl0 --site 9a55e91f-3c3e-4492-8d50-7f17ca87adeb --dir storybook-static --prod'
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
stage('CleanWorkspace') {
|
|
60
|
+
steps {
|
|
61
|
+
cleanWs()
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Tenjin UI Kit
|
|
2
|
+
|
|
3
|
+
The Tenjin UI kit ships a set of pre-built components that can be used while building user interfaces for Tenjin.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
In the project directory, you can run:
|
|
8
|
+
|
|
9
|
+
npm install tenjin-ui-kit
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
The [Tenjin UI Kit](https://tenjin-ui-kit.netlify.app) storybook gives clear documentation on how to use the Tenjin UI Kit.
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.contextContainer {
|
|
2
|
-
z-index: 1;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 500px;
|
|
5
|
-
background: #673ab7;
|
|
6
|
-
}
|
|
7
|
-
.rightClick {
|
|
8
|
-
z-index: 12;
|
|
9
|
-
position: fixed;
|
|
10
|
-
background: rgb(240, 200, 1);
|
|
11
|
-
}
|
|
12
|
-
.menuElement {
|
|
13
|
-
color: #222222;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
padding: 17px 36px;
|
|
16
|
-
}
|
|
17
|
-
.menuElement:hover {
|
|
18
|
-
color: #fff;
|
|
19
|
-
background: #009688;
|
|
20
|
-
}
|
|
1
|
+
.contextContainer {
|
|
2
|
+
z-index: 1;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 500px;
|
|
5
|
+
background: #673ab7;
|
|
6
|
+
}
|
|
7
|
+
.rightClick {
|
|
8
|
+
z-index: 12;
|
|
9
|
+
position: fixed;
|
|
10
|
+
background: rgb(240, 200, 1);
|
|
11
|
+
}
|
|
12
|
+
.menuElement {
|
|
13
|
+
color: #222222;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
padding: 17px 36px;
|
|
16
|
+
}
|
|
17
|
+
.menuElement:hover {
|
|
18
|
+
color: #fff;
|
|
19
|
+
background: #009688;
|
|
20
|
+
}
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--box-width: 200px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
body {
|
|
6
|
-
margin: 40px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.wrapper {
|
|
10
|
-
background-color: #fff;
|
|
11
|
-
color: #444;
|
|
12
|
-
display: flex;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.box {
|
|
16
|
-
background-color: #444;
|
|
17
|
-
color: #fff;
|
|
18
|
-
border-radius: 5px;
|
|
19
|
-
padding: 20px;
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
|
|
24
|
-
flex: 1 1 auto;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.handler {
|
|
28
|
-
width: 20px;
|
|
29
|
-
padding: 0;
|
|
30
|
-
cursor: ew-resize;
|
|
31
|
-
flex: 0 0 auto;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.handler::before {
|
|
35
|
-
content: "";
|
|
36
|
-
display: block;
|
|
37
|
-
width: 2px;
|
|
38
|
-
height: calc(100vh - 34px);
|
|
39
|
-
background: #c0c0c0;
|
|
40
|
-
margin: 0 auto;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.arrowButton {
|
|
44
|
-
display: flex;
|
|
45
|
-
justify-content: flex-end;
|
|
46
|
-
/* transition: 0.4s; */
|
|
47
|
-
width: 100%;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.verticalText {
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: column;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
writing-mode: vertical-lr;
|
|
55
|
-
text-orientation: mixed;
|
|
56
|
-
transform: rotate(180deg);
|
|
57
|
-
font-size: 1.3rem;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.leftWrapper {
|
|
61
|
-
background-color: #fff;
|
|
62
|
-
color: black;
|
|
63
|
-
border-radius: 5px;
|
|
64
|
-
padding: 0rem 0.5rem;
|
|
65
|
-
font-size: 12px;
|
|
66
|
-
box-sizing: border-box;
|
|
67
|
-
flex: 1 1 auto;
|
|
68
|
-
min-width: var(--box-width);
|
|
69
|
-
flex-grow: 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.rightWrapper {
|
|
73
|
-
background-color: #fff;
|
|
74
|
-
color: black;
|
|
75
|
-
border-radius: 5px;
|
|
76
|
-
padding: 0rem 0.5rem;
|
|
77
|
-
font-size: 12px;
|
|
78
|
-
box-sizing: border-box;
|
|
79
|
-
flex: 1 1 auto;
|
|
80
|
-
min-width: var(--box-width);
|
|
81
|
-
flex-grow: 1;
|
|
82
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--box-width: 200px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
body {
|
|
6
|
+
margin: 40px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.wrapper {
|
|
10
|
+
background-color: #fff;
|
|
11
|
+
color: #444;
|
|
12
|
+
display: flex;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.box {
|
|
16
|
+
background-color: #444;
|
|
17
|
+
color: #fff;
|
|
18
|
+
border-radius: 5px;
|
|
19
|
+
padding: 20px;
|
|
20
|
+
font-size: 12px;
|
|
21
|
+
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
|
|
24
|
+
flex: 1 1 auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.handler {
|
|
28
|
+
width: 20px;
|
|
29
|
+
padding: 0;
|
|
30
|
+
cursor: ew-resize;
|
|
31
|
+
flex: 0 0 auto;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.handler::before {
|
|
35
|
+
content: "";
|
|
36
|
+
display: block;
|
|
37
|
+
width: 2px;
|
|
38
|
+
height: calc(100vh - 34px);
|
|
39
|
+
background: #c0c0c0;
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.arrowButton {
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: flex-end;
|
|
46
|
+
/* transition: 0.4s; */
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.verticalText {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
writing-mode: vertical-lr;
|
|
55
|
+
text-orientation: mixed;
|
|
56
|
+
transform: rotate(180deg);
|
|
57
|
+
font-size: 1.3rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.leftWrapper {
|
|
61
|
+
background-color: #fff;
|
|
62
|
+
color: black;
|
|
63
|
+
border-radius: 5px;
|
|
64
|
+
padding: 0rem 0.5rem;
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
flex: 1 1 auto;
|
|
68
|
+
min-width: var(--box-width);
|
|
69
|
+
flex-grow: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.rightWrapper {
|
|
73
|
+
background-color: #fff;
|
|
74
|
+
color: black;
|
|
75
|
+
border-radius: 5px;
|
|
76
|
+
padding: 0rem 0.5rem;
|
|
77
|
+
font-size: 12px;
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
flex: 1 1 auto;
|
|
80
|
+
min-width: var(--box-width);
|
|
81
|
+
flex-grow: 1;
|
|
82
|
+
}
|
|
@@ -20,31 +20,31 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
20
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
21
|
var ITEM_HEIGHT = 500;
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
*
|
|
25
|
-
* @param {{
|
|
26
|
-
* options: Array<{
|
|
27
|
-
* name: String | Number,
|
|
28
|
-
* displayName: String,
|
|
29
|
-
* onClick: (name: String | Number, optionId: String | Number) => void,
|
|
30
|
-
* visibility?: boolean,
|
|
31
|
-
* divider?: boolean
|
|
32
|
-
* }>,
|
|
33
|
-
* optionId?: String | Number,
|
|
34
|
-
* }} props
|
|
35
|
-
* @description
|
|
36
|
-
* options: provide this object in an array for options
|
|
37
|
-
* {
|
|
38
|
-
* name, displayName , onClick, visibility, divider
|
|
39
|
-
* }
|
|
40
|
-
* name: name for Menuoption it will act like ID
|
|
41
|
-
* displayname: To display name
|
|
42
|
-
* onClick: Accepts a callbac function, this function will provide name in parameter
|
|
43
|
-
* visibility: (optional) if set to false, the option will be disabled
|
|
44
|
-
* divider: (optional) if set to true, a divider line will be displayed after the MenuItem
|
|
45
|
-
*
|
|
46
|
-
* optionId: Provide an option ID to get it as 2nd parameter of callback function
|
|
47
|
-
* @returns An option component
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param {{
|
|
26
|
+
* options: Array<{
|
|
27
|
+
* name: String | Number,
|
|
28
|
+
* displayName: String,
|
|
29
|
+
* onClick: (name: String | Number, optionId: String | Number) => void,
|
|
30
|
+
* visibility?: boolean,
|
|
31
|
+
* divider?: boolean
|
|
32
|
+
* }>,
|
|
33
|
+
* optionId?: String | Number,
|
|
34
|
+
* }} props
|
|
35
|
+
* @description
|
|
36
|
+
* options: provide this object in an array for options
|
|
37
|
+
* {
|
|
38
|
+
* name, displayName , onClick, visibility, divider
|
|
39
|
+
* }
|
|
40
|
+
* name: name for Menuoption it will act like ID
|
|
41
|
+
* displayname: To display name
|
|
42
|
+
* onClick: Accepts a callbac function, this function will provide name in parameter
|
|
43
|
+
* visibility: (optional) if set to false, the option will be disabled
|
|
44
|
+
* divider: (optional) if set to true, a divider line will be displayed after the MenuItem
|
|
45
|
+
*
|
|
46
|
+
* optionId: Provide an option ID to get it as 2nd parameter of callback function
|
|
47
|
+
* @returns An option component
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
50
|
var OptionMenu = function OptionMenu(_ref) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -15,6 +14,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
16
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
18
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
19
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20
20
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -39,6 +39,7 @@ var SimpleSelect = function SimpleSelect(_ref) {
|
|
|
39
39
|
loading = _ref.loading,
|
|
40
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
41
|
isSearch = true; //by default
|
|
42
|
+
|
|
42
43
|
var _useState = (0, _react.useState)(""),
|
|
43
44
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44
45
|
searchText = _useState2[0],
|
|
@@ -47,18 +48,28 @@ var SimpleSelect = function SimpleSelect(_ref) {
|
|
|
47
48
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
48
49
|
noDataAvailable = _useState4[0],
|
|
49
50
|
setNoDataAvailable = _useState4[1];
|
|
51
|
+
var validateChildren = function validateChildren(type, searchText) {
|
|
52
|
+
if (_typeof(type) !== "object") {
|
|
53
|
+
return typeof type === "string" && type.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
|
|
54
|
+
}
|
|
55
|
+
if (_typeof(type.props) === "object" && Array.isArray(type.props.children)) {
|
|
56
|
+
return type.props.children.some(function (data) {
|
|
57
|
+
return validateChildren(data, searchText);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return false;
|
|
61
|
+
};
|
|
50
62
|
var containsText = function containsText(text, searchText) {
|
|
51
|
-
|
|
63
|
+
if (typeof text === "string" && typeof searchText === "string") {
|
|
64
|
+
return text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
|
|
65
|
+
}
|
|
66
|
+
if (_typeof(text) === "object" && text.props && Array.isArray(text.props.children)) {
|
|
67
|
+
return text.props.children.some(function (data) {
|
|
68
|
+
return validateChildren(data, searchText);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return false;
|
|
52
72
|
};
|
|
53
|
-
|
|
54
|
-
// const displayedOptions = useMemo(() => {
|
|
55
|
-
// return options
|
|
56
|
-
// .filter((option) => containsText(option.label, searchText))
|
|
57
|
-
// .map((option) => ({
|
|
58
|
-
// label: option.label,
|
|
59
|
-
// value: option.value,
|
|
60
|
-
// }));
|
|
61
|
-
// }, [options, searchText]);
|
|
62
73
|
var displayedOptions = (0, _react.useMemo)(function () {
|
|
63
74
|
var filteredOptions = options.filter(function (option) {
|
|
64
75
|
return containsText(option.label, searchText);
|
|
@@ -76,7 +87,6 @@ var SimpleSelect = function SimpleSelect(_ref) {
|
|
|
76
87
|
var recommendedOptions = isSearch ? displayedOptions : options;
|
|
77
88
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
|
|
78
89
|
sx: {
|
|
79
|
-
m: 1,
|
|
80
90
|
minWidth: 120
|
|
81
91
|
},
|
|
82
92
|
fullWidth: fullWidth,
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tenjin-ui-kit",
|
|
3
|
+
"version": "0.2.156",
|
|
4
|
+
"repository": {
|
|
5
|
+
"url": "https://gitlab.com/yethi/react/tenjin-ui-kit.git"
|
|
6
|
+
},
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@floating-ui/dom": "^1.2.1",
|
|
9
|
+
"@mantine/core": "^5.10.1",
|
|
10
|
+
"@mantine/hooks": "^5.10.1",
|
|
11
|
+
"@mantine/rte": "^5.10.1",
|
|
12
|
+
"@mui/icons-material": "^5.11.0",
|
|
13
|
+
"@mui/lab": "^5.0.0-alpha.116",
|
|
14
|
+
"@mui/styles": "^5.11.2",
|
|
15
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
16
|
+
"@testing-library/react": "^13.4.0",
|
|
17
|
+
"@testing-library/user-event": "^13.5.0",
|
|
18
|
+
"aria-hidden": "^1.2.2",
|
|
19
|
+
"axios": "^0.26.0",
|
|
20
|
+
"clsx": "^1.2.1",
|
|
21
|
+
"d3-hierarchy": "^3.1.2",
|
|
22
|
+
"feather-icons": "^4.29.0",
|
|
23
|
+
"final-form": "^4.20.9",
|
|
24
|
+
"material-ui-popup-state": "^5.0.8",
|
|
25
|
+
"moment": "^2.29.4",
|
|
26
|
+
"react-beautiful-dnd": "^13.1.1",
|
|
27
|
+
"react-dnd": "^16.0.1",
|
|
28
|
+
"react-dnd-html5-backend": "^16.0.1",
|
|
29
|
+
"react-dropzone": "^14.2.3",
|
|
30
|
+
"react-feather": "^2.0.10",
|
|
31
|
+
"react-final-form": "^6.5.9",
|
|
32
|
+
"react-flow-renderer": "^10.3.17",
|
|
33
|
+
"react-icons": "^4.10.1",
|
|
34
|
+
"react-moment": "^1.1.3",
|
|
35
|
+
"react-scripts": "5.0.1",
|
|
36
|
+
"react-select": "^5.7.4",
|
|
37
|
+
"react-sortable-hoc": "^2.0.0",
|
|
38
|
+
"reactflow": "^11.6.1",
|
|
39
|
+
"storybook-react-context": "^0.6.0",
|
|
40
|
+
"styled-components": "^5.3.9",
|
|
41
|
+
"uuid": "^9.0.0",
|
|
42
|
+
"web-vitals": "^2.1.4"
|
|
43
|
+
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"start": "react-scripts start",
|
|
46
|
+
"build": "react-scripts build",
|
|
47
|
+
"test": "react-scripts test",
|
|
48
|
+
"eject": "react-scripts eject",
|
|
49
|
+
"storybook": "start-storybook -p 6006 -s public",
|
|
50
|
+
"build-storybook": "build-storybook -s public",
|
|
51
|
+
"clean": "rimraf dist",
|
|
52
|
+
"compile": "npm run clean && cross-env NODE_ENV=production babel src/package --out-dir dist --copy-files --ignore __tests__,spec.js,test.js,stories.js,__snapshots__"
|
|
53
|
+
},
|
|
54
|
+
"eslintConfig": {
|
|
55
|
+
"extends": [
|
|
56
|
+
"react-app",
|
|
57
|
+
"react-app/jest"
|
|
58
|
+
],
|
|
59
|
+
"overrides": [
|
|
60
|
+
{
|
|
61
|
+
"files": [
|
|
62
|
+
"**/*.stories.*"
|
|
63
|
+
],
|
|
64
|
+
"rules": {
|
|
65
|
+
"import/no-anonymous-default-export": "off"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"browserslist": {
|
|
71
|
+
"production": [
|
|
72
|
+
">0.2%",
|
|
73
|
+
"not dead",
|
|
74
|
+
"not op_mini all"
|
|
75
|
+
],
|
|
76
|
+
"development": [
|
|
77
|
+
"last 1 chrome version",
|
|
78
|
+
"last 1 firefox version",
|
|
79
|
+
"last 1 safari version"
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"@babel/cli": "^7.20.7",
|
|
84
|
+
"@babel/preset-env": "^7.20.2",
|
|
85
|
+
"@babel/preset-react": "^7.18.6",
|
|
86
|
+
"@emotion/react": "^11.10.5",
|
|
87
|
+
"@emotion/styled": "^11.10.5",
|
|
88
|
+
"@mui/material": "^5.11.3",
|
|
89
|
+
"@storybook/addon-actions": "^6.5.15",
|
|
90
|
+
"@storybook/addon-essentials": "^6.5.15",
|
|
91
|
+
"@storybook/addon-interactions": "^6.5.15",
|
|
92
|
+
"@storybook/addon-links": "^6.5.15",
|
|
93
|
+
"@storybook/builder-webpack5": "^6.5.15",
|
|
94
|
+
"@storybook/manager-webpack5": "^6.5.15",
|
|
95
|
+
"@storybook/node-logger": "^6.5.15",
|
|
96
|
+
"@storybook/preset-create-react-app": "^4.1.2",
|
|
97
|
+
"@storybook/react": "^6.5.15",
|
|
98
|
+
"@storybook/testing-library": "^0.0.13",
|
|
99
|
+
"babel-plugin-named-exports-order": "^0.0.2",
|
|
100
|
+
"cross-env": "^7.0.3",
|
|
101
|
+
"prop-types": "^15.8.1",
|
|
102
|
+
"react": "^18.2.0",
|
|
103
|
+
"react-dom": "^18.2.0",
|
|
104
|
+
"react-router-dom": "^6.6.1",
|
|
105
|
+
"rimraf": "^3.0.2",
|
|
106
|
+
"webpack": "^5.75.0"
|
|
107
|
+
},
|
|
108
|
+
"peerDependencies": {
|
|
109
|
+
"@emotion/react": "^11.10.5",
|
|
110
|
+
"@emotion/styled": "^11.10.5",
|
|
111
|
+
"@mui/material": "^5.11.3",
|
|
112
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
113
|
+
"@testing-library/react": "^13.4.0",
|
|
114
|
+
"@testing-library/user-event": "^13.5.0",
|
|
115
|
+
"react": "^18.2.0",
|
|
116
|
+
"react-dom": "^18.2.0",
|
|
117
|
+
"react-router-dom": "^6.6.1"
|
|
118
|
+
}
|
|
119
|
+
}
|