@sparrowengg/integrations-templates-frontend 1.9.70 → 1.9.72
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/edit-confirmation.js +76 -0
- package/dist/cjs/commons/components/edit-confirmation.js.map +1 -0
- package/dist/cjs/integration-template/components/dashboard.js +1 -1
- package/dist/cjs/integration-template/components/dashboard.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/index.js +344 -141
- package/dist/cjs/single-mapping/index.js.map +1 -1
- package/dist/es/_virtual/index10.js +2 -2
- package/dist/es/_virtual/index9.js +2 -2
- package/dist/es/commons/components/edit-confirmation.js +72 -0
- package/dist/es/commons/components/edit-confirmation.js.map +1 -0
- package/dist/es/integration-template/components/dashboard.js +1 -1
- package/dist/es/integration-template/components/dashboard.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/index.js +344 -141
- package/dist/es/single-mapping/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var alertDialog = require('../../node_modules/@sparrowengg/twigs-react/dist/es/alert-dialog/alert-dialog.js');
|
|
7
|
+
var button = require('../../node_modules/@sparrowengg/twigs-react/dist/es/button/button.js');
|
|
8
|
+
|
|
9
|
+
const EditConfirmation = ({
|
|
10
|
+
name,
|
|
11
|
+
description,
|
|
12
|
+
onConfirm,
|
|
13
|
+
onCancel
|
|
14
|
+
}) => {
|
|
15
|
+
const [isDeleteIconHover, setIsDeleteIconHover] = React.useState(false);
|
|
16
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
17
|
+
return /* @__PURE__ */ React.createElement(alertDialog.AlertDialog, { open: true }, /* @__PURE__ */ React.createElement(
|
|
18
|
+
alertDialog.AlertDialogContent,
|
|
19
|
+
{
|
|
20
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
21
|
+
className: "dm-sans",
|
|
22
|
+
css: {
|
|
23
|
+
button: {
|
|
24
|
+
borderRadius: "8px"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
/* @__PURE__ */ React.createElement(
|
|
29
|
+
alertDialog.AlertDialogTitle,
|
|
30
|
+
{
|
|
31
|
+
css: {
|
|
32
|
+
display: "flex",
|
|
33
|
+
justifyContent: "space-between",
|
|
34
|
+
border: "none !important",
|
|
35
|
+
padding: "24px $12 8px $12 !important"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
name
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ React.createElement(
|
|
41
|
+
alertDialog.AlertDialogDescription,
|
|
42
|
+
{
|
|
43
|
+
css: {
|
|
44
|
+
overflowWrap: "break-word",
|
|
45
|
+
padding: "0px $12 0px $12 !important",
|
|
46
|
+
fontSize: "$sm",
|
|
47
|
+
fontWeight: "400",
|
|
48
|
+
lineHeight: "20px",
|
|
49
|
+
letterSpacing: "0px",
|
|
50
|
+
color: "$neutral800",
|
|
51
|
+
margin: "0 !important"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
description
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ React.createElement(alertDialog.AlertDialogActions, { css: { gap: "$6" } }, /* @__PURE__ */ React.createElement(alertDialog.AlertDialogCancel, { asChild: true, onClick: onCancel }, /* @__PURE__ */ React.createElement(button.Button, { color: "default", variant: "solid", size: "lg" }, "Cancel")), /* @__PURE__ */ React.createElement(alertDialog.AlertDialogAction, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
57
|
+
button.Button,
|
|
58
|
+
{
|
|
59
|
+
loading: isLoading,
|
|
60
|
+
onMouseEnter: () => setIsDeleteIconHover(true),
|
|
61
|
+
onMouseLeave: () => setIsDeleteIconHover(false),
|
|
62
|
+
color: isDeleteIconHover ? "secondary" : "default",
|
|
63
|
+
size: "lg",
|
|
64
|
+
onClick: async () => {
|
|
65
|
+
setIsLoading(true);
|
|
66
|
+
await onConfirm();
|
|
67
|
+
setIsLoading(false);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"Confirm"
|
|
71
|
+
)))
|
|
72
|
+
));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
exports.default = EditConfirmation;
|
|
76
|
+
//# sourceMappingURL=edit-confirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit-confirmation.js","sources":["../../../../src/commons/components/edit-confirmation.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport {\n AlertDialog,\n AlertDialogContent,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogActions,\n AlertDialogCancel,\n AlertDialogAction,\n Button,\n} from \"@sparrowengg/twigs-react\";\ntype ConfirmationModalProps = {\n name: string;\n description: string;\n onConfirm: () => void | Promise<void>;\n onCancel: () => void;\n};\nconst EditConfirmation: React.FC<ConfirmationModalProps> = ({\n name,\n description,\n onConfirm,\n onCancel,\n}) => {\n const [isDeleteIconHover, setIsDeleteIconHover] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n return (\n <AlertDialog open={true}>\n <AlertDialogContent\n onOpenAutoFocus={(e) => e.preventDefault()}\n className=\"dm-sans\"\n css={{\n button: {\n borderRadius: \"8px\",\n },\n }}\n >\n <AlertDialogTitle\n css={{\n display: \"flex\",\n justifyContent: \"space-between\",\n border: \"none !important\",\n padding: \"24px $12 8px $12 !important\",\n }}\n >\n {name}\n </AlertDialogTitle>\n\n <AlertDialogDescription\n css={{\n overflowWrap: \"break-word\",\n padding: \"0px $12 0px $12 !important\",\n fontSize: \"$sm\",\n fontWeight: \"400\",\n lineHeight: \"20px\",\n letterSpacing: \"0px\",\n color: \"$neutral800\",\n margin: \"0 !important\",\n }}\n >\n {description}\n </AlertDialogDescription>\n\n <AlertDialogActions css={{ gap: \"$6\" }}>\n <AlertDialogCancel asChild onClick={onCancel}>\n <Button color=\"default\" variant=\"solid\" size=\"lg\">\n Cancel\n </Button>\n </AlertDialogCancel>\n\n <AlertDialogAction asChild>\n <Button\n loading={isLoading}\n onMouseEnter={() => setIsDeleteIconHover(true)}\n onMouseLeave={() => setIsDeleteIconHover(false)}\n color={isDeleteIconHover ? \"secondary\" : \"default\"}\n size=\"lg\"\n onClick={async () => {\n setIsLoading(true)\n await onConfirm()\n setIsLoading(false)\n }}\n >\n Confirm\n </Button>\n </AlertDialogAction>\n </AlertDialogActions>\n </AlertDialogContent>\n </AlertDialog>\n );\n};\nexport default EditConfirmation;\n"],"names":["useState","AlertDialog","AlertDialogContent","AlertDialogTitle","AlertDialogDescription","AlertDialogActions","AlertDialogCancel","Button","AlertDialogAction"],"mappings":";;;;;;;;AAiBA,MAAM,mBAAqD,CAAC;AAAA,EAC1D,IAAA;AAAA,EACA,WAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AACF,CAAM,KAAA;AACJ,EAAA,MAAM,CAAC,iBAAA,EAAmB,oBAAoB,CAAA,GAAIA,eAAS,KAAK,CAAA,CAAA;AAChE,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAIA,eAAS,KAAK,CAAA,CAAA;AAChD,EACE,uBAAA,KAAA,CAAA,aAAA,CAACC,uBAAY,EAAA,EAAA,IAAA,EAAM,IACjB,EAAA,kBAAA,KAAA,CAAA,aAAA;AA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AA,CAAA,aAAA,CAACC,6BAAkB,EAAA,EAAA,OAAA,EAAO,IACxB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,MAACD,aAAA;AAAA,MAAA;AAAA,QACC,OAAS,EAAA,SAAA;AAAA,QACT,YAAA,EAAc,MAAM,oBAAA,CAAqB,IAAI,CAAA;AAAA,QAC7C,YAAA,EAAc,MAAM,oBAAA,CAAqB,KAAK,CAAA;AAAA,QAC9C,KAAA,EAAO,oBAAoB,WAAc,GAAA,SAAA;AAAA,QACzC,IAAK,EAAA,IAAA;AAAA,QACL,SAAS,YAAY;AACnB,UAAA,YAAA,CAAa,IAAI,CAAA,CAAA;AACjB,UAAA,MAAM,SAAU,EAAA,CAAA;AAChB,UAAA,YAAA,CAAa,KAAK,CAAA,CAAA;AAAA,SACpB;AAAA,OAAA;AAAA,MACD,SAAA;AAAA,KAGH,CACF,CAAA;AAAA,GAEJ,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -63,7 +63,7 @@ const Dashboard = ({
|
|
|
63
63
|
alignItems: "center"
|
|
64
64
|
},
|
|
65
65
|
/* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$2" }, /* @__PURE__ */ React.createElement(heading.Heading, { size: "h5" }, integrationName), /* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral700" } }, dashboardDescription)),
|
|
66
|
-
/* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$4" }, hasMultiAccounts && /* @__PURE__ */ React.createElement(button.Button, { size: "lg", color: "default", leftIcon: /* @__PURE__ */ React.createElement(plus.PlusIcon, null) }, "Add Account"), hasDropdownComponents.mapping && !hasDropdownComponents.trigger ? /* @__PURE__ */ React.createElement(button.Button, { size: "lg", color: "primary", leftIcon: /* @__PURE__ */ React.createElement(plus.PlusIcon, null), onClick: () => handleConfigurationType("MAPPING") }, "New Mapping") : null, hasDropdownComponents.trigger && hasDropdownComponents.mapping ? /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(
|
|
66
|
+
/* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$4" }, hasMultiAccounts && /* @__PURE__ */ React.createElement(button.Button, { size: "lg", color: "default", leftIcon: /* @__PURE__ */ React.createElement(plus.PlusIcon, null) }, "Add Account"), hasDropdownComponents.mapping && !hasDropdownComponents.trigger ? /* @__PURE__ */ React.createElement(button.Button, { size: "lg", color: "primary", disabled: !mappingEnabled, leftIcon: /* @__PURE__ */ React.createElement(plus.PlusIcon, null), onClick: () => handleConfigurationType("MAPPING") }, "New Mapping") : null, hasDropdownComponents.trigger && hasDropdownComponents.mapping ? /* @__PURE__ */ React.createElement(dropdown.DropdownMenu, null, /* @__PURE__ */ React.createElement(
|
|
67
67
|
tooltip.Tooltip,
|
|
68
68
|
{
|
|
69
69
|
content: !triggerEnabled && !mappingEnabled ? "You have reached the maximum limit for creating triggers/mappings" : ""
|