@ichicraft/widgets-widget-base 1.15.4 → 1.16.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 +8 -0
- package/lib/index.d.ts +1 -0
- package/lib/types/index.d.ts +23 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -9,6 +9,14 @@ All notable changes to this project will be documented here.
|
|
|
9
9
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
10
10
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
11
11
|
|
|
12
|
+
## 1.16.1 - 2026-03-19
|
|
13
|
+
|
|
14
|
+
- Addition of `notificationBadgeCount` property to `CommandBarItemProps` to allow for a number to be displayed in the badge
|
|
15
|
+
|
|
16
|
+
## 1.16.0 - 2026-03-09
|
|
17
|
+
|
|
18
|
+
- Addition of `cache` property to `instance`, `variant` and `manifest` level of `WidgetContext` to centralize cache handling and functionality
|
|
19
|
+
|
|
12
20
|
## 1.15.4 - 2026-01-07
|
|
13
21
|
|
|
14
22
|
- Override version of deep dependency 'validator' to get rid of potential vulnerability
|
package/lib/index.d.ts
CHANGED
package/lib/types/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CacheManager } from '@ic/caching';
|
|
1
2
|
import type { Client } from '@microsoft/microsoft-graph-client';
|
|
2
3
|
import type { AadHttpClientFactory, AadTokenProviderFactory, SPHttpClient, SPHttpClientConfiguration } from '@microsoft/sp-http';
|
|
3
4
|
import type { SPFI } from '@pnp/sp/presets/all';
|
|
@@ -386,6 +387,11 @@ export interface WidgetInstanceContext {
|
|
|
386
387
|
raiseEvent?: (object: string, action: string, data?: {
|
|
387
388
|
[key: string]: string;
|
|
388
389
|
}) => void;
|
|
390
|
+
/**
|
|
391
|
+
* Cache manager scoped to this widget instance.
|
|
392
|
+
* Data stored here is specific to this instance only.
|
|
393
|
+
*/
|
|
394
|
+
cache: CacheManager;
|
|
389
395
|
}
|
|
390
396
|
export interface WidgetBuddyContext {
|
|
391
397
|
/**
|
|
@@ -429,6 +435,11 @@ export interface WidgetVariantContext {
|
|
|
429
435
|
* The icon defined for this widget variant.
|
|
430
436
|
*/
|
|
431
437
|
iconName?: string;
|
|
438
|
+
/**
|
|
439
|
+
* Cache manager scoped to this widget variant.
|
|
440
|
+
* Data stored here is shared across all instances of this variant, but isolated from other variants.
|
|
441
|
+
*/
|
|
442
|
+
cache: CacheManager;
|
|
432
443
|
}
|
|
433
444
|
/**
|
|
434
445
|
* Widget manifest context providing metadata and functions offered by the widget board. A widget manifest contains
|
|
@@ -442,6 +453,11 @@ export interface WidgetManifestContext {
|
|
|
442
453
|
* widget can be installed in the widget board, the id of the definition is the same as the id of the manifest.
|
|
443
454
|
*/
|
|
444
455
|
id: string;
|
|
456
|
+
/**
|
|
457
|
+
* Cache manager scoped to this widget type (manifest level).
|
|
458
|
+
* Data stored here is shared across all variants and instances of this widget type.
|
|
459
|
+
*/
|
|
460
|
+
cache: CacheManager;
|
|
445
461
|
}
|
|
446
462
|
export interface WidgetDesignContext {
|
|
447
463
|
/** Available options in the ColorPicker.*/
|
|
@@ -775,9 +791,15 @@ export interface CommandBarItemProps {
|
|
|
775
791
|
*/
|
|
776
792
|
label?: string;
|
|
777
793
|
/**
|
|
778
|
-
* Optionally display a
|
|
794
|
+
* Optionally display a badge in the top-right corner of the button.
|
|
795
|
+
* Optionally use in conjunction with notificationBadgeCount to display a number inside the badge.
|
|
779
796
|
*/
|
|
780
797
|
showNotificationBadge?: boolean;
|
|
798
|
+
/**
|
|
799
|
+
* Optional count to display in the notification badge.
|
|
800
|
+
* Only applies when showNotificationBadge is true, and will be truncated to "99+" when the count exceeds 99.
|
|
801
|
+
*/
|
|
802
|
+
notificationBadgeCount?: number;
|
|
781
803
|
/**
|
|
782
804
|
* Optional severity to specify how the item should render
|
|
783
805
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ichicraft/widgets-widget-base",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.1",
|
|
4
4
|
"description": "Part of the Widget Development Kit for building widgets for Ichicraft Boards",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"z-schema@<5.0.5": "5.0.5"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@ic/caching": "~0.0.2",
|
|
27
28
|
"@microsoft/microsoft-graph-client": "3.0.2",
|
|
28
29
|
"@microsoft/sp-http": "1.18.2",
|
|
29
30
|
"@pnp/sp": "4.0.1"
|