@dfsj/components 3.7.1 → 3.7.2-alpha.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.
- package/dist/components/Boards/src/Boards.vue.d.ts +11 -0
- package/dist/components/Boards/src/Boards.vue2.js +27 -31
- package/dist/components/Boards/src/hooKs/useStyle.js +5 -5
- package/dist/components/Boards/src/props.d.ts +5 -0
- package/dist/components/Boards/src/props.js +2 -1
- package/dist/components/ClickOutSide/src/ClickOutSide.vue2.js +1 -1
- package/dist/components/{src/components/Descriptions → Descriptions}/src/Descriptions.vue.d.ts +12 -12
- package/dist/components/Descriptions/src/Descriptions.vue2.js +4 -4
- package/dist/components/Editor/src/Editor.vue.d.ts +4 -4
- package/dist/components/Editor/src/Editor.vue2.js +5 -5
- package/dist/components/Form/src/Form.vue.d.ts +481 -447
- package/dist/components/Form/src/Form.vue2.js +30 -24
- package/dist/components/Form/src/components/useRenderCheckbox.js +8 -8
- package/dist/components/Form/src/components/useRenderRadio.js +8 -8
- package/dist/components/Form/src/components/useRenderSelect.js +11 -11
- package/dist/components/Form/src/helper/componentMap.js +0 -2
- package/dist/components/Form/src/helper/index.js +7 -7
- package/dist/components/Form/src/types/index.d.ts +2 -2
- package/dist/components/Form/src/useForm.js +63 -63
- package/dist/components/Highlight/src/Highlight.vue.d.ts +4 -4
- package/dist/components/Highlight/src/Highlight.vue2.js +3 -3
- package/dist/components/Icon/src/Icon.vue.d.ts +8 -8
- package/dist/components/Icon/src/Icon.vue2.js +11 -11
- package/dist/components/{src/components/InputPassword → InputPassword}/src/InputPassword.vue.d.ts +4 -4
- package/dist/components/Modal/src/BasicModal.vue.d.ts +68 -15
- package/dist/components/Modal/src/BasicModal.vue2.js +20 -17
- package/dist/components/{src/components/Modal → Modal}/src/components/ModalFooter.vue.d.ts +4 -4
- package/dist/components/Modal/src/components/ModalFooter.vue2.js +17 -7
- package/dist/components/{src/components/Modal → Modal}/src/components/ModalHeader.vue.d.ts +63 -10
- package/dist/components/Modal/src/components/ModalHeader.vue2.js +3 -3
- package/dist/components/Modal/src/config.js +2 -2
- package/dist/components/Modal/src/hooks/useModalDrag.js +9 -2
- package/dist/components/Modal/src/hooks/useTimeout.js +1 -1
- package/dist/components/{src/components/Modal → Modal}/src/props.d.ts +31 -7
- package/dist/components/Modal/src/props.js +9 -1
- package/dist/components/Modal/src/utils/index.js +1 -1
- package/dist/components/NodeAxis/src/CanvasNodeRender.js +35 -35
- package/dist/components/NodeAxis/src/NodeAxis.vue2.js +1 -1
- package/dist/components/NodeAxis/src/NodeModel.js +10 -10
- package/dist/components/NodeAxis/src/NodeRender.js +3 -3
- package/dist/components/NodeAxis/src/TimerNodePlayer.js +4 -4
- package/dist/components/Stateful/src/Stateful.vue.d.ts +2 -2
- package/dist/components/Stateful/src/Stateful.vue2.js +6 -6
- package/dist/components/Stateful/src/props.d.ts +1 -1
- package/dist/components/Table/src/Table.vue.d.ts +732 -645
- package/dist/components/Table/src/Table.vue2.js +10 -10
- package/dist/components/Table/src/components/ColumnSetting.vue2.js +20 -20
- package/dist/components/Table/src/components/TableActions.vue.d.ts +229 -0
- package/dist/components/Table/src/components/TableActions.vue2.js +1 -1
- package/dist/components/Table/src/useTable.js +50 -50
- package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +8 -8
- package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +2 -2
- package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +16 -16
- package/dist/components/UnifyChart/src/UnifyChart.vue2.js +2 -2
- package/dist/components/UnifyChart/src/hooks/useLoader.js +19 -19
- package/dist/components/UnifyChart/src/hooks/useRender.js +3 -3
- package/dist/components/UnifyChart/src/props.d.ts +13 -13
- package/dist/components/UnifyChart/src/useDownLoad.d.ts +9 -0
- package/dist/components/UnifyChart/src/useDownLoad.js +27 -0
- package/dist/components/Video/src/VideoPlayer.vue.d.ts +14 -14
- package/dist/components/Video/src/VideoPlayer.vue2.js +5 -5
- package/dist/components/{src/components/Video → Video}/src/VideoPlayerToolbar.vue.d.ts +12 -12
- package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +4 -4
- package/dist/components/Video/src/abstract/VideoControl.js +13 -13
- package/dist/components/Video/src/control/DaHua.js +8 -8
- package/dist/components/Video/src/control/Hikvision.js +12 -12
- package/dist/components/Visual/src/BufferLayerPlayer.js +65 -68
- package/dist/components/Visual/src/ResolvableLayerProvider.js +5 -5
- package/dist/components/Visual/src/resolvers/IntervalResolver.js +9 -9
- package/dist/components/Visual/src/resolvers/tools.resolver.js +8 -1
- package/dist/components/Visual/src/utils/NodeMath.js +1 -1
- package/dist/components/Windows/src/ModalWrap.vue2.js +52 -8
- package/dist/components/Windows/src/Windows.vue2.js +3 -3
- package/dist/components/Windows/src/props.d.ts +8 -3
- package/dist/directives/clickOutside.js +3 -3
- package/dist/directives/repeatClick.js +1 -1
- package/dist/directives/resizable.js +4 -4
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.min.css +3 -3
- package/dist/node_modules/.pnpm/{@vueuse_core@10.11.1_vue@3.5.13_typescript@5.7.3_ → @vueuse_core@13.7.0_vue@3.5.19_typescript@5.9.2_}/node_modules/@vueuse/core/index.js +151 -93
- package/dist/node_modules/.pnpm/@vueuse_shared@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/shared/index.js +53 -0
- package/package.json +66 -66
- package/dist/components/DatePicker/index.d.ts +0 -2
- package/dist/components/DatePicker/src/composables/use-month-range-header.js +0 -52
- package/dist/components/DatePicker/src/composables/use-range-picker.js +0 -99
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.js +0 -5
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue2.js +0 -564
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.js +0 -5
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue2.js +0 -210
- package/dist/components/DatePicker/src/index.d.ts +0 -218
- package/dist/components/DatePicker/src/index.js +0 -87
- package/dist/components/DatePicker/src/panel-utils.d.ts +0 -2
- package/dist/components/DatePicker/src/panel-utils.js +0 -25
- package/dist/components/src/components/ClickOutSide/src/ClickOutSide.vue.d.ts +0 -7
- package/dist/components/src/components/DatePicker/src/composables/use-month-range-header.d.ts +0 -16
- package/dist/components/src/components/DatePicker/src/composables/use-range-picker.d.ts +0 -173
- package/dist/components/src/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +0 -19
- package/dist/components/src/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +0 -16
- package/dist/components/src/components/Highlight/src/Highlight.vue.d.ts +0 -41
- package/dist/components/src/components/NodeAxis/src/BCanvasNodeRender.d.ts +0 -19
- package/dist/components/src/components/NodeAxis/src/NodeAxis.d.ts +0 -12
- package/dist/components/src/components/Table/src/components/TableActions.vue.d.ts +0 -96
- package/dist/components/src/themes/index.d.ts +0 -1
- package/dist/node_modules/.pnpm/@vueuse_shared@10.11.1_vue@3.5.13_typescript@5.7.3_/node_modules/@vueuse/shared/index.js +0 -40
- /package/dist/components/{src/components/Boards → Boards}/src/hooKs/useStyle.d.ts +0 -0
- /package/dist/components/{src/components/Form → Form}/src/components/useRenderCheckbox.d.ts +0 -0
- /package/dist/components/{src/components/Form → Form}/src/components/useRenderRadio.d.ts +0 -0
- /package/dist/components/{src/components/Form → Form}/src/components/useRenderSelect.d.ts +0 -0
- /package/dist/components/{src/components/Form → Form}/src/helper/componentMap.d.ts +0 -0
- /package/dist/components/{src/components/Form → Form}/src/helper/index.d.ts +0 -0
- /package/dist/components/{src/components/Modal → Modal}/src/config.d.ts +0 -0
- /package/dist/components/{src/components/Modal → Modal}/src/hooks/useModalDrag.d.ts +0 -0
- /package/dist/components/{src/components/Modal → Modal}/src/hooks/useTimeout.d.ts +0 -0
- /package/dist/components/{src/components/Modal → Modal}/src/utils/index.d.ts +0 -0
- /package/dist/components/{src/components/NodeAxis → NodeAxis}/src/NodeAxis.vue.d.ts +0 -0
- /package/dist/components/{src/components/NodeAxis → NodeAxis}/src/TimerNodePlayer.d.ts +0 -0
- /package/dist/components/{src/components/NodeAxis → NodeAxis}/src/interface/NodePlayer.d.ts +0 -0
- /package/dist/components/{src/components/Table → Table}/src/components/ColumnSetting.vue.d.ts +0 -0
- /package/dist/components/{src/components/Table → Table}/src/helper/index.d.ts +0 -0
- /package/dist/components/{src/components/Video → Video}/src/abstract/AbstractVideoControl.d.ts +0 -0
- /package/dist/components/{src/components/Video → Video}/src/abstract/Observable.d.ts +0 -0
- /package/dist/components/{src/components/Video → Video}/src/abstract/VideoControl.d.ts +0 -0
- /package/dist/components/{src/components/Video → Video}/src/control/DaHua.d.ts +0 -0
- /package/dist/components/{src/components/Video → Video}/src/control/Hikvision.d.ts +0 -0
- /package/dist/components/{src/components/Video → Video}/src/control/VideoFactory.d.ts +0 -0
- /package/dist/components/{src/components/Video → Video}/src/enums/CommonEnum.d.ts +0 -0
- /package/dist/components/{src/components/Windows → Windows}/src/ModalWrap.vue.d.ts +0 -0
- /package/dist/{components/src/helper → helper}/lang.d.ts +0 -0
- /package/dist/{components/src/utils → utils}/index.d.ts +0 -0
|
@@ -1,45 +1,27 @@
|
|
|
1
|
-
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
1
|
import '@babel/runtime/helpers/typeof';
|
|
2
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
7
7
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
8
|
-
import { noop, isIOS, tryOnScopeDispose,
|
|
9
|
-
export { getLifeCycleTarget, tryOnUnmounted } from '../../../../@vueuse_shared@
|
|
10
|
-
import { computed,
|
|
8
|
+
import { noop, isIOS, tryOnMounted, tryOnScopeDispose, toArray, watchImmediate, isClient, isObject } from '../../../../@vueuse_shared@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/shared/index.js';
|
|
9
|
+
export { getLifeCycleTarget, tryOnUnmounted } from '../../../../@vueuse_shared@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/shared/index.js';
|
|
10
|
+
import { computed, shallowRef, toValue, unref, getCurrentInstance, onMounted } from 'vue';
|
|
11
11
|
|
|
12
12
|
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; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
13
|
+
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; }
|
|
14
|
+
var defaultWindow = isClient ? window : void 0;
|
|
15
|
+
var defaultDocument = isClient ? window.document : void 0;
|
|
14
16
|
function unrefElement(elRef) {
|
|
15
17
|
var _a;
|
|
16
18
|
var plain = toValue(elRef);
|
|
17
|
-
return (_a = plain == null ?
|
|
19
|
+
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
18
20
|
}
|
|
19
|
-
var defaultWindow = isClient ? window : undefined;
|
|
20
|
-
var defaultDocument = isClient ? window.document : undefined;
|
|
21
21
|
function useEventListener() {
|
|
22
|
-
var target;
|
|
23
|
-
var events;
|
|
24
|
-
var listeners;
|
|
25
|
-
var options;
|
|
26
22
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
27
23
|
args[_key3] = arguments[_key3];
|
|
28
24
|
}
|
|
29
|
-
if (typeof args[0] === "string" || Array.isArray(args[0])) {
|
|
30
|
-
events = args[0];
|
|
31
|
-
listeners = args[1];
|
|
32
|
-
options = args[2];
|
|
33
|
-
target = defaultWindow;
|
|
34
|
-
} else {
|
|
35
|
-
target = args[0];
|
|
36
|
-
events = args[1];
|
|
37
|
-
listeners = args[2];
|
|
38
|
-
options = args[3];
|
|
39
|
-
}
|
|
40
|
-
if (!target) return noop;
|
|
41
|
-
if (!Array.isArray(events)) events = [events];
|
|
42
|
-
if (!Array.isArray(listeners)) listeners = [listeners];
|
|
43
25
|
var cleanups = [];
|
|
44
26
|
var cleanup = function cleanup() {
|
|
45
27
|
cleanups.forEach(function (fn) {
|
|
@@ -47,59 +29,88 @@ function useEventListener() {
|
|
|
47
29
|
});
|
|
48
30
|
cleanups.length = 0;
|
|
49
31
|
};
|
|
50
|
-
var register = function register(el, event, listener,
|
|
51
|
-
el.addEventListener(event, listener,
|
|
32
|
+
var register = function register(el, event, listener, options) {
|
|
33
|
+
el.addEventListener(event, listener, options);
|
|
52
34
|
return function () {
|
|
53
|
-
return el.removeEventListener(event, listener,
|
|
35
|
+
return el.removeEventListener(event, listener, options);
|
|
54
36
|
};
|
|
55
37
|
};
|
|
56
|
-
var
|
|
57
|
-
|
|
38
|
+
var firstParamTargets = computed(function () {
|
|
39
|
+
var test = toArray(toValue(args[0])).filter(function (e) {
|
|
40
|
+
return e != null;
|
|
41
|
+
});
|
|
42
|
+
return test.every(function (e) {
|
|
43
|
+
return typeof e !== "string";
|
|
44
|
+
}) ? test : void 0;
|
|
45
|
+
});
|
|
46
|
+
var stopWatch = watchImmediate(function () {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
return [(_b = (_a = firstParamTargets.value) == null ? void 0 : _a.map(function (e) {
|
|
49
|
+
return unrefElement(e);
|
|
50
|
+
})) != null ? _b : [defaultWindow].filter(function (e) {
|
|
51
|
+
return e != null;
|
|
52
|
+
}), toArray(toValue(firstParamTargets.value ? args[1] : args[0])), toArray(unref(firstParamTargets.value ? args[2] : args[1])),
|
|
53
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
54
|
+
toValue(firstParamTargets.value ? args[3] : args[2])];
|
|
58
55
|
}, function (_ref5) {
|
|
59
|
-
var _ref6 = _slicedToArray(_ref5,
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
var _ref6 = _slicedToArray(_ref5, 4),
|
|
57
|
+
raw_targets = _ref6[0],
|
|
58
|
+
raw_events = _ref6[1],
|
|
59
|
+
raw_listeners = _ref6[2],
|
|
60
|
+
raw_options = _ref6[3];
|
|
62
61
|
cleanup();
|
|
63
|
-
if (!
|
|
64
|
-
var optionsClone = isObject(
|
|
65
|
-
cleanups.push.apply(cleanups, _toConsumableArray(
|
|
66
|
-
return
|
|
67
|
-
return
|
|
62
|
+
if (!(raw_targets == null ? void 0 : raw_targets.length) || !(raw_events == null ? void 0 : raw_events.length) || !(raw_listeners == null ? void 0 : raw_listeners.length)) return;
|
|
63
|
+
var optionsClone = isObject(raw_options) ? _objectSpread({}, raw_options) : raw_options;
|
|
64
|
+
cleanups.push.apply(cleanups, _toConsumableArray(raw_targets.flatMap(function (el) {
|
|
65
|
+
return raw_events.flatMap(function (event) {
|
|
66
|
+
return raw_listeners.map(function (listener) {
|
|
67
|
+
return register(el, event, listener, optionsClone);
|
|
68
|
+
});
|
|
68
69
|
});
|
|
69
70
|
})));
|
|
70
71
|
}, {
|
|
71
|
-
immediate: true,
|
|
72
72
|
flush: "post"
|
|
73
73
|
});
|
|
74
74
|
var stop = function stop() {
|
|
75
75
|
stopWatch();
|
|
76
76
|
cleanup();
|
|
77
77
|
};
|
|
78
|
-
tryOnScopeDispose(
|
|
78
|
+
tryOnScopeDispose(cleanup);
|
|
79
79
|
return stop;
|
|
80
80
|
}
|
|
81
81
|
var _iOSWorkaround = false;
|
|
82
82
|
function onClickOutside(target, handler) {
|
|
83
83
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
84
84
|
var _options$window = options.window,
|
|
85
|
-
window = _options$window ===
|
|
85
|
+
window = _options$window === void 0 ? defaultWindow : _options$window,
|
|
86
86
|
_options$ignore = options.ignore,
|
|
87
|
-
ignore = _options$ignore ===
|
|
87
|
+
ignore = _options$ignore === void 0 ? [] : _options$ignore,
|
|
88
88
|
_options$capture = options.capture,
|
|
89
|
-
capture = _options$capture ===
|
|
89
|
+
capture = _options$capture === void 0 ? true : _options$capture,
|
|
90
90
|
_options$detectIframe = options.detectIframe,
|
|
91
|
-
detectIframe = _options$detectIframe ===
|
|
92
|
-
|
|
91
|
+
detectIframe = _options$detectIframe === void 0 ? false : _options$detectIframe,
|
|
92
|
+
_options$controls = options.controls,
|
|
93
|
+
controls = _options$controls === void 0 ? false : _options$controls;
|
|
94
|
+
if (!window) {
|
|
95
|
+
return controls ? {
|
|
96
|
+
stop: noop,
|
|
97
|
+
cancel: noop,
|
|
98
|
+
trigger: noop
|
|
99
|
+
} : noop;
|
|
100
|
+
}
|
|
93
101
|
if (isIOS && !_iOSWorkaround) {
|
|
94
102
|
_iOSWorkaround = true;
|
|
103
|
+
var listenerOptions = {
|
|
104
|
+
passive: true
|
|
105
|
+
};
|
|
95
106
|
Array.from(window.document.body.children).forEach(function (el) {
|
|
96
|
-
return el.addEventListener("click", noop);
|
|
107
|
+
return el.addEventListener("click", noop, listenerOptions);
|
|
97
108
|
});
|
|
98
|
-
window.document.documentElement.addEventListener("click", noop);
|
|
109
|
+
window.document.documentElement.addEventListener("click", noop, listenerOptions);
|
|
99
110
|
}
|
|
100
111
|
var shouldListen = true;
|
|
101
112
|
var shouldIgnore = function shouldIgnore(event) {
|
|
102
|
-
return ignore.some(function (target2) {
|
|
113
|
+
return toValue(ignore).some(function (target2) {
|
|
103
114
|
if (typeof target2 === "string") {
|
|
104
115
|
return Array.from(window.document.querySelectorAll(target2)).some(function (el) {
|
|
105
116
|
return el === event.target || event.composedPath().includes(el);
|
|
@@ -110,17 +121,40 @@ function onClickOutside(target, handler) {
|
|
|
110
121
|
}
|
|
111
122
|
});
|
|
112
123
|
};
|
|
124
|
+
function hasMultipleRoots(target2) {
|
|
125
|
+
var vm = toValue(target2);
|
|
126
|
+
return vm && vm.$.subTree.shapeFlag === 16;
|
|
127
|
+
}
|
|
128
|
+
function checkMultipleRoots(target2, event) {
|
|
129
|
+
var vm = toValue(target2);
|
|
130
|
+
var children = vm.$.subTree && vm.$.subTree.children;
|
|
131
|
+
if (children == null || !Array.isArray(children)) return false;
|
|
132
|
+
return children.some(function (child) {
|
|
133
|
+
return child.el === event.target || event.composedPath().includes(child.el);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
113
136
|
var listener = function listener(event) {
|
|
114
137
|
var el = unrefElement(target);
|
|
138
|
+
if (event.target == null) return;
|
|
139
|
+
if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;
|
|
115
140
|
if (!el || el === event.target || event.composedPath().includes(el)) return;
|
|
116
|
-
if (event.detail === 0) shouldListen = !shouldIgnore(event);
|
|
141
|
+
if ("detail" in event && event.detail === 0) shouldListen = !shouldIgnore(event);
|
|
117
142
|
if (!shouldListen) {
|
|
118
143
|
shouldListen = true;
|
|
119
144
|
return;
|
|
120
145
|
}
|
|
121
146
|
handler(event);
|
|
122
147
|
};
|
|
123
|
-
var
|
|
148
|
+
var isProcessingClick = false;
|
|
149
|
+
var cleanup = [useEventListener(window, "click", function (event) {
|
|
150
|
+
if (!isProcessingClick) {
|
|
151
|
+
isProcessingClick = true;
|
|
152
|
+
setTimeout(function () {
|
|
153
|
+
isProcessingClick = false;
|
|
154
|
+
}, 0);
|
|
155
|
+
listener(event);
|
|
156
|
+
}
|
|
157
|
+
}, {
|
|
124
158
|
passive: true,
|
|
125
159
|
capture: capture
|
|
126
160
|
}), useEventListener(window, "pointerdown", function (e) {
|
|
@@ -132,20 +166,37 @@ function onClickOutside(target, handler) {
|
|
|
132
166
|
setTimeout(function () {
|
|
133
167
|
var _a;
|
|
134
168
|
var el = unrefElement(target);
|
|
135
|
-
if (((_a = window.document.activeElement) == null ?
|
|
169
|
+
if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window.document.activeElement))) {
|
|
136
170
|
handler(event);
|
|
137
171
|
}
|
|
138
172
|
}, 0);
|
|
173
|
+
}, {
|
|
174
|
+
passive: true
|
|
139
175
|
})].filter(Boolean);
|
|
140
176
|
var stop = function stop() {
|
|
141
177
|
return cleanup.forEach(function (fn) {
|
|
142
178
|
return fn();
|
|
143
179
|
});
|
|
144
180
|
};
|
|
181
|
+
if (controls) {
|
|
182
|
+
return {
|
|
183
|
+
stop: stop,
|
|
184
|
+
cancel: function cancel() {
|
|
185
|
+
shouldListen = false;
|
|
186
|
+
},
|
|
187
|
+
trigger: function trigger(event) {
|
|
188
|
+
shouldListen = true;
|
|
189
|
+
listener(event);
|
|
190
|
+
shouldListen = false;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
}
|
|
145
194
|
return stop;
|
|
146
195
|
}
|
|
196
|
+
|
|
197
|
+
// @__NO_SIDE_EFFECTS__
|
|
147
198
|
function useMounted() {
|
|
148
|
-
var isMounted =
|
|
199
|
+
var isMounted = shallowRef(false);
|
|
149
200
|
var instance = getCurrentInstance();
|
|
150
201
|
if (instance) {
|
|
151
202
|
onMounted(function () {
|
|
@@ -154,6 +205,8 @@ function useMounted() {
|
|
|
154
205
|
}
|
|
155
206
|
return isMounted;
|
|
156
207
|
}
|
|
208
|
+
|
|
209
|
+
// @__NO_SIDE_EFFECTS__
|
|
157
210
|
function useSupported(callback) {
|
|
158
211
|
var isMounted = useMounted();
|
|
159
212
|
return computed(function () {
|
|
@@ -164,15 +217,15 @@ function useSupported(callback) {
|
|
|
164
217
|
var eventHandlers = ["fullscreenchange", "webkitfullscreenchange", "webkitendfullscreen", "mozfullscreenchange", "MSFullscreenChange"];
|
|
165
218
|
function useFullscreen(target) {
|
|
166
219
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
167
|
-
var _options$
|
|
168
|
-
document = _options$
|
|
220
|
+
var _options$document7 = options.document,
|
|
221
|
+
document = _options$document7 === void 0 ? defaultDocument : _options$document7,
|
|
169
222
|
_options$autoExit = options.autoExit,
|
|
170
|
-
autoExit = _options$autoExit ===
|
|
223
|
+
autoExit = _options$autoExit === void 0 ? false : _options$autoExit;
|
|
171
224
|
var targetRef = computed(function () {
|
|
172
225
|
var _a;
|
|
173
|
-
return (_a = unrefElement(target)) != null ? _a : document == null ?
|
|
226
|
+
return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.documentElement;
|
|
174
227
|
});
|
|
175
|
-
var isFullscreen =
|
|
228
|
+
var isFullscreen = shallowRef(false);
|
|
176
229
|
var requestMethod = computed(function () {
|
|
177
230
|
return ["requestFullscreen", "webkitRequestFullscreen", "webkitEnterFullscreen", "webkitEnterFullScreen", "webkitRequestFullScreen", "mozRequestFullScreen", "msRequestFullscreen"].find(function (m) {
|
|
178
231
|
return document && m in document || targetRef.value && m in targetRef.value;
|
|
@@ -192,10 +245,10 @@ function useFullscreen(target) {
|
|
|
192
245
|
return document && m in document;
|
|
193
246
|
});
|
|
194
247
|
var isSupported = useSupported(function () {
|
|
195
|
-
return targetRef.value && document && requestMethod.value !==
|
|
248
|
+
return targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0;
|
|
196
249
|
});
|
|
197
250
|
var isCurrentElementFullScreen = function isCurrentElementFullScreen() {
|
|
198
|
-
if (fullscreenElementMethod) return (document == null ?
|
|
251
|
+
if (fullscreenElementMethod) return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;
|
|
199
252
|
return false;
|
|
200
253
|
};
|
|
201
254
|
var isElementFullScreen = function isElementFullScreen() {
|
|
@@ -204,7 +257,7 @@ function useFullscreen(target) {
|
|
|
204
257
|
return document[fullscreenEnabled.value];
|
|
205
258
|
} else {
|
|
206
259
|
var target2 = targetRef.value;
|
|
207
|
-
if ((target2 == null ?
|
|
260
|
+
if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {
|
|
208
261
|
return Boolean(target2[fullscreenEnabled.value]);
|
|
209
262
|
}
|
|
210
263
|
}
|
|
@@ -217,39 +270,39 @@ function useFullscreen(target) {
|
|
|
217
270
|
function _exit() {
|
|
218
271
|
_exit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
|
|
219
272
|
var target2;
|
|
220
|
-
return _regeneratorRuntime.wrap(function
|
|
273
|
+
return _regeneratorRuntime.wrap(function (_context25) {
|
|
221
274
|
while (1) switch (_context25.prev = _context25.next) {
|
|
222
275
|
case 0:
|
|
223
276
|
if (!(!isSupported.value || !isFullscreen.value)) {
|
|
224
|
-
_context25.next =
|
|
277
|
+
_context25.next = 1;
|
|
225
278
|
break;
|
|
226
279
|
}
|
|
227
280
|
return _context25.abrupt("return");
|
|
228
|
-
case
|
|
281
|
+
case 1:
|
|
229
282
|
if (!exitMethod.value) {
|
|
230
|
-
_context25.next =
|
|
283
|
+
_context25.next = 4;
|
|
231
284
|
break;
|
|
232
285
|
}
|
|
233
|
-
if (!((document == null ?
|
|
234
|
-
_context25.next =
|
|
286
|
+
if (!((document == null ? void 0 : document[exitMethod.value]) != null)) {
|
|
287
|
+
_context25.next = 3;
|
|
235
288
|
break;
|
|
236
289
|
}
|
|
237
|
-
_context25.next =
|
|
290
|
+
_context25.next = 2;
|
|
238
291
|
return document[exitMethod.value]();
|
|
239
|
-
case
|
|
240
|
-
_context25.next =
|
|
292
|
+
case 2:
|
|
293
|
+
_context25.next = 4;
|
|
241
294
|
break;
|
|
242
|
-
case
|
|
295
|
+
case 3:
|
|
243
296
|
target2 = targetRef.value;
|
|
244
|
-
if (!((target2 == null ?
|
|
245
|
-
_context25.next =
|
|
297
|
+
if (!((target2 == null ? void 0 : target2[exitMethod.value]) != null)) {
|
|
298
|
+
_context25.next = 4;
|
|
246
299
|
break;
|
|
247
300
|
}
|
|
248
|
-
_context25.next =
|
|
301
|
+
_context25.next = 4;
|
|
249
302
|
return target2[exitMethod.value]();
|
|
250
|
-
case
|
|
303
|
+
case 4:
|
|
251
304
|
isFullscreen.value = false;
|
|
252
|
-
case
|
|
305
|
+
case 5:
|
|
253
306
|
case "end":
|
|
254
307
|
return _context25.stop();
|
|
255
308
|
}
|
|
@@ -263,32 +316,32 @@ function useFullscreen(target) {
|
|
|
263
316
|
function _enter() {
|
|
264
317
|
_enter = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
|
|
265
318
|
var target2;
|
|
266
|
-
return _regeneratorRuntime.wrap(function
|
|
319
|
+
return _regeneratorRuntime.wrap(function (_context26) {
|
|
267
320
|
while (1) switch (_context26.prev = _context26.next) {
|
|
268
321
|
case 0:
|
|
269
322
|
if (!(!isSupported.value || isFullscreen.value)) {
|
|
270
|
-
_context26.next =
|
|
323
|
+
_context26.next = 1;
|
|
271
324
|
break;
|
|
272
325
|
}
|
|
273
326
|
return _context26.abrupt("return");
|
|
274
|
-
case
|
|
327
|
+
case 1:
|
|
275
328
|
if (!isElementFullScreen()) {
|
|
276
|
-
_context26.next =
|
|
329
|
+
_context26.next = 2;
|
|
277
330
|
break;
|
|
278
331
|
}
|
|
279
|
-
_context26.next =
|
|
332
|
+
_context26.next = 2;
|
|
280
333
|
return exit();
|
|
281
|
-
case
|
|
334
|
+
case 2:
|
|
282
335
|
target2 = targetRef.value;
|
|
283
|
-
if (!(requestMethod.value && (target2 == null ?
|
|
284
|
-
_context26.next =
|
|
336
|
+
if (!(requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null)) {
|
|
337
|
+
_context26.next = 4;
|
|
285
338
|
break;
|
|
286
339
|
}
|
|
287
|
-
_context26.next =
|
|
340
|
+
_context26.next = 3;
|
|
288
341
|
return target2[requestMethod.value]();
|
|
289
|
-
case
|
|
342
|
+
case 3:
|
|
290
343
|
isFullscreen.value = true;
|
|
291
|
-
case
|
|
344
|
+
case 4:
|
|
292
345
|
case "end":
|
|
293
346
|
return _context26.stop();
|
|
294
347
|
}
|
|
@@ -301,12 +354,12 @@ function useFullscreen(target) {
|
|
|
301
354
|
}
|
|
302
355
|
function _toggle() {
|
|
303
356
|
_toggle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
|
|
304
|
-
return _regeneratorRuntime.wrap(function
|
|
357
|
+
return _regeneratorRuntime.wrap(function (_context27) {
|
|
305
358
|
while (1) switch (_context27.prev = _context27.next) {
|
|
306
359
|
case 0:
|
|
307
|
-
_context27.next =
|
|
360
|
+
_context27.next = 1;
|
|
308
361
|
return isFullscreen.value ? exit() : enter();
|
|
309
|
-
case
|
|
362
|
+
case 1:
|
|
310
363
|
case "end":
|
|
311
364
|
return _context27.stop();
|
|
312
365
|
}
|
|
@@ -318,10 +371,15 @@ function useFullscreen(target) {
|
|
|
318
371
|
var isElementFullScreenValue = isElementFullScreen();
|
|
319
372
|
if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) isFullscreen.value = isElementFullScreenValue;
|
|
320
373
|
};
|
|
321
|
-
|
|
374
|
+
var listenerOptions = {
|
|
375
|
+
capture: false,
|
|
376
|
+
passive: true
|
|
377
|
+
};
|
|
378
|
+
useEventListener(document, eventHandlers, handlerCallback, listenerOptions);
|
|
322
379
|
useEventListener(function () {
|
|
323
380
|
return unrefElement(targetRef);
|
|
324
|
-
}, eventHandlers, handlerCallback,
|
|
381
|
+
}, eventHandlers, handlerCallback, listenerOptions);
|
|
382
|
+
tryOnMounted(handlerCallback, false);
|
|
325
383
|
if (autoExit) tryOnScopeDispose(exit);
|
|
326
384
|
return {
|
|
327
385
|
isSupported: isSupported,
|
|
@@ -332,4 +390,4 @@ function useFullscreen(target) {
|
|
|
332
390
|
};
|
|
333
391
|
}
|
|
334
392
|
|
|
335
|
-
export { defaultDocument, defaultWindow, isClient, isIOS, isObject, noop, onClickOutside,
|
|
393
|
+
export { defaultDocument, defaultWindow, isClient, isIOS, isObject, noop, onClickOutside, toArray, tryOnMounted, tryOnScopeDispose, unrefElement, useEventListener, useFullscreen, useMounted, useSupported, watchImmediate };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
|
+
import '@babel/runtime/helpers/asyncToGenerator';
|
|
3
|
+
import '@babel/runtime/helpers/typeof';
|
|
4
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
5
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
6
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
7
|
+
import '@babel/runtime/regenerator';
|
|
8
|
+
import { getCurrentScope, onScopeDispose, onMounted, nextTick, getCurrentInstance, onUnmounted, watch } from 'vue';
|
|
9
|
+
|
|
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; }
|
|
11
|
+
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; }
|
|
12
|
+
function tryOnScopeDispose(fn) {
|
|
13
|
+
if (getCurrentScope()) {
|
|
14
|
+
onScopeDispose(fn);
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
20
|
+
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
21
|
+
var toString = Object.prototype.toString;
|
|
22
|
+
var isObject = function isObject(val) {
|
|
23
|
+
return toString.call(val) === "[object Object]";
|
|
24
|
+
};
|
|
25
|
+
var noop = function noop() {};
|
|
26
|
+
var isIOS = /* @__PURE__ */getIsIOS();
|
|
27
|
+
function getIsIOS() {
|
|
28
|
+
var _a, _b;
|
|
29
|
+
return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
30
|
+
}
|
|
31
|
+
function toArray(value) {
|
|
32
|
+
return Array.isArray(value) ? value : [value];
|
|
33
|
+
}
|
|
34
|
+
function getLifeCycleTarget(target) {
|
|
35
|
+
return target || getCurrentInstance();
|
|
36
|
+
}
|
|
37
|
+
function tryOnMounted(fn) {
|
|
38
|
+
var sync = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
39
|
+
var target = arguments.length > 2 ? arguments[2] : undefined;
|
|
40
|
+
var instance = getLifeCycleTarget(target);
|
|
41
|
+
if (instance) onMounted(fn, target);else if (sync) fn();else nextTick(fn);
|
|
42
|
+
}
|
|
43
|
+
function tryOnUnmounted(fn, target) {
|
|
44
|
+
var instance = getLifeCycleTarget(target);
|
|
45
|
+
if (instance) onUnmounted(fn, target);
|
|
46
|
+
}
|
|
47
|
+
function watchImmediate(source, cb, options) {
|
|
48
|
+
return watch(source, cb, _objectSpread(_objectSpread({}, options), {}, {
|
|
49
|
+
immediate: true
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { getLifeCycleTarget, isClient, isIOS, isObject, noop, toArray, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, watchImmediate };
|
package/package.json
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@dfsj/components",
|
|
3
|
-
"version": "3.7.
|
|
4
|
-
"description": "通用的vue组件;包括专业组件、原子级组件",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"vue3",
|
|
8
|
-
"component"
|
|
9
|
-
],
|
|
10
|
-
"author": "yangbo <1747837358@qq.com>",
|
|
11
|
-
"homepage": "",
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"main": "dist/index.js",
|
|
14
|
-
"directories": {
|
|
15
|
-
"lib": "lib",
|
|
16
|
-
"test": "__tests__"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"dist",
|
|
20
|
-
"README.md",
|
|
21
|
-
"LICENSE",
|
|
22
|
-
"CHANGELOG.md"
|
|
23
|
-
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"test": "node ./__tests__/component.test.js",
|
|
26
|
-
"watch": "rollup --config ./rollup.config.ts --configPlugin typescript -w",
|
|
27
|
-
"build": "rollup --config ./rollup.config.ts --configPlugin typescript"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@dfsj/echarts": "workspace:^",
|
|
31
|
-
"@dfsj/rollup": "workspace:^",
|
|
32
|
-
"@dfsj/utils": "workspace:^",
|
|
33
|
-
"@types/lodash-es": "^4.17.12",
|
|
34
|
-
"@types/node": "^20.11.3",
|
|
35
|
-
"@unocss/transformer-variant-group": "
|
|
36
|
-
"@vue/compiler-sfc": "^3.
|
|
37
|
-
"@vueuse/core": "^
|
|
38
|
-
"element-plus": "^2.
|
|
39
|
-
"unocss": "^
|
|
40
|
-
"vue": "^3.5.
|
|
41
|
-
},
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"element-plus": "^2.
|
|
44
|
-
},
|
|
45
|
-
"dependencies": {
|
|
46
|
-
"@babel/runtime": "^7.
|
|
47
|
-
"@element-plus/icons-vue": "^2.3.1",
|
|
48
|
-
"@iconify/iconify": "^3.1.1",
|
|
49
|
-
"@wangeditor/editor": "^5.1.23",
|
|
50
|
-
"@wangeditor/editor-for-vue": "^5.1.10",
|
|
51
|
-
"@zxcvbn-ts/core": "^3.0.4",
|
|
52
|
-
"dayjs": "^1.11.
|
|
53
|
-
"lodash-es": "^4.17.21",
|
|
54
|
-
"luxon": "^3.4.4",
|
|
55
|
-
"vue-draggable-plus": "^0.3.5",
|
|
56
|
-
"vue-types": "^
|
|
57
|
-
"zrender": "^5.5.0"
|
|
58
|
-
},
|
|
59
|
-
"gitHead": "546649711e5f511b6efc6e684f20b267d5ca290d",
|
|
60
|
-
"module": "dist/index.js",
|
|
61
|
-
"browser": "dist/index.js",
|
|
62
|
-
"types": "dist/index.d.ts",
|
|
63
|
-
"publishConfig": {
|
|
64
|
-
"access": "public"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@dfsj/components",
|
|
3
|
+
"version": "3.7.2-alpha.2",
|
|
4
|
+
"description": "通用的vue组件;包括专业组件、原子级组件",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"vue3",
|
|
8
|
+
"component"
|
|
9
|
+
],
|
|
10
|
+
"author": "yangbo <1747837358@qq.com>",
|
|
11
|
+
"homepage": "",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"main": "dist/index.js",
|
|
14
|
+
"directories": {
|
|
15
|
+
"lib": "lib",
|
|
16
|
+
"test": "__tests__"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"CHANGELOG.md"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"test": "node ./__tests__/component.test.js",
|
|
26
|
+
"watch": "rollup --config ./rollup.config.ts --configPlugin typescript -w",
|
|
27
|
+
"build": "rollup --config ./rollup.config.ts --configPlugin typescript"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@dfsj/echarts": "workspace:^",
|
|
31
|
+
"@dfsj/rollup": "workspace:^",
|
|
32
|
+
"@dfsj/utils": "workspace:^",
|
|
33
|
+
"@types/lodash-es": "^4.17.12",
|
|
34
|
+
"@types/node": "^20.11.3",
|
|
35
|
+
"@unocss/transformer-variant-group": "66.4.2",
|
|
36
|
+
"@vue/compiler-sfc": "^3.5.18",
|
|
37
|
+
"@vueuse/core": "^13.6.0",
|
|
38
|
+
"element-plus": "^2.10.6",
|
|
39
|
+
"unocss": "^66.4.2",
|
|
40
|
+
"vue": "^3.5.18"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"element-plus": "^2.10.6"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@babel/runtime": "^7.28.2",
|
|
47
|
+
"@element-plus/icons-vue": "^2.3.1",
|
|
48
|
+
"@iconify/iconify": "^3.1.1",
|
|
49
|
+
"@wangeditor/editor": "^5.1.23",
|
|
50
|
+
"@wangeditor/editor-for-vue": "^5.1.10",
|
|
51
|
+
"@zxcvbn-ts/core": "^3.0.4",
|
|
52
|
+
"dayjs": "^1.11.13",
|
|
53
|
+
"lodash-es": "^4.17.21",
|
|
54
|
+
"luxon": "^3.4.4",
|
|
55
|
+
"vue-draggable-plus": "^0.3.5",
|
|
56
|
+
"vue-types": "^6.0.0",
|
|
57
|
+
"zrender": "^5.5.0"
|
|
58
|
+
},
|
|
59
|
+
"gitHead": "546649711e5f511b6efc6e684f20b267d5ca290d",
|
|
60
|
+
"module": "dist/index.js",
|
|
61
|
+
"browser": "dist/index.js",
|
|
62
|
+
"types": "dist/index.d.ts",
|
|
63
|
+
"publishConfig": {
|
|
64
|
+
"access": "public"
|
|
65
|
+
}
|
|
66
|
+
}
|