@refinitiv-ui/elements 6.8.3 → 6.8.4-next.1
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 +8 -0
- package/lib/configuration/custom-elements.json +15 -0
- package/lib/configuration/custom-elements.md +7 -0
- package/lib/configuration/elements/configuration.d.ts +44 -0
- package/lib/configuration/elements/configuration.js +46 -0
- package/lib/configuration/helpers/context.d.ts +5 -0
- package/lib/configuration/helpers/context.js +3 -0
- package/lib/configuration/helpers/types.d.ts +9 -0
- package/lib/configuration/helpers/types.js +1 -0
- package/lib/configuration/index.d.ts +3 -0
- package/lib/configuration/index.js +2 -0
- package/lib/icon/index.d.ts +11 -0
- package/lib/icon/index.js +16 -1
- package/lib/version.js +1 -1
- package/package.json +18 -16
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [6.8.4-next.1](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.8.4-next.0...@refinitiv-ui/elements@6.8.4-next.1) (2023-06-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @refinitiv-ui/elements
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [6.8.3](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.8.2...@refinitiv-ui/elements@6.8.3) (2023-06-06)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @refinitiv-ui/elements
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { JSXInterface } from '../../jsx';
|
|
2
|
+
import { BasicElement, TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
+
import { type Config } from '../helpers/types.js';
|
|
4
|
+
export declare class Configuration extends BasicElement {
|
|
5
|
+
/**
|
|
6
|
+
* Element version number
|
|
7
|
+
* @returns version number
|
|
8
|
+
*/
|
|
9
|
+
static get version(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Render slot as light DOM
|
|
12
|
+
* @returns Element
|
|
13
|
+
*/
|
|
14
|
+
protected createRenderRoot(): this;
|
|
15
|
+
/**
|
|
16
|
+
* Configuration data
|
|
17
|
+
*/
|
|
18
|
+
config: Config;
|
|
19
|
+
/**
|
|
20
|
+
* A `TemplateResult` that will be used
|
|
21
|
+
* to render the updated internal template.
|
|
22
|
+
* @return Render template
|
|
23
|
+
*/
|
|
24
|
+
protected render(): TemplateResult;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
'ef-configuration': Configuration;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare global {
|
|
33
|
+
interface HTMLElementTagNameMap {
|
|
34
|
+
'ef-configuration': Configuration;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
namespace JSX {
|
|
38
|
+
interface IntrinsicElements {
|
|
39
|
+
'ef-configuration': Partial<Configuration> | JSXInterface.HTMLAttributes<Configuration>;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { BasicElement, html } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
+
import { state } from '@refinitiv-ui/core/decorators/state.js';
|
|
5
|
+
import { VERSION } from '../../version.js';
|
|
6
|
+
import { efConfig, DEFAULT_CONFIG } from '../helpers/context.js';
|
|
7
|
+
import { provide } from '@lit-labs/context';
|
|
8
|
+
let Configuration = class Configuration extends BasicElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
/**
|
|
12
|
+
* Configuration data
|
|
13
|
+
*/
|
|
14
|
+
this.config = DEFAULT_CONFIG;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Element version number
|
|
18
|
+
* @returns version number
|
|
19
|
+
*/
|
|
20
|
+
static get version() {
|
|
21
|
+
return VERSION;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Render slot as light DOM
|
|
25
|
+
* @returns Element
|
|
26
|
+
*/
|
|
27
|
+
createRenderRoot() {
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A `TemplateResult` that will be used
|
|
32
|
+
* to render the updated internal template.
|
|
33
|
+
* @return Render template
|
|
34
|
+
*/
|
|
35
|
+
render() {
|
|
36
|
+
return html `<slot></slot>`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
__decorate([
|
|
40
|
+
provide({ context: efConfig }),
|
|
41
|
+
state()
|
|
42
|
+
], Configuration.prototype, "config", void 0);
|
|
43
|
+
Configuration = __decorate([
|
|
44
|
+
customElement('ef-configuration', { theme: false })
|
|
45
|
+
], Configuration);
|
|
46
|
+
export { Configuration };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/icon/index.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
2
|
import { BasicElement, CSSResultGroup, TemplateResult, PropertyValues } from '@refinitiv-ui/core';
|
|
3
3
|
export { preload } from './utils/IconLoader.js';
|
|
4
|
+
import { type Config } from '../configuration/index.js';
|
|
4
5
|
export declare class Icon extends BasicElement {
|
|
5
6
|
/**
|
|
6
7
|
* Element version number
|
|
7
8
|
* @returns version number
|
|
8
9
|
*/
|
|
9
10
|
static get version(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Icon map from ef-configuration
|
|
13
|
+
* @ignore
|
|
14
|
+
*/
|
|
15
|
+
config?: Config;
|
|
10
16
|
/**
|
|
11
17
|
* A `CSSResultGroup` that will be used
|
|
12
18
|
* to style the host, slotted children
|
|
@@ -37,6 +43,11 @@ export declare class Icon extends BasicElement {
|
|
|
37
43
|
*/
|
|
38
44
|
private get template();
|
|
39
45
|
private set template(value);
|
|
46
|
+
/**
|
|
47
|
+
* Check if the icon map configuration has content
|
|
48
|
+
* @returns icon map if exists
|
|
49
|
+
*/
|
|
50
|
+
private get iconMap();
|
|
40
51
|
/**
|
|
41
52
|
* Called after the component is first rendered
|
|
42
53
|
* @param changedProperties Properties which have changed
|
package/lib/icon/index.js
CHANGED
|
@@ -6,6 +6,8 @@ import { unsafeSVG } from '@refinitiv-ui/core/directives/unsafe-svg.js';
|
|
|
6
6
|
import { VERSION } from '../version.js';
|
|
7
7
|
import { IconLoader } from './utils/IconLoader.js';
|
|
8
8
|
export { preload } from './utils/IconLoader.js';
|
|
9
|
+
import { consume } from '@lit-labs/context';
|
|
10
|
+
import { efConfig } from '../configuration/index.js';
|
|
9
11
|
const EmptyTemplate = svg ``;
|
|
10
12
|
/**
|
|
11
13
|
* Cache for reusing SVG template results across multiple icons.
|
|
@@ -76,7 +78,10 @@ let Icon = class Icon extends BasicElement {
|
|
|
76
78
|
if (this.src !== value) {
|
|
77
79
|
this._src = value;
|
|
78
80
|
this.clearIcon();
|
|
79
|
-
if (
|
|
81
|
+
if (this.icon && this.iconMap) {
|
|
82
|
+
void this.loadAndRenderIcon(this.iconMap);
|
|
83
|
+
}
|
|
84
|
+
else if (value) {
|
|
80
85
|
void this.loadAndRenderIcon(value);
|
|
81
86
|
}
|
|
82
87
|
}
|
|
@@ -93,6 +98,13 @@ let Icon = class Icon extends BasicElement {
|
|
|
93
98
|
this.requestUpdate();
|
|
94
99
|
}
|
|
95
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Check if the icon map configuration has content
|
|
103
|
+
* @returns icon map if exists
|
|
104
|
+
*/
|
|
105
|
+
get iconMap() {
|
|
106
|
+
return this.icon && this.config?.icon.map[this.icon] || null;
|
|
107
|
+
}
|
|
96
108
|
/**
|
|
97
109
|
* Called after the component is first rendered
|
|
98
110
|
* @param changedProperties Properties which have changed
|
|
@@ -157,6 +169,9 @@ let Icon = class Icon extends BasicElement {
|
|
|
157
169
|
return this.template;
|
|
158
170
|
}
|
|
159
171
|
};
|
|
172
|
+
__decorate([
|
|
173
|
+
consume({ context: efConfig, subscribe: true })
|
|
174
|
+
], Icon.prototype, "config", void 0);
|
|
160
175
|
__decorate([
|
|
161
176
|
property({ type: String, reflect: true })
|
|
162
177
|
], Icon.prototype, "icon", null);
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.8.
|
|
1
|
+
export const VERSION = '6.8.4-next.1';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinitiv-ui/elements",
|
|
3
|
-
"version": "6.8.
|
|
3
|
+
"version": "6.8.4-next.1",
|
|
4
4
|
"description": "Element Framework Elements",
|
|
5
5
|
"author": "LSEG",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
"./combo-box/themes/halo/light": "./lib/combo-box/themes/halo/light/index.js",
|
|
106
106
|
"./combo-box/themes/solar/charcoal": "./lib/combo-box/themes/solar/charcoal/index.js",
|
|
107
107
|
"./combo-box/themes/solar/pearl": "./lib/combo-box/themes/solar/pearl/index.js",
|
|
108
|
+
"./configuration": "./lib/configuration/index.js",
|
|
108
109
|
"./counter": "./lib/counter/index.js",
|
|
109
110
|
"./counter/themes/halo/dark": "./lib/counter/themes/halo/dark/index.js",
|
|
110
111
|
"./counter/themes/halo/light": "./lib/counter/themes/halo/light/index.js",
|
|
@@ -336,9 +337,10 @@
|
|
|
336
337
|
"version": "node ../../scripts/version"
|
|
337
338
|
},
|
|
338
339
|
"dependencies": {
|
|
340
|
+
"@lit-labs/context": "^0.3.1",
|
|
339
341
|
"@refinitiv-ui/browser-sparkline": "1.1.8",
|
|
340
|
-
"@refinitiv-ui/halo-theme": "^6.5.
|
|
341
|
-
"@refinitiv-ui/solar-theme": "^6.3.
|
|
342
|
+
"@refinitiv-ui/halo-theme": "^6.5.3",
|
|
343
|
+
"@refinitiv-ui/solar-theme": "^6.3.5",
|
|
342
344
|
"@types/chart.js": "^2.9.31",
|
|
343
345
|
"chart.js": "~2.9.4",
|
|
344
346
|
"d3-interpolate": "^3.0.1",
|
|
@@ -347,24 +349,24 @@
|
|
|
347
349
|
"tslib": "^2.3.1"
|
|
348
350
|
},
|
|
349
351
|
"devDependencies": {
|
|
350
|
-
"@refinitiv-ui/core": "^6.4.
|
|
351
|
-
"@refinitiv-ui/demo-block": "^6.1.
|
|
352
|
-
"@refinitiv-ui/i18n": "^6.0.
|
|
353
|
-
"@refinitiv-ui/phrasebook": "^6.3.
|
|
354
|
-
"@refinitiv-ui/test-helpers": "^6.0.
|
|
355
|
-
"@refinitiv-ui/translate": "^6.0.
|
|
356
|
-
"@refinitiv-ui/utils": "^6.2.
|
|
352
|
+
"@refinitiv-ui/core": "^6.4.3-next.1",
|
|
353
|
+
"@refinitiv-ui/demo-block": "^6.1.4-next.1",
|
|
354
|
+
"@refinitiv-ui/i18n": "^6.0.13",
|
|
355
|
+
"@refinitiv-ui/phrasebook": "^6.3.2",
|
|
356
|
+
"@refinitiv-ui/test-helpers": "^6.0.10",
|
|
357
|
+
"@refinitiv-ui/translate": "^6.0.21-next.1",
|
|
358
|
+
"@refinitiv-ui/utils": "^6.2.4-next.1",
|
|
357
359
|
"@types/d3-interpolate": "^3.0.1"
|
|
358
360
|
},
|
|
359
361
|
"peerDependencies": {
|
|
360
|
-
"@refinitiv-ui/core": "^6.4.
|
|
361
|
-
"@refinitiv-ui/i18n": "^6.0.
|
|
362
|
-
"@refinitiv-ui/phrasebook": "^6.3.
|
|
363
|
-
"@refinitiv-ui/translate": "^6.0.
|
|
364
|
-
"@refinitiv-ui/utils": "^6.2.
|
|
362
|
+
"@refinitiv-ui/core": "^6.4.3-next.1",
|
|
363
|
+
"@refinitiv-ui/i18n": "^6.0.13",
|
|
364
|
+
"@refinitiv-ui/phrasebook": "^6.3.2",
|
|
365
|
+
"@refinitiv-ui/translate": "^6.0.21-next.1",
|
|
366
|
+
"@refinitiv-ui/utils": "^6.2.4-next.1"
|
|
365
367
|
},
|
|
366
368
|
"publishConfig": {
|
|
367
369
|
"access": "public"
|
|
368
370
|
},
|
|
369
|
-
"gitHead": "
|
|
371
|
+
"gitHead": "e07605aed88e8a5792fc949db2077510b39129b1"
|
|
370
372
|
}
|