fangguo-component 1.1.0 → 1.1.2

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 (67) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/README.md +13 -11
  3. package/dist/{CustomInputV2-DYEcbu5_.js → CustomInputV2-uARhbFc8.js} +12 -12
  4. package/dist/CustomInputV2.css +1 -1
  5. package/dist/DragResizable.css +1 -1
  6. package/dist/DragResizable.vue_vue_type_style_index_0_lang-CHv0gJmo.js +179 -0
  7. package/dist/FgCascader.css +1 -1
  8. package/dist/FgCascader.vue_vue_type_style_index_0_lang-BUZDDcVn.js +1656 -0
  9. package/dist/{HSelect-Bqz2yTMf.js → HSelect-Drf6YBwO.js} +69 -69
  10. package/dist/{HSelectAll.vue_vue_type_script_setup_true_lang-C8i6LF_k.js → HSelectAll.vue_vue_type_script_setup_true_lang-Blq9xpfa.js} +1 -1
  11. package/dist/{HSelectSJ-BieRp2gG.js → HSelectSJ-D3GrXmvj.js} +104 -104
  12. package/dist/SelectTree-Dm5259kY.js +911 -0
  13. package/dist/SelectTree.css +1 -1
  14. package/dist/TextCopy-hOj-Wj2H.js +41 -0
  15. package/dist/TextCopy.css +1 -0
  16. package/dist/VirtualTable-BWugJiQ5.js +349 -0
  17. package/dist/VirtualTable.css +1 -1
  18. package/dist/components/VirtualTable/VirtualTable.vue.d.ts +3 -3
  19. package/dist/components/VirtualTable/index.d.ts +1 -0
  20. package/dist/components/VirtualTable/index.js +1 -1
  21. package/dist/components/cascader/cascader/ElCascader.vue.d.ts +3 -0
  22. package/dist/components/cascader/cascader/FgCascader.vue.d.ts +16 -4
  23. package/dist/components/cascader/cascader/cascader.d.ts +1 -0
  24. package/dist/components/cascader/index.js +1 -1
  25. package/dist/components/citySelect/demos/mockAddressTree.d.ts +8 -0
  26. package/dist/components/customInputV2/CustomInputV2.vue.d.ts +1 -1
  27. package/dist/components/customInputV2/index.js +1 -1
  28. package/dist/components/dragResizable/DragResizable.vue.d.ts +2 -0
  29. package/dist/components/dragResizable/index.js +1 -1
  30. package/dist/components/hSelect/demos/mockApi.d.ts +12 -0
  31. package/dist/components/hSelect/index.js +1 -1
  32. package/dist/components/hSelectAll/demos/mockApi.d.ts +10 -0
  33. package/dist/components/hSelectAll/index.js +1 -1
  34. package/dist/components/hSelectSJ/demos/mockApi.d.ts +11 -0
  35. package/dist/components/hSelectSJ/index.js +1 -1
  36. package/dist/components/index.d.ts +0 -2
  37. package/dist/components/index.js +42 -46
  38. package/dist/components/selectAddress/demos/mockAddressTree.d.ts +7 -0
  39. package/dist/components/selectTimePicker/SelectTimePicker.vue.d.ts +1 -1
  40. package/dist/components/selectTree/demos/treeData.d.ts +9 -0
  41. package/dist/components/selectTree/index.js +1 -1
  42. package/dist/components/textCopy/index.js +1 -1
  43. package/dist/index-BRcBDlVs.js +68 -0
  44. package/dist/index.css +1 -0
  45. package/dist/index.d.ts +4 -2
  46. package/dist/index.js +145 -149
  47. package/dist/vue-virtual-scroller.esm-CH-jx4ri.js +1051 -0
  48. package/package.json +8 -8
  49. package/dist/DragResizable.vue_vue_type_style_index_0_lang-DYL6TUPE.js +0 -167
  50. package/dist/FgCascader.vue_vue_type_style_index_0_lang-OnqaEAao.js +0 -1807
  51. package/dist/SelectTree-C7lBZnZH.js +0 -306
  52. package/dist/SortTransfer.css +0 -1
  53. package/dist/SortTransfer.vue_vue_type_style_index_0_lang-C5OmBF3s.js +0 -153
  54. package/dist/TextCopy.vue_vue_type_script_setup_true_lang-DbhZGH_z.js +0 -29
  55. package/dist/TipInput-CIskitOV.js +0 -117
  56. package/dist/TipInput.css +0 -1
  57. package/dist/VirtualTable-BYTfwDC1.js +0 -353
  58. package/dist/components/sortTransfer/SortTransfer.vue.d.ts +0 -97
  59. package/dist/components/sortTransfer/index.d.ts +0 -1
  60. package/dist/components/sortTransfer/index.js +0 -4
  61. package/dist/components/tipInput/TipInput.vue.d.ts +0 -56
  62. package/dist/components/tipInput/index.d.ts +0 -1
  63. package/dist/components/tipInput/index.js +0 -4
  64. package/dist/debounce-BLrZUqsA.js +0 -84
  65. package/dist/index-BKzmtfeu.js +0 -72
  66. package/dist/isEqual-qYQTJBU6.js +0 -506
  67. package/dist/isObject-CO569sPG.js +0 -35
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fangguo-component",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -45,15 +45,15 @@
45
45
  "fingerprintjs2": "^2.1.4",
46
46
  "js-sha1": "^0.7.0",
47
47
  "lodash-unified": "^1.0.3",
48
- "utif2": "^4.1.0"
48
+ "utif2": "^4.1.0",
49
+ "vue-virtual-scroller": "2.0.0-beta.8"
49
50
  },
50
51
  "peerDependencies": {
51
52
  "@element-plus/icons-vue": "^2.3.2",
52
53
  "element-plus": "2.13.7",
53
54
  "sass": "^1.53.0",
54
55
  "tailwindcss": "^3.3.1",
55
- "vue": "^3.5.3",
56
- "vue-virtual-scroller": "2.0.0-beta.8"
56
+ "vue": "^3.5.3"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@commitlint/cli": "^21.0.0",
@@ -64,9 +64,11 @@
64
64
  "@vue/shared": "^3.5.27",
65
65
  "@vue/tsconfig": "^0.8.1",
66
66
  "@vueuse/core": "^14.1.0",
67
+ "address-parse": "^1.2.19",
67
68
  "element-plus": "2.13.7",
68
69
  "husky": "^9.1.7",
69
70
  "lint-staged": "^17.0.4",
71
+ "lodash-es": "^4.18.1",
70
72
  "oxfmt": "^0.27.0",
71
73
  "oxlint": "^1.42.0",
72
74
  "sass": "^1.53.0",
@@ -83,11 +85,9 @@
83
85
  "vue": "^3.5.3",
84
86
  "vue-tsc": "^3.2.4",
85
87
  "vue-virtual-scroller": "2.0.0-beta.8",
86
- "address-parse": "^1.2.19"
88
+ "@vitejs/plugin-vue-jsx": "^5.1.1"
87
89
  },
88
90
  "lint-staged": {
89
- "*.{ts,vue,js}": [
90
- "oxlint --fix"
91
- ]
91
+ "*.{ts,vue,js}": "node scripts/lint-staged-oxlint.mjs"
92
92
  }
93
93
  }
@@ -1,167 +0,0 @@
1
- import { defineComponent as j, ref as G, onMounted as I, openBlock as y, createElementBlock as S, normalizeClass as z, Fragment as J, renderList as K, createElementVNode as X, createCommentVNode as Y, renderSlot as k } from "vue";
2
- import './DragResizable.css';const O = ["data-direction"], Q = { class: "dialog-content" }, Z = /* @__PURE__ */ j({
3
- __name: "DragResizable",
4
- props: {
5
- width: { default: 600 },
6
- height: { default: 400 },
7
- minWidth: { default: 400 },
8
- minHeight: { default: 250 },
9
- left: {},
10
- top: {},
11
- handles: { default: () => ["t", "r", "b", "l", "rt", "rb", "lb", "lt"] },
12
- draggable: { type: Boolean, default: !0 },
13
- resizable: { type: Boolean, default: !0 },
14
- overflowScreen: { type: Boolean, default: !1 },
15
- floating: { type: Boolean, default: !0 },
16
- parentSelector: { default: "" }
17
- },
18
- emits: ["resizing", "dragging", "resizeStop", "dragStop"],
19
- setup(c, { emit: C }) {
20
- const H = G(), l = c, p = C;
21
- let i = null, w, v, f, g, u, m, s, W, L, b = !1, x = !1;
22
- const q = () => {
23
- if (!l.parentSelector)
24
- return {
25
- left: 0,
26
- top: 0,
27
- right: window.innerWidth,
28
- bottom: window.innerHeight,
29
- width: window.innerWidth,
30
- height: window.innerHeight
31
- };
32
- const t = document.querySelector(l.parentSelector);
33
- if (!t)
34
- return {
35
- left: 0,
36
- top: 0,
37
- right: window.innerWidth,
38
- bottom: window.innerHeight,
39
- width: window.innerWidth,
40
- height: window.innerHeight
41
- };
42
- const e = t.getBoundingClientRect();
43
- return {
44
- left: 0,
45
- // 相对于父元素的左边距
46
- top: 0,
47
- // 相对于父元素的上边距
48
- right: e.width,
49
- bottom: e.height,
50
- width: e.width,
51
- height: e.height
52
- };
53
- }, N = () => {
54
- var e, n;
55
- if (i = H.value, !i) return;
56
- let t = {
57
- left: (e = l.left) != null ? e : window.innerWidth - l.width,
58
- top: (n = l.top) != null ? n : window.innerHeight - l.height,
59
- width: l.width,
60
- height: l.height
61
- };
62
- if (t = $(t.left, t.top, t.width, t.height), t = M(t.left, t.top, t.width, t.height), l.floating ? (i.style.left = `${t.left}px`, i.style.top = `${t.top}px`, i.style.height = `${t.height}px`) : i.style.height = "100%", l.parentSelector) {
63
- const r = document.querySelector(l.parentSelector);
64
- r && window.getComputedStyle(r).position === "static" && (r.style.position = "relative");
65
- }
66
- i.style.width = `${t.width}px`, i.style.minWidth = `${l.minWidth}px`, i.style.minHeight = `${l.minHeight}px`, t.width, t.height, t.left, t.top;
67
- };
68
- function P(t) {
69
- t.preventDefault(), b = !0, s = t.target.getAttribute("data-direction"), w = t.clientX, v = t.clientY, f = i.offsetWidth, g = i.offsetHeight, u = i.offsetTop, m = i.offsetLeft, document.addEventListener("mousemove", E), document.addEventListener("mouseup", B), i.classList.add("resizing");
70
- }
71
- function E(t) {
72
- if (!b) return;
73
- let e = f, n = g, r = u, a = m;
74
- const A = t.clientX, F = t.clientY, d = A - w, h = F - v;
75
- s.includes("t") ? (n = g - h, r = u + h) : s.includes("r") ? e = f + d : s.includes("b") ? n = g + h : s.includes("l") && (e = f - d, a = m + d), s.length === 2 && (s === "rt" ? (n = g - h, r = u + h, e = f + d) : s === "rb" ? (e = f + d, n = g + h) : s === "lb" ? (e = f - d, a = m + d, n = g + h) : s === "lt" && (e = f - d, n = g - h, a = m + d, r = u + h));
76
- let o = {
77
- left: a,
78
- top: r,
79
- width: e,
80
- height: n
81
- };
82
- o = $(o.left, o.top, o.width, o.height), o = M(o.left, o.top, o.width, o.height), i.style.width = `${o.width}px`, i.style.height = `${o.height}px`, l.floating && (i.style.top = `${o.top}px`, i.style.left = `${o.left}px`), o.width, o.height, o.left, o.top, p("resizing", o);
83
- }
84
- function B() {
85
- b = !1, document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", B), i.classList.remove("resizing"), p("resizeStop", {
86
- width: i.offsetWidth,
87
- height: i.offsetHeight,
88
- left: i.offsetLeft,
89
- top: i.offsetTop
90
- });
91
- }
92
- function V(t) {
93
- l.draggable && (t.preventDefault(), x = !0, W = i.offsetLeft, L = i.offsetTop, w = t.clientX, v = t.clientY, document.addEventListener("mousemove", D), document.addEventListener("mouseup", R), i.classList.add("dragging"));
94
- }
95
- function D(t) {
96
- if (!l.floating || !x) return;
97
- let e = {
98
- left: W + (t.clientX - w),
99
- top: L + (t.clientY - v),
100
- width: i.offsetWidth,
101
- height: i.offsetHeight
102
- };
103
- e = $(e.left, e.top, e.width, e.height), e = M(e.left, e.top, e.width, e.height), i.style.left = `${e.left}px`, i.style.top = `${e.top}px`, e.left, e.top, p("dragging", {
104
- left: e.left,
105
- top: e.top,
106
- width: e.width,
107
- height: e.height
108
- });
109
- }
110
- function R() {
111
- x = !1, document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", R), i.classList.remove("dragging"), p("dragStop", {
112
- left: i.offsetLeft,
113
- top: i.offsetTop,
114
- width: i.offsetWidth,
115
- height: i.offsetHeight
116
- });
117
- }
118
- const $ = (t, e, n, r) => (l.overflowScreen || (t = Math.min(Math.max(t, 0), window.innerWidth - i.offsetWidth), e = Math.min(Math.max(e, 0), window.innerHeight - i.offsetHeight), n = Math.min(n, window.innerWidth - t), r = Math.min(r, window.innerHeight - e)), {
119
- left: t,
120
- top: e,
121
- width: n,
122
- height: r
123
- }), M = (t, e, n, r) => {
124
- if (l.parentSelector) {
125
- const a = q();
126
- t = Math.min(t, a.width - i.offsetWidth), e = Math.min(e, a.height - i.offsetHeight), t = Math.max(t, 0), e = Math.max(e, 0), n = Math.min(n, a.width - t), r = Math.min(r, a.height - e);
127
- }
128
- return {
129
- left: t,
130
- top: e,
131
- width: n,
132
- height: r
133
- };
134
- };
135
- return I(() => {
136
- N();
137
- }), (t, e) => (y(), S("div", {
138
- class: z(["customer-move-dialog", { floating: c.floating, "parent-constrained": c.parentSelector }]),
139
- ref_key: "moveDialogRef",
140
- ref: H
141
- }, [
142
- c.resizable ? (y(!0), S(J, { key: 0 }, K(c.handles, (n, r) => (y(), S("div", {
143
- class: z(["resize-handle", `resize-handle-${n}`]),
144
- "data-direction": n,
145
- key: r,
146
- onMousedown: P
147
- }, [
148
- X("div", {
149
- class: z(["resize-handle-area", `resize-handle-area-${n}`])
150
- }, null, 2)
151
- ], 42, O))), 128)) : Y("", !0),
152
- c.floating ? (y(), S("div", {
153
- key: 1,
154
- class: z(["drag-header", c.draggable ? "draggable" : ""]),
155
- onMousedown: V
156
- }, [
157
- k(t.$slots, "header")
158
- ], 34)) : Y("", !0),
159
- X("div", Q, [
160
- k(t.$slots, "default")
161
- ])
162
- ], 2));
163
- }
164
- });
165
- export {
166
- Z as _
167
- };