@limetech/lime-web-components 5.31.0 → 5.32.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 CHANGED
@@ -1,3 +1,11 @@
1
+ ## [5.32.0](https://github.com/Lundalogik/lime-web-components/compare/v5.31.0...v5.32.0) (2024-08-23)
2
+
3
+
4
+ ### Features
5
+
6
+
7
+ * **notifications:** add notification interfaces ([fde53f6](https://github.com/Lundalogik/lime-web-components/commit/fde53f68701853246d3327f94ee2f6c175d567a1))
8
+
1
9
  ## [5.31.0](https://github.com/Lundalogik/lime-web-components/compare/v5.30.0...v5.31.0) (2024-03-25)
2
10
 
3
11
 
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);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var platform_1 = require("../core/platform");
4
+ var SERVICE_NAME = 'state.notifications';
5
+ platform_1.PlatformServiceName.NotificationRepository = SERVICE_NAME;
package/dist/index.d.ts CHANGED
@@ -45,4 +45,5 @@ export * from './datetimeformatter';
45
45
  export * from './conditionregistry';
46
46
  export * from './view';
47
47
  export * from './webcomponent';
48
+ export * from './notification-service';
48
49
  //# sourceMappingURL=index.d.ts.map
@@ -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
@@ -45,3 +45,4 @@ export * from './datetimeformatter';
45
45
  export * from './conditionregistry';
46
46
  export * from './view';
47
47
  export * from './webcomponent';
48
+ export * from './notification-service';
@@ -0,0 +1,4 @@
1
+ export * from './repository';
2
+ export * from './notification';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -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,3 @@
1
+ export * from './repository';
2
+ export * from './notification';
3
+ export * from './types';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * A Notification object
3
+ *
4
+ * @alpha
5
+ * @group NotificationRepository
6
+ */
7
+ export type Notification = {
8
+ id: number;
9
+ iduser: number;
10
+ read: Boolean;
11
+ };
12
+ //# sourceMappingURL=notification.d.ts.map
@@ -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,42 @@
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
+ * @returns the saved notifications
13
+ */
14
+ loadNotifications(): Promise<Notification[] | undefined>;
15
+ /**
16
+ * Creates a notification
17
+ *
18
+ * @returns the created notification
19
+ */
20
+ createNotification(): Promise<Notification | undefined>;
21
+ /**
22
+ * Gets a notification by its id
23
+ *
24
+ * @param notificationId - the id of the notification to get
25
+ * @returns the fetched notification
26
+ */
27
+ getNotification(notificationId: number): Promise<Notification | undefined>;
28
+ /**
29
+ * Deletes a notification by its id
30
+ *
31
+ * @param notificationId - the id of the notification to delete
32
+ */
33
+ deleteNotification(notificationId: number): Promise<void>;
34
+ /**
35
+ * Marks a notification as read
36
+ *
37
+ * @param notificationId - the id of the notification to mark as read
38
+ * @returns the read notification
39
+ */
40
+ markNotificationAsRead(notificationId: number): Promise<Notification | undefined>;
41
+ }
42
+ //# 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;;;;OAIG;IACH,iBAAiB,IAAI,OAAO,CAAC,YAAY,EAAE,GAAG,SAAS,CAAC,CAAC;IAEzD;;;;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"}
@@ -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"}
@@ -0,0 +1,3 @@
1
+ import { PlatformServiceName } from '../core/platform';
2
+ const SERVICE_NAME = 'state.notifications';
3
+ PlatformServiceName.NotificationRepository = SERVICE_NAME;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-web-components",
3
- "version": "5.31.0",
3
+ "version": "5.32.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.2"
35
+ "tslib": "^2.6.3"
36
36
  },
37
37
  "devDependencies": {
38
- "@commitlint/config-conventional": "^19.1.0",
39
- "@microsoft/api-extractor": "^7.43.0",
38
+ "@commitlint/config-conventional": "^19.2.2",
39
+ "@microsoft/api-extractor": "^7.47.7",
40
40
  "@types/jest": "^27.5.0",
41
- "@typescript-eslint/eslint-plugin": "^7.3.1",
42
- "@typescript-eslint/parser": "^7.3.1",
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.24.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": "^7.1.0",
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",