@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.
Files changed (326) 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 +2 -0
  76. package/Math/Path.js +231 -142
  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.d.ts +13 -0
  91. package/Product/Constraints/ContainerConstraints.js +22 -0
  92. package/Product/Constraints/ContainerConstraints.js.map +1 -0
  93. package/Product/Constraints/MaxArtworkSizeConstraints.d.ts +13 -0
  94. package/Product/Constraints/MaxArtworkSizeConstraints.js +25 -0
  95. package/Product/Constraints/MaxArtworkSizeConstraints.js.map +1 -0
  96. package/Product/Constraints/PrintingTechniqueConstraints.js +10 -13
  97. package/Product/Constraints/PrintingTechniqueConstraints.js.map +1 -1
  98. package/Product/Container.d.ts +48 -10
  99. package/Product/Container.js +257 -373
  100. package/Product/Container.js.map +1 -1
  101. package/Product/ContainerVisualization.js +31 -56
  102. package/Product/ContainerVisualization.js.map +1 -1
  103. package/Product/Convert/CornerRadiusConverter.js +32 -34
  104. package/Product/Convert/CornerRadiusConverter.js.map +1 -1
  105. package/Product/CropMark.js +28 -40
  106. package/Product/CropMark.js.map +1 -1
  107. package/Product/Decorators/Factory/AbstractFactory.js +13 -23
  108. package/Product/Decorators/Factory/AbstractFactory.js.map +1 -1
  109. package/Product/Decorators/Factory/CollectionFactory.js +10 -45
  110. package/Product/Decorators/Factory/CollectionFactory.js.map +1 -1
  111. package/Product/Decorators/Factory/ColorFactory.js +13 -35
  112. package/Product/Decorators/Factory/ColorFactory.js.map +1 -1
  113. package/Product/Decorators/Factory/ObjectFactory.js +10 -45
  114. package/Product/Decorators/Factory/ObjectFactory.js.map +1 -1
  115. package/Product/Decorators/Factory/SimpleFactory.js +11 -21
  116. package/Product/Decorators/Factory/SimpleFactory.js.map +1 -1
  117. package/Product/Decorators/Interfaces/IInputPropertyMetadata.d.ts +1 -1
  118. package/Product/Decorators/Interfaces/IInputPropertyMetadata.js +1 -0
  119. package/Product/Decorators/Interfaces/IObjectMetadata.js +1 -0
  120. package/Product/Decorators/Interfaces/IPropertyMetadata.js +1 -0
  121. package/Product/Decorators/ItemsMetadata.js +11 -13
  122. package/Product/Decorators/ItemsMetadata.js.map +1 -1
  123. package/Product/Decorators/Property.js +4 -4
  124. package/Product/Decorators/Property.js.map +1 -1
  125. package/Product/Decorators/PropertyChanged.js +1 -1
  126. package/Product/Decorators/PropertyChanged.js.map +1 -1
  127. package/Product/Decorators/index.js +1 -0
  128. package/Product/Decorators/index.js.map +1 -1
  129. package/Product/Effects/ColorDictionaryEntry.js +3 -5
  130. package/Product/Effects/ColorDictionaryEntry.js.map +1 -1
  131. package/Product/Effects/NDEffectParameters.js +2 -6
  132. package/Product/Effects/NDEffectParameters.js.map +1 -1
  133. package/Product/Effects/NDEffects.js +20 -27
  134. package/Product/Effects/NDEffects.js.map +1 -1
  135. package/Product/Effects/RecolorEffectParameters.js +44 -89
  136. package/Product/Effects/RecolorEffectParameters.js.map +1 -1
  137. package/Product/IGetAllItemsOptions.js +1 -0
  138. package/Product/InteractiveZone.js +34 -66
  139. package/Product/InteractiveZone.js.map +1 -1
  140. package/Product/Interfaces/IColorWithTitle.js +1 -0
  141. package/Product/Interfaces/IDataSet.js +1 -0
  142. package/Product/Interfaces/IFontSettings.js +1 -0
  143. package/Product/Interfaces/IItemData.js +1 -0
  144. package/Product/Interfaces/IPdfMetadata.js +1 -0
  145. package/Product/Interfaces/IProductThemeConfig.js +1 -0
  146. package/Product/Interfaces/IShadowSettings.js +1 -0
  147. package/Product/Interfaces/IStrokeSettings.js +1 -0
  148. package/Product/Interfaces/index.js +3 -0
  149. package/Product/Interfaces/index.js.map +1 -1
  150. package/Product/ItemMask.js +20 -26
  151. package/Product/ItemMask.js.map +1 -1
  152. package/Product/Items/ArchedTextItem.js +65 -100
  153. package/Product/Items/ArchedTextItem.js.map +1 -1
  154. package/Product/Items/AutoScaledTextItem.js +35 -62
  155. package/Product/Items/AutoScaledTextItem.js.map +1 -1
  156. package/Product/Items/BarcodeData.d.ts +2 -1
  157. package/Product/Items/BarcodeData.js +77 -90
  158. package/Product/Items/BarcodeData.js.map +1 -1
  159. package/Product/Items/BarcodeItem.js +249 -298
  160. package/Product/Items/BarcodeItem.js.map +1 -1
  161. package/Product/Items/BarcodePermissions.js +38 -52
  162. package/Product/Items/BarcodePermissions.js.map +1 -1
  163. package/Product/Items/BaseItem.js +30 -53
  164. package/Product/Items/BaseItem.js.map +1 -1
  165. package/Product/Items/BaseTextItem.d.ts +2 -2
  166. package/Product/Items/BaseTextItem.js +447 -621
  167. package/Product/Items/BaseTextItem.js.map +1 -1
  168. package/Product/Items/BoundedTextItem.js +184 -255
  169. package/Product/Items/BoundedTextItem.js.map +1 -1
  170. package/Product/Items/ClipartItem.js +82 -175
  171. package/Product/Items/ClipartItem.js.map +1 -1
  172. package/Product/Items/ContentItem.js +52 -80
  173. package/Product/Items/ContentItem.js.map +1 -1
  174. package/Product/Items/ContentPermissions.js +36 -47
  175. package/Product/Items/ContentPermissions.js.map +1 -1
  176. package/Product/Items/CurvedTextItem.js +106 -158
  177. package/Product/Items/CurvedTextItem.js.map +1 -1
  178. package/Product/Items/DashedLineItem.js +45 -76
  179. package/Product/Items/DashedLineItem.js.map +1 -1
  180. package/Product/Items/EllipseItem.js +11 -31
  181. package/Product/Items/EllipseItem.js.map +1 -1
  182. package/Product/Items/FrontEndPermissions.js +20 -26
  183. package/Product/Items/FrontEndPermissions.js.map +1 -1
  184. package/Product/Items/GridItem.js +107 -162
  185. package/Product/Items/GridItem.js.map +1 -1
  186. package/Product/Items/GroupItem.js +93 -171
  187. package/Product/Items/GroupItem.js.map +1 -1
  188. package/Product/Items/GroupItemPermissions.js +42 -56
  189. package/Product/Items/GroupItemPermissions.js.map +1 -1
  190. package/Product/Items/ImageItem.js +304 -428
  191. package/Product/Items/ImageItem.js.map +1 -1
  192. package/Product/Items/ImageMetaData.js +14 -15
  193. package/Product/Items/ImageMetaData.js.map +1 -1
  194. package/Product/Items/ImagePermissions.js +42 -56
  195. package/Product/Items/ImagePermissions.js.map +1 -1
  196. package/Product/Items/ImageViolationSettings.js +18 -35
  197. package/Product/Items/ImageViolationSettings.js.map +1 -1
  198. package/Product/Items/InStringPlaceholder.js +50 -100
  199. package/Product/Items/InStringPlaceholder.js.map +1 -1
  200. package/Product/Items/Item.d.ts +1 -1
  201. package/Product/Items/Item.js +278 -370
  202. package/Product/Items/Item.js.map +1 -1
  203. package/Product/Items/ItemPermissions.js +54 -73
  204. package/Product/Items/ItemPermissions.js.map +1 -1
  205. package/Product/Items/ItemToolbarPermissions.js +61 -80
  206. package/Product/Items/ItemToolbarPermissions.js.map +1 -1
  207. package/Product/Items/LayoutItem.js +241 -326
  208. package/Product/Items/LayoutItem.js.map +1 -1
  209. package/Product/Items/LineItem.js +109 -156
  210. package/Product/Items/LineItem.js.map +1 -1
  211. package/Product/Items/LinePermissions.js +29 -39
  212. package/Product/Items/LinePermissions.js.map +1 -1
  213. package/Product/Items/ManipulationPermissions.d.ts +1 -1
  214. package/Product/Items/ManipulationPermissions.js +94 -135
  215. package/Product/Items/ManipulationPermissions.js.map +1 -1
  216. package/Product/Items/OpenTypeFeature.d.ts +1 -1
  217. package/Product/Items/OpenTypeFeature.js +3 -5
  218. package/Product/Items/OpenTypeFeature.js.map +1 -1
  219. package/Product/Items/OverlayEffect.js +56 -70
  220. package/Product/Items/OverlayEffect.js.map +1 -1
  221. package/Product/Items/ParagraphSettings.js +9 -11
  222. package/Product/Items/ParagraphSettings.js.map +1 -1
  223. package/Product/Items/PathBoundedTextItem.js +113 -164
  224. package/Product/Items/PathBoundedTextItem.js.map +1 -1
  225. package/Product/Items/PathBoundedTextPermissions.js +20 -26
  226. package/Product/Items/PathBoundedTextPermissions.js.map +1 -1
  227. package/Product/Items/PlaceholderItem.d.ts +1 -1
  228. package/Product/Items/PlaceholderItem.js +307 -417
  229. package/Product/Items/PlaceholderItem.js.map +1 -1
  230. package/Product/Items/PlaceholderPermissions.js +38 -47
  231. package/Product/Items/PlaceholderPermissions.js.map +1 -1
  232. package/Product/Items/PlainTextItem.js +45 -74
  233. package/Product/Items/PlainTextItem.js.map +1 -1
  234. package/Product/Items/PolylineItem.js +47 -78
  235. package/Product/Items/PolylineItem.js.map +1 -1
  236. package/Product/Items/RectangleItem.js +10 -30
  237. package/Product/Items/RectangleItem.js.map +1 -1
  238. package/Product/Items/ResizeGripsPermissions.d.ts +3 -3
  239. package/Product/Items/ResizeGripsPermissions.js +74 -94
  240. package/Product/Items/ResizeGripsPermissions.js.map +1 -1
  241. package/Product/Items/ShadowSettings.js +51 -69
  242. package/Product/Items/ShadowSettings.js.map +1 -1
  243. package/Product/Items/ShapeItem.js +182 -251
  244. package/Product/Items/ShapeItem.js.map +1 -1
  245. package/Product/Items/ShapePermissions.js +38 -52
  246. package/Product/Items/ShapePermissions.js.map +1 -1
  247. package/Product/Items/ShapeViolationSettings.js +18 -36
  248. package/Product/Items/ShapeViolationSettings.js.map +1 -1
  249. package/Product/Items/Size.js +7 -11
  250. package/Product/Items/Size.js.map +1 -1
  251. package/Product/Items/SmartItem.js +21 -41
  252. package/Product/Items/SmartItem.js.map +1 -1
  253. package/Product/Items/StrokeSettings.js +48 -62
  254. package/Product/Items/StrokeSettings.js.map +1 -1
  255. package/Product/Items/TextEnums.d.ts +2 -1
  256. package/Product/Items/TextEnums.js +1 -0
  257. package/Product/Items/TextEnums.js.map +1 -1
  258. package/Product/Items/TextPermissions.js +56 -58
  259. package/Product/Items/TextPermissions.js.map +1 -1
  260. package/Product/Items/TextViolationSettings.js +23 -40
  261. package/Product/Items/TextViolationSettings.js.map +1 -1
  262. package/Product/Items/ThemeBinding.js +10 -12
  263. package/Product/Items/ThemeBinding.js.map +1 -1
  264. package/Product/Items/ViolationSettings.js +26 -44
  265. package/Product/Items/ViolationSettings.js.map +1 -1
  266. package/Product/Items/VisualizationPermissions.js +29 -39
  267. package/Product/Items/VisualizationPermissions.js.map +1 -1
  268. package/Product/ItemsData/ItemData.js +8 -24
  269. package/Product/ItemsData/ItemData.js.map +1 -1
  270. package/Product/ModelComponent.js +41 -63
  271. package/Product/ModelComponent.js.map +1 -1
  272. package/Product/PrintArea.d.ts +11 -5
  273. package/Product/PrintArea.js +164 -155
  274. package/Product/PrintArea.js.map +1 -1
  275. package/Product/Product.js +67 -105
  276. package/Product/Product.js.map +1 -1
  277. package/Product/SafetyLine.d.ts +1 -1
  278. package/Product/SafetyLine.js +90 -124
  279. package/Product/SafetyLine.js.map +1 -1
  280. package/Product/Surface.d.ts +2 -1
  281. package/Product/Surface.js +193 -287
  282. package/Product/Surface.js.map +1 -1
  283. package/Product/SurfaceMockup.js +40 -73
  284. package/Product/SurfaceMockup.js.map +1 -1
  285. package/Product/Uuid.js +19 -25
  286. package/Product/Uuid.js.map +1 -1
  287. package/Product/Watermark.js +5 -9
  288. package/Product/Watermark.js.map +1 -1
  289. package/Product/index.d.ts +2 -0
  290. package/Product/index.js +3 -0
  291. package/Product/index.js.map +1 -1
  292. package/Serialization/IProductSerializer.js +1 -0
  293. package/Utils/Environment.d.ts +1 -1
  294. package/Utils/Environment.js +2 -2
  295. package/Utils/Environment.js.map +1 -1
  296. package/Utils/Exceptions.js +5 -5
  297. package/Utils/Exceptions.js.map +1 -1
  298. package/Utils/Items.js +19 -19
  299. package/Utils/Items.js.map +1 -1
  300. package/Utils/Types/Action.d.ts +5 -1
  301. package/Utils/Types/Action.js +1 -0
  302. package/Utils/Types/AnyFunction.d.ts +1 -1
  303. package/Utils/Types/AnyFunction.js +1 -0
  304. package/Utils/Types/Func.d.ts +1 -1
  305. package/Utils/Types/Func.js +1 -0
  306. package/Utils/Types/index.js +3 -0
  307. package/Utils/Types/index.js.map +1 -1
  308. package/Utils/Utils.d.ts +9 -4
  309. package/Utils/Utils.js +179 -296
  310. package/Utils/Utils.js.map +1 -1
  311. package/Utils/debounce.d.ts +29 -0
  312. package/Utils/debounce.js +106 -0
  313. package/Utils/debounce.js.map +1 -0
  314. package/Utils/index.d.ts +2 -0
  315. package/Utils/index.js +3 -0
  316. package/Utils/index.js.map +1 -1
  317. package/Utils/throttle.d.ts +16 -0
  318. package/Utils/throttle.js +25 -0
  319. package/Utils/throttle.js.map +1 -0
  320. package/Validators/CmykComponentValidator.js +13 -15
  321. package/Validators/CmykComponentValidator.js.map +1 -1
  322. package/Version.d.ts +1 -1
  323. package/Version.js +1 -1
  324. package/Version.js.map +1 -1
  325. package/package.json +3 -8
  326. package/typings/structured-clone.d.ts +5 -0
@@ -1,16 +1,3 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- extendStatics(d, b);
10
- function __() { this.constructor = d; }
11
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
- };
13
- })();
14
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -20,28 +7,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
20
7
  var __metadata = (this && this.__metadata) || function (k, v) {
21
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
22
9
  };
23
- var __values = (this && this.__values) || function(o) {
24
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
25
- if (m) return m.call(o);
26
- if (o && typeof o.length === "number") return {
27
- next: function () {
28
- if (o && i >= o.length) o = void 0;
29
- return { value: o && o[i++], done: !o };
30
- }
31
- };
32
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
33
- };
34
10
  import { ContentItem } from "./ContentItem";
35
11
  import { ImagePermissions } from "./ImagePermissions";
36
12
  import { ResizeGripsPermissions } from "./ResizeGripsPermissions";
37
13
  import { RectangleF } from "../../Math/RectangleF";
38
14
  import { ArgumentException, NotImplementedException, Exception } from "../../Exception";
39
15
  import { EventWithSenderArg } from "../../EventObject";
40
- import * as _ from "underscore";
41
16
  import { ImageEffect } from "./ImageEffect";
42
17
  import { pixelsToPoints } from "../../Utils/Convert";
43
18
  import { OverlayEffect } from "./OverlayEffect";
44
- import { equals, arrayEquals } from "../../Utils/Utils";
19
+ import { equals, arrayEquals, isString } from "../../Utils/Utils";
45
20
  import { Size } from "./Size";
46
21
  import { Property } from "../Decorators/Property";
47
22
  import { BlendMode } from "./BlendMode";
@@ -49,71 +24,68 @@ import { CmykColor } from "../../Colors";
49
24
  import { ImageViolationSettings } from "./ImageViolationSettings";
50
25
  import { CollectionPropertyFactory, ObjectPropertyFactory, SimplePropertyFactory } from "../Decorators/Factory";
51
26
  import { NDEffects } from "../Effects/NDEffects";
52
- var ImageItem = /** @class */ (function (_super) {
53
- __extends(ImageItem, _super);
54
- function ImageItem(sourceStorageId, location, width, height, ratioWidthToHeight) {
55
- var _this = _super.call(this) || this;
56
- _this.ndEffects = new NDEffects();
57
- _this._effect = ImageEffect.None;
58
- _this._overlayEffect = null;
59
- _this.type = ImageItem.type;
60
- _this.mviKeepTemplateTransform = false;
61
- _this.values = [];
62
- _this.allowedSubfolder = null;
63
- _this.allowedTabs = null;
64
- _this.ratioWidthToHeight = null;
65
- _this.isUserImage = false;
66
- _this.unconvertedSource = null;
67
- _this._onSourcePropertyChanged = function (sender, property) {
27
+ export class ImageItem extends ContentItem {
28
+ constructor(sourceStorageId, location, width, height, ratioWidthToHeight) {
29
+ super();
30
+ this.ndEffects = new NDEffects();
31
+ this._effect = ImageEffect.None;
32
+ this._overlayEffect = null;
33
+ this.type = ImageItem.type;
34
+ this.mviKeepTemplateTransform = false;
35
+ this.values = [];
36
+ this.allowedSubfolder = null;
37
+ this.allowedTabs = null;
38
+ this.ratioWidthToHeight = null;
39
+ this.isUserImage = false;
40
+ this.unconvertedSource = null;
41
+ this._onSourcePropertyChanged = (sender, property) => {
68
42
  switch (property) {
69
43
  case "url":
70
44
  case "id":
71
45
  case "pageIndex":
72
- _this._propertyChanged.notify(_this, "source");
46
+ this._propertyChanged.notify(this, "source");
73
47
  break;
74
48
  case "isVector":
75
- _this.applyPermissionsConstrain();
76
- _this._propertyChanged.notify(_this, "source");
49
+ this.applyPermissionsConstrain();
50
+ this._propertyChanged.notify(this, "source");
77
51
  break;
78
52
  default:
79
53
  }
80
54
  };
81
- _this._onOverlayEffectPropertyChanged = function (s, p) {
82
- _this._propertyChanged.notify(_this, "overlayEffect");
55
+ this._onOverlayEffectPropertyChanged = (s, p) => {
56
+ this._propertyChanged.notify(this, "overlayEffect");
83
57
  };
84
- _this.imagePermissions = new ImagePermissions();
85
- _this._setViolationSettings(new ImageViolationSettings(), true);
86
- _this.manipulationPermissions.resizeGrips = new ResizeGripsPermissions(true, false);
87
- _this.shapePermissions.allowChangeFillColor = false;
88
- _this.imagePermissions.allowKeepOverlayColor = false;
89
- _this.itemPermissions.itemToolbarPermissions.showSelectButton = true;
58
+ this.imagePermissions = new ImagePermissions();
59
+ this._setViolationSettings(new ImageViolationSettings(), true);
60
+ this.manipulationPermissions.resizeGrips = new ResizeGripsPermissions(true, false);
61
+ this.shapePermissions.allowChangeFillColor = false;
62
+ this.imagePermissions.allowKeepOverlayColor = false;
63
+ this.itemPermissions.itemToolbarPermissions.showSelectButton = true;
90
64
  if (sourceStorageId != null) {
91
- _this.source = new ImageItem.ImageSource(sourceStorageId);
65
+ this.source = new ImageItem.ImageSource(sourceStorageId);
92
66
  }
93
67
  else {
94
- _this.source = new ImageItem.ImageSource();
68
+ this.source = new ImageItem.ImageSource();
95
69
  }
96
70
  if (ratioWidthToHeight != null)
97
- _this.ratioWidthToHeight = ratioWidthToHeight;
71
+ this.ratioWidthToHeight = ratioWidthToHeight;
98
72
  if (width != null && height != null) {
99
- _this.sourceRectangle = new RectangleF(0, 0, width, height);
73
+ this.sourceRectangle = new RectangleF(0, 0, width, height);
100
74
  }
101
75
  else {
102
76
  if (width != null)
103
- _this.SetWidth(width);
77
+ this.SetWidth(width);
104
78
  if (height != null)
105
- _this.SetHeight(height);
79
+ this.SetHeight(height);
106
80
  }
107
81
  if (location != null) {
108
- _this.sourceRectangle.left = location.x;
109
- _this.sourceRectangle.top = location.y;
82
+ this.sourceRectangle.left = location.x;
83
+ this.sourceRectangle.top = location.y;
110
84
  }
111
- return _this;
112
85
  }
113
- ImageItem.prototype._copy = function (source, destination, generateNewIds, appropriateParentContainer) {
114
- var e_1, _a;
115
- var _b;
116
- _super.prototype._copy.call(this, source, destination, generateNewIds, appropriateParentContainer);
86
+ _copy(source, destination, generateNewIds, appropriateParentContainer) {
87
+ var _a;
88
+ super._copy(source, destination, generateNewIds, appropriateParentContainer);
117
89
  destination.imagePermissions = source._imagePermissions != null ? source._imagePermissions.clone() : null;
118
90
  destination.effect = source._effect;
119
91
  destination.overlayEffect = source.overlayEffect != null ? source.overlayEffect.clone() : null;
@@ -122,30 +94,19 @@ var ImageItem = /** @class */ (function (_super) {
122
94
  destination.mviKeepTemplateTransform = source.mviKeepTemplateTransform;
123
95
  if (source.values != null) {
124
96
  destination.values = [];
125
- try {
126
- for (var _c = __values(source.values), _d = _c.next(); !_d.done; _d = _c.next()) {
127
- var i = _d.value;
128
- destination.values.push(i.clone());
129
- }
130
- }
131
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
132
- finally {
133
- try {
134
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
135
- }
136
- finally { if (e_1) throw e_1.error; }
137
- }
97
+ for (var i of source.values)
98
+ destination.values.push(i.clone());
138
99
  }
139
- destination.originalImageSource = (_b = source.originalImageSource) === null || _b === void 0 ? void 0 : _b.clone();
100
+ destination.originalImageSource = (_a = source.originalImageSource) === null || _a === void 0 ? void 0 : _a.clone();
140
101
  destination.ndEffects = source.ndEffects.clone();
141
102
  destination.allowedSubfolder = source.allowedSubfolder;
142
- destination.allowedTabs = _.clone(source.allowedTabs);
103
+ destination.allowedTabs = structuredClone(source.allowedTabs);
143
104
  destination.ratioWidthToHeight = source.ratioWidthToHeight;
144
105
  destination.isUserImage = source.isUserImage;
145
106
  destination.displayName = source.displayName;
146
- };
147
- ImageItem.prototype.equals = function (other) {
148
- return _super.prototype.equals.call(this, other) &&
107
+ }
108
+ equals(other) {
109
+ return super.equals(other) &&
149
110
  equals(this._imagePermissions, other._imagePermissions) &&
150
111
  equals(this._effect, other._effect) &&
151
112
  equals(this.unconvertedSource, other.unconvertedSource) &&
@@ -159,51 +120,40 @@ var ImageItem = /** @class */ (function (_super) {
159
120
  equals(this.isUserImage, other.isUserImage) &&
160
121
  equals(this.originalImageSource, other.originalImageSource) &&
161
122
  equals(this.ndEffects, other.ndEffects);
162
- };
163
- ImageItem.prototype.clone = function (generateNewIds, appropriateParentContainer) {
164
- if (generateNewIds === void 0) { generateNewIds = false; }
165
- if (appropriateParentContainer === void 0) { appropriateParentContainer = false; }
166
- var item = new ImageItem();
123
+ }
124
+ clone(generateNewIds = false, appropriateParentContainer = false) {
125
+ const item = new ImageItem();
167
126
  this._copy(this, item, generateNewIds, appropriateParentContainer);
168
127
  return item;
169
- };
170
- Object.defineProperty(ImageItem.prototype, "imagePermissions", {
171
- get: function () {
172
- return this._imagePermissions;
173
- },
174
- set: function (value) {
175
- if (value == null)
176
- throw new ArgumentException("imagePermissions cannot be null");
177
- if (equals(this._imagePermissions, value))
178
- return;
179
- if (this._imagePermissions != null)
180
- this._imagePermissions.propertyChanged.remove(this._onPermissionsChanged);
181
- this._imagePermissions = value;
182
- this.applyPermissionsConstrain();
183
- this._imagePermissions.propertyChanged.add(this._onPermissionsChanged);
184
- this._propertyChanged.notify(this, "imagePermissions");
185
- },
186
- enumerable: true,
187
- configurable: true
188
- });
189
- Object.defineProperty(ImageItem.prototype, "violationSettings", {
190
- get: function () {
191
- return this._violationSettings;
192
- },
193
- set: function (value) {
194
- this._setViolationSettings(value);
195
- },
196
- enumerable: true,
197
- configurable: true
198
- });
199
- ImageItem.prototype._setViolationSettings = function (value, skipTypeCheck) {
200
- if (skipTypeCheck === void 0) { skipTypeCheck = false; }
128
+ }
129
+ get imagePermissions() {
130
+ return this._imagePermissions;
131
+ }
132
+ set imagePermissions(value) {
133
+ if (value == null)
134
+ throw new ArgumentException("imagePermissions cannot be null");
135
+ if (equals(this._imagePermissions, value))
136
+ return;
137
+ if (this._imagePermissions != null)
138
+ this._imagePermissions.propertyChanged.remove(this._onPermissionsChanged);
139
+ this._imagePermissions = value;
140
+ this.applyPermissionsConstrain();
141
+ this._imagePermissions.propertyChanged.add(this._onPermissionsChanged);
142
+ this._propertyChanged.notify(this, "imagePermissions");
143
+ }
144
+ get violationSettings() {
145
+ return this._violationSettings;
146
+ }
147
+ set violationSettings(value) {
148
+ this._setViolationSettings(value);
149
+ }
150
+ _setViolationSettings(value, skipTypeCheck = false) {
201
151
  if (!skipTypeCheck && !(value instanceof ImageViolationSettings))
202
152
  throw new ArgumentException("Shape ViolationSettings property must has ImageViolationSettings type!");
203
- _super.prototype._setViolationSettings.call(this, value, skipTypeCheck);
204
- };
205
- ImageItem.prototype.applyPermissionsConstrain = function () {
206
- _super.prototype.applyPermissionsConstrain.call(this);
153
+ super._setViolationSettings(value, skipTypeCheck);
154
+ }
155
+ applyPermissionsConstrain() {
156
+ super.applyPermissionsConstrain();
207
157
  if (this.imagePermissions != null && !this.imagePermissions.allowEditImage)
208
158
  this.itemPermissions.itemToolbarPermissions.showEditButtonConstraint = false;
209
159
  else if (this.source != null && this.source.isVector)
@@ -214,197 +164,176 @@ var ImageItem = /** @class */ (function (_super) {
214
164
  this.itemPermissions.itemToolbarPermissions.showSelectButtonConstraint = false;
215
165
  else
216
166
  this.itemPermissions.itemToolbarPermissions.showSelectButtonConstraint = null;
217
- };
218
- Object.defineProperty(ImageItem.prototype, "displayName", {
219
- get: function () {
220
- var _this = this;
221
- if (this._displayName == null && this.values != null && this.values.length > 0) {
222
- var selectedValue = this.values.find(function (imageItemValue) { return imageItemValue.value.id === _this.source.id; });
223
- if (selectedValue != null)
224
- this.displayName = selectedValue.name;
225
- }
226
- return this._displayName;
227
- },
228
- set: function (value) {
229
- if (value != this._displayName)
230
- this._displayName = value;
231
- },
232
- enumerable: true,
233
- configurable: true
234
- });
235
- Object.defineProperty(ImageItem.prototype, "source", {
236
- get: function () {
237
- return this._source;
238
- },
239
- set: function (value) {
240
- if (this._source === value || this._source != null && this._source.equals(value))
241
- return;
242
- if (this._source != null)
243
- this._source.removePropertyChanged(this._onSourcePropertyChanged);
244
- this._source = value;
245
- if (this._source != null)
246
- this._source.addPropertyChanged(this._onSourcePropertyChanged);
247
- this._propertyChanged.notify(this, "source");
248
- },
249
- enumerable: true,
250
- configurable: true
251
- });
252
- Object.defineProperty(ImageItem.prototype, "effect", {
253
- get: function () {
254
- return this._effect;
255
- },
256
- set: function (value) {
257
- if (this._effect !== value) {
258
- this._effect = value;
259
- this._propertyChanged.notify(this, "effect");
260
- }
261
- },
262
- enumerable: true,
263
- configurable: true
264
- });
265
- Object.defineProperty(ImageItem.prototype, "overlayEffect", {
266
- get: function () {
267
- return this._overlayEffect;
268
- },
269
- set: function (value) {
270
- if (OverlayEffect.equals(this.overlayEffect, value))
271
- return;
272
- this._unsubscribeOverlayEffectPropertyChanged();
273
- this._overlayEffect = value;
274
- this._subscribeOverlayEffectPropertyChanged();
275
- this._propertyChanged.notify(this, "overlayEffect");
276
- },
277
- enumerable: true,
278
- configurable: true
279
- });
280
- ImageItem.prototype._subscribeOverlayEffectPropertyChanged = function () {
167
+ }
168
+ get displayName() {
169
+ if (this._displayName == null && this.values != null && this.values.length > 0) {
170
+ const selectedValue = this.values.find((imageItemValue) => imageItemValue.value.id === this.source.id);
171
+ if (selectedValue != null)
172
+ this.displayName = selectedValue.name;
173
+ }
174
+ return this._displayName;
175
+ }
176
+ set displayName(value) {
177
+ if (value != this._displayName)
178
+ this._displayName = value;
179
+ }
180
+ get source() {
181
+ return this._source;
182
+ }
183
+ set source(value) {
184
+ if (this._source === value || this._source != null && this._source.equals(value))
185
+ return;
186
+ if (this._source != null)
187
+ this._source.removePropertyChanged(this._onSourcePropertyChanged);
188
+ this._source = value;
189
+ if (this._source != null)
190
+ this._source.addPropertyChanged(this._onSourcePropertyChanged);
191
+ this._propertyChanged.notify(this, "source");
192
+ }
193
+ get effect() {
194
+ return this._effect;
195
+ }
196
+ set effect(value) {
197
+ if (this._effect !== value) {
198
+ this._effect = value;
199
+ this._propertyChanged.notify(this, "effect");
200
+ }
201
+ }
202
+ get overlayEffect() {
203
+ return this._overlayEffect;
204
+ }
205
+ set overlayEffect(value) {
206
+ if (OverlayEffect.equals(this.overlayEffect, value))
207
+ return;
208
+ this._unsubscribeOverlayEffectPropertyChanged();
209
+ this._overlayEffect = value;
210
+ this._subscribeOverlayEffectPropertyChanged();
211
+ this._propertyChanged.notify(this, "overlayEffect");
212
+ }
213
+ _subscribeOverlayEffectPropertyChanged() {
281
214
  if (this.overlayEffect != null)
282
215
  this.overlayEffect.addPropertyChanged(this._onOverlayEffectPropertyChanged);
283
- };
284
- ImageItem.prototype._unsubscribeOverlayEffectPropertyChanged = function () {
216
+ }
217
+ _unsubscribeOverlayEffectPropertyChanged() {
285
218
  if (this.overlayEffect != null)
286
219
  this.overlayEffect.removePropertyChanged(this._onOverlayEffectPropertyChanged);
287
- };
288
- ImageItem.prototype.SetWidth = function (value, calculateHeight) {
220
+ }
221
+ SetWidth(value, calculateHeight) {
289
222
  this.sourceRectangle.width = value;
290
223
  if (calculateHeight != null)
291
224
  calculateHeight = true;
292
225
  if (this.source.id != null && calculateHeight)
293
226
  this.sourceRectangle.height = this._calculateHeight(value);
294
- };
295
- ImageItem.prototype.SetHeight = function (value, calculateWidth) {
227
+ }
228
+ SetHeight(value, calculateWidth) {
296
229
  this.sourceRectangle.height = value;
297
230
  if (calculateWidth != null)
298
231
  calculateWidth = true;
299
232
  if (this.source.id != null && calculateWidth)
300
233
  this.sourceRectangle.width = this._calculateWidth(value);
301
- };
302
- ImageItem.prototype.getSource = function () {
234
+ }
235
+ getSource() {
303
236
  throw new NotImplementedException();
304
- };
305
- ImageItem.prototype._calculateHeight = function (width) {
237
+ }
238
+ _calculateHeight(width) {
306
239
  if (this.ratioWidthToHeight == null)
307
240
  throw new Exception("Field ratioWidthToHeight is not set!");
308
241
  return width / this.ratioWidthToHeight;
309
- };
310
- ImageItem.prototype._calculateWidth = function (height) {
242
+ }
243
+ _calculateWidth(height) {
311
244
  if (this.ratioWidthToHeight == null)
312
245
  throw new Exception("Field ratioWidthToHeight is not set!");
313
246
  return height * this.ratioWidthToHeight;
314
- };
315
- ImageItem.prototype.getSimplifiedObject = function (omitProperties) {
247
+ }
248
+ getSimplifiedObject(omitProperties) {
316
249
  var _a, _b;
317
- if (!_.isArray(omitProperties) && !_.isString(omitProperties))
250
+ if (!Array.isArray(omitProperties) && !isString(omitProperties))
318
251
  omitProperties = [];
319
- var simplified = _super.prototype.getSimplifiedObject.call(this, ["imagePermissions"].concat(omitProperties));
252
+ const simplified = super.getSimplifiedObject(["imagePermissions"].concat(omitProperties));
320
253
  simplified["source"] = this.source.toJSON();
321
254
  simplified["originalImageSource"] = (_a = this.originalImageSource) === null || _a === void 0 ? void 0 : _a.toJSON();
322
255
  simplified["unconvertedSource"] = (_b = this.unconvertedSource) === null || _b === void 0 ? void 0 : _b.toJSON();
323
256
  simplified["ndEffects"] = this.ndEffects.toJSON();
324
257
  simplified["imagePermissions"] = this.imagePermissions.getSimplifiedObject();
325
258
  return simplified;
326
- };
327
- ImageItem.prototype.getOriginalImageSize = function () {
259
+ }
260
+ getOriginalImageSize() {
328
261
  return {
329
262
  width: pixelsToPoints(this.source.width, this.source.dpiX || 72),
330
263
  height: pixelsToPoints(this.source.height, this.source.dpiY || 72)
331
264
  };
332
- };
333
- ImageItem.type = "ImageItem";
334
- __decorate([
335
- Property({ factory: new SimplePropertyFactory("subfolder"), displayName: "Allowed subfolder" }),
336
- __metadata("design:type", String)
337
- ], ImageItem.prototype, "allowedSubfolder", void 0);
338
- __decorate([
339
- Property({ factory: new CollectionPropertyFactory(Array), displayName: "Allowed tabs", }),
340
- __metadata("design:type", Array)
341
- ], ImageItem.prototype, "allowedTabs", void 0);
342
- __decorate([
343
- Property({ factory: new SimplePropertyFactory("Image"), displayName: "Display name" }),
344
- __metadata("design:type", Object),
345
- __metadata("design:paramtypes", [Object])
346
- ], ImageItem.prototype, "displayName", null);
347
- __decorate([
348
- Property({ ignore: true }),
349
- __metadata("design:type", ImageItem.ImageSource)
350
- ], ImageItem.prototype, "unconvertedSource", void 0);
351
- __decorate([
352
- Property({ enumObject: ImageEffect }),
353
- __metadata("design:type", Number),
354
- __metadata("design:paramtypes", [Number])
355
- ], ImageItem.prototype, "effect", null);
356
- __decorate([
357
- Property({
358
- factory: new ObjectPropertyFactory(OverlayEffect, {
359
- color: new CmykColor(0, 0, 0, 0, 255),
360
- opacity: 1,
361
- blendMode: BlendMode.Normal
362
- }),
363
- displayName: "Overlay effect"
265
+ }
266
+ }
267
+ ImageItem.type = "ImageItem";
268
+ __decorate([
269
+ Property({ factory: new SimplePropertyFactory("subfolder"), displayName: "Allowed subfolder" }),
270
+ __metadata("design:type", String)
271
+ ], ImageItem.prototype, "allowedSubfolder", void 0);
272
+ __decorate([
273
+ Property({ factory: new CollectionPropertyFactory(Array), displayName: "Allowed tabs", }),
274
+ __metadata("design:type", Array)
275
+ ], ImageItem.prototype, "allowedTabs", void 0);
276
+ __decorate([
277
+ Property({ factory: new SimplePropertyFactory("Image"), displayName: "Display name" }),
278
+ __metadata("design:type", Object),
279
+ __metadata("design:paramtypes", [Object])
280
+ ], ImageItem.prototype, "displayName", null);
281
+ __decorate([
282
+ Property({ ignore: true }),
283
+ __metadata("design:type", ImageItem.ImageSource)
284
+ ], ImageItem.prototype, "unconvertedSource", void 0);
285
+ __decorate([
286
+ Property({ enumObject: ImageEffect }),
287
+ __metadata("design:type", Number),
288
+ __metadata("design:paramtypes", [Number])
289
+ ], ImageItem.prototype, "effect", null);
290
+ __decorate([
291
+ Property({
292
+ factory: new ObjectPropertyFactory(OverlayEffect, {
293
+ color: new CmykColor(0, 0, 0, 0, 255),
294
+ opacity: 1,
295
+ blendMode: BlendMode.Normal
364
296
  }),
365
- __metadata("design:type", OverlayEffect),
366
- __metadata("design:paramtypes", [OverlayEffect])
367
- ], ImageItem.prototype, "overlayEffect", null);
368
- return ImageItem;
369
- }(ContentItem));
370
- export { ImageItem };
297
+ displayName: "Overlay effect"
298
+ }),
299
+ __metadata("design:type", OverlayEffect),
300
+ __metadata("design:paramtypes", [OverlayEffect])
301
+ ], ImageItem.prototype, "overlayEffect", null);
371
302
  (function (ImageItem) {
372
- var ImageMetaData = /** @class */ (function () {
373
- function ImageMetaData(rawData) {
374
- _.extend(this, rawData);
303
+ class ImageMetaData {
304
+ constructor(rawData) {
305
+ Object.assign(this, rawData);
375
306
  }
376
- ImageMetaData.prototype.clone = function () {
307
+ clone() {
377
308
  return new ImageMetaData(this);
378
- };
379
- ImageMetaData.prototype.equals = function (other) {
309
+ }
310
+ equals(other) {
380
311
  return other != null &&
381
312
  equals(this.id, other.id) &&
382
313
  equals(this.width, other.width) &&
383
314
  equals(this.height, other.height) &&
384
315
  equals(this.isVector, other.isVector);
385
- };
386
- return ImageMetaData;
387
- }());
316
+ }
317
+ }
388
318
  ImageItem.ImageMetaData = ImageMetaData;
389
- var ImageItemValue = /** @class */ (function () {
390
- function ImageItemValue(name, value, transformedRectangle) {
319
+ class ImageItemValue {
320
+ constructor(name, value, transformedRectangle) {
391
321
  this.name = name;
392
322
  this.value = value;
393
323
  this.transformedRectangle = transformedRectangle;
394
324
  }
395
- ImageItemValue.prototype.clone = function () {
325
+ clone() {
396
326
  return new ImageItemValue(this.name, this.value.clone(), this.transformedRectangle.clone());
397
- };
398
- ImageItemValue.prototype.equals = function (other) {
327
+ }
328
+ equals(other) {
399
329
  return other != null &&
400
330
  equals(this.name, other.name) &&
401
331
  equals(this.value, other.value) &&
402
332
  equals(this.transformedRectangle, other.transformedRectangle);
403
- };
404
- return ImageItemValue;
405
- }());
333
+ }
334
+ }
406
335
  ImageItem.ImageItemValue = ImageItemValue;
407
- var ImageSourceType;
336
+ let ImageSourceType;
408
337
  (function (ImageSourceType) {
409
338
  ImageSourceType[ImageSourceType["None"] = 0] = "None";
410
339
  ImageSourceType[ImageSourceType["File"] = 1] = "File";
@@ -413,11 +342,8 @@ export { ImageItem };
413
342
  ImageSourceType[ImageSourceType["PublicImage"] = 5] = "PublicImage";
414
343
  ImageSourceType[ImageSourceType["UserImage"] = 6] = "UserImage";
415
344
  })(ImageSourceType = ImageItem.ImageSourceType || (ImageItem.ImageSourceType = {}));
416
- var ImageSource = /** @class */ (function () {
417
- function ImageSource(storageId, url, sourcePageIndex, actualSize, saveAspectRatio, origin) {
418
- if (sourcePageIndex === void 0) { sourcePageIndex = 0; }
419
- if (actualSize === void 0) { actualSize = false; }
420
- if (saveAspectRatio === void 0) { saveAspectRatio = true; }
345
+ class ImageSource {
346
+ constructor(storageId, url, sourcePageIndex = 0, actualSize = false, saveAspectRatio = true, origin) {
421
347
  this._storageId = null;
422
348
  this._url = null;
423
349
  this._type = ImageSourceType.None;
@@ -441,8 +367,8 @@ export { ImageItem };
441
367
  this._saveAspectRatio = saveAspectRatio;
442
368
  }
443
369
  }
444
- ImageSource.prototype.clone = function () {
445
- var clonedItem = new ImageSource();
370
+ clone() {
371
+ const clonedItem = new ImageSource();
446
372
  clonedItem.id = this.id;
447
373
  clonedItem.url = this.url;
448
374
  clonedItem._type = this._type;
@@ -456,8 +382,8 @@ export { ImageItem };
456
382
  clonedItem._dpiX = this._dpiX;
457
383
  clonedItem._dpiY = this._dpiY;
458
384
  return clonedItem;
459
- };
460
- ImageSource.prototype.equals = function (other) {
385
+ }
386
+ equals(other) {
461
387
  return equals(this.id, other.id) &&
462
388
  equals(this.url, other.url) &&
463
389
  equals(this._type, other._type) &&
@@ -469,158 +395,110 @@ export { ImageItem };
469
395
  JSON.stringify(other._origin) === JSON.stringify(this._origin) &&
470
396
  other._actualSize === this._actualSize &&
471
397
  other._saveAspectRatio === this._saveAspectRatio;
472
- };
473
- Object.defineProperty(ImageSource.prototype, "id", {
474
- get: function () {
475
- return this._storageId;
476
- },
477
- set: function (value) {
478
- if (this._storageId === value)
479
- return;
480
- this._storageId = value;
481
- this._propertyChanged.notify(this, "id");
482
- },
483
- enumerable: true,
484
- configurable: true
485
- });
486
- ImageSource.prototype.setIdWithOrigin = function (id, origin) {
398
+ }
399
+ get id() {
400
+ return this._storageId;
401
+ }
402
+ set id(value) {
403
+ if (this._storageId === value)
404
+ return;
405
+ this._storageId = value;
406
+ this._propertyChanged.notify(this, "id");
407
+ }
408
+ setIdWithOrigin(id, origin) {
487
409
  this.id = id;
488
410
  this._setOrigin(origin);
489
- };
490
- Object.defineProperty(ImageSource.prototype, "url", {
491
- get: function () {
492
- return this._url;
493
- },
494
- set: function (value) {
495
- if (this._url === value)
496
- return;
497
- this._url = value;
498
- this._propertyChanged.notify(this, "url");
499
- },
500
- enumerable: true,
501
- configurable: true
502
- });
503
- Object.defineProperty(ImageSource.prototype, "width", {
504
- get: function () {
505
- return this._width;
506
- },
507
- set: function (value) {
508
- if (this._width === value)
509
- return;
510
- this._width = value;
511
- this._propertyChanged.notify(this, "width");
512
- },
513
- enumerable: true,
514
- configurable: true
515
- });
516
- Object.defineProperty(ImageSource.prototype, "height", {
517
- get: function () {
518
- return this._height;
519
- },
520
- set: function (value) {
521
- if (this._height === value)
522
- return;
523
- this._height = value;
524
- this._propertyChanged.notify(this, "height");
525
- },
526
- enumerable: true,
527
- configurable: true
528
- });
529
- Object.defineProperty(ImageSource.prototype, "isVector", {
530
- get: function () {
531
- return this._isVector;
532
- },
533
- set: function (value) {
534
- if (this._isVector === value)
535
- return;
536
- this._isVector = value;
537
- this._propertyChanged.notify(this, "isVector");
538
- },
539
- enumerable: true,
540
- configurable: true
541
- });
542
- Object.defineProperty(ImageSource.prototype, "pageIndex", {
543
- get: function () {
544
- return this._pageIndex;
545
- },
546
- set: function (value) {
547
- if (value === this._pageIndex)
548
- return;
549
- this._pageIndex = value;
550
- this._propertyChanged.notify(this, "pageIndex");
551
- },
552
- enumerable: true,
553
- configurable: true
554
- });
555
- Object.defineProperty(ImageSource.prototype, "origin", {
556
- get: function () {
557
- return this._origin;
558
- },
559
- enumerable: true,
560
- configurable: true
561
- });
562
- ImageSource.prototype._setOrigin = function (value) {
411
+ }
412
+ get url() {
413
+ return this._url;
414
+ }
415
+ set url(value) {
416
+ if (this._url === value)
417
+ return;
418
+ this._url = value;
419
+ this._propertyChanged.notify(this, "url");
420
+ }
421
+ get width() {
422
+ return this._width;
423
+ }
424
+ set width(value) {
425
+ if (this._width === value)
426
+ return;
427
+ this._width = value;
428
+ this._propertyChanged.notify(this, "width");
429
+ }
430
+ get height() {
431
+ return this._height;
432
+ }
433
+ set height(value) {
434
+ if (this._height === value)
435
+ return;
436
+ this._height = value;
437
+ this._propertyChanged.notify(this, "height");
438
+ }
439
+ get isVector() {
440
+ return this._isVector;
441
+ }
442
+ set isVector(value) {
443
+ if (this._isVector === value)
444
+ return;
445
+ this._isVector = value;
446
+ this._propertyChanged.notify(this, "isVector");
447
+ }
448
+ get pageIndex() {
449
+ return this._pageIndex;
450
+ }
451
+ set pageIndex(value) {
452
+ if (value === this._pageIndex)
453
+ return;
454
+ this._pageIndex = value;
455
+ this._propertyChanged.notify(this, "pageIndex");
456
+ }
457
+ get origin() {
458
+ return this._origin;
459
+ }
460
+ _setOrigin(value) {
563
461
  if (value === this._origin)
564
462
  return;
565
463
  this._origin = value;
566
464
  this._propertyChanged.notify(this, "origin");
567
- };
568
- Object.defineProperty(ImageSource.prototype, "type", {
569
- get: function () {
570
- return this._type;
571
- },
572
- enumerable: true,
573
- configurable: true
574
- });
575
- Object.defineProperty(ImageSource.prototype, "actualSize", {
576
- get: function () {
577
- return this._actualSize;
578
- },
579
- set: function (value) {
580
- this._actualSize = value;
581
- },
582
- enumerable: true,
583
- configurable: true
584
- });
585
- Object.defineProperty(ImageSource.prototype, "saveAspectRatio", {
586
- get: function () {
587
- return this._saveAspectRatio;
588
- },
589
- set: function (value) {
590
- this._saveAspectRatio = value;
591
- },
592
- enumerable: true,
593
- configurable: true
594
- });
595
- Object.defineProperty(ImageSource.prototype, "dpiX", {
596
- get: function () {
597
- return this._dpiX;
598
- },
599
- set: function (dpi) {
600
- if (dpi > 0)
601
- this._dpiX = dpi;
602
- },
603
- enumerable: true,
604
- configurable: true
605
- });
606
- Object.defineProperty(ImageSource.prototype, "dpiY", {
607
- get: function () {
608
- return this._dpiY;
609
- },
610
- set: function (dpi) {
611
- if (dpi > 0)
612
- this._dpiY = dpi;
613
- },
614
- enumerable: true,
615
- configurable: true
616
- });
617
- ImageSource.prototype.addPropertyChanged = function (listener) {
465
+ }
466
+ get type() {
467
+ return this._type;
468
+ }
469
+ get actualSize() {
470
+ return this._actualSize;
471
+ }
472
+ set actualSize(value) {
473
+ this._actualSize = value;
474
+ }
475
+ get saveAspectRatio() {
476
+ return this._saveAspectRatio;
477
+ }
478
+ set saveAspectRatio(value) {
479
+ this._saveAspectRatio = value;
480
+ }
481
+ get dpiX() {
482
+ return this._dpiX;
483
+ }
484
+ set dpiX(dpi) {
485
+ if (dpi > 0)
486
+ this._dpiX = dpi;
487
+ }
488
+ get dpiY() {
489
+ return this._dpiY;
490
+ }
491
+ set dpiY(dpi) {
492
+ if (dpi > 0)
493
+ this._dpiY = dpi;
494
+ }
495
+ addPropertyChanged(listener) {
618
496
  this._propertyChanged.add(listener);
619
- };
620
- ImageSource.prototype.removePropertyChanged = function (listener) {
497
+ }
498
+ removePropertyChanged(listener) {
621
499
  this._propertyChanged.remove(listener);
622
- };
623
- ImageSource.prototype.toJSON = function () {
500
+ }
501
+ toJSON() {
624
502
  return {
625
503
  "id": this.id,
626
504
  "width": this.width,
@@ -632,28 +510,26 @@ export { ImageItem };
632
510
  "saveAspectRatio": this.saveAspectRatio,
633
511
  "origin": this.origin
634
512
  };
635
- };
636
- return ImageSource;
637
- }());
513
+ }
514
+ }
638
515
  ImageItem.ImageSource = ImageSource;
639
516
  (function (ImageSource) {
640
- var Origin = /** @class */ (function () {
641
- function Origin(rawData) {
642
- _.extend(this, rawData || {});
517
+ class Origin {
518
+ constructor(rawData) {
519
+ Object.assign(this, rawData || {});
643
520
  if (rawData != null && rawData["originalSize"] != null)
644
521
  this.originalSize = new Size(rawData["originalSize"]["width"], rawData["originalSize"]["height"]);
645
522
  }
646
- Origin.prototype.equals = function (other) {
523
+ equals(other) {
647
524
  return other == null &&
648
525
  equals(this.type, other.type) &&
649
526
  equals(this.data, other.data) &&
650
527
  equals(this.originalSize, other.originalSize);
651
- };
652
- Origin.prototype.clone = function () {
528
+ }
529
+ clone() {
653
530
  return new Origin(this);
654
- };
655
- return Origin;
656
- }());
531
+ }
532
+ }
657
533
  ImageSource.Origin = Origin;
658
534
  })(ImageSource = ImageItem.ImageSource || (ImageItem.ImageSource = {}));
659
535
  })(ImageItem || (ImageItem = {}));