vue-devui 1.6.32 → 1.6.34

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/input/index.es.js CHANGED
@@ -1155,10 +1155,10 @@ var lodash = { exports: {} };
1155
1155
  }();
1156
1156
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
1157
1157
  var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
1158
- var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
1158
+ var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
1159
1159
  var metaMap = WeakMap && new WeakMap();
1160
1160
  var realNames = {};
1161
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
1161
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
1162
1162
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
1163
1163
  function lodash2(value) {
1164
1164
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
@@ -2872,8 +2872,8 @@ var lodash = { exports: {} };
2872
2872
  return func(number4);
2873
2873
  };
2874
2874
  }
2875
- var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) {
2876
- return new Set2(values2);
2875
+ var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
2876
+ return new Set(values2);
2877
2877
  };
2878
2878
  function createToPairs(keysFunc) {
2879
2879
  return function(object4) {
@@ -3172,7 +3172,7 @@ var lodash = { exports: {} };
3172
3172
  return result2;
3173
3173
  };
3174
3174
  var getTag = baseGetTag;
3175
- if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
3175
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
3176
3176
  getTag = function(value) {
3177
3177
  var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
3178
3178
  if (ctorString) {
@@ -8243,23 +8243,6 @@ function useInputFunction(input2) {
8243
8243
  return { select, focus, blur };
8244
8244
  }
8245
8245
  var input = "";
8246
- function deepAssign(...objects) {
8247
- const isObject2 = (obj) => obj && typeof obj === "object";
8248
- return objects.reduce((prev, from) => {
8249
- Object.keys(from).forEach((key) => {
8250
- const pVal = prev[key];
8251
- const oVal = from[key];
8252
- if (Array.isArray(pVal) && Array.isArray(oVal)) {
8253
- prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
8254
- } else if (isObject2(pVal) && isObject2(oVal)) {
8255
- prev[key] = deepAssign(pVal, oVal);
8256
- } else {
8257
- prev[key] = oVal;
8258
- }
8259
- });
8260
- return prev;
8261
- }, {});
8262
- }
8263
8246
  var zhCN = {
8264
8247
  pagination: {
8265
8248
  totalItemText: "\u6240\u6709\u6761\u76EE",
@@ -8378,23 +8361,146 @@ var zhCN = {
8378
8361
  placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
8379
8362
  }
8380
8363
  };
8364
+ var enUS = {
8365
+ pagination: {
8366
+ totalItemText: "Total",
8367
+ goToText: "Go to"
8368
+ },
8369
+ accordion: {
8370
+ loading: "loading",
8371
+ noData: "No Data"
8372
+ },
8373
+ autoCompleteDropdown: {
8374
+ latestInput: "Latest input"
8375
+ },
8376
+ cascaderList: {
8377
+ noData: "No data"
8378
+ },
8379
+ colorPicker: {
8380
+ foundationPanel: "Foundation panel",
8381
+ advancedPanel: "Advanced panel"
8382
+ },
8383
+ datePickerPro: {
8384
+ ok: "OK",
8385
+ placeholder: "select date",
8386
+ month1: "Jan",
8387
+ month2: "Feb",
8388
+ month3: "Mar",
8389
+ month4: "Apr",
8390
+ month5: "May",
8391
+ month6: "June",
8392
+ month7: "July",
8393
+ month8: "Aug",
8394
+ month9: "Sep",
8395
+ month10: "Oct",
8396
+ month11: "Nov",
8397
+ month12: "Dec",
8398
+ year: "\u5E74",
8399
+ startPlaceholder: "select start date",
8400
+ endPlaceholder: "select end date",
8401
+ getWeekDays() {
8402
+ return ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"];
8403
+ },
8404
+ getTimeArr() {
8405
+ return ["Hr", "Min", "Sec"];
8406
+ },
8407
+ getYearMonthStr(year, month) {
8408
+ return `${year} - ${month}`;
8409
+ }
8410
+ },
8411
+ editableSelect: {
8412
+ noRelatedRecords: "No related records found",
8413
+ noData: "No data"
8414
+ },
8415
+ input: {
8416
+ placeholder: "Please enter"
8417
+ },
8418
+ splitterBar: {
8419
+ collapse: "Collapse",
8420
+ expand: "Expand"
8421
+ },
8422
+ stepsGuide: {
8423
+ previous: "Previous",
8424
+ continue: "Continue",
8425
+ ok: "OK"
8426
+ },
8427
+ table: {
8428
+ selectAll: "Select all",
8429
+ ok: "OK"
8430
+ },
8431
+ dataGrid: {
8432
+ selectAll: "Select all",
8433
+ ok: "OK"
8434
+ },
8435
+ timePopup: {
8436
+ ok: "OK"
8437
+ },
8438
+ transfer: {
8439
+ unit: "",
8440
+ panelUnit: "",
8441
+ headerUnit: "",
8442
+ noData: "No Data",
8443
+ placeholder: "Please enter keywords"
8444
+ },
8445
+ tree: {
8446
+ loading: "Loading",
8447
+ newNode: "New node",
8448
+ selectPlaceholder: "Please select"
8449
+ },
8450
+ upload: {
8451
+ placeholder: "select file",
8452
+ getExistSameNameFilesMsg(sameNames) {
8453
+ return `Duplicate files exist : "${sameNames}" `;
8454
+ },
8455
+ getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
8456
+ return `Maximum file size (MB): ${maximalSize}. The selected files exceed the maximum value`;
8457
+ },
8458
+ getBeyondMaximalFileSizeMsg(filename, maximalSize) {
8459
+ return `Maximum file size (MB): ${maximalSize}. Files whose size exceeds the maximum value: ${filename}`;
8460
+ },
8461
+ getNotAllowedFileTypeMsg(filename, scope) {
8462
+ return `Files with unsupported types: ${filename}. Supported file types: ${scope}`;
8463
+ }
8464
+ },
8465
+ search: {
8466
+ placeholder: "Enter a keyword"
8467
+ },
8468
+ select: {
8469
+ placeholder: "Please select",
8470
+ noDataText: "No data",
8471
+ noMatchText: "No related records found",
8472
+ loadingText: "Loading..."
8473
+ },
8474
+ tagInput: {
8475
+ maxTagsText: "Maximum number reached: "
8476
+ },
8477
+ timeSelect: {
8478
+ placeholder: "Please select time"
8479
+ }
8480
+ };
8381
8481
  const lang = ref("zh-CN");
8482
+ const nowApp = ref();
8382
8483
  let langMessages = reactive({
8383
- [lang.value]: zhCN
8484
+ ["zh-CN"]: zhCN,
8485
+ ["en-US"]: enUS
8384
8486
  });
8385
8487
  const Locale = {
8386
- messages() {
8387
- return langMessages[lang.value];
8488
+ messages(language = lang.value) {
8489
+ return langMessages[language];
8388
8490
  },
8389
8491
  lang() {
8390
8492
  return lang.value;
8391
8493
  },
8392
- use(newLang, newMessages2) {
8494
+ use(newLang) {
8495
+ const app = nowApp.value;
8393
8496
  lang.value = newLang;
8394
- this.add({ [newLang]: newMessages2 });
8497
+ app.config.globalProperties.langMessages = Locale.messages();
8395
8498
  },
8396
- add(newMessages2 = {}) {
8397
- langMessages = deepAssign(langMessages, newMessages2);
8499
+ add(newMessages2) {
8500
+ langMessages = {
8501
+ ...langMessages,
8502
+ ...newMessages2
8503
+ };
8398
8504
  }
8399
8505
  };
8400
8506
  const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
@@ -8410,8 +8516,7 @@ function get(object4, path) {
8410
8516
  function createI18nTranslate(name, app, newPrefix) {
8411
8517
  const prefix = newPrefix || camelize(name) + ".";
8412
8518
  return (path) => {
8413
- var _a;
8414
- const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
8519
+ const messages2 = (app == null ? void 0 : app.appContext.config.globalProperties.langMessages) || Locale.messages();
8415
8520
  const message = get(messages2, prefix + path) || get(messages2, path);
8416
8521
  return message;
8417
8522
  };