@ichicraft/widgets-widget-base 1.8.17 → 1.9.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.
- package/README.md +6 -0
- package/lib/BaseWidget.d.ts +3 -1
- package/lib/types/index.d.ts +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,6 +9,12 @@ 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.9.0 - 2023-10-20
|
|
13
|
+
|
|
14
|
+
- Added optional `importData()` function to the `BaseWidget` class, used to import widget-specific data.
|
|
15
|
+
- Added optional `exportData()` function to the `BaseWidget` class, used to export widget-specific data.
|
|
16
|
+
- Added new exported `ExportData` type.
|
|
17
|
+
|
|
12
18
|
## 1.8.17 - 2023-10-09
|
|
13
19
|
|
|
14
20
|
- Added `iconName` property to the `definition` object of the `WidgetContext` interface, to support using an icon to represent a widget.
|
package/lib/BaseWidget.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WidgetContext, ValidationResult } from './types';
|
|
1
|
+
import { WidgetContext, ValidationResult, ExportData } from './types';
|
|
2
2
|
export default abstract class BaseWidget {
|
|
3
3
|
protected readonly context: WidgetContext;
|
|
4
4
|
constructor(context: WidgetContext);
|
|
@@ -12,5 +12,7 @@ export default abstract class BaseWidget {
|
|
|
12
12
|
renderAdminConfigurationForm?(domElement: HTMLDivElement): void;
|
|
13
13
|
validateAdminConfigurationForm?(): ValidationResult;
|
|
14
14
|
getSerializedAdminConfiguration?(): string;
|
|
15
|
+
importData?(exportData: ExportData): Promise<void>;
|
|
16
|
+
exportData?(): Promise<ExportData>;
|
|
15
17
|
cleanupResources?(): void;
|
|
16
18
|
}
|
package/lib/types/index.d.ts
CHANGED
package/package.json
CHANGED