@aemforms/af-core 0.22.26 → 0.22.30

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 (54) hide show
  1. package/lib/cjs/index.cjs +345 -1886
  2. package/lib/esm/BaseNode-d78cc1b0.js +478 -0
  3. package/lib/esm/BaseNode.d.ts +1 -1
  4. package/lib/esm/BaseNode.js +26 -454
  5. package/lib/esm/Checkbox.js +37 -1
  6. package/lib/esm/CheckboxGroup.js +38 -1
  7. package/lib/esm/Container.d.ts +6 -1
  8. package/lib/esm/Container.js +108 -19
  9. package/lib/esm/DateField.js +38 -2
  10. package/lib/esm/Field.d.ts +2 -2
  11. package/lib/esm/Field.js +62 -26
  12. package/lib/esm/Fieldset.js +36 -3
  13. package/lib/esm/FileObject.js +23 -1
  14. package/lib/esm/FileUpload.js +34 -1
  15. package/lib/esm/Form.d.ts +1 -1
  16. package/lib/esm/Form.js +40 -8
  17. package/lib/esm/FormInstance.js +53 -5
  18. package/lib/esm/FormMetaData.js +26 -1
  19. package/lib/esm/InstanceManager.js +35 -8
  20. package/lib/esm/Node.js +25 -1
  21. package/lib/esm/Scriptable.js +29 -2
  22. package/lib/esm/controller/EventQueue.js +23 -1
  23. package/lib/esm/controller/Events.d.ts +1 -1
  24. package/lib/esm/controller/Events.js +41 -19
  25. package/lib/esm/controller/Logger.d.ts +2 -2
  26. package/lib/esm/controller/Logger.js +23 -1
  27. package/lib/esm/data/DataGroup.js +24 -1
  28. package/lib/esm/data/DataValue.js +23 -1
  29. package/lib/esm/data/EmptyDataValue.js +23 -1
  30. package/lib/esm/index.js +55 -21
  31. package/lib/esm/rules/FunctionRuntime.d.ts +3 -3
  32. package/lib/esm/rules/FunctionRuntime.js +31 -6
  33. package/lib/esm/rules/RuleEngine.js +30 -1
  34. package/lib/esm/types/Json.d.ts +16 -16
  35. package/lib/esm/types/Json.js +24 -2
  36. package/lib/esm/types/Model.d.ts +4 -4
  37. package/lib/esm/types/Model.js +23 -1
  38. package/lib/esm/types/index.js +22 -2
  39. package/lib/esm/utils/DataRefParser.d.ts +2 -2
  40. package/lib/esm/utils/DataRefParser.js +31 -6
  41. package/lib/esm/utils/Fetch.d.ts +1 -1
  42. package/lib/esm/utils/Fetch.js +24 -2
  43. package/lib/esm/utils/FormCreationUtils.js +40 -2
  44. package/lib/esm/utils/FormUtils.js +33 -8
  45. package/lib/esm/utils/JsonUtils.js +34 -11
  46. package/lib/esm/utils/LogUtils.js +23 -1
  47. package/lib/esm/utils/SchemaUtils.js +24 -2
  48. package/lib/esm/utils/TranslationUtils.d.ts +1 -1
  49. package/lib/esm/utils/TranslationUtils.js +32 -9
  50. package/lib/esm/utils/ValidationUtils.d.ts +4 -4
  51. package/lib/esm/utils/ValidationUtils.js +30 -4
  52. package/package.json +14 -2
  53. package/lib/browser/afb-events.js +0 -151
  54. package/lib/browser/afb-runtime.js +0 -3620
@@ -1,454 +1,26 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { ExecuteRule, propertyChange } from './controller/Events.js';
8
- import { resolveData, TOK_GLOBAL, tokenize } from './utils/DataRefParser.js';
9
- import NullDataValue from './data/EmptyDataValue.js';
10
- export const editableProperties = [
11
- 'value',
12
- 'label',
13
- 'description',
14
- 'visible',
15
- 'enabled',
16
- 'readOnly',
17
- 'enum',
18
- 'enumNames',
19
- 'required',
20
- 'properties',
21
- 'exclusiveMinimum',
22
- 'exclusiveMaximum',
23
- 'maximum',
24
- 'maxItems',
25
- 'minimum',
26
- 'minItems'
27
- ];
28
- export const dynamicProps = [
29
- ...editableProperties,
30
- 'valid',
31
- 'index',
32
- 'activeChild'
33
- ];
34
- export const staticFields = ['plain-text', 'image'];
35
- class ActionImplWithTarget {
36
- _action;
37
- _target;
38
- constructor(_action, _target) {
39
- this._action = _action;
40
- this._target = _target;
41
- }
42
- get type() {
43
- return this._action.type;
44
- }
45
- get payload() {
46
- return this._action.payload;
47
- }
48
- get metadata() {
49
- return this._action.metadata;
50
- }
51
- get target() {
52
- return this._target;
53
- }
54
- get isCustomEvent() {
55
- return this._action.isCustomEvent;
56
- }
57
- get originalAction() {
58
- return this._action.originalAction;
59
- }
60
- toString() {
61
- return this._action.toString();
62
- }
63
- }
64
- export const target = Symbol('target');
65
- export const qualifiedName = Symbol('qualifiedName');
66
- export function dependencyTracked() {
67
- return function (target, propertyKey, descriptor) {
68
- const get = descriptor.get;
69
- if (get != undefined) {
70
- descriptor.get = function () {
71
- this.ruleEngine.trackDependency(this);
72
- return get.call(this);
73
- };
74
- }
75
- };
76
- }
77
- const addOnly = (includeOrExclude) => (...fieldTypes) => (target, propertyKey, descriptor) => {
78
- const get = descriptor.get;
79
- if (get != undefined) {
80
- descriptor.get = function () {
81
- if (fieldTypes.indexOf(this.fieldType) > -1 === includeOrExclude) {
82
- return get.call(this);
83
- }
84
- return undefined;
85
- };
86
- }
87
- const set = descriptor.set;
88
- if (set != undefined) {
89
- descriptor.set = function (value) {
90
- if (fieldTypes.indexOf(this.fieldType) > -1 === includeOrExclude) {
91
- set.call(this, value);
92
- }
93
- };
94
- }
95
- };
96
- export const include = addOnly(true);
97
- export const exclude = addOnly(false);
98
- export class BaseNode {
99
- _options;
100
- _ruleNode;
101
- _lang = '';
102
- _callbacks = {};
103
- _dependents = [];
104
- _jsonModel;
105
- _tokens = [];
106
- get isContainer() {
107
- return false;
108
- }
109
- constructor(params, _options) {
110
- this._options = _options;
111
- this[qualifiedName] = null;
112
- this._jsonModel = {
113
- ...params,
114
- id: 'id' in params ? params.id : this.form.getUniqueId()
115
- };
116
- }
117
- setupRuleNode() {
118
- const self = this;
119
- this._ruleNode = new Proxy(this.ruleNodeReference(), {
120
- get: (ruleNodeReference, prop) => {
121
- return self.getFromRule(ruleNodeReference, prop);
122
- }
123
- });
124
- }
125
- ruleNodeReference() {
126
- return this;
127
- }
128
- getRuleNode() {
129
- return this._ruleNode;
130
- }
131
- getFromRule(ruleNodeReference, prop) {
132
- if (prop === Symbol.toPrimitive || (prop === 'valueOf' && !ruleNodeReference.hasOwnProperty('valueOf'))) {
133
- return this.valueOf;
134
- }
135
- else if (prop === target) {
136
- return this;
137
- }
138
- else if (typeof (prop) === 'string') {
139
- if (prop.startsWith('$')) {
140
- prop = prop.substr(1);
141
- if (typeof this[prop] !== 'function') {
142
- const retValue = this[prop];
143
- if (retValue instanceof BaseNode) {
144
- return retValue.getRuleNode();
145
- }
146
- else if (retValue instanceof Array) {
147
- return retValue.map(r => r instanceof BaseNode ? r.getRuleNode() : r);
148
- }
149
- else {
150
- return retValue;
151
- }
152
- }
153
- }
154
- else {
155
- if (ruleNodeReference.hasOwnProperty(prop)) {
156
- return ruleNodeReference[prop];
157
- }
158
- else if (typeof ruleNodeReference[prop] === 'function') {
159
- return ruleNodeReference[prop];
160
- }
161
- }
162
- }
163
- }
164
- get id() {
165
- return this._jsonModel.id;
166
- }
167
- get index() {
168
- if (this.parent) {
169
- return this.parent.indexOf(this);
170
- }
171
- return 0;
172
- }
173
- get parent() {
174
- return this._options.parent;
175
- }
176
- get type() {
177
- return this._jsonModel.type;
178
- }
179
- get repeatable() {
180
- return this.parent?.hasDynamicItems();
181
- }
182
- get fieldType() {
183
- return this._jsonModel.fieldType || 'text-input';
184
- }
185
- get ':type'() {
186
- return this._jsonModel[':type'] || this.fieldType;
187
- }
188
- get name() {
189
- return this._jsonModel.name;
190
- }
191
- get description() {
192
- return this._jsonModel.description;
193
- }
194
- set description(d) {
195
- this._setProperty('description', d);
196
- }
197
- get dataRef() {
198
- return this._jsonModel.dataRef;
199
- }
200
- get visible() {
201
- return this._jsonModel.visible;
202
- }
203
- set visible(v) {
204
- if (v !== this._jsonModel.visible) {
205
- const changeAction = propertyChange('visible', v, this._jsonModel.visible);
206
- this._jsonModel.visible = v;
207
- this.notifyDependents(changeAction);
208
- }
209
- }
210
- get form() {
211
- return this._options.form;
212
- }
213
- get ruleEngine() {
214
- return this.form.ruleEngine;
215
- }
216
- get label() {
217
- return this._jsonModel.label;
218
- }
219
- set label(l) {
220
- if (l !== this._jsonModel.label) {
221
- const changeAction = propertyChange('label', l, this._jsonModel.label);
222
- this._jsonModel = {
223
- ...this._jsonModel,
224
- label: l
225
- };
226
- this.notifyDependents(changeAction);
227
- }
228
- }
229
- get uniqueItems() {
230
- return this._jsonModel.uniqueItems;
231
- }
232
- isTransparent() {
233
- const isNonTransparent = this.parent?._jsonModel.type === 'array';
234
- return !this._jsonModel.name && !isNonTransparent;
235
- }
236
- getState() {
237
- return {
238
- ...this._jsonModel,
239
- properties: this.properties,
240
- index: this.index,
241
- parent: undefined,
242
- qualifiedName: this.qualifiedName,
243
- events: {},
244
- rules: {},
245
- repeatable: this.repeatable === true ? true : undefined,
246
- ':type': this[':type']
247
- };
248
- }
249
- subscribe(callback, eventName = 'change') {
250
- this._callbacks[eventName] = this._callbacks[eventName] || [];
251
- this._callbacks[eventName].push(callback);
252
- return {
253
- unsubscribe: () => {
254
- this._callbacks[eventName] = this._callbacks[eventName].filter(x => x !== callback);
255
- }
256
- };
257
- }
258
- _addDependent(dependent) {
259
- if (this._dependents.find(({ node }) => node === dependent) === undefined) {
260
- const subscription = this.subscribe((change) => {
261
- const changes = change.payload.changes;
262
- const propsToLook = [...dynamicProps, 'items'];
263
- const isPropChanged = changes.findIndex(x => {
264
- return propsToLook.indexOf(x.propertyName) > -1;
265
- }) > -1;
266
- if (isPropChanged) {
267
- dependent.dispatch(new ExecuteRule());
268
- }
269
- });
270
- this._dependents.push({ node: dependent, subscription });
271
- }
272
- }
273
- removeDependent(dependent) {
274
- const index = this._dependents.findIndex(({ node }) => node === dependent);
275
- if (index > -1) {
276
- this._dependents[index].subscription.unsubscribe();
277
- this._dependents.splice(index, 1);
278
- }
279
- }
280
- queueEvent(action) {
281
- const actionWithTarget = new ActionImplWithTarget(action, this);
282
- this.form.getEventQueue().queue(this, actionWithTarget, ['valid', 'invalid'].indexOf(actionWithTarget.type) > -1);
283
- }
284
- dispatch(action) {
285
- this.queueEvent(action);
286
- this.form.getEventQueue().runPendingQueue();
287
- }
288
- notifyDependents(action) {
289
- const handlers = this._callbacks[action.type] || [];
290
- handlers.forEach(x => {
291
- x(new ActionImplWithTarget(action, this));
292
- });
293
- }
294
- _setProperty(prop, newValue, notify = true) {
295
- const oldValue = this._jsonModel[prop];
296
- let isValueSame = false;
297
- if (newValue !== null && oldValue !== null &&
298
- typeof newValue === 'object' && typeof oldValue === 'object') {
299
- isValueSame = JSON.stringify(newValue) === JSON.stringify(oldValue);
300
- }
301
- else {
302
- isValueSame = oldValue === newValue;
303
- }
304
- if (!isValueSame) {
305
- this._jsonModel[prop] = newValue;
306
- const changeAction = propertyChange(prop, newValue, oldValue);
307
- if (notify) {
308
- this.notifyDependents(changeAction);
309
- }
310
- return changeAction.payload.changes;
311
- }
312
- return [];
313
- }
314
- _bindToDataModel(contextualDataModel) {
315
- if (this.id === '$form') {
316
- this._data = contextualDataModel;
317
- return;
318
- }
319
- const dataRef = this._jsonModel.dataRef;
320
- let _data, _parent = contextualDataModel, _key = '';
321
- if (dataRef === null) {
322
- _data = NullDataValue;
323
- }
324
- else if (dataRef !== undefined) {
325
- if (this._tokens.length === 0) {
326
- this._tokens = tokenize(dataRef);
327
- }
328
- let searchData = contextualDataModel;
329
- if (this._tokens[0].type === TOK_GLOBAL) {
330
- searchData = this.form.getDataNode();
331
- }
332
- if (typeof searchData !== 'undefined') {
333
- const name = this._tokens[this._tokens.length - 1].value;
334
- const create = this.defaultDataModel(name);
335
- _data = resolveData(searchData, this._tokens, create);
336
- _parent = resolveData(searchData, this._tokens.slice(0, -1));
337
- _key = name;
338
- }
339
- }
340
- else {
341
- if (contextualDataModel !== NullDataValue && staticFields.indexOf(this.fieldType) === -1) {
342
- _parent = contextualDataModel;
343
- const name = this._jsonModel.name || '';
344
- const key = contextualDataModel.$type === 'array' ? this.index : name;
345
- _key = key;
346
- if (key !== '') {
347
- const create = this.defaultDataModel(key);
348
- if (create !== undefined) {
349
- _data = contextualDataModel.$getDataNode(key);
350
- if (_data === undefined) {
351
- _data = create;
352
- contextualDataModel.$addDataNode(key, _data);
353
- }
354
- }
355
- }
356
- else {
357
- _data = undefined;
358
- }
359
- }
360
- }
361
- if (_data) {
362
- if (!this.isContainer && _parent !== NullDataValue && _data !== NullDataValue) {
363
- _data = _data?.$convertToDataValue();
364
- _parent.$addDataNode(_key, _data, true);
365
- }
366
- _data?.$bindToField(this);
367
- this._data = _data;
368
- }
369
- }
370
- _data;
371
- getDataNode() {
372
- return this._data;
373
- }
374
- get language() {
375
- if (!this._lang) {
376
- if (this.parent) {
377
- this._lang = this.parent.language;
378
- }
379
- else {
380
- this._lang = Intl.DateTimeFormat().resolvedOptions().locale;
381
- }
382
- }
383
- return this._lang;
384
- }
385
- get properties() {
386
- return this._jsonModel.properties || {};
387
- }
388
- set properties(p) {
389
- this._setProperty('properties', { ...p });
390
- }
391
- getNonTransparentParent() {
392
- let nonTransparentParent = this.parent;
393
- while (nonTransparentParent != null && nonTransparentParent.isTransparent()) {
394
- nonTransparentParent = nonTransparentParent.parent;
395
- }
396
- return nonTransparentParent;
397
- }
398
- _initialize() {
399
- if (typeof this._data === 'undefined') {
400
- let dataNode, parent = this.parent;
401
- do {
402
- dataNode = parent.getDataNode();
403
- parent = parent.parent;
404
- } while (dataNode === undefined);
405
- this._bindToDataModel(dataNode);
406
- }
407
- }
408
- _applyUpdates(propNames, updates) {
409
- return propNames.reduce((acc, propertyName) => {
410
- const currentValue = updates[propertyName];
411
- const changes = this._setProperty(propertyName, currentValue, false);
412
- if (changes.length > 0) {
413
- acc[propertyName] = changes[0];
414
- }
415
- return acc;
416
- }, {});
417
- }
418
- get qualifiedName() {
419
- if (this.isTransparent()) {
420
- return null;
421
- }
422
- if (this[qualifiedName] !== null) {
423
- return this[qualifiedName];
424
- }
425
- const parent = this.getNonTransparentParent();
426
- if (parent && parent.type === 'array') {
427
- this[qualifiedName] = `${parent.qualifiedName}[${this.index}]`;
428
- }
429
- else {
430
- this[qualifiedName] = `${parent.qualifiedName}.${this.name}`;
431
- }
432
- return this[qualifiedName];
433
- }
434
- focus() {
435
- if (this.parent) {
436
- this.parent.activeChild = this;
437
- }
438
- }
439
- }
440
- __decorate([
441
- dependencyTracked()
442
- ], BaseNode.prototype, "index", null);
443
- __decorate([
444
- dependencyTracked()
445
- ], BaseNode.prototype, "description", null);
446
- __decorate([
447
- dependencyTracked()
448
- ], BaseNode.prototype, "visible", null);
449
- __decorate([
450
- dependencyTracked()
451
- ], BaseNode.prototype, "label", null);
452
- __decorate([
453
- dependencyTracked()
454
- ], BaseNode.prototype, "properties", null);
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
21
+ export { B as BaseNode, d as dependencyTracked, b as dynamicProps, a as editableProperties, e as exclude, i as include, q as qualifiedName, s as staticFields, t as target } from './BaseNode-d78cc1b0.js';
22
+ import './controller/Events.js';
23
+ import './utils/DataRefParser.js';
24
+ import './data/EmptyDataValue.js';
25
+ import './data/DataGroup.js';
26
+ import './data/DataValue.js';
@@ -1,5 +1,40 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
1
21
  import Field from './Field.js';
2
22
  import { Constraints } from './utils/ValidationUtils.js';
23
+ import './BaseNode-d78cc1b0.js';
24
+ import './controller/Events.js';
25
+ import './utils/DataRefParser.js';
26
+ import './data/DataGroup.js';
27
+ import './data/DataValue.js';
28
+ import './data/EmptyDataValue.js';
29
+ import './types/Model.js';
30
+ import './Scriptable.js';
31
+ import './utils/SchemaUtils.js';
32
+ import '@aemforms/af-formatters';
33
+ import './utils/FormUtils.js';
34
+ import './utils/JsonUtils.js';
35
+ import './types/Json.js';
36
+ import './FileObject.js';
37
+
3
38
  const requiredConstraint = (offValue) => (constraint, value) => {
4
39
  const valid = Constraints.required(constraint, value).valid && (!constraint || value != offValue);
5
40
  return { valid, value };
@@ -24,4 +59,5 @@ class Checkbox extends Field {
24
59
  return this._jsonModel.enum || [];
25
60
  }
26
61
  }
27
- export default Checkbox;
62
+
63
+ export { Checkbox as default };
@@ -1,4 +1,40 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
1
21
  import Field from './Field.js';
22
+ import './BaseNode-d78cc1b0.js';
23
+ import './controller/Events.js';
24
+ import './utils/DataRefParser.js';
25
+ import './data/DataGroup.js';
26
+ import './data/DataValue.js';
27
+ import './data/EmptyDataValue.js';
28
+ import './types/Model.js';
29
+ import './utils/ValidationUtils.js';
30
+ import './utils/FormUtils.js';
31
+ import './utils/JsonUtils.js';
32
+ import './types/Json.js';
33
+ import './utils/SchemaUtils.js';
34
+ import './FileObject.js';
35
+ import './Scriptable.js';
36
+ import '@aemforms/af-formatters';
37
+
2
38
  class CheckboxGroup extends Field {
3
39
  constructor(params, _options) {
4
40
  super(params, _options);
@@ -20,4 +56,5 @@ class CheckboxGroup extends Field {
20
56
  };
21
57
  }
22
58
  }
23
- export default CheckboxGroup;
59
+
60
+ export { CheckboxGroup as default };
@@ -19,7 +19,10 @@ declare abstract class Container<T extends ContainerJson & RulesJson> extends Sc
19
19
  hasDynamicItems(): boolean;
20
20
  get isContainer(): boolean;
21
21
  private _activeChild;
22
- getState(): T & {
22
+ private isSiteContainer;
23
+ private isAFormField;
24
+ private getItemsState;
25
+ getState(isRepeatableChild?: boolean): T & {
23
26
  items: any[];
24
27
  properties: {
25
28
  [key: string]: any;
@@ -34,11 +37,13 @@ declare abstract class Container<T extends ContainerJson & RulesJson> extends Sc
34
37
  id: string;
35
38
  };
36
39
  private _createChild;
40
+ private walkSiteContainerItems;
37
41
  private _addChildToRuleNode;
38
42
  private _addChild;
39
43
  indexOf(f: FieldModel | FieldsetModel): number;
40
44
  defaultDataModel(name: string): DataGroup | undefined;
41
45
  _initialize(): void;
46
+ private _initializeSiteContainer;
42
47
  addItem(action: Action): void;
43
48
  removeItem(action: Action): void;
44
49
  queueEvent(action: Action): void;