@mtgame/core 0.1.79 → 0.1.81
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/bundles/mtgame-core.umd.js +71 -9
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/models/util.js +14 -8
- package/esm2015/models/volleyball-game-statistic.js +14 -2
- package/esm2015/models/volleyball-statistic.js +14 -2
- package/fesm2015/mtgame-core.js +39 -9
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/volleyball-game-statistic.d.ts +4 -0
- package/models/volleyball-statistic.d.ts +4 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -430,6 +430,9 @@
|
|
|
430
430
|
function enumField(enumClass) {
|
|
431
431
|
return {
|
|
432
432
|
toFront: function (value) {
|
|
433
|
+
if (value === null || value === undefined) {
|
|
434
|
+
return value;
|
|
435
|
+
}
|
|
433
436
|
if (isNaN(+value)) {
|
|
434
437
|
return enumClass[value];
|
|
435
438
|
}
|
|
@@ -438,6 +441,9 @@
|
|
|
438
441
|
}
|
|
439
442
|
},
|
|
440
443
|
toBack: function (value) {
|
|
444
|
+
if (value === null || value === undefined) {
|
|
445
|
+
return value;
|
|
446
|
+
}
|
|
441
447
|
if (isNaN(+value)) {
|
|
442
448
|
return value;
|
|
443
449
|
}
|
|
@@ -542,11 +548,11 @@
|
|
|
542
548
|
if (config.relation) {
|
|
543
549
|
target[MODEL_RELATION_KEY] = config.relation;
|
|
544
550
|
}
|
|
545
|
-
target[MODEL_TO_FRONT_KEY] = function (dto
|
|
546
|
-
return toFront(target, dto
|
|
551
|
+
target[MODEL_TO_FRONT_KEY] = function (dto) {
|
|
552
|
+
return toFront(target, dto);
|
|
547
553
|
};
|
|
548
|
-
target[MODEL_TO_BACK_KEY] = function (dto
|
|
549
|
-
return toBack(target, dto
|
|
554
|
+
target[MODEL_TO_BACK_KEY] = function (dto) {
|
|
555
|
+
return toBack(target, dto);
|
|
550
556
|
};
|
|
551
557
|
}
|
|
552
558
|
};
|
|
@@ -560,7 +566,7 @@
|
|
|
560
566
|
}
|
|
561
567
|
var parseMethod = target[MODEL_TO_FRONT_KEY];
|
|
562
568
|
if (parseMethod) {
|
|
563
|
-
return parseMethod(args[0]
|
|
569
|
+
return parseMethod(args[0]);
|
|
564
570
|
}
|
|
565
571
|
return undefined;
|
|
566
572
|
}
|
|
@@ -615,7 +621,7 @@
|
|
|
615
621
|
}
|
|
616
622
|
return data;
|
|
617
623
|
}
|
|
618
|
-
function toFront(modelType, data
|
|
624
|
+
function toFront(modelType, data) {
|
|
619
625
|
var e_3, _a;
|
|
620
626
|
// Check if recursion is required
|
|
621
627
|
if (Array.isArray(data)) {
|
|
@@ -651,7 +657,7 @@
|
|
|
651
657
|
}
|
|
652
658
|
return instance;
|
|
653
659
|
}
|
|
654
|
-
function toBack(modelType, instance
|
|
660
|
+
function toBack(modelType, instance) {
|
|
655
661
|
var e_4, _a;
|
|
656
662
|
if (!instance) {
|
|
657
663
|
return instance;
|
|
@@ -5414,7 +5420,35 @@
|
|
|
5414
5420
|
});
|
|
5415
5421
|
Object.defineProperty(VolleyballStatistic.prototype, "totalReceives", {
|
|
5416
5422
|
get: function () {
|
|
5417
|
-
return this.receives + this.excellentReceives;
|
|
5423
|
+
return this.receives + this.excellentReceives + this.receiveFaults;
|
|
5424
|
+
},
|
|
5425
|
+
enumerable: false,
|
|
5426
|
+
configurable: true
|
|
5427
|
+
});
|
|
5428
|
+
Object.defineProperty(VolleyballStatistic.prototype, "totalServeReceives", {
|
|
5429
|
+
get: function () {
|
|
5430
|
+
return this.serveReceives + this.excellentServeReceives + this.serveReceiveFaults;
|
|
5431
|
+
},
|
|
5432
|
+
enumerable: false,
|
|
5433
|
+
configurable: true
|
|
5434
|
+
});
|
|
5435
|
+
Object.defineProperty(VolleyballStatistic.prototype, "totalServes", {
|
|
5436
|
+
get: function () {
|
|
5437
|
+
return this.serveAces + this.serveHits + this.serveFaults;
|
|
5438
|
+
},
|
|
5439
|
+
enumerable: false,
|
|
5440
|
+
configurable: true
|
|
5441
|
+
});
|
|
5442
|
+
Object.defineProperty(VolleyballStatistic.prototype, "totalAttacks", {
|
|
5443
|
+
get: function () {
|
|
5444
|
+
return this.attackSpikes + this.attackShots + this.attackFaults;
|
|
5445
|
+
},
|
|
5446
|
+
enumerable: false,
|
|
5447
|
+
configurable: true
|
|
5448
|
+
});
|
|
5449
|
+
Object.defineProperty(VolleyballStatistic.prototype, "totalBlocks", {
|
|
5450
|
+
get: function () {
|
|
5451
|
+
return this.stuffBlocks + this.blockRebounds + this.blockFaults;
|
|
5418
5452
|
},
|
|
5419
5453
|
enumerable: false,
|
|
5420
5454
|
configurable: true
|
|
@@ -9234,7 +9268,35 @@
|
|
|
9234
9268
|
});
|
|
9235
9269
|
Object.defineProperty(VolleyballGameStatistic.prototype, "totalReceives", {
|
|
9236
9270
|
get: function () {
|
|
9237
|
-
return this.receives + this.excellentReceives;
|
|
9271
|
+
return this.receives + this.excellentReceives + this.receiveFaults;
|
|
9272
|
+
},
|
|
9273
|
+
enumerable: false,
|
|
9274
|
+
configurable: true
|
|
9275
|
+
});
|
|
9276
|
+
Object.defineProperty(VolleyballGameStatistic.prototype, "totalServeReceives", {
|
|
9277
|
+
get: function () {
|
|
9278
|
+
return this.serveReceives + this.excellentServeReceives + this.serveReceiveFaults;
|
|
9279
|
+
},
|
|
9280
|
+
enumerable: false,
|
|
9281
|
+
configurable: true
|
|
9282
|
+
});
|
|
9283
|
+
Object.defineProperty(VolleyballGameStatistic.prototype, "totalServes", {
|
|
9284
|
+
get: function () {
|
|
9285
|
+
return this.serveAces + this.serveHits + this.serveFaults;
|
|
9286
|
+
},
|
|
9287
|
+
enumerable: false,
|
|
9288
|
+
configurable: true
|
|
9289
|
+
});
|
|
9290
|
+
Object.defineProperty(VolleyballGameStatistic.prototype, "totalAttacks", {
|
|
9291
|
+
get: function () {
|
|
9292
|
+
return this.attackSpikes + this.attackShots + this.attackFaults;
|
|
9293
|
+
},
|
|
9294
|
+
enumerable: false,
|
|
9295
|
+
configurable: true
|
|
9296
|
+
});
|
|
9297
|
+
Object.defineProperty(VolleyballGameStatistic.prototype, "totalBlocks", {
|
|
9298
|
+
get: function () {
|
|
9299
|
+
return this.stuffBlocks + this.blockRebounds + this.blockFaults;
|
|
9238
9300
|
},
|
|
9239
9301
|
enumerable: false,
|
|
9240
9302
|
configurable: true
|