vis-data 7.1.8 → 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.
- package/declarations/data-interface.d.ts +0 -46
- package/declarations/data-interface.d.ts.map +1 -1
- package/declarations/data-pipe.d.ts +0 -8
- package/declarations/data-pipe.d.ts.map +1 -1
- package/declarations/data-set-check.d.ts +0 -1
- package/declarations/data-set-check.d.ts.map +1 -1
- package/declarations/data-set-part.d.ts +0 -1
- package/declarations/data-set-part.d.ts.map +1 -1
- package/declarations/data-set.d.ts +14 -28
- package/declarations/data-set.d.ts.map +1 -1
- package/declarations/data-stream.d.ts +0 -18
- package/declarations/data-stream.d.ts.map +1 -1
- package/declarations/data-view-check.d.ts +0 -1
- package/declarations/data-view-check.d.ts.map +1 -1
- package/declarations/data-view.d.ts +9 -15
- package/declarations/data-view.d.ts.map +1 -1
- package/declarations/queue.d.ts +0 -7
- package/declarations/queue.d.ts.map +1 -1
- package/dist/esm.js +133 -266
- package/dist/esm.js.map +1 -1
- package/dist/umd.js +133 -266
- package/dist/umd.js.map +1 -1
- package/esnext/esm/vis-data.js +25 -91
- package/esnext/esm/vis-data.js.map +1 -1
- package/esnext/esm/vis-data.min.js +2 -2
- package/esnext/esm/vis-data.min.js.map +1 -1
- package/esnext/umd/vis-data.js +25 -91
- package/esnext/umd/vis-data.js.map +1 -1
- package/esnext/umd/vis-data.min.js +2 -2
- package/esnext/umd/vis-data.min.js.map +1 -1
- package/package.json +19 -14
- package/peer/esm/vis-data.js +131 -264
- package/peer/esm/vis-data.js.map +1 -1
- package/peer/esm/vis-data.min.js +4 -4
- package/peer/esm/vis-data.min.js.map +1 -1
- package/peer/umd/vis-data.js +131 -264
- package/peer/umd/vis-data.js.map +1 -1
- package/peer/umd/vis-data.min.js +4 -4
- package/peer/umd/vis-data.min.js.map +1 -1
- package/standalone/esm/vis-data.js +131 -264
- package/standalone/esm/vis-data.js.map +1 -1
- package/standalone/esm/vis-data.min.js +4 -4
- package/standalone/esm/vis-data.min.js.map +1 -1
- package/standalone/umd/vis-data.js +131 -264
- package/standalone/umd/vis-data.js.map +1 -1
- package/standalone/umd/vis-data.min.js +4 -4
- 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.
|
|
8
|
-
* @date
|
|
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.
|
|
@@ -3415,179 +3402,112 @@ var DataPipeUnderConstruction = /*#__PURE__*/function () {
|
|
|
3415
3402
|
var componentEmitter = {exports: {}};
|
|
3416
3403
|
|
|
3417
3404
|
(function (module) {
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
}
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
function
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
}
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
Emitter.prototype.
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
if (cb === fn || cb.fn === fn) {
|
|
3525
|
-
callbacks.splice(i, 1);
|
|
3526
|
-
break;
|
|
3527
|
-
}
|
|
3528
|
-
}
|
|
3529
|
-
|
|
3530
|
-
// Remove event specific arrays for event types that no
|
|
3531
|
-
// one is subscribed for to avoid memory leak.
|
|
3532
|
-
if (callbacks.length === 0) {
|
|
3533
|
-
delete this._callbacks['$' + event];
|
|
3534
|
-
}
|
|
3535
|
-
|
|
3536
|
-
return this;
|
|
3537
|
-
};
|
|
3538
|
-
|
|
3539
|
-
/**
|
|
3540
|
-
* Emit `event` with the given args.
|
|
3541
|
-
*
|
|
3542
|
-
* @param {String} event
|
|
3543
|
-
* @param {Mixed} ...
|
|
3544
|
-
* @return {Emitter}
|
|
3545
|
-
*/
|
|
3546
|
-
|
|
3547
|
-
Emitter.prototype.emit = function(event){
|
|
3548
|
-
this._callbacks = this._callbacks || {};
|
|
3549
|
-
|
|
3550
|
-
var args = new Array(arguments.length - 1)
|
|
3551
|
-
, callbacks = this._callbacks['$' + event];
|
|
3552
|
-
|
|
3553
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
3554
|
-
args[i - 1] = arguments[i];
|
|
3555
|
-
}
|
|
3556
|
-
|
|
3557
|
-
if (callbacks) {
|
|
3558
|
-
callbacks = callbacks.slice(0);
|
|
3559
|
-
for (var i = 0, len = callbacks.length; i < len; ++i) {
|
|
3560
|
-
callbacks[i].apply(this, args);
|
|
3561
|
-
}
|
|
3562
|
-
}
|
|
3563
|
-
|
|
3564
|
-
return this;
|
|
3565
|
-
};
|
|
3566
|
-
|
|
3567
|
-
/**
|
|
3568
|
-
* Return array of callbacks for `event`.
|
|
3569
|
-
*
|
|
3570
|
-
* @param {String} event
|
|
3571
|
-
* @return {Array}
|
|
3572
|
-
* @api public
|
|
3573
|
-
*/
|
|
3574
|
-
|
|
3575
|
-
Emitter.prototype.listeners = function(event){
|
|
3576
|
-
this._callbacks = this._callbacks || {};
|
|
3577
|
-
return this._callbacks['$' + event] || [];
|
|
3578
|
-
};
|
|
3579
|
-
|
|
3580
|
-
/**
|
|
3581
|
-
* Check if this emitter has `event` handlers.
|
|
3582
|
-
*
|
|
3583
|
-
* @param {String} event
|
|
3584
|
-
* @return {Boolean}
|
|
3585
|
-
* @api public
|
|
3586
|
-
*/
|
|
3587
|
-
|
|
3588
|
-
Emitter.prototype.hasListeners = function(event){
|
|
3589
|
-
return !! this.listeners(event).length;
|
|
3590
|
-
};
|
|
3405
|
+
function Emitter(object) {
|
|
3406
|
+
if (object) {
|
|
3407
|
+
return mixin(object);
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3410
|
+
this._callbacks = new Map();
|
|
3411
|
+
}
|
|
3412
|
+
|
|
3413
|
+
function mixin(object) {
|
|
3414
|
+
Object.assign(object, Emitter.prototype);
|
|
3415
|
+
object._callbacks = new Map();
|
|
3416
|
+
return object;
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
Emitter.prototype.on = function (event, listener) {
|
|
3420
|
+
const callbacks = this._callbacks.get(event) ?? [];
|
|
3421
|
+
callbacks.push(listener);
|
|
3422
|
+
this._callbacks.set(event, callbacks);
|
|
3423
|
+
return this;
|
|
3424
|
+
};
|
|
3425
|
+
|
|
3426
|
+
Emitter.prototype.once = function (event, listener) {
|
|
3427
|
+
const on = (...arguments_) => {
|
|
3428
|
+
this.off(event, on);
|
|
3429
|
+
listener.apply(this, arguments_);
|
|
3430
|
+
};
|
|
3431
|
+
|
|
3432
|
+
on.fn = listener;
|
|
3433
|
+
this.on(event, on);
|
|
3434
|
+
return this;
|
|
3435
|
+
};
|
|
3436
|
+
|
|
3437
|
+
Emitter.prototype.off = function (event, listener) {
|
|
3438
|
+
if (event === undefined && listener === undefined) {
|
|
3439
|
+
this._callbacks.clear();
|
|
3440
|
+
return this;
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
if (listener === undefined) {
|
|
3444
|
+
this._callbacks.delete(event);
|
|
3445
|
+
return this;
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
const callbacks = this._callbacks.get(event);
|
|
3449
|
+
if (callbacks) {
|
|
3450
|
+
for (const [index, callback] of callbacks.entries()) {
|
|
3451
|
+
if (callback === listener || callback.fn === listener) {
|
|
3452
|
+
callbacks.splice(index, 1);
|
|
3453
|
+
break;
|
|
3454
|
+
}
|
|
3455
|
+
}
|
|
3456
|
+
|
|
3457
|
+
if (callbacks.length === 0) {
|
|
3458
|
+
this._callbacks.delete(event);
|
|
3459
|
+
} else {
|
|
3460
|
+
this._callbacks.set(event, callbacks);
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3463
|
+
|
|
3464
|
+
return this;
|
|
3465
|
+
};
|
|
3466
|
+
|
|
3467
|
+
Emitter.prototype.emit = function (event, ...arguments_) {
|
|
3468
|
+
const callbacks = this._callbacks.get(event);
|
|
3469
|
+
if (callbacks) {
|
|
3470
|
+
// Create a copy of the callbacks array to avoid issues if it's modified during iteration
|
|
3471
|
+
const callbacksCopy = [...callbacks];
|
|
3472
|
+
|
|
3473
|
+
for (const callback of callbacksCopy) {
|
|
3474
|
+
callback.apply(this, arguments_);
|
|
3475
|
+
}
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
return this;
|
|
3479
|
+
};
|
|
3480
|
+
|
|
3481
|
+
Emitter.prototype.listeners = function (event) {
|
|
3482
|
+
return this._callbacks.get(event) ?? [];
|
|
3483
|
+
};
|
|
3484
|
+
|
|
3485
|
+
Emitter.prototype.listenerCount = function (event) {
|
|
3486
|
+
if (event) {
|
|
3487
|
+
return this.listeners(event).length;
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
let totalCount = 0;
|
|
3491
|
+
for (const callbacks of this._callbacks.values()) {
|
|
3492
|
+
totalCount += callbacks.length;
|
|
3493
|
+
}
|
|
3494
|
+
|
|
3495
|
+
return totalCount;
|
|
3496
|
+
};
|
|
3497
|
+
|
|
3498
|
+
Emitter.prototype.hasListeners = function (event) {
|
|
3499
|
+
return this.listenerCount(event) > 0;
|
|
3500
|
+
};
|
|
3501
|
+
|
|
3502
|
+
// Aliases
|
|
3503
|
+
Emitter.prototype.addEventListener = Emitter.prototype.on;
|
|
3504
|
+
Emitter.prototype.removeListener = Emitter.prototype.off;
|
|
3505
|
+
Emitter.prototype.removeEventListener = Emitter.prototype.off;
|
|
3506
|
+
Emitter.prototype.removeAllListeners = Emitter.prototype.off;
|
|
3507
|
+
|
|
3508
|
+
{
|
|
3509
|
+
module.exports = Emitter;
|
|
3510
|
+
}
|
|
3591
3511
|
} (componentEmitter));
|
|
3592
3512
|
|
|
3593
3513
|
var componentEmitterExports = componentEmitter.exports;
|
|
@@ -6586,8 +6506,8 @@ var RealHammer = Hammer;
|
|
|
6586
6506
|
*
|
|
6587
6507
|
* utilitie collection for visjs
|
|
6588
6508
|
*
|
|
6589
|
-
* @version 5.0.
|
|
6590
|
-
* @date 2023-11-
|
|
6509
|
+
* @version 5.0.7
|
|
6510
|
+
* @date 2023-11-20T09:06:51.067Z
|
|
6591
6511
|
*
|
|
6592
6512
|
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
6593
6513
|
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
@@ -10372,7 +10292,6 @@ function v4(options, buf, offset) {
|
|
|
10372
10292
|
|
|
10373
10293
|
/**
|
|
10374
10294
|
* Determine whether a value can be used as an id.
|
|
10375
|
-
*
|
|
10376
10295
|
* @param value - Input value of unknown type.
|
|
10377
10296
|
* @returns True if the value is valid id, false otherwise.
|
|
10378
10297
|
*/
|
|
@@ -10537,13 +10456,11 @@ var _spliceInstanceProperty = /*@__PURE__*/getDefaultExportFromCjs(splice);
|
|
|
10537
10456
|
|
|
10538
10457
|
/**
|
|
10539
10458
|
* A queue.
|
|
10540
|
-
*
|
|
10541
10459
|
* @typeParam T - The type of method names to be replaced by queued versions.
|
|
10542
10460
|
*/
|
|
10543
10461
|
var Queue = /*#__PURE__*/function () {
|
|
10544
10462
|
/**
|
|
10545
10463
|
* Construct a new Queue.
|
|
10546
|
-
*
|
|
10547
10464
|
* @param options - Queue configuration.
|
|
10548
10465
|
*/
|
|
10549
10466
|
function Queue(options) {
|
|
@@ -10560,7 +10477,6 @@ var Queue = /*#__PURE__*/function () {
|
|
|
10560
10477
|
}
|
|
10561
10478
|
/**
|
|
10562
10479
|
* Update the configuration of the queue.
|
|
10563
|
-
*
|
|
10564
10480
|
* @param options - Queue configuration.
|
|
10565
10481
|
*/
|
|
10566
10482
|
_createClass(Queue, [{
|
|
@@ -10577,7 +10493,6 @@ var Queue = /*#__PURE__*/function () {
|
|
|
10577
10493
|
/**
|
|
10578
10494
|
* Extend an object with queuing functionality.
|
|
10579
10495
|
* The object will be extended with a function flush, and the methods provided in options.replace will be replaced with queued ones.
|
|
10580
|
-
*
|
|
10581
10496
|
* @param object - The object to be extended.
|
|
10582
10497
|
* @param options - Additional options.
|
|
10583
10498
|
* @returns The created queue.
|
|
@@ -10608,7 +10523,6 @@ var Queue = /*#__PURE__*/function () {
|
|
|
10608
10523
|
}
|
|
10609
10524
|
/**
|
|
10610
10525
|
* Replace a method on an object with a queued version.
|
|
10611
|
-
*
|
|
10612
10526
|
* @param object - Object having the method.
|
|
10613
10527
|
* @param method - The method name.
|
|
10614
10528
|
*/
|
|
@@ -10635,7 +10549,6 @@ var Queue = /*#__PURE__*/function () {
|
|
|
10635
10549
|
}
|
|
10636
10550
|
/**
|
|
10637
10551
|
* Queue a call.
|
|
10638
|
-
*
|
|
10639
10552
|
* @param entry - The function or entry to be queued.
|
|
10640
10553
|
*/
|
|
10641
10554
|
}, {
|
|
@@ -10721,7 +10634,6 @@ var Queue = /*#__PURE__*/function () {
|
|
|
10721
10634
|
|
|
10722
10635
|
/**
|
|
10723
10636
|
* {@link DataSet} code that can be reused in {@link DataView} or other similar implementations of {@link DataInterface}.
|
|
10724
|
-
*
|
|
10725
10637
|
* @typeParam Item - Item type that may or may not have an id.
|
|
10726
10638
|
* @typeParam IdProp - Name of the property that contains the id.
|
|
10727
10639
|
*/
|
|
@@ -10748,7 +10660,6 @@ var DataSetPart = /*#__PURE__*/function () {
|
|
|
10748
10660
|
value:
|
|
10749
10661
|
/**
|
|
10750
10662
|
* Trigger an event
|
|
10751
|
-
*
|
|
10752
10663
|
* @param event - Event name.
|
|
10753
10664
|
* @param payload - Event payload.
|
|
10754
10665
|
* @param senderId - Id of the sender.
|
|
@@ -10764,7 +10675,6 @@ var DataSetPart = /*#__PURE__*/function () {
|
|
|
10764
10675
|
}
|
|
10765
10676
|
/**
|
|
10766
10677
|
* Subscribe to an event, add an event listener.
|
|
10767
|
-
*
|
|
10768
10678
|
* @remarks Non-function callbacks are ignored.
|
|
10769
10679
|
* @param event - Event name.
|
|
10770
10680
|
* @param callback - Callback method.
|
|
@@ -10779,7 +10689,6 @@ var DataSetPart = /*#__PURE__*/function () {
|
|
|
10779
10689
|
}
|
|
10780
10690
|
/**
|
|
10781
10691
|
* Unsubscribe from an event, remove an event listener.
|
|
10782
|
-
*
|
|
10783
10692
|
* @remarks If the same callback was subscribed more than once **all** occurences will be removed.
|
|
10784
10693
|
* @param event - Event name.
|
|
10785
10694
|
* @param callback - Callback method.
|
|
@@ -10896,7 +10805,6 @@ function _unsupportedIterableToArray$2(o, minLen) { var _context10; if (!o) retu
|
|
|
10896
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; }
|
|
10897
10806
|
/**
|
|
10898
10807
|
* Data stream
|
|
10899
|
-
*
|
|
10900
10808
|
* @remarks
|
|
10901
10809
|
* {@link DataStream} offers an always up to date stream of items from a {@link DataSet} or {@link DataView}.
|
|
10902
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.
|
|
@@ -10906,7 +10814,6 @@ function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) le
|
|
|
10906
10814
|
var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
10907
10815
|
/**
|
|
10908
10816
|
* Create a new data stream.
|
|
10909
|
-
*
|
|
10910
10817
|
* @param pairs - The id, item pairs.
|
|
10911
10818
|
*/
|
|
10912
10819
|
function DataStream(pairs) {
|
|
@@ -11087,7 +10994,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11087
10994
|
})
|
|
11088
10995
|
/**
|
|
11089
10996
|
* Return an array containing all the ids in this stream.
|
|
11090
|
-
*
|
|
11091
10997
|
* @remarks
|
|
11092
10998
|
* The array may contain duplicities.
|
|
11093
10999
|
* @returns The array with all ids from this stream.
|
|
@@ -11102,7 +11008,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11102
11008
|
}
|
|
11103
11009
|
/**
|
|
11104
11010
|
* Return an array containing all the items in this stream.
|
|
11105
|
-
*
|
|
11106
11011
|
* @remarks
|
|
11107
11012
|
* The array may contain duplicities.
|
|
11108
11013
|
* @returns The array with all items from this stream.
|
|
@@ -11117,7 +11022,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11117
11022
|
}
|
|
11118
11023
|
/**
|
|
11119
11024
|
* Return an array containing all the entries in this stream.
|
|
11120
|
-
*
|
|
11121
11025
|
* @remarks
|
|
11122
11026
|
* The array may contain duplicities.
|
|
11123
11027
|
* @returns The array with all entries from this stream.
|
|
@@ -11129,7 +11033,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11129
11033
|
}
|
|
11130
11034
|
/**
|
|
11131
11035
|
* Return an object map containing all the items in this stream accessible by ids.
|
|
11132
|
-
*
|
|
11133
11036
|
* @remarks
|
|
11134
11037
|
* In case of duplicate ids (coerced to string so `7 == '7'`) the last encoutered appears in the returned object.
|
|
11135
11038
|
* @returns The object map of all id → item pairs from this stream.
|
|
@@ -11156,7 +11059,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11156
11059
|
}
|
|
11157
11060
|
/**
|
|
11158
11061
|
* Return a map containing all the items in this stream accessible by ids.
|
|
11159
|
-
*
|
|
11160
11062
|
* @returns The map of all id → item pairs from this stream.
|
|
11161
11063
|
*/
|
|
11162
11064
|
}, {
|
|
@@ -11166,7 +11068,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11166
11068
|
}
|
|
11167
11069
|
/**
|
|
11168
11070
|
* Return a set containing all the (unique) ids in this stream.
|
|
11169
|
-
*
|
|
11170
11071
|
* @returns The set of all ids from this stream.
|
|
11171
11072
|
*/
|
|
11172
11073
|
}, {
|
|
@@ -11176,7 +11077,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11176
11077
|
}
|
|
11177
11078
|
/**
|
|
11178
11079
|
* Return a set containing all the (unique) items in this stream.
|
|
11179
|
-
*
|
|
11180
11080
|
* @returns The set of all items from this stream.
|
|
11181
11081
|
*/
|
|
11182
11082
|
}, {
|
|
@@ -11186,7 +11086,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11186
11086
|
}
|
|
11187
11087
|
/**
|
|
11188
11088
|
* Cache the items from this stream.
|
|
11189
|
-
*
|
|
11190
11089
|
* @remarks
|
|
11191
11090
|
* This method allows for items to be fetched immediatelly and used (possibly multiple times) later.
|
|
11192
11091
|
* It can also be used to optimize performance as {@link DataStream} would otherwise reevaluate everything upon each iteration.
|
|
@@ -11213,7 +11112,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11213
11112
|
}
|
|
11214
11113
|
/**
|
|
11215
11114
|
* Get the distinct values of given property.
|
|
11216
|
-
*
|
|
11217
11115
|
* @param callback - The function that picks and possibly converts the property.
|
|
11218
11116
|
* @typeParam T - The type of the distinct value.
|
|
11219
11117
|
* @returns A set of all distinct properties.
|
|
@@ -11240,7 +11138,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11240
11138
|
}
|
|
11241
11139
|
/**
|
|
11242
11140
|
* Filter the items of the stream.
|
|
11243
|
-
*
|
|
11244
11141
|
* @param callback - The function that decides whether an item will be included.
|
|
11245
11142
|
* @returns A new data stream with the filtered items.
|
|
11246
11143
|
*/
|
|
@@ -11295,7 +11192,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11295
11192
|
}
|
|
11296
11193
|
/**
|
|
11297
11194
|
* Execute a callback for each item of the stream.
|
|
11298
|
-
*
|
|
11299
11195
|
* @param callback - The function that will be invoked for each item.
|
|
11300
11196
|
*/
|
|
11301
11197
|
}, {
|
|
@@ -11318,7 +11214,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11318
11214
|
}
|
|
11319
11215
|
/**
|
|
11320
11216
|
* Map the items into a different type.
|
|
11321
|
-
*
|
|
11322
11217
|
* @param callback - The function that does the conversion.
|
|
11323
11218
|
* @typeParam Mapped - The type of the item after mapping.
|
|
11324
11219
|
* @returns A new data stream with the mapped items.
|
|
@@ -11370,7 +11265,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11370
11265
|
}
|
|
11371
11266
|
/**
|
|
11372
11267
|
* Get the item with the maximum value of given property.
|
|
11373
|
-
*
|
|
11374
11268
|
* @param callback - The function that picks and possibly converts the property.
|
|
11375
11269
|
* @returns The item with the maximum if found otherwise null.
|
|
11376
11270
|
*/
|
|
@@ -11398,7 +11292,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11398
11292
|
}
|
|
11399
11293
|
/**
|
|
11400
11294
|
* Get the item with the minimum value of given property.
|
|
11401
|
-
*
|
|
11402
11295
|
* @param callback - The function that picks and possibly converts the property.
|
|
11403
11296
|
* @returns The item with the minimum if found otherwise null.
|
|
11404
11297
|
*/
|
|
@@ -11426,7 +11319,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11426
11319
|
}
|
|
11427
11320
|
/**
|
|
11428
11321
|
* Reduce the items into a single value.
|
|
11429
|
-
*
|
|
11430
11322
|
* @param callback - The function that does the reduction.
|
|
11431
11323
|
* @param accumulator - The initial value of the accumulator.
|
|
11432
11324
|
* @typeParam T - The type of the accumulated value.
|
|
@@ -11453,7 +11345,6 @@ var DataStream = /*#__PURE__*/function (_Symbol$iterator$1) {
|
|
|
11453
11345
|
}
|
|
11454
11346
|
/**
|
|
11455
11347
|
* Sort the items.
|
|
11456
|
-
*
|
|
11457
11348
|
* @param callback - Item comparator.
|
|
11458
11349
|
* @returns A new stream with sorted items.
|
|
11459
11350
|
*/
|
|
@@ -11489,7 +11380,6 @@ function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeRefl
|
|
|
11489
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; } }
|
|
11490
11381
|
/**
|
|
11491
11382
|
* Add an id to given item if it doesn't have one already.
|
|
11492
|
-
*
|
|
11493
11383
|
* @remarks
|
|
11494
11384
|
* The item will be modified.
|
|
11495
11385
|
* @param item - The item that will have an id after a call to this function.
|
|
@@ -11527,15 +11417,15 @@ function ensureFullItem(item, idProp) {
|
|
|
11527
11417
|
* // add items
|
|
11528
11418
|
* // note that the data items can contain different properties and data formats
|
|
11529
11419
|
* data.add([
|
|
11530
|
-
*
|
|
11531
|
-
*
|
|
11532
|
-
*
|
|
11533
|
-
*
|
|
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'}
|
|
11534
11424
|
* ]);
|
|
11535
11425
|
*
|
|
11536
11426
|
* // subscribe to any change in the DataSet
|
|
11537
11427
|
* data.on('*', function (event, properties, senderId) {
|
|
11538
|
-
*
|
|
11428
|
+
* console.log('event', event, properties);
|
|
11539
11429
|
* });
|
|
11540
11430
|
*
|
|
11541
11431
|
* // update an existing item
|
|
@@ -11554,13 +11444,12 @@ function ensureFullItem(item, idProp) {
|
|
|
11554
11444
|
*
|
|
11555
11445
|
* // retrieve a filtered subset of the data
|
|
11556
11446
|
* var items = data.get({
|
|
11557
|
-
*
|
|
11558
|
-
*
|
|
11559
|
-
*
|
|
11447
|
+
* filter: function (item) {
|
|
11448
|
+
* return item.group == 1;
|
|
11449
|
+
* }
|
|
11560
11450
|
* });
|
|
11561
11451
|
* console.log('filtered items', items);
|
|
11562
11452
|
* ```
|
|
11563
|
-
*
|
|
11564
11453
|
* @typeParam Item - Item type that may or may not have an id.
|
|
11565
11454
|
* @typeParam IdProp - Name of the property that contains the id.
|
|
11566
11455
|
*/
|
|
@@ -11569,7 +11458,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
11569
11458
|
var _super = _createSuper$1(DataSet);
|
|
11570
11459
|
/**
|
|
11571
11460
|
* Construct a new DataSet.
|
|
11572
|
-
*
|
|
11573
11461
|
* @param data - Initial data or options.
|
|
11574
11462
|
* @param options - Options (type error if data is also options).
|
|
11575
11463
|
*/
|
|
@@ -11596,7 +11484,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
11596
11484
|
}
|
|
11597
11485
|
/**
|
|
11598
11486
|
* Set new options.
|
|
11599
|
-
*
|
|
11600
11487
|
* @param options - The new options.
|
|
11601
11488
|
*/
|
|
11602
11489
|
_createClass(DataSet, [{
|
|
@@ -11645,14 +11532,13 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
11645
11532
|
*
|
|
11646
11533
|
* // add items
|
|
11647
11534
|
* const ids = data.add([
|
|
11648
|
-
*
|
|
11649
|
-
*
|
|
11650
|
-
*
|
|
11535
|
+
* { id: 1, text: 'item 1' },
|
|
11536
|
+
* { id: 2, text: 'item 2' },
|
|
11537
|
+
* { text: 'item without an id' }
|
|
11651
11538
|
* ])
|
|
11652
11539
|
*
|
|
11653
11540
|
* console.log(ids) // [1, 2, '<UUIDv4>']
|
|
11654
11541
|
* ```
|
|
11655
|
-
*
|
|
11656
11542
|
* @param data - Items to be added (ids will be generated if missing).
|
|
11657
11543
|
* @param senderId - Sender id.
|
|
11658
11544
|
* @returns addedIds - Array with the ids (generated if not present) of the added items.
|
|
@@ -11694,7 +11580,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
11694
11580
|
}
|
|
11695
11581
|
/**
|
|
11696
11582
|
* Update existing items. When an item does not exist, it will be created.
|
|
11697
|
-
*
|
|
11698
11583
|
* @remarks
|
|
11699
11584
|
* The provided properties will be merged in the existing item. When an item does not exist, it will be created.
|
|
11700
11585
|
*
|
|
@@ -11790,7 +11675,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
11790
11675
|
}
|
|
11791
11676
|
/**
|
|
11792
11677
|
* Update existing items. When an item does not exist, an error will be thrown.
|
|
11793
|
-
*
|
|
11794
11678
|
* @remarks
|
|
11795
11679
|
* The provided properties will be deeply merged into the existing item.
|
|
11796
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.
|
|
@@ -12097,7 +11981,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12097
11981
|
}
|
|
12098
11982
|
/**
|
|
12099
11983
|
* Filter the fields of an item.
|
|
12100
|
-
*
|
|
12101
11984
|
* @param item - The item whose fields should be filtered.
|
|
12102
11985
|
* @param fields - The names of the fields that will be kept.
|
|
12103
11986
|
* @typeParam K - Field name type.
|
|
@@ -12122,7 +12005,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12122
12005
|
}
|
|
12123
12006
|
/**
|
|
12124
12007
|
* Sort the provided array with items.
|
|
12125
|
-
*
|
|
12126
12008
|
* @param items - Items to be sorted in place.
|
|
12127
12009
|
* @param order - A field name or custom sort function.
|
|
12128
12010
|
* @typeParam T - The type of the items in the items array.
|
|
@@ -12159,9 +12041,9 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12159
12041
|
* ```javascript
|
|
12160
12042
|
* // create a DataSet
|
|
12161
12043
|
* const data = new vis.DataSet([
|
|
12162
|
-
*
|
|
12163
|
-
*
|
|
12164
|
-
*
|
|
12044
|
+
* { id: 1, text: 'item 1' },
|
|
12045
|
+
* { id: 2, text: 'item 2' },
|
|
12046
|
+
* { id: 3, text: 'item 3' }
|
|
12165
12047
|
* ])
|
|
12166
12048
|
*
|
|
12167
12049
|
* // remove items
|
|
@@ -12169,7 +12051,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12169
12051
|
*
|
|
12170
12052
|
* console.log(ids) // [2, 3]
|
|
12171
12053
|
* ```
|
|
12172
|
-
*
|
|
12173
12054
|
* @param id - One or more items or ids of items to be removed.
|
|
12174
12055
|
* @param senderId - Sender id.
|
|
12175
12056
|
* @returns The ids of the removed items.
|
|
@@ -12201,7 +12082,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12201
12082
|
}
|
|
12202
12083
|
/**
|
|
12203
12084
|
* Remove an item by its id or reference.
|
|
12204
|
-
*
|
|
12205
12085
|
* @param id - Id of an item or the item itself.
|
|
12206
12086
|
* @returns The removed item if removed, null otherwise.
|
|
12207
12087
|
*/
|
|
@@ -12230,7 +12110,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12230
12110
|
* Clear the entire data set.
|
|
12231
12111
|
*
|
|
12232
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.
|
|
12233
|
-
*
|
|
12234
12113
|
* @param senderId - Sender id.
|
|
12235
12114
|
* @returns removedIds - The ids of all removed items.
|
|
12236
12115
|
*/
|
|
@@ -12253,7 +12132,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12253
12132
|
}
|
|
12254
12133
|
/**
|
|
12255
12134
|
* Find the item with maximum value of a specified field.
|
|
12256
|
-
*
|
|
12257
12135
|
* @param field - Name of the property that should be searched for max value.
|
|
12258
12136
|
* @returns Item containing max value, or null if no items.
|
|
12259
12137
|
*/
|
|
@@ -12283,7 +12161,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12283
12161
|
}
|
|
12284
12162
|
/**
|
|
12285
12163
|
* Find the item with minimum value of a specified field.
|
|
12286
|
-
*
|
|
12287
12164
|
* @param field - Name of the property that should be searched for min value.
|
|
12288
12165
|
* @returns Item containing min value, or null if no items.
|
|
12289
12166
|
*/
|
|
@@ -12313,7 +12190,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12313
12190
|
}
|
|
12314
12191
|
/**
|
|
12315
12192
|
* Find all distinct values of a specified field
|
|
12316
|
-
*
|
|
12317
12193
|
* @param prop - The property name whose distinct values should be returned.
|
|
12318
12194
|
* @returns Unordered array containing all distinct values. Items without specified property are ignored.
|
|
12319
12195
|
*/
|
|
@@ -12344,7 +12220,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12344
12220
|
}
|
|
12345
12221
|
/**
|
|
12346
12222
|
* Add a single item. Will fail when an item with the same id already exists.
|
|
12347
|
-
*
|
|
12348
12223
|
* @param item - A new item to be added.
|
|
12349
12224
|
* @returns Added item's id. An id is generated when it is not present in the item.
|
|
12350
12225
|
*/
|
|
@@ -12365,7 +12240,6 @@ var DataSet = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12365
12240
|
/**
|
|
12366
12241
|
* Update a single item: merge with existing item.
|
|
12367
12242
|
* Will fail when the item has no id, or when there does not exist an item with the same id.
|
|
12368
|
-
*
|
|
12369
12243
|
* @param update - The new item
|
|
12370
12244
|
* @returns The id of the updated item.
|
|
12371
12245
|
*/
|
|
@@ -12506,25 +12380,25 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
12506
12380
|
* // create a DataSet
|
|
12507
12381
|
* var data = new vis.DataSet();
|
|
12508
12382
|
* data.add([
|
|
12509
|
-
*
|
|
12510
|
-
*
|
|
12511
|
-
*
|
|
12512
|
-
*
|
|
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'}
|
|
12513
12387
|
* ]);
|
|
12514
12388
|
*
|
|
12515
12389
|
* // create a DataView
|
|
12516
12390
|
* // the view will only contain items having a property group with value 1,
|
|
12517
12391
|
* // and will only output fields id, text, and date.
|
|
12518
12392
|
* var view = new vis.DataView(data, {
|
|
12519
|
-
*
|
|
12520
|
-
*
|
|
12521
|
-
*
|
|
12522
|
-
*
|
|
12393
|
+
* filter: function (item) {
|
|
12394
|
+
* return (item.group == 1);
|
|
12395
|
+
* },
|
|
12396
|
+
* fields: ['id', 'text', 'date']
|
|
12523
12397
|
* });
|
|
12524
12398
|
*
|
|
12525
12399
|
* // subscribe to any change in the DataView
|
|
12526
12400
|
* view.on('*', function (event, properties, senderId) {
|
|
12527
|
-
*
|
|
12401
|
+
* console.log('event', event, properties);
|
|
12528
12402
|
* });
|
|
12529
12403
|
*
|
|
12530
12404
|
* // update an item in the data set
|
|
@@ -12537,7 +12411,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
12537
12411
|
* // get all items in the view
|
|
12538
12412
|
* var items = view.get();
|
|
12539
12413
|
* ```
|
|
12540
|
-
*
|
|
12541
12414
|
* @typeParam Item - Item type that may or may not have an id.
|
|
12542
12415
|
* @typeParam IdProp - Name of the property that contains the id.
|
|
12543
12416
|
*/
|
|
@@ -12548,7 +12421,6 @@ var DataView = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12548
12421
|
|
|
12549
12422
|
/**
|
|
12550
12423
|
* Create a DataView.
|
|
12551
|
-
*
|
|
12552
12424
|
* @param data - The instance containing data (directly or indirectly).
|
|
12553
12425
|
* @param options - Options to configure this data view.
|
|
12554
12426
|
*/
|
|
@@ -12570,7 +12442,6 @@ var DataView = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12570
12442
|
// and trigger changes accordingly
|
|
12571
12443
|
/**
|
|
12572
12444
|
* Set a data source for the view.
|
|
12573
|
-
*
|
|
12574
12445
|
* @param data - The instance containing data (directly or indirectly).
|
|
12575
12446
|
* @remarks
|
|
12576
12447
|
* Note that when the data view is bound to a data set it won't be garbage
|
|
@@ -12810,7 +12681,6 @@ var DataView = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12810
12681
|
}
|
|
12811
12682
|
/**
|
|
12812
12683
|
* Render the instance unusable prior to garbage collection.
|
|
12813
|
-
*
|
|
12814
12684
|
* @remarks
|
|
12815
12685
|
* The intention of this method is to help discover scenarios where the data
|
|
12816
12686
|
* view is being used when the programmer thinks it has been garbage collected
|
|
@@ -12848,7 +12718,6 @@ var DataView = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12848
12718
|
}
|
|
12849
12719
|
/**
|
|
12850
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.
|
|
12851
|
-
*
|
|
12852
12721
|
* @param event - The name of the event.
|
|
12853
12722
|
* @param params - Parameters of the event.
|
|
12854
12723
|
* @param senderId - Id supplied by the sender.
|
|
@@ -12940,7 +12809,6 @@ var DataView = /*#__PURE__*/function (_DataSetPart) {
|
|
|
12940
12809
|
|
|
12941
12810
|
/**
|
|
12942
12811
|
* Check that given value is compatible with Vis Data Set interface.
|
|
12943
|
-
*
|
|
12944
12812
|
* @param idProp - The expected property to contain item id.
|
|
12945
12813
|
* @param v - The value to be tested.
|
|
12946
12814
|
* @returns True if all expected values and methods match, false otherwise.
|
|
@@ -12951,7 +12819,6 @@ function isDataSetLike(idProp, v) {
|
|
|
12951
12819
|
|
|
12952
12820
|
/**
|
|
12953
12821
|
* Check that given value is compatible with Vis Data View interface.
|
|
12954
|
-
*
|
|
12955
12822
|
* @param idProp - The expected property to contain item id.
|
|
12956
12823
|
* @param v - The value to be tested.
|
|
12957
12824
|
* @returns True if all expected values and methods match, false otherwise.
|