@dfsj/components 3.7.2-alpha.1 → 3.7.2-alpha.3
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 +2 -0
- package/dist/components/Boards/src/Boards.vue2.js +10 -5
- package/dist/components/Boards/src/hooKs/useStyle.d.ts +5 -1
- package/dist/components/Boards/src/hooKs/useStyle.js +7 -2
- package/dist/components/Boards/src/props.d.ts +2 -0
- package/dist/components/Boards/src/props.js +2 -1
- package/dist/components/Form/src/helper/componentMap.js +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.min.css +3 -3
- package/package.json +1 -1
- package/dist/components/DatePicker/index.d.ts +0 -2
- package/dist/components/DatePicker/src/composables/use-month-range-header.d.ts +0 -16
- package/dist/components/DatePicker/src/composables/use-month-range-header.js +0 -52
- package/dist/components/DatePicker/src/composables/use-range-picker.d.ts +0 -173
- package/dist/components/DatePicker/src/composables/use-range-picker.js +0 -99
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +0 -19
- 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.d.ts +0 -16
- 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 -224
- 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/Boards/src/hooKs/useStyle.d.ts +0 -9
- 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/Descriptions/src/Descriptions.vue.d.ts +0 -97
- package/dist/components/src/components/Form/src/components/useRenderCheckbox.d.ts +0 -4
- package/dist/components/src/components/Form/src/components/useRenderRadio.d.ts +0 -4
- package/dist/components/src/components/Form/src/components/useRenderSelect.d.ts +0 -4
- package/dist/components/src/components/Form/src/helper/componentMap.d.ts +0 -5
- package/dist/components/src/components/Form/src/helper/index.d.ts +0 -7
- package/dist/components/src/components/InputPassword/src/InputPassword.vue.d.ts +0 -27
- package/dist/components/src/components/Modal/src/hooks/useTimeout.d.ts +0 -15
- package/dist/components/src/components/Modal/src/utils/index.d.ts +0 -3
- 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/NodeAxis/src/NodeAxis.vue.d.ts +0 -17
- package/dist/components/src/components/NodeAxis/src/TimerNodePlayer.d.ts +0 -19
- package/dist/components/src/components/NodeAxis/src/interface/NodePlayer.d.ts +0 -9
- package/dist/components/src/components/Table/src/components/ColumnSetting.vue.d.ts +0 -30
- package/dist/components/src/components/Table/src/components/TableActions.vue.d.ts +0 -96
- package/dist/components/src/components/Table/src/helper/index.d.ts +0 -2
- package/dist/components/src/components/Video/src/VideoPlayerToolbar.vue.d.ts +0 -34
- package/dist/components/src/components/Video/src/abstract/AbstractVideoControl.d.ts +0 -7
- package/dist/components/src/components/Video/src/abstract/Observable.d.ts +0 -6
- package/dist/components/src/components/Video/src/abstract/VideoControl.d.ts +0 -32
- package/dist/components/src/components/Video/src/control/DaHua.d.ts +0 -12
- package/dist/components/src/components/Video/src/control/Hikvision.d.ts +0 -28
- package/dist/components/src/components/Video/src/control/VideoFactory.d.ts +0 -3
- package/dist/components/src/components/Video/src/enums/CommonEnum.d.ts +0 -26
- package/dist/components/src/helper/lang.d.ts +0 -1
- package/dist/components/src/themes/index.d.ts +0 -1
- package/dist/components/src/utils/index.d.ts +0 -11
- package/dist/node_modules/.pnpm/@vueuse_core@10.11.1_vue@3.5.13_typescript@5.7.3_/node_modules/@vueuse/core/index.js +0 -335
- 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
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import AbstractVideoControl from "./AbstractVideoControl";
|
|
2
|
-
import Observable from "./Observable";
|
|
3
|
-
export interface VideoBaseOpt {
|
|
4
|
-
ip: string;
|
|
5
|
-
port: string | number;
|
|
6
|
-
channel: string | number;
|
|
7
|
-
username: string;
|
|
8
|
-
streamType: string | number;
|
|
9
|
-
password: string;
|
|
10
|
-
wrapEl: any;
|
|
11
|
-
canvasEl: any;
|
|
12
|
-
videoEl: any;
|
|
13
|
-
needPlugin: boolean;
|
|
14
|
-
needLogin: boolean;
|
|
15
|
-
}
|
|
16
|
-
export default class VideoControl extends Observable implements AbstractVideoControl {
|
|
17
|
-
ip: string;
|
|
18
|
-
port: string | number;
|
|
19
|
-
channel: string | number;
|
|
20
|
-
streamType: string | number;
|
|
21
|
-
username: string;
|
|
22
|
-
password: string;
|
|
23
|
-
wrapEl: any;
|
|
24
|
-
isPlayback: boolean;
|
|
25
|
-
playbackIndex: number;
|
|
26
|
-
state: object;
|
|
27
|
-
player: any;
|
|
28
|
-
needPlugin: boolean;
|
|
29
|
-
needLogin: boolean;
|
|
30
|
-
constructor(opt: Partial<VideoBaseOpt>);
|
|
31
|
-
get identify(): string;
|
|
32
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import VideoControl, { VideoBaseOpt } from "../abstract/VideoControl";
|
|
2
|
-
export default class DaHua extends VideoControl {
|
|
3
|
-
canvasEl: any;
|
|
4
|
-
videoEl: any;
|
|
5
|
-
constructor(opts: Partial<VideoBaseOpt>);
|
|
6
|
-
generateEl(): void;
|
|
7
|
-
removeEl(): void;
|
|
8
|
-
login(): void;
|
|
9
|
-
stop(): void;
|
|
10
|
-
play(isPlayback?: boolean): void;
|
|
11
|
-
dispose(): void;
|
|
12
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import VideoControl, { VideoBaseOpt } from '../abstract/VideoControl';
|
|
2
|
-
interface IHikvision {
|
|
3
|
-
elId: string;
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
szBasePath: string;
|
|
7
|
-
}
|
|
8
|
-
type HikvisionOpt = Partial<VideoBaseOpt> & IHikvision;
|
|
9
|
-
export default class Hikvision extends VideoControl {
|
|
10
|
-
width: number;
|
|
11
|
-
height: number;
|
|
12
|
-
elId: string;
|
|
13
|
-
container: any;
|
|
14
|
-
szBasePath: string;
|
|
15
|
-
constructor(opts: Partial<HikvisionOpt>);
|
|
16
|
-
get pluginElId(): string;
|
|
17
|
-
generateEl(): void;
|
|
18
|
-
removeEl(): void;
|
|
19
|
-
checkPlugin(): boolean;
|
|
20
|
-
play(): void;
|
|
21
|
-
stop(): void;
|
|
22
|
-
dispose(): void;
|
|
23
|
-
login(): void;
|
|
24
|
-
logout(): void;
|
|
25
|
-
fullScreen(flag: boolean): void;
|
|
26
|
-
downloadPlugin(): void;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare enum EHiStateCode {
|
|
2
|
-
ERROR_CODE_UNKNOWN = 1000,
|
|
3
|
-
ERROR_CODE_NETWORKERROR = 1001,
|
|
4
|
-
ERROR_CODE_PARAMERROR = 1002,
|
|
5
|
-
ERROR_CODE_LOGIN_NOLOGIN = 2000,
|
|
6
|
-
ERROR_CODE_LOGIN_REPEATLOGIN = 2001,
|
|
7
|
-
ERROR_CODE_LOGIN_NOSUPPORT = 2002,
|
|
8
|
-
ERROR_CODE_PLAY_PLUGININITFAIL = 3000,
|
|
9
|
-
ERROR_CODE_PLAY_NOREPEATPLAY = 3001,
|
|
10
|
-
ERROR_CODE_PLAY_PLAYBACKABNORMAL = 3002,
|
|
11
|
-
ERROR_CODE_PLAY_PLAYBACKSTOP = 3003,
|
|
12
|
-
ERROR_CODE_PLAY_NOFREESPACE = 3004,
|
|
13
|
-
ERROR_CODE_TALK_FAIL = 5000
|
|
14
|
-
}
|
|
15
|
-
export declare enum VideoType {
|
|
16
|
-
DaHua = "DaHua",
|
|
17
|
-
Hikvision = "Hikvision"
|
|
18
|
-
}
|
|
19
|
-
export declare enum EventEnum {
|
|
20
|
-
READY = "READY",
|
|
21
|
-
PLAY = "PLAY",
|
|
22
|
-
PAUSE = "PAUSE",
|
|
23
|
-
DISPOSE = "DISPOSE",
|
|
24
|
-
ERROR = "ERROR",
|
|
25
|
-
PLUGIN = "PLUGIN"
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getLabel: (filed: string) => any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./index.scss";
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
|
-
import '@babel/runtime/helpers/typeof';
|
|
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, tryOnScopeDispose, toValue, isObject, isClient } from '../../../../@vueuse_shared@10.11.1_vue@3.5.13_typescript@5.7.3_/node_modules/@vueuse/shared/index.js';
|
|
9
|
-
export { getLifeCycleTarget, tryOnUnmounted } from '../../../../@vueuse_shared@10.11.1_vue@3.5.13_typescript@5.7.3_/node_modules/@vueuse/shared/index.js';
|
|
10
|
-
import { computed, ref, watch, 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), true).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
|
-
function unrefElement(elRef) {
|
|
15
|
-
var _a;
|
|
16
|
-
var plain = toValue(elRef);
|
|
17
|
-
return (_a = plain == null ? undefined : plain.$el) != null ? _a : plain;
|
|
18
|
-
}
|
|
19
|
-
var defaultWindow = isClient ? window : undefined;
|
|
20
|
-
var defaultDocument = isClient ? window.document : undefined;
|
|
21
|
-
function useEventListener() {
|
|
22
|
-
var target;
|
|
23
|
-
var events;
|
|
24
|
-
var listeners;
|
|
25
|
-
var options;
|
|
26
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
27
|
-
args[_key3] = arguments[_key3];
|
|
28
|
-
}
|
|
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
|
-
var cleanups = [];
|
|
44
|
-
var cleanup = function cleanup() {
|
|
45
|
-
cleanups.forEach(function (fn) {
|
|
46
|
-
return fn();
|
|
47
|
-
});
|
|
48
|
-
cleanups.length = 0;
|
|
49
|
-
};
|
|
50
|
-
var register = function register(el, event, listener, options2) {
|
|
51
|
-
el.addEventListener(event, listener, options2);
|
|
52
|
-
return function () {
|
|
53
|
-
return el.removeEventListener(event, listener, options2);
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
var stopWatch = watch(function () {
|
|
57
|
-
return [unrefElement(target), toValue(options)];
|
|
58
|
-
}, function (_ref5) {
|
|
59
|
-
var _ref6 = _slicedToArray(_ref5, 2),
|
|
60
|
-
el = _ref6[0],
|
|
61
|
-
options2 = _ref6[1];
|
|
62
|
-
cleanup();
|
|
63
|
-
if (!el) return;
|
|
64
|
-
var optionsClone = isObject(options2) ? _objectSpread({}, options2) : options2;
|
|
65
|
-
cleanups.push.apply(cleanups, _toConsumableArray(events.flatMap(function (event) {
|
|
66
|
-
return listeners.map(function (listener) {
|
|
67
|
-
return register(el, event, listener, optionsClone);
|
|
68
|
-
});
|
|
69
|
-
})));
|
|
70
|
-
}, {
|
|
71
|
-
immediate: true,
|
|
72
|
-
flush: "post"
|
|
73
|
-
});
|
|
74
|
-
var stop = function stop() {
|
|
75
|
-
stopWatch();
|
|
76
|
-
cleanup();
|
|
77
|
-
};
|
|
78
|
-
tryOnScopeDispose(stop);
|
|
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 === undefined ? defaultWindow : _options$window,
|
|
86
|
-
_options$ignore = options.ignore,
|
|
87
|
-
ignore = _options$ignore === undefined ? [] : _options$ignore,
|
|
88
|
-
_options$capture = options.capture,
|
|
89
|
-
capture = _options$capture === undefined ? true : _options$capture,
|
|
90
|
-
_options$detectIframe = options.detectIframe,
|
|
91
|
-
detectIframe = _options$detectIframe === undefined ? false : _options$detectIframe;
|
|
92
|
-
if (!window) return noop;
|
|
93
|
-
if (isIOS && !_iOSWorkaround) {
|
|
94
|
-
_iOSWorkaround = true;
|
|
95
|
-
Array.from(window.document.body.children).forEach(function (el) {
|
|
96
|
-
return el.addEventListener("click", noop);
|
|
97
|
-
});
|
|
98
|
-
window.document.documentElement.addEventListener("click", noop);
|
|
99
|
-
}
|
|
100
|
-
var shouldListen = true;
|
|
101
|
-
var shouldIgnore = function shouldIgnore(event) {
|
|
102
|
-
return ignore.some(function (target2) {
|
|
103
|
-
if (typeof target2 === "string") {
|
|
104
|
-
return Array.from(window.document.querySelectorAll(target2)).some(function (el) {
|
|
105
|
-
return el === event.target || event.composedPath().includes(el);
|
|
106
|
-
});
|
|
107
|
-
} else {
|
|
108
|
-
var el = unrefElement(target2);
|
|
109
|
-
return el && (event.target === el || event.composedPath().includes(el));
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
var listener = function listener(event) {
|
|
114
|
-
var el = unrefElement(target);
|
|
115
|
-
if (!el || el === event.target || event.composedPath().includes(el)) return;
|
|
116
|
-
if (event.detail === 0) shouldListen = !shouldIgnore(event);
|
|
117
|
-
if (!shouldListen) {
|
|
118
|
-
shouldListen = true;
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
handler(event);
|
|
122
|
-
};
|
|
123
|
-
var cleanup = [useEventListener(window, "click", listener, {
|
|
124
|
-
passive: true,
|
|
125
|
-
capture: capture
|
|
126
|
-
}), useEventListener(window, "pointerdown", function (e) {
|
|
127
|
-
var el = unrefElement(target);
|
|
128
|
-
shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));
|
|
129
|
-
}, {
|
|
130
|
-
passive: true
|
|
131
|
-
}), detectIframe && useEventListener(window, "blur", function (event) {
|
|
132
|
-
setTimeout(function () {
|
|
133
|
-
var _a;
|
|
134
|
-
var el = unrefElement(target);
|
|
135
|
-
if (((_a = window.document.activeElement) == null ? undefined : _a.tagName) === "IFRAME" && !(el == null ? undefined : el.contains(window.document.activeElement))) {
|
|
136
|
-
handler(event);
|
|
137
|
-
}
|
|
138
|
-
}, 0);
|
|
139
|
-
})].filter(Boolean);
|
|
140
|
-
var stop = function stop() {
|
|
141
|
-
return cleanup.forEach(function (fn) {
|
|
142
|
-
return fn();
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
|
-
return stop;
|
|
146
|
-
}
|
|
147
|
-
function useMounted() {
|
|
148
|
-
var isMounted = ref(false);
|
|
149
|
-
var instance = getCurrentInstance();
|
|
150
|
-
if (instance) {
|
|
151
|
-
onMounted(function () {
|
|
152
|
-
isMounted.value = true;
|
|
153
|
-
}, instance);
|
|
154
|
-
}
|
|
155
|
-
return isMounted;
|
|
156
|
-
}
|
|
157
|
-
function useSupported(callback) {
|
|
158
|
-
var isMounted = useMounted();
|
|
159
|
-
return computed(function () {
|
|
160
|
-
isMounted.value;
|
|
161
|
-
return Boolean(callback());
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
var eventHandlers = ["fullscreenchange", "webkitfullscreenchange", "webkitendfullscreen", "mozfullscreenchange", "MSFullscreenChange"];
|
|
165
|
-
function useFullscreen(target) {
|
|
166
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
167
|
-
var _options$document6 = options.document,
|
|
168
|
-
document = _options$document6 === undefined ? defaultDocument : _options$document6,
|
|
169
|
-
_options$autoExit = options.autoExit,
|
|
170
|
-
autoExit = _options$autoExit === undefined ? false : _options$autoExit;
|
|
171
|
-
var targetRef = computed(function () {
|
|
172
|
-
var _a;
|
|
173
|
-
return (_a = unrefElement(target)) != null ? _a : document == null ? undefined : document.querySelector("html");
|
|
174
|
-
});
|
|
175
|
-
var isFullscreen = ref(false);
|
|
176
|
-
var requestMethod = computed(function () {
|
|
177
|
-
return ["requestFullscreen", "webkitRequestFullscreen", "webkitEnterFullscreen", "webkitEnterFullScreen", "webkitRequestFullScreen", "mozRequestFullScreen", "msRequestFullscreen"].find(function (m) {
|
|
178
|
-
return document && m in document || targetRef.value && m in targetRef.value;
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
var exitMethod = computed(function () {
|
|
182
|
-
return ["exitFullscreen", "webkitExitFullscreen", "webkitExitFullScreen", "webkitCancelFullScreen", "mozCancelFullScreen", "msExitFullscreen"].find(function (m) {
|
|
183
|
-
return document && m in document || targetRef.value && m in targetRef.value;
|
|
184
|
-
});
|
|
185
|
-
});
|
|
186
|
-
var fullscreenEnabled = computed(function () {
|
|
187
|
-
return ["fullScreen", "webkitIsFullScreen", "webkitDisplayingFullscreen", "mozFullScreen", "msFullscreenElement"].find(function (m) {
|
|
188
|
-
return document && m in document || targetRef.value && m in targetRef.value;
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
var fullscreenElementMethod = ["fullscreenElement", "webkitFullscreenElement", "mozFullScreenElement", "msFullscreenElement"].find(function (m) {
|
|
192
|
-
return document && m in document;
|
|
193
|
-
});
|
|
194
|
-
var isSupported = useSupported(function () {
|
|
195
|
-
return targetRef.value && document && requestMethod.value !== undefined && exitMethod.value !== undefined && fullscreenEnabled.value !== undefined;
|
|
196
|
-
});
|
|
197
|
-
var isCurrentElementFullScreen = function isCurrentElementFullScreen() {
|
|
198
|
-
if (fullscreenElementMethod) return (document == null ? undefined : document[fullscreenElementMethod]) === targetRef.value;
|
|
199
|
-
return false;
|
|
200
|
-
};
|
|
201
|
-
var isElementFullScreen = function isElementFullScreen() {
|
|
202
|
-
if (fullscreenEnabled.value) {
|
|
203
|
-
if (document && document[fullscreenEnabled.value] != null) {
|
|
204
|
-
return document[fullscreenEnabled.value];
|
|
205
|
-
} else {
|
|
206
|
-
var target2 = targetRef.value;
|
|
207
|
-
if ((target2 == null ? undefined : target2[fullscreenEnabled.value]) != null) {
|
|
208
|
-
return Boolean(target2[fullscreenEnabled.value]);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
return false;
|
|
213
|
-
};
|
|
214
|
-
function exit() {
|
|
215
|
-
return _exit.apply(this, arguments);
|
|
216
|
-
}
|
|
217
|
-
function _exit() {
|
|
218
|
-
_exit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee25() {
|
|
219
|
-
var target2;
|
|
220
|
-
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
221
|
-
while (1) switch (_context25.prev = _context25.next) {
|
|
222
|
-
case 0:
|
|
223
|
-
if (!(!isSupported.value || !isFullscreen.value)) {
|
|
224
|
-
_context25.next = 2;
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
return _context25.abrupt("return");
|
|
228
|
-
case 2:
|
|
229
|
-
if (!exitMethod.value) {
|
|
230
|
-
_context25.next = 12;
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
if (!((document == null ? undefined : document[exitMethod.value]) != null)) {
|
|
234
|
-
_context25.next = 8;
|
|
235
|
-
break;
|
|
236
|
-
}
|
|
237
|
-
_context25.next = 6;
|
|
238
|
-
return document[exitMethod.value]();
|
|
239
|
-
case 6:
|
|
240
|
-
_context25.next = 12;
|
|
241
|
-
break;
|
|
242
|
-
case 8:
|
|
243
|
-
target2 = targetRef.value;
|
|
244
|
-
if (!((target2 == null ? undefined : target2[exitMethod.value]) != null)) {
|
|
245
|
-
_context25.next = 12;
|
|
246
|
-
break;
|
|
247
|
-
}
|
|
248
|
-
_context25.next = 12;
|
|
249
|
-
return target2[exitMethod.value]();
|
|
250
|
-
case 12:
|
|
251
|
-
isFullscreen.value = false;
|
|
252
|
-
case 13:
|
|
253
|
-
case "end":
|
|
254
|
-
return _context25.stop();
|
|
255
|
-
}
|
|
256
|
-
}, _callee25);
|
|
257
|
-
}));
|
|
258
|
-
return _exit.apply(this, arguments);
|
|
259
|
-
}
|
|
260
|
-
function enter() {
|
|
261
|
-
return _enter.apply(this, arguments);
|
|
262
|
-
}
|
|
263
|
-
function _enter() {
|
|
264
|
-
_enter = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {
|
|
265
|
-
var target2;
|
|
266
|
-
return _regeneratorRuntime.wrap(function _callee26$(_context26) {
|
|
267
|
-
while (1) switch (_context26.prev = _context26.next) {
|
|
268
|
-
case 0:
|
|
269
|
-
if (!(!isSupported.value || isFullscreen.value)) {
|
|
270
|
-
_context26.next = 2;
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
return _context26.abrupt("return");
|
|
274
|
-
case 2:
|
|
275
|
-
if (!isElementFullScreen()) {
|
|
276
|
-
_context26.next = 5;
|
|
277
|
-
break;
|
|
278
|
-
}
|
|
279
|
-
_context26.next = 5;
|
|
280
|
-
return exit();
|
|
281
|
-
case 5:
|
|
282
|
-
target2 = targetRef.value;
|
|
283
|
-
if (!(requestMethod.value && (target2 == null ? undefined : target2[requestMethod.value]) != null)) {
|
|
284
|
-
_context26.next = 10;
|
|
285
|
-
break;
|
|
286
|
-
}
|
|
287
|
-
_context26.next = 9;
|
|
288
|
-
return target2[requestMethod.value]();
|
|
289
|
-
case 9:
|
|
290
|
-
isFullscreen.value = true;
|
|
291
|
-
case 10:
|
|
292
|
-
case "end":
|
|
293
|
-
return _context26.stop();
|
|
294
|
-
}
|
|
295
|
-
}, _callee26);
|
|
296
|
-
}));
|
|
297
|
-
return _enter.apply(this, arguments);
|
|
298
|
-
}
|
|
299
|
-
function toggle() {
|
|
300
|
-
return _toggle.apply(this, arguments);
|
|
301
|
-
}
|
|
302
|
-
function _toggle() {
|
|
303
|
-
_toggle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {
|
|
304
|
-
return _regeneratorRuntime.wrap(function _callee27$(_context27) {
|
|
305
|
-
while (1) switch (_context27.prev = _context27.next) {
|
|
306
|
-
case 0:
|
|
307
|
-
_context27.next = 2;
|
|
308
|
-
return isFullscreen.value ? exit() : enter();
|
|
309
|
-
case 2:
|
|
310
|
-
case "end":
|
|
311
|
-
return _context27.stop();
|
|
312
|
-
}
|
|
313
|
-
}, _callee27);
|
|
314
|
-
}));
|
|
315
|
-
return _toggle.apply(this, arguments);
|
|
316
|
-
}
|
|
317
|
-
var handlerCallback = function handlerCallback() {
|
|
318
|
-
var isElementFullScreenValue = isElementFullScreen();
|
|
319
|
-
if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) isFullscreen.value = isElementFullScreenValue;
|
|
320
|
-
};
|
|
321
|
-
useEventListener(document, eventHandlers, handlerCallback, false);
|
|
322
|
-
useEventListener(function () {
|
|
323
|
-
return unrefElement(targetRef);
|
|
324
|
-
}, eventHandlers, handlerCallback, false);
|
|
325
|
-
if (autoExit) tryOnScopeDispose(exit);
|
|
326
|
-
return {
|
|
327
|
-
isSupported: isSupported,
|
|
328
|
-
isFullscreen: isFullscreen,
|
|
329
|
-
enter: enter,
|
|
330
|
-
exit: exit,
|
|
331
|
-
toggle: toggle
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export { defaultDocument, defaultWindow, isClient, isIOS, isObject, noop, onClickOutside, toValue, tryOnScopeDispose, unrefElement, useEventListener, useFullscreen, useMounted, useSupported };
|
|
@@ -1,40 +0,0 @@
|
|
|
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 '@babel/runtime/helpers/defineProperty';
|
|
7
|
-
import '@babel/runtime/regenerator';
|
|
8
|
-
import { getCurrentScope, onScopeDispose, unref, onUnmounted, getCurrentInstance } from 'vue';
|
|
9
|
-
|
|
10
|
-
function tryOnScopeDispose(fn) {
|
|
11
|
-
if (getCurrentScope()) {
|
|
12
|
-
onScopeDispose(fn);
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
function toValue(r) {
|
|
18
|
-
return typeof r === "function" ? r() : unref(r);
|
|
19
|
-
}
|
|
20
|
-
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
21
|
-
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
22
|
-
var toString = Object.prototype.toString;
|
|
23
|
-
var isObject = function isObject(val) {
|
|
24
|
-
return toString.call(val) === "[object Object]";
|
|
25
|
-
};
|
|
26
|
-
var noop = function noop() {};
|
|
27
|
-
var isIOS = /* @__PURE__ */getIsIOS();
|
|
28
|
-
function getIsIOS() {
|
|
29
|
-
var _a, _b;
|
|
30
|
-
return isClient && ((_a = window == null ? undefined : window.navigator) == null ? undefined : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? undefined : window.navigator) == null ? undefined : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? undefined : window.navigator.userAgent));
|
|
31
|
-
}
|
|
32
|
-
function getLifeCycleTarget(target) {
|
|
33
|
-
return getCurrentInstance();
|
|
34
|
-
}
|
|
35
|
-
function tryOnUnmounted(fn, target) {
|
|
36
|
-
var instance = getLifeCycleTarget();
|
|
37
|
-
if (instance) onUnmounted(fn, target);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export { getLifeCycleTarget, isClient, isIOS, isObject, noop, toValue, tryOnScopeDispose, tryOnUnmounted };
|