@uzum-tech/ui 1.14.4 → 1.14.6

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 (51) hide show
  1. package/dist/index.js +22774 -22715
  2. package/dist/index.prod.js +3 -3
  3. package/es/_internal/select-menu/src/SelectOption.d.ts +3 -3
  4. package/es/_internal/select-menu/src/SelectOption.js +23 -20
  5. package/es/_internal/select-menu/src/styles/index.cssr.js +5 -4
  6. package/es/carousel/src/Carousel.d.ts +8 -3
  7. package/es/carousel/src/Carousel.js +42 -26
  8. package/es/carousel/src/CarouselArrow.js +1 -1
  9. package/es/carousel/src/CarouselContext.d.ts +2 -2
  10. package/es/carousel/src/CarouselContext.js +4 -4
  11. package/es/carousel/src/CarouselDots.js +1 -1
  12. package/es/carousel/src/CarouselItem.d.ts +1 -1
  13. package/es/carousel/src/CarouselItem.js +6 -3
  14. package/es/carousel/src/interface.d.ts +16 -0
  15. package/es/carousel/src/utils/index.js +4 -4
  16. package/es/carousel/styles/light.d.ts +1 -2
  17. package/es/carousel/styles/light.js +2 -2
  18. package/es/chat/src/ChatParts/MainArea.js +8 -5
  19. package/es/chat/src/styles/index.cssr.js +12 -3
  20. package/es/chat/styles/light.js +1 -1
  21. package/es/mapping-card/src/MappingCard.d.ts +9 -0
  22. package/es/mapping-card/src/MappingCardParts/Header.js +2 -2
  23. package/es/mapping-card/src/interface.d.ts +5 -0
  24. package/es/mapping-card/src/interface.js +4 -0
  25. package/es/version.d.ts +1 -1
  26. package/es/version.js +1 -1
  27. package/lib/_internal/select-menu/src/SelectOption.d.ts +3 -3
  28. package/lib/_internal/select-menu/src/SelectOption.js +22 -19
  29. package/lib/_internal/select-menu/src/styles/index.cssr.js +5 -4
  30. package/lib/carousel/src/Carousel.d.ts +8 -3
  31. package/lib/carousel/src/Carousel.js +41 -25
  32. package/lib/carousel/src/CarouselContext.d.ts +2 -2
  33. package/lib/carousel/src/CarouselContext.js +6 -7
  34. package/lib/carousel/src/CarouselDots.js +1 -1
  35. package/lib/carousel/src/CarouselItem.d.ts +1 -1
  36. package/lib/carousel/src/CarouselItem.js +7 -5
  37. package/lib/carousel/src/interface.d.ts +16 -0
  38. package/lib/carousel/src/utils/index.js +4 -4
  39. package/lib/carousel/styles/light.d.ts +1 -2
  40. package/lib/carousel/styles/light.js +4 -5
  41. package/lib/chat/src/ChatParts/MainArea.js +8 -5
  42. package/lib/chat/src/styles/index.cssr.js +12 -3
  43. package/lib/chat/styles/light.js +1 -1
  44. package/lib/mapping-card/src/MappingCard.d.ts +9 -0
  45. package/lib/mapping-card/src/MappingCardParts/Header.js +2 -2
  46. package/lib/mapping-card/src/interface.d.ts +5 -0
  47. package/lib/mapping-card/src/interface.js +4 -0
  48. package/lib/version.d.ts +1 -1
  49. package/lib/version.js +1 -1
  50. package/package.json +1 -1
  51. package/web-types.json +8 -1
@@ -36,6 +36,7 @@ export interface MappingCardInterface {
36
36
  defaultSpan?: number;
37
37
  copy?: () => string;
38
38
  hideCopy?: boolean;
39
+ hideHeaderActions?: boolean;
39
40
  copyButtonProps?: Partial<ButtonProps>;
40
41
  copyIconProps?: Partial<IconProps>;
41
42
  headerEditButtonProps?: Partial<ButtonProps>;
@@ -72,6 +73,10 @@ export declare const mappingCardProps: {
72
73
  readonly type: PropType<MappingCardInterface["hideCopy"]>;
73
74
  readonly default: false;
74
75
  };
76
+ readonly hideHeaderActions: {
77
+ readonly type: PropType<MappingCardInterface["hideHeaderActions"]>;
78
+ readonly default: false;
79
+ };
75
80
  readonly copyButtonProps: PropType<MappingCardInterface["copyButtonProps"]>;
76
81
  readonly copyIconProps: PropType<MappingCardInterface["copyIconProps"]>;
77
82
  readonly headerEditButtonProps: PropType<MappingCardInterface["headerEditButtonProps"]>;
@@ -15,6 +15,10 @@ export const mappingCardProps = {
15
15
  type: Boolean,
16
16
  default: false
17
17
  },
18
+ hideHeaderActions: {
19
+ type: Boolean,
20
+ default: false
21
+ },
18
22
  copyButtonProps: Object,
19
23
  copyIconProps: Object,
20
24
  headerEditButtonProps: Object,
package/es/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.14.4";
1
+ declare const _default: "1.14.6";
2
2
  export default _default;
package/es/version.js CHANGED
@@ -1 +1 @@
1
- export default '1.14.4';
1
+ export default '1.14.6';
@@ -1,7 +1,7 @@
1
- import { type PropType, type Ref } from 'vue';
2
- import { type TreeNode } from 'treemate';
1
+ import type { TreeNode } from 'treemate';
2
+ import type { PropType, Ref } from 'vue';
3
3
  import type { SelectOption } from '../../../select/src/interface';
4
- import { type RenderLabelImpl, type RenderOptionImpl } from './interface';
4
+ import type { RenderLabelImpl, RenderOptionImpl } from './interface';
5
5
  declare const _default: import("vue").DefineComponent<{
6
6
  clsPrefix: {
7
7
  type: StringConstructor;
@@ -3,19 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const vue_1 = require("vue");
7
6
  const vooks_1 = require("vooks");
7
+ const vue_1 = require("vue");
8
8
  const _utils_1 = require("../../../_utils");
9
- const icons_1 = require("../../icons");
9
+ const account_option_1 = __importDefault(require("../../account-option"));
10
10
  const icon_1 = require("../../icon");
11
+ const icons_1 = require("../../icons");
11
12
  const interface_1 = require("./interface");
12
- const account_option_1 = __importDefault(require("../../account-option"));
13
13
  function renderCheckMark(show, clsPrefix) {
14
- return ((0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition" }, {
15
- default: () => show ? ((0, vue_1.h)(icon_1.UBaseIcon, { clsPrefix: clsPrefix, class: `${clsPrefix}-base-select-option__check` }, {
16
- default: () => (0, vue_1.h)(icons_1.CheckmarkIcon)
17
- })) : null
18
- }));
14
+ return ((0, vue_1.h)("div", { class: `${clsPrefix}-base-select-option__check-wrapper` },
15
+ (0, vue_1.h)(vue_1.Transition, { name: "fade-in-scale-up-transition" }, {
16
+ default: () => show ? ((0, vue_1.h)(icon_1.UBaseIcon, { clsPrefix: clsPrefix, class: `${clsPrefix}-base-select-option__check` }, {
17
+ default: () => (0, vue_1.h)(icons_1.CheckmarkIcon)
18
+ })) : null
19
+ })));
19
20
  }
20
21
  exports.default = (0, vue_1.defineComponent)({
21
22
  name: 'UBaseSelectOption',
@@ -35,27 +36,31 @@ exports.default = (0, vue_1.defineComponent)({
35
36
  } = (0, vue_1.inject)(interface_1.internalSelectionMenuInjectionKey);
36
37
  const isPendingRef = (0, vooks_1.useMemo)(() => {
37
38
  const { value: pendingTmNode } = pendingTmNodeRef;
38
- if (!pendingTmNode)
39
+ if (!pendingTmNode) {
39
40
  return false;
41
+ }
40
42
  return props.tmNode.key === pendingTmNode.key;
41
43
  });
42
44
  function handleClick(e) {
43
45
  const { tmNode } = props;
44
- if (tmNode.disabled)
46
+ if (tmNode.disabled) {
45
47
  return;
48
+ }
46
49
  handleOptionClick(e, tmNode);
47
50
  }
48
51
  function handleMouseEnter(e) {
49
52
  const { tmNode } = props;
50
- if (tmNode.disabled)
53
+ if (tmNode.disabled) {
51
54
  return;
55
+ }
52
56
  handleOptionMouseEnter(e, tmNode);
53
57
  }
54
58
  function handleMouseMove(e) {
55
59
  const { tmNode } = props;
56
60
  const { value: isPending } = isPendingRef;
57
- if (tmNode.disabled || isPending)
61
+ if (tmNode.disabled || isPending) {
58
62
  return;
63
+ }
59
64
  handleOptionMouseEnter(e, tmNode);
60
65
  }
61
66
  return {
@@ -72,8 +77,9 @@ exports.default = (0, vue_1.defineComponent)({
72
77
  isSelected: (0, vooks_1.useMemo)(() => {
73
78
  const { value } = valueRef;
74
79
  const { value: multiple } = multipleRef;
75
- if (value === null)
80
+ if (value === null) {
76
81
  return false;
82
+ }
77
83
  const optionValue = props.tmNode.rawNode[valueFieldRef.value];
78
84
  if (multiple) {
79
85
  const { value: valueSet } = valueSetRef;
@@ -93,16 +99,13 @@ exports.default = (0, vue_1.defineComponent)({
93
99
  },
94
100
  render() {
95
101
  const { clsPrefix, tmNode: { rawNode }, isSelected, isPending, isGrouped, showCheckmark, nodeProps, renderOption, renderLabel, handleClick, handleMouseEnter, handleMouseMove, account } = this;
96
- const checkmark = renderCheckMark(isSelected, clsPrefix);
102
+ const checkmark = renderCheckMark(showCheckmark && isSelected, clsPrefix);
97
103
  const label = renderLabel
98
104
  ? renderLabel(rawNode, isSelected)
99
105
  : (0, _utils_1.render)(rawNode[this.labelField], rawNode, isSelected);
100
106
  const children = account
101
- ? [
102
- (0, vue_1.h)(account_option_1.default, Object.assign({}, rawNode, { label: label })),
103
- showCheckmark && checkmark
104
- ]
105
- : [label, showCheckmark && checkmark];
107
+ ? [(0, vue_1.h)(account_option_1.default, Object.assign({}, rawNode, { label: label })), checkmark]
108
+ : [label, checkmark];
106
109
  const attrs = nodeProps === null || nodeProps === void 0 ? void 0 : nodeProps(rawNode);
107
110
  const node = ((0, vue_1.h)("div", Object.assign({}, attrs, { class: [
108
111
  `${clsPrefix}-base-select-option`,
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- const cssr_1 = require("../../../../_utils/cssr");
7
6
  const fade_in_scale_up_cssr_1 = require("../../../../_styles/transitions/fade-in-scale-up.cssr");
7
+ const cssr_1 = require("../../../../_utils/cssr");
8
8
  // --u-loading-color
9
9
  // --u-loading-size
10
10
  // --u-option-padding-right
@@ -109,14 +109,15 @@ exports.default = (0, cssr_1.cB)('base-select-menu', `
109
109
  color: var(--u-option-text-color-disabled);
110
110
  `), (0, cssr_1.cM)('selected', `
111
111
  opacity: var(--u-option-opacity-disabled);
112
- `)]), (0, cssr_1.cE)('check', `
113
- font-size: 24px;
112
+ `)]), (0, cssr_1.cE)('check-wrapper', `
114
113
  position: absolute;
115
114
  right: calc(var(--u-option-padding-right) - 4px);
116
115
  top: 50%;
117
116
  transform: translateY(-50%);
117
+ `, [(0, cssr_1.cE)('check', `
118
+ font-size: 24px;
118
119
  color: var(--u-option-check-color);
119
120
  transition: color .3s var(--u-bezier);
120
121
  `, [(0, fade_in_scale_up_cssr_1.fadeInScaleUpTransition)({
121
122
  enterScale: '0.5'
122
- })])])]);
123
+ })])])])]);
@@ -1,6 +1,6 @@
1
- import type { CSSProperties, PropType, Ref, TransitionProps, VNode } from 'vue';
1
+ import type { CSSProperties, PropType, Ref, SlotsType, TransitionProps, VNode } from 'vue';
2
2
  import type { ExtractPublicPropTypes } from '../../_utils';
3
- import type { ArrowScopedSlotProps, DotScopedSlotProps, Size } from './interface';
3
+ import type { ArrowScopedSlotProps, CarouselArrowSlotProps, CarouselDotSlotProps, DotScopedSlotProps, Size } from './interface';
4
4
  declare const transitionProperties: readonly ["transitionDuration", "transitionTimingFunction"];
5
5
  type TransitionStyle = Partial<Pick<CSSProperties, (typeof transitionProperties)[number]>>;
6
6
  export declare const carouselProps: {
@@ -97,6 +97,11 @@ export declare const carouselProps: {
97
97
  }, any>>>;
98
98
  };
99
99
  export type CarouselProps = ExtractPublicPropTypes<typeof carouselProps>;
100
+ export interface CarouselSlots {
101
+ default?: () => VNode[];
102
+ arrow?: (props: CarouselArrowSlotProps) => VNode[];
103
+ dots?: (props: CarouselDotSlotProps) => VNode[];
104
+ }
100
105
  declare const _default: import("vue").DefineComponent<{
101
106
  defaultIndex: {
102
107
  type: NumberConstructor;
@@ -344,5 +349,5 @@ declare const _default: import("vue").DefineComponent<{
344
349
  draggable: boolean;
345
350
  touchable: boolean;
346
351
  mousewheel: boolean;
347
- }, {}>;
352
+ }, SlotsType<CarouselSlots>>;
348
353
  export default _default;
@@ -27,20 +27,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.carouselProps = void 0;
30
- const vue_1 = require("vue");
31
- const vueuc_1 = require("vueuc");
32
- const vooks_1 = require("vooks");
33
30
  const evtd_1 = require("evtd");
34
31
  const seemly_1 = require("seemly");
32
+ const vooks_1 = require("vooks");
33
+ const vue_1 = require("vue");
34
+ const vueuc_1 = require("vueuc");
35
35
  const _mixins_1 = require("../../_mixins");
36
36
  const _utils_1 = require("../../_utils");
37
37
  const styles_1 = require("../styles");
38
- const utils_1 = require("./utils");
38
+ const CarouselArrow_1 = __importDefault(require("./CarouselArrow"));
39
39
  const CarouselContext_1 = require("./CarouselContext");
40
40
  const CarouselDots_1 = __importDefault(require("./CarouselDots"));
41
- const CarouselArrow_1 = __importDefault(require("./CarouselArrow"));
42
41
  const CarouselItem_1 = __importStar(require("./CarouselItem"));
43
42
  const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
43
+ const utils_1 = require("./utils");
44
44
  const transitionProperties = [
45
45
  'transitionDuration',
46
46
  'transitionTimingFunction'
@@ -92,6 +92,7 @@ let globalDragging = false;
92
92
  exports.default = (0, vue_1.defineComponent)({
93
93
  name: 'Carousel',
94
94
  props: exports.carouselProps,
95
+ slots: Object,
95
96
  setup(props) {
96
97
  const { mergedClsPrefixRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
97
98
  // Dom
@@ -119,10 +120,14 @@ exports.default = (0, vue_1.defineComponent)({
119
120
  (props.slidesPerView === 'auto' && props.centeredSlides));
120
121
  // Carousel size
121
122
  const perViewSizeRef = (0, vue_1.ref)({ width: 0, height: 0 });
123
+ const slideSizesTrigger = (0, vue_1.ref)(0);
122
124
  const slideSizesRef = (0, vue_1.computed)(() => {
123
125
  const { value: slidesEls } = slideElsRef;
124
- if (!slidesEls.length)
126
+ if (!slidesEls.length) {
125
127
  return [];
128
+ }
129
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
130
+ slideSizesTrigger.value;
126
131
  const { value: autoSlideSize } = autoSlideSizeRef;
127
132
  if (autoSlideSize) {
128
133
  return slidesEls.map((slide) => (0, utils_1.calculateSize)(slide));
@@ -143,8 +148,9 @@ exports.default = (0, vue_1.defineComponent)({
143
148
  // The translate required to reach each slide
144
149
  const slideTranlatesRef = (0, vue_1.computed)(() => {
145
150
  const { value: slideSizes } = slideSizesRef;
146
- if (!slideSizes.length)
151
+ if (!slideSizes.length) {
147
152
  return [];
153
+ }
148
154
  const { centeredSlides, spaceBetween } = props;
149
155
  const { value: axis } = sizeAxisRef;
150
156
  const { [axis]: perViewSize } = perViewSizeRef.value;
@@ -171,8 +177,9 @@ exports.default = (0, vue_1.defineComponent)({
171
177
  : (0, utils_1.resolveSpeed)(transitionStyleRef.value.transitionDuration));
172
178
  const slideStylesRef = (0, vue_1.computed)(() => {
173
179
  const { value: slidesEls } = slideElsRef;
174
- if (!slidesEls.length)
180
+ if (!slidesEls.length) {
175
181
  return [];
182
+ }
176
183
  const useComputedSize = !(autoSlideSizeRef.value || realSlidesPerViewRef.value === 1);
177
184
  const getSlideSize = (index) => {
178
185
  if (useComputedSize) {
@@ -208,8 +215,9 @@ exports.default = (0, vue_1.defineComponent)({
208
215
  else {
209
216
  const { value: slideSizes } = slideSizesRef;
210
217
  const { length } = slideSizes;
211
- if (!length)
218
+ if (!length) {
212
219
  return totalSlides;
220
+ }
213
221
  const { value: translates } = slideTranlatesRef;
214
222
  const { value: axis } = sizeAxisRef;
215
223
  const perViewSize = perViewSizeRef.value[axis];
@@ -268,6 +276,9 @@ exports.default = (0, vue_1.defineComponent)({
268
276
  function isNextDisabled() {
269
277
  return getRealNextIndex() === null;
270
278
  }
279
+ let inTransition = false;
280
+ let dragging = false;
281
+ let isEffectiveDrag = false;
271
282
  // To
272
283
  function to(index) {
273
284
  const realIndex = (0, utils_1.clampValue)((0, utils_1.getRealIndex)(index, duplicatedableRef.value), 0, totalViewRef.value);
@@ -278,24 +289,27 @@ exports.default = (0, vue_1.defineComponent)({
278
289
  }
279
290
  function prev() {
280
291
  const prevIndex = getRealPrevIndex();
281
- if (prevIndex !== null)
292
+ if (prevIndex !== null) {
282
293
  toRealIndex(prevIndex);
294
+ }
283
295
  }
284
296
  function next() {
285
297
  const nextIndex = getRealNextIndex();
286
- if (nextIndex !== null)
298
+ if (nextIndex !== null) {
287
299
  toRealIndex(nextIndex);
300
+ }
288
301
  }
289
302
  function prevIfSlideTransitionEnd() {
290
- if (!inTransition || !duplicatedableRef.value)
303
+ if (!inTransition || !duplicatedableRef.value) {
291
304
  prev();
305
+ }
292
306
  }
293
307
  function nextIfSlideTransitionEnd() {
294
- if (!inTransition || !duplicatedableRef.value)
308
+ if (!inTransition || !duplicatedableRef.value) {
295
309
  next();
310
+ }
296
311
  }
297
312
  // Translate to
298
- let inTransition = false;
299
313
  // record the translate of each slide, so that it can be restored at touch
300
314
  let previousTranslate = 0;
301
315
  const translateStyleRef = (0, vue_1.ref)({});
@@ -380,13 +394,15 @@ exports.default = (0, vue_1.defineComponent)({
380
394
  };
381
395
  (0, CarouselContext_1.provideCarouselContext)(carouselContext);
382
396
  function addSlide(slide) {
383
- if (!slide)
397
+ if (!slide) {
384
398
  return;
399
+ }
385
400
  slideElsRef.value.push(slide);
386
401
  }
387
402
  function removeSlide(slide) {
388
- if (!slide)
403
+ if (!slide) {
389
404
  return;
405
+ }
390
406
  const index = getSlideIndex(slide);
391
407
  if (index !== -1) {
392
408
  slideElsRef.value.splice(index, 1);
@@ -445,12 +461,11 @@ exports.default = (0, vue_1.defineComponent)({
445
461
  let dragStartY = 0;
446
462
  let dragOffset = 0;
447
463
  let dragStartTime = 0;
448
- let dragging = false;
449
- let isEffectiveDrag = false;
450
464
  function handleTouchstart(event) {
451
465
  var _a;
452
- if (globalDragging)
466
+ if (globalDragging) {
453
467
  return;
468
+ }
454
469
  if (!((_a = slidesElRef.value) === null || _a === void 0 ? void 0 : _a.contains((0, seemly_1.getPreciseEventTarget)(event)))) {
455
470
  return;
456
471
  }
@@ -574,8 +589,9 @@ exports.default = (0, vue_1.defineComponent)({
574
589
  }
575
590
  function handleMousewheel(event) {
576
591
  event.preventDefault();
577
- if (inTransition)
592
+ if (inTransition) {
578
593
  return;
594
+ }
579
595
  let { deltaX, deltaY } = event;
580
596
  if (event.shiftKey && !deltaX) {
581
597
  deltaX = deltaY;
@@ -606,10 +622,8 @@ exports.default = (0, vue_1.defineComponent)({
606
622
  resetAutoplay();
607
623
  }
608
624
  function handleSlideResize() {
609
- var _a, _b;
610
625
  if (autoSlideSizeRef.value) {
611
- (_b = (_a = slideSizesRef.effect).scheduler) === null || _b === void 0 ? void 0 : _b.call(_a);
612
- slideSizesRef.effect.run();
626
+ slideSizesTrigger.value++;
613
627
  }
614
628
  }
615
629
  function handleMouseenter() {
@@ -651,8 +665,9 @@ exports.default = (0, vue_1.defineComponent)({
651
665
  }
652
666
  });
653
667
  (0, vue_1.watch)(realIndexRef, (realIndex, lastRealIndex) => {
654
- if (realIndex === lastRealIndex)
668
+ if (realIndex === lastRealIndex) {
655
669
  return;
670
+ }
656
671
  resetAutoplay();
657
672
  if (sequenceLayoutRef.value) {
658
673
  if (duplicatedableRef.value && displayTotalViewRef.value > 2) {
@@ -701,9 +716,10 @@ exports.default = (0, vue_1.defineComponent)({
701
716
  'next',
702
717
  'isPrevDisabled',
703
718
  'isNextDisabled'
704
- ])), { total: displayTotalViewRef.value, currentIndex: mergedDisplayIndexRef.value })));
719
+ ])), { total: displayTotalViewRef.value, current: mergedDisplayIndexRef.value, currentIndex: mergedDisplayIndexRef.value })));
705
720
  const dotSlotPropsRef = (0, vue_1.computed)(() => ({
706
721
  total: displayTotalViewRef.value,
722
+ current: mergedDisplayIndexRef.value,
707
723
  currentIndex: mergedDisplayIndexRef.value,
708
724
  to: carouselContext.to
709
725
  }));
@@ -17,5 +17,5 @@ export interface CarouselContextValue {
17
17
  removeSlide: (slide?: HTMLElement) => void;
18
18
  onCarouselItemClick: (index: number, event: MouseEvent) => void;
19
19
  }
20
- export declare const provideCarouselContext: (contextValue: CarouselContextValue) => void;
21
- export declare const useCarouselContext: (location?: string, component?: string) => CarouselContextValue;
20
+ export declare function provideCarouselContext(contextValue: CarouselContextValue): void;
21
+ export declare function useCarouselContext(location?: string, component?: string): CarouselContextValue;
@@ -1,18 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useCarouselContext = exports.provideCarouselContext = void 0;
3
+ exports.provideCarouselContext = provideCarouselContext;
4
+ exports.useCarouselContext = useCarouselContext;
4
5
  const vue_1 = require("vue");
5
6
  const _utils_1 = require("../../_utils");
6
7
  const carouselMethodsInjectionKey = (0, _utils_1.createInjectionKey)('u-carousel-methods');
7
- const provideCarouselContext = (contextValue) => {
8
+ function provideCarouselContext(contextValue) {
8
9
  (0, vue_1.provide)(carouselMethodsInjectionKey, contextValue);
9
- };
10
- exports.provideCarouselContext = provideCarouselContext;
11
- const useCarouselContext = (location = 'unknown', component = 'component') => {
10
+ }
11
+ function useCarouselContext(location = 'unknown', component = 'component') {
12
12
  const CarouselContext = (0, vue_1.inject)(carouselMethodsInjectionKey);
13
13
  if (!CarouselContext) {
14
14
  (0, _utils_1.throwError)(location, `\`${component}\` must be placed inside \`u-carousel\`.`);
15
15
  }
16
16
  return CarouselContext;
17
- };
18
- exports.useCarouselContext = useCarouselContext;
17
+ }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const vue_1 = require("vue");
4
3
  const seemly_1 = require("seemly");
4
+ const vue_1 = require("vue");
5
5
  const _mixins_1 = require("../../_mixins");
6
6
  const CarouselContext_1 = require("./CarouselContext");
7
7
  const carouselDotsProps = {
@@ -1,5 +1,5 @@
1
1
  import type { VNode } from 'vue';
2
- export declare const isCarouselItem: (child: VNode) => boolean;
2
+ export declare function isCarouselItem(child: VNode): boolean;
3
3
  declare const _default: import("vue").DefineComponent<{}, {
4
4
  mergedClsPrefix: import("vue").Ref<string>;
5
5
  selfElRef: import("vue").Ref<HTMLElement | undefined>;
@@ -1,18 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isCarouselItem = void 0;
3
+ exports.isCarouselItem = isCarouselItem;
4
+ const lodash_es_1 = require("lodash-es");
4
5
  const vue_1 = require("vue");
5
- const lodash_1 = require("lodash");
6
6
  const _mixins_1 = require("../../_mixins");
7
7
  const CarouselContext_1 = require("./CarouselContext");
8
8
  const CarouselItemName = 'CarouselItem';
9
- const isCarouselItem = (child) => { var _a; return ((_a = child.type) === null || _a === void 0 ? void 0 : _a.name) === CarouselItemName; };
10
- exports.isCarouselItem = isCarouselItem;
9
+ function isCarouselItem(child) {
10
+ var _a;
11
+ return ((_a = child.type) === null || _a === void 0 ? void 0 : _a.name) === CarouselItemName;
12
+ }
11
13
  exports.default = (0, vue_1.defineComponent)({
12
14
  name: CarouselItemName,
13
15
  setup(props) {
14
16
  const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
15
- const UCarousel = (0, CarouselContext_1.useCarouselContext)((0, lodash_1.camelCase)(CarouselItemName), `u-${(0, lodash_1.camelCase)(CarouselItemName)}`);
17
+ const UCarousel = (0, CarouselContext_1.useCarouselContext)((0, lodash_es_1.camelCase)(CarouselItemName), `u-${(0, lodash_es_1.camelCase)(CarouselItemName)}`);
16
18
  const selfElRef = (0, vue_1.ref)();
17
19
  const indexRef = (0, vue_1.computed)(() => {
18
20
  const { value: selfEl } = selfElRef;
@@ -7,13 +7,29 @@ export interface CarouselInst {
7
7
  }
8
8
  export interface ArrowScopedSlotProps extends Pick<CarouselContextValue, 'to' | 'prev' | 'next' | 'isPrevDisabled' | 'isNextDisabled'> {
9
9
  total: number;
10
+ current: number;
10
11
  currentIndex: number;
11
12
  }
12
13
  export interface DotScopedSlotProps extends Pick<CarouselContextValue, 'to'> {
13
14
  total: number;
15
+ current: number;
14
16
  currentIndex: number;
15
17
  }
16
18
  export interface Size {
17
19
  width: number;
18
20
  height: number;
19
21
  }
22
+ export interface CarouselArrowSlotProps {
23
+ total: number;
24
+ current: number;
25
+ currentIndex: number;
26
+ to: (index: number) => void;
27
+ prev: () => void;
28
+ next: () => void;
29
+ }
30
+ export interface CarouselDotSlotProps {
31
+ total: number;
32
+ current: number;
33
+ currentIndex: number;
34
+ to: (index: number) => void;
35
+ }
@@ -25,12 +25,12 @@ function calculateSize(element, innerOnly) {
25
25
  const style = getComputedStyle(element);
26
26
  width =
27
27
  width -
28
- parseFloat(style.getPropertyValue('padding-left')) -
29
- parseFloat(style.getPropertyValue('padding-right'));
28
+ Number.parseFloat(style.getPropertyValue('padding-left')) -
29
+ Number.parseFloat(style.getPropertyValue('padding-right'));
30
30
  height =
31
31
  height -
32
- parseFloat(style.getPropertyValue('padding-top')) -
33
- parseFloat(style.getPropertyValue('padding-bottom'));
32
+ Number.parseFloat(style.getPropertyValue('padding-top')) -
33
+ Number.parseFloat(style.getPropertyValue('padding-bottom'));
34
34
  }
35
35
  return { width, height };
36
36
  }
@@ -1,6 +1,5 @@
1
- import type { ThemeCommonVars } from '../../_styles/common';
2
1
  import type { Theme } from '../../_mixins';
3
- export declare const self: (vars: ThemeCommonVars) => {
2
+ export declare function self(): {
4
3
  dotSize: string;
5
4
  dotColor: string;
6
5
  dotColorActive: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.self = void 0;
3
+ exports.self = self;
4
4
  const common_1 = require("../../_styles/common");
5
- const self = (vars) => {
5
+ function self() {
6
6
  return {
7
7
  dotSize: '8px',
8
8
  dotColor: 'rgba(255, 255, 255, .3)',
@@ -12,11 +12,10 @@ const self = (vars) => {
12
12
  dotLineWidthActive: '24px',
13
13
  arrowColor: '#eee'
14
14
  };
15
- };
16
- exports.self = self;
15
+ }
17
16
  const carouselLight = {
18
17
  name: 'Carousel',
19
18
  common: common_1.commonLight,
20
- self: exports.self
19
+ self
21
20
  };
22
21
  exports.default = carouselLight;
@@ -273,14 +273,14 @@ exports.default = (0, vue_1.defineComponent)({
273
273
  if (isSending.value) {
274
274
  return;
275
275
  }
276
- const hasContent = inputValue.value.trim();
276
+ const hasContent = inputValue.value;
277
277
  const hasAttachments = attachmentFileList.value.length > 0;
278
278
  if ((editMessageIdRef === null || editMessageIdRef === void 0 ? void 0 : editMessageIdRef.value) && hasContent) {
279
279
  isSending.value = true;
280
280
  try {
281
281
  const messageToEdit = editingMessage.value;
282
282
  if (messageToEdit) {
283
- const updatedMessage = Object.assign(Object.assign({}, messageToEdit), { content: inputValue.value.trim() });
283
+ const updatedMessage = Object.assign(Object.assign({}, messageToEdit), { content: inputValue.value });
284
284
  const bubbleActions = bubbleActionsRef === null || bubbleActionsRef === void 0 ? void 0 : bubbleActionsRef.value;
285
285
  if (bubbleActions) {
286
286
  const editAction = bubbleActions.find((action) => action.key === interface_1.ChatBubbleActionKey.EDIT);
@@ -330,7 +330,7 @@ exports.default = (0, vue_1.defineComponent)({
330
330
  };
331
331
  })
332
332
  : undefined;
333
- handleMessageSend(inputValue.value.trim(), attachments);
333
+ handleMessageSend(inputValue.value, attachments);
334
334
  inputValue.value = '';
335
335
  attachmentFileList.value = [];
336
336
  chatInputs.value[selectedChatRef.value.id] = '';
@@ -413,7 +413,10 @@ exports.default = (0, vue_1.defineComponent)({
413
413
  }));
414
414
  }
415
415
  }),
416
- (0, vue_1.h)(input_1.UInput, Object.assign({ ref: "inputRef", value: inputValue.value, placeholder: inputPlaceholderRef.value, class: `${mergedClsPrefixRef.value}-chat-main__input` }, footerInputPropsRef.value, { theme: mergedThemeRef.value.peers.Input, themeOverrides: mergedThemeRef.value.peerOverrides.Input, onUpdateValue: (value) => {
416
+ (0, vue_1.h)(input_1.UInput, Object.assign({ ref: "inputRef", value: inputValue.value, placeholder: inputPlaceholderRef.value, class: `${mergedClsPrefixRef.value}-chat-main__input`, theme: mergedThemeRef.value.peers.Input, themeOverrides: mergedThemeRef.value.peerOverrides.Input, type: "textarea", autosize: {
417
+ minRows: 1,
418
+ maxRows: 5
419
+ }, onUpdateValue: (value) => {
417
420
  inputValue.value = value;
418
421
  if (selectedChatRef.value) {
419
422
  chatInputs.value[selectedChatRef.value.id] = value;
@@ -424,7 +427,7 @@ exports.default = (0, vue_1.defineComponent)({
424
427
  e.stopPropagation();
425
428
  void handleSendMessage();
426
429
  }
427
- } }), {
430
+ } }, footerInputPropsRef.value), {
428
431
  prefix: () => renderEditingBlock(),
429
432
  suffix: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 24, class: `${mergedClsPrefixRef.value}-chat-main__input-suffix` }, footerSuffixIconPropsRef.value, { theme: mergedThemeRef.value.peers.FooterSuffixIcon, themeOverrides: mergedThemeRef.value.peerOverrides
430
433
  .FooterSuffixIcon, onClick: () => {