@ui5/webcomponents-base
Advanced tools
Comparing version 2.1.1 to 2.2.0-rc.0
import { getAnimationMode as getConfiguredAnimationMode } from "../InitialConfiguration.js"; | ||
import AnimationMode from "../types/AnimationMode.js"; | ||
import { attachConfigurationReset } from "./ConfigurationReset.js"; | ||
let curAnimationMode; | ||
attachConfigurationReset(() => { | ||
curAnimationMode = undefined; | ||
}); | ||
/** | ||
@@ -5,0 +9,0 @@ * Returns the animation mode - "full", "basic", "minimal" or "none". |
import CalendarType from "../types/CalendarType.js"; | ||
import { getCalendarType as getConfiguredCalendarType, getSecondaryCalendarType as getConfiguredSecondaryCalendarType, } from "../InitialConfiguration.js"; | ||
import { attachConfigurationReset } from "./ConfigurationReset.js"; | ||
let calendarType; | ||
let secondaryCalendarType; | ||
attachConfigurationReset(() => { | ||
calendarType = undefined; | ||
secondaryCalendarType = undefined; | ||
}); | ||
/** | ||
@@ -6,0 +11,0 @@ * Returns the configured or default calendar type. |
import { getDefaultFontLoading as getConfiguredDefaultFontLoading } from "../InitialConfiguration.js"; | ||
import { attachConfigurationReset } from "./ConfigurationReset.js"; | ||
let defaultFontLoading; | ||
attachConfigurationReset(() => { | ||
defaultFontLoading = undefined; | ||
}); | ||
/** | ||
@@ -4,0 +8,0 @@ * Returns if the "defaultFontLoading" configuration is set. |
import LegacyDateFormats from "../features/LegacyDateFormats.js"; | ||
import { getFormatSettings } from "../InitialConfiguration.js"; | ||
import { getFeature } from "../FeaturesRegistry.js"; | ||
import { attachConfigurationReset } from "./ConfigurationReset.js"; | ||
let formatSettings; | ||
attachConfigurationReset(() => { | ||
formatSettings = undefined; | ||
}); | ||
/** | ||
@@ -6,0 +10,0 @@ * Returns the first day of the week from the configured format settings or based on the current locale. |
@@ -6,4 +6,9 @@ import { getLanguage as getConfiguredLanguage, getFetchDefaultLanguage as getConfiguredFetchDefaultLanguage, } from "../InitialConfiguration.js"; | ||
import { isBooted } from "../Boot.js"; | ||
import { attachConfigurationReset } from "./ConfigurationReset.js"; | ||
let curLanguage; | ||
let fetchDefaultLanguage; | ||
attachConfigurationReset(() => { | ||
curLanguage = undefined; | ||
fetchDefaultLanguage = undefined; | ||
}); | ||
/** | ||
@@ -67,3 +72,3 @@ * Returns the currently configured language, or the browser language as a fallback. | ||
if (fetchDefaultLanguage === undefined) { | ||
setFetchDefaultLanguage(getConfiguredFetchDefaultLanguage()); | ||
fetchDefaultLanguage = getConfiguredFetchDefaultLanguage(); | ||
} | ||
@@ -70,0 +75,0 @@ return fetchDefaultLanguage; |
import { getNoConflict as getConfiguredNoConflict } from "../InitialConfiguration.js"; | ||
import { attachConfigurationReset } from "./ConfigurationReset.js"; | ||
// Fire these events even with noConflict: true | ||
@@ -8,2 +9,5 @@ const excludeList = [ | ||
let noConflict; | ||
attachConfigurationReset(() => { | ||
noConflict = undefined; | ||
}); | ||
const shouldFireOriginalEvent = (eventName) => { | ||
@@ -10,0 +14,0 @@ return excludeList.includes(eventName); |
@@ -7,3 +7,7 @@ import { getTheme as getConfiguredTheme } from "../InitialConfiguration.js"; | ||
import { boot, isBooted } from "../Boot.js"; | ||
import { attachConfigurationReset } from "./ConfigurationReset.js"; | ||
let curTheme; | ||
attachConfigurationReset(() => { | ||
curTheme = undefined; | ||
}); | ||
/** | ||
@@ -10,0 +14,0 @@ * Returns the current theme. |
@@ -5,3 +5,7 @@ import createLinkInHead from "../util/createLinkInHead.js"; | ||
import { getTheme } from "./Theme.js"; | ||
import { attachConfigurationReset } from "./ConfigurationReset.js"; | ||
let currThemeRoot; | ||
attachConfigurationReset(() => { | ||
currThemeRoot = undefined; | ||
}); | ||
/** | ||
@@ -8,0 +12,0 @@ * Returns the current theme root. |
import { getTimezone as getConfiguredTimezone } from "../InitialConfiguration.js"; | ||
import { attachConfigurationReset } from "./ConfigurationReset.js"; | ||
let currTimezone; | ||
attachConfigurationReset(() => { | ||
currTimezone = undefined; | ||
}); | ||
/** | ||
@@ -4,0 +8,0 @@ * Returns the configured IANA timezone ID. |
const VersionInfo = { | ||
version: "2.1.1", | ||
version: "2.2.0-rc.0", | ||
major: 2, | ||
minor: 1, | ||
patch: 1, | ||
suffix: "", | ||
minor: 2, | ||
patch: 0, | ||
suffix: "-rc.0", | ||
isNext: false, | ||
buildTime: 1722611401, | ||
buildTime: 1723104471, | ||
}; | ||
export default VersionInfo; | ||
//# sourceMappingURL=VersionInfo.js.map |
@@ -16,2 +16,3 @@ import type { FormatSettings } from "./config/FormatSettings.js"; | ||
declare const getDefaultFontLoading: () => boolean; | ||
declare const getEnableDefaultTooltips: () => boolean; | ||
/** | ||
@@ -29,2 +30,7 @@ * Get the configured calendar type | ||
declare const getFormatSettings: () => FormatSettings; | ||
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, getDefaultFontLoading, }; | ||
/** | ||
* Internaly exposed method to enable configurations in tests. | ||
* @private | ||
*/ | ||
declare const resetConfiguration: (testEnv?: boolean) => void; | ||
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, getDefaultFontLoading, resetConfiguration, getEnableDefaultTooltips, }; |
@@ -6,2 +6,4 @@ import merge from "./thirdparty/merge.js"; | ||
import AnimationMode from "./types/AnimationMode.js"; | ||
import { resetConfiguration as resetConfigurationFn } from "./config/ConfigurationReset.js"; | ||
import { getLocationSearch } from "./Location.js"; | ||
let initialized = false; | ||
@@ -21,2 +23,3 @@ let initialConfig = { | ||
defaultFontLoading: true, | ||
enableDefaultTooltips: true, | ||
}; | ||
@@ -57,2 +60,6 @@ /* General settings */ | ||
}; | ||
const getEnableDefaultTooltips = () => { | ||
initConfiguration(); | ||
return initialConfig.enableDefaultTooltips; | ||
}; | ||
/** | ||
@@ -101,3 +108,3 @@ * Get the configured calendar type | ||
const parseURLParameters = () => { | ||
const params = new URLSearchParams(window.location.search); | ||
const params = new URLSearchParams(getLocationSearch()); | ||
// Process "sap-*" params first | ||
@@ -157,2 +164,13 @@ params.forEach((value, key) => { | ||
} | ||
resetConfiguration(); | ||
initialized = true; | ||
}; | ||
/** | ||
* Internaly exposed method to enable configurations in tests. | ||
* @private | ||
*/ | ||
const resetConfiguration = (testEnv) => { | ||
if (testEnv) { | ||
resetConfigurationFn(); | ||
} | ||
// 1. Lowest priority - configuration script | ||
@@ -164,5 +182,4 @@ parseConfigurationScript(); | ||
applyOpenUI5Configuration(); | ||
initialized = true; | ||
}; | ||
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, getDefaultFontLoading, }; | ||
export { getAnimationMode, getTheme, getThemeRoot, getLanguage, getFetchDefaultLanguage, getNoConflict, getCalendarType, getSecondaryCalendarType, getTimezone, getFormatSettings, getDefaultFontLoading, resetConfiguration, getEnableDefaultTooltips, }; | ||
//# sourceMappingURL=InitialConfiguration.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import{getAnimationMode as i}from"../InitialConfiguration.js";import t from"../types/AnimationMode.js";let o;const e=()=>(o===void 0&&(o=i()),o),d=n=>{Object.values(t).includes(n)&&(o=n)};export{e as getAnimationMode,d as setAnimationMode}; | ||
"use strict";import{getAnimationMode as i}from"../InitialConfiguration.js";import t from"../types/AnimationMode.js";import{attachConfigurationReset as e}from"./ConfigurationReset.js";let n;e(()=>{n=void 0});const d=()=>(n===void 0&&(n=i()),n),m=o=>{Object.values(t).includes(o)&&(n=o)};export{d as getAnimationMode,m as setAnimationMode}; | ||
//# sourceMappingURL=AnimationMode.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import r from"../types/CalendarType.js";import{getCalendarType as a,getSecondaryCalendarType as d}from"../InitialConfiguration.js";let n,e;const t=()=>(n===void 0&&(n=a()),n&&n in r?n:r.Gregorian),y=()=>(e===void 0&&(e=d()),e&&e in r,e);export{t as getCalendarType,y as getSecondaryCalendarType}; | ||
"use strict";import r from"../types/CalendarType.js";import{getCalendarType as a,getSecondaryCalendarType as d}from"../InitialConfiguration.js";import{attachConfigurationReset as t}from"./ConfigurationReset.js";let n,e;t(()=>{n=void 0,e=void 0});const i=()=>(n===void 0&&(n=a()),n&&n in r?n:r.Gregorian),o=()=>(e===void 0&&(e=d()),e&&e in r,e);export{i as getCalendarType,o as getSecondaryCalendarType}; | ||
//# sourceMappingURL=CalendarType.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import{getDefaultFontLoading as n}from"../InitialConfiguration.js";let o;const e=()=>(o===void 0&&(o=n()),o),a=t=>{o=t};export{e as getDefaultFontLoading,a as setDefaultFontLoading}; | ||
"use strict";import{getDefaultFontLoading as t}from"../InitialConfiguration.js";import{attachConfigurationReset as e}from"./ConfigurationReset.js";let o;e(()=>{o=void 0});const a=()=>(o===void 0&&(o=t()),o),i=n=>{o=n};export{a as getDefaultFontLoading,i as setDefaultFontLoading}; | ||
//# sourceMappingURL=Fonts.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import e from"../features/LegacyDateFormats.js";import{getFormatSettings as a}from"../InitialConfiguration.js";import{getFeature as r}from"../FeaturesRegistry.js";let t;const o=()=>(t===void 0&&(t=a()),t.firstDayOfWeek),n=r("LegacyDateFormats"),g=n?e.getLegacyDateCalendarCustomizing:()=>[];export{o as getFirstDayOfWeek,g as getLegacyDateCalendarCustomizing}; | ||
"use strict";import t from"../features/LegacyDateFormats.js";import{getFormatSettings as a}from"../InitialConfiguration.js";import{getFeature as r}from"../FeaturesRegistry.js";import{attachConfigurationReset as o}from"./ConfigurationReset.js";let e;o(()=>{e=void 0});const n=()=>(e===void 0&&(e=a()),e.firstDayOfWeek),i=r("LegacyDateFormats"),m=i?t.getLegacyDateCalendarCustomizing:()=>[];export{n as getFirstDayOfWeek,m as getLegacyDateCalendarCustomizing}; | ||
//# sourceMappingURL=FormatSettings.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import{getLanguage as g,getFetchDefaultLanguage as r}from"../InitialConfiguration.js";import{fireLanguageChange as u}from"../locale/languageChange.js";import{reRenderAllUI5Elements as o}from"../Render.js";import{DEFAULT_LANGUAGE as i}from"../generated/AssetParameters.js";import{isBooted as f}from"../Boot.js";let t,n;const s=()=>(t===void 0&&(t=g()),t),L=async e=>{t!==e&&(t=e,f()&&(await u(e),await o({languageAware:!0})))},d=()=>i,a=e=>{n=e},l=()=>(n===void 0&&a(r()),n);export{s as getLanguage,L as setLanguage,d as getDefaultLanguage,a as setFetchDefaultLanguage,l as getFetchDefaultLanguage}; | ||
"use strict";import{getLanguage as a,getFetchDefaultLanguage as g}from"../InitialConfiguration.js";import{fireLanguageChange as r}from"../locale/languageChange.js";import{reRenderAllUI5Elements as u}from"../Render.js";import{DEFAULT_LANGUAGE as o}from"../generated/AssetParameters.js";import{isBooted as i}from"../Boot.js";import{attachConfigurationReset as f}from"./ConfigurationReset.js";let e,n;f(()=>{e=void 0,n=void 0});const d=()=>(e===void 0&&(e=a()),e),s=async t=>{e!==t&&(e=t,i()&&(await r(t),await u({languageAware:!0})))},m=()=>o,L=t=>{n=t},c=()=>(n===void 0&&(n=g()),n);export{d as getLanguage,s as setLanguage,m as getDefaultLanguage,L as setFetchDefaultLanguage,c as getFetchDefaultLanguage}; | ||
//# sourceMappingURL=Language.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import{getNoConflict as i}from"../InitialConfiguration.js";const r=["value-changed","click"];let e;const c=t=>r.includes(t),s=t=>{const n=o();return!(typeof n!="boolean"&&n.events&&n.events.includes&&n.events.includes(t))},o=()=>(e===void 0&&(e=i()),e),l=t=>{e=t},a=t=>{const n=o();return c(t)?!1:n===!0?!0:!s(t)};export{o as getNoConflict,l as setNoConflict,a as skipOriginalEvent}; | ||
"use strict";import{getNoConflict as i}from"../InitialConfiguration.js";import{attachConfigurationReset as r}from"./ConfigurationReset.js";const c=["value-changed","click"];let e;r(()=>{e=void 0});const s=t=>c.includes(t),l=t=>{const n=o();return!(typeof n!="boolean"&&n.events&&n.events.includes&&n.events.includes(t))},o=()=>(e===void 0&&(e=i()),e),f=t=>{e=t},a=t=>{const n=o();return s(t)?!1:n===!0?!0:!l(t)};export{o as getNoConflict,f as setNoConflict,a as skipOriginalEvent}; | ||
//# sourceMappingURL=NoConflict.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import{getTheme as s}from"../InitialConfiguration.js";import{reRenderAllUI5Elements as o}from"../Render.js";import m from"../theming/applyTheme.js";import a from"../theming/getThemeDesignerTheme.js";import{DEFAULT_THEME as T,SUPPORTED_THEMES as h}from"../generated/AssetParameters.js";import{boot as c,isBooted as g}from"../Boot.js";let t;const r=()=>(t===void 0&&(t=s()),t),u=async e=>{t!==e&&(t=e,g()&&(await m(t),await o({themeAware:!0})))},f=()=>T,p=e=>{const n=r();return n===e||n===`${e}_exp`},i=()=>{const e=r();return y(e)?!e.startsWith("sap_horizon"):!a()?.baseThemeName?.startsWith("sap_horizon")},l=async()=>(await c(),i()),y=e=>h.includes(e);export{r as getTheme,u as setTheme,p as isTheme,i as isLegacyThemeFamily,l as isLegacyThemeFamilyAsync,f as getDefaultTheme}; | ||
"use strict";import{getTheme as o}from"../InitialConfiguration.js";import{reRenderAllUI5Elements as s}from"../Render.js";import m from"../theming/applyTheme.js";import a from"../theming/getThemeDesignerTheme.js";import{DEFAULT_THEME as h,SUPPORTED_THEMES as T}from"../generated/AssetParameters.js";import{boot as c,isBooted as u}from"../Boot.js";import{attachConfigurationReset as f}from"./ConfigurationReset.js";let t;f(()=>{t=void 0});const r=()=>(t===void 0&&(t=o()),t),g=async e=>{t!==e&&(t=e,u()&&(await m(t),await s({themeAware:!0})))},p=()=>h,d=e=>{const n=r();return n===e||n===`${e}_exp`},i=()=>{const e=r();return y(e)?!e.startsWith("sap_horizon"):!a()?.baseThemeName?.startsWith("sap_horizon")},l=async()=>(await c(),i()),y=e=>T.includes(e);export{r as getTheme,g as setTheme,d as isTheme,i as isLegacyThemeFamily,l as isLegacyThemeFamilyAsync,p as getDefaultTheme}; | ||
//# sourceMappingURL=Theme.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import r from"../util/createLinkInHead.js";import s from"../validateThemeRoot.js";import{getThemeRoot as m}from"../InitialConfiguration.js";import{getTheme as a}from"./Theme.js";let t;const n=()=>(t===void 0&&(t=m()),t),d=e=>{if(t!==e){if(t=e,!s(e)){console.warn(`The ${e} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`);return}return i(a())}},c=e=>`${n()}Base/baseLib/${e}/css_variables.css`,i=async e=>{const o=document.querySelector(`[sap-ui-webcomponents-theme="${e}"]`);o&&document.head.removeChild(o),await r(c(e),{"sap-ui-webcomponents-theme":e})};export{n as getThemeRoot,d as setThemeRoot,i as attachCustomThemeStylesToHead}; | ||
"use strict";import r from"../util/createLinkInHead.js";import s from"../validateThemeRoot.js";import{getThemeRoot as a}from"../InitialConfiguration.js";import{getTheme as m}from"./Theme.js";import{attachConfigurationReset as d}from"./ConfigurationReset.js";let t;d(()=>{t=void 0});const n=()=>(t===void 0&&(t=a()),t),c=e=>{if(t!==e){if(t=e,!s(e)){console.warn(`The ${e} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`);return}return i(m())}},u=e=>`${n()}Base/baseLib/${e}/css_variables.css`,i=async e=>{const o=document.querySelector(`[sap-ui-webcomponents-theme="${e}"]`);o&&document.head.removeChild(o),await r(u(e),{"sap-ui-webcomponents-theme":e})};export{n as getThemeRoot,c as setThemeRoot,i as attachCustomThemeStylesToHead}; | ||
//# sourceMappingURL=ThemeRoot.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import{getTimezone as i}from"../InitialConfiguration.js";let e;const r=()=>(e===void 0&&(e=i()),e),t=n=>{e!==n&&(e=n)};export{r as getTimezone,t as setTimezone}; | ||
"use strict";import{getTimezone as i}from"../InitialConfiguration.js";import{attachConfigurationReset as t}from"./ConfigurationReset.js";let e;t(()=>{e=void 0});const r=()=>(e===void 0&&(e=i()),e),o=n=>{e!==n&&(e=n)};export{r as getTimezone,o as setTimezone}; | ||
//# sourceMappingURL=Timezone.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";const e={version:"2.1.1",major:2,minor:1,patch:1,suffix:"",isNext:!1,buildTime:1722611401};export default e; | ||
"use strict";const e={version:"2.2.0-rc.0",major:2,minor:2,patch:0,suffix:"-rc.0",isNext:!1,buildTime:1723104471};export default e; | ||
//# sourceMappingURL=VersionInfo.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import f from"./thirdparty/merge.js";import{getFeature as u}from"./FeaturesRegistry.js";import{DEFAULT_THEME as c}from"./generated/AssetParameters.js";import d from"./validateThemeRoot.js";import m from"./types/AnimationMode.js";let p=!1,t={animationMode:m.Full,theme:c,themeRoot:void 0,rtl:void 0,language:void 0,timezone:void 0,calendarType:void 0,secondaryCalendarType:void 0,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1,defaultFontLoading:!0};const l=()=>(o(),t.animationMode),h=()=>(o(),t.theme),y=()=>(o(),t.themeRoot),C=()=>(o(),t.language),S=()=>(o(),t.fetchDefaultLanguage),T=()=>(o(),t.noConflict),L=()=>(o(),t.defaultFontLoading),F=()=>(o(),t.calendarType),U=()=>(o(),t.secondaryCalendarType),I=()=>(o(),t.timezone),O=()=>(o(),t.formatSettings),i=new Map;i.set("true",!0),i.set("false",!1);const R=()=>{const n=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let e;if(n){try{e=JSON.parse(n.innerHTML)}catch{console.warn("Incorrect data-sap-ui-config format. Please use JSON")}e&&(t=f(t,e))}},M=()=>{const n=new URLSearchParams(window.location.search);n.forEach((e,r)=>{const a=r.split("sap-").length;a===0||a===r.split("sap-ui-").length||g(r,e,"sap")}),n.forEach((e,r)=>{r.startsWith("sap-ui")&&g(r,e,"sap-ui")})},w=n=>{const e=n.split("@")[1];return d(e)},z=(n,e)=>n==="theme"&&e.includes("@")?e.split("@")[0]:e,g=(n,e,r)=>{const a=e.toLowerCase(),s=n.split(`${r}-`)[1];i.has(e)&&(e=i.get(a)),s==="theme"?(t.theme=z(s,e),e&&e.includes("@")&&(t.themeRoot=w(e))):t[s]=e},D=()=>{const n=u("OpenUI5Support");if(!n||!n.isOpenUI5Detected())return;const e=n.getConfigurationSettingsObject();t=f(t,e)},o=()=>{typeof document>"u"||p||(R(),M(),D(),p=!0)};export{l as getAnimationMode,h as getTheme,y as getThemeRoot,C as getLanguage,S as getFetchDefaultLanguage,T as getNoConflict,F as getCalendarType,U as getSecondaryCalendarType,I as getTimezone,O as getFormatSettings,L as getDefaultFontLoading}; | ||
"use strict";import f from"./thirdparty/merge.js";import{getFeature as l}from"./FeaturesRegistry.js";import{DEFAULT_THEME as c}from"./generated/AssetParameters.js";import m from"./validateThemeRoot.js";import d from"./types/AnimationMode.js";import{resetConfiguration as h}from"./config/ConfigurationReset.js";import{getLocationSearch as y}from"./Location.js";let p=!1,t={animationMode:d.Full,theme:c,themeRoot:void 0,rtl:void 0,language:void 0,timezone:void 0,calendarType:void 0,secondaryCalendarType:void 0,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1,defaultFontLoading:!0,enableDefaultTooltips:!0};const C=()=>(o(),t.animationMode),T=()=>(o(),t.theme),S=()=>(o(),t.themeRoot),L=()=>(o(),t.language),F=()=>(o(),t.fetchDefaultLanguage),U=()=>(o(),t.noConflict),b=()=>(o(),t.defaultFontLoading),D=()=>(o(),t.enableDefaultTooltips),I=()=>(o(),t.calendarType),O=()=>(o(),t.secondaryCalendarType),R=()=>(o(),t.timezone),M=()=>(o(),t.formatSettings),i=new Map;i.set("true",!0),i.set("false",!1);const z=()=>{const n=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let e;if(n){try{e=JSON.parse(n.innerHTML)}catch{console.warn("Incorrect data-sap-ui-config format. Please use JSON")}e&&(t=f(t,e))}},E=()=>{const n=new URLSearchParams(y());n.forEach((e,a)=>{const r=a.split("sap-").length;r===0||r===a.split("sap-ui-").length||u(a,e,"sap")}),n.forEach((e,a)=>{a.startsWith("sap-ui")&&u(a,e,"sap-ui")})},P=n=>{const e=n.split("@")[1];return m(e)},w=(n,e)=>n==="theme"&&e.includes("@")?e.split("@")[0]:e,u=(n,e,a)=>{const r=e.toLowerCase(),s=n.split(`${a}-`)[1];i.has(e)&&(e=i.get(r)),s==="theme"?(t.theme=w(s,e),e&&e.includes("@")&&(t.themeRoot=P(e))):t[s]=e},j=()=>{const n=l("OpenUI5Support");if(!n||!n.isOpenUI5Detected())return;const e=n.getConfigurationSettingsObject();t=f(t,e)},o=()=>{typeof document>"u"||p||(g(),p=!0)},g=n=>{n&&h(),z(),E(),j()};export{C as getAnimationMode,T as getTheme,S as getThemeRoot,L as getLanguage,F as getFetchDefaultLanguage,U as getNoConflict,I as getCalendarType,O as getSecondaryCalendarType,R as getTimezone,M as getFormatSettings,b as getDefaultFontLoading,g as resetConfiguration,D as getEnableDefaultTooltips}; | ||
//# sourceMappingURL=InitialConfiguration.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import p from"./generated/VersionInfo.js";import d from"./getSharedResource.js";let i,s="";const u=new Map,r=d("Runtimes",[]),R=()=>{if(i===void 0){i=r.length;const t=p;r.push({...t,alias:s,description:`Runtime ${i} - ver ${t.version}${s?` (${s})`:""}`})}},g=()=>i,h=(t,m)=>{const o=`${t},${m}`;if(u.has(o))return u.get(o);const e=r[t],n=r[m];if(!e||!n)throw new Error("Invalid runtime index supplied");if(e.isNext||n.isNext)return e.buildTime-n.buildTime;const c=e.major-n.major;if(c)return c;const a=e.minor-n.minor;if(a)return a;const f=e.patch-n.patch;if(f)return f;const l=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare(e.suffix,n.suffix);return u.set(o,l),l},I=t=>{s=t},b=()=>r;export{g as getCurrentRuntimeIndex,R as registerCurrentRuntime,h as compareRuntimes,I as setRuntimeAlias,b as getAllRuntimes}; | ||
"use strict";import{getAllRegisteredTags as g}from"./CustomElementsRegistry.js";import{getCustomElementsScopingRules as p,getCustomElementsScopingSuffix as R}from"./CustomElementsScopeUtils.js";import d from"./generated/VersionInfo.js";import h from"./getSharedResource.js";let i,s="";const u=new Map,r=h("Runtimes",[]),x=()=>{if(i===void 0){i=r.length;const e=d;r.push({...e,get scopingSuffix(){return R()},get registeredTags(){return g()},get scopingRules(){return p()},alias:s,description:`Runtime ${i} - ver ${e.version}${s?` (${s})`:""}`})}},I=()=>i,b=(e,m)=>{const o=`${e},${m}`;if(u.has(o))return u.get(o);const t=r[e],n=r[m];if(!t||!n)throw new Error("Invalid runtime index supplied");if(t.isNext||n.isNext)return t.buildTime-n.buildTime;const c=t.major-n.major;if(c)return c;const a=t.minor-n.minor;if(a)return a;const f=t.patch-n.patch;if(f)return f;const l=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare(t.suffix,n.suffix);return u.set(o,l),l},C=e=>{s=e},$=()=>r;export{I as getCurrentRuntimeIndex,x as registerCurrentRuntime,b as compareRuntimes,C as setRuntimeAlias,$ as getAllRuntimes}; | ||
//# sourceMappingURL=Runtimes.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";import"@ui5/webcomponents-base/dist/ssr-dom.js";import U from"./thirdparty/merge.js";import{boot as T}from"./Boot.js";import L from"./UI5ElementMetadata.js";import S from"./EventProvider.js";import F from"./updateShadowRoot.js";import{shouldIgnoreCustomElement as N}from"./IgnoreCustomElements.js";import{renderDeferred as V,renderImmediately as k,cancelRender as j}from"./Render.js";import{registerTag as x,isTagRegistered as z,recordTagRegistrationFailure as H}from"./CustomElementsRegistry.js";import{observeDOMNode as $,unobserveDOMNode as q}from"./DOMObserver.js";import{skipOriginalEvent as W}from"./config/NoConflict.js";import B from"./locale/getEffectiveDir.js";import{kebabToCamelCase as g,camelToKebabCase as K,kebabToPascalCase as G}from"./util/StringHelper.js";import w from"./util/isValidPropertyName.js";import{getSlotName as J,getSlottedNodesList as b}from"./util/SlotsHelper.js";import Q from"./util/arraysAreEqual.js";import{markAsRtlAware as X}from"./locale/RTLAwareRegistry.js";import Y from"./renderer/executeTemplate.js";import{attachFormElementInternals as Z,setFormValue as R}from"./features/InputElementsFormSupport.js";import{getComponentFeature as tt,subscribeForFeatureLoad as et}from"./FeaturesRegistry.js";let nt=0;const P=new Map,M=new Map,D={fromAttribute(d,u){return u===Boolean?d!==null:u===Number?d===null?void 0:parseFloat(d):d},toAttribute(d,u){return u===Boolean?d?"":null:u===Object||u===Array||d==null?null:String(d)}};function y(d){this._suppressInvalidation||(this.onInvalidation(d),this._changedState.push(d),V(this),this._invalidationEventProvider.fireEvent("invalidate",{...d,target:this}))}function st(d,u){do{const t=Object.getOwnPropertyDescriptor(d,u);if(t)return t;d=Object.getPrototypeOf(d)}while(d&&d!==HTMLElement.prototype)}class I extends HTMLElement{constructor(){super();this._rendered=!1;const t=this.constructor;this._changedState=[],this._suppressInvalidation=!0,this._inDOM=!1,this._fullyConnected=!1,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._invalidationEventProvider=new S,this._componentStateFinalizedEventProvider=new S;let e;this._domRefReadyPromise=new Promise(n=>{e=n}),this._domRefReadyPromise._deferredResolve=e,this._doNotSyncAttributes=new Set,this._slotsAssignedNodes=new WeakMap,this._state={...t.getMetadata().getInitialState()},this.initializedProperties=new Map,this.constructor.getMetadata().getPropertiesList().forEach(n=>{if(this.hasOwnProperty(n)){const o=this[n];this.initializedProperties.set(n,o)}}),this._initShadowRoot()}_initShadowRoot(){const t=this.constructor;if(t._needsShadowDOM()){const e={mode:"open"};this.attachShadow({...e,...t.getMetadata().getShadowRootOptions()}),t.getMetadata().slotsAreManaged()&&this.shadowRoot.addEventListener("slotchange",this._onShadowRootSlotChange.bind(this))}}_onShadowRootSlotChange(t){t.target?.getRootNode()===this.shadowRoot&&this._processChildren()}get _id(){return this.__id||(this.__id=`ui5wc_${++nt}`),this.__id}render(){const t=this.constructor.template;return Y(t,this)}async connectedCallback(){const t=this.constructor;this.setAttribute(t.getMetadata().getPureTag(),""),t.getMetadata().supportsF6FastNavigation()&&this.setAttribute("data-sap-ui-fastnavgroup","true");const e=t.getMetadata().slotsAreManaged();this._inDOM=!0,e&&(this._startObservingDOMChildren(),await this._processChildren()),this._inDOM&&(k(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,this.onEnterDOM())}disconnectedCallback(){const e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!1,e&&this._stopObservingDOMChildren(),this._fullyConnected&&(this.onExitDOM(),this._fullyConnected=!1),this._domRefReadyPromise._deferredResolve(),j(this)}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}_startObservingDOMChildren(){const e=this.constructor.getMetadata();if(!e.hasSlots())return;const n=e.canSlotText(),o={childList:!0,subtree:n,characterData:n};$(this,this._processChildren.bind(this),o)}_stopObservingDOMChildren(){q(this)}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots()}async _updateSlots(){const t=this.constructor,e=t.getMetadata().getSlots(),s=t.getMetadata().canSlotText(),n=Array.from(s?this.childNodes:this.children),o=new Map,a=new Map;for(const[r,f]of Object.entries(e)){const c=f.propertyName||r;a.set(c,r),o.set(c,[...this._state[c]]),this._clearSlot(r,f)}const l=new Map,i=new Map,h=n.map(async(r,f)=>{const c=J(r),m=e[c];if(m===void 0){if(c!=="default"){const p=Object.keys(e).join(", ");console.warn(`Unknown slotName: ${c}, ignoring`,r,`Valid values are: ${p}`)}return}if(m.individualSlots){const p=(l.get(c)||0)+1;l.set(c,p),r._individualSlot=`${c}-${p}`}if(r instanceof HTMLElement){const p=r.localName;if(p.includes("-")&&!N(p)){if(!customElements.get(p)){const A=customElements.whenDefined(p);let E=P.get(p);E||(E=new Promise(O=>setTimeout(O,1e3)),P.set(p,E)),await Promise.race([A,E])}customElements.upgrade(r)}}if(r=t.getMetadata().constructor.validateSlotValue(r,m),v(r)&&m.invalidateOnChildChange){const p=this._getChildChangeListener(c);r.attachInvalidate.call(r,p)}r instanceof HTMLSlotElement&&this._attachSlotChange(r,c,!!m.invalidateOnChildChange);const C=m.propertyName||c;i.has(C)?i.get(C).push({child:r,idx:f}):i.set(C,[{child:r,idx:f}])});await Promise.all(h),i.forEach((r,f)=>{this._state[f]=r.sort((c,m)=>c.idx-m.idx).map(c=>c.child),this._state[g(f)]=this._state[f]});let _=!1;for(const[r,f]of Object.entries(e)){const c=f.propertyName||r;Q(o.get(c),this._state[c])||(y.call(this,{type:"slot",name:a.get(c),reason:"children"}),_=!0,t.getMetadata().isFormAssociated()&&R(this))}_||y.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach(o=>{if(v(o)){const a=this._getChildChangeListener(t);o.detachInvalidate.call(o,a)}o instanceof HTMLSlotElement&&this._detachSlotChange(o,t)}),this._state[s]=[],this._state[g(s)]=this._state[s]}attachInvalidate(t){this._invalidationEventProvider.attachEvent("invalidate",t)}detachInvalidate(t){this._invalidationEventProvider.detachEvent("invalidate",t)}_onChildChange(t,e){this.constructor.getMetadata().shouldInvalidateOnChildChange(t,e.type,e.name)&&y.call(this,{type:"slot",name:t,reason:"childchange",child:e.target})}attributeChangedCallback(t,e,s){let n;if(this._doNotSyncAttributes.has(t))return;const o=this.constructor.getMetadata().getProperties(),a=t.replace(/^ui5-/,""),l=g(a);if(o.hasOwnProperty(l)){const i=o[l];n=(i.converter??D).fromAttribute(s,i.type),this[l]=n}}formAssociatedCallback(){this.constructor.getMetadata().isFormAssociated()&&Z(this)}static get formAssociated(){return this.getMetadata().isFormAssociated()}_updateAttribute(t,e){const s=this.constructor;if(!s.getMetadata().hasAttribute(t))return;const o=s.getMetadata().getProperties()[t],a=K(t),i=(o.converter||D).toAttribute(e,o.type);i==null?(this._doNotSyncAttributes.add(a),this.removeAttribute(a),this._doNotSyncAttributes.delete(a)):this.setAttribute(a,i)}_getChildChangeListener(t){return this._childChangeListeners.has(t)||this._childChangeListeners.set(t,this._onChildChange.bind(this,t)),this._childChangeListeners.get(t)}_getSlotChangeListener(t){return this._slotChangeListeners.has(t)||this._slotChangeListeners.set(t,this._onSlotChange.bind(this,t)),this._slotChangeListeners.get(t)}_attachSlotChange(t,e,s){const n=this._getSlotChangeListener(e);t.addEventListener("slotchange",o=>{if(n.call(t,o),s){const a=this._slotsAssignedNodes.get(t);a&&a.forEach(i=>{if(v(i)){const h=this._getChildChangeListener(e);i.detachInvalidate.call(i,h)}});const l=b([t]);this._slotsAssignedNodes.set(t,l),l.forEach(i=>{if(v(i)){const h=this._getChildChangeListener(e);i.attachInvalidate.call(i,h)}})}})}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){y.call(this,{type:"slot",name:t,reason:"slotchange"})}onInvalidation(t){}updateAttributes(){const e=this.constructor.getMetadata().getProperties();for(const[s,n]of Object.entries(e))this._updateAttribute(s,this[s])}_render(){const t=this.constructor,e=t.getMetadata().hasIndividualSlots();this.initializedProperties.size>0&&(Array.from(this.initializedProperties.entries()).forEach(([s,n])=>{delete this[s],this[s]=n}),this.initializedProperties.clear()),this._suppressInvalidation=!0,this.onBeforeRendering(),this._rendered||this.updateAttributes(),this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized"),this._suppressInvalidation=!1,this._changedState=[],t._needsShadowDOM()&&F(this),this._rendered=!0,e&&this._assignIndividualSlotsToChildren(),this.onAfterRendering()}_assignIndividualSlotsToChildren(){Array.from(this.children).forEach(e=>{e._individualSlot&&e.setAttribute("slot",e._individualSlot)})}_waitForDomRef(){return this._domRefReadyPromise}getDomRef(){if(typeof this._getRealDomRef=="function")return this._getRealDomRef();if(!(!this.shadowRoot||this.shadowRoot.children.length===0))return this.shadowRoot.children[0]}getFocusDomRef(){const t=this.getDomRef();if(t)return t.querySelector("[data-sap-focus-ref]")||t}async getFocusDomRefAsync(){return await this._waitForDomRef(),this.getFocusDomRef()}async focus(t){await this._waitForDomRef();const e=this.getFocusDomRef();e===this?HTMLElement.prototype.focus.call(this,t):e&&typeof e.focus=="function"&&e.focus(t)}fireEvent(t,e,s=!1,n=!0){const o=this._fireEvent(t,e,s,n),a=G(t);return a!==t?o&&this._fireEvent(a,e,s,n):o}_fireEvent(t,e,s=!1,n=!0){const o=new CustomEvent(`ui5-${t}`,{detail:e,composed:!1,bubbles:n,cancelable:s}),a=this.dispatchEvent(o);if(W(t))return a;const l=new CustomEvent(t,{detail:e,composed:!1,bubbles:n,cancelable:s});return this.dispatchEvent(l)&&a}getSlottedNodes(t){return b(this[t])}attachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized",t)}detachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized",t)}get effectiveDir(){return X(this.constructor),B(this)}get isUI5Element(){return!0}get classes(){return{}}get accessibilityInfo(){return{}}static get observedAttributes(){return this.getMetadata().getAttributesList()}static _needsShadowDOM(){return!!this.template||Object.prototype.hasOwnProperty.call(this.prototype,"render")}static _generateAccessors(){const t=this.prototype,e=this.getMetadata().slotsAreManaged(),s=this.getMetadata().getProperties();for(const[n,o]of Object.entries(s)){w(n)||console.warn(`"${n}" is not a valid property name. Use a name that does not collide with DOM APIs`);const a=st(t,n);let l;a?.set&&(l=a.set);let i;a?.get&&(i=a.get),Object.defineProperty(t,n,{get(){return i?i.call(this):this._state[n]},set(h){const _=this.constructor,r=i?i.call(this):this._state[n];r!==h&&(l?l.call(this,h):this._state[n]=h,y.call(this,{type:"property",name:n,newValue:h,oldValue:r}),this._rendered&&this._updateAttribute(n,h),_.getMetadata().isFormAssociated()&&R(this))}})}if(e){const n=this.getMetadata().getSlots();for(const[o,a]of Object.entries(n)){w(o)||console.warn(`"${o}" is not a valid property name. Use a name that does not collide with DOM APIs`);const l=a.propertyName||o,i={get(){return this._state[l]!==void 0?this._state[l]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}};Object.defineProperty(t,l,i),l!==g(l)&&Object.defineProperty(t,g(l),i)}}}static{this.metadata={}}static{this.styles=""}static get dependencies(){return[]}static cacheUniqueDependencies(){const t=this.dependencies.filter((e,s,n)=>n.indexOf(e)===s);M.set(this,t)}static getUniqueDependencies(){return M.has(this)||this.cacheUniqueDependencies(),M.get(this)||[]}static whenDependenciesDefined(){return Promise.all(this.getUniqueDependencies().map(t=>t.define()))}static async onDefine(){return Promise.resolve()}static async define(){await T(),await Promise.all([this.whenDependenciesDefined(),this.onDefine()]);const t=this.getMetadata().getTag();this.getMetadata().getFeatures().forEach(o=>{tt(o)&&this.cacheUniqueDependencies(),et(o,this,this.cacheUniqueDependencies.bind(this))});const s=z(t),n=customElements.get(t);return n&&!s?H(t):n||(this._generateAccessors(),x(t),customElements.define(t,this)),this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==I;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=U({},...t);return this._metadata=new L(s),this._metadata}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage}checkValidity(){return this._internals?.checkValidity()}reportValidity(){return this._internals?.reportValidity()}}const v=d=>"isUI5Element"in d;export default I;export{v as instanceOfUI5Element}; | ||
"use strict";import"@ui5/webcomponents-base/dist/ssr-dom.js";import U from"./thirdparty/merge.js";import{boot as T}from"./Boot.js";import L from"./UI5ElementMetadata.js";import S from"./EventProvider.js";import F from"./updateShadowRoot.js";import{shouldIgnoreCustomElement as N}from"./IgnoreCustomElements.js";import{renderDeferred as V,renderImmediately as k,cancelRender as j}from"./Render.js";import{registerTag as $,isTagRegistered as x,recordTagRegistrationFailure as z}from"./CustomElementsRegistry.js";import{observeDOMNode as H,unobserveDOMNode as q}from"./DOMObserver.js";import{skipOriginalEvent as W}from"./config/NoConflict.js";import K from"./locale/getEffectiveDir.js";import{kebabToCamelCase as g,camelToKebabCase as B,kebabToPascalCase as G}from"./util/StringHelper.js";import w from"./util/isValidPropertyName.js";import{getSlotName as J,getSlottedNodesList as b}from"./util/SlotsHelper.js";import Q from"./util/arraysAreEqual.js";import{markAsRtlAware as X}from"./locale/RTLAwareRegistry.js";import Y from"./renderer/executeTemplate.js";import{attachFormElementInternals as Z,setFormValue as R}from"./features/InputElementsFormSupport.js";import{getComponentFeature as tt,subscribeForFeatureLoad as et}from"./FeaturesRegistry.js";let nt=0;const P=new Map,M=new Map,D={fromAttribute(d,u){return u===Boolean?d!==null:u===Number?d===null?void 0:parseFloat(d):d},toAttribute(d,u){return u===Boolean?d?"":null:u===Object||u===Array||d==null?null:String(d)}};function y(d){this._suppressInvalidation||(this.onInvalidation(d),this._changedState.push(d),V(this),this._invalidationEventProvider.fireEvent("invalidate",{...d,target:this}))}function st(d,u){do{const t=Object.getOwnPropertyDescriptor(d,u);if(t)return t;d=Object.getPrototypeOf(d)}while(d&&d!==HTMLElement.prototype)}class I extends HTMLElement{constructor(){super();this._rendered=!1;const t=this.constructor;this._changedState=[],this._suppressInvalidation=!0,this._inDOM=!1,this._fullyConnected=!1,this._childChangeListeners=new Map,this._slotChangeListeners=new Map,this._invalidationEventProvider=new S,this._componentStateFinalizedEventProvider=new S;let e;this._domRefReadyPromise=new Promise(n=>{e=n}),this._domRefReadyPromise._deferredResolve=e,this._doNotSyncAttributes=new Set,this._slotsAssignedNodes=new WeakMap,this._state={...t.getMetadata().getInitialState()},this.initializedProperties=new Map,this.constructor.getMetadata().getPropertiesList().forEach(n=>{if(this.hasOwnProperty(n)){const o=this[n];this.initializedProperties.set(n,o)}}),this._initShadowRoot()}_initShadowRoot(){const t=this.constructor;if(t._needsShadowDOM()){const e={mode:"open"};this.attachShadow({...e,...t.getMetadata().getShadowRootOptions()}),t.getMetadata().slotsAreManaged()&&this.shadowRoot.addEventListener("slotchange",this._onShadowRootSlotChange.bind(this))}}_onShadowRootSlotChange(t){t.target?.getRootNode()===this.shadowRoot&&this._processChildren()}get _id(){return this.__id||(this.__id=`ui5wc_${++nt}`),this.__id}render(){const t=this.constructor.template;return Y(t,this)}async connectedCallback(){const t=this.constructor;this.setAttribute(t.getMetadata().getPureTag(),""),t.getMetadata().supportsF6FastNavigation()&&this.setAttribute("data-sap-ui-fastnavgroup","true");const e=t.getMetadata().slotsAreManaged();this._inDOM=!0,e&&(this._startObservingDOMChildren(),await this._processChildren()),this._inDOM&&(k(this),this._domRefReadyPromise._deferredResolve(),this._fullyConnected=!0,this.onEnterDOM())}disconnectedCallback(){const e=this.constructor.getMetadata().slotsAreManaged();this._inDOM=!1,e&&this._stopObservingDOMChildren(),this._fullyConnected&&(this.onExitDOM(),this._fullyConnected=!1),this._domRefReadyPromise._deferredResolve(),j(this)}onBeforeRendering(){}onAfterRendering(){}onEnterDOM(){}onExitDOM(){}_startObservingDOMChildren(){const e=this.constructor.getMetadata();if(!e.hasSlots())return;const n=e.canSlotText(),o={childList:!0,subtree:n,characterData:n};H(this,this._processChildren.bind(this),o)}_stopObservingDOMChildren(){q(this)}async _processChildren(){this.constructor.getMetadata().hasSlots()&&await this._updateSlots()}async _updateSlots(){const t=this.constructor,e=t.getMetadata().getSlots(),s=t.getMetadata().canSlotText(),n=Array.from(s?this.childNodes:this.children),o=new Map,a=new Map;for(const[r,f]of Object.entries(e)){const c=f.propertyName||r;a.set(c,r),o.set(c,[...this._state[c]]),this._clearSlot(r,f)}const l=new Map,i=new Map,h=n.map(async(r,f)=>{const c=J(r),m=e[c];if(m===void 0){if(c!=="default"){const p=Object.keys(e).join(", ");console.warn(`Unknown slotName: ${c}, ignoring`,r,`Valid values are: ${p}`)}return}if(m.individualSlots){const p=(l.get(c)||0)+1;l.set(c,p),r._individualSlot=`${c}-${p}`}if(r instanceof HTMLElement){const p=r.localName;if(p.includes("-")&&!N(p)){if(!customElements.get(p)){const A=customElements.whenDefined(p);let E=P.get(p);E||(E=new Promise(O=>setTimeout(O,1e3)),P.set(p,E)),await Promise.race([A,E])}customElements.upgrade(r)}}if(r=t.getMetadata().constructor.validateSlotValue(r,m),v(r)&&m.invalidateOnChildChange){const p=this._getChildChangeListener(c);r.attachInvalidate.call(r,p)}r instanceof HTMLSlotElement&&this._attachSlotChange(r,c,!!m.invalidateOnChildChange);const C=m.propertyName||c;i.has(C)?i.get(C).push({child:r,idx:f}):i.set(C,[{child:r,idx:f}])});await Promise.all(h),i.forEach((r,f)=>{this._state[f]=r.sort((c,m)=>c.idx-m.idx).map(c=>c.child),this._state[g(f)]=this._state[f]});let _=!1;for(const[r,f]of Object.entries(e)){const c=f.propertyName||r;Q(o.get(c),this._state[c])||(y.call(this,{type:"slot",name:a.get(c),reason:"children"}),_=!0,t.getMetadata().isFormAssociated()&&R(this))}_||y.call(this,{type:"slot",name:"default",reason:"textcontent"})}_clearSlot(t,e){const s=e.propertyName||t;this._state[s].forEach(o=>{if(v(o)){const a=this._getChildChangeListener(t);o.detachInvalidate.call(o,a)}o instanceof HTMLSlotElement&&this._detachSlotChange(o,t)}),this._state[s]=[],this._state[g(s)]=this._state[s]}attachInvalidate(t){this._invalidationEventProvider.attachEvent("invalidate",t)}detachInvalidate(t){this._invalidationEventProvider.detachEvent("invalidate",t)}_onChildChange(t,e){this.constructor.getMetadata().shouldInvalidateOnChildChange(t,e.type,e.name)&&y.call(this,{type:"slot",name:t,reason:"childchange",child:e.target})}attributeChangedCallback(t,e,s){let n;if(this._doNotSyncAttributes.has(t))return;const o=this.constructor.getMetadata().getProperties(),a=t.replace(/^ui5-/,""),l=g(a);if(o.hasOwnProperty(l)){const i=o[l];n=(i.converter??D).fromAttribute(s,i.type),this[l]=n}}formAssociatedCallback(){this.constructor.getMetadata().isFormAssociated()&&Z(this)}static get formAssociated(){return this.getMetadata().isFormAssociated()}_updateAttribute(t,e){const s=this.constructor;if(!s.getMetadata().hasAttribute(t))return;const o=s.getMetadata().getProperties()[t],a=B(t),i=(o.converter||D).toAttribute(e,o.type);this._doNotSyncAttributes.add(a),i==null?this.removeAttribute(a):this.setAttribute(a,i),this._doNotSyncAttributes.delete(a)}_getChildChangeListener(t){return this._childChangeListeners.has(t)||this._childChangeListeners.set(t,this._onChildChange.bind(this,t)),this._childChangeListeners.get(t)}_getSlotChangeListener(t){return this._slotChangeListeners.has(t)||this._slotChangeListeners.set(t,this._onSlotChange.bind(this,t)),this._slotChangeListeners.get(t)}_attachSlotChange(t,e,s){const n=this._getSlotChangeListener(e);t.addEventListener("slotchange",o=>{if(n.call(t,o),s){const a=this._slotsAssignedNodes.get(t);a&&a.forEach(i=>{if(v(i)){const h=this._getChildChangeListener(e);i.detachInvalidate.call(i,h)}});const l=b([t]);this._slotsAssignedNodes.set(t,l),l.forEach(i=>{if(v(i)){const h=this._getChildChangeListener(e);i.attachInvalidate.call(i,h)}})}})}_detachSlotChange(t,e){t.removeEventListener("slotchange",this._getSlotChangeListener(e))}_onSlotChange(t){y.call(this,{type:"slot",name:t,reason:"slotchange"})}onInvalidation(t){}updateAttributes(){const e=this.constructor.getMetadata().getProperties();for(const[s,n]of Object.entries(e))this._updateAttribute(s,this[s])}_render(){const t=this.constructor,e=t.getMetadata().hasIndividualSlots();this.initializedProperties.size>0&&(Array.from(this.initializedProperties.entries()).forEach(([s,n])=>{delete this[s],this[s]=n}),this.initializedProperties.clear()),this._suppressInvalidation=!0;try{this.onBeforeRendering(),this._rendered||this.updateAttributes(),this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized")}finally{this._suppressInvalidation=!1}this._changedState=[],t._needsShadowDOM()&&F(this),this._rendered=!0,e&&this._assignIndividualSlotsToChildren(),this.onAfterRendering()}_assignIndividualSlotsToChildren(){Array.from(this.children).forEach(e=>{e._individualSlot&&e.setAttribute("slot",e._individualSlot)})}_waitForDomRef(){return this._domRefReadyPromise}getDomRef(){if(typeof this._getRealDomRef=="function")return this._getRealDomRef();if(!(!this.shadowRoot||this.shadowRoot.children.length===0))return this.shadowRoot.children[0]}getFocusDomRef(){const t=this.getDomRef();if(t)return t.querySelector("[data-sap-focus-ref]")||t}async getFocusDomRefAsync(){return await this._waitForDomRef(),this.getFocusDomRef()}async focus(t){await this._waitForDomRef();const e=this.getFocusDomRef();e===this?HTMLElement.prototype.focus.call(this,t):e&&typeof e.focus=="function"&&e.focus(t)}fireEvent(t,e,s=!1,n=!0){const o=this._fireEvent(t,e,s,n),a=G(t);return a!==t?o&&this._fireEvent(a,e,s,n):o}_fireEvent(t,e,s=!1,n=!0){const o=new CustomEvent(`ui5-${t}`,{detail:e,composed:!1,bubbles:n,cancelable:s}),a=this.dispatchEvent(o);if(W(t))return a;const l=new CustomEvent(t,{detail:e,composed:!1,bubbles:n,cancelable:s});return this.dispatchEvent(l)&&a}getSlottedNodes(t){return b(this[t])}attachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.attachEvent("componentStateFinalized",t)}detachComponentStateFinalized(t){this._componentStateFinalizedEventProvider.detachEvent("componentStateFinalized",t)}get effectiveDir(){return X(this.constructor),K(this)}get isUI5Element(){return!0}get classes(){return{}}get accessibilityInfo(){return{}}static get observedAttributes(){return this.getMetadata().getAttributesList()}static _needsShadowDOM(){return!!this.template||Object.prototype.hasOwnProperty.call(this.prototype,"render")}static _generateAccessors(){const t=this.prototype,e=this.getMetadata().slotsAreManaged(),s=this.getMetadata().getProperties();for(const[n,o]of Object.entries(s)){w(n)||console.warn(`"${n}" is not a valid property name. Use a name that does not collide with DOM APIs`);const a=st(t,n);let l;a?.set&&(l=a.set);let i;a?.get&&(i=a.get),Object.defineProperty(t,n,{get(){return i?i.call(this):this._state[n]},set(h){const _=this.constructor,r=i?i.call(this):this._state[n];r!==h&&(l?l.call(this,h):this._state[n]=h,y.call(this,{type:"property",name:n,newValue:h,oldValue:r}),this._rendered&&this._updateAttribute(n,h),_.getMetadata().isFormAssociated()&&R(this))}})}if(e){const n=this.getMetadata().getSlots();for(const[o,a]of Object.entries(n)){w(o)||console.warn(`"${o}" is not a valid property name. Use a name that does not collide with DOM APIs`);const l=a.propertyName||o,i={get(){return this._state[l]!==void 0?this._state[l]:[]},set(){throw new Error("Cannot set slot content directly, use the DOM APIs (appendChild, removeChild, etc...)")}};Object.defineProperty(t,l,i),l!==g(l)&&Object.defineProperty(t,g(l),i)}}}static{this.metadata={}}static{this.styles=""}static get dependencies(){return[]}static cacheUniqueDependencies(){const t=this.dependencies.filter((e,s,n)=>n.indexOf(e)===s);M.set(this,t)}static getUniqueDependencies(){return M.has(this)||this.cacheUniqueDependencies(),M.get(this)||[]}static whenDependenciesDefined(){return Promise.all(this.getUniqueDependencies().map(t=>t.define()))}static async onDefine(){return Promise.resolve()}static async define(){await T(),await Promise.all([this.whenDependenciesDefined(),this.onDefine()]);const t=this.getMetadata().getTag();this.getMetadata().getFeatures().forEach(o=>{tt(o)&&this.cacheUniqueDependencies(),et(o,this,this.cacheUniqueDependencies.bind(this))});const s=x(t),n=customElements.get(t);return n&&!s?z(t):n||(this._generateAccessors(),$(t),customElements.define(t,this)),this}static getMetadata(){if(this.hasOwnProperty("_metadata"))return this._metadata;const t=[this.metadata];let e=this;for(;e!==I;)e=Object.getPrototypeOf(e),t.unshift(e.metadata);const s=U({},...t);return this._metadata=new L(s),this._metadata}get validity(){return this._internals?.validity}get validationMessage(){return this._internals?.validationMessage}checkValidity(){return this._internals?.checkValidity()}reportValidity(){return this._internals?.reportValidity()}}const v=d=>"isUI5Element"in d;export default I;export{v as instanceOfUI5Element}; | ||
//# sourceMappingURL=UI5Element.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";const i=e=>{const t=document.querySelector(`META[name="${e}"]`);return t&&t.getAttribute("content")},o=e=>{const t=i("sap-allowedThemeOrigins");return t&&t.split(",").some(n=>n==="*"||e===n.trim())},s=(e,t)=>{const n=new URL(e).pathname;return new URL(n,t).toString()},a=e=>{let t;try{if(e.startsWith(".")||e.startsWith("/"))t=new URL(e,window.location.href).toString();else{const n=new URL(e),r=n.origin;r&&o(r)?t=n.toString():t=s(n.toString(),window.location.href)}return t.endsWith("/")||(t=`${t}/`),`${t}UI5/`}catch{}};export default a; | ||
"use strict";import{getLocationHref as i}from"./Location.js";const o=e=>{const t=document.querySelector(`META[name="${e}"]`);return t&&t.getAttribute("content")},s=e=>{const t=o("sap-allowedThemeOrigins");return t&&t.split(",").some(n=>n==="*"||e===n.trim())},a=(e,t)=>{const n=new URL(e).pathname;return new URL(n,t).toString()},g=e=>{let t;try{if(e.startsWith(".")||e.startsWith("/"))t=new URL(e,i()).toString();else{const n=new URL(e),r=n.origin;r&&s(r)?t=n.toString():t=a(n.toString(),i())}return t.endsWith("/")||(t=`${t}/`),`${t}UI5/`}catch{}};export default g; | ||
//# sourceMappingURL=validateThemeRoot.js.map |
@@ -0,1 +1,3 @@ | ||
import { getAllRegisteredTags } from "./CustomElementsRegistry.js"; | ||
import { getCustomElementsScopingRules, getCustomElementsScopingSuffix } from "./CustomElementsScopeUtils.js"; | ||
import VersionInfo from "./generated/VersionInfo.js"; | ||
@@ -21,2 +23,11 @@ import getSharedResource from "./getSharedResource.js"; | ||
...versionInfo, | ||
get scopingSuffix() { | ||
return getCustomElementsScopingSuffix(); | ||
}, | ||
get registeredTags() { | ||
return getAllRegisteredTags(); | ||
}, | ||
get scopingRules() { | ||
return getCustomElementsScopingRules(); | ||
}, | ||
alias: currentRuntimeAlias, | ||
@@ -23,0 +34,0 @@ description: `Runtime ${currentRuntimeIndex} - ver ${versionInfo.version}${currentRuntimeAlias ? ` (${currentRuntimeAlias})` : ""}`, |
@@ -495,12 +495,16 @@ // eslint-disable-next-line import/no-extraneous-dependencies | ||
} | ||
if (typeof newValue === "string" && propData.type && propData.type !== String) { | ||
// eslint-disable-next-line | ||
console.error(`[UI5-FWK] string value for property [${name}] of component [${tag}] which has a non-string type [${propData.type}] in its property decorator. Attribute conversion will stop and keep the string value in the property.`); | ||
} | ||
} | ||
const newAttrValue = converter.toAttribute(newValue, propData.type); | ||
this._doNotSyncAttributes.add(attrName); // skip the attributeChangedCallback call for this attribute | ||
if (newAttrValue === null || newAttrValue === undefined) { // null means there must be no attribute for the current value of the property | ||
this._doNotSyncAttributes.add(attrName); // skip the attributeChangedCallback call for this attribute | ||
this.removeAttribute(attrName); // remove the attribute safely (will not trigger synchronization to the property value due to the above line) | ||
this._doNotSyncAttributes.delete(attrName); // enable synchronization again for this attribute | ||
} | ||
else { | ||
this.setAttribute(attrName, newAttrValue); | ||
this.setAttribute(attrName, newAttrValue); // setting attributes from properties should not trigger the property setter again | ||
} | ||
this._doNotSyncAttributes.delete(attrName); // enable synchronization again for this attribute | ||
} | ||
@@ -633,11 +637,15 @@ /** | ||
this._suppressInvalidation = true; | ||
this.onBeforeRendering(); | ||
if (!this._rendered) { | ||
// first time rendering, previous setters might have been initializers from the constructor - update attributes here | ||
this.updateAttributes(); | ||
try { | ||
this.onBeforeRendering(); | ||
if (!this._rendered) { | ||
// first time rendering, previous setters might have been initializers from the constructor - update attributes here | ||
this.updateAttributes(); | ||
} | ||
// Intended for framework usage only. Currently ItemNavigation updates tab indexes after the component has updated its state but before the template is rendered | ||
this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized"); | ||
} | ||
// Intended for framework usage only. Currently ItemNavigation updates tab indexes after the component has updated its state but before the template is rendered | ||
this._componentStateFinalizedEventProvider.fireEvent("componentStateFinalized"); | ||
// resume normal invalidation handling | ||
this._suppressInvalidation = false; | ||
finally { | ||
// always resume normal invalidation handling | ||
this._suppressInvalidation = false; | ||
} | ||
// Update the shadow root with the render result | ||
@@ -644,0 +652,0 @@ /* |
@@ -0,1 +1,2 @@ | ||
import { getLocationHref } from "./Location.js"; | ||
const getMetaTagValue = (metaTagName) => { | ||
@@ -23,3 +24,3 @@ const metaTag = document.querySelector(`META[name="${metaTagName}"]`), metaTagContent = metaTag && metaTag.getAttribute("content"); | ||
// new URL("../newExmPath", "http://example.com/exmPath") => http://example.com/newExmPath | ||
resultUrl = new URL(themeRoot, window.location.href).toString(); | ||
resultUrl = new URL(themeRoot, getLocationHref()).toString(); | ||
} | ||
@@ -36,3 +37,3 @@ else { | ||
// with current location | ||
resultUrl = buildCorrectUrl(themeRootURL.toString(), window.location.href); | ||
resultUrl = buildCorrectUrl(themeRootURL.toString(), getLocationHref()); | ||
} | ||
@@ -39,0 +40,0 @@ } |
{ | ||
"name": "@ui5/webcomponents-base", | ||
"version": "2.1.1", | ||
"version": "2.2.0-rc.0", | ||
"description": "UI5 Web Components: webcomponents.base", | ||
@@ -46,2 +46,3 @@ "author": "SAP SE (https://www.sap.com)", | ||
"test": "nps test", | ||
"test:cypress:open": "nps test.test-cy-open", | ||
"prepublishOnly": "tsc -b" | ||
@@ -55,3 +56,3 @@ }, | ||
"@openui5/sap.ui.core": "1.120.17", | ||
"@ui5/webcomponents-tools": "2.1.1", | ||
"@ui5/webcomponents-tools": "2.2.0-rc.0", | ||
"chromedriver": "^126.0.0", | ||
@@ -67,3 +68,3 @@ "clean-css": "^5.2.2", | ||
}, | ||
"gitHead": "fc11d8831e60a1ae88e89affeeef2c9dd1937be0" | ||
"gitHead": "8955aa596143ba93da03d4e6cf2bd547993c59c2" | ||
} |
{ | ||
"include": ["src/**/*", "src/global.d.ts"], | ||
// ssr-dom is imported with bare specifier so that conditional exports are used, but this treats it as input and output, so ignore it | ||
"exclude": ["src/ssr-dom.ts"], | ||
"compilerOptions": { | ||
"target": "ES2021", | ||
"lib": ["DOM", "DOM.Iterable", "ES2023"], | ||
// Generate d.ts files | ||
"declaration": true, | ||
"outDir": "dist", | ||
"skipLibCheck": true, | ||
"sourceMap": true, | ||
"inlineSources": true, | ||
"strict": true, | ||
"moduleResolution": "node", | ||
"composite": true, | ||
"rootDir": "src", | ||
"tsBuildInfoFile": "dist/.tsbuildinfo", | ||
}, | ||
} | ||
"extends": "@ui5/webcomponents-tools/tsconfig.json", | ||
"include": [ | ||
"src/**/*", | ||
"src/global.d.ts", | ||
], | ||
// ssr-dom is imported with bare specifier so that conditional exports are used, but this treats it as input and output, so ignore it | ||
"exclude": [ | ||
"src/ssr-dom.ts", | ||
"src/generated/template/WithComplexTemplateTemplate.lit.ts" | ||
], | ||
"compilerOptions": { | ||
"types": ["@ui5/webcomponents-tools"], | ||
"outDir": "dist", | ||
"composite": true, | ||
"rootDir": "src", | ||
"experimentalDecorators": true, | ||
"tsBuildInfoFile": "dist/.tsbuildinfobuild", | ||
}, | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
850
28790
2487971
2