@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,29 +1,4 @@
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
- var __assign = (this && this.__assign) || function () {
15
- __assign = Object.assign || function(t) {
16
- for (var s, i = 1, n = arguments.length; i < n; i++) {
17
- s = arguments[i];
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
19
- t[p] = s[p];
20
- }
21
- return t;
22
- };
23
- return __assign.apply(this, arguments);
24
- };
25
1
  import { ModelComponent } from "./ModelComponent";
26
- import * as _ from "underscore";
27
2
  import { Collection } from "../Collection";
28
3
  import { RenderingType } from "./RenderingType";
29
4
  import { ColorContainerVisualization, TextureContainerVisualization } from "./ContainerVisualization";
@@ -31,246 +6,192 @@ import { PrintingTechniqueConstraints } from "./Constraints/PrintingTechniqueCon
31
6
  import { ContainerConstraints } from "./Constraints/ContainerConstraints";
32
7
  import { Format } from "./Format";
33
8
  import { Dither } from "./Dither";
34
- var Container = /** @class */ (function (_super) {
35
- __extends(Container, _super);
36
- function Container(initialItems, name) {
37
- var _this = _super.call(this) || this;
38
- _this.type = Container.type;
39
- _this.parentComponent = null;
40
- _this._locked = false;
41
- _this._items = new Collection();
42
- _this._visible = true;
43
- _this._region = null;
44
- _this._onItemAdded = function (_a) {
45
- var newItem = _a.item;
46
- newItem.parentContainer = _this;
9
+ import { isString } from "../Utils/Utils";
10
+ export class Container extends ModelComponent {
11
+ get renderingType() {
12
+ return RenderingType.Normal;
13
+ }
14
+ constructor(initialItems, name) {
15
+ super();
16
+ this.type = Container.type;
17
+ this.parentComponent = null;
18
+ this._locked = false;
19
+ this._items = new Collection();
20
+ this._visible = true;
21
+ this._region = null;
22
+ this._onItemAdded = ({ item: newItem }) => {
23
+ newItem.parentContainer = this;
47
24
  };
48
- _this._onItemRemoved = function (_a) {
49
- var removedItem = _a.item;
50
- if (removedItem.parentContainer == _this)
25
+ this._onItemRemoved = ({ item: removedItem }) => {
26
+ if (removedItem.parentContainer == this)
51
27
  removedItem.parentContainer = null;
52
28
  };
53
- _this._onRegionChanged = function (sender, propName) {
29
+ this._onRegionChanged = (sender, propName) => {
54
30
  if (propName !== "left" && propName !== "top" && propName !== "width" && propName !== "height")
55
31
  return;
56
- _this._propertyChanged.notify(_this, "region");
32
+ this._propertyChanged.notify(this, "region");
57
33
  };
58
- _this.renderingGroupName = undefined;
59
- _this._items = new Collection();
60
- _this._items.add_itemAdded(_this._onItemAdded);
61
- _this._items.add_itemRemoved(_this._onItemRemoved);
34
+ this.renderingGroupName = undefined;
35
+ this._items = new Collection();
36
+ this._items.add_itemAdded(this._onItemAdded);
37
+ this._items.add_itemRemoved(this._onItemRemoved);
62
38
  if (initialItems != null)
63
- _this.items.setRange(initialItems);
39
+ this.items.setRange(initialItems);
64
40
  if (name != null)
65
- _this.name = name;
66
- return _this;
67
- }
68
- Object.defineProperty(Container.prototype, "renderingType", {
69
- get: function () {
70
- return RenderingType.Normal;
71
- },
72
- enumerable: true,
73
- configurable: true
74
- });
75
- Object.defineProperty(Container.prototype, "region", {
76
- get: function () {
77
- return this._region;
78
- },
79
- set: function (value) {
80
- if (this._region === value)
81
- return;
82
- if (this._region != null)
83
- this._region.removePropertyChanged(this._onRegionChanged);
84
- this._region = value;
85
- this._propertyChanged.notify(this, "region");
86
- if (this._region != null)
87
- this._region.addPropertyChanged(this._onRegionChanged);
88
- },
89
- enumerable: true,
90
- configurable: true
91
- });
92
- Object.defineProperty(Container.prototype, "items", {
93
- get: function () {
94
- return this._items;
95
- },
96
- enumerable: true,
97
- configurable: true
98
- });
99
- Object.defineProperty(Container.prototype, "visible", {
100
- get: function () {
101
- return this._visible;
102
- },
103
- set: function (value) {
104
- if (this._visible === value)
105
- return;
106
- this._visible = value;
107
- this._propertyChanged.notify(this, "visible");
108
- },
109
- enumerable: true,
110
- configurable: true
111
- });
112
- Object.defineProperty(Container.prototype, "locked", {
113
- get: function () {
114
- return this._locked;
115
- },
116
- set: function (value) {
117
- if (this._locked === value)
118
- return;
119
- this._locked = value;
120
- this._propertyChanged.notify(this, "locked");
121
- },
122
- enumerable: true,
123
- configurable: true
124
- });
125
- Container.prototype.getSimplifiedObject = function () {
126
- var simplified = _super.prototype.getSimplifiedObject.call(this, ["parentComponent", "version"]);
41
+ this.name = name;
42
+ }
43
+ get region() {
44
+ return this._region;
45
+ }
46
+ set region(value) {
47
+ if (this._region === value)
48
+ return;
49
+ if (this._region != null)
50
+ this._region.removePropertyChanged(this._onRegionChanged);
51
+ this._region = value;
52
+ this._propertyChanged.notify(this, "region");
53
+ if (this._region != null)
54
+ this._region.addPropertyChanged(this._onRegionChanged);
55
+ }
56
+ get items() {
57
+ return this._items;
58
+ }
59
+ get visible() {
60
+ return this._visible;
61
+ }
62
+ set visible(value) {
63
+ if (this._visible === value)
64
+ return;
65
+ this._visible = value;
66
+ this._propertyChanged.notify(this, "visible");
67
+ }
68
+ get locked() {
69
+ return this._locked;
70
+ }
71
+ set locked(value) {
72
+ if (this._locked === value)
73
+ return;
74
+ this._locked = value;
75
+ this._propertyChanged.notify(this, "locked");
76
+ }
77
+ getSimplifiedObject() {
78
+ var simplified = super.getSimplifiedObject(["parentComponent", "version"]);
127
79
  simplified["version"] = this.version;
128
80
  return simplified;
129
- };
130
- Container.prototype.generateNewIds = function () {
81
+ }
82
+ generateNewIds() {
131
83
  this._generateNewId();
132
- this._items.forEach(function (i) { return i.generateNewIds(); });
133
- };
134
- Container.prototype._copy = function (source, destination, generateNewIds) {
135
- _super.prototype._copy.call(this, source, destination, generateNewIds);
136
- destination.items.addRange(source.items.toArray().map(function (i) { return i.clone(generateNewIds); }));
84
+ this._items.forEach(i => i.generateNewIds());
85
+ }
86
+ _copy(source, destination, generateNewIds) {
87
+ super._copy(source, destination, generateNewIds);
88
+ destination.items.addRange(source.items.toArray().map(i => i.clone(generateNewIds)));
137
89
  destination.locked = source.locked;
138
90
  destination.visible = source.visible;
139
91
  destination.translationKey = source.translationKey;
140
92
  destination.renderingGroupName = source.renderingGroupName;
141
93
  destination.region = source.region != null ? source.region.clone() : null;
142
- };
143
- Container.prototype.clone = function (generateNewIds) {
144
- if (generateNewIds === void 0) { generateNewIds = false; }
145
- var container = new Container();
94
+ }
95
+ clone(generateNewIds = false) {
96
+ const container = new Container();
146
97
  this._copy(this, container, generateNewIds);
147
98
  return container;
148
- };
149
- Container.type = "Container";
150
- return Container;
151
- }(ModelComponent));
152
- export { Container };
153
- var MockupContainer = /** @class */ (function (_super) {
154
- __extends(MockupContainer, _super);
155
- function MockupContainer(initialItems, name) {
156
- var _this = _super.call(this, initialItems, name) || this;
157
- _this.noPrint = false;
158
- _this.noShow = false;
159
- _this.size = null;
160
- _this._locked = true;
161
- return _this;
162
- }
163
- MockupContainer.prototype._copy = function (source, destination, generateNewIds) {
164
- _super.prototype._copy.call(this, source, destination, generateNewIds);
99
+ }
100
+ }
101
+ Container.type = "Container";
102
+ export class MockupContainer extends Container {
103
+ constructor(initialItems, name) {
104
+ super(initialItems, name);
105
+ this.noPrint = false;
106
+ this.noShow = false;
107
+ this.size = null;
108
+ this._locked = true;
109
+ }
110
+ _copy(source, destination, generateNewIds) {
111
+ super._copy(source, destination, generateNewIds);
165
112
  destination.noPrint = source.noPrint;
166
113
  destination.noShow = source.noShow;
167
114
  destination.size = source.size != null ? source.size.clone() : null;
168
- };
169
- MockupContainer.prototype.clone = function (generateNewIds) {
170
- if (generateNewIds === void 0) { generateNewIds = false; }
171
- var container = new MockupContainer();
115
+ }
116
+ clone(generateNewIds = false) {
117
+ const container = new MockupContainer();
172
118
  this._copy(this, container, generateNewIds);
173
119
  return container;
174
- };
175
- return MockupContainer;
176
- }(Container));
177
- export { MockupContainer };
178
- var SurfaceContainer = /** @class */ (function (_super) {
179
- __extends(SurfaceContainer, _super);
180
- function SurfaceContainer(initialItems, name) {
181
- var _this = _super.call(this, initialItems, name) || this;
182
- _this.type = SurfaceContainer.type;
183
- _this._locked = false;
184
- _this.printingTechniqueConstraints = new PrintingTechniqueConstraints();
185
- _this.constraints = new ContainerConstraints();
186
- return _this;
187
- }
188
- SurfaceContainer.prototype._copy = function (source, destination, generateNewIds) {
189
- _super.prototype._copy.call(this, source, destination, generateNewIds);
120
+ }
121
+ }
122
+ export class SurfaceContainer extends Container {
123
+ constructor(initialItems, name) {
124
+ super(initialItems, name);
125
+ this.type = SurfaceContainer.type;
126
+ this._locked = false;
127
+ this.printingTechniqueConstraints = new PrintingTechniqueConstraints();
128
+ this.constraints = new ContainerConstraints();
129
+ }
130
+ _copy(source, destination, generateNewIds) {
131
+ super._copy(source, destination, generateNewIds);
190
132
  destination.printingTechniqueConstraints = source.printingTechniqueConstraints.clone(generateNewIds);
191
133
  destination.constraints = source.constraints != null ? source.constraints.clone() : null;
192
- };
193
- SurfaceContainer.prototype.clone = function (generateNewIds) {
194
- if (generateNewIds === void 0) { generateNewIds = false; }
195
- var container = new SurfaceContainer();
134
+ }
135
+ clone(generateNewIds = false) {
136
+ const container = new SurfaceContainer();
196
137
  this._copy(this, container, generateNewIds);
197
138
  return container;
198
- };
199
- SurfaceContainer.prototype.getSimplifiedObject = function () {
139
+ }
140
+ getSimplifiedObject() {
200
141
  var _a, _b, _c;
201
- var result = _super.prototype.getSimplifiedObject.call(this);
202
- return __assign(__assign({}, result), { printingTechniqueConstraints: this.printingTechniqueConstraints.toJSON(), constraints: (_c = (_b = (_a = this.constraints) === null || _a === void 0 ? void 0 : _a.toJSON) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : this.constraints });
203
- };
204
- SurfaceContainer.type = "SurfaceContainer";
205
- return SurfaceContainer;
206
- }(Container));
207
- export { SurfaceContainer };
208
- var ColorLessContainer = /** @class */ (function (_super) {
209
- __extends(ColorLessContainer, _super);
210
- function ColorLessContainer(initialItems, name) {
211
- var _this = _super.call(this, initialItems, name) || this;
212
- _this.type = ColorLessContainer.type;
213
- _this._format = Format.OneBit;
214
- _this._dither = Dither.Diffusion;
215
- _this._amount = 0.7;
216
- _this._locked = false;
217
- return _this;
218
- }
219
- Object.defineProperty(ColorLessContainer.prototype, "format", {
220
- get: function () {
221
- return this._format;
222
- },
223
- set: function (value) {
224
- if (this._format === value)
225
- return;
226
- this._format = value;
227
- this._propertyChanged.notify(this, "format");
228
- },
229
- enumerable: true,
230
- configurable: true
231
- });
232
- Object.defineProperty(ColorLessContainer.prototype, "dither", {
233
- get: function () {
234
- return this._dither;
235
- },
236
- set: function (value) {
237
- if (this._dither === value)
238
- return;
239
- this._dither = value;
240
- this._propertyChanged.notify(this, "dither");
241
- },
242
- enumerable: true,
243
- configurable: true
244
- });
245
- Object.defineProperty(ColorLessContainer.prototype, "amount", {
246
- get: function () {
247
- return this._amount;
248
- },
249
- set: function (value) {
250
- if (this._amount === value)
251
- return;
252
- this._amount = value;
253
- this._propertyChanged.notify(this, "amount");
254
- },
255
- enumerable: true,
256
- configurable: true
257
- });
258
- Object.defineProperty(ColorLessContainer.prototype, "renderingType", {
259
- get: function () {
260
- if (this.visualization === null)
261
- return null;
262
- if (this.visualization instanceof TextureContainerVisualization)
263
- return RenderingType.Solid;
264
- if (this.visualization instanceof ColorContainerVisualization)
265
- return RenderingType.Grayscale;
142
+ const result = super.getSimplifiedObject();
143
+ return Object.assign(Object.assign({}, result), { printingTechniqueConstraints: this.printingTechniqueConstraints.toJSON(), constraints: (_c = (_b = (_a = this.constraints) === null || _a === void 0 ? void 0 : _a.toJSON) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : this.constraints });
144
+ }
145
+ }
146
+ SurfaceContainer.type = "SurfaceContainer";
147
+ export class ColorLessContainer extends SurfaceContainer {
148
+ get format() {
149
+ return this._format;
150
+ }
151
+ set format(value) {
152
+ if (this._format === value)
153
+ return;
154
+ this._format = value;
155
+ this._propertyChanged.notify(this, "format");
156
+ }
157
+ get dither() {
158
+ return this._dither;
159
+ }
160
+ set dither(value) {
161
+ if (this._dither === value)
162
+ return;
163
+ this._dither = value;
164
+ this._propertyChanged.notify(this, "dither");
165
+ }
166
+ get amount() {
167
+ return this._amount;
168
+ }
169
+ set amount(value) {
170
+ if (this._amount === value)
171
+ return;
172
+ this._amount = value;
173
+ this._propertyChanged.notify(this, "amount");
174
+ }
175
+ get renderingType() {
176
+ if (this.visualization === null)
266
177
  return null;
267
- },
268
- enumerable: true,
269
- configurable: true
270
- });
271
- ColorLessContainer.prototype._copy = function (source, destination, generateNewIds) {
178
+ if (this.visualization instanceof TextureContainerVisualization)
179
+ return RenderingType.Solid;
180
+ if (this.visualization instanceof ColorContainerVisualization)
181
+ return RenderingType.Grayscale;
182
+ return null;
183
+ }
184
+ constructor(initialItems, name) {
185
+ super(initialItems, name);
186
+ this.type = ColorLessContainer.type;
187
+ this._format = Format.OneBit;
188
+ this._dither = Dither.Diffusion;
189
+ this._amount = 0.7;
190
+ this._locked = false;
191
+ }
192
+ _copy(source, destination, generateNewIds) {
272
193
  var _a, _b;
273
- _super.prototype._copy.call(this, source, destination, generateNewIds);
194
+ super._copy(source, destination, generateNewIds);
274
195
  destination.outputColor = (_a = source.outputColor) === null || _a === void 0 ? void 0 : _a.clone();
275
196
  destination.opaque = source.opaque;
276
197
  destination.dpi = source.dpi;
@@ -278,164 +199,123 @@ var ColorLessContainer = /** @class */ (function (_super) {
278
199
  destination.format = source.format;
279
200
  destination.dither = source.dither;
280
201
  destination.amount = source.amount;
281
- };
282
- ColorLessContainer.prototype.getSimplifiedObject = function () {
283
- var result = _super.prototype.getSimplifiedObject.call(this);
284
- return __assign(__assign({}, result), { outputColor: this.outputColor.getData(), opaque: this.opaque, dpi: this.dpi, visualization: this.visualization.toJSON(), format: this.format, dither: this.dither, amount: this.amount });
285
- };
286
- ColorLessContainer.prototype.clone = function (generateNewIds) {
287
- if (generateNewIds === void 0) { generateNewIds = false; }
288
- var container = new ColorLessContainer();
202
+ }
203
+ getSimplifiedObject() {
204
+ const result = super.getSimplifiedObject();
205
+ return Object.assign(Object.assign({}, result), { outputColor: this.outputColor.getData(), opaque: this.opaque, dpi: this.dpi, visualization: this.visualization.toJSON(), format: this.format, dither: this.dither, amount: this.amount });
206
+ }
207
+ clone(generateNewIds = false) {
208
+ const container = new ColorLessContainer();
289
209
  this._copy(this, container, generateNewIds);
290
210
  return container;
291
- };
292
- ColorLessContainer.type = "ColorLessContainer";
293
- return ColorLessContainer;
294
- }(SurfaceContainer));
295
- export { ColorLessContainer };
296
- var LimitedColorContainer = /** @class */ (function (_super) {
297
- __extends(LimitedColorContainer, _super);
298
- function LimitedColorContainer(initialItems, name) {
299
- var _this = _super.call(this, initialItems, name) || this;
300
- _this.type = LimitedColorContainer.type;
301
- _this._locked = false;
302
- return _this;
303
- }
304
- Object.defineProperty(LimitedColorContainer.prototype, "renderingType", {
305
- get: function () {
306
- return RenderingType.Normal;
307
- },
308
- enumerable: true,
309
- configurable: true
310
- });
311
- LimitedColorContainer.prototype._copy = function (source, destination, generateNewIds) {
312
- _super.prototype._copy.call(this, source, destination, generateNewIds);
211
+ }
212
+ }
213
+ ColorLessContainer.type = "ColorLessContainer";
214
+ export class LimitedColorContainer extends SurfaceContainer {
215
+ get renderingType() {
216
+ return RenderingType.Normal;
217
+ }
218
+ constructor(initialItems, name) {
219
+ super(initialItems, name);
220
+ this.type = LimitedColorContainer.type;
221
+ this._locked = false;
222
+ }
223
+ _copy(source, destination, generateNewIds) {
224
+ super._copy(source, destination, generateNewIds);
313
225
  destination.maxColorNumber = source.maxColorNumber;
314
226
  destination.paletteUId = source.paletteUId;
315
- };
316
- LimitedColorContainer.prototype.getSimplifiedObject = function () {
317
- var result = _super.prototype.getSimplifiedObject.call(this);
318
- return __assign(__assign({}, result), { maxColorNumber: this.maxColorNumber, paletteUId: this.paletteUId });
319
- };
320
- LimitedColorContainer.prototype.clone = function (generateNewIds) {
321
- if (generateNewIds === void 0) { generateNewIds = false; }
322
- var container = new LimitedColorContainer();
227
+ }
228
+ getSimplifiedObject() {
229
+ const result = super.getSimplifiedObject();
230
+ return Object.assign(Object.assign({}, result), { maxColorNumber: this.maxColorNumber, paletteUId: this.paletteUId });
231
+ }
232
+ clone(generateNewIds = false) {
233
+ const container = new LimitedColorContainer();
323
234
  this._copy(this, container, generateNewIds);
324
235
  return container;
325
- };
326
- LimitedColorContainer.type = "LimitedColorContainer";
327
- return LimitedColorContainer;
328
- }(SurfaceContainer));
329
- export { LimitedColorContainer };
330
- var FullColorContainer = /** @class */ (function (_super) {
331
- __extends(FullColorContainer, _super);
332
- function FullColorContainer(initialItems, name) {
333
- var _this = _super.call(this, initialItems, name) || this;
334
- _this.type = FullColorContainer.type;
335
- _this._locked = false;
336
- return _this;
337
- }
338
- Object.defineProperty(FullColorContainer.prototype, "renderingType", {
339
- get: function () {
340
- return RenderingType.Normal;
341
- },
342
- enumerable: true,
343
- configurable: true
344
- });
345
- FullColorContainer.prototype._copy = function (source, destination, generateNewIds) {
346
- _super.prototype._copy.call(this, source, destination, generateNewIds);
236
+ }
237
+ }
238
+ LimitedColorContainer.type = "LimitedColorContainer";
239
+ export class FullColorContainer extends SurfaceContainer {
240
+ get renderingType() {
241
+ return RenderingType.Normal;
242
+ }
243
+ constructor(initialItems, name) {
244
+ super(initialItems, name);
245
+ this.type = FullColorContainer.type;
246
+ this._locked = false;
247
+ }
248
+ _copy(source, destination, generateNewIds) {
249
+ super._copy(source, destination, generateNewIds);
347
250
  destination.colorSpace = source.colorSpace;
348
251
  destination.colorProfile = source.colorProfile;
349
- };
350
- FullColorContainer.prototype.getSimplifiedObject = function () {
351
- var result = _super.prototype.getSimplifiedObject.call(this);
352
- return __assign(__assign({}, result), { colorSpace: this.colorSpace, colorProfile: this.colorProfile });
353
- };
354
- FullColorContainer.prototype.clone = function (generateNewIds) {
355
- if (generateNewIds === void 0) { generateNewIds = false; }
356
- var container = new FullColorContainer();
252
+ }
253
+ getSimplifiedObject() {
254
+ const result = super.getSimplifiedObject();
255
+ return Object.assign(Object.assign({}, result), { colorSpace: this.colorSpace, colorProfile: this.colorProfile });
256
+ }
257
+ clone(generateNewIds = false) {
258
+ const container = new FullColorContainer();
357
259
  this._copy(this, container, generateNewIds);
358
260
  return container;
359
- };
360
- FullColorContainer.type = "FullColorContainer";
361
- return FullColorContainer;
362
- }(SurfaceContainer));
363
- export { FullColorContainer };
364
- var SpotColorContainer = /** @class */ (function (_super) {
365
- __extends(SpotColorContainer, _super);
366
- function SpotColorContainer() {
367
- var _this = _super.call(this) || this;
368
- _this.type = SpotColorContainer.type;
369
- return _this;
370
- }
371
- Object.defineProperty(SpotColorContainer.prototype, "renderingType", {
372
- get: function () {
373
- return RenderingType.Grayscale;
374
- },
375
- enumerable: true,
376
- configurable: true
377
- });
378
- SpotColorContainer.prototype._copy = function (source, destination, generateNewIds) {
261
+ }
262
+ }
263
+ FullColorContainer.type = "FullColorContainer";
264
+ export class SpotColorContainer extends SurfaceContainer {
265
+ get renderingType() {
266
+ return RenderingType.Grayscale;
267
+ }
268
+ constructor() {
269
+ super();
270
+ this.type = SpotColorContainer.type;
271
+ }
272
+ _copy(source, destination, generateNewIds) {
379
273
  var _a;
380
- _super.prototype._copy.call(this, source, destination, generateNewIds);
274
+ super._copy(source, destination, generateNewIds);
381
275
  destination.previewColor = source.previewColor;
382
276
  destination.outputColor = (_a = source.outputColor) === null || _a === void 0 ? void 0 : _a.clone();
383
- };
384
- SpotColorContainer.prototype.clone = function (generateNewIds) {
385
- if (generateNewIds === void 0) { generateNewIds = false; }
386
- var container = new SpotColorContainer();
277
+ }
278
+ clone(generateNewIds = false) {
279
+ const container = new SpotColorContainer();
387
280
  this._copy(this, container, generateNewIds);
388
281
  return container;
389
- };
390
- SpotColorContainer.type = "SpotColorContainer";
391
- return SpotColorContainer;
392
- }(SurfaceContainer));
393
- export { SpotColorContainer };
394
- var TextureContainer = /** @class */ (function (_super) {
395
- __extends(TextureContainer, _super);
396
- function TextureContainer() {
397
- var _this = _super.call(this) || this;
398
- _this.type = TextureContainer.type;
399
- return _this;
400
- }
401
- Object.defineProperty(TextureContainer.prototype, "renderingType", {
402
- get: function () {
403
- return RenderingType.Grayscale;
404
- },
405
- enumerable: true,
406
- configurable: true
407
- });
408
- Object.defineProperty(TextureContainer.prototype, "previewTextureSource", {
409
- get: function () {
410
- return this._previewTextureSource;
411
- },
412
- set: function (previewTextureSource) {
413
- if (previewTextureSource !== this._previewTextureSource) {
414
- this._previewTextureSource = previewTextureSource;
415
- this._propertyChanged.notify(this, "previewTextureSource");
416
- }
417
- },
418
- enumerable: true,
419
- configurable: true
420
- });
421
- TextureContainer.prototype._copy = function (source, destination, generateNewIds) {
282
+ }
283
+ }
284
+ SpotColorContainer.type = "SpotColorContainer";
285
+ export class TextureContainer extends SurfaceContainer {
286
+ constructor() {
287
+ super();
288
+ this.type = TextureContainer.type;
289
+ }
290
+ get renderingType() {
291
+ return RenderingType.Grayscale;
292
+ }
293
+ get previewTextureSource() {
294
+ return this._previewTextureSource;
295
+ }
296
+ set previewTextureSource(previewTextureSource) {
297
+ if (previewTextureSource !== this._previewTextureSource) {
298
+ this._previewTextureSource = previewTextureSource;
299
+ this._propertyChanged.notify(this, "previewTextureSource");
300
+ }
301
+ }
302
+ _copy(source, destination, generateNewIds) {
422
303
  var _a;
423
- _super.prototype._copy.call(this, source, destination, generateNewIds);
304
+ super._copy(source, destination, generateNewIds);
424
305
  destination.previewTextureSource = source.previewTextureSource != null ? source.previewTextureSource.clone() : null;
425
306
  destination.previewTextureName = source.previewTextureName;
426
307
  destination.outputColor = (_a = source.outputColor) === null || _a === void 0 ? void 0 : _a.clone();
427
308
  return destination;
428
- };
429
- TextureContainer.prototype.clone = function (generateNewIds) {
430
- if (generateNewIds === void 0) { generateNewIds = false; }
431
- var container = new TextureContainer();
309
+ }
310
+ clone(generateNewIds = false) {
311
+ const container = new TextureContainer();
432
312
  this._copy(this, container, generateNewIds);
433
313
  return container;
434
- };
435
- TextureContainer.prototype.getSimplifiedObject = function (omitProperties) {
436
- if (!_.isArray(omitProperties) && !_.isString(omitProperties))
314
+ }
315
+ getSimplifiedObject(omitProperties) {
316
+ if (!Array.isArray(omitProperties) && !isString(omitProperties))
437
317
  omitProperties = [];
438
- var simplified = _super.prototype.getSimplifiedObject.call(this);
318
+ const simplified = super.getSimplifiedObject();
439
319
  simplified["previewTextureSource"] = {
440
320
  "id": this.previewTextureSource.id,
441
321
  "width": this.previewTextureSource.width,
@@ -448,9 +328,7 @@ var TextureContainer = /** @class */ (function (_super) {
448
328
  "origin": this.previewTextureSource.origin,
449
329
  };
450
330
  return simplified;
451
- };
452
- TextureContainer.type = "TextureContainer";
453
- return TextureContainer;
454
- }(SurfaceContainer));
455
- export { TextureContainer };
331
+ }
332
+ }
333
+ TextureContainer.type = "TextureContainer";
456
334
  //# sourceMappingURL=Container.js.map