@bigbinary/neeto-molecules 1.19.9 → 1.19.10
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/MadeWith.js +2 -1
- package/dist/MadeWith.js.map +1 -1
- package/dist/cjs/MadeWith.js +2 -1
- package/dist/cjs/MadeWith.js.map +1 -1
- package/package.json +1 -1
- package/types/ProductEmbed.d.ts +53 -9
package/dist/MadeWith.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from '@babel/runtime/helpers/extends';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
+
import { capitalize } from '@bigbinary/neeto-cist';
|
|
4
5
|
import { Trans } from 'react-i18next';
|
|
5
6
|
import { n } from './inject-css-c86de496.js';
|
|
6
7
|
|
|
@@ -11,7 +12,7 @@ var _excluded = ["productName"];
|
|
|
11
12
|
var MadeWith = function MadeWith(_ref) {
|
|
12
13
|
var productName = _ref.productName,
|
|
13
14
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
-
var name = productName || globalProps.appName;
|
|
15
|
+
var name = capitalize(productName || globalProps.appName);
|
|
15
16
|
return /*#__PURE__*/React__default.createElement("a", _extends({
|
|
16
17
|
className: "neeto-molecules-made-with__wrapper",
|
|
17
18
|
"data-cy": "made-with-".concat(name.toLowerCase()),
|
package/dist/MadeWith.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MadeWith.js","sources":["../src/components/MadeWith/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\n\nimport \"./made-with.scss\";\n\nconst MadeWith = ({ productName, ...otherProps }) => {\n const name = productName || globalProps.appName;\n\n return (\n <a\n className=\"neeto-molecules-made-with__wrapper\"\n data-cy={`made-with-${name.toLowerCase()}`}\n data-testid={`made-with-${name.toLowerCase()}`}\n href={`https://www.neeto.com/${name.toLowerCase()}`}\n rel=\"noreferrer\"\n target=\"_blank\"\n {...otherProps}\n >\n <Trans\n i18nKey=\"neetoMolecules.common.madeWith\"\n values={{ productName: name }}\n />\n </a>\n );\n};\n\nMadeWith.propTypes = {\n /**\n * Product name to be displayed on the component (optional).\n */\n productName: PropTypes.string,\n};\n\nexport default React.memo(MadeWith);\n"],"names":["MadeWith","_ref","productName","otherProps","_objectWithoutProperties","_excluded","name","globalProps","appName","React","createElement","_extends","className","concat","toLowerCase","href","rel","target","Trans","i18nKey","values","memo"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MadeWith.js","sources":["../src/components/MadeWith/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { capitalize } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\n\nimport \"./made-with.scss\";\n\nconst MadeWith = ({ productName, ...otherProps }) => {\n const name = capitalize(productName || globalProps.appName);\n\n return (\n <a\n className=\"neeto-molecules-made-with__wrapper\"\n data-cy={`made-with-${name.toLowerCase()}`}\n data-testid={`made-with-${name.toLowerCase()}`}\n href={`https://www.neeto.com/${name.toLowerCase()}`}\n rel=\"noreferrer\"\n target=\"_blank\"\n {...otherProps}\n >\n <Trans\n i18nKey=\"neetoMolecules.common.madeWith\"\n values={{ productName: name }}\n />\n </a>\n );\n};\n\nMadeWith.propTypes = {\n /**\n * Product name to be displayed on the component (optional).\n */\n productName: PropTypes.string,\n};\n\nexport default React.memo(MadeWith);\n"],"names":["MadeWith","_ref","productName","otherProps","_objectWithoutProperties","_excluded","name","capitalize","globalProps","appName","React","createElement","_extends","className","concat","toLowerCase","href","rel","target","Trans","i18nKey","values","memo"],"mappings":";;;;;;;;;;;AAQA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAAuC;AAAA,EAAA,IAAjCC,WAAW,GAAAD,IAAA,CAAXC,WAAW;AAAKC,IAAAA,UAAU,GAAAC,wBAAA,CAAAH,IAAA,EAAAI,SAAA,CAAA,CAAA;EAC5C,IAAMC,IAAI,GAAGC,UAAU,CAACL,WAAW,IAAIM,WAAW,CAACC,OAAO,CAAC,CAAA;AAE3D,EAAA,oBACEC,cAAA,CAAAC,aAAA,CAAA,GAAA,EAAAC,QAAA,CAAA;AACEC,IAAAA,SAAS,EAAC,oCAAoC;AAC9C,IAAA,SAAA,EAAA,YAAA,CAAAC,MAAA,CAAsBR,IAAI,CAACS,WAAW,EAAE,CAAG;AAC3C,IAAA,aAAA,EAAA,YAAA,CAAAD,MAAA,CAA0BR,IAAI,CAACS,WAAW,EAAE,CAAG;IAC/CC,IAAI,EAAA,wBAAA,CAAAF,MAAA,CAA2BR,IAAI,CAACS,WAAW,EAAE,CAAG;AACpDE,IAAAA,GAAG,EAAC,YAAY;AAChBC,IAAAA,MAAM,EAAC,QAAA;AAAQ,GAAA,EACXf,UAAU,CAEdO,eAAAA,cAAA,CAAAC,aAAA,CAACQ,KAAK,EAAA;AACJC,IAAAA,OAAO,EAAC,gCAAgC;AACxCC,IAAAA,MAAM,EAAE;AAAEnB,MAAAA,WAAW,EAAEI,IAAAA;AAAK,KAAA;AAAE,GAC/B,CACA,CAAC,CAAA;AAER,CAAC,CAAA;AASD,YAAA,aAAeI,cAAK,CAACY,IAAI,CAACtB,QAAQ,CAAC;;;;"}
|
package/dist/cjs/MadeWith.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
6
7
|
var reactI18next = require('react-i18next');
|
|
7
8
|
var injectCss = require('./inject-css-80a5faa3.js');
|
|
8
9
|
|
|
@@ -19,7 +20,7 @@ var _excluded = ["productName"];
|
|
|
19
20
|
var MadeWith = function MadeWith(_ref) {
|
|
20
21
|
var productName = _ref.productName,
|
|
21
22
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
22
|
-
var name = productName || globalProps.appName;
|
|
23
|
+
var name = neetoCist.capitalize(productName || globalProps.appName);
|
|
23
24
|
return /*#__PURE__*/React__default["default"].createElement("a", _extends__default["default"]({
|
|
24
25
|
className: "neeto-molecules-made-with__wrapper",
|
|
25
26
|
"data-cy": "made-with-".concat(name.toLowerCase()),
|
package/dist/cjs/MadeWith.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MadeWith.js","sources":["../../src/components/MadeWith/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\n\nimport \"./made-with.scss\";\n\nconst MadeWith = ({ productName, ...otherProps }) => {\n const name = productName || globalProps.appName;\n\n return (\n <a\n className=\"neeto-molecules-made-with__wrapper\"\n data-cy={`made-with-${name.toLowerCase()}`}\n data-testid={`made-with-${name.toLowerCase()}`}\n href={`https://www.neeto.com/${name.toLowerCase()}`}\n rel=\"noreferrer\"\n target=\"_blank\"\n {...otherProps}\n >\n <Trans\n i18nKey=\"neetoMolecules.common.madeWith\"\n values={{ productName: name }}\n />\n </a>\n );\n};\n\nMadeWith.propTypes = {\n /**\n * Product name to be displayed on the component (optional).\n */\n productName: PropTypes.string,\n};\n\nexport default React.memo(MadeWith);\n"],"names":["MadeWith","_ref","productName","otherProps","_objectWithoutProperties","_excluded","name","globalProps","appName","React","createElement","_extends","className","concat","toLowerCase","href","rel","target","Trans","i18nKey","values","memo"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MadeWith.js","sources":["../../src/components/MadeWith/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { capitalize } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\n\nimport \"./made-with.scss\";\n\nconst MadeWith = ({ productName, ...otherProps }) => {\n const name = capitalize(productName || globalProps.appName);\n\n return (\n <a\n className=\"neeto-molecules-made-with__wrapper\"\n data-cy={`made-with-${name.toLowerCase()}`}\n data-testid={`made-with-${name.toLowerCase()}`}\n href={`https://www.neeto.com/${name.toLowerCase()}`}\n rel=\"noreferrer\"\n target=\"_blank\"\n {...otherProps}\n >\n <Trans\n i18nKey=\"neetoMolecules.common.madeWith\"\n values={{ productName: name }}\n />\n </a>\n );\n};\n\nMadeWith.propTypes = {\n /**\n * Product name to be displayed on the component (optional).\n */\n productName: PropTypes.string,\n};\n\nexport default React.memo(MadeWith);\n"],"names":["MadeWith","_ref","productName","otherProps","_objectWithoutProperties","_excluded","name","capitalize","globalProps","appName","React","createElement","_extends","className","concat","toLowerCase","href","rel","target","Trans","i18nKey","values","memo"],"mappings":";;;;;;;;;;;;;;;;;;;AAQA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAAuC;AAAA,EAAA,IAAjCC,WAAW,GAAAD,IAAA,CAAXC,WAAW;AAAKC,IAAAA,UAAU,GAAAC,4CAAA,CAAAH,IAAA,EAAAI,SAAA,CAAA,CAAA;EAC5C,IAAMC,IAAI,GAAGC,oBAAU,CAACL,WAAW,IAAIM,WAAW,CAACC,OAAO,CAAC,CAAA;AAE3D,EAAA,oBACEC,yBAAA,CAAAC,aAAA,CAAA,GAAA,EAAAC,4BAAA,CAAA;AACEC,IAAAA,SAAS,EAAC,oCAAoC;AAC9C,IAAA,SAAA,EAAA,YAAA,CAAAC,MAAA,CAAsBR,IAAI,CAACS,WAAW,EAAE,CAAG;AAC3C,IAAA,aAAA,EAAA,YAAA,CAAAD,MAAA,CAA0BR,IAAI,CAACS,WAAW,EAAE,CAAG;IAC/CC,IAAI,EAAA,wBAAA,CAAAF,MAAA,CAA2BR,IAAI,CAACS,WAAW,EAAE,CAAG;AACpDE,IAAAA,GAAG,EAAC,YAAY;AAChBC,IAAAA,MAAM,EAAC,QAAA;AAAQ,GAAA,EACXf,UAAU,CAEdO,eAAAA,yBAAA,CAAAC,aAAA,CAACQ,kBAAK,EAAA;AACJC,IAAAA,OAAO,EAAC,gCAAgC;AACxCC,IAAAA,MAAM,EAAE;AAAEnB,MAAAA,WAAW,EAAEI,IAAAA;AAAK,KAAA;AAAE,GAC/B,CACA,CAAC,CAAA;AAER,CAAC,CAAA;AASD,YAAA,aAAeI,yBAAK,CAACY,IAAI,CAACtB,QAAQ,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.10",
|
|
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/types/ProductEmbed.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
2
|
interface InlineProps {
|
|
4
3
|
label: string;
|
|
5
4
|
description: string;
|
|
@@ -7,7 +6,6 @@ interface InlineProps {
|
|
|
7
6
|
height?: number;
|
|
8
7
|
elementSelector?: string;
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
interface FloatingPopupProps {
|
|
12
10
|
label: string;
|
|
13
11
|
description: string;
|
|
@@ -18,19 +16,66 @@ interface FloatingPopupProps {
|
|
|
18
16
|
icon?: React.FC;
|
|
19
17
|
showIcon?: boolean;
|
|
20
18
|
}
|
|
21
|
-
|
|
22
19
|
interface ElementPopupProps {
|
|
23
20
|
label: string;
|
|
24
21
|
description: string;
|
|
25
22
|
elementSelector?: string;
|
|
26
23
|
}
|
|
27
|
-
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* A component to generate and display the embed code for a product, which can then
|
|
27
|
+
*
|
|
28
|
+
* be pasted into a host application where the product should be embedded. Please
|
|
29
|
+
*
|
|
30
|
+
* note that this component does not embed the product itself but provides the
|
|
31
|
+
*
|
|
32
|
+
* necessary code and a preview to facilitate embedding.
|
|
33
|
+
*
|
|
34
|
+
* Here’s how you can use the ProductEmbed component in your React application:
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
*
|
|
38
|
+
* import React from "react";
|
|
39
|
+
* import ProductEmbed from "@bigbinary/neeto-molecules/ProductEmbed";
|
|
40
|
+
*
|
|
41
|
+
* const EmbedPage = () => (
|
|
42
|
+
* <ProductEmbed
|
|
43
|
+
* id="123"
|
|
44
|
+
* goBackLink="/share"
|
|
45
|
+
* options={{
|
|
46
|
+
* inline: {
|
|
47
|
+
* label: "Inline",
|
|
48
|
+
* description: "An inline component",
|
|
49
|
+
* width: 90,
|
|
50
|
+
* height: 100,
|
|
51
|
+
* elementSelector: "#inline-embed",
|
|
52
|
+
* },
|
|
53
|
+
* floatingPopup: {
|
|
54
|
+
* label: "Floating Popup",
|
|
55
|
+
* description: "A floating popup",
|
|
56
|
+
* btnText: "Schedule meeting",
|
|
57
|
+
* showIcon: true,
|
|
58
|
+
* icon: Calendar,
|
|
59
|
+
* },
|
|
60
|
+
* elementPopup: {
|
|
61
|
+
* label: "Element Popup",
|
|
62
|
+
* description: "An element popup",
|
|
63
|
+
* elementSelector: "element-id",
|
|
64
|
+
* },
|
|
65
|
+
* }}
|
|
66
|
+
* isQueryParamsEnabled={true}
|
|
67
|
+
* />
|
|
68
|
+
* );
|
|
69
|
+
*
|
|
70
|
+
* export default EmbedPage;
|
|
71
|
+
* @endexample
|
|
72
|
+
*/
|
|
28
73
|
const ProductEmbed: React.FC<{
|
|
29
74
|
className?: string;
|
|
30
75
|
goBackLink?: string;
|
|
31
|
-
customEmbedScriptPath?: string
|
|
32
|
-
customPreviewIframeUrl?: string
|
|
33
|
-
extraArgs?: object
|
|
76
|
+
customEmbedScriptPath?: string;
|
|
77
|
+
customPreviewIframeUrl?: string;
|
|
78
|
+
extraArgs?: object;
|
|
34
79
|
id: string;
|
|
35
80
|
options?: {
|
|
36
81
|
inline?: InlineProps;
|
|
@@ -39,5 +84,4 @@ const ProductEmbed: React.FC<{
|
|
|
39
84
|
};
|
|
40
85
|
isQueryParamsEnabled?: boolean;
|
|
41
86
|
}>;
|
|
42
|
-
|
|
43
|
-
export default ProductEmbed;
|
|
87
|
+
export default ProductEmbed;
|