@dfsj/components 3.0.0
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/CHANGELOG.md +203 -0
- package/LICENSE +22 -0
- package/README.md +27 -0
- package/dist/components/Boards/index.d.ts +4 -0
- package/dist/components/Boards/src/Boards.vue.d.ts +33 -0
- package/dist/components/Boards/src/Boards.vue.js +5 -0
- package/dist/components/Boards/src/Boards.vue2.js +113 -0
- package/dist/components/Boards/src/props.d.ts +27 -0
- package/dist/components/Boards/src/props.js +18 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/src/composables/use-month-range-header.d.ts +16 -0
- package/dist/components/DatePicker/src/composables/use-month-range-header.js +52 -0
- package/dist/components/DatePicker/src/composables/use-range-picker.d.ts +100 -0
- package/dist/components/DatePicker/src/composables/use-range-picker.js +99 -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.vue.js +5 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue2.js +564 -0
- 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.vue.js +5 -0
- package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue2.js +210 -0
- package/dist/components/DatePicker/src/index.d.ts +196 -0
- package/dist/components/DatePicker/src/index.js +87 -0
- package/dist/components/DatePicker/src/panel-utils.d.ts +2 -0
- package/dist/components/DatePicker/src/panel-utils.js +25 -0
- package/dist/components/Editor/index.d.ts +6 -0
- package/dist/components/Editor/src/Editor.vue.d.ts +50 -0
- package/dist/components/Editor/src/Editor.vue.js +5 -0
- package/dist/components/Editor/src/Editor.vue2.js +138 -0
- package/dist/components/Form/index.d.ts +16 -0
- package/dist/components/Form/src/Form.vue.d.ts +164 -0
- package/dist/components/Form/src/Form.vue.js +5 -0
- package/dist/components/Form/src/Form.vue2.js +378 -0
- package/dist/components/Form/src/components/useRenderCheckbox.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderCheckbox.js +33 -0
- package/dist/components/Form/src/components/useRenderRadio.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderRadio.js +33 -0
- package/dist/components/Form/src/components/useRenderSelect.d.ts +4 -0
- package/dist/components/Form/src/components/useRenderSelect.js +52 -0
- package/dist/components/Form/src/helper/componentMap.d.ts +5 -0
- package/dist/components/Form/src/helper/componentMap.js +35 -0
- package/dist/components/Form/src/helper/index.d.ts +7 -0
- package/dist/components/Form/src/helper/index.js +109 -0
- package/dist/components/Form/src/types/index.d.ts +533 -0
- package/dist/components/Form/src/types/index.js +31 -0
- package/dist/components/Form/src/useForm.d.ts +1 -0
- package/dist/components/Form/src/useForm.js +290 -0
- package/dist/components/Highlight/index.d.ts +2 -0
- package/dist/components/Highlight/src/Highlight.vue.d.ts +41 -0
- package/dist/components/Highlight/src/Highlight.vue.js +5 -0
- package/dist/components/Highlight/src/Highlight.vue2.js +62 -0
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/Icon/src/Icon.vue.d.ts +49 -0
- package/dist/components/Icon/src/Icon.vue.js +5 -0
- package/dist/components/Icon/src/Icon.vue2.js +123 -0
- package/dist/components/Icon/src/SvgIcon.vue.d.ts +45 -0
- package/dist/components/Icon/src/SvgIcon.vue.js +7 -0
- package/dist/components/Icon/src/SvgIcon.vue2.js +45 -0
- package/dist/components/Icon/src/SvgIcon.vue3.js +14 -0
- package/dist/components/InputPassword/index.d.ts +2 -0
- package/dist/components/InputPassword/src/InputPassword.vue.d.ts +27 -0
- package/dist/components/InputPassword/src/InputPassword.vue.js +5 -0
- package/dist/components/InputPassword/src/InputPassword.vue2.js +58 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/src/BasicModal.vue.d.ts +280 -0
- package/dist/components/Modal/src/BasicModal.vue.js +5 -0
- package/dist/components/Modal/src/BasicModal.vue2.js +150 -0
- package/dist/components/Modal/src/components/ModalFooter.vue.d.ts +86 -0
- package/dist/components/Modal/src/components/ModalFooter.vue.js +5 -0
- package/dist/components/Modal/src/components/ModalFooter.vue2.js +30 -0
- package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +142 -0
- package/dist/components/Modal/src/components/ModalHeader.vue.js +5 -0
- package/dist/components/Modal/src/components/ModalHeader.vue2.js +63 -0
- package/dist/components/Modal/src/config.d.ts +24 -0
- package/dist/components/Modal/src/config.js +25 -0
- package/dist/components/Modal/src/hooks/useModalDrag.d.ts +24 -0
- package/dist/components/Modal/src/hooks/useModalDrag.js +108 -0
- package/dist/components/Modal/src/hooks/useTimeout.d.ts +15 -0
- package/dist/components/Modal/src/hooks/useTimeout.js +53 -0
- package/dist/components/Modal/src/props.d.ts +131 -0
- package/dist/components/Modal/src/props.js +107 -0
- package/dist/components/Modal/src/utils/index.d.ts +3 -0
- package/dist/components/Modal/src/utils/index.js +86 -0
- package/dist/components/Stateful/index.d.ts +4 -0
- package/dist/components/Stateful/src/State.d.ts +20 -0
- package/dist/components/Stateful/src/State.js +82 -0
- package/dist/components/Stateful/src/Stateful.vue.d.ts +44 -0
- package/dist/components/Stateful/src/Stateful.vue.js +5 -0
- package/dist/components/Stateful/src/Stateful.vue2.js +46 -0
- package/dist/components/Stateful/src/props.d.ts +39 -0
- package/dist/components/Stateful/src/props.js +29 -0
- package/dist/components/Table/index.d.ts +14 -0
- package/dist/components/Table/src/Table.vue.d.ts +537 -0
- package/dist/components/Table/src/Table.vue.js +5 -0
- package/dist/components/Table/src/Table.vue2.js +582 -0
- package/dist/components/Table/src/components/ColumnSetting.vue.d.ts +30 -0
- package/dist/components/Table/src/components/ColumnSetting.vue.js +5 -0
- package/dist/components/Table/src/components/ColumnSetting.vue2.js +264 -0
- package/dist/components/Table/src/components/TableActions.vue.d.ts +20 -0
- package/dist/components/Table/src/components/TableActions.vue.js +5 -0
- package/dist/components/Table/src/components/TableActions.vue2.js +108 -0
- package/dist/components/Table/src/helper/index.d.ts +2 -0
- package/dist/components/Table/src/helper/index.js +11 -0
- package/dist/components/Table/src/types/index.d.ts +87 -0
- package/dist/components/Table/src/useTable.d.ts +1 -0
- package/dist/components/Table/src/useTable.js +284 -0
- package/dist/components/UnifyChart/index.d.ts +4 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +63 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue.js +5 -0
- package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +83 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +185 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue.js +5 -0
- package/dist/components/UnifyChart/src/UnifyChart.vue2.js +54 -0
- package/dist/components/UnifyChart/src/hooks/useLoader.d.ts +11 -0
- package/dist/components/UnifyChart/src/hooks/useRender.d.ts +24 -0
- package/dist/components/UnifyChart/src/hooks/useRender.js +49 -0
- package/dist/components/UnifyChart/src/props.d.ts +145 -0
- package/dist/components/UnifyChart/src/props.js +33 -0
- package/dist/components/Video/index.d.ts +2 -0
- package/dist/components/Video/src/VideoPlayer.vue.d.ts +60 -0
- package/dist/components/Video/src/VideoPlayer.vue.js +5 -0
- package/dist/components/Video/src/VideoPlayer.vue2.js +107 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue.d.ts +34 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue.js +5 -0
- package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +65 -0
- 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/Observable.js +89 -0
- package/dist/components/Video/src/abstract/VideoControl.d.ts +32 -0
- package/dist/components/Video/src/abstract/VideoControl.js +50 -0
- package/dist/components/Video/src/control/DaHua.d.ts +12 -0
- package/dist/components/Video/src/control/DaHua.js +156 -0
- package/dist/components/Video/src/control/Hikvision.d.ts +28 -0
- package/dist/components/Video/src/control/Hikvision.js +251 -0
- package/dist/components/Video/src/control/VideoFactory.d.ts +3 -0
- package/dist/components/Video/src/control/VideoFactory.js +32 -0
- package/dist/components/Video/src/enums/CommonEnum.d.ts +26 -0
- package/dist/components/Video/src/enums/CommonEnum.js +31 -0
- package/dist/components/Windows/index.d.ts +4 -0
- package/dist/components/Windows/src/ModalWrap.vue.d.ts +14 -0
- package/dist/components/Windows/src/ModalWrap.vue.js +5 -0
- package/dist/components/Windows/src/ModalWrap.vue2.js +90 -0
- package/dist/components/Windows/src/Windows.vue.d.ts +18 -0
- package/dist/components/Windows/src/Windows.vue.js +7 -0
- package/dist/components/Windows/src/Windows.vue2.js +51 -0
- package/dist/components/Windows/src/Windows.vue3.js +22 -0
- package/dist/components/Windows/src/props.d.ts +20 -0
- package/dist/components/Windows/src/props.js +9 -0
- package/dist/directives/clickOutside.d.ts +3 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/repeatClick.d.ts +3 -0
- package/dist/helper/lang.d.ts +1 -0
- package/dist/helper/lang.js +546 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +36 -0
- package/dist/index.min.css +6 -0
- package/dist/node_modules/.pnpm/@vueuse_core@10.7.2_vue@3.4.21/node_modules/@vueuse/core/index.js +268 -0
- package/dist/node_modules/.pnpm/@vueuse_shared@10.7.2_vue@3.4.21/node_modules/@vueuse/shared/index.js +34 -0
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/index.js +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.js +24 -0
- package/dist/utils/is.d.ts +25 -0
- package/dist/utils/is.js +36 -0
- package/dist/utils/propTypes.d.ts +10 -0
- package/dist/utils/propTypes.js +35 -0
- package/dist/utils/tsxHelper.d.ts +5 -0
- package/dist/utils/tsxHelper.js +18 -0
- package/package.json +64 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import { defineComponent, ref, watch, onUnmounted, defineAsyncComponent, h } from 'vue';
|
|
3
|
+
import '../../Modal/src/BasicModal.vue.js';
|
|
4
|
+
import script$1 from '../../Modal/src/BasicModal.vue2.js';
|
|
5
|
+
|
|
6
|
+
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; }
|
|
7
|
+
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; }
|
|
8
|
+
var script = defineComponent({
|
|
9
|
+
name: 'ModalWrap',
|
|
10
|
+
props: {
|
|
11
|
+
zIndex: Number,
|
|
12
|
+
options: Object
|
|
13
|
+
},
|
|
14
|
+
emits: ['close'],
|
|
15
|
+
setup: function setup(props, context) {
|
|
16
|
+
var options = props.options;
|
|
17
|
+
var properties = ref(null);
|
|
18
|
+
var zIndex = ref(props.zIndex);
|
|
19
|
+
var isClosed = false;
|
|
20
|
+
function onAction(name) {
|
|
21
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
22
|
+
args[_key - 1] = arguments[_key];
|
|
23
|
+
}
|
|
24
|
+
if (options.onAction) options.onAction.apply(options, [name].concat(args));
|
|
25
|
+
if (options.prevent !== true) context.emit('close');
|
|
26
|
+
}
|
|
27
|
+
function onSubmit() {
|
|
28
|
+
if (options.onSubmit) options.onSubmit.apply(options, arguments);
|
|
29
|
+
if (options.prevent !== true) context.emit('close');
|
|
30
|
+
}
|
|
31
|
+
function onCancel(e) {
|
|
32
|
+
if (isClosed === true || e && e.type === 'cancel') return;
|
|
33
|
+
if (options.onCancel) options === null || options === void 0 || options.onCancel();
|
|
34
|
+
if (options.prevent !== true) context.emit('close');
|
|
35
|
+
isClosed = true;
|
|
36
|
+
}
|
|
37
|
+
context.expose({
|
|
38
|
+
setZIndex: function setZIndex(v) {
|
|
39
|
+
return zIndex.value = v;
|
|
40
|
+
},
|
|
41
|
+
getZIndex: function getZIndex() {
|
|
42
|
+
return zIndex.value;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
watch(function () {
|
|
46
|
+
return props.options.props;
|
|
47
|
+
}, function (v) {
|
|
48
|
+
return properties.value = v;
|
|
49
|
+
}, {
|
|
50
|
+
immediate: true
|
|
51
|
+
});
|
|
52
|
+
onUnmounted(onCancel);
|
|
53
|
+
var isComponent = options.content instanceof Function;
|
|
54
|
+
var component = isComponent ? defineAsyncComponent({
|
|
55
|
+
loader: options.content
|
|
56
|
+
}) : undefined;
|
|
57
|
+
if (options.directly === true) {
|
|
58
|
+
component = isComponent ? defineAsyncComponent(options.content) : undefined;
|
|
59
|
+
return function () {
|
|
60
|
+
return h(component, _objectSpread(_objectSpread({}, properties.value), {}, {
|
|
61
|
+
zIndex: zIndex.value,
|
|
62
|
+
onSubmit: onSubmit,
|
|
63
|
+
onCancel: onCancel
|
|
64
|
+
}));
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return function () {
|
|
68
|
+
var _options$item;
|
|
69
|
+
return h(script$1, _objectSpread(_objectSpread({}, options), {}, {
|
|
70
|
+
visible: true,
|
|
71
|
+
zIndex: zIndex.value,
|
|
72
|
+
onSubmit: onSubmit,
|
|
73
|
+
onCancel: onCancel,
|
|
74
|
+
onClose: onCancel,
|
|
75
|
+
key: (_options$item = options.item) === null || _options$item === void 0 ? void 0 : _options$item.id
|
|
76
|
+
}), function () {
|
|
77
|
+
return isComponent ? h(component, _objectSpread(_objectSpread({}, properties.value), {}, {
|
|
78
|
+
onSubmit: onSubmit,
|
|
79
|
+
onCancel: onCancel,
|
|
80
|
+
onAction: onAction
|
|
81
|
+
})) : h('div', {
|
|
82
|
+
"class": 'html-content',
|
|
83
|
+
innerHTML: options.content
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export { script as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
items: {
|
|
3
|
+
type: import("vue").PropType<import("./props").Options[]>;
|
|
4
|
+
};
|
|
5
|
+
front: StringConstructor;
|
|
6
|
+
layer: NumberConstructor;
|
|
7
|
+
}, {
|
|
8
|
+
setRefs: (index: number) => (el: HTMLElement) => void;
|
|
9
|
+
zIndex: number;
|
|
10
|
+
onClose: (id: string) => void;
|
|
11
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
items: {
|
|
13
|
+
type: import("vue").PropType<import("./props").Options[]>;
|
|
14
|
+
};
|
|
15
|
+
front: StringConstructor;
|
|
16
|
+
layer: NumberConstructor;
|
|
17
|
+
}>>, {}, {}>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent, ref, watch } from 'vue';
|
|
2
|
+
import { WindowsProps } from './props.js';
|
|
3
|
+
import './ModalWrap.vue.js';
|
|
4
|
+
import script$1 from './ModalWrap.vue2.js';
|
|
5
|
+
|
|
6
|
+
var script = defineComponent({
|
|
7
|
+
name: 'Windows',
|
|
8
|
+
props: WindowsProps,
|
|
9
|
+
components: {
|
|
10
|
+
ModalWrap: script$1
|
|
11
|
+
},
|
|
12
|
+
setup: function setup(props) {
|
|
13
|
+
var zIndex = props.layer || 1000000000;
|
|
14
|
+
var refs = ref([]);
|
|
15
|
+
var setRefs = function setRefs(index) {
|
|
16
|
+
return function (el) {
|
|
17
|
+
refs.value[index] = el;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
function onFront(id) {
|
|
21
|
+
console.log('refs', refs);
|
|
22
|
+
var window = refs[id];
|
|
23
|
+
if (window != null) {
|
|
24
|
+
var _zIndex = window === null || window === void 0 ? void 0 : window.getZIndex();
|
|
25
|
+
if (_zIndex < zIndex) {
|
|
26
|
+
window === null || window === void 0 || window.setZIndex(++zIndex);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function onClose(id) {
|
|
31
|
+
var index = props.items.findIndex(function (e) {
|
|
32
|
+
return e.id === id;
|
|
33
|
+
});
|
|
34
|
+
console.log('dddd', id, index);
|
|
35
|
+
if (index >= 0) props.items.splice(index, 1);
|
|
36
|
+
delete refs[id];
|
|
37
|
+
}
|
|
38
|
+
watch(function () {
|
|
39
|
+
return props.front;
|
|
40
|
+
}, function (id) {
|
|
41
|
+
return onFront(id);
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
setRefs: setRefs,
|
|
45
|
+
zIndex: zIndex,
|
|
46
|
+
onClose: onClose
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export { script as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { resolveComponent, openBlock, createElementBlock, Fragment, renderList, createBlock } from 'vue';
|
|
2
|
+
|
|
3
|
+
var _hoisted_1 = {
|
|
4
|
+
"class": "component windows"
|
|
5
|
+
};
|
|
6
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7
|
+
var _component_ModalWrap = resolveComponent("ModalWrap");
|
|
8
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, function (item, index) {
|
|
9
|
+
return openBlock(), createBlock(_component_ModalWrap, {
|
|
10
|
+
key: item.id,
|
|
11
|
+
ref_for: true,
|
|
12
|
+
ref: _ctx.setRefs(index),
|
|
13
|
+
zIndex: item.zIndex || _ctx.zIndex++,
|
|
14
|
+
options: item,
|
|
15
|
+
onClose: function onClose() {
|
|
16
|
+
return _ctx.onClose(item.id);
|
|
17
|
+
}
|
|
18
|
+
}, null, 8 /* PROPS */, ["zIndex", "options", "onClose"]);
|
|
19
|
+
}), 128 /* KEYED_FRAGMENT */))]);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { render };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { baseProps, footerProps, headerProps } from '../../Modal/src/props';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
export type Options = {
|
|
4
|
+
id: string;
|
|
5
|
+
onAction?: (action: string, model?: {}) => void;
|
|
6
|
+
onSubmit?: (model?: {}) => void;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
content: string | Function;
|
|
9
|
+
directly?: boolean;
|
|
10
|
+
props?: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
} & Partial<typeof baseProps> & Partial<typeof headerProps> & Partial<typeof footerProps>;
|
|
14
|
+
export declare const WindowsProps: {
|
|
15
|
+
items: {
|
|
16
|
+
type: PropType<Options[]>;
|
|
17
|
+
};
|
|
18
|
+
front: StringConstructor;
|
|
19
|
+
layer: NumberConstructor;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getLabel: (filed: string) => any;
|