@oicl/openbridge-webcomponents 2.0.0-next.97 → 2.0.0-next.98
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 +20 -115
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +29 -10
- package/dist/automation/automation-tank/automation-tank.css.js +8 -87
- package/dist/automation/automation-tank/automation-tank.css.js.map +1 -1
- package/dist/automation/automation-tank/automation-tank.d.ts +13 -33
- package/dist/automation/automation-tank/automation-tank.d.ts.map +1 -1
- package/dist/automation/automation-tank/automation-tank.js +12 -28
- package/dist/automation/automation-tank/automation-tank.js.map +1 -1
- package/package.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -15535,7 +15535,7 @@
|
|
|
15535
15535
|
"name": "current-value"
|
|
15536
15536
|
},
|
|
15537
15537
|
{
|
|
15538
|
-
"description": "
|
|
15538
|
+
"description": "Detail rows below the main readout, shown in the regular (non-compact, non-static) layout. Slot an `<obc-readout-list>` of `<obc-readout-list-item>` rows — it owns the row typography and cross-row column alignment; the tank renders a divider above it automatically when the slot is filled.",
|
|
15539
15539
|
"name": "rich"
|
|
15540
15540
|
},
|
|
15541
15541
|
{
|
|
@@ -15780,15 +15780,6 @@
|
|
|
15780
15780
|
"description": "Number of fraction digits used to format the percent readout in the\nnon-compact (regular) layout. Defaults to `0` (integer percent). The\ncompact layout always renders integer percent to keep its fixed-width\nfootprint stable. The static layout renders capacity (`max` + `unit`)\nrather than percent, so this property has no effect there — pass a\npre-formatted value through the `max-value` slot if fractional\nprecision is needed (see the `WithFractionDigits` story).",
|
|
15781
15781
|
"attribute": "percentFractionDigits"
|
|
15782
15782
|
},
|
|
15783
|
-
{
|
|
15784
|
-
"kind": "field",
|
|
15785
|
-
"name": "readout",
|
|
15786
|
-
"type": {
|
|
15787
|
-
"text": "TankReadoutItem[]"
|
|
15788
|
-
},
|
|
15789
|
-
"default": "[]",
|
|
15790
|
-
"description": "Rich detail rows shown below the main percent/value block in the regular\n(non-compact, non-static) layout, separated by a divider. When empty (the\ndefault), nothing is rendered — neither the divider nor the list. In\nvertical orientation the chart cell shrinks to make room; in horizontal\norientation the readout column already has reserved whitespace so the\nchart is unaffected.\n\nValues are formatted using `percentFractionDigits`. Consumers that need\nfull control over the markup can replace the entire fallback by slotting\narbitrary content into `slot=\"rich\"` (note: this is a different name from\nthe existing `slot=\"readout\"` which replaces the whole readout block)."
|
|
15791
|
-
},
|
|
15792
15783
|
{
|
|
15793
15784
|
"kind": "field",
|
|
15794
15785
|
"name": "badgeControl",
|
|
@@ -15859,6 +15850,16 @@
|
|
|
15859
15850
|
"privacy": "private",
|
|
15860
15851
|
"default": "false"
|
|
15861
15852
|
},
|
|
15853
|
+
{
|
|
15854
|
+
"kind": "field",
|
|
15855
|
+
"name": "_hasRichSlot",
|
|
15856
|
+
"type": {
|
|
15857
|
+
"text": "boolean"
|
|
15858
|
+
},
|
|
15859
|
+
"privacy": "private",
|
|
15860
|
+
"default": "false",
|
|
15861
|
+
"description": "Tracks whether the `rich` slot has assigned content, so the regular\n(non-compact) layout only draws the rich divider when a consumer has\nslotted detail rows (canonically an `<obc-readout-list>`). Mirrors\n`_hasBadges` / `_hasTagSlot`."
|
|
15862
|
+
},
|
|
15862
15863
|
{
|
|
15863
15864
|
"kind": "field",
|
|
15864
15865
|
"name": "_chartResizeObserver",
|
|
@@ -15969,6 +15970,24 @@
|
|
|
15969
15970
|
}
|
|
15970
15971
|
]
|
|
15971
15972
|
},
|
|
15973
|
+
{
|
|
15974
|
+
"kind": "method",
|
|
15975
|
+
"name": "_onRichSlotChange",
|
|
15976
|
+
"privacy": "private",
|
|
15977
|
+
"return": {
|
|
15978
|
+
"type": {
|
|
15979
|
+
"text": "void"
|
|
15980
|
+
}
|
|
15981
|
+
},
|
|
15982
|
+
"parameters": [
|
|
15983
|
+
{
|
|
15984
|
+
"name": "e",
|
|
15985
|
+
"type": {
|
|
15986
|
+
"text": "Event"
|
|
15987
|
+
}
|
|
15988
|
+
}
|
|
15989
|
+
]
|
|
15990
|
+
},
|
|
15972
15991
|
{
|
|
15973
15992
|
"kind": "method",
|
|
15974
15993
|
"name": "_syncChartResizeObserver",
|
|
@@ -669,94 +669,15 @@ const compentStyle = css`* {
|
|
|
669
669
|
margin-top: 8px;
|
|
670
670
|
}
|
|
671
671
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
grid-template-columns: 1fr auto auto;
|
|
678
|
-
align-items: baseline;
|
|
679
|
-
row-gap: 4px;
|
|
680
|
-
padding-top: 8px;
|
|
681
|
-
white-space: nowrap;
|
|
682
|
-
font-family: var(--global-typography-font-family);
|
|
683
|
-
font-size: var(--global-typography-instrument-unit-font-size);
|
|
684
|
-
line-height: var(--global-typography-instrument-unit-line-height);
|
|
685
|
-
font-feature-settings:
|
|
686
|
-
"liga" off,
|
|
687
|
-
"clig" off,
|
|
688
|
-
"ss04" on;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
.rich-row {
|
|
692
|
-
display: grid;
|
|
693
|
-
grid-template-columns: subgrid;
|
|
694
|
-
grid-column: 1 / -1;
|
|
695
|
-
align-items: baseline;
|
|
696
|
-
padding-left: var(
|
|
697
|
-
--instrument-components-readout-new-list-item-regular-container-padding-horizontal
|
|
698
|
-
);
|
|
699
|
-
padding-right: var(
|
|
700
|
-
--instrument-components-readout-new-list-item-regular-container-padding-horizontal
|
|
701
|
-
);
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
.rich-label {
|
|
705
|
-
font-family: var(--global-typography-font-family);
|
|
706
|
-
font-size: var(--global-typography-instrument-label-font-size);
|
|
707
|
-
line-height: var(--global-typography-instrument-label-line-height);
|
|
708
|
-
font-feature-settings:
|
|
709
|
-
"liga" off,
|
|
710
|
-
"clig" off,
|
|
711
|
-
"ss04" on;
|
|
712
|
-
color: var(--element-inactive-color);
|
|
713
|
-
padding-right: 8px;
|
|
714
|
-
text-align: left;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
.rich-value {
|
|
718
|
-
font-family: var(--global-typography-font-family);
|
|
719
|
-
font-size: var(--global-typography-instrument-value-regular-font-size);
|
|
720
|
-
line-height: var(--global-typography-instrument-value-regular-line-height);
|
|
721
|
-
font-feature-settings:
|
|
722
|
-
"liga" off,
|
|
723
|
-
"clig" off,
|
|
724
|
-
"ss04" on;
|
|
725
|
-
color: var(--element-neutral-color);
|
|
726
|
-
font-variant-numeric: tabular-nums;
|
|
727
|
-
text-align: right;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
.rich-suffix {
|
|
731
|
-
display: inline-flex;
|
|
732
|
-
align-items: baseline;
|
|
733
|
-
/* Default 2px gap between value and unit when there is no degree/percent
|
|
734
|
-
* glyph. When a glyph is present it sits flush against the value and the
|
|
735
|
-
* unit follows flush after the glyph (see \`.rich-glyph + .rich-unit\`). */
|
|
736
|
-
padding-left: 2px;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
.rich-suffix:has(.rich-glyph) {
|
|
740
|
-
padding-left: 0;
|
|
741
|
-
}
|
|
672
|
+
/* Rich detail rows are consumer-slotted into \`slot="rich"\` — canonical usage is
|
|
673
|
+
* an \`<obc-readout-list>\` of \`<obc-readout-list-item>\` rows, which owns its own
|
|
674
|
+
* cap-height (textbox) typography and cross-row column alignment. The tank only
|
|
675
|
+
* spaces the slotted content below the divider; the divider itself is shown only
|
|
676
|
+
* when the slot is filled (\`?hidden\` bound to \`_hasRichSlot\`). */
|
|
742
677
|
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
line-height: var(--global-typography-instrument-value-regular-line-height);
|
|
747
|
-
font-feature-settings:
|
|
748
|
-
"liga" off,
|
|
749
|
-
"clig" off,
|
|
750
|
-
"ss04" on;
|
|
751
|
-
color: var(--element-neutral-color);
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
.rich-unit {
|
|
755
|
-
color: var(--element-inactive-color);
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
.rich-glyph + .rich-unit {
|
|
759
|
-
padding-left: 0;
|
|
678
|
+
::slotted(obc-readout-list) {
|
|
679
|
+
display: block;
|
|
680
|
+
margin-top: 8px;
|
|
760
681
|
}
|
|
761
682
|
|
|
762
683
|
/* The chart cell is a plain sizing/clipping box. Both child renderers —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-tank.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"automation-tank.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -62,24 +62,6 @@ export declare enum TankChartMode {
|
|
|
62
62
|
/** Embedded `obc-gauge-trend` line/area chart with a side bar. */
|
|
63
63
|
graphAndBar = "graph-and-bar"
|
|
64
64
|
}
|
|
65
|
-
/**
|
|
66
|
-
* A single detail row rendered in the tank's `readout` rich list (below the
|
|
67
|
-
* main percent / value block, separated by a divider). Each row is rendered
|
|
68
|
-
* as `<label>` on the left and `<value><degree?><percent?><unit>` on the
|
|
69
|
-
* right, all on a single line.
|
|
70
|
-
*/
|
|
71
|
-
export interface TankReadoutItem {
|
|
72
|
-
/** Left-aligned label text (e.g. `Temperature`). */
|
|
73
|
-
label: string;
|
|
74
|
-
/** Numeric value, formatted with the tank's `percentFractionDigits`. */
|
|
75
|
-
value: number;
|
|
76
|
-
/** Append a `°` glyph directly after the value with no gap. */
|
|
77
|
-
hasDegree?: boolean;
|
|
78
|
-
/** Append a `%` glyph directly after the value with no gap. */
|
|
79
|
-
hasPercentage?: boolean;
|
|
80
|
-
/** Unit text (e.g. `C`, `Pa`, `m/s`). Rendered after the value/glyph. */
|
|
81
|
-
unit: string;
|
|
82
|
-
}
|
|
83
65
|
/**
|
|
84
66
|
*
|
|
85
67
|
*
|
|
@@ -89,7 +71,11 @@ export interface TankReadoutItem {
|
|
|
89
71
|
* @slot max-value - Content for the capacity value.
|
|
90
72
|
* @slot unit - Content for the unit of measurement.
|
|
91
73
|
* @slot current-value - Content for the current level value.
|
|
92
|
-
* @slot rich -
|
|
74
|
+
* @slot rich - Detail rows below the main readout, shown in the regular
|
|
75
|
+
* (non-compact, non-static) layout. Slot an `<obc-readout-list>` of
|
|
76
|
+
* `<obc-readout-list-item>` rows — it owns the row typography and cross-row
|
|
77
|
+
* column alignment; the tank renders a divider above it automatically when
|
|
78
|
+
* the slot is filled.
|
|
93
79
|
* @slot alert-icon - Custom icon for the alert frame.
|
|
94
80
|
* @slot alert-label - Label for the alert frame.
|
|
95
81
|
* @slot alert-timer - Timer for the alert frame.
|
|
@@ -197,20 +183,6 @@ export declare class ObcAutomationTank extends LitElement {
|
|
|
197
183
|
* precision is needed (see the `WithFractionDigits` story).
|
|
198
184
|
*/
|
|
199
185
|
percentFractionDigits: number;
|
|
200
|
-
/**
|
|
201
|
-
* Rich detail rows shown below the main percent/value block in the regular
|
|
202
|
-
* (non-compact, non-static) layout, separated by a divider. When empty (the
|
|
203
|
-
* default), nothing is rendered — neither the divider nor the list. In
|
|
204
|
-
* vertical orientation the chart cell shrinks to make room; in horizontal
|
|
205
|
-
* orientation the readout column already has reserved whitespace so the
|
|
206
|
-
* chart is unaffected.
|
|
207
|
-
*
|
|
208
|
-
* Values are formatted using `percentFractionDigits`. Consumers that need
|
|
209
|
-
* full control over the markup can replace the entire fallback by slotting
|
|
210
|
-
* arbitrary content into `slot="rich"` (note: this is a different name from
|
|
211
|
-
* the existing `slot="readout"` which replaces the whole readout block).
|
|
212
|
-
*/
|
|
213
|
-
readout: TankReadoutItem[];
|
|
214
186
|
/**
|
|
215
187
|
* Enum-driven badges rendered inside the `badges` cell. Mirrors the API
|
|
216
188
|
* introduced for `ObcAbstractAutomationButton` in PR #839 (#829). When set
|
|
@@ -238,6 +210,13 @@ export declare class ObcAutomationTank extends LitElement {
|
|
|
238
210
|
*/
|
|
239
211
|
private _hasBadges;
|
|
240
212
|
private _hasTagSlot;
|
|
213
|
+
/**
|
|
214
|
+
* Tracks whether the `rich` slot has assigned content, so the regular
|
|
215
|
+
* (non-compact) layout only draws the rich divider when a consumer has
|
|
216
|
+
* slotted detail rows (canonically an `<obc-readout-list>`). Mirrors
|
|
217
|
+
* `_hasBadges` / `_hasTagSlot`.
|
|
218
|
+
*/
|
|
219
|
+
private _hasRichSlot;
|
|
241
220
|
private _chartResizeObserver?;
|
|
242
221
|
private _observedCell?;
|
|
243
222
|
private get isCompact();
|
|
@@ -248,6 +227,7 @@ export declare class ObcAutomationTank extends LitElement {
|
|
|
248
227
|
private get _usesGaugeTrend();
|
|
249
228
|
private _onBadgesSlotChange;
|
|
250
229
|
private _onTagSlotChange;
|
|
230
|
+
private _onRichSlotChange;
|
|
251
231
|
disconnectedCallback(): void;
|
|
252
232
|
protected updated(changed: Map<string | number | symbol, unknown>): void;
|
|
253
233
|
private _syncChartResizeObserver;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-tank.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-tank/automation-tank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,UAAU,EAEV,OAAO,EAGR,MAAM,KAAK,CAAC;AAGb,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,oDAAoD,CAAC;AAE5D,OAAO,8CAA8C,CAAC;AACtD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,gDAAgD,CAAC;AACxD,OAAO,yCAAyC,CAAC;AACjD,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO,oCAAoC,CAAC;AAC5C,OAAO,yDAAyD,CAAC;AACjE,OAAO,oDAAoD,CAAC;AAC5D,OAAO,6CAA6C,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,qDAAqD,CAAC;AAC3F,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,mDAAmD,CAAC;AASpF,oBAAY,SAAS;IACnB,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,MAAM,WAAW;CAClB;AAED,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,OAAO,YAAY;CACpB;AAED,oBAAY,eAAe;IACzB,QAAQ,aAAa;IACrB,UAAU,eAAe;CAC1B;AAED;;;;;;;;;;;;;;GAcG;AACH,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,oBAAY,aAAa;IACvB,gFAAgF;IAChF,GAAG,QAAQ;IACX,+DAA+D;IAC/D,KAAK,UAAU;IACf,kEAAkE;IAClE,WAAW,kBAAkB;CAC9B;AAED
|
|
1
|
+
{"version":3,"file":"automation-tank.d.ts","sourceRoot":"","sources":["../../../src/automation/automation-tank/automation-tank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,UAAU,EAEV,OAAO,EAGR,MAAM,KAAK,CAAC;AAGb,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,oDAAoD,CAAC;AAE5D,OAAO,8CAA8C,CAAC;AACtD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,gDAAgD,CAAC;AACxD,OAAO,yCAAyC,CAAC;AACjD,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAClC,OAAO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AAC,iBAAiB;IAiBzB,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,uBAAuB;IAU/B,OAAO,KAAK,eAAe,GAK1B;IAED,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,iBAAiB;IAWhB,oBAAoB,IAAI,IAAI;cAOlB,OAAO,CACxB,OAAO,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,GAC9C,IAAI;IAaP,OAAO,CAAC,wBAAwB;IA8BhC,SAAS,IAAI,kBAAkB,GAAG,OAAO,OAAO;IAyBhD;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,oBAAoB;IAmJ5B,OAAO,CAAC,SAAS;IAaR,MAAM;IAoWf,OAAgB,MAAM,0BAA2B;CAClD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
|
|
@@ -89,7 +89,6 @@ let ObcAutomationTank = class extends LitElement {
|
|
|
89
89
|
this.showAlertIcon = false;
|
|
90
90
|
this.showTrendSymbol = true;
|
|
91
91
|
this.percentFractionDigits = 0;
|
|
92
|
-
this.readout = [];
|
|
93
92
|
this.badgeControl = AutomationButtonBadgeControl.None;
|
|
94
93
|
this.badgeAlert = AutomationButtonBadgeAlert.None;
|
|
95
94
|
this.badgeInterlock = AutomationButtonBadgeInterlock.None;
|
|
@@ -98,6 +97,7 @@ let ObcAutomationTank = class extends LitElement {
|
|
|
98
97
|
this._cellHeight = 0;
|
|
99
98
|
this._hasBadges = false;
|
|
100
99
|
this._hasTagSlot = false;
|
|
100
|
+
this._hasRichSlot = false;
|
|
101
101
|
}
|
|
102
102
|
get isCompact() {
|
|
103
103
|
return this.compact || this.static;
|
|
@@ -173,6 +173,12 @@ let ObcAutomationTank = class extends LitElement {
|
|
|
173
173
|
(n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()
|
|
174
174
|
);
|
|
175
175
|
}
|
|
176
|
+
_onRichSlotChange(e) {
|
|
177
|
+
const slot = e.target;
|
|
178
|
+
this._hasRichSlot = slot.assignedNodes({ flatten: true }).some(
|
|
179
|
+
(n) => n.nodeType === Node.ELEMENT_NODE || n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()
|
|
180
|
+
);
|
|
181
|
+
}
|
|
176
182
|
disconnectedCallback() {
|
|
177
183
|
super.disconnectedCallback();
|
|
178
184
|
this._chartResizeObserver?.disconnect();
|
|
@@ -448,30 +454,8 @@ let ObcAutomationTank = class extends LitElement {
|
|
|
448
454
|
<slot class="unit" name="unit">m<sup>3</sup></slot>
|
|
449
455
|
</div>
|
|
450
456
|
</div>
|
|
451
|
-
<
|
|
452
|
-
|
|
453
|
-
<div class="rich-divider"></div>
|
|
454
|
-
<div class="rich">
|
|
455
|
-
${this.readout.map(
|
|
456
|
-
(row) => html`
|
|
457
|
-
<div class="rich-row">
|
|
458
|
-
<span class="rich-label">${row.label}</span>
|
|
459
|
-
<span class="rich-value"
|
|
460
|
-
>${row.value.toFixed(
|
|
461
|
-
this.percentFractionDigits
|
|
462
|
-
)}</span
|
|
463
|
-
>
|
|
464
|
-
<span class="rich-suffix"
|
|
465
|
-
>${row.hasDegree ? html`<span class="rich-glyph">°</span>` : nothing}${row.hasPercentage ? html`<span class="rich-glyph">%</span>` : nothing}<span class="rich-unit"
|
|
466
|
-
>${row.unit}</span
|
|
467
|
-
></span
|
|
468
|
-
>
|
|
469
|
-
</div>
|
|
470
|
-
`
|
|
471
|
-
)}
|
|
472
|
-
</div>
|
|
473
|
-
` : nothing}
|
|
474
|
-
</slot>
|
|
457
|
+
<div class="rich-divider" ?hidden=${!this._hasRichSlot}></div>
|
|
458
|
+
<slot name="rich" @slotchange=${this._onRichSlotChange}></slot>
|
|
475
459
|
</slot>
|
|
476
460
|
</div>
|
|
477
461
|
`;
|
|
@@ -698,9 +682,6 @@ __decorateClass([
|
|
|
698
682
|
__decorateClass([
|
|
699
683
|
property({ type: Number })
|
|
700
684
|
], ObcAutomationTank.prototype, "percentFractionDigits", 2);
|
|
701
|
-
__decorateClass([
|
|
702
|
-
property({ type: Array, attribute: false })
|
|
703
|
-
], ObcAutomationTank.prototype, "readout", 2);
|
|
704
685
|
__decorateClass([
|
|
705
686
|
property({ type: String })
|
|
706
687
|
], ObcAutomationTank.prototype, "badgeControl", 2);
|
|
@@ -725,6 +706,9 @@ __decorateClass([
|
|
|
725
706
|
__decorateClass([
|
|
726
707
|
state()
|
|
727
708
|
], ObcAutomationTank.prototype, "_hasTagSlot", 2);
|
|
709
|
+
__decorateClass([
|
|
710
|
+
state()
|
|
711
|
+
], ObcAutomationTank.prototype, "_hasRichSlot", 2);
|
|
728
712
|
ObcAutomationTank = __decorateClass([
|
|
729
713
|
customElement("obc-automation-tank")
|
|
730
714
|
], ObcAutomationTank);
|