@bigbinary/neeto-rules-frontend 0.3.6 → 0.4.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/dist/index.cjs.js +463 -460
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +463 -461
- package/dist/index.js.map +1 -1
- package/package.json +77 -71
- package/types.d.ts +70 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-rules-frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A repo acts as the source of truth for the new nano's structure, configs, data etc.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/bigbinary/neeto-rules-nano",
|
|
@@ -19,11 +19,14 @@
|
|
|
19
19
|
"types": "types.d.ts",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "NODE_ENV=production rollup -c --environment production",
|
|
22
|
+
"build-preview": "NODE_ENV=production webpack",
|
|
22
23
|
"prepare": "husky install",
|
|
23
|
-
"release": "yarn build && yalc push --sig"
|
|
24
|
-
"build-preview": "NODE_ENV=production webpack"
|
|
24
|
+
"release": "yarn build && yalc push --sig"
|
|
25
25
|
},
|
|
26
26
|
"lint-staged": {
|
|
27
|
+
"./**/*.rb": [
|
|
28
|
+
"bundle exec rubocop -a --force-exclusion"
|
|
29
|
+
],
|
|
27
30
|
"./**/app/javascript/**/*.{js,jsx,json}": [
|
|
28
31
|
"prettier --write",
|
|
29
32
|
"eslint --fix"
|
|
@@ -32,43 +35,42 @@
|
|
|
32
35
|
"prettier --write",
|
|
33
36
|
"eslint --fix"
|
|
34
37
|
],
|
|
35
|
-
"./**/*.rb": [
|
|
36
|
-
"bundle exec rubocop -a --force-exclusion"
|
|
37
|
-
],
|
|
38
38
|
"{Gemfile,Rakefile,config.ru}": [
|
|
39
39
|
"bundle exec rubocop -a --force-exclusion"
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@babel/core": "7.
|
|
44
|
-
"@babel/eslint-parser": "7.22.
|
|
45
|
-
"@babel/plugin-transform-runtime": "7.
|
|
46
|
-
"@babel/preset-env": "7.
|
|
47
|
-
"@babel/preset-react": "7.22.
|
|
48
|
-
"@babel/preset-typescript": "7.
|
|
49
|
-
"@babel/runtime": "7.
|
|
50
|
-
"@bigbinary/babel-preset-neeto": "1.0.
|
|
51
|
-
"@bigbinary/eslint-plugin-neeto": "1.1.
|
|
52
|
-
"@bigbinary/neeto-audit-frontend": "
|
|
53
|
-
"@bigbinary/neeto-cist": "
|
|
54
|
-
"@bigbinary/neeto-commons-frontend": "
|
|
55
|
-
"@bigbinary/neeto-
|
|
56
|
-
"@bigbinary/neeto-
|
|
57
|
-
"@bigbinary/
|
|
43
|
+
"@babel/core": "7.23.2",
|
|
44
|
+
"@babel/eslint-parser": "7.22.15",
|
|
45
|
+
"@babel/plugin-transform-runtime": "7.23.2",
|
|
46
|
+
"@babel/preset-env": "7.23.2",
|
|
47
|
+
"@babel/preset-react": "7.22.15",
|
|
48
|
+
"@babel/preset-typescript": "7.23.2",
|
|
49
|
+
"@babel/runtime": "7.23.2",
|
|
50
|
+
"@bigbinary/babel-preset-neeto": "1.0.6",
|
|
51
|
+
"@bigbinary/eslint-plugin-neeto": "1.1.41",
|
|
52
|
+
"@bigbinary/neeto-audit-frontend": "2.0.9",
|
|
53
|
+
"@bigbinary/neeto-cist": "1.0.8",
|
|
54
|
+
"@bigbinary/neeto-commons-frontend": "3.1.10",
|
|
55
|
+
"@bigbinary/neeto-filters-frontend": "3.0.15",
|
|
56
|
+
"@bigbinary/neeto-icons": "1.17.11",
|
|
57
|
+
"@bigbinary/neeto-molecules": "1.6.3",
|
|
58
|
+
"@bigbinary/neetoui": "6.1.2",
|
|
58
59
|
"@emotion/is-prop-valid": "1.2.0",
|
|
59
|
-
"@faker-js/faker": "8.0
|
|
60
|
-
"@honeybadger-io/
|
|
61
|
-
"@
|
|
62
|
-
"@rollup/plugin-
|
|
63
|
-
"@rollup/plugin-
|
|
64
|
-
"@rollup/plugin-
|
|
65
|
-
"@rollup/plugin-
|
|
66
|
-
"@rollup/plugin-
|
|
67
|
-
"@
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
60
|
+
"@faker-js/faker": "8.2.0",
|
|
61
|
+
"@honeybadger-io/js": "6.5.3",
|
|
62
|
+
"@honeybadger-io/react": "6.1.9",
|
|
63
|
+
"@rollup/plugin-alias": "5.0.1",
|
|
64
|
+
"@rollup/plugin-babel": "6.0.4",
|
|
65
|
+
"@rollup/plugin-commonjs": "25.0.7",
|
|
66
|
+
"@rollup/plugin-json": "6.0.1",
|
|
67
|
+
"@rollup/plugin-node-resolve": "15.2.3",
|
|
68
|
+
"@rollup/plugin-replace": "5.0.4",
|
|
69
|
+
"@svgr/rollup": "8.1.0",
|
|
70
|
+
"antd": "5.10.2",
|
|
71
|
+
"autoprefixer": "10.4.16",
|
|
72
|
+
"axios": "1.6.0",
|
|
73
|
+
"babel-loader": "9.1.3",
|
|
72
74
|
"babel-plugin-istanbul": "6.1.1",
|
|
73
75
|
"babel-plugin-js-logger": "1.0.17",
|
|
74
76
|
"babel-plugin-macros": "3.1.0",
|
|
@@ -83,28 +85,28 @@
|
|
|
83
85
|
"css-loader": "6.8.1",
|
|
84
86
|
"dompurify": "3.0.2",
|
|
85
87
|
"dotenv-webpack": "^8.0.1",
|
|
86
|
-
"eslint": "8.
|
|
87
|
-
"eslint-config-prettier": "8.
|
|
88
|
-
"eslint-plugin-cypress": "2.
|
|
89
|
-
"eslint-plugin-import": "2.
|
|
88
|
+
"eslint": "8.52.0",
|
|
89
|
+
"eslint-config-prettier": "8.5.0",
|
|
90
|
+
"eslint-plugin-cypress": "2.15.1",
|
|
91
|
+
"eslint-plugin-import": "2.29.0",
|
|
90
92
|
"eslint-plugin-jam3": "0.2.3",
|
|
91
93
|
"eslint-plugin-json": "3.1.0",
|
|
92
|
-
"eslint-plugin-prettier": "4.
|
|
94
|
+
"eslint-plugin-prettier": "4.0.0",
|
|
93
95
|
"eslint-plugin-promise": "6.1.1",
|
|
94
|
-
"eslint-plugin-react": "7.
|
|
96
|
+
"eslint-plugin-react": "7.33.2",
|
|
95
97
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
96
98
|
"eslint-plugin-security": "^1.7.1",
|
|
97
99
|
"eslint-plugin-sonarjs": "^0.21.0",
|
|
98
|
-
"eslint-plugin-unused-imports": "
|
|
100
|
+
"eslint-plugin-unused-imports": "3.0.0",
|
|
99
101
|
"eslint-plugin-xss": "^0.1.12",
|
|
100
|
-
"formik": "2.4.
|
|
102
|
+
"formik": "2.4.5",
|
|
101
103
|
"html-webpack-plugin": "5.5.3",
|
|
102
104
|
"https-browserify": "1.0.0",
|
|
103
105
|
"husky": "8.0.3",
|
|
104
|
-
"i18next": "23.
|
|
106
|
+
"i18next": "23.6.0",
|
|
105
107
|
"i18next-browser-languagedetector": "7.0.1",
|
|
106
108
|
"js-logger": "1.6.1",
|
|
107
|
-
"lint-staged": "
|
|
109
|
+
"lint-staged": "15.0.2",
|
|
108
110
|
"mini-css-extract-plugin": "2.7.6",
|
|
109
111
|
"mixpanel-browser": "2.47.0",
|
|
110
112
|
"os-browserify": "0.3.0",
|
|
@@ -112,31 +114,33 @@
|
|
|
112
114
|
"postcss": "8.4.31",
|
|
113
115
|
"postcss-import": "15.1.0",
|
|
114
116
|
"postcss-loader": "7.3.3",
|
|
115
|
-
"postcss-preset-env": "9.
|
|
116
|
-
"prettier": "2.
|
|
117
|
-
"prettier-plugin-tailwindcss": "0.
|
|
117
|
+
"postcss-preset-env": "9.2.0",
|
|
118
|
+
"prettier": "2.6.2",
|
|
119
|
+
"prettier-plugin-tailwindcss": "0.1.10",
|
|
118
120
|
"process": "0.11.10",
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"react
|
|
121
|
+
"qs": "6.11.2",
|
|
122
|
+
"ramda": "0.29.1",
|
|
123
|
+
"react": "18.2.0",
|
|
124
|
+
"react-dom": "18.2.0",
|
|
122
125
|
"react-helmet": "6.1.0",
|
|
123
|
-
"react-i18next": "13.
|
|
126
|
+
"react-i18next": "13.3.1",
|
|
124
127
|
"react-query": "3.39.3",
|
|
125
|
-
"react-router-dom": "5.3.
|
|
126
|
-
"react-toastify": "8.0
|
|
128
|
+
"react-router-dom": "5.3.4",
|
|
129
|
+
"react-toastify": "8.2.0",
|
|
127
130
|
"react_ujs": "^3.1.1",
|
|
128
131
|
"rollup": "2.79.1",
|
|
129
132
|
"rollup-plugin-analyzer": "4.0.0",
|
|
130
133
|
"rollup-plugin-cleaner": "1.0.0",
|
|
134
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
131
135
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
132
136
|
"rollup-plugin-styles": "4.0.0",
|
|
133
|
-
"sass": "1.
|
|
137
|
+
"sass": "1.69.5",
|
|
134
138
|
"sass-loader": "13.3.2",
|
|
135
139
|
"shakapacker": "6.6.0",
|
|
136
140
|
"stream-browserify": "3.0.0",
|
|
137
141
|
"stream-http": "3.2.0",
|
|
138
142
|
"style-loader": "3.3.3",
|
|
139
|
-
"tailwindcss": "
|
|
143
|
+
"tailwindcss": "3.4.1",
|
|
140
144
|
"tty-browserify": "0.0.1",
|
|
141
145
|
"url": "0.11.1",
|
|
142
146
|
"util": "0.12.5",
|
|
@@ -145,30 +149,32 @@
|
|
|
145
149
|
"webpack-assets-manifest": "5.1.0",
|
|
146
150
|
"webpack-cli": "5.1.4",
|
|
147
151
|
"webpack-dev-server": "4.15.1",
|
|
148
|
-
"yup": "
|
|
152
|
+
"yup": "1.3.2"
|
|
149
153
|
},
|
|
150
154
|
"peerDependencies": {
|
|
151
155
|
"@bigbinary/neeto-cist": "latest",
|
|
152
|
-
"@bigbinary/neeto-commons-frontend": "
|
|
156
|
+
"@bigbinary/neeto-commons-frontend": "3.1.10",
|
|
153
157
|
"@bigbinary/neeto-editor": "^1.26.3",
|
|
154
|
-
"@bigbinary/neeto-
|
|
155
|
-
"@bigbinary/neeto-
|
|
156
|
-
"@bigbinary/
|
|
157
|
-
"@
|
|
158
|
-
"
|
|
158
|
+
"@bigbinary/neeto-filters-frontend": "3.0.15",
|
|
159
|
+
"@bigbinary/neeto-icons": "1.17.11",
|
|
160
|
+
"@bigbinary/neeto-molecules": "1.6.3",
|
|
161
|
+
"@bigbinary/neetoui": "6.1.2",
|
|
162
|
+
"@honeybadger-io/js": "^6.5.3",
|
|
163
|
+
"@honeybadger-io/react": "^6.1.9",
|
|
164
|
+
"axios": "^1.6.0",
|
|
159
165
|
"classnames": "^2.3.2",
|
|
160
|
-
"formik": "^2.
|
|
161
|
-
"i18next": "23.
|
|
166
|
+
"formik": "^2.4.5",
|
|
167
|
+
"i18next": "^23.6.0",
|
|
162
168
|
"js-logger": "^1.6.1",
|
|
163
169
|
"mixpanel-browser": "^2.45.0",
|
|
164
|
-
"ramda": "^0.29.
|
|
165
|
-
"react": "18.2.0",
|
|
166
|
-
"react-dom": "18.2.0",
|
|
170
|
+
"ramda": "^0.29.1",
|
|
171
|
+
"react": "^18.2.0",
|
|
172
|
+
"react-dom": "^18.2.0",
|
|
167
173
|
"react-helmet": "^6.1.0",
|
|
168
|
-
"react-i18next": "13.
|
|
169
|
-
"react-query": "3.39.
|
|
170
|
-
"react-router-dom": "5.3.
|
|
171
|
-
"react-toastify": "8.2.0",
|
|
174
|
+
"react-i18next": "^13.3.1",
|
|
175
|
+
"react-query": "^3.39.3",
|
|
176
|
+
"react-router-dom": "^5.3.4",
|
|
177
|
+
"react-toastify": "^8.2.0",
|
|
172
178
|
"yup": "^0.32.11",
|
|
173
179
|
"zustand": "4.3.2"
|
|
174
180
|
},
|
package/types.d.ts
CHANGED
|
@@ -1,3 +1,72 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface NeetoRulesProps {
|
|
4
|
+
data?: Record<string, any>;
|
|
5
|
+
children?: React.ReactNode | (() => React.ReactNode);
|
|
6
|
+
className?: string;
|
|
7
|
+
handleSubmit?: () => void;
|
|
8
|
+
handleCancel?: () => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface RulesFormProps {
|
|
12
|
+
onSubmit?: () => void;
|
|
13
|
+
initialRules?: Record<string, any>;
|
|
14
|
+
[otherProps: string]: any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface dropDownOption {
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ConditionOption {
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
allowMatching?: string[];
|
|
26
|
+
dropDownOptions?: dropDownOption[];
|
|
27
|
+
kind?: string;
|
|
28
|
+
type: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface ConditionsProps {
|
|
32
|
+
dropdownOption: ConditionOption[];
|
|
33
|
+
[otherProps: string]: any;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface ActionsOption {
|
|
37
|
+
label: string;
|
|
38
|
+
value: string;
|
|
39
|
+
placeholder?: string;
|
|
40
|
+
fieldType?: string;
|
|
41
|
+
updateFieldKey?: string;
|
|
42
|
+
dropDownOptions?: dropDownOption[];
|
|
43
|
+
defaultData?: Record<string, any>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface ActionsProps {
|
|
47
|
+
actionOptions: ActionsOption[];
|
|
48
|
+
[otherProps: string]: any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const useCustomDataStore: UseBoundStore<
|
|
52
|
+
StoreApi<{
|
|
53
|
+
customData: object;
|
|
54
|
+
setCustomDataState: () => void;
|
|
55
|
+
}>
|
|
56
|
+
>;
|
|
57
|
+
|
|
58
|
+
export const NeetoRulesForm : React.FC<NeetoRulesProps> & {
|
|
59
|
+
InputField: React.FC<>;
|
|
60
|
+
TextareaField: React.FC<>;
|
|
61
|
+
SelectField: React.FC<>;
|
|
62
|
+
RadioField: React.FC<>;
|
|
63
|
+
Events: React.FC<>;
|
|
64
|
+
Conditions: React.FC<>;
|
|
65
|
+
Actions: React.FC<>;
|
|
66
|
+
Card: React.FC<>;
|
|
67
|
+
MultiSelectField: React.FC<>;
|
|
68
|
+
EventConditions: React.FC<>;
|
|
69
|
+
};
|
|
70
|
+
export const RulesForm : React.FC<RulesFormProps>;
|
|
71
|
+
export const Actions : React.FC<ActionsProps>;
|
|
72
|
+
export const Conditions : React.FC<ConditionsProps>;
|