tw5-typed 0.2.19 → 0.2.20
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.
- package/package.json +1 -1
- package/src/modules/story.d.ts +4 -4
- package/src/modules/widgets/index.d.ts +320 -109
package/package.json
CHANGED
package/src/modules/story.d.ts
CHANGED
|
@@ -14,13 +14,13 @@ declare module 'tiddlywiki' {
|
|
|
14
14
|
|
|
15
15
|
navigateTiddler(
|
|
16
16
|
navigateTo: string,
|
|
17
|
-
navigateFromTitle
|
|
18
|
-
navigateFromClientRect
|
|
17
|
+
navigateFromTitle?: string,
|
|
18
|
+
navigateFromClientRect?: DOMRect,
|
|
19
19
|
);
|
|
20
20
|
|
|
21
21
|
addToStory(
|
|
22
22
|
navigateTo: string,
|
|
23
|
-
navigateFromTitle
|
|
23
|
+
navigateFromTitle?: string,
|
|
24
24
|
options?: {
|
|
25
25
|
openLinkFromInsideRiver?: 'top' | 'bottom' | 'above' | 'below';
|
|
26
26
|
},
|
|
@@ -28,7 +28,7 @@ declare module 'tiddlywiki' {
|
|
|
28
28
|
|
|
29
29
|
addToHistory(
|
|
30
30
|
navigateTo: string | string[],
|
|
31
|
-
navigateFromClientRect
|
|
31
|
+
navigateFromClientRect?: DOMRect,
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
saveStoryList(storyList: string[] | string);
|
|
@@ -9,6 +9,16 @@ declare module 'tiddlywiki' {
|
|
|
9
9
|
deleted?: boolean;
|
|
10
10
|
modified?: boolean;
|
|
11
11
|
}
|
|
12
|
+
export interface IWidgetVariableParam {
|
|
13
|
+
name: string;
|
|
14
|
+
default: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IWidgetVariable {
|
|
18
|
+
value: string;
|
|
19
|
+
params?: IWidgetVariableParam[];
|
|
20
|
+
isMacroDefinition: boolean;
|
|
21
|
+
}
|
|
12
22
|
|
|
13
23
|
export interface IWidgetEvent {
|
|
14
24
|
[extraKeys: string]: unknown;
|
|
@@ -90,14 +100,7 @@ declare module 'tiddlywiki' {
|
|
|
90
100
|
* * params: array of {name:, default:} for each parameter
|
|
91
101
|
* * isMacroDefinition: true if the variable is set via a \define macro pragma (and hence should have variable substitution performed)
|
|
92
102
|
*/
|
|
93
|
-
variables: Record<
|
|
94
|
-
string,
|
|
95
|
-
{
|
|
96
|
-
value: string;
|
|
97
|
-
params?: { name: string; default: string }[];
|
|
98
|
-
isMacroDefinition: boolean;
|
|
99
|
-
}
|
|
100
|
-
>;
|
|
103
|
+
variables: Record<string, IWidgetVariable>;
|
|
101
104
|
|
|
102
105
|
constructor(
|
|
103
106
|
parseTreeNode: IParseTreeNode,
|
|
@@ -105,17 +108,10 @@ declare module 'tiddlywiki' {
|
|
|
105
108
|
);
|
|
106
109
|
|
|
107
110
|
/**
|
|
108
|
-
|
|
109
|
-
And push them to `this.children`
|
|
110
|
-
@param parseTreeNodes default to `this.parseTreeNode.children`, can be undefined
|
|
111
|
-
*/
|
|
112
|
-
makeChildWidgets(
|
|
113
|
-
parseTreeNodes?: IParseTreeNode[],
|
|
114
|
-
options?: { variables?: unknown },
|
|
115
|
-
): void;
|
|
116
|
-
|
|
117
|
-
/**
|
|
111
|
+
* @en
|
|
118
112
|
* Initialise widget properties. These steps are pulled out of the constructor so that we can reuse them in subclasses
|
|
113
|
+
* @zh
|
|
114
|
+
* 初始化widget属性。这些步骤被拉出构造函数,以便我们可以在子类中重复使用它们
|
|
119
115
|
*/
|
|
120
116
|
initialise(
|
|
121
117
|
parseTreeNode: IParseTreeNode,
|
|
@@ -125,146 +121,361 @@ declare module 'tiddlywiki' {
|
|
|
125
121
|
wiki?: ITiddlyWiki;
|
|
126
122
|
},
|
|
127
123
|
): void;
|
|
124
|
+
|
|
128
125
|
/**
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
126
|
+
* @en
|
|
127
|
+
* Lifecycle method: Render this widget into the DOM
|
|
128
|
+
* @zh
|
|
129
|
+
* 生命周期方法: 将这个微件渲染到DOM中;
|
|
130
|
+
* 只会在首次渲染、销毁后重新渲染时自动调用,或者通过 refreshSelf 等方法主动调用
|
|
133
131
|
*/
|
|
134
|
-
|
|
132
|
+
render(parent: Node, nextSibling: Node | null): void;
|
|
133
|
+
|
|
135
134
|
/**
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
135
|
+
* @en
|
|
136
|
+
* Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering.
|
|
137
|
+
* You can do some cleanup or buildup before return true.
|
|
138
|
+
* @zh
|
|
139
|
+
* 如果需要的话,有选择地刷新该微件。如果该微件或其任何子项需要重新渲染,则返回 true。
|
|
140
|
+
* 你可以在返回 true 之前做一些清理或构建工作。
|
|
141
|
+
* @param {IChangedTiddlers} changedTiddlers Object key is tiddler title, value is metadata about the change
|
|
142
|
+
* @link https://tiddlywiki.com/dev/#Selective%20Update
|
|
143
|
+
*/
|
|
144
|
+
refresh(changedTiddlers: IChangedTiddlers): boolean;
|
|
145
|
+
|
|
144
146
|
/**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
* Compute the internal state of the widget.
|
|
148
|
+
* This will be automatically called in the `render` method.
|
|
149
|
+
*
|
|
150
|
+
* For example, `getAttribute` and set them to class members.
|
|
151
|
+
*/
|
|
152
|
+
execute(): void;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @en
|
|
156
|
+
* Set the value of a context variable
|
|
157
|
+
* @zh
|
|
158
|
+
* 设置一个上下文变量的值
|
|
159
|
+
*
|
|
160
|
+
* @param {string } name name of the variable
|
|
161
|
+
* @param {string} value value of the variable
|
|
162
|
+
* @param {IWidgetVariableParam[]} [params=[]] array of {name:, default:} for each parameter
|
|
163
|
+
* @param {boolean} [isMacroDefinition=true] true if the variable is set via a \define macro pragma (and hence should have variable substitution performed)
|
|
164
|
+
*/
|
|
165
|
+
setVariable(
|
|
166
|
+
name: string,
|
|
167
|
+
value: string,
|
|
168
|
+
parameters?: IWidgetVariableParam[],
|
|
169
|
+
isMacroDefinition?: boolean,
|
|
150
170
|
): void;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Get variable in the context of the widget.
|
|
174
|
+
* Simplified version of getVariableInfo() that just returns the text.
|
|
175
|
+
* @param name variable name, for example, `currentTiddler` in the widget context
|
|
176
|
+
* @param options options for getVariableInfo()
|
|
177
|
+
*
|
|
178
|
+
* Options include
|
|
179
|
+
* * params: array of {name:, value:} for each parameter
|
|
180
|
+
* * defaultValue: default value if the variable is not defined
|
|
181
|
+
*
|
|
182
|
+
* Returns an object with the following fields:
|
|
183
|
+
* * params: array of {name:,value:} of parameters passed to wikitext variables
|
|
184
|
+
* * text: text of variable, with parameters properly substituted
|
|
185
|
+
*
|
|
186
|
+
* @param {string} name
|
|
187
|
+
* @param {{ params?: IWidgetVariableParam[]; defaultValue: string }} [options]
|
|
188
|
+
* @return {*} {{
|
|
189
|
+
* text: string;
|
|
190
|
+
* params?: IWidgetVariableParam[];
|
|
191
|
+
* srcVariable?: IWidgetVariable;
|
|
192
|
+
* isCacheable?: boolean;
|
|
193
|
+
* }}
|
|
194
|
+
* @memberof Widget
|
|
195
|
+
*/
|
|
196
|
+
getVariableInfo(
|
|
197
|
+
name: string,
|
|
198
|
+
options?: { params?: IWidgetVariableParam[]; defaultValue: string },
|
|
199
|
+
): {
|
|
200
|
+
text: string;
|
|
201
|
+
params?: IWidgetVariableParam[];
|
|
202
|
+
srcVariable?: IWidgetVariable;
|
|
203
|
+
isCacheable?: boolean;
|
|
204
|
+
};
|
|
205
|
+
|
|
151
206
|
/**
|
|
152
|
-
|
|
207
|
+
* Simplified version of getVariableInfo() that just returns the text
|
|
208
|
+
*
|
|
209
|
+
* @param {string} name
|
|
210
|
+
* @param {{ params?: IWidgetVariableParam[]; defaultValue: string }} [options]
|
|
211
|
+
* @return {*} {string}
|
|
212
|
+
* @memberof Widget
|
|
213
|
+
*/
|
|
214
|
+
getVariable(
|
|
215
|
+
name: string,
|
|
216
|
+
options?: { params?: IWidgetVariableParam[]; defaultValue: string },
|
|
217
|
+
): string;
|
|
218
|
+
|
|
219
|
+
resolveVariableParameters(
|
|
220
|
+
formalParams?: IWidgetVariableParam[],
|
|
221
|
+
actualParams?: IWidgetVariableParam[],
|
|
222
|
+
): IWidgetVariableParam[];
|
|
223
|
+
|
|
224
|
+
substituteVariableReferences(
|
|
225
|
+
text: string,
|
|
226
|
+
options: { variables: Record<string, string> },
|
|
227
|
+
): string;
|
|
228
|
+
|
|
229
|
+
evaluateMacroModule(
|
|
230
|
+
name: string,
|
|
231
|
+
actualParams: IWidgetVariableParam[],
|
|
232
|
+
defaultValue: string,
|
|
233
|
+
): string;
|
|
153
234
|
|
|
154
|
-
Events added via `addEventListener`, like `tm-notify`, can be invoked by this.
|
|
155
|
-
*/
|
|
156
|
-
dispatchEvent(typeOrEvent: string | Omit<IWidgetEvent, 'widget'>): void;
|
|
157
235
|
/**
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
236
|
+
* @en
|
|
237
|
+
* Check whether a given context variable value exists in the parent chain
|
|
238
|
+
* @zh
|
|
239
|
+
* 检查一个给定的上下文变量值是否存在于父链中
|
|
240
|
+
*
|
|
241
|
+
* @param {string} name
|
|
242
|
+
* @param {string} value
|
|
243
|
+
* @return {*} {boolean}
|
|
244
|
+
* @memberof Widget
|
|
245
|
+
*/
|
|
246
|
+
hasVariable(name: string, value: string): boolean;
|
|
166
247
|
|
|
167
248
|
/**
|
|
168
|
-
|
|
169
|
-
|
|
249
|
+
* @en
|
|
250
|
+
* Construct a qualifying string based on a hash of concatenating the values of a given variable in the parent chain
|
|
251
|
+
* @zh
|
|
252
|
+
* 在连接父链中给定变量值的哈希基础上构建一个限定字符串
|
|
253
|
+
*
|
|
254
|
+
* @param {string} name
|
|
255
|
+
* @return {*} {string}
|
|
256
|
+
* @memberof Widget
|
|
257
|
+
*/
|
|
258
|
+
getStateQualifier(name: string): string;
|
|
170
259
|
|
|
171
|
-
|
|
260
|
+
/**
|
|
261
|
+
* @en
|
|
262
|
+
* Compute the current values of the attributes of the widget. Returns a hashmap of the names of the attributes that have changed
|
|
263
|
+
* @zh
|
|
264
|
+
* 计算微件的属性的当前值。返回一个已经改变的属性名称的哈希图
|
|
265
|
+
*
|
|
266
|
+
* @return {*} {Record<string, true>}
|
|
267
|
+
* @memberof Widget
|
|
268
|
+
*/
|
|
269
|
+
computeAttributes(): Record<string, true>;
|
|
270
|
+
|
|
271
|
+
computeAttribute(attribute: string): string;
|
|
172
272
|
|
|
173
|
-
*/
|
|
174
|
-
execute(): void;
|
|
175
273
|
/**
|
|
176
|
-
*
|
|
274
|
+
* @en
|
|
275
|
+
* Check for the presence of an evaluated attribute on the widget. Note that attributes set to a missing variable (ie `attr=<<missing>>`) will be treated as missing
|
|
276
|
+
* @zh
|
|
277
|
+
* 检查微件上是否存在一个已评估的属性。请注意,设置为缺失变量的属性(即`attr=<<missing>>`)将被视为缺失。
|
|
177
278
|
*
|
|
178
|
-
* @param
|
|
179
|
-
* @
|
|
180
|
-
* @
|
|
279
|
+
* @param {string} attribute
|
|
280
|
+
* @return {*} {boolean}
|
|
281
|
+
* @memberof Widget
|
|
181
282
|
*/
|
|
182
|
-
|
|
283
|
+
hasAttribute(attribute: string): boolean;
|
|
284
|
+
|
|
183
285
|
/**
|
|
184
|
-
*
|
|
286
|
+
* @en
|
|
287
|
+
* Check for the presence of a raw attribute on the widget parse tree node. Note that attributes set to a missing variable (ie `attr=<<missing>>`) will NOT be treated as missing
|
|
288
|
+
* @zh
|
|
289
|
+
* 检查微件解析树节点上是否存在原始属性。注意,设置为缺失变量的属性(即`ttr=<<missing>>`)不会被视为缺失。
|
|
185
290
|
*
|
|
186
|
-
*
|
|
187
|
-
* @
|
|
188
|
-
* @
|
|
189
|
-
* @returns handled
|
|
291
|
+
* @param {string} attribute
|
|
292
|
+
* @return {*} {boolean}
|
|
293
|
+
* @memberof Widget
|
|
190
294
|
*/
|
|
191
|
-
|
|
192
|
-
triggeringWidget: Widget,
|
|
193
|
-
event: IWidgetEvent,
|
|
194
|
-
): boolean | undefined;
|
|
295
|
+
hasParseTreeNodeAttribute(attribute: string): boolean;
|
|
195
296
|
|
|
196
297
|
/**
|
|
197
|
-
*
|
|
298
|
+
* @en
|
|
299
|
+
* Get parameters that user set in the widget
|
|
300
|
+
* @zh
|
|
301
|
+
* 获取用户在小组件中设置的参数
|
|
302
|
+
*
|
|
303
|
+
* @param {string} name attribute name, for example, `actions` in the button widget
|
|
304
|
+
* @param {string} [fallbackText] default value if the attribute is not set
|
|
305
|
+
* @return {*} {string}
|
|
306
|
+
* @memberof Widget
|
|
198
307
|
*/
|
|
199
|
-
|
|
308
|
+
getAttribute(name: string, fallbackText?: string): string;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @en
|
|
312
|
+
* Assign the computed attributes of the widget to a domNode
|
|
313
|
+
* options include:
|
|
314
|
+
* * `excludeEventAttributes`: ignores attributes whose name begins with "on"
|
|
315
|
+
* @zh
|
|
316
|
+
* 将微件的计算属性分配给一个domNode, 选项包括:
|
|
317
|
+
* * `excludeEventAttributes`: 忽略名称以 "on "开头的属性
|
|
318
|
+
* 一些特殊的属性:
|
|
319
|
+
* * `xlink:<xlink-name>`
|
|
320
|
+
* * `style.<css-style-name>`
|
|
321
|
+
*
|
|
322
|
+
* @param {*} domNode
|
|
323
|
+
* @param {*} options
|
|
324
|
+
* @memberof Widget
|
|
325
|
+
*/
|
|
326
|
+
assignAttributes(
|
|
327
|
+
domNode: Node,
|
|
328
|
+
options?: { excludeEventAttributes?: boolean },
|
|
329
|
+
);
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* @en
|
|
333
|
+
* Get the number of ancestor widgets for this widget
|
|
334
|
+
* @zh
|
|
335
|
+
* 获取这个微件的祖先微件的数量
|
|
336
|
+
*
|
|
337
|
+
* @return {*} {number}
|
|
338
|
+
* @memberof Widget
|
|
339
|
+
*/
|
|
340
|
+
getAncestorCount(): number;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Make child widgets correspondng to specified parseTreeNodes
|
|
344
|
+
* And push them to `this.children`
|
|
345
|
+
* @param parseTreeNodes default to `this.parseTreeNode.children`, can be undefined
|
|
346
|
+
*/
|
|
347
|
+
makeChildWidgets(
|
|
348
|
+
parseTreeNodes?: IParseTreeNode[],
|
|
349
|
+
options?: { variables?: unknown },
|
|
350
|
+
): void;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Construct the widget object for a parse tree node, and return the new widget
|
|
354
|
+
* options include:
|
|
355
|
+
* variables: optional hashmap of variables to wrap around the widget
|
|
356
|
+
*/
|
|
357
|
+
makeChildWidget(
|
|
358
|
+
parseTreeNode: IParseTreeNode,
|
|
359
|
+
options?: { variables?: unknown },
|
|
360
|
+
): Widget;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @en
|
|
364
|
+
* Get the next sibling of this widget
|
|
365
|
+
*
|
|
366
|
+
* @return {*} {(Widget | null)}
|
|
367
|
+
* @memberof Widget
|
|
368
|
+
*/
|
|
369
|
+
nextSibling(): Widget | null;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* @en
|
|
373
|
+
* Get the previous sibling of this widget
|
|
374
|
+
*
|
|
375
|
+
* @return {*} {(Widget | null)}
|
|
376
|
+
* @memberof Widget
|
|
377
|
+
*/
|
|
378
|
+
previousSibling(): Widget | null;
|
|
379
|
+
|
|
200
380
|
/**
|
|
201
381
|
* Render the children of this widget into the DOM
|
|
202
382
|
*/
|
|
203
383
|
renderChildren(parent: Node, nextSibling: Node | null): void;
|
|
384
|
+
|
|
204
385
|
/**
|
|
205
|
-
*
|
|
206
|
-
* You can do some cleanup or buildup before return true.
|
|
207
|
-
* @param changedTiddlers Object key is tiddler title, value is metadata about the change
|
|
208
|
-
* @link https://tiddlywiki.com/dev/#Selective%20Update
|
|
386
|
+
* Add a list of event listeners from an array [{type:,handler:},...]
|
|
209
387
|
*/
|
|
210
|
-
|
|
388
|
+
addEventListeners(
|
|
389
|
+
listeners: {
|
|
390
|
+
handler: (event: IWidgetEvent) => void | Promise<void>;
|
|
391
|
+
type: string;
|
|
392
|
+
}[],
|
|
393
|
+
): void;
|
|
394
|
+
|
|
211
395
|
/**
|
|
212
|
-
|
|
213
|
-
|
|
396
|
+
* Add an event listener
|
|
397
|
+
*/
|
|
398
|
+
addEventListener(
|
|
399
|
+
type: string,
|
|
400
|
+
handler: (event: IWidgetEvent) => void | Promise<void>,
|
|
401
|
+
): void;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Dispatch an event to a widget. If the widget doesn't handle the event then it is also dispatched to the parent widget
|
|
405
|
+
* Events added via `addEventListener`, like `tm-notify`, can be invoked by this.
|
|
406
|
+
*/
|
|
407
|
+
dispatchEvent(typeOrEvent: string | Omit<IWidgetEvent, 'widget'>): void;
|
|
214
408
|
|
|
215
|
-
Need to call this after `setVariable`
|
|
216
|
-
*/
|
|
217
|
-
refreshChildren(changedTiddlers?: IChangedTiddlers): boolean;
|
|
218
409
|
/**
|
|
219
410
|
* Rebuild a previously rendered widget
|
|
220
411
|
*/
|
|
221
412
|
refreshSelf(): boolean | void;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Refresh all the children of a widget, will call `this.render`.
|
|
416
|
+
* Need to call this after `setVariable`
|
|
417
|
+
*/
|
|
418
|
+
refreshChildren(changedTiddlers?: IChangedTiddlers): boolean;
|
|
419
|
+
|
|
222
420
|
/**
|
|
223
421
|
* Find the next sibling in the DOM to this widget. This is done by scanning the widget tree through all next siblings and their descendents that share the same parent DOM node
|
|
224
422
|
* @param startIndex Refer to this widget by its index within its parents children
|
|
225
423
|
*/
|
|
226
424
|
findNextSiblingDomNode(startIndex?: number): Node | null;
|
|
425
|
+
|
|
227
426
|
/**
|
|
228
427
|
* Find the first DOM node generated by a widget or its children
|
|
229
428
|
*/
|
|
230
429
|
findFirstDomNode(): Node | null;
|
|
231
|
-
|
|
430
|
+
|
|
232
431
|
/**
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
432
|
+
* Remove any DOM nodes created by this widget or its children
|
|
433
|
+
*
|
|
434
|
+
* If this widget has directly created DOM nodes, delete them and exit. This assumes that any child widgets are contained within the created DOM nodes, which would normally be the case.
|
|
435
|
+
* Otherwise, ask the child widgets to delete their DOM nodes
|
|
236
436
|
*/
|
|
237
|
-
|
|
437
|
+
removeChildDomNodes(): void;
|
|
438
|
+
|
|
238
439
|
/**
|
|
239
|
-
*
|
|
240
|
-
* Simplified version of getVariableInfo() that just returns the text.
|
|
241
|
-
* @param name variable name, for example, `currentTiddler` in the widget context
|
|
242
|
-
* @param options options for getVariableInfo()
|
|
440
|
+
* Invoke the action associated with this widget
|
|
243
441
|
*
|
|
244
|
-
*
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
Returns an object with the following fields:
|
|
249
|
-
|
|
250
|
-
params: array of {name:,value:} of parameters passed to wikitext variables
|
|
251
|
-
text: text of variable, with parameters properly substituted
|
|
442
|
+
* No every widget has this method, but some do, like `action-xxx` widget, e.g., `action-sendmessage`
|
|
443
|
+
* @param triggeringWidget
|
|
444
|
+
* @param event
|
|
445
|
+
* @returns handled
|
|
252
446
|
*/
|
|
253
|
-
|
|
447
|
+
invokeAction?(
|
|
448
|
+
triggeringWidget: Widget,
|
|
449
|
+
event: IWidgetEvent,
|
|
450
|
+
): boolean | undefined;
|
|
451
|
+
|
|
254
452
|
/**
|
|
255
|
-
|
|
453
|
+
* @en
|
|
454
|
+
* Invoke the action widgets that are descendents of the current widget.
|
|
455
|
+
*
|
|
456
|
+
* @param {Widget} triggeringWidget
|
|
457
|
+
* @param {IWidgetEvent} event
|
|
458
|
+
* @memberof Widget
|
|
459
|
+
*/
|
|
460
|
+
invokeActions(triggeringWidget: Widget, event: IWidgetEvent): boolean;
|
|
256
461
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
462
|
+
/**
|
|
463
|
+
* @en
|
|
464
|
+
* Invoke the action widgets defined in a string
|
|
465
|
+
*
|
|
466
|
+
* @param {string} actions
|
|
467
|
+
* @param {Widget} triggeringWidget
|
|
468
|
+
* @param {IWidgetEvent} event
|
|
469
|
+
* @param {Record<string, IWidgetVariable>} variables
|
|
470
|
+
* @return {*} {boolean}
|
|
471
|
+
* @memberof Widget
|
|
472
|
+
*/
|
|
473
|
+
invokeActionString(
|
|
474
|
+
actions: string,
|
|
475
|
+
triggeringWidget: Widget,
|
|
476
|
+
event: IWidgetEvent,
|
|
477
|
+
variables: Record<string, IWidgetVariable>,
|
|
478
|
+
): boolean;
|
|
268
479
|
}
|
|
269
480
|
|
|
270
481
|
export interface IFakeDocument {
|