cnhis-design-vue 3.4.0-beta.35 → 3.4.0-beta.39

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.
@@ -138,6 +138,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
138
138
  const fragment = document.createRange().createContextualFragment(html);
139
139
  inputRef.value.appendChild(fragment);
140
140
  }
141
+ handleInput();
141
142
  }
142
143
  function selectEmoji(name) {
143
144
  var _a;
@@ -315,6 +316,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
315
316
  });
316
317
  }
317
318
  function clearInput() {
319
+ if (inputRef.value)
320
+ inputRef.value.innerHTML = "";
318
321
  content.value = "";
319
322
  }
320
323
  function handleRelay({
@@ -847,9 +847,23 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<import("v
847
847
  type: import("vue").PropType<import("vue").CSSProperties>;
848
848
  default: () => {};
849
849
  };
850
+ keepShow: {
851
+ type: BooleanConstructor;
852
+ default: boolean;
853
+ };
850
854
  }>, {
851
- readonly NEllipsis: any;
852
855
  readonly NTooltip: any;
856
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
857
+ style: ObjectConstructor;
858
+ tooltip: ObjectConstructor;
859
+ keepShow: BooleanConstructor;
860
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
861
+ style: ObjectConstructor;
862
+ tooltip: ObjectConstructor;
863
+ keepShow: BooleanConstructor;
864
+ }>> & Readonly<{}>, {
865
+ keepShow: boolean;
866
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
853
867
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
854
868
  content: {
855
869
  type: (NumberConstructor | StringConstructor)[];
@@ -862,9 +876,14 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<import("v
862
876
  type: import("vue").PropType<import("vue").CSSProperties>;
863
877
  default: () => {};
864
878
  };
879
+ keepShow: {
880
+ type: BooleanConstructor;
881
+ default: boolean;
882
+ };
865
883
  }>> & Readonly<{}>, {
866
884
  content: string | number;
867
885
  contentStyle: import("vue").CSSProperties;
886
+ keepShow: boolean;
868
887
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
869
888
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
870
889
  content: {
@@ -900,9 +919,23 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<import("v
900
919
  type: import("vue").PropType<import("vue").CSSProperties>;
901
920
  default: () => {};
902
921
  };
922
+ keepShow: {
923
+ type: BooleanConstructor;
924
+ default: boolean;
925
+ };
903
926
  }>, {
904
- readonly NEllipsis: any;
905
927
  readonly NTooltip: any;
928
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
929
+ style: ObjectConstructor;
930
+ tooltip: ObjectConstructor;
931
+ keepShow: BooleanConstructor;
932
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
933
+ style: ObjectConstructor;
934
+ tooltip: ObjectConstructor;
935
+ keepShow: BooleanConstructor;
936
+ }>> & Readonly<{}>, {
937
+ keepShow: boolean;
938
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
906
939
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
907
940
  content: {
908
941
  type: (NumberConstructor | StringConstructor)[];
@@ -915,9 +948,14 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<import("v
915
948
  type: import("vue").PropType<import("vue").CSSProperties>;
916
949
  default: () => {};
917
950
  };
951
+ keepShow: {
952
+ type: BooleanConstructor;
953
+ default: boolean;
954
+ };
918
955
  }>> & Readonly<{}>, {
919
956
  content: string | number;
920
957
  contentStyle: import("vue").CSSProperties;
958
+ keepShow: boolean;
921
959
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
922
960
  readonly SlotRender: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
923
961
  renderer: {
@@ -841,9 +841,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
841
841
  type: PropType<import("vue").CSSProperties>;
842
842
  default: () => {};
843
843
  };
844
+ keepShow: {
845
+ type: BooleanConstructor;
846
+ default: boolean;
847
+ };
844
848
  }>, {
845
- readonly NEllipsis: any;
846
849
  readonly NTooltip: any;
850
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
851
+ style: ObjectConstructor;
852
+ tooltip: ObjectConstructor;
853
+ keepShow: BooleanConstructor;
854
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
855
+ style: ObjectConstructor;
856
+ tooltip: ObjectConstructor;
857
+ keepShow: BooleanConstructor;
858
+ }>> & Readonly<{}>, {
859
+ keepShow: boolean;
860
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
847
861
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
848
862
  content: {
849
863
  type: (NumberConstructor | StringConstructor)[];
@@ -856,9 +870,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
856
870
  type: PropType<import("vue").CSSProperties>;
857
871
  default: () => {};
858
872
  };
873
+ keepShow: {
874
+ type: BooleanConstructor;
875
+ default: boolean;
876
+ };
859
877
  }>> & Readonly<{}>, {
860
878
  content: string | number;
861
879
  contentStyle: import("vue").CSSProperties;
880
+ keepShow: boolean;
862
881
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
863
882
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
864
883
  content: {
@@ -894,9 +913,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
894
913
  type: PropType<import("vue").CSSProperties>;
895
914
  default: () => {};
896
915
  };
916
+ keepShow: {
917
+ type: BooleanConstructor;
918
+ default: boolean;
919
+ };
897
920
  }>, {
898
- readonly NEllipsis: any;
899
921
  readonly NTooltip: any;
922
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
923
+ style: ObjectConstructor;
924
+ tooltip: ObjectConstructor;
925
+ keepShow: BooleanConstructor;
926
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
927
+ style: ObjectConstructor;
928
+ tooltip: ObjectConstructor;
929
+ keepShow: BooleanConstructor;
930
+ }>> & Readonly<{}>, {
931
+ keepShow: boolean;
932
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
900
933
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
901
934
  content: {
902
935
  type: (NumberConstructor | StringConstructor)[];
@@ -909,9 +942,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
909
942
  type: PropType<import("vue").CSSProperties>;
910
943
  default: () => {};
911
944
  };
945
+ keepShow: {
946
+ type: BooleanConstructor;
947
+ default: boolean;
948
+ };
912
949
  }>> & Readonly<{}>, {
913
950
  content: string | number;
914
951
  contentStyle: import("vue").CSSProperties;
952
+ keepShow: boolean;
915
953
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
916
954
  readonly SlotRender: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
917
955
  renderer: {
@@ -320,9 +320,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
320
320
  type: import("vue").PropType<import("vue").CSSProperties>;
321
321
  default: () => {};
322
322
  };
323
+ keepShow: {
324
+ type: BooleanConstructor;
325
+ default: boolean;
326
+ };
323
327
  }>, {
324
- readonly NEllipsis: any;
325
328
  readonly NTooltip: any;
329
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
330
+ style: ObjectConstructor;
331
+ tooltip: ObjectConstructor;
332
+ keepShow: BooleanConstructor;
333
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
334
+ style: ObjectConstructor;
335
+ tooltip: ObjectConstructor;
336
+ keepShow: BooleanConstructor;
337
+ }>> & Readonly<{}>, {
338
+ keepShow: boolean;
339
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
326
340
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
327
341
  content: {
328
342
  type: (NumberConstructor | StringConstructor)[];
@@ -335,9 +349,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
335
349
  type: import("vue").PropType<import("vue").CSSProperties>;
336
350
  default: () => {};
337
351
  };
352
+ keepShow: {
353
+ type: BooleanConstructor;
354
+ default: boolean;
355
+ };
338
356
  }>> & Readonly<{}>, {
339
357
  content: string | number;
340
358
  contentStyle: import("vue").CSSProperties;
359
+ keepShow: boolean;
341
360
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
342
361
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
343
362
  content: {
@@ -373,9 +392,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
373
392
  type: import("vue").PropType<import("vue").CSSProperties>;
374
393
  default: () => {};
375
394
  };
395
+ keepShow: {
396
+ type: BooleanConstructor;
397
+ default: boolean;
398
+ };
376
399
  }>, {
377
- readonly NEllipsis: any;
378
400
  readonly NTooltip: any;
401
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
402
+ style: ObjectConstructor;
403
+ tooltip: ObjectConstructor;
404
+ keepShow: BooleanConstructor;
405
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
406
+ style: ObjectConstructor;
407
+ tooltip: ObjectConstructor;
408
+ keepShow: BooleanConstructor;
409
+ }>> & Readonly<{}>, {
410
+ keepShow: boolean;
411
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
379
412
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
380
413
  content: {
381
414
  type: (NumberConstructor | StringConstructor)[];
@@ -388,9 +421,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
388
421
  type: import("vue").PropType<import("vue").CSSProperties>;
389
422
  default: () => {};
390
423
  };
424
+ keepShow: {
425
+ type: BooleanConstructor;
426
+ default: boolean;
427
+ };
391
428
  }>> & Readonly<{}>, {
392
429
  content: string | number;
393
430
  contentStyle: import("vue").CSSProperties;
431
+ keepShow: boolean;
394
432
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
395
433
  readonly SlotRender: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
396
434
  renderer: {
@@ -174,10 +174,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
174
174
  encrypted: _ctx.encrypted
175
175
  }, null, 8, ["content", "tip", "content-style", "width", "encrypted"])) : (openBlock(), createBlock(InfoEllipsis, {
176
176
  key: 1,
177
+ "keep-show": _ctx.infoItem.keepShow,
177
178
  "content-style": ellipsisStyle.value,
178
179
  content: _ctx.infoItem[_ctx.valueField],
179
180
  tip: _ctx.infoItem.tip
180
- }, null, 8, ["content-style", "content", "tip"]))
181
+ }, null, 8, ["keep-show", "content-style", "content", "tip"]))
181
182
  ], 512), [
182
183
  [vShow, !_ctx.infoItem.edit || !_ctx.infoItem.formField]
183
184
  ]),
@@ -384,9 +384,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
384
384
  type: import("vue").PropType<import("vue").CSSProperties>;
385
385
  default: () => {};
386
386
  };
387
+ keepShow: {
388
+ type: BooleanConstructor;
389
+ default: boolean;
390
+ };
387
391
  }>, {
388
- readonly NEllipsis: any;
389
392
  readonly NTooltip: any;
393
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
394
+ style: ObjectConstructor;
395
+ tooltip: ObjectConstructor;
396
+ keepShow: BooleanConstructor;
397
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
398
+ style: ObjectConstructor;
399
+ tooltip: ObjectConstructor;
400
+ keepShow: BooleanConstructor;
401
+ }>> & Readonly<{}>, {
402
+ keepShow: boolean;
403
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
390
404
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
391
405
  content: {
392
406
  type: (NumberConstructor | StringConstructor)[];
@@ -399,9 +413,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
399
413
  type: import("vue").PropType<import("vue").CSSProperties>;
400
414
  default: () => {};
401
415
  };
416
+ keepShow: {
417
+ type: BooleanConstructor;
418
+ default: boolean;
419
+ };
402
420
  }>> & Readonly<{}>, {
403
421
  content: string | number;
404
422
  contentStyle: import("vue").CSSProperties;
423
+ keepShow: boolean;
405
424
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
406
425
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
407
426
  content: {
@@ -437,9 +456,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
437
456
  type: import("vue").PropType<import("vue").CSSProperties>;
438
457
  default: () => {};
439
458
  };
459
+ keepShow: {
460
+ type: BooleanConstructor;
461
+ default: boolean;
462
+ };
440
463
  }>, {
441
- readonly NEllipsis: any;
442
464
  readonly NTooltip: any;
465
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
466
+ style: ObjectConstructor;
467
+ tooltip: ObjectConstructor;
468
+ keepShow: BooleanConstructor;
469
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
470
+ style: ObjectConstructor;
471
+ tooltip: ObjectConstructor;
472
+ keepShow: BooleanConstructor;
473
+ }>> & Readonly<{}>, {
474
+ keepShow: boolean;
475
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
443
476
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
444
477
  content: {
445
478
  type: (NumberConstructor | StringConstructor)[];
@@ -452,9 +485,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
452
485
  type: import("vue").PropType<import("vue").CSSProperties>;
453
486
  default: () => {};
454
487
  };
488
+ keepShow: {
489
+ type: BooleanConstructor;
490
+ default: boolean;
491
+ };
455
492
  }>> & Readonly<{}>, {
456
493
  content: string | number;
457
494
  contentStyle: import("vue").CSSProperties;
495
+ keepShow: boolean;
458
496
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
459
497
  readonly SlotRender: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
460
498
  renderer: {
@@ -55,9 +55,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
55
55
  type: PropType<CSSProperties>;
56
56
  default: () => {};
57
57
  };
58
+ keepShow: {
59
+ type: BooleanConstructor;
60
+ default: boolean;
61
+ };
58
62
  }>, {
59
- readonly NEllipsis: any;
60
63
  readonly NTooltip: any;
64
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
65
+ style: ObjectConstructor;
66
+ tooltip: ObjectConstructor;
67
+ keepShow: BooleanConstructor;
68
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
69
+ style: ObjectConstructor;
70
+ tooltip: ObjectConstructor;
71
+ keepShow: BooleanConstructor;
72
+ }>> & Readonly<{}>, {
73
+ keepShow: boolean;
74
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
61
75
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
62
76
  content: {
63
77
  type: (NumberConstructor | StringConstructor)[];
@@ -70,9 +84,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
70
84
  type: PropType<CSSProperties>;
71
85
  default: () => {};
72
86
  };
87
+ keepShow: {
88
+ type: BooleanConstructor;
89
+ default: boolean;
90
+ };
73
91
  }>> & Readonly<{}>, {
74
92
  content: string | number;
75
93
  contentStyle: CSSProperties;
94
+ keepShow: boolean;
76
95
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
77
96
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
78
97
  content: {
@@ -11,9 +11,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
11
11
  type: PropType<CSSProperties>;
12
12
  default: () => {};
13
13
  };
14
+ keepShow: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
14
18
  }>, {
15
- readonly NEllipsis: any;
16
19
  readonly NTooltip: any;
20
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
21
+ style: ObjectConstructor;
22
+ tooltip: ObjectConstructor;
23
+ keepShow: BooleanConstructor;
24
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
+ style: ObjectConstructor;
26
+ tooltip: ObjectConstructor;
27
+ keepShow: BooleanConstructor;
28
+ }>> & Readonly<{}>, {
29
+ keepShow: boolean;
30
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
17
31
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
18
32
  content: {
19
33
  type: (NumberConstructor | StringConstructor)[];
@@ -26,8 +40,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
26
40
  type: PropType<CSSProperties>;
27
41
  default: () => {};
28
42
  };
43
+ keepShow: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
29
47
  }>> & Readonly<{}>, {
30
48
  content: string | number;
31
49
  contentStyle: CSSProperties;
50
+ keepShow: boolean;
32
51
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
33
52
  export default _default;
@@ -1,12 +1,14 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, normalizeStyle, createTextVNode, toDisplayString } from 'vue';
2
- import { NTooltip, NEllipsis } from 'naive-ui';
2
+ import { NTooltip } from 'naive-ui';
3
+ import script from '../../../../../shared/components/Ellipsis/Ellipsis.js';
3
4
 
4
5
  var _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "InfoEllipsis",
6
7
  props: {
7
8
  content: { type: [String, Number], default: "" },
8
9
  tip: { type: String },
9
- contentStyle: { type: Object, default: () => ({}) }
10
+ contentStyle: { type: Object, default: () => ({}) },
11
+ keepShow: { type: Boolean, default: false }
10
12
  },
11
13
  setup(__props) {
12
14
  return (_ctx, _cache) => {
@@ -14,10 +16,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
14
16
  disabled: !__props.tip
15
17
  }, {
16
18
  trigger: withCtx(() => [
17
- createElementVNode("section", null, [
18
- createVNode(unref(NEllipsis), {
19
+ createElementVNode("div", null, [
20
+ createVNode(unref(script), {
19
21
  style: normalizeStyle(__props.contentStyle),
20
- tooltip: { placement: __props.tip ? "bottom" : "top" }
22
+ tooltip: { placement: __props.tip ? "bottom" : "top" },
23
+ "keep-show": __props.keepShow
21
24
  }, {
22
25
  default: withCtx(() => {
23
26
  var _a;
@@ -26,7 +29,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
26
29
  ];
27
30
  }),
28
31
  _: 1
29
- }, 8, ["style", "tooltip"])
32
+ }, 8, ["style", "tooltip", "keep-show"])
30
33
  ])
31
34
  ]),
32
35
  default: withCtx(() => [
@@ -437,9 +437,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
437
437
  type: import("vue").PropType<import("vue").CSSProperties>;
438
438
  default: () => {};
439
439
  };
440
+ keepShow: {
441
+ type: BooleanConstructor;
442
+ default: boolean;
443
+ };
440
444
  }>, {
441
- readonly NEllipsis: any;
442
445
  readonly NTooltip: any;
446
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
447
+ style: ObjectConstructor;
448
+ tooltip: ObjectConstructor;
449
+ keepShow: BooleanConstructor;
450
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
451
+ style: ObjectConstructor;
452
+ tooltip: ObjectConstructor;
453
+ keepShow: BooleanConstructor;
454
+ }>> & Readonly<{}>, {
455
+ keepShow: boolean;
456
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
443
457
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
444
458
  content: {
445
459
  type: (NumberConstructor | StringConstructor)[];
@@ -452,9 +466,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
452
466
  type: import("vue").PropType<import("vue").CSSProperties>;
453
467
  default: () => {};
454
468
  };
469
+ keepShow: {
470
+ type: BooleanConstructor;
471
+ default: boolean;
472
+ };
455
473
  }>> & Readonly<{}>, {
456
474
  content: string | number;
457
475
  contentStyle: import("vue").CSSProperties;
476
+ keepShow: boolean;
458
477
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
459
478
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
460
479
  content: {
@@ -490,9 +509,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
490
509
  type: import("vue").PropType<import("vue").CSSProperties>;
491
510
  default: () => {};
492
511
  };
512
+ keepShow: {
513
+ type: BooleanConstructor;
514
+ default: boolean;
515
+ };
493
516
  }>, {
494
- readonly NEllipsis: any;
495
517
  readonly NTooltip: any;
518
+ readonly CEllipsis: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
519
+ style: ObjectConstructor;
520
+ tooltip: ObjectConstructor;
521
+ keepShow: BooleanConstructor;
522
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
523
+ style: ObjectConstructor;
524
+ tooltip: ObjectConstructor;
525
+ keepShow: BooleanConstructor;
526
+ }>> & Readonly<{}>, {
527
+ keepShow: boolean;
528
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
496
529
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
497
530
  content: {
498
531
  type: (NumberConstructor | StringConstructor)[];
@@ -505,9 +538,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
505
538
  type: import("vue").PropType<import("vue").CSSProperties>;
506
539
  default: () => {};
507
540
  };
541
+ keepShow: {
542
+ type: BooleanConstructor;
543
+ default: boolean;
544
+ };
508
545
  }>> & Readonly<{}>, {
509
546
  content: string | number;
510
547
  contentStyle: import("vue").CSSProperties;
548
+ keepShow: boolean;
511
549
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
512
550
  readonly SlotRender: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
513
551
  renderer: {
@@ -67,7 +67,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
67
67
  })
68
68
  );
69
69
  },
70
- 200,
70
+ 100,
71
71
  true,
72
72
  false
73
73
  );
@@ -46,11 +46,11 @@ const Maps = /* @__PURE__ */ new Map([
46
46
  ],
47
47
  [
48
48
  DatePresetValEnums.WEEK_START,
49
- () => moment().day(1).startOf("day")
49
+ () => moment().startOf("isoWeek")
50
50
  ],
51
51
  [
52
52
  DatePresetValEnums.WEEK_END,
53
- () => moment().day(7).endOf("day")
53
+ () => moment().endOf("isoWeek")
54
54
  ],
55
55
  [
56
56
  DatePresetValEnums.MONTH_START,
@@ -101,15 +101,15 @@ const dateRangeMapInner = /* @__PURE__ */ new Map([
101
101
  ],
102
102
  [
103
103
  DateRangeInnerValEnums.THIS_WEEK,
104
- () => [moment().day(1).startOf("day"), moment().day(7).endOf("day")]
104
+ () => [moment().startOf("isoWeek"), moment().endOf("isoWeek")]
105
105
  ],
106
106
  [
107
107
  DateRangeInnerValEnums.NEXT_WEEK,
108
- () => [moment().add(1, "w").day(1).startOf("day"), moment().add(1, "w").day(7).endOf("day")]
108
+ () => [moment().add(1, "w").startOf("isoWeek"), moment().add(1, "w").endOf("isoWeek")]
109
109
  ],
110
110
  [
111
111
  DateRangeInnerValEnums.LAST_WEEK,
112
- () => [moment().subtract(1, "w").day(1).startOf("day"), moment().subtract(1, "w").day(7).endOf("day")]
112
+ () => [moment().subtract(1, "w").startOf("isoWeek"), moment().subtract(1, "w").endOf("isoWeek")]
113
113
  ],
114
114
  [
115
115
  DateRangeInnerValEnums.PAST_WEEK,
@@ -187,17 +187,17 @@ const formatDateRangeInfo = (key, format = "x", optionSetting = WidgetOptionEnum
187
187
  [
188
188
  DateRangeInnerValEnums.THIS_WEEK,
189
189
  () => [
190
- isFutureTime ? currentTime : moment().day(1).startOf("day"),
191
- isPastTime ? currentTime : moment().day(7).endOf("day")
190
+ isFutureTime ? currentTime : moment().startOf("isoWeek"),
191
+ isPastTime ? currentTime : moment().endOf("isoWeek")
192
192
  ]
193
193
  ],
194
194
  [
195
195
  DateRangeInnerValEnums.NEXT_WEEK,
196
- () => [moment().add(1, "w").day(1).startOf("day"), moment().add(1, "w").day(7).endOf("day")]
196
+ () => [moment().add(1, "w").startOf("isoWeek"), moment().add(1, "w").endOf("isoWeek")]
197
197
  ],
198
198
  [
199
199
  DateRangeInnerValEnums.LAST_WEEK,
200
- () => [moment().subtract(1, "w").day(1).startOf("day"), moment().subtract(1, "w").day(7).endOf("day")]
200
+ () => [moment().subtract(1, "w").startOf("isoWeek"), moment().subtract(1, "w").endOf("isoWeek")]
201
201
  ],
202
202
  [
203
203
  DateRangeInnerValEnums.PAST_WEEK,
@@ -0,0 +1,12 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ style: ObjectConstructor;
3
+ tooltip: ObjectConstructor;
4
+ keepShow: BooleanConstructor;
5
+ }>, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
6
+ style: ObjectConstructor;
7
+ tooltip: ObjectConstructor;
8
+ keepShow: BooleanConstructor;
9
+ }>> & Readonly<{}>, {
10
+ keepShow: boolean;
11
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
@@ -0,0 +1,86 @@
1
+ import { defineComponent, ref, computed, createVNode, mergeProps } from 'vue';
2
+ import { CloseCircle } from '@vicons/ionicons5';
3
+ import { useElementSize } from '@vueuse/core';
4
+ import { NTooltip } from 'naive-ui';
5
+
6
+ var script = /* @__PURE__ */ defineComponent({
7
+ props: {
8
+ style: Object,
9
+ tooltip: Object,
10
+ keepShow: Boolean
11
+ },
12
+ setup(props, {
13
+ slots
14
+ }) {
15
+ const ellipsisRef = ref();
16
+ const ellipsisStyle = computed(() => ({
17
+ overflow: "hidden",
18
+ textOverflow: "ellipsis",
19
+ whiteSpace: "nowrap",
20
+ ...props.style
21
+ }));
22
+ const {
23
+ width: ellipsisWidth
24
+ } = useElementSize(ellipsisRef);
25
+ const innerRef = ref();
26
+ const innerStyle = {
27
+ position: "absolute",
28
+ opacity: 0,
29
+ visibility: "hidden"
30
+ };
31
+ const {
32
+ width: innerWidth
33
+ } = useElementSize(innerRef);
34
+ const disabled = computed(() => {
35
+ return innerWidth.value <= ellipsisWidth.value;
36
+ });
37
+ const show = ref(!!props.keepShow);
38
+ function onUpdateShow(v) {
39
+ if (!props.keepShow)
40
+ return;
41
+ show.value = v;
42
+ }
43
+ const operationStyle = {
44
+ position: "absolute",
45
+ right: "-4px",
46
+ top: "-4px",
47
+ cursor: "pointer",
48
+ width: "16px",
49
+ borderRadius: "50%",
50
+ boxShadow: "0 0 4px 0 rgba(0, 0, 0, 0.4)"
51
+ };
52
+ return () => {
53
+ return createVNode(NTooltip, mergeProps(props.tooltip, {
54
+ "disabled": disabled.value,
55
+ "trigger": props.keepShow ? "manual" : "hover",
56
+ "show": props.keepShow ? show.value : void 0
57
+ }), {
58
+ trigger: () => {
59
+ var _a, _b;
60
+ return createVNode("div", {
61
+ "onClick": () => onUpdateShow(true)
62
+ }, [createVNode("div", {
63
+ "style": ellipsisStyle.value,
64
+ "ref": ellipsisRef
65
+ }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), createVNode("div", {
66
+ "style": innerStyle,
67
+ "ref": innerRef
68
+ }, [(_b = slots.default) == null ? void 0 : _b.call(slots)])]);
69
+ },
70
+ default: () => {
71
+ var _a;
72
+ return createVNode("div", {
73
+ "style": {
74
+ maxWidth: "300px"
75
+ }
76
+ }, [(_a = slots.default) == null ? void 0 : _a.call(slots), props.keepShow ? createVNode(CloseCircle, {
77
+ "style": operationStyle,
78
+ "onClick": () => onUpdateShow(false)
79
+ }, null) : null]);
80
+ }
81
+ });
82
+ };
83
+ }
84
+ });
85
+
86
+ export { script as default };
@@ -0,0 +1,2 @@
1
+ import script from './Ellipsis';
2
+ export default script;
@@ -0,0 +1,2 @@
1
+ import script from './Ellipsis.js';
2
+ export { default } from './Ellipsis.js';
@@ -1,5 +1,5 @@
1
1
  var name = "@cnhis-design-vue/shared";
2
- var version = "3.4.0-beta.35";
2
+ var version = "3.4.0-beta.39";
3
3
  var main = "index.ts";
4
4
  var peerDependencies = {
5
5
  "naive-ui": "^2.30.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.4.0-beta.35",
3
+ "version": "3.4.0-beta.39",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -73,5 +73,5 @@
73
73
  "iOS 7",
74
74
  "last 3 iOS versions"
75
75
  ],
76
- "gitHead": "e6ca5e2db806ec0bbe3fe5e5bed79c3465fb7fe0"
76
+ "gitHead": "d55312f4966c5a5631441207b127e301c021a2f0"
77
77
  }