@oicl/openbridge-webcomponents-svelte 2.0.0-next.61 → 2.0.0-next.62

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.
@@ -9,81 +9,29 @@
9
9
  export interface Props {
10
10
  class?: string;
11
11
  style?: string;
12
- numberOfButtons?: number
12
+ /** Hide the alarm list, ensuring it doesn't take space (display: none). */
13
+ hideAlarmList?: boolean
13
14
  }
14
15
  export interface Events {
15
- onButton1Click?: (event: CustomEvent<unknown>) => void;
16
- onButton2Click?: (event: CustomEvent<unknown>) => void;
17
- onButton3Click?: (event: CustomEvent<unknown>) => void
16
+
18
17
  }
19
18
  export interface Slots {
20
- leadingIcon?: Snippet;
21
- title?: Snippet;
22
- button1LeadingIcon?: Snippet;
23
- button1Label?: Snippet;
24
- button2LeadingIcon?: Snippet;
25
- button2Label?: Snippet;
26
- button3LeadingIcon?: Snippet;
27
- button3Label?: Snippet;
19
+ buttons?: Snippet;
28
20
  content?: Snippet;
29
21
  alarms?: Snippet
30
22
  }
31
- const {onButton1Click, onButton2Click, onButton3Click, class: className, style, leadingIcon, title, button1LeadingIcon, button1Label, button2LeadingIcon, button2Label, button3LeadingIcon, button3Label, content, alarms, ...props} = $props<Props & Events & Slots>();
23
+ const { class: className, style, buttons, content, alarms, ...props} = $props<Props & Events & Slots>();
32
24
 
33
25
  </script>
34
26
  <obc-integration-vessel-menu
35
27
  use:setProperties={props}
36
28
  class={className}
37
29
  style={style}
38
- onbutton1-click={onButton1Click}
39
- onbutton2-click={onButton2Click}
40
- onbutton3-click={onButton3Click} >
30
+ >
41
31
 
42
- {#if leadingIcon}
43
- <div slot="leading-icon">
44
- {@render leadingIcon()}
45
- </div>
46
- {/if}
47
-
48
- {#if title}
49
- <div slot="title">
50
- {@render title()}
51
- </div>
52
- {/if}
53
-
54
- {#if button1LeadingIcon}
55
- <div slot="button-1-leading-icon">
56
- {@render button1LeadingIcon()}
57
- </div>
58
- {/if}
59
-
60
- {#if button1Label}
61
- <div slot="button-1-label">
62
- {@render button1Label()}
63
- </div>
64
- {/if}
65
-
66
- {#if button2LeadingIcon}
67
- <div slot="button-2-leading-icon">
68
- {@render button2LeadingIcon()}
69
- </div>
70
- {/if}
71
-
72
- {#if button2Label}
73
- <div slot="button-2-label">
74
- {@render button2Label()}
75
- </div>
76
- {/if}
77
-
78
- {#if button3LeadingIcon}
79
- <div slot="button-3-leading-icon">
80
- {@render button3LeadingIcon()}
81
- </div>
82
- {/if}
83
-
84
- {#if button3Label}
85
- <div slot="button-3-label">
86
- {@render button3Label()}
32
+ {#if buttons}
33
+ <div slot="buttons">
34
+ {@render buttons()}
87
35
  </div>
88
36
  {/if}
89
37
 
@@ -3,22 +3,13 @@ import type { Snippet } from 'svelte';
3
3
  export interface Props {
4
4
  class?: string;
5
5
  style?: string;
6
- numberOfButtons?: number;
6
+ /** Hide the alarm list, ensuring it doesn't take space (display: none). */
7
+ hideAlarmList?: boolean;
7
8
  }
8
9
  export interface Events {
9
- onButton1Click?: (event: CustomEvent<unknown>) => void;
10
- onButton2Click?: (event: CustomEvent<unknown>) => void;
11
- onButton3Click?: (event: CustomEvent<unknown>) => void;
12
10
  }
13
11
  export interface Slots {
14
- leadingIcon?: Snippet;
15
- title?: Snippet;
16
- button1LeadingIcon?: Snippet;
17
- button1Label?: Snippet;
18
- button2LeadingIcon?: Snippet;
19
- button2Label?: Snippet;
20
- button3LeadingIcon?: Snippet;
21
- button3Label?: Snippet;
12
+ buttons?: Snippet;
22
13
  content?: Snippet;
23
14
  alarms?: Snippet;
24
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oicl/openbridge-webcomponents-svelte",
3
- "version": "2.0.0-next.61",
3
+ "version": "2.0.0-next.62",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",
@@ -31,7 +31,7 @@
31
31
  }
32
32
  },
33
33
  "dependencies": {
34
- "@oicl/openbridge-webcomponents": "^2.0.0-next.60"
34
+ "@oicl/openbridge-webcomponents": "^2.0.0-next.61"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "svelte": "^5.0.0"