@aurigma/design-atoms-model 7.0.34 → 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.
Files changed (324) hide show
  1. package/Collection.js +271 -514
  2. package/Collection.js.map +1 -1
  3. package/Colors/CmykColor.js +35 -69
  4. package/Colors/CmykColor.js.map +1 -1
  5. package/Colors/Color.js +11 -19
  6. package/Colors/Color.js.map +1 -1
  7. package/Colors/GrayscaleColor.js +23 -45
  8. package/Colors/GrayscaleColor.js.map +1 -1
  9. package/Colors/HsbColor.js +67 -85
  10. package/Colors/HsbColor.js.map +1 -1
  11. package/Colors/Ink.js +20 -35
  12. package/Colors/Ink.js.map +1 -1
  13. package/Colors/LabColor.js +29 -59
  14. package/Colors/LabColor.js.map +1 -1
  15. package/Colors/Palette.js +2 -21
  16. package/Colors/Palette.js.map +1 -1
  17. package/Colors/ProcessColor.js +24 -54
  18. package/Colors/ProcessColor.js.map +1 -1
  19. package/Colors/RgbColor.js +31 -61
  20. package/Colors/RgbColor.js.map +1 -1
  21. package/Colors/RgbColors.js +22 -54
  22. package/Colors/RgbColors.js.map +1 -1
  23. package/Colors/SpotColor.js +34 -68
  24. package/Colors/SpotColor.js.map +1 -1
  25. package/Colors/Swatch.js +16 -40
  26. package/Colors/Swatch.js.map +1 -1
  27. package/Colors/ValidationUtils.js +3 -5
  28. package/Colors/ValidationUtils.js.map +1 -1
  29. package/ColorsOld/CmykColor.js +54 -80
  30. package/ColorsOld/CmykColor.js.map +1 -1
  31. package/ColorsOld/Color.d.ts +1 -1
  32. package/ColorsOld/Color.js +25 -34
  33. package/ColorsOld/Color.js.map +1 -1
  34. package/ColorsOld/ColorFactory.js +30 -40
  35. package/ColorsOld/ColorFactory.js.map +1 -1
  36. package/ColorsOld/GrayscaleColor.js +29 -54
  37. package/ColorsOld/GrayscaleColor.js.map +1 -1
  38. package/ColorsOld/HsbColor.js +29 -35
  39. package/ColorsOld/HsbColor.js.map +1 -1
  40. package/ColorsOld/LabColor.js +35 -56
  41. package/ColorsOld/LabColor.js.map +1 -1
  42. package/ColorsOld/RgbColor.js +73 -114
  43. package/ColorsOld/RgbColor.js.map +1 -1
  44. package/ColorsOld/SpotColor.js +32 -53
  45. package/ColorsOld/SpotColor.js.map +1 -1
  46. package/ColorsOld/Utils.js +9 -13
  47. package/ColorsOld/Utils.js.map +1 -1
  48. package/Configuration/IRenderingConfig.js +1 -0
  49. package/Configuration/WatermarkConfig.js +17 -33
  50. package/Configuration/WatermarkConfig.js.map +1 -1
  51. package/Configuration/index.js +1 -0
  52. package/Configuration/index.js.map +1 -1
  53. package/Configuration.js +7 -11
  54. package/Configuration.js.map +1 -1
  55. package/EquatableKeyDictionary.js +43 -127
  56. package/EquatableKeyDictionary.js.map +1 -1
  57. package/EventObject.js +59 -136
  58. package/EventObject.js.map +1 -1
  59. package/Exception.d.ts +1 -1
  60. package/Exception.js +47 -88
  61. package/Exception.js.map +1 -1
  62. package/INotifyPropertyChanged.d.ts +1 -1
  63. package/INotifyPropertyChanged.js +1 -0
  64. package/Math/Array.js +3 -3
  65. package/Math/Array.js.map +1 -1
  66. package/Math/Common.js +13 -15
  67. package/Math/Common.js.map +1 -1
  68. package/Math/ILtrb.js +1 -0
  69. package/Math/IPoint.js +1 -0
  70. package/Math/ISize.js +1 -0
  71. package/Math/Margin.js +62 -99
  72. package/Math/Margin.js.map +1 -1
  73. package/Math/Matrix.js +63 -94
  74. package/Math/Matrix.js.map +1 -1
  75. package/Math/Path.d.ts +1 -1
  76. package/Math/Path.js +148 -233
  77. package/Math/Path.js.map +1 -1
  78. package/Math/PointF.js +31 -34
  79. package/Math/PointF.js.map +1 -1
  80. package/Math/RectangleF.js +119 -159
  81. package/Math/RectangleF.js.map +1 -1
  82. package/Math/RotatedRectangleF.js +132 -147
  83. package/Math/RotatedRectangleF.js.map +1 -1
  84. package/Math/SizeF.js +10 -12
  85. package/Math/SizeF.js.map +1 -1
  86. package/Math/Transform.js +50 -80
  87. package/Math/Transform.js.map +1 -1
  88. package/Math/index.js +3 -0
  89. package/Math/index.js.map +1 -1
  90. package/Product/Constraints/ContainerConstraints.js +11 -13
  91. package/Product/Constraints/ContainerConstraints.js.map +1 -1
  92. package/Product/Constraints/MaxArtworkSizeConstraints.d.ts +1 -1
  93. package/Product/Constraints/MaxArtworkSizeConstraints.js +10 -12
  94. package/Product/Constraints/MaxArtworkSizeConstraints.js.map +1 -1
  95. package/Product/Constraints/PrintingTechniqueConstraints.js +10 -13
  96. package/Product/Constraints/PrintingTechniqueConstraints.js.map +1 -1
  97. package/Product/Container.d.ts +10 -10
  98. package/Product/Container.js +253 -375
  99. package/Product/Container.js.map +1 -1
  100. package/Product/ContainerVisualization.js +31 -56
  101. package/Product/ContainerVisualization.js.map +1 -1
  102. package/Product/Convert/CornerRadiusConverter.js +32 -34
  103. package/Product/Convert/CornerRadiusConverter.js.map +1 -1
  104. package/Product/CropMark.js +28 -40
  105. package/Product/CropMark.js.map +1 -1
  106. package/Product/Decorators/Factory/AbstractFactory.js +13 -23
  107. package/Product/Decorators/Factory/AbstractFactory.js.map +1 -1
  108. package/Product/Decorators/Factory/CollectionFactory.js +10 -45
  109. package/Product/Decorators/Factory/CollectionFactory.js.map +1 -1
  110. package/Product/Decorators/Factory/ColorFactory.js +13 -35
  111. package/Product/Decorators/Factory/ColorFactory.js.map +1 -1
  112. package/Product/Decorators/Factory/ObjectFactory.js +10 -45
  113. package/Product/Decorators/Factory/ObjectFactory.js.map +1 -1
  114. package/Product/Decorators/Factory/SimpleFactory.js +11 -21
  115. package/Product/Decorators/Factory/SimpleFactory.js.map +1 -1
  116. package/Product/Decorators/Interfaces/IInputPropertyMetadata.d.ts +1 -1
  117. package/Product/Decorators/Interfaces/IInputPropertyMetadata.js +1 -0
  118. package/Product/Decorators/Interfaces/IObjectMetadata.js +1 -0
  119. package/Product/Decorators/Interfaces/IPropertyMetadata.js +1 -0
  120. package/Product/Decorators/ItemsMetadata.js +11 -13
  121. package/Product/Decorators/ItemsMetadata.js.map +1 -1
  122. package/Product/Decorators/Property.js +4 -4
  123. package/Product/Decorators/Property.js.map +1 -1
  124. package/Product/Decorators/PropertyChanged.js +1 -1
  125. package/Product/Decorators/PropertyChanged.js.map +1 -1
  126. package/Product/Decorators/index.js +1 -0
  127. package/Product/Decorators/index.js.map +1 -1
  128. package/Product/Effects/ColorDictionaryEntry.js +3 -5
  129. package/Product/Effects/ColorDictionaryEntry.js.map +1 -1
  130. package/Product/Effects/NDEffectParameters.js +2 -6
  131. package/Product/Effects/NDEffectParameters.js.map +1 -1
  132. package/Product/Effects/NDEffects.js +20 -27
  133. package/Product/Effects/NDEffects.js.map +1 -1
  134. package/Product/Effects/RecolorEffectParameters.js +44 -89
  135. package/Product/Effects/RecolorEffectParameters.js.map +1 -1
  136. package/Product/IGetAllItemsOptions.js +1 -0
  137. package/Product/InteractiveZone.js +34 -66
  138. package/Product/InteractiveZone.js.map +1 -1
  139. package/Product/Interfaces/IColorWithTitle.js +1 -0
  140. package/Product/Interfaces/IDataSet.js +1 -0
  141. package/Product/Interfaces/IFontSettings.js +1 -0
  142. package/Product/Interfaces/IItemData.js +1 -0
  143. package/Product/Interfaces/IPdfMetadata.js +1 -0
  144. package/Product/Interfaces/IProductThemeConfig.js +1 -0
  145. package/Product/Interfaces/IShadowSettings.js +1 -0
  146. package/Product/Interfaces/IStrokeSettings.js +1 -0
  147. package/Product/Interfaces/index.js +3 -0
  148. package/Product/Interfaces/index.js.map +1 -1
  149. package/Product/ItemMask.js +20 -26
  150. package/Product/ItemMask.js.map +1 -1
  151. package/Product/Items/ArchedTextItem.js +65 -100
  152. package/Product/Items/ArchedTextItem.js.map +1 -1
  153. package/Product/Items/AutoScaledTextItem.js +35 -62
  154. package/Product/Items/AutoScaledTextItem.js.map +1 -1
  155. package/Product/Items/BarcodeData.d.ts +1 -1
  156. package/Product/Items/BarcodeData.js +60 -90
  157. package/Product/Items/BarcodeData.js.map +1 -1
  158. package/Product/Items/BarcodeItem.js +249 -298
  159. package/Product/Items/BarcodeItem.js.map +1 -1
  160. package/Product/Items/BarcodePermissions.js +38 -52
  161. package/Product/Items/BarcodePermissions.js.map +1 -1
  162. package/Product/Items/BaseItem.js +30 -53
  163. package/Product/Items/BaseItem.js.map +1 -1
  164. package/Product/Items/BaseTextItem.d.ts +2 -2
  165. package/Product/Items/BaseTextItem.js +447 -621
  166. package/Product/Items/BaseTextItem.js.map +1 -1
  167. package/Product/Items/BoundedTextItem.js +184 -255
  168. package/Product/Items/BoundedTextItem.js.map +1 -1
  169. package/Product/Items/ClipartItem.js +82 -175
  170. package/Product/Items/ClipartItem.js.map +1 -1
  171. package/Product/Items/ContentItem.js +52 -80
  172. package/Product/Items/ContentItem.js.map +1 -1
  173. package/Product/Items/ContentPermissions.js +36 -47
  174. package/Product/Items/ContentPermissions.js.map +1 -1
  175. package/Product/Items/CurvedTextItem.js +106 -158
  176. package/Product/Items/CurvedTextItem.js.map +1 -1
  177. package/Product/Items/DashedLineItem.js +45 -76
  178. package/Product/Items/DashedLineItem.js.map +1 -1
  179. package/Product/Items/EllipseItem.js +11 -31
  180. package/Product/Items/EllipseItem.js.map +1 -1
  181. package/Product/Items/FrontEndPermissions.js +20 -26
  182. package/Product/Items/FrontEndPermissions.js.map +1 -1
  183. package/Product/Items/GridItem.js +107 -162
  184. package/Product/Items/GridItem.js.map +1 -1
  185. package/Product/Items/GroupItem.js +93 -171
  186. package/Product/Items/GroupItem.js.map +1 -1
  187. package/Product/Items/GroupItemPermissions.js +42 -56
  188. package/Product/Items/GroupItemPermissions.js.map +1 -1
  189. package/Product/Items/ImageItem.js +304 -428
  190. package/Product/Items/ImageItem.js.map +1 -1
  191. package/Product/Items/ImageMetaData.js +14 -15
  192. package/Product/Items/ImageMetaData.js.map +1 -1
  193. package/Product/Items/ImagePermissions.js +42 -56
  194. package/Product/Items/ImagePermissions.js.map +1 -1
  195. package/Product/Items/ImageViolationSettings.js +18 -35
  196. package/Product/Items/ImageViolationSettings.js.map +1 -1
  197. package/Product/Items/InStringPlaceholder.js +50 -100
  198. package/Product/Items/InStringPlaceholder.js.map +1 -1
  199. package/Product/Items/Item.d.ts +1 -1
  200. package/Product/Items/Item.js +278 -370
  201. package/Product/Items/Item.js.map +1 -1
  202. package/Product/Items/ItemPermissions.js +54 -73
  203. package/Product/Items/ItemPermissions.js.map +1 -1
  204. package/Product/Items/ItemToolbarPermissions.js +61 -80
  205. package/Product/Items/ItemToolbarPermissions.js.map +1 -1
  206. package/Product/Items/LayoutItem.js +241 -326
  207. package/Product/Items/LayoutItem.js.map +1 -1
  208. package/Product/Items/LineItem.js +109 -156
  209. package/Product/Items/LineItem.js.map +1 -1
  210. package/Product/Items/LinePermissions.js +29 -39
  211. package/Product/Items/LinePermissions.js.map +1 -1
  212. package/Product/Items/ManipulationPermissions.d.ts +1 -1
  213. package/Product/Items/ManipulationPermissions.js +94 -135
  214. package/Product/Items/ManipulationPermissions.js.map +1 -1
  215. package/Product/Items/OpenTypeFeature.d.ts +1 -1
  216. package/Product/Items/OpenTypeFeature.js +3 -5
  217. package/Product/Items/OpenTypeFeature.js.map +1 -1
  218. package/Product/Items/OverlayEffect.js +56 -70
  219. package/Product/Items/OverlayEffect.js.map +1 -1
  220. package/Product/Items/ParagraphSettings.js +9 -11
  221. package/Product/Items/ParagraphSettings.js.map +1 -1
  222. package/Product/Items/PathBoundedTextItem.js +113 -164
  223. package/Product/Items/PathBoundedTextItem.js.map +1 -1
  224. package/Product/Items/PathBoundedTextPermissions.js +20 -26
  225. package/Product/Items/PathBoundedTextPermissions.js.map +1 -1
  226. package/Product/Items/PlaceholderItem.d.ts +1 -1
  227. package/Product/Items/PlaceholderItem.js +307 -417
  228. package/Product/Items/PlaceholderItem.js.map +1 -1
  229. package/Product/Items/PlaceholderPermissions.js +38 -47
  230. package/Product/Items/PlaceholderPermissions.js.map +1 -1
  231. package/Product/Items/PlainTextItem.js +45 -74
  232. package/Product/Items/PlainTextItem.js.map +1 -1
  233. package/Product/Items/PolylineItem.js +47 -78
  234. package/Product/Items/PolylineItem.js.map +1 -1
  235. package/Product/Items/RectangleItem.js +10 -30
  236. package/Product/Items/RectangleItem.js.map +1 -1
  237. package/Product/Items/ResizeGripsPermissions.d.ts +3 -3
  238. package/Product/Items/ResizeGripsPermissions.js +74 -94
  239. package/Product/Items/ResizeGripsPermissions.js.map +1 -1
  240. package/Product/Items/ShadowSettings.js +51 -69
  241. package/Product/Items/ShadowSettings.js.map +1 -1
  242. package/Product/Items/ShapeItem.js +182 -251
  243. package/Product/Items/ShapeItem.js.map +1 -1
  244. package/Product/Items/ShapePermissions.js +38 -52
  245. package/Product/Items/ShapePermissions.js.map +1 -1
  246. package/Product/Items/ShapeViolationSettings.js +18 -36
  247. package/Product/Items/ShapeViolationSettings.js.map +1 -1
  248. package/Product/Items/Size.js +7 -11
  249. package/Product/Items/Size.js.map +1 -1
  250. package/Product/Items/SmartItem.js +21 -41
  251. package/Product/Items/SmartItem.js.map +1 -1
  252. package/Product/Items/StrokeSettings.js +48 -62
  253. package/Product/Items/StrokeSettings.js.map +1 -1
  254. package/Product/Items/TextEnums.d.ts +2 -1
  255. package/Product/Items/TextEnums.js +1 -0
  256. package/Product/Items/TextEnums.js.map +1 -1
  257. package/Product/Items/TextPermissions.js +56 -58
  258. package/Product/Items/TextPermissions.js.map +1 -1
  259. package/Product/Items/TextViolationSettings.js +23 -40
  260. package/Product/Items/TextViolationSettings.js.map +1 -1
  261. package/Product/Items/ThemeBinding.js +10 -12
  262. package/Product/Items/ThemeBinding.js.map +1 -1
  263. package/Product/Items/ViolationSettings.js +26 -44
  264. package/Product/Items/ViolationSettings.js.map +1 -1
  265. package/Product/Items/VisualizationPermissions.js +29 -39
  266. package/Product/Items/VisualizationPermissions.js.map +1 -1
  267. package/Product/ItemsData/ItemData.js +8 -24
  268. package/Product/ItemsData/ItemData.js.map +1 -1
  269. package/Product/ModelComponent.js +41 -63
  270. package/Product/ModelComponent.js.map +1 -1
  271. package/Product/PrintArea.d.ts +1 -0
  272. package/Product/PrintArea.js +132 -178
  273. package/Product/PrintArea.js.map +1 -1
  274. package/Product/Product.js +67 -105
  275. package/Product/Product.js.map +1 -1
  276. package/Product/SafetyLine.d.ts +1 -1
  277. package/Product/SafetyLine.js +90 -124
  278. package/Product/SafetyLine.js.map +1 -1
  279. package/Product/Surface.d.ts +2 -1
  280. package/Product/Surface.js +193 -287
  281. package/Product/Surface.js.map +1 -1
  282. package/Product/SurfaceMockup.js +40 -73
  283. package/Product/SurfaceMockup.js.map +1 -1
  284. package/Product/Uuid.js +19 -25
  285. package/Product/Uuid.js.map +1 -1
  286. package/Product/Watermark.js +5 -9
  287. package/Product/Watermark.js.map +1 -1
  288. package/Product/index.js +1 -0
  289. package/Product/index.js.map +1 -1
  290. package/Serialization/IProductSerializer.js +1 -0
  291. package/Utils/Environment.d.ts +1 -1
  292. package/Utils/Environment.js +2 -2
  293. package/Utils/Environment.js.map +1 -1
  294. package/Utils/Exceptions.js +5 -5
  295. package/Utils/Exceptions.js.map +1 -1
  296. package/Utils/Items.js +19 -19
  297. package/Utils/Items.js.map +1 -1
  298. package/Utils/Types/Action.d.ts +5 -1
  299. package/Utils/Types/Action.js +1 -0
  300. package/Utils/Types/AnyFunction.d.ts +1 -1
  301. package/Utils/Types/AnyFunction.js +1 -0
  302. package/Utils/Types/Func.d.ts +1 -1
  303. package/Utils/Types/Func.js +1 -0
  304. package/Utils/Types/index.js +3 -0
  305. package/Utils/Types/index.js.map +1 -1
  306. package/Utils/Utils.d.ts +9 -4
  307. package/Utils/Utils.js +179 -296
  308. package/Utils/Utils.js.map +1 -1
  309. package/Utils/debounce.d.ts +29 -0
  310. package/Utils/debounce.js +106 -0
  311. package/Utils/debounce.js.map +1 -0
  312. package/Utils/index.d.ts +2 -0
  313. package/Utils/index.js +3 -0
  314. package/Utils/index.js.map +1 -1
  315. package/Utils/throttle.d.ts +16 -0
  316. package/Utils/throttle.js +25 -0
  317. package/Utils/throttle.js.map +1 -0
  318. package/Validators/CmykComponentValidator.js +13 -15
  319. package/Validators/CmykComponentValidator.js.map +1 -1
  320. package/Version.d.ts +1 -1
  321. package/Version.js +1 -1
  322. package/Version.js.map +1 -1
  323. package/package.json +3 -8
  324. 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
- var origEnumerableFrom = null;
7
+ let origEnumerableFrom = null;
39
8
  patch(Enumerable);
40
- var Collection = /** @class */ (function () {
41
- function Collection() {
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"] = function (getEnumerator) {
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
- Collection.prototype.setRange = function (items) {
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
- Collection.prototype.addRange = function (items) {
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
- Collection.prototype.add = function () {
75
- var e_1, _a;
76
- var items = [];
77
- for (var _i = 0; _i < arguments.length; _i++) {
78
- items[_i] = arguments[_i];
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
- Collection.prototype.insertAt = function (index, items) {
104
- var e_2, _a, _b;
52
+ insertAt(index, items) {
105
53
  if (!Array.isArray(items))
106
54
  items = [items];
107
- try {
108
- for (var items_2 = __values(items), items_2_1 = items_2.next(); !items_2_1.done; items_2_1 = items_2.next()) {
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
- (_b = this._collection).splice.apply(_b, __spread([index, 0], items));
123
- for (var i = 0; i < items.length; i++) {
124
- var item = items[i];
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
- Collection.prototype.remove = function (item) {
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
- Collection.prototype.removeAt = function (index) {
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
- var item = this._collection[index];
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
- Collection.prototype.removeRange = function (from, to) {
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
- Collection.prototype.move = function (oldIndex, newIndex, supressEvent) {
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
- Collection.prototype.clear = function () {
105
+ clear() {
169
106
  while (this.length > 0) {
170
107
  this.removeAt(this.length - 1);
171
108
  }
172
- };
173
- Collection.prototype.replaceAt = function (item, index) {
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
- Object.defineProperty(Collection.prototype, "length", {
181
- get: function () {
182
- return this._collection.length;
183
- },
184
- enumerable: true,
185
- configurable: true
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
- Collection.prototype.get = function (index) {
124
+ get(index) {
196
125
  return this.getItem(index);
197
- };
198
- Collection.prototype.set = function (index, value) {
126
+ }
127
+ set(index, value) {
199
128
  throw new NotImplementedException();
200
- };
201
- Collection.prototype.getItem = function (index) {
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
- Collection.prototype._checkIfItemExists = function (item) {
136
+ }
137
+ _checkIfItemExists(item) {
209
138
  if (this.contains(item))
210
139
  throw new ArgumentException(itemBelongsCollection);
211
- };
212
- Collection.prototype._onItemAdded = function (index, item) {
140
+ }
141
+ _onItemAdded(index, item) {
213
142
  this._itemAddedEvent.notify({ item: item, index: index, type: CollectionChangeType.Add });
214
- };
215
- Collection.prototype.add_itemAdded = function (h) {
143
+ }
144
+ add_itemAdded(h) {
216
145
  this._itemAddedEvent.add(h);
217
- };
218
- Collection.prototype.remove_itemAdded = function (h) {
146
+ }
147
+ remove_itemAdded(h) {
219
148
  this._itemAddedEvent.remove(h);
220
- };
221
- Collection.prototype._onItemRemoved = function (index, item) {
149
+ }
150
+ _onItemRemoved(index, item) {
222
151
  this._itemRemovedEvent.notify({ item: item, index: index, type: CollectionChangeType.Remove });
223
- };
224
- Collection.prototype.add_itemRemoved = function (h) {
152
+ }
153
+ add_itemRemoved(h) {
225
154
  this._itemRemovedEvent.add(h);
226
- };
227
- Collection.prototype.remove_itemRemoved = function (h) {
155
+ }
156
+ remove_itemRemoved(h) {
228
157
  this._itemRemovedEvent.remove(h);
229
- };
230
- Collection.prototype._onItemMoved = function (oldIndex, newIndex) {
158
+ }
159
+ _onItemMoved(oldIndex, newIndex) {
231
160
  this._itemMovedEvent.notify({ oldIndex: oldIndex, newIndex: newIndex, type: CollectionChangeType.Move });
232
- };
233
- Collection.prototype.add_itemMoved = function (h) {
161
+ }
162
+ add_itemMoved(h) {
234
163
  this._itemMovedEvent.add(h);
235
- };
236
- Collection.prototype.remove_itemMoved = function (h) {
164
+ }
165
+ remove_itemMoved(h) {
237
166
  this._itemMovedEvent.remove(h);
238
- };
239
- Collection.prototype.add_collectionChanged = function (h) {
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
- Collection.prototype.remove_collectionChanged = function (h) {
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
- Collection.prototype[Symbol.iterator] = function () {
179
+ [Symbol.iterator]() {
251
180
  return this._collection.values();
252
- };
181
+ }
253
182
  //#endregion
254
- Collection.prototype.toArray = function () {
183
+ toArray() {
255
184
  return this._collection.slice();
256
- };
185
+ }
257
186
  //#region IEnumerable implementation
258
- Collection.prototype.getEnumerator = function () {
187
+ getEnumerator() {
259
188
  return this._enumerable.getEnumerator();
260
- };
261
- Collection.prototype.traverseBreadthFirst = function () {
262
- var _a;
263
- var args = [];
264
- for (var _i = 0; _i < arguments.length; _i++) {
265
- args[_i] = arguments[_i];
266
- }
267
- return (_a = this._enumerable).traverseBreadthFirst.apply(_a, __spread(args));
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
- Collection.prototype.pairwise = function (selector) {
198
+ }
199
+ pairwise(selector) {
281
200
  return this._enumerable.pairwise(selector);
282
- };
283
- Collection.prototype.scan = function () {
284
- var _a;
285
- var args = [];
286
- for (var _i = 0; _i < arguments.length; _i++) {
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
- Collection.prototype.selectMany = function () {
295
- var _a;
296
- var args = [];
297
- for (var _i = 0; _i < arguments.length; _i++) {
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
- Collection.prototype.choose = function (selector) {
213
+ }
214
+ choose(selector) {
306
215
  return this._enumerable.choose(selector);
307
- };
308
- Collection.prototype.ofType = function (type) {
216
+ }
217
+ ofType(type) {
309
218
  return this._enumerable.ofType(type);
310
- };
311
- Collection.prototype.zip = function () {
312
- var _a;
313
- var args = [];
314
- for (var _i = 0; _i < arguments.length; _i++) {
315
- args[_i] = arguments[_i];
316
- }
317
- return (_a = this._enumerable).zip.apply(_a, __spread(args));
318
- };
319
- Collection.prototype.merge = function () {
320
- var _a;
321
- var args = [];
322
- for (var _i = 0; _i < arguments.length; _i++) {
323
- args[_i] = arguments[_i];
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
- Collection.prototype.any = function (predicate) {
234
+ }
235
+ any(predicate) {
347
236
  return this._enumerable.any(predicate);
348
- };
349
- Collection.prototype.isEmpty = function () {
237
+ }
238
+ isEmpty() {
350
239
  return this._enumerable.isEmpty();
351
- };
352
- Collection.prototype.concat = function () {
353
- var _a;
354
- var args = [];
355
- for (var _i = 0; _i < arguments.length; _i++) {
356
- args[_i] = arguments[_i];
357
- }
358
- return (_a = this._enumerable).concat.apply(_a, __spread(args));
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
- Collection.prototype.distinct = function () {
372
- var _a;
373
- var args = [];
374
- for (var _i = 0; _i < arguments.length; _i++) {
375
- args[_i] = arguments[_i];
376
- }
377
- return (_a = this._enumerable).distinct.apply(_a, __spread(args));
378
- };
379
- Collection.prototype.distinctUntilChanged = function () {
380
- var _a;
381
- var args = [];
382
- for (var _i = 0; _i < arguments.length; _i++) {
383
- args[_i] = arguments[_i];
384
- }
385
- return (_a = this._enumerable).distinctUntilChanged.apply(_a, __spread(args));
386
- };
387
- Collection.prototype.except = function () {
388
- var _a;
389
- var args = [];
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
- Collection.prototype.orderByDescending = function (keySelector) {
270
+ }
271
+ orderByDescending(keySelector) {
423
272
  return this._enumerable.orderByDescending(keySelector);
424
- };
425
- Collection.prototype.reverse = function () {
273
+ }
274
+ reverse() {
426
275
  return this._enumerable.reverse();
427
- };
428
- Collection.prototype.shuffle = function () {
276
+ }
277
+ shuffle() {
429
278
  return this._enumerable.shuffle();
430
- };
431
- Collection.prototype.weightedSample = function (weightSelector) {
279
+ }
280
+ weightedSample(weightSelector) {
432
281
  return this._enumerable.weightedSample(weightSelector);
433
- };
434
- Collection.prototype.groupBy = function () {
435
- var _a;
436
- var args = [];
437
- for (var _i = 0; _i < arguments.length; _i++) {
438
- args[_i] = arguments[_i];
439
- }
440
- return (_a = this._enumerable).groupBy.apply(_a, __spread(args));
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
- Collection.prototype.aggregate = function () {
454
- var _a;
455
- var args = [];
456
- for (var _i = 0; _i < arguments.length; _i++) {
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
- Collection.prototype.count = function (predicate) {
297
+ }
298
+ count(predicate) {
465
299
  return this._enumerable.count(predicate);
466
- };
467
- Collection.prototype.max = function (selector) {
300
+ }
301
+ max(selector) {
468
302
  return this._enumerable.max(selector);
469
- };
470
- Collection.prototype.min = function (selector) {
303
+ }
304
+ min(selector) {
471
305
  return this._enumerable.min(selector);
472
- };
473
- Collection.prototype.maxBy = function (keySelector) {
306
+ }
307
+ maxBy(keySelector) {
474
308
  return this._enumerable.maxBy(keySelector);
475
- };
476
- Collection.prototype.minBy = function (keySelector) {
309
+ }
310
+ minBy(keySelector) {
477
311
  return this._enumerable.minBy(keySelector);
478
- };
479
- Collection.prototype.sum = function (selector) {
312
+ }
313
+ sum(selector) {
480
314
  return this._enumerable.sum(selector);
481
- };
482
- Collection.prototype.elementAt = function (index) {
315
+ }
316
+ elementAt(index) {
483
317
  return this._enumerable.elementAt(index);
484
- };
485
- Collection.prototype.elementAtOrDefault = function (index, defaultValue) {
318
+ }
319
+ elementAtOrDefault(index, defaultValue) {
486
320
  return this._enumerable.elementAtOrDefault(index, defaultValue);
487
- };
488
- Collection.prototype.first = function (predicate) {
321
+ }
322
+ first(predicate) {
489
323
  return this._enumerable.first(predicate);
490
- };
491
- Collection.prototype.firstOrDefault = function (predicate, defaultValue) {
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
- Collection.prototype.last = function (predicate) {
329
+ }
330
+ last(predicate) {
497
331
  return this._enumerable.last(predicate);
498
- };
499
- Collection.prototype.lastOrDefault = function (predicate, defaultValue) {
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
- Collection.prototype.single = function (predicate) {
337
+ }
338
+ single(predicate) {
505
339
  return this._enumerable.single(predicate);
506
- };
507
- Collection.prototype.singleOrDefault = function (predicate, defaultValue) {
340
+ }
341
+ singleOrDefault(predicate, defaultValue) {
508
342
  return this._enumerable.singleOrDefault(predicate, defaultValue);
509
- };
510
- Collection.prototype.skip = function (count) {
343
+ }
344
+ skip(count) {
511
345
  return this._enumerable.skip(count);
512
- };
513
- Collection.prototype.skipWhile = function (predicate) {
346
+ }
347
+ skipWhile(predicate) {
514
348
  return this._enumerable.skipWhile(predicate);
515
- };
516
- Collection.prototype.take = function (count) {
349
+ }
350
+ take(count) {
517
351
  return this._enumerable.take(count);
518
- };
519
- Collection.prototype.takeWhile = function (predicate) {
352
+ }
353
+ takeWhile(predicate) {
520
354
  return this._enumerable.takeWhile(predicate);
521
- };
522
- Collection.prototype.takeExceptLast = function (count) {
355
+ }
356
+ takeExceptLast(count) {
523
357
  return this._enumerable.takeExceptLast(count);
524
- };
525
- Collection.prototype.takeFromLast = function (count) {
358
+ }
359
+ takeFromLast(count) {
526
360
  return this._enumerable.takeFromLast(count);
527
- };
528
- Collection.prototype.indexOf = function () {
529
- var _a;
530
- var args = [];
531
- for (var _i = 0; _i < arguments.length; _i++) {
532
- args[_i] = arguments[_i];
533
- }
534
- return (_a = this._enumerable).indexOf.apply(_a, __spread(args));
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
- Collection.prototype.cast = function () {
370
+ }
371
+ cast() {
548
372
  return this._enumerable.cast();
549
- };
550
- Collection.prototype.toLookup = function () {
551
- var _a;
552
- var args = [];
553
- for (var _i = 0; _i < arguments.length; _i++) {
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
- Collection.prototype.toDictionary = function () {
562
- var _a;
563
- var args = [];
564
- for (var _i = 0; _i < arguments.length; _i++) {
565
- args[_i] = arguments[_i];
566
- }
567
- return (_a = this._enumerable).toDictionary.apply(_a, __spread(args));
568
- };
569
- Collection.prototype.toJSONString = function () {
570
- var _a;
571
- var args = [];
572
- for (var _i = 0; _i < arguments.length; _i++) {
573
- args[_i] = arguments[_i];
574
- }
575
- return (_a = this._enumerable).toJSONString.apply(_a, __spread(args));
576
- };
577
- Collection.prototype.toJoinedString = function () {
578
- var _a;
579
- var args = [];
580
- for (var _i = 0; _i < arguments.length; _i++) {
581
- args[_i] = arguments[_i];
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
- Collection.prototype.letBind = function () {
621
- var _a;
622
- var args = [];
623
- for (var _i = 0; _i < arguments.length; _i++) {
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
- Collection.prototype.memoize = function () {
409
+ }
410
+ memoize() {
632
411
  return this._enumerable.memoize();
633
- };
634
- Collection.prototype.catchError = function (handler) {
412
+ }
413
+ catchError(handler) {
635
414
  return this._enumerable.catchError(handler);
636
- };
637
- Collection.prototype.finallyAction = function (finallyAction) {
415
+ }
416
+ finallyAction(finallyAction) {
638
417
  return this._enumerable.finallyAction(finallyAction);
639
- };
640
- Collection.prototype.log = function () {
641
- var _a;
642
- var args = [];
643
- for (var _i = 0; _i < arguments.length; _i++) {
644
- args[_i] = arguments[_i];
645
- }
646
- return (_a = this._enumerable).log.apply(_a, __spread(args));
647
- };
648
- Collection.prototype.trace = function () {
649
- var _a;
650
- var args = [];
651
- for (var _i = 0; _i < arguments.length; _i++) {
652
- args[_i] = arguments[_i];
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 = function (obj) {
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("unable to patch Enumerable", ex);
442
+ console.error(`unable to patch Enumerable`, ex);
686
443
  }
687
444
  }
688
445
  function EnumerableFrom(enumerable) {