@aurigma/design-atoms-model 7.0.34 → 7.0.37

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 (330) 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 +149 -234
  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.d.ts +1 -0
  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.d.ts +1 -0
  134. package/Product/Effects/NDEffects.js +20 -27
  135. package/Product/Effects/NDEffects.js.map +1 -1
  136. package/Product/Effects/RecolorEffectParameters.d.ts +1 -0
  137. package/Product/Effects/RecolorEffectParameters.js +44 -89
  138. package/Product/Effects/RecolorEffectParameters.js.map +1 -1
  139. package/Product/IGetAllItemsOptions.js +1 -0
  140. package/Product/InteractiveZone.js +34 -66
  141. package/Product/InteractiveZone.js.map +1 -1
  142. package/Product/Interfaces/IColorWithTitle.js +1 -0
  143. package/Product/Interfaces/IDataSet.js +1 -0
  144. package/Product/Interfaces/IFontSettings.js +1 -0
  145. package/Product/Interfaces/IItemData.js +1 -0
  146. package/Product/Interfaces/IPdfMetadata.js +1 -0
  147. package/Product/Interfaces/IProductThemeConfig.js +1 -0
  148. package/Product/Interfaces/IShadowSettings.js +1 -0
  149. package/Product/Interfaces/IStrokeSettings.js +1 -0
  150. package/Product/Interfaces/index.js +3 -0
  151. package/Product/Interfaces/index.js.map +1 -1
  152. package/Product/ItemMask.js +20 -26
  153. package/Product/ItemMask.js.map +1 -1
  154. package/Product/Items/ArchedTextItem.js +65 -100
  155. package/Product/Items/ArchedTextItem.js.map +1 -1
  156. package/Product/Items/AutoScaledTextItem.js +35 -62
  157. package/Product/Items/AutoScaledTextItem.js.map +1 -1
  158. package/Product/Items/BarcodeData.d.ts +1 -1
  159. package/Product/Items/BarcodeData.js +62 -91
  160. package/Product/Items/BarcodeData.js.map +1 -1
  161. package/Product/Items/BarcodeItem.js +249 -298
  162. package/Product/Items/BarcodeItem.js.map +1 -1
  163. package/Product/Items/BarcodePermissions.js +38 -52
  164. package/Product/Items/BarcodePermissions.js.map +1 -1
  165. package/Product/Items/BaseItem.js +30 -53
  166. package/Product/Items/BaseItem.js.map +1 -1
  167. package/Product/Items/BaseTextItem.d.ts +2 -2
  168. package/Product/Items/BaseTextItem.js +451 -625
  169. package/Product/Items/BaseTextItem.js.map +1 -1
  170. package/Product/Items/BoundedTextItem.js +184 -255
  171. package/Product/Items/BoundedTextItem.js.map +1 -1
  172. package/Product/Items/ClipartItem.js +82 -175
  173. package/Product/Items/ClipartItem.js.map +1 -1
  174. package/Product/Items/ContentItem.js +52 -80
  175. package/Product/Items/ContentItem.js.map +1 -1
  176. package/Product/Items/ContentPermissions.js +36 -47
  177. package/Product/Items/ContentPermissions.js.map +1 -1
  178. package/Product/Items/CurvedTextItem.js +106 -158
  179. package/Product/Items/CurvedTextItem.js.map +1 -1
  180. package/Product/Items/DashedLineItem.js +45 -76
  181. package/Product/Items/DashedLineItem.js.map +1 -1
  182. package/Product/Items/EllipseItem.js +11 -31
  183. package/Product/Items/EllipseItem.js.map +1 -1
  184. package/Product/Items/FrontEndPermissions.js +20 -26
  185. package/Product/Items/FrontEndPermissions.js.map +1 -1
  186. package/Product/Items/GridItem.js +107 -162
  187. package/Product/Items/GridItem.js.map +1 -1
  188. package/Product/Items/GroupItem.js +95 -172
  189. package/Product/Items/GroupItem.js.map +1 -1
  190. package/Product/Items/GroupItemPermissions.js +42 -56
  191. package/Product/Items/GroupItemPermissions.js.map +1 -1
  192. package/Product/Items/ImageItem.d.ts +9 -4
  193. package/Product/Items/ImageItem.js +319 -430
  194. package/Product/Items/ImageItem.js.map +1 -1
  195. package/Product/Items/ImageMetaData.js +14 -15
  196. package/Product/Items/ImageMetaData.js.map +1 -1
  197. package/Product/Items/ImagePermissions.js +42 -56
  198. package/Product/Items/ImagePermissions.js.map +1 -1
  199. package/Product/Items/ImageViolationSettings.js +18 -35
  200. package/Product/Items/ImageViolationSettings.js.map +1 -1
  201. package/Product/Items/InStringPlaceholder.d.ts +2 -1
  202. package/Product/Items/InStringPlaceholder.js +52 -101
  203. package/Product/Items/InStringPlaceholder.js.map +1 -1
  204. package/Product/Items/Item.d.ts +1 -1
  205. package/Product/Items/Item.js +278 -370
  206. package/Product/Items/Item.js.map +1 -1
  207. package/Product/Items/ItemPermissions.js +54 -73
  208. package/Product/Items/ItemPermissions.js.map +1 -1
  209. package/Product/Items/ItemToolbarPermissions.js +61 -80
  210. package/Product/Items/ItemToolbarPermissions.js.map +1 -1
  211. package/Product/Items/LayoutItem.js +241 -326
  212. package/Product/Items/LayoutItem.js.map +1 -1
  213. package/Product/Items/LineItem.js +109 -156
  214. package/Product/Items/LineItem.js.map +1 -1
  215. package/Product/Items/LinePermissions.js +29 -39
  216. package/Product/Items/LinePermissions.js.map +1 -1
  217. package/Product/Items/ManipulationPermissions.d.ts +1 -1
  218. package/Product/Items/ManipulationPermissions.js +94 -135
  219. package/Product/Items/ManipulationPermissions.js.map +1 -1
  220. package/Product/Items/OpenTypeFeature.d.ts +1 -1
  221. package/Product/Items/OpenTypeFeature.js +3 -5
  222. package/Product/Items/OpenTypeFeature.js.map +1 -1
  223. package/Product/Items/OverlayEffect.js +56 -70
  224. package/Product/Items/OverlayEffect.js.map +1 -1
  225. package/Product/Items/ParagraphSettings.js +9 -11
  226. package/Product/Items/ParagraphSettings.js.map +1 -1
  227. package/Product/Items/PathBoundedTextItem.js +116 -166
  228. package/Product/Items/PathBoundedTextItem.js.map +1 -1
  229. package/Product/Items/PathBoundedTextPermissions.js +20 -26
  230. package/Product/Items/PathBoundedTextPermissions.js.map +1 -1
  231. package/Product/Items/PlaceholderItem.d.ts +1 -1
  232. package/Product/Items/PlaceholderItem.js +310 -419
  233. package/Product/Items/PlaceholderItem.js.map +1 -1
  234. package/Product/Items/PlaceholderPermissions.js +38 -47
  235. package/Product/Items/PlaceholderPermissions.js.map +1 -1
  236. package/Product/Items/PlainTextItem.js +45 -74
  237. package/Product/Items/PlainTextItem.js.map +1 -1
  238. package/Product/Items/PolylineItem.js +51 -81
  239. package/Product/Items/PolylineItem.js.map +1 -1
  240. package/Product/Items/RectangleItem.js +10 -30
  241. package/Product/Items/RectangleItem.js.map +1 -1
  242. package/Product/Items/ResizeGripsPermissions.d.ts +5 -4
  243. package/Product/Items/ResizeGripsPermissions.js +75 -94
  244. package/Product/Items/ResizeGripsPermissions.js.map +1 -1
  245. package/Product/Items/ShadowSettings.js +51 -69
  246. package/Product/Items/ShadowSettings.js.map +1 -1
  247. package/Product/Items/ShapeItem.js +182 -250
  248. package/Product/Items/ShapeItem.js.map +1 -1
  249. package/Product/Items/ShapePermissions.js +38 -52
  250. package/Product/Items/ShapePermissions.js.map +1 -1
  251. package/Product/Items/ShapeViolationSettings.js +18 -36
  252. package/Product/Items/ShapeViolationSettings.js.map +1 -1
  253. package/Product/Items/Size.js +7 -11
  254. package/Product/Items/Size.js.map +1 -1
  255. package/Product/Items/SmartItem.js +21 -41
  256. package/Product/Items/SmartItem.js.map +1 -1
  257. package/Product/Items/StrokeSettings.js +48 -62
  258. package/Product/Items/StrokeSettings.js.map +1 -1
  259. package/Product/Items/TextEnums.d.ts +2 -1
  260. package/Product/Items/TextEnums.js +1 -0
  261. package/Product/Items/TextEnums.js.map +1 -1
  262. package/Product/Items/TextPermissions.js +56 -58
  263. package/Product/Items/TextPermissions.js.map +1 -1
  264. package/Product/Items/TextViolationSettings.js +23 -40
  265. package/Product/Items/TextViolationSettings.js.map +1 -1
  266. package/Product/Items/ThemeBinding.d.ts +2 -1
  267. package/Product/Items/ThemeBinding.js +13 -15
  268. package/Product/Items/ThemeBinding.js.map +1 -1
  269. package/Product/Items/ViolationSettings.js +26 -44
  270. package/Product/Items/ViolationSettings.js.map +1 -1
  271. package/Product/Items/VisualizationPermissions.js +29 -39
  272. package/Product/Items/VisualizationPermissions.js.map +1 -1
  273. package/Product/ItemsData/ItemData.js +8 -24
  274. package/Product/ItemsData/ItemData.js.map +1 -1
  275. package/Product/ModelComponent.js +41 -63
  276. package/Product/ModelComponent.js.map +1 -1
  277. package/Product/PrintArea.d.ts +1 -0
  278. package/Product/PrintArea.js +132 -178
  279. package/Product/PrintArea.js.map +1 -1
  280. package/Product/Product.js +67 -105
  281. package/Product/Product.js.map +1 -1
  282. package/Product/SafetyLine.d.ts +1 -1
  283. package/Product/SafetyLine.js +90 -124
  284. package/Product/SafetyLine.js.map +1 -1
  285. package/Product/Surface.d.ts +2 -1
  286. package/Product/Surface.js +193 -287
  287. package/Product/Surface.js.map +1 -1
  288. package/Product/SurfaceMockup.js +40 -73
  289. package/Product/SurfaceMockup.js.map +1 -1
  290. package/Product/Uuid.js +19 -25
  291. package/Product/Uuid.js.map +1 -1
  292. package/Product/Watermark.js +5 -9
  293. package/Product/Watermark.js.map +1 -1
  294. package/Product/index.js +1 -0
  295. package/Product/index.js.map +1 -1
  296. package/Serialization/IProductSerializer.js +1 -0
  297. package/Utils/Environment.d.ts +1 -1
  298. package/Utils/Environment.js +24 -44
  299. package/Utils/Environment.js.map +1 -1
  300. package/Utils/Exceptions.js +5 -5
  301. package/Utils/Exceptions.js.map +1 -1
  302. package/Utils/Items.js +19 -19
  303. package/Utils/Items.js.map +1 -1
  304. package/Utils/Types/Action.d.ts +5 -1
  305. package/Utils/Types/Action.js +1 -0
  306. package/Utils/Types/AnyFunction.d.ts +1 -1
  307. package/Utils/Types/AnyFunction.js +1 -0
  308. package/Utils/Types/Func.d.ts +1 -1
  309. package/Utils/Types/Func.js +1 -0
  310. package/Utils/Types/index.js +3 -0
  311. package/Utils/Types/index.js.map +1 -1
  312. package/Utils/Utils.d.ts +14 -5
  313. package/Utils/Utils.js +185 -298
  314. package/Utils/Utils.js.map +1 -1
  315. package/Utils/debounce.d.ts +29 -0
  316. package/Utils/debounce.js +106 -0
  317. package/Utils/debounce.js.map +1 -0
  318. package/Utils/index.d.ts +2 -0
  319. package/Utils/index.js +3 -0
  320. package/Utils/index.js.map +1 -1
  321. package/Utils/throttle.d.ts +16 -0
  322. package/Utils/throttle.js +25 -0
  323. package/Utils/throttle.js.map +1 -0
  324. package/Validators/CmykComponentValidator.js +13 -15
  325. package/Validators/CmykComponentValidator.js.map +1 -1
  326. package/Version.d.ts +1 -1
  327. package/Version.js +1 -1
  328. package/Version.js.map +1 -1
  329. package/package.json +3 -8
  330. 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,26 +7,6 @@ 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 __read = (this && this.__read) || function (o, n) {
24
- var m = typeof Symbol === "function" && o[Symbol.iterator];
25
- if (!m) return o;
26
- var i = m.call(o), r, ar = [], e;
27
- try {
28
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
29
- }
30
- catch (error) { e = { error: error }; }
31
- finally {
32
- try {
33
- if (r && !r.done && (m = i["return"])) m.call(i);
34
- }
35
- finally { if (e) throw e.error; }
36
- }
37
- return ar;
38
- };
39
- var __spread = (this && this.__spread) || function () {
40
- for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
41
- return ar;
42
- };
43
10
  import { ShapeItem } from "./ShapeItem";
44
11
  import { ImageItem } from "./ImageItem";
45
12
  import { ImageMetaData } from "./ImageMetaData";
@@ -51,7 +18,8 @@ import { RectangleF } from "../../Math/RectangleF";
51
18
  import { Path } from "../../Math/Path";
52
19
  import { ArgumentException } from "../../Exception";
53
20
  import { BarcodeFormat } from "./BarcodeFormat";
54
- import { equals, arrayEquals } from "../../Utils/Utils";
21
+ import { equals } from "../../Utils/Utils";
22
+ import { arraysIsEqual } from "@aurigma/utils-js/algorithms/array";
55
23
  import { OverlayEffect } from "./OverlayEffect";
56
24
  import { Property } from "../Decorators/Property";
57
25
  import { BlendMode } from "./BlendMode";
@@ -79,164 +47,138 @@ export var ResizeMode;
79
47
  ResizeMode[ResizeMode["Fill"] = 1] = "Fill";
80
48
  ResizeMode[ResizeMode["Original"] = 2] = "Original";
81
49
  })(ResizeMode || (ResizeMode = {}));
82
- var PlaceholderItem = /** @class */ (function (_super) {
83
- __extends(PlaceholderItem, _super);
50
+ export class PlaceholderItem extends ShapeItem {
84
51
  //TODO: return ctor signature constructor(sourcePath?: VectorObjects.Math.Path) after fix 0021990
85
- function PlaceholderItem(sourceRec) {
86
- var _this = _super.call(this, sourceRec != null ? Path.rectangle(sourceRec.left, sourceRec.top, sourceRec.width, sourceRec.height) : null) || this;
87
- _this._isStubContent = false;
88
- _this._isCoverMode = false;
89
- _this._contentResizeMode = ResizeMode.Fill;
90
- _this._contentEffect = ImageEffect.None;
91
- _this._contentFillColor = null;
92
- _this._contentOverlayEffect = null;
93
- _this.stubStorageMeta = null;
94
- _this.linkId = null;
95
- _this.allowedSubfolder = null;
96
- _this.allowedTabs = null;
97
- _this.contentVerticalAlignment = VerticalContentAlignment.None;
98
- _this.contentHorizontalAlignment = HorizontalContentAlignment.None;
99
- _this.type = PlaceholderItem.type;
100
- _this._content = null;
101
- _this._topFrames = [];
102
- _this._bottomFrames = [];
103
- _this._onContentOverlayEffectPropertyChanged = function (s, p) {
104
- _this._propertyChanged.notify(_this, "contentOverlayEffect");
52
+ constructor(sourceRec) {
53
+ super(sourceRec != null ? Path.rectangle(sourceRec.left, sourceRec.top, sourceRec.width, sourceRec.height) : null);
54
+ this._isStubContent = false;
55
+ this._isCoverMode = false;
56
+ this._contentResizeMode = ResizeMode.Fill;
57
+ this._contentEffect = ImageEffect.None;
58
+ this._contentFillColor = null;
59
+ this._contentOverlayEffect = null;
60
+ this.stubStorageMeta = null;
61
+ this.linkId = null;
62
+ this.allowedSubfolder = null;
63
+ this.allowedTabs = null;
64
+ this.contentVerticalAlignment = VerticalContentAlignment.None;
65
+ this.contentHorizontalAlignment = HorizontalContentAlignment.None;
66
+ this.type = PlaceholderItem.type;
67
+ this._content = null;
68
+ this._topFrames = [];
69
+ this._bottomFrames = [];
70
+ this._onContentOverlayEffectPropertyChanged = (s, p) => {
71
+ this._propertyChanged.notify(this, "contentOverlayEffect");
105
72
  };
106
- _this.fixedStubContentSize = false;
107
- _this.sourceRectangle = sourceRec != null ? sourceRec : new RectangleF(0, 0, 10, 10);
73
+ this.fixedStubContentSize = false;
74
+ this.sourceRectangle = sourceRec != null ? sourceRec : new RectangleF(0, 0, 10, 10);
108
75
  ;
109
- _this.fillColor = RgbColors.transparent;
110
- _this.borderWidth = 0;
111
- _this.placeholderPermissions = new PlaceholderPermissions();
112
- _this._contentPermissions = new ContentPermissions();
113
- _this._contentPermissions.propertyChanged.add(_this._onPermissionsChanged);
114
- _this._setViolationSettings(new ImageViolationSettings(), true);
115
- _this._ignorePermissionsChange = true;
116
- _this.manipulationPermissions.resizeGrips = new ResizeGripsPermissions(true, true, false);
117
- _this.shapePermissions.allowChangeFillColor = false;
118
- _this.itemPermissions.allowRemoveOnLayoutChange = true;
119
- _this.itemPermissions.itemToolbarPermissions.showEditButton = true;
120
- _this.itemPermissions.itemToolbarPermissions.showSelectButtonConstraint = null;
121
- _this.itemPermissions.itemToolbarPermissions.showSelectButton = true;
122
- _this.contentPermissions.imagePermissions.allowKeepOverlayColor = false;
123
- _this._ignorePermissionsChange = false;
124
- return _this;
125
- }
126
- Object.defineProperty(PlaceholderItem.prototype, "contentEffect", {
127
- get: function () {
128
- return this._contentEffect;
129
- },
130
- set: function (value) {
131
- if (this._contentEffect === value)
132
- return;
133
- this._contentEffect = value;
134
- this._propertyChanged.notify(this, "contentEffect");
135
- },
136
- enumerable: true,
137
- configurable: true
138
- });
139
- Object.defineProperty(PlaceholderItem.prototype, "contentFillColor", {
140
- get: function () {
141
- return this._contentFillColor;
142
- },
143
- set: function (value) {
144
- if (this._contentFillColor === value)
145
- return;
146
- this._contentFillColor = value;
147
- this._propertyChanged.notify(this, "contentFillColor");
148
- },
149
- enumerable: true,
150
- configurable: true
151
- });
152
- Object.defineProperty(PlaceholderItem.prototype, "isStubContent", {
153
- get: function () {
154
- return this._isStubContent;
155
- },
156
- set: function (value) {
157
- if (this._isStubContent === value)
158
- return;
159
- this._isStubContent = value;
160
- this._setStubStorageMeta();
161
- this.applyPermissionsConstrain();
162
- this._propertyChanged.notify(this, "isStubContent");
163
- },
164
- enumerable: true,
165
- configurable: true
166
- });
167
- Object.defineProperty(PlaceholderItem.prototype, "contentResizeMode", {
168
- get: function () {
169
- if (this.isCoverMode)
170
- return ResizeMode.Fill;
171
- if (this.isBarcodePlaceholder)
172
- return ResizeMode.Fit;
173
- return this._contentResizeMode;
174
- },
175
- set: function (value) {
176
- if (this._contentResizeMode === value)
177
- return;
178
- this._contentResizeMode = value;
179
- this._propertyChanged.notify(this, "contentResizeMode");
180
- },
181
- enumerable: true,
182
- configurable: true
183
- });
184
- Object.defineProperty(PlaceholderItem.prototype, "contentOverlayEffect", {
185
- get: function () {
186
- return this._contentOverlayEffect;
187
- },
188
- set: function (value) {
189
- if (OverlayEffect.equals(this.contentOverlayEffect, value))
190
- return;
191
- this._unsubscribeContentOverlayEffectPropertyChanged();
192
- this._contentOverlayEffect = value;
193
- this._subscribeContentOverlayEffectPropertyChanged();
194
- this._propertyChanged.notify(this, "contentOverlayEffect");
195
- },
196
- enumerable: true,
197
- configurable: true
198
- });
199
- PlaceholderItem.prototype._subscribeContentOverlayEffectPropertyChanged = function () {
76
+ this.fillColor = RgbColors.transparent;
77
+ this.borderWidth = 0;
78
+ this.placeholderPermissions = new PlaceholderPermissions();
79
+ this._contentPermissions = new ContentPermissions();
80
+ this._contentPermissions.propertyChanged.add(this._onPermissionsChanged);
81
+ this._setViolationSettings(new ImageViolationSettings(), true);
82
+ this._ignorePermissionsChange = true;
83
+ this.manipulationPermissions.resizeGrips = new ResizeGripsPermissions(true, true, false);
84
+ this.shapePermissions.allowChangeFillColor = false;
85
+ this.itemPermissions.allowRemoveOnLayoutChange = true;
86
+ this.itemPermissions.itemToolbarPermissions.showEditButton = true;
87
+ this.itemPermissions.itemToolbarPermissions.showSelectButtonConstraint = null;
88
+ this.itemPermissions.itemToolbarPermissions.showSelectButton = true;
89
+ this.contentPermissions.imagePermissions.allowKeepOverlayColor = false;
90
+ this._ignorePermissionsChange = false;
91
+ }
92
+ get contentEffect() {
93
+ return this._contentEffect;
94
+ }
95
+ set contentEffect(value) {
96
+ if (this._contentEffect === value)
97
+ return;
98
+ this._contentEffect = value;
99
+ this._propertyChanged.notify(this, "contentEffect");
100
+ }
101
+ get contentFillColor() {
102
+ return this._contentFillColor;
103
+ }
104
+ set contentFillColor(value) {
105
+ if (this._contentFillColor === value)
106
+ return;
107
+ this._contentFillColor = value;
108
+ this._propertyChanged.notify(this, "contentFillColor");
109
+ }
110
+ get isStubContent() {
111
+ return this._isStubContent;
112
+ }
113
+ set isStubContent(value) {
114
+ if (this._isStubContent === value)
115
+ return;
116
+ this._isStubContent = value;
117
+ this._setStubStorageMeta();
118
+ this.applyPermissionsConstrain();
119
+ this._propertyChanged.notify(this, "isStubContent");
120
+ }
121
+ get contentResizeMode() {
122
+ if (this.isCoverMode)
123
+ return ResizeMode.Fill;
124
+ if (this.isBarcodePlaceholder)
125
+ return ResizeMode.Fit;
126
+ return this._contentResizeMode;
127
+ }
128
+ set contentResizeMode(value) {
129
+ if (this._contentResizeMode === value)
130
+ return;
131
+ this._contentResizeMode = value;
132
+ this._propertyChanged.notify(this, "contentResizeMode");
133
+ }
134
+ get contentOverlayEffect() {
135
+ return this._contentOverlayEffect;
136
+ }
137
+ set contentOverlayEffect(value) {
138
+ if (OverlayEffect.equals(this.contentOverlayEffect, value))
139
+ return;
140
+ this._unsubscribeContentOverlayEffectPropertyChanged();
141
+ this._contentOverlayEffect = value;
142
+ this._subscribeContentOverlayEffectPropertyChanged();
143
+ this._propertyChanged.notify(this, "contentOverlayEffect");
144
+ }
145
+ _subscribeContentOverlayEffectPropertyChanged() {
200
146
  if (this.contentOverlayEffect != null)
201
147
  this.contentOverlayEffect.addPropertyChanged(this._onContentOverlayEffectPropertyChanged);
202
- };
203
- PlaceholderItem.prototype._unsubscribeContentOverlayEffectPropertyChanged = function () {
148
+ }
149
+ _unsubscribeContentOverlayEffectPropertyChanged() {
204
150
  if (this.contentOverlayEffect != null)
205
151
  this.contentOverlayEffect.removePropertyChanged(this._onContentOverlayEffectPropertyChanged);
206
- };
207
- Object.defineProperty(PlaceholderItem.prototype, "isCoverMode", {
208
- //Cover mode - the mode in which you can't place/move the content of placeholder so that empty space remains inside of the placeholder.
209
- //Important!!! In this mode, you can't rotate the content. This is important because the algorithms in SelectionHandler.js are based on the fact
210
- //that the placeholder and its content in this mode always have the same rotation angle and only a proportional resize of the content is allowed.
211
- get: function () {
212
- return this.barcodeFormat == null
213
- && this._isCoverMode;
214
- },
215
- set: function (value) {
216
- if (this._isCoverMode === value)
217
- return;
218
- this._isCoverMode = value;
219
- if (!this.isEmptyContent) {
220
- this.content.applyPermissionsConstrain();
221
- }
222
- this._propertyChanged.notify(this, "isCoverMode");
223
- },
224
- enumerable: true,
225
- configurable: true
226
- });
227
- PlaceholderItem.prototype.getImagePermissions = function () {
152
+ }
153
+ //Cover mode - the mode in which you can't place/move the content of placeholder so that empty space remains inside of the placeholder.
154
+ //Important!!! In this mode, you can't rotate the content. This is important because the algorithms in SelectionHandler.js are based on the fact
155
+ //that the placeholder and its content in this mode always have the same rotation angle and only a proportional resize of the content is allowed.
156
+ get isCoverMode() {
157
+ return this.barcodeFormat == null
158
+ && this._isCoverMode;
159
+ }
160
+ set isCoverMode(value) {
161
+ if (this._isCoverMode === value)
162
+ return;
163
+ this._isCoverMode = value;
164
+ if (!this.isEmptyContent) {
165
+ this.content.applyPermissionsConstrain();
166
+ }
167
+ this._propertyChanged.notify(this, "isCoverMode");
168
+ }
169
+ getImagePermissions() {
228
170
  if (this.contentPermissions != null)
229
171
  return this.contentPermissions.imagePermissions;
230
172
  if (this.content instanceof ImageItem)
231
173
  return this.content.imagePermissions;
232
174
  return null;
233
- };
234
- PlaceholderItem.prototype.applyPermissionsConstrain = function () {
235
- var itemTlbrPerms = this.itemPermissions.itemToolbarPermissions;
236
- var imagePermissions = this.getImagePermissions();
237
- var allowChangeImage = imagePermissions != null ? imagePermissions.allowChangeImage : true;
238
- var allowEditImage = imagePermissions != null ? imagePermissions.allowEditImage : false;
239
- var isVector = this.content != null && this.content instanceof ImageItem && this.content.source != null && this.content.source.isVector;
175
+ }
176
+ applyPermissionsConstrain() {
177
+ const itemTlbrPerms = this.itemPermissions.itemToolbarPermissions;
178
+ const imagePermissions = this.getImagePermissions();
179
+ const allowChangeImage = imagePermissions != null ? imagePermissions.allowChangeImage : true;
180
+ const allowEditImage = imagePermissions != null ? imagePermissions.allowEditImage : false;
181
+ const isVector = this.content != null && this.content instanceof ImageItem && this.content.source != null && this.content.source.isVector;
240
182
  if (this.isStubOrEmpty || !allowEditImage || isVector) {
241
183
  itemTlbrPerms.showEditButtonConstraint = false;
242
184
  }
@@ -277,87 +219,66 @@ var PlaceholderItem = /** @class */ (function (_super) {
277
219
  }
278
220
  }
279
221
  }
280
- };
281
- Object.defineProperty(PlaceholderItem.prototype, "contentPermissions", {
282
- get: function () {
283
- return this._contentPermissions;
284
- },
285
- set: function (value) {
286
- if (value == null) {
287
- throw new ArgumentException("ContentPermissions cannot be null");
288
- }
289
- if (equals(this._contentPermissions, value))
290
- return;
291
- this._contentPermissions.propertyChanged.remove(this._onPermissionsChanged);
292
- this._contentPermissions = value;
293
- this._contentPermissions.propertyChanged.add(this._onPermissionsChanged);
294
- this._onPermissionsChanged();
295
- },
296
- enumerable: true,
297
- configurable: true
298
- });
299
- Object.defineProperty(PlaceholderItem.prototype, "placeholderPermissions", {
300
- get: function () {
301
- return this._placeholderPermissions;
302
- },
303
- set: function (value) {
304
- if (value == null)
305
- throw new ArgumentException("placeholderPermissions cannot be null");
306
- if (equals(this._placeholderPermissions, value))
307
- return;
308
- if (this._placeholderPermissions != null)
309
- this._placeholderPermissions.propertyChanged.remove(this._onPermissionsChanged);
310
- this._placeholderPermissions = value;
311
- this.applyPermissionsConstrain();
312
- this._placeholderPermissions.propertyChanged.add(this._onPermissionsChanged);
313
- this._propertyChanged.notify(this, "placeholderPermissions");
314
- },
315
- enumerable: true,
316
- configurable: true
317
- });
318
- Object.defineProperty(PlaceholderItem.prototype, "violationSettings", {
319
- get: function () {
320
- return this._violationSettings;
321
- },
322
- set: function (value) {
323
- this._setViolationSettings(value);
324
- },
325
- enumerable: true,
326
- configurable: true
327
- });
328
- PlaceholderItem.prototype._setViolationSettings = function (value, skipTypeCheck) {
329
- if (skipTypeCheck === void 0) { skipTypeCheck = false; }
222
+ }
223
+ get contentPermissions() {
224
+ return this._contentPermissions;
225
+ }
226
+ set contentPermissions(value) {
227
+ if (value == null) {
228
+ throw new ArgumentException("ContentPermissions cannot be null");
229
+ }
230
+ if (equals(this._contentPermissions, value))
231
+ return;
232
+ this._contentPermissions.propertyChanged.remove(this._onPermissionsChanged);
233
+ this._contentPermissions = value;
234
+ this._contentPermissions.propertyChanged.add(this._onPermissionsChanged);
235
+ this._onPermissionsChanged();
236
+ }
237
+ get placeholderPermissions() {
238
+ return this._placeholderPermissions;
239
+ }
240
+ set placeholderPermissions(value) {
241
+ if (value == null)
242
+ throw new ArgumentException("placeholderPermissions cannot be null");
243
+ if (equals(this._placeholderPermissions, value))
244
+ return;
245
+ if (this._placeholderPermissions != null)
246
+ this._placeholderPermissions.propertyChanged.remove(this._onPermissionsChanged);
247
+ this._placeholderPermissions = value;
248
+ this.applyPermissionsConstrain();
249
+ this._placeholderPermissions.propertyChanged.add(this._onPermissionsChanged);
250
+ this._propertyChanged.notify(this, "placeholderPermissions");
251
+ }
252
+ get violationSettings() {
253
+ return this._violationSettings;
254
+ }
255
+ set violationSettings(value) {
256
+ this._setViolationSettings(value);
257
+ }
258
+ _setViolationSettings(value, skipTypeCheck = false) {
330
259
  if (!skipTypeCheck && !(value instanceof ImageViolationSettings))
331
260
  throw new ArgumentException("Shape ViolationSettings property must has ImageViolationSettings type!");
332
- _super.prototype._setViolationSettings.call(this, value, skipTypeCheck);
333
- };
334
- Object.defineProperty(PlaceholderItem.prototype, "isFrame", {
335
- get: function () {
336
- return (this._topFrames != null && this._topFrames.length > 0)
337
- || (this._bottomFrames != null && this._bottomFrames.length > 0);
338
- },
339
- enumerable: true,
340
- configurable: true
341
- });
342
- Object.defineProperty(PlaceholderItem.prototype, "content", {
343
- get: function () {
344
- return this._content;
345
- },
346
- set: function (value) {
347
- this._content = value;
348
- if (!this.isEmptyContent) {
349
- this._content.parentPlaceholder = this;
350
- this._content.parentContainer = null;
351
- this._content.applyPermissionsConstrain();
352
- }
353
- this.applyPermissionsConstrain();
354
- this._setStubStorageMeta();
355
- this._propertyChanged.notify(this, "content");
356
- },
357
- enumerable: true,
358
- configurable: true
359
- });
360
- PlaceholderItem.prototype._setStubStorageMeta = function () {
261
+ super._setViolationSettings(value, skipTypeCheck);
262
+ }
263
+ get isFrame() {
264
+ return (this._topFrames != null && this._topFrames.length > 0)
265
+ || (this._bottomFrames != null && this._bottomFrames.length > 0);
266
+ }
267
+ get content() {
268
+ return this._content;
269
+ }
270
+ set content(value) {
271
+ this._content = value;
272
+ if (!this.isEmptyContent) {
273
+ this._content.parentPlaceholder = this;
274
+ this._content.parentContainer = null;
275
+ this._content.applyPermissionsConstrain();
276
+ }
277
+ this.applyPermissionsConstrain();
278
+ this._setStubStorageMeta();
279
+ this._propertyChanged.notify(this, "content");
280
+ }
281
+ _setStubStorageMeta() {
361
282
  if (this.isStubContent && this._content instanceof ImageItem) {
362
283
  this.stubStorageMeta = new ImageMetaData({
363
284
  isUserImage: this._content.isUserImage,
@@ -371,94 +292,68 @@ var PlaceholderItem = /** @class */ (function (_super) {
371
292
  else {
372
293
  this.stubStorageMeta = null;
373
294
  }
374
- };
295
+ }
375
296
  ;
376
- Object.defineProperty(PlaceholderItem.prototype, "topFrames", {
377
- get: function () {
378
- return this._topFrames;
379
- },
380
- set: function (value) {
381
- var _this = this;
382
- if (value == null)
383
- throw new ArgumentException();
384
- this._topFrames = value;
385
- this._topFrames.forEach(function (contentItem) {
386
- contentItem.parentPlaceholder = _this;
387
- contentItem.parentContainer = null;
388
- });
389
- },
390
- enumerable: true,
391
- configurable: true
392
- });
393
- Object.defineProperty(PlaceholderItem.prototype, "bottomFrames", {
394
- get: function () {
395
- return this._bottomFrames;
396
- },
397
- set: function (value) {
398
- var _this = this;
399
- if (value == null)
400
- throw new ArgumentException();
401
- this._bottomFrames = value;
402
- this._bottomFrames.forEach(function (contentItem) {
403
- contentItem.parentPlaceholder = _this;
404
- contentItem.parentContainer = null;
405
- });
406
- },
407
- enumerable: true,
408
- configurable: true
409
- });
410
- PlaceholderItem.prototype.updateContentAndFrames = function (func) {
297
+ get topFrames() {
298
+ return this._topFrames;
299
+ }
300
+ set topFrames(value) {
301
+ if (value == null)
302
+ throw new ArgumentException();
303
+ this._topFrames = value;
304
+ this._topFrames.forEach((contentItem) => {
305
+ contentItem.parentPlaceholder = this;
306
+ contentItem.parentContainer = null;
307
+ });
308
+ }
309
+ get bottomFrames() {
310
+ return this._bottomFrames;
311
+ }
312
+ set bottomFrames(value) {
313
+ if (value == null)
314
+ throw new ArgumentException();
315
+ this._bottomFrames = value;
316
+ this._bottomFrames.forEach((contentItem) => {
317
+ contentItem.parentPlaceholder = this;
318
+ contentItem.parentContainer = null;
319
+ });
320
+ }
321
+ updateContentAndFrames(func) {
411
322
  if (this.content != null)
412
323
  func(this.content);
413
324
  if (this.topFrames != null) {
414
- this.topFrames.forEach(function (contentItem) {
325
+ this.topFrames.forEach(contentItem => {
415
326
  func(contentItem);
416
327
  });
417
328
  }
418
329
  if (this.bottomFrames != null) {
419
- this.bottomFrames.forEach(function (contentItem) {
330
+ this.bottomFrames.forEach(contentItem => {
420
331
  func(contentItem);
421
332
  });
422
333
  }
423
- };
424
- Object.defineProperty(PlaceholderItem.prototype, "imageContent", {
425
- get: function () {
426
- if (!this.isEmptyContent && this.content instanceof ImageItem) {
427
- return this._content;
428
- }
429
- else {
430
- return null;
431
- }
432
- },
433
- enumerable: true,
434
- configurable: true
435
- });
436
- Object.defineProperty(PlaceholderItem.prototype, "isEmptyContent", {
437
- get: function () {
438
- return this._content == null;
439
- },
440
- enumerable: true,
441
- configurable: true
442
- });
443
- Object.defineProperty(PlaceholderItem.prototype, "isStubOrEmpty", {
444
- get: function () {
445
- return this.isStubContent || this.isEmptyContent;
446
- },
447
- enumerable: true,
448
- configurable: true
449
- });
450
- PlaceholderItem.prototype._canSetIsVariable = function () {
334
+ }
335
+ get imageContent() {
336
+ if (!this.isEmptyContent && this.content instanceof ImageItem) {
337
+ return this._content;
338
+ }
339
+ else {
340
+ return null;
341
+ }
342
+ }
343
+ get isEmptyContent() {
344
+ return this._content == null;
345
+ }
346
+ get isStubOrEmpty() {
347
+ return this.isStubContent || this.isEmptyContent;
348
+ }
349
+ _canSetIsVariable() {
451
350
  return true;
452
- };
453
- Object.defineProperty(PlaceholderItem.prototype, "isBarcodePlaceholder", {
454
- get: function () {
455
- return this.barcodeFormat != null;
456
- },
457
- enumerable: true,
458
- configurable: true
459
- });
460
- PlaceholderItem.prototype.getSimplifiedObject = function () {
461
- var simplified = _super.prototype.getSimplifiedObject.call(this, [
351
+ }
352
+ get isBarcodePlaceholder() {
353
+ return this.barcodeFormat != null;
354
+ }
355
+ getSimplifiedObject() {
356
+ const simplified = super.getSimplifiedObject([
462
357
  "_content",
463
358
  "imageContent",
464
359
  "placeholderPermissions",
@@ -472,12 +367,12 @@ var PlaceholderItem = /** @class */ (function (_super) {
472
367
  simplified["placeholderPermissions"] = this.placeholderPermissions.getSimplifiedObject();
473
368
  simplified["contentPermissions"] = this.contentPermissions.getSimplifiedObject();
474
369
  return simplified;
475
- };
476
- PlaceholderItem.prototype._copy = function (source, destination, generateNewIds, appropriateParentContainer) {
477
- _super.prototype._copy.call(this, source, destination, generateNewIds, appropriateParentContainer);
370
+ }
371
+ _copy(source, destination, generateNewIds, appropriateParentContainer) {
372
+ super._copy(source, destination, generateNewIds, appropriateParentContainer);
478
373
  destination.linkId = source.linkId;
479
374
  destination.allowedSubfolder = source.allowedSubfolder;
480
- destination.allowedTabs = source.allowedTabs != null ? source.allowedTabs.map(function (i) { return i; }) : null;
375
+ destination.allowedTabs = source.allowedTabs != null ? source.allowedTabs.map(i => i) : null;
481
376
  destination.contentVerticalAlignment = source.contentVerticalAlignment;
482
377
  destination.contentHorizontalAlignment = source.contentHorizontalAlignment;
483
378
  destination.placeholderPermissions = source.placeholderPermissions.clone();
@@ -491,27 +386,27 @@ var PlaceholderItem = /** @class */ (function (_super) {
491
386
  else
492
387
  destination.content = null;
493
388
  if (source.topFrames.length === destination.topFrames.length) {
494
- for (var i = 0; i < source.topFrames.length; i++) {
389
+ for (let i = 0; i < source.topFrames.length; i++) {
495
390
  destination.topFrames[i].update(source.topFrames[i]);
496
391
  destination.topFrames[i].parentPlaceholder = destination;
497
392
  }
498
393
  }
499
394
  else {
500
- destination.topFrames = source.topFrames.map(function (i) {
501
- var cloned = i.clone(generateNewIds, appropriateParentContainer);
395
+ destination.topFrames = source.topFrames.map(i => {
396
+ const cloned = i.clone(generateNewIds, appropriateParentContainer);
502
397
  cloned.parentPlaceholder = destination;
503
398
  return cloned;
504
399
  });
505
400
  }
506
401
  if (source.bottomFrames.length === destination.bottomFrames.length) {
507
- for (var i = 0; i < source.bottomFrames.length; i++) {
402
+ for (let i = 0; i < source.bottomFrames.length; i++) {
508
403
  destination.bottomFrames[i].update(source.bottomFrames[i]);
509
404
  destination.bottomFrames[i].parentPlaceholder = destination;
510
405
  }
511
406
  }
512
407
  else {
513
- destination.bottomFrames = source.bottomFrames.map(function (i) {
514
- var cloned = i.clone(generateNewIds, appropriateParentContainer);
408
+ destination.bottomFrames = source.bottomFrames.map(i => {
409
+ const cloned = i.clone(generateNewIds, appropriateParentContainer);
515
410
  cloned.parentPlaceholder = destination;
516
411
  return cloned;
517
412
  });
@@ -526,13 +421,13 @@ var PlaceholderItem = /** @class */ (function (_super) {
526
421
  destination.barcodeFormat = source.barcodeFormat;
527
422
  destination.contentPermissions = source.contentPermissions.clone();
528
423
  destination.isVariable = source.isVariable;
529
- };
530
- PlaceholderItem.prototype.equals = function (other) {
531
- return _super.prototype.equals.call(this, other) &&
532
- arrayEquals(__spread([this._content], this._topFrames, this._bottomFrames), __spread([other._content], other._topFrames, other._bottomFrames)) &&
424
+ }
425
+ equals(other) {
426
+ return super.equals(other) &&
427
+ arraysIsEqual([this._content, ...this._topFrames, ...this._bottomFrames], [other._content, ...other._topFrames, ...other._bottomFrames], equals) &&
533
428
  equals(this.linkId, other.linkId) &&
534
429
  equals(this.allowedSubfolder, other.allowedSubfolder) &&
535
- arrayEquals(this.allowedTabs, other.allowedTabs) &&
430
+ arraysIsEqual(this.allowedTabs, other.allowedTabs) &&
536
431
  equals(this.contentVerticalAlignment, other.contentVerticalAlignment) &&
537
432
  equals(this.contentHorizontalAlignment, other.contentHorizontalAlignment) &&
538
433
  equals(this._placeholderPermissions, other._placeholderPermissions) &&
@@ -544,76 +439,72 @@ var PlaceholderItem = /** @class */ (function (_super) {
544
439
  equals(this.barcodeFormat, other.barcodeFormat) &&
545
440
  equals(this._contentPermissions, other._contentPermissions) &&
546
441
  equals(this.isVariable, other.isVariable);
547
- };
548
- PlaceholderItem.prototype.clone = function (generateNewIds, appropriateParentContainer) {
549
- if (generateNewIds === void 0) { generateNewIds = false; }
550
- if (appropriateParentContainer === void 0) { appropriateParentContainer = false; }
551
- var item = new PlaceholderItem();
442
+ }
443
+ clone(generateNewIds = false, appropriateParentContainer = false) {
444
+ const item = new PlaceholderItem();
552
445
  this._copy(this, item, generateNewIds, appropriateParentContainer);
553
446
  return item;
554
- };
555
- PlaceholderItem.type = "PlaceholderItem";
556
- __decorate([
557
- Property({ factory: new ObjectPropertyFactory(ImageMetaData), displayName: "Stub storage meta" }),
558
- __metadata("design:type", ImageMetaData)
559
- ], PlaceholderItem.prototype, "stubStorageMeta", void 0);
560
- __decorate([
561
- Property({ type: "string" }),
562
- __metadata("design:type", String)
563
- ], PlaceholderItem.prototype, "linkId", void 0);
564
- __decorate([
565
- Property({ factory: new SimplePropertyFactory("subfolder"), displayName: "Allowed subfolder" }),
566
- __metadata("design:type", String)
567
- ], PlaceholderItem.prototype, "allowedSubfolder", void 0);
568
- __decorate([
569
- Property({ factory: new CollectionPropertyFactory(Array), displayName: "Allowed tabs" }),
570
- __metadata("design:type", Array)
571
- ], PlaceholderItem.prototype, "allowedTabs", void 0);
572
- __decorate([
573
- Property({ enumObject: VerticalContentAlignment }),
574
- __metadata("design:type", Object)
575
- ], PlaceholderItem.prototype, "contentVerticalAlignment", void 0);
576
- __decorate([
577
- Property({ enumObject: HorizontalContentAlignment }),
578
- __metadata("design:type", Object)
579
- ], PlaceholderItem.prototype, "contentHorizontalAlignment", void 0);
580
- __decorate([
581
- Property({ enumObject: ImageEffect }),
582
- __metadata("design:type", Number),
583
- __metadata("design:paramtypes", [Number])
584
- ], PlaceholderItem.prototype, "contentEffect", null);
585
- __decorate([
586
- Property({ factory: new ColorPropertyFactory(), displayName: "Content fill color" }),
587
- __metadata("design:type", Color),
588
- __metadata("design:paramtypes", [Color])
589
- ], PlaceholderItem.prototype, "contentFillColor", null);
590
- __decorate([
591
- Property({ enumObject: ResizeMode }),
592
- __metadata("design:type", Object),
593
- __metadata("design:paramtypes", [Object])
594
- ], PlaceholderItem.prototype, "contentResizeMode", null);
595
- __decorate([
596
- Property({ enumObject: BarcodeFormat, factory: new SimplePropertyFactory(BarcodeFormat.QR_CODE), displayName: "Barcode format" }),
597
- __metadata("design:type", String)
598
- ], PlaceholderItem.prototype, "barcodeFormat", void 0);
599
- __decorate([
600
- Property({
601
- factory: new ObjectPropertyFactory(OverlayEffect, {
602
- color: new CmykColor(0, 0, 0, 0, 255),
603
- opacity: 1,
604
- blendMode: BlendMode.Normal
605
- }),
606
- displayName: "Content overlay effect"
447
+ }
448
+ }
449
+ PlaceholderItem.type = "PlaceholderItem";
450
+ __decorate([
451
+ Property({ factory: new ObjectPropertyFactory(ImageMetaData), displayName: "Stub storage meta" }),
452
+ __metadata("design:type", ImageMetaData)
453
+ ], PlaceholderItem.prototype, "stubStorageMeta", void 0);
454
+ __decorate([
455
+ Property({ type: "string" }),
456
+ __metadata("design:type", String)
457
+ ], PlaceholderItem.prototype, "linkId", void 0);
458
+ __decorate([
459
+ Property({ factory: new SimplePropertyFactory("subfolder"), displayName: "Allowed subfolder" }),
460
+ __metadata("design:type", String)
461
+ ], PlaceholderItem.prototype, "allowedSubfolder", void 0);
462
+ __decorate([
463
+ Property({ factory: new CollectionPropertyFactory(Array), displayName: "Allowed tabs" }),
464
+ __metadata("design:type", Array)
465
+ ], PlaceholderItem.prototype, "allowedTabs", void 0);
466
+ __decorate([
467
+ Property({ enumObject: VerticalContentAlignment }),
468
+ __metadata("design:type", Object)
469
+ ], PlaceholderItem.prototype, "contentVerticalAlignment", void 0);
470
+ __decorate([
471
+ Property({ enumObject: HorizontalContentAlignment }),
472
+ __metadata("design:type", Object)
473
+ ], PlaceholderItem.prototype, "contentHorizontalAlignment", void 0);
474
+ __decorate([
475
+ Property({ enumObject: ImageEffect }),
476
+ __metadata("design:type", Number),
477
+ __metadata("design:paramtypes", [Number])
478
+ ], PlaceholderItem.prototype, "contentEffect", null);
479
+ __decorate([
480
+ Property({ factory: new ColorPropertyFactory(), displayName: "Content fill color" }),
481
+ __metadata("design:type", Color),
482
+ __metadata("design:paramtypes", [Color])
483
+ ], PlaceholderItem.prototype, "contentFillColor", null);
484
+ __decorate([
485
+ Property({ enumObject: ResizeMode }),
486
+ __metadata("design:type", Object),
487
+ __metadata("design:paramtypes", [Object])
488
+ ], PlaceholderItem.prototype, "contentResizeMode", null);
489
+ __decorate([
490
+ Property({ enumObject: BarcodeFormat, factory: new SimplePropertyFactory(BarcodeFormat.QR_CODE), displayName: "Barcode format" }),
491
+ __metadata("design:type", String)
492
+ ], PlaceholderItem.prototype, "barcodeFormat", void 0);
493
+ __decorate([
494
+ Property({
495
+ factory: new ObjectPropertyFactory(OverlayEffect, {
496
+ color: new CmykColor(0, 0, 0, 0, 255),
497
+ opacity: 1,
498
+ blendMode: BlendMode.Normal
607
499
  }),
608
- __metadata("design:type", Object),
609
- __metadata("design:paramtypes", [Object])
610
- ], PlaceholderItem.prototype, "contentOverlayEffect", null);
611
- __decorate([
612
- Property({ type: "item" }),
613
- __metadata("design:type", Object),
614
- __metadata("design:paramtypes", [Object])
615
- ], PlaceholderItem.prototype, "content", null);
616
- return PlaceholderItem;
617
- }(ShapeItem));
618
- export { PlaceholderItem };
500
+ displayName: "Content overlay effect"
501
+ }),
502
+ __metadata("design:type", Object),
503
+ __metadata("design:paramtypes", [Object])
504
+ ], PlaceholderItem.prototype, "contentOverlayEffect", null);
505
+ __decorate([
506
+ Property({ type: "item" }),
507
+ __metadata("design:type", Object),
508
+ __metadata("design:paramtypes", [Object])
509
+ ], PlaceholderItem.prototype, "content", null);
619
510
  //# sourceMappingURL=PlaceholderItem.js.map