@gandalan/weblibs 1.5.33 → 1.5.35

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.
@@ -64,9 +64,10 @@
64
64
  * @property {boolean} [selected] - Indicates if the menu item is currently selected (managed by the menu system)
65
65
  * @property {string} [icon] - URL to an icon
66
66
  * @property {string | null} [url] - Relative URL to use for routes
67
- * @property {string} text - Display text
67
+ * @property {string} [text] - Display text (ignored for separator items)
68
68
  * @property {string | null} [parent] - Parent menu item (optional). If not set, the item will be added to the top level menu.
69
69
  * @property {boolean} [hidden] - If true, the menu item will not be displayed
70
+ * @property {boolean} [separator] - If true, renders as a non-interactive divider between items (text/icon/url are ignored). Use `parent` to place the separator inside a sub-menu.
70
71
  */
71
72
 
72
73
  /**
@@ -97,7 +98,9 @@
97
98
 
98
99
  /**
99
100
  * @typedef {Object} NeherApp3
100
- * @property {(menuItem: NeherApp3MenuItem) => void} addMenuItem
101
+ * @property {(menuItem: NeherApp3MenuItem) => void} addMenuItem - Adds a menu item. If an item with the same `id` already exists it is replaced.
102
+ * @property {(id: string, patch: Partial<NeherApp3MenuItem>) => boolean} updateMenuItem - Updates properties of an existing menu item by `id`. Only keys present in `patch` are changed; the `id` is preserved. Returns `true` if the item existed. Relative icon URLs are resolved against the module's base URL.
103
+ * @property {(id: string) => boolean} removeMenuItem - Removes the menu item with the given `id`. Returns `true` if an item was removed.
101
104
  * @property {(appModule: NeherApp3Module | string) => Promise<void>} addApp
102
105
  * @property {(message: string, type?: NeherApp3NotifyType, cb?: function) => void} notify - Shows a notification. Type defaults to 0 (info). Callback is optional.
103
106
  * @property {NeherApp3ApiCollection} api
package/index.d.ts CHANGED
@@ -1961,6 +1961,8 @@ export type NachrichtenDTO = {
1961
1961
 
1962
1962
  export type NeherApp3 = {
1963
1963
  addMenuItem: (menuItem: NeherApp3MenuItem) => void;
1964
+ updateMenuItem: (id: string, patch: Partial<NeherApp3MenuItem>) => boolean;
1965
+ removeMenuItem: (id: string) => boolean;
1964
1966
  addApp: (appModule: NeherApp3Module | string) => Promise<void>;
1965
1967
  notify: (message: string, type?: NeherApp3NotifyType, cb?: Function) => void;
1966
1968
  api: NeherApp3ApiCollection;
@@ -1999,9 +2001,10 @@ export type NeherApp3MenuItem = {
1999
2001
  selected?: boolean;
2000
2002
  icon?: string;
2001
2003
  url?: string | null;
2002
- text: string;
2004
+ text?: string;
2003
2005
  parent?: string | null;
2004
2006
  hidden?: boolean;
2007
+ separator?: boolean;
2005
2008
  };
2006
2009
 
2007
2010
  export type NeherApp3Module = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gandalan/weblibs",
3
- "version": "1.5.33",
3
+ "version": "1.5.35",
4
4
  "description": "WebLibs for Gandalan JS/TS projects",
5
5
  "keywords": [
6
6
  "gandalan"