dyo-tools 0.2.0 → 0.3.0

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 (167) hide show
  1. package/dist/constants.js +4 -4
  2. package/dist/constants.js.map +1 -1
  3. package/dist/core/DTAction.d.ts +10 -0
  4. package/dist/core/DTAction.js +24 -0
  5. package/dist/core/DTAction.js.map +1 -0
  6. package/dist/core/DTBunch.d.ts +6 -7
  7. package/dist/core/DTBunch.js +16 -13
  8. package/dist/core/DTBunch.js.map +1 -1
  9. package/dist/core/DTComponentPhysical.d.ts +6 -4
  10. package/dist/core/DTComponentPhysical.js +6 -0
  11. package/dist/core/DTComponentPhysical.js.map +1 -1
  12. package/dist/core/DTElement.d.ts +5 -0
  13. package/dist/core/DTElement.js +12 -2
  14. package/dist/core/DTElement.js.map +1 -1
  15. package/dist/core/DTManager.d.ts +3 -1
  16. package/dist/core/DTManager.js +24 -14
  17. package/dist/core/DTManager.js.map +1 -1
  18. package/dist/core/DTMaster.d.ts +24 -0
  19. package/dist/core/DTMaster.js +133 -0
  20. package/dist/core/DTMaster.js.map +1 -0
  21. package/dist/core/DTModule.d.ts +14 -0
  22. package/dist/core/DTModule.js +39 -0
  23. package/dist/core/DTModule.js.map +1 -0
  24. package/dist/index.d.ts +5 -1
  25. package/dist/index.js +11 -3
  26. package/dist/index.js.map +1 -1
  27. package/dist/libs/player/DTPlayer.element.d.ts +5 -0
  28. package/dist/libs/player/DTPlayer.element.js +11 -0
  29. package/dist/libs/player/DTPlayer.element.js.map +1 -0
  30. package/dist/libs/player/DTPlayer.manager.d.ts +11 -0
  31. package/dist/libs/player/DTPlayer.manager.js +42 -0
  32. package/dist/libs/player/DTPlayer.manager.js.map +1 -0
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/dist/types/core.d.ts +103 -0
  35. package/dist/types/core.js +15 -0
  36. package/dist/types/core.js.map +1 -0
  37. package/dist/types/index.d.ts +2 -98
  38. package/dist/types/index.js +16 -12
  39. package/dist/types/index.js.map +1 -1
  40. package/dist/types/player.d.ts +5 -0
  41. package/dist/types/player.js +3 -0
  42. package/dist/types/player.js.map +1 -0
  43. package/docs/assets/highlight.css +29 -29
  44. package/docs/assets/main.js +59 -58
  45. package/docs/assets/navigation.js +1 -0
  46. package/docs/assets/search.js +1 -1
  47. package/docs/assets/style.css +1414 -1367
  48. package/docs/classes/core_DTAction.DYOToolsAction.html +89 -0
  49. package/docs/classes/core_DTBunch.DYOToolsBunch.html +254 -0
  50. package/docs/classes/core_DTComponent.DYOToolsComponent.html +76 -0
  51. package/docs/classes/core_DTComponentPhysical.DYOToolsComponentPhysical.html +110 -0
  52. package/docs/classes/core_DTComponentWithMeta.DYOToolsComponentWithMeta.html +96 -0
  53. package/docs/classes/core_DTElement.DYOToolsElement.html +135 -0
  54. package/docs/classes/core_DTError.DYOToolsError.html +37 -0
  55. package/docs/classes/core_DTManager.DYOToolsManager.html +237 -0
  56. package/docs/classes/core_DTMaster.DYOToolsMaster.html +150 -0
  57. package/docs/classes/core_DTModule.DYOToolsModule.html +92 -0
  58. package/docs/classes/libs_DYOFinder.DYOFinder.html +34 -0
  59. package/docs/classes/libs_player_DTPlayer_element.DYOToolsPlayer.html +134 -0
  60. package/docs/classes/libs_player_DTPlayer_manager.DYOToolsPlayerManager.html +243 -0
  61. package/docs/enums/types_core.FilterOperatorType.html +10 -0
  62. package/docs/hierarchy.html +1 -0
  63. package/docs/index.html +1 -46
  64. package/docs/interfaces/types_core.DTBunchFilters.html +6 -0
  65. package/docs/interfaces/types_core.DTBunchOptions.html +19 -0
  66. package/docs/interfaces/types_core.DTBunchToObject.html +7 -0
  67. package/docs/interfaces/types_core.DTComponentOptions.html +5 -0
  68. package/docs/interfaces/types_core.DTComponentToObject.html +4 -0
  69. package/docs/interfaces/types_core.DTElementToObject.html +7 -0
  70. package/docs/interfaces/types_core.DTManagerFilters.html +6 -0
  71. package/docs/interfaces/types_core.DTManagerOptions.html +8 -0
  72. package/docs/interfaces/types_core.DTManagerToObject.html +5 -0
  73. package/docs/interfaces/types_core.DTMasterToObject.html +8 -0
  74. package/docs/interfaces/types_core.DTModuleToObject.html +6 -0
  75. package/docs/interfaces/types_core.DYOFinderConfigurationPropDefault.html +4 -0
  76. package/docs/interfaces/types_core.DYOFinderConfigurationPropObjectSearch.html +4 -0
  77. package/docs/interfaces/types_core.DYOFinderFilterOperatorAdvanced.html +5 -0
  78. package/docs/interfaces/types_core.DYOFinderFilterOperatorBase.html +5 -0
  79. package/docs/interfaces/types_player.DTPlayerManagerSimpleConfiguration.html +3 -0
  80. package/docs/modules/constants.html +6 -0
  81. package/docs/modules/core_DTAction.html +2 -0
  82. package/docs/modules/core_DTBunch.html +2 -0
  83. package/docs/modules/core_DTComponent.html +2 -0
  84. package/docs/modules/core_DTComponentPhysical.html +2 -0
  85. package/docs/modules/core_DTComponentWithMeta.html +2 -0
  86. package/docs/modules/core_DTElement.html +2 -0
  87. package/docs/modules/core_DTError.html +2 -0
  88. package/docs/modules/core_DTManager.html +2 -0
  89. package/docs/modules/core_DTMaster.html +2 -0
  90. package/docs/modules/core_DTModule.html +2 -0
  91. package/docs/modules/libs_DYOFinder.html +2 -0
  92. package/docs/modules/libs_player_DTPlayer_element.html +2 -0
  93. package/docs/modules/libs_player_DTPlayer_manager.html +2 -0
  94. package/docs/modules/types.html +29 -0
  95. package/docs/modules/types_core.html +28 -0
  96. package/docs/modules/types_player.html +2 -0
  97. package/docs/types/types_core.DTAcceptedMetaData.html +2 -0
  98. package/docs/types/types_core.DTManagerItemType.html +1 -0
  99. package/docs/types/types_core.DTManagerItemsType.html +2 -0
  100. package/docs/types/types_core.DYOFinderComponentType.html +1 -0
  101. package/docs/types/types_core.DYOFinderConfiguration.html +2 -0
  102. package/docs/types/types_core.DYOFinderConfigurationProp.html +1 -0
  103. package/docs/types/types_core.DYOFinderFilterOperator.html +1 -0
  104. package/docs/types/types_core.DYOFinderFilterOperatorArgument.html +1 -0
  105. package/docs/types/types_core.DYOFinderFilters.html +1 -0
  106. package/docs/types/types_core.StandardPrimitiveType.html +2 -0
  107. package/docs/types/types_core.StandardPrimitiveTypeWithArray.html +1 -0
  108. package/docs/variables/constants.bunchDefaultOptions.html +2 -0
  109. package/docs/variables/constants.componentBunchDefaultFinderConfiguration.html +1 -0
  110. package/docs/variables/constants.componentManagerDefaultFinderConfiguration.html +1 -0
  111. package/docs/variables/constants.componentPhysicalDefaultFinderConfiguration.html +1 -0
  112. package/docs/variables/constants.managerDefaultOptions.html +2 -0
  113. package/package.json +16 -17
  114. package/src/constants.ts +85 -85
  115. package/src/core/DTAction.ts +52 -0
  116. package/src/core/DTBunch.ts +467 -461
  117. package/src/core/DTComponent.ts +225 -225
  118. package/src/core/DTComponentPhysical.ts +53 -39
  119. package/src/core/DTComponentWithMeta.ts +65 -65
  120. package/src/core/DTElement.ts +102 -69
  121. package/src/core/DTError.ts +78 -78
  122. package/src/core/DTManager.ts +465 -446
  123. package/src/core/DTMaster.ts +318 -0
  124. package/src/core/DTModule.ts +90 -0
  125. package/src/index.ts +17 -9
  126. package/src/libs/DYOFinder.ts +175 -175
  127. package/src/libs/player/DTPlayer.element.ts +9 -0
  128. package/src/libs/player/DTPlayer.manager.ts +84 -0
  129. package/src/types/core.ts +169 -0
  130. package/src/types/index.ts +2 -162
  131. package/src/types/player.ts +6 -0
  132. package/test/core/DTAction.double.ts +78 -0
  133. package/test/core/DTAction.spec.ts +76 -0
  134. package/test/core/DTBunch.double.ts +18 -10
  135. package/test/core/DTBunch.spec.ts +70 -68
  136. package/test/core/DTComponentPhysical.double.ts +3 -3
  137. package/test/core/DTComponentPhysical.spec.ts +25 -11
  138. package/test/core/DTElement.double.ts +21 -5
  139. package/test/core/DTElement.spec.ts +52 -8
  140. package/test/core/DTError.double.ts +1 -1
  141. package/test/core/DTManager.double.ts +29 -5
  142. package/test/core/DTManager.spec.ts +80 -17
  143. package/test/core/DTMaster.double.ts +141 -0
  144. package/test/core/DTMaster.spec.ts +584 -0
  145. package/test/core/DTModule.double.ts +80 -0
  146. package/test/core/DTModule.spec.ts +138 -0
  147. package/test/core/copy.spec.ts +20 -4
  148. package/test/{core/DTPlayer.double.ts → libs/player/DTPlayer.element.double.ts} +15 -24
  149. package/test/libs/player/DTPlayer.element.spec.ts +28 -0
  150. package/test/libs/player/DTPlayer.manager.double.ts +92 -0
  151. package/test/libs/player/DTPlayer.manager.spec.ts +178 -0
  152. package/LICENSE +0 -21
  153. package/cucumber.js +0 -9
  154. package/dist/core/DTPlayer.d.ts +0 -8
  155. package/dist/core/DTPlayer.js +0 -30
  156. package/dist/core/DTPlayer.js.map +0 -1
  157. package/e2e/0.2.0/epic1.feature +0 -29
  158. package/e2e/0.2.0/epic2.feature +0 -22
  159. package/e2e/0.2.0/epic3.feature +0 -25
  160. package/e2e/0.2.0/resources/dominion.js +0 -195
  161. package/e2e/0.2.0/resources/utils.js +0 -27
  162. package/e2e/0.2.0/support/steps.js +0 -108
  163. package/e2e/future/epic4.feature +0 -39
  164. package/e2e/future/resources/dominion.js +0 -238
  165. package/e2e/future/resources/utils.js +0 -27
  166. package/src/core/DTPlayer.ts +0 -57
  167. package/test/core/DTPlayer.spec.ts +0 -80
@@ -0,0 +1,318 @@
1
+ import DYOToolsComponent from './DTComponent';
2
+ import DYOToolsError from './DTError';
3
+ import DYOToolsManager from './DTManager';
4
+ import DYOToolsAction from './DTAction';
5
+ import DYOToolsModule from './DTModule';
6
+ import { DTMasterToObject } from '../types';
7
+
8
+ export default class DYOToolsMaster extends DYOToolsComponent {
9
+ /**
10
+ * Defining component type to "master".
11
+ */
12
+ protected _componentType: string = 'master';
13
+
14
+ /**
15
+ * DTManager instances handled by the Master.
16
+ *
17
+ * The property is an object with _id value of the Manager instance as key, and Manager instance as value.
18
+ * @protected
19
+ */
20
+ protected _managers: Record<string, DYOToolsManager>;
21
+
22
+ /**
23
+ * DTAction instances handled by the Master.
24
+ *
25
+ * The property is an object with _id value of the Action instance as key, and Action instance as value.
26
+ * @protected
27
+ */
28
+ protected _actions: Record<string, DYOToolsAction>;
29
+
30
+ /**
31
+ * DTModule instance handled by the Master.
32
+ *
33
+ * The property is an object with _id value of the Module instance as key, and Module instance as value.
34
+ * @protected
35
+ */
36
+ protected _modules: Record<string, DYOToolsModule>;
37
+
38
+ /**
39
+ * Applying the parent constructor, and initializing all properties to empty object.
40
+ *
41
+ * @param key
42
+ */
43
+ constructor(key?: string) {
44
+ super(key);
45
+
46
+ this._managers = {};
47
+ this._actions = {};
48
+ this._modules = {};
49
+ }
50
+
51
+ /**
52
+ * Add a DTManager **item** into _managers property.
53
+ *
54
+ * The adding process has the following specifications :
55
+ * * If the added manager has the same _id than existing manager, an error occurred (depending on **errors** option).
56
+ * * If the added manager has the same _key than existing manager, an error occurred (depending on **errors** option).
57
+ * * The Master instance becomes the new context of the added item.
58
+ *
59
+ * @param manager DYOToolsManager instance to add.
60
+ */
61
+ addManager(manager: DYOToolsManager): void {
62
+ // Id conflict
63
+ if (Object.keys(this._managers).includes(manager.getId())) {
64
+ this.triggerError(new DYOToolsError(
65
+ 'id_conflict',
66
+ 'Manager with same id already exists in the Master instance',
67
+ this,
68
+ manager,
69
+ ));
70
+ return;
71
+ }
72
+
73
+ // Key conflict
74
+ if (Object.values(this._managers).find((m) => m.getKey() === manager.getKey())) {
75
+ this.triggerError(new DYOToolsError(
76
+ 'key_conflict',
77
+ 'Manager with same key already exists in the Master instance',
78
+ this,
79
+ manager,
80
+ ));
81
+ return;
82
+ }
83
+
84
+ this._managers[manager.getId()] = manager;
85
+ manager.setContext<DYOToolsMaster>(this);
86
+ }
87
+
88
+ /**
89
+ * Return one DTManager instance handled by the Master.
90
+ * It could be selected by _id or _key property of the Manager.
91
+ *
92
+ * @param idOrKey String id or key to select.
93
+ * @returns DYOToolsManager selected Manager instance, or undefined if not found.
94
+ */
95
+ getManager(idOrKey: string): DYOToolsManager | undefined {
96
+ let managerFound = this._managers[idOrKey];
97
+
98
+ if (!managerFound) {
99
+ managerFound = Object.values(this._managers).find((m) => m.getKey() === idOrKey);
100
+ }
101
+
102
+ return managerFound;
103
+ }
104
+
105
+ /**
106
+ * Remove a handled Manager from the Master instance.
107
+ *
108
+ * @param idOrKey String id or key to select.
109
+ */
110
+ removeManager(idOrKey: string): void {
111
+ const manager = this.getManager(idOrKey);
112
+
113
+ if (manager) {
114
+ delete this._managers[manager.getId()];
115
+ }
116
+ }
117
+
118
+ /**
119
+ * Add a DTAction **item** into _actions property.
120
+ *
121
+ * The adding process has the following specifications :
122
+ * * If the added action has the same _id than existing action, an error occurred (depending on **errors** option).
123
+ * * If the added action has the same _key than existing action, an error occurred (depending on **errors** option).
124
+ * * The Master instance becomes the new context of the added item.
125
+ *
126
+ * @param action DYOToolsAction instance to add.
127
+ */
128
+ addAction(action: DYOToolsAction): void {
129
+ // Id conflict
130
+ if (Object.keys(this._actions).includes(action.getId())) {
131
+ this.triggerError(new DYOToolsError(
132
+ 'id_conflict',
133
+ 'Action with same id already exists in the Master instance',
134
+ this,
135
+ action,
136
+ ));
137
+ return;
138
+ }
139
+
140
+ // Key conflict
141
+ if (Object.values(this._actions).find((m) => m.getKey() === action.getKey())) {
142
+ this.triggerError(new DYOToolsError(
143
+ 'key_conflict',
144
+ 'Action with same key already exists in the Master instance',
145
+ this,
146
+ action,
147
+ ));
148
+ return;
149
+ }
150
+
151
+ this._actions[action.getId()] = action;
152
+ action.setContext<DYOToolsMaster>(this);
153
+ }
154
+
155
+ /**
156
+ * Return one DTAction instance handled by the Master.
157
+ * It could be selected by _id or _key property of the Action.
158
+ *
159
+ * @param idOrKey String id or key to select.
160
+ * @returns DYOToolsAction selected Action instance, or undefined if not found.
161
+ */
162
+ getAction(idOrKey: string): DYOToolsAction | undefined {
163
+ let actionFound = this._actions[idOrKey];
164
+
165
+ if (!actionFound) {
166
+ actionFound = Object.values(this._actions).find((a) => a.getKey() === idOrKey);
167
+ }
168
+
169
+ return actionFound;
170
+ }
171
+
172
+ /**
173
+ * Remove a handled Action from the Master instance.
174
+ *
175
+ * @param idOrKey String id or key to select.
176
+ */
177
+ removeAction(idOrKey: string): void {
178
+ const action = this.getAction(idOrKey);
179
+
180
+ if (action) {
181
+ delete this._actions[action.getId()];
182
+ }
183
+ }
184
+
185
+ /**
186
+ * Trigger the **execute** process of an action handled by the Master instance.
187
+ * It could be selected by _id or _key property of the Action.
188
+ *
189
+ * @param idOrKey String id or key to select.
190
+ * @param payload Object payload for the action execution.
191
+ * @returns Promise action execution.
192
+ */
193
+ async executeAction(idOrKey: string, payload: unknown): Promise<void> {
194
+ const action = this.getAction(idOrKey);
195
+
196
+ if (action) {
197
+ await this.getAction(idOrKey).execute(payload);
198
+ }
199
+ }
200
+
201
+ /**
202
+ * Add a DTModule **item** into _modules property.
203
+ *
204
+ * The adding process has the following specifications :
205
+ * * If the added module has the same _id than existing module, an error occurred (depending on **errors** option).
206
+ * * If the added module has the same _key than existing module, an error occurred (depending on **errors** option).
207
+ * * The Master instance becomes the new context of the added item.
208
+ *
209
+ * @param module DYOToolsModule instance to add.
210
+ */
211
+ addModule(module: DYOToolsModule): void {
212
+ // Id conflict
213
+ if (Object.keys(this._modules).includes(module.getId())) {
214
+ this.triggerError(new DYOToolsError(
215
+ 'id_conflict',
216
+ 'Module with same id already exists in the Master instance',
217
+ this,
218
+ module,
219
+ ));
220
+ return;
221
+ }
222
+
223
+ // Key conflict
224
+ if (Object.values(this._modules).find((m) => m.getKey() === module.getKey())) {
225
+ this.triggerError(new DYOToolsError(
226
+ 'key_conflict',
227
+ 'Module with same key already exists in the Master instance',
228
+ this,
229
+ module,
230
+ ));
231
+ return;
232
+ }
233
+
234
+ this._modules[module.getId()] = module;
235
+ module.setContext<DYOToolsMaster>(this);
236
+ }
237
+
238
+ /**
239
+ * Return one DTModule instance handled by the Master.
240
+ * It could be selected by _id or _key property of the Module.
241
+ *
242
+ * @param idOrKey String id or key to select.
243
+ * @returns DYOToolsModule selected Module instance, or undefined if not found.
244
+ */
245
+ getModule(idOrKey: string): DYOToolsModule | undefined {
246
+ let moduleFound = this._modules[idOrKey];
247
+
248
+ if (!moduleFound) {
249
+ moduleFound = Object.values(this._modules).find((m) => m.getKey() === idOrKey);
250
+ }
251
+
252
+ return moduleFound;
253
+ }
254
+
255
+ /**
256
+ * Remove a handled Module from the Master instance.
257
+ *
258
+ * @param idOrKey String id or key to select.
259
+ */
260
+ removeModule(idOrKey: string): void {
261
+ const module = this.getModule(idOrKey);
262
+
263
+ if (module) {
264
+ delete this._modules[module.getId()];
265
+ }
266
+ }
267
+
268
+ /**
269
+ * Return String representation of the Master instance.
270
+ *
271
+ * @returns String representation of the Master.
272
+ */
273
+ toString(): string {
274
+ const managersLabel = `Managers: ${Object.keys(this._managers).length}`;
275
+ const actionsLabel = `Actions: ${Object.keys(this._actions).length}`;
276
+ const modulesLabel = `Modules: ${Object.keys(this._modules).length}`;
277
+
278
+ return `Component ${this._key} - Type: Master - ${managersLabel} - ${actionsLabel} - ${modulesLabel}`;
279
+ }
280
+
281
+ /**
282
+ * Return JSON Object representation of the Master instance.
283
+ *
284
+ * JSON Object returned has the following structure :
285
+ * * **id** : _id property of the Master.
286
+ * * **key** : _key property of the Master.
287
+ * * **type** : _componentType property of the Master.
288
+ * * **managers** : Array of JSON Object representation for each DTManager instance in _managers property of the Master.
289
+ * * **actions** : Array of JSON Object representation for each DTAction instance in _actions property of the Master.
290
+ * * **modules** : Array of JSON Object representation for each DTModule instance in _modules property of the Master.
291
+ *
292
+ * @returns JSON Object representation of the Master.
293
+ */
294
+ toObject(): DTMasterToObject {
295
+ const toObject: DTMasterToObject = {
296
+ id: this._id,
297
+ key: this._key,
298
+ type: this._componentType,
299
+ managers: [],
300
+ actions: [],
301
+ modules: [],
302
+ };
303
+
304
+ if (Object.keys(this._managers).length) {
305
+ toObject.managers = Object.values(this._managers).map((obj) => obj.toObject());
306
+ }
307
+
308
+ if (Object.keys(this._actions).length) {
309
+ toObject.actions = Object.values(this._actions).map((obj) => obj.toObject());
310
+ }
311
+
312
+ if (Object.keys(this._modules).length) {
313
+ toObject.modules = Object.values(this._modules).map((obj) => obj.toObject());
314
+ }
315
+
316
+ return toObject;
317
+ }
318
+ }
@@ -0,0 +1,90 @@
1
+ import DYOToolsComponent from './DTComponent';
2
+ import { DTModuleToObject } from '../types';
3
+ import DYOToolsMaster from './DTMaster';
4
+
5
+ export default class DYOToolsModule extends DYOToolsComponent {
6
+ /**
7
+ * Defining component type to "module".
8
+ */
9
+ protected _componentType: string = 'module';
10
+
11
+ /**
12
+ * Defining if the module is enabled or not.
13
+ * @protected
14
+ */
15
+ protected _enabled: boolean;
16
+
17
+ /**
18
+ * Applying the parent constructor, and initializing _enabled property to true by default.
19
+ *
20
+ * @param key
21
+ */
22
+ constructor(key?: string) {
23
+ super(key);
24
+
25
+ this._enabled = true;
26
+ }
27
+
28
+ /**
29
+ * Returns Master component from context, or undefined.
30
+ */
31
+ getMaster(): DYOToolsMaster | undefined {
32
+ return this.getContext<DYOToolsMaster>('master');
33
+ }
34
+
35
+ /**
36
+ * Getter for the _enabled property.
37
+ */
38
+ isEnabled(): boolean {
39
+ return this._enabled;
40
+ }
41
+
42
+ /**
43
+ * Change _enabled property to true.
44
+ */
45
+ enable(): void {
46
+ this._enabled = true;
47
+ }
48
+
49
+ /**
50
+ * Change _enabled property to false.
51
+ */
52
+ disable(): void {
53
+ this._enabled = false;
54
+ }
55
+
56
+ /**
57
+ * Return String representation of the Module instance.
58
+ *
59
+ * @returns String representation of the Module.
60
+ */
61
+ toString(): string {
62
+ let extraLabel: string = '';
63
+
64
+ if (!this._enabled) {
65
+ extraLabel = ' - Disabled';
66
+ }
67
+
68
+ return `Component ${this._key} - Type: Module${extraLabel}`;
69
+ }
70
+
71
+ /**
72
+ * Return JSON Object representation of the Module instance.
73
+ *
74
+ * JSON Object returned has the following structure :
75
+ * * **id** : _id property of the Module.
76
+ * * **key** : _key property of the Module.
77
+ * * **type** : _componentType property of the Module.
78
+ * * **enabled** : _enabled property of the Module.
79
+ *
80
+ * @returns JSON Object representation of the Module.
81
+ */
82
+ toObject(): DTModuleToObject {
83
+ return {
84
+ id: this._id,
85
+ key: this._key,
86
+ type: this._componentType,
87
+ enabled: this._enabled,
88
+ };
89
+ }
90
+ }
package/src/index.ts CHANGED
@@ -1,9 +1,17 @@
1
- // All exports
2
- export { default as DTComponent } from './core/DTComponent';
3
- export { default as DTComponentWithMeta } from './core/DTComponentWithMeta';
4
- export { default as DTComponentPhysical } from './core/DTComponentPhysical';
5
- export { default as DTElement } from './core/DTElement';
6
- export { default as DTBunch } from './core/DTBunch';
7
- export { default as DTManager } from './core/DTManager';
8
- export { default as DTPlayer } from './core/DTPlayer';
9
- export { default as DTError } from './core/DTError';
1
+ // All exports
2
+ // CORE
3
+ export { default as DTComponent } from './core/DTComponent';
4
+ export { default as DTComponentWithMeta } from './core/DTComponentWithMeta';
5
+ export { default as DTComponentPhysical } from './core/DTComponentPhysical';
6
+ export { default as DTElement } from './core/DTElement';
7
+ export { default as DTBunch } from './core/DTBunch';
8
+ export { default as DTManager } from './core/DTManager';
9
+ export { default as DTMaster } from './core/DTMaster';
10
+ export { default as DTError } from './core/DTError';
11
+ export { default as DTAction } from './core/DTAction';
12
+ export { default as DTModule } from './core/DTModule';
13
+
14
+ // LIBS
15
+ // PLAYER
16
+ export { default as DTPlayer } from './libs/player/DTPlayer.element';
17
+ export { default as DTPlayerManager } from './libs/player/DTPlayer.manager';