@dfsj/components 3.5.3 → 3.7.0-beta.1

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 (55) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/components/Boards/index.d.ts +2 -2
  3. package/dist/components/Boards/src/Boards.vue.d.ts +77 -6
  4. package/dist/components/Boards/src/Boards.vue2.js +34 -99
  5. package/dist/components/Boards/src/hooKs/useStyle.d.ts +9 -0
  6. package/dist/components/Boards/src/hooKs/useStyle.js +100 -0
  7. package/dist/components/Boards/src/props.d.ts +38 -4
  8. package/dist/components/Boards/src/props.js +20 -1
  9. package/dist/components/ClickOutSide/src/ClickOutSide.vue2.js +1 -1
  10. package/dist/components/Editor/src/Editor.vue2.js +1 -2
  11. package/dist/components/Form/src/Form.vue2.js +2 -3
  12. package/dist/components/Form/src/helper/index.js +1 -1
  13. package/dist/components/Form/src/useForm.js +2 -2
  14. package/dist/components/Highlight/src/Highlight.vue2.js +1 -1
  15. package/dist/components/Icon/src/Icon.vue2.js +1 -2
  16. package/dist/components/InputPassword/src/InputPassword.vue2.js +1 -1
  17. package/dist/components/Modal/src/BasicModal.vue.d.ts +49 -7
  18. package/dist/components/Modal/src/BasicModal.vue2.js +8 -6
  19. package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +42 -5
  20. package/dist/components/Modal/src/components/ModalHeader.vue2.js +16 -5
  21. package/dist/components/Modal/src/config.d.ts +5 -1
  22. package/dist/components/Modal/src/config.js +5 -1
  23. package/dist/components/Modal/src/hooks/useTimeout.js +1 -1
  24. package/dist/components/Modal/src/props.d.ts +19 -2
  25. package/dist/components/Modal/src/props.js +17 -5
  26. package/dist/components/Stateful/src/Stateful.vue2.js +1 -1
  27. package/dist/components/Stateful/src/props.js +1 -1
  28. package/dist/components/Table/src/Table.vue2.js +2 -3
  29. package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +1 -1
  30. package/dist/components/UnifyChart/src/props.js +1 -1
  31. package/dist/components/Video/src/VideoPlayer.vue2.js +1 -1
  32. package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +2 -2
  33. package/dist/components/Windows/index.d.ts +3 -2
  34. package/dist/components/Windows/src/ModalWrap.vue.d.ts +3 -3
  35. package/dist/components/Windows/src/ModalWrap.vue2.js +0 -1
  36. package/dist/components/Windows/src/Windows.vue.d.ts +3 -2
  37. package/dist/components/Windows/src/Windows.vue2.js +8 -3
  38. package/dist/components/Windows/src/Windows.vue3.js +4 -1
  39. package/dist/components/Windows/src/props.d.ts +2 -2
  40. package/dist/directives/clickOutside.js +71 -0
  41. package/dist/directives/index.d.ts +1 -0
  42. package/dist/directives/repeatClick.js +29 -0
  43. package/dist/directives/resizable.d.ts +7 -0
  44. package/dist/directives/resizable.js +196 -0
  45. package/dist/index.d.ts +1 -0
  46. package/dist/index.js +3 -0
  47. package/dist/index.min.css +3 -3
  48. package/dist/node_modules/.pnpm/{@vueuse_core@10.11.1_vue@3.5.11_typescript@5.6.2_ → @vueuse_core@10.11.1_vue@3.5.12_typescript@5.6.2_}/node_modules/@vueuse/core/index.js +5 -183
  49. package/dist/node_modules/.pnpm/{@vueuse_shared@10.11.1_vue@3.5.11_typescript@5.6.2_ → @vueuse_shared@10.11.1_vue@3.5.12_typescript@5.6.2_}/node_modules/@vueuse/shared/index.js +2 -11
  50. package/package.json +6 -6
  51. package/dist/utils/is.d.ts +0 -25
  52. package/dist/utils/is.js +0 -36
  53. package/dist/utils/propTypes.js +0 -34
  54. package/dist/utils/tsxHelper.d.ts +0 -5
  55. package/dist/utils/tsxHelper.js +0 -18
package/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.6.0](http://10.10.12.18/dfsj/dfsj/compare/@dfsj/components@3.1.3...@dfsj/components@3.6.0) (2024-10-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * (components) 类型推断any<VueComponent> ([4b651a7](http://10.10.12.18/dfsj/dfsj/commits/4b651a78a453adafbb906954c746bb2d63dd5aac))
12
+ * (components) UnifyChart.vue ([9a5d4db](http://10.10.12.18/dfsj/dfsj/commits/9a5d4dbe80b10bf9de80718e0b6e18c22cbd0205))
13
+ * **components:** 时间轴主题可配置 ([4bdca6e](http://10.10.12.18/dfsj/dfsj/commits/4bdca6eb7a944bf25c999600cf556146e698eee4))
14
+
15
+
16
+ ### Features
17
+
18
+ * (components) BasicModal支持vh、vw、px、rem ([866c6d2](http://10.10.12.18/dfsj/dfsj/commits/866c6d2447a203329ba3783f6a3edababf91a50c))
19
+ * (components) Descriptions ([5873c14](http://10.10.12.18/dfsj/dfsj/commits/5873c14bc746596c536b203551147de8d2c097c0))
20
+ * (components) UnifyChart.vue 导出方法 ([d4065b9](http://10.10.12.18/dfsj/dfsj/commits/d4065b984d4f97dad21bb55474bb616f2149a16e))
21
+ * **components:** 导出组件 ([d6e313e](http://10.10.12.18/dfsj/dfsj/commits/d6e313e53f09a3a6895f1a212d8341fc5a196cbf))
22
+ * **components:** 新增clickOutSide组件 ([e663b5d](http://10.10.12.18/dfsj/dfsj/commits/e663b5db93844d2052f07861739534956f2f908a))
23
+
24
+
25
+ ### Performance Improvements
26
+
27
+ * (component) 修复升级element-plus以后打包类丢失报错 & Board组件高度设置100% ([5029f65](http://10.10.12.18/dfsj/dfsj/commits/5029f6517b5223c046a5b4ac2fa1751bbaa4cffb))
28
+
29
+
30
+
31
+
32
+
6
33
  ## [3.5.1](http://10.10.12.18/dfsj/dfsj/compare/@dfsj/components@3.1.3...@dfsj/components@3.5.1) (2024-10-09)
7
34
 
8
35
 
@@ -1,4 +1,4 @@
1
- import type { BoardItem, BoardState } from './src/props';
1
+ import type { BoardItem, BoardState, BoardStatus } from './src/props';
2
2
  import { BoardProps, BoardPosition } from './src/props';
3
3
  import Boards from './src/Boards.vue';
4
- export { BoardProps, BoardState, BoardItem, Boards, BoardPosition };
4
+ export { BoardProps, BoardState, BoardStatus, BoardItem, Boards, BoardPosition };
@@ -2,8 +2,37 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2
2
  position: import("vue-types").VueTypeDef<string> & {
3
3
  default: string;
4
4
  };
5
+ display: import("vue-types").VueTypeDef<string> & {
6
+ default: string;
7
+ };
8
+ resizable: {
9
+ type: () => import("vue").PropType<{
10
+ handles: ("l" | "r" | "b" | "t" | "tr" | "br" | "bl" | "tl")[];
11
+ minWidth: number;
12
+ maxWidth: number;
13
+ minHeight: number;
14
+ maxHeight: number;
15
+ handleWidth: number;
16
+ handleZIndex: number;
17
+ display: "fixed" | "absolute";
18
+ disable: boolean;
19
+ }>;
20
+ default: () => {
21
+ minWidth: number;
22
+ maxWidth: number;
23
+ minHeight: number;
24
+ maxHeight: number;
25
+ handleWidth: number;
26
+ handleZIndex: number;
27
+ disable: boolean;
28
+ };
29
+ };
30
+ slotVisible: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
5
34
  board: {
6
- type: () => import("./props").BoardState;
35
+ type: () => import("vue").PropType<import("./props").BoardState>;
7
36
  default: () => {
8
37
  items: any[];
9
38
  index: number;
@@ -12,7 +41,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
12
41
  };
13
42
  };
14
43
  customStyle: {
15
- type: () => import("./props").CustomStyle;
44
+ type: () => import("vue").PropType<import("./props").CustomStyle>;
16
45
  default: () => {
17
46
  margin: any[];
18
47
  fixed: any[];
@@ -25,8 +54,37 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
25
54
  position: import("vue-types").VueTypeDef<string> & {
26
55
  default: string;
27
56
  };
57
+ display: import("vue-types").VueTypeDef<string> & {
58
+ default: string;
59
+ };
60
+ resizable: {
61
+ type: () => import("vue").PropType<{
62
+ handles: ("l" | "r" | "b" | "t" | "tr" | "br" | "bl" | "tl")[];
63
+ minWidth: number;
64
+ maxWidth: number;
65
+ minHeight: number;
66
+ maxHeight: number;
67
+ handleWidth: number;
68
+ handleZIndex: number;
69
+ display: "fixed" | "absolute";
70
+ disable: boolean;
71
+ }>;
72
+ default: () => {
73
+ minWidth: number;
74
+ maxWidth: number;
75
+ minHeight: number;
76
+ maxHeight: number;
77
+ handleWidth: number;
78
+ handleZIndex: number;
79
+ disable: boolean;
80
+ };
81
+ };
82
+ slotVisible: {
83
+ type: BooleanConstructor;
84
+ default: boolean;
85
+ };
28
86
  board: {
29
- type: () => import("./props").BoardState;
87
+ type: () => import("vue").PropType<import("./props").BoardState>;
30
88
  default: () => {
31
89
  items: any[];
32
90
  index: number;
@@ -35,7 +93,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
35
93
  };
36
94
  };
37
95
  customStyle: {
38
- type: () => import("./props").CustomStyle;
96
+ type: () => import("vue").PropType<import("./props").CustomStyle>;
39
97
  default: () => {
40
98
  margin: any[];
41
99
  fixed: any[];
@@ -44,7 +102,20 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
44
102
  };
45
103
  }>> & Readonly<{}>, {
46
104
  position: string;
47
- board: import("./props").BoardState;
48
- customStyle: import("./props").CustomStyle;
105
+ display: string;
106
+ resizable: import("vue").PropType<{
107
+ handles: ("l" | "r" | "b" | "t" | "tr" | "br" | "bl" | "tl")[];
108
+ minWidth: number;
109
+ maxWidth: number;
110
+ minHeight: number;
111
+ maxHeight: number;
112
+ handleWidth: number;
113
+ handleZIndex: number;
114
+ display: "fixed" | "absolute";
115
+ disable: boolean;
116
+ }>;
117
+ slotVisible: boolean;
118
+ board: import("vue").PropType<import("./props").BoardState>;
119
+ customStyle: import("vue").PropType<import("./props").CustomStyle>;
49
120
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
50
121
  export default _default;
@@ -1,12 +1,10 @@
1
- import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
- import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
3
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
- import { defineComponent, toRefs, ref, computed, unref, onMounted, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, withModifiers, createVNode, Fragment, withCtx, renderList, createBlock, toDisplayString, withDirectives, resolveDynamicComponent, markRaw, mergeProps, vShow, defineAsyncComponent } from 'vue';
2
+ import { defineComponent, ref, toRefs, computed, watchEffect, toRaw, unref, resolveComponent, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, withModifiers, createVNode, createCommentVNode, createElementVNode, Fragment, withCtx, renderList, createBlock, toDisplayString, resolveDynamicComponent, markRaw, mergeProps, vShow, renderSlot, defineAsyncComponent } from 'vue';
5
3
  import { BoardProps, BoardPosition } from './props.js';
6
4
  import '../../Icon/src/Icon.vue.js';
7
5
  import '../../Icon/src/SvgIcon.vue.js';
8
- import { useElementBounding } from '../../../node_modules/.pnpm/@vueuse_core@10.11.1_vue@3.5.11_typescript@5.6.2_/node_modules/@vueuse/core/index.js';
9
- import { isString } from '../../../utils/is.js';
6
+ import { useStyle } from './hooKs/useStyle.js';
7
+ import vResizable from '../../../directives/resizable.js';
10
8
  import script$1 from '../../Icon/src/Icon.vue2.js';
11
9
 
12
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -28,19 +26,18 @@ var script = defineComponent({
28
26
  setup: function setup(__props) {
29
27
  var cache = new Map();
30
28
  var props = __props;
29
+ var el = ref(null);
31
30
  var _toRefs = toRefs(props),
32
- position = _toRefs.position,
33
- board = _toRefs.board,
34
- customStyle = _toRefs.customStyle;
31
+ resizable = _toRefs.resizable,
32
+ display = _toRefs.display;
33
+ var _useStyle = useStyle(props),
34
+ getStyle = _useStyle.getStyle,
35
+ position = _useStyle.position,
36
+ board = _useStyle.board,
37
+ customStyle = _useStyle.customStyle;
35
38
  var isAsyncComponent = function isAsyncComponent(component) {
36
39
  return !!(component && component.__asyncLoader);
37
40
  };
38
- var el = ref(null);
39
- var _useElementBounding = useElementBounding(el),
40
- top = _useElementBounding.top,
41
- right = _useElementBounding.right,
42
- bottom = _useElementBounding.bottom,
43
- left = _useElementBounding.left;
44
41
  var color = computed(function () {
45
42
  var _customStyle$value$co;
46
43
  return (_customStyle$value$co = customStyle.value.color) !== null && _customStyle$value$co !== void 0 ? _customStyle$value$co : '#11848f';
@@ -60,105 +57,41 @@ var script = defineComponent({
60
57
  board.value.index = id === null || id === void 0 ? void 0 : id.index;
61
58
  }
62
59
  var toggle = function toggle() {
63
- board.value.state = board.value.state === 'spread' ? 'minify' : 'spread';
60
+ return board.value.state = board.value.state === 'spread' ? 'minify' : 'spread';
64
61
  };
65
62
  var icon = computed(function () {
66
- if (board.value.state == 'hidden') return null;
67
- return 'ic:round-chevron-right';
63
+ return board.value.state == 'hidden' ? null : 'ic:round-chevron-right';
68
64
  });
69
65
  var tabPosition = computed(function () {
70
66
  var mapping = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BoardPosition.EAST, 'right'), BoardPosition.WEST, 'left'), BoardPosition.SOUTH, 'top'), BoardPosition.TOP, 'top');
71
67
  return mapping === null || mapping === void 0 ? void 0 : mapping[position.value];
72
68
  });
73
- var transform = computed(function () {
74
- var _transform = '';
75
- if (board.value.state == 'spread') {
76
- _transform = '';
77
- } else {
78
- if (position.value == BoardPosition.WEST) {
79
- _transform = "translateX(-".concat(right.value, "px)");
80
- } else if (position.value == BoardPosition.EAST) {
81
- _transform = "translateX(".concat(window.innerWidth - left.value, "px)");
82
- } else if (position.value == BoardPosition.SOUTH) {
83
- _transform = "translateY(".concat(window.innerHeight - top.value, "px)");
84
- } else if (position.value == BoardPosition.TOP) {
85
- _transform = "translateY(-".concat(bottom.value, "px)");
86
- }
87
- }
88
- return _transform;
89
- });
90
- var getStyle = computed(function () {
91
- var _customStyle$value$fi;
92
- var fixed = {};
93
- var margin = '';
94
- if (((_customStyle$value$fi = customStyle.value.fixed) === null || _customStyle$value$fi === void 0 ? void 0 : _customStyle$value$fi.length) != 4) {
95
- customStyle.value.fixed = [0, 0, 0, 0];
96
- }
97
- if (isString(customStyle.value.margin)) {
98
- margin = customStyle.value.margin;
99
- } else {
100
- var _customStyle$value$ma;
101
- if (((_customStyle$value$ma = customStyle.value.margin) === null || _customStyle$value$ma === void 0 ? void 0 : _customStyle$value$ma.length) != 4) {
102
- customStyle.value.margin = [0, 0, 0, 0];
103
- margin = _toConsumableArray(unref(customStyle).margin).join(' ');
104
- }
105
- }
106
- var _customStyle$value$fi2 = _slicedToArray(customStyle.value.fixed, 4),
107
- t = _customStyle$value$fi2[0],
108
- r = _customStyle$value$fi2[1],
109
- b = _customStyle$value$fi2[2],
110
- l = _customStyle$value$fi2[3];
111
- if ([BoardPosition.EAST, BoardPosition.WEST].includes(position.value)) {
112
- fixed = {
113
- top: t || 0,
114
- bottom: b || 0
115
- };
116
- } else if ([BoardPosition.FULL].includes(position.value)) {
117
- fixed = {
118
- top: t || 0,
119
- bottom: b || 0,
120
- left: l || 0,
121
- right: r || 0
122
- };
123
- } else if ([BoardPosition.TOP].includes(position.value)) {
124
- fixed = {
125
- top: t || 0,
126
- left: l || 0,
127
- right: r || 0
128
- };
129
- } else {
130
- fixed = {
131
- left: l || 0,
132
- right: r || 0
133
- };
134
- }
135
- return _objectSpread(_objectSpread({}, fixed), {}, {
136
- margin: margin,
137
- transform: transform.value
138
- });
139
- });
140
- onMounted(function () {
69
+ watchEffect(function () {
141
70
  var _el$value;
142
- el === null || el === void 0 || (_el$value = el.value) === null || _el$value === void 0 || (_el$value = _el$value.style) === null || _el$value === void 0 || _el$value.setProperty('--board-tab-color', color.value);
71
+ return el === null || el === void 0 || (_el$value = el.value) === null || _el$value === void 0 || (_el$value = _el$value.style) === null || _el$value === void 0 ? void 0 : _el$value.setProperty('--board-tab-color', color.value);
72
+ });
73
+ var handlesMapping = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BoardPosition.EAST, ['l']), BoardPosition.WEST, ['r']), BoardPosition.TOP, ['b']), BoardPosition.SOUTH, ['t']);
74
+ var handles = computed(function () {
75
+ var _handlesMapping$toRaw;
76
+ return (_handlesMapping$toRaw = handlesMapping === null || handlesMapping === void 0 ? void 0 : handlesMapping[toRaw(unref(position))]) !== null && _handlesMapping$toRaw !== void 0 ? _handlesMapping$toRaw : [];
143
77
  });
144
- watch(function () {
145
- return customStyle.value.color;
146
- }, function () {
147
- var _el$value2;
148
- el === null || el === void 0 || (_el$value2 = el.value) === null || _el$value2 === void 0 || (_el$value2 = _el$value2.style) === null || _el$value2 === void 0 || _el$value2.setProperty('--board-tab-color', color.value);
149
- }, {
150
- deep: true
78
+ var getResizable = computed(function () {
79
+ return _objectSpread(_objectSpread({}, resizable.value), {}, {
80
+ display: display.value,
81
+ handles: handles.value
82
+ });
151
83
  });
152
84
  return function (_ctx, _cache) {
153
85
  var _unref2;
154
86
  var _component_el_tab_pane = resolveComponent("el-tab-pane");
155
87
  var _component_el_tabs = resolveComponent("el-tabs");
156
- return openBlock(), createElementBlock("div", {
157
- "class": normalizeClass([prefixCls, unref(board).state, unref(position), 'p-2']),
158
- style: normalizeStyle(getStyle.value),
88
+ return withDirectives((openBlock(), createElementBlock("div", {
89
+ "class": normalizeClass([prefixCls, unref(display), unref(board).state, unref(position), 'p-2 box-border']),
90
+ style: normalizeStyle(unref(getStyle)),
159
91
  ref_key: "el",
160
92
  ref: el
161
- }, [createElementVNode("span", {
93
+ }, [unref(board).items.length ? (openBlock(), createElementBlock("span", {
94
+ key: 0,
162
95
  onClick: withModifiers(toggle, ["stop"]),
163
96
  "class": normalizeClass(['board--wing', {
164
97
  hidden: !icon.value
@@ -166,7 +99,7 @@ var script = defineComponent({
166
99
  }, [createVNode(unref(script$1), {
167
100
  size: 26,
168
101
  icon: icon.value
169
- }, null, 8, ["icon"])], 2), createElementVNode("div", {
102
+ }, null, 8, ["icon"])], 2)) : createCommentVNode("v-if", true), createElementVNode("div", {
170
103
  "class": normalizeClass("".concat(prefixCls, "__layout h-full flex"))
171
104
  }, [unref(board).items.length > 1 ? (openBlock(), createElementBlock(Fragment, {
172
105
  key: 0
@@ -209,7 +142,9 @@ var script = defineComponent({
209
142
  key: item.id,
210
143
  ref_for: true
211
144
  }, item.props), null, 16)), [[vShow, unref(board).value === item.id]]);
212
- }), 128))]))], 2)], 6);
145
+ }), 128))]))], 2), props.slotVisible ? renderSlot(_ctx.$slots, "default", {
146
+ key: 1
147
+ }) : createCommentVNode("v-if", true)], 6)), [[unref(vResizable), getResizable.value]]);
213
148
  };
214
149
  }
215
150
  });
@@ -0,0 +1,9 @@
1
+ export declare function useStyle(props: any): {
2
+ position: import("vue").Ref<any, any>;
3
+ board: import("vue").Ref<any, any>;
4
+ customStyle: import("vue").Ref<any, any>;
5
+ getStyle: import("vue").ComputedRef<{
6
+ margin: string;
7
+ transform: string;
8
+ }>;
9
+ };
@@ -0,0 +1,100 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
3
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
4
+ import { toRefs, computed, unref } from 'vue';
5
+ import { BoardPosition } from '../props.js';
6
+
7
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9
+ function useStyle(props) {
10
+ var _toRefs = toRefs(props),
11
+ position = _toRefs.position,
12
+ board = _toRefs.board,
13
+ customStyle = _toRefs.customStyle;
14
+ var margin = computed(function () {
15
+ var _customStyle$value, _customStyle$value2;
16
+ if (((_customStyle$value = customStyle.value) === null || _customStyle$value === void 0 || (_customStyle$value = _customStyle$value.margin) === null || _customStyle$value === void 0 ? void 0 : _customStyle$value.length) != 4) {
17
+ return [0, 0, 0, 0];
18
+ }
19
+ return (_customStyle$value2 = customStyle.value) === null || _customStyle$value2 === void 0 ? void 0 : _customStyle$value2.margin;
20
+ });
21
+ var marginCssStr = computed(function () {
22
+ return _toConsumableArray(unref(margin.value)).join(' ');
23
+ });
24
+ var fixed = computed(function () {
25
+ var _customStyle$value$fi, _customStyle$value3;
26
+ if (((_customStyle$value$fi = customStyle.value.fixed) === null || _customStyle$value$fi === void 0 ? void 0 : _customStyle$value$fi.length) != 4) {
27
+ return [0, 0, 0, 0];
28
+ }
29
+ return (_customStyle$value3 = customStyle.value) === null || _customStyle$value3 === void 0 ? void 0 : _customStyle$value3.fixed;
30
+ });
31
+ var getTransform = computed(function () {
32
+ var transform = '';
33
+ if (board.value.state !== 'spread') {
34
+ if (position.value == BoardPosition.WEST) {
35
+ var _calc = margin.value[3] ? "calc( -100% - ".concat(margin.value[3]) : '-100%';
36
+ transform = "translateX( ".concat(_calc, ")");
37
+ } else if (position.value == BoardPosition.EAST) {
38
+ var _calc2 = margin.value[1] ? "calc( 100% + ".concat(margin.value[1]) : '100%';
39
+ transform = "translateX( ".concat(_calc2, ")");
40
+ } else if (position.value == BoardPosition.SOUTH) {
41
+ var _calc3 = margin.value[2] ? "calc( 100% + ".concat(margin.value[2]) : '100%';
42
+ transform = "translateY(".concat(_calc3, ")");
43
+ } else if (position.value == BoardPosition.TOP) {
44
+ var _calc4 = margin.value[0] ? "calc( - 100% - ".concat(margin.value[0]) : '-100%';
45
+ transform = "translateY(".concat(_calc4, ")");
46
+ }
47
+ }
48
+ return transform;
49
+ });
50
+ var getStyle = computed(function () {
51
+ var _fixed = {};
52
+ var _fixed$value = _slicedToArray(fixed.value, 4),
53
+ t = _fixed$value[0],
54
+ r = _fixed$value[1],
55
+ b = _fixed$value[2],
56
+ l = _fixed$value[3];
57
+ switch (position.value) {
58
+ case BoardPosition.EAST:
59
+ case BoardPosition.WEST:
60
+ _fixed = {
61
+ top: t || 0,
62
+ bottom: b || 0
63
+ };
64
+ break;
65
+ case BoardPosition.FULL:
66
+ _fixed = {
67
+ top: t || 0,
68
+ bottom: b || 0,
69
+ left: l || 0,
70
+ right: r || 0
71
+ };
72
+ break;
73
+ case BoardPosition.TOP:
74
+ _fixed = {
75
+ top: t || 0,
76
+ left: l || 0,
77
+ right: r || 0
78
+ };
79
+ break;
80
+ default:
81
+ _fixed = {
82
+ left: l || 0,
83
+ right: r || 0
84
+ };
85
+ break;
86
+ }
87
+ return _objectSpread(_objectSpread({}, _fixed), {}, {
88
+ margin: marginCssStr.value,
89
+ transform: getTransform.value
90
+ });
91
+ });
92
+ return {
93
+ position: position,
94
+ board: board,
95
+ customStyle: customStyle,
96
+ getStyle: getStyle
97
+ };
98
+ }
99
+
100
+ export { useStyle };
@@ -1,4 +1,17 @@
1
- import { AsyncComponentLoader } from 'vue';
1
+ import { AsyncComponentLoader, PropType } from 'vue';
2
+ type Handle = 't' | 'r' | 'b' | 'l' | 'tr' | 'br' | 'bl' | 'tl';
3
+ type Handles = Array<Handle>;
4
+ type ResizableConfig = {
5
+ handles: Handles;
6
+ minWidth: number;
7
+ maxWidth: number;
8
+ minHeight: number;
9
+ maxHeight: number;
10
+ handleWidth: number;
11
+ handleZIndex: number;
12
+ display: 'fixed' | 'absolute';
13
+ disable: boolean;
14
+ };
2
15
  export type BoardItem = {
3
16
  id: string | number;
4
17
  label: string;
@@ -7,10 +20,11 @@ export type BoardItem = {
7
20
  };
8
21
  export type BoardState = {
9
22
  items: BoardItem[];
10
- state: 'minify' | 'spread' | 'hidden';
23
+ state: BoardStatus;
11
24
  index: number;
12
25
  value: string | number;
13
26
  };
27
+ export type BoardStatus = 'minify' | 'spread' | 'hidden';
14
28
  export type CustomStyle = {
15
29
  margin?: [string | number, string | number, string | number, string | number];
16
30
  fixed?: [string | number, string | number, string | number, string | number];
@@ -27,8 +41,27 @@ export declare const BoardProps: {
27
41
  position: import("vue-types").VueTypeDef<string> & {
28
42
  default: string;
29
43
  };
44
+ display: import("vue-types").VueTypeDef<string> & {
45
+ default: string;
46
+ };
47
+ resizable: {
48
+ type: () => PropType<ResizableConfig>;
49
+ default: () => {
50
+ minWidth: number;
51
+ maxWidth: number;
52
+ minHeight: number;
53
+ maxHeight: number;
54
+ handleWidth: number;
55
+ handleZIndex: number;
56
+ disable: boolean;
57
+ };
58
+ };
59
+ slotVisible: {
60
+ type: BooleanConstructor;
61
+ default: boolean;
62
+ };
30
63
  board: {
31
- type: () => BoardState;
64
+ type: () => PropType<BoardState>;
32
65
  default: () => {
33
66
  items: any[];
34
67
  index: number;
@@ -37,7 +70,7 @@ export declare const BoardProps: {
37
70
  };
38
71
  };
39
72
  customStyle: {
40
- type: () => CustomStyle;
73
+ type: () => PropType<CustomStyle>;
41
74
  default: () => {
42
75
  margin: any[];
43
76
  fixed: any[];
@@ -45,3 +78,4 @@ export declare const BoardProps: {
45
78
  };
46
79
  };
47
80
  };
81
+ export {};
@@ -1,4 +1,4 @@
1
- import propTypes from '../../../utils/propTypes.js';
1
+ import { propTypes } from '@dfsj/utils';
2
2
 
3
3
  var BoardPosition;
4
4
  (function (BoardPosition) {
@@ -10,6 +10,25 @@ var BoardPosition;
10
10
  })(BoardPosition || (BoardPosition = {}));
11
11
  var BoardProps = {
12
12
  position: propTypes.oneOf(['east', 'top', 'west', 'south', 'full']).def('east'),
13
+ display: propTypes.oneOf(['fixed', 'absolute']).def('fixed'),
14
+ resizable: {
15
+ type: Object,
16
+ "default": function _default() {
17
+ return {
18
+ minWidth: 10,
19
+ maxWidth: window.innerWidth,
20
+ minHeight: 10,
21
+ maxHeight: window.innerHeight,
22
+ handleWidth: 8,
23
+ handleZIndex: 100,
24
+ disable: false
25
+ };
26
+ }
27
+ },
28
+ slotVisible: {
29
+ type: Boolean,
30
+ "default": true
31
+ },
13
32
  board: {
14
33
  type: Object,
15
34
  "default": function _default() {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onMounted, openBlock, createElementBlock, renderSlot } from 'vue';
2
- import { onClickOutside } from '../../../node_modules/.pnpm/@vueuse_core@10.11.1_vue@3.5.11_typescript@5.6.2_/node_modules/@vueuse/core/index.js';
2
+ import { onClickOutside } from '../../../node_modules/.pnpm/@vueuse_core@10.11.1_vue@3.5.12_typescript@5.6.2_/node_modules/@vueuse/core/index.js';
3
3
 
4
4
  var script = defineComponent({
5
5
  __name: 'ClickOutSide',
@@ -5,8 +5,7 @@ import { Toolbar, Editor } from '@wangeditor/editor-for-vue';
5
5
  import { i18nChangeLanguage } from '@wangeditor/editor';
6
6
  import '@wangeditor/editor/dist/css/style.css';
7
7
  import { ElMessage } from 'element-plus';
8
- import { isNumber } from '../../../utils/is.js';
9
- import propTypes from '../../../utils/propTypes.js';
8
+ import { propTypes, isNumber } from '@dfsj/utils';
10
9
 
11
10
  var _hoisted_1 = {
12
11
  "class": "border-1 border-solid border-[var(--el-border-color)] z-10"
@@ -4,8 +4,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
4
  import _regeneratorRuntime from '@babel/runtime/regenerator';
5
5
  import { ElCol, ElForm, ElFormItem, ElRow } from 'element-plus';
6
6
  import { componentMap } from './helper/componentMap.js';
7
- import propTypes from '../../../utils/propTypes.js';
8
- import { getSlot } from '../../../utils/tsxHelper.js';
7
+ import { propTypes, getSlot } from '@dfsj/utils';
9
8
  import { initModel, setGridProp, setItemComponentSlots, setTextPlaceholder, setComponentProps } from './helper/index.js';
10
9
  import { useRenderSelect } from './components/useRenderSelect.js';
11
10
  import { useRenderRadio } from './components/useRenderRadio.js';
@@ -14,7 +13,7 @@ import { findIndex } from '../../../utils/index.js';
14
13
  import { set, get } from 'lodash-es';
15
14
  import { ComponentNameEnum } from './types/index.js';
16
15
 
17
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
16
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e ) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
18
17
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
19
18
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
20
19
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import { ComponentNameEnum } from '../types/index.js';
3
- import { isFunction } from '../../../../utils/is.js';
3
+ import { isFunction } from '@dfsj/utils';
4
4
  import { humpToDash, firstUpperCase } from '../../../../utils/index.js';
5
5
  import { get, set } from 'lodash-es';
6
6
  import { getLabel } from '../../../../helper/lang.js';
@@ -1,7 +1,7 @@
1
1
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
2
2
  import _regeneratorRuntime from '@babel/runtime/regenerator';
3
3
  import { ref, unref, nextTick } from 'vue';
4
- import { isEmptyVal, isObject } from '../../../utils/is.js';
4
+ import { isEmpty, isObject } from '@dfsj/utils';
5
5
 
6
6
  var useForm = function useForm() {
7
7
  var formRef = ref();
@@ -172,7 +172,7 @@ var useForm = function useForm() {
172
172
  }
173
173
  return _context7.abrupt("return", Object.keys(model).reduce(function (prev, next) {
174
174
  var value = model[next];
175
- if (!isEmptyVal(value)) {
175
+ if (!isEmpty(value)) {
176
176
  if (isObject(value)) {
177
177
  if (Object.keys(value).length > 0) {
178
178
  prev[next] = value;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, h, unref } from 'vue';
2
- import propTypes from '../../../utils/propTypes.js';
2
+ import { propTypes } from '@dfsj/utils';
3
3
 
4
4
  var script = defineComponent({
5
5
  name: 'Highlight',
@@ -3,8 +3,7 @@ import _regeneratorRuntime from '@babel/runtime/regenerator';
3
3
  import { defineComponent, ref, computed, watch, onMounted, openBlock, createBlock, normalizeClass, createElementBlock, normalizeStyle, unref, nextTick } from 'vue';
4
4
  import './SvgIcon.vue.js';
5
5
  import Iconify from '@iconify/iconify';
6
- import { isString } from '../../../utils/is.js';
7
- import propTypes from '../../../utils/propTypes.js';
6
+ import { propTypes, isString } from '@dfsj/utils';
8
7
  import script$1 from './SvgIcon.vue2.js';
9
8
 
10
9
  var SVG_END_WITH_FLAG = '|svg';