@bigbinary/neeto-molecules 1.0.34 → 1.0.36

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/README.md CHANGED
@@ -20,6 +20,7 @@ https://neeto-molecules.neeto.com/
20
20
  - [EmailPreview](./docs/components.md#emailpreview)
21
21
  - [ErrorPage](./docs/components.md#errorpage)
22
22
  - [IntegrationCard](./docs/components.md#integrationscard)
23
+ - [IntegrationWalkthroughModal](./docs/components.md#integrationwalkthroughmodal)
23
24
  - [IpRestriction](./docs/components.md#iprestriction)
24
25
  - [KeyboardShortcuts](./docs/components.md#keyboardshortcuts)
25
26
  - [LoginPage](./docs/components.md#loginpage)
@@ -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.boolean,\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.boolean,\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,GAA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,EAAExB,OAAAA;AAAQ,GAAA,CACjB,CACW,CACT,CAAA;AAEZ;;;;"}
@@ -127,7 +127,7 @@ var FRAMEWORK_SELECT_OPTIONS = [{
127
127
  label: "PHP",
128
128
  value: AVAILABLE_FRAMEWORK_OPTIONS.php
129
129
  }];
130
- var SAMPLE_USER_IDENTITY_CODE_STRING = (_SAMPLE_USER_IDENTITY = {}, _defineProperty(_SAMPLE_USER_IDENTITY, AVAILABLE_FRAMEWORK_OPTIONS.rails, "window.".concat(NEETO_WIDGET_USER_IDENTITY_KEY, " = {\n user_identifier: \"<%= current_user.id %>\", // User identifier\"\n name: \"<%= current_user.name %>\", // Full name\n email: \"<%= current_user.email %>\", // Email address\n started_at: \"<%= current_user.created_at.to_i %>\" // Signup date as a Unix timestamp ,\n }")), _defineProperty(_SAMPLE_USER_IDENTITY, AVAILABLE_FRAMEWORK_OPTIONS.django, "window.".concat(NEETO_WIDGET_USER_IDENTITY_KEY, " = {\n user_identifier: \"{{ request.user.id|escapejs }}\", // User identifier\n name: \"{{ request.user.name|escapejs }}\", // Full name\n email: \"{{ request.user.email|escapejs }}\", // Email address\n started_at: \"{{ request.user.created_at|date:'U' }}\" // Signup date as a Unix timestamp\"\n }")), _defineProperty(_SAMPLE_USER_IDENTITY, AVAILABLE_FRAMEWORK_OPTIONS.php, "window.".concat(NEETO_WIDGET_USER_IDENTITY_KEY, " = {\n user_identifier: <?php echo json_encode($current_user->id) ?>, // User identifier\n name: <?php echo json_encode($current_user->name) ?>, // Full name\n email: <?php echo json_encode($current_user->email) ?>, // Email address\n started_at: <?php echo strtotime($current_user->created_at) ?> // Signup date as a Unix timestamp\" ,\n }")), _SAMPLE_USER_IDENTITY);
130
+ var SAMPLE_USER_IDENTITY_CODE_STRING = (_SAMPLE_USER_IDENTITY = {}, _defineProperty(_SAMPLE_USER_IDENTITY, AVAILABLE_FRAMEWORK_OPTIONS.rails, "window.".concat(NEETO_WIDGET_USER_IDENTITY_KEY, " = {\n user_identifier: \"<%= current_user.id %>\", // User identifier\"\n name: \"<%= current_user.name %>\", // Full name\n email: \"<%= current_user.email %>\", // Email address\n started_at: \"<%= current_user.created_at.to_i %>\" // Signup date as a Unix timestamp ,\n}")), _defineProperty(_SAMPLE_USER_IDENTITY, AVAILABLE_FRAMEWORK_OPTIONS.django, "window.".concat(NEETO_WIDGET_USER_IDENTITY_KEY, " = {\n user_identifier: \"{{ request.user.id|escapejs }}\", // User identifier\n name: \"{{ request.user.name|escapejs }}\", // Full name\n email: \"{{ request.user.email|escapejs }}\", // Email address\n started_at: \"{{ request.user.created_at|date:'U' }}\" // Signup date as a Unix timestamp\"\n}")), _defineProperty(_SAMPLE_USER_IDENTITY, AVAILABLE_FRAMEWORK_OPTIONS.php, "window.".concat(NEETO_WIDGET_USER_IDENTITY_KEY, " = {\n user_identifier: <?php echo json_encode($current_user->id) ?>, // User identifier\n name: <?php echo json_encode($current_user->name) ?>, // Full name\n email: <?php echo json_encode($current_user->email) ?>, // Email address\n started_at: <?php echo strtotime($current_user->created_at) ?> // Signup date as a Unix timestamp\" ,\n}")), _SAMPLE_USER_IDENTITY);
131
131
  var WIDGET_CONFIG_URL = "api/widget/v1/neeto_widget_tokens";
132
132
  var EMBED_CODE_EMAIL_URL = "api/widget/v1/email_snippets";
133
133
  var WIDGET_KB_BASE_URL = "https://neetowidgethelp.neetokb.com";