@zcomponent/core 2.0.0-alpha.2 → 2.0.0-alpha.4

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 (63) hide show
  1. package/lib/animation/layer.js +5 -0
  2. package/lib/animation/tracks/streamtrack.js +12 -1
  3. package/lib/behavior.d.ts +7 -1
  4. package/lib/behavior.js +6 -1
  5. package/lib/behaviors/ConsoleLog.d.ts +2 -0
  6. package/lib/behaviors/ConsoleLog.js +2 -0
  7. package/lib/behaviors/LaunchURL.d.ts +2 -0
  8. package/lib/behaviors/LaunchURL.js +2 -0
  9. package/lib/behaviors/LogAnalyticsEvent.d.ts +2 -0
  10. package/lib/behaviors/LogAnalyticsEvent.js +2 -0
  11. package/lib/behaviors/PlaySound.d.ts +3 -0
  12. package/lib/behaviors/PlaySound.js +7 -1
  13. package/lib/behaviors/ShowTextAlert.d.ts +1 -0
  14. package/lib/behaviors/ShowTextAlert.js +1 -0
  15. package/lib/behaviors/ToggleLayerClips.d.ts +1 -0
  16. package/lib/behaviors/ToggleLayerClips.js +9 -3
  17. package/lib/component.d.ts +7 -0
  18. package/lib/component.js +6 -0
  19. package/lib/components/AnimatedLoader.d.ts +6 -0
  20. package/lib/components/AnimatedLoader.js +6 -0
  21. package/lib/components/Audio.d.ts +28 -2
  22. package/lib/components/Audio.js +55 -8
  23. package/lib/components/DefaultCookieConsent.d.ts +11 -0
  24. package/lib/components/DefaultCookieConsent.js +33 -9
  25. package/lib/components/DefaultLoader.d.ts +3 -0
  26. package/lib/components/DefaultLoader.js +15 -8
  27. package/lib/components/Gamepad.d.ts +61 -0
  28. package/lib/components/Gamepad.js +61 -0
  29. package/lib/components/LongLoad.d.ts +3 -0
  30. package/lib/components/LongLoad.js +3 -0
  31. package/lib/components/SnapshotUI.d.ts +14 -0
  32. package/lib/components/SnapshotUI.js +27 -9
  33. package/lib/context.d.ts +11 -1
  34. package/lib/context.js +9 -1
  35. package/lib/contexts/analyticscontext.d.ts +3 -0
  36. package/lib/contexts/analyticscontext.js +14 -2
  37. package/lib/contexts/audiocontextcontext.d.ts +12 -0
  38. package/lib/contexts/audiocontextcontext.js +131 -56
  39. package/lib/contexts/canvascontext.d.ts +25 -0
  40. package/lib/contexts/canvascontext.js +75 -15
  41. package/lib/contexts/cookieconsentcontext.d.ts +19 -0
  42. package/lib/contexts/cookieconsentcontext.js +135 -27
  43. package/lib/contexts/environmentcontext.d.ts +13 -5
  44. package/lib/contexts/environmentcontext.js +26 -14
  45. package/lib/contexts/gamepadcontext.d.ts +17 -0
  46. package/lib/contexts/gamepadcontext.js +160 -74
  47. package/lib/contexts/gesturecontext.d.ts +11 -0
  48. package/lib/contexts/gesturecontext.js +266 -169
  49. package/lib/contexts/globaltagcontext.d.ts +2 -0
  50. package/lib/contexts/globaltagcontext.js +69 -10
  51. package/lib/contexts/loadcontext.d.ts +19 -0
  52. package/lib/contexts/loadcontext.js +68 -18
  53. package/lib/contexts/orientationcontext.d.ts +13 -0
  54. package/lib/contexts/orientationcontext.js +60 -11
  55. package/lib/contexts/snapshotContext.d.ts +10 -0
  56. package/lib/contexts/snapshotContext.js +55 -9
  57. package/lib/contexts/tagcontext.d.ts +14 -0
  58. package/lib/contexts/tagcontext.js +186 -98
  59. package/lib/entity.d.ts +5 -1
  60. package/lib/entity.js +4 -1
  61. package/lib/zcomponent.d.ts +20 -0
  62. package/lib/zcomponent.js +81 -12
  63. package/package.json +84 -84
@@ -1,3 +1,10 @@
1
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
2
+ var useValue = arguments.length > 2;
3
+ for (var i = 0; i < initializers.length; i++) {
4
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
5
+ }
6
+ return useValue ? value : void 0;
7
+ };
1
8
  var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
9
  function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
10
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
@@ -25,18 +32,11 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn,
25
32
  if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
33
  done = true;
27
34
  };
28
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
- var useValue = arguments.length > 2;
30
- for (var i = 0; i < initializers.length; i++) {
31
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
- }
33
- return useValue ? value : void 0;
34
- };
35
35
  import { Component } from '../component';
36
36
  import { ConsentStatus, CookieConsentContext, CookieType, Status, useCookieConsentFunctional, useCookieConsentMarketing, useCookieConsentPerformance, useMarketingVendors, usePerformanceVendors, } from '../contexts/cookieconsentcontext';
37
37
  import { isDesignTime } from '../contexts/environmentcontext';
38
38
  import { constructed, started } from '../contexts/loadcontext';
39
- import { zComponent, zUI } from '../decorators';
39
+ import { zComponent, zIgnore, zUI } from '../decorators';
40
40
  const html = `
41
41
  <div id='zcomponent-cookieconsent-panel'>
42
42
  <h1 id='zcomponent-cookieconsent-title'></h1>
@@ -60,6 +60,7 @@ let DefaultCookieConsent = (() => {
60
60
  let _classExtraInitializers = [];
61
61
  let _classThis;
62
62
  let _classSuper = Component;
63
+ let _instanceExtraInitializers = [];
63
64
  let _title_decorators;
64
65
  let _title_initializers = [];
65
66
  let _title_extraInitializers = [];
@@ -108,6 +109,10 @@ let DefaultCookieConsent = (() => {
108
109
  let _required_decorators;
109
110
  let _required_initializers = [];
110
111
  let _required_extraInitializers = [];
112
+ let _show_decorators;
113
+ let _hide_decorators;
114
+ let _acceptAll_decorators;
115
+ let _dispose_decorators;
111
116
  var DefaultCookieConsent = class extends _classSuper {
112
117
  static { _classThis = this; }
113
118
  static {
@@ -128,6 +133,14 @@ let DefaultCookieConsent = (() => {
128
133
  _marketingTitle_decorators = [zUI({ group: 'Settings', priority: 10 })];
129
134
  _marketingDescription_decorators = [zUI({ group: 'Settings', priority: 10 })];
130
135
  _required_decorators = [zUI({ group: 'Settings', priority: 10 })];
136
+ _show_decorators = [zUI()];
137
+ _hide_decorators = [zUI()];
138
+ _acceptAll_decorators = [zUI()];
139
+ _dispose_decorators = [zIgnore()];
140
+ __esDecorate(this, null, _show_decorators, { kind: "method", name: "show", static: false, private: false, access: { has: obj => "show" in obj, get: obj => obj.show }, metadata: _metadata }, null, _instanceExtraInitializers);
141
+ __esDecorate(this, null, _hide_decorators, { kind: "method", name: "hide", static: false, private: false, access: { has: obj => "hide" in obj, get: obj => obj.hide }, metadata: _metadata }, null, _instanceExtraInitializers);
142
+ __esDecorate(this, null, _acceptAll_decorators, { kind: "method", name: "acceptAll", static: false, private: false, access: { has: obj => "acceptAll" in obj, get: obj => obj.acceptAll }, metadata: _metadata }, null, _instanceExtraInitializers);
143
+ __esDecorate(this, null, _dispose_decorators, { kind: "method", name: "dispose", static: false, private: false, access: { has: obj => "dispose" in obj, get: obj => obj.dispose }, metadata: _metadata }, null, _instanceExtraInitializers);
131
144
  __esDecorate(null, null, _title_decorators, { kind: "field", name: "title", static: false, private: false, access: { has: obj => "title" in obj, get: obj => obj.title, set: (obj, value) => { obj.title = value; } }, metadata: _metadata }, _title_initializers, _title_extraInitializers);
132
145
  __esDecorate(null, null, _description_decorators, { kind: "field", name: "description", static: false, private: false, access: { has: obj => "description" in obj, get: obj => obj.description, set: (obj, value) => { obj.description = value; } }, metadata: _metadata }, _description_initializers, _description_extraInitializers);
133
146
  __esDecorate(null, null, _privacyPolicyText_decorators, { kind: "field", name: "privacyPolicyText", static: false, private: false, access: { has: obj => "privacyPolicyText" in obj, get: obj => obj.privacyPolicyText, set: (obj, value) => { obj.privacyPolicyText = value; } }, metadata: _metadata }, _privacyPolicyText_initializers, _privacyPolicyText_extraInitializers);
@@ -149,7 +162,7 @@ let DefaultCookieConsent = (() => {
149
162
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
150
163
  __runInitializers(_classThis, _classExtraInitializers);
151
164
  }
152
- constructorProps;
165
+ constructorProps = __runInitializers(this, _instanceExtraInitializers);
153
166
  /**
154
167
  * @default "This website uses cookies to store information on your computer."
155
168
  * @zui
@@ -413,8 +426,10 @@ let DefaultCookieConsent = (() => {
413
426
  }
414
427
  /**
415
428
  * Shows the cookie consent dialog.
429
+ *
416
430
  * @param isSettings - Determines if the settings screen should be shown
417
431
  * @param force - Forces the dialog to be shown, regardless of the current consent status. Defaults to false.
432
+ * @zui
418
433
  */
419
434
  show(isSettings, force = false) {
420
435
  if (force) {
@@ -440,9 +455,15 @@ let DefaultCookieConsent = (() => {
440
455
  }
441
456
  document.body.appendChild(this._dom);
442
457
  }
458
+ /**
459
+ * @zui
460
+ */
443
461
  hide() {
444
462
  this._dom.remove();
445
463
  }
464
+ /**
465
+ * @zui
466
+ */
446
467
  acceptAll() {
447
468
  this._setConsentStatus(CookieType.essential, ConsentStatus.granted);
448
469
  this._setConsentStatus(CookieType.functional, ConsentStatus.granted);
@@ -450,6 +471,9 @@ let DefaultCookieConsent = (() => {
450
471
  this._setConsentStatus(CookieType.marketing, ConsentStatus.granted);
451
472
  this.hide();
452
473
  }
474
+ /**
475
+ * @zignore
476
+ */
453
477
  dispose() {
454
478
  this._dom.remove();
455
479
  return super.dispose();
@@ -75,5 +75,8 @@ export declare class DefaultLoader extends Component {
75
75
  private _updatePercentage;
76
76
  private _updateVisibility;
77
77
  private _update;
78
+ /**
79
+ * @zignore
80
+ */
78
81
  dispose(): never;
79
82
  }
@@ -1,3 +1,10 @@
1
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
2
+ var useValue = arguments.length > 2;
3
+ for (var i = 0; i < initializers.length; i++) {
4
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
5
+ }
6
+ return useValue ? value : void 0;
7
+ };
1
8
  var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
9
  function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
10
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
@@ -25,13 +32,6 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn,
25
32
  if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
33
  done = true;
27
34
  };
28
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
- var useValue = arguments.length > 2;
30
- for (var i = 0; i < initializers.length; i++) {
31
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
- }
33
- return useValue ? value : void 0;
34
- };
35
35
  import { Component, isDesignTime, isStarted, useCanvas, useIsLoaded, useLoadPercent, zComponent, zIgnore, zObserve, zUI } from '..';
36
36
  /**
37
37
  * The DefaultLoader shows a customizable loading bar while the assets of your experience are being downloaded and parsed by the browser.
@@ -45,6 +45,7 @@ let DefaultLoader = (() => {
45
45
  let _classExtraInitializers = [];
46
46
  let _classThis;
47
47
  let _classSuper = Component;
48
+ let _instanceExtraInitializers = [];
48
49
  let _element_decorators;
49
50
  let _element_initializers = [];
50
51
  let _element_extraInitializers = [];
@@ -69,6 +70,7 @@ let DefaultLoader = (() => {
69
70
  let _showIfLoadingAfterStart_decorators;
70
71
  let _showIfLoadingAfterStart_initializers = [];
71
72
  let _showIfLoadingAfterStart_extraInitializers = [];
73
+ let _dispose_decorators;
72
74
  var DefaultLoader = class extends _classSuper {
73
75
  static { _classThis = this; }
74
76
  static {
@@ -97,6 +99,8 @@ let DefaultLoader = (() => {
97
99
  this.element.style.zIndex = value.toString();
98
100
  })];
99
101
  _showIfLoadingAfterStart_decorators = [zUI({ group: 'Appearance', priority: 10 }), zObserve((v, instance) => () => instance._updateVisibility())];
102
+ _dispose_decorators = [zIgnore()];
103
+ __esDecorate(this, null, _dispose_decorators, { kind: "method", name: "dispose", static: false, private: false, access: { has: obj => "dispose" in obj, get: obj => obj.dispose }, metadata: _metadata }, null, _instanceExtraInitializers);
100
104
  __esDecorate(null, null, _element_decorators, { kind: "field", name: "element", static: false, private: false, access: { has: obj => "element" in obj, get: obj => obj.element, set: (obj, value) => { obj.element = value; } }, metadata: _metadata }, _element_initializers, _element_extraInitializers);
101
105
  __esDecorate(null, null, _preview_decorators, { kind: "field", name: "preview", static: false, private: false, access: { has: obj => "preview" in obj, get: obj => obj.preview, set: (obj, value) => { obj.preview = value; } }, metadata: _metadata }, _preview_initializers, _preview_extraInitializers);
102
106
  __esDecorate(null, null, _title_decorators, { kind: "field", name: "title", static: false, private: false, access: { has: obj => "title" in obj, get: obj => obj.title, set: (obj, value) => { obj.title = value; } }, metadata: _metadata }, _title_initializers, _title_extraInitializers);
@@ -113,7 +117,7 @@ let DefaultLoader = (() => {
113
117
  /**
114
118
  * @zignore
115
119
  */
116
- element = __runInitializers(this, _element_initializers, document.createElement('div'));
120
+ element = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _element_initializers, document.createElement('div')));
117
121
  /**
118
122
  * @default false
119
123
  * @zui
@@ -219,6 +223,9 @@ let DefaultLoader = (() => {
219
223
  this.element.style.height = rect.height.toString() + 'px';
220
224
  requestAnimationFrame(this._update);
221
225
  };
226
+ /**
227
+ * @zignore
228
+ */
222
229
  dispose() {
223
230
  this.element.remove();
224
231
  return super.dispose();
@@ -16,32 +16,93 @@ export interface GamepadButtonEvent {
16
16
  * @zicon sports_esports
17
17
  */
18
18
  export declare class Gamepad extends Component {
19
+ /**
20
+ * @zui
21
+ */
19
22
  readonly onButtonDown: Event<[GamepadButtonEvent]>;
23
+ /**
24
+ * @zui
25
+ */
20
26
  readonly onButtonUp: Event<[GamepadButtonEvent]>;
27
+ /**
28
+ * @zui
29
+ */
21
30
  readonly onButtonSouth: Event<[GamepadButtonEvent]>;
31
+ /**
32
+ * @zui
33
+ */
22
34
  readonly onButtonWest: Event<[GamepadButtonEvent]>;
35
+ /**
36
+ * @zui
37
+ */
23
38
  readonly onButtonNorth: Event<[GamepadButtonEvent]>;
39
+ /**
40
+ * @zui
41
+ */
24
42
  readonly onButtonEast: Event<[GamepadButtonEvent]>;
43
+ /**
44
+ * @zui
45
+ */
25
46
  readonly onButtonShoulderLeft: Event<[GamepadButtonEvent]>;
47
+ /**
48
+ * @zui
49
+ */
26
50
  readonly onButtonShoulderRight: Event<[GamepadButtonEvent]>;
51
+ /**
52
+ * @zui
53
+ */
27
54
  readonly onButtonTriggerLeft: Event<[GamepadButtonEvent]>;
55
+ /**
56
+ * @zui
57
+ */
28
58
  readonly onButtonTriggerRight: Event<[GamepadButtonEvent]>;
59
+ /**
60
+ * @zui
61
+ */
29
62
  readonly onButtonDLeft: Event<[GamepadButtonEvent]>;
63
+ /**
64
+ * @zui
65
+ */
30
66
  readonly onButtonDRight: Event<[GamepadButtonEvent]>;
67
+ /**
68
+ * @zui
69
+ */
31
70
  readonly onButtonDUp: Event<[GamepadButtonEvent]>;
71
+ /**
72
+ * @zui
73
+ */
32
74
  readonly onButtonDDown: Event<[GamepadButtonEvent]>;
75
+ /**
76
+ * @zui
77
+ */
33
78
  readonly onButtonSelect: Event<[GamepadButtonEvent]>;
79
+ /**
80
+ * @zui
81
+ */
34
82
  readonly onButtonStart: Event<[GamepadButtonEvent]>;
83
+ /**
84
+ * @zui
85
+ */
35
86
  readonly onButtonCenter: Event<[GamepadButtonEvent]>;
87
+ /**
88
+ * @zui
89
+ */
36
90
  readonly onButtonStickLeft: Event<[GamepadButtonEvent]>;
91
+ /**
92
+ * @zui
93
+ */
37
94
  readonly onButtonStickRight: Event<[GamepadButtonEvent]>;
38
95
  /**
39
96
  * @default []
40
97
  */
41
98
  private _indexMapping;
99
+ /**
100
+ * @zui
101
+ */
42
102
  controllerIndex?: number;
43
103
  /**
44
104
  * @default 0.1
105
+ * @zui
45
106
  */
46
107
  analogPressedThreshold: number;
47
108
  private _downLastFrame;
@@ -165,24 +165,81 @@ let Gamepad = (() => {
165
165
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
166
166
  __runInitializers(_classThis, _classExtraInitializers);
167
167
  }
168
+ /**
169
+ * @zui
170
+ */
168
171
  onButtonDown = __runInitializers(this, _onButtonDown_initializers, new Event());
172
+ /**
173
+ * @zui
174
+ */
169
175
  onButtonUp = (__runInitializers(this, _onButtonDown_extraInitializers), __runInitializers(this, _onButtonUp_initializers, new Event()));
176
+ /**
177
+ * @zui
178
+ */
170
179
  onButtonSouth = (__runInitializers(this, _onButtonUp_extraInitializers), __runInitializers(this, _onButtonSouth_initializers, new Event()));
180
+ /**
181
+ * @zui
182
+ */
171
183
  onButtonWest = (__runInitializers(this, _onButtonSouth_extraInitializers), __runInitializers(this, _onButtonWest_initializers, new Event()));
184
+ /**
185
+ * @zui
186
+ */
172
187
  onButtonNorth = (__runInitializers(this, _onButtonWest_extraInitializers), __runInitializers(this, _onButtonNorth_initializers, new Event()));
188
+ /**
189
+ * @zui
190
+ */
173
191
  onButtonEast = (__runInitializers(this, _onButtonNorth_extraInitializers), __runInitializers(this, _onButtonEast_initializers, new Event()));
192
+ /**
193
+ * @zui
194
+ */
174
195
  onButtonShoulderLeft = (__runInitializers(this, _onButtonEast_extraInitializers), __runInitializers(this, _onButtonShoulderLeft_initializers, new Event()));
196
+ /**
197
+ * @zui
198
+ */
175
199
  onButtonShoulderRight = (__runInitializers(this, _onButtonShoulderLeft_extraInitializers), __runInitializers(this, _onButtonShoulderRight_initializers, new Event()));
200
+ /**
201
+ * @zui
202
+ */
176
203
  onButtonTriggerLeft = (__runInitializers(this, _onButtonShoulderRight_extraInitializers), __runInitializers(this, _onButtonTriggerLeft_initializers, new Event()));
204
+ /**
205
+ * @zui
206
+ */
177
207
  onButtonTriggerRight = (__runInitializers(this, _onButtonTriggerLeft_extraInitializers), __runInitializers(this, _onButtonTriggerRight_initializers, new Event()));
208
+ /**
209
+ * @zui
210
+ */
178
211
  onButtonDLeft = (__runInitializers(this, _onButtonTriggerRight_extraInitializers), __runInitializers(this, _onButtonDLeft_initializers, new Event()));
212
+ /**
213
+ * @zui
214
+ */
179
215
  onButtonDRight = (__runInitializers(this, _onButtonDLeft_extraInitializers), __runInitializers(this, _onButtonDRight_initializers, new Event()));
216
+ /**
217
+ * @zui
218
+ */
180
219
  onButtonDUp = (__runInitializers(this, _onButtonDRight_extraInitializers), __runInitializers(this, _onButtonDUp_initializers, new Event()));
220
+ /**
221
+ * @zui
222
+ */
181
223
  onButtonDDown = (__runInitializers(this, _onButtonDUp_extraInitializers), __runInitializers(this, _onButtonDDown_initializers, new Event()));
224
+ /**
225
+ * @zui
226
+ */
182
227
  onButtonSelect = (__runInitializers(this, _onButtonDDown_extraInitializers), __runInitializers(this, _onButtonSelect_initializers, new Event()));
228
+ /**
229
+ * @zui
230
+ */
183
231
  onButtonStart = (__runInitializers(this, _onButtonSelect_extraInitializers), __runInitializers(this, _onButtonStart_initializers, new Event()));
232
+ /**
233
+ * @zui
234
+ */
184
235
  onButtonCenter = (__runInitializers(this, _onButtonStart_extraInitializers), __runInitializers(this, _onButtonCenter_initializers, new Event()));
236
+ /**
237
+ * @zui
238
+ */
185
239
  onButtonStickLeft = (__runInitializers(this, _onButtonCenter_extraInitializers), __runInitializers(this, _onButtonStickLeft_initializers, new Event()));
240
+ /**
241
+ * @zui
242
+ */
186
243
  onButtonStickRight = (__runInitializers(this, _onButtonStickLeft_extraInitializers), __runInitializers(this, _onButtonStickRight_initializers, new Event()));
187
244
  /**
188
245
  * @default []
@@ -206,9 +263,13 @@ let Gamepad = (() => {
206
263
  this.onButtonDRight,
207
264
  this.onButtonCenter,
208
265
  ]);
266
+ /**
267
+ * @zui
268
+ */
209
269
  controllerIndex = __runInitializers(this, _controllerIndex_initializers, undefined);
210
270
  /**
211
271
  * @default 0.1
272
+ * @zui
212
273
  */
213
274
  analogPressedThreshold = (__runInitializers(this, _controllerIndex_extraInitializers), __runInitializers(this, _analogPressedThreshold_initializers, 0.1));
214
275
  _downLastFrame = (__runInitializers(this, _analogPressedThreshold_extraInitializers), new Map());
@@ -40,6 +40,9 @@ export interface LongLoadConstructorProps {
40
40
  * @zgroup Advanced
41
41
  */
42
42
  export declare class LongLoad extends Component<any, LongLoadConstructorProps> {
43
+ /**
44
+ * @zui
45
+ */
43
46
  readonly onLoad: Event<[]>;
44
47
  /**
45
48
  * Creates an instance of LongLoad.
@@ -59,6 +59,9 @@ let LongLoad = (() => {
59
59
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
60
60
  __runInitializers(_classThis, _classExtraInitializers);
61
61
  }
62
+ /**
63
+ * @zui
64
+ */
62
65
  onLoad = __runInitializers(this, _onLoad_initializers, new Event());
63
66
  /**
64
67
  * Creates an instance of LongLoad.
@@ -25,15 +25,23 @@ export declare class SnapshotUI extends Component {
25
25
  private socialShareBehaviours;
26
26
  private style;
27
27
  private shareDiv;
28
+ /**
29
+ * @zui
30
+ */
28
31
  readonly onSave: Event<[]>;
32
+ /**
33
+ * @zui
34
+ */
29
35
  readonly onShare: Event<[]>;
30
36
  /**
31
37
  * @default true
38
+ * @zui
32
39
  */
33
40
  visible: boolean;
34
41
  /**
35
42
  * The format of the image to capture.
36
43
  * @default "jpeg"
44
+ * @zui
37
45
  */
38
46
  format: ValueOf<typeof ImageFormat>;
39
47
  /**
@@ -46,16 +54,19 @@ export declare class SnapshotUI extends Component {
46
54
  /**
47
55
  * The name of the file to download.
48
56
  * @default "canvas"
57
+ * @zui
49
58
  */
50
59
  fileName: string;
51
60
  /**
52
61
  * The text to share.
53
62
  * @default ""
63
+ * @zui
54
64
  */
55
65
  text: string;
56
66
  /**
57
67
  * The title to share.
58
68
  * @default ""
69
+ * @zui
59
70
  */
60
71
  title: string;
61
72
  /**
@@ -64,5 +75,8 @@ export declare class SnapshotUI extends Component {
64
75
  * @param props - The constructor properties.
65
76
  */
66
77
  constructor(contextManager: ContextManager, props: SnapshotUIConstructorProps);
78
+ /**
79
+ * @zignore
80
+ */
67
81
  dispose(): never;
68
82
  }
@@ -1,3 +1,10 @@
1
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
2
+ var useValue = arguments.length > 2;
3
+ for (var i = 0; i < initializers.length; i++) {
4
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
5
+ }
6
+ return useValue ? value : void 0;
7
+ };
1
8
  var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
9
  function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
10
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
@@ -25,14 +32,7 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn,
25
32
  if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
33
  done = true;
27
34
  };
28
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
- var useValue = arguments.length > 2;
30
- for (var i = 0; i < initializers.length; i++) {
31
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
- }
33
- return useValue ? value : void 0;
34
- };
35
- import { CanvasContext, registerLoadable, useOverlay, zComponent, zObserve, zUI } from '..';
35
+ import { CanvasContext, registerLoadable, useOverlay, zComponent, zIgnore, zObserve, zUI } from '..';
36
36
  import { DownloadSnapshot } from '../behaviors/DownloadSnapshot';
37
37
  import { ShareSnapshot } from '../behaviors/ShareSnapshot';
38
38
  import { ImageFormat, TakeSnapshot } from '../behaviors/TakeSnapshot';
@@ -59,6 +59,7 @@ let SnapshotUI = (() => {
59
59
  let _classExtraInitializers = [];
60
60
  let _classThis;
61
61
  let _classSuper = Component;
62
+ let _instanceExtraInitializers = [];
62
63
  let _onSave_decorators;
63
64
  let _onSave_initializers = [];
64
65
  let _onSave_extraInitializers = [];
@@ -83,6 +84,7 @@ let SnapshotUI = (() => {
83
84
  let _title_decorators;
84
85
  let _title_initializers = [];
85
86
  let _title_extraInitializers = [];
87
+ let _dispose_decorators;
86
88
  var SnapshotUI = class extends _classSuper {
87
89
  static { _classThis = this; }
88
90
  static {
@@ -117,6 +119,8 @@ let SnapshotUI = (() => {
117
119
  const ssctx = instance.contextManager.get(SnapshotContext);
118
120
  ssctx.title.value;
119
121
  }), zUI()];
122
+ _dispose_decorators = [zIgnore()];
123
+ __esDecorate(this, null, _dispose_decorators, { kind: "method", name: "dispose", static: false, private: false, access: { has: obj => "dispose" in obj, get: obj => obj.dispose }, metadata: _metadata }, null, _instanceExtraInitializers);
120
124
  __esDecorate(null, null, _onSave_decorators, { kind: "field", name: "onSave", static: false, private: false, access: { has: obj => "onSave" in obj, get: obj => obj.onSave, set: (obj, value) => { obj.onSave = value; } }, metadata: _metadata }, _onSave_initializers, _onSave_extraInitializers);
121
125
  __esDecorate(null, null, _onShare_decorators, { kind: "field", name: "onShare", static: false, private: false, access: { has: obj => "onShare" in obj, get: obj => obj.onShare, set: (obj, value) => { obj.onShare = value; } }, metadata: _metadata }, _onShare_initializers, _onShare_extraInitializers);
122
126
  __esDecorate(null, null, _visible_decorators, { kind: "field", name: "visible", static: false, private: false, access: { has: obj => "visible" in obj, get: obj => obj.visible, set: (obj, value) => { obj.visible = value; } }, metadata: _metadata }, _visible_initializers, _visible_extraInitializers);
@@ -130,19 +134,27 @@ let SnapshotUI = (() => {
130
134
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
131
135
  __runInitializers(_classThis, _classExtraInitializers);
132
136
  }
133
- captureButton;
137
+ captureButton = __runInitializers(this, _instanceExtraInitializers);
134
138
  socialShareBehaviours;
135
139
  style = document.createElement('link');
136
140
  shareDiv;
141
+ /**
142
+ * @zui
143
+ */
137
144
  onSave = __runInitializers(this, _onSave_initializers, new Event());
145
+ /**
146
+ * @zui
147
+ */
138
148
  onShare = (__runInitializers(this, _onSave_extraInitializers), __runInitializers(this, _onShare_initializers, new Event()));
139
149
  /**
140
150
  * @default true
151
+ * @zui
141
152
  */
142
153
  visible = (__runInitializers(this, _onShare_extraInitializers), __runInitializers(this, _visible_initializers, true));
143
154
  /**
144
155
  * The format of the image to capture.
145
156
  * @default "jpeg"
157
+ * @zui
146
158
  */
147
159
  format = (__runInitializers(this, _visible_extraInitializers), __runInitializers(this, _format_initializers, ImageFormat.JPEG));
148
160
  /**
@@ -155,16 +167,19 @@ let SnapshotUI = (() => {
155
167
  /**
156
168
  * The name of the file to download.
157
169
  * @default "canvas"
170
+ * @zui
158
171
  */
159
172
  fileName = (__runInitializers(this, _quality_extraInitializers), __runInitializers(this, _fileName_initializers, 'canvas'));
160
173
  /**
161
174
  * The text to share.
162
175
  * @default ""
176
+ * @zui
163
177
  */
164
178
  text = (__runInitializers(this, _fileName_extraInitializers), __runInitializers(this, _text_initializers, ''));
165
179
  /**
166
180
  * The title to share.
167
181
  * @default ""
182
+ * @zui
168
183
  */
169
184
  title = (__runInitializers(this, _text_extraInitializers), __runInitializers(this, _title_initializers, ''));
170
185
  /**
@@ -214,6 +229,9 @@ let SnapshotUI = (() => {
214
229
  this.captureButton.show();
215
230
  });
216
231
  }
232
+ /**
233
+ * @zignore
234
+ */
217
235
  dispose() {
218
236
  if (this.style.parentNode)
219
237
  this.style.parentNode.removeChild(this.style);
package/lib/context.d.ts CHANGED
@@ -62,9 +62,12 @@ type InstancesOfConstructorsWithProps<T extends Array<ConstructorWithProps>> = {
62
62
  export declare class Context<ConstructorPropsType extends {
63
63
  [id: string]: any;
64
64
  } = {}> {
65
+ /** @zignore */
65
66
  contextManager: ContextManager;
67
+ /** @zignore */
66
68
  constructorProps: ConstructorPropsType;
67
69
  /**
70
+ * @zignore
68
71
  * @default false
69
72
  */
70
73
  disposed: boolean;
@@ -73,7 +76,14 @@ export declare class Context<ConstructorPropsType extends {
73
76
  * @param contextManager The current ContextManager
74
77
  * @param constructorProps - The constructor properties.
75
78
  */
76
- constructor(contextManager: ContextManager, constructorProps: ConstructorPropsType);
79
+ constructor(
80
+ /** @zignore */
81
+ contextManager: ContextManager,
82
+ /** @zignore */
83
+ constructorProps: ConstructorPropsType);
84
+ /**
85
+ * @zignore
86
+ */
77
87
  dispose(): typeof Context.callSuperDispose & never;
78
88
  private static callSuperDispose;
79
89
  }
package/lib/context.js CHANGED
@@ -9,6 +9,7 @@ export class Context {
9
9
  contextManager;
10
10
  constructorProps;
11
11
  /**
12
+ * @zignore
12
13
  * @default false
13
14
  */
14
15
  disposed = false;
@@ -17,10 +18,17 @@ export class Context {
17
18
  * @param contextManager The current ContextManager
18
19
  * @param constructorProps - The constructor properties.
19
20
  */
20
- constructor(contextManager, constructorProps) {
21
+ constructor(
22
+ /** @zignore */
23
+ contextManager,
24
+ /** @zignore */
25
+ constructorProps) {
21
26
  this.contextManager = contextManager;
22
27
  this.constructorProps = constructorProps;
23
28
  }
29
+ /**
30
+ * @zignore
31
+ */
24
32
  dispose() {
25
33
  this.disposed = true;
26
34
  return undefined;
@@ -3,6 +3,9 @@ import type { Entity } from '../entity';
3
3
  import { Event } from '../event';
4
4
  /** @zcontext */
5
5
  export declare class AnalyticsContext extends Context {
6
+ /**
7
+ * @zignore
8
+ */
6
9
  readonly onEvent: Event<[string, any]>;
7
10
  /**
8
11
  * @zui
@@ -33,27 +33,39 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn,
33
33
  done = true;
34
34
  };
35
35
  import { Context } from '../context';
36
- import { zUI } from '../decorators';
36
+ import { zIgnore, zUI } from '../decorators';
37
37
  import { Event } from '../event';
38
38
  /** @zcontext */
39
39
  let AnalyticsContext = (() => {
40
40
  let _classSuper = Context;
41
41
  let _instanceExtraInitializers = [];
42
+ let _onEvent_decorators;
43
+ let _onEvent_initializers = [];
44
+ let _onEvent_extraInitializers = [];
42
45
  let _logEvent_decorators;
43
46
  return class AnalyticsContext extends _classSuper {
44
47
  static {
45
48
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
49
+ _onEvent_decorators = [zIgnore()];
46
50
  _logEvent_decorators = [zUI()];
47
51
  __esDecorate(this, null, _logEvent_decorators, { kind: "method", name: "logEvent", static: false, private: false, access: { has: obj => "logEvent" in obj, get: obj => obj.logEvent }, metadata: _metadata }, null, _instanceExtraInitializers);
52
+ __esDecorate(null, null, _onEvent_decorators, { kind: "field", name: "onEvent", static: false, private: false, access: { has: obj => "onEvent" in obj, get: obj => obj.onEvent, set: (obj, value) => { obj.onEvent = value; } }, metadata: _metadata }, _onEvent_initializers, _onEvent_extraInitializers);
48
53
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
49
54
  }
50
- onEvent = (__runInitializers(this, _instanceExtraInitializers), new Event());
55
+ /**
56
+ * @zignore
57
+ */
58
+ onEvent = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _onEvent_initializers, new Event()));
51
59
  /**
52
60
  * @zui
53
61
  */
54
62
  logEvent(name, params) {
55
63
  this.onEvent.emit(name, params);
56
64
  }
65
+ constructor() {
66
+ super(...arguments);
67
+ __runInitializers(this, _onEvent_extraInitializers);
68
+ }
57
69
  };
58
70
  })();
59
71
  export { AnalyticsContext };