@limetech/lime-elements 37.1.0-next.70 → 37.1.0-next.71

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.
@@ -640,7 +640,7 @@ export class Menu {
640
640
  "mutable": false,
641
641
  "complexType": {
642
642
  "original": "MenuSearcher",
643
- "resolved": "(query: string) => Promise<MenuItem<any>[]>",
643
+ "resolved": "(query: string) => Promise<(MenuItem<any> | ListSeparator)[]>",
644
644
  "references": {
645
645
  "MenuSearcher": {
646
646
  "location": "import",
@@ -1 +1 @@
1
- {"version":3,"file":"menu.types.js","sourceRoot":"","sources":["../../../src/components/menu/menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Icon, ListSeparator } from '../../interface';\n\nexport type OpenDirection =\n | 'left-start'\n | 'left'\n | 'left-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end';\n\n/**\n * Any element in the UI can be configured to open a menu.\n * By default width of menu's dropdown is based on the items in the dropdown.\n * However, size of the dropdown menu that opens can be controlled\n * based on design requirements.\n * - `inherit-from-items`: This is the default layout in which the widest item\n * in the menu list sets the width of the dropdown menu.\n * - `inherit-from-trigger`: Width of the dropdown menu will as wide as the\n * width of the element that triggers the menu.\n * - `inherit-from-menu`: Width of the dropdown menu will be as wide as the\n * width of the `limel-menu` element itself. Useful when a menu surface needs\n * to be opened programmatically, without a visible UI element.\n */\nexport type SurfaceWidth =\n | 'inherit-from-items'\n | 'inherit-from-trigger'\n | 'inherit-from-menu';\n\nexport interface MenuItem<T = any> {\n /**\n * The additional supporting text is used for shortcut commands and displayed in the menu item.\n */\n commandText?: string;\n\n /**\n * Text to display in the menu item.\n */\n text: string;\n\n /**\n * Additional supporting text to display in the menu item.\n */\n secondaryText?: string;\n\n /**\n * True if the menu item should be disabled.\n */\n disabled?: boolean;\n\n /**\n * Name of the icon to use.\n */\n icon?: string | Icon;\n\n /**\n * Background color of the icon. Overrides `--icon-background-color`.\n * @deprecated This property is deprecated and will be removed soon!\n *\n * Use the new `Icon` interface instead and write:\n * ```\n * icon {\n * name: string,\n * color: string,\n * },\n * ```\n */\n iconColor?: string;\n\n /**\n * True if the menu item should be selected.\n */\n selected?: boolean;\n\n /**\n * If specified, will display a notification badge on the buttons in the dock.\n */\n badge?: number | string;\n\n /**\n * Value of the menu item.\n */\n value?: T;\n\n /**\n * A way of defining a sub-menu for an item.\n *\n * Either set it to an array of `MenuItem`:s or use lazy loading by setting\n * it to a function of type `MenuLoader`.\n * If `myMenuItem.items` is undefined or null, `myMenuItem` will be\n * considered an item without a sub-menu.\n */\n items?: Array<MenuItem<T> | ListSeparator> | MenuLoader;\n\n /**\n * :::warning Internal Use Only\n * This property is for internal use only. We need it for now, but want to\n * find a better implementation of the functionality it currently enables.\n * If and when we do so, this property will be removed without prior\n * notice. If you use it, your code _will_ break in the future.\n * :::\n * @internal\n */\n parentItem?: MenuItem;\n}\n\n/**\n * A search function that takes a search-string as an argument, and returns\n * a promise that will eventually be resolved with an array of `MenuItem`:s.\n * @param {string} query A search query. What the user has written\n * in the input field of a limel-menu.\n * @returns {Promise<MenuItem[]>} The search result.\n */\nexport type MenuSearcher = (query: string) => Promise<MenuItem[]>;\n\n/**\n * A loader function that takes a `MenuItem` as an argument, and returns\n * a promise that will eventually be resolved with an array of `MenuItem`:s,\n * that is the sub-menu of the given item.\n * @param {MenuItem} item The parent item to load the sub-menu for.\n * @returns {Promise<MenuItem[]>} The sub-menu's items of the given item.\n */\nexport type MenuLoader = (\n item: MenuItem\n) => Promise<Array<MenuItem | ListSeparator>>;\n"]}
1
+ {"version":3,"file":"menu.types.js","sourceRoot":"","sources":["../../../src/components/menu/menu.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Icon, ListSeparator } from '../../interface';\n\nexport type OpenDirection =\n | 'left-start'\n | 'left'\n | 'left-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end';\n\n/**\n * Any element in the UI can be configured to open a menu.\n * By default width of menu's dropdown is based on the items in the dropdown.\n * However, size of the dropdown menu that opens can be controlled\n * based on design requirements.\n * - `inherit-from-items`: This is the default layout in which the widest item\n * in the menu list sets the width of the dropdown menu.\n * - `inherit-from-trigger`: Width of the dropdown menu will as wide as the\n * width of the element that triggers the menu.\n * - `inherit-from-menu`: Width of the dropdown menu will be as wide as the\n * width of the `limel-menu` element itself. Useful when a menu surface needs\n * to be opened programmatically, without a visible UI element.\n */\nexport type SurfaceWidth =\n | 'inherit-from-items'\n | 'inherit-from-trigger'\n | 'inherit-from-menu';\n\nexport interface MenuItem<T = any> {\n /**\n * The additional supporting text is used for shortcut commands and displayed in the menu item.\n */\n commandText?: string;\n\n /**\n * Text to display in the menu item.\n */\n text: string;\n\n /**\n * Additional supporting text to display in the menu item.\n */\n secondaryText?: string;\n\n /**\n * True if the menu item should be disabled.\n */\n disabled?: boolean;\n\n /**\n * Name of the icon to use.\n */\n icon?: string | Icon;\n\n /**\n * Background color of the icon. Overrides `--icon-background-color`.\n * @deprecated This property is deprecated and will be removed soon!\n *\n * Use the new `Icon` interface instead and write:\n * ```\n * icon {\n * name: string,\n * color: string,\n * },\n * ```\n */\n iconColor?: string;\n\n /**\n * True if the menu item should be selected.\n */\n selected?: boolean;\n\n /**\n * If specified, will display a notification badge on the buttons in the dock.\n */\n badge?: number | string;\n\n /**\n * Value of the menu item.\n */\n value?: T;\n\n /**\n * A way of defining a sub-menu for an item.\n *\n * Either set it to an array of `MenuItem`:s or use lazy loading by setting\n * it to a function of type `MenuLoader`.\n * If `myMenuItem.items` is undefined or null, `myMenuItem` will be\n * considered an item without a sub-menu.\n */\n items?: Array<MenuItem<T> | ListSeparator> | MenuLoader;\n\n /**\n * :::warning Internal Use Only\n * This property is for internal use only. We need it for now, but want to\n * find a better implementation of the functionality it currently enables.\n * If and when we do so, this property will be removed without prior\n * notice. If you use it, your code _will_ break in the future.\n * :::\n * @internal\n */\n parentItem?: MenuItem;\n}\n\n/**\n * A search function that takes a search-string as an argument, and returns\n * a promise that will eventually be resolved with an array of `MenuItem`:s.\n * @param {string} query A search query. What the user has written\n * in the input field of a limel-menu.\n * @returns {Promise<Array<MenuItem | ListSeparator>>} The search result.\n */\nexport type MenuSearcher = (\n query: string\n) => Promise<Array<MenuItem | ListSeparator>>;\n\n/**\n * A loader function that takes a `MenuItem` as an argument, and returns\n * a promise that will eventually be resolved with an array of `MenuItem`:s,\n * that is the sub-menu of the given item.\n * @param {MenuItem} item The parent item to load the sub-menu for.\n * @returns {Promise<MenuItem[]>} The sub-menu's items of the given item.\n */\nexport type MenuLoader = (\n item: MenuItem\n) => Promise<Array<MenuItem | ListSeparator>>;\n"]}
@@ -85,9 +85,9 @@ export interface MenuItem<T = any> {
85
85
  * a promise that will eventually be resolved with an array of `MenuItem`:s.
86
86
  * @param {string} query A search query. What the user has written
87
87
  * in the input field of a limel-menu.
88
- * @returns {Promise<MenuItem[]>} The search result.
88
+ * @returns {Promise<Array<MenuItem | ListSeparator>>} The search result.
89
89
  */
90
- export type MenuSearcher = (query: string) => Promise<MenuItem[]>;
90
+ export type MenuSearcher = (query: string) => Promise<Array<MenuItem | ListSeparator>>;
91
91
  /**
92
92
  * A loader function that takes a `MenuItem` as an argument, and returns
93
93
  * a promise that will eventually be resolved with an array of `MenuItem`:s,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-elements",
3
- "version": "37.1.0-next.70",
3
+ "version": "37.1.0-next.71",
4
4
  "description": "Lime Elements",
5
5
  "author": "Lime Technologies",
6
6
  "license": "Apache-2.0",
@@ -49,8 +49,8 @@
49
49
  "@types/codemirror": "^5.60.2",
50
50
  "@types/html-escaper": "^3.0.2",
51
51
  "@types/jest": "^27.4.0",
52
- "@types/lodash-es": "^4.17.11",
53
- "@types/react": "^18.2.37",
52
+ "@types/lodash-es": "^4.17.12",
53
+ "@types/react": "^18.2.39",
54
54
  "@types/react-dom": "^18.2.17",
55
55
  "@types/tabulator-tables": "^4.9.4",
56
56
  "@typescript-eslint/eslint-plugin": "^5.61.0",