@sparrowengg/integrations-templates-frontend 1.9.70 → 1.9.71

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var reactIs = {exports: {}};
3
+ var lib = {};
4
4
 
5
- exports.__module = reactIs;
5
+ exports.__exports = lib;
6
6
  //# sourceMappingURL=index10.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var lib = {};
3
+ var reactIs = {exports: {}};
4
4
 
5
- exports.__exports = lib;
5
+ exports.__module = reactIs;
6
6
  //# sourceMappingURL=index9.js.map
@@ -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,E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AAM,EAAA,SAAA,EAAU,OAAQ,EAAA,OAAA,EAAQ,IAAK,EAAA,IAAA,EAAA,EAAK,QAElD,CACF,CAEA,kBAAA,KAAA,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;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('../../../../_virtual/index10.js');
3
+ var index = require('../../../../_virtual/index9.js');
4
4
  var reactIs_production_min = require('./cjs/react-is.production.min.js');
5
5
  var reactIs_development = require('./cjs/react-is.development.js');
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _commonjsHelpers = require('../../../../../_virtual/_commonjsHelpers.js');
4
- var index = require('../../../../../_virtual/index9.js');
4
+ var index = require('../../../../../_virtual/index10.js');
5
5
  require('./stringify.js');
6
6
  require('./traversal.js');
7
7
  require('./manipulation.js');
@@ -8,7 +8,7 @@ require('./Tokenizer.js');
8
8
  require('../../../../domelementtype/lib/index.js');
9
9
  require('../../domutils/lib/index.js');
10
10
  var index = require('../../../../../_virtual/index5.js');
11
- var index$1 = require('../../../../../_virtual/index9.js');
11
+ var index$1 = require('../../../../../_virtual/index10.js');
12
12
  var Parser = require('../../../../../_virtual/Parser.js');
13
13
  var index$3 = require('../../../../../_virtual/index7.js');
14
14
  var Tokenizer = require('../../../../../_virtual/Tokenizer.js');