@panneau/core 4.0.38 → 4.0.40-alpha.3
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/dist/contexts.d.ts +78 -34
- package/dist/contexts.js +1332 -621
- package/dist/hooks.d.ts +41 -0
- package/dist/hooks.js +1395 -847
- package/dist/index.d.ts +26 -9
- package/dist/index.js +485 -609
- package/dist/utils.d.ts +40 -6
- package/dist/utils.js +232 -354
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,662 +1,538 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
3
|
-
import _createClass from '@babel/runtime/helpers/createClass';
|
|
4
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
5
|
-
import { getComponentFromName, flattenComponents } from '@panneau/core/utils';
|
|
6
|
-
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
1
|
+
import { flattenComponents, getComponentFromName } from '@panneau/core/utils';
|
|
7
2
|
import isArray from 'lodash/isArray';
|
|
8
3
|
import uniqBy from 'lodash/uniqBy';
|
|
9
|
-
import _callSuper from '@babel/runtime/helpers/callSuper';
|
|
10
|
-
import _inherits from '@babel/runtime/helpers/inherits';
|
|
11
4
|
import EventEmitter from 'wolfy87-eventemitter';
|
|
12
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
13
5
|
import isObject from 'lodash/isObject';
|
|
14
6
|
import uniq from 'lodash/uniq';
|
|
15
7
|
import { Tracking as Tracking$1 } from '@folklore/tracking';
|
|
16
8
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var components = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
20
|
-
_classCallCheck(this, ComponentsManager);
|
|
21
|
-
_defineProperty(this, "components", void 0);
|
|
9
|
+
class ComponentsManager {
|
|
10
|
+
constructor(components = {}) {
|
|
22
11
|
this.components = flattenComponents(components);
|
|
23
12
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
}, {
|
|
47
|
-
key: "addNamespace",
|
|
48
|
-
value: function addNamespace(namespace) {
|
|
49
|
-
var _this = this;
|
|
50
|
-
if (namespace === null) {
|
|
51
|
-
return this;
|
|
52
|
-
}
|
|
53
|
-
this.components = Object.keys(this.components).reduce(function (componentsMap, name) {
|
|
54
|
-
return _objectSpread(_objectSpread({}, componentsMap), {}, _defineProperty({}, "".concat(namespace, ".").concat(name), _this.components[name]));
|
|
55
|
-
}, {});
|
|
13
|
+
addComponent(name, component, namespace = null) {
|
|
14
|
+
return this.addComponents({
|
|
15
|
+
[name]: component
|
|
16
|
+
}, namespace);
|
|
17
|
+
}
|
|
18
|
+
addComponents(components, namespace = null) {
|
|
19
|
+
const newComponents = namespace !== null ? Object.keys(components).reduce((componentsMaps, name) => ({
|
|
20
|
+
...componentsMaps,
|
|
21
|
+
[`${namespace}.${name}`]: components[name]
|
|
22
|
+
}), {}) : components;
|
|
23
|
+
this.components = {
|
|
24
|
+
...this.components,
|
|
25
|
+
...newComponents
|
|
26
|
+
};
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
merge(manager, namespace = null) {
|
|
30
|
+
return this.addComponents(manager.getComponents(), namespace);
|
|
31
|
+
}
|
|
32
|
+
addNamespace(namespace) {
|
|
33
|
+
if (namespace === null) {
|
|
56
34
|
return this;
|
|
57
35
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}]);
|
|
83
|
-
}();
|
|
36
|
+
this.components = Object.keys(this.components).reduce((componentsMap, name) => ({
|
|
37
|
+
...componentsMap,
|
|
38
|
+
[`${namespace}.${name}`]: this.components[name]
|
|
39
|
+
}), {});
|
|
40
|
+
return this;
|
|
41
|
+
}
|
|
42
|
+
getComponent(name, namespace = null) {
|
|
43
|
+
const components = this.getComponents(namespace);
|
|
44
|
+
return getComponentFromName(name, components);
|
|
45
|
+
}
|
|
46
|
+
getComponents(namespace = null) {
|
|
47
|
+
return namespace !== null ? Object.keys(this.components || {}).reduce((componentsMap, name) => {
|
|
48
|
+
const pattern = new RegExp(`^${namespace}\\.(.*)$`);
|
|
49
|
+
const matches = pattern.exec(name);
|
|
50
|
+
return matches !== null ? {
|
|
51
|
+
...(componentsMap || {}),
|
|
52
|
+
[matches[1]]: this.components[name]
|
|
53
|
+
} : componentsMap;
|
|
54
|
+
}, null) : this.components;
|
|
55
|
+
}
|
|
56
|
+
hasComponent(name, namespace = null) {
|
|
57
|
+
return this.components !== null && typeof this.components[namespace !== null ? `${namespace}.${name}` : name] !== 'undefined';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
84
60
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
var definitions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
88
|
-
_classCallCheck(this, DefinitionsManager);
|
|
89
|
-
_defineProperty(this, "definitions", void 0);
|
|
61
|
+
class DefinitionsManager {
|
|
62
|
+
constructor(definitions = []) {
|
|
90
63
|
this.definitions = definitions || [];
|
|
91
64
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}, {
|
|
107
|
-
key: "merge",
|
|
108
|
-
value: function merge(manager) {
|
|
109
|
-
return this.addDefinitions(manager.getDefinitions());
|
|
110
|
-
}
|
|
111
|
-
}, {
|
|
112
|
-
key: "getDefinition",
|
|
113
|
-
value: function getDefinition(id) {
|
|
114
|
-
if (id === null) {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
return this.definitions.find(function (it) {
|
|
118
|
-
return it.id === id;
|
|
119
|
-
}) || null;
|
|
120
|
-
}
|
|
121
|
-
}, {
|
|
122
|
-
key: "getDefinitions",
|
|
123
|
-
value: function getDefinitions() {
|
|
124
|
-
return this.definitions;
|
|
125
|
-
}
|
|
126
|
-
}, {
|
|
127
|
-
key: "hasDefinition",
|
|
128
|
-
value: function hasDefinition(id) {
|
|
129
|
-
return this.getDefinition(id) !== null;
|
|
130
|
-
}
|
|
131
|
-
}, {
|
|
132
|
-
key: "getComponent",
|
|
133
|
-
value: function getComponent(id) {
|
|
134
|
-
var _ref = this.getDefinition(id) || {},
|
|
135
|
-
_ref$component = _ref.component,
|
|
136
|
-
component = _ref$component === void 0 ? null : _ref$component;
|
|
137
|
-
return component;
|
|
138
|
-
}
|
|
139
|
-
}, {
|
|
140
|
-
key: "getComponents",
|
|
141
|
-
value: function getComponents() {
|
|
142
|
-
return this.definitions.reduce(function (allComponents, _ref2) {
|
|
143
|
-
var id = _ref2.id,
|
|
144
|
-
_ref2$component = _ref2.component,
|
|
145
|
-
component = _ref2$component === void 0 ? null : _ref2$component;
|
|
146
|
-
return component !== null ? _objectSpread(_objectSpread({}, allComponents), {}, _defineProperty({}, id, component)) : allComponents;
|
|
147
|
-
}, {});
|
|
65
|
+
addDefinition(definition) {
|
|
66
|
+
this.addDefinitions(isArray(definition) ? definition : [definition]);
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
addDefinitions(definitions) {
|
|
70
|
+
this.definitions = uniqBy([...definitions, ...this.definitions], it => it.id);
|
|
71
|
+
return this;
|
|
72
|
+
}
|
|
73
|
+
merge(manager) {
|
|
74
|
+
return this.addDefinitions(manager.getDefinitions());
|
|
75
|
+
}
|
|
76
|
+
getDefinition(id) {
|
|
77
|
+
if (id === null) {
|
|
78
|
+
return null;
|
|
148
79
|
}
|
|
149
|
-
|
|
150
|
-
}
|
|
80
|
+
return this.definitions.find(it => it.id === id) || null;
|
|
81
|
+
}
|
|
82
|
+
getDefinitions() {
|
|
83
|
+
return this.definitions;
|
|
84
|
+
}
|
|
85
|
+
hasDefinition(id) {
|
|
86
|
+
return this.getDefinition(id) !== null;
|
|
87
|
+
}
|
|
88
|
+
getComponent(id) {
|
|
89
|
+
const {
|
|
90
|
+
component = null
|
|
91
|
+
} = this.getDefinition(id) || {};
|
|
92
|
+
return component;
|
|
93
|
+
}
|
|
94
|
+
getComponents() {
|
|
95
|
+
return this.definitions.reduce((allComponents, {
|
|
96
|
+
id,
|
|
97
|
+
component = null
|
|
98
|
+
}) => component !== null ? {
|
|
99
|
+
...allComponents,
|
|
100
|
+
[id]: component
|
|
101
|
+
} : allComponents, {});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
151
104
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
key: "subscribe",
|
|
168
|
-
value: function subscribe(event, callback) {
|
|
169
|
-
this.on(event, callback);
|
|
170
|
-
this.events = _objectSpread(_objectSpread({}, this.events), {}, _defineProperty({}, event, [].concat(_toConsumableArray(this.events[event] || []), [callback])));
|
|
171
|
-
if (this.events[event].length === 1) {
|
|
172
|
-
this.addEventListener(event);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}, {
|
|
176
|
-
key: "unsubscribe",
|
|
177
|
-
value: function unsubscribe(event, callback) {
|
|
178
|
-
var _this2 = this;
|
|
179
|
-
this.off(event, callback);
|
|
180
|
-
this.events = Object.keys(this.events).reduce(function (newEvents, eventName) {
|
|
181
|
-
if (eventName !== event) {
|
|
182
|
-
return _objectSpread(_objectSpread({}, newEvents), {}, _defineProperty({}, eventName, _this2.events[eventName]));
|
|
183
|
-
}
|
|
184
|
-
var newListeners = _this2.events[eventName].filter(function (listener) {
|
|
185
|
-
return listener !== callback;
|
|
186
|
-
});
|
|
187
|
-
return newListeners.length > 0 ? _objectSpread(_objectSpread({}, newEvents), {}, _defineProperty({}, eventName, newListeners)) : newEvents;
|
|
188
|
-
}, {});
|
|
189
|
-
if (typeof this.events[event] === 'undefined') {
|
|
190
|
-
this.removeEventListener(event);
|
|
191
|
-
}
|
|
105
|
+
class EventsManager extends EventEmitter {
|
|
106
|
+
constructor(element) {
|
|
107
|
+
super();
|
|
108
|
+
this.element = element;
|
|
109
|
+
this.events = {};
|
|
110
|
+
this.listeners = {};
|
|
111
|
+
}
|
|
112
|
+
subscribe(event, callback) {
|
|
113
|
+
this.on(event, callback);
|
|
114
|
+
this.events = {
|
|
115
|
+
...this.events,
|
|
116
|
+
[event]: [...(this.events[event] || []), callback]
|
|
117
|
+
};
|
|
118
|
+
if (this.events[event].length === 1) {
|
|
119
|
+
this.addEventListener(event);
|
|
192
120
|
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
if (
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
return _this3.emit.apply(_this3, [event].concat(args));
|
|
121
|
+
}
|
|
122
|
+
unsubscribe(event, callback) {
|
|
123
|
+
this.off(event, callback);
|
|
124
|
+
this.events = Object.keys(this.events).reduce((newEvents, eventName) => {
|
|
125
|
+
if (eventName !== event) {
|
|
126
|
+
return {
|
|
127
|
+
...newEvents,
|
|
128
|
+
[eventName]: this.events[eventName]
|
|
203
129
|
};
|
|
204
130
|
}
|
|
205
|
-
this.
|
|
131
|
+
const newListeners = this.events[eventName].filter(listener => listener !== callback);
|
|
132
|
+
return newListeners.length > 0 ? {
|
|
133
|
+
...newEvents,
|
|
134
|
+
[eventName]: newListeners
|
|
135
|
+
} : newEvents;
|
|
136
|
+
}, {});
|
|
137
|
+
if (typeof this.events[event] === 'undefined') {
|
|
138
|
+
this.removeEventListener(event);
|
|
206
139
|
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
this.
|
|
140
|
+
}
|
|
141
|
+
addEventListener(event) {
|
|
142
|
+
if (typeof this.listeners[event] === 'undefined') {
|
|
143
|
+
this.listeners[event] = (...args) => this.emit(event, ...args);
|
|
211
144
|
}
|
|
212
|
-
|
|
213
|
-
}
|
|
145
|
+
this.element.addEventListener(event, this.listeners[event]);
|
|
146
|
+
}
|
|
147
|
+
removeEventListener(event) {
|
|
148
|
+
this.element.removeEventListener(event, this.listeners[event]);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
214
151
|
|
|
215
|
-
|
|
216
|
-
function FieldsManager() {
|
|
217
|
-
_classCallCheck(this, FieldsManager);
|
|
218
|
-
return _callSuper(this, FieldsManager, arguments);
|
|
219
|
-
}
|
|
220
|
-
_inherits(FieldsManager, _DefinitionsManager);
|
|
221
|
-
return _createClass(FieldsManager);
|
|
222
|
-
}(DefinitionsManager);
|
|
152
|
+
class FieldsManager extends DefinitionsManager {}
|
|
223
153
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
_classCallCheck(this, FontsParser);
|
|
230
|
-
_defineProperty(this, "fieldsManager", void 0);
|
|
231
|
-
_defineProperty(this, "screensManager", void 0);
|
|
154
|
+
class FontsParser {
|
|
155
|
+
constructor({
|
|
156
|
+
fieldsManager,
|
|
157
|
+
screensManager
|
|
158
|
+
}) {
|
|
232
159
|
this.fieldsManager = fieldsManager;
|
|
233
160
|
this.screensManager = screensManager;
|
|
234
161
|
}
|
|
235
162
|
|
|
236
163
|
// Extract fonts
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
if (story === null) {
|
|
242
|
-
return story;
|
|
243
|
-
}
|
|
164
|
+
parse(story) {
|
|
165
|
+
if (story === null) {
|
|
166
|
+
return story;
|
|
167
|
+
}
|
|
244
168
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
169
|
+
// Extract fonts from screen
|
|
170
|
+
const {
|
|
171
|
+
theme = null,
|
|
172
|
+
components = []
|
|
173
|
+
} = story || {};
|
|
174
|
+
const fonts = uniq(components.reduce((currentFonts, screen) => {
|
|
175
|
+
const {
|
|
176
|
+
type
|
|
177
|
+
} = screen;
|
|
178
|
+
const {
|
|
179
|
+
fields = []
|
|
180
|
+
} = this.screensManager.getDefinition(type) || {};
|
|
181
|
+
const fieldsPattern = this.getFieldsPattern(fields);
|
|
182
|
+
const newFonts = FontsParser.extractFontsWithPaths(screen, fieldsPattern);
|
|
183
|
+
return newFonts.length > 0 ? [...currentFonts, ...newFonts] : currentFonts;
|
|
184
|
+
}, []), 'name');
|
|
260
185
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
var fieldDefinition = _objectSpread(_objectSpread({}, type !== null ? _this2.fieldsManager.getDefinition(type) : null), field);
|
|
186
|
+
// Extract fonts from theme
|
|
187
|
+
if (theme !== null) {
|
|
188
|
+
const {
|
|
189
|
+
fonts: themeFonts = [],
|
|
190
|
+
...newTheme
|
|
191
|
+
} = this.parse(theme);
|
|
192
|
+
return fonts.length > 0 || themeFonts.length > 0 ? {
|
|
193
|
+
...story,
|
|
194
|
+
theme: newTheme,
|
|
195
|
+
fonts: uniq([...themeFonts, ...fonts], 'name')
|
|
196
|
+
} : story;
|
|
197
|
+
}
|
|
198
|
+
return fonts.length > 0 ? {
|
|
199
|
+
...story,
|
|
200
|
+
fonts
|
|
201
|
+
} : story;
|
|
202
|
+
}
|
|
203
|
+
getFieldsPattern(fields, namePrefix = null) {
|
|
204
|
+
return fields.reduce((patterns, field) => {
|
|
205
|
+
const {
|
|
206
|
+
name = null,
|
|
207
|
+
type = null
|
|
208
|
+
} = field;
|
|
209
|
+
const path = [namePrefix, name].filter(it => it !== null).join('\\.');
|
|
210
|
+
const fieldDefinition = {
|
|
211
|
+
...(type !== null ? this.fieldsManager.getDefinition(type) : null),
|
|
212
|
+
...field
|
|
213
|
+
};
|
|
290
214
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
var value = data[key];
|
|
329
|
-
var font = null;
|
|
330
|
-
var subFonts = null;
|
|
331
|
-
if (patternMatch && isObject(value) && FontsParser.valueIsFont(value)) {
|
|
332
|
-
font = value;
|
|
333
|
-
} else if (isObject(value) || isArray(value)) {
|
|
334
|
-
subFonts = FontsParser.extractFontsWithPaths(value, patterns, path);
|
|
335
|
-
}
|
|
336
|
-
return subFonts !== null || font !== null ? [].concat(_toConsumableArray(currentFonts), _toConsumableArray(subFonts || []), _toConsumableArray(font !== null ? [font] : [])) : currentFonts;
|
|
337
|
-
}, []);
|
|
338
|
-
}
|
|
339
|
-
}]);
|
|
340
|
-
}();
|
|
215
|
+
// also check settings fields
|
|
216
|
+
const {
|
|
217
|
+
fields: subFields = [],
|
|
218
|
+
itemsField = null,
|
|
219
|
+
settings = []
|
|
220
|
+
} = fieldDefinition;
|
|
221
|
+
return [...patterns, ...(FontsParser.fieldIsFontFamily(fieldDefinition) ? [new RegExp(`^${path}$`)] : []), ...this.getFieldsPattern(subFields, path), ...this.getFieldsPattern(settings, path), ...(itemsField !== null ? this.getFieldsPattern([itemsField], `${path}\\.[0-9]+`) : [])];
|
|
222
|
+
}, []);
|
|
223
|
+
}
|
|
224
|
+
static fieldIsFontFamily({
|
|
225
|
+
id = null
|
|
226
|
+
}) {
|
|
227
|
+
return id === 'font-family';
|
|
228
|
+
}
|
|
229
|
+
static valueIsFont({
|
|
230
|
+
type = null
|
|
231
|
+
}) {
|
|
232
|
+
return type === 'custom' || type === 'google';
|
|
233
|
+
}
|
|
234
|
+
static extractFontsWithPaths(data, patterns, keyPrefix = null) {
|
|
235
|
+
const dataIsArray = isArray(data);
|
|
236
|
+
const keys = dataIsArray ? [...data.keys()] : Object.keys(data);
|
|
237
|
+
return keys.reduce((currentFonts, key) => {
|
|
238
|
+
const path = [keyPrefix, key].filter(it => it !== null).join('.');
|
|
239
|
+
const patternMatch = patterns.reduce((found, pattern) => found || pattern.test(path), false);
|
|
240
|
+
const value = data[key];
|
|
241
|
+
let font = null;
|
|
242
|
+
let subFonts = null;
|
|
243
|
+
if (patternMatch && isObject(value) && FontsParser.valueIsFont(value)) {
|
|
244
|
+
font = value;
|
|
245
|
+
} else if (isObject(value) || isArray(value)) {
|
|
246
|
+
subFonts = FontsParser.extractFontsWithPaths(value, patterns, path);
|
|
247
|
+
}
|
|
248
|
+
return subFonts !== null || font !== null ? [...currentFonts, ...(subFonts || []), ...(font !== null ? [font] : [])] : currentFonts;
|
|
249
|
+
}, []);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
341
252
|
|
|
342
|
-
|
|
343
|
-
function FormsManager() {
|
|
344
|
-
_classCallCheck(this, FormsManager);
|
|
345
|
-
return _callSuper(this, FormsManager, arguments);
|
|
346
|
-
}
|
|
347
|
-
_inherits(FormsManager, _ComponentsManager);
|
|
348
|
-
return _createClass(FormsManager);
|
|
349
|
-
}(ComponentsManager);
|
|
253
|
+
class FormsManager extends ComponentsManager {}
|
|
350
254
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
_classCallCheck(this, MediasParser);
|
|
357
|
-
_defineProperty(this, "fieldsManager", void 0);
|
|
358
|
-
_defineProperty(this, "screensManager", void 0);
|
|
255
|
+
class MediasParser {
|
|
256
|
+
constructor({
|
|
257
|
+
fieldsManager,
|
|
258
|
+
screensManager
|
|
259
|
+
}) {
|
|
359
260
|
this.fieldsManager = fieldsManager;
|
|
360
261
|
this.screensManager = screensManager;
|
|
361
262
|
}
|
|
362
263
|
|
|
363
264
|
// Convert medias object to path
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
265
|
+
toPath(story) {
|
|
266
|
+
if (story === null) {
|
|
267
|
+
return story;
|
|
268
|
+
}
|
|
269
|
+
const {
|
|
270
|
+
theme = null,
|
|
271
|
+
components = []
|
|
272
|
+
} = story || {};
|
|
273
|
+
const {
|
|
274
|
+
components: newComponents,
|
|
275
|
+
medias
|
|
276
|
+
} = components.reduce(({
|
|
277
|
+
components: previousComponents,
|
|
278
|
+
medias: currentMedias
|
|
279
|
+
}, screen) => {
|
|
280
|
+
const {
|
|
281
|
+
type
|
|
282
|
+
} = screen;
|
|
283
|
+
const {
|
|
284
|
+
fields = []
|
|
285
|
+
} = this.screensManager.getDefinition(type) || {};
|
|
286
|
+
const fieldsPattern = this.getMediaFieldsPattern(fields);
|
|
287
|
+
const {
|
|
288
|
+
data: newScreen,
|
|
289
|
+
medias: newMedias
|
|
290
|
+
} = MediasParser.replaceMediasWithPaths(screen, fieldsPattern);
|
|
291
|
+
return {
|
|
292
|
+
components: [...previousComponents, newScreen],
|
|
293
|
+
medias: {
|
|
294
|
+
...currentMedias,
|
|
295
|
+
...newMedias
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
}, {
|
|
299
|
+
components: [],
|
|
300
|
+
medias: null
|
|
301
|
+
});
|
|
302
|
+
if (theme !== null) {
|
|
303
|
+
const {
|
|
304
|
+
medias: themeMedias,
|
|
305
|
+
...newTheme
|
|
306
|
+
} = this.toPath(theme);
|
|
307
|
+
return medias !== null || themeMedias !== null ? {
|
|
308
|
+
...story,
|
|
309
|
+
theme: newTheme,
|
|
408
310
|
components: newComponents,
|
|
409
|
-
medias:
|
|
410
|
-
|
|
311
|
+
medias: {
|
|
312
|
+
...themeMedias,
|
|
313
|
+
...medias
|
|
314
|
+
}
|
|
315
|
+
} : story;
|
|
411
316
|
}
|
|
317
|
+
return medias !== null ? {
|
|
318
|
+
...story,
|
|
319
|
+
components: newComponents,
|
|
320
|
+
medias
|
|
321
|
+
} : story;
|
|
322
|
+
}
|
|
412
323
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
components = _ref6$components === void 0 ? [] : _ref6$components,
|
|
427
|
-
_ref6$medias = _ref6.medias,
|
|
428
|
-
medias = _ref6$medias === void 0 ? defaultMedias : _ref6$medias;
|
|
429
|
-
if (medias === null && theme === null) {
|
|
430
|
-
return story;
|
|
431
|
-
}
|
|
324
|
+
// Convert path to medias object
|
|
325
|
+
fromPath(story, defaultMedias = null) {
|
|
326
|
+
if (story === null) {
|
|
327
|
+
return story;
|
|
328
|
+
}
|
|
329
|
+
const {
|
|
330
|
+
theme = null,
|
|
331
|
+
components = [],
|
|
332
|
+
medias = defaultMedias
|
|
333
|
+
} = story || {};
|
|
334
|
+
if (medias === null && theme === null) {
|
|
335
|
+
return story;
|
|
336
|
+
}
|
|
432
337
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
338
|
+
// Replace path with medias objects
|
|
339
|
+
const newComponents = medias !== null ? components.map(screen => {
|
|
340
|
+
const {
|
|
341
|
+
type
|
|
342
|
+
} = screen;
|
|
343
|
+
const {
|
|
344
|
+
fields = []
|
|
345
|
+
} = this.screensManager.getDefinition(type) || {};
|
|
346
|
+
const fieldsPattern = this.getMediaFieldsPattern(fields);
|
|
347
|
+
return MediasParser.replacePathsWithMedias(screen, medias, fieldsPattern);
|
|
348
|
+
}) : components;
|
|
442
349
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
}) : story;
|
|
450
|
-
}
|
|
451
|
-
return newComponents !== components ? _objectSpread(_objectSpread({}, story), {}, {
|
|
350
|
+
// Replace path with medias object in theme
|
|
351
|
+
if (theme !== null) {
|
|
352
|
+
const newTheme = this.fromPath(theme, medias);
|
|
353
|
+
return newTheme !== theme || newComponents !== components ? {
|
|
354
|
+
...story,
|
|
355
|
+
theme: newTheme,
|
|
452
356
|
components: newComponents
|
|
453
|
-
}
|
|
357
|
+
} : story;
|
|
454
358
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
359
|
+
return newComponents !== components ? {
|
|
360
|
+
...story,
|
|
361
|
+
components: newComponents
|
|
362
|
+
} : story;
|
|
363
|
+
}
|
|
364
|
+
getMediaFieldsPattern(fields, namePrefix = null) {
|
|
365
|
+
return fields.reduce((patterns, field) => {
|
|
366
|
+
const {
|
|
367
|
+
name = null,
|
|
368
|
+
type = null
|
|
369
|
+
} = field;
|
|
370
|
+
const path = [namePrefix, name].filter(it => it !== null).join('\\.');
|
|
371
|
+
const fieldDefinition = {
|
|
372
|
+
...(type !== null ? this.fieldsManager.getDefinition(type) : null),
|
|
373
|
+
...field
|
|
374
|
+
};
|
|
469
375
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
var subReturn = MediasParser.replaceMediasWithPaths(value, patterns, medias, path);
|
|
550
|
-
newValue = subReturn.data;
|
|
551
|
-
subMedias = subReturn.medias;
|
|
552
|
-
} else {
|
|
553
|
-
newValue = value;
|
|
376
|
+
// also check settings fields
|
|
377
|
+
const {
|
|
378
|
+
fields: subFields = [],
|
|
379
|
+
itemsField = null,
|
|
380
|
+
settings = []
|
|
381
|
+
} = fieldDefinition;
|
|
382
|
+
return [...patterns, ...(MediasParser.fieldIsMedia(fieldDefinition) ? [new RegExp(`^${path}$`)] : []), ...(MediasParser.fieldIsFontFamily(fieldDefinition) ? [new RegExp(`^${path}\\.media$`)] : []), ...this.getMediaFieldsPattern(subFields, path), ...this.getMediaFieldsPattern(settings, path), ...(itemsField !== null ? this.getMediaFieldsPattern([itemsField], `${path}\\.[0-9]+`) : [])];
|
|
383
|
+
}, []);
|
|
384
|
+
}
|
|
385
|
+
static fieldIsMedia({
|
|
386
|
+
media = false
|
|
387
|
+
}) {
|
|
388
|
+
return media;
|
|
389
|
+
}
|
|
390
|
+
static fieldIsFontFamily({
|
|
391
|
+
id = null
|
|
392
|
+
}) {
|
|
393
|
+
return id === 'font-family';
|
|
394
|
+
}
|
|
395
|
+
static replacePathsWithMedias(data, medias, patterns, keyPrefix = null) {
|
|
396
|
+
const dataIsArray = isArray(data);
|
|
397
|
+
const keys = dataIsArray ? [...data.keys()] : Object.keys(data);
|
|
398
|
+
return keys.reduce((newData, key) => {
|
|
399
|
+
const path = [keyPrefix, key].filter(it => it !== null).join('.');
|
|
400
|
+
const patternMatch = patterns.reduce((found, pattern) => found || pattern.test(path), false);
|
|
401
|
+
const value = data[key];
|
|
402
|
+
let newValue;
|
|
403
|
+
if (patternMatch) {
|
|
404
|
+
newValue = isObject(value) ? value : medias[value] || null;
|
|
405
|
+
} else {
|
|
406
|
+
newValue = isObject(value) || isArray(value) ? MediasParser.replacePathsWithMedias(value, medias, patterns, path) : value;
|
|
407
|
+
}
|
|
408
|
+
return dataIsArray ? [...newData, newValue] : {
|
|
409
|
+
...newData,
|
|
410
|
+
[key]: newValue
|
|
411
|
+
};
|
|
412
|
+
}, dataIsArray ? [] : {});
|
|
413
|
+
}
|
|
414
|
+
static getMediaPath({
|
|
415
|
+
id = null
|
|
416
|
+
}) {
|
|
417
|
+
return id !== null ? `media://${id}` : null;
|
|
418
|
+
}
|
|
419
|
+
static replaceMediasWithPaths(data, patterns, medias = null, keyPrefix = null) {
|
|
420
|
+
const dataIsArray = isArray(data);
|
|
421
|
+
const keys = dataIsArray ? [...data.keys()] : Object.keys(data);
|
|
422
|
+
return keys.reduce(({
|
|
423
|
+
data: currentData,
|
|
424
|
+
medias: currentMedias
|
|
425
|
+
}, key) => {
|
|
426
|
+
const path = [keyPrefix, key].filter(it => it !== null).join('.');
|
|
427
|
+
const patternMatch = patterns.reduce((found, pattern) => found || pattern.test(path), false);
|
|
428
|
+
const value = data[key];
|
|
429
|
+
let newValue;
|
|
430
|
+
let media = null;
|
|
431
|
+
let subMedias = null;
|
|
432
|
+
if (patternMatch && isObject(value)) {
|
|
433
|
+
const mediaPath = MediasParser.getMediaPath(value);
|
|
434
|
+
newValue = mediaPath !== null ? mediaPath : value;
|
|
435
|
+
media = mediaPath !== null ? value : null;
|
|
436
|
+
} else if (isObject(value) || isArray(value)) {
|
|
437
|
+
const subReturn = MediasParser.replaceMediasWithPaths(value, patterns, medias, path);
|
|
438
|
+
newValue = subReturn.data;
|
|
439
|
+
subMedias = subReturn.medias;
|
|
440
|
+
} else {
|
|
441
|
+
newValue = value;
|
|
442
|
+
}
|
|
443
|
+
return {
|
|
444
|
+
data: dataIsArray ? [...(currentData || []), newValue] : {
|
|
445
|
+
...currentData,
|
|
446
|
+
[key]: newValue
|
|
447
|
+
},
|
|
448
|
+
medias: media !== null ? {
|
|
449
|
+
...currentMedias,
|
|
450
|
+
...subMedias,
|
|
451
|
+
[newValue]: media
|
|
452
|
+
} : {
|
|
453
|
+
...currentMedias,
|
|
454
|
+
...subMedias
|
|
554
455
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
}]);
|
|
565
|
-
}();
|
|
456
|
+
};
|
|
457
|
+
}, {
|
|
458
|
+
data: null,
|
|
459
|
+
medias
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
}
|
|
566
463
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
_defineProperty(_this, "variables", void 0);
|
|
576
|
-
var _this$options$variabl = _this.options.variables,
|
|
577
|
-
variables = _this$options$variabl === void 0 ? null : _this$options$variabl;
|
|
578
|
-
_this.variables = null;
|
|
464
|
+
/* eslint-disable no-console */
|
|
465
|
+
class Tracking extends Tracking$1 {
|
|
466
|
+
constructor(opts = {}) {
|
|
467
|
+
super(opts);
|
|
468
|
+
const {
|
|
469
|
+
variables = null
|
|
470
|
+
} = this.options;
|
|
471
|
+
this.variables = null;
|
|
579
472
|
if (variables !== null) {
|
|
580
|
-
|
|
473
|
+
this.setVariables(variables);
|
|
581
474
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
value: function setVariables(variables) {
|
|
588
|
-
this.variables = variables;
|
|
589
|
-
if (variables !== null) {
|
|
590
|
-
this.push(variables);
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
}, {
|
|
594
|
-
key: "getVariables",
|
|
595
|
-
value: function getVariables() {
|
|
596
|
-
return this.variables;
|
|
597
|
-
}
|
|
598
|
-
}, {
|
|
599
|
-
key: "trackScreenView",
|
|
600
|
-
value: function trackScreenView(screen, screenIndex) {
|
|
601
|
-
var _ref = screen || {},
|
|
602
|
-
_ref$id = _ref.id,
|
|
603
|
-
screenId = _ref$id === void 0 ? null : _ref$id,
|
|
604
|
-
_ref$type = _ref.type,
|
|
605
|
-
screenType = _ref$type === void 0 ? null : _ref$type;
|
|
606
|
-
var data = {
|
|
607
|
-
event: 'screenView',
|
|
608
|
-
screenId: screenId,
|
|
609
|
-
screenType: screenType,
|
|
610
|
-
screenIndex: screenIndex
|
|
611
|
-
};
|
|
612
|
-
this.push(data);
|
|
613
|
-
}
|
|
614
|
-
}, {
|
|
615
|
-
key: "trackEvent",
|
|
616
|
-
value: function trackEvent(category, action, label) {
|
|
617
|
-
var _ref2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
|
|
618
|
-
_ref2$value = _ref2.value,
|
|
619
|
-
value = _ref2$value === void 0 ? null : _ref2$value,
|
|
620
|
-
opts = _objectWithoutProperties(_ref2, _excluded);
|
|
621
|
-
var data = _objectSpread(_objectSpread({}, opts), {}, {
|
|
622
|
-
event: 'eventInteraction',
|
|
623
|
-
eventCategory: category,
|
|
624
|
-
eventAction: action,
|
|
625
|
-
eventLabel: label,
|
|
626
|
-
eventValue: value
|
|
627
|
-
});
|
|
628
|
-
this.push(data);
|
|
629
|
-
}
|
|
630
|
-
}, {
|
|
631
|
-
key: "trackMedia",
|
|
632
|
-
value: function trackMedia(type, media, action) {
|
|
633
|
-
var _ref3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
|
|
634
|
-
_ref3$value = _ref3.value,
|
|
635
|
-
value = _ref3$value === void 0 ? null : _ref3$value,
|
|
636
|
-
opts = _objectWithoutProperties(_ref3, _excluded2);
|
|
637
|
-
var _ref4 = media || {},
|
|
638
|
-
_ref4$id = _ref4.id,
|
|
639
|
-
mediaId = _ref4$id === void 0 ? null : _ref4$id,
|
|
640
|
-
_ref4$name = _ref4.name,
|
|
641
|
-
name = _ref4$name === void 0 ? null : _ref4$name,
|
|
642
|
-
_ref4$duration = _ref4.duration,
|
|
643
|
-
duration = _ref4$duration === void 0 ? null : _ref4$duration,
|
|
644
|
-
_ref4$currentTime = _ref4.currentTime,
|
|
645
|
-
currentTime = _ref4$currentTime === void 0 ? null : _ref4$currentTime;
|
|
646
|
-
var label = name;
|
|
647
|
-
var data = _objectSpread(_objectSpread({}, opts), {}, {
|
|
648
|
-
event: 'eventInteraction',
|
|
649
|
-
eventCategory: type,
|
|
650
|
-
eventAction: action,
|
|
651
|
-
eventLabel: label,
|
|
652
|
-
eventValue: value,
|
|
653
|
-
mediaId: mediaId,
|
|
654
|
-
mediaCurrentTime: currentTime !== null ? Math.round(currentTime) : null,
|
|
655
|
-
mediaProgress: currentTime !== null && duration !== null && duration > 0 ? Math.round(currentTime / duration * 100) : null
|
|
656
|
-
});
|
|
657
|
-
this.push(data);
|
|
475
|
+
}
|
|
476
|
+
setVariables(variables) {
|
|
477
|
+
this.variables = variables;
|
|
478
|
+
if (variables !== null) {
|
|
479
|
+
this.push(variables);
|
|
658
480
|
}
|
|
659
|
-
}
|
|
660
|
-
|
|
481
|
+
}
|
|
482
|
+
getVariables() {
|
|
483
|
+
return this.variables;
|
|
484
|
+
}
|
|
485
|
+
trackScreenView(screen, screenIndex) {
|
|
486
|
+
const {
|
|
487
|
+
id: screenId = null,
|
|
488
|
+
type: screenType = null
|
|
489
|
+
} = screen || {};
|
|
490
|
+
const data = {
|
|
491
|
+
event: 'screenView',
|
|
492
|
+
screenId,
|
|
493
|
+
screenType,
|
|
494
|
+
screenIndex
|
|
495
|
+
};
|
|
496
|
+
this.push(data);
|
|
497
|
+
}
|
|
498
|
+
trackEvent(category, action, label, {
|
|
499
|
+
value = null,
|
|
500
|
+
...opts
|
|
501
|
+
} = {}) {
|
|
502
|
+
const data = {
|
|
503
|
+
...opts,
|
|
504
|
+
event: 'eventInteraction',
|
|
505
|
+
eventCategory: category,
|
|
506
|
+
eventAction: action,
|
|
507
|
+
eventLabel: label,
|
|
508
|
+
eventValue: value
|
|
509
|
+
};
|
|
510
|
+
this.push(data);
|
|
511
|
+
}
|
|
512
|
+
trackMedia(type, media, action, {
|
|
513
|
+
value = null,
|
|
514
|
+
...opts
|
|
515
|
+
} = {}) {
|
|
516
|
+
const {
|
|
517
|
+
id: mediaId = null,
|
|
518
|
+
name = null,
|
|
519
|
+
duration = null,
|
|
520
|
+
currentTime = null
|
|
521
|
+
} = media || {};
|
|
522
|
+
const label = name;
|
|
523
|
+
const data = {
|
|
524
|
+
...opts,
|
|
525
|
+
event: 'eventInteraction',
|
|
526
|
+
eventCategory: type,
|
|
527
|
+
eventAction: action,
|
|
528
|
+
eventLabel: label,
|
|
529
|
+
eventValue: value,
|
|
530
|
+
mediaId,
|
|
531
|
+
mediaCurrentTime: currentTime !== null ? Math.round(currentTime) : null,
|
|
532
|
+
mediaProgress: currentTime !== null && duration !== null && duration > 0 ? Math.round(currentTime / duration * 100) : null
|
|
533
|
+
};
|
|
534
|
+
this.push(data);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
661
537
|
|
|
662
538
|
export { ComponentsManager, DefinitionsManager, EventsManager, FieldsManager, FontsParser, FormsManager, MediasParser, Tracking };
|