@opentiny/vue-renderless 3.13.0 → 3.13.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/cascader/index.js +3 -2
- package/common/deps/popper.js +28 -2
- package/package.json +1 -1
- package/select/index.js +2 -2
- package/types/alert.type.d.ts +1 -1
- package/types/checkbox.type.d.ts +3 -3
- package/types/collapse.type.d.ts +1 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-654dccd8.d.ts → form.type-d0fd42f3.d.ts} +1 -1
- package/types/form.type.d.ts +1 -1
- package/types/milestone.type.d.ts +1 -1
- package/types/pager.type.d.ts +1 -1
- package/types/popeditor.type.d.ts +1 -1
- package/types/popover.type.d.ts +1 -1
- package/types/progress.type.d.ts +1 -1
- package/types/steps.type.d.ts +1 -1
- package/types/switch.type.d.ts +3 -3
- package/types/upload-dragger.type.d.ts +2 -2
- package/types/{upload-list.type-f76f2393.d.ts → upload-list.type-343e8c11.d.ts} +2 -2
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
package/cascader/index.js
CHANGED
|
@@ -268,7 +268,7 @@ const calcCollapseTags = ({ state, refs, nextTick }) => () => {
|
|
|
268
268
|
const collapseTagWidth = tagsLength && parseFloat(collapseTagContentWidth) + parseFloat(marginRight) + parseFloat(marginLeft);
|
|
269
269
|
const tags = Array.from(content.querySelectorAll(".tiny-tag"));
|
|
270
270
|
let { total, dom, idx } = { total: collapseTagWidth, dom: null, idx: 0 };
|
|
271
|
-
tags.
|
|
271
|
+
tags.forEach((tag, index) => {
|
|
272
272
|
if (tag !== tagsLength) {
|
|
273
273
|
const { width: tagContentWidth, marginRight: marginRight2, marginLeft: marginLeft2 } = tag && window.getComputedStyle(tag);
|
|
274
274
|
total += parseFloat(tagContentWidth) + parseFloat(marginRight2) + parseFloat(marginLeft2);
|
|
@@ -399,7 +399,8 @@ const updateStyle = ({ parent, refs, state, updatePopper, nextTick, props }) =>
|
|
|
399
399
|
}
|
|
400
400
|
const tags = $el.querySelector(CASCADER.TagClass);
|
|
401
401
|
let suggestionPanelEl = null;
|
|
402
|
-
if (suggestionPanel
|
|
402
|
+
if (suggestionPanel) {
|
|
403
|
+
suggestionPanelEl = suggestionPanel.$el;
|
|
403
404
|
const suggestionList = suggestionPanelEl.querySelector(CASCADER.ListClass);
|
|
404
405
|
suggestionList.style.minWidth = inputInner.offsetWidth + "px";
|
|
405
406
|
}
|
package/common/deps/popper.js
CHANGED
|
@@ -68,6 +68,22 @@ const isScrollElement = (el) => {
|
|
|
68
68
|
const scrollTypes = ["scroll", "auto"];
|
|
69
69
|
return scrollTypes.includes(getStyleComputedProperty(el, "overflow")) || scrollTypes.includes(getStyleComputedProperty(el, "overflow-x")) || scrollTypes.includes(getStyleComputedProperty(el, "overflow-y"));
|
|
70
70
|
};
|
|
71
|
+
const getAdjustOffset = (parent) => {
|
|
72
|
+
const placeholder = document.createElement("div");
|
|
73
|
+
setStyle(placeholder, {
|
|
74
|
+
opacity: 0,
|
|
75
|
+
position: "fixed",
|
|
76
|
+
width: 1,
|
|
77
|
+
height: 1,
|
|
78
|
+
top: 0,
|
|
79
|
+
left: 0,
|
|
80
|
+
"z-index": "-99"
|
|
81
|
+
});
|
|
82
|
+
parent.appendChild(placeholder);
|
|
83
|
+
const result = getBoundingClientRect(placeholder);
|
|
84
|
+
parent.removeChild(placeholder);
|
|
85
|
+
return result;
|
|
86
|
+
};
|
|
71
87
|
const getScrollParent = (el) => {
|
|
72
88
|
let parent = el.parentNode;
|
|
73
89
|
if (!parent) {
|
|
@@ -84,9 +100,14 @@ const getScrollParent = (el) => {
|
|
|
84
100
|
}
|
|
85
101
|
return getScrollParent(parent);
|
|
86
102
|
};
|
|
87
|
-
const getOffsetRectRelativeToCustomParent = (el, parent, fixed) => {
|
|
103
|
+
const getOffsetRectRelativeToCustomParent = (el, parent, fixed, popper) => {
|
|
88
104
|
let { top, left, width, height } = getBoundingClientRect(el);
|
|
89
105
|
if (fixed) {
|
|
106
|
+
if (popper.parentElement) {
|
|
107
|
+
const { top: adjustTop, left: adjustLeft } = getAdjustOffset(popper.parentElement);
|
|
108
|
+
top -= adjustTop;
|
|
109
|
+
left -= adjustLeft;
|
|
110
|
+
}
|
|
90
111
|
return {
|
|
91
112
|
top,
|
|
92
113
|
left,
|
|
@@ -429,7 +450,12 @@ class Popper {
|
|
|
429
450
|
placement = placement.split("-")[0];
|
|
430
451
|
let popperOffsets = { position: this.state.position };
|
|
431
452
|
let isParentFixed = popperOffsets.position === "fixed";
|
|
432
|
-
let referenceOffsets = getOffsetRectRelativeToCustomParent(
|
|
453
|
+
let referenceOffsets = getOffsetRectRelativeToCustomParent(
|
|
454
|
+
reference,
|
|
455
|
+
getOffsetParent(popper),
|
|
456
|
+
isParentFixed,
|
|
457
|
+
popper
|
|
458
|
+
);
|
|
433
459
|
const { width, height } = this.popperOuterSize ? this.popperOuterSize : this.popperOuterSize = getOuterSizes(popper);
|
|
434
460
|
if (~["right", "left"].indexOf(placement)) {
|
|
435
461
|
popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - height / 2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-renderless",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.1",
|
|
4
4
|
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
|
|
5
5
|
"homepage": "https://opentiny.design/tiny-vue",
|
|
6
6
|
"keywords": [
|
package/select/index.js
CHANGED
|
@@ -396,16 +396,16 @@ const blur = ({ vm, state }) => () => {
|
|
|
396
396
|
(_a = vm.$refs.reference) == null ? void 0 : _a.blur();
|
|
397
397
|
};
|
|
398
398
|
const handleBlur = ({ constants, dispatch, emit, state }) => (event) => {
|
|
399
|
+
var _a;
|
|
399
400
|
clearTimeout(state.timer);
|
|
400
401
|
state.timer = setTimeout(() => {
|
|
401
|
-
var _a;
|
|
402
402
|
if (state.isSilentBlur) {
|
|
403
403
|
state.isSilentBlur = false;
|
|
404
404
|
} else {
|
|
405
405
|
emit("blur", event);
|
|
406
406
|
}
|
|
407
|
-
dispatch(constants.COMPONENT_NAME.FormItem, constants.EVENT_NAME.formBlur, (_a = event == null ? void 0 : event.target) == null ? void 0 : _a.value);
|
|
408
407
|
}, 200);
|
|
408
|
+
dispatch(constants.COMPONENT_NAME.FormItem, constants.EVENT_NAME.formBlur, (_a = event == null ? void 0 : event.target) == null ? void 0 : _a.value);
|
|
409
409
|
state.softFocus = false;
|
|
410
410
|
};
|
|
411
411
|
const handleClearClick = (api) => (event) => {
|
package/types/alert.type.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ declare const alertProps: {
|
|
|
76
76
|
type: BooleanConstructor;
|
|
77
77
|
default: boolean;
|
|
78
78
|
};
|
|
79
|
-
customClass: (
|
|
79
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
80
80
|
offset: {
|
|
81
81
|
type: (StringConstructor | NumberConstructor)[];
|
|
82
82
|
default: number;
|
package/types/checkbox.type.d.ts
CHANGED
|
@@ -20,10 +20,10 @@ declare const checkboxProps: {
|
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
modelValue: {
|
|
23
|
-
type: (
|
|
23
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
24
24
|
};
|
|
25
25
|
label: {
|
|
26
|
-
type: (
|
|
26
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
27
27
|
default: string;
|
|
28
28
|
};
|
|
29
29
|
indeterminate: BooleanConstructor;
|
|
@@ -40,7 +40,7 @@ declare const checkboxProps: {
|
|
|
40
40
|
border: BooleanConstructor;
|
|
41
41
|
size: StringConstructor;
|
|
42
42
|
text: StringConstructor;
|
|
43
|
-
customClass: (
|
|
43
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
44
44
|
validateEvent: {
|
|
45
45
|
type: BooleanConstructor;
|
|
46
46
|
default: boolean;
|
package/types/collapse.type.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare const collapseProps: {
|
|
|
24
24
|
accordion: BooleanConstructor;
|
|
25
25
|
beforeClose: FunctionConstructor;
|
|
26
26
|
modelValue: {
|
|
27
|
-
type: (
|
|
27
|
+
type: (StringConstructor | ArrayConstructor | NumberConstructor)[];
|
|
28
28
|
default: () => never[];
|
|
29
29
|
};
|
|
30
30
|
tiny_mode: StringConstructor;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { C as IFileUploadAfterDownload, m as IFileUploadApi, D as IFileUploadBatchSegmentDownload, y as IFileUploadBatchSegmentUpload, a as IFileUploadConstants, w as IFileUploadDownloadFileInner, x as IFileUploadDownloadFileSingle, u as IFileUploadDownloadFileSingleInner, t as IFileUploadEdmDownload, s as IFileUploadFile, A as IFileUploadGetFormData, v as IFileUploadLargeDocumentDownload, r as IFileUploadModalVm, o as IFileUploadProps, p as IFileUploadRenderlessParamUtils, q as IFileUploadRenderlessParams, z as IFileUploadSegmentUploadInner, n as IFileUploadService, B as IFileUploadSetWriterFile, E as IFileUploadSliceDownloadChunk, l as IFileUploadState, F as IFileUploadStreamsaver, I as IFileUploadVm } from './upload-list.type-
|
|
2
|
+
export { C as IFileUploadAfterDownload, m as IFileUploadApi, D as IFileUploadBatchSegmentDownload, y as IFileUploadBatchSegmentUpload, a as IFileUploadConstants, w as IFileUploadDownloadFileInner, x as IFileUploadDownloadFileSingle, u as IFileUploadDownloadFileSingleInner, t as IFileUploadEdmDownload, s as IFileUploadFile, A as IFileUploadGetFormData, v as IFileUploadLargeDocumentDownload, r as IFileUploadModalVm, o as IFileUploadProps, p as IFileUploadRenderlessParamUtils, q as IFileUploadRenderlessParams, z as IFileUploadSegmentUploadInner, n as IFileUploadService, B as IFileUploadSetWriterFile, E as IFileUploadSliceDownloadChunk, l as IFileUploadState, F as IFileUploadStreamsaver, I as IFileUploadVm } from './upload-list.type-343e8c11.js';
|
|
3
3
|
import './shared.type.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { i as IFormItemApi, f as IFormItemConstants, I as IFormItemDisplayedValueParam, k as IFormItemInstance, c as IFormItemLabelStyle, g as IFormItemProps, j as IFormItemRenderlessParamUtils, h as IFormItemRenderlessParams, d as IFormItemRule, e as IFormItemState, b as IFormItemTrigger, a as IFormItemValidateStatus } from './form.type-
|
|
2
|
+
export { i as IFormItemApi, f as IFormItemConstants, I as IFormItemDisplayedValueParam, k as IFormItemInstance, c as IFormItemLabelStyle, g as IFormItemProps, j as IFormItemRenderlessParamUtils, h as IFormItemRenderlessParams, d as IFormItemRule, e as IFormItemState, b as IFormItemTrigger, a as IFormItemValidateStatus } from './form.type-d0fd42f3.js';
|
|
3
3
|
import './shared.type.js';
|
|
@@ -138,7 +138,7 @@ declare const formItemProps: {
|
|
|
138
138
|
type: BooleanConstructor;
|
|
139
139
|
default: boolean;
|
|
140
140
|
};
|
|
141
|
-
rules: (
|
|
141
|
+
rules: (ObjectConstructor | ArrayConstructor)[];
|
|
142
142
|
showMessage: {
|
|
143
143
|
type: BooleanConstructor;
|
|
144
144
|
default: boolean;
|
package/types/form.type.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { p as IFormApi, r as IFormInstance, n as IFormProps, q as IFormRenderlessParamUtils, o as IFormRenderlessParams, l as IFormRules, m as IFormState } from './form.type-
|
|
2
|
+
export { p as IFormApi, r as IFormInstance, n as IFormProps, q as IFormRenderlessParamUtils, o as IFormRenderlessParams, l as IFormRules, m as IFormState } from './form.type-d0fd42f3.js';
|
|
3
3
|
import './shared.type.js';
|
package/types/pager.type.d.ts
CHANGED
package/types/popover.type.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ declare const popoverProps: {
|
|
|
67
67
|
maxHeight: {
|
|
68
68
|
type: (StringConstructor | NumberConstructor)[];
|
|
69
69
|
};
|
|
70
|
-
listData: (
|
|
70
|
+
listData: (ObjectConstructor | ArrayConstructor)[];
|
|
71
71
|
genArrowByHtml: {
|
|
72
72
|
type: BooleanConstructor;
|
|
73
73
|
default: () => boolean;
|
package/types/progress.type.d.ts
CHANGED
package/types/steps.type.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare const stepsProps: {
|
|
|
14
14
|
type: StringConstructor;
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
|
-
data: (
|
|
17
|
+
data: (ObjectConstructor | ArrayConstructor)[];
|
|
18
18
|
space: (StringConstructor | NumberConstructor)[];
|
|
19
19
|
active: {
|
|
20
20
|
type: NumberConstructor;
|
package/types/switch.type.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare const switchProps: {
|
|
|
30
30
|
};
|
|
31
31
|
falseColor: StringConstructor;
|
|
32
32
|
falseValue: {
|
|
33
|
-
type: (
|
|
33
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
34
34
|
default: boolean;
|
|
35
35
|
};
|
|
36
36
|
mini: {
|
|
@@ -38,7 +38,7 @@ declare const switchProps: {
|
|
|
38
38
|
default: boolean;
|
|
39
39
|
};
|
|
40
40
|
modelValue: {
|
|
41
|
-
type: (
|
|
41
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
42
42
|
default: boolean;
|
|
43
43
|
};
|
|
44
44
|
size: (StringConstructor | NumberConstructor)[];
|
|
@@ -48,7 +48,7 @@ declare const switchProps: {
|
|
|
48
48
|
};
|
|
49
49
|
trueColor: StringConstructor;
|
|
50
50
|
trueValue: {
|
|
51
|
-
type: (
|
|
51
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
52
52
|
default: boolean;
|
|
53
53
|
};
|
|
54
54
|
beforeChange: FunctionConstructor;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
2
|
import { ISharedRenderlessParamUtils, ISharedRenderlessFunctionParams } from './shared.type.js';
|
|
3
|
-
import { I as IFileUploadVm, a as IFileUploadConstants } from './upload-list.type-
|
|
3
|
+
import { I as IFileUploadVm, a as IFileUploadConstants } from './upload-list.type-343e8c11.js';
|
|
4
4
|
|
|
5
5
|
declare const UploadDraggerProps: {
|
|
6
6
|
disabled: BooleanConstructor;
|
|
7
|
-
customClass: (
|
|
7
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
8
8
|
tiny_mode: StringConstructor;
|
|
9
9
|
tiny_mode_root: BooleanConstructor;
|
|
10
10
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -322,7 +322,7 @@ declare const fileUploadProps: {
|
|
|
322
322
|
type: BooleanConstructor;
|
|
323
323
|
default: boolean;
|
|
324
324
|
};
|
|
325
|
-
customClass: (
|
|
325
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
326
326
|
hwh5: ObjectConstructor;
|
|
327
327
|
mode: {
|
|
328
328
|
type: StringConstructor;
|
|
@@ -644,7 +644,7 @@ declare const uploadProps: {
|
|
|
644
644
|
type: BooleanConstructor;
|
|
645
645
|
default: boolean;
|
|
646
646
|
};
|
|
647
|
-
customClass: (
|
|
647
|
+
customClass: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
648
648
|
handleTriggerClick: {
|
|
649
649
|
type: FunctionConstructor;
|
|
650
650
|
default: () => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { H as IUploadListApi, J as IUploadListProps, K as IUploadListRenderlessParamUtils, L as IUploadListRenderlessParams, G as IUploadListState, M as IUploadListVideoParam } from './upload-list.type-
|
|
2
|
+
export { H as IUploadListApi, J as IUploadListProps, K as IUploadListRenderlessParamUtils, L as IUploadListRenderlessParams, G as IUploadListState, M as IUploadListVideoParam } from './upload-list.type-343e8c11.js';
|
|
3
3
|
import './shared.type.js';
|
package/types/upload.type.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { d as IUploadApi, i as IUploadFormData, k as IUploadOptionsOfHwh5, j as IUploadOptionsOfPost, e as IUploadProps, h as IUploadRenderlessOtherParams, f as IUploadRenderlessParamUtils, g as IUploadRenderlessParams, c as IUploadState, b as IUploadStateHeader } from './upload-list.type-
|
|
2
|
+
export { d as IUploadApi, i as IUploadFormData, k as IUploadOptionsOfHwh5, j as IUploadOptionsOfPost, e as IUploadProps, h as IUploadRenderlessOtherParams, f as IUploadRenderlessParamUtils, g as IUploadRenderlessParams, c as IUploadState, b as IUploadStateHeader } from './upload-list.type-343e8c11.js';
|
|
3
3
|
import './shared.type.js';
|