@chili-publish/studio-sdk 1.10.1 → 1.11.6

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 (40) hide show
  1. package/_bundles/main.js +1 -1
  2. package/_bundles/main.js.map +1 -1
  3. package/_bundles/report.html +2 -2
  4. package/lib/editor-engine.json +1 -1
  5. package/lib/package.json +1 -1
  6. package/lib/src/controllers/ConnectorController.d.ts +6 -3
  7. package/lib/src/controllers/ConnectorController.js +14 -9
  8. package/lib/src/controllers/ConnectorController.js.map +1 -1
  9. package/lib/src/controllers/VariableController.d.ts +38 -2
  10. package/lib/src/controllers/VariableController.js +70 -10
  11. package/lib/src/controllers/VariableController.js.map +1 -1
  12. package/lib/src/index.d.ts +2 -2
  13. package/lib/src/index.js +1 -1
  14. package/lib/src/index.js.map +1 -1
  15. package/lib/src/interactions/connector.js +21 -25
  16. package/lib/src/interactions/connector.js.map +1 -1
  17. package/lib/src/next/index.d.ts +1 -0
  18. package/lib/src/next/types/NextSubscribers.d.ts +3 -0
  19. package/lib/src/next/types/NextSubscribers.js +2 -0
  20. package/lib/src/next/types/NextSubscribers.js.map +1 -0
  21. package/lib/src/sdk.d.ts +1 -0
  22. package/lib/src/sdk.js +8 -3
  23. package/lib/src/sdk.js.map +1 -1
  24. package/lib/src/tests/controllers/ConnectorController.test.js +38 -0
  25. package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -1
  26. package/lib/src/tests/controllers/SubscriberContoller.test.js +3 -0
  27. package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
  28. package/lib/src/tests/controllers/VariableController.test.js +28 -1
  29. package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
  30. package/lib/src/tests/interactions/connector.test.js +2 -2
  31. package/lib/src/tests/interactions/connector.test.js.map +1 -1
  32. package/lib/src/types/CommonTypes.d.ts +5 -2
  33. package/lib/src/types/CommonTypes.js.map +1 -1
  34. package/lib/src/types/ConnectorTypes.d.ts +19 -3
  35. package/lib/src/types/ConnectorTypes.js +1 -0
  36. package/lib/src/types/ConnectorTypes.js.map +1 -1
  37. package/lib/src/types/VariableTypes.d.ts +60 -1
  38. package/lib/src/types/VariableTypes.js +27 -0
  39. package/lib/src/types/VariableTypes.js.map +1 -1
  40. package/package.json +1 -1
@@ -27,7 +27,8 @@ export declare enum VariableType {
27
27
  list = "list",
28
28
  boolean = "boolean",
29
29
  group = "group",
30
- number = "number"
30
+ number = "number",
31
+ date = "date"
31
32
  }
32
33
  export interface Variable {
33
34
  id: string;
@@ -68,8 +69,66 @@ export interface NumberVariable extends Variable {
68
69
  showStepper: boolean;
69
70
  stepSize: number;
70
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
+ }
71
80
  export declare type LongTextVariable = ShortTextVariable;
72
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
+ }
73
132
  export interface NumberVariablePropertiesDeltaUpdate {
74
133
  minValue?: {
75
134
  value: number | null;
@@ -7,5 +7,32 @@ export var VariableType;
7
7
  VariableType["boolean"] = "boolean";
8
8
  VariableType["group"] = "group";
9
9
  VariableType["number"] = "number";
10
+ VariableType["date"] = "date";
10
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 = {}));
11
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,YAQX;AARD,WAAY,YAAY;IACpB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,iCAAiB,CAAA;AACrB,CAAC,EARW,YAAY,KAAZ,YAAY,QAQvB"}
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.10.1",
3
+ "version": "1.11.6",
4
4
  "description": "The sdk for the chili editor",
5
5
  "repository": {
6
6
  "type": "git",