@bigbinary/neeto-molecules 5.3.14 → 5.3.16
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/ProductEmbed.js +15 -14
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +15 -14
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/v2/MadeWith.js +5 -3
- package/dist/cjs/v2/MadeWith.js.map +1 -1
- package/dist/cjs/v2/ProductEmbed.js +6 -5
- package/dist/cjs/v2/ProductEmbed.js.map +1 -1
- package/dist/v2/MadeWith.js +5 -3
- package/dist/v2/MadeWith.js.map +1 -1
- package/dist/v2/ProductEmbed.js +6 -5
- package/dist/v2/ProductEmbed.js.map +1 -1
- package/package.json +1 -1
package/dist/v2/MadeWith.js
CHANGED
|
@@ -2,6 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
import { Typography } from '@bigbinary/neeto-atoms';
|
|
5
|
+
import classnames from 'classnames';
|
|
5
6
|
import { capitalize } from '@bigbinary/neeto-cist';
|
|
6
7
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/v2/initializers';
|
|
7
8
|
import * as Icons from '@bigbinary/neeto-icons/logos';
|
|
@@ -10,24 +11,25 @@ import { u as uppercamelcase } from '../index-DF5MKxql.js';
|
|
|
10
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
12
|
import '../_commonjsHelpers-BFTU3MAI.js';
|
|
12
13
|
|
|
13
|
-
var _excluded = ["productName", "productIcon"];
|
|
14
|
+
var _excluded = ["productName", "productIcon", "className"];
|
|
14
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
17
|
var MadeWith = function MadeWith(_ref) {
|
|
17
18
|
var _globalProps$organiza;
|
|
18
19
|
var productName = _ref.productName,
|
|
19
20
|
ProductIcon = _ref.productIcon,
|
|
21
|
+
className = _ref.className,
|
|
20
22
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
23
|
var name = capitalize(productName || globalProps.appName || "Neeto");
|
|
22
24
|
var subdomain = (_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.subdomain;
|
|
23
25
|
var utmParams = "utm_source=madewith".concat(subdomain ? "&utm_campaign=".concat(subdomain) : "");
|
|
24
26
|
var IconComponent = ProductIcon || Icons[uppercamelcase(name)];
|
|
25
27
|
return /*#__PURE__*/jsxs("a", _objectSpread(_objectSpread({
|
|
26
|
-
className: "bg-background text-foreground border-border hover:ring-border inline-flex items-center gap-1.5 rounded-md border px-2 py-1.5 text-sm font-normal no-underline transition-all duration-300 select-none hover:ring-1 hover:ring-inset motion-reduce:transition-none",
|
|
27
28
|
"data-testid": "made-with-".concat(name.toLowerCase()),
|
|
28
29
|
href: "https://www.neeto.com/".concat(name.toLowerCase(), "?").concat(utmParams),
|
|
29
30
|
rel: "noreferrer",
|
|
30
|
-
target: "_blank"
|
|
31
|
+
target: "_blank",
|
|
32
|
+
className: classnames("neeto-molecules-made-with__wrapper", "bg-background text-foreground border-border hover:ring-border inline-flex items-center gap-1.5 rounded-md border px-2 py-1.5 text-sm font-normal no-underline transition-all duration-300 select-none hover:ring-1 hover:ring-inset motion-reduce:transition-none", className)
|
|
31
33
|
}, otherProps), {}, {
|
|
32
34
|
children: [IconComponent && /*#__PURE__*/jsx("span", {
|
|
33
35
|
"data-testid": "made-with-".concat(name.toLowerCase(), "-icon"),
|
package/dist/v2/MadeWith.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MadeWith.js","sources":["../../src/v2/components/MadeWith/index.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport { capitalize } from \"neetocist\";\nimport { globalProps } from \"neetocommons/v2/initializers\";\nimport * as Icons from \"neetoicons/logos\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\nimport uppercamelcase from \"uppercamelcase\";\n\nconst MadeWith = ({
|
|
1
|
+
{"version":3,"file":"MadeWith.js","sources":["../../src/v2/components/MadeWith/index.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { capitalize } from \"neetocist\";\nimport { globalProps } from \"neetocommons/v2/initializers\";\nimport * as Icons from \"neetoicons/logos\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\nimport uppercamelcase from \"uppercamelcase\";\n\nconst MadeWith = ({\n productName,\n productIcon: ProductIcon,\n className,\n ...otherProps\n}) => {\n const name = capitalize(productName || globalProps.appName || \"Neeto\");\n const subdomain = globalProps.organization?.subdomain;\n const utmParams = `utm_source=madewith${\n subdomain ? `&utm_campaign=${subdomain}` : \"\"\n }`;\n\n const IconComponent = ProductIcon || Icons[uppercamelcase(name)];\n\n return (\n <a\n data-testid={`made-with-${name.toLowerCase()}`}\n href={`https://www.neeto.com/${name.toLowerCase()}?${utmParams}`}\n rel=\"noreferrer\"\n target=\"_blank\"\n className={classnames(\n \"neeto-molecules-made-with__wrapper\",\n \"bg-background text-foreground border-border hover:ring-border inline-flex items-center gap-1.5 rounded-md border px-2 py-1.5 text-sm font-normal no-underline transition-all duration-300 select-none hover:ring-1 hover:ring-inset motion-reduce:transition-none\",\n className\n )}\n {...otherProps}\n >\n {IconComponent && (\n <span data-testid={`made-with-${name.toLowerCase()}-icon`}>\n <IconComponent size={14} />\n </span>\n )}\n <Typography className=\"leading-snug\" variant=\"body2\">\n <Trans\n i18nKey=\"neetoMolecules.common.madeWith\"\n values={{ productName: name }}\n />\n </Typography>\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 /**\n * Product icon component to be displayed on the badge (optional).\n */\n productIcon: PropTypes.elementType,\n\n /**\n * Additional class names to merge onto the badge root (optional).\n */\n className: PropTypes.string,\n};\n\nexport default memo(MadeWith);\n"],"names":["MadeWith","_ref","_globalProps$organiza","productName","ProductIcon","productIcon","className","otherProps","_objectWithoutProperties","_excluded","name","capitalize","globalProps","appName","subdomain","organization","utmParams","concat","IconComponent","Icons","uppercamelcase","_jsxs","_objectSpread","toLowerCase","href","rel","target","classnames","children","_jsx","size","Typography","variant","Trans","i18nKey","values","memo"],"mappings":";;;;;;;;;;;;;;;;AAWA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAKR;AAAA,EAAA,IAAAC,qBAAA;AAAA,EAAA,IAJJC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACEC,WAAW,GAAAH,IAAA,CAAxBI,WAAW;IACXC,SAAS,GAAAL,IAAA,CAATK,SAAS;AACNC,IAAAA,UAAU,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA;EAEb,IAAMC,IAAI,GAAGC,UAAU,CAACR,WAAW,IAAIS,WAAW,CAACC,OAAO,IAAI,OAAO,CAAC;AACtE,EAAA,IAAMC,SAAS,GAAA,CAAAZ,qBAAA,GAAGU,WAAW,CAACG,YAAY,MAAA,IAAA,IAAAb,qBAAA,KAAA,MAAA,GAAA,MAAA,GAAxBA,qBAAA,CAA0BY,S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;AAmBD,YAAA,aAAe0B,IAAI,CAACpC,QAAQ,CAAC;;;;"}
|
package/dist/v2/ProductEmbed.js
CHANGED
|
@@ -3,21 +3,21 @@ import { useEffect, useState, useMemo, useRef, createElement } from 'react';
|
|
|
3
3
|
import { isPresent, filterBy, hyphenate, noop } from '@bigbinary/neeto-cist';
|
|
4
4
|
import { useLocation, useHistory } from 'react-router-dom';
|
|
5
5
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
|
-
import
|
|
6
|
+
import { t } from 'i18next';
|
|
7
7
|
import { Label, Input, Button, Select, ColorPicker, Checkbox, Switch, Typography, Spinner, Callout } from '@bigbinary/neeto-atoms';
|
|
8
|
-
import classnames from 'classnames';
|
|
9
|
-
import { toPairs, mergeDeepLeft, isEmpty, mergeLeft } from 'ramda';
|
|
10
8
|
import { useTranslation } from 'react-i18next';
|
|
11
|
-
import { t } from 'i18next';
|
|
12
9
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
13
10
|
import HelpPopover from './HelpPopover.js';
|
|
14
11
|
import { withImmutableActions, handleMetaClick } from '@bigbinary/neeto-commons-frontend/v2/react-utils';
|
|
15
12
|
import { create } from 'zustand';
|
|
13
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
16
14
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
15
|
+
import { toPairs, mergeDeepLeft, isEmpty, mergeLeft } from 'ramda';
|
|
17
16
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
18
17
|
import { T as Trash2 } from '../trash-2-hGkzsa87.js';
|
|
19
18
|
import { P as Plus } from '../plus-Bnd2C3yl.js';
|
|
20
19
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
20
|
+
import classnames from 'classnames';
|
|
21
21
|
import Codeblock from './Codeblock.js';
|
|
22
22
|
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/v2/initializers';
|
|
23
23
|
import BrowserPreview from './BrowserPreview.js';
|
|
@@ -1854,7 +1854,8 @@ var ProductEmbed = function ProductEmbed(_ref) {
|
|
|
1854
1854
|
var _useLocation = useLocation(),
|
|
1855
1855
|
search = _useLocation.search;
|
|
1856
1856
|
var queryParams = new URLSearchParams(search);
|
|
1857
|
-
var
|
|
1857
|
+
var typeFromQueryParams = toCamelCasedString(queryParams.get("type"));
|
|
1858
|
+
var selectedEmbed = Object.values(EMBED_OPTIONS).includes(typeFromQueryParams) && Object.keys(options).includes(typeFromQueryParams) ? typeFromQueryParams : undefined;
|
|
1858
1859
|
var _useProductEmbedStore = useProductEmbedStore(useShallow(function (store) {
|
|
1859
1860
|
return {
|
|
1860
1861
|
setProductEmbedState: store["setProductEmbedState"]
|