@aurigma/design-atoms-model 7.0.33 → 7.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/Collection.js +271 -514
  2. package/Collection.js.map +1 -1
  3. package/Colors/CmykColor.js +35 -69
  4. package/Colors/CmykColor.js.map +1 -1
  5. package/Colors/Color.js +11 -19
  6. package/Colors/Color.js.map +1 -1
  7. package/Colors/GrayscaleColor.js +23 -45
  8. package/Colors/GrayscaleColor.js.map +1 -1
  9. package/Colors/HsbColor.js +67 -85
  10. package/Colors/HsbColor.js.map +1 -1
  11. package/Colors/Ink.js +20 -35
  12. package/Colors/Ink.js.map +1 -1
  13. package/Colors/LabColor.js +29 -59
  14. package/Colors/LabColor.js.map +1 -1
  15. package/Colors/Palette.js +2 -21
  16. package/Colors/Palette.js.map +1 -1
  17. package/Colors/ProcessColor.js +24 -54
  18. package/Colors/ProcessColor.js.map +1 -1
  19. package/Colors/RgbColor.js +31 -61
  20. package/Colors/RgbColor.js.map +1 -1
  21. package/Colors/RgbColors.js +22 -54
  22. package/Colors/RgbColors.js.map +1 -1
  23. package/Colors/SpotColor.js +34 -68
  24. package/Colors/SpotColor.js.map +1 -1
  25. package/Colors/Swatch.js +16 -40
  26. package/Colors/Swatch.js.map +1 -1
  27. package/Colors/ValidationUtils.js +3 -5
  28. package/Colors/ValidationUtils.js.map +1 -1
  29. package/ColorsOld/CmykColor.js +54 -80
  30. package/ColorsOld/CmykColor.js.map +1 -1
  31. package/ColorsOld/Color.d.ts +1 -1
  32. package/ColorsOld/Color.js +25 -34
  33. package/ColorsOld/Color.js.map +1 -1
  34. package/ColorsOld/ColorFactory.js +30 -40
  35. package/ColorsOld/ColorFactory.js.map +1 -1
  36. package/ColorsOld/GrayscaleColor.js +29 -54
  37. package/ColorsOld/GrayscaleColor.js.map +1 -1
  38. package/ColorsOld/HsbColor.js +29 -35
  39. package/ColorsOld/HsbColor.js.map +1 -1
  40. package/ColorsOld/LabColor.js +35 -56
  41. package/ColorsOld/LabColor.js.map +1 -1
  42. package/ColorsOld/RgbColor.js +73 -114
  43. package/ColorsOld/RgbColor.js.map +1 -1
  44. package/ColorsOld/SpotColor.js +32 -53
  45. package/ColorsOld/SpotColor.js.map +1 -1
  46. package/ColorsOld/Utils.js +9 -13
  47. package/ColorsOld/Utils.js.map +1 -1
  48. package/Configuration/IRenderingConfig.js +1 -0
  49. package/Configuration/WatermarkConfig.js +17 -33
  50. package/Configuration/WatermarkConfig.js.map +1 -1
  51. package/Configuration/index.js +1 -0
  52. package/Configuration/index.js.map +1 -1
  53. package/Configuration.js +7 -11
  54. package/Configuration.js.map +1 -1
  55. package/EquatableKeyDictionary.js +43 -127
  56. package/EquatableKeyDictionary.js.map +1 -1
  57. package/EventObject.js +59 -136
  58. package/EventObject.js.map +1 -1
  59. package/Exception.d.ts +1 -1
  60. package/Exception.js +47 -88
  61. package/Exception.js.map +1 -1
  62. package/INotifyPropertyChanged.d.ts +1 -1
  63. package/INotifyPropertyChanged.js +1 -0
  64. package/Math/Array.js +3 -3
  65. package/Math/Array.js.map +1 -1
  66. package/Math/Common.js +13 -15
  67. package/Math/Common.js.map +1 -1
  68. package/Math/ILtrb.js +1 -0
  69. package/Math/IPoint.js +1 -0
  70. package/Math/ISize.js +1 -0
  71. package/Math/Margin.js +62 -99
  72. package/Math/Margin.js.map +1 -1
  73. package/Math/Matrix.js +63 -94
  74. package/Math/Matrix.js.map +1 -1
  75. package/Math/Path.d.ts +2 -0
  76. package/Math/Path.js +231 -142
  77. package/Math/Path.js.map +1 -1
  78. package/Math/PointF.js +31 -34
  79. package/Math/PointF.js.map +1 -1
  80. package/Math/RectangleF.js +119 -159
  81. package/Math/RectangleF.js.map +1 -1
  82. package/Math/RotatedRectangleF.js +132 -147
  83. package/Math/RotatedRectangleF.js.map +1 -1
  84. package/Math/SizeF.js +10 -12
  85. package/Math/SizeF.js.map +1 -1
  86. package/Math/Transform.js +50 -80
  87. package/Math/Transform.js.map +1 -1
  88. package/Math/index.js +3 -0
  89. package/Math/index.js.map +1 -1
  90. package/Product/Constraints/ContainerConstraints.d.ts +13 -0
  91. package/Product/Constraints/ContainerConstraints.js +22 -0
  92. package/Product/Constraints/ContainerConstraints.js.map +1 -0
  93. package/Product/Constraints/MaxArtworkSizeConstraints.d.ts +13 -0
  94. package/Product/Constraints/MaxArtworkSizeConstraints.js +25 -0
  95. package/Product/Constraints/MaxArtworkSizeConstraints.js.map +1 -0
  96. package/Product/Constraints/PrintingTechniqueConstraints.js +10 -13
  97. package/Product/Constraints/PrintingTechniqueConstraints.js.map +1 -1
  98. package/Product/Container.d.ts +48 -10
  99. package/Product/Container.js +257 -373
  100. package/Product/Container.js.map +1 -1
  101. package/Product/ContainerVisualization.js +31 -56
  102. package/Product/ContainerVisualization.js.map +1 -1
  103. package/Product/Convert/CornerRadiusConverter.js +32 -34
  104. package/Product/Convert/CornerRadiusConverter.js.map +1 -1
  105. package/Product/CropMark.js +28 -40
  106. package/Product/CropMark.js.map +1 -1
  107. package/Product/Decorators/Factory/AbstractFactory.js +13 -23
  108. package/Product/Decorators/Factory/AbstractFactory.js.map +1 -1
  109. package/Product/Decorators/Factory/CollectionFactory.js +10 -45
  110. package/Product/Decorators/Factory/CollectionFactory.js.map +1 -1
  111. package/Product/Decorators/Factory/ColorFactory.js +13 -35
  112. package/Product/Decorators/Factory/ColorFactory.js.map +1 -1
  113. package/Product/Decorators/Factory/ObjectFactory.js +10 -45
  114. package/Product/Decorators/Factory/ObjectFactory.js.map +1 -1
  115. package/Product/Decorators/Factory/SimpleFactory.js +11 -21
  116. package/Product/Decorators/Factory/SimpleFactory.js.map +1 -1
  117. package/Product/Decorators/Interfaces/IInputPropertyMetadata.d.ts +1 -1
  118. package/Product/Decorators/Interfaces/IInputPropertyMetadata.js +1 -0
  119. package/Product/Decorators/Interfaces/IObjectMetadata.js +1 -0
  120. package/Product/Decorators/Interfaces/IPropertyMetadata.js +1 -0
  121. package/Product/Decorators/ItemsMetadata.js +11 -13
  122. package/Product/Decorators/ItemsMetadata.js.map +1 -1
  123. package/Product/Decorators/Property.js +4 -4
  124. package/Product/Decorators/Property.js.map +1 -1
  125. package/Product/Decorators/PropertyChanged.js +1 -1
  126. package/Product/Decorators/PropertyChanged.js.map +1 -1
  127. package/Product/Decorators/index.js +1 -0
  128. package/Product/Decorators/index.js.map +1 -1
  129. package/Product/Effects/ColorDictionaryEntry.js +3 -5
  130. package/Product/Effects/ColorDictionaryEntry.js.map +1 -1
  131. package/Product/Effects/NDEffectParameters.js +2 -6
  132. package/Product/Effects/NDEffectParameters.js.map +1 -1
  133. package/Product/Effects/NDEffects.js +20 -27
  134. package/Product/Effects/NDEffects.js.map +1 -1
  135. package/Product/Effects/RecolorEffectParameters.js +44 -89
  136. package/Product/Effects/RecolorEffectParameters.js.map +1 -1
  137. package/Product/IGetAllItemsOptions.js +1 -0
  138. package/Product/InteractiveZone.js +34 -66
  139. package/Product/InteractiveZone.js.map +1 -1
  140. package/Product/Interfaces/IColorWithTitle.js +1 -0
  141. package/Product/Interfaces/IDataSet.js +1 -0
  142. package/Product/Interfaces/IFontSettings.js +1 -0
  143. package/Product/Interfaces/IItemData.js +1 -0
  144. package/Product/Interfaces/IPdfMetadata.js +1 -0
  145. package/Product/Interfaces/IProductThemeConfig.js +1 -0
  146. package/Product/Interfaces/IShadowSettings.js +1 -0
  147. package/Product/Interfaces/IStrokeSettings.js +1 -0
  148. package/Product/Interfaces/index.js +3 -0
  149. package/Product/Interfaces/index.js.map +1 -1
  150. package/Product/ItemMask.js +20 -26
  151. package/Product/ItemMask.js.map +1 -1
  152. package/Product/Items/ArchedTextItem.js +65 -100
  153. package/Product/Items/ArchedTextItem.js.map +1 -1
  154. package/Product/Items/AutoScaledTextItem.js +35 -62
  155. package/Product/Items/AutoScaledTextItem.js.map +1 -1
  156. package/Product/Items/BarcodeData.d.ts +2 -1
  157. package/Product/Items/BarcodeData.js +77 -90
  158. package/Product/Items/BarcodeData.js.map +1 -1
  159. package/Product/Items/BarcodeItem.js +249 -298
  160. package/Product/Items/BarcodeItem.js.map +1 -1
  161. package/Product/Items/BarcodePermissions.js +38 -52
  162. package/Product/Items/BarcodePermissions.js.map +1 -1
  163. package/Product/Items/BaseItem.js +30 -53
  164. package/Product/Items/BaseItem.js.map +1 -1
  165. package/Product/Items/BaseTextItem.d.ts +2 -2
  166. package/Product/Items/BaseTextItem.js +447 -621
  167. package/Product/Items/BaseTextItem.js.map +1 -1
  168. package/Product/Items/BoundedTextItem.js +184 -255
  169. package/Product/Items/BoundedTextItem.js.map +1 -1
  170. package/Product/Items/ClipartItem.js +82 -175
  171. package/Product/Items/ClipartItem.js.map +1 -1
  172. package/Product/Items/ContentItem.js +52 -80
  173. package/Product/Items/ContentItem.js.map +1 -1
  174. package/Product/Items/ContentPermissions.js +36 -47
  175. package/Product/Items/ContentPermissions.js.map +1 -1
  176. package/Product/Items/CurvedTextItem.js +106 -158
  177. package/Product/Items/CurvedTextItem.js.map +1 -1
  178. package/Product/Items/DashedLineItem.js +45 -76
  179. package/Product/Items/DashedLineItem.js.map +1 -1
  180. package/Product/Items/EllipseItem.js +11 -31
  181. package/Product/Items/EllipseItem.js.map +1 -1
  182. package/Product/Items/FrontEndPermissions.js +20 -26
  183. package/Product/Items/FrontEndPermissions.js.map +1 -1
  184. package/Product/Items/GridItem.js +107 -162
  185. package/Product/Items/GridItem.js.map +1 -1
  186. package/Product/Items/GroupItem.js +93 -171
  187. package/Product/Items/GroupItem.js.map +1 -1
  188. package/Product/Items/GroupItemPermissions.js +42 -56
  189. package/Product/Items/GroupItemPermissions.js.map +1 -1
  190. package/Product/Items/ImageItem.js +304 -428
  191. package/Product/Items/ImageItem.js.map +1 -1
  192. package/Product/Items/ImageMetaData.js +14 -15
  193. package/Product/Items/ImageMetaData.js.map +1 -1
  194. package/Product/Items/ImagePermissions.js +42 -56
  195. package/Product/Items/ImagePermissions.js.map +1 -1
  196. package/Product/Items/ImageViolationSettings.js +18 -35
  197. package/Product/Items/ImageViolationSettings.js.map +1 -1
  198. package/Product/Items/InStringPlaceholder.js +50 -100
  199. package/Product/Items/InStringPlaceholder.js.map +1 -1
  200. package/Product/Items/Item.d.ts +1 -1
  201. package/Product/Items/Item.js +278 -370
  202. package/Product/Items/Item.js.map +1 -1
  203. package/Product/Items/ItemPermissions.js +54 -73
  204. package/Product/Items/ItemPermissions.js.map +1 -1
  205. package/Product/Items/ItemToolbarPermissions.js +61 -80
  206. package/Product/Items/ItemToolbarPermissions.js.map +1 -1
  207. package/Product/Items/LayoutItem.js +241 -326
  208. package/Product/Items/LayoutItem.js.map +1 -1
  209. package/Product/Items/LineItem.js +109 -156
  210. package/Product/Items/LineItem.js.map +1 -1
  211. package/Product/Items/LinePermissions.js +29 -39
  212. package/Product/Items/LinePermissions.js.map +1 -1
  213. package/Product/Items/ManipulationPermissions.d.ts +1 -1
  214. package/Product/Items/ManipulationPermissions.js +94 -135
  215. package/Product/Items/ManipulationPermissions.js.map +1 -1
  216. package/Product/Items/OpenTypeFeature.d.ts +1 -1
  217. package/Product/Items/OpenTypeFeature.js +3 -5
  218. package/Product/Items/OpenTypeFeature.js.map +1 -1
  219. package/Product/Items/OverlayEffect.js +56 -70
  220. package/Product/Items/OverlayEffect.js.map +1 -1
  221. package/Product/Items/ParagraphSettings.js +9 -11
  222. package/Product/Items/ParagraphSettings.js.map +1 -1
  223. package/Product/Items/PathBoundedTextItem.js +113 -164
  224. package/Product/Items/PathBoundedTextItem.js.map +1 -1
  225. package/Product/Items/PathBoundedTextPermissions.js +20 -26
  226. package/Product/Items/PathBoundedTextPermissions.js.map +1 -1
  227. package/Product/Items/PlaceholderItem.d.ts +1 -1
  228. package/Product/Items/PlaceholderItem.js +307 -417
  229. package/Product/Items/PlaceholderItem.js.map +1 -1
  230. package/Product/Items/PlaceholderPermissions.js +38 -47
  231. package/Product/Items/PlaceholderPermissions.js.map +1 -1
  232. package/Product/Items/PlainTextItem.js +45 -74
  233. package/Product/Items/PlainTextItem.js.map +1 -1
  234. package/Product/Items/PolylineItem.js +47 -78
  235. package/Product/Items/PolylineItem.js.map +1 -1
  236. package/Product/Items/RectangleItem.js +10 -30
  237. package/Product/Items/RectangleItem.js.map +1 -1
  238. package/Product/Items/ResizeGripsPermissions.d.ts +3 -3
  239. package/Product/Items/ResizeGripsPermissions.js +74 -94
  240. package/Product/Items/ResizeGripsPermissions.js.map +1 -1
  241. package/Product/Items/ShadowSettings.js +51 -69
  242. package/Product/Items/ShadowSettings.js.map +1 -1
  243. package/Product/Items/ShapeItem.js +182 -251
  244. package/Product/Items/ShapeItem.js.map +1 -1
  245. package/Product/Items/ShapePermissions.js +38 -52
  246. package/Product/Items/ShapePermissions.js.map +1 -1
  247. package/Product/Items/ShapeViolationSettings.js +18 -36
  248. package/Product/Items/ShapeViolationSettings.js.map +1 -1
  249. package/Product/Items/Size.js +7 -11
  250. package/Product/Items/Size.js.map +1 -1
  251. package/Product/Items/SmartItem.js +21 -41
  252. package/Product/Items/SmartItem.js.map +1 -1
  253. package/Product/Items/StrokeSettings.js +48 -62
  254. package/Product/Items/StrokeSettings.js.map +1 -1
  255. package/Product/Items/TextEnums.d.ts +2 -1
  256. package/Product/Items/TextEnums.js +1 -0
  257. package/Product/Items/TextEnums.js.map +1 -1
  258. package/Product/Items/TextPermissions.js +56 -58
  259. package/Product/Items/TextPermissions.js.map +1 -1
  260. package/Product/Items/TextViolationSettings.js +23 -40
  261. package/Product/Items/TextViolationSettings.js.map +1 -1
  262. package/Product/Items/ThemeBinding.js +10 -12
  263. package/Product/Items/ThemeBinding.js.map +1 -1
  264. package/Product/Items/ViolationSettings.js +26 -44
  265. package/Product/Items/ViolationSettings.js.map +1 -1
  266. package/Product/Items/VisualizationPermissions.js +29 -39
  267. package/Product/Items/VisualizationPermissions.js.map +1 -1
  268. package/Product/ItemsData/ItemData.js +8 -24
  269. package/Product/ItemsData/ItemData.js.map +1 -1
  270. package/Product/ModelComponent.js +41 -63
  271. package/Product/ModelComponent.js.map +1 -1
  272. package/Product/PrintArea.d.ts +11 -5
  273. package/Product/PrintArea.js +164 -155
  274. package/Product/PrintArea.js.map +1 -1
  275. package/Product/Product.js +67 -105
  276. package/Product/Product.js.map +1 -1
  277. package/Product/SafetyLine.d.ts +1 -1
  278. package/Product/SafetyLine.js +90 -124
  279. package/Product/SafetyLine.js.map +1 -1
  280. package/Product/Surface.d.ts +2 -1
  281. package/Product/Surface.js +193 -287
  282. package/Product/Surface.js.map +1 -1
  283. package/Product/SurfaceMockup.js +40 -73
  284. package/Product/SurfaceMockup.js.map +1 -1
  285. package/Product/Uuid.js +19 -25
  286. package/Product/Uuid.js.map +1 -1
  287. package/Product/Watermark.js +5 -9
  288. package/Product/Watermark.js.map +1 -1
  289. package/Product/index.d.ts +2 -0
  290. package/Product/index.js +3 -0
  291. package/Product/index.js.map +1 -1
  292. package/Serialization/IProductSerializer.js +1 -0
  293. package/Utils/Environment.d.ts +1 -1
  294. package/Utils/Environment.js +2 -2
  295. package/Utils/Environment.js.map +1 -1
  296. package/Utils/Exceptions.js +5 -5
  297. package/Utils/Exceptions.js.map +1 -1
  298. package/Utils/Items.js +19 -19
  299. package/Utils/Items.js.map +1 -1
  300. package/Utils/Types/Action.d.ts +5 -1
  301. package/Utils/Types/Action.js +1 -0
  302. package/Utils/Types/AnyFunction.d.ts +1 -1
  303. package/Utils/Types/AnyFunction.js +1 -0
  304. package/Utils/Types/Func.d.ts +1 -1
  305. package/Utils/Types/Func.js +1 -0
  306. package/Utils/Types/index.js +3 -0
  307. package/Utils/Types/index.js.map +1 -1
  308. package/Utils/Utils.d.ts +9 -4
  309. package/Utils/Utils.js +179 -296
  310. package/Utils/Utils.js.map +1 -1
  311. package/Utils/debounce.d.ts +29 -0
  312. package/Utils/debounce.js +106 -0
  313. package/Utils/debounce.js.map +1 -0
  314. package/Utils/index.d.ts +2 -0
  315. package/Utils/index.js +3 -0
  316. package/Utils/index.js.map +1 -1
  317. package/Utils/throttle.d.ts +16 -0
  318. package/Utils/throttle.js +25 -0
  319. package/Utils/throttle.js.map +1 -0
  320. package/Validators/CmykComponentValidator.js +13 -15
  321. package/Validators/CmykComponentValidator.js.map +1 -1
  322. package/Version.d.ts +1 -1
  323. package/Version.js +1 -1
  324. package/Version.js.map +1 -1
  325. package/package.json +3 -8
  326. package/typings/structured-clone.d.ts +5 -0
@@ -1,270 +1,197 @@
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";
30
5
  import { PrintingTechniqueConstraints } from "./Constraints/PrintingTechniqueConstraints";
6
+ import { ContainerConstraints } from "./Constraints/ContainerConstraints";
31
7
  import { Format } from "./Format";
32
8
  import { Dither } from "./Dither";
33
- var Container = /** @class */ (function (_super) {
34
- __extends(Container, _super);
35
- function Container(initialItems, name) {
36
- var _this = _super.call(this) || this;
37
- _this.type = Container.type;
38
- _this.parentComponent = null;
39
- _this._locked = false;
40
- _this._items = new Collection();
41
- _this._visible = true;
42
- _this._region = null;
43
- _this._onItemAdded = function (_a) {
44
- var newItem = _a.item;
45
- 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;
46
24
  };
47
- _this._onItemRemoved = function (_a) {
48
- var removedItem = _a.item;
49
- if (removedItem.parentContainer == _this)
25
+ this._onItemRemoved = ({ item: removedItem }) => {
26
+ if (removedItem.parentContainer == this)
50
27
  removedItem.parentContainer = null;
51
28
  };
52
- _this._onRegionChanged = function (sender, propName) {
29
+ this._onRegionChanged = (sender, propName) => {
53
30
  if (propName !== "left" && propName !== "top" && propName !== "width" && propName !== "height")
54
31
  return;
55
- _this._propertyChanged.notify(_this, "region");
32
+ this._propertyChanged.notify(this, "region");
56
33
  };
57
- _this._items = new Collection();
58
- _this._items.add_itemAdded(_this._onItemAdded);
59
- _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);
60
38
  if (initialItems != null)
61
- _this.items.setRange(initialItems);
39
+ this.items.setRange(initialItems);
62
40
  if (name != null)
63
- _this.name = name;
64
- return _this;
65
- }
66
- Object.defineProperty(Container.prototype, "renderingType", {
67
- get: function () {
68
- return RenderingType.Normal;
69
- },
70
- enumerable: true,
71
- configurable: true
72
- });
73
- Object.defineProperty(Container.prototype, "region", {
74
- get: function () {
75
- return this._region;
76
- },
77
- set: function (value) {
78
- if (this._region === value)
79
- return;
80
- if (this._region != null)
81
- this._region.removePropertyChanged(this._onRegionChanged);
82
- this._region = value;
83
- this._propertyChanged.notify(this, "region");
84
- if (this._region != null)
85
- this._region.addPropertyChanged(this._onRegionChanged);
86
- },
87
- enumerable: true,
88
- configurable: true
89
- });
90
- Object.defineProperty(Container.prototype, "items", {
91
- get: function () {
92
- return this._items;
93
- },
94
- enumerable: true,
95
- configurable: true
96
- });
97
- Object.defineProperty(Container.prototype, "visible", {
98
- get: function () {
99
- return this._visible;
100
- },
101
- set: function (value) {
102
- if (this._visible === value)
103
- return;
104
- this._visible = value;
105
- this._propertyChanged.notify(this, "visible");
106
- },
107
- enumerable: true,
108
- configurable: true
109
- });
110
- Object.defineProperty(Container.prototype, "locked", {
111
- get: function () {
112
- return this._locked;
113
- },
114
- set: function (value) {
115
- if (this._locked === value)
116
- return;
117
- this._locked = value;
118
- this._propertyChanged.notify(this, "locked");
119
- },
120
- enumerable: true,
121
- configurable: true
122
- });
123
- Container.prototype.getSimplifiedObject = function () {
124
- 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"]);
125
79
  simplified["version"] = this.version;
126
80
  return simplified;
127
- };
128
- Container.prototype.generateNewIds = function () {
81
+ }
82
+ generateNewIds() {
129
83
  this._generateNewId();
130
- this._items.forEach(function (i) { return i.generateNewIds(); });
131
- };
132
- Container.prototype._copy = function (source, destination, generateNewIds) {
133
- _super.prototype._copy.call(this, source, destination, generateNewIds);
134
- 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)));
135
89
  destination.locked = source.locked;
136
90
  destination.visible = source.visible;
137
91
  destination.translationKey = source.translationKey;
92
+ destination.renderingGroupName = source.renderingGroupName;
138
93
  destination.region = source.region != null ? source.region.clone() : null;
139
- };
140
- Container.prototype.clone = function (generateNewIds) {
141
- if (generateNewIds === void 0) { generateNewIds = false; }
142
- var container = new Container();
94
+ }
95
+ clone(generateNewIds = false) {
96
+ const container = new Container();
143
97
  this._copy(this, container, generateNewIds);
144
98
  return container;
145
- };
146
- Container.type = "Container";
147
- return Container;
148
- }(ModelComponent));
149
- export { Container };
150
- var MockupContainer = /** @class */ (function (_super) {
151
- __extends(MockupContainer, _super);
152
- function MockupContainer(initialItems, name) {
153
- var _this = _super.call(this, initialItems, name) || this;
154
- _this.noPrint = false;
155
- _this.noShow = false;
156
- _this.size = null;
157
- _this._locked = true;
158
- return _this;
159
- }
160
- MockupContainer.prototype._copy = function (source, destination, generateNewIds) {
161
- _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);
162
112
  destination.noPrint = source.noPrint;
163
113
  destination.noShow = source.noShow;
164
114
  destination.size = source.size != null ? source.size.clone() : null;
165
- };
166
- MockupContainer.prototype.clone = function (generateNewIds) {
167
- if (generateNewIds === void 0) { generateNewIds = false; }
168
- var container = new MockupContainer();
115
+ }
116
+ clone(generateNewIds = false) {
117
+ const container = new MockupContainer();
169
118
  this._copy(this, container, generateNewIds);
170
119
  return container;
171
- };
172
- return MockupContainer;
173
- }(Container));
174
- export { MockupContainer };
175
- var SurfaceContainer = /** @class */ (function (_super) {
176
- __extends(SurfaceContainer, _super);
177
- function SurfaceContainer(initialItems, name) {
178
- var _this = _super.call(this, initialItems, name) || this;
179
- _this.type = SurfaceContainer.type;
180
- _this._locked = false;
181
- _this.printingTechniqueConstraints = new PrintingTechniqueConstraints();
182
- return _this;
183
- }
184
- SurfaceContainer.prototype._copy = function (source, destination, generateNewIds) {
185
- _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);
186
132
  destination.printingTechniqueConstraints = source.printingTechniqueConstraints.clone(generateNewIds);
187
- };
188
- SurfaceContainer.prototype.clone = function (generateNewIds) {
189
- if (generateNewIds === void 0) { generateNewIds = false; }
190
- var container = new SurfaceContainer();
133
+ destination.constraints = source.constraints != null ? source.constraints.clone() : null;
134
+ }
135
+ clone(generateNewIds = false) {
136
+ const container = new SurfaceContainer();
191
137
  this._copy(this, container, generateNewIds);
192
138
  return container;
193
- };
194
- SurfaceContainer.prototype.getSimplifiedObject = function () {
195
- var result = _super.prototype.getSimplifiedObject.call(this);
196
- return __assign(__assign({}, result), { printingTechniqueConstraints: this.printingTechniqueConstraints.toJSON() });
197
- };
198
- SurfaceContainer.type = "SurfaceContainer";
199
- return SurfaceContainer;
200
- }(Container));
201
- export { SurfaceContainer };
202
- var ColorLessContainer = /** @class */ (function (_super) {
203
- __extends(ColorLessContainer, _super);
204
- function ColorLessContainer(initialItems, name) {
205
- var _this = _super.call(this, initialItems, name) || this;
206
- _this.type = ColorLessContainer.type;
207
- _this._format = Format.OneBit;
208
- _this._dither = Dither.Diffusion;
209
- _this._amount = 0.7;
210
- _this._locked = false;
211
- return _this;
212
- }
213
- Object.defineProperty(ColorLessContainer.prototype, "format", {
214
- get: function () {
215
- return this._format;
216
- },
217
- set: function (value) {
218
- if (this._format === value)
219
- return;
220
- this._format = value;
221
- this._propertyChanged.notify(this, "format");
222
- },
223
- enumerable: true,
224
- configurable: true
225
- });
226
- Object.defineProperty(ColorLessContainer.prototype, "dither", {
227
- get: function () {
228
- return this._dither;
229
- },
230
- set: function (value) {
231
- if (this._dither === value)
232
- return;
233
- this._dither = value;
234
- this._propertyChanged.notify(this, "dither");
235
- },
236
- enumerable: true,
237
- configurable: true
238
- });
239
- Object.defineProperty(ColorLessContainer.prototype, "amount", {
240
- get: function () {
241
- return this._amount;
242
- },
243
- set: function (value) {
244
- if (this._amount === value)
245
- return;
246
- this._amount = value;
247
- this._propertyChanged.notify(this, "amount");
248
- },
249
- enumerable: true,
250
- configurable: true
251
- });
252
- Object.defineProperty(ColorLessContainer.prototype, "renderingType", {
253
- get: function () {
254
- if (this.visualization === null)
255
- return null;
256
- if (this.visualization instanceof TextureContainerVisualization)
257
- return RenderingType.Solid;
258
- if (this.visualization instanceof ColorContainerVisualization)
259
- return RenderingType.Grayscale;
139
+ }
140
+ getSimplifiedObject() {
141
+ var _a, _b, _c;
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)
260
177
  return null;
261
- },
262
- enumerable: true,
263
- configurable: true
264
- });
265
- 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) {
266
193
  var _a, _b;
267
- _super.prototype._copy.call(this, source, destination, generateNewIds);
194
+ super._copy(source, destination, generateNewIds);
268
195
  destination.outputColor = (_a = source.outputColor) === null || _a === void 0 ? void 0 : _a.clone();
269
196
  destination.opaque = source.opaque;
270
197
  destination.dpi = source.dpi;
@@ -272,164 +199,123 @@ var ColorLessContainer = /** @class */ (function (_super) {
272
199
  destination.format = source.format;
273
200
  destination.dither = source.dither;
274
201
  destination.amount = source.amount;
275
- };
276
- ColorLessContainer.prototype.getSimplifiedObject = function () {
277
- var result = _super.prototype.getSimplifiedObject.call(this);
278
- 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 });
279
- };
280
- ColorLessContainer.prototype.clone = function (generateNewIds) {
281
- if (generateNewIds === void 0) { generateNewIds = false; }
282
- 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();
283
209
  this._copy(this, container, generateNewIds);
284
210
  return container;
285
- };
286
- ColorLessContainer.type = "ColorLessContainer";
287
- return ColorLessContainer;
288
- }(SurfaceContainer));
289
- export { ColorLessContainer };
290
- var LimitedColorContainer = /** @class */ (function (_super) {
291
- __extends(LimitedColorContainer, _super);
292
- function LimitedColorContainer(initialItems, name) {
293
- var _this = _super.call(this, initialItems, name) || this;
294
- _this.type = LimitedColorContainer.type;
295
- _this._locked = false;
296
- return _this;
297
- }
298
- Object.defineProperty(LimitedColorContainer.prototype, "renderingType", {
299
- get: function () {
300
- return RenderingType.Normal;
301
- },
302
- enumerable: true,
303
- configurable: true
304
- });
305
- LimitedColorContainer.prototype._copy = function (source, destination, generateNewIds) {
306
- _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);
307
225
  destination.maxColorNumber = source.maxColorNumber;
308
226
  destination.paletteUId = source.paletteUId;
309
- };
310
- LimitedColorContainer.prototype.getSimplifiedObject = function () {
311
- var result = _super.prototype.getSimplifiedObject.call(this);
312
- return __assign(__assign({}, result), { maxColorNumber: this.maxColorNumber, paletteUId: this.paletteUId });
313
- };
314
- LimitedColorContainer.prototype.clone = function (generateNewIds) {
315
- if (generateNewIds === void 0) { generateNewIds = false; }
316
- 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();
317
234
  this._copy(this, container, generateNewIds);
318
235
  return container;
319
- };
320
- LimitedColorContainer.type = "LimitedColorContainer";
321
- return LimitedColorContainer;
322
- }(SurfaceContainer));
323
- export { LimitedColorContainer };
324
- var FullColorContainer = /** @class */ (function (_super) {
325
- __extends(FullColorContainer, _super);
326
- function FullColorContainer(initialItems, name) {
327
- var _this = _super.call(this, initialItems, name) || this;
328
- _this.type = FullColorContainer.type;
329
- _this._locked = false;
330
- return _this;
331
- }
332
- Object.defineProperty(FullColorContainer.prototype, "renderingType", {
333
- get: function () {
334
- return RenderingType.Normal;
335
- },
336
- enumerable: true,
337
- configurable: true
338
- });
339
- FullColorContainer.prototype._copy = function (source, destination, generateNewIds) {
340
- _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);
341
250
  destination.colorSpace = source.colorSpace;
342
251
  destination.colorProfile = source.colorProfile;
343
- };
344
- FullColorContainer.prototype.getSimplifiedObject = function () {
345
- var result = _super.prototype.getSimplifiedObject.call(this);
346
- return __assign(__assign({}, result), { colorSpace: this.colorSpace, colorProfile: this.colorProfile });
347
- };
348
- FullColorContainer.prototype.clone = function (generateNewIds) {
349
- if (generateNewIds === void 0) { generateNewIds = false; }
350
- 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();
351
259
  this._copy(this, container, generateNewIds);
352
260
  return container;
353
- };
354
- FullColorContainer.type = "FullColorContainer";
355
- return FullColorContainer;
356
- }(SurfaceContainer));
357
- export { FullColorContainer };
358
- var SpotColorContainer = /** @class */ (function (_super) {
359
- __extends(SpotColorContainer, _super);
360
- function SpotColorContainer() {
361
- var _this = _super.call(this) || this;
362
- _this.type = SpotColorContainer.type;
363
- return _this;
364
- }
365
- Object.defineProperty(SpotColorContainer.prototype, "renderingType", {
366
- get: function () {
367
- return RenderingType.Grayscale;
368
- },
369
- enumerable: true,
370
- configurable: true
371
- });
372
- 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) {
373
273
  var _a;
374
- _super.prototype._copy.call(this, source, destination, generateNewIds);
274
+ super._copy(source, destination, generateNewIds);
375
275
  destination.previewColor = source.previewColor;
376
276
  destination.outputColor = (_a = source.outputColor) === null || _a === void 0 ? void 0 : _a.clone();
377
- };
378
- SpotColorContainer.prototype.clone = function (generateNewIds) {
379
- if (generateNewIds === void 0) { generateNewIds = false; }
380
- var container = new SpotColorContainer();
277
+ }
278
+ clone(generateNewIds = false) {
279
+ const container = new SpotColorContainer();
381
280
  this._copy(this, container, generateNewIds);
382
281
  return container;
383
- };
384
- SpotColorContainer.type = "SpotColorContainer";
385
- return SpotColorContainer;
386
- }(SurfaceContainer));
387
- export { SpotColorContainer };
388
- var TextureContainer = /** @class */ (function (_super) {
389
- __extends(TextureContainer, _super);
390
- function TextureContainer() {
391
- var _this = _super.call(this) || this;
392
- _this.type = TextureContainer.type;
393
- return _this;
394
- }
395
- Object.defineProperty(TextureContainer.prototype, "renderingType", {
396
- get: function () {
397
- return RenderingType.Grayscale;
398
- },
399
- enumerable: true,
400
- configurable: true
401
- });
402
- Object.defineProperty(TextureContainer.prototype, "previewTextureSource", {
403
- get: function () {
404
- return this._previewTextureSource;
405
- },
406
- set: function (previewTextureSource) {
407
- if (previewTextureSource !== this._previewTextureSource) {
408
- this._previewTextureSource = previewTextureSource;
409
- this._propertyChanged.notify(this, "previewTextureSource");
410
- }
411
- },
412
- enumerable: true,
413
- configurable: true
414
- });
415
- 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) {
416
303
  var _a;
417
- _super.prototype._copy.call(this, source, destination, generateNewIds);
304
+ super._copy(source, destination, generateNewIds);
418
305
  destination.previewTextureSource = source.previewTextureSource != null ? source.previewTextureSource.clone() : null;
419
306
  destination.previewTextureName = source.previewTextureName;
420
307
  destination.outputColor = (_a = source.outputColor) === null || _a === void 0 ? void 0 : _a.clone();
421
308
  return destination;
422
- };
423
- TextureContainer.prototype.clone = function (generateNewIds) {
424
- if (generateNewIds === void 0) { generateNewIds = false; }
425
- var container = new TextureContainer();
309
+ }
310
+ clone(generateNewIds = false) {
311
+ const container = new TextureContainer();
426
312
  this._copy(this, container, generateNewIds);
427
313
  return container;
428
- };
429
- TextureContainer.prototype.getSimplifiedObject = function (omitProperties) {
430
- if (!_.isArray(omitProperties) && !_.isString(omitProperties))
314
+ }
315
+ getSimplifiedObject(omitProperties) {
316
+ if (!Array.isArray(omitProperties) && !isString(omitProperties))
431
317
  omitProperties = [];
432
- var simplified = _super.prototype.getSimplifiedObject.call(this);
318
+ const simplified = super.getSimplifiedObject();
433
319
  simplified["previewTextureSource"] = {
434
320
  "id": this.previewTextureSource.id,
435
321
  "width": this.previewTextureSource.width,
@@ -442,9 +328,7 @@ var TextureContainer = /** @class */ (function (_super) {
442
328
  "origin": this.previewTextureSource.origin,
443
329
  };
444
330
  return simplified;
445
- };
446
- TextureContainer.type = "TextureContainer";
447
- return TextureContainer;
448
- }(SurfaceContainer));
449
- export { TextureContainer };
331
+ }
332
+ }
333
+ TextureContainer.type = "TextureContainer";
450
334
  //# sourceMappingURL=Container.js.map