Skip to content

Commit

Permalink
fix(icon): change sprite cdn domain (#891)
Browse files Browse the repository at this point in the history
* fix(icon): change sprite cdn domain

* fix: correct the cdn domain name

---------

Co-authored-by: Wattachai Kanawitoon <[email protected]>
  • Loading branch information
Nantawat-Poothong and wattachai-lseg authored Aug 8, 2023
1 parent be0546f commit cb62df3
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 31 deletions.
14 changes: 7 additions & 7 deletions documents/src/pages/elements/flag.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ ef-flag {
<ef-flag flag="gb"></ef-flag>
<ef-flag flag="jp"></ef-flag>
<ef-flag flag="th"></ef-flag>
<ef-flag flag="https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/flags/bo.svg"></ef-flag>
<ef-flag flag="https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/flags/pe.svg"></ef-flag>
<ef-flag flag="https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/flags/bo.svg"></ef-flag>
<ef-flag flag="https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/flags/pe.svg"></ef-flag>
```
::

Expand All @@ -36,8 +36,8 @@ You can set a flag's code using the `flag` attribute to display the flag. See li
<ef-flag flag="br"></ef-flag>
<ef-flag flag="ar"></ef-flag>
<ef-flag flag="co"></ef-flag>
<ef-flag flag="https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/flags/bo.svg"></ef-flag>
<ef-flag flag="https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/flags/pe.svg"></ef-flag>
<ef-flag flag="https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/flags/bo.svg"></ef-flag>
<ef-flag flag="https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/flags/pe.svg"></ef-flag>
```

## Changing size
Expand Down Expand Up @@ -76,8 +76,8 @@ import { preload } from "@refinitiv-ui/elements/flag";
preload("us");
preload("au", "nz");
preload(
"https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/flags/au.svg",
"https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/flags/nz.svg",
"https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/flags/au.svg",
"https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/flags/nz.svg",
);
```

Expand Down Expand Up @@ -158,7 +158,7 @@ ef-flag {
```javascript
::flag::

const FLAG_URL = 'https://cdn.refinitiv.com/public/libs/elf/info.json';
const FLAG_URL = 'https://cdn.refinitiv.net/public/libs/elf/info.json';
const content = document.getElementById('content');
const theme = 'halo';
const flagFullname = {
Expand Down
12 changes: 6 additions & 6 deletions documents/src/pages/elements/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ ef-icon {
<ef-icon icon="search"></ef-icon>
<ef-icon icon="word"></ef-icon>
<ef-icon icon="excel"></ef-icon>
<ef-icon icon="https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/buzz.svg"></ef-icon>
<ef-icon icon="https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/chart-area.svg"></ef-icon>
<ef-icon icon="https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/buzz.svg"></ef-icon>
<ef-icon icon="https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/chart-area.svg"></ef-icon>
```
::

Expand All @@ -35,9 +35,9 @@ You can set an icon's name using the `icon` attribute. See list of icons in [Ico
<ef-icon icon="tick"></ef-icon>
<ef-icon icon="search"></ef-icon>
<ef-icon icon="save"></ef-icon>
<ef-icon icon="https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/filter.svg"></ef-icon>
<ef-icon icon="https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg"></ef-icon>
<ef-icon icon="https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/help.svg"></ef-icon>
<ef-icon icon="https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/filter.svg"></ef-icon>
<ef-icon icon="https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg"></ef-icon>
<ef-icon icon="https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/help.svg"></ef-icon>
```
Expand Down Expand Up @@ -131,7 +131,7 @@ ef-icon {
```javascript
::icon::
const ICON_URL = 'https://cdn.refinitiv.com/public/libs/elf/info.json';
const ICON_URL = 'https://cdn.refinitiv.net/public/libs/elf/info.json';
const content = document.getElementById('content');
const theme = 'halo';
Expand Down
16 changes: 8 additions & 8 deletions documents/src/pages/elements/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ basicTree.data = [
items: [{
label: 'Req. 5 Rnk. 1 Dr.Req. 1: Goldman Sachs & Co',
value: '1.1',
icon: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
icon: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
},
{
label: 'Req. 5 Rnk. 1 Dr.Req. 2: Allen & Co Inc',
value: '1.2',
icon: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
icon: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
}]
},
{
Expand All @@ -189,12 +189,12 @@ multipleTree.data = [
items: [{
label: 'Req. 5 Rnk. 1 Dr.Req. 1: Goldman Sachs & Co',
value: '1.1',
icon: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
icon: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
},
{
label: 'Req. 5 Rnk. 1 Dr.Req. 2: Allen & Co Inc',
value: '1.2',
icon: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
icon: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
}]
},
{
Expand Down Expand Up @@ -233,12 +233,12 @@ const data = [
{
label: 'Req. 5 Rnk. 1 Dr.Req. 1: Goldman Sachs & Co',
value: '1.1',
icon: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
icon: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
},
{
label: 'Req. 5 Rnk. 1 Dr.Req. 2: Allen & Co Inc',
value: '1.2',
icon: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
icon: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
}
]
},
Expand All @@ -264,12 +264,12 @@ const data: TreeData = [
{
label: 'Req. 5 Rnk. 1 Dr.Req. 1: Goldman Sachs & Co',
value: '1.1',
icon: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
icon: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
},
{
label: 'Req. 5 Rnk. 1 Dr.Req. 2: Allen & Co Inc',
value: '1.2',
icon: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
icon: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/grid.svg'
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/elemental-theme/src/custom-elements/ef-icon.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:host {
--cdn-sprite-prefix: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/sprites/icons.svg';
--cdn-sprite-prefix: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/sprites/icons.svg';

g,
path,
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/flag/__demo__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import { preload } from '@refinitiv-ui/elements/flag';

const generateFlags = async () => {
const response = await fetch('https://cdn.refinitiv.com/public/libs/elf/info.json');
const response = await fetch('https://cdn.refinitiv.net/public/libs/elf/info.json');
const info = await response.json();
const flags = info.halo.flag.map((flagInfo) => flagInfo.name);
await Promise.all(preload(...flags));
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/icon/__demo__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</script>
<script type="module">
const generateIcons = async () => {
const response = await fetch('https://cdn.refinitiv.com/public/libs/elf/info.json');
const response = await fetch('https://cdn.refinitiv.net/public/libs/elf/info.json');
const info = await response.json();
const icons = info.halo.icon.map((iconInfo) => iconInfo.name);
const sizes = ['12px', '16px', '24px', '32px', '48px', '64px', '125px'];
Expand Down
2 changes: 1 addition & 1 deletion packages/elements/src/tree/__demo__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
data['icon'] =
i % 2 === 0
? 'info'
: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg';
: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg';
} else if (depth === 2) {
data['icon'] = i % 2 === 0 ? 'map-layers' : '';
} else if (depth === 3 && i % 2 === 0) {
Expand Down
8 changes: 4 additions & 4 deletions packages/elements/src/tree/__test__/tree.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const flatData = [
readonly: true
},
{
icon: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg',
icon: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg',
label: 'Item 3',
value: '3',
disabled: true
Expand Down Expand Up @@ -160,7 +160,7 @@ describe('tree/Tree', function () {

const thirdElementIcon = el.children[2].shadowRoot.querySelector('[part="label-icon"]');
expect(thirdElementIcon.attributes.icon.value).to.equal(
'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg'
'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg'
);

const forthElementIcon = el.children[3].shadowRoot.querySelector('[part="label-icon"]');
Expand All @@ -182,12 +182,12 @@ describe('tree/Tree', function () {
el.composer.setItemPropertyValue(
el.manager.visibleItems[0],
'icon',
'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg'
'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg'
);
await elementUpdated(el);
await nextFrame();
expect(iconElement.attributes.icon.value).to.equal(
'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg'
'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/icons/favorites.svg'
);

el.composer.setItemPropertyValue(el.manager.visibleItems[0], 'icon', 'buzz');
Expand Down
2 changes: 1 addition & 1 deletion packages/halo-theme/src/custom-elements/ef-icon.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import (reference) '../responsive.less';

:host {
--cdn-sprite-prefix: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/sprites/icons.svg';
--cdn-sprite-prefix: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-halo/resources/sprites/icons.svg';

font-size: @icon-size;

Expand Down
2 changes: 1 addition & 1 deletion packages/solar-theme/src/custom-elements/ef-icon.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '@refinitiv-ui/elemental-theme/src/custom-elements/ef-icon';

:host {
--cdn-sprite-prefix: 'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-solar/resources/sprites/icons.svg';
--cdn-sprite-prefix: 'https://cdn.refinitiv.net/public/libs/elf/assets/elf-theme-solar/resources/sprites/icons.svg';
}

0 comments on commit cb62df3

Please sign in to comment.