@limetech/lime-web-components 5.28.0 → 5.29.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 +10 -0
- package/dist/commandbus/commandbus.d.ts +28 -1
- package/dist/commandbus/commandbus.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/metadata.d.ts +46 -0
- package/dist/core/metadata.d.ts.map +1 -0
- package/dist/core/metadata.js +1 -0
- package/dist/es5/core/index.js +1 -0
- package/dist/es5/core/metadata.js +2 -0
- package/dist/es5/index.js +1 -0
- package/dist/es5/webcomponent/index.js +5 -0
- package/dist/es5/webcomponent/registry.js +2 -0
- package/dist/es5/webcomponent/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/testing/component-testing.d.ts +8 -0
- package/dist/testing/component-testing.d.ts.map +1 -1
- package/dist/testing/component-testing.js +5 -0
- package/dist/testing/limeobjects/index.d.ts +4 -0
- package/dist/testing/limeobjects/index.d.ts.map +1 -1
- package/dist/testing/limeobjects/index.js +4 -0
- package/dist/testing/limetypes/index.d.ts +4 -0
- package/dist/testing/limetypes/index.d.ts.map +1 -1
- package/dist/testing/limetypes/index.js +4 -0
- package/dist/testing/platform/index.d.ts +1 -0
- package/dist/testing/platform/index.d.ts.map +1 -1
- package/dist/testing/platform/index.js +1 -0
- package/dist/testing/services/datetimeformatter.d.ts +4 -0
- package/dist/testing/services/datetimeformatter.d.ts.map +1 -1
- package/dist/testing/services/datetimeformatter.js +4 -0
- package/dist/testing/services/translator.d.ts +4 -0
- package/dist/testing/services/translator.d.ts.map +1 -1
- package/dist/testing/services/translator.js +4 -0
- package/dist/webcomponent/index.d.ts +3 -0
- package/dist/webcomponent/index.d.ts.map +1 -0
- package/dist/webcomponent/index.js +2 -0
- package/dist/webcomponent/registry.d.ts +39 -0
- package/dist/webcomponent/registry.d.ts.map +1 -0
- package/dist/webcomponent/registry.js +1 -0
- package/dist/webcomponent/types.d.ts +15 -0
- package/dist/webcomponent/types.d.ts.map +1 -0
- package/dist/webcomponent/types.js +3 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [5.29.0](https://github.com/Lundalogik/lime-web-components/compare/v5.28.0...v5.29.0) (2024-03-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **commandbus:** add method for getting list of command metadata ([c32550d](https://github.com/Lundalogik/lime-web-components/commit/c32550d0cfe2f12d984216fc66fead297312aa97))
|
|
8
|
+
* **core:** add interface for config metadata ([5ecc17c](https://github.com/Lundalogik/lime-web-components/commit/5ecc17c3b1bde44fc503a7c2e59e13c71342d33c))
|
|
9
|
+
* **webcomponent:** add registry for web components ([0edb694](https://github.com/Lundalogik/lime-web-components/commit/0edb69455e308c4d939929ba8eb4bb04560789bc))
|
|
10
|
+
|
|
1
11
|
## [5.28.0](https://github.com/Lundalogik/lime-web-components/compare/v5.27.0...v5.28.0) (2024-03-17)
|
|
2
12
|
|
|
3
13
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LimeWebComponentContext } from '../core';
|
|
1
|
+
import { LimeWebComponentContext, ConfigMetadata } from '../core';
|
|
2
2
|
import { Expression } from '../query';
|
|
3
3
|
/**
|
|
4
4
|
* A generic command
|
|
@@ -67,6 +67,15 @@ export interface CommandBus extends CommandHandler {
|
|
|
67
67
|
* @param handler - the handler instance used to execute the command
|
|
68
68
|
*/
|
|
69
69
|
register(commandClass: CommandClass, handler: CommandHandler): void;
|
|
70
|
+
/**
|
|
71
|
+
* Register a command to be executed by the given handler
|
|
72
|
+
*
|
|
73
|
+
* @param commandClass - type of command
|
|
74
|
+
* @param handler - the handler instance used to execute the command
|
|
75
|
+
* @param metadata - metadata for the command
|
|
76
|
+
* @alpha
|
|
77
|
+
*/
|
|
78
|
+
register(commandClass: CommandClass, handler: CommandHandler, metadata?: Omit<CommandMetadata, 'id'>): void;
|
|
70
79
|
/**
|
|
71
80
|
* Execute the given command with it's registered command handler
|
|
72
81
|
*
|
|
@@ -91,6 +100,12 @@ export interface CommandBus extends CommandHandler {
|
|
|
91
100
|
* @returns the handler for the command class
|
|
92
101
|
*/
|
|
93
102
|
getHandler(commandClass: CommandClass): CommandHandler;
|
|
103
|
+
/**
|
|
104
|
+
* Get a list of configs for all registered commands
|
|
105
|
+
*
|
|
106
|
+
* @alpha
|
|
107
|
+
*/
|
|
108
|
+
getAll?(): CommandMetadata[];
|
|
94
109
|
/**
|
|
95
110
|
* Create a command instance from a {@link CommandConfig}
|
|
96
111
|
*
|
|
@@ -202,6 +217,18 @@ export interface CommandConfig<T = any> {
|
|
|
202
217
|
*/
|
|
203
218
|
params?: Partial<Record<keyof T, unknown>>;
|
|
204
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Metadata for a command
|
|
222
|
+
*
|
|
223
|
+
* @alpha
|
|
224
|
+
* @group Command bus
|
|
225
|
+
*/
|
|
226
|
+
export type CommandMetadata = ConfigMetadata & {
|
|
227
|
+
/**
|
|
228
|
+
* Command id
|
|
229
|
+
*/
|
|
230
|
+
id: string;
|
|
231
|
+
};
|
|
205
232
|
/**
|
|
206
233
|
* Register a class as a command
|
|
207
234
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandbus.d.ts","sourceRoot":"","sources":["../../src/commandbus/commandbus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"commandbus.d.ts","sourceRoot":"","sources":["../../src/commandbus/commandbus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,UAA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M,MAAM,eAAe,GAAG,cAAc,GAAG;IAC3C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,kBACrB,YAAY,UAIrC;AAeD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,iBAAiB,GAAG,MAAM,CAgB1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,iBAAiB,GAAG,MAAM,EAAE,CAW7E"}
|
package/dist/core/index.d.ts
CHANGED
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Icon } from '../action';
|
|
2
|
+
/**
|
|
3
|
+
* Metadata for a configured resource
|
|
4
|
+
*
|
|
5
|
+
* A resource can be anything that is registered in the client, e.g.
|
|
6
|
+
* web component or command
|
|
7
|
+
*
|
|
8
|
+
* @see {@link WebComponentRegistry.register | WebComponentRegistry.register}
|
|
9
|
+
* @see {@link CommandBus | CommandBus}
|
|
10
|
+
*
|
|
11
|
+
* @group Core
|
|
12
|
+
* @alpha
|
|
13
|
+
*/
|
|
14
|
+
export type ConfigMetadata = {
|
|
15
|
+
/**
|
|
16
|
+
* Human readable name for the resource
|
|
17
|
+
*/
|
|
18
|
+
title?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Description of the resource
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Icon representing the resource
|
|
25
|
+
*/
|
|
26
|
+
icon?: string | Icon;
|
|
27
|
+
/**
|
|
28
|
+
* List of tags describing the resource. A client may use the tags to
|
|
29
|
+
* determine if a resource is suitable for a given context
|
|
30
|
+
*/
|
|
31
|
+
tags?: string[];
|
|
32
|
+
/**
|
|
33
|
+
* Component that can be used to configure the given resource
|
|
34
|
+
*/
|
|
35
|
+
configComponent?: {
|
|
36
|
+
/**
|
|
37
|
+
* Tag name of the web component
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
/**
|
|
41
|
+
* Properties to initialize the component with
|
|
42
|
+
*/
|
|
43
|
+
props?: Record<string, unknown>;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/core/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAMjC;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;OAEG;IACH,eAAe,CAAC,EAAE;QACd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/es5/core/index.js
CHANGED
|
@@ -7,3 +7,4 @@ tslib_1.__exportStar(require("./lime-web-component"), exports);
|
|
|
7
7
|
tslib_1.__exportStar(require("./plugin-loader"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./state"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./decorators"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./metadata"), exports);
|
package/dist/es5/index.js
CHANGED
|
@@ -25,3 +25,4 @@ tslib_1.__exportStar(require("./userpreferences"), exports);
|
|
|
25
25
|
tslib_1.__exportStar(require("./datetimeformatter"), exports);
|
|
26
26
|
tslib_1.__exportStar(require("./conditionregistry"), exports);
|
|
27
27
|
tslib_1.__exportStar(require("./view"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./webcomponent"), 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"}
|
|
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"}
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { SpecPage } from '@stencil/core/testing';
|
|
2
2
|
/**
|
|
3
3
|
* @public
|
|
4
|
+
* @deprecated use `@lundalogik/limeclient.js/testing` to create a platform suitable for testing
|
|
4
5
|
*/
|
|
5
6
|
export interface ComponentProps {
|
|
6
7
|
[name: string]: any;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
10
|
* @public
|
|
11
|
+
* @deprecated use `@lundalogik/limeclient.js/testing` to create a platform suitable for testing
|
|
10
12
|
*/
|
|
11
13
|
export interface ComponentListeners {
|
|
12
14
|
[name: string]: (event: CustomEvent<any>) => void;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* @public
|
|
18
|
+
* @deprecated use `@lundalogik/limeclient.js/testing` to create a platform suitable for testing
|
|
16
19
|
*/
|
|
17
20
|
export interface ComponentConfig {
|
|
18
21
|
/**
|
|
@@ -44,6 +47,8 @@ export interface ComponentConfig {
|
|
|
44
47
|
* @param config - component configuration
|
|
45
48
|
* @returns the component
|
|
46
49
|
* @public
|
|
50
|
+
*
|
|
51
|
+
* @deprecated use `newSpecPage` from `@stencil/core/testing`
|
|
47
52
|
*/
|
|
48
53
|
export declare function createComponent(component: any, page: SpecPage, config: ComponentConfig): HTMLElement;
|
|
49
54
|
/**
|
|
@@ -52,6 +57,8 @@ export declare function createComponent(component: any, page: SpecPage, config:
|
|
|
52
57
|
* @param component - the component to destroy
|
|
53
58
|
* @returns
|
|
54
59
|
* @public
|
|
60
|
+
*
|
|
61
|
+
* @deprecated use `@lundalogik/limeclient.js/testing` to create a platform suitable for testing
|
|
55
62
|
*/
|
|
56
63
|
export declare function destroyComponent(component: HTMLElement): void;
|
|
57
64
|
/**
|
|
@@ -61,6 +68,7 @@ export declare function destroyComponent(component: HTMLElement): void;
|
|
|
61
68
|
* @param state - the state variables to set along with their values
|
|
62
69
|
* @returns
|
|
63
70
|
* @public
|
|
71
|
+
* @deprecated use platform from limeclient.js instead
|
|
64
72
|
*/
|
|
65
73
|
export declare function setState(component: HTMLElement, state: object): void;
|
|
66
74
|
//# sourceMappingURL=component-testing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-testing.d.ts","sourceRoot":"","sources":["../../src/testing/component-testing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIjD
|
|
1
|
+
{"version":3,"file":"component-testing.d.ts","sourceRoot":"","sources":["../../src/testing/component-testing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIjD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAC/B,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;CACrD;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;CAC5B;AAgBD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC3B,SAAS,EAAE,GAAG,EACd,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,eAAe,GACxB,WAAW,CA4Bb;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAW7D;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,QAG7D"}
|
|
@@ -12,6 +12,8 @@ const destroyFunctions = new WeakMap();
|
|
|
12
12
|
* @param config - component configuration
|
|
13
13
|
* @returns the component
|
|
14
14
|
* @public
|
|
15
|
+
*
|
|
16
|
+
* @deprecated use `newSpecPage` from `@stencil/core/testing`
|
|
15
17
|
*/
|
|
16
18
|
export function createComponent(component, page, config) {
|
|
17
19
|
componentConfigs.set(component.prototype, {
|
|
@@ -39,6 +41,8 @@ export function createComponent(component, page, config) {
|
|
|
39
41
|
* @param component - the component to destroy
|
|
40
42
|
* @returns
|
|
41
43
|
* @public
|
|
44
|
+
*
|
|
45
|
+
* @deprecated use `@lundalogik/limeclient.js/testing` to create a platform suitable for testing
|
|
42
46
|
*/
|
|
43
47
|
export function destroyComponent(component) {
|
|
44
48
|
if (!component) {
|
|
@@ -57,6 +61,7 @@ export function destroyComponent(component) {
|
|
|
57
61
|
* @param state - the state variables to set along with their values
|
|
58
62
|
* @returns
|
|
59
63
|
* @public
|
|
64
|
+
* @deprecated use platform from limeclient.js instead
|
|
60
65
|
*/
|
|
61
66
|
export function setState(component, state) {
|
|
62
67
|
const instance = componentInstances.get(component);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/limeobjects/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBvB,CAAC;AAEF,eAAO,MAAM,WAAW,aAAc,MAAM,6BAAwB,CAAC;AAErE,wBAAgB,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,GAAG,CA4BnE"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/limeobjects/index.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBvB,CAAC;AAEF,eAAO,MAAM,WAAW,aAAc,MAAM,6BAAwB,CAAC;AAErE,wBAAgB,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,GAAG,CA4BnE"}
|
|
@@ -5,6 +5,10 @@ import { person } from './person';
|
|
|
5
5
|
import { document } from './document';
|
|
6
6
|
import { todo } from './todo';
|
|
7
7
|
import { limetypes } from '../limetypes';
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated use `@lundalogik/limeclient.js/testing` and get limeobjects
|
|
10
|
+
* from the platform.
|
|
11
|
+
*/
|
|
8
12
|
export const limeobjects = {
|
|
9
13
|
company: company,
|
|
10
14
|
coworker: coworker,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { LimeType, LimeProperty } from '../..';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated use `@lundalogik/limeclient.js/testing` and get limetypes
|
|
4
|
+
* from the platform.
|
|
5
|
+
*/
|
|
2
6
|
export declare const limetypes: Record<string, LimeType>;
|
|
3
7
|
export declare function getLimetype(name: string): LimeType;
|
|
4
8
|
export declare function getBackreference(limetype: string, property: string): LimeProperty;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/limetypes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAuB/C,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAsBvC,CAAC;AAET,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAElD;AAED,wBAAgB,gBAAgB,CAC5B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACjB,YAAY,CAEd;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAkB7D"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/limetypes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAuB/C;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAsBvC,CAAC;AAET,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAElD;AAED,wBAAgB,gBAAgB,CAC5B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACjB,YAAY,CAEd;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAkB7D"}
|
|
@@ -19,6 +19,10 @@ import { successplan } from './successplan';
|
|
|
19
19
|
import { target } from './target';
|
|
20
20
|
import { todo } from './todo';
|
|
21
21
|
import { document } from './document';
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated use `@lundalogik/limeclient.js/testing` and get limetypes
|
|
24
|
+
* from the platform.
|
|
25
|
+
*/
|
|
22
26
|
export const limetypes = {
|
|
23
27
|
company: company,
|
|
24
28
|
solutionimprovement: solutionimprovement,
|
|
@@ -3,6 +3,7 @@ import { LimeWebComponentContext, LimeWebComponentPlatform } from '../..';
|
|
|
3
3
|
* Create a new platform suitable for testing
|
|
4
4
|
*
|
|
5
5
|
* @returns a new testing platform
|
|
6
|
+
* @deprecated use `@lundalogik/limeclient.js/testing` to create a platform suitable for testing
|
|
6
7
|
*/
|
|
7
8
|
export declare function createPlatform(): LimeWebComponentPlatform;
|
|
8
9
|
export declare const defaultContext: LimeWebComponentContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/platform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AA2B1E
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/platform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AA2B1E;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,wBAAwB,CAEzD;AAED,eAAO,MAAM,cAAc,EAAE,uBAG5B,CAAC"}
|
|
@@ -22,6 +22,7 @@ class TestingPlatform {
|
|
|
22
22
|
* Create a new platform suitable for testing
|
|
23
23
|
*
|
|
24
24
|
* @returns a new testing platform
|
|
25
|
+
* @deprecated use `@lundalogik/limeclient.js/testing` to create a platform suitable for testing
|
|
25
26
|
*/
|
|
26
27
|
export function createPlatform() {
|
|
27
28
|
return new TestingPlatform();
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { DateTimeFormatter } from '../../datetimeformatter';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @deprecated use the platform to get the {@link DateTimeFormatter} service instead
|
|
5
|
+
*/
|
|
2
6
|
export declare const getDateTimeFormatter: () => DateTimeFormatter;
|
|
3
7
|
//# sourceMappingURL=datetimeformatter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetimeformatter.d.ts","sourceRoot":"","sources":["../../../src/testing/services/datetimeformatter.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAGpB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,oBAAoB,yBAahC,CAAC"}
|
|
1
|
+
{"version":3,"file":"datetimeformatter.d.ts","sourceRoot":"","sources":["../../../src/testing/services/datetimeformatter.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EAGpB,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,yBAahC,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @deprecated use the platform to get the {@link DateTimeFormatter} service instead
|
|
4
|
+
*/
|
|
1
5
|
export const getDateTimeFormatter = () => {
|
|
2
6
|
return {
|
|
3
7
|
format: jest.fn((date, type) => `${typeof date === 'object' ? JSON.stringify(date) : date} - ${typeof type === 'object' ? JSON.stringify(type) : type}`),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translator.d.ts","sourceRoot":"","sources":["../../../src/testing/services/translator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,aAAa,kBASzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"translator.d.ts","sourceRoot":"","sources":["../../../src/testing/services/translator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;GAGG;AACH,eAAO,MAAM,aAAa,kBASzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webcomponent/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ConfigMetadata } from '../core';
|
|
2
|
+
/**
|
|
3
|
+
* Registry containing web components
|
|
4
|
+
*
|
|
5
|
+
* A typical web component does not need to be registered. Registration of web
|
|
6
|
+
* components are only needed when they are associated with a title,
|
|
7
|
+
* description, icon etc.
|
|
8
|
+
*
|
|
9
|
+
* @group Web components
|
|
10
|
+
* @alpha
|
|
11
|
+
*/
|
|
12
|
+
export interface WebComponentRegistry {
|
|
13
|
+
/**
|
|
14
|
+
* Register a web component
|
|
15
|
+
*
|
|
16
|
+
* @param name - the name of the component
|
|
17
|
+
* @param config - configuration options
|
|
18
|
+
*/
|
|
19
|
+
register(name: string, config?: Omit<WebComponentMetadata, 'name'>): void;
|
|
20
|
+
/**
|
|
21
|
+
* Get all registered web components
|
|
22
|
+
*
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
getAll(): WebComponentMetadata[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Metadata for a web component
|
|
29
|
+
*
|
|
30
|
+
* @group Web components
|
|
31
|
+
* @alpha
|
|
32
|
+
*/
|
|
33
|
+
export type WebComponentMetadata = ConfigMetadata & {
|
|
34
|
+
/**
|
|
35
|
+
* Name of the web component
|
|
36
|
+
*/
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/webcomponent/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAE1E;;;;OAIG;IACH,MAAM,IAAI,oBAAoB,EAAE,CAAC;CACpC;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG;IAChD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { WebComponentRegistry } from './registry';
|
|
2
|
+
declare const SERVICE_NAME = "webComponentRegistry";
|
|
3
|
+
declare module '../core/platform' {
|
|
4
|
+
interface PlatformServiceNameType {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link WebComponentRegistry}
|
|
7
|
+
*/
|
|
8
|
+
WebComponentRegistry: typeof SERVICE_NAME;
|
|
9
|
+
}
|
|
10
|
+
interface LimeWebComponentPlatform {
|
|
11
|
+
get(name: PlatformServiceNameType['WebComponentRegistry']): WebComponentRegistry;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/webcomponent/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,QAAA,MAAM,YAAY,yBAAyB,CAAC;AAI5C,OAAO,QAAQ,kBAAkB,CAAC;IAC9B,UAAU,uBAAuB;QAC7B;;WAEG;QACH,oBAAoB,EAAE,OAAO,YAAY,CAAC;KAC7C;IAED,UAAU,wBAAwB;QAC9B,GAAG,CACC,IAAI,EAAE,uBAAuB,CAAC,sBAAsB,CAAC,GACtD,oBAAoB,CAAC;KAC3B;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-web-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.29.0",
|
|
4
4
|
"description": "Lime Web Components",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@commitlint/config-conventional": "^19.1.0",
|
|
39
39
|
"@microsoft/api-extractor": "^7.42.3",
|
|
40
40
|
"@types/jest": "^27.5.0",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
42
|
-
"@typescript-eslint/parser": "^7.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
|
42
|
+
"@typescript-eslint/parser": "^7.3.1",
|
|
43
43
|
"commitizen": "^4.3.0",
|
|
44
44
|
"cz-conventional-changelog": "^3.3.0",
|
|
45
45
|
"eslint": "^8.57.0",
|