vis-data 7.1.9 → 7.1.10

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.
Files changed (47) hide show
  1. package/declarations/data-interface.d.ts +0 -46
  2. package/declarations/data-interface.d.ts.map +1 -1
  3. package/declarations/data-pipe.d.ts +0 -8
  4. package/declarations/data-pipe.d.ts.map +1 -1
  5. package/declarations/data-set-check.d.ts +0 -1
  6. package/declarations/data-set-check.d.ts.map +1 -1
  7. package/declarations/data-set-part.d.ts +0 -1
  8. package/declarations/data-set-part.d.ts.map +1 -1
  9. package/declarations/data-set.d.ts +14 -28
  10. package/declarations/data-set.d.ts.map +1 -1
  11. package/declarations/data-stream.d.ts +0 -18
  12. package/declarations/data-stream.d.ts.map +1 -1
  13. package/declarations/data-view-check.d.ts +0 -1
  14. package/declarations/data-view-check.d.ts.map +1 -1
  15. package/declarations/data-view.d.ts +9 -15
  16. package/declarations/data-view.d.ts.map +1 -1
  17. package/declarations/queue.d.ts +0 -7
  18. package/declarations/queue.d.ts.map +1 -1
  19. package/dist/esm.js +25 -91
  20. package/dist/esm.js.map +1 -1
  21. package/dist/umd.js +25 -91
  22. package/dist/umd.js.map +1 -1
  23. package/esnext/esm/vis-data.js +25 -91
  24. package/esnext/esm/vis-data.js.map +1 -1
  25. package/esnext/esm/vis-data.min.js +2 -2
  26. package/esnext/esm/vis-data.min.js.map +1 -1
  27. package/esnext/umd/vis-data.js +25 -91
  28. package/esnext/umd/vis-data.js.map +1 -1
  29. package/esnext/umd/vis-data.min.js +2 -2
  30. package/esnext/umd/vis-data.min.js.map +1 -1
  31. package/package.json +12 -8
  32. package/peer/esm/vis-data.js +25 -91
  33. package/peer/esm/vis-data.js.map +1 -1
  34. package/peer/esm/vis-data.min.js +2 -2
  35. package/peer/esm/vis-data.min.js.map +1 -1
  36. package/peer/umd/vis-data.js +25 -91
  37. package/peer/umd/vis-data.js.map +1 -1
  38. package/peer/umd/vis-data.min.js +2 -2
  39. package/peer/umd/vis-data.min.js.map +1 -1
  40. package/standalone/esm/vis-data.js +25 -91
  41. package/standalone/esm/vis-data.js.map +1 -1
  42. package/standalone/esm/vis-data.min.js +2 -2
  43. package/standalone/esm/vis-data.min.js.map +1 -1
  44. package/standalone/umd/vis-data.js +25 -91
  45. package/standalone/umd/vis-data.js.map +1 -1
  46. package/standalone/umd/vis-data.min.js +2 -2
  47. package/standalone/umd/vis-data.min.js.map +1 -1
package/dist/esm.js CHANGED
@@ -4,8 +4,8 @@
4
4
  *
5
5
  * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
6
6
  *
7
- * @version 7.1.9
8
- * @date 2023-11-24T17:54:21.708Z
7
+ * @version 7.1.10
8
+ * @date 2025-07-06T08:43:01.753Z
9
9
  *
10
10
  * @copyright (c) 2011-2017 Almende B.V, http://almende.com
11
11
  * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
@@ -3174,7 +3174,6 @@ var _flatMapInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(flatMap);
3174
3174
 
3175
3175
  /**
3176
3176
  * Create new data pipe.
3177
- *
3178
3177
  * @param from - The source data set or data view.
3179
3178
  * @remarks
3180
3179
  * Example usage:
@@ -3210,7 +3209,6 @@ function createNewDataPipeFrom(from) {
3210
3209
  /**
3211
3210
  * Internal implementation of the pipe. This should be accessible only through
3212
3211
  * `createNewDataPipeFrom` from the outside.
3213
- *
3214
3212
  * @typeParam SI - Source item type.
3215
3213
  * @typeParam SP - Source item type's id property name.
3216
3214
  * @typeParam TI - Target item type.
@@ -3219,7 +3217,6 @@ function createNewDataPipeFrom(from) {
3219
3217
  var SimpleDataPipe = /*#__PURE__*/function () {
3220
3218
  /**
3221
3219
  * Create a new data pipe.
3222
- *
3223
3220
  * @param _source - The data set or data view that will be observed.
3224
3221
  * @param _transformers - An array of transforming functions to be used to
3225
3222
  * filter or transform the items in the pipe.
@@ -3267,7 +3264,6 @@ var SimpleDataPipe = /*#__PURE__*/function () {
3267
3264
  }
3268
3265
  /**
3269
3266
  * Apply the transformers to the items.
3270
- *
3271
3267
  * @param items - The items to be transformed.
3272
3268
  * @returns The transformed items.
3273
3269
  */
@@ -3281,7 +3277,6 @@ var SimpleDataPipe = /*#__PURE__*/function () {
3281
3277
  }
3282
3278
  /**
3283
3279
  * Handle an add event.
3284
- *
3285
3280
  * @param _name - Ignored.
3286
3281
  * @param payload - The payload containing the ids of the added items.
3287
3282
  */
@@ -3295,7 +3290,6 @@ var SimpleDataPipe = /*#__PURE__*/function () {
3295
3290
  }
3296
3291
  /**
3297
3292
  * Handle an update event.
3298
- *
3299
3293
  * @param _name - Ignored.
3300
3294
  * @param payload - The payload containing the ids of the updated items.
3301
3295
  */
@@ -3309,7 +3303,6 @@ var SimpleDataPipe = /*#__PURE__*/function () {
3309
3303
  }
3310
3304
  /**
3311
3305
  * Handle a remove event.
3312
- *
3313
3306
  * @param _name - Ignored.
3314
3307
  * @param payload - The payload containing the data of the removed items.
3315
3308
  */
@@ -3327,7 +3320,6 @@ var SimpleDataPipe = /*#__PURE__*/function () {
3327
3320
  /**
3328
3321
  * Internal implementation of the pipe factory. This should be accessible
3329
3322
  * only through `createNewDataPipeFrom` from the outside.
3330
- *
3331
3323
  * @typeParam TI - Target item type.
3332
3324
  * @typeParam TP - Target item type's id property name.
3333
3325
  */
@@ -3335,7 +3327,6 @@ var DataPipeUnderConstruction = /*#__PURE__*/function () {
3335
3327
  /**
3336
3328
  * Create a new data pipe factory. This is an internal constructor that
3337
3329
  * should never be called from outside of this file.
3338
- *
3339
3330
  * @param _source - The source data set or data view for this pipe.
3340
3331
  */
3341
3332
  function DataPipeUnderConstruction(_source) {
@@ -3349,7 +3340,6 @@ var DataPipeUnderConstruction = /*#__PURE__*/function () {
3349
3340
  }
3350
3341
  /**
3351
3342
  * Filter the items.
3352
- *
3353
3343
  * @param callback - A filtering function that returns true if given item
3354
3344
  * should be piped and false if not.
3355
3345
  * @returns This factory for further configuration.
@@ -3364,7 +3354,6 @@ var DataPipeUnderConstruction = /*#__PURE__*/function () {
3364
3354
  }
3365
3355
  /**
3366
3356
  * Map each source item to a new type.
3367
- *
3368
3357
  * @param callback - A mapping function that takes a source item and returns
3369
3358
  * corresponding mapped item.
3370
3359
  * @typeParam TI - Target item type.
@@ -3381,7 +3370,6 @@ var DataPipeUnderConstruction = /*#__PURE__*/function () {
3381
3370
  }
3382
3371
  /**
3383
3372
  * Map each source item to zero or more items of a new type.
3384
- *
3385
3373
  * @param callback - A mapping function that takes a source item and returns
3386
3374
  * an array of corresponding mapped items.
3387
3375
  * @typeParam TI - Target item type.
@@ -3398,7 +3386,6 @@ var DataPipeUnderConstruction = /*#__PURE__*/function () {
3398
3386
  }
3399
3387
  /**
3400
3388
  * Connect this pipe to given data set.
3401
- *
3402
3389
  * @param target - The data set that will receive the items from this pipe.
3403
3390
  * @returns The pipe connected between given data sets and performing
3404
3391
  * configured transformation on the processed items.
@@ -10305,7 +10292,6 @@ function v4(options, buf, offset) {
10305
10292
 
10306
10293
  /**
10307
10294
  * Determine whether a value can be used as an id.
10308
- *
10309
10295
  * @param value - Input value of unknown type.
10310
10296
  * @returns True if the value is valid id, false otherwise.
10311
10297
  */
@@ -10470,13 +10456,11 @@ var _spliceInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(splice);
10470
10456
 
10471
10457
  /**
10472
10458
  * A queue.
10473
- *
10474
10459
  * @typeParam T - The type of method names to be replaced by queued versions.
10475
10460
  */
10476
10461
  var Queue = /*#__PURE__*/function () {
10477
10462
  /**
10478
10463
  * Construct a new Queue.
10479
- *
10480
10464
  * @param options - Queue configuration.
10481
10465
  */
10482
10466
  function Queue(options) {
@@ -10493,7 +10477,6 @@ var Queue = /*#__PURE__*/function () {
10493
10477
  }
10494
10478
  /**
10495
10479
  * Update the configuration of the queue.
10496
- *
10497
10480
  * @param options - Queue configuration.
10498
10481
  */
10499
10482
  _createClass(Queue, [{
@@ -10510,7 +10493,6 @@ var Queue = /*#__PURE__*/function () {
10510
10493
  /**
10511
10494
  * Extend an object with queuing functionality.
10512
10495
  * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones.
10513
- *
10514
10496
  * @param object - The object to be extended.
10515
10497
  * @param options - Additional options.
10516
10498
  * @returns The created queue.
@@ -10541,7 +10523,6 @@ var Queue = /*#__PURE__*/function () {
10541
10523
  }
10542
10524
  /**
10543
10525
  * Replace a method on an object with a queued version.
10544
- *
10545
10526
  * @param object - Object having the method.
10546
10527
  * @param method - The method name.
10547
10528
  */
@@ -10568,7 +10549,6 @@ var Queue = /*#__PURE__*/function () {
10568
10549
  }
10569
10550
  /**
10570
10551
  * Queue a call.
10571
- *
10572
10552
  * @param entry - The function or entry to be queued.
10573
10553
  */
10574
10554
  }, {
@@ -10654,7 +10634,6 @@ var Queue = /*#__PURE__*/function () {
10654
10634
 
10655
10635
  /**
10656
10636
  * {@link DataSet} code that can be reused in {@link DataView} or other similar implementations of {@link DataInterface}.
10657
- *
10658
10637
  * @typeParam Item - Item type that may or may not have an id.
10659
10638
  * @typeParam IdProp - Name of the property that contains the id.
10660
10639
  */
@@ -10681,7 +10660,6 @@ var DataSetPart = /*#__PURE__*/function () {
10681
10660
  value:
10682
10661
  /**
10683
10662
  * Trigger an event
10684
- *
10685
10663
  * @param event - Event name.
10686
10664
  * @param payload - Event payload.
10687
10665
  * @param senderId - Id of the sender.
@@ -10697,7 +10675,6 @@ var DataSetPart = /*#__PURE__*/function () {
10697
10675
  }
10698
10676
  /**
10699
10677
  * Subscribe to an event, add an event listener.
10700
- *
10701
10678
  * @remarks Non-function callbacks are ignored.
10702
10679
  * @param event - Event name.
10703
10680
  * @param callback - Callback method.
@@ -10712,7 +10689,6 @@ var DataSetPart = /*#__PURE__*/function () {
10712
10689
  }
10713
10690
  /**
10714
10691
  * Unsubscribe from an event, remove an event listener.
10715
- *
10716
10692
  * @remarks If the same callback was subscribed more than once **all** occurences will be removed.
10717
10693
  * @param event - Event name.
10718
10694
  * @param callback - Callback method.
@@ -10829,7 +10805,6 @@ function _unsupportedIterableToArray$2(o, minLen) { var _context10; if (!o) retu
10829
10805
  function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
10830
10806
  /**
10831
10807
  * Data stream
10832
- *
10833
10808
  * @remarks
10834
10809
  * {@link DataStream} offers an always up to date stream of items from a {@link DataSet} or {@link DataView}.
10835
10810
  * That means that the stream is evaluated at the time of iteration, conversion to another data type or when {@link cache} is called, not when the {@link DataStream} was created.
@@ -10839,7 +10814,6 @@ function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) le
10839
10814
  var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
10840
10815
  /**
10841
10816
  * Create a new data stream.
10842
- *
10843
10817
  * @param pairs - The id, item pairs.
10844
10818
  */
10845
10819
  function DataStream(pairs) {
@@ -11020,7 +10994,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11020
10994
  })
11021
10995
  /**
11022
10996
  * Return an array containing all the ids in this stream.
11023
- *
11024
10997
  * @remarks
11025
10998
  * The array may contain duplicities.
11026
10999
  * @returns The array with all ids from this stream.
@@ -11035,7 +11008,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11035
11008
  }
11036
11009
  /**
11037
11010
  * Return an array containing all the items in this stream.
11038
- *
11039
11011
  * @remarks
11040
11012
  * The array may contain duplicities.
11041
11013
  * @returns The array with all items from this stream.
@@ -11050,7 +11022,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11050
11022
  }
11051
11023
  /**
11052
11024
  * Return an array containing all the entries in this stream.
11053
- *
11054
11025
  * @remarks
11055
11026
  * The array may contain duplicities.
11056
11027
  * @returns The array with all entries from this stream.
@@ -11062,7 +11033,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11062
11033
  }
11063
11034
  /**
11064
11035
  * Return an object map containing all the items in this stream accessible by ids.
11065
- *
11066
11036
  * @remarks
11067
11037
  * In case of duplicate ids (coerced to string so `7 == '7'`) the last encoutered appears in the returned object.
11068
11038
  * @returns The object map of all id → item pairs from this stream.
@@ -11089,7 +11059,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11089
11059
  }
11090
11060
  /**
11091
11061
  * Return a map containing all the items in this stream accessible by ids.
11092
- *
11093
11062
  * @returns The map of all id → item pairs from this stream.
11094
11063
  */
11095
11064
  }, {
@@ -11099,7 +11068,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11099
11068
  }
11100
11069
  /**
11101
11070
  * Return a set containing all the (unique) ids in this stream.
11102
- *
11103
11071
  * @returns The set of all ids from this stream.
11104
11072
  */
11105
11073
  }, {
@@ -11109,7 +11077,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11109
11077
  }
11110
11078
  /**
11111
11079
  * Return a set containing all the (unique) items in this stream.
11112
- *
11113
11080
  * @returns The set of all items from this stream.
11114
11081
  */
11115
11082
  }, {
@@ -11119,7 +11086,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11119
11086
  }
11120
11087
  /**
11121
11088
  * Cache the items from this stream.
11122
- *
11123
11089
  * @remarks
11124
11090
  * This method allows for items to be fetched immediatelly and used (possibly multiple times) later.
11125
11091
  * It can also be used to optimize performance as {@link DataStream} would otherwise reevaluate everything upon each iteration.
@@ -11146,7 +11112,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11146
11112
  }
11147
11113
  /**
11148
11114
  * Get the distinct values of given property.
11149
- *
11150
11115
  * @param callback - The function that picks and possibly converts the property.
11151
11116
  * @typeParam T - The type of the distinct value.
11152
11117
  * @returns A set of all distinct properties.
@@ -11173,7 +11138,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11173
11138
  }
11174
11139
  /**
11175
11140
  * Filter the items of the stream.
11176
- *
11177
11141
  * @param callback - The function that decides whether an item will be included.
11178
11142
  * @returns A new data stream with the filtered items.
11179
11143
  */
@@ -11228,7 +11192,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11228
11192
  }
11229
11193
  /**
11230
11194
  * Execute a callback for each item of the stream.
11231
- *
11232
11195
  * @param callback - The function that will be invoked for each item.
11233
11196
  */
11234
11197
  }, {
@@ -11251,7 +11214,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11251
11214
  }
11252
11215
  /**
11253
11216
  * Map the items into a different type.
11254
- *
11255
11217
  * @param callback - The function that does the conversion.
11256
11218
  * @typeParam Mapped - The type of the item after mapping.
11257
11219
  * @returns A new data stream with the mapped items.
@@ -11303,7 +11265,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11303
11265
  }
11304
11266
  /**
11305
11267
  * Get the item with the maximum value of given property.
11306
- *
11307
11268
  * @param callback - The function that picks and possibly converts the property.
11308
11269
  * @returns The item with the maximum if found otherwise null.
11309
11270
  */
@@ -11331,7 +11292,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11331
11292
  }
11332
11293
  /**
11333
11294
  * Get the item with the minimum value of given property.
11334
- *
11335
11295
  * @param callback - The function that picks and possibly converts the property.
11336
11296
  * @returns The item with the minimum if found otherwise null.
11337
11297
  */
@@ -11359,7 +11319,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11359
11319
  }
11360
11320
  /**
11361
11321
  * Reduce the items into a single value.
11362
- *
11363
11322
  * @param callback - The function that does the reduction.
11364
11323
  * @param accumulator - The initial value of the accumulator.
11365
11324
  * @typeParam T - The type of the accumulated value.
@@ -11386,7 +11345,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
11386
11345
  }
11387
11346
  /**
11388
11347
  * Sort the items.
11389
- *
11390
11348
  * @param callback - Item comparator.
11391
11349
  * @returns A new stream with sorted items.
11392
11350
  */
@@ -11422,7 +11380,6 @@ function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeRefl
11422
11380
  function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
11423
11381
  /**
11424
11382
  * Add an id to given item if it doesn't have one already.
11425
- *
11426
11383
  * @remarks
11427
11384
  * The item will be modified.
11428
11385
  * @param item - The item that will have an id after a call to this function.
@@ -11460,15 +11417,15 @@ function ensureFullItem(item, idProp) {
11460
11417
  * // add items
11461
11418
  * // note that the data items can contain different properties and data formats
11462
11419
  * data.add([
11463
- * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
11464
- * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},
11465
- * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},
11466
- * {id: 4, text: 'item 4'}
11420
+ * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
11421
+ * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},
11422
+ * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},
11423
+ * {id: 4, text: 'item 4'}
11467
11424
  * ]);
11468
11425
  *
11469
11426
  * // subscribe to any change in the DataSet
11470
11427
  * data.on('*', function (event, properties, senderId) {
11471
- * console.log('event', event, properties);
11428
+ * console.log('event', event, properties);
11472
11429
  * });
11473
11430
  *
11474
11431
  * // update an existing item
@@ -11487,13 +11444,12 @@ function ensureFullItem(item, idProp) {
11487
11444
  *
11488
11445
  * // retrieve a filtered subset of the data
11489
11446
  * var items = data.get({
11490
- * filter: function (item) {
11491
- * return item.group == 1;
11492
- * }
11447
+ * filter: function (item) {
11448
+ * return item.group == 1;
11449
+ * }
11493
11450
  * });
11494
11451
  * console.log('filtered items', items);
11495
11452
  * ```
11496
- *
11497
11453
  * @typeParam Item - Item type that may or may not have an id.
11498
11454
  * @typeParam IdProp - Name of the property that contains the id.
11499
11455
  */
@@ -11502,7 +11458,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
11502
11458
  var _super = _createSuper$1(DataSet);
11503
11459
  /**
11504
11460
  * Construct a new DataSet.
11505
- *
11506
11461
  * @param data - Initial data or options.
11507
11462
  * @param options - Options (type error if data is also options).
11508
11463
  */
@@ -11529,7 +11484,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
11529
11484
  }
11530
11485
  /**
11531
11486
  * Set new options.
11532
- *
11533
11487
  * @param options - The new options.
11534
11488
  */
11535
11489
  _createClass(DataSet, [{
@@ -11578,14 +11532,13 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
11578
11532
  *
11579
11533
  * // add items
11580
11534
  * const ids = data.add([
11581
- * { id: 1, text: 'item 1' },
11582
- * { id: 2, text: 'item 2' },
11583
- * { text: 'item without an id' }
11535
+ * { id: 1, text: 'item 1' },
11536
+ * { id: 2, text: 'item 2' },
11537
+ * { text: 'item without an id' }
11584
11538
  * ])
11585
11539
  *
11586
11540
  * console.log(ids) // [1, 2, '<UUIDv4>']
11587
11541
  * ```
11588
- *
11589
11542
  * @param data - Items to be added (ids will be generated if missing).
11590
11543
  * @param senderId - Sender id.
11591
11544
  * @returns addedIds - Array with the ids (generated if not present) of the added items.
@@ -11627,7 +11580,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
11627
11580
  }
11628
11581
  /**
11629
11582
  * Update existing items. When an item does not exist, it will be created.
11630
- *
11631
11583
  * @remarks
11632
11584
  * The provided properties will be merged in the existing item. When an item does not exist, it will be created.
11633
11585
  *
@@ -11723,7 +11675,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
11723
11675
  }
11724
11676
  /**
11725
11677
  * Update existing items. When an item does not exist, an error will be thrown.
11726
- *
11727
11678
  * @remarks
11728
11679
  * The provided properties will be deeply merged into the existing item.
11729
11680
  * When an item does not exist (id not present in the data set or absent), an error will be thrown and nothing will be changed.
@@ -12030,7 +11981,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12030
11981
  }
12031
11982
  /**
12032
11983
  * Filter the fields of an item.
12033
- *
12034
11984
  * @param item - The item whose fields should be filtered.
12035
11985
  * @param fields - The names of the fields that will be kept.
12036
11986
  * @typeParam K - Field name type.
@@ -12055,7 +12005,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12055
12005
  }
12056
12006
  /**
12057
12007
  * Sort the provided array with items.
12058
- *
12059
12008
  * @param items - Items to be sorted in place.
12060
12009
  * @param order - A field name or custom sort function.
12061
12010
  * @typeParam T - The type of the items in the items array.
@@ -12092,9 +12041,9 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12092
12041
  * ```javascript
12093
12042
  * // create a DataSet
12094
12043
  * const data = new vis.DataSet([
12095
- * { id: 1, text: 'item 1' },
12096
- * { id: 2, text: 'item 2' },
12097
- * { id: 3, text: 'item 3' }
12044
+ * { id: 1, text: 'item 1' },
12045
+ * { id: 2, text: 'item 2' },
12046
+ * { id: 3, text: 'item 3' }
12098
12047
  * ])
12099
12048
  *
12100
12049
  * // remove items
@@ -12102,7 +12051,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12102
12051
  *
12103
12052
  * console.log(ids) // [2, 3]
12104
12053
  * ```
12105
- *
12106
12054
  * @param id - One or more items or ids of items to be removed.
12107
12055
  * @param senderId - Sender id.
12108
12056
  * @returns The ids of the removed items.
@@ -12134,7 +12082,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12134
12082
  }
12135
12083
  /**
12136
12084
  * Remove an item by its id or reference.
12137
- *
12138
12085
  * @param id - Id of an item or the item itself.
12139
12086
  * @returns The removed item if removed, null otherwise.
12140
12087
  */
@@ -12163,7 +12110,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12163
12110
  * Clear the entire data set.
12164
12111
  *
12165
12112
  * After the items are removed, the {@link DataSet} will trigger an event `remove` for all removed items. When a `senderId` is provided, this id will be passed with the triggered event to all subscribers.
12166
- *
12167
12113
  * @param senderId - Sender id.
12168
12114
  * @returns removedIds - The ids of all removed items.
12169
12115
  */
@@ -12186,7 +12132,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12186
12132
  }
12187
12133
  /**
12188
12134
  * Find the item with maximum value of a specified field.
12189
- *
12190
12135
  * @param field - Name of the property that should be searched for max value.
12191
12136
  * @returns Item containing max value, or null if no items.
12192
12137
  */
@@ -12216,7 +12161,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12216
12161
  }
12217
12162
  /**
12218
12163
  * Find the item with minimum value of a specified field.
12219
- *
12220
12164
  * @param field - Name of the property that should be searched for min value.
12221
12165
  * @returns Item containing min value, or null if no items.
12222
12166
  */
@@ -12246,7 +12190,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12246
12190
  }
12247
12191
  /**
12248
12192
  * Find all distinct values of a specified field
12249
- *
12250
12193
  * @param prop - The property name whose distinct values should be returned.
12251
12194
  * @returns Unordered array containing all distinct values. Items without specified property are ignored.
12252
12195
  */
@@ -12277,7 +12220,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12277
12220
  }
12278
12221
  /**
12279
12222
  * Add a single item. Will fail when an item with the same id already exists.
12280
- *
12281
12223
  * @param item - A new item to be added.
12282
12224
  * @returns Added item's id. An id is generated when it is not present in the item.
12283
12225
  */
@@ -12298,7 +12240,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
12298
12240
  /**
12299
12241
  * Update a single item: merge with existing item.
12300
12242
  * Will fail when the item has no id, or when there does not exist an item with the same id.
12301
- *
12302
12243
  * @param update - The new item
12303
12244
  * @returns The id of the updated item.
12304
12245
  */
@@ -12439,25 +12380,25 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
12439
12380
  * // create a DataSet
12440
12381
  * var data = new vis.DataSet();
12441
12382
  * data.add([
12442
- * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
12443
- * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},
12444
- * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},
12445
- * {id: 4, text: 'item 4'}
12383
+ * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
12384
+ * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},
12385
+ * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},
12386
+ * {id: 4, text: 'item 4'}
12446
12387
  * ]);
12447
12388
  *
12448
12389
  * // create a DataView
12449
12390
  * // the view will only contain items having a property group with value 1,
12450
12391
  * // and will only output fields id, text, and date.
12451
12392
  * var view = new vis.DataView(data, {
12452
- * filter: function (item) {
12453
- * return (item.group == 1);
12454
- * },
12455
- * fields: ['id', 'text', 'date']
12393
+ * filter: function (item) {
12394
+ * return (item.group == 1);
12395
+ * },
12396
+ * fields: ['id', 'text', 'date']
12456
12397
  * });
12457
12398
  *
12458
12399
  * // subscribe to any change in the DataView
12459
12400
  * view.on('*', function (event, properties, senderId) {
12460
- * console.log('event', event, properties);
12401
+ * console.log('event', event, properties);
12461
12402
  * });
12462
12403
  *
12463
12404
  * // update an item in the data set
@@ -12470,7 +12411,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
12470
12411
  * // get all items in the view
12471
12412
  * var items = view.get();
12472
12413
  * ```
12473
- *
12474
12414
  * @typeParam Item - Item type that may or may not have an id.
12475
12415
  * @typeParam IdProp - Name of the property that contains the id.
12476
12416
  */
@@ -12481,7 +12421,6 @@ var DataView = /*#__PURE__*/function (_DataSetPart) {
12481
12421
 
12482
12422
  /**
12483
12423
  * Create a DataView.
12484
- *
12485
12424
  * @param data - The instance containing data (directly or indirectly).
12486
12425
  * @param options - Options to configure this data view.
12487
12426
  */
@@ -12503,7 +12442,6 @@ var DataView = /*#__PURE__*/function (_DataSetPart) {
12503
12442
  // and trigger changes accordingly
12504
12443
  /**
12505
12444
  * Set a data source for the view.
12506
- *
12507
12445
  * @param data - The instance containing data (directly or indirectly).
12508
12446
  * @remarks
12509
12447
  * Note that when the data view is bound to a data set it won't be garbage
@@ -12743,7 +12681,6 @@ var DataView = /*#__PURE__*/function (_DataSetPart) {
12743
12681
  }
12744
12682
  /**
12745
12683
  * Render the instance unusable prior to garbage collection.
12746
- *
12747
12684
  * @remarks
12748
12685
  * The intention of this method is to help discover scenarios where the data
12749
12686
  * view is being used when the programmer thinks it has been garbage collected
@@ -12781,7 +12718,6 @@ var DataView = /*#__PURE__*/function (_DataSetPart) {
12781
12718
  }
12782
12719
  /**
12783
12720
  * Event listener. Will propagate all events from the connected data set to the subscribers of the DataView, but will filter the items and only trigger when there are changes in the filtered data set.
12784
- *
12785
12721
  * @param event - The name of the event.
12786
12722
  * @param params - Parameters of the event.
12787
12723
  * @param senderId - Id supplied by the sender.
@@ -12873,7 +12809,6 @@ var DataView = /*#__PURE__*/function (_DataSetPart) {
12873
12809
 
12874
12810
  /**
12875
12811
  * Check that given value is compatible with Vis Data Set interface.
12876
- *
12877
12812
  * @param idProp - The expected property to contain item id.
12878
12813
  * @param v - The value to be tested.
12879
12814
  * @returns True if all expected values and methods match, false otherwise.
@@ -12884,7 +12819,6 @@ function isDataSetLike(idProp, v) {
12884
12819
 
12885
12820
  /**
12886
12821
  * Check that given value is compatible with Vis Data View interface.
12887
- *
12888
12822
  * @param idProp - The expected property to contain item id.
12889
12823
  * @param v - The value to be tested.
12890
12824
  * @returns True if all expected values and methods match, false otherwise.