@dfsj/components 3.7.1 → 3.7.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.d.ts +9 -0
- 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/DatePicker/src/composables/use-month-range-header.d.ts +16 -0
- package/dist/components/DatePicker/src/composables/use-range-picker.d.ts +173 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +19 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue2.js +2 -2
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +16 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue2.js +7 -7
- package/dist/components/DatePicker/src/index.d.ts +26 -20
- package/dist/components/DatePicker/src/index.js +4 -4
- package/dist/components/Descriptions/src/Descriptions.vue.d.ts +97 -0
- 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 +24 -24
- package/dist/components/Form/src/components/useRenderCheckbox.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderCheckbox.js +8 -8
- package/dist/components/Form/src/components/useRenderRadio.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderRadio.js +8 -8
- package/dist/components/Form/src/components/useRenderSelect.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderSelect.js +11 -11
- package/dist/components/Form/src/helper/componentMap.d.ts +5 -0
- package/dist/components/Form/src/helper/index.d.ts +7 -0
- 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/InputPassword/src/InputPassword.vue.d.ts +27 -0
- 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.d.ts +15 -0
- 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.d.ts +3 -0
- 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.vue.d.ts +17 -0
- 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.d.ts +19 -0
- package/dist/components/NodeAxis/src/TimerNodePlayer.js +4 -4
- package/dist/components/NodeAxis/src/interface/NodePlayer.d.ts +9 -0
- 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.vue.d.ts +30 -0
- 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/helper/index.d.ts +2 -0
- 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/Video/src/VideoPlayerToolbar.vue.d.ts +34 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +4 -4
- package/dist/components/Video/src/abstract/AbstractVideoControl.d.ts +7 -0
- package/dist/components/Video/src/abstract/Observable.d.ts +6 -0
- package/dist/components/Video/src/abstract/VideoControl.d.ts +32 -0
- package/dist/components/Video/src/abstract/VideoControl.js +13 -13
- package/dist/components/Video/src/control/DaHua.d.ts +12 -0
- package/dist/components/Video/src/control/DaHua.js +8 -8
- package/dist/components/Video/src/control/Hikvision.d.ts +28 -0
- package/dist/components/Video/src/control/Hikvision.js +12 -12
- package/dist/components/Video/src/control/VideoFactory.d.ts +3 -0
- package/dist/components/Video/src/enums/CommonEnum.d.ts +26 -0
- 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/helper/lang.d.ts +1 -0
- package/dist/index.min.css +3 -3
- package/dist/node_modules/.pnpm/@vueuse_core@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/core/index.js +393 -0
- 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/dist/utils/index.d.ts +11 -0
- package/package.json +66 -66
- package/dist/components/src/components/ClickOutSide/src/ClickOutSide.vue.d.ts +0 -7
- package/dist/components/src/components/Highlight/src/Highlight.vue.d.ts +0 -41
- /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/Windows → Windows}/src/ModalWrap.vue.d.ts +0 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import '@babel/runtime/helpers/typeof';
|
|
2
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
4
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
|
+
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
7
|
+
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
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
|
+
|
|
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), !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;
|
|
16
|
+
function unrefElement(elRef) {
|
|
17
|
+
var _a;
|
|
18
|
+
var plain = toValue(elRef);
|
|
19
|
+
return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;
|
|
20
|
+
}
|
|
21
|
+
function useEventListener() {
|
|
22
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
23
|
+
args[_key3] = arguments[_key3];
|
|
24
|
+
}
|
|
25
|
+
var cleanups = [];
|
|
26
|
+
var cleanup = function cleanup() {
|
|
27
|
+
cleanups.forEach(function (fn) {
|
|
28
|
+
return fn();
|
|
29
|
+
});
|
|
30
|
+
cleanups.length = 0;
|
|
31
|
+
};
|
|
32
|
+
var register = function register(el, event, listener, options) {
|
|
33
|
+
el.addEventListener(event, listener, options);
|
|
34
|
+
return function () {
|
|
35
|
+
return el.removeEventListener(event, listener, options);
|
|
36
|
+
};
|
|
37
|
+
};
|
|
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])];
|
|
55
|
+
}, function (_ref5) {
|
|
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];
|
|
61
|
+
cleanup();
|
|
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
|
+
});
|
|
69
|
+
});
|
|
70
|
+
})));
|
|
71
|
+
}, {
|
|
72
|
+
flush: "post"
|
|
73
|
+
});
|
|
74
|
+
var stop = function stop() {
|
|
75
|
+
stopWatch();
|
|
76
|
+
cleanup();
|
|
77
|
+
};
|
|
78
|
+
tryOnScopeDispose(cleanup);
|
|
79
|
+
return stop;
|
|
80
|
+
}
|
|
81
|
+
var _iOSWorkaround = false;
|
|
82
|
+
function onClickOutside(target, handler) {
|
|
83
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
84
|
+
var _options$window = options.window,
|
|
85
|
+
window = _options$window === void 0 ? defaultWindow : _options$window,
|
|
86
|
+
_options$ignore = options.ignore,
|
|
87
|
+
ignore = _options$ignore === void 0 ? [] : _options$ignore,
|
|
88
|
+
_options$capture = options.capture,
|
|
89
|
+
capture = _options$capture === void 0 ? true : _options$capture,
|
|
90
|
+
_options$detectIframe = options.detectIframe,
|
|
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
|
+
}
|
|
101
|
+
if (isIOS && !_iOSWorkaround) {
|
|
102
|
+
_iOSWorkaround = true;
|
|
103
|
+
var listenerOptions = {
|
|
104
|
+
passive: true
|
|
105
|
+
};
|
|
106
|
+
Array.from(window.document.body.children).forEach(function (el) {
|
|
107
|
+
return el.addEventListener("click", noop, listenerOptions);
|
|
108
|
+
});
|
|
109
|
+
window.document.documentElement.addEventListener("click", noop, listenerOptions);
|
|
110
|
+
}
|
|
111
|
+
var shouldListen = true;
|
|
112
|
+
var shouldIgnore = function shouldIgnore(event) {
|
|
113
|
+
return toValue(ignore).some(function (target2) {
|
|
114
|
+
if (typeof target2 === "string") {
|
|
115
|
+
return Array.from(window.document.querySelectorAll(target2)).some(function (el) {
|
|
116
|
+
return el === event.target || event.composedPath().includes(el);
|
|
117
|
+
});
|
|
118
|
+
} else {
|
|
119
|
+
var el = unrefElement(target2);
|
|
120
|
+
return el && (event.target === el || event.composedPath().includes(el));
|
|
121
|
+
}
|
|
122
|
+
});
|
|
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
|
+
}
|
|
136
|
+
var listener = function listener(event) {
|
|
137
|
+
var el = unrefElement(target);
|
|
138
|
+
if (event.target == null) return;
|
|
139
|
+
if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;
|
|
140
|
+
if (!el || el === event.target || event.composedPath().includes(el)) return;
|
|
141
|
+
if ("detail" in event && event.detail === 0) shouldListen = !shouldIgnore(event);
|
|
142
|
+
if (!shouldListen) {
|
|
143
|
+
shouldListen = true;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
handler(event);
|
|
147
|
+
};
|
|
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
|
+
}, {
|
|
158
|
+
passive: true,
|
|
159
|
+
capture: capture
|
|
160
|
+
}), useEventListener(window, "pointerdown", function (e) {
|
|
161
|
+
var el = unrefElement(target);
|
|
162
|
+
shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));
|
|
163
|
+
}, {
|
|
164
|
+
passive: true
|
|
165
|
+
}), detectIframe && useEventListener(window, "blur", function (event) {
|
|
166
|
+
setTimeout(function () {
|
|
167
|
+
var _a;
|
|
168
|
+
var el = unrefElement(target);
|
|
169
|
+
if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window.document.activeElement))) {
|
|
170
|
+
handler(event);
|
|
171
|
+
}
|
|
172
|
+
}, 0);
|
|
173
|
+
}, {
|
|
174
|
+
passive: true
|
|
175
|
+
})].filter(Boolean);
|
|
176
|
+
var stop = function stop() {
|
|
177
|
+
return cleanup.forEach(function (fn) {
|
|
178
|
+
return fn();
|
|
179
|
+
});
|
|
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
|
+
}
|
|
194
|
+
return stop;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// @__NO_SIDE_EFFECTS__
|
|
198
|
+
function useMounted() {
|
|
199
|
+
var isMounted = shallowRef(false);
|
|
200
|
+
var instance = getCurrentInstance();
|
|
201
|
+
if (instance) {
|
|
202
|
+
onMounted(function () {
|
|
203
|
+
isMounted.value = true;
|
|
204
|
+
}, instance);
|
|
205
|
+
}
|
|
206
|
+
return isMounted;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// @__NO_SIDE_EFFECTS__
|
|
210
|
+
function useSupported(callback) {
|
|
211
|
+
var isMounted = useMounted();
|
|
212
|
+
return computed(function () {
|
|
213
|
+
isMounted.value;
|
|
214
|
+
return Boolean(callback());
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
var eventHandlers = ["fullscreenchange", "webkitfullscreenchange", "webkitendfullscreen", "mozfullscreenchange", "MSFullscreenChange"];
|
|
218
|
+
function useFullscreen(target) {
|
|
219
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
220
|
+
var _options$document7 = options.document,
|
|
221
|
+
document = _options$document7 === void 0 ? defaultDocument : _options$document7,
|
|
222
|
+
_options$autoExit = options.autoExit,
|
|
223
|
+
autoExit = _options$autoExit === void 0 ? false : _options$autoExit;
|
|
224
|
+
var targetRef = computed(function () {
|
|
225
|
+
var _a;
|
|
226
|
+
return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.documentElement;
|
|
227
|
+
});
|
|
228
|
+
var isFullscreen = shallowRef(false);
|
|
229
|
+
var requestMethod = computed(function () {
|
|
230
|
+
return ["requestFullscreen", "webkitRequestFullscreen", "webkitEnterFullscreen", "webkitEnterFullScreen", "webkitRequestFullScreen", "mozRequestFullScreen", "msRequestFullscreen"].find(function (m) {
|
|
231
|
+
return document && m in document || targetRef.value && m in targetRef.value;
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
var exitMethod = computed(function () {
|
|
235
|
+
return ["exitFullscreen", "webkitExitFullscreen", "webkitExitFullScreen", "webkitCancelFullScreen", "mozCancelFullScreen", "msExitFullscreen"].find(function (m) {
|
|
236
|
+
return document && m in document || targetRef.value && m in targetRef.value;
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
var fullscreenEnabled = computed(function () {
|
|
240
|
+
return ["fullScreen", "webkitIsFullScreen", "webkitDisplayingFullscreen", "mozFullScreen", "msFullscreenElement"].find(function (m) {
|
|
241
|
+
return document && m in document || targetRef.value && m in targetRef.value;
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
var fullscreenElementMethod = ["fullscreenElement", "webkitFullscreenElement", "mozFullScreenElement", "msFullscreenElement"].find(function (m) {
|
|
245
|
+
return document && m in document;
|
|
246
|
+
});
|
|
247
|
+
var isSupported = useSupported(function () {
|
|
248
|
+
return targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0;
|
|
249
|
+
});
|
|
250
|
+
var isCurrentElementFullScreen = function isCurrentElementFullScreen() {
|
|
251
|
+
if (fullscreenElementMethod) return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;
|
|
252
|
+
return false;
|
|
253
|
+
};
|
|
254
|
+
var isElementFullScreen = function isElementFullScreen() {
|
|
255
|
+
if (fullscreenEnabled.value) {
|
|
256
|
+
if (document && document[fullscreenEnabled.value] != null) {
|
|
257
|
+
return document[fullscreenEnabled.value];
|
|
258
|
+
} else {
|
|
259
|
+
var target2 = targetRef.value;
|
|
260
|
+
if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {
|
|
261
|
+
return Boolean(target2[fullscreenEnabled.value]);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return false;
|
|
266
|
+
};
|
|
267
|
+
function exit() {
|
|
268
|
+
return _exit.apply(this, arguments);
|
|
269
|
+
}
|
|
270
|
+
function _exit() {
|
|
271
|
+
_exit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
|
|
272
|
+
var target2;
|
|
273
|
+
return _regeneratorRuntime.wrap(function (_context25) {
|
|
274
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
275
|
+
case 0:
|
|
276
|
+
if (!(!isSupported.value || !isFullscreen.value)) {
|
|
277
|
+
_context25.next = 1;
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
return _context25.abrupt("return");
|
|
281
|
+
case 1:
|
|
282
|
+
if (!exitMethod.value) {
|
|
283
|
+
_context25.next = 4;
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
if (!((document == null ? void 0 : document[exitMethod.value]) != null)) {
|
|
287
|
+
_context25.next = 3;
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
_context25.next = 2;
|
|
291
|
+
return document[exitMethod.value]();
|
|
292
|
+
case 2:
|
|
293
|
+
_context25.next = 4;
|
|
294
|
+
break;
|
|
295
|
+
case 3:
|
|
296
|
+
target2 = targetRef.value;
|
|
297
|
+
if (!((target2 == null ? void 0 : target2[exitMethod.value]) != null)) {
|
|
298
|
+
_context25.next = 4;
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
_context25.next = 4;
|
|
302
|
+
return target2[exitMethod.value]();
|
|
303
|
+
case 4:
|
|
304
|
+
isFullscreen.value = false;
|
|
305
|
+
case 5:
|
|
306
|
+
case "end":
|
|
307
|
+
return _context25.stop();
|
|
308
|
+
}
|
|
309
|
+
}, _callee25);
|
|
310
|
+
}));
|
|
311
|
+
return _exit.apply(this, arguments);
|
|
312
|
+
}
|
|
313
|
+
function enter() {
|
|
314
|
+
return _enter.apply(this, arguments);
|
|
315
|
+
}
|
|
316
|
+
function _enter() {
|
|
317
|
+
_enter = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
|
|
318
|
+
var target2;
|
|
319
|
+
return _regeneratorRuntime.wrap(function (_context26) {
|
|
320
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
321
|
+
case 0:
|
|
322
|
+
if (!(!isSupported.value || isFullscreen.value)) {
|
|
323
|
+
_context26.next = 1;
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
return _context26.abrupt("return");
|
|
327
|
+
case 1:
|
|
328
|
+
if (!isElementFullScreen()) {
|
|
329
|
+
_context26.next = 2;
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
_context26.next = 2;
|
|
333
|
+
return exit();
|
|
334
|
+
case 2:
|
|
335
|
+
target2 = targetRef.value;
|
|
336
|
+
if (!(requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null)) {
|
|
337
|
+
_context26.next = 4;
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
_context26.next = 3;
|
|
341
|
+
return target2[requestMethod.value]();
|
|
342
|
+
case 3:
|
|
343
|
+
isFullscreen.value = true;
|
|
344
|
+
case 4:
|
|
345
|
+
case "end":
|
|
346
|
+
return _context26.stop();
|
|
347
|
+
}
|
|
348
|
+
}, _callee26);
|
|
349
|
+
}));
|
|
350
|
+
return _enter.apply(this, arguments);
|
|
351
|
+
}
|
|
352
|
+
function toggle() {
|
|
353
|
+
return _toggle.apply(this, arguments);
|
|
354
|
+
}
|
|
355
|
+
function _toggle() {
|
|
356
|
+
_toggle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
|
|
357
|
+
return _regeneratorRuntime.wrap(function (_context27) {
|
|
358
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
359
|
+
case 0:
|
|
360
|
+
_context27.next = 1;
|
|
361
|
+
return isFullscreen.value ? exit() : enter();
|
|
362
|
+
case 1:
|
|
363
|
+
case "end":
|
|
364
|
+
return _context27.stop();
|
|
365
|
+
}
|
|
366
|
+
}, _callee27);
|
|
367
|
+
}));
|
|
368
|
+
return _toggle.apply(this, arguments);
|
|
369
|
+
}
|
|
370
|
+
var handlerCallback = function handlerCallback() {
|
|
371
|
+
var isElementFullScreenValue = isElementFullScreen();
|
|
372
|
+
if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) isFullscreen.value = isElementFullScreenValue;
|
|
373
|
+
};
|
|
374
|
+
var listenerOptions = {
|
|
375
|
+
capture: false,
|
|
376
|
+
passive: true
|
|
377
|
+
};
|
|
378
|
+
useEventListener(document, eventHandlers, handlerCallback, listenerOptions);
|
|
379
|
+
useEventListener(function () {
|
|
380
|
+
return unrefElement(targetRef);
|
|
381
|
+
}, eventHandlers, handlerCallback, listenerOptions);
|
|
382
|
+
tryOnMounted(handlerCallback, false);
|
|
383
|
+
if (autoExit) tryOnScopeDispose(exit);
|
|
384
|
+
return {
|
|
385
|
+
isSupported: isSupported,
|
|
386
|
+
isFullscreen: isFullscreen,
|
|
387
|
+
enter: enter,
|
|
388
|
+
exit: exit,
|
|
389
|
+
toggle: toggle
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
|
|
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 };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Fn, Recordable } from '../types';
|
|
2
|
+
export declare const withInstall: <T>(component: T, alias?: string) => T & Plugin;
|
|
3
|
+
export declare const humpToUnderline: (str: string) => string;
|
|
4
|
+
export declare const underlineToHump: (str: string) => string;
|
|
5
|
+
export declare const humpToDash: (str: string) => string;
|
|
6
|
+
export declare const setCssVar: (prop: string, val: any, dom?: HTMLElement) => void;
|
|
7
|
+
export declare const findIndex: <T = Recordable>(ary: Array<T>, fn: Fn) => number;
|
|
8
|
+
export declare const trim: (str: string) => string;
|
|
9
|
+
export declare function formatTime(time: Date | number | string, fmt: string): string;
|
|
10
|
+
export declare function toAnyString(): string;
|
|
11
|
+
export declare function firstUpperCase(str: string): string;
|
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",
|
|
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
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2
|
-
[key: string]: any;
|
|
3
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("mounted" | "clickOutside")[], "mounted" | "clickOutside", import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
-
onMounted?: (...args: any[]) => any;
|
|
5
|
-
onClickOutside?: (...args: any[]) => any;
|
|
6
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
-
export default _default;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
-
tag: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
|
|
4
|
-
default: string;
|
|
5
|
-
} & {
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
keys: {
|
|
9
|
-
type: PropType<string[]>;
|
|
10
|
-
default: () => any[];
|
|
11
|
-
};
|
|
12
|
-
color: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
|
|
13
|
-
default: string;
|
|
14
|
-
} & {
|
|
15
|
-
default: string;
|
|
16
|
-
};
|
|
17
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
-
tag: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
|
|
21
|
-
default: string;
|
|
22
|
-
} & {
|
|
23
|
-
default: string;
|
|
24
|
-
};
|
|
25
|
-
keys: {
|
|
26
|
-
type: PropType<string[]>;
|
|
27
|
-
default: () => any[];
|
|
28
|
-
};
|
|
29
|
-
color: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
|
|
30
|
-
default: string;
|
|
31
|
-
} & {
|
|
32
|
-
default: string;
|
|
33
|
-
};
|
|
34
|
-
}>> & Readonly<{
|
|
35
|
-
onClick?: (...args: any[]) => any;
|
|
36
|
-
}>, {
|
|
37
|
-
keys: string[];
|
|
38
|
-
tag: string;
|
|
39
|
-
color: string;
|
|
40
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
41
|
-
export default _default;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|