@ui5/webcomponents-base 1.17.0-rc.2 → 1.17.2
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.
- package/CHANGELOG.md +25 -0
- package/README.md +1 -0
- package/dist/Device.d.ts +2 -1
- package/dist/Device.js +10 -1
- package/dist/Device.js.map +1 -1
- package/dist/api.json +1 -1
- package/dist/assets/Boot.92245bd0.js +9 -0
- package/dist/assets/bundle.esm.655114be.js +50 -0
- package/dist/assets/test/pages/{Boot.html.8a8f43af.js → Boot.html.b16d5c8d.js} +1 -1
- package/dist/assets/test/pages/{i18n.html.f24e0e47.js → i18n.html.1a8c26db.js} +1 -1
- package/dist/assets/test/pages/{i18n_texts.html.073f25ad.js → i18n_texts.html.df6f5742.js} +1 -1
- package/dist/connectToComponent.d.ts +9 -0
- package/dist/connectToComponent.js +59 -0
- package/dist/connectToComponent.js.map +1 -0
- package/dist/delegate/ItemNavigation.js +1 -1
- package/dist/delegate/ItemNavigation.js.map +1 -1
- package/dist/generated/VersionInfo.js +4 -4
- package/dist/test/pages/AllTestElements.html +2 -2
- package/dist/test/pages/Boot.html +2 -2
- package/dist/test/pages/Configuration.html +2 -2
- package/dist/test/pages/ConfigurationScript.html +2 -2
- package/dist/test/pages/WithComplexTemplate.html +2 -2
- package/dist/test/pages/i18n.html +3 -3
- package/dist/test/pages/i18n_texts.html +3 -3
- package/dist/theming/applyTheme.js +1 -2
- package/dist/theming/applyTheme.js.map +1 -1
- package/dist/types/CSSSize.d.ts +15 -0
- package/dist/types/CSSSize.js +18 -0
- package/dist/types/CSSSize.js.map +1 -0
- package/index.js +1 -1
- package/package.json +4 -4
- package/dist/assets/Boot.5010d1af.js +0 -9
- package/dist/assets/bundle.esm.3b91185c.js +0 -50
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectToComponent.js","sourceRoot":"","sources":["../src/connectToComponent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,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AAE;YAChE,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;gBACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,EAAc,CAAC;gBAChD,MAAM,KAAK,GAAG,CAAC,QAAQ,CAAC,cAAc,IAAI,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;gBAE3E,IAAI,KAAK,EAAE;oBACV,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;oBAClC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBACtB,cAAc,CAAC,IAAI,CAAC,CAAC;iBACrB;YACF,CAAC,EAAE,4BAA4B,CAAC,CAAC;YACjC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;SAC7B;QAED,OAAO;KACP;IAED,gDAAgD;IAChD,IAAI,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACvB,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAClC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;KACtB;IAED,8DAA8D;IAC9D,IAAI,eAAe,KAAK,WAAW,EAAE;QACpC,IAAI,eAAe,EAAE;YACpB,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;SAC9D;QACD,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACpD,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;KAClC;IAED,OAAO,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import type UI5Element from \"./UI5Element.js\";\nimport { renderDeferred } from \"./Render.js\";\nimport { Interval } from \"./types.js\";\n\nconst MISSING_ELEMENT_POLL_TIMEOUT = 500; // how often to poll for not-yet-in-DOM friend elements\nconst connections = new Map<string, HTMLElement>();\nconst intervals = new Map<string, Interval>();\n\ntype ConnectOptions = {\n\thost: UI5Element;\n\tpropName: string;\n\tonConnect?: (friend: HTMLElement) => void;\n\tonDisconnect?: (friend: HTMLElement) => void;\n}\n\nconst connectToComponent = (options: ConnectOptions): HTMLElement | undefined => {\n\tconst host = options.host;\n\tconst propName = options.propName;\n\tconst friend = host[propName as keyof typeof host] as HTMLElement | string | undefined;\n\n\tlet connectedTo: HTMLElement | undefined;\n\tif (friend === undefined || friend === \"\") {\n\t\tconnectedTo = undefined; // do not return early even if a \"menu\" property is not set - it may have been set before and cleanup must run\n\t} else if (friend instanceof HTMLElement) {\n\t\tconnectedTo = friend;\n\t} else {\n\t\tconst rootNode = host.getRootNode() as Document;\n\t\tconnectedTo = (rootNode.getElementById && rootNode.getElementById(friend)) || undefined;\n\t}\n\n\tconst key = `${host._id}-${propName}`;\n\tconst prevConnectedTo = connections.get(key);\n\n\t// Not connected - return undefined\n\tif (!connectedTo) {\n\t\tif (prevConnectedTo) { // but first disconnect, if needed\n\t\t\toptions.onDisconnect && options.onDisconnect(prevConnectedTo);\n\t\t\tconnections.delete(key);\n\t\t}\n\n\t\t// if friend element not in DOM yet, start polling\n\t\tif (typeof friend === \"string\" && friend && !intervals.has(key)) {\n\t\t\tconst interval = setInterval(() => {\n\t\t\t\tconst rootNode = host.getRootNode() as Document;\n\t\t\t\tconst found = (rootNode.getElementById && rootNode.getElementById(friend));\n\n\t\t\t\tif (found) {\n\t\t\t\t\tclearInterval(intervals.get(key));\n\t\t\t\t\tintervals.delete(key);\n\t\t\t\t\trenderDeferred(host);\n\t\t\t\t}\n\t\t\t}, MISSING_ELEMENT_POLL_TIMEOUT);\n\t\t\tintervals.set(key, interval);\n\t\t}\n\n\t\treturn;\n\t}\n\n\t// If connected, but still polling, stop polling\n\tif (intervals.has(key)) {\n\t\tclearInterval(intervals.get(key));\n\t\tintervals.delete(key);\n\t}\n\n\t// Connected - either for the first time, or to something else\n\tif (prevConnectedTo !== connectedTo) {\n\t\tif (prevConnectedTo) {\n\t\t\toptions.onDisconnect && options.onDisconnect(prevConnectedTo);\n\t\t}\n\t\toptions.onConnect && options.onConnect(connectedTo);\n\t\tconnections.set(key, connectedTo);\n\t}\n\n\treturn connections.get(key);\n};\n\nexport default connectToComponent;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemNavigation.js","sourceRoot":"","sources":["../../src/delegate/ItemNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GACR,MAAM,YAAY,CAAC;AACpB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAE3D,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,sBAAsB,MAAM,oCAAoC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAiBxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,cAAc;IAiBnB;;;;;;;;;;;;;OAaG;IACH,YAAY,gBAA4B,EAAE,OAA8B;QACvE,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;SACzE;QAED,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9E,IAAI,CAAC,gBAAgB,CAAC,0BAA0B,GAAG,GAAG,EAAE;YACvD,IAAI,CAAC,KAAK,EAAE,CAAC;QACd,CAAC,CAAC;QAEF,IAAI,OAAO,OAAO,CAAC,gBAAgB,KAAK,UAAU,EAAE;YACnD,MAAM,IAAI,KAAK,CAAC,8BA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C,aAAa,CAAC,IAAI,WAAW,CAAC,EAAE,EAAE,CAAgB,CAAC;SAC5E;IACF,CAAC;CACD;AAED,eAAe,cAAc,CAAC","sourcesContent":["import {\n\tisDown,\n\tisUp,\n\tisLeft,\n\tisRight,\n\tisHome,\n\tisEnd,\n\tisPageDown,\n\tisPageUp,\n} from \"../Keys.js\";\nimport getActiveElement from \"../util/getActiveElement.js\";\n\nimport NavigationMode from \"../types/NavigationMode.js\";\nimport ItemNavigationBehavior from \"../types/ItemNavigationBehavior.js\";\n\nimport type UI5Element from \"../UI5Element.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\n\ninterface ITabbable {\n\tid: string,\n\t_tabIndex: string,\n}\n\ntype ItemNavigationOptions = {\n\tcurrentIndex?: number,\n\tnavigationMode?: NavigationMode,\n\trowSize?: number\n\tskipItemsSize?: number,\n\tbehavior?: ItemNavigationBehavior,\n\tgetItemsCallback: () => Array<ITabbable>,\n\taffectedPropertiesNames?: Array<string>,\n};\n\n/**\n * The ItemNavigation class manages the calculations to determine the correct \"tabindex\" for a group of related items inside a root component.\n * Important: ItemNavigation only does the calculations and does not change \"tabindex\" directly, this is a responsibility of the developer.\n *\n * The keys that trigger ItemNavigation are:\n * - Up/down\n * - Left/right\n * - Home/End\n *\n * Usage:\n * 1) Use the \"getItemsCallback\" constructor property to pass a callback to ItemNavigation, which, whenever called, will return the list of items to navigate among.\n *\n * Each item passed to ItemNavigation via \"getItemsCallback\" must be:\n * - A) either a UI5Element with a \"_tabIndex\" property\n * - B) or an Object with \"id\" and \"_tabIndex\" properties which represents a part of the root component's shadow DOM.\n * The \"id\" must be a valid ID within the shadow root of the component ItemNavigation operates on.\n * This object must not be a DOM object because, as said, ItemNavigation will not set \"tabindex\" on it. It must be a representation of a DOM object only\n * and the developer has the responsibility to update the \"tabindex\" in the component's DOM.\n * - C) a combination of the above\n *\n * Whenever the user navigates with the keyboard, ItemNavigation will modify the \"_tabIndex\" properties of the items.\n * It is the items' responsibilities to re-render themselves and apply the correct value of \"tabindex\" (i.e. to map the \"_tabIndex\" ItemNavigation set to them to the \"tabindex\" property).\n * If the items of the ItemNavigation are UI5Elements themselves, this can happen naturally since they will be invalidated by their \"_tabIndex\" property.\n * If the items are Objects with \"id\" and \"_tabIndex\" however, it is the developer's responsibility to apply these and the easiest way is to have the root component invalidated by ItemNavigation.\n * To do so, set the \"affectedPropertiesNames\" constructor property to point to one or more of the root component's properties that need refreshing when \"_tabIndex\" is changed deeply.\n *\n * 2) Call the \"setCurrentItem\" method of ItemNavigation whenever you want to change the current item.\n * This is most commonly required if the user for example clicks on an item and thus selects it directly.\n * Pass as the only argument to \"setCurrentItem\" the item that becomes current (must be one of the items, returned by \"getItemsCallback\").\n *\n * @class\n * @public\n */\nclass ItemNavigation {\n\trootWebComponent: UI5Element;\n\n\t_getItems: () => Array<ITabbable>;\n\n\t_currentIndex: number;\n\n\t_rowSize: number;\n\n\t_behavior: ItemNavigationBehavior;\n\n\t_navigationMode: NavigationMode;\n\n\t_affectedPropertiesNames: Array<string>;\n\n\t_skipItemsSize: number | null;\n\n\t/**\n\t *\n\t * @param rootWebComponent the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n\t * @param {ItemNavigationOptions} options Object with configuration options:\n\t * - currentIndex: the index of the item that will be initially selected (from which navigation will begin)\n\t * - navigationMode (Auto|Horizontal|Vertical): whether the items are displayed horizontally (Horizontal), vertically (Vertical) or as a matrix (Auto) meaning the user can navigate in both directions (up/down and left/right)\n\t * - rowSize: tells how many items per row there are when the items are not rendered as a flat list but rather as a matrix. Relevant for navigationMode=Auto\n\t * \t- skipItemsSize: tells how many items upon PAGE_UP and PAGE_DOWN should be skipped to applying the focus on the next item\n\t * - behavior (Static|Cycling): tells what to do when trying to navigate beyond the first and last items\n\t * Static means that nothing happens if the user tries to navigate beyond the first/last item.\n\t * Cycling means that when the user navigates beyond the last item they go to the first and vice versa.\n\t * - getItemsCallback: function that, when called, returns an array with all items the user can navigate among\n\t * - affectedPropertiesNames: a list of metadata properties on the root component which, upon user navigation, will be reassigned by address thus causing the root component to invalidate\n\t */\n\tconstructor(rootWebComponent: UI5Element, options: ItemNavigationOptions) {\n\t\tif (!rootWebComponent.isUI5Element) {\n\t\t\tthrow new Error(\"The root web component must be a UI5 Element instance\");\n\t\t}\n\n\t\tthis.rootWebComponent = rootWebComponent;\n\t\tthis.rootWebComponent.addEventListener(\"keydown\", this._onkeydown.bind(this));\n\t\tthis.rootWebComponent._onComponentStateFinalized = () => {\n\t\t\tthis._init();\n\t\t};\n\n\t\tif (typeof options.getItemsCallback !== \"function\") {\n\t\t\tthrow new Error(\"getItemsCallback is required\");\n\t\t}\n\n\t\tthis._getItems = options.getItemsCallback;\n\t\tthis._currentIndex = options.currentIndex || 0;\n\t\tthis._rowSize = options.rowSize || 1;\n\t\tthis._behavior = options.behavior || ItemNavigationBehavior.Static;\n\t\tthis._navigationMode = options.navigationMode || NavigationMode.Auto;\n\t\tthis._affectedPropertiesNames = options.affectedPropertiesNames || [];\n\t\tthis._skipItemsSize = options.skipItemsSize || null;\n\t}\n\n\t/**\n\t * Call this method to set a new \"current\" (selected) item in the item navigation\n\t * Note: the item passed to this function must be one of the items, returned by the getItemsCallback function\n\t *\n\t * @public\n\t * @param current the new selected item\n\t */\n\tsetCurrentItem(current: ITabbable) {\n\t\tconst currentItemIndex = this._getItems().indexOf(current);\n\n\t\tif (currentItemIndex === -1) {\n\t\t\tconsole.warn(`The provided item is not managed by ItemNavigation`, current); // eslint-disable-line\n\t\t\treturn;\n\t\t}\n\n\t\tthis._currentIndex = currentItemIndex;\n\t\tthis._applyTabIndex();\n\t}\n\n\t/**\n\t * Call this method to dynamically change the row size\n\t *\n\t * @public\n\t * @param newRowSize\n\t */\n\tsetRowSize(newRowSize: number) {\n\t\tthis._rowSize = newRowSize;\n\t}\n\n\t_init() {\n\t\tthis._getItems().forEach((item, idx) => {\n\t\t\titem._tabIndex = (idx === this._currentIndex) ? \"0\" : \"-1\";\n\t\t});\n\t}\n\n\t_onkeydown(event: KeyboardEvent) {\n\t\tif (!this._canNavigate()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst horizontalNavigationOn = this._navigationMode === NavigationMode.Horizontal || this._navigationMode === NavigationMode.Auto;\n\t\tconst verticalNavigationOn = this._navigationMode === NavigationMode.Vertical || this._navigationMode === NavigationMode.Auto;\n\t\tconst isRTL = this.rootWebComponent.effectiveDir === \"rtl\";\n\n\t\tif (isRTL && isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isRTL && isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isUp(event) && verticalNavigationOn) {\n\t\t\tthis._handleUp();\n\t\t} else if (isDown(event) && verticalNavigationOn) {\n\t\t\tthis._handleDown();\n\t\t} else if (isHome(event)) {\n\t\t\tthis._handleHome();\n\t\t} else if (isEnd(event)) {\n\t\t\tthis._handleEnd();\n\t\t} else if (isPageUp(event)) {\n\t\t\tthis._handlePageUp();\n\t\t} else if (isPageDown(event)) {\n\t\t\tthis._handlePageDown();\n\t\t} else {\n\t\t\treturn; // if none of the supported keys is pressed, we don't want to prevent the event or update the item navigation\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis._applyTabIndex();\n\t\tthis._focusCurrentItem();\n\t}\n\n\t_handleUp() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex - this._rowSize >= 0) { // no border reached, just decrease the index by a row\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **last** item in the **previous** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize;\n\t\t\tconst firstItemInPreviousColumnIndex = firstItemInThisColumnIndex === 0 ? this._rowSize - 1 : firstItemInThisColumnIndex - 1; // find the first item in the previous column (if the current column is the first column -> move to the last column)\n\t\t\tconst rows = Math.ceil(itemsLength / this._rowSize); // how many rows there are (even if incomplete, f.e. for 14 items and _rowSize=4 -> 4 rows total, although only 2 items on the last row)\n\t\t\tlet lastItemInPreviousColumnIndex = firstItemInPreviousColumnIndex + (rows - 1) * this._rowSize; // multiply rows by columns, and add the column's first item's index\n\t\t\tif (lastItemInPreviousColumnIndex > itemsLength - 1) { // for incomplete rows, use the previous row's last item, as for them the last item is missing\n\t\t\t\tlastItemInPreviousColumnIndex -= this._rowSize;\n\t\t\t}\n\t\t\tthis._currentIndex = lastItemInPreviousColumnIndex;\n\t\t} else { // not cyclic, so just go to the first item\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleDown() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex + this._rowSize < itemsLength) { // no border reached, just increase the index by a row\n\t\t\tthis._currentIndex += this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **first** item in the **next** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize; // find the first item in the current column first\n\t\t\tconst firstItemInNextColumnIndex = (firstItemInThisColumnIndex + 1) % this._rowSize; // to get the first item in the next column, just increase the index by 1. The modulo by rows is for the case when we are at the last column\n\t\t\tthis._currentIndex = firstItemInNextColumnIndex;\n\t\t} else { // not cyclic, so just go to the last item\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleLeft() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex > 0) {\n\t\t\tthis._currentIndex -= 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleRight() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex < itemsLength - 1) {\n\t\t\tthis._currentIndex += 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleHome() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex -= this._currentIndex % homeEndRange;\n\t}\n\n\t_handleEnd() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex += (homeEndRange - 1 - this._currentIndex % homeEndRange); // eslint-disable-line\n\t}\n\n\t_handlePageUp() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageUpFlat();\n\t}\n\n\t_handlePageDown() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageDownFlat();\n\t}\n\n\t/**\n\t * Handles PAGE_UP in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageUpFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._currentIndex + 1 > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items to the top,\n\t\t\t// move the focus up/left with the predefined number.\n\t\t\tthis._currentIndex -= this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t}\n\t}\n\n\t/**\n\t * Handles PAGE_DOWN in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageDownFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentToEndRange = this._getItems().length - this._currentIndex - 1;\n\n\t\tif (currentToEndRange > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items until the bottom,\n\t\t\t// move the focus down/right with the predefined number.\n\t\t\tthis._currentIndex += this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t}\n\t}\n\n\t_applyTabIndex() {\n\t\tconst items = this._getItems();\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i]._tabIndex = i === this._currentIndex ? \"0\" : \"-1\";\n\t\t}\n\n\t\tthis._affectedPropertiesNames.forEach(propName => {\n\t\t\tconst prop = (this.rootWebComponent as Record<string, any>)[propName];\n\t\t\t(this.rootWebComponent as Record<string, any>)[propName] = Array.isArray(prop) ? [...prop] : { ...prop };\n\t\t});\n\t}\n\n\t_focusCurrentItem() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tif (currentItem) {\n\t\t\tcurrentItem.focus();\n\t\t}\n\t}\n\n\t_canNavigate() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tconst activeElement = getActiveElement();\n\n\t\treturn currentItem && currentItem === activeElement;\n\t}\n\n\t_getCurrentItem() {\n\t\tconst items = this._getItems();\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\t// normalize the index\n\t\twhile (this._currentIndex >= items.length) {\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t}\n\n\t\tif (this._currentIndex < 0) {\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\n\t\tconst currentItem = items[this._currentIndex];\n\n\t\tif (!currentItem) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (instanceOfUI5Element(currentItem)) {\n\t\t\treturn currentItem.getFocusDomRef();\n\t\t}\n\n\t\tconst currentItemDOMRef = this.rootWebComponent.getDomRef();\n\t\tif (!currentItemDOMRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (currentItem.id) {\n\t\t\treturn currentItemDOMRef.querySelector(`#${currentItem.id}`) as HTMLElement;\n\t\t}\n\t}\n}\n\nexport default ItemNavigation;\n\nexport {\n\tITabbable,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ItemNavigation.js","sourceRoot":"","sources":["../../src/delegate/ItemNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GACR,MAAM,YAAY,CAAC;AACpB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAE3D,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,sBAAsB,MAAM,oCAAoC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAiBxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,cAAc;IAiBnB;;;;;;;;;;;;;OAaG;IACH,YAAY,gBAA4B,EAAE,OAA8B;QACvE,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;SACzE;QAED,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9E,IAAI,CAAC,gBAAgB,CAAC,0BAA0B,GAAG,GAAG,EAAE;YACvD,IAAI,CAAC,KAAK,EAAE,CAAC;QACd,CAAC,CAAC;QAEF,IAAI,OAAO,OAAO,CAAC,gBAAgB,KAAK,UAAU,EAAE;YACnD,MAAM,IAAI,KAAK,CAAC,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CAAC,aAAa,CAAC,QAAQ,WAAW,CAAC,EAAE,IAAI,CAAgB,CAAC;SAClF;IACF,CAAC;CACD;AAED,eAAe,cAAc,CAAC","sourcesContent":["import {\n\tisDown,\n\tisUp,\n\tisLeft,\n\tisRight,\n\tisHome,\n\tisEnd,\n\tisPageDown,\n\tisPageUp,\n} from \"../Keys.js\";\nimport getActiveElement from \"../util/getActiveElement.js\";\n\nimport NavigationMode from \"../types/NavigationMode.js\";\nimport ItemNavigationBehavior from \"../types/ItemNavigationBehavior.js\";\n\nimport type UI5Element from \"../UI5Element.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\n\ninterface ITabbable {\n\tid: string,\n\t_tabIndex: string,\n}\n\ntype ItemNavigationOptions = {\n\tcurrentIndex?: number,\n\tnavigationMode?: NavigationMode,\n\trowSize?: number\n\tskipItemsSize?: number,\n\tbehavior?: ItemNavigationBehavior,\n\tgetItemsCallback: () => Array<ITabbable>,\n\taffectedPropertiesNames?: Array<string>,\n};\n\n/**\n * The ItemNavigation class manages the calculations to determine the correct \"tabindex\" for a group of related items inside a root component.\n * Important: ItemNavigation only does the calculations and does not change \"tabindex\" directly, this is a responsibility of the developer.\n *\n * The keys that trigger ItemNavigation are:\n * - Up/down\n * - Left/right\n * - Home/End\n *\n * Usage:\n * 1) Use the \"getItemsCallback\" constructor property to pass a callback to ItemNavigation, which, whenever called, will return the list of items to navigate among.\n *\n * Each item passed to ItemNavigation via \"getItemsCallback\" must be:\n * - A) either a UI5Element with a \"_tabIndex\" property\n * - B) or an Object with \"id\" and \"_tabIndex\" properties which represents a part of the root component's shadow DOM.\n * The \"id\" must be a valid ID within the shadow root of the component ItemNavigation operates on.\n * This object must not be a DOM object because, as said, ItemNavigation will not set \"tabindex\" on it. It must be a representation of a DOM object only\n * and the developer has the responsibility to update the \"tabindex\" in the component's DOM.\n * - C) a combination of the above\n *\n * Whenever the user navigates with the keyboard, ItemNavigation will modify the \"_tabIndex\" properties of the items.\n * It is the items' responsibilities to re-render themselves and apply the correct value of \"tabindex\" (i.e. to map the \"_tabIndex\" ItemNavigation set to them to the \"tabindex\" property).\n * If the items of the ItemNavigation are UI5Elements themselves, this can happen naturally since they will be invalidated by their \"_tabIndex\" property.\n * If the items are Objects with \"id\" and \"_tabIndex\" however, it is the developer's responsibility to apply these and the easiest way is to have the root component invalidated by ItemNavigation.\n * To do so, set the \"affectedPropertiesNames\" constructor property to point to one or more of the root component's properties that need refreshing when \"_tabIndex\" is changed deeply.\n *\n * 2) Call the \"setCurrentItem\" method of ItemNavigation whenever you want to change the current item.\n * This is most commonly required if the user for example clicks on an item and thus selects it directly.\n * Pass as the only argument to \"setCurrentItem\" the item that becomes current (must be one of the items, returned by \"getItemsCallback\").\n *\n * @class\n * @public\n */\nclass ItemNavigation {\n\trootWebComponent: UI5Element;\n\n\t_getItems: () => Array<ITabbable>;\n\n\t_currentIndex: number;\n\n\t_rowSize: number;\n\n\t_behavior: ItemNavigationBehavior;\n\n\t_navigationMode: NavigationMode;\n\n\t_affectedPropertiesNames: Array<string>;\n\n\t_skipItemsSize: number | null;\n\n\t/**\n\t *\n\t * @param rootWebComponent the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n\t * @param {ItemNavigationOptions} options Object with configuration options:\n\t * - currentIndex: the index of the item that will be initially selected (from which navigation will begin)\n\t * - navigationMode (Auto|Horizontal|Vertical): whether the items are displayed horizontally (Horizontal), vertically (Vertical) or as a matrix (Auto) meaning the user can navigate in both directions (up/down and left/right)\n\t * - rowSize: tells how many items per row there are when the items are not rendered as a flat list but rather as a matrix. Relevant for navigationMode=Auto\n\t * \t- skipItemsSize: tells how many items upon PAGE_UP and PAGE_DOWN should be skipped to applying the focus on the next item\n\t * - behavior (Static|Cycling): tells what to do when trying to navigate beyond the first and last items\n\t * Static means that nothing happens if the user tries to navigate beyond the first/last item.\n\t * Cycling means that when the user navigates beyond the last item they go to the first and vice versa.\n\t * - getItemsCallback: function that, when called, returns an array with all items the user can navigate among\n\t * - affectedPropertiesNames: a list of metadata properties on the root component which, upon user navigation, will be reassigned by address thus causing the root component to invalidate\n\t */\n\tconstructor(rootWebComponent: UI5Element, options: ItemNavigationOptions) {\n\t\tif (!rootWebComponent.isUI5Element) {\n\t\t\tthrow new Error(\"The root web component must be a UI5 Element instance\");\n\t\t}\n\n\t\tthis.rootWebComponent = rootWebComponent;\n\t\tthis.rootWebComponent.addEventListener(\"keydown\", this._onkeydown.bind(this));\n\t\tthis.rootWebComponent._onComponentStateFinalized = () => {\n\t\t\tthis._init();\n\t\t};\n\n\t\tif (typeof options.getItemsCallback !== \"function\") {\n\t\t\tthrow new Error(\"getItemsCallback is required\");\n\t\t}\n\n\t\tthis._getItems = options.getItemsCallback;\n\t\tthis._currentIndex = options.currentIndex || 0;\n\t\tthis._rowSize = options.rowSize || 1;\n\t\tthis._behavior = options.behavior || ItemNavigationBehavior.Static;\n\t\tthis._navigationMode = options.navigationMode || NavigationMode.Auto;\n\t\tthis._affectedPropertiesNames = options.affectedPropertiesNames || [];\n\t\tthis._skipItemsSize = options.skipItemsSize || null;\n\t}\n\n\t/**\n\t * Call this method to set a new \"current\" (selected) item in the item navigation\n\t * Note: the item passed to this function must be one of the items, returned by the getItemsCallback function\n\t *\n\t * @public\n\t * @param current the new selected item\n\t */\n\tsetCurrentItem(current: ITabbable) {\n\t\tconst currentItemIndex = this._getItems().indexOf(current);\n\n\t\tif (currentItemIndex === -1) {\n\t\t\tconsole.warn(`The provided item is not managed by ItemNavigation`, current); // eslint-disable-line\n\t\t\treturn;\n\t\t}\n\n\t\tthis._currentIndex = currentItemIndex;\n\t\tthis._applyTabIndex();\n\t}\n\n\t/**\n\t * Call this method to dynamically change the row size\n\t *\n\t * @public\n\t * @param newRowSize\n\t */\n\tsetRowSize(newRowSize: number) {\n\t\tthis._rowSize = newRowSize;\n\t}\n\n\t_init() {\n\t\tthis._getItems().forEach((item, idx) => {\n\t\t\titem._tabIndex = (idx === this._currentIndex) ? \"0\" : \"-1\";\n\t\t});\n\t}\n\n\t_onkeydown(event: KeyboardEvent) {\n\t\tif (!this._canNavigate()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst horizontalNavigationOn = this._navigationMode === NavigationMode.Horizontal || this._navigationMode === NavigationMode.Auto;\n\t\tconst verticalNavigationOn = this._navigationMode === NavigationMode.Vertical || this._navigationMode === NavigationMode.Auto;\n\t\tconst isRTL = this.rootWebComponent.effectiveDir === \"rtl\";\n\n\t\tif (isRTL && isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isRTL && isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isUp(event) && verticalNavigationOn) {\n\t\t\tthis._handleUp();\n\t\t} else if (isDown(event) && verticalNavigationOn) {\n\t\t\tthis._handleDown();\n\t\t} else if (isHome(event)) {\n\t\t\tthis._handleHome();\n\t\t} else if (isEnd(event)) {\n\t\t\tthis._handleEnd();\n\t\t} else if (isPageUp(event)) {\n\t\t\tthis._handlePageUp();\n\t\t} else if (isPageDown(event)) {\n\t\t\tthis._handlePageDown();\n\t\t} else {\n\t\t\treturn; // if none of the supported keys is pressed, we don't want to prevent the event or update the item navigation\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis._applyTabIndex();\n\t\tthis._focusCurrentItem();\n\t}\n\n\t_handleUp() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex - this._rowSize >= 0) { // no border reached, just decrease the index by a row\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **last** item in the **previous** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize;\n\t\t\tconst firstItemInPreviousColumnIndex = firstItemInThisColumnIndex === 0 ? this._rowSize - 1 : firstItemInThisColumnIndex - 1; // find the first item in the previous column (if the current column is the first column -> move to the last column)\n\t\t\tconst rows = Math.ceil(itemsLength / this._rowSize); // how many rows there are (even if incomplete, f.e. for 14 items and _rowSize=4 -> 4 rows total, although only 2 items on the last row)\n\t\t\tlet lastItemInPreviousColumnIndex = firstItemInPreviousColumnIndex + (rows - 1) * this._rowSize; // multiply rows by columns, and add the column's first item's index\n\t\t\tif (lastItemInPreviousColumnIndex > itemsLength - 1) { // for incomplete rows, use the previous row's last item, as for them the last item is missing\n\t\t\t\tlastItemInPreviousColumnIndex -= this._rowSize;\n\t\t\t}\n\t\t\tthis._currentIndex = lastItemInPreviousColumnIndex;\n\t\t} else { // not cyclic, so just go to the first item\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleDown() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex + this._rowSize < itemsLength) { // no border reached, just increase the index by a row\n\t\t\tthis._currentIndex += this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **first** item in the **next** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize; // find the first item in the current column first\n\t\t\tconst firstItemInNextColumnIndex = (firstItemInThisColumnIndex + 1) % this._rowSize; // to get the first item in the next column, just increase the index by 1. The modulo by rows is for the case when we are at the last column\n\t\t\tthis._currentIndex = firstItemInNextColumnIndex;\n\t\t} else { // not cyclic, so just go to the last item\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleLeft() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex > 0) {\n\t\t\tthis._currentIndex -= 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleRight() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex < itemsLength - 1) {\n\t\t\tthis._currentIndex += 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleHome() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex -= this._currentIndex % homeEndRange;\n\t}\n\n\t_handleEnd() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex += (homeEndRange - 1 - this._currentIndex % homeEndRange); // eslint-disable-line\n\t}\n\n\t_handlePageUp() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageUpFlat();\n\t}\n\n\t_handlePageDown() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageDownFlat();\n\t}\n\n\t/**\n\t * Handles PAGE_UP in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageUpFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._currentIndex + 1 > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items to the top,\n\t\t\t// move the focus up/left with the predefined number.\n\t\t\tthis._currentIndex -= this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t}\n\t}\n\n\t/**\n\t * Handles PAGE_DOWN in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageDownFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentToEndRange = this._getItems().length - this._currentIndex - 1;\n\n\t\tif (currentToEndRange > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items until the bottom,\n\t\t\t// move the focus down/right with the predefined number.\n\t\t\tthis._currentIndex += this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t}\n\t}\n\n\t_applyTabIndex() {\n\t\tconst items = this._getItems();\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i]._tabIndex = i === this._currentIndex ? \"0\" : \"-1\";\n\t\t}\n\n\t\tthis._affectedPropertiesNames.forEach(propName => {\n\t\t\tconst prop = (this.rootWebComponent as Record<string, any>)[propName];\n\t\t\t(this.rootWebComponent as Record<string, any>)[propName] = Array.isArray(prop) ? [...prop] : { ...prop };\n\t\t});\n\t}\n\n\t_focusCurrentItem() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tif (currentItem) {\n\t\t\tcurrentItem.focus();\n\t\t}\n\t}\n\n\t_canNavigate() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tconst activeElement = getActiveElement();\n\n\t\treturn currentItem && currentItem === activeElement;\n\t}\n\n\t_getCurrentItem() {\n\t\tconst items = this._getItems();\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\t// normalize the index\n\t\twhile (this._currentIndex >= items.length) {\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t}\n\n\t\tif (this._currentIndex < 0) {\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\n\t\tconst currentItem = items[this._currentIndex];\n\n\t\tif (!currentItem) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (instanceOfUI5Element(currentItem)) {\n\t\t\treturn currentItem.getFocusDomRef();\n\t\t}\n\n\t\tconst currentItemDOMRef = this.rootWebComponent.getDomRef();\n\t\tif (!currentItemDOMRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (currentItem.id) {\n\t\t\treturn currentItemDOMRef.querySelector(`[id=\"${currentItem.id}\"]`) as HTMLElement;\n\t\t}\n\t}\n}\n\nexport default ItemNavigation;\n\nexport {\n\tITabbable,\n};\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const VersionInfo = {
|
|
2
|
-
version: "1.17.
|
|
2
|
+
version: "1.17.2",
|
|
3
3
|
major: 1,
|
|
4
4
|
minor: 17,
|
|
5
|
-
patch:
|
|
6
|
-
suffix: "
|
|
5
|
+
patch: 2,
|
|
6
|
+
suffix: "",
|
|
7
7
|
isNext: false,
|
|
8
|
-
buildTime:
|
|
8
|
+
buildTime: 1695307323,
|
|
9
9
|
};
|
|
10
10
|
export default VersionInfo;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<title>Base package default test page</title>
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
<script type="module" crossorigin src="/assets/Boot.
|
|
10
|
-
<script type="module" crossorigin src="/assets/bundle.esm.
|
|
9
|
+
<script type="module" crossorigin src="/assets/Boot.92245bd0.js"></script>
|
|
10
|
+
<script type="module" crossorigin src="/assets/bundle.esm.655114be.js"></script>
|
|
11
11
|
</head>
|
|
12
12
|
|
|
13
13
|
<body>
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<script>delete Document.prototype.adoptedStyleSheets</script>
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
<script type="module" crossorigin src="/assets/test/pages/Boot.html.
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/Boot.
|
|
9
|
+
<script type="module" crossorigin src="/assets/test/pages/Boot.html.b16d5c8d.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/Boot.92245bd0.js">
|
|
11
11
|
<link rel="stylesheet" href="/assets/Boot.34b7cea0.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
<script type="module" crossorigin src="/assets/Boot.
|
|
12
|
-
<script type="module" crossorigin src="/assets/bundle.esm.
|
|
11
|
+
<script type="module" crossorigin src="/assets/Boot.92245bd0.js"></script>
|
|
12
|
+
<script type="module" crossorigin src="/assets/bundle.esm.655114be.js"></script>
|
|
13
13
|
</head>
|
|
14
14
|
|
|
15
15
|
<body>
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
<script type="module" crossorigin src="/assets/Boot.
|
|
44
|
-
<script type="module" crossorigin src="/assets/bundle.esm.
|
|
43
|
+
<script type="module" crossorigin src="/assets/Boot.92245bd0.js"></script>
|
|
44
|
+
<script type="module" crossorigin src="/assets/bundle.esm.655114be.js"></script>
|
|
45
45
|
</head>
|
|
46
46
|
|
|
47
47
|
<body>
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<title>Compex Template Test Page</title>
|
|
6
6
|
|
|
7
|
-
<script type="module" crossorigin src="/assets/Boot.
|
|
8
|
-
<script type="module" crossorigin src="/assets/bundle.esm.
|
|
7
|
+
<script type="module" crossorigin src="/assets/Boot.92245bd0.js"></script>
|
|
8
|
+
<script type="module" crossorigin src="/assets/bundle.esm.655114be.js"></script>
|
|
9
9
|
</head>
|
|
10
10
|
|
|
11
11
|
<body>
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
<script type="module" crossorigin src="/assets/test/pages/i18n.html.
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/Boot.
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/bundle.esm.
|
|
10
|
+
<script type="module" crossorigin src="/assets/test/pages/i18n.html.1a8c26db.js"></script>
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/Boot.92245bd0.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/bundle.esm.655114be.js">
|
|
13
13
|
</head>
|
|
14
14
|
|
|
15
15
|
<body>
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
<script type="module" crossorigin src="/assets/test/pages/i18n_texts.html.
|
|
12
|
-
<link rel="modulepreload" crossorigin href="/assets/Boot.
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/bundle.esm.
|
|
11
|
+
<script type="module" crossorigin src="/assets/test/pages/i18n_texts.html.df6f5742.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/Boot.92245bd0.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/bundle.esm.655114be.js">
|
|
14
14
|
</head>
|
|
15
15
|
|
|
16
16
|
<body>
|
|
@@ -4,7 +4,6 @@ import getThemeDesignerTheme from "./getThemeDesignerTheme.js";
|
|
|
4
4
|
import { fireThemeLoaded } from "./ThemeLoaded.js";
|
|
5
5
|
import { getFeature } from "../FeaturesRegistry.js";
|
|
6
6
|
import { attachCustomThemeStylesToHead, getThemeRoot } from "../config/ThemeRoot.js";
|
|
7
|
-
import OpenUI5Support from "../features/OpenUI5Support.js";
|
|
8
7
|
import { DEFAULT_THEME } from "../generated/AssetParameters.js";
|
|
9
8
|
import { getCurrentRuntimeIndex } from "../Runtimes.js";
|
|
10
9
|
const BASE_THEME_PACKAGE = "@ui5/webcomponents-theming";
|
|
@@ -45,7 +44,7 @@ const detectExternalTheme = async (theme) => {
|
|
|
45
44
|
}
|
|
46
45
|
// If OpenUI5Support is enabled, try to find out if it loaded variables
|
|
47
46
|
const openUI5Support = getFeature("OpenUI5Support");
|
|
48
|
-
if (openUI5Support &&
|
|
47
|
+
if (openUI5Support && openUI5Support.isOpenUI5Detected()) {
|
|
49
48
|
const varsLoaded = openUI5Support.cssVariablesLoaded();
|
|
50
49
|
if (varsLoaded) {
|
|
51
50
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyTheme.js","sourceRoot":"","sources":["../../src/theming/applyTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"applyTheme.js","sourceRoot":"","sources":["../../src/theming/applyTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErF,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,kBAAkB,GAAG,4BAA4B,CAAC;AAExD,MAAM,qBAAqB,GAAG,GAAG,EAAE;IAClC,MAAM,kBAAkB,GAAG,qBAAqB,EAAE,CAAC;IACnD,OAAO,kBAAkB,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;AACnD,CAA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c,IAAI,cAAc,CAAC,iBAAiB,EAAE,EAAE;QACzD,MAAM,UAAU,GAAG,cAAc,CAAC,kBAAkB,EAAE,CAAC;QACvD,IAAI,UAAU,EAAE;YACf,OAAO;gBACN,SAAS,EAAE,cAAc,CAAC,8BAA8B,EAAE,EAAE,KAAK;gBACjE,aAAa,EAAE,EAAE,EAAE,mDAAmD;aACtE,CAAC;SACF;KACD;SAAM,IAAI,YAAY,EAAE,EAAE;QAC1B,MAAM,6BAA6B,CAAC,KAAK,CAAC,CAAC;QAE3C,OAAO,qBAAqB,EAAE,CAAC;KAC/B;AACF,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,KAAK,EAAE,KAAa,EAAE,EAAE;IAC1C,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAElD,kHAAkH;IAClH,IAAI,CAAC,QAAQ,IAAI,KAAK,KAAK,QAAQ,CAAC,SAAS,EAAE;QAC9C,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC;KAC3B;SAAM;QACN,eAAe,EAAE,CAAC;KAClB;IAED,wGAAwG;IACxG,MAAM,aAAa,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAAC;IAC5F,MAAM,qBAAqB,CAAC,aAAa,IAAI,aAAa,CAAC,CAAC;IAE5D,eAAe,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { getThemeProperties, getRegisteredPackages, isThemeRegistered } from \"../asset-registries/Themes.js\";\nimport { removeStyle, createOrUpdateStyle } from \"../ManagedStyles.js\";\nimport getThemeDesignerTheme from \"./getThemeDesignerTheme.js\";\nimport { fireThemeLoaded } from \"./ThemeLoaded.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport { attachCustomThemeStylesToHead, getThemeRoot } from \"../config/ThemeRoot.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\nimport { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { getCurrentRuntimeIndex } from \"../Runtimes.js\";\n\nconst BASE_THEME_PACKAGE = \"@ui5/webcomponents-theming\";\n\nconst isThemeBaseRegistered = () => {\n\tconst registeredPackages = getRegisteredPackages();\n\treturn registeredPackages.has(BASE_THEME_PACKAGE);\n};\n\nconst loadThemeBase = async (theme: string) => {\n\tif (!isThemeBaseRegistered()) {\n\t\treturn;\n\t}\n\n\tconst cssData = await getThemeProperties(BASE_THEME_PACKAGE, theme);\n\tif (cssData) {\n\t\tcreateOrUpdateStyle(cssData, \"data-ui5-theme-properties\", BASE_THEME_PACKAGE);\n\t}\n};\n\nconst deleteThemeBase = () => {\n\tremoveStyle(\"data-ui5-theme-properties\", BASE_THEME_PACKAGE);\n};\n\nconst loadComponentPackages = async (theme: string) => {\n\tconst registeredPackages = getRegisteredPackages();\n\n\tconst packagesStylesPromises = [...registeredPackages].map(async packageName => {\n\t\tif (packageName === BASE_THEME_PACKAGE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst cssData = await getThemeProperties(packageName, theme);\n\t\tif (cssData) {\n\t\t\tcreateOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);\n\t\t}\n\t});\n\n\treturn Promise.all(packagesStylesPromises);\n};\n\nconst detectExternalTheme = async (theme: string) => {\n\t// If theme designer theme is detected, use this\n\tconst extTheme = getThemeDesignerTheme();\n\tif (extTheme) {\n\t\treturn extTheme;\n\t}\n\n\t// If OpenUI5Support is enabled, try to find out if it loaded variables\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support && openUI5Support.isOpenUI5Detected()) {\n\t\tconst varsLoaded = openUI5Support.cssVariablesLoaded();\n\t\tif (varsLoaded) {\n\t\t\treturn {\n\t\t\t\tthemeName: openUI5Support.getConfigurationSettingsObject()?.theme, // just themeName\n\t\t\t\tbaseThemeName: \"\", // baseThemeName is only relevant for custom themes\n\t\t\t};\n\t\t}\n\t} else if (getThemeRoot()) {\n\t\tawait attachCustomThemeStylesToHead(theme);\n\n\t\treturn getThemeDesignerTheme();\n\t}\n};\n\nconst applyTheme = async (theme: string) => {\n\tconst extTheme = await detectExternalTheme(theme);\n\n\t// Only load theme_base properties if there is no externally loaded theme, or there is, but it is not being loaded\n\tif (!extTheme || theme !== extTheme.themeName) {\n\t\tawait loadThemeBase(theme);\n\t} else {\n\t\tdeleteThemeBase();\n\t}\n\n\t// Always load component packages properties. For non-registered themes, try with the base theme, if any\n\tconst packagesTheme = isThemeRegistered(theme) ? theme : extTheme && extTheme.baseThemeName;\n\tawait loadComponentPackages(packagesTheme || DEFAULT_THEME);\n\n\tfireThemeLoaded(theme);\n};\n\nexport default applyTheme;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import DataType from "./DataType.js";
|
|
2
|
+
/**
|
|
3
|
+
* @class
|
|
4
|
+
* CSSSize data type.
|
|
5
|
+
*
|
|
6
|
+
* @extends sap.ui.webc.base.types.DataType
|
|
7
|
+
* @constructor
|
|
8
|
+
* @author SAP SE
|
|
9
|
+
* @alias sap.ui.webc.base.types.CSSSize
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
declare class CSSSize extends DataType {
|
|
13
|
+
static isValid(value: string): boolean;
|
|
14
|
+
}
|
|
15
|
+
export default CSSSize;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import DataType from "./DataType.js";
|
|
2
|
+
/**
|
|
3
|
+
* @class
|
|
4
|
+
* CSSSize data type.
|
|
5
|
+
*
|
|
6
|
+
* @extends sap.ui.webc.base.types.DataType
|
|
7
|
+
* @constructor
|
|
8
|
+
* @author SAP SE
|
|
9
|
+
* @alias sap.ui.webc.base.types.CSSSize
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
class CSSSize extends DataType {
|
|
13
|
+
static isValid(value) {
|
|
14
|
+
return /^(auto|inherit|[-+]?(0*|([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%))|calc\(\s*(\(\s*)*[-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)(\s*(\)\s*)*(\s[-+]\s|[*\/])\s*(\(\s*)*([-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)))*\s*(\)\s*)*\))$/.test(value); // eslint-disable-line
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export default CSSSize;
|
|
18
|
+
//# sourceMappingURL=CSSSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CSSSize.js","sourceRoot":"","sources":["../../src/types/CSSSize.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;;;;;;;;GASG;AACH,MAAM,OAAQ,SAAQ,QAAQ;IAC7B,MAAM,CAAC,OAAO,CAAC,KAAa;QAC3B,OAAO,ocAAoc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,sBAAsB;IAChf,CAAC;CACD;AAED,eAAe,OAAO,CAAC","sourcesContent":["import DataType from \"./DataType.js\";\n\n/**\n * @class\n * CSSSize data type.\n *\n * @extends sap.ui.webc.base.types.DataType\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.base.types.CSSSize\n * @public\n */\nclass CSSSize extends DataType {\n\tstatic isValid(value: string) {\n\t\treturn /^(auto|inherit|[-+]?(0*|([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%))|calc\\(\\s*(\\(\\s*)*[-+]?(([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)(\\s*(\\)\\s*)*(\\s[-+]\\s|[*\\/])\\s*(\\(\\s*)*([-+]?(([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)))*\\s*(\\)\\s*)*\\))$/.test(value); // eslint-disable-line\n\t}\n}\n\nexport default CSSSize;\n"]}
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// animations/
|
|
2
2
|
import scroll from "./dist/animations/scroll.js";
|
|
3
3
|
import slideDown from "./dist/animations/slideDown.js";
|
|
4
|
-
import slideUp from "./dist/animations/
|
|
4
|
+
import slideUp from "./dist/animations/slideUp.js";
|
|
5
5
|
|
|
6
6
|
// config/
|
|
7
7
|
import { getAnimationMode, setAnimationMode } from "./dist/config/AnimationMode.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-base",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.2",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.base",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@buxlabs/amd-to-es6": "0.16.1",
|
|
39
39
|
"@openui5/sap.ui.core": "1.116.0",
|
|
40
|
-
"@ui5/webcomponents-tools": "1.17.
|
|
41
|
-
"chromedriver": "
|
|
40
|
+
"@ui5/webcomponents-tools": "1.17.2",
|
|
41
|
+
"chromedriver": "116.0.0",
|
|
42
42
|
"clean-css": "^5.2.2",
|
|
43
43
|
"copy-and-watch": "^0.1.5",
|
|
44
44
|
"cross-env": "^7.0.3",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"replace-in-file": "^6.3.5",
|
|
48
48
|
"resolve": "^1.20.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "9dbfa8922d124cc66a5989ffc7ec5ab0867b5f27"
|
|
51
51
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerpolicy&&(o.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?o.credentials="include":r.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();const I={themes:{default:"sap_fiori_3",all:["sap_fiori_3","sap_fiori_3_dark","sap_belize","sap_belize_hcb","sap_belize_hcw","sap_fiori_3_hcb","sap_fiori_3_hcw","sap_horizon","sap_horizon_dark","sap_horizon_hcb","sap_horizon_hcw","sap_horizon_exp","sap_horizon_dark_exp","sap_horizon_hcb_exp","sap_horizon_hcw_exp"]},languages:{default:"en",all:["ar","bg","ca","cs","cy","da","de","el","en","en_GB","en_US_sappsd","en_US_saprigi","en_US_saptrc","es","es_MX","et","fi","fr","fr_CA","hi","hr","hu","in","it","iw","ja","kk","ko","lt","lv","ms","nl","no","pl","pt_PT","pt","ro","ru","sh","sk","sl","sv","th","tr","uk","vi","zh_CN","zh_TW"]},locales:{default:"en",all:["ar","ar_EG","ar_SA","bg","ca","cs","da","de","de_AT","de_CH","el","el_CY","en","en_AU","en_GB","en_HK","en_IE","en_IN","en_NZ","en_PG","en_SG","en_ZA","es","es_AR","es_BO","es_CL","es_CO","es_MX","es_PE","es_UY","es_VE","et","fa","fi","fr","fr_BE","fr_CA","fr_CH","fr_LU","he","hi","hr","hu","id","it","it_CH","ja","kk","ko","lt","lv","ms","nb","nl","nl_BE","pl","pt","pt_PT","ro","ru","ru_UA","sk","sl","sr","sr_Latn","sv","th","tr","uk","vi","zh_CN","zh_HK","zh_SG","zh_TW"]}},z=I.themes.default,mt=I.themes.all,j=I.languages.default,g=I.locales.default,pe=I.locales.all,wt=()=>{const e=navigator.languages,t=()=>navigator.language;return e&&e[0]||t()||j};var xe={},Be=xe.hasOwnProperty,yt=xe.toString,Fe=Be.toString,St=Fe.call(Object),me=function(e){var t,n;return!e||yt.call(e)!=="[object Object]"?!1:(t=Object.getPrototypeOf(e),t?(n=Be.call(t,"constructor")&&t.constructor,typeof n=="function"&&Fe.call(n)===St):!0)},_t=Object.create(null),Ve=function(e,t,n,s){var r,o,i,a,y,S,p=arguments[2]||{},H=3,ht=arguments.length,he=arguments[0]||!1,pt=arguments[1]?void 0:_t;for(typeof p!="object"&&typeof p!="function"&&(p={});H<ht;H++)if((y=arguments[H])!=null)for(a in y)r=p[a],i=y[a],!(a==="__proto__"||p===i)&&(he&&i&&(me(i)||(o=Array.isArray(i)))?(o?(o=!1,S=r&&Array.isArray(r)?r:[]):S=r&&me(r)?r:{},p[a]=Ve(he,arguments[1],S,i)):i!==pt&&(p[a]=i));return p};const je=function(e,t){return Ve(!0,!1,...arguments)},qe=new Map,Tt=(e,t)=>{qe.set(e,t)},A=e=>qe.get(e),bt=e=>{const t=document.querySelector(`META[name="${e}"]`);return t&&t.getAttribute("content")},At=e=>{const t=bt("sap-allowedThemeOrigins");return t&&t.split(",").some(n=>n==="*"||e===n.trim())},Lt=(e,t)=>{const n=new URL(e).pathname;return new URL(n,t).toString()},Ze=e=>{let t;try{if(e.startsWith(".")||e.startsWith("/"))t=new URL(e,window.location.href).toString();else{const n=new URL(e),s=n.origin;s&&At(s)?t=n.toString():t=Lt(n.toString(),window.location.href)}return t.endsWith("/")||(t=`${t}/`),`${t}UI5/`}catch{}};var ne;(function(e){e.Full="full",e.Basic="basic",e.Minimal="minimal",e.None="none"})(ne||(ne={}));const vt=ne;let we=!1,l={animationMode:vt.Full,theme:z,themeRoot:void 0,rtl:void 0,language:void 0,timezone:void 0,calendarType:void 0,noConflict:!1,formatSettings:{},fetchDefaultLanguage:!1};const rs=()=>(h(),l.animationMode),Ct=()=>(h(),l.theme),Et=()=>(h(),l.themeRoot),os=()=>(h(),l.rtl),Pt=()=>(h(),l.language),It=()=>(h(),l.fetchDefaultLanguage),is=()=>(h(),l.noConflict),as=()=>(h(),l.calendarType),cs=()=>(h(),l.formatSettings),x=new Map;x.set("true",!0);x.set("false",!1);const Rt=()=>{const e=document.querySelector("[data-ui5-config]")||document.querySelector("[data-id='sap-ui-config']");let t;if(e){try{t=JSON.parse(e.innerHTML)}catch{console.warn("Incorrect data-sap-ui-config format. Please use JSON")}t&&(l=je(l,t))}},$t=()=>{const e=new URLSearchParams(window.location.search);e.forEach((t,n)=>{const s=n.split("sap-").length;s===0||s===n.split("sap-ui-").length||ye(n,t,"sap")}),e.forEach((t,n)=>{!n.startsWith("sap-ui")||ye(n,t,"sap-ui")})},Ot=e=>{const t=e.split("@")[1];return Ze(t)},Dt=(e,t)=>e==="theme"&&t.includes("@")?t.split("@")[0]:t,ye=(e,t,n)=>{const s=t.toLowerCase(),r=e.split(`${n}-`)[1];x.has(t)&&(t=x.get(s)),r==="theme"?(l.theme=Dt(r,t),t&&t.includes("@")&&(l.themeRoot=Ot(t))):l[r]=t},Mt=()=>{const e=A("OpenUI5Support");if(!e||!e.isOpenUI5Detected())return;const t=e.getConfigurationSettingsObject();l=je(l,t)},h=()=>{typeof document>"u"||we||(Rt(),$t(),Mt(),we=!0)};class R{constructor(){this._eventRegistry=new Map}attachEvent(t,n){const s=this._eventRegistry,r=s.get(t);if(!Array.isArray(r)){s.set(t,[n]);return}r.includes(n)||r.push(n)}detachEvent(t,n){const s=this._eventRegistry,r=s.get(t);if(!r)return;const o=r.indexOf(n);o!==-1&&r.splice(o,1),r.length===0&&s.delete(t)}fireEvent(t,n){const r=this._eventRegistry.get(t);return r?r.map(o=>o.call(this,n)):[]}fireEventAsync(t,n){return Promise.all(this.fireEvent(t,n))}isHandlerAttached(t,n){const r=this._eventRegistry.get(t);return r?r.includes(n):!1}hasListeners(t){return!!this._eventRegistry.get(t)}}const We=new R,Ne="languageChange",He=e=>{We.attachEvent(Ne,e)},Ut=e=>We.fireEventAsync(Ne,e),Se=10;class kt{constructor(){this.list=[],this.lookup=new Set}add(t){this.lookup.has(t)||(this.list.push(t),this.lookup.add(t))}remove(t){!this.lookup.has(t)||(this.list=this.list.filter(n=>n!==t),this.lookup.delete(t))}shift(){const t=this.list.shift();if(t)return this.lookup.delete(t),t}isEmpty(){return this.list.length===0}isAdded(t){return this.lookup.has(t)}process(t){let n;const s=new Map;for(n=this.shift();n;){const r=s.get(n)||0;if(r>Se)throw new Error(`Web component processed too many times this task, max allowed is: ${Se}`);t(n),s.set(n,r+1),n=this.shift()}}}const zt=(e,t=document.body,n)=>{let s=document.querySelector(e);return s||(s=n?n():document.createElement(e),t.insertBefore(s,t.firstChild))},xt=()=>{const e=document.createElement("meta");return e.setAttribute("name","ui5-shared-resources"),e.setAttribute("content",""),e},Bt=()=>typeof document>"u"?null:zt('meta[name="ui5-shared-resources"]',document.head,xt),$=(e,t)=>{const n=e.split(".");let s=Bt();if(!s)return t;for(let r=0;r<n.length;r++){const o=n[r],i=r===n.length-1;Object.prototype.hasOwnProperty.call(s,o)||(s[o]=i?t:{}),s=s[o]}return s},Ft={version:"1.17.0-rc.2",major:1,minor:17,patch:0,suffix:"-rc.2",isNext:!1,buildTime:1692864794};let U,Vt="";const G=new Map,E=$("Runtimes",[]),jt=()=>{if(U===void 0){U=E.length;const e=Ft;E.push({...e,alias:Vt,description:`Runtime ${U} - ver ${e.version}`})}},ie=()=>U,qt=(e,t)=>{const n=`${e},${t}`;if(G.has(n))return G.get(n);const s=E[e],r=E[t];if(!s||!r)throw new Error("Invalid runtime index supplied");if(s.isNext||r.isNext)return s.buildTime-r.buildTime;const o=s.major-r.major;if(o)return o;const i=s.minor-r.minor;if(i)return i;const a=s.patch-r.patch;if(a)return a;const S=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare(s.suffix,r.suffix);return G.set(n,S),S},Zt=()=>E,Ge=$("Tags",new Map),ae=new Set;let w=new Map,K;const Ke=-1,us=e=>{ae.add(e),Ge.set(e,ie())},ls=e=>ae.has(e),Wt=()=>[...ae.values()],fs=e=>{let t=Ge.get(e);t===void 0&&(t=Ke),w.has(t)||w.set(t,new Set),w.get(t).add(e),K||(K=setTimeout(()=>{Nt(),w=new Map,K=void 0},1e3))},Nt=()=>{const e=Zt(),t=ie(),n=e[t];let s="Multiple UI5 Web Components instances detected.";e.length>1&&(s=`${s}
|
|
2
|
-
Loading order (versions before 1.1.0 not listed): ${e.map(r=>`
|
|
3
|
-
${r.description}`).join("")}`),[...w.keys()].forEach(r=>{let o,i;r===Ke?(o=1,i={description:"Older unknown runtime"}):(o=qt(t,r),i=e[r]);let a;o>0?a="an older":o<0?a="a newer":a="the same",s=`${s}
|
|
4
|
-
|
|
5
|
-
"${n.description}" failed to define ${w.get(r).size} tag(s) as they were defined by a runtime of ${a} version "${i.description}": ${[...w.get(r)].sort().join(", ")}.`,o>0?s=`${s}
|
|
6
|
-
WARNING! If your code uses features of the above web components, unavailable in ${i.description}, it might not work as expected!`:s=`${s}
|
|
7
|
-
Since the above web components were defined by the same or newer version runtime, they should be compatible with your code.`}),s=`${s}
|
|
8
|
-
|
|
9
|
-
To prevent other runtimes from defining tags that you use, consider using scoping or have third-party libraries use scoping: https://github.com/SAP/ui5-webcomponents/blob/main/docs/2-advanced/03-scoping.md.`,console.warn(s)},Je=new Set,ds=e=>{Je.add(e)},Ht=e=>Je.has(e),ce=new Set,Gt=new R,L=new kt;let _,k,J,D;const Kt=async e=>{L.add(e),await Xt()},Jt=e=>{Gt.fireEvent("beforeComponentRender",e),ce.add(e),e._render()},gs=e=>{L.remove(e),ce.delete(e)},Xt=async()=>{D||(D=new Promise(e=>{window.requestAnimationFrame(()=>{L.process(Jt),D=null,e(),J||(J=setTimeout(()=>{J=void 0,L.isEmpty()&&tn()},200))})})),await D},Yt=()=>_||(_=new Promise(e=>{k=e,window.requestAnimationFrame(()=>{L.isEmpty()&&(_=void 0,e())})}),_),Qt=()=>{const e=Wt().map(t=>customElements.whenDefined(t));return Promise.all(e)},en=async()=>{await Qt(),await Yt()},tn=()=>{!L.isEmpty()||k&&(k(),k=void 0,_=void 0)},Xe=async e=>{ce.forEach(t=>{const n=t.constructor,s=n.getMetadata().getTag(),r=Ht(n),o=n.getMetadata().isLanguageAware(),i=n.getMetadata().isThemeAware();(!e||e.tag===s||e.rtlAware&&r||e.languageAware&&o||e.themeAware&&i)&&Kt(t)}),await en()};let v,se;const nn=()=>(v===void 0&&(v=Pt()),v),hs=async e=>{v!==e&&(v=e,await Ut(e),await Xe({languageAware:!0}))},sn=e=>{se=e},rn=()=>(se===void 0&&sn(It()),se),on=/^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;class Ye{constructor(t){const n=on.exec(t.replace(/_/g,"-"));if(n===null)throw new Error(`The given language ${t} does not adhere to BCP-47.`);this.sLocaleId=t,this.sLanguage=n[1]||j,this.sScript=n[2]||"",this.sRegion=n[3]||"",this.sVariant=n[4]&&n[4].slice(1)||null,this.sExtension=n[5]&&n[5].slice(1)||null,this.sPrivateUse=n[6]||null,this.sLanguage&&(this.sLanguage=this.sLanguage.toLowerCase()),this.sScript&&(this.sScript=this.sScript.toLowerCase().replace(/^[a-z]/,s=>s.toUpperCase())),this.sRegion&&(this.sRegion=this.sRegion.toUpperCase())}getLanguage(){return this.sLanguage}getScript(){return this.sScript}getRegion(){return this.sRegion}getVariant(){return this.sVariant}getVariantSubtags(){return this.sVariant?this.sVariant.split("-"):[]}getExtension(){return this.sExtension}getExtensionSubtags(){return this.sExtension?this.sExtension.slice(2).split("-"):[]}getPrivateUse(){return this.sPrivateUse}getPrivateUseSubtags(){return this.sPrivateUse?this.sPrivateUse.slice(2).split("-"):[]}hasPrivateUseSubtag(t){return this.getPrivateUseSubtags().indexOf(t)>=0}toString(){const t=[this.sLanguage];return this.sScript&&t.push(this.sScript),this.sRegion&&t.push(this.sRegion),this.sVariant&&t.push(this.sVariant),this.sExtension&&t.push(this.sExtension),this.sPrivateUse&&t.push(this.sPrivateUse),t.join("-")}}const X=new Map,Qe=e=>(X.has(e)||X.set(e,new Ye(e)),X.get(e)),_e=e=>{try{if(e&&typeof e=="string")return Qe(e)}catch{}return new Ye(g)},re=e=>{if(e)return _e(e);const t=nn();return t?Qe(t):_e(wt())},an=/^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i,Te=/(?:^|-)(saptrc|sappsd)(?:-|$)/i,cn={he:"iw",yi:"ji",nb:"no",sr:"sh"},un=e=>{let t;if(!e)return g;if(typeof e=="string"&&(t=an.exec(e.replace(/_/g,"-")))){let n=t[1].toLowerCase(),s=t[3]?t[3].toUpperCase():void 0;const r=t[2]?t[2].toLowerCase():void 0,o=t[4]?t[4].slice(1):void 0,i=t[6];return n=cn[n]||n,i&&(t=Te.exec(i))||o&&(t=Te.exec(o))?`en_US_${t[1].toLowerCase()}`:(n==="zh"&&!s&&(r==="hans"?s="CN":r==="hant"&&(s="TW")),n+(s?"_"+s+(o?"_"+o.replace("-","_"):""):""))}return g},ln=e=>{if(!e)return g;if(e==="zh_HK")return"zh_TW";const t=e.lastIndexOf("_");return t>=0?e.slice(0,t):e!==g?g:""},be=new Set,Ae=new Set,ue=new Map,Y=new Map,le=new Map,ps=(e,t,n)=>{const s=`${e}/${t}`;le.set(s,n)},Le=(e,t)=>{ue.set(e,t)},ms=e=>ue.get(e),et=(e,t)=>{const n=`${e}/${t}`;return le.has(n)},fn=(e,t)=>{const n=`${e}/${t}`,s=le.get(n);return s&&!Y.get(n)&&Y.set(n,s(t)),Y.get(n)},dn=e=>{be.has(e)||(console.warn(`[${e}]: Message bundle assets are not configured. Falling back to English texts.`,` Add \`import "${e}/dist/Assets.js"\` in your bundle and make sure your build tool supports dynamic imports and JSON imports. See section "Assets" in the documentation for more information.`),be.add(e))},ve=(e,t)=>t!==j&&!et(e,t),gn=async e=>{const t=re().getLanguage(),n=re().getRegion();let s=t+(n?`-${n}`:"");if(ve(e,s))for(s=un(s);ve(e,s);)s=ln(s);const r=rn();if(s===j&&!r){Le(e,null);return}if(!et(e,s)){dn(e);return}try{const o=await fn(e,s);Le(e,o)}catch(o){const i=o;Ae.has(i.message)||(Ae.add(i.message),console.error(i.message))}};He(e=>{const t=[...ue.keys()];return Promise.all(t.map(gn))});const hn=new Map,B=new Map,Q=new Map,Ce=new Set;let Ee=!1;const pn={iw:"he",ji:"yi",in:"id"},Pe=e=>{Ee||(console.warn(`[LocaleData] Supported locale "${e}" not configured, import the "Assets.js" module from the webcomponents package you are using.`),Ee=!0)},mn=(e,t,n)=>{e=e&&pn[e]||e,e==="no"&&(e="nb"),e==="zh"&&!t&&(n==="Hans"?t="CN":n==="Hant"&&(t="TW")),(e==="sh"||e==="sr"&&n==="Latn")&&(e="sr",t="Latn");let s=`${e}_${t}`;return pe.includes(s)||(s=e,pe.includes(s))?B.has(s)?s:(Pe(s),g):g},Ie=(e,t)=>{hn.set(e,t)},wn=e=>{if(!Q.get(e)){const t=B.get(e);if(!t)throw new Error(`CLDR data for locale ${e} is not loaded!`);Q.set(e,t(e))}return Q.get(e)},yn=async(e,t,n)=>{const s=mn(e,t,n),r=A("OpenUI5Support");if(r){const o=r.getLocaleDataObject();if(o){Ie(s,o);return}}try{const o=await wn(s);Ie(s,o)}catch(o){const i=o;Ce.has(i.message)||(Ce.add(i.message),console.error(i.message))}},Sn=(e,t)=>{B.set(e,t)};Sn("en",async()=>(await fetch("https://sdk.openui5.org/1.103.0/resources/sap/ui/core/cldr/en.json")).json());He(()=>{const e=re();return yn(e.getLanguage(),e.getRegion(),e.getScript())});const tt=new R,nt="themeRegistered",_n=e=>{tt.attachEvent(nt,e)},Tn=e=>tt.fireEvent(nt,e),st=new Map,rt=new Map,ot=new Set,F=new Set,ws=(e,t,n)=>{rt.set(`${e}/${t}`,n),ot.add(e),F.add(t),Tn(t)},it=async(e,t)=>{const n=st.get(`${e}_${t}`);if(n!==void 0)return n;if(!F.has(t)){const s=[...F.values()].join(", ");return console.warn(`You have requested a non-registered theme ${t} - falling back to ${z}. Registered themes are: ${s}`),Re(e,z)}return Re(e,t)},Re=async(e,t)=>{const n=rt.get(`${e}/${t}`);if(!n){console.error(`Theme [${t}] not registered for package [${e}]`);return}let s;try{s=await n(t)}catch(o){console.error(e,o.message);return}const r=s._||s;return st.set(`${e}_${t}`,r),r},at=()=>ot,bn=e=>F.has(e);var V;(function(e){e["SAP-icons"]="SAP-icons-v4",e.horizon="SAP-icons-v5",e["SAP-icons-TNT"]="tnt",e.BusinessSuiteInAppSymbols="business-suite"})(V||(V={}));const ct=e=>V[e]?V[e]:e,An=(e,t)=>{const n=document.createElement("style");return n.type="text/css",t&&Object.entries(t).forEach(s=>n.setAttribute(...s)),n.textContent=e,document.head.appendChild(n),n},Ln=(e,t)=>{const n=document.createElement("link");return n.type="text/css",n.rel="stylesheet",t&&Object.entries(t).forEach(s=>n.setAttribute(...s)),n.href=e,document.head.appendChild(n),new Promise(s=>{n.addEventListener("load",s),n.addEventListener("error",s)})},f=typeof document>"u",c={get userAgent(){return f?"":navigator.userAgent},get touch(){return f?!1:"ontouchstart"in window||navigator.maxTouchPoints>0},get ie(){return f?!1:/(msie|trident)/i.test(c.userAgent)},get chrome(){return f?!1:!c.ie&&/(Chrome|CriOS)/.test(c.userAgent)},get firefox(){return f?!1:/Firefox/.test(c.userAgent)},get safari(){return f?!1:!c.ie&&!c.chrome&&/(Version|PhantomJS)\/(\d+\.\d+).*Safari/.test(c.userAgent)},get webkit(){return f?!1:!c.ie&&/webkit/.test(c.userAgent)},get windows(){return f?!1:navigator.platform.indexOf("Win")!==-1},get iOS(){return f?!1:!!navigator.platform.match(/iPhone|iPad|iPod/)||!!(c.userAgent.match(/Mac/)&&"ontouchend"in document)},get android(){return f?!1:!c.windows&&/Android/.test(c.userAgent)},get androidPhone(){return f?!1:c.android&&/(?=android)(?=.*mobile)/i.test(c.userAgent)},get ipad(){return f?!1:/ipad/i.test(c.userAgent)||/Macintosh/i.test(c.userAgent)&&"ontouchend"in document}},q=()=>c.safari,Z=(e,t)=>t?`${e}|${t}`:e,W=(e,t,n="")=>{const s=typeof e=="string"?e:e.content;if(document.adoptedStyleSheets&&!q()){const r=new CSSStyleSheet;r.replaceSync(s),r._ui5StyleId=Z(t,n),document.adoptedStyleSheets=[...document.adoptedStyleSheets,r]}else{const r={};r[t]=n,An(s,r)}},vn=(e,t,n="")=>{const s=typeof e=="string"?e:e.content;if(document.adoptedStyleSheets&&!q()){const r=document.adoptedStyleSheets.find(o=>o._ui5StyleId===Z(t,n));r&&r.replaceSync(s||"")}else{const r=document.querySelector(`head>style[${t}="${n}"]`);r&&(r.textContent=s||"")}},N=(e,t="")=>document.adoptedStyleSheets&&!q()?!!document.adoptedStyleSheets.find(n=>n._ui5StyleId===Z(e,t)):!!document.querySelector(`head>style[${e}="${t}"]`),Cn=(e,t="")=>{var n;if(document.adoptedStyleSheets&&!q())document.adoptedStyleSheets=document.adoptedStyleSheets.filter(s=>s._ui5StyleId!==Z(e,t));else{const s=document.querySelector(`head > style[${e}="${t}"]`);(n=s==null?void 0:s.parentElement)==null||n.removeChild(s)}},ut=(e,t,n="")=>{N(t,n)?vn(e,t,n):W(e,t,n)},T=new Set,En=()=>{let e=document.querySelector(".sapThemeMetaData-Base-baseLib")||document.querySelector(".sapThemeMetaData-UI5-sap-ui-core");if(e)return getComputedStyle(e).backgroundImage;e=document.createElement("span"),e.style.display="none",e.classList.add("sapThemeMetaData-Base-baseLib"),document.body.appendChild(e);let t=getComputedStyle(e).backgroundImage;return t==="none"&&(e.classList.add("sapThemeMetaData-UI5-sap-ui-core"),t=getComputedStyle(e).backgroundImage),document.body.removeChild(e),t},Pn=e=>{const t=/\(["']?data:text\/plain;utf-8,(.*?)['"]?\)$/i.exec(e);if(t&&t.length>=2){let n=t[1];if(n=n.replace(/\\"/g,'"'),n.charAt(0)!=="{"&&n.charAt(n.length-1)!=="}")try{n=decodeURIComponent(n)}catch{T.has("decode")||(console.warn("Malformed theme metadata string, unable to decodeURIComponent"),T.add("decode"));return}try{return JSON.parse(n)}catch{T.has("parse")||(console.warn("Malformed theme metadata string, unable to parse JSON"),T.add("parse"))}}},In=e=>{let t,n;try{t=e.Path.match(/\.([^.]+)\.css_variables$/)[1],n=e.Extends[0]}catch{T.has("object")||(console.warn("Malformed theme metadata Object",e),T.add("object"));return}return{themeName:t,baseThemeName:n}},oe=()=>{const e=En();if(!e||e==="none")return;const t=Pn(e);if(t)return In(t)},Rn=new R,$n="themeLoaded",On=e=>Rn.fireEvent($n,e);let C;const lt=()=>(C===void 0&&(C=Et()),C),ys=e=>{if(C!==e){if(C=e,!Ze(e)){console.warn(`The ${e} is not valid. Check the allowed origins as suggested in the "setThemeRoot" description.`);return}return ft(O())}},Dn=e=>`${lt()}Base/baseLib/${e}/css_variables.css`,ft=async e=>{const t=document.querySelector(`[sap-ui-webcomponents-theme="${e}"]`);t&&document.head.removeChild(t),await Ln(Dn(e),{"sap-ui-webcomponents-theme":e})},Mn=$("PopupUtilsData",{currentZIndex:100}),$e=()=>Mn.currentZIndex;class u{static isAtLeastVersion116(){const n=window.sap.ui.version.split(".");return!n||n.length<2?!1:parseInt(n[0])>1||parseInt(n[1])>=116}static isOpenUI5Detected(){var t,n;return typeof((n=(t=window.sap)==null?void 0:t.ui)==null?void 0:n.require)=="function"}static init(){return u.isOpenUI5Detected()?new Promise(t=>{window.sap.ui.require(["sap/ui/core/Core"],async n=>{const s=()=>{let r=["sap/ui/core/Popup","sap/ui/core/LocaleData"];u.isAtLeastVersion116()&&(r=[...r,"sap/base/i18n/Formatting","sap/base/i18n/Localization","sap/ui/core/ControlBehavior","sap/ui/core/Theming","sap/ui/core/date/CalendarUtils"]),window.sap.ui.require(r,o=>{o.setInitialZIndex($e()),t()})};u.isAtLeastVersion116()?(await n.ready(),s()):n.attachInit(s)})}):Promise.resolve()}static getConfigurationSettingsObject(){if(!u.isOpenUI5Detected())return{};if(u.isAtLeastVersion116()){const r=window.sap.ui.require("sap/ui/core/ControlBehavior"),o=window.sap.ui.require("sap/base/i18n/Localization"),i=window.sap.ui.require("sap/ui/core/Theming"),a=window.sap.ui.require("sap/base/i18n/Formatting"),y=window.sap.ui.require("sap/ui/core/date/CalendarUtils");return{animationMode:r.getAnimationMode(),language:o.getLanguage(),theme:i.getTheme(),themeRoot:i.getThemeRoot(),rtl:o.getRTL(),timezone:o.getTimezone(),calendarType:a.getCalendarType(),formatSettings:{firstDayOfWeek:y.getWeekConfigurationValues().firstDayOfWeek,legacyDateCalendarCustomizing:a.getLegacyDateCalendarCustomizing()}}}const n=window.sap.ui.require("sap/ui/core/Core").getConfiguration(),s=window.sap.ui.require("sap/ui/core/LocaleData");return{animationMode:n.getAnimationMode(),language:n.getLanguage(),theme:n.getTheme(),themeRoot:n.getThemeRoot(),rtl:n.getRTL(),timezone:n.getTimezone(),calendarType:n.getCalendarType(),formatSettings:{firstDayOfWeek:s?s.getInstance(n.getLocale()).getFirstDayOfWeek():void 0,legacyDateCalendarCustomizing:n.getFormatSettings().getLegacyDateCalendarCustomizing()}}}static getLocaleDataObject(){if(!u.isOpenUI5Detected())return;const t=window.sap.ui.require("sap/ui/core/LocaleData");if(u.isAtLeastVersion116()){const r=window.sap.ui.require("sap/base/i18n/Localization");return t.getInstance(r.getLanguageTag())._get()}const s=window.sap.ui.require("sap/ui/core/Core").getConfiguration();return t.getInstance(s.getLocale())._get()}static _listenForThemeChange(){if(u.isAtLeastVersion116()){const t=window.sap.ui.require("sap/ui/core/Theming");t.attachApplied(()=>{Oe(t.getTheme())})}else{const t=window.sap.ui.require("sap/ui/core/Core"),n=t.getConfiguration();t.attachThemeChanged(()=>{Oe(n.getTheme())})}}static attachListeners(){!u.isOpenUI5Detected()||u._listenForThemeChange()}static cssVariablesLoaded(){if(!u.isOpenUI5Detected())return;const t=[...document.head.children].find(n=>n.id==="sap-ui-theme-sap.ui.core");return t?!!t.href.match(/\/css(-|_)variables\.css/):!1}static getNextZIndex(){if(!u.isOpenUI5Detected())return;const t=window.sap.ui.require("sap/ui/core/Popup");return t||console.warn(`The OpenUI5Support feature hasn't been initialized properly. Make sure you import the "@ui5/webcomponents-base/dist/features/OpenUI5Support.js" module before all components' modules.`),t.getNextZIndex()}static setInitialZIndex(){if(!u.isOpenUI5Detected())return;window.sap.ui.require("sap/ui/core/Popup").setInitialZIndex($e())}}Tt("OpenUI5Support",u);const P="@ui5/webcomponents-theming",Un=()=>at().has(P),kn=async e=>{if(!Un())return;const t=await it(P,e);t&&ut(t,"data-ui5-theme-properties",P)},zn=()=>{Cn("data-ui5-theme-properties",P)},xn=async e=>{const n=[...at()].map(async s=>{if(s===P)return;const r=await it(s,e);r&&ut(r,`data-ui5-component-properties-${ie()}`,s)});return Promise.all(n)},Bn=async e=>{var s;const t=oe();if(t)return t;const n=A("OpenUI5Support");if(n&&u.isOpenUI5Detected()){if(n.cssVariablesLoaded())return{themeName:(s=n.getConfigurationSettingsObject())==null?void 0:s.theme,baseThemeName:""}}else if(lt())return await ft(e),oe()},fe=async e=>{const t=await Bn(e);!t||e!==t.themeName?await kn(e):zn();const n=bn(e)?e:t&&t.baseThemeName;await xn(n||z),On(e)};let b;const O=()=>(b===void 0&&(b=Ct()),b),Oe=async e=>{b!==e&&(b=e,await fe(b),await Xe({themeAware:!0}))},Fn=()=>{var t,n;const e=O();return Vn(e)?!e.startsWith("sap_horizon"):!((n=(t=oe())==null?void 0:t.baseThemeName)!=null&&n.startsWith("sap_horizon"))},Vn=e=>mt.includes(e);var m;(function(e){e.SAPIconsV4="SAP-icons-v4",e.SAPIconsV5="SAP-icons-v5",e.SAPIconsTNTV2="tnt-v2",e.SAPIconsTNTV3="tnt-v3",e.SAPBSIconsV1="business-suite-v1",e.SAPBSIconsV2="business-suite-v2"})(m||(m={}));const d=new Map;d.set("SAP-icons",{legacy:m.SAPIconsV4,sap_horizon:m.SAPIconsV5});d.set("tnt",{legacy:m.SAPIconsTNTV2,sap_horizon:m.SAPIconsTNTV3});d.set("business-suite",{legacy:m.SAPBSIconsV1,sap_horizon:m.SAPBSIconsV2});const jn=(e,t)=>{if(d.has(e)){d.set(e,{...t,...d.get(e)});return}d.set(e,t)},De=e=>{const t=Fn()?"legacy":"sap_horizon";return d.has(e)?d.get(e)[t]:e},qn=new Map,Zn=e=>qn.get(e),dt=e=>{const t=Zn(O());return!e&&t?ct(t):De(e||"SAP-icons")},Wn="legacy",Me=new Map,de=$("SVGIcons.registry",new Map),ee=$("SVGIcons.promises",new Map),Ue="ICON_NOT_FOUND",Nn=async e=>{if(!ee.has(e)){if(!Me.has(e))throw new Error(`No loader registered for the ${e} icons collection. Probably you forgot to import the "AllIcons.js" module for the respective package.`);const t=Me.get(e);ee.set(e,t(e))}return ee.get(e)},ke=e=>{Object.keys(e.data).forEach(t=>{const n=e.data[t];Hn(t,{pathData:n.path||n.paths,ltr:n.ltr,accData:n.acc,collection:e.collection,packageName:e.packageName})})},Hn=(e,t)=>{const n=`${t.collection}/${e}`;de.set(n,{pathData:t.pathData,ltr:t.ltr,accData:t.accData,packageName:t.packageName,customTemplate:t.customTemplate,viewBox:t.viewBox,collection:t.collection})},Gn=e=>{e.startsWith("sap-icon://")&&(e=e.replace("sap-icon://",""));let t;return[e,t]=e.split("/").reverse(),e=e.replace("icon-",""),t&&(t=ct(t)),{name:e,collection:t}},te=async e=>{const{name:t,collection:n}=Gn(e);let s=Ue;try{s=await Nn(dt(n))}catch(o){console.error(o.message)}if(s===Ue)return s;const r=ze(n,t);return r||(Array.isArray(s)?s.forEach(o=>{ke(o),jn(n,{[o.themeFamily||Wn]:o.collection})}):ke(s),ze(n,t))},ze=(e,t)=>{const n=`${dt(e)}/${t}`;return de.get(n)},Ss=async()=>(await te("edit"),await te("tnt/arrow"),await te("business-suite/3d"),Array.from(de.keys())),Kn=()=>new Promise(e=>{document.body?e():document.addEventListener("DOMContentLoaded",()=>{e()})}),Jn={packageName:"@ui5/webcomponents-base",fileName:"FontFace.css",content:`@font-face{font-family:"72";font-style:normal;font-weight:400;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Regular.woff2?ui5-webcomponents) format("woff2"),local("72")}@font-face{font-family:"72full";font-style:normal;font-weight:400;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Regular-full.woff2?ui5-webcomponents) format("woff2"),local('72-full')}@font-face{font-family:"72";font-style:normal;font-weight:700;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Bold.woff2?ui5-webcomponents) format("woff2"),local('72-Bold')}@font-face{font-family:"72full";font-style:normal;font-weight:700;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Bold-full.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:'72-Bold';font-style:normal;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Bold.woff2?ui5-webcomponents) format("woff2"),local('72-Bold')}@font-face{font-family:'72-Boldfull';font-style:normal;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Bold-full.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:'72-Light';font-style:normal;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Light.woff2?ui5-webcomponents) format("woff2"),local('72-Light')}@font-face{font-family:'72-Lightfull';font-style:normal;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Light-full.woff2?ui5-webcomponents) format("woff2")}@font-face{font-family:'72Mono';src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72Mono-Regular.woff2?ui5-webcomponents) format('woff2'),local('72Mono')}@font-face{font-family:'72Monofull';src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72Mono-Regular-full.woff2?ui5-webcomponents) format('woff2')}@font-face{font-family:'72Mono-Bold';src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72Mono-Bold.woff2?ui5-webcomponents) format('woff2'),local('72Mono-Bold')}@font-face{font-family:'72Mono-Boldfull';src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72Mono-Bold-full.woff2?ui5-webcomponents) format('woff2')}@font-face{font-family:"72Black";font-style:bold;font-weight:900;src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-Black.woff2?ui5-webcomponents) format("woff2"),local('72Black')}@font-face{font-family:"72-SemiboldDuplex";src:url(https://sdk.openui5.org/resources/sap/ui/core/themes/sap_horizon/fonts/72-SemiboldDuplex.woff2?ui5-webcomponents) format("woff2"),local('72-SemiboldDuplex')}`},Xn={packageName:"@ui5/webcomponents-base",fileName:"OverrideFontFace.css",content:"@font-face{font-family:'72override';unicode-range:U+0102-0103,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EB7,U+1EB8-1EC7,U+1EC8-1ECB,U+1ECC-1EE3,U+1EE4-1EF1,U+1EF4-1EF7;src:local('Arial'),local('Helvetica'),local('sans-serif')}"},Yn=()=>{const e=A("OpenUI5Support");(!e||!e.isOpenUI5Detected())&&Qn(),es()},Qn=()=>{N("data-ui5-font-face")||W(Jn,"data-ui5-font-face")},es=()=>{N("data-ui5-font-face-override")||W(Xn,"data-ui5-font-face-override")},ts={packageName:"@ui5/webcomponents-base",fileName:"SystemCSSVars.css",content:":root{--_ui5_content_density:cozy}.sapUiSizeCompact,.ui5-content-density-compact,[data-ui5-compact-size]{--_ui5_content_density:compact}[dir=rtl]{--_ui5_dir:rtl}[dir=ltr]{--_ui5_dir:ltr}"},ns=()=>{N("data-ui5-system-css-vars")||W(ts,"data-ui5-system-css-vars")};let ge=!1,M;const gt=new R,_s=e=>{if(!ge){gt.attachEvent("boot",e);return}e()},Ts=async()=>{if(M!==void 0)return M;const e=async t=>{if(typeof document>"u"){t();return}_n(ss),jt();const n=A("OpenUI5Support"),s=n?n.isOpenUI5Detected():!1,r=A("F6Navigation");n&&await n.init(),r&&!s&&r.init(),await Kn(),await fe(O()),n&&n.attachListeners(),Yn(),ns(),t(),ge=!0,await gt.fireEventAsync("boot")};return M=new Promise(e),M},ss=e=>{const t=O();ge&&e===t&&fe(t)};export{hs as A,O as B,lt as C,ys as D,R as E,Oe as F,ie as G,ps as H,_s as I,Ss as _,$ as a,A as b,os as c,nn as d,wt as e,gn as f,ms as g,en as h,q as i,is as j,Jt as k,gs as l,ds as m,zt as n,Ts as o,ls as p,fs as q,Xe as r,us as s,je as t,Kt as u,ws as v,rs as w,as as x,Tt as y,cs as z};
|