@dfsj/components 3.7.2 → 4.0.0-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/CHANGELOG.md +57 -449
- package/README.md +101 -24
- package/dist/_virtual/_rollupPluginBabelHelpers.js +13 -0
- package/dist/components/Boards/src/Boards.vue.js +10 -4
- package/dist/components/Boards/src/Boards.vue2.js +10 -147
- package/dist/components/Boards/src/hooKs/useStyle.d.ts +16 -4
- package/dist/components/Boards/src/hooKs/useStyle.js +10 -99
- package/dist/components/Boards/src/props.d.ts +6 -22
- package/dist/components/Boards/src/props.js +10 -55
- package/dist/components/ClickOutSide/src/ClickOutSide.vue.js +10 -4
- package/dist/components/ClickOutSide/src/ClickOutSide.vue2.js +10 -25
- package/dist/components/Descriptions/src/Descriptions.vue.js +10 -4
- package/dist/components/Descriptions/src/Descriptions.vue2.js +10 -150
- package/dist/components/Editor/src/Editor.vue.js +10 -4
- package/dist/components/Editor/src/Editor.vue2.js +10 -137
- package/dist/components/Form/src/Form.vue.js +10 -4
- package/dist/components/Form/src/Form.vue2.js +10 -388
- package/dist/components/Form/src/components/useRenderCheckbox.js +10 -32
- package/dist/components/Form/src/components/useRenderRadio.js +10 -32
- package/dist/components/Form/src/components/useRenderSelect.js +10 -51
- package/dist/components/Form/src/helper/componentMap.js +10 -34
- package/dist/components/Form/src/helper/index.js +10 -108
- package/dist/components/Form/src/types/index.d.ts +80 -84
- package/dist/components/Form/src/types/index.js +10 -30
- package/dist/components/Form/src/useForm.js +10 -289
- package/dist/components/Highlight/src/Highlight.vue.js +10 -4
- package/dist/components/Highlight/src/Highlight.vue2.js +10 -61
- package/dist/components/Icon/src/Icon.vue.js +10 -4
- package/dist/components/Icon/src/Icon.vue2.js +10 -122
- package/dist/components/Icon/src/SvgIcon.vue.js +10 -6
- package/dist/components/Icon/src/SvgIcon.vue2.js +10 -44
- package/dist/components/Icon/src/SvgIcon.vue3.js +10 -13
- package/dist/components/InputPassword/src/InputPassword.vue.js +10 -4
- package/dist/components/InputPassword/src/InputPassword.vue2.js +10 -57
- package/dist/components/Modal/src/BasicModal.vue.js +10 -4
- package/dist/components/Modal/src/BasicModal.vue2.js +10 -154
- package/dist/components/Modal/src/components/ModalFooter.vue.js +10 -4
- package/dist/components/Modal/src/components/ModalFooter.vue2.js +10 -39
- package/dist/components/Modal/src/components/ModalHeader.vue.js +10 -4
- package/dist/components/Modal/src/components/ModalHeader.vue2.js +10 -80
- package/dist/components/Modal/src/config.d.ts +3 -2
- package/dist/components/Modal/src/config.js +10 -28
- package/dist/components/Modal/src/hooks/useModalDrag.js +10 -109
- package/dist/components/Modal/src/hooks/useTimeout.js +10 -52
- package/dist/components/Modal/src/props.d.ts +16 -56
- package/dist/components/Modal/src/props.js +10 -130
- package/dist/components/Modal/src/utils/index.js +10 -85
- package/dist/components/NodeAxis/src/AbstractNodeProvider.js +10 -21
- package/dist/components/NodeAxis/src/CanvasNodeRender.d.ts +3 -12
- package/dist/components/NodeAxis/src/CanvasNodeRender.js +10 -411
- package/dist/components/NodeAxis/src/NodeAxis.vue.js +10 -4
- package/dist/components/NodeAxis/src/NodeAxis.vue2.js +10 -68
- package/dist/components/NodeAxis/src/NodeModel.js +10 -62
- package/dist/components/NodeAxis/src/NodeRender.js +10 -28
- package/dist/components/NodeAxis/src/NullLayerProvider.js +10 -86
- package/dist/components/NodeAxis/src/NullProvider.js +10 -65
- package/dist/components/NodeAxis/src/TimerNodePlayer.js +10 -148
- package/dist/components/NodeAxis/src/config/node-axis.options.js +10 -55
- package/dist/components/NodeAxis/src/enum/index.js +10 -19
- package/dist/components/NodeAxis/src/utils/assign.js +10 -42
- package/dist/components/Stateful/src/State.js +10 -78
- package/dist/components/Stateful/src/Stateful.vue.js +10 -4
- package/dist/components/Stateful/src/Stateful.vue2.js +10 -52
- package/dist/components/Stateful/src/props.d.ts +2 -6
- package/dist/components/Stateful/src/props.js +10 -28
- package/dist/components/Table/index.d.ts +3 -3
- package/dist/components/Table/src/Table.vue.js +10 -4
- package/dist/components/Table/src/Table.vue2.js +10 -583
- package/dist/components/Table/src/components/ColumnSetting.vue.js +10 -4
- package/dist/components/Table/src/components/ColumnSetting.vue2.js +10 -263
- package/dist/components/Table/src/components/TableActions.vue.js +10 -4
- package/dist/components/Table/src/components/TableActions.vue2.js +10 -107
- package/dist/components/Table/src/helper/index.js +10 -10
- package/dist/components/Table/src/types/index.d.ts +11 -13
- package/dist/components/Table/src/useTable.d.ts +36 -1
- package/dist/components/Table/src/useTable.js +10 -283
- package/dist/components/UnifyChart/src/ChartToolbox.vue.js +10 -4
- package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +10 -82
- package/dist/components/UnifyChart/src/UnifyChart.vue.js +10 -4
- package/dist/components/UnifyChart/src/UnifyChart.vue2.js +10 -57
- package/dist/components/UnifyChart/src/hooks/useLoader.js +10 -92
- package/dist/components/UnifyChart/src/hooks/useRender.d.ts +8 -13
- package/dist/components/UnifyChart/src/hooks/useRender.js +10 -49
- package/dist/components/UnifyChart/src/props.d.ts +13 -59
- package/dist/components/UnifyChart/src/props.js +10 -32
- package/dist/components/UnifyChart/src/useDownLoad.js +10 -26
- package/dist/components/Visual/src/BufferLayerPlayer.d.ts +9 -5
- package/dist/components/Visual/src/BufferLayerPlayer.js +10 -288
- package/dist/components/Visual/src/ResolvableLayerProvider.js +10 -252
- package/dist/components/Visual/src/config/default.manager.js +10 -6
- package/dist/components/Visual/src/config/default.provider.js +10 -17
- package/dist/components/Visual/src/mapping.js +10 -6
- package/dist/components/Visual/src/resolvers/IntervalResolver.js +10 -168
- package/dist/components/Visual/src/resolvers/tools.resolver.js +10 -151
- package/dist/components/Visual/src/utils/NodeMath.js +10 -99
- package/dist/components/Windows/src/ModalWrap.vue.js +10 -4
- package/dist/components/Windows/src/ModalWrap.vue2.js +10 -132
- package/dist/components/Windows/src/Windows.vue.js +10 -6
- package/dist/components/Windows/src/Windows.vue2.js +10 -55
- package/dist/components/Windows/src/Windows.vue3.js +10 -24
- package/dist/components/Windows/src/props.js +10 -8
- package/dist/directives/clickOutside.js +10 -70
- package/dist/directives/repeatClick.js +10 -28
- package/dist/directives/resizable.js +10 -195
- package/dist/index.d.ts +0 -2
- package/dist/index.js +11 -53
- package/dist/index.min.css +3 -3
- package/dist/themes/index.js +9 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/utils/index.js +10 -23
- package/package.json +93 -66
- package/dist/components/Boards/src/Boards.vue.d.ts +0 -102
- package/dist/components/ClickOutSide/src/ClickOutSide.vue.d.ts +0 -7
- 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/Descriptions/src/Descriptions.vue.d.ts +0 -97
- package/dist/components/Editor/src/Editor.vue.d.ts +0 -51
- package/dist/components/Form/src/Form.vue.d.ts +0 -838
- package/dist/components/Highlight/src/Highlight.vue.d.ts +0 -41
- package/dist/components/Icon/src/Icon.vue.d.ts +0 -49
- package/dist/components/Icon/src/SvgIcon.vue.d.ts +0 -45
- package/dist/components/InputPassword/src/InputPassword.vue.d.ts +0 -27
- package/dist/components/Modal/src/BasicModal.vue.d.ts +0 -419
- package/dist/components/Modal/src/components/ModalFooter.vue.d.ts +0 -86
- package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +0 -241
- package/dist/components/NodeAxis/src/BCanvasNodeRender.d.ts +0 -19
- package/dist/components/NodeAxis/src/NodeAxis.vue.d.ts +0 -17
- package/dist/components/Stateful/src/Stateful.vue.d.ts +0 -22
- package/dist/components/Table/src/Table.vue.d.ts +0 -1535
- package/dist/components/Table/src/components/ColumnSetting.vue.d.ts +0 -30
- package/dist/components/Table/src/components/TableActions.vue.d.ts +0 -229
- package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +0 -46
- package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +0 -95
- package/dist/components/Video/index.d.ts +0 -2
- package/dist/components/Video/src/VideoPlayer.vue.d.ts +0 -60
- package/dist/components/Video/src/VideoPlayer.vue.js +0 -5
- package/dist/components/Video/src/VideoPlayer.vue2.js +0 -107
- package/dist/components/Video/src/VideoPlayerToolbar.vue.d.ts +0 -34
- package/dist/components/Video/src/VideoPlayerToolbar.vue.js +0 -5
- package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +0 -65
- package/dist/components/Video/src/abstract/AbstractVideoControl.d.ts +0 -7
- package/dist/components/Video/src/abstract/Observable.d.ts +0 -6
- package/dist/components/Video/src/abstract/Observable.js +0 -89
- package/dist/components/Video/src/abstract/VideoControl.d.ts +0 -32
- package/dist/components/Video/src/abstract/VideoControl.js +0 -48
- package/dist/components/Video/src/control/DaHua.d.ts +0 -12
- package/dist/components/Video/src/control/DaHua.js +0 -154
- package/dist/components/Video/src/control/Hikvision.d.ts +0 -28
- package/dist/components/Video/src/control/Hikvision.js +0 -249
- package/dist/components/Video/src/control/VideoFactory.d.ts +0 -3
- package/dist/components/Video/src/control/VideoFactory.js +0 -31
- package/dist/components/Video/src/enums/CommonEnum.d.ts +0 -26
- package/dist/components/Video/src/enums/CommonEnum.js +0 -31
- package/dist/components/Windows/src/ModalWrap.vue.d.ts +0 -14
- package/dist/components/Windows/src/Windows.vue.d.ts +0 -21
- 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/helper/lang.d.ts +0 -1
- package/dist/helper/lang.js +0 -546
- 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_core@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/core/index.js +0 -393
- 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/node_modules/.pnpm/@vueuse_shared@13.7.0_vue@3.5.19_typescript@5.9.2_/node_modules/@vueuse/shared/index.js +0 -53
|
@@ -1,50 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.2
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-10 11:00:57
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
4
10
|
|
|
5
|
-
function
|
|
6
|
-
var getInstance = config.getInstance,
|
|
7
|
-
setOptions = config.setOptions,
|
|
8
|
-
_config$transform = config.transform,
|
|
9
|
-
transform = _config$transform === void 0 ? function (d) {
|
|
10
|
-
return d;
|
|
11
|
-
} : _config$transform,
|
|
12
|
-
_config$createOptions = config.createOptions,
|
|
13
|
-
createOptions = _config$createOptions === void 0 ? function (p) {
|
|
14
|
-
return p;
|
|
15
|
-
} : _config$createOptions,
|
|
16
|
-
assemble = config.assemble,
|
|
17
|
-
toggleTable = config.toggleTable,
|
|
18
|
-
toggleStatistic = config.toggleStatistic;
|
|
19
|
-
var getBindValue = computed(function () {
|
|
20
|
-
return {
|
|
21
|
-
instance: getInstance,
|
|
22
|
-
toggleTable: toggleTable,
|
|
23
|
-
toggleStatistic: toggleStatistic,
|
|
24
|
-
toolbox: toolbox !== null && toolbox !== void 0 ? toolbox : [EToolbox.Download, EToolbox.Table, EToolbox.Statistic]
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
function refreshCharts(data) {
|
|
28
|
-
if (!data || isEmpty(data)) return;
|
|
29
|
-
transform(data);
|
|
30
|
-
var optioned = createOptions(data);
|
|
31
|
-
var options = assemble(data, optioned);
|
|
32
|
-
setTimeout(function () {
|
|
33
|
-
setOptions(options, true);
|
|
34
|
-
}, 100);
|
|
35
|
-
}
|
|
36
|
-
watch(function () {
|
|
37
|
-
return datasource.value;
|
|
38
|
-
}, function (v) {
|
|
39
|
-
refreshCharts(v);
|
|
40
|
-
});
|
|
41
|
-
onMounted(function () {
|
|
42
|
-
refreshCharts(datasource.value);
|
|
43
|
-
});
|
|
44
|
-
return {
|
|
45
|
-
refreshCharts: refreshCharts,
|
|
46
|
-
getBindValue: getBindValue
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { useRender };
|
|
11
|
+
import{computed as t,watch as n,onMounted as o}from"vue";import{EToolbox as e}from"../props.js";import{isEmpty as i}from"@dfsj/utils";function r(r,u,a){var s=r.getInstance,f=r.setOptions,l=r.transform,c=void 0===l?function(t){return t}:l,g=r.createOptions,m=void 0===g?function(t){return t}:g,p=r.assemble,v=r.toggleTable,b=r.toggleStatistic,d=t(function(){return{instance:s,toggleTable:v,toggleStatistic:b,toolbox:null!=a?a:[e.Download,e.Table,e.Statistic]}});function T(t){if(t&&!i(t)){c(t);var n=m(t),o=p(t,n);setTimeout(function(){f(o,!0)},100)}}return n(function(){return u.value},function(t){T(t)}),o(function(){T(u.value)}),{refreshCharts:T,getBindValue:d}}export{r as useRender};
|
|
@@ -3,57 +3,23 @@ export interface Convert {
|
|
|
3
3
|
transform: Function;
|
|
4
4
|
}
|
|
5
5
|
export declare const unifyChartProps: {
|
|
6
|
-
data:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
options: import("vue-types").VueTypeValidableDef<Record<string, any>, import("vue-types/dist/shared/vue-types.d8e57a80").b<Record<string, any>>> & {
|
|
12
|
-
default: () => Record<string, any>;
|
|
13
|
-
} & {
|
|
14
|
-
default: () => Record<string, any>;
|
|
15
|
-
};
|
|
16
|
-
width: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
17
|
-
default: string;
|
|
18
|
-
} & {
|
|
19
|
-
default: string;
|
|
20
|
-
};
|
|
21
|
-
height: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/shared/vue-types.d8e57a80").b<string>> & {
|
|
22
|
-
default: string;
|
|
23
|
-
} & {
|
|
24
|
-
default: string;
|
|
25
|
-
};
|
|
26
|
-
target: import("vue-types").VueTypeValidableDef<Record<string, any>, import("vue-types/dist/shared/vue-types.d8e57a80").b<Record<string, any>>> & {
|
|
27
|
-
default: () => Record<string, any>;
|
|
28
|
-
} & {
|
|
29
|
-
default: () => Record<string, any>;
|
|
30
|
-
};
|
|
6
|
+
data: any;
|
|
7
|
+
options: any;
|
|
8
|
+
width: any;
|
|
9
|
+
height: any;
|
|
10
|
+
target: any;
|
|
31
11
|
convert: () => Convert;
|
|
32
|
-
datasource:
|
|
33
|
-
default: () => Record<string, any>;
|
|
34
|
-
} & {
|
|
35
|
-
default: () => Record<string, any>;
|
|
36
|
-
};
|
|
12
|
+
datasource: any;
|
|
37
13
|
toolbox: () => Array<IToolbox>;
|
|
38
|
-
chartHooks:
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
stateful: import("vue-types").VueTypeValidableDef<Record<string, any>, import("vue-types/dist/shared/vue-types.d8e57a80").b<Record<string, any>>> & {
|
|
42
|
-
default: () => Record<string, any>;
|
|
43
|
-
} & {
|
|
44
|
-
default: () => Record<string, any>;
|
|
45
|
-
};
|
|
14
|
+
chartHooks: any;
|
|
15
|
+
stateful: any;
|
|
46
16
|
};
|
|
47
17
|
interface Options {
|
|
48
18
|
loader: Function;
|
|
49
19
|
condition: Object;
|
|
50
20
|
}
|
|
51
21
|
export declare const compProps: {
|
|
52
|
-
target:
|
|
53
|
-
default: () => Record<string, any>;
|
|
54
|
-
} & {
|
|
55
|
-
default: () => Record<string, any>;
|
|
56
|
-
};
|
|
22
|
+
target: any;
|
|
57
23
|
options: () => Options;
|
|
58
24
|
};
|
|
59
25
|
export type useLoaderProps = {
|
|
@@ -68,22 +34,10 @@ export declare enum EToolbox {
|
|
|
68
34
|
export type EToolboxKeys = keyof typeof EToolbox;
|
|
69
35
|
export type IToolbox = EToolbox[EToolboxKeys];
|
|
70
36
|
export declare const toolboxProps: {
|
|
71
|
-
instance:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
};
|
|
76
|
-
iconSize: import("vue-types").VueTypeValidableDef<number, import("vue-types/dist/shared/vue-types.d8e57a80").b<number>> & {
|
|
77
|
-
default: number;
|
|
78
|
-
} & {
|
|
79
|
-
default: number;
|
|
80
|
-
};
|
|
81
|
-
toggleTable: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/shared/vue-types.d8e57a80").b<(...args: any[]) => any>> & {
|
|
82
|
-
default: (...args: any[]) => any;
|
|
83
|
-
};
|
|
84
|
-
toggleStatistic: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/shared/vue-types.d8e57a80").b<(...args: any[]) => any>> & {
|
|
85
|
-
default: (...args: any[]) => any;
|
|
86
|
-
};
|
|
37
|
+
instance: any;
|
|
38
|
+
iconSize: any;
|
|
39
|
+
toggleTable: any;
|
|
40
|
+
toggleStatistic: any;
|
|
87
41
|
toolbox: () => Array<IToolbox>;
|
|
88
42
|
};
|
|
89
43
|
export {};
|
|
@@ -1,33 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.2
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-10 11:00:57
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
2
10
|
|
|
3
|
-
var
|
|
4
|
-
data: propTypes.object.def({}),
|
|
5
|
-
options: propTypes.object.def({}),
|
|
6
|
-
width: propTypes.string.def('100%'),
|
|
7
|
-
height: propTypes.string.def('100%'),
|
|
8
|
-
target: propTypes.object.def({}),
|
|
9
|
-
convert: Object,
|
|
10
|
-
datasource: propTypes.object.def({}),
|
|
11
|
-
toolbox: Array,
|
|
12
|
-
chartHooks: propTypes.func,
|
|
13
|
-
stateful: propTypes.object.def({})
|
|
14
|
-
};
|
|
15
|
-
var compProps = {
|
|
16
|
-
target: propTypes.object.def({}),
|
|
17
|
-
options: Object
|
|
18
|
-
};
|
|
19
|
-
var EToolbox;
|
|
20
|
-
(function (EToolbox) {
|
|
21
|
-
EToolbox[EToolbox["Download"] = 0] = "Download";
|
|
22
|
-
EToolbox[EToolbox["Statistic"] = 1] = "Statistic";
|
|
23
|
-
EToolbox[EToolbox["Table"] = 2] = "Table";
|
|
24
|
-
})(EToolbox || (EToolbox = {}));
|
|
25
|
-
var toolboxProps = {
|
|
26
|
-
instance: propTypes.object.def({}),
|
|
27
|
-
iconSize: propTypes.number.def(28),
|
|
28
|
-
toggleTable: propTypes.func,
|
|
29
|
-
toggleStatistic: propTypes.func,
|
|
30
|
-
toolbox: Array
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export { EToolbox, compProps, toolboxProps, unifyChartProps };
|
|
11
|
+
import t from"vue-types";var e={data:t.object.def({}),options:t.object.def({}),width:t.string.def("100%"),height:t.string.def("100%"),target:t.object.def({}),convert:Object,datasource:t.object.def({}),toolbox:Array,chartHooks:t.func,stateful:t.object.def({})},o={target:t.object.def({}),options:Object},c=function(t){return t[t.Download=0]="Download",t[t.Statistic=1]="Statistic",t[t.Table=2]="Table",t}({}),a={instance:t.func,iconSize:t.number.def(28),toggleTable:t.func,toggleStatistic:t.func,toolbox:Array};export{c as EToolbox,o as compProps,a as toolboxProps,e as unifyChartProps};
|
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var chartIns = typeof getFn == 'function' ? getFn() : getFn;
|
|
11
|
-
var imgUrl = chartIns === null || chartIns === void 0 ? void 0 : chartIns.getDataURL({
|
|
12
|
-
pixelRatio: def.pixelRatio,
|
|
13
|
-
backgroundColor: def.backgroundColor
|
|
14
|
-
});
|
|
15
|
-
var tempA = document.createElement('a');
|
|
16
|
-
tempA.download = def.name + def.suffix;
|
|
17
|
-
tempA.href = imgUrl;
|
|
18
|
-
document.body.appendChild(tempA);
|
|
19
|
-
tempA.click();
|
|
20
|
-
tempA.remove();
|
|
21
|
-
};
|
|
22
|
-
return {
|
|
23
|
-
downloadImg: downloadImg
|
|
24
|
-
};
|
|
25
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.2
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-10 11:00:57
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
26
10
|
|
|
27
|
-
|
|
11
|
+
var o={name:"图表图片",suffix:".png",pixelRatio:2,backgroundColor:"#fff"};function n(n){return{downloadImg:function(e){var a=Object.assign({},o,e),t="function"==typeof n?n():n,i=null==t?void 0:t.getDataURL({pixelRatio:a.pixelRatio,backgroundColor:a.backgroundColor}),r=document.createElement("a");r.download=a.name+a.suffix,r.href=i,document.body.appendChild(r),r.click(),r.remove()}}}export{n as useDownLoad};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Layer } from
|
|
2
|
-
import LayerPlayer from
|
|
3
|
-
import LayerProvider from
|
|
4
|
-
import { Visual } from
|
|
5
|
-
import LayerManager from
|
|
1
|
+
import { Layer } from './types';
|
|
2
|
+
import LayerPlayer from './interface/LayerPlayer';
|
|
3
|
+
import LayerProvider from './interface/LayerProvider';
|
|
4
|
+
import { Visual } from './types';
|
|
5
|
+
import LayerManager from './interface/LayerManager';
|
|
6
6
|
export default class BufferLayerPlayer implements LayerPlayer {
|
|
7
7
|
protected manager: LayerManager;
|
|
8
8
|
protected provider: LayerProvider;
|
|
@@ -12,6 +12,10 @@ export default class BufferLayerPlayer implements LayerPlayer {
|
|
|
12
12
|
protected cursor: number;
|
|
13
13
|
protected center: number;
|
|
14
14
|
protected last: Layer;
|
|
15
|
+
protected _silent: boolean;
|
|
16
|
+
get silent(): boolean;
|
|
17
|
+
set silent(value: boolean);
|
|
18
|
+
setSilent(value: boolean, opacity?: number): void;
|
|
15
19
|
constructor(manager: LayerManager, provider: LayerProvider, options?: Visual.PlayerOptions);
|
|
16
20
|
backward(): Promise<void>;
|
|
17
21
|
forward(): Promise<void>;
|
|
@@ -1,289 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @dfsj/components: 通用的vue组件;包括专业组件、原子级组件
|
|
4
|
+
* 版本: v4.0.0-alpha.2
|
|
5
|
+
* 作者:yangbo <1747837358@qq.com>
|
|
6
|
+
* 日期:2026-07-10 11:00:57
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
7
10
|
|
|
8
|
-
var
|
|
9
|
-
function BufferLayerPlayer(manager, provider, options) {
|
|
10
|
-
_classCallCheck(this, BufferLayerPlayer);
|
|
11
|
-
_defineProperty(this, "manager", void 0);
|
|
12
|
-
_defineProperty(this, "provider", void 0);
|
|
13
|
-
_defineProperty(this, "options", void 0);
|
|
14
|
-
_defineProperty(this, "queue", []);
|
|
15
|
-
_defineProperty(this, "index", 0);
|
|
16
|
-
_defineProperty(this, "cursor", 0);
|
|
17
|
-
_defineProperty(this, "center", 0);
|
|
18
|
-
_defineProperty(this, "last", null);
|
|
19
|
-
this.manager = manager;
|
|
20
|
-
this.provider = provider;
|
|
21
|
-
this.options = options;
|
|
22
|
-
this.options = Object.assign({}, def, options);
|
|
23
|
-
this.manager.remove(this.queue);
|
|
24
|
-
this.queue.length = 0;
|
|
25
|
-
}
|
|
26
|
-
return _createClass(BufferLayerPlayer, [{
|
|
27
|
-
key: "backward",
|
|
28
|
-
value: function () {
|
|
29
|
-
var _backward = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
30
|
-
var index, cursor, _t;
|
|
31
|
-
return _regeneratorRuntime.wrap(function (_context) {
|
|
32
|
-
while (1) switch (_context.prev = _context.next) {
|
|
33
|
-
case 0:
|
|
34
|
-
index = this.index;
|
|
35
|
-
cursor = this.cursor;
|
|
36
|
-
if (!(index === 0 && cursor === 0)) {
|
|
37
|
-
_context.next = 1;
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
return _context.abrupt("return");
|
|
41
|
-
case 1:
|
|
42
|
-
if (!(index === 0 || cursor > this.center)) {
|
|
43
|
-
_context.next = 2;
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
this.cursor--;
|
|
47
|
-
_context.next = 5;
|
|
48
|
-
break;
|
|
49
|
-
case 2:
|
|
50
|
-
_t = this.queue;
|
|
51
|
-
_context.next = 3;
|
|
52
|
-
return this.get(--this.index);
|
|
53
|
-
case 3:
|
|
54
|
-
_t.splice.call(_t, 0, 0, _context.sent);
|
|
55
|
-
_context.next = 4;
|
|
56
|
-
return this.manager.addition(this.queue[0]);
|
|
57
|
-
case 4:
|
|
58
|
-
if (this.queue.length > this.options.buffer) {
|
|
59
|
-
this.manager.remove(this.queue.pop());
|
|
60
|
-
}
|
|
61
|
-
case 5:
|
|
62
|
-
this.render();
|
|
63
|
-
case 6:
|
|
64
|
-
case "end":
|
|
65
|
-
return _context.stop();
|
|
66
|
-
}
|
|
67
|
-
}, _callee, this);
|
|
68
|
-
}));
|
|
69
|
-
function backward() {
|
|
70
|
-
return _backward.apply(this, arguments);
|
|
71
|
-
}
|
|
72
|
-
return backward;
|
|
73
|
-
}()
|
|
74
|
-
}, {
|
|
75
|
-
key: "forward",
|
|
76
|
-
value: function () {
|
|
77
|
-
var _forward = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
78
|
-
var size, index, count, _t2;
|
|
79
|
-
return _regeneratorRuntime.wrap(function (_context2) {
|
|
80
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
81
|
-
case 0:
|
|
82
|
-
size = this.queue.length;
|
|
83
|
-
index = this.index;
|
|
84
|
-
count = this.provider.count;
|
|
85
|
-
if (!(index + size >= count && this.cursor >= size)) {
|
|
86
|
-
_context2.next = 1;
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
return _context2.abrupt("return");
|
|
90
|
-
case 1:
|
|
91
|
-
if (!(this.cursor < this.center || index + size >= count)) {
|
|
92
|
-
_context2.next = 2;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
this.cursor++;
|
|
96
|
-
_context2.next = 5;
|
|
97
|
-
break;
|
|
98
|
-
case 2:
|
|
99
|
-
_t2 = this.queue;
|
|
100
|
-
_context2.next = 3;
|
|
101
|
-
return this.get(size + this.index++);
|
|
102
|
-
case 3:
|
|
103
|
-
_t2.push.call(_t2, _context2.sent);
|
|
104
|
-
_context2.next = 4;
|
|
105
|
-
return this.manager.addition(this.queue[this.queue.length - 1]);
|
|
106
|
-
case 4:
|
|
107
|
-
this.manager.remove(this.queue.shift());
|
|
108
|
-
case 5:
|
|
109
|
-
this.render();
|
|
110
|
-
case 6:
|
|
111
|
-
case "end":
|
|
112
|
-
return _context2.stop();
|
|
113
|
-
}
|
|
114
|
-
}, _callee2, this);
|
|
115
|
-
}));
|
|
116
|
-
function forward() {
|
|
117
|
-
return _forward.apply(this, arguments);
|
|
118
|
-
}
|
|
119
|
-
return forward;
|
|
120
|
-
}()
|
|
121
|
-
}, {
|
|
122
|
-
key: "jump",
|
|
123
|
-
value: function jump(index) {
|
|
124
|
-
var size = this.queue.length;
|
|
125
|
-
if (size === 0) {
|
|
126
|
-
this.ready(index);
|
|
127
|
-
} else if (index - this.index === -1) {
|
|
128
|
-
this.backward();
|
|
129
|
-
} else if (index - (this.index + this.cursor) === 1) {
|
|
130
|
-
this.forward();
|
|
131
|
-
} else if (index - this.index === size) {
|
|
132
|
-
this.forward();
|
|
133
|
-
} else if (index >= this.index && index < this.index + size) {
|
|
134
|
-
this.cursor = index - this.index;
|
|
135
|
-
this.render();
|
|
136
|
-
} else {
|
|
137
|
-
this.clear();
|
|
138
|
-
this.ready(index);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}, {
|
|
142
|
-
key: "visible",
|
|
143
|
-
value: function () {
|
|
144
|
-
var _visible = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(value) {
|
|
145
|
-
return _regeneratorRuntime.wrap(function (_context3) {
|
|
146
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
147
|
-
case 0:
|
|
148
|
-
if (value === false) {
|
|
149
|
-
this.manager.remove(this.queue);
|
|
150
|
-
}
|
|
151
|
-
if (!(value === true)) {
|
|
152
|
-
_context3.next = 1;
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
_context3.next = 1;
|
|
156
|
-
return this.manager.addition(this.queue);
|
|
157
|
-
case 1:
|
|
158
|
-
case "end":
|
|
159
|
-
return _context3.stop();
|
|
160
|
-
}
|
|
161
|
-
}, _callee3, this);
|
|
162
|
-
}));
|
|
163
|
-
function visible(_x) {
|
|
164
|
-
return _visible.apply(this, arguments);
|
|
165
|
-
}
|
|
166
|
-
return visible;
|
|
167
|
-
}()
|
|
168
|
-
}, {
|
|
169
|
-
key: "status",
|
|
170
|
-
value: function status(index) {
|
|
171
|
-
return this.manager.query(this.queue[index + this.cursor], "status");
|
|
172
|
-
}
|
|
173
|
-
}, {
|
|
174
|
-
key: "update",
|
|
175
|
-
value: function update(index) {
|
|
176
|
-
this.manager.remove(this.queue);
|
|
177
|
-
this.queue.length = 0;
|
|
178
|
-
this.ready(index || this.index);
|
|
179
|
-
}
|
|
180
|
-
}, {
|
|
181
|
-
key: "clear",
|
|
182
|
-
value: function clear() {
|
|
183
|
-
this.manager.remove(this.queue);
|
|
184
|
-
this.queue.length = 0;
|
|
185
|
-
}
|
|
186
|
-
}, {
|
|
187
|
-
key: "dispose",
|
|
188
|
-
value: function dispose() {
|
|
189
|
-
this.clear();
|
|
190
|
-
this.queue = null;
|
|
191
|
-
this.options = null;
|
|
192
|
-
this.manager = null;
|
|
193
|
-
this.provider = null;
|
|
194
|
-
}
|
|
195
|
-
}, {
|
|
196
|
-
key: "get",
|
|
197
|
-
value: function () {
|
|
198
|
-
var _get = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(index) {
|
|
199
|
-
var _this$provider, _this$manager, _this$manager2, _this$manager3;
|
|
200
|
-
var layer, opacity;
|
|
201
|
-
return _regeneratorRuntime.wrap(function (_context4) {
|
|
202
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
203
|
-
case 0:
|
|
204
|
-
_context4.next = 1;
|
|
205
|
-
return (_this$provider = this.provider) === null || _this$provider === void 0 ? void 0 : _this$provider.get(index);
|
|
206
|
-
case 1:
|
|
207
|
-
layer = _context4.sent;
|
|
208
|
-
opacity = (_this$manager = this.manager) === null || _this$manager === void 0 ? void 0 : _this$manager.query(layer, "opacity");
|
|
209
|
-
(_this$manager2 = this.manager) === null || _this$manager2 === void 0 || _this$manager2.modify(layer, "$opacity", opacity);
|
|
210
|
-
(_this$manager3 = this.manager) === null || _this$manager3 === void 0 || _this$manager3.modify(layer, "opacity", 0);
|
|
211
|
-
return _context4.abrupt("return", layer);
|
|
212
|
-
case 2:
|
|
213
|
-
case "end":
|
|
214
|
-
return _context4.stop();
|
|
215
|
-
}
|
|
216
|
-
}, _callee4, this);
|
|
217
|
-
}));
|
|
218
|
-
function get(_x2) {
|
|
219
|
-
return _get.apply(this, arguments);
|
|
220
|
-
}
|
|
221
|
-
return get;
|
|
222
|
-
}()
|
|
223
|
-
}, {
|
|
224
|
-
key: "ready",
|
|
225
|
-
value: function () {
|
|
226
|
-
var _ready = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(index) {
|
|
227
|
-
var _this$queue2, _this$manager4;
|
|
228
|
-
var max, i, _this$queue, _t3, _t4;
|
|
229
|
-
return _regeneratorRuntime.wrap(function (_context5) {
|
|
230
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
231
|
-
case 0:
|
|
232
|
-
max = Math.min(this.provider.count, index + this.options.buffer);
|
|
233
|
-
i = index;
|
|
234
|
-
case 1:
|
|
235
|
-
if (!(i < max)) {
|
|
236
|
-
_context5.next = 4;
|
|
237
|
-
break;
|
|
238
|
-
}
|
|
239
|
-
_t3 = (_this$queue = this.queue) === null || _this$queue === void 0;
|
|
240
|
-
if (_t3) {
|
|
241
|
-
_context5.next = 3;
|
|
242
|
-
break;
|
|
243
|
-
}
|
|
244
|
-
_t4 = _this$queue;
|
|
245
|
-
_context5.next = 2;
|
|
246
|
-
return this.get(i);
|
|
247
|
-
case 2:
|
|
248
|
-
_t4.push.call(_t4, _context5.sent);
|
|
249
|
-
case 3:
|
|
250
|
-
i++;
|
|
251
|
-
_context5.next = 1;
|
|
252
|
-
break;
|
|
253
|
-
case 4:
|
|
254
|
-
this.index = index;
|
|
255
|
-
this.cursor = 0;
|
|
256
|
-
this.center = ((_this$queue2 = this.queue) === null || _this$queue2 === void 0 ? void 0 : _this$queue2.length) >> 1;
|
|
257
|
-
_context5.next = 5;
|
|
258
|
-
return (_this$manager4 = this.manager) === null || _this$manager4 === void 0 ? void 0 : _this$manager4.addition(this.queue);
|
|
259
|
-
case 5:
|
|
260
|
-
this.render();
|
|
261
|
-
case 6:
|
|
262
|
-
case "end":
|
|
263
|
-
return _context5.stop();
|
|
264
|
-
}
|
|
265
|
-
}, _callee5, this);
|
|
266
|
-
}));
|
|
267
|
-
function ready(_x3) {
|
|
268
|
-
return _ready.apply(this, arguments);
|
|
269
|
-
}
|
|
270
|
-
return ready;
|
|
271
|
-
}()
|
|
272
|
-
}, {
|
|
273
|
-
key: "render",
|
|
274
|
-
value: function render() {
|
|
275
|
-
var queue = this.queue;
|
|
276
|
-
var cursor = this.cursor;
|
|
277
|
-
if (this.last && this.last !== queue[cursor]) {
|
|
278
|
-
this.manager.modify(this.last, "opacity", 0);
|
|
279
|
-
}
|
|
280
|
-
if (!queue || (queue === null || queue === void 0 ? void 0 : queue.length) <= 0) return;
|
|
281
|
-
if ((this.last = queue[cursor]) != null) {
|
|
282
|
-
var opacity = this.manager.query(queue[cursor], "$opacity");
|
|
283
|
-
this.manager.modify(queue[cursor], "opacity", opacity);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
}]);
|
|
287
|
-
}();
|
|
288
|
-
|
|
289
|
-
export { BufferLayerPlayer as default };
|
|
11
|
+
import{createClass as e,classCallCheck as t,defineProperty as i,asyncToGenerator as s,regenerator as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import r from"./config/default.manager.js";var a=function(){return e(function e(s,n,a){t(this,e),i(this,"manager",void 0),i(this,"provider",void 0),i(this,"options",void 0),i(this,"queue",[]),i(this,"index",0),i(this,"cursor",0),i(this,"center",0),i(this,"last",null),i(this,"_silent",!1),this.manager=s,this.provider=n,this.options=a,this.options=Object.assign({},r,a),this.manager.remove(this.queue),this.queue.length=0},[{key:"silent",get:function(){return this._silent},set:function(e){this._silent=e}},{key:"setSilent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;this._silent=e,this.last&&this.manager.modify(this.last,"opacity",e?0:t||1)}},{key:"backward",value:(c=s(n().m(function e(){var t,i,s;return n().w(function(e){for(;;)switch(e.n){case 0:if(t=this.index,i=this.cursor,0!==t||0!==i){e.n=1;break}return e.a(2);case 1:if(!(0===t||i>this.center)){e.n=2;break}this.cursor--,e.n=5;break;case 2:return s=this.queue,e.n=3,this.get(--this.index);case 3:return s.splice.call(s,0,0,e.v),e.n=4,this.manager.addition(this.queue[0]);case 4:this.queue.length>this.options.buffer&&this.manager.remove(this.queue.pop());case 5:this.render();case 6:return e.a(2)}},e,this)})),function(){return c.apply(this,arguments)})},{key:"forward",value:(o=s(n().m(function e(){var t,i,s,r;return n().w(function(e){for(;;)switch(e.n){case 0:if(t=this.queue.length,i=this.index,s=this.provider.count,!(i+t>=s&&this.cursor>=t)){e.n=1;break}return e.a(2);case 1:if(!(this.cursor<this.center||i+t>=s)){e.n=2;break}this.cursor++,e.n=5;break;case 2:return r=this.queue,e.n=3,this.get(t+this.index++);case 3:return r.push.call(r,e.v),e.n=4,this.manager.addition(this.queue[this.queue.length-1]);case 4:this.manager.remove(this.queue.shift());case 5:this.render();case 6:return e.a(2)}},e,this)})),function(){return o.apply(this,arguments)})},{key:"jump",value:function(e){var t=this.queue.length;0===t?this.ready(e):e-this.index===-1?this.backward():e-(this.index+this.cursor)===1||e-this.index===t?this.forward():e>=this.index&&e<this.index+t?(this.cursor=e-this.index,this.render()):(this.clear(),this.ready(e))}},{key:"visible",value:(h=s(n().m(function e(t){return n().w(function(e){for(;;)switch(e.n){case 0:if(!1===t&&this.manager.remove(this.queue),!0!==t){e.n=1;break}return e.n=1,this.manager.addition(this.queue);case 1:return e.a(2)}},e,this)})),function(e){return h.apply(this,arguments)})},{key:"status",value:function(e){return this.manager.query(this.queue[e+this.cursor],"status")}},{key:"update",value:function(e){this.manager.remove(this.queue),this.queue.length=0,this.ready(e||this.index)}},{key:"clear",value:function(){this.manager.remove(this.queue),this.queue.length=0}},{key:"dispose",value:function(){this.clear(),this.queue=null,this.options=null,this.manager=null,this.provider=null}},{key:"get",value:(u=s(n().m(function e(t){var i,s,r,a,u,h;return n().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,null===(i=this.provider)||void 0===i?void 0:i.get(t);case 1:return u=e.v,h=null===(s=this.manager)||void 0===s?void 0:s.query(u,"opacity"),null===(r=this.manager)||void 0===r||r.modify(u,"$opacity",h),null===(a=this.manager)||void 0===a||a.modify(u,"opacity",0),e.a(2,u)}},e,this)})),function(e){return u.apply(this,arguments)})},{key:"ready",value:(a=s(n().m(function e(t){var i,s,r,a,u,h;return n().w(function(e){for(;;)switch(e.n){case 0:r=Math.min(this.provider.count,t+this.options.buffer),a=t;case 1:if(!(a<r)){e.n=4;break}if(null===(u=this.queue)||void 0===u){e.n=3;break}return h=u,e.n=2,this.get(a);case 2:h.push.call(h,e.v);case 3:a++,e.n=1;break;case 4:return this.index=t,this.cursor=0,this.center=(null===(i=this.queue)||void 0===i?void 0:i.length)>>1,e.n=5,null===(s=this.manager)||void 0===s?void 0:s.addition(this.queue);case 5:this.render();case 6:return e.a(2)}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this.queue,t=this.cursor;if(this.last&&this.last!==e[t]&&this.manager.modify(this.last,"opacity",0),e&&!((null==e?void 0:e.length)<=0)&&null!=(this.last=e[t]))if(this.silent)this.manager.modify(e[t],"opacity",0);else{var i=this.manager.query(e[t],"$opacity");this.manager.modify(e[t],"opacity",i)}}}]);var a,u,h,o,c}();export{a as default};
|