@vef-framework/shared 1.0.129 → 1.0.131

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/cjs/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- "use strict";var b=require("./color.cjs"),t=require("./constants.cjs"),m=require("./context.cjs"),g=require("./dom.cjs"),p=require("./error.cjs"),d=require("./event.cjs"),a=require("./expression.cjs"),y=require("./function.cjs"),i=require("./icons.cjs"),P=require("./id.cjs"),j=require("./json.cjs"),r=require("./message.cjs"),h=require("./module.cjs"),o=require("./path.cjs"),l=require("./pinyin.cjs"),f=require("./security.cjs"),u=require("./store.cjs"),c=require("./styles.cjs"),s=require("./temporal.cjs"),O=require("./theme-variables.cjs");require("./types.cjs");var n=require("./utils.cjs"),S=require("./validation.cjs"),I=require("./yaml.cjs"),w=require("./zod.cjs"),e=require("radashi"),v=require("react-fast-compare"),q=require("zustand/shallow"),F=require("zod");exports.isValidColor=b.isValidColor,exports.auditFormScene=t.auditFormScene,exports.colorTypes=t.colorTypes,exports.creationFormScene=t.creationFormScene,exports.defaultColorTypes=t.defaultColorTypes,exports.presetFormScenes=t.presetFormScenes,exports.semanticColorTypes=t.semanticColorTypes,exports.updateFormScene=t.updateFormScene,exports.createSelectableContext=m.createSelectableContext,exports.getElementHeight=g.getElementHeight,exports.VefError=p.VefError,exports.createEventEmitter=d.createEventEmitter,exports.compileDynamicFn=a.compileDynamicFn,exports.isExpression=a.isExpression,exports.isFunctionOrExpression=a.isFunctionOrExpression,exports.mergeFns=y.mergeFns,exports.IconAlertCircle=i.IconAlertCircle,exports.IconAlertTriangle=i.IconAlertTriangle,exports.IconCheck=i.IconCheck,exports.IconInfoCircle=i.IconInfoCircle,exports.IconTick=i.IconTick,exports.IconTickCircle=i.IconTickCircle,exports.generateId=P.generateId,exports.isJsonSchemaValid=j.isJsonSchemaValid,exports.checkIcon=r.checkIcon,exports.defaultMessageTitle=r.defaultMessageTitle,exports.errorIcon=r.errorIcon,exports.infoIcon=r.infoIcon,exports.showConfirmation=r.showConfirmation,exports.showErrorAlert=r.showErrorAlert,exports.showErrorMessage=r.showErrorMessage,exports.showErrorNotification=r.showErrorNotification,exports.showInfoAlert=r.showInfoAlert,exports.showInfoMessage=r.showInfoMessage,exports.showInfoNotification=r.showInfoNotification,exports.showLoadingMessage=r.showLoadingMessage,exports.showSuccessAlert=r.showSuccessAlert,exports.showSuccessMessage=r.showSuccessMessage,exports.showSuccessNotification=r.showSuccessNotification,exports.showWarningAlert=r.showWarningAlert,exports.showWarningMessage=r.showWarningMessage,exports.showWarningNotification=r.showWarningNotification,exports.successIcon=r.successIcon,exports.warningIcon=r.warningIcon,exports.unwrapModule=h.unwrapModule,exports.extractBaseName=o.extractBaseName,exports.extractDirName=o.extractDirName,exports.extractExtName=o.extractExtName,exports.isAbsolutePath=o.isAbsolutePath,exports.joinPaths=o.joinPaths,exports.normalizePath=o.normalizePath,exports.parsePinyin=l.parsePinyin,exports.parsePinyinFirstLetter=l.parsePinyinFirstLetter,exports.decryptRsa=f.decryptRsa,exports.encryptRsa=f.encryptRsa,exports.createComponentStore=u.createComponentStore,exports.createStore=u.createStore,exports.createUnboundStore=u.createUnboundStore,exports.useUnboundStore=u.useUnboundStore,exports.bmq=c.bmq,exports.breakpoints=c.breakpoints,exports.styles=c.styles,exports.getNowDate=s.getNowDate,exports.getNowDateString=s.getNowDateString,exports.getTodayString=s.getTodayString,exports.themeVariables=O.themeVariables,exports.buildRouteParentMenusMappings=n.buildRouteParentMenusMappings,exports.constantCase=n.constantCase,exports.difference=n.difference,exports.getStringLength=n.getStringLength,exports.invokeMaybeAsyncFn=n.invokeMaybeAsyncFn,exports.isAsyncFunction=n.isAsyncFunction,exports.isInternalFunction=n.isInternalFunction,exports.validator=S,exports.loadYaml=I.loadYaml,exports.initZod=w.initZod,Object.defineProperty(exports,"assign",{enumerable:!0,get:function(){return e.assign}}),Object.defineProperty(exports,"camelCase",{enumerable:!0,get:function(){return e.camel}}),Object.defineProperty(exports,"capitalize",{enumerable:!0,get:function(){return e.capitalize}}),Object.defineProperty(exports,"clone",{enumerable:!0,get:function(){return e.clone}}),Object.defineProperty(exports,"cloneDeep",{enumerable:!0,get:function(){return e.cloneDeep}}),Object.defineProperty(exports,"cluster",{enumerable:!0,get:function(){return e.cluster}}),Object.defineProperty(exports,"dashCase",{enumerable:!0,get:function(){return e.dash}}),Object.defineProperty(exports,"debounce",{enumerable:!0,get:function(){return e.debounce}}),Object.defineProperty(exports,"get",{enumerable:!0,get:function(){return e.get}}),Object.defineProperty(exports,"isArray",{enumerable:!0,get:function(){return e.isArray}}),Object.defineProperty(exports,"isBoolean",{enumerable:!0,get:function(){return e.isBoolean}}),Object.defineProperty(exports,"isDate",{enumerable:!0,get:function(){return e.isDate}}),Object.defineProperty(exports,"isEmpty",{enumerable:!0,get:function(){return e.isEmpty}}),Object.defineProperty(exports,"isError",{enumerable:!0,get:function(){return e.isError}}),Object.defineProperty(exports,"isFloat",{enumerable:!0,get:function(){return e.isFloat}}),Object.defineProperty(exports,"isFunction",{enumerable:!0,get:function(){return e.isFunction}}),Object.defineProperty(exports,"isInt",{enumerable:!0,get:function(){return e.isInt}}),Object.defineProperty(exports,"isIntString",{enumerable:!0,get:function(){return e.isIntString}}),Object.defineProperty(exports,"isMap",{enumerable:!0,get:function(){return e.isMap}}),Object.defineProperty(exports,"isNullish",{enumerable:!0,get:function(){return e.isNullish}}),Object.defineProperty(exports,"isNumber",{enumerable:!0,get:function(){return e.isNumber}}),Object.defineProperty(exports,"isObject",{enumerable:!0,get:function(){return e.isObject}}),Object.defineProperty(exports,"isPlainObject",{enumerable:!0,get:function(){return e.isPlainObject}}),Object.defineProperty(exports,"isPrimitive",{enumerable:!0,get:function(){return e.isPrimitive}}),Object.defineProperty(exports,"isPromise",{enumerable:!0,get:function(){return e.isPromise}}),Object.defineProperty(exports,"isRegExp",{enumerable:!0,get:function(){return e.isRegExp}}),Object.defineProperty(exports,"isSet",{enumerable:!0,get:function(){return e.isSet}}),Object.defineProperty(exports,"isString",{enumerable:!0,get:function(){return e.isString}}),Object.defineProperty(exports,"isSymbol",{enumerable:!0,get:function(){return e.isSymbol}}),Object.defineProperty(exports,"isUndefined",{enumerable:!0,get:function(){return e.isUndefined}}),Object.defineProperty(exports,"isWeakMap",{enumerable:!0,get:function(){return e.isWeakMap}}),Object.defineProperty(exports,"isWeakSet",{enumerable:!0,get:function(){return e.isWeakSet}}),Object.defineProperty(exports,"max",{enumerable:!0,get:function(){return e.max}}),Object.defineProperty(exports,"memoize",{enumerable:!0,get:function(){return e.memo}}),Object.defineProperty(exports,"min",{enumerable:!0,get:function(){return e.min}}),Object.defineProperty(exports,"noop",{enumerable:!0,get:function(){return e.noop}}),Object.defineProperty(exports,"omit",{enumerable:!0,get:function(){return e.omit}}),Object.defineProperty(exports,"once",{enumerable:!0,get:function(){return e.once}}),Object.defineProperty(exports,"pascalCase",{enumerable:!0,get:function(){return e.pascal}}),Object.defineProperty(exports,"pick",{enumerable:!0,get:function(){return e.pick}}),Object.defineProperty(exports,"set",{enumerable:!0,get:function(){return e.set}}),Object.defineProperty(exports,"similarity",{enumerable:!0,get:function(){return e.similarity}}),Object.defineProperty(exports,"snakeCase",{enumerable:!0,get:function(){return e.snake}}),Object.defineProperty(exports,"sum",{enumerable:!0,get:function(){return e.sum}}),Object.defineProperty(exports,"template",{enumerable:!0,get:function(){return e.template}}),Object.defineProperty(exports,"throttle",{enumerable:!0,get:function(){return e.throttle}}),Object.defineProperty(exports,"toFloat",{enumerable:!0,get:function(){return e.toFloat}}),Object.defineProperty(exports,"toInt",{enumerable:!0,get:function(){return e.toInt}}),Object.defineProperty(exports,"trim",{enumerable:!0,get:function(){return e.trim}}),Object.defineProperty(exports,"unique",{enumerable:!0,get:function(){return e.unique}}),exports.isDeepEqual=v,Object.defineProperty(exports,"isShallowEqual",{enumerable:!0,get:function(){return q.shallow}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return F.z}});
2
+ "use strict";var l=require("./color.cjs"),r=require("./constants.cjs"),b=require("./context.cjs"),m=require("./dom.cjs"),f=require("./error.cjs"),p=require("./event.cjs"),u=require("./expression.cjs"),d=require("./function.cjs"),y=require("./id.cjs"),g=require("./json.cjs"),P=require("./module.cjs"),n=require("./path.cjs"),c=require("./pinyin.cjs"),s=require("./security.cjs"),i=require("./store.cjs"),o=require("./styles.cjs"),a=require("./temporal.cjs"),j=require("./theme-variables.cjs");require("./types.cjs");var t=require("./utils.cjs"),O=require("./validation.cjs"),S=require("./yaml.cjs"),v=require("./zod.cjs"),e=require("radashi"),q=require("react-fast-compare"),F=require("zustand/shallow"),h=require("zod");exports.isValidColor=l.isValidColor,exports.auditFormScene=r.auditFormScene,exports.colorTypes=r.colorTypes,exports.creationFormScene=r.creationFormScene,exports.defaultColorTypes=r.defaultColorTypes,exports.presetFormScenes=r.presetFormScenes,exports.semanticColorTypes=r.semanticColorTypes,exports.updateFormScene=r.updateFormScene,exports.createSelectableContext=b.createSelectableContext,exports.getElementHeight=m.getElementHeight,exports.VefError=f.VefError,exports.createEventEmitter=p.createEventEmitter,exports.compileDynamicFn=u.compileDynamicFn,exports.isExpression=u.isExpression,exports.isFunctionOrExpression=u.isFunctionOrExpression,exports.mergeFns=d.mergeFns,exports.generateId=y.generateId,exports.isJsonSchemaValid=g.isJsonSchemaValid,exports.unwrapModule=P.unwrapModule,exports.extractBaseName=n.extractBaseName,exports.extractDirName=n.extractDirName,exports.extractExtName=n.extractExtName,exports.isAbsolutePath=n.isAbsolutePath,exports.joinPaths=n.joinPaths,exports.normalizePath=n.normalizePath,exports.parsePinyin=c.parsePinyin,exports.parsePinyinFirstLetter=c.parsePinyinFirstLetter,exports.decryptRsa=s.decryptRsa,exports.encryptRsa=s.encryptRsa,exports.createComponentStore=i.createComponentStore,exports.createStore=i.createStore,exports.createUnboundStore=i.createUnboundStore,exports.useUnboundStore=i.useUnboundStore,exports.bmq=o.bmq,exports.breakpoints=o.breakpoints,exports.styles=o.styles,exports.getNowDate=a.getNowDate,exports.getNowDateString=a.getNowDateString,exports.getTodayString=a.getTodayString,exports.themeVariables=j.themeVariables,exports.buildRouteParentMenusMappings=t.buildRouteParentMenusMappings,exports.constantCase=t.constantCase,exports.difference=t.difference,exports.getStringLength=t.getStringLength,exports.invokeMaybeAsyncFn=t.invokeMaybeAsyncFn,exports.isAsyncFunction=t.isAsyncFunction,exports.isInternalFunction=t.isInternalFunction,exports.validator=O,exports.loadYaml=S.loadYaml,exports.initZod=v.initZod,Object.defineProperty(exports,"assign",{enumerable:!0,get:function(){return e.assign}}),Object.defineProperty(exports,"camelCase",{enumerable:!0,get:function(){return e.camel}}),Object.defineProperty(exports,"capitalize",{enumerable:!0,get:function(){return e.capitalize}}),Object.defineProperty(exports,"clone",{enumerable:!0,get:function(){return e.clone}}),Object.defineProperty(exports,"cloneDeep",{enumerable:!0,get:function(){return e.cloneDeep}}),Object.defineProperty(exports,"cluster",{enumerable:!0,get:function(){return e.cluster}}),Object.defineProperty(exports,"dashCase",{enumerable:!0,get:function(){return e.dash}}),Object.defineProperty(exports,"debounce",{enumerable:!0,get:function(){return e.debounce}}),Object.defineProperty(exports,"get",{enumerable:!0,get:function(){return e.get}}),Object.defineProperty(exports,"isArray",{enumerable:!0,get:function(){return e.isArray}}),Object.defineProperty(exports,"isBoolean",{enumerable:!0,get:function(){return e.isBoolean}}),Object.defineProperty(exports,"isDate",{enumerable:!0,get:function(){return e.isDate}}),Object.defineProperty(exports,"isEmpty",{enumerable:!0,get:function(){return e.isEmpty}}),Object.defineProperty(exports,"isError",{enumerable:!0,get:function(){return e.isError}}),Object.defineProperty(exports,"isFloat",{enumerable:!0,get:function(){return e.isFloat}}),Object.defineProperty(exports,"isFunction",{enumerable:!0,get:function(){return e.isFunction}}),Object.defineProperty(exports,"isInt",{enumerable:!0,get:function(){return e.isInt}}),Object.defineProperty(exports,"isIntString",{enumerable:!0,get:function(){return e.isIntString}}),Object.defineProperty(exports,"isMap",{enumerable:!0,get:function(){return e.isMap}}),Object.defineProperty(exports,"isNullish",{enumerable:!0,get:function(){return e.isNullish}}),Object.defineProperty(exports,"isNumber",{enumerable:!0,get:function(){return e.isNumber}}),Object.defineProperty(exports,"isObject",{enumerable:!0,get:function(){return e.isObject}}),Object.defineProperty(exports,"isPlainObject",{enumerable:!0,get:function(){return e.isPlainObject}}),Object.defineProperty(exports,"isPrimitive",{enumerable:!0,get:function(){return e.isPrimitive}}),Object.defineProperty(exports,"isPromise",{enumerable:!0,get:function(){return e.isPromise}}),Object.defineProperty(exports,"isRegExp",{enumerable:!0,get:function(){return e.isRegExp}}),Object.defineProperty(exports,"isSet",{enumerable:!0,get:function(){return e.isSet}}),Object.defineProperty(exports,"isString",{enumerable:!0,get:function(){return e.isString}}),Object.defineProperty(exports,"isSymbol",{enumerable:!0,get:function(){return e.isSymbol}}),Object.defineProperty(exports,"isUndefined",{enumerable:!0,get:function(){return e.isUndefined}}),Object.defineProperty(exports,"isWeakMap",{enumerable:!0,get:function(){return e.isWeakMap}}),Object.defineProperty(exports,"isWeakSet",{enumerable:!0,get:function(){return e.isWeakSet}}),Object.defineProperty(exports,"max",{enumerable:!0,get:function(){return e.max}}),Object.defineProperty(exports,"memoize",{enumerable:!0,get:function(){return e.memo}}),Object.defineProperty(exports,"min",{enumerable:!0,get:function(){return e.min}}),Object.defineProperty(exports,"noop",{enumerable:!0,get:function(){return e.noop}}),Object.defineProperty(exports,"omit",{enumerable:!0,get:function(){return e.omit}}),Object.defineProperty(exports,"once",{enumerable:!0,get:function(){return e.once}}),Object.defineProperty(exports,"pascalCase",{enumerable:!0,get:function(){return e.pascal}}),Object.defineProperty(exports,"pick",{enumerable:!0,get:function(){return e.pick}}),Object.defineProperty(exports,"set",{enumerable:!0,get:function(){return e.set}}),Object.defineProperty(exports,"similarity",{enumerable:!0,get:function(){return e.similarity}}),Object.defineProperty(exports,"snakeCase",{enumerable:!0,get:function(){return e.snake}}),Object.defineProperty(exports,"sum",{enumerable:!0,get:function(){return e.sum}}),Object.defineProperty(exports,"template",{enumerable:!0,get:function(){return e.template}}),Object.defineProperty(exports,"throttle",{enumerable:!0,get:function(){return e.throttle}}),Object.defineProperty(exports,"toFloat",{enumerable:!0,get:function(){return e.toFloat}}),Object.defineProperty(exports,"toInt",{enumerable:!0,get:function(){return e.toInt}}),Object.defineProperty(exports,"trim",{enumerable:!0,get:function(){return e.trim}}),Object.defineProperty(exports,"unique",{enumerable:!0,get:function(){return e.unique}}),exports.isDeepEqual=q,Object.defineProperty(exports,"isShallowEqual",{enumerable:!0,get:function(){return F.shallow}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return h.z}});
package/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- import{isValidColor as s}from"./color.js";import{auditFormScene as a,colorTypes as n,creationFormScene as c,defaultColorTypes as m,presetFormScenes as l,semanticColorTypes as p,updateFormScene as f}from"./constants.js";import{createSelectableContext as u}from"./context.js";import{getElementHeight as h}from"./dom.js";import{VefError as S}from"./error.js";import{createEventEmitter as I}from"./event.js";import{compileDynamicFn as C,isExpression as E,isFunctionOrExpression as b}from"./expression.js";import{mergeFns as M}from"./function.js";import{IconAlertCircle as N,IconAlertTriangle as A,IconCheck as P,IconInfoCircle as T,IconTick as D,IconTickCircle as v}from"./icons.js";import{generateId as q}from"./id.js";import{isJsonSchemaValid as R}from"./json.js";import{checkIcon as j,defaultMessageTitle as L,errorIcon as O,infoIcon as U,showConfirmation as B,showErrorAlert as H,showErrorMessage as J,showErrorNotification as Y,showInfoAlert as Z,showInfoMessage as G,showInfoNotification as K,showLoadingMessage as Q,showSuccessAlert as X,showSuccessMessage as _,showSuccessNotification as $,showWarningAlert as ee,showWarningMessage as oe,showWarningNotification as re,successIcon as te,warningIcon as se}from"./message.js";import{unwrapModule as ae}from"./module.js";import{extractBaseName as ce,extractDirName as me,extractExtName as le,isAbsolutePath as pe,joinPaths as fe,normalizePath as xe}from"./path.js";import{parsePinyin as ge,parsePinyinFirstLetter as he}from"./pinyin.js";import{decryptRsa as Se,encryptRsa as we}from"./security.js";import{createComponentStore as ye,createStore as Ce,createUnboundStore as Ee,useUnboundStore as be}from"./store.js";import{bmq as Me,breakpoints as ke,styles as Ne}from"./styles.js";import{getNowDate as Pe,getNowDateString as Te,getTodayString as De}from"./temporal.js";import{themeVariables as We}from"./theme-variables.js";import"./types.js";import{buildRouteParentMenusMappings as ze,constantCase as Re,difference as Ve,getStringLength as je,invokeMaybeAsyncFn as Le,isAsyncFunction as Oe,isInternalFunction as Ue}from"./utils.js";import*as e from"./validation.js";import{loadYaml as He}from"./yaml.js";import{initZod as Ye}from"./zod.js";import{assign as Ge,camel as Ke,capitalize as Qe,clone as Xe,cloneDeep as _e,cluster as $e,dash as eo,debounce as oo,get as ro,isArray as to,isBoolean as so,isDate as io,isEmpty as ao,isError as no,isFloat as co,isFunction as mo,isInt as lo,isIntString as po,isMap as fo,isNullish as xo,isNumber as uo,isObject as go,isPlainObject as ho,isPrimitive as So,isPromise as wo,isRegExp as Io,isSet as yo,isString as Co,isSymbol as Eo,isUndefined as bo,isWeakMap as Fo,isWeakSet as Mo,max as ko,memo as No,min as Ao,noop as Po,omit as To,once as Do,pascal as vo,pick as Wo,set as qo,similarity as zo,snake as Ro,sum as Vo,template as jo,throttle as Lo,toFloat as Oo,toInt as Uo,trim as Bo,unique as Ho}from"radashi";import{default as Yo}from"react-fast-compare";import{shallow as Go}from"zustand/shallow";import{z as Qo}from"zod";export{N as IconAlertCircle,A as IconAlertTriangle,P as IconCheck,T as IconInfoCircle,D as IconTick,v as IconTickCircle,S as VefError,Ge as assign,a as auditFormScene,Me as bmq,ke as breakpoints,ze as buildRouteParentMenusMappings,Ke as camelCase,Qe as capitalize,j as checkIcon,Xe as clone,_e as cloneDeep,$e as cluster,n as colorTypes,C as compileDynamicFn,Re as constantCase,ye as createComponentStore,I as createEventEmitter,u as createSelectableContext,Ce as createStore,Ee as createUnboundStore,c as creationFormScene,eo as dashCase,oo as debounce,Se as decryptRsa,m as defaultColorTypes,L as defaultMessageTitle,Ve as difference,we as encryptRsa,O as errorIcon,ce as extractBaseName,me as extractDirName,le as extractExtName,q as generateId,ro as get,h as getElementHeight,Pe as getNowDate,Te as getNowDateString,je as getStringLength,De as getTodayString,U as infoIcon,Ye as initZod,Le as invokeMaybeAsyncFn,pe as isAbsolutePath,to as isArray,Oe as isAsyncFunction,so as isBoolean,io as isDate,Yo as isDeepEqual,ao as isEmpty,no as isError,E as isExpression,co as isFloat,mo as isFunction,b as isFunctionOrExpression,lo as isInt,po as isIntString,Ue as isInternalFunction,R as isJsonSchemaValid,fo as isMap,xo as isNullish,uo as isNumber,go as isObject,ho as isPlainObject,So as isPrimitive,wo as isPromise,Io as isRegExp,yo as isSet,Go as isShallowEqual,Co as isString,Eo as isSymbol,bo as isUndefined,s as isValidColor,Fo as isWeakMap,Mo as isWeakSet,fe as joinPaths,He as loadYaml,ko as max,No as memoize,M as mergeFns,Ao as min,Po as noop,xe as normalizePath,To as omit,Do as once,ge as parsePinyin,he as parsePinyinFirstLetter,vo as pascalCase,Wo as pick,l as presetFormScenes,p as semanticColorTypes,qo as set,B as showConfirmation,H as showErrorAlert,J as showErrorMessage,Y as showErrorNotification,Z as showInfoAlert,G as showInfoMessage,K as showInfoNotification,Q as showLoadingMessage,X as showSuccessAlert,_ as showSuccessMessage,$ as showSuccessNotification,ee as showWarningAlert,oe as showWarningMessage,re as showWarningNotification,zo as similarity,Ro as snakeCase,Ne as styles,te as successIcon,Vo as sum,jo as template,We as themeVariables,Lo as throttle,Oo as toFloat,Uo as toInt,Bo as trim,Ho as unique,ae as unwrapModule,f as updateFormScene,be as useUnboundStore,e as validator,se as warningIcon,Qo as z};
2
+ import{isValidColor as a}from"./color.js";import{auditFormScene as s,colorTypes as n,creationFormScene as m,defaultColorTypes as p,presetFormScenes as l,semanticColorTypes as c,updateFormScene as x}from"./constants.js";import{createSelectableContext as u}from"./context.js";import{getElementHeight as S}from"./dom.js";import{VefError as y}from"./error.js";import{createEventEmitter as F}from"./event.js";import{compileDynamicFn as E,isExpression as C,isFunctionOrExpression as P}from"./expression.js";import{mergeFns as D}from"./function.js";import{generateId as M}from"./id.js";import{isJsonSchemaValid as w}from"./json.js";import{unwrapModule as q}from"./module.js";import{extractBaseName as A,extractDirName as R,extractExtName as T,isAbsolutePath as V,joinPaths as j,normalizePath as O}from"./path.js";import{parsePinyin as B,parsePinyinFirstLetter as L}from"./pinyin.js";import{decryptRsa as H,encryptRsa as J}from"./security.js";import{createComponentStore as Z,createStore as G,createUnboundStore as K,useUnboundStore as Q}from"./store.js";import{bmq as _,breakpoints as $,styles as ee}from"./styles.js";import{getNowDate as oe,getNowDateString as re,getTodayString as ae}from"./temporal.js";import{themeVariables as se}from"./theme-variables.js";import"./types.js";import{buildRouteParentMenusMappings as me,constantCase as pe,difference as le,getStringLength as ce,invokeMaybeAsyncFn as xe,isAsyncFunction as fe,isInternalFunction as ue}from"./utils.js";import*as e from"./validation.js";import{loadYaml as Se}from"./yaml.js";import{initZod as ye}from"./zod.js";import{assign as Fe,camel as he,capitalize as Ee,clone as Ce,cloneDeep as Pe,cluster as ke,dash as De,debounce as Ne,get as Me,isArray as ve,isBoolean as we,isDate as Ie,isEmpty as qe,isError as ze,isFloat as Ae,isFunction as Re,isInt as Te,isIntString as Ve,isMap as je,isNullish as Oe,isNumber as Ue,isObject as Be,isPlainObject as Le,isPrimitive as We,isPromise as He,isRegExp as Je,isSet as Ye,isString as Ze,isSymbol as Ge,isUndefined as Ke,isWeakMap as Qe,isWeakSet as Xe,max as _e,memo as $e,min as et,noop as tt,omit as ot,once as rt,pascal as at,pick as it,set as st,similarity as nt,snake as mt,sum as pt,template as lt,throttle as ct,toFloat as xt,toInt as ft,trim as ut,unique as dt}from"radashi";import{default as gt}from"react-fast-compare";import{shallow as bt}from"zustand/shallow";import{z as ht}from"zod";export{y as VefError,Fe as assign,s as auditFormScene,_ as bmq,$ as breakpoints,me as buildRouteParentMenusMappings,he as camelCase,Ee as capitalize,Ce as clone,Pe as cloneDeep,ke as cluster,n as colorTypes,E as compileDynamicFn,pe as constantCase,Z as createComponentStore,F as createEventEmitter,u as createSelectableContext,G as createStore,K as createUnboundStore,m as creationFormScene,De as dashCase,Ne as debounce,H as decryptRsa,p as defaultColorTypes,le as difference,J as encryptRsa,A as extractBaseName,R as extractDirName,T as extractExtName,M as generateId,Me as get,S as getElementHeight,oe as getNowDate,re as getNowDateString,ce as getStringLength,ae as getTodayString,ye as initZod,xe as invokeMaybeAsyncFn,V as isAbsolutePath,ve as isArray,fe as isAsyncFunction,we as isBoolean,Ie as isDate,gt as isDeepEqual,qe as isEmpty,ze as isError,C as isExpression,Ae as isFloat,Re as isFunction,P as isFunctionOrExpression,Te as isInt,Ve as isIntString,ue as isInternalFunction,w as isJsonSchemaValid,je as isMap,Oe as isNullish,Ue as isNumber,Be as isObject,Le as isPlainObject,We as isPrimitive,He as isPromise,Je as isRegExp,Ye as isSet,bt as isShallowEqual,Ze as isString,Ge as isSymbol,Ke as isUndefined,a as isValidColor,Qe as isWeakMap,Xe as isWeakSet,j as joinPaths,Se as loadYaml,_e as max,$e as memoize,D as mergeFns,et as min,tt as noop,O as normalizePath,ot as omit,rt as once,B as parsePinyin,L as parsePinyinFirstLetter,at as pascalCase,it as pick,l as presetFormScenes,c as semanticColorTypes,st as set,nt as similarity,mt as snakeCase,ee as styles,pt as sum,lt as template,se as themeVariables,ct as throttle,xt as toFloat,ft as toInt,ut as trim,dt as unique,q as unwrapModule,x as updateFormScene,Q as useUnboundStore,e as validator,ht as z};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vef-framework/shared",
3
3
  "type": "module",
4
- "version": "1.0.129",
4
+ "version": "1.0.131",
5
5
  "private": false,
6
6
  "description": "Shared fundamental to the VEF framework",
7
7
  "author": "Venus",
package/types/index.d.ts CHANGED
@@ -6,10 +6,8 @@ export * from "./error";
6
6
  export * from "./event";
7
7
  export * from "./expression";
8
8
  export * from "./function";
9
- export * from "./icons";
10
9
  export * from "./id";
11
10
  export * from "./json";
12
- export * from "./message";
13
11
  export * from "./module";
14
12
  export * from "./path";
15
13
  export * from "./pinyin";
package/cjs/icons.cjs DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- "use strict";var e=require("@emotion/react/jsx-runtime");function n(l){return e.jsx("svg",{"aria-hidden":!0,fill:"none",focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e.jsx("path",{clipRule:"evenodd",d:"M21.35 4.27c.68.47.86 1.4.38 2.08l-10 14.5a1.5 1.5 0 0 1-2.33.17l-6.5-7a1.5 1.5 0 0 1 2.2-2.04l5.23 5.63 8.94-12.96a1.5 1.5 0 0 1 2.08-.38Z",fill:"currentColor",fillRule:"evenodd"})})}function o(l){return e.jsx("svg",{"aria-hidden":!0,fill:"none",focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e.jsx("path",{clipRule:"evenodd",d:"M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm5.88-13.18-6.2 7.6a1.5 1.5 0 0 1-2.37 0l-3.5-4a1.5 1.5 0 1 1 2.37-1.84l2.3 2.46L15.5 8a1.5 1.5 0 1 1 2.38 1.82Z",fill:"currentColor",fillRule:"evenodd"})})}function i(l){return e.jsx("svg",{"aria-hidden":!0,fill:"none",focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e.jsx("path",{clipRule:"evenodd",d:"M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm2-16a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm-5 3.75c0-.41.34-.75.75-.75h2.75a1 1 0 0 1 1 1v5.5h.75a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5h.75v-5h-.75a.75.75 0 0 1-.75-.75Z",fill:"currentColor",fillRule:"evenodd"})})}function r(l){return e.jsx("svg",{"aria-hidden":!0,fill:"none",focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e.jsx("path",{clipRule:"evenodd",d:"M23 12a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-9.5 5.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0ZM12 5a1.9 1.9 0 0 0-1.89 2l.3 5.5a1.59 1.59 0 0 0 3.17 0l.3-5.5c.07-1.09-.8-2-1.88-2Z",fill:"currentColor",fillRule:"evenodd"})})}function c(l){return e.jsx("svg",{"aria-hidden":!0,fill:"none",focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e.jsx("path",{clipRule:"evenodd",d:"m10.23 2.4-8.7 16.67A2 2 0 0 0 3.3 22h17.4a2 2 0 0 0 1.77-2.93L13.77 2.4a2 2 0 0 0-3.54 0ZM13.14 14a1.15 1.15 0 0 1-2.28 0l-.58-4.03a1.73 1.73 0 1 1 3.44 0l-.58 4.03Zm.36 4.49a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",fill:"currentColor",fillRule:"evenodd"})})}function a(l){return e.jsx("svg",{"aria-hidden":!0,focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e.jsx("path",{d:"M20 6L9 17l-5-5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})}exports.IconAlertCircle=r,exports.IconAlertTriangle=c,exports.IconCheck=a,exports.IconInfoCircle=i,exports.IconTick=n,exports.IconTickCircle=o;
package/cjs/message.cjs DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- "use strict";var f=require("@ant-design/icons"),u=require("antd"),l=require("react"),g=require("./icons.cjs");require("./utils.cjs");var s=require("radashi");const{confirm:M,info:T,success:y,warning:b,error:S}=u.Modal,N=l.createElement(f,{component:g.IconCheck}),I=l.createElement(f,{component:g.IconTickCircle}),E=l.createElement(f,{component:g.IconInfoCircle}),v=l.createElement(f,{component:g.IconAlertTriangle}),A=l.createElement(f,{component:g.IconAlertCircle}),W=l.createElement(f,{className:"vef-notification-notice-icon vef-notification-notice-icon-success",component:g.IconTickCircle}),x=l.createElement(f,{className:"vef-notification-notice-icon vef-notification-notice-icon-info",component:g.IconInfoCircle}),O=l.createElement(f,{className:"vef-notification-notice-icon vef-notification-notice-icon-warning",component:g.IconAlertTriangle}),B=l.createElement(f,{className:"vef-notification-notice-icon vef-notification-notice-icon-error",component:g.IconAlertCircle});function L(n){u.message.open({type:"success",content:n,duration:2,icon:I})}function P(n){u.message.open({type:"info",content:n,duration:3,icon:E})}function R(n){u.message.open({type:"warning",content:n,duration:3,icon:v})}function H(n){u.message.open({type:"error",content:n,duration:4,icon:A})}function U(n){const o=u.message.open({type:"loading",content:n,duration:0});return()=>o()}const w="提示";function j(n,o,i){const t=arguments.length;if(t<1)throw new Error("showSuccessNotification requires at least one argument");const e=t>1?n:w,r=t>1?o:n,c=t===3?i:void 0;u.notification.open({type:"success",message:e,description:r,duration:4,closable:!0,btn:c,icon:W})}function z(n,o,i){const t=arguments.length;if(t<1)throw new Error("showInfoNotification requires at least one argument");const e=t>1?n:w,r=t>1?o:n,c=t===3?i:void 0;u.notification.open({type:"info",message:e,description:r,duration:5,closable:!0,btn:c,icon:x})}function D(n,o,i){const t=arguments.length;if(t<1)throw new Error("showWarningNotification requires at least one argument");const e=t>1?n:w,r=t>1?o:n,c=t===3?i:void 0;u.notification.open({type:"warning",message:e,description:r,duration:6,closable:!0,btn:c,icon:O})}function G(n,o,i){const t=arguments.length;if(t<1)throw new Error("showErrorNotification requires at least one argument");const e=t>1?n:w,r=t>1?o:n,c=t===3?i:void 0;u.notification.open({type:"error",message:e,description:r,duration:10,closable:!0,btn:c,icon:B})}const J={color:"default",variant:"text"},K={icon:N};function Q(n,o,i,t){const e=arguments.length;if(e<2)throw new Error("showConfirmation requires at least two arguments");const r=e>2?n:"提示",c=e===2?n:o,a=e===2?o:i,{okText:h,cancelText:d,onCancel:p,onAfterOpen:C,onAfterClose:F}=t??{},{destroy:q}=M({title:r,content:c,cancelButtonProps:J,okButtonProps:K,centered:!0,onOk:a,okText:h,cancelText:d,onCancel:p,afterOpenChange:s.isFunction(C)||s.isFunction(F)?k=>{k?C?.():F?.()}:void 0});return q}const V={success:y,info:T,warning:b,error:S},X={success:I,info:E,warning:v,error:A},Y="👍🏻 好的,知道了";function m(n,o,i=w,t,e){const{okText:r=Y,onCancel:c,onAfterOpen:a,onAfterClose:h}=e??{},{destroy:d}=V[n]({title:i,content:o,icon:X[n],centered:!0,onOk:t,okText:r,onCancel:c,afterOpenChange:s.isFunction(a)||s.isFunction(h)?p=>{p?a?.():h?.()}:void 0});return d}function Z(n,o,i,t){const e=arguments.length;if(e<1)throw new Error("showSuccessAlert requires at least one argument");const r=e===1||s.isFunction(o)?void 0:n,c=e===1||s.isFunction(o)?n:o,a=e===2||s.isFunction(o)?o:i;return m("success",c,r,a,t)}function _(n,o,i,t){const e=arguments.length;if(e<1)throw new Error("showInfoAlert requires at least one argument");const r=e===1||s.isFunction(o)?void 0:n,c=e===1||s.isFunction(o)?n:o,a=e===2||s.isFunction(o)?o:i;return m("info",c,r,a,t)}function $(n,o,i,t){const e=arguments.length;if(e<1)throw new Error("showWarningAlert requires at least one argument");const r=e===1||s.isFunction(o)?void 0:n,c=e===1||s.isFunction(o)?n:o,a=e===2||s.isFunction(o)?o:i;return m("warning",c,r,a,t)}function nn(n,o,i,t){const e=arguments.length;if(e<1)throw new Error("showErrorAlert requires at least one argument");const r=e===1||s.isFunction(o)?void 0:n,c=e===1||s.isFunction(o)?n:o,a=e===2||s.isFunction(o)?o:i;return m("error",c,r,a,t)}exports.checkIcon=N,exports.defaultMessageTitle=w,exports.errorIcon=A,exports.infoIcon=E,exports.showConfirmation=Q,exports.showErrorAlert=nn,exports.showErrorMessage=H,exports.showErrorNotification=G,exports.showInfoAlert=_,exports.showInfoMessage=P,exports.showInfoNotification=z,exports.showLoadingMessage=U,exports.showSuccessAlert=Z,exports.showSuccessMessage=L,exports.showSuccessNotification=j,exports.showWarningAlert=$,exports.showWarningMessage=R,exports.showWarningNotification=D,exports.successIcon=I,exports.warningIcon=v;
package/esm/icons.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- import{jsx as e}from"@emotion/react/jsx-runtime";function n(l){return e("svg",{"aria-hidden":!0,fill:"none",focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e("path",{clipRule:"evenodd",d:"M21.35 4.27c.68.47.86 1.4.38 2.08l-10 14.5a1.5 1.5 0 0 1-2.33.17l-6.5-7a1.5 1.5 0 0 1 2.2-2.04l5.23 5.63 8.94-12.96a1.5 1.5 0 0 1 2.08-.38Z",fill:"currentColor",fillRule:"evenodd"})})}function o(l){return e("svg",{"aria-hidden":!0,fill:"none",focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e("path",{clipRule:"evenodd",d:"M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm5.88-13.18-6.2 7.6a1.5 1.5 0 0 1-2.37 0l-3.5-4a1.5 1.5 0 1 1 2.37-1.84l2.3 2.46L15.5 8a1.5 1.5 0 1 1 2.38 1.82Z",fill:"currentColor",fillRule:"evenodd"})})}function r(l){return e("svg",{"aria-hidden":!0,fill:"none",focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e("path",{clipRule:"evenodd",d:"M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm2-16a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm-5 3.75c0-.41.34-.75.75-.75h2.75a1 1 0 0 1 1 1v5.5h.75a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5h.75v-5h-.75a.75.75 0 0 1-.75-.75Z",fill:"currentColor",fillRule:"evenodd"})})}function i(l){return e("svg",{"aria-hidden":!0,fill:"none",focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e("path",{clipRule:"evenodd",d:"M23 12a11 11 0 1 1-22 0 11 11 0 0 1 22 0Zm-9.5 5.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0ZM12 5a1.9 1.9 0 0 0-1.89 2l.3 5.5a1.59 1.59 0 0 0 3.17 0l.3-5.5c.07-1.09-.8-2-1.88-2Z",fill:"currentColor",fillRule:"evenodd"})})}function a(l){return e("svg",{"aria-hidden":!0,fill:"none",focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e("path",{clipRule:"evenodd",d:"m10.23 2.4-8.7 16.67A2 2 0 0 0 3.3 22h17.4a2 2 0 0 0 1.77-2.93L13.77 2.4a2 2 0 0 0-3.54 0ZM13.14 14a1.15 1.15 0 0 1-2.28 0l-.58-4.03a1.73 1.73 0 1 1 3.44 0l-.58 4.03Zm.36 4.49a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z",fill:"currentColor",fillRule:"evenodd"})})}function d(l){return e("svg",{"aria-hidden":!0,focusable:!1,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...l,children:e("path",{d:"M20 6L9 17l-5-5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})}export{i as IconAlertCircle,a as IconAlertTriangle,d as IconCheck,r as IconInfoCircle,n as IconTick,o as IconTickCircle};
package/esm/message.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- import f from"@ant-design/icons";import{Modal as O,message as g,notification as w}from"antd";import{createElement as u}from"react";import{IconCheck as S,IconTickCircle as k,IconInfoCircle as y,IconAlertTriangle as q,IconAlertCircle as T}from"./icons.js";import"./utils.js";import{isFunction as s}from"radashi";const{confirm:W,info:B,success:F,warning:L,error:P}=O,b=u(f,{component:S}),v=u(f,{component:k}),I=u(f,{component:y}),E=u(f,{component:q}),C=u(f,{component:T}),R=u(f,{className:"vef-notification-notice-icon vef-notification-notice-icon-success",component:k}),H=u(f,{className:"vef-notification-notice-icon vef-notification-notice-icon-info",component:y}),U=u(f,{className:"vef-notification-notice-icon vef-notification-notice-icon-warning",component:q}),j=u(f,{className:"vef-notification-notice-icon vef-notification-notice-icon-error",component:T});function z(n){g.open({type:"success",content:n,duration:2,icon:v})}function D(n){g.open({type:"info",content:n,duration:3,icon:I})}function G(n){g.open({type:"warning",content:n,duration:3,icon:E})}function J(n){g.open({type:"error",content:n,duration:4,icon:C})}function K(n){const o=g.open({type:"loading",content:n,duration:0});return()=>o()}const l="提示";function Q(n,o,r){const e=arguments.length;if(e<1)throw new Error("showSuccessNotification requires at least one argument");const t=e>1?n:l,i=e>1?o:n,c=e===3?r:void 0;w.open({type:"success",message:t,description:i,duration:4,closable:!0,btn:c,icon:R})}function V(n,o,r){const e=arguments.length;if(e<1)throw new Error("showInfoNotification requires at least one argument");const t=e>1?n:l,i=e>1?o:n,c=e===3?r:void 0;w.open({type:"info",message:t,description:i,duration:5,closable:!0,btn:c,icon:H})}function X(n,o,r){const e=arguments.length;if(e<1)throw new Error("showWarningNotification requires at least one argument");const t=e>1?n:l,i=e>1?o:n,c=e===3?r:void 0;w.open({type:"warning",message:t,description:i,duration:6,closable:!0,btn:c,icon:U})}function Y(n,o,r){const e=arguments.length;if(e<1)throw new Error("showErrorNotification requires at least one argument");const t=e>1?n:l,i=e>1?o:n,c=e===3?r:void 0;w.open({type:"error",message:t,description:i,duration:10,closable:!0,btn:c,icon:j})}const Z={color:"default",variant:"text"},_={icon:b};function $(n,o,r,e){const t=arguments.length;if(t<2)throw new Error("showConfirmation requires at least two arguments");const i=t>2?n:"提示",c=t===2?n:o,a=t===2?o:r,{okText:m,cancelText:p,onCancel:d,onAfterOpen:A,onAfterClose:N}=e??{},{destroy:x}=W({title:i,content:c,cancelButtonProps:Z,okButtonProps:_,centered:!0,onOk:a,okText:m,cancelText:p,onCancel:d,afterOpenChange:s(A)||s(N)?M=>{M?A?.():N?.()}:void 0});return x}const nn={success:F,info:B,warning:L,error:P},on={success:v,info:I,warning:E,error:C},tn="👍🏻 好的,知道了";function h(n,o,r=l,e,t){const{okText:i=tn,onCancel:c,onAfterOpen:a,onAfterClose:m}=t??{},{destroy:p}=nn[n]({title:r,content:o,icon:on[n],centered:!0,onOk:e,okText:i,onCancel:c,afterOpenChange:s(a)||s(m)?d=>{d?a?.():m?.()}:void 0});return p}function en(n,o,r,e){const t=arguments.length;if(t<1)throw new Error("showSuccessAlert requires at least one argument");const i=t===1||s(o)?void 0:n,c=t===1||s(o)?n:o,a=t===2||s(o)?o:r;return h("success",c,i,a,e)}function rn(n,o,r,e){const t=arguments.length;if(t<1)throw new Error("showInfoAlert requires at least one argument");const i=t===1||s(o)?void 0:n,c=t===1||s(o)?n:o,a=t===2||s(o)?o:r;return h("info",c,i,a,e)}function cn(n,o,r,e){const t=arguments.length;if(t<1)throw new Error("showWarningAlert requires at least one argument");const i=t===1||s(o)?void 0:n,c=t===1||s(o)?n:o,a=t===2||s(o)?o:r;return h("warning",c,i,a,e)}function sn(n,o,r,e){const t=arguments.length;if(t<1)throw new Error("showErrorAlert requires at least one argument");const i=t===1||s(o)?void 0:n,c=t===1||s(o)?n:o,a=t===2||s(o)?o:r;return h("error",c,i,a,e)}export{b as checkIcon,l as defaultMessageTitle,C as errorIcon,I as infoIcon,$ as showConfirmation,sn as showErrorAlert,J as showErrorMessage,Y as showErrorNotification,rn as showInfoAlert,D as showInfoMessage,V as showInfoNotification,K as showLoadingMessage,en as showSuccessAlert,z as showSuccessMessage,Q as showSuccessNotification,cn as showWarningAlert,G as showWarningMessage,X as showWarningNotification,v as successIcon,E as warningIcon};
package/types/icons.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { SVGProps } from "react";
2
- export declare function IconTick(props: React.SVGProps<SVGSVGElement>): import("@emotion/react/jsx-runtime").JSX.Element;
3
- export declare function IconTickCircle(props: React.SVGProps<SVGSVGElement>): import("@emotion/react/jsx-runtime").JSX.Element;
4
- export declare function IconInfoCircle(props: React.SVGProps<SVGSVGElement>): import("@emotion/react/jsx-runtime").JSX.Element;
5
- export declare function IconAlertCircle(props: React.SVGProps<SVGSVGElement>): import("@emotion/react/jsx-runtime").JSX.Element;
6
- export declare function IconAlertTriangle(props: React.SVGProps<SVGSVGElement>): import("@emotion/react/jsx-runtime").JSX.Element;
7
- export declare function IconCheck(props: SVGProps<SVGSVGElement>): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,372 +0,0 @@
1
- import type { ReactNode } from "react";
2
- import type { Except, Handler, MaybePromise, Provider } from "./types";
3
- export declare const checkIcon: import("react").FunctionComponentElement<Omit<import("@ant-design/icons/lib/components/Icon").IconComponentProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
4
- export declare const successIcon: import("react").FunctionComponentElement<Omit<import("@ant-design/icons/lib/components/Icon").IconComponentProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
5
- export declare const infoIcon: import("react").FunctionComponentElement<Omit<import("@ant-design/icons/lib/components/Icon").IconComponentProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
6
- export declare const warningIcon: import("react").FunctionComponentElement<Omit<import("@ant-design/icons/lib/components/Icon").IconComponentProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
7
- export declare const errorIcon: import("react").FunctionComponentElement<Omit<import("@ant-design/icons/lib/components/Icon").IconComponentProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
8
- /**
9
- * Shows a success message.
10
- *
11
- * @param content - The content of the message.
12
- */
13
- export declare function showSuccessMessage(content: ReactNode): void;
14
- /**
15
- * Shows an info message.
16
- *
17
- * @param content - The content of the message.
18
- */
19
- export declare function showInfoMessage(content: ReactNode): void;
20
- /**
21
- * Shows a warning message.
22
- *
23
- * @param content - The content of the message.
24
- */
25
- export declare function showWarningMessage(content: ReactNode): void;
26
- /**
27
- * Shows an error message.
28
- *
29
- * @param content - The content of the message.
30
- */
31
- export declare function showErrorMessage(content: ReactNode): void;
32
- /**
33
- * Shows a loading message.
34
- *
35
- * @param content - The content of the message.
36
- * @returns A handler function to close the message.
37
- */
38
- export declare function showLoadingMessage(content: ReactNode): () => void;
39
- /**
40
- * The default title of the notification, alert and confirmation.
41
- */
42
- export declare const defaultMessageTitle = "\u63D0\u793A";
43
- /**
44
- * Shows a success notification.
45
- *
46
- * @param content - The content of the notification.
47
- */
48
- export declare function showSuccessNotification(content: ReactNode): void;
49
- /**
50
- * Shows a success notification.
51
- *
52
- * @param title - The title of the notification.
53
- * @param content - The content of the notification.
54
- */
55
- export declare function showSuccessNotification(title: ReactNode, content: ReactNode): void;
56
- /**
57
- * Shows a success notification.
58
- *
59
- * @param title - The title of the notification.
60
- * @param content - The content of the notification.
61
- * @param buttons - The buttons of the notification.
62
- */
63
- export declare function showSuccessNotification(title: ReactNode, content: ReactNode, buttons: ReactNode): void;
64
- /**
65
- * Shows an info notification.
66
- *
67
- * @param content - The content of the notification.
68
- */
69
- export declare function showInfoNotification(content: ReactNode): void;
70
- /**
71
- * Shows an info notification.
72
- *
73
- * @param title - The title of the notification.
74
- * @param content - The content of the notification.
75
- */
76
- export declare function showInfoNotification(title: ReactNode, content: ReactNode): void;
77
- /**
78
- * Shows an info notification.
79
- *
80
- * @param title - The title of the notification.
81
- * @param content - The content of the notification.
82
- * @param buttons - The buttons of the notification.
83
- */
84
- export declare function showInfoNotification(title: ReactNode, content: ReactNode, buttons: ReactNode): void;
85
- /**
86
- * Shows a warning notification.
87
- *
88
- * @param content - The content of the notification.
89
- */
90
- export declare function showWarningNotification(content: ReactNode): void;
91
- /**
92
- * Shows a warning notification.
93
- *
94
- * @param title - The title of the notification.
95
- * @param content - The content of the notification.
96
- */
97
- export declare function showWarningNotification(title: ReactNode, content: ReactNode): void;
98
- /**
99
- * Shows a warning notification.
100
- *
101
- * @param title - The title of the notification.
102
- * @param content - The content of the notification.
103
- * @param buttons - The buttons of the notification.
104
- */
105
- export declare function showWarningNotification(title: ReactNode, content: ReactNode, buttons: ReactNode): void;
106
- /**
107
- * Shows an error notification.
108
- *
109
- * @param content - The content of the notification.
110
- */
111
- export declare function showErrorNotification(content: ReactNode): void;
112
- /**
113
- * Shows an error notification.
114
- *
115
- * @param title - The title of the notification.
116
- * @param content - The content of the notification.
117
- */
118
- export declare function showErrorNotification(title: ReactNode, content: ReactNode): void;
119
- /**
120
- * Shows an error notification.
121
- *
122
- * @param title - The title of the notification.
123
- * @param content - The content of the notification.
124
- * @param buttons - The buttons of the notification.
125
- */
126
- export declare function showErrorNotification(title: ReactNode, content: ReactNode, buttons: ReactNode): void;
127
- /**
128
- * The options for the confirmation dialog.
129
- */
130
- export interface ConfirmationOptions {
131
- /**
132
- * The text of the OK button.
133
- */
134
- okText?: string;
135
- /**
136
- * The text of the cancel button.
137
- */
138
- cancelText?: string;
139
- /**
140
- * The callback function when the cancel button is clicked.
141
- */
142
- onCancel?: Handler;
143
- /**
144
- * The callback function after the confirmation dialog is opened.
145
- */
146
- onAfterOpen?: Handler;
147
- /**
148
- * The callback function after the confirmation dialog is closed.
149
- */
150
- onAfterClose?: Handler;
151
- }
152
- /**
153
- * Shows a confirmation dialog.
154
- *
155
- * @param content - The content of the confirmation.
156
- * @param onOk - The callback function when the OK button is clicked.
157
- * @returns A handler function to close the confirmation dialog.
158
- */
159
- export declare function showConfirmation(content: ReactNode, onOk: Provider<MaybePromise<void>>): Handler;
160
- /**
161
- * Shows a confirmation dialog.
162
- *
163
- * @param title - The title of the confirmation.
164
- * @param content - The content of the confirmation.
165
- * @param onOk - The callback function when the OK button is clicked.
166
- * @returns A handler function to close the confirmation dialog.
167
- */
168
- export declare function showConfirmation(title: ReactNode, content: ReactNode, onOk: Provider<MaybePromise<void>>): Handler;
169
- /**
170
- * Shows a confirmation dialog.
171
- *
172
- * @param title - The title of the confirmation.
173
- * @param content - The content of the confirmation.
174
- * @param onOk - The callback function when the OK button is clicked.
175
- * @param options - The options of the confirmation.
176
- * @param options.okText - The text of the OK button.
177
- * @param options.cancelText - The text of the cancel button.
178
- * @param options.onCancel - The callback function when the cancel button is clicked.
179
- * @param options.onAfterOpen - The callback function after the confirmation dialog is opened.
180
- * @param options.onAfterClose - The callback function after the confirmation dialog is closed.
181
- * @returns A handler function to close the confirmation dialog.
182
- */
183
- export declare function showConfirmation(title: ReactNode, content: ReactNode, onOk: Provider<MaybePromise<void>>, options: ConfirmationOptions): Handler;
184
- /**
185
- * The options for the success alert.
186
- */
187
- export interface AlertOptions extends Except<ConfirmationOptions, "cancelText"> {
188
- }
189
- /**
190
- * Shows a success alert.
191
- *
192
- * @param content - The content of the alert.
193
- * @returns A handler function to close the alert.
194
- */
195
- export declare function showSuccessAlert(content: ReactNode): Handler;
196
- /**
197
- * Shows a success alert.
198
- *
199
- * @param content - The content of the alert.
200
- * @param onOk - The callback function when the OK button is clicked.
201
- * @returns A handler function to close the alert.
202
- */
203
- export declare function showSuccessAlert(content: ReactNode, onOk: Provider<MaybePromise<void>>): Handler;
204
- /**
205
- * Shows a success alert.
206
- *
207
- * @param title - The title of the alert.
208
- * @param content - The content of the alert.
209
- * @returns A handler function to close the alert.
210
- */
211
- export declare function showSuccessAlert(title: ReactNode, content: ReactNode): Handler;
212
- /**
213
- * Shows a success alert.
214
- *
215
- * @param title - The title of the alert.
216
- * @param content - The content of the alert.
217
- * @param onOk - The callback function when the OK button is clicked.
218
- * @returns A handler function to close the alert.
219
- */
220
- export declare function showSuccessAlert(title: ReactNode, content: ReactNode, onOk: Provider<MaybePromise<void>>): Handler;
221
- /**
222
- * Shows a success alert.
223
- *
224
- * @param title - The title of the alert.
225
- * @param content - The content of the alert.
226
- * @param onOk - The callback function when the OK button is clicked.
227
- * @param options - The options of the alert.
228
- * @param options.okText - The text of the OK button.
229
- * @param options.onCancel - The callback function when the cancel button is clicked.
230
- * @param options.onAfterOpen - The callback function after the alert is opened.
231
- * @param options.onAfterClose - The callback function after the alert is closed.
232
- * @returns A handler function to close the alert.
233
- */
234
- export declare function showSuccessAlert(title: ReactNode, content: ReactNode, onOk: Provider<MaybePromise<void>>, options: AlertOptions): Handler;
235
- /**
236
- * Shows an info alert.
237
- *
238
- * @param content - The content of the alert.
239
- * @returns A handler function to close the alert.
240
- */
241
- export declare function showInfoAlert(content: ReactNode): Handler;
242
- /**
243
- * Shows an info alert.
244
- *
245
- * @param content - The content of the alert.
246
- * @param onOk - The callback function when the OK button is clicked.
247
- * @returns A handler function to close the alert.
248
- */
249
- export declare function showInfoAlert(content: ReactNode, onOk: Provider<MaybePromise<void>>): Handler;
250
- /**
251
- * Shows an info alert.
252
- *
253
- * @param title - The title of the alert.
254
- * @param content - The content of the alert.
255
- * @returns A handler function to close the alert.
256
- */
257
- export declare function showInfoAlert(title: ReactNode, content: ReactNode): Handler;
258
- /**
259
- * Shows an info alert.
260
- *
261
- * @param title - The title of the alert.
262
- * @param content - The content of the alert.
263
- * @param onOk - The callback function when the OK button is clicked.
264
- * @returns A handler function to close the alert.
265
- */
266
- export declare function showInfoAlert(title: ReactNode, content: ReactNode, onOk: Provider<MaybePromise<void>>): Handler;
267
- /**
268
- * Shows an info alert.
269
- *
270
- * @param title - The title of the alert.
271
- * @param content - The content of the alert.
272
- * @param onOk - The callback function when the OK button is clicked.
273
- * @param options - The options of the alert.
274
- * @param options.okText - The text of the OK button.
275
- * @param options.onCancel - The callback function when the cancel button is clicked.
276
- * @param options.onAfterOpen - The callback function after the alert is opened.
277
- * @param options.onAfterClose - The callback function after the alert is closed.
278
- * @returns A handler function to close the alert.
279
- */
280
- export declare function showInfoAlert(title: ReactNode, content: ReactNode, onOk: Provider<MaybePromise<void>>, options: AlertOptions): Handler;
281
- /**
282
- * Shows a warning alert.
283
- *
284
- * @param content - The content of the alert.
285
- * @returns A handler function to close the alert.
286
- */
287
- export declare function showWarningAlert(content: ReactNode): Handler;
288
- /**
289
- * Shows a warning alert.
290
- *
291
- * @param content - The content of the alert.
292
- * @param onOk - The callback function when the OK button is clicked.
293
- * @returns A handler function to close the alert.
294
- */
295
- export declare function showWarningAlert(content: ReactNode, onOk: Provider<MaybePromise<void>>): Handler;
296
- /**
297
- * Shows a warning alert.
298
- *
299
- * @param title - The title of the alert.
300
- * @param content - The content of the alert.
301
- * @returns A handler function to close the alert.
302
- */
303
- export declare function showWarningAlert(title: ReactNode, content: ReactNode): Handler;
304
- /**
305
- * Shows a warning alert.
306
- *
307
- * @param title - The title of the alert.
308
- * @param content - The content of the alert.
309
- * @param onOk - The callback function when the OK button is clicked.
310
- * @returns A handler function to close the alert.
311
- */
312
- export declare function showWarningAlert(title: ReactNode, content: ReactNode, onOk: Provider<MaybePromise<void>>): Handler;
313
- /**
314
- * Shows a warning alert.
315
- *
316
- * @param title - The title of the alert.
317
- * @param content - The content of the alert.
318
- * @param onOk - The callback function when the OK button is clicked.
319
- * @param options - The options of the alert.
320
- * @param options.okText - The text of the OK button.
321
- * @param options.onCancel - The callback function when the cancel button is clicked.
322
- * @param options.onAfterOpen - The callback function after the alert is opened.
323
- * @param options.onAfterClose - The callback function after the alert is closed.
324
- * @returns A handler function to close the alert.
325
- */
326
- export declare function showWarningAlert(title: ReactNode, content: ReactNode, onOk: Provider<MaybePromise<void>>, options: AlertOptions): Handler;
327
- /**
328
- * Shows an error alert.
329
- *
330
- * @param content - The content of the alert.
331
- * @returns A handler function to close the alert.
332
- */
333
- export declare function showErrorAlert(content: ReactNode): Handler;
334
- /**
335
- * Shows an error alert.
336
- *
337
- * @param content - The content of the alert.
338
- * @param onOk - The callback function when the OK button is clicked.
339
- * @returns A handler function to close the alert.
340
- */
341
- export declare function showErrorAlert(content: ReactNode, onOk: Provider<MaybePromise<void>>): Handler;
342
- /**
343
- * Shows an error alert.
344
- *
345
- * @param title - The title of the alert.
346
- * @param content - The content of the alert.
347
- * @returns A handler function to close the alert.
348
- */
349
- export declare function showErrorAlert(title: ReactNode, content: ReactNode): Handler;
350
- /**
351
- * Shows an error alert.
352
- *
353
- * @param title - The title of the alert.
354
- * @param content - The content of the alert.
355
- * @param onOk - The callback function when the OK button is clicked.
356
- * @returns A handler function to close the alert.
357
- */
358
- export declare function showErrorAlert(title: ReactNode, content: ReactNode, onOk: Provider<MaybePromise<void>>): Handler;
359
- /**
360
- * Shows an error alert.
361
- *
362
- * @param title - The title of the alert.
363
- * @param content - The content of the alert.
364
- * @param onOk - The callback function when the OK button is clicked.
365
- * @param options - The options of the alert.
366
- * @param options.okText - The text of the OK button.
367
- * @param options.onCancel - The callback function when the cancel button is clicked.
368
- * @param options.onAfterOpen - The callback function after the alert is opened.
369
- * @param options.onAfterClose - The callback function after the alert is closed.
370
- * @returns A handler function to close the alert.
371
- */
372
- export declare function showErrorAlert(title: ReactNode, content: ReactNode, onOk: Provider<MaybePromise<void>>, options: AlertOptions): Handler;