@web-utils/component 3.0.6 → 3.1.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.
Files changed (172) hide show
  1. package/address-input/index.mjs +20 -57
  2. package/affix/index.mjs +26 -47
  3. package/aside-menu/index.mjs +18 -43
  4. package/avatar/index.mjs +27 -49
  5. package/awesome-button/index.mjs +35 -43
  6. package/capsule-tab/index.mjs +16 -34
  7. package/card/index.mjs +21 -76
  8. package/carousel/index.mjs +14 -49
  9. package/chat/index.mjs +104 -414
  10. package/chunk-file-uploader/index.mjs +21 -38
  11. package/chunks/FormTemp.aa57efb4.mjs +125 -0
  12. package/code-mirror-editor/index.mjs +69 -79
  13. package/color-picker/index.mjs +29 -60
  14. package/comment/index.mjs +17 -48
  15. package/confirm-button/index.mjs +11 -19
  16. package/confirmable/index.mjs +12 -20
  17. package/context-menu/index.mjs +42 -144
  18. package/count-up/index.mjs +18 -25
  19. package/custom-scrollbar/index.mjs +13 -22
  20. package/data-box/index.mjs +15 -66
  21. package/data-card/index.mjs +16 -65
  22. package/data-cardtext/index.mjs +16 -52
  23. package/data-display/index.mjs +18 -62
  24. package/data-icons/index.mjs +16 -68
  25. package/data-imgtext/index.mjs +18 -79
  26. package/data-operatext/index.mjs +18 -75
  27. package/data-panel/index.mjs +16 -63
  28. package/data-pay/index.mjs +20 -122
  29. package/data-price/index.mjs +18 -60
  30. package/data-progress/index.mjs +16 -67
  31. package/data-rotate/index.mjs +16 -66
  32. package/data-table-picker/index.mjs +25 -88
  33. package/data-tabs/index.mjs +16 -64
  34. package/dialog-form/index.mjs +48 -94
  35. package/dynamic-table/index.mjs +43 -127
  36. package/e-charts/index.mjs +21 -34
  37. package/easy-popup/index.mjs +35 -61
  38. package/editable-progress/index.mjs +22 -77
  39. package/editable-tree/index.mjs +235 -546
  40. package/egd-collapse/index.mjs +13 -26
  41. package/egd-collapse-item/index.mjs +27 -87
  42. package/element-dialog/index.mjs +69 -133
  43. package/empty-view/index.mjs +13 -33
  44. package/error-view/index.mjs +14 -34
  45. package/flex-column/index.mjs +15 -23
  46. package/flex-item/index.mjs +18 -26
  47. package/flex-row/index.mjs +23 -31
  48. package/flex-scroller/index.mjs +16 -27
  49. package/flow/index.mjs +70 -110
  50. package/flow-designer/index.mjs +1215 -4804
  51. package/flow-node/index.mjs +15 -51
  52. package/flow-viewer/index.mjs +64 -89
  53. package/form-block/index.mjs +43 -62
  54. package/form-button/index.mjs +10 -18
  55. package/form-cascader/index.mjs +49 -100
  56. package/form-checkbox-group/index.mjs +43 -110
  57. package/form-date-picker/index.mjs +51 -97
  58. package/form-holder/index.mjs +25 -42
  59. package/form-input/index.mjs +40 -90
  60. package/form-input-email/index.mjs +35 -79
  61. package/form-input-id-card/index.mjs +40 -87
  62. package/form-input-number/index.mjs +42 -102
  63. package/form-input-phone-number/index.mjs +34 -75
  64. package/form-input-tag/index.mjs +31 -73
  65. package/form-input-time/index.mjs +42 -87
  66. package/form-item/index.mjs +70 -89
  67. package/form-item-config-provider/index.mjs +12 -20
  68. package/form-item-group/index.mjs +46 -65
  69. package/form-radio-group/index.mjs +50 -108
  70. package/form-select/index.mjs +44 -95
  71. package/form-switch/index.mjs +38 -85
  72. package/form-textarea/index.mjs +31 -75
  73. package/form-view/index.mjs +112 -260
  74. package/fy-array/index.mjs +35 -121
  75. package/fy-article/index.mjs +12 -43
  76. package/fy-cascader/index.mjs +26 -67
  77. package/fy-checkbox/index.mjs +27 -77
  78. package/fy-code/index.mjs +19 -33
  79. package/fy-curd/index.mjs +810 -2017
  80. package/fy-date/index.mjs +18 -59
  81. package/fy-draggable/index.mjs +81 -140
  82. package/fy-dynamic/index.mjs +85 -204
  83. package/fy-empty/index.mjs +14 -35
  84. package/fy-form/index.mjs +254 -571
  85. package/fy-form-design/index.mjs +1489 -6084
  86. package/fy-form-design/style.css +1 -1
  87. package/fy-input/index.mjs +34 -104
  88. package/fy-input-color/index.mjs +22 -67
  89. package/fy-input-icon/index.mjs +37 -122
  90. package/fy-input-map/index.mjs +57 -149
  91. package/fy-input-number/index.mjs +18 -53
  92. package/fy-input-table/index.mjs +36 -102
  93. package/fy-input-tree/index.mjs +51 -138
  94. package/fy-progress/index.mjs +12 -31
  95. package/fy-radio/index.mjs +20 -51
  96. package/fy-rate/index.mjs +18 -51
  97. package/fy-select/index.mjs +49 -134
  98. package/fy-slider/index.mjs +19 -52
  99. package/fy-switch/index.mjs +18 -48
  100. package/fy-tabs/index.mjs +19 -51
  101. package/fy-time/index.mjs +22 -62
  102. package/fy-title/index.mjs +14 -25
  103. package/fy-tree/index.mjs +74 -216
  104. package/fy-u-editor/index.mjs +50 -64
  105. package/fy-upload/index.mjs +167 -338
  106. package/guide-steps/index.mjs +33 -53
  107. package/highlight-j-s/index.mjs +13 -27
  108. package/icon-card/index.mjs +12 -36
  109. package/icon-temp/index.mjs +12 -34
  110. package/iframe-window/index.mjs +13 -40
  111. package/image-cropper/index.mjs +46 -171
  112. package/image-preview/index.mjs +54 -168
  113. package/image-viewer/index.mjs +24 -50
  114. package/index.css +1 -0
  115. package/index.mjs +3973 -501
  116. package/input-number/index.mjs +84 -173
  117. package/input-number-range/index.mjs +20 -70
  118. package/j-s-x-component/index.mjs +3 -3
  119. package/keep-view-alive/index.mjs +47 -55
  120. package/keyboard/index.mjs +100 -113
  121. package/license/index.mjs +34 -51
  122. package/loading-view/index.mjs +14 -34
  123. package/login/index.mjs +33 -161
  124. package/monaco-editor/index.mjs +13 -21
  125. package/name-avatar/index.mjs +13 -32
  126. package/nav-bar/index.mjs +12 -31
  127. package/not-implement/index.mjs +14 -25
  128. package/notice/index.mjs +32 -80
  129. package/package.json +1 -1
  130. package/page/index.mjs +11 -23
  131. package/page-header/index.mjs +16 -37
  132. package/page-index/index.mjs +42 -93
  133. package/page-index-top/index.mjs +42 -84
  134. package/page-skeleton/index.mjs +24 -39
  135. package/page-skeleton-new/index.mjs +21 -68
  136. package/pageable-table/index.mjs +105 -227
  137. package/pageable-view/index.mjs +30 -83
  138. package/photo-swipe/index.mjs +62 -87
  139. package/present-view/index.mjs +114 -267
  140. package/queue/index.mjs +14 -29
  141. package/record-video/index.mjs +29 -66
  142. package/resize-observer/index.mjs +18 -30
  143. package/search/index.mjs +47 -81
  144. package/search-popover/index.mjs +57 -329
  145. package/sign/index.mjs +43 -60
  146. package/sign-panel/index.mjs +40 -151
  147. package/skeleton/index.mjs +18 -44
  148. package/split-pane/index.mjs +45 -129
  149. package/stateful/index.mjs +18 -26
  150. package/static-pageable-table/index.mjs +18 -44
  151. package/swiper/index.mjs +53 -94
  152. package/tab/index.mjs +13 -39
  153. package/tab-item/index.mjs +23 -37
  154. package/table-column/index.mjs +27 -35
  155. package/table-view/index.mjs +89 -209
  156. package/tag-render/index.mjs +34 -69
  157. package/text-ellipsis/index.mjs +22 -47
  158. package/tinymce-editor/index.mjs +174 -285
  159. package/toolbar/index.mjs +21 -42
  160. package/toolbar-button/index.mjs +25 -54
  161. package/verify/index.mjs +16 -29
  162. package/vue-cron/index.mjs +272 -1089
  163. package/vue-qr-code/index.mjs +19 -27
  164. package/vue-quill-editor/index.mjs +15 -27
  165. package/vue-tags-input/index.mjs +104 -224
  166. package/vue-tree-select/index.mjs +595 -742
  167. package/vue-video-player/index.mjs +42 -57
  168. package/watermark/index.mjs +27 -35
  169. package/web-types.json +1 -1
  170. package/x-input-tag/index.mjs +50 -112
  171. package/chunks/FormTemp.7f91629d.mjs +0 -165
  172. /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
@@ -1,97 +1,71 @@
1
- var u = (t, a, e) => new Promise((h, n) => {
2
- var r = (c) => {
1
+ var u = (i, n, t) => new Promise((h, a) => {
2
+ var r = (o) => {
3
3
  try {
4
- s(e.next(c));
5
- } catch (o) {
6
- n(o);
4
+ s(t.next(o));
5
+ } catch (c) {
6
+ a(c);
7
7
  }
8
- }, i = (c) => {
8
+ }, e = (o) => {
9
9
  try {
10
- s(e.throw(c));
11
- } catch (o) {
12
- n(o);
10
+ s(t.throw(o));
11
+ } catch (c) {
12
+ a(c);
13
13
  }
14
- }, s = (c) => c.done ? h(c.value) : Promise.resolve(c.value).then(r, i);
15
- s((e = e.apply(t, a)).next());
14
+ }, s = (o) => o.done ? h(o.value) : Promise.resolve(o.value).then(r, e);
15
+ s((t = t.apply(i, n)).next());
16
16
  });
17
- import d from "photoswipe";
17
+ import g from "photoswipe";
18
18
  import "photoswipe/dist/photoswipe.css";
19
- import { n as w } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
20
- function f(t) {
21
- new d(t).init();
19
+ import { n as d } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
20
+ function w(i) {
21
+ new g(i).init();
22
22
  }
23
- function l(h, n) {
24
- return u(this, arguments, function* (t, a, e = { selector: "chat-image" }) {
25
- const r = t.target;
26
- if (!(!r || r.classList.contains(e.selector) || r.tagName === "IMG"))
23
+ function l(h, a) {
24
+ return u(this, arguments, function* (i, n, t = { selector: "chat-image" }) {
25
+ const r = i.target;
26
+ if (!(!r || r.classList.contains(t.selector) || r.tagName === "IMG"))
27
27
  return;
28
- const i = a.querySelectorAll(
29
- e.selector === "img" ? e.selector : `.${e.selector}`
30
- ), s = [...i].findIndex((o) => o === r);
31
- s >= 0 && (e.index = s);
32
- const c = yield m(i);
33
- yield f({ dataSource: c, index: s });
28
+ const e = n.querySelectorAll(
29
+ t.selector === "img" ? t.selector : `.${t.selector}`
30
+ ), s = [...e].findIndex((c) => c === r);
31
+ s >= 0 && (t.index = s);
32
+ const o = yield f(e);
33
+ yield w({ dataSource: o, index: s });
34
34
  });
35
35
  }
36
- function m(t) {
36
+ function f(i) {
37
37
  return u(this, null, function* () {
38
- const a = [];
39
- for (let e = 0, h = t.length; e < h; e++) {
40
- const n = t[e], r = n.getAttribute("data-src") || n.getAttribute("src"), i = {
38
+ const n = [];
39
+ for (let t = 0, h = i.length; t < h; t++) {
40
+ const a = i[t], r = a.getAttribute("data-src") || a.getAttribute("src"), e = {
41
41
  src: r,
42
42
  msrc: r,
43
- alt: n.getAttribute("data-title") || n.getAttribute("alt"),
44
- element: n
45
- }, s = n.getAttribute("data-height"), c = n.getAttribute("data-width");
46
- let o = { width: c, height: s };
47
- !s && !c && (o = yield p(n), n.setAttribute("data-height", o.height), n.setAttribute("data-width", o.width)), i.w = o.width, i.width = o.width, i.h = o.height, i.height = o.height, a.push(i);
43
+ alt: a.getAttribute("data-title") || a.getAttribute("alt"),
44
+ element: a
45
+ }, s = a.getAttribute("data-height"), o = a.getAttribute("data-width");
46
+ let c = { width: o, height: s };
47
+ !s && !o && (c = yield m(a), a.setAttribute("data-height", c.height), a.setAttribute("data-width", c.width)), e.w = c.width, e.width = c.width, e.h = c.height, e.height = c.height, n.push(e);
48
48
  }
49
- return a;
49
+ return n;
50
50
  });
51
51
  }
52
- function p(t) {
53
- const a = t.getAttribute("data-src") || t.getAttribute("src"), e = t.getAttribute("data-height"), h = t.getAttribute("data-width");
54
- return e && h ? { width: h, height: e } : t.complete ? {
55
- width: t.naturalWidth,
56
- height: t.naturalHeight
57
- } : new Promise((n) => {
52
+ function m(i) {
53
+ const n = i.getAttribute("data-src") || i.getAttribute("src"), t = i.getAttribute("data-height"), h = i.getAttribute("data-width");
54
+ return t && h ? { width: h, height: t } : i.complete ? {
55
+ width: i.naturalWidth,
56
+ height: i.naturalHeight
57
+ } : new Promise((a) => {
58
58
  const r = new Image();
59
- r.src = a;
60
- const i = {};
61
- r.complete ? (i.width = r.width, i.height = r.height, n(i)) : (r.onload = () => {
62
- i.width = r.width, i.height = r.height, n(i);
59
+ r.src = n;
60
+ const e = {};
61
+ r.complete ? (e.width = r.width, e.height = r.height, a(e)) : (r.onload = () => {
62
+ e.width = r.width, e.height = r.height, a(e);
63
63
  }, r.onerror = () => {
64
- i.width = 0, i.height = 0, n(i);
64
+ e.width = 0, e.height = 0, a(e);
65
65
  });
66
66
  });
67
67
  }
68
- var _ = function() {
69
- var t = this, a = t.$createElement, e = t._self._c || a;
70
- return e("div", {
71
- ref: "wrapper"
72
- }, [t._t("default", function() {
73
- return t._l(t.urls, function(h) {
74
- return e("img", {
75
- key: h.src,
76
- staticStyle: {
77
- cursor: "pointer"
78
- },
79
- attrs: {
80
- width: "100",
81
- src: h.src,
82
- alt: ""
83
- },
84
- on: {
85
- click: t.preview
86
- }
87
- });
88
- });
89
- }, {
90
- urls: t.urls,
91
- preview: t.preview
92
- })], 2);
93
- }, b = [];
94
- const A = {
68
+ const p = {
95
69
  name: "PhotoSwipe",
96
70
  photoswipe: l,
97
71
  props: {
@@ -102,30 +76,31 @@ const A = {
102
76
  }
103
77
  },
104
78
  methods: {
105
- preview(t) {
79
+ preview(i) {
106
80
  return u(this, null, function* () {
107
- yield l(t, this.$refs.wrapper, { selector: this.selector });
81
+ yield l(i, this.$refs.wrapper, { selector: this.selector });
108
82
  });
109
83
  }
110
84
  }
111
- }, g = {};
112
- var v = /* @__PURE__ */ w(
113
- A,
85
+ };
86
+ var _ = function() {
87
+ var n = this, t = n._self._c;
88
+ return t("div", { ref: "wrapper" }, [n._t("default", function() {
89
+ return n._l(n.urls, function(h) {
90
+ return t("img", { key: h.src, staticStyle: { cursor: "pointer" }, attrs: { width: "100", src: h.src, alt: "" }, on: { click: n.preview } });
91
+ });
92
+ }, { urls: n.urls, preview: n.preview })], 2);
93
+ }, b = [], A = /* @__PURE__ */ d(
94
+ p,
114
95
  _,
115
96
  b,
116
97
  !1,
117
- S,
98
+ null,
118
99
  null,
119
100
  null,
120
101
  null
121
102
  );
122
- function S(t) {
123
- for (let a in g)
124
- this[a] = g[a];
125
- }
126
- const $ = /* @__PURE__ */ function() {
127
- return v.exports;
128
- }();
103
+ const I = A.exports;
129
104
  export {
130
- $ as default
105
+ I as default
131
106
  };
@@ -1,217 +1,37 @@
1
- var c = (t, e, o) => new Promise((r, s) => {
2
- var n = (i) => {
1
+ var w = Object.defineProperty, y = Object.defineProperties;
2
+ var g = Object.getOwnPropertyDescriptors;
3
+ var h = Object.getOwnPropertySymbols;
4
+ var x = Object.prototype.hasOwnProperty, $ = Object.prototype.propertyIsEnumerable;
5
+ var b = (e, t, o) => t in e ? w(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, c = (e, t) => {
6
+ for (var o in t || (t = {}))
7
+ x.call(t, o) && b(e, o, t[o]);
8
+ if (h)
9
+ for (var o of h(t))
10
+ $.call(t, o) && b(e, o, t[o]);
11
+ return e;
12
+ }, f = (e, t) => y(e, g(t));
13
+ var d = (e, t, o) => new Promise((r, s) => {
14
+ var i = (n) => {
3
15
  try {
4
- a(o.next(i));
5
- } catch (f) {
6
- s(f);
16
+ a(o.next(n));
17
+ } catch (u) {
18
+ s(u);
7
19
  }
8
- }, l = (i) => {
20
+ }, l = (n) => {
9
21
  try {
10
- a(o.throw(i));
11
- } catch (f) {
12
- s(f);
22
+ a(o.throw(n));
23
+ } catch (u) {
24
+ s(u);
13
25
  }
14
- }, a = (i) => i.done ? r(i.value) : Promise.resolve(i.value).then(n, l);
15
- a((o = o.apply(t, e)).next());
26
+ }, a = (n) => n.done ? r(n.value) : Promise.resolve(n.value).then(i, l);
27
+ a((o = o.apply(e, t)).next());
16
28
  });
17
- import { hasOwn as d, toStringArray as p, delay as v, isInContainer as _ } from "@web-utils/core";
18
- import { merge as w } from "@web-utils/integrations/lodash";
19
- import y from "@web-utils/component/resize-observer";
29
+ import { hasOwn as p, toStringArray as S, delay as F, isInContainer as k } from "@web-utils/core";
30
+ import { merge as B } from "@web-utils/integrations/lodash";
31
+ import L from "@web-utils/component/resize-observer";
20
32
  import "@web-utils/component/resize-observer/style.css";
21
- import { n as g } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
22
- var x = function() {
23
- var t = this, e = t.$createElement, o = t._self._c || e;
24
- return o("div", {
25
- class: ["form-view", t.className]
26
- }, [o("div", {
27
- directives: [{
28
- name: "show",
29
- rawName: "v-show",
30
- value: !t.isFormLoading,
31
- expression: "!isFormLoading"
32
- }],
33
- staticClass: "form-view-toolbar"
34
- }, [t._t("form-view-toolbar", function() {
35
- return [o("Toolbar", t._g(t._b({
36
- directives: [{
37
- name: "show",
38
- rawName: "v-show",
39
- value: t.showToolbar,
40
- expression: "showToolbar"
41
- }],
42
- on: {
43
- edit: t.onEdit
44
- },
45
- scopedSlots: t._u([{
46
- key: "default",
47
- fn: function(r) {
48
- var s = r.buttons;
49
- return [t._t("toolbar-button", null, {
50
- buttons: s
51
- })];
52
- }
53
- }, t._l(t.getToolbarSlotKeys(), function(r) {
54
- return {
55
- key: r,
56
- fn: function() {
57
- return [t._t(r)];
58
- },
59
- proxy: !0
60
- };
61
- }), {
62
- key: "toolbar-right",
63
- fn: function() {
64
- return [t._t("toolbar-right")];
65
- },
66
- proxy: !0
67
- }], null, !0)
68
- }, "Toolbar", Object.assign({}, t.toolbarProps, {
69
- buttons: t.getToolbarButtons(t.toolbarProps.buttons)
70
- }), !1), t.toolbarListeners))];
71
- })], 2), o("div", {
72
- directives: [{
73
- name: "show",
74
- rawName: "v-show",
75
- value: !t.isFormLoading,
76
- expression: "!isFormLoading"
77
- }],
78
- staticClass: "form-scroller-wrapper"
79
- }, [o("div", {
80
- ref: "formScroller",
81
- class: ["form-scroller", "absolute-box", t.contentClass],
82
- on: {
83
- scroll: t.onFormScroll
84
- }
85
- }, [t.notForm ? o("div", {
86
- staticClass: "not-form",
87
- style: {
88
- width: t.formWidth
89
- }
90
- }, [t.title ? o("div", {
91
- staticClass: "form-view-title"
92
- }, [t._v(t._s(t.title))]) : t._e(), t._t("default", function() {
93
- return [o("EmptyView", {
94
- attrs: {
95
- "empty-tips": "请添加表单内容"
96
- }
97
- })];
98
- }), o("Toolbar", t._g(t._b({
99
- attrs: {
100
- footer: ""
101
- },
102
- scopedSlots: t._u([{
103
- key: "default",
104
- fn: function(r) {
105
- var s = r.buttons, n = r.footer;
106
- return [t._t("footer-button", null, {
107
- buttons: s,
108
- footer: n
109
- })];
110
- }
111
- }, t._l(t.getFooterSlotKeys(), function(r) {
112
- return {
113
- key: t.getFooterSlotKey(r),
114
- fn: function() {
115
- return [t._t(r)];
116
- },
117
- proxy: !0
118
- };
119
- })], null, !0)
120
- }, "Toolbar", Object.assign({}, t.toolbarProps, {
121
- buttons: t.getFooterBarButtons(t.toolbarProps.buttons)
122
- }), !1), t.toolbarListeners)), t.$scopedSlots["form-bottom"] ? t._t("form-bottom") : t._e()], 2) : o("div", {
123
- class: ["form-card", {
124
- "un-limit": t.unLimit
125
- }],
126
- style: {
127
- width: `calc(${t.formWidth} + 40px)`
128
- }
129
- }, [o("div", {
130
- staticClass: "form-content"
131
- }, [t.title ? o("div", {
132
- staticClass: "form-view-title"
133
- }, [t._v(t._s(t.title))]) : t._e(), t._t("default", function() {
134
- return [o("EmptyView", {
135
- attrs: {
136
- "empty-tips": "请添加表单内容"
137
- }
138
- })];
139
- }), t.getFooterBarButtons(t.toolbarProps.buttons).length ? o("Toolbar", t._g(t._b({
140
- attrs: {
141
- footer: ""
142
- },
143
- scopedSlots: t._u([{
144
- key: "default",
145
- fn: function(r) {
146
- var s = r.buttons, n = r.footer;
147
- return [t._t("footer-button", null, {
148
- buttons: s,
149
- footer: n
150
- })];
151
- }
152
- }, t._l(t.getFooterSlotKeys(), function(r) {
153
- return {
154
- key: t.getFooterSlotKey(r),
155
- fn: function() {
156
- return [t._t(r)];
157
- },
158
- proxy: !0
159
- };
160
- })], null, !0)
161
- }, "Toolbar", Object.assign({}, t.toolbarProps, {
162
- buttons: t.getFooterBarButtons(t.toolbarProps.buttons)
163
- }), !1), t.toolbarListeners)) : t._e()], 2)]), t.$scopedSlots["form-bottom"] || t.$parent.$options.flowForm && t.flowContext.logs.length ? o("div", {
164
- class: ["form-card", {
165
- "un-limit": t.unLimit
166
- }],
167
- staticStyle: {
168
- "min-height": "0"
169
- },
170
- style: {
171
- width: `calc(${t.formWidth} + 40px)`
172
- }
173
- }, [o("div", {
174
- staticClass: "form-content"
175
- }, [o("FormItemGroup", {
176
- attrs: {
177
- "block-title": "流程日志"
178
- }
179
- }, [o("FlowLog", {
180
- attrs: {
181
- fetch: !1,
182
- "show-title": !1,
183
- "business-key": t.$parent.bizKey
184
- }
185
- })], 1), t._t("form-bottom")], 2)]) : t._e()]), o("ResizeObserver", {
186
- on: {
187
- notify: t.onFormResize
188
- }
189
- })], 1), t.formNav && !t.isFormLoading && t.showNav && t.tabs.length ? o("div", {
190
- staticClass: "form-nav"
191
- }, [o("div", {
192
- staticClass: "form-nav-header"
193
- }, [t._v("表单导航")]), o("ul", {
194
- staticClass: "form-nav-list"
195
- }, t._l(t.tabs, function(r, s) {
196
- return o("li", {
197
- key: r.blockTitle,
198
- class: ["form-nav-item", {
199
- active: t.activeIndex === s
200
- }],
201
- on: {
202
- click: function(n) {
203
- return t.tabClick(r, s);
204
- }
205
- }
206
- }, [t._v(" " + t._s(r.blockTitle) + " ")]);
207
- }), 0)]) : t._e(), t.isFormLoading ? o("LoadingView", {
208
- attrs: {
209
- "icon-size": "34px",
210
- "font-size": "16px"
211
- }
212
- }) : t._e()], 1);
213
- }, $ = [];
214
- const b = [
33
+ import { n as C } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
34
+ const _ = [
215
35
  "back",
216
36
  "create",
217
37
  "save",
@@ -231,17 +51,17 @@ const b = [
231
51
  "disabled",
232
52
  "reload",
233
53
  "slot"
234
- ], S = b.map((t) => `${t}-down`), F = ["back", "withdraw", "edit"], m = ["save", "submit", "", "publish", "agree", "disagree", "reject", "finish", "cancel"], u = (t, e) => {
235
- if (t.classList.contains(e))
236
- return t;
237
- let o = t.parentNode;
238
- for (; o && !o.classList.contains(e); )
54
+ ], T = _.map((e) => `${e}-down`), I = ["back", "withdraw", "edit"], v = ["save", "submit", "", "publish", "agree", "disagree", "reject", "finish", "cancel"], m = (e, t) => {
55
+ if (e.classList.contains(t))
56
+ return e;
57
+ let o = e.parentNode;
58
+ for (; o && !o.classList.contains(t); )
239
59
  o = o.parentNode;
240
- return o.classList.contains(e) ? o : null;
241
- }, k = {
60
+ return o.classList.contains(t) ? o : null;
61
+ }, N = {
242
62
  name: "PresentView",
243
63
  components: {
244
- ResizeObserver: y
64
+ ResizeObserver: L
245
65
  },
246
66
  inject: {
247
67
  flowContext: {
@@ -284,65 +104,65 @@ const b = [
284
104
  },
285
105
  computed: {
286
106
  isFormLoading() {
287
- return this.loading || d(this.$parent, "isFormLoaded") ? !this.$parent.isFormLoaded : !1;
107
+ return this.loading || p(this.$parent, "isFormLoaded") ? !this.$parent.isFormLoaded : !1;
288
108
  },
289
109
  toolbarProps() {
290
110
  var r;
291
- const t = {}, e = ((r = this.toolbarAttrs) == null ? void 0 : r.buttons) || this.$parent.buttons, o = w({}, this.toolbarAttrs, t);
292
- return o.buttons = e || ["back"], o.buttons = p(o.buttons), o;
111
+ const e = {}, t = ((r = this.toolbarAttrs) == null ? void 0 : r.buttons) || this.$parent.buttons, o = B({}, this.toolbarAttrs, e);
112
+ return o.buttons = t || ["back"], o.buttons = S(o.buttons), o;
293
113
  }
294
114
  },
295
115
  created() {
296
- this.$on("FormView.addTab", (t) => {
297
- t && (this.activeIndex === -1 && (this.activeIndex = 0), this.tabs.push(t), this.tabs = this.tabs.sort((e, o) => {
298
- const r = u(e.$el, "form-card"), s = u(o.$el, "form-card");
116
+ this.$on("FormView.addTab", (e) => {
117
+ e && (this.activeIndex === -1 && (this.activeIndex = 0), this.tabs.push(e), this.tabs = this.tabs.sort((t, o) => {
118
+ const r = m(t.$el, "form-card"), s = m(o.$el, "form-card");
299
119
  if (r === s) {
300
- const n = [].indexOf.call(e.$el.parentNode.children, e.$el), l = [].indexOf.call(o.$el.parentNode.children, o.$el);
301
- return n - l;
120
+ const i = [].indexOf.call(t.$el.parentNode.children, t.$el), l = [].indexOf.call(o.$el.parentNode.children, o.$el);
121
+ return i - l;
302
122
  } else {
303
- const n = u(r, "form-scroller"), l = [].indexOf.call(n.children, r), a = [].indexOf.call(n.children, s);
123
+ const i = m(r, "form-scroller"), l = [].indexOf.call(i.children, r), a = [].indexOf.call(i.children, s);
304
124
  return l - a;
305
125
  }
306
- }), t.active && (this.activeIndex = this.tabs.indexOf(t), this.tabClick(t, this.activeIndex)));
307
- }), this.$on("FormView.removeTab", (t) => {
308
- if (t) {
309
- const e = this.tabs.indexOf(t);
310
- this.tabs.splice(e, 1), this.activeIndex > this.tabs.length - 1 && (this.activeIndex = 0);
126
+ }), e.active && (this.activeIndex = this.tabs.indexOf(e), this.tabClick(e, this.activeIndex)));
127
+ }), this.$on("FormView.removeTab", (e) => {
128
+ if (e) {
129
+ const t = this.tabs.indexOf(e);
130
+ this.tabs.splice(t, 1), this.activeIndex > this.tabs.length - 1 && (this.activeIndex = 0);
311
131
  }
312
132
  }), this.onFormResize({ width: window.document.body.clientWidth });
313
133
  },
314
134
  activated() {
315
- return c(this, null, function* () {
135
+ return d(this, null, function* () {
316
136
  this.$refs.formScroller && (yield this.$nextTick(), this.scrollTo(this.formScrollTop, this.formScrollLeft));
317
137
  });
318
138
  },
319
139
  methods: {
320
140
  getToolbarSlotKeys() {
321
- return Object.keys(this.$scopedSlots).filter((t) => b.includes(t));
141
+ return Object.keys(this.$scopedSlots).filter((e) => _.includes(e));
322
142
  },
323
143
  getFooterSlotKeys() {
324
- return Object.keys(this.$scopedSlots).filter((t) => S.includes(t));
144
+ return Object.keys(this.$scopedSlots).filter((e) => T.includes(e));
325
145
  },
326
- getFooterSlotKey(t) {
327
- return t.replace("-down", "");
146
+ getFooterSlotKey(e) {
147
+ return e.replace("-down", "");
328
148
  },
329
- onFormResize({ width: t }) {
330
- this.showNav = t > 1500;
149
+ onFormResize({ width: e }) {
150
+ this.showNav = e > 1500;
331
151
  },
332
152
  onEdit() {
333
- !this.toolbarListeners.edit && d(this.$parent, "disabled") && (this.$parent.disabled = !1);
153
+ !this.toolbarListeners.edit && p(this.$parent, "disabled") && (this.$parent.disabled = !1);
334
154
  },
335
- tabClick(t, e) {
336
- return c(this, null, function* () {
337
- this.showNav && (yield this.$nextTick(), t.expand || (t.open(), yield v(200), yield this.$nextTick()), this.tryByClick = !0, this.activeIndex = e, this.$refs.formScroller.scrollTop = t.$el.offsetTop - 10);
155
+ tabClick(e, t) {
156
+ return d(this, null, function* () {
157
+ this.showNav && (yield this.$nextTick(), e.expand || (e.open(), yield F(200), yield this.$nextTick()), this.tryByClick = !0, this.activeIndex = t, this.$refs.formScroller.scrollTop = e.$el.offsetTop - 10);
338
158
  });
339
159
  },
340
160
  tryActive() {
341
- return c(this, null, function* () {
161
+ return d(this, null, function* () {
342
162
  if (this.showNav) {
343
- for (let t = 0; t < this.tabs.length; t++)
344
- if (_(this.tabs[t].$el, this.$refs.formScroller, { bottomOffset: 10 })) {
345
- this.activeIndex = t;
163
+ for (let e = 0; e < this.tabs.length; e++)
164
+ if (k(this.tabs[e].$el, this.$refs.formScroller, { bottomOffset: 10 })) {
165
+ this.activeIndex = e;
346
166
  break;
347
167
  }
348
168
  }
@@ -351,37 +171,64 @@ const b = [
351
171
  onFormScroll() {
352
172
  this.formScrollTop = this.$refs.formScroller.scrollTop, this.formScrollLeft = this.$refs.formScroller.scrollLeft, !this.tryByClick && this.tabs.length && window.requestAnimationFrame(this.tryActive), this.tryByClick = !1;
353
173
  },
354
- scrollTo(t, e) {
355
- t && (this.$refs.formScroller.scrollTop = t), e && (this.$refs.formScroller.scrollLeft = e);
174
+ scrollTo(e, t) {
175
+ e && (this.$refs.formScroller.scrollTop = e), t && (this.$refs.formScroller.scrollLeft = t);
356
176
  },
357
- getToolbarButtons(t) {
358
- return t.filter((e) => !m.includes(e) && e.indexOf(":down") < 0).map((e) => e.replace(":up", ""));
177
+ getToolbarButtons(e) {
178
+ return e.filter((t) => !v.includes(t) && t.indexOf(":down") < 0).map((t) => t.replace(":up", ""));
359
179
  },
360
- getFooterBarButtons(t) {
361
- let e = t.filter(
362
- (o) => !F.includes(o) && (m.includes(o) || o.indexOf(":down") > -1)
180
+ getFooterBarButtons(e) {
181
+ let t = e.filter(
182
+ (o) => !I.includes(o) && (v.includes(o) || o.indexOf(":down") > -1)
363
183
  ).map((o) => o.replace(":down", ""));
364
- return e = e || [], this.$parent.isEnabled && !e.includes("cancel") && e.push("cancel"), e;
184
+ return t = t || [], this.$parent.isEnabled && !t.includes("cancel") && t.push("cancel"), t;
365
185
  }
366
186
  }
367
- }, h = {};
368
- var B = /* @__PURE__ */ g(
369
- k,
370
- x,
371
- $,
187
+ };
188
+ var O = function() {
189
+ var t = this, o = t._self._c;
190
+ return o("div", { class: ["form-view", t.className] }, [o("div", { directives: [{ name: "show", rawName: "v-show", value: !t.isFormLoading, expression: "!isFormLoading" }], staticClass: "form-view-toolbar" }, [t._t("form-view-toolbar", function() {
191
+ return [o("Toolbar", t._g(t._b({ directives: [{ name: "show", rawName: "v-show", value: t.showToolbar, expression: "showToolbar" }], on: { edit: t.onEdit }, scopedSlots: t._u([{ key: "default", fn: function({ buttons: r }) {
192
+ return [t._t("toolbar-button", null, { buttons: r })];
193
+ } }, t._l(t.getToolbarSlotKeys(), function(r) {
194
+ return { key: r, fn: function() {
195
+ return [t._t(r)];
196
+ }, proxy: !0 };
197
+ }), { key: "toolbar-right", fn: function() {
198
+ return [t._t("toolbar-right")];
199
+ }, proxy: !0 }], null, !0) }, "Toolbar", f(c({}, t.toolbarProps), { buttons: t.getToolbarButtons(t.toolbarProps.buttons) }), !1), t.toolbarListeners))];
200
+ })], 2), o("div", { directives: [{ name: "show", rawName: "v-show", value: !t.isFormLoading, expression: "!isFormLoading" }], staticClass: "form-scroller-wrapper" }, [o("div", { ref: "formScroller", class: ["form-scroller", "absolute-box", t.contentClass], on: { scroll: t.onFormScroll } }, [t.notForm ? o("div", { staticClass: "not-form", style: { width: t.formWidth } }, [t.title ? o("div", { staticClass: "form-view-title" }, [t._v(t._s(t.title))]) : t._e(), t._t("default", function() {
201
+ return [o("EmptyView", { attrs: { "empty-tips": "请添加表单内容" } })];
202
+ }), o("Toolbar", t._g(t._b({ attrs: { footer: "" }, scopedSlots: t._u([{ key: "default", fn: function({ buttons: r, footer: s }) {
203
+ return [t._t("footer-button", null, { buttons: r, footer: s })];
204
+ } }, t._l(t.getFooterSlotKeys(), function(r) {
205
+ return { key: t.getFooterSlotKey(r), fn: function() {
206
+ return [t._t(r)];
207
+ }, proxy: !0 };
208
+ })], null, !0) }, "Toolbar", f(c({}, t.toolbarProps), { buttons: t.getFooterBarButtons(t.toolbarProps.buttons) }), !1), t.toolbarListeners)), t.$scopedSlots["form-bottom"] ? t._t("form-bottom") : t._e()], 2) : o("div", { class: ["form-card", { "un-limit": t.unLimit }], style: { width: `calc(${t.formWidth} + 40px)` } }, [o("div", { staticClass: "form-content" }, [t.title ? o("div", { staticClass: "form-view-title" }, [t._v(t._s(t.title))]) : t._e(), t._t("default", function() {
209
+ return [o("EmptyView", { attrs: { "empty-tips": "请添加表单内容" } })];
210
+ }), t.getFooterBarButtons(t.toolbarProps.buttons).length ? o("Toolbar", t._g(t._b({ attrs: { footer: "" }, scopedSlots: t._u([{ key: "default", fn: function({ buttons: r, footer: s }) {
211
+ return [t._t("footer-button", null, { buttons: r, footer: s })];
212
+ } }, t._l(t.getFooterSlotKeys(), function(r) {
213
+ return { key: t.getFooterSlotKey(r), fn: function() {
214
+ return [t._t(r)];
215
+ }, proxy: !0 };
216
+ })], null, !0) }, "Toolbar", f(c({}, t.toolbarProps), { buttons: t.getFooterBarButtons(t.toolbarProps.buttons) }), !1), t.toolbarListeners)) : t._e()], 2)]), t.$scopedSlots["form-bottom"] || t.$parent.$options.flowForm && t.flowContext.logs.length ? o("div", { class: ["form-card", { "un-limit": t.unLimit }], staticStyle: { "min-height": "0" }, style: { width: `calc(${t.formWidth} + 40px)` } }, [o("div", { staticClass: "form-content" }, [o("FormItemGroup", { attrs: { "block-title": "流程日志" } }, [o("FlowLog", { attrs: { fetch: !1, "show-title": !1, "business-key": t.$parent.bizKey } })], 1), t._t("form-bottom")], 2)]) : t._e()]), o("ResizeObserver", { on: { notify: t.onFormResize } })], 1), t.formNav && !t.isFormLoading && t.showNav && t.tabs.length ? o("div", { staticClass: "form-nav" }, [o("div", { staticClass: "form-nav-header" }, [t._v("表单导航")]), o("ul", { staticClass: "form-nav-list" }, t._l(t.tabs, function(r, s) {
217
+ return o("li", { key: r.blockTitle, class: ["form-nav-item", { active: t.activeIndex === s }], on: { click: function(i) {
218
+ return t.tabClick(r, s);
219
+ } } }, [t._v(" " + t._s(r.blockTitle) + " ")]);
220
+ }), 0)]) : t._e(), t.isFormLoading ? o("LoadingView", { attrs: { "icon-size": "34px", "font-size": "16px" } }) : t._e()], 1);
221
+ }, P = [], z = /* @__PURE__ */ C(
222
+ N,
223
+ O,
224
+ P,
372
225
  !1,
373
- L,
226
+ null,
374
227
  null,
375
228
  null,
376
229
  null
377
230
  );
378
- function L(t) {
379
- for (let e in h)
380
- this[e] = h[e];
381
- }
382
- const j = /* @__PURE__ */ function() {
383
- return B.exports;
384
- }();
231
+ const W = z.exports;
385
232
  export {
386
- j as default
233
+ W as default
387
234
  };