@olympeio/runtime-web 8.5.1 → 8.6.2

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 (39) hide show
  1. package/import/olympe.dm/datamodel/00_bootstrap.newInst.json +1 -1
  2. package/import/olympe.dm/datamodel/00_bootstrap.newRel.json +1 -1
  3. package/import/olympe.dm/datamodel/01_primitives.newInst.json +1 -1
  4. package/import/olympe.dm/datamodel/01_primitives.newRel.json +1 -1
  5. package/import/olympe.dm/datamodel/02_permissions.newInst.json +1 -1
  6. package/import/olympe.dm/datamodel/02_permissions.newRel.json +1 -1
  7. package/import/olympe.dm/datamodel/03_file.newInst.json +1 -1
  8. package/import/olympe.dm/datamodel/03_file.newRel.json +1 -1
  9. package/import/olympe.dm/datamodel/04_modules.newInst.json +1 -1
  10. package/import/olympe.dm/datamodel/04_modules.newRel.json +1 -1
  11. package/import/olympe.dm/datamodel/05_permission_schema.newInst.json +1 -1
  12. package/import/olympe.dm/datamodel/05_permission_schema.newRel.json +1 -1
  13. package/import/olympe.dm/datamodel/05_permission_schema.updateInst.json +1 -1
  14. package/import/olympe.dm/datamodel/06_structure.newInst.json +1 -1
  15. package/import/olympe.dm/datamodel/06_structure.newRel.json +1 -1
  16. package/import/olympe.sc/datamodel/00_primordial.newInst.json +1 -1
  17. package/import/olympe.sc/datamodel/00_primordial.newRel.json +1 -1
  18. package/import/olympe.sc/datamodel/01_language.newInst.json +1 -1
  19. package/import/olympe.sc/datamodel/01_language.newRel.json +1 -1
  20. package/import/olympe.sc/datamodel/logic/01_functions.newInst.json +1 -1
  21. package/import/olympe.sc/datamodel/logic/01_functions.newRel.json +1 -1
  22. package/import/olympe.sc/datamodel/logic/02_actions.newInst.json +1 -1
  23. package/import/olympe.sc/datamodel/logic/02_actions.newRel.json +1 -1
  24. package/import/olympe.sc.ui/datamodel/01_primordial_ui_models.newInst.json +1 -1
  25. package/import/olympe.sc.ui/datamodel/01_primordial_ui_models.newRel.json +1 -1
  26. package/import/olympe.sc.ui/datamodel/01_primordial_ui_models.updateInst.json +1 -1
  27. package/import/olympe.sc.ui/datamodel/02_ui_components.newInst.json +1 -1
  28. package/import/olympe.sc.ui/datamodel/02_ui_components.newRel.json +1 -1
  29. package/import/olympe.sc.ui/datamodel/03_ui_functions.newInst.json +1 -1
  30. package/import/olympe.sc.ui/datamodel/03_ui_functions.newRel.json +1 -1
  31. package/import/olympe.sc.ui/datamodel/04_categories.newInst.json +1 -0
  32. package/import/olympe.sc.ui/datamodel/04_categories.newRel.json +1 -0
  33. package/import/olympe.sc.ui/datamodel/05_default_theme.newInst.json +1 -0
  34. package/import/olympe.sc.ui/datamodel/05_default_theme.newRel.json +1 -0
  35. package/index.d.ts +104 -21
  36. package/index.js +1471 -1450
  37. package/package.json +1 -1
  38. package/import/olympe.sc.ui/datamodel/04_default_theme.newInst.json +0 -1
  39. package/import/olympe.sc.ui/datamodel/04_default_theme.newRel.json +0 -1
package/index.d.ts CHANGED
@@ -134,6 +134,51 @@ export class SubscribeService extends Service {
134
134
  * an API to observe and set values of this brick's properties.
135
135
  */
136
136
  export class Context {
137
+
138
+ /**
139
+ * Register a callback to execute when the context is destroyed. Return the callback id.
140
+ *
141
+ * @param callback the callback function
142
+ * @return the callback id
143
+ */
144
+ onDestroy(callback: () => void): string;
145
+
146
+ /**
147
+ * Remove a previously registered callback with {@link Context#onDestroy} method using its id.
148
+ *
149
+ * @param id the id of the callback to unregister
150
+ */
151
+ offDestroy(id: string): void;
152
+
153
+ /**
154
+ * Register a callback to execute every time the context is cleared.
155
+ * This happens every time the brick is refreshed with new inputs and during the brick destruction.
156
+ * Return the callback id.
157
+ *
158
+ * @param callback the callback function
159
+ * @return the callback id
160
+ */
161
+ onClear(callback: () => void): string;
162
+
163
+ /**
164
+ * Remove a previously registered callback with {@link Context#onClear} method using its id.
165
+ *
166
+ * @param id the id of the callback to unregister
167
+ */
168
+ offClear(id: string): void;
169
+
170
+ /**
171
+ * Destroy the current context. It destroys all children context attached to this one and clear their values.
172
+ * The context cannot be reused after calling this function.
173
+ */
174
+ destroy(): void;
175
+
176
+ /**
177
+ * Clear the current context: detach and destroys all children context.
178
+ * The context can be reused.
179
+ */
180
+ clear(): void;
181
+
137
182
  /**
138
183
  * Set the specified property value and propagate the update to anyone observing it.
139
184
  *
@@ -166,6 +211,37 @@ export class Context {
166
211
  */
167
212
  observe<T>(property: PropertyDescriptor<T> | string, nullable?: boolean): Observable<T>;
168
213
 
214
+ /**
215
+ * Create and return a new context, child of the current one.
216
+ * Mainly used to run other bricks within the current one (e.g.: the iterator of the brick For Each).
217
+ *
218
+ * @param debugName a name to give to the context for debugging purpose.
219
+ */
220
+ createChild(debugName?: string): Context;
221
+
222
+ /**
223
+ * Return the context with the specified id if accessible (in the hierarchy) from this context.
224
+ * Otherwise, return null.
225
+ *
226
+ * @param id the context id we want to retrieve
227
+ */
228
+ getOtherContext(id: string): Context | null;
229
+
230
+ /**
231
+ * Listen to the creation of the context with the specified id.
232
+ * Executes the callback when that context becomes accessible by this current context.
233
+ * Return a function to unregister the listener.
234
+ *
235
+ * @param id the context id, which corresponds to the tag of the brick to be retrieved.
236
+ * @param callback the function to execute when the specified brick context is available
237
+ */
238
+ onContext(id: string, callback: (context: Context) => void): () => void;
239
+
240
+ /**
241
+ * Return the parent context if it exists.
242
+ */
243
+ getParent(): Context | null;
244
+
169
245
  /**
170
246
  * Return the closest transaction from this context :
171
247
  * - look in its own transaction stack
@@ -207,25 +283,6 @@ export class Context {
207
283
  * @return the transaction if exists
208
284
  */
209
285
  popTransaction(): Transaction | null;
210
-
211
- /**
212
- * Return the specified context from the hierarchy of this context, if it exists.
213
- *
214
- * @param tag the context id, which correspond to the tag of the brick.
215
- */
216
- getOtherContext(tag: string): Context | null;
217
-
218
- /**
219
- * Register a callback to get a context that could not be created yet. Returns a function that unregister the context.
220
- *
221
- * @param tag the context id, which correspond to the tag of the brick.
222
- */
223
- onContext(tag: string, callback: (context: Context) => void): () => void;
224
-
225
- /**
226
- * Return the parent context if it exists.
227
- */
228
- getParent(): Context | null;
229
286
  }
230
287
 
231
288
  /**
@@ -253,6 +310,14 @@ export class UIContext extends Context {
253
310
  * @param properties list of properties to observe simultaneously
254
311
  */
255
312
  observeMany(...properties: string[]): Observable<any[]>;
313
+
314
+ /**
315
+ * Create and return a new UIContext, child of the current one.
316
+ * Mainly used to run other bricks within the current one (e.g.: a list renderer).
317
+ *
318
+ * @param debugName a name to give to the context for debugging purpose.
319
+ */
320
+ createChild(debugName?: string): UIContext;
256
321
  }
257
322
 
258
323
  /**
@@ -399,12 +464,12 @@ export class FunctionBrick extends Brick {
399
464
  /**
400
465
  * Return the list of inputs tags as an ordered array.
401
466
  */
402
- protected readonly getInputs: () => string[];
467
+ readonly getInputs: () => string[];
403
468
 
404
469
  /**
405
470
  * Return the list of outputs tags as an ordered array
406
471
  */
407
- protected readonly getOutputs: () => string[];
472
+ readonly getOutputs: () => string[];
408
473
  }
409
474
 
410
475
  /**
@@ -495,6 +560,11 @@ export class Auth {
495
560
  */
496
561
  static getToken(): string;
497
562
 
563
+ /**
564
+ * Return the SAML token (zipped & base64 encoded XML) for the current user.
565
+ */
566
+ static getSAMLToken(): string;
567
+
498
568
  /**
499
569
  * Return the tag of the current authenticated user.
500
570
  */
@@ -599,6 +669,19 @@ export class ColorPrimitive extends Sync {
599
669
  static valueProp: PropertyDescriptor<Color>;
600
670
  }
601
671
 
672
+ export class Enum extends Sync {
673
+ create(transaction: Transaction, name?: string): string;
674
+ getValues(): ListDef;
675
+ }
676
+
677
+ export class EnumValue extends StringPrimitive {
678
+ static create(transaction: Transaction, enumModel: InstanceTag, value: string, name?: string, rank?: number): string;
679
+
680
+ static nameProp: PropertyDescriptor<string>;
681
+ static valueProp: PropertyDescriptor<string>;
682
+ static rankProp: PropertyDescriptor<number>;
683
+ }
684
+
602
685
  export class File extends Sync {
603
686
  static nameProp: PropertyDescriptor<string>;
604
687
  static creationDateProp: PropertyDescriptor<Date>;