@dfsj/components 3.6.0 → 3.7.0-beta.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 (54) hide show
  1. package/dist/components/Boards/index.d.ts +4 -3
  2. package/dist/components/Boards/src/Boards.vue.d.ts +47 -6
  3. package/dist/components/Boards/src/Boards.vue2.js +37 -102
  4. package/dist/components/Boards/src/hooKs/useStyle.d.ts +9 -0
  5. package/dist/components/Boards/src/hooKs/useStyle.js +100 -0
  6. package/dist/components/Boards/src/props.d.ts +48 -11
  7. package/dist/components/Boards/src/props.js +29 -10
  8. package/dist/components/Editor/src/Editor.vue2.js +1 -2
  9. package/dist/components/Form/src/Form.vue2.js +2 -3
  10. package/dist/components/Form/src/helper/index.js +1 -1
  11. package/dist/components/Form/src/useForm.js +2 -2
  12. package/dist/components/Highlight/src/Highlight.vue2.js +1 -1
  13. package/dist/components/Icon/src/Icon.vue2.js +1 -2
  14. package/dist/components/InputPassword/src/InputPassword.vue2.js +1 -1
  15. package/dist/components/Modal/src/BasicModal.vue.d.ts +49 -7
  16. package/dist/components/Modal/src/BasicModal.vue2.js +8 -6
  17. package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +42 -5
  18. package/dist/components/Modal/src/components/ModalHeader.vue2.js +16 -5
  19. package/dist/components/Modal/src/config.d.ts +5 -1
  20. package/dist/components/Modal/src/config.js +5 -1
  21. package/dist/components/Modal/src/props.d.ts +19 -2
  22. package/dist/components/Modal/src/props.js +17 -5
  23. package/dist/components/Stateful/src/Stateful.vue2.js +1 -1
  24. package/dist/components/Stateful/src/props.js +1 -1
  25. package/dist/components/Table/src/Table.vue2.js +2 -3
  26. package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +1 -1
  27. package/dist/components/UnifyChart/src/props.js +1 -1
  28. package/dist/components/Video/src/VideoPlayer.vue2.js +1 -1
  29. package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +1 -1
  30. package/dist/components/Windows/index.d.ts +3 -2
  31. package/dist/components/Windows/src/ModalWrap.vue.d.ts +3 -3
  32. package/dist/components/Windows/src/ModalWrap.vue2.js +0 -1
  33. package/dist/components/Windows/src/Windows.vue.d.ts +3 -2
  34. package/dist/components/Windows/src/Windows.vue2.js +8 -3
  35. package/dist/components/Windows/src/Windows.vue3.js +4 -1
  36. package/dist/components/Windows/src/props.d.ts +2 -2
  37. package/dist/directives/clickOutside.js +71 -0
  38. package/dist/directives/index.d.ts +1 -0
  39. package/dist/directives/repeatClick.js +29 -0
  40. package/dist/directives/resizable.d.ts +7 -0
  41. package/dist/directives/resizable.js +196 -0
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.js +4 -1
  44. package/dist/index.min.css +3 -3
  45. package/dist/node_modules/.pnpm/@vueuse_core@10.11.1_vue@3.5.12_typescript@5.6.2_/node_modules/@vueuse/core/index.js +4 -182
  46. package/dist/node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.5.12_typescript@5.6.2_/node_modules/@vueuse/shared/index.js +2 -11
  47. package/package.json +4 -4
  48. package/dist/node_modules/.pnpm/@vueuse_core@10.11.1_vue@3.5.11_typescript@5.6.2_/node_modules/@vueuse/core/index.js +0 -513
  49. package/dist/node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.5.11_typescript@5.6.2_/node_modules/@vueuse/shared/index.js +0 -49
  50. package/dist/utils/is.d.ts +0 -25
  51. package/dist/utils/is.js +0 -36
  52. package/dist/utils/propTypes.js +0 -34
  53. package/dist/utils/tsxHelper.d.ts +0 -5
  54. package/dist/utils/tsxHelper.js +0 -18
@@ -1,4 +1,5 @@
1
- import type { BoardItem, BoardState } from './src/props';
2
- import { BoardProps, BoardPosition } from './src/props';
1
+ import type { BoardItem, BoardState, BoardPosition, BoardStatus, BoardCustomStyle, ResizableConfig } from './src/props';
2
+ import { BoardProps, BoardPositionEnum } from './src/props';
3
3
  import Boards from './src/Boards.vue';
4
- export { BoardProps, BoardState, BoardItem, Boards, BoardPosition };
4
+ export type { BoardItem, BoardState, BoardPosition, BoardStatus, BoardCustomStyle, ResizableConfig };
5
+ export { BoardProps, Boards, BoardPositionEnum };
@@ -2,8 +2,27 @@ 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<import("./props").ResizableConfig>;
10
+ default: () => {
11
+ minWidth: number;
12
+ maxWidth: number;
13
+ minHeight: number;
14
+ maxHeight: number;
15
+ handleWidth: number;
16
+ handleZIndex: number;
17
+ disable: boolean;
18
+ };
19
+ };
20
+ slotVisible: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
5
24
  board: {
6
- type: () => import("./props").BoardState;
25
+ type: () => import("vue").PropType<import("./props").BoardState>;
7
26
  default: () => {
8
27
  items: any[];
9
28
  index: number;
@@ -12,7 +31,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
12
31
  };
13
32
  };
14
33
  customStyle: {
15
- type: () => import("./props").CustomStyle;
34
+ type: () => import("vue").PropType<import("./props").BoardCustomStyle>;
16
35
  default: () => {
17
36
  margin: any[];
18
37
  fixed: any[];
@@ -25,8 +44,27 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
25
44
  position: import("vue-types").VueTypeDef<string> & {
26
45
  default: string;
27
46
  };
47
+ display: import("vue-types").VueTypeDef<string> & {
48
+ default: string;
49
+ };
50
+ resizable: {
51
+ type: () => import("vue").PropType<import("./props").ResizableConfig>;
52
+ default: () => {
53
+ minWidth: number;
54
+ maxWidth: number;
55
+ minHeight: number;
56
+ maxHeight: number;
57
+ handleWidth: number;
58
+ handleZIndex: number;
59
+ disable: boolean;
60
+ };
61
+ };
62
+ slotVisible: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
28
66
  board: {
29
- type: () => import("./props").BoardState;
67
+ type: () => import("vue").PropType<import("./props").BoardState>;
30
68
  default: () => {
31
69
  items: any[];
32
70
  index: number;
@@ -35,7 +73,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
35
73
  };
36
74
  };
37
75
  customStyle: {
38
- type: () => import("./props").CustomStyle;
76
+ type: () => import("vue").PropType<import("./props").BoardCustomStyle>;
39
77
  default: () => {
40
78
  margin: any[];
41
79
  fixed: any[];
@@ -44,7 +82,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
44
82
  };
45
83
  }>> & Readonly<{}>, {
46
84
  position: string;
47
- board: import("./props").BoardState;
48
- customStyle: import("./props").CustomStyle;
85
+ display: string;
86
+ resizable: import("vue").PropType<import("./props").ResizableConfig>;
87
+ slotVisible: boolean;
88
+ board: import("vue").PropType<import("./props").BoardState>;
89
+ customStyle: import("vue").PropType<import("./props").BoardCustomStyle>;
49
90
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
50
91
  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';
5
- import { BoardProps, BoardPosition } from './props.js';
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';
3
+ import { BoardProps, BoardPositionEnum } 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.12_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
- var mapping = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BoardPosition.EAST, 'right'), BoardPosition.WEST, 'left'), BoardPosition.SOUTH, 'top'), BoardPosition.TOP, 'top');
66
+ var mapping = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, BoardPositionEnum.EAST, 'right'), BoardPositionEnum.WEST, 'left'), BoardPositionEnum.SOUTH, 'bottom'), BoardPositionEnum.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({}, BoardPositionEnum.EAST, ['l']), BoardPositionEnum.WEST, ['r']), BoardPositionEnum.TOP, ['b']), BoardPositionEnum.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,8 +99,8 @@ 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", {
170
- "class": normalizeClass("".concat(prefixCls, "__layout h-full flex"))
102
+ }, null, 8, ["icon"])], 2)) : createCommentVNode("v-if", true), createElementVNode("div", {
103
+ "class": normalizeClass("".concat(prefixCls, "__layout overflow-hidden h-full flex"))
171
104
  }, [unref(board).items.length > 1 ? (openBlock(), createElementBlock(Fragment, {
172
105
  key: 0
173
106
  }, [createElementVNode("div", null, [createVNode(_component_el_tabs, {
@@ -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 { BoardPositionEnum } 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 == BoardPositionEnum.WEST) {
35
+ var _calc = margin.value[3] ? "calc( -100% - ".concat(margin.value[3]) : '-100%';
36
+ transform = "translateX( ".concat(_calc, ")");
37
+ } else if (position.value == BoardPositionEnum.EAST) {
38
+ var _calc2 = margin.value[1] ? "calc( 100% + ".concat(margin.value[1]) : '100%';
39
+ transform = "translateX( ".concat(_calc2, ")");
40
+ } else if (position.value == BoardPositionEnum.SOUTH) {
41
+ var _calc3 = margin.value[2] ? "calc( 100% + ".concat(margin.value[2]) : '100%';
42
+ transform = "translateY(".concat(_calc3, ")");
43
+ } else if (position.value == BoardPositionEnum.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 BoardPositionEnum.EAST:
59
+ case BoardPositionEnum.WEST:
60
+ _fixed = {
61
+ top: t || 0,
62
+ bottom: b || 0
63
+ };
64
+ break;
65
+ case BoardPositionEnum.FULL:
66
+ _fixed = {
67
+ top: t || 0,
68
+ bottom: b || 0,
69
+ left: l || 0,
70
+ right: r || 0
71
+ };
72
+ break;
73
+ case BoardPositionEnum.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,34 +1,70 @@
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
+ export 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;
5
- props?: any;
6
- content: AsyncComponentLoader;
18
+ props?: {
19
+ [key: string]: any;
20
+ };
21
+ content: AsyncComponentLoader | Function;
7
22
  };
8
23
  export type BoardState = {
9
24
  items: BoardItem[];
10
- state: 'minify' | 'spread' | 'hidden';
25
+ state: BoardStatus;
11
26
  index: number;
12
- value: string | number;
27
+ value: string | number | null;
13
28
  };
14
- export type CustomStyle = {
15
- margin?: [string | number, string | number, string | number, string | number];
16
- fixed?: [string | number, string | number, string | number, string | number];
29
+ export type BoardStatus = 'minify' | 'spread' | 'hidden';
30
+ export type BoardCustomStyle = {
31
+ margin?: [string, string, string, string];
32
+ fixed?: [string, string, string, string];
17
33
  color?: string;
18
34
  };
19
- export declare enum BoardPosition {
35
+ export declare enum BoardPositionEnum {
20
36
  EAST = "east",
21
37
  TOP = "top",
22
38
  WEST = "west",
23
39
  SOUTH = "south",
24
40
  FULL = "full"
25
41
  }
42
+ export type BoardPosition = typeof BoardPositionEnum[keyof typeof BoardPositionEnum];
26
43
  export declare const BoardProps: {
27
44
  position: import("vue-types").VueTypeDef<string> & {
28
45
  default: string;
29
46
  };
47
+ display: import("vue-types").VueTypeDef<string> & {
48
+ default: string;
49
+ };
50
+ resizable: {
51
+ type: () => PropType<ResizableConfig>;
52
+ default: () => {
53
+ minWidth: number;
54
+ maxWidth: number;
55
+ minHeight: number;
56
+ maxHeight: number;
57
+ handleWidth: number;
58
+ handleZIndex: number;
59
+ disable: boolean;
60
+ };
61
+ };
62
+ slotVisible: {
63
+ type: BooleanConstructor;
64
+ default: boolean;
65
+ };
30
66
  board: {
31
- type: () => BoardState;
67
+ type: () => PropType<BoardState>;
32
68
  default: () => {
33
69
  items: any[];
34
70
  index: number;
@@ -37,7 +73,7 @@ export declare const BoardProps: {
37
73
  };
38
74
  };
39
75
  customStyle: {
40
- type: () => CustomStyle;
76
+ type: () => PropType<BoardCustomStyle>;
41
77
  default: () => {
42
78
  margin: any[];
43
79
  fixed: any[];
@@ -45,3 +81,4 @@ export declare const BoardProps: {
45
81
  };
46
82
  };
47
83
  };
84
+ export {};
@@ -1,15 +1,34 @@
1
- import propTypes from '../../../utils/propTypes.js';
1
+ import { propTypes } from '@dfsj/utils';
2
2
 
3
- var BoardPosition;
4
- (function (BoardPosition) {
5
- BoardPosition["EAST"] = "east";
6
- BoardPosition["TOP"] = "top";
7
- BoardPosition["WEST"] = "west";
8
- BoardPosition["SOUTH"] = "south";
9
- BoardPosition["FULL"] = "full";
10
- })(BoardPosition || (BoardPosition = {}));
3
+ var BoardPositionEnum;
4
+ (function (BoardPositionEnum) {
5
+ BoardPositionEnum["EAST"] = "east";
6
+ BoardPositionEnum["TOP"] = "top";
7
+ BoardPositionEnum["WEST"] = "west";
8
+ BoardPositionEnum["SOUTH"] = "south";
9
+ BoardPositionEnum["FULL"] = "full";
10
+ })(BoardPositionEnum || (BoardPositionEnum = {}));
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() {
@@ -33,4 +52,4 @@ var BoardProps = {
33
52
  }
34
53
  };
35
54
 
36
- export { BoardPosition, BoardProps };
55
+ export { BoardPositionEnum, BoardProps };
@@ -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';
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, watch, unref, ref, computed, openBlock, createElementBlock, normalizeClass, createVNode, mergeProps, createElementVNode, createCommentVNode } from 'vue';
2
2
  import { ElInput } from 'element-plus';
3
- import propTypes from '../../../utils/propTypes.js';
3
+ import { propTypes } from '@dfsj/utils';
4
4
  import { zxcvbn } from '@zxcvbn-ts/core';
5
5
 
6
6
  var _hoisted_1 = ["data-score"];