@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.
Files changed (207) hide show
  1. package/CHANGELOG.md +57 -449
  2. package/README.md +101 -24
  3. package/dist/_virtual/_rollupPluginBabelHelpers.js +13 -0
  4. package/dist/components/Boards/src/Boards.vue.js +10 -4
  5. package/dist/components/Boards/src/Boards.vue2.js +10 -147
  6. package/dist/components/Boards/src/hooKs/useStyle.d.ts +16 -4
  7. package/dist/components/Boards/src/hooKs/useStyle.js +10 -99
  8. package/dist/components/Boards/src/props.d.ts +6 -22
  9. package/dist/components/Boards/src/props.js +10 -55
  10. package/dist/components/ClickOutSide/src/ClickOutSide.vue.js +10 -4
  11. package/dist/components/ClickOutSide/src/ClickOutSide.vue2.js +10 -25
  12. package/dist/components/Descriptions/src/Descriptions.vue.js +10 -4
  13. package/dist/components/Descriptions/src/Descriptions.vue2.js +10 -150
  14. package/dist/components/Editor/src/Editor.vue.js +10 -4
  15. package/dist/components/Editor/src/Editor.vue2.js +10 -137
  16. package/dist/components/Form/src/Form.vue.js +10 -4
  17. package/dist/components/Form/src/Form.vue2.js +10 -388
  18. package/dist/components/Form/src/components/useRenderCheckbox.js +10 -32
  19. package/dist/components/Form/src/components/useRenderRadio.js +10 -32
  20. package/dist/components/Form/src/components/useRenderSelect.js +10 -51
  21. package/dist/components/Form/src/helper/componentMap.js +10 -34
  22. package/dist/components/Form/src/helper/index.js +10 -108
  23. package/dist/components/Form/src/types/index.d.ts +80 -84
  24. package/dist/components/Form/src/types/index.js +10 -30
  25. package/dist/components/Form/src/useForm.js +10 -289
  26. package/dist/components/Highlight/src/Highlight.vue.js +10 -4
  27. package/dist/components/Highlight/src/Highlight.vue2.js +10 -61
  28. package/dist/components/Icon/src/Icon.vue.js +10 -4
  29. package/dist/components/Icon/src/Icon.vue2.js +10 -122
  30. package/dist/components/Icon/src/SvgIcon.vue.js +10 -6
  31. package/dist/components/Icon/src/SvgIcon.vue2.js +10 -44
  32. package/dist/components/Icon/src/SvgIcon.vue3.js +10 -13
  33. package/dist/components/InputPassword/src/InputPassword.vue.js +10 -4
  34. package/dist/components/InputPassword/src/InputPassword.vue2.js +10 -57
  35. package/dist/components/Modal/src/BasicModal.vue.js +10 -4
  36. package/dist/components/Modal/src/BasicModal.vue2.js +10 -154
  37. package/dist/components/Modal/src/components/ModalFooter.vue.js +10 -4
  38. package/dist/components/Modal/src/components/ModalFooter.vue2.js +10 -39
  39. package/dist/components/Modal/src/components/ModalHeader.vue.js +10 -4
  40. package/dist/components/Modal/src/components/ModalHeader.vue2.js +10 -80
  41. package/dist/components/Modal/src/config.d.ts +3 -2
  42. package/dist/components/Modal/src/config.js +10 -28
  43. package/dist/components/Modal/src/hooks/useModalDrag.js +10 -109
  44. package/dist/components/Modal/src/hooks/useTimeout.js +10 -52
  45. package/dist/components/Modal/src/props.d.ts +16 -56
  46. package/dist/components/Modal/src/props.js +10 -130
  47. package/dist/components/Modal/src/utils/index.js +10 -85
  48. package/dist/components/NodeAxis/src/AbstractNodeProvider.js +10 -21
  49. package/dist/components/NodeAxis/src/CanvasNodeRender.d.ts +3 -12
  50. package/dist/components/NodeAxis/src/CanvasNodeRender.js +10 -411
  51. package/dist/components/NodeAxis/src/NodeAxis.vue.js +10 -4
  52. package/dist/components/NodeAxis/src/NodeAxis.vue2.js +10 -68
  53. package/dist/components/NodeAxis/src/NodeModel.js +10 -62
  54. package/dist/components/NodeAxis/src/NodeRender.js +10 -28
  55. package/dist/components/NodeAxis/src/NullLayerProvider.js +10 -86
  56. package/dist/components/NodeAxis/src/NullProvider.js +10 -65
  57. package/dist/components/NodeAxis/src/TimerNodePlayer.js +10 -148
  58. package/dist/components/NodeAxis/src/config/node-axis.options.js +10 -55
  59. package/dist/components/NodeAxis/src/enum/index.js +10 -19
  60. package/dist/components/NodeAxis/src/utils/assign.js +10 -42
  61. package/dist/components/Stateful/src/State.js +10 -78
  62. package/dist/components/Stateful/src/Stateful.vue.js +10 -4
  63. package/dist/components/Stateful/src/Stateful.vue2.js +10 -52
  64. package/dist/components/Stateful/src/props.d.ts +2 -6
  65. package/dist/components/Stateful/src/props.js +10 -28
  66. package/dist/components/Table/index.d.ts +3 -3
  67. package/dist/components/Table/src/Table.vue.js +10 -4
  68. package/dist/components/Table/src/Table.vue2.js +10 -583
  69. package/dist/components/Table/src/components/ColumnSetting.vue.js +10 -4
  70. package/dist/components/Table/src/components/ColumnSetting.vue2.js +10 -263
  71. package/dist/components/Table/src/components/TableActions.vue.js +10 -4
  72. package/dist/components/Table/src/components/TableActions.vue2.js +10 -107
  73. package/dist/components/Table/src/helper/index.js +10 -10
  74. package/dist/components/Table/src/types/index.d.ts +11 -13
  75. package/dist/components/Table/src/useTable.d.ts +36 -1
  76. package/dist/components/Table/src/useTable.js +10 -283
  77. package/dist/components/UnifyChart/src/ChartToolbox.vue.js +10 -4
  78. package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +10 -82
  79. package/dist/components/UnifyChart/src/UnifyChart.vue.js +10 -4
  80. package/dist/components/UnifyChart/src/UnifyChart.vue2.js +10 -57
  81. package/dist/components/UnifyChart/src/hooks/useLoader.js +10 -92
  82. package/dist/components/UnifyChart/src/hooks/useRender.d.ts +8 -13
  83. package/dist/components/UnifyChart/src/hooks/useRender.js +10 -49
  84. package/dist/components/UnifyChart/src/props.d.ts +13 -59
  85. package/dist/components/UnifyChart/src/props.js +10 -32
  86. package/dist/components/UnifyChart/src/useDownLoad.js +10 -26
  87. package/dist/components/Visual/src/BufferLayerPlayer.d.ts +9 -5
  88. package/dist/components/Visual/src/BufferLayerPlayer.js +10 -288
  89. package/dist/components/Visual/src/ResolvableLayerProvider.js +10 -252
  90. package/dist/components/Visual/src/config/default.manager.js +10 -6
  91. package/dist/components/Visual/src/config/default.provider.js +10 -17
  92. package/dist/components/Visual/src/mapping.js +10 -6
  93. package/dist/components/Visual/src/resolvers/IntervalResolver.js +10 -168
  94. package/dist/components/Visual/src/resolvers/tools.resolver.js +10 -151
  95. package/dist/components/Visual/src/utils/NodeMath.js +10 -99
  96. package/dist/components/Windows/src/ModalWrap.vue.js +10 -4
  97. package/dist/components/Windows/src/ModalWrap.vue2.js +10 -132
  98. package/dist/components/Windows/src/Windows.vue.js +10 -6
  99. package/dist/components/Windows/src/Windows.vue2.js +10 -55
  100. package/dist/components/Windows/src/Windows.vue3.js +10 -24
  101. package/dist/components/Windows/src/props.js +10 -8
  102. package/dist/directives/clickOutside.js +10 -70
  103. package/dist/directives/repeatClick.js +10 -28
  104. package/dist/directives/resizable.js +10 -195
  105. package/dist/index.d.ts +0 -2
  106. package/dist/index.js +11 -53
  107. package/dist/index.min.css +3 -3
  108. package/dist/themes/index.js +9 -0
  109. package/dist/types/index.d.ts +3 -3
  110. package/dist/utils/index.js +10 -23
  111. package/package.json +93 -66
  112. package/dist/components/Boards/src/Boards.vue.d.ts +0 -102
  113. package/dist/components/ClickOutSide/src/ClickOutSide.vue.d.ts +0 -7
  114. package/dist/components/DatePicker/index.d.ts +0 -2
  115. package/dist/components/DatePicker/src/composables/use-month-range-header.d.ts +0 -16
  116. package/dist/components/DatePicker/src/composables/use-month-range-header.js +0 -52
  117. package/dist/components/DatePicker/src/composables/use-range-picker.d.ts +0 -173
  118. package/dist/components/DatePicker/src/composables/use-range-picker.js +0 -99
  119. package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +0 -19
  120. package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.js +0 -5
  121. package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue2.js +0 -564
  122. package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +0 -16
  123. package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.js +0 -5
  124. package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue2.js +0 -210
  125. package/dist/components/DatePicker/src/index.d.ts +0 -224
  126. package/dist/components/DatePicker/src/index.js +0 -87
  127. package/dist/components/DatePicker/src/panel-utils.d.ts +0 -2
  128. package/dist/components/DatePicker/src/panel-utils.js +0 -25
  129. package/dist/components/Descriptions/src/Descriptions.vue.d.ts +0 -97
  130. package/dist/components/Editor/src/Editor.vue.d.ts +0 -51
  131. package/dist/components/Form/src/Form.vue.d.ts +0 -838
  132. package/dist/components/Highlight/src/Highlight.vue.d.ts +0 -41
  133. package/dist/components/Icon/src/Icon.vue.d.ts +0 -49
  134. package/dist/components/Icon/src/SvgIcon.vue.d.ts +0 -45
  135. package/dist/components/InputPassword/src/InputPassword.vue.d.ts +0 -27
  136. package/dist/components/Modal/src/BasicModal.vue.d.ts +0 -419
  137. package/dist/components/Modal/src/components/ModalFooter.vue.d.ts +0 -86
  138. package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +0 -241
  139. package/dist/components/NodeAxis/src/BCanvasNodeRender.d.ts +0 -19
  140. package/dist/components/NodeAxis/src/NodeAxis.vue.d.ts +0 -17
  141. package/dist/components/Stateful/src/Stateful.vue.d.ts +0 -22
  142. package/dist/components/Table/src/Table.vue.d.ts +0 -1535
  143. package/dist/components/Table/src/components/ColumnSetting.vue.d.ts +0 -30
  144. package/dist/components/Table/src/components/TableActions.vue.d.ts +0 -229
  145. package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +0 -46
  146. package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +0 -95
  147. package/dist/components/Video/index.d.ts +0 -2
  148. package/dist/components/Video/src/VideoPlayer.vue.d.ts +0 -60
  149. package/dist/components/Video/src/VideoPlayer.vue.js +0 -5
  150. package/dist/components/Video/src/VideoPlayer.vue2.js +0 -107
  151. package/dist/components/Video/src/VideoPlayerToolbar.vue.d.ts +0 -34
  152. package/dist/components/Video/src/VideoPlayerToolbar.vue.js +0 -5
  153. package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +0 -65
  154. package/dist/components/Video/src/abstract/AbstractVideoControl.d.ts +0 -7
  155. package/dist/components/Video/src/abstract/Observable.d.ts +0 -6
  156. package/dist/components/Video/src/abstract/Observable.js +0 -89
  157. package/dist/components/Video/src/abstract/VideoControl.d.ts +0 -32
  158. package/dist/components/Video/src/abstract/VideoControl.js +0 -48
  159. package/dist/components/Video/src/control/DaHua.d.ts +0 -12
  160. package/dist/components/Video/src/control/DaHua.js +0 -154
  161. package/dist/components/Video/src/control/Hikvision.d.ts +0 -28
  162. package/dist/components/Video/src/control/Hikvision.js +0 -249
  163. package/dist/components/Video/src/control/VideoFactory.d.ts +0 -3
  164. package/dist/components/Video/src/control/VideoFactory.js +0 -31
  165. package/dist/components/Video/src/enums/CommonEnum.d.ts +0 -26
  166. package/dist/components/Video/src/enums/CommonEnum.js +0 -31
  167. package/dist/components/Windows/src/ModalWrap.vue.d.ts +0 -14
  168. package/dist/components/Windows/src/Windows.vue.d.ts +0 -21
  169. package/dist/components/src/components/Boards/src/hooKs/useStyle.d.ts +0 -9
  170. package/dist/components/src/components/DatePicker/src/composables/use-month-range-header.d.ts +0 -16
  171. package/dist/components/src/components/DatePicker/src/composables/use-range-picker.d.ts +0 -173
  172. package/dist/components/src/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +0 -19
  173. package/dist/components/src/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +0 -16
  174. package/dist/components/src/components/Descriptions/src/Descriptions.vue.d.ts +0 -97
  175. package/dist/components/src/components/Form/src/components/useRenderCheckbox.d.ts +0 -4
  176. package/dist/components/src/components/Form/src/components/useRenderRadio.d.ts +0 -4
  177. package/dist/components/src/components/Form/src/components/useRenderSelect.d.ts +0 -4
  178. package/dist/components/src/components/Form/src/helper/componentMap.d.ts +0 -5
  179. package/dist/components/src/components/Form/src/helper/index.d.ts +0 -7
  180. package/dist/components/src/components/InputPassword/src/InputPassword.vue.d.ts +0 -27
  181. package/dist/components/src/components/Modal/src/hooks/useTimeout.d.ts +0 -15
  182. package/dist/components/src/components/Modal/src/utils/index.d.ts +0 -3
  183. package/dist/components/src/components/NodeAxis/src/BCanvasNodeRender.d.ts +0 -19
  184. package/dist/components/src/components/NodeAxis/src/NodeAxis.d.ts +0 -12
  185. package/dist/components/src/components/NodeAxis/src/NodeAxis.vue.d.ts +0 -17
  186. package/dist/components/src/components/NodeAxis/src/TimerNodePlayer.d.ts +0 -19
  187. package/dist/components/src/components/NodeAxis/src/interface/NodePlayer.d.ts +0 -9
  188. package/dist/components/src/components/Table/src/components/ColumnSetting.vue.d.ts +0 -30
  189. package/dist/components/src/components/Table/src/components/TableActions.vue.d.ts +0 -96
  190. package/dist/components/src/components/Table/src/helper/index.d.ts +0 -2
  191. package/dist/components/src/components/Video/src/VideoPlayerToolbar.vue.d.ts +0 -34
  192. package/dist/components/src/components/Video/src/abstract/AbstractVideoControl.d.ts +0 -7
  193. package/dist/components/src/components/Video/src/abstract/Observable.d.ts +0 -6
  194. package/dist/components/src/components/Video/src/abstract/VideoControl.d.ts +0 -32
  195. package/dist/components/src/components/Video/src/control/DaHua.d.ts +0 -12
  196. package/dist/components/src/components/Video/src/control/Hikvision.d.ts +0 -28
  197. package/dist/components/src/components/Video/src/control/VideoFactory.d.ts +0 -3
  198. package/dist/components/src/components/Video/src/enums/CommonEnum.d.ts +0 -26
  199. package/dist/components/src/helper/lang.d.ts +0 -1
  200. package/dist/components/src/themes/index.d.ts +0 -1
  201. package/dist/components/src/utils/index.d.ts +0 -11
  202. package/dist/helper/lang.d.ts +0 -1
  203. package/dist/helper/lang.js +0 -546
  204. 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
  205. 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
  206. 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
  207. 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,253 +1,11 @@
1
- import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
- import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
- import _createClass from '@babel/runtime/helpers/createClass';
4
- import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
5
- import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
6
- import _inherits from '@babel/runtime/helpers/inherits';
7
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
8
- import clamp from 'lodash-es/clamp';
9
- import NodeMath from './utils/NodeMath.js';
10
- import { Extensible } from '../../NodeAxis/src/enum/index.js';
11
- import AbstractNodeProvider from '../../NodeAxis/src/AbstractNodeProvider.js';
12
- import mapping from './mapping.js';
13
- import def from './config/default.provider.js';
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
+ */
14
10
 
15
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
16
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
17
- var EMPTY_ARRAY = [];
18
- var ResolvableLayerProvider = /*#__PURE__*/function (_AbstractNodeProvider) {
19
- function ResolvableLayerProvider(factory, data, injection, interceptor, config) {
20
- var _this;
21
- _classCallCheck(this, ResolvableLayerProvider);
22
- _this = _callSuper(this, ResolvableLayerProvider);
23
- _defineProperty(_this, "factory", void 0);
24
- _defineProperty(_this, "interceptor", void 0);
25
- _defineProperty(_this, "config", void 0);
26
- _defineProperty(_this, "cache", [-1, null]);
27
- _defineProperty(_this, "total", 0);
28
- _defineProperty(_this, "marks", []);
29
- _defineProperty(_this, "init", void 0);
30
- _defineProperty(_this, "back", void 0);
31
- _defineProperty(_this, "options", null);
32
- _defineProperty(_this, "extended", 0);
33
- _defineProperty(_this, "nodes", []);
34
- _this.factory = factory;
35
- _this.interceptor = interceptor;
36
- _this.config = Object.assign({}, def, config);
37
- _this.read(data, injection);
38
- return _this;
39
- }
40
- _inherits(ResolvableLayerProvider, _AbstractNodeProvider);
41
- return _createClass(ResolvableLayerProvider, [{
42
- key: "read",
43
- value: function read(options, injection) {
44
- this.options = options;
45
- var resolvers = options.nodes.map(function (e) {
46
- return new mapping[e.type](e, injection);
47
- });
48
- var count = resolvers.reduce(function (p, v) {
49
- return p + v.count;
50
- }, 0);
51
- var range = options.range;
52
- var index = clamp(options.index, 0, count - 1) || 0;
53
- if (range == null) {
54
- var nodeCount = options.availableNodeCount || this.config.availableNodeCount;
55
- var padding = Array.isArray(nodeCount) ? nodeCount : null;
56
- if (padding == null) {
57
- var half = Math.floor(nodeCount / 2);
58
- padding = [nodeCount % 2 === 0 ? half - 1 : half, half];
59
- }
60
- if (index - padding[0] < 0) {
61
- padding[1] = padding[1] + (padding[0] - index);
62
- padding[0] = index;
63
- } else if (index + padding[1] >= count) {
64
- padding[0] = padding[0] + (index + padding[1] - count) + 1;
65
- padding[1] = count - index;
66
- }
67
- range = [Math.max(0, index - padding[0]), Math.min(count, index + padding[1] + 1)];
68
- }
69
- var extensible = options.extensible;
70
- if (typeof extensible === "string") {
71
- this.extended = (extensible.includes("L") ? Extensible.HEAD : 0) | (extensible.includes("R") ? Extensible.TAIL : 0);
72
- } else if (typeof extensible === "number") {
73
- this.extended = extensible;
74
- } else {
75
- this.extended = Extensible.NONE;
76
- }
77
- this.total = count;
78
- this.nodes = resolvers;
79
- this.init = Object.seal([range[0], range[1], index]);
80
- this.back = this.init.slice();
81
- this.makeSections();
82
- }
83
- }, {
84
- key: "findNode",
85
- value: function findNode(index) {
86
- var accept = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.cache;
87
- for (var i = 0, start = 0, ii = this.nodes.length; i < ii; i++) {
88
- var node = this.nodes[i];
89
- if (index >= start && index < start + node.count) {
90
- accept[0] = start;
91
- accept[1] = node;
92
- return accept;
93
- }
94
- start += node.count;
95
- }
96
- return EMPTY_ARRAY;
97
- }
98
- }, {
99
- key: "makeSections",
100
- value: function makeSections() {
101
- this.marks.length = 0;
102
- for (var i = 0, start = 0, ii = this.nodes.length; i < ii; i++) {
103
- var node = this.nodes[i];
104
- start += node.count;
105
- if (node.period) {
106
- this.marks.push({
107
- range: [start - node.count, start],
108
- color: this.config.sectionColor[node.period]
109
- });
110
- }
111
- }
112
- }
113
- }, {
114
- key: "get",
115
- value: function get(index) {
116
- var _this$findNode = this.findNode(index),
117
- _this$findNode2 = _slicedToArray(_this$findNode, 2),
118
- start = _this$findNode2[0],
119
- node = _this$findNode2[1];
120
- if (node != null) {
121
- var config = node.get(index - start);
122
- if (this.interceptor) {
123
- config = this.interceptor(config);
124
- }
125
- return config;
126
- }
127
- return null;
128
- }
129
- }, {
130
- key: "getNodeInfo",
131
- value: function getNodeInfo(index) {
132
- var _this$findNode3 = this.findNode(index),
133
- _this$findNode4 = _slicedToArray(_this$findNode3, 2),
134
- start = _this$findNode4[0],
135
- node = _this$findNode4[1];
136
- if (node != null) {
137
- return node.getNodeInfo(index - start);
138
- }
139
- }
140
- }, {
141
- key: "extent",
142
- get: function get() {
143
- return this.init;
144
- }
145
- }, {
146
- key: "count",
147
- get: function get() {
148
- return this.total;
149
- }
150
- }, {
151
- key: "sections",
152
- get: function get() {
153
- return this.marks;
154
- }
155
- }, {
156
- key: "extensible",
157
- get: function get() {
158
- return this.extended;
159
- }
160
- }, {
161
- key: "color",
162
- value: function color(index) {
163
- return null;
164
- }
165
- }, {
166
- key: "format",
167
- value: function format(index, type) {
168
- var _this$findNode5 = this.findNode(index),
169
- _this$findNode6 = _slicedToArray(_this$findNode5, 2),
170
- start = _this$findNode6[0],
171
- node = _this$findNode6[1];
172
- if (node != null) {
173
- return node.format(index - start, type);
174
- }
175
- }
176
- }, {
177
- key: "formatByInject",
178
- value: function formatByInject(index, type, finalFormat) {
179
- var _this$findNode7 = this.findNode(index),
180
- _this$findNode8 = _slicedToArray(_this$findNode7, 2),
181
- start = _this$findNode8[0],
182
- node = _this$findNode8[1];
183
- if (node != null) {
184
- return node.formatByInject(index - start, type, finalFormat);
185
- }
186
- }
187
- }, {
188
- key: "find",
189
- value: function find(query) {
190
- var index = null,
191
- head = this.nodes[0];
192
- if ((index = head.find(query)) != null) {
193
- return index;
194
- }
195
- var size = this.nodes.length;
196
- var tail = this.nodes[size - 1];
197
- if ((index = tail.find(query)) != null) {
198
- return this.total + index;
199
- }
200
- for (var i = 1, s = head.count, ii = size - 1; i < ii; i++) {
201
- var node = this.nodes[i];
202
- if ((index = node.find(query)) != null) {
203
- if (index > node.count) {
204
- break;
205
- }
206
- return s + index;
207
- }
208
- s += node.count;
209
- }
210
- return null;
211
- }
212
- }, {
213
- key: "extends",
214
- value: function _extends(direction, minimum) {
215
- var oldCount = this.total,
216
- extended = 0;
217
- var amount = Math.max(minimum, this.extent[1] - this.extent[0]);
218
- if (amount !== 0) {
219
- var node = this.nodes[direction < 0 ? 0 : this.nodes.length - 1];
220
- var side = direction < 0 ? Extensible.HEAD : Extensible.TAIL;
221
- var extensible = !!(this.extensible & side) && node.isAutoExtensible;
222
- if (extensible) {
223
- extended = node["extends"](direction, amount);
224
- this.total += Math.abs(extended);
225
- }
226
- }
227
- if (direction < 0 && this.count !== oldCount) {
228
- NodeMath.translation(this.init, extended);
229
- NodeMath.translation(this.back, extended);
230
- }
231
- this.makeSections();
232
- return extended;
233
- }
234
- }, {
235
- key: "reset",
236
- value: function reset() {
237
- this.init = this.back.slice();
238
- }
239
- }, {
240
- key: "dispose",
241
- value: function dispose() {
242
- this.total = 0;
243
- this.nodes = null;
244
- this.marks = null;
245
- this.cache = null;
246
- this.config = null;
247
- this.options = null;
248
- this.factory = null;
249
- }
250
- }]);
251
- }(AbstractNodeProvider);
252
-
253
- export { ResolvableLayerProvider as default };
11
+ import{inherits as t,createClass as e,slicedToArray as n,classCallCheck as i,callSuper as o,defineProperty as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import s from"lodash-es/clamp";import a from"./utils/NodeMath.js";import{Extensible as l}from"../../NodeAxis/src/enum/index.js";import u from"../../NodeAxis/src/AbstractNodeProvider.js";import c from"./mapping.js";import h from"./config/default.provider.js";var f=[],d=function(){function d(t,e,n,s,a){var l;return i(this,d),l=o(this,d),r(l,"factory",void 0),r(l,"interceptor",void 0),r(l,"config",void 0),r(l,"cache",[-1,null]),r(l,"total",0),r(l,"marks",[]),r(l,"init",void 0),r(l,"back",void 0),r(l,"options",null),r(l,"extended",0),r(l,"nodes",[]),l.factory=t,l.interceptor=s,l.config=Object.assign({},h,a),l.read(e,n),l}return t(d,u),e(d,[{key:"read",value:function(t,e){this.options=t;var n=t.nodes.map(function(t){return new c[t.type](t,e)}),i=n.reduce(function(t,e){return t+e.count},0),o=t.range,r=s(t.index,0,i-1)||0;if(null==o){var a=t.availableNodeCount||this.config.availableNodeCount,u=Array.isArray(a)?a:null;if(null==u){var h=Math.floor(a/2);u=[a%2==0?h-1:h,h]}r-u[0]<0?(u[1]=u[1]+(u[0]-r),u[0]=r):r+u[1]>=i&&(u[0]=u[0]+(r+u[1]-i)+1,u[1]=i-r),o=[Math.max(0,r-u[0]),Math.min(i,r+u[1]+1)]}var f=t.extensible;this.extended="string"==typeof f?(f.includes("L")?l.HEAD:0)|(f.includes("R")?l.TAIL:0):"number"==typeof f?f:l.NONE,this.total=i,this.nodes=n,this.init=Object.seal([o[0],o[1],r]),this.back=this.init.slice(),this.makeSections()}},{key:"findNode",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.cache,n=0,i=0,o=this.nodes.length;n<o;n++){var r=this.nodes[n];if(t>=i&&t<i+r.count)return e[0]=i,e[1]=r,e;i+=r.count}return f}},{key:"makeSections",value:function(){this.marks.length=0;for(var t=0,e=0,n=this.nodes.length;t<n;t++){var i=this.nodes[t];e+=i.count,i.period&&this.marks.push({range:[e-i.count,e],color:this.config.sectionColor[i.period]})}}},{key:"get",value:function(t){var e=this.findNode(t),i=n(e,2),o=i[0],r=i[1];if(null!=r){var s=r.get(t-o);return this.interceptor&&(s=this.interceptor(s)),s}return null}},{key:"getNodeInfo",value:function(t){var e=this.findNode(t),i=n(e,2),o=i[0],r=i[1];if(null!=r)return r.getNodeInfo(t-o)}},{key:"extent",get:function(){return this.init}},{key:"count",get:function(){return this.total}},{key:"sections",get:function(){return this.marks}},{key:"extensible",get:function(){return this.extended}},{key:"color",value:function(t){return null}},{key:"format",value:function(t,e){var i=this.findNode(t),o=n(i,2),r=o[0],s=o[1];if(null!=s)return s.format(t-r,e)}},{key:"formatByInject",value:function(t,e,i){var o=this.findNode(t),r=n(o,2),s=r[0],a=r[1];if(null!=a)return a.formatByInject(t-s,e,i)}},{key:"find",value:function(t){var e=null,n=this.nodes[0];if(null!=(e=n.find(t)))return e;var i=this.nodes.length;if(null!=(e=this.nodes[i-1].find(t)))return this.total+e;for(var o=1,r=n.count,s=i-1;o<s;o++){var a=this.nodes[o];if(null!=(e=a.find(t))){if(e>a.count)break;return r+e}r+=a.count}return null}},{key:"extends",value:function(t,e){var n=this.total,i=0,o=Math.max(e,this.extent[1]-this.extent[0]);if(0!==o){var r=this.nodes[t<0?0:this.nodes.length-1],s=t<0?l.HEAD:l.TAIL;!!(this.extensible&s)&&r.isAutoExtensible&&(i=r.extends(t,o),this.total+=Math.abs(i))}return t<0&&this.count!==n&&(a.translation(this.init,i),a.translation(this.back,i)),this.makeSections(),i}},{key:"reset",value:function(){this.init=this.back.slice()}},{key:"dispose",value:function(){this.total=0,this.nodes=null,this.marks=null,this.cache=null,this.config=null,this.options=null,this.factory=null}}])}();export{d as default};
@@ -1,7 +1,11 @@
1
- var def = {
2
- buffer: 1,
3
- transition: 0,
4
- opacity: 0.6
5
- };
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
+ */
6
10
 
7
- export { def as default };
11
+ var a={buffer:1,transition:0,opacity:.6};export{a as default};
@@ -1,18 +1,11 @@
1
- var def = {
2
- sectionColor: {
3
- history: "rgba(51,51,51,0.45)",
4
- "short": "rgba(51,183,255,0.45)",
5
- "long": "rgba(235,255,121,0.45)",
6
- tend: "rgba(255,99,13,0.45)",
7
- forecast: "rgba(255,99,13,0.45)"
8
- },
9
- statusColor: {
10
- ready: null,
11
- loading: "#d076ff",
12
- success: "#07ff23",
13
- error: "#ff0059"
14
- },
15
- availableNodeCount: [2, 3]
16
- };
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
+ */
17
10
 
18
- export { def as default };
11
+ var r={sectionColor:{history:"rgba(51,51,51,0.45)",short:"rgba(51,183,255,0.45)",long:"rgba(235,255,121,0.45)",tend:"rgba(255,99,13,0.45)",forecast:"rgba(255,99,13,0.45)"},statusColor:{ready:null,loading:"#d076ff",success:"#07ff23",error:"#ff0059"},availableNodeCount:[2,3]};export{r as default};
@@ -1,7 +1,11 @@
1
- import IntervalResolver from './resolvers/IntervalResolver.js';
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 mapping = {
4
- interval: IntervalResolver
5
- };
6
-
7
- export { mapping as default };
11
+ import r from"./resolvers/IntervalResolver.js";var e={interval:r};export{e as default};
@@ -1,169 +1,11 @@
1
- import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
- import _createClass from '@babel/runtime/helpers/createClass';
3
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
- import { DateTime } from 'luxon';
5
- import { toFormat, getFormatDate, getCount } from './tools.resolver.js';
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
+ */
6
10
 
7
- 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; }
8
- 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; }
9
- var EMPTY_STRING = Object.freeze("");
10
- var IntervalResolver = /*#__PURE__*/function () {
11
- function IntervalResolver(options, injection) {
12
- _classCallCheck(this, IntervalResolver);
13
- _defineProperty(this, "options", void 0);
14
- _defineProperty(this, "injection", void 0);
15
- _defineProperty(this, "range", void 0);
16
- _defineProperty(this, "step", void 0);
17
- _defineProperty(this, "unit", void 0);
18
- _defineProperty(this, "transform", void 0);
19
- _defineProperty(this, "layer", void 0);
20
- _defineProperty(this, "total", void 0);
21
- this.options = options;
22
- this.injection = injection;
23
- this.transform = options.transform;
24
- this.step = options.interval;
25
- this.unit = options.symbol;
26
- this.layer = options.layer;
27
- this.range = options.range.map(function (e) {
28
- return DateTime.fromSQL(e);
29
- });
30
- this.total = getCount(this.range, this.unit, this.step);
31
- }
32
- return _createClass(IntervalResolver, [{
33
- key: "count",
34
- get: function get() {
35
- return this.total;
36
- }
37
- }, {
38
- key: "period",
39
- get: function get() {
40
- return this.options.period;
41
- }
42
- }, {
43
- key: "isAutoExtensible",
44
- get: function get() {
45
- return true;
46
- }
47
- }, {
48
- key: "get",
49
- value: function get(index) {
50
- var name = this.format(index, "short");
51
- var custom = this.getQuery(index);
52
- var injection = this.injection;
53
- if (this.layer.type === "group") {
54
- return {
55
- injection: injection,
56
- type: "group",
57
- opacity: this.layer.opacity,
58
- layers: this.layer.layers.map(function (layer) {
59
- return Object.assign({
60
- name: name
61
- }, layer, {
62
- custom: custom
63
- });
64
- })
65
- };
66
- }
67
- return Object.assign({
68
- name: name,
69
- injection: injection
70
- }, this.layer, {
71
- custom: custom
72
- });
73
- }
74
- }, {
75
- key: "getNodeInfo",
76
- value: function getNodeInfo(index) {
77
- return Object.assign(this.getNodeInfoByTime(this.getTime(index)), {
78
- extend: this.options.extend,
79
- fields: this.getQuery(index),
80
- layer: this.options.layer
81
- });
82
- }
83
- }, {
84
- key: "format",
85
- value: function format(index, type) {
86
- var pattern = this.options.format[type];
87
- if (pattern != null) {
88
- return toFormat(pattern, this.getNodeInfo(index));
89
- }
90
- return EMPTY_STRING;
91
- }
92
- }, {
93
- key: "formatByInject",
94
- value: function formatByInject(index, type, finalFormat) {
95
- var pattern = this.options.format[type];
96
- if (pattern != null) {
97
- return getFormatDate(pattern, this.getNodeInfo(index), finalFormat);
98
- }
99
- return EMPTY_STRING;
100
- }
101
- }, {
102
- key: "find",
103
- value: function find(query) {
104
- if (query.time != null) {
105
- var target = DateTime.fromSQL(query.time),
106
- begin = this.range[0];
107
- if (this.unit === "xun") {
108
- return Math.round(target.diff(begin, "month").months * 3);
109
- }
110
- return Math.round(target.diff(begin, this.unit).get(this.unit) / this.step);
111
- }
112
- return null;
113
- }
114
- }, {
115
- key: "extends",
116
- value: function _extends(direction, minimum) {
117
- var side = direction < 0 ? 0 : 1,
118
- unit = this.unit,
119
- step = this.step,
120
- time = this.range[side];
121
- this.range[side] = time.plus(_defineProperty({}, unit, minimum * direction * step));
122
- this.total += minimum;
123
- return minimum;
124
- }
125
- }, {
126
- key: "dispose",
127
- value: function dispose() {
128
- this.options = null;
129
- this.transform = null;
130
- this.injection = null;
131
- }
132
- }, {
133
- key: "getQuery",
134
- value: function getQuery(index) {
135
- var _this = this;
136
- var time = this.getTime(index);
137
- var now = DateTime.fromMillis(Date.now());
138
- return this.transform.reduce(function (model, item) {
139
- var clone = time,
140
- offset = item.offset;
141
- if (clone.hasSame(now, "day") && clone.hour < item.split) offset = 0;
142
- if (offset) clone = clone.plus({
143
- "millisecond": offset
144
- });
145
- model[item.field] = toFormat(item.pattern, _this.getNodeInfoByTime(clone));
146
- return model;
147
- }, {});
148
- }
149
- }, {
150
- key: "getNodeInfoByTime",
151
- value: function getNodeInfoByTime(time) {
152
- return _objectSpread({
153
- time: time,
154
- unit: this.unit,
155
- step: this.step
156
- }, this.injection);
157
- }
158
- }, {
159
- key: "getTime",
160
- value: function getTime(index) {
161
- if (index === 0) {
162
- return this.range[0];
163
- }
164
- return this.range[0].plus(_defineProperty({}, this.unit, index * this.step));
165
- }
166
- }]);
167
- }();
168
-
169
- export { EMPTY_STRING, IntervalResolver as default };
11
+ import{createClass as t,defineProperty as e,objectSpread2 as i,classCallCheck as n}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{DateTime as s}from"luxon";import{toFormat as o,getFormatDate as r,getCount as u}from"./tools.resolver.js";var a=Object.freeze(""),h=function(){return t(function t(i,o){n(this,t),e(this,"options",void 0),e(this,"injection",void 0),e(this,"range",void 0),e(this,"step",void 0),e(this,"unit",void 0),e(this,"transform",void 0),e(this,"layer",void 0),e(this,"total",void 0),this.options=i,this.injection=o,this.transform=i.transform,this.step=i.interval,this.unit=i.symbol,this.layer=i.layer,this.range=i.range.map(function(t){return s.fromSQL(t)}),this.total=u(this.range,this.unit,this.step)},[{key:"count",get:function(){return this.total}},{key:"period",get:function(){return this.options.period}},{key:"isAutoExtensible",get:function(){return!0}},{key:"get",value:function(t){var e=this.format(t,"short"),i=this.getQuery(t),n=this.injection;return"group"===this.layer.type?{injection:n,type:"group",opacity:this.layer.opacity,layers:this.layer.layers.map(function(t){return Object.assign({name:e},t,{custom:i})})}:Object.assign({name:e,injection:n},this.layer,{custom:i})}},{key:"getNodeInfo",value:function(t){return Object.assign(this.getNodeInfoByTime(this.getTime(t)),{extend:this.options.extend,fields:this.getQuery(t),layer:this.options.layer})}},{key:"format",value:function(t,e){var i=this.options.format[e];return null!=i?o(i,this.getNodeInfo(t)):a}},{key:"formatByInject",value:function(t,e,i){var n=this.options.format[e];return null!=n?r(n,this.getNodeInfo(t),i):a}},{key:"find",value:function(t){if(null!=t.time){var e=s.fromSQL(t.time),i=this.range[0];return"xun"===this.unit?Math.round(3*e.diff(i,"month").months):Math.round(e.diff(i,this.unit).get(this.unit)/this.step)}return null}},{key:"extends",value:function(t,i){var n=t<0?0:1,s=this.unit,o=this.step,r=this.range[n];return this.range[n]=r.plus(e({},s,i*t*o)),this.total+=i,i}},{key:"dispose",value:function(){this.options=null,this.transform=null,this.injection=null}},{key:"getQuery",value:function(t){var e=this,i=this.getTime(t),n=s.fromMillis(Date.now());return this.transform.reduce(function(t,s){var r=i,u=s.offset;return r.hasSame(n,"day")&&r.hour<s.split&&(u=0),u&&(r=r.plus({millisecond:u})),t[s.field]=o(s.pattern,e.getNodeInfoByTime(r)),t},{})}},{key:"getNodeInfoByTime",value:function(t){return i({time:t,unit:this.unit,step:this.step},this.injection)}},{key:"getTime",value:function(t){return 0===t?this.range[0]:this.range[0].plus(e({},this.unit,t*this.step))}}])}();export{a as EMPTY_STRING,h as default};