@sparrowengg/integrations-templates-frontend 1.9.84-beta.7 → 1.9.84-beta.9
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/commons/components/NamingModal.js +79 -0
- package/dist/cjs/commons/components/NamingModal.js.map +1 -0
- package/dist/cjs/integration-template/components/dashboard.js +5 -5
- package/dist/cjs/integration-template/components/dashboard.js.map +1 -1
- package/dist/cjs/mapping/components/mapping.js +0 -1
- package/dist/cjs/mapping/components/mapping.js.map +1 -1
- package/dist/cjs/mapping/index.js +33 -5
- package/dist/cjs/mapping/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/es/_virtual/index10.js +2 -2
- package/dist/es/_virtual/index9.js +2 -2
- package/dist/es/commons/components/NamingModal.js +75 -0
- package/dist/es/commons/components/NamingModal.js.map +1 -0
- package/dist/es/integration-template/components/dashboard.js +5 -5
- package/dist/es/integration-template/components/dashboard.js.map +1 -1
- package/dist/es/mapping/components/mapping.js +0 -1
- package/dist/es/mapping/components/mapping.js.map +1 -1
- package/dist/es/mapping/index.js +33 -5
- package/dist/es/mapping/index.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/index.d.ts +9 -4
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var dialog = require('../../node_modules/@sparrowengg/twigs-react/dist/es/dialog/dialog.js');
|
|
7
|
+
var flex = require('../../node_modules/@sparrowengg/twigs-react/dist/es/flex/flex.js');
|
|
8
|
+
var formInput = require('../../node_modules/@sparrowengg/twigs-react/dist/es/input/form-input.js');
|
|
9
|
+
var button = require('../../node_modules/@sparrowengg/twigs-react/dist/es/button/button.js');
|
|
10
|
+
var box = require('../../node_modules/@sparrowengg/twigs-react/dist/es/box/box.js');
|
|
11
|
+
var iconButton = require('../../node_modules/@sparrowengg/twigs-react/dist/es/button/icon-button.js');
|
|
12
|
+
var close = require('../../node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/close.js');
|
|
13
|
+
|
|
14
|
+
function NamingModal({
|
|
15
|
+
editFieldId,
|
|
16
|
+
mappingLoader,
|
|
17
|
+
saveHandler,
|
|
18
|
+
closeHandler,
|
|
19
|
+
value,
|
|
20
|
+
setValue,
|
|
21
|
+
isOpen
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ React.createElement(dialog.Dialog, { open: isOpen, size: "sm" }, /* @__PURE__ */ React.createElement(dialog.DialogContent, null, /* @__PURE__ */ React.createElement(
|
|
24
|
+
dialog.DialogHeader,
|
|
25
|
+
{
|
|
26
|
+
css: {
|
|
27
|
+
display: "flex",
|
|
28
|
+
flexDirection: "column",
|
|
29
|
+
alignItems: "flex-start",
|
|
30
|
+
justifyContent: "center"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
/* @__PURE__ */ React.createElement(dialog.DialogTitle, { size: "lg" }, "Mapping Name")
|
|
34
|
+
), /* @__PURE__ */ React.createElement(dialog.DialogBody, null, /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$2", css: { marginBottom: "$2" } }, /* @__PURE__ */ React.createElement(
|
|
35
|
+
formInput.FormInput,
|
|
36
|
+
{
|
|
37
|
+
size: "lg",
|
|
38
|
+
id: "name",
|
|
39
|
+
label: "Name",
|
|
40
|
+
showCount: true,
|
|
41
|
+
value,
|
|
42
|
+
onChange: (e) => setValue(e.target.value),
|
|
43
|
+
maxLength: 50,
|
|
44
|
+
placeholder: "Sync to "
|
|
45
|
+
}
|
|
46
|
+
))), /* @__PURE__ */ React.createElement(dialog.DialogFooter, null, /* @__PURE__ */ React.createElement(
|
|
47
|
+
flex.Flex,
|
|
48
|
+
{
|
|
49
|
+
css: {
|
|
50
|
+
width: "100%"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
/* @__PURE__ */ React.createElement(
|
|
54
|
+
button.Button,
|
|
55
|
+
{
|
|
56
|
+
loading: mappingLoader,
|
|
57
|
+
size: "lg",
|
|
58
|
+
color: "primary",
|
|
59
|
+
css: {
|
|
60
|
+
width: "100%"
|
|
61
|
+
},
|
|
62
|
+
onClick: saveHandler
|
|
63
|
+
},
|
|
64
|
+
editFieldId ? "Update Mapping" : "Save Mapping"
|
|
65
|
+
)
|
|
66
|
+
)), /* @__PURE__ */ React.createElement(box.Box, { css: { position: "absolute", top: "$8", right: "$8" } }, /* @__PURE__ */ React.createElement(dialog.DialogClose, { asChild: true, onClick: closeHandler }, /* @__PURE__ */ React.createElement(
|
|
67
|
+
iconButton.IconButton,
|
|
68
|
+
{
|
|
69
|
+
size: "lg",
|
|
70
|
+
icon: /* @__PURE__ */ React.createElement(close.CloseIcon, null),
|
|
71
|
+
variant: "ghost",
|
|
72
|
+
"aria-label": "Close",
|
|
73
|
+
color: "default"
|
|
74
|
+
}
|
|
75
|
+
)))));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
exports.default = NamingModal;
|
|
79
|
+
//# sourceMappingURL=NamingModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamingModal.js","sources":["../../../../src/commons/components/NamingModal.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Dialog,\n DialogHeader,\n DialogTitle,\n DialogBody,\n DialogFooter,\n DialogClose,\n DialogTrigger,\n DialogContent,\n IconButton,\n Box,\n Button,\n Flex,\n FormInput,\n} from \"@sparrowengg/twigs-react\";\nimport { CloseIcon } from \"@sparrowengg/twigs-react-icons\";\n\nexport default function NamingModal({\n editFieldId,\n mappingLoader,\n saveHandler,\n closeHandler,\n value,\n setValue,\n isOpen,\n}: {\n editFieldId: string | number | undefined;\n mappingLoader: boolean;\n saveHandler: () => void;\n closeHandler: () => void;\n value: string;\n setValue: (value: string) => void;\n isOpen: boolean;\n}) {\n return (\n <Dialog open={isOpen} size=\"sm\">\n <DialogContent>\n <DialogHeader\n css={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n justifyContent: \"center\",\n }}\n >\n <DialogTitle size=\"lg\">Mapping Name</DialogTitle>\n </DialogHeader>\n <DialogBody>\n <Flex flexDirection=\"column\" gap=\"$2\" css={{ marginBottom: \"$2\" }}>\n <FormInput\n size=\"lg\"\n id=\"name\"\n label=\"Name\"\n showCount\n value={value}\n onChange={(e) => setValue(e.target.value)}\n maxLength={50}\n placeholder=\"Sync to \"\n />\n </Flex>\n </DialogBody>\n <DialogFooter>\n <Flex\n css={{\n width: \"100%\",\n }}\n >\n <Button\n loading={mappingLoader}\n size=\"lg\"\n color=\"primary\"\n css={{\n width: \"100%\",\n }}\n onClick={saveHandler}\n >\n {editFieldId ? \"Update Mapping\" : \"Save Mapping\"}\n </Button>\n </Flex>\n </DialogFooter>\n <Box css={{ position: \"absolute\", top: \"$8\", right: \"$8\" }}>\n <DialogClose asChild onClick={closeHandler}>\n <IconButton\n size=\"lg\"\n icon={<CloseIcon />}\n variant=\"ghost\"\n aria-label=\"Close\"\n color=\"default\"\n />\n </DialogClose>\n </Box>\n </DialogContent>\n </Dialog>\n );\n}\n"],"names":["Dialog","DialogContent","DialogHeader","DialogTitle","DialogBody","Flex","FormInput","DialogFooter","Button","Box","DialogClose","IconButton","CloseIcon"],"mappings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AA,aAAA;AAAA,IAACF,SAAA;AAAA,IAAA;AAAA,MACC,GAAK,EAAA;AAAA,QACH,KAAO,EAAA,MAAA;AAAA,OACT;AAAA,KAAA;AAAA,oBAEA,KAAA,CAAA,aAAA;AAAA,MAACG,aAAA;AAAA,MAAA;AAAA,QACC,OAAS,EAAA,aAAA;AAAA,QACT,IAAK,EAAA,IAAA;AAAA,QACL,KAAM,EAAA,SAAA;AAAA,QACN,GAAK,EAAA;AAAA,UACH,KAAO,EAAA,MAAA;AAAA,SACT;AAAA,QACA,OAAS,EAAA,WAAA;AAAA,OAAA;AAAA,MAER,cAAc,gBAAmB,GAAA,cAAA;AAAA,KACpC;AAAA,GAEJ,CACA,kBAAA,KAAA,CAAA,aAAA,CAACC,WAAI,GAAK,EAAA,EAAE,UAAU,UAAY,EAAA,GAAA,EAAK,IAAM,EAAA,KAAA,EAAO,MAClD,EAAA,kBAAA,KAAA,CAAA,aAAA,CAACC,sBAAY,OAAO,EAAA,IAAA,EAAC,SAAS,YAC5B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAACC,qBAAA;AAAA,IAAA;AAAA,MACC,IAAK,EAAA,IAAA;AAAA,MACL,IAAA,sCAAOC,eAAU,EAAA,IAAA,CAAA;AAAA,MACjB,OAAQ,EAAA,OAAA;AAAA,MACR,YAAW,EAAA,OAAA;AAAA,MACX,KAAM,EAAA,SAAA;AAAA,KAAA;AAAA,GAEV,CACF,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -222,7 +222,7 @@ const MultiAccountDashboard = ({
|
|
|
222
222
|
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
223
223
|
heading: (_c2 = (_b2 = field.domain) != null ? _b2 : field.email) != null ? _c2 : "Field",
|
|
224
224
|
id: field.id,
|
|
225
|
-
description: `Sync survey responses to ${integrationName} when ${(_f = (_e = (_d2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _d2.events) == null ? void 0 : _e.label) == null ? void 0 : _f.toLowerCase()} is ${trasformToPastTense(`${(_i = (_h = (_g = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _g.action) == null ? void 0 : _h.label) == null ? void 0 : _i.toLowerCase()}`)}`,
|
|
225
|
+
description: (field == null ? void 0 : field.mappingDescription) || `Sync survey responses to ${integrationName} when ${(_f = (_e = (_d2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _d2.events) == null ? void 0 : _e.label) == null ? void 0 : _f.toLowerCase()} is ${trasformToPastTense(`${(_i = (_h = (_g = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _g.action) == null ? void 0 : _h.label) == null ? void 0 : _i.toLowerCase()}`)}`,
|
|
226
226
|
fields: field.fields,
|
|
227
227
|
isEnabled: field.isEnabled,
|
|
228
228
|
integrationName,
|
|
@@ -298,9 +298,9 @@ const MultiAccountDashboard = ({
|
|
|
298
298
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
299
299
|
onMappingEditHandler,
|
|
300
300
|
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
301
|
-
heading: "Mapping",
|
|
301
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
302
302
|
id: field.id,
|
|
303
|
-
description: `Sync survey responses to ${integrationName} when ${(_d2 = (_c2 = (_b2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _b2.events) == null ? void 0 : _c2.label) == null ? void 0 : _d2.toLowerCase()} is ${trasformToPastTense(`${(_g = (_f = (_e = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _e.action) == null ? void 0 : _f.label) == null ? void 0 : _g.toLowerCase()}`)}`,
|
|
303
|
+
description: (field == null ? void 0 : field.mappingDescription) || `Sync survey responses to ${integrationName} when ${(_d2 = (_c2 = (_b2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _b2.events) == null ? void 0 : _c2.label) == null ? void 0 : _d2.toLowerCase()} is ${trasformToPastTense(`${(_g = (_f = (_e = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _e.action) == null ? void 0 : _f.label) == null ? void 0 : _g.toLowerCase()}`)}`,
|
|
304
304
|
fields: field.fields,
|
|
305
305
|
isEnabled: field.isEnabled,
|
|
306
306
|
integrationName,
|
|
@@ -413,9 +413,9 @@ const SingleAccountDashboard = ({
|
|
|
413
413
|
isDraft: (_a2 = field == null ? void 0 : field.isDraft) != null ? _a2 : false,
|
|
414
414
|
onMappingEditHandler,
|
|
415
415
|
icon: /* @__PURE__ */ React.createElement(mapping.default, { size: 32, color: "#56B0BB" }),
|
|
416
|
-
heading: "Mapping",
|
|
416
|
+
heading: (field == null ? void 0 : field.mappingName) || "Mapping",
|
|
417
417
|
id: field.id,
|
|
418
|
-
description: `Sync survey responses to ${integrationName} when ${(_d2 = (_c2 = (_b2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _b2.events) == null ? void 0 : _c2.label) == null ? void 0 : _d2.toLowerCase()} is ${trasformToPastTense(`${(_g2 = (_f2 = (_e2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _e2.action) == null ? void 0 : _f2.label) == null ? void 0 : _g2.toLowerCase()}`)}`,
|
|
418
|
+
description: (field == null ? void 0 : field.mappingDescription) || `Sync survey responses to ${integrationName} when ${(_d2 = (_c2 = (_b2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _b2.events) == null ? void 0 : _c2.label) == null ? void 0 : _d2.toLowerCase()} is ${trasformToPastTense(`${(_g2 = (_f2 = (_e2 = field == null ? void 0 : field.mappingConfiguration) == null ? void 0 : _e2.action) == null ? void 0 : _f2.label) == null ? void 0 : _g2.toLowerCase()}`)}`,
|
|
419
419
|
fields: field.fields,
|
|
420
420
|
isEnabled: field.isEnabled,
|
|
421
421
|
integrationName,
|