@94ai/common-ui 9.0.0 → 10.0.0

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.
@@ -1,495 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const fs = require("fs");
4
- const path = require("path");
5
- const vueDemi = require("vue-demi");
6
- const ComponentConstantList = [
7
- "NfMenu",
8
- "NfInfiniteMenu",
9
- "NfDoubleTime",
10
- "NfEmpty",
11
- "NfImportTemplate",
12
- "NfTransferSelect",
13
- "NfRadioGroup",
14
- "NfAlert",
15
- "NfVirtualSelect",
16
- "NfTag",
17
- "NfAction",
18
- "NfIndicatorPlane",
19
- "NfQuarterPicker",
20
- "NfDoubleQuarter",
21
- "NfDoubleHalfYear",
22
- "NfHalfYearPicker",
23
- "NfDoubleWeek",
24
- "NfDoubleYear",
25
- "NfDatePicker",
26
- "NfFormItem",
27
- "NfForm",
28
- "NfTable",
29
- "NfSearchForm",
30
- "NfDrawer",
31
- "NfMessage",
32
- "NfNotification",
33
- "NfConfirm",
34
- "NfTextOverflow",
35
- "NfResizablePanels",
36
- "NfAddress",
37
- "NfAudio",
38
- "NfButton",
39
- "NfRules",
40
- "NfConditions",
41
- "NfKeywords",
42
- "NfVariableSelect",
43
- "NfMicrophone",
44
- "NfSvgIcon",
45
- "NfLazySelect",
46
- "NfPopupLazySelect",
47
- "NfAddressSelect",
48
- "NfSoftphone",
49
- "NfInput",
50
- "NfIconfontIcon",
51
- "NfTimezonePicker"
52
- ];
53
- const presudos = ["", "webkit", "moz"];
54
- function resolveDebuger(name) {
55
- fs.appendFile(path.resolve(__dirname, "./log.txt"), `${name}
56
- `, () => {
57
- });
58
- }
59
- function kebabCase(key) {
60
- const result = key.replace(/([A-Z])/g, " $1").trim();
61
- return result.split(" ").join("-").toLowerCase();
62
- }
63
- function isAsyncFunc(func) {
64
- return func[Symbol(Symbol.toStringTag)] === "AsyncFunction";
65
- }
66
- function closest(that, componentName) {
67
- let vm = that;
68
- let result;
69
- while (vm && !result) {
70
- const name = vm.$options.name;
71
- if (name === componentName) {
72
- result = vm;
73
- }
74
- vm = vm.$parent;
75
- }
76
- return result;
77
- }
78
- function getDirs() {
79
- return ComponentConstantList.map((item) => "node_modules/@94ai/" + kebabCase(item) + "/lib");
80
- }
81
- function getTranspileDependencies() {
82
- return ComponentConstantList.map((item) => "@94ai/" + kebabCase(item));
83
- }
84
- const getResolver = () => {
85
- return {
86
- type: "component",
87
- resolve: (name) => {
88
- resolveDebuger(name);
89
- if (/^Nf[A-Za-z](?!.*[Mm][Dd]$).*$/.test(name)) {
90
- const kebabCasePackageName = kebabCase(name);
91
- return {
92
- from: `@94ai/${kebabCasePackageName}/lib/${kebabCasePackageName}.esm-bundler.js`,
93
- sideEffects: []
94
- };
95
- }
96
- }
97
- };
98
- };
99
- const getJsComponentSampleConfig = (config = {}) => {
100
- return {
101
- exclude: [/[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
102
- include: [
103
- /\.vue$/,
104
- /\.vue\?vue/,
105
- /\.vue\?v=/,
106
- /\.js$/,
107
- /\.js\?vue/,
108
- /\.js\?v=/
109
- ],
110
- deep: true,
111
- transformer: "vue2",
112
- resolvers: [],
113
- ...config
114
- };
115
- };
116
- const getTsComponentSampleConfig = (config = {}) => {
117
- return {
118
- include: [
119
- /\.vue$/,
120
- /\.vue\?vue/,
121
- /\.md$/,
122
- /\.md\?vue/,
123
- /\.jsx$/,
124
- /\.jsx\?vue/,
125
- /\.tsx$/,
126
- /\.tsx\?vue/,
127
- /\.js$/,
128
- /\.js\?vue/
129
- ],
130
- deep: true,
131
- extensions: ["vue", "md", "jsx", "tsx", "mjs", "mts", "js"],
132
- dirs: ["src/components", "src/views", "doc"],
133
- resolvers: [],
134
- ...config
135
- };
136
- };
137
- function generateUUID() {
138
- let d = Date.now();
139
- if (typeof performance !== "undefined" && typeof performance.now === "function") {
140
- d += performance.now();
141
- }
142
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
143
- const r = (d + Math.random() * 16) % 16 | 0;
144
- d = Math.floor(d / 16);
145
- return (c === "x" ? r : r & 3 | 8).toString(16);
146
- });
147
- }
148
- const getCharStringLength = (str) => {
149
- let leng = 0;
150
- for (let i = 0; i < str.length; i += 1) {
151
- if (str.charCodeAt(i) > 127 || str.charCodeAt(i) == 94) {
152
- leng += 2;
153
- } else {
154
- leng += 1;
155
- }
156
- }
157
- return leng;
158
- };
159
- const deepClone = (source) => {
160
- if (!source || typeof source !== "object") {
161
- return source;
162
- }
163
- const targetObj = source.constructor === Array ? [] : {};
164
- Object.keys(source).forEach((keys) => {
165
- if (source[keys] && typeof source[keys] === "object") {
166
- targetObj[keys] = source[keys].constructor === Array ? [] : {};
167
- targetObj[keys] = deepClone(source[keys]);
168
- } else {
169
- targetObj[keys] = source[keys];
170
- }
171
- });
172
- return targetObj;
173
- };
174
- function debounce(func, wait, immediate) {
175
- let timeout, args, context, timestamp, result;
176
- const later = function() {
177
- const last = +/* @__PURE__ */ new Date() - timestamp;
178
- if (last < wait && last > 0) {
179
- timeout = setTimeout(later, wait - last);
180
- } else {
181
- timeout = null;
182
- if (!immediate) {
183
- result = func.apply(context, args);
184
- if (!timeout)
185
- context = args = null;
3
+ const tool = require("@94ai/common-utils/lib/tool");
4
+ function _interopNamespaceDefault(e) {
5
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
6
+ if (e) {
7
+ for (const k in e) {
8
+ if (k !== "default") {
9
+ const d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: () => e[k]
13
+ });
186
14
  }
187
15
  }
188
- };
189
- return function(...args2) {
190
- context = this;
191
- timestamp = +/* @__PURE__ */ new Date();
192
- const callNow = immediate && !timeout;
193
- if (!timeout)
194
- timeout = setTimeout(later, wait);
195
- if (callNow) {
196
- result = func.apply(context, args2);
197
- context = args2 = null;
198
- }
199
- return result;
200
- };
201
- }
202
- function createUniqueString(randomLength = 36) {
203
- return Number(Math.random().toString().substr(3, randomLength) + Date.now()).toString(36);
204
- }
205
- function getHalfYear(date = /* @__PURE__ */ new Date()) {
206
- const currMonth = date.getMonth() + 1;
207
- return Math.floor(currMonth % 6 == 0 ? currMonth / 6 : currMonth / 6 + 1);
208
- }
209
- function getQuarter(date = /* @__PURE__ */ new Date()) {
210
- const currMonth = date.getMonth() + 1;
211
- return Math.floor(currMonth % 3 == 0 ? currMonth / 3 : currMonth / 3 + 1);
212
- }
213
- function getNextYear(date = /* @__PURE__ */ new Date()) {
214
- return new Date(date.setFullYear(date.getFullYear() + 1));
215
- }
216
- function endOf(now = /* @__PURE__ */ new Date(), unit) {
217
- if (unit === "year") {
218
- return new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
219
- }
220
- if (unit === "month") {
221
- return new Date(new Date(now.getFullYear(), now.getMonth() + 1, 1).getTime() - 1);
222
- }
223
- if (unit === "week") {
224
- return new Date(now.getFullYear(), now.getMonth(), now.getDate() + (6 - now.getDay()), 23, 59, 59, 999);
225
- }
226
- return new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
227
- }
228
- function startOf(date, unit) {
229
- const newDate = new Date(date);
230
- if (unit === "year") {
231
- newDate.setMonth(0);
232
- newDate.setDate(1);
233
- newDate.setHours(0, 0, 0, 0);
234
- } else if (unit === "month") {
235
- newDate.setDate(1);
236
- newDate.setHours(0, 0, 0, 0);
237
- } else if (unit === "") {
238
- newDate.setHours(0, 0, 0, 0);
239
- } else if (unit === "hour") {
240
- newDate.setMinutes(0, 0, 0);
241
- } else if (unit === "minute") {
242
- newDate.setSeconds(0, 0);
243
- } else if (unit === "second") {
244
- newDate.setMilliseconds(0);
245
- }
246
- return newDate;
247
- }
248
- function formatDate(date, format) {
249
- const year = date.getFullYear();
250
- const month = date.getMonth() + 1;
251
- const day = date.getDate();
252
- const hours = date.getHours();
253
- const minutes = date.getMinutes();
254
- const seconds = date.getSeconds();
255
- format = format.replace("YYYY", year);
256
- format = format.replace("MM", String(month).padStart(2, "0"));
257
- format = format.replace("DD", String(day).padStart(2, "0"));
258
- format = format.replace("HH", String(hours).padStart(2, "0"));
259
- format = format.replace("mm", String(minutes).padStart(2, "0"));
260
- format = format.replace("ss", String(seconds).padStart(2, "0"));
261
- return format;
262
- }
263
- function HexToRgb(str) {
264
- const r = /^#?[0-9A-Fa-f]{6}$/;
265
- if (!r.test(str))
266
- return;
267
- str = str.replace("#", "");
268
- const hxs = str.match(/../g);
269
- for (let i = 0; i < 3; i++) {
270
- hxs[i] = parseInt(hxs[i], 16);
271
- }
272
- return hxs;
273
- }
274
- function RgbToHex(a, b, c) {
275
- const r = /^\d{1,3}$/;
276
- if (!r.test(String(a)) || !r.test(String(b)) || !r.test(String(c)))
277
- return;
278
- const hexs = [a.toString(16), b.toString(16), c.toString(16)];
279
- for (let i = 0; i < 3; i++)
280
- if (hexs[i].length === 1)
281
- hexs[i] = "0" + hexs[i];
282
- return "#" + hexs.join("");
283
- }
284
- function getDarkColor(color, level) {
285
- const r = /^#?[0-9A-Fa-f]{6}$/;
286
- if (!r.test(color))
287
- return color;
288
- const rgbc = HexToRgb(color);
289
- for (let i = 0; i < 3; i++) {
290
- rgbc[i] = Math.floor(rgbc[i] * (1 - level));
291
- }
292
- return RgbToHex(rgbc[0], rgbc[1], rgbc[2]);
293
- }
294
- function getLightColor(color, level) {
295
- const r = /^#?[0-9A-Fa-f]{6}$/;
296
- if (!r.test(color))
297
- return color;
298
- const rgbc = HexToRgb(color);
299
- for (let i = 0; i < 3; i++) {
300
- rgbc[i] = Math.floor((255 - rgbc[i]) * level + rgbc[i]);
301
- }
302
- return RgbToHex(rgbc[0], rgbc[1], rgbc[2]);
303
- }
304
- const toLine = (value) => {
305
- return value.replace(/(A-Z)g/, "-$1").toLocaleLowerCase();
306
- };
307
- function upperCamelCase(word) {
308
- const cleanedString = word.replace(/\W/g, "");
309
- const words = cleanedString.toLowerCase().split(/\B(?=[A-Z])/);
310
- const upperCamelCase2 = words.map((word2) => word2.charAt(0).toUpperCase() + word2.slice(1)).join("");
311
- return upperCamelCase2;
312
- }
313
- function isAutoFlexBasis(el) {
314
- const flexBasis = _getComputedStyle(el, "flexBasis");
315
- return flexBasis === "auto";
316
- }
317
- function _getComputedStyle(el, k) {
318
- const computedStyle = getComputedStyle(el);
319
- for (let i = 0; i <= presudos.length; i++) {
320
- const key = presudos[i] ? `${presudos[i]}${upperCamelCase(k)}` : k;
321
- if (computedStyle[key]) {
322
- return computedStyle[key];
323
- }
324
16
  }
325
- return void 0;
326
- }
327
- function getFlexDirection(el) {
328
- const flexDirection = _getComputedStyle(el, "flexDirection");
329
- const [direction, reverse] = flexDirection.split("-");
330
- return {
331
- vertical: direction === "column",
332
- reverse: !!reverse
333
- };
334
- }
335
- function getBlobURL(jsCode) {
336
- const blob = new Blob([jsCode], { type: "text/javascript" });
337
- const blobURL = URL.createObjectURL(blob);
338
- return blobURL;
339
- }
340
- function toBase64(str) {
341
- return btoa(unescape(encodeURIComponent(str)));
342
- }
343
- function generateID() {
344
- return Math.random().toString(36).slice(2, 12) + Date.now();
345
- }
346
- const copyFile = (sourcePath, targetPath) => {
347
- const isExist = (path2) => {
348
- if (!fs.existsSync(path2)) {
349
- fs.mkdirSync(path2);
350
- }
351
- };
352
- isExist(targetPath);
353
- const sourceFile = fs.readdirSync(sourcePath, { withFileTypes: true });
354
- sourceFile.forEach((file) => {
355
- const newSourcePath = path.resolve(sourcePath, file.name);
356
- const newTargetPath = path.resolve(targetPath, file.name);
357
- if (file.isDirectory()) {
358
- isExist(newTargetPath);
359
- copyFile(newSourcePath, newTargetPath);
360
- return;
361
- }
362
- fs.copyFileSync(newSourcePath, newTargetPath);
363
- });
364
- };
365
- const add = (arg1, arg2) => {
366
- let r1, r2, m;
367
- try {
368
- r1 = (arg1.toString().split(".")[1] || "").length;
369
- } catch (e) {
370
- r1 = 0;
371
- }
372
- try {
373
- r2 = (arg2.toString().split(".")[1] || "").length;
374
- } catch (e) {
375
- r2 = 0;
376
- }
377
- m = Math.pow(10, Math.max(r1, r2));
378
- return div(mul(arg1, m) + mul(arg2, m), m);
379
- };
380
- const mul = (arg1, arg2) => {
381
- let m = 0;
382
- const s1 = arg1.toString();
383
- const s2 = arg2.toString();
384
- m += (s1.split(".")[1] || "").length;
385
- m += (s2.split(".")[1] || "").length;
386
- return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
387
- };
388
- const div = (arg1, arg2) => {
389
- const t1 = (arg1.toString().split(".")[1] || "").length;
390
- const t2 = (arg2.toString().split(".")[1] || "").length;
391
- const r1 = Number(arg1.toString().replace(".", ""));
392
- const r2 = Number(arg2.toString().replace(".", ""));
393
- return r1 / r2 * Math.pow(10, t2 - t1);
394
- };
395
- function getLocalTime(i) {
396
- let time = i;
397
- if (typeof time === "string") {
398
- const arr = time.split(":");
399
- if (arr.length < 2) {
400
- return /* @__PURE__ */ new Date();
401
- }
402
- time = add(Number(arr[0]), div(Math.floor(Number(arr[1])), 60));
403
- }
404
- if (typeof time !== "number") {
405
- return /* @__PURE__ */ new Date();
406
- }
407
- const d = /* @__PURE__ */ new Date();
408
- const len = d.getTime();
409
- const offset = d.getTimezoneOffset() * 6e4;
410
- const utcTime = len + offset;
411
- return new Date(utcTime + 36e5 * time);
412
- }
413
- function toPascalCase(str) {
414
- const camelCase = str.replace(/-([a-z])/g, function(_match, letter) {
415
- return letter.toUpperCase();
416
- });
417
- return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
17
+ n.default = e;
18
+ return Object.freeze(n);
418
19
  }
419
- vueDemi.reactive({ lang: "" });
420
- const tool = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
421
- __proto__: null,
422
- ComponentConstantList,
423
- HexToRgb,
424
- RgbToHex,
425
- _getComputedStyle,
426
- closest,
427
- copyFile,
428
- createUniqueString,
429
- debounce,
430
- deepClone,
431
- endOf,
432
- formatDate,
433
- generateID,
434
- generateUUID,
435
- getBlobURL,
436
- getCharStringLength,
437
- getDarkColor,
438
- getDirs,
439
- getFlexDirection,
440
- getHalfYear,
441
- getJsComponentSampleConfig,
442
- getLightColor,
443
- getLocalTime,
444
- getNextYear,
445
- getQuarter,
446
- getResolver,
447
- getTranspileDependencies,
448
- getTsComponentSampleConfig,
449
- isAsyncFunc,
450
- isAutoFlexBasis,
451
- kebabCase,
452
- resolveDebuger,
453
- startOf,
454
- toBase64,
455
- toLine,
456
- toPascalCase,
457
- upperCamelCase
458
- }, Symbol.toStringTag, { value: "Module" }));
459
- exports.ComponentConstantList = ComponentConstantList;
460
- exports.HexToRgb = HexToRgb;
461
- exports.RgbToHex = RgbToHex;
462
- exports._getComputedStyle = _getComputedStyle;
463
- exports.closest = closest;
464
- exports.copyFile = copyFile;
465
- exports.createUniqueString = createUniqueString;
466
- exports.debounce = debounce;
467
- exports.deepClone = deepClone;
468
- exports.default = tool;
469
- exports.endOf = endOf;
470
- exports.formatDate = formatDate;
471
- exports.generateID = generateID;
472
- exports.generateUUID = generateUUID;
473
- exports.getBlobURL = getBlobURL;
474
- exports.getCharStringLength = getCharStringLength;
475
- exports.getDarkColor = getDarkColor;
476
- exports.getDirs = getDirs;
477
- exports.getFlexDirection = getFlexDirection;
478
- exports.getHalfYear = getHalfYear;
479
- exports.getJsComponentSampleConfig = getJsComponentSampleConfig;
480
- exports.getLightColor = getLightColor;
481
- exports.getLocalTime = getLocalTime;
482
- exports.getNextYear = getNextYear;
483
- exports.getQuarter = getQuarter;
484
- exports.getResolver = getResolver;
485
- exports.getTranspileDependencies = getTranspileDependencies;
486
- exports.getTsComponentSampleConfig = getTsComponentSampleConfig;
487
- exports.isAsyncFunc = isAsyncFunc;
488
- exports.isAutoFlexBasis = isAutoFlexBasis;
489
- exports.kebabCase = kebabCase;
490
- exports.resolveDebuger = resolveDebuger;
491
- exports.startOf = startOf;
492
- exports.toBase64 = toBase64;
493
- exports.toLine = toLine;
494
- exports.toPascalCase = toPascalCase;
495
- exports.upperCamelCase = upperCamelCase;
20
+ const tool__namespace = /* @__PURE__ */ _interopNamespaceDefault(tool);
21
+ exports.default = tool__namespace;
22
+ Object.keys(tool).forEach((k) => {
23
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
24
+ Object.defineProperty(exports, k, {
25
+ enumerable: true,
26
+ get: () => tool[k]
27
+ });
28
+ });
@@ -1,495 +1,5 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { reactive } from "vue-demi";
4
- const ComponentConstantList = [
5
- "NfMenu",
6
- "NfInfiniteMenu",
7
- "NfDoubleTime",
8
- "NfEmpty",
9
- "NfImportTemplate",
10
- "NfTransferSelect",
11
- "NfRadioGroup",
12
- "NfAlert",
13
- "NfVirtualSelect",
14
- "NfTag",
15
- "NfAction",
16
- "NfIndicatorPlane",
17
- "NfQuarterPicker",
18
- "NfDoubleQuarter",
19
- "NfDoubleHalfYear",
20
- "NfHalfYearPicker",
21
- "NfDoubleWeek",
22
- "NfDoubleYear",
23
- "NfDatePicker",
24
- "NfFormItem",
25
- "NfForm",
26
- "NfTable",
27
- "NfSearchForm",
28
- "NfDrawer",
29
- "NfMessage",
30
- "NfNotification",
31
- "NfConfirm",
32
- "NfTextOverflow",
33
- "NfResizablePanels",
34
- "NfAddress",
35
- "NfAudio",
36
- "NfButton",
37
- "NfRules",
38
- "NfConditions",
39
- "NfKeywords",
40
- "NfVariableSelect",
41
- "NfMicrophone",
42
- "NfSvgIcon",
43
- "NfLazySelect",
44
- "NfPopupLazySelect",
45
- "NfAddressSelect",
46
- "NfSoftphone",
47
- "NfInput",
48
- "NfIconfontIcon",
49
- "NfTimezonePicker"
50
- ];
51
- const presudos = ["", "webkit", "moz"];
52
- function resolveDebuger(name) {
53
- fs.appendFile(path.resolve(__dirname, "./log.txt"), `${name}
54
- `, () => {
55
- });
56
- }
57
- function kebabCase(key) {
58
- const result = key.replace(/([A-Z])/g, " $1").trim();
59
- return result.split(" ").join("-").toLowerCase();
60
- }
61
- function isAsyncFunc(func) {
62
- return func[Symbol(Symbol.toStringTag)] === "AsyncFunction";
63
- }
64
- function closest(that, componentName) {
65
- let vm = that;
66
- let result;
67
- while (vm && !result) {
68
- const name = vm.$options.name;
69
- if (name === componentName) {
70
- result = vm;
71
- }
72
- vm = vm.$parent;
73
- }
74
- return result;
75
- }
76
- function getDirs() {
77
- return ComponentConstantList.map((item) => "node_modules/@94ai/" + kebabCase(item) + "/lib");
78
- }
79
- function getTranspileDependencies() {
80
- return ComponentConstantList.map((item) => "@94ai/" + kebabCase(item));
81
- }
82
- const getResolver = () => {
83
- return {
84
- type: "component",
85
- resolve: (name) => {
86
- resolveDebuger(name);
87
- if (/^Nf[A-Za-z](?!.*[Mm][Dd]$).*$/.test(name)) {
88
- const kebabCasePackageName = kebabCase(name);
89
- return {
90
- from: `@94ai/${kebabCasePackageName}/lib/${kebabCasePackageName}.esm-bundler.js`,
91
- sideEffects: []
92
- };
93
- }
94
- }
95
- };
96
- };
97
- const getJsComponentSampleConfig = (config = {}) => {
98
- return {
99
- exclude: [/[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
100
- include: [
101
- /\.vue$/,
102
- /\.vue\?vue/,
103
- /\.vue\?v=/,
104
- /\.js$/,
105
- /\.js\?vue/,
106
- /\.js\?v=/
107
- ],
108
- deep: true,
109
- transformer: "vue2",
110
- resolvers: [],
111
- ...config
112
- };
113
- };
114
- const getTsComponentSampleConfig = (config = {}) => {
115
- return {
116
- include: [
117
- /\.vue$/,
118
- /\.vue\?vue/,
119
- /\.md$/,
120
- /\.md\?vue/,
121
- /\.jsx$/,
122
- /\.jsx\?vue/,
123
- /\.tsx$/,
124
- /\.tsx\?vue/,
125
- /\.js$/,
126
- /\.js\?vue/
127
- ],
128
- deep: true,
129
- extensions: ["vue", "md", "jsx", "tsx", "mjs", "mts", "js"],
130
- dirs: ["src/components", "src/views", "doc"],
131
- resolvers: [],
132
- ...config
133
- };
134
- };
135
- function generateUUID() {
136
- let d = Date.now();
137
- if (typeof performance !== "undefined" && typeof performance.now === "function") {
138
- d += performance.now();
139
- }
140
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
141
- const r = (d + Math.random() * 16) % 16 | 0;
142
- d = Math.floor(d / 16);
143
- return (c === "x" ? r : r & 3 | 8).toString(16);
144
- });
145
- }
146
- const getCharStringLength = (str) => {
147
- let leng = 0;
148
- for (let i = 0; i < str.length; i += 1) {
149
- if (str.charCodeAt(i) > 127 || str.charCodeAt(i) == 94) {
150
- leng += 2;
151
- } else {
152
- leng += 1;
153
- }
154
- }
155
- return leng;
156
- };
157
- const deepClone = (source) => {
158
- if (!source || typeof source !== "object") {
159
- return source;
160
- }
161
- const targetObj = source.constructor === Array ? [] : {};
162
- Object.keys(source).forEach((keys) => {
163
- if (source[keys] && typeof source[keys] === "object") {
164
- targetObj[keys] = source[keys].constructor === Array ? [] : {};
165
- targetObj[keys] = deepClone(source[keys]);
166
- } else {
167
- targetObj[keys] = source[keys];
168
- }
169
- });
170
- return targetObj;
171
- };
172
- function debounce(func, wait, immediate) {
173
- let timeout, args, context, timestamp, result;
174
- const later = function() {
175
- const last = +/* @__PURE__ */ new Date() - timestamp;
176
- if (last < wait && last > 0) {
177
- timeout = setTimeout(later, wait - last);
178
- } else {
179
- timeout = null;
180
- if (!immediate) {
181
- result = func.apply(context, args);
182
- if (!timeout)
183
- context = args = null;
184
- }
185
- }
186
- };
187
- return function(...args2) {
188
- context = this;
189
- timestamp = +/* @__PURE__ */ new Date();
190
- const callNow = immediate && !timeout;
191
- if (!timeout)
192
- timeout = setTimeout(later, wait);
193
- if (callNow) {
194
- result = func.apply(context, args2);
195
- context = args2 = null;
196
- }
197
- return result;
198
- };
199
- }
200
- function createUniqueString(randomLength = 36) {
201
- return Number(Math.random().toString().substr(3, randomLength) + Date.now()).toString(36);
202
- }
203
- function getHalfYear(date = /* @__PURE__ */ new Date()) {
204
- const currMonth = date.getMonth() + 1;
205
- return Math.floor(currMonth % 6 == 0 ? currMonth / 6 : currMonth / 6 + 1);
206
- }
207
- function getQuarter(date = /* @__PURE__ */ new Date()) {
208
- const currMonth = date.getMonth() + 1;
209
- return Math.floor(currMonth % 3 == 0 ? currMonth / 3 : currMonth / 3 + 1);
210
- }
211
- function getNextYear(date = /* @__PURE__ */ new Date()) {
212
- return new Date(date.setFullYear(date.getFullYear() + 1));
213
- }
214
- function endOf(now = /* @__PURE__ */ new Date(), unit) {
215
- if (unit === "year") {
216
- return new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
217
- }
218
- if (unit === "month") {
219
- return new Date(new Date(now.getFullYear(), now.getMonth() + 1, 1).getTime() - 1);
220
- }
221
- if (unit === "week") {
222
- return new Date(now.getFullYear(), now.getMonth(), now.getDate() + (6 - now.getDay()), 23, 59, 59, 999);
223
- }
224
- return new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
225
- }
226
- function startOf(date, unit) {
227
- const newDate = new Date(date);
228
- if (unit === "year") {
229
- newDate.setMonth(0);
230
- newDate.setDate(1);
231
- newDate.setHours(0, 0, 0, 0);
232
- } else if (unit === "month") {
233
- newDate.setDate(1);
234
- newDate.setHours(0, 0, 0, 0);
235
- } else if (unit === "") {
236
- newDate.setHours(0, 0, 0, 0);
237
- } else if (unit === "hour") {
238
- newDate.setMinutes(0, 0, 0);
239
- } else if (unit === "minute") {
240
- newDate.setSeconds(0, 0);
241
- } else if (unit === "second") {
242
- newDate.setMilliseconds(0);
243
- }
244
- return newDate;
245
- }
246
- function formatDate(date, format) {
247
- const year = date.getFullYear();
248
- const month = date.getMonth() + 1;
249
- const day = date.getDate();
250
- const hours = date.getHours();
251
- const minutes = date.getMinutes();
252
- const seconds = date.getSeconds();
253
- format = format.replace("YYYY", year);
254
- format = format.replace("MM", String(month).padStart(2, "0"));
255
- format = format.replace("DD", String(day).padStart(2, "0"));
256
- format = format.replace("HH", String(hours).padStart(2, "0"));
257
- format = format.replace("mm", String(minutes).padStart(2, "0"));
258
- format = format.replace("ss", String(seconds).padStart(2, "0"));
259
- return format;
260
- }
261
- function HexToRgb(str) {
262
- const r = /^#?[0-9A-Fa-f]{6}$/;
263
- if (!r.test(str))
264
- return;
265
- str = str.replace("#", "");
266
- const hxs = str.match(/../g);
267
- for (let i = 0; i < 3; i++) {
268
- hxs[i] = parseInt(hxs[i], 16);
269
- }
270
- return hxs;
271
- }
272
- function RgbToHex(a, b, c) {
273
- const r = /^\d{1,3}$/;
274
- if (!r.test(String(a)) || !r.test(String(b)) || !r.test(String(c)))
275
- return;
276
- const hexs = [a.toString(16), b.toString(16), c.toString(16)];
277
- for (let i = 0; i < 3; i++)
278
- if (hexs[i].length === 1)
279
- hexs[i] = "0" + hexs[i];
280
- return "#" + hexs.join("");
281
- }
282
- function getDarkColor(color, level) {
283
- const r = /^#?[0-9A-Fa-f]{6}$/;
284
- if (!r.test(color))
285
- return color;
286
- const rgbc = HexToRgb(color);
287
- for (let i = 0; i < 3; i++) {
288
- rgbc[i] = Math.floor(rgbc[i] * (1 - level));
289
- }
290
- return RgbToHex(rgbc[0], rgbc[1], rgbc[2]);
291
- }
292
- function getLightColor(color, level) {
293
- const r = /^#?[0-9A-Fa-f]{6}$/;
294
- if (!r.test(color))
295
- return color;
296
- const rgbc = HexToRgb(color);
297
- for (let i = 0; i < 3; i++) {
298
- rgbc[i] = Math.floor((255 - rgbc[i]) * level + rgbc[i]);
299
- }
300
- return RgbToHex(rgbc[0], rgbc[1], rgbc[2]);
301
- }
302
- const toLine = (value) => {
303
- return value.replace(/(A-Z)g/, "-$1").toLocaleLowerCase();
304
- };
305
- function upperCamelCase(word) {
306
- const cleanedString = word.replace(/\W/g, "");
307
- const words = cleanedString.toLowerCase().split(/\B(?=[A-Z])/);
308
- const upperCamelCase2 = words.map((word2) => word2.charAt(0).toUpperCase() + word2.slice(1)).join("");
309
- return upperCamelCase2;
310
- }
311
- function isAutoFlexBasis(el) {
312
- const flexBasis = _getComputedStyle(el, "flexBasis");
313
- return flexBasis === "auto";
314
- }
315
- function _getComputedStyle(el, k) {
316
- const computedStyle = getComputedStyle(el);
317
- for (let i = 0; i <= presudos.length; i++) {
318
- const key = presudos[i] ? `${presudos[i]}${upperCamelCase(k)}` : k;
319
- if (computedStyle[key]) {
320
- return computedStyle[key];
321
- }
322
- }
323
- return void 0;
324
- }
325
- function getFlexDirection(el) {
326
- const flexDirection = _getComputedStyle(el, "flexDirection");
327
- const [direction, reverse] = flexDirection.split("-");
328
- return {
329
- vertical: direction === "column",
330
- reverse: !!reverse
331
- };
332
- }
333
- function getBlobURL(jsCode) {
334
- const blob = new Blob([jsCode], { type: "text/javascript" });
335
- const blobURL = URL.createObjectURL(blob);
336
- return blobURL;
337
- }
338
- function toBase64(str) {
339
- return btoa(unescape(encodeURIComponent(str)));
340
- }
341
- function generateID() {
342
- return Math.random().toString(36).slice(2, 12) + Date.now();
343
- }
344
- const copyFile = (sourcePath, targetPath) => {
345
- const isExist = (path2) => {
346
- if (!fs.existsSync(path2)) {
347
- fs.mkdirSync(path2);
348
- }
349
- };
350
- isExist(targetPath);
351
- const sourceFile = fs.readdirSync(sourcePath, { withFileTypes: true });
352
- sourceFile.forEach((file) => {
353
- const newSourcePath = path.resolve(sourcePath, file.name);
354
- const newTargetPath = path.resolve(targetPath, file.name);
355
- if (file.isDirectory()) {
356
- isExist(newTargetPath);
357
- copyFile(newSourcePath, newTargetPath);
358
- return;
359
- }
360
- fs.copyFileSync(newSourcePath, newTargetPath);
361
- });
362
- };
363
- const add = (arg1, arg2) => {
364
- let r1, r2, m;
365
- try {
366
- r1 = (arg1.toString().split(".")[1] || "").length;
367
- } catch (e) {
368
- r1 = 0;
369
- }
370
- try {
371
- r2 = (arg2.toString().split(".")[1] || "").length;
372
- } catch (e) {
373
- r2 = 0;
374
- }
375
- m = Math.pow(10, Math.max(r1, r2));
376
- return div(mul(arg1, m) + mul(arg2, m), m);
377
- };
378
- const mul = (arg1, arg2) => {
379
- let m = 0;
380
- const s1 = arg1.toString();
381
- const s2 = arg2.toString();
382
- m += (s1.split(".")[1] || "").length;
383
- m += (s2.split(".")[1] || "").length;
384
- return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
385
- };
386
- const div = (arg1, arg2) => {
387
- const t1 = (arg1.toString().split(".")[1] || "").length;
388
- const t2 = (arg2.toString().split(".")[1] || "").length;
389
- const r1 = Number(arg1.toString().replace(".", ""));
390
- const r2 = Number(arg2.toString().replace(".", ""));
391
- return r1 / r2 * Math.pow(10, t2 - t1);
392
- };
393
- function getLocalTime(i) {
394
- let time = i;
395
- if (typeof time === "string") {
396
- const arr = time.split(":");
397
- if (arr.length < 2) {
398
- return /* @__PURE__ */ new Date();
399
- }
400
- time = add(Number(arr[0]), div(Math.floor(Number(arr[1])), 60));
401
- }
402
- if (typeof time !== "number") {
403
- return /* @__PURE__ */ new Date();
404
- }
405
- const d = /* @__PURE__ */ new Date();
406
- const len = d.getTime();
407
- const offset = d.getTimezoneOffset() * 6e4;
408
- const utcTime = len + offset;
409
- return new Date(utcTime + 36e5 * time);
410
- }
411
- function toPascalCase(str) {
412
- const camelCase = str.replace(/-([a-z])/g, function(_match, letter) {
413
- return letter.toUpperCase();
414
- });
415
- return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
416
- }
417
- reactive({ lang: "" });
418
- const tool = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
419
- __proto__: null,
420
- ComponentConstantList,
421
- HexToRgb,
422
- RgbToHex,
423
- _getComputedStyle,
424
- closest,
425
- copyFile,
426
- createUniqueString,
427
- debounce,
428
- deepClone,
429
- endOf,
430
- formatDate,
431
- generateID,
432
- generateUUID,
433
- getBlobURL,
434
- getCharStringLength,
435
- getDarkColor,
436
- getDirs,
437
- getFlexDirection,
438
- getHalfYear,
439
- getJsComponentSampleConfig,
440
- getLightColor,
441
- getLocalTime,
442
- getNextYear,
443
- getQuarter,
444
- getResolver,
445
- getTranspileDependencies,
446
- getTsComponentSampleConfig,
447
- isAsyncFunc,
448
- isAutoFlexBasis,
449
- kebabCase,
450
- resolveDebuger,
451
- startOf,
452
- toBase64,
453
- toLine,
454
- toPascalCase,
455
- upperCamelCase
456
- }, Symbol.toStringTag, { value: "Module" }));
1
+ export * from "@94ai/common-utils/lib/tool";
2
+ import * as tool from "@94ai/common-utils/lib/tool";
457
3
  export {
458
- ComponentConstantList,
459
- HexToRgb,
460
- RgbToHex,
461
- _getComputedStyle,
462
- closest,
463
- copyFile,
464
- createUniqueString,
465
- debounce,
466
- deepClone,
467
- tool as default,
468
- endOf,
469
- formatDate,
470
- generateID,
471
- generateUUID,
472
- getBlobURL,
473
- getCharStringLength,
474
- getDarkColor,
475
- getDirs,
476
- getFlexDirection,
477
- getHalfYear,
478
- getJsComponentSampleConfig,
479
- getLightColor,
480
- getLocalTime,
481
- getNextYear,
482
- getQuarter,
483
- getResolver,
484
- getTranspileDependencies,
485
- getTsComponentSampleConfig,
486
- isAsyncFunc,
487
- isAutoFlexBasis,
488
- kebabCase,
489
- resolveDebuger,
490
- startOf,
491
- toBase64,
492
- toLine,
493
- toPascalCase,
494
- upperCamelCase
4
+ tool as default
495
5
  };
package/lib/index.d.ts CHANGED
@@ -1,52 +1,52 @@
1
- import { PluginObject } from 'vue-demi';
2
- import NfButtonDemo from '@94ai/nf-button-demo';
3
- import NfToastDemo from '@94ai/nf-toast-demo';
4
- import NfMenu from '@94ai/nf-menu';
5
- import NfInfiniteMenu from '@94ai/nf-infinite-menu';
6
- import NfDoubleTime from '@94ai/nf-double-time';
7
- import NfEmpty from '@94ai/nf-empty';
8
- import NfImportTemplate from '@94ai/nf-import-template';
9
- import NfRadioGroup from '@94ai/nf-radio-group';
10
- import NfAlert from '@94ai/nf-alert';
11
- import NfVirtualSelect from '@94ai/nf-virtual-select';
12
- import NfTag from '@94ai/nf-tag';
13
- import NfAction from '@94ai/nf-action';
14
- import NfIndicatorPlane from '@94ai/nf-indicator-plane';
15
- import NfQuarterPicker from '@94ai/nf-quarter-picker';
16
- import NfDoubleQuarter from '@94ai/nf-double-quarter';
17
- import NfDoubleHalfYear from '@94ai/nf-double-half-year';
18
- import NfHalfYearPicker from '@94ai/nf-half-year-picker';
19
- import NfDoubleWeek from '@94ai/nf-double-week';
20
- import NfDoubleYear from '@94ai/nf-double-year';
21
- import NfDatePicker from '@94ai/nf-date-picker';
22
- import NfFormItem from '@94ai/nf-form-item';
23
- import NfForm from '@94ai/nf-form';
24
- import NfTable from '@94ai/nf-table';
25
- import NfSearchForm from '@94ai/nf-search-form';
26
- import NfDrawer from '@94ai/nf-drawer';
27
- import NfMessage, { Message } from '@94ai/nf-message';
28
- import NfNotification, { Notification } from '@94ai/nf-notification';
29
- import NfConfirm, { Confirm } from '@94ai/nf-confirm';
30
- import NfTextOverflow from '@94ai/nf-text-overflow';
31
- import NfResizablePanels from '@94ai/nf-resizable-panels';
32
- import NfAudio from '@94ai/nf-audio';
33
- import NfButton from '@94ai/nf-button';
34
- import NfIconfontIcon from '@94ai/nf-iconfont-icon';
35
- import NfSvgIcon from '@94ai/nf-svg-icon';
36
- import NfKeywords from '@94ai/nf-keywords';
37
- import NfConditions from '@94ai/nf-conditions';
38
- import NfVariableSelect from '@94ai/nf-variable-select';
39
- import NfRules from '@94ai/nf-rules';
40
- import NfLazySelect from '@94ai/nf-lazy-select';
41
- import NfPopupLazySelect from '@94ai/nf-popup-lazy-select';
42
- import NfTransferSelect from '@94ai/nf-transfer-select';
43
- import NfAddressSelect from '@94ai/nf-address-select';
44
- import NfSoftphone, { softphoneManager, SoftphoneManager } from '@94ai/nf-softphone';
45
- import NfMicrophone from '@94ai/nf-microphone';
46
- import NfTimezonePicker from '@94ai/nf-timezone-picker';
47
- declare const _default: import("vue/types/v3-component-public-instance").ComponentPublicInstanceConstructor<import("vue/types/v3-component-public-instance").Vue3Instance<{}, Readonly<import("vue-demi").ExtractPropTypes<{}>>, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}, {}, true, import("vue/types/v3-component-options").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue-demi").ExtractPropTypes<{}>>> & import("vue-demi").ShallowUnwrapRef<{}> & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & import("vue-demi").ComponentCustomProperties & Readonly<import("vue-demi").ExtractPropTypes<{}>>, any, any, any, import("vue-demi").ComponentComputedOptions, import("vue-demi").ComponentMethodOptions> & import("vue/types/v3-component-options").ComponentOptionsBase<Readonly<import("vue-demi").ExtractPropTypes<{}>>, unknown, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, {}> & {
48
- props: {};
49
- } & PluginObject<undefined>;
50
- export default _default;
51
- export { NfButtonDemo, NfToastDemo, NfMenu, NfInfiniteMenu, NfDoubleTime, NfEmpty, NfImportTemplate, NfRadioGroup, NfAlert, NfVirtualSelect, NfTag, NfAction, NfIndicatorPlane, NfQuarterPicker, NfDoubleQuarter, NfDoubleHalfYear, NfHalfYearPicker, NfDoubleWeek, NfDoubleYear, NfDatePicker, NfFormItem, NfForm, NfTable, NfSearchForm, NfDrawer, NfMessage, Message, NfNotification, Notification, NfConfirm, Confirm, NfTextOverflow, NfResizablePanels, NfAudio, NfButton, NfIconfontIcon, NfSvgIcon, NfKeywords, NfConditions, NfVariableSelect, NfRules, NfLazySelect, NfPopupLazySelect, NfTransferSelect, NfAddressSelect, NfSoftphone, NfMicrophone, softphoneManager, SoftphoneManager, NfTimezonePicker };
52
- export { locale } from '@94ai/common-utils';
1
+ import { PluginObject } from 'vue-demi';
2
+ import NfButtonDemo from '@94ai/nf-button-demo';
3
+ import NfToastDemo from '@94ai/nf-toast-demo';
4
+ import NfMenu from '@94ai/nf-menu';
5
+ import NfInfiniteMenu from '@94ai/nf-infinite-menu';
6
+ import NfDoubleTime from '@94ai/nf-double-time';
7
+ import NfEmpty from '@94ai/nf-empty';
8
+ import NfImportTemplate from '@94ai/nf-import-template';
9
+ import NfRadioGroup from '@94ai/nf-radio-group';
10
+ import NfAlert from '@94ai/nf-alert';
11
+ import NfVirtualSelect from '@94ai/nf-virtual-select';
12
+ import NfTag from '@94ai/nf-tag';
13
+ import NfAction from '@94ai/nf-action';
14
+ import NfIndicatorPlane from '@94ai/nf-indicator-plane';
15
+ import NfQuarterPicker from '@94ai/nf-quarter-picker';
16
+ import NfDoubleQuarter from '@94ai/nf-double-quarter';
17
+ import NfDoubleHalfYear from '@94ai/nf-double-half-year';
18
+ import NfHalfYearPicker from '@94ai/nf-half-year-picker';
19
+ import NfDoubleWeek from '@94ai/nf-double-week';
20
+ import NfDoubleYear from '@94ai/nf-double-year';
21
+ import NfDatePicker from '@94ai/nf-date-picker';
22
+ import NfFormItem from '@94ai/nf-form-item';
23
+ import NfForm from '@94ai/nf-form';
24
+ import NfTable from '@94ai/nf-table';
25
+ import NfSearchForm from '@94ai/nf-search-form';
26
+ import NfDrawer from '@94ai/nf-drawer';
27
+ import NfMessage, { Message } from '@94ai/nf-message';
28
+ import NfNotification, { Notification } from '@94ai/nf-notification';
29
+ import NfConfirm, { Confirm } from '@94ai/nf-confirm';
30
+ import NfTextOverflow from '@94ai/nf-text-overflow';
31
+ import NfResizablePanels from '@94ai/nf-resizable-panels';
32
+ import NfAudio from '@94ai/nf-audio';
33
+ import NfButton from '@94ai/nf-button';
34
+ import NfIconfontIcon from '@94ai/nf-iconfont-icon';
35
+ import NfSvgIcon from '@94ai/nf-svg-icon';
36
+ import NfKeywords from '@94ai/nf-keywords';
37
+ import NfConditions from '@94ai/nf-conditions';
38
+ import NfVariableSelect from '@94ai/nf-variable-select';
39
+ import NfRules from '@94ai/nf-rules';
40
+ import NfLazySelect from '@94ai/nf-lazy-select';
41
+ import NfPopupLazySelect from '@94ai/nf-popup-lazy-select';
42
+ import NfTransferSelect from '@94ai/nf-transfer-select';
43
+ import NfAddressSelect from '@94ai/nf-address-select';
44
+ import NfSoftphone, { softphoneManager, SoftphoneManager } from '@94ai/nf-softphone';
45
+ import NfMicrophone from '@94ai/nf-microphone';
46
+ import NfTimezonePicker from '@94ai/nf-timezone-picker';
47
+ declare const _default: import("vue/types/v3-component-public-instance").ComponentPublicInstanceConstructor<import("vue/types/v3-component-public-instance").Vue3Instance<{}, Readonly<import("vue-demi").ExtractPropTypes<{}>>, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}, {}, true, import("vue/types/v3-component-options").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue-demi").ExtractPropTypes<{}>>> & import("vue-demi").ShallowUnwrapRef<{}> & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & import("vue-demi").ComponentCustomProperties & Readonly<import("vue-demi").ExtractPropTypes<{}>>, any, any, any, import("vue-demi").ComponentComputedOptions, import("vue-demi").ComponentMethodOptions> & import("vue/types/v3-component-options").ComponentOptionsBase<Readonly<import("vue-demi").ExtractPropTypes<{}>>, unknown, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, {}> & {
48
+ props: {};
49
+ } & PluginObject<undefined>;
50
+ export default _default;
51
+ export { NfButtonDemo, NfToastDemo, NfMenu, NfInfiniteMenu, NfDoubleTime, NfEmpty, NfImportTemplate, NfRadioGroup, NfAlert, NfVirtualSelect, NfTag, NfAction, NfIndicatorPlane, NfQuarterPicker, NfDoubleQuarter, NfDoubleHalfYear, NfHalfYearPicker, NfDoubleWeek, NfDoubleYear, NfDatePicker, NfFormItem, NfForm, NfTable, NfSearchForm, NfDrawer, NfMessage, Message, NfNotification, Notification, NfConfirm, Confirm, NfTextOverflow, NfResizablePanels, NfAudio, NfButton, NfIconfontIcon, NfSvgIcon, NfKeywords, NfConditions, NfVariableSelect, NfRules, NfLazySelect, NfPopupLazySelect, NfTransferSelect, NfAddressSelect, NfSoftphone, NfMicrophone, softphoneManager, SoftphoneManager, NfTimezonePicker };
52
+ export { locale } from '@94ai/common-utils';
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+
package/lib/tool.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * as default from '@94ai/common-utils/lib/tool';
2
- export * from '@94ai/common-utils/lib/tool';
1
+ export * as default from '@94ai/common-utils/lib/tool';
2
+ export * from '@94ai/common-utils/lib/tool';
package/lib/util.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * as default from '@94ai/common-utils';
2
- export * from '@94ai/common-utils';
1
+ export * as default from '@94ai/common-utils';
2
+ export * from '@94ai/common-utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/common-ui",
3
- "version": "9.0.0",
3
+ "version": "10.0.0",
4
4
  "description": "94智能公共组件库",
5
5
  "keywords": [
6
6
  "组件库"
@@ -16,55 +16,55 @@
16
16
  "url": "http://gitlab.94ai.pro/zoujiahe/common-ui.git"
17
17
  },
18
18
  "dependencies": {
19
- "@94ai/common-constants": "^9.0.0",
20
- "@94ai/common-utils": "^9.0.0",
21
- "@94ai/nf-action": "^9.0.0",
22
- "@94ai/nf-address-select": "^9.0.0",
23
- "@94ai/nf-alert": "^9.0.0",
24
- "@94ai/nf-audio": "^9.0.0",
25
- "@94ai/nf-button": "^9.0.0",
26
- "@94ai/nf-button-demo": "^9.0.0",
27
- "@94ai/nf-conditions": "^9.0.0",
28
- "@94ai/nf-confirm": "^9.0.0",
29
- "@94ai/nf-date-picker": "^9.0.0",
30
- "@94ai/nf-double-half-year": "^9.0.0",
31
- "@94ai/nf-double-quarter": "^9.0.0",
32
- "@94ai/nf-double-time": "^9.0.0",
33
- "@94ai/nf-double-week": "^9.0.0",
34
- "@94ai/nf-double-year": "^9.0.0",
35
- "@94ai/nf-drawer": "^9.0.0",
36
- "@94ai/nf-empty": "^9.0.0",
37
- "@94ai/nf-form": "^9.0.0",
38
- "@94ai/nf-form-item": "^9.0.0",
39
- "@94ai/nf-half-year-picker": "^9.0.0",
40
- "@94ai/nf-iconfont-icon": "^9.0.0",
41
- "@94ai/nf-import-template": "^9.0.0",
42
- "@94ai/nf-indicator-plane": "^9.0.0",
43
- "@94ai/nf-infinite-menu": "^9.0.0",
44
- "@94ai/nf-input": "^9.0.0",
45
- "@94ai/nf-keywords": "^9.0.0",
46
- "@94ai/nf-lazy-select": "^9.0.0",
47
- "@94ai/nf-menu": "^9.0.0",
48
- "@94ai/nf-message": "^9.0.0",
49
- "@94ai/nf-microphone": "^9.0.0",
50
- "@94ai/nf-notification": "^9.0.0",
51
- "@94ai/nf-popup-lazy-select": "^9.0.0",
52
- "@94ai/nf-quarter-picker": "^9.0.0",
53
- "@94ai/nf-radio-group": "^9.0.0",
54
- "@94ai/nf-resizable-panels": "^9.0.0",
55
- "@94ai/nf-rules": "^9.0.0",
56
- "@94ai/nf-search-form": "^9.0.0",
57
- "@94ai/nf-softphone": "^9.0.0",
58
- "@94ai/nf-svg-icon": "^9.0.0",
59
- "@94ai/nf-table": "^9.0.0",
60
- "@94ai/nf-tag": "^9.0.0",
61
- "@94ai/nf-text-overflow": "^9.0.0",
62
- "@94ai/nf-theme-chalk": "^9.0.0",
63
- "@94ai/nf-timezone-picker": "^9.0.0",
64
- "@94ai/nf-toast-demo": "^9.0.0",
65
- "@94ai/nf-transfer-select": "^9.0.0",
66
- "@94ai/nf-variable-select": "^9.0.0",
67
- "@94ai/nf-virtual-select": "^9.0.0",
19
+ "@94ai/common-constants": "^10.0.0",
20
+ "@94ai/common-utils": "^10.0.0",
21
+ "@94ai/nf-action": "^10.0.0",
22
+ "@94ai/nf-address-select": "^10.0.0",
23
+ "@94ai/nf-alert": "^10.0.0",
24
+ "@94ai/nf-audio": "^10.0.0",
25
+ "@94ai/nf-button": "^10.0.0",
26
+ "@94ai/nf-button-demo": "^10.0.0",
27
+ "@94ai/nf-conditions": "^10.0.0",
28
+ "@94ai/nf-confirm": "^10.0.0",
29
+ "@94ai/nf-date-picker": "^10.0.0",
30
+ "@94ai/nf-double-half-year": "^10.0.0",
31
+ "@94ai/nf-double-quarter": "^10.0.0",
32
+ "@94ai/nf-double-time": "^10.0.0",
33
+ "@94ai/nf-double-week": "^10.0.0",
34
+ "@94ai/nf-double-year": "^10.0.0",
35
+ "@94ai/nf-drawer": "^10.0.0",
36
+ "@94ai/nf-empty": "^10.0.0",
37
+ "@94ai/nf-form": "^10.0.0",
38
+ "@94ai/nf-form-item": "^10.0.0",
39
+ "@94ai/nf-half-year-picker": "^10.0.0",
40
+ "@94ai/nf-iconfont-icon": "^10.0.0",
41
+ "@94ai/nf-import-template": "^10.0.0",
42
+ "@94ai/nf-indicator-plane": "^10.0.0",
43
+ "@94ai/nf-infinite-menu": "^10.0.0",
44
+ "@94ai/nf-input": "^10.0.0",
45
+ "@94ai/nf-keywords": "^10.0.0",
46
+ "@94ai/nf-lazy-select": "^10.0.0",
47
+ "@94ai/nf-menu": "^10.0.0",
48
+ "@94ai/nf-message": "^10.0.0",
49
+ "@94ai/nf-microphone": "^10.0.0",
50
+ "@94ai/nf-notification": "^10.0.0",
51
+ "@94ai/nf-popup-lazy-select": "^10.0.0",
52
+ "@94ai/nf-quarter-picker": "^10.0.0",
53
+ "@94ai/nf-radio-group": "^10.0.0",
54
+ "@94ai/nf-resizable-panels": "^10.0.0",
55
+ "@94ai/nf-rules": "^10.0.0",
56
+ "@94ai/nf-search-form": "^10.0.0",
57
+ "@94ai/nf-softphone": "^10.0.0",
58
+ "@94ai/nf-svg-icon": "^10.0.0",
59
+ "@94ai/nf-table": "^10.0.0",
60
+ "@94ai/nf-tag": "^10.0.0",
61
+ "@94ai/nf-text-overflow": "^10.0.0",
62
+ "@94ai/nf-theme-chalk": "^10.0.0",
63
+ "@94ai/nf-timezone-picker": "^10.0.0",
64
+ "@94ai/nf-toast-demo": "^10.0.0",
65
+ "@94ai/nf-transfer-select": "^10.0.0",
66
+ "@94ai/nf-variable-select": "^10.0.0",
67
+ "@94ai/nf-virtual-select": "^10.0.0",
68
68
  "lodash-es": "^4.17.21",
69
69
  "vue-demi": "^0.14.5"
70
70
  },
@@ -75,8 +75,8 @@
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@vue/composition-api": "^1.0.0-rc.1",
78
- "element-ui": ">=2.13.2",
79
- "vue": "^2.0.0 || >=3.0.0"
78
+ "vue": "^2.0.0 || >=3.0.0",
79
+ "element-ui": ">=2.13.2"
80
80
  },
81
81
  "types": "lib/index.d.ts",
82
82
  "main": "lib/common-ui.cjs.js",
@@ -97,6 +97,5 @@
97
97
  "require": "./lib/common-ui.tool.cjs.cjs",
98
98
  "import": "./lib/common-ui.tool.esm-bundler.mjs"
99
99
  }
100
- },
101
- "gitHead": "afe3016f0e42dfb7fedf6cbbe400ec08bf4b8662"
100
+ }
102
101
  }