@erpsquad/common 1.8.102 → 1.8.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index/index.esm10.js +3 -3
- package/dist/_virtual/index/index.esm11.js +4 -2
- package/dist/_virtual/index/index.esm11.js.map +1 -1
- package/dist/_virtual/index/index.esm2.js +2 -4
- package/dist/_virtual/index/index.esm2.js.map +1 -1
- package/dist/_virtual/index/index.esm3.js +3 -3
- package/dist/_virtual/index/index.esm4.js +3 -3
- package/dist/_virtual/index/index.esm5.js +3 -3
- package/dist/_virtual/index/index.esm6.js +3 -3
- package/dist/_virtual/index/index.esm7.js +3 -3
- package/dist/_virtual/index/index.esm8.js +3 -3
- package/dist/_virtual/index/index.esm9.js +3 -3
- package/dist/_virtual/index/index10.js +1 -1
- package/dist/_virtual/index/index11.js +1 -1
- package/dist/_virtual/index/index2.js +1 -1
- package/dist/_virtual/index/index3.js +1 -1
- package/dist/_virtual/index/index4.js +1 -1
- package/dist/_virtual/index/index5.js +1 -1
- package/dist/_virtual/index/index6.js +1 -1
- package/dist/_virtual/index/index7.js +1 -1
- package/dist/_virtual/index/index8.js +1 -1
- package/dist/_virtual/index/index9.js +1 -1
- package/dist/api-client/api.inventory/api/index.esm.js +95 -30
- package/dist/api-client/api.inventory/api/index.esm.js.map +1 -1
- package/dist/api-client/api.inventory/api/index.js +1 -1
- package/dist/api-client/api.inventory/api/index.js.map +1 -1
- package/dist/api-client/api.inventory/api-types.d.ts +930 -425
- package/dist/api-client/api.inventory/api.d.ts +14 -10
- package/dist/api-client/api.rbac/api/index.esm2.js +218 -0
- package/dist/api-client/api.rbac/api/index.esm2.js.map +1 -1
- package/dist/api-client/api.rbac/api/index2.js +1 -1
- package/dist/api-client/api.rbac/api/index2.js.map +1 -1
- package/dist/components/filter/components/delete-group/index.esm.js +1 -0
- package/dist/components/filter/components/delete-group/index.esm.js.map +1 -1
- package/dist/components/filter/components/delete-group/index.js +1 -1
- package/dist/components/filter/components/delete-group/index.js.map +1 -1
- package/dist/components/listing/listing/index.esm.js +2 -2
- package/dist/components/listing/listing/index.esm.js.map +1 -1
- package/dist/components/listing/listing/index.js +5 -5
- package/dist/components/listing/listing/index.js.map +1 -1
- package/dist/components/providers/ERPUIProvider/index.esm.js +0 -6
- package/dist/components/providers/ERPUIProvider/index.esm.js.map +1 -1
- package/dist/components/providers/ERPUIProvider/index.js +1 -2
- package/dist/components/providers/ERPUIProvider/index.js.map +1 -1
- package/dist/components/uom-field-wrapper/uom-field-wrapper/index.esm.js.map +1 -1
- package/dist/components/uom-field-wrapper/uom-field-wrapper/index.js.map +1 -1
- package/dist/hooks/index.esm.js +4 -4
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-translations/index.esm.js +1 -2
- package/dist/hooks/use-translations/index.esm.js.map +1 -1
- package/dist/hooks/use-translations/index.js +1 -1
- package/dist/hooks/use-translations/index.js.map +1 -1
- package/dist/hooks/useDataFetcher/index.esm.js +2 -3
- package/dist/hooks/useDataFetcher/index.esm.js.map +1 -1
- package/dist/hooks/useDataFetcher/index.js +1 -1
- package/dist/hooks/useDataFetcher/index.js.map +1 -1
- package/dist/hooks/useDataFetcher.d.ts +2 -2
- package/dist/index.esm.js +69 -69
- package/dist/index.js +1 -1
- package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.esm.js +1 -1
- package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.js +1 -1
- package/dist/node_modules/@asseinfo/react-kanban/dist/index/index.js.map +1 -1
- package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.esm.js +1 -1
- package/dist/node_modules/@mui/icons-material/utils/createSvgIcon/index.js +1 -1
- package/dist/node_modules/@mui/system/colorManipulator/index.esm.js +2 -2
- package/dist/node_modules/@mui/system/colorManipulator/index.js +1 -1
- package/dist/node_modules/@mui/system/colorManipulator/index.js.map +1 -1
- package/dist/node_modules/@mui/system/createStyled/index.esm.js +6 -6
- package/dist/node_modules/@mui/system/createStyled/index.js +1 -1
- package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.esm.js +1 -1
- package/dist/node_modules/@mui/system/useThemeWithoutDefault/index.js +1 -1
- package/dist/src/api-client/api.inventory/api.d.ts +14 -10
- package/dist/src/hooks/useDataFetcher.d.ts +2 -2
- package/dist/src/utils/api.d.ts +18 -8
- package/dist/style.css +65 -65
- package/dist/utils/api/index.esm.js +45 -22
- package/dist/utils/api/index.esm.js.map +1 -1
- package/dist/utils/api/index.js +1 -1
- package/dist/utils/api/index.js.map +1 -1
- package/dist/utils/api.d.ts +18 -8
- package/dist/utils/common-utility/index.esm.js +13 -7
- package/dist/utils/common-utility/index.esm.js.map +1 -1
- package/dist/utils/common-utility/index.js +5 -5
- package/dist/utils/common-utility/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exports as createSvgIcon } from "../../../../../_virtual/createSvgIcon/index.esm.js";
|
|
2
|
-
import require$$0 from "../../../../../_virtual/index/index.
|
|
2
|
+
import require$$0 from "../../../../../_virtual/index/index.esm3.js";
|
|
3
3
|
var hasRequiredCreateSvgIcon;
|
|
4
4
|
function requireCreateSvgIcon() {
|
|
5
5
|
if (hasRequiredCreateSvgIcon) return createSvgIcon;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("../../../../../_virtual/createSvgIcon/index.js"),t=require("../../../../../_virtual/index/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("../../../../../_virtual/createSvgIcon/index.js"),t=require("../../../../../_virtual/index/index3.js");exports.__require=function(){return e||(e=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=t.default}(r.__exports)),r.__exports};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __exports as colorManipulator } from "../../../../_virtual/colorManipulator/index.esm.js";
|
|
2
|
-
import require$$1 from "../../../../_virtual/index/index.
|
|
3
|
-
import require$$2 from "../../../../_virtual/index/index.
|
|
2
|
+
import require$$1 from "../../../../_virtual/index/index.esm10.js";
|
|
3
|
+
import require$$2 from "../../../../_virtual/index/index.esm11.js";
|
|
4
4
|
import { i as interopRequireDefaultExports } from "../../../@babel/runtime/helpers/interopRequireDefault/index.esm.js";
|
|
5
5
|
var _interopRequireDefault = interopRequireDefaultExports;
|
|
6
6
|
Object.defineProperty(colorManipulator, "__esModule", {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/colorManipulator/index.js"),r=require("../../../../_virtual/index/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/colorManipulator/index.js"),r=require("../../../../_virtual/index/index10.js"),t=require("../../../../_virtual/index/index11.js"),n=require("../../../@babel/runtime/helpers/interopRequireDefault/index.js").interopRequireDefaultExports;Object.defineProperty(e.__exports,"__esModule",{value:!0});var o=e.__exports.alpha=g;e.__exports.blend=function(e,r,t,n=1){const o=(e,r)=>Math.round((e**(1/n)*(1-t)+r**(1/n)*t)**n),s=_(e),a=_(r);return x({type:"rgb",values:[o(s.values[0],a.values[0]),o(s.values[1],a.values[1]),o(s.values[2],a.values[2])]})},e.__exports.colorChannel=void 0;var s=e.__exports.darken=y;e.__exports.decomposeColor=_;var a=e.__exports.emphasize=O,l=e.__exports.getContrastRatio=function(e,r){const t=d(e),n=d(r);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)};e.__exports.getLuminance=d,e.__exports.hexToRgb=f,e.__exports.hslToRgb=v;var p=e.__exports.lighten=b;e.__exports.private_safeAlpha=function(e,r,t){try{return g(e,r)}catch(n){return t&&process.env.NODE_ENV,e}},e.__exports.private_safeColorChannel=void 0,e.__exports.private_safeDarken=function(e,r,t){try{return y(e,r)}catch(n){return t&&process.env.NODE_ENV,e}},e.__exports.private_safeEmphasize=function(e,r,t){try{return O(e,r)}catch(n){return t&&process.env.NODE_ENV,e}},e.__exports.private_safeLighten=function(e,r,t){try{return b(e,r)}catch(n){return t&&process.env.NODE_ENV,e}},e.__exports.recomposeColor=x,e.__exports.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:r}=_(e);return`#${r.map((e,r)=>function(e){const r=e.toString(16);return 1===r.length?`0${r}`:r}(3===r?Math.round(255*e):e)).join("")}`};var u=n(r.default),i=n(t.default);function c(e,r=0,t=1){return process.env.NODE_ENV,(0,i.default)(e,r,t)}function f(e){e=e.slice(1);const r=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let t=e.match(r);return t&&1===t[0].length&&(t=t.map(e=>e+e)),t?`rgb${4===t.length?"a":""}(${t.map((e,r)=>r<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}function _(e){if(e.type)return e;if("#"===e.charAt(0))return _(f(e));const r=e.indexOf("("),t=e.substring(0,r);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(t))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:(0,u.default)(9,e));let n,o=e.substring(r+1,e.length-1);if("color"===t){if(o=o.split(" "),n=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${n}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:(0,u.default)(10,n))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:t,values:o,colorSpace:n}}const h=e=>{const r=_(e);return r.values.slice(0,3).map((e,t)=>-1!==r.type.indexOf("hsl")&&0!==t?`${e}%`:e).join(" ")};function x(e){const{type:r,colorSpace:t}=e;let{values:n}=e;return-1!==r.indexOf("rgb")?n=n.map((e,r)=>r<3?parseInt(e,10):e):-1!==r.indexOf("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=-1!==r.indexOf("color")?`${t} ${n.join(" ")}`:`${n.join(", ")}`,`${r}(${n})`}function v(e){e=_(e);const{values:r}=e,t=r[0],n=r[1]/100,o=r[2]/100,s=n*Math.min(o,1-o),a=(e,r=(e+t/30)%12)=>o-s*Math.max(Math.min(r-3,9-r,1),-1);let l="rgb";const p=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(l+="a",p.push(r[3])),x({type:l,values:p})}function d(e){let r="hsl"===(e=_(e)).type||"hsla"===e.type?_(v(e)).values:e.values;return r=r.map(r=>("color"!==e.type&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*r[0]+.7152*r[1]+.0722*r[2]).toFixed(3))}function g(e,r){return e=_(e),r=c(r),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${r}`:e.values[3]=r,x(e)}function y(e,r){if(e=_(e),r=c(r),-1!==e.type.indexOf("hsl"))e.values[2]*=1-r;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let t=0;t<3;t+=1)e.values[t]*=1-r;return x(e)}function b(e,r){if(e=_(e),r=c(r),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*r;else if(-1!==e.type.indexOf("rgb"))for(let t=0;t<3;t+=1)e.values[t]+=(255-e.values[t])*r;else if(-1!==e.type.indexOf("color"))for(let t=0;t<3;t+=1)e.values[t]+=(1-e.values[t])*r;return x(e)}function O(e,r=.15){return d(e)>.5?y(e,r):b(e,r)}e.__exports.colorChannel=h,e.__exports.private_safeColorChannel=(e,r)=>{try{return h(e)}catch(t){return r&&process.env.NODE_ENV,e}},exports.default=e.__exports,exports.alpha=o,exports.darken=s,exports.emphasize=a,exports.getContrastRatio=l,exports.lighten=p;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@mui/system/colorManipulator.js"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.alpha = alpha;\nexports.blend = blend;\nexports.colorChannel = void 0;\nexports.darken = darken;\nexports.decomposeColor = decomposeColor;\nexports.emphasize = emphasize;\nexports.getContrastRatio = getContrastRatio;\nexports.getLuminance = getLuminance;\nexports.hexToRgb = hexToRgb;\nexports.hslToRgb = hslToRgb;\nexports.lighten = lighten;\nexports.private_safeAlpha = private_safeAlpha;\nexports.private_safeColorChannel = void 0;\nexports.private_safeDarken = private_safeDarken;\nexports.private_safeEmphasize = private_safeEmphasize;\nexports.private_safeLighten = private_safeLighten;\nexports.recomposeColor = recomposeColor;\nexports.rgbToHex = rgbToHex;\nvar _formatMuiErrorMessage2 = _interopRequireDefault(require(\"@mui/utils/formatMuiErrorMessage\"));\nvar _clamp = _interopRequireDefault(require(\"@mui/utils/clamp\"));\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return (0, _clamp.default)(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nfunction hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nfunction decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : (0, _formatMuiErrorMessage2.default)(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : (0, _formatMuiErrorMessage2.default)(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nconst colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexports.colorChannel = colorChannel;\nconst private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexports.private_safeColorChannel = private_safeColorChannel;\nfunction recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.indexOf('color') !== -1) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nfunction rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nfunction hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nfunction getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nfunction getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nfunction private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nfunction private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nfunction private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nfunction private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nfunction blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}"],"names":["_interopRequireDefault","require$$0","Object","defineProperty","colorManipulator","value","alpha_1","alpha","blend","background","overlay","opacity","gamma","blendChannel","b","o","Math","round","backgroundColor","decomposeColor","overlayColor","recomposeColor","type","values","colorChannel","darken_1","darken","emphasize_1","emphasize","getContrastRatio_1","getContrastRatio","foreground","lumA","getLuminance","lumB","max","min","hexToRgb","hslToRgb","lighten_1","lighten","private_safeAlpha","color","warning","error","process","env","NODE_ENV","private_safeColorChannel","private_safeDarken","coefficient","private_safeEmphasize","private_safeLighten","rgbToHex","indexOf","map","n","i","int","hex","toString","length","intToHex","join","_formatMuiErrorMessage2","require$$1","_clamp","require$$2","clampWrapper","default","slice","re","RegExp","colors","match","index","parseInt","charAt","marker","substring","Error","colorSpace","split","shift","parseFloat","decomposedColor","val","idx","h","s","l","a","f","k","rgb","push","Number","toFixed"],"mappings":"yOAEIA,4EAAyBC,6BAC7BC,OAAOC,eAAeC,EAAAA,UAAS,aAAc,CAC3CC,OAAO,IAET,IAAAC,EAAAF,EAAAA,UAAAG,MAAgBA,EAChBH,EAAAA,UAAAI,MAmWA,SAAeC,EAAYC,EAASC,EAASC,EAAQ,GACnD,MAAMC,EAAe,CAACC,EAAGC,IAAMC,KAAKC,OAAOH,IAAM,EAAIF,IAAU,EAAID,GAAWI,IAAM,EAAIH,GAASD,IAAYC,GACvGM,EAAkBC,EAAeV,GACjCW,EAAeD,EAAeT,GAEpC,OAAOW,EAAe,CACpBC,KAAM,MACNC,OAHU,CAACV,EAAaK,EAAgBK,OAAO,GAAIH,EAAaG,OAAO,IAAKV,EAAaK,EAAgBK,OAAO,GAAIH,EAAaG,OAAO,IAAKV,EAAaK,EAAgBK,OAAO,GAAIH,EAAaG,OAAO,MAK7M,EA3WAnB,EAAAA,UAAAoB,kBAAuB,EACvB,IAAAC,EAAArB,EAAAA,UAAAsB,OAAiBA,EACjBtB,EAAAA,UAAAe,eAAyBA,EACzB,IAAAQ,EAAAvB,EAAAA,UAAAwB,UAAoBA,EACpBC,EAAAzB,EAAAA,UAAA0B,iBA8NA,SAA0BC,EAAYtB,GACpC,MAAMuB,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,EAAI2B,OAC3B,IAA2C,IAA9BR,EAAMpB,KAAKgC,QAAQ,SAAiD,IAAhCZ,EAAMpB,KAAKgC,QAAQ,SAChE,IAAA,IAASG,EAAI,EAAGA,EAAI,EAAGA,GAAK,EAC1Bf,EAAMnB,OAAOkC,IAAM,EAAIP,EAG3B,OAAO7B,EAAeqB,EACxB,CAkBA,SAASF,EAAQE,EAAOQ,GAGtB,GAFAR,EAAQvB,EAAeuB,GACvBQ,EAAckB,EAAalB,IACO,IAA9BR,EAAMpB,KAAKgC,QAAQ,OACrBZ,EAAMnB,OAAO,KAAO,IAAMmB,EAAMnB,OAAO,IAAM2B,WACN,IAA9BR,EAAMpB,KAAKgC,QAAQ,OAC5B,IAAA,IAASG,EAAI,EAAGA,EAAI,EAAGA,GAAK,EAC1Bf,EAAMnB,OAAOkC,KAAO,IAAMf,EAAMnB,OAAOkC,IAAMP,WAEN,IAAhCR,EAAMpB,KAAKgC,QAAQ,SAC5B,IAAA,IAASG,EAAI,EAAGA,EAAI,EAAGA,GAAK,EAC1Bf,EAAMnB,OAAOkC,KAAO,EAAIf,EAAMnB,OAAOkC,IAAMP,EAG/C,OAAO7B,EAAeqB,EACxB,CAmBA,SAASd,EAAUc,EAAOQ,EAAc,KACtC,OAAOjB,EAAaS,GAAS,GAAMhB,EAAOgB,EAAOQ,GAAeV,EAAQE,EAAOQ,EACjF,CA/NA9C,EAAAA,UAAAoB,aAAuBA,EAmBvBpB,EAAAA,UAAA4C,yBAlBiC,CAACN,EAAOC,KACvC,IACE,OAAOnB,EAAakB,EACxB,OAAWE,GAIP,OAHID,GAAWE,QAAQC,IAAIC,SAGpBL,CACX","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/@mui/system/colorManipulator.js"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.alpha = alpha;\nexports.blend = blend;\nexports.colorChannel = void 0;\nexports.darken = darken;\nexports.decomposeColor = decomposeColor;\nexports.emphasize = emphasize;\nexports.getContrastRatio = getContrastRatio;\nexports.getLuminance = getLuminance;\nexports.hexToRgb = hexToRgb;\nexports.hslToRgb = hslToRgb;\nexports.lighten = lighten;\nexports.private_safeAlpha = private_safeAlpha;\nexports.private_safeColorChannel = void 0;\nexports.private_safeDarken = private_safeDarken;\nexports.private_safeEmphasize = private_safeEmphasize;\nexports.private_safeLighten = private_safeLighten;\nexports.recomposeColor = recomposeColor;\nexports.rgbToHex = rgbToHex;\nvar _formatMuiErrorMessage2 = _interopRequireDefault(require(\"@mui/utils/formatMuiErrorMessage\"));\nvar _clamp = _interopRequireDefault(require(\"@mui/utils/clamp\"));\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return (0, _clamp.default)(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nfunction hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nfunction decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (['rgb', 'rgba', 'hsl', 'hsla', 'color'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : (0, _formatMuiErrorMessage2.default)(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].indexOf(colorSpace) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : (0, _formatMuiErrorMessage2.default)(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nconst colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf('hsl') !== -1 && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexports.colorChannel = colorChannel;\nconst private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexports.private_safeColorChannel = private_safeColorChannel;\nfunction recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.indexOf('color') !== -1) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nfunction rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nfunction hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nfunction getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nfunction getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nfunction private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1 || color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nfunction private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.indexOf('color') !== -1) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nfunction private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nfunction emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nfunction private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nfunction blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}"],"names":["_interopRequireDefault","require$$0","Object","defineProperty","colorManipulator","value","alpha_1","alpha","blend","background","overlay","opacity","gamma","blendChannel","b","o","Math","round","backgroundColor","decomposeColor","overlayColor","recomposeColor","type","values","colorChannel","darken_1","darken","emphasize_1","emphasize","getContrastRatio_1","getContrastRatio","foreground","lumA","getLuminance","lumB","max","min","hexToRgb","hslToRgb","lighten_1","lighten","private_safeAlpha","color","warning","error","process","env","NODE_ENV","private_safeColorChannel","private_safeDarken","coefficient","private_safeEmphasize","private_safeLighten","rgbToHex","indexOf","map","n","i","int","hex","toString","length","intToHex","join","_formatMuiErrorMessage2","require$$1","_clamp","require$$2","clampWrapper","default","slice","re","RegExp","colors","match","index","parseInt","charAt","marker","substring","Error","colorSpace","split","shift","parseFloat","decomposedColor","val","idx","h","s","l","a","f","k","rgb","push","Number","toFixed"],"mappings":"0OAEIA,4EAAyBC,6BAC7BC,OAAOC,eAAeC,EAAAA,UAAS,aAAc,CAC3CC,OAAO,IAET,IAAAC,EAAAF,EAAAA,UAAAG,MAAgBA,EAChBH,EAAAA,UAAAI,MAmWA,SAAeC,EAAYC,EAASC,EAASC,EAAQ,GACnD,MAAMC,EAAe,CAACC,EAAGC,IAAMC,KAAKC,OAAOH,IAAM,EAAIF,IAAU,EAAID,GAAWI,IAAM,EAAIH,GAASD,IAAYC,GACvGM,EAAkBC,EAAeV,GACjCW,EAAeD,EAAeT,GAEpC,OAAOW,EAAe,CACpBC,KAAM,MACNC,OAHU,CAACV,EAAaK,EAAgBK,OAAO,GAAIH,EAAaG,OAAO,IAAKV,EAAaK,EAAgBK,OAAO,GAAIH,EAAaG,OAAO,IAAKV,EAAaK,EAAgBK,OAAO,GAAIH,EAAaG,OAAO,MAK7M,EA3WAnB,EAAAA,UAAAoB,kBAAuB,EACvB,IAAAC,EAAArB,EAAAA,UAAAsB,OAAiBA,EACjBtB,EAAAA,UAAAe,eAAyBA,EACzB,IAAAQ,EAAAvB,EAAAA,UAAAwB,UAAoBA,EACpBC,EAAAzB,EAAAA,UAAA0B,iBA8NA,SAA0BC,EAAYtB,GACpC,MAAMuB,EAAOC,EAAaF,GACpBG,EAAOD,EAAaxB,GAC1B,OAAQO,KAAKmB,IAAIH,EAAME,GAAQ,MAASlB,KAAKoB,IAAIJ,EAAME,GAAQ,IACjE,EAjOA9B,EAAAA,UAAA6B,aAAuBA,EACvB7B,EAAAA,UAAAiC,SAAmBA,EACnBjC,EAAAA,UAAAkC,SAAmBA,EACnB,IAAAC,EAAAnC,EAAAA,UAAAoC,QAAkBA,EAClBpC,EAAAA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Q,EAAckB,EAAalB,IACO,IAA9BR,EAAMpB,KAAKgC,QAAQ,OACrBZ,EAAMnB,OAAO,KAAO,IAAMmB,EAAMnB,OAAO,IAAM2B,WACN,IAA9BR,EAAMpB,KAAKgC,QAAQ,OAC5B,IAAA,IAASG,EAAI,EAAGA,EAAI,EAAGA,GAAK,EAC1Bf,EAAMnB,OAAOkC,KAAO,IAAMf,EAAMnB,OAAOkC,IAAMP,WAEN,IAAhCR,EAAMpB,KAAKgC,QAAQ,SAC5B,IAAA,IAASG,EAAI,EAAGA,EAAI,EAAGA,GAAK,EAC1Bf,EAAMnB,OAAOkC,KAAO,EAAIf,EAAMnB,OAAOkC,IAAMP,EAG/C,OAAO7B,EAAeqB,EACxB,CAmBA,SAASd,EAAUc,EAAOQ,EAAc,KACtC,OAAOjB,EAAaS,GAAS,GAAMhB,EAAOgB,EAAOQ,GAAeV,EAAQE,EAAOQ,EACjF,CA/NA9C,EAAAA,UAAAoB,aAAuBA,EAmBvBpB,EAAAA,UAAA4C,yBAlBiC,CAACN,EAAOC,KACvC,IACE,OAAOnB,EAAakB,EACxB,OAAWE,GAIP,OAHID,GAAWE,QAAQC,IAAIC,SAGpBL,CACX","x_google_ignoreList":[0]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { __exports as createStyled$1 } from "../../../../_virtual/createStyled/index.esm.js";
|
|
2
2
|
import { __require as require_extends } from "../../../@babel/runtime/helpers/extends/index.esm.js";
|
|
3
3
|
import { __require as requireObjectWithoutPropertiesLoose } from "../../../@babel/runtime/helpers/objectWithoutPropertiesLoose/index.esm.js";
|
|
4
|
-
import require$$1 from "../../../../_virtual/index/index.
|
|
5
|
-
import require$$4 from "../../../../_virtual/index/index.
|
|
6
|
-
import require$$5 from "../../../../_virtual/index/index.
|
|
7
|
-
import require$$6 from "../../../../_virtual/index/index.
|
|
8
|
-
import require$$7 from "../../../../_virtual/index/index.
|
|
9
|
-
import require$$8 from "../../../../_virtual/index/index.
|
|
4
|
+
import require$$1 from "../../../../_virtual/index/index.esm4.js";
|
|
5
|
+
import require$$4 from "../../../../_virtual/index/index.esm5.js";
|
|
6
|
+
import require$$5 from "../../../../_virtual/index/index.esm6.js";
|
|
7
|
+
import require$$6 from "../../../../_virtual/index/index.esm7.js";
|
|
8
|
+
import require$$7 from "../../../../_virtual/index/index.esm8.js";
|
|
9
|
+
import require$$8 from "../../../../_virtual/index/index.esm9.js";
|
|
10
10
|
import { i as interopRequireDefaultExports } from "../../../@babel/runtime/helpers/interopRequireDefault/index.esm.js";
|
|
11
11
|
var _interopRequireDefault = interopRequireDefaultExports;
|
|
12
12
|
Object.defineProperty(createStyled$1, "__esModule", {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/createStyled/index.js"),t=require("../../../@babel/runtime/helpers/extends/index.js"),r=require("../../../@babel/runtime/helpers/objectWithoutPropertiesLoose/index.js"),o=require("../../../../_virtual/index/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/createStyled/index.js"),t=require("../../../@babel/runtime/helpers/extends/index.js"),r=require("../../../@babel/runtime/helpers/objectWithoutPropertiesLoose/index.js"),o=require("../../../../_virtual/index/index4.js"),n=require("../../../../_virtual/index/index5.js"),s=require("../../../../_virtual/index/index6.js"),a=require("../../../../_virtual/index/index7.js"),i=require("../../../../_virtual/index/index8.js"),u=require("../../../../_virtual/index/index9.js"),l=require("../../../@babel/runtime/helpers/interopRequireDefault/index.js").interopRequireDefaultExports;Object.defineProperty(e.__exports,"__esModule",{value:!0});var d=e.__exports.default=function(e={}){const{themeId:t,defaultTheme:r=q,rootShouldForwardProp:o=S,slotShouldForwardProp:n=S}=e,s=e=>(0,v.default)((0,f.default)({},e,{theme:g((0,f.default)({},e,{defaultTheme:r,themeId:t}))}));return s.__mui_systemSx=!0,(e,a={})=>{(0,c.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:i,slot:u,skipVariantsResolver:l,skipSx:d,overridesResolver:_=A(P(u))}=a,v=(0,p.default)(a,w),x=i&&i.startsWith("Mui")||u?"components":"custom",j=void 0!==l?l:u&&"Root"!==u&&"root"!==u||!1,b=d||!1;let O;"production"!==process.env.NODE_ENV&&i&&(O=`${i}-${P(u||"Root")}`);let q=S;"Root"===u||"root"===u?q=o:u?q=n:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(q=void 0);const R=(0,c.default)(e,(0,f.default)({shouldForwardProp:q,label:O},v)),C=e=>"function"==typeof e&&e.__emotion_real!==e||(0,m.isPlainObject)(e)?o=>{const n=g({theme:o.theme,defaultTheme:r,themeId:t});return k(e,(0,f.default)({},o,{theme:n}),n.modularCssLayers?x:void 0)}:e,D=(o,...n)=>{let a=C(o);const l=n?n.map(C):[];i&&_&&l.push(e=>{const o=g((0,f.default)({},e,{defaultTheme:r,themeId:t}));if(!o.components||!o.components[i]||!o.components[i].styleOverrides)return null;const n=o.components[i].styleOverrides,s={};return Object.entries(n).forEach(([t,r])=>{s[t]=k(r,(0,f.default)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),_(e,s)}),i&&!j&&l.push(e=>{var o;const n=g((0,f.default)({},e,{defaultTheme:r,themeId:t}));return k({variants:null==n||null==(o=n.components)||null==(o=o[i])?void 0:o.variants},(0,f.default)({},e,{theme:n}),n.modularCssLayers?"theme":void 0)}),b||l.push(s);const d=l.length-n.length;if(Array.isArray(o)&&d>0){const e=new Array(d).fill("");a=[...o,...e],a.raw=[...o.raw,...e]}const p=R(a,...l);if("production"!==process.env.NODE_ENV){let t;i&&(t=`${i}${(0,y.default)(u||"")}`),void 0===t&&(t=`Styled(${(0,h.default)(e)})`),p.displayName=t}return e.muiName&&(p.muiName=e.muiName),p};return R.withConfig&&(D.withConfig=R.withConfig),D}};e.__exports.shouldForwardProp=S,e.__exports.systemDefaultTheme=void 0;var f=l(t.__require()),p=l(r.__require()),c=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=b(void 0);if(t&&t.has(e))return t.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var s=o?Object.getOwnPropertyDescriptor(e,n):null;s&&(s.get||s.set)?Object.defineProperty(r,n,s):r[n]=e[n]}return r.default=e,t&&t.set(e,r),r}(o.default),m=n.default,y=l(s.default),h=l(a.default),_=l(i.default),v=l(u.default);const x=["ownerState"],j=["variants"],w=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function b(e){if("function"!=typeof WeakMap)return null;var t=/* @__PURE__ */new WeakMap,r=/* @__PURE__ */new WeakMap;return(b=function(e){return e?r:t})(e)}function S(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function O(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const q=e.__exports.systemDefaultTheme=(0,_.default)(),P=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function g({defaultTheme:e,theme:t,themeId:r}){return o=t,0===Object.keys(o).length?e:t[r]||t;var o}function A(e){return e?(t,r)=>r[e]:null}function k(e,t,r){let{ownerState:o}=t,n=(0,p.default)(t,x);const s="function"==typeof e?e((0,f.default)({ownerState:o},n)):e;if(Array.isArray(s))return s.flatMap(e=>k(e,(0,f.default)({ownerState:o},n),r));if(s&&"object"==typeof s&&Array.isArray(s.variants)){const{variants:e=[]}=s;let t=(0,p.default)(s,j);return e.forEach(e=>{let s=!0;if("function"==typeof e.props?s=e.props((0,f.default)({ownerState:o},n,o)):Object.keys(e.props).forEach(t=>{(null==o?void 0:o[t])!==e.props[t]&&n[t]!==e.props[t]&&(s=!1)}),s){Array.isArray(t)||(t=[t]);const s="function"==typeof e.style?e.style((0,f.default)({ownerState:o},n,o)):e.style;t.push(r?O((0,c.internal_serializeStyles)(s),r):s)}}),t}return r?O((0,c.internal_serializeStyles)(s),r):s}exports.default=d;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exports as useThemeWithoutDefault } from "../../../../_virtual/useThemeWithoutDefault/index.esm.js";
|
|
2
|
-
import require$$1 from "../../../../_virtual/index/index.
|
|
2
|
+
import require$$1 from "../../../../_virtual/index/index.esm4.js";
|
|
3
3
|
import React__default from "react";
|
|
4
4
|
Object.defineProperty(useThemeWithoutDefault, "__esModule", {
|
|
5
5
|
value: true
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/useThemeWithoutDefault/index.js"),t=require("../../../../_virtual/index/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../_virtual/useThemeWithoutDefault/index.js"),t=require("../../../../_virtual/index/index4.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=/* @__PURE__ */r(require("react"));Object.defineProperty(e.__exports,"__esModule",{value:!0}),exports.default=e.__exports.default=void 0;var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a(void 0);if(t&&t.has(e))return t.get(e);var r={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var o=u?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(r,n,o):r[n]=e[n]}return r.default=e,t&&t.set(e,r),r}(u.default),o=t.default;function a(e){if("function"!=typeof WeakMap)return null;var t=/* @__PURE__ */new WeakMap,r=/* @__PURE__ */new WeakMap;return(a=function(e){return e?r:t})(e)}exports.default=e.__exports.default=function(e=null){const t=n.useContext(o.ThemeContext);return t&&(r=t,0!==Object.keys(r).length)?t:e;var r};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -52,13 +52,15 @@ export declare const getV1BinId: Api['getV1BinId'];
|
|
|
52
52
|
export declare const putV1BinId: Api['putV1BinId'];
|
|
53
53
|
export declare const deleteV1BinId: Api['deleteV1BinId'];
|
|
54
54
|
export declare const getV1BinGenerateExcel: Api['getV1BinGenerateExcel'];
|
|
55
|
-
export declare const
|
|
55
|
+
export declare const postV1UomTemplates: Api['postV1UomTemplates'];
|
|
56
|
+
export declare const getV1UomTemplates: Api['getV1UomTemplates'];
|
|
56
57
|
export declare const getV1Uom: Api['getV1Uom'];
|
|
57
|
-
export declare const
|
|
58
|
-
export declare const
|
|
59
|
-
export declare const
|
|
60
|
-
export declare const
|
|
58
|
+
export declare const getV1UomTemplatesId: Api['getV1UomTemplatesId'];
|
|
59
|
+
export declare const putV1UomTemplatesId: Api['putV1UomTemplatesId'];
|
|
60
|
+
export declare const deleteV1UomTemplatesId: Api['deleteV1UomTemplatesId'];
|
|
61
|
+
export declare const deleteV1UomUnitsId: Api['deleteV1UomUnitsId'];
|
|
61
62
|
export declare const getV1UomGenerateExcel: Api['getV1UomGenerateExcel'];
|
|
63
|
+
export declare const getV1UomUnitsIdCheckConversionFactor: Api['getV1UomUnitsIdCheckConversionFactor'];
|
|
62
64
|
export declare const postV1CategoryItems: Api['postV1CategoryItems'];
|
|
63
65
|
export declare const getV1CategoryItems: Api['getV1CategoryItems'];
|
|
64
66
|
export declare const getV1CategoryItemsId: Api['getV1CategoryItemsId'];
|
|
@@ -192,13 +194,15 @@ export default function build(url: string, options?: BuildOptions): {
|
|
|
192
194
|
putV1BinId: any;
|
|
193
195
|
deleteV1BinId: any;
|
|
194
196
|
getV1BinGenerateExcel: any;
|
|
195
|
-
|
|
197
|
+
postV1UomTemplates: any;
|
|
198
|
+
getV1UomTemplates: any;
|
|
196
199
|
getV1Uom: any;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
200
|
+
getV1UomTemplatesId: any;
|
|
201
|
+
putV1UomTemplatesId: any;
|
|
202
|
+
deleteV1UomTemplatesId: any;
|
|
203
|
+
deleteV1UomUnitsId: any;
|
|
201
204
|
getV1UomGenerateExcel: any;
|
|
205
|
+
getV1UomUnitsIdCheckConversionFactor: any;
|
|
202
206
|
postV1CategoryItems: any;
|
|
203
207
|
getV1CategoryItems: any;
|
|
204
208
|
getV1CategoryItemsId: any;
|
|
@@ -18,8 +18,8 @@ interface ActivePage {
|
|
|
18
18
|
accessorKey: string;
|
|
19
19
|
}[];
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
declare const useGenericDataFetcher: (cols?: ActivePage, pagination: {
|
|
22
22
|
skip: number;
|
|
23
23
|
limit: number;
|
|
24
24
|
}, fetchAction: (filters: FilterParams) => void, customeFilter?: any, customDeps?: any[], showCreatedBy?: boolean, customFields?: any) => () => void;
|
|
25
|
-
export default
|
|
25
|
+
export default useGenericDataFetcher;
|
package/dist/src/utils/api.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare const getOptions: (apiFunc: (params: any) => Promise<any>, filter
|
|
|
8
8
|
export declare const apiConfigurations: {
|
|
9
9
|
company: {
|
|
10
10
|
name: string;
|
|
11
|
-
apiFunc: (req?: import('
|
|
11
|
+
apiFunc: (req?: import('api-client/api.rbac/api-types').GetV1CompanyRequest) => Promise<import('api-client/api.rbac/api-types').GetV1CompanyResponses>;
|
|
12
12
|
dataKey: string;
|
|
13
13
|
labelKey: string;
|
|
14
14
|
defaultColumn: string[];
|
|
@@ -98,7 +98,7 @@ export declare const apiConfigurations: {
|
|
|
98
98
|
};
|
|
99
99
|
salesperson: {
|
|
100
100
|
name: string;
|
|
101
|
-
apiFunc: (req?: import('
|
|
101
|
+
apiFunc: (req?: import('api-client/api.rbac/api-types').GetV1UserRequest) => Promise<import('api-client/api.rbac/api-types').GetV1UserResponses>;
|
|
102
102
|
dataKey: string;
|
|
103
103
|
defaultColumn: string[];
|
|
104
104
|
defaultFilter: {
|
|
@@ -118,7 +118,7 @@ export declare const apiConfigurations: {
|
|
|
118
118
|
};
|
|
119
119
|
department: {
|
|
120
120
|
name: string;
|
|
121
|
-
apiFunc: (req?: import('
|
|
121
|
+
apiFunc: (req?: import('api-client/api.rbac/api-types').GetV1UserDepartmentRequest) => Promise<import('api-client/api.rbac/api-types').GetV1UserDepartmentResponses>;
|
|
122
122
|
dataKey: string;
|
|
123
123
|
labelKey: string;
|
|
124
124
|
defaultColumn: string[];
|
|
@@ -152,7 +152,7 @@ export declare const apiConfigurations: {
|
|
|
152
152
|
labelKey: string;
|
|
153
153
|
defaultColumn: string[];
|
|
154
154
|
defaultFilter: {
|
|
155
|
-
"
|
|
155
|
+
"template_id.ne": any;
|
|
156
156
|
};
|
|
157
157
|
};
|
|
158
158
|
discountedItems: {
|
|
@@ -315,7 +315,7 @@ export declare const apiConfigurations: {
|
|
|
315
315
|
defaultColumn: string[];
|
|
316
316
|
defaultFilter: {
|
|
317
317
|
"is_active.eq": number;
|
|
318
|
-
"status.ne": string;
|
|
318
|
+
"&status.ne": string;
|
|
319
319
|
};
|
|
320
320
|
};
|
|
321
321
|
vehicleNumbers: {
|
|
@@ -388,7 +388,7 @@ export declare const apiConfigurations: {
|
|
|
388
388
|
};
|
|
389
389
|
countries: {
|
|
390
390
|
name: string;
|
|
391
|
-
apiFunc: (req?: import('
|
|
391
|
+
apiFunc: (req?: import('api-client/api.rbac/api-types').GetV1LocationsCountriesRequest) => Promise<import('api-client/api.rbac/api-types').GetV1LocationsCountriesResponses>;
|
|
392
392
|
dataKey: string;
|
|
393
393
|
labelKey: string;
|
|
394
394
|
defaultColumn: string[];
|
|
@@ -408,7 +408,7 @@ export declare const apiConfigurations: {
|
|
|
408
408
|
};
|
|
409
409
|
states: {
|
|
410
410
|
name: string;
|
|
411
|
-
apiFunc: (req?: import('
|
|
411
|
+
apiFunc: (req?: import('api-client/api.rbac/api-types').GetV1LocationsStatesRequest) => Promise<import('api-client/api.rbac/api-types').GetV1LocationsStatesResponses>;
|
|
412
412
|
dataKey: string;
|
|
413
413
|
labelKey: string;
|
|
414
414
|
defaultColumn: string[];
|
|
@@ -637,7 +637,7 @@ export declare const apiConfigurations: {
|
|
|
637
637
|
};
|
|
638
638
|
roles: {
|
|
639
639
|
name: string;
|
|
640
|
-
apiFunc: (req?: import('
|
|
640
|
+
apiFunc: (req?: import('api-client/api.rbac/api-types').GetV1RoleRequest) => Promise<import('api-client/api.rbac/api-types').GetV1RoleResponses>;
|
|
641
641
|
dataKey: string;
|
|
642
642
|
labelKey: string;
|
|
643
643
|
defaultColumn: string[];
|
|
@@ -649,6 +649,16 @@ export declare const apiConfigurations: {
|
|
|
649
649
|
labelKey: string;
|
|
650
650
|
defaultColumn: string[];
|
|
651
651
|
};
|
|
652
|
+
uom_templates: {
|
|
653
|
+
name: string;
|
|
654
|
+
apiFunc: (req?: import('../api-client/api.inventory/api-types').GetV1UomTemplatesRequest) => Promise<import('../api-client/api.inventory/api-types').GetV1UomTemplatesResponses>;
|
|
655
|
+
dataKey: string;
|
|
656
|
+
labelKey: string;
|
|
657
|
+
defaultColumn: string[];
|
|
658
|
+
defaultFilter: {
|
|
659
|
+
"is_active.eq": number;
|
|
660
|
+
};
|
|
661
|
+
};
|
|
652
662
|
workflow_reference: {
|
|
653
663
|
name: string;
|
|
654
664
|
apiFunc: (req?: import('api-client/api.workflow-automation/api-types').GetV1WorkflowReferencesRequest) => Promise<import('api-client/api.workflow-automation/api-types').GetV1WorkflowReferencesResponses>;
|