@web-utils/component 2.7.14 → 2.7.15

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.
@@ -136,6 +136,7 @@ var l = function() {
136
136
  }, c = [];
137
137
  const h = {
138
138
  name: "ImageCropper",
139
+ imageCropper: u,
139
140
  components: {
140
141
  VueCropper: a
141
142
  },
@@ -175,8 +176,7 @@ const h = {
175
176
  cancel(e) {
176
177
  e && e(), this.visible = !1, this.option.cancel && this.option.cancel(), typeof this.option.beforeClose == "function" && this.option.beforeClose(), this.$destroy(), this.$el.remove();
177
178
  }
178
- },
179
- imageCropper: u
179
+ }
180
180
  }, n = {};
181
181
  var m = /* @__PURE__ */ p(
182
182
  h,
@@ -235,6 +235,7 @@ const d = /* @__PURE__ */ function() {
235
235
  return i.$mount(), document.body.appendChild(i.$el), i.show(), i;
236
236
  }, g = {
237
237
  name: "ImageCropper",
238
+ imageCropper: u,
238
239
  components: {
239
240
  VueCropper: a
240
241
  },
@@ -274,8 +275,7 @@ const d = /* @__PURE__ */ function() {
274
275
  cancel(e) {
275
276
  e && e(), this.visible = !1, this.option.cancel && this.option.cancel(), typeof this.option.beforeClose == "function" && this.option.beforeClose(), this.$destroy(), this.$el.remove();
276
277
  }
277
- },
278
- imageCropper: u
278
+ }
279
279
  }, r = {};
280
280
  var _ = /* @__PURE__ */ p(
281
281
  g,
@@ -131,8 +131,9 @@ var d = function() {
131
131
  }
132
132
  })])])]) : e._e();
133
133
  }, m = [];
134
- const v = {
134
+ const _ = {
135
135
  name: "ImagePreview",
136
+ imagePreview: p,
136
137
  data() {
137
138
  return {
138
139
  left: 0,
@@ -209,11 +210,10 @@ const v = {
209
210
  close() {
210
211
  this.isShow = !1, typeof this.ops.beforeClose == "function" && this.ops.beforeClose(this.datas, this.index), this.$destroy(), this.$el.remove();
211
212
  }
212
- },
213
- imagePreview: p
213
+ }
214
214
  }, r = {};
215
- var _ = /* @__PURE__ */ h(
216
- v,
215
+ var v = /* @__PURE__ */ h(
216
+ _,
217
217
  d,
218
218
  m,
219
219
  !1,
@@ -227,7 +227,7 @@ function g(e) {
227
227
  this[s] = r[s];
228
228
  }
229
229
  const w = /* @__PURE__ */ function() {
230
- return _.exports;
230
+ return v.exports;
231
231
  }(), p = (e = [], s = 0, t = {}) => {
232
232
  const i = f.extend(w), a = {
233
233
  datas: e,
@@ -245,6 +245,7 @@ const w = /* @__PURE__ */ function() {
245
245
  return o.$mount(), document.body.appendChild(o.$el), o.isShow = !0, o;
246
246
  }, x = {
247
247
  name: "ImagePreview",
248
+ imagePreview: p,
248
249
  data() {
249
250
  return {
250
251
  left: 0,
@@ -321,8 +322,7 @@ const w = /* @__PURE__ */ function() {
321
322
  close() {
322
323
  this.isShow = !1, typeof this.ops.beforeClose == "function" && this.ops.beforeClose(this.datas, this.index), this.$destroy(), this.$el.remove();
323
324
  }
324
- },
325
- imagePreview: p
325
+ }
326
326
  }, c = {};
327
327
  var C = /* @__PURE__ */ h(
328
328
  x,
@@ -338,9 +338,9 @@ function $(e) {
338
338
  for (let s in c)
339
339
  this[s] = c[s];
340
340
  }
341
- const b = /* @__PURE__ */ function() {
341
+ const P = /* @__PURE__ */ function() {
342
342
  return C.exports;
343
343
  }();
344
344
  export {
345
- b as default
345
+ P as default
346
346
  };
@@ -1,21 +1,21 @@
1
1
  import l from "photoswipe";
2
- import "photoswipe/style.css";
2
+ import "photoswipe/dist/photoswipe.css";
3
3
  import { n as d } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
4
4
  function w(t) {
5
5
  new l(t).init();
6
6
  }
7
- async function u(t, o, r = { selector: "chat-image" }) {
8
- const a = t.target;
9
- if (!(!a || a.classList.contains(r.selector) || a.tagName === "IMG"))
7
+ async function u(t, a, r = { selector: "chat-image" }) {
8
+ const o = t.target;
9
+ if (!(!o || o.classList.contains(r.selector) || o.tagName === "IMG"))
10
10
  return;
11
- const e = o.querySelectorAll(r.selector === "img" ? r.selector : `.${r.selector}`), n = [...e].findIndex((s) => s === a);
11
+ const e = a.querySelectorAll(r.selector === "img" ? r.selector : `.${r.selector}`), n = [...e].findIndex((s) => s === o);
12
12
  n >= 0 && (r.index = n);
13
- const i = await m(e);
13
+ const i = await f(e);
14
14
  await w({ dataSource: i, index: n });
15
15
  }
16
- async function m(t) {
17
- const o = [];
18
- for (let r = 0, a = t.length; r < a; r++) {
16
+ async function f(t) {
17
+ const a = [];
18
+ for (let r = 0, o = t.length; r < o; r++) {
19
19
  const e = t[r], n = e.getAttribute("data-src") || e.getAttribute("src"), i = {
20
20
  src: n,
21
21
  msrc: n,
@@ -23,18 +23,18 @@ async function m(t) {
23
23
  element: e
24
24
  }, s = e.getAttribute("data-height"), h = e.getAttribute("data-width");
25
25
  let c = { width: h, height: s };
26
- !s && !h && (c = await f(e), e.setAttribute("data-height", c.height), e.setAttribute("data-width", c.width)), i.w = c.width, i.width = c.width, i.h = c.height, i.height = c.height, o.push(i);
26
+ !s && !h && (c = await m(e), e.setAttribute("data-height", c.height), e.setAttribute("data-width", c.width)), i.w = c.width, i.width = c.width, i.h = c.height, i.height = c.height, a.push(i);
27
27
  }
28
- return o;
28
+ return a;
29
29
  }
30
- function f(t) {
31
- const o = t.getAttribute("data-src") || t.getAttribute("src"), r = t.getAttribute("data-height"), a = t.getAttribute("data-width");
32
- return r && a ? { width: a, height: r } : t.complete ? {
30
+ function m(t) {
31
+ const a = t.getAttribute("data-src") || t.getAttribute("src"), r = t.getAttribute("data-height"), o = t.getAttribute("data-width");
32
+ return r && o ? { width: o, height: r } : t.complete ? {
33
33
  width: t.naturalWidth,
34
34
  height: t.naturalHeight
35
35
  } : new Promise((e) => {
36
36
  const n = new Image();
37
- n.src = o;
37
+ n.src = a;
38
38
  const i = {};
39
39
  n.complete ? (i.width = n.width, i.height = n.height, e(i)) : (n.onload = () => {
40
40
  i.width = n.width, i.height = n.height, e(i);
@@ -44,28 +44,31 @@ function f(t) {
44
44
  });
45
45
  }
46
46
  var p = function() {
47
- var t = this, o = t.$createElement, r = t._self._c || o;
47
+ var t = this, a = t.$createElement, r = t._self._c || a;
48
48
  return r("div", {
49
49
  ref: "wrapper"
50
- }, t._l(t.urls, function(a) {
51
- return r("img", {
52
- key: a.src,
53
- staticStyle: {
54
- cursor: "pointer"
55
- },
56
- attrs: {
57
- width: "100",
58
- src: a.src,
59
- alt: ""
60
- },
61
- on: {
62
- click: t.show
63
- }
50
+ }, [t._t("default", function() {
51
+ return t._l(t.urls, function(o) {
52
+ return r("img", {
53
+ key: o.src,
54
+ staticStyle: {
55
+ cursor: "pointer"
56
+ },
57
+ attrs: {
58
+ width: "100",
59
+ src: o.src,
60
+ alt: ""
61
+ },
62
+ on: {
63
+ click: t.show
64
+ }
65
+ });
64
66
  });
65
- }), 0);
67
+ })], 2);
66
68
  }, _ = [];
67
69
  const b = {
68
70
  name: "PhotoSwipe",
71
+ photoswipe: u,
69
72
  props: {
70
73
  urls: Array
71
74
  },
@@ -73,8 +76,7 @@ const b = {
73
76
  async show(t) {
74
77
  await u(t, this.$refs.wrapper, { selector: "img" });
75
78
  }
76
- },
77
- photoswipe: u
79
+ }
78
80
  }, g = {};
79
81
  var A = /* @__PURE__ */ d(
80
82
  b,
@@ -87,8 +89,8 @@ var A = /* @__PURE__ */ d(
87
89
  null
88
90
  );
89
91
  function S(t) {
90
- for (let o in g)
91
- this[o] = g[o];
92
+ for (let a in g)
93
+ this[a] = g[a];
92
94
  }
93
95
  const I = /* @__PURE__ */ function() {
94
96
  return A.exports;
package/dist/index.es.js CHANGED
@@ -42,7 +42,7 @@ import "viewerjs/dist/viewer.css";
42
42
  import Focus from "element-ui/src/mixins/focus";
43
43
  import RepeatClick from "element-ui/src/directives/repeat-click";
44
44
  import PhotoSwipe$1 from "photoswipe";
45
- import "photoswipe/style.css";
45
+ import "photoswipe/dist/photoswipe.css";
46
46
  import ClickOutside from "element-ui/lib/utils/clickoutside";
47
47
  import { chunk } from "lodash";
48
48
  import "tinymce/skins/lightgray/skin.min.css";
@@ -27992,6 +27992,7 @@ var render$I = function() {
27992
27992
  }, staticRenderFns$I = [];
27993
27993
  const ImageCropper_vue_vue_type_style_index_0_lang = "", __vue2_script$N = {
27994
27994
  name: "ImageCropper",
27995
+ imageCropper,
27995
27996
  components: {
27996
27997
  VueCropper
27997
27998
  },
@@ -28031,8 +28032,7 @@ const ImageCropper_vue_vue_type_style_index_0_lang = "", __vue2_script$N = {
28031
28032
  cancel(t) {
28032
28033
  t && t(), this.visible = !1, this.option.cancel && this.option.cancel(), typeof this.option.beforeClose == "function" && this.option.beforeClose(), this.$destroy(), this.$el.remove();
28033
28034
  }
28034
- },
28035
- imageCropper
28035
+ }
28036
28036
  }, __cssModules$N = {};
28037
28037
  var __component__$N = /* @__PURE__ */ normalizeComponent(
28038
28038
  __vue2_script$N,
@@ -28197,6 +28197,7 @@ var render$H = function() {
28197
28197
  }, staticRenderFns$H = [];
28198
28198
  const ImagePreview_vue_vue_type_style_index_0_lang = "", __vue2_script$M = {
28199
28199
  name: "ImagePreview",
28200
+ imagePreview,
28200
28201
  data() {
28201
28202
  return {
28202
28203
  left: 0,
@@ -28273,8 +28274,7 @@ const ImagePreview_vue_vue_type_style_index_0_lang = "", __vue2_script$M = {
28273
28274
  close() {
28274
28275
  this.isShow = !1, typeof this.ops.beforeClose == "function" && this.ops.beforeClose(this.datas, this.index), this.$destroy(), this.$el.remove();
28275
28276
  }
28276
- },
28277
- imagePreview
28277
+ }
28278
28278
  }, __cssModules$M = {};
28279
28279
  var __component__$M = /* @__PURE__ */ normalizeComponent(
28280
28280
  __vue2_script$M,
@@ -31269,25 +31269,28 @@ var render$n = function() {
31269
31269
  var t = this, n = t.$createElement, s = t._self._c || n;
31270
31270
  return s("div", {
31271
31271
  ref: "wrapper"
31272
- }, t._l(t.urls, function(a) {
31273
- return s("img", {
31274
- key: a.src,
31275
- staticStyle: {
31276
- cursor: "pointer"
31277
- },
31278
- attrs: {
31279
- width: "100",
31280
- src: a.src,
31281
- alt: ""
31282
- },
31283
- on: {
31284
- click: t.show
31285
- }
31272
+ }, [t._t("default", function() {
31273
+ return t._l(t.urls, function(a) {
31274
+ return s("img", {
31275
+ key: a.src,
31276
+ staticStyle: {
31277
+ cursor: "pointer"
31278
+ },
31279
+ attrs: {
31280
+ width: "100",
31281
+ src: a.src,
31282
+ alt: ""
31283
+ },
31284
+ on: {
31285
+ click: t.show
31286
+ }
31287
+ });
31286
31288
  });
31287
- }), 0);
31289
+ })], 2);
31288
31290
  }, staticRenderFns$n = [];
31289
31291
  const __vue2_script$r = {
31290
31292
  name: "PhotoSwipe",
31293
+ photoswipe,
31291
31294
  props: {
31292
31295
  urls: Array
31293
31296
  },
@@ -31295,8 +31298,7 @@ const __vue2_script$r = {
31295
31298
  async show(t) {
31296
31299
  await photoswipe(t, this.$refs.wrapper, { selector: "img" });
31297
31300
  }
31298
- },
31299
- photoswipe
31301
+ }
31300
31302
  }, __cssModules$r = {};
31301
31303
  var __component__$r = /* @__PURE__ */ normalizeComponent(
31302
31304
  __vue2_script$r,
@@ -36010,7 +36012,7 @@ function __vue2_injectStyles(t) {
36010
36012
  }
36011
36013
  const Watermark = /* @__PURE__ */ function() {
36012
36014
  return __component__.exports;
36013
- }(), version = "2.7.14";
36015
+ }(), version = "2.7.15";
36014
36016
  function index(t) {
36015
36017
  t.component(AddressInput.name, AddressInput), t.component(Affix.name, Affix), t.component(AsideMenu.name, AsideMenu), t.component(Avatar.name, Avatar), t.component(AwesomeButton.name, AwesomeButton), t.component(CapsuleTab.name, CapsuleTab), t.component(Card.name, Card), t.component(Carousel.name, Carousel), t.component(Chat.name, Chat), t.component(ChunkFileUploader.name, ChunkFileUploader), t.component(ChunkFileUploaderButton.name, ChunkFileUploaderButton), t.component(ChunkFileUploaderDrop.name, ChunkFileUploaderDrop), t.component(ChunkFileUploaderFile.name, ChunkFileUploaderFile), t.component(ChunkFileUploaderFiles.name, ChunkFileUploaderFiles), t.component(ChunkFileUploaderList.name, ChunkFileUploaderList), t.component(ChunkFileUploaderUnSupport.name, ChunkFileUploaderUnSupport), t.component(CodeMirrorEditor.name, CodeMirrorEditor), t.component(ColorPicker.name, ColorPicker), t.component(Column.name, Column), t.component(ColumnDefault.name, ColumnDefault), t.component(ColumnDynamic.name, ColumnDynamic), t.component(ColumnMenu.name, ColumnMenu), t.component(ColumnSlot.name, ColumnSlot), t.component(Comment.name, Comment), t.component(Confirmable.name, Confirmable), t.component(ConfirmButton.name, ConfirmButton), t.component(ContextMenu.name, ContextMenu), t.component(CountUp.name, CountUp), t.component(CustomScrollbar.name, CustomScrollbar), t.component(DataBox.name, DataBox), t.component(DataCard.name, DataCard), t.component(DataCardtext.name, DataCardtext), t.component(DataDisplay.name, DataDisplay), t.component(DataIcons.name, DataIcons), t.component(DataImgtext.name, DataImgtext), t.component(DataOperatext.name, DataOperatext), t.component(DataPanel.name, DataPanel), t.component(DataPay.name, DataPay), t.component(DataPrice.name, DataPrice), t.component(DataProgress.name, DataProgress), t.component(DataRotate.name, DataRotate), t.component(DataTablePicker.name, DataTablePicker), t.component(DataTabs.name, DataTabs), t.component(DialogColumn.name, DialogColumn), t.component(DialogExcel.name, DialogExcel), t.component(DialogFilter.name, DialogFilter), t.component(DialogForm.name, DialogForm), t.component(DynamicTable.name, DynamicTable), t.component(ECharts.name, ECharts), t.component(EditableProgress.name, EditableProgress), t.component(EditableTree.name, EditableTree), t.component(EgdCollapse.name, EgdCollapse), t.component(EgdCollapseItem.name, EgdCollapseItem), t.component(ElementDialog.name, ElementDialog), t.component(EmptyView.name, EmptyView), t.component(ErrorView.name, ErrorView), t.component(FlexColumn.name, FlexColumn), t.component(FlexItem.name, FlexItem), t.component(FlexRow.name, FlexRow), t.component(FlexScroller.name, FlexScroller), t.component(Flow.name, Flow), t.component(FlowNode.name, FlowNode), t.component(FormButton.name, FormButton), t.component(FormCascader.name, FormCascader), t.component(FormCheckboxGroup.name, FormCheckboxGroup), t.component(FormDatePicker.name, FormDatePicker), t.component(FormGroup.name, FormGroup), t.component(FormHolder.name, FormHolder), t.component(FormInput.name, FormInput), t.component(FormInputEmail.name, FormInputEmail), t.component(FormInputIdCard.name, FormInputIdCard), t.component(FormInputNumber.name, FormInputNumber), t.component(FormInputPhoneNumber.name, FormInputPhoneNumber), t.component(FormInputTime.name, FormInputTime), t.component(FormItem.name, FormItem), t.component(FormItemConfigProvider.name, FormItemConfigProvider), t.component(FormItemGroup.name, FormItemGroup), t.component(FormRadioGroup.name, FormRadioGroup), t.component(FormSelect.name, FormSelect), t.component(FormSwitch.name, FormSwitch), t.component(FormTemp.name, FormTemp), t.component(FormTextarea.name, FormTextarea), t.component(FormView.name, FormView), t.component(FyArray.name, FyArray), t.component(FyArticle.name, FyArticle), t.component(FyCascader.name, FyCascader), t.component(FyCheckbox.name, FyCheckbox), t.component(FyCode.name, FyCode), t.component(FyCurd.name, FyCurd), t.component(FyDate.name, FyDate), t.component(FyDialogForm.name, FyDialogForm), t.component(FyDraggable.name, FyDraggable), t.component(FyDynamic.name, FyDynamic), t.component(FyEmpty.name, FyEmpty), t.component(FyForm.name, FyForm), t.component(FyFormDesign.name, FyFormDesign), t.component(FyFormMenu.name, FyFormMenu), t.component(FyInput.name, FyInput), t.component(FyInputColor.name, FyInputColor), t.component(FyInputIcon.name, FyInputIcon), t.component(FyInputMap.name, FyInputMap), t.component(FyInputNumber.name, FyInputNumber), t.component(FyInputTable.name, FyInputTable), t.component(FyInputTree.name, FyInputTree), t.component(FyProgress.name, FyProgress), t.component(FyRadio.name, FyRadio), t.component(FyRate.name, FyRate), t.component(FySelect.name, FySelect), t.component(FySlider.name, FySlider), t.component(FySwitch.name, FySwitch), t.component(FyTabs.name, FyTabs), t.component(FyTime.name, FyTime), t.component(FyTitle.name, FyTitle), t.component(FyTree.name, FyTree), t.component(FyUEditor.name, FyUEditor), t.component(FyUpload.name, FyUpload), t.component(GuideSteps.name, GuideSteps), t.component(HeaderMenu.name, HeaderMenu), t.component(HeaderSearch.name, HeaderSearch), t.component(IconCard.name, IconCard), t.component(IconTemp.name, IconTemp), t.component(IframeWindow.name, IframeWindow), t.component(ImageCropper.name, ImageCropper), t.component(ImagePreview.name, ImagePreview), t.component(ImageViewer.name, ImageViewer), t.component(InputNumber.name, InputNumber), t.component(InputNumberRange.name, InputNumberRange), t.component(JSXComponent.name, JSXComponent), t.component(KeepViewAlive.name, KeepViewAlive), t.component(Keyboard.name, Keyboard), t.component(License.name, License), t.component(LoadingView.name, LoadingView), t.component(Login.name, Login), t.component(NameAvatar.name, NameAvatar), t.component(NavBar.name, NavBar), t.component(Notice.name, Notice), t.component(NotImplement.name, NotImplement), t.component(Page.name, Page), t.component(PageableTable.name, PageableTable), t.component(PageableView.name, PageableView), t.component(PageHeader.name, PageHeader), t.component(PageIndex.name, PageIndex), t.component(PageIndexTop.name, PageIndexTop), t.component(PageSkeleton.name, PageSkeleton), t.component(PageSkeletonNew.name, PageSkeletonNew), t.component(PhotoSwipe.name, PhotoSwipe), t.component(Queue.name, Queue), t.component(RecordVideo.name, RecordVideo), t.component(ResizeObserver.name, ResizeObserver), t.component(Search.name, Search), t.component(SearchPopover.name, SearchPopover), t.component(Sign.name, Sign), t.component(SignPanel.name, SignPanel), t.component(Skeleton.name, Skeleton), t.component(SplitPane.name, SplitPane), t.component(Stateful.name, Stateful), t.component(StaticPageableTable.name, StaticPageableTable), t.component(Swiper.name, Swiper), t.component(Tab.name, Tab), t.component(TabItem.name, TabItem), t.component(TableColumn.name, TableColumn), t.component(TablePage.name, TablePage), t.component(TableView.name, TableView), t.component(TagRender.name, TagRender), t.component(TextEllipsis.name, TextEllipsis), t.component(TinymceEditor.name, TinymceEditor), t.component(TinymceWrapper.name, TinymceWrapper), t.component(Toolbar.name, Toolbar), t.component(ToolbarButton.name, ToolbarButton), t.component(Trigger.name, Trigger), t.component(Verify.name, Verify), t.component(VueTagsInput.name, VueTagsInput), t.component(Watermark.name, Watermark);
36016
36018
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web-utils/component",
3
- "version": "2.7.14",
3
+ "version": "2.7.15",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "license": "MIT",
package/web-types.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "framework": "vue",
4
4
  "name": "@web-utils/component",
5
- "version": "2.7.14",
5
+ "version": "2.7.15",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "description-markup": "markdown",
@@ -18144,6 +18144,11 @@
18144
18144
  },
18145
18145
  "default": ""
18146
18146
  }
18147
+ ],
18148
+ "slots": [
18149
+ {
18150
+ "name": "default"
18151
+ }
18147
18152
  ]
18148
18153
  },
18149
18154
  {