@aurigma/design-atoms-model 7.0.22 → 7.0.23
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/Product/Effects/ColorDictionaryEntry.d.ts +4 -2
- package/Product/Effects/ColorDictionaryEntry.js +3 -1
- package/Product/Effects/ColorDictionaryEntry.js.map +1 -1
- package/Product/Effects/NDEffects.d.ts +12 -1
- package/Product/Effects/RecolorEffectParameters.d.ts +15 -1
- package/Product/Effects/RecolorEffectParameters.js +11 -9
- package/Product/Effects/RecolorEffectParameters.js.map +1 -1
- package/Version.d.ts +1 -1
- package/Version.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
var ColorDictionaryEntry = /** @class */ (function () {
|
|
2
|
-
function ColorDictionaryEntry() {
|
|
2
|
+
function ColorDictionaryEntry(keyColor, valueColor) {
|
|
3
|
+
this.keyColor = keyColor.getData();
|
|
4
|
+
this.valueColor = valueColor.getData();
|
|
3
5
|
}
|
|
4
6
|
return ColorDictionaryEntry;
|
|
5
7
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorDictionaryEntry.js","sourceRoot":"","sources":["../../../../src/design-atoms-model/Product/Effects/ColorDictionaryEntry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColorDictionaryEntry.js","sourceRoot":"","sources":["../../../../src/design-atoms-model/Product/Effects/ColorDictionaryEntry.ts"],"names":[],"mappings":"AAEA;IAII,8BAAY,QAAe,EAAE,UAAiB;QAC1C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;IAC3C,CAAC;IACL,2BAAC;AAAD,CAAC,AARD,IAQC"}
|
|
@@ -16,7 +16,18 @@ export declare class NDEffects implements IEqualsReady {
|
|
|
16
16
|
None: {};
|
|
17
17
|
Recolor: {
|
|
18
18
|
defaultColorReplacements: import("../..").Collection<import("./ColorDictionaryEntry").ColorDictionaryEntry>;
|
|
19
|
-
|
|
19
|
+
currentColorReplacements: import("../..").Collection<import("./ColorDictionaryEntry").ColorDictionaryEntry>;
|
|
20
|
+
reducedColorImageSource: {
|
|
21
|
+
id: string;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
isVector: boolean;
|
|
25
|
+
pageIndex: number;
|
|
26
|
+
url: string;
|
|
27
|
+
actualSize: boolean;
|
|
28
|
+
saveAspectRatio: boolean;
|
|
29
|
+
origin: import("..").ImageItem.ImageSource.Origin;
|
|
30
|
+
};
|
|
20
31
|
};
|
|
21
32
|
};
|
|
22
33
|
}
|
|
@@ -3,13 +3,16 @@ import { IEqualsReady } from "../../Utils";
|
|
|
3
3
|
import { EffectParameters } from "./NDEffectParameters";
|
|
4
4
|
import { Collection } from "../../Collection";
|
|
5
5
|
import { ColorDictionaryEntry } from "./ColorDictionaryEntry";
|
|
6
|
+
import { ImageItem } from "../Items";
|
|
6
7
|
export interface IRawRecolorEffectParameters {
|
|
7
8
|
defaultColorReplacements: ColorDictionaryEntry[];
|
|
8
9
|
currentColorReplacements: ColorDictionaryEntry[];
|
|
10
|
+
reducedColorImageSource: any;
|
|
9
11
|
}
|
|
10
12
|
export declare class RecolorEffectParameters extends EffectParameters implements IEqualsReady {
|
|
11
13
|
defaultColorReplacements: Map<Color, Color>;
|
|
12
14
|
currentColorReplacements: Map<Color, Color>;
|
|
15
|
+
reducedColorImageSource: ImageItem.ImageSource;
|
|
13
16
|
get defaultColorReplacementValues(): Color[];
|
|
14
17
|
get defaultColorReplacementKeys(): Color[];
|
|
15
18
|
get currentColorReplacementValues(): Color[];
|
|
@@ -18,7 +21,18 @@ export declare class RecolorEffectParameters extends EffectParameters implements
|
|
|
18
21
|
equals(recolorParams: RecolorEffectParameters): boolean;
|
|
19
22
|
toJSON(): {
|
|
20
23
|
defaultColorReplacements: Collection<ColorDictionaryEntry>;
|
|
21
|
-
|
|
24
|
+
currentColorReplacements: Collection<ColorDictionaryEntry>;
|
|
25
|
+
reducedColorImageSource: {
|
|
26
|
+
id: string;
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
isVector: boolean;
|
|
30
|
+
pageIndex: number;
|
|
31
|
+
url: string;
|
|
32
|
+
actualSize: boolean;
|
|
33
|
+
saveAspectRatio: boolean;
|
|
34
|
+
origin: ImageItem.ImageSource.Origin;
|
|
35
|
+
};
|
|
22
36
|
};
|
|
23
37
|
private _dictionaryToEntriesJSON;
|
|
24
38
|
clone(): RecolorEffectParameters;
|
|
@@ -62,6 +62,7 @@ var RecolorEffectParameters = /** @class */ (function (_super) {
|
|
|
62
62
|
};
|
|
63
63
|
RecolorEffectParameters.prototype.equals = function (recolorParams) {
|
|
64
64
|
var _this = this;
|
|
65
|
+
var _a;
|
|
65
66
|
if (recolorParams == null)
|
|
66
67
|
return false;
|
|
67
68
|
var replacementKeysIsEqual = recolorParams.currentColorReplacementKeys.every(function (color, index) {
|
|
@@ -74,30 +75,30 @@ var RecolorEffectParameters = /** @class */ (function (_super) {
|
|
|
74
75
|
var defaultValuesIsEqual = recolorParams.defaultColorReplacementValues.every(function (color, index) {
|
|
75
76
|
return color.equals(_this.defaultColorReplacementValues[index]);
|
|
76
77
|
});
|
|
78
|
+
var reducedColorImageSourceIsEqual = (_a = this.reducedColorImageSource) === null || _a === void 0 ? void 0 : _a.equals(recolorParams.reducedColorImageSource);
|
|
77
79
|
return (replacementKeysIsEqual &&
|
|
78
80
|
replacementValueIsEqual &&
|
|
79
81
|
defaultKeysIsEqual &&
|
|
80
|
-
defaultValuesIsEqual
|
|
82
|
+
defaultValuesIsEqual &&
|
|
83
|
+
reducedColorImageSourceIsEqual);
|
|
81
84
|
};
|
|
82
85
|
RecolorEffectParameters.prototype.toJSON = function () {
|
|
86
|
+
var _a;
|
|
83
87
|
return {
|
|
84
88
|
defaultColorReplacements: this._dictionaryToEntriesJSON(this.defaultColorReplacements),
|
|
85
|
-
|
|
89
|
+
currentColorReplacements: this._dictionaryToEntriesJSON(this.currentColorReplacements),
|
|
90
|
+
reducedColorImageSource: (_a = this.reducedColorImageSource) === null || _a === void 0 ? void 0 : _a.toJSON(),
|
|
86
91
|
};
|
|
87
92
|
};
|
|
88
93
|
RecolorEffectParameters.prototype._dictionaryToEntriesJSON = function (dictionary) {
|
|
89
94
|
var result = new Collection();
|
|
90
|
-
dictionary.forEach(function (
|
|
91
|
-
|
|
92
|
-
var keyData = key.getData();
|
|
93
|
-
newEntry.keyColor = JSON.stringify(keyData);
|
|
94
|
-
var valueData = value.getData();
|
|
95
|
-
newEntry.valueColor = JSON.stringify(valueData);
|
|
96
|
-
result.add(newEntry);
|
|
95
|
+
dictionary.forEach(function (value, key) {
|
|
96
|
+
return result.add(new ColorDictionaryEntry(key, value));
|
|
97
97
|
});
|
|
98
98
|
return result;
|
|
99
99
|
};
|
|
100
100
|
RecolorEffectParameters.prototype.clone = function () {
|
|
101
|
+
var _a;
|
|
101
102
|
var recolorEffectParameters = new RecolorEffectParameters();
|
|
102
103
|
var defaultColorReplacementDictionary = new Map();
|
|
103
104
|
this.defaultColorReplacements.forEach(function (key, color) {
|
|
@@ -111,6 +112,7 @@ var RecolorEffectParameters = /** @class */ (function (_super) {
|
|
|
111
112
|
defaultColorReplacementDictionary;
|
|
112
113
|
recolorEffectParameters.currentColorReplacements =
|
|
113
114
|
colorReplacementDictionary;
|
|
115
|
+
recolorEffectParameters.reducedColorImageSource = (_a = this.reducedColorImageSource) === null || _a === void 0 ? void 0 : _a.clone();
|
|
114
116
|
return recolorEffectParameters;
|
|
115
117
|
};
|
|
116
118
|
return RecolorEffectParameters;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecolorEffectParameters.js","sourceRoot":"","sources":["../../../../src/design-atoms-model/Product/Effects/RecolorEffectParameters.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"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B,0CAAE,KAAK,EAAE,CAAC;QAExC,OAAO,uBAAuB,CAAC;IACjC,CAAC;IACH,8BAAC;AAAD,CAAC,AA9GD,CACU,gBAAgB,GA6GzB"}
|
package/Version.d.ts
CHANGED
package/Version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "7.0.
|
|
2
|
+
"version": "7.0.23",
|
|
3
3
|
"name": "@aurigma/design-atoms-model",
|
|
4
4
|
"license": "SEE LICENSE IN License.md",
|
|
5
5
|
"description": "Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.",
|