@public-ui/hydrate 2.2.11-rc.2 → 2.2.11
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 +29 -18
- package/dist/index.mjs +29 -18
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -12687,16 +12687,21 @@ const flip$1 = function (options) {
|
|
|
12687
12687
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
12688
12688
|
const nextPlacement = placements[nextIndex];
|
|
12689
12689
|
if (nextPlacement) {
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
12690
|
+
var _overflowsData$;
|
|
12691
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
12692
|
+
const hasInitialMainAxisOverflow = ((_overflowsData$ = overflowsData[0]) == null ? void 0 : _overflowsData$.overflows[0]) > 0;
|
|
12693
|
+
if (!ignoreCrossAxisOverflow || hasInitialMainAxisOverflow) {
|
|
12694
|
+
// Try next placement and re-run the lifecycle.
|
|
12695
|
+
return {
|
|
12696
|
+
data: {
|
|
12697
|
+
index: nextIndex,
|
|
12698
|
+
overflows: overflowsData
|
|
12699
|
+
},
|
|
12700
|
+
reset: {
|
|
12701
|
+
placement: nextPlacement
|
|
12702
|
+
}
|
|
12703
|
+
};
|
|
12704
|
+
}
|
|
12700
12705
|
}
|
|
12701
12706
|
|
|
12702
12707
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
@@ -13778,6 +13783,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
13778
13783
|
scrollTop: 0
|
|
13779
13784
|
};
|
|
13780
13785
|
const offsets = createCoords(0);
|
|
13786
|
+
|
|
13787
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
13788
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
13789
|
+
function setLeftRTLScrollbarOffset() {
|
|
13790
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
13791
|
+
}
|
|
13781
13792
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
13782
13793
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
13783
13794
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -13787,11 +13798,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
13787
13798
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
13788
13799
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
13789
13800
|
} else if (documentElement) {
|
|
13790
|
-
|
|
13791
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
13792
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
13801
|
+
setLeftRTLScrollbarOffset();
|
|
13793
13802
|
}
|
|
13794
13803
|
}
|
|
13804
|
+
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
13805
|
+
setLeftRTLScrollbarOffset();
|
|
13806
|
+
}
|
|
13795
13807
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
13796
13808
|
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
13797
13809
|
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
@@ -13968,7 +13980,7 @@ function observeMove(element, onMove) {
|
|
|
13968
13980
|
// Handle <iframe>s
|
|
13969
13981
|
root: root.ownerDocument
|
|
13970
13982
|
});
|
|
13971
|
-
} catch (
|
|
13983
|
+
} catch (_e) {
|
|
13972
13984
|
io = new IntersectionObserver(handleObserve, options);
|
|
13973
13985
|
}
|
|
13974
13986
|
io.observe(element);
|
|
@@ -24248,9 +24260,9 @@ class KolTableStateful {
|
|
|
24248
24260
|
setState(this, '_sortedData', this.state._data);
|
|
24249
24261
|
return;
|
|
24250
24262
|
}
|
|
24251
|
-
let sortedData = this.state._data;
|
|
24263
|
+
let sortedData = [...this.state._data];
|
|
24252
24264
|
if (this.sortData.length > 0) {
|
|
24253
|
-
sortedData
|
|
24265
|
+
sortedData.sort((a, b) => {
|
|
24254
24266
|
for (let index = 0; index < this.sortData.length; index++) {
|
|
24255
24267
|
const data = this.sortData[index];
|
|
24256
24268
|
const result = data.compareFn(a, b);
|
|
@@ -24273,7 +24285,6 @@ class KolTableStateful {
|
|
|
24273
24285
|
break;
|
|
24274
24286
|
case 'NOS':
|
|
24275
24287
|
default:
|
|
24276
|
-
sortedData = [...this.state._data];
|
|
24277
24288
|
this.sortedColumnHead = { label: '', key: '', sortDirection: 'NOS' };
|
|
24278
24289
|
}
|
|
24279
24290
|
}
|
|
@@ -24565,7 +24576,7 @@ class KolTableStateful {
|
|
|
24565
24576
|
horizontal: (_c = this.state._headers.horizontal) === null || _c === void 0 ? void 0 : _c.map((row) => row.map((cell) => (Object.assign(Object.assign({}, cell), { sortDirection: this.getHeaderCellSortState(cell) })))),
|
|
24566
24577
|
vertical: (_d = this.state._headers.vertical) === null || _d === void 0 ? void 0 : _d.map((column) => column.map((cell) => (Object.assign(Object.assign({}, cell), { sortDirection: this.getHeaderCellSortState(cell) })))),
|
|
24567
24578
|
};
|
|
24568
|
-
return (hAsync(Host, { key: '
|
|
24579
|
+
return (hAsync(Host, { key: 'c26b8fd4eadc144bf4a4f10adfd6feaf0cba9ff8', class: "kol-table-stateful" }, this.pageEndSlice > 0 && this.showPagination && paginationTop, hAsync(KolTableStatelessWcTag, { key: 'c2cee411489eed9f0e249185ad820f03fecfffe8', ref: this.catchRef, _data: displayedData, _headerCells: headerCells, _label: this.state._label, _dataFoot: this.state._dataFoot, _minWidth: this.state._minWidth, _on: {
|
|
24569
24580
|
onSort: (_, payload) => {
|
|
24570
24581
|
this.handleSort(payload);
|
|
24571
24582
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -12683,16 +12683,21 @@ const flip$1 = function (options) {
|
|
|
12683
12683
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
12684
12684
|
const nextPlacement = placements[nextIndex];
|
|
12685
12685
|
if (nextPlacement) {
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12686
|
+
var _overflowsData$;
|
|
12687
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
12688
|
+
const hasInitialMainAxisOverflow = ((_overflowsData$ = overflowsData[0]) == null ? void 0 : _overflowsData$.overflows[0]) > 0;
|
|
12689
|
+
if (!ignoreCrossAxisOverflow || hasInitialMainAxisOverflow) {
|
|
12690
|
+
// Try next placement and re-run the lifecycle.
|
|
12691
|
+
return {
|
|
12692
|
+
data: {
|
|
12693
|
+
index: nextIndex,
|
|
12694
|
+
overflows: overflowsData
|
|
12695
|
+
},
|
|
12696
|
+
reset: {
|
|
12697
|
+
placement: nextPlacement
|
|
12698
|
+
}
|
|
12699
|
+
};
|
|
12700
|
+
}
|
|
12696
12701
|
}
|
|
12697
12702
|
|
|
12698
12703
|
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
@@ -13774,6 +13779,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
13774
13779
|
scrollTop: 0
|
|
13775
13780
|
};
|
|
13776
13781
|
const offsets = createCoords(0);
|
|
13782
|
+
|
|
13783
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
13784
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
13785
|
+
function setLeftRTLScrollbarOffset() {
|
|
13786
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
13787
|
+
}
|
|
13777
13788
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
13778
13789
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
13779
13790
|
scroll = getNodeScroll(offsetParent);
|
|
@@ -13783,11 +13794,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
13783
13794
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
13784
13795
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
13785
13796
|
} else if (documentElement) {
|
|
13786
|
-
|
|
13787
|
-
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
13788
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
13797
|
+
setLeftRTLScrollbarOffset();
|
|
13789
13798
|
}
|
|
13790
13799
|
}
|
|
13800
|
+
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
13801
|
+
setLeftRTLScrollbarOffset();
|
|
13802
|
+
}
|
|
13791
13803
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
13792
13804
|
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
13793
13805
|
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
@@ -13964,7 +13976,7 @@ function observeMove(element, onMove) {
|
|
|
13964
13976
|
// Handle <iframe>s
|
|
13965
13977
|
root: root.ownerDocument
|
|
13966
13978
|
});
|
|
13967
|
-
} catch (
|
|
13979
|
+
} catch (_e) {
|
|
13968
13980
|
io = new IntersectionObserver(handleObserve, options);
|
|
13969
13981
|
}
|
|
13970
13982
|
io.observe(element);
|
|
@@ -24244,9 +24256,9 @@ class KolTableStateful {
|
|
|
24244
24256
|
setState(this, '_sortedData', this.state._data);
|
|
24245
24257
|
return;
|
|
24246
24258
|
}
|
|
24247
|
-
let sortedData = this.state._data;
|
|
24259
|
+
let sortedData = [...this.state._data];
|
|
24248
24260
|
if (this.sortData.length > 0) {
|
|
24249
|
-
sortedData
|
|
24261
|
+
sortedData.sort((a, b) => {
|
|
24250
24262
|
for (let index = 0; index < this.sortData.length; index++) {
|
|
24251
24263
|
const data = this.sortData[index];
|
|
24252
24264
|
const result = data.compareFn(a, b);
|
|
@@ -24269,7 +24281,6 @@ class KolTableStateful {
|
|
|
24269
24281
|
break;
|
|
24270
24282
|
case 'NOS':
|
|
24271
24283
|
default:
|
|
24272
|
-
sortedData = [...this.state._data];
|
|
24273
24284
|
this.sortedColumnHead = { label: '', key: '', sortDirection: 'NOS' };
|
|
24274
24285
|
}
|
|
24275
24286
|
}
|
|
@@ -24561,7 +24572,7 @@ class KolTableStateful {
|
|
|
24561
24572
|
horizontal: (_c = this.state._headers.horizontal) === null || _c === void 0 ? void 0 : _c.map((row) => row.map((cell) => (Object.assign(Object.assign({}, cell), { sortDirection: this.getHeaderCellSortState(cell) })))),
|
|
24562
24573
|
vertical: (_d = this.state._headers.vertical) === null || _d === void 0 ? void 0 : _d.map((column) => column.map((cell) => (Object.assign(Object.assign({}, cell), { sortDirection: this.getHeaderCellSortState(cell) })))),
|
|
24563
24574
|
};
|
|
24564
|
-
return (hAsync(Host, { key: '
|
|
24575
|
+
return (hAsync(Host, { key: 'c26b8fd4eadc144bf4a4f10adfd6feaf0cba9ff8', class: "kol-table-stateful" }, this.pageEndSlice > 0 && this.showPagination && paginationTop, hAsync(KolTableStatelessWcTag, { key: 'c2cee411489eed9f0e249185ad820f03fecfffe8', ref: this.catchRef, _data: displayedData, _headerCells: headerCells, _label: this.state._label, _dataFoot: this.state._dataFoot, _minWidth: this.state._minWidth, _on: {
|
|
24565
24576
|
onSort: (_, payload) => {
|
|
24566
24577
|
this.handleSort(payload);
|
|
24567
24578
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/hydrate",
|
|
3
|
-
"version": "2.2.11
|
|
3
|
+
"version": "2.2.11",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": {
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
],
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"rimraf": "6.0.1",
|
|
49
|
-
"@public-ui/components": "2.2.11
|
|
49
|
+
"@public-ui/components": "2.2.11"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@public-ui/components": "2.2.11
|
|
52
|
+
"@public-ui/components": "2.2.11"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"type": "commonjs",
|