@sparrowengg/integrations-templates-frontend 1.9.84-beta.1 → 1.9.84-beta.11
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/cjs/_virtual/index10.js +2 -2
- package/dist/cjs/_virtual/index9.js +2 -2
- package/dist/cjs/authentication/constants/index.js +115 -1
- package/dist/cjs/authentication/constants/index.js.map +1 -1
- package/dist/cjs/authentication/index.js +36 -32
- package/dist/cjs/authentication/index.js.map +1 -1
- package/dist/cjs/commons/components/NamingModal.js +82 -0
- package/dist/cjs/commons/components/NamingModal.js.map +1 -0
- package/dist/cjs/commons/constants/enhanced.js +12 -0
- package/dist/cjs/commons/constants/enhanced.js.map +1 -0
- package/dist/cjs/commons/constants/index.js +7 -1
- package/dist/cjs/commons/constants/index.js.map +1 -1
- package/dist/cjs/contact-import/components/contact-import-configure.js.map +1 -1
- package/dist/cjs/contact-import/components/contact-import-mapping.js +10 -7
- package/dist/cjs/contact-import/components/contact-import-mapping.js.map +1 -1
- package/dist/cjs/contact-import/index.js +6 -9
- package/dist/cjs/contact-import/index.js.map +1 -1
- package/dist/cjs/integration-template/components/dashboard.js +225 -179
- package/dist/cjs/integration-template/components/dashboard.js.map +1 -1
- package/dist/cjs/integration-template/index.js +33 -14
- package/dist/cjs/integration-template/index.js.map +1 -1
- package/dist/cjs/mapping/components/custom-date-menu.js +3 -2
- package/dist/cjs/mapping/components/custom-date-menu.js.map +1 -1
- package/dist/cjs/mapping/components/custom-menu.js.map +1 -1
- package/dist/cjs/mapping/components/field.js +14 -6
- package/dist/cjs/mapping/components/field.js.map +1 -1
- package/dist/cjs/mapping/components/mapping.js +29 -21
- package/dist/cjs/mapping/components/mapping.js.map +1 -1
- package/dist/cjs/mapping/constants/index.js +32 -0
- package/dist/cjs/mapping/constants/index.js.map +1 -0
- package/dist/cjs/mapping/index.js +453 -24
- package/dist/cjs/mapping/index.js.map +1 -1
- package/dist/cjs/mapping/services/index.js.map +1 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/utils.js +2 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/utils.js.map +1 -1
- package/dist/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/cjs/node_modules/html-dom-parser/node_modules/domutils/lib/index.js +1 -1
- package/dist/cjs/node_modules/html-dom-parser/node_modules/htmlparser2/lib/index.js +1 -1
- package/dist/cjs/single-mapping/components/mapping.js +28 -14
- package/dist/cjs/single-mapping/components/mapping.js.map +1 -1
- package/dist/cjs/single-mapping/index.js +25 -28
- package/dist/cjs/single-mapping/index.js.map +1 -1
- package/dist/cjs/triggers/components/trigger.js +14 -18
- package/dist/cjs/triggers/components/trigger.js.map +1 -1
- package/dist/cjs/triggers/constants/index.js +5 -11
- package/dist/cjs/triggers/constants/index.js.map +1 -1
- package/dist/cjs/triggers/index.js +16 -21
- package/dist/cjs/triggers/index.js.map +1 -1
- package/dist/es/_virtual/index10.js +2 -2
- package/dist/es/_virtual/index9.js +2 -2
- package/dist/es/authentication/constants/index.js +114 -2
- package/dist/es/authentication/constants/index.js.map +1 -1
- package/dist/es/authentication/index.js +35 -31
- package/dist/es/authentication/index.js.map +1 -1
- package/dist/es/commons/components/NamingModal.js +78 -0
- package/dist/es/commons/components/NamingModal.js.map +1 -0
- package/dist/es/commons/constants/enhanced.js +10 -0
- package/dist/es/commons/constants/enhanced.js.map +1 -0
- package/dist/es/commons/constants/index.js +5 -2
- package/dist/es/commons/constants/index.js.map +1 -1
- package/dist/es/contact-import/components/contact-import-configure.js.map +1 -1
- package/dist/es/contact-import/components/contact-import-mapping.js +10 -7
- package/dist/es/contact-import/components/contact-import-mapping.js.map +1 -1
- package/dist/es/contact-import/index.js +4 -7
- package/dist/es/contact-import/index.js.map +1 -1
- package/dist/es/integration-template/components/dashboard.js +225 -179
- package/dist/es/integration-template/components/dashboard.js.map +1 -1
- package/dist/es/integration-template/index.js +33 -14
- package/dist/es/integration-template/index.js.map +1 -1
- package/dist/es/mapping/components/custom-date-menu.js +3 -2
- package/dist/es/mapping/components/custom-date-menu.js.map +1 -1
- package/dist/es/mapping/components/custom-menu.js.map +1 -1
- package/dist/es/mapping/components/field.js +14 -6
- package/dist/es/mapping/components/field.js.map +1 -1
- package/dist/es/mapping/components/mapping.js +30 -22
- package/dist/es/mapping/components/mapping.js.map +1 -1
- package/dist/es/mapping/constants/index.js +28 -0
- package/dist/es/mapping/constants/index.js.map +1 -0
- package/dist/es/mapping/index.js +453 -24
- package/dist/es/mapping/index.js.map +1 -1
- package/dist/es/mapping/services/index.js.map +1 -1
- package/dist/es/node_modules/@internationalized/date/dist/utils.js +2 -1
- package/dist/es/node_modules/@internationalized/date/dist/utils.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react/dist/es/dialog/dialog.js +1 -1
- package/dist/es/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/es/node_modules/html-dom-parser/node_modules/domutils/lib/index.js +1 -1
- package/dist/es/node_modules/html-dom-parser/node_modules/htmlparser2/lib/index.js +1 -1
- package/dist/es/single-mapping/components/mapping.js +28 -14
- package/dist/es/single-mapping/components/mapping.js.map +1 -1
- package/dist/es/single-mapping/index.js +25 -28
- package/dist/es/single-mapping/index.js.map +1 -1
- package/dist/es/triggers/components/trigger.js +14 -18
- package/dist/es/triggers/components/trigger.js.map +1 -1
- package/dist/es/triggers/constants/index.js +5 -11
- package/dist/es/triggers/constants/index.js.map +1 -1
- package/dist/es/triggers/index.js +16 -21
- package/dist/es/triggers/index.js.map +1 -1
- package/dist/index.d.ts +269 -90
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import React$1 from 'react';
|
|
2
3
|
|
|
3
4
|
type FieldType = {
|
|
@@ -17,23 +18,18 @@ type FieldType = {
|
|
|
17
18
|
} | null;
|
|
18
19
|
isEssentialField: boolean;
|
|
19
20
|
essentialFieldLabel?: string;
|
|
20
|
-
mappedType:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
mappedType: SelectOption$2;
|
|
22
|
+
defaultValue?: string | number | boolean | null;
|
|
23
|
+
dependency: Record<string, unknown> | null;
|
|
24
|
+
};
|
|
25
|
+
type SelectOption$2 = {
|
|
26
|
+
label: string;
|
|
27
|
+
value: string | number;
|
|
26
28
|
};
|
|
27
29
|
type CommonFieldTypes = {
|
|
28
|
-
options?: Array<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}>;
|
|
32
|
-
value: {
|
|
33
|
-
label: string;
|
|
34
|
-
value: string;
|
|
35
|
-
} | null | boolean;
|
|
36
|
-
onChangeHandler: (value: any) => void;
|
|
30
|
+
options?: Array<SelectOption$2>;
|
|
31
|
+
value: SelectOption$2 | null | boolean;
|
|
32
|
+
onChangeHandler: (value: SelectOption$2 | SelectOption$2[] | boolean | null) => void;
|
|
37
33
|
};
|
|
38
34
|
type CustomListFieldType = {
|
|
39
35
|
hasCustomList: boolean;
|
|
@@ -41,8 +37,15 @@ type CustomListFieldType = {
|
|
|
41
37
|
type OldResponseFieldType = {
|
|
42
38
|
hasOldResponse: boolean;
|
|
43
39
|
} & Omit<CommonFieldTypes, 'options'>;
|
|
40
|
+
type IntegrationFieldType = {
|
|
41
|
+
id: string | number;
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
44
46
|
|
|
45
47
|
type FieldMappingPropsType = {
|
|
48
|
+
hasNamingModal: boolean;
|
|
46
49
|
havingTypeDropdown: boolean;
|
|
47
50
|
onSaveMappingLoader: boolean;
|
|
48
51
|
surveyDetails: {
|
|
@@ -52,36 +55,27 @@ type FieldMappingPropsType = {
|
|
|
52
55
|
integrationName: string;
|
|
53
56
|
fields: Array<FieldType>;
|
|
54
57
|
setFields: React$1.Dispatch<React$1.SetStateAction<Array<FieldType>>>;
|
|
55
|
-
integrationFields:
|
|
56
|
-
setIntegrationFields: React$1.Dispatch<React$1.SetStateAction<
|
|
58
|
+
integrationFields: Array<IntegrationFieldType>;
|
|
59
|
+
setIntegrationFields: React$1.Dispatch<React$1.SetStateAction<Array<IntegrationFieldType>>>;
|
|
57
60
|
apiURL: string;
|
|
58
61
|
token: string;
|
|
59
|
-
accounts
|
|
62
|
+
accounts?: {
|
|
60
63
|
hasAccounts: boolean;
|
|
61
|
-
options: Array<
|
|
62
|
-
value:
|
|
63
|
-
|
|
64
|
-
value: string;
|
|
65
|
-
} | null | boolean;
|
|
66
|
-
onChangeHandler: (value: any) => void;
|
|
64
|
+
options: Array<SelectOption$2>;
|
|
65
|
+
value: SelectOption$2 | null | boolean;
|
|
66
|
+
onChangeHandler: (value: SelectOption$2 | SelectOption$2[] | boolean | null) => void;
|
|
67
67
|
};
|
|
68
|
-
events
|
|
68
|
+
events?: {
|
|
69
69
|
hasEvents: boolean;
|
|
70
|
-
options: Array<
|
|
71
|
-
value:
|
|
72
|
-
|
|
73
|
-
value: string;
|
|
74
|
-
} | null | boolean;
|
|
75
|
-
onChangeHandler: (value: any) => void;
|
|
70
|
+
options: Array<SelectOption$2>;
|
|
71
|
+
value: SelectOption$2 | null | boolean;
|
|
72
|
+
onChangeHandler: (value: SelectOption$2 | SelectOption$2[] | boolean | null) => void;
|
|
76
73
|
};
|
|
77
|
-
actions
|
|
74
|
+
actions?: {
|
|
78
75
|
hasActions: boolean;
|
|
79
|
-
options: Array<
|
|
80
|
-
value:
|
|
81
|
-
|
|
82
|
-
value: string;
|
|
83
|
-
} | null | boolean;
|
|
84
|
-
onChangeHandler: (value: any) => void;
|
|
76
|
+
options: Array<SelectOption$2>;
|
|
77
|
+
value: SelectOption$2 | null | boolean;
|
|
78
|
+
onChangeHandler: (value: SelectOption$2 | SelectOption$2[] | boolean | null) => void;
|
|
85
79
|
};
|
|
86
80
|
isMappingPage: boolean;
|
|
87
81
|
surveyType: string;
|
|
@@ -90,19 +84,30 @@ type FieldMappingPropsType = {
|
|
|
90
84
|
oldResponse: OldResponseFieldType;
|
|
91
85
|
hasPreviousMapping: boolean;
|
|
92
86
|
onSaveHandler: () => void;
|
|
93
|
-
editField:
|
|
87
|
+
editField: {
|
|
88
|
+
id: string | number;
|
|
89
|
+
fieldValues: Array<FieldType>;
|
|
90
|
+
} | null;
|
|
94
91
|
previousMappingHandler: (value?: boolean) => void;
|
|
95
92
|
onDeleteHandler?: (id: string | number) => void;
|
|
96
|
-
draftHandler: (type: string | null, editFieldId?: string |
|
|
93
|
+
draftHandler: (type: string | null, editFieldId?: string | number) => void;
|
|
94
|
+
configuration: {
|
|
95
|
+
setMappingName?: (value: string) => void;
|
|
96
|
+
currentMappingName?: string;
|
|
97
|
+
hasConfiguration: boolean;
|
|
98
|
+
configurationFields: Array<unknown>;
|
|
99
|
+
configuredFields: unknown;
|
|
100
|
+
title: string;
|
|
101
|
+
};
|
|
97
102
|
};
|
|
98
|
-
declare const Mapping: ({ havingTypeDropdown, onSaveMappingLoader, surveyDetails, integrationName, fields, setFields, integrationFields, setIntegrationFields, apiURL, token, accounts, events, actions, isMappingPage, surveyType, navigateMappingPage, customList, oldResponse, hasPreviousMapping, onSaveHandler, editField, previousMappingHandler, draftHandler }: FieldMappingPropsType) =>
|
|
103
|
+
declare const Mapping: ({ hasNamingModal, havingTypeDropdown, onSaveMappingLoader, surveyDetails, integrationName, fields, setFields, integrationFields, setIntegrationFields, apiURL, token, accounts, events, actions, isMappingPage, surveyType, navigateMappingPage, customList, oldResponse, hasPreviousMapping, onSaveHandler, editField, previousMappingHandler, draftHandler, configuration, }: FieldMappingPropsType) => react_jsx_runtime.JSX.Element;
|
|
99
104
|
|
|
100
105
|
type AuthenticationFieldsProps = {
|
|
101
106
|
id: string | number;
|
|
102
107
|
type: string;
|
|
103
108
|
label: string;
|
|
104
|
-
value:
|
|
105
|
-
changeFieldValue: (value:
|
|
109
|
+
value: string | number | boolean | null;
|
|
110
|
+
changeFieldValue: (value: string | number | boolean, fieldId?: number | string) => void;
|
|
106
111
|
options?: Array<{
|
|
107
112
|
label: string;
|
|
108
113
|
value: string | number;
|
|
@@ -117,32 +122,129 @@ type AuthenticationProps = {
|
|
|
117
122
|
onSuccessHandler: () => void;
|
|
118
123
|
};
|
|
119
124
|
|
|
120
|
-
declare const Authentication: ({ integrationName, fields, onSuccessHandler }: AuthenticationProps) =>
|
|
125
|
+
declare const Authentication: ({ integrationName, fields, onSuccessHandler }: AuthenticationProps) => react_jsx_runtime.JSX.Element;
|
|
121
126
|
|
|
127
|
+
type SelectOption$1 = {
|
|
128
|
+
label: string;
|
|
129
|
+
value: string | number;
|
|
130
|
+
type?: string;
|
|
131
|
+
parentQuestionId?: number | string;
|
|
132
|
+
};
|
|
133
|
+
type SurveyDetails = {
|
|
134
|
+
surveyName: string;
|
|
135
|
+
surveyId: string | number;
|
|
136
|
+
};
|
|
137
|
+
type IntegrationField = {
|
|
138
|
+
id: number | string;
|
|
139
|
+
label: string;
|
|
140
|
+
value: string;
|
|
141
|
+
type: string;
|
|
142
|
+
required?: boolean;
|
|
143
|
+
};
|
|
144
|
+
type FormFieldValue = string | number | boolean | null | SelectOption$1 | SelectOption$1[];
|
|
145
|
+
type FilterCondition = {
|
|
146
|
+
id: string;
|
|
147
|
+
field: SelectOption$1 | null;
|
|
148
|
+
operator: SelectOption$1 | null;
|
|
149
|
+
value: FormFieldValue;
|
|
150
|
+
};
|
|
151
|
+
type FilterGroup = {
|
|
152
|
+
id: string;
|
|
153
|
+
conditions: FilterCondition[];
|
|
154
|
+
operator: 'AND' | 'OR';
|
|
155
|
+
};
|
|
156
|
+
type TriggerDetails = {
|
|
157
|
+
shareChannel: SelectOption$1 | null;
|
|
158
|
+
shareRecipient: SelectOption$1 | null;
|
|
159
|
+
shareType: SelectOption$1 | null;
|
|
160
|
+
message?: string;
|
|
161
|
+
subject?: string;
|
|
162
|
+
};
|
|
163
|
+
type TriggerField = {
|
|
164
|
+
id: string;
|
|
165
|
+
filters: FilterGroup[];
|
|
166
|
+
};
|
|
167
|
+
type MappingFieldCollection = {
|
|
168
|
+
type: string;
|
|
169
|
+
fields: DashboardField[];
|
|
170
|
+
mappedFields?: {
|
|
171
|
+
type?: string;
|
|
172
|
+
fields?: DashboardField[];
|
|
173
|
+
} | unknown;
|
|
174
|
+
};
|
|
175
|
+
type TriggerFieldCollection = DashboardField[];
|
|
176
|
+
type ConfigurationFields = {
|
|
177
|
+
[key: string]: {
|
|
178
|
+
id: string;
|
|
179
|
+
value: SelectOption$1 | string | boolean | null;
|
|
180
|
+
type?: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
type DashboardField = {
|
|
184
|
+
mappingName?: string;
|
|
185
|
+
mappingDescription?: string;
|
|
186
|
+
mappedFields?: Record<string, unknown>;
|
|
187
|
+
configurationFields?: ConfigurationFields;
|
|
188
|
+
id: string | number;
|
|
189
|
+
email?: string;
|
|
190
|
+
domain?: string;
|
|
191
|
+
object?: string;
|
|
192
|
+
action?: string;
|
|
193
|
+
isEnabled: boolean;
|
|
194
|
+
fields: Record<string, unknown> | Record<string, unknown>[];
|
|
195
|
+
triggerDetails?: Record<string, unknown>;
|
|
196
|
+
mappingConfiguration?: Record<string, unknown>;
|
|
197
|
+
questions?: Record<string, unknown>[];
|
|
198
|
+
variables?: Record<string, unknown>[];
|
|
199
|
+
contactProperties?: Record<string, unknown>[];
|
|
200
|
+
expressions?: Record<string, unknown>[];
|
|
201
|
+
property?: Record<string, unknown>[];
|
|
202
|
+
description?: string;
|
|
203
|
+
isDraft?: boolean;
|
|
204
|
+
importMethod?: string;
|
|
205
|
+
exisitingSheet?: any;
|
|
206
|
+
};
|
|
207
|
+
type FieldOptionsType = SelectOption$1[];
|
|
208
|
+
type ConfigurationFieldValue = {
|
|
209
|
+
id: string;
|
|
210
|
+
value: SelectOption$1 | string | boolean | null;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
type SingleMappingType = {
|
|
214
|
+
mappedFields: {
|
|
215
|
+
type: string;
|
|
216
|
+
fields: unknown[];
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
type DynamicMappingType = {
|
|
220
|
+
mappedFields: {
|
|
221
|
+
type: string;
|
|
222
|
+
fields: unknown[];
|
|
223
|
+
};
|
|
224
|
+
};
|
|
122
225
|
type IntegrationTemplateProps = {
|
|
123
|
-
singleMapping?:
|
|
226
|
+
singleMapping?: SingleMappingType;
|
|
124
227
|
draftHandler: (type: string | null) => void;
|
|
125
|
-
onMappingEditHandler: (field:
|
|
126
|
-
fieldOptions:
|
|
228
|
+
onMappingEditHandler: (field: unknown) => void;
|
|
229
|
+
fieldOptions: FieldOptionsType;
|
|
127
230
|
triggerEnabled: boolean;
|
|
128
231
|
mappingEnabled: boolean;
|
|
129
|
-
mappingComponent
|
|
232
|
+
mappingComponent?: React$1.ReactElement;
|
|
130
233
|
singleMappingComponent?: React$1.ReactElement;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
setMappedFields: React$1.Dispatch<React$1.SetStateAction<any>>;
|
|
234
|
+
dynamicMapping?: DynamicMappingType;
|
|
235
|
+
dynamicMappingComponent?: React$1.ReactElement;
|
|
236
|
+
mapping?: {
|
|
237
|
+
mappedFields: MappingFieldCollection;
|
|
238
|
+
setMappedFields: React$1.Dispatch<React$1.SetStateAction<MappingFieldCollection>>;
|
|
137
239
|
};
|
|
138
|
-
triggerComponent
|
|
139
|
-
trigger
|
|
140
|
-
mappedFields:
|
|
141
|
-
setMappedFields: React$1.Dispatch<React$1.SetStateAction<
|
|
240
|
+
triggerComponent?: React$1.ReactElement;
|
|
241
|
+
trigger?: {
|
|
242
|
+
mappedFields: TriggerFieldCollection;
|
|
243
|
+
setMappedFields: React$1.Dispatch<React$1.SetStateAction<TriggerFieldCollection>>;
|
|
142
244
|
};
|
|
143
245
|
integrationName: string;
|
|
144
|
-
onDeleteHandler?:
|
|
145
|
-
toggleDashboardField?:
|
|
246
|
+
onDeleteHandler?: (id: string | number) => void;
|
|
247
|
+
toggleDashboardField?: (id: string | number, status: boolean) => void;
|
|
146
248
|
dashboardDescription: string;
|
|
147
249
|
mappingDescription: string;
|
|
148
250
|
triggerDescription: string;
|
|
@@ -154,7 +256,7 @@ declare const IntegrationTemplate: React$1.FC<IntegrationTemplateProps>;
|
|
|
154
256
|
|
|
155
257
|
type SingleMappingPropsType = {
|
|
156
258
|
hasPreviousMapping?: boolean;
|
|
157
|
-
integrationFields:
|
|
259
|
+
integrationFields: IntegrationField[];
|
|
158
260
|
configuration: {
|
|
159
261
|
importOptions: {
|
|
160
262
|
showImportOptions: boolean;
|
|
@@ -165,7 +267,7 @@ type SingleMappingPropsType = {
|
|
|
165
267
|
ifUnchecked: (period: string) => string;
|
|
166
268
|
fieldType: string;
|
|
167
269
|
value: boolean | null;
|
|
168
|
-
onChangeHandler: (value:
|
|
270
|
+
onChangeHandler: (value: ConfigurationFieldValue) => void;
|
|
169
271
|
};
|
|
170
272
|
options: Array<{
|
|
171
273
|
id: number | string;
|
|
@@ -178,7 +280,7 @@ type SingleMappingPropsType = {
|
|
|
178
280
|
minValue?: string;
|
|
179
281
|
maxValue?: string;
|
|
180
282
|
}>;
|
|
181
|
-
onChangeHandler: (value:
|
|
283
|
+
onChangeHandler: (value: ConfigurationFieldValue) => void;
|
|
182
284
|
};
|
|
183
285
|
hasConfiguration: boolean;
|
|
184
286
|
configuredFields: any;
|
|
@@ -196,7 +298,7 @@ type SingleMappingPropsType = {
|
|
|
196
298
|
label: string;
|
|
197
299
|
value: string;
|
|
198
300
|
} | string | null;
|
|
199
|
-
onChangeHandler: (value:
|
|
301
|
+
onChangeHandler: (value: ConfigurationFieldValue) => void;
|
|
200
302
|
}>;
|
|
201
303
|
onSaveHandler: () => void;
|
|
202
304
|
};
|
|
@@ -214,77 +316,154 @@ type SingleMappingPropsType = {
|
|
|
214
316
|
hasExistingMapping: boolean;
|
|
215
317
|
importResponse: {
|
|
216
318
|
hasImportResponse: boolean;
|
|
217
|
-
value:
|
|
319
|
+
value: any;
|
|
218
320
|
onChangeHandler: (value: any) => void;
|
|
219
321
|
};
|
|
220
322
|
editField?: any;
|
|
221
323
|
previousMappingHandler?: (value?: boolean) => void;
|
|
222
324
|
};
|
|
223
|
-
declare const SingleMapping: ({ integrationFields, configuration, isMappingPage, navigateMappingPage, setIntegrationFields, token, apiURL, surveyDetails, importResponse, hasExistingMapping, onSaveHandler, editField, previousMappingHandler, }: SingleMappingPropsType) =>
|
|
325
|
+
declare const SingleMapping: ({ integrationFields, configuration, isMappingPage, navigateMappingPage, setIntegrationFields, token, apiURL, surveyDetails, importResponse, hasExistingMapping, onSaveHandler, editField, previousMappingHandler, }: SingleMappingPropsType) => react_jsx_runtime.JSX.Element;
|
|
224
326
|
|
|
327
|
+
type TriggerFieldLegacy = {
|
|
328
|
+
id: string;
|
|
329
|
+
filters: Array<{
|
|
330
|
+
filter: Array<{
|
|
331
|
+
value: string | number | null;
|
|
332
|
+
}>;
|
|
333
|
+
}>;
|
|
334
|
+
};
|
|
335
|
+
type TriggerDetailsLegacy = {
|
|
336
|
+
shareChannel: Record<string, unknown>;
|
|
337
|
+
shareRecipient: Record<string, unknown>;
|
|
338
|
+
shareType: Record<string, unknown>;
|
|
339
|
+
};
|
|
340
|
+
type EditField = {
|
|
341
|
+
id: string | number;
|
|
342
|
+
fieldValues: {
|
|
343
|
+
fields: TriggerField;
|
|
344
|
+
triggerDetails: TriggerDetails;
|
|
345
|
+
account?: string | number;
|
|
346
|
+
object?: string | number;
|
|
347
|
+
action?: string | number;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
225
350
|
type TriggersProps = {
|
|
226
351
|
draftHandler: (type: string | null, editFieldId?: string) => void;
|
|
227
352
|
onSaveTriggerLoader: boolean;
|
|
228
|
-
objects:
|
|
229
|
-
|
|
230
|
-
|
|
353
|
+
objects: {
|
|
354
|
+
hasObjects: boolean;
|
|
355
|
+
options: Array<SelectOption$1>;
|
|
356
|
+
value: SelectOption$1 | null;
|
|
357
|
+
onChangeHandler: (value: SelectOption$1 | SelectOption$1[] | null) => void;
|
|
358
|
+
isMulti?: boolean;
|
|
359
|
+
};
|
|
360
|
+
accounts: {
|
|
361
|
+
hasAccounts: boolean;
|
|
362
|
+
options: Array<SelectOption$1>;
|
|
363
|
+
value: SelectOption$1 | null;
|
|
364
|
+
onChangeHandler: (value: SelectOption$1 | SelectOption$1[] | null) => void;
|
|
365
|
+
isMulti?: boolean;
|
|
366
|
+
};
|
|
367
|
+
actions: {
|
|
368
|
+
hasActions: boolean;
|
|
369
|
+
options: Array<SelectOption$1>;
|
|
370
|
+
value: SelectOption$1 | null;
|
|
371
|
+
onChangeHandler: (value: SelectOption$1 | SelectOption$1[] | null) => void;
|
|
372
|
+
isMulti?: boolean;
|
|
373
|
+
};
|
|
231
374
|
isTriggerPage: boolean;
|
|
232
375
|
navigateTriggerPage: (isTriggerPage: boolean) => void;
|
|
233
376
|
previousMapping: boolean;
|
|
234
377
|
onSaveHandler: (editFieldId?: string) => void;
|
|
235
378
|
previousMappingHandler: () => void;
|
|
236
|
-
surveyDetails:
|
|
379
|
+
surveyDetails: SurveyDetails;
|
|
237
380
|
hasNestedCondition: boolean;
|
|
238
|
-
fields:
|
|
381
|
+
fields: TriggerField;
|
|
239
382
|
token: string;
|
|
240
383
|
apiURL: string;
|
|
241
|
-
setFields: (fields:
|
|
242
|
-
shareRecipentOptions:
|
|
243
|
-
shareChannelOptions:
|
|
244
|
-
triggerDetails:
|
|
245
|
-
setTriggerDetails: (details:
|
|
246
|
-
editField:
|
|
247
|
-
fieldOptions:
|
|
248
|
-
variableOptions:
|
|
384
|
+
setFields: (fields: TriggerField) => void;
|
|
385
|
+
shareRecipentOptions: Array<SelectOption$1>;
|
|
386
|
+
shareChannelOptions: Array<SelectOption$1>;
|
|
387
|
+
triggerDetails: TriggerDetails;
|
|
388
|
+
setTriggerDetails: (details: TriggerDetails) => void;
|
|
389
|
+
editField: EditField | null;
|
|
390
|
+
fieldOptions: Array<SelectOption$1>;
|
|
391
|
+
variableOptions: Array<SelectOption$1>;
|
|
249
392
|
};
|
|
250
393
|
declare const Triggers: React$1.FC<TriggersProps>;
|
|
251
394
|
|
|
395
|
+
type SelectOption = {
|
|
396
|
+
label: string;
|
|
397
|
+
value: string | number;
|
|
398
|
+
};
|
|
252
399
|
type ContactImportFieldType = {
|
|
253
|
-
configure:
|
|
254
|
-
|
|
255
|
-
|
|
400
|
+
configure: {
|
|
401
|
+
reference?: string;
|
|
402
|
+
frequency?: string;
|
|
403
|
+
selectedOption?: SelectOption;
|
|
404
|
+
listSegmentValue?: SelectOption | null;
|
|
405
|
+
} | null;
|
|
406
|
+
description: string | null;
|
|
407
|
+
id: string | number | null;
|
|
256
408
|
fields: Array<{
|
|
257
409
|
id: string | number;
|
|
258
410
|
integrationField: string | number | null;
|
|
259
411
|
surveySparrowField: string | number | null;
|
|
260
|
-
sampleData
|
|
412
|
+
sampleData?: Array<string>;
|
|
413
|
+
property?: "custom" | "default";
|
|
414
|
+
mapped?: boolean;
|
|
415
|
+
surveySparrowFieldError?: boolean;
|
|
261
416
|
}>;
|
|
262
417
|
invitePortal: boolean;
|
|
263
418
|
};
|
|
264
419
|
type ContactImportProps = {
|
|
265
420
|
dashboardDescription: string;
|
|
266
|
-
existingImports:
|
|
421
|
+
existingImports: Array<CompletedImportTypes | ScheduledImportTypes> | null;
|
|
267
422
|
hasPreviousMapping?: boolean;
|
|
268
423
|
previousMappingHandler: (value?: boolean) => void;
|
|
269
424
|
onSaveHandler: () => void;
|
|
270
425
|
isContactMappingPage: boolean;
|
|
271
426
|
navigateMappingPage: (value?: boolean) => void;
|
|
272
427
|
contactImportField: ContactImportFieldType;
|
|
273
|
-
setContactImportField: React.Dispatch<React.SetStateAction<
|
|
428
|
+
setContactImportField: React.Dispatch<React.SetStateAction<ContactImportFieldType>>;
|
|
274
429
|
listSegmentOptions: Array<{
|
|
275
430
|
id: number | string;
|
|
276
431
|
label: string;
|
|
277
432
|
value: string;
|
|
278
433
|
}>;
|
|
279
434
|
integrationName: string;
|
|
280
|
-
contactProperties:
|
|
435
|
+
contactProperties: Array<ContactProperty>;
|
|
281
436
|
invitePortal: {
|
|
282
437
|
hasInvitePortal: boolean;
|
|
283
|
-
value:
|
|
284
|
-
onChangeHandler: (value:
|
|
438
|
+
value: boolean | null;
|
|
439
|
+
onChangeHandler: (value: boolean) => void;
|
|
285
440
|
};
|
|
286
441
|
};
|
|
442
|
+
interface ContactProperty {
|
|
443
|
+
value: string;
|
|
444
|
+
label: string;
|
|
445
|
+
type: string;
|
|
446
|
+
}
|
|
447
|
+
type CompletedImportTypes = {
|
|
448
|
+
id: string;
|
|
449
|
+
type: string;
|
|
450
|
+
name: string;
|
|
451
|
+
isRecuring: boolean;
|
|
452
|
+
importedOn: string | undefined;
|
|
453
|
+
status: string;
|
|
454
|
+
};
|
|
455
|
+
type ScheduledImportTypes = {
|
|
456
|
+
id: string;
|
|
457
|
+
type: string;
|
|
458
|
+
name: string;
|
|
459
|
+
createdOn: string | undefined;
|
|
460
|
+
upcommingImport: string | undefined;
|
|
461
|
+
isRecuring: boolean;
|
|
462
|
+
scheduled: boolean;
|
|
463
|
+
status: string;
|
|
464
|
+
editField: Record<string, unknown>;
|
|
465
|
+
};
|
|
287
466
|
|
|
288
|
-
declare const ContactImport: ({ dashboardDescription, existingImports, hasPreviousMapping, previousMappingHandler, onSaveHandler, isContactMappingPage, navigateMappingPage, contactImportField, setContactImportField, listSegmentOptions, integrationName, contactProperties, invitePortal, }: ContactImportProps) =>
|
|
467
|
+
declare const ContactImport: ({ dashboardDescription, existingImports, hasPreviousMapping, previousMappingHandler, onSaveHandler, isContactMappingPage, navigateMappingPage, contactImportField, setContactImportField, listSegmentOptions, integrationName, contactProperties, invitePortal, }: ContactImportProps) => react_jsx_runtime.JSX.Element;
|
|
289
468
|
|
|
290
|
-
export { Authentication, ContactImport, IntegrationTemplate, Mapping, SingleMapping, Triggers };
|
|
469
|
+
export { Authentication, ContactImport, type EditField, IntegrationTemplate, Mapping, SingleMapping, type TriggerDetailsLegacy, type TriggerFieldLegacy, Triggers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sparrowengg/integrations-templates-frontend",
|
|
3
|
-
"version": "1.9.84-beta.
|
|
3
|
+
"version": "1.9.84-beta.11",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "dist/es/index.js",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"storybook": "storybook dev -p 6006",
|
|
50
50
|
"build-storybook": "storybook build",
|
|
51
|
+
"build-static-webapp":"expo build:web",
|
|
51
52
|
"build": "rollup -c"
|
|
52
53
|
},
|
|
53
54
|
"dependencies": {
|