@uzum-tech/ui 1.9.1 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5316 -804
- package/dist/index.prod.js +12 -3
- package/es/_internal/scrollbar/src/Scrollbar.js +19 -38
- package/es/auto-complete/src/AutoComplete.d.ts +1 -1
- package/es/cascader/src/Cascader.d.ts +1 -1
- package/es/chat/src/ChatListItems.js +16 -1
- package/es/chat/src/ChatParts/MainArea.js +31 -21
- package/es/components.d.ts +2 -0
- package/es/components.js +2 -0
- package/es/config-provider/src/internal-interface.d.ts +4 -0
- package/es/crop/index.d.ts +3 -0
- package/es/crop/index.js +1 -0
- package/es/crop/src/Crop.d.ts +222 -0
- package/es/crop/src/Crop.js +157 -0
- package/es/crop/src/interface.d.ts +6 -0
- package/es/crop/src/interface.js +7 -0
- package/es/crop/src/styles/index.cssr.d.ts +2 -0
- package/es/crop/src/styles/index.cssr.js +333 -0
- package/es/crop/styles/_common.d.ts +4 -0
- package/es/crop/styles/_common.js +3 -0
- package/es/crop/styles/dark.d.ts +3 -0
- package/es/crop/styles/dark.js +9 -0
- package/es/crop/styles/index.d.ts +3 -0
- package/es/crop/styles/index.js +2 -0
- package/es/crop/styles/light.d.ts +14 -0
- package/es/crop/styles/light.js +14 -0
- package/es/date-picker/src/panel/panelMonth.d.ts +1 -1
- package/es/date-picker/src/panel/panelYear.d.ts +1 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +30 -0
- package/es/dynamic-tags/styles/light.d.ts +3 -0
- package/es/infinite-scroll/src/InfiniteScroll.d.ts +16 -0
- package/es/infinite-scroll/src/InfiniteScroll.js +45 -12
- package/es/input/src/Input.d.ts +1 -1
- package/es/input-number/src/InputNumber.d.ts +1 -1
- package/es/legacy-transfer/src/Transfer.d.ts +1 -1
- package/es/modal-fullscreen/index.d.ts +2 -0
- package/es/modal-fullscreen/index.js +1 -0
- package/es/modal-fullscreen/src/ModalFull.d.ts +953 -0
- package/es/modal-fullscreen/src/ModalFull.js +250 -0
- package/es/modal-fullscreen/src/interface.d.ts +0 -0
- package/es/modal-fullscreen/src/interface.js +1 -0
- package/es/modal-fullscreen/src/styles/index.cssr.d.ts +2 -0
- package/es/modal-fullscreen/src/styles/index.cssr.js +85 -0
- package/es/modal-fullscreen/styles/_common.d.ts +12 -0
- package/es/modal-fullscreen/styles/_common.js +11 -0
- package/es/modal-fullscreen/styles/dark.d.ts +3 -0
- package/es/modal-fullscreen/styles/dark.js +14 -0
- package/es/modal-fullscreen/styles/index.d.ts +3 -0
- package/es/modal-fullscreen/styles/index.js +2 -0
- package/es/modal-fullscreen/styles/light.d.ts +100 -0
- package/es/modal-fullscreen/styles/light.js +19 -0
- package/es/rate/src/Rate.d.ts +1 -1
- package/es/select/src/Select.d.ts +1 -1
- package/es/slider/src/Slider.d.ts +1 -1
- package/es/switch/src/Switch.d.ts +1 -1
- package/es/tag/index.d.ts +2 -0
- package/es/tag/index.js +1 -0
- package/es/tag/src/Tag.d.ts +40 -0
- package/es/tag/src/Tag.js +3 -0
- package/es/tag/src/TagGroup.d.ts +644 -0
- package/es/tag/src/TagGroup.js +109 -0
- package/es/tag/src/styles/index.cssr.d.ts +1 -0
- package/es/tag/src/styles/index.cssr.js +8 -1
- package/es/tag/styles/light.d.ts +3 -0
- package/es/tag/styles/light.js +5 -0
- package/es/themes/dark.js +5 -1
- package/es/themes/light.js +5 -1
- package/es/time-picker/src/TimePicker.d.ts +1 -1
- package/es/transfer/src/Transfer.d.ts +1 -1
- package/es/tree-select/src/TreeSelect.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/es/virtual-list/index.d.ts +1 -1
- package/es/virtual-list/index.js +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.js +19 -38
- package/lib/auto-complete/src/AutoComplete.d.ts +1 -1
- package/lib/cascader/src/Cascader.d.ts +1 -1
- package/lib/chat/src/ChatListItems.js +16 -1
- package/lib/chat/src/ChatParts/MainArea.js +31 -21
- package/lib/components.d.ts +2 -0
- package/lib/components.js +2 -0
- package/lib/config-provider/src/internal-interface.d.ts +4 -0
- package/lib/crop/index.d.ts +3 -0
- package/lib/crop/index.js +9 -0
- package/lib/crop/src/Crop.d.ts +222 -0
- package/lib/crop/src/Crop.js +163 -0
- package/lib/crop/src/interface.d.ts +6 -0
- package/lib/crop/src/interface.js +10 -0
- package/lib/crop/src/styles/index.cssr.d.ts +2 -0
- package/lib/crop/src/styles/index.cssr.js +338 -0
- package/lib/crop/styles/_common.d.ts +4 -0
- package/lib/crop/styles/_common.js +5 -0
- package/lib/crop/styles/dark.d.ts +3 -0
- package/lib/crop/styles/dark.js +11 -0
- package/lib/crop/styles/index.d.ts +3 -0
- package/lib/crop/styles/index.js +10 -0
- package/lib/crop/styles/light.d.ts +14 -0
- package/lib/crop/styles/light.js +21 -0
- package/lib/date-picker/src/panel/panelMonth.d.ts +1 -1
- package/lib/date-picker/src/panel/panelYear.d.ts +1 -1
- package/lib/dynamic-tags/src/DynamicTags.d.ts +30 -0
- package/lib/dynamic-tags/styles/light.d.ts +3 -0
- package/lib/infinite-scroll/src/InfiniteScroll.d.ts +16 -0
- package/lib/infinite-scroll/src/InfiniteScroll.js +44 -11
- package/lib/input/src/Input.d.ts +1 -1
- package/lib/input-number/src/InputNumber.d.ts +1 -1
- package/lib/legacy-transfer/src/Transfer.d.ts +1 -1
- package/lib/modal-fullscreen/index.d.ts +2 -0
- package/lib/modal-fullscreen/index.js +9 -0
- package/lib/modal-fullscreen/src/ModalFull.d.ts +953 -0
- package/lib/modal-fullscreen/src/ModalFull.js +256 -0
- package/lib/modal-fullscreen/src/interface.d.ts +0 -0
- package/lib/modal-fullscreen/src/interface.js +1 -0
- package/lib/modal-fullscreen/src/styles/index.cssr.d.ts +2 -0
- package/lib/modal-fullscreen/src/styles/index.cssr.js +90 -0
- package/lib/modal-fullscreen/styles/_common.d.ts +12 -0
- package/lib/modal-fullscreen/styles/_common.js +13 -0
- package/lib/modal-fullscreen/styles/dark.d.ts +3 -0
- package/lib/modal-fullscreen/styles/dark.js +16 -0
- package/lib/modal-fullscreen/styles/index.d.ts +3 -0
- package/lib/modal-fullscreen/styles/index.js +10 -0
- package/lib/modal-fullscreen/styles/light.d.ts +100 -0
- package/lib/modal-fullscreen/styles/light.js +26 -0
- package/lib/rate/src/Rate.d.ts +1 -1
- package/lib/select/src/Select.d.ts +1 -1
- package/lib/slider/src/Slider.d.ts +1 -1
- package/lib/switch/src/Switch.d.ts +1 -1
- package/lib/tag/index.d.ts +2 -0
- package/lib/tag/index.js +3 -1
- package/lib/tag/src/Tag.d.ts +40 -0
- package/lib/tag/src/Tag.js +3 -0
- package/lib/tag/src/TagGroup.d.ts +644 -0
- package/lib/tag/src/TagGroup.js +112 -0
- package/lib/tag/src/styles/index.cssr.d.ts +1 -0
- package/lib/tag/src/styles/index.cssr.js +9 -1
- package/lib/tag/styles/light.d.ts +3 -0
- package/lib/tag/styles/light.js +5 -0
- package/lib/themes/dark.js +5 -1
- package/lib/themes/light.js +5 -1
- package/lib/time-picker/src/TimePicker.d.ts +1 -1
- package/lib/transfer/src/Transfer.d.ts +1 -1
- package/lib/tree-select/src/TreeSelect.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/index.d.ts +1 -1
- package/lib/virtual-list/index.js +2 -2
- package/package.json +7 -6
- package/volar.d.ts +4 -0
- package/web-types.json +387 -1
|
@@ -105,9 +105,8 @@ const Scrollbar = defineComponent({
|
|
|
105
105
|
}
|
|
106
106
|
else {
|
|
107
107
|
const heightDiff = contentHeight - containerHeight;
|
|
108
|
-
if (!heightDiff)
|
|
108
|
+
if (!heightDiff)
|
|
109
109
|
return 0;
|
|
110
|
-
}
|
|
111
110
|
return ((containerScrollTop / heightDiff) * (yRailSize - yBarSizeRef.value));
|
|
112
111
|
}
|
|
113
112
|
});
|
|
@@ -126,9 +125,8 @@ const Scrollbar = defineComponent({
|
|
|
126
125
|
}
|
|
127
126
|
else {
|
|
128
127
|
const widthDiff = contentWidth - containerWidth;
|
|
129
|
-
if (!widthDiff)
|
|
128
|
+
if (!widthDiff)
|
|
130
129
|
return 0;
|
|
131
|
-
}
|
|
132
130
|
return ((containerScrollLeft / widthDiff) * (xRailSize - xBarSizeRef.value));
|
|
133
131
|
}
|
|
134
132
|
});
|
|
@@ -159,22 +157,19 @@ const Scrollbar = defineComponent({
|
|
|
159
157
|
});
|
|
160
158
|
const mergedContainerRef = computed(() => {
|
|
161
159
|
const { container } = props;
|
|
162
|
-
if (container)
|
|
160
|
+
if (container)
|
|
163
161
|
return container();
|
|
164
|
-
}
|
|
165
162
|
return containerRef.value;
|
|
166
163
|
});
|
|
167
164
|
const mergedContentRef = computed(() => {
|
|
168
165
|
const { content } = props;
|
|
169
|
-
if (content)
|
|
166
|
+
if (content)
|
|
170
167
|
return content();
|
|
171
|
-
}
|
|
172
168
|
return contentRef.value;
|
|
173
169
|
});
|
|
174
170
|
const scrollTo = (options, y) => {
|
|
175
|
-
if (!props.scrollable)
|
|
171
|
+
if (!props.scrollable)
|
|
176
172
|
return;
|
|
177
|
-
}
|
|
178
173
|
if (typeof options === 'number') {
|
|
179
174
|
scrollToPosition(options, y !== null && y !== void 0 ? y : 0, 0, false, 'auto');
|
|
180
175
|
return;
|
|
@@ -208,15 +203,13 @@ const Scrollbar = defineComponent({
|
|
|
208
203
|
});
|
|
209
204
|
// methods
|
|
210
205
|
const handleContentResize = () => {
|
|
211
|
-
if (activateState.isDeactivated)
|
|
206
|
+
if (activateState.isDeactivated)
|
|
212
207
|
return;
|
|
213
|
-
}
|
|
214
208
|
sync();
|
|
215
209
|
};
|
|
216
210
|
const handleContainerResize = (e) => {
|
|
217
|
-
if (activateState.isDeactivated)
|
|
211
|
+
if (activateState.isDeactivated)
|
|
218
212
|
return;
|
|
219
|
-
}
|
|
220
213
|
const { onResize } = props;
|
|
221
214
|
if (onResize) {
|
|
222
215
|
onResize(e);
|
|
@@ -224,13 +217,11 @@ const Scrollbar = defineComponent({
|
|
|
224
217
|
sync();
|
|
225
218
|
};
|
|
226
219
|
const scrollBy = (options, y) => {
|
|
227
|
-
if (!props.scrollable)
|
|
220
|
+
if (!props.scrollable)
|
|
228
221
|
return;
|
|
229
|
-
}
|
|
230
222
|
const { value: container } = mergedContainerRef;
|
|
231
|
-
if (!container)
|
|
223
|
+
if (!container)
|
|
232
224
|
return;
|
|
233
|
-
}
|
|
234
225
|
if (typeof options === 'object') {
|
|
235
226
|
container.scrollBy(options);
|
|
236
227
|
}
|
|
@@ -240,9 +231,8 @@ const Scrollbar = defineComponent({
|
|
|
240
231
|
};
|
|
241
232
|
function scrollToPosition(left, top, elSize, debounce, behavior) {
|
|
242
233
|
const { value: container } = mergedContainerRef;
|
|
243
|
-
if (!container)
|
|
234
|
+
if (!container)
|
|
244
235
|
return;
|
|
245
|
-
}
|
|
246
236
|
if (debounce) {
|
|
247
237
|
const { scrollTop, offsetHeight } = container;
|
|
248
238
|
if (top > scrollTop) {
|
|
@@ -307,9 +297,8 @@ const Scrollbar = defineComponent({
|
|
|
307
297
|
}
|
|
308
298
|
function handleScroll(e) {
|
|
309
299
|
const { onScroll } = props;
|
|
310
|
-
if (onScroll)
|
|
300
|
+
if (onScroll)
|
|
311
301
|
onScroll(e);
|
|
312
|
-
}
|
|
313
302
|
syncScrollState();
|
|
314
303
|
}
|
|
315
304
|
function syncScrollState() {
|
|
@@ -368,9 +357,8 @@ const Scrollbar = defineComponent({
|
|
|
368
357
|
}
|
|
369
358
|
}
|
|
370
359
|
function sync() {
|
|
371
|
-
if (!props.scrollable)
|
|
360
|
+
if (!props.scrollable)
|
|
372
361
|
return;
|
|
373
|
-
}
|
|
374
362
|
if (props.useUnifiedContainer) {
|
|
375
363
|
syncUnifiedContainer();
|
|
376
364
|
}
|
|
@@ -395,9 +383,8 @@ const Scrollbar = defineComponent({
|
|
|
395
383
|
: e.clientX;
|
|
396
384
|
}
|
|
397
385
|
function handleXScrollMouseMove(e) {
|
|
398
|
-
if (!xBarPressed)
|
|
386
|
+
if (!xBarPressed)
|
|
399
387
|
return;
|
|
400
|
-
}
|
|
401
388
|
if (xBarVanishTimerId !== undefined) {
|
|
402
389
|
window.clearTimeout(xBarVanishTimerId);
|
|
403
390
|
}
|
|
@@ -407,9 +394,8 @@ const Scrollbar = defineComponent({
|
|
|
407
394
|
const { value: containerWidth } = containerWidthRef;
|
|
408
395
|
const { value: contentWidth } = contentWidthRef;
|
|
409
396
|
const { value: xBarSize } = xBarSizeRef;
|
|
410
|
-
if (containerWidth === null || contentWidth === null)
|
|
397
|
+
if (containerWidth === null || contentWidth === null)
|
|
411
398
|
return;
|
|
412
|
-
}
|
|
413
399
|
const dX = (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value)
|
|
414
400
|
? window.innerWidth - e.clientX - memoMouseX
|
|
415
401
|
: e.clientX - memoMouseX;
|
|
@@ -422,9 +408,8 @@ const Scrollbar = defineComponent({
|
|
|
422
408
|
if (container) {
|
|
423
409
|
container.scrollLeft = toScrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1);
|
|
424
410
|
const { internalOnUpdateScrollLeft } = props;
|
|
425
|
-
if (internalOnUpdateScrollLeft)
|
|
411
|
+
if (internalOnUpdateScrollLeft)
|
|
426
412
|
internalOnUpdateScrollLeft(toScrollLeft);
|
|
427
|
-
}
|
|
428
413
|
}
|
|
429
414
|
}
|
|
430
415
|
function handleXScrollMouseUp(e) {
|
|
@@ -448,9 +433,8 @@ const Scrollbar = defineComponent({
|
|
|
448
433
|
memoMouseY = e.clientY;
|
|
449
434
|
}
|
|
450
435
|
function handleYScrollMouseMove(e) {
|
|
451
|
-
if (!yBarPressed)
|
|
436
|
+
if (!yBarPressed)
|
|
452
437
|
return;
|
|
453
|
-
}
|
|
454
438
|
if (xBarVanishTimerId !== undefined) {
|
|
455
439
|
window.clearTimeout(xBarVanishTimerId);
|
|
456
440
|
}
|
|
@@ -460,9 +444,8 @@ const Scrollbar = defineComponent({
|
|
|
460
444
|
const { value: containerHeight } = containerHeightRef;
|
|
461
445
|
const { value: contentHeight } = contentHeightRef;
|
|
462
446
|
const { value: yBarSize } = yBarSizeRef;
|
|
463
|
-
if (containerHeight === null || contentHeight === null)
|
|
447
|
+
if (containerHeight === null || contentHeight === null)
|
|
464
448
|
return;
|
|
465
|
-
}
|
|
466
449
|
const dY = e.clientY - memoMouseY;
|
|
467
450
|
const dScrollTop = (dY * (contentHeight - containerHeight)) / (containerHeight - yBarSize);
|
|
468
451
|
const toScrollTopUpperBound = contentHeight - containerHeight;
|
|
@@ -517,9 +500,8 @@ const Scrollbar = defineComponent({
|
|
|
517
500
|
// if you pass inner to scrollbar, you may use a ref inside component
|
|
518
501
|
// however, when scrollbar is mounted, ref is not ready at component
|
|
519
502
|
// you need to init by yourself
|
|
520
|
-
if (props.container)
|
|
503
|
+
if (props.container)
|
|
521
504
|
return;
|
|
522
|
-
}
|
|
523
505
|
sync();
|
|
524
506
|
});
|
|
525
507
|
onBeforeUnmount(() => {
|
|
@@ -593,9 +575,8 @@ const Scrollbar = defineComponent({
|
|
|
593
575
|
render() {
|
|
594
576
|
var _a;
|
|
595
577
|
const { $slots, mergedClsPrefix, triggerDisplayManually, rtlEnabled, internalHoistYRail, yPlacement, xPlacement, xScrollable } = this;
|
|
596
|
-
if (!this.scrollable)
|
|
578
|
+
if (!this.scrollable)
|
|
597
579
|
return (_a = $slots.default) === null || _a === void 0 ? void 0 : _a.call($slots);
|
|
598
|
-
}
|
|
599
580
|
const triggerIsNone = this.trigger === 'none';
|
|
600
581
|
const createYRail = (className, style) => {
|
|
601
582
|
return (h("div", { ref: "yRailRef", class: [
|
|
@@ -1610,8 +1610,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1610
1610
|
readonly to: string | boolean | HTMLElement;
|
|
1611
1611
|
readonly resetMenuOnOptionsChange: boolean;
|
|
1612
1612
|
readonly placement: FollowerPlacement;
|
|
1613
|
-
readonly clearable: boolean;
|
|
1614
1613
|
readonly defaultValue: string | null;
|
|
1614
|
+
readonly clearable: boolean;
|
|
1615
1615
|
readonly options: AutoCompleteOptions;
|
|
1616
1616
|
readonly blurAfterSelect: boolean;
|
|
1617
1617
|
readonly clearAfterSelect: boolean;
|
|
@@ -3364,9 +3364,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3364
3364
|
readonly virtualScroll: boolean;
|
|
3365
3365
|
readonly valueField: string;
|
|
3366
3366
|
readonly placement: FollowerPlacement;
|
|
3367
|
+
readonly defaultValue: Value | null;
|
|
3367
3368
|
readonly filterable: boolean;
|
|
3368
3369
|
readonly clearable: boolean;
|
|
3369
|
-
readonly defaultValue: Value | null;
|
|
3370
3370
|
readonly options: CascaderOption[];
|
|
3371
3371
|
readonly clearFilterAfterSelect: boolean;
|
|
3372
3372
|
readonly remote: boolean;
|
|
@@ -90,11 +90,26 @@ export default defineComponent({
|
|
|
90
90
|
var _a;
|
|
91
91
|
(_a = props.onChatSelect) === null || _a === void 0 ? void 0 : _a.call(props, chatId);
|
|
92
92
|
};
|
|
93
|
+
const toKeyString = (value) => {
|
|
94
|
+
if (typeof value === 'symbol')
|
|
95
|
+
return value.toString();
|
|
96
|
+
if (typeof value === 'function') {
|
|
97
|
+
const result = value();
|
|
98
|
+
return typeof result === 'string' || typeof result === 'number'
|
|
99
|
+
? String(result)
|
|
100
|
+
: '';
|
|
101
|
+
}
|
|
102
|
+
return value != null ? String(value) : '';
|
|
103
|
+
};
|
|
93
104
|
const renderChatItem = (item) => {
|
|
94
105
|
var _a, _b;
|
|
95
106
|
const isSelected = props.selectedChatId === item.id;
|
|
96
107
|
const isTyping = (_b = (_a = props.typingChatIds) === null || _a === void 0 ? void 0 : _a.includes(item.id)) !== null && _b !== void 0 ? _b : false;
|
|
97
|
-
|
|
108
|
+
const { id, title, subtitle } = item;
|
|
109
|
+
const keyId = toKeyString(id);
|
|
110
|
+
const keyTitle = toKeyString(title);
|
|
111
|
+
const keySubtitle = toKeyString(subtitle);
|
|
112
|
+
return (h(UListItem, { key: `${keyId}-${keyTitle}-${keySubtitle}`, showIcon: false, onClick: () => {
|
|
98
113
|
handleChatSelect(item.id);
|
|
99
114
|
}, class: [
|
|
100
115
|
`${mergedClsPrefixRef.value}-chat-sidebar__item`,
|
|
@@ -153,22 +153,36 @@ export default defineComponent({
|
|
|
153
153
|
el.scrollTop = el.scrollHeight;
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
|
+
const toKeyString = (value) => {
|
|
157
|
+
if (typeof value === 'symbol')
|
|
158
|
+
return value.toString();
|
|
159
|
+
if (typeof value === 'function') {
|
|
160
|
+
const result = value();
|
|
161
|
+
return typeof result === 'string' || typeof result === 'number'
|
|
162
|
+
? String(result)
|
|
163
|
+
: '';
|
|
164
|
+
}
|
|
165
|
+
return value != null ? String(value) : '';
|
|
166
|
+
};
|
|
156
167
|
const renderHeader = () => {
|
|
157
168
|
return (h("div", { class: `${mergedClsPrefixRef.value}-chat-main__header` },
|
|
158
169
|
h(UFlex, { justify: "space-between", align: "flex-start", wrap: false }, {
|
|
159
|
-
default: () =>
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
h(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
default: () => {
|
|
171
|
+
const chat = selectedChatRef.value;
|
|
172
|
+
const keyId = toKeyString(chat === null || chat === void 0 ? void 0 : chat.id);
|
|
173
|
+
const keyTitle = toKeyString(chat === null || chat === void 0 ? void 0 : chat.title);
|
|
174
|
+
return (h(Fragment, null,
|
|
175
|
+
h(UText, { key: `${keyId}-${keyTitle}`, variant: "heading-s-bold", class: `${mergedClsPrefixRef.value}-chat-main__header-title`, theme: mergedThemeRef.value.peers.Typography, themeOverrides: mergedThemeRef.value.peerOverrides.Typography }, {
|
|
176
|
+
default: () => { var _a, _b; return (_b = (_a = selectedChatRef.value) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : ''; }
|
|
177
|
+
}),
|
|
178
|
+
h(UFlex, { align: "center", size: "small", class: `${mergedClsPrefixRef.value}-chat-main__header-actions` }, {
|
|
179
|
+
default: () => resolveSlot(slots.headerActions, () => {
|
|
180
|
+
const shareButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerShareButtonPropsRef.value);
|
|
181
|
+
const profileButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerProfileButtonPropsRef.value);
|
|
182
|
+
const closeButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerCloseButtonPropsRef.value);
|
|
183
|
+
const shareIconProps = Object.assign(Object.assign({}, headerIconPropsRef.value), headerShareIconPropsRef.value);
|
|
184
|
+
const profileIconProps = Object.assign(Object.assign({}, headerIconPropsRef.value), headerProfileIconPropsRef.value);
|
|
185
|
+
const buttons = [];
|
|
172
186
|
buttons.push(h(UTooltip, null, {
|
|
173
187
|
trigger: () => (h(UButton, Object.assign({ secondary: true, circle: true, size: "large" }, shareButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides
|
|
174
188
|
.Button, onClick: () => { var _a; return (_a = onChatShare === null || onChatShare === void 0 ? void 0 : onChatShare.value) === null || _a === void 0 ? void 0 : _a.call(onChatShare); } }), {
|
|
@@ -179,8 +193,6 @@ export default defineComponent({
|
|
|
179
193
|
})),
|
|
180
194
|
default: () => shareButtonTooltipRef.value
|
|
181
195
|
}));
|
|
182
|
-
}
|
|
183
|
-
if (profileButtonProps.disabled !== true) {
|
|
184
196
|
buttons.push(h(UTooltip, null, {
|
|
185
197
|
trigger: () => (h(UButton, Object.assign({ secondary: true, circle: true, size: "large" }, profileButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides
|
|
186
198
|
.Button, onClick: () => { var _a; return (_a = onUserProfile === null || onUserProfile === void 0 ? void 0 : onUserProfile.value) === null || _a === void 0 ? void 0 : _a.call(onUserProfile); } }), {
|
|
@@ -191,15 +203,13 @@ export default defineComponent({
|
|
|
191
203
|
})),
|
|
192
204
|
default: () => profileButtonTooltipRef.value
|
|
193
205
|
}));
|
|
194
|
-
}
|
|
195
|
-
if (closeButtonProps.disabled !== true) {
|
|
196
206
|
buttons.push(h(UButton, Object.assign({ type: "primary", size: "large", round: true }, closeButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onChatClose === null || onChatClose === void 0 ? void 0 : onChatClose.value) === null || _a === void 0 ? void 0 : _a.call(onChatClose); } }), {
|
|
197
207
|
default: () => closeButtonTextRef.value
|
|
198
208
|
}));
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
})
|
|
202
|
-
|
|
209
|
+
return buttons;
|
|
210
|
+
})
|
|
211
|
+
})));
|
|
212
|
+
}
|
|
203
213
|
})));
|
|
204
214
|
};
|
|
205
215
|
const renderMessages = () => {
|
package/es/components.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export * from './menu';
|
|
|
57
57
|
export * from './mention';
|
|
58
58
|
export * from './message';
|
|
59
59
|
export * from './modal';
|
|
60
|
+
export * from './modal-fullscreen';
|
|
60
61
|
export * from './notification';
|
|
61
62
|
export * from './page-header';
|
|
62
63
|
export * from './pagination';
|
|
@@ -96,3 +97,4 @@ export * from './discrete';
|
|
|
96
97
|
export * from './equation';
|
|
97
98
|
export * from './toggle-button';
|
|
98
99
|
export * from './flex';
|
|
100
|
+
export * from './crop';
|
package/es/components.js
CHANGED
|
@@ -57,6 +57,7 @@ export * from './menu';
|
|
|
57
57
|
export * from './mention';
|
|
58
58
|
export * from './message';
|
|
59
59
|
export * from './modal';
|
|
60
|
+
export * from './modal-fullscreen';
|
|
60
61
|
export * from './notification';
|
|
61
62
|
export * from './page-header';
|
|
62
63
|
export * from './pagination';
|
|
@@ -96,3 +97,4 @@ export * from './discrete';
|
|
|
96
97
|
export * from './equation';
|
|
97
98
|
export * from './toggle-button';
|
|
98
99
|
export * from './flex';
|
|
100
|
+
export * from './crop';
|
|
@@ -102,6 +102,8 @@ import type { FlexTheme } from '../../flex/styles';
|
|
|
102
102
|
import { CardListTheme } from '../../card-list/styles';
|
|
103
103
|
import { ActionCardTheme } from '../../action-card';
|
|
104
104
|
import { ChatTheme } from '../../chat/styles';
|
|
105
|
+
import { ModalFullscreenTheme } from '../../modal-fullscreen/styles';
|
|
106
|
+
import { CropTheme } from '../../crop/styles';
|
|
105
107
|
export interface GlobalThemeWithoutCommon {
|
|
106
108
|
Alert?: AlertTheme;
|
|
107
109
|
Anchor?: AnchorTheme;
|
|
@@ -190,6 +192,8 @@ export interface GlobalThemeWithoutCommon {
|
|
|
190
192
|
Flex?: FlexTheme;
|
|
191
193
|
CardList?: CardListTheme;
|
|
192
194
|
Chat?: ChatTheme;
|
|
195
|
+
ModalFullscreen?: ModalFullscreenTheme;
|
|
196
|
+
Crop?: CropTheme;
|
|
193
197
|
InternalSelectMenu?: InternalSelectMenuTheme;
|
|
194
198
|
InternalSelection?: InternalSelectionTheme;
|
|
195
199
|
AccountOption?: AccountOptionTheme;
|
package/es/crop/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as UCrop, cropProps } from './src/Crop';
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
+
import { ViewMode } from './interface';
|
|
4
|
+
export declare const cropProps: {
|
|
5
|
+
src: StringConstructor;
|
|
6
|
+
wrapperWidth: {
|
|
7
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
wrapperHeight: {
|
|
11
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
viewMode: {
|
|
15
|
+
type: PropType<ViewMode>;
|
|
16
|
+
default: number;
|
|
17
|
+
};
|
|
18
|
+
dragMode: {
|
|
19
|
+
type: PropType<"crop" | "move" | "none">;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
aspectRatio: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
background: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
circleShape: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
zoomable: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
cropperThemeColor: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
};
|
|
42
|
+
cancelButtonText: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
confirmButtonText: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
theme: PropType<import("../../_mixins").Theme<"Crop", {
|
|
51
|
+
wrapperBg: string;
|
|
52
|
+
wrapperBorderRadius: string;
|
|
53
|
+
wrapperMargin: string;
|
|
54
|
+
}, {}>>;
|
|
55
|
+
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Crop", {
|
|
56
|
+
wrapperBg: string;
|
|
57
|
+
wrapperBorderRadius: string;
|
|
58
|
+
wrapperMargin: string;
|
|
59
|
+
}, {}>>>;
|
|
60
|
+
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Crop", {
|
|
61
|
+
wrapperBg: string;
|
|
62
|
+
wrapperBorderRadius: string;
|
|
63
|
+
wrapperMargin: string;
|
|
64
|
+
}, {}>>>;
|
|
65
|
+
};
|
|
66
|
+
export type CropProps = ExtractPublicPropTypes<typeof cropProps>;
|
|
67
|
+
declare const _default: import("vue").DefineComponent<{
|
|
68
|
+
src: StringConstructor;
|
|
69
|
+
wrapperWidth: {
|
|
70
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
73
|
+
wrapperHeight: {
|
|
74
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
77
|
+
viewMode: {
|
|
78
|
+
type: PropType<ViewMode>;
|
|
79
|
+
default: number;
|
|
80
|
+
};
|
|
81
|
+
dragMode: {
|
|
82
|
+
type: PropType<"crop" | "move" | "none">;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
aspectRatio: {
|
|
86
|
+
type: NumberConstructor;
|
|
87
|
+
default: number;
|
|
88
|
+
};
|
|
89
|
+
background: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
default: boolean;
|
|
92
|
+
};
|
|
93
|
+
circleShape: {
|
|
94
|
+
type: BooleanConstructor;
|
|
95
|
+
default: boolean;
|
|
96
|
+
};
|
|
97
|
+
zoomable: {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
cropperThemeColor: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
cancelButtonText: {
|
|
106
|
+
type: StringConstructor;
|
|
107
|
+
default: string;
|
|
108
|
+
};
|
|
109
|
+
confirmButtonText: {
|
|
110
|
+
type: StringConstructor;
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
113
|
+
theme: PropType<import("../../_mixins").Theme<"Crop", {
|
|
114
|
+
wrapperBg: string;
|
|
115
|
+
wrapperBorderRadius: string;
|
|
116
|
+
wrapperMargin: string;
|
|
117
|
+
}, {}>>;
|
|
118
|
+
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Crop", {
|
|
119
|
+
wrapperBg: string;
|
|
120
|
+
wrapperBorderRadius: string;
|
|
121
|
+
wrapperMargin: string;
|
|
122
|
+
}, {}>>>;
|
|
123
|
+
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Crop", {
|
|
124
|
+
wrapperBg: string;
|
|
125
|
+
wrapperBorderRadius: string;
|
|
126
|
+
wrapperMargin: string;
|
|
127
|
+
}, {}>>>;
|
|
128
|
+
}, {
|
|
129
|
+
cropWrapperRef: import("vue").Ref<HTMLDivElement | undefined>;
|
|
130
|
+
cropImageRef: import("vue").Ref<HTMLImageElement | undefined>;
|
|
131
|
+
mergedClsPrefix: import("vue").Ref<string>;
|
|
132
|
+
cssVars: import("vue").ComputedRef<{
|
|
133
|
+
'--u-wrapper-border-radius': string;
|
|
134
|
+
'--u-wrapper-bg-color': string;
|
|
135
|
+
'--u-wrapper-width': string;
|
|
136
|
+
'--u-wrapper-height': string;
|
|
137
|
+
'--u-cropper-theme-color': string;
|
|
138
|
+
'--u-wrapper-margin': string;
|
|
139
|
+
}>;
|
|
140
|
+
confirmCrop: () => void;
|
|
141
|
+
cancelCrop: () => void;
|
|
142
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
143
|
+
cancel: () => true;
|
|
144
|
+
confirm: (dataUrl: string) => true;
|
|
145
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
146
|
+
src: StringConstructor;
|
|
147
|
+
wrapperWidth: {
|
|
148
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
149
|
+
default: string;
|
|
150
|
+
};
|
|
151
|
+
wrapperHeight: {
|
|
152
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
153
|
+
default: string;
|
|
154
|
+
};
|
|
155
|
+
viewMode: {
|
|
156
|
+
type: PropType<ViewMode>;
|
|
157
|
+
default: number;
|
|
158
|
+
};
|
|
159
|
+
dragMode: {
|
|
160
|
+
type: PropType<"crop" | "move" | "none">;
|
|
161
|
+
default: string;
|
|
162
|
+
};
|
|
163
|
+
aspectRatio: {
|
|
164
|
+
type: NumberConstructor;
|
|
165
|
+
default: number;
|
|
166
|
+
};
|
|
167
|
+
background: {
|
|
168
|
+
type: BooleanConstructor;
|
|
169
|
+
default: boolean;
|
|
170
|
+
};
|
|
171
|
+
circleShape: {
|
|
172
|
+
type: BooleanConstructor;
|
|
173
|
+
default: boolean;
|
|
174
|
+
};
|
|
175
|
+
zoomable: {
|
|
176
|
+
type: BooleanConstructor;
|
|
177
|
+
default: boolean;
|
|
178
|
+
};
|
|
179
|
+
cropperThemeColor: {
|
|
180
|
+
type: StringConstructor;
|
|
181
|
+
default: string;
|
|
182
|
+
};
|
|
183
|
+
cancelButtonText: {
|
|
184
|
+
type: StringConstructor;
|
|
185
|
+
default: string;
|
|
186
|
+
};
|
|
187
|
+
confirmButtonText: {
|
|
188
|
+
type: StringConstructor;
|
|
189
|
+
default: string;
|
|
190
|
+
};
|
|
191
|
+
theme: PropType<import("../../_mixins").Theme<"Crop", {
|
|
192
|
+
wrapperBg: string;
|
|
193
|
+
wrapperBorderRadius: string;
|
|
194
|
+
wrapperMargin: string;
|
|
195
|
+
}, {}>>;
|
|
196
|
+
themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Crop", {
|
|
197
|
+
wrapperBg: string;
|
|
198
|
+
wrapperBorderRadius: string;
|
|
199
|
+
wrapperMargin: string;
|
|
200
|
+
}, {}>>>;
|
|
201
|
+
builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Crop", {
|
|
202
|
+
wrapperBg: string;
|
|
203
|
+
wrapperBorderRadius: string;
|
|
204
|
+
wrapperMargin: string;
|
|
205
|
+
}, {}>>>;
|
|
206
|
+
}>> & {
|
|
207
|
+
onConfirm?: ((dataUrl: string) => any) | undefined;
|
|
208
|
+
onCancel?: (() => any) | undefined;
|
|
209
|
+
}, {
|
|
210
|
+
aspectRatio: number;
|
|
211
|
+
background: boolean;
|
|
212
|
+
wrapperWidth: string | number;
|
|
213
|
+
wrapperHeight: string | number;
|
|
214
|
+
viewMode: ViewMode;
|
|
215
|
+
dragMode: "none" | "move" | "crop";
|
|
216
|
+
circleShape: boolean;
|
|
217
|
+
zoomable: boolean;
|
|
218
|
+
cropperThemeColor: string;
|
|
219
|
+
cancelButtonText: string;
|
|
220
|
+
confirmButtonText: string;
|
|
221
|
+
}, {}>;
|
|
222
|
+
export default _default;
|