@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.
- package/Collection.js +271 -514
- package/Collection.js.map +1 -1
- package/Colors/CmykColor.js +35 -69
- package/Colors/CmykColor.js.map +1 -1
- package/Colors/Color.js +11 -19
- package/Colors/Color.js.map +1 -1
- package/Colors/GrayscaleColor.js +23 -45
- package/Colors/GrayscaleColor.js.map +1 -1
- package/Colors/HsbColor.js +67 -85
- package/Colors/HsbColor.js.map +1 -1
- package/Colors/Ink.js +20 -35
- package/Colors/Ink.js.map +1 -1
- package/Colors/LabColor.js +29 -59
- package/Colors/LabColor.js.map +1 -1
- package/Colors/Palette.js +2 -21
- package/Colors/Palette.js.map +1 -1
- package/Colors/ProcessColor.js +24 -54
- package/Colors/ProcessColor.js.map +1 -1
- package/Colors/RgbColor.js +31 -61
- package/Colors/RgbColor.js.map +1 -1
- package/Colors/RgbColors.js +22 -54
- package/Colors/RgbColors.js.map +1 -1
- package/Colors/SpotColor.js +34 -68
- package/Colors/SpotColor.js.map +1 -1
- package/Colors/Swatch.js +16 -40
- package/Colors/Swatch.js.map +1 -1
- package/Colors/ValidationUtils.js +3 -5
- package/Colors/ValidationUtils.js.map +1 -1
- package/ColorsOld/CmykColor.js +54 -80
- package/ColorsOld/CmykColor.js.map +1 -1
- package/ColorsOld/Color.d.ts +1 -1
- package/ColorsOld/Color.js +25 -34
- package/ColorsOld/Color.js.map +1 -1
- package/ColorsOld/ColorFactory.js +30 -40
- package/ColorsOld/ColorFactory.js.map +1 -1
- package/ColorsOld/GrayscaleColor.js +29 -54
- package/ColorsOld/GrayscaleColor.js.map +1 -1
- package/ColorsOld/HsbColor.js +29 -35
- package/ColorsOld/HsbColor.js.map +1 -1
- package/ColorsOld/LabColor.js +35 -56
- package/ColorsOld/LabColor.js.map +1 -1
- package/ColorsOld/RgbColor.js +73 -114
- package/ColorsOld/RgbColor.js.map +1 -1
- package/ColorsOld/SpotColor.js +32 -53
- package/ColorsOld/SpotColor.js.map +1 -1
- package/ColorsOld/Utils.js +9 -13
- package/ColorsOld/Utils.js.map +1 -1
- package/Configuration/IRenderingConfig.js +1 -0
- package/Configuration/WatermarkConfig.js +17 -33
- package/Configuration/WatermarkConfig.js.map +1 -1
- package/Configuration/index.js +1 -0
- package/Configuration/index.js.map +1 -1
- package/Configuration.js +7 -11
- package/Configuration.js.map +1 -1
- package/EquatableKeyDictionary.js +43 -127
- package/EquatableKeyDictionary.js.map +1 -1
- package/EventObject.js +59 -136
- package/EventObject.js.map +1 -1
- package/Exception.d.ts +1 -1
- package/Exception.js +47 -88
- package/Exception.js.map +1 -1
- package/INotifyPropertyChanged.d.ts +1 -1
- package/INotifyPropertyChanged.js +1 -0
- package/Math/Array.js +3 -3
- package/Math/Array.js.map +1 -1
- package/Math/Common.js +13 -15
- package/Math/Common.js.map +1 -1
- package/Math/ILtrb.js +1 -0
- package/Math/IPoint.js +1 -0
- package/Math/ISize.js +1 -0
- package/Math/Margin.js +62 -99
- package/Math/Margin.js.map +1 -1
- package/Math/Matrix.js +63 -94
- package/Math/Matrix.js.map +1 -1
- package/Math/Path.d.ts +1 -1
- package/Math/Path.js +149 -234
- package/Math/Path.js.map +1 -1
- package/Math/PointF.js +31 -34
- package/Math/PointF.js.map +1 -1
- package/Math/RectangleF.js +119 -159
- package/Math/RectangleF.js.map +1 -1
- package/Math/RotatedRectangleF.js +132 -147
- package/Math/RotatedRectangleF.js.map +1 -1
- package/Math/SizeF.js +10 -12
- package/Math/SizeF.js.map +1 -1
- package/Math/Transform.js +50 -80
- package/Math/Transform.js.map +1 -1
- package/Math/index.js +3 -0
- package/Math/index.js.map +1 -1
- package/Product/Constraints/ContainerConstraints.js +11 -13
- package/Product/Constraints/ContainerConstraints.js.map +1 -1
- package/Product/Constraints/MaxArtworkSizeConstraints.d.ts +1 -1
- package/Product/Constraints/MaxArtworkSizeConstraints.js +10 -12
- package/Product/Constraints/MaxArtworkSizeConstraints.js.map +1 -1
- package/Product/Constraints/PrintingTechniqueConstraints.js +10 -13
- package/Product/Constraints/PrintingTechniqueConstraints.js.map +1 -1
- package/Product/Container.d.ts +10 -10
- package/Product/Container.js +253 -375
- package/Product/Container.js.map +1 -1
- package/Product/ContainerVisualization.d.ts +1 -0
- package/Product/ContainerVisualization.js +31 -56
- package/Product/ContainerVisualization.js.map +1 -1
- package/Product/Convert/CornerRadiusConverter.js +32 -34
- package/Product/Convert/CornerRadiusConverter.js.map +1 -1
- package/Product/CropMark.js +28 -40
- package/Product/CropMark.js.map +1 -1
- package/Product/Decorators/Factory/AbstractFactory.js +13 -23
- package/Product/Decorators/Factory/AbstractFactory.js.map +1 -1
- package/Product/Decorators/Factory/CollectionFactory.js +10 -45
- package/Product/Decorators/Factory/CollectionFactory.js.map +1 -1
- package/Product/Decorators/Factory/ColorFactory.js +13 -35
- package/Product/Decorators/Factory/ColorFactory.js.map +1 -1
- package/Product/Decorators/Factory/ObjectFactory.js +10 -45
- package/Product/Decorators/Factory/ObjectFactory.js.map +1 -1
- package/Product/Decorators/Factory/SimpleFactory.js +11 -21
- package/Product/Decorators/Factory/SimpleFactory.js.map +1 -1
- package/Product/Decorators/Interfaces/IInputPropertyMetadata.d.ts +1 -1
- package/Product/Decorators/Interfaces/IInputPropertyMetadata.js +1 -0
- package/Product/Decorators/Interfaces/IObjectMetadata.js +1 -0
- package/Product/Decorators/Interfaces/IPropertyMetadata.js +1 -0
- package/Product/Decorators/ItemsMetadata.js +11 -13
- package/Product/Decorators/ItemsMetadata.js.map +1 -1
- package/Product/Decorators/Property.js +4 -4
- package/Product/Decorators/Property.js.map +1 -1
- package/Product/Decorators/PropertyChanged.js +1 -1
- package/Product/Decorators/PropertyChanged.js.map +1 -1
- package/Product/Decorators/index.js +1 -0
- package/Product/Decorators/index.js.map +1 -1
- package/Product/Effects/ColorDictionaryEntry.js +3 -5
- package/Product/Effects/ColorDictionaryEntry.js.map +1 -1
- package/Product/Effects/NDEffectParameters.js +2 -6
- package/Product/Effects/NDEffectParameters.js.map +1 -1
- package/Product/Effects/NDEffects.d.ts +1 -0
- package/Product/Effects/NDEffects.js +20 -27
- package/Product/Effects/NDEffects.js.map +1 -1
- package/Product/Effects/RecolorEffectParameters.d.ts +1 -0
- package/Product/Effects/RecolorEffectParameters.js +44 -89
- package/Product/Effects/RecolorEffectParameters.js.map +1 -1
- package/Product/IGetAllItemsOptions.js +1 -0
- package/Product/InteractiveZone.js +34 -66
- package/Product/InteractiveZone.js.map +1 -1
- package/Product/Interfaces/IColorWithTitle.js +1 -0
- package/Product/Interfaces/IDataSet.js +1 -0
- package/Product/Interfaces/IFontSettings.js +1 -0
- package/Product/Interfaces/IItemData.js +1 -0
- package/Product/Interfaces/IPdfMetadata.js +1 -0
- package/Product/Interfaces/IProductThemeConfig.js +1 -0
- package/Product/Interfaces/IShadowSettings.js +1 -0
- package/Product/Interfaces/IStrokeSettings.js +1 -0
- package/Product/Interfaces/index.js +3 -0
- package/Product/Interfaces/index.js.map +1 -1
- package/Product/ItemMask.js +20 -26
- package/Product/ItemMask.js.map +1 -1
- package/Product/Items/ArchedTextItem.js +65 -100
- package/Product/Items/ArchedTextItem.js.map +1 -1
- package/Product/Items/AutoScaledTextItem.js +35 -62
- package/Product/Items/AutoScaledTextItem.js.map +1 -1
- package/Product/Items/BarcodeData.d.ts +1 -1
- package/Product/Items/BarcodeData.js +62 -91
- package/Product/Items/BarcodeData.js.map +1 -1
- package/Product/Items/BarcodeItem.js +249 -298
- package/Product/Items/BarcodeItem.js.map +1 -1
- package/Product/Items/BarcodePermissions.js +38 -52
- package/Product/Items/BarcodePermissions.js.map +1 -1
- package/Product/Items/BaseItem.js +30 -53
- package/Product/Items/BaseItem.js.map +1 -1
- package/Product/Items/BaseTextItem.d.ts +2 -2
- package/Product/Items/BaseTextItem.js +451 -625
- package/Product/Items/BaseTextItem.js.map +1 -1
- package/Product/Items/BoundedTextItem.js +184 -255
- package/Product/Items/BoundedTextItem.js.map +1 -1
- package/Product/Items/ClipartItem.js +82 -175
- package/Product/Items/ClipartItem.js.map +1 -1
- package/Product/Items/ContentItem.js +52 -80
- package/Product/Items/ContentItem.js.map +1 -1
- package/Product/Items/ContentPermissions.js +36 -47
- package/Product/Items/ContentPermissions.js.map +1 -1
- package/Product/Items/CurvedTextItem.js +106 -158
- package/Product/Items/CurvedTextItem.js.map +1 -1
- package/Product/Items/DashedLineItem.js +45 -76
- package/Product/Items/DashedLineItem.js.map +1 -1
- package/Product/Items/EllipseItem.js +11 -31
- package/Product/Items/EllipseItem.js.map +1 -1
- package/Product/Items/FrontEndPermissions.js +20 -26
- package/Product/Items/FrontEndPermissions.js.map +1 -1
- package/Product/Items/GridItem.js +107 -162
- package/Product/Items/GridItem.js.map +1 -1
- package/Product/Items/GroupItem.js +95 -172
- package/Product/Items/GroupItem.js.map +1 -1
- package/Product/Items/GroupItemPermissions.js +42 -56
- package/Product/Items/GroupItemPermissions.js.map +1 -1
- package/Product/Items/ImageItem.d.ts +9 -4
- package/Product/Items/ImageItem.js +319 -430
- package/Product/Items/ImageItem.js.map +1 -1
- package/Product/Items/ImageMetaData.js +14 -15
- package/Product/Items/ImageMetaData.js.map +1 -1
- package/Product/Items/ImagePermissions.js +42 -56
- package/Product/Items/ImagePermissions.js.map +1 -1
- package/Product/Items/ImageViolationSettings.js +18 -35
- package/Product/Items/ImageViolationSettings.js.map +1 -1
- package/Product/Items/InStringPlaceholder.d.ts +2 -1
- package/Product/Items/InStringPlaceholder.js +52 -101
- package/Product/Items/InStringPlaceholder.js.map +1 -1
- package/Product/Items/Item.d.ts +1 -1
- package/Product/Items/Item.js +278 -370
- package/Product/Items/Item.js.map +1 -1
- package/Product/Items/ItemPermissions.js +54 -73
- package/Product/Items/ItemPermissions.js.map +1 -1
- package/Product/Items/ItemToolbarPermissions.js +61 -80
- package/Product/Items/ItemToolbarPermissions.js.map +1 -1
- package/Product/Items/LayoutItem.js +241 -326
- package/Product/Items/LayoutItem.js.map +1 -1
- package/Product/Items/LineItem.js +109 -156
- package/Product/Items/LineItem.js.map +1 -1
- package/Product/Items/LinePermissions.js +29 -39
- package/Product/Items/LinePermissions.js.map +1 -1
- package/Product/Items/ManipulationPermissions.d.ts +1 -1
- package/Product/Items/ManipulationPermissions.js +94 -135
- package/Product/Items/ManipulationPermissions.js.map +1 -1
- package/Product/Items/OpenTypeFeature.d.ts +1 -1
- package/Product/Items/OpenTypeFeature.js +3 -5
- package/Product/Items/OpenTypeFeature.js.map +1 -1
- package/Product/Items/OverlayEffect.js +56 -70
- package/Product/Items/OverlayEffect.js.map +1 -1
- package/Product/Items/ParagraphSettings.js +9 -11
- package/Product/Items/ParagraphSettings.js.map +1 -1
- package/Product/Items/PathBoundedTextItem.js +116 -166
- package/Product/Items/PathBoundedTextItem.js.map +1 -1
- package/Product/Items/PathBoundedTextPermissions.js +20 -26
- package/Product/Items/PathBoundedTextPermissions.js.map +1 -1
- package/Product/Items/PlaceholderItem.d.ts +1 -1
- package/Product/Items/PlaceholderItem.js +310 -419
- package/Product/Items/PlaceholderItem.js.map +1 -1
- package/Product/Items/PlaceholderPermissions.js +38 -47
- package/Product/Items/PlaceholderPermissions.js.map +1 -1
- package/Product/Items/PlainTextItem.js +45 -74
- package/Product/Items/PlainTextItem.js.map +1 -1
- package/Product/Items/PolylineItem.js +51 -81
- package/Product/Items/PolylineItem.js.map +1 -1
- package/Product/Items/RectangleItem.js +10 -30
- package/Product/Items/RectangleItem.js.map +1 -1
- package/Product/Items/ResizeGripsPermissions.d.ts +5 -4
- package/Product/Items/ResizeGripsPermissions.js +75 -94
- package/Product/Items/ResizeGripsPermissions.js.map +1 -1
- package/Product/Items/ShadowSettings.js +51 -69
- package/Product/Items/ShadowSettings.js.map +1 -1
- package/Product/Items/ShapeItem.js +182 -250
- package/Product/Items/ShapeItem.js.map +1 -1
- package/Product/Items/ShapePermissions.js +38 -52
- package/Product/Items/ShapePermissions.js.map +1 -1
- package/Product/Items/ShapeViolationSettings.js +18 -36
- package/Product/Items/ShapeViolationSettings.js.map +1 -1
- package/Product/Items/Size.js +7 -11
- package/Product/Items/Size.js.map +1 -1
- package/Product/Items/SmartItem.js +21 -41
- package/Product/Items/SmartItem.js.map +1 -1
- package/Product/Items/StrokeSettings.js +48 -62
- package/Product/Items/StrokeSettings.js.map +1 -1
- package/Product/Items/TextEnums.d.ts +2 -1
- package/Product/Items/TextEnums.js +1 -0
- package/Product/Items/TextEnums.js.map +1 -1
- package/Product/Items/TextPermissions.js +56 -58
- package/Product/Items/TextPermissions.js.map +1 -1
- package/Product/Items/TextViolationSettings.js +23 -40
- package/Product/Items/TextViolationSettings.js.map +1 -1
- package/Product/Items/ThemeBinding.d.ts +2 -1
- package/Product/Items/ThemeBinding.js +13 -15
- package/Product/Items/ThemeBinding.js.map +1 -1
- package/Product/Items/ViolationSettings.js +26 -44
- package/Product/Items/ViolationSettings.js.map +1 -1
- package/Product/Items/VisualizationPermissions.js +29 -39
- package/Product/Items/VisualizationPermissions.js.map +1 -1
- package/Product/ItemsData/ItemData.js +8 -24
- package/Product/ItemsData/ItemData.js.map +1 -1
- package/Product/ModelComponent.js +41 -63
- package/Product/ModelComponent.js.map +1 -1
- package/Product/PrintArea.d.ts +1 -0
- package/Product/PrintArea.js +132 -178
- package/Product/PrintArea.js.map +1 -1
- package/Product/Product.js +67 -105
- package/Product/Product.js.map +1 -1
- package/Product/SafetyLine.d.ts +1 -1
- package/Product/SafetyLine.js +90 -124
- package/Product/SafetyLine.js.map +1 -1
- package/Product/Surface.d.ts +2 -1
- package/Product/Surface.js +193 -287
- package/Product/Surface.js.map +1 -1
- package/Product/SurfaceMockup.js +40 -73
- package/Product/SurfaceMockup.js.map +1 -1
- package/Product/Uuid.js +19 -25
- package/Product/Uuid.js.map +1 -1
- package/Product/Watermark.js +5 -9
- package/Product/Watermark.js.map +1 -1
- package/Product/index.js +1 -0
- package/Product/index.js.map +1 -1
- package/Serialization/IProductSerializer.js +1 -0
- package/Utils/Environment.d.ts +1 -1
- package/Utils/Environment.js +24 -44
- package/Utils/Environment.js.map +1 -1
- package/Utils/Exceptions.js +5 -5
- package/Utils/Exceptions.js.map +1 -1
- package/Utils/Items.js +19 -19
- package/Utils/Items.js.map +1 -1
- package/Utils/Types/Action.d.ts +5 -1
- package/Utils/Types/Action.js +1 -0
- package/Utils/Types/AnyFunction.d.ts +1 -1
- package/Utils/Types/AnyFunction.js +1 -0
- package/Utils/Types/Func.d.ts +1 -1
- package/Utils/Types/Func.js +1 -0
- package/Utils/Types/index.js +3 -0
- package/Utils/Types/index.js.map +1 -1
- package/Utils/Utils.d.ts +14 -5
- package/Utils/Utils.js +185 -298
- package/Utils/Utils.js.map +1 -1
- package/Utils/debounce.d.ts +29 -0
- package/Utils/debounce.js +106 -0
- package/Utils/debounce.js.map +1 -0
- package/Utils/index.d.ts +2 -0
- package/Utils/index.js +3 -0
- package/Utils/index.js.map +1 -1
- package/Utils/throttle.d.ts +16 -0
- package/Utils/throttle.js +25 -0
- package/Utils/throttle.js.map +1 -0
- package/Validators/CmykComponentValidator.js +13 -15
- package/Validators/CmykComponentValidator.js.map +1 -1
- package/Version.d.ts +1 -1
- package/Version.js +1 -1
- package/Version.js.map +1 -1
- package/package.json +3 -8
- package/typings/structured-clone.d.ts +5 -0
package/Product/PrintArea.js
CHANGED
|
@@ -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
|
import { ModelComponent } from "./ModelComponent";
|
|
15
2
|
import { RectangleF } from "../Math/RectangleF";
|
|
16
3
|
import { Collection } from "../Collection";
|
|
@@ -19,135 +6,105 @@ import { PrintAreaBoundsType } from "./PrintAreaBoundsType";
|
|
|
19
6
|
import { ArgumentException } from "../Exception";
|
|
20
7
|
import { equals } from "../Utils/Utils";
|
|
21
8
|
import { Path } from "../Math/Path";
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_this._onShapePathChanged = function (_t) {
|
|
30
|
-
_this._propertyChanged.notify(_this, "shape");
|
|
31
|
-
_this._propertyChanged.notify(_this, "bounds");
|
|
32
|
-
};
|
|
33
|
-
_this._onBleedPropertyChanged = function (s, p) {
|
|
34
|
-
_this._validateMargin(_this.bleed, "bleed");
|
|
35
|
-
_this._propertyChanged.notify(_this, "bleed");
|
|
36
|
-
};
|
|
37
|
-
_this._onSlugPropertyChanged = function (s, p) {
|
|
38
|
-
_this._validateMargin(_this.slug, "slug");
|
|
39
|
-
_this._propertyChanged.notify(_this, "slug");
|
|
40
|
-
};
|
|
41
|
-
_this._validateMargin(bleed, "bleed");
|
|
42
|
-
_this._validateMargin(slug, "slug");
|
|
43
|
-
_this.bleed = bleed !== null && bleed !== void 0 ? bleed : new Margin();
|
|
44
|
-
_this.slug = slug !== null && slug !== void 0 ? slug : new Margin();
|
|
45
|
-
_this._shape = _this._ensureShape(shape, bounds);
|
|
46
|
-
_this._subscribeShapeChanged();
|
|
47
|
-
return _this;
|
|
48
|
-
}
|
|
49
|
-
Object.defineProperty(PrintArea.prototype, "bounds", {
|
|
50
|
-
//TODO next release
|
|
51
|
-
//private _background = new PrintAreaContainer();
|
|
52
|
-
//get background() {
|
|
53
|
-
// return this._background;
|
|
54
|
-
//}
|
|
55
|
-
//private _foreground = new PrintAreaContainer();`
|
|
56
|
-
//get foreground() {
|
|
57
|
-
// return this._foreground;
|
|
58
|
-
//}
|
|
59
|
-
get: function () {
|
|
60
|
-
return this._shape.calculateBounds();
|
|
61
|
-
},
|
|
62
|
-
set: function (value) {
|
|
63
|
-
if (value == null)
|
|
64
|
-
throw new ArgumentException("PrintArea.bounds cannot be null.");
|
|
65
|
-
if (RectangleF.isEqual(this.bounds, value))
|
|
66
|
-
return;
|
|
67
|
-
this._resizeShape(value);
|
|
68
|
-
this._propertyChanged.notify(this, "bounds");
|
|
69
|
-
this._propertyChanged.notify(this, "shape");
|
|
70
|
-
},
|
|
71
|
-
enumerable: true,
|
|
72
|
-
configurable: true
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(PrintArea.prototype, "shape", {
|
|
75
|
-
get: function () {
|
|
76
|
-
return this._shape;
|
|
77
|
-
},
|
|
78
|
-
set: function (value) {
|
|
79
|
-
if (value == null)
|
|
80
|
-
throw new ArgumentException("PrintArea.shape cannot be null.");
|
|
81
|
-
if (this._shape != null && this._shape.isEqual(value))
|
|
82
|
-
return;
|
|
83
|
-
this._unsubscribeShapeChanged();
|
|
84
|
-
this._shape = value;
|
|
85
|
-
this._subscribeShapeChanged();
|
|
9
|
+
export class PrintArea extends ModelComponent {
|
|
10
|
+
constructor(bounds, bleed, slug, shape) {
|
|
11
|
+
super();
|
|
12
|
+
this.parentSurface = null;
|
|
13
|
+
this._safetyLines = new Collection();
|
|
14
|
+
this._cropMarks = new Collection();
|
|
15
|
+
this._onShapePathChanged = (_t) => {
|
|
86
16
|
this._propertyChanged.notify(this, "shape");
|
|
87
17
|
this._propertyChanged.notify(this, "bounds");
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
});
|
|
92
|
-
Object.defineProperty(PrintArea.prototype, "safetyLines", {
|
|
93
|
-
get: function () {
|
|
94
|
-
return this._safetyLines;
|
|
95
|
-
},
|
|
96
|
-
set: function (value) {
|
|
97
|
-
if (this._safetyLines === value)
|
|
98
|
-
return;
|
|
99
|
-
this._safetyLines = value;
|
|
100
|
-
this._propertyChanged.notify(this, "safetyLines");
|
|
101
|
-
},
|
|
102
|
-
enumerable: true,
|
|
103
|
-
configurable: true
|
|
104
|
-
});
|
|
105
|
-
Object.defineProperty(PrintArea.prototype, "cropMarks", {
|
|
106
|
-
get: function () {
|
|
107
|
-
return this._cropMarks;
|
|
108
|
-
},
|
|
109
|
-
set: function (value) {
|
|
110
|
-
if (this._cropMarks === value)
|
|
111
|
-
return;
|
|
112
|
-
this._cropMarks = value;
|
|
113
|
-
this._propertyChanged.notify(this, "cropMarks");
|
|
114
|
-
},
|
|
115
|
-
enumerable: true,
|
|
116
|
-
configurable: true
|
|
117
|
-
});
|
|
118
|
-
Object.defineProperty(PrintArea.prototype, "bleed", {
|
|
119
|
-
get: function () {
|
|
120
|
-
return this._bleed;
|
|
121
|
-
},
|
|
122
|
-
set: function (value) {
|
|
123
|
-
if (equals(value, this._bleed))
|
|
124
|
-
return;
|
|
125
|
-
this._validateMargin(value, "bleed");
|
|
126
|
-
this._unsubscribeBleedPropertyChanged();
|
|
127
|
-
this._bleed = value;
|
|
128
|
-
this._subscribeBleedPropertyChanged();
|
|
18
|
+
};
|
|
19
|
+
this._onBleedPropertyChanged = (s, p) => {
|
|
20
|
+
this._validateMargin(this.bleed, "bleed");
|
|
129
21
|
this._propertyChanged.notify(this, "bleed");
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
});
|
|
134
|
-
Object.defineProperty(PrintArea.prototype, "slug", {
|
|
135
|
-
get: function () {
|
|
136
|
-
return this._slug;
|
|
137
|
-
},
|
|
138
|
-
set: function (value) {
|
|
139
|
-
if (equals(value, this._slug))
|
|
140
|
-
return;
|
|
141
|
-
this._validateMargin(value, "slug");
|
|
142
|
-
this._unsubscribeSlugPropertyChanged();
|
|
143
|
-
this._slug = value;
|
|
144
|
-
this._subscribeSlugPropertyChanged();
|
|
22
|
+
};
|
|
23
|
+
this._onSlugPropertyChanged = (s, p) => {
|
|
24
|
+
this._validateMargin(this.slug, "slug");
|
|
145
25
|
this._propertyChanged.notify(this, "slug");
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
26
|
+
};
|
|
27
|
+
this._validateMargin(bleed, "bleed");
|
|
28
|
+
this._validateMargin(slug, "slug");
|
|
29
|
+
this.bleed = bleed !== null && bleed !== void 0 ? bleed : new Margin();
|
|
30
|
+
this.slug = slug !== null && slug !== void 0 ? slug : new Margin();
|
|
31
|
+
this._shape = this._ensureShape(shape, bounds);
|
|
32
|
+
this._subscribeShapeChanged();
|
|
33
|
+
}
|
|
34
|
+
get isRectangle() {
|
|
35
|
+
const { left, top, width, height } = this.bounds;
|
|
36
|
+
const rectanglePath = Path.rectangle(left, top, width, height);
|
|
37
|
+
return this.shape.equals(rectanglePath);
|
|
38
|
+
}
|
|
39
|
+
get bounds() {
|
|
40
|
+
return this._shape.calculateBounds();
|
|
41
|
+
}
|
|
42
|
+
set bounds(value) {
|
|
43
|
+
if (value == null)
|
|
44
|
+
throw new ArgumentException("PrintArea.bounds cannot be null.");
|
|
45
|
+
if (RectangleF.isEqual(this.bounds, value))
|
|
46
|
+
return;
|
|
47
|
+
this._resizeShape(value);
|
|
48
|
+
this._propertyChanged.notify(this, "bounds");
|
|
49
|
+
this._propertyChanged.notify(this, "shape");
|
|
50
|
+
}
|
|
51
|
+
get shape() {
|
|
52
|
+
return this._shape;
|
|
53
|
+
}
|
|
54
|
+
set shape(value) {
|
|
55
|
+
if (value == null)
|
|
56
|
+
throw new ArgumentException("PrintArea.shape cannot be null.");
|
|
57
|
+
if (this._shape != null && this._shape.isEqual(value))
|
|
58
|
+
return;
|
|
59
|
+
this._unsubscribeShapeChanged();
|
|
60
|
+
this._shape = value;
|
|
61
|
+
this._subscribeShapeChanged();
|
|
62
|
+
this._propertyChanged.notify(this, "shape");
|
|
63
|
+
this._propertyChanged.notify(this, "bounds");
|
|
64
|
+
}
|
|
65
|
+
get safetyLines() {
|
|
66
|
+
return this._safetyLines;
|
|
67
|
+
}
|
|
68
|
+
set safetyLines(value) {
|
|
69
|
+
if (this._safetyLines === value)
|
|
70
|
+
return;
|
|
71
|
+
this._safetyLines = value;
|
|
72
|
+
this._propertyChanged.notify(this, "safetyLines");
|
|
73
|
+
}
|
|
74
|
+
get cropMarks() {
|
|
75
|
+
return this._cropMarks;
|
|
76
|
+
}
|
|
77
|
+
set cropMarks(value) {
|
|
78
|
+
if (this._cropMarks === value)
|
|
79
|
+
return;
|
|
80
|
+
this._cropMarks = value;
|
|
81
|
+
this._propertyChanged.notify(this, "cropMarks");
|
|
82
|
+
}
|
|
83
|
+
get bleed() {
|
|
84
|
+
return this._bleed;
|
|
85
|
+
}
|
|
86
|
+
set bleed(value) {
|
|
87
|
+
if (equals(value, this._bleed))
|
|
88
|
+
return;
|
|
89
|
+
this._validateMargin(value, "bleed");
|
|
90
|
+
this._unsubscribeBleedPropertyChanged();
|
|
91
|
+
this._bleed = value;
|
|
92
|
+
this._subscribeBleedPropertyChanged();
|
|
93
|
+
this._propertyChanged.notify(this, "bleed");
|
|
94
|
+
}
|
|
95
|
+
get slug() {
|
|
96
|
+
return this._slug;
|
|
97
|
+
}
|
|
98
|
+
set slug(value) {
|
|
99
|
+
if (equals(value, this._slug))
|
|
100
|
+
return;
|
|
101
|
+
this._validateMargin(value, "slug");
|
|
102
|
+
this._unsubscribeSlugPropertyChanged();
|
|
103
|
+
this._slug = value;
|
|
104
|
+
this._subscribeSlugPropertyChanged();
|
|
105
|
+
this._propertyChanged.notify(this, "slug");
|
|
106
|
+
}
|
|
107
|
+
getBounds(type) {
|
|
151
108
|
switch (type) {
|
|
152
109
|
case PrintAreaBoundsType.Bleed:
|
|
153
110
|
return this.bounds.getExpanded(this.bleed);
|
|
@@ -161,8 +118,8 @@ var PrintArea = /** @class */ (function (_super) {
|
|
|
161
118
|
default:
|
|
162
119
|
return this.bounds.clone();
|
|
163
120
|
}
|
|
164
|
-
}
|
|
165
|
-
|
|
121
|
+
}
|
|
122
|
+
_ensureShape(shape, bounds) {
|
|
166
123
|
if (shape != null) {
|
|
167
124
|
this._shape = shape;
|
|
168
125
|
if (bounds != null)
|
|
@@ -172,17 +129,17 @@ var PrintArea = /** @class */ (function (_super) {
|
|
|
172
129
|
if (bounds != null)
|
|
173
130
|
return Path.rectangle(bounds.left, bounds.top, bounds.width, bounds.height);
|
|
174
131
|
return new Path();
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
132
|
+
}
|
|
133
|
+
_resizeShape(bounds) {
|
|
134
|
+
const current = this._shape.calculateBounds();
|
|
178
135
|
if (bounds == null || current.equals(bounds))
|
|
179
136
|
return;
|
|
180
137
|
if (current.isEmpty()) {
|
|
181
138
|
this._shape = Path.rectangle(bounds.left, bounds.top, bounds.width, bounds.height);
|
|
182
139
|
return;
|
|
183
140
|
}
|
|
184
|
-
|
|
185
|
-
|
|
141
|
+
const scaleX = bounds.width / current.width;
|
|
142
|
+
const scaleY = bounds.height / current.height;
|
|
186
143
|
if (!isFinite(scaleX) || !isFinite(scaleY)) {
|
|
187
144
|
this._unsubscribeShapeChanged();
|
|
188
145
|
this._shape = Path.rectangle(bounds.left, bounds.top, bounds.width, bounds.height);
|
|
@@ -192,60 +149,57 @@ var PrintArea = /** @class */ (function (_super) {
|
|
|
192
149
|
this._shape.translate(-current.left, -current.top);
|
|
193
150
|
this._shape.scale(scaleX, scaleY);
|
|
194
151
|
this._shape.translate(bounds.left, bounds.top);
|
|
195
|
-
}
|
|
196
|
-
|
|
152
|
+
}
|
|
153
|
+
_subscribeShapeChanged() {
|
|
197
154
|
if (this._shape != null)
|
|
198
155
|
this._shape.addPathChanged(this._onShapePathChanged);
|
|
199
|
-
}
|
|
200
|
-
|
|
156
|
+
}
|
|
157
|
+
_unsubscribeShapeChanged() {
|
|
201
158
|
if (this._shape != null)
|
|
202
159
|
this._shape.removePathChanged(this._onShapePathChanged);
|
|
203
|
-
}
|
|
204
|
-
|
|
160
|
+
}
|
|
161
|
+
_subscribeBleedPropertyChanged() {
|
|
205
162
|
if (this._bleed != null)
|
|
206
163
|
this._bleed.addPropertyChanged(this._onBleedPropertyChanged);
|
|
207
|
-
}
|
|
208
|
-
|
|
164
|
+
}
|
|
165
|
+
_unsubscribeBleedPropertyChanged() {
|
|
209
166
|
if (this._bleed != null)
|
|
210
167
|
this._bleed.removePropertyChanged(this._onBleedPropertyChanged);
|
|
211
|
-
}
|
|
212
|
-
|
|
168
|
+
}
|
|
169
|
+
_subscribeSlugPropertyChanged() {
|
|
213
170
|
if (this._slug != null)
|
|
214
171
|
this._slug.addPropertyChanged(this._onSlugPropertyChanged);
|
|
215
|
-
}
|
|
216
|
-
|
|
172
|
+
}
|
|
173
|
+
_unsubscribeSlugPropertyChanged() {
|
|
217
174
|
if (this._slug != null)
|
|
218
175
|
this._slug.removePropertyChanged(this._onSlugPropertyChanged);
|
|
219
|
-
}
|
|
220
|
-
|
|
176
|
+
}
|
|
177
|
+
_validateMargin(margin, marginName) {
|
|
221
178
|
if (margin != null && (margin.left < 0 || margin.top < 0 || margin.right < 0 || margin.bottom < 0))
|
|
222
|
-
throw new ArgumentException(
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
|
|
179
|
+
throw new ArgumentException(`PrintArea.ts: ${marginName} margin members cannot be negative!`);
|
|
180
|
+
}
|
|
181
|
+
getSimplifiedObject() {
|
|
182
|
+
const simplified = super.getSimplifiedObject(["parentSurface", "boundsWithMargins", "boundsWithBleed", "isRectangle"]);
|
|
226
183
|
return simplified;
|
|
227
|
-
}
|
|
228
|
-
|
|
184
|
+
}
|
|
185
|
+
_copy(source, destination, generateNewIds) {
|
|
229
186
|
var _a, _b;
|
|
230
|
-
|
|
187
|
+
super._copy(source, destination, generateNewIds);
|
|
231
188
|
destination.bounds = source.bounds != null ? source.bounds.clone() : null;
|
|
232
189
|
destination.shape = source._shape != null ? source.shape.clone() : null;
|
|
233
|
-
destination.safetyLines.addRange(source.safetyLines.toArray().map(
|
|
234
|
-
destination.cropMarks.addRange(source.cropMarks.toArray().map(
|
|
190
|
+
destination.safetyLines.addRange(source.safetyLines.toArray().map(s => s.clone()));
|
|
191
|
+
destination.cropMarks.addRange(source.cropMarks.toArray().map(c => c.clone()));
|
|
235
192
|
destination.bleed = (_a = source.bleed) === null || _a === void 0 ? void 0 : _a.clone();
|
|
236
193
|
destination.slug = (_b = source.slug) === null || _b === void 0 ? void 0 : _b.clone();
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
if (generateNewIds === void 0) { generateNewIds = false; }
|
|
194
|
+
}
|
|
195
|
+
clone(generateNewIds = false) {
|
|
240
196
|
var _a;
|
|
241
|
-
|
|
197
|
+
const printArea = new PrintArea(undefined, undefined, undefined, (_a = this.shape) === null || _a === void 0 ? void 0 : _a.clone());
|
|
242
198
|
this._copy(this, printArea, generateNewIds);
|
|
243
199
|
return printArea;
|
|
244
|
-
}
|
|
245
|
-
|
|
200
|
+
}
|
|
201
|
+
generateNewIds() {
|
|
246
202
|
this._generateNewId();
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
}(ModelComponent));
|
|
250
|
-
export { PrintArea };
|
|
203
|
+
}
|
|
204
|
+
}
|
|
251
205
|
//# sourceMappingURL=PrintArea.js.map
|
package/Product/PrintArea.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrintArea.js","sourceRoot":"","sources":["../../../src/design-atoms-model/Product/PrintArea.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PrintArea.js","sourceRoot":"","sources":["../../../src/design-atoms-model/Product/PrintArea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,E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,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAE/E,WAAW,CAAC,KAAK,GAAG,MAAA,MAAM,CAAC,KAAK,0CAAE,KAAK,EAAE,CAAC;QAC1C,WAAW,CAAC,IAAI,GAAG,MAAA,MAAM,CAAC,IAAI,0CAAE,KAAK,EAAE,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,iBAA0B,KAAK;;QACjC,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAA,IAAI,CAAC,KAAK,0CAAE,KAAK,EAAE,CAAC,CAAC;QACtF,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;QAC5C,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,cAAc;QACV,IAAI,CAAC,cAAc,EAAE,CAAC;IAC1B,CAAC;CACJ"}
|
package/Product/Product.js
CHANGED
|
@@ -1,128 +1,90 @@
|
|
|
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
|
import { ModelComponent } from "./ModelComponent";
|
|
15
2
|
import { Surface } from "./Surface";
|
|
16
|
-
import * as _ from "underscore";
|
|
17
3
|
import { Collection } from "../Collection";
|
|
18
4
|
import { PointF } from "../Math/index";
|
|
19
5
|
import { Palette } from "../Colors/Palette";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
_this._onSurfacesAdd = function (_a) {
|
|
31
|
-
var surface = _a.item;
|
|
32
|
-
surface.parentProduct = _this;
|
|
6
|
+
export class Product extends ModelComponent {
|
|
7
|
+
constructor(surfaces = []) {
|
|
8
|
+
super();
|
|
9
|
+
this.defaultDesignLocation = new PointF();
|
|
10
|
+
this._defaultSafetyLines = new Collection();
|
|
11
|
+
this._defaultCropMarks = new Collection();
|
|
12
|
+
this._surfaces = new Collection();
|
|
13
|
+
this._preferredFonts = [];
|
|
14
|
+
this._onSurfacesAdd = ({ item: surface }) => {
|
|
15
|
+
surface.parentProduct = this;
|
|
33
16
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return _this;
|
|
17
|
+
this.surfaces.add_collectionChanged(this._onSurfacesAdd);
|
|
18
|
+
this.surfaces.setRange(surfaces);
|
|
19
|
+
this.palette = new Palette();
|
|
38
20
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
enumerable: true,
|
|
47
|
-
configurable: true
|
|
48
|
-
});
|
|
49
|
-
Product.prototype.serialize = function (serializer, forServer) {
|
|
21
|
+
get surfaces() {
|
|
22
|
+
return this._surfaces;
|
|
23
|
+
}
|
|
24
|
+
set surfaces(value) {
|
|
25
|
+
this.surfaces.setRange(value);
|
|
26
|
+
}
|
|
27
|
+
serialize(serializer, forServer) {
|
|
50
28
|
return serializer.serialize(this, forServer);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
Object.defineProperty(Product.prototype, "preferredFonts", {
|
|
79
|
-
get: function () {
|
|
80
|
-
return this._preferredFonts;
|
|
81
|
-
},
|
|
82
|
-
set: function (value) {
|
|
83
|
-
this._preferredFonts = value;
|
|
84
|
-
this._propertyChanged.notify(this, "preferredFonts");
|
|
85
|
-
},
|
|
86
|
-
enumerable: true,
|
|
87
|
-
configurable: true
|
|
88
|
-
});
|
|
89
|
-
Product.prototype._copy = function (source, destination, generateNewIds) {
|
|
29
|
+
}
|
|
30
|
+
get defaultSafetyLines() {
|
|
31
|
+
return this._defaultSafetyLines;
|
|
32
|
+
}
|
|
33
|
+
set defaultSafetyLines(value) {
|
|
34
|
+
if (this._defaultSafetyLines === value)
|
|
35
|
+
return;
|
|
36
|
+
this._defaultSafetyLines = value;
|
|
37
|
+
this._propertyChanged.notify(this, "defaultSafetyLines");
|
|
38
|
+
}
|
|
39
|
+
get defaultCropMarks() {
|
|
40
|
+
return this._defaultCropMarks;
|
|
41
|
+
}
|
|
42
|
+
set defaultCropMarks(value) {
|
|
43
|
+
if (this._defaultCropMarks === value)
|
|
44
|
+
return;
|
|
45
|
+
this._defaultCropMarks = value;
|
|
46
|
+
this._propertyChanged.notify(this, "defaultCropMarks");
|
|
47
|
+
}
|
|
48
|
+
get preferredFonts() {
|
|
49
|
+
return this._preferredFonts;
|
|
50
|
+
}
|
|
51
|
+
set preferredFonts(value) {
|
|
52
|
+
this._preferredFonts = value;
|
|
53
|
+
this._propertyChanged.notify(this, "preferredFonts");
|
|
54
|
+
}
|
|
55
|
+
_copy(source, destination, generateNewIds) {
|
|
90
56
|
var _a;
|
|
91
|
-
|
|
92
|
-
destination.surfaces.addRange(source.surfaces.toArray().map(
|
|
57
|
+
super._copy(source, destination, generateNewIds);
|
|
58
|
+
destination.surfaces.addRange(source.surfaces.toArray().map(s => s.clone(generateNewIds)));
|
|
93
59
|
destination.watermarkConfig = source.watermarkConfig != null ? source.watermarkConfig.clone() : null;
|
|
94
|
-
destination.defaultCropMarks.addRange(source.defaultCropMarks.toArray().map(
|
|
95
|
-
destination.defaultSafetyLines.addRange(source.defaultSafetyLines.toArray().map(
|
|
60
|
+
destination.defaultCropMarks.addRange(source.defaultCropMarks.toArray().map(s => s.clone()));
|
|
61
|
+
destination.defaultSafetyLines.addRange(source.defaultSafetyLines.toArray().map(s => s.clone()));
|
|
96
62
|
destination.defaultDesignLocation = source.defaultDesignLocation.clone();
|
|
97
|
-
destination.palette.addRange(source.palette.select(
|
|
63
|
+
destination.palette.addRange(source.palette.select(x => x.clone(generateNewIds)));
|
|
98
64
|
destination.preferredFonts = (_a = source.preferredFonts) === null || _a === void 0 ? void 0 : _a.slice();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
var product = new Product();
|
|
65
|
+
}
|
|
66
|
+
clone(generateNewIds = false) {
|
|
67
|
+
const product = new Product();
|
|
103
68
|
this._copy(this, product, generateNewIds);
|
|
104
69
|
return product;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (options === void 0) { options = { ignoreMockups: false }; }
|
|
70
|
+
}
|
|
71
|
+
getAllItems(options = { ignoreMockups: false }) {
|
|
108
72
|
return Surface.getItems(this.surfaces, options);
|
|
109
|
-
}
|
|
110
|
-
|
|
73
|
+
}
|
|
74
|
+
generateNewIds() {
|
|
111
75
|
this._generateNewId();
|
|
112
|
-
this._surfaces.forEach(
|
|
113
|
-
}
|
|
76
|
+
this._surfaces.forEach(i => i.generateNewIds());
|
|
77
|
+
}
|
|
114
78
|
/**
|
|
115
79
|
* Get surface by name or index.
|
|
116
80
|
* @param key - Surface name or index.
|
|
117
81
|
*/
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
82
|
+
getSurface(key) {
|
|
83
|
+
const surfaces = this.surfaces.toArray();
|
|
84
|
+
const surfaceIndex = parseInt(key);
|
|
121
85
|
if (!Number.isNaN(surfaceIndex) && surfaceIndex >= 0 && surfaces.length > surfaceIndex)
|
|
122
86
|
return surfaces[surfaceIndex];
|
|
123
|
-
return
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
}(ModelComponent));
|
|
127
|
-
export { Product };
|
|
87
|
+
return surfaces.find((s) => s.name === key);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
128
90
|
//# sourceMappingURL=Product.js.map
|
package/Product/Product.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Product.js","sourceRoot":"","sources":["../../../src/design-atoms-model/Product/Product.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Product.js","sourceRoot":"","sources":["../../../src/design-atoms-model/Product/Product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,OAAO,OAAQ,SAAQ,cAAc;IAWvC,YAAY,WAAsB,EAAE;QAChC,KAAK,EAAE,CAAC;QARZ,0BAAqB,GAAG,IAAI,MAAM,EAAE,CAAC;QAE7B,wBAAmB,GAAG,IAAI,UAAU,EAAc,CAAC;QACnD,sBAAiB,GAAG,IAAI,UAAU,EAAY,CAAC;QAC/C,cAAS,GAAG,IAAI,UAAU,EAAW,CAAC;QACtC,oBAAe,GAAa,EAAE,CAAC;QAY/B,mBAAc,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAqB,EAAE,EAAE;YAC9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AAC;IAChE,CAAC;IAED,KAAK,CAAC,iBAA0B,KAAK;QACjC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;QAC1C,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,WAAW,CAAC,UAA+B,EAAE,aAAa,EAAE,KAAK,EAAE;QAC/D,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED,cAAc;QACV,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC;IACpD,CAAC;IAED;;;MAGE;IACF,UAAU,CAAC,GAAW;QAClB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;QACzC,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;QAEnC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,YAAY,IAAI,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,YAAY;YAClF,OAAO,QAAQ,CAAC,YAAY,CAAC,CAAC;QAElC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;IAChD,CAAC;CACJ"}
|
package/Product/SafetyLine.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { SizeF } from "../Math/SizeF";
|
|
|
4
4
|
import { INotifyPropertyChanged } from "../INotifyPropertyChanged";
|
|
5
5
|
import { EventWithSenderArg } from "../EventObject";
|
|
6
6
|
import { Margin } from "../Math/Margin";
|
|
7
|
-
export
|
|
7
|
+
export type MarginOrNumber = number | Margin;
|
|
8
8
|
export declare enum PdfBox {
|
|
9
9
|
Crop = "Crop",
|
|
10
10
|
Trim = "Trim",
|