tenjin-ui-kit 0.2.114 → 0.2.116
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 -13
- package/dist/README.md +13 -0
- package/{components → dist/components}/Canvas.js +46 -45
- package/{components → dist/components}/DragBox/index.js +2 -1
- package/{components → dist/components}/InputWithChip/index.js +20 -19
- package/{components → dist/components}/RightContext/index.css +20 -20
- package/{components → dist/components}/RightContext/index.js +14 -11
- package/{components → dist/components}/WorkFlow.js +4 -1
- package/{components → dist/components}/alert/index.js +7 -6
- package/{components → dist/components}/authenticationProvider/AuthError.js +2 -1
- package/{components → dist/components}/avatar/index.js +3 -2
- package/{components → dist/components}/breadCrumbs/index.js +13 -16
- package/{components → dist/components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +16 -3
- package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +3 -2
- package/{components → dist/components}/browsingTestCaseLayout/index.js +35 -8
- package/{components → dist/components}/browsingTestCaseLayout/style.css +82 -82
- package/{components → dist/components}/button/index.js +7 -4
- package/dist/components/checkBox/index.js +30 -0
- package/{components → dist/components}/divider/index.js +3 -2
- package/{components → dist/components}/editableField/index.js +6 -5
- package/{components → dist/components}/errorBoundary/index.js +9 -2
- package/{components → dist/components}/fileUploader/index.js +6 -3
- package/{components → dist/components}/input/index.js +17 -16
- package/{components → dist/components}/layout/sidebar/FlatMenu.js +2 -1
- package/{components → dist/components}/layout/sidebar/GroupedMenu.js +3 -2
- package/{components → dist/components}/layout/sidebar/ProjectMenu.js +12 -9
- package/{components → dist/components}/layout/topBar/ProjectTopbar.js +10 -9
- package/{components → dist/components}/layout/topBar/UserAvatar.js +4 -3
- package/{components → dist/components}/layout/topBar/index.js +7 -6
- package/{components → dist/components}/modal/index.js +2 -1
- package/{components → dist/components}/pagination/index.js +3 -2
- package/{components → dist/components}/select/index.js +20 -3
- package/{components → dist/components}/switch/index.js +7 -3
- package/{components → dist/components}/switch/switch.js +3 -2
- package/{components → dist/components}/table/index.js +16 -11
- package/{components → dist/components}/text/index.js +4 -3
- package/{components → dist/components}/topBar/index.js +3 -2
- package/{components → dist/components}/tree/index.js +8 -7
- package/{components → dist/components}/valuePicker/ValueSelector.js +4 -3
- package/{components → dist/components}/valuePicker/index.js +12 -4
- package/{components → dist/components}/wrapperLayout/main/sideBar/index.js +38 -33
- package/{components → dist/components}/wrapperLayout/topBar/UserAvatar.js +2 -1
- package/{components → dist/components}/wrapperLayout/topBar/index.js +3 -2
- package/dist/package.json +118 -0
- package/package.json +118 -118
- 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/components/checkBox/index.js +0 -26
- /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}/WorkFlowBuilder.js +0 -0
- /package/{components → dist/components}/alert/Style.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/styles.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/TreeViewLayout/TreeViewContent/Index.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +0 -0
- /package/{components → dist/components}/errorBoundary/Error.jpg +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}/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/index.js +0 -0
- /package/{components → dist/components}/layout/sidebar/style.js +0 -0
- /package/{components → dist/components}/loader/index.js +0 -0
- /package/{components → dist/components}/modal/Modal.js +0 -0
- /package/{components → dist/components}/modal/style.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}/richTextEditor/index.js +0 -0
- /package/{components → dist/components}/richTextEditor/style.js +0 -0
- /package/{components → dist/components}/switch/style.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}/tree/style.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/style.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/avatar.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("./") {
|
|
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
CHANGED
|
@@ -1,13 +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
|
+
# 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.
|
package/dist/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.
|
|
@@ -11,6 +11,7 @@ var _reactDndHtml5Backend = require("react-dnd-html5-backend");
|
|
|
11
11
|
var _WorkFlow = _interopRequireDefault(require("./WorkFlow"));
|
|
12
12
|
require("../../App.css");
|
|
13
13
|
var _material = require("@mui/material");
|
|
14
|
+
var _text = _interopRequireDefault(require("./text"));
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
16
|
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
17
|
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; }
|
|
@@ -33,10 +34,10 @@ var _default = Canvas;
|
|
|
33
34
|
exports.default = _default;
|
|
34
35
|
var WorkFlowList = [{
|
|
35
36
|
id: 1,
|
|
36
|
-
name:
|
|
37
|
+
name: "If Else Box"
|
|
37
38
|
}, {
|
|
38
39
|
id: 2,
|
|
39
|
-
name:
|
|
40
|
+
name: "Simple Text Box"
|
|
40
41
|
}];
|
|
41
42
|
var DragDrop = function DragDrop() {
|
|
42
43
|
var _useState = (0, _react.useState)([]),
|
|
@@ -45,7 +46,7 @@ var DragDrop = function DragDrop() {
|
|
|
45
46
|
setBoard = _useState2[1];
|
|
46
47
|
var _useDrop = (0, _reactDnd.useDrop)(function () {
|
|
47
48
|
return {
|
|
48
|
-
accept:
|
|
49
|
+
accept: "block",
|
|
49
50
|
drop: function drop(item) {
|
|
50
51
|
return addBlockToBoard(item.id, true);
|
|
51
52
|
},
|
|
@@ -90,12 +91,12 @@ var DragDrop = function DragDrop() {
|
|
|
90
91
|
}, board === null || board === void 0 ? void 0 : board.map(function (workflow, index) {
|
|
91
92
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
92
93
|
key: index
|
|
93
|
-
}, workflow.name ===
|
|
94
|
+
}, workflow.name === "If Else Box" ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
94
95
|
style: {
|
|
95
|
-
border:
|
|
96
|
-
padding:
|
|
97
|
-
display:
|
|
98
|
-
margin:
|
|
96
|
+
border: "1px solid black",
|
|
97
|
+
padding: "10px",
|
|
98
|
+
display: "inline-block",
|
|
99
|
+
margin: "1rem"
|
|
99
100
|
}
|
|
100
101
|
}, /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
101
102
|
item: true,
|
|
@@ -108,21 +109,21 @@ var DragDrop = function DragDrop() {
|
|
|
108
109
|
id: workflow.id
|
|
109
110
|
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
110
111
|
htmlFor: workflow.id
|
|
111
|
-
}, "If Input:"), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("input", {
|
|
112
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "If Input:")), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("input", {
|
|
112
113
|
id: workflow.id
|
|
113
114
|
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
114
115
|
htmlFor: workflow.id + 1
|
|
115
|
-
}, "Else Input:"), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("input", {
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "Else Input:")), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("input", {
|
|
116
117
|
id: workflow.id + 1
|
|
117
118
|
})), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
118
119
|
item: true,
|
|
119
120
|
xs: true
|
|
120
|
-
}, /*#__PURE__*/_react.default.createElement(AddNewBox, null))))) : workflow.name ===
|
|
121
|
+
}, /*#__PURE__*/_react.default.createElement(AddNewBox, null))))) : workflow.name === "Simple Text Box" ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
121
122
|
style: {
|
|
122
|
-
border:
|
|
123
|
-
padding:
|
|
124
|
-
display:
|
|
125
|
-
margin:
|
|
123
|
+
border: "1px solid black",
|
|
124
|
+
padding: "10px",
|
|
125
|
+
display: "inline-block",
|
|
126
|
+
margin: "1rem"
|
|
126
127
|
}
|
|
127
128
|
}, /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
128
129
|
item: true,
|
|
@@ -135,7 +136,7 @@ var DragDrop = function DragDrop() {
|
|
|
135
136
|
id: workflow.id
|
|
136
137
|
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
137
138
|
htmlFor: workflow.id
|
|
138
|
-
}, "Simple Input:"), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("input", null)), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
139
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "Simple Input:")), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("input", null)), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
139
140
|
item: true,
|
|
140
141
|
xs: true
|
|
141
142
|
}, /*#__PURE__*/_react.default.createElement(AddNewBox, null))))) : /*#__PURE__*/_react.default.createElement(_WorkFlow.default, {
|
|
@@ -158,10 +159,10 @@ var AddNewBox = function AddNewBox() {
|
|
|
158
159
|
setType = _useState6[1];
|
|
159
160
|
var addInputBox = function addInputBox() {
|
|
160
161
|
setInputBoxes([].concat(_toConsumableArray(inputBoxes), [{
|
|
161
|
-
label:
|
|
162
|
-
value:
|
|
162
|
+
label: "Text",
|
|
163
|
+
value: ""
|
|
163
164
|
}]));
|
|
164
|
-
setType(
|
|
165
|
+
setType("input");
|
|
165
166
|
};
|
|
166
167
|
var handleInputChange = function handleInputChange(index, event) {
|
|
167
168
|
var values = _toConsumableArray(inputBoxes);
|
|
@@ -170,13 +171,13 @@ var AddNewBox = function AddNewBox() {
|
|
|
170
171
|
};
|
|
171
172
|
var addIfElseInputBox = function addIfElseInputBox() {
|
|
172
173
|
setInputBoxes([].concat(_toConsumableArray(inputBoxes), [{
|
|
173
|
-
label:
|
|
174
|
-
value:
|
|
174
|
+
label: "If",
|
|
175
|
+
value: ""
|
|
175
176
|
}, {
|
|
176
|
-
label:
|
|
177
|
-
value:
|
|
177
|
+
label: "Else",
|
|
178
|
+
value: ""
|
|
178
179
|
}]));
|
|
179
|
-
setType(
|
|
180
|
+
setType("if_else");
|
|
180
181
|
};
|
|
181
182
|
|
|
182
183
|
// const handleIfElseInputChange = (index, event) => {
|
|
@@ -187,37 +188,37 @@ var AddNewBox = function AddNewBox() {
|
|
|
187
188
|
|
|
188
189
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
189
190
|
style: {
|
|
190
|
-
border:
|
|
191
|
-
padding:
|
|
192
|
-
display:
|
|
191
|
+
border: "1px solid black",
|
|
192
|
+
padding: "10px",
|
|
193
|
+
display: "inline-block"
|
|
193
194
|
}
|
|
194
195
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
195
196
|
style: {
|
|
196
|
-
display:
|
|
197
|
-
justifyContent:
|
|
198
|
-
alignItems:
|
|
197
|
+
display: "flex",
|
|
198
|
+
justifyContent: "center",
|
|
199
|
+
alignItems: "center"
|
|
199
200
|
}
|
|
200
201
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
201
202
|
style: {
|
|
202
|
-
fontSize:
|
|
203
|
-
cursor:
|
|
203
|
+
fontSize: "30px",
|
|
204
|
+
cursor: "pointer"
|
|
204
205
|
},
|
|
205
206
|
onClick: addInputBox,
|
|
206
207
|
title: "Add Text Box"
|
|
207
|
-
}, "+")), /*#__PURE__*/_react.default.createElement("div", {
|
|
208
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "+"))), /*#__PURE__*/_react.default.createElement("div", {
|
|
208
209
|
style: {
|
|
209
|
-
display:
|
|
210
|
-
justifyContent:
|
|
211
|
-
alignItems:
|
|
210
|
+
display: "flex",
|
|
211
|
+
justifyContent: "center",
|
|
212
|
+
alignItems: "center"
|
|
212
213
|
}
|
|
213
214
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
214
215
|
style: {
|
|
215
|
-
fontSize:
|
|
216
|
-
cursor:
|
|
216
|
+
fontSize: "30px",
|
|
217
|
+
cursor: "pointer"
|
|
217
218
|
},
|
|
218
219
|
onClick: addIfElseInputBox,
|
|
219
220
|
title: "Add If Else Box"
|
|
220
|
-
}, "+")), inputBoxes.map(function (box, index) {
|
|
221
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "+"))), inputBoxes.map(function (box, index) {
|
|
221
222
|
return /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
222
223
|
item: true,
|
|
223
224
|
container: true
|
|
@@ -226,19 +227,19 @@ var AddNewBox = function AddNewBox() {
|
|
|
226
227
|
xs: true
|
|
227
228
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
228
229
|
style: {
|
|
229
|
-
border:
|
|
230
|
-
padding:
|
|
231
|
-
display:
|
|
232
|
-
margin:
|
|
230
|
+
border: "1px solid black",
|
|
231
|
+
padding: "10px",
|
|
232
|
+
display: "inline-block",
|
|
233
|
+
margin: "0.5rem"
|
|
233
234
|
}
|
|
234
235
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
235
236
|
key: index,
|
|
236
237
|
style: {
|
|
237
|
-
marginTop:
|
|
238
|
+
marginTop: "1rem"
|
|
238
239
|
}
|
|
239
240
|
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
240
241
|
htmlFor: "".concat(type, "-").concat(index)
|
|
241
|
-
}, box.label), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("input", {
|
|
242
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, box.label)), /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("input", {
|
|
242
243
|
id: "".concat(type, "-").concat(index),
|
|
243
244
|
type: "text",
|
|
244
245
|
value: box.value,
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.DragBox = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactDnd = require("react-dnd");
|
|
9
|
+
var _text = _interopRequireDefault(require("../text"));
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
12
|
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."); }
|
|
@@ -39,6 +40,6 @@ var DragBox = function DragBox(_ref) {
|
|
|
39
40
|
opacity: opacity
|
|
40
41
|
},
|
|
41
42
|
"data-testid": "box"
|
|
42
|
-
}, name);
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, name));
|
|
43
44
|
};
|
|
44
45
|
exports.DragBox = DragBox;
|
|
@@ -11,6 +11,7 @@ var _material = require("@mui/material");
|
|
|
11
11
|
var _Clear = _interopRequireDefault(require("@mui/icons-material/Clear"));
|
|
12
12
|
var _styles = require("@mui/material/styles");
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _text = _interopRequireDefault(require("../text"));
|
|
14
15
|
var _excluded = ["value", "id", "onChange", "fullWidth", "label", "isRequired", "isDisabled", "errorMessage", "error", "initialValue"];
|
|
15
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
17
|
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); }
|
|
@@ -45,7 +46,7 @@ var InputWithChip = function InputWithChip(_ref) {
|
|
|
45
46
|
chips = _useState2[0],
|
|
46
47
|
setChips = _useState2[1];
|
|
47
48
|
var theme = (0, _styles.useTheme)();
|
|
48
|
-
var _useState3 = (0, _react.useState)(
|
|
49
|
+
var _useState3 = (0, _react.useState)(""),
|
|
49
50
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
50
51
|
txtValue = _useState4[0],
|
|
51
52
|
setTxtValue = _useState4[1];
|
|
@@ -56,17 +57,17 @@ var InputWithChip = function InputWithChip(_ref) {
|
|
|
56
57
|
}, [chips]);
|
|
57
58
|
var onTextValueChange = function onTextValueChange(e) {
|
|
58
59
|
var value = e.target.value.trim();
|
|
59
|
-
setTxtValue(value.replace(
|
|
60
|
+
setTxtValue(value.replace(",", ""));
|
|
60
61
|
};
|
|
61
62
|
var handleAddChip = function handleAddChip(event) {
|
|
62
|
-
if ((event.key ===
|
|
63
|
+
if ((event.key === "Enter" || event.keyCode === 32 || event.keyCode === 188 || event.keyCode === 9 || event.type === "blur") && event.target.value.replace(",", "")) {
|
|
63
64
|
var _value = event.target.value;
|
|
64
|
-
var newValue = typeof _value ===
|
|
65
|
+
var newValue = typeof _value === "string" ? _value.replace(",", "").trim() : _value.trim();
|
|
65
66
|
// if (chips.includes(newValue)) return; //add if any info or anything needs to be shown
|
|
66
67
|
setChips([].concat(_toConsumableArray(chips), [newValue]));
|
|
67
68
|
onChange([].concat(_toConsumableArray(chips), [newValue]));
|
|
68
|
-
setTxtValue(
|
|
69
|
-
event.target.parentNode.querySelector(
|
|
69
|
+
setTxtValue("");
|
|
70
|
+
event.target.parentNode.querySelector("input").value = "";
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
73
|
var handleDeleteChip = function handleDeleteChip(chipToDelete) {
|
|
@@ -76,21 +77,21 @@ var InputWithChip = function InputWithChip(_ref) {
|
|
|
76
77
|
});
|
|
77
78
|
});
|
|
78
79
|
};
|
|
79
|
-
console.log(chips,
|
|
80
|
+
console.log(chips, "0000000000000");
|
|
80
81
|
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
|
|
81
82
|
variant: "standard",
|
|
82
83
|
fullWidth: fullWidth
|
|
83
84
|
}, label && /*#__PURE__*/_react.default.createElement(_material.InputLabel, {
|
|
84
85
|
sx: {
|
|
85
86
|
fontWeight: 500,
|
|
86
|
-
|
|
87
|
-
color:
|
|
87
|
+
"& .MuiFormLabel-asterisk": {
|
|
88
|
+
color: "#FF0000"
|
|
88
89
|
}
|
|
89
90
|
},
|
|
90
91
|
size: "small",
|
|
91
92
|
shrink: true,
|
|
92
93
|
required: isRequired
|
|
93
|
-
}, label), /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({
|
|
94
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, label)), /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({
|
|
94
95
|
value: txtValue
|
|
95
96
|
}, rest, {
|
|
96
97
|
id: id,
|
|
@@ -101,23 +102,23 @@ var InputWithChip = function InputWithChip(_ref) {
|
|
|
101
102
|
if (!(chips !== null && chips !== void 0 && chips.length) > 0) {
|
|
102
103
|
setChips([]);
|
|
103
104
|
}
|
|
104
|
-
if (e.target.value !==
|
|
105
|
+
if (e.target.value !== "") {
|
|
105
106
|
handleAddChip(e);
|
|
106
107
|
}
|
|
107
108
|
},
|
|
108
109
|
style: {
|
|
109
|
-
backgroundColor: isDisabled &&
|
|
110
|
+
backgroundColor: isDisabled && "#E7E7E7"
|
|
110
111
|
},
|
|
111
112
|
sx: {
|
|
112
|
-
|
|
113
|
-
backgroundColor: isDisabled &&
|
|
113
|
+
"& MuiOutlinedInput": {
|
|
114
|
+
backgroundColor: isDisabled && "#E7E7E7"
|
|
114
115
|
},
|
|
115
|
-
|
|
116
|
+
"& input": {
|
|
116
117
|
// backgroundColor: isDisabled && '#E7E7E7',
|
|
117
|
-
color: isDisabled &&
|
|
118
|
+
color: isDisabled && "#000000"
|
|
118
119
|
},
|
|
119
120
|
marginTop: label ? theme.spacing(2.5) : 0,
|
|
120
|
-
|
|
121
|
+
"& label": {
|
|
121
122
|
fontWeight: 500
|
|
122
123
|
}
|
|
123
124
|
},
|
|
@@ -128,7 +129,7 @@ var InputWithChip = function InputWithChip(_ref) {
|
|
|
128
129
|
startAdornment: chips.map(function (chip, index) {
|
|
129
130
|
return /*#__PURE__*/_react.default.createElement(_Chip.default, {
|
|
130
131
|
key: "".concat(chip, "-").concat(index),
|
|
131
|
-
label: chip,
|
|
132
|
+
label: /*#__PURE__*/_react.default.createElement(_text.default, null, chip),
|
|
132
133
|
onDelete: function onDelete() {
|
|
133
134
|
return handleDeleteChip(chip);
|
|
134
135
|
},
|
|
@@ -136,7 +137,7 @@ var InputWithChip = function InputWithChip(_ref) {
|
|
|
136
137
|
fontSize: "small"
|
|
137
138
|
}),
|
|
138
139
|
style: {
|
|
139
|
-
margin:
|
|
140
|
+
margin: "0.2rem"
|
|
140
141
|
},
|
|
141
142
|
size: "small"
|
|
142
143
|
});
|
|
@@ -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
|
+
}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
require("./index.css");
|
|
9
|
+
var _text = _interopRequireDefault(require("../text"));
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
12
|
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."); }
|
|
@@ -45,13 +46,15 @@ var RightContext = function RightContext() {
|
|
|
45
46
|
var initMenu = function initMenu(chosen) {
|
|
46
47
|
setChosen(chosen);
|
|
47
48
|
};
|
|
48
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
|
49
|
-
|
|
49
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
50
|
+
variant: "h3"
|
|
50
51
|
}, "React Right Click Context Menu Example"), /*#__PURE__*/_react.default.createElement("div", {
|
|
51
52
|
className: "contextContainer",
|
|
52
53
|
onContextMenu: showNav,
|
|
53
54
|
onClick: hideContext
|
|
54
|
-
}, chosen && /*#__PURE__*/_react.default.createElement(
|
|
55
|
+
}, chosen && /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
56
|
+
variant: "h4"
|
|
57
|
+
}, "\"", chosen, "\" is chosen"), context && /*#__PURE__*/_react.default.createElement("div", {
|
|
55
58
|
style: {
|
|
56
59
|
top: xYPosistion.y,
|
|
57
60
|
left: xYPosistion.x
|
|
@@ -60,24 +63,24 @@ var RightContext = function RightContext() {
|
|
|
60
63
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
61
64
|
className: "menuElement",
|
|
62
65
|
onClick: function onClick() {
|
|
63
|
-
return initMenu(
|
|
66
|
+
return initMenu("New");
|
|
64
67
|
}
|
|
65
|
-
}, "Refactor"), /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "Refactor")), /*#__PURE__*/_react.default.createElement("div", {
|
|
66
69
|
className: "menuElement",
|
|
67
70
|
onClick: function onClick() {
|
|
68
|
-
return initMenu(
|
|
71
|
+
return initMenu("Delete");
|
|
69
72
|
}
|
|
70
|
-
}, "Cut"), /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "Cut")), /*#__PURE__*/_react.default.createElement("div", {
|
|
71
74
|
className: "menuElement",
|
|
72
75
|
onClick: function onClick() {
|
|
73
|
-
return initMenu(
|
|
76
|
+
return initMenu("Copy");
|
|
74
77
|
}
|
|
75
|
-
}, "Copy"), /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "Copy")), /*#__PURE__*/_react.default.createElement("div", {
|
|
76
79
|
className: "menuElement",
|
|
77
80
|
onClick: function onClick() {
|
|
78
|
-
return initMenu(
|
|
81
|
+
return initMenu("Paste");
|
|
79
82
|
}
|
|
80
|
-
}, "Paste"))));
|
|
83
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, "Paste")))));
|
|
81
84
|
};
|
|
82
85
|
var _default = RightContext;
|
|
83
86
|
exports.default = _default;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactDnd = require("react-dnd");
|
|
9
|
+
var _text = _interopRequireDefault(require("./text"));
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
12
|
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."); }
|
|
@@ -38,7 +39,9 @@ var WorkFlow = function WorkFlow(props) {
|
|
|
38
39
|
style: {
|
|
39
40
|
border: isDragging ? '5px solid pink' : '0px'
|
|
40
41
|
}
|
|
41
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
43
|
+
variant: "h4"
|
|
44
|
+
}, "WorkFlow- ".concat(name)));
|
|
42
45
|
};
|
|
43
46
|
var _default = WorkFlow;
|
|
44
47
|
exports.default = _default;
|
|
@@ -11,6 +11,7 @@ var _Alert = _interopRequireDefault(require("@mui/material/Alert"));
|
|
|
11
11
|
var _Slide = _interopRequireDefault(require("@mui/material/Slide"));
|
|
12
12
|
var _Grow = _interopRequireDefault(require("@mui/material/Grow"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _text = _interopRequireDefault(require("../text"));
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
16
|
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
17
|
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; }
|
|
@@ -46,8 +47,8 @@ function AlertIndex(props) {
|
|
|
46
47
|
onClose: handleClose,
|
|
47
48
|
message: props.alert.message,
|
|
48
49
|
anchorOrigin: {
|
|
49
|
-
vertical:
|
|
50
|
-
horizontal:
|
|
50
|
+
vertical: "bottom",
|
|
51
|
+
horizontal: "center"
|
|
51
52
|
},
|
|
52
53
|
TransitionComponent: props.SlideTransition ? SlideTransition : GrowTransition,
|
|
53
54
|
autoHideDuration: 6000
|
|
@@ -55,14 +56,14 @@ function AlertIndex(props) {
|
|
|
55
56
|
onClose: handleClose,
|
|
56
57
|
severity: props.alert.type,
|
|
57
58
|
sx: {
|
|
58
|
-
width:
|
|
59
|
+
width: "100%"
|
|
59
60
|
}
|
|
60
|
-
}, props.alert.message)));
|
|
61
|
+
}, /*#__PURE__*/React.createElement(_text.default, null, props.alert.message))));
|
|
61
62
|
}
|
|
62
63
|
AlertIndex.propTypes = {
|
|
63
|
-
alert: _propTypes.default.oneOf([
|
|
64
|
+
alert: _propTypes.default.oneOf(["success", "error", "warning"]),
|
|
64
65
|
SlideTransition: _propTypes.default.bool
|
|
65
66
|
};
|
|
66
67
|
AlertIndex.defaultProps = {
|
|
67
|
-
alert:
|
|
68
|
+
alert: "success"
|
|
68
69
|
};
|