cnhis-design-vue 3.3.1-release.4 → 3.3.1-release.5

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 (33) hide show
  1. package/es/components/ai-chat/src/hooks/useChartAudioContext.js +1 -1
  2. package/es/components/audio-sdk/index.d.ts +37 -6
  3. package/es/components/audio-sdk/index.js +1 -0
  4. package/es/components/audio-sdk/src/Index.vue.d.ts +35 -6
  5. package/es/components/audio-sdk/src/Index.vue2.js +12 -4
  6. package/es/components/audio-sdk/src/audioSDK.d.ts +3 -4
  7. package/es/components/audio-sdk/src/audioSDK.js +12 -6
  8. package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +17 -3
  9. package/es/components/audio-sdk/src/components/recording.vue.d.ts +17 -3
  10. package/es/components/audio-sdk/src/components/recording.vue2.js +9 -6
  11. package/es/components/audio-sdk/src/utils/recorder/fft.js +75 -0
  12. package/es/components/audio-sdk/src/utils/recorder/index.d.ts +3 -0
  13. package/es/components/audio-sdk/src/utils/recorder/index.js +12 -0
  14. package/es/components/audio-sdk/src/utils/recorder/mp3-engine.js +12435 -0
  15. package/es/components/audio-sdk/src/utils/recorder/mp3.js +343 -0
  16. package/es/components/audio-sdk/src/utils/recorder/recorder.js +1324 -0
  17. package/es/components/audio-sdk/src/utils/recorder/wave.js +258 -0
  18. package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
  19. package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
  20. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  21. package/es/components/field-set/src/components/table-row.vue.d.ts +1 -1
  22. package/es/components/index.js +1 -0
  23. package/es/components/select-person/src/SelectPerson.vue2.js +18 -9
  24. package/es/components/table-filter/src/components/render-widget/enums.d.ts +2 -0
  25. package/es/components/table-filter/src/components/render-widget/enums.js +2 -1
  26. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +8 -0
  27. package/es/components/table-filter/src/components/render-widget/helpers/enums.d.ts +1 -0
  28. package/es/components/table-filter/src/components/render-widget/helpers/enums.js +2 -1
  29. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +4 -2
  30. package/es/components/table-filter/src/tool/baseOptions.js +3 -0
  31. package/es/shared/package.json.js +1 -1
  32. package/es/shared/utils/index.js +3 -2
  33. package/package.json +1 -2
@@ -0,0 +1,258 @@
1
+ function useWave(Recorder) {
2
+ var FrequencyHistogramView = function(set) {
3
+ return new fn(set);
4
+ };
5
+ var ViewTxt = "FrequencyHistogramView";
6
+ var fn = function(set) {
7
+ var This = this;
8
+ var o = {
9
+ scale: 2,
10
+ fps: 20,
11
+ lineCount: 30,
12
+ widthRatio: 0.6,
13
+ spaceWidth: 0,
14
+ minHeight: 0,
15
+ position: -1,
16
+ mirrorEnable: false,
17
+ stripeEnable: true,
18
+ stripeHeight: 3,
19
+ stripeMargin: 6,
20
+ fallDuration: 1e3,
21
+ stripeFallDuration: 3500,
22
+ linear: [0, "rgba(0,187,17,1)", 0.5, "rgba(255,215,0,1)", 1, "rgba(255,102,0,1)"],
23
+ stripeLinear: null,
24
+ shadowBlur: 0,
25
+ shadowColor: "#bbb",
26
+ stripeShadowBlur: -1,
27
+ stripeShadowColor: "",
28
+ onDraw: function(frequencyData, sampleRate) {
29
+ }
30
+ };
31
+ for (var k in set) {
32
+ o[k] = set[k];
33
+ }
34
+ This.set = set = o;
35
+ var elem = set.elem;
36
+ if (elem) {
37
+ if (typeof elem == "string") {
38
+ elem = document.querySelector(elem);
39
+ } else if (elem.length) {
40
+ elem = elem[0];
41
+ }
42
+ }
43
+ if (elem) {
44
+ set.width = elem.offsetWidth;
45
+ set.height = elem.offsetHeight;
46
+ }
47
+ var scale = set.scale;
48
+ var width = set.width * scale;
49
+ var height = set.height * scale;
50
+ if (!width || !height) {
51
+ throw new Error(ViewTxt + "\u65E0\u5BBD\u9AD8");
52
+ }
53
+ var thisElem = This.elem = document.createElement("div");
54
+ var lowerCss = ["", "transform-origin:0 0;", "transform:scale(" + 1 / scale + ");"];
55
+ thisElem.innerHTML = '<div style="width:' + set.width + "px;height:" + set.height + 'px;overflow:hidden"><div style="width:' + width + "px;height:" + height + "px;" + lowerCss.join("-webkit-") + lowerCss.join("-ms-") + lowerCss.join("-moz-") + lowerCss.join("") + '"><canvas/></div></div>';
56
+ var canvas = This.canvas = thisElem.querySelector("canvas");
57
+ This.ctx = canvas.getContext("2d");
58
+ canvas.width = width;
59
+ canvas.height = height;
60
+ if (elem) {
61
+ elem.innerHTML = "";
62
+ elem.appendChild(thisElem);
63
+ }
64
+ if (!Recorder.LibFFT) {
65
+ throw new Error("\u9700\u8981lib.fft.js\u652F\u6301");
66
+ }
67
+ This.fft = Recorder.LibFFT(1024);
68
+ This.lastH = [];
69
+ This.stripesH = [];
70
+ };
71
+ fn.prototype = FrequencyHistogramView.prototype = {
72
+ genLinear: function(ctx, colors, from, to) {
73
+ var rtv = ctx.createLinearGradient(0, from, 0, to);
74
+ for (var i = 0; i < colors.length; ) {
75
+ rtv.addColorStop(colors[i++], colors[i++]);
76
+ }
77
+ return rtv;
78
+ },
79
+ input: function(pcmData, powerLevel, sampleRate) {
80
+ var This = this;
81
+ This.sampleRate = sampleRate;
82
+ This.pcmData = pcmData;
83
+ This.pcmPos = 0;
84
+ This.inputTime = Date.now();
85
+ This.schedule();
86
+ },
87
+ schedule: function() {
88
+ var This = this, set = This.set;
89
+ var interval = Math.floor(1e3 / set.fps);
90
+ if (!This.timer) {
91
+ This.timer = setInterval(function() {
92
+ This.schedule();
93
+ }, interval);
94
+ }
95
+ var now = Date.now();
96
+ var drawTime = This.drawTime || 0;
97
+ if (now - This.inputTime > set.stripeFallDuration * 1.3) {
98
+ clearInterval(This.timer);
99
+ This.timer = 0;
100
+ return;
101
+ }
102
+ if (now - drawTime < interval) {
103
+ return;
104
+ }
105
+ This.drawTime = now;
106
+ var bufferSize = This.fft.bufferSize;
107
+ var pcm = This.pcmData;
108
+ var pos = This.pcmPos;
109
+ var arr = new Int16Array(bufferSize);
110
+ for (var i = 0; i < bufferSize && pos < pcm.length; i++, pos++) {
111
+ arr[i] = pcm[pos];
112
+ }
113
+ This.pcmPos = pos;
114
+ var frequencyData = This.fft.transform(arr);
115
+ This.draw(frequencyData, This.sampleRate);
116
+ },
117
+ draw: function(frequencyData, sampleRate) {
118
+ var This = this, set = This.set;
119
+ var ctx = This.ctx;
120
+ var scale = set.scale;
121
+ var width = set.width * scale;
122
+ var height = set.height * scale;
123
+ var lineCount = set.lineCount;
124
+ var bufferSize = This.fft.bufferSize;
125
+ var position = set.position;
126
+ var posAbs = Math.abs(set.position);
127
+ var originY = position == 1 ? 0 : height;
128
+ var heightY = height;
129
+ if (posAbs < 1) {
130
+ heightY = heightY / 2;
131
+ originY = heightY;
132
+ heightY = Math.floor(heightY * (1 + posAbs));
133
+ originY = Math.floor(position > 0 ? originY * (1 - posAbs) : originY * (1 + posAbs));
134
+ }
135
+ var lastH = This.lastH;
136
+ var stripesH = This.stripesH;
137
+ var speed = Math.ceil(heightY / (set.fallDuration / (1e3 / set.fps)));
138
+ var stripeSpeed = Math.ceil(heightY / (set.stripeFallDuration / (1e3 / set.fps)));
139
+ var stripeMargin = set.stripeMargin * scale;
140
+ var Y0 = 1 << (Math.round(Math.log(bufferSize) / Math.log(2) + 3) << 1);
141
+ var logY0 = Math.log(Y0) / Math.log(10);
142
+ var dBmax = 20 * Math.log(32767) / Math.log(10);
143
+ var fftSize = bufferSize / 2;
144
+ var fftSize5k = Math.min(fftSize, Math.floor(fftSize * 5e3 / (sampleRate / 2)));
145
+ var fftSize5kIsAll = fftSize5k == fftSize;
146
+ var line80 = fftSize5kIsAll ? lineCount : Math.round(lineCount * 0.8);
147
+ var fftSizeStep1 = fftSize5k / line80;
148
+ var fftSizeStep2 = fftSize5kIsAll ? 0 : (fftSize - fftSize5k) / (lineCount - line80);
149
+ var fftIdx = 0;
150
+ for (var i = 0; i < lineCount; i++) {
151
+ var start = Math.ceil(fftIdx);
152
+ if (i < line80) {
153
+ fftIdx += fftSizeStep1;
154
+ } else {
155
+ fftIdx += fftSizeStep2;
156
+ }
157
+ var end = Math.min(Math.ceil(fftIdx), fftSize);
158
+ var maxAmp = 0;
159
+ for (var j = start; j < end; j++) {
160
+ maxAmp = Math.max(maxAmp, Math.abs(frequencyData[j]));
161
+ }
162
+ var dB = maxAmp > Y0 ? Math.floor((Math.log(maxAmp) / Math.log(10) - logY0) * 17) : 0;
163
+ var h = heightY * Math.min(dB / dBmax, 1);
164
+ lastH[i] = (lastH[i] || 0) - speed;
165
+ if (h < lastH[i]) {
166
+ h = lastH[i];
167
+ }
168
+ if (h < 0) {
169
+ h = 0;
170
+ }
171
+ lastH[i] = h;
172
+ var shi = stripesH[i] || 0;
173
+ if (h && h + stripeMargin > shi) {
174
+ stripesH[i] = h + stripeMargin;
175
+ } else {
176
+ var sh = shi - stripeSpeed;
177
+ if (sh < 0) {
178
+ sh = 0;
179
+ }
180
+ stripesH[i] = sh;
181
+ }
182
+ }
183
+ ctx.clearRect(0, 0, width, height);
184
+ var linear1 = This.genLinear(ctx, set.linear, originY, originY - heightY);
185
+ var stripeLinear1 = set.stripeLinear && This.genLinear(ctx, set.stripeLinear, originY, originY - heightY) || linear1;
186
+ var linear2 = This.genLinear(ctx, set.linear, originY, originY + heightY);
187
+ var stripeLinear2 = set.stripeLinear && This.genLinear(ctx, set.stripeLinear, originY, originY + heightY) || linear2;
188
+ ctx.shadowBlur = set.shadowBlur * scale;
189
+ ctx.shadowColor = set.shadowColor;
190
+ var mirrorEnable = set.mirrorEnable;
191
+ var mirrorCount = mirrorEnable ? lineCount * 2 - 1 : lineCount;
192
+ var widthRatio = set.widthRatio;
193
+ var spaceWidth = set.spaceWidth * scale;
194
+ if (spaceWidth != 0) {
195
+ widthRatio = (width - spaceWidth * (mirrorCount + 1)) / width;
196
+ }
197
+ var lineWidth = Math.max(1 * scale, Math.floor(width * widthRatio / mirrorCount));
198
+ var spaceFloat = (width - mirrorCount * lineWidth) / (mirrorCount + 1);
199
+ var minHeight = set.minHeight * scale;
200
+ var mirrorSubX = spaceFloat + lineWidth / 2;
201
+ var XFloat = mirrorEnable ? width / 2 - mirrorSubX : 0;
202
+ for (var i = 0, xFloat = XFloat, x, y, h; i < lineCount; i++) {
203
+ xFloat += spaceFloat;
204
+ x = Math.floor(xFloat);
205
+ h = Math.max(lastH[i], minHeight);
206
+ if (originY != 0) {
207
+ y = originY - h;
208
+ ctx.fillStyle = linear1;
209
+ ctx.fillRect(x, y, lineWidth, h);
210
+ }
211
+ if (originY != height) {
212
+ ctx.fillStyle = linear2;
213
+ ctx.fillRect(x, originY, lineWidth, h);
214
+ }
215
+ xFloat += lineWidth;
216
+ }
217
+ if (set.stripeEnable) {
218
+ var stripeShadowBlur = set.stripeShadowBlur;
219
+ ctx.shadowBlur = (stripeShadowBlur == -1 ? set.shadowBlur : stripeShadowBlur) * scale;
220
+ ctx.shadowColor = set.stripeShadowColor || set.shadowColor;
221
+ var stripeHeight = set.stripeHeight * scale;
222
+ for (var i = 0, xFloat = XFloat, x, y, h; i < lineCount; i++) {
223
+ xFloat += spaceFloat;
224
+ x = Math.floor(xFloat);
225
+ h = stripesH[i];
226
+ if (originY != 0) {
227
+ y = originY - h - stripeHeight;
228
+ if (y < 0) {
229
+ y = 0;
230
+ }
231
+ ctx.fillStyle = stripeLinear1;
232
+ ctx.fillRect(x, y, lineWidth, stripeHeight);
233
+ }
234
+ if (originY != height) {
235
+ y = originY + h;
236
+ if (y + stripeHeight > height) {
237
+ y = height - stripeHeight;
238
+ }
239
+ ctx.fillStyle = stripeLinear2;
240
+ ctx.fillRect(x, y, lineWidth, stripeHeight);
241
+ }
242
+ xFloat += lineWidth;
243
+ }
244
+ }
245
+ if (mirrorEnable) {
246
+ var srcW = Math.floor(width / 2);
247
+ ctx.save();
248
+ ctx.scale(-1, 1);
249
+ ctx.drawImage(This.canvas, Math.ceil(width / 2), 0, srcW, height, -srcW, 0, srcW, height);
250
+ ctx.restore();
251
+ }
252
+ set.onDraw(frequencyData, sampleRate);
253
+ }
254
+ };
255
+ Recorder[ViewTxt] = FrequencyHistogramView;
256
+ }
257
+
258
+ export { useWave };
@@ -534,9 +534,9 @@ declare const _default: import("vue").DefineComponent<{
534
534
  }>;
535
535
  developMode: boolean;
536
536
  draggable: boolean;
537
+ isHighlightRow: boolean;
537
538
  idx: number;
538
539
  isHighlight: boolean;
539
- isHighlightRow: boolean;
540
540
  isFieldSet: boolean;
541
541
  fieldDescribeMode: "column" | "tooltip";
542
542
  hideExpressionOption: AnyObject[];
@@ -563,9 +563,9 @@ declare const _default: import("vue").DefineComponent<{
563
563
  }>;
564
564
  developMode: boolean;
565
565
  draggable: boolean;
566
+ isHighlightRow: boolean;
566
567
  idx: number;
567
568
  isHighlight: boolean;
568
- isHighlightRow: boolean;
569
569
  isFieldSet: boolean;
570
570
  fieldDescribeMode: "column" | "tooltip";
571
571
  hideExpressionOption: AnyObject[];
@@ -722,9 +722,9 @@ declare const _default: import("vue").DefineComponent<{
722
722
  }>;
723
723
  developMode: boolean;
724
724
  draggable: boolean;
725
+ isHighlightRow: boolean;
725
726
  idx: number;
726
727
  isHighlight: boolean;
727
- isHighlightRow: boolean;
728
728
  isFieldSet: boolean;
729
729
  fieldDescribeMode: "column" | "tooltip";
730
730
  hideExpressionOption: AnyObject[];
@@ -383,9 +383,9 @@ declare const _default: import("vue").DefineComponent<{
383
383
  }>;
384
384
  developMode: boolean;
385
385
  draggable: boolean;
386
+ isHighlightRow: boolean;
386
387
  idx: number;
387
388
  isHighlight: boolean;
388
- isHighlightRow: boolean;
389
389
  isFieldSet: boolean;
390
390
  fieldDescribeMode: "column" | "tooltip";
391
391
  hideExpressionOption: AnyObject[];
@@ -105,6 +105,7 @@ export { useScrollLoading } from '../shared/hooks/useScrollLoading.js';
105
105
  export { vFlexibleResize } from '../shared/directive/flexibleResize.js';
106
106
  export { useGuide } from './guide/src/useGuide.js';
107
107
  export { DragScroll, useDragScroll } from './drag-scroll/src/index.js';
108
+ export { default as CRecorder } from './audio-sdk/src/utils/recorder/recorder.js';
108
109
  export { useAnchor } from './form-render/src/hooks/useAnchor.js';
109
110
  export { BusinessCollector, useBusinessBinding } from './form-render/src/hooks/useBusinessBinding.js';
110
111
  export { ContextCollector, useChangeContext } from './form-render/src/hooks/useChangeContext.js';
@@ -495,9 +495,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
495
495
  expandedKeys.value = treeData.value.length && keyword.value ? getExpandedKeys(treeData.value) : [];
496
496
  }
497
497
  function setTreeCheckd(tree, checked) {
498
- var _a3, _b3;
499
- const checkStrategy = (_b3 = (_a3 = props == null ? void 0 : props.treeSetting) == null ? void 0 : _a3.checkStrategy) != null ? _b3 : "child";
500
- switch (checkStrategy) {
498
+ switch (checkStrategyResult.value) {
501
499
  case "child":
502
500
  setCheckdWithChild(tree, checked);
503
501
  break;
@@ -540,19 +538,30 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
540
538
  }
541
539
  }
542
540
  function setCheckdWithAll(tree, checked) {
543
- checkedKeys.value = [];
541
+ var _a3;
542
+ if (!props.onlyForwardCascade) {
543
+ checkedKeys.value = [];
544
+ }
545
+ let newKeys = checkedKeys.value;
544
546
  for (let i = 0, len = tree.length; i < len; i++) {
545
547
  const item = tree[i];
546
548
  if (!item.disabled) {
547
- if (checked && !checkedKeys.value.includes(item.key)) {
548
- checkedKeys.value.push(item.key);
549
+ if (checked) {
550
+ newKeys = union(newKeys, [item.key]);
551
+ } else {
552
+ remove(newKeys, (key) => [item.key].includes(key));
549
553
  }
550
- if (!checked) {
551
- const keyIndex = checkedKeys.value.findIndex((key) => key === item.key);
552
- checkedKeys.value.splice(keyIndex, 1);
554
+ }
555
+ if (((_a3 = item.children) == null ? void 0 : _a3.length) && props.onlyForwardCascade) {
556
+ const flattenKeys = getFlattenKeys(item.children);
557
+ if (checked) {
558
+ newKeys = union(newKeys, flattenKeys);
559
+ } else {
560
+ remove(newKeys, (key) => flattenKeys.includes(key));
553
561
  }
554
562
  }
555
563
  }
564
+ checkedKeys.value = newKeys;
556
565
  }
557
566
  function checkedAllChange(checked) {
558
567
  setTreeCheckd(treeData.value, checked);
@@ -38,6 +38,7 @@ export declare const DateRangeInnerValEnums: {
38
38
  LAST_YEAR: string;
39
39
  NEXT_YEAR: string;
40
40
  PAST_HALF_YEAR: string;
41
+ PAST_YEAR: string;
41
42
  };
42
43
  export declare const DateRangeOutDefEnums: {
43
44
  TODAY: string;
@@ -58,5 +59,6 @@ export declare const DateRangeOutDefEnums: {
58
59
  LAST_YEAR: string;
59
60
  NEXT_YEAR: string;
60
61
  PAST_HALF_YEAR: string;
62
+ PAST_YEAR: string;
61
63
  CUSTOM: string;
62
64
  };
@@ -37,7 +37,8 @@ const DateRangeInnerValEnums = {
37
37
  THIS_YEAR: "THIS_YEAR",
38
38
  LAST_YEAR: "LAST_YEAR",
39
39
  NEXT_YEAR: "NEXT_YEAR",
40
- PAST_HALF_YEAR: "PAST_HALF_YEAR"
40
+ PAST_HALF_YEAR: "PAST_HALF_YEAR",
41
+ PAST_YEAR: "PAST_YEAR"
41
42
  };
42
43
  const DateRangeOutDefEnums = {
43
44
  CUSTOM: "CUSTOM",
@@ -175,6 +175,10 @@ const baseDateRangeInner = {
175
175
  name: ((_ea = window.getLanguageByCode) == null ? void 0 : _ea.call(window, "10010.1.397")) || "\u8FD1\u534A\u5E74",
176
176
  title: ((_fa = window.getLanguageByCode) == null ? void 0 : _fa.call(window, "10010.1.397")) || "\u8FD1\u534A\u5E74",
177
177
  con: WidgetValEnums.PAST_HALF_YEAR
178
+ }, {
179
+ name: "\u8FD1\u4E00\u5E74",
180
+ title: "\u8FD1\u4E00\u5E74",
181
+ con: WidgetValEnums.PAST_YEAR
178
182
  }],
179
183
  [WidgetOptionEnums.PAST_TIME]: [{
180
184
  name: ((_ga = window.getLanguageByCode) == null ? void 0 : _ga.call(window, "10010.1.134")) || "\u4ECA\u5929",
@@ -228,6 +232,10 @@ const baseDateRangeInner = {
228
232
  name: ((_Ea = window.getLanguageByCode) == null ? void 0 : _Ea.call(window, "10010.1.397")) || "\u8FD1\u534A\u5E74",
229
233
  title: ((_Fa = window.getLanguageByCode) == null ? void 0 : _Fa.call(window, "10010.1.397")) || "\u8FD1\u534A\u5E74",
230
234
  con: WidgetValEnums.PAST_HALF_YEAR
235
+ }, {
236
+ name: "\u8FD1\u4E00\u5E74",
237
+ title: "\u8FD1\u4E00\u5E74",
238
+ con: WidgetValEnums.PAST_YEAR
231
239
  }],
232
240
  [WidgetOptionEnums.FUTURE_TIME]: [{
233
241
  name: ((_Ga = window.getLanguageByCode) == null ? void 0 : _Ga.call(window, "10010.1.134")) || "\u4ECA\u5929",
@@ -36,4 +36,5 @@ export declare const WidgetValEnums: {
36
36
  NEXT_YEAR: string;
37
37
  LAST_YEAR: string;
38
38
  PAST_HALF_YEAR: string;
39
+ PAST_YEAR: string;
39
40
  };
@@ -52,7 +52,8 @@ const WidgetValEnums = {
52
52
  YEAR_END: "THIS_YEAR_END",
53
53
  NEXT_YEAR: "NEXT_YEAR",
54
54
  LAST_YEAR: "LAST_YEAR",
55
- PAST_HALF_YEAR: "PAST_HALF_YEAR"
55
+ PAST_HALF_YEAR: "PAST_HALF_YEAR",
56
+ PAST_YEAR: "PAST_YEAR"
56
57
  };
57
58
 
58
59
  export { WidgetDateOptionEnums, WidgetValEnums };
@@ -104,7 +104,8 @@ const dateRangeMapInner = /* @__PURE__ */ new Map([
104
104
  [DateRangeInnerValEnums.THIS_YEAR, () => [moment().startOf("year"), moment().endOf("year")]],
105
105
  [DateRangeInnerValEnums.NEXT_YEAR, () => [moment().add(1, "y").startOf("year"), moment().add(1, "y").endOf("year")]],
106
106
  [DateRangeInnerValEnums.LAST_YEAR, () => [moment().subtract(1, "y").startOf("year"), moment().subtract(1, "y").endOf("year")]],
107
- [DateRangeInnerValEnums.PAST_HALF_YEAR, () => [moment().subtract(6, "months").startOf("day"), moment().endOf("day")]]
107
+ [DateRangeInnerValEnums.PAST_HALF_YEAR, () => [moment().subtract(6, "months").startOf("day"), moment().endOf("day")]],
108
+ [DateRangeInnerValEnums.PAST_YEAR, () => [moment().subtract(12, "months").startOf("day"), moment().endOf("day")]]
108
109
  ]);
109
110
  const formatDateRangeInfo = (key, format = "x", optionSetting = WidgetOptionEnums.ALL, isOrigin = false) => {
110
111
  const isPastTime = optionSetting === WidgetOptionEnums.PAST_TIME;
@@ -128,7 +129,8 @@ const formatDateRangeInfo = (key, format = "x", optionSetting = WidgetOptionEnum
128
129
  [DateRangeInnerValEnums.THIS_YEAR, () => [isFutureTime ? currentTime : moment().startOf("year"), isPastTime ? currentTime : moment().endOf("year")]],
129
130
  [DateRangeInnerValEnums.NEXT_YEAR, () => [moment().add(1, "y").startOf("year"), moment().add(1, "y").endOf("year")]],
130
131
  [DateRangeInnerValEnums.LAST_YEAR, () => [moment().subtract(1, "y").startOf("year"), moment().subtract(1, "y").endOf("year")]],
131
- [DateRangeInnerValEnums.PAST_HALF_YEAR, () => [moment().subtract(6, "months").startOf("day"), isPastTime ? currentTime : moment().endOf("day")]]
132
+ [DateRangeInnerValEnums.PAST_HALF_YEAR, () => [moment().subtract(6, "months").startOf("day"), isPastTime ? currentTime : moment().endOf("day")]],
133
+ [DateRangeInnerValEnums.PAST_YEAR, () => [moment().subtract(12, "months").startOf("day"), isPastTime ? currentTime : moment().endOf("day")]]
132
134
  ]);
133
135
  const fun = dateRangeMap.get(key);
134
136
  if (fun) {
@@ -55,6 +55,9 @@ const widgetDateRangeOptions = [{
55
55
  }, {
56
56
  label: ((_r = window.getLanguageByCode) == null ? void 0 : _r.call(window, "10010.1.397")) || "\u8FD1\u534A\u5E74",
57
57
  value: DateRangeOutDefEnums.PAST_HALF_YEAR
58
+ }, {
59
+ label: "\u8FD1\u4E00\u5E74",
60
+ value: DateRangeOutDefEnums.PAST_YEAR
58
61
  }];
59
62
 
60
63
  export { widgetDateRangeOptions };
@@ -1,5 +1,5 @@
1
1
  var name = "@cnhis-design-vue/shared";
2
- var version = "3.3.1-release.4";
2
+ var version = "3.3.1-release.5";
3
3
  var main = "index.ts";
4
4
  var peerDependencies = {
5
5
  "naive-ui": "^2.30.0",
@@ -122,7 +122,7 @@ const charMap = {
122
122
  "(": 5.17,
123
123
  ")": 5.17,
124
124
  "-": 7.51,
125
- "+": 7.51,
125
+ "+": 8.8,
126
126
  "/": 4.11,
127
127
  "\\": 4.11,
128
128
  "%": 12.68,
@@ -130,7 +130,8 @@ const charMap = {
130
130
  "\uFF1B": 13.95,
131
131
  "\u3001": 13.95,
132
132
  "\uFF0C": 13.95,
133
- "\u3002": 13.95
133
+ "\u3002": 13.95,
134
+ ":": 4.03
134
135
  };
135
136
  const numberReg = /\d/;
136
137
  const chineseReg = /[\u4e00-\u9fa5():,。]/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.3.1-release.4",
3
+ "version": "3.3.1-release.5",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -50,7 +50,6 @@
50
50
  "min-dom": "^3.2.1",
51
51
  "moment": "^2.29.1",
52
52
  "naive-ui": "^2.34.0",
53
- "recorder-core": "^1.2.23070100",
54
53
  "socket.io-client": "^4.7.3",
55
54
  "sockjs-client": "^1.6.1",
56
55
  "sortablejs": "^1.15.0",