@aurigma/design-atoms-model 7.0.33 → 7.0.36
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/Collection.js +271 -514
- package/Collection.js.map +1 -1
- package/Colors/CmykColor.js +35 -69
- package/Colors/CmykColor.js.map +1 -1
- package/Colors/Color.js +11 -19
- package/Colors/Color.js.map +1 -1
- package/Colors/GrayscaleColor.js +23 -45
- package/Colors/GrayscaleColor.js.map +1 -1
- package/Colors/HsbColor.js +67 -85
- package/Colors/HsbColor.js.map +1 -1
- package/Colors/Ink.js +20 -35
- package/Colors/Ink.js.map +1 -1
- package/Colors/LabColor.js +29 -59
- package/Colors/LabColor.js.map +1 -1
- package/Colors/Palette.js +2 -21
- package/Colors/Palette.js.map +1 -1
- package/Colors/ProcessColor.js +24 -54
- package/Colors/ProcessColor.js.map +1 -1
- package/Colors/RgbColor.js +31 -61
- package/Colors/RgbColor.js.map +1 -1
- package/Colors/RgbColors.js +22 -54
- package/Colors/RgbColors.js.map +1 -1
- package/Colors/SpotColor.js +34 -68
- package/Colors/SpotColor.js.map +1 -1
- package/Colors/Swatch.js +16 -40
- package/Colors/Swatch.js.map +1 -1
- package/Colors/ValidationUtils.js +3 -5
- package/Colors/ValidationUtils.js.map +1 -1
- package/ColorsOld/CmykColor.js +54 -80
- package/ColorsOld/CmykColor.js.map +1 -1
- package/ColorsOld/Color.d.ts +1 -1
- package/ColorsOld/Color.js +25 -34
- package/ColorsOld/Color.js.map +1 -1
- package/ColorsOld/ColorFactory.js +30 -40
- package/ColorsOld/ColorFactory.js.map +1 -1
- package/ColorsOld/GrayscaleColor.js +29 -54
- package/ColorsOld/GrayscaleColor.js.map +1 -1
- package/ColorsOld/HsbColor.js +29 -35
- package/ColorsOld/HsbColor.js.map +1 -1
- package/ColorsOld/LabColor.js +35 -56
- package/ColorsOld/LabColor.js.map +1 -1
- package/ColorsOld/RgbColor.js +73 -114
- package/ColorsOld/RgbColor.js.map +1 -1
- package/ColorsOld/SpotColor.js +32 -53
- package/ColorsOld/SpotColor.js.map +1 -1
- package/ColorsOld/Utils.js +9 -13
- package/ColorsOld/Utils.js.map +1 -1
- package/Configuration/IRenderingConfig.js +1 -0
- package/Configuration/WatermarkConfig.js +17 -33
- package/Configuration/WatermarkConfig.js.map +1 -1
- package/Configuration/index.js +1 -0
- package/Configuration/index.js.map +1 -1
- package/Configuration.js +7 -11
- package/Configuration.js.map +1 -1
- package/EquatableKeyDictionary.js +43 -127
- package/EquatableKeyDictionary.js.map +1 -1
- package/EventObject.js +59 -136
- package/EventObject.js.map +1 -1
- package/Exception.d.ts +1 -1
- package/Exception.js +47 -88
- package/Exception.js.map +1 -1
- package/INotifyPropertyChanged.d.ts +1 -1
- package/INotifyPropertyChanged.js +1 -0
- package/Math/Array.js +3 -3
- package/Math/Array.js.map +1 -1
- package/Math/Common.js +13 -15
- package/Math/Common.js.map +1 -1
- package/Math/ILtrb.js +1 -0
- package/Math/IPoint.js +1 -0
- package/Math/ISize.js +1 -0
- package/Math/Margin.js +62 -99
- package/Math/Margin.js.map +1 -1
- package/Math/Matrix.js +63 -94
- package/Math/Matrix.js.map +1 -1
- package/Math/Path.d.ts +2 -0
- package/Math/Path.js +231 -142
- package/Math/Path.js.map +1 -1
- package/Math/PointF.js +31 -34
- package/Math/PointF.js.map +1 -1
- package/Math/RectangleF.js +119 -159
- package/Math/RectangleF.js.map +1 -1
- package/Math/RotatedRectangleF.js +132 -147
- package/Math/RotatedRectangleF.js.map +1 -1
- package/Math/SizeF.js +10 -12
- package/Math/SizeF.js.map +1 -1
- package/Math/Transform.js +50 -80
- package/Math/Transform.js.map +1 -1
- package/Math/index.js +3 -0
- package/Math/index.js.map +1 -1
- package/Product/Constraints/ContainerConstraints.d.ts +13 -0
- package/Product/Constraints/ContainerConstraints.js +22 -0
- package/Product/Constraints/ContainerConstraints.js.map +1 -0
- package/Product/Constraints/MaxArtworkSizeConstraints.d.ts +13 -0
- package/Product/Constraints/MaxArtworkSizeConstraints.js +25 -0
- package/Product/Constraints/MaxArtworkSizeConstraints.js.map +1 -0
- package/Product/Constraints/PrintingTechniqueConstraints.js +10 -13
- package/Product/Constraints/PrintingTechniqueConstraints.js.map +1 -1
- package/Product/Container.d.ts +48 -10
- package/Product/Container.js +257 -373
- package/Product/Container.js.map +1 -1
- package/Product/ContainerVisualization.js +31 -56
- package/Product/ContainerVisualization.js.map +1 -1
- package/Product/Convert/CornerRadiusConverter.js +32 -34
- package/Product/Convert/CornerRadiusConverter.js.map +1 -1
- package/Product/CropMark.js +28 -40
- package/Product/CropMark.js.map +1 -1
- package/Product/Decorators/Factory/AbstractFactory.js +13 -23
- package/Product/Decorators/Factory/AbstractFactory.js.map +1 -1
- package/Product/Decorators/Factory/CollectionFactory.js +10 -45
- package/Product/Decorators/Factory/CollectionFactory.js.map +1 -1
- package/Product/Decorators/Factory/ColorFactory.js +13 -35
- package/Product/Decorators/Factory/ColorFactory.js.map +1 -1
- package/Product/Decorators/Factory/ObjectFactory.js +10 -45
- package/Product/Decorators/Factory/ObjectFactory.js.map +1 -1
- package/Product/Decorators/Factory/SimpleFactory.js +11 -21
- package/Product/Decorators/Factory/SimpleFactory.js.map +1 -1
- package/Product/Decorators/Interfaces/IInputPropertyMetadata.d.ts +1 -1
- package/Product/Decorators/Interfaces/IInputPropertyMetadata.js +1 -0
- package/Product/Decorators/Interfaces/IObjectMetadata.js +1 -0
- package/Product/Decorators/Interfaces/IPropertyMetadata.js +1 -0
- package/Product/Decorators/ItemsMetadata.js +11 -13
- package/Product/Decorators/ItemsMetadata.js.map +1 -1
- package/Product/Decorators/Property.js +4 -4
- package/Product/Decorators/Property.js.map +1 -1
- package/Product/Decorators/PropertyChanged.js +1 -1
- package/Product/Decorators/PropertyChanged.js.map +1 -1
- package/Product/Decorators/index.js +1 -0
- package/Product/Decorators/index.js.map +1 -1
- package/Product/Effects/ColorDictionaryEntry.js +3 -5
- package/Product/Effects/ColorDictionaryEntry.js.map +1 -1
- package/Product/Effects/NDEffectParameters.js +2 -6
- package/Product/Effects/NDEffectParameters.js.map +1 -1
- package/Product/Effects/NDEffects.js +20 -27
- package/Product/Effects/NDEffects.js.map +1 -1
- package/Product/Effects/RecolorEffectParameters.js +44 -89
- package/Product/Effects/RecolorEffectParameters.js.map +1 -1
- package/Product/IGetAllItemsOptions.js +1 -0
- package/Product/InteractiveZone.js +34 -66
- package/Product/InteractiveZone.js.map +1 -1
- package/Product/Interfaces/IColorWithTitle.js +1 -0
- package/Product/Interfaces/IDataSet.js +1 -0
- package/Product/Interfaces/IFontSettings.js +1 -0
- package/Product/Interfaces/IItemData.js +1 -0
- package/Product/Interfaces/IPdfMetadata.js +1 -0
- package/Product/Interfaces/IProductThemeConfig.js +1 -0
- package/Product/Interfaces/IShadowSettings.js +1 -0
- package/Product/Interfaces/IStrokeSettings.js +1 -0
- package/Product/Interfaces/index.js +3 -0
- package/Product/Interfaces/index.js.map +1 -1
- package/Product/ItemMask.js +20 -26
- package/Product/ItemMask.js.map +1 -1
- package/Product/Items/ArchedTextItem.js +65 -100
- package/Product/Items/ArchedTextItem.js.map +1 -1
- package/Product/Items/AutoScaledTextItem.js +35 -62
- package/Product/Items/AutoScaledTextItem.js.map +1 -1
- package/Product/Items/BarcodeData.d.ts +2 -1
- package/Product/Items/BarcodeData.js +77 -90
- package/Product/Items/BarcodeData.js.map +1 -1
- package/Product/Items/BarcodeItem.js +249 -298
- package/Product/Items/BarcodeItem.js.map +1 -1
- package/Product/Items/BarcodePermissions.js +38 -52
- package/Product/Items/BarcodePermissions.js.map +1 -1
- package/Product/Items/BaseItem.js +30 -53
- package/Product/Items/BaseItem.js.map +1 -1
- package/Product/Items/BaseTextItem.d.ts +2 -2
- package/Product/Items/BaseTextItem.js +447 -621
- package/Product/Items/BaseTextItem.js.map +1 -1
- package/Product/Items/BoundedTextItem.js +184 -255
- package/Product/Items/BoundedTextItem.js.map +1 -1
- package/Product/Items/ClipartItem.js +82 -175
- package/Product/Items/ClipartItem.js.map +1 -1
- package/Product/Items/ContentItem.js +52 -80
- package/Product/Items/ContentItem.js.map +1 -1
- package/Product/Items/ContentPermissions.js +36 -47
- package/Product/Items/ContentPermissions.js.map +1 -1
- package/Product/Items/CurvedTextItem.js +106 -158
- package/Product/Items/CurvedTextItem.js.map +1 -1
- package/Product/Items/DashedLineItem.js +45 -76
- package/Product/Items/DashedLineItem.js.map +1 -1
- package/Product/Items/EllipseItem.js +11 -31
- package/Product/Items/EllipseItem.js.map +1 -1
- package/Product/Items/FrontEndPermissions.js +20 -26
- package/Product/Items/FrontEndPermissions.js.map +1 -1
- package/Product/Items/GridItem.js +107 -162
- package/Product/Items/GridItem.js.map +1 -1
- package/Product/Items/GroupItem.js +93 -171
- package/Product/Items/GroupItem.js.map +1 -1
- package/Product/Items/GroupItemPermissions.js +42 -56
- package/Product/Items/GroupItemPermissions.js.map +1 -1
- package/Product/Items/ImageItem.js +304 -428
- package/Product/Items/ImageItem.js.map +1 -1
- package/Product/Items/ImageMetaData.js +14 -15
- package/Product/Items/ImageMetaData.js.map +1 -1
- package/Product/Items/ImagePermissions.js +42 -56
- package/Product/Items/ImagePermissions.js.map +1 -1
- package/Product/Items/ImageViolationSettings.js +18 -35
- package/Product/Items/ImageViolationSettings.js.map +1 -1
- package/Product/Items/InStringPlaceholder.js +50 -100
- package/Product/Items/InStringPlaceholder.js.map +1 -1
- package/Product/Items/Item.d.ts +1 -1
- package/Product/Items/Item.js +278 -370
- package/Product/Items/Item.js.map +1 -1
- package/Product/Items/ItemPermissions.js +54 -73
- package/Product/Items/ItemPermissions.js.map +1 -1
- package/Product/Items/ItemToolbarPermissions.js +61 -80
- package/Product/Items/ItemToolbarPermissions.js.map +1 -1
- package/Product/Items/LayoutItem.js +241 -326
- package/Product/Items/LayoutItem.js.map +1 -1
- package/Product/Items/LineItem.js +109 -156
- package/Product/Items/LineItem.js.map +1 -1
- package/Product/Items/LinePermissions.js +29 -39
- package/Product/Items/LinePermissions.js.map +1 -1
- package/Product/Items/ManipulationPermissions.d.ts +1 -1
- package/Product/Items/ManipulationPermissions.js +94 -135
- package/Product/Items/ManipulationPermissions.js.map +1 -1
- package/Product/Items/OpenTypeFeature.d.ts +1 -1
- package/Product/Items/OpenTypeFeature.js +3 -5
- package/Product/Items/OpenTypeFeature.js.map +1 -1
- package/Product/Items/OverlayEffect.js +56 -70
- package/Product/Items/OverlayEffect.js.map +1 -1
- package/Product/Items/ParagraphSettings.js +9 -11
- package/Product/Items/ParagraphSettings.js.map +1 -1
- package/Product/Items/PathBoundedTextItem.js +113 -164
- package/Product/Items/PathBoundedTextItem.js.map +1 -1
- package/Product/Items/PathBoundedTextPermissions.js +20 -26
- package/Product/Items/PathBoundedTextPermissions.js.map +1 -1
- package/Product/Items/PlaceholderItem.d.ts +1 -1
- package/Product/Items/PlaceholderItem.js +307 -417
- package/Product/Items/PlaceholderItem.js.map +1 -1
- package/Product/Items/PlaceholderPermissions.js +38 -47
- package/Product/Items/PlaceholderPermissions.js.map +1 -1
- package/Product/Items/PlainTextItem.js +45 -74
- package/Product/Items/PlainTextItem.js.map +1 -1
- package/Product/Items/PolylineItem.js +47 -78
- package/Product/Items/PolylineItem.js.map +1 -1
- package/Product/Items/RectangleItem.js +10 -30
- package/Product/Items/RectangleItem.js.map +1 -1
- package/Product/Items/ResizeGripsPermissions.d.ts +3 -3
- package/Product/Items/ResizeGripsPermissions.js +74 -94
- package/Product/Items/ResizeGripsPermissions.js.map +1 -1
- package/Product/Items/ShadowSettings.js +51 -69
- package/Product/Items/ShadowSettings.js.map +1 -1
- package/Product/Items/ShapeItem.js +182 -251
- package/Product/Items/ShapeItem.js.map +1 -1
- package/Product/Items/ShapePermissions.js +38 -52
- package/Product/Items/ShapePermissions.js.map +1 -1
- package/Product/Items/ShapeViolationSettings.js +18 -36
- package/Product/Items/ShapeViolationSettings.js.map +1 -1
- package/Product/Items/Size.js +7 -11
- package/Product/Items/Size.js.map +1 -1
- package/Product/Items/SmartItem.js +21 -41
- package/Product/Items/SmartItem.js.map +1 -1
- package/Product/Items/StrokeSettings.js +48 -62
- package/Product/Items/StrokeSettings.js.map +1 -1
- package/Product/Items/TextEnums.d.ts +2 -1
- package/Product/Items/TextEnums.js +1 -0
- package/Product/Items/TextEnums.js.map +1 -1
- package/Product/Items/TextPermissions.js +56 -58
- package/Product/Items/TextPermissions.js.map +1 -1
- package/Product/Items/TextViolationSettings.js +23 -40
- package/Product/Items/TextViolationSettings.js.map +1 -1
- package/Product/Items/ThemeBinding.js +10 -12
- package/Product/Items/ThemeBinding.js.map +1 -1
- package/Product/Items/ViolationSettings.js +26 -44
- package/Product/Items/ViolationSettings.js.map +1 -1
- package/Product/Items/VisualizationPermissions.js +29 -39
- package/Product/Items/VisualizationPermissions.js.map +1 -1
- package/Product/ItemsData/ItemData.js +8 -24
- package/Product/ItemsData/ItemData.js.map +1 -1
- package/Product/ModelComponent.js +41 -63
- package/Product/ModelComponent.js.map +1 -1
- package/Product/PrintArea.d.ts +11 -5
- package/Product/PrintArea.js +164 -155
- package/Product/PrintArea.js.map +1 -1
- package/Product/Product.js +67 -105
- package/Product/Product.js.map +1 -1
- package/Product/SafetyLine.d.ts +1 -1
- package/Product/SafetyLine.js +90 -124
- package/Product/SafetyLine.js.map +1 -1
- package/Product/Surface.d.ts +2 -1
- package/Product/Surface.js +193 -287
- package/Product/Surface.js.map +1 -1
- package/Product/SurfaceMockup.js +40 -73
- package/Product/SurfaceMockup.js.map +1 -1
- package/Product/Uuid.js +19 -25
- package/Product/Uuid.js.map +1 -1
- package/Product/Watermark.js +5 -9
- package/Product/Watermark.js.map +1 -1
- package/Product/index.d.ts +2 -0
- package/Product/index.js +3 -0
- package/Product/index.js.map +1 -1
- package/Serialization/IProductSerializer.js +1 -0
- package/Utils/Environment.d.ts +1 -1
- package/Utils/Environment.js +2 -2
- package/Utils/Environment.js.map +1 -1
- package/Utils/Exceptions.js +5 -5
- package/Utils/Exceptions.js.map +1 -1
- package/Utils/Items.js +19 -19
- package/Utils/Items.js.map +1 -1
- package/Utils/Types/Action.d.ts +5 -1
- package/Utils/Types/Action.js +1 -0
- package/Utils/Types/AnyFunction.d.ts +1 -1
- package/Utils/Types/AnyFunction.js +1 -0
- package/Utils/Types/Func.d.ts +1 -1
- package/Utils/Types/Func.js +1 -0
- package/Utils/Types/index.js +3 -0
- package/Utils/Types/index.js.map +1 -1
- package/Utils/Utils.d.ts +9 -4
- package/Utils/Utils.js +179 -296
- package/Utils/Utils.js.map +1 -1
- package/Utils/debounce.d.ts +29 -0
- package/Utils/debounce.js +106 -0
- package/Utils/debounce.js.map +1 -0
- package/Utils/index.d.ts +2 -0
- package/Utils/index.js +3 -0
- package/Utils/index.js.map +1 -1
- package/Utils/throttle.d.ts +16 -0
- package/Utils/throttle.js +25 -0
- package/Utils/throttle.js.map +1 -0
- package/Validators/CmykComponentValidator.js +13 -15
- package/Validators/CmykComponentValidator.js.map +1 -1
- package/Version.d.ts +1 -1
- package/Version.js +1 -1
- package/Version.js.map +1 -1
- package/package.json +3 -8
- package/typings/structured-clone.d.ts +5 -0
package/Collection.js
CHANGED
|
@@ -1,50 +1,15 @@
|
|
|
1
|
-
var __values = (this && this.__values) || function(o) {
|
|
2
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
3
|
-
if (m) return m.call(o);
|
|
4
|
-
if (o && typeof o.length === "number") return {
|
|
5
|
-
next: function () {
|
|
6
|
-
if (o && i >= o.length) o = void 0;
|
|
7
|
-
return { value: o && o[i++], done: !o };
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
11
|
-
};
|
|
12
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
-
if (!m) return o;
|
|
15
|
-
var i = m.call(o), r, ar = [], e;
|
|
16
|
-
try {
|
|
17
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
-
}
|
|
19
|
-
catch (error) { e = { error: error }; }
|
|
20
|
-
finally {
|
|
21
|
-
try {
|
|
22
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
-
}
|
|
24
|
-
finally { if (e) throw e.error; }
|
|
25
|
-
}
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
var __spread = (this && this.__spread) || function () {
|
|
29
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
30
|
-
return ar;
|
|
31
|
-
};
|
|
32
1
|
import { EventObject } from "./EventObject";
|
|
33
2
|
import { itemNotFoundInCollection, itemBelongsCollection } from "./Utils/Exceptions";
|
|
34
3
|
import Enumerable from "linq";
|
|
35
4
|
import "linq-iterator";
|
|
36
5
|
import { NotImplementedException, OutOfRangeException, ArgumentException } from "./Exception";
|
|
37
6
|
import { CollectionChangeType } from "./ICollectionChangeEventArgs";
|
|
38
|
-
|
|
7
|
+
let origEnumerableFrom = null;
|
|
39
8
|
patch(Enumerable);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
var args = [];
|
|
43
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
44
|
-
args[_i] = arguments[_i];
|
|
45
|
-
}
|
|
9
|
+
export class Collection {
|
|
10
|
+
constructor(...args) {
|
|
46
11
|
this._collection = [];
|
|
47
|
-
this["constructor"] =
|
|
12
|
+
this["constructor"] = (getEnumerator) => {
|
|
48
13
|
throw new NotImplementedException();
|
|
49
14
|
};
|
|
50
15
|
this._itemAddedEvent = new EventObject();
|
|
@@ -55,12 +20,12 @@ var Collection = /** @class */ (function () {
|
|
|
55
20
|
return;
|
|
56
21
|
this.setRange(args);
|
|
57
22
|
}
|
|
58
|
-
|
|
23
|
+
setRange(items) {
|
|
59
24
|
this.clear();
|
|
60
25
|
this.addRange(items);
|
|
61
|
-
}
|
|
26
|
+
}
|
|
62
27
|
/** Adds the specified items to the end of the collection.*/
|
|
63
|
-
|
|
28
|
+
addRange(items) {
|
|
64
29
|
if (items instanceof Collection)
|
|
65
30
|
items = items._collection;
|
|
66
31
|
if (isIEnumerable(items))
|
|
@@ -70,80 +35,52 @@ var Collection = /** @class */ (function () {
|
|
|
70
35
|
function isIEnumerable(obj) {
|
|
71
36
|
return "getEnumerator" in obj && "toArray" in obj;
|
|
72
37
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
try {
|
|
81
|
-
for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
|
|
82
|
-
var item = items_1_1.value;
|
|
83
|
-
this.insertAt(this._collection.length, item);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
87
|
-
finally {
|
|
88
|
-
try {
|
|
89
|
-
if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
|
|
90
|
-
}
|
|
91
|
-
finally { if (e_1) throw e_1.error; }
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
Collection.prototype.push = function (item) {
|
|
38
|
+
}
|
|
39
|
+
add(...items) {
|
|
40
|
+
for (let item of items)
|
|
41
|
+
this.insertAt(this._collection.length, item);
|
|
42
|
+
}
|
|
43
|
+
push(item) {
|
|
95
44
|
/// <summary>Pushes the specified item to the collection.</summary>
|
|
96
45
|
/// <param name="item" type="Type">The item to push.</param>
|
|
97
46
|
this.add(item);
|
|
98
47
|
return this.length;
|
|
99
|
-
}
|
|
48
|
+
}
|
|
100
49
|
/**
|
|
101
50
|
* Inserts the specified item into the collection at the specified index.
|
|
102
51
|
*/
|
|
103
|
-
|
|
104
|
-
var e_2, _a, _b;
|
|
52
|
+
insertAt(index, items) {
|
|
105
53
|
if (!Array.isArray(items))
|
|
106
54
|
items = [items];
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var item = items_2_1.value;
|
|
110
|
-
this._checkIfItemExists(item);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
114
|
-
finally {
|
|
115
|
-
try {
|
|
116
|
-
if (items_2_1 && !items_2_1.done && (_a = items_2.return)) _a.call(items_2);
|
|
117
|
-
}
|
|
118
|
-
finally { if (e_2) throw e_2.error; }
|
|
119
|
-
}
|
|
55
|
+
for (let item of items)
|
|
56
|
+
this._checkIfItemExists(item);
|
|
120
57
|
if (index < 0 || index > this._collection.length)
|
|
121
58
|
throw new OutOfRangeException();
|
|
122
|
-
|
|
123
|
-
for (
|
|
124
|
-
|
|
59
|
+
this._collection.splice(index, 0, ...items);
|
|
60
|
+
for (let i = 0; i < items.length; i++) {
|
|
61
|
+
const item = items[i];
|
|
125
62
|
this._onItemAdded(this._collection.indexOf(item), item);
|
|
126
63
|
}
|
|
127
|
-
}
|
|
128
|
-
|
|
64
|
+
}
|
|
65
|
+
remove(item) {
|
|
129
66
|
if (!this.contains(item))
|
|
130
67
|
throw new ArgumentException(itemNotFoundInCollection);
|
|
131
68
|
return this.removeAt(this.indexOf(item));
|
|
132
|
-
}
|
|
69
|
+
}
|
|
133
70
|
/**
|
|
134
71
|
* Removes the item at the specified index of the collection.
|
|
135
72
|
*/
|
|
136
|
-
|
|
73
|
+
removeAt(index) {
|
|
137
74
|
/// <summary>Removes the item at the specified index of the collection.</summary>
|
|
138
75
|
/// <param name="index" type="Number">The zero-based index of the item to remove.</param>
|
|
139
76
|
if (index < 0 || index > this._collection.length - 1)
|
|
140
77
|
throw new OutOfRangeException();
|
|
141
|
-
|
|
78
|
+
const item = this._collection[index];
|
|
142
79
|
this._collection.splice(index, 1);
|
|
143
80
|
this._onItemRemoved(index, item);
|
|
144
81
|
return item;
|
|
145
|
-
}
|
|
146
|
-
|
|
82
|
+
}
|
|
83
|
+
removeRange(from, to) {
|
|
147
84
|
var prevCollection = this._collection.slice();
|
|
148
85
|
var deletedItems = this._collection.splice(from, to - from + 1);
|
|
149
86
|
for (var i = 0; i < deletedItems.length; i++) {
|
|
@@ -151,8 +88,8 @@ var Collection = /** @class */ (function () {
|
|
|
151
88
|
this._onItemRemoved(prevCollection.indexOf(item), item);
|
|
152
89
|
}
|
|
153
90
|
return deletedItems;
|
|
154
|
-
}
|
|
155
|
-
|
|
91
|
+
}
|
|
92
|
+
move(oldIndex, newIndex, supressEvent) {
|
|
156
93
|
if (!(typeof supressEvent == "boolean"))
|
|
157
94
|
supressEvent = false;
|
|
158
95
|
var item = this._collection[oldIndex];
|
|
@@ -163,526 +100,346 @@ var Collection = /** @class */ (function () {
|
|
|
163
100
|
this._onItemMoved(oldIndex, newIndex);
|
|
164
101
|
}
|
|
165
102
|
return item;
|
|
166
|
-
}
|
|
103
|
+
}
|
|
167
104
|
/** Removes all items from the collection */
|
|
168
|
-
|
|
105
|
+
clear() {
|
|
169
106
|
while (this.length > 0) {
|
|
170
107
|
this.removeAt(this.length - 1);
|
|
171
108
|
}
|
|
172
|
-
}
|
|
173
|
-
|
|
109
|
+
}
|
|
110
|
+
replaceAt(item, index) {
|
|
174
111
|
if (index < 0 || index > this._collection.length - 1)
|
|
175
112
|
throw new OutOfRangeException();
|
|
176
113
|
this._onItemRemoved(index, this._collection[index]);
|
|
177
114
|
this._collection[index] = item;
|
|
178
115
|
this._onItemAdded(index, this._collection[index]);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
});
|
|
187
|
-
Object.defineProperty(Collection.prototype, "empty", {
|
|
188
|
-
get: function () {
|
|
189
|
-
return this.length === 0;
|
|
190
|
-
},
|
|
191
|
-
enumerable: true,
|
|
192
|
-
configurable: true
|
|
193
|
-
});
|
|
116
|
+
}
|
|
117
|
+
get length() {
|
|
118
|
+
return this._collection.length;
|
|
119
|
+
}
|
|
120
|
+
get empty() {
|
|
121
|
+
return this.length === 0;
|
|
122
|
+
}
|
|
194
123
|
//[index: number]: T;
|
|
195
|
-
|
|
124
|
+
get(index) {
|
|
196
125
|
return this.getItem(index);
|
|
197
|
-
}
|
|
198
|
-
|
|
126
|
+
}
|
|
127
|
+
set(index, value) {
|
|
199
128
|
throw new NotImplementedException();
|
|
200
|
-
}
|
|
201
|
-
|
|
129
|
+
}
|
|
130
|
+
getItem(index) {
|
|
202
131
|
/// <summary>Gets the item at the specified index.</summary>
|
|
203
132
|
/// <param name="index" type="Number">The zero-based index of the item to get.</param>
|
|
204
133
|
/// <value type="Type">The item at the specified index.</value>
|
|
205
134
|
/// <remarks><para>This property corresponds to <see cref="P:Aurigma.GraphicsMill.AjaxControls.VectorObjects.Collection`1.Item(System.Int32)">Item(Int32)</see> server-side member.</para></remarks>
|
|
206
135
|
return this._collection[index];
|
|
207
|
-
}
|
|
208
|
-
|
|
136
|
+
}
|
|
137
|
+
_checkIfItemExists(item) {
|
|
209
138
|
if (this.contains(item))
|
|
210
139
|
throw new ArgumentException(itemBelongsCollection);
|
|
211
|
-
}
|
|
212
|
-
|
|
140
|
+
}
|
|
141
|
+
_onItemAdded(index, item) {
|
|
213
142
|
this._itemAddedEvent.notify({ item: item, index: index, type: CollectionChangeType.Add });
|
|
214
|
-
}
|
|
215
|
-
|
|
143
|
+
}
|
|
144
|
+
add_itemAdded(h) {
|
|
216
145
|
this._itemAddedEvent.add(h);
|
|
217
|
-
}
|
|
218
|
-
|
|
146
|
+
}
|
|
147
|
+
remove_itemAdded(h) {
|
|
219
148
|
this._itemAddedEvent.remove(h);
|
|
220
|
-
}
|
|
221
|
-
|
|
149
|
+
}
|
|
150
|
+
_onItemRemoved(index, item) {
|
|
222
151
|
this._itemRemovedEvent.notify({ item: item, index: index, type: CollectionChangeType.Remove });
|
|
223
|
-
}
|
|
224
|
-
|
|
152
|
+
}
|
|
153
|
+
add_itemRemoved(h) {
|
|
225
154
|
this._itemRemovedEvent.add(h);
|
|
226
|
-
}
|
|
227
|
-
|
|
155
|
+
}
|
|
156
|
+
remove_itemRemoved(h) {
|
|
228
157
|
this._itemRemovedEvent.remove(h);
|
|
229
|
-
}
|
|
230
|
-
|
|
158
|
+
}
|
|
159
|
+
_onItemMoved(oldIndex, newIndex) {
|
|
231
160
|
this._itemMovedEvent.notify({ oldIndex: oldIndex, newIndex: newIndex, type: CollectionChangeType.Move });
|
|
232
|
-
}
|
|
233
|
-
|
|
161
|
+
}
|
|
162
|
+
add_itemMoved(h) {
|
|
234
163
|
this._itemMovedEvent.add(h);
|
|
235
|
-
}
|
|
236
|
-
|
|
164
|
+
}
|
|
165
|
+
remove_itemMoved(h) {
|
|
237
166
|
this._itemMovedEvent.remove(h);
|
|
238
|
-
}
|
|
239
|
-
|
|
167
|
+
}
|
|
168
|
+
add_collectionChanged(h) {
|
|
240
169
|
this.add_itemMoved(h);
|
|
241
170
|
this.add_itemRemoved(h);
|
|
242
171
|
this.add_itemAdded(h);
|
|
243
|
-
}
|
|
244
|
-
|
|
172
|
+
}
|
|
173
|
+
remove_collectionChanged(h) {
|
|
245
174
|
this.remove_itemMoved(h);
|
|
246
175
|
this.remove_itemRemoved(h);
|
|
247
176
|
this.remove_itemAdded(h);
|
|
248
|
-
}
|
|
177
|
+
}
|
|
249
178
|
//#region Iterable implementation
|
|
250
|
-
|
|
179
|
+
[Symbol.iterator]() {
|
|
251
180
|
return this._collection.values();
|
|
252
|
-
}
|
|
181
|
+
}
|
|
253
182
|
//#endregion
|
|
254
|
-
|
|
183
|
+
toArray() {
|
|
255
184
|
return this._collection.slice();
|
|
256
|
-
}
|
|
185
|
+
}
|
|
257
186
|
//#region IEnumerable implementation
|
|
258
|
-
|
|
187
|
+
getEnumerator() {
|
|
259
188
|
return this._enumerable.getEnumerator();
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
};
|
|
269
|
-
Collection.prototype.traverseDepthFirst = function () {
|
|
270
|
-
var _a;
|
|
271
|
-
var args = [];
|
|
272
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
273
|
-
args[_i] = arguments[_i];
|
|
274
|
-
}
|
|
275
|
-
return (_a = this._enumerable).traverseDepthFirst.apply(_a, __spread(args));
|
|
276
|
-
};
|
|
277
|
-
Collection.prototype.flatten = function () {
|
|
189
|
+
}
|
|
190
|
+
traverseBreadthFirst(...args) {
|
|
191
|
+
return this._enumerable.traverseBreadthFirst(...args);
|
|
192
|
+
}
|
|
193
|
+
traverseDepthFirst(...args) {
|
|
194
|
+
return this._enumerable.traverseDepthFirst(...args);
|
|
195
|
+
}
|
|
196
|
+
flatten() {
|
|
278
197
|
return this._enumerable.flatten();
|
|
279
|
-
}
|
|
280
|
-
|
|
198
|
+
}
|
|
199
|
+
pairwise(selector) {
|
|
281
200
|
return this._enumerable.pairwise(selector);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
args[_i] = arguments[_i];
|
|
288
|
-
}
|
|
289
|
-
return (_a = this._enumerable).scan.apply(_a, __spread(args));
|
|
290
|
-
};
|
|
291
|
-
Collection.prototype.select = function (selector) {
|
|
201
|
+
}
|
|
202
|
+
scan(...args) {
|
|
203
|
+
return this._enumerable.scan(...args);
|
|
204
|
+
}
|
|
205
|
+
select(selector) {
|
|
292
206
|
return this._enumerable.select(selector);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
args[_i] = arguments[_i];
|
|
299
|
-
}
|
|
300
|
-
return (_a = this._enumerable).selectMany.apply(_a, __spread(args));
|
|
301
|
-
};
|
|
302
|
-
Collection.prototype.where = function (predicate) {
|
|
207
|
+
}
|
|
208
|
+
selectMany(...args) {
|
|
209
|
+
return this._enumerable.selectMany(...args);
|
|
210
|
+
}
|
|
211
|
+
where(predicate) {
|
|
303
212
|
return this._enumerable.where(predicate);
|
|
304
|
-
}
|
|
305
|
-
|
|
213
|
+
}
|
|
214
|
+
choose(selector) {
|
|
306
215
|
return this._enumerable.choose(selector);
|
|
307
|
-
}
|
|
308
|
-
|
|
216
|
+
}
|
|
217
|
+
ofType(type) {
|
|
309
218
|
return this._enumerable.ofType(type);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
return (_a = this._enumerable).merge.apply(_a, __spread(args));
|
|
326
|
-
};
|
|
327
|
-
Collection.prototype.join = function () {
|
|
328
|
-
var _a;
|
|
329
|
-
var args = [];
|
|
330
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
331
|
-
args[_i] = arguments[_i];
|
|
332
|
-
}
|
|
333
|
-
return (_a = this._enumerable).join.apply(_a, __spread(args));
|
|
334
|
-
};
|
|
335
|
-
Collection.prototype.groupJoin = function () {
|
|
336
|
-
var _a;
|
|
337
|
-
var args = [];
|
|
338
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
339
|
-
args[_i] = arguments[_i];
|
|
340
|
-
}
|
|
341
|
-
return (_a = this._enumerable).groupJoin.apply(_a, __spread(args));
|
|
342
|
-
};
|
|
343
|
-
Collection.prototype.all = function (predicate) {
|
|
219
|
+
}
|
|
220
|
+
zip(...args) {
|
|
221
|
+
return this._enumerable.zip(...args);
|
|
222
|
+
}
|
|
223
|
+
merge(...args) {
|
|
224
|
+
return this._enumerable.merge(...args);
|
|
225
|
+
}
|
|
226
|
+
join(...args) {
|
|
227
|
+
return this._enumerable.join(...args);
|
|
228
|
+
}
|
|
229
|
+
groupJoin(...args) {
|
|
230
|
+
return this._enumerable.groupJoin(...args);
|
|
231
|
+
}
|
|
232
|
+
all(predicate) {
|
|
344
233
|
return this._enumerable.all(predicate);
|
|
345
|
-
}
|
|
346
|
-
|
|
234
|
+
}
|
|
235
|
+
any(predicate) {
|
|
347
236
|
return this._enumerable.any(predicate);
|
|
348
|
-
}
|
|
349
|
-
|
|
237
|
+
}
|
|
238
|
+
isEmpty() {
|
|
350
239
|
return this._enumerable.isEmpty();
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
};
|
|
360
|
-
Collection.prototype.alternate = function () {
|
|
361
|
-
var _a;
|
|
362
|
-
var args = [];
|
|
363
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
364
|
-
args[_i] = arguments[_i];
|
|
365
|
-
}
|
|
366
|
-
return (_a = this._enumerable).alternate.apply(_a, __spread(args));
|
|
367
|
-
};
|
|
368
|
-
Collection.prototype.defaultIfEmpty = function (defaultValue) {
|
|
240
|
+
}
|
|
241
|
+
concat(...args) {
|
|
242
|
+
return this._enumerable.concat(...args);
|
|
243
|
+
}
|
|
244
|
+
alternate(...args) {
|
|
245
|
+
return this._enumerable.alternate(...args);
|
|
246
|
+
}
|
|
247
|
+
defaultIfEmpty(defaultValue) {
|
|
369
248
|
return this._enumerable.defaultIfEmpty(defaultValue);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
391
|
-
args[_i] = arguments[_i];
|
|
392
|
-
}
|
|
393
|
-
return (_a = this._enumerable).except.apply(_a, __spread(args));
|
|
394
|
-
};
|
|
395
|
-
Collection.prototype.intersect = function () {
|
|
396
|
-
var _a;
|
|
397
|
-
var args = [];
|
|
398
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
399
|
-
args[_i] = arguments[_i];
|
|
400
|
-
}
|
|
401
|
-
return (_a = this._enumerable).intersect.apply(_a, __spread(args));
|
|
402
|
-
};
|
|
403
|
-
Collection.prototype.union = function () {
|
|
404
|
-
var _a;
|
|
405
|
-
var args = [];
|
|
406
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
407
|
-
args[_i] = arguments[_i];
|
|
408
|
-
}
|
|
409
|
-
return (_a = this._enumerable).union.apply(_a, __spread(args));
|
|
410
|
-
};
|
|
411
|
-
Collection.prototype.sequenceEqual = function () {
|
|
412
|
-
var _a;
|
|
413
|
-
var args = [];
|
|
414
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
415
|
-
args[_i] = arguments[_i];
|
|
416
|
-
}
|
|
417
|
-
return (_a = this._enumerable).sequenceEqual.apply(_a, __spread(args));
|
|
418
|
-
};
|
|
419
|
-
Collection.prototype.orderBy = function (keySelector) {
|
|
249
|
+
}
|
|
250
|
+
distinct(...args) {
|
|
251
|
+
return this._enumerable.distinct(...args);
|
|
252
|
+
}
|
|
253
|
+
distinctUntilChanged(...args) {
|
|
254
|
+
return this._enumerable.distinctUntilChanged(...args);
|
|
255
|
+
}
|
|
256
|
+
except(...args) {
|
|
257
|
+
return this._enumerable.except(...args);
|
|
258
|
+
}
|
|
259
|
+
intersect(...args) {
|
|
260
|
+
return this._enumerable.intersect(...args);
|
|
261
|
+
}
|
|
262
|
+
union(...args) {
|
|
263
|
+
return this._enumerable.union(...args);
|
|
264
|
+
}
|
|
265
|
+
sequenceEqual(...args) {
|
|
266
|
+
return this._enumerable.sequenceEqual(...args);
|
|
267
|
+
}
|
|
268
|
+
orderBy(keySelector) {
|
|
420
269
|
return this._enumerable.orderBy(keySelector);
|
|
421
|
-
}
|
|
422
|
-
|
|
270
|
+
}
|
|
271
|
+
orderByDescending(keySelector) {
|
|
423
272
|
return this._enumerable.orderByDescending(keySelector);
|
|
424
|
-
}
|
|
425
|
-
|
|
273
|
+
}
|
|
274
|
+
reverse() {
|
|
426
275
|
return this._enumerable.reverse();
|
|
427
|
-
}
|
|
428
|
-
|
|
276
|
+
}
|
|
277
|
+
shuffle() {
|
|
429
278
|
return this._enumerable.shuffle();
|
|
430
|
-
}
|
|
431
|
-
|
|
279
|
+
}
|
|
280
|
+
weightedSample(weightSelector) {
|
|
432
281
|
return this._enumerable.weightedSample(weightSelector);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
};
|
|
442
|
-
Collection.prototype.partitionBy = function () {
|
|
443
|
-
var _a;
|
|
444
|
-
var args = [];
|
|
445
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
446
|
-
args[_i] = arguments[_i];
|
|
447
|
-
}
|
|
448
|
-
return (_a = this._enumerable).partitionBy.apply(_a, __spread(args));
|
|
449
|
-
};
|
|
450
|
-
Collection.prototype.buffer = function (count) {
|
|
282
|
+
}
|
|
283
|
+
groupBy(...args) {
|
|
284
|
+
return this._enumerable.groupBy(...args);
|
|
285
|
+
}
|
|
286
|
+
partitionBy(...args) {
|
|
287
|
+
return this._enumerable.partitionBy(...args);
|
|
288
|
+
}
|
|
289
|
+
buffer(count) {
|
|
451
290
|
return this._enumerable.buffer(count);
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
args[_i] = arguments[_i];
|
|
458
|
-
}
|
|
459
|
-
return (_a = this._enumerable).aggregate.apply(_a, __spread(args));
|
|
460
|
-
};
|
|
461
|
-
Collection.prototype.average = function (selector) {
|
|
291
|
+
}
|
|
292
|
+
aggregate(...args) {
|
|
293
|
+
return this._enumerable.aggregate(...args);
|
|
294
|
+
}
|
|
295
|
+
average(selector) {
|
|
462
296
|
return this._enumerable.average(selector);
|
|
463
|
-
}
|
|
464
|
-
|
|
297
|
+
}
|
|
298
|
+
count(predicate) {
|
|
465
299
|
return this._enumerable.count(predicate);
|
|
466
|
-
}
|
|
467
|
-
|
|
300
|
+
}
|
|
301
|
+
max(selector) {
|
|
468
302
|
return this._enumerable.max(selector);
|
|
469
|
-
}
|
|
470
|
-
|
|
303
|
+
}
|
|
304
|
+
min(selector) {
|
|
471
305
|
return this._enumerable.min(selector);
|
|
472
|
-
}
|
|
473
|
-
|
|
306
|
+
}
|
|
307
|
+
maxBy(keySelector) {
|
|
474
308
|
return this._enumerable.maxBy(keySelector);
|
|
475
|
-
}
|
|
476
|
-
|
|
309
|
+
}
|
|
310
|
+
minBy(keySelector) {
|
|
477
311
|
return this._enumerable.minBy(keySelector);
|
|
478
|
-
}
|
|
479
|
-
|
|
312
|
+
}
|
|
313
|
+
sum(selector) {
|
|
480
314
|
return this._enumerable.sum(selector);
|
|
481
|
-
}
|
|
482
|
-
|
|
315
|
+
}
|
|
316
|
+
elementAt(index) {
|
|
483
317
|
return this._enumerable.elementAt(index);
|
|
484
|
-
}
|
|
485
|
-
|
|
318
|
+
}
|
|
319
|
+
elementAtOrDefault(index, defaultValue) {
|
|
486
320
|
return this._enumerable.elementAtOrDefault(index, defaultValue);
|
|
487
|
-
}
|
|
488
|
-
|
|
321
|
+
}
|
|
322
|
+
first(predicate) {
|
|
489
323
|
return this._enumerable.first(predicate);
|
|
490
|
-
}
|
|
491
|
-
|
|
324
|
+
}
|
|
325
|
+
firstOrDefault(predicate, defaultValue) {
|
|
492
326
|
if (typeof predicate === "function")
|
|
493
327
|
return this._enumerable.firstOrDefault(predicate, defaultValue);
|
|
494
328
|
return this._enumerable.firstOrDefault(defaultValue);
|
|
495
|
-
}
|
|
496
|
-
|
|
329
|
+
}
|
|
330
|
+
last(predicate) {
|
|
497
331
|
return this._enumerable.last(predicate);
|
|
498
|
-
}
|
|
499
|
-
|
|
332
|
+
}
|
|
333
|
+
lastOrDefault(predicate, defaultValue) {
|
|
500
334
|
if (typeof predicate === "function")
|
|
501
335
|
return this._enumerable.lastOrDefault(predicate, defaultValue);
|
|
502
336
|
return this._enumerable.lastOrDefault(defaultValue);
|
|
503
|
-
}
|
|
504
|
-
|
|
337
|
+
}
|
|
338
|
+
single(predicate) {
|
|
505
339
|
return this._enumerable.single(predicate);
|
|
506
|
-
}
|
|
507
|
-
|
|
340
|
+
}
|
|
341
|
+
singleOrDefault(predicate, defaultValue) {
|
|
508
342
|
return this._enumerable.singleOrDefault(predicate, defaultValue);
|
|
509
|
-
}
|
|
510
|
-
|
|
343
|
+
}
|
|
344
|
+
skip(count) {
|
|
511
345
|
return this._enumerable.skip(count);
|
|
512
|
-
}
|
|
513
|
-
|
|
346
|
+
}
|
|
347
|
+
skipWhile(predicate) {
|
|
514
348
|
return this._enumerable.skipWhile(predicate);
|
|
515
|
-
}
|
|
516
|
-
|
|
349
|
+
}
|
|
350
|
+
take(count) {
|
|
517
351
|
return this._enumerable.take(count);
|
|
518
|
-
}
|
|
519
|
-
|
|
352
|
+
}
|
|
353
|
+
takeWhile(predicate) {
|
|
520
354
|
return this._enumerable.takeWhile(predicate);
|
|
521
|
-
}
|
|
522
|
-
|
|
355
|
+
}
|
|
356
|
+
takeExceptLast(count) {
|
|
523
357
|
return this._enumerable.takeExceptLast(count);
|
|
524
|
-
}
|
|
525
|
-
|
|
358
|
+
}
|
|
359
|
+
takeFromLast(count) {
|
|
526
360
|
return this._enumerable.takeFromLast(count);
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
};
|
|
536
|
-
Collection.prototype.lastIndexOf = function () {
|
|
537
|
-
var _a;
|
|
538
|
-
var args = [];
|
|
539
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
540
|
-
args[_i] = arguments[_i];
|
|
541
|
-
}
|
|
542
|
-
return (_a = this._enumerable).lastIndexOf.apply(_a, __spread(args));
|
|
543
|
-
};
|
|
544
|
-
Collection.prototype.asEnumerable = function () {
|
|
361
|
+
}
|
|
362
|
+
indexOf(...args) {
|
|
363
|
+
return this._enumerable.indexOf(...args);
|
|
364
|
+
}
|
|
365
|
+
lastIndexOf(...args) {
|
|
366
|
+
return this._enumerable.lastIndexOf(...args);
|
|
367
|
+
}
|
|
368
|
+
asEnumerable() {
|
|
545
369
|
return this._enumerable;
|
|
546
|
-
}
|
|
547
|
-
|
|
370
|
+
}
|
|
371
|
+
cast() {
|
|
548
372
|
return this._enumerable.cast();
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
args[_i] = arguments[_i];
|
|
555
|
-
}
|
|
556
|
-
return (_a = this._enumerable).toLookup.apply(_a, __spread(args));
|
|
557
|
-
};
|
|
558
|
-
Collection.prototype.toObject = function (keySelector, elementSelector) {
|
|
373
|
+
}
|
|
374
|
+
toLookup(...args) {
|
|
375
|
+
return this._enumerable.toLookup(...args);
|
|
376
|
+
}
|
|
377
|
+
toObject(keySelector, elementSelector) {
|
|
559
378
|
return this._enumerable.toObject(keySelector, elementSelector);
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
return (_a = this._enumerable).toJoinedString.apply(_a, __spread(args));
|
|
584
|
-
};
|
|
585
|
-
Collection.prototype.doAction = function () {
|
|
586
|
-
var _a;
|
|
587
|
-
var args = [];
|
|
588
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
589
|
-
args[_i] = arguments[_i];
|
|
590
|
-
}
|
|
591
|
-
return (_a = this._enumerable).doAction.apply(_a, __spread(args));
|
|
592
|
-
};
|
|
593
|
-
Collection.prototype.forEach = function () {
|
|
594
|
-
var _a;
|
|
595
|
-
var args = [];
|
|
596
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
597
|
-
args[_i] = arguments[_i];
|
|
598
|
-
}
|
|
599
|
-
return (_a = this._enumerable).forEach.apply(_a, __spread(args));
|
|
600
|
-
};
|
|
601
|
-
Collection.prototype.write = function () {
|
|
602
|
-
var _a;
|
|
603
|
-
var args = [];
|
|
604
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
605
|
-
args[_i] = arguments[_i];
|
|
606
|
-
}
|
|
607
|
-
return (_a = this._enumerable).write.apply(_a, __spread(args));
|
|
608
|
-
};
|
|
609
|
-
Collection.prototype.writeLine = function () {
|
|
610
|
-
var _a;
|
|
611
|
-
var args = [];
|
|
612
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
613
|
-
args[_i] = arguments[_i];
|
|
614
|
-
}
|
|
615
|
-
return (_a = this._enumerable).writeLine.apply(_a, __spread(args));
|
|
616
|
-
};
|
|
617
|
-
Collection.prototype.force = function () {
|
|
379
|
+
}
|
|
380
|
+
toDictionary(...args) {
|
|
381
|
+
return this._enumerable.toDictionary(...args);
|
|
382
|
+
}
|
|
383
|
+
toJSONString(...args) {
|
|
384
|
+
return this._enumerable.toJSONString(...args);
|
|
385
|
+
}
|
|
386
|
+
toJoinedString(...args) {
|
|
387
|
+
return this._enumerable.toJoinedString(...args);
|
|
388
|
+
}
|
|
389
|
+
doAction(...args) {
|
|
390
|
+
return this._enumerable.doAction(...args);
|
|
391
|
+
}
|
|
392
|
+
forEach(...args) {
|
|
393
|
+
return this._enumerable.forEach(...args);
|
|
394
|
+
}
|
|
395
|
+
write(...args) {
|
|
396
|
+
return this._enumerable.write(...args);
|
|
397
|
+
}
|
|
398
|
+
writeLine(...args) {
|
|
399
|
+
return this._enumerable.writeLine(...args);
|
|
400
|
+
}
|
|
401
|
+
force() {
|
|
618
402
|
return this._enumerable.force();
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
args[_i] = arguments[_i];
|
|
625
|
-
}
|
|
626
|
-
return (_a = this._enumerable).letBind.apply(_a, __spread(args));
|
|
627
|
-
};
|
|
628
|
-
Collection.prototype.share = function () {
|
|
403
|
+
}
|
|
404
|
+
letBind(...args) {
|
|
405
|
+
return this._enumerable.letBind(...args);
|
|
406
|
+
}
|
|
407
|
+
share() {
|
|
629
408
|
return this._enumerable.share();
|
|
630
|
-
}
|
|
631
|
-
|
|
409
|
+
}
|
|
410
|
+
memoize() {
|
|
632
411
|
return this._enumerable.memoize();
|
|
633
|
-
}
|
|
634
|
-
|
|
412
|
+
}
|
|
413
|
+
catchError(handler) {
|
|
635
414
|
return this._enumerable.catchError(handler);
|
|
636
|
-
}
|
|
637
|
-
|
|
415
|
+
}
|
|
416
|
+
finallyAction(finallyAction) {
|
|
638
417
|
return this._enumerable.finallyAction(finallyAction);
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
}
|
|
654
|
-
return (_a = this._enumerable).trace.apply(_a, __spread(args));
|
|
655
|
-
};
|
|
656
|
-
Collection.prototype.insert = function () {
|
|
657
|
-
var _a;
|
|
658
|
-
var args = [];
|
|
659
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
660
|
-
args[_i] = arguments[_i];
|
|
661
|
-
}
|
|
662
|
-
return (_a = this._enumerable).insert.apply(_a, __spread(args));
|
|
663
|
-
};
|
|
664
|
-
Collection.prototype.contains = function () {
|
|
665
|
-
var _a;
|
|
666
|
-
var args = [];
|
|
667
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
668
|
-
args[_i] = arguments[_i];
|
|
669
|
-
}
|
|
670
|
-
return (_a = this._enumerable).contains.apply(_a, __spread(args));
|
|
671
|
-
};
|
|
672
|
-
return Collection;
|
|
673
|
-
}());
|
|
674
|
-
export { Collection };
|
|
418
|
+
}
|
|
419
|
+
log(...args) {
|
|
420
|
+
return this._enumerable.log(...args);
|
|
421
|
+
}
|
|
422
|
+
trace(...args) {
|
|
423
|
+
return this._enumerable.trace(...args);
|
|
424
|
+
}
|
|
425
|
+
insert(...args) {
|
|
426
|
+
return this._enumerable.insert(...args);
|
|
427
|
+
}
|
|
428
|
+
contains(...args) {
|
|
429
|
+
return this._enumerable.contains(...args);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
675
432
|
function patch(enumerable) {
|
|
676
433
|
origEnumerableFrom = Enumerable.from;
|
|
677
434
|
try {
|
|
678
|
-
enumerable.from =
|
|
435
|
+
enumerable.from = (obj) => {
|
|
679
436
|
if (obj instanceof Collection)
|
|
680
437
|
return obj;
|
|
681
438
|
return origEnumerableFrom(obj);
|
|
682
439
|
};
|
|
683
440
|
}
|
|
684
441
|
catch (ex) {
|
|
685
|
-
console.error(
|
|
442
|
+
console.error(`unable to patch Enumerable`, ex);
|
|
686
443
|
}
|
|
687
444
|
}
|
|
688
445
|
function EnumerableFrom(enumerable) {
|