zakeke-configurator-react 0.1.370 → 0.1.372

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 (83) hide show
  1. package/README.md +283 -283
  2. package/dist/declarations/3D/src/Components/AR/AndroidAR.d.ts +7 -7
  3. package/dist/declarations/3D/src/Components/ActionExecutor/SceneActionExecutor.d.ts +87 -87
  4. package/dist/declarations/3D/src/Components/CollapseExplode/MeshLocationsManager.d.ts +44 -44
  5. package/dist/declarations/3D/src/Components/DesignManagers/MeshDesignManager.d.ts +166 -166
  6. package/dist/declarations/3D/src/Components/DesignManagers/SceneDesignManager.d.ts +63 -63
  7. package/dist/declarations/3D/src/Components/Draco/DracoCompression.d.ts +106 -106
  8. package/dist/declarations/3D/src/Components/Environment/EnvironmentManager.d.ts +43 -43
  9. package/dist/declarations/3D/src/Components/Glow/GlowManager.d.ts +26 -26
  10. package/dist/declarations/3D/src/Components/IncrementalFiles/IncrementalFiles.d.ts +26 -26
  11. package/dist/declarations/3D/src/Components/IncrementalFiles/MakeIncremental.d.ts +11 -11
  12. package/dist/declarations/3D/src/Components/InfoPointsManager/InfoPointsManager.d.ts +122 -122
  13. package/dist/declarations/3D/src/Components/MaterialsPreview/MaterialsPreview.d.ts +16 -16
  14. package/dist/declarations/3D/src/Components/MeshExpander/MeshExpander.d.ts +24 -24
  15. package/dist/declarations/3D/src/Components/NormalMap/ProceduralNormalMap.d.ts +30 -30
  16. package/dist/declarations/3D/src/Components/Preview3D/Preview3DConfigurationManager.d.ts +51 -51
  17. package/dist/declarations/3D/src/Components/ProceduralTextures/BaseProceduralTexture.d.ts +16 -16
  18. package/dist/declarations/3D/src/Components/ProceduralTextures/BlendProceduralTexture.d.ts +31 -31
  19. package/dist/declarations/3D/src/Components/ProceduralTextures/BlurXProceduralTexture.d.ts +23 -23
  20. package/dist/declarations/3D/src/Components/ProceduralTextures/BlurYProceduralTexture.d.ts +23 -23
  21. package/dist/declarations/3D/src/Components/ProceduralTextures/ForegroundBackgroundProceduralTexture.d.ts +26 -26
  22. package/dist/declarations/3D/src/Components/ProceduralTextures/MoveProceduralTexture.d.ts +23 -23
  23. package/dist/declarations/3D/src/Components/ProceduralTextures/MultiplyProceduralTexture.d.ts +23 -23
  24. package/dist/declarations/3D/src/Components/ProceduralTextures/NormalMapProceduralTexture.d.ts +35 -35
  25. package/dist/declarations/3D/src/Components/ProceduralTextures/OpacityProceduralTexture.d.ts +23 -23
  26. package/dist/declarations/3D/src/Components/ProceduralTextures/OverlayProceduralTexture.d.ts +23 -23
  27. package/dist/declarations/3D/src/Components/SceneHelper.d.ts +352 -352
  28. package/dist/declarations/3D/src/Components/ScenePreview/ScenePreview.d.ts +19 -19
  29. package/dist/declarations/3D/src/Components/SceneToBlobs/SceneToBlobs.d.ts +31 -31
  30. package/dist/declarations/3D/src/Components/Selector/ElementSelector.d.ts +42 -42
  31. package/dist/declarations/3D/src/Components/Shadows/InnerShadow.d.ts +18 -18
  32. package/dist/declarations/3D/src/Components/Shadows/OuterShadow.d.ts +16 -16
  33. package/dist/declarations/3D/src/Components/USDZ/UsdzHelper.d.ts +4 -4
  34. package/dist/declarations/3D/src/Enumerations.d.ts +15 -15
  35. package/dist/declarations/3D/src/Helpers/debounce.d.ts +8 -8
  36. package/dist/declarations/3D/src/Helpers/utils.d.ts +40 -40
  37. package/dist/declarations/3D/src/Interfaces/IDisposable.d.ts +9 -9
  38. package/dist/declarations/3D/src/Interfaces/ISceneEditor.d.ts +11 -11
  39. package/dist/declarations/3D/src/Interfaces/ISupportInitialize.d.ts +13 -13
  40. package/dist/declarations/3D/src/Interfaces/ITryOn.d.ts +76 -76
  41. package/dist/declarations/3D/src/Layers/AxesLayer.d.ts +17 -17
  42. package/dist/declarations/3D/src/Layers/LightsLayer.d.ts +31 -31
  43. package/dist/declarations/3D/src/Misc/Database.d.ts +20 -20
  44. package/dist/declarations/3D/src/Misc/DefaultAssetUrls.d.ts +51 -51
  45. package/dist/declarations/3D/src/Misc/Observable.d.ts +220 -220
  46. package/dist/declarations/3D/src/Misc/StringTools.d.ts +31 -31
  47. package/dist/declarations/3D/src/Misc/WorkerPool.d.ts +24 -24
  48. package/dist/declarations/3D/src/Viewers/MaterialEditor.d.ts +57 -57
  49. package/dist/declarations/3D/src/Viewers/SceneEditor.d.ts +676 -676
  50. package/dist/declarations/3D/src/Viewers/SceneViewer.d.ts +411 -411
  51. package/dist/declarations/3D/src/index.d.ts +61 -61
  52. package/dist/declarations/3D/src/types.d.ts +2 -2
  53. package/dist/declarations/composer/Admin/src/Pages/ParametricMeshesBuilder/uvHelpers.d.ts +1 -1
  54. package/dist/declarations/composer/Components/ChunkedTask.d.ts +16 -16
  55. package/dist/declarations/composer/Module/src/api.d.ts +3 -3
  56. package/dist/declarations/composer/Module/src/components/debug/debugPanel.d.ts +6 -6
  57. package/dist/declarations/composer/Module/src/components/debugs/debugPanel.d.ts +2 -2
  58. package/dist/declarations/composer/Module/src/components/sceneViewer.d.ts +5 -5
  59. package/dist/declarations/composer/Module/src/components/tryOnViewer.d.ts +109 -109
  60. package/dist/declarations/composer/Module/src/components/tryon/deepARQrCode.d.ts +6 -6
  61. package/dist/declarations/composer/Module/src/components/tryon/tryOnProviders/tryOnBanuba.d.ts +22 -22
  62. package/dist/declarations/composer/Module/src/components/tryon/tryOnProviders/tryOnDeepAR.d.ts +22 -22
  63. package/dist/declarations/composer/Module/src/environment.d.ts +443 -447
  64. package/dist/declarations/composer/Module/src/fontsManager.d.ts +75 -75
  65. package/dist/declarations/composer/Module/src/generated/feature-flags.d.ts +83 -83
  66. package/dist/declarations/composer/Module/src/helpers.d.ts +49 -49
  67. package/dist/declarations/composer/Module/src/hooks/tryonContext.d.ts +11 -11
  68. package/dist/declarations/composer/Module/src/imageUploadTask.d.ts +20 -20
  69. package/dist/declarations/composer/Module/src/index.d.ts +11 -11
  70. package/dist/declarations/composer/Module/src/integrations/Integration.d.ts +24 -24
  71. package/dist/declarations/composer/Module/src/integrations/generic.d.ts +16 -16
  72. package/dist/declarations/composer/Module/src/models.d.ts +1203 -1212
  73. package/dist/declarations/composer/Module/src/state/createProviderValue.d.ts +3 -3
  74. package/dist/declarations/composer/Module/src/state/provider.d.ts +18 -18
  75. package/dist/declarations/composer/Module/src/state/providerValue.d.ts +278 -281
  76. package/dist/declarations/composer/Module/src/state/state.d.ts +11 -11
  77. package/dist/declarations/libs/pricingRuleBase/DesignPriceCalculatorRuleBased.d.ts +83 -83
  78. package/dist/globals0.js +1 -1
  79. package/dist/globals1.js +1 -1
  80. package/dist/index.js +11917 -11739
  81. package/dist/index.js.map +1 -1
  82. package/package.json +43 -43
  83. /package/dist/declarations/composer/Module/src/integrations/{helpers.d.ts → Helpers.d.ts} +0 -0
@@ -1,220 +1,220 @@
1
- import { Nullable } from "../types";
2
- /**
3
- * A class serves as a medium between the observable and its observers
4
- */
5
- export declare class EventState {
6
- /**
7
- * Create a new EventState
8
- * @param mask defines the mask associated with this state
9
- * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true
10
- * @param target defines the original target of the state
11
- * @param currentTarget defines the current target of the state
12
- */
13
- constructor(mask: number, skipNextObservers?: boolean, target?: any, currentTarget?: any);
14
- /**
15
- * Initialize the current event state
16
- * @param mask defines the mask associated with this state
17
- * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true
18
- * @param target defines the original target of the state
19
- * @param currentTarget defines the current target of the state
20
- * @returns the current event state
21
- */
22
- initalize(mask: number, skipNextObservers?: boolean, target?: any, currentTarget?: any): EventState;
23
- /**
24
- * An Observer can set this property to true to prevent subsequent observers of being notified
25
- */
26
- skipNextObservers: boolean;
27
- /**
28
- * Get the mask value that were used to trigger the event corresponding to this EventState object
29
- */
30
- mask: number;
31
- /**
32
- * The object that originally notified the event
33
- */
34
- target?: any;
35
- /**
36
- * The current object in the bubbling phase
37
- */
38
- currentTarget?: any;
39
- /**
40
- * This will be populated with the return value of the last function that was executed.
41
- * If it is the first function in the callback chain it will be the event data.
42
- */
43
- lastReturnValue?: any;
44
- }
45
- /**
46
- * Represent an Observer registered to a given Observable object.
47
- */
48
- export declare class Observer<T> {
49
- /**
50
- * Defines the callback to call when the observer is notified
51
- */
52
- callback: (eventData: T, eventState: EventState) => void;
53
- /**
54
- * Defines the mask of the observer (used to filter notifications)
55
- */
56
- mask: number;
57
- /**
58
- * Defines the current scope used to restore the JS context
59
- */
60
- scope: any;
61
- /** @hidden */
62
- _willBeUnregistered: boolean;
63
- /**
64
- * Gets or sets a property defining that the observer as to be unregistered after the next notification
65
- */
66
- unregisterOnNextCall: boolean;
67
- /**
68
- * Creates a new observer
69
- * @param callback defines the callback to call when the observer is notified
70
- * @param mask defines the mask of the observer (used to filter notifications)
71
- * @param scope defines the current scope used to restore the JS context
72
- */
73
- constructor(
74
- /**
75
- * Defines the callback to call when the observer is notified
76
- */
77
- callback: (eventData: T, eventState: EventState) => void,
78
- /**
79
- * Defines the mask of the observer (used to filter notifications)
80
- */
81
- mask: number,
82
- /**
83
- * Defines the current scope used to restore the JS context
84
- */
85
- scope?: any);
86
- }
87
- /**
88
- * Represent a list of observers registered to multiple Observables object.
89
- */
90
- export declare class MultiObserver<T> {
91
- private _observers;
92
- private _observables;
93
- /**
94
- * Release associated resources
95
- */
96
- dispose(): void;
97
- /**
98
- * Raise a callback when one of the observable will notify
99
- * @param observables defines a list of observables to watch
100
- * @param callback defines the callback to call on notification
101
- * @param mask defines the mask used to filter notifications
102
- * @param scope defines the current scope used to restore the JS context
103
- * @returns the new MultiObserver
104
- */
105
- static Watch<T>(observables: Observable<T>[], callback: (eventData: T, eventState: EventState) => void, mask?: number, scope?: any): MultiObserver<T>;
106
- }
107
- /**
108
- * The Observable class is a simple implementation of the Observable pattern.
109
- *
110
- * There's one slight particularity though: a given Observable can notify its observer using a particular mask value, only the Observers registered with this mask value will be notified.
111
- * This enable a more fine grained execution without having to rely on multiple different Observable objects.
112
- * For instance you may have a given Observable that have four different types of notifications: Move (mask = 0x01), Stop (mask = 0x02), Turn Right (mask = 0X04), Turn Left (mask = 0X08).
113
- * A given observer can register itself with only Move and Stop (mask = 0x03), then it will only be notified when one of these two occurs and will never be for Turn Left/Right.
114
- */
115
- export declare class Observable<T> {
116
- private _observers;
117
- private _eventState;
118
- private _onObserverAdded;
119
- /**
120
- * Gets the list of observers
121
- */
122
- get observers(): Array<Observer<T>>;
123
- /**
124
- * Creates a new observable
125
- * @param onObserverAdded defines a callback to call when a new observer is added
126
- */
127
- constructor(onObserverAdded?: (observer: Observer<T>) => void);
128
- /**
129
- * Create a new Observer with the specified callback
130
- * @param callback the callback that will be executed for that Observer
131
- * @param mask the mask used to filter observers
132
- * @param insertFirst if true the callback will be inserted at the first position, hence executed before the others ones. If false (default behavior) the callback will be inserted at the last position, executed after all the others already present.
133
- * @param scope optional scope for the callback to be called from
134
- * @param unregisterOnFirstCall defines if the observer as to be unregistered after the next notification
135
- * @returns the new observer created for the callback
136
- */
137
- add(callback: (eventData: T, eventState: EventState) => void, mask?: number, insertFirst?: boolean, scope?: any, unregisterOnFirstCall?: boolean): Nullable<Observer<T>>;
138
- /**
139
- * Create a new Observer with the specified callback and unregisters after the next notification
140
- * @param callback the callback that will be executed for that Observer
141
- * @returns the new observer created for the callback
142
- */
143
- addOnce(callback: (eventData: T, eventState: EventState) => void): Nullable<Observer<T>>;
144
- /**
145
- * Remove an Observer from the Observable object
146
- * @param observer the instance of the Observer to remove
147
- * @returns false if it doesn't belong to this Observable
148
- */
149
- remove(observer: Nullable<Observer<T>>): boolean;
150
- /**
151
- * Remove a callback from the Observable object
152
- * @param callback the callback to remove
153
- * @param scope optional scope. If used only the callbacks with this scope will be removed
154
- * @returns false if it doesn't belong to this Observable
155
- */
156
- removeCallback(callback: (eventData: T, eventState: EventState) => void, scope?: any): boolean;
157
- private _deferUnregister;
158
- private _remove;
159
- /**
160
- * Moves the observable to the top of the observer list making it get called first when notified
161
- * @param observer the observer to move
162
- */
163
- makeObserverTopPriority(observer: Observer<T>): void;
164
- /**
165
- * Moves the observable to the bottom of the observer list making it get called last when notified
166
- * @param observer the observer to move
167
- */
168
- makeObserverBottomPriority(observer: Observer<T>): void;
169
- /**
170
- * Notify all Observers by calling their respective callback with the given data
171
- * Will return true if all observers were executed, false if an observer set skipNextObservers to true, then prevent the subsequent ones to execute
172
- * @param eventData defines the data to send to all observers
173
- * @param mask defines the mask of the current notification (observers with incompatible mask (ie mask & observer.mask === 0) will not be notified)
174
- * @param target defines the original target of the state
175
- * @param currentTarget defines the current target of the state
176
- * @returns false if the complete observer chain was not processed (because one observer set the skipNextObservers to true)
177
- */
178
- notifyObservers(eventData: T, mask?: number, target?: any, currentTarget?: any): boolean;
179
- /**
180
- * Calling this will execute each callback, expecting it to be a promise or return a value.
181
- * If at any point in the chain one function fails, the promise will fail and the execution will not continue.
182
- * This is useful when a chain of events (sometimes async events) is needed to initialize a certain object
183
- * and it is crucial that all callbacks will be executed.
184
- * The order of the callbacks is kept, callbacks are not executed parallel.
185
- *
186
- * @param eventData The data to be sent to each callback
187
- * @param mask is used to filter observers defaults to 0
188
- * @param target defines the callback target (see EventState)
189
- * @param currentTarget defines he current object in the bubbling phase
190
- * @returns {Promise<T>} will return a Promise than resolves when all callbacks executed successfully.
191
- */
192
- notifyObserversWithPromise(eventData: T, mask?: number, target?: any, currentTarget?: any): Promise<T>;
193
- /**
194
- * Notify a specific observer
195
- * @param observer defines the observer to notify
196
- * @param eventData defines the data to be sent to each callback
197
- * @param mask is used to filter observers defaults to 0
198
- */
199
- notifyObserver(observer: Observer<T>, eventData: T, mask?: number): void;
200
- /**
201
- * Gets a boolean indicating if the observable has at least one observer
202
- * @returns true is the Observable has at least one Observer registered
203
- */
204
- hasObservers(): boolean;
205
- /**
206
- * Clear the list of observers
207
- */
208
- clear(): void;
209
- /**
210
- * Clone the current observable
211
- * @returns a new observable
212
- */
213
- clone(): Observable<T>;
214
- /**
215
- * Does this observable handles observer registered with a given mask
216
- * @param mask defines the mask to be tested
217
- * @return whether or not one observer registered with the given mask is handeled
218
- **/
219
- hasSpecificMask(mask?: number): boolean;
220
- }
1
+ import { Nullable } from "../types";
2
+ /**
3
+ * A class serves as a medium between the observable and its observers
4
+ */
5
+ export declare class EventState {
6
+ /**
7
+ * Create a new EventState
8
+ * @param mask defines the mask associated with this state
9
+ * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true
10
+ * @param target defines the original target of the state
11
+ * @param currentTarget defines the current target of the state
12
+ */
13
+ constructor(mask: number, skipNextObservers?: boolean, target?: any, currentTarget?: any);
14
+ /**
15
+ * Initialize the current event state
16
+ * @param mask defines the mask associated with this state
17
+ * @param skipNextObservers defines a flag which will instruct the observable to skip following observers when set to true
18
+ * @param target defines the original target of the state
19
+ * @param currentTarget defines the current target of the state
20
+ * @returns the current event state
21
+ */
22
+ initalize(mask: number, skipNextObservers?: boolean, target?: any, currentTarget?: any): EventState;
23
+ /**
24
+ * An Observer can set this property to true to prevent subsequent observers of being notified
25
+ */
26
+ skipNextObservers: boolean;
27
+ /**
28
+ * Get the mask value that were used to trigger the event corresponding to this EventState object
29
+ */
30
+ mask: number;
31
+ /**
32
+ * The object that originally notified the event
33
+ */
34
+ target?: any;
35
+ /**
36
+ * The current object in the bubbling phase
37
+ */
38
+ currentTarget?: any;
39
+ /**
40
+ * This will be populated with the return value of the last function that was executed.
41
+ * If it is the first function in the callback chain it will be the event data.
42
+ */
43
+ lastReturnValue?: any;
44
+ }
45
+ /**
46
+ * Represent an Observer registered to a given Observable object.
47
+ */
48
+ export declare class Observer<T> {
49
+ /**
50
+ * Defines the callback to call when the observer is notified
51
+ */
52
+ callback: (eventData: T, eventState: EventState) => void;
53
+ /**
54
+ * Defines the mask of the observer (used to filter notifications)
55
+ */
56
+ mask: number;
57
+ /**
58
+ * Defines the current scope used to restore the JS context
59
+ */
60
+ scope: any;
61
+ /** @hidden */
62
+ _willBeUnregistered: boolean;
63
+ /**
64
+ * Gets or sets a property defining that the observer as to be unregistered after the next notification
65
+ */
66
+ unregisterOnNextCall: boolean;
67
+ /**
68
+ * Creates a new observer
69
+ * @param callback defines the callback to call when the observer is notified
70
+ * @param mask defines the mask of the observer (used to filter notifications)
71
+ * @param scope defines the current scope used to restore the JS context
72
+ */
73
+ constructor(
74
+ /**
75
+ * Defines the callback to call when the observer is notified
76
+ */
77
+ callback: (eventData: T, eventState: EventState) => void,
78
+ /**
79
+ * Defines the mask of the observer (used to filter notifications)
80
+ */
81
+ mask: number,
82
+ /**
83
+ * Defines the current scope used to restore the JS context
84
+ */
85
+ scope?: any);
86
+ }
87
+ /**
88
+ * Represent a list of observers registered to multiple Observables object.
89
+ */
90
+ export declare class MultiObserver<T> {
91
+ private _observers;
92
+ private _observables;
93
+ /**
94
+ * Release associated resources
95
+ */
96
+ dispose(): void;
97
+ /**
98
+ * Raise a callback when one of the observable will notify
99
+ * @param observables defines a list of observables to watch
100
+ * @param callback defines the callback to call on notification
101
+ * @param mask defines the mask used to filter notifications
102
+ * @param scope defines the current scope used to restore the JS context
103
+ * @returns the new MultiObserver
104
+ */
105
+ static Watch<T>(observables: Observable<T>[], callback: (eventData: T, eventState: EventState) => void, mask?: number, scope?: any): MultiObserver<T>;
106
+ }
107
+ /**
108
+ * The Observable class is a simple implementation of the Observable pattern.
109
+ *
110
+ * There's one slight particularity though: a given Observable can notify its observer using a particular mask value, only the Observers registered with this mask value will be notified.
111
+ * This enable a more fine grained execution without having to rely on multiple different Observable objects.
112
+ * For instance you may have a given Observable that have four different types of notifications: Move (mask = 0x01), Stop (mask = 0x02), Turn Right (mask = 0X04), Turn Left (mask = 0X08).
113
+ * A given observer can register itself with only Move and Stop (mask = 0x03), then it will only be notified when one of these two occurs and will never be for Turn Left/Right.
114
+ */
115
+ export declare class Observable<T> {
116
+ private _observers;
117
+ private _eventState;
118
+ private _onObserverAdded;
119
+ /**
120
+ * Gets the list of observers
121
+ */
122
+ get observers(): Array<Observer<T>>;
123
+ /**
124
+ * Creates a new observable
125
+ * @param onObserverAdded defines a callback to call when a new observer is added
126
+ */
127
+ constructor(onObserverAdded?: (observer: Observer<T>) => void);
128
+ /**
129
+ * Create a new Observer with the specified callback
130
+ * @param callback the callback that will be executed for that Observer
131
+ * @param mask the mask used to filter observers
132
+ * @param insertFirst if true the callback will be inserted at the first position, hence executed before the others ones. If false (default behavior) the callback will be inserted at the last position, executed after all the others already present.
133
+ * @param scope optional scope for the callback to be called from
134
+ * @param unregisterOnFirstCall defines if the observer as to be unregistered after the next notification
135
+ * @returns the new observer created for the callback
136
+ */
137
+ add(callback: (eventData: T, eventState: EventState) => void, mask?: number, insertFirst?: boolean, scope?: any, unregisterOnFirstCall?: boolean): Nullable<Observer<T>>;
138
+ /**
139
+ * Create a new Observer with the specified callback and unregisters after the next notification
140
+ * @param callback the callback that will be executed for that Observer
141
+ * @returns the new observer created for the callback
142
+ */
143
+ addOnce(callback: (eventData: T, eventState: EventState) => void): Nullable<Observer<T>>;
144
+ /**
145
+ * Remove an Observer from the Observable object
146
+ * @param observer the instance of the Observer to remove
147
+ * @returns false if it doesn't belong to this Observable
148
+ */
149
+ remove(observer: Nullable<Observer<T>>): boolean;
150
+ /**
151
+ * Remove a callback from the Observable object
152
+ * @param callback the callback to remove
153
+ * @param scope optional scope. If used only the callbacks with this scope will be removed
154
+ * @returns false if it doesn't belong to this Observable
155
+ */
156
+ removeCallback(callback: (eventData: T, eventState: EventState) => void, scope?: any): boolean;
157
+ private _deferUnregister;
158
+ private _remove;
159
+ /**
160
+ * Moves the observable to the top of the observer list making it get called first when notified
161
+ * @param observer the observer to move
162
+ */
163
+ makeObserverTopPriority(observer: Observer<T>): void;
164
+ /**
165
+ * Moves the observable to the bottom of the observer list making it get called last when notified
166
+ * @param observer the observer to move
167
+ */
168
+ makeObserverBottomPriority(observer: Observer<T>): void;
169
+ /**
170
+ * Notify all Observers by calling their respective callback with the given data
171
+ * Will return true if all observers were executed, false if an observer set skipNextObservers to true, then prevent the subsequent ones to execute
172
+ * @param eventData defines the data to send to all observers
173
+ * @param mask defines the mask of the current notification (observers with incompatible mask (ie mask & observer.mask === 0) will not be notified)
174
+ * @param target defines the original target of the state
175
+ * @param currentTarget defines the current target of the state
176
+ * @returns false if the complete observer chain was not processed (because one observer set the skipNextObservers to true)
177
+ */
178
+ notifyObservers(eventData: T, mask?: number, target?: any, currentTarget?: any): boolean;
179
+ /**
180
+ * Calling this will execute each callback, expecting it to be a promise or return a value.
181
+ * If at any point in the chain one function fails, the promise will fail and the execution will not continue.
182
+ * This is useful when a chain of events (sometimes async events) is needed to initialize a certain object
183
+ * and it is crucial that all callbacks will be executed.
184
+ * The order of the callbacks is kept, callbacks are not executed parallel.
185
+ *
186
+ * @param eventData The data to be sent to each callback
187
+ * @param mask is used to filter observers defaults to 0
188
+ * @param target defines the callback target (see EventState)
189
+ * @param currentTarget defines he current object in the bubbling phase
190
+ * @returns {Promise<T>} will return a Promise than resolves when all callbacks executed successfully.
191
+ */
192
+ notifyObserversWithPromise(eventData: T, mask?: number, target?: any, currentTarget?: any): Promise<T>;
193
+ /**
194
+ * Notify a specific observer
195
+ * @param observer defines the observer to notify
196
+ * @param eventData defines the data to be sent to each callback
197
+ * @param mask is used to filter observers defaults to 0
198
+ */
199
+ notifyObserver(observer: Observer<T>, eventData: T, mask?: number): void;
200
+ /**
201
+ * Gets a boolean indicating if the observable has at least one observer
202
+ * @returns true is the Observable has at least one Observer registered
203
+ */
204
+ hasObservers(): boolean;
205
+ /**
206
+ * Clear the list of observers
207
+ */
208
+ clear(): void;
209
+ /**
210
+ * Clone the current observable
211
+ * @returns a new observable
212
+ */
213
+ clone(): Observable<T>;
214
+ /**
215
+ * Does this observable handles observer registered with a given mask
216
+ * @param mask defines the mask to be tested
217
+ * @return whether or not one observer registered with the given mask is handeled
218
+ **/
219
+ hasSpecificMask(mask?: number): boolean;
220
+ }
@@ -1,31 +1,31 @@
1
- /**
2
- * Helper to manipulate strings
3
- */
4
- export declare class StringTools {
5
- /**
6
- * Checks for a matching suffix at the end of a string (for ES5 and lower)
7
- * @param str Source string
8
- * @param suffix Suffix to search for in the source string
9
- * @returns Boolean indicating whether the suffix was found (true) or not (false)
10
- */
11
- static EndsWith(str: string, suffix: string): boolean;
12
- /**
13
- * Checks for a matching suffix at the beginning of a string (for ES5 and lower)
14
- * @param str Source string
15
- * @param suffix Suffix to search for in the source string
16
- * @returns Boolean indicating whether the suffix was found (true) or not (false)
17
- */
18
- static StartsWith(str: string, suffix: string): boolean;
19
- /**
20
- * Decodes a buffer into a string
21
- * @param buffer The buffer to decode
22
- * @returns The decoded string
23
- */
24
- static Decode(buffer: Uint8Array | Uint16Array): string;
25
- /**
26
- * Encode a buffer to a base64 string
27
- * @param buffer defines the buffer to encode
28
- * @returns the encoded string
29
- */
30
- static EncodeArrayBufferToBase64(buffer: ArrayBuffer | ArrayBufferView): string;
31
- }
1
+ /**
2
+ * Helper to manipulate strings
3
+ */
4
+ export declare class StringTools {
5
+ /**
6
+ * Checks for a matching suffix at the end of a string (for ES5 and lower)
7
+ * @param str Source string
8
+ * @param suffix Suffix to search for in the source string
9
+ * @returns Boolean indicating whether the suffix was found (true) or not (false)
10
+ */
11
+ static EndsWith(str: string, suffix: string): boolean;
12
+ /**
13
+ * Checks for a matching suffix at the beginning of a string (for ES5 and lower)
14
+ * @param str Source string
15
+ * @param suffix Suffix to search for in the source string
16
+ * @returns Boolean indicating whether the suffix was found (true) or not (false)
17
+ */
18
+ static StartsWith(str: string, suffix: string): boolean;
19
+ /**
20
+ * Decodes a buffer into a string
21
+ * @param buffer The buffer to decode
22
+ * @returns The decoded string
23
+ */
24
+ static Decode(buffer: Uint8Array | Uint16Array): string;
25
+ /**
26
+ * Encode a buffer to a base64 string
27
+ * @param buffer defines the buffer to encode
28
+ * @returns the encoded string
29
+ */
30
+ static EncodeArrayBufferToBase64(buffer: ArrayBuffer | ArrayBufferView): string;
31
+ }
@@ -1,24 +1,24 @@
1
- import { IDisposable } from "../Interfaces/IDisposable";
2
- /**
3
- * Helper class to push actions to a pool of workers.
4
- */
5
- export declare class WorkerPool implements IDisposable {
6
- private _workerInfos?;
7
- private _pendingActions?;
8
- /**
9
- * Constructor
10
- * @param workers Array of workers to use for actions
11
- */
12
- constructor(workers: Array<Worker>);
13
- /**
14
- * Terminates all workers and clears any pending actions.
15
- */
16
- dispose(): void;
17
- /**
18
- * Pushes an action to the worker pool. If all the workers are active, the action will be
19
- * pended until a worker has completed its action.
20
- * @param action The action to perform. Call onComplete when the action is complete.
21
- */
22
- push(action: (worker: Worker, onComplete: () => void) => void): void;
23
- private _execute;
24
- }
1
+ import { IDisposable } from "../Interfaces/IDisposable";
2
+ /**
3
+ * Helper class to push actions to a pool of workers.
4
+ */
5
+ export declare class WorkerPool implements IDisposable {
6
+ private _workerInfos?;
7
+ private _pendingActions?;
8
+ /**
9
+ * Constructor
10
+ * @param workers Array of workers to use for actions
11
+ */
12
+ constructor(workers: Array<Worker>);
13
+ /**
14
+ * Terminates all workers and clears any pending actions.
15
+ */
16
+ dispose(): void;
17
+ /**
18
+ * Pushes an action to the worker pool. If all the workers are active, the action will be
19
+ * pended until a worker has completed its action.
20
+ * @param action The action to perform. Call onComplete when the action is complete.
21
+ */
22
+ push(action: (worker: Worker, onComplete: () => void) => void): void;
23
+ private _execute;
24
+ }