@bigbinary/neeto-rules-frontend 0.6.5 → 0.7.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/README.md +18 -0
- package/app/javascript/src/translations/en.json +10 -4
- package/dist/index.cjs.js +11789 -2294
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +11868 -2376
- package/dist/index.js.map +1 -1
- package/package.json +8 -7
- package/types.d.ts +106 -46
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-rules-frontend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@bigbinary/eslint-plugin-neeto": "1.5.1",
|
|
52
52
|
"@bigbinary/neeto-audit-frontend": "2.0.11",
|
|
53
53
|
"@bigbinary/neeto-cist": "1.0.9",
|
|
54
|
-
"@bigbinary/neeto-commons-frontend": "3.
|
|
54
|
+
"@bigbinary/neeto-commons-frontend": "3.5.3",
|
|
55
55
|
"@bigbinary/neeto-filters-frontend": "3.3.4",
|
|
56
56
|
"@bigbinary/neeto-hotkeys": "^1.0.1",
|
|
57
|
-
"@bigbinary/neeto-icons": "1.18.
|
|
58
|
-
"@bigbinary/neeto-molecules": "1.
|
|
57
|
+
"@bigbinary/neeto-icons": "1.18.9",
|
|
58
|
+
"@bigbinary/neeto-molecules": "1.18.0",
|
|
59
59
|
"@bigbinary/neetoui": "6.5.13",
|
|
60
60
|
"@emotion/is-prop-valid": "1.2.0",
|
|
61
61
|
"@faker-js/faker": "8.2.0",
|
|
@@ -156,12 +156,12 @@
|
|
|
156
156
|
},
|
|
157
157
|
"peerDependencies": {
|
|
158
158
|
"@bigbinary/neeto-cist": "latest",
|
|
159
|
-
"@bigbinary/neeto-commons-frontend": "3.
|
|
159
|
+
"@bigbinary/neeto-commons-frontend": "3.5.3",
|
|
160
160
|
"@bigbinary/neeto-editor": "^1.26.3",
|
|
161
161
|
"@bigbinary/neeto-filters-frontend": "3.3.4",
|
|
162
162
|
"@bigbinary/neeto-hotkeys": "^1.0.1",
|
|
163
|
-
"@bigbinary/neeto-icons": "1.18.
|
|
164
|
-
"@bigbinary/neeto-molecules": "1.
|
|
163
|
+
"@bigbinary/neeto-icons": "1.18.9",
|
|
164
|
+
"@bigbinary/neeto-molecules": "1.18.0",
|
|
165
165
|
"@bigbinary/neetoui": "6.5.13",
|
|
166
166
|
"@honeybadger-io/js": "^6.5.3",
|
|
167
167
|
"@honeybadger-io/react": "^6.1.9",
|
|
@@ -192,6 +192,7 @@
|
|
|
192
192
|
"yarn": ">=1.22"
|
|
193
193
|
},
|
|
194
194
|
"dependencies": {
|
|
195
|
+
"@hello-pangea/dnd": "16.3.0",
|
|
195
196
|
"babel-plugin-transform-imports": "^2.0.0",
|
|
196
197
|
"react-router-nav-prompt": "0.4.1",
|
|
197
198
|
"source-map-loader": "^4.0.1",
|
package/types.d.ts
CHANGED
|
@@ -1,72 +1,132 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
3
|
+
import {
|
|
4
|
+
InputProps,
|
|
5
|
+
RadioProps,
|
|
6
|
+
SelectProps,
|
|
7
|
+
TextareaProps,
|
|
8
|
+
TooltipProps,
|
|
9
|
+
} from "neetoui";
|
|
10
|
+
import { FieldHelperProps } from "formik";
|
|
10
11
|
|
|
11
|
-
interface
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
interface commonInputProps {
|
|
13
|
+
data: Record<string, any>;
|
|
14
|
+
label?: string;
|
|
15
|
+
name: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
interface
|
|
18
|
+
interface eventOptionsProps {
|
|
19
|
+
applyOn: string[];
|
|
18
20
|
label: string;
|
|
19
21
|
value: string;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
|
-
interface
|
|
23
|
-
|
|
24
|
+
interface eventsProps {
|
|
25
|
+
eventOptions: eventOptionsProps[];
|
|
24
26
|
value: string;
|
|
25
|
-
allowMatching?: string[];
|
|
26
|
-
dropDownOptions?: dropDownOption[];
|
|
27
|
-
kind?: string;
|
|
28
|
-
type: string;
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
interface
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
interface ruleDetailsProps {
|
|
30
|
+
conditions: { value: string };
|
|
31
|
+
description: { value: string };
|
|
32
|
+
events: eventsProps;
|
|
33
|
+
name: { value: string };
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
interface
|
|
36
|
+
interface selectOptionsProps {
|
|
37
37
|
label: string;
|
|
38
38
|
value: string;
|
|
39
|
-
placeholder?: string;
|
|
40
|
-
fieldType?: string;
|
|
41
|
-
updateFieldKey?: string;
|
|
42
|
-
dropDownOptions?: dropDownOption[];
|
|
43
|
-
defaultData?: Record<string, any>;
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
interface ActionsProps {
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
interface ActionsProps extends commonInputProps {
|
|
42
|
+
handleSlackChannelRefresh?: () => void;
|
|
43
|
+
selectedActionOptions?:
|
|
44
|
+
| selectOptionsProps[]
|
|
45
|
+
| ((selectedField: Record<string, any>[]) => selectOptionsProps[]);
|
|
46
|
+
showAddButton?: boolean;
|
|
47
|
+
onSelectAction?: () => void;
|
|
48
|
+
routeToSlackIntegration?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface CardProps {
|
|
52
|
+
children: React.ReactNode | (() => React.ReactNode);
|
|
53
|
+
title: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface ConditionsProps {
|
|
57
|
+
allowEmpty?: boolean;
|
|
58
|
+
data: Record<string, any>;
|
|
59
|
+
isCallback?: boolean;
|
|
60
|
+
isWithEvents?: boolean;
|
|
61
|
+
name: string;
|
|
62
|
+
previewCallback?: (conditions: Record<string, any>[]) => void;
|
|
63
|
+
selectedConditionOptions?:
|
|
64
|
+
| selectOptionsProps[]
|
|
65
|
+
| ((selectedField: Record<string, any>[]) => selectOptionsProps[]);
|
|
66
|
+
onSelectCondition?: (name: string, option: selectOptionsProps) => void;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface EventConditionsProps extends ConditionsProps {
|
|
70
|
+
addButtonTooltipProps?: TooltipProps;
|
|
71
|
+
conditionsName: string;
|
|
72
|
+
performerName: string;
|
|
73
|
+
onSelectEvent?: (name: string, option: selectOptionsProps) => void;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
interface EventsProps extends ConditionsProps {
|
|
77
|
+
performerName: string;
|
|
78
|
+
onSelectEvent?: (name: string, option: selectOptionsProps) => void;
|
|
49
79
|
}
|
|
50
80
|
|
|
81
|
+
interface InputFieldProps extends commonInputProps, InputProps {}
|
|
82
|
+
|
|
83
|
+
interface NeetoRulesProps {
|
|
84
|
+
data?: Record<string, any>;
|
|
85
|
+
children?: React.ReactNode | (() => React.ReactNode);
|
|
86
|
+
className?: string;
|
|
87
|
+
handleSubmit?: () => void;
|
|
88
|
+
handleCancel?: () => void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface RadioFieldProps extends commonInputProps, RadioProps {
|
|
92
|
+
options?: selectOptionsProps[];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface RulePreviewProps {
|
|
96
|
+
isLoading: boolean;
|
|
97
|
+
ruleDetails: ruleDetailsProps;
|
|
98
|
+
isOpen: boolean;
|
|
99
|
+
onClose: () => void;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface SelectFieldProps extends commonInputProps, SelectProps {
|
|
103
|
+
options?: selectOptionsProps[];
|
|
104
|
+
onChange?: (
|
|
105
|
+
options: selectOptionsProps[],
|
|
106
|
+
setValue: FieldHelperProps["setValue"]
|
|
107
|
+
) => void;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface TextareaFieldProps extends commonInputProps, TextareaProps {}
|
|
111
|
+
|
|
112
|
+
export const NeetoRulesForm: React.FC<NeetoRulesProps> & {
|
|
113
|
+
Actions: React.FC<ActionsProps>;
|
|
114
|
+
Card: React.FC<CardProps>;
|
|
115
|
+
Conditions: React.FC<ConditionsProps>;
|
|
116
|
+
EventConditions: React.FC<EventConditionsProps>;
|
|
117
|
+
Events: React.FC<EventsProps>;
|
|
118
|
+
InputField: React.FC<InputFieldProps>;
|
|
119
|
+
MultiSelectField: React.FC<SelectFieldProps>;
|
|
120
|
+
RadioField: React.FC<RadioFieldProps>;
|
|
121
|
+
SelectField: React.FC<SelectFieldProps>;
|
|
122
|
+
TextareaField: React.FC<TextareaFieldProps>;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export const RulePreview: React.FC<RulePreviewProps>;
|
|
126
|
+
|
|
51
127
|
export const useCustomDataStore: UseBoundStore<
|
|
52
128
|
StoreApi<{
|
|
53
129
|
customData: object;
|
|
54
130
|
setCustomDataState: () => void;
|
|
55
131
|
}>
|
|
56
132
|
>;
|
|
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>;
|