@oicl/openbridge-webcomponents-svelte 2.0.0-next.112 → 2.0.0-next.114
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/dist/ar/poi/ObcPoiAton.svelte +2 -2
- package/dist/ar/poi/ObcPoiData.svelte +2 -2
- package/dist/ar/poi/ObcPoiVessel.svelte +2 -2
- package/dist/ar/poi-card/ObcPoiCard.svelte +2 -2
- package/dist/ar/poi-card-header/ObcPoiCardHeader.svelte +2 -2
- package/dist/ar/poi-group/ObcPoiGroup.svelte +2 -3
- package/dist/ar/poi-layer/ObcPoiLayer.svelte +2 -3
- package/dist/building-blocks/bar-horizontal/ObcBarHorizontal.svelte +2 -2
- package/dist/building-blocks/bar-vertical/ObcBarVertical.svelte +2 -2
- package/dist/building-blocks/instrument-radial/ObcInstrumentRadial.svelte +2 -2
- package/dist/building-blocks/readout-block/ObcReadoutBlock.svelte +6 -2
- package/dist/building-blocks/readout-block/ObcReadoutBlock.svelte.d.ts +6 -2
- package/dist/components/accordion-card/ObcAccordionCard.svelte +2 -2
- package/dist/components/accordion-item/ObcAccordionItem.svelte +2 -2
- package/dist/components/advice-button/ObcAdviceButton.svelte +2 -2
- package/dist/components/advice-floating-item/ObcAdviceFloatingItem.svelte +2 -4
- package/dist/components/advice-menu-item/ObcAdviceMenuItem.svelte +2 -4
- package/dist/components/advice-message-item/ObcAdviceMessageItem.svelte +2 -3
- package/dist/components/alert-button/ObcAlertButton.svelte +2 -3
- package/dist/components/alert-floating-item/ObcAlertFloatingItem.svelte +2 -4
- package/dist/components/alert-list-details/ObcAlertListDetails.svelte +2 -3
- package/dist/components/alert-menu/ObcAlertMenu.svelte +2 -4
- package/dist/components/alert-menu-item/ObcAlertMenuItem.svelte +2 -4
- package/dist/components/app-menu/ObcAppMenu.svelte +2 -2
- package/dist/components/attachment-list-item/ObcAttachmentListItem.svelte +2 -2
- package/dist/components/audio-recording-item/ObcAudioRecordingItem.svelte +2 -2
- package/dist/components/breadcrumb/ObcBreadcrumb.svelte +2 -2
- package/dist/components/brilliance-menu/ObcBrillianceMenu.svelte +2 -6
- package/dist/components/button/ObcButton.svelte +2 -2
- package/dist/components/calendar/ObcCalendar.svelte +2 -6
- package/dist/components/check-button/ObcCheckButton.svelte +2 -2
- package/dist/components/checkbox/ObcCheckbox.svelte +2 -3
- package/dist/components/checkbox-item/ObcCheckboxItem.svelte +2 -2
- package/dist/components/command-menu/ObcCommandMenu.svelte +2 -2
- package/dist/components/communication-table/ObcCommunicationTable.svelte +2 -2
- package/dist/components/context-menu-input/ObcContextMenuInput.svelte +2 -4
- package/dist/components/date-item/ObcDateItem.svelte +2 -2
- package/dist/components/dropdown-button/ObcDropdownButton.svelte +2 -3
- package/dist/components/elevated-card/ObcElevatedCard.svelte +2 -2
- package/dist/components/elevated-card-radio/ObcElevatedCardRadio.svelte +2 -2
- package/dist/components/elevated-card-radio-group/ObcElevatedCardRadioGroup.svelte +2 -2
- package/dist/components/event-item/ObcEventItem.svelte +2 -2
- package/dist/components/filter-chip/ObcFilterChip.svelte +2 -2
- package/dist/components/floating-item/ObcFloatingItem.svelte +2 -4
- package/dist/components/form-footer-container/ObcFormFooterContainer.svelte +2 -2
- package/dist/components/form-group/ObcFormGroup.svelte +2 -2
- package/dist/components/form-item/ObcFormItem.svelte +2 -2
- package/dist/components/icon-button/ObcIconButton.svelte +2 -2
- package/dist/components/icon-check-button/ObcIconCheckButton.svelte +2 -2
- package/dist/components/input-chip/ObcInputChip.svelte +2 -2
- package/dist/components/keyboard-full/ObcKeyboardFull.svelte +2 -4
- package/dist/components/keyboard-numeric/ObcKeyboardNumeric.svelte +2 -4
- package/dist/components/menu-button/ObcMenuButton.svelte +2 -5
- package/dist/components/message-menu-item/ObcMessageMenuItem.svelte +2 -4
- package/dist/components/modal-window/ObcModalWindow.svelte +2 -5
- package/dist/components/navigation-item/ObcNavigationItem.svelte +2 -2
- package/dist/components/navigation-item-group/ObcNavigationItemGroup.svelte +2 -2
- package/dist/components/notification-button/ObcNotificationButton.svelte +2 -2
- package/dist/components/notification-floating-item/ObcNotificationFloatingItem.svelte +2 -4
- package/dist/components/notification-menu-item/ObcNotificationMenuItem.svelte +2 -4
- package/dist/components/notification-message-item/ObcNotificationMessageItem.svelte +2 -3
- package/dist/components/number-input-field/ObcNumberInputField.svelte +2 -3
- package/dist/components/pagination/ObcPagination.svelte +2 -4
- package/dist/components/pivot-item/ObcPivotItem.svelte +2 -2
- package/dist/components/pivot-item-group/ObcPivotItemGroup.svelte +2 -2
- package/dist/components/progress-button/ObcProgressButton.svelte +2 -2
- package/dist/components/radio/ObcRadio.svelte +2 -2
- package/dist/components/rich-button/ObcRichButton.svelte +2 -2
- package/dist/components/sequence-modal/ObcSequenceModal.svelte +2 -2
- package/dist/components/sequence-toolbar/ObcSequenceToolbar.svelte +2 -4
- package/dist/components/slide-button/ObcSlideButton.svelte +2 -2
- package/dist/components/slider/ObcSlider.svelte +2 -3
- package/dist/components/slider-double/ObcSliderDouble.svelte +2 -3
- package/dist/components/split-button/ObcSplitButton.svelte +2 -3
- package/dist/components/start-stop-switch/ObcStartStopSwitch.svelte +2 -2
- package/dist/components/stepper-box/ObcStepperBox.svelte +2 -5
- package/dist/components/system-button/ObcSystemButton.svelte +2 -6
- package/dist/components/system-menu/ObcSystemMenu.svelte +2 -16
- package/dist/components/tab-item/ObcTabItem.svelte +2 -3
- package/dist/components/tab-row/ObcTabRow.svelte +2 -4
- package/dist/components/tabbed-card/ObcTabbedCard.svelte +2 -2
- package/dist/components/table/ObcTable.svelte +2 -6
- package/dist/components/text-input-field/ObcTextInputField.svelte +2 -5
- package/dist/components/textarea-field/ObcTextareaField.svelte +2 -11
- package/dist/components/title-container/ObcTitleContainer.svelte +2 -2
- package/dist/components/toggle-button-group/ObcToggleButtonGroup.svelte +2 -3
- package/dist/components/toggle-button-option/ObcToggleButtonOption.svelte +2 -2
- package/dist/components/toggle-button-three-state/ObcToggleButtonThreeState.svelte +2 -2
- package/dist/components/toggle-button-vertical-group/ObcToggleButtonVerticalGroup.svelte +2 -3
- package/dist/components/toggle-button-vertical-option/ObcToggleButtonVerticalOption.svelte +2 -2
- package/dist/components/toggle-switch/ObcToggleSwitch.svelte +2 -3
- package/dist/components/toggletip/ObcToggletip.svelte +2 -3
- package/dist/components/top-bar/ObcTopBar.svelte +2 -11
- package/dist/components/topbar-message-item/ObcTopbarMessageItem.svelte +2 -3
- package/dist/components/tree-navigation-group/ObcTreeNavigationGroup.svelte +2 -2
- package/dist/components/tree-navigation-item/ObcTreeNavigationItem.svelte +2 -3
- package/dist/components/user-menu/ObcUserMenu.svelte +2 -5
- package/dist/integration-systems/integration-bar/ObcIntegrationBar.svelte +2 -9
- package/dist/integration-systems/integration-bar-dropdown/ObcIntegrationBarDropdown.svelte +2 -6
- package/dist/integration-systems/integration-button/ObcIntegrationButton.svelte +2 -2
- package/dist/integration-systems/integration-dropdown-button/ObcIntegrationDropdownButton.svelte +2 -2
- package/dist/navigation-instruments/gauge-horizontal/ObcGaugeHorizontal.svelte +2 -2
- package/dist/navigation-instruments/gauge-vertical/ObcGaugeVertical.svelte +2 -2
- package/dist/navigation-instruments/readout/ObcReadout.svelte +16 -8
- package/dist/navigation-instruments/readout/ObcReadout.svelte.d.ts +10 -1
- package/dist/navigation-instruments/readout-list-item/ObcReadoutListItem.svelte +14 -5
- package/dist/navigation-instruments/readout-list-item/ObcReadoutListItem.svelte.d.ts +10 -1
- package/dist/pages/alert-list-page-small/ObcAlertListPageSmall.svelte +2 -5
- package/dist/util.d.ts +6 -0
- package/dist/util.js +19 -0
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
export type {ToggletipVariant} from '@oicl/openbridge-webcomponents/dist/components/toggletip/toggletip.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/components/toggletip/toggletip.js';
|
|
5
|
-
import { setProperties } from "../../util.js";
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
6
|
import type {ToggletipVariant} from '@oicl/openbridge-webcomponents/dist/components/toggletip/toggletip.js';
|
|
7
7
|
import type { Snippet } from 'svelte';
|
|
8
8
|
|
|
@@ -62,8 +62,7 @@ secondaryButtonLabel?: string
|
|
|
62
62
|
use:setProperties={props}
|
|
63
63
|
class={className}
|
|
64
64
|
style={style}
|
|
65
|
-
|
|
66
|
-
onsecondary-action={onSecondaryAction} >
|
|
65
|
+
use:forwardEvents={{'primary-action': onPrimaryAction, 'secondary-action': onSecondaryAction}} >
|
|
67
66
|
|
|
68
67
|
{#if leadingIcon}
|
|
69
68
|
<div slot="leading-icon">
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export type {BreadcrumbClickEvent, BreadcrumbItem} from '@oicl/openbridge-webcomponents/dist/components/breadcrumb/breadcrumb.js';
|
|
4
4
|
export type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/components/top-bar/top-bar.js';
|
|
5
5
|
import '@oicl/openbridge-webcomponents/dist/components/top-bar/top-bar.js';
|
|
6
|
-
import { setProperties } from "../../util.js";
|
|
6
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
7
7
|
import type {BreadcrumbClickEvent, BreadcrumbItem} from '@oicl/openbridge-webcomponents/dist/components/breadcrumb/breadcrumb.js';
|
|
8
8
|
import type {ObcTopBarMenuButtonIcon} from '@oicl/openbridge-webcomponents/dist/components/top-bar/top-bar.js';
|
|
9
9
|
import type { Snippet } from 'svelte';
|
|
@@ -86,16 +86,7 @@ breadcrumbItems?: BreadcrumbItem[]
|
|
|
86
86
|
use:setProperties={props}
|
|
87
87
|
class={className}
|
|
88
88
|
style={style}
|
|
89
|
-
|
|
90
|
-
ondimming-button-clicked={onDimmingButtonClicked}
|
|
91
|
-
onapps-button-clicked={onAppsButtonClicked}
|
|
92
|
-
onleft-more-button-clicked={onLeftMoreButtonClicked}
|
|
93
|
-
onuser-button-clicked={onUserButtonClicked}
|
|
94
|
-
onclose={onClose}
|
|
95
|
-
onback={onBack}
|
|
96
|
-
onemergency-brightness-start={onEmergencyBrightnessStart}
|
|
97
|
-
onemergency-brightness-stop={onEmergencyBrightnessStop}
|
|
98
|
-
onbreadcrumb-click={onBreadcrumbClick} >
|
|
89
|
+
use:forwardEvents={{'menu-button-clicked': onMenuButtonClicked, 'dimming-button-clicked': onDimmingButtonClicked, 'apps-button-clicked': onAppsButtonClicked, 'left-more-button-clicked': onLeftMoreButtonClicked, 'user-button-clicked': onUserButtonClicked, 'close': onClose, 'back': onBack, 'emergency-brightness-start': onEmergencyBrightnessStart, 'emergency-brightness-stop': onEmergencyBrightnessStop, 'breadcrumb-click': onBreadcrumbClick}} >
|
|
99
90
|
|
|
100
91
|
{#if appIcon}
|
|
101
92
|
<div slot="app-icon">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
export type {ObcTopbarMessageItemType, ObcTopbarMessageItemSize} from '@oicl/openbridge-webcomponents/dist/components/topbar-message-item/topbar-message-item.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/components/topbar-message-item/topbar-message-item.js';
|
|
5
|
-
import { setProperties } from "../../util.js";
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
6
|
import type {ObcTopbarMessageItemType, ObcTopbarMessageItemSize} from '@oicl/openbridge-webcomponents/dist/components/topbar-message-item/topbar-message-item.js';
|
|
7
7
|
import type { Snippet } from 'svelte';
|
|
8
8
|
|
|
@@ -58,8 +58,7 @@ hasSecondaryIcon?: boolean
|
|
|
58
58
|
use:setProperties={props}
|
|
59
59
|
class={className}
|
|
60
60
|
style={style}
|
|
61
|
-
|
|
62
|
-
onaction-click={onActionClick} >
|
|
61
|
+
use:forwardEvents={{'message-click': onMessageClick, 'action-click': onActionClick}} >
|
|
63
62
|
|
|
64
63
|
{#if primaryIcon}
|
|
65
64
|
<div slot="primary-icon">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
export type {TreeBranchType, TreeNavigationItemAlerts} from '@oicl/openbridge-webcomponents/dist/components/tree-navigation-item/tree-navigation-item.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/components/tree-navigation-group/tree-navigation-group.js';
|
|
5
|
-
import { setProperties } from "../../util.js";
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
6
|
import type {TreeBranchType, TreeNavigationItemAlerts} from '@oicl/openbridge-webcomponents/dist/components/tree-navigation-item/tree-navigation-item.js';
|
|
7
7
|
import type { Snippet } from 'svelte';
|
|
8
8
|
|
|
@@ -46,7 +46,7 @@ href?: string | undefined
|
|
|
46
46
|
use:setProperties={props}
|
|
47
47
|
class={className}
|
|
48
48
|
style={style}
|
|
49
|
-
|
|
49
|
+
use:forwardEvents={{'expand-toggle': onExpandToggle}} >
|
|
50
50
|
|
|
51
51
|
{#if icon}
|
|
52
52
|
<div slot="icon">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
export type {TreeBranchType, TreeNavigationItemAlerts} from '@oicl/openbridge-webcomponents/dist/components/tree-navigation-item/tree-navigation-item.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/components/tree-navigation-item/tree-navigation-item.js';
|
|
5
|
-
import { setProperties } from "../../util.js";
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
6
|
import type {TreeBranchType, TreeNavigationItemAlerts} from '@oicl/openbridge-webcomponents/dist/components/tree-navigation-item/tree-navigation-item.js';
|
|
7
7
|
import type { Snippet } from 'svelte';
|
|
8
8
|
|
|
@@ -53,8 +53,7 @@ href?: string | undefined
|
|
|
53
53
|
use:setProperties={props}
|
|
54
54
|
class={className}
|
|
55
55
|
style={style}
|
|
56
|
-
|
|
57
|
-
onclick={onClick} >
|
|
56
|
+
use:forwardEvents={{'expand-toggle': onExpandToggle, 'click': onClick}} >
|
|
58
57
|
|
|
59
58
|
{#if icon}
|
|
60
59
|
<div slot="icon">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
export type {ObcUserMenuType, ObcUserMenuSize, ObcUserMenuUser, ObcUserMenuSignedInAction} from '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
5
|
-
import { setProperties } from "../../util.js";
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
6
|
import type {ObcUserMenuType, ObcUserMenuSize, ObcUserMenuUser, ObcUserMenuSignedInAction} from '@oicl/openbridge-webcomponents/dist/components/user-menu/user-menu.js';
|
|
7
7
|
import type { Snippet } from 'svelte';
|
|
8
8
|
|
|
@@ -48,10 +48,7 @@ signedInActions?: ObcUserMenuSignedInAction[]
|
|
|
48
48
|
use:setProperties={props}
|
|
49
49
|
class={className}
|
|
50
50
|
style={style}
|
|
51
|
-
|
|
52
|
-
onsign-out-click={onSignOutClick}
|
|
53
|
-
onsigned-in-action-click={onSignedInActionClick}
|
|
54
|
-
onrecent-user-click={onRecentUserClick} >
|
|
51
|
+
use:forwardEvents={{'sign-in-click': onSignInClick, 'sign-out-click': onSignOutClick, 'signed-in-action-click': onSignedInActionClick, 'recent-user-click': onRecentUserClick}} >
|
|
55
52
|
|
|
56
53
|
{#if signedInActionIcon}
|
|
57
54
|
<div slot="signed-in-action-icon-<id>">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/integration-systems/integration-bar/integration-bar.js';
|
|
5
|
-
import { setProperties } from "../../util.js";
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
6
|
|
|
7
7
|
import type { Snippet } from 'svelte';
|
|
8
8
|
|
|
@@ -72,14 +72,7 @@ fleetButtonLabel?: string
|
|
|
72
72
|
use:setProperties={props}
|
|
73
73
|
class={className}
|
|
74
74
|
style={style}
|
|
75
|
-
|
|
76
|
-
onlink-button-clicked={onLinkButtonClicked}
|
|
77
|
-
onalert-button-clicked={onAlertButtonClicked}
|
|
78
|
-
onnotification-button-clicked={onNotificationButtonClicked}
|
|
79
|
-
onscreen-button-clicked={onScreenButtonClicked}
|
|
80
|
-
onsystem-button-clicked={onSystemButtonClicked}
|
|
81
|
-
ondimming-button-clicked={onDimmingButtonClicked}
|
|
82
|
-
onuser-button-clicked={onUserButtonClicked} >
|
|
75
|
+
use:forwardEvents={{'fleet-button-click': onFleetButtonClick, 'link-button-clicked': onLinkButtonClicked, 'alert-button-clicked': onAlertButtonClicked, 'notification-button-clicked': onNotificationButtonClicked, 'screen-button-clicked': onScreenButtonClicked, 'system-button-clicked': onSystemButtonClicked, 'dimming-button-clicked': onDimmingButtonClicked, 'user-button-clicked': onUserButtonClicked}} >
|
|
83
76
|
|
|
84
77
|
{#if clock}
|
|
85
78
|
<div slot="clock">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/integration-systems/integration-bar-dropdown/integration-bar-dropdown.js';
|
|
5
|
-
import { setProperties } from "../../util.js";
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
6
|
|
|
7
7
|
import type { Snippet } from 'svelte';
|
|
8
8
|
|
|
@@ -48,11 +48,7 @@
|
|
|
48
48
|
use:setProperties={props}
|
|
49
49
|
class={className}
|
|
50
50
|
style={style}
|
|
51
|
-
|
|
52
|
-
ondimming-button-clicked={onDimmingButtonClicked}
|
|
53
|
-
onnotification-button-clicked={onNotificationButtonClicked}
|
|
54
|
-
onuser-button-clicked={onUserButtonClicked}
|
|
55
|
-
onsystem-button-clicked={onSystemButtonClicked} >
|
|
51
|
+
use:forwardEvents={{'home-button-clicked': onHomeButtonClicked, 'dimming-button-clicked': onDimmingButtonClicked, 'notification-button-clicked': onNotificationButtonClicked, 'user-button-clicked': onUserButtonClicked, 'system-button-clicked': onSystemButtonClicked}} >
|
|
56
52
|
|
|
57
53
|
{#if vesselSelector}
|
|
58
54
|
<div slot="vessel-selector">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
export type {IntegrationButtonReadout, IntegrationButtonVariant, IntegrationButtonType} from '@oicl/openbridge-webcomponents/dist/integration-systems/integration-button/integration-button.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/integration-systems/integration-button/integration-button.js';
|
|
5
|
-
import { setProperties } from "../../util.js";
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
6
|
import type {IntegrationButtonReadout, IntegrationButtonVariant, IntegrationButtonType} from '@oicl/openbridge-webcomponents/dist/integration-systems/integration-button/integration-button.js';
|
|
7
7
|
import type { Snippet } from 'svelte';
|
|
8
8
|
|
|
@@ -54,7 +54,7 @@ type?: IntegrationButtonType
|
|
|
54
54
|
use:setProperties={props}
|
|
55
55
|
class={className}
|
|
56
56
|
style={style}
|
|
57
|
-
|
|
57
|
+
use:forwardEvents={{'click': onClick}} >
|
|
58
58
|
|
|
59
59
|
{#if leadingIcon}
|
|
60
60
|
<div slot="leading-icon">
|
package/dist/integration-systems/integration-dropdown-button/ObcIntegrationDropdownButton.svelte
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<script lang="ts">
|
|
3
3
|
export type {ObcIntegrationDropdownButtonChangeEvent, IntegrationDropdownOption} from '@oicl/openbridge-webcomponents/dist/integration-systems/integration-dropdown-button/integration-dropdown-button.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/integration-systems/integration-dropdown-button/integration-dropdown-button.js';
|
|
5
|
-
import { setProperties } from "../../util.js";
|
|
5
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
6
|
import type {ObcIntegrationDropdownButtonChangeEvent, IntegrationDropdownOption} from '@oicl/openbridge-webcomponents/dist/integration-systems/integration-dropdown-button/integration-dropdown-button.js';
|
|
7
7
|
import type { Snippet } from 'svelte';
|
|
8
8
|
|
|
@@ -41,7 +41,7 @@ openTop?: boolean
|
|
|
41
41
|
use:setProperties={props}
|
|
42
42
|
class={className}
|
|
43
43
|
style={style}
|
|
44
|
-
|
|
44
|
+
use:forwardEvents={{'change': onChange}} >
|
|
45
45
|
|
|
46
46
|
{#if fleet}
|
|
47
47
|
<div slot="fleet">
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export type {BorderRadiusPosition, Priority, InstrumentState} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
5
5
|
export type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
6
6
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-horizontal/gauge-horizontal.js';
|
|
7
|
-
import { setProperties } from "../../util.js";
|
|
7
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
8
8
|
import type {ExternalScaleSide, FillMode} from '@oicl/openbridge-webcomponents/dist/building-blocks/external-scale/external-scale.js';
|
|
9
9
|
import type {BorderRadiusPosition, Priority, InstrumentState} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
10
10
|
import type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
@@ -85,7 +85,7 @@ highlightCurrentValue?: boolean
|
|
|
85
85
|
use:setProperties={props}
|
|
86
86
|
class={className}
|
|
87
87
|
style={style}
|
|
88
|
-
|
|
88
|
+
use:forwardEvents={{'scale-dimensions-changed': onScaleDimensionsChanged}} >
|
|
89
89
|
|
|
90
90
|
{#if children}
|
|
91
91
|
{@render children()}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export type {BorderRadiusPosition, Priority, InstrumentState} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
5
5
|
export type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
6
6
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-vertical/gauge-vertical.js';
|
|
7
|
-
import { setProperties } from "../../util.js";
|
|
7
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
8
8
|
import type {ExternalScaleSide, FillMode} from '@oicl/openbridge-webcomponents/dist/building-blocks/external-scale/external-scale.js';
|
|
9
9
|
import type {BorderRadiusPosition, Priority, InstrumentState} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
10
10
|
import type {LinearAdvice} from '@oicl/openbridge-webcomponents/dist/building-blocks/instrument-linear/advice.js';
|
|
@@ -85,7 +85,7 @@ highlightCurrentValue?: boolean
|
|
|
85
85
|
use:setProperties={props}
|
|
86
86
|
class={className}
|
|
87
87
|
style={style}
|
|
88
|
-
|
|
88
|
+
use:forwardEvents={{'scale-dimensions-changed': onScaleDimensionsChanged}} >
|
|
89
89
|
|
|
90
90
|
{#if children}
|
|
91
91
|
{@render children()}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
export type {
|
|
3
|
+
export type {ReadoutValueType} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout-formatters.js';
|
|
4
|
+
export type {ReadoutBlockSize, ReadoutBlockDataQuality} from '@oicl/openbridge-webcomponents/dist/building-blocks/readout-block/readout-block.js';
|
|
4
5
|
export type {Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
5
6
|
export type {ReadoutDirection, ReadoutStacking, ReadoutAlignment, ReadoutSourceOptions} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout.js';
|
|
6
7
|
export type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
|
|
7
8
|
export type {ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutReserverOptions} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
|
|
8
9
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout.js';
|
|
9
|
-
import { setProperties } from "../../util.js";
|
|
10
|
-
import type {
|
|
10
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
11
|
+
import type {ReadoutValueType} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout-formatters.js';
|
|
12
|
+
import type {ReadoutBlockSize, ReadoutBlockDataQuality} from '@oicl/openbridge-webcomponents/dist/building-blocks/readout-block/readout-block.js';
|
|
11
13
|
import type {Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
12
14
|
import type {ReadoutDirection, ReadoutStacking, ReadoutAlignment, ReadoutSourceOptions} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout.js';
|
|
13
15
|
import type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
|
|
@@ -25,7 +27,10 @@ readout that hugs its remaining parts. For a temporarily missing value
|
|
|
25
27
|
keep `hasValue` and set `value` to `null` instead — the dash keeps the
|
|
26
28
|
value block at full size, so the layout does not shift when data arrives. */
|
|
27
29
|
hasValue?: boolean;
|
|
28
|
-
|
|
30
|
+
/** [object Object],[object Object],[object Object] */
|
|
31
|
+
value?: string | number | null;
|
|
32
|
+
/** [object Object],[object Object],[object Object] */
|
|
33
|
+
valueType?: ReadoutValueType;
|
|
29
34
|
/** Render the value as `offText` (e.g. equipment powered down). Affects the value only. */
|
|
30
35
|
off?: boolean;
|
|
31
36
|
/** Text shown in place of the value when `off` is true. */
|
|
@@ -41,8 +46,12 @@ offText?: string;
|
|
|
41
46
|
alignment?: ReadoutAlignment | undefined;
|
|
42
47
|
hasDegree?: boolean;
|
|
43
48
|
hasDegreeSpacer?: boolean;
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
/** Also formats the numeric setpoint / advice blocks, which stay numeric
|
|
50
|
+
even when the value is text. */
|
|
51
|
+
fractionDigits?: number;
|
|
52
|
+
/** Also formats the numeric setpoint / advice blocks, which stay numeric
|
|
53
|
+
even when the value is text. */
|
|
54
|
+
maxDigits?: number;
|
|
46
55
|
dataQuality?: ReadoutBlockDataQuality | undefined;
|
|
47
56
|
alert?: boolean | AlertFrameConfig;
|
|
48
57
|
valueOptions?: ReadoutValueOptions | undefined;
|
|
@@ -72,8 +81,7 @@ showDebugOverlay?: boolean
|
|
|
72
81
|
use:setProperties={props}
|
|
73
82
|
class={className}
|
|
74
83
|
style={style}
|
|
75
|
-
|
|
76
|
-
onsource-flyout-click={onSourceFlyoutClick} >
|
|
84
|
+
use:forwardEvents={{'source-change': onSourceChange, 'source-flyout-click': onSourceFlyoutClick}} >
|
|
77
85
|
|
|
78
86
|
{#if valueIcon}
|
|
79
87
|
<div slot="value-icon">
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout.js';
|
|
2
|
+
import type { ReadoutValueType } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout-formatters.js';
|
|
2
3
|
import type { ReadoutBlockSize, ReadoutBlockDataQuality } from '@oicl/openbridge-webcomponents/dist/building-blocks/readout-block/readout-block.js';
|
|
3
4
|
import type { Priority } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
4
5
|
import type { ReadoutDirection, ReadoutStacking, ReadoutAlignment, ReadoutSourceOptions } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout.js';
|
|
@@ -16,7 +17,10 @@ readout that hugs its remaining parts. For a temporarily missing value
|
|
|
16
17
|
keep `hasValue` and set `value` to `null` instead — the dash keeps the
|
|
17
18
|
value block at full size, so the layout does not shift when data arrives. */
|
|
18
19
|
hasValue?: boolean;
|
|
19
|
-
|
|
20
|
+
/** [object Object],[object Object],[object Object] */
|
|
21
|
+
value?: string | number | null;
|
|
22
|
+
/** [object Object],[object Object],[object Object] */
|
|
23
|
+
valueType?: ReadoutValueType;
|
|
20
24
|
/** Render the value as `offText` (e.g. equipment powered down). Affects the value only. */
|
|
21
25
|
off?: boolean;
|
|
22
26
|
/** Text shown in place of the value when `off` is true. */
|
|
@@ -32,7 +36,11 @@ value block at full size, so the layout does not shift when data arrives. */
|
|
|
32
36
|
alignment?: ReadoutAlignment | undefined;
|
|
33
37
|
hasDegree?: boolean;
|
|
34
38
|
hasDegreeSpacer?: boolean;
|
|
39
|
+
/** Also formats the numeric setpoint / advice blocks, which stay numeric
|
|
40
|
+
even when the value is text. */
|
|
35
41
|
fractionDigits?: number;
|
|
42
|
+
/** Also formats the numeric setpoint / advice blocks, which stay numeric
|
|
43
|
+
even when the value is text. */
|
|
36
44
|
maxDigits?: number;
|
|
37
45
|
dataQuality?: ReadoutBlockDataQuality | undefined;
|
|
38
46
|
alert?: boolean | AlertFrameConfig;
|
|
@@ -63,6 +71,7 @@ export interface Slots {
|
|
|
63
71
|
}
|
|
64
72
|
type $$ComponentProps = Props & Events & Slots;
|
|
65
73
|
declare const ObcReadout: import("svelte").Component<$$ComponentProps, {
|
|
74
|
+
ReadoutValueType: typeof ReadoutValueType;
|
|
66
75
|
ReadoutBlockSize: typeof ReadoutBlockSize;
|
|
67
76
|
ReadoutBlockDataQuality: typeof ReadoutBlockDataQuality;
|
|
68
77
|
Priority: typeof Priority;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
<script lang="ts">
|
|
3
|
-
export type {
|
|
3
|
+
export type {ReadoutValueType} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout-formatters.js';
|
|
4
|
+
export type {ReadoutBlockSize, ReadoutBlockDataQuality} from '@oicl/openbridge-webcomponents/dist/building-blocks/readout-block/readout-block.js';
|
|
4
5
|
export type {ReadoutListItemPriority, ReadoutListItemStacking, ReadoutListItemClickable, ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutReserverOptions, ReadoutSrcOptions} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
|
|
5
6
|
export type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
|
|
6
7
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
|
|
7
8
|
import { setProperties } from "../../util.js";
|
|
8
|
-
import type {
|
|
9
|
+
import type {ReadoutValueType} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout-formatters.js';
|
|
10
|
+
import type {ReadoutBlockSize, ReadoutBlockDataQuality} from '@oicl/openbridge-webcomponents/dist/building-blocks/readout-block/readout-block.js';
|
|
9
11
|
import type {ReadoutListItemPriority, ReadoutListItemStacking, ReadoutListItemClickable, ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutReserverOptions, ReadoutSrcOptions} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
|
|
10
12
|
import type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
|
|
11
13
|
import type { Snippet } from 'svelte';
|
|
@@ -21,7 +23,10 @@ row that hugs its remaining parts. For a temporarily missing value keep
|
|
|
21
23
|
`hasValue` and set `value` to `null` instead — the dash keeps the value
|
|
22
24
|
block at full size, so the row does not shift when data arrives. */
|
|
23
25
|
hasValue?: boolean;
|
|
24
|
-
|
|
26
|
+
/** [object Object],[object Object],[object Object] */
|
|
27
|
+
value?: string | number | null;
|
|
28
|
+
/** [object Object],[object Object],[object Object] */
|
|
29
|
+
valueType?: ReadoutValueType;
|
|
25
30
|
/** Render the value as `offText` (e.g. equipment powered down). Affects the value only. */
|
|
26
31
|
off?: boolean;
|
|
27
32
|
/** Text shown in place of the value when `off` is true. */
|
|
@@ -37,8 +42,12 @@ offText?: string;
|
|
|
37
42
|
hasLeadingIcon?: boolean;
|
|
38
43
|
hasDegree?: boolean;
|
|
39
44
|
hasDegreeSpacer?: boolean;
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
/** Also formats the numeric setpoint / advice blocks, which stay numeric
|
|
46
|
+
even when the value is text. */
|
|
47
|
+
fractionDigits?: number;
|
|
48
|
+
/** Also formats the numeric setpoint / advice blocks, which stay numeric
|
|
49
|
+
even when the value is text. */
|
|
50
|
+
maxDigits?: number;
|
|
42
51
|
dataQuality?: ReadoutBlockDataQuality | undefined;
|
|
43
52
|
alert?: boolean | AlertFrameConfig;
|
|
44
53
|
valueOptions?: ReadoutValueOptions | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
|
|
2
|
+
import type { ReadoutValueType } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout-formatters.js';
|
|
2
3
|
import type { ReadoutBlockSize, ReadoutBlockDataQuality } from '@oicl/openbridge-webcomponents/dist/building-blocks/readout-block/readout-block.js';
|
|
3
4
|
import type { ReadoutListItemPriority, ReadoutListItemStacking, ReadoutListItemClickable, ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutReserverOptions, ReadoutSrcOptions } from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
|
|
4
5
|
import type { AlertFrameConfig } from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
|
|
@@ -14,7 +15,10 @@ row that hugs its remaining parts. For a temporarily missing value keep
|
|
|
14
15
|
`hasValue` and set `value` to `null` instead — the dash keeps the value
|
|
15
16
|
block at full size, so the row does not shift when data arrives. */
|
|
16
17
|
hasValue?: boolean;
|
|
17
|
-
|
|
18
|
+
/** [object Object],[object Object],[object Object] */
|
|
19
|
+
value?: string | number | null;
|
|
20
|
+
/** [object Object],[object Object],[object Object] */
|
|
21
|
+
valueType?: ReadoutValueType;
|
|
18
22
|
/** Render the value as `offText` (e.g. equipment powered down). Affects the value only. */
|
|
19
23
|
off?: boolean;
|
|
20
24
|
/** Text shown in place of the value when `off` is true. */
|
|
@@ -30,7 +34,11 @@ block at full size, so the row does not shift when data arrives. */
|
|
|
30
34
|
hasLeadingIcon?: boolean;
|
|
31
35
|
hasDegree?: boolean;
|
|
32
36
|
hasDegreeSpacer?: boolean;
|
|
37
|
+
/** Also formats the numeric setpoint / advice blocks, which stay numeric
|
|
38
|
+
even when the value is text. */
|
|
33
39
|
fractionDigits?: number;
|
|
40
|
+
/** Also formats the numeric setpoint / advice blocks, which stay numeric
|
|
41
|
+
even when the value is text. */
|
|
34
42
|
maxDigits?: number;
|
|
35
43
|
dataQuality?: ReadoutBlockDataQuality | undefined;
|
|
36
44
|
alert?: boolean | AlertFrameConfig;
|
|
@@ -54,6 +62,7 @@ export interface Slots {
|
|
|
54
62
|
}
|
|
55
63
|
type $$ComponentProps = Props & Events & Slots;
|
|
56
64
|
declare const ObcReadoutListItem: import("svelte").Component<$$ComponentProps, {
|
|
65
|
+
ReadoutValueType: typeof ReadoutValueType;
|
|
57
66
|
ReadoutBlockSize: typeof ReadoutBlockSize;
|
|
58
67
|
ReadoutBlockDataQuality: typeof ReadoutBlockDataQuality;
|
|
59
68
|
ReadoutListItemPriority: typeof ReadoutListItemPriority;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export type {ObcAlertListPageAckAllClickEvent, ObcAckClickEvent, ObcRowClickEvent, AlertListMode} from '@oicl/openbridge-webcomponents/dist/pages/alert-list-page-small/alert-list-page-small.js';
|
|
4
4
|
export type {Alert} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
5
5
|
import '@oicl/openbridge-webcomponents/dist/pages/alert-list-page-small/alert-list-page-small.js';
|
|
6
|
-
import { setProperties } from "../../util.js";
|
|
6
|
+
import { setProperties, forwardEvents } from "../../util.js";
|
|
7
7
|
import type {ObcAlertListPageAckAllClickEvent, ObcAckClickEvent, ObcRowClickEvent, AlertListMode} from '@oicl/openbridge-webcomponents/dist/pages/alert-list-page-small/alert-list-page-small.js';
|
|
8
8
|
import type {Alert} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
9
9
|
import type { Snippet } from 'svelte';
|
|
@@ -33,10 +33,7 @@ import type {Alert} from '@oicl/openbridge-webcomponents/dist/types.js';
|
|
|
33
33
|
use:setProperties={props}
|
|
34
34
|
class={className}
|
|
35
35
|
style={style}
|
|
36
|
-
|
|
37
|
-
onack-click={onAckClick}
|
|
38
|
-
onrow-click={onRowClick}
|
|
39
|
-
onsilence-click={onSilenceClick} >
|
|
36
|
+
use:forwardEvents={{'ack-all-visible-click': onAckAllVisibleClick, 'ack-click': onAckClick, 'row-click': onRowClick, 'silence-click': onSilenceClick}} >
|
|
40
37
|
|
|
41
38
|
{#if children}
|
|
42
39
|
{@render children()}
|
package/dist/util.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export declare function setProperties(node: HTMLElement, props: Record<string, unknown>): {
|
|
2
2
|
update(props: Record<string, unknown>): void;
|
|
3
3
|
};
|
|
4
|
+
type EventHandlers = Record<string, ((event: Event) => void) | undefined>;
|
|
5
|
+
export declare function forwardEvents(node: HTMLElement, handlers: EventHandlers): {
|
|
6
|
+
update(handlers: EventHandlers): void;
|
|
7
|
+
destroy(): void;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
package/dist/util.js
CHANGED
|
@@ -20,3 +20,22 @@ export function setProperties(node, props) {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
+
export function forwardEvents(node, handlers) {
|
|
24
|
+
let current = handlers;
|
|
25
|
+
const listeners = new Map();
|
|
26
|
+
for (const name of Object.keys(handlers)) {
|
|
27
|
+
const listener = (event) => current[name]?.(event);
|
|
28
|
+
listeners.set(name, listener);
|
|
29
|
+
node.addEventListener(name, listener);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
update(handlers) {
|
|
33
|
+
current = handlers;
|
|
34
|
+
},
|
|
35
|
+
destroy() {
|
|
36
|
+
for (const [name, listener] of listeners) {
|
|
37
|
+
node.removeEventListener(name, listener);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oicl/openbridge-webcomponents-svelte",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.114",
|
|
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.
|
|
34
|
+
"@oicl/openbridge-webcomponents": "^2.0.0-next.113"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"svelte": "^5.0.0"
|