disguise-ui 0.2.9 → 0.3.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,4 +1,4 @@
1
- import { t as e } from "./user-avatar-info-SD6OE607.js";
1
+ import { t as e } from "./user-avatar-info-BruEfYy4.js";
2
2
  import { computed as t, createBlock as n, defineComponent as r, openBlock as i } from "vue";
3
3
  // src/components/table-entity/cells/avatar-cell.vue
4
4
  var a = /* @__PURE__ */ r({
@@ -1,14 +1,14 @@
1
1
  import { i as e, r as t, t as n } from "./picture-cell-BhKqFZUx.js";
2
2
  import { t as r } from "./modal-CHOpDVLd.js";
3
3
  import { d as i, i as a, l as o, n as s, r as c, t as l, u } from "./context-DqlD6qDJ.js";
4
- import { t as d } from "./i18n-DejVnxC8.js";
4
+ import { t as d } from "./i18n-_x6RCAst.js";
5
5
  import { t as f } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
6
6
  import { t as p } from "./use-image-url-Bs5WMZ6L.js";
7
- import { t as m } from "./user-avatar-info-SD6OE607.js";
7
+ import { t as m } from "./user-avatar-info-BruEfYy4.js";
8
8
  import { t as h } from "./use-file-type-rNstoxXw.js";
9
- import { t as g } from "./file-upload-1BQ7D3G-.js";
10
- import { r as _ } from "./use-multiple-file-upload-BYN5Ddr9.js";
11
- import { t as v } from "./picture-upload-ByEVub_1.js";
9
+ import { t as g } from "./file-upload-D7N0tsLF.js";
10
+ import { r as _ } from "./use-multiple-file-upload-Cv2dfA07.js";
11
+ import { t as v } from "./picture-upload-BrrTtaCc.js";
12
12
  import { Fragment as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createSlots as T, createTextVNode as E, createVNode as D, defineAsyncComponent as O, defineComponent as k, guardReactiveProps as A, h as j, isRef as M, mergeModels as N, mergeProps as P, nextTick as ee, normalizeClass as F, normalizeProps as I, normalizeStyle as L, onUnmounted as te, openBlock as R, reactive as ne, ref as z, renderList as B, renderSlot as V, resolveComponent as H, resolveDirective as re, resolveDynamicComponent as U, shallowReactive as ie, toDisplayString as W, toHandlers as ae, toValue as G, unref as K, useModel as oe, useSlots as se, vModelSelect as ce, vModelText as le, watch as q, withCtx as J, withDirectives as ue, withKeys as de, withModifiers as fe } from "vue";
13
13
  import { ElButton as Y, ElCard as X, ElCascader as pe, ElCheckbox as me, ElCheckboxGroup as he, ElCol as ge, ElDatePicker as _e, ElDrawer as ve, ElDropdown as ye, ElDropdownItem as be, ElDropdownMenu as xe, ElForm as Se, ElFormItem as Ce, ElIcon as Z, ElImageViewer as we, ElInput as Te, ElInputNumber as Ee, ElMessage as Q, ElMessageBox as De, ElOption as $, ElPagination as Oe, ElPopover as ke, ElProgress as Ae, ElRadio as je, ElRadioGroup as Me, ElRow as Ne, ElSelect as Pe, ElSelectV2 as Fe, ElSwitch as Ie, ElTabPane as Le, ElTable as Re, ElTableColumn as ze, ElTableV2 as Be, ElTabs as Ve, ElTooltip as He, ElUpload as Ue, TableV2FixedDir as We } from "element-plus";
14
14
  import Ge from "dayjs";
@@ -1538,7 +1538,7 @@ function _i(e, t = "name") {
1538
1538
  }).filter(Boolean);
1539
1539
  }
1540
1540
  // src/components/table-entity/utils/column-slots.ts
1541
- var vi = O(() => Promise.resolve().then(() => Xr)), yi = O(() => import("./picture-cell-BhKqFZUx.js").then((e) => e.n)), bi = O(() => import("./avatar-cell-BPzpEjQT.js")), { resolveImageUrl: xi } = p();
1541
+ var vi = O(() => Promise.resolve().then(() => Xr)), yi = O(() => import("./picture-cell-BhKqFZUx.js").then((e) => e.n)), bi = O(() => import("./avatar-cell-CSanGG5Y.js")), { resolveImageUrl: xi } = p();
1542
1542
  function Si(e) {
1543
1543
  return e == null || e === "" ? [] : (Array.isArray(e) ? e : typeof e == "string" ? e.split(",") : [e]).map((e) => e && typeof e == "object" ? e.fileUrl ?? e.url : e).map((e) => xi(e)).filter(Boolean);
1544
1544
  }
@@ -3880,7 +3880,7 @@ var Fo = {
3880
3880
  },
3881
3881
  emits: ["update:modelValue"],
3882
3882
  setup(e, { emit: t }) {
3883
- let r = e, i = t, a = O(() => Promise.resolve().then(() => $i)), o = O(() => import("./file-upload-CBlPpZss.js")), s = O(() => import("./picture-upload-CDuDFsAh.js")), c = O(() => Promise.resolve().then(() => So)), l = b(() => r.context ?? {
3883
+ let r = e, i = t, a = O(() => Promise.resolve().then(() => $i)), o = O(() => import("./file-upload-ClPojHbE.js")), s = O(() => import("./picture-upload-VK7YOAr4.js")), c = O(() => Promise.resolve().then(() => So)), l = b(() => r.context ?? {
3884
3884
  mode: "create",
3885
3885
  values: {}
3886
3886
  }), u = Po(() => r.field, l), d = b(() => ({
@@ -4255,86 +4255,90 @@ var Fo = {
4255
4255
  }),
4256
4256
  emits: ["update:modelValue"],
4257
4257
  setup(e, { expose: t }) {
4258
- let n = e, r = oe(e, "modelValue"), i = z(), a = b(() => n.schema), o = b(() => ({
4258
+ let n = e, r = oe(e, "modelValue"), i = z(), a = {
4259
+ behavior: "smooth",
4260
+ block: "center"
4261
+ }, o = b(() => n.schema), s = b(() => ({
4259
4262
  mode: n.mode,
4260
4263
  values: r.value ?? {}
4261
- })), s = b(() => a.value.filter((e) => ba(e, o.value) ? !1 : !_a(e) || c(e).length > 0));
4262
- function c(e) {
4263
- return e.children.filter((e) => !ba(e, o.value));
4264
+ })), c = b(() => o.value.filter((e) => ba(e, s.value) ? !1 : !_a(e) || l(e).length > 0));
4265
+ function l(e) {
4266
+ return e.children.filter((e) => !ba(e, s.value));
4264
4267
  }
4265
- let l = b(() => s.value.flatMap((e) => _a(e) ? c(e) : [e])), u = b(() => Math.floor(24 / n.columns)), d = b(() => ({
4268
+ let u = b(() => c.value.flatMap((e) => _a(e) ? l(e) : [e])), d = b(() => Math.floor(24 / n.columns)), f = b(() => ({
4266
4269
  [`schema-form--label-align-${n.labelAlign}`]: !!n.labelAlign,
4267
4270
  "schema-form--underline": n.underline
4268
- })), f = b(() => n.mode === "view" ? "left" : n.labelPosition);
4269
- function p(e) {
4271
+ })), p = b(() => n.mode === "view" ? "left" : n.labelPosition);
4272
+ function m(e) {
4270
4273
  return typeof e == "number" ? `${e}px` : e;
4271
4274
  }
4272
- let m = b(() => ({
4273
- "--schema-form-group-gap": p(n.groupGap),
4274
- "--schema-form-item-gap": p(n.itemGap),
4275
- "--schema-form-label-gap": p(n.labelGap)
4275
+ let h = b(() => ({
4276
+ "--schema-form-group-gap": m(n.groupGap),
4277
+ "--schema-form-item-gap": m(n.itemGap),
4278
+ "--schema-form-label-gap": m(n.labelGap)
4276
4279
  }));
4277
- function h(e, t) {
4280
+ function g(e, t) {
4278
4281
  return _a(e) ? `group-${t}-${e.label}` : e.prop;
4279
4282
  }
4280
- function g(e, t = !1) {
4281
- return t ? { gridColumn: e.newRow ? "1 / -1" : `span ${e.span ?? u.value}` } : { flex: `${e.span ?? 1} 1 0` };
4282
- }
4283
- function _(e) {
4284
- return c(e).some((e) => ya(e.required, o.value));
4283
+ function _(e, t = !1) {
4284
+ return t ? { gridColumn: e.newRow ? "1 / -1" : `span ${e.span ?? d.value}` } : { flex: `${e.span ?? 1} 1 0` };
4285
4285
  }
4286
4286
  function v(e) {
4287
- let t = s.value.filter((e) => _a(e) && !!e.anchor);
4287
+ return l(e).some((e) => ya(e.required, s.value));
4288
+ }
4289
+ function T(e) {
4290
+ let t = c.value.filter((e) => _a(e) && !!e.anchor);
4288
4291
  return String(t.indexOf(e) + 1).padStart(2, "0");
4289
4292
  }
4290
- function T(e, t) {
4291
- return n.disabled || ya(t?.disabled, o.value) || ya(e.disabled, o.value);
4293
+ function E(e, t) {
4294
+ return n.disabled || ya(t?.disabled, s.value) || ya(e.disabled, s.value);
4292
4295
  }
4293
- function E(e) {
4296
+ function O(e) {
4294
4297
  return n.mode === "view" || !!e.readonly;
4295
4298
  }
4296
- function O(e, t) {
4299
+ function k(e, t) {
4297
4300
  r.value = {
4298
4301
  ...r.value,
4299
4302
  [e]: t
4300
4303
  };
4301
4304
  }
4302
- q([a, r], () => {
4305
+ q([o, r], () => {
4303
4306
  let e = r.value ?? {}, t = {};
4304
- for (let n of va(a.value)) n.defaultValue !== void 0 && !(n.prop in e) && (t[n.prop] = n.defaultValue);
4307
+ for (let n of va(o.value)) n.defaultValue !== void 0 && !(n.prop in e) && (t[n.prop] = n.defaultValue);
4305
4308
  Object.keys(t).length > 0 && (r.value = {
4306
4309
  ...e,
4307
4310
  ...t
4308
4311
  });
4309
4312
  }, { immediate: !0 });
4310
- async function k() {
4313
+ async function A() {
4311
4314
  if (!i.value) return !1;
4312
4315
  try {
4313
4316
  return await i.value.validate(), !0;
4314
4317
  } catch (e) {
4315
- let t = new Set(e && typeof e == "object" ? Object.keys(e) : []), n = l.value.find((e) => t.has(e.prop))?.prop ?? t.values().next().value;
4318
+ let t = new Set(e && typeof e == "object" ? Object.keys(e) : []), n = u.value.find((e) => t.has(e.prop))?.prop ?? t.values().next().value;
4316
4319
  return n && (await ee(), i.value?.scrollToField(n)), !1;
4317
4320
  }
4318
4321
  }
4319
4322
  return t({
4320
- validate: k,
4323
+ validate: A,
4321
4324
  clearValidate: () => i.value?.clearValidate(),
4322
4325
  resetFields: () => i.value?.resetFields(),
4323
- getValues: () => Object.fromEntries(l.value.map((e) => [e.prop, r.value?.[e.prop]]))
4326
+ getValues: () => Object.fromEntries(u.value.map((e) => [e.prop, r.value?.[e.prop]]))
4324
4327
  }), (t, n) => {
4325
- let l = re("loading");
4328
+ let u = re("loading");
4326
4329
  return R(), C("div", Ro, [ue((R(), x(K(Se), {
4327
4330
  ref_key: "formRef",
4328
4331
  ref: i,
4329
- class: F(["schema-form", d.value]),
4330
- style: L(m.value),
4332
+ class: F(["schema-form", f.value]),
4333
+ style: L(h.value),
4331
4334
  model: r.value,
4332
4335
  "label-width": e.labelWidth,
4333
- "label-position": f.value
4336
+ "label-position": p.value,
4337
+ "scroll-into-view-options": a
4334
4338
  }, {
4335
4339
  default: J(() => [D(K(Ne), { gutter: 16 }, {
4336
- default: J(() => [(R(!0), C(y, null, B(s.value, (e, n) => (R(), C(y, { key: h(e, n) }, [e.newRow ? (R(), C("div", zo)) : S("", !0), D(K(ge), {
4337
- span: e.span ?? (e.type === "group" ? 24 : u.value),
4340
+ default: J(() => [(R(!0), C(y, null, B(c.value, (e, n) => (R(), C(y, { key: g(e, n) }, [e.newRow ? (R(), C("div", zo)) : S("", !0), D(K(ge), {
4341
+ span: e.span ?? (e.type === "group" ? 24 : d.value),
4338
4342
  class: F({
4339
4343
  "schema-form-col--anchor-group": e.type === "group" && e.anchor,
4340
4344
  "schema-form-col--group-divider": e.type === "group" && n > 0
@@ -4343,25 +4347,25 @@ var Fo = {
4343
4347
  default: J(() => [e.type === "group" ? (R(), x(K(Ce), {
4344
4348
  key: 0,
4345
4349
  class: F(["schema-form-group", { "schema-form-group--anchor": e.anchor }]),
4346
- "data-form-anchor": e.anchor ? a.value.indexOf(e) : void 0,
4350
+ "data-form-anchor": e.anchor ? o.value.indexOf(e) : void 0,
4347
4351
  label: e.label
4348
4352
  }, {
4349
4353
  label: J(() => [e.anchor ? (R(), C("div", Bo, [
4350
- w("span", Vo, W(v(e)), 1),
4354
+ w("span", Vo, W(T(e)), 1),
4351
4355
  w("span", Ho, [w("strong", null, W(e.label), 1), e.description ? (R(), C("small", Uo, W(e.description), 1)) : S("", !0)]),
4352
- _(e) ? (R(), C("span", Wo, " 为必填项 ")) : S("", !0)
4356
+ v(e) ? (R(), C("span", Wo, " 为必填项 ")) : S("", !0)
4353
4357
  ])) : (R(), C("span", Go, W(e.label), 1))]),
4354
- default: J(() => [w("div", { class: F(["schema-form-group__body", { "schema-form-group__body--grid": e.anchor }]) }, [(R(!0), C(y, null, B(c(e), (n) => (R(), x(Lo, {
4358
+ default: J(() => [w("div", { class: F(["schema-form-group__body", { "schema-form-group__body--grid": e.anchor }]) }, [(R(!0), C(y, null, B(l(e), (n) => (R(), x(Lo, {
4355
4359
  key: n.prop,
4356
- style: L(g(n, e.anchor)),
4360
+ style: L(_(n, e.anchor)),
4357
4361
  "hide-label": !e.anchor,
4358
4362
  field: n,
4359
- context: o.value,
4360
- "label-position": f.value,
4363
+ context: s.value,
4364
+ "label-position": p.value,
4361
4365
  "model-value": r.value[n.prop],
4362
- disabled: T(n, e),
4363
- readonly: E(n),
4364
- "onUpdate:modelValue": (e) => O(n.prop, e)
4366
+ disabled: E(n, e),
4367
+ readonly: O(n),
4368
+ "onUpdate:modelValue": (e) => k(n.prop, e)
4365
4369
  }, {
4366
4370
  default: J((e) => [V(t.$slots, n.prop, P({ ref_for: !0 }, e), void 0, !0)]),
4367
4371
  _: 2
@@ -4384,12 +4388,12 @@ var Fo = {
4384
4388
  ])) : (R(), x(Lo, {
4385
4389
  key: 1,
4386
4390
  field: e,
4387
- context: o.value,
4388
- "label-position": f.value,
4391
+ context: s.value,
4392
+ "label-position": p.value,
4389
4393
  "model-value": r.value[e.prop],
4390
- disabled: T(e),
4391
- readonly: E(e),
4392
- "onUpdate:modelValue": (t) => O(e.prop, t)
4394
+ disabled: E(e),
4395
+ readonly: O(e),
4396
+ "onUpdate:modelValue": (t) => k(e.prop, t)
4393
4397
  }, {
4394
4398
  default: J((n) => [V(t.$slots, e.prop, P({ ref_for: !0 }, n), void 0, !0)]),
4395
4399
  _: 2
@@ -4413,10 +4417,10 @@ var Fo = {
4413
4417
  "model",
4414
4418
  "label-width",
4415
4419
  "label-position"
4416
- ])), [[l, e.loading]])]);
4420
+ ])), [[u, e.loading]])]);
4417
4421
  };
4418
4422
  }
4419
- }), [["__scopeId", "data-v-4dad298a"]]), Jo = { class: "drawer-form-page__header" }, Yo = { class: "drawer-form-page__header-main" }, Xo = { class: "drawer-form-page__title-stack" }, Zo = { class: "drawer-form-page__title" }, Qo = { class: "drawer-form-page__header-actions" }, $o = { class: "drawer-form-page__status" }, es = {
4423
+ }), [["__scopeId", "data-v-36d3a185"]]), Jo = { class: "drawer-form-page__header" }, Yo = { class: "drawer-form-page__header-main" }, Xo = { class: "drawer-form-page__title-stack" }, Zo = { class: "drawer-form-page__title" }, Qo = { class: "drawer-form-page__header-actions" }, $o = { class: "drawer-form-page__status" }, es = {
4420
4424
  key: 0,
4421
4425
  class: "drawer-form-page__anchors",
4422
4426
  "aria-label": "表单分区"
@@ -1,4 +1,4 @@
1
- import { t as e } from "./file-upload-1BQ7D3G-.js";
1
+ import { t as e } from "./file-upload-D7N0tsLF.js";
2
2
  // src/components/file-upload/index.ts
3
3
  var t = e;
4
4
  export { t as default };
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./modal-CHOpDVLd.js";
2
- import { n as t } from "./i18n-DejVnxC8.js";
2
+ import { n as t } from "./i18n-_x6RCAst.js";
3
3
  import { t as n } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
4
4
  import { t as r } from "./use-image-url-Bs5WMZ6L.js";
5
- import { n as i, t as ee } from "./use-multiple-file-upload-BYN5Ddr9.js";
5
+ import { n as i, t as ee } from "./use-multiple-file-upload-Cv2dfA07.js";
6
6
  import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as te, createVNode as d, defineComponent as f, h as p, normalizeClass as m, normalizeStyle as h, openBlock as g, ref as _, renderList as v, resolveComponent as ne, resolveDynamicComponent as y, toDisplayString as b, toRefs as re, unref as x, withCtx as S } from "vue";
7
7
  import { ElIcon as C, ElTooltip as w, ElUpload as ie } from "element-plus";
8
8
  import { Delete as T, Download as E, Upload as ae, View as D } from "@element-plus/icons-vue";
@@ -1,7 +1,9 @@
1
1
  import { a as e, c as t } from "./context-DqlD6qDJ.js";
2
2
  var n = {
3
3
  pleaseSelect: "Please select",
4
- close: "Close"
4
+ close: "Close",
5
+ cancel: "Cancel",
6
+ confirm: "Confirm"
5
7
  }, r = {
6
8
  components: {
7
9
  title: "Components",
@@ -200,6 +202,21 @@ var n = {
200
202
  remove: "Remove",
201
203
  typeNotAllowed: "Only {types} is supported",
202
204
  sizeLimitExceeded: "Image size cannot exceed {size}MB"
205
+ },
206
+ pictureUpload: {
207
+ cropTitle: "Crop image",
208
+ cropHint: "Drag the crop area and resize it from the corners",
209
+ resultSize: "Crop size",
210
+ aspectRatio: "Aspect ratio",
211
+ selectAspectRatio: "Crop ratio",
212
+ cropFailed: "Failed to crop the image",
213
+ readFailed: "Unable to read image dimensions",
214
+ widthExact: "Image width must be {width}px",
215
+ heightExact: "Image height must be {height}px",
216
+ widthMin: "Image width must be at least {width}px",
217
+ heightMin: "Image height must be at least {height}px",
218
+ widthMax: "Image width must not exceed {width}px",
219
+ heightMax: "Image height must not exceed {height}px"
203
220
  }
204
221
  }, i = {
205
222
  copy: "Copy",
@@ -222,7 +239,9 @@ var n = {
222
239
  selectField: "Select {field}"
223
240
  }, s = {
224
241
  pleaseSelect: "请选择",
225
- close: "关闭"
242
+ close: "关闭",
243
+ cancel: "取消",
244
+ confirm: "确定"
226
245
  }, c = {
227
246
  components: {
228
247
  title: "组件",
@@ -421,6 +440,21 @@ var n = {
421
440
  remove: "删除",
422
441
  typeNotAllowed: "仅支持 {types} 格式",
423
442
  sizeLimitExceeded: "图片大小不能超过 {size}MB"
443
+ },
444
+ pictureUpload: {
445
+ cropTitle: "裁剪图片",
446
+ cropHint: "拖动裁剪框调整区域,拖动四角调整大小",
447
+ resultSize: "裁剪尺寸",
448
+ aspectRatio: "宽高比",
449
+ selectAspectRatio: "裁剪比例",
450
+ cropFailed: "图片裁剪失败",
451
+ readFailed: "无法读取图片尺寸",
452
+ widthExact: "图片宽度必须为 {width}px",
453
+ heightExact: "图片高度必须为 {height}px",
454
+ widthMin: "图片宽度不能小于 {width}px",
455
+ heightMin: "图片高度不能小于 {height}px",
456
+ widthMax: "图片宽度不能大于 {width}px",
457
+ heightMax: "图片高度不能大于 {height}px"
424
458
  }
425
459
  }, l = {
426
460
  copy: "复制",