@oicl/openbridge-webcomponents 2.0.0-next.72 → 2.0.0-next.73
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.
- package/bundle/openbridge-webcomponents.bundle.js +48 -13
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +15 -12
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.css.js +17 -2
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.css.js.map +1 -1
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.d.ts +24 -2
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.d.ts.map +1 -1
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.js +32 -11
- package/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.js.map +1 -1
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -70183,7 +70183,7 @@
|
|
|
70183
70183
|
"declarations": [
|
|
70184
70184
|
{
|
|
70185
70185
|
"kind": "class",
|
|
70186
|
-
"description": "`<obc-integration-vessel-menu>` – A menu to be shown when selecting a obc-integration-button from a obc-integration-bar.",
|
|
70186
|
+
"description": "`<obc-integration-vessel-menu>` – A menu to be shown when selecting a obc-integration-button from a obc-integration-bar.\n\n## Sizing\n\nThe menu hugs its content and never reserves more space than its slotted\nsections need; it deliberately does not impose a height of its own. Sizing is\nowned by the consumer, since only the consumer knows how large the menu may\ngrow in a given layout.\n\nFrom a web components perspective, drive the size from the host element and\nthe slotted light-DOM nodes — not from component properties:\n\n- **Bound the whole menu** by giving the host element a definite `height`. The\n menu fills that height and the alert list scrolls within the remaining space\n while the footer and content keep their size. This is the recommended\n approach. (A `max-height` alone will not bound the list — the internal\n scroll needs a definite height to resolve against.)\n- **Size sections independently** (advanced) by sizing the slotted nodes\n directly — e.g. a fixed-height `content` element, or a capped, scrollable\n wrapper around the `alarms` items.\n- **Leave it unbounded** to let the menu grow with its content.",
|
|
70187
70187
|
"name": "ObcIntegrationVesselMenu",
|
|
70188
70188
|
"slots": [
|
|
70189
70189
|
{
|
|
@@ -70202,24 +70202,27 @@
|
|
|
70202
70202
|
"members": [
|
|
70203
70203
|
{
|
|
70204
70204
|
"kind": "field",
|
|
70205
|
-
"name": "
|
|
70205
|
+
"name": "hasActions",
|
|
70206
70206
|
"type": {
|
|
70207
70207
|
"text": "boolean"
|
|
70208
70208
|
},
|
|
70209
|
-
"default": "
|
|
70210
|
-
|
|
70211
|
-
"attribute": "hideAlarmList"
|
|
70212
|
-
}
|
|
70213
|
-
],
|
|
70214
|
-
"attributes": [
|
|
70209
|
+
"default": "true"
|
|
70210
|
+
},
|
|
70215
70211
|
{
|
|
70216
|
-
"
|
|
70212
|
+
"kind": "field",
|
|
70213
|
+
"name": "hasAlertList",
|
|
70217
70214
|
"type": {
|
|
70218
70215
|
"text": "boolean"
|
|
70219
70216
|
},
|
|
70220
|
-
"default": "
|
|
70221
|
-
|
|
70222
|
-
|
|
70217
|
+
"default": "true"
|
|
70218
|
+
},
|
|
70219
|
+
{
|
|
70220
|
+
"kind": "field",
|
|
70221
|
+
"name": "hasContent",
|
|
70222
|
+
"type": {
|
|
70223
|
+
"text": "boolean"
|
|
70224
|
+
},
|
|
70225
|
+
"default": "true"
|
|
70223
70226
|
}
|
|
70224
70227
|
],
|
|
70225
70228
|
"superclass": {
|
|
@@ -8,6 +8,10 @@ const componentStyle = css`
|
|
|
8
8
|
box-sizing: border-box;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
:host {
|
|
12
|
+
display: block;
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
.wrapper {
|
|
12
16
|
border-color: var(--integration-normal-enabled-border-color);
|
|
13
17
|
background-color: var(--integration-normal-enabled-background-color);
|
|
@@ -18,6 +22,7 @@ const componentStyle = css`
|
|
|
18
22
|
display: flex;
|
|
19
23
|
flex-direction: column;
|
|
20
24
|
align-items: center;
|
|
25
|
+
height: 100%;
|
|
21
26
|
background: var(--container-global-color);
|
|
22
27
|
border-radius: var(
|
|
23
28
|
--app-components-integration-system-dropdown-menu-border-radius
|
|
@@ -44,6 +49,10 @@ const componentStyle = css`
|
|
|
44
49
|
border-radius: 12px;
|
|
45
50
|
}
|
|
46
51
|
|
|
52
|
+
.footer-container.hidden {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
47
56
|
.content-area {
|
|
48
57
|
display: flex;
|
|
49
58
|
flex-direction: column;
|
|
@@ -53,6 +62,10 @@ const componentStyle = css`
|
|
|
53
62
|
border-radius: 8px;
|
|
54
63
|
}
|
|
55
64
|
|
|
65
|
+
.content-area.hidden {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
56
69
|
.footer-container slot[name="buttons"]::slotted(*) {
|
|
57
70
|
display: flex;
|
|
58
71
|
flex: 1 1 0px;
|
|
@@ -67,7 +80,8 @@ const componentStyle = css`
|
|
|
67
80
|
gap: var(--app-components-integration-system-menu-action-spacing);
|
|
68
81
|
}
|
|
69
82
|
|
|
70
|
-
.buttons-slot
|
|
83
|
+
.buttons-slot,
|
|
84
|
+
.content-slot {
|
|
71
85
|
display: contents;
|
|
72
86
|
}
|
|
73
87
|
|
|
@@ -81,12 +95,13 @@ const componentStyle = css`
|
|
|
81
95
|
border-radius: 8px;
|
|
82
96
|
}
|
|
83
97
|
|
|
84
|
-
.content-container.
|
|
98
|
+
.content-container.hidden {
|
|
85
99
|
display: none;
|
|
86
100
|
}
|
|
87
101
|
|
|
88
102
|
.alertlist {
|
|
89
103
|
width: 100%;
|
|
104
|
+
height: 100%;
|
|
90
105
|
}
|
|
91
106
|
|
|
92
107
|
.leading-icon {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-vessel-menu.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration-vessel-menu.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,17 +2,39 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import '../../components/button/button.js';
|
|
3
3
|
import '../../components/icon-button/icon-button.js';
|
|
4
4
|
import '../../icons/icon-placeholder.js';
|
|
5
|
+
import '../../icons/icon-unacknowledged.js';
|
|
5
6
|
import '../../building-blocks/alert-list/alert-list.js';
|
|
6
7
|
/**
|
|
7
8
|
* `<obc-integration-vessel-menu>` – A menu to be shown when selecting a obc-integration-button from a obc-integration-bar.
|
|
8
9
|
*
|
|
10
|
+
* ## Sizing
|
|
11
|
+
*
|
|
12
|
+
* The menu hugs its content and never reserves more space than its slotted
|
|
13
|
+
* sections need; it deliberately does not impose a height of its own. Sizing is
|
|
14
|
+
* owned by the consumer, since only the consumer knows how large the menu may
|
|
15
|
+
* grow in a given layout.
|
|
16
|
+
*
|
|
17
|
+
* From a web components perspective, drive the size from the host element and
|
|
18
|
+
* the slotted light-DOM nodes — not from component properties:
|
|
19
|
+
*
|
|
20
|
+
* - **Bound the whole menu** by giving the host element a definite `height`. The
|
|
21
|
+
* menu fills that height and the alert list scrolls within the remaining space
|
|
22
|
+
* while the footer and content keep their size. This is the recommended
|
|
23
|
+
* approach. (A `max-height` alone will not bound the list — the internal
|
|
24
|
+
* scroll needs a definite height to resolve against.)
|
|
25
|
+
* - **Size sections independently** (advanced) by sizing the slotted nodes
|
|
26
|
+
* directly — e.g. a fixed-height `content` element, or a capped, scrollable
|
|
27
|
+
* wrapper around the `alarms` items.
|
|
28
|
+
* - **Leave it unbounded** to let the menu grow with its content.
|
|
29
|
+
*
|
|
9
30
|
* @slot buttons - Buttons shown in the footer.
|
|
10
31
|
* @slot content - Main content shown in the content area.
|
|
11
32
|
* @slot alarms - Alarm items rendered inside the alert list.
|
|
12
33
|
*/
|
|
13
34
|
export declare class ObcIntegrationVesselMenu extends LitElement {
|
|
14
|
-
|
|
15
|
-
|
|
35
|
+
hasActions: boolean;
|
|
36
|
+
hasAlertList: boolean;
|
|
37
|
+
hasContent: boolean;
|
|
16
38
|
protected render(): import('lit-html').TemplateResult<1>;
|
|
17
39
|
static styles: import('lit').CSSResult;
|
|
18
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-vessel-menu.d.ts","sourceRoot":"","sources":["../../../src/integration-systems/integration-vessel-menu/integration-vessel-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAMhD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6CAA6C,CAAC;AACrD,OAAO,iCAAiC,CAAC;AACzC,OAAO,gDAAgD,CAAC;AAExD
|
|
1
|
+
{"version":3,"file":"integration-vessel-menu.d.ts","sourceRoot":"","sources":["../../../src/integration-systems/integration-vessel-menu/integration-vessel-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,MAAM,KAAK,CAAC;AAMhD,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6CAA6C,CAAC;AACrD,OAAO,iCAAiC,CAAC;AACzC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,gDAAgD,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,qBACa,wBAAyB,SAAQ,UAAU;IACT,UAAU,UAAQ;IAClB,YAAY,UAAQ;IACpB,UAAU,UAAQ;cAE5C,MAAM;IAuCzB,OAAgB,MAAM,0BAA6B;CACpD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,6BAA6B,EAAE,wBAAwB,CAAC;KACzD;CACF"}
|
|
@@ -6,6 +6,7 @@ import componentStyle from "./integration-vessel-menu.css.js";
|
|
|
6
6
|
import "../../components/button/button.js";
|
|
7
7
|
import "../../components/icon-button/icon-button.js";
|
|
8
8
|
import "../../icons/icon-placeholder.js";
|
|
9
|
+
import "../../icons/icon-unacknowledged.js";
|
|
9
10
|
import "../../building-blocks/alert-list/alert-list.js";
|
|
10
11
|
var __defProp = Object.defineProperty;
|
|
11
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -20,29 +21,43 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
20
21
|
let ObcIntegrationVesselMenu = class extends LitElement {
|
|
21
22
|
constructor() {
|
|
22
23
|
super(...arguments);
|
|
23
|
-
this.
|
|
24
|
+
this.hasActions = true;
|
|
25
|
+
this.hasAlertList = true;
|
|
26
|
+
this.hasContent = true;
|
|
24
27
|
}
|
|
25
28
|
render() {
|
|
26
29
|
return html`
|
|
27
|
-
<div
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
<div class="wrapper">
|
|
31
|
+
<div
|
|
32
|
+
class=${classMap({
|
|
33
|
+
"footer-container": true,
|
|
34
|
+
hidden: !this.hasActions
|
|
30
35
|
})}
|
|
31
|
-
|
|
32
|
-
<div class="footer-container">
|
|
36
|
+
>
|
|
33
37
|
<slot name="buttons" class="buttons-slot"></slot>
|
|
34
38
|
</div>
|
|
35
|
-
<div
|
|
36
|
-
|
|
39
|
+
<div
|
|
40
|
+
class=${classMap({
|
|
41
|
+
"content-area": true,
|
|
42
|
+
hidden: !this.hasContent
|
|
43
|
+
})}
|
|
44
|
+
>
|
|
45
|
+
<slot name="content" class="content-slot"></slot>
|
|
37
46
|
</div>
|
|
38
47
|
<div
|
|
39
48
|
class=${classMap({
|
|
40
49
|
"content-container": true,
|
|
41
|
-
|
|
50
|
+
hidden: !this.hasAlertList
|
|
42
51
|
})}
|
|
43
52
|
>
|
|
44
53
|
<obc-alert-list class="alertlist"
|
|
45
54
|
><slot name="alarms"></slot>
|
|
55
|
+
<div slot="empty-icon">
|
|
56
|
+
<obi-unacknowledged></obi-unacknowledged>
|
|
57
|
+
</div>
|
|
58
|
+
<div slot="empty-title">
|
|
59
|
+
<span>No alerts</span>
|
|
60
|
+
</div>
|
|
46
61
|
</obc-alert-list>
|
|
47
62
|
</div>
|
|
48
63
|
</div>
|
|
@@ -51,8 +66,14 @@ let ObcIntegrationVesselMenu = class extends LitElement {
|
|
|
51
66
|
};
|
|
52
67
|
ObcIntegrationVesselMenu.styles = unsafeCSS(componentStyle);
|
|
53
68
|
__decorateClass([
|
|
54
|
-
property({ type: Boolean })
|
|
55
|
-
], ObcIntegrationVesselMenu.prototype, "
|
|
69
|
+
property({ type: Boolean, attribute: false })
|
|
70
|
+
], ObcIntegrationVesselMenu.prototype, "hasActions", 2);
|
|
71
|
+
__decorateClass([
|
|
72
|
+
property({ type: Boolean, attribute: false })
|
|
73
|
+
], ObcIntegrationVesselMenu.prototype, "hasAlertList", 2);
|
|
74
|
+
__decorateClass([
|
|
75
|
+
property({ type: Boolean, attribute: false })
|
|
76
|
+
], ObcIntegrationVesselMenu.prototype, "hasContent", 2);
|
|
56
77
|
ObcIntegrationVesselMenu = __decorateClass([
|
|
57
78
|
customElement("obc-integration-vessel-menu")
|
|
58
79
|
], ObcIntegrationVesselMenu);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-vessel-menu.js","sources":["../../../src/integration-systems/integration-vessel-menu/integration-vessel-menu.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport componentStyle from './integration-vessel-menu.css?inline';\n\nimport '../../components/button/button.js';\nimport '../../components/icon-button/icon-button.js';\nimport '../../icons/icon-placeholder.js';\nimport '../../building-blocks/alert-list/alert-list.js';\n\n/**\n * `<obc-integration-vessel-menu>` – A menu to be shown when selecting a obc-integration-button from a obc-integration-bar.\n *\n * @slot buttons - Buttons shown in the footer.\n * @slot content - Main content shown in the content area.\n * @slot alarms - Alarm items rendered inside the alert list.\n */\n\n@customElement('obc-integration-vessel-menu')\nexport class ObcIntegrationVesselMenu extends LitElement {\n
|
|
1
|
+
{"version":3,"file":"integration-vessel-menu.js","sources":["../../../src/integration-systems/integration-vessel-menu/integration-vessel-menu.ts"],"sourcesContent":["import {LitElement, html, unsafeCSS} from 'lit';\nimport {property} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {customElement} from '../../decorator.js';\nimport componentStyle from './integration-vessel-menu.css?inline';\n\nimport '../../components/button/button.js';\nimport '../../components/icon-button/icon-button.js';\nimport '../../icons/icon-placeholder.js';\nimport '../../icons/icon-unacknowledged.js';\nimport '../../building-blocks/alert-list/alert-list.js';\n\n/**\n * `<obc-integration-vessel-menu>` – A menu to be shown when selecting a obc-integration-button from a obc-integration-bar.\n *\n * ## Sizing\n *\n * The menu hugs its content and never reserves more space than its slotted\n * sections need; it deliberately does not impose a height of its own. Sizing is\n * owned by the consumer, since only the consumer knows how large the menu may\n * grow in a given layout.\n *\n * From a web components perspective, drive the size from the host element and\n * the slotted light-DOM nodes — not from component properties:\n *\n * - **Bound the whole menu** by giving the host element a definite `height`. The\n * menu fills that height and the alert list scrolls within the remaining space\n * while the footer and content keep their size. This is the recommended\n * approach. (A `max-height` alone will not bound the list — the internal\n * scroll needs a definite height to resolve against.)\n * - **Size sections independently** (advanced) by sizing the slotted nodes\n * directly — e.g. a fixed-height `content` element, or a capped, scrollable\n * wrapper around the `alarms` items.\n * - **Leave it unbounded** to let the menu grow with its content.\n *\n * @slot buttons - Buttons shown in the footer.\n * @slot content - Main content shown in the content area.\n * @slot alarms - Alarm items rendered inside the alert list.\n */\n\n@customElement('obc-integration-vessel-menu')\nexport class ObcIntegrationVesselMenu extends LitElement {\n @property({type: Boolean, attribute: false}) hasActions = true;\n @property({type: Boolean, attribute: false}) hasAlertList = true;\n @property({type: Boolean, attribute: false}) hasContent = true;\n\n protected override render() {\n return html`\n <div class=\"wrapper\">\n <div\n class=${classMap({\n 'footer-container': true,\n hidden: !this.hasActions,\n })}\n >\n <slot name=\"buttons\" class=\"buttons-slot\"></slot>\n </div>\n <div\n class=${classMap({\n 'content-area': true,\n hidden: !this.hasContent,\n })}\n >\n <slot name=\"content\" class=\"content-slot\"></slot>\n </div>\n <div\n class=${classMap({\n 'content-container': true,\n hidden: !this.hasAlertList,\n })}\n >\n <obc-alert-list class=\"alertlist\"\n ><slot name=\"alarms\"></slot>\n <div slot=\"empty-icon\">\n <obi-unacknowledged></obi-unacknowledged>\n </div>\n <div slot=\"empty-title\">\n <span>No alerts</span>\n </div>\n </obc-alert-list>\n </div>\n </div>\n `;\n }\n\n static override styles = unsafeCSS(componentStyle);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'obc-integration-vessel-menu': ObcIntegrationVesselMenu;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAyCO,IAAM,2BAAN,cAAuC,WAAW;AAAA,EAAlD,cAAA;AAAA,UAAA,GAAA,SAAA;AACwC,SAAA,aAAa;AACb,SAAA,eAAe;AACf,SAAA,aAAa;AAAA,EAAA;AAAA,EAEvC,SAAS;AAC1B,WAAO;AAAA;AAAA;AAAA,kBAGO,SAAS;AAAA,MACf,oBAAoB;AAAA,MACpB,QAAQ,CAAC,KAAK;AAAA,IAAA,CACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKM,SAAS;AAAA,MACf,gBAAgB;AAAA,MAChB,QAAQ,CAAC,KAAK;AAAA,IAAA,CACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKM,SAAS;AAAA,MACf,qBAAqB;AAAA,MACrB,QAAQ,CAAC,KAAK;AAAA,IAAA,CACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcV;AAGF;AA7Ca,yBA4CK,SAAS,UAAU,cAAc;AA3CJ,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GADhC,yBACkC,WAAA,cAAA,CAAA;AACA,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GAFhC,yBAEkC,WAAA,gBAAA,CAAA;AACA,gBAAA;AAAA,EAA5C,SAAS,EAAC,MAAM,SAAS,WAAW,OAAM;AAAA,GAHhC,yBAGkC,WAAA,cAAA,CAAA;AAHlC,2BAAN,gBAAA;AAAA,EADN,cAAc,6BAA6B;AAAA,GAC/B,wBAAA;"}
|