@bigbinary/neeto-molecules 4.1.39 → 4.1.40
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/FloatingActionMenu.js +75 -47
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/SubscriptionUpgradeRequestModal.js +92 -0
- package/dist/SubscriptionUpgradeRequestModal.js.map +1 -0
- package/dist/cjs/FloatingActionMenu.js +75 -47
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/SubscriptionUpgradeRequestModal.js +94 -0
- package/dist/cjs/SubscriptionUpgradeRequestModal.js.map +1 -0
- package/package.json +1 -1
- package/src/translations/en.json +7 -0
- package/types/FloatingActionMenu.d.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionUpgradeRequestModal.js","sources":["../../src/components/SubscriptionUpgradeRequestModal/apis/subscription_request.js","../../src/components/SubscriptionUpgradeRequestModal/useSubscriptionRequestApi.js","../../src/components/SubscriptionUpgradeRequestModal/index.jsx"],"sourcesContent":["import axios from \"axios\";\n\nconst create = () => axios.post(\"/neeto_sso/api/v1/subscription_request\");\n\nconst subscriptionRequestApi = { create };\n\nexport default subscriptionRequestApi;\n","import { useMutation } from \"@tanstack/react-query\";\n\nimport subscriptionRequestApi from \"./apis/subscription_request\";\n\nconst useCreateSubscriptionRequest = ({ onSuccess } = {}) =>\n useMutation({\n mutationFn: subscriptionRequestApi.create,\n onSuccess,\n });\n\nexport { useCreateSubscriptionRequest };\n","import { globalProps } from \"neetocommons/initializers\";\nimport { Button, Modal, Typography } from \"neetoui\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { useCreateSubscriptionRequest } from \"./useSubscriptionRequestApi\";\n\nconst SubscriptionUpgradeRequestModal = ({ isOpen, onClose }) => {\n const { t } = useTranslation();\n\n const pricingPageUrl = `https://neeto.com/${globalProps.appName?.toLowerCase()}/pricing`;\n\n const { mutate: sendRequest, isPending } = useCreateSubscriptionRequest({\n onSuccess: onClose,\n });\n\n return (\n <Modal\n {...{ isOpen, onClose }}\n closeOnEsc={!isPending}\n closeOnOutsideClick={!isPending}\n >\n <Modal.Header>\n <Typography style=\"h3\" weight=\"semibold\">\n {t(\"neetoMolecules.subscriptionRequest.title\")}\n </Typography>\n </Modal.Header>\n <Modal.Body>\n <Typography style=\"body2\">\n <Trans\n components={{ strong: <strong /> }}\n i18nKey=\"neetoMolecules.subscriptionRequest.description\"\n />\n </Typography>\n <Typography className=\"mt-3\" style=\"body2\">\n <Trans\n i18nKey=\"neetoMolecules.subscriptionRequest.pricingInfo\"\n components={{\n pricingLink: (\n <a\n className=\"neeto-ui-text-primary-500\"\n href={pricingPageUrl}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n />\n ),\n }}\n />\n </Typography>\n </Modal.Body>\n <Modal.Footer className=\"flex gap-x-2\">\n <Button\n disabled={isPending}\n label={t(\"neetoMolecules.subscriptionRequest.cancel\")}\n style=\"secondary\"\n onClick={onClose}\n />\n <Button\n disabled={isPending}\n label={t(\"neetoMolecules.subscriptionRequest.sendRequest\")}\n loading={isPending}\n style=\"primary\"\n onClick={sendRequest}\n />\n </Modal.Footer>\n </Modal>\n );\n};\n\nexport default SubscriptionUpgradeRequestModal;\n"],"names":["create","axios","post","subscriptionRequestApi","useCreateSubscriptionRequest","_ref","arguments","length","undefined","onSuccess","useMutation","mutationFn","SubscriptionUpgradeRequestModal","_globalProps$appName","isOpen","onClose","_useTranslation","useTranslation","t","pricingPageUrl","concat","globalProps","appName","toLowerCase","_useCreateSubscriptio","sendRequest","mutate","isPending","_jsxs","Modal","closeOnEsc","closeOnOutsideClick","children","_jsx","Header","Typography","style","weight","Body","Trans","components","strong","i18nKey","className","pricingLink","href","rel","target","Footer","Button","disabled","label","onClick","loading"],"mappings":";;;;;;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAMA,GAAA;AAAA,EAAA,OAASC,KAAK,CAAC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C,CAAC,CAAC,2CAA2C,CAAE;AACtDkB,QAAAA,KAAK,EAAC,WAAW;AACjBgB,QAAAA,OAAO,EAAErC;AAAQ,OAClB,CAAC,eACFkB,cAAA,CAACgB,MAAM,EAAA;AACLC,QAAAA,QAAQ,EAAEvB,SAAU;AACpBwB,QAAAA,KAAK,EAAEjC,CAAC,CAAC,gDAAgD,CAAE;AAC3DmC,QAAAA,OAAO,EAAE1B,SAAU;AACnBS,QAAAA,KAAK,EAAC,SAAS;AACfgB,QAAAA,OAAO,EAAE3B;AAAY,OACtB,CAAC;AAAA,KACU,CAAC;AAAA,GACV,CAAC;AAEZ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.40",
|
|
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
|
@@ -789,6 +789,13 @@
|
|
|
789
789
|
"menuAriaLabel": "More options",
|
|
790
790
|
"submenuAriaLabel": "{{label}} submenu"
|
|
791
791
|
},
|
|
792
|
+
"subscriptionRequest": {
|
|
793
|
+
"title": "Upgrade to pro plan",
|
|
794
|
+
"description": "You are requesting an upgrade to the <strong>Pro plan</strong>. We'll notify the workspace owner for approval.",
|
|
795
|
+
"pricingInfo": "Want to know more about the Pro plan features? Check out our <pricingLink>pricing page</pricingLink>.",
|
|
796
|
+
"sendRequest": "Send request",
|
|
797
|
+
"cancel": "Cancel"
|
|
798
|
+
},
|
|
792
799
|
"productEmbed": {
|
|
793
800
|
"title": "Embed",
|
|
794
801
|
"embedSelectionTitle": "How do you want to add {{productName, anyCase}} to your site?",
|