naive-ui 2.30.4 → 2.30.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +293 -75
- package/dist/index.prod.js +2 -2
- package/es/_internal/scrollbar/src/Scrollbar.js +1 -2
- package/es/_internal/selection/src/Selection.js +5 -3
- package/es/_utils/dom/index.d.ts +1 -0
- package/es/_utils/dom/index.js +1 -0
- package/es/_utils/dom/is-document.d.ts +1 -0
- package/es/_utils/dom/is-document.js +3 -0
- package/es/_utils/index.d.ts +2 -1
- package/es/_utils/index.js +2 -1
- package/es/_utils/vue/index.d.ts +2 -0
- package/es/_utils/vue/index.js +2 -0
- package/es/_utils/vue/is-node-v-show-false.d.ts +2 -0
- package/es/_utils/vue/is-node-v-show-false.js +6 -0
- package/es/{_internal/scrollbar/src/Wrapper.d.ts → _utils/vue/wrapper.d.ts} +0 -0
- package/es/{_internal/scrollbar/src/Wrapper.js → _utils/vue/wrapper.js} +0 -0
- package/es/back-top/src/BackTop.d.ts +1 -1
- package/es/back-top/src/BackTop.js +24 -31
- package/es/data-table/src/DataTable.d.ts +5 -2
- package/es/data-table/src/DataTable.js +3 -2
- package/es/data-table/src/TableParts/Body.d.ts +1 -0
- package/es/data-table/src/TableParts/Body.js +4 -3
- package/es/data-table/src/TableParts/Cell.d.ts +3 -1
- package/es/data-table/src/TableParts/Cell.js +7 -3
- package/es/data-table/src/interface.d.ts +2 -1
- package/es/data-table/src/use-check.js +11 -3
- package/es/grid/src/Grid.js +28 -8
- package/es/image/src/Image.d.ts +10 -0
- package/es/image/src/Image.js +40 -8
- package/es/image/src/utils.d.ts +11 -0
- package/es/image/src/utils.js +81 -0
- package/es/input/src/styles/input-group-label.cssr.js +2 -0
- package/es/space/src/Space.d.ts +26 -0
- package/es/space/src/Space.js +53 -43
- package/es/tooltip/index.d.ts +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.js +2 -3
- package/lib/_internal/selection/src/Selection.js +4 -2
- package/lib/_utils/dom/index.d.ts +1 -0
- package/lib/_utils/dom/index.js +5 -0
- package/lib/_utils/dom/is-document.d.ts +1 -0
- package/lib/_utils/dom/is-document.js +7 -0
- package/lib/_utils/index.d.ts +2 -1
- package/lib/_utils/index.js +4 -1
- package/lib/_utils/vue/index.d.ts +2 -0
- package/lib/_utils/vue/index.js +5 -1
- package/lib/_utils/vue/is-node-v-show-false.d.ts +2 -0
- package/lib/_utils/vue/is-node-v-show-false.js +10 -0
- package/lib/{_internal/scrollbar/src/Wrapper.d.ts → _utils/vue/wrapper.d.ts} +0 -0
- package/lib/{_internal/scrollbar/src/Wrapper.js → _utils/vue/wrapper.js} +0 -0
- package/lib/back-top/src/BackTop.d.ts +1 -1
- package/lib/back-top/src/BackTop.js +23 -30
- package/lib/data-table/src/DataTable.d.ts +5 -2
- package/lib/data-table/src/DataTable.js +3 -2
- package/lib/data-table/src/TableParts/Body.d.ts +1 -0
- package/lib/data-table/src/TableParts/Body.js +4 -3
- package/lib/data-table/src/TableParts/Cell.d.ts +3 -1
- package/lib/data-table/src/TableParts/Cell.js +7 -3
- package/lib/data-table/src/interface.d.ts +2 -1
- package/lib/data-table/src/use-check.js +11 -3
- package/lib/grid/src/Grid.js +26 -6
- package/lib/image/src/Image.d.ts +10 -0
- package/lib/image/src/Image.js +39 -7
- package/lib/image/src/utils.d.ts +11 -0
- package/lib/image/src/utils.js +86 -0
- package/lib/input/src/styles/input-group-label.cssr.js +2 -0
- package/lib/space/src/Space.d.ts +26 -0
- package/lib/space/src/Space.js +53 -43
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/volar.d.ts +0 -1
- package/web-types.json +37 -1
package/dist/index.js
CHANGED
|
@@ -848,6 +848,22 @@
|
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
850
|
|
|
851
|
+
function isNodeVShowFalse(vNode) {
|
|
852
|
+
const showDir = vNode.dirs?.find(_ref => {
|
|
853
|
+
let {
|
|
854
|
+
dir
|
|
855
|
+
} = _ref;
|
|
856
|
+
return dir === vue.vShow;
|
|
857
|
+
});
|
|
858
|
+
return !!(showDir && showDir.value === false);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
const Wrapper = vue.defineComponent({
|
|
862
|
+
render() {
|
|
863
|
+
return this.$slots.default?.();
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
|
|
851
867
|
const pureNumberRegex = /^(\d|\.)+$/;
|
|
852
868
|
const numberRegex = /(\d|\.)+/;
|
|
853
869
|
function formatLength(length) {
|
|
@@ -6203,6 +6219,10 @@
|
|
|
6203
6219
|
return isDeactivatedRef;
|
|
6204
6220
|
}
|
|
6205
6221
|
|
|
6222
|
+
function isDocument(node) {
|
|
6223
|
+
return node.nodeName === "#document";
|
|
6224
|
+
}
|
|
6225
|
+
|
|
6206
6226
|
const formItemInjectionKey = createInjectionKey("n-form-item");
|
|
6207
6227
|
function useFormItem(props) {
|
|
6208
6228
|
let {
|
|
@@ -29561,12 +29581,6 @@
|
|
|
29561
29581
|
self: self$19
|
|
29562
29582
|
};
|
|
29563
29583
|
|
|
29564
|
-
const Wrapper = vue.defineComponent({
|
|
29565
|
-
render() {
|
|
29566
|
-
return this.$slots.default?.();
|
|
29567
|
-
}
|
|
29568
|
-
});
|
|
29569
|
-
|
|
29570
29584
|
const {
|
|
29571
29585
|
cubicBezierEaseInOut: cubicBezierEaseInOut$3
|
|
29572
29586
|
} = commonVariables$l;
|
|
@@ -33962,14 +33976,16 @@
|
|
|
33962
33976
|
const maxTagCountResponsive = maxTagCount === "responsive";
|
|
33963
33977
|
const maxTagCountNumeric = typeof maxTagCount === "number";
|
|
33964
33978
|
const useMaxTagCount = maxTagCountResponsive || maxTagCountNumeric;
|
|
33965
|
-
const suffix = /* @__PURE__ */ vue.h(
|
|
33966
|
-
|
|
33967
|
-
|
|
33968
|
-
|
|
33969
|
-
|
|
33970
|
-
|
|
33971
|
-
|
|
33972
|
-
|
|
33979
|
+
const suffix = /* @__PURE__ */ vue.h(Wrapper, null, {
|
|
33980
|
+
default: () => /* @__PURE__ */ vue.h(NBaseSuffix, {
|
|
33981
|
+
clsPrefix,
|
|
33982
|
+
loading: this.loading,
|
|
33983
|
+
showArrow: this.showArrow,
|
|
33984
|
+
showClear: this.mergedClearable && this.selected,
|
|
33985
|
+
onClear: this.handleClear
|
|
33986
|
+
}, {
|
|
33987
|
+
default: () => this.$slots.arrow?.()
|
|
33988
|
+
})
|
|
33973
33989
|
});
|
|
33974
33990
|
let body;
|
|
33975
33991
|
if (multiple) {
|
|
@@ -37296,6 +37312,8 @@
|
|
|
37296
37312
|
font-size: var(--n-font-size);
|
|
37297
37313
|
line-height: var(--n-height);
|
|
37298
37314
|
height: var(--n-height);
|
|
37315
|
+
flex-shrink: 0;
|
|
37316
|
+
white-space: nowrap;
|
|
37299
37317
|
transition:
|
|
37300
37318
|
color .3s var(--n-bezier),
|
|
37301
37319
|
background-color .3s var(--n-bezier),
|
|
@@ -38332,15 +38350,19 @@
|
|
|
38332
38350
|
}
|
|
38333
38351
|
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props);
|
|
38334
38352
|
const scrollTopRef = vue.ref(null);
|
|
38335
|
-
const uncontrolledShowRef = vue.
|
|
38336
|
-
|
|
38337
|
-
|
|
38338
|
-
|
|
38353
|
+
const uncontrolledShowRef = vue.ref(false);
|
|
38354
|
+
vue.watchEffect(() => {
|
|
38355
|
+
const { value: scrollTop } = scrollTopRef;
|
|
38356
|
+
if (scrollTop === null) {
|
|
38357
|
+
uncontrolledShowRef.value = false;
|
|
38358
|
+
return;
|
|
38359
|
+
}
|
|
38360
|
+
uncontrolledShowRef.value = scrollTop >= props.visibilityHeight;
|
|
38339
38361
|
});
|
|
38340
38362
|
const DomInfoReadyRef = vue.ref(false);
|
|
38341
38363
|
vue.watch(uncontrolledShowRef, (value) => {
|
|
38342
38364
|
if (DomInfoReadyRef.value) {
|
|
38343
|
-
props["onUpdate:show"](value);
|
|
38365
|
+
props["onUpdate:show"]?.(value);
|
|
38344
38366
|
}
|
|
38345
38367
|
});
|
|
38346
38368
|
const controlledShowRef = vue.toRef(props, "show");
|
|
@@ -38375,36 +38397,23 @@
|
|
|
38375
38397
|
}
|
|
38376
38398
|
return;
|
|
38377
38399
|
}
|
|
38378
|
-
scrollElement = scrollEl;
|
|
38400
|
+
scrollElement = scrollEl === document.documentElement ? document : scrollEl;
|
|
38379
38401
|
const { to } = props;
|
|
38380
38402
|
const target = typeof to === "string" ? document.querySelector(to) : to;
|
|
38381
38403
|
if (!target) {
|
|
38382
38404
|
warn$2("back-top", "Target is not found.");
|
|
38383
38405
|
}
|
|
38384
|
-
|
|
38385
|
-
|
|
38386
|
-
handleScroll();
|
|
38387
|
-
}
|
|
38406
|
+
scrollElement.addEventListener("scroll", handleScroll);
|
|
38407
|
+
handleScroll();
|
|
38388
38408
|
}
|
|
38389
|
-
function handleClick(
|
|
38390
|
-
|
|
38391
|
-
|
|
38392
|
-
|
|
38393
|
-
|
|
38394
|
-
});
|
|
38395
|
-
} else {
|
|
38396
|
-
scrollElement.scrollTo({
|
|
38397
|
-
top: 0,
|
|
38398
|
-
behavior: "smooth"
|
|
38399
|
-
});
|
|
38400
|
-
}
|
|
38409
|
+
function handleClick() {
|
|
38410
|
+
(isDocument(scrollElement) ? document.documentElement : scrollElement).scrollTo({
|
|
38411
|
+
top: 0,
|
|
38412
|
+
behavior: "smooth"
|
|
38413
|
+
});
|
|
38401
38414
|
}
|
|
38402
38415
|
function handleScroll() {
|
|
38403
|
-
|
|
38404
|
-
scrollTopRef.value = scrollElement.documentElement.scrollTop;
|
|
38405
|
-
} else {
|
|
38406
|
-
scrollTopRef.value = scrollElement.scrollTop;
|
|
38407
|
-
}
|
|
38416
|
+
scrollTopRef.value = (isDocument(scrollElement) ? document.documentElement : scrollElement).scrollTop;
|
|
38408
38417
|
if (!DomInfoReadyRef.value) {
|
|
38409
38418
|
void vue.nextTick(() => {
|
|
38410
38419
|
DomInfoReadyRef.value = true;
|
|
@@ -58247,22 +58256,20 @@
|
|
|
58247
58256
|
mergedTheme: {
|
|
58248
58257
|
type: Object,
|
|
58249
58258
|
required: true
|
|
58250
|
-
}
|
|
58259
|
+
},
|
|
58260
|
+
renderCell: Function
|
|
58251
58261
|
},
|
|
58252
58262
|
render() {
|
|
58253
|
-
const {
|
|
58254
|
-
isSummary,
|
|
58255
|
-
column: { render, key, ellipsis },
|
|
58256
|
-
row
|
|
58257
|
-
} = this;
|
|
58263
|
+
const { isSummary, column, row, renderCell } = this;
|
|
58258
58264
|
let cell;
|
|
58265
|
+
const { render, key, ellipsis } = column;
|
|
58259
58266
|
if (render && !isSummary) {
|
|
58260
58267
|
cell = render(row, this.index);
|
|
58261
58268
|
} else {
|
|
58262
58269
|
if (isSummary) {
|
|
58263
58270
|
cell = row[key].value;
|
|
58264
58271
|
} else {
|
|
58265
|
-
cell = lodash.exports.get(row, key);
|
|
58272
|
+
cell = renderCell ? renderCell(lodash.exports.get(row, key), row, column) : lodash.exports.get(row, key);
|
|
58266
58273
|
}
|
|
58267
58274
|
}
|
|
58268
58275
|
if (ellipsis && typeof ellipsis === "object") {
|
|
@@ -58456,7 +58463,8 @@
|
|
|
58456
58463
|
doUpdateExpandedRowKeys,
|
|
58457
58464
|
handleTableBodyScroll,
|
|
58458
58465
|
doCheck,
|
|
58459
|
-
doUncheck
|
|
58466
|
+
doUncheck,
|
|
58467
|
+
renderCell
|
|
58460
58468
|
} = vue.inject(dataTableInjectionKey);
|
|
58461
58469
|
const scrollbarInstRef = vue.ref(null);
|
|
58462
58470
|
const virtualListRef = vue.ref(null);
|
|
@@ -58694,6 +58702,7 @@
|
|
|
58694
58702
|
handleTableBodyScroll,
|
|
58695
58703
|
handleCheckboxUpdateChecked,
|
|
58696
58704
|
handleUpdateExpanded,
|
|
58705
|
+
renderCell,
|
|
58697
58706
|
...exposedMethods
|
|
58698
58707
|
};
|
|
58699
58708
|
},
|
|
@@ -58947,7 +58956,8 @@
|
|
|
58947
58956
|
row: rowData,
|
|
58948
58957
|
column,
|
|
58949
58958
|
isSummary,
|
|
58950
|
-
mergedTheme: mergedTheme2
|
|
58959
|
+
mergedTheme: mergedTheme2,
|
|
58960
|
+
renderCell: this.renderCell
|
|
58951
58961
|
}));
|
|
58952
58962
|
}));
|
|
58953
58963
|
return row;
|
|
@@ -59181,9 +59191,19 @@
|
|
|
59181
59191
|
onUpdateCheckedRowKeys,
|
|
59182
59192
|
onCheckedRowKeysChange
|
|
59183
59193
|
} = props;
|
|
59184
|
-
|
|
59185
|
-
|
|
59186
|
-
|
|
59194
|
+
const rows = [];
|
|
59195
|
+
const {
|
|
59196
|
+
value: {
|
|
59197
|
+
getNode
|
|
59198
|
+
}
|
|
59199
|
+
} = treeMateRef;
|
|
59200
|
+
keys.forEach(key => {
|
|
59201
|
+
const row = getNode(key)?.rawNode;
|
|
59202
|
+
rows.push(row);
|
|
59203
|
+
});
|
|
59204
|
+
if (_onUpdateCheckedRowKeys) call(_onUpdateCheckedRowKeys, keys, rows);
|
|
59205
|
+
if (onUpdateCheckedRowKeys) call(onUpdateCheckedRowKeys, keys, rows);
|
|
59206
|
+
if (onCheckedRowKeysChange) call(onCheckedRowKeysChange, keys, rows);
|
|
59187
59207
|
uncontrolledCheckedRowKeysRef.value = keys;
|
|
59188
59208
|
}
|
|
59189
59209
|
|
|
@@ -60635,6 +60655,7 @@
|
|
|
60635
60655
|
type: String,
|
|
60636
60656
|
default: "current"
|
|
60637
60657
|
},
|
|
60658
|
+
renderCell: Function,
|
|
60638
60659
|
onLoad: Function,
|
|
60639
60660
|
"onUpdate:page": [Function, Array],
|
|
60640
60661
|
onUpdatePage: [Function, Array],
|
|
@@ -60837,7 +60858,8 @@
|
|
|
60837
60858
|
doUpdateExpandedRowKeys,
|
|
60838
60859
|
handleTableHeaderScroll,
|
|
60839
60860
|
handleTableBodyScroll,
|
|
60840
|
-
setHeaderScrollLeft
|
|
60861
|
+
setHeaderScrollLeft,
|
|
60862
|
+
renderCell: vue.toRef(props, "renderCell")
|
|
60841
60863
|
});
|
|
60842
60864
|
const exposedMethods = {
|
|
60843
60865
|
filter,
|
|
@@ -65894,7 +65916,10 @@
|
|
|
65894
65916
|
var date = (0, _index2.default)(dirtyDate, options);
|
|
65895
65917
|
var offsetMilliseconds = (0, _index.default)(timeZone, date, true);
|
|
65896
65918
|
var d = new Date(date.getTime() - offsetMilliseconds);
|
|
65897
|
-
|
|
65919
|
+
var resultDate = new Date(0);
|
|
65920
|
+
resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());
|
|
65921
|
+
resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds());
|
|
65922
|
+
return resultDate;
|
|
65898
65923
|
}
|
|
65899
65924
|
|
|
65900
65925
|
module.exports = exports.default;
|
|
@@ -73910,10 +73935,18 @@
|
|
|
73910
73935
|
type: [String, Number, Array],
|
|
73911
73936
|
default: "medium"
|
|
73912
73937
|
},
|
|
73938
|
+
wrapItem: {
|
|
73939
|
+
type: Boolean,
|
|
73940
|
+
default: true
|
|
73941
|
+
},
|
|
73913
73942
|
itemStyle: [String, Object],
|
|
73914
73943
|
wrap: {
|
|
73915
73944
|
type: Boolean,
|
|
73916
73945
|
default: true
|
|
73946
|
+
},
|
|
73947
|
+
internalUseGap: {
|
|
73948
|
+
type: Boolean,
|
|
73949
|
+
default: void 0
|
|
73917
73950
|
}
|
|
73918
73951
|
};
|
|
73919
73952
|
var NSpace = vue.defineComponent({
|
|
@@ -73963,7 +73996,9 @@
|
|
|
73963
73996
|
wrap,
|
|
73964
73997
|
mergedClsPrefix,
|
|
73965
73998
|
rtlEnabled,
|
|
73966
|
-
useGap
|
|
73999
|
+
useGap,
|
|
74000
|
+
wrapItem,
|
|
74001
|
+
internalUseGap
|
|
73967
74002
|
} = this;
|
|
73968
74003
|
const children = flatten$3(getSlot$1(this));
|
|
73969
74004
|
if (!children.length)
|
|
@@ -73990,7 +74025,7 @@
|
|
|
73990
74025
|
alignItems: align,
|
|
73991
74026
|
gap: useGap ? `${margin.vertical}px ${margin.horizontal}px` : ""
|
|
73992
74027
|
}
|
|
73993
|
-
}, children.map((child, index) => /* @__PURE__ */ vue.h("div", {
|
|
74028
|
+
}, !wrapItem && (useGap || internalUseGap) ? children : children.map((child, index) => /* @__PURE__ */ vue.h("div", {
|
|
73994
74029
|
role: "none",
|
|
73995
74030
|
style: [
|
|
73996
74031
|
itemStyle,
|
|
@@ -74531,7 +74566,7 @@
|
|
|
74531
74566
|
});
|
|
74532
74567
|
|
|
74533
74568
|
function _extends() {
|
|
74534
|
-
_extends = Object.assign
|
|
74569
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
74535
74570
|
for (var i = 1; i < arguments.length; i++) {
|
|
74536
74571
|
var source = arguments[i];
|
|
74537
74572
|
|
|
@@ -74544,7 +74579,6 @@
|
|
|
74544
74579
|
|
|
74545
74580
|
return target;
|
|
74546
74581
|
};
|
|
74547
|
-
|
|
74548
74582
|
return _extends.apply(this, arguments);
|
|
74549
74583
|
}
|
|
74550
74584
|
|
|
@@ -74556,18 +74590,17 @@
|
|
|
74556
74590
|
}
|
|
74557
74591
|
|
|
74558
74592
|
function _getPrototypeOf(o) {
|
|
74559
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
74593
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
74560
74594
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
74561
74595
|
};
|
|
74562
74596
|
return _getPrototypeOf(o);
|
|
74563
74597
|
}
|
|
74564
74598
|
|
|
74565
74599
|
function _setPrototypeOf(o, p) {
|
|
74566
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
74600
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
74567
74601
|
o.__proto__ = p;
|
|
74568
74602
|
return o;
|
|
74569
74603
|
};
|
|
74570
|
-
|
|
74571
74604
|
return _setPrototypeOf(o, p);
|
|
74572
74605
|
}
|
|
74573
74606
|
|
|
@@ -74586,7 +74619,7 @@
|
|
|
74586
74619
|
|
|
74587
74620
|
function _construct(Parent, args, Class) {
|
|
74588
74621
|
if (_isNativeReflectConstruct()) {
|
|
74589
|
-
_construct = Reflect.construct;
|
|
74622
|
+
_construct = Reflect.construct.bind();
|
|
74590
74623
|
} else {
|
|
74591
74624
|
_construct = function _construct(Parent, args, Class) {
|
|
74592
74625
|
var a = [null];
|
|
@@ -74940,6 +74973,54 @@
|
|
|
74940
74973
|
if (/^\s+$/.test(value) || value === '') {
|
|
74941
74974
|
errors.push(format$1(options.messages.whitespace, rule.fullField));
|
|
74942
74975
|
}
|
|
74976
|
+
}; // https://github.com/kevva/url-regex/blob/master/index.js
|
|
74977
|
+
|
|
74978
|
+
|
|
74979
|
+
var urlReg;
|
|
74980
|
+
|
|
74981
|
+
var getUrlRegex = function () {
|
|
74982
|
+
if (urlReg) {
|
|
74983
|
+
return urlReg;
|
|
74984
|
+
}
|
|
74985
|
+
|
|
74986
|
+
var word = '[a-fA-F\\d:]';
|
|
74987
|
+
|
|
74988
|
+
var b = function b(options) {
|
|
74989
|
+
return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : '';
|
|
74990
|
+
};
|
|
74991
|
+
|
|
74992
|
+
var v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}';
|
|
74993
|
+
var v6seg = '[a-fA-F\\d]{1,4}';
|
|
74994
|
+
var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim(); // Pre-compile only the exact regexes because adding a global flag make regexes stateful
|
|
74995
|
+
|
|
74996
|
+
var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
|
|
74997
|
+
var v4exact = new RegExp("^" + v4 + "$");
|
|
74998
|
+
var v6exact = new RegExp("^" + v6 + "$");
|
|
74999
|
+
|
|
75000
|
+
var ip = function ip(options) {
|
|
75001
|
+
return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", 'g');
|
|
75002
|
+
};
|
|
75003
|
+
|
|
75004
|
+
ip.v4 = function (options) {
|
|
75005
|
+
return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), 'g');
|
|
75006
|
+
};
|
|
75007
|
+
|
|
75008
|
+
ip.v6 = function (options) {
|
|
75009
|
+
return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), 'g');
|
|
75010
|
+
};
|
|
75011
|
+
|
|
75012
|
+
var protocol = "(?:(?:[a-z]+:)?//)";
|
|
75013
|
+
var auth = '(?:\\S+(?::\\S*)?@)?';
|
|
75014
|
+
var ipv4 = ip.v4().source;
|
|
75015
|
+
var ipv6 = ip.v6().source;
|
|
75016
|
+
var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
|
|
75017
|
+
var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
|
|
75018
|
+
var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
|
|
75019
|
+
var port = '(?::\\d{2,5})?';
|
|
75020
|
+
var path = '(?:[/?#][^\\s"]*)?';
|
|
75021
|
+
var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
|
|
75022
|
+
urlReg = new RegExp("(?:^" + regex + "$)", 'i');
|
|
75023
|
+
return urlReg;
|
|
74943
75024
|
};
|
|
74944
75025
|
/* eslint max-len:0 */
|
|
74945
75026
|
|
|
@@ -74947,7 +75028,10 @@
|
|
|
74947
75028
|
var pattern$2 = {
|
|
74948
75029
|
// http://emailregex.com/
|
|
74949
75030
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
|
|
74950
|
-
url: new RegExp(
|
|
75031
|
+
// url: new RegExp(
|
|
75032
|
+
// '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
|
|
75033
|
+
// 'i',
|
|
75034
|
+
// ),
|
|
74951
75035
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
74952
75036
|
};
|
|
74953
75037
|
var types = {
|
|
@@ -74991,7 +75075,7 @@
|
|
|
74991
75075
|
return typeof value === 'string' && value.length <= 320 && !!value.match(pattern$2.email);
|
|
74992
75076
|
},
|
|
74993
75077
|
url: function url(value) {
|
|
74994
|
-
return typeof value === 'string' && value.length <= 2048 && !!value.match(
|
|
75078
|
+
return typeof value === 'string' && value.length <= 2048 && !!value.match(getUrlRegex());
|
|
74995
75079
|
},
|
|
74996
75080
|
hex: function hex(value) {
|
|
74997
75081
|
return typeof value === 'string' && !!value.match(pattern$2.hex);
|
|
@@ -75737,9 +75821,12 @@
|
|
|
75737
75821
|
} catch (error) {
|
|
75738
75822
|
console.error == null ? void 0 : console.error(error); // rethrow to report error
|
|
75739
75823
|
|
|
75740
|
-
|
|
75741
|
-
|
|
75742
|
-
|
|
75824
|
+
if (!options.suppressValidatorError) {
|
|
75825
|
+
setTimeout(function () {
|
|
75826
|
+
throw error;
|
|
75827
|
+
}, 0);
|
|
75828
|
+
}
|
|
75829
|
+
|
|
75743
75830
|
cb(error.message);
|
|
75744
75831
|
}
|
|
75745
75832
|
|
|
@@ -77177,6 +77264,20 @@
|
|
|
77177
77264
|
rawChildren.forEach((child) => {
|
|
77178
77265
|
if (child?.type?.__GRID_ITEM__ !== true)
|
|
77179
77266
|
return;
|
|
77267
|
+
if (isNodeVShowFalse(child)) {
|
|
77268
|
+
const clonedNode = vue.cloneVNode(child);
|
|
77269
|
+
if (clonedNode.props) {
|
|
77270
|
+
clonedNode.props.privateShow = false;
|
|
77271
|
+
} else {
|
|
77272
|
+
clonedNode.props = { pirvateShow: false };
|
|
77273
|
+
}
|
|
77274
|
+
childrenAndRawSpan.push({
|
|
77275
|
+
child: clonedNode,
|
|
77276
|
+
rawChildSpan: 0
|
|
77277
|
+
});
|
|
77278
|
+
return;
|
|
77279
|
+
}
|
|
77280
|
+
child.dirs = child.dirs?.filter(({ dir }) => dir !== vue.vShow) || null;
|
|
77180
77281
|
const clonedChild = vue.cloneVNode(child);
|
|
77181
77282
|
const rawChildSpan = Number(parseResponsivePropValue(clonedChild.props?.span, responsiveQuery) ?? defaultSpan$1);
|
|
77182
77283
|
if (rawChildSpan === 0)
|
|
@@ -77194,7 +77295,7 @@
|
|
|
77194
77295
|
suffixSpan = maybeSuffixNode.props?.span ?? defaultSpan$1;
|
|
77195
77296
|
maybeSuffixNode.props.privateSpan = suffixSpan;
|
|
77196
77297
|
maybeSuffixNode.props.privateColStart = responsiveCols + 1 - suffixSpan;
|
|
77197
|
-
maybeSuffixNode.props.privateShow = true;
|
|
77298
|
+
maybeSuffixNode.props.privateShow = maybeSuffixNode.props.privateShow ?? true;
|
|
77198
77299
|
}
|
|
77199
77300
|
}
|
|
77200
77301
|
let spanCounter = 0;
|
|
@@ -77205,7 +77306,7 @@
|
|
|
77205
77306
|
}
|
|
77206
77307
|
if (!done) {
|
|
77207
77308
|
const childOffset = Number(parseResponsivePropValue(child.props?.offset, responsiveQuery) ?? 0);
|
|
77208
|
-
const childSpan = Math.min(rawChildSpan + childOffset, responsiveCols)
|
|
77309
|
+
const childSpan = Math.min(rawChildSpan + childOffset, responsiveCols);
|
|
77209
77310
|
if (!child.props) {
|
|
77210
77311
|
child.props = {
|
|
77211
77312
|
privateSpan: childSpan,
|
|
@@ -79857,10 +79958,103 @@
|
|
|
79857
79958
|
}
|
|
79858
79959
|
});
|
|
79859
79960
|
|
|
79961
|
+
const resolveOptionsAndHash = function () {
|
|
79962
|
+
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
79963
|
+
const {
|
|
79964
|
+
root = null
|
|
79965
|
+
} = options;
|
|
79966
|
+
return {
|
|
79967
|
+
hash: `${options.rootMargin || "0px 0px 0px 0px"}-${Array.isArray(options.threshold) ? options.threshold.join(",") : options.threshold ?? "0"}`,
|
|
79968
|
+
options: { ...options,
|
|
79969
|
+
root: (typeof root === "string" ? document.querySelector(root) : root) || document.documentElement
|
|
79970
|
+
}
|
|
79971
|
+
};
|
|
79972
|
+
};
|
|
79973
|
+
const observers = /* @__PURE__ */new WeakMap();
|
|
79974
|
+
const unobserveHandleMap = /* @__PURE__ */new WeakMap();
|
|
79975
|
+
const shouldStartLoadingRefMap = /* @__PURE__ */new WeakMap();
|
|
79976
|
+
const observeIntersection = (el, options, shouldStartLoadingRef) => {
|
|
79977
|
+
if (!el) return () => {};
|
|
79978
|
+
const resolvedOptionsAndHash = resolveOptionsAndHash(options);
|
|
79979
|
+
const {
|
|
79980
|
+
root
|
|
79981
|
+
} = resolvedOptionsAndHash.options;
|
|
79982
|
+
let rootObservers;
|
|
79983
|
+
|
|
79984
|
+
const _rootObservers = observers.get(root);
|
|
79985
|
+
|
|
79986
|
+
if (_rootObservers) {
|
|
79987
|
+
rootObservers = _rootObservers;
|
|
79988
|
+
} else {
|
|
79989
|
+
rootObservers = /* @__PURE__ */new Map();
|
|
79990
|
+
observers.set(root, rootObservers);
|
|
79991
|
+
}
|
|
79992
|
+
|
|
79993
|
+
let observer;
|
|
79994
|
+
let observerAndObservedElements;
|
|
79995
|
+
|
|
79996
|
+
if (rootObservers.has(resolvedOptionsAndHash.hash)) {
|
|
79997
|
+
observerAndObservedElements = rootObservers.get(resolvedOptionsAndHash.hash);
|
|
79998
|
+
|
|
79999
|
+
if (!observerAndObservedElements[1].has(el)) {
|
|
80000
|
+
observer = observerAndObservedElements[0];
|
|
80001
|
+
observerAndObservedElements[1].add(el);
|
|
80002
|
+
observer.observe(el);
|
|
80003
|
+
}
|
|
80004
|
+
} else {
|
|
80005
|
+
observer = new IntersectionObserver(entries => {
|
|
80006
|
+
entries.forEach(entry => {
|
|
80007
|
+
if (entry.isIntersecting) {
|
|
80008
|
+
const _unobserve = unobserveHandleMap.get(entry.target);
|
|
80009
|
+
|
|
80010
|
+
const _shouldStartLoadingRef = shouldStartLoadingRefMap.get(entry.target);
|
|
80011
|
+
|
|
80012
|
+
if (_unobserve) _unobserve();
|
|
80013
|
+
|
|
80014
|
+
if (_shouldStartLoadingRef) {
|
|
80015
|
+
_shouldStartLoadingRef.value = true;
|
|
80016
|
+
}
|
|
80017
|
+
}
|
|
80018
|
+
});
|
|
80019
|
+
}, resolvedOptionsAndHash.options);
|
|
80020
|
+
observer.observe(el);
|
|
80021
|
+
observerAndObservedElements = [observer, /* @__PURE__ */new Set([el])];
|
|
80022
|
+
rootObservers.set(resolvedOptionsAndHash.hash, observerAndObservedElements);
|
|
80023
|
+
}
|
|
80024
|
+
|
|
80025
|
+
let unobservered = false;
|
|
80026
|
+
|
|
80027
|
+
const unobserve = () => {
|
|
80028
|
+
if (unobservered) return;
|
|
80029
|
+
unobserveHandleMap.delete(el);
|
|
80030
|
+
shouldStartLoadingRefMap.delete(el);
|
|
80031
|
+
unobservered = true;
|
|
80032
|
+
|
|
80033
|
+
if (observerAndObservedElements[1].has(el)) {
|
|
80034
|
+
observerAndObservedElements[0].unobserve(el);
|
|
80035
|
+
observerAndObservedElements[1].delete(el);
|
|
80036
|
+
}
|
|
80037
|
+
|
|
80038
|
+
if (observerAndObservedElements[1].size <= 0) {
|
|
80039
|
+
rootObservers.delete(resolvedOptionsAndHash.hash);
|
|
80040
|
+
}
|
|
80041
|
+
|
|
80042
|
+
if (!rootObservers.size) {
|
|
80043
|
+
observers.delete(root);
|
|
80044
|
+
}
|
|
80045
|
+
};
|
|
80046
|
+
|
|
80047
|
+
unobserveHandleMap.set(el, unobserve);
|
|
80048
|
+
shouldStartLoadingRefMap.set(el, shouldStartLoadingRef);
|
|
80049
|
+
return unobserve;
|
|
80050
|
+
};
|
|
80051
|
+
|
|
79860
80052
|
const imageProps = {
|
|
79861
80053
|
alt: String,
|
|
79862
80054
|
height: [String, Number],
|
|
79863
80055
|
imgProps: Object,
|
|
80056
|
+
lazy: Boolean,
|
|
80057
|
+
intersectionObserverOptions: Object,
|
|
79864
80058
|
objectFit: {
|
|
79865
80059
|
type: String,
|
|
79866
80060
|
default: "fill"
|
|
@@ -79905,14 +80099,30 @@
|
|
|
79905
80099
|
previewInst.toggleShow();
|
|
79906
80100
|
}
|
|
79907
80101
|
};
|
|
80102
|
+
const shouldStartLoadingRef = vue.ref(!props.lazy);
|
|
79908
80103
|
vue.onMounted(() => {
|
|
79909
80104
|
imageRef.value?.setAttribute("data-group-id", imageGroupHandle?.groupId || "");
|
|
79910
80105
|
});
|
|
80106
|
+
vue.onMounted(() => {
|
|
80107
|
+
let unobserve;
|
|
80108
|
+
const stopWatchHandle = vue.watchEffect(() => {
|
|
80109
|
+
unobserve?.();
|
|
80110
|
+
unobserve = void 0;
|
|
80111
|
+
if (props.lazy) {
|
|
80112
|
+
unobserve = observeIntersection(imageRef.value, props.intersectionObserverOptions, shouldStartLoadingRef);
|
|
80113
|
+
}
|
|
80114
|
+
});
|
|
80115
|
+
vue.onBeforeUnmount(() => {
|
|
80116
|
+
stopWatchHandle();
|
|
80117
|
+
unobserve?.();
|
|
80118
|
+
});
|
|
80119
|
+
});
|
|
79911
80120
|
vue.watchEffect(() => {
|
|
79912
80121
|
void props.src;
|
|
79913
80122
|
void props.imgProps?.src;
|
|
79914
80123
|
showErrorRef.value = false;
|
|
79915
80124
|
});
|
|
80125
|
+
const loadedRef = vue.ref(false);
|
|
79916
80126
|
return {
|
|
79917
80127
|
mergedClsPrefix: mergedClsPrefixRef,
|
|
79918
80128
|
groupId: imageGroupHandle?.groupId,
|
|
@@ -79920,6 +80130,8 @@
|
|
|
79920
80130
|
imageRef,
|
|
79921
80131
|
imgProps: imgPropsRef,
|
|
79922
80132
|
showError: showErrorRef,
|
|
80133
|
+
shouldStartLoading: shouldStartLoadingRef,
|
|
80134
|
+
loaded: loadedRef,
|
|
79923
80135
|
mergedOnError: (e) => {
|
|
79924
80136
|
showErrorRef.value = true;
|
|
79925
80137
|
const { onError, imgProps: { onError: imgPropsOnError } = {} } = props;
|
|
@@ -79930,25 +80142,31 @@
|
|
|
79930
80142
|
const { onLoad, imgProps: { onLoad: imgPropsOnLoad } = {} } = props;
|
|
79931
80143
|
onLoad?.(e);
|
|
79932
80144
|
imgPropsOnLoad?.(e);
|
|
80145
|
+
loadedRef.value = true;
|
|
79933
80146
|
},
|
|
79934
80147
|
...exposedMethods
|
|
79935
80148
|
};
|
|
79936
80149
|
},
|
|
79937
80150
|
render() {
|
|
79938
|
-
const { mergedClsPrefix, imgProps = {}, $attrs } = this;
|
|
80151
|
+
const { mergedClsPrefix, imgProps = {}, loaded, $attrs } = this;
|
|
80152
|
+
const placeholderNode = this.$slots.placeholder?.();
|
|
79939
80153
|
const imgNode = /* @__PURE__ */ vue.h("img", {
|
|
79940
80154
|
...imgProps,
|
|
79941
80155
|
class: imgProps.class,
|
|
79942
80156
|
ref: "imageRef",
|
|
79943
80157
|
width: this.width || imgProps.width,
|
|
79944
80158
|
height: this.height || imgProps.height,
|
|
79945
|
-
src: this.showError ? this.fallbackSrc : this.src || imgProps.src,
|
|
80159
|
+
src: this.showError ? this.fallbackSrc : this.shouldStartLoading ? this.src || imgProps.src : void 0,
|
|
79946
80160
|
alt: this.alt || imgProps.alt,
|
|
79947
80161
|
"aria-label": this.alt || imgProps.alt,
|
|
79948
80162
|
onClick: this.click,
|
|
79949
80163
|
onError: this.mergedOnError,
|
|
79950
80164
|
onLoad: this.mergedOnLoad,
|
|
79951
|
-
style: [
|
|
80165
|
+
style: [
|
|
80166
|
+
imgProps.style || "",
|
|
80167
|
+
placeholderNode && !loaded ? { height: "0", width: "0", visibility: "hidden" } : "",
|
|
80168
|
+
{ objectFit: this.objectFit }
|
|
80169
|
+
],
|
|
79952
80170
|
"data-error": this.showError,
|
|
79953
80171
|
"data-preview-src": this.previewSrc || this.src
|
|
79954
80172
|
});
|
|
@@ -79969,7 +80187,7 @@
|
|
|
79969
80187
|
showToolbarTooltip: this.showToolbarTooltip
|
|
79970
80188
|
}, {
|
|
79971
80189
|
default: () => imgNode
|
|
79972
|
-
}));
|
|
80190
|
+
}), !loaded && placeholderNode);
|
|
79973
80191
|
}
|
|
79974
80192
|
});
|
|
79975
80193
|
|
|
@@ -96390,7 +96608,7 @@
|
|
|
96390
96608
|
createDiscreteApi: createDiscreteApi
|
|
96391
96609
|
});
|
|
96392
96610
|
|
|
96393
|
-
var version = "2.30.
|
|
96611
|
+
var version = "2.30.5";
|
|
96394
96612
|
|
|
96395
96613
|
function create() {
|
|
96396
96614
|
let {
|