Merge branch 'main' into feature/radio-list-property-editor
This commit is contained in:
@@ -9,6 +9,9 @@ on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
# Allows GitHub to use this workflow to validate the merge queue
|
||||
merge_group:
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ const generateJSON = (icons) => {
|
||||
const iconDescriptors = icons.map((icon) => {
|
||||
return {
|
||||
name: `umb:${icon.name}`,
|
||||
path: `/icons/${icon.iconFileName}.js`,
|
||||
path: `icons/${icon.iconFileName}.js`,
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { UUIIconRegistry } from '@umbraco-ui/uui';
|
||||
import icons from '../../../public-assets/icons/icons.json';
|
||||
import { baseUrl } from '@umbraco-cms/utils';
|
||||
|
||||
interface UmbIconDescriptor {
|
||||
name: string;
|
||||
@@ -14,14 +13,6 @@ interface UmbIconDescriptor {
|
||||
* @description - Icon Store. Provides icons from the icon manifest. Icons are loaded on demand. All icons are prefixed with 'umb:'
|
||||
*/
|
||||
export class UmbIconStore extends UUIIconRegistry {
|
||||
#baseValue: string;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.#baseValue = baseUrl();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} iconName
|
||||
* @return {*} {boolean}
|
||||
@@ -33,7 +24,7 @@ export class UmbIconStore extends UUIIconRegistry {
|
||||
|
||||
const icon = this.provideIcon(iconName);
|
||||
|
||||
const iconPath = `${this.#baseValue}${iconManifest.path}`;
|
||||
const iconPath = `${import.meta.env.BASE_URL}${iconManifest.path}`;
|
||||
|
||||
import(/* @vite-ignore */ iconPath)
|
||||
.then((iconModule) => {
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
export function baseUrl(): string {
|
||||
if (typeof document !== 'undefined') {
|
||||
const baseElems = document.getElementsByTagName('base');
|
||||
if (baseElems.length && baseElems[0].hasAttribute('href')) {
|
||||
return baseElems[0].href.slice(0, -1);
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
@@ -1,3 +1,2 @@
|
||||
export * from './utils';
|
||||
export * from './baseUrl';
|
||||
export * from './umbraco-path';
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user