gant-core 0.2.34 → 0.2.35

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/lib/core/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as R}from"./request/index.js";export{r as request}from"./request/index.js";export{e as expireCache}from"./cache/index.js";import{g as S,u as U}from"./store/index.js";export{a as MENU_BREADCRUMBS_UPDATE,M as MENU_HISTORY_UPDATE,c as codeListStore,i as companydataStore,l as loginStore,m as menuStore,p as parameterStore,s as storageStore}from"./store/index.js";import{i as O}from"./i18n/index.js";export{t as tr}from"./i18n/index.js";export{P as PresetColors,T as TinyColor,A as bounds,b as compactAlgorithm,J as convertDecimalToHex,K as convertHexToDecimal,a as darkAlgorithm,d as defaultAlgorithm,f as formatAliasToken,u as fromRatio,g as getAliasToken,h as getAlphaColor,k as getBackgroundColor,i as getDarkenSolidColor,j as getLightenSolidColor,e as getTokenCssVar,D as hslToRgb,F as hsvToRgb,w as inputToRGB,o as isReadable,y as isValidCSSUnit,v as legacyRandom,l as lighten,c as meetingDerivative,p as mostReadable,n as names,M as numberInputToObject,L as parseIntFromHex,z as random,r as readability,G as rgbToHex,C as rgbToHsl,E as rgbToHsv,B as rgbToRgb,I as rgbaToArgbHex,H as rgbaToHex,s as seed,x as stringInputToObject,m as tinycolor,q as toMsFilter,t as token}from"./theme/index.js";export{g as getTraceId}from"./microservices/index.js";import{g as $}from"./utils/index.js";export{a as getAntdLocaleKey,b as getRoutes,s as setLocaleKey}from"./utils/index.js";import{uniqueId as _}from"lodash-es";export*from"axios";import"mitt";const N="X-G-TRACE-ID",V=e=>s=>{const{url:a="",serviceId:r}=s,o={};Object.keys(e).forEach((s=>{e[s].forEach((e=>{o[e]=s}))})),Object.keys(e).forEach((e=>{}));let t=`${a}.api`;const[,i]=t.split("/");return t=r?`/${r}${t}`:o[i]?`/${o[i]}${t}`:t,delete s.serviceId,s.url=t,s},X=e=>s=>{const a=_(N);return s.headers={...s.headers,[N]:a,needHtmlEscape:"false",userLanguage:e,...U.userIdentity},s};var Y=async({microServiceMap:e,dynamicLangCallback:s,...a})=>{R.interceptors.request.use(V(e)),await S.findPlantform();const r=$();R.interceptors.request.use(X(r)),await O(r),await(s?.());return await S.init(a)};export{$ as getLocaleKey,S as globalStore,Y as init,O as initDynamicLang,R as requestInstance,X as useRequestHeader,V as useRequestMicroSevices,U as userStore};
1
+ import{a as R}from"./request/index.js";export{r as request}from"./request/index.js";export{e as expireCache}from"./cache/index.js";import{g as S,u as U}from"./store/index.js";export{a as MENU_BREADCRUMBS_UPDATE,M as MENU_HISTORY_UPDATE,c as codeListStore,i as companydataStore,l as loginStore,m as menuStore,p as parameterStore,s as storageStore}from"./store/index.js";import{i as O}from"./i18n/index.js";export{t as tr}from"./i18n/index.js";export{P as PresetColors,T as TinyColor,A as bounds,b as compactAlgorithm,J as convertDecimalToHex,K as convertHexToDecimal,a as darkAlgorithm,d as defaultAlgorithm,f as formatAliasToken,u as fromRatio,g as getAliasToken,h as getAlphaColor,k as getBackgroundColor,i as getDarkenSolidColor,j as getLightenSolidColor,e as getTokenCssVar,D as hslToRgb,F as hsvToRgb,w as inputToRGB,o as isReadable,y as isValidCSSUnit,v as legacyRandom,l as lighten,c as meetingDerivative,p as mostReadable,n as names,M as numberInputToObject,L as parseIntFromHex,z as random,r as readability,G as rgbToHex,C as rgbToHsl,E as rgbToHsv,B as rgbToRgb,I as rgbaToArgbHex,H as rgbaToHex,s as seed,x as stringInputToObject,m as tinycolor,q as toMsFilter,t as token}from"./theme/index.js";export{g as getTraceId}from"./microservices/index.js";import{g as $,a as _}from"./utils/index.js";export{b as getAntdLocaleKey,c as getRoutes,s as setLocaleKey}from"./utils/index.js";import"lodash-es";export*from"axios";import"mitt";const N="X-G-TRACE-ID",V=e=>s=>{const{url:a="",serviceId:r}=s,o={};Object.keys(e).forEach((s=>{e[s].forEach((e=>{o[e]=s}))})),Object.keys(e).forEach((e=>{}));let t=`${a}.api`;const[,i]=t.split("/");return t=r?`/${r}${t}`:o[i]?`/${o[i]}${t}`:t,delete s.serviceId,s.url=t,s},X=e=>s=>{const a=_();return s.headers={...s.headers,[N]:a,needHtmlEscape:"false",userLanguage:e,...U.userIdentity},s};var Y=async({microServiceMap:e,dynamicLangCallback:s,...a})=>{R.interceptors.request.use(V(e)),await S.findPlantform();const r=$();R.interceptors.request.use(X(r)),await O(r),await(s?.());return await S.init(a)};export{_ as generateUuid,$ as getLocaleKey,S as globalStore,Y as init,O as initDynamicLang,R as requestInstance,X as useRequestHeader,V as useRequestMicroSevices,U as userStore};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/main.ts"],"sourcesContent":["import { requestInstance, InternalAxiosRequestConfig, userStore, globalStore, initDynamicLang } from './core';\nimport type { GlobalOptions } from './core/store/type';\nimport { getLocaleKey } from './core/utils';\nimport { uniqueId, get, isEmpty } from 'lodash-es';\n\nconst TraceIdKey = 'X-G-TRACE-ID';\n\nexport const useRequestMicroSevices = (microServiceMap?: any) => {\n return (config: InternalAxiosRequestConfig) => {\n const { url = '', serviceId } = config;\n const serviceIdMap: any = {};\n Object.keys(microServiceMap).forEach(key => {\n microServiceMap[key as keyof typeof microServiceMap].forEach((module: any) => {\n serviceIdMap[module] = key;\n });\n });\n\n const urlMap: any = {};\n Object.keys(microServiceMap).forEach(key => {\n urlMap[key] = key;\n });\n const suffix = '.api';\n //传入拼接的url\n let newUrl = suffix ? `${url}${suffix}` : url;\n const [, urlPrefix] = newUrl.split('/');\n newUrl = serviceId\n ? `/${serviceId}${newUrl}`\n : serviceIdMap[urlPrefix]\n ? `/${serviceIdMap[urlPrefix]}${newUrl}`\n : newUrl;\n\n delete config.serviceId;\n config.url = newUrl;\n return config;\n };\n};\nexport const useRequestHeader = (userLanguage: string) => (config: InternalAxiosRequestConfig) => {\n const TRACE_ID = uniqueId(TraceIdKey);\n config.headers = {\n ...config.headers,\n [TraceIdKey]: TRACE_ID,\n needHtmlEscape: 'false',\n userLanguage,\n ...userStore.userIdentity,\n } as any;\n return config;\n};\nexport interface MainOptions extends GlobalOptions {\n microServiceMap?: any;\n locale?: string;\n dynamicLangCallback?: () => void;\n}\n\nexport default async ({ microServiceMap, dynamicLangCallback, ...globalOptions }: MainOptions) => {\n requestInstance.interceptors.request.use(useRequestMicroSevices(microServiceMap));\n await globalStore.findPlantform();\n const locale = getLocaleKey();\n requestInstance.interceptors.request.use(useRequestHeader(locale));\n await initDynamicLang(locale);\n await dynamicLangCallback?.();\n const res = await globalStore.init(globalOptions);\n return res;\n};\n"],"names":["TraceIdKey","useRequestMicroSevices","microServiceMap","config","url","serviceId","serviceIdMap","Object","keys","forEach","key","module","newUrl","urlPrefix","split","useRequestHeader","userLanguage","TRACE_ID","uniqueId","headers","needHtmlEscape","userStore","userIdentity","main","async","dynamicLangCallback","globalOptions","requestInstance","interceptors","request","use","globalStore","findPlantform","locale","getLocaleKey","initDynamicLang","init"],"mappings":"06CAKA,MAAMA,EAAa,eAENC,EAA0BC,GAC7BC,IACN,MAAMC,IAAEA,EAAM,GAAEC,UAAEA,GAAcF,EAC1BG,EAAoB,CAAA,EAC1BC,OAAOC,KAAKN,GAAiBO,SAAQC,IACnCR,EAAgBQ,GAAqCD,SAASE,IAC5DL,EAAaK,GAAUD,CAAG,GAC1B,IAIJH,OAAOC,KAAKN,GAAiBO,SAAQC,QAKrC,IAAIE,EAAkB,GAAGR,QACzB,MAAS,CAAAS,GAAaD,EAAOE,MAAM,KASnC,OARAF,EAASP,EACL,IAAIA,IAAYO,IAChBN,EAAaO,GACX,IAAIP,EAAaO,KAAaD,IAC9BA,SAECT,EAAOE,UACdF,EAAOC,IAAMQ,EACNT,CAAM,EAGJY,EAAoBC,GAA0Bb,IACzD,MAAMc,EAAWC,EAASlB,GAQ1B,OAPAG,EAAOgB,QAAU,IACZhB,EAAOgB,QACVnB,CAACA,GAAaiB,EACdG,eAAgB,QAChBJ,kBACGK,EAAUC,cAERnB,CAAM,EAQf,IAAeoB,EAAAC,OAAStB,kBAAiBuB,yBAAwBC,MAC/DC,EAAgBC,aAAaC,QAAQC,IAAI7B,EAAuBC,UAC1D6B,EAAYC,gBAClB,MAAMC,EAASC,IACfP,EAAgBC,aAAaC,QAAQC,IAAIf,EAAiBkB,UACpDE,EAAgBF,SAChBR,OAEN,aADkBM,EAAYK,KAAKV,EACzB"}
1
+ {"version":3,"file":"index.js","sources":["../../src/main.ts"],"sourcesContent":["import { requestInstance, InternalAxiosRequestConfig, userStore, globalStore, initDynamicLang } from './core';\nimport type { GlobalOptions } from './core/store/type';\nimport { getLocaleKey, generateUuid } from './core/utils';\nimport { uniqueId, get, isEmpty } from 'lodash-es';\n\nconst TraceIdKey = 'X-G-TRACE-ID';\n\nexport const useRequestMicroSevices = (microServiceMap?: any) => {\n return (config: InternalAxiosRequestConfig) => {\n const { url = '', serviceId } = config;\n const serviceIdMap: any = {};\n Object.keys(microServiceMap).forEach(key => {\n microServiceMap[key as keyof typeof microServiceMap].forEach((module: any) => {\n serviceIdMap[module] = key;\n });\n });\n\n const urlMap: any = {};\n Object.keys(microServiceMap).forEach(key => {\n urlMap[key] = key;\n });\n const suffix = '.api';\n //传入拼接的url\n let newUrl = suffix ? `${url}${suffix}` : url;\n const [, urlPrefix] = newUrl.split('/');\n newUrl = serviceId\n ? `/${serviceId}${newUrl}`\n : serviceIdMap[urlPrefix]\n ? `/${serviceIdMap[urlPrefix]}${newUrl}`\n : newUrl;\n\n delete config.serviceId;\n config.url = newUrl;\n return config;\n };\n};\nexport const useRequestHeader = (userLanguage: string) => (config: InternalAxiosRequestConfig) => {\n const TRACE_ID = generateUuid();\n config.headers = {\n ...config.headers,\n [TraceIdKey]: TRACE_ID,\n needHtmlEscape: 'false',\n userLanguage,\n ...userStore.userIdentity,\n } as any;\n return config;\n};\nexport interface MainOptions extends GlobalOptions {\n microServiceMap?: any;\n locale?: string;\n dynamicLangCallback?: () => void;\n}\n\nexport default async ({ microServiceMap, dynamicLangCallback, ...globalOptions }: MainOptions) => {\n requestInstance.interceptors.request.use(useRequestMicroSevices(microServiceMap));\n await globalStore.findPlantform();\n const locale = getLocaleKey();\n requestInstance.interceptors.request.use(useRequestHeader(locale));\n await initDynamicLang(locale);\n await dynamicLangCallback?.();\n const res = await globalStore.init(globalOptions);\n return res;\n};\n"],"names":["TraceIdKey","useRequestMicroSevices","microServiceMap","config","url","serviceId","serviceIdMap","Object","keys","forEach","key","module","newUrl","urlPrefix","split","useRequestHeader","userLanguage","TRACE_ID","generateUuid","headers","needHtmlEscape","userStore","userIdentity","main","async","dynamicLangCallback","globalOptions","requestInstance","interceptors","request","use","globalStore","findPlantform","locale","getLocaleKey","initDynamicLang","init"],"mappings":"85CAKA,MAAMA,EAAa,eAENC,EAA0BC,GAC7BC,IACN,MAAMC,IAAEA,EAAM,GAAEC,UAAEA,GAAcF,EAC1BG,EAAoB,CAAA,EAC1BC,OAAOC,KAAKN,GAAiBO,SAAQC,IACnCR,EAAgBQ,GAAqCD,SAASE,IAC5DL,EAAaK,GAAUD,CAAG,GAC1B,IAIJH,OAAOC,KAAKN,GAAiBO,SAAQC,QAKrC,IAAIE,EAAkB,GAAGR,QACzB,MAAS,CAAAS,GAAaD,EAAOE,MAAM,KASnC,OARAF,EAASP,EACL,IAAIA,IAAYO,IAChBN,EAAaO,GACX,IAAIP,EAAaO,KAAaD,IAC9BA,SAECT,EAAOE,UACdF,EAAOC,IAAMQ,EACNT,CAAM,EAGJY,EAAoBC,GAA0Bb,IACzD,MAAMc,EAAWC,IAQjB,OAPAf,EAAOgB,QAAU,IACZhB,EAAOgB,QACVnB,CAACA,GAAaiB,EACdG,eAAgB,QAChBJ,kBACGK,EAAUC,cAERnB,CAAM,EAQf,IAAeoB,EAAAC,OAAStB,kBAAiBuB,yBAAwBC,MAC/DC,EAAgBC,aAAaC,QAAQC,IAAI7B,EAAuBC,UAC1D6B,EAAYC,gBAClB,MAAMC,EAASC,IACfP,EAAgBC,aAAaC,QAAQC,IAAIf,EAAiBkB,UACpDE,EAAgBF,SAChBR,OAEN,aADkBM,EAAYK,KAAKV,EACzB"}
@@ -1,2 +1,2 @@
1
- import{s as t,g as e}from"../store/index.js";import{find as r,get as a,isEmpty as s,groupBy as n,has as o,join as i}from"lodash-es";const l="LOCALE-v1",p=t=>"en"===t?"en-US":t,d=()=>{let s=t.get(l);if(s)return s;const n=r(e?.platformLanguages,{isDefault:!0});return a(n,"locale","zh_CN")},c=e=>(t.set(l,e),location.reload(),e),u=t=>{if(s(t))return[];const e=n(t,"parentId"),{root:r,...a}=e,l=(t,e="/")=>t.map((t=>{const{id:r,path:s,...n}=t,p=0==s.indexOf("/**")?s:((...t)=>{let e=i(t,"/");return e=e.replace(/\/+/g,"/"),e.startsWith("/")||(e="/"+e),e})(e,s);return o(a,r)?{...n,id:r,children:l(a[r],p),path:p}:{...n,path:p,id:r}}));return l(r)};export{p as a,u as b,d as g,c as s};
1
+ import{s as t,g as e}from"../store/index.js";import{find as r,get as a,isEmpty as n,groupBy as o,has as s,join as i}from"lodash-es";const l="LOCALE-v1",c=t=>"en"===t?"en-US":t,d=()=>{let n=t.get(l);if(n)return n;const o=r(e?.platformLanguages,{isDefault:!0});return a(o,"locale","zh_CN")},f=e=>(t.set(l,e),location.reload(),e),p=t=>{if(n(t))return[];const e=o(t,"parentId"),{root:r,...a}=e,l=(t,e="/")=>t.map((t=>{const{id:r,path:n,...o}=t,c=0==n.indexOf("/**")?n:((...t)=>{let e=i(t,"/");return e=e.replace(/\/+/g,"/"),e.startsWith("/")||(e="/"+e),e})(e,n);return s(a,r)?{...o,id:r,children:l(a[r],c),path:c}:{...o,path:c,id:r}}));return l(r)};function h(t=32,e=10){const r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),a=[];let n;const o=e||r.length;if(t)for(n=0;n<t;n++)a[n]=r[0|Math.random()*o];else{let t;for(a[8]=a[13]=a[18]=a[23]="-",a[14]="4",n=0;n<36;n++)a[n]||(t=0|16*Math.random(),a[n]=r[19==n?3&t|8:t])}return a.join("")}export{h as a,c as b,p as c,d as g,f as s};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/core/utils/locale.ts","../../../src/core/utils/route.ts"],"sourcesContent":["import { globalStore, storageStore } from '../store';\nimport { find, get } from 'lodash-es';\n\nconst LOCALE_VERSION = 'LOCALE-v1';\nexport const getAntdLocaleKey = (localeKey: string) => {\n if (localeKey === 'en') return 'en-US';\n return localeKey;\n};\n\nexport const getLocaleKey = () => {\n let key = storageStore.get(LOCALE_VERSION);\n if (!!key) return key;\n const defaultLoacle = find(globalStore?.platformLanguages, {\n isDefault: true,\n });\n return get(defaultLoacle, 'locale', 'zh_CN');\n};\n\nexport const setLocaleKey = (locale: string) => {\n storageStore.set(LOCALE_VERSION, locale);\n location.reload();\n return locale;\n};\n","import { isEmpty, groupBy, has, join } from 'lodash-es';\nconst resolvePath = (...paths) => {\n let resolved = join(paths, '/');\n resolved = resolved.replace(/\\/+/g, '/');\n if (!resolved.startsWith('/')) {\n resolved = '/' + resolved;\n }\n return resolved;\n};\nexport const getRoutes = (routesMaps: any): any[] => {\n if (isEmpty(routesMaps)) return [];\n const groupRotes = groupBy(routesMaps, 'parentId');\n const { root, ...otherRoutes } = groupRotes;\n const mapRoutes = (routes: any[], parentPath = '/'): any[] => {\n return routes.map((itemRoute) => {\n const { id, path, ...restRoute } = itemRoute;\n const itemPath =\n path.indexOf('/**') == 0 ? path : resolvePath(parentPath, path);\n if (has(otherRoutes, id))\n return {\n ...restRoute,\n id,\n children: mapRoutes(otherRoutes[id], itemPath),\n path: itemPath,\n };\n return { ...restRoute, path: itemPath, id };\n });\n };\n return mapRoutes(root);\n};\n"],"names":["LOCALE_VERSION","getAntdLocaleKey","localeKey","getLocaleKey","key","storageStore","get","defaultLoacle","find","globalStore","platformLanguages","isDefault","setLocaleKey","locale","set","location","reload","getRoutes","routesMaps","isEmpty","groupRotes","groupBy","root","otherRoutes","mapRoutes","routes","parentPath","map","itemRoute","id","path","restRoute","itemPath","indexOf","paths","resolved","join","replace","startsWith","resolvePath","has","children"],"mappings":"oIAGA,MAAMA,EAAiB,YACVC,EAAoBC,GACb,OAAdA,EAA2B,QACxBA,EAGIC,EAAe,KAC1B,IAAIC,EAAMC,EAAaC,IAAIN,GAC3B,GAAMI,EAAK,OAAOA,EAClB,MAAMG,EAAgBC,EAAKC,GAAaC,kBAAmB,CACzDC,WAAW,IAEb,OAAOL,EAAIC,EAAe,SAAU,QAAQ,EAGjCK,EAAgBC,IAC3BR,EAAaS,IAAId,EAAgBa,GACjCE,SAASC,SACFH,GCZII,EAAaC,IACxB,GAAIC,EAAQD,GAAa,MAAO,GAChC,MAAME,EAAaC,EAAQH,EAAY,aACjCI,KAAEA,KAASC,GAAgBH,EAC3BI,EAAY,CAACC,EAAeC,EAAa,MACtCD,EAAOE,KAAKC,IACjB,MAAMC,GAAEA,EAAEC,KAAEA,KAASC,GAAcH,EAC7BI,EACmB,GAAvBF,EAAKG,QAAQ,OAAcH,EAhBf,KAAII,KACtB,IAAIC,EAAWC,EAAKF,EAAO,KAK3B,OAJAC,EAAWA,EAASE,QAAQ,OAAQ,KAC/BF,EAASG,WAAW,OACvBH,EAAW,IAAMA,GAEZA,CAAQ,EAUyBI,CAAYb,EAAYI,GAC5D,OAAIU,EAAIjB,EAAaM,GACZ,IACFE,EACHF,KACAY,SAAUjB,EAAUD,EAAYM,GAAKG,GACrCF,KAAME,GAEH,IAAKD,EAAWD,KAAME,EAAUH,KAAI,IAG/C,OAAOL,EAAUF,EAAK"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/core/utils/locale.ts","../../../src/core/utils/route.ts","../../../src/core/utils/generateUuid.ts"],"sourcesContent":["import { globalStore, storageStore } from '../store';\nimport { find, get } from 'lodash-es';\n\nconst LOCALE_VERSION = 'LOCALE-v1';\nexport const getAntdLocaleKey = (localeKey: string) => {\n if (localeKey === 'en') return 'en-US';\n return localeKey;\n};\n\nexport const getLocaleKey = () => {\n let key = storageStore.get(LOCALE_VERSION);\n if (!!key) return key;\n const defaultLoacle = find(globalStore?.platformLanguages, {\n isDefault: true,\n });\n return get(defaultLoacle, 'locale', 'zh_CN');\n};\n\nexport const setLocaleKey = (locale: string) => {\n storageStore.set(LOCALE_VERSION, locale);\n location.reload();\n return locale;\n};\n","import { isEmpty, groupBy, has, join } from 'lodash-es';\nconst resolvePath = (...paths) => {\n let resolved = join(paths, '/');\n resolved = resolved.replace(/\\/+/g, '/');\n if (!resolved.startsWith('/')) {\n resolved = '/' + resolved;\n }\n return resolved;\n};\nexport const getRoutes = (routesMaps: any): any[] => {\n if (isEmpty(routesMaps)) return [];\n const groupRotes = groupBy(routesMaps, 'parentId');\n const { root, ...otherRoutes } = groupRotes;\n const mapRoutes = (routes: any[], parentPath = '/'): any[] => {\n return routes.map((itemRoute) => {\n const { id, path, ...restRoute } = itemRoute;\n const itemPath =\n path.indexOf('/**') == 0 ? path : resolvePath(parentPath, path);\n if (has(otherRoutes, id))\n return {\n ...restRoute,\n id,\n children: mapRoutes(otherRoutes[id], itemPath),\n path: itemPath,\n };\n return { ...restRoute, path: itemPath, id };\n });\n };\n return mapRoutes(root);\n};\n","function generateUuid(len: number = 32, _radix: number = 10): string {\n const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');\n const uuid: string[] = [];\n let i;\n const radix = _radix || chars.length;\n if (len) {\n // Compact form\n for (i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)];\n } else {\n // rfc4122, version 4 form\n let r;\n // rfc4122 requires these characters\n uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';\n uuid[14] = '4';\n // Fill in random data. At i==19 set the high bits of clock sequence as\n // per rfc4122, sec. 4.1.5\n for (i = 0; i < 36; i++) {\n if (!uuid[i]) {\n r = 0 | (Math.random() * 16);\n uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r];\n }\n }\n }\n return uuid.join('');\n}\n\nexport default generateUuid;\n"],"names":["LOCALE_VERSION","getAntdLocaleKey","localeKey","getLocaleKey","key","storageStore","get","defaultLoacle","find","globalStore","platformLanguages","isDefault","setLocaleKey","locale","set","location","reload","getRoutes","routesMaps","isEmpty","groupRotes","groupBy","root","otherRoutes","mapRoutes","routes","parentPath","map","itemRoute","id","path","restRoute","itemPath","indexOf","paths","resolved","join","replace","startsWith","resolvePath","has","children","generateUuid","len","_radix","chars","split","uuid","i","radix","length","Math","random","r"],"mappings":"oIAGA,MAAMA,EAAiB,YACVC,EAAoBC,GACb,OAAdA,EAA2B,QACxBA,EAGIC,EAAe,KAC1B,IAAIC,EAAMC,EAAaC,IAAIN,GAC3B,GAAMI,EAAK,OAAOA,EAClB,MAAMG,EAAgBC,EAAKC,GAAaC,kBAAmB,CACzDC,WAAW,IAEb,OAAOL,EAAIC,EAAe,SAAU,QAAQ,EAGjCK,EAAgBC,IAC3BR,EAAaS,IAAId,EAAgBa,GACjCE,SAASC,SACFH,GCZII,EAAaC,IACxB,GAAIC,EAAQD,GAAa,MAAO,GAChC,MAAME,EAAaC,EAAQH,EAAY,aACjCI,KAAEA,KAASC,GAAgBH,EAC3BI,EAAY,CAACC,EAAeC,EAAa,MACtCD,EAAOE,KAAKC,IACjB,MAAMC,GAAEA,EAAEC,KAAEA,KAASC,GAAcH,EAC7BI,EACmB,GAAvBF,EAAKG,QAAQ,OAAcH,EAhBf,KAAII,KACtB,IAAIC,EAAWC,EAAKF,EAAO,KAK3B,OAJAC,EAAWA,EAASE,QAAQ,OAAQ,KAC/BF,EAASG,WAAW,OACvBH,EAAW,IAAMA,GAEZA,CAAQ,EAUyBI,CAAYb,EAAYI,GAC5D,OAAIU,EAAIjB,EAAaM,GACZ,IACFE,EACHF,KACAY,SAAUjB,EAAUD,EAAYM,GAAKG,GACrCF,KAAME,GAEH,IAAKD,EAAWD,KAAME,EAAUH,KAAI,IAG/C,OAAOL,EAAUF,EAAK,EC5BxB,SAASoB,EAAaC,EAAc,GAAIC,EAAiB,IACvD,MAAMC,EAAQ,iEAAiEC,MAAM,IAC/EC,EAAiB,GACvB,IAAIC,EACJ,MAAMC,EAAQL,GAAUC,EAAMK,OAC9B,GAAIP,EAEF,IAAKK,EAAI,EAAGA,EAAIL,EAAKK,IAAKD,EAAKC,GAAKH,EAAM,EAAKM,KAAKC,SAAWH,OAC1D,CAEL,IAAII,EAMJ,IAJAN,EAAK,GAAKA,EAAK,IAAMA,EAAK,IAAMA,EAAK,IAAM,IAC3CA,EAAK,IAAM,IAGNC,EAAI,EAAGA,EAAI,GAAIA,IACbD,EAAKC,KACRK,EAAI,EAAqB,GAAhBF,KAAKC,SACdL,EAAKC,GAAKH,EAAW,IAALG,EAAe,EAAJK,EAAW,EAAMA,GAGjD,CACD,OAAON,EAAKX,KAAK,GACnB"}
@@ -2310,6 +2310,8 @@ declare const setLocaleKey: (locale: string) => string;
2310
2310
 
2311
2311
  declare const getRoutes: (routesMaps: any) => any[];
2312
2312
 
2313
+ declare function generateUuid(len?: number, _radix?: number): string;
2314
+
2313
2315
  declare const useRequestMicroSevices: (microServiceMap?: any) => (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig;
2314
2316
  declare const useRequestHeader: (userLanguage: string) => (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig;
2315
2317
  interface MainOptions extends GlobalOptions {
@@ -2319,4 +2321,4 @@ interface MainOptions extends GlobalOptions {
2319
2321
  }
2320
2322
  declare const _default: ({ microServiceMap, dynamicLangCallback, ...globalOptions }: MainOptions) => Promise<boolean>;
2321
2323
 
2322
- export { type AliasToken, type BASE_CONFIG_TYPE, type CONFIG_TYPE, type ColorMapToken, type ColorNeutralMapToken, type ColorPalettes, type CommonMapToken, type DerivativeFunc, type FontMapToken, type GantAxiosRequestConfig, type GantServerOptions, type GlobalOptions, type GlobalToken, type HeightMapToken, type InternalAxiosRequestConfig, type LOGIN_CONFIG, type Language, type LegacyColorPalettes, type LoginResultData, type MAIN_CONFIG_TYPE, MENU_BREADCRUMBS_UPDATE, MENU_HISTORY_UPDATE, type MainOptions, type MapToken, type MappingAlgorithm, type Perferences, type PresetColorKey, type PresetColorType, PresetColors, type ProductInfo, type SSOConfigType, type SYSMGMT_CONFIG_TYPE, type SeedToken, type ServerMenu, type ServerMenuData, type ServerMenuMap, type SizeMapToken, type StyleMapToken, type THEME_TYPE, type ThemeType, type TokenType, type User, type UserAggregateInfo, type GantUserConfig as UserConfig, type UserIdentityType, codeListStore, derivative$1 as compactAlgorithm, _default$1 as companydataStore, derivative$2 as darkAlgorithm, derivative$3 as defaultAlgorithm, expireCache, formatToken as formatAliasToken, getAliasToken, getAlphaColor, getAntdLocaleKey, getBackgroundColor, getDarkenSolidColor, getLightenSolidColor, getLocaleKey, getRoutes, getTokenCssVar, getTraceId, globalStore, _default as init, initDynamicLang, lighten, loginStore, derivative as meetingDerivative, menuStore, parameterStore, request, requestInstance, seedToken as seed, setLocaleKey, storage as storageStore, token, tr, useRequestHeader, useRequestMicroSevices, userStore };
2324
+ export { type AliasToken, type BASE_CONFIG_TYPE, type CONFIG_TYPE, type ColorMapToken, type ColorNeutralMapToken, type ColorPalettes, type CommonMapToken, type DerivativeFunc, type FontMapToken, type GantAxiosRequestConfig, type GantServerOptions, type GlobalOptions, type GlobalToken, type HeightMapToken, type InternalAxiosRequestConfig, type LOGIN_CONFIG, type Language, type LegacyColorPalettes, type LoginResultData, type MAIN_CONFIG_TYPE, MENU_BREADCRUMBS_UPDATE, MENU_HISTORY_UPDATE, type MainOptions, type MapToken, type MappingAlgorithm, type Perferences, type PresetColorKey, type PresetColorType, PresetColors, type ProductInfo, type SSOConfigType, type SYSMGMT_CONFIG_TYPE, type SeedToken, type ServerMenu, type ServerMenuData, type ServerMenuMap, type SizeMapToken, type StyleMapToken, type THEME_TYPE, type ThemeType, type TokenType, type User, type UserAggregateInfo, type GantUserConfig as UserConfig, type UserIdentityType, codeListStore, derivative$1 as compactAlgorithm, _default$1 as companydataStore, derivative$2 as darkAlgorithm, derivative$3 as defaultAlgorithm, expireCache, formatToken as formatAliasToken, generateUuid, getAliasToken, getAlphaColor, getAntdLocaleKey, getBackgroundColor, getDarkenSolidColor, getLightenSolidColor, getLocaleKey, getRoutes, getTokenCssVar, getTraceId, globalStore, _default as init, initDynamicLang, lighten, loginStore, derivative as meetingDerivative, menuStore, parameterStore, request, requestInstance, seedToken as seed, setLocaleKey, storage as storageStore, token, tr, useRequestHeader, useRequestMicroSevices, userStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gant-core",
3
- "version": "0.2.34",
3
+ "version": "0.2.35",
4
4
  "description": "",
5
5
  "main": "lib/core/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  "scripts": {
11
11
  "build": "cross-env NODE_ENV=production rollup --config rollup.config.js",
12
12
  "dev": "cross-env NODE_ENV=development rollup --config rollup.config.js --watch",
13
- "tag-publish": "NPM_TOKEN=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 npm publish"
13
+ "tag-publish": "npm publish"
14
14
  },
15
15
  "author": "vvey",
16
16
  "license": "ISC",