@oicl/openbridge-webcomponents-svelte 2.0.0-next.150 → 2.0.0-next.151
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/NamedSlot.svelte +26 -0
- package/dist/NamedSlot.svelte.d.ts +11 -0
- package/dist/ar/building-blocks/poi-header/ObcPoiHeader.svelte +2 -3
- package/dist/ar/chart-object-vessel-button/ObcChartObjectVesselButton.svelte +5 -12
- package/dist/ar/poi/ObcPoi.svelte +3 -6
- package/dist/ar/poi/ObcPoiAton.svelte +2 -3
- package/dist/ar/poi/ObcPoiData.svelte +2 -3
- package/dist/ar/poi/ObcPoiVessel.svelte +4 -9
- package/dist/ar/poi-button/ObcPoiButton.svelte +3 -6
- package/dist/ar/poi-button/ObcPoiButtonAton.svelte +3 -6
- package/dist/ar/poi-button/ObcPoiButtonData.svelte +3 -6
- package/dist/ar/poi-button/ObcPoiButtonVessel.svelte +5 -12
- package/dist/ar/poi-card/ObcPoiCard.svelte +3 -6
- package/dist/ar/poi-card-header/ObcPoiCardHeader.svelte +3 -6
- package/dist/ar/poi-controller/ObcPoiController.svelte +3 -6
- package/dist/ar/poi-object/ObcPoiObjectVessel.svelte +3 -6
- package/dist/automation/automation-badge/ObcAutomationBadge.svelte +2 -3
- package/dist/automation/automation-button/ObcAutomationButton.svelte +10 -27
- package/dist/automation/automation-input-modal/ObcAutomationInputModal.svelte +5 -12
- package/dist/automation/automation-tank/ObcAutomationTank.svelte +11 -30
- package/dist/automation/gauge-generator/ObcGaugeGenerator.svelte +3 -6
- package/dist/automation/gauge-motors-and-pumps/ObcGaugeMotorsAndPumps.svelte +3 -6
- package/dist/automation/gauge-valve/ObcGaugeValve.svelte +2 -3
- package/dist/automation/heat-exchanger/ObcHeatExchanger.svelte +6 -15
- package/dist/automation/heat-pump/ObcHeatPump.svelte +6 -15
- package/dist/automation/hydraulic-separator/ObcHydraulicSeparator.svelte +6 -15
- package/dist/automation/indicator-battery/ObcIndicatorBattery.svelte +2 -3
- package/dist/automation/indicator-generator/ObcIndicatorGenerator.svelte +2 -3
- package/dist/automation/indicator-tank-atmospheric/ObcIndicatorTankAtmospheric.svelte +2 -3
- package/dist/automation/transmitter/ObcTransmitter.svelte +2 -3
- package/dist/automation/transmitter-button/ObcTransmitterButton.svelte +2 -3
- package/dist/building-blocks/alert-list/ObcAlertList.svelte +4 -9
- package/dist/building-blocks/readout-block/ObcReadoutBlock.svelte +2 -3
- package/dist/components/accordion-card/ObcAccordionCard.svelte +6 -15
- package/dist/components/accordion-item/ObcAccordionItem.svelte +2 -3
- package/dist/components/advice-button/ObcAdviceButton.svelte +2 -3
- package/dist/components/advice-floating-item/ObcAdviceFloatingItem.svelte +8 -21
- package/dist/components/advice-menu-item/ObcAdviceMenuItem.svelte +2 -3
- package/dist/components/advice-message-item/ObcAdviceMessageItem.svelte +2 -3
- package/dist/components/alert-floating-item/ObcAlertFloatingItem.svelte +8 -21
- package/dist/components/alert-frame/ObcAlertFrame.svelte +4 -9
- package/dist/components/alert-menu/ObcAlertMenu.svelte +4 -9
- package/dist/components/alert-menu-item/ObcAlertMenuItem.svelte +5 -12
- package/dist/components/alert-subsystem-counter/ObcAlertSubsystemCounter.svelte +3 -6
- package/dist/components/app-button/ObcAppButton.svelte +2 -3
- package/dist/components/attachment-list-item/ObcAttachmentListItem.svelte +4 -9
- package/dist/components/badge/ObcBadge.svelte +2 -3
- package/dist/components/button/ObcButton.svelte +3 -6
- package/dist/components/card/ObcCard.svelte +4 -9
- package/dist/components/check-button/ObcCheckButton.svelte +4 -9
- package/dist/components/command-menu/ObcCommandMenu.svelte +10 -27
- package/dist/components/dropdown-button/ObcDropdownButton.svelte +2 -3
- package/dist/components/elevated-card/ObcElevatedCard.svelte +8 -21
- package/dist/components/floating-item/ObcFloatingItem.svelte +9 -24
- package/dist/components/form-container/ObcFormContainer.svelte +4 -9
- package/dist/components/form-group/ObcFormGroup.svelte +3 -6
- package/dist/components/form-item/ObcFormItem.svelte +2 -3
- package/dist/components/icon-button/ObcIconButton.svelte +2 -3
- package/dist/components/icon-check-button/ObcIconCheckButton.svelte +2 -3
- package/dist/components/keyboard-numeric/ObcKeyboardNumeric.svelte +2 -3
- package/dist/components/menu-button/ObcMenuButton.svelte +2 -3
- package/dist/components/message-menu-item/ObcMessageMenuItem.svelte +7 -18
- package/dist/components/modal-window/ObcModalWindow.svelte +7 -18
- package/dist/components/navigation-item/ObcNavigationItem.svelte +3 -6
- package/dist/components/navigation-item-group/ObcNavigationItemGroup.svelte +2 -3
- package/dist/components/navigation-menu/ObcNavigationMenu.svelte +4 -9
- package/dist/components/notification-button/ObcNotificationButton.svelte +2 -3
- package/dist/components/notification-floating-item/ObcNotificationFloatingItem.svelte +8 -21
- package/dist/components/notification-menu-item/ObcNotificationMenuItem.svelte +2 -3
- package/dist/components/notification-message-item/ObcNotificationMessageItem.svelte +2 -3
- package/dist/components/number-input-field/ObcNumberInputField.svelte +4 -9
- package/dist/components/pivot-item/ObcPivotItem.svelte +2 -3
- package/dist/components/progress-bar/ObcProgressBar.svelte +2 -3
- package/dist/components/progress-button/ObcProgressButton.svelte +4 -9
- package/dist/components/rich-button/ObcRichButton.svelte +3 -6
- package/dist/components/sequence-card/ObcSequenceCard.svelte +8 -21
- package/dist/components/sequence-item/ObcSequenceItem.svelte +5 -12
- package/dist/components/sequence-modal/ObcSequenceModal.svelte +2 -3
- package/dist/components/sequence-toolbar/ObcSequenceToolbar.svelte +5 -12
- package/dist/components/slide-button/ObcSlideButton.svelte +3 -6
- package/dist/components/slider/ObcSlider.svelte +3 -6
- package/dist/components/slider-double/ObcSliderDouble.svelte +3 -6
- package/dist/components/split-button/ObcSplitButton.svelte +2 -3
- package/dist/components/start-stop-switch/ObcStartStopSwitch.svelte +7 -18
- package/dist/components/system-menu/ObcSystemMenu.svelte +2 -3
- package/dist/components/tab-item/ObcTabItem.svelte +4 -9
- package/dist/components/tab-row/ObcTabRow.svelte +3 -6
- package/dist/components/tabbed-card/ObcTabbedCard.svelte +16 -45
- package/dist/components/table-header-item/ObcTableHeaderItem.svelte +2 -3
- package/dist/components/text-input-field/ObcTextInputField.svelte +4 -9
- package/dist/components/textarea-field/ObcTextareaField.svelte +2 -3
- package/dist/components/textbox/ObcTextbox.svelte +2 -3
- package/dist/components/title-container/ObcTitleContainer.svelte +5 -12
- package/dist/components/toggle-button-option/ObcToggleButtonOption.svelte +2 -3
- package/dist/components/toggle-button-vertical-option/ObcToggleButtonVerticalOption.svelte +2 -3
- package/dist/components/toggle-switch/ObcToggleSwitch.svelte +2 -3
- package/dist/components/toggletip/ObcToggletip.svelte +4 -9
- package/dist/components/tooltip/ObcTooltip.svelte +2 -3
- package/dist/components/top-bar/ObcTopBar.svelte +5 -12
- package/dist/components/topbar-message-item/ObcTopbarMessageItem.svelte +10 -27
- package/dist/components/tree-navigation-group/ObcTreeNavigationGroup.svelte +2 -3
- package/dist/components/tree-navigation-item/ObcTreeNavigationItem.svelte +2 -3
- package/dist/components/user-button/ObcUserButton.svelte +2 -3
- package/dist/components/user-menu/ObcUserMenu.svelte +2 -3
- package/dist/icons/ObiBipolarTransistor01.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor01.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor02.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor02.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor02Off.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor02Off.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor02On.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor02On.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor03.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor03.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor03Flat.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor03Flat.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor03Off.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor03Off.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor03On.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor03On.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor04.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor04.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor04Flat.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor04Flat.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor04Off.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor04Off.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistor04On.svelte +32 -0
- package/dist/icons/ObiBipolarTransistor04On.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistorOff.svelte +32 -0
- package/dist/icons/ObiBipolarTransistorOff.svelte.d.ts +16 -0
- package/dist/icons/ObiBipolarTransistorOn.svelte +32 -0
- package/dist/icons/ObiBipolarTransistorOn.svelte.d.ts +16 -0
- package/dist/icons/ObiBypass.svelte +32 -0
- package/dist/icons/ObiBypass.svelte.d.ts +16 -0
- package/dist/icons/{ObiChevronTrippleLeft.svelte → ObiChevronTripleLeft.svelte} +3 -3
- package/dist/icons/{ObiChevronTrippleRight.svelte.d.ts → ObiChevronTripleLeft.svelte.d.ts} +4 -4
- package/dist/icons/{ObiChevronTrippleRight.svelte → ObiChevronTripleRight.svelte} +3 -3
- package/dist/icons/{ObiChevronTrippleLeft.svelte.d.ts → ObiChevronTripleRight.svelte.d.ts} +4 -4
- package/dist/icons/ObiHeatPumpBalance.svelte +32 -0
- package/dist/icons/ObiHeatPumpBalance.svelte.d.ts +16 -0
- package/dist/icons/ObiOutput.svelte +32 -0
- package/dist/icons/ObiOutput.svelte.d.ts +16 -0
- package/dist/icons/ObiPhase.svelte +32 -0
- package/dist/icons/ObiPhase.svelte.d.ts +16 -0
- package/dist/icons/ObiSensorWaterDewpoint.svelte +32 -0
- package/dist/icons/ObiSensorWaterDewpoint.svelte.d.ts +16 -0
- package/dist/icons/ObiSensorWaterHumidity.svelte +32 -0
- package/dist/icons/ObiSensorWaterHumidity.svelte.d.ts +16 -0
- package/dist/index.d.ts +22 -2
- package/dist/index.js +22 -2
- package/dist/integration-systems/integration-app-bar/ObcIntegrationAppBar.svelte +2 -3
- package/dist/integration-systems/integration-bar/ObcIntegrationBar.svelte +4 -9
- package/dist/integration-systems/integration-bar-dropdown/ObcIntegrationBarDropdown.svelte +9 -24
- package/dist/integration-systems/integration-button/ObcIntegrationButton.svelte +9 -24
- package/dist/integration-systems/integration-dropdown-button/ObcIntegrationDropdownButton.svelte +2 -3
- package/dist/integration-systems/integration-fleet-button/ObcIntegrationFleetButton.svelte +2 -3
- package/dist/integration-systems/integration-vessel-menu/ObcIntegrationVesselMenu.svelte +4 -9
- package/dist/integration-systems/integration-vessel-selector/ObcIntegrationVesselSelector.svelte +3 -6
- package/dist/navigation-instruments/gauge-proportional/ObcGaugeProportional.svelte +3 -6
- package/dist/navigation-instruments/gauge-radial-indicator/ObcGaugeRadialIndicator.svelte +2 -3
- package/dist/navigation-instruments/instrument-field/ObcInstrumentField.svelte +2 -3
- package/dist/navigation-instruments/readout/ObcReadout.svelte +6 -15
- package/dist/navigation-instruments/readout-list-item/ObcReadoutListItem.svelte +5 -12
- package/dist/util.d.ts +20 -0
- package/dist/util.js +42 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -432,6 +432,20 @@ export { default as ObiBeaconTowerTShape } from './icons/ObiBeaconTowerTShape.sv
|
|
|
432
432
|
export { default as ObiBeaconTowerWest } from './icons/ObiBeaconTowerWest.svelte';
|
|
433
433
|
export { default as ObiBeaconTowerXShape } from './icons/ObiBeaconTowerXShape.svelte';
|
|
434
434
|
export { default as ObiBilge } from './icons/ObiBilge.svelte';
|
|
435
|
+
export { default as ObiBipolarTransistor01 } from './icons/ObiBipolarTransistor01.svelte';
|
|
436
|
+
export { default as ObiBipolarTransistor02Off } from './icons/ObiBipolarTransistor02Off.svelte';
|
|
437
|
+
export { default as ObiBipolarTransistor02On } from './icons/ObiBipolarTransistor02On.svelte';
|
|
438
|
+
export { default as ObiBipolarTransistor02 } from './icons/ObiBipolarTransistor02.svelte';
|
|
439
|
+
export { default as ObiBipolarTransistor03Flat } from './icons/ObiBipolarTransistor03Flat.svelte';
|
|
440
|
+
export { default as ObiBipolarTransistor03Off } from './icons/ObiBipolarTransistor03Off.svelte';
|
|
441
|
+
export { default as ObiBipolarTransistor03On } from './icons/ObiBipolarTransistor03On.svelte';
|
|
442
|
+
export { default as ObiBipolarTransistor03 } from './icons/ObiBipolarTransistor03.svelte';
|
|
443
|
+
export { default as ObiBipolarTransistor04Flat } from './icons/ObiBipolarTransistor04Flat.svelte';
|
|
444
|
+
export { default as ObiBipolarTransistor04Off } from './icons/ObiBipolarTransistor04Off.svelte';
|
|
445
|
+
export { default as ObiBipolarTransistor04On } from './icons/ObiBipolarTransistor04On.svelte';
|
|
446
|
+
export { default as ObiBipolarTransistor04 } from './icons/ObiBipolarTransistor04.svelte';
|
|
447
|
+
export { default as ObiBipolarTransistorOff } from './icons/ObiBipolarTransistorOff.svelte';
|
|
448
|
+
export { default as ObiBipolarTransistorOn } from './icons/ObiBipolarTransistorOn.svelte';
|
|
435
449
|
export { default as ObiBlowerOffHorizontal } from './icons/ObiBlowerOffHorizontal.svelte';
|
|
436
450
|
export { default as ObiBlowerOffVertical } from './icons/ObiBlowerOffVertical.svelte';
|
|
437
451
|
export { default as ObiBlowerOnHorizontal } from './icons/ObiBlowerOnHorizontal.svelte';
|
|
@@ -535,6 +549,7 @@ export { default as ObiBuoySphericalWest } from './icons/ObiBuoySphericalWest.sv
|
|
|
535
549
|
export { default as ObiBuoySphericalXShape } from './icons/ObiBuoySphericalXShape.svelte';
|
|
536
550
|
export { default as ObiBuoySuperLandby } from './icons/ObiBuoySuperLandby.svelte';
|
|
537
551
|
export { default as ObiBuoySuper } from './icons/ObiBuoySuper.svelte';
|
|
552
|
+
export { default as ObiBypass } from './icons/ObiBypass.svelte';
|
|
538
553
|
export { default as ObiCalendarDateGoogle } from './icons/ObiCalendarDateGoogle.svelte';
|
|
539
554
|
export { default as ObiCalendarGoogle } from './icons/ObiCalendarGoogle.svelte';
|
|
540
555
|
export { default as ObiCamHmiIec } from './icons/ObiCamHmiIec.svelte';
|
|
@@ -635,8 +650,8 @@ export { default as ObiChevronDoubleUpGoogle } from './icons/ObiChevronDoubleUpG
|
|
|
635
650
|
export { default as ObiChevronDownGoogle } from './icons/ObiChevronDownGoogle.svelte';
|
|
636
651
|
export { default as ObiChevronLeftGoogle } from './icons/ObiChevronLeftGoogle.svelte';
|
|
637
652
|
export { default as ObiChevronRightGoogle } from './icons/ObiChevronRightGoogle.svelte';
|
|
638
|
-
export { default as
|
|
639
|
-
export { default as
|
|
653
|
+
export { default as ObiChevronTripleLeft } from './icons/ObiChevronTripleLeft.svelte';
|
|
654
|
+
export { default as ObiChevronTripleRight } from './icons/ObiChevronTripleRight.svelte';
|
|
640
655
|
export { default as ObiChevronUpGoogle } from './icons/ObiChevronUpGoogle.svelte';
|
|
641
656
|
export { default as ObiClearDayColour } from './icons/ObiClearDayColour.svelte';
|
|
642
657
|
export { default as ObiClearDay } from './icons/ObiClearDay.svelte';
|
|
@@ -998,6 +1013,7 @@ export { default as ObiHeadingLineOffIec } from './icons/ObiHeadingLineOffIec.sv
|
|
|
998
1013
|
export { default as ObiHeadingLineOffProposal } from './icons/ObiHeadingLineOffProposal.svelte';
|
|
999
1014
|
export { default as ObiHeadingNUpProposal } from './icons/ObiHeadingNUpProposal.svelte';
|
|
1000
1015
|
export { default as ObiHeatGoogle } from './icons/ObiHeatGoogle.svelte';
|
|
1016
|
+
export { default as ObiHeatPumpBalance } from './icons/ObiHeatPumpBalance.svelte';
|
|
1001
1017
|
export { default as ObiHeatexhanger } from './icons/ObiHeatexhanger.svelte';
|
|
1002
1018
|
export { default as ObiHeatpump } from './icons/ObiHeatpump.svelte';
|
|
1003
1019
|
export { default as ObiHeave } from './icons/ObiHeave.svelte';
|
|
@@ -1449,6 +1465,7 @@ export { default as ObiOnIec } from './icons/ObiOnIec.svelte';
|
|
|
1449
1465
|
export { default as ObiOnOffIec } from './icons/ObiOnOffIec.svelte';
|
|
1450
1466
|
export { default as ObiOn } from './icons/ObiOn.svelte';
|
|
1451
1467
|
export { default as ObiOpenSea } from './icons/ObiOpenSea.svelte';
|
|
1468
|
+
export { default as ObiOutput } from './icons/ObiOutput.svelte';
|
|
1452
1469
|
export { default as ObiOwnShipAlternativeFilled } from './icons/ObiOwnShipAlternativeFilled.svelte';
|
|
1453
1470
|
export { default as ObiOwnShipAlternativeOutlined } from './icons/ObiOwnShipAlternativeOutlined.svelte';
|
|
1454
1471
|
export { default as ObiOwnShipAlternativeRemote } from './icons/ObiOwnShipAlternativeRemote.svelte';
|
|
@@ -1574,6 +1591,7 @@ export { default as ObiPassedFill } from './icons/ObiPassedFill.svelte';
|
|
|
1574
1591
|
export { default as ObiPassed } from './icons/ObiPassed.svelte';
|
|
1575
1592
|
export { default as ObiPastPositionIec } from './icons/ObiPastPositionIec.svelte';
|
|
1576
1593
|
export { default as ObiPending } from './icons/ObiPending.svelte';
|
|
1594
|
+
export { default as ObiPhase } from './icons/ObiPhase.svelte';
|
|
1577
1595
|
export { default as ObiPiezoelectricCrystalOff } from './icons/ObiPiezoelectricCrystalOff.svelte';
|
|
1578
1596
|
export { default as ObiPiezoelectricCrystalOn } from './icons/ObiPiezoelectricCrystalOn.svelte';
|
|
1579
1597
|
export { default as ObiPiezoelectricCrystal } from './icons/ObiPiezoelectricCrystal.svelte';
|
|
@@ -1737,9 +1755,11 @@ export { default as ObiSensorGpsLow } from './icons/ObiSensorGpsLow.svelte';
|
|
|
1737
1755
|
export { default as ObiSensorGpsMedium } from './icons/ObiSensorGpsMedium.svelte';
|
|
1738
1756
|
export { default as ObiSensorGyro } from './icons/ObiSensorGyro.svelte';
|
|
1739
1757
|
export { default as ObiSensorWaterCo2 } from './icons/ObiSensorWaterCo2.svelte';
|
|
1758
|
+
export { default as ObiSensorWaterDewpoint } from './icons/ObiSensorWaterDewpoint.svelte';
|
|
1740
1759
|
export { default as ObiSensorWaterDoGoogle } from './icons/ObiSensorWaterDoGoogle.svelte';
|
|
1741
1760
|
export { default as ObiSensorWaterDropGoogle } from './icons/ObiSensorWaterDropGoogle.svelte';
|
|
1742
1761
|
export { default as ObiSensorWaterEcGoogle } from './icons/ObiSensorWaterEcGoogle.svelte';
|
|
1762
|
+
export { default as ObiSensorWaterHumidity } from './icons/ObiSensorWaterHumidity.svelte';
|
|
1743
1763
|
export { default as ObiSensorWaterOrpGoogle } from './icons/ObiSensorWaterOrpGoogle.svelte';
|
|
1744
1764
|
export { default as ObiSensorWaterPhGoogle } from './icons/ObiSensorWaterPhGoogle.svelte';
|
|
1745
1765
|
export { default as ObiSensorWaterSalinityGoogle } from './icons/ObiSensorWaterSalinityGoogle.svelte';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/integration-systems/integration-app-bar/integration-app-bar.js';
|
|
5
5
|
import { setProperties } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
6
7
|
|
|
7
8
|
import type { Snippet } from 'svelte';
|
|
8
9
|
|
|
@@ -27,8 +28,6 @@
|
|
|
27
28
|
>
|
|
28
29
|
|
|
29
30
|
{#if apps}
|
|
30
|
-
<
|
|
31
|
-
{@render apps()}
|
|
32
|
-
</div>
|
|
31
|
+
<NamedSlot name="apps" content={apps} />
|
|
33
32
|
{/if}
|
|
34
33
|
</obc-integration-app-bar>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/integration-systems/integration-bar/integration-bar.js';
|
|
5
5
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
6
7
|
|
|
7
8
|
import type { Snippet } from 'svelte';
|
|
8
9
|
|
|
@@ -75,20 +76,14 @@
|
|
|
75
76
|
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}} >
|
|
76
77
|
|
|
77
78
|
{#if clock}
|
|
78
|
-
<
|
|
79
|
-
{@render clock()}
|
|
80
|
-
</div>
|
|
79
|
+
<NamedSlot name="clock" content={clock} />
|
|
81
80
|
{/if}
|
|
82
81
|
|
|
83
82
|
{#if integrationButtons}
|
|
84
|
-
<
|
|
85
|
-
{@render integrationButtons()}
|
|
86
|
-
</div>
|
|
83
|
+
<NamedSlot name="integration-buttons" content={integrationButtons} />
|
|
87
84
|
{/if}
|
|
88
85
|
|
|
89
86
|
{#if hugButtons}
|
|
90
|
-
<
|
|
91
|
-
{@render hugButtons()}
|
|
92
|
-
</div>
|
|
87
|
+
<NamedSlot name="hug-buttons" content={hugButtons} />
|
|
93
88
|
{/if}
|
|
94
89
|
</obc-integration-bar>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/integration-systems/integration-bar-dropdown/integration-bar-dropdown.js';
|
|
5
5
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
6
7
|
|
|
7
8
|
import type { Snippet } from 'svelte';
|
|
8
9
|
|
|
@@ -120,50 +121,34 @@
|
|
|
120
121
|
use:forwardEvents={{'home-button-clicked': onHomeButtonClicked, 'link-button-clicked': onLinkButtonClicked, 'alert-button-clicked': onAlertButtonClicked, 'dimming-button-clicked': onDimmingButtonClicked, 'notification-button-clicked': onNotificationButtonClicked, 'screen-button-clicked': onScreenButtonClicked, 'user-button-clicked': onUserButtonClicked, 'system-button-clicked': onSystemButtonClicked}} >
|
|
121
122
|
|
|
122
123
|
{#if vesselSelector}
|
|
123
|
-
<
|
|
124
|
-
{@render vesselSelector()}
|
|
125
|
-
</div>
|
|
124
|
+
<NamedSlot name="vessel-selector" content={vesselSelector} />
|
|
126
125
|
{/if}
|
|
127
126
|
|
|
128
127
|
{#if statusLabel1}
|
|
129
|
-
<
|
|
130
|
-
{@render statusLabel1()}
|
|
131
|
-
</div>
|
|
128
|
+
<NamedSlot name="status-label-1" content={statusLabel1} />
|
|
132
129
|
{/if}
|
|
133
130
|
|
|
134
131
|
{#if statusIcon1}
|
|
135
|
-
<
|
|
136
|
-
{@render statusIcon1()}
|
|
137
|
-
</div>
|
|
132
|
+
<NamedSlot name="status-icon-1" content={statusIcon1} />
|
|
138
133
|
{/if}
|
|
139
134
|
|
|
140
135
|
{#if statusLabel2}
|
|
141
|
-
<
|
|
142
|
-
{@render statusLabel2()}
|
|
143
|
-
</div>
|
|
136
|
+
<NamedSlot name="status-label-2" content={statusLabel2} />
|
|
144
137
|
{/if}
|
|
145
138
|
|
|
146
139
|
{#if statusIcon2}
|
|
147
|
-
<
|
|
148
|
-
{@render statusIcon2()}
|
|
149
|
-
</div>
|
|
140
|
+
<NamedSlot name="status-icon-2" content={statusIcon2} />
|
|
150
141
|
{/if}
|
|
151
142
|
|
|
152
143
|
{#if statusLabel3}
|
|
153
|
-
<
|
|
154
|
-
{@render statusLabel3()}
|
|
155
|
-
</div>
|
|
144
|
+
<NamedSlot name="status-label-3" content={statusLabel3} />
|
|
156
145
|
{/if}
|
|
157
146
|
|
|
158
147
|
{#if statusIcon3}
|
|
159
|
-
<
|
|
160
|
-
{@render statusIcon3()}
|
|
161
|
-
</div>
|
|
148
|
+
<NamedSlot name="status-icon-3" content={statusIcon3} />
|
|
162
149
|
{/if}
|
|
163
150
|
|
|
164
151
|
{#if clock}
|
|
165
|
-
<
|
|
166
|
-
{@render clock()}
|
|
167
|
-
</div>
|
|
152
|
+
<NamedSlot name="clock" content={clock} />
|
|
168
153
|
{/if}
|
|
169
154
|
</obc-integration-bar-dropdown>
|
|
@@ -3,6 +3,7 @@
|
|
|
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
5
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
6
7
|
import type {IntegrationButtonReadout, IntegrationButtonVariant, IntegrationButtonType} from '@oicl/openbridge-webcomponents/dist/integration-systems/integration-button/integration-button.js';
|
|
7
8
|
import type { Snippet } from 'svelte';
|
|
8
9
|
|
|
@@ -61,50 +62,34 @@
|
|
|
61
62
|
use:forwardEvents={{'click': onClick}} >
|
|
62
63
|
|
|
63
64
|
{#if leadingIcon}
|
|
64
|
-
<
|
|
65
|
-
{@render leadingIcon()}
|
|
66
|
-
</div>
|
|
65
|
+
<NamedSlot name="leading-icon" content={leadingIcon} />
|
|
67
66
|
{/if}
|
|
68
67
|
|
|
69
68
|
{#if trailingIcon}
|
|
70
|
-
<
|
|
71
|
-
{@render trailingIcon()}
|
|
72
|
-
</div>
|
|
69
|
+
<NamedSlot name="trailing-icon" content={trailingIcon} />
|
|
73
70
|
{/if}
|
|
74
71
|
|
|
75
72
|
{#if trailingIcon2}
|
|
76
|
-
<
|
|
77
|
-
{@render trailingIcon2()}
|
|
78
|
-
</div>
|
|
73
|
+
<NamedSlot name="trailing-icon2" content={trailingIcon2} />
|
|
79
74
|
{/if}
|
|
80
75
|
|
|
81
76
|
{#if label}
|
|
82
|
-
<
|
|
83
|
-
{@render label()}
|
|
84
|
-
</div>
|
|
77
|
+
<NamedSlot name="label" content={label} />
|
|
85
78
|
{/if}
|
|
86
79
|
|
|
87
80
|
{#if status}
|
|
88
|
-
<
|
|
89
|
-
{@render status()}
|
|
90
|
-
</div>
|
|
81
|
+
<NamedSlot name="status" content={status} />
|
|
91
82
|
{/if}
|
|
92
83
|
|
|
93
84
|
{#if infoLabel}
|
|
94
|
-
<
|
|
95
|
-
{@render infoLabel()}
|
|
96
|
-
</div>
|
|
85
|
+
<NamedSlot name="info-label" content={infoLabel} />
|
|
97
86
|
{/if}
|
|
98
87
|
|
|
99
88
|
{#if infoStatus}
|
|
100
|
-
<
|
|
101
|
-
{@render infoStatus()}
|
|
102
|
-
</div>
|
|
89
|
+
<NamedSlot name="info-status" content={infoStatus} />
|
|
103
90
|
{/if}
|
|
104
91
|
|
|
105
92
|
{#if integrationVesselMenu}
|
|
106
|
-
<
|
|
107
|
-
{@render integrationVesselMenu()}
|
|
108
|
-
</div>
|
|
93
|
+
<NamedSlot name="integration-vessel-menu" content={integrationVesselMenu} />
|
|
109
94
|
{/if}
|
|
110
95
|
</obc-integration-button>
|
package/dist/integration-systems/integration-dropdown-button/ObcIntegrationDropdownButton.svelte
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
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
5
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
6
7
|
import type {ObcIntegrationDropdownButtonChangeEvent, IntegrationDropdownOption} from '@oicl/openbridge-webcomponents/dist/integration-systems/integration-dropdown-button/integration-dropdown-button.js';
|
|
7
8
|
import type { Snippet } from 'svelte';
|
|
8
9
|
|
|
@@ -44,8 +45,6 @@ options?: IntegrationDropdownOption[];
|
|
|
44
45
|
use:forwardEvents={{'change': onChange}} >
|
|
45
46
|
|
|
46
47
|
{#if fleet}
|
|
47
|
-
<
|
|
48
|
-
{@render fleet()}
|
|
49
|
-
</div>
|
|
48
|
+
<NamedSlot name="fleet" content={fleet} />
|
|
50
49
|
{/if}
|
|
51
50
|
</obc-integration-dropdown-button>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export type {IntegrationFleetButtonReadout} from '@oicl/openbridge-webcomponents/dist/integration-systems/integration-fleet-button/integration-fleet-button.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/integration-systems/integration-fleet-button/integration-fleet-button.js';
|
|
5
5
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
6
7
|
import type {IntegrationFleetButtonReadout} from '@oicl/openbridge-webcomponents/dist/integration-systems/integration-fleet-button/integration-fleet-button.js';
|
|
7
8
|
import type { Snippet } from 'svelte';
|
|
8
9
|
|
|
@@ -33,8 +34,6 @@
|
|
|
33
34
|
use:forwardEvents={{'click': onClick}} >
|
|
34
35
|
|
|
35
36
|
{#if alertTopicIcon}
|
|
36
|
-
<
|
|
37
|
-
{@render alertTopicIcon()}
|
|
38
|
-
</div>
|
|
37
|
+
<NamedSlot name="alert-topic-icon" content={alertTopicIcon} />
|
|
39
38
|
{/if}
|
|
40
39
|
</obc-integration-fleet-button>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/integration-systems/integration-vessel-menu/integration-vessel-menu.js';
|
|
5
5
|
import { setProperties } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
6
7
|
|
|
7
8
|
import type { Snippet } from 'svelte';
|
|
8
9
|
|
|
@@ -31,20 +32,14 @@
|
|
|
31
32
|
>
|
|
32
33
|
|
|
33
34
|
{#if buttons}
|
|
34
|
-
<
|
|
35
|
-
{@render buttons()}
|
|
36
|
-
</div>
|
|
35
|
+
<NamedSlot name="buttons" content={buttons} />
|
|
37
36
|
{/if}
|
|
38
37
|
|
|
39
38
|
{#if content}
|
|
40
|
-
<
|
|
41
|
-
{@render content()}
|
|
42
|
-
</div>
|
|
39
|
+
<NamedSlot name="content" content={content} />
|
|
43
40
|
{/if}
|
|
44
41
|
|
|
45
42
|
{#if alarms}
|
|
46
|
-
<
|
|
47
|
-
{@render alarms()}
|
|
48
|
-
</div>
|
|
43
|
+
<NamedSlot name="alarms" content={alarms} />
|
|
49
44
|
{/if}
|
|
50
45
|
</obc-integration-vessel-menu>
|
package/dist/integration-systems/integration-vessel-selector/ObcIntegrationVesselSelector.svelte
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/integration-systems/integration-vessel-selector/integration-vessel-selector.js';
|
|
5
5
|
import { setProperties } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
6
7
|
|
|
7
8
|
import type { Snippet } from 'svelte';
|
|
8
9
|
|
|
@@ -34,14 +35,10 @@
|
|
|
34
35
|
{/if}
|
|
35
36
|
|
|
36
37
|
{#if fleet}
|
|
37
|
-
<
|
|
38
|
-
{@render fleet()}
|
|
39
|
-
</div>
|
|
38
|
+
<NamedSlot name="fleet" content={fleet} />
|
|
40
39
|
{/if}
|
|
41
40
|
|
|
42
41
|
{#if topbar}
|
|
43
|
-
<
|
|
44
|
-
{@render topbar()}
|
|
45
|
-
</div>
|
|
42
|
+
<NamedSlot name="topbar" content={topbar} />
|
|
46
43
|
{/if}
|
|
47
44
|
</obc-integration-vessel-selector>
|
|
@@ -5,6 +5,7 @@ export type {GaugeProportionalSector, GaugeProportionalAlignment, GaugeProportio
|
|
|
5
5
|
export type {TickmarkStyle} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/tickmark.js';
|
|
6
6
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-proportional/gauge-proportional.js';
|
|
7
7
|
import { setProperties } from "../../util.js";
|
|
8
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
8
9
|
import type {InstrumentState} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
9
10
|
import type {GaugeProportionalSector, GaugeProportionalAlignment, GaugeProportionalPriority, GaugeProportionalAdvice} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-proportional/gauge-proportional.js';
|
|
10
11
|
import type {TickmarkStyle} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/watch/tickmark.js';
|
|
@@ -113,14 +114,10 @@ animateSetpoint?: boolean;
|
|
|
113
114
|
>
|
|
114
115
|
|
|
115
116
|
{#if icon}
|
|
116
|
-
<
|
|
117
|
-
{@render icon()}
|
|
118
|
-
</div>
|
|
117
|
+
<NamedSlot name="icon" content={icon} />
|
|
119
118
|
{/if}
|
|
120
119
|
|
|
121
120
|
{#if secondaryIcon}
|
|
122
|
-
<
|
|
123
|
-
{@render secondaryIcon()}
|
|
124
|
-
</div>
|
|
121
|
+
<NamedSlot name="secondary-icon" content={secondaryIcon} />
|
|
125
122
|
{/if}
|
|
126
123
|
</obc-gauge-proportional>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export type {GaugeRadialIndicatorStyle} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-radial-indicator/gauge-radial-indicator.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-radial-indicator/gauge-radial-indicator.js';
|
|
5
5
|
import { setProperties } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
6
7
|
import type {GaugeRadialIndicatorStyle} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/gauge-radial-indicator/gauge-radial-indicator.js';
|
|
7
8
|
import type { Snippet } from 'svelte';
|
|
8
9
|
|
|
@@ -33,8 +34,6 @@
|
|
|
33
34
|
>
|
|
34
35
|
|
|
35
36
|
{#if iconSnippet}
|
|
36
|
-
<
|
|
37
|
-
{@render iconSnippet()}
|
|
38
|
-
</div>
|
|
37
|
+
<NamedSlot name="icon" content={iconSnippet} />
|
|
39
38
|
{/if}
|
|
40
39
|
</obc-gauge-radial-indicator>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export type {InstrumentFieldSize} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/instrument-field/instrument-field.js';
|
|
4
4
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/instrument-field/instrument-field.js';
|
|
5
5
|
import { setProperties } from "../../util.js";
|
|
6
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
6
7
|
import type {InstrumentFieldSize} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/instrument-field/instrument-field.js';
|
|
7
8
|
import type { Snippet } from 'svelte';
|
|
8
9
|
|
|
@@ -62,8 +63,6 @@
|
|
|
62
63
|
>
|
|
63
64
|
|
|
64
65
|
{#if offValue}
|
|
65
|
-
<
|
|
66
|
-
{@render offValue()}
|
|
67
|
-
</div>
|
|
66
|
+
<NamedSlot name="off-value" content={offValue} />
|
|
68
67
|
{/if}
|
|
69
68
|
</obc-instrument-field>
|
|
@@ -8,6 +8,7 @@ export type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/compone
|
|
|
8
8
|
export type {ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutLabelOptions, ReadoutReserverOptions} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
|
|
9
9
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout.js';
|
|
10
10
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
11
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
11
12
|
import type {ReadoutValueType} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout-formatters.js';
|
|
12
13
|
import type {ReadoutBlockSize, ReadoutBlockDataQuality} from '@oicl/openbridge-webcomponents/dist/building-blocks/readout-block/readout-block.js';
|
|
13
14
|
import type {Priority} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/types.js';
|
|
@@ -110,32 +111,22 @@ import type {ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions,
|
|
|
110
111
|
use:forwardEvents={{'source-change': onSourceChange, 'source-flyout-click': onSourceFlyoutClick}} >
|
|
111
112
|
|
|
112
113
|
{#if leadingIcon}
|
|
113
|
-
<
|
|
114
|
-
{@render leadingIcon()}
|
|
115
|
-
</div>
|
|
114
|
+
<NamedSlot name="leading-icon" content={leadingIcon} />
|
|
116
115
|
{/if}
|
|
117
116
|
|
|
118
117
|
{#if valueIcon}
|
|
119
|
-
<
|
|
120
|
-
{@render valueIcon()}
|
|
121
|
-
</div>
|
|
118
|
+
<NamedSlot name="value-icon" content={valueIcon} />
|
|
122
119
|
{/if}
|
|
123
120
|
|
|
124
121
|
{#if setpointIcon}
|
|
125
|
-
<
|
|
126
|
-
{@render setpointIcon()}
|
|
127
|
-
</div>
|
|
122
|
+
<NamedSlot name="setpoint-icon" content={setpointIcon} />
|
|
128
123
|
{/if}
|
|
129
124
|
|
|
130
125
|
{#if adviceIcon}
|
|
131
|
-
<
|
|
132
|
-
{@render adviceIcon()}
|
|
133
|
-
</div>
|
|
126
|
+
<NamedSlot name="advice-icon" content={adviceIcon} />
|
|
134
127
|
{/if}
|
|
135
128
|
|
|
136
129
|
{#if srcPickerContent}
|
|
137
|
-
<
|
|
138
|
-
{@render srcPickerContent()}
|
|
139
|
-
</div>
|
|
130
|
+
<NamedSlot name="src-picker-content" content={srcPickerContent} />
|
|
140
131
|
{/if}
|
|
141
132
|
</obc-readout>
|
|
@@ -6,6 +6,7 @@ export type {ReadoutListItemPriority, ReadoutListItemStacking, ReadoutListItemCl
|
|
|
6
6
|
export type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/components/alert-frame/alert-frame.js';
|
|
7
7
|
import '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
|
|
8
8
|
import { setProperties, forwardEvents } from "../../util.js";
|
|
9
|
+
import NamedSlot from "../../NamedSlot.svelte";
|
|
9
10
|
import type {ReadoutValueType} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout/readout-formatters.js';
|
|
10
11
|
import type {ReadoutBlockSize, ReadoutBlockDataQuality} from '@oicl/openbridge-webcomponents/dist/building-blocks/readout-block/readout-block.js';
|
|
11
12
|
import type {ReadoutListItemPriority, ReadoutListItemStacking, ReadoutListItemClickable, ReadoutValueOptions, ReadoutSetpointOptions, ReadoutAdviceOptions, ReadoutLabelOptions, ReadoutReserverOptions, ReadoutSrcOptions} from '@oicl/openbridge-webcomponents/dist/navigation-instruments/readout-list-item/readout-list-item.js';
|
|
@@ -87,26 +88,18 @@ import type {AlertFrameConfig} from '@oicl/openbridge-webcomponents/dist/compone
|
|
|
87
88
|
use:forwardEvents={{'click': onClick}} >
|
|
88
89
|
|
|
89
90
|
{#if leadingIcon}
|
|
90
|
-
<
|
|
91
|
-
{@render leadingIcon()}
|
|
92
|
-
</div>
|
|
91
|
+
<NamedSlot name="leading-icon" content={leadingIcon} />
|
|
93
92
|
{/if}
|
|
94
93
|
|
|
95
94
|
{#if valueIcon}
|
|
96
|
-
<
|
|
97
|
-
{@render valueIcon()}
|
|
98
|
-
</div>
|
|
95
|
+
<NamedSlot name="value-icon" content={valueIcon} />
|
|
99
96
|
{/if}
|
|
100
97
|
|
|
101
98
|
{#if setpointIcon}
|
|
102
|
-
<
|
|
103
|
-
{@render setpointIcon()}
|
|
104
|
-
</div>
|
|
99
|
+
<NamedSlot name="setpoint-icon" content={setpointIcon} />
|
|
105
100
|
{/if}
|
|
106
101
|
|
|
107
102
|
{#if adviceIcon}
|
|
108
|
-
<
|
|
109
|
-
{@render adviceIcon()}
|
|
110
|
-
</div>
|
|
103
|
+
<NamedSlot name="advice-icon" content={adviceIcon} />
|
|
111
104
|
{/if}
|
|
112
105
|
</obc-readout-list-item>
|
package/dist/util.d.ts
CHANGED
|
@@ -6,4 +6,24 @@ export declare function forwardEvents(node: HTMLElement, handlers: EventHandlers
|
|
|
6
6
|
update(handlers: EventHandlers): void;
|
|
7
7
|
destroy(): void;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* `slot` value of the markers that delimit a NamedSlot region. It matches no
|
|
11
|
+
* real slot, so the markers stay unassigned and never affect layout.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SLOT_MARKER = "svelte-slot-marker";
|
|
14
|
+
export interface AssignSlotOptions {
|
|
15
|
+
name: string;
|
|
16
|
+
/** Called when the region renders text, which cannot carry a `slot`. */
|
|
17
|
+
onText: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Assigns the elements rendered between this start marker and the next marker
|
|
21
|
+
* to a named slot by setting their `slot` attribute, so they slot natively
|
|
22
|
+
* like the web component's documented usage. Nodes are never moved: Svelte
|
|
23
|
+
* removes blocks by walking their sibling range.
|
|
24
|
+
*/
|
|
25
|
+
export declare function assignSlot(start: HTMLTemplateElement, options: AssignSlotOptions): {
|
|
26
|
+
update(options: AssignSlotOptions): void;
|
|
27
|
+
destroy(): void;
|
|
28
|
+
};
|
|
9
29
|
export {};
|
package/dist/util.js
CHANGED
|
@@ -39,3 +39,45 @@ export function forwardEvents(node, handlers) {
|
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* `slot` value of the markers that delimit a NamedSlot region. It matches no
|
|
44
|
+
* real slot, so the markers stay unassigned and never affect layout.
|
|
45
|
+
*/
|
|
46
|
+
export const SLOT_MARKER = "svelte-slot-marker";
|
|
47
|
+
const isMarker = (node) => node instanceof HTMLTemplateElement && node.slot === SLOT_MARKER;
|
|
48
|
+
/**
|
|
49
|
+
* Assigns the elements rendered between this start marker and the next marker
|
|
50
|
+
* to a named slot by setting their `slot` attribute, so they slot natively
|
|
51
|
+
* like the web component's documented usage. Nodes are never moved: Svelte
|
|
52
|
+
* removes blocks by walking their sibling range.
|
|
53
|
+
*/
|
|
54
|
+
export function assignSlot(start, options) {
|
|
55
|
+
let current = options;
|
|
56
|
+
const assign = () => {
|
|
57
|
+
for (let node = start.nextSibling; node && !isMarker(node); node = node.nextSibling) {
|
|
58
|
+
if (node instanceof Element) {
|
|
59
|
+
if (node.slot !== current.name)
|
|
60
|
+
node.slot = current.name;
|
|
61
|
+
}
|
|
62
|
+
else if (node.nodeType === Node.TEXT_NODE && node.textContent?.trim()) {
|
|
63
|
+
current.onText();
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
assign();
|
|
69
|
+
// Re-assign when the snippet's top-level nodes change, e.g. an `{#if}` at
|
|
70
|
+
// the snippet root. Mutation records are delivered before the next paint.
|
|
71
|
+
const observer = new MutationObserver(assign);
|
|
72
|
+
if (start.parentNode)
|
|
73
|
+
observer.observe(start.parentNode, { childList: true });
|
|
74
|
+
return {
|
|
75
|
+
update(options) {
|
|
76
|
+
current = options;
|
|
77
|
+
assign();
|
|
78
|
+
},
|
|
79
|
+
destroy() {
|
|
80
|
+
observer.disconnect();
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
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.151",
|
|
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.151"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"svelte": "^5.0.0"
|