@oliasoft-open-source/react-ui-library 4.20.10 → 4.20.11-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/README.md +55 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +64 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -142,6 +142,7 @@ To quickly start a new project using the React UI Library with Vite, you can use
|
|
|
142
142
|
- [Tree](#tree)
|
|
143
143
|
- [NumberInput](#numberinput)
|
|
144
144
|
- [UnitInput](#unitinput)
|
|
145
|
+
- [UnitTable](#unittable)
|
|
145
146
|
|
|
146
147
|
## Storybook
|
|
147
148
|
|
|
@@ -2062,6 +2063,60 @@ The `Table` component renders tabular data with various customization options.
|
|
|
2062
2063
|
|
|
2063
2064
|
<hr style="border: none; border-right: 2px solid black; width: 100%; height: 1px;">
|
|
2064
2065
|
|
|
2066
|
+
## UnitTable Component <a id="unittable"></a>
|
|
2067
|
+
|
|
2068
|
+
The `UnitTable` component is a wrapper around `Table`, with local state and additional logic to handle displaying tables in preferred units, and converting return values when cells are edited.
|
|
2069
|
+
|
|
2070
|
+
### Props
|
|
2071
|
+
|
|
2072
|
+
| Prop | Description | Default Value |
|
|
2073
|
+
|--------------------------|------------------------------------------------------------------------------------------------------------------------|---------------|
|
|
2074
|
+
| `table` | An object containing table configuration, similar to `ITableTableProps`. | |
|
|
2075
|
+
| `unitConfig` | Array of unit configuration objects, each with `unitKey`, `storageUnit`, optional `preferredUnit`, and `onChange` callback. See [unitConfig item structure](#unitconfig-item-structure). | |
|
|
2076
|
+
| `convertBackToStorageUnit` | Whether values should be converted back to the storage unit when edited. | `true` |
|
|
2077
|
+
| `enableCosmeticRounding` | Enables cosmetic rounding of displayed values (Excel-style) to reduce visual precision noise. | `true` |
|
|
2078
|
+
| `enableDisplayRounding` | Enables rounding of displayed values in number inputs until the cell is focused. | `true` |
|
|
2079
|
+
| `onListReorder` | Function called when rows are reordered via drag-and-drop. Receives `{ from: number; to: number }` as an argument. | `() => {}` |
|
|
2080
|
+
| `canListReorder` | Function to determine whether a row can be reordered. Receives `{ from: number; to: number }` as an argument and returns `boolean`. | `() => true` |
|
|
2081
|
+
|
|
2082
|
+
---
|
|
2083
|
+
|
|
2084
|
+
### `unitConfig` Item Structure
|
|
2085
|
+
|
|
2086
|
+
Each object in the `unitConfig` array should have the following shape:
|
|
2087
|
+
|
|
2088
|
+
| Key | Type | Description |
|
|
2089
|
+
|------------------|---------------------------------------|------------------------------------------------------------------------------------------------------------------------|
|
|
2090
|
+
| `unitKey` | `string` | Key representing the type of unit (e.g., `length`, `temperature`, `density`). |
|
|
2091
|
+
| `storageUnit` | `string` | The unit in which data is stored internally (e.g., `m`, `ft`, `C`, `sg`). |
|
|
2092
|
+
| `preferredUnit` | `string` _(optional)_ | The user's preferred display unit (e.g., `ft`, `F`, `ppg`). |
|
|
2093
|
+
| `onChange` | `(params: { oldUnit: string; newUnit: string; unitKey: string }) => void` _(optional)_ | Callback when the display unit is changed by the user. |
|
|
2094
|
+
|
|
2095
|
+
---
|
|
2096
|
+
|
|
2097
|
+
### Usage Example
|
|
2098
|
+
|
|
2099
|
+
```jsx
|
|
2100
|
+
<UnitTable
|
|
2101
|
+
table={{
|
|
2102
|
+
draggable: true,
|
|
2103
|
+
headers: [...],
|
|
2104
|
+
rows: [...],
|
|
2105
|
+
}}
|
|
2106
|
+
unitConfig={[
|
|
2107
|
+
{
|
|
2108
|
+
unitKey: 'length',
|
|
2109
|
+
storageUnit: 'm',
|
|
2110
|
+
preferredUnit: 'ft',
|
|
2111
|
+
onChange: ({ oldUnit, newUnit, unitKey }) =>
|
|
2112
|
+
console.log(`Unit changed for ${unitKey} from ${oldUnit} to ${newUnit}`),
|
|
2113
|
+
},
|
|
2114
|
+
]}
|
|
2115
|
+
onListReorder={({ from, to }) => console.log(`Moved row from ${from} to ${to}`)}
|
|
2116
|
+
canListReorder={({ from, to }) => from !== to}
|
|
2117
|
+
/>
|
|
2118
|
+
```
|
|
2119
|
+
|
|
2065
2120
|
## Tabs Component <a id="tabs"></a>
|
|
2066
2121
|
|
|
2067
2122
|
The `Tabs` component creates a tabbed interface for organizing content.
|
package/dist/index.d.ts
CHANGED
|
@@ -1652,6 +1652,14 @@ export declare interface IUnitTableProps extends Omit<ITableProps, 'table'> {
|
|
|
1652
1652
|
convertBackToStorageUnit?: boolean;
|
|
1653
1653
|
enableCosmeticRounding?: boolean;
|
|
1654
1654
|
enableDisplayRounding?: boolean;
|
|
1655
|
+
onListReorder?: (obj: {
|
|
1656
|
+
from: number;
|
|
1657
|
+
to: number;
|
|
1658
|
+
}) => void;
|
|
1659
|
+
canListReorder?: (obj: {
|
|
1660
|
+
from: number;
|
|
1661
|
+
to: number;
|
|
1662
|
+
}) => boolean;
|
|
1655
1663
|
}
|
|
1656
1664
|
|
|
1657
1665
|
export declare interface IUnitTableRow extends Omit<TRowType, 'cells'> {
|
|
@@ -1919,7 +1927,7 @@ declare type UnitContextType = any;
|
|
|
1919
1927
|
|
|
1920
1928
|
export declare const UnitInput: ({ name, placeholder, disabled, disabledUnit, error, left, small, width, value, unitkey, initUnit, noConversion, onChange, onClick, onFocus, onSwitchUnit, unitTemplate, testId, warning, predefinedOptions, initialPredefinedOption, shouldLinkAutomaticly, selectedPredefinedOptionKey, validationCallback, disabledValidation, allowEmpty, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, roundDisplayValue, selectOnFocus, groupOrder, }: IUnitInputProps) => JSX_2.Element;
|
|
1921
1929
|
|
|
1922
|
-
export declare const UnitTable: ({ table, unitConfig, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, }: IUnitTableProps) => JSX_2.Element;
|
|
1930
|
+
export declare const UnitTable: ({ table, unitConfig, convertBackToStorageUnit, enableCosmeticRounding, enableDisplayRounding, onListReorder, canListReorder, }: IUnitTableProps) => JSX_2.Element;
|
|
1923
1931
|
|
|
1924
1932
|
export declare const useFocus: () => UseFocusReturnType;
|
|
1925
1933
|
|
package/dist/index.js
CHANGED
|
@@ -199,21 +199,27 @@ function _objectWithoutPropertiesLoose$5(r2, e2) {
|
|
|
199
199
|
}
|
|
200
200
|
return t;
|
|
201
201
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
var _extends$6 = { exports: {} };
|
|
203
|
+
var hasRequired_extends;
|
|
204
|
+
function require_extends() {
|
|
205
|
+
if (hasRequired_extends) return _extends$6.exports;
|
|
206
|
+
hasRequired_extends = 1;
|
|
207
|
+
(function(module) {
|
|
208
|
+
function _extends3() {
|
|
209
|
+
return module.exports = _extends3 = Object.assign ? Object.assign.bind() : function(n2) {
|
|
210
|
+
for (var e2 = 1; e2 < arguments.length; e2++) {
|
|
211
|
+
var t = arguments[e2];
|
|
212
|
+
for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]);
|
|
213
|
+
}
|
|
214
|
+
return n2;
|
|
215
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends3.apply(null, arguments);
|
|
207
216
|
}
|
|
208
|
-
|
|
209
|
-
}
|
|
217
|
+
module.exports = _extends3, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
218
|
+
})(_extends$6);
|
|
219
|
+
return _extends$6.exports;
|
|
210
220
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
get default() {
|
|
214
|
-
return _extends$4;
|
|
215
|
-
}
|
|
216
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
221
|
+
var _extendsExports = require_extends();
|
|
222
|
+
const _extends$5 = /* @__PURE__ */ getDefaultExportFromCjs(_extendsExports);
|
|
217
223
|
function _setPrototypeOf$3(t, e2) {
|
|
218
224
|
return _setPrototypeOf$3 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e3) {
|
|
219
225
|
return t2.__proto__ = e3, t2;
|
|
@@ -792,7 +798,7 @@ var ReactSVG = /* @__PURE__ */ function(_React$Component) {
|
|
|
792
798
|
};
|
|
793
799
|
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
794
800
|
var _this3 = this;
|
|
795
|
-
if (shallowDiffers(_extends$
|
|
801
|
+
if (shallowDiffers(_extends$5({}, prevProps), this.props)) {
|
|
796
802
|
this.setState(function() {
|
|
797
803
|
return _this3.initialState;
|
|
798
804
|
}, function() {
|
|
@@ -820,7 +826,7 @@ var ReactSVG = /* @__PURE__ */ function(_React$Component) {
|
|
|
820
826
|
_this$props2.useRequestCache;
|
|
821
827
|
var wrapper2 = _this$props2.wrapper, rest = _objectWithoutPropertiesLoose$5(_this$props2, _excluded$8);
|
|
822
828
|
var Wrapper2 = wrapper2;
|
|
823
|
-
return /* @__PURE__ */ React$4.createElement(Wrapper2, _extends$
|
|
829
|
+
return /* @__PURE__ */ React$4.createElement(Wrapper2, _extends$5({}, rest, {
|
|
824
830
|
ref: this.refCallback
|
|
825
831
|
}, wrapper2 === "svg" ? {
|
|
826
832
|
xmlns: svgNamespace,
|
|
@@ -2235,8 +2241,8 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
2235
2241
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
2236
2242
|
return Constructor;
|
|
2237
2243
|
}
|
|
2238
|
-
function _extends$
|
|
2239
|
-
_extends$
|
|
2244
|
+
function _extends$4() {
|
|
2245
|
+
_extends$4 = Object.assign || function(target) {
|
|
2240
2246
|
for (var i = 1; i < arguments.length; i++) {
|
|
2241
2247
|
var source = arguments[i];
|
|
2242
2248
|
for (var key2 in source) {
|
|
@@ -2247,7 +2253,7 @@ function _extends$3() {
|
|
|
2247
2253
|
}
|
|
2248
2254
|
return target;
|
|
2249
2255
|
};
|
|
2250
|
-
return _extends$
|
|
2256
|
+
return _extends$4.apply(this, arguments);
|
|
2251
2257
|
}
|
|
2252
2258
|
function _inheritsLoose$2(subClass, superClass) {
|
|
2253
2259
|
subClass.prototype = Object.create(superClass.prototype);
|
|
@@ -2571,7 +2577,7 @@ function useTrackElements(_ref) {
|
|
|
2571
2577
|
var layerRef = useTrackRef(useCallback(function(layer2) {
|
|
2572
2578
|
var _get3 = get3(), previousLayer = _get3.layer;
|
|
2573
2579
|
set2(function(state) {
|
|
2574
|
-
return _extends$
|
|
2580
|
+
return _extends$4({}, state, {
|
|
2575
2581
|
layer: layer2
|
|
2576
2582
|
});
|
|
2577
2583
|
});
|
|
@@ -2594,7 +2600,7 @@ function useTrackElements(_ref) {
|
|
|
2594
2600
|
var scrollContainers = getScrollContainers(trigger2);
|
|
2595
2601
|
var _get4 = get3(), previousTrigger = _get4.trigger;
|
|
2596
2602
|
set2(function(state) {
|
|
2597
|
-
return _extends$
|
|
2603
|
+
return _extends$4({}, state, {
|
|
2598
2604
|
trigger: trigger2,
|
|
2599
2605
|
scrollContainers
|
|
2600
2606
|
});
|
|
@@ -2607,7 +2613,7 @@ function useTrackElements(_ref) {
|
|
|
2607
2613
|
return;
|
|
2608
2614
|
}
|
|
2609
2615
|
set2(function(state) {
|
|
2610
|
-
return _extends$
|
|
2616
|
+
return _extends$4({}, state, {
|
|
2611
2617
|
scrollContainers: getScrollContainers(triggerOptionParent)
|
|
2612
2618
|
});
|
|
2613
2619
|
});
|
|
@@ -2774,7 +2780,7 @@ var BoundSide = {
|
|
|
2774
2780
|
left: /* @__PURE__ */ createSide("left"),
|
|
2775
2781
|
right: /* @__PURE__ */ createSide("right")
|
|
2776
2782
|
};
|
|
2777
|
-
var Side = /* @__PURE__ */ _extends$
|
|
2783
|
+
var Side = /* @__PURE__ */ _extends$4({}, BoundSide, {
|
|
2778
2784
|
center: /* @__PURE__ */ createSide("center")
|
|
2779
2785
|
});
|
|
2780
2786
|
var SIDES = ["top", "left", "bottom", "right"];
|
|
@@ -2870,7 +2876,7 @@ var Bounds = /* @__PURE__ */ function() {
|
|
|
2870
2876
|
var _environment$getCompu = environment2.getComputedStyle(element), width2 = _environment$getCompu.width, height2 = _environment$getCompu.height, boxSizing = _environment$getCompu.boxSizing, borderLeft = _environment$getCompu.borderLeft, borderRight = _environment$getCompu.borderRight, borderTop = _environment$getCompu.borderTop, borderBottom = _environment$getCompu.borderBottom, paddingLeft = _environment$getCompu.paddingLeft, paddingRight = _environment$getCompu.paddingRight, paddingTop = _environment$getCompu.paddingTop, paddingBottom = _environment$getCompu.paddingBottom;
|
|
2871
2877
|
var boxWidth = boxSizing === "border-box" ? getPixelValue(width2) : sumOfPropertyValues(width2, borderLeft, borderRight, paddingLeft, paddingRight);
|
|
2872
2878
|
var boxHeight = boxSizing === "border-box" ? getPixelValue(height2) : sumOfPropertyValues(height2, borderTop, borderBottom, paddingTop, paddingBottom);
|
|
2873
|
-
bounds = new Bounds2(_extends$
|
|
2879
|
+
bounds = new Bounds2(_extends$4({}, bounds, {
|
|
2874
2880
|
width: boxWidth,
|
|
2875
2881
|
height: boxHeight
|
|
2876
2882
|
}));
|
|
@@ -2917,7 +2923,7 @@ var Bounds = /* @__PURE__ */ function() {
|
|
|
2917
2923
|
};
|
|
2918
2924
|
_proto.merge = function merge(partialBoundsOrMergeFn) {
|
|
2919
2925
|
var current = this.toObject();
|
|
2920
|
-
return new Bounds2(_extends$
|
|
2926
|
+
return new Bounds2(_extends$4({}, current, typeof partialBoundsOrMergeFn === "function" ? partialBoundsOrMergeFn(current) : partialBoundsOrMergeFn));
|
|
2921
2927
|
};
|
|
2922
2928
|
_proto.substract = function substract(bounds) {
|
|
2923
2929
|
var result = this.toObject();
|
|
@@ -2984,7 +2990,7 @@ var Placement = /* @__PURE__ */ function() {
|
|
|
2984
2990
|
typeof layerDimensions === "function" ? layerDimensions(this.primary.prop) : layerDimensions
|
|
2985
2991
|
);
|
|
2986
2992
|
this.subjectsBounds = subjectBounds.merge({
|
|
2987
|
-
layer: _extends$
|
|
2993
|
+
layer: _extends$4({}, subjectBounds.layer, dimensions)
|
|
2988
2994
|
});
|
|
2989
2995
|
};
|
|
2990
2996
|
_proto.getLayerBounds = function getLayerBounds(secondaryOffset) {
|
|
@@ -3159,7 +3165,7 @@ function getArrowStyle(subjectsBounds, placement, arrowOffset) {
|
|
|
3159
3165
|
var primarySide = placement.primary.prop;
|
|
3160
3166
|
var secondarySide = placement.primary.oppositeCssProp;
|
|
3161
3167
|
var secondaryValue = triggerIsBigger ? layer2[sizeProperty] / 2 + negativeOffset : trigger2[secondarySide] + trigger2[sizeProperty] / 2 - layer2[secondarySide];
|
|
3162
|
-
return _extends$
|
|
3168
|
+
return _extends$4({}, STYLE_BASE, (_extends22 = {}, _extends22[primarySide] = "100%", _extends22[secondarySide] = limit(secondaryValue, min, max), _extends22));
|
|
3163
3169
|
}
|
|
3164
3170
|
var Placements = /* @__PURE__ */ function() {
|
|
3165
3171
|
function Placements2(placements, config, subjectsBounds) {
|
|
@@ -3288,11 +3294,11 @@ var Placements = /* @__PURE__ */ function() {
|
|
|
3288
3294
|
var arrow2 = getArrowStyle(this.subjectsBounds.merge({
|
|
3289
3295
|
layer: layerBounds
|
|
3290
3296
|
}), placement, this.config.arrowOffset);
|
|
3291
|
-
var layer2 = this.config.overflowContainer ? _extends$
|
|
3297
|
+
var layer2 = this.config.overflowContainer ? _extends$4({}, layerStyleBase, {
|
|
3292
3298
|
position: "fixed",
|
|
3293
3299
|
top: layerBounds.top,
|
|
3294
3300
|
left: layerBounds.left
|
|
3295
|
-
}) : _extends$
|
|
3301
|
+
}) : _extends$4({}, layerStyleBase, {
|
|
3296
3302
|
position: "absolute",
|
|
3297
3303
|
top: layerBounds.top - this.subjectsBounds.parent.top + scrollOffsets.top - borderOffsets.top,
|
|
3298
3304
|
left: layerBounds.left - this.subjectsBounds.parent.left + scrollOffsets.left - borderOffsets.left
|
|
@@ -3367,7 +3373,7 @@ var SubjectsBounds = /* @__PURE__ */ function() {
|
|
|
3367
3373
|
};
|
|
3368
3374
|
var _proto = SubjectsBounds2.prototype;
|
|
3369
3375
|
_proto.merge = function merge(subjectsBounds) {
|
|
3370
|
-
return new SubjectsBounds2(_extends$
|
|
3376
|
+
return new SubjectsBounds2(_extends$4({}, this, subjectsBounds), this.overflowContainer);
|
|
3371
3377
|
};
|
|
3372
3378
|
_proto.offsetsToScrollContainers = function offsetsToScrollContainers(subject, allContainers) {
|
|
3373
3379
|
if (allContainers === void 0) {
|
|
@@ -3602,10 +3608,10 @@ var Arrow = /* @__PURE__ */ forwardRef(function Arrow2(_ref2, ref) {
|
|
|
3602
3608
|
var sizeA = size2;
|
|
3603
3609
|
var sizeB = getWidthBasedOnAngle(angle, size2) * 2;
|
|
3604
3610
|
var maxSize = Math.max(sizeA, sizeB);
|
|
3605
|
-
return createElement("svg", _extends$
|
|
3611
|
+
return createElement("svg", _extends$4({
|
|
3606
3612
|
ref
|
|
3607
3613
|
}, rest, {
|
|
3608
|
-
style: _extends$
|
|
3614
|
+
style: _extends$4({}, style, {
|
|
3609
3615
|
transform: "translate" + (side.isHorizontal ? "Y" : "X") + "(-50%)"
|
|
3610
3616
|
}),
|
|
3611
3617
|
width: maxSize,
|
|
@@ -8280,8 +8286,8 @@ function _interopRequireWildcard$2(obj, nodeInterop) {
|
|
|
8280
8286
|
}
|
|
8281
8287
|
return newObj;
|
|
8282
8288
|
}
|
|
8283
|
-
function _extends$
|
|
8284
|
-
_extends$
|
|
8289
|
+
function _extends$3() {
|
|
8290
|
+
_extends$3 = Object.assign ? Object.assign.bind() : function(target) {
|
|
8285
8291
|
for (var i = 1; i < arguments.length; i++) {
|
|
8286
8292
|
var source = arguments[i];
|
|
8287
8293
|
for (var key2 in source) {
|
|
@@ -8292,7 +8298,7 @@ function _extends$2() {
|
|
|
8292
8298
|
}
|
|
8293
8299
|
return target;
|
|
8294
8300
|
};
|
|
8295
|
-
return _extends$
|
|
8301
|
+
return _extends$3.apply(this, arguments);
|
|
8296
8302
|
}
|
|
8297
8303
|
function _objectWithoutPropertiesLoose$3(source, excluded) {
|
|
8298
8304
|
if (source == null) return {};
|
|
@@ -8497,7 +8503,7 @@ var Resizable$1 = /* @__PURE__ */ function(_React$Component) {
|
|
|
8497
8503
|
children: [].concat(children.props.children, resizeHandles.map(function(handleAxis) {
|
|
8498
8504
|
var _this3$handleRefs$han;
|
|
8499
8505
|
var ref = (_this3$handleRefs$han = _this3.handleRefs[handleAxis]) != null ? _this3$handleRefs$han : _this3.handleRefs[handleAxis] = /* @__PURE__ */ React$2.createRef();
|
|
8500
|
-
return /* @__PURE__ */ React$2.createElement(_reactDraggable.DraggableCore, _extends$
|
|
8506
|
+
return /* @__PURE__ */ React$2.createElement(_reactDraggable.DraggableCore, _extends$3({}, draggableOpts, {
|
|
8501
8507
|
nodeRef: ref,
|
|
8502
8508
|
key: "resizableHandle-" + handleAxis,
|
|
8503
8509
|
onStop: _this3.resizeHandler("onResizeStop", handleAxis),
|
|
@@ -8568,8 +8574,8 @@ function _interopRequireWildcard$1(obj, nodeInterop) {
|
|
|
8568
8574
|
}
|
|
8569
8575
|
return newObj;
|
|
8570
8576
|
}
|
|
8571
|
-
function _extends$
|
|
8572
|
-
_extends$
|
|
8577
|
+
function _extends$2() {
|
|
8578
|
+
_extends$2 = Object.assign ? Object.assign.bind() : function(target) {
|
|
8573
8579
|
for (var i = 1; i < arguments.length; i++) {
|
|
8574
8580
|
var source = arguments[i];
|
|
8575
8581
|
for (var key2 in source) {
|
|
@@ -8580,7 +8586,7 @@ function _extends$1() {
|
|
|
8580
8586
|
}
|
|
8581
8587
|
return target;
|
|
8582
8588
|
};
|
|
8583
|
-
return _extends$
|
|
8589
|
+
return _extends$2.apply(this, arguments);
|
|
8584
8590
|
}
|
|
8585
8591
|
function ownKeys$1(object2, enumerableOnly) {
|
|
8586
8592
|
var keys2 = Object.keys(object2);
|
|
@@ -8711,7 +8717,7 @@ var ResizableBox = /* @__PURE__ */ function(_React$Component) {
|
|
|
8711
8717
|
resizeHandles,
|
|
8712
8718
|
transformScale,
|
|
8713
8719
|
width: this.state.width
|
|
8714
|
-
}, /* @__PURE__ */ React$1.createElement("div", _extends$
|
|
8720
|
+
}, /* @__PURE__ */ React$1.createElement("div", _extends$2({}, props, {
|
|
8715
8721
|
style: _objectSpread$5(_objectSpread$5({}, style), {}, {
|
|
8716
8722
|
width: this.state.width + "px",
|
|
8717
8723
|
height: this.state.height + "px"
|
|
@@ -15543,6 +15549,15 @@ const useWindowWidth = () => {
|
|
|
15543
15549
|
}, []);
|
|
15544
15550
|
return width2;
|
|
15545
15551
|
};
|
|
15552
|
+
function _extends$1() {
|
|
15553
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) {
|
|
15554
|
+
for (var e2 = 1; e2 < arguments.length; e2++) {
|
|
15555
|
+
var t = arguments[e2];
|
|
15556
|
+
for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]);
|
|
15557
|
+
}
|
|
15558
|
+
return n2;
|
|
15559
|
+
}, _extends$1.apply(null, arguments);
|
|
15560
|
+
}
|
|
15546
15561
|
function _assertThisInitialized(e2) {
|
|
15547
15562
|
if (void 0 === e2) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15548
15563
|
return e2;
|
|
@@ -15915,7 +15930,7 @@ function createListComponent(_ref) {
|
|
|
15915
15930
|
className,
|
|
15916
15931
|
onScroll,
|
|
15917
15932
|
ref: this._outerRefSetter,
|
|
15918
|
-
style: _extends$
|
|
15933
|
+
style: _extends$1({
|
|
15919
15934
|
position: "relative",
|
|
15920
15935
|
height: height2,
|
|
15921
15936
|
width: width2,
|
|
@@ -48009,7 +48024,6 @@ var interopRequireDefault = { exports: {} };
|
|
|
48009
48024
|
module.exports = _interopRequireDefault2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
48010
48025
|
})(interopRequireDefault);
|
|
48011
48026
|
var interopRequireDefaultExports = interopRequireDefault.exports;
|
|
48012
|
-
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(_extends$5);
|
|
48013
48027
|
const richTextToolbar = "_richTextToolbar_1gbkk_1";
|
|
48014
48028
|
const richTextToolbarContainer = "_richTextToolbarContainer_1gbkk_5";
|
|
48015
48029
|
const styles$h = {
|
|
@@ -49310,7 +49324,7 @@ var Handle$2 = /* @__PURE__ */ React$4.forwardRef(function(props, ref) {
|
|
|
49310
49324
|
}
|
|
49311
49325
|
};
|
|
49312
49326
|
var positionStyle = getDirectionStyle(direction, value, min, max);
|
|
49313
|
-
var handleNode = /* @__PURE__ */ React$4.createElement("div", _extends$
|
|
49327
|
+
var handleNode = /* @__PURE__ */ React$4.createElement("div", _extends$1({
|
|
49314
49328
|
ref,
|
|
49315
49329
|
className: cx$2(handlePrefixCls, (_classNames = {}, _defineProperty$7(_classNames, "".concat(handlePrefixCls, "-").concat(valueIndex + 1), range2), _defineProperty$7(_classNames, "".concat(handlePrefixCls, "-dragging"), dragging), _classNames)),
|
|
49316
49330
|
style: _objectSpread2$1(_objectSpread2$1({}, positionStyle), style),
|
|
@@ -49354,7 +49368,7 @@ var Handles = /* @__PURE__ */ React$4.forwardRef(function(props, ref) {
|
|
|
49354
49368
|
};
|
|
49355
49369
|
});
|
|
49356
49370
|
return /* @__PURE__ */ React$4.createElement(React$4.Fragment, null, values2.map(function(value, index2) {
|
|
49357
|
-
return /* @__PURE__ */ React$4.createElement(Handle$2, _extends$
|
|
49371
|
+
return /* @__PURE__ */ React$4.createElement(Handle$2, _extends$1({
|
|
49358
49372
|
ref: function ref2(node2) {
|
|
49359
49373
|
if (!node2) {
|
|
49360
49374
|
delete handlesRef.current[index2];
|
|
@@ -50724,7 +50738,7 @@ Object.defineProperty(Handle$1, "__esModule", {
|
|
|
50724
50738
|
value: true
|
|
50725
50739
|
});
|
|
50726
50740
|
var default_1 = Handle$1.default = void 0;
|
|
50727
|
-
var _extends2 = _interopRequireDefault(
|
|
50741
|
+
var _extends2 = _interopRequireDefault(require_extends());
|
|
50728
50742
|
var _objectSpread2 = _interopRequireDefault(requireObjectSpread2());
|
|
50729
50743
|
var _defineProperty2 = _interopRequireDefault(requireDefineProperty());
|
|
50730
50744
|
var _objectWithoutProperties2 = _interopRequireDefault(requireObjectWithoutProperties());
|
|
@@ -66704,7 +66718,9 @@ const UnitTable = ({
|
|
|
66704
66718
|
unitConfig,
|
|
66705
66719
|
convertBackToStorageUnit = true,
|
|
66706
66720
|
enableCosmeticRounding = true,
|
|
66707
|
-
enableDisplayRounding = true
|
|
66721
|
+
enableDisplayRounding = true,
|
|
66722
|
+
onListReorder,
|
|
66723
|
+
canListReorder
|
|
66708
66724
|
}) => {
|
|
66709
66725
|
const { rows, headers, ...otherProps } = table2;
|
|
66710
66726
|
const { storageUnits, preferredUnits } = normalizeUnits(unitConfig);
|
|
@@ -66764,7 +66780,9 @@ const UnitTable = ({
|
|
|
66764
66780
|
...otherProps,
|
|
66765
66781
|
headers: viewData.convertedHeaders,
|
|
66766
66782
|
rows: viewData.convertedRows
|
|
66767
|
-
}
|
|
66783
|
+
},
|
|
66784
|
+
onListReorder,
|
|
66785
|
+
canListReorder
|
|
66768
66786
|
}
|
|
66769
66787
|
);
|
|
66770
66788
|
};
|