@erpsquad/common 1.10.8-test → 1.10.9-test

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.
Files changed (52) hide show
  1. package/dist/chunks/{ai-summary-D9QajB4_.js → ai-summary-4NVNEHfi.js} +2 -2
  2. package/dist/chunks/{ai-summary-D9QajB4_.js.map → ai-summary-4NVNEHfi.js.map} +1 -1
  3. package/dist/chunks/{ai-summary-FqAUpafL.esm.js → ai-summary-f8clWLbW.esm.js} +65 -44
  4. package/dist/chunks/{ai-summary-FqAUpafL.esm.js.map → ai-summary-f8clWLbW.esm.js.map} +1 -1
  5. package/dist/chunks/{android-12-switch-BVabRCje.esm.js → android-12-switch-BUbQYnRQ.esm.js} +53 -35
  6. package/dist/chunks/{android-12-switch-BVabRCje.esm.js.map → android-12-switch-BUbQYnRQ.esm.js.map} +1 -1
  7. package/dist/chunks/android-12-switch-CphTHRb8.js +2 -0
  8. package/dist/chunks/{android-12-switch-DMaoWQwq.js.map → android-12-switch-CphTHRb8.js.map} +1 -1
  9. package/dist/chunks/{appbar-6Ucw59ku.js → appbar-C6Es9HGk.js} +2 -2
  10. package/dist/chunks/{appbar-6Ucw59ku.js.map → appbar-C6Es9HGk.js.map} +1 -1
  11. package/dist/chunks/{appbar-mDf1LZ0u.esm.js → appbar-CKrHdx9n.esm.js} +2 -2
  12. package/dist/chunks/{appbar-mDf1LZ0u.esm.js.map → appbar-CKrHdx9n.esm.js.map} +1 -1
  13. package/dist/chunks/{default-data-CwLgBvlI.esm.js → default-data-BsZWgQGR.esm.js} +3 -3
  14. package/dist/chunks/{default-data-CwLgBvlI.esm.js.map → default-data-BsZWgQGR.esm.js.map} +1 -1
  15. package/dist/chunks/{default-data-D2cqOmp4.js → default-data-Dsjlvwev.js} +2 -2
  16. package/dist/chunks/{default-data-D2cqOmp4.js.map → default-data-Dsjlvwev.js.map} +1 -1
  17. package/dist/chunks/{fullScreen-VlXxoepU.js → fullScreen-BBpaDn-A.js} +2 -2
  18. package/dist/chunks/{fullScreen-VlXxoepU.js.map → fullScreen-BBpaDn-A.js.map} +1 -1
  19. package/dist/chunks/{fullScreen-B9d2_kak.esm.js → fullScreen-Dn-3Tkwm.esm.js} +2 -2
  20. package/dist/chunks/{fullScreen-B9d2_kak.esm.js.map → fullScreen-Dn-3Tkwm.esm.js.map} +1 -1
  21. package/dist/chunks/index-B9CFxEZ9.js +2 -0
  22. package/dist/chunks/index-B9CFxEZ9.js.map +1 -0
  23. package/dist/chunks/{index-iPYNYnNP.esm.js → index-wf5q5BST.esm.js} +73 -66
  24. package/dist/chunks/{index-iPYNYnNP.esm.js.map → index-wf5q5BST.esm.js.map} +1 -1
  25. package/dist/chunks/{migration-utils-TYitNMC7.js → migration-utils-9IXhe_fj.js} +2 -2
  26. package/dist/chunks/{migration-utils-TYitNMC7.js.map → migration-utils-9IXhe_fj.js.map} +1 -1
  27. package/dist/chunks/{migration-utils-BRjncD-b.esm.js → migration-utils-DGoEzQUj.esm.js} +2 -2
  28. package/dist/chunks/{migration-utils-BRjncD-b.esm.js.map → migration-utils-DGoEzQUj.esm.js.map} +1 -1
  29. package/dist/chunks/{sidebar-DJREtRnK.js → sidebar-B3SExDRU.js} +2 -2
  30. package/dist/chunks/{sidebar-DJREtRnK.js.map → sidebar-B3SExDRU.js.map} +1 -1
  31. package/dist/chunks/{sidebar-D_3INLNa.esm.js → sidebar-n9Y25HU-.esm.js} +2 -2
  32. package/dist/chunks/{sidebar-D_3INLNa.esm.js.map → sidebar-n9Y25HU-.esm.js.map} +1 -1
  33. package/dist/chunks/{sidebarScreen-CUf5Onkp.js → sidebarScreen-Dxb_e58p.js} +2 -2
  34. package/dist/chunks/{sidebarScreen-CUf5Onkp.js.map → sidebarScreen-Dxb_e58p.js.map} +1 -1
  35. package/dist/chunks/{sidebarScreen-CLjYZOzQ.esm.js → sidebarScreen-_Zt2pSOx.esm.js} +3 -3
  36. package/dist/chunks/{sidebarScreen-CLjYZOzQ.esm.js.map → sidebarScreen-_Zt2pSOx.esm.js.map} +1 -1
  37. package/dist/components/index.esm.js +121 -103
  38. package/dist/components/index.js +1 -1
  39. package/dist/index.esm.js +218 -200
  40. package/dist/index.js +1 -1
  41. package/dist/index.js.map +1 -1
  42. package/dist/layout/index.esm.js +2 -2
  43. package/dist/layout/index.js +1 -1
  44. package/dist/src/components/index.d.ts +18 -1
  45. package/dist/utils/index.esm.js +1 -1
  46. package/dist/utils/index.js +1 -1
  47. package/dist/views/index.esm.js +5 -5
  48. package/dist/views/index.js +1 -1
  49. package/package.json +1 -1
  50. package/dist/chunks/android-12-switch-DMaoWQwq.js +0 -2
  51. package/dist/chunks/index-BQ2NBHDS.js +0 -2
  52. package/dist/chunks/index-BQ2NBHDS.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index-iPYNYnNP.esm.js","sources":["../../node_modules/object-assign/index.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/prop-types/lib/has.js","../../node_modules/prop-types/checkPropTypes.js","../../node_modules/prop-types/factoryWithTypeCheckers.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/index.js"],"sourcesContent":["/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n"],"names":["has","require$$0","require$$1","require$$2","require$$3","checkPropTypes","require$$4","printWarning","i","checker","propT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-assign/index.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/prop-types/lib/has.js","../../node_modules/prop-types/checkPropTypes.js","../../node_modules/prop-types/factoryWithTypeCheckers.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/index.js"],"sourcesContent":["/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n"],"names":["require$$0","has","require$$1","require$$2","require$$3","require$$4","i","checker","propTypesModule"],"mappings":";;;;;;;;;;;;;AAQA,MAAI,wBAAwB,OAAO;AACnC,MAAI,iBAAiB,OAAO,UAAU;AACtC,MAAI,mBAAmB,OAAO,UAAU;AAExC,WAAS,SAAS,KAAK;AACtB,QAAI,QAAQ,QAAQ,QAAQ,QAAW;AACtC,YAAM,IAAI,UAAU,uDAAuD;AAAA,IAC7E;AAEC,WAAO,OAAO,GAAG;AAAA,EAClB;AAEA,WAAS,kBAAkB;AAC1B,QAAI;AACH,UAAI,CAAC,OAAO,QAAQ;AACnB,eAAO;AAAA,MACV;AAKE,UAAI,QAAQ,IAAI,OAAO,KAAK;AAC5B,YAAM,CAAC,IAAI;AACX,UAAI,OAAO,oBAAoB,KAAK,EAAE,CAAC,MAAM,KAAK;AACjD,eAAO;AAAA,MACV;AAGE,UAAI,QAAQ,CAAA;AACZ,eAAS,IAAI,GAAG,IAAI,IAA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AAA,MACP,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,QAAQ;AAAA,MAER,KAAK;AAAA,MACL,SAAS;AAAA,MACT,SAAS;AAAA,MACT,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,MAAM;AAAA,MACN,UAAU;AAAA,MACV,OAAO;AAAA,MACP,WAAW;AAAA,MACX,OAAO;AAAA,MACP,OAAO;AAAA,MAEP,gBAAgB;AAAA,MAChB,mBAAmB;AAAA,IACvB;AAEE,mBAAe,YAAY;AAE3B,WAAO;AAAA,EACT;;;ACzDA,IAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,MAAI,UAAU;AAId,MAAI,sBAAsB;AAC1BQ,YAAA,UAAiBN,+BAAA,EAAqC,QAAQ,WAAW,mBAAmB;AAC9F,OAAO;AAGLM,YAAA,UAAiBL,kCAAqC;AACxD;;;","x_google_ignoreList":[0,1,2,3,4,5,6]}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("yup"),t=require("dayjs"),r=require("react/jsx-runtime"),a=require("react-helmet"),s=require("./index-BQ2NBHDS.js"),o=require("./useAuth-C1y8BBuX.js");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const n=i(e),l={required:"Date is required",invalidDate:"Date must be a valid date",pastDate:"Date cannot be in the past",futureDate:"Future dates are not allowed",todayNotAllowed:"Today's date is not allowed",pastTime:"Time cannot be in the past for today's date"},u=(e,r)=>t.isDayjs(r)?r.toDate():r instanceof Date?r:"string"==typeof r&&r?t(r).toDate():null,d=(e={})=>{const{allowPast:r=!1,allowToday:a=!0,allowFuture:s=!0,requiredMessage:o=l.required,pastDateMessage:i=l.pastDate,futureDateMessage:d=l.futureDate,todayNotAllowedMessage:c=l.todayNotAllowed,invalidDateMessage:p=l.invalidDate,checkTime:m=!1,pastTimeMessage:g=l.pastTime}=e;return n.mixed().transform(u).typeError(p).required(o).test("date-validation",function(e){if(!e)return!1;const o=t(),n=t(e),l=t().startOf("day"),u=t(e).startOf("day");if(u.isBefore(l)&&!r)return this.createError({message:i});if(u.isSame(l)){if(!a)return this.createError({message:c});if(m&&n.isBefore(o))return this.createError({message:g})}return!(u.isAfter(l)&&!s)||this.createError({message:d})})},c=(e,t={})=>d({allowPast:!1,allowToday:!0,allowFuture:!0,...t,requiredMessage:e}),p={rental:e=>c(e||"Rental date is required")};class m{static getUserData(){try{const e=localStorage.getItem("_u_data");return e?JSON.parse(e):null}catch(e){return console.error("Error parsing user data:",e),null}}static getRolePermissions(){try{const e=localStorage.getItem("role-permission");return e?JSON.parse(e):{}}catch(e){return console.error("Error parsing role permissions:",e),{}}}}class g{static getAccessibleSubModules(e,t){return(null==t?void 0:t.module_access)?t.module_access.filter(t=>e.includes(t.module_name)).map(e=>({...e,sub_modules:[...e.sub_modules||[],{sub_module_name:"dashboard"}]})):[]}static extractSubModuleNames(e){return new Set(e.flatMap(e=>(e.sub_modules||[]).map(e=>e.sub_module_name)))}static getMatchingSubModules(e,t){const r=Object.keys(t),a=Array.from(e).filter(e=>{const t=e.split("/").pop()||"";return r.some(e=>e.startsWith(t))});return new Set(a)}}class f{static filterMenuByAccess(e,t){return e.filter(e=>{const r=e.bacSubModuleName&&t.has(e.bacSubModuleName);let a=!1;return e.submenu&&e.submenu.length>0&&(e.submenu=this.filterMenuByAccess(e.submenu,t),a=e.submenu.length>0),r||a})}}const y=e=>{const t=e.location?`${e.location.protocol}//${e.location.host}${window.location.pathname}`:"";return r.jsxs(a.Helmet,{children:[r.jsx("title",{children:e.title}),r.jsx("meta",{name:"description",content:e.description}),r.jsx("meta",{name:"keywords",content:e.keywords}),e.location&&r.jsx("link",{rel:"canonical",href:`${t}`})]})};y.propTypes={title:s.PropTypes.string,keywords:s.PropTypes.string,description:s.PropTypes.string,image:s.PropTypes.string,schema:s.PropTypes.arrayOf(s.PropTypes.object),location:s.PropTypes.object},s.PropTypes.arrayOf(s.PropTypes.object),exports.COMMON_DATE_VALIDATIONS=p,exports.MenuFilter=class{static filterByModuleAccess(e,t){const r=m.getUserData(),a=m.getRolePermissions(),s=g.getAccessibleSubModules(t,r),o=g.extractSubModuleNames(s),i=g.getMatchingSubModules(o,a);return f.filterMenuByAccess(e,i)}},exports.MenuFilterService=f,exports.MetaComponent=y,exports.ModuleAccessService=g,exports.StorageUtils=m,exports.anyDateValidation=e=>d({allowPast:!0,allowToday:!0,allowFuture:!0,requiredMessage:e}),exports.businessDateValidation=e=>d({allowPast:!1,allowToday:!0,allowFuture:!0,requiredMessage:e}).test("business-day","Please select a business day (Monday to Friday)",function(e){if(!e)return!1;const r=t(e).day();return r>=1&&r<=5}),exports.conditionalDateValidation=(e,t)=>n.mixed().when("$root",{is:e,then:t,otherwise:n.mixed().notRequired()}),exports.createCustomMessages=e=>({...l,...e}),exports.createDateValidation=d,exports.createParameterizedNavigationHandler=(e,t,r=e=>e.id)=>a=>{const s=r(a);e(o.generateRouteWithId(t,s))},exports.dateRangeValidation=(e,r,a)=>n.mixed().transform(u).typeError(l.invalidDate).required(a||l.required).test("date-range",function(a){if(!a)return!1;const s=t(a),o=t(e),i=t(r);return s.isBefore(o)?this.createError({message:`Date must be after ${o.format("MMM DD, YYYY")}`}):!s.isAfter(i)||this.createError({message:`Date must be before ${i.format("MMM DD, YYYY")}`})}),exports.dateTimeValidation=e=>d({allowPast:!1,allowToday:!0,allowFuture:!0,checkTime:!0,requiredMessage:e}),exports.dateValidation=c,exports.fileSize=e=>{let t;const r=Math.abs(e);switch(!0){case r<1024:t=`${(e/1024).toFixed(2)} Byte`;break;case r>=1024&&r<1048576:t=`${(e/1024).toFixed(2)} KB`;break;case r>=1048576&&r<1073741824:t=`${(e/1048576).toFixed(2)} MB`;break;default:t=`${(e/1073741824).toFixed(2)} GB`}return t},exports.futureDateValidation=e=>d({allowPast:!1,allowToday:!1,allowFuture:!0,requiredMessage:e,pastDateMessage:"Please select a future date"}),exports.getCountry=e=>new Intl.DisplayNames(["en"],{type:"region"}).of(e),exports.migrateRoutesToUseParams=e=>{const t={...e};return Object.keys(t).forEach(e=>{(e.startsWith("VIEW_")||e.startsWith("EDIT_")||e.startsWith("DETAIL_")||e.includes("_VIEW_")||e.includes("_EDIT_")||e.includes("_DETAIL_"))&&(t[e].includes(":")||(t[e]=`${t[e]}/:id`))}),t},exports.migrateToPathWithId=(e,t="id")=>({redirectionPathWithId:`${e}/:id`,idField:t}),exports.pastDateValidation=e=>d({allowPast:!0,allowToday:!0,allowFuture:!1,requiredMessage:e,futureDateMessage:"Future dates are not allowed"}),exports.updateTableConfigForParameterizedNavigation=(e,t,r="id")=>{const{...a}=e;return{...a,redirectionPathWithId:t,idField:r}};
2
- //# sourceMappingURL=migration-utils-TYitNMC7.js.map
1
+ "use strict";const e=require("yup"),t=require("dayjs"),r=require("react/jsx-runtime"),a=require("react-helmet"),s=require("./index-B9CFxEZ9.js"),o=require("./useAuth-C1y8BBuX.js");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const n=i(e),l={required:"Date is required",invalidDate:"Date must be a valid date",pastDate:"Date cannot be in the past",futureDate:"Future dates are not allowed",todayNotAllowed:"Today's date is not allowed",pastTime:"Time cannot be in the past for today's date"},u=(e,r)=>t.isDayjs(r)?r.toDate():r instanceof Date?r:"string"==typeof r&&r?t(r).toDate():null,d=(e={})=>{const{allowPast:r=!1,allowToday:a=!0,allowFuture:s=!0,requiredMessage:o=l.required,pastDateMessage:i=l.pastDate,futureDateMessage:d=l.futureDate,todayNotAllowedMessage:c=l.todayNotAllowed,invalidDateMessage:p=l.invalidDate,checkTime:m=!1,pastTimeMessage:g=l.pastTime}=e;return n.mixed().transform(u).typeError(p).required(o).test("date-validation",function(e){if(!e)return!1;const o=t(),n=t(e),l=t().startOf("day"),u=t(e).startOf("day");if(u.isBefore(l)&&!r)return this.createError({message:i});if(u.isSame(l)){if(!a)return this.createError({message:c});if(m&&n.isBefore(o))return this.createError({message:g})}return!(u.isAfter(l)&&!s)||this.createError({message:d})})},c=(e,t={})=>d({allowPast:!1,allowToday:!0,allowFuture:!0,...t,requiredMessage:e}),p={rental:e=>c(e||"Rental date is required")};class m{static getUserData(){try{const e=localStorage.getItem("_u_data");return e?JSON.parse(e):null}catch(e){return console.error("Error parsing user data:",e),null}}static getRolePermissions(){try{const e=localStorage.getItem("role-permission");return e?JSON.parse(e):{}}catch(e){return console.error("Error parsing role permissions:",e),{}}}}class g{static getAccessibleSubModules(e,t){return(null==t?void 0:t.module_access)?t.module_access.filter(t=>e.includes(t.module_name)).map(e=>({...e,sub_modules:[...e.sub_modules||[],{sub_module_name:"dashboard"}]})):[]}static extractSubModuleNames(e){return new Set(e.flatMap(e=>(e.sub_modules||[]).map(e=>e.sub_module_name)))}static getMatchingSubModules(e,t){const r=Object.keys(t),a=Array.from(e).filter(e=>{const t=e.split("/").pop()||"";return r.some(e=>e.startsWith(t))});return new Set(a)}}class f{static filterMenuByAccess(e,t){return e.filter(e=>{const r=e.bacSubModuleName&&t.has(e.bacSubModuleName);let a=!1;return e.submenu&&e.submenu.length>0&&(e.submenu=this.filterMenuByAccess(e.submenu,t),a=e.submenu.length>0),r||a})}}const y=e=>{const t=e.location?`${e.location.protocol}//${e.location.host}${window.location.pathname}`:"";return r.jsxs(a.Helmet,{children:[r.jsx("title",{children:e.title}),r.jsx("meta",{name:"description",content:e.description}),r.jsx("meta",{name:"keywords",content:e.keywords}),e.location&&r.jsx("link",{rel:"canonical",href:`${t}`})]})};y.propTypes={title:s.PropTypes.string,keywords:s.PropTypes.string,description:s.PropTypes.string,image:s.PropTypes.string,schema:s.PropTypes.arrayOf(s.PropTypes.object),location:s.PropTypes.object},s.PropTypes.arrayOf(s.PropTypes.object),exports.COMMON_DATE_VALIDATIONS=p,exports.MenuFilter=class{static filterByModuleAccess(e,t){const r=m.getUserData(),a=m.getRolePermissions(),s=g.getAccessibleSubModules(t,r),o=g.extractSubModuleNames(s),i=g.getMatchingSubModules(o,a);return f.filterMenuByAccess(e,i)}},exports.MenuFilterService=f,exports.MetaComponent=y,exports.ModuleAccessService=g,exports.StorageUtils=m,exports.anyDateValidation=e=>d({allowPast:!0,allowToday:!0,allowFuture:!0,requiredMessage:e}),exports.businessDateValidation=e=>d({allowPast:!1,allowToday:!0,allowFuture:!0,requiredMessage:e}).test("business-day","Please select a business day (Monday to Friday)",function(e){if(!e)return!1;const r=t(e).day();return r>=1&&r<=5}),exports.conditionalDateValidation=(e,t)=>n.mixed().when("$root",{is:e,then:t,otherwise:n.mixed().notRequired()}),exports.createCustomMessages=e=>({...l,...e}),exports.createDateValidation=d,exports.createParameterizedNavigationHandler=(e,t,r=e=>e.id)=>a=>{const s=r(a);e(o.generateRouteWithId(t,s))},exports.dateRangeValidation=(e,r,a)=>n.mixed().transform(u).typeError(l.invalidDate).required(a||l.required).test("date-range",function(a){if(!a)return!1;const s=t(a),o=t(e),i=t(r);return s.isBefore(o)?this.createError({message:`Date must be after ${o.format("MMM DD, YYYY")}`}):!s.isAfter(i)||this.createError({message:`Date must be before ${i.format("MMM DD, YYYY")}`})}),exports.dateTimeValidation=e=>d({allowPast:!1,allowToday:!0,allowFuture:!0,checkTime:!0,requiredMessage:e}),exports.dateValidation=c,exports.fileSize=e=>{let t;const r=Math.abs(e);switch(!0){case r<1024:t=`${(e/1024).toFixed(2)} Byte`;break;case r>=1024&&r<1048576:t=`${(e/1024).toFixed(2)} KB`;break;case r>=1048576&&r<1073741824:t=`${(e/1048576).toFixed(2)} MB`;break;default:t=`${(e/1073741824).toFixed(2)} GB`}return t},exports.futureDateValidation=e=>d({allowPast:!1,allowToday:!1,allowFuture:!0,requiredMessage:e,pastDateMessage:"Please select a future date"}),exports.getCountry=e=>new Intl.DisplayNames(["en"],{type:"region"}).of(e),exports.migrateRoutesToUseParams=e=>{const t={...e};return Object.keys(t).forEach(e=>{(e.startsWith("VIEW_")||e.startsWith("EDIT_")||e.startsWith("DETAIL_")||e.includes("_VIEW_")||e.includes("_EDIT_")||e.includes("_DETAIL_"))&&(t[e].includes(":")||(t[e]=`${t[e]}/:id`))}),t},exports.migrateToPathWithId=(e,t="id")=>({redirectionPathWithId:`${e}/:id`,idField:t}),exports.pastDateValidation=e=>d({allowPast:!0,allowToday:!0,allowFuture:!1,requiredMessage:e,futureDateMessage:"Future dates are not allowed"}),exports.updateTableConfigForParameterizedNavigation=(e,t,r="id")=>{const{...a}=e;return{...a,redirectionPathWithId:t,idField:r}};
2
+ //# sourceMappingURL=migration-utils-9IXhe_fj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-utils-TYitNMC7.js","sources":["../../src/utils/dateValidation.tsx","../../src/utils/menu-filter.ts","../../src/utils/metaComponent.tsx","../../src/utils/migration-utils.ts","../../src/utils/fileSize.ts","../../src/utils/country.ts"],"sourcesContent":["//eslint-disable @typescript-eslint/no-explicit-any\nimport * as Yup from 'yup';\nimport dayjs from 'dayjs';\n\n// Types for configuration\nexport interface DateValidationOptions {\n allowPast?: boolean;\n allowToday?: boolean;\n allowFuture?: boolean;\n requiredMessage?: string;\n pastDateMessage?: string;\n futureDateMessage?: string;\n todayNotAllowedMessage?: string;\n invalidDateMessage?: string;\n checkTime?: boolean;\n pastTimeMessage?: string;\n}\n\n// Default messages\nconst DEFAULT_MESSAGES = {\n required: 'Date is required',\n invalidDate: 'Date must be a valid date',\n pastDate: 'Date cannot be in the past',\n futureDate: 'Future dates are not allowed',\n todayNotAllowed: \"Today's date is not allowed\",\n pastTime: 'Time cannot be in the past for today\\'s date'\n};\n\n/**\n * Core date transformation function\n * Handles dayjs objects, Date objects, and string dates\n */\nconst transformDate = (value: any, originalValue: any) => {\n if (dayjs.isDayjs(originalValue)) {\n return originalValue.toDate();\n }\n if (originalValue instanceof Date) {\n return originalValue;\n }\n if (typeof originalValue === 'string' && originalValue) {\n return dayjs(originalValue).toDate();\n }\n return null;\n};\n\n/**\n * Global date validation function with full customization\n * @param options Configuration options for date validation\n * @returns Yup validation schema\n */\nexport const createDateValidation = (options: DateValidationOptions = {}) => {\n const {\n allowPast = false,\n allowToday = true,\n allowFuture = true,\n requiredMessage = DEFAULT_MESSAGES.required,\n pastDateMessage = DEFAULT_MESSAGES.pastDate,\n futureDateMessage = DEFAULT_MESSAGES.futureDate,\n todayNotAllowedMessage = DEFAULT_MESSAGES.todayNotAllowed,\n invalidDateMessage = DEFAULT_MESSAGES.invalidDate,\n checkTime = false,\n pastTimeMessage = DEFAULT_MESSAGES.pastTime\n } = options;\n\n return Yup.mixed()\n .transform(transformDate)\n .typeError(invalidDateMessage)\n .required(requiredMessage)\n .test('date-validation', function(value) {\n if (!value) return false;\n \n const now = dayjs();\n const selectedDateTime = dayjs(value);\n const today = dayjs().startOf('day');\n const selectedDate = dayjs(value).startOf('day');\n \n // Past date validation\n if (selectedDate.isBefore(today) && !allowPast) {\n return this.createError({ message: pastDateMessage });\n }\n \n // Today validation\n if (selectedDate.isSame(today)) {\n if (!allowToday) {\n return this.createError({ message: todayNotAllowedMessage });\n }\n \n // Time validation for today\n if (checkTime && selectedDateTime.isBefore(now)) {\n return this.createError({ message: pastTimeMessage });\n }\n }\n \n // Future date validation\n if (selectedDate.isAfter(today) && !allowFuture) {\n return this.createError({ message: futureDateMessage });\n }\n \n return true;\n });\n};\n\n/**\n * Quick preset validation functions for common use cases\n */\n\n// 1. Standard date validation (today + future allowed)\nexport const dateValidation = (requiredMessage?: string, options: DateValidationOptions = {}) => \n createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n ...options,\n requiredMessage\n });\n\n// 2. Future dates only (excluding today)\nexport const futureDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: false,\n allowToday: false,\n allowFuture: true,\n requiredMessage,\n pastDateMessage: 'Please select a future date'\n });\n\n// 3. Any date allowed (for historical records)\nexport const anyDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: true,\n allowToday: true,\n allowFuture: true,\n requiredMessage\n });\n\n// 4. Past dates only (for completed events)\nexport const pastDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: true,\n allowToday: true,\n allowFuture: false,\n requiredMessage,\n futureDateMessage: 'Future dates are not allowed'\n });\n\n// 5. Date with time validation\nexport const dateTimeValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n checkTime: true,\n requiredMessage\n });\n\n// 6. Business days only (Monday to Friday, future dates)\nexport const businessDateValidation = (requiredMessage?: string) => {\n return createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n requiredMessage\n }).test('business-day', 'Please select a business day (Monday to Friday)', function(value) {\n if (!value) return false;\n \n const dayOfWeek = dayjs(value).day();\n return dayOfWeek >= 1 && dayOfWeek <= 5; // Monday = 1, Friday = 5\n });\n};\n\n// 7. Date range validation (between two dates)\nexport const dateRangeValidation = (\n minDate: dayjs.Dayjs | Date | string,\n maxDate: dayjs.Dayjs | Date | string,\n requiredMessage?: string\n) => {\n return Yup.mixed()\n .transform(transformDate)\n .typeError(DEFAULT_MESSAGES.invalidDate)\n .required(requiredMessage || DEFAULT_MESSAGES.required)\n .test('date-range', function(value) {\n if (!value) return false;\n \n const selected = dayjs(value);\n const min = dayjs(minDate);\n const max = dayjs(maxDate);\n \n if (selected.isBefore(min)) {\n return this.createError({\n message: `Date must be after ${min.format('MMM DD, YYYY')}`\n });\n }\n \n if (selected.isAfter(max)) {\n return this.createError({\n message: `Date must be before ${max.format('MMM DD, YYYY')}`\n });\n }\n \n return true;\n });\n};\n\n/**\n * Utility function to create custom validation messages\n */\nexport const createCustomMessages = (overrides: Partial<typeof DEFAULT_MESSAGES>) => ({\n ...DEFAULT_MESSAGES,\n ...overrides\n});\n\n/**\n * Helper function for conditional date validation\n * Example: Date required only if another field has a specific value\n */\nexport const conditionalDateValidation = (\n condition: (formValues: any) => boolean,\n validationSchema: any,\n) => {\n return Yup.mixed().when('$root', {\n is: condition,\n then: validationSchema,\n otherwise: Yup.mixed().notRequired()\n });\n};\n\n// Export commonly used validation presets\nexport const COMMON_DATE_VALIDATIONS = {\n // Rental/Order dates\n rental: (msg?: string) => dateValidation(msg || 'Rental date is required'),\n\n};\n\n/**\n * Usage Examples:\n * \n * // Basic usage with custom required message\n * date: dateValidation('Please select a valid date')\n * \n * // Full customization\n * date: createDateValidation({\n * allowPast: false,\n * allowToday: true,\n * allowFuture: true,\n * requiredMessage: 'Date is required',\n * pastDateMessage: 'Cannot select past dates'\n * })\n * \n * // Preset validations\n * rentalDate: COMMON_DATE_VALIDATIONS.rental('Rental date is required')\n * bookingDate: COMMON_DATE_VALIDATIONS.booking()\n * \n * // Date range\n * eventDate: dateRangeValidation(\n * dayjs().add(1, 'day'),\n * dayjs().add(1, 'year'),\n * 'Event date is required'\n * )\n */","// types.ts - Type definitions for better type safety\r\nexport interface SubModule {\r\n sub_module_name: string;\r\n}\r\n\r\nexport interface ModuleAccess {\r\n module_name: string;\r\n sub_modules?: SubModule[];\r\n}\r\n\r\nexport interface UserData {\r\n module_access?: ModuleAccess[];\r\n}\r\n\r\nexport interface MenuItem {\r\n bacSubModuleName?: string;\r\n submenu?: MenuItem[];\r\n [key: string]: any;\r\n}\r\n\r\nexport interface Permission {\r\n [key: string]: any;\r\n}\r\n\r\n// storageUtils.ts - Centralized storage access\r\nexport class StorageUtils {\r\n /**\r\n * Retrieves and parses user data from localStorage\r\n * @returns Parsed user data or null if not found\r\n */\r\n static getUserData(): UserData | null {\r\n try {\r\n const userData = localStorage.getItem(\"_u_data\");\r\n return userData ? JSON.parse(userData) : null;\r\n } catch (error) {\r\n console.error(\"Error parsing user data:\", error);\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Retrieves and parses role permissions from localStorage\r\n * @returns Parsed permissions object\r\n */\r\n static getRolePermissions(): Permission {\r\n try {\r\n const permissions = localStorage.getItem(\"role-permission\");\r\n return permissions ? JSON.parse(permissions) : {};\r\n } catch (error) {\r\n console.error(\"Error parsing role permissions:\", error);\r\n return {};\r\n }\r\n }\r\n}\r\n\r\n// moduleAccessService.ts - Business logic for module access\r\nexport class ModuleAccessService {\r\n /**\r\n * Filters modules by allowed module names and adds dashboard sub-module\r\n * @param moduleNames - Array of allowed module names\r\n * @param userData - User data containing module access\r\n * @returns Filtered modules with dashboard added\r\n */\r\n static getAccessibleSubModules(\r\n moduleNames: string[],\r\n userData: UserData | null\r\n ): ModuleAccess[] {\r\n if (!userData?.module_access) {\r\n return [];\r\n }\r\n\r\n return userData.module_access\r\n .filter((module) => moduleNames.includes(module.module_name))\r\n .map((module) => ({\r\n ...module,\r\n sub_modules: [\r\n ...(module.sub_modules || []),\r\n { sub_module_name: \"dashboard\" }\r\n ]\r\n }));\r\n }\r\n\r\n /**\r\n * Extracts unique sub-module names from modules\r\n * @param modules - Array of module access objects\r\n * @returns Set of unique sub-module names\r\n */\r\n static extractSubModuleNames(modules: ModuleAccess[]): Set<string> {\r\n return new Set(\r\n modules.flatMap((module) => \r\n (module.sub_modules || []).map((subModule) => subModule.sub_module_name)\r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Matches sub-module names with permission keys\r\n * @param subModuleNames - Set of sub-module names\r\n * @param permissions - Permission object\r\n * @returns Set of matching sub-module names\r\n */\r\n static getMatchingSubModules(\r\n subModuleNames: Set<string>,\r\n permissions: Permission\r\n ): Set<string> {\r\n const permissionKeys = Object.keys(permissions);\r\n \r\n const matchingModules = Array.from(subModuleNames).filter((subModuleName) => {\r\n const lastPart = subModuleName.split(\"/\").pop() || \"\";\r\n return permissionKeys.some((permKey) => permKey.startsWith(lastPart));\r\n });\r\n\r\n return new Set(matchingModules);\r\n }\r\n}\r\n\r\n// menuFilterService.ts - Menu filtering logic\r\nexport class MenuFilterService {\r\n /**\r\n * Recursively filters menu items based on accessible sub-modules\r\n * @param menu - Array of menu items\r\n * @param accessibleSubModules - Set of accessible sub-module names\r\n * @returns Filtered menu array\r\n */\r\n static filterMenuByAccess(\r\n menu: MenuItem[],\r\n accessibleSubModules: Set<string>\r\n ): MenuItem[] {\r\n return menu.filter((item) => {\r\n const hasValidSubModule = \r\n item.bacSubModuleName && accessibleSubModules.has(item.bacSubModuleName);\r\n\r\n let hasValidSubmenu = false;\r\n \r\n if (item.submenu && item.submenu.length > 0) {\r\n item.submenu = this.filterMenuByAccess(item.submenu, accessibleSubModules);\r\n hasValidSubmenu = item.submenu.length > 0;\r\n }\r\n\r\n return hasValidSubModule || hasValidSubmenu;\r\n });\r\n }\r\n}\r\n\r\n// menuFilter.ts - Main filter orchestrator\r\nexport class MenuFilter {\r\n /**\r\n * Filters menu based on user permissions and module access\r\n * @param menu - Menu items to filter\r\n * @param allowedModules - Array of allowed module names\r\n * @returns Filtered menu items\r\n */\r\n static filterByModuleAccess(\r\n menu: MenuItem[],\r\n allowedModules: string[]\r\n ): MenuItem[] {\r\n // Retrieve user data and permissions\r\n const userData = StorageUtils.getUserData();\r\n const permissions = StorageUtils.getRolePermissions();\r\n\r\n // Get accessible sub-modules\r\n const accessibleModules = ModuleAccessService.getAccessibleSubModules(\r\n allowedModules,\r\n userData\r\n );\r\n\r\n // Extract sub-module names\r\n const subModuleNames = ModuleAccessService.extractSubModuleNames(\r\n accessibleModules\r\n );\r\n\r\n // Match with permissions\r\n const matchingSubModules = ModuleAccessService.getMatchingSubModules(\r\n subModuleNames,\r\n permissions\r\n );\r\n\r\n // Filter menu\r\n return MenuFilterService.filterMenuByAccess(menu, matchingSubModules);\r\n }\r\n}\r\n\r\n// Usage example in your module\r\n// manufacturing.ts\r\n// import { MenuFilter } from './menuFilter';\r\n// import { MenuItem } from './types';\r\n\r\n// export const getFilteredManufacturingMenu = (\r\n// menuData: MenuItem[]\r\n// ): MenuItem[] => {\r\n// const allowedModules = [\"manufacturing\", \"inventory\", \"sales\"];\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };\r\n\r\n// // sales.ts\r\n// export const getFilteredSalesMenu = (\r\n// menuData: MenuItem[]\r\n// ): MenuItem[] => {\r\n// const allowedModules = [\"sales\", \"inventory\"];\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };\r\n\r\n// // Generic usage with dynamic modules\r\n// export const getFilteredMenu = (\r\n// menuData: MenuItem[],\r\n// allowedModules: string[]\r\n// ): MenuItem[] => {\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };","import { Helmet } from \"react-helmet\";\nimport propTypes from \"prop-types\";\n\nconst MetaComponent = (props: any) => {\n const canonicalURL = props.location\n ? `${props.location.protocol}//${props.location.host}${window.location.pathname}`\n : \"\";\n\n return (\n <Helmet>\n <title>{props.title}</title>\n <meta name=\"description\" content={props.description} />\n <meta name=\"keywords\" content={props.keywords} />\n {props.location && <link rel=\"canonical\" href={`${canonicalURL}`} />}\n\n {/* {props.schema && <JsonLd data={props.schema} />} */}\n </Helmet>\n );\n};\n\nconst JsonLd = ({ data }: any) => {\n return data.map((schema: any, index: number) => {\n return (\n <script\n key={index}\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}\n />\n );\n });\n};\n\nMetaComponent.propTypes = {\n title: propTypes.string,\n keywords: propTypes.string,\n description: propTypes.string,\n image: propTypes.string,\n schema: propTypes.arrayOf(propTypes.object),\n location: propTypes.object,\n};\n\nJsonLd.propTypes = {\n data: propTypes.arrayOf(propTypes.object),\n};\n\nexport { MetaComponent };\nexport default MetaComponent;\n","\n\nimport { generateRouteWithId } from \"./route-utils\";\n\n\nexport const migrateToPathWithId = (redirectionLink: string, idField: string = 'id') => {\n return {\n redirectionPathWithId: `${redirectionLink}/:id`,\n idField\n };\n};\n\n\nexport const migrateRoutesToUseParams = (routes: Record<string, string>): Record<string, string> => {\n const updatedRoutes: Record<string, string> = { ...routes };\n \n Object.keys(updatedRoutes).forEach(key => {\n if (\n key.startsWith('VIEW_') || \n key.startsWith('EDIT_') || \n key.startsWith('DETAIL_') ||\n key.includes('_VIEW_') || \n key.includes('_EDIT_') || \n key.includes('_DETAIL_')\n ) {\n if (!updatedRoutes[key].includes(':')) {\n updatedRoutes[key] = `${updatedRoutes[key]}/:id`;\n }\n }\n });\n \n return updatedRoutes;\n};\n\nexport const createParameterizedNavigationHandler = (\n navigate: (path: string) => void,\n basePath: string,\n idExtractor: (row: any) => string | number = (row) => row.id\n) => {\n return (row: any) => {\n const id = idExtractor(row);\n navigate(generateRouteWithId(basePath, id));\n };\n};\n\n\nexport const updateTableConfigForParameterizedNavigation = (\n tableConfig: any,\n pathWithIdField: string,\n idField: string = 'id'\n) => {\n const { ...rest } = tableConfig;\n \n return {\n ...rest,\n redirectionPathWithId: pathWithIdField,\n idField\n };\n}; ","const fileSize = (size: number) => {\n let sizeCategory;\n const absSize = Math.abs(size);\n\n switch (true) {\n case absSize < 1024:\n sizeCategory = `${(size / 1024).toFixed(2)} Byte`;\n break;\n case absSize >= 1024 && absSize < 1024 * 1024:\n sizeCategory = `${(size / 1024).toFixed(2)} KB`;\n break;\n case absSize >= 1024 * 1024 && absSize < 1024 * 1024 * 1024:\n sizeCategory = `${(size / (1024 * 1024)).toFixed(2)} MB`;\n break;\n default:\n sizeCategory = `${(size / (1024 * 1024 * 1024)).toFixed(2)} GB`;\n }\n\n return sizeCategory;\n};\n\nexport { fileSize };\nexport default fileSize;\n","export const getCountry = (code: string) => {\n const regionNames = new Intl.DisplayNames([\"en\"], { type: \"region\" });\n return regionNames.of(code);\n};\n"],"names":["DEFAULT_MESSAGES","required","invalidDate","pastDate","futureDate","todayNotAllowed","pastTime","transformDate","value","originalValue","dayjs","isDayjs","toDate","Date","createDateValidation","options","allowPast","allowToday","allowFuture","requiredMessage","pastDateMessage","futureDateMessage","todayNotAllowedMessage","invalidDateMessage","checkTime","pastTimeMessage","Yup","mixed","transform","typeError","test","now","selectedDateTime","today","startOf","selectedDate","isBefore","this","createError","message","isSame","isAfter","dateValidation","COMMON_DATE_VALIDATIONS","rental","msg","StorageUtils","getUserData","userData","localStorage","getItem","JSON","parse","error","console","getRolePermissions","permissions","ModuleAccessService","getAccessibleSubModules","moduleNames","module_access","filter","module","includes","module_name","map","sub_modules","sub_module_name","extractSubModuleNames","modules","Set","flatMap","subModule","getMatchingSubModules","subModuleNames","permissionKeys","Object","keys","matchingModules","Array","from","subModuleName","lastPart","split","pop","some","permKey","startsWith","MenuFilterService","filterMenuByAccess","menu","accessibleSubModules","item","hasValidSubModule","bacSubModuleName","has","hasValidSubmenu","submenu","length","MetaComponent","props","canonicalURL","location","protocol","host","window","pathname","Helmet","children","jsx","title","name","content","description","keywords","rel","href","propTypes","string","image","schema","arrayOf","object","filterByModuleAccess","allowedModules","accessibleModules","matchingSubModules","dayOfWeek","day","condition","validationSchema","when","is","then","otherwise","notRequired","overrides","navigate","basePath","idExtractor","row","id","generateRouteWithId","minDate","maxDate","selected","min","max","format","size","sizeCategory","absSize","Math","abs","toFixed","code","Intl","DisplayNames","type","of","routes","updatedRoutes","forEach","key","redirectionLink","idField","redirectionPathWithId","tableConfig","pathWithIdField","rest"],"mappings":"4cAmBMA,EAAmB,CACvBC,SAAU,mBACVC,YAAa,4BACbC,SAAU,6BACVC,WAAY,+BACZC,gBAAiB,8BACjBC,SAAU,+CAONC,EAAgB,CAACC,EAAYC,IAC7BC,EAAMC,QAAQF,GACTA,EAAcG,SAEnBH,aAAyBI,KACpBJ,EAEoB,iBAAlBA,GAA8BA,EAChCC,EAAMD,GAAeG,SAEvB,KAQIE,EAAuB,CAACC,EAAiC,MACpE,MAAMC,UACJA,GAAY,EAAAC,WACZA,GAAa,EAAAC,YACbA,GAAc,EAAAC,gBACdA,EAAkBnB,EAAiBC,SAAAmB,gBACnCA,EAAkBpB,EAAiBG,SAAAkB,kBACnCA,EAAoBrB,EAAiBI,WAAAkB,uBACrCA,E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ACnBE,WAAW,EACXC,YAAY,EACZC,aAAa,EACbC,kBACAE,kBAAmB,qFGhGoC,CACzDkJ,EACAC,EACAH,EAAkB,QAElB,SAAWI,GAASF,EAEpB,MAAO,IACFE,EACHH,sBAAuBE,EACvBH"}
1
+ {"version":3,"file":"migration-utils-9IXhe_fj.js","sources":["../../src/utils/dateValidation.tsx","../../src/utils/menu-filter.ts","../../src/utils/metaComponent.tsx","../../src/utils/migration-utils.ts","../../src/utils/fileSize.ts","../../src/utils/country.ts"],"sourcesContent":["//eslint-disable @typescript-eslint/no-explicit-any\nimport * as Yup from 'yup';\nimport dayjs from 'dayjs';\n\n// Types for configuration\nexport interface DateValidationOptions {\n allowPast?: boolean;\n allowToday?: boolean;\n allowFuture?: boolean;\n requiredMessage?: string;\n pastDateMessage?: string;\n futureDateMessage?: string;\n todayNotAllowedMessage?: string;\n invalidDateMessage?: string;\n checkTime?: boolean;\n pastTimeMessage?: string;\n}\n\n// Default messages\nconst DEFAULT_MESSAGES = {\n required: 'Date is required',\n invalidDate: 'Date must be a valid date',\n pastDate: 'Date cannot be in the past',\n futureDate: 'Future dates are not allowed',\n todayNotAllowed: \"Today's date is not allowed\",\n pastTime: 'Time cannot be in the past for today\\'s date'\n};\n\n/**\n * Core date transformation function\n * Handles dayjs objects, Date objects, and string dates\n */\nconst transformDate = (value: any, originalValue: any) => {\n if (dayjs.isDayjs(originalValue)) {\n return originalValue.toDate();\n }\n if (originalValue instanceof Date) {\n return originalValue;\n }\n if (typeof originalValue === 'string' && originalValue) {\n return dayjs(originalValue).toDate();\n }\n return null;\n};\n\n/**\n * Global date validation function with full customization\n * @param options Configuration options for date validation\n * @returns Yup validation schema\n */\nexport const createDateValidation = (options: DateValidationOptions = {}) => {\n const {\n allowPast = false,\n allowToday = true,\n allowFuture = true,\n requiredMessage = DEFAULT_MESSAGES.required,\n pastDateMessage = DEFAULT_MESSAGES.pastDate,\n futureDateMessage = DEFAULT_MESSAGES.futureDate,\n todayNotAllowedMessage = DEFAULT_MESSAGES.todayNotAllowed,\n invalidDateMessage = DEFAULT_MESSAGES.invalidDate,\n checkTime = false,\n pastTimeMessage = DEFAULT_MESSAGES.pastTime\n } = options;\n\n return Yup.mixed()\n .transform(transformDate)\n .typeError(invalidDateMessage)\n .required(requiredMessage)\n .test('date-validation', function(value) {\n if (!value) return false;\n \n const now = dayjs();\n const selectedDateTime = dayjs(value);\n const today = dayjs().startOf('day');\n const selectedDate = dayjs(value).startOf('day');\n \n // Past date validation\n if (selectedDate.isBefore(today) && !allowPast) {\n return this.createError({ message: pastDateMessage });\n }\n \n // Today validation\n if (selectedDate.isSame(today)) {\n if (!allowToday) {\n return this.createError({ message: todayNotAllowedMessage });\n }\n \n // Time validation for today\n if (checkTime && selectedDateTime.isBefore(now)) {\n return this.createError({ message: pastTimeMessage });\n }\n }\n \n // Future date validation\n if (selectedDate.isAfter(today) && !allowFuture) {\n return this.createError({ message: futureDateMessage });\n }\n \n return true;\n });\n};\n\n/**\n * Quick preset validation functions for common use cases\n */\n\n// 1. Standard date validation (today + future allowed)\nexport const dateValidation = (requiredMessage?: string, options: DateValidationOptions = {}) => \n createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n ...options,\n requiredMessage\n });\n\n// 2. Future dates only (excluding today)\nexport const futureDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: false,\n allowToday: false,\n allowFuture: true,\n requiredMessage,\n pastDateMessage: 'Please select a future date'\n });\n\n// 3. Any date allowed (for historical records)\nexport const anyDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: true,\n allowToday: true,\n allowFuture: true,\n requiredMessage\n });\n\n// 4. Past dates only (for completed events)\nexport const pastDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: true,\n allowToday: true,\n allowFuture: false,\n requiredMessage,\n futureDateMessage: 'Future dates are not allowed'\n });\n\n// 5. Date with time validation\nexport const dateTimeValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n checkTime: true,\n requiredMessage\n });\n\n// 6. Business days only (Monday to Friday, future dates)\nexport const businessDateValidation = (requiredMessage?: string) => {\n return createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n requiredMessage\n }).test('business-day', 'Please select a business day (Monday to Friday)', function(value) {\n if (!value) return false;\n \n const dayOfWeek = dayjs(value).day();\n return dayOfWeek >= 1 && dayOfWeek <= 5; // Monday = 1, Friday = 5\n });\n};\n\n// 7. Date range validation (between two dates)\nexport const dateRangeValidation = (\n minDate: dayjs.Dayjs | Date | string,\n maxDate: dayjs.Dayjs | Date | string,\n requiredMessage?: string\n) => {\n return Yup.mixed()\n .transform(transformDate)\n .typeError(DEFAULT_MESSAGES.invalidDate)\n .required(requiredMessage || DEFAULT_MESSAGES.required)\n .test('date-range', function(value) {\n if (!value) return false;\n \n const selected = dayjs(value);\n const min = dayjs(minDate);\n const max = dayjs(maxDate);\n \n if (selected.isBefore(min)) {\n return this.createError({\n message: `Date must be after ${min.format('MMM DD, YYYY')}`\n });\n }\n \n if (selected.isAfter(max)) {\n return this.createError({\n message: `Date must be before ${max.format('MMM DD, YYYY')}`\n });\n }\n \n return true;\n });\n};\n\n/**\n * Utility function to create custom validation messages\n */\nexport const createCustomMessages = (overrides: Partial<typeof DEFAULT_MESSAGES>) => ({\n ...DEFAULT_MESSAGES,\n ...overrides\n});\n\n/**\n * Helper function for conditional date validation\n * Example: Date required only if another field has a specific value\n */\nexport const conditionalDateValidation = (\n condition: (formValues: any) => boolean,\n validationSchema: any,\n) => {\n return Yup.mixed().when('$root', {\n is: condition,\n then: validationSchema,\n otherwise: Yup.mixed().notRequired()\n });\n};\n\n// Export commonly used validation presets\nexport const COMMON_DATE_VALIDATIONS = {\n // Rental/Order dates\n rental: (msg?: string) => dateValidation(msg || 'Rental date is required'),\n\n};\n\n/**\n * Usage Examples:\n * \n * // Basic usage with custom required message\n * date: dateValidation('Please select a valid date')\n * \n * // Full customization\n * date: createDateValidation({\n * allowPast: false,\n * allowToday: true,\n * allowFuture: true,\n * requiredMessage: 'Date is required',\n * pastDateMessage: 'Cannot select past dates'\n * })\n * \n * // Preset validations\n * rentalDate: COMMON_DATE_VALIDATIONS.rental('Rental date is required')\n * bookingDate: COMMON_DATE_VALIDATIONS.booking()\n * \n * // Date range\n * eventDate: dateRangeValidation(\n * dayjs().add(1, 'day'),\n * dayjs().add(1, 'year'),\n * 'Event date is required'\n * )\n */","// types.ts - Type definitions for better type safety\r\nexport interface SubModule {\r\n sub_module_name: string;\r\n}\r\n\r\nexport interface ModuleAccess {\r\n module_name: string;\r\n sub_modules?: SubModule[];\r\n}\r\n\r\nexport interface UserData {\r\n module_access?: ModuleAccess[];\r\n}\r\n\r\nexport interface MenuItem {\r\n bacSubModuleName?: string;\r\n submenu?: MenuItem[];\r\n [key: string]: any;\r\n}\r\n\r\nexport interface Permission {\r\n [key: string]: any;\r\n}\r\n\r\n// storageUtils.ts - Centralized storage access\r\nexport class StorageUtils {\r\n /**\r\n * Retrieves and parses user data from localStorage\r\n * @returns Parsed user data or null if not found\r\n */\r\n static getUserData(): UserData | null {\r\n try {\r\n const userData = localStorage.getItem(\"_u_data\");\r\n return userData ? JSON.parse(userData) : null;\r\n } catch (error) {\r\n console.error(\"Error parsing user data:\", error);\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Retrieves and parses role permissions from localStorage\r\n * @returns Parsed permissions object\r\n */\r\n static getRolePermissions(): Permission {\r\n try {\r\n const permissions = localStorage.getItem(\"role-permission\");\r\n return permissions ? JSON.parse(permissions) : {};\r\n } catch (error) {\r\n console.error(\"Error parsing role permissions:\", error);\r\n return {};\r\n }\r\n }\r\n}\r\n\r\n// moduleAccessService.ts - Business logic for module access\r\nexport class ModuleAccessService {\r\n /**\r\n * Filters modules by allowed module names and adds dashboard sub-module\r\n * @param moduleNames - Array of allowed module names\r\n * @param userData - User data containing module access\r\n * @returns Filtered modules with dashboard added\r\n */\r\n static getAccessibleSubModules(\r\n moduleNames: string[],\r\n userData: UserData | null\r\n ): ModuleAccess[] {\r\n if (!userData?.module_access) {\r\n return [];\r\n }\r\n\r\n return userData.module_access\r\n .filter((module) => moduleNames.includes(module.module_name))\r\n .map((module) => ({\r\n ...module,\r\n sub_modules: [\r\n ...(module.sub_modules || []),\r\n { sub_module_name: \"dashboard\" }\r\n ]\r\n }));\r\n }\r\n\r\n /**\r\n * Extracts unique sub-module names from modules\r\n * @param modules - Array of module access objects\r\n * @returns Set of unique sub-module names\r\n */\r\n static extractSubModuleNames(modules: ModuleAccess[]): Set<string> {\r\n return new Set(\r\n modules.flatMap((module) => \r\n (module.sub_modules || []).map((subModule) => subModule.sub_module_name)\r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Matches sub-module names with permission keys\r\n * @param subModuleNames - Set of sub-module names\r\n * @param permissions - Permission object\r\n * @returns Set of matching sub-module names\r\n */\r\n static getMatchingSubModules(\r\n subModuleNames: Set<string>,\r\n permissions: Permission\r\n ): Set<string> {\r\n const permissionKeys = Object.keys(permissions);\r\n \r\n const matchingModules = Array.from(subModuleNames).filter((subModuleName) => {\r\n const lastPart = subModuleName.split(\"/\").pop() || \"\";\r\n return permissionKeys.some((permKey) => permKey.startsWith(lastPart));\r\n });\r\n\r\n return new Set(matchingModules);\r\n }\r\n}\r\n\r\n// menuFilterService.ts - Menu filtering logic\r\nexport class MenuFilterService {\r\n /**\r\n * Recursively filters menu items based on accessible sub-modules\r\n * @param menu - Array of menu items\r\n * @param accessibleSubModules - Set of accessible sub-module names\r\n * @returns Filtered menu array\r\n */\r\n static filterMenuByAccess(\r\n menu: MenuItem[],\r\n accessibleSubModules: Set<string>\r\n ): MenuItem[] {\r\n return menu.filter((item) => {\r\n const hasValidSubModule = \r\n item.bacSubModuleName && accessibleSubModules.has(item.bacSubModuleName);\r\n\r\n let hasValidSubmenu = false;\r\n \r\n if (item.submenu && item.submenu.length > 0) {\r\n item.submenu = this.filterMenuByAccess(item.submenu, accessibleSubModules);\r\n hasValidSubmenu = item.submenu.length > 0;\r\n }\r\n\r\n return hasValidSubModule || hasValidSubmenu;\r\n });\r\n }\r\n}\r\n\r\n// menuFilter.ts - Main filter orchestrator\r\nexport class MenuFilter {\r\n /**\r\n * Filters menu based on user permissions and module access\r\n * @param menu - Menu items to filter\r\n * @param allowedModules - Array of allowed module names\r\n * @returns Filtered menu items\r\n */\r\n static filterByModuleAccess(\r\n menu: MenuItem[],\r\n allowedModules: string[]\r\n ): MenuItem[] {\r\n // Retrieve user data and permissions\r\n const userData = StorageUtils.getUserData();\r\n const permissions = StorageUtils.getRolePermissions();\r\n\r\n // Get accessible sub-modules\r\n const accessibleModules = ModuleAccessService.getAccessibleSubModules(\r\n allowedModules,\r\n userData\r\n );\r\n\r\n // Extract sub-module names\r\n const subModuleNames = ModuleAccessService.extractSubModuleNames(\r\n accessibleModules\r\n );\r\n\r\n // Match with permissions\r\n const matchingSubModules = ModuleAccessService.getMatchingSubModules(\r\n subModuleNames,\r\n permissions\r\n );\r\n\r\n // Filter menu\r\n return MenuFilterService.filterMenuByAccess(menu, matchingSubModules);\r\n }\r\n}\r\n\r\n// Usage example in your module\r\n// manufacturing.ts\r\n// import { MenuFilter } from './menuFilter';\r\n// import { MenuItem } from './types';\r\n\r\n// export const getFilteredManufacturingMenu = (\r\n// menuData: MenuItem[]\r\n// ): MenuItem[] => {\r\n// const allowedModules = [\"manufacturing\", \"inventory\", \"sales\"];\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };\r\n\r\n// // sales.ts\r\n// export const getFilteredSalesMenu = (\r\n// menuData: MenuItem[]\r\n// ): MenuItem[] => {\r\n// const allowedModules = [\"sales\", \"inventory\"];\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };\r\n\r\n// // Generic usage with dynamic modules\r\n// export const getFilteredMenu = (\r\n// menuData: MenuItem[],\r\n// allowedModules: string[]\r\n// ): MenuItem[] => {\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };","import { Helmet } from \"react-helmet\";\nimport propTypes from \"prop-types\";\n\nconst MetaComponent = (props: any) => {\n const canonicalURL = props.location\n ? `${props.location.protocol}//${props.location.host}${window.location.pathname}`\n : \"\";\n\n return (\n <Helmet>\n <title>{props.title}</title>\n <meta name=\"description\" content={props.description} />\n <meta name=\"keywords\" content={props.keywords} />\n {props.location && <link rel=\"canonical\" href={`${canonicalURL}`} />}\n\n {/* {props.schema && <JsonLd data={props.schema} />} */}\n </Helmet>\n );\n};\n\nconst JsonLd = ({ data }: any) => {\n return data.map((schema: any, index: number) => {\n return (\n <script\n key={index}\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}\n />\n );\n });\n};\n\nMetaComponent.propTypes = {\n title: propTypes.string,\n keywords: propTypes.string,\n description: propTypes.string,\n image: propTypes.string,\n schema: propTypes.arrayOf(propTypes.object),\n location: propTypes.object,\n};\n\nJsonLd.propTypes = {\n data: propTypes.arrayOf(propTypes.object),\n};\n\nexport { MetaComponent };\nexport default MetaComponent;\n","\n\nimport { generateRouteWithId } from \"./route-utils\";\n\n\nexport const migrateToPathWithId = (redirectionLink: string, idField: string = 'id') => {\n return {\n redirectionPathWithId: `${redirectionLink}/:id`,\n idField\n };\n};\n\n\nexport const migrateRoutesToUseParams = (routes: Record<string, string>): Record<string, string> => {\n const updatedRoutes: Record<string, string> = { ...routes };\n \n Object.keys(updatedRoutes).forEach(key => {\n if (\n key.startsWith('VIEW_') || \n key.startsWith('EDIT_') || \n key.startsWith('DETAIL_') ||\n key.includes('_VIEW_') || \n key.includes('_EDIT_') || \n key.includes('_DETAIL_')\n ) {\n if (!updatedRoutes[key].includes(':')) {\n updatedRoutes[key] = `${updatedRoutes[key]}/:id`;\n }\n }\n });\n \n return updatedRoutes;\n};\n\nexport const createParameterizedNavigationHandler = (\n navigate: (path: string) => void,\n basePath: string,\n idExtractor: (row: any) => string | number = (row) => row.id\n) => {\n return (row: any) => {\n const id = idExtractor(row);\n navigate(generateRouteWithId(basePath, id));\n };\n};\n\n\nexport const updateTableConfigForParameterizedNavigation = (\n tableConfig: any,\n pathWithIdField: string,\n idField: string = 'id'\n) => {\n const { ...rest } = tableConfig;\n \n return {\n ...rest,\n redirectionPathWithId: pathWithIdField,\n idField\n };\n}; ","const fileSize = (size: number) => {\n let sizeCategory;\n const absSize = Math.abs(size);\n\n switch (true) {\n case absSize < 1024:\n sizeCategory = `${(size / 1024).toFixed(2)} Byte`;\n break;\n case absSize >= 1024 && absSize < 1024 * 1024:\n sizeCategory = `${(size / 1024).toFixed(2)} KB`;\n break;\n case absSize >= 1024 * 1024 && absSize < 1024 * 1024 * 1024:\n sizeCategory = `${(size / (1024 * 1024)).toFixed(2)} MB`;\n break;\n default:\n sizeCategory = `${(size / (1024 * 1024 * 1024)).toFixed(2)} GB`;\n }\n\n return sizeCategory;\n};\n\nexport { fileSize };\nexport default fileSize;\n","export const getCountry = (code: string) => {\n const regionNames = new Intl.DisplayNames([\"en\"], { type: \"region\" });\n return regionNames.of(code);\n};\n"],"names":["DEFAULT_MESSAGES","required","invalidDate","pastDate","futureDate","todayNotAllowed","pastTime","transformDate","value","originalValue","dayjs","isDayjs","toDate","Date","createDateValidation","options","allowPast","allowToday","allowFuture","requiredMessage","pastDateMessage","futureDateMessage","todayNotAllowedMessage","invalidDateMessage","checkTime","pastTimeMessage","Yup","mixed","transform","typeError","test","now","selectedDateTime","today","startOf","selectedDate","isBefore","this","createError","message","isSame","isAfter","dateValidation","COMMON_DATE_VALIDATIONS","rental","msg","StorageUtils","getUserData","userData","localStorage","getItem","JSON","parse","error","console","getRolePermissions","permissions","ModuleAccessService","getAccessibleSubModules","moduleNames","module_access","filter","module","includes","module_name","map","sub_modules","sub_module_name","extractSubModuleNames","modules","Set","flatMap","subModule","getMatchingSubModules","subModuleNames","permissionKeys","Object","keys","matchingModules","Array","from","subModuleName","lastPart","split","pop","some","permKey","startsWith","MenuFilterService","filterMenuByAccess","menu","accessibleSubModules","item","hasValidSubModule","bacSubModuleName","has","hasValidSubmenu","submenu","length","MetaComponent","props","canonicalURL","location","protocol","host","window","pathname","Helmet","children","jsx","title","name","content","description","keywords","rel","href","propTypes","string","image","schema","arrayOf","object","filterByModuleAccess","allowedModules","accessibleModules","matchingSubModules","dayOfWeek","day","condition","validationSchema","when","is","then","otherwise","notRequired","overrides","navigate","basePath","idExtractor","row","id","generateRouteWithId","minDate","maxDate","selected","min","max","format","size","sizeCategory","absSize","Math","abs","toFixed","code","Intl","DisplayNames","type","of","routes","updatedRoutes","forEach","key","redirectionLink","idField","redirectionPathWithId","tableConfig","pathWithIdField","rest"],"mappings":"4cAmBMA,EAAmB,CACvBC,SAAU,mBACVC,YAAa,4BACbC,SAAU,6BACVC,WAAY,+BACZC,gBAAiB,8BACjBC,SAAU,+CAONC,EAAgB,CAACC,EAAYC,IAC7BC,EAAMC,QAAQF,GACTA,EAAcG,SAEnBH,aAAyBI,KACpBJ,EAEoB,iBAAlBA,GAA8BA,EAChCC,EAAMD,GAAeG,SAEvB,KAQIE,EAAuB,CAACC,EAAiC,MACpE,MAAMC,UACJA,GAAY,EAAAC,WACZA,GAAa,EAAAC,YACbA,GAAc,EAAAC,gBACdA,EAAkBnB,EAAiBC,SAAAmB,gBACnCA,EAAkBpB,EAAiBG,SAAAkB,kBACnCA,EAAoBrB,EAAiBI,WAAAkB,uBACrCA,EAAyBtB,EAAiBK,gBAAAkB,mBAC1CA,EAAqBvB,EAAiBE,YAAAsB,UACtCA,GAAY,EAAAC,gBACZA,EAAkBzB,EAAiBM,UACjCS,EAEJ,OAAOW,EAAIC,QACRC,UAAUrB,GACVsB,UAAUN,GACVtB,SAASkB,GACTW,KAAK,kBAAmB,SAAStB,GAChC,IAAKA,EAAO,OAAO,EAEnB,MAAMuB,EAAMrB,IACNsB,EAAmBtB,EAAMF,GACzByB,EAAQvB,IAAQwB,QAAQ,OACxBC,EAAezB,EAAMF,GAAO0B,QAAQ,OAG1C,GAAIC,EAAaC,SAASH,KAAWjB,EACnC,OAA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EzB,QAAQ,GACN,KAAKE,EAAU,KACbD,EAAe,IAAID,EAAO,MAAMK,QAAQ,UACxC,MACF,KAAKH,GAAW,MAAQA,EAAU,QAChCD,EAAe,IAAID,EAAO,MAAMK,QAAQ,QACxC,MACF,KAAKH,GAAW,SAAeA,EAAU,WACvCD,EAAe,IAAID,EAAA,SAAsBK,QAAQ,QACjD,MACF,QACEJ,EAAe,IAAID,EAAA,YAA6BK,QAAQ,QAG5D,OAAOJ,gCJmG4BnI,GACnCL,EAAqB,CACnBE,WAAW,EACXC,YAAY,EACZC,aAAa,EACbC,kBACAC,gBAAiB,mDK3HMuI,GACL,IAAIC,KAAKC,aAAa,CAAC,MAAO,CAAEC,KAAM,WACvCC,GAAGJ,oCFWiBK,IACvC,MAAMC,EAAwC,IAAKD,GAiBnD,OAfApF,OAAOC,KAAKoF,GAAeC,QAAQC,KAE/BA,EAAI5E,WAAW,UACf4E,EAAI5E,WAAW,UACf4E,EAAI5E,WAAW,YACf4E,EAAIpG,SAAS,WACboG,EAAIpG,SAAS,WACboG,EAAIpG,SAAS,eAERkG,EAAcE,GAAKpG,SAAS,OAC/BkG,EAAcE,GAAO,GAAGF,EAAcE,aAKrCF,+BA1B0B,CAACG,EAAyBC,EAAkB,QACtE,CACLC,sBAAuB,GAAGF,QAC1BC,uCHgI+BlJ,GACjCL,EAAqB,CACnBE,WAAW,EACXC,YAAY,EACZC,aAAa,EACbC,kBACAE,kBAAmB,qFGhGoC,CACzDkJ,EACAC,EACAH,EAAkB,QAElB,SAAWI,GAASF,EAEpB,MAAO,IACFE,EACHH,sBAAuBE,EACvBH"}
@@ -2,7 +2,7 @@ import * as Yup from "yup";
2
2
  import dayjs from "dayjs";
3
3
  import { jsxs, jsx } from "react/jsx-runtime";
4
4
  import { Helmet } from "react-helmet";
5
- import { P as PropTypes } from "./index-iPYNYnNP.esm.js";
5
+ import { P as PropTypes } from "./index-wf5q5BST.esm.js";
6
6
  import { g as generateRouteWithId } from "./useAuth-CDeIJjEt.esm.js";
7
7
  const getCountry = (code) => {
8
8
  const regionNames = new Intl.DisplayNames(["en"], { type: "region" });
@@ -354,4 +354,4 @@ export {
354
354
  pastDateValidation as r,
355
355
  updateTableConfigForParameterizedNavigation as u
356
356
  };
357
- //# sourceMappingURL=migration-utils-BRjncD-b.esm.js.map
357
+ //# sourceMappingURL=migration-utils-DGoEzQUj.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-utils-BRjncD-b.esm.js","sources":["../../src/utils/country.ts","../../src/utils/dateValidation.tsx","../../src/utils/fileSize.ts","../../src/utils/menu-filter.ts","../../src/utils/metaComponent.tsx","../../src/utils/migration-utils.ts"],"sourcesContent":["export const getCountry = (code: string) => {\n const regionNames = new Intl.DisplayNames([\"en\"], { type: \"region\" });\n return regionNames.of(code);\n};\n","//eslint-disable @typescript-eslint/no-explicit-any\nimport * as Yup from 'yup';\nimport dayjs from 'dayjs';\n\n// Types for configuration\nexport interface DateValidationOptions {\n allowPast?: boolean;\n allowToday?: boolean;\n allowFuture?: boolean;\n requiredMessage?: string;\n pastDateMessage?: string;\n futureDateMessage?: string;\n todayNotAllowedMessage?: string;\n invalidDateMessage?: string;\n checkTime?: boolean;\n pastTimeMessage?: string;\n}\n\n// Default messages\nconst DEFAULT_MESSAGES = {\n required: 'Date is required',\n invalidDate: 'Date must be a valid date',\n pastDate: 'Date cannot be in the past',\n futureDate: 'Future dates are not allowed',\n todayNotAllowed: \"Today's date is not allowed\",\n pastTime: 'Time cannot be in the past for today\\'s date'\n};\n\n/**\n * Core date transformation function\n * Handles dayjs objects, Date objects, and string dates\n */\nconst transformDate = (value: any, originalValue: any) => {\n if (dayjs.isDayjs(originalValue)) {\n return originalValue.toDate();\n }\n if (originalValue instanceof Date) {\n return originalValue;\n }\n if (typeof originalValue === 'string' && originalValue) {\n return dayjs(originalValue).toDate();\n }\n return null;\n};\n\n/**\n * Global date validation function with full customization\n * @param options Configuration options for date validation\n * @returns Yup validation schema\n */\nexport const createDateValidation = (options: DateValidationOptions = {}) => {\n const {\n allowPast = false,\n allowToday = true,\n allowFuture = true,\n requiredMessage = DEFAULT_MESSAGES.required,\n pastDateMessage = DEFAULT_MESSAGES.pastDate,\n futureDateMessage = DEFAULT_MESSAGES.futureDate,\n todayNotAllowedMessage = DEFAULT_MESSAGES.todayNotAllowed,\n invalidDateMessage = DEFAULT_MESSAGES.invalidDate,\n checkTime = false,\n pastTimeMessage = DEFAULT_MESSAGES.pastTime\n } = options;\n\n return Yup.mixed()\n .transform(transformDate)\n .typeError(invalidDateMessage)\n .required(requiredMessage)\n .test('date-validation', function(value) {\n if (!value) return false;\n \n const now = dayjs();\n const selectedDateTime = dayjs(value);\n const today = dayjs().startOf('day');\n const selectedDate = dayjs(value).startOf('day');\n \n // Past date validation\n if (selectedDate.isBefore(today) && !allowPast) {\n return this.createError({ message: pastDateMessage });\n }\n \n // Today validation\n if (selectedDate.isSame(today)) {\n if (!allowToday) {\n return this.createError({ message: todayNotAllowedMessage });\n }\n \n // Time validation for today\n if (checkTime && selectedDateTime.isBefore(now)) {\n return this.createError({ message: pastTimeMessage });\n }\n }\n \n // Future date validation\n if (selectedDate.isAfter(today) && !allowFuture) {\n return this.createError({ message: futureDateMessage });\n }\n \n return true;\n });\n};\n\n/**\n * Quick preset validation functions for common use cases\n */\n\n// 1. Standard date validation (today + future allowed)\nexport const dateValidation = (requiredMessage?: string, options: DateValidationOptions = {}) => \n createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n ...options,\n requiredMessage\n });\n\n// 2. Future dates only (excluding today)\nexport const futureDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: false,\n allowToday: false,\n allowFuture: true,\n requiredMessage,\n pastDateMessage: 'Please select a future date'\n });\n\n// 3. Any date allowed (for historical records)\nexport const anyDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: true,\n allowToday: true,\n allowFuture: true,\n requiredMessage\n });\n\n// 4. Past dates only (for completed events)\nexport const pastDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: true,\n allowToday: true,\n allowFuture: false,\n requiredMessage,\n futureDateMessage: 'Future dates are not allowed'\n });\n\n// 5. Date with time validation\nexport const dateTimeValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n checkTime: true,\n requiredMessage\n });\n\n// 6. Business days only (Monday to Friday, future dates)\nexport const businessDateValidation = (requiredMessage?: string) => {\n return createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n requiredMessage\n }).test('business-day', 'Please select a business day (Monday to Friday)', function(value) {\n if (!value) return false;\n \n const dayOfWeek = dayjs(value).day();\n return dayOfWeek >= 1 && dayOfWeek <= 5; // Monday = 1, Friday = 5\n });\n};\n\n// 7. Date range validation (between two dates)\nexport const dateRangeValidation = (\n minDate: dayjs.Dayjs | Date | string,\n maxDate: dayjs.Dayjs | Date | string,\n requiredMessage?: string\n) => {\n return Yup.mixed()\n .transform(transformDate)\n .typeError(DEFAULT_MESSAGES.invalidDate)\n .required(requiredMessage || DEFAULT_MESSAGES.required)\n .test('date-range', function(value) {\n if (!value) return false;\n \n const selected = dayjs(value);\n const min = dayjs(minDate);\n const max = dayjs(maxDate);\n \n if (selected.isBefore(min)) {\n return this.createError({\n message: `Date must be after ${min.format('MMM DD, YYYY')}`\n });\n }\n \n if (selected.isAfter(max)) {\n return this.createError({\n message: `Date must be before ${max.format('MMM DD, YYYY')}`\n });\n }\n \n return true;\n });\n};\n\n/**\n * Utility function to create custom validation messages\n */\nexport const createCustomMessages = (overrides: Partial<typeof DEFAULT_MESSAGES>) => ({\n ...DEFAULT_MESSAGES,\n ...overrides\n});\n\n/**\n * Helper function for conditional date validation\n * Example: Date required only if another field has a specific value\n */\nexport const conditionalDateValidation = (\n condition: (formValues: any) => boolean,\n validationSchema: any,\n) => {\n return Yup.mixed().when('$root', {\n is: condition,\n then: validationSchema,\n otherwise: Yup.mixed().notRequired()\n });\n};\n\n// Export commonly used validation presets\nexport const COMMON_DATE_VALIDATIONS = {\n // Rental/Order dates\n rental: (msg?: string) => dateValidation(msg || 'Rental date is required'),\n\n};\n\n/**\n * Usage Examples:\n * \n * // Basic usage with custom required message\n * date: dateValidation('Please select a valid date')\n * \n * // Full customization\n * date: createDateValidation({\n * allowPast: false,\n * allowToday: true,\n * allowFuture: true,\n * requiredMessage: 'Date is required',\n * pastDateMessage: 'Cannot select past dates'\n * })\n * \n * // Preset validations\n * rentalDate: COMMON_DATE_VALIDATIONS.rental('Rental date is required')\n * bookingDate: COMMON_DATE_VALIDATIONS.booking()\n * \n * // Date range\n * eventDate: dateRangeValidation(\n * dayjs().add(1, 'day'),\n * dayjs().add(1, 'year'),\n * 'Event date is required'\n * )\n */","const fileSize = (size: number) => {\n let sizeCategory;\n const absSize = Math.abs(size);\n\n switch (true) {\n case absSize < 1024:\n sizeCategory = `${(size / 1024).toFixed(2)} Byte`;\n break;\n case absSize >= 1024 && absSize < 1024 * 1024:\n sizeCategory = `${(size / 1024).toFixed(2)} KB`;\n break;\n case absSize >= 1024 * 1024 && absSize < 1024 * 1024 * 1024:\n sizeCategory = `${(size / (1024 * 1024)).toFixed(2)} MB`;\n break;\n default:\n sizeCategory = `${(size / (1024 * 1024 * 1024)).toFixed(2)} GB`;\n }\n\n return sizeCategory;\n};\n\nexport { fileSize };\nexport default fileSize;\n","// types.ts - Type definitions for better type safety\r\nexport interface SubModule {\r\n sub_module_name: string;\r\n}\r\n\r\nexport interface ModuleAccess {\r\n module_name: string;\r\n sub_modules?: SubModule[];\r\n}\r\n\r\nexport interface UserData {\r\n module_access?: ModuleAccess[];\r\n}\r\n\r\nexport interface MenuItem {\r\n bacSubModuleName?: string;\r\n submenu?: MenuItem[];\r\n [key: string]: any;\r\n}\r\n\r\nexport interface Permission {\r\n [key: string]: any;\r\n}\r\n\r\n// storageUtils.ts - Centralized storage access\r\nexport class StorageUtils {\r\n /**\r\n * Retrieves and parses user data from localStorage\r\n * @returns Parsed user data or null if not found\r\n */\r\n static getUserData(): UserData | null {\r\n try {\r\n const userData = localStorage.getItem(\"_u_data\");\r\n return userData ? JSON.parse(userData) : null;\r\n } catch (error) {\r\n console.error(\"Error parsing user data:\", error);\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Retrieves and parses role permissions from localStorage\r\n * @returns Parsed permissions object\r\n */\r\n static getRolePermissions(): Permission {\r\n try {\r\n const permissions = localStorage.getItem(\"role-permission\");\r\n return permissions ? JSON.parse(permissions) : {};\r\n } catch (error) {\r\n console.error(\"Error parsing role permissions:\", error);\r\n return {};\r\n }\r\n }\r\n}\r\n\r\n// moduleAccessService.ts - Business logic for module access\r\nexport class ModuleAccessService {\r\n /**\r\n * Filters modules by allowed module names and adds dashboard sub-module\r\n * @param moduleNames - Array of allowed module names\r\n * @param userData - User data containing module access\r\n * @returns Filtered modules with dashboard added\r\n */\r\n static getAccessibleSubModules(\r\n moduleNames: string[],\r\n userData: UserData | null\r\n ): ModuleAccess[] {\r\n if (!userData?.module_access) {\r\n return [];\r\n }\r\n\r\n return userData.module_access\r\n .filter((module) => moduleNames.includes(module.module_name))\r\n .map((module) => ({\r\n ...module,\r\n sub_modules: [\r\n ...(module.sub_modules || []),\r\n { sub_module_name: \"dashboard\" }\r\n ]\r\n }));\r\n }\r\n\r\n /**\r\n * Extracts unique sub-module names from modules\r\n * @param modules - Array of module access objects\r\n * @returns Set of unique sub-module names\r\n */\r\n static extractSubModuleNames(modules: ModuleAccess[]): Set<string> {\r\n return new Set(\r\n modules.flatMap((module) => \r\n (module.sub_modules || []).map((subModule) => subModule.sub_module_name)\r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Matches sub-module names with permission keys\r\n * @param subModuleNames - Set of sub-module names\r\n * @param permissions - Permission object\r\n * @returns Set of matching sub-module names\r\n */\r\n static getMatchingSubModules(\r\n subModuleNames: Set<string>,\r\n permissions: Permission\r\n ): Set<string> {\r\n const permissionKeys = Object.keys(permissions);\r\n \r\n const matchingModules = Array.from(subModuleNames).filter((subModuleName) => {\r\n const lastPart = subModuleName.split(\"/\").pop() || \"\";\r\n return permissionKeys.some((permKey) => permKey.startsWith(lastPart));\r\n });\r\n\r\n return new Set(matchingModules);\r\n }\r\n}\r\n\r\n// menuFilterService.ts - Menu filtering logic\r\nexport class MenuFilterService {\r\n /**\r\n * Recursively filters menu items based on accessible sub-modules\r\n * @param menu - Array of menu items\r\n * @param accessibleSubModules - Set of accessible sub-module names\r\n * @returns Filtered menu array\r\n */\r\n static filterMenuByAccess(\r\n menu: MenuItem[],\r\n accessibleSubModules: Set<string>\r\n ): MenuItem[] {\r\n return menu.filter((item) => {\r\n const hasValidSubModule = \r\n item.bacSubModuleName && accessibleSubModules.has(item.bacSubModuleName);\r\n\r\n let hasValidSubmenu = false;\r\n \r\n if (item.submenu && item.submenu.length > 0) {\r\n item.submenu = this.filterMenuByAccess(item.submenu, accessibleSubModules);\r\n hasValidSubmenu = item.submenu.length > 0;\r\n }\r\n\r\n return hasValidSubModule || hasValidSubmenu;\r\n });\r\n }\r\n}\r\n\r\n// menuFilter.ts - Main filter orchestrator\r\nexport class MenuFilter {\r\n /**\r\n * Filters menu based on user permissions and module access\r\n * @param menu - Menu items to filter\r\n * @param allowedModules - Array of allowed module names\r\n * @returns Filtered menu items\r\n */\r\n static filterByModuleAccess(\r\n menu: MenuItem[],\r\n allowedModules: string[]\r\n ): MenuItem[] {\r\n // Retrieve user data and permissions\r\n const userData = StorageUtils.getUserData();\r\n const permissions = StorageUtils.getRolePermissions();\r\n\r\n // Get accessible sub-modules\r\n const accessibleModules = ModuleAccessService.getAccessibleSubModules(\r\n allowedModules,\r\n userData\r\n );\r\n\r\n // Extract sub-module names\r\n const subModuleNames = ModuleAccessService.extractSubModuleNames(\r\n accessibleModules\r\n );\r\n\r\n // Match with permissions\r\n const matchingSubModules = ModuleAccessService.getMatchingSubModules(\r\n subModuleNames,\r\n permissions\r\n );\r\n\r\n // Filter menu\r\n return MenuFilterService.filterMenuByAccess(menu, matchingSubModules);\r\n }\r\n}\r\n\r\n// Usage example in your module\r\n// manufacturing.ts\r\n// import { MenuFilter } from './menuFilter';\r\n// import { MenuItem } from './types';\r\n\r\n// export const getFilteredManufacturingMenu = (\r\n// menuData: MenuItem[]\r\n// ): MenuItem[] => {\r\n// const allowedModules = [\"manufacturing\", \"inventory\", \"sales\"];\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };\r\n\r\n// // sales.ts\r\n// export const getFilteredSalesMenu = (\r\n// menuData: MenuItem[]\r\n// ): MenuItem[] => {\r\n// const allowedModules = [\"sales\", \"inventory\"];\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };\r\n\r\n// // Generic usage with dynamic modules\r\n// export const getFilteredMenu = (\r\n// menuData: MenuItem[],\r\n// allowedModules: string[]\r\n// ): MenuItem[] => {\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };","import { Helmet } from \"react-helmet\";\nimport propTypes from \"prop-types\";\n\nconst MetaComponent = (props: any) => {\n const canonicalURL = props.location\n ? `${props.location.protocol}//${props.location.host}${window.location.pathname}`\n : \"\";\n\n return (\n <Helmet>\n <title>{props.title}</title>\n <meta name=\"description\" content={props.description} />\n <meta name=\"keywords\" content={props.keywords} />\n {props.location && <link rel=\"canonical\" href={`${canonicalURL}`} />}\n\n {/* {props.schema && <JsonLd data={props.schema} />} */}\n </Helmet>\n );\n};\n\nconst JsonLd = ({ data }: any) => {\n return data.map((schema: any, index: number) => {\n return (\n <script\n key={index}\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}\n />\n );\n });\n};\n\nMetaComponent.propTypes = {\n title: propTypes.string,\n keywords: propTypes.string,\n description: propTypes.string,\n image: propTypes.string,\n schema: propTypes.arrayOf(propTypes.object),\n location: propTypes.object,\n};\n\nJsonLd.propTypes = {\n data: propTypes.arrayOf(propTypes.object),\n};\n\nexport { MetaComponent };\nexport default MetaComponent;\n","\n\nimport { generateRouteWithId } from \"./route-utils\";\n\n\nexport const migrateToPathWithId = (redirectionLink: string, idField: string = 'id') => {\n return {\n redirectionPathWithId: `${redirectionLink}/:id`,\n idField\n };\n};\n\n\nexport const migrateRoutesToUseParams = (routes: Record<string, string>): Record<string, string> => {\n const updatedRoutes: Record<string, string> = { ...routes };\n \n Object.keys(updatedRoutes).forEach(key => {\n if (\n key.startsWith('VIEW_') || \n key.startsWith('EDIT_') || \n key.startsWith('DETAIL_') ||\n key.includes('_VIEW_') || \n key.includes('_EDIT_') || \n key.includes('_DETAIL_')\n ) {\n if (!updatedRoutes[key].includes(':')) {\n updatedRoutes[key] = `${updatedRoutes[key]}/:id`;\n }\n }\n });\n \n return updatedRoutes;\n};\n\nexport const createParameterizedNavigationHandler = (\n navigate: (path: string) => void,\n basePath: string,\n idExtractor: (row: any) => string | number = (row) => row.id\n) => {\n return (row: any) => {\n const id = idExtractor(row);\n navigate(generateRouteWithId(basePath, id));\n };\n};\n\n\nexport const updateTableConfigForParameterizedNavigation = (\n tableConfig: any,\n pathWithIdField: string,\n idField: string = 'id'\n) => {\n const { ...rest } = tableConfig;\n \n return {\n ...rest,\n redirectionPathWithId: pathWithIdField,\n idField\n };\n}; "],"names":["propTypes"],"mappings":";;;;;;AAAO,MAAM,aAAa,CAAC,SAAiB;AAC1C,QAAM,cAAc,IAAI,KAAK,aAAa,CAAC,IAAI,GAAG,EAAE,MAAM,UAAU;AACpE,SAAO,YAAY,GAAG,IAAI;AAC5B;ACgBA,MAAM,mBAAmB;AAAA,EACvB,UAAU;AAAA,EACV,aAAa;AAAA,EACb,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,UAAU;AACZ;AAMA,MAAM,gBAAgB,CAAC,OAAY,kBAAuB;AACxD,MAAI,MAAM,QAAQ,aAAa,GAAG;AAChC,WAAO,cAAc,OAAA;AAAA,EACvB;AACA,MAAI,yBAAyB,MAAM;AACjC,WAAO;AAAA,EACT;AACA,MAAI,OAAO,kBAAkB,YAAY,eAAe;AAC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AA,IAAS;AAEpB,SAAO;AAAA,IACL,GAAG;AAAA,IACH,uBAAuB;AAAA,IACvB;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"migration-utils-DGoEzQUj.esm.js","sources":["../../src/utils/country.ts","../../src/utils/dateValidation.tsx","../../src/utils/fileSize.ts","../../src/utils/menu-filter.ts","../../src/utils/metaComponent.tsx","../../src/utils/migration-utils.ts"],"sourcesContent":["export const getCountry = (code: string) => {\n const regionNames = new Intl.DisplayNames([\"en\"], { type: \"region\" });\n return regionNames.of(code);\n};\n","//eslint-disable @typescript-eslint/no-explicit-any\nimport * as Yup from 'yup';\nimport dayjs from 'dayjs';\n\n// Types for configuration\nexport interface DateValidationOptions {\n allowPast?: boolean;\n allowToday?: boolean;\n allowFuture?: boolean;\n requiredMessage?: string;\n pastDateMessage?: string;\n futureDateMessage?: string;\n todayNotAllowedMessage?: string;\n invalidDateMessage?: string;\n checkTime?: boolean;\n pastTimeMessage?: string;\n}\n\n// Default messages\nconst DEFAULT_MESSAGES = {\n required: 'Date is required',\n invalidDate: 'Date must be a valid date',\n pastDate: 'Date cannot be in the past',\n futureDate: 'Future dates are not allowed',\n todayNotAllowed: \"Today's date is not allowed\",\n pastTime: 'Time cannot be in the past for today\\'s date'\n};\n\n/**\n * Core date transformation function\n * Handles dayjs objects, Date objects, and string dates\n */\nconst transformDate = (value: any, originalValue: any) => {\n if (dayjs.isDayjs(originalValue)) {\n return originalValue.toDate();\n }\n if (originalValue instanceof Date) {\n return originalValue;\n }\n if (typeof originalValue === 'string' && originalValue) {\n return dayjs(originalValue).toDate();\n }\n return null;\n};\n\n/**\n * Global date validation function with full customization\n * @param options Configuration options for date validation\n * @returns Yup validation schema\n */\nexport const createDateValidation = (options: DateValidationOptions = {}) => {\n const {\n allowPast = false,\n allowToday = true,\n allowFuture = true,\n requiredMessage = DEFAULT_MESSAGES.required,\n pastDateMessage = DEFAULT_MESSAGES.pastDate,\n futureDateMessage = DEFAULT_MESSAGES.futureDate,\n todayNotAllowedMessage = DEFAULT_MESSAGES.todayNotAllowed,\n invalidDateMessage = DEFAULT_MESSAGES.invalidDate,\n checkTime = false,\n pastTimeMessage = DEFAULT_MESSAGES.pastTime\n } = options;\n\n return Yup.mixed()\n .transform(transformDate)\n .typeError(invalidDateMessage)\n .required(requiredMessage)\n .test('date-validation', function(value) {\n if (!value) return false;\n \n const now = dayjs();\n const selectedDateTime = dayjs(value);\n const today = dayjs().startOf('day');\n const selectedDate = dayjs(value).startOf('day');\n \n // Past date validation\n if (selectedDate.isBefore(today) && !allowPast) {\n return this.createError({ message: pastDateMessage });\n }\n \n // Today validation\n if (selectedDate.isSame(today)) {\n if (!allowToday) {\n return this.createError({ message: todayNotAllowedMessage });\n }\n \n // Time validation for today\n if (checkTime && selectedDateTime.isBefore(now)) {\n return this.createError({ message: pastTimeMessage });\n }\n }\n \n // Future date validation\n if (selectedDate.isAfter(today) && !allowFuture) {\n return this.createError({ message: futureDateMessage });\n }\n \n return true;\n });\n};\n\n/**\n * Quick preset validation functions for common use cases\n */\n\n// 1. Standard date validation (today + future allowed)\nexport const dateValidation = (requiredMessage?: string, options: DateValidationOptions = {}) => \n createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n ...options,\n requiredMessage\n });\n\n// 2. Future dates only (excluding today)\nexport const futureDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: false,\n allowToday: false,\n allowFuture: true,\n requiredMessage,\n pastDateMessage: 'Please select a future date'\n });\n\n// 3. Any date allowed (for historical records)\nexport const anyDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: true,\n allowToday: true,\n allowFuture: true,\n requiredMessage\n });\n\n// 4. Past dates only (for completed events)\nexport const pastDateValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: true,\n allowToday: true,\n allowFuture: false,\n requiredMessage,\n futureDateMessage: 'Future dates are not allowed'\n });\n\n// 5. Date with time validation\nexport const dateTimeValidation = (requiredMessage?: string) => \n createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n checkTime: true,\n requiredMessage\n });\n\n// 6. Business days only (Monday to Friday, future dates)\nexport const businessDateValidation = (requiredMessage?: string) => {\n return createDateValidation({\n allowPast: false,\n allowToday: true,\n allowFuture: true,\n requiredMessage\n }).test('business-day', 'Please select a business day (Monday to Friday)', function(value) {\n if (!value) return false;\n \n const dayOfWeek = dayjs(value).day();\n return dayOfWeek >= 1 && dayOfWeek <= 5; // Monday = 1, Friday = 5\n });\n};\n\n// 7. Date range validation (between two dates)\nexport const dateRangeValidation = (\n minDate: dayjs.Dayjs | Date | string,\n maxDate: dayjs.Dayjs | Date | string,\n requiredMessage?: string\n) => {\n return Yup.mixed()\n .transform(transformDate)\n .typeError(DEFAULT_MESSAGES.invalidDate)\n .required(requiredMessage || DEFAULT_MESSAGES.required)\n .test('date-range', function(value) {\n if (!value) return false;\n \n const selected = dayjs(value);\n const min = dayjs(minDate);\n const max = dayjs(maxDate);\n \n if (selected.isBefore(min)) {\n return this.createError({\n message: `Date must be after ${min.format('MMM DD, YYYY')}`\n });\n }\n \n if (selected.isAfter(max)) {\n return this.createError({\n message: `Date must be before ${max.format('MMM DD, YYYY')}`\n });\n }\n \n return true;\n });\n};\n\n/**\n * Utility function to create custom validation messages\n */\nexport const createCustomMessages = (overrides: Partial<typeof DEFAULT_MESSAGES>) => ({\n ...DEFAULT_MESSAGES,\n ...overrides\n});\n\n/**\n * Helper function for conditional date validation\n * Example: Date required only if another field has a specific value\n */\nexport const conditionalDateValidation = (\n condition: (formValues: any) => boolean,\n validationSchema: any,\n) => {\n return Yup.mixed().when('$root', {\n is: condition,\n then: validationSchema,\n otherwise: Yup.mixed().notRequired()\n });\n};\n\n// Export commonly used validation presets\nexport const COMMON_DATE_VALIDATIONS = {\n // Rental/Order dates\n rental: (msg?: string) => dateValidation(msg || 'Rental date is required'),\n\n};\n\n/**\n * Usage Examples:\n * \n * // Basic usage with custom required message\n * date: dateValidation('Please select a valid date')\n * \n * // Full customization\n * date: createDateValidation({\n * allowPast: false,\n * allowToday: true,\n * allowFuture: true,\n * requiredMessage: 'Date is required',\n * pastDateMessage: 'Cannot select past dates'\n * })\n * \n * // Preset validations\n * rentalDate: COMMON_DATE_VALIDATIONS.rental('Rental date is required')\n * bookingDate: COMMON_DATE_VALIDATIONS.booking()\n * \n * // Date range\n * eventDate: dateRangeValidation(\n * dayjs().add(1, 'day'),\n * dayjs().add(1, 'year'),\n * 'Event date is required'\n * )\n */","const fileSize = (size: number) => {\n let sizeCategory;\n const absSize = Math.abs(size);\n\n switch (true) {\n case absSize < 1024:\n sizeCategory = `${(size / 1024).toFixed(2)} Byte`;\n break;\n case absSize >= 1024 && absSize < 1024 * 1024:\n sizeCategory = `${(size / 1024).toFixed(2)} KB`;\n break;\n case absSize >= 1024 * 1024 && absSize < 1024 * 1024 * 1024:\n sizeCategory = `${(size / (1024 * 1024)).toFixed(2)} MB`;\n break;\n default:\n sizeCategory = `${(size / (1024 * 1024 * 1024)).toFixed(2)} GB`;\n }\n\n return sizeCategory;\n};\n\nexport { fileSize };\nexport default fileSize;\n","// types.ts - Type definitions for better type safety\r\nexport interface SubModule {\r\n sub_module_name: string;\r\n}\r\n\r\nexport interface ModuleAccess {\r\n module_name: string;\r\n sub_modules?: SubModule[];\r\n}\r\n\r\nexport interface UserData {\r\n module_access?: ModuleAccess[];\r\n}\r\n\r\nexport interface MenuItem {\r\n bacSubModuleName?: string;\r\n submenu?: MenuItem[];\r\n [key: string]: any;\r\n}\r\n\r\nexport interface Permission {\r\n [key: string]: any;\r\n}\r\n\r\n// storageUtils.ts - Centralized storage access\r\nexport class StorageUtils {\r\n /**\r\n * Retrieves and parses user data from localStorage\r\n * @returns Parsed user data or null if not found\r\n */\r\n static getUserData(): UserData | null {\r\n try {\r\n const userData = localStorage.getItem(\"_u_data\");\r\n return userData ? JSON.parse(userData) : null;\r\n } catch (error) {\r\n console.error(\"Error parsing user data:\", error);\r\n return null;\r\n }\r\n }\r\n\r\n /**\r\n * Retrieves and parses role permissions from localStorage\r\n * @returns Parsed permissions object\r\n */\r\n static getRolePermissions(): Permission {\r\n try {\r\n const permissions = localStorage.getItem(\"role-permission\");\r\n return permissions ? JSON.parse(permissions) : {};\r\n } catch (error) {\r\n console.error(\"Error parsing role permissions:\", error);\r\n return {};\r\n }\r\n }\r\n}\r\n\r\n// moduleAccessService.ts - Business logic for module access\r\nexport class ModuleAccessService {\r\n /**\r\n * Filters modules by allowed module names and adds dashboard sub-module\r\n * @param moduleNames - Array of allowed module names\r\n * @param userData - User data containing module access\r\n * @returns Filtered modules with dashboard added\r\n */\r\n static getAccessibleSubModules(\r\n moduleNames: string[],\r\n userData: UserData | null\r\n ): ModuleAccess[] {\r\n if (!userData?.module_access) {\r\n return [];\r\n }\r\n\r\n return userData.module_access\r\n .filter((module) => moduleNames.includes(module.module_name))\r\n .map((module) => ({\r\n ...module,\r\n sub_modules: [\r\n ...(module.sub_modules || []),\r\n { sub_module_name: \"dashboard\" }\r\n ]\r\n }));\r\n }\r\n\r\n /**\r\n * Extracts unique sub-module names from modules\r\n * @param modules - Array of module access objects\r\n * @returns Set of unique sub-module names\r\n */\r\n static extractSubModuleNames(modules: ModuleAccess[]): Set<string> {\r\n return new Set(\r\n modules.flatMap((module) => \r\n (module.sub_modules || []).map((subModule) => subModule.sub_module_name)\r\n )\r\n );\r\n }\r\n\r\n /**\r\n * Matches sub-module names with permission keys\r\n * @param subModuleNames - Set of sub-module names\r\n * @param permissions - Permission object\r\n * @returns Set of matching sub-module names\r\n */\r\n static getMatchingSubModules(\r\n subModuleNames: Set<string>,\r\n permissions: Permission\r\n ): Set<string> {\r\n const permissionKeys = Object.keys(permissions);\r\n \r\n const matchingModules = Array.from(subModuleNames).filter((subModuleName) => {\r\n const lastPart = subModuleName.split(\"/\").pop() || \"\";\r\n return permissionKeys.some((permKey) => permKey.startsWith(lastPart));\r\n });\r\n\r\n return new Set(matchingModules);\r\n }\r\n}\r\n\r\n// menuFilterService.ts - Menu filtering logic\r\nexport class MenuFilterService {\r\n /**\r\n * Recursively filters menu items based on accessible sub-modules\r\n * @param menu - Array of menu items\r\n * @param accessibleSubModules - Set of accessible sub-module names\r\n * @returns Filtered menu array\r\n */\r\n static filterMenuByAccess(\r\n menu: MenuItem[],\r\n accessibleSubModules: Set<string>\r\n ): MenuItem[] {\r\n return menu.filter((item) => {\r\n const hasValidSubModule = \r\n item.bacSubModuleName && accessibleSubModules.has(item.bacSubModuleName);\r\n\r\n let hasValidSubmenu = false;\r\n \r\n if (item.submenu && item.submenu.length > 0) {\r\n item.submenu = this.filterMenuByAccess(item.submenu, accessibleSubModules);\r\n hasValidSubmenu = item.submenu.length > 0;\r\n }\r\n\r\n return hasValidSubModule || hasValidSubmenu;\r\n });\r\n }\r\n}\r\n\r\n// menuFilter.ts - Main filter orchestrator\r\nexport class MenuFilter {\r\n /**\r\n * Filters menu based on user permissions and module access\r\n * @param menu - Menu items to filter\r\n * @param allowedModules - Array of allowed module names\r\n * @returns Filtered menu items\r\n */\r\n static filterByModuleAccess(\r\n menu: MenuItem[],\r\n allowedModules: string[]\r\n ): MenuItem[] {\r\n // Retrieve user data and permissions\r\n const userData = StorageUtils.getUserData();\r\n const permissions = StorageUtils.getRolePermissions();\r\n\r\n // Get accessible sub-modules\r\n const accessibleModules = ModuleAccessService.getAccessibleSubModules(\r\n allowedModules,\r\n userData\r\n );\r\n\r\n // Extract sub-module names\r\n const subModuleNames = ModuleAccessService.extractSubModuleNames(\r\n accessibleModules\r\n );\r\n\r\n // Match with permissions\r\n const matchingSubModules = ModuleAccessService.getMatchingSubModules(\r\n subModuleNames,\r\n permissions\r\n );\r\n\r\n // Filter menu\r\n return MenuFilterService.filterMenuByAccess(menu, matchingSubModules);\r\n }\r\n}\r\n\r\n// Usage example in your module\r\n// manufacturing.ts\r\n// import { MenuFilter } from './menuFilter';\r\n// import { MenuItem } from './types';\r\n\r\n// export const getFilteredManufacturingMenu = (\r\n// menuData: MenuItem[]\r\n// ): MenuItem[] => {\r\n// const allowedModules = [\"manufacturing\", \"inventory\", \"sales\"];\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };\r\n\r\n// // sales.ts\r\n// export const getFilteredSalesMenu = (\r\n// menuData: MenuItem[]\r\n// ): MenuItem[] => {\r\n// const allowedModules = [\"sales\", \"inventory\"];\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };\r\n\r\n// // Generic usage with dynamic modules\r\n// export const getFilteredMenu = (\r\n// menuData: MenuItem[],\r\n// allowedModules: string[]\r\n// ): MenuItem[] => {\r\n// return MenuFilter.filterByModuleAccess(menuData, allowedModules);\r\n// };","import { Helmet } from \"react-helmet\";\nimport propTypes from \"prop-types\";\n\nconst MetaComponent = (props: any) => {\n const canonicalURL = props.location\n ? `${props.location.protocol}//${props.location.host}${window.location.pathname}`\n : \"\";\n\n return (\n <Helmet>\n <title>{props.title}</title>\n <meta name=\"description\" content={props.description} />\n <meta name=\"keywords\" content={props.keywords} />\n {props.location && <link rel=\"canonical\" href={`${canonicalURL}`} />}\n\n {/* {props.schema && <JsonLd data={props.schema} />} */}\n </Helmet>\n );\n};\n\nconst JsonLd = ({ data }: any) => {\n return data.map((schema: any, index: number) => {\n return (\n <script\n key={index}\n type=\"application/ld+json\"\n dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}\n />\n );\n });\n};\n\nMetaComponent.propTypes = {\n title: propTypes.string,\n keywords: propTypes.string,\n description: propTypes.string,\n image: propTypes.string,\n schema: propTypes.arrayOf(propTypes.object),\n location: propTypes.object,\n};\n\nJsonLd.propTypes = {\n data: propTypes.arrayOf(propTypes.object),\n};\n\nexport { MetaComponent };\nexport default MetaComponent;\n","\n\nimport { generateRouteWithId } from \"./route-utils\";\n\n\nexport const migrateToPathWithId = (redirectionLink: string, idField: string = 'id') => {\n return {\n redirectionPathWithId: `${redirectionLink}/:id`,\n idField\n };\n};\n\n\nexport const migrateRoutesToUseParams = (routes: Record<string, string>): Record<string, string> => {\n const updatedRoutes: Record<string, string> = { ...routes };\n \n Object.keys(updatedRoutes).forEach(key => {\n if (\n key.startsWith('VIEW_') || \n key.startsWith('EDIT_') || \n key.startsWith('DETAIL_') ||\n key.includes('_VIEW_') || \n key.includes('_EDIT_') || \n key.includes('_DETAIL_')\n ) {\n if (!updatedRoutes[key].includes(':')) {\n updatedRoutes[key] = `${updatedRoutes[key]}/:id`;\n }\n }\n });\n \n return updatedRoutes;\n};\n\nexport const createParameterizedNavigationHandler = (\n navigate: (path: string) => void,\n basePath: string,\n idExtractor: (row: any) => string | number = (row) => row.id\n) => {\n return (row: any) => {\n const id = idExtractor(row);\n navigate(generateRouteWithId(basePath, id));\n };\n};\n\n\nexport const updateTableConfigForParameterizedNavigation = (\n tableConfig: any,\n pathWithIdField: string,\n idField: string = 'id'\n) => {\n const { ...rest } = tableConfig;\n \n return {\n ...rest,\n redirectionPathWithId: pathWithIdField,\n idField\n };\n}; "],"names":["propTypes"],"mappings":";;;;;;AAAO,MAAM,aAAa,CAAC,SAAiB;AAC1C,QAAM,cAAc,IAAI,KAAK,aAAa,CAAC,IAAI,GAAG,EAAE,MAAM,UAAU;AACpE,SAAO,YAAY,GAAG,IAAI;AAC5B;ACgBA,MAAM,mBAAmB;AAAA,EACvB,UAAU;AAAA,EACV,aAAa;AAAA,EACb,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,UAAU;AACZ;AAMA,MAAM,gBAAgB,CAAC,OAAY,kBAAuB;AACxD,MAAI,MAAM,QAAQ,aAAa,GAAG;AAChC,WAAO,cAAc,OAAA;AAAA,EACvB;AACA,MAAI,yBAAyB,MAAM;AACjC,WAAO;AAAA,EACT;AACA,MAAI,OAAO,kBAAkB,YAAY,eAAe;AACtD,WAAO,MAAM,aAAa,EAAE,OAAA;AAAA,EAC9B;AACA,SAAO;AACT;AAOO,MAAM,uBAAuB,CAAC,UAAiC,OAAO;AAC3E,QAAM;AAAA,IACJ,YAAY;AAAA,IACZ,aAAa;AAAA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