@limetech/lime-web-components 4.53.0 → 4.54.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 +21 -0
- package/dist/commandbus/commandbus.d.ts +23 -0
- package/dist/es5/navigator/command.js +16 -0
- package/dist/es5/navigator/index.js +1 -0
- package/dist/http/http.d.ts +15 -0
- package/dist/navigator/command.d.ts +24 -0
- package/dist/navigator/command.js +15 -0
- package/dist/navigator/index.d.ts +1 -0
- package/dist/navigator/index.js +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.54.0](https://github.com/Lundalogik/lime-web-components/compare/v4.53.1...v4.54.0) (2022-09-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **commandbus:** add factory method ([3bb2085](https://github.com/Lundalogik/lime-web-components/commit/3bb208557db1b138b9d1f56813bad5140a7ca1fc)), closes [Lundalogik/crm-feature#2892](https://github.com/Lundalogik/crm-feature/issues/2892)
|
|
12
|
+
* **http:** add missing `HttpResponseError` interface ([f86ae62](https://github.com/Lundalogik/lime-web-components/commit/f86ae62d6393b5a6a8f0996ac9da36b5869407b8))
|
|
13
|
+
* **navigator:** add new command for navigating ([73bc129](https://github.com/Lundalogik/lime-web-components/commit/73bc12987c16105ea6159f92d53aeae67dfe9bd9)), closes [Lundalogik/crm-feature#2892](https://github.com/Lundalogik/crm-feature/issues/2892)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [4.53.1](https://github.com/Lundalogik/lime-web-components/compare/v4.53.0...v4.53.1) (2022-09-12)
|
|
20
|
+
|
|
21
|
+
**Note:** Version bump only for package @limetech/lime-web-components
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
6
27
|
# [4.53.0](https://github.com/Lundalogik/lime-web-components/compare/v4.52.0...v4.53.0) (2022-09-01)
|
|
7
28
|
|
|
8
29
|
|
|
@@ -35,6 +35,13 @@ export interface CommandBus extends CommandHandler {
|
|
|
35
35
|
* @returns {CommandHandler} the handler for the command class
|
|
36
36
|
*/
|
|
37
37
|
getHandler(commandClass: CommandClass): CommandHandler;
|
|
38
|
+
/**
|
|
39
|
+
* Create a command instance from a {@link CommandConfig}
|
|
40
|
+
*
|
|
41
|
+
* @param {CommandConfig} config The command configuration
|
|
42
|
+
* @throws {Error} Thrown if the command has not been registered yet
|
|
43
|
+
*/
|
|
44
|
+
createCommand?<T = any>(config: CommandConfig<T>): T;
|
|
38
45
|
}
|
|
39
46
|
/**
|
|
40
47
|
* Service for executing commands
|
|
@@ -94,6 +101,22 @@ export interface CommandOptions {
|
|
|
94
101
|
*/
|
|
95
102
|
id: string;
|
|
96
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Config for describing a command
|
|
106
|
+
*/
|
|
107
|
+
export interface CommandConfig<T = any> {
|
|
108
|
+
/**
|
|
109
|
+
* Id of the command
|
|
110
|
+
*
|
|
111
|
+
* Specified by the {@link Command} decorator when declaring the command
|
|
112
|
+
*/
|
|
113
|
+
id: string;
|
|
114
|
+
/**
|
|
115
|
+
* Optional parameters to set when creating the command from the config.
|
|
116
|
+
* All values need to be serializable
|
|
117
|
+
*/
|
|
118
|
+
params?: Partial<Record<keyof T, unknown>>;
|
|
119
|
+
}
|
|
97
120
|
/**
|
|
98
121
|
* Register a class as a command
|
|
99
122
|
*
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigateCommand = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var commandbus_1 = require("../commandbus");
|
|
6
|
+
var NavigateCommand = (function () {
|
|
7
|
+
function NavigateCommand() {
|
|
8
|
+
}
|
|
9
|
+
NavigateCommand = tslib_1.__decorate([
|
|
10
|
+
(0, commandbus_1.Command)({
|
|
11
|
+
id: 'navigator.navigate',
|
|
12
|
+
})
|
|
13
|
+
], NavigateCommand);
|
|
14
|
+
return NavigateCommand;
|
|
15
|
+
}());
|
|
16
|
+
exports.NavigateCommand = NavigateCommand;
|
package/dist/http/http.d.ts
CHANGED
|
@@ -70,3 +70,18 @@ export interface HttpHeaders {
|
|
|
70
70
|
[header: string]: string | string[];
|
|
71
71
|
}
|
|
72
72
|
export declare type HttpResponseType = 'text' | 'json' | 'arraybuffer' | 'blob';
|
|
73
|
+
/**
|
|
74
|
+
* Exceptiopn thrown by {@link HttpClient} when an error occurs while sending a
|
|
75
|
+
* request
|
|
76
|
+
*/
|
|
77
|
+
export interface HttpResponseError extends Error {
|
|
78
|
+
name: 'HttpResponseError';
|
|
79
|
+
/**
|
|
80
|
+
* Http status code
|
|
81
|
+
*/
|
|
82
|
+
status: number;
|
|
83
|
+
/**
|
|
84
|
+
* The response from the request
|
|
85
|
+
*/
|
|
86
|
+
response: Response;
|
|
87
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Location } from './navigator';
|
|
2
|
+
/**
|
|
3
|
+
* Navigates to a new location
|
|
4
|
+
*
|
|
5
|
+
* @id `navigator.navigate`
|
|
6
|
+
*/
|
|
7
|
+
export declare class NavigateCommand implements Partial<Location> {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritdoc
|
|
10
|
+
*/
|
|
11
|
+
path?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritdoc
|
|
14
|
+
*/
|
|
15
|
+
query?: Record<string, unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritdoc
|
|
18
|
+
*/
|
|
19
|
+
hash?: string;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritdoc
|
|
22
|
+
*/
|
|
23
|
+
state?: unknown;
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Command } from '../commandbus';
|
|
3
|
+
/**
|
|
4
|
+
* Navigates to a new location
|
|
5
|
+
*
|
|
6
|
+
* @id `navigator.navigate`
|
|
7
|
+
*/
|
|
8
|
+
let NavigateCommand = class NavigateCommand {
|
|
9
|
+
};
|
|
10
|
+
NavigateCommand = __decorate([
|
|
11
|
+
Command({
|
|
12
|
+
id: 'navigator.navigate',
|
|
13
|
+
})
|
|
14
|
+
], NavigateCommand);
|
|
15
|
+
export { NavigateCommand };
|
package/dist/navigator/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-web-components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.54.0",
|
|
4
4
|
"author": "Lime Technologies",
|
|
5
5
|
"homepage": "https://github.com/Lundalogik/lime-web-components",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@limetech/lime-web-components-commands": "^4.51.2",
|
|
40
|
-
"@limetech/lime-web-components-decorators": "^4.
|
|
40
|
+
"@limetech/lime-web-components-decorators": "^4.53.1",
|
|
41
41
|
"@limetech/lime-web-components-interfaces": "^4.51.2",
|
|
42
|
-
"@limetech/lime-web-components-testing": "^4.
|
|
42
|
+
"@limetech/lime-web-components-testing": "^4.53.1",
|
|
43
43
|
"rxjs": "^7.5.6",
|
|
44
44
|
"tslib": "^2.4.0"
|
|
45
45
|
},
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@stencil/core": "^2.17.1"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "90680ed25fe434f632eb04ecd4d73ded150180c9"
|
|
55
55
|
}
|