All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.prod.Boot.js.map Maven / Gradle / Ivy

{
  "version": 3,
  "sources": ["../../src/Boot.ts"],
  "sourcesContent": ["import whenDOMReady from \"./util/whenDOMReady.js\";\nimport EventProvider from \"./EventProvider.js\";\nimport insertFontFace from \"./FontFace.js\";\nimport insertSystemCSSVars from \"./SystemCSSVars.js\";\nimport { getTheme } from \"./config/Theme.js\";\nimport applyTheme from \"./theming/applyTheme.js\";\nimport { registerCurrentRuntime } from \"./Runtimes.js\";\nimport { getFeature } from \"./FeaturesRegistry.js\";\nimport type OpenUI5Support from \"./features/OpenUI5Support.js\";\nimport type F6Navigation from \"./features/F6Navigation.js\";\nimport type { PromiseResolve } from \"./types.js\";\nimport { attachThemeRegistered } from \"./theming/ThemeRegistered.js\";\n\nlet booted = false;\nlet bootPromise: Promise;\nconst eventProvider = new EventProvider();\n\nconst isBooted = (): boolean => {\n\treturn booted;\n};\n\n/**\n * Attaches a callback that will be executed after boot finishes.\n * **Note:** If the framework already booted, the callback will be immediately executed.\n * @public\n * @param { Function } listener\n */\nconst attachBoot = (listener: () => void) => {\n\tif (!booted) {\n\t\teventProvider.attachEvent(\"boot\", listener);\n\t\treturn;\n\t}\n\n\tlistener();\n};\n\nconst boot = async (): Promise => {\n\tif (bootPromise !== undefined) {\n\t\treturn bootPromise;\n\t}\n\n\tconst bootExecutor = async (resolve: PromiseResolve) => {\n\t\tregisterCurrentRuntime();\n\n\t\tif (typeof document === \"undefined\") {\n\t\t\tresolve();\n\t\t\treturn;\n\t\t}\n\n\t\tattachThemeRegistered(onThemeRegistered);\n\n\t\tconst openUI5Support = getFeature(\"OpenUI5Support\");\n\t\tconst isOpenUI5Loaded = openUI5Support ? openUI5Support.isOpenUI5Detected() : false;\n\t\tconst f6Navigation = getFeature(\"F6Navigation\");\n\n\t\tif (openUI5Support) {\n\t\t\tawait openUI5Support.init();\n\t\t}\n\n\t\tif (f6Navigation && !isOpenUI5Loaded) {\n\t\t\tf6Navigation.init();\n\t\t}\n\n\t\tawait whenDOMReady();\n\t\tawait applyTheme(getTheme());\n\t\topenUI5Support && openUI5Support.attachListeners();\n\t\tinsertFontFace();\n\t\tinsertSystemCSSVars();\n\n\t\tresolve();\n\n\t\tbooted = true;\n\t\tawait eventProvider.fireEventAsync(\"boot\");\n\t};\n\n\tbootPromise = new Promise(bootExecutor as (resolve: PromiseResolve) => void);\n\treturn bootPromise;\n};\n\n/**\n * Callback, executed after theme properties registration\n * to apply the newly registered theme.\n * @private\n * @param { string } theme\n */\nconst onThemeRegistered = (theme: string) => {\n\tif (booted && theme === getTheme()) { // getTheme should only be called if \"booted\" is true\n\t\tapplyTheme(getTheme());\n\t}\n};\n\nexport {\n\tboot,\n\tattachBoot,\n\tisBooted,\n};\n"],
  "mappings": "aAAA,OAAOA,MAAkB,yBACzB,OAAOC,MAAmB,qBAC1B,OAAOC,MAAoB,gBAC3B,OAAOC,MAAyB,qBAChC,OAAS,YAAAC,MAAgB,oBACzB,OAAOC,MAAgB,0BACvB,OAAS,0BAAAC,MAA8B,gBACvC,OAAS,cAAAC,MAAkB,wBAI3B,OAAS,yBAAAC,MAA6B,+BAEtC,IAAIC,EAAS,GACTC,EACJ,MAAMC,EAAgB,IAAIV,EAEpBW,EAAW,IACTH,EASFI,EAAcC,GAAyB,CAC5C,GAAI,CAACL,EAAQ,CACZE,EAAc,YAAY,OAAQG,CAAQ,EAC1C,MACD,CAEAA,EAAS,CACV,EAEMC,EAAO,SAA2B,CACvC,GAAIL,IAAgB,OACnB,OAAOA,EAGR,MAAMM,EAAe,MAAOC,GAA4B,CAGvD,GAFAX,EAAuB,EAEnB,OAAO,SAAa,IAAa,CACpCW,EAAQ,EACR,MACD,CAEAT,EAAsBU,CAAiB,EAEvC,MAAMC,EAAiBZ,EAAkC,gBAAgB,EACnEa,EAAkBD,EAAiBA,EAAe,kBAAkB,EAAI,GACxEE,EAAed,EAAgC,cAAc,EAE/DY,GACH,MAAMA,EAAe,KAAK,EAGvBE,GAAgB,CAACD,GACpBC,EAAa,KAAK,EAGnB,MAAMrB,EAAa,EACnB,MAAMK,EAAWD,EAAS,CAAC,EAC3Be,GAAkBA,EAAe,gBAAgB,EACjDjB,EAAe,EACfC,EAAoB,EAEpBc,EAAQ,EAERR,EAAS,GACT,MAAME,EAAc,eAAe,MAAM,CAC1C,EAEA,OAAAD,EAAc,IAAI,QAAQM,CAAiD,EACpEN,CACR,EAQMQ,EAAqBI,GAAkB,CACxCb,GAAUa,IAAUlB,EAAS,GAChCC,EAAWD,EAAS,CAAC,CAEvB,EAEA,OACCW,KAAA,KACAF,KAAA,WACAD,KAAA",
  "names": ["whenDOMReady", "EventProvider", "insertFontFace", "insertSystemCSSVars", "getTheme", "applyTheme", "registerCurrentRuntime", "getFeature", "attachThemeRegistered", "booted", "bootPromise", "eventProvider", "isBooted", "attachBoot", "listener", "boot", "bootExecutor", "resolve", "onThemeRegistered", "openUI5Support", "isOpenUI5Loaded", "f6Navigation", "theme"]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy