@oliasoft-open-source/react-ui-library 4.20.2 → 4.20.3-beta-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.d.ts +2 -2
- package/dist/index.js +28 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1205,8 +1205,8 @@ export declare interface ISettingFieldProps {
|
|
|
1205
1205
|
helpText?: string;
|
|
1206
1206
|
disabled?: boolean;
|
|
1207
1207
|
noPermission?: boolean;
|
|
1208
|
-
selectedOption?:
|
|
1209
|
-
handleSelectChange?: (
|
|
1208
|
+
selectedOption?: boolean;
|
|
1209
|
+
handleSelectChange?: () => void;
|
|
1210
1210
|
}
|
|
1211
1211
|
|
|
1212
1212
|
export declare interface ISideBarProps {
|
package/dist/index.js
CHANGED
|
@@ -14484,20 +14484,12 @@ class Virtualizer {
|
|
|
14484
14484
|
const size2 = this.getSize();
|
|
14485
14485
|
const scrollOffset = this.getScrollOffset();
|
|
14486
14486
|
if (align === "auto") {
|
|
14487
|
-
if (toOffset
|
|
14488
|
-
align = "start";
|
|
14489
|
-
} else if (toOffset >= scrollOffset + size2) {
|
|
14487
|
+
if (toOffset >= scrollOffset + size2) {
|
|
14490
14488
|
align = "end";
|
|
14491
|
-
} else {
|
|
14492
|
-
align = "start";
|
|
14493
14489
|
}
|
|
14494
14490
|
}
|
|
14495
|
-
if (align === "
|
|
14496
|
-
toOffset
|
|
14497
|
-
} else if (align === "end") {
|
|
14498
|
-
toOffset = toOffset - size2;
|
|
14499
|
-
} else if (align === "center") {
|
|
14500
|
-
toOffset = toOffset - size2 / 2;
|
|
14491
|
+
if (align === "end") {
|
|
14492
|
+
toOffset -= size2;
|
|
14501
14493
|
}
|
|
14502
14494
|
const scrollSizeProp = this.options.horizontal ? "scrollWidth" : "scrollHeight";
|
|
14503
14495
|
const scrollSize = this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[scrollSizeProp] : this.scrollElement[scrollSizeProp] : 0;
|
|
@@ -14521,8 +14513,27 @@ class Virtualizer {
|
|
|
14521
14513
|
return [scrollOffset, align];
|
|
14522
14514
|
}
|
|
14523
14515
|
}
|
|
14524
|
-
const
|
|
14525
|
-
|
|
14516
|
+
const centerOffset = item2.start - this.options.scrollPaddingStart + (item2.size - size2) / 2;
|
|
14517
|
+
switch (align) {
|
|
14518
|
+
case "center":
|
|
14519
|
+
return [this.getOffsetForAlignment(centerOffset, align), align];
|
|
14520
|
+
case "end":
|
|
14521
|
+
return [
|
|
14522
|
+
this.getOffsetForAlignment(
|
|
14523
|
+
item2.end + this.options.scrollPaddingEnd,
|
|
14524
|
+
align
|
|
14525
|
+
),
|
|
14526
|
+
align
|
|
14527
|
+
];
|
|
14528
|
+
default:
|
|
14529
|
+
return [
|
|
14530
|
+
this.getOffsetForAlignment(
|
|
14531
|
+
item2.start - this.options.scrollPaddingStart,
|
|
14532
|
+
align
|
|
14533
|
+
),
|
|
14534
|
+
align
|
|
14535
|
+
];
|
|
14536
|
+
}
|
|
14526
14537
|
};
|
|
14527
14538
|
this.isDynamicMode = () => this.elementsCache.size > 0;
|
|
14528
14539
|
this.cancelScrollToIndex = () => {
|
|
@@ -14666,7 +14677,7 @@ function useVirtualizerBase(options) {
|
|
|
14666
14677
|
() => new Virtualizer(resolvedOptions)
|
|
14667
14678
|
);
|
|
14668
14679
|
instance.setOptions(resolvedOptions);
|
|
14669
|
-
|
|
14680
|
+
useIsomorphicLayoutEffect$4(() => {
|
|
14670
14681
|
return instance._didMount();
|
|
14671
14682
|
}, []);
|
|
14672
14683
|
useIsomorphicLayoutEffect$4(() => {
|
|
@@ -67092,8 +67103,8 @@ const SettingField = ({
|
|
|
67092
67103
|
] }, index2));
|
|
67093
67104
|
};
|
|
67094
67105
|
const options = [
|
|
67095
|
-
{ label: "All users", value:
|
|
67096
|
-
{ label: "Admin only", value:
|
|
67106
|
+
{ label: "All users", value: false },
|
|
67107
|
+
{ label: "Admin only", value: true }
|
|
67097
67108
|
];
|
|
67098
67109
|
return /* @__PURE__ */ jsxs("div", { className: styles.settingField, children: [
|
|
67099
67110
|
/* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", wrap: false, children: [
|
|
@@ -67107,9 +67118,7 @@ const SettingField = ({
|
|
|
67107
67118
|
options,
|
|
67108
67119
|
value: selectedOption,
|
|
67109
67120
|
disabled: disabled2,
|
|
67110
|
-
onChange: handleSelectChange
|
|
67111
|
-
e2.target.value
|
|
67112
|
-
) : void 0,
|
|
67121
|
+
onChange: handleSelectChange || void 0,
|
|
67113
67122
|
"aria-label": "Select user type",
|
|
67114
67123
|
width: "auto"
|
|
67115
67124
|
}
|