@bigbinary/neeto-molecules 5.1.24 → 5.1.26
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/arrow-left-B-s28MD1.js +18 -0
- package/dist/arrow-left-B-s28MD1.js.map +1 -0
- package/dist/cjs/arrow-left-gtCwH31u.js +20 -0
- package/dist/cjs/arrow-left-gtCwH31u.js.map +1 -0
- package/dist/cjs/v2/ImageWithFallback.js +51 -0
- package/dist/cjs/v2/ImageWithFallback.js.map +1 -0
- package/dist/cjs/v2/ProductEmbed.js +4 -17
- package/dist/cjs/v2/ProductEmbed.js.map +1 -1
- package/dist/cjs/v2/ShareRecordingPane.js +305 -0
- package/dist/cjs/v2/ShareRecordingPane.js.map +1 -0
- package/dist/cjs/v2/ShareViaEmail.js +387 -0
- package/dist/cjs/v2/ShareViaEmail.js.map +1 -0
- package/dist/cjs/v2/StatusDropdown.js +161 -0
- package/dist/cjs/v2/StatusDropdown.js.map +1 -0
- package/dist/cjs/v2/SubscriptionNotificationsContainer.js +72 -0
- package/dist/cjs/v2/SubscriptionNotificationsContainer.js.map +1 -0
- package/dist/cjs/v2/SubscriptionUpgradeRequestModal.js +90 -0
- package/dist/cjs/v2/SubscriptionUpgradeRequestModal.js.map +1 -0
- package/dist/cjs/v2/SuffixedInput.js +130 -0
- package/dist/cjs/v2/SuffixedInput.js.map +1 -0
- package/dist/cjs/v2/TimezoneMismatchModal.js +136 -0
- package/dist/cjs/v2/TimezoneMismatchModal.js.map +1 -0
- package/dist/cjs/v2/VersionHistory.js +210 -0
- package/dist/cjs/v2/VersionHistory.js.map +1 -0
- package/dist/v2/ImageWithFallback.js +49 -0
- package/dist/v2/ImageWithFallback.js.map +1 -0
- package/dist/v2/ProductEmbed.js +2 -15
- package/dist/v2/ProductEmbed.js.map +1 -1
- package/dist/v2/ShareRecordingPane.js +303 -0
- package/dist/v2/ShareRecordingPane.js.map +1 -0
- package/dist/v2/ShareViaEmail.js +366 -0
- package/dist/v2/ShareViaEmail.js.map +1 -0
- package/dist/v2/StatusDropdown.js +159 -0
- package/dist/v2/StatusDropdown.js.map +1 -0
- package/dist/v2/SubscriptionNotificationsContainer.js +70 -0
- package/dist/v2/SubscriptionNotificationsContainer.js.map +1 -0
- package/dist/v2/SubscriptionUpgradeRequestModal.js +88 -0
- package/dist/v2/SubscriptionUpgradeRequestModal.js.map +1 -0
- package/dist/v2/SuffixedInput.js +128 -0
- package/dist/v2/SuffixedInput.js.map +1 -0
- package/dist/v2/TimezoneMismatchModal.js +134 -0
- package/dist/v2/TimezoneMismatchModal.js.map +1 -0
- package/dist/v2/VersionHistory.js +208 -0
- package/dist/v2/VersionHistory.js.map +1 -0
- package/package.json +1 -1
- package/src/translations/ar.json +10 -3
- package/src/translations/bg.json +10 -3
- package/src/translations/ca.json +10 -3
- package/src/translations/cs.json +10 -3
- package/src/translations/da.json +10 -3
- package/src/translations/de.json +10 -3
- package/src/translations/es-MX.json +10 -3
- package/src/translations/es.json +10 -3
- package/src/translations/et.json +10 -3
- package/src/translations/fi.json +10 -3
- package/src/translations/fil.json +10 -3
- package/src/translations/fr.json +10 -3
- package/src/translations/he.json +10 -3
- package/src/translations/hi.json +10 -3
- package/src/translations/hr.json +10 -3
- package/src/translations/hu.json +10 -3
- package/src/translations/id.json +10 -3
- package/src/translations/it.json +10 -3
- package/src/translations/ja.json +9 -2
- package/src/translations/ko.json +9 -2
- package/src/translations/nl.json +10 -3
- package/src/translations/pl.json +10 -3
- package/src/translations/pt-BR.json +10 -3
- package/src/translations/pt.json +10 -3
- package/src/translations/ro.json +10 -3
- package/src/translations/ru.json +10 -3
- package/src/translations/sk.json +10 -3
- package/src/translations/sl.json +10 -3
- package/src/translations/sv.json +10 -3
- package/src/translations/th.json +9 -2
- package/src/translations/tr.json +10 -3
- package/src/translations/uk.json +10 -3
- package/src/translations/vi.json +10 -3
- package/src/translations/zh-CN.json +10 -3
- package/src/translations/zh-TW.json +10 -3
- package/types/v2/ImageWithFallback.d.ts +9 -0
- package/types/v2/ShareRecordingPane.d.ts +16 -0
- package/types/v2/ShareViaEmail.d.ts +34 -0
- package/types/v2/StatusDropdown.d.ts +16 -0
- package/types/v2/SubscriptionNotificationsContainer.d.ts +5 -0
- package/types/v2/SubscriptionUpgradeRequestModal.d.ts +8 -0
- package/types/v2/SuffixedInput.d.ts +16 -0
- package/types/v2/TimezoneMismatchModal.d.ts +8 -0
- package/types/v2/VersionHistory.d.ts +44 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Callout, Typography, Button } from '@bigbinary/neeto-atoms';
|
|
2
|
+
import { filterBy } from '@bigbinary/neeto-cist';
|
|
3
|
+
import { dateFormat } from '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
4
|
+
import { Trans } from 'react-i18next';
|
|
5
|
+
import { useQuery } from '@tanstack/react-query';
|
|
6
|
+
import axios from 'axios';
|
|
7
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var QUERY_KEYS = {
|
|
10
|
+
SUBSCRIPTIONS_LIST: "SUBSCRIPTIONS_LIST"
|
|
11
|
+
};
|
|
12
|
+
var SUBSCRIPTION_STATUS = {
|
|
13
|
+
past_due: "past_due"
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
var fetchSubscriptions = function fetchSubscriptions() {
|
|
17
|
+
return axios.get("neeto_sso/api/v1/server/subscriptions");
|
|
18
|
+
};
|
|
19
|
+
var subscriptionsApi = {
|
|
20
|
+
fetchSubscriptions: fetchSubscriptions
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var SUBSCRIPTIONS_LIST = QUERY_KEYS.SUBSCRIPTIONS_LIST;
|
|
24
|
+
var useFetchSubscriptions = function useFetchSubscriptions() {
|
|
25
|
+
return useQuery({
|
|
26
|
+
queryKey: [SUBSCRIPTIONS_LIST],
|
|
27
|
+
queryFn: subscriptionsApi.fetchSubscriptions
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var SubscriptionNotificationsContainer = function SubscriptionNotificationsContainer() {
|
|
32
|
+
var _data$clientAppSubscr;
|
|
33
|
+
var _useFetchSubscription = useFetchSubscriptions(),
|
|
34
|
+
data = _useFetchSubscription.data;
|
|
35
|
+
var clientAppSubscriptions = (_data$clientAppSubscr = data === null || data === void 0 ? void 0 : data.clientAppSubscriptions) !== null && _data$clientAppSubscr !== void 0 ? _data$clientAppSubscr : [];
|
|
36
|
+
var visibleNotifications = filterBy({
|
|
37
|
+
status: SUBSCRIPTION_STATUS.past_due
|
|
38
|
+
}, clientAppSubscriptions);
|
|
39
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
40
|
+
children: visibleNotifications.map(function (_ref, index) {
|
|
41
|
+
var downgradeScheduledAt = _ref.downgradeScheduledAt,
|
|
42
|
+
customerPortalUrl = _ref.customerPortalUrl;
|
|
43
|
+
return /*#__PURE__*/jsx(Callout, {
|
|
44
|
+
className: "w-full rounded-none p-2.5",
|
|
45
|
+
"data-testid": "subscription-notifications",
|
|
46
|
+
variant: "warning",
|
|
47
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
48
|
+
variant: "body2",
|
|
49
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
50
|
+
i18nKey: "neetoMolecules.subscription.paymentFailedNotification",
|
|
51
|
+
components: {
|
|
52
|
+
a: /*#__PURE__*/jsx(Button, {
|
|
53
|
+
href: customerPortalUrl,
|
|
54
|
+
rel: "noreferrer",
|
|
55
|
+
target: "_blank",
|
|
56
|
+
variant: "link"
|
|
57
|
+
})
|
|
58
|
+
},
|
|
59
|
+
values: {
|
|
60
|
+
downgradeScheduledAt: dateFormat.date(downgradeScheduledAt)
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
}, index);
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export { SubscriptionNotificationsContainer as default };
|
|
70
|
+
//# sourceMappingURL=SubscriptionNotificationsContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionNotificationsContainer.js","sources":["../../src/v2/components/SubscriptionNotificationsContainer/constants.js","../../src/v2/components/SubscriptionNotificationsContainer/api.js","../../src/v2/components/SubscriptionNotificationsContainer/useSubscriptionsApi.js","../../src/v2/components/SubscriptionNotificationsContainer/index.jsx"],"sourcesContent":["export const QUERY_KEYS = {\n SUBSCRIPTIONS_LIST: \"SUBSCRIPTIONS_LIST\",\n};\n\nexport const SUBSCRIPTION_STATUS = { past_due: \"past_due\" };\n","import axios from \"axios\";\n\nconst fetchSubscriptions = () =>\n axios.get(\"neeto_sso/api/v1/server/subscriptions\");\n\nconst subscriptionsApi = { fetchSubscriptions };\n\nexport default subscriptionsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport subscriptionsApi from \"./api\";\nimport { QUERY_KEYS } from \"./constants\";\n\nconst { SUBSCRIPTIONS_LIST } = QUERY_KEYS;\n\nconst useFetchSubscriptions = () =>\n useQuery({\n queryKey: [SUBSCRIPTIONS_LIST],\n queryFn: subscriptionsApi.fetchSubscriptions,\n });\n\nexport { useFetchSubscriptions };\n","import { Callout, Typography, Button } from \"@bigbinary/neeto-atoms\";\nimport { filterBy } from \"neetocist\";\nimport { dateFormat } from \"neetocommons/v2/utils\";\nimport { Trans } from \"react-i18next\";\n\nimport { SUBSCRIPTION_STATUS } from \"./constants\";\nimport { useFetchSubscriptions } from \"./useSubscriptionsApi\";\n\nconst SubscriptionNotificationsContainer = () => {\n const { data } = useFetchSubscriptions();\n const clientAppSubscriptions = data?.clientAppSubscriptions ?? [];\n\n const visibleNotifications = filterBy(\n { status: SUBSCRIPTION_STATUS.past_due },\n clientAppSubscriptions\n );\n\n return (\n <>\n {visibleNotifications.map(\n ({ downgradeScheduledAt, customerPortalUrl }, index) => (\n <Callout\n className=\"w-full rounded-none p-2.5\"\n data-testid=\"subscription-notifications\"\n key={index}\n variant=\"warning\"\n >\n <Typography variant=\"body2\">\n <Trans\n i18nKey=\"neetoMolecules.subscription.paymentFailedNotification\"\n components={{\n a: (\n <Button\n href={customerPortalUrl}\n rel=\"noreferrer\"\n target=\"_blank\"\n variant=\"link\"\n />\n ),\n }}\n values={{\n downgradeScheduledAt: dateFormat.date(downgradeScheduledAt),\n }}\n />\n </Typography>\n </Callout>\n )\n )}\n </>\n );\n};\n\nexport default SubscriptionNotificationsContainer;\n"],"names":["QUERY_KEYS","SUBSCRIPTIONS_LIST","SUBSCRIPTION_STATUS","past_due","fetchSubscriptions","axios","get","subscriptionsApi","useFetchSubscriptions","useQuery","queryKey","queryFn","SubscriptionNotificationsContainer","_data$clientAppSubscr","_useFetchSubscription","data","clientAppSubscriptions","visibleNotifications","filterBy","status","_jsx","_Fragment","children","map","_ref","index","downgradeScheduledAt","customerPortalUrl","Callout","className","variant","Typography","Trans","i18nKey","components","a","Button","href","rel","target","values","dateFormat","date"],"mappings":";;;;;;;;AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,kBAAkB,EAAE;AACtB,CAAC;AAEM,IAAMC,mBAAmB,GAAG;AAAEC,EAAAA,QAAQ,EAAE;AAAW,CAAC;;ACF3D,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,GAAA;AAAA,EAAA,OACtBC,KAAK,CAACC,GAAG,CAAC,uCAAuC,CAAC;AAAA,CAAA;AAEpD,IAAMC,gBAAgB,GAAG;AAAEH,EAAAA,kBAAkB,EAAlBA;AAAmB,CAAC;;ACA/C,IAAQH,kBAAkB,GAAKD,UAAU,CAAjCC,kBAAkB;AAE1B,IAAMO,qBAAqB,GAAG,SAAxBA,qBAAqBA,GAAA;AAAA,EAAA,OACzBC,QAAQ,CAAC;IACPC,QAAQ,EAAE,CAACT,kBAAkB,CAAC;IAC9BU,OAAO,EAAEJ,gBAAgB,CAACH;AAC5B,GAAC,CAAC;AAAA,CAAA;;ACHJ,IAAMQ,kCAAkC,GAAG,SAArCA,kCAAkCA,GAAS;AAAA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;WACD;SACS;AAAC,OAAA,EApBRD,KAqBE,CAAC;IAAA,CAEd;AAAC,GACD,CAAC;AAEP;;;;"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Dialog, Typography, Button } from '@bigbinary/neeto-atoms';
|
|
2
|
+
import { globalProps } from '@bigbinary/neeto-commons-frontend/v2/initializers';
|
|
3
|
+
import { useTranslation, Trans } from 'react-i18next';
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import axios from 'axios';
|
|
6
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var create = function create() {
|
|
9
|
+
return axios.post("/neeto_sso/api/v1/subscription_request");
|
|
10
|
+
};
|
|
11
|
+
var subscriptionRequestApi = {
|
|
12
|
+
create: create
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
var useCreateSubscriptionRequest = function useCreateSubscriptionRequest() {
|
|
16
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
17
|
+
onSuccess = _ref.onSuccess;
|
|
18
|
+
return useMutation({
|
|
19
|
+
mutationFn: subscriptionRequestApi.create,
|
|
20
|
+
onSuccess: onSuccess
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var SubscriptionUpgradeRequestModal = function SubscriptionUpgradeRequestModal(_ref) {
|
|
25
|
+
var _globalProps$appName;
|
|
26
|
+
var isOpen = _ref.isOpen,
|
|
27
|
+
onClose = _ref.onClose;
|
|
28
|
+
var _useTranslation = useTranslation(),
|
|
29
|
+
t = _useTranslation.t;
|
|
30
|
+
var pricingPageUrl = "https://neeto.com/".concat((_globalProps$appName = globalProps.appName) === null || _globalProps$appName === void 0 ? void 0 : _globalProps$appName.toLowerCase(), "/pricing");
|
|
31
|
+
var _useCreateSubscriptio = useCreateSubscriptionRequest({
|
|
32
|
+
onSuccess: onClose
|
|
33
|
+
}),
|
|
34
|
+
sendRequest = _useCreateSubscriptio.mutate,
|
|
35
|
+
isPending = _useCreateSubscriptio.isPending;
|
|
36
|
+
return /*#__PURE__*/jsxs(Dialog, {
|
|
37
|
+
isOpen: isOpen,
|
|
38
|
+
onClose: onClose,
|
|
39
|
+
"aria-describedby": undefined,
|
|
40
|
+
closeOnEsc: !isPending,
|
|
41
|
+
closeOnOutsideClick: !isPending,
|
|
42
|
+
children: [/*#__PURE__*/jsx(Dialog.Header, {
|
|
43
|
+
children: /*#__PURE__*/jsx(Dialog.Title, {
|
|
44
|
+
children: t("neetoMolecules.subscriptionRequest.title")
|
|
45
|
+
})
|
|
46
|
+
}), /*#__PURE__*/jsxs(Dialog.Body, {
|
|
47
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
48
|
+
variant: "body2",
|
|
49
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
50
|
+
components: {
|
|
51
|
+
strong: /*#__PURE__*/jsx("strong", {})
|
|
52
|
+
},
|
|
53
|
+
i18nKey: "neetoMolecules.subscriptionRequest.description"
|
|
54
|
+
})
|
|
55
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
56
|
+
className: "mt-3",
|
|
57
|
+
variant: "body2",
|
|
58
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
59
|
+
i18nKey: "neetoMolecules.subscriptionRequest.pricingInfo",
|
|
60
|
+
components: {
|
|
61
|
+
pricingLink: /*#__PURE__*/jsx("a", {
|
|
62
|
+
className: "text-primary",
|
|
63
|
+
href: pricingPageUrl,
|
|
64
|
+
rel: "noopener noreferrer",
|
|
65
|
+
target: "_blank"
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
})]
|
|
70
|
+
}), /*#__PURE__*/jsxs(Dialog.Footer, {
|
|
71
|
+
className: "flex gap-x-2",
|
|
72
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
73
|
+
disabled: isPending,
|
|
74
|
+
label: t("neetoMolecules.subscriptionRequest.cancel"),
|
|
75
|
+
variant: "secondary",
|
|
76
|
+
onClick: onClose
|
|
77
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
78
|
+
disabled: isPending,
|
|
79
|
+
label: t("neetoMolecules.subscriptionRequest.sendRequest"),
|
|
80
|
+
loading: isPending,
|
|
81
|
+
onClick: sendRequest
|
|
82
|
+
})]
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export { SubscriptionUpgradeRequestModal as default };
|
|
88
|
+
//# sourceMappingURL=SubscriptionUpgradeRequestModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubscriptionUpgradeRequestModal.js","sources":["../../src/v2/components/SubscriptionUpgradeRequestModal/apis/subscription_request.js","../../src/v2/components/SubscriptionUpgradeRequestModal/useSubscriptionRequestApi.js","../../src/v2/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 { Button, Dialog, Typography } from \"@bigbinary/neeto-atoms\";\nimport { globalProps } from \"neetocommons/v2/initializers\";\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 <Dialog\n {...{ isOpen, onClose }}\n aria-describedby={undefined}\n closeOnEsc={!isPending}\n closeOnOutsideClick={!isPending}\n >\n <Dialog.Header>\n <Dialog.Title>\n {t(\"neetoMolecules.subscriptionRequest.title\")}\n </Dialog.Title>\n </Dialog.Header>\n <Dialog.Body>\n <Typography variant=\"body2\">\n <Trans\n components={{ strong: <strong /> }}\n i18nKey=\"neetoMolecules.subscriptionRequest.description\"\n />\n </Typography>\n <Typography className=\"mt-3\" variant=\"body2\">\n <Trans\n i18nKey=\"neetoMolecules.subscriptionRequest.pricingInfo\"\n components={{\n pricingLink: (\n <a\n className=\"text-primary\"\n href={pricingPageUrl}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n />\n ),\n }}\n />\n </Typography>\n </Dialog.Body>\n <Dialog.Footer className=\"flex gap-x-2\">\n <Button\n disabled={isPending}\n label={t(\"neetoMolecules.subscriptionRequest.cancel\")}\n variant=\"secondary\"\n onClick={onClose}\n />\n <Button\n disabled={isPending}\n label={t(\"neetoMolecules.subscriptionRequest.sendRequest\")}\n loading={isPending}\n onClick={sendRequest}\n />\n </Dialog.Footer>\n </Dialog>\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","Dialog","closeOnEsc","closeOnOutsideClick","children","_jsx","Header","Title","Body","Typography","variant","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,CAACC,IAAI,CAAC,wCAAwC,CAAC;AAAA,CAAA;AAEzE,IAAMC,sBAAsB,GAAG;AAAEH,EAAAA,MAAM,EAANA;AAAO,CAAC;;ACAzC,IAAMI,4BAA4B,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QAAAA,QAAQ,EAAEvB,SAAU;AACpBwB,QAAAA,KAAK,EAAEjC,CAAC,CAAC,gDAAgD,CAAE;AAC3DmC,QAAAA,OAAO,EAAE1B,SAAU;AACnByB,QAAAA,OAAO,EAAE3B;AAAY,OACtB,CAAC;AAAA,KACW,CAAC;AAAA,GACV,CAAC;AAEb;;;;"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
|
+
import { useState, useRef, useEffect } from 'react';
|
|
4
|
+
import { Tooltip } from '@bigbinary/neeto-atoms';
|
|
5
|
+
import { Input } from '@bigbinary/neeto-atoms/formik';
|
|
6
|
+
import { isPresent, isNotPresent } from '@bigbinary/neeto-cist';
|
|
7
|
+
import { isEmpty } from 'ramda';
|
|
8
|
+
import CopyToClipboardButton from './CopyToClipboardButton.js';
|
|
9
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
import { c as createLucideIcon } from '../createLucideIcon-mNMhCCpf.js';
|
|
11
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
12
|
+
import 'classnames';
|
|
13
|
+
import '@bigbinary/neeto-commons-frontend/v2/utils/general';
|
|
14
|
+
import 'react-i18next';
|
|
15
|
+
import '../check-DvxzqR83.js';
|
|
16
|
+
import '../copy-DhbOoOav.js';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @license lucide-react v1.7.0 - ISC
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the ISC license.
|
|
22
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
const __iconNode = [
|
|
27
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
28
|
+
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
29
|
+
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
30
|
+
];
|
|
31
|
+
const Info = createLucideIcon("info", __iconNode);
|
|
32
|
+
|
|
33
|
+
var INPUT_FIELD_MIN_WIDTH = 60;
|
|
34
|
+
|
|
35
|
+
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; }
|
|
36
|
+
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; }
|
|
37
|
+
var SuffixedInput = function SuffixedInput(_ref) {
|
|
38
|
+
var _placeholderRef$curre2, _placeholderRef$curre3;
|
|
39
|
+
var placeholder = _ref.placeholder,
|
|
40
|
+
helpUrl = _ref.helpUrl,
|
|
41
|
+
helpIconTooltipContent = _ref.helpIconTooltipContent,
|
|
42
|
+
label = _ref.label,
|
|
43
|
+
value = _ref.value,
|
|
44
|
+
getInputRef = _ref.getInputRef,
|
|
45
|
+
suffix = _ref.suffix,
|
|
46
|
+
_ref$isCopyToClipboar = _ref.isCopyToClipboardEnabled,
|
|
47
|
+
isCopyToClipboardEnabled = _ref$isCopyToClipboar === void 0 ? false : _ref$isCopyToClipboar,
|
|
48
|
+
_ref$name = _ref.name,
|
|
49
|
+
name = _ref$name === void 0 ? "email" : _ref$name,
|
|
50
|
+
_ref$inputProps = _ref.inputProps,
|
|
51
|
+
inputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps;
|
|
52
|
+
var _useState = useState(INPUT_FIELD_MIN_WIDTH),
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
initialInputWidth = _useState2[0],
|
|
55
|
+
setInitialInputWidth = _useState2[1];
|
|
56
|
+
var inputRef = useRef(null);
|
|
57
|
+
var placeholderRef = useRef(null);
|
|
58
|
+
var setInputRef = function setInputRef(ref) {
|
|
59
|
+
inputRef.current = ref;
|
|
60
|
+
getInputRef === null || getInputRef === void 0 || getInputRef(ref);
|
|
61
|
+
};
|
|
62
|
+
useEffect(function () {
|
|
63
|
+
var _placeholderRef$curre;
|
|
64
|
+
//To handle the input width on initial render.
|
|
65
|
+
var placeholderSpanWidth = (_placeholderRef$curre = placeholderRef.current) === null || _placeholderRef$curre === void 0 ? void 0 : _placeholderRef$curre.offsetWidth;
|
|
66
|
+
setInitialInputWidth(placeholderSpanWidth);
|
|
67
|
+
}, []);
|
|
68
|
+
var labelNode = isPresent(helpUrl) ? /*#__PURE__*/jsxs("span", {
|
|
69
|
+
className: "inline-flex items-center gap-1",
|
|
70
|
+
children: [label, /*#__PURE__*/jsx(Tooltip, {
|
|
71
|
+
content: helpIconTooltipContent,
|
|
72
|
+
disabled: isNotPresent(helpUrl),
|
|
73
|
+
position: "right",
|
|
74
|
+
children: /*#__PURE__*/jsx("button", {
|
|
75
|
+
className: "cursor-pointer opacity-75 transition-opacity duration-300 ease-in-out hover:opacity-100",
|
|
76
|
+
type: "button",
|
|
77
|
+
onClick: function onClick() {
|
|
78
|
+
return window.open(helpUrl, "_blank");
|
|
79
|
+
},
|
|
80
|
+
children: /*#__PURE__*/jsx(Info, {
|
|
81
|
+
size: 16
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
}) : label;
|
|
86
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
87
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
88
|
+
// Dummy element to calculate the width to be set for the input. Do not remove.
|
|
89
|
+
className: "pointer-events-none invisible absolute ps-2",
|
|
90
|
+
ref: placeholderRef,
|
|
91
|
+
children: value || placeholder
|
|
92
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
93
|
+
className: "inline-flex max-w-full items-end gap-2",
|
|
94
|
+
children: [/*#__PURE__*/jsx(Input, _objectSpread(_objectSpread({}, _objectSpread({
|
|
95
|
+
name: name,
|
|
96
|
+
placeholder: placeholder
|
|
97
|
+
}, inputProps)), {}, {
|
|
98
|
+
className: "w-max max-w-full min-w-0",
|
|
99
|
+
label: labelNode,
|
|
100
|
+
ref: setInputRef,
|
|
101
|
+
type: "text",
|
|
102
|
+
style: {
|
|
103
|
+
minWidth: isEmpty(value) ? INPUT_FIELD_MIN_WIDTH : 0,
|
|
104
|
+
width: (_placeholderRef$curre2 = (_placeholderRef$curre3 = placeholderRef.current) === null || _placeholderRef$curre3 === void 0 ? void 0 : _placeholderRef$curre3.offsetWidth) !== null && _placeholderRef$curre2 !== void 0 ? _placeholderRef$curre2 : initialInputWidth
|
|
105
|
+
},
|
|
106
|
+
suffix:
|
|
107
|
+
/*#__PURE__*/
|
|
108
|
+
// Added onClick to focus the input even when the suffix part is clicked.
|
|
109
|
+
// `size-auto` overrides the icon-size class atoms injects into addons.
|
|
110
|
+
jsx("span", {
|
|
111
|
+
className: "bg-muted text-muted-foreground -me-1.5 flex size-auto cursor-not-allowed items-center self-stretch px-2 whitespace-nowrap",
|
|
112
|
+
onClick: function onClick() {
|
|
113
|
+
var _inputRef$current;
|
|
114
|
+
return (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
115
|
+
},
|
|
116
|
+
children: suffix
|
|
117
|
+
})
|
|
118
|
+
})), isCopyToClipboardEnabled && /*#__PURE__*/jsx(CopyToClipboardButton, {
|
|
119
|
+
disabled: isEmpty(value),
|
|
120
|
+
value: "".concat(value).concat(suffix),
|
|
121
|
+
variant: "ghost"
|
|
122
|
+
})]
|
|
123
|
+
})]
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export { SuffixedInput as default };
|
|
128
|
+
//# sourceMappingURL=SuffixedInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuffixedInput.js","sources":["../../node_modules/lucide-react/dist/esm/icons/info.js","../../src/v2/components/SuffixedInput/constants.js","../../src/v2/components/SuffixedInput/index.jsx"],"sourcesContent":["/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M12 16v-4\", key: \"1dtifu\" }],\n [\"path\", { d: \"M12 8h.01\", key: \"e9boi3\" }]\n];\nconst Info = createLucideIcon(\"info\", __iconNode);\n\nexport { __iconNode, Info as default };\n//# sourceMappingURL=info.js.map\n","export const INPUT_FIELD_MIN_WIDTH = 60;\n","import { useEffect, useRef, useState } from \"react\";\n\nimport { Tooltip } from \"@bigbinary/neeto-atoms\";\nimport { Input } from \"@bigbinary/neeto-atoms/formik\";\nimport { Info } from \"lucide-react\";\nimport { isPresent, isNotPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\n\nimport { INPUT_FIELD_MIN_WIDTH } from \"./constants\";\n\nimport CopyToClipboardButton from \"../CopyToClipboardButton\";\n\nconst SuffixedInput = ({\n placeholder,\n helpUrl,\n helpIconTooltipContent,\n label,\n value,\n getInputRef,\n suffix,\n isCopyToClipboardEnabled = false,\n name = \"email\",\n inputProps = {},\n}) => {\n const [initialInputWidth, setInitialInputWidth] = useState(\n INPUT_FIELD_MIN_WIDTH\n );\n const inputRef = useRef(null);\n const placeholderRef = useRef(null);\n\n const setInputRef = ref => {\n inputRef.current = ref;\n getInputRef?.(ref);\n };\n\n useEffect(() => {\n //To handle the input width on initial render.\n const placeholderSpanWidth = placeholderRef.current?.offsetWidth;\n setInitialInputWidth(placeholderSpanWidth);\n }, []);\n\n const labelNode = isPresent(helpUrl) ? (\n <span className=\"inline-flex items-center gap-1\">\n {label}\n <Tooltip\n content={helpIconTooltipContent}\n disabled={isNotPresent(helpUrl)}\n position=\"right\"\n >\n <button\n className=\"cursor-pointer opacity-75 transition-opacity duration-300 ease-in-out hover:opacity-100\"\n type=\"button\"\n onClick={() => window.open(helpUrl, \"_blank\")}\n >\n <Info size={16} />\n </button>\n </Tooltip>\n </span>\n ) : (\n label\n );\n\n return (\n <>\n <span // Dummy element to calculate the width to be set for the input. Do not remove.\n className=\"pointer-events-none invisible absolute ps-2\"\n ref={placeholderRef}\n >\n {value || placeholder}\n </span>\n <div className=\"inline-flex max-w-full items-end gap-2\">\n <Input\n {...{ name, placeholder, ...inputProps }}\n className=\"w-max max-w-full min-w-0\"\n label={labelNode}\n ref={setInputRef}\n type=\"text\"\n style={{\n minWidth: isEmpty(value) ? INPUT_FIELD_MIN_WIDTH : 0,\n width: placeholderRef.current?.offsetWidth ?? initialInputWidth,\n }}\n suffix={\n // Added onClick to focus the input even when the suffix part is clicked.\n // `size-auto` overrides the icon-size class atoms injects into addons.\n <span\n className=\"bg-muted text-muted-foreground -me-1.5 flex size-auto cursor-not-allowed items-center self-stretch px-2 whitespace-nowrap\"\n onClick={() => inputRef.current?.focus()}\n >\n {suffix}\n </span>\n }\n />\n {isCopyToClipboardEnabled && (\n <CopyToClipboardButton\n disabled={isEmpty(value)}\n value={`${value}${suffix}`}\n variant=\"ghost\"\n />\n )}\n </div>\n </>\n );\n};\n\nSuffixedInput.propTypes = {\n /**\n * Placeholder of the input field.\n */\n placeholder: PropTypes.string,\n /**\n * A help icon will be displayed next to the label if helpUrl is present. On clicking the icon will take the user to the URL.\n */\n helpUrl: PropTypes.string,\n /**\n * Text to be displayed inside the tooltip of the help icon.\n */\n helpIconTooltipContent: PropTypes.string,\n /**\n * Label of the input field.\n */\n label: PropTypes.string,\n /**\n * The value entered by the user, eg: email.\n */\n value: PropTypes.string,\n /**\n * A method to get the ref of the input field.\n */\n getInputRef: PropTypes.func,\n /**\n * Domain name to be rendered next to the input field.\n */\n suffix: PropTypes.string,\n /**\n * Whether to show the copy to clipboard button.\n */\n isCopyToClipboardEnabled: PropTypes.bool,\n /**\n * Formik field name of the input field.\n */\n name: PropTypes.string,\n /**\n * This will be passed down to the `Input` component.\n */\n inputProps: PropTypes.object,\n};\n\nexport default SuffixedInput;\n"],"names":["INPUT_FIELD_MIN_WIDTH","SuffixedInput","_ref","_placeholderRef$curre2","_placeholderRef$curre3","placeholder","helpUrl","helpIconTooltipContent","label","value","getInputRef","suffix","_ref$isCopyToClipboar","isCopyToClipboardEnabled","_ref$name","name","_ref$inputProps","inputProps","_useState","useState","_useState2","_slicedToArray","initialInputWidth","setInitialInputWidth","inputRef","useRef","placeholderRef","setInputRef","ref","current","useEffect","_placeholderRef$curre","placeholderSpanWidth","offsetWidth","labelNode","isPresent","_jsxs","className","children","_jsx","Tooltip","content","disabled","isNotPresent","position","type","onClick","window","open","Info","size","_Fragment","Input","_objectSpread","style","minWidth","isEmpty","width","_inputRef$current","focus","CopyToClipboardButton","concat","variant"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAM,UAAU,GAAG;AACnB,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC5D,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC7C,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE;AAC5C,CAAC;AACD,MAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,EAAE,UAAU,CAAC;;ACd1C,IAAMA,qBAAqB,GAAG,EAAE;;;;ACavC,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAWb;E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D,MAAM,CAAG;AAC3BmD,QAAAA,OAAO,EAAC;AAAO,OAChB,CACF;AAAA,KACE,CAAC;AAAA,GACN,CAAC;AAEP;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { Dialog, Typography, Button } from '@bigbinary/neeto-atoms';
|
|
4
|
+
import { noop } from '@bigbinary/neeto-cist';
|
|
5
|
+
import { globalProps } from '@bigbinary/neeto-commons-frontend/v2/initializers';
|
|
6
|
+
import { useTranslation, Trans } from 'react-i18next';
|
|
7
|
+
import { useMutation } from '@tanstack/react-query';
|
|
8
|
+
import axios from 'axios';
|
|
9
|
+
import { dayjs } from '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
10
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
var timeZoneUrl = "api/v1/time_zone";
|
|
13
|
+
var updateTimeZone = function updateTimeZone(payload) {
|
|
14
|
+
return axios.patch(timeZoneUrl, payload);
|
|
15
|
+
};
|
|
16
|
+
var timeZoneApi = {
|
|
17
|
+
updateTimeZone: updateTimeZone
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var useUpdateTimeZone = function useUpdateTimeZone() {
|
|
21
|
+
return useMutation({
|
|
22
|
+
mutationFn: timeZoneApi.updateTimeZone,
|
|
23
|
+
onSuccess: function onSuccess() {
|
|
24
|
+
return window.location.reload();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var getBrowserTimeZone = function getBrowserTimeZone() {
|
|
30
|
+
return dayjs.tz.guess();
|
|
31
|
+
};
|
|
32
|
+
var getUserTimeZone = function getUserTimeZone() {
|
|
33
|
+
var _globalProps$user;
|
|
34
|
+
return (_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.timeZone;
|
|
35
|
+
};
|
|
36
|
+
var checkIfTwoTimeZonesAreSame = function checkIfTwoTimeZonesAreSame(timeZone1, timeZone2) {
|
|
37
|
+
return (
|
|
38
|
+
// eslint-disable-next-line @bigbinary/neeto/use-standard-date-time-formats
|
|
39
|
+
dayjs().tz(timeZone1).format("Z") === dayjs().tz(timeZone2).format("Z")
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
var TimezoneMismatchModal = function TimezoneMismatchModal(_ref) {
|
|
44
|
+
var _ref$isOpen = _ref.isOpen,
|
|
45
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
46
|
+
_ref$onClose = _ref.onClose,
|
|
47
|
+
onClose = _ref$onClose === void 0 ? noop : _ref$onClose;
|
|
48
|
+
var _useTranslation = useTranslation(),
|
|
49
|
+
t = _useTranslation.t;
|
|
50
|
+
var _useState = useState(false),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
isTimezoneModalOpen = _useState2[0],
|
|
53
|
+
setIsTimezoneModalOpen = _useState2[1];
|
|
54
|
+
var _useUpdateTimeZone = useUpdateTimeZone(),
|
|
55
|
+
isPending = _useUpdateTimeZone.isPending,
|
|
56
|
+
updateTimeZone = _useUpdateTimeZone.mutate;
|
|
57
|
+
var isUserAndBrowserTimeZoneSame = checkIfTwoTimeZonesAreSame(getUserTimeZone(), getBrowserTimeZone());
|
|
58
|
+
var handleUpdateTimeZone = function handleUpdateTimeZone() {
|
|
59
|
+
var payload = {
|
|
60
|
+
timeZone: getBrowserTimeZone()
|
|
61
|
+
};
|
|
62
|
+
updateTimeZone(payload, {
|
|
63
|
+
onSuccess: function onSuccess() {
|
|
64
|
+
setIsTimezoneModalOpen(false);
|
|
65
|
+
onClose();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
var handleCancel = function handleCancel() {
|
|
70
|
+
setIsTimezoneModalOpen(false);
|
|
71
|
+
onClose();
|
|
72
|
+
};
|
|
73
|
+
useEffect(function () {
|
|
74
|
+
if (!(process.env.RAILS_ENV !== "heroku")) return;
|
|
75
|
+
setIsTimezoneModalOpen(!isUserAndBrowserTimeZoneSame);
|
|
76
|
+
}, []);
|
|
77
|
+
return /*#__PURE__*/jsxs(Dialog, {
|
|
78
|
+
"aria-describedby": undefined,
|
|
79
|
+
closeOnOutsideClick: false,
|
|
80
|
+
isOpen: isTimezoneModalOpen || isOpen,
|
|
81
|
+
size: "large",
|
|
82
|
+
onClose: handleCancel,
|
|
83
|
+
children: [/*#__PURE__*/jsx(Dialog.Header, {
|
|
84
|
+
children: /*#__PURE__*/jsx(Dialog.Title, {
|
|
85
|
+
children: t("neetoMolecules.alert.timezone.title")
|
|
86
|
+
})
|
|
87
|
+
}), /*#__PURE__*/jsx(Dialog.Body, {
|
|
88
|
+
children: /*#__PURE__*/jsxs("span", {
|
|
89
|
+
className: "flex flex-col gap-y-4",
|
|
90
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
91
|
+
as: "span",
|
|
92
|
+
variant: "body2",
|
|
93
|
+
children: t("neetoMolecules.alert.timezone.message", {
|
|
94
|
+
entity: globalProps.appName
|
|
95
|
+
})
|
|
96
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
97
|
+
as: "span",
|
|
98
|
+
variant: "h4",
|
|
99
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
100
|
+
i18nKey: "neetoMolecules.alert.timezone.userTimezone",
|
|
101
|
+
values: {
|
|
102
|
+
entity: getUserTimeZone()
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
106
|
+
as: "span",
|
|
107
|
+
variant: "h4",
|
|
108
|
+
children: /*#__PURE__*/jsx(Trans, {
|
|
109
|
+
i18nKey: "neetoMolecules.alert.timezone.browserTimezone",
|
|
110
|
+
values: {
|
|
111
|
+
entity: getBrowserTimeZone()
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
})]
|
|
115
|
+
})
|
|
116
|
+
}), /*#__PURE__*/jsxs(Dialog.Footer, {
|
|
117
|
+
className: "flex items-center gap-x-2",
|
|
118
|
+
children: [/*#__PURE__*/jsx(Button, {
|
|
119
|
+
"data-testid": "update-timezone-button",
|
|
120
|
+
disabled: isPending,
|
|
121
|
+
label: t("neetoMolecules.alert.timezone.updateProfile"),
|
|
122
|
+
loading: isPending,
|
|
123
|
+
onClick: handleUpdateTimeZone
|
|
124
|
+
}), /*#__PURE__*/jsx(Button, {
|
|
125
|
+
label: t("neetoMolecules.common.actions.cancel"),
|
|
126
|
+
variant: "ghost",
|
|
127
|
+
onClick: handleCancel
|
|
128
|
+
})]
|
|
129
|
+
})]
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export { TimezoneMismatchModal as default };
|
|
134
|
+
//# sourceMappingURL=TimezoneMismatchModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimezoneMismatchModal.js","sources":["../../src/v2/components/TimezoneMismatchModal/apis/time_zone.js","../../src/v2/components/TimezoneMismatchModal/useTimeZoneApi.js","../../src/v2/components/TimezoneMismatchModal/utils.js","../../src/v2/components/TimezoneMismatchModal/index.jsx"],"sourcesContent":["import axios from \"axios\";\n\nconst timeZoneUrl = \"api/v1/time_zone\";\n\nconst updateTimeZone = payload => axios.patch(timeZoneUrl, payload);\n\nconst timeZoneApi = { updateTimeZone };\n\nexport default timeZoneApi;\n","import { useMutation } from \"@tanstack/react-query\";\n\nimport timeZoneApi from \"./apis/time_zone\";\n\nconst useUpdateTimeZone = () =>\n useMutation({\n mutationFn: timeZoneApi.updateTimeZone,\n onSuccess: () => window.location.reload(),\n });\n\nexport { useUpdateTimeZone };\n","import { globalProps } from \"neetocommons/v2/initializers\";\nimport { dayjs } from \"neetocommons/v2/utils\";\n\nexport const getBrowserTimeZone = () => dayjs.tz.guess();\n\nexport const getUserTimeZone = () => globalProps.user?.timeZone;\n\nexport const checkIfTwoTimeZonesAreSame = (timeZone1, timeZone2) =>\n // eslint-disable-next-line @bigbinary/neeto/use-standard-date-time-formats\n dayjs().tz(timeZone1).format(\"Z\") === dayjs().tz(timeZone2).format(\"Z\");\n","import { useEffect, useState } from \"react\";\n\nimport { Button, Dialog, Typography } from \"@bigbinary/neeto-atoms\";\nimport { noop } from \"neetocist\";\nimport { globalProps } from \"neetocommons/v2/initializers\";\nimport PropTypes from \"prop-types\";\nimport { Trans, useTranslation } from \"react-i18next\";\n\nimport { useUpdateTimeZone } from \"./useTimeZoneApi\";\nimport {\n checkIfTwoTimeZonesAreSame,\n getBrowserTimeZone,\n getUserTimeZone,\n} from \"./utils\";\n\nconst TimezoneMismatchModal = ({ isOpen = false, onClose = noop }) => {\n const { t } = useTranslation();\n const [isTimezoneModalOpen, setIsTimezoneModalOpen] = useState(false);\n const { isPending, mutate: updateTimeZone } = useUpdateTimeZone();\n const isUserAndBrowserTimeZoneSame = checkIfTwoTimeZonesAreSame(\n getUserTimeZone(),\n getBrowserTimeZone()\n );\n\n const handleUpdateTimeZone = () => {\n const payload = { timeZone: getBrowserTimeZone() };\n\n updateTimeZone(payload, {\n onSuccess: () => {\n setIsTimezoneModalOpen(false);\n onClose();\n },\n });\n };\n\n const handleCancel = () => {\n setIsTimezoneModalOpen(false);\n onClose();\n };\n\n useEffect(() => {\n if (!(process.env.RAILS_ENV !== \"heroku\")) return;\n setIsTimezoneModalOpen(!isUserAndBrowserTimeZoneSame);\n }, []);\n\n return (\n <Dialog\n aria-describedby={undefined}\n closeOnOutsideClick={false}\n isOpen={isTimezoneModalOpen || isOpen}\n size=\"large\"\n onClose={handleCancel}\n >\n <Dialog.Header>\n <Dialog.Title>{t(\"neetoMolecules.alert.timezone.title\")}</Dialog.Title>\n </Dialog.Header>\n <Dialog.Body>\n <span className=\"flex flex-col gap-y-4\">\n <Typography as=\"span\" variant=\"body2\">\n {t(\"neetoMolecules.alert.timezone.message\", {\n entity: globalProps.appName,\n })}\n </Typography>\n <Typography as=\"span\" variant=\"h4\">\n <Trans\n i18nKey=\"neetoMolecules.alert.timezone.userTimezone\"\n values={{ entity: getUserTimeZone() }}\n />\n </Typography>\n <Typography as=\"span\" variant=\"h4\">\n <Trans\n i18nKey=\"neetoMolecules.alert.timezone.browserTimezone\"\n values={{ entity: getBrowserTimeZone() }}\n />\n </Typography>\n </span>\n </Dialog.Body>\n <Dialog.Footer className=\"flex items-center gap-x-2\">\n <Button\n data-testid=\"update-timezone-button\"\n disabled={isPending}\n label={t(\"neetoMolecules.alert.timezone.updateProfile\")}\n loading={isPending}\n onClick={handleUpdateTimeZone}\n />\n <Button\n label={t(\"neetoMolecules.common.actions.cancel\")}\n variant=\"ghost\"\n onClick={handleCancel}\n />\n </Dialog.Footer>\n </Dialog>\n );\n};\n\nTimezoneMismatchModal.propTypes = {\n /**\n * Boolean value to toggle the modal.\n */\n isOpen: PropTypes.bool,\n /**\n * The function that's called after the modal is closed.\n */\n onClose: PropTypes.func,\n};\n\nexport default TimezoneMismatchModal;\n"],"names":["timeZoneUrl","updateTimeZone","payload","axios","patch","timeZoneApi","useUpdateTimeZone","useMutation","mutationFn","onSuccess","window","location","reload","getBrowserTimeZone","dayjs","tz","guess","getUserTimeZone","_globalProps$user","globalProps","user","timeZone","checkIfTwoTimeZonesAreSame","timeZone1","timeZone2","format","TimezoneMismatchModal","_ref","_ref$isOpen","isOpen","_ref$onClose","onClose","noop","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isTimezoneModalOpen","setIsTimezoneModalOpen","_useUpdateTimeZone","isPending","mutate","isUserAndBrowserTimeZoneSame","handleUpdateTimeZone","handleCancel","useEffect","process","env","RAILS_ENV","_jsxs","Dialog","undefined","closeOnOutsideClick","size","children","_jsx","Header","Title","Body","className","Typography","as","variant","entity","appName","Trans","i18nKey","values","Footer","Button","disabled","label","loading","onClick"],"mappings":";;;;;;;;;;;AAEA,IAAMA,WAAW,GAAG,kBAAkB;AAEtC,IAAMC,cAAc,GAAG,SAAjB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