@bigbinary/neeto-rules-frontend 0.3.6 → 0.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-rules-frontend",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
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",
package/types.d.ts CHANGED
@@ -1,3 +1,72 @@
1
1
  import React from "react";
2
2
 
3
- export const WelcomeScreen = React.FC<{}>;
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>;