@bigbinary/neeto-commons-frontend 4.13.26 → 4.13.28
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/cjs/react-utils/HoneybadgerErrorBoundary/constants.js +1 -1
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/constants.js.map +1 -1
- package/dist/cjs/react-utils/PrivateRoute/PrivateRoute.js +7 -3
- package/dist/cjs/react-utils/PrivateRoute/PrivateRoute.js.map +1 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/constants.js +1 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/constants.js.map +1 -1
- package/dist/react-utils/PrivateRoute/PrivateRoute.js +7 -3
- package/dist/react-utils/PrivateRoute/PrivateRoute.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var IGNORABLE_ERRORS_REGEX = new RegExp(["window.requestAnimationFrame", "ResizeObserver", "ChunkLoadError", "window.webkit.messageHandlers", "Request aborted", "Network Error", "Cannot redefine property: googletag", "Failed to execute 'removeChild' on 'Node'", "Failed to execute 'insertBefore' on 'Node'", "Can't find variable: disableWebkitEnterFullscreen", "rendererInterfaces is null", "Can't find variable: gmo", "Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'blob:.*' failed to load.", "Can't find variable: zaloJSV2"].join("|"));
|
|
3
|
+
var IGNORABLE_ERRORS_REGEX = new RegExp(["window.requestAnimationFrame", "ResizeObserver", "ChunkLoadError", "window.webkit.messageHandlers", "Request aborted", "Network Error", "Cannot redefine property: googletag", "Failed to execute 'removeChild' on 'Node'", "Failed to execute 'insertBefore' on 'Node'", "Can't find variable: disableWebkitEnterFullscreen", "rendererInterfaces is null", "Can't find variable: gmo", "Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'blob:.*' failed to load.", "Can't find variable: zaloJSV2", "Importing a module script failed"].join("|"));
|
|
4
4
|
var IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;
|
|
5
5
|
|
|
6
6
|
exports.IGNORABLE_ERRORS_REGEX = IGNORABLE_ERRORS_REGEX;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX = new RegExp(\n [\n \"window.requestAnimationFrame\",\n \"ResizeObserver\",\n \"ChunkLoadError\",\n \"window.webkit.messageHandlers\",\n \"Request aborted\",\n \"Network Error\",\n \"Cannot redefine property: googletag\",\n \"Failed to execute 'removeChild' on 'Node'\",\n \"Failed to execute 'insertBefore' on 'Node'\",\n \"Can't find variable: disableWebkitEnterFullscreen\",\n \"rendererInterfaces is null\",\n \"Can't find variable: gmo\",\n \"Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'blob:.*' failed to load.\",\n \"Can't find variable: zaloJSV2\",\n ].join(\"|\")\n);\nexport const IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;\n"],"names":["IGNORABLE_ERRORS_REGEX","RegExp","join","IGNORABLE_ERROR_NAMES_REGEX"],"mappings":";;IAAaA,sBAAsB,GAAG,IAAIC,MAAM,CAC9C,CACE,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAChB,+BAA+B,EAC/B,iBAAiB,EACjB,eAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,4CAA4C,EAC5C,mDAAmD,EACnD,4BAA4B,EAC5B,0BAA0B,EAC1B,0HAA0H,EAC1H,+BAA+B,
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX = new RegExp(\n [\n \"window.requestAnimationFrame\",\n \"ResizeObserver\",\n \"ChunkLoadError\",\n \"window.webkit.messageHandlers\",\n \"Request aborted\",\n \"Network Error\",\n \"Cannot redefine property: googletag\",\n \"Failed to execute 'removeChild' on 'Node'\",\n \"Failed to execute 'insertBefore' on 'Node'\",\n \"Can't find variable: disableWebkitEnterFullscreen\",\n \"rendererInterfaces is null\",\n \"Can't find variable: gmo\",\n \"Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'blob:.*' failed to load.\",\n \"Can't find variable: zaloJSV2\",\n \"Importing a module script failed\",\n ].join(\"|\")\n);\nexport const IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;\n"],"names":["IGNORABLE_ERRORS_REGEX","RegExp","join","IGNORABLE_ERROR_NAMES_REGEX"],"mappings":";;IAAaA,sBAAsB,GAAG,IAAIC,MAAM,CAC9C,CACE,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAChB,+BAA+B,EAC/B,iBAAiB,EACjB,eAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,4CAA4C,EAC5C,mDAAmD,EACnD,4BAA4B,EAC5B,0BAA0B,EAC1B,0HAA0H,EAC1H,+BAA+B,EAC/B,kCAAkC,CACnC,CAACC,IAAI,CAAC,GAAG,CACZ,EAAC;AACM,IAAMC,2BAA2B,GAAG;;;;;"}
|
|
@@ -23,9 +23,13 @@ var PrivateRoute = function PrivateRoute(_ref) {
|
|
|
23
23
|
props = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
|
|
24
24
|
if (condition) {
|
|
25
25
|
if (permissions) {
|
|
26
|
-
return globalProps.permissions.some(ramda.includes(ramda.__, permissions)) ? /*#__PURE__*/jsxRuntime.jsx(reactRouterDom.Route, _objectSpread({}, props)) :
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
return globalProps.permissions.some(ramda.includes(ramda.__, permissions)) ? /*#__PURE__*/jsxRuntime.jsx(reactRouterDom.Route, _objectSpread({}, props)) : /*#__PURE__*/jsxRuntime.jsx(reactRouterDom.Route, _objectSpread(_objectSpread({}, props), {}, {
|
|
27
|
+
component: function component() {
|
|
28
|
+
return errorPage || /*#__PURE__*/jsxRuntime.jsx(ErrorPage, {
|
|
29
|
+
status: 403
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
29
33
|
}
|
|
30
34
|
return /*#__PURE__*/jsxRuntime.jsx(reactRouterDom.Route, _objectSpread({}, props));
|
|
31
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateRoute.js","sources":["../../../../src/react-utils/PrivateRoute/PrivateRoute.jsx"],"sourcesContent":["import ErrorPage from \"neetomolecules/ErrorPage\";\nimport { __, includes } from \"ramda\";\nimport { Redirect, Route } from \"react-router-dom\";\n\nconst PrivateRoute = ({\n condition = globalProps.authenticated,\n redirectRoute = undefined,\n errorPage = undefined,\n permissions = undefined,\n ...props\n}) => {\n if (condition) {\n if (permissions) {\n return globalProps.permissions.some(includes(__, permissions)) ? (\n <Route {...props} />\n ) : (\n errorPage || <ErrorPage status={403} />\n );\n }\n\n return <Route {...props} />;\n }\n\n if (redirectRoute) {\n return <Redirect to={{ pathname: redirectRoute }} />;\n }\n\n return errorPage || <ErrorPage status={403} />;\n};\n\nexport default PrivateRoute;\n"],"names":["PrivateRoute","_ref","_ref$condition","condition","globalProps","authenticated","_ref$redirectRoute","redirectRoute","undefined","_ref$errorPage","errorPage","_ref$permissions","permissions","props","_objectWithoutProperties","_excluded","some","includes","__","_jsx","Route","_objectSpread","ErrorPage","status","Redirect","to","pathname"],"mappings":";;;;;;;;;;;;;AAIA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAMZ;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CALJE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAGE,WAAW,CAACC,aAAa,GAAAH,cAAA;IAAAI,kBAAA,GAAAL,IAAA,CACrCM,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAGE,KAAAA,CAAAA,GAAAA,SAAS,GAAAF,kBAAA;IAAAG,cAAA,GAAAR,IAAA,CACzBS,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAGD,KAAAA,CAAAA,GAAAA,SAAS,GAAAC,cAAA;IAAAE,gBAAA,GAAAV,IAAA,CACrBW,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAGH,KAAAA,CAAAA,GAAAA,SAAS,GAAAG,gBAAA;AACpBE,IAAAA,KAAK,GAAAC,gDAAA,CAAAb,IAAA,EAAAc,SAAA,CAAA,CAAA;AAER,EAAA,IAAIZ,SAAS,EAAE;AACb,IAAA,IAAIS,WAAW,EAAE;AACf,MAAA,OAAOR,WAAW,CAACQ,WAAW,CAACI,IAAI,CAACC,cAAQ,CAACC,QAAE,EAAEN,WAAW,CAAC,CAAC,gBAC5DO,cAAA,CAACC,oBAAK,EAAAC,aAAA,CAAA,EAAA,EAAKR,KAAK,CAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"PrivateRoute.js","sources":["../../../../src/react-utils/PrivateRoute/PrivateRoute.jsx"],"sourcesContent":["import ErrorPage from \"neetomolecules/ErrorPage\";\nimport { __, includes } from \"ramda\";\nimport { Redirect, Route } from \"react-router-dom\";\n\nconst PrivateRoute = ({\n condition = globalProps.authenticated,\n redirectRoute = undefined,\n errorPage = undefined,\n permissions = undefined,\n ...props\n}) => {\n if (condition) {\n if (permissions) {\n return globalProps.permissions.some(includes(__, permissions)) ? (\n <Route {...props} />\n ) : (\n <Route\n {...props}\n component={() => errorPage || <ErrorPage status={403} />}\n />\n );\n }\n\n return <Route {...props} />;\n }\n\n if (redirectRoute) {\n return <Redirect to={{ pathname: redirectRoute }} />;\n }\n\n return errorPage || <ErrorPage status={403} />;\n};\n\nexport default PrivateRoute;\n"],"names":["PrivateRoute","_ref","_ref$condition","condition","globalProps","authenticated","_ref$redirectRoute","redirectRoute","undefined","_ref$errorPage","errorPage","_ref$permissions","permissions","props","_objectWithoutProperties","_excluded","some","includes","__","_jsx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AACH,KAAA;IAEA,oBAAOL,cAAA,CAACC,oBAAK,EAAAC,aAAA,CAAKR,EAAAA,EAAAA,KAAK,CAAG,CAAC,CAAA;AAC7B,GAAA;AAEA,EAAA,IAAIN,aAAa,EAAE;IACjB,oBAAOY,cAAA,CAACM,uBAAQ,EAAA;AAACC,MAAAA,EAAE,EAAE;AAAEC,QAAAA,QAAQ,EAAEpB,aAAAA;AAAc,OAAA;AAAE,KAAE,CAAC,CAAA;AACtD,GAAA;AAEA,EAAA,OAAOG,SAAS,iBAAIS,cAAA,CAACI,SAAS,EAAA;AAACC,IAAAA,MAAM,EAAE,GAAA;AAAI,GAAE,CAAC,CAAA;AAChD;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var IGNORABLE_ERRORS_REGEX = new RegExp(["window.requestAnimationFrame", "ResizeObserver", "ChunkLoadError", "window.webkit.messageHandlers", "Request aborted", "Network Error", "Cannot redefine property: googletag", "Failed to execute 'removeChild' on 'Node'", "Failed to execute 'insertBefore' on 'Node'", "Can't find variable: disableWebkitEnterFullscreen", "rendererInterfaces is null", "Can't find variable: gmo", "Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'blob:.*' failed to load.", "Can't find variable: zaloJSV2"].join("|"));
|
|
1
|
+
var IGNORABLE_ERRORS_REGEX = new RegExp(["window.requestAnimationFrame", "ResizeObserver", "ChunkLoadError", "window.webkit.messageHandlers", "Request aborted", "Network Error", "Cannot redefine property: googletag", "Failed to execute 'removeChild' on 'Node'", "Failed to execute 'insertBefore' on 'Node'", "Can't find variable: disableWebkitEnterFullscreen", "rendererInterfaces is null", "Can't find variable: gmo", "Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'blob:.*' failed to load.", "Can't find variable: zaloJSV2", "Importing a module script failed"].join("|"));
|
|
2
2
|
var IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;
|
|
3
3
|
|
|
4
4
|
export { IGNORABLE_ERRORS_REGEX, IGNORABLE_ERROR_NAMES_REGEX };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX = new RegExp(\n [\n \"window.requestAnimationFrame\",\n \"ResizeObserver\",\n \"ChunkLoadError\",\n \"window.webkit.messageHandlers\",\n \"Request aborted\",\n \"Network Error\",\n \"Cannot redefine property: googletag\",\n \"Failed to execute 'removeChild' on 'Node'\",\n \"Failed to execute 'insertBefore' on 'Node'\",\n \"Can't find variable: disableWebkitEnterFullscreen\",\n \"rendererInterfaces is null\",\n \"Can't find variable: gmo\",\n \"Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'blob:.*' failed to load.\",\n \"Can't find variable: zaloJSV2\",\n ].join(\"|\")\n);\nexport const IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;\n"],"names":["IGNORABLE_ERRORS_REGEX","RegExp","join","IGNORABLE_ERROR_NAMES_REGEX"],"mappings":"IAAaA,sBAAsB,GAAG,IAAIC,MAAM,CAC9C,CACE,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAChB,+BAA+B,EAC/B,iBAAiB,EACjB,eAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,4CAA4C,EAC5C,mDAAmD,EACnD,4BAA4B,EAC5B,0BAA0B,EAC1B,0HAA0H,EAC1H,+BAA+B,
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX = new RegExp(\n [\n \"window.requestAnimationFrame\",\n \"ResizeObserver\",\n \"ChunkLoadError\",\n \"window.webkit.messageHandlers\",\n \"Request aborted\",\n \"Network Error\",\n \"Cannot redefine property: googletag\",\n \"Failed to execute 'removeChild' on 'Node'\",\n \"Failed to execute 'insertBefore' on 'Node'\",\n \"Can't find variable: disableWebkitEnterFullscreen\",\n \"rendererInterfaces is null\",\n \"Can't find variable: gmo\",\n \"Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'blob:.*' failed to load.\",\n \"Can't find variable: zaloJSV2\",\n \"Importing a module script failed\",\n ].join(\"|\")\n);\nexport const IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;\n"],"names":["IGNORABLE_ERRORS_REGEX","RegExp","join","IGNORABLE_ERROR_NAMES_REGEX"],"mappings":"IAAaA,sBAAsB,GAAG,IAAIC,MAAM,CAC9C,CACE,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAChB,+BAA+B,EAC/B,iBAAiB,EACjB,eAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,4CAA4C,EAC5C,mDAAmD,EACnD,4BAA4B,EAC5B,0BAA0B,EAC1B,0HAA0H,EAC1H,+BAA+B,EAC/B,kCAAkC,CACnC,CAACC,IAAI,CAAC,GAAG,CACZ,EAAC;AACM,IAAMC,2BAA2B,GAAG;;;;"}
|
|
@@ -21,9 +21,13 @@ var PrivateRoute = function PrivateRoute(_ref) {
|
|
|
21
21
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
22
|
if (condition) {
|
|
23
23
|
if (permissions) {
|
|
24
|
-
return globalProps.permissions.some(includes(__, permissions)) ? /*#__PURE__*/jsx(Route, _objectSpread({}, props)) :
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
return globalProps.permissions.some(includes(__, permissions)) ? /*#__PURE__*/jsx(Route, _objectSpread({}, props)) : /*#__PURE__*/jsx(Route, _objectSpread(_objectSpread({}, props), {}, {
|
|
25
|
+
component: function component() {
|
|
26
|
+
return errorPage || /*#__PURE__*/jsx(ErrorPage, {
|
|
27
|
+
status: 403
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
27
31
|
}
|
|
28
32
|
return /*#__PURE__*/jsx(Route, _objectSpread({}, props));
|
|
29
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateRoute.js","sources":["../../../src/react-utils/PrivateRoute/PrivateRoute.jsx"],"sourcesContent":["import ErrorPage from \"neetomolecules/ErrorPage\";\nimport { __, includes } from \"ramda\";\nimport { Redirect, Route } from \"react-router-dom\";\n\nconst PrivateRoute = ({\n condition = globalProps.authenticated,\n redirectRoute = undefined,\n errorPage = undefined,\n permissions = undefined,\n ...props\n}) => {\n if (condition) {\n if (permissions) {\n return globalProps.permissions.some(includes(__, permissions)) ? (\n <Route {...props} />\n ) : (\n errorPage || <ErrorPage status={403} />\n );\n }\n\n return <Route {...props} />;\n }\n\n if (redirectRoute) {\n return <Redirect to={{ pathname: redirectRoute }} />;\n }\n\n return errorPage || <ErrorPage status={403} />;\n};\n\nexport default PrivateRoute;\n"],"names":["PrivateRoute","_ref","_ref$condition","condition","globalProps","authenticated","_ref$redirectRoute","redirectRoute","undefined","_ref$errorPage","errorPage","_ref$permissions","permissions","props","_objectWithoutProperties","_excluded","some","includes","__","_jsx","Route","_objectSpread","ErrorPage","status","Redirect","to","pathname"],"mappings":";;;;;;;;;;;AAIA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAMZ;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CALJE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAGE,WAAW,CAACC,aAAa,GAAAH,cAAA;IAAAI,kBAAA,GAAAL,IAAA,CACrCM,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAGE,KAAAA,CAAAA,GAAAA,SAAS,GAAAF,kBAAA;IAAAG,cAAA,GAAAR,IAAA,CACzBS,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAGD,KAAAA,CAAAA,GAAAA,SAAS,GAAAC,cAAA;IAAAE,gBAAA,GAAAV,IAAA,CACrBW,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAGH,KAAAA,CAAAA,GAAAA,SAAS,GAAAG,gBAAA;AACpBE,IAAAA,KAAK,GAAAC,wBAAA,CAAAb,IAAA,EAAAc,SAAA,CAAA,CAAA;AAER,EAAA,IAAIZ,SAAS,EAAE;AACb,IAAA,IAAIS,WAAW,EAAE;AACf,MAAA,OAAOR,WAAW,CAACQ,WAAW,CAACI,IAAI,CAACC,QAAQ,CAACC,EAAE,EAAEN,WAAW,CAAC,CAAC,gBAC5DO,GAAA,CAACC,KAAK,EAAAC,aAAA,CAAA,EAAA,EAAKR,KAAK,CAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"PrivateRoute.js","sources":["../../../src/react-utils/PrivateRoute/PrivateRoute.jsx"],"sourcesContent":["import ErrorPage from \"neetomolecules/ErrorPage\";\nimport { __, includes } from \"ramda\";\nimport { Redirect, Route } from \"react-router-dom\";\n\nconst PrivateRoute = ({\n condition = globalProps.authenticated,\n redirectRoute = undefined,\n errorPage = undefined,\n permissions = undefined,\n ...props\n}) => {\n if (condition) {\n if (permissions) {\n return globalProps.permissions.some(includes(__, permissions)) ? (\n <Route {...props} />\n ) : (\n <Route\n {...props}\n component={() => errorPage || <ErrorPage status={403} />}\n />\n );\n }\n\n return <Route {...props} />;\n }\n\n if (redirectRoute) {\n return <Redirect to={{ pathname: redirectRoute }} />;\n }\n\n return errorPage || <ErrorPage status={403} />;\n};\n\nexport default PrivateRoute;\n"],"names":["PrivateRoute","_ref","_ref$condition","condition","globalProps","authenticated","_ref$redirectRoute","redirectRoute","undefined","_ref$errorPage","errorPage","_ref$permissions","permissions","props","_objectWithoutProperties","_excluded","some","includes","__","_jsx","Route","_objectSpread","component","ErrorPage","status","Redirect","to","pathname"],"mappings":";;;;;;;;;;;AAIA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAMZ;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CALJE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAGE,W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AAEpB,aAAAA;AAAc,OAAA;AAAE,KAAE,CAAC,CAAA;AACtD,GAAA;AAEA,EAAA,OAAOG,SAAS,iBAAIS,GAAA,CAACI,SAAS,EAAA;AAACC,IAAAA,MAAM,EAAE,GAAA;AAAI,GAAE,CAAC,CAAA;AAChD;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.28",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|