@chili-publish/studio-sdk 1.9.1 → 1.11.0
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/_bundles/main.js +1 -1
- package/_bundles/main.js.map +1 -1
- package/_bundles/report.html +2 -2
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +5 -4
- package/lib/src/controllers/BarcodeController.d.ts +16 -0
- package/lib/src/controllers/BarcodeController.js +34 -0
- package/lib/src/controllers/BarcodeController.js.map +1 -1
- package/lib/src/controllers/CharacterStyleController.d.ts +7 -0
- package/lib/src/controllers/CharacterStyleController.js +10 -0
- package/lib/src/controllers/CharacterStyleController.js.map +1 -1
- package/lib/src/controllers/ParagraphStyleController.d.ts +2 -2
- package/lib/src/controllers/ParagraphStyleController.js +1 -1
- package/lib/src/controllers/ParagraphStyleController.js.map +1 -1
- package/lib/src/controllers/VariableController.d.ts +101 -2
- package/lib/src/controllers/VariableController.js +157 -2
- package/lib/src/controllers/VariableController.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.js +1 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/next/NextInitiator.d.ts +29 -0
- package/lib/src/next/NextInitiator.js +26 -0
- package/lib/src/next/NextInitiator.js.map +1 -0
- package/lib/src/next/controllers/SubscriberController.d.ts +20 -0
- package/lib/src/next/controllers/SubscriberController.js +21 -0
- package/lib/src/next/controllers/SubscriberController.js.map +1 -0
- package/lib/src/next/controllers/VariableController.d.ts +36 -0
- package/lib/src/next/controllers/VariableController.js +77 -0
- package/lib/src/next/controllers/VariableController.js.map +1 -0
- package/lib/src/next/index.d.ts +2 -0
- package/lib/src/next/index.js +2 -0
- package/lib/src/next/index.js.map +1 -0
- package/lib/src/next/tests/controllers/VariableController.test.d.ts +1 -0
- package/lib/src/next/tests/controllers/VariableController.test.js +86 -0
- package/lib/src/next/tests/controllers/VariableController.test.js.map +1 -0
- package/lib/src/next/types/NextSubscribers.d.ts +3 -0
- package/lib/src/next/types/NextSubscribers.js +2 -0
- package/lib/src/next/types/NextSubscribers.js.map +1 -0
- package/lib/src/next/types/VariableTypes.d.ts +5 -0
- package/lib/src/next/types/VariableTypes.js +2 -0
- package/lib/src/next/types/VariableTypes.js.map +1 -0
- package/lib/src/sdk.d.ts +3 -0
- package/lib/src/sdk.js +13 -1
- package/lib/src/sdk.js.map +1 -1
- package/lib/src/tests/controllers/BarcodeController.test.js +30 -0
- package/lib/src/tests/controllers/BarcodeController.test.js.map +1 -1
- package/lib/src/tests/controllers/CharacterStyleController.test.js +7 -0
- package/lib/src/tests/controllers/CharacterStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/VariableController.test.js +70 -1
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/types/BarcodeTypes.d.ts +3 -0
- package/lib/src/types/BarcodeTypes.js.map +1 -1
- package/lib/src/types/CommonTypes.d.ts +5 -2
- package/lib/src/types/CommonTypes.js.map +1 -1
- package/lib/src/types/ConnectorTypes.d.ts +3 -2
- package/lib/src/types/ConnectorTypes.js.map +1 -1
- package/lib/src/types/FrameTypes.d.ts +1 -0
- package/lib/src/types/FrameTypes.js.map +1 -1
- package/lib/src/types/VariableTypes.d.ts +98 -1
- package/lib/src/types/VariableTypes.js +28 -0
- package/lib/src/types/VariableTypes.js.map +1 -1
- package/package.json +5 -4
|
@@ -26,7 +26,9 @@ export declare enum VariableType {
|
|
|
26
26
|
image = "image",
|
|
27
27
|
list = "list",
|
|
28
28
|
boolean = "boolean",
|
|
29
|
-
group = "group"
|
|
29
|
+
group = "group",
|
|
30
|
+
number = "number",
|
|
31
|
+
date = "date"
|
|
30
32
|
}
|
|
31
33
|
export interface Variable {
|
|
32
34
|
id: string;
|
|
@@ -56,5 +58,100 @@ export interface BooleanVariable extends Variable {
|
|
|
56
58
|
export interface ShortTextVariable extends Variable {
|
|
57
59
|
value: string;
|
|
58
60
|
}
|
|
61
|
+
export interface NumberVariable extends Variable {
|
|
62
|
+
value: number;
|
|
63
|
+
numberOfDecimals: number;
|
|
64
|
+
decimalCharacterStyleId?: string;
|
|
65
|
+
decimalSeparator: string;
|
|
66
|
+
thousandsSeparator: string;
|
|
67
|
+
minValue?: number;
|
|
68
|
+
maxValue?: number;
|
|
69
|
+
showStepper: boolean;
|
|
70
|
+
stepSize: number;
|
|
71
|
+
}
|
|
72
|
+
export interface DateVariable extends Variable {
|
|
73
|
+
value?: string;
|
|
74
|
+
displayFormat: string;
|
|
75
|
+
startDate?: DateRestriction;
|
|
76
|
+
endDate?: DateRestriction;
|
|
77
|
+
excludedDays: Day[];
|
|
78
|
+
locale: Locale;
|
|
79
|
+
}
|
|
59
80
|
export declare type LongTextVariable = ShortTextVariable;
|
|
60
81
|
export declare type GroupVariable = Variable;
|
|
82
|
+
export declare type DateRestriction = RelativeDate | AbsoluteDate;
|
|
83
|
+
export interface RelativeDate {
|
|
84
|
+
offset: number;
|
|
85
|
+
type: 'relative';
|
|
86
|
+
}
|
|
87
|
+
export interface AbsoluteDate {
|
|
88
|
+
value: string;
|
|
89
|
+
type: 'absolute';
|
|
90
|
+
}
|
|
91
|
+
export declare enum Day {
|
|
92
|
+
Monday = "monday",
|
|
93
|
+
Tuesday = "tuesday",
|
|
94
|
+
Wednesday = "wednesday",
|
|
95
|
+
Thursday = "thursday",
|
|
96
|
+
Friday = "friday",
|
|
97
|
+
Saturday = "saturday",
|
|
98
|
+
Sunday = "sunday"
|
|
99
|
+
}
|
|
100
|
+
export declare enum Locale {
|
|
101
|
+
en_US = "en_US",
|
|
102
|
+
cs = "cs",
|
|
103
|
+
da = "da",
|
|
104
|
+
nl = "nl",
|
|
105
|
+
fi = "fi",
|
|
106
|
+
fr = "fr",
|
|
107
|
+
de = "de",
|
|
108
|
+
it = "it",
|
|
109
|
+
no = "no",
|
|
110
|
+
pl = "pl",
|
|
111
|
+
pt_PT = "pt_PT",
|
|
112
|
+
es_ES = "es_ES",
|
|
113
|
+
sv = "sv"
|
|
114
|
+
}
|
|
115
|
+
export interface DateVariablePropertiesDeltaUpdate {
|
|
116
|
+
startDate?: {
|
|
117
|
+
value: DateRestriction | null;
|
|
118
|
+
};
|
|
119
|
+
endDate?: {
|
|
120
|
+
value: DateRestriction | null;
|
|
121
|
+
};
|
|
122
|
+
excludedDays?: {
|
|
123
|
+
value: Day[] | null;
|
|
124
|
+
};
|
|
125
|
+
locale?: {
|
|
126
|
+
value: Locale;
|
|
127
|
+
};
|
|
128
|
+
displayFormat?: {
|
|
129
|
+
value: string;
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
export interface NumberVariablePropertiesDeltaUpdate {
|
|
133
|
+
minValue?: {
|
|
134
|
+
value: number | null;
|
|
135
|
+
};
|
|
136
|
+
maxValue?: {
|
|
137
|
+
value: number | null;
|
|
138
|
+
};
|
|
139
|
+
showStepper?: {
|
|
140
|
+
value: boolean;
|
|
141
|
+
};
|
|
142
|
+
stepSize?: {
|
|
143
|
+
value: number;
|
|
144
|
+
};
|
|
145
|
+
numberOfDecimals?: {
|
|
146
|
+
value: number;
|
|
147
|
+
};
|
|
148
|
+
decimalCharacterStyleId?: {
|
|
149
|
+
value: string | null;
|
|
150
|
+
};
|
|
151
|
+
decimalSeparator?: {
|
|
152
|
+
value: string;
|
|
153
|
+
};
|
|
154
|
+
thousandsSeparator?: {
|
|
155
|
+
value: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
@@ -6,5 +6,33 @@ export var VariableType;
|
|
|
6
6
|
VariableType["list"] = "list";
|
|
7
7
|
VariableType["boolean"] = "boolean";
|
|
8
8
|
VariableType["group"] = "group";
|
|
9
|
+
VariableType["number"] = "number";
|
|
10
|
+
VariableType["date"] = "date";
|
|
9
11
|
})(VariableType || (VariableType = {}));
|
|
12
|
+
export var Day;
|
|
13
|
+
(function (Day) {
|
|
14
|
+
Day["Monday"] = "monday";
|
|
15
|
+
Day["Tuesday"] = "tuesday";
|
|
16
|
+
Day["Wednesday"] = "wednesday";
|
|
17
|
+
Day["Thursday"] = "thursday";
|
|
18
|
+
Day["Friday"] = "friday";
|
|
19
|
+
Day["Saturday"] = "saturday";
|
|
20
|
+
Day["Sunday"] = "sunday";
|
|
21
|
+
})(Day || (Day = {}));
|
|
22
|
+
export var Locale;
|
|
23
|
+
(function (Locale) {
|
|
24
|
+
Locale["en_US"] = "en_US";
|
|
25
|
+
Locale["cs"] = "cs";
|
|
26
|
+
Locale["da"] = "da";
|
|
27
|
+
Locale["nl"] = "nl";
|
|
28
|
+
Locale["fi"] = "fi";
|
|
29
|
+
Locale["fr"] = "fr";
|
|
30
|
+
Locale["de"] = "de";
|
|
31
|
+
Locale["it"] = "it";
|
|
32
|
+
Locale["no"] = "no";
|
|
33
|
+
Locale["pl"] = "pl";
|
|
34
|
+
Locale["pt_PT"] = "pt_PT";
|
|
35
|
+
Locale["es_ES"] = "es_ES";
|
|
36
|
+
Locale["sv"] = "sv";
|
|
37
|
+
})(Locale || (Locale = {}));
|
|
10
38
|
//# sourceMappingURL=VariableTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VariableTypes.js","sourceRoot":"","sources":["../../../src/types/VariableTypes.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"VariableTypes.js","sourceRoot":"","sources":["../../../src/types/VariableTypes.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACpB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,6BAAa,CAAA;AACjB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAyED,MAAM,CAAN,IAAY,GAQX;AARD,WAAY,GAAG;IACX,wBAAiB,CAAA;IACjB,0BAAmB,CAAA;IACnB,8BAAuB,CAAA;IACvB,4BAAqB,CAAA;IACrB,wBAAiB,CAAA;IACjB,4BAAqB,CAAA;IACrB,wBAAiB,CAAA;AACrB,CAAC,EARW,GAAG,KAAH,GAAG,QAQd;AAED,MAAM,CAAN,IAAY,MAcX;AAdD,WAAY,MAAM;IACd,yBAAe,CAAA;IACf,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,mBAAS,CAAA;IACT,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,mBAAS,CAAA;AACb,CAAC,EAdW,MAAM,KAAN,MAAM,QAcjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chili-publish/studio-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "The sdk for the chili editor",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -50,9 +50,10 @@
|
|
|
50
50
|
"node": ">=18.0.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
|
-
"clean": "shx rm -rf _bundles lib lib-esm",
|
|
54
|
-
"build": "yarn clean &&
|
|
55
|
-
"build:
|
|
53
|
+
"clean": "shx rm -rf _bundles lib lib-esm next",
|
|
54
|
+
"build": "yarn clean && yarn build:modules && webpack --config webpack.config.js --env env=production",
|
|
55
|
+
"build:modules": "tsc && tsc -m es6 --outDir lib-esm ",
|
|
56
|
+
"build:dev": "yarn clean && yarn build:modules && webpack --config webpack.config.js --env env=development",
|
|
56
57
|
"lint": "eslint --fix \"./src/**/*.{js,jsx,ts,tsx,json}\"",
|
|
57
58
|
"testw": "jest --watch",
|
|
58
59
|
"test": "jest",
|