@ni/nimble-components 20.10.1 → 20.10.2
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.
|
@@ -16288,7 +16288,7 @@
|
|
|
16288
16288
|
|
|
16289
16289
|
/**
|
|
16290
16290
|
* Do not edit directly
|
|
16291
|
-
* Generated on Thu, 26 Oct 2023
|
|
16291
|
+
* Generated on Thu, 26 Oct 2023 17:57:28 GMT
|
|
16292
16292
|
*/
|
|
16293
16293
|
|
|
16294
16294
|
const Information100DarkUi = "#a46eff";
|
|
@@ -63078,7 +63078,7 @@ img.ProseMirror-separator {
|
|
|
63078
63078
|
},
|
|
63079
63079
|
subRows: subRows != null ? subRows : [],
|
|
63080
63080
|
getLeafRows: () => flattenBy(row.subRows, d => d.subRows),
|
|
63081
|
-
getParentRow: () => row.parentId ? table.getRow(row.parentId) : undefined,
|
|
63081
|
+
getParentRow: () => row.parentId ? table.getRow(row.parentId, true) : undefined,
|
|
63082
63082
|
getParentRows: () => {
|
|
63083
63083
|
let parentRows = [];
|
|
63084
63084
|
let currentRow = row;
|
|
@@ -63204,7 +63204,9 @@ img.ProseMirror-separator {
|
|
|
63204
63204
|
const sortData = rows => {
|
|
63205
63205
|
// This will also perform a stable sorting using the row index
|
|
63206
63206
|
// if needed.
|
|
63207
|
-
const sortedData =
|
|
63207
|
+
const sortedData = rows.map(row => ({
|
|
63208
|
+
...row
|
|
63209
|
+
}));
|
|
63208
63210
|
sortedData.sort((rowA, rowB) => {
|
|
63209
63211
|
for (let i = 0; i < availableSorting.length; i += 1) {
|
|
63210
63212
|
var _sortEntry$desc;
|
|
@@ -65283,10 +65285,7 @@ img.ProseMirror-separator {
|
|
|
65283
65285
|
}
|
|
65284
65286
|
};
|
|
65285
65287
|
}();
|
|
65286
|
-
this.range =
|
|
65287
|
-
startIndex: 0,
|
|
65288
|
-
endIndex: 0
|
|
65289
|
-
};
|
|
65288
|
+
this.range = null;
|
|
65290
65289
|
this.setOptions = function (opts) {
|
|
65291
65290
|
Object.entries(opts).forEach(function (_ref3) {
|
|
65292
65291
|
var key = _ref3[0],
|
|
@@ -65317,9 +65316,21 @@ img.ProseMirror-separator {
|
|
|
65317
65316
|
lanes: 1
|
|
65318
65317
|
}, opts);
|
|
65319
65318
|
};
|
|
65320
|
-
this.notify = function () {
|
|
65321
|
-
_this.options.onChange == null ? void 0 : _this.options.onChange(_this);
|
|
65319
|
+
this.notify = function (sync) {
|
|
65320
|
+
_this.options.onChange == null ? void 0 : _this.options.onChange(_this, sync);
|
|
65322
65321
|
};
|
|
65322
|
+
this.maybeNotify = memo(function () {
|
|
65323
|
+
_this.calculateRange();
|
|
65324
|
+
return [_this.isScrolling, _this.range ? _this.range.startIndex : null, _this.range ? _this.range.endIndex : null];
|
|
65325
|
+
}, function (isScrolling) {
|
|
65326
|
+
_this.notify(isScrolling);
|
|
65327
|
+
}, {
|
|
65328
|
+
key: 'maybeNotify',
|
|
65329
|
+
debug: function debug() {
|
|
65330
|
+
return _this.options.debug;
|
|
65331
|
+
},
|
|
65332
|
+
initialDeps: [this.isScrolling, this.range ? this.range.startIndex : null, this.range ? this.range.endIndex : null]
|
|
65333
|
+
});
|
|
65323
65334
|
this.cleanup = function () {
|
|
65324
65335
|
_this.unsubs.filter(Boolean).forEach(function (d) {
|
|
65325
65336
|
return d();
|
|
@@ -65344,11 +65355,8 @@ img.ProseMirror-separator {
|
|
|
65344
65355
|
behavior: undefined
|
|
65345
65356
|
});
|
|
65346
65357
|
_this.unsubs.push(_this.options.observeElementRect(_this, function (rect) {
|
|
65347
|
-
var prev = _this.scrollRect;
|
|
65348
65358
|
_this.scrollRect = rect;
|
|
65349
|
-
|
|
65350
|
-
_this.maybeNotify();
|
|
65351
|
-
}
|
|
65359
|
+
_this.maybeNotify();
|
|
65352
65360
|
}));
|
|
65353
65361
|
_this.unsubs.push(_this.options.observeElementOffset(_this, function (offset) {
|
|
65354
65362
|
_this.scrollAdjustments = 0;
|
|
@@ -65448,33 +65456,21 @@ img.ProseMirror-separator {
|
|
|
65448
65456
|
this.calculateRange = memo(function () {
|
|
65449
65457
|
return [_this.getMeasurements(), _this.getSize(), _this.scrollOffset];
|
|
65450
65458
|
}, function (measurements, outerSize, scrollOffset) {
|
|
65451
|
-
return _this.range = calculateRange({
|
|
65459
|
+
return _this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({
|
|
65452
65460
|
measurements: measurements,
|
|
65453
65461
|
outerSize: outerSize,
|
|
65454
65462
|
scrollOffset: scrollOffset
|
|
65455
|
-
});
|
|
65463
|
+
}) : null;
|
|
65456
65464
|
}, {
|
|
65457
65465
|
key: 'calculateRange',
|
|
65458
65466
|
debug: function debug() {
|
|
65459
65467
|
return _this.options.debug;
|
|
65460
65468
|
}
|
|
65461
65469
|
});
|
|
65462
|
-
this.maybeNotify = memo(function () {
|
|
65463
|
-
var range = _this.calculateRange();
|
|
65464
|
-
return [range.startIndex, range.endIndex, _this.isScrolling];
|
|
65465
|
-
}, function () {
|
|
65466
|
-
_this.notify();
|
|
65467
|
-
}, {
|
|
65468
|
-
key: 'maybeNotify',
|
|
65469
|
-
debug: function debug() {
|
|
65470
|
-
return _this.options.debug;
|
|
65471
|
-
},
|
|
65472
|
-
initialDeps: [this.range.startIndex, this.range.endIndex, this.isScrolling]
|
|
65473
|
-
});
|
|
65474
65470
|
this.getIndexes = memo(function () {
|
|
65475
65471
|
return [_this.options.rangeExtractor, _this.calculateRange(), _this.options.overscan, _this.options.count];
|
|
65476
65472
|
}, function (rangeExtractor, range, overscan, count) {
|
|
65477
|
-
return rangeExtractor(_extends({}, range, {
|
|
65473
|
+
return range === null ? [] : rangeExtractor(_extends({}, range, {
|
|
65478
65474
|
overscan: overscan,
|
|
65479
65475
|
count: count
|
|
65480
65476
|
}));
|
|
@@ -65495,7 +65491,7 @@ img.ProseMirror-separator {
|
|
|
65495
65491
|
};
|
|
65496
65492
|
this._measureElement = function (node, entry) {
|
|
65497
65493
|
var item = _this.measurementsCache[_this.indexFromElement(node)];
|
|
65498
|
-
if (!item) {
|
|
65494
|
+
if (!item || !node.isConnected) {
|
|
65499
65495
|
_this.measureElementCache.forEach(function (cached, key) {
|
|
65500
65496
|
if (cached === node) {
|
|
65501
65497
|
_this.observer.unobserve(node);
|
|
@@ -65505,13 +65501,6 @@ img.ProseMirror-separator {
|
|
|
65505
65501
|
return;
|
|
65506
65502
|
}
|
|
65507
65503
|
var prevNode = _this.measureElementCache.get(item.key);
|
|
65508
|
-
if (!node.isConnected) {
|
|
65509
|
-
if (prevNode) {
|
|
65510
|
-
_this.observer.unobserve(prevNode);
|
|
65511
|
-
_this.measureElementCache["delete"](item.key);
|
|
65512
|
-
}
|
|
65513
|
-
return;
|
|
65514
|
-
}
|
|
65515
65504
|
if (prevNode !== node) {
|
|
65516
65505
|
if (prevNode) {
|
|
65517
65506
|
_this.observer.unobserve(prevNode);
|
|
@@ -65538,7 +65527,7 @@ img.ProseMirror-separator {
|
|
|
65538
65527
|
}
|
|
65539
65528
|
_this.pendingMeasuredCacheIndexes.push(item.index);
|
|
65540
65529
|
_this.itemSizeCache = new Map(_this.itemSizeCache.set(item.key, size));
|
|
65541
|
-
_this.notify();
|
|
65530
|
+
_this.notify(false);
|
|
65542
65531
|
}
|
|
65543
65532
|
};
|
|
65544
65533
|
this.measureElement = function (node) {
|
|
@@ -65698,7 +65687,7 @@ img.ProseMirror-separator {
|
|
|
65698
65687
|
};
|
|
65699
65688
|
this.measure = function () {
|
|
65700
65689
|
_this.itemSizeCache = new Map();
|
|
65701
|
-
_this.notify();
|
|
65690
|
+
_this.notify(false);
|
|
65702
65691
|
};
|
|
65703
65692
|
this.setOptions(_opts);
|
|
65704
65693
|
this.scrollRect = this.options.initialRect;
|