@ui5/webcomponents-base 1.20.0 → 1.21.0-rc.1

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/CustomElementsScope.d.ts +2 -2
  4. package/dist/Keys.js +104 -105
  5. package/dist/Keys.js.map +1 -1
  6. package/dist/UI5ElementMetadata.js +1 -0
  7. package/dist/UI5ElementMetadata.js.map +1 -1
  8. package/dist/api.json +1 -1
  9. package/dist/asset-registries/Illustrations.js +8 -9
  10. package/dist/asset-registries/Illustrations.js.map +1 -1
  11. package/dist/asset-registries/i18n.js +2 -1
  12. package/dist/asset-registries/i18n.js.map +1 -1
  13. package/dist/config/Icons.d.ts +1 -1
  14. package/dist/config/Icons.js.map +1 -1
  15. package/dist/delegate/ScrollEnablement.js +2 -2
  16. package/dist/delegate/ScrollEnablement.js.map +1 -1
  17. package/dist/features/OpenUI5Enablement.d.ts +1 -1
  18. package/dist/generated/AssetParameters.d.ts +6 -0
  19. package/dist/generated/AssetParameters.js +3 -10
  20. package/dist/generated/AssetParameters.js.map +1 -0
  21. package/dist/generated/VersionInfo.d.ts +10 -0
  22. package/dist/generated/VersionInfo.js +9 -8
  23. package/dist/generated/VersionInfo.js.map +1 -0
  24. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +1 -1
  25. package/dist/renderer/LitRenderer.d.ts +2 -2
  26. package/dist/types/InvisibleMessageMode.d.ts +5 -4
  27. package/dist/types/InvisibleMessageMode.js +4 -5
  28. package/dist/types/InvisibleMessageMode.js.map +1 -1
  29. package/dist/util/ColorConversion.js +152 -153
  30. package/dist/util/ColorConversion.js.map +1 -1
  31. package/dist/util/InvisibleMessage.d.ts +1 -1
  32. package/dist/util/InvisibleMessage.js.map +1 -1
  33. package/dist/util/getClassCopy.d.ts +43 -29
  34. package/lib/generate-asset-parameters/index.js +2 -2
  35. package/lib/generate-version-info/index.js +2 -2
  36. package/package-scripts.cjs +6 -7
  37. package/package.json +7 -4
  38. package/tsconfig.json +3 -0
  39. package/dist/assets/Boot-34b7cea0.css +0 -1
  40. package/dist/assets/Boot-45945c31.js +0 -9
  41. package/dist/assets/bundle.esm-56f2cc97.js +0 -50
  42. package/dist/assets/test/pages/Boot.html-b412e561.js +0 -1
  43. package/dist/assets/test/pages/i18n.html-6d41a141.js +0 -1
  44. package/dist/assets/test/pages/i18n_texts.html-3fee32b8.js +0 -1
  45. package/dist/test/pages/AllTestElements.html +0 -43
  46. package/dist/test/pages/Boot.html +0 -17
  47. package/dist/test/pages/Configuration.html +0 -20
  48. package/dist/test/pages/ConfigurationScript.html +0 -52
  49. package/dist/test/pages/WithComplexTemplate.html +0 -23
  50. package/dist/test/pages/i18n.html +0 -21
  51. package/dist/test/pages/i18n_texts.html +0 -89
package/dist/api.json CHANGED
@@ -1 +1 @@
1
- {"$schema-ref":"http://schemas.sap.com/sapui5/designtime/api.json/1.0","version":"1.62","symbols":[{"kind":"class","name":"I18nBundle","basename":"I18nBundle","resource":"i18nBundle.js","module":"i18nBundle","visibility":"public","constructor":{"visibility":"public"},"methods":[{"name":"getText","visibility":"public","returnValue":{"type":"string"},"parameters":[{"name":"textObj","type":"Object|String","optional":false,"description":"key/defaultText pair or just the key"},{"name":"params","type":"undefined","optional":false,"description":"Values for the placeholders"}],"description":"Returns a text in the currently loaded language"}]},{"kind":"class","name":"ItemNavigation","basename":"ItemNavigation","resource":"delegate/ItemNavigation.js","module":"delegate/ItemNavigation","visibility":"public","description":"The ItemNavigation class manages the calculations to determine the correct \"tabindex\" for a group of related items inside a root component. Important: ItemNavigation only does the calculations and does not change \"tabindex\" directly, this is a responsibility of the developer.\n\nThe keys that trigger ItemNavigation are: - Up/down - Left/right - Home/End\n\nUsage: 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\nEach item passed to ItemNavigation via \"getItemsCallback\" must be: - A) either a UI5Element with a \"_tabIndex\" property - B) or an Object with \"id\" and \"_tabIndex\" properties which represents a part of the root component's shadow DOM. The \"id\" must be a valid ID within the shadow root of the component ItemNavigation operates on. 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 and the developer has the responsibility to update the \"tabindex\" in the component's DOM. - C) a combination of the above\n\nWhenever the user navigates with the keyboard, ItemNavigation will modify the \"_tabIndex\" properties of the items. 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). If the items of the ItemNavigation are UI5Elements themselves, this can happen naturally since they will be invalidated by their \"_tabIndex\" property. 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. 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\n2) Call the \"setCurrentItem\" method of ItemNavigation whenever you want to change the current item. This is most commonly required if the user for example clicks on an item and thus selects it directly. Pass as the only argument to \"setCurrentItem\" the item that becomes current (must be one of the items, returned by \"getItemsCallback\").","constructor":{"visibility":"public","parameters":[{"name":"rootWebComponent","type":"undefined","optional":false,"description":"the component to operate on (component that slots or contains within its shadow root the items the user navigates among)"},{"name":"options","type":"ItemNavigationOptions","optional":false,"description":"Object with configuration options: - currentIndex: the index of the item that will be initially selected (from which navigation will begin) - 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) - 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 - skipItemsSize: tells how many items upon PAGE_UP and PAGE_DOWN should be skipped to applying the focus on the next item - behavior (Static|Cycling): tells what to do when trying to navigate beyond the first and last items Static means that nothing happens if the user tries to navigate beyond the first/last item. Cycling means that when the user navigates beyond the last item they go to the first and vice versa. - getItemsCallback: function that, when called, returns an array with all items the user can navigate among - 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"}]},"methods":[{"name":"setCurrentItem","visibility":"public","parameters":[{"name":"current","type":"undefined","optional":false,"description":"the new selected item"}],"description":"Call this method to set a new \"current\" (selected) item in the item navigation Note: the item passed to this function must be one of the items, returned by the getItemsCallback function"},{"name":"setRowSize","visibility":"public","parameters":[{"name":"newRowSize","type":"undefined","optional":false}],"description":"Call this method to dynamically change the row size"}]},{"kind":"namespace","name":"MediaRange.RANGESETS","basename":"RANGESETS","resource":"MediaRange.js","module":"MediaRange","export":"RANGESETS","static":true,"visibility":"public","description":"Enumeration containing the names and settings of predefined screen width media query range sets.","properties":[{"name":"RANGE_4STEPS","visibility":"public","static":true,"type":"undefined","description":"A 4-step range set (S-M-L-XL).\n\nThe ranges of this set are: <ul> <li><code>\"S\"</code>: For screens smaller than 600 pixels.</li> <li><code>\"M\"</code>: For screens greater than or equal to 600 pixels and smaller than 1024 pixels.</li> <li><code>\"L\"</code>: For screens greater than or equal to 1024 pixels and smaller than 1440 pixels.</li> <li><code>\"XL\"</code>: For screens greater than or equal to 1440 pixels.</li> </ul>"}],"slots":[]},{"kind":"class","name":"ResizeHandler","basename":"ResizeHandler","resource":"delegate/ResizeHandler.js","module":"delegate/ResizeHandler","visibility":"public","description":"Allows to register/deregister resize observers for a DOM element","constructor":{"visibility":"public"},"methods":[{"name":"deregister","visibility":"public","static":true,"parameters":[{"name":"element","type":"*","optional":false,"description":"UI5 Web Component or DOM Element to be unobserved"},{"name":"callback","type":"*","optional":false,"description":"Callback to be removed"}]},{"name":"register","visibility":"public","static":true,"parameters":[{"name":"element","type":"*","optional":false,"description":"UI5 Web Component or DOM Element to be observed"},{"name":"callback","type":"*","optional":false,"description":"Callback to be executed"}]}]},{"kind":"enum","name":"sap.ui.webc.base.types.AnimationMode","basename":"AnimationMode","resource":"types/AnimationMode.js","module":"types/AnimationMode","static":true,"visibility":"public","description":"Different types of AnimationMode.","properties":[{"name":"Basic","visibility":"public","type":"Basic"},{"name":"Full","visibility":"public","type":"Full"},{"name":"Minimal","visibility":"public","type":"Minimal"},{"name":"None","visibility":"public","type":"None"}],"slots":[]},{"kind":"enum","name":"sap.ui.webc.base.types.CalendarType","basename":"CalendarType","resource":"types/CalendarType.js","module":"types/CalendarType","static":true,"visibility":"public","description":"Different calendar types.","properties":[{"name":"Buddhist","visibility":"public","type":"Buddhist"},{"name":"Gregorian","visibility":"public","type":"Gregorian"},{"name":"Islamic","visibility":"public","type":"Islamic"},{"name":"Japanese","visibility":"public","type":"Japanese"},{"name":"Persian","visibility":"public","type":"Persian"}],"slots":[]},{"kind":"class","name":"sap.ui.webc.base.types.CSSColor","basename":"CSSColor","resource":"types/CSSColor.js","module":"types/CSSColor","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"CSSColor data type.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.CSSSize","basename":"CSSSize","resource":"types/CSSSize.js","module":"types/CSSSize","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"CSSSize data type.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.DataType","basename":"DataType","resource":"types/DataType.js","module":"types/DataType","static":true,"visibility":"public","constructor":{"visibility":"public"},"methods":[{"name":"isValid","visibility":"public","static":true,"returnValue":{"type":"Boolean"},"description":"Checks if the value is valid for its data type."}]},{"kind":"class","name":"sap.ui.webc.base.types.DOMReference","basename":"DOMReference","resource":"types/DOMReference.js","module":"types/DOMReference","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"DOM Element reference or ID. <b>Note:</b> If an ID is passed, it is expected to be part of the same <code>document</code> element as the consuming component.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.Float","basename":"Float","resource":"types/Float.js","module":"types/Float","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"Float data type.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.Integer","basename":"Integer","resource":"types/Integer.js","module":"types/Integer","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"Integer data type.","constructor":{"visibility":"public"}},{"kind":"enum","name":"sap.ui.webc.base.types.InvisibleMessageMode","basename":"InvisibleMessageMode","resource":"types/InvisibleMessageMode.js","module":"types/InvisibleMessageMode","static":true,"visibility":"public","description":"Enumeration for different mode behaviors of the InvisibleMessage.","properties":[{"name":"Assertive","visibility":"public","type":"Assertive","description":"Indicates that updates to the region have the highest priority and should be presented to the user immediately."},{"name":"Polite","visibility":"public","type":"Polite","description":"Indicates that updates to the region should be presented at the next graceful opportunity, such as at the end of reading the current sentence, or when the user pauses typing."}],"slots":[]},{"kind":"enum","name":"sap.ui.webc.base.types.ItemNavigationBehavior","basename":"ItemNavigationBehavior","resource":"types/ItemNavigationBehavior.js","module":"types/ItemNavigationBehavior","static":true,"visibility":"public","description":"Different behavior for ItemNavigation.","properties":[{"name":"Cyclic","visibility":"public","type":"Cyclic","description":"Cycling behavior: navigating past the last item continues with the first and vice versa."},{"name":"Static","visibility":"public","type":"Static","description":"Static behavior: navigations stops at the first or last item."}],"slots":[]},{"kind":"enum","name":"sap.ui.webc.base.types.NavigationMode","basename":"NavigationMode","resource":"types/NavigationMode.js","module":"types/NavigationMode","static":true,"visibility":"public","description":"Different navigation modes for ItemNavigation.","properties":[{"name":"Auto","visibility":"public","type":"Auto"},{"name":"Horizontal","visibility":"public","type":"Horizontal"},{"name":"Paging","visibility":"public","type":"Paging"},{"name":"Vertical","visibility":"public","type":"Vertical"}],"slots":[]},{"kind":"enum","name":"sap.ui.webc.base.types.ValueState","basename":"ValueState","resource":"types/ValueState.js","module":"types/ValueState","static":true,"visibility":"public","description":"Different types of ValueStates.","properties":[{"name":"Error","visibility":"public","type":"Error"},{"name":"Information","visibility":"public","type":"Information"},{"name":"None","visibility":"public","type":"None"},{"name":"Success","visibility":"public","type":"Success"},{"name":"Warning","visibility":"public","type":"Warning"}],"slots":[]},{"kind":"class","name":"sap.ui.webc.base.UI5Element","basename":"UI5Element","resource":"UI5Element.js","module":"UI5Element","static":true,"visibility":"public","extends":"HTMLElement","constructor":{"visibility":"public"},"properties":[{"name":"_id","visibility":"protected","type":"undefined","description":"Returns a unique ID for this UI5 Element","deprecated":{"text":"- This property is not guaranteed in future releases"}},{"name":"dependencies","visibility":"protected","static":true,"type":"undefined","description":"Returns an array with the dependencies for this UI5 Web Component, which could be: - composed components (used in its shadow root or static area item) - slotted components that the component may need to communicate with"},{"name":"effectiveDir","visibility":"public","type":"undefined","description":"Determines whether the component should be rendered in RTL mode or not. Returns: \"rtl\", \"ltr\" or undefined"},{"name":"isUI5Element","visibility":"public","type":"undefined","description":"Used to duck-type UI5 elements without using instanceof"},{"name":"metadata","visibility":"protected","static":true,"type":"undefined","description":"Returns the metadata object for this UI5 Web Component Class"},{"name":"staticAreaStyles","visibility":"protected","static":true,"type":"undefined","description":"Returns the Static Area CSS for this UI5 Web Component Class"},{"name":"styles","visibility":"protected","static":true,"type":"undefined","description":"Returns the CSS for this UI5 Web Component Class"}],"slots":[],"methods":[{"name":"_render","visibility":"protected","description":"Do not call this method directly, only intended to be called by js"},{"name":"attachComponentStateFinalized","visibility":"public","parameters":[{"name":"callback","type":"undefined","optional":false}],"description":"Attach a callback that will be executed whenever the component's state is finalized"},{"name":"attachInvalidate","visibility":"public","parameters":[{"name":"callback","type":"InvalidationInfo","optional":false}],"description":"Attach a callback that will be executed whenever the component is invalidated"},{"name":"define","visibility":"public","static":true,"returnValue":{"type":"Promise.<UI5Element>"},"description":"Registers a UI5 Web Component in the browser window object"},{"name":"detachComponentStateFinalized","visibility":"public","parameters":[{"name":"callback","type":"undefined","optional":false}],"description":"Detach the callback that is executed whenever the component's state is finalized"},{"name":"detachInvalidate","visibility":"public","parameters":[{"name":"callback","type":"InvalidationInfo","optional":false}],"description":"Detach the callback that is executed whenever the component is invalidated"},{"name":"fireEvent","visibility":"public","returnValue":{"type":"boolean","description":"false, if the event was cancelled (preventDefault called), true otherwise"},"parameters":[{"name":"name","type":"undefined","optional":false,"description":"name of the event"},{"name":"data","type":"undefined","optional":false,"description":"additional data for the event"},{"name":"cancelable","type":"undefined","optional":false,"defaultValue":false,"description":"true, if the user can call preventDefault on the event object"},{"name":"bubbles","type":"undefined","optional":false,"defaultValue":true,"description":"true, if the event bubbles"}]},{"name":"focus","visibility":"public","parameters":[{"name":"focusOptions","type":"FocusOptions","optional":false,"description":"additional options for the focus"}],"description":"Set the focus to the element, returned by \"getFocusDomRef()\" (marked by \"data-sap-focus-ref\")"},{"name":"getDomRef","visibility":"public","description":"Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template *Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option Use this method instead of \"this.shadowRoot\" to read the Shadow DOM, if ever necessary"},{"name":"getFocusDomRef","visibility":"public","description":"Returns the DOM Element marked with \"data-sap-focus-ref\" inside the template. This is the element that will receive the focus by default."},{"name":"getFocusDomRefAsync","visibility":"public","description":"Waits for dom ref and then returns the DOM Element marked with \"data-sap-focus-ref\" inside the template. This is the element that will receive the focus by default."},{"name":"getMetadata","visibility":"public","static":true,"returnValue":{"type":"UI5ElementMetadata"},"description":"Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents') Note: not to be confused with the \"get metadata()\" method, which returns an object for this class's metadata only"},{"name":"getSlottedNodes","visibility":"public","description":"Returns the actual children, associated with a slot. Useful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content."},{"name":"getStaticAreaItemDomRef","visibility":"public"},{"name":"getUniqueDependencies","visibility":"public","static":true,"description":"Returns a list of the unique dependencies for this UI5 Web Component"},{"name":"onAfterRendering","visibility":"public","description":"Called every time after the component renders."},{"name":"onBeforeRendering","visibility":"public","description":"Called every time before the component renders."},{"name":"onDefine","visibility":"protected","static":true,"returnValue":{"type":"Promise.<void>"},"description":"Hook that will be called upon custom element definition"},{"name":"onEnterDOM","visibility":"public","description":"Called on connectedCallback - added to the DOM."},{"name":"onExitDOM","visibility":"public","description":"Called on disconnectedCallback - removed from the DOM."},{"name":"onInvalidation","visibility":"public","parameters":[{"name":"changeInfo","type":"undefined","optional":false,"description":"An object with information about the change that caused invalidation. The object can have the following properties: - type: (property|slot) tells what caused the invalidation 1) property: a property value was changed either directly or as a result of changing the corresponding attribute 2) slot: a slotted node(nodes) changed in one of several ways (see \"reason\")\n\n- name: the name of the property or slot that caused the invalidation\n\n- reason: (children|textcontent|childchange|slotchange) relevant only for type=\"slot\" only and tells exactly what changed in the slot 1) children: immediate children (HTML elements or text nodes) were added, removed or reordered in the slot 2) textcontent: text nodes in the slot changed value (or nested text nodes were added or changed value). Can only trigger for slots of \"type: Node\" 3) slotchange: a slot element, slotted inside that slot had its \"slotchange\" event listener called. This practically means that transitively slotted children changed. Can only trigger if the child of a slot is a slot element itself. 4) childchange: indicates that a UI5Element child in that slot was invalidated and in turn invalidated the component. Can only trigger for slots with \"invalidateOnChildChange\" metadata descriptor\n\n- newValue: the new value of the property (for type=\"property\" only)\n\n- oldValue: the old value of the property (for type=\"property\" only)\n\n- child the child that was changed (for type=\"slot\" and reason=\"childchange\" only)"}],"description":"A callback that is executed each time an already rendered component is invalidated (scheduled for re-rendering)"}]},{"kind":"class","name":"UI5ElementMetadata","basename":"UI5ElementMetadata","resource":"UI5ElementMetadata.js","module":"UI5ElementMetadata","export":"","visibility":"public","constructor":{"visibility":"public"},"methods":[{"name":"getAttributesList","visibility":"public","returnValue":{"type":"string[]"},"description":"Returns an array with the attributes of the UI5 Element (in kebab-case)"},{"name":"getEvents","visibility":"public","description":"Returns an object with key-value pairs of events and their metadata definitions"},{"name":"getProperties","visibility":"public","description":"Returns an object with key-value pairs of properties and their metadata definitions"},{"name":"getPropertiesList","visibility":"public","returnValue":{"type":"string[]"},"description":"Returns an array with the properties of the UI5 Element (in camelCase)"},{"name":"getPureTag","visibility":"public","description":"Returns the tag of the UI5 Element without the scope"},{"name":"getSlots","visibility":"public","description":"Returns an object with key-value pairs of slots and their metadata definitions"},{"name":"getTag","visibility":"public","description":"Returns the tag of the UI5 Element"},{"name":"hasAttribute","visibility":"public","returnValue":{"type":"boolean"},"parameters":[{"name":"propName","type":"undefined","optional":false}],"description":"Determines whether a property should have an attribute counterpart"},{"name":"hasIndividualSlots","visibility":"public","description":"Determines whether this UI5 Element supports any slots with \"individualSlots: true\""},{"name":"hasSlots","visibility":"public","description":"Determines whether this UI5 Element supports any slots"},{"name":"slotsAreManaged","visibility":"public","description":"Determines whether this UI5 Element needs to invalidate if children are added/removed/changed"},{"name":"supportsF6FastNavigation","visibility":"public","description":"Determines whether this control supports F6 fast navigation"},{"name":"validatePropertyValue","visibility":"public","static":true,"description":"Validates the property's value and returns it if correct or returns the default value if not. <b>Note:</b> Only intended for use by UI5Element.js"}]}]}
1
+ {"$schema-ref":"http://schemas.sap.com/sapui5/designtime/api.json/1.0","version":"1.62","symbols":[{"kind":"class","name":"I18nBundle","basename":"I18nBundle","resource":"i18nBundle.js","module":"i18nBundle","visibility":"public","constructor":{"visibility":"public"},"methods":[{"name":"getText","visibility":"public","returnValue":{"type":"string"},"parameters":[{"name":"textObj","type":"Object|String","optional":false,"description":"key/defaultText pair or just the key"},{"name":"params","type":"undefined","optional":false,"description":"Values for the placeholders"}],"description":"Returns a text in the currently loaded language"}]},{"kind":"class","name":"ItemNavigation","basename":"ItemNavigation","resource":"delegate/ItemNavigation.js","module":"delegate/ItemNavigation","visibility":"public","description":"The ItemNavigation class manages the calculations to determine the correct \"tabindex\" for a group of related items inside a root component. Important: ItemNavigation only does the calculations and does not change \"tabindex\" directly, this is a responsibility of the developer.\n\nThe keys that trigger ItemNavigation are: - Up/down - Left/right - Home/End\n\nUsage: 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\nEach item passed to ItemNavigation via \"getItemsCallback\" must be: - A) either a UI5Element with a \"_tabIndex\" property - B) or an Object with \"id\" and \"_tabIndex\" properties which represents a part of the root component's shadow DOM. The \"id\" must be a valid ID within the shadow root of the component ItemNavigation operates on. 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 and the developer has the responsibility to update the \"tabindex\" in the component's DOM. - C) a combination of the above\n\nWhenever the user navigates with the keyboard, ItemNavigation will modify the \"_tabIndex\" properties of the items. 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). If the items of the ItemNavigation are UI5Elements themselves, this can happen naturally since they will be invalidated by their \"_tabIndex\" property. 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. 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\n2) Call the \"setCurrentItem\" method of ItemNavigation whenever you want to change the current item. This is most commonly required if the user for example clicks on an item and thus selects it directly. Pass as the only argument to \"setCurrentItem\" the item that becomes current (must be one of the items, returned by \"getItemsCallback\").","constructor":{"visibility":"public","parameters":[{"name":"rootWebComponent","type":"undefined","optional":false,"description":"the component to operate on (component that slots or contains within its shadow root the items the user navigates among)"},{"name":"options","type":"ItemNavigationOptions","optional":false,"description":"Object with configuration options: - currentIndex: the index of the item that will be initially selected (from which navigation will begin) - 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) - 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 - skipItemsSize: tells how many items upon PAGE_UP and PAGE_DOWN should be skipped to applying the focus on the next item - behavior (Static|Cycling): tells what to do when trying to navigate beyond the first and last items Static means that nothing happens if the user tries to navigate beyond the first/last item. Cycling means that when the user navigates beyond the last item they go to the first and vice versa. - getItemsCallback: function that, when called, returns an array with all items the user can navigate among - 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"}]},"methods":[{"name":"setCurrentItem","visibility":"public","parameters":[{"name":"current","type":"undefined","optional":false,"description":"the new selected item"}],"description":"Call this method to set a new \"current\" (selected) item in the item navigation Note: the item passed to this function must be one of the items, returned by the getItemsCallback function"},{"name":"setRowSize","visibility":"public","parameters":[{"name":"newRowSize","type":"undefined","optional":false}],"description":"Call this method to dynamically change the row size"}]},{"kind":"namespace","name":"MediaRange.RANGESETS","basename":"RANGESETS","resource":"MediaRange.js","module":"MediaRange","export":"RANGESETS","static":true,"visibility":"public","description":"Enumeration containing the names and settings of predefined screen width media query range sets.","properties":[{"name":"RANGE_4STEPS","visibility":"public","static":true,"type":"undefined","description":"A 4-step range set (S-M-L-XL).\n\nThe ranges of this set are: <ul> <li><code>\"S\"</code>: For screens smaller than 600 pixels.</li> <li><code>\"M\"</code>: For screens greater than or equal to 600 pixels and smaller than 1024 pixels.</li> <li><code>\"L\"</code>: For screens greater than or equal to 1024 pixels and smaller than 1440 pixels.</li> <li><code>\"XL\"</code>: For screens greater than or equal to 1440 pixels.</li> </ul>"}],"slots":[]},{"kind":"class","name":"ResizeHandler","basename":"ResizeHandler","resource":"delegate/ResizeHandler.js","module":"delegate/ResizeHandler","visibility":"public","description":"Allows to register/deregister resize observers for a DOM element","constructor":{"visibility":"public"},"methods":[{"name":"deregister","visibility":"public","static":true,"parameters":[{"name":"element","type":"*","optional":false,"description":"UI5 Web Component or DOM Element to be unobserved"},{"name":"callback","type":"*","optional":false,"description":"Callback to be removed"}]},{"name":"register","visibility":"public","static":true,"parameters":[{"name":"element","type":"*","optional":false,"description":"UI5 Web Component or DOM Element to be observed"},{"name":"callback","type":"*","optional":false,"description":"Callback to be executed"}]}]},{"kind":"enum","name":"sap.ui.webc.base.types.AnimationMode","basename":"AnimationMode","resource":"types/AnimationMode.js","module":"types/AnimationMode","static":true,"visibility":"public","description":"Different types of AnimationMode.","properties":[{"name":"Basic","visibility":"public","type":"Basic"},{"name":"Full","visibility":"public","type":"Full"},{"name":"Minimal","visibility":"public","type":"Minimal"},{"name":"None","visibility":"public","type":"None"}],"slots":[]},{"kind":"enum","name":"sap.ui.webc.base.types.CalendarType","basename":"CalendarType","resource":"types/CalendarType.js","module":"types/CalendarType","static":true,"visibility":"public","description":"Different calendar types.","properties":[{"name":"Buddhist","visibility":"public","type":"Buddhist"},{"name":"Gregorian","visibility":"public","type":"Gregorian"},{"name":"Islamic","visibility":"public","type":"Islamic"},{"name":"Japanese","visibility":"public","type":"Japanese"},{"name":"Persian","visibility":"public","type":"Persian"}],"slots":[]},{"kind":"class","name":"sap.ui.webc.base.types.CSSColor","basename":"CSSColor","resource":"types/CSSColor.js","module":"types/CSSColor","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"CSSColor data type.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.CSSSize","basename":"CSSSize","resource":"types/CSSSize.js","module":"types/CSSSize","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"CSSSize data type.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.DataType","basename":"DataType","resource":"types/DataType.js","module":"types/DataType","static":true,"visibility":"public","constructor":{"visibility":"public"},"methods":[{"name":"isValid","visibility":"public","static":true,"returnValue":{"type":"Boolean"},"description":"Checks if the value is valid for its data type."}]},{"kind":"class","name":"sap.ui.webc.base.types.DOMReference","basename":"DOMReference","resource":"types/DOMReference.js","module":"types/DOMReference","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"DOM Element reference or ID. <b>Note:</b> If an ID is passed, it is expected to be part of the same <code>document</code> element as the consuming component.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.Float","basename":"Float","resource":"types/Float.js","module":"types/Float","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"Float data type.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.Integer","basename":"Integer","resource":"types/Integer.js","module":"types/Integer","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"Integer data type.","constructor":{"visibility":"public"}},{"kind":"enum","name":"sap.ui.webc.base.types.ItemNavigationBehavior","basename":"ItemNavigationBehavior","resource":"types/ItemNavigationBehavior.js","module":"types/ItemNavigationBehavior","static":true,"visibility":"public","description":"Different behavior for ItemNavigation.","properties":[{"name":"Cyclic","visibility":"public","type":"Cyclic","description":"Cycling behavior: navigating past the last item continues with the first and vice versa."},{"name":"Static","visibility":"public","type":"Static","description":"Static behavior: navigations stops at the first or last item."}],"slots":[]},{"kind":"enum","name":"sap.ui.webc.base.types.NavigationMode","basename":"NavigationMode","resource":"types/NavigationMode.js","module":"types/NavigationMode","static":true,"visibility":"public","description":"Different navigation modes for ItemNavigation.","properties":[{"name":"Auto","visibility":"public","type":"Auto"},{"name":"Horizontal","visibility":"public","type":"Horizontal"},{"name":"Paging","visibility":"public","type":"Paging"},{"name":"Vertical","visibility":"public","type":"Vertical"}],"slots":[]},{"kind":"enum","name":"sap.ui.webc.base.types.ValueState","basename":"ValueState","resource":"types/ValueState.js","module":"types/ValueState","static":true,"visibility":"public","description":"Different types of ValueStates.","properties":[{"name":"Error","visibility":"public","type":"Error"},{"name":"Information","visibility":"public","type":"Information"},{"name":"None","visibility":"public","type":"None"},{"name":"Success","visibility":"public","type":"Success"},{"name":"Warning","visibility":"public","type":"Warning"}],"slots":[]},{"kind":"class","name":"sap.ui.webc.base.UI5Element","basename":"UI5Element","resource":"UI5Element.js","module":"UI5Element","static":true,"visibility":"public","extends":"HTMLElement","constructor":{"visibility":"public"},"properties":[{"name":"_id","visibility":"protected","type":"undefined","description":"Returns a unique ID for this UI5 Element","deprecated":{"text":"- This property is not guaranteed in future releases"}},{"name":"dependencies","visibility":"protected","static":true,"type":"undefined","description":"Returns an array with the dependencies for this UI5 Web Component, which could be: - composed components (used in its shadow root or static area item) - slotted components that the component may need to communicate with"},{"name":"effectiveDir","visibility":"public","type":"undefined","description":"Determines whether the component should be rendered in RTL mode or not. Returns: \"rtl\", \"ltr\" or undefined"},{"name":"isUI5Element","visibility":"public","type":"undefined","description":"Used to duck-type UI5 elements without using instanceof"},{"name":"metadata","visibility":"protected","static":true,"type":"undefined","description":"Returns the metadata object for this UI5 Web Component Class"},{"name":"staticAreaStyles","visibility":"protected","static":true,"type":"undefined","description":"Returns the Static Area CSS for this UI5 Web Component Class"},{"name":"styles","visibility":"protected","static":true,"type":"undefined","description":"Returns the CSS for this UI5 Web Component Class"}],"slots":[],"methods":[{"name":"_render","visibility":"protected","description":"Do not call this method directly, only intended to be called by js"},{"name":"attachComponentStateFinalized","visibility":"public","parameters":[{"name":"callback","type":"undefined","optional":false}],"description":"Attach a callback that will be executed whenever the component's state is finalized"},{"name":"attachInvalidate","visibility":"public","parameters":[{"name":"callback","type":"InvalidationInfo","optional":false}],"description":"Attach a callback that will be executed whenever the component is invalidated"},{"name":"define","visibility":"public","static":true,"returnValue":{"type":"Promise.<UI5Element>"},"description":"Registers a UI5 Web Component in the browser window object"},{"name":"detachComponentStateFinalized","visibility":"public","parameters":[{"name":"callback","type":"undefined","optional":false}],"description":"Detach the callback that is executed whenever the component's state is finalized"},{"name":"detachInvalidate","visibility":"public","parameters":[{"name":"callback","type":"InvalidationInfo","optional":false}],"description":"Detach the callback that is executed whenever the component is invalidated"},{"name":"fireEvent","visibility":"public","returnValue":{"type":"boolean","description":"false, if the event was cancelled (preventDefault called), true otherwise"},"parameters":[{"name":"name","type":"undefined","optional":false,"description":"name of the event"},{"name":"data","type":"undefined","optional":false,"description":"additional data for the event"},{"name":"cancelable","type":"undefined","optional":false,"defaultValue":false,"description":"true, if the user can call preventDefault on the event object"},{"name":"bubbles","type":"undefined","optional":false,"defaultValue":true,"description":"true, if the event bubbles"}]},{"name":"focus","visibility":"public","parameters":[{"name":"focusOptions","type":"FocusOptions","optional":false,"description":"additional options for the focus"}],"description":"Set the focus to the element, returned by \"getFocusDomRef()\" (marked by \"data-sap-focus-ref\")"},{"name":"getDomRef","visibility":"public","description":"Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template *Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option Use this method instead of \"this.shadowRoot\" to read the Shadow DOM, if ever necessary"},{"name":"getFocusDomRef","visibility":"public","description":"Returns the DOM Element marked with \"data-sap-focus-ref\" inside the template. This is the element that will receive the focus by default."},{"name":"getFocusDomRefAsync","visibility":"public","description":"Waits for dom ref and then returns the DOM Element marked with \"data-sap-focus-ref\" inside the template. This is the element that will receive the focus by default."},{"name":"getMetadata","visibility":"public","static":true,"returnValue":{"type":"UI5ElementMetadata"},"description":"Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents') Note: not to be confused with the \"get metadata()\" method, which returns an object for this class's metadata only"},{"name":"getSlottedNodes","visibility":"public","description":"Returns the actual children, associated with a slot. Useful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content."},{"name":"getStaticAreaItemDomRef","visibility":"public"},{"name":"getUniqueDependencies","visibility":"public","static":true,"description":"Returns a list of the unique dependencies for this UI5 Web Component"},{"name":"onAfterRendering","visibility":"public","description":"Called every time after the component renders."},{"name":"onBeforeRendering","visibility":"public","description":"Called every time before the component renders."},{"name":"onDefine","visibility":"protected","static":true,"returnValue":{"type":"Promise.<void>"},"description":"Hook that will be called upon custom element definition"},{"name":"onEnterDOM","visibility":"public","description":"Called on connectedCallback - added to the DOM."},{"name":"onExitDOM","visibility":"public","description":"Called on disconnectedCallback - removed from the DOM."},{"name":"onInvalidation","visibility":"public","parameters":[{"name":"changeInfo","type":"undefined","optional":false,"description":"An object with information about the change that caused invalidation. The object can have the following properties: - type: (property|slot) tells what caused the invalidation 1) property: a property value was changed either directly or as a result of changing the corresponding attribute 2) slot: a slotted node(nodes) changed in one of several ways (see \"reason\")\n\n- name: the name of the property or slot that caused the invalidation\n\n- reason: (children|textcontent|childchange|slotchange) relevant only for type=\"slot\" only and tells exactly what changed in the slot 1) children: immediate children (HTML elements or text nodes) were added, removed or reordered in the slot 2) textcontent: text nodes in the slot changed value (or nested text nodes were added or changed value). Can only trigger for slots of \"type: Node\" 3) slotchange: a slot element, slotted inside that slot had its \"slotchange\" event listener called. This practically means that transitively slotted children changed. Can only trigger if the child of a slot is a slot element itself. 4) childchange: indicates that a UI5Element child in that slot was invalidated and in turn invalidated the component. Can only trigger for slots with \"invalidateOnChildChange\" metadata descriptor\n\n- newValue: the new value of the property (for type=\"property\" only)\n\n- oldValue: the old value of the property (for type=\"property\" only)\n\n- child the child that was changed (for type=\"slot\" and reason=\"childchange\" only)"}],"description":"A callback that is executed each time an already rendered component is invalidated (scheduled for re-rendering)"}]},{"kind":"class","name":"UI5ElementMetadata","basename":"UI5ElementMetadata","resource":"UI5ElementMetadata.js","module":"UI5ElementMetadata","export":"","visibility":"public","constructor":{"visibility":"public"},"methods":[{"name":"getAttributesList","visibility":"public","returnValue":{"type":"string[]"},"description":"Returns an array with the attributes of the UI5 Element (in kebab-case)"},{"name":"getEvents","visibility":"public","description":"Returns an object with key-value pairs of events and their metadata definitions"},{"name":"getProperties","visibility":"public","description":"Returns an object with key-value pairs of properties and their metadata definitions"},{"name":"getPropertiesList","visibility":"public","returnValue":{"type":"string[]"},"description":"Returns an array with the properties of the UI5 Element (in camelCase)"},{"name":"getPureTag","visibility":"public","description":"Returns the tag of the UI5 Element without the scope"},{"name":"getSlots","visibility":"public","description":"Returns an object with key-value pairs of slots and their metadata definitions"},{"name":"getTag","visibility":"public","description":"Returns the tag of the UI5 Element"},{"name":"hasAttribute","visibility":"public","returnValue":{"type":"boolean"},"parameters":[{"name":"propName","type":"undefined","optional":false}],"description":"Determines whether a property should have an attribute counterpart"},{"name":"hasIndividualSlots","visibility":"public","description":"Determines whether this UI5 Element supports any slots with \"individualSlots: true\""},{"name":"hasSlots","visibility":"public","description":"Determines whether this UI5 Element supports any slots"},{"name":"slotsAreManaged","visibility":"public","description":"Determines whether this UI5 Element needs to invalidate if children are added/removed/changed"},{"name":"supportsF6FastNavigation","visibility":"public","description":"Determines whether this control supports F6 fast navigation"},{"name":"validatePropertyValue","visibility":"public","static":true,"description":"Validates the property's value and returns it if correct or returns the default value if not. <b>Note:</b> Only intended for use by UI5Element.js"}]}]}
@@ -1,20 +1,19 @@
1
1
  import getSharedResource from "../getSharedResource.js";
2
2
  import { getTheme } from "../config/Theme.js";
3
- var IllustrationCollections;
4
- (function (IllustrationCollections) {
5
- IllustrationCollections["sap_horizon"] = "V5";
6
- IllustrationCollections["sap_horizon_dark"] = "V5";
7
- IllustrationCollections["sap_horizon_hcb"] = "V5/HC";
8
- IllustrationCollections["sap_horizon_hcw"] = "V5/HC";
9
- })(IllustrationCollections || (IllustrationCollections = {}));
3
+ const IllustrationCollections = new Map([
4
+ ["sap_horizon", "V5"],
5
+ ["sap_horizon_dark", "V5"],
6
+ ["sap_horizon_hcb", "V5/HC"],
7
+ ["sap_horizon_hcw", "V5/HC"],
8
+ ]);
10
9
  const FALLBACK_COLLECTION = "V4";
11
10
  const loaders = new Map();
12
11
  const registry = getSharedResource("SVGIllustration.registry", new Map());
13
12
  const illustrationPromises = getSharedResource("SVGIllustration.promises", new Map());
14
13
  const getCollection = () => {
15
14
  const theme = getTheme();
16
- if (IllustrationCollections[theme]) {
17
- return IllustrationCollections[theme];
15
+ if (IllustrationCollections.has(theme)) {
16
+ return IllustrationCollections.get(theme);
18
17
  }
19
18
  return FALLBACK_COLLECTION;
20
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Illustrations.js","sourceRoot":"","sources":["../../src/asset-registries/Illustrations.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAiB9C,IAAK,uBAKJ;AALD,WAAK,uBAAuB;IAC3B,6CAAoB,CAAA;IACpB,kDAAyB,CAAA;IACzB,oDAA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MAAM,IAAI,KAAK,CAAC,gCAAgC,gBAAgB,iGAAiG,gBAAgB,uLAAuL,CAAC,CAAC;SAC1W;QAED,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAE,CAAC;QAClD,oBAAoB,CAAC,GAAG,CAAC,SAAS,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;KAClE;IACD,OAAO,oBAAoB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,gBAAwB,EAAE,EAAE;IAC5D,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACtD,OAAO,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,KAAK,EAAE,gBAAwB,EAAE,EAAE;IAC9D,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAEtD,MAAM,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,OAAO,EACN,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,GACnB,CAAC","sourcesContent":["import getSharedResource from \"../getSharedResource.js\";\nimport type { I18nText } from \"../i18nBundle.js\";\nimport { getTheme } from \"../config/Theme.js\";\n\ntype IllustrationLoader = (illustrationName: string) => Promise<IllustrationData>;\n\ntype IllustrationProperties = {\n\tdialogSvg: string,\n\tsceneSvg: string,\n\tspotSvg: string,\n\ttitle: I18nText,\n\tsubtitle: I18nText,\n};\n\ntype IllustrationData = IllustrationProperties & {\n\tset: string,\n\tcollection: string,\n};\n\nenum IllustrationCollections {\n\t\"sap_horizon\" = \"V5\",\n\t\"sap_horizon_dark\" = \"V5\",\n\t\"sap_horizon_hcb\" = \"V5/HC\",\n\t\"sap_horizon_hcw\" = \"V5/HC\",\n}\n\nconst FALLBACK_COLLECTION = \"V4\";\n\nconst loaders = new Map<string, IllustrationLoader>();\nconst registry = getSharedResource<Map<string, IllustrationProperties>>(\"SVGIllustration.registry\", new Map());\nconst illustrationPromises = getSharedResource<Map<string, Promise<IllustrationData>>>(\"SVGIllustration.promises\", new Map());\n\nconst getCollection = () => {\n\tconst theme = getTheme() as keyof typeof IllustrationCollections;\n\n\tif (IllustrationCollections[theme]) {\n\t\treturn IllustrationCollections[theme];\n\t}\n\n\treturn FALLBACK_COLLECTION;\n};\n\n/**\n * Processes the name of the illustration\n * The name is used to generate the registry key and the loader key\n * The registry key is used to store and get the illustration data from the registry\n * The loader key is used to store and get the illustration loader from the loaders map\n * The function generates the correct registry key and loader key based on whether an loader exists for the illustration\n * If there is no loader registered for the collection, it falls back to the default collection\n */\nconst processName = (name: string) => {\n\tlet collection = getCollection();\n\tconst isTnt = name.startsWith(\"Tnt\");\n\tconst set = isTnt ? \"tnt\" : \"fiori\";\n\n\tlet registryKey = `${set}/${collection}/${name}`;\n\tlet loaderKey = `${collection}/${name}`;\n\n\tif (!loaders.has(loaderKey) && collection !== FALLBACK_COLLECTION) {\n\t\tcollection = FALLBACK_COLLECTION;\n\t\tloaderKey = `${collection}/${name}`;\n\t\tregistryKey = `${set}/${collection}/${name}`;\n\t}\n\n\tif (isTnt) {\n\t\tname = name.replace(/^Tnt/, \"\");\n\t\tregistryKey = `${set}/${collection}/${name}`;\n\t}\n\n\treturn {\n\t\tregistryKey,\n\t\tloaderKey,\n\t\tcollection,\n\t};\n};\n\nconst registerIllustration = (name: string, data: IllustrationData) => {\n\tconst collection = data.collection || FALLBACK_COLLECTION;\n\tregistry.set(`${data.set}/${collection}/${name}`, {\n\t\tdialogSvg: data.dialogSvg,\n\t\tsceneSvg: data.sceneSvg,\n\t\tspotSvg: data.spotSvg,\n\t\ttitle: data.title,\n\t\tsubtitle: data.subtitle,\n\t});\n};\n\nconst registerIllustrationLoader = (illustrationName: string, loader: IllustrationLoader) => {\n\tloaders.set(illustrationName, loader);\n};\n\nconst _loadIllustrationOnce = (illustrationName: string) => {\n\tconst { loaderKey } = processName(illustrationName);\n\n\tif (!illustrationPromises.has(loaderKey)) {\n\t\tif (!loaders.has(loaderKey)) {\n\t\t\tconst illustrationPath = illustrationName.startsWith(\"Tnt\") ? `tnt/${illustrationName.replace(/^Tnt/, \"\")}` : illustrationName;\n\t\t\tthrow new Error(`No loader registered for the ${illustrationName} illustration. Probably you forgot to import the \"@ui5/webcomponents-fiori/dist/illustrations/${illustrationPath}.js\" module. Or you can import the \"@ui5/webcomponents-fiori/dist/illustrations/AllIllustrations.js\" module that will make all illustrations available, but fetch only the ones used.`);\n\t\t}\n\n\t\tconst loadIllustrations = loaders.get(loaderKey)!;\n\t\tillustrationPromises.set(loaderKey, loadIllustrations(loaderKey));\n\t}\n\treturn illustrationPromises.get(loaderKey);\n};\n\nconst getIllustrationDataSync = (illustrationName: string) => {\n\tconst { registryKey } = processName(illustrationName);\n\treturn registry.get(registryKey);\n};\n\nconst getIllustrationData = async (illustrationName: string) => {\n\tconst { registryKey } = processName(illustrationName);\n\n\tawait _loadIllustrationOnce(illustrationName);\n\treturn registry.get(registryKey);\n};\n\nexport {\n\tgetIllustrationDataSync,\n\tregisterIllustration,\n\tregisterIllustrationLoader,\n\tgetIllustrationData,\n};\n"]}
1
+ {"version":3,"file":"Illustrations.js","sourceRoot":"","sources":["../../src/asset-registries/Illustrations.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAiB9C,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;IACvC,CAAC,aAAa,EAAE,IAAI,CAAC;IACrB,CAAC,kBAAkB,EAAE,IAAI,CAAC;IAC1B,CAAC,iBAAiB,EAAE,OAAO,CAAC;IAC5B,CAAC,iBAAiB,EAA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C,gCAAgC,gBAAgB,iGAAiG,gBAAgB,uLAAuL,CAAC,CAAC;SAC1W;QAED,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAE,CAAC;QAClD,oBAAoB,CAAC,GAAG,CAAC,SAAS,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;KAClE;IACD,OAAO,oBAAoB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,gBAAwB,EAAE,EAAE;IAC5D,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC;IACtD,OAAO,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,KAAK,EAAE,gBAAwB,EAAE,EAAE;IAC9D,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAEtD,MAAM,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAClC,CAAC,CAAC;AAEF,OAAO,EACN,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,GACnB,CAAC","sourcesContent":["import getSharedResource from \"../getSharedResource.js\";\nimport type { I18nText } from \"../i18nBundle.js\";\nimport { getTheme } from \"../config/Theme.js\";\n\ntype IllustrationLoader = (illustrationName: string) => Promise<IllustrationData>;\n\ntype IllustrationProperties = {\n\tdialogSvg: string,\n\tsceneSvg: string,\n\tspotSvg: string,\n\ttitle: I18nText,\n\tsubtitle: I18nText,\n};\n\ntype IllustrationData = IllustrationProperties & {\n\tset: string,\n\tcollection: string,\n};\n\nconst IllustrationCollections = new Map([\n\t[\"sap_horizon\", \"V5\"],\n\t[\"sap_horizon_dark\", \"V5\"],\n\t[\"sap_horizon_hcb\", \"V5/HC\"],\n\t[\"sap_horizon_hcw\", \"V5/HC\"],\n]);\n\nconst FALLBACK_COLLECTION = \"V4\";\n\nconst loaders = new Map<string, IllustrationLoader>();\nconst registry = getSharedResource<Map<string, IllustrationProperties>>(\"SVGIllustration.registry\", new Map());\nconst illustrationPromises = getSharedResource<Map<string, Promise<IllustrationData>>>(\"SVGIllustration.promises\", new Map());\n\nconst getCollection = () => {\n\tconst theme = getTheme();\n\n\tif (IllustrationCollections.has(theme)) {\n\t\treturn IllustrationCollections.get(theme);\n\t}\n\n\treturn FALLBACK_COLLECTION;\n};\n\n/**\n * Processes the name of the illustration\n * The name is used to generate the registry key and the loader key\n * The registry key is used to store and get the illustration data from the registry\n * The loader key is used to store and get the illustration loader from the loaders map\n * The function generates the correct registry key and loader key based on whether an loader exists for the illustration\n * If there is no loader registered for the collection, it falls back to the default collection\n */\nconst processName = (name: string) => {\n\tlet collection = getCollection();\n\tconst isTnt = name.startsWith(\"Tnt\");\n\tconst set = isTnt ? \"tnt\" : \"fiori\";\n\n\tlet registryKey = `${set}/${collection}/${name}`;\n\tlet loaderKey = `${collection}/${name}`;\n\n\tif (!loaders.has(loaderKey) && collection !== FALLBACK_COLLECTION) {\n\t\tcollection = FALLBACK_COLLECTION;\n\t\tloaderKey = `${collection}/${name}`;\n\t\tregistryKey = `${set}/${collection}/${name}`;\n\t}\n\n\tif (isTnt) {\n\t\tname = name.replace(/^Tnt/, \"\");\n\t\tregistryKey = `${set}/${collection}/${name}`;\n\t}\n\n\treturn {\n\t\tregistryKey,\n\t\tloaderKey,\n\t\tcollection,\n\t};\n};\n\nconst registerIllustration = (name: string, data: IllustrationData) => {\n\tconst collection = data.collection || FALLBACK_COLLECTION;\n\tregistry.set(`${data.set}/${collection}/${name}`, {\n\t\tdialogSvg: data.dialogSvg,\n\t\tsceneSvg: data.sceneSvg,\n\t\tspotSvg: data.spotSvg,\n\t\ttitle: data.title,\n\t\tsubtitle: data.subtitle,\n\t});\n};\n\nconst registerIllustrationLoader = (illustrationName: string, loader: IllustrationLoader) => {\n\tloaders.set(illustrationName, loader);\n};\n\nconst _loadIllustrationOnce = (illustrationName: string) => {\n\tconst { loaderKey } = processName(illustrationName);\n\n\tif (!illustrationPromises.has(loaderKey)) {\n\t\tif (!loaders.has(loaderKey)) {\n\t\t\tconst illustrationPath = illustrationName.startsWith(\"Tnt\") ? `tnt/${illustrationName.replace(/^Tnt/, \"\")}` : illustrationName;\n\t\t\tthrow new Error(`No loader registered for the ${illustrationName} illustration. Probably you forgot to import the \"@ui5/webcomponents-fiori/dist/illustrations/${illustrationPath}.js\" module. Or you can import the \"@ui5/webcomponents-fiori/dist/illustrations/AllIllustrations.js\" module that will make all illustrations available, but fetch only the ones used.`);\n\t\t}\n\n\t\tconst loadIllustrations = loaders.get(loaderKey)!;\n\t\tillustrationPromises.set(loaderKey, loadIllustrations(loaderKey));\n\t}\n\treturn illustrationPromises.get(loaderKey);\n};\n\nconst getIllustrationDataSync = (illustrationName: string) => {\n\tconst { registryKey } = processName(illustrationName);\n\treturn registry.get(registryKey);\n};\n\nconst getIllustrationData = async (illustrationName: string) => {\n\tconst { registryKey } = processName(illustrationName);\n\n\tawait _loadIllustrationOnce(illustrationName);\n\treturn registry.get(registryKey);\n};\n\nexport {\n\tgetIllustrationDataSync,\n\tregisterIllustration,\n\tregisterIllustrationLoader,\n\tgetIllustrationData,\n};\n"]}
@@ -63,7 +63,8 @@ const useFallbackBundle = (packageName, localeId) => {
63
63
  const fetchI18nBundle = async (packageName) => {
64
64
  const language = getLocale().getLanguage();
65
65
  const region = getLocale().getRegion();
66
- let localeId = language + (region ? `-${region}` : ``);
66
+ const variant = getLocale().getVariant();
67
+ let localeId = language + (region ? `-${region}` : ``) + (variant ? `-${variant}` : ``);
67
68
  if (useFallbackBundle(packageName, localeId)) {
68
69
  localeId = normalizeLocale(localeId);
69
70
  while (useFallbackBundle(packageName, localeId)) {
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/asset-registries/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,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC;AAEH,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,iBAAiB,GACjB,CAAC","sourcesContent":["import getLocale from \"../locale/getLocale.js\";\nimport { attachLanguageChange } from \"../locale/languageChange.js\";\nimport normalizeLocale from \"../locale/normalizeLocale.js\";\nimport nextFallbackLocale from \"../locale/nextFallbackLocale.js\";\nimport { DEFAULT_LANGUAGE } from \"../generated/AssetParameters.js\";\nimport { getFetchDefaultLanguage } from \"../config/Language.js\";\n\ntype I18nLoader = (localeId: string) => Promise<I18nData>;\ntype I18nData = Record<string, string>;\n\n// contains package names for which the warning has been shown\nconst warningShown = new Set();\nconst reportedErrors = new Set();\n\nconst bundleData = new Map<string, I18nData | null>();\nconst bundlePromises = new Map<string, Promise<I18nData>>();\nconst loaders = new Map<string, I18nLoader>();\n\n/**\n * Registers i18n loader function for given package and locale.\n *\n * @public\n * @param {string} packageName for which package this loader can fetch data\n * @param {string} localeId locale that this loader can handle\n * @param {function} loader async function that will be passed a localeId and should return a JSON object\n */\nconst registerI18nLoader = (packageName: string, localeId: string, loader: I18nLoader) => {\n\t// register loader by key\n\tconst bundleKey = `${packageName}/${localeId}`;\n\tloaders.set(bundleKey, loader);\n};\n\nconst _setI18nBundleData = (packageName: string, data: I18nData | null) => {\n\tbundleData.set(packageName, data);\n};\n\nconst getI18nBundleData = (packageName: string) => {\n\treturn bundleData.get(packageName);\n};\n\nconst _hasLoader = (packageName: string, localeId: string) => {\n\tconst bundleKey = `${packageName}/${localeId}`;\n\treturn loaders.has(bundleKey);\n};\n\n// load bundle over the network once\nconst _loadMessageBundleOnce = (packageName: string, localeId: string) => {\n\tconst bundleKey = `${packageName}/${localeId}`;\n\tconst loadMessageBundle = loaders.get(bundleKey);\n\n\tif (loadMessageBundle && !bundlePromises.get(bundleKey)) {\n\t\tbundlePromises.set(bundleKey, loadMessageBundle(localeId));\n\t}\n\n\treturn bundlePromises.get(bundleKey)!; // Investigate if i18n loader exists and this won't return undefined.\n};\n\nconst _showAssetsWarningOnce = (packageName: string) => {\n\tif (!warningShown.has(packageName)) {\n\t\tconsole.warn(`[${packageName}]: Message bundle assets are not configured. Falling back to English texts.`, /* eslint-disable-line */\n\t\t\t` Add \\`import \"${packageName}/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.`); /* eslint-disable-line */\n\t\twarningShown.add(packageName);\n\t}\n};\n\nconst useFallbackBundle = (packageName: string, localeId: string) => {\n\treturn localeId !== DEFAULT_LANGUAGE && !_hasLoader(packageName, localeId);\n};\n\n/**\n * This method preforms the asynchronous task of fetching the actual text resources. It will fetch\n * each text resource over the network once (even for multiple calls to the same method).\n * It should be fully finished before the i18nBundle class is created in the webcomponents.\n * This method uses the bundle URLs that are populated by the <code>registerI18nBundle</code> method.\n * To simplify the usage, the synchronization of both methods happens internally for the same <code>bundleId</code>\n * @param {packageName} packageName the NPM package name\n * @public\n */\nconst fetchI18nBundle = async (packageName: string) => {\n\tconst language = getLocale().getLanguage();\n\tconst region = getLocale().getRegion();\n\tlet localeId = language + (region ? `-${region}` : ``);\n\n\tif (useFallbackBundle(packageName, localeId)) {\n\t\tlocaleId = normalizeLocale(localeId);\n\n\t\twhile (useFallbackBundle(packageName, localeId)) {\n\t\t\tlocaleId = nextFallbackLocale(localeId);\n\t\t}\n\t}\n\n\t// use default language unless configured to always fetch it from the network\n\tconst fetchDefaultLanguage = getFetchDefaultLanguage();\n\tif (localeId === DEFAULT_LANGUAGE && !fetchDefaultLanguage) {\n\t\t_setI18nBundleData(packageName, null); // reset for the default language (if data was set for a previous language)\n\t\treturn;\n\t}\n\n\tif (!_hasLoader(packageName, localeId)) {\n\t\t_showAssetsWarningOnce(packageName);\n\t\treturn;\n\t}\n\n\ttry {\n\t\tconst data = await _loadMessageBundleOnce(packageName, localeId);\n\t\t_setI18nBundleData(packageName, data);\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\n// When the language changes dynamically (the user calls setLanguage), re-fetch all previously fetched bundles\nattachLanguageChange((lang: string /* eslint-disable-line */) => {\n\tconst allPackages = [...bundleData.keys()];\n\treturn Promise.all(allPackages.map(fetchI18nBundle));\n});\n\nexport {\n\tregisterI18nLoader,\n\tfetchI18nBundle,\n\tgetI18nBundleData,\n};\n"]}
1
+ {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/asset-registries/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,kBAAkB,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAKhE,8DAA8D;AAC9D,MAAM,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;AAC/B,MAAM,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;AAEjC,MAAM,UAAU,GAAG,IAAI,GAAG,EAA2B,CAAC;AACtD,MAAM,cAAc,GAAG,IAAI,GAAG,EAA6B,CAAC;AAC5D,MAAM,OAAO,GAAG,IAAI,GAAG,EAAsB,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAAG,CAAC,WAAmB,EAAE,QAAgB,EAAE,MAAkB,EAAE,EAAE;IACxF,yBAAyB;IACzB,MAAM,SAAS,GAAG,GAAG,WAAW,IAAI,QAAQ,EAAE,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC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AAM,sBAAsB,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QACjE,kBAAkB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;KACtC;IAAC,OAAO,KAAc,EAAE;QACxB,MAAM,CAAC,GAAG,KAAc,CAAC;QACzB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE;YACnC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YAC9B,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB;SACnD;KACD;AACF,CAAC,CAAC;AAEF,8GAA8G;AAC9G,oBAAoB,CAAC,CAAC,IAAY,CAAC,yBAAyB,EAAE,EAAE;IAC/D,MAAM,WAAW,GAAG,CAAC,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3C,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC;AAEH,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,iBAAiB,GACjB,CAAC","sourcesContent":["import getLocale from \"../locale/getLocale.js\";\nimport { attachLanguageChange } from \"../locale/languageChange.js\";\nimport normalizeLocale from \"../locale/normalizeLocale.js\";\nimport nextFallbackLocale from \"../locale/nextFallbackLocale.js\";\nimport { DEFAULT_LANGUAGE } from \"../generated/AssetParameters.js\";\nimport { getFetchDefaultLanguage } from \"../config/Language.js\";\n\ntype I18nLoader = (localeId: string) => Promise<I18nData>;\ntype I18nData = Record<string, string>;\n\n// contains package names for which the warning has been shown\nconst warningShown = new Set();\nconst reportedErrors = new Set();\n\nconst bundleData = new Map<string, I18nData | null>();\nconst bundlePromises = new Map<string, Promise<I18nData>>();\nconst loaders = new Map<string, I18nLoader>();\n\n/**\n * Registers i18n loader function for given package and locale.\n *\n * @public\n * @param {string} packageName for which package this loader can fetch data\n * @param {string} localeId locale that this loader can handle\n * @param {function} loader async function that will be passed a localeId and should return a JSON object\n */\nconst registerI18nLoader = (packageName: string, localeId: string, loader: I18nLoader) => {\n\t// register loader by key\n\tconst bundleKey = `${packageName}/${localeId}`;\n\tloaders.set(bundleKey, loader);\n};\n\nconst _setI18nBundleData = (packageName: string, data: I18nData | null) => {\n\tbundleData.set(packageName, data);\n};\n\nconst getI18nBundleData = (packageName: string) => {\n\treturn bundleData.get(packageName);\n};\n\nconst _hasLoader = (packageName: string, localeId: string) => {\n\tconst bundleKey = `${packageName}/${localeId}`;\n\treturn loaders.has(bundleKey);\n};\n\n// load bundle over the network once\nconst _loadMessageBundleOnce = (packageName: string, localeId: string) => {\n\tconst bundleKey = `${packageName}/${localeId}`;\n\tconst loadMessageBundle = loaders.get(bundleKey);\n\n\tif (loadMessageBundle && !bundlePromises.get(bundleKey)) {\n\t\tbundlePromises.set(bundleKey, loadMessageBundle(localeId));\n\t}\n\n\treturn bundlePromises.get(bundleKey)!; // Investigate if i18n loader exists and this won't return undefined.\n};\n\nconst _showAssetsWarningOnce = (packageName: string) => {\n\tif (!warningShown.has(packageName)) {\n\t\tconsole.warn(`[${packageName}]: Message bundle assets are not configured. Falling back to English texts.`, /* eslint-disable-line */\n\t\t\t` Add \\`import \"${packageName}/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.`); /* eslint-disable-line */\n\t\twarningShown.add(packageName);\n\t}\n};\n\nconst useFallbackBundle = (packageName: string, localeId: string) => {\n\treturn localeId !== DEFAULT_LANGUAGE && !_hasLoader(packageName, localeId);\n};\n\n/**\n * This method preforms the asynchronous task of fetching the actual text resources. It will fetch\n * each text resource over the network once (even for multiple calls to the same method).\n * It should be fully finished before the i18nBundle class is created in the webcomponents.\n * This method uses the bundle URLs that are populated by the <code>registerI18nBundle</code> method.\n * To simplify the usage, the synchronization of both methods happens internally for the same <code>bundleId</code>\n * @param {packageName} packageName the NPM package name\n * @public\n */\nconst fetchI18nBundle = async (packageName: string) => {\n\tconst language = getLocale().getLanguage();\n\tconst region = getLocale().getRegion();\n\tconst variant = getLocale().getVariant();\n\tlet localeId = language + (region ? `-${region}` : ``) + (variant ? `-${variant}` : ``);\n\n\tif (useFallbackBundle(packageName, localeId)) {\n\t\tlocaleId = normalizeLocale(localeId);\n\n\t\twhile (useFallbackBundle(packageName, localeId)) {\n\t\t\tlocaleId = nextFallbackLocale(localeId);\n\t\t}\n\t}\n\n\t// use default language unless configured to always fetch it from the network\n\tconst fetchDefaultLanguage = getFetchDefaultLanguage();\n\tif (localeId === DEFAULT_LANGUAGE && !fetchDefaultLanguage) {\n\t\t_setI18nBundleData(packageName, null); // reset for the default language (if data was set for a previous language)\n\t\treturn;\n\t}\n\n\tif (!_hasLoader(packageName, localeId)) {\n\t\t_showAssetsWarningOnce(packageName);\n\t\treturn;\n\t}\n\n\ttry {\n\t\tconst data = await _loadMessageBundleOnce(packageName, localeId);\n\t\t_setI18nBundleData(packageName, data);\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\n// When the language changes dynamically (the user calls setLanguage), re-fetch all previously fetched bundles\nattachLanguageChange((lang: string /* eslint-disable-line */) => {\n\tconst allPackages = [...bundleData.keys()];\n\treturn Promise.all(allPackages.map(fetchI18nBundle));\n});\n\nexport {\n\tregisterI18nLoader,\n\tfetchI18nBundle,\n\tgetI18nBundleData,\n};\n"]}
@@ -1,4 +1,4 @@
1
- type IconCollection = "SAP-icons" | "SAP-icons-v4" | "SAP-icons-v5" | "horizon" | "tnt" | "tnt-v2" | "tnt-v3" | "business-suite" | "business-suite-v1" | "business-suite-v2" | string;
1
+ type IconCollection = string;
2
2
  /**
3
3
  * Sets the default icon collection for a given theme.
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Icons.js","sourceRoot":"","sources":["../../src/config/Icons.ts"],"names":[],"mappings":"AAAA,MAAM,2BAA2B,GAAG,IAAI,GAAG,EAAkB,CAAC;AAK9D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,wBAAwB,GAAG,CAAC,KAAa,EAAE,cAA8B,EAAE,EAAE;IAClF,2BAA2B,CAAC,GAAG,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,wBAAwB,GAAG,CAAC,KAAa,EAAsB,EAAE;IACtE,OAAO,2BAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,OAAO,EACN,wBAAwB,EACxB,wBAAwB,GACxB,CAAC","sourcesContent":["const IconCollectionConfiguration = new Map<string, string>();\n\n// All supported icon collections + unknown custom ones\ntype IconCollection = \"SAP-icons\" | \"SAP-icons-v4\" | \"SAP-icons-v5\" | \"horizon\" | \"tnt\" | \"tnt-v2\" | \"tnt-v3\" | \"business-suite\" | \"business-suite-v1\" | \"business-suite-v2\" | string;\n\n/**\n * Sets the default icon collection for a given theme.\n *\n * SAP Icons is the default icon collection (that resolves to SAP-icons version 5.x in Horizon theme family and SAP-icons version 4.x in all other themes)\n * and to display icons from other collections, you have to specify the icon collection in addition to the icon name, for example: \"tnt/actor\", \"business-suite/1x2-grid-layout\", etc.\n * This method allows setting another (built-in or custom) icon collection as default per theme.\n *\n * <b>Usage</b>\n * <b>For example</b>, to make \"SAP-icons version 5.x\" the default icon collection in \"sap_fiori_3\":\n *\n * <pre>\n * setDefaultIconCollection(\"sap_fiori_3\", \"SAP-icons-v5\");\n *\n * <ui5-icon name=\"home\"></ui5-icon>\n * </pre>\n *\n * <b>For example</b>, to make a custom icon collection (with name \"my-custom-collection\") the default icon collection in \"sap_fiori_3\":\n *\n * <pre>\n * setDefaultIconCollection(\"sap_fiori_3\", \"my-custom-collection\");\n *\n * <ui5-icon name=\"custom-icon-name\"></ui5-icon>\n * </pre>\n *\n * @public\n * @param { string } theme\n * @param { string } collectionName\n */\nconst setDefaultIconCollection = (theme: string, collectionName: IconCollection) => {\n\tIconCollectionConfiguration.set(theme, collectionName);\n};\n\n/**\n * Returns the configured default icon collection for a given theme.\n *\n * @param { string } theme\n * @public\n * @returns { string | undefined }\n */\nconst getDefaultIconCollection = (theme: string): string | undefined => {\n\treturn IconCollectionConfiguration.get(theme);\n};\n\nexport {\n\tsetDefaultIconCollection,\n\tgetDefaultIconCollection,\n};\n\nexport type {\n\tIconCollection,\n};\n"]}
1
+ {"version":3,"file":"Icons.js","sourceRoot":"","sources":["../../src/config/Icons.ts"],"names":[],"mappings":"AAAA,MAAM,2BAA2B,GAAG,IAAI,GAAG,EAAkB,CAAC;AAK9D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,wBAAwB,GAAG,CAAC,KAAa,EAAE,cAA8B,EAAE,EAAE;IAClF,2BAA2B,CAAC,GAAG,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;AACxD,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,wBAAwB,GAAG,CAAC,KAAa,EAAsB,EAAE;IACtE,OAAO,2BAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,OAAO,EACN,wBAAwB,EACxB,wBAAwB,GACxB,CAAC","sourcesContent":["const IconCollectionConfiguration = new Map<string, string>();\n\n// All supported icon collections + unknown custom ones\ntype IconCollection = string;\n\n/**\n * Sets the default icon collection for a given theme.\n *\n * SAP Icons is the default icon collection (that resolves to SAP-icons version 5.x in Horizon theme family and SAP-icons version 4.x in all other themes)\n * and to display icons from other collections, you have to specify the icon collection in addition to the icon name, for example: \"tnt/actor\", \"business-suite/1x2-grid-layout\", etc.\n * This method allows setting another (built-in or custom) icon collection as default per theme.\n *\n * <b>Usage</b>\n * <b>For example</b>, to make \"SAP-icons version 5.x\" the default icon collection in \"sap_fiori_3\":\n *\n * <pre>\n * setDefaultIconCollection(\"sap_fiori_3\", \"SAP-icons-v5\");\n *\n * <ui5-icon name=\"home\"></ui5-icon>\n * </pre>\n *\n * <b>For example</b>, to make a custom icon collection (with name \"my-custom-collection\") the default icon collection in \"sap_fiori_3\":\n *\n * <pre>\n * setDefaultIconCollection(\"sap_fiori_3\", \"my-custom-collection\");\n *\n * <ui5-icon name=\"custom-icon-name\"></ui5-icon>\n * </pre>\n *\n * @public\n * @param { string } theme\n * @param { string } collectionName\n */\nconst setDefaultIconCollection = (theme: string, collectionName: IconCollection) => {\n\tIconCollectionConfiguration.set(theme, collectionName);\n};\n\n/**\n * Returns the configured default icon collection for a given theme.\n *\n * @param { string } theme\n * @public\n * @returns { string | undefined }\n */\nconst getDefaultIconCollection = (theme: string): string | undefined => {\n\treturn IconCollectionConfiguration.get(theme);\n};\n\nexport {\n\tsetDefaultIconCollection,\n\tgetDefaultIconCollection,\n};\n\nexport type {\n\tIconCollection,\n};\n"]}
@@ -92,7 +92,7 @@ class ScrollEnablement extends EventProvider {
92
92
  if (this.supportsTouch && event instanceof TouchEvent) {
93
93
  touch = event.touches[0];
94
94
  }
95
- if (!this.supportsTouch) {
95
+ if (!touch) {
96
96
  document.addEventListener("mouseup", this.mouseUp, { passive: true });
97
97
  document.addEventListener("mousemove", this.mouseMove, { passive: true });
98
98
  }
@@ -101,7 +101,7 @@ class ScrollEnablement extends EventProvider {
101
101
  this.startX = touch.pageX;
102
102
  this.startY = touch.pageY;
103
103
  }
104
- if (this.supportsTouch && event instanceof TouchEvent) {
104
+ if (touch) {
105
105
  this._prevDragX = touch.pageX;
106
106
  this._prevDragY = touch.pageY;
107
107
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollEnablement.js","sourceRoot":"","sources":["../../src/delegate/ScrollEnablement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,MAAM,MAAM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G,IAAI,CAAC,aAAa,CAAC,CAAC,CAAE,KAAoB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAE,KAAoB,CAAC,CAAC,CAAC;QAE3G,SAAU,CAAC,UAAU,IAAI,IAAI,CAAC,UAAW,GAAG,KAAK,CAAC;QAClD,SAAU,CAAC,SAAS,IAAI,IAAI,CAAC,UAAW,GAAG,KAAK,CAAC;QAEjD,MAAM,eAAe,GAAG,KAAK,KAAK,IAAI,CAAC,UAAU,CAAC;QAClD,MAAM,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QAChE,iFAAiF;QAEjF,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE;YACjC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,UAAW;YACjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC,UAAW;SAClC,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QAExB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACxB,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAC1D,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;SACtD;IACF,CAAC;CACD;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["import { supportsTouch } from \"../Device.js\";\nimport EventProvider from \"../EventProvider.js\";\nimport scroll from \"../animations/scroll.js\";\nimport type UI5Element from \"../UI5Element.js\";\n\nconst scrollEventName = \"scroll\";\nconst touchEndEventName = supportsTouch() ? \"touchend\" : \"mouseup\";\n\ntype ScrollEnablementEventListenerParam = {\n\tisLeft: boolean;\n\tisRight: boolean\n}\ntype ScrollEnablementEventListenerReturn = void;\n\nclass ScrollEnablement extends EventProvider<ScrollEnablementEventListenerParam, ScrollEnablementEventListenerReturn> {\n\tcontainerComponent: UI5Element;\n\tmouseMove: (event: MouseEvent | TouchEvent) => void;\n\tmouseUp: (event: MouseEvent | TouchEvent) => void;\n\ttouchStart: (event: MouseEvent | TouchEvent) => void;\n\tcachedValue: { dragX: number, dragY: number };\n\tstartX: number;\n\tstartY: number;\n\t_container?: HTMLElement;\n\tsupportsTouch = supportsTouch();\n\t_canScroll?: boolean;\n\t_prevDragX?: number;\n\t_prevDragY?: number;\n\n\tconstructor(containerComponent: UI5Element) {\n\t\tsuper();\n\t\tthis.containerComponent = containerComponent;\n\t\tthis.mouseMove = this.ontouchmove.bind(this);\n\t\tthis.mouseUp = this.ontouchend.bind(this);\n\t\tthis.touchStart = this.ontouchstart.bind(this);\n\n\t\tthis.supportsTouch = supportsTouch();\n\n\t\t// On Android devices touchmove is thrown one more time than neccessary (together with touchend)\n\t\t// so we have to cache the previus coordinates in order to provide correct parameters in the\n\t\t// event for Android\n\t\tthis.cachedValue = { dragX: 0, dragY: 0 };\n\n\t\t// In components like Carousel you need to know if the user has clicked on something or swiped\n\t\t// in order to throw the needed event or not\n\t\tthis.startX = 0;\n\t\tthis.startY = 0;\n\n\t\tif (this.supportsTouch) {\n\t\t\tcontainerComponent.addEventListener(\"touchstart\", this.touchStart, { passive: true });\n\t\t\tcontainerComponent.addEventListener(\"touchmove\", this.mouseMove, { passive: true });\n\t\t\tcontainerComponent.addEventListener(\"touchend\", this.mouseUp, { passive: true });\n\t\t} else {\n\t\t\tcontainerComponent.addEventListener(\"mousedown\", this.touchStart, { passive: true });\n\t\t}\n\t}\n\n\tset scrollContainer(container: HTMLElement) {\n\t\tthis._container = container;\n\t}\n\n\tget scrollContainer() {\n\t\treturn this._container!;\n\t}\n\n\t/**\n\t * Scrolls the container to the left/top position, retrying retryCount times, if the container is not yet painted\n\t *\n\t * @param left\n\t * @param top\n\t * @param retryCount\n\t * @param retryInterval\n\t * @returns {Promise<void>} resolved when scrolled successfully\n\t */\n\tasync scrollTo(left: number, top: number, retryCount = 0, retryInterval = 0) {\n\t\tlet containerPainted = this.scrollContainer.clientHeight > 0 && this.scrollContainer.clientWidth > 0;\n\n\t\t/* eslint-disable no-loop-func, no-await-in-loop */\n\t\twhile (!containerPainted && retryCount > 0) {\n\t\t\tawait new Promise<void>(resolve => {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tcontainerPainted = this.scrollContainer.clientHeight > 0 && this.scrollContainer.clientWidth > 0;\n\t\t\t\t\tretryCount--;\n\t\t\t\t\tresolve();\n\t\t\t\t}, retryInterval);\n\t\t\t});\n\t\t}\n\t\t/* eslint-disable no-loop-func, no-await-in-loop */\n\n\t\tthis._container!.scrollLeft = left;\n\t\tthis._container!.scrollTop = top;\n\t}\n\n\tmove(dx: number, dy: number, disableAnimation: boolean) {\n\t\tif (disableAnimation) {\n\t\t\tthis._container!.scrollLeft += dx;\n\t\t\tthis._container!.scrollTop += dy;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._container) {\n\t\t\treturn scroll(this._container, dx, dy);\n\t\t}\n\t}\n\n\tgetScrollLeft() {\n\t\treturn this._container!.scrollLeft;\n\t}\n\n\tgetScrollTop() {\n\t\treturn this._container!.scrollTop;\n\t}\n\n\t_isTouchInside(event: TouchEvent | MouseEvent) {\n\t\tlet touch = null;\n\t\tif (this.supportsTouch && event instanceof TouchEvent) {\n\t\t\ttouch = event.touches[0];\n\t\t}\n\n\t\tconst rect = this._container!.getBoundingClientRect();\n\t\tconst x = this.supportsTouch ? (touch as TouchInit).clientX : (event as MouseEvent).x;\n\t\tconst y = this.supportsTouch ? (touch as TouchInit).clientY : (event as MouseEvent).y;\n\n\t\treturn x! >= rect.left && x! <= rect.right\n\t\t\t&& y! >= rect.top && y! <= rect.bottom;\n\t}\n\n\tontouchstart(event: TouchEvent | MouseEvent) {\n\t\tlet touch = null;\n\t\tif (this.supportsTouch && event instanceof TouchEvent) {\n\t\t\ttouch = event.touches[0];\n\t\t}\n\n\t\tif (!this.supportsTouch) {\n\t\t\tdocument.addEventListener(\"mouseup\", this.mouseUp, { passive: true });\n\t\t\tdocument.addEventListener(\"mousemove\", this.mouseMove, { passive: true });\n\t\t} else {\n\t\t\t// Needed only on mobile\n\t\t\tthis.startX = touch!.pageX;\n\t\t\tthis.startY = touch!.pageY;\n\t\t}\n\n\t\tif (this.supportsTouch && event instanceof TouchEvent) {\n\t\t\tthis._prevDragX = touch!.pageX;\n\t\t\tthis._prevDragY = touch!.pageY;\n\t\t}\n\n\t\tif (event instanceof MouseEvent) {\n\t\t\tthis._prevDragX = event.x;\n\t\t\tthis._prevDragY = event.y;\n\t\t}\n\n\t\tthis._canScroll = this._isTouchInside(event);\n\t}\n\n\tontouchmove(event: TouchEvent | MouseEvent) {\n\t\tif (!this._canScroll) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst container = this._container;\n\t\tconst touch = this.supportsTouch ? (event as TouchEvent).touches[0] : null;\n\n\t\tconst dragX = this.supportsTouch ? (touch as TouchInit).pageX : (event as MouseEvent).x;\n\t\tconst dragY = this.supportsTouch ? (touch as TouchInit).pageY : (event as MouseEvent).y;\n\n\t\tcontainer!.scrollLeft += this._prevDragX! - dragX!;\n\t\tcontainer!.scrollTop += this._prevDragY! - dragY!;\n\n\t\tthis.fireEvent(scrollEventName, {\n\t\t\tisLeft: dragX! > this._prevDragX!,\n\t\t\tisRight: dragX! < this._prevDragX!,\n\t\t});\n\n\t\tthis.cachedValue.dragX = this._prevDragX!;\n\t\tthis.cachedValue.dragY = this._prevDragY!;\n\n\t\tthis._prevDragX = dragX;\n\t\tthis._prevDragY = dragY;\n\t}\n\n\tontouchend(event: TouchEvent | MouseEvent) {\n\t\tif (this.supportsTouch) {\n\t\t\tconst deltaX = Math.abs((event as TouchEvent).changedTouches[0].pageX - this.startX);\n\t\t\tconst deltaY = Math.abs((event as TouchEvent).changedTouches[0].pageY - this.startY);\n\n\t\t\tif (deltaX < 10 && deltaY < 10) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (!this._canScroll) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst container = this._container;\n\t\tconst dragX = this.supportsTouch ? (event as TouchEvent).changedTouches[0].pageX : (event as MouseEvent).x;\n\t\tconst dragY = this.supportsTouch ? (event as TouchEvent).changedTouches[0].pageY : (event as MouseEvent).y;\n\n\t\tcontainer!.scrollLeft += this._prevDragX! - dragX;\n\t\tcontainer!.scrollTop += this._prevDragY! - dragY;\n\n\t\tconst useCachedValues = dragX === this._prevDragX;\n\t\tconst _dragX = useCachedValues ? this.cachedValue.dragX : dragX;\n\t\t// const _dragY = useCachedValues ? this.cachedValue.dragY : dragY; add if needed\n\n\t\tthis.fireEvent(touchEndEventName, {\n\t\t\tisLeft: _dragX < this._prevDragX!,\n\t\t\tisRight: _dragX > this._prevDragX!,\n\t\t});\n\n\t\tthis._prevDragX = dragX;\n\t\tthis._prevDragY = dragY;\n\n\t\tif (!this.supportsTouch) {\n\t\t\tdocument.removeEventListener(\"mousemove\", this.mouseMove);\n\t\t\tdocument.removeEventListener(\"mouseup\", this.mouseUp);\n\t\t}\n\t}\n}\n\nexport default ScrollEnablement;\nexport type {\n\tScrollEnablementEventListenerParam,\n};\n"]}
1
+ {"version":3,"file":"ScrollEnablement.js","sourceRoot":"","sources":["../../src/delegate/ScrollEnablement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAG7C,MAAM,eAAe,GAAG,QAAQ,CAAC;AACjC,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;AAQnE,MAAM,gBAAiB,SAAQ,aAAsF;IAcpH,YAAY,kBAA8B;QACzC,KAAK,EAAE,CAAC;QANT,kBAAa,GAAG,aAAa,EAAE,CAAC;QAO/B,IAAI,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ClD,MAAM,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QAChE,iFAAiF;QAEjF,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE;YACjC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,UAAW;YACjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC,UAAW;SAClC,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QAExB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACxB,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAC1D,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;SACtD;IACF,CAAC;CACD;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["import { supportsTouch } from \"../Device.js\";\nimport EventProvider from \"../EventProvider.js\";\nimport scroll from \"../animations/scroll.js\";\nimport type UI5Element from \"../UI5Element.js\";\n\nconst scrollEventName = \"scroll\";\nconst touchEndEventName = supportsTouch() ? \"touchend\" : \"mouseup\";\n\ntype ScrollEnablementEventListenerParam = {\n\tisLeft: boolean;\n\tisRight: boolean\n}\ntype ScrollEnablementEventListenerReturn = void;\n\nclass ScrollEnablement extends EventProvider<ScrollEnablementEventListenerParam, ScrollEnablementEventListenerReturn> {\n\tcontainerComponent: UI5Element;\n\tmouseMove: (event: MouseEvent | TouchEvent) => void;\n\tmouseUp: (event: MouseEvent | TouchEvent) => void;\n\ttouchStart: (event: MouseEvent | TouchEvent) => void;\n\tcachedValue: { dragX: number, dragY: number };\n\tstartX: number;\n\tstartY: number;\n\t_container?: HTMLElement;\n\tsupportsTouch = supportsTouch();\n\t_canScroll?: boolean;\n\t_prevDragX?: number;\n\t_prevDragY?: number;\n\n\tconstructor(containerComponent: UI5Element) {\n\t\tsuper();\n\t\tthis.containerComponent = containerComponent;\n\t\tthis.mouseMove = this.ontouchmove.bind(this);\n\t\tthis.mouseUp = this.ontouchend.bind(this);\n\t\tthis.touchStart = this.ontouchstart.bind(this);\n\n\t\tthis.supportsTouch = supportsTouch();\n\n\t\t// On Android devices touchmove is thrown one more time than neccessary (together with touchend)\n\t\t// so we have to cache the previus coordinates in order to provide correct parameters in the\n\t\t// event for Android\n\t\tthis.cachedValue = { dragX: 0, dragY: 0 };\n\n\t\t// In components like Carousel you need to know if the user has clicked on something or swiped\n\t\t// in order to throw the needed event or not\n\t\tthis.startX = 0;\n\t\tthis.startY = 0;\n\n\t\tif (this.supportsTouch) {\n\t\t\tcontainerComponent.addEventListener(\"touchstart\", this.touchStart, { passive: true });\n\t\t\tcontainerComponent.addEventListener(\"touchmove\", this.mouseMove, { passive: true });\n\t\t\tcontainerComponent.addEventListener(\"touchend\", this.mouseUp, { passive: true });\n\t\t} else {\n\t\t\tcontainerComponent.addEventListener(\"mousedown\", this.touchStart, { passive: true });\n\t\t}\n\t}\n\n\tset scrollContainer(container: HTMLElement) {\n\t\tthis._container = container;\n\t}\n\n\tget scrollContainer() {\n\t\treturn this._container!;\n\t}\n\n\t/**\n\t * Scrolls the container to the left/top position, retrying retryCount times, if the container is not yet painted\n\t *\n\t * @param left\n\t * @param top\n\t * @param retryCount\n\t * @param retryInterval\n\t * @returns {Promise<void>} resolved when scrolled successfully\n\t */\n\tasync scrollTo(left: number, top: number, retryCount = 0, retryInterval = 0) {\n\t\tlet containerPainted = this.scrollContainer.clientHeight > 0 && this.scrollContainer.clientWidth > 0;\n\n\t\t/* eslint-disable no-loop-func, no-await-in-loop */\n\t\twhile (!containerPainted && retryCount > 0) {\n\t\t\tawait new Promise<void>(resolve => {\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tcontainerPainted = this.scrollContainer.clientHeight > 0 && this.scrollContainer.clientWidth > 0;\n\t\t\t\t\tretryCount--;\n\t\t\t\t\tresolve();\n\t\t\t\t}, retryInterval);\n\t\t\t});\n\t\t}\n\t\t/* eslint-disable no-loop-func, no-await-in-loop */\n\n\t\tthis._container!.scrollLeft = left;\n\t\tthis._container!.scrollTop = top;\n\t}\n\n\tmove(dx: number, dy: number, disableAnimation: boolean) {\n\t\tif (disableAnimation) {\n\t\t\tthis._container!.scrollLeft += dx;\n\t\t\tthis._container!.scrollTop += dy;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._container) {\n\t\t\treturn scroll(this._container, dx, dy);\n\t\t}\n\t}\n\n\tgetScrollLeft() {\n\t\treturn this._container!.scrollLeft;\n\t}\n\n\tgetScrollTop() {\n\t\treturn this._container!.scrollTop;\n\t}\n\n\t_isTouchInside(event: TouchEvent | MouseEvent) {\n\t\tlet touch = null;\n\t\tif (this.supportsTouch && event instanceof TouchEvent) {\n\t\t\ttouch = event.touches[0];\n\t\t}\n\n\t\tconst rect = this._container!.getBoundingClientRect();\n\t\tconst x = this.supportsTouch ? (touch as TouchInit).clientX : (event as MouseEvent).x;\n\t\tconst y = this.supportsTouch ? (touch as TouchInit).clientY : (event as MouseEvent).y;\n\n\t\treturn x! >= rect.left && x! <= rect.right\n\t\t\t&& y! >= rect.top && y! <= rect.bottom;\n\t}\n\n\tontouchstart(event: TouchEvent | MouseEvent) {\n\t\tlet touch = null;\n\t\tif (this.supportsTouch && event instanceof TouchEvent) {\n\t\t\ttouch = event.touches[0];\n\t\t}\n\n\t\tif (!touch) {\n\t\t\tdocument.addEventListener(\"mouseup\", this.mouseUp, { passive: true });\n\t\t\tdocument.addEventListener(\"mousemove\", this.mouseMove, { passive: true });\n\t\t} else {\n\t\t\t// Needed only on mobile\n\t\t\tthis.startX = touch.pageX;\n\t\t\tthis.startY = touch.pageY;\n\t\t}\n\n\t\tif (touch) {\n\t\t\tthis._prevDragX = touch.pageX;\n\t\t\tthis._prevDragY = touch.pageY;\n\t\t}\n\n\t\tif (event instanceof MouseEvent) {\n\t\t\tthis._prevDragX = event.x;\n\t\t\tthis._prevDragY = event.y;\n\t\t}\n\n\t\tthis._canScroll = this._isTouchInside(event);\n\t}\n\n\tontouchmove(event: TouchEvent | MouseEvent) {\n\t\tif (!this._canScroll) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst container = this._container;\n\t\tconst touch = this.supportsTouch ? (event as TouchEvent).touches[0] : null;\n\n\t\tconst dragX = this.supportsTouch ? (touch as TouchInit).pageX : (event as MouseEvent).x;\n\t\tconst dragY = this.supportsTouch ? (touch as TouchInit).pageY : (event as MouseEvent).y;\n\n\t\tcontainer!.scrollLeft += this._prevDragX! - dragX!;\n\t\tcontainer!.scrollTop += this._prevDragY! - dragY!;\n\n\t\tthis.fireEvent(scrollEventName, {\n\t\t\tisLeft: dragX! > this._prevDragX!,\n\t\t\tisRight: dragX! < this._prevDragX!,\n\t\t});\n\n\t\tthis.cachedValue.dragX = this._prevDragX!;\n\t\tthis.cachedValue.dragY = this._prevDragY!;\n\n\t\tthis._prevDragX = dragX;\n\t\tthis._prevDragY = dragY;\n\t}\n\n\tontouchend(event: TouchEvent | MouseEvent) {\n\t\tif (this.supportsTouch) {\n\t\t\tconst deltaX = Math.abs((event as TouchEvent).changedTouches[0].pageX - this.startX);\n\t\t\tconst deltaY = Math.abs((event as TouchEvent).changedTouches[0].pageY - this.startY);\n\n\t\t\tif (deltaX < 10 && deltaY < 10) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (!this._canScroll) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst container = this._container;\n\t\tconst dragX = this.supportsTouch ? (event as TouchEvent).changedTouches[0].pageX : (event as MouseEvent).x;\n\t\tconst dragY = this.supportsTouch ? (event as TouchEvent).changedTouches[0].pageY : (event as MouseEvent).y;\n\n\t\tcontainer!.scrollLeft += this._prevDragX! - dragX;\n\t\tcontainer!.scrollTop += this._prevDragY! - dragY;\n\n\t\tconst useCachedValues = dragX === this._prevDragX;\n\t\tconst _dragX = useCachedValues ? this.cachedValue.dragX : dragX;\n\t\t// const _dragY = useCachedValues ? this.cachedValue.dragY : dragY; add if needed\n\n\t\tthis.fireEvent(touchEndEventName, {\n\t\t\tisLeft: _dragX < this._prevDragX!,\n\t\t\tisRight: _dragX > this._prevDragX!,\n\t\t});\n\n\t\tthis._prevDragX = dragX;\n\t\tthis._prevDragY = dragY;\n\n\t\tif (!this.supportsTouch) {\n\t\t\tdocument.removeEventListener(\"mousemove\", this.mouseMove);\n\t\t\tdocument.removeEventListener(\"mouseup\", this.mouseUp);\n\t\t}\n\t}\n}\n\nexport default ScrollEnablement;\nexport type {\n\tScrollEnablementEventListenerParam,\n};\n"]}
@@ -2,7 +2,7 @@ import { TemplateResult } from "lit-html";
2
2
  import type UI5Element from "../UI5Element.js";
3
3
  import type OpenUI5Element from "./OpenUI5Element.js";
4
4
  declare class OpenUI5Enablement {
5
- static wrapTemplateResultInBusyMarkup(html: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult, host: OpenUI5Element, templateResult: TemplateResult): TemplateResult<1 | 2>;
5
+ static wrapTemplateResultInBusyMarkup(html: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult, host: OpenUI5Element, templateResult: TemplateResult): TemplateResult;
6
6
  static enrichBusyIndicatorSettings(klass: typeof UI5Element): void;
7
7
  static enrichBusyIndicatorMetadata(klass: typeof UI5Element): void;
8
8
  static enrichBusyIndicatorMethods(UI5ElementPrototype: typeof OpenUI5Element.prototype): void;
@@ -0,0 +1,6 @@
1
+ declare const DEFAULT_THEME: string;
2
+ declare const SUPPORTED_THEMES: string[];
3
+ declare const DEFAULT_LANGUAGE: string;
4
+ declare const DEFAULT_LOCALE: string;
5
+ declare const SUPPORTED_LOCALES: string[];
6
+ export { DEFAULT_THEME, SUPPORTED_THEMES, DEFAULT_LANGUAGE, DEFAULT_LOCALE, SUPPORTED_LOCALES, };
@@ -1,15 +1,8 @@
1
- const assetParameters = {"themes":{"default":"sap_horizon","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","cnr","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","mk","ms","nl","no","pl","pt_PT","pt","ro","ru","sh","sk","sl","sr","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"]}};
2
-
1
+ const assetParameters = { "themes": { "default": "sap_horizon", "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", "cnr", "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", "mk", "ms", "nl", "no", "pl", "pt_PT", "pt", "ro", "ru", "sh", "sk", "sl", "sr", "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"] } };
3
2
  const DEFAULT_THEME = assetParameters.themes.default;
4
3
  const SUPPORTED_THEMES = assetParameters.themes.all;
5
4
  const DEFAULT_LANGUAGE = assetParameters.languages.default;
6
5
  const DEFAULT_LOCALE = assetParameters.locales.default;
7
6
  const SUPPORTED_LOCALES = assetParameters.locales.all;
8
-
9
- export {
10
- DEFAULT_THEME,
11
- SUPPORTED_THEMES,
12
- DEFAULT_LANGUAGE,
13
- DEFAULT_LOCALE,
14
- SUPPORTED_LOCALES,
15
- };
7
+ export { DEFAULT_THEME, SUPPORTED_THEMES, DEFAULT_LANGUAGE, DEFAULT_LOCALE, SUPPORTED_LOCALES, };
8
+ //# sourceMappingURL=AssetParameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AssetParameters.js","sourceRoot":"","sources":["../../src/generated/AssetParameters.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,EAAC,QAAQ,EAAC,EAAC,SAAS,EAAC,aAAa,EAAC,KAAK,EAAC,CAAC,aAAa,EAAC,kBAAkB,EAAC,YAAY,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AC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAC,OAAO,CAAC,EAAC,EAAC,CAAC;AAEzqC,MAAM,aAAa,GAAG,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC;AACrD,MAAM,gBAAgB,GAAG,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC;AACpD,MAAM,gBAAgB,GAAG,eAAe,CAAC,SAAS,CAAC,OAAO,CAAC;AAC3D,MAAM,cAAc,GAAG,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC;AACvD,MAAM,iBAAiB,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;AAEtD,OAAO,EACN,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,iBAAiB,GACjB,CAAC","sourcesContent":["const assetParameters = {\"themes\":{\"default\":\"sap_horizon\",\"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\",\"cnr\",\"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\",\"mk\",\"ms\",\"nl\",\"no\",\"pl\",\"pt_PT\",\"pt\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sr\",\"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\"]}};\n\nconst DEFAULT_THEME = assetParameters.themes.default;\nconst SUPPORTED_THEMES = assetParameters.themes.all;\nconst DEFAULT_LANGUAGE = assetParameters.languages.default;\nconst DEFAULT_LOCALE = assetParameters.locales.default;\nconst SUPPORTED_LOCALES = assetParameters.locales.all;\n\nexport {\n\tDEFAULT_THEME,\n\tSUPPORTED_THEMES,\n\tDEFAULT_LANGUAGE,\n\tDEFAULT_LOCALE,\n\tSUPPORTED_LOCALES,\n};"]}
@@ -0,0 +1,10 @@
1
+ declare const VersionInfo: {
2
+ version: string;
3
+ major: number;
4
+ minor: number;
5
+ patch: number;
6
+ suffix: string;
7
+ isNext: boolean;
8
+ buildTime: number;
9
+ };
10
+ export default VersionInfo;
@@ -1,10 +1,11 @@
1
1
  const VersionInfo = {
2
- version: "1.20.0",
3
- major: 1,
4
- minor: 20,
5
- patch: 0,
6
- suffix: "",
7
- isNext: false,
8
- buildTime: 1701685261,
2
+ version: "1.21.0-rc.0",
3
+ major: 1,
4
+ minor: 21,
5
+ patch: 0,
6
+ suffix: "-rc.0",
7
+ isNext: false,
8
+ buildTime: 1702025239,
9
9
  };
10
- export default VersionInfo;
10
+ export default VersionInfo;
11
+ //# sourceMappingURL=VersionInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"1.21.0-rc.0\",\n\tmajor: 1,\n\tminor: 21,\n\tpatch: 0,\n\tsuffix: \"-rc.0\",\n\tisNext: false,\n\tbuildTime: 1702025239,\n};\nexport default VersionInfo;"]}
@@ -1,4 +1,4 @@
1
1
  import type UI5Element from "../../../UI5Element.js";
2
2
  import type WithComplexTemplate from "../../../../test/elements/WithComplexTemplate.js";
3
- declare function block0(this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined): import("lit-html").TemplateResult<1 | 2>;
3
+ declare function block0(this: WithComplexTemplate, context: UI5Element, tags: string[], suffix: string | undefined): import("lit-html").TemplateResult;
4
4
  export default block0;
@@ -1,7 +1,7 @@
1
1
  import { TemplateResult } from "lit-html";
2
2
  import type { Renderer } from "../UI5Element.js";
3
- declare const effectiveHtml: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult<1 | 2>;
4
- declare const effectiveSvg: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult<1 | 2>;
3
+ declare const effectiveHtml: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult;
4
+ declare const effectiveSvg: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult;
5
5
  declare const litRender: Renderer;
6
6
  declare const scopeTag: (tag: string, tags: Array<string>, suffix: string) => object | undefined;
7
7
  export { effectiveHtml as html, effectiveSvg as svg, };
@@ -7,19 +7,20 @@
7
7
  * @author SAP SE
8
8
  * @alias sap.ui.webc.base.types.InvisibleMessageMode
9
9
  */
10
- declare enum InvisibleMessageMode {
10
+ declare const InvisibleMessageMode: {
11
11
  /**
12
12
  * Indicates that updates to the region should be presented at the next graceful opportunity,
13
13
  * such as at the end of reading the current sentence, or when the user pauses typing.
14
14
  * @public
15
15
  * @type {Polite}
16
16
  */
17
- Polite = "Polite",
17
+ readonly Polite: "Polite";
18
18
  /**
19
19
  * Indicates that updates to the region have the highest priority and should be presented to the user immediately.
20
20
  * @public
21
21
  * @type {Assertive}
22
22
  */
23
- Assertive = "Assertive"
24
- }
23
+ readonly Assertive: "Assertive";
24
+ };
25
+ type InvisibleMessageMode = typeof InvisibleMessageMode[keyof typeof InvisibleMessageMode];
25
26
  export default InvisibleMessageMode;
@@ -7,21 +7,20 @@
7
7
  * @author SAP SE
8
8
  * @alias sap.ui.webc.base.types.InvisibleMessageMode
9
9
  */
10
- var InvisibleMessageMode;
11
- (function (InvisibleMessageMode) {
10
+ const InvisibleMessageMode = {
12
11
  /**
13
12
  * Indicates that updates to the region should be presented at the next graceful opportunity,
14
13
  * such as at the end of reading the current sentence, or when the user pauses typing.
15
14
  * @public
16
15
  * @type {Polite}
17
16
  */
18
- InvisibleMessageMode["Polite"] = "Polite";
17
+ Polite: "Polite",
19
18
  /**
20
19
  * Indicates that updates to the region have the highest priority and should be presented to the user immediately.
21
20
  * @public
22
21
  * @type {Assertive}
23
22
  */
24
- InvisibleMessageMode["Assertive"] = "Assertive";
25
- })(InvisibleMessageMode || (InvisibleMessageMode = {}));
23
+ Assertive: "Assertive",
24
+ };
26
25
  export default InvisibleMessageMode;
27
26
  //# sourceMappingURL=InvisibleMessageMode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvisibleMessageMode.js","sourceRoot":"","sources":["../../src/types/InvisibleMessageMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,IAAK,oBAeJ;AAfD,WAAK,oBAAoB;IACxB;;;;;OAKM;IACN,yCAAiB,CAAA;IAEjB;;;;OAIM;IACN,+CAAuB,CAAA;AACxB,CAAC,EAfI,oBAAoB,KAApB,oBAAoB,QAexB;AAED,eAAe,oBAAoB,CAAC","sourcesContent":["/**\n * Enumeration for different mode behaviors of the InvisibleMessage.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.base.types.InvisibleMessageMode\n */\nenum InvisibleMessageMode {\n\t/**\n * Indicates that updates to the region should be presented at the next graceful opportunity,\n * such as at the end of reading the current sentence, or when the user pauses typing.\n\t * @public\n\t * @type {Polite}\n */\n\tPolite = \"Polite\",\n\n\t/**\n * Indicates that updates to the region have the highest priority and should be presented to the user immediately.\n\t * @public\n\t * @type {Assertive}\n */\n\tAssertive = \"Assertive\",\n}\n\nexport default InvisibleMessageMode;\n"]}
1
+ {"version":3,"file":"InvisibleMessageMode.js","sourceRoot":"","sources":["../../src/types/InvisibleMessageMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,oBAAoB,GAAG;IAC5B;;;;;OAKM;IACN,MAAM,EAAE,QAAQ;IAEhB;;;;OAIM;IACN,SAAS,EAAE,WAAW;CACb,CAAC;AAIX,eAAe,oBAAoB,CAAC","sourcesContent":["/**\n * Enumeration for different mode behaviors of the InvisibleMessage.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.base.types.InvisibleMessageMode\n */\nconst InvisibleMessageMode = {\n\t/**\n * Indicates that updates to the region should be presented at the next graceful opportunity,\n * such as at the end of reading the current sentence, or when the user pauses typing.\n\t * @public\n\t * @type {Polite}\n */\n\tPolite: \"Polite\",\n\n\t/**\n * Indicates that updates to the region have the highest priority and should be presented to the user immediately.\n\t * @public\n\t * @type {Assertive}\n */\n\tAssertive: \"Assertive\",\n} as const;\n\ntype InvisibleMessageMode = typeof InvisibleMessageMode[keyof typeof InvisibleMessageMode];\n\nexport default InvisibleMessageMode;\n"]}