@bigbinary/neeto-molecules 1.0.34 → 1.0.35
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 +1 -0
- package/dist/IntegrationWalkthroughModal.cjs.js +42 -0
- package/dist/IntegrationWalkthroughModal.cjs.js.map +1 -0
- package/dist/IntegrationWalkthroughModal.js +36 -0
- package/dist/IntegrationWalkthroughModal.js.map +1 -0
- package/package.json +1 -1
- package/src/translations/en.json +4 -0
- package/types/IntegrationWalkthroughModal.d.ts +29 -0
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,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;GAEHb,eAAAA,KAAA,CAAAC,aAAA,CAAA,QAAA,EAAA;AAAQa,IAAAA,GAAG,EAAEnB,QAAAA;AAAS,GAAA,CAAG,CACnB,EACPC,QAAQ,CACL,CACK,eACbI,KAAA,CAAAC,aAAA,CAACC,KAAK,CAACa,MAAM,EAAA,IAAA,eACXf,KAAA,CAAAC,aAAA,CAACe,MAAM,EAAA;AACLC,IAAAA,KAAK,EAAElB,CAAC,CAAC,qDAAqD,CAAE;AAChEmB,IAAAA,OAAO,EAAExB,OAAAA;AAAQ,GAAA,CACjB,CACW,CACT,CAAA;AAEZ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
package/src/translations/en.json
CHANGED
|
@@ -280,6 +280,10 @@
|
|
|
280
280
|
"currentIpTitle": "Your current IP is",
|
|
281
281
|
"currentIpDescription": "Your current IP will be added to the allowed IP range by default. You will not be able to save the IP settings without your current IP address on the list"
|
|
282
282
|
},
|
|
283
|
+
"integrationWalkthroughModal": {
|
|
284
|
+
"header": "Check how it behaves",
|
|
285
|
+
"continue": "Continue"
|
|
286
|
+
},
|
|
283
287
|
"publishBlock": {
|
|
284
288
|
"viewDraftVersion": "View draft version",
|
|
285
289
|
"deleteDraftVersion": "Delete draft version. It'll not impact the published version",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* A component used to display walkthrough video of integration.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
*
|
|
8
|
+
* import React, { useState } from "react";
|
|
9
|
+
* import IntegrationWalkthroughModal from "@bigbinary/neeto-molecules/IntegrationWalkthroughModal";
|
|
10
|
+
*
|
|
11
|
+
* const Finish = () => {
|
|
12
|
+
* const [isModalOpen, setIsModalOpen] = useState(true);
|
|
13
|
+
*
|
|
14
|
+
* return (
|
|
15
|
+
* <IntegrationWalkthroughModal
|
|
16
|
+
* isOpen={isModalOpen}
|
|
17
|
+
* onClose={() => setIsModalOpen(false)}
|
|
18
|
+
* videoUrl="https://user-images.githubusercontent.com/39831309/232906732-43e139ac-4af8-4a59-9f4f-e96ebf436f75.mov"
|
|
19
|
+
* />
|
|
20
|
+
* );
|
|
21
|
+
* };
|
|
22
|
+
* @endexample
|
|
23
|
+
*/
|
|
24
|
+
const IntegrationWalkthroughModal: React.FC<{
|
|
25
|
+
videoUrl: string;
|
|
26
|
+
isOpen: boolean;
|
|
27
|
+
onClose: Function;
|
|
28
|
+
}>;
|
|
29
|
+
export default IntegrationWalkthroughModal;
|