@limetech/lime-web-components 5.23.1 → 5.25.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 +2119 -0
- package/dist/action/action.d.ts +29 -5
- package/dist/action/action.d.ts.map +1 -1
- package/dist/es5/index.js +1 -0
- package/dist/es5/view/index.js +5 -0
- package/dist/es5/view/registry.js +2 -0
- package/dist/es5/view/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/view/index.d.ts +3 -0
- package/dist/view/index.d.ts.map +1 -0
- package/dist/view/index.js +2 -0
- package/dist/view/registry.d.ts +64 -0
- package/dist/view/registry.d.ts.map +1 -0
- package/dist/view/registry.js +1 -0
- package/dist/view/types.d.ts +19 -0
- package/dist/view/types.d.ts.map +1 -0
- package/dist/view/types.js +3 -0
- package/package.json +13 -12
package/dist/action/action.d.ts
CHANGED
|
@@ -17,11 +17,7 @@ export interface Action<T extends AnyCommand = AnyCommand> {
|
|
|
17
17
|
/**
|
|
18
18
|
* Icon of the action
|
|
19
19
|
*/
|
|
20
|
-
icon?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Color of the icon
|
|
23
|
-
*/
|
|
24
|
-
color?: string;
|
|
20
|
+
icon?: string | Icon;
|
|
25
21
|
/**
|
|
26
22
|
* Label to display on or next to the action.
|
|
27
23
|
* The label will be translated by the {@link Translator}
|
|
@@ -50,4 +46,32 @@ export type LimeObjectAction = Action<LimeObjectCommand>;
|
|
|
50
46
|
* @group Actions
|
|
51
47
|
*/
|
|
52
48
|
export type LimeObjectBulkAction = Action<LimeObjectBulkCommand>;
|
|
49
|
+
/**
|
|
50
|
+
* Icon of an action
|
|
51
|
+
*
|
|
52
|
+
* @alpha
|
|
53
|
+
* @group Actions
|
|
54
|
+
*/
|
|
55
|
+
export type Icon = {
|
|
56
|
+
/**
|
|
57
|
+
* Name of the icon
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
/**
|
|
61
|
+
* Color of the icon.
|
|
62
|
+
*/
|
|
63
|
+
color?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Background color of the icon.
|
|
66
|
+
*/
|
|
67
|
+
backgroundColor?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The `title` attribute of the icon.
|
|
70
|
+
* Used primarily to improve accessibility for users who
|
|
71
|
+
* take advantage of assistive technologies; but also
|
|
72
|
+
* to clarify further what an icon tries to resemble
|
|
73
|
+
* for sighted users.
|
|
74
|
+
*/
|
|
75
|
+
title?: string;
|
|
76
|
+
};
|
|
53
77
|
//# sourceMappingURL=action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../src/action/action.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EACV,qBAAqB,EACrB,iBAAiB,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMjD;;;;GAIG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU;IACrD;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC;IAEX;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../src/action/action.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EACV,qBAAqB,EACrB,iBAAiB,EACpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAMjD;;;;GAIG;AACH,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU;IACrD;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC;IAEX;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,MAAM,IAAI,GAAG;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
package/dist/es5/index.js
CHANGED
|
@@ -24,3 +24,4 @@ tslib_1.__exportStar(require("./application"), exports);
|
|
|
24
24
|
tslib_1.__exportStar(require("./userpreferences"), exports);
|
|
25
25
|
tslib_1.__exportStar(require("./datetimeformatter"), exports);
|
|
26
26
|
tslib_1.__exportStar(require("./conditionregistry"), exports);
|
|
27
|
+
tslib_1.__exportStar(require("./view"), 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"}
|
|
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"}
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/view/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { LimeWebComponentContext } from '../core';
|
|
2
|
+
import { LimeObject } from '../limeobject';
|
|
3
|
+
/**
|
|
4
|
+
* Registry for view factories
|
|
5
|
+
*
|
|
6
|
+
* A view factory is used to create a view for a {@link LimeObject}.
|
|
7
|
+
* Multiple factories can be registered for the same view type, and when that
|
|
8
|
+
* is done the factory returned from {@link ViewFactoryRegistry.getFactory} will
|
|
9
|
+
* invoke each one in the order that they were added, using the return value
|
|
10
|
+
* from each factory as input for the next factory in the chain.
|
|
11
|
+
*
|
|
12
|
+
* @example Registering a view factory
|
|
13
|
+
* ```ts
|
|
14
|
+
* const factory = (
|
|
15
|
+
* limeobject: LimeObject,
|
|
16
|
+
* context: LimeWebComponentContext,
|
|
17
|
+
* view?: ListItem
|
|
18
|
+
* ): ListItem => {
|
|
19
|
+
* return {
|
|
20
|
+
* ...view,
|
|
21
|
+
* icon: 'dog',
|
|
22
|
+
* };
|
|
23
|
+
* };
|
|
24
|
+
* registry.registerFactory('list', factory);
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example Using a factory to create a view
|
|
28
|
+
* ```ts
|
|
29
|
+
* const createListItem = registry.getFactory('list');
|
|
30
|
+
* const listItem = createListItem(limeobject, context);
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @alpha
|
|
34
|
+
* @group Views
|
|
35
|
+
*/
|
|
36
|
+
export interface ViewFactoryRegistry {
|
|
37
|
+
/**
|
|
38
|
+
* Get a factory for the given view type
|
|
39
|
+
*
|
|
40
|
+
* @param type - the type of view to get a factory for
|
|
41
|
+
* @returns a factory for the given view type
|
|
42
|
+
*/
|
|
43
|
+
getFactory<T = unknown>(type: string): ViewFactory<T> | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Register a factory for a given view type
|
|
46
|
+
*
|
|
47
|
+
* @param type - the type of view to get a factory for
|
|
48
|
+
* @param factory - factory function to create a view of the specific type
|
|
49
|
+
*/
|
|
50
|
+
registerFactory<T = unknown>(type: string, factory: ViewFactory<T>): void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Factory to create a view for a {@link LimeObject}
|
|
54
|
+
*
|
|
55
|
+
* @param limeobject - the limeobject to create a view for
|
|
56
|
+
* @param context - the context of the web component rendering the view
|
|
57
|
+
* @param view - the view as it was created by the previous factory, or
|
|
58
|
+
* `undefined` if this is the first factory in the chain
|
|
59
|
+
*
|
|
60
|
+
* @alpha
|
|
61
|
+
* @group Views
|
|
62
|
+
*/
|
|
63
|
+
export type ViewFactory<T = unknown> = (limeobject: LimeObject, context: LimeWebComponentContext, view?: T) => T | undefined;
|
|
64
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/view/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;;OAKG;IACH,UAAU,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAElE;;;;;OAKG;IACH,eAAe,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC7E;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI,CACnC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,uBAAuB,EAChC,IAAI,CAAC,EAAE,CAAC,KACP,CAAC,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ViewFactoryRegistry } from './registry';
|
|
2
|
+
declare const SERVICE_NAME = "viewFactoryRegistry";
|
|
3
|
+
declare module '../core/platform' {
|
|
4
|
+
interface PlatformServiceNameType {
|
|
5
|
+
/**
|
|
6
|
+
* @alpha
|
|
7
|
+
* @see {@link ViewFactoryRegistry}
|
|
8
|
+
*/
|
|
9
|
+
ViewFactoryRegistry: typeof SERVICE_NAME;
|
|
10
|
+
}
|
|
11
|
+
interface LimeWebComponentPlatform {
|
|
12
|
+
/**
|
|
13
|
+
* @alpha
|
|
14
|
+
*/
|
|
15
|
+
get(name: PlatformServiceNameType['ViewFactoryRegistry']): ViewFactoryRegistry;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/view/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGjD,QAAA,MAAM,YAAY,wBAAwB,CAAC;AAI3C,OAAO,QAAQ,kBAAkB,CAAC;IAC9B,UAAU,uBAAuB;QAC7B;;;WAGG;QACH,mBAAmB,EAAE,OAAO,YAAY,CAAC;KAC5C;IAED,UAAU,wBAAwB;QAC9B;;WAEG;QACH,GAAG,CACC,IAAI,EAAE,uBAAuB,CAAC,qBAAqB,CAAC,GACrD,mBAAmB,CAAC;KAC1B;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-web-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.25.0",
|
|
4
4
|
"description": "Lime Web Components",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist/",
|
|
12
|
-
"testing"
|
|
12
|
+
"testing",
|
|
13
|
+
"CHANGELOG.md"
|
|
13
14
|
],
|
|
14
15
|
"scripts": {
|
|
15
16
|
"build": "tsc && tsc -p tsconfig.es5.json",
|
|
@@ -34,28 +35,28 @@
|
|
|
34
35
|
"tslib": "^2.6.2"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@commitlint/config-conventional": "^
|
|
38
|
-
"@microsoft/api-extractor": "^7.
|
|
38
|
+
"@commitlint/config-conventional": "^18.6.0",
|
|
39
|
+
"@microsoft/api-extractor": "^7.39.5",
|
|
39
40
|
"@types/jest": "^27.5.0",
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
41
|
-
"@typescript-eslint/parser": "^
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
42
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
42
43
|
"commitizen": "^4.3.0",
|
|
43
44
|
"cz-conventional-changelog": "^3.3.0",
|
|
44
|
-
"eslint": "^8.
|
|
45
|
-
"eslint-config-prettier": "^
|
|
45
|
+
"eslint": "^8.56.0",
|
|
46
|
+
"eslint-config-prettier": "^9.1.0",
|
|
46
47
|
"eslint-plugin-ban": "^1.6.0",
|
|
47
48
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
48
|
-
"eslint-plugin-prettier": "^
|
|
49
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
49
50
|
"eslint-plugin-react": "^7.33.2",
|
|
50
51
|
"eslint-plugin-sonarjs": "^0.23.0",
|
|
51
52
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
52
53
|
"jest": "^27.5.1",
|
|
53
54
|
"jest-cli": "^27.5.1",
|
|
54
|
-
"prettier": "^2.
|
|
55
|
-
"replace-in-file": "^
|
|
55
|
+
"prettier": "^3.2.5",
|
|
56
|
+
"replace-in-file": "^7.1.0",
|
|
56
57
|
"shelljs": "0.8.5",
|
|
57
58
|
"typedoc": "^0.23.24",
|
|
58
|
-
"typedoc-plugin-markdown": "~
|
|
59
|
+
"typedoc-plugin-markdown": "~3.15.0",
|
|
59
60
|
"typescript": "^4.9.5",
|
|
60
61
|
"yargs": "^17.7.2"
|
|
61
62
|
},
|