@ui5/webcomponents-base 1.21.1 → 1.22.0-rc.0

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 (68) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE.txt +201 -0
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/MediaRange.d.ts +0 -6
  5. package/dist/MediaRange.js +5 -15
  6. package/dist/MediaRange.js.map +1 -1
  7. package/dist/StaticAreaItem.d.ts +2 -4
  8. package/dist/StaticAreaItem.js +2 -4
  9. package/dist/StaticAreaItem.js.map +1 -1
  10. package/dist/UI5Element.d.ts +14 -25
  11. package/dist/UI5Element.js +11 -22
  12. package/dist/UI5Element.js.map +1 -1
  13. package/dist/UI5ElementMetadata.d.ts +3 -11
  14. package/dist/UI5ElementMetadata.js +1 -9
  15. package/dist/UI5ElementMetadata.js.map +1 -1
  16. package/dist/custom-elements.json +5152 -0
  17. package/dist/decorators/customElement.d.ts +1 -1
  18. package/dist/decorators/customElement.js +1 -1
  19. package/dist/decorators/customElement.js.map +1 -1
  20. package/dist/delegate/ItemNavigation.js.map +1 -1
  21. package/dist/delegate/ResizeHandler.d.ts +4 -6
  22. package/dist/delegate/ResizeHandler.js +4 -6
  23. package/dist/delegate/ResizeHandler.js.map +1 -1
  24. package/dist/generated/VersionInfo.js +1 -1
  25. package/dist/generated/VersionInfo.js.map +1 -1
  26. package/dist/i18nBundle.d.ts +1 -3
  27. package/dist/i18nBundle.js +1 -4
  28. package/dist/i18nBundle.js.map +1 -1
  29. package/dist/types/AnimationMode.d.ts +0 -8
  30. package/dist/types/AnimationMode.js +0 -8
  31. package/dist/types/AnimationMode.js.map +1 -1
  32. package/dist/types/CSSColor.d.ts +0 -4
  33. package/dist/types/CSSColor.js +0 -4
  34. package/dist/types/CSSColor.js.map +1 -1
  35. package/dist/types/CSSSize.d.ts +0 -4
  36. package/dist/types/CSSSize.js +0 -4
  37. package/dist/types/CSSSize.js.map +1 -1
  38. package/dist/types/CalendarType.d.ts +0 -9
  39. package/dist/types/CalendarType.js +0 -9
  40. package/dist/types/CalendarType.js.map +1 -1
  41. package/dist/types/DOMReference.d.ts +0 -4
  42. package/dist/types/DOMReference.js +0 -4
  43. package/dist/types/DOMReference.js.map +1 -1
  44. package/dist/types/DataType.d.ts +1 -6
  45. package/dist/types/DataType.js +1 -6
  46. package/dist/types/DataType.js.map +1 -1
  47. package/dist/types/Float.d.ts +0 -3
  48. package/dist/types/Float.js +0 -3
  49. package/dist/types/Float.js.map +1 -1
  50. package/dist/types/Integer.d.ts +0 -3
  51. package/dist/types/Integer.js +0 -3
  52. package/dist/types/Integer.js.map +1 -1
  53. package/dist/types/InvisibleMessageMode.d.ts +0 -6
  54. package/dist/types/InvisibleMessageMode.js +0 -6
  55. package/dist/types/InvisibleMessageMode.js.map +1 -1
  56. package/dist/types/ItemNavigationBehavior.d.ts +0 -6
  57. package/dist/types/ItemNavigationBehavior.js +0 -6
  58. package/dist/types/ItemNavigationBehavior.js.map +1 -1
  59. package/dist/types/NavigationMode.d.ts +0 -8
  60. package/dist/types/NavigationMode.js +0 -8
  61. package/dist/types/NavigationMode.js.map +1 -1
  62. package/dist/types/ValueState.d.ts +0 -14
  63. package/dist/types/ValueState.js +0 -14
  64. package/dist/types/ValueState.js.map +1 -1
  65. package/dist/util/getClassCopy.d.ts +2 -2
  66. package/package-scripts.cjs +3 -6
  67. package/package.json +4 -3
  68. package/dist/api.json +0 -1
@@ -8,7 +8,7 @@ import type { ComponentStylesData as Styles } from "../types.js";
8
8
  * @param { string | object } tagNameOrComponentSettings
9
9
  * @returns { ClassDecorator }
10
10
  */
11
- declare const customElement: (tagNameOrComponentSettings: string | {
11
+ declare const customElement: (tagNameOrComponentSettings?: string | {
12
12
  tag?: string;
13
13
  renderer?: Renderer;
14
14
  styles?: Styles;
@@ -4,7 +4,7 @@
4
4
  * @param { string | object } tagNameOrComponentSettings
5
5
  * @returns { ClassDecorator }
6
6
  */
7
- const customElement = (tagNameOrComponentSettings) => {
7
+ const customElement = (tagNameOrComponentSettings = {}) => {
8
8
  return (target) => {
9
9
  if (!Object.prototype.hasOwnProperty.call(target, "metadata")) {
10
10
  target.metadata = {};
@@ -1 +1 @@
1
- {"version":3,"file":"customElement.js","sourceRoot":"","sources":["../../src/decorators/customElement.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,aAAa,GAAG,CAAC,0BAWtB,EAAkB,EAAE;IACpB,OAAO,CAAC,MAAW,EAAE,EAAE;QACtB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE;YAC9D,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;SACrB;QAED,IAAI,OAAO,0BAA0B,KAAK,QAAQ,EAAE;YACnD,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,0BAA0B,CAAC;YACjD,OAAO;SACP;QAED,MAAM,EACL,GAAG,EACH,aAAa,EACb,UAAU,EACV,cAAc,GACb,GAAG,0BAA0B,CAAC;QAEhC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;QAC1B,IAAI,aAAa,EAAE;YAClB,MAAM,CAAC,QAAQ,CAAC,aAAa,GAAG,aAAa,CAAC;SAC9C;QACD,IAAI,UAAU,EAAE;YACf,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAG,UAAU,CAAC;SACxC;QACD,IAAI,cAAc,EAAE;YACnB,MAAM,CAAC,QAAQ,CAAC,cAAc,GAAG,cAAc,CAAC;SAChD;QAED,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,mBAA2B,EAAE,EAAE;YAC9I,MAAM,oBAAoB,GAAG,mBAAmB,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC;YACjG,MAAM,wBAAwB,GAAG,0BAA0B,CAAC,oBAAwC,CAAC,CAAC;YAEtG,wBAAwB,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE;gBAC9E,GAAG,EAAE,GAAG,EAAE,CAAC,wBAAwB;aACnC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\nimport type { TemplateFunction as Template } from \"../renderer/executeTemplate.js\";\nimport type { ComponentStylesData as Styles } from \"../types.js\";\n\n/**\n * Returns a custom element class decorator.\n *\n * @param { string | object } tagNameOrComponentSettings\n * @returns { ClassDecorator }\n */\nconst customElement = (tagNameOrComponentSettings: string | {\n\ttag?: string,\n\trenderer?: Renderer,\n\tstyles?: Styles,\n\ttemplate?: Template,\n\tdependencies?: Array<typeof UI5Element>,\n\tstaticAreaStyles?: Styles,\n\tstaticAreaTemplate?: Template,\n\tlanguageAware?: boolean,\n\tthemeAware?: boolean,\n\tfastNavigation?: boolean,\n}): ClassDecorator => {\n\treturn (target: any) => {\n\t\tif (!Object.prototype.hasOwnProperty.call(target, \"metadata\")) {\n\t\t\ttarget.metadata = {};\n\t\t}\n\n\t\tif (typeof tagNameOrComponentSettings === \"string\") {\n\t\t\ttarget.metadata.tag = tagNameOrComponentSettings;\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttag,\n\t\t\tlanguageAware,\n\t\t\tthemeAware,\n\t\t\tfastNavigation,\n\t\t } = tagNameOrComponentSettings;\n\n\t\ttarget.metadata.tag = tag;\n\t\tif (languageAware) {\n\t\t\ttarget.metadata.languageAware = languageAware;\n\t\t}\n\t\tif (themeAware) {\n\t\t\ttarget.metadata.themeAware = themeAware;\n\t\t}\n\t\tif (fastNavigation) {\n\t\t\ttarget.metadata.fastNavigation = fastNavigation;\n\t\t}\n\n\t\t[\"render\", \"renderer\", \"template\", \"staticAreaTemplate\", \"styles\", \"staticAreaStyles\", \"dependencies\"].forEach((customElementEntity: string) => {\n\t\t\tconst _customElementEntity = customElementEntity === \"render\" ? \"renderer\" : customElementEntity;\n\t\t\tconst customElementEntityValue = tagNameOrComponentSettings[_customElementEntity as keyof typeof tag];\n\n\t\t\tcustomElementEntityValue && Object.defineProperty(target, customElementEntity, {\n\t\t\t\tget: () => customElementEntityValue,\n\t\t\t});\n\t\t});\n\t};\n};\n\nexport default customElement;\n"]}
1
+ {"version":3,"file":"customElement.js","sourceRoot":"","sources":["../../src/decorators/customElement.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,aAAa,GAAG,CAAC,6BAWnB,EAAE,EAAkB,EAAE;IACzB,OAAO,CAAC,MAAW,EAAE,EAAE;QACtB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE;YAC9D,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;SACrB;QAED,IAAI,OAAO,0BAA0B,KAAK,QAAQ,EAAE;YACnD,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,0BAA0B,CAAC;YACjD,OAAO;SACP;QAED,MAAM,EACL,GAAG,EACH,aAAa,EACb,UAAU,EACV,cAAc,GACb,GAAG,0BAA0B,CAAC;QAEhC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;QAC1B,IAAI,aAAa,EAAE;YAClB,MAAM,CAAC,QAAQ,CAAC,aAAa,GAAG,aAAa,CAAC;SAC9C;QACD,IAAI,UAAU,EAAE;YACf,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAG,UAAU,CAAC;SACxC;QACD,IAAI,cAAc,EAAE;YACnB,MAAM,CAAC,QAAQ,CAAC,cAAc,GAAG,cAAc,CAAC;SAChD;QAED,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,mBAA2B,EAAE,EAAE;YAC9I,MAAM,oBAAoB,GAAG,mBAAmB,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC;YACjG,MAAM,wBAAwB,GAAG,0BAA0B,CAAC,oBAAwC,CAAC,CAAC;YAEtG,wBAAwB,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE;gBAC9E,GAAG,EAAE,GAAG,EAAE,CAAC,wBAAwB;aACnC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\nimport type { TemplateFunction as Template } from \"../renderer/executeTemplate.js\";\nimport type { ComponentStylesData as Styles } from \"../types.js\";\n\n/**\n * Returns a custom element class decorator.\n *\n * @param { string | object } tagNameOrComponentSettings\n * @returns { ClassDecorator }\n */\nconst customElement = (tagNameOrComponentSettings: string | {\n\ttag?: string,\n\trenderer?: Renderer,\n\tstyles?: Styles,\n\ttemplate?: Template,\n\tdependencies?: Array<typeof UI5Element>,\n\tstaticAreaStyles?: Styles,\n\tstaticAreaTemplate?: Template,\n\tlanguageAware?: boolean,\n\tthemeAware?: boolean,\n\tfastNavigation?: boolean,\n} = {}): ClassDecorator => {\n\treturn (target: any) => {\n\t\tif (!Object.prototype.hasOwnProperty.call(target, \"metadata\")) {\n\t\t\ttarget.metadata = {};\n\t\t}\n\n\t\tif (typeof tagNameOrComponentSettings === \"string\") {\n\t\t\ttarget.metadata.tag = tagNameOrComponentSettings;\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttag,\n\t\t\tlanguageAware,\n\t\t\tthemeAware,\n\t\t\tfastNavigation,\n\t\t } = tagNameOrComponentSettings;\n\n\t\ttarget.metadata.tag = tag;\n\t\tif (languageAware) {\n\t\t\ttarget.metadata.languageAware = languageAware;\n\t\t}\n\t\tif (themeAware) {\n\t\t\ttarget.metadata.themeAware = themeAware;\n\t\t}\n\t\tif (fastNavigation) {\n\t\t\ttarget.metadata.fastNavigation = fastNavigation;\n\t\t}\n\n\t\t[\"render\", \"renderer\", \"template\", \"staticAreaTemplate\", \"styles\", \"staticAreaStyles\", \"dependencies\"].forEach((customElementEntity: string) => {\n\t\t\tconst _customElementEntity = customElementEntity === \"render\" ? \"renderer\" : customElementEntity;\n\t\t\tconst customElementEntityValue = tagNameOrComponentSettings[_customElementEntity as keyof typeof tag];\n\n\t\t\tcustomElementEntityValue && Object.defineProperty(target, customElementEntity, {\n\t\t\t\tget: () => customElementEntityValue,\n\t\t\t});\n\t\t});\n\t};\n};\n\nexport default customElement;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ItemNavigation.js","sourceRoot":"","sources":["../../src/delegate/ItemNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GACR,MAAM,YAAY,CAAC;AACpB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAE3D,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,sBAAsB,MAAM,oCAAoC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAiBxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,cAAc;IAmBnB;;;;;;;;;;;;;OAaG;IACH,YAAY,gBAA4B,EAAE,OAA8B;QACvE,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;SACzE;QAED,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,gB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C,IAAI,CAAC,aAAa,CAAC,CAAC;QAE9C,IAAI,CAAC,WAAW,EAAE;YACjB,OAAO;SACP;QAED,IAAI,oBAAoB,CAAC,WAAW,CAAC,EAAE;YACtC,OAAO,WAAW,CAAC,cAAc,EAAE,CAAC;SACpC;QAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC;QAC5D,IAAI,CAAC,iBAAiB,EAAE;YACvB,OAAO;SACP;QAED,IAAI,WAAW,CAAC,EAAE,EAAE;YACnB,OAAO,iBAAiB,CAAC,aAAa,CAAC,QAAQ,WAAW,CAAC,EAAE,IAAI,CAAgB,CAAC;SAClF;IACF,CAAC;CACD;AAED,eAAe,cAAc,CAAC","sourcesContent":["import {\n\tisDown,\n\tisUp,\n\tisLeft,\n\tisRight,\n\tisHome,\n\tisEnd,\n\tisPageDown,\n\tisPageUp,\n} from \"../Keys.js\";\nimport getActiveElement from \"../util/getActiveElement.js\";\n\nimport NavigationMode from \"../types/NavigationMode.js\";\nimport ItemNavigationBehavior from \"../types/ItemNavigationBehavior.js\";\n\nimport type UI5Element from \"../UI5Element.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\n\ninterface ITabbable {\n\tid: string,\n\t_tabIndex: string,\n}\n\ntype ItemNavigationOptions = {\n\tcurrentIndex?: number,\n\tnavigationMode?: NavigationMode,\n\trowSize?: number\n\tskipItemsSize?: number,\n\tbehavior?: ItemNavigationBehavior,\n\tgetItemsCallback: () => Array<ITabbable>,\n\taffectedPropertiesNames?: Array<string>,\n};\n\n/**\n * The ItemNavigation class manages the calculations to determine the correct \"tabindex\" for a group of related items inside a root component.\n * Important: ItemNavigation only does the calculations and does not change \"tabindex\" directly, this is a responsibility of the developer.\n *\n * The keys that trigger ItemNavigation are:\n * - Up/down\n * - Left/right\n * - Home/End\n *\n * Usage:\n * 1) Use the \"getItemsCallback\" constructor property to pass a callback to ItemNavigation, which, whenever called, will return the list of items to navigate among.\n *\n * Each item passed to ItemNavigation via \"getItemsCallback\" must be:\n * - A) either a UI5Element with a \"_tabIndex\" property\n * - B) or an Object with \"id\" and \"_tabIndex\" properties which represents a part of the root component's shadow DOM.\n * The \"id\" must be a valid ID within the shadow root of the component ItemNavigation operates on.\n * This object must not be a DOM object because, as said, ItemNavigation will not set \"tabindex\" on it. It must be a representation of a DOM object only\n * and the developer has the responsibility to update the \"tabindex\" in the component's DOM.\n * - C) a combination of the above\n *\n * Whenever the user navigates with the keyboard, ItemNavigation will modify the \"_tabIndex\" properties of the items.\n * It is the items' responsibilities to re-render themselves and apply the correct value of \"tabindex\" (i.e. to map the \"_tabIndex\" ItemNavigation set to them to the \"tabindex\" property).\n * If the items of the ItemNavigation are UI5Elements themselves, this can happen naturally since they will be invalidated by their \"_tabIndex\" property.\n * If the items are Objects with \"id\" and \"_tabIndex\" however, it is the developer's responsibility to apply these and the easiest way is to have the root component invalidated by ItemNavigation.\n * To do so, set the \"affectedPropertiesNames\" constructor property to point to one or more of the root component's properties that need refreshing when \"_tabIndex\" is changed deeply.\n *\n * 2) Call the \"setCurrentItem\" method of ItemNavigation whenever you want to change the current item.\n * This is most commonly required if the user for example clicks on an item and thus selects it directly.\n * Pass as the only argument to \"setCurrentItem\" the item that becomes current (must be one of the items, returned by \"getItemsCallback\").\n *\n * @class\n * @public\n */\nclass ItemNavigation {\n\trootWebComponent: UI5Element;\n\n\t_getItems: () => Array<ITabbable>;\n\n\t_currentIndex: number;\n\n\t_rowSize: number;\n\n\t_behavior: ItemNavigationBehavior;\n\n\t_navigationMode: NavigationMode;\n\n\t_affectedPropertiesNames: Array<string>;\n\n\t_skipItemsSize: number | null;\n\n\t_initBound: () => void;\n\n\t/**\n\t *\n\t * @param rootWebComponent the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n\t * @param {ItemNavigationOptions} options Object with configuration options:\n\t * - currentIndex: the index of the item that will be initially selected (from which navigation will begin)\n\t * - navigationMode (Auto|Horizontal|Vertical): whether the items are displayed horizontally (Horizontal), vertically (Vertical) or as a matrix (Auto) meaning the user can navigate in both directions (up/down and left/right)\n\t * - rowSize: tells how many items per row there are when the items are not rendered as a flat list but rather as a matrix. Relevant for navigationMode=Auto\n\t * \t- skipItemsSize: tells how many items upon PAGE_UP and PAGE_DOWN should be skipped to applying the focus on the next item\n\t * - behavior (Static|Cycling): tells what to do when trying to navigate beyond the first and last items\n\t * Static means that nothing happens if the user tries to navigate beyond the first/last item.\n\t * Cycling means that when the user navigates beyond the last item they go to the first and vice versa.\n\t * - getItemsCallback: function that, when called, returns an array with all items the user can navigate among\n\t * - affectedPropertiesNames: a list of metadata properties on the root component which, upon user navigation, will be reassigned by address thus causing the root component to invalidate\n\t */\n\tconstructor(rootWebComponent: UI5Element, options: ItemNavigationOptions) {\n\t\tif (!rootWebComponent.isUI5Element) {\n\t\t\tthrow new Error(\"The root web component must be a UI5 Element instance\");\n\t\t}\n\n\t\tthis.rootWebComponent = rootWebComponent;\n\t\tthis.rootWebComponent.addEventListener(\"keydown\", this._onkeydown.bind(this));\n\t\tthis._initBound = this._init.bind(this);\n\t\tthis.rootWebComponent.attachComponentStateFinalized(this._initBound);\n\n\t\tif (typeof options.getItemsCallback !== \"function\") {\n\t\t\tthrow new Error(\"getItemsCallback is required\");\n\t\t}\n\n\t\tthis._getItems = options.getItemsCallback;\n\t\tthis._currentIndex = options.currentIndex || 0;\n\t\tthis._rowSize = options.rowSize || 1;\n\t\tthis._behavior = options.behavior || ItemNavigationBehavior.Static;\n\t\tthis._navigationMode = options.navigationMode || NavigationMode.Auto;\n\t\tthis._affectedPropertiesNames = options.affectedPropertiesNames || [];\n\t\tthis._skipItemsSize = options.skipItemsSize || null;\n\t}\n\n\t/**\n\t * Call this method to set a new \"current\" (selected) item in the item navigation\n\t * Note: the item passed to this function must be one of the items, returned by the getItemsCallback function\n\t *\n\t * @public\n\t * @param current the new selected item\n\t */\n\tsetCurrentItem(current: ITabbable) {\n\t\tconst currentItemIndex = this._getItems().indexOf(current);\n\n\t\tif (currentItemIndex === -1) {\n\t\t\tconsole.warn(`The provided item is not managed by ItemNavigation`, current); // eslint-disable-line\n\t\t\treturn;\n\t\t}\n\n\t\tthis._currentIndex = currentItemIndex;\n\t\tthis._applyTabIndex();\n\t}\n\n\t/**\n\t * Call this method to dynamically change the row size\n\t *\n\t * @public\n\t * @param newRowSize\n\t */\n\tsetRowSize(newRowSize: number) {\n\t\tthis._rowSize = newRowSize;\n\t}\n\n\t_init() {\n\t\tthis._getItems().forEach((item, idx) => {\n\t\t\titem._tabIndex = (idx === this._currentIndex) ? \"0\" : \"-1\";\n\t\t});\n\t}\n\n\t_onkeydown(event: KeyboardEvent) {\n\t\tif (!this._canNavigate()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst horizontalNavigationOn = this._navigationMode === NavigationMode.Horizontal || this._navigationMode === NavigationMode.Auto;\n\t\tconst verticalNavigationOn = this._navigationMode === NavigationMode.Vertical || this._navigationMode === NavigationMode.Auto;\n\t\tconst isRTL = this.rootWebComponent.effectiveDir === \"rtl\";\n\n\t\tif (isRTL && isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isRTL && isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isUp(event) && verticalNavigationOn) {\n\t\t\tthis._handleUp();\n\t\t} else if (isDown(event) && verticalNavigationOn) {\n\t\t\tthis._handleDown();\n\t\t} else if (isHome(event)) {\n\t\t\tthis._handleHome();\n\t\t} else if (isEnd(event)) {\n\t\t\tthis._handleEnd();\n\t\t} else if (isPageUp(event)) {\n\t\t\tthis._handlePageUp();\n\t\t} else if (isPageDown(event)) {\n\t\t\tthis._handlePageDown();\n\t\t} else {\n\t\t\treturn; // if none of the supported keys is pressed, we don't want to prevent the event or update the item navigation\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis._applyTabIndex();\n\t\tthis._focusCurrentItem();\n\t}\n\n\t_handleUp() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex - this._rowSize >= 0) { // no border reached, just decrease the index by a row\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **last** item in the **previous** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize;\n\t\t\tconst firstItemInPreviousColumnIndex = firstItemInThisColumnIndex === 0 ? this._rowSize - 1 : firstItemInThisColumnIndex - 1; // find the first item in the previous column (if the current column is the first column -> move to the last column)\n\t\t\tconst rows = Math.ceil(itemsLength / this._rowSize); // how many rows there are (even if incomplete, f.e. for 14 items and _rowSize=4 -> 4 rows total, although only 2 items on the last row)\n\t\t\tlet lastItemInPreviousColumnIndex = firstItemInPreviousColumnIndex + (rows - 1) * this._rowSize; // multiply rows by columns, and add the column's first item's index\n\t\t\tif (lastItemInPreviousColumnIndex > itemsLength - 1) { // for incomplete rows, use the previous row's last item, as for them the last item is missing\n\t\t\t\tlastItemInPreviousColumnIndex -= this._rowSize;\n\t\t\t}\n\t\t\tthis._currentIndex = lastItemInPreviousColumnIndex;\n\t\t} else { // not cyclic, so just go to the first item\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleDown() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex + this._rowSize < itemsLength) { // no border reached, just increase the index by a row\n\t\t\tthis._currentIndex += this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **first** item in the **next** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize; // find the first item in the current column first\n\t\t\tconst firstItemInNextColumnIndex = (firstItemInThisColumnIndex + 1) % this._rowSize; // to get the first item in the next column, just increase the index by 1. The modulo by rows is for the case when we are at the last column\n\t\t\tthis._currentIndex = firstItemInNextColumnIndex;\n\t\t} else { // not cyclic, so just go to the last item\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleLeft() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex > 0) {\n\t\t\tthis._currentIndex -= 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleRight() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex < itemsLength - 1) {\n\t\t\tthis._currentIndex += 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleHome() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex -= this._currentIndex % homeEndRange;\n\t}\n\n\t_handleEnd() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex += (homeEndRange - 1 - this._currentIndex % homeEndRange); // eslint-disable-line\n\t}\n\n\t_handlePageUp() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageUpFlat();\n\t}\n\n\t_handlePageDown() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageDownFlat();\n\t}\n\n\t/**\n\t * Handles PAGE_UP in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageUpFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._currentIndex + 1 > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items to the top,\n\t\t\t// move the focus up/left with the predefined number.\n\t\t\tthis._currentIndex -= this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t}\n\t}\n\n\t/**\n\t * Handles PAGE_DOWN in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageDownFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentToEndRange = this._getItems().length - this._currentIndex - 1;\n\n\t\tif (currentToEndRange > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items until the bottom,\n\t\t\t// move the focus down/right with the predefined number.\n\t\t\tthis._currentIndex += this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t}\n\t}\n\n\t_applyTabIndex() {\n\t\tconst items = this._getItems();\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i]._tabIndex = i === this._currentIndex ? \"0\" : \"-1\";\n\t\t}\n\n\t\tthis._affectedPropertiesNames.forEach(propName => {\n\t\t\tconst prop = (this.rootWebComponent as Record<string, any>)[propName];\n\t\t\t(this.rootWebComponent as Record<string, any>)[propName] = Array.isArray(prop) ? [...prop] : { ...prop };\n\t\t});\n\t}\n\n\t_focusCurrentItem() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tif (currentItem) {\n\t\t\tcurrentItem.focus();\n\t\t}\n\t}\n\n\t_canNavigate() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tconst activeElement = getActiveElement();\n\n\t\treturn currentItem && currentItem === activeElement;\n\t}\n\n\t_getCurrentItem() {\n\t\tconst items = this._getItems();\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\t// normalize the index\n\t\twhile (this._currentIndex >= items.length) {\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t}\n\n\t\tif (this._currentIndex < 0) {\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\n\t\tconst currentItem = items[this._currentIndex];\n\n\t\tif (!currentItem) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (instanceOfUI5Element(currentItem)) {\n\t\t\treturn currentItem.getFocusDomRef();\n\t\t}\n\n\t\tconst currentItemDOMRef = this.rootWebComponent.getDomRef();\n\t\tif (!currentItemDOMRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (currentItem.id) {\n\t\t\treturn currentItemDOMRef.querySelector(`[id=\"${currentItem.id}\"]`) as HTMLElement;\n\t\t}\n\t}\n}\n\nexport default ItemNavigation;\n\nexport {\n\tITabbable,\n};\n"]}
1
+ {"version":3,"file":"ItemNavigation.js","sourceRoot":"","sources":["../../src/delegate/ItemNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GACR,MAAM,YAAY,CAAC;AACpB,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAE3D,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,sBAAsB,MAAM,oCAAoC,CAAC;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAiBxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,cAAc;IAmBnB;;;;;;;;;;;;;OAaG;IACH,YAAY,gBAA4B,EAAE,OAA8B;QACvE,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC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C3B,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;SACvB;QAED,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAE9C,IAAI,CAAC,WAAW,EAAE;YACjB,OAAO;SACP;QAED,IAAI,oBAAoB,CAAC,WAAW,CAAC,EAAE;YACtC,OAAO,WAAW,CAAC,cAAc,EAAE,CAAC;SACpC;QAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC;QAC5D,IAAI,CAAC,iBAAiB,EAAE;YACvB,OAAO;SACP;QAED,IAAI,WAAW,CAAC,EAAE,EAAE;YACnB,OAAO,iBAAiB,CAAC,aAAa,CAAC,QAAQ,WAAW,CAAC,EAAE,IAAI,CAAgB,CAAC;SAClF;IACF,CAAC;CACD;AAED,eAAe,cAAc,CAAC","sourcesContent":["import {\n\tisDown,\n\tisUp,\n\tisLeft,\n\tisRight,\n\tisHome,\n\tisEnd,\n\tisPageDown,\n\tisPageUp,\n} from \"../Keys.js\";\nimport getActiveElement from \"../util/getActiveElement.js\";\n\nimport NavigationMode from \"../types/NavigationMode.js\";\nimport ItemNavigationBehavior from \"../types/ItemNavigationBehavior.js\";\n\nimport type UI5Element from \"../UI5Element.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\n\ninterface ITabbable {\n\tid: string,\n\t_tabIndex: string,\n}\n\ntype ItemNavigationOptions = {\n\tcurrentIndex?: number,\n\tnavigationMode?: NavigationMode,\n\trowSize?: number\n\tskipItemsSize?: number,\n\tbehavior?: ItemNavigationBehavior,\n\tgetItemsCallback: () => Array<ITabbable>,\n\taffectedPropertiesNames?: Array<string>,\n};\n\n/**\n * The ItemNavigation class manages the calculations to determine the correct \"tabindex\" for a group of related items inside a root component.\n * Important: ItemNavigation only does the calculations and does not change \"tabindex\" directly, this is a responsibility of the developer.\n *\n * The keys that trigger ItemNavigation are:\n * - Up/down\n * - Left/right\n * - Home/End\n *\n * Usage:\n * 1) Use the \"getItemsCallback\" constructor property to pass a callback to ItemNavigation, which, whenever called, will return the list of items to navigate among.\n *\n * Each item passed to ItemNavigation via \"getItemsCallback\" must be:\n * - A) either a UI5Element with a \"_tabIndex\" property\n * - B) or an Object with \"id\" and \"_tabIndex\" properties which represents a part of the root component's shadow DOM.\n * The \"id\" must be a valid ID within the shadow root of the component ItemNavigation operates on.\n * This object must not be a DOM object because, as said, ItemNavigation will not set \"tabindex\" on it. It must be a representation of a DOM object only\n * and the developer has the responsibility to update the \"tabindex\" in the component's DOM.\n * - C) a combination of the above\n *\n * Whenever the user navigates with the keyboard, ItemNavigation will modify the \"_tabIndex\" properties of the items.\n * It is the items' responsibilities to re-render themselves and apply the correct value of \"tabindex\" (i.e. to map the \"_tabIndex\" ItemNavigation set to them to the \"tabindex\" property).\n * If the items of the ItemNavigation are UI5Elements themselves, this can happen naturally since they will be invalidated by their \"_tabIndex\" property.\n * If the items are Objects with \"id\" and \"_tabIndex\" however, it is the developer's responsibility to apply these and the easiest way is to have the root component invalidated by ItemNavigation.\n * To do so, set the \"affectedPropertiesNames\" constructor property to point to one or more of the root component's properties that need refreshing when \"_tabIndex\" is changed deeply.\n *\n * 2) Call the \"setCurrentItem\" method of ItemNavigation whenever you want to change the current item.\n * This is most commonly required if the user for example clicks on an item and thus selects it directly.\n * Pass as the only argument to \"setCurrentItem\" the item that becomes current (must be one of the items, returned by \"getItemsCallback\").\n *\n * @class\n * @public\n */\nclass ItemNavigation {\n\trootWebComponent: UI5Element;\n\n\t_getItems: () => Array<ITabbable>;\n\n\t_currentIndex: number;\n\n\t_rowSize: number;\n\n\t_behavior: ItemNavigationBehavior;\n\n\t_navigationMode: NavigationMode;\n\n\t_affectedPropertiesNames: Array<string>;\n\n\t_skipItemsSize: number | null;\n\n\t_initBound: () => void;\n\n\t/**\n\t *\n\t * @param rootWebComponent the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n\t * @param {ItemNavigationOptions} options Object with configuration options:\n\t * - currentIndex: the index of the item that will be initially selected (from which navigation will begin)\n\t * - navigationMode (Auto|Horizontal|Vertical): whether the items are displayed horizontally (Horizontal), vertically (Vertical) or as a matrix (Auto) meaning the user can navigate in both directions (up/down and left/right)\n\t * - rowSize: tells how many items per row there are when the items are not rendered as a flat list but rather as a matrix. Relevant for navigationMode=Auto\n\t * \t- skipItemsSize: tells how many items upon PAGE_UP and PAGE_DOWN should be skipped to applying the focus on the next item\n\t * - behavior (Static|Cycling): tells what to do when trying to navigate beyond the first and last items\n\t * Static means that nothing happens if the user tries to navigate beyond the first/last item.\n\t * Cycling means that when the user navigates beyond the last item they go to the first and vice versa.\n\t * - getItemsCallback: function that, when called, returns an array with all items the user can navigate among\n\t * - affectedPropertiesNames: a list of metadata properties on the root component which, upon user navigation, will be reassigned by address thus causing the root component to invalidate\n\t */\n\tconstructor(rootWebComponent: UI5Element, options: ItemNavigationOptions) {\n\t\tif (!rootWebComponent.isUI5Element) {\n\t\t\tthrow new Error(\"The root web component must be a UI5 Element instance\");\n\t\t}\n\n\t\tthis.rootWebComponent = rootWebComponent;\n\t\tthis.rootWebComponent.addEventListener(\"keydown\", this._onkeydown.bind(this));\n\t\tthis._initBound = this._init.bind(this);\n\t\tthis.rootWebComponent.attachComponentStateFinalized(this._initBound);\n\n\t\tif (typeof options.getItemsCallback !== \"function\") {\n\t\t\tthrow new Error(\"getItemsCallback is required\");\n\t\t}\n\n\t\tthis._getItems = options.getItemsCallback;\n\t\tthis._currentIndex = options.currentIndex || 0;\n\t\tthis._rowSize = options.rowSize || 1;\n\t\tthis._behavior = options.behavior || ItemNavigationBehavior.Static;\n\t\tthis._navigationMode = options.navigationMode || NavigationMode.Auto;\n\t\tthis._affectedPropertiesNames = options.affectedPropertiesNames || [];\n\t\tthis._skipItemsSize = options.skipItemsSize || null;\n\t}\n\n\t/**\n\t * Call this method to set a new \"current\" (selected) item in the item navigation\n\t * Note: the item passed to this function must be one of the items, returned by the getItemsCallback function\n\t *\n\t * @public\n\t * @param current the new selected item\n\t */\n\tsetCurrentItem(current: ITabbable): void {\n\t\tconst currentItemIndex = this._getItems().indexOf(current);\n\n\t\tif (currentItemIndex === -1) {\n\t\t\tconsole.warn(`The provided item is not managed by ItemNavigation`, current); // eslint-disable-line\n\t\t\treturn;\n\t\t}\n\n\t\tthis._currentIndex = currentItemIndex;\n\t\tthis._applyTabIndex();\n\t}\n\n\t/**\n\t * Call this method to dynamically change the row size\n\t *\n\t * @public\n\t * @param newRowSize\n\t */\n\tsetRowSize(newRowSize: number): void {\n\t\tthis._rowSize = newRowSize;\n\t}\n\n\t_init() {\n\t\tthis._getItems().forEach((item, idx) => {\n\t\t\titem._tabIndex = (idx === this._currentIndex) ? \"0\" : \"-1\";\n\t\t});\n\t}\n\n\t_onkeydown(event: KeyboardEvent) {\n\t\tif (!this._canNavigate()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst horizontalNavigationOn = this._navigationMode === NavigationMode.Horizontal || this._navigationMode === NavigationMode.Auto;\n\t\tconst verticalNavigationOn = this._navigationMode === NavigationMode.Vertical || this._navigationMode === NavigationMode.Auto;\n\t\tconst isRTL = this.rootWebComponent.effectiveDir === \"rtl\";\n\n\t\tif (isRTL && isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isRTL && isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isLeft(event) && horizontalNavigationOn) {\n\t\t\tthis._handleLeft();\n\t\t} else if (isRight(event) && horizontalNavigationOn) {\n\t\t\tthis._handleRight();\n\t\t} else if (isUp(event) && verticalNavigationOn) {\n\t\t\tthis._handleUp();\n\t\t} else if (isDown(event) && verticalNavigationOn) {\n\t\t\tthis._handleDown();\n\t\t} else if (isHome(event)) {\n\t\t\tthis._handleHome();\n\t\t} else if (isEnd(event)) {\n\t\t\tthis._handleEnd();\n\t\t} else if (isPageUp(event)) {\n\t\t\tthis._handlePageUp();\n\t\t} else if (isPageDown(event)) {\n\t\t\tthis._handlePageDown();\n\t\t} else {\n\t\t\treturn; // if none of the supported keys is pressed, we don't want to prevent the event or update the item navigation\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis._applyTabIndex();\n\t\tthis._focusCurrentItem();\n\t}\n\n\t_handleUp() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex - this._rowSize >= 0) { // no border reached, just decrease the index by a row\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **last** item in the **previous** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize;\n\t\t\tconst firstItemInPreviousColumnIndex = firstItemInThisColumnIndex === 0 ? this._rowSize - 1 : firstItemInThisColumnIndex - 1; // find the first item in the previous column (if the current column is the first column -> move to the last column)\n\t\t\tconst rows = Math.ceil(itemsLength / this._rowSize); // how many rows there are (even if incomplete, f.e. for 14 items and _rowSize=4 -> 4 rows total, although only 2 items on the last row)\n\t\t\tlet lastItemInPreviousColumnIndex = firstItemInPreviousColumnIndex + (rows - 1) * this._rowSize; // multiply rows by columns, and add the column's first item's index\n\t\t\tif (lastItemInPreviousColumnIndex > itemsLength - 1) { // for incomplete rows, use the previous row's last item, as for them the last item is missing\n\t\t\t\tlastItemInPreviousColumnIndex -= this._rowSize;\n\t\t\t}\n\t\t\tthis._currentIndex = lastItemInPreviousColumnIndex;\n\t\t} else { // not cyclic, so just go to the first item\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleDown() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex + this._rowSize < itemsLength) { // no border reached, just increase the index by a row\n\t\t\tthis._currentIndex += this._rowSize;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // if cyclic, go to the **first** item in the **next** column\n\t\t\tconst firstItemInThisColumnIndex = this._currentIndex % this._rowSize; // find the first item in the current column first\n\t\t\tconst firstItemInNextColumnIndex = (firstItemInThisColumnIndex + 1) % this._rowSize; // to get the first item in the next column, just increase the index by 1. The modulo by rows is for the case when we are at the last column\n\t\t\tthis._currentIndex = firstItemInNextColumnIndex;\n\t\t} else { // not cyclic, so just go to the last item\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleLeft() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex > 0) {\n\t\t\tthis._currentIndex -= 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = itemsLength - 1;\n\t\t}\n\t}\n\n\t_handleRight() {\n\t\tconst itemsLength = this._getItems().length;\n\t\tif (this._currentIndex < itemsLength - 1) {\n\t\t\tthis._currentIndex += 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._behavior === ItemNavigationBehavior.Cyclic) { // go to the first item in the next column\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\t}\n\n\t_handleHome() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex -= this._currentIndex % homeEndRange;\n\t}\n\n\t_handleEnd() {\n\t\tconst homeEndRange = this._rowSize > 1 ? this._rowSize : this._getItems().length;\n\t\tthis._currentIndex += (homeEndRange - 1 - this._currentIndex % homeEndRange); // eslint-disable-line\n\t}\n\n\t_handlePageUp() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageUpFlat();\n\t}\n\n\t_handlePageDown() {\n\t\tif (this._rowSize > 1) {\n\t\t\t// eslint-disable-next-line\n\t\t\t// TODO: handle page up on matrix (grid) layout - ColorPalette, ProductSwitch.\n\t\t\treturn;\n\t\t}\n\t\tthis._handlePageDownFlat();\n\t}\n\n\t/**\n\t * Handles PAGE_UP in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageUpFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._currentIndex + 1 > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items to the top,\n\t\t\t// move the focus up/left with the predefined number.\n\t\t\tthis._currentIndex -= this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very top (as Home).\n\t\t\tthis._currentIndex -= this._currentIndex;\n\t\t}\n\t}\n\n\t/**\n\t * Handles PAGE_DOWN in a flat list-like structure, both vertically and horizontally.\n\t */\n\t_handlePageDownFlat() {\n\t\tif (this._skipItemsSize === null) {\n\t\t\t// Move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentToEndRange = this._getItems().length - this._currentIndex - 1;\n\n\t\tif (currentToEndRange > this._skipItemsSize) {\n\t\t\t// When there are more than \"skipItemsSize\" number of items until the bottom,\n\t\t\t// move the focus down/right with the predefined number.\n\t\t\tthis._currentIndex += this._skipItemsSize;\n\t\t} else {\n\t\t\t// Otherwise, move the focus to the very bottom (as End).\n\t\t\tthis._currentIndex = this._getItems().length - 1;\n\t\t}\n\t}\n\n\t_applyTabIndex() {\n\t\tconst items = this._getItems();\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i]._tabIndex = i === this._currentIndex ? \"0\" : \"-1\";\n\t\t}\n\n\t\tthis._affectedPropertiesNames.forEach(propName => {\n\t\t\tconst prop = (this.rootWebComponent as Record<string, any>)[propName];\n\t\t\t(this.rootWebComponent as Record<string, any>)[propName] = Array.isArray(prop) ? [...prop] : { ...prop };\n\t\t});\n\t}\n\n\t_focusCurrentItem() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tif (currentItem) {\n\t\t\tcurrentItem.focus();\n\t\t}\n\t}\n\n\t_canNavigate() {\n\t\tconst currentItem = this._getCurrentItem();\n\t\tconst activeElement = getActiveElement();\n\n\t\treturn currentItem && currentItem === activeElement;\n\t}\n\n\t_getCurrentItem() {\n\t\tconst items = this._getItems();\n\n\t\tif (!items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\t// normalize the index\n\t\twhile (this._currentIndex >= items.length) {\n\t\t\tthis._currentIndex -= this._rowSize;\n\t\t}\n\n\t\tif (this._currentIndex < 0) {\n\t\t\tthis._currentIndex = 0;\n\t\t}\n\n\t\tconst currentItem = items[this._currentIndex];\n\n\t\tif (!currentItem) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (instanceOfUI5Element(currentItem)) {\n\t\t\treturn currentItem.getFocusDomRef();\n\t\t}\n\n\t\tconst currentItemDOMRef = this.rootWebComponent.getDomRef();\n\t\tif (!currentItemDOMRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (currentItem.id) {\n\t\t\treturn currentItemDOMRef.querySelector(`[id=\"${currentItem.id}\"]`) as HTMLElement;\n\t\t}\n\t}\n}\n\nexport default ItemNavigation;\n\nexport {\n\tITabbable,\n};\n"]}
@@ -7,17 +7,15 @@ type ResizeObserverCallback = () => Promise<void> | void;
7
7
  */
8
8
  declare class ResizeHandler {
9
9
  /**
10
- * @static
11
10
  * @public
12
- * @param {*} element UI5 Web Component or DOM Element to be observed
13
- * @param {*} callback Callback to be executed
11
+ * @param element UI5 Web Component or DOM Element to be observed
12
+ * @param callback Callback to be executed
14
13
  */
15
14
  static register(element: HTMLElement, callback: ResizeObserverCallback): void;
16
15
  /**
17
- * @static
18
16
  * @public
19
- * @param {*} element UI5 Web Component or DOM Element to be unobserved
20
- * @param {*} callback Callback to be removed
17
+ * @param element UI5 Web Component or DOM Element to be unobserved
18
+ * @param callback Callback to be removed
21
19
  */
22
20
  static deregister(element: HTMLElement, callback: ResizeObserverCallback): void;
23
21
  }
@@ -47,10 +47,9 @@ const unobserve = (element, callback) => {
47
47
  */
48
48
  class ResizeHandler {
49
49
  /**
50
- * @static
51
50
  * @public
52
- * @param {*} element UI5 Web Component or DOM Element to be observed
53
- * @param {*} callback Callback to be executed
51
+ * @param element UI5 Web Component or DOM Element to be observed
52
+ * @param callback Callback to be executed
54
53
  */
55
54
  static register(element, callback) {
56
55
  let effectiveElement = element;
@@ -65,10 +64,9 @@ class ResizeHandler {
65
64
  }
66
65
  }
67
66
  /**
68
- * @static
69
67
  * @public
70
- * @param {*} element UI5 Web Component or DOM Element to be unobserved
71
- * @param {*} callback Callback to be removed
68
+ * @param element UI5 Web Component or DOM Element to be unobserved
69
+ * @param callback Callback to be removed
72
70
  */
73
71
  static deregister(element, callback) {
74
72
  let effectiveElement = element;
@@ -1 +1 @@
1
- {"version":3,"file":"ResizeHandler.js","sourceRoot":"","sources":["../../src/delegate/ResizeHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAIxD,IAAI,cAA8B,CAAC;AACnC,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA8C,CAAC;AAE/E,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,IAAI,CAAC,cAAc,EAAE;QACpB,cAAc,GAAG,IAAI,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YACpD,MAAM,CAAC,qBAAqB,CAAC,GAAG,EAAE;gBACjC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACvB,MAAM,SAAS,GAAG,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAqB,CAAC,CAAC;oBACpE,yHAAyH;oBACzH,sIAAsI;oBACtI,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAgC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;gBAC3F,CAAC,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;KACH;IACD,OAAO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EAAE,CAAC;SAChD;QAED,IAAI,gBAAgB,YAAY,WAAW,EAAE;YAC5C,OAAO,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;SACpC;aAAM;YACN,OAAO,CAAC,IAAI,CAAC,2CAA2C,EAAE,OAAO,CAAC,CAAC,CAAC,sBAAsB;SAC1F;IACF,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,CAAC,OAAoB,EAAE,QAAgC;QACvE,IAAI,gBAAgB,GAA4B,OAAO,CAAC;QAExD,IAAI,oBAAoB,CAAC,gBAAgB,CAAC,EAAE;YAC3C,gBAAgB,GAAG,gBAAgB,CAAC,SAAS,EAAE,CAAC;SAChD;QAED,IAAI,gBAAgB,YAAY,WAAW,EAAE;YAC5C,SAAS,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;SACtC;aAAM;YACN,OAAO,CAAC,IAAI,CAAC,6CAA6C,EAAE,OAAO,CAAC,CAAC,CAAC,sBAAsB;SAC5F;IACF,CAAC;CACD;AAED,eAAe,aAAa,CAAC","sourcesContent":["import { instanceOfUI5Element } from \"../UI5Element.js\";\n\ntype ResizeObserverCallback = () => Promise<void> | void;\n\nlet resizeObserver: ResizeObserver;\nconst observedElements = new Map<HTMLElement, Array<ResizeObserverCallback>>();\n\nconst getResizeObserver = () => {\n\tif (!resizeObserver) {\n\t\tresizeObserver = new window.ResizeObserver(entries => {\n\t\t\twindow.requestAnimationFrame(() => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tconst callbacks = observedElements.get(entry.target as HTMLElement);\n\t\t\t\t\t// Callbacks could be async and we need to handle returned promises to comply with the eslint \"no-misused-promises\" rule.\n\t\t\t\t\t// Although Promise.all awaits all, we don't await the additional task after calling the callbacks and should not make any difference.\n\t\t\t\t\tcallbacks && Promise.all(callbacks.map((callback: ResizeObserverCallback) => callback()));\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\treturn resizeObserver;\n};\n\nconst observe = (element: HTMLElement, callback: ResizeObserverCallback) => {\n\tconst callbacks = observedElements.get(element) || [];\n\n\t// if no callbacks have been added for this element - start observing it\n\tif (!callbacks.length) {\n\t\tgetResizeObserver().observe(element);\n\t}\n\n\t// save the callbacks in an array\n\tobservedElements.set(element, [...callbacks, callback]);\n};\n\nconst unobserve = (element: HTMLElement, callback: ResizeObserverCallback) => {\n\tconst callbacks = observedElements.get(element) || [];\n\tif (callbacks.length === 0) {\n\t\treturn;\n\t}\n\n\tconst filteredCallbacks = callbacks.filter((fn: ResizeObserverCallback) => fn !== callback);\n\tif (filteredCallbacks.length === 0) {\n\t\tgetResizeObserver().unobserve(element);\n\t\tobservedElements.delete(element);\n\t} else {\n\t\tobservedElements.set(element, filteredCallbacks);\n\t}\n};\n\n/**\n * Allows to register/deregister resize observers for a DOM element\n *\n * @public\n * @class\n */\nclass ResizeHandler {\n\t/**\n\t * @static\n\t * @public\n\t * @param {*} element UI5 Web Component or DOM Element to be observed\n\t * @param {*} callback Callback to be executed\n\t */\n\tstatic register(element: HTMLElement, callback: ResizeObserverCallback) {\n\t\tlet effectiveElement: HTMLElement | undefined = element;\n\n\t\tif (instanceOfUI5Element(effectiveElement)) {\n\t\t\teffectiveElement = effectiveElement.getDomRef();\n\t\t}\n\n\t\tif (effectiveElement instanceof HTMLElement) {\n\t\t\tobserve(effectiveElement, callback);\n\t\t} else {\n\t\t\tconsole.warn(\"Cannot register ResizeHandler for element\", element); // eslint-disable-line\n\t\t}\n\t}\n\n\t/**\n\t * @static\n\t * @public\n\t * @param {*} element UI5 Web Component or DOM Element to be unobserved\n\t * @param {*} callback Callback to be removed\n\t */\n\tstatic deregister(element: HTMLElement, callback: ResizeObserverCallback) {\n\t\tlet effectiveElement: HTMLElement | undefined = element;\n\n\t\tif (instanceOfUI5Element(effectiveElement)) {\n\t\t\teffectiveElement = effectiveElement.getDomRef();\n\t\t}\n\n\t\tif (effectiveElement instanceof HTMLElement) {\n\t\t\tunobserve(effectiveElement, callback);\n\t\t} else {\n\t\t\tconsole.warn(\"Cannot deregister ResizeHandler for element\", element); // eslint-disable-line\n\t\t}\n\t}\n}\n\nexport default ResizeHandler;\nexport type {\n\tResizeObserverCallback,\n};\n"]}
1
+ {"version":3,"file":"ResizeHandler.js","sourceRoot":"","sources":["../../src/delegate/ResizeHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAIxD,IAAI,cAA8B,CAAC;AACnC,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAA8C,CAAC;AAE/E,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,IAAI,CAAC,cAAc,EAAE;QACpB,cAAc,GAAG,IAAI,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YACpD,MAAM,CAAC,qBAAqB,CAAC,GAAG,EAAE;gBACjC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACvB,MAAM,SAAS,GAAG,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,MAAqB,CAAC,CAAC;oBACpE,yHAAyH;oBACzH,sIAAsI;oBACtI,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAgC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;gBAC3F,CAAC,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;KACH;IACD,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,OAAoB,EAAE,QAAgC,EAAE,EAAE;IAC1E,MAAM,SAAS,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IAEtD,wEAAwE;IACxE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;QACtB,iBAAiB,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;KACrC;IAED,iCAAiC;IACjC,gBAAgB,CAAC,GAAG,C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CAAC,gBAAgB,CAAC,EAAE;YAC3C,gBAAgB,GAAG,gBAAgB,CAAC,SAAS,EAAE,CAAC;SAChD;QAED,IAAI,gBAAgB,YAAY,WAAW,EAAE;YAC5C,SAAS,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;SACtC;aAAM;YACN,OAAO,CAAC,IAAI,CAAC,6CAA6C,EAAE,OAAO,CAAC,CAAC,CAAC,sBAAsB;SAC5F;IACF,CAAC;CACD;AAED,eAAe,aAAa,CAAC","sourcesContent":["import { instanceOfUI5Element } from \"../UI5Element.js\";\n\ntype ResizeObserverCallback = () => Promise<void> | void;\n\nlet resizeObserver: ResizeObserver;\nconst observedElements = new Map<HTMLElement, Array<ResizeObserverCallback>>();\n\nconst getResizeObserver = () => {\n\tif (!resizeObserver) {\n\t\tresizeObserver = new window.ResizeObserver(entries => {\n\t\t\twindow.requestAnimationFrame(() => {\n\t\t\t\tentries.forEach(entry => {\n\t\t\t\t\tconst callbacks = observedElements.get(entry.target as HTMLElement);\n\t\t\t\t\t// Callbacks could be async and we need to handle returned promises to comply with the eslint \"no-misused-promises\" rule.\n\t\t\t\t\t// Although Promise.all awaits all, we don't await the additional task after calling the callbacks and should not make any difference.\n\t\t\t\t\tcallbacks && Promise.all(callbacks.map((callback: ResizeObserverCallback) => callback()));\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\treturn resizeObserver;\n};\n\nconst observe = (element: HTMLElement, callback: ResizeObserverCallback) => {\n\tconst callbacks = observedElements.get(element) || [];\n\n\t// if no callbacks have been added for this element - start observing it\n\tif (!callbacks.length) {\n\t\tgetResizeObserver().observe(element);\n\t}\n\n\t// save the callbacks in an array\n\tobservedElements.set(element, [...callbacks, callback]);\n};\n\nconst unobserve = (element: HTMLElement, callback: ResizeObserverCallback) => {\n\tconst callbacks = observedElements.get(element) || [];\n\tif (callbacks.length === 0) {\n\t\treturn;\n\t}\n\n\tconst filteredCallbacks = callbacks.filter((fn: ResizeObserverCallback) => fn !== callback);\n\tif (filteredCallbacks.length === 0) {\n\t\tgetResizeObserver().unobserve(element);\n\t\tobservedElements.delete(element);\n\t} else {\n\t\tobservedElements.set(element, filteredCallbacks);\n\t}\n};\n\n/**\n * Allows to register/deregister resize observers for a DOM element\n *\n * @public\n * @class\n */\nclass ResizeHandler {\n\t/**\n\t * @public\n\t * @param element UI5 Web Component or DOM Element to be observed\n\t * @param callback Callback to be executed\n\t */\n\tstatic register(element: HTMLElement, callback: ResizeObserverCallback): void {\n\t\tlet effectiveElement: HTMLElement | undefined = element;\n\n\t\tif (instanceOfUI5Element(effectiveElement)) {\n\t\t\teffectiveElement = effectiveElement.getDomRef();\n\t\t}\n\n\t\tif (effectiveElement instanceof HTMLElement) {\n\t\t\tobserve(effectiveElement, callback);\n\t\t} else {\n\t\t\tconsole.warn(\"Cannot register ResizeHandler for element\", element); // eslint-disable-line\n\t\t}\n\t}\n\n\t/**\n\t * @public\n\t * @param element UI5 Web Component or DOM Element to be unobserved\n\t * @param callback Callback to be removed\n\t */\n\tstatic deregister(element: HTMLElement, callback: ResizeObserverCallback): void {\n\t\tlet effectiveElement: HTMLElement | undefined = element;\n\n\t\tif (instanceOfUI5Element(effectiveElement)) {\n\t\t\teffectiveElement = effectiveElement.getDomRef();\n\t\t}\n\n\t\tif (effectiveElement instanceof HTMLElement) {\n\t\t\tunobserve(effectiveElement, callback);\n\t\t} else {\n\t\t\tconsole.warn(\"Cannot deregister ResizeHandler for element\", element); // eslint-disable-line\n\t\t}\n\t}\n}\n\nexport default ResizeHandler;\nexport type {\n\tResizeObserverCallback,\n};\n"]}
@@ -5,7 +5,7 @@ const VersionInfo = {
5
5
  patch: 0,
6
6
  suffix: "",
7
7
  isNext: false,
8
- buildTime: 1704961561,
8
+ buildTime: 1704960349,
9
9
  };
10
10
  export default VersionInfo;
11
11
  //# sourceMappingURL=VersionInfo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"1.21.0\",\n\tmajor: 1,\n\tminor: 21,\n\tpatch: 0,\n\tsuffix: \"\",\n\tisNext: false,\n\tbuildTime: 1704961561,\n};\nexport default VersionInfo;"]}
1
+ {"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"1.21.0\",\n\tmajor: 1,\n\tminor: 21,\n\tpatch: 0,\n\tsuffix: \"\",\n\tisNext: false,\n\tbuildTime: 1704960349,\n};\nexport default VersionInfo;"]}
@@ -15,9 +15,8 @@ declare class I18nBundle {
15
15
  * Returns a text in the currently loaded language
16
16
  *
17
17
  * @public
18
- * @param {Object|String} textObj key/defaultText pair or just the key
18
+ * @param textObj key/defaultText pair or just the key
19
19
  * @param params Values for the placeholders
20
- * @returns {string}
21
20
  */
22
21
  getText(textObj: I18nText | string, ...params: Array<number | string>): string;
23
22
  }
@@ -26,7 +25,6 @@ declare class I18nBundle {
26
25
  *
27
26
  * @public
28
27
  * @param packageName
29
- * @returns { Promise<I18nBundle> }
30
28
  */
31
29
  declare const getI18nBundle: (packageName: string) => Promise<I18nBundle>;
32
30
  /**
@@ -14,9 +14,8 @@ class I18nBundle {
14
14
  * Returns a text in the currently loaded language
15
15
  *
16
16
  * @public
17
- * @param {Object|String} textObj key/defaultText pair or just the key
17
+ * @param textObj key/defaultText pair or just the key
18
18
  * @param params Values for the placeholders
19
- * @returns {string}
20
19
  */
21
20
  getText(textObj, ...params) {
22
21
  if (typeof textObj === "string") {
@@ -39,7 +38,6 @@ class I18nBundle {
39
38
  *
40
39
  * @public
41
40
  * @param packageName
42
- * @returns { I18nBundle }
43
41
  */
44
42
  const getI18nBundleSync = (packageName) => {
45
43
  if (I18nBundleInstances.has(packageName)) {
@@ -54,7 +52,6 @@ const getI18nBundleSync = (packageName) => {
54
52
  *
55
53
  * @public
56
54
  * @param packageName
57
- * @returns { Promise<I18nBundle> }
58
55
  */
59
56
  const getI18nBundle = async (packageName) => {
60
57
  if (customGetI18nBundle) {
@@ -1 +1 @@
1
- {"version":3,"file":"i18nBundle.js","sourceRoot":"","sources":["../src/i18nBundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpG,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAEpD,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAsB,CAAC;AAE1D,IAAI,mBAAqC,CAAC;AAS1C;;;GAGG;AACH,MAAM,UAAU;IAGf,YAAY,WAAmB;QAC9B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAChC,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,OAA0B,EAAE,GAAG,MAA8B;QACpE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAChC,OAAO,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;SACjD;QAED,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAC7B,OAAO,EAAE,CAAC;SACV;QAED,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,C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,EACN,kBAAkB,EAClB,aAAa,EACb,8BAA8B,GAC9B,CAAC","sourcesContent":["import { registerI18nLoader, fetchI18nBundle, getI18nBundleData } from \"./asset-registries/i18n.js\";\nimport formatMessage from \"./util/formatMessage.js\";\n\nconst I18nBundleInstances = new Map<string, I18nBundle>();\n\nlet customGetI18nBundle: I18nBundleGetter;\n\ntype I18nText = {\n\tkey: string,\n\tdefaultText: string,\n};\n\ntype I18nBundleGetter = (packageName: string) => Promise<I18nBundle>;\n\n/**\n * @class\n * @public\n */\nclass I18nBundle {\n\tpackageName: string;\n\n\tconstructor(packageName: string) {\n\t\tthis.packageName = packageName;\n\t}\n\n\t/**\n\t * Returns a text in the currently loaded language\n\t *\n\t * @public\n\t * @param {Object|String} textObj key/defaultText pair or just the key\n\t * @param params Values for the placeholders\n\t * @returns {string}\n\t */\n\tgetText(textObj: I18nText | string, ...params: Array<number | string>): string {\n\t\tif (typeof textObj === \"string\") {\n\t\t\ttextObj = { key: textObj, defaultText: textObj };\n\t\t}\n\n\t\tif (!textObj || !textObj.key) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst bundle = getI18nBundleData(this.packageName);\n\t\tif (bundle && !bundle[textObj.key]) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(`Key ${textObj.key} not found in the i18n bundle, the default text will be used`);\n\t\t}\n\t\tconst messageText = bundle && bundle[textObj.key] ? bundle[textObj.key] : (textObj.defaultText || textObj.key);\n\n\t\treturn formatMessage(messageText, params);\n\t}\n}\n\n/**\n * Returns the I18nBundle instance for the given package synchronously.\n *\n * @public\n * @param packageName\n * @returns { I18nBundle }\n */\nconst getI18nBundleSync = (packageName: string): I18nBundle => {\n\tif (I18nBundleInstances.has(packageName)) {\n\t\treturn I18nBundleInstances.get(packageName)!;\n\t}\n\n\tconst i18nBundle = new I18nBundle(packageName);\n\tI18nBundleInstances.set(packageName, i18nBundle);\n\treturn i18nBundle;\n};\n\n/**\n * Fetches and returns the I18nBundle instance for the given package.\n *\n * @public\n * @param packageName\n * @returns { Promise<I18nBundle> }\n */\nconst getI18nBundle = async (packageName: string): Promise<I18nBundle> => {\n\tif (customGetI18nBundle) {\n\t\treturn customGetI18nBundle(packageName);\n\t}\n\n\tawait fetchI18nBundle(packageName);\n\treturn getI18nBundleSync(packageName);\n};\n\n/**\n * Allows developers to provide a custom getI18nBundle implementation\n * If this function is called, the custom implementation will be used for all components and will completely\n * replace the default implementation.\n *\n * @public\n * @param customGet the function to use instead of the standard getI18nBundle implementation\n */\nconst registerCustomI18nBundleGetter = (customGet: I18nBundleGetter) => {\n\tcustomGetI18nBundle = customGet;\n};\n\nexport default I18nBundle;\n\nexport {\n\tregisterI18nLoader,\n\tgetI18nBundle,\n\tregisterCustomI18nBundleGetter,\n};\n\nexport type {\n\tI18nText,\n};\n"]}
1
+ {"version":3,"file":"i18nBundle.js","sourceRoot":"","sources":["../src/i18nBundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpG,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAEpD,MAAM,mBAAmB,GAAG,IAAI,GAAG,EAAsB,CAAC;AAE1D,IAAI,mBAAqC,CAAC;AAS1C;;;GAGG;AACH,MAAM,UAAU;IAGf,YAAY,WAAmB;QAC9B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAChC,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,OAA0B,EAAE,GAAG,MAA8B;QACpE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAChC,OAAO,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;SACjD;QAED,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAC7B,OAAO,EAAE,CAAC;SACV;QAED,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC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,EACb,8BAA8B,GAC9B,CAAC","sourcesContent":["import { registerI18nLoader, fetchI18nBundle, getI18nBundleData } from \"./asset-registries/i18n.js\";\nimport formatMessage from \"./util/formatMessage.js\";\n\nconst I18nBundleInstances = new Map<string, I18nBundle>();\n\nlet customGetI18nBundle: I18nBundleGetter;\n\ntype I18nText = {\n\tkey: string,\n\tdefaultText: string,\n};\n\ntype I18nBundleGetter = (packageName: string) => Promise<I18nBundle>;\n\n/**\n * @class\n * @public\n */\nclass I18nBundle {\n\tpackageName: string;\n\n\tconstructor(packageName: string) {\n\t\tthis.packageName = packageName;\n\t}\n\n\t/**\n\t * Returns a text in the currently loaded language\n\t *\n\t * @public\n\t * @param textObj key/defaultText pair or just the key\n\t * @param params Values for the placeholders\n\t */\n\tgetText(textObj: I18nText | string, ...params: Array<number | string>): string {\n\t\tif (typeof textObj === \"string\") {\n\t\t\ttextObj = { key: textObj, defaultText: textObj };\n\t\t}\n\n\t\tif (!textObj || !textObj.key) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst bundle = getI18nBundleData(this.packageName);\n\t\tif (bundle && !bundle[textObj.key]) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(`Key ${textObj.key} not found in the i18n bundle, the default text will be used`);\n\t\t}\n\t\tconst messageText = bundle && bundle[textObj.key] ? bundle[textObj.key] : (textObj.defaultText || textObj.key);\n\n\t\treturn formatMessage(messageText, params);\n\t}\n}\n\n/**\n * Returns the I18nBundle instance for the given package synchronously.\n *\n * @public\n * @param packageName\n */\nconst getI18nBundleSync = (packageName: string): I18nBundle => {\n\tif (I18nBundleInstances.has(packageName)) {\n\t\treturn I18nBundleInstances.get(packageName)!;\n\t}\n\n\tconst i18nBundle = new I18nBundle(packageName);\n\tI18nBundleInstances.set(packageName, i18nBundle);\n\treturn i18nBundle;\n};\n\n/**\n * Fetches and returns the I18nBundle instance for the given package.\n *\n * @public\n * @param packageName\n */\nconst getI18nBundle = async (packageName: string): Promise<I18nBundle> => {\n\tif (customGetI18nBundle) {\n\t\treturn customGetI18nBundle(packageName);\n\t}\n\n\tawait fetchI18nBundle(packageName);\n\treturn getI18nBundleSync(packageName);\n};\n\n/**\n * Allows developers to provide a custom getI18nBundle implementation\n * If this function is called, the custom implementation will be used for all components and will completely\n * replace the default implementation.\n *\n * @public\n * @param customGet the function to use instead of the standard getI18nBundle implementation\n */\nconst registerCustomI18nBundleGetter = (customGet: I18nBundleGetter): void => {\n\tcustomGetI18nBundle = customGet;\n};\n\nexport default I18nBundle;\n\nexport {\n\tregisterI18nLoader,\n\tgetI18nBundle,\n\tregisterCustomI18nBundleGetter,\n};\n\nexport type {\n\tI18nText,\n};\n"]}
@@ -1,31 +1,23 @@
1
1
  /**
2
2
  * Different types of AnimationMode.
3
3
  *
4
- * @readonly
5
- * @enum {string}
6
4
  * @public
7
- * @author SAP SE
8
- * @alias sap.ui.webc.base.types.AnimationMode
9
5
  */
10
6
  declare enum AnimationMode {
11
7
  /**
12
8
  * @public
13
- * @type {Full}
14
9
  */
15
10
  Full = "full",
16
11
  /**
17
12
  * @public
18
- * @type {Basic}
19
13
  */
20
14
  Basic = "basic",
21
15
  /**
22
16
  * @public
23
- * @type {Minimal}
24
17
  */
25
18
  Minimal = "minimal",
26
19
  /**
27
20
  * @public
28
- * @type {None}
29
21
  */
30
22
  None = "none"
31
23
  }
@@ -1,32 +1,24 @@
1
1
  /**
2
2
  * Different types of AnimationMode.
3
3
  *
4
- * @readonly
5
- * @enum {string}
6
4
  * @public
7
- * @author SAP SE
8
- * @alias sap.ui.webc.base.types.AnimationMode
9
5
  */
10
6
  var AnimationMode;
11
7
  (function (AnimationMode) {
12
8
  /**
13
9
  * @public
14
- * @type {Full}
15
10
  */
16
11
  AnimationMode["Full"] = "full";
17
12
  /**
18
13
  * @public
19
- * @type {Basic}
20
14
  */
21
15
  AnimationMode["Basic"] = "basic";
22
16
  /**
23
17
  * @public
24
- * @type {Minimal}
25
18
  */
26
19
  AnimationMode["Minimal"] = "minimal";
27
20
  /**
28
21
  * @public
29
- * @type {None}
30
22
  */
31
23
  AnimationMode["None"] = "none";
32
24
  })(AnimationMode || (AnimationMode = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"AnimationMode.js","sourceRoot":"","sources":["../../src/types/AnimationMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,IAAK,aAqBJ;AArBD,WAAK,aAAa;IACjB;;;OAGG;IACH,8BAAa,CAAA;IACb;;;OAGG;IACH,gCAAe,CAAA;IACf;;;OAGG;IACH,oCAAmB,CAAA;IACnB;;;OAGG;IACH,8BAAa,CAAA;AACd,CAAC,EArBI,aAAa,KAAb,aAAa,QAqBjB;AAED,eAAe,aAAa,CAAC","sourcesContent":["/**\n * Different types of AnimationMode.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.base.types.AnimationMode\n */\nenum AnimationMode {\n\t/**\n\t * @public\n\t * @type {Full}\n\t */\n\tFull = \"full\",\n\t/**\n\t * @public\n\t * @type {Basic}\n\t */\n\tBasic = \"basic\",\n\t/**\n\t * @public\n\t * @type {Minimal}\n\t */\n\tMinimal = \"minimal\",\n\t/**\n\t * @public\n\t * @type {None}\n\t */\n\tNone = \"none\",\n}\n\nexport default AnimationMode;\n"]}
1
+ {"version":3,"file":"AnimationMode.js","sourceRoot":"","sources":["../../src/types/AnimationMode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,IAAK,aAiBJ;AAjBD,WAAK,aAAa;IACjB;;OAEG;IACH,8BAAa,CAAA;IACb;;OAEG;IACH,gCAAe,CAAA;IACf;;OAEG;IACH,oCAAmB,CAAA;IACnB;;OAEG;IACH,8BAAa,CAAA;AACd,CAAC,EAjBI,aAAa,KAAb,aAAa,QAiBjB;AAED,eAAe,aAAa,CAAC","sourcesContent":["/**\n * Different types of AnimationMode.\n *\n * @public\n */\nenum AnimationMode {\n\t/**\n\t * @public\n\t */\n\tFull = \"full\",\n\t/**\n\t * @public\n\t */\n\tBasic = \"basic\",\n\t/**\n\t * @public\n\t */\n\tMinimal = \"minimal\",\n\t/**\n\t * @public\n\t */\n\tNone = \"none\",\n}\n\nexport default AnimationMode;\n"]}
@@ -3,10 +3,6 @@ import DataType from "./DataType.js";
3
3
  * @class
4
4
  * CSSColor data type.
5
5
  *
6
- * @extends sap.ui.webc.base.types.DataType
7
- * @constructor
8
- * @author SAP SE
9
- * @alias sap.ui.webc.base.types.CSSColor
10
6
  * @public
11
7
  */
12
8
  declare class CSSColor extends DataType {
@@ -3,10 +3,6 @@ import DataType from "./DataType.js";
3
3
  * @class
4
4
  * CSSColor data type.
5
5
  *
6
- * @extends sap.ui.webc.base.types.DataType
7
- * @constructor
8
- * @author SAP SE
9
- * @alias sap.ui.webc.base.types.CSSColor
10
6
  * @public
11
7
  */
12
8
  class CSSColor extends DataType {
@@ -1 +1 @@
1
- {"version":3,"file":"CSSColor.js","sourceRoot":"","sources":["../../src/types/CSSColor.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;;;;;;;;GASG;AACH,MAAM,QAAS,SAAQ,QAAQ;IAC9B,MAAM,CAAU,OAAO,CAAC,KAAa;QACpC,OAAO,8/DAA8/D,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC,CAAC,sBAAsB;IAC3iE,CAAC;CACD;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import DataType from \"./DataType.js\";\n\n/**\n * @class\n * CSSColor data type.\n *\n * @extends sap.ui.webc.base.types.DataType\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.base.types.CSSColor\n * @public\n */\nclass CSSColor extends DataType {\n\tstatic override isValid(value: string) {\n\t\treturn /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})|rgb\\(\\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\\.[0-9]+)?|100(\\.0+)?)%)\\s*(,\\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\\.[0-9]+)?|100(\\.0+)?)%)\\s*){2}\\)|rgba\\((\\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\\.[0-9]+)?|100(\\.0+)?)%)\\s*,){3}\\s*(0(\\.[0-9]+)?|1(\\.0+)?)\\s*\\)|hsl\\(\\s*([0-2]?[0-9]?[0-9]|3([0-5][0-9]|60))\\s*(,\\s*(([0-9]?[0-9](\\.[0-9]+)?|100(\\.0+)?)%)\\s*){2}\\)|hsla\\(\\s*([0-2]?[0-9]?[0-9]|3([0-5][0-9]|60))\\s*,(\\s*(([0-9]?[0-9](\\.[0-9]+)?|100(\\.0+)?)%)\\s*,){2}\\s*(0(\\.[0-9]+)?|1(\\.0+)?)\\s*\\)|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgrey|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|grey|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgrey|lightgreen|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silverskyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|transparent|inherit|)$/.test(value ); // eslint-disable-line\n\t}\n}\n\nexport default CSSColor;\n"]}
1
+ {"version":3,"file":"CSSColor.js","sourceRoot":"","sources":["../../src/types/CSSColor.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;;;;GAKG;AACH,MAAM,QAAS,SAAQ,QAAQ;IAC9B,MAAM,CAAU,OAAO,CAAC,KAAa;QACpC,OAAO,8/DAA8/D,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC,CAAC,sBAAsB;IAC3iE,CAAC;CACD;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import DataType from \"./DataType.js\";\n\n/**\n * @class\n * CSSColor data type.\n *\n * @public\n */\nclass CSSColor extends DataType {\n\tstatic override isValid(value: string) {\n\t\treturn /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})|rgb\\(\\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\\.[0-9]+)?|100(\\.0+)?)%)\\s*(,\\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\\.[0-9]+)?|100(\\.0+)?)%)\\s*){2}\\)|rgba\\((\\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\\.[0-9]+)?|100(\\.0+)?)%)\\s*,){3}\\s*(0(\\.[0-9]+)?|1(\\.0+)?)\\s*\\)|hsl\\(\\s*([0-2]?[0-9]?[0-9]|3([0-5][0-9]|60))\\s*(,\\s*(([0-9]?[0-9](\\.[0-9]+)?|100(\\.0+)?)%)\\s*){2}\\)|hsla\\(\\s*([0-2]?[0-9]?[0-9]|3([0-5][0-9]|60))\\s*,(\\s*(([0-9]?[0-9](\\.[0-9]+)?|100(\\.0+)?)%)\\s*,){2}\\s*(0(\\.[0-9]+)?|1(\\.0+)?)\\s*\\)|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgrey|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|grey|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgrey|lightgreen|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silverskyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|transparent|inherit|)$/.test(value ); // eslint-disable-line\n\t}\n}\n\nexport default CSSColor;\n"]}
@@ -3,10 +3,6 @@ import DataType from "./DataType.js";
3
3
  * @class
4
4
  * CSSSize data type.
5
5
  *
6
- * @extends sap.ui.webc.base.types.DataType
7
- * @constructor
8
- * @author SAP SE
9
- * @alias sap.ui.webc.base.types.CSSSize
10
6
  * @public
11
7
  */
12
8
  declare class CSSSize extends DataType {
@@ -3,10 +3,6 @@ import DataType from "./DataType.js";
3
3
  * @class
4
4
  * CSSSize data type.
5
5
  *
6
- * @extends sap.ui.webc.base.types.DataType
7
- * @constructor
8
- * @author SAP SE
9
- * @alias sap.ui.webc.base.types.CSSSize
10
6
  * @public
11
7
  */
12
8
  class CSSSize extends DataType {
@@ -1 +1 @@
1
- {"version":3,"file":"CSSSize.js","sourceRoot":"","sources":["../../src/types/CSSSize.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;;;;;;;;GASG;AACH,MAAM,OAAQ,SAAQ,QAAQ;IAC7B,MAAM,CAAC,OAAO,CAAC,KAAa;QAC3B,OAAO,ocAAoc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,sBAAsB;IAChf,CAAC;CACD;AAED,eAAe,OAAO,CAAC","sourcesContent":["import DataType from \"./DataType.js\";\n\n/**\n * @class\n * CSSSize data type.\n *\n * @extends sap.ui.webc.base.types.DataType\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.base.types.CSSSize\n * @public\n */\nclass CSSSize extends DataType {\n\tstatic isValid(value: string) {\n\t\treturn /^(auto|inherit|[-+]?(0*|([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%))|calc\\(\\s*(\\(\\s*)*[-+]?(([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)(\\s*(\\)\\s*)*(\\s[-+]\\s|[*\\/])\\s*(\\(\\s*)*([-+]?(([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)))*\\s*(\\)\\s*)*\\))$/.test(value); // eslint-disable-line\n\t}\n}\n\nexport default CSSSize;\n"]}
1
+ {"version":3,"file":"CSSSize.js","sourceRoot":"","sources":["../../src/types/CSSSize.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;;;;GAKG;AACH,MAAM,OAAQ,SAAQ,QAAQ;IAC7B,MAAM,CAAC,OAAO,CAAC,KAAa;QAC3B,OAAO,ocAAoc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,sBAAsB;IAChf,CAAC;CACD;AAED,eAAe,OAAO,CAAC","sourcesContent":["import DataType from \"./DataType.js\";\n\n/**\n * @class\n * CSSSize data type.\n *\n * @public\n */\nclass CSSSize extends DataType {\n\tstatic isValid(value: string) {\n\t\treturn /^(auto|inherit|[-+]?(0*|([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%))|calc\\(\\s*(\\(\\s*)*[-+]?(([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)(\\s*(\\)\\s*)*(\\s[-+]\\s|[*\\/])\\s*(\\(\\s*)*([-+]?(([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)))*\\s*(\\)\\s*)*\\))$/.test(value); // eslint-disable-line\n\t}\n}\n\nexport default CSSSize;\n"]}
@@ -1,36 +1,27 @@
1
1
  /**
2
2
  * Different calendar types.
3
3
  *
4
- * @readonly
5
- * @enum {string}
6
4
  * @public
7
- * @author SAP SE
8
- * @alias sap.ui.webc.base.types.CalendarType
9
5
  */
10
6
  declare enum CalendarType {
11
7
  /**
12
8
  * @public
13
- * @type {Gregorian}
14
9
  */
15
10
  Gregorian = "Gregorian",
16
11
  /**
17
12
  * @public
18
- * @type {Islamic}
19
13
  */
20
14
  Islamic = "Islamic",
21
15
  /**
22
16
  * @public
23
- * @type {Japanese}
24
17
  */
25
18
  Japanese = "Japanese",
26
19
  /**
27
20
  * @public
28
- * @type {Buddhist}
29
21
  */
30
22
  Buddhist = "Buddhist",
31
23
  /**
32
24
  * @public
33
- * @type {Persian}
34
25
  */
35
26
  Persian = "Persian"
36
27
  }
@@ -1,37 +1,28 @@
1
1
  /**
2
2
  * Different calendar types.
3
3
  *
4
- * @readonly
5
- * @enum {string}
6
4
  * @public
7
- * @author SAP SE
8
- * @alias sap.ui.webc.base.types.CalendarType
9
5
  */
10
6
  var CalendarType;
11
7
  (function (CalendarType) {
12
8
  /**
13
9
  * @public
14
- * @type {Gregorian}
15
10
  */
16
11
  CalendarType["Gregorian"] = "Gregorian";
17
12
  /**
18
13
  * @public
19
- * @type {Islamic}
20
14
  */
21
15
  CalendarType["Islamic"] = "Islamic";
22
16
  /**
23
17
  * @public
24
- * @type {Japanese}
25
18
  */
26
19
  CalendarType["Japanese"] = "Japanese";
27
20
  /**
28
21
  * @public
29
- * @type {Buddhist}
30
22
  */
31
23
  CalendarType["Buddhist"] = "Buddhist";
32
24
  /**
33
25
  * @public
34
- * @type {Persian}
35
26
  */
36
27
  CalendarType["Persian"] = "Persian";
37
28
  })(CalendarType || (CalendarType = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarType.js","sourceRoot":"","sources":["../../src/types/CalendarType.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,IAAK,YA0BJ;AA1BD,WAAK,YAAY;IAChB;;;OAGG;IACH,uCAAuB,CAAA;IACvB;;;OAGG;IACH,mCAAmB,CAAA;IACnB;;;OAGG;IACH,qCAAqB,CAAA;IACrB;;;OAGG;IACH,qCAAqB,CAAA;IACrB;;;OAGG;IACH,mCAAmB,CAAA;AACpB,CAAC,EA1BI,YAAY,KAAZ,YAAY,QA0BhB;AAED,eAAe,YAAY,CAAC","sourcesContent":["/**\n * Different calendar types.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.base.types.CalendarType\n */\nenum CalendarType {\n\t/**\n\t * @public\n\t * @type {Gregorian}\n\t */\n\tGregorian = \"Gregorian\",\n\t/**\n\t * @public\n\t * @type {Islamic}\n\t */\n\tIslamic = \"Islamic\",\n\t/**\n\t * @public\n\t * @type {Japanese}\n\t */\n\tJapanese = \"Japanese\",\n\t/**\n\t * @public\n\t * @type {Buddhist}\n\t */\n\tBuddhist = \"Buddhist\",\n\t/**\n\t * @public\n\t * @type {Persian}\n\t */\n\tPersian = \"Persian\",\n}\n\nexport default CalendarType;\n"]}
1
+ {"version":3,"file":"CalendarType.js","sourceRoot":"","sources":["../../src/types/CalendarType.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,IAAK,YAqBJ;AArBD,WAAK,YAAY;IAChB;;OAEG;IACH,uCAAuB,CAAA;IACvB;;OAEG;IACH,mCAAmB,CAAA;IACnB;;OAEG;IACH,qCAAqB,CAAA;IACrB;;OAEG;IACH,qCAAqB,CAAA;IACrB;;OAEG;IACH,mCAAmB,CAAA;AACpB,CAAC,EArBI,YAAY,KAAZ,YAAY,QAqBhB;AAED,eAAe,YAAY,CAAC","sourcesContent":["/**\n * Different calendar types.\n *\n * @public\n */\nenum CalendarType {\n\t/**\n\t * @public\n\t */\n\tGregorian = \"Gregorian\",\n\t/**\n\t * @public\n\t */\n\tIslamic = \"Islamic\",\n\t/**\n\t * @public\n\t */\n\tJapanese = \"Japanese\",\n\t/**\n\t * @public\n\t */\n\tBuddhist = \"Buddhist\",\n\t/**\n\t * @public\n\t */\n\tPersian = \"Persian\",\n}\n\nexport default CalendarType;\n"]}
@@ -4,10 +4,6 @@ import DataType from "./DataType.js";
4
4
  * DOM Element reference or ID.
5
5
  * <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.
6
6
  *
7
- * @constructor
8
- * @extends sap.ui.webc.base.types.DataType
9
- * @author SAP SE
10
- * @alias sap.ui.webc.base.types.DOMReference
11
7
  * @public
12
8
  */
13
9
  declare class DOMReference extends DataType {
@@ -4,10 +4,6 @@ import DataType from "./DataType.js";
4
4
  * DOM Element reference or ID.
5
5
  * <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.
6
6
  *
7
- * @constructor
8
- * @extends sap.ui.webc.base.types.DataType
9
- * @author SAP SE
10
- * @alias sap.ui.webc.base.types.DOMReference
11
7
  * @public
12
8
  */
13
9
  class DOMReference extends DataType {
@@ -1 +1 @@
1
- {"version":3,"file":"DOMReference.js","sourceRoot":"","sources":["../../src/types/DOMReference.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;;;;;;;;;GAUG;AACH,MAAM,YAAa,SAAQ,QAAQ;IAClC,MAAM,CAAU,OAAO,CAAC,KAA2B;QAClD,OAAO,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,WAAW,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,CAAU,mBAAmB,CAAC,aAAmC;QACtE,IAAI,aAAa,YAAY,WAAW,EAAE;YACzC,OAAO,IAAI,CAAC;SACZ;QAED,OAAO,aAAa,CAAC;IACtB,CAAC;CACD;AAED,eAAe,YAAY,CAAC","sourcesContent":["import DataType from \"./DataType.js\";\n\n/**\n * @class\n * DOM Element reference or ID.\n * <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.\n *\n * @constructor\n * @extends sap.ui.webc.base.types.DataType\n * @author SAP SE\n * @alias sap.ui.webc.base.types.DOMReference\n * @public\n */\nclass DOMReference extends DataType {\n\tstatic override isValid(value: string | HTMLElement) {\n\t\treturn (typeof value === \"string\" || value instanceof HTMLElement);\n\t}\n\n\tstatic override propertyToAttribute(propertyValue: string | HTMLElement) {\n\t\tif (propertyValue instanceof HTMLElement) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn propertyValue;\n\t}\n}\n\nexport default DOMReference;\n"]}
1
+ {"version":3,"file":"DOMReference.js","sourceRoot":"","sources":["../../src/types/DOMReference.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,YAAa,SAAQ,QAAQ;IAClC,MAAM,CAAU,OAAO,CAAC,KAA2B;QAClD,OAAO,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,WAAW,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,CAAU,mBAAmB,CAAC,aAAmC;QACtE,IAAI,aAAa,YAAY,WAAW,EAAE;YACzC,OAAO,IAAI,CAAC;SACZ;QAED,OAAO,aAAa,CAAC;IACtB,CAAC;CACD;AAED,eAAe,YAAY,CAAC","sourcesContent":["import DataType from \"./DataType.js\";\n\n/**\n * @class\n * DOM Element reference or ID.\n * <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.\n *\n * @public\n */\nclass DOMReference extends DataType {\n\tstatic override isValid(value: string | HTMLElement) {\n\t\treturn (typeof value === \"string\" || value instanceof HTMLElement);\n\t}\n\n\tstatic override propertyToAttribute(propertyValue: string | HTMLElement) {\n\t\tif (propertyValue instanceof HTMLElement) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn propertyValue;\n\t}\n}\n\nexport default DOMReference;\n"]}
@@ -1,19 +1,14 @@
1
1
  import { PropertyValue } from "../UI5ElementMetadata.js";
2
2
  /**
3
+ * @class
3
4
  * Base class for all data types.
4
5
  *
5
- * @class
6
- * @constructor
7
- * @author SAP SE
8
- * @alias sap.ui.webc.base.types.DataType
9
6
  * @public
10
7
  */
11
8
  declare class DataType {
12
9
  /**
13
10
  * Checks if the value is valid for its data type.
14
11
  * @public
15
- * @abstract
16
- * @returns {Boolean}
17
12
  */
18
13
  static isValid(value: any): boolean;
19
14
  static attributeToProperty(attributeValue: string | null): PropertyValue;