@sparrowengg/integrations-templates-frontend 1.9.84-beta.3 → 1.9.84-beta.5
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/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 +66 -53
- package/dist/cjs/integration-template/components/dashboard.js.map +1 -1
- package/dist/cjs/integration-template/index.js +4 -2
- 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/mapping.js +21 -15
- 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.map +1 -1
- package/dist/cjs/mapping/services/index.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 +3 -3
- package/dist/cjs/single-mapping/components/mapping.js.map +1 -1
- package/dist/cjs/single-mapping/index.js +23 -20
- 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/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 +66 -53
- package/dist/es/integration-template/components/dashboard.js.map +1 -1
- package/dist/es/integration-template/index.js +4 -2
- 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/mapping.js +22 -16
- 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.map +1 -1
- package/dist/es/mapping/services/index.js.map +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 +3 -3
- package/dist/es/single-mapping/components/mapping.js.map +1 -1
- package/dist/es/single-mapping/index.js +23 -20
- 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 +242 -79
- package/package.json +1 -1
|
@@ -1,10 +1,124 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
3
22
|
const FieldTypes = {
|
|
23
|
+
TEXT: "text",
|
|
24
|
+
EMAIL: "email",
|
|
25
|
+
PASSWORD: "password",
|
|
4
26
|
SELECT: "select",
|
|
27
|
+
MULTISELECT: "multiselect",
|
|
28
|
+
CHECKBOX: "checkbox",
|
|
29
|
+
RADIO: "radio",
|
|
30
|
+
TEXTAREA: "textarea",
|
|
31
|
+
NUMBER: "number",
|
|
32
|
+
URL: "url",
|
|
33
|
+
DATE: "date"
|
|
34
|
+
};
|
|
35
|
+
const FIELD_TYPES = {
|
|
36
|
+
TEXT: "text",
|
|
37
|
+
EMAIL: "email",
|
|
5
38
|
PASSWORD: "password",
|
|
6
|
-
|
|
39
|
+
SELECT: "select",
|
|
40
|
+
MULTISELECT: "multiselect",
|
|
41
|
+
CHECKBOX: "checkbox",
|
|
42
|
+
RADIO: "radio",
|
|
43
|
+
TEXTAREA: "textarea",
|
|
44
|
+
NUMBER: "number",
|
|
45
|
+
URL: "url",
|
|
46
|
+
DATE: "date"
|
|
47
|
+
};
|
|
48
|
+
const COMMON_FIELD_CONFIGS = {
|
|
49
|
+
API_KEY: {
|
|
50
|
+
id: "api_key",
|
|
51
|
+
type: FIELD_TYPES.PASSWORD,
|
|
52
|
+
label: "API Key",
|
|
53
|
+
required: true,
|
|
54
|
+
placeholder: "Enter your API key",
|
|
55
|
+
isPassword: true
|
|
56
|
+
},
|
|
57
|
+
API_SECRET: {
|
|
58
|
+
id: "api_secret",
|
|
59
|
+
type: FIELD_TYPES.PASSWORD,
|
|
60
|
+
label: "API Secret",
|
|
61
|
+
required: true,
|
|
62
|
+
placeholder: "Enter your API secret",
|
|
63
|
+
isPassword: true
|
|
64
|
+
},
|
|
65
|
+
USERNAME: {
|
|
66
|
+
id: "username",
|
|
67
|
+
type: FIELD_TYPES.TEXT,
|
|
68
|
+
label: "Username",
|
|
69
|
+
required: true,
|
|
70
|
+
placeholder: "Enter your username"
|
|
71
|
+
},
|
|
72
|
+
EMAIL: {
|
|
73
|
+
id: "email",
|
|
74
|
+
type: FIELD_TYPES.EMAIL,
|
|
75
|
+
label: "Email",
|
|
76
|
+
required: true,
|
|
77
|
+
placeholder: "Enter your email"
|
|
78
|
+
},
|
|
79
|
+
PASSWORD: {
|
|
80
|
+
id: "password",
|
|
81
|
+
type: FIELD_TYPES.PASSWORD,
|
|
82
|
+
label: "Password",
|
|
83
|
+
required: true,
|
|
84
|
+
placeholder: "Enter your password",
|
|
85
|
+
isPassword: true
|
|
86
|
+
},
|
|
87
|
+
BASE_URL: {
|
|
88
|
+
id: "base_url",
|
|
89
|
+
type: FIELD_TYPES.URL,
|
|
90
|
+
label: "Base URL",
|
|
91
|
+
required: true,
|
|
92
|
+
placeholder: "https://api.example.com"
|
|
93
|
+
},
|
|
94
|
+
SUBDOMAIN: {
|
|
95
|
+
id: "subdomain",
|
|
96
|
+
type: FIELD_TYPES.TEXT,
|
|
97
|
+
label: "Subdomain",
|
|
98
|
+
required: true,
|
|
99
|
+
placeholder: "your-subdomain"
|
|
100
|
+
}
|
|
7
101
|
};
|
|
102
|
+
({
|
|
103
|
+
SALESFORCE: [
|
|
104
|
+
__spreadProps(__spreadValues({}, COMMON_FIELD_CONFIGS.USERNAME), { label: "Salesforce Username" }),
|
|
105
|
+
__spreadProps(__spreadValues({}, COMMON_FIELD_CONFIGS.PASSWORD), { label: "Salesforce Password" }),
|
|
106
|
+
{ id: "security_token", type: FIELD_TYPES.PASSWORD, label: "Security Token", required: true, isPassword: true }
|
|
107
|
+
],
|
|
108
|
+
HUBSPOT: [
|
|
109
|
+
__spreadProps(__spreadValues({}, COMMON_FIELD_CONFIGS.API_KEY), { label: "HubSpot API Key" })
|
|
110
|
+
],
|
|
111
|
+
MAILCHIMP: [
|
|
112
|
+
__spreadProps(__spreadValues({}, COMMON_FIELD_CONFIGS.API_KEY), { label: "MailChimp API Key" }),
|
|
113
|
+
{ id: "datacenter", type: FIELD_TYPES.TEXT, label: "Data Center", required: true, placeholder: "us1" }
|
|
114
|
+
],
|
|
115
|
+
SLACK: [
|
|
116
|
+
{ id: "bot_token", type: FIELD_TYPES.PASSWORD, label: "Bot User OAuth Token", required: true, isPassword: true },
|
|
117
|
+
{ id: "channel", type: FIELD_TYPES.SELECT, label: "Default Channel", required: false }
|
|
118
|
+
]
|
|
119
|
+
});
|
|
8
120
|
|
|
121
|
+
exports.COMMON_FIELD_CONFIGS = COMMON_FIELD_CONFIGS;
|
|
122
|
+
exports.FIELD_TYPES = FIELD_TYPES;
|
|
9
123
|
exports.FieldTypes = FieldTypes;
|
|
10
124
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/authentication/constants/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/authentication/constants/index.ts"],"sourcesContent":["import { SelectOption } from '../../commons/types/enhanced';\n\n// Authentication specific constants\nexport const FieldTypes = {\n TEXT: 'text',\n EMAIL: 'email',\n PASSWORD: 'password',\n SELECT: 'select',\n MULTISELECT: 'multiselect',\n CHECKBOX: 'checkbox',\n RADIO: 'radio',\n TEXTAREA: 'textarea',\n NUMBER: 'number',\n URL: 'url',\n DATE: 'date',\n} as const;\n\nexport const FIELD_TYPES = {\n TEXT: 'text',\n EMAIL: 'email',\n PASSWORD: 'password',\n SELECT: 'select',\n MULTISELECT: 'multiselect',\n CHECKBOX: 'checkbox',\n RADIO: 'radio',\n TEXTAREA: 'textarea',\n NUMBER: 'number',\n URL: 'url',\n DATE: 'date',\n} as const;\n\nexport const AUTH_FIELD_VALIDATION = {\n MIN_LENGTH: 1,\n MAX_LENGTH: 255,\n PASSWORD_MIN_LENGTH: 8,\n EMAIL_PATTERN: /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/,\n URL_PATTERN: /^https?:\\/\\/.+/,\n} as const;\n\nexport const DEFAULT_AUTH_FIELD = {\n id: '',\n type: FIELD_TYPES.TEXT,\n label: '',\n value: null,\n required: false,\n placeholder: '',\n options: [],\n isPassword: false,\n};\n\n// Common authentication providers\nexport const AUTH_PROVIDERS: SelectOption[] = [\n { label: 'API Key', value: 'api_key' },\n { label: 'OAuth 2.0', value: 'oauth2' },\n { label: 'Basic Auth', value: 'basic_auth' },\n { label: 'Bearer Token', value: 'bearer_token' },\n { label: 'Custom', value: 'custom' },\n];\n\n// Authentication methods\nexport const AUTH_METHODS: SelectOption[] = [\n { label: 'GET', value: 'GET' },\n { label: 'POST', value: 'POST' },\n { label: 'PUT', value: 'PUT' },\n { label: 'PATCH', value: 'PATCH' },\n { label: 'DELETE', value: 'DELETE' },\n];\n\n// Content types for API authentication\nexport const CONTENT_TYPES: SelectOption[] = [\n { label: 'application/json', value: 'application/json' },\n { label: 'application/x-www-form-urlencoded', value: 'application/x-www-form-urlencoded' },\n { label: 'multipart/form-data', value: 'multipart/form-data' },\n { label: 'text/plain', value: 'text/plain' },\n];\n\n// Common field configurations for different integrations\nexport const COMMON_FIELD_CONFIGS = {\n API_KEY: {\n id: 'api_key',\n type: FIELD_TYPES.PASSWORD,\n label: 'API Key',\n required: true,\n placeholder: 'Enter your API key',\n isPassword: true,\n },\n API_SECRET: {\n id: 'api_secret',\n type: FIELD_TYPES.PASSWORD,\n label: 'API Secret',\n required: true,\n placeholder: 'Enter your API secret',\n isPassword: true,\n },\n USERNAME: {\n id: 'username',\n type: FIELD_TYPES.TEXT,\n label: 'Username',\n required: true,\n placeholder: 'Enter your username',\n },\n EMAIL: {\n id: 'email',\n type: FIELD_TYPES.EMAIL,\n label: 'Email',\n required: true,\n placeholder: 'Enter your email',\n },\n PASSWORD: {\n id: 'password',\n type: FIELD_TYPES.PASSWORD,\n label: 'Password',\n required: true,\n placeholder: 'Enter your password',\n isPassword: true,\n },\n BASE_URL: {\n id: 'base_url',\n type: FIELD_TYPES.URL,\n label: 'Base URL',\n required: true,\n placeholder: 'https://api.example.com',\n },\n SUBDOMAIN: {\n id: 'subdomain',\n type: FIELD_TYPES.TEXT,\n label: 'Subdomain',\n required: true,\n placeholder: 'your-subdomain',\n },\n} as const;\n\n// Validation rules\nexport const AUTH_VALIDATION = {\n REQUIRED_FIELD_ERROR: 'This field is required',\n INVALID_EMAIL_ERROR: 'Please enter a valid email address',\n INVALID_URL_ERROR: 'Please enter a valid URL',\n PASSWORD_TOO_SHORT_ERROR: `Password must be at least ${AUTH_FIELD_VALIDATION.PASSWORD_MIN_LENGTH} characters`,\n FIELD_TOO_LONG_ERROR: `Field cannot exceed ${AUTH_FIELD_VALIDATION.MAX_LENGTH} characters`,\n} as const;\n\n// Error messages\nexport const AUTH_ERROR_MESSAGES = {\n INVALID_CREDENTIALS: 'Invalid credentials. Please check your information and try again.',\n CONNECTION_FAILED: 'Failed to connect to the service. Please check your connection settings.',\n AUTHENTICATION_FAILED: 'Authentication failed. Please verify your credentials.',\n RATE_LIMIT_EXCEEDED: 'Rate limit exceeded. Please wait before trying again.',\n SERVICE_UNAVAILABLE: 'Service is currently unavailable. Please try again later.',\n TIMEOUT_ERROR: 'Request timed out. Please check your connection and try again.',\n UNKNOWN_ERROR: 'An unknown error occurred. Please try again.',\n} as const;\n\n// Success messages\nexport const AUTH_SUCCESS_MESSAGES = {\n CONNECTION_SUCCESSFUL: 'Connection established successfully',\n AUTHENTICATION_SUCCESSFUL: 'Authentication successful',\n SETTINGS_SAVED: 'Authentication settings saved successfully',\n TEST_SUCCESSFUL: 'Connection test passed',\n} as const;\n\n// Form validation schemas\nexport const VALIDATION_SCHEMAS = {\n API_KEY: ['api_key'],\n OAUTH2: ['client_id', 'client_secret', 'redirect_uri'],\n BASIC_AUTH: ['username', 'password'],\n BEARER_TOKEN: ['token'],\n CUSTOM: [], // Validation depends on custom fields\n} as const;\n\n// Integration-specific field templates\nexport const INTEGRATION_TEMPLATES = {\n SALESFORCE: [\n { ...COMMON_FIELD_CONFIGS.USERNAME, label: 'Salesforce Username' },\n { ...COMMON_FIELD_CONFIGS.PASSWORD, label: 'Salesforce Password' },\n { id: 'security_token', type: FIELD_TYPES.PASSWORD, label: 'Security Token', required: true, isPassword: true },\n ],\n HUBSPOT: [\n { ...COMMON_FIELD_CONFIGS.API_KEY, label: 'HubSpot API Key' },\n ],\n MAILCHIMP: [\n { ...COMMON_FIELD_CONFIGS.API_KEY, label: 'MailChimp API Key' },\n { id: 'datacenter', type: FIELD_TYPES.TEXT, label: 'Data Center', required: true, placeholder: 'us1' },\n ],\n SLACK: [\n { id: 'bot_token', type: FIELD_TYPES.PASSWORD, label: 'Bot User OAuth Token', required: true, isPassword: true },\n { id: 'channel', type: FIELD_TYPES.SELECT, label: 'Default Channel', required: false },\n ],\n} as const;"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGO,MAAM,UAAa,GAAA;AAAA,EACxB,IAAM,EAAA,MAAA;AAAA,EACN,KAAO,EAAA,OAAA;AAAA,EACP,QAAU,EAAA,UAAA;AAAA,EACV,MAAQ,EAAA,QAAA;AAAA,EACR,WAAa,EAAA,aAAA;AAAA,EACb,QAAU,EAAA,UAAA;AAAA,EACV,KAAO,EAAA,OAAA;AAAA,EACP,QAAU,EAAA,UAAA;AAAA,EACV,MAAQ,EAAA,QAAA;AAAA,EACR,GAAK,EAAA,KAAA;AAAA,EACL,IAAM,EAAA,MAAA;AACR,EAAA;AAEO,MAAM,WAAc,GAAA;AAAA,EACzB,IAAM,EAAA,MAAA;AAAA,EACN,KAAO,EAAA,OAAA;AAAA,EACP,QAAU,EAAA,UAAA;AAAA,EACV,MAAQ,EAAA,QAAA;AAAA,EACR,WAAa,EAAA,aAAA;AAAA,EACb,QAAU,EAAA,UAAA;AAAA,EACV,KAAO,EAAA,OAAA;AAAA,EACP,QAAU,EAAA,UAAA;AAAA,EACV,MAAQ,EAAA,QAAA;AAAA,EACR,GAAK,EAAA,KAAA;AAAA,EACL,IAAM,EAAA,MAAA;AACR,EAAA;AAgDO,MAAM,oBAAuB,GAAA;AAAA,EAClC,OAAS,EAAA;AAAA,IACP,EAAI,EAAA,SAAA;AAAA,IACJ,MAAM,WAA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AA,EAAO,iBAAmB,EAAA,QAAA,EAAU,KAAM,EAAA;AAAA,GACvF;AACF;;;;;;"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var themeWrapper = require('../commons/components/theme-wrapper.js');
|
|
5
|
-
var index = require('./constants/index.js');
|
|
5
|
+
var index$1 = require('./constants/index.js');
|
|
6
|
+
var index = require('../commons/constants/index.js');
|
|
6
7
|
var flex = require('../node_modules/@sparrowengg/twigs-react/dist/es/flex/flex.js');
|
|
7
8
|
var box = require('../node_modules/@sparrowengg/twigs-react/dist/es/box/box.js');
|
|
8
9
|
var heading = require('../node_modules/@sparrowengg/twigs-react/dist/es/heading/heading.js');
|
|
@@ -17,38 +18,41 @@ const Authentication = ({
|
|
|
17
18
|
fields,
|
|
18
19
|
onSuccessHandler
|
|
19
20
|
}) => {
|
|
20
|
-
return /* @__PURE__ */ React.createElement(themeWrapper.default, null, /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React.createElement(box.Box, { css: { width:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
21
|
+
return /* @__PURE__ */ React.createElement(themeWrapper.default, null, /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", justifyContent: "center" }, /* @__PURE__ */ React.createElement(box.Box, { css: { width: index.FORM_WIDTH } }, /* @__PURE__ */ React.createElement(heading.Heading, { size: "h5" }, `Connect your ${integrationName} account`), /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$8", css: { marginTop: "$12" } }, fields.map(
|
|
22
|
+
(field) => field.type === index$1.FieldTypes.SELECT ? /* @__PURE__ */ React.createElement(flex.Flex, { key: field.id, gap: "$2", flexDirection: "column", css: { width: "100%" } }, /* @__PURE__ */ React.createElement(formLabel.FormLabel, { size: "xs", css: { fontWeight: "$5" } }, field.label), /* @__PURE__ */ React.createElement(
|
|
23
|
+
select.Select,
|
|
24
|
+
{
|
|
25
|
+
size: "lg",
|
|
26
|
+
value: field.value,
|
|
27
|
+
required: field == null ? void 0 : field.required,
|
|
28
|
+
requiredIndicator: field == null ? void 0 : field.required,
|
|
29
|
+
onChange: (value) => {
|
|
30
|
+
var _a;
|
|
31
|
+
return field.changeFieldValue(value, (_a = field.id) != null ? _a : field.label);
|
|
32
|
+
},
|
|
33
|
+
options: field == null ? void 0 : field.options,
|
|
34
|
+
placeholder: field == null ? void 0 : field.placeholder
|
|
35
|
+
}
|
|
36
|
+
)) : /* @__PURE__ */ React.createElement(
|
|
37
|
+
formInput.FormInput,
|
|
38
|
+
{
|
|
39
|
+
key: field.id,
|
|
40
|
+
size: "lg",
|
|
41
|
+
label: field.label,
|
|
42
|
+
required: field == null ? void 0 : field.required,
|
|
43
|
+
requiredIndicator: field == null ? void 0 : field.required,
|
|
44
|
+
placeholder: field == null ? void 0 : field.placeholder,
|
|
45
|
+
type: field.isPassword ? index$1.FieldTypes.PASSWORD : index$1.FieldTypes.TEXT,
|
|
46
|
+
onChange: (e) => {
|
|
47
|
+
var _a;
|
|
48
|
+
return field.changeFieldValue(
|
|
49
|
+
e.currentTarget.value,
|
|
50
|
+
(_a = field.id) != null ? _a : field.label
|
|
51
|
+
);
|
|
52
|
+
}
|
|
49
53
|
}
|
|
50
|
-
|
|
51
|
-
))
|
|
54
|
+
)
|
|
55
|
+
)), /* @__PURE__ */ React.createElement(
|
|
52
56
|
button.Button,
|
|
53
57
|
{
|
|
54
58
|
css: { marginTop: "$16" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/authentication/index.tsx"],"sourcesContent":["import {\n Box,\n Button,\n Flex,\n FormInput,\n FormLabel,\n Heading,\n Select,\n ThemeProvider\n} from \"@sparrowengg/twigs-react\";\nimport { ChevronRightIcon } from \"@sparrowengg/twigs-react-icons\";\nimport React from \"react\";\nimport { AuthenticationProps } from \"./types\";\nimport ThemeWrapper from \"../commons/components/theme-wrapper\";\nimport { FieldTypes } from \"./constants\";\n\nexport const Authentication = ({\n integrationName,\n fields,\n onSuccessHandler\n}: AuthenticationProps) => {\n return (\n <ThemeWrapper>\n <Flex alignItems=\"center\" justifyContent=\"center\">\n <Box css={{ width:
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/authentication/index.tsx"],"sourcesContent":["import {\n Box,\n Button,\n Flex,\n FormInput,\n FormLabel,\n Heading,\n Select,\n ThemeProvider\n} from \"@sparrowengg/twigs-react\";\nimport { ChevronRightIcon } from \"@sparrowengg/twigs-react-icons\";\nimport React from \"react\";\nimport { AuthenticationProps } from \"./types\";\nimport ThemeWrapper from \"../commons/components/theme-wrapper\";\nimport { FieldTypes } from \"./constants\";\nimport { FORM_WIDTH } from \"../commons/constants\";\n\nexport const Authentication = ({\n integrationName,\n fields,\n onSuccessHandler\n}: AuthenticationProps) => {\n return (\n <ThemeWrapper>\n <Flex alignItems=\"center\" justifyContent=\"center\">\n <Box css={{ width: FORM_WIDTH }}>\n <Heading size=\"h5\">{`Connect your ${integrationName} account`}</Heading>\n <Flex flexDirection=\"column\" gap=\"$8\" css={{ marginTop: \"$12\" }}>\n {fields.map((field) => \n field.type === FieldTypes.SELECT ? (\n <Flex key={field.id} gap=\"$2\" flexDirection=\"column\" css={{ width: \"100%\" }}>\n <FormLabel size=\"xs\" css={{ fontWeight: \"$5\" }}>\n {field.label}\n </FormLabel>\n <Select\n size=\"lg\"\n value={field.value}\n required={field?.required}\n requiredIndicator={field?.required}\n onChange={(value: unknown) =>\n field.changeFieldValue(value as string | number | boolean, field.id ?? field.label)\n }\n options={field?.options}\n placeholder={field?.placeholder}\n />\n </Flex>\n ) : (\n <FormInput\n key={field.id}\n size=\"lg\"\n label={field.label}\n required={field?.required}\n requiredIndicator={field?.required}\n placeholder={field?.placeholder}\n type={\n field.isPassword ? FieldTypes.PASSWORD : FieldTypes.TEXT\n }\n onChange={(e: unknown) =>\n field.changeFieldValue(\n (e as React.ChangeEvent<HTMLInputElement>).currentTarget.value,\n field.id ?? field.label\n )\n }\n />\n )\n )}\n </Flex>\n <Button\n css={{ marginTop: \"$16\" }}\n onClick={onSuccessHandler}\n rightIcon={<ChevronRightIcon />}\n size=\"lg\"\n >\n Authorize & Continue\n </Button>\n </Box>\n </Flex>\n </ThemeWrapper>\n );\n};\n"],"names":["ThemeWrapper","Flex","Box","FORM_WIDTH","Heading","FieldTypes","FormLabel","Select","FormInput","Button","ChevronRightIcon"],"mappings":";;;;;;;;;;;;;;;AAiBO,MAAM,iBAAiB,CAAC;AAAA,EAC7B,eAAA;AAAA,EACA,MAAA;AAAA,EACA,gBAAA;AACF,CAA2B,KAAA;AACzB,EAAA,uBACG,KAAA,CAAA,aAAA,CAAAA,oBAAA,EAAA,IAAA,kBACE,KAAA,CAAA,aAAA,CAAAC,SAAA,EAAA,EAAK,YAAW,QAAS,EAAA,cAAA,EAAe,QACvC,EAAA,kBAAA,KAAA,CAAA,aAAA,CAACC,WAAI,GAAK,EAAA,EAAE,KAAO,EAAAC,gBAAA,sBAChB,KAAA,CAAA,aAAA,CAAAC,eAAA,EAAA,EAAQ,IAAK,EAAA,IAAA,EAAA,EAAM,CAAgB,aAAA,EAAA,eAAe,CAAW,QAAA,CAAA,CAAA,sCAC7DH,SAAK,EAAA,EAAA,aAAA,EAAc,QAAS,EAAA,GAAA,EAAI,MAAK,GAAK,EAAA,EAAE,SAAW,EAAA,KAAA,MACrD,MAAO,CAAA,GAAA;AAAA,IAAI,CAAC,KAAA,KACX,KAAM,CAA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AA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAA,QAAA;AAAA,QACjB,mBAAmB,KAAO,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAA,QAAA;AAAA,QAC1B,aAAa,KAAO,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAA,WAAA;AAAA,QACpB,IACE,EAAA,KAAA,CAAM,UAAa,GAAAH,kBAAA,CAAW,WAAWA,kBAAW,CAAA,IAAA;AAAA,QAE7B,QAAA,EAAU,CAAC,CAAY,KAAA;AAzDlE,UAAA,IAAA,EAAA,CAAA;AA0D2B,UAAM,OAAA,KAAA,CAAA,gBAAA;AAAA,YACH,EAA0C,aAAc,CAAA,KAAA;AAAA,YACzD,CAAA,EAAA,GAAA,KAAA,CAAM,EAAN,KAAA,IAAA,GAAA,EAAA,GAAY,KAAM,CAAA,KAAA;AAAA,WACpB,CAAA;AAAA,SAAA;AAAA,OAAA;AAAA,KAEX;AAAA,GAGN,CACA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAACI,aAAA;AAAA,IAAA;AAAA,MACC,GAAA,EAAK,EAAE,SAAA,EAAW,KAAM,EAAA;AAAA,MACxB,OAAS,EAAA,gBAAA;AAAA,MACT,SAAA,sCAAYC,6BAAiB,EAAA,IAAA,CAAA;AAAA,MAC7B,IAAK,EAAA,IAAA;AAAA,KAAA;AAAA,IACN,sBAAA;AAAA,GAGH,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const MAPPING_TYPES = [
|
|
4
|
+
{ label: "Question", value: "QUESTION" },
|
|
5
|
+
{ label: "Contact", value: "CONTACT" },
|
|
6
|
+
{ label: "Variable", value: "VARIABLE" },
|
|
7
|
+
{ label: "Expression", value: "EXPRESSION" },
|
|
8
|
+
{ label: "Submission Property", value: "SUBMISSION_PROPERTY" }
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
exports.MAPPING_TYPES = MAPPING_TYPES;
|
|
12
|
+
//# sourceMappingURL=enhanced.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enhanced.js","sources":["../../../../src/commons/constants/enhanced.ts"],"sourcesContent":["import { SelectOption, DateOption, FilterCondition } from '../types/enhanced';\n\n// API Constants\nexport const API_ENDPOINTS = {\n SURVEY_SPARROW: 'https://api.surveysparrow.com',\n SURVEY_QUESTIONS: '/surveys/:surveyId/questions',\n SURVEY_VARIABLES: '/surveys/:surveyId/variables',\n SURVEY_EXPRESSIONS: '/surveys/:surveyId/expressions',\n CONTACT_PROPERTIES: '/contact-properties',\n SURVEY_CHANNELS: '/surveys/:surveyId/channels',\n} as const;\n\n// UI Constants\nexport const UI_CONSTANTS = {\n FORM_WIDTH: 488,\n MODAL_MAX_WIDTH: 600,\n INPUT_MAX_LENGTH: 30,\n TABLE_PAGE_SIZE: 10,\n MAX_FILTER_CONDITIONS: 5,\n DEBOUNCE_DELAY: 300,\n} as const;\n\n// CSS Spacing (Stitches Design Tokens)\nexport const SPACING = {\n xs: '$2',\n sm: '$4',\n md: '$8',\n lg: '$12',\n xl: '$16',\n '2xl': '$24',\n '3xl': '$32',\n '4xl': '$40',\n} as const;\n\n// Field Types\nexport const FIELD_TYPES = {\n TEXT: 'text',\n EMAIL: 'email',\n PASSWORD: 'password',\n NUMBER: 'number',\n DATE: 'date',\n SELECT: 'select',\n CHECKBOX: 'checkbox',\n RADIO: 'radio',\n TEXTAREA: 'textarea',\n} as const;\n\n// Integration Field Types\nexport const INTEGRATION_FIELD_TYPES = {\n STRING: 'STRING',\n NUMBER: 'NUMBER',\n BOOLEAN: 'BOOLEAN',\n DATE_TIME: 'DATE_TIME',\n EMAIL: 'EMAIL',\n PHONE: 'PHONE',\n URL: 'URL',\n} as const;\n\n// Survey Types\nexport const SURVEY_TYPES = {\n CLASSIC: 'classic',\n NPS: 'nps',\n CHAT: 'chat',\n KIOSK: 'kiosk',\n} as const;\n\n// Mapping Types\nexport const MAPPING_TYPES: SelectOption[] = [\n { label: 'Question', value: 'QUESTION' },\n { label: 'Contact', value: 'CONTACT' },\n { label: 'Variable', value: 'VARIABLE' },\n { label: 'Expression', value: 'EXPRESSION' },\n { label: 'Submission Property', value: 'SUBMISSION_PROPERTY' },\n];\n\n// Data Type Options for Integration Fields\nexport const DATA_TYPE_OPTIONS: SelectOption[] = [\n {\n label: 'String',\n value: 'STRING',\n },\n {\n label: 'Number',\n value: 'NUMBER',\n },\n {\n label: 'Boolean',\n value: 'BOOLEAN',\n },\n {\n label: 'Date/Time',\n value: 'DATE_TIME',\n },\n];\n\n// Filter Operators\nexport const FILTER_OPERATORS: SelectOption[] = [\n { label: 'is equals to', value: 'IS' },\n { label: 'is not equals to', value: 'IS_NOT' },\n { label: 'contains', value: 'CONTAINS' },\n { label: 'not contains', value: 'CONTAINS_NOT' },\n { label: 'has no value', value: 'NO_VALUE' },\n { label: 'has any value', value: 'ANY_VALUE' },\n { label: 'before', value: 'BEFORE' },\n { label: 'after', value: 'AFTER' },\n { label: 'on', value: 'ON' },\n];\n\n// Boolean Options\nexport const BOOLEAN_OPTIONS: SelectOption[] = [\n { label: 'True', value: 'true' },\n { label: 'False', value: 'false' },\n];\n\n// Date Options\nexport const DATE_OPTIONS: DateOption[] = [\n {\n label: 'Today',\n value: 'today',\n type: 'dynamic',\n },\n {\n label: 'Yesterday',\n value: 'yesterday',\n type: 'dynamic',\n },\n {\n label: 'Last 7 days',\n value: 'last_7_days',\n type: 'dynamic',\n },\n {\n label: 'Last 30 days',\n value: 'last_30_days',\n type: 'dynamic',\n },\n {\n label: 'Last 3 months',\n value: 'last_3_months',\n type: 'dynamic',\n },\n {\n label: 'Custom Date',\n value: 'custom',\n type: 'static',\n },\n];\n\n// Submission Properties for Classic Surveys\nexport const CLASSIC_SUBMISSION_PROPERTIES: SelectOption[] = [\n { label: 'Submitted at', value: 'completed_time', type: 'STRING' },\n { label: 'Device type', value: 'device_type', type: 'STRING' },\n { label: 'Language', value: 'language', type: 'STRING' },\n { label: 'Start time', value: 'start_time', type: 'STRING' },\n { label: 'Survey ID', value: 'survey_id', type: 'STRING' },\n { label: 'Time taken', value: 'time_taken', type: 'STRING' },\n { label: 'Submission state', value: 'state', type: 'STRING' },\n { label: 'Submission ID', value: 'id', type: 'STRING' },\n { label: 'Location', value: 'location', type: 'STRING' },\n { label: 'OS', value: 'os', type: 'STRING' },\n { label: 'Browser', value: 'browser', type: 'STRING' },\n { label: 'IP', value: 'ip', type: 'STRING' },\n { label: 'Channel Type', value: 'channel_type', type: 'STRING' },\n];\n\n// Submission Properties for NPS Surveys\nexport const NPS_SUBMISSION_PROPERTIES: SelectOption[] = [\n { label: 'Submission Start time', value: 'start_time', type: 'STRING' },\n { label: 'Device type', value: 'device_type', type: 'STRING' },\n { label: 'IP', value: 'ip', type: 'STRING' },\n { label: 'Language', value: 'language', type: 'STRING' },\n { label: 'Survey ID', value: 'survey_id', type: 'STRING' },\n { label: 'Submission state', value: 'state', type: 'STRING' },\n { label: 'Submission ID', value: 'id', type: 'STRING' },\n { label: 'Time taken', value: 'time_taken', type: 'STRING' },\n { label: 'Submitted at', value: 'completed_time', type: 'STRING' },\n { label: 'Location', value: 'location', type: 'STRING' },\n { label: 'OS', value: 'os', type: 'STRING' },\n { label: 'Browser', value: 'browser', type: 'STRING' },\n];\n\n// Contact Import Frequencies\nexport const IMPORT_FREQUENCIES: SelectOption[] = [\n { label: 'One Time', value: 'oneTime' },\n { label: 'Daily', value: 'daily' },\n { label: 'Weekly', value: 'weekly' },\n { label: 'Monthly', value: 'monthly' },\n];\n\n// Time Zones (Common ones)\nexport const TIME_ZONES: SelectOption[] = [\n { label: 'UTC', value: 'UTC' },\n { label: 'America/New_York', value: 'America/New_York' },\n { label: 'America/Los_Angeles', value: 'America/Los_Angeles' },\n { label: 'Europe/London', value: 'Europe/London' },\n { label: 'Asia/Kolkata', value: 'Asia/Kolkata' },\n { label: 'Asia/Tokyo', value: 'Asia/Tokyo' },\n];\n\n// Notification Channels\nexport const NOTIFICATION_CHANNELS: SelectOption[] = [\n { label: 'Email', value: 'email' },\n { label: 'SMS', value: 'sms' },\n { label: 'WhatsApp', value: 'whatsapp' },\n { label: 'Slack', value: 'slack' },\n { label: 'Webhook', value: 'webhook' },\n];\n\n// Status Options\nexport const STATUS_OPTIONS = {\n PENDING: 'pending',\n IN_PROGRESS: 'in_progress',\n COMPLETED: 'completed',\n FAILED: 'failed',\n CANCELLED: 'cancelled',\n} as const;\n\n// Error Messages\nexport const ERROR_MESSAGES = {\n REQUIRED_FIELD: 'This field is required',\n INVALID_EMAIL: 'Please enter a valid email address',\n INVALID_PHONE: 'Please enter a valid phone number',\n INVALID_URL: 'Please enter a valid URL',\n MIN_LENGTH: (min: number) => `Minimum ${min} characters required`,\n MAX_LENGTH: (max: number) => `Maximum ${max} characters allowed`,\n NETWORK_ERROR: 'Network error. Please try again.',\n GENERIC_ERROR: 'Something went wrong. Please try again.',\n} as const;\n\n// Success Messages\nexport const SUCCESS_MESSAGES = {\n SAVED: 'Saved successfully',\n UPDATED: 'Updated successfully',\n DELETED: 'Deleted successfully',\n IMPORTED: 'Import completed successfully',\n EXPORTED: 'Export completed successfully',\n} as const;\n\n// Loading Messages\nexport const LOADING_MESSAGES = {\n SAVING: 'Saving...',\n LOADING: 'Loading...',\n PROCESSING: 'Processing...',\n IMPORTING: 'Importing...',\n EXPORTING: 'Exporting...',\n} as const;\n\n// Default Values\nexport const DEFAULT_VALUES = {\n PAGE_SIZE: 10,\n DEBOUNCE_DELAY: 300,\n TOAST_DURATION: 3000,\n MAX_FILE_SIZE: 5 * 1024 * 1024, // 5MB\n SUPPORTED_FILE_TYPES: ['.csv', '.xlsx', '.json'],\n} as const;\n\n// Validation Rules\nexport const VALIDATION_RULES = {\n EMAIL_REGEX: /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/,\n PHONE_REGEX: /^\\+?[\\d\\s\\-\\(\\)]+$/,\n URL_REGEX: /^https?:\\/\\/.+/,\n MIN_PASSWORD_LENGTH: 8,\n MAX_TEXT_LENGTH: 255,\n MAX_TEXTAREA_LENGTH: 1000,\n} as const;\n"],"names":[],"mappings":";;AAmEO,MAAM,aAAgC,GAAA;AAAA,EAC3C,EAAE,KAAA,EAAO,UAAY,EAAA,KAAA,EAAO,UAAW,EAAA;AAAA,EACvC,EAAE,KAAA,EAAO,SAAW,EAAA,KAAA,EAAO,SAAU,EAAA;AAAA,EACrC,EAAE,KAAA,EAAO,UAAY,EAAA,KAAA,EAAO,UAAW,EAAA;AAAA,EACvC,EAAE,KAAA,EAAO,YAAc,EAAA,KAAA,EAAO,YAAa,EAAA;AAAA,EAC3C,EAAE,KAAA,EAAO,qBAAuB,EAAA,KAAA,EAAO,qBAAsB,EAAA;AAC/D;;;;"}
|
|
@@ -22,6 +22,9 @@ var __spreadValues = (a, b) => {
|
|
|
22
22
|
};
|
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
24
|
const surveySparrowURL = "https://api.surveysparrow.com";
|
|
25
|
+
const FORM_WIDTH = 488;
|
|
26
|
+
const MODAL_MAX_WIDTH = 600;
|
|
27
|
+
const INPUT_MAX_LENGTH = 30;
|
|
25
28
|
const mappingType = [
|
|
26
29
|
{ id: 1, label: "Question", value: "QUESTION" },
|
|
27
30
|
{ id: 2, label: "Contact", value: "CONTACT" },
|
|
@@ -95,7 +98,7 @@ const defaultFieldValue = {
|
|
|
95
98
|
];
|
|
96
99
|
const mappingTabValues = [
|
|
97
100
|
{ id: 1, name: "Questions", value: "QUESTIONS", placeholder: "questions" },
|
|
98
|
-
{ id: 6, name: "
|
|
101
|
+
{ id: 6, name: "Enriched Columns", value: "DERIVED_QUESTIONS", placeholder: "derivedQuestions" },
|
|
99
102
|
{ id: 2, name: "Variable", value: "VARIABLE", placeholder: "variables" },
|
|
100
103
|
{
|
|
101
104
|
id: 3,
|
|
@@ -220,6 +223,9 @@ const dynamicDateOptions = [
|
|
|
220
223
|
}
|
|
221
224
|
];
|
|
222
225
|
|
|
226
|
+
exports.FORM_WIDTH = FORM_WIDTH;
|
|
227
|
+
exports.INPUT_MAX_LENGTH = INPUT_MAX_LENGTH;
|
|
228
|
+
exports.MODAL_MAX_WIDTH = MODAL_MAX_WIDTH;
|
|
223
229
|
exports.booleanOptions = booleanOptions;
|
|
224
230
|
exports.defaultFieldValue = defaultFieldValue;
|
|
225
231
|
exports.dynamicDateOptions = dynamicDateOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/commons/constants/index.ts"],"sourcesContent":["import { v4 as uuid } from \"uuid\";\n\nexport const surveySparrowURL = \"https://api.surveysparrow.com\";\n\ntype MappingType = {\n id: number;\n label: string;\n value: string;\n};\n\nexport const mappingType: MappingType[] = [\n { id: 1, label: \"Question\", value: \"QUESTION\" },\n { id: 2, label: \"Contact\", value: \"CONTACT\" },\n { id: 3, label: \"Variable\", value: \"VARIABLE\" },\n { id: 4, label: \"Expression\", value: \"EXPRESSION\" },\n { id: 5, label: \"Submission Property\", value: \"SUBMISSION_PROPERTY\" },\n];\n\ntype FieldValue = {\n id: string;\n surveySparrowField: string | null;\n integrationField: string | null;\n integrationFieldType: string | null;\n isEssentialField: boolean;\n mappedType: MappingType;\n defaultValue: string | null;\n label?: string;\n value?: string;\n type?: string;\n};\n\nexport const defaultFieldValue: FieldValue = {\n id: uuid(),\n surveySparrowField: null,\n integrationField: null,\n integrationFieldType: null,\n isEssentialField: false,\n mappedType: mappingType[0],\n defaultValue: null,\n};\n\ntype IntegrationMappingField = {\n id: number;\n label: string;\n value: string;\n type: string;\n dependency?: FieldValue[];\n};\n\nexport const sampleIntegrationMappingFields: IntegrationMappingField[] = [\n { id: 1, label: \"Email\", value: \"email\", type: \"email\" },\n { id: 2, label: \"Phone Number\", value: \"phone_number\", type: \"NUMBER\" },\n { id: 3, label: \"First Name\", value: \"first_name\", type: \"string\" },\n { id: 4, label: \"Organization\", value: \"organization\", type: \"string\" },\n { id: 5, label: \"Title\", value: \"title\", type: \"string\" },\n {\n id: 6,\n label: \"External Id\",\n value: \"external_id\",\n type: \"string\",\n dependency: [\n {\n ...defaultFieldValue,\n isEssentialField: true,\n id: uuid(),\n label: \"Title\",\n value: \"title\",\n type: \"string\",\n },\n {\n ...defaultFieldValue,\n id: uuid(),\n label: \"Image\",\n value: \"image\",\n type: \"string\",\n },\n ],\n },\n { id: 7, label: \"Last Name\", value: \"last_name\", type: \"string\" },\n { id: 8, label: \"Image\", value: \"image\", type: \"string\" },\n { id: 9, label: \"Address1\", value: \"address1\", type: \"string\" },\n { id: 10, label: \"Address2\", value: \"address2\", type: \"string\" },\n { id: 11, label: \"City\", value: \"city\", type: \"string\" },\n { id: 12, label: \"Country\", value: \"country\", type: \"string\" },\n { id: 13, label: \"Latitude\", value: \"latitude\", type: \"string\" },\n { id: 14, label: \"Longitude\", value: \"longitude\", type: \"string\" },\n { id: 15, label: \"Region\", value: \"region\", type: \"string\" },\n { id: 16, label: \"Zip Code\", value: \"zip\", type: \"string\" },\n { id: 17, label: \"Time Zone\", value: \"timezone\", type: \"string\" },\n { id: 18, label: \"IP Address\", value: \"ip\", type: \"DATE_TIME\" },\n];\n\ntype SampleField = {\n id?: string;\n surveySparrowField: string | null;\n integrationField: string | null;\n isEssentialField: boolean;\n mappedType: MappingType;\n};\n\nexport const sampleFields: SampleField[] = [\n {\n surveySparrowField: null,\n integrationField: null,\n isEssentialField: false,\n mappedType: { id: 1, label: \"Question\", value: \"QUESTION\" },\n },\n {\n id: uuid(),\n surveySparrowField: null,\n integrationField: null,\n isEssentialField: true,\n mappedType: { id: 1, label: \"Question\", value: \"QUESTION\" },\n },\n];\n\nexport const sampleIntegrationFields: IntegrationMappingField[] = [\n { id: 1, label: \"Email\", value: \"email\", type: \"email\" },\n];\n\ntype MappingTabValue = {\n id: number;\n name: string;\n value: string;\n placeholder: string;\n};\n\nexport const mappingTabValues: MappingTabValue[] = [\n { id: 1, name: \"Questions\", value: \"QUESTIONS\", placeholder: \"questions\" },\n { id: 6, name: \"AI Columns\", value: \"DERIVED_QUESTIONS\", placeholder: \"derivedQuestions\" },\n { id: 2, name: \"Variable\", value: \"VARIABLE\", placeholder: \"variables\" },\n {\n id: 3,\n name: \"Contact\",\n value: \"CONTACT\",\n placeholder: \"contactProperties\",\n },\n {\n id: 4,\n name: \"Expression\",\n value: \"EXPRESSION\",\n placeholder: \"expressions\",\n },\n { id: 5, name: \"Property\", value: \"PROPERTY\", placeholder: \"property\" },\n \n];\n\ntype MappingPropertyValue = {\n name: string;\n id: string;\n isEnabled: boolean;\n};\n\nexport const mappingPropertyValues: MappingPropertyValue[] = [\n { name: \"Select all Properties\", id: \"ALL\", isEnabled: false },\n { name: \"Started Time\", id: \"STARTED_TIME\", isEnabled: false },\n { name: \"Submitted Time\", id: \"SUBMITTED_TIME\", isEnabled: false },\n { name: \"CompletionStatus\", id: \"COMPLETION_STATUS\", isEnabled: false },\n { name: \"IP Address\", id: \"IP_ADDRESS\", isEnabled: false },\n { name: \"Location\", id: \"LOCATION\", isEnabled: false },\n { name: \"DMS (Lat, Long)\", id: \"DMS\", isEnabled: false },\n { name: \"Channel Type\", id: \"CHANNEL_TYPE\", isEnabled: false },\n { name: \"Channel Name\", id: \"CHANNEL_NAME\", isEnabled: false },\n { name: \"Device ID\", id: \"DEVICE_ID\", isEnabled: false },\n { name: \"Device Name\", id: \"DEVICE_NAME\", isEnabled: false },\n { name: \"Browser\", id: \"BROWSER\", isEnabled: false },\n { name: \"OS\", id: \"OS\", isEnabled: false },\n { name: \"Submission Id\", id: \"SUBMISSION_ID\", isEnabled: false },\n { name: \"Time Zone\", id: \"TIME_ZONE\", isEnabled: false },\n { name: \"Device Type\", id: \"DEVICE_TYPE\", isEnabled: false },\n { name: \"Browser Language\", id: \"BROWSER_LANGUAGE\", isEnabled: false },\n { name: \"Tags\", id: \"TAGS\", isEnabled: false },\n { name: \"Language Name\", id: \"LANGUAGE_NAME\", isEnabled: false },\n];\n\ntype SubMenuOption = {\n id: number;\n label: string;\n subLabel: string;\n value: string;\n};\n\nexport const subMenuOptions: SubMenuOption[] = [\n {\n id: 1,\n label: \"String\",\n subLabel: \"Textual Data. (Eg: Hello World, 1234)\",\n value: \"STRING\",\n },\n {\n id: 2,\n label: \"Number\",\n subLabel: \"Numeric Value. (Eg: 123, -45, 0)\",\n value: \"NUMBER\",\n },\n { id: 3, label: \"Boolean\", subLabel: \"True or False\", value: \"BOOLEAN\" },\n {\n id: 4,\n label: \"Date/Time\",\n subLabel: \"Timestamp or Calendar Information\",\n value: \"DATE_TIME\",\n },\n];\n\ntype OperatorOption = {\n id: number;\n label: string;\n value: string;\n isDateOnly?: boolean;\n type?: string\n};\n\nexport const operatorOptions: OperatorOption[] = [\n { id: 1, label: \"is equals to\", value: \"IS\", type: \"BOOLEAN\" },\n { id: 2, label: \"is not equals to\", value: \"IS_NOT\", type: \"BOOLEAN\" },\n { id: 3, label: \"contains\", value: \"CONTAINS\" },\n { id: 4, label: \"not contains\", value: \"CONTAINS_NOT\" },\n { id: 5, label: \"has no value\", value: \"NO_VALUE\" },\n { id: 6, label: \"before\", value: \"BEFORE\", isDateOnly: true },\n { id: 7, label: \"after\", value: \"AFTER\", isDateOnly: true },\n { id: 8, label: \"on\", value: \"ON\", isDateOnly: true },\n { id: 9, label: \"has any value\", value: \"ANY_VALUE\" },\n];\n\ntype BooleanOption = {\n id: number;\n label: string;\n value: boolean;\n};\n\nexport const booleanOptions: BooleanOption[] = [\n { id: 1, label: \"True\", value: true },\n { id: 2, label: \"False\", value: false },\n];\nexport const integrationsNpsSubmissionProperties = [\n { label: 'Submission Start time', value: 'start_time', type: 'STRING' },\n { label: 'Device type', value: 'device_type', type: 'STRING' },\n { label: 'IP', value: 'ip', type: 'STRING' },\n { label: 'Language', value: 'language', type: 'STRING' },\n { label: 'Survey ID', value: 'survey_id', type: 'STRING' },\n { label: 'Submission state', value: 'state', type: 'STRING' },\n { label: 'Submission ID', value: 'id', type: 'STRING' },\n { label: 'Time taken', value: 'time_taken', type: 'STRING' },\n { label: 'Submitted at', value: 'completed_time', type: 'STRING' },\n { label: 'Location', value: 'location', type: 'STRING' },\n { label: 'OS', value: 'os', type: 'STRING' },\n { label: 'Browser', value: 'browser', type: 'STRING' },\n { label: 'Login Email (Offline)', value: 'loginEmail', type: 'STRING' },\n { label: 'DMS (Offline)', value: 'dms', type: 'STRING' },\n]; \n\nexport const integrationsClassicSubmissionProperties = [\n { label: 'Submitted at', value: 'completed_time', type: 'STRING' },\n { label: 'Device type', value: 'device_type', type: 'STRING' },\n { label: 'Language', value: 'language', type: 'STRING' },\n { label: 'Start time', value: 'start_time', type: 'STRING' },\n { label: 'Survey ID', value: 'survey_id', type: 'STRING' },\n { label: 'Time taken', value: 'time_taken', type: 'STRING' },\n { label: 'Submission state', value: 'state', type: 'STRING' },\n { label: 'Submission ID', value: 'id', type: 'STRING' },\n { label: 'Location', value: 'location', type: 'STRING' },\n { label: 'OS', value: 'os', type: 'STRING' },\n { label: 'Browser', value: 'browser', type: 'STRING' },\n { label: 'IP', value: 'ip', type: 'STRING' },\n { label: 'Channel Type', value: 'channel_type', type: 'STRING' },\n { label: 'Login Email (Offline)', value: 'loginEmail', type: 'STRING' },\n { label: 'DMS (Offline)', value: 'dms', type: 'STRING' },\n];\n\nexport const dynamicDateOptions = [\n {\n label: \"Last 7 days\",\n value: \"last_7_days\",\n },\n {\n label: \"Last 30 days\",\n value: \"last_30_days\",\n },\n {\n label: \"Last 3 months\",\n value: \"last_3_months\",\n },\n {\n label: \"Custom\",\n value: \"custom\",\n },\n];\n"],"names":["uuid"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,gBAAmB,GAAA,gCAAA;AAQzB,MAAM,WAA6B,GAAA;AAAA,EACxC,EAAE,EAAI,EAAA,CAAA,EAAG,KAAO,EAAA,UAAA,EAAY,OAAO,UAAW,EAAA;AAAA,EAC9C,EAAE,EAAI,EAAA,CAAA,EAAG,KAA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B,GAAA;AAAA,EAChC;AAAA,IACE,KAAO,EAAA,aAAA;AAAA,IACP,KAAO,EAAA,aAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,cAAA;AAAA,IACP,KAAO,EAAA,cAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,eAAA;AAAA,IACP,KAAO,EAAA,eAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,QAAA;AAAA,IACP,KAAO,EAAA,QAAA;AAAA,GACT;AACF;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/commons/constants/index.ts"],"sourcesContent":["import { v4 as uuid } from \"uuid\";\n\nexport const surveySparrowURL = \"https://api.surveysparrow.com\";\n\n// UI Constants\nexport const FORM_WIDTH = 488;\nexport const MODAL_MAX_WIDTH = 600;\nexport const INPUT_MAX_LENGTH = 30;\n\n// CSS spacing constants (using stitches design tokens)\nexport const SPACING = {\n xs: \"$2\",\n sm: \"$4\", \n md: \"$8\",\n lg: \"$12\",\n xl: \"$16\",\n \"2xl\": \"$24\",\n \"3xl\": \"$32\",\n \"4xl\": \"$40\",\n} as const;\n\ntype MappingType = {\n id: number;\n label: string;\n value: string;\n};\n\nexport const mappingType: MappingType[] = [\n { id: 1, label: \"Question\", value: \"QUESTION\" },\n { id: 2, label: \"Contact\", value: \"CONTACT\" },\n { id: 3, label: \"Variable\", value: \"VARIABLE\" },\n { id: 4, label: \"Expression\", value: \"EXPRESSION\" },\n { id: 5, label: \"Submission Property\", value: \"SUBMISSION_PROPERTY\" },\n];\n\ntype FieldValue = {\n id: string;\n surveySparrowField: string | null;\n integrationField: string | null;\n integrationFieldType: string | null;\n isEssentialField: boolean;\n mappedType: MappingType;\n defaultValue: string | null;\n label?: string;\n value?: string;\n type?: string;\n};\n\nexport const defaultFieldValue: FieldValue = {\n id: uuid(),\n surveySparrowField: null,\n integrationField: null,\n integrationFieldType: null,\n isEssentialField: false,\n mappedType: mappingType[0],\n defaultValue: null,\n};\n\ntype IntegrationMappingField = {\n id: number;\n label: string;\n value: string;\n type: string;\n dependency?: FieldValue[];\n};\n\nexport const sampleIntegrationMappingFields: IntegrationMappingField[] = [\n { id: 1, label: \"Email\", value: \"email\", type: \"email\" },\n { id: 2, label: \"Phone Number\", value: \"phone_number\", type: \"NUMBER\" },\n { id: 3, label: \"First Name\", value: \"first_name\", type: \"string\" },\n { id: 4, label: \"Organization\", value: \"organization\", type: \"string\" },\n { id: 5, label: \"Title\", value: \"title\", type: \"string\" },\n {\n id: 6,\n label: \"External Id\",\n value: \"external_id\",\n type: \"string\",\n dependency: [\n {\n ...defaultFieldValue,\n isEssentialField: true,\n id: uuid(),\n label: \"Title\",\n value: \"title\",\n type: \"string\",\n },\n {\n ...defaultFieldValue,\n id: uuid(),\n label: \"Image\",\n value: \"image\",\n type: \"string\",\n },\n ],\n },\n { id: 7, label: \"Last Name\", value: \"last_name\", type: \"string\" },\n { id: 8, label: \"Image\", value: \"image\", type: \"string\" },\n { id: 9, label: \"Address1\", value: \"address1\", type: \"string\" },\n { id: 10, label: \"Address2\", value: \"address2\", type: \"string\" },\n { id: 11, label: \"City\", value: \"city\", type: \"string\" },\n { id: 12, label: \"Country\", value: \"country\", type: \"string\" },\n { id: 13, label: \"Latitude\", value: \"latitude\", type: \"string\" },\n { id: 14, label: \"Longitude\", value: \"longitude\", type: \"string\" },\n { id: 15, label: \"Region\", value: \"region\", type: \"string\" },\n { id: 16, label: \"Zip Code\", value: \"zip\", type: \"string\" },\n { id: 17, label: \"Time Zone\", value: \"timezone\", type: \"string\" },\n { id: 18, label: \"IP Address\", value: \"ip\", type: \"DATE_TIME\" },\n];\n\ntype SampleField = {\n id?: string;\n surveySparrowField: string | null;\n integrationField: string | null;\n isEssentialField: boolean;\n mappedType: MappingType;\n};\n\nexport const sampleFields: SampleField[] = [\n {\n surveySparrowField: null,\n integrationField: null,\n isEssentialField: false,\n mappedType: { id: 1, label: \"Question\", value: \"QUESTION\" },\n },\n {\n id: uuid(),\n surveySparrowField: null,\n integrationField: null,\n isEssentialField: true,\n mappedType: { id: 1, label: \"Question\", value: \"QUESTION\" },\n },\n];\n\nexport const sampleIntegrationFields: IntegrationMappingField[] = [\n { id: 1, label: \"Email\", value: \"email\", type: \"email\" },\n];\n\ntype MappingTabValue = {\n id: number;\n name: string;\n value: string;\n placeholder: string;\n};\n\nexport const mappingTabValues: MappingTabValue[] = [\n { id: 1, name: \"Questions\", value: \"QUESTIONS\", placeholder: \"questions\" },\n { id: 6, name: \"Enriched Columns\", value: \"DERIVED_QUESTIONS\", placeholder: \"derivedQuestions\" },\n { id: 2, name: \"Variable\", value: \"VARIABLE\", placeholder: \"variables\" },\n {\n id: 3,\n name: \"Contact\",\n value: \"CONTACT\",\n placeholder: \"contactProperties\",\n },\n {\n id: 4,\n name: \"Expression\",\n value: \"EXPRESSION\",\n placeholder: \"expressions\",\n },\n { id: 5, name: \"Property\", value: \"PROPERTY\", placeholder: \"property\" },\n \n];\n\ntype MappingPropertyValue = {\n name: string;\n id: string;\n isEnabled: boolean;\n};\n\nexport const mappingPropertyValues: MappingPropertyValue[] = [\n { name: \"Select all Properties\", id: \"ALL\", isEnabled: false },\n { name: \"Started Time\", id: \"STARTED_TIME\", isEnabled: false },\n { name: \"Submitted Time\", id: \"SUBMITTED_TIME\", isEnabled: false },\n { name: \"CompletionStatus\", id: \"COMPLETION_STATUS\", isEnabled: false },\n { name: \"IP Address\", id: \"IP_ADDRESS\", isEnabled: false },\n { name: \"Location\", id: \"LOCATION\", isEnabled: false },\n { name: \"DMS (Lat, Long)\", id: \"DMS\", isEnabled: false },\n { name: \"Channel Type\", id: \"CHANNEL_TYPE\", isEnabled: false },\n { name: \"Channel Name\", id: \"CHANNEL_NAME\", isEnabled: false },\n { name: \"Device ID\", id: \"DEVICE_ID\", isEnabled: false },\n { name: \"Device Name\", id: \"DEVICE_NAME\", isEnabled: false },\n { name: \"Browser\", id: \"BROWSER\", isEnabled: false },\n { name: \"OS\", id: \"OS\", isEnabled: false },\n { name: \"Submission Id\", id: \"SUBMISSION_ID\", isEnabled: false },\n { name: \"Time Zone\", id: \"TIME_ZONE\", isEnabled: false },\n { name: \"Device Type\", id: \"DEVICE_TYPE\", isEnabled: false },\n { name: \"Browser Language\", id: \"BROWSER_LANGUAGE\", isEnabled: false },\n { name: \"Tags\", id: \"TAGS\", isEnabled: false },\n { name: \"Language Name\", id: \"LANGUAGE_NAME\", isEnabled: false },\n];\n\ntype SubMenuOption = {\n id: number;\n label: string;\n subLabel: string;\n value: string;\n};\n\nexport const subMenuOptions: SubMenuOption[] = [\n {\n id: 1,\n label: \"String\",\n subLabel: \"Textual Data. (Eg: Hello World, 1234)\",\n value: \"STRING\",\n },\n {\n id: 2,\n label: \"Number\",\n subLabel: \"Numeric Value. (Eg: 123, -45, 0)\",\n value: \"NUMBER\",\n },\n { id: 3, label: \"Boolean\", subLabel: \"True or False\", value: \"BOOLEAN\" },\n {\n id: 4,\n label: \"Date/Time\",\n subLabel: \"Timestamp or Calendar Information\",\n value: \"DATE_TIME\",\n },\n];\n\ntype OperatorOption = {\n id: number;\n label: string;\n value: string;\n isDateOnly?: boolean;\n type?: string\n};\n\nexport const operatorOptions: OperatorOption[] = [\n { id: 1, label: \"is equals to\", value: \"IS\", type: \"BOOLEAN\" },\n { id: 2, label: \"is not equals to\", value: \"IS_NOT\", type: \"BOOLEAN\" },\n { id: 3, label: \"contains\", value: \"CONTAINS\" },\n { id: 4, label: \"not contains\", value: \"CONTAINS_NOT\" },\n { id: 5, label: \"has no value\", value: \"NO_VALUE\" },\n { id: 6, label: \"before\", value: \"BEFORE\", isDateOnly: true },\n { id: 7, label: \"after\", value: \"AFTER\", isDateOnly: true },\n { id: 8, label: \"on\", value: \"ON\", isDateOnly: true },\n { id: 9, label: \"has any value\", value: \"ANY_VALUE\" },\n];\n\ntype BooleanOption = {\n id: number;\n label: string;\n value: boolean;\n};\n\nexport const booleanOptions: BooleanOption[] = [\n { id: 1, label: \"True\", value: true },\n { id: 2, label: \"False\", value: false },\n];\nexport const integrationsNpsSubmissionProperties = [\n { label: 'Submission Start time', value: 'start_time', type: 'STRING' },\n { label: 'Device type', value: 'device_type', type: 'STRING' },\n { label: 'IP', value: 'ip', type: 'STRING' },\n { label: 'Language', value: 'language', type: 'STRING' },\n { label: 'Survey ID', value: 'survey_id', type: 'STRING' },\n { label: 'Submission state', value: 'state', type: 'STRING' },\n { label: 'Submission ID', value: 'id', type: 'STRING' },\n { label: 'Time taken', value: 'time_taken', type: 'STRING' },\n { label: 'Submitted at', value: 'completed_time', type: 'STRING' },\n { label: 'Location', value: 'location', type: 'STRING' },\n { label: 'OS', value: 'os', type: 'STRING' },\n { label: 'Browser', value: 'browser', type: 'STRING' },\n { label: 'Login Email (Offline)', value: 'loginEmail', type: 'STRING' },\n { label: 'DMS (Offline)', value: 'dms', type: 'STRING' },\n]; \n\nexport const integrationsClassicSubmissionProperties = [\n { label: 'Submitted at', value: 'completed_time', type: 'STRING' },\n { label: 'Device type', value: 'device_type', type: 'STRING' },\n { label: 'Language', value: 'language', type: 'STRING' },\n { label: 'Start time', value: 'start_time', type: 'STRING' },\n { label: 'Survey ID', value: 'survey_id', type: 'STRING' },\n { label: 'Time taken', value: 'time_taken', type: 'STRING' },\n { label: 'Submission state', value: 'state', type: 'STRING' },\n { label: 'Submission ID', value: 'id', type: 'STRING' },\n { label: 'Location', value: 'location', type: 'STRING' },\n { label: 'OS', value: 'os', type: 'STRING' },\n { label: 'Browser', value: 'browser', type: 'STRING' },\n { label: 'IP', value: 'ip', type: 'STRING' },\n { label: 'Channel Type', value: 'channel_type', type: 'STRING' },\n { label: 'Login Email (Offline)', value: 'loginEmail', type: 'STRING' },\n { label: 'DMS (Offline)', value: 'dms', type: 'STRING' },\n];\n\nexport const dynamicDateOptions = [\n {\n label: \"Last 7 days\",\n value: \"last_7_days\",\n },\n {\n label: \"Last 30 days\",\n value: \"last_30_days\",\n },\n {\n label: \"Last 3 months\",\n value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AAM,QAAS,EAAA;AAAA,EACrD,EAAE,KAAO,EAAA,IAAA,EAAM,KAAO,EAAA,IAAA,EAAM,MAAM,QAAS,EAAA;AAAA,EAC3C,EAAE,KAAO,EAAA,cAAA,EAAgB,KAAO,EAAA,cAAA,EAAgB,MAAM,QAAS,EAAA;AAAA,EAC/D,EAAE,KAAO,EAAA,uBAAA,EAAyB,KAAO,EAAA,YAAA,EAAc,MAAM,QAAS,EAAA;AAAA,EACtE,EAAE,KAAO,EAAA,eAAA,EAAiB,KAAO,EAAA,KAAA,EAAO,MAAM,QAAS,EAAA;AACzD,EAAA;AAEO,MAAM,kBAAqB,GAAA;AAAA,EAChC;AAAA,IACE,KAAO,EAAA,aAAA;AAAA,IACP,KAAO,EAAA,aAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,cAAA;AAAA,IACP,KAAO,EAAA,cAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,eAAA;AAAA,IACP,KAAO,EAAA,eAAA;AAAA,GACT;AAAA,EACA;AAAA,IACE,KAAO,EAAA,QAAA;AAAA,IACP,KAAO,EAAA,QAAA;AAAA,GACT;AACF;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-import-configure.js","sources":["../../../../src/contact-import/components/contact-import-configure.tsx"],"sourcesContent":["import {\n Box,\n Button,\n Flex,\n Heading,\n Radio,\n RadioGroup,\n Select,\n} from \"@sparrowengg/twigs-react\";\nimport { ChevronRightIcon } from \"@sparrowengg/twigs-react-icons\";\nimport React, { useState } from \"react\";\nimport ImportSchedules from \"./conact-import-schedule\";\nimport { ContactImportConfigureProps } from \"../types\";\n\nconst ContactImportConfigure = ({\n handleConfigureField,\n listSegmentOptions,\n contactImportField,\n}: ContactImportConfigureProps) => {\n const [currentConfig, setCurrentConfig] = useState(\"LIST\");\n const [currentList, setCurrentList] = useState(\n contactImportField?.configure?.listSegmentValue ?? null\n );\n\n return (\n <Flex justifyContent=\"center\">\n <Box css={{ marginTop: \"$40\", maxWidth: 488, width: \"100%\" }}>\n <Heading size=\"h5\">Import Contacts</Heading>\n <RadioGroup\n defaultValue={currentConfig}\n onChange={(value) => {\n setCurrentConfig(value);\n setCurrentList(null);\n }}\n >\n <Flex\n css={{ marginTop: \"$12\", \"& label\": { color: \"$neutral800\" } }}\n alignItems=\"center\"\n gap=\"$12\"\n >\n <Radio size=\"md\" value=\"LIST\" css={{ cursor: \"pointer\" }}>\n Import from (List/Segment)\n </Radio>\n <Radio size=\"md\" value=\"ALL\" css={{ cursor: \"pointer\" }}>\n Import All Contacts\n </Radio>\n </Flex>\n </RadioGroup>\n {currentConfig === \"LIST\" ? (\n <Select\n css={{ marginTop: \"$12\" }}\n onChange={(value) => setCurrentList(value)}\n size=\"lg\"\n placeholder=\"Choose (List/Segment)\"\n options={listSegmentOptions}\n value={currentList}\n />\n ) : null}\n <Box css={{\n marginBlock: \"$16\"\n }}>\n <ImportSchedules currentList={currentList} setCurrentList={setCurrentList} />\n </Box>\n <Button\n css={{ marginTop: \"$16\" }}\n disabled={!currentList?.value && currentConfig !== \"ALL\"}\n size=\"lg\"\n onClick={() => {\n handleConfigureField({\n type: currentConfig,\n listSegmentValue: currentList,\n });\n }}\n rightIcon={<ChevronRightIcon />}\n >\n Next, Mapping\n </Button>\n </Box>\n </Flex>\n );\n};\n\nexport default ContactImportConfigure;\n"],"names":["useState","Flex","Box","Heading","RadioGroup","Radio","Select","ImportSchedules","Button","ChevronRightIcon"],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"contact-import-configure.js","sources":["../../../../src/contact-import/components/contact-import-configure.tsx"],"sourcesContent":["import {\n Box,\n Button,\n Flex,\n Heading,\n Radio,\n RadioGroup,\n Select,\n} from \"@sparrowengg/twigs-react\";\nimport { ChevronRightIcon } from \"@sparrowengg/twigs-react-icons\";\nimport React, { useState } from \"react\";\nimport ImportSchedules from \"./conact-import-schedule\";\nimport { ContactImportConfigureProps } from \"../types\";\nimport { SelectOption } from \"../../commons/types/enhanced\";\n\nconst ContactImportConfigure = ({\n handleConfigureField,\n listSegmentOptions,\n contactImportField,\n}: ContactImportConfigureProps) => {\n const [currentConfig, setCurrentConfig] = useState(\"LIST\");\n const [currentList, setCurrentList] = useState(\n contactImportField?.configure?.listSegmentValue ?? null\n );\n\n return (\n <Flex justifyContent=\"center\">\n <Box css={{ marginTop: \"$40\", maxWidth: 488, width: \"100%\" }}>\n <Heading size=\"h5\">Import Contacts</Heading>\n <RadioGroup\n defaultValue={currentConfig}\n onChange={(value) => {\n setCurrentConfig(value);\n setCurrentList(null);\n }}\n >\n <Flex\n css={{ marginTop: \"$12\", \"& label\": { color: \"$neutral800\" } }}\n alignItems=\"center\"\n gap=\"$12\"\n >\n <Radio size=\"md\" value=\"LIST\" css={{ cursor: \"pointer\" }}>\n Import from (List/Segment)\n </Radio>\n <Radio size=\"md\" value=\"ALL\" css={{ cursor: \"pointer\" }}>\n Import All Contacts\n </Radio>\n </Flex>\n </RadioGroup>\n {currentConfig === \"LIST\" ? (\n <Select\n css={{ marginTop: \"$12\" }}\n onChange={(value: any) => setCurrentList(value)}\n size=\"lg\"\n placeholder=\"Choose (List/Segment)\"\n options={listSegmentOptions}\n value={currentList}\n />\n ) : null}\n <Box css={{\n marginBlock: \"$16\"\n }}>\n <ImportSchedules currentList={currentList} setCurrentList={setCurrentList} />\n </Box>\n <Button\n css={{ marginTop: \"$16\" }}\n disabled={!currentList?.value && currentConfig !== \"ALL\"}\n size=\"lg\"\n onClick={() => {\n handleConfigureField({\n type: currentConfig,\n listSegmentValue: currentList,\n });\n }}\n rightIcon={<ChevronRightIcon />}\n >\n Next, Mapping\n </Button>\n </Box>\n </Flex>\n );\n};\n\nexport default ContactImportConfigure;\n"],"names":["useState","Flex","Box","Heading","RadioGroup","Radio","Select","ImportSchedules","Button","ChevronRightIcon"],"mappings":";;;;;;;;;;;;;;AAeA,MAAM,yBAAyB,CAAC;AAAA,EAC9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AAkB,EAAA,WAAA;AAAA,SACnB,CAAA,CAAA;AAAA,OACH;AAAA,MACA,SAAA,sCAAYC,6BAAiB,EAAA,IAAA,CAAA;AAAA,KAAA;AAAA,IAC9B,eAAA;AAAA,GAGH,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -37,8 +37,11 @@ var __spreadValues = (a, b) => {
|
|
|
37
37
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
38
38
|
const defaultFieldValue = {
|
|
39
39
|
integrationField: null,
|
|
40
|
-
surveySparrowField:
|
|
41
|
-
|
|
40
|
+
surveySparrowField: null,
|
|
41
|
+
sampleData: [],
|
|
42
|
+
property: "custom",
|
|
43
|
+
mapped: false,
|
|
44
|
+
surveySparrowFieldError: false
|
|
42
45
|
};
|
|
43
46
|
const ContactImportMapping = ({
|
|
44
47
|
contactImportField,
|
|
@@ -78,7 +81,7 @@ const ContactImportMapping = ({
|
|
|
78
81
|
fields: [
|
|
79
82
|
...prev.fields,
|
|
80
83
|
__spreadValues({
|
|
81
|
-
id: prev.fields.length ? prev.fields[prev.fields.length - 1].id + 1 : 1
|
|
84
|
+
id: prev.fields.length ? typeof prev.fields[prev.fields.length - 1].id === "number" ? prev.fields[prev.fields.length - 1].id + 1 : Date.now() : 1
|
|
82
85
|
}, defaultFieldValue)
|
|
83
86
|
]
|
|
84
87
|
}));
|
|
@@ -112,11 +115,11 @@ const ContactImportMapping = ({
|
|
|
112
115
|
},
|
|
113
116
|
/* @__PURE__ */ React.createElement(table.Thead, { css: { zIndex: 5, position: "sticky", top: "-31px" } }, /* @__PURE__ */ React.createElement(table.Th, null, `${integrationName} Profile Fields Data`), /* @__PURE__ */ React.createElement(table.Th, { css: { borderLeft: "$borderWidths$xs solid $neutral100" } }, "SurveySparrow Mapping")),
|
|
114
117
|
/* @__PURE__ */ React.createElement(table.Tbody, null, contactImportField.fields.map((field) => {
|
|
115
|
-
var _a, _b
|
|
118
|
+
var _a, _b;
|
|
116
119
|
const hasSurveyFieldValue = contactProperties.some(
|
|
117
120
|
(contact) => contact.value === field.surveySparrowField
|
|
118
121
|
);
|
|
119
|
-
return /* @__PURE__ */ React.createElement(table.Tr, { key: field.id }, /* @__PURE__ */ React.createElement(table.Td, { css: { width: 560 } }, field.property !== "custom" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "medium" },
|
|
122
|
+
return /* @__PURE__ */ React.createElement(table.Tr, { key: field.id }, /* @__PURE__ */ React.createElement(table.Td, { css: { width: 560 } }, field.property !== "custom" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "medium" }, typeof field.integrationField === "string" ? field.integrationField.replace("_", " ") : field.integrationField), (_a = field.sampleData) == null ? void 0 : _a.map((sample, index) => /* @__PURE__ */ React.createElement(
|
|
120
123
|
text.Text,
|
|
121
124
|
{
|
|
122
125
|
key: index,
|
|
@@ -168,9 +171,9 @@ const ContactImportMapping = ({
|
|
|
168
171
|
size: "lg",
|
|
169
172
|
placeholder: "--Choose Property--",
|
|
170
173
|
value: field.surveySparrowField ? {
|
|
171
|
-
label: (
|
|
174
|
+
label: (_b = contactProperties.find(
|
|
172
175
|
(contact) => contact.value === field.surveySparrowField
|
|
173
|
-
)) == null ? void 0 :
|
|
176
|
+
)) == null ? void 0 : _b.label,
|
|
174
177
|
value: field.surveySparrowField
|
|
175
178
|
} : null,
|
|
176
179
|
options: contactProperties.filter(
|