@ui5/webcomponents-base 2.15.5 → 2.15.6

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.
@@ -123,7 +123,8 @@ const registerLocaleDataLoader = (localeId, loader) => {
123
123
  };
124
124
  // register default loader for "en" from ui5 CDN (dev workflow without assets)
125
125
  registerLocaleDataLoader("en", async () => {
126
- const cldrContent = await fetch(`https://sdk.openui5.org/1.120.17/resources/sap/ui/core/cldr/en.json`);
126
+ console.warn(`[LocaleData] Falling back to loading "en" locale data from CDN.`, /* eslint-disable-line */ `For production usage, please configure locale data loading via the "Assets.js" module of the webcomponents package you are using.`); /* eslint-disable-line */
127
+ const cldrContent = await fetch(`https://cdn.jsdelivr.net/npm/@openui5/sap.ui.core@1.120.17/src/sap/ui/core/cldr/en.json`);
127
128
  return cldrContent.json();
128
129
  });
129
130
  // When the language changes dynamically (the user calls setLanguage),
@@ -1 +1 @@
1
- {"version":3,"file":"LocaleData.js","sourceRoot":"","sources":["../../src/asset-registries/LocaleData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMpD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAoB,CAAC;AAClD,MAAM,OAAO,GAAG,IAAI,GAAG,EAA4B,CAAC;AACpD,MAAM,YAAY,GAAG,IAAI,GAAG,EAA6B,CAAC;AAC1D,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;AACzC,IAAI,YAAY,GAAG,KAAK,CAAC;AAEzB,MAAM,mBAAmB,GAAG;IAC3B,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACV,CAAC;AAEF,MAAM,s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,EAAE,MAAwB,EAAE,EAAE;IAC/E,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,8EAA8E;AAC9E,wBAAwB,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE;IACzC,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACvG,OAAO,WAAW,CAAC,IAAI,EAAuB,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,sEAAsE;AACtE,mCAAmC;AACnC,oBAAoB,CAAC,GAAG,EAAE;IACzB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,OAAO,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;AAChF,CAAC,CAAC,CAAC;AAEH,OAAO,EACN,wBAAwB,EACxB,SAAS,EACT,aAAa,GACb,CAAC","sourcesContent":["import { attachLanguageChange } from \"../locale/languageChange.js\";\nimport getLocale from \"../locale/getLocale.js\";\nimport { DEFAULT_LOCALE, SUPPORTED_LOCALES } from \"../generated/AssetParameters.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\n\ntype LocaleDataLoader = (locale: string) => Promise<CLDRData>;\ntype CLDRData = Record<string, object | boolean | string>;\n\nconst localeDataMap = new Map<string, CLDRData>();\nconst loaders = new Map<string, LocaleDataLoader>();\nconst cldrPromises = new Map<string, Promise<CLDRData>>();\nconst reportedErrors = new Set<string>();\nlet warningShown = false;\n\nconst M_ISO639_OLD_TO_NEW = {\n\t\"iw\": \"he\",\n\t\"ji\": \"yi\",\n\t\"in\": \"id\",\n};\n\nconst _showAssetsWarningOnce = (localeId: string) => {\n\tif (warningShown) {\n\t\treturn;\n\t}\n\n\tconsole.warn(`[LocaleData] Supported locale \"${localeId}\" not configured, import the \"Assets.js\" module from the webcomponents package you are using.`); /* eslint-disable-line */\n\n\twarningShown = true;\n};\n\nconst calcLocale = (language: string, region: string, script: string) => {\n\t// normalize language and handle special cases\n\tlanguage = (language && M_ISO639_OLD_TO_NEW[language as keyof typeof M_ISO639_OLD_TO_NEW]) || language;\n\t// Special case 1: in an SAP context, the inclusive language code \"no\" always means Norwegian Bokmal (\"nb\")\n\tif (language === \"no\") {\n\t\tlanguage = \"nb\";\n\t}\n\t// Special case 2: for Chinese, derive a default region from the script (this behavior is inherited from Java)\n\tif (language === \"zh\" && !region) {\n\t\tif (script === \"Hans\") {\n\t\t\tregion = \"CN\";\n\t\t} else if (script === \"Hant\") {\n\t\t\tregion = \"TW\";\n\t\t}\n\t}\n\n\t// Special case 3: for Serbian, there are cyrillic and latin scripts, \"sh\" and \"sr-latn\" map to \"latin\", \"sr\" maps to cyrillic.\n\tif (language === \"sh\" || (language === \"sr\" && script === \"Latn\")) {\n\t\tlanguage = \"sr\";\n\t\tregion = \"Latn\";\n\t}\n\n\t// try language + region\n\tlet localeId = `${language}_${region}`;\n\tif (SUPPORTED_LOCALES.includes(localeId)) {\n\t\tif (loaders.has(localeId)) {\n\t\t\t// supported and has loader\n\t\t\treturn localeId;\n\t\t}\n\n\t\t// supported, no loader - fallback to default and warn\n\t\t_showAssetsWarningOnce(localeId);\n\t\treturn DEFAULT_LOCALE;\n\t}\n\n\t// not supported, try language only\n\tlocaleId = language;\n\tif (SUPPORTED_LOCALES.includes(localeId)) {\n\t\tif (loaders.has(localeId)) {\n\t\t\t// supported and has loader\n\t\t\treturn localeId;\n\t\t}\n\n\t\t// supported, no loader - fallback to default and warn\n\t\t_showAssetsWarningOnce(localeId);\n\t\treturn DEFAULT_LOCALE;\n\t}\n\n\t// not supported - fallback to default locale\n\treturn DEFAULT_LOCALE;\n};\n\n// internal set data\nconst setLocaleData = (localeId: string, content: CLDRData) => {\n\tlocaleDataMap.set(localeId, content);\n};\n\n// external getSync\nconst getLocaleData = (localeId: string) => {\n\t// if there is no loader, the default fallback was fetched and a warning was given - use default locale instead\n\tif (!loaders.has(localeId)) {\n\t\tlocaleId = DEFAULT_LOCALE;\n\t}\n\n\tconst content = localeDataMap.get(localeId);\n\tif (!content) {\n\t\tthrow new Error(`CLDR data for locale ${localeId} is not loaded!`);\n\t}\n\n\treturn content;\n};\n\n// load bundle over the network once\nconst _loadCldrOnce = (localeId: string) => {\n\tif (!cldrPromises.get(localeId)) {\n\t\tconst loadCldr = loaders.get(localeId);\n\n\t\tif (!loadCldr) {\n\t\t\tthrow new Error(`CLDR data for locale ${localeId} is not loaded!`);\n\t\t}\n\n\t\tcldrPromises.set(localeId, loadCldr(localeId));\n\t}\n\n\treturn cldrPromises.get(localeId);\n};\n\n// external getAsync\nconst fetchCldr = async (language: string, region: string, script: string) => {\n\tconst localeId = calcLocale(language, region, script);\n\n\t// reuse OpenUI5 CLDR if present\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support) {\n\t\tconst cldrContent = openUI5Support.getLocaleDataObject();\n\t\tif (cldrContent) {\n\t\t\t// only if openui5 actually returned valid content\n\t\t\tsetLocaleData(localeId, cldrContent);\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// fetch it\n\ttry {\n\t\tconst cldrContent = await _loadCldrOnce(localeId);\n\t\tsetLocaleData(localeId, cldrContent as CLDRData);\n\t} catch (error: unknown) {\n\t\tconst e = error as Error;\n\t\tif (!reportedErrors.has(e.message)) {\n\t\t\treportedErrors.add(e.message);\n\t\t\tconsole.error(e.message); /* eslint-disable-line */\n\t\t}\n\t}\n};\n\nconst registerLocaleDataLoader = (localeId: string, loader: LocaleDataLoader) => {\n\tloaders.set(localeId, loader);\n};\n\n// register default loader for \"en\" from ui5 CDN (dev workflow without assets)\nregisterLocaleDataLoader(\"en\", async () => {\n\tconst cldrContent = await fetch(`https://sdk.openui5.org/1.120.17/resources/sap/ui/core/cldr/en.json`);\n\treturn cldrContent.json() as Promise<CLDRData>;\n});\n\n// When the language changes dynamically (the user calls setLanguage),\n// re-fetch the required CDRD data.\nattachLanguageChange(() => {\n\tconst locale = getLocale();\n\treturn fetchCldr(locale.getLanguage(), locale.getRegion(), locale.getScript());\n});\n\nexport {\n\tregisterLocaleDataLoader,\n\tfetchCldr,\n\tgetLocaleData,\n};\n\nexport type {\n\tCLDRData,\n};\n"]}
1
+ {"version":3,"file":"LocaleData.js","sourceRoot":"","sources":["../../src/asset-registries/LocaleData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMpD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAoB,CAAC;AAClD,MAAM,OAAO,GAAG,IAAI,GAAG,EAA4B,CAAC;AACpD,MAAM,YAAY,GAAG,IAAI,GAAG,EAA6B,CAAC;AAC1D,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;AACzC,IAAI,YAAY,GAAG,KAAK,CAAC;AAEzB,MAAM,mBAAmB,GAAG;IAC3B,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACV,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,QAAgB,EAAE,EAAE;IACnD,IAAI,YAAY,EAAE,CAAC;QAClB,OAAO;IACR,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,kCAAkC,QAAQ,+FAA+F,CAAC,CAAC,CAAC,yBAAyB;IAElL,YAAY,GAAG,IAAI,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,MAAc,EAAE,MAAc,EAAE,EAAE;IACvE,8CAA8C;IAC9C,QAAQ,GAAG,CAAC,QAAQ,IAAI,mBAAmB,CAAC,QAA4C,CA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AAC;AAChD,CAAC,CAAC,CAAC;AAEH,sEAAsE;AACtE,mCAAmC;AACnC,oBAAoB,CAAC,GAAG,EAAE;IACzB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,OAAO,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;AAChF,CAAC,CAAC,CAAC;AAEH,OAAO,EACN,wBAAwB,EACxB,SAAS,EACT,aAAa,GACb,CAAC","sourcesContent":["import { attachLanguageChange } from \"../locale/languageChange.js\";\nimport getLocale from \"../locale/getLocale.js\";\nimport { DEFAULT_LOCALE, SUPPORTED_LOCALES } from \"../generated/AssetParameters.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\n\ntype LocaleDataLoader = (locale: string) => Promise<CLDRData>;\ntype CLDRData = Record<string, object | boolean | string>;\n\nconst localeDataMap = new Map<string, CLDRData>();\nconst loaders = new Map<string, LocaleDataLoader>();\nconst cldrPromises = new Map<string, Promise<CLDRData>>();\nconst reportedErrors = new Set<string>();\nlet warningShown = false;\n\nconst M_ISO639_OLD_TO_NEW = {\n\t\"iw\": \"he\",\n\t\"ji\": \"yi\",\n\t\"in\": \"id\",\n};\n\nconst _showAssetsWarningOnce = (localeId: string) => {\n\tif (warningShown) {\n\t\treturn;\n\t}\n\n\tconsole.warn(`[LocaleData] Supported locale \"${localeId}\" not configured, import the \"Assets.js\" module from the webcomponents package you are using.`); /* eslint-disable-line */\n\n\twarningShown = true;\n};\n\nconst calcLocale = (language: string, region: string, script: string) => {\n\t// normalize language and handle special cases\n\tlanguage = (language && M_ISO639_OLD_TO_NEW[language as keyof typeof M_ISO639_OLD_TO_NEW]) || language;\n\t// Special case 1: in an SAP context, the inclusive language code \"no\" always means Norwegian Bokmal (\"nb\")\n\tif (language === \"no\") {\n\t\tlanguage = \"nb\";\n\t}\n\t// Special case 2: for Chinese, derive a default region from the script (this behavior is inherited from Java)\n\tif (language === \"zh\" && !region) {\n\t\tif (script === \"Hans\") {\n\t\t\tregion = \"CN\";\n\t\t} else if (script === \"Hant\") {\n\t\t\tregion = \"TW\";\n\t\t}\n\t}\n\n\t// Special case 3: for Serbian, there are cyrillic and latin scripts, \"sh\" and \"sr-latn\" map to \"latin\", \"sr\" maps to cyrillic.\n\tif (language === \"sh\" || (language === \"sr\" && script === \"Latn\")) {\n\t\tlanguage = \"sr\";\n\t\tregion = \"Latn\";\n\t}\n\n\t// try language + region\n\tlet localeId = `${language}_${region}`;\n\tif (SUPPORTED_LOCALES.includes(localeId)) {\n\t\tif (loaders.has(localeId)) {\n\t\t\t// supported and has loader\n\t\t\treturn localeId;\n\t\t}\n\n\t\t// supported, no loader - fallback to default and warn\n\t\t_showAssetsWarningOnce(localeId);\n\t\treturn DEFAULT_LOCALE;\n\t}\n\n\t// not supported, try language only\n\tlocaleId = language;\n\tif (SUPPORTED_LOCALES.includes(localeId)) {\n\t\tif (loaders.has(localeId)) {\n\t\t\t// supported and has loader\n\t\t\treturn localeId;\n\t\t}\n\n\t\t// supported, no loader - fallback to default and warn\n\t\t_showAssetsWarningOnce(localeId);\n\t\treturn DEFAULT_LOCALE;\n\t}\n\n\t// not supported - fallback to default locale\n\treturn DEFAULT_LOCALE;\n};\n\n// internal set data\nconst setLocaleData = (localeId: string, content: CLDRData) => {\n\tlocaleDataMap.set(localeId, content);\n};\n\n// external getSync\nconst getLocaleData = (localeId: string) => {\n\t// if there is no loader, the default fallback was fetched and a warning was given - use default locale instead\n\tif (!loaders.has(localeId)) {\n\t\tlocaleId = DEFAULT_LOCALE;\n\t}\n\n\tconst content = localeDataMap.get(localeId);\n\tif (!content) {\n\t\tthrow new Error(`CLDR data for locale ${localeId} is not loaded!`);\n\t}\n\n\treturn content;\n};\n\n// load bundle over the network once\nconst _loadCldrOnce = (localeId: string) => {\n\tif (!cldrPromises.get(localeId)) {\n\t\tconst loadCldr = loaders.get(localeId);\n\n\t\tif (!loadCldr) {\n\t\t\tthrow new Error(`CLDR data for locale ${localeId} is not loaded!`);\n\t\t}\n\n\t\tcldrPromises.set(localeId, loadCldr(localeId));\n\t}\n\n\treturn cldrPromises.get(localeId);\n};\n\n// external getAsync\nconst fetchCldr = async (language: string, region: string, script: string) => {\n\tconst localeId = calcLocale(language, region, script);\n\n\t// reuse OpenUI5 CLDR if present\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support) {\n\t\tconst cldrContent = openUI5Support.getLocaleDataObject();\n\t\tif (cldrContent) {\n\t\t\t// only if openui5 actually returned valid content\n\t\t\tsetLocaleData(localeId, cldrContent);\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// fetch it\n\ttry {\n\t\tconst cldrContent = await _loadCldrOnce(localeId);\n\t\tsetLocaleData(localeId, cldrContent as CLDRData);\n\t} catch (error: unknown) {\n\t\tconst e = error as Error;\n\t\tif (!reportedErrors.has(e.message)) {\n\t\t\treportedErrors.add(e.message);\n\t\t\tconsole.error(e.message); /* eslint-disable-line */\n\t\t}\n\t}\n};\n\nconst registerLocaleDataLoader = (localeId: string, loader: LocaleDataLoader) => {\n\tloaders.set(localeId, loader);\n};\n\n// register default loader for \"en\" from ui5 CDN (dev workflow without assets)\nregisterLocaleDataLoader(\"en\", async () => {\n\tconsole.warn(`[LocaleData] Falling back to loading \"en\" locale data from CDN.`, /* eslint-disable-line */\n\t\t`For production usage, please configure locale data loading via the \"Assets.js\" module of the webcomponents package you are using.`); /* eslint-disable-line */\n\tconst cldrContent = await fetch(`https://cdn.jsdelivr.net/npm/@openui5/sap.ui.core@1.120.17/src/sap/ui/core/cldr/en.json`);\n\treturn cldrContent.json() as Promise<CLDRData>;\n});\n\n// When the language changes dynamically (the user calls setLanguage),\n// re-fetch the required CDRD data.\nattachLanguageChange(() => {\n\tconst locale = getLocale();\n\treturn fetchCldr(locale.getLanguage(), locale.getRegion(), locale.getScript());\n});\n\nexport {\n\tregisterLocaleDataLoader,\n\tfetchCldr,\n\tgetLocaleData,\n};\n\nexport type {\n\tCLDRData,\n};\n"]}
@@ -1081,103 +1081,103 @@
1081
1081
  },
1082
1082
  {
1083
1083
  "kind": "javascript-module",
1084
- "path": "dist/asset-registries/Icons.js",
1084
+ "path": "dist/config/AnimationMode.js",
1085
1085
  "declarations": [],
1086
1086
  "exports": []
1087
1087
  },
1088
1088
  {
1089
1089
  "kind": "javascript-module",
1090
- "path": "dist/asset-registries/Illustrations.js",
1090
+ "path": "dist/config/CalendarType.js",
1091
1091
  "declarations": [],
1092
1092
  "exports": []
1093
1093
  },
1094
1094
  {
1095
1095
  "kind": "javascript-module",
1096
- "path": "dist/asset-registries/LocaleData.js",
1096
+ "path": "dist/config/ConfigurationReset.js",
1097
1097
  "declarations": [],
1098
1098
  "exports": []
1099
1099
  },
1100
1100
  {
1101
1101
  "kind": "javascript-module",
1102
- "path": "dist/asset-registries/Themes.js",
1102
+ "path": "dist/config/Fonts.js",
1103
1103
  "declarations": [],
1104
1104
  "exports": []
1105
1105
  },
1106
1106
  {
1107
1107
  "kind": "javascript-module",
1108
- "path": "dist/asset-registries/i18n.js",
1108
+ "path": "dist/config/FormatSettings.js",
1109
1109
  "declarations": [],
1110
1110
  "exports": []
1111
1111
  },
1112
1112
  {
1113
1113
  "kind": "javascript-module",
1114
- "path": "dist/config/AnimationMode.js",
1114
+ "path": "dist/config/Icons.js",
1115
1115
  "declarations": [],
1116
1116
  "exports": []
1117
1117
  },
1118
1118
  {
1119
1119
  "kind": "javascript-module",
1120
- "path": "dist/config/CalendarType.js",
1120
+ "path": "dist/config/Language.js",
1121
1121
  "declarations": [],
1122
1122
  "exports": []
1123
1123
  },
1124
1124
  {
1125
1125
  "kind": "javascript-module",
1126
- "path": "dist/config/ConfigurationReset.js",
1126
+ "path": "dist/config/NoConflict.js",
1127
1127
  "declarations": [],
1128
1128
  "exports": []
1129
1129
  },
1130
1130
  {
1131
1131
  "kind": "javascript-module",
1132
- "path": "dist/config/Fonts.js",
1132
+ "path": "dist/config/Theme.js",
1133
1133
  "declarations": [],
1134
1134
  "exports": []
1135
1135
  },
1136
1136
  {
1137
1137
  "kind": "javascript-module",
1138
- "path": "dist/config/FormatSettings.js",
1138
+ "path": "dist/config/ThemeRoot.js",
1139
1139
  "declarations": [],
1140
1140
  "exports": []
1141
1141
  },
1142
1142
  {
1143
1143
  "kind": "javascript-module",
1144
- "path": "dist/config/Icons.js",
1144
+ "path": "dist/config/Timezone.js",
1145
1145
  "declarations": [],
1146
1146
  "exports": []
1147
1147
  },
1148
1148
  {
1149
1149
  "kind": "javascript-module",
1150
- "path": "dist/config/Language.js",
1150
+ "path": "dist/config/Tooltips.js",
1151
1151
  "declarations": [],
1152
1152
  "exports": []
1153
1153
  },
1154
1154
  {
1155
1155
  "kind": "javascript-module",
1156
- "path": "dist/config/NoConflict.js",
1156
+ "path": "dist/asset-registries/Icons.js",
1157
1157
  "declarations": [],
1158
1158
  "exports": []
1159
1159
  },
1160
1160
  {
1161
1161
  "kind": "javascript-module",
1162
- "path": "dist/config/Theme.js",
1162
+ "path": "dist/asset-registries/Illustrations.js",
1163
1163
  "declarations": [],
1164
1164
  "exports": []
1165
1165
  },
1166
1166
  {
1167
1167
  "kind": "javascript-module",
1168
- "path": "dist/config/ThemeRoot.js",
1168
+ "path": "dist/asset-registries/LocaleData.js",
1169
1169
  "declarations": [],
1170
1170
  "exports": []
1171
1171
  },
1172
1172
  {
1173
1173
  "kind": "javascript-module",
1174
- "path": "dist/config/Timezone.js",
1174
+ "path": "dist/asset-registries/Themes.js",
1175
1175
  "declarations": [],
1176
1176
  "exports": []
1177
1177
  },
1178
1178
  {
1179
1179
  "kind": "javascript-module",
1180
- "path": "dist/config/Tooltips.js",
1180
+ "path": "dist/asset-registries/i18n.js",
1181
1181
  "declarations": [],
1182
1182
  "exports": []
1183
1183
  },
@@ -1331,6 +1331,123 @@
1331
1331
  }
1332
1332
  ]
1333
1333
  },
1334
+ {
1335
+ "kind": "javascript-module",
1336
+ "path": "dist/features/F6Navigation.js",
1337
+ "declarations": [],
1338
+ "exports": [
1339
+ {
1340
+ "kind": "js",
1341
+ "name": "default",
1342
+ "declaration": {
1343
+ "name": "F6Navigation",
1344
+ "module": "dist/features/F6Navigation.js"
1345
+ }
1346
+ }
1347
+ ]
1348
+ },
1349
+ {
1350
+ "kind": "javascript-module",
1351
+ "path": "dist/features/InputElementsFormSupport.js",
1352
+ "declarations": [],
1353
+ "exports": []
1354
+ },
1355
+ {
1356
+ "kind": "javascript-module",
1357
+ "path": "dist/features/LegacyDateFormats.js",
1358
+ "declarations": [],
1359
+ "exports": [
1360
+ {
1361
+ "kind": "js",
1362
+ "name": "default",
1363
+ "declaration": {
1364
+ "name": "LegacyDateFormats",
1365
+ "module": "dist/features/LegacyDateFormats.js"
1366
+ }
1367
+ }
1368
+ ]
1369
+ },
1370
+ {
1371
+ "kind": "javascript-module",
1372
+ "path": "dist/features/OpenUI5Element.js",
1373
+ "declarations": [],
1374
+ "exports": [
1375
+ {
1376
+ "kind": "js",
1377
+ "name": "default",
1378
+ "declaration": {
1379
+ "name": "OpenUI5Element",
1380
+ "module": "dist/features/OpenUI5Element.js"
1381
+ }
1382
+ }
1383
+ ]
1384
+ },
1385
+ {
1386
+ "kind": "javascript-module",
1387
+ "path": "dist/features/OpenUI5Enablement.js",
1388
+ "declarations": [],
1389
+ "exports": [
1390
+ {
1391
+ "kind": "js",
1392
+ "name": "default",
1393
+ "declaration": {
1394
+ "name": "OpenUI5Enablement",
1395
+ "module": "dist/features/OpenUI5Enablement.js"
1396
+ }
1397
+ }
1398
+ ]
1399
+ },
1400
+ {
1401
+ "kind": "javascript-module",
1402
+ "path": "dist/features/OpenUI5Support.js",
1403
+ "declarations": [],
1404
+ "exports": [
1405
+ {
1406
+ "kind": "js",
1407
+ "name": "default",
1408
+ "declaration": {
1409
+ "name": "OpenUI5Support",
1410
+ "module": "dist/features/OpenUI5Support.js"
1411
+ }
1412
+ }
1413
+ ]
1414
+ },
1415
+ {
1416
+ "kind": "javascript-module",
1417
+ "path": "dist/features/insertOpenUI5PopupStyles.js",
1418
+ "declarations": [],
1419
+ "exports": [
1420
+ {
1421
+ "kind": "js",
1422
+ "name": "default",
1423
+ "declaration": {
1424
+ "name": "insertOpenUI5PopupStyles",
1425
+ "module": "dist/features/insertOpenUI5PopupStyles.js"
1426
+ }
1427
+ }
1428
+ ]
1429
+ },
1430
+ {
1431
+ "kind": "javascript-module",
1432
+ "path": "dist/features/patchPatcher.js",
1433
+ "declarations": [],
1434
+ "exports": [
1435
+ {
1436
+ "kind": "js",
1437
+ "name": "default",
1438
+ "declaration": {
1439
+ "name": "patchPatcher",
1440
+ "module": "dist/features/patchPatcher.js"
1441
+ }
1442
+ }
1443
+ ]
1444
+ },
1445
+ {
1446
+ "kind": "javascript-module",
1447
+ "path": "dist/features/patchPopup.js",
1448
+ "declarations": [],
1449
+ "exports": []
1450
+ },
1334
1451
  {
1335
1452
  "kind": "javascript-module",
1336
1453
  "path": "dist/delegate/ItemNavigation.js",
@@ -1514,123 +1631,6 @@
1514
1631
  }
1515
1632
  ]
1516
1633
  },
1517
- {
1518
- "kind": "javascript-module",
1519
- "path": "dist/features/F6Navigation.js",
1520
- "declarations": [],
1521
- "exports": [
1522
- {
1523
- "kind": "js",
1524
- "name": "default",
1525
- "declaration": {
1526
- "name": "F6Navigation",
1527
- "module": "dist/features/F6Navigation.js"
1528
- }
1529
- }
1530
- ]
1531
- },
1532
- {
1533
- "kind": "javascript-module",
1534
- "path": "dist/features/InputElementsFormSupport.js",
1535
- "declarations": [],
1536
- "exports": []
1537
- },
1538
- {
1539
- "kind": "javascript-module",
1540
- "path": "dist/features/LegacyDateFormats.js",
1541
- "declarations": [],
1542
- "exports": [
1543
- {
1544
- "kind": "js",
1545
- "name": "default",
1546
- "declaration": {
1547
- "name": "LegacyDateFormats",
1548
- "module": "dist/features/LegacyDateFormats.js"
1549
- }
1550
- }
1551
- ]
1552
- },
1553
- {
1554
- "kind": "javascript-module",
1555
- "path": "dist/features/OpenUI5Element.js",
1556
- "declarations": [],
1557
- "exports": [
1558
- {
1559
- "kind": "js",
1560
- "name": "default",
1561
- "declaration": {
1562
- "name": "OpenUI5Element",
1563
- "module": "dist/features/OpenUI5Element.js"
1564
- }
1565
- }
1566
- ]
1567
- },
1568
- {
1569
- "kind": "javascript-module",
1570
- "path": "dist/features/OpenUI5Enablement.js",
1571
- "declarations": [],
1572
- "exports": [
1573
- {
1574
- "kind": "js",
1575
- "name": "default",
1576
- "declaration": {
1577
- "name": "OpenUI5Enablement",
1578
- "module": "dist/features/OpenUI5Enablement.js"
1579
- }
1580
- }
1581
- ]
1582
- },
1583
- {
1584
- "kind": "javascript-module",
1585
- "path": "dist/features/OpenUI5Support.js",
1586
- "declarations": [],
1587
- "exports": [
1588
- {
1589
- "kind": "js",
1590
- "name": "default",
1591
- "declaration": {
1592
- "name": "OpenUI5Support",
1593
- "module": "dist/features/OpenUI5Support.js"
1594
- }
1595
- }
1596
- ]
1597
- },
1598
- {
1599
- "kind": "javascript-module",
1600
- "path": "dist/features/insertOpenUI5PopupStyles.js",
1601
- "declarations": [],
1602
- "exports": [
1603
- {
1604
- "kind": "js",
1605
- "name": "default",
1606
- "declaration": {
1607
- "name": "insertOpenUI5PopupStyles",
1608
- "module": "dist/features/insertOpenUI5PopupStyles.js"
1609
- }
1610
- }
1611
- ]
1612
- },
1613
- {
1614
- "kind": "javascript-module",
1615
- "path": "dist/features/patchPatcher.js",
1616
- "declarations": [],
1617
- "exports": [
1618
- {
1619
- "kind": "js",
1620
- "name": "default",
1621
- "declaration": {
1622
- "name": "patchPatcher",
1623
- "module": "dist/features/patchPatcher.js"
1624
- }
1625
- }
1626
- ]
1627
- },
1628
- {
1629
- "kind": "javascript-module",
1630
- "path": "dist/features/patchPopup.js",
1631
- "declarations": [],
1632
- "exports": []
1633
- },
1634
1634
  {
1635
1635
  "kind": "javascript-module",
1636
1636
  "path": "dist/locale/Locale.js",