@vef-framework/shared 1.0.128 β†’ 1.0.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/cjs/color.cjs +1 -10
  2. package/cjs/constants.cjs +1 -38
  3. package/cjs/context.cjs +1 -35
  4. package/cjs/dom.cjs +1 -22
  5. package/cjs/error.cjs +1 -29
  6. package/cjs/event.cjs +1 -10
  7. package/cjs/expression.cjs +1 -26
  8. package/cjs/function.cjs +1 -15
  9. package/cjs/icons.cjs +1 -135
  10. package/cjs/id.cjs +1 -13
  11. package/cjs/index.cjs +1 -319
  12. package/cjs/json.cjs +1 -17
  13. package/cjs/message.cjs +1 -302
  14. package/cjs/module.cjs +1 -13
  15. package/cjs/path.cjs +1 -39
  16. package/cjs/pinyin.cjs +1 -32
  17. package/cjs/security.cjs +1 -26
  18. package/cjs/store.cjs +1 -103
  19. package/cjs/styles.cjs +1 -54
  20. package/cjs/temporal.cjs +1 -26
  21. package/cjs/theme-variables.cjs +1 -353
  22. package/cjs/types.cjs +0 -2
  23. package/cjs/utils.cjs +1 -322
  24. package/cjs/validation.cjs +1 -188
  25. package/cjs/yaml.cjs +1 -10
  26. package/cjs/zod.cjs +1 -26
  27. package/esm/color.js +1 -8
  28. package/esm/constants.js +1 -30
  29. package/esm/context.js +1 -33
  30. package/esm/dom.js +1 -20
  31. package/esm/error.js +1 -27
  32. package/esm/event.js +1 -8
  33. package/esm/expression.js +1 -22
  34. package/esm/function.js +1 -13
  35. package/esm/icons.js +1 -128
  36. package/esm/id.js +1 -11
  37. package/esm/index.js +1 -32
  38. package/esm/json.js +1 -15
  39. package/esm/message.js +1 -281
  40. package/esm/module.js +1 -11
  41. package/esm/path.js +1 -32
  42. package/esm/pinyin.js +1 -29
  43. package/esm/security.js +1 -23
  44. package/esm/store.js +1 -98
  45. package/esm/styles.js +1 -50
  46. package/esm/temporal.js +1 -22
  47. package/esm/theme-variables.js +1 -351
  48. package/esm/utils.js +1 -110
  49. package/esm/validation.js +1 -150
  50. package/esm/yaml.js +1 -8
  51. package/esm/zod.js +1 -21
  52. package/package.json +1 -1
package/cjs/index.cjs CHANGED
@@ -1,320 +1,2 @@
1
1
  "use strict";
2
- 'use strict';
3
-
4
- var color = require('./color.cjs');
5
- var constants = require('./constants.cjs');
6
- var context = require('./context.cjs');
7
- var dom = require('./dom.cjs');
8
- var error = require('./error.cjs');
9
- var event = require('./event.cjs');
10
- var expression = require('./expression.cjs');
11
- var _function = require('./function.cjs');
12
- var icons = require('./icons.cjs');
13
- var id = require('./id.cjs');
14
- var json = require('./json.cjs');
15
- var message = require('./message.cjs');
16
- var module$1 = require('./module.cjs');
17
- var path = require('./path.cjs');
18
- var pinyin = require('./pinyin.cjs');
19
- var security = require('./security.cjs');
20
- var store = require('./store.cjs');
21
- var styles = require('./styles.cjs');
22
- var temporal = require('./temporal.cjs');
23
- var themeVariables = require('./theme-variables.cjs');
24
- require('./types.cjs');
25
- var utils = require('./utils.cjs');
26
- var validation = require('./validation.cjs');
27
- var yaml = require('./yaml.cjs');
28
- var zod = require('./zod.cjs');
29
- var radashi = require('radashi');
30
- var reactFastCompare = require('react-fast-compare');
31
- var shallow = require('zustand/shallow');
32
- var zod$1 = require('zod');
33
-
34
- "use strict";
35
-
36
- exports.isValidColor = color.isValidColor;
37
- exports.auditFormScene = constants.auditFormScene;
38
- exports.colorTypes = constants.colorTypes;
39
- exports.creationFormScene = constants.creationFormScene;
40
- exports.defaultColorTypes = constants.defaultColorTypes;
41
- exports.presetFormScenes = constants.presetFormScenes;
42
- exports.semanticColorTypes = constants.semanticColorTypes;
43
- exports.updateFormScene = constants.updateFormScene;
44
- exports.createSelectableContext = context.createSelectableContext;
45
- exports.getElementHeight = dom.getElementHeight;
46
- exports.VefError = error.VefError;
47
- exports.createEventEmitter = event.createEventEmitter;
48
- exports.compileDynamicFn = expression.compileDynamicFn;
49
- exports.isExpression = expression.isExpression;
50
- exports.isFunctionOrExpression = expression.isFunctionOrExpression;
51
- exports.mergeFns = _function.mergeFns;
52
- exports.IconAlertCircle = icons.IconAlertCircle;
53
- exports.IconAlertTriangle = icons.IconAlertTriangle;
54
- exports.IconCheck = icons.IconCheck;
55
- exports.IconInfoCircle = icons.IconInfoCircle;
56
- exports.IconTick = icons.IconTick;
57
- exports.IconTickCircle = icons.IconTickCircle;
58
- exports.generateId = id.generateId;
59
- exports.isJsonSchemaValid = json.isJsonSchemaValid;
60
- exports.checkIcon = message.checkIcon;
61
- exports.defaultMessageTitle = message.defaultMessageTitle;
62
- exports.errorIcon = message.errorIcon;
63
- exports.infoIcon = message.infoIcon;
64
- exports.showConfirmation = message.showConfirmation;
65
- exports.showErrorAlert = message.showErrorAlert;
66
- exports.showErrorMessage = message.showErrorMessage;
67
- exports.showErrorNotification = message.showErrorNotification;
68
- exports.showInfoAlert = message.showInfoAlert;
69
- exports.showInfoMessage = message.showInfoMessage;
70
- exports.showInfoNotification = message.showInfoNotification;
71
- exports.showLoadingMessage = message.showLoadingMessage;
72
- exports.showSuccessAlert = message.showSuccessAlert;
73
- exports.showSuccessMessage = message.showSuccessMessage;
74
- exports.showSuccessNotification = message.showSuccessNotification;
75
- exports.showWarningAlert = message.showWarningAlert;
76
- exports.showWarningMessage = message.showWarningMessage;
77
- exports.showWarningNotification = message.showWarningNotification;
78
- exports.successIcon = message.successIcon;
79
- exports.warningIcon = message.warningIcon;
80
- exports.unwrapModule = module$1.unwrapModule;
81
- exports.extractBaseName = path.extractBaseName;
82
- exports.extractDirName = path.extractDirName;
83
- exports.extractExtName = path.extractExtName;
84
- exports.isAbsolutePath = path.isAbsolutePath;
85
- exports.joinPaths = path.joinPaths;
86
- exports.normalizePath = path.normalizePath;
87
- exports.parsePinyin = pinyin.parsePinyin;
88
- exports.parsePinyinFirstLetter = pinyin.parsePinyinFirstLetter;
89
- exports.decryptRsa = security.decryptRsa;
90
- exports.encryptRsa = security.encryptRsa;
91
- exports.createComponentStore = store.createComponentStore;
92
- exports.createStore = store.createStore;
93
- exports.createUnboundStore = store.createUnboundStore;
94
- exports.useUnboundStore = store.useUnboundStore;
95
- exports.bmq = styles.bmq;
96
- exports.breakpoints = styles.breakpoints;
97
- exports.styles = styles.styles;
98
- exports.getNowDate = temporal.getNowDate;
99
- exports.getNowDateString = temporal.getNowDateString;
100
- exports.getTodayString = temporal.getTodayString;
101
- exports.themeVariables = themeVariables.themeVariables;
102
- exports.buildRouteParentMenusMappings = utils.buildRouteParentMenusMappings;
103
- exports.constantCase = utils.constantCase;
104
- exports.difference = utils.difference;
105
- exports.getStringLength = utils.getStringLength;
106
- exports.invokeMaybeAsyncFn = utils.invokeMaybeAsyncFn;
107
- exports.isAsyncFunction = utils.isAsyncFunction;
108
- exports.isInternalFunction = utils.isInternalFunction;
109
- exports.validator = validation;
110
- exports.loadYaml = yaml.loadYaml;
111
- exports.initZod = zod.initZod;
112
- Object.defineProperty(exports, "assign", {
113
- enumerable: true,
114
- get: function () { return radashi.assign; }
115
- });
116
- Object.defineProperty(exports, "camelCase", {
117
- enumerable: true,
118
- get: function () { return radashi.camel; }
119
- });
120
- Object.defineProperty(exports, "capitalize", {
121
- enumerable: true,
122
- get: function () { return radashi.capitalize; }
123
- });
124
- Object.defineProperty(exports, "clone", {
125
- enumerable: true,
126
- get: function () { return radashi.clone; }
127
- });
128
- Object.defineProperty(exports, "cloneDeep", {
129
- enumerable: true,
130
- get: function () { return radashi.cloneDeep; }
131
- });
132
- Object.defineProperty(exports, "cluster", {
133
- enumerable: true,
134
- get: function () { return radashi.cluster; }
135
- });
136
- Object.defineProperty(exports, "dashCase", {
137
- enumerable: true,
138
- get: function () { return radashi.dash; }
139
- });
140
- Object.defineProperty(exports, "debounce", {
141
- enumerable: true,
142
- get: function () { return radashi.debounce; }
143
- });
144
- Object.defineProperty(exports, "get", {
145
- enumerable: true,
146
- get: function () { return radashi.get; }
147
- });
148
- Object.defineProperty(exports, "isArray", {
149
- enumerable: true,
150
- get: function () { return radashi.isArray; }
151
- });
152
- Object.defineProperty(exports, "isBoolean", {
153
- enumerable: true,
154
- get: function () { return radashi.isBoolean; }
155
- });
156
- Object.defineProperty(exports, "isDate", {
157
- enumerable: true,
158
- get: function () { return radashi.isDate; }
159
- });
160
- Object.defineProperty(exports, "isEmpty", {
161
- enumerable: true,
162
- get: function () { return radashi.isEmpty; }
163
- });
164
- Object.defineProperty(exports, "isError", {
165
- enumerable: true,
166
- get: function () { return radashi.isError; }
167
- });
168
- Object.defineProperty(exports, "isFloat", {
169
- enumerable: true,
170
- get: function () { return radashi.isFloat; }
171
- });
172
- Object.defineProperty(exports, "isFunction", {
173
- enumerable: true,
174
- get: function () { return radashi.isFunction; }
175
- });
176
- Object.defineProperty(exports, "isInt", {
177
- enumerable: true,
178
- get: function () { return radashi.isInt; }
179
- });
180
- Object.defineProperty(exports, "isIntString", {
181
- enumerable: true,
182
- get: function () { return radashi.isIntString; }
183
- });
184
- Object.defineProperty(exports, "isMap", {
185
- enumerable: true,
186
- get: function () { return radashi.isMap; }
187
- });
188
- Object.defineProperty(exports, "isNullish", {
189
- enumerable: true,
190
- get: function () { return radashi.isNullish; }
191
- });
192
- Object.defineProperty(exports, "isNumber", {
193
- enumerable: true,
194
- get: function () { return radashi.isNumber; }
195
- });
196
- Object.defineProperty(exports, "isObject", {
197
- enumerable: true,
198
- get: function () { return radashi.isObject; }
199
- });
200
- Object.defineProperty(exports, "isPlainObject", {
201
- enumerable: true,
202
- get: function () { return radashi.isPlainObject; }
203
- });
204
- Object.defineProperty(exports, "isPrimitive", {
205
- enumerable: true,
206
- get: function () { return radashi.isPrimitive; }
207
- });
208
- Object.defineProperty(exports, "isPromise", {
209
- enumerable: true,
210
- get: function () { return radashi.isPromise; }
211
- });
212
- Object.defineProperty(exports, "isRegExp", {
213
- enumerable: true,
214
- get: function () { return radashi.isRegExp; }
215
- });
216
- Object.defineProperty(exports, "isSet", {
217
- enumerable: true,
218
- get: function () { return radashi.isSet; }
219
- });
220
- Object.defineProperty(exports, "isString", {
221
- enumerable: true,
222
- get: function () { return radashi.isString; }
223
- });
224
- Object.defineProperty(exports, "isSymbol", {
225
- enumerable: true,
226
- get: function () { return radashi.isSymbol; }
227
- });
228
- Object.defineProperty(exports, "isUndefined", {
229
- enumerable: true,
230
- get: function () { return radashi.isUndefined; }
231
- });
232
- Object.defineProperty(exports, "isWeakMap", {
233
- enumerable: true,
234
- get: function () { return radashi.isWeakMap; }
235
- });
236
- Object.defineProperty(exports, "isWeakSet", {
237
- enumerable: true,
238
- get: function () { return radashi.isWeakSet; }
239
- });
240
- Object.defineProperty(exports, "max", {
241
- enumerable: true,
242
- get: function () { return radashi.max; }
243
- });
244
- Object.defineProperty(exports, "memoize", {
245
- enumerable: true,
246
- get: function () { return radashi.memo; }
247
- });
248
- Object.defineProperty(exports, "min", {
249
- enumerable: true,
250
- get: function () { return radashi.min; }
251
- });
252
- Object.defineProperty(exports, "noop", {
253
- enumerable: true,
254
- get: function () { return radashi.noop; }
255
- });
256
- Object.defineProperty(exports, "omit", {
257
- enumerable: true,
258
- get: function () { return radashi.omit; }
259
- });
260
- Object.defineProperty(exports, "once", {
261
- enumerable: true,
262
- get: function () { return radashi.once; }
263
- });
264
- Object.defineProperty(exports, "pascalCase", {
265
- enumerable: true,
266
- get: function () { return radashi.pascal; }
267
- });
268
- Object.defineProperty(exports, "pick", {
269
- enumerable: true,
270
- get: function () { return radashi.pick; }
271
- });
272
- Object.defineProperty(exports, "set", {
273
- enumerable: true,
274
- get: function () { return radashi.set; }
275
- });
276
- Object.defineProperty(exports, "similarity", {
277
- enumerable: true,
278
- get: function () { return radashi.similarity; }
279
- });
280
- Object.defineProperty(exports, "snakeCase", {
281
- enumerable: true,
282
- get: function () { return radashi.snake; }
283
- });
284
- Object.defineProperty(exports, "sum", {
285
- enumerable: true,
286
- get: function () { return radashi.sum; }
287
- });
288
- Object.defineProperty(exports, "template", {
289
- enumerable: true,
290
- get: function () { return radashi.template; }
291
- });
292
- Object.defineProperty(exports, "throttle", {
293
- enumerable: true,
294
- get: function () { return radashi.throttle; }
295
- });
296
- Object.defineProperty(exports, "toFloat", {
297
- enumerable: true,
298
- get: function () { return radashi.toFloat; }
299
- });
300
- Object.defineProperty(exports, "toInt", {
301
- enumerable: true,
302
- get: function () { return radashi.toInt; }
303
- });
304
- Object.defineProperty(exports, "trim", {
305
- enumerable: true,
306
- get: function () { return radashi.trim; }
307
- });
308
- Object.defineProperty(exports, "unique", {
309
- enumerable: true,
310
- get: function () { return radashi.unique; }
311
- });
312
- exports.isDeepEqual = reactFastCompare;
313
- Object.defineProperty(exports, "isShallowEqual", {
314
- enumerable: true,
315
- get: function () { return shallow.shallow; }
316
- });
317
- Object.defineProperty(exports, "z", {
318
- enumerable: true,
319
- get: function () { return zod$1.z; }
320
- });
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}});
package/cjs/json.cjs CHANGED
@@ -1,18 +1,2 @@
1
1
  "use strict";
2
- 'use strict';
3
-
4
- var Ajv = require('ajv');
5
- var addFormats = require('ajv-formats');
6
-
7
- "use strict";
8
- const ajv = new Ajv({
9
- allErrors: true,
10
- verbose: true,
11
- useDefaults: true
12
- });
13
- addFormats(ajv);
14
- function isJsonSchemaValid(schema) {
15
- return ajv.validateSchema(JSON.parse(schema));
16
- }
17
-
18
- exports.isJsonSchemaValid = isJsonSchemaValid;
2
+ "use strict";var s=require("ajv"),a=require("ajv-formats");const e=new s({allErrors:!0,verbose:!0,useDefaults:!0});a(e);function i(r){return e.validateSchema(JSON.parse(r))}exports.isJsonSchemaValid=i;
package/cjs/message.cjs CHANGED
@@ -1,303 +1,2 @@
1
1
  "use strict";
2
- 'use strict';
3
-
4
- var Icon = require('@ant-design/icons');
5
- var antd = require('antd');
6
- var react = require('react');
7
- var icons = require('./icons.cjs');
8
- require('./utils.cjs');
9
- var radashi = require('radashi');
10
-
11
- "use strict";
12
- const {
13
- confirm,
14
- info,
15
- success,
16
- warning,
17
- error
18
- } = antd.Modal;
19
- const checkIcon = react.createElement(Icon, {
20
- component: icons.IconCheck
21
- });
22
- const successIcon = react.createElement(Icon, {
23
- component: icons.IconTickCircle
24
- });
25
- const infoIcon = react.createElement(Icon, {
26
- component: icons.IconInfoCircle
27
- });
28
- const warningIcon = react.createElement(Icon, {
29
- component: icons.IconAlertTriangle
30
- });
31
- const errorIcon = react.createElement(Icon, {
32
- component: icons.IconAlertCircle
33
- });
34
- const notificationSuccessIcon = react.createElement(Icon, {
35
- className: "vef-notification-notice-icon vef-notification-notice-icon-success",
36
- component: icons.IconTickCircle
37
- });
38
- const notificationInfoIcon = react.createElement(Icon, {
39
- className: "vef-notification-notice-icon vef-notification-notice-icon-info",
40
- component: icons.IconInfoCircle
41
- });
42
- const notificationWarningIcon = react.createElement(Icon, {
43
- className: "vef-notification-notice-icon vef-notification-notice-icon-warning",
44
- component: icons.IconAlertTriangle
45
- });
46
- const notificationErrorIcon = react.createElement(Icon, {
47
- className: "vef-notification-notice-icon vef-notification-notice-icon-error",
48
- component: icons.IconAlertCircle
49
- });
50
- function showSuccessMessage(content) {
51
- antd.message.open({
52
- type: "success",
53
- content,
54
- duration: 2,
55
- icon: successIcon
56
- });
57
- }
58
- function showInfoMessage(content) {
59
- antd.message.open({
60
- type: "info",
61
- content,
62
- duration: 3,
63
- icon: infoIcon
64
- });
65
- }
66
- function showWarningMessage(content) {
67
- antd.message.open({
68
- type: "warning",
69
- content,
70
- duration: 3,
71
- icon: warningIcon
72
- });
73
- }
74
- function showErrorMessage(content) {
75
- antd.message.open({
76
- type: "error",
77
- content,
78
- duration: 4,
79
- icon: errorIcon
80
- });
81
- }
82
- function showLoadingMessage(content) {
83
- const close = antd.message.open({
84
- type: "loading",
85
- content,
86
- duration: 0
87
- });
88
- return () => close();
89
- }
90
- const defaultMessageTitle = "提瀺";
91
- function showSuccessNotification(titleOrContent, content, buttons) {
92
- const argsLength = arguments.length;
93
- if (argsLength < 1) {
94
- throw new Error("showSuccessNotification requires at least one argument");
95
- }
96
- const titleToUse = argsLength > 1 ? titleOrContent : defaultMessageTitle;
97
- const contentToUse = argsLength > 1 ? content : titleOrContent;
98
- const buttonsToUse = argsLength === 3 ? buttons : void 0;
99
- antd.notification.open({
100
- type: "success",
101
- message: titleToUse,
102
- description: contentToUse,
103
- duration: 4,
104
- closable: true,
105
- btn: buttonsToUse,
106
- icon: notificationSuccessIcon
107
- });
108
- }
109
- function showInfoNotification(titleOrContent, content, buttons) {
110
- const argsLength = arguments.length;
111
- if (argsLength < 1) {
112
- throw new Error("showInfoNotification requires at least one argument");
113
- }
114
- const titleToUse = argsLength > 1 ? titleOrContent : defaultMessageTitle;
115
- const contentToUse = argsLength > 1 ? content : titleOrContent;
116
- const buttonsToUse = argsLength === 3 ? buttons : void 0;
117
- antd.notification.open({
118
- type: "info",
119
- message: titleToUse,
120
- description: contentToUse,
121
- duration: 5,
122
- closable: true,
123
- btn: buttonsToUse,
124
- icon: notificationInfoIcon
125
- });
126
- }
127
- function showWarningNotification(titleOrContent, content, buttons) {
128
- const argsLength = arguments.length;
129
- if (argsLength < 1) {
130
- throw new Error("showWarningNotification requires at least one argument");
131
- }
132
- const titleToUse = argsLength > 1 ? titleOrContent : defaultMessageTitle;
133
- const contentToUse = argsLength > 1 ? content : titleOrContent;
134
- const buttonsToUse = argsLength === 3 ? buttons : void 0;
135
- antd.notification.open({
136
- type: "warning",
137
- message: titleToUse,
138
- description: contentToUse,
139
- duration: 6,
140
- closable: true,
141
- btn: buttonsToUse,
142
- icon: notificationWarningIcon
143
- });
144
- }
145
- function showErrorNotification(titleOrContent, content, buttons) {
146
- const argsLength = arguments.length;
147
- if (argsLength < 1) {
148
- throw new Error("showErrorNotification requires at least one argument");
149
- }
150
- const titleToUse = argsLength > 1 ? titleOrContent : defaultMessageTitle;
151
- const contentToUse = argsLength > 1 ? content : titleOrContent;
152
- const buttonsToUse = argsLength === 3 ? buttons : void 0;
153
- antd.notification.open({
154
- type: "error",
155
- message: titleToUse,
156
- description: contentToUse,
157
- duration: 10,
158
- closable: true,
159
- btn: buttonsToUse,
160
- icon: notificationErrorIcon
161
- });
162
- }
163
- const cancelButtonProps = {
164
- color: "default",
165
- variant: "text"
166
- };
167
- const okButtonProps = {
168
- icon: checkIcon
169
- };
170
- function showConfirmation(title, content, onOk, options) {
171
- const argsLength = arguments.length;
172
- if (argsLength < 2) {
173
- throw new Error("showConfirmation requires at least two arguments");
174
- }
175
- const titleToUse = argsLength > 2 ? title : "提瀺";
176
- const contentToUse = argsLength === 2 ? title : content;
177
- const onOkToUse = argsLength === 2 ? content : onOk;
178
- const {
179
- okText,
180
- cancelText,
181
- onCancel,
182
- onAfterOpen,
183
- onAfterClose
184
- } = options ?? {};
185
- const { destroy } = confirm({
186
- title: titleToUse,
187
- content: contentToUse,
188
- cancelButtonProps,
189
- okButtonProps,
190
- centered: true,
191
- onOk: onOkToUse,
192
- okText,
193
- cancelText,
194
- onCancel,
195
- afterOpenChange: radashi.isFunction(onAfterOpen) || radashi.isFunction(onAfterClose) ? (open) => {
196
- if (open) {
197
- onAfterOpen?.();
198
- } else {
199
- onAfterClose?.();
200
- }
201
- } : void 0
202
- });
203
- return destroy;
204
- }
205
- const alertFnMap = {
206
- success,
207
- info,
208
- warning,
209
- error
210
- };
211
- const alertIconMap = {
212
- success: successIcon,
213
- info: infoIcon,
214
- warning: warningIcon,
215
- error: errorIcon
216
- };
217
- const defaultOkText = "πŸ‘πŸ» ε₯½ηš„οΌŒηŸ₯道了";
218
- function showAlert(type, content, title = defaultMessageTitle, onOk, options) {
219
- const {
220
- okText = defaultOkText,
221
- onCancel,
222
- onAfterOpen,
223
- onAfterClose
224
- } = options ?? {};
225
- const { destroy } = alertFnMap[type]({
226
- title,
227
- content,
228
- icon: alertIconMap[type],
229
- centered: true,
230
- onOk,
231
- okText,
232
- onCancel,
233
- afterOpenChange: radashi.isFunction(onAfterOpen) || radashi.isFunction(onAfterClose) ? (open) => {
234
- if (open) {
235
- onAfterOpen?.();
236
- } else {
237
- onAfterClose?.();
238
- }
239
- } : void 0
240
- });
241
- return destroy;
242
- }
243
- function showSuccessAlert(title, content, onOk, options) {
244
- const argsLength = arguments.length;
245
- if (argsLength < 1) {
246
- throw new Error("showSuccessAlert requires at least one argument");
247
- }
248
- const titleToUse = argsLength === 1 || radashi.isFunction(content) ? void 0 : title;
249
- const contentToUse = argsLength === 1 || radashi.isFunction(content) ? title : content;
250
- const onOkToUse = argsLength === 2 || radashi.isFunction(content) ? content : onOk;
251
- return showAlert("success", contentToUse, titleToUse, onOkToUse, options);
252
- }
253
- function showInfoAlert(title, content, onOk, options) {
254
- const argsLength = arguments.length;
255
- if (argsLength < 1) {
256
- throw new Error("showInfoAlert requires at least one argument");
257
- }
258
- const titleToUse = argsLength === 1 || radashi.isFunction(content) ? void 0 : title;
259
- const contentToUse = argsLength === 1 || radashi.isFunction(content) ? title : content;
260
- const onOkToUse = argsLength === 2 || radashi.isFunction(content) ? content : onOk;
261
- return showAlert("info", contentToUse, titleToUse, onOkToUse, options);
262
- }
263
- function showWarningAlert(title, content, onOk, options) {
264
- const argsLength = arguments.length;
265
- if (argsLength < 1) {
266
- throw new Error("showWarningAlert requires at least one argument");
267
- }
268
- const titleToUse = argsLength === 1 || radashi.isFunction(content) ? void 0 : title;
269
- const contentToUse = argsLength === 1 || radashi.isFunction(content) ? title : content;
270
- const onOkToUse = argsLength === 2 || radashi.isFunction(content) ? content : onOk;
271
- return showAlert("warning", contentToUse, titleToUse, onOkToUse, options);
272
- }
273
- function showErrorAlert(title, content, onOk, options) {
274
- const argsLength = arguments.length;
275
- if (argsLength < 1) {
276
- throw new Error("showErrorAlert requires at least one argument");
277
- }
278
- const titleToUse = argsLength === 1 || radashi.isFunction(content) ? void 0 : title;
279
- const contentToUse = argsLength === 1 || radashi.isFunction(content) ? title : content;
280
- const onOkToUse = argsLength === 2 || radashi.isFunction(content) ? content : onOk;
281
- return showAlert("error", contentToUse, titleToUse, onOkToUse, options);
282
- }
283
-
284
- exports.checkIcon = checkIcon;
285
- exports.defaultMessageTitle = defaultMessageTitle;
286
- exports.errorIcon = errorIcon;
287
- exports.infoIcon = infoIcon;
288
- exports.showConfirmation = showConfirmation;
289
- exports.showErrorAlert = showErrorAlert;
290
- exports.showErrorMessage = showErrorMessage;
291
- exports.showErrorNotification = showErrorNotification;
292
- exports.showInfoAlert = showInfoAlert;
293
- exports.showInfoMessage = showInfoMessage;
294
- exports.showInfoNotification = showInfoNotification;
295
- exports.showLoadingMessage = showLoadingMessage;
296
- exports.showSuccessAlert = showSuccessAlert;
297
- exports.showSuccessMessage = showSuccessMessage;
298
- exports.showSuccessNotification = showSuccessNotification;
299
- exports.showWarningAlert = showWarningAlert;
300
- exports.showWarningMessage = showWarningMessage;
301
- exports.showWarningNotification = showWarningNotification;
302
- exports.successIcon = successIcon;
303
- exports.warningIcon = warningIcon;
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/cjs/module.cjs CHANGED
@@ -1,14 +1,2 @@
1
1
  "use strict";
2
- 'use strict';
3
-
4
- "use strict";
5
- const MODULE_FLAG = "__esModule";
6
- const DEFAULT_KEY = "default";
7
- function unwrapModule(module) {
8
- if (Reflect.has(module, MODULE_FLAG)) {
9
- return unwrapModule(Reflect.get(module, DEFAULT_KEY));
10
- }
11
- return module;
12
- }
13
-
14
- exports.unwrapModule = unwrapModule;
2
+ "use strict";const u="__esModule",n="default";function e(t){return Reflect.has(t,u)?e(Reflect.get(t,n)):t}exports.unwrapModule=e;