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/umd.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
@@ -3180,7 +3180,6 @@
3180
3180
 
3181
3181
  /**
3182
3182
  * Create new data pipe.
3183
- *
3184
3183
  * @param from - The source data set or data view.
3185
3184
  * @remarks
3186
3185
  * Example usage:
@@ -3216,7 +3215,6 @@
3216
3215
  /**
3217
3216
  * Internal implementation of the pipe. This should be accessible only through
3218
3217
  * `createNewDataPipeFrom` from the outside.
3219
- *
3220
3218
  * @typeParam SI - Source item type.
3221
3219
  * @typeParam SP - Source item type's id property name.
3222
3220
  * @typeParam TI - Target item type.
@@ -3225,7 +3223,6 @@
3225
3223
  var SimpleDataPipe = /*#__PURE__*/function () {
3226
3224
  /**
3227
3225
  * Create a new data pipe.
3228
- *
3229
3226
  * @param _source - The data set or data view that will be observed.
3230
3227
  * @param _transformers - An array of transforming functions to be used to
3231
3228
  * filter or transform the items in the pipe.
@@ -3273,7 +3270,6 @@
3273
3270
  }
3274
3271
  /**
3275
3272
  * Apply the transformers to the items.
3276
- *
3277
3273
  * @param items - The items to be transformed.
3278
3274
  * @returns The transformed items.
3279
3275
  */
@@ -3287,7 +3283,6 @@
3287
3283
  }
3288
3284
  /**
3289
3285
  * Handle an add event.
3290
- *
3291
3286
  * @param _name - Ignored.
3292
3287
  * @param payload - The payload containing the ids of the added items.
3293
3288
  */
@@ -3301,7 +3296,6 @@
3301
3296
  }
3302
3297
  /**
3303
3298
  * Handle an update event.
3304
- *
3305
3299
  * @param _name - Ignored.
3306
3300
  * @param payload - The payload containing the ids of the updated items.
3307
3301
  */
@@ -3315,7 +3309,6 @@
3315
3309
  }
3316
3310
  /**
3317
3311
  * Handle a remove event.
3318
- *
3319
3312
  * @param _name - Ignored.
3320
3313
  * @param payload - The payload containing the data of the removed items.
3321
3314
  */
@@ -3333,7 +3326,6 @@
3333
3326
  /**
3334
3327
  * Internal implementation of the pipe factory. This should be accessible
3335
3328
  * only through `createNewDataPipeFrom` from the outside.
3336
- *
3337
3329
  * @typeParam TI - Target item type.
3338
3330
  * @typeParam TP - Target item type's id property name.
3339
3331
  */
@@ -3341,7 +3333,6 @@
3341
3333
  /**
3342
3334
  * Create a new data pipe factory. This is an internal constructor that
3343
3335
  * should never be called from outside of this file.
3344
- *
3345
3336
  * @param _source - The source data set or data view for this pipe.
3346
3337
  */
3347
3338
  function DataPipeUnderConstruction(_source) {
@@ -3355,7 +3346,6 @@
3355
3346
  }
3356
3347
  /**
3357
3348
  * Filter the items.
3358
- *
3359
3349
  * @param callback - A filtering function that returns true if given item
3360
3350
  * should be piped and false if not.
3361
3351
  * @returns This factory for further configuration.
@@ -3370,7 +3360,6 @@
3370
3360
  }
3371
3361
  /**
3372
3362
  * Map each source item to a new type.
3373
- *
3374
3363
  * @param callback - A mapping function that takes a source item and returns
3375
3364
  * corresponding mapped item.
3376
3365
  * @typeParam TI - Target item type.
@@ -3387,7 +3376,6 @@
3387
3376
  }
3388
3377
  /**
3389
3378
  * Map each source item to zero or more items of a new type.
3390
- *
3391
3379
  * @param callback - A mapping function that takes a source item and returns
3392
3380
  * an array of corresponding mapped items.
3393
3381
  * @typeParam TI - Target item type.
@@ -3404,7 +3392,6 @@
3404
3392
  }
3405
3393
  /**
3406
3394
  * Connect this pipe to given data set.
3407
- *
3408
3395
  * @param target - The data set that will receive the items from this pipe.
3409
3396
  * @returns The pipe connected between given data sets and performing
3410
3397
  * configured transformation on the processed items.
@@ -10311,7 +10298,6 @@
10311
10298
 
10312
10299
  /**
10313
10300
  * Determine whether a value can be used as an id.
10314
- *
10315
10301
  * @param value - Input value of unknown type.
10316
10302
  * @returns True if the value is valid id, false otherwise.
10317
10303
  */
@@ -10476,13 +10462,11 @@
10476
10462
 
10477
10463
  /**
10478
10464
  * A queue.
10479
- *
10480
10465
  * @typeParam T - The type of method names to be replaced by queued versions.
10481
10466
  */
10482
10467
  var Queue = /*#__PURE__*/function () {
10483
10468
  /**
10484
10469
  * Construct a new Queue.
10485
- *
10486
10470
  * @param options - Queue configuration.
10487
10471
  */
10488
10472
  function Queue(options) {
@@ -10499,7 +10483,6 @@
10499
10483
  }
10500
10484
  /**
10501
10485
  * Update the configuration of the queue.
10502
- *
10503
10486
  * @param options - Queue configuration.
10504
10487
  */
10505
10488
  _createClass(Queue, [{
@@ -10516,7 +10499,6 @@
10516
10499
  /**
10517
10500
  * Extend an object with queuing functionality.
10518
10501
  * The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones.
10519
- *
10520
10502
  * @param object - The object to be extended.
10521
10503
  * @param options - Additional options.
10522
10504
  * @returns The created queue.
@@ -10547,7 +10529,6 @@
10547
10529
  }
10548
10530
  /**
10549
10531
  * Replace a method on an object with a queued version.
10550
- *
10551
10532
  * @param object - Object having the method.
10552
10533
  * @param method - The method name.
10553
10534
  */
@@ -10574,7 +10555,6 @@
10574
10555
  }
10575
10556
  /**
10576
10557
  * Queue a call.
10577
- *
10578
10558
  * @param entry - The function or entry to be queued.
10579
10559
  */
10580
10560
  }, {
@@ -10660,7 +10640,6 @@
10660
10640
 
10661
10641
  /**
10662
10642
  * {@link DataSet} code that can be reused in {@link DataView} or other similar implementations of {@link DataInterface}.
10663
- *
10664
10643
  * @typeParam Item - Item type that may or may not have an id.
10665
10644
  * @typeParam IdProp - Name of the property that contains the id.
10666
10645
  */
@@ -10687,7 +10666,6 @@
10687
10666
  value:
10688
10667
  /**
10689
10668
  * Trigger an event
10690
- *
10691
10669
  * @param event - Event name.
10692
10670
  * @param payload - Event payload.
10693
10671
  * @param senderId - Id of the sender.
@@ -10703,7 +10681,6 @@
10703
10681
  }
10704
10682
  /**
10705
10683
  * Subscribe to an event, add an event listener.
10706
- *
10707
10684
  * @remarks Non-function callbacks are ignored.
10708
10685
  * @param event - Event name.
10709
10686
  * @param callback - Callback method.
@@ -10718,7 +10695,6 @@
10718
10695
  }
10719
10696
  /**
10720
10697
  * Unsubscribe from an event, remove an event listener.
10721
- *
10722
10698
  * @remarks If the same callback was subscribed more than once **all** occurences will be removed.
10723
10699
  * @param event - Event name.
10724
10700
  * @param callback - Callback method.
@@ -10835,7 +10811,6 @@
10835
10811
  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; }
10836
10812
  /**
10837
10813
  * Data stream
10838
- *
10839
10814
  * @remarks
10840
10815
  * {@link DataStream} offers an always up to date stream of items from a {@link DataSet} or {@link DataView}.
10841
10816
  * 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.
@@ -10845,7 +10820,6 @@
10845
10820
  var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
10846
10821
  /**
10847
10822
  * Create a new data stream.
10848
- *
10849
10823
  * @param pairs - The id, item pairs.
10850
10824
  */
10851
10825
  function DataStream(pairs) {
@@ -11026,7 +11000,6 @@
11026
11000
  })
11027
11001
  /**
11028
11002
  * Return an array containing all the ids in this stream.
11029
- *
11030
11003
  * @remarks
11031
11004
  * The array may contain duplicities.
11032
11005
  * @returns The array with all ids from this stream.
@@ -11041,7 +11014,6 @@
11041
11014
  }
11042
11015
  /**
11043
11016
  * Return an array containing all the items in this stream.
11044
- *
11045
11017
  * @remarks
11046
11018
  * The array may contain duplicities.
11047
11019
  * @returns The array with all items from this stream.
@@ -11056,7 +11028,6 @@
11056
11028
  }
11057
11029
  /**
11058
11030
  * Return an array containing all the entries in this stream.
11059
- *
11060
11031
  * @remarks
11061
11032
  * The array may contain duplicities.
11062
11033
  * @returns The array with all entries from this stream.
@@ -11068,7 +11039,6 @@
11068
11039
  }
11069
11040
  /**
11070
11041
  * Return an object map containing all the items in this stream accessible by ids.
11071
- *
11072
11042
  * @remarks
11073
11043
  * In case of duplicate ids (coerced to string so `7 == '7'`) the last encoutered appears in the returned object.
11074
11044
  * @returns The object map of all id → item pairs from this stream.
@@ -11095,7 +11065,6 @@
11095
11065
  }
11096
11066
  /**
11097
11067
  * Return a map containing all the items in this stream accessible by ids.
11098
- *
11099
11068
  * @returns The map of all id → item pairs from this stream.
11100
11069
  */
11101
11070
  }, {
@@ -11105,7 +11074,6 @@
11105
11074
  }
11106
11075
  /**
11107
11076
  * Return a set containing all the (unique) ids in this stream.
11108
- *
11109
11077
  * @returns The set of all ids from this stream.
11110
11078
  */
11111
11079
  }, {
@@ -11115,7 +11083,6 @@
11115
11083
  }
11116
11084
  /**
11117
11085
  * Return a set containing all the (unique) items in this stream.
11118
- *
11119
11086
  * @returns The set of all items from this stream.
11120
11087
  */
11121
11088
  }, {
@@ -11125,7 +11092,6 @@
11125
11092
  }
11126
11093
  /**
11127
11094
  * Cache the items from this stream.
11128
- *
11129
11095
  * @remarks
11130
11096
  * This method allows for items to be fetched immediatelly and used (possibly multiple times) later.
11131
11097
  * It can also be used to optimize performance as {@link DataStream} would otherwise reevaluate everything upon each iteration.
@@ -11152,7 +11118,6 @@
11152
11118
  }
11153
11119
  /**
11154
11120
  * Get the distinct values of given property.
11155
- *
11156
11121
  * @param callback - The function that picks and possibly converts the property.
11157
11122
  * @typeParam T - The type of the distinct value.
11158
11123
  * @returns A set of all distinct properties.
@@ -11179,7 +11144,6 @@
11179
11144
  }
11180
11145
  /**
11181
11146
  * Filter the items of the stream.
11182
- *
11183
11147
  * @param callback - The function that decides whether an item will be included.
11184
11148
  * @returns A new data stream with the filtered items.
11185
11149
  */
@@ -11234,7 +11198,6 @@
11234
11198
  }
11235
11199
  /**
11236
11200
  * Execute a callback for each item of the stream.
11237
- *
11238
11201
  * @param callback - The function that will be invoked for each item.
11239
11202
  */
11240
11203
  }, {
@@ -11257,7 +11220,6 @@
11257
11220
  }
11258
11221
  /**
11259
11222
  * Map the items into a different type.
11260
- *
11261
11223
  * @param callback - The function that does the conversion.
11262
11224
  * @typeParam Mapped - The type of the item after mapping.
11263
11225
  * @returns A new data stream with the mapped items.
@@ -11309,7 +11271,6 @@
11309
11271
  }
11310
11272
  /**
11311
11273
  * Get the item with the maximum value of given property.
11312
- *
11313
11274
  * @param callback - The function that picks and possibly converts the property.
11314
11275
  * @returns The item with the maximum if found otherwise null.
11315
11276
  */
@@ -11337,7 +11298,6 @@
11337
11298
  }
11338
11299
  /**
11339
11300
  * Get the item with the minimum value of given property.
11340
- *
11341
11301
  * @param callback - The function that picks and possibly converts the property.
11342
11302
  * @returns The item with the minimum if found otherwise null.
11343
11303
  */
@@ -11365,7 +11325,6 @@
11365
11325
  }
11366
11326
  /**
11367
11327
  * Reduce the items into a single value.
11368
- *
11369
11328
  * @param callback - The function that does the reduction.
11370
11329
  * @param accumulator - The initial value of the accumulator.
11371
11330
  * @typeParam T - The type of the accumulated value.
@@ -11392,7 +11351,6 @@
11392
11351
  }
11393
11352
  /**
11394
11353
  * Sort the items.
11395
- *
11396
11354
  * @param callback - Item comparator.
11397
11355
  * @returns A new stream with sorted items.
11398
11356
  */
@@ -11428,7 +11386,6 @@
11428
11386
  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; } }
11429
11387
  /**
11430
11388
  * Add an id to given item if it doesn't have one already.
11431
- *
11432
11389
  * @remarks
11433
11390
  * The item will be modified.
11434
11391
  * @param item - The item that will have an id after a call to this function.
@@ -11466,15 +11423,15 @@
11466
11423
  * // add items
11467
11424
  * // note that the data items can contain different properties and data formats
11468
11425
  * data.add([
11469
- * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
11470
- * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},
11471
- * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},
11472
- * {id: 4, text: 'item 4'}
11426
+ * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
11427
+ * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},
11428
+ * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},
11429
+ * {id: 4, text: 'item 4'}
11473
11430
  * ]);
11474
11431
  *
11475
11432
  * // subscribe to any change in the DataSet
11476
11433
  * data.on('*', function (event, properties, senderId) {
11477
- * console.log('event', event, properties);
11434
+ * console.log('event', event, properties);
11478
11435
  * });
11479
11436
  *
11480
11437
  * // update an existing item
@@ -11493,13 +11450,12 @@
11493
11450
  *
11494
11451
  * // retrieve a filtered subset of the data
11495
11452
  * var items = data.get({
11496
- * filter: function (item) {
11497
- * return item.group == 1;
11498
- * }
11453
+ * filter: function (item) {
11454
+ * return item.group == 1;
11455
+ * }
11499
11456
  * });
11500
11457
  * console.log('filtered items', items);
11501
11458
  * ```
11502
- *
11503
11459
  * @typeParam Item - Item type that may or may not have an id.
11504
11460
  * @typeParam IdProp - Name of the property that contains the id.
11505
11461
  */
@@ -11508,7 +11464,6 @@
11508
11464
  var _super = _createSuper$1(DataSet);
11509
11465
  /**
11510
11466
  * Construct a new DataSet.
11511
- *
11512
11467
  * @param data - Initial data or options.
11513
11468
  * @param options - Options (type error if data is also options).
11514
11469
  */
@@ -11535,7 +11490,6 @@
11535
11490
  }
11536
11491
  /**
11537
11492
  * Set new options.
11538
- *
11539
11493
  * @param options - The new options.
11540
11494
  */
11541
11495
  _createClass(DataSet, [{
@@ -11584,14 +11538,13 @@
11584
11538
  *
11585
11539
  * // add items
11586
11540
  * const ids = data.add([
11587
- * { id: 1, text: 'item 1' },
11588
- * { id: 2, text: 'item 2' },
11589
- * { text: 'item without an id' }
11541
+ * { id: 1, text: 'item 1' },
11542
+ * { id: 2, text: 'item 2' },
11543
+ * { text: 'item without an id' }
11590
11544
  * ])
11591
11545
  *
11592
11546
  * console.log(ids) // [1, 2, '<UUIDv4>']
11593
11547
  * ```
11594
- *
11595
11548
  * @param data - Items to be added (ids will be generated if missing).
11596
11549
  * @param senderId - Sender id.
11597
11550
  * @returns addedIds - Array with the ids (generated if not present) of the added items.
@@ -11633,7 +11586,6 @@
11633
11586
  }
11634
11587
  /**
11635
11588
  * Update existing items. When an item does not exist, it will be created.
11636
- *
11637
11589
  * @remarks
11638
11590
  * The provided properties will be merged in the existing item. When an item does not exist, it will be created.
11639
11591
  *
@@ -11729,7 +11681,6 @@
11729
11681
  }
11730
11682
  /**
11731
11683
  * Update existing items. When an item does not exist, an error will be thrown.
11732
- *
11733
11684
  * @remarks
11734
11685
  * The provided properties will be deeply merged into the existing item.
11735
11686
  * 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.
@@ -12036,7 +11987,6 @@
12036
11987
  }
12037
11988
  /**
12038
11989
  * Filter the fields of an item.
12039
- *
12040
11990
  * @param item - The item whose fields should be filtered.
12041
11991
  * @param fields - The names of the fields that will be kept.
12042
11992
  * @typeParam K - Field name type.
@@ -12061,7 +12011,6 @@
12061
12011
  }
12062
12012
  /**
12063
12013
  * Sort the provided array with items.
12064
- *
12065
12014
  * @param items - Items to be sorted in place.
12066
12015
  * @param order - A field name or custom sort function.
12067
12016
  * @typeParam T - The type of the items in the items array.
@@ -12098,9 +12047,9 @@
12098
12047
  * ```javascript
12099
12048
  * // create a DataSet
12100
12049
  * const data = new vis.DataSet([
12101
- * { id: 1, text: 'item 1' },
12102
- * { id: 2, text: 'item 2' },
12103
- * { id: 3, text: 'item 3' }
12050
+ * { id: 1, text: 'item 1' },
12051
+ * { id: 2, text: 'item 2' },
12052
+ * { id: 3, text: 'item 3' }
12104
12053
  * ])
12105
12054
  *
12106
12055
  * // remove items
@@ -12108,7 +12057,6 @@
12108
12057
  *
12109
12058
  * console.log(ids) // [2, 3]
12110
12059
  * ```
12111
- *
12112
12060
  * @param id - One or more items or ids of items to be removed.
12113
12061
  * @param senderId - Sender id.
12114
12062
  * @returns The ids of the removed items.
@@ -12140,7 +12088,6 @@
12140
12088
  }
12141
12089
  /**
12142
12090
  * Remove an item by its id or reference.
12143
- *
12144
12091
  * @param id - Id of an item or the item itself.
12145
12092
  * @returns The removed item if removed, null otherwise.
12146
12093
  */
@@ -12169,7 +12116,6 @@
12169
12116
  * Clear the entire data set.
12170
12117
  *
12171
12118
  * 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.
12172
- *
12173
12119
  * @param senderId - Sender id.
12174
12120
  * @returns removedIds - The ids of all removed items.
12175
12121
  */
@@ -12192,7 +12138,6 @@
12192
12138
  }
12193
12139
  /**
12194
12140
  * Find the item with maximum value of a specified field.
12195
- *
12196
12141
  * @param field - Name of the property that should be searched for max value.
12197
12142
  * @returns Item containing max value, or null if no items.
12198
12143
  */
@@ -12222,7 +12167,6 @@
12222
12167
  }
12223
12168
  /**
12224
12169
  * Find the item with minimum value of a specified field.
12225
- *
12226
12170
  * @param field - Name of the property that should be searched for min value.
12227
12171
  * @returns Item containing min value, or null if no items.
12228
12172
  */
@@ -12252,7 +12196,6 @@
12252
12196
  }
12253
12197
  /**
12254
12198
  * Find all distinct values of a specified field
12255
- *
12256
12199
  * @param prop - The property name whose distinct values should be returned.
12257
12200
  * @returns Unordered array containing all distinct values. Items without specified property are ignored.
12258
12201
  */
@@ -12283,7 +12226,6 @@
12283
12226
  }
12284
12227
  /**
12285
12228
  * Add a single item. Will fail when an item with the same id already exists.
12286
- *
12287
12229
  * @param item - A new item to be added.
12288
12230
  * @returns Added item's id. An id is generated when it is not present in the item.
12289
12231
  */
@@ -12304,7 +12246,6 @@
12304
12246
  /**
12305
12247
  * Update a single item: merge with existing item.
12306
12248
  * Will fail when the item has no id, or when there does not exist an item with the same id.
12307
- *
12308
12249
  * @param update - The new item
12309
12250
  * @returns The id of the updated item.
12310
12251
  */
@@ -12445,25 +12386,25 @@
12445
12386
  * // create a DataSet
12446
12387
  * var data = new vis.DataSet();
12447
12388
  * data.add([
12448
- * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
12449
- * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},
12450
- * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},
12451
- * {id: 4, text: 'item 4'}
12389
+ * {id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
12390
+ * {id: 2, text: 'item 2', date: '2013-06-23', group: 2},
12391
+ * {id: 3, text: 'item 3', date: '2013-06-25', group: 2},
12392
+ * {id: 4, text: 'item 4'}
12452
12393
  * ]);
12453
12394
  *
12454
12395
  * // create a DataView
12455
12396
  * // the view will only contain items having a property group with value 1,
12456
12397
  * // and will only output fields id, text, and date.
12457
12398
  * var view = new vis.DataView(data, {
12458
- * filter: function (item) {
12459
- * return (item.group == 1);
12460
- * },
12461
- * fields: ['id', 'text', 'date']
12399
+ * filter: function (item) {
12400
+ * return (item.group == 1);
12401
+ * },
12402
+ * fields: ['id', 'text', 'date']
12462
12403
  * });
12463
12404
  *
12464
12405
  * // subscribe to any change in the DataView
12465
12406
  * view.on('*', function (event, properties, senderId) {
12466
- * console.log('event', event, properties);
12407
+ * console.log('event', event, properties);
12467
12408
  * });
12468
12409
  *
12469
12410
  * // update an item in the data set
@@ -12476,7 +12417,6 @@
12476
12417
  * // get all items in the view
12477
12418
  * var items = view.get();
12478
12419
  * ```
12479
- *
12480
12420
  * @typeParam Item - Item type that may or may not have an id.
12481
12421
  * @typeParam IdProp - Name of the property that contains the id.
12482
12422
  */
@@ -12487,7 +12427,6 @@
12487
12427
 
12488
12428
  /**
12489
12429
  * Create a DataView.
12490
- *
12491
12430
  * @param data - The instance containing data (directly or indirectly).
12492
12431
  * @param options - Options to configure this data view.
12493
12432
  */
@@ -12509,7 +12448,6 @@
12509
12448
  // and trigger changes accordingly
12510
12449
  /**
12511
12450
  * Set a data source for the view.
12512
- *
12513
12451
  * @param data - The instance containing data (directly or indirectly).
12514
12452
  * @remarks
12515
12453
  * Note that when the data view is bound to a data set it won't be garbage
@@ -12749,7 +12687,6 @@
12749
12687
  }
12750
12688
  /**
12751
12689
  * Render the instance unusable prior to garbage collection.
12752
- *
12753
12690
  * @remarks
12754
12691
  * The intention of this method is to help discover scenarios where the data
12755
12692
  * view is being used when the programmer thinks it has been garbage collected
@@ -12787,7 +12724,6 @@
12787
12724
  }
12788
12725
  /**
12789
12726
  * 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.
12790
- *
12791
12727
  * @param event - The name of the event.
12792
12728
  * @param params - Parameters of the event.
12793
12729
  * @param senderId - Id supplied by the sender.
@@ -12879,7 +12815,6 @@
12879
12815
 
12880
12816
  /**
12881
12817
  * Check that given value is compatible with Vis Data Set interface.
12882
- *
12883
12818
  * @param idProp - The expected property to contain item id.
12884
12819
  * @param v - The value to be tested.
12885
12820
  * @returns True if all expected values and methods match, false otherwise.
@@ -12890,7 +12825,6 @@
12890
12825
 
12891
12826
  /**
12892
12827
  * Check that given value is compatible with Vis Data View interface.
12893
- *
12894
12828
  * @param idProp - The expected property to contain item id.
12895
12829
  * @param v - The value to be tested.
12896
12830
  * @returns True if all expected values and methods match, false otherwise.