@bigbinary/neeto-commons-frontend 4.13.86 → 4.13.88
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 +0 -1
- package/configs/nanos/webpack/resolve.js +1 -1
- package/configs/webpack/resolve.js +22 -0
- package/dist/_commonjsHelpers-BFTU3MAI.js +8 -0
- package/dist/_commonjsHelpers-BFTU3MAI.js.map +1 -0
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +11 -0
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js.map +1 -0
- package/dist/cjs/{index-BskY8dVw.js → index-bFmfHzbL.js} +4 -6
- package/dist/cjs/index-bFmfHzbL.js.map +1 -0
- package/dist/cjs/initializers/dayjs.js +10 -5
- package/dist/cjs/initializers/dayjs.js.map +1 -1
- package/dist/cjs/initializers/index.js +6 -8
- package/dist/cjs/initializers/index.js.map +1 -1
- package/dist/cjs/lodash-yQg9l0eZ.js +17210 -0
- package/dist/cjs/lodash-yQg9l0eZ.js.map +1 -0
- package/dist/cjs/react-utils/BrowserPushNotifications/index.js +2 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/index.js.map +1 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/pushHelper.js +2 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/pushHelper.js.map +1 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/registerServiceWorker.js +2 -1
- package/dist/cjs/react-utils/BrowserPushNotifications/registerServiceWorker.js.map +1 -1
- package/dist/cjs/react-utils/PageTitle/PageTitle.js +1 -2
- package/dist/cjs/react-utils/PageTitle/PageTitle.js.map +1 -1
- package/dist/cjs/react-utils/PageTitle/index.js +0 -1
- package/dist/cjs/react-utils/PageTitle/index.js.map +1 -1
- package/dist/cjs/react-utils/index.js +3 -3
- package/dist/cjs/react-utils/useFetchNeetoApps/index.js +2 -1
- package/dist/cjs/react-utils/useFetchNeetoApps/index.js.map +1 -1
- package/dist/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +2 -1
- package/dist/cjs/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -1
- package/dist/cjs/react-utils/useLocalStorage/index.js +3 -2
- package/dist/cjs/react-utils/useLocalStorage/index.js.map +1 -1
- package/dist/cjs/react-utils/useLocalStorage/useLocalStorage.js +3 -2
- package/dist/cjs/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/cjs/react-utils/usePersistedQuery/index.js +2 -1
- package/dist/cjs/react-utils/usePersistedQuery/index.js.map +1 -1
- package/dist/cjs/react-utils/usePersistedQuery/usePersistedQuery.js +2 -1
- package/dist/cjs/react-utils/usePersistedQuery/usePersistedQuery.js.map +1 -1
- package/dist/cjs/react-utils/useQueryParams/index.js +2 -1
- package/dist/cjs/react-utils/useQueryParams/index.js.map +1 -1
- package/dist/cjs/react-utils/useQueryParams/useQueryParams.js +2 -1
- package/dist/cjs/react-utils/useQueryParams/useQueryParams.js.map +1 -1
- package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/index.js +2 -1
- package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/index.js.map +1 -1
- package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js +2 -1
- package/dist/cjs/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map +1 -1
- package/dist/cjs/utils/captureAnalyticsEvent.js +4 -4
- package/dist/cjs/utils/captureAnalyticsEvent.js.map +1 -1
- package/dist/cjs/utils/captureAnalyticsPageView.js +4 -10
- package/dist/cjs/utils/captureAnalyticsPageView.js.map +1 -1
- package/dist/cjs/utils/createSubscription.js +2 -1
- package/dist/cjs/utils/createSubscription.js.map +1 -1
- package/dist/cjs/utils/customParseFormatPlugin.js +2 -2
- package/dist/cjs/utils/customParseFormatPlugin.js.map +1 -1
- package/dist/cjs/utils/deviceInformation.js +2 -1
- package/dist/cjs/utils/deviceInformation.js.map +1 -1
- package/dist/cjs/utils/general.js +2 -1
- package/dist/cjs/utils/general.js.map +1 -1
- package/dist/cjs/utils/index.js +3 -2
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/localePlugin.js +2 -1
- package/dist/cjs/utils/localePlugin.js.map +1 -1
- package/dist/cjs/utils/timezonePlugin.js +2 -2
- package/dist/cjs/utils/timezonePlugin.js.map +1 -1
- package/dist/{index-CoBEoJgD.js → index-DbuxAQMD.js} +3 -5
- package/dist/index-DbuxAQMD.js.map +1 -0
- package/dist/initializers/dayjs.js +8 -3
- package/dist/initializers/dayjs.js.map +1 -1
- package/dist/initializers/index.js +6 -8
- package/dist/initializers/index.js.map +1 -1
- package/dist/lodash-M8VRFvKw.js +17208 -0
- package/dist/lodash-M8VRFvKw.js.map +1 -0
- package/dist/react-utils/BrowserPushNotifications/index.js +2 -1
- package/dist/react-utils/BrowserPushNotifications/index.js.map +1 -1
- package/dist/react-utils/BrowserPushNotifications/pushHelper.js +2 -1
- package/dist/react-utils/BrowserPushNotifications/pushHelper.js.map +1 -1
- package/dist/react-utils/BrowserPushNotifications/registerServiceWorker.js +2 -1
- package/dist/react-utils/BrowserPushNotifications/registerServiceWorker.js.map +1 -1
- package/dist/react-utils/PageTitle/PageTitle.js +0 -1
- package/dist/react-utils/PageTitle/PageTitle.js.map +1 -1
- package/dist/react-utils/PageTitle/index.js +0 -1
- package/dist/react-utils/PageTitle/index.js.map +1 -1
- package/dist/react-utils/index.js +3 -3
- package/dist/react-utils/useFetchNeetoApps/index.js +2 -1
- package/dist/react-utils/useFetchNeetoApps/index.js.map +1 -1
- package/dist/react-utils/useFetchNeetoApps/useFetchNeetoApps.js +2 -1
- package/dist/react-utils/useFetchNeetoApps/useFetchNeetoApps.js.map +1 -1
- package/dist/react-utils/useLocalStorage/index.js +3 -2
- package/dist/react-utils/useLocalStorage/index.js.map +1 -1
- package/dist/react-utils/useLocalStorage/useLocalStorage.js +3 -2
- package/dist/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/react-utils/usePersistedQuery/index.js +2 -1
- package/dist/react-utils/usePersistedQuery/index.js.map +1 -1
- package/dist/react-utils/usePersistedQuery/usePersistedQuery.js +2 -1
- package/dist/react-utils/usePersistedQuery/usePersistedQuery.js.map +1 -1
- package/dist/react-utils/useQueryParams/index.js +2 -1
- package/dist/react-utils/useQueryParams/index.js.map +1 -1
- package/dist/react-utils/useQueryParams/useQueryParams.js +2 -1
- package/dist/react-utils/useQueryParams/useQueryParams.js.map +1 -1
- package/dist/react-utils/useRegisterNavigationCheckpoint/index.js +2 -1
- package/dist/react-utils/useRegisterNavigationCheckpoint/index.js.map +1 -1
- package/dist/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js +2 -1
- package/dist/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map +1 -1
- package/dist/utils/captureAnalyticsEvent.js +4 -4
- package/dist/utils/captureAnalyticsEvent.js.map +1 -1
- package/dist/utils/captureAnalyticsPageView.js +4 -10
- package/dist/utils/captureAnalyticsPageView.js.map +1 -1
- package/dist/utils/createSubscription.js +2 -1
- package/dist/utils/createSubscription.js.map +1 -1
- package/dist/utils/customParseFormatPlugin.js +2 -2
- package/dist/utils/customParseFormatPlugin.js.map +1 -1
- package/dist/utils/deviceInformation.js +2 -1
- package/dist/utils/deviceInformation.js.map +1 -1
- package/dist/utils/general.js +2 -1
- package/dist/utils/general.js.map +1 -1
- package/dist/utils/index.js +3 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/localePlugin.js +2 -1
- package/dist/utils/localePlugin.js.map +1 -1
- package/dist/utils/timezonePlugin.js +2 -2
- package/dist/utils/timezonePlugin.js.map +1 -1
- package/package.json +8 -17
- package/utils.d.ts +0 -30
- package/dist/cjs/index-BskY8dVw.js.map +0 -1
- package/dist/cjs/initializers/mixpanel.js +0 -29
- package/dist/cjs/initializers/mixpanel.js.map +0 -1
- package/dist/cjs/mixpanel.module-ajRn5e0J.js +0 -22401
- package/dist/cjs/mixpanel.module-ajRn5e0J.js.map +0 -1
- package/dist/index-CoBEoJgD.js.map +0 -1
- package/dist/initializers/mixpanel.js +0 -27
- package/dist/initializers/mixpanel.js.map +0 -1
- package/dist/mixpanel.module-Bu2zrBMQ.js +0 -22399
- package/dist/mixpanel.module-Bu2zrBMQ.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { destroyBrowserSubscription, registerBrowserNotifications } from './pushHelper.js';
|
|
2
|
-
import '../../index-
|
|
2
|
+
import '../../index-DbuxAQMD.js';
|
|
3
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
3
4
|
import './devices.js';
|
|
4
5
|
import 'axios';
|
|
5
6
|
import './registerServiceWorker.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../index-
|
|
1
|
+
import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../index-DbuxAQMD.js';
|
|
2
2
|
import devicesApi from './devices.js';
|
|
3
3
|
import { registerServiceWorker, unsubscribeBrowserNotifications } from './registerServiceWorker.js';
|
|
4
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
4
5
|
import 'axios';
|
|
5
6
|
|
|
6
7
|
var createBrowserSubscription = /*#__PURE__*/function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pushHelper.js","sources":["../../../src/react-utils/BrowserPushNotifications/pushHelper.js"],"sourcesContent":["// THIS FILE HAS BEEN ADDED BY NEETO NOTIFICATIONS ENGINE\n// AND IS USED FOR BROWSER NOTIFICATIONS\n// CONTACT NEETO NOTIFICATIONS TEAM BEFORE MODIFYING THIS FILE\n\nimport devicesApi from \"./devices\";\nimport {\n unsubscribeBrowserNotifications,\n registerServiceWorker,\n} from \"./registerServiceWorker\";\n\nconst createBrowserSubscription = async subscription => {\n if (subscription) {\n const payload = { device: { subscription, platform: \"browser\" } };\n try {\n await devicesApi.create(payload);\n localStorage.setItem(\n \"deviceId\",\n JSON.stringify(subscription.toJSON().keys.auth)\n );\n } catch (err) {\n logger.error(\"Device registration Failed: \", err);\n }\n } else {\n logger.error(\n \"Something went wrong while registering device for browser subscription\"\n );\n }\n};\n\nexport const destroyBrowserSubscription = async () => {\n try {\n await unsubscribeBrowserNotifications();\n const deviceId = JSON.parse(localStorage.getItem(\"deviceId\"));\n await devicesApi.destroy(deviceId);\n localStorage.removeItem(\"deviceId\");\n } catch (err) {\n logger.error(\n \"Something went wrong while unsubscribing browser notification:\",\n err\n );\n }\n};\n\nexport const registerBrowserNotifications = async (\n vapidPublicKey = process.env.VAPID_PUBLIC_KEY\n) => {\n const response = await registerServiceWorker(vapidPublicKey);\n await createBrowserSubscription(response);\n};\n"],"names":["createBrowserSubscription","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","subscription","payload","wrap","_callee$","_context","prev","next","device","platform","devicesApi","create","localStorage","setItem","JSON","stringify","toJSON","keys","auth","t0","logger","error","stop","_x","apply","arguments","destroyBrowserSubscription","_ref2","_callee2","deviceId","_callee2$","_context2","unsubscribeBrowserNotifications","parse","getItem","destroy","removeItem","registerBrowserNotifications","_ref3","_callee3","vapidPublicKey","response","_args3","_callee3$","_context3","length","undefined","process","env","VAPID_PUBLIC_KEY","registerServiceWorker","sent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"pushHelper.js","sources":["../../../src/react-utils/BrowserPushNotifications/pushHelper.js"],"sourcesContent":["// THIS FILE HAS BEEN ADDED BY NEETO NOTIFICATIONS ENGINE\n// AND IS USED FOR BROWSER NOTIFICATIONS\n// CONTACT NEETO NOTIFICATIONS TEAM BEFORE MODIFYING THIS FILE\n\nimport devicesApi from \"./devices\";\nimport {\n unsubscribeBrowserNotifications,\n registerServiceWorker,\n} from \"./registerServiceWorker\";\n\nconst createBrowserSubscription = async subscription => {\n if (subscription) {\n const payload = { device: { subscription, platform: \"browser\" } };\n try {\n await devicesApi.create(payload);\n localStorage.setItem(\n \"deviceId\",\n JSON.stringify(subscription.toJSON().keys.auth)\n );\n } catch (err) {\n logger.error(\"Device registration Failed: \", err);\n }\n } else {\n logger.error(\n \"Something went wrong while registering device for browser subscription\"\n );\n }\n};\n\nexport const destroyBrowserSubscription = async () => {\n try {\n await unsubscribeBrowserNotifications();\n const deviceId = JSON.parse(localStorage.getItem(\"deviceId\"));\n await devicesApi.destroy(deviceId);\n localStorage.removeItem(\"deviceId\");\n } catch (err) {\n logger.error(\n \"Something went wrong while unsubscribing browser notification:\",\n err\n );\n }\n};\n\nexport const registerBrowserNotifications = async (\n vapidPublicKey = process.env.VAPID_PUBLIC_KEY\n) => {\n const response = await registerServiceWorker(vapidPublicKey);\n await createBrowserSubscription(response);\n};\n"],"names":["createBrowserSubscription","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","subscription","payload","wrap","_callee$","_context","prev","next","device","platform","devicesApi","create","localStorage","setItem","JSON","stringify","toJSON","keys","auth","t0","logger","error","stop","_x","apply","arguments","destroyBrowserSubscription","_ref2","_callee2","deviceId","_callee2$","_context2","unsubscribeBrowserNotifications","parse","getItem","destroy","removeItem","registerBrowserNotifications","_ref3","_callee3","vapidPublicKey","response","_args3","_callee3$","_context3","length","undefined","process","env","VAPID_PUBLIC_KEY","registerServiceWorker","sent"],"mappings":";;;;;;AAUA,IAAMA,yBAAyB,gBAAA,YAAA;EAAA,IAAAC,IAAA,GAAAC,iBAAA,cAAAC,mBAAA,CAAAC,IAAA,CAAG,SAAAC,OAAAA,CAAMC,YAAY,EAAA;AAAA,IAAA,IAAAC,OAAA;AAAA,IAAA,OAAAJ,mBAAA,CAAAK,IAAA,CAAA,SAAAC,SAAAC,QAAA,EAAA;AAAA,MAAA,OAAA,CAAA,EAAA,QAAAA,QAAA,CAAAC,IAAA,GAAAD,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,SALYF,4BAA4BA,GAAA;AAAA,IAAA,OAAAC,KAAA,CAAAd,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA;AAAA,GAAA;AAAA,CAKxC;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../index-
|
|
1
|
+
import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../../index-DbuxAQMD.js';
|
|
2
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
2
3
|
|
|
3
4
|
// THIS FILE HAS BEEN ADDED BY NEETO NOTIFICATIONS ENGINE
|
|
4
5
|
// AND IS USED FOR BROWSER NOTIFICATIONS
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerServiceWorker.js","sources":["../../../src/react-utils/BrowserPushNotifications/registerServiceWorker.js"],"sourcesContent":["// THIS FILE HAS BEEN ADDED BY NEETO NOTIFICATIONS ENGINE\n// AND IS USED FOR BROWSER NOTIFICATIONS\n// CONTACT NEETO NOTIFICATIONS TEAM BEFORE MODIFYING THIS FILE\n\nfunction urlB64ToUint8Array(base64String) {\n const padding = \"=\".repeat((4 - (base64String.length % 4)) % 4);\n const base64 = (base64String + padding).replace(/-/g, \"+\").replace(/_/g, \"/\");\n\n const rawData = window.atob(base64);\n const outputArray = new Uint8Array(rawData.length);\n\n for (let i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n\n return outputArray;\n}\n\nconst subscribeBrowserNotifications = async vapidPublicKey => {\n let subscription = {};\n try {\n const permission = await Notification.requestPermission();\n if (permission !== \"denied\") {\n await navigator.serviceWorker.register(\"/serviceworker.js\");\n const sw = await navigator.serviceWorker.ready;\n subscription = await sw.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: urlB64ToUint8Array(vapidPublicKey),\n });\n\n return subscription;\n }\n logger.error(\"Notification Permission Denied\");\n } catch (error) {\n logger.error(error);\n }\n\n return null;\n};\nexport const unsubscribeBrowserNotifications = async () => {\n try {\n const sw = await navigator.serviceWorker.ready;\n const subscription = await sw.pushManager.getSubscription();\n if (subscription) {\n const res = await subscription.unsubscribe();\n logger.error(res);\n }\n } catch (error) {\n logger.error(error);\n }\n};\n\nexport const registerServiceWorker = async vapidPublicKey => {\n if (navigator.serviceWorker && vapidPublicKey) {\n const res = await subscribeBrowserNotifications(vapidPublicKey);\n\n return res;\n }\n logger.error(\"Service worker is not supported in this Browser\");\n\n return null;\n};\n"],"names":["urlB64ToUint8Array","base64String","padding","repeat","length","base64","replace","rawData","window","atob","outputArray","Uint8Array","i","charCodeAt","subscribeBrowserNotifications","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","vapidPublicKey","subscription","permission","sw","wrap","_callee$","_context","prev","next","Notification","requestPermission","sent","navigator","serviceWorker","register","ready","pushManager","subscribe","userVisibleOnly","applicationServerKey","abrupt","logger","error","t0","stop","_x","apply","arguments","unsubscribeBrowserNotifications","_ref2","_callee2","res","_callee2$","_context2","getSubscription","unsubscribe","registerServiceWorker","_ref3","_callee3","_callee3$","_context3","_x2"],"mappings":"
|
|
1
|
+
{"version":3,"file":"registerServiceWorker.js","sources":["../../../src/react-utils/BrowserPushNotifications/registerServiceWorker.js"],"sourcesContent":["// THIS FILE HAS BEEN ADDED BY NEETO NOTIFICATIONS ENGINE\n// AND IS USED FOR BROWSER NOTIFICATIONS\n// CONTACT NEETO NOTIFICATIONS TEAM BEFORE MODIFYING THIS FILE\n\nfunction urlB64ToUint8Array(base64String) {\n const padding = \"=\".repeat((4 - (base64String.length % 4)) % 4);\n const base64 = (base64String + padding).replace(/-/g, \"+\").replace(/_/g, \"/\");\n\n const rawData = window.atob(base64);\n const outputArray = new Uint8Array(rawData.length);\n\n for (let i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i);\n }\n\n return outputArray;\n}\n\nconst subscribeBrowserNotifications = async vapidPublicKey => {\n let subscription = {};\n try {\n const permission = await Notification.requestPermission();\n if (permission !== \"denied\") {\n await navigator.serviceWorker.register(\"/serviceworker.js\");\n const sw = await navigator.serviceWorker.ready;\n subscription = await sw.pushManager.subscribe({\n userVisibleOnly: true,\n applicationServerKey: urlB64ToUint8Array(vapidPublicKey),\n });\n\n return subscription;\n }\n logger.error(\"Notification Permission Denied\");\n } catch (error) {\n logger.error(error);\n }\n\n return null;\n};\nexport const unsubscribeBrowserNotifications = async () => {\n try {\n const sw = await navigator.serviceWorker.ready;\n const subscription = await sw.pushManager.getSubscription();\n if (subscription) {\n const res = await subscription.unsubscribe();\n logger.error(res);\n }\n } catch (error) {\n logger.error(error);\n }\n};\n\nexport const registerServiceWorker = async vapidPublicKey => {\n if (navigator.serviceWorker && vapidPublicKey) {\n const res = await subscribeBrowserNotifications(vapidPublicKey);\n\n return res;\n }\n logger.error(\"Service worker is not supported in this Browser\");\n\n return null;\n};\n"],"names":["urlB64ToUint8Array","base64String","padding","repeat","length","base64","replace","rawData","window","atob","outputArray","Uint8Array","i","charCodeAt","subscribeBrowserNotifications","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","vapidPublicKey","subscription","permission","sw","wrap","_callee$","_context","prev","next","Notification","requestPermission","sent","navigator","serviceWorker","register","ready","pushManager","subscribe","userVisibleOnly","applicationServerKey","abrupt","logger","error","t0","stop","_x","apply","arguments","unsubscribeBrowserNotifications","_ref2","_callee2","res","_callee2$","_context2","getSubscription","unsubscribe","registerServiceWorker","_ref3","_callee3","_callee3$","_context3","_x2"],"mappings":";;;AAAA;AACA;AACA;;AAEA,SAASA,kBAAkBA,CAACC,YAAY,EAAE;AACxC,EAAA,IAAMC,OAAO,GAAG,GAAG,CAACC,MAAM,CAAC,CAAC,CAAC,GAAIF,YAAY,CAACG,MAAM,GAAG,CAAE,IAAI,CAAC,CAAC;AAC/D,EAAA,IAAMC,MAAM,GAAG,CAACJ,YAAY,GAAGC,OAAO,EAAEI,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,IAA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AAA;AAAA,QAAA,KAAA,CAAA;AAEZV,UAAAA,MAAM,CAACC,KAAK,CAAC,iDAAiD,CAAC;AAAC,UAAA,OAAAkB,SAAA,CAAApB,MAAA,CAAA,QAAA,EAEzD,IAAI,CAAA;AAAA,QAAA,KAAA,CAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAoB,SAAA,CAAAhB,IAAA,EAAA;AAAA;AAAA,KAAA,EAAAc,QAAA,CAAA;GACZ,CAAA,CAAA;EAAA,OATYF,SAAAA,qBAAqBA,CAAAK,GAAA,EAAA;AAAA,IAAA,OAAAJ,KAAA,CAAAX,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA;AAAA,GAAA;AAAA,CASjC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageTitle.js","sources":["../../../src/react-utils/PageTitle/PageTitle.jsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"PageTitle.js","sources":["../../../src/react-utils/PageTitle/PageTitle.jsx"],"sourcesContent":["import PropTypes from \"prop-types\";\nimport Helmet from \"react-helmet\";\n\nconst PageTitle = ({ title }) => {\n const pageTitle = title\n ? `${title} | ${globalProps.appName}`\n : globalProps.appName;\n\n return (\n <Helmet>\n <title>{pageTitle}</title>\n </Helmet>\n );\n};\n\nPageTitle.propTypes = {\n /**\n * Title to be set to the page.\n */\n title: PropTypes.string,\n};\n\nexport default PageTitle;\n"],"names":["PageTitle","_ref","title","pageTitle","concat","globalProps","appName","_jsx","Helmet","children"],"mappings":";;;AAGA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAAkB;AAAA,EAAA,IAAZC,KAAK,GAAAD,IAAA,CAALC,KAAK;AACxB,EAAA,IAAMC,SAAS,GAAGD,KAAK,GAAAE,EAAAA,CAAAA,MAAA,CAChBF,KAAK,EAAA,KAAA,CAAA,CAAAE,MAAA,CAAMC,WAAW,CAACC,OAAO,CACjCD,GAAAA,WAAW,CAACC,OAAO;EAEvB,oBACEC,GAAA,CAACC,MAAM,EAAA;AAAAC,IAAAA,QAAA,eACLF,GAAA,CAAA,OAAA,EAAA;AAAAE,MAAAA,QAAA,EAAQN;KAAiB;AAAC,GACpB,CAAC;AAEb;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -45,7 +45,6 @@ import './HoneybadgerErrorBoundary/utils.js';
|
|
|
45
45
|
import '../objectWithoutProperties-DN7d1SzH.js';
|
|
46
46
|
import '@bigbinary/neeto-molecules/ErrorPage';
|
|
47
47
|
import 'react-router-dom';
|
|
48
|
-
import '@bigbinary/neeto-commons-frontend/initializers';
|
|
49
48
|
import 'react-helmet';
|
|
50
49
|
import '../slicedToArray-DmsZvA_9.js';
|
|
51
50
|
import '../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
@@ -59,7 +58,8 @@ import './useIsElementVisibleInDom/useForceUpdate.js';
|
|
|
59
58
|
import 'zustand/shallow';
|
|
60
59
|
import '../initializers/constants.js';
|
|
61
60
|
import '../utils/general.js';
|
|
62
|
-
import '../index-
|
|
61
|
+
import '../index-DbuxAQMD.js';
|
|
62
|
+
import '../_commonjsHelpers-BFTU3MAI.js';
|
|
63
63
|
import 'i18next';
|
|
64
64
|
import '@bigbinary/neetoui/Toastr';
|
|
65
65
|
import 'qs';
|
|
@@ -69,7 +69,7 @@ import 'dayjs';
|
|
|
69
69
|
import '../utils/createSubscription.js';
|
|
70
70
|
import '@rails/actioncable';
|
|
71
71
|
import 'yup';
|
|
72
|
-
import '../
|
|
72
|
+
import '../lodash-M8VRFvKw.js';
|
|
73
73
|
import '@bigbinary/neeto-time-zones';
|
|
74
74
|
import 'ua-parser-js';
|
|
75
75
|
import '@tanstack/react-query';
|
|
@@ -11,7 +11,8 @@ import '../../utils/general.js';
|
|
|
11
11
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
12
12
|
import '../../slicedToArray-DmsZvA_9.js';
|
|
13
13
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
14
|
-
import '../../index-
|
|
14
|
+
import '../../index-DbuxAQMD.js';
|
|
15
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
15
16
|
import 'i18next';
|
|
16
17
|
import '@bigbinary/neetoui/Toastr';
|
|
17
18
|
import 'qs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -12,7 +12,8 @@ import '../../utils/general.js';
|
|
|
12
12
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
13
13
|
import '../../slicedToArray-DmsZvA_9.js';
|
|
14
14
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
15
|
-
import '../../index-
|
|
15
|
+
import '../../index-DbuxAQMD.js';
|
|
16
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
16
17
|
import 'i18next';
|
|
17
18
|
import '@bigbinary/neetoui/Toastr';
|
|
18
19
|
import 'qs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchNeetoApps.js","sources":["../../../src/react-utils/useFetchNeetoApps/useFetchNeetoApps.js"],"sourcesContent":["import { isNotPresent } from \"neetocist\";\nimport usePersistedQuery from \"react-utils/usePersistedQuery\";\n\nimport neetoAppsApi from \"./apis/neeto_apps\";\n\nimport { NEETO_APPS_LIST_STALE_TIME } from \"../constants\";\nimport { QUERY_KEYS } from \"../constants/query\";\n\nconst useFetchNeetoApps = options => {\n const scopedQueryKey = [\n `${QUERY_KEYS.NEETO_APPS_LIST}-${globalProps.user?.id}`,\n ];\n\n const { data, modifiedAt } = usePersistedQuery.getCache(scopedQueryKey) || {};\n const expired = modifiedAt <= Date.now() - NEETO_APPS_LIST_STALE_TIME;\n\n return usePersistedQuery(scopedQueryKey, neetoAppsApi.fetch, {\n staleTime: NEETO_APPS_LIST_STALE_TIME,\n enabled: expired || isNotPresent(data),\n ...options,\n });\n};\n\nexport default useFetchNeetoApps;\n"],"names":["useFetchNeetoApps","options","_globalProps$user","scopedQueryKey","concat","QUERY_KEYS","NEETO_APPS_LIST","globalProps","user","id","_ref","usePersistedQuery","getCache","data","modifiedAt","expired","Date","now","NEETO_APPS_LIST_STALE_TIME","neetoAppsApi","fetch","_objectSpread","staleTime","enabled","isNotPresent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFetchNeetoApps.js","sources":["../../../src/react-utils/useFetchNeetoApps/useFetchNeetoApps.js"],"sourcesContent":["import { isNotPresent } from \"neetocist\";\nimport usePersistedQuery from \"react-utils/usePersistedQuery\";\n\nimport neetoAppsApi from \"./apis/neeto_apps\";\n\nimport { NEETO_APPS_LIST_STALE_TIME } from \"../constants\";\nimport { QUERY_KEYS } from \"../constants/query\";\n\nconst useFetchNeetoApps = options => {\n const scopedQueryKey = [\n `${QUERY_KEYS.NEETO_APPS_LIST}-${globalProps.user?.id}`,\n ];\n\n const { data, modifiedAt } = usePersistedQuery.getCache(scopedQueryKey) || {};\n const expired = modifiedAt <= Date.now() - NEETO_APPS_LIST_STALE_TIME;\n\n return usePersistedQuery(scopedQueryKey, neetoAppsApi.fetch, {\n staleTime: NEETO_APPS_LIST_STALE_TIME,\n enabled: expired || isNotPresent(data),\n ...options,\n });\n};\n\nexport default useFetchNeetoApps;\n"],"names":["useFetchNeetoApps","options","_globalProps$user","scopedQueryKey","concat","QUERY_KEYS","NEETO_APPS_LIST","globalProps","user","id","_ref","usePersistedQuery","getCache","data","modifiedAt","expired","Date","now","NEETO_APPS_LIST_STALE_TIME","neetoAppsApi","fetch","_objectSpread","staleTime","enabled","isNotPresent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAGC,OAAO,EAAI;AAAA,EAAA,IAAAC,iBAAA;EACnC,IAAMC,cAAc,GAAG,CAAAC,EAAAA,CAAAA,MAAA,CAClBC,UAAU,CAACC,eAAe,EAAA,GAAA,CAAA,CAAAF,MAAA,CAAA,CAAAF,iBAAA,GAAIK,WAAW,CAACC,IAAI,MAAA,IAAA,IAAAN,iBAAA,KAAhBA,MAAAA,GAAAA,MAAAA,GAAAA,iBAAA,CAAkBO,EAAE,CACtD,CAAA;EAED,IAAAC,IAAA,GAA6BC,iBAAiB,CAACC,QAAQ,CAACT,cAAc,CAAC,IAAI,EAAE;IAArEU,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAEC,UAAU,GAAAJ,IAAA,CAAVI,UAAU;EACxB,IAAMC,OAAO,GAAGD,UAAU,IAAIE,IAAI,CAACC,GAAG,EAAE,GAAGC,0BAA0B;EAErE,OAAOP,iBAAiB,CAACR,cAAc,EAAEgB,YAAY,CAACC,KAAK,EAAAC,aAAA,CAAA;AACzDC,IAAAA,SAAS,EAAEJ,0BAA0B;AACrCK,IAAAA,OAAO,EAAER,OAAO,IAAIS,YAAY,CAACX,IAAI;GAClCZ,EAAAA,OAAO,CACX,CAAC;AACJ;;;;"}
|
|
@@ -7,7 +7,8 @@ import 'axios';
|
|
|
7
7
|
import '../../initializers/constants.js';
|
|
8
8
|
import '../../utils/general.js';
|
|
9
9
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
10
|
-
import '../../index-
|
|
10
|
+
import '../../index-DbuxAQMD.js';
|
|
11
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
11
12
|
import '../../defineProperty-CrCYjjU3.js';
|
|
12
13
|
import '../../typeof-D-UKOauR.js';
|
|
13
14
|
import 'i18next';
|
|
@@ -20,7 +21,7 @@ import 'dayjs';
|
|
|
20
21
|
import '../../utils/createSubscription.js';
|
|
21
22
|
import '@rails/actioncable';
|
|
22
23
|
import 'yup';
|
|
23
|
-
import '../../
|
|
24
|
+
import '../../lodash-M8VRFvKw.js';
|
|
24
25
|
import '@bigbinary/neeto-time-zones';
|
|
25
26
|
import 'ua-parser-js';
|
|
26
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,9 +9,9 @@ import '../../utils/createSubscription.js';
|
|
|
9
9
|
import 'dayjs';
|
|
10
10
|
import 'i18next';
|
|
11
11
|
import 'yup';
|
|
12
|
-
import '../../
|
|
12
|
+
import '../../lodash-M8VRFvKw.js';
|
|
13
13
|
import '@bigbinary/neeto-cist';
|
|
14
|
-
import '../../index-
|
|
14
|
+
import '../../index-DbuxAQMD.js';
|
|
15
15
|
import '@bigbinary/neeto-time-zones';
|
|
16
16
|
import 'ua-parser-js';
|
|
17
17
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
@@ -22,6 +22,7 @@ import '@bigbinary/neetoui/Toastr';
|
|
|
22
22
|
import 'qs';
|
|
23
23
|
import '../../toConsumableArray-B7CFjjkW.js';
|
|
24
24
|
import '@rails/actioncable';
|
|
25
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
25
26
|
|
|
26
27
|
var getStorageValue = function getStorageValue(key, defaultValue) {
|
|
27
28
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocalStorage.js","sources":["../../../src/react-utils/useLocalStorage/useLocalStorage.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/no-local-storage */\n\nimport { useState } from \"react\";\n\nimport { isNil } from \"ramda\";\nimport { removeFromLocalStorage, setToLocalStorage } from \"utils\";\n\nconst getStorageValue = (key, defaultValue) => {\n try {\n const storedValue = localStorage.getItem(key);\n\n return storedValue ? JSON.parse(storedValue) : defaultValue;\n } catch (error) {\n logger.error(error);\n\n return defaultValue;\n }\n};\n\nconst useLocalStorage = (key, defaultValue) => {\n const [storedValue, setStoredValue] = useState(() =>\n getStorageValue(key, defaultValue)\n );\n\n const setValue = value =>\n setStoredValue(prevStoredValue => {\n const newValue =\n typeof value === \"function\" ? value(prevStoredValue) : value;\n\n if (isNil(newValue)) {\n removeFromLocalStorage(key);\n } else {\n setToLocalStorage(key, newValue);\n }\n\n return newValue;\n });\n\n return [storedValue, setValue];\n};\n\nexport default useLocalStorage;\n"],"names":["getStorageValue","key","defaultValue","storedValue","localStorage","getItem","JSON","parse","error","logger","useLocalStorage","_useState","useState","_useState2","_slicedToArray","setStoredValue","setValue","value","prevStoredValue","newValue","isNil","removeFromLocalStorage","setToLocalStorage"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocalStorage.js","sources":["../../../src/react-utils/useLocalStorage/useLocalStorage.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/no-local-storage */\n\nimport { useState } from \"react\";\n\nimport { isNil } from \"ramda\";\nimport { removeFromLocalStorage, setToLocalStorage } from \"utils\";\n\nconst getStorageValue = (key, defaultValue) => {\n try {\n const storedValue = localStorage.getItem(key);\n\n return storedValue ? JSON.parse(storedValue) : defaultValue;\n } catch (error) {\n logger.error(error);\n\n return defaultValue;\n }\n};\n\nconst useLocalStorage = (key, defaultValue) => {\n const [storedValue, setStoredValue] = useState(() =>\n getStorageValue(key, defaultValue)\n );\n\n const setValue = value =>\n setStoredValue(prevStoredValue => {\n const newValue =\n typeof value === \"function\" ? value(prevStoredValue) : value;\n\n if (isNil(newValue)) {\n removeFromLocalStorage(key);\n } else {\n setToLocalStorage(key, newValue);\n }\n\n return newValue;\n });\n\n return [storedValue, setValue];\n};\n\nexport default useLocalStorage;\n"],"names":["getStorageValue","key","defaultValue","storedValue","localStorage","getItem","JSON","parse","error","logger","useLocalStorage","_useState","useState","_useState2","_slicedToArray","setStoredValue","setValue","value","prevStoredValue","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GAAA;AAEJ,EAAA,OAAO,CAAChB,WAAW,EAAEa,QAAQ,CAAC;AAChC;;;;"}
|
|
@@ -9,7 +9,8 @@ import '../../utils/general.js';
|
|
|
9
9
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
10
10
|
import '../../slicedToArray-DmsZvA_9.js';
|
|
11
11
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
12
|
-
import '../../index-
|
|
12
|
+
import '../../index-DbuxAQMD.js';
|
|
13
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
13
14
|
import 'i18next';
|
|
14
15
|
import '@bigbinary/neeto-cist';
|
|
15
16
|
import '@bigbinary/neetoui/Toastr';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -8,7 +8,8 @@ import '../../typeof-D-UKOauR.js';
|
|
|
8
8
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
9
9
|
import '../../slicedToArray-DmsZvA_9.js';
|
|
10
10
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
11
|
-
import '../../index-
|
|
11
|
+
import '../../index-DbuxAQMD.js';
|
|
12
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
12
13
|
import 'i18next';
|
|
13
14
|
import '@bigbinary/neeto-cist';
|
|
14
15
|
import '@bigbinary/neetoui/Toastr';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePersistedQuery.js","sources":["../../../src/react-utils/usePersistedQuery/usePersistedQuery.js"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { isNil } from \"ramda\";\nimport { QUERY_CACHE_NAME_SPACE } from \"react-utils/constants\";\nimport { getFromLocalStorage, setToLocalStorage } from \"utils/general\";\n\nconst localStorageQueryCache = {\n set: (key, data) => {\n const cache = localStorageQueryCache.getAll();\n const newCache = { ...cache, [key]: { data, modifiedAt: Date.now() } };\n setToLocalStorage(QUERY_CACHE_NAME_SPACE, newCache);\n },\n getAll: () => {\n const cache = getFromLocalStorage(QUERY_CACHE_NAME_SPACE);\n if (!cache) return {};\n\n return cache;\n },\n get: key => localStorageQueryCache.getAll()[key],\n};\n\nconst isOutdated = (localCache, staleTime) => {\n if (isNil(localCache)) return true;\n\n if (isNil(staleTime)) return false;\n\n return localCache.modifiedAt <= Date.now() - staleTime;\n};\n\nconst usePersistedQuery = (queryKey, fetch, options) => {\n const queryResult = useQuery({\n queryKey,\n queryFn: fetch,\n ...options,\n });\n const localCache = localStorageQueryCache.get(queryKey);\n\n useEffect(() => {\n if (!queryResult.isSuccess) return;\n localStorageQueryCache.set(queryKey, queryResult.data);\n }, [queryKey, queryResult.data, queryResult.isSuccess]);\n\n if (isOutdated(localCache, options?.staleTime)) {\n return { ...queryResult, isFreshLoading: queryResult.isLoading };\n }\n\n return {\n ...queryResult,\n data: queryResult.data || localCache.data,\n isFreshLoading: false,\n };\n};\n\nusePersistedQuery.getCache = localStorageQueryCache.get;\n\nexport default usePersistedQuery;\n"],"names":["localStorageQueryCache","set","key","data","cache","getAll","newCache","_objectSpread","_defineProperty","modifiedAt","Date","now","setToLocalStorage","QUERY_CACHE_NAME_SPACE","getFromLocalStorage","get","isOutdated","localCache","staleTime","isNil","usePersistedQuery","queryKey","fetch","options","queryResult","useQuery","queryFn","useEffect","isSuccess","isFreshLoading","isLoading","getCache"],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePersistedQuery.js","sources":["../../../src/react-utils/usePersistedQuery/usePersistedQuery.js"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { isNil } from \"ramda\";\nimport { QUERY_CACHE_NAME_SPACE } from \"react-utils/constants\";\nimport { getFromLocalStorage, setToLocalStorage } from \"utils/general\";\n\nconst localStorageQueryCache = {\n set: (key, data) => {\n const cache = localStorageQueryCache.getAll();\n const newCache = { ...cache, [key]: { data, modifiedAt: Date.now() } };\n setToLocalStorage(QUERY_CACHE_NAME_SPACE, newCache);\n },\n getAll: () => {\n const cache = getFromLocalStorage(QUERY_CACHE_NAME_SPACE);\n if (!cache) return {};\n\n return cache;\n },\n get: key => localStorageQueryCache.getAll()[key],\n};\n\nconst isOutdated = (localCache, staleTime) => {\n if (isNil(localCache)) return true;\n\n if (isNil(staleTime)) return false;\n\n return localCache.modifiedAt <= Date.now() - staleTime;\n};\n\nconst usePersistedQuery = (queryKey, fetch, options) => {\n const queryResult = useQuery({\n queryKey,\n queryFn: fetch,\n ...options,\n });\n const localCache = localStorageQueryCache.get(queryKey);\n\n useEffect(() => {\n if (!queryResult.isSuccess) return;\n localStorageQueryCache.set(queryKey, queryResult.data);\n }, [queryKey, queryResult.data, queryResult.isSuccess]);\n\n if (isOutdated(localCache, options?.staleTime)) {\n return { ...queryResult, isFreshLoading: queryResult.isLoading };\n }\n\n return {\n ...queryResult,\n data: queryResult.data || localCache.data,\n isFreshLoading: false,\n };\n};\n\nusePersistedQuery.getCache = localStorageQueryCache.get;\n\nexport default usePersistedQuery;\n"],"names":["localStorageQueryCache","set","key","data","cache","getAll","newCache","_objectSpread","_defineProperty","modifiedAt","Date","now","setToLocalStorage","QUERY_CACHE_NAME_SPACE","getFromLocalStorage","get","isOutdated","localCache","staleTime","isNil","usePersistedQuery","queryKey","fetch","options","queryResult","useQuery","queryFn","useEffect","isSuccess","isFreshLoading","isLoading","getCache"],"mappings":";;;;;;;;;;;;;;;;;;;AAOA,IAAMA,sBAAsB,GAAG;AAC7BC,EAAAA,GAAG,EAAE,SAALA,GAAGA,CAAGC,GAAG,EAAEC,IAAI,EAAK;AAClB,IAAA,IAAMC,KAAK,GAAGJ,sBAAsB,CAACK,MAAM,EAAE;IAC7C,IAAMC,QAAQ,GAAAC,aAAA,CAAAA,aAAA,CAAQH,EAAAA,EAA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AW,CAACI,SAAS,EAAE;IAC5B5B,sBAAsB,CAACC,GAAG,CAACoB,QAAQ,EAAEG,WAAW,CAACrB,IAAI,CAAC;AACxD,GAAC,EAAE,CAACkB,QAAQ,EAAEG,WAAW,CAACrB,IAAI,EAAEqB,WAAW,CAACI,SAAS,CAAC,CAAC;AAEvD,EAAA,IAAIZ,UAAU,CAACC,UAAU,EAAEM,OAAO,KAAA,IAAA,IAAPA,OAAO,KAAA,MAAA,GAAA,MAAA,GAAPA,OAAO,CAAEL,SAAS,CAAC,EAAE;AAC9C,IAAA,OAAAX,aAAA,CAAAA,aAAA,CAAA,EAAA,EAAYiB,WAAW,CAAA,EAAA,EAAA,EAAA;MAAEK,cAAc,EAAEL,WAAW,CAACM;AAAS,KAAA,CAAA;AAChE;AAEA,EAAA,OAAAvB,aAAA,CAAAA,aAAA,CAAA,EAAA,EACKiB,WAAW,CAAA,EAAA,EAAA,EAAA;AACdrB,IAAAA,IAAI,EAAEqB,WAAW,CAACrB,IAAI,IAAIc,UAAU,CAACd,IAAI;AACzC0B,IAAAA,cAAc,EAAE;AAAK,GAAA,CAAA;AAEzB;AAEAT,iBAAiB,CAACW,QAAQ,GAAG/B,sBAAsB,CAACe,GAAG;;;;"}
|
|
@@ -4,7 +4,8 @@ import '../../utils/general.js';
|
|
|
4
4
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
5
5
|
import '../../slicedToArray-DmsZvA_9.js';
|
|
6
6
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
7
|
-
import '../../index-
|
|
7
|
+
import '../../index-DbuxAQMD.js';
|
|
8
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
8
9
|
import '../../defineProperty-CrCYjjU3.js';
|
|
9
10
|
import '../../typeof-D-UKOauR.js';
|
|
10
11
|
import 'i18next';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -3,7 +3,8 @@ import { parseQueryParams } from '../../utils/general.js';
|
|
|
3
3
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
4
4
|
import '../../slicedToArray-DmsZvA_9.js';
|
|
5
5
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
6
|
-
import '../../index-
|
|
6
|
+
import '../../index-DbuxAQMD.js';
|
|
7
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
7
8
|
import '../../defineProperty-CrCYjjU3.js';
|
|
8
9
|
import '../../typeof-D-UKOauR.js';
|
|
9
10
|
import 'i18next';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQueryParams.js","sources":["../../../src/react-utils/useQueryParams/useQueryParams.js"],"sourcesContent":["import { useLocation } from \"react-router-dom\";\nimport { parseQueryParams } from \"utils/general\";\n\nconst useQueryParams = options => {\n const location = useLocation();\n\n return parseQueryParams(location.search, options);\n};\n\nexport default useQueryParams;\n"],"names":["useQueryParams","options","location","useLocation","parseQueryParams","search"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useQueryParams.js","sources":["../../../src/react-utils/useQueryParams/useQueryParams.js"],"sourcesContent":["import { useLocation } from \"react-router-dom\";\nimport { parseQueryParams } from \"utils/general\";\n\nconst useQueryParams = options => {\n const location = useLocation();\n\n return parseQueryParams(location.search, options);\n};\n\nexport default useQueryParams;\n"],"names":["useQueryParams","options","location","useLocation","parseQueryParams","search"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAGC,OAAO,EAAI;AAChC,EAAA,IAAMC,QAAQ,GAAGC,WAAW,EAAE;AAE9B,EAAA,OAAOC,gBAAgB,CAACF,QAAQ,CAACG,MAAM,EAAEJ,OAAO,CAAC;AACnD;;;;"}
|
|
@@ -9,7 +9,8 @@ import '../../utils/general.js';
|
|
|
9
9
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
10
10
|
import '../../slicedToArray-DmsZvA_9.js';
|
|
11
11
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
12
|
-
import '../../index-
|
|
12
|
+
import '../../index-DbuxAQMD.js';
|
|
13
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
13
14
|
import 'i18next';
|
|
14
15
|
import '@bigbinary/neeto-cist';
|
|
15
16
|
import '@bigbinary/neetoui/Toastr';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,7 +10,8 @@ import '../../typeof-D-UKOauR.js';
|
|
|
10
10
|
import '../../objectWithoutProperties-DN7d1SzH.js';
|
|
11
11
|
import '../../slicedToArray-DmsZvA_9.js';
|
|
12
12
|
import '../../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
13
|
-
import '../../index-
|
|
13
|
+
import '../../index-DbuxAQMD.js';
|
|
14
|
+
import '../../_commonjsHelpers-BFTU3MAI.js';
|
|
14
15
|
import 'i18next';
|
|
15
16
|
import '@bigbinary/neeto-cist';
|
|
16
17
|
import '@bigbinary/neetoui/Toastr';
|
package/dist/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRegisterNavigationCheckpoint.js","sources":["../../../src/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport { mergeDeepLeft, pick, prop, dissoc } from \"ramda\";\nimport { STORAGE_KEY } from \"react-utils/constants\";\nimport withImmutableActions from \"react-utils/withImmutableActions\";\nimport { getFromLocalStorage, setToLocalStorage } from \"utils/general\";\nimport { create } from \"zustand\";\nimport { shallow } from \"zustand/shallow\";\n\nconst getLocalStorageData = () => getFromLocalStorage(STORAGE_KEY) || {};\n\nconst setLocalStorageData = data => setToLocalStorage(STORAGE_KEY, data);\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useCheckpointStore = create(\n withImmutableActions(set => ({\n checkpoints: {},\n setCheckpoint: (key, path) =>\n set(mergeDeepLeft({ checkpoints: { [key]: path } })),\n removeCheckpoint: key =>\n set(state => ({ checkpoints: dissoc(key, state.checkpoints) })),\n }))\n);\n\nconst useRegisterNavigationCheckpoint = (\n key,\n path = window.location.pathname + window.location.search,\n persistInLocalStorage = false\n) => {\n const setCheckpoint = useCheckpointStore(prop(\"setCheckpoint\"));\n\n useEffect(() => {\n setCheckpoint(key, path);\n if (persistInLocalStorage) {\n const localStorageData = getLocalStorageData();\n setLocalStorageData({ ...localStorageData, [key]: path });\n }\n }, [key, path, persistInLocalStorage]);\n};\n\nexport const useNavigationCheckpoints = (...keys) => {\n const getCheckpoints = useCheckpointStore(\n store => pick(keys, store.checkpoints),\n shallow\n );\n\n const localStorageData = getLocalStorageData();\n const localStorageCheckpoints = pick(keys, localStorageData);\n\n return { ...getCheckpoints, ...localStorageCheckpoints };\n};\n\nexport const useRemoveNavigationCheckpoint = () => {\n const removeCheckpoint = useCheckpointStore(prop(\"removeCheckpoint\"));\n\n return key => {\n removeCheckpoint(key);\n const localStorageData = getLocalStorageData();\n setLocalStorageData(dissoc(key, localStorageData));\n };\n};\n\nexport default useRegisterNavigationCheckpoint;\n"],"names":["getLocalStorageData","getFromLocalStorage","STORAGE_KEY","setLocalStorageData","data","setToLocalStorage","useCheckpointStore","create","withImmutableActions","set","checkpoints","setCheckpoint","key","path","mergeDeepLeft","_defineProperty","removeCheckpoint","state","dissoc","useRegisterNavigationCheckpoint","arguments","length","undefined","window","location","pathname","search","persistInLocalStorage","prop","useEffect","localStorageData","_objectSpread","useNavigationCheckpoints","_len","keys","Array","_key","getCheckpoints","store","pick","shallow","localStorageCheckpoints","useRemoveNavigationCheckpoint"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRegisterNavigationCheckpoint.js","sources":["../../../src/react-utils/useRegisterNavigationCheckpoint/useRegisterNavigationCheckpoint.js"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport { mergeDeepLeft, pick, prop, dissoc } from \"ramda\";\nimport { STORAGE_KEY } from \"react-utils/constants\";\nimport withImmutableActions from \"react-utils/withImmutableActions\";\nimport { getFromLocalStorage, setToLocalStorage } from \"utils/general\";\nimport { create } from \"zustand\";\nimport { shallow } from \"zustand/shallow\";\n\nconst getLocalStorageData = () => getFromLocalStorage(STORAGE_KEY) || {};\n\nconst setLocalStorageData = data => setToLocalStorage(STORAGE_KEY, data);\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useCheckpointStore = create(\n withImmutableActions(set => ({\n checkpoints: {},\n setCheckpoint: (key, path) =>\n set(mergeDeepLeft({ checkpoints: { [key]: path } })),\n removeCheckpoint: key =>\n set(state => ({ checkpoints: dissoc(key, state.checkpoints) })),\n }))\n);\n\nconst useRegisterNavigationCheckpoint = (\n key,\n path = window.location.pathname + window.location.search,\n persistInLocalStorage = false\n) => {\n const setCheckpoint = useCheckpointStore(prop(\"setCheckpoint\"));\n\n useEffect(() => {\n setCheckpoint(key, path);\n if (persistInLocalStorage) {\n const localStorageData = getLocalStorageData();\n setLocalStorageData({ ...localStorageData, [key]: path });\n }\n }, [key, path, persistInLocalStorage]);\n};\n\nexport const useNavigationCheckpoints = (...keys) => {\n const getCheckpoints = useCheckpointStore(\n store => pick(keys, store.checkpoints),\n shallow\n );\n\n const localStorageData = getLocalStorageData();\n const localStorageCheckpoints = pick(keys, localStorageData);\n\n return { ...getCheckpoints, ...localStorageCheckpoints };\n};\n\nexport const useRemoveNavigationCheckpoint = () => {\n const removeCheckpoint = useCheckpointStore(prop(\"removeCheckpoint\"));\n\n return key => {\n removeCheckpoint(key);\n const localStorageData = getLocalStorageData();\n setLocalStorageData(dissoc(key, localStorageData));\n };\n};\n\nexport default useRegisterNavigationCheckpoint;\n"],"names":["getLocalStorageData","getFromLocalStorage","STORAGE_KEY","setLocalStorageData","data","setToLocalStorage","useCheckpointStore","create","withImmutableActions","set","checkpoints","setCheckpoint","key","path","mergeDeepLeft","_defineProperty","removeCheckpoint","state","dissoc","useRegisterNavigationCheckpoint","arguments","length","undefined","window","location","pathname","search","persistInLocalStorage","prop","useEffect","localStorageData","_objectSpread","useNavigationCheckpoints","_len","keys","Array","_key","getCheckpoints","store","pick","shallow","localStorageCheckpoints","useRemoveNavigationCheckpoint"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,GAAA;AAAA,EAAA,OAASC,mBAAmB,CAACC,WAAW,CAAC,IAAI,EAAE;AAAA,CAAA;AAExE,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGC,IAAI,EAAA;AAAA,EAAA,OAAIC,iBAAiB,CAACH,WAAW,EAAEE,IAAI,CAAC;AAAA,CAAA;;AAExE;AACA,IAAME,kBAAkB,GAAGC,MAAM,CAC/BC,oBAAoB,CAAC,UAAAC,GAAG,EAAA;EAAA,OAAK;IAC3BC,WAAW,EAAE,EAAE;AACfC,IAAAA,aAAa,EAAE,SAAfA,aAAaA,CAAGC,GAAG,EAAEC,IAAI,EAAA;MAAA,OACvBJ,GAAG,CAACK,aAAa,CAAC;AAAEJ,QAAAA,WAAW,EAAAK,eAAA,CAAKH,EAAAA,EAAAA,GAAG,EAAGC,IAAI;AAAG,OAAC,CAAC,CAAC;AAAA,KAAA;AACtDG,IAAAA,gBAAgB,EAAE,SAAlBA,gBAAgBA,CAAEJ,GAAG,EAAA;MAAA,OACnBH,GAAG,CAAC,UAAAQ,KAAK,EAAA;QAAA,OAAK;AAAEP,UAAAA,WAAW,EAAEQ,MAAM,CAACN,GAAG,EAAEK,KAAK,CAACP,WAAW;SAAG;AAAA,OAAC,CAAC;AAAA;GAClE;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A;AAAA;AAC9C,EAAA,IAAMC,cAAc,GAAG/B,kBAAkB,CACvC,UAAAgC,KAAK,EAAA;AAAA,IAAA,OAAIC,IAAI,CAACL,IAAI,EAAEI,KAAK,CAAC5B,WAAW,CAAC;AAAA,GAAA,EACtC8B,OACF,CAAC;AAED,EAAA,IAAMV,gBAAgB,GAAG9B,mBAAmB,EAAE;AAC9C,EAAA,IAAMyC,uBAAuB,GAAGF,IAAI,CAACL,IAAI,EAAEJ,gBAAgB,CAAC;AAE5D,EAAA,OAAAC,aAAA,CAAAA,aAAA,CAAYM,EAAAA,EAAAA,cAAc,GAAKI,uBAAuB,CAAA;AACxD;IAEaC,6BAA6B,GAAG,SAAhCA,6BAA6BA,GAAS;EACjD,IAAM1B,gBAAgB,GAAGV,kBAAkB,CAACsB,IAAI,CAAC,kBAAkB,CAAC,CAAC;EAErE,OAAO,UAAAhB,GAAG,EAAI;IACZI,gBAAgB,CAACJ,GAAG,CAAC;AACrB,IAAA,IAAMkB,gBAAgB,GAAG9B,mBAAmB,EAAE;AAC9CG,IAAAA,mBAAmB,CAACe,MAAM,CAACN,GAAG,EAAEkB,gBAAgB,CAAC,CAAC;GACnD;AACH;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as lodashExports } from '../lodash-M8VRFvKw.js';
|
|
2
|
+
import '../_commonjsHelpers-BFTU3MAI.js';
|
|
2
3
|
|
|
3
|
-
var captureAnalyticsEvent = function captureAnalyticsEvent(
|
|
4
|
-
|
|
5
|
-
return mixpanel.track(name, properties);
|
|
4
|
+
var captureAnalyticsEvent = function captureAnalyticsEvent(_name) {
|
|
5
|
+
return lodashExports.noop();
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export { captureAnalyticsEvent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captureAnalyticsEvent.js","sources":["../../src/utils/captureAnalyticsEvent.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"captureAnalyticsEvent.js","sources":["../../src/utils/captureAnalyticsEvent.js"],"sourcesContent":["import { noop } from \"lodash\";\n\nexport const captureAnalyticsEvent = (_name, _properties = {}) => noop();\n"],"names":["captureAnalyticsEvent","_name","noop"],"mappings":";;;IAEaA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIC,KAAK,EAAA;EAAkB,OAAKC,kBAAI,EAAE;AAAA;;;;"}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import '../typeof-D-UKOauR.js';
|
|
1
|
+
import { l as lodashExports } from '../lodash-M8VRFvKw.js';
|
|
2
|
+
import '../_commonjsHelpers-BFTU3MAI.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var captureAnalyticsPageView = function captureAnalyticsPageView(page) {
|
|
8
|
-
var properties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9
|
-
return mixpanel.track_pageview(_objectSpread({
|
|
10
|
-
page: page
|
|
11
|
-
}, properties));
|
|
4
|
+
var captureAnalyticsPageView = function captureAnalyticsPageView(_page) {
|
|
5
|
+
return lodashExports.noop();
|
|
12
6
|
};
|
|
13
7
|
|
|
14
8
|
export { captureAnalyticsPageView };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captureAnalyticsPageView.js","sources":["../../src/utils/captureAnalyticsPageView.js"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"captureAnalyticsPageView.js","sources":["../../src/utils/captureAnalyticsPageView.js"],"sourcesContent":["import { noop } from \"lodash\";\n\nexport const captureAnalyticsPageView = (_page, _properties = {}) => noop();\n"],"names":["captureAnalyticsPageView","_page","noop"],"mappings":";;;IAEaA,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAIC,KAAK,EAAA;EAAkB,OAAKC,kBAAI,EAAE;AAAA;;;;"}
|
|
@@ -3,7 +3,8 @@ import { buildUrl } from './general.js';
|
|
|
3
3
|
import '../objectWithoutProperties-DN7d1SzH.js';
|
|
4
4
|
import '../slicedToArray-DmsZvA_9.js';
|
|
5
5
|
import '../unsupportedIterableToArray-Dqz8Y8_I.js';
|
|
6
|
-
import '../index-
|
|
6
|
+
import '../index-DbuxAQMD.js';
|
|
7
|
+
import '../_commonjsHelpers-BFTU3MAI.js';
|
|
7
8
|
import '../defineProperty-CrCYjjU3.js';
|
|
8
9
|
import '../typeof-D-UKOauR.js';
|
|
9
10
|
import 'i18next';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSubscription.js","sources":["../../src/utils/createSubscription.js"],"sourcesContent":["import { createConsumer } from \"@rails/actioncable\";\nimport { buildUrl } from \"utils/general\";\n\nconst getWebsocketURL = () => {\n const websocketURL = document.querySelector(\n 'meta[name=\"action-cable-url\"]'\n )?.content;\n\n return buildUrl(websocketURL, {\n subdomain: globalProps.organization.subdomain,\n });\n};\n\nconst consumer = createConsumer(getWebsocketURL);\n\nexport const createSubscription = (channelName, callbacks) =>\n consumer.subscriptions.create(channelName, callbacks);\n"],"names":["getWebsocketURL","_document$querySelect","websocketURL","document","querySelector","content","buildUrl","subdomain","globalProps","organization","consumer","createConsumer","createSubscription","channelName","callbacks","subscriptions","create"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createSubscription.js","sources":["../../src/utils/createSubscription.js"],"sourcesContent":["import { createConsumer } from \"@rails/actioncable\";\nimport { buildUrl } from \"utils/general\";\n\nconst getWebsocketURL = () => {\n const websocketURL = document.querySelector(\n 'meta[name=\"action-cable-url\"]'\n )?.content;\n\n return buildUrl(websocketURL, {\n subdomain: globalProps.organization.subdomain,\n });\n};\n\nconst consumer = createConsumer(getWebsocketURL);\n\nexport const createSubscription = (channelName, callbacks) =>\n consumer.subscriptions.create(channelName, callbacks);\n"],"names":["getWebsocketURL","_document$querySelect","websocketURL","document","querySelector","content","buildUrl","subdomain","globalProps","organization","consumer","createConsumer","createSubscription","channelName","callbacks","subscriptions","create"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,GAAS;AAAA,EAAA,IAAAC,qBAAA;AAC5B,EAAA,IAAMC,YAAY,GAAA,CAAAD,qBAAA,GAAGE,QAAQ,CAACC,aAAa,CACzC,+BACF,CAAC,MAAAH,IAAAA,IAAAA,qBAAA,KAFoBA,MAAAA,GAAAA,MAAAA,GAAAA,qBAAA,CAElBI,OAAO;EAEV,OAAOC,QAAQ,CAACJ,YAAY,EAAE;AAC5BK,IAAAA,SAAS,EAAEC,WAAW,CAACC,YAAY,CAACF;AACtC,GAAC,CAAC;AACJ,CAAC;AAED,IAAMG,QAAQ,GAAGC,cAAc,CAACX,eAAe,CAAC;AAEzC,IAAMY,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,WAAW,EAAEC,SAAS,EAAA;EAAA,OACvDJ,QAAQ,CAACK,aAAa,CAACC,MAAM,CAACH,WAAW,EAAEC,SAAS,CAAC;AAAA;;;;"}
|
|
@@ -245,7 +245,7 @@ var parseFormattedInput = function parseFormattedInput(input, format, utc, dayjs
|
|
|
245
245
|
return new Date(""); // Invalid Date
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var
|
|
248
|
+
var customParseFormat = (function (o, C, d) {
|
|
249
249
|
d.p.customParseFormat = true;
|
|
250
250
|
if (o && o.parseTwoDigitYear) {
|
|
251
251
|
parseTwoDigitYear = o.parseTwoDigitYear;
|
|
@@ -302,5 +302,5 @@ var customParseFormatPlugin = (function (o, C, d) {
|
|
|
302
302
|
};
|
|
303
303
|
});
|
|
304
304
|
|
|
305
|
-
export {
|
|
305
|
+
export { customParseFormat as default };
|
|
306
306
|
//# sourceMappingURL=customParseFormatPlugin.js.map
|