@ichicraft/widgets-widget-base 1.7.10 → 1.8.1
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/README.md +6 -2
- package/lib/.DS_Store +0 -0
- package/lib/types/index.d.ts +36 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,8 +8,12 @@ All notable changes to this project will be documented here.
|
|
|
8
8
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
9
9
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
10
10
|
|
|
11
|
-
## 1.
|
|
12
|
-
* Added `
|
|
11
|
+
## 1.8.1 - 2022-06-17
|
|
12
|
+
* Added new section `analytics` to `WidgetManifestConfig` interface to allow definition of time-based events that can be raised by a widget.
|
|
13
|
+
* Added `raiseEvent(...)` to the `instance` object of the `WidgetContent` interface, allowing widgets to raise an event.
|
|
14
|
+
|
|
15
|
+
## 1.7.11 - 2022-03-23
|
|
16
|
+
* Added `setWidgetHeaderVisibilty()` function to the `instance` object of the `WidgetContext` interface, allowing widgets to render in full height.
|
|
13
17
|
|
|
14
18
|
## 1.7.9 - 2022-01-20
|
|
15
19
|
* Added `userAccountCreated` date/time to the `WidgetContext` interface.
|
package/lib/.DS_Store
CHANGED
|
Binary file
|
package/lib/types/index.d.ts
CHANGED
|
@@ -46,9 +46,9 @@ export interface WidgetContext {
|
|
|
46
46
|
*/
|
|
47
47
|
setWidgetTitle?: (title: string) => void;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Show or hide the header of the widget, allowing widgets to take control of full widget real estate
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
setWidgetHeaderVisibilty?: (visible: boolean) => void;
|
|
52
52
|
/**
|
|
53
53
|
* Optional callback to handle the click event of the widget title
|
|
54
54
|
*/
|
|
@@ -63,6 +63,16 @@ export interface WidgetContext {
|
|
|
63
63
|
* Removes the custom command bar item that was added by the [registerCommandBarItem] function
|
|
64
64
|
*/
|
|
65
65
|
unregisterCustomCommandBarItem?: () => void;
|
|
66
|
+
/**
|
|
67
|
+
* Raises an event to be handled by the Time-based Events feature of Ichicraft Boards.
|
|
68
|
+
* @param object The object this event concerns (e.g. app, report, newsArticle, ...). Use camelCase.
|
|
69
|
+
* @param action The action that was performed to/on the object (e.g. viewed, clicked, deleted, ...). Use camelCase.
|
|
70
|
+
* @param data Optionally provide extra metadata to be included with the raised event.
|
|
71
|
+
* widgetAlias property (from manifest) and variantTitle property will automatically be added by the widget board.
|
|
72
|
+
*/
|
|
73
|
+
raiseEvent?: (object: string, action: string, data?: {
|
|
74
|
+
[key: string]: string;
|
|
75
|
+
}) => void;
|
|
66
76
|
};
|
|
67
77
|
/**
|
|
68
78
|
* Metadata and functions in the context of a widget's definition. A widget definition is
|
|
@@ -402,6 +412,30 @@ export interface WidgetManifestConfig {
|
|
|
402
412
|
};
|
|
403
413
|
};
|
|
404
414
|
};
|
|
415
|
+
/**
|
|
416
|
+
* Everything related to analytics of this widget in Ichicraft Boards
|
|
417
|
+
*/
|
|
418
|
+
analytics?: {
|
|
419
|
+
/**
|
|
420
|
+
* A list of time-based events this widget can raise. All the possible events MUST be
|
|
421
|
+
* described in this list for the widget board to be able to pick them up.
|
|
422
|
+
* @ref Use WidgetContext.instance.raiseEvent(object: string, action: string, data?: { [key: string]: string }) to raise these events
|
|
423
|
+
*/
|
|
424
|
+
timeBasedEvents: {
|
|
425
|
+
/**
|
|
426
|
+
* The object this event concerns (e.g. app, report, newsArticle, ...). Use camelCase.
|
|
427
|
+
*/
|
|
428
|
+
object: string;
|
|
429
|
+
/**
|
|
430
|
+
* The action that was performed to/on the object (e.g. viewed, clicked, deleted, ...). Use camelCase.
|
|
431
|
+
*/
|
|
432
|
+
action: string;
|
|
433
|
+
/**
|
|
434
|
+
* A descriptive text used in the Administration panel to describe this event
|
|
435
|
+
*/
|
|
436
|
+
description: string;
|
|
437
|
+
}[];
|
|
438
|
+
};
|
|
405
439
|
}
|
|
406
440
|
export declare enum DebugComponentType {
|
|
407
441
|
/**
|
package/package.json
CHANGED