@limetech/lime-web-components 5.31.0 → 5.33.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/CHANGELOG.md +16 -0
- package/dist/es5/index.js +1 -0
- package/dist/es5/notification-service/index.js +6 -0
- package/dist/es5/notification-service/notification.js +2 -0
- package/dist/es5/notification-service/repository.js +2 -0
- package/dist/es5/notification-service/types.js +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/notification-service/index.d.ts +4 -0
- package/dist/notification-service/index.d.ts.map +1 -0
- package/dist/notification-service/index.js +3 -0
- package/dist/notification-service/notification.d.ts +12 -0
- package/dist/notification-service/notification.d.ts.map +1 -0
- package/dist/notification-service/notification.js +1 -0
- package/dist/notification-service/repository.d.ts +76 -0
- package/dist/notification-service/repository.d.ts.map +1 -0
- package/dist/notification-service/repository.js +1 -0
- package/dist/notification-service/types.d.ts +15 -0
- package/dist/notification-service/types.d.ts.map +1 -0
- package/dist/notification-service/types.js +3 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [5.33.0](https://github.com/Lundalogik/lime-web-components/compare/v5.32.0...v5.33.0) (2024-08-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **notifications:** update load response and provide load options ([dd6aa7c](https://github.com/Lundalogik/lime-web-components/commit/dd6aa7c8f83dd80416552b5acc232c518eff9d59))
|
|
8
|
+
|
|
9
|
+
## [5.32.0](https://github.com/Lundalogik/lime-web-components/compare/v5.31.0...v5.32.0) (2024-08-23)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
* **notifications:** add notification interfaces ([fde53f6](https://github.com/Lundalogik/lime-web-components/commit/fde53f68701853246d3327f94ee2f6c175d567a1))
|
|
16
|
+
|
|
1
17
|
## [5.31.0](https://github.com/Lundalogik/lime-web-components/compare/v5.30.0...v5.31.0) (2024-03-25)
|
|
2
18
|
|
|
3
19
|
|
package/dist/es5/index.js
CHANGED
|
@@ -26,3 +26,4 @@ tslib_1.__exportStar(require("./datetimeformatter"), exports);
|
|
|
26
26
|
tslib_1.__exportStar(require("./conditionregistry"), exports);
|
|
27
27
|
tslib_1.__exportStar(require("./view"), exports);
|
|
28
28
|
tslib_1.__exportStar(require("./webcomponent"), exports);
|
|
29
|
+
tslib_1.__exportStar(require("./notification-service"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./repository"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./notification"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./types"), exports);
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notification-service/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../src/notification-service/notification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Notification } from './notification';
|
|
2
|
+
/**
|
|
3
|
+
* Service for handling notifications
|
|
4
|
+
*
|
|
5
|
+
* @alpha
|
|
6
|
+
* @group NotificationRepository
|
|
7
|
+
*/
|
|
8
|
+
export interface NotificationRepository {
|
|
9
|
+
/**
|
|
10
|
+
* Gets all notifications
|
|
11
|
+
*
|
|
12
|
+
* @param options - options to provide when loading notifications
|
|
13
|
+
*
|
|
14
|
+
* @returns the saved notifications
|
|
15
|
+
*/
|
|
16
|
+
loadNotifications(options?: NotificationLoadOptions): Promise<NotificationResponse | undefined>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a notification
|
|
19
|
+
*
|
|
20
|
+
* @returns the created notification
|
|
21
|
+
*/
|
|
22
|
+
createNotification(): Promise<Notification | undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* Gets a notification by its id
|
|
25
|
+
*
|
|
26
|
+
* @param notificationId - the id of the notification to get
|
|
27
|
+
* @returns the fetched notification
|
|
28
|
+
*/
|
|
29
|
+
getNotification(notificationId: number): Promise<Notification | undefined>;
|
|
30
|
+
/**
|
|
31
|
+
* Deletes a notification by its id
|
|
32
|
+
*
|
|
33
|
+
* @param notificationId - the id of the notification to delete
|
|
34
|
+
*/
|
|
35
|
+
deleteNotification(notificationId: number): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Marks a notification as read
|
|
38
|
+
*
|
|
39
|
+
* @param notificationId - the id of the notification to mark as read
|
|
40
|
+
* @returns the read notification
|
|
41
|
+
*/
|
|
42
|
+
markNotificationAsRead(notificationId: number): Promise<Notification | undefined>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The count response of loaded notifications
|
|
46
|
+
*
|
|
47
|
+
* @alpha
|
|
48
|
+
* @group NotificationRepository
|
|
49
|
+
*/
|
|
50
|
+
export type NotificationCount = {
|
|
51
|
+
total: number;
|
|
52
|
+
unread: number;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* The response of loaded notifications
|
|
56
|
+
*
|
|
57
|
+
* @alpha
|
|
58
|
+
* @group NotificationRepository
|
|
59
|
+
*/
|
|
60
|
+
export type NotificationResponse = {
|
|
61
|
+
items: Notification[];
|
|
62
|
+
count: NotificationCount;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* The options to load notifications with
|
|
66
|
+
*
|
|
67
|
+
* @alpha
|
|
68
|
+
* @group NotificationRepository
|
|
69
|
+
*/
|
|
70
|
+
export interface NotificationLoadOptions {
|
|
71
|
+
/**
|
|
72
|
+
* Maximum number of notifications to load
|
|
73
|
+
*/
|
|
74
|
+
limit?: number;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../src/notification-service/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACnC;;;;;;OAMG;IACH,iBAAiB,CACb,OAAO,CAAC,EAAE,uBAAuB,GAClC,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAAC;IAE7C;;;;OAIG;IACH,kBAAkB,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAExD;;;;;OAKG;IACH,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;IAE3E;;;;OAIG;IACH,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D;;;;;OAKG;IACH,sBAAsB,CAClB,cAAc,EAAE,MAAM,GACvB,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAAC;CACxC;AAED;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { NotificationRepository } from './repository';
|
|
2
|
+
declare const SERVICE_NAME = "state.notifications";
|
|
3
|
+
declare module '../core/platform' {
|
|
4
|
+
interface PlatformServiceNameType {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link NotificationRepository}
|
|
7
|
+
*/
|
|
8
|
+
NotificationRepository: typeof SERVICE_NAME;
|
|
9
|
+
}
|
|
10
|
+
interface LimeWebComponentPlatform {
|
|
11
|
+
get(name: PlatformServiceNameType['NotificationRepository']): NotificationRepository;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/notification-service/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAGtD,QAAA,MAAM,YAAY,wBAAwB,CAAC;AAI3C,OAAO,QAAQ,kBAAkB,CAAC;IAC9B,UAAU,uBAAuB;QAC7B;;WAEG;QACH,sBAAsB,EAAE,OAAO,YAAY,CAAC;KAC/C;IAED,UAAU,wBAAwB;QAC9B,GAAG,CACC,IAAI,EAAE,uBAAuB,CAAC,wBAAwB,CAAC,GACxD,sBAAsB,CAAC;KAC7B;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-web-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.33.0",
|
|
4
4
|
"description": "Lime Web Components",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@stencil/core": "^2.22.3",
|
|
34
34
|
"rxjs": "^7.8.1",
|
|
35
|
-
"tslib": "^2.6.
|
|
35
|
+
"tslib": "^2.6.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@commitlint/config-conventional": "^19.1
|
|
39
|
-
"@microsoft/api-extractor": "^7.
|
|
38
|
+
"@commitlint/config-conventional": "^19.4.1",
|
|
39
|
+
"@microsoft/api-extractor": "^7.47.7",
|
|
40
40
|
"@types/jest": "^27.5.0",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
42
|
-
"@typescript-eslint/parser": "^7.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
|
42
|
+
"@typescript-eslint/parser": "^7.5.0",
|
|
43
43
|
"commitizen": "^4.3.0",
|
|
44
44
|
"cz-conventional-changelog": "^3.3.0",
|
|
45
45
|
"eslint": "^8.57.0",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
49
49
|
"eslint-plugin-prettier": "^5.1.3",
|
|
50
50
|
"eslint-plugin-react": "^7.34.1",
|
|
51
|
-
"eslint-plugin-sonarjs": "^0.
|
|
51
|
+
"eslint-plugin-sonarjs": "^0.25.1",
|
|
52
52
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
53
53
|
"jest": "^27.5.1",
|
|
54
54
|
"jest-cli": "^27.5.1",
|
|
55
55
|
"prettier": "^3.2.5",
|
|
56
|
-
"replace-in-file": "^
|
|
56
|
+
"replace-in-file": "^8.1.0",
|
|
57
57
|
"shelljs": "0.8.5",
|
|
58
58
|
"typedoc": "^0.23.24",
|
|
59
59
|
"typedoc-plugin-markdown": "~3.15.0",
|