@bigbinary/neeto-molecules 0.0.1

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.
Files changed (183) hide show
  1. package/README.md +60 -0
  2. package/dist/BrowserSupport.cjs.js +1727 -0
  3. package/dist/BrowserSupport.cjs.js.map +1 -0
  4. package/dist/BrowserSupport.js +1721 -0
  5. package/dist/BrowserSupport.js.map +1 -0
  6. package/dist/Columns.cjs.js +191 -0
  7. package/dist/Columns.cjs.js.map +1 -0
  8. package/dist/Columns.js +184 -0
  9. package/dist/Columns.js.map +1 -0
  10. package/dist/Container.cjs.js +1277 -0
  11. package/dist/Container.cjs.js.map +1 -0
  12. package/dist/Container.js +1271 -0
  13. package/dist/Container.js.map +1 -0
  14. package/dist/CopyToClipboardButton.cjs.js +78 -0
  15. package/dist/CopyToClipboardButton.cjs.js.map +1 -0
  16. package/dist/CopyToClipboardButton.js +72 -0
  17. package/dist/CopyToClipboardButton.js.map +1 -0
  18. package/dist/CustomDomain.cjs.js +680 -0
  19. package/dist/CustomDomain.cjs.js.map +1 -0
  20. package/dist/CustomDomain.js +654 -0
  21. package/dist/CustomDomain.js.map +1 -0
  22. package/dist/CustomDomainDashboard.cjs.js +2306 -0
  23. package/dist/CustomDomainDashboard.cjs.js.map +1 -0
  24. package/dist/CustomDomainDashboard.js +2279 -0
  25. package/dist/CustomDomainDashboard.js.map +1 -0
  26. package/dist/DateFormat.cjs.js +51 -0
  27. package/dist/DateFormat.cjs.js.map +1 -0
  28. package/dist/DateFormat.js +45 -0
  29. package/dist/DateFormat.js.map +1 -0
  30. package/dist/DateRangeFilter.cjs.js +236 -0
  31. package/dist/DateRangeFilter.cjs.js.map +1 -0
  32. package/dist/DateRangeFilter.js +229 -0
  33. package/dist/DateRangeFilter.js.map +1 -0
  34. package/dist/DynamicVariables.cjs.js +112 -0
  35. package/dist/DynamicVariables.cjs.js.map +1 -0
  36. package/dist/DynamicVariables.js +106 -0
  37. package/dist/DynamicVariables.js.map +1 -0
  38. package/dist/EmailPreview.cjs.js +102 -0
  39. package/dist/EmailPreview.cjs.js.map +1 -0
  40. package/dist/EmailPreview.js +96 -0
  41. package/dist/EmailPreview.js.map +1 -0
  42. package/dist/ErrorPage.cjs.js +208 -0
  43. package/dist/ErrorPage.cjs.js.map +1 -0
  44. package/dist/ErrorPage.js +184 -0
  45. package/dist/ErrorPage.js.map +1 -0
  46. package/dist/Header.cjs.js +219 -0
  47. package/dist/Header.cjs.js.map +1 -0
  48. package/dist/Header.js +213 -0
  49. package/dist/Header.js.map +1 -0
  50. package/dist/IconPicker.cjs.js +1307 -0
  51. package/dist/IconPicker.cjs.js.map +1 -0
  52. package/dist/IconPicker.js +1301 -0
  53. package/dist/IconPicker.js.map +1 -0
  54. package/dist/IntegrationCard.cjs.js +75 -0
  55. package/dist/IntegrationCard.cjs.js.map +1 -0
  56. package/dist/IntegrationCard.js +69 -0
  57. package/dist/IntegrationCard.js.map +1 -0
  58. package/dist/IntegrationDisconnectAlert.cjs.js +81 -0
  59. package/dist/IntegrationDisconnectAlert.cjs.js.map +1 -0
  60. package/dist/IntegrationDisconnectAlert.js +75 -0
  61. package/dist/IntegrationDisconnectAlert.js.map +1 -0
  62. package/dist/IntegrationWalkthroughModal.cjs.js +42 -0
  63. package/dist/IntegrationWalkthroughModal.cjs.js.map +1 -0
  64. package/dist/IntegrationWalkthroughModal.js +36 -0
  65. package/dist/IntegrationWalkthroughModal.js.map +1 -0
  66. package/dist/IpRestriction.cjs.js +3764 -0
  67. package/dist/IpRestriction.cjs.js.map +1 -0
  68. package/dist/IpRestriction.js +3738 -0
  69. package/dist/IpRestriction.js.map +1 -0
  70. package/dist/KeyboardShortcuts.cjs.js +2242 -0
  71. package/dist/KeyboardShortcuts.cjs.js.map +1 -0
  72. package/dist/KeyboardShortcuts.js +2235 -0
  73. package/dist/KeyboardShortcuts.js.map +1 -0
  74. package/dist/LoginPage.cjs.js +618 -0
  75. package/dist/LoginPage.cjs.js.map +1 -0
  76. package/dist/LoginPage.js +593 -0
  77. package/dist/LoginPage.js.map +1 -0
  78. package/dist/MenuBar.cjs.js +31044 -0
  79. package/dist/MenuBar.cjs.js.map +1 -0
  80. package/dist/MenuBar.js +31038 -0
  81. package/dist/MenuBar.js.map +1 -0
  82. package/dist/NeetoWidget.cjs.js +3369 -0
  83. package/dist/NeetoWidget.cjs.js.map +1 -0
  84. package/dist/NeetoWidget.js +3343 -0
  85. package/dist/NeetoWidget.js.map +1 -0
  86. package/dist/PageLoader.cjs.js +158 -0
  87. package/dist/PageLoader.cjs.js.map +1 -0
  88. package/dist/PageLoader.js +134 -0
  89. package/dist/PageLoader.js.map +1 -0
  90. package/dist/PhoneNumber.cjs.js +7021 -0
  91. package/dist/PhoneNumber.cjs.js.map +1 -0
  92. package/dist/PhoneNumber.js +6989 -0
  93. package/dist/PhoneNumber.js.map +1 -0
  94. package/dist/PublishBlock.cjs.js +189 -0
  95. package/dist/PublishBlock.cjs.js.map +1 -0
  96. package/dist/PublishBlock.js +183 -0
  97. package/dist/PublishBlock.js.map +1 -0
  98. package/dist/Rename.cjs.js +306 -0
  99. package/dist/Rename.cjs.js.map +1 -0
  100. package/dist/Rename.js +300 -0
  101. package/dist/Rename.js.map +1 -0
  102. package/dist/ResponsiveDevicePicker.cjs.js +260 -0
  103. package/dist/ResponsiveDevicePicker.cjs.js.map +1 -0
  104. package/dist/ResponsiveDevicePicker.js +254 -0
  105. package/dist/ResponsiveDevicePicker.js.map +1 -0
  106. package/dist/Schedule.cjs.js +952 -0
  107. package/dist/Schedule.cjs.js.map +1 -0
  108. package/dist/Schedule.js +921 -0
  109. package/dist/Schedule.js.map +1 -0
  110. package/dist/Scrollable.cjs.js +184 -0
  111. package/dist/Scrollable.cjs.js.map +1 -0
  112. package/dist/Scrollable.js +178 -0
  113. package/dist/Scrollable.js.map +1 -0
  114. package/dist/ShareViaEmail.cjs.js +2992 -0
  115. package/dist/ShareViaEmail.cjs.js.map +1 -0
  116. package/dist/ShareViaEmail.js +2966 -0
  117. package/dist/ShareViaEmail.js.map +1 -0
  118. package/dist/ShareViaLink.cjs.js +1385 -0
  119. package/dist/ShareViaLink.cjs.js.map +1 -0
  120. package/dist/ShareViaLink.js +1360 -0
  121. package/dist/ShareViaLink.js.map +1 -0
  122. package/dist/Sidebar.cjs.js +32222 -0
  123. package/dist/Sidebar.cjs.js.map +1 -0
  124. package/dist/Sidebar.js +32196 -0
  125. package/dist/Sidebar.js.map +1 -0
  126. package/dist/SubHeader.cjs.js +272 -0
  127. package/dist/SubHeader.cjs.js.map +1 -0
  128. package/dist/SubHeader.js +265 -0
  129. package/dist/SubHeader.js.map +1 -0
  130. package/dist/TableWrapper.cjs.js +87 -0
  131. package/dist/TableWrapper.cjs.js.map +1 -0
  132. package/dist/TableWrapper.js +81 -0
  133. package/dist/TableWrapper.js.map +1 -0
  134. package/dist/ThemeSidebar.cjs.js +13618 -0
  135. package/dist/ThemeSidebar.cjs.js.map +1 -0
  136. package/dist/ThemeSidebar.js +13593 -0
  137. package/dist/ThemeSidebar.js.map +1 -0
  138. package/dist/TimeFormat.cjs.js +53 -0
  139. package/dist/TimeFormat.cjs.js.map +1 -0
  140. package/dist/TimeFormat.js +47 -0
  141. package/dist/TimeFormat.js.map +1 -0
  142. package/dist/TimezoneMismatchModal.cjs.js +176 -0
  143. package/dist/TimezoneMismatchModal.cjs.js.map +1 -0
  144. package/dist/TimezoneMismatchModal.js +168 -0
  145. package/dist/TimezoneMismatchModal.js.map +1 -0
  146. package/package.json +185 -0
  147. package/src/translations/en.json +449 -0
  148. package/types/BrowserSupport.d.ts +86 -0
  149. package/types/Columns.d.ts +53 -0
  150. package/types/Container.d.ts +35 -0
  151. package/types/CopyToClipboardButton.d.ts +21 -0
  152. package/types/CustomDomain.d.ts +19 -0
  153. package/types/CustomDomainDashboard.d.ts +33 -0
  154. package/types/DateFormat.d.ts +18 -0
  155. package/types/DateRangeFilter.d.ts +52 -0
  156. package/types/DynamicVariables.d.ts +45 -0
  157. package/types/EmailPreview.d.ts +41 -0
  158. package/types/ErrorPage.d.ts +15 -0
  159. package/types/Header.d.ts +30 -0
  160. package/types/IconPicker.d.ts +43 -0
  161. package/types/IntegrationCard.d.ts +45 -0
  162. package/types/IntegrationDisconnectAlert.d.ts +37 -0
  163. package/types/IntegrationWalkthroughModal.d.ts +31 -0
  164. package/types/IpRestriction.d.ts +23 -0
  165. package/types/KeyboardShortcuts.d.ts +147 -0
  166. package/types/LoginPage.d.ts +43 -0
  167. package/types/MenuBar.d.ts +125 -0
  168. package/types/NeetoWidget.d.ts +41 -0
  169. package/types/PageLoader.d.ts +38 -0
  170. package/types/PhoneNumber.d.ts +106 -0
  171. package/types/PublishBlock.d.ts +84 -0
  172. package/types/Rename.d.ts +60 -0
  173. package/types/ResponsiveDevicePicker.d.ts +30 -0
  174. package/types/Schedule.d.ts +132 -0
  175. package/types/Scrollable.d.ts +28 -0
  176. package/types/ShareViaEmail.d.ts +99 -0
  177. package/types/ShareViaLink.d.ts +117 -0
  178. package/types/Sidebar.d.ts +63 -0
  179. package/types/SubHeader.d.ts +97 -0
  180. package/types/TableWrapper.d.ts +38 -0
  181. package/types/TimeFormat.d.ts +17 -0
  182. package/types/TimezoneMismatchModal.d.ts +39 -0
  183. package/types/themeSidebar.d.ts +80 -0
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var pure = require('@bigbinary/neeto-commons-frontend/pure');
5
+ var neetoIcons = require('@bigbinary/neeto-icons');
6
+ var neetoui = require('@bigbinary/neetoui');
7
+ var reactI18next = require('react-i18next');
8
+
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
12
+
13
+ var Menu = neetoui.Dropdown.Menu,
14
+ MenuItem = neetoui.Dropdown.MenuItem;
15
+ var IntegrationCard = function IntegrationCard(_ref) {
16
+ var label = _ref.label,
17
+ description = _ref.description,
18
+ Icon = _ref.Icon,
19
+ _ref$className = _ref.className,
20
+ className = _ref$className === void 0 ? "" : _ref$className,
21
+ isConnected = _ref.isConnected,
22
+ _ref$isStatusLoading = _ref.isStatusLoading,
23
+ isStatusLoading = _ref$isStatusLoading === void 0 ? false : _ref$isStatusLoading,
24
+ _ref$customDropdown = _ref.customDropdown,
25
+ customDropdown = _ref$customDropdown === void 0 ? null : _ref$customDropdown,
26
+ _ref$onDisconnect = _ref.onDisconnect,
27
+ onDisconnect = _ref$onDisconnect === void 0 ? pure.noop : _ref$onDisconnect,
28
+ onConnect = _ref.onConnect,
29
+ _ref$onManage = _ref.onManage,
30
+ onManage = _ref$onManage === void 0 ? pure.noop : _ref$onManage;
31
+ var _useTranslation = reactI18next.useTranslation(),
32
+ t = _useTranslation.t;
33
+ return /*#__PURE__*/React__default["default"].createElement("div", {
34
+ className: "outline-none neeto-ui-border-gray-300 neeto-ui-shadow-xs hover:neeto-ui-border-gray-500 focus:neeto-ui-border-gray-500 neeto-ui-rounded-lg flex flex-col border p-6 no-underline transition-colors ".concat(className)
35
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
36
+ className: "h-full"
37
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
38
+ className: "mb-4"
39
+ }, Icon && /*#__PURE__*/React__default["default"].createElement(Icon, {
40
+ className: "neeto-ui-text-gray-700",
41
+ size: 32
42
+ })), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
43
+ className: "neeto-ui-text-gray-800 mb-2",
44
+ style: "h4",
45
+ weight: "semibold"
46
+ }, label), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
47
+ className: "neeto-ui-text-gray-700",
48
+ style: "body2"
49
+ }, description)), /*#__PURE__*/React__default["default"].createElement("div", {
50
+ className: "neeto-ui-border-gray-300 mt-4 w-full border-t pt-2"
51
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
52
+ className: "flex h-8 items-center justify-between"
53
+ }, isConnected ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Tag, {
54
+ className: "flex-row-reverse",
55
+ icon: neetoIcons.Check,
56
+ label: t("neetoMolecules.integrationCard.connected"),
57
+ size: "small",
58
+ style: "success"
59
+ }), customDropdown || /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
60
+ buttonStyle: "text",
61
+ icon: neetoIcons.MenuVertical
62
+ }, /*#__PURE__*/React__default["default"].createElement(Menu, null, /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, {
63
+ onClick: onManage
64
+ }, t("neetoMolecules.integrationCard.manage")), /*#__PURE__*/React__default["default"].createElement(MenuItem.Button, {
65
+ onClick: onDisconnect
66
+ }, t("neetoMolecules.integrationCard.disconnect"))))) : /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
67
+ loading: isStatusLoading,
68
+ style: "link",
69
+ label: isStatusLoading ? "" : t("neetoMolecules.integrationCard.connect"),
70
+ onClick: onConnect
71
+ }))));
72
+ };
73
+
74
+ module.exports = IntegrationCard;
75
+ //# sourceMappingURL=IntegrationCard.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationCard.cjs.js","sources":["../src/components/IntegrationCard/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { noop } from \"neetocommons/pure\";\nimport { Check, MenuVertical } from \"neetoicons\";\nimport { Typography, Button, Tag, Dropdown } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nconst { Menu, MenuItem } = Dropdown;\n\nconst IntegrationCard = ({\n label,\n description,\n Icon,\n className = \"\",\n isConnected,\n isStatusLoading = false,\n customDropdown = null,\n onDisconnect = noop,\n onConnect,\n onManage = noop,\n}) => {\n const { t } = useTranslation();\n\n return (\n <div\n className={`outline-none neeto-ui-border-gray-300 neeto-ui-shadow-xs hover:neeto-ui-border-gray-500 focus:neeto-ui-border-gray-500 neeto-ui-rounded-lg flex flex-col border p-6 no-underline transition-colors ${className}`}\n >\n <div className=\"h-full\">\n <div className=\"mb-4\">\n {Icon && <Icon className=\"neeto-ui-text-gray-700\" size={32} />}\n </div>\n <Typography\n className=\"neeto-ui-text-gray-800 mb-2\"\n style=\"h4\"\n weight=\"semibold\"\n >\n {label}\n </Typography>\n <Typography className=\"neeto-ui-text-gray-700\" style=\"body2\">\n {description}\n </Typography>\n </div>\n <div className=\"neeto-ui-border-gray-300 mt-4 w-full border-t pt-2\">\n <div className=\"flex h-8 items-center justify-between\">\n {isConnected ? (\n <>\n <Tag\n className=\"flex-row-reverse\"\n icon={Check}\n label={t(\"neetoMolecules.integrationCard.connected\")}\n size=\"small\"\n style=\"success\"\n />\n {customDropdown || (\n <Dropdown buttonStyle=\"text\" icon={MenuVertical}>\n <Menu>\n <MenuItem.Button onClick={onManage}>\n {t(\"neetoMolecules.integrationCard.manage\")}\n </MenuItem.Button>\n <MenuItem.Button onClick={onDisconnect}>\n {t(\"neetoMolecules.integrationCard.disconnect\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n )}\n </>\n ) : (\n <Button\n loading={isStatusLoading}\n style=\"link\"\n label={\n isStatusLoading\n ? \"\"\n : t(\"neetoMolecules.integrationCard.connect\")\n }\n onClick={onConnect}\n />\n )}\n </div>\n </div>\n </div>\n );\n};\n\nIntegrationCard.propTypes = {\n /**\n * The label to be displayed on the card.\n */\n label: PropTypes.string,\n /**\n * The description of the card.\n */\n description: PropTypes.string,\n /**\n * The icon to be displayed on the card.\n */\n Icon: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify whether the integration is connected or not.\n */\n isConnected: PropTypes.bool,\n /**\n * To specify whether the integration is loading or not.\n */\n isStatusLoading: PropTypes.bool,\n /**\n * Displays a dropdown component next to the status.\n */\n customDropdown: PropTypes.element,\n /**\n * Handler function that is triggered when the integration is disconnected.\n */\n onDisconnect: PropTypes.func,\n /**\n * Handler function that is triggered when the integration is connected.\n */\n onConnect: PropTypes.func,\n /**\n * Handler function that is triggered when the manage button in default dropdown is clicked.\n */\n onManage: PropTypes.func,\n};\n\nexport default IntegrationCard;\n"],"names":["Menu","Dropdown","MenuItem","IntegrationCard","_ref","label","description","Icon","_ref$className","className","isConnected","_ref$isStatusLoading","isStatusLoading","_ref$customDropdown","customDropdown","_ref$onDisconnect","onDisconnect","noop","onConnect","_ref$onManage","onManage","_useTranslation","useTranslation","t","React","createElement","concat","size","Typography","style","weight","Fragment","Tag","icon","Check","buttonStyle","MenuVertical","Button","onClick","loading"],"mappings":";;;;;;;;;;;;AAQA,IAAQA,IAAI,GAAeC,gBAAQ,CAA3BD,IAAI;EAAEE,QAAQ,GAAKD,gBAAQ,CAArBC,QAAQ,CAAA;AAEtB,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAWf;AAAA,EAAA,IAVJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAAC,cAAA,GAAAJ,IAAA,CACJK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IACdE,WAAW,GAAAN,IAAA,CAAXM,WAAW;IAAAC,oBAAA,GAAAP,IAAA,CACXQ,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,oBAAA;IAAAE,mBAAA,GAAAT,IAAA,CACvBU,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;IAAAE,iBAAA,GAAAX,IAAA,CACrBY,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAGE,KAAAA,CAAAA,GAAAA,SAAI,GAAAF,iBAAA;IACnBG,SAAS,GAAAd,IAAA,CAATc,SAAS;IAAAC,aAAA,GAAAf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IAAAA,eAAAA,yBAAA,CAAAC,aAAA,CAACO,WAAG,EAAA;AACFvB,IAAAA,SAAS,EAAC,kBAAkB;AAC5BwB,IAAAA,IAAI,EAAEC,gBAAM;AACZ7B,IAAAA,KAAK,EAAEkB,CAAC,CAAC,0CAA0C,CAAE;AACrDI,IAAAA,IAAI,EAAC,OAAO;AACZE,IAAAA,KAAK,EAAC,SAAA;AAAS,GAAA,CACf,EACDf,cAAc,iBACbU,yBAAA,CAAAC,aAAA,CAACxB,gBAAQ,EAAA;AAACkC,IAAAA,WAAW,EAAC,MAAM;AAACF,IAAAA,IAAI,EAAEG,uBAAAA;AAAa,GAAA,eAC9CZ,yBAAA,CAAAC,aAAA,CAACzB,IAAI,EAAA,IAAA,eACHwB,yBAAA,CAAAC,aAAA,CAACvB,QAAQ,CAACmC,MAAM,EAAA;AAACC,IAAAA,OAAO,EAAElB,QAAAA;AAAS,GAAA,EAChCG,CAAC,CAAC,uCAAuC,CAAC,CAC3B,eAClBC,yBAAA,CAAAC,aAAA,CAACvB,QAAQ,CAACmC,MAAM,EAAA;AAACC,IAAAA,OAAO,EAAEtB,YAAAA;AAAa,GAAA,EACpCO,CAAC,CAAC,2CAA2C,CAAC,CAC/B,CACb,CAEV,CACA,gBAEHC,yBAAA,CAAAC,aAAA,CAACY,cAAM,EAAA;AACLE,IAAAA,OAAO,EAAE3B,eAAgB;AACzBiB,IAAAA,KAAK,EAAC,MAAM;IACZxB,KAAK,EACHO,eAAe,GACX,EAAE,GACFW,CAAC,CAAC,wCAAwC,CAC/C;AACDe,IAAAA,OAAO,EAAEpB,SAAAA;GAEZ,CAAA,CACG,CACF,CACF,CAAA;AAEV;;;;"}
@@ -0,0 +1,69 @@
1
+ import React from 'react';
2
+ import { noop } from '@bigbinary/neeto-commons-frontend/pure';
3
+ import { Check, MenuVertical } from '@bigbinary/neeto-icons';
4
+ import { Dropdown, Typography, Tag, Button } from '@bigbinary/neetoui';
5
+ import { useTranslation } from 'react-i18next';
6
+
7
+ var Menu = Dropdown.Menu,
8
+ MenuItem = Dropdown.MenuItem;
9
+ var IntegrationCard = function IntegrationCard(_ref) {
10
+ var label = _ref.label,
11
+ description = _ref.description,
12
+ Icon = _ref.Icon,
13
+ _ref$className = _ref.className,
14
+ className = _ref$className === void 0 ? "" : _ref$className,
15
+ isConnected = _ref.isConnected,
16
+ _ref$isStatusLoading = _ref.isStatusLoading,
17
+ isStatusLoading = _ref$isStatusLoading === void 0 ? false : _ref$isStatusLoading,
18
+ _ref$customDropdown = _ref.customDropdown,
19
+ customDropdown = _ref$customDropdown === void 0 ? null : _ref$customDropdown,
20
+ _ref$onDisconnect = _ref.onDisconnect,
21
+ onDisconnect = _ref$onDisconnect === void 0 ? noop : _ref$onDisconnect,
22
+ onConnect = _ref.onConnect,
23
+ _ref$onManage = _ref.onManage,
24
+ onManage = _ref$onManage === void 0 ? noop : _ref$onManage;
25
+ var _useTranslation = useTranslation(),
26
+ t = _useTranslation.t;
27
+ return /*#__PURE__*/React.createElement("div", {
28
+ className: "outline-none neeto-ui-border-gray-300 neeto-ui-shadow-xs hover:neeto-ui-border-gray-500 focus:neeto-ui-border-gray-500 neeto-ui-rounded-lg flex flex-col border p-6 no-underline transition-colors ".concat(className)
29
+ }, /*#__PURE__*/React.createElement("div", {
30
+ className: "h-full"
31
+ }, /*#__PURE__*/React.createElement("div", {
32
+ className: "mb-4"
33
+ }, Icon && /*#__PURE__*/React.createElement(Icon, {
34
+ className: "neeto-ui-text-gray-700",
35
+ size: 32
36
+ })), /*#__PURE__*/React.createElement(Typography, {
37
+ className: "neeto-ui-text-gray-800 mb-2",
38
+ style: "h4",
39
+ weight: "semibold"
40
+ }, label), /*#__PURE__*/React.createElement(Typography, {
41
+ className: "neeto-ui-text-gray-700",
42
+ style: "body2"
43
+ }, description)), /*#__PURE__*/React.createElement("div", {
44
+ className: "neeto-ui-border-gray-300 mt-4 w-full border-t pt-2"
45
+ }, /*#__PURE__*/React.createElement("div", {
46
+ className: "flex h-8 items-center justify-between"
47
+ }, isConnected ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tag, {
48
+ className: "flex-row-reverse",
49
+ icon: Check,
50
+ label: t("neetoMolecules.integrationCard.connected"),
51
+ size: "small",
52
+ style: "success"
53
+ }), customDropdown || /*#__PURE__*/React.createElement(Dropdown, {
54
+ buttonStyle: "text",
55
+ icon: MenuVertical
56
+ }, /*#__PURE__*/React.createElement(Menu, null, /*#__PURE__*/React.createElement(MenuItem.Button, {
57
+ onClick: onManage
58
+ }, t("neetoMolecules.integrationCard.manage")), /*#__PURE__*/React.createElement(MenuItem.Button, {
59
+ onClick: onDisconnect
60
+ }, t("neetoMolecules.integrationCard.disconnect"))))) : /*#__PURE__*/React.createElement(Button, {
61
+ loading: isStatusLoading,
62
+ style: "link",
63
+ label: isStatusLoading ? "" : t("neetoMolecules.integrationCard.connect"),
64
+ onClick: onConnect
65
+ }))));
66
+ };
67
+
68
+ export { IntegrationCard as default };
69
+ //# sourceMappingURL=IntegrationCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationCard.js","sources":["../src/components/IntegrationCard/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { noop } from \"neetocommons/pure\";\nimport { Check, MenuVertical } from \"neetoicons\";\nimport { Typography, Button, Tag, Dropdown } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nconst { Menu, MenuItem } = Dropdown;\n\nconst IntegrationCard = ({\n label,\n description,\n Icon,\n className = \"\",\n isConnected,\n isStatusLoading = false,\n customDropdown = null,\n onDisconnect = noop,\n onConnect,\n onManage = noop,\n}) => {\n const { t } = useTranslation();\n\n return (\n <div\n className={`outline-none neeto-ui-border-gray-300 neeto-ui-shadow-xs hover:neeto-ui-border-gray-500 focus:neeto-ui-border-gray-500 neeto-ui-rounded-lg flex flex-col border p-6 no-underline transition-colors ${className}`}\n >\n <div className=\"h-full\">\n <div className=\"mb-4\">\n {Icon && <Icon className=\"neeto-ui-text-gray-700\" size={32} />}\n </div>\n <Typography\n className=\"neeto-ui-text-gray-800 mb-2\"\n style=\"h4\"\n weight=\"semibold\"\n >\n {label}\n </Typography>\n <Typography className=\"neeto-ui-text-gray-700\" style=\"body2\">\n {description}\n </Typography>\n </div>\n <div className=\"neeto-ui-border-gray-300 mt-4 w-full border-t pt-2\">\n <div className=\"flex h-8 items-center justify-between\">\n {isConnected ? (\n <>\n <Tag\n className=\"flex-row-reverse\"\n icon={Check}\n label={t(\"neetoMolecules.integrationCard.connected\")}\n size=\"small\"\n style=\"success\"\n />\n {customDropdown || (\n <Dropdown buttonStyle=\"text\" icon={MenuVertical}>\n <Menu>\n <MenuItem.Button onClick={onManage}>\n {t(\"neetoMolecules.integrationCard.manage\")}\n </MenuItem.Button>\n <MenuItem.Button onClick={onDisconnect}>\n {t(\"neetoMolecules.integrationCard.disconnect\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n )}\n </>\n ) : (\n <Button\n loading={isStatusLoading}\n style=\"link\"\n label={\n isStatusLoading\n ? \"\"\n : t(\"neetoMolecules.integrationCard.connect\")\n }\n onClick={onConnect}\n />\n )}\n </div>\n </div>\n </div>\n );\n};\n\nIntegrationCard.propTypes = {\n /**\n * The label to be displayed on the card.\n */\n label: PropTypes.string,\n /**\n * The description of the card.\n */\n description: PropTypes.string,\n /**\n * The icon to be displayed on the card.\n */\n Icon: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify whether the integration is connected or not.\n */\n isConnected: PropTypes.bool,\n /**\n * To specify whether the integration is loading or not.\n */\n isStatusLoading: PropTypes.bool,\n /**\n * Displays a dropdown component next to the status.\n */\n customDropdown: PropTypes.element,\n /**\n * Handler function that is triggered when the integration is disconnected.\n */\n onDisconnect: PropTypes.func,\n /**\n * Handler function that is triggered when the integration is connected.\n */\n onConnect: PropTypes.func,\n /**\n * Handler function that is triggered when the manage button in default dropdown is clicked.\n */\n onManage: PropTypes.func,\n};\n\nexport default IntegrationCard;\n"],"names":["Menu","Dropdown","MenuItem","IntegrationCard","_ref","label","description","Icon","_ref$className","className","isConnected","_ref$isStatusLoading","isStatusLoading","_ref$customDropdown","customDropdown","_ref$onDisconnect","onDisconnect","noop","onConnect","_ref$onManage","onManage","_useTranslation","useTranslation","t","React","createElement","concat","size","Typography","style","weight","Fragment","Tag","icon","Check","buttonStyle","MenuVertical","Button","onClick","loading"],"mappings":";;;;;;AAQA,IAAQA,IAAI,GAAeC,QAAQ,CAA3BD,IAAI;EAAEE,QAAQ,GAAKD,QAAQ,CAArBC,QAAQ,CAAA;AAEtB,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAWf;AAAA,EAAA,IAVJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAAC,cAAA,GAAAJ,IAAA,CACJK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IACdE,WAAW,GAAAN,IAAA,CAAXM,WAAW;IAAAC,oBAAA,GAAAP,IAAA,CACXQ,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,oBAAA;IAAAE,mBAAA,GAAAT,IAAA,CACvBU,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;IAAAE,iBAAA,GAAAX,IAAA,CACrBY,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAGE,KAAAA,CAAAA,GAAAA,IAAI,GAAAF,iBAAA;IACnBG,SAAS,GAAAd,IAAA,CAATc,SAAS;IAAAC,aAAA,GAAAf,IAAA,CACTgB,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG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C,kBAAkB;AAC5BwB,IAAAA,IAAI,EAAEC,KAAM;AACZ7B,IAAAA,KAAK,EAAEkB,CAAC,CAAC,0CAA0C,CAAE;AACrDI,IAAAA,IAAI,EAAC,OAAO;AACZE,IAAAA,KAAK,EAAC,SAAA;AAAS,GAAA,CACf,EACDf,cAAc,iBACbU,KAAA,CAAAC,aAAA,CAACxB,QAAQ,EAAA;AAACkC,IAAAA,WAAW,EAAC,MAAM;AAACF,IAAAA,IAAI,EAAEG,YAAAA;AAAa,GAAA,eAC9CZ,KAAA,CAAAC,aAAA,CAACzB,IAAI,EAAA,IAAA,eACHwB,KAAA,CAAAC,aAAA,CAACvB,QAAQ,CAACmC,MAAM,EAAA;AAACC,IAAAA,OAAO,EAAElB,QAAAA;AAAS,GAAA,EAChCG,CAAC,CAAC,uCAAuC,CAAC,CAC3B,eAClBC,KAAA,CAAAC,aAAA,CAACvB,QAAQ,CAACmC,MAAM,EAAA;AAACC,IAAAA,OAAO,EAAEtB,YAAAA;AAAa,GAAA,EACpCO,CAAC,CAAC,2CAA2C,CAAC,CAC/B,CACb,CAEV,CACA,gBAEHC,KAAA,CAAAC,aAAA,CAACY,MAAM,EAAA;AACLE,IAAAA,OAAO,EAAE3B,eAAgB;AACzBiB,IAAAA,KAAK,EAAC,MAAM;IACZxB,KAAK,EACHO,eAAe,GACX,EAAE,GACFW,CAAC,CAAC,wCAAwC,CAC/C;AACDe,IAAAA,OAAO,EAAEpB,SAAAA;GAEZ,CAAA,CACG,CACF,CACF,CAAA;AAEV;;;;"}
@@ -0,0 +1,81 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var neetoui = require('@bigbinary/neetoui');
5
+ var reactI18next = require('react-i18next');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
+
11
+ function _extends() {
12
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
13
+ for (var i = 1; i < arguments.length; i++) {
14
+ var source = arguments[i];
15
+ for (var key in source) {
16
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
17
+ target[key] = source[key];
18
+ }
19
+ }
20
+ }
21
+ return target;
22
+ };
23
+ return _extends.apply(this, arguments);
24
+ }
25
+
26
+ function _objectWithoutPropertiesLoose(source, excluded) {
27
+ if (source == null) return {};
28
+ var target = {};
29
+ var sourceKeys = Object.keys(source);
30
+ var key, i;
31
+ for (i = 0; i < sourceKeys.length; i++) {
32
+ key = sourceKeys[i];
33
+ if (excluded.indexOf(key) >= 0) continue;
34
+ target[key] = source[key];
35
+ }
36
+ return target;
37
+ }
38
+
39
+ function _objectWithoutProperties(source, excluded) {
40
+ if (source == null) return {};
41
+ var target = _objectWithoutPropertiesLoose(source, excluded);
42
+ var key, i;
43
+ if (Object.getOwnPropertySymbols) {
44
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
45
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
46
+ key = sourceSymbolKeys[i];
47
+ if (excluded.indexOf(key) >= 0) continue;
48
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
49
+ target[key] = source[key];
50
+ }
51
+ }
52
+ return target;
53
+ }
54
+
55
+ var _excluded = ["isOpen", "isDisconnecting", "title", "message", "onClose", "onDisconnect"];
56
+ var IntegrationDisconnectAlert = function IntegrationDisconnectAlert(_ref) {
57
+ var isOpen = _ref.isOpen,
58
+ isDisconnecting = _ref.isDisconnecting,
59
+ title = _ref.title,
60
+ _ref$message = _ref.message,
61
+ message = _ref$message === void 0 ? "" : _ref$message,
62
+ onClose = _ref.onClose,
63
+ onDisconnect = _ref.onDisconnect,
64
+ otherProps = _objectWithoutProperties(_ref, _excluded);
65
+ var _useTranslation = reactI18next.useTranslation(),
66
+ t = _useTranslation.t;
67
+ return /*#__PURE__*/React__default["default"].createElement(neetoui.Alert, _extends({
68
+ closeOnEsc: true,
69
+ closeOnOutsideClick: true,
70
+ isOpen: isOpen,
71
+ isSubmitting: isDisconnecting,
72
+ message: message,
73
+ title: title,
74
+ submitButtonLabel: t("neetoMolecules.integrationDisconnectAlert.disconnect"),
75
+ onClose: onClose,
76
+ onSubmit: onDisconnect
77
+ }, otherProps));
78
+ };
79
+
80
+ module.exports = IntegrationDisconnectAlert;
81
+ //# sourceMappingURL=IntegrationDisconnectAlert.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationDisconnectAlert.cjs.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../src/components/IntegrationDisconnectAlert/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","import React from \"react\";\n\nimport { Alert } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nconst IntegrationDisconnectAlert = ({\n isOpen,\n isDisconnecting,\n title,\n message = \"\",\n onClose,\n onDisconnect,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n return (\n <Alert\n closeOnEsc\n closeOnOutsideClick\n isOpen={isOpen}\n isSubmitting={isDisconnecting}\n message={message}\n title={title}\n submitButtonLabel={t(\n \"neetoMolecules.integrationDisconnectAlert.disconnect\"\n )}\n onClose={onClose}\n onSubmit={onDisconnect}\n {...otherProps}\n />\n );\n};\n\nIntegrationDisconnectAlert.propTypes = {\n /**\n * To show loading state when the confirmation is given for disconnecting\n */\n isDisconnecting: PropTypes.bool,\n /**\n * To specify whether the integration modal should be opened or closed.\n */\n isOpen: PropTypes.bool,\n /**\n * To show the title of the alert modal\n */\n title: PropTypes.string,\n /**\n * To show the description of the alert modal\n */\n message: PropTypes.string,\n /**\n * Handler function that is triggered when the close button is clicked.\n */\n onClose: PropTypes.func,\n /**\n * Handler function that is triggered when the disconnect button is clicked\n */\n onDisconnect: PropTypes.func,\n};\n\nexport default IntegrationDisconnectAlert;\n"],"names":["objectWithoutPropertiesLoose","IntegrationDisconnectAlert","_ref","isOpen","isDisconnecting","title","_ref$message","message","onClose","onDisconnect","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","React","createElement","Alert","_extends","closeOnEsc","closeOnOutsideClick","isSubmitting","submitButtonLabel","onSubmit"],"mappings":";;;;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,IAAI,GAAG,IAAI,M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ACnBlB,IAAAA,MAAM,EAAEA,MAAO;AACfmB,IAAAA,YAAY,EAAElB,eAAgB;AAC9BG,IAAAA,OAAO,EAAEA,OAAQ;AACjBF,IAAAA,KAAK,EAAEA,KAAM;AACbkB,IAAAA,iBAAiB,EAAER,CAAC,CAClB,sDAAsD,CACtD;AACFP,IAAAA,OAAO,EAAEA,OAAQ;AACjBgB,IAAAA,QAAQ,EAAEf,YAAAA;AAAa,GAAA,EACnBC,UAAU,CACd,CAAA,CAAA;AAEN;;;;"}
@@ -0,0 +1,75 @@
1
+ import React from 'react';
2
+ import { Alert } from '@bigbinary/neetoui';
3
+ import { useTranslation } from 'react-i18next';
4
+
5
+ function _extends() {
6
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
7
+ for (var i = 1; i < arguments.length; i++) {
8
+ var source = arguments[i];
9
+ for (var key in source) {
10
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
11
+ target[key] = source[key];
12
+ }
13
+ }
14
+ }
15
+ return target;
16
+ };
17
+ return _extends.apply(this, arguments);
18
+ }
19
+
20
+ function _objectWithoutPropertiesLoose(source, excluded) {
21
+ if (source == null) return {};
22
+ var target = {};
23
+ var sourceKeys = Object.keys(source);
24
+ var key, i;
25
+ for (i = 0; i < sourceKeys.length; i++) {
26
+ key = sourceKeys[i];
27
+ if (excluded.indexOf(key) >= 0) continue;
28
+ target[key] = source[key];
29
+ }
30
+ return target;
31
+ }
32
+
33
+ function _objectWithoutProperties(source, excluded) {
34
+ if (source == null) return {};
35
+ var target = _objectWithoutPropertiesLoose(source, excluded);
36
+ var key, i;
37
+ if (Object.getOwnPropertySymbols) {
38
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
39
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
40
+ key = sourceSymbolKeys[i];
41
+ if (excluded.indexOf(key) >= 0) continue;
42
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
43
+ target[key] = source[key];
44
+ }
45
+ }
46
+ return target;
47
+ }
48
+
49
+ var _excluded = ["isOpen", "isDisconnecting", "title", "message", "onClose", "onDisconnect"];
50
+ var IntegrationDisconnectAlert = function IntegrationDisconnectAlert(_ref) {
51
+ var isOpen = _ref.isOpen,
52
+ isDisconnecting = _ref.isDisconnecting,
53
+ title = _ref.title,
54
+ _ref$message = _ref.message,
55
+ message = _ref$message === void 0 ? "" : _ref$message,
56
+ onClose = _ref.onClose,
57
+ onDisconnect = _ref.onDisconnect,
58
+ otherProps = _objectWithoutProperties(_ref, _excluded);
59
+ var _useTranslation = useTranslation(),
60
+ t = _useTranslation.t;
61
+ return /*#__PURE__*/React.createElement(Alert, _extends({
62
+ closeOnEsc: true,
63
+ closeOnOutsideClick: true,
64
+ isOpen: isOpen,
65
+ isSubmitting: isDisconnecting,
66
+ message: message,
67
+ title: title,
68
+ submitButtonLabel: t("neetoMolecules.integrationDisconnectAlert.disconnect"),
69
+ onClose: onClose,
70
+ onSubmit: onDisconnect
71
+ }, otherProps));
72
+ };
73
+
74
+ export { IntegrationDisconnectAlert as default };
75
+ //# sourceMappingURL=IntegrationDisconnectAlert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationDisconnectAlert.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../src/components/IntegrationDisconnectAlert/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","import React from \"react\";\n\nimport { Alert } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nconst IntegrationDisconnectAlert = ({\n isOpen,\n isDisconnecting,\n title,\n message = \"\",\n onClose,\n onDisconnect,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n return (\n <Alert\n closeOnEsc\n closeOnOutsideClick\n isOpen={isOpen}\n isSubmitting={isDisconnecting}\n message={message}\n title={title}\n submitButtonLabel={t(\n \"neetoMolecules.integrationDisconnectAlert.disconnect\"\n )}\n onClose={onClose}\n onSubmit={onDisconnect}\n {...otherProps}\n />\n );\n};\n\nIntegrationDisconnectAlert.propTypes = {\n /**\n * To show loading state when the confirmation is given for disconnecting\n */\n isDisconnecting: PropTypes.bool,\n /**\n * To specify whether the integration modal should be opened or closed.\n */\n isOpen: PropTypes.bool,\n /**\n * To show the title of the alert modal\n */\n title: PropTypes.string,\n /**\n * To show the description of the alert modal\n */\n message: PropTypes.string,\n /**\n * Handler function that is triggered when the close button is clicked.\n */\n onClose: PropTypes.func,\n /**\n * Handler function that is triggered when the disconnect button is clicked\n */\n onDisconnect: PropTypes.func,\n};\n\nexport default IntegrationDisconnectAlert;\n"],"names":["objectWithoutPropertiesLoose","IntegrationDisconnectAlert","_ref","isOpen","isDisconnecting","title","_ref$message","message","onClose","onDisconnect","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","React","createElement","Alert","_extends","closeOnEsc","closeOnOutsideClick","isSubmitting","submitButtonLabel","onSubmit"],"mappings":";;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;AAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;AAC/D,UAAU,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACpC,SAAS;AACT,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACzC;;ACbe,SAAS,6BAA6B,CAAC,MAAM,EAAE,QAAQ,EAAE;AACxE,EAAE,IAAI,MAAM,IAAI,IAAI,EAAE,OAAO,EAAE,CAAC;AAChC,EAAE,IAAI,MAAM,GAAG,EAAE,CAAC;AAClB,EAAE,IAAI,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACvC,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AACb,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC1C,IAAI,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AACxB,IAAI,IAAI,QAAQ,CAAC,OAAO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AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,YAAA;IACZE,OAAO,GAAAN,IAAA,CAAPM,OAAO;IACPC,YAAY,GAAAP,IAAA,CAAZO,YAAY;AACTC,IAAAA,UAAU,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;EAEb,IAAAC,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;AAET,EAAA,oBACEC,KAAA,CAAAC,aAAA,CAACC,KAAK,EAAAC,QAAA,CAAA;IACJC,UAAU,EAAA,IAAA;IACVC,mBAAmB,EAAA,IAAA;AACnBlB,IAAAA,MAAM,EAAEA,MAAO;AACfmB,IAAAA,YAAY,EAAElB,eAAgB;AAC9BG,IAAAA,OAAO,EAAEA,OAAQ;AACjBF,IAAAA,KAAK,EAAEA,KAAM;AACbkB,IAAAA,iBAAiB,EAAER,CAAC,CAClB,sDAAsD,CACtD;AACFP,IAAAA,OAAO,EAAEA,OAAQ;AACjBgB,IAAAA,QAAQ,EAAEf,YAAAA;AAAa,GAAA,EACnBC,UAAU,CACd,CAAA,CAAA;AAEN;;;;"}
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var neetoui = require('@bigbinary/neetoui');
5
+ var reactI18next = require('react-i18next');
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
+
11
+ var IntegrationWalkthroughModal = function IntegrationWalkthroughModal(_ref) {
12
+ var isOpen = _ref.isOpen,
13
+ onClose = _ref.onClose,
14
+ videoUrl = _ref.videoUrl,
15
+ children = _ref.children;
16
+ var _useTranslation = reactI18next.useTranslation(),
17
+ t = _useTranslation.t;
18
+ return /*#__PURE__*/React__default["default"].createElement(neetoui.Modal, {
19
+ isOpen: isOpen,
20
+ size: "large",
21
+ onClose: onClose
22
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
23
+ style: "h2",
24
+ weight: "semibold"
25
+ }, t("neetoMolecules.integrationWalkthroughModal.header"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Body, null, /*#__PURE__*/React__default["default"].createElement("div", {
26
+ className: "w-full py-10"
27
+ }, /*#__PURE__*/React__default["default"].createElement("video", {
28
+ autoPlay: true,
29
+ controls: true,
30
+ muted: true,
31
+ className: "cursor-pointer",
32
+ id: "walkthrough-video"
33
+ }, /*#__PURE__*/React__default["default"].createElement("source", {
34
+ src: videoUrl
35
+ })), children)), /*#__PURE__*/React__default["default"].createElement(neetoui.Modal.Footer, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
36
+ label: t("neetoMolecules.integrationWalkthroughModal.continue"),
37
+ onClick: onClose
38
+ })));
39
+ };
40
+
41
+ module.exports = IntegrationWalkthroughModal;
42
+ //# sourceMappingURL=IntegrationWalkthroughModal.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationWalkthroughModal.cjs.js","sources":["../src/components/IntegrationWalkthroughModal/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Modal, Button, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nconst IntegrationWalkthroughModal = ({\n isOpen,\n onClose,\n videoUrl,\n children,\n}) => {\n const { t } = useTranslation();\n\n return (\n <Modal isOpen={isOpen} size=\"large\" onClose={onClose}>\n <Modal.Header>\n <Typography style=\"h2\" weight=\"semibold\">\n {t(\"neetoMolecules.integrationWalkthroughModal.header\")}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n <div className=\"w-full py-10\">\n <video\n autoPlay\n controls\n muted\n className=\"cursor-pointer\"\n id=\"walkthrough-video\"\n >\n <source src={videoUrl} />\n </video>\n {children}\n </div>\n </Modal.Body>\n <Modal.Footer>\n <Button\n label={t(\"neetoMolecules.integrationWalkthroughModal.continue\")}\n onClick={onClose}\n />\n </Modal.Footer>\n </Modal>\n );\n};\n\nIntegrationWalkthroughModal.propTypes = {\n /**\n * To specify video URL of integration walkthrough that will be embedded.\n */\n videoUrl: PropTypes.string,\n /**\n * To specify whether the integration modal should be opened or closed.\n */\n isOpen: PropTypes.bool,\n /**\n * Handler function that is triggered when the continue or close button is clicked.\n */\n onClose: PropTypes.func,\n};\n\nexport default IntegrationWalkthroughModal;\n"],"names":["IntegrationWalkthroughModal","_ref","isOpen","onClose","videoUrl","children","_useTranslation","useTranslation","t","React","createElement","Modal","size","Header","Typography","style","weight","Body","className","autoPlay","controls","muted","id","src","Footer","Button","label","onClick"],"mappings":";;;;;;;;;;AAMA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAAC,IAAA,EAK3B;AAAA,EAAA,IAJJC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ,CAAA;EAER,IAAAC,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;AAET,EAAA,oBACEC,yBAAA,CAAAC,aAAA,CAACC,aAAK,EAAA;AAACT,IAAAA,MAAM,EAAEA,MAAO;AAACU,IAAAA,IAAI,EAAC,OAAO;AAACT,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GAAA,eACnDM,yBAAA,CAAAC,aAAA,CAACC,aAAK,CAACE,MAAM,EAAA,IAAA,eACXJ,yBAAA,CAAAC,aAAA,CAACI,kBAAU,EAAA;AAACC,IAAAA,KAAK,EAAC,IAAI;AAACC,IAAAA,MAAM,EAAC,UAAA;AAAU,GAAA,EACrCR,CAAC,CAAC,mDAAmD,CAAC,CAC5C,CACA,eACfC,yBAAA,CAAAC,aAAA,CAACC,aAAK,CAACM,IAAI,EACTR,IAAAA,eAAAA,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKQ,IAAAA,SAAS,EAAC,cAAA;GACbT,eAAAA,yBAAA,CAAAC,aAAA,CAAA,OAAA,EAAA;IACES,QAAQ,EAAA,IAAA;IACRC,QAAQ,EAAA,IAAA;IACRC,KAAK,EAAA,IAAA;AACLH,IAAAA,SAAS,EAAC,gBAAgB;AAC1BI,IAAAA,EAAE,EAAC,mBAAA;GAEHb,eAAAA,yBAAA,CAAAC,aAAA,CAAA,QAAA,EAAA;AAAQa,IAAAA,GAAG,EAAEnB,QAAAA;AAAS,GAAA,CAAG,CACnB,EACPC,QAAQ,CACL,CACK,eACbI,yBAAA,CAAAC,aAAA,CAACC,aAAK,CAACa,MAAM,EAAA,IAAA,eACXf,yBAAA,CAAAC,aAAA,CAACe,cAAM,EAAA;AACLC,IAAAA,KAAK,EAAElB,CAAC,CAAC,qDAAqD,CAAE;AAChEmB,IAAAA,OAAO,EAAExB,OAAAA;AAAQ,GAAA,CACjB,CACW,CACT,CAAA;AAEZ;;;;"}
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { Modal, Typography, Button } from '@bigbinary/neetoui';
3
+ import { useTranslation } from 'react-i18next';
4
+
5
+ var IntegrationWalkthroughModal = function IntegrationWalkthroughModal(_ref) {
6
+ var isOpen = _ref.isOpen,
7
+ onClose = _ref.onClose,
8
+ videoUrl = _ref.videoUrl,
9
+ children = _ref.children;
10
+ var _useTranslation = useTranslation(),
11
+ t = _useTranslation.t;
12
+ return /*#__PURE__*/React.createElement(Modal, {
13
+ isOpen: isOpen,
14
+ size: "large",
15
+ onClose: onClose
16
+ }, /*#__PURE__*/React.createElement(Modal.Header, null, /*#__PURE__*/React.createElement(Typography, {
17
+ style: "h2",
18
+ weight: "semibold"
19
+ }, t("neetoMolecules.integrationWalkthroughModal.header"))), /*#__PURE__*/React.createElement(Modal.Body, null, /*#__PURE__*/React.createElement("div", {
20
+ className: "w-full py-10"
21
+ }, /*#__PURE__*/React.createElement("video", {
22
+ autoPlay: true,
23
+ controls: true,
24
+ muted: true,
25
+ className: "cursor-pointer",
26
+ id: "walkthrough-video"
27
+ }, /*#__PURE__*/React.createElement("source", {
28
+ src: videoUrl
29
+ })), children)), /*#__PURE__*/React.createElement(Modal.Footer, null, /*#__PURE__*/React.createElement(Button, {
30
+ label: t("neetoMolecules.integrationWalkthroughModal.continue"),
31
+ onClick: onClose
32
+ })));
33
+ };
34
+
35
+ export { IntegrationWalkthroughModal as default };
36
+ //# sourceMappingURL=IntegrationWalkthroughModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationWalkthroughModal.js","sources":["../src/components/IntegrationWalkthroughModal/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Modal, Button, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nconst IntegrationWalkthroughModal = ({\n isOpen,\n onClose,\n videoUrl,\n children,\n}) => {\n const { t } = useTranslation();\n\n return (\n <Modal isOpen={isOpen} size=\"large\" onClose={onClose}>\n <Modal.Header>\n <Typography style=\"h2\" weight=\"semibold\">\n {t(\"neetoMolecules.integrationWalkthroughModal.header\")}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n <div className=\"w-full py-10\">\n <video\n autoPlay\n controls\n muted\n className=\"cursor-pointer\"\n id=\"walkthrough-video\"\n >\n <source src={videoUrl} />\n </video>\n {children}\n </div>\n </Modal.Body>\n <Modal.Footer>\n <Button\n label={t(\"neetoMolecules.integrationWalkthroughModal.continue\")}\n onClick={onClose}\n />\n </Modal.Footer>\n </Modal>\n );\n};\n\nIntegrationWalkthroughModal.propTypes = {\n /**\n * To specify video URL of integration walkthrough that will be embedded.\n */\n videoUrl: PropTypes.string,\n /**\n * To specify whether the integration modal should be opened or closed.\n */\n isOpen: PropTypes.bool,\n /**\n * Handler function that is triggered when the continue or close button is clicked.\n */\n onClose: PropTypes.func,\n};\n\nexport default IntegrationWalkthroughModal;\n"],"names":["IntegrationWalkthroughModal","_ref","isOpen","onClose","videoUrl","children","_useTranslation","useTranslation","t","React","createElement","Modal","size","Header","Typography","style","weight","Body","className","autoPlay","controls","muted","id","src","Footer","Button","label","onClick"],"mappings":";;;;AAMA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAAC,IAAA,EAK3B;AAAA,EAAA,IAJJC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ,CAAA;EAER,IAAAC,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;AAET,EAAA,oBACEC,KAAA,CAAAC,aAAA,CAACC,KAAK,EAAA;AAACT,IAAAA,MAAM,EAAEA,MAAO;AAACU,IAAAA,IAAI,EAAC,OAAO;AAACT,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GAAA,eACnDM,KAAA,CAAAC,aAAA,CAACC,KAAK,CAACE,MAAM,EAAA,IAAA,eACXJ,KAAA,CAAAC,aAAA,CAACI,UAAU,EAAA;AAACC,IAAAA,KAAK,EAAC,IAAI;AAACC,IAAAA,MAAM,EAAC,UAAA;AAAU,GAAA,EACrCR,CAAC,CAAC,mDAAmD,CAAC,CAC5C,CACA,eACfC,KAAA,CAAAC,aAAA,CAACC,KAAK,CAACM,IAAI,EACTR,IAAAA,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKQ,IAAAA,SAAS,EAAC,cAAA;GACbT,eAAAA,KAAA,CAAAC,aAAA,CAAA,OAAA,EAAA;IACES,QAAQ,EAAA,IAAA;IACRC,QAAQ,EAAA,IAAA;IACRC,KAAK,EAAA,IAAA;AACLH,IAAAA,SAAS,EAAC,gBAAgB;AAC1BI,IAAAA,EAAE,EAAC,mBAAA;GA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