@oicl/openbridge-webcomponents-full-bundle 2.0.0-next.132 → 2.0.0-next.134
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 +59 -49
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +11 -22
- package/dist/components/automation-button-readout-stack/automation-button-readout-stack.css.js +8 -1
- package/dist/components/automation-button-readout-stack/automation-button-readout-stack.css.js.map +1 -1
- package/dist/components/automation-button-readout-stack/automation-button-readout-stack.d.ts +6 -0
- package/dist/components/automation-button-readout-stack/automation-button-readout-stack.d.ts.map +1 -1
- package/dist/components/automation-button-readout-stack/automation-button-readout-stack.js +13 -2
- package/dist/components/automation-button-readout-stack/automation-button-readout-stack.js.map +1 -1
- package/dist/components/user-menu/user-menu.d.ts +11 -6
- package/dist/components/user-menu/user-menu.d.ts.map +1 -1
- package/dist/components/user-menu/user-menu.js +38 -46
- package/dist/components/user-menu/user-menu.js.map +1 -1
- package/dist/generated/locales/es-419.d.ts +1 -5
- package/dist/generated/locales/es-419.d.ts.map +1 -1
- package/dist/generated/locales/es-419.js +1 -5
- package/dist/generated/locales/es-419.js.map +1 -1
- package/dist/generated/locales/fi-FI.d.ts +1 -5
- package/dist/generated/locales/fi-FI.d.ts.map +1 -1
- package/dist/generated/locales/fi-FI.js +1 -5
- package/dist/generated/locales/fi-FI.js.map +1 -1
- package/package.json +1 -1
- package/script/agent-docs/frontmatter.ts +1 -1
- package/script/generate-bundle-entry.ts +9 -4
- package/script/sync-agent-docs.test.ts +9 -0
- package/src/components/automation-button-readout-stack/automation-button-readout-stack.css +9 -1
- package/src/components/automation-button-readout-stack/automation-button-readout-stack.ts +15 -2
- package/src/components/user-menu/user-menu.stories.ts +23 -0
- package/src/components/user-menu/user-menu.ts +49 -62
- package/src/generated/locales/es-419.ts +1 -5
- package/src/generated/locales/fi-FI.ts +1 -5
|
@@ -15533,7 +15533,14 @@ const compentStyle$1d = i$7`* {
|
|
|
15533
15533
|
display: flex;
|
|
15534
15534
|
justify-content: center;
|
|
15535
15535
|
align-items: center;
|
|
15536
|
-
gap:
|
|
15536
|
+
gap: 0;
|
|
15537
|
+
}
|
|
15538
|
+
.readout-stack .value-text .hinted-zero {
|
|
15539
|
+
color: var(
|
|
15540
|
+
--obc-automation-button-readout-stack-hinted-color,
|
|
15541
|
+
var(--element-disabled-color)
|
|
15542
|
+
);
|
|
15543
|
+
font-weight: var(--global-typography-generic-l-font-weight-regular);
|
|
15537
15544
|
}
|
|
15538
15545
|
.readout-stack.small .readout-item {
|
|
15539
15546
|
font-family: var(--global-typography-font-family);
|
|
@@ -16497,10 +16504,17 @@ let ObcAutomationButtonReadoutStack = class extends i$4 {
|
|
|
16497
16504
|
renderValueText(text) {
|
|
16498
16505
|
return b`<span class="value-text">${text}</span>`;
|
|
16499
16506
|
}
|
|
16507
|
+
/**
|
|
16508
|
+
* Numeric readout with hinted zeros.
|
|
16509
|
+
*
|
|
16510
|
+
* The minus sign occupies a digit slot, so the readout stays `nDigits` wide
|
|
16511
|
+
* and the sign renders ahead of the hinted padding (`-05`, not `0-5`).
|
|
16512
|
+
*/
|
|
16500
16513
|
renderValue(readout) {
|
|
16501
16514
|
const v2 = readout.value.toFixed(0);
|
|
16515
|
+
const sign2 = v2.startsWith("-") ? "-" : "";
|
|
16516
|
+
const digits = sign2 ? v2.slice(1) : v2;
|
|
16502
16517
|
const zeroPadding = v2.length < readout.nDigits ? "0".repeat(readout.nDigits - v2.length) : "";
|
|
16503
|
-
const paddedValue = zeroPadding + v2;
|
|
16504
16518
|
let directionIcon = A;
|
|
16505
16519
|
if (readout.icon == "arrow") {
|
|
16506
16520
|
if (readout.direction == "up") {
|
|
@@ -16548,7 +16562,11 @@ let ObcAutomationButtonReadoutStack = class extends i$4 {
|
|
|
16548
16562
|
}
|
|
16549
16563
|
}
|
|
16550
16564
|
const content = b`
|
|
16551
|
-
|
|
16565
|
+
<span class="value-text"
|
|
16566
|
+
>${sign2}${zeroPadding ? b`<span class="hinted-zero" aria-hidden="true"
|
|
16567
|
+
>${zeroPadding}</span
|
|
16568
|
+
>` : A}${digits}</span
|
|
16569
|
+
>
|
|
16552
16570
|
<span class="unit">${readout.unit}</span>
|
|
16553
16571
|
`;
|
|
16554
16572
|
return this.renderValueContainer("value", directionIcon, content);
|
|
@@ -118263,21 +118281,8 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118263
118281
|
this.recentUsers = [];
|
|
118264
118282
|
this.signedInActions = [];
|
|
118265
118283
|
}
|
|
118266
|
-
get
|
|
118267
|
-
return
|
|
118268
|
-
{ id: "calendar", label: msg("Calendar") },
|
|
118269
|
-
{ id: "log", label: msg("Log") },
|
|
118270
|
-
{ id: "preferences", label: msg("Preferences") },
|
|
118271
|
-
{ id: "user-account", label: msg("User account") }
|
|
118272
|
-
];
|
|
118273
|
-
}
|
|
118274
|
-
get defaultRecentUsers() {
|
|
118275
|
-
const label = msg("Username");
|
|
118276
|
-
return [
|
|
118277
|
-
{ initials: "AB", label },
|
|
118278
|
-
{ initials: "CD", label },
|
|
118279
|
-
{ initials: "EF", label }
|
|
118280
|
-
];
|
|
118284
|
+
get showRecentUsers() {
|
|
118285
|
+
return this.hasRecentlySignedIn && this.recentUsers.length > 0;
|
|
118281
118286
|
}
|
|
118282
118287
|
renderTextInput(placeholder, type = HTMLInputTypeAttribute.Text, value = "", onInput, errorText = "") {
|
|
118283
118288
|
const isPassword = type === HTMLInputTypeAttribute.Password;
|
|
@@ -118298,7 +118303,7 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118298
118303
|
}
|
|
118299
118304
|
renderUserButtons(count, isLarge) {
|
|
118300
118305
|
const size = isLarge ? Size.large : Size.regular;
|
|
118301
|
-
const users =
|
|
118306
|
+
const users = this.recentUsers.slice(0, count);
|
|
118302
118307
|
return b`
|
|
118303
118308
|
<div
|
|
118304
118309
|
class=${e$1({
|
|
@@ -118322,11 +118327,11 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118322
118327
|
</div>
|
|
118323
118328
|
`;
|
|
118324
118329
|
}
|
|
118325
|
-
renderUserProfile(layout, size
|
|
118330
|
+
renderUserProfile(layout, size) {
|
|
118331
|
+
if (!this.userInitials && !this.userLabel) {
|
|
118332
|
+
return A;
|
|
118333
|
+
}
|
|
118326
118334
|
const userButtonSize = size === "large" ? Size.large : Size.regular;
|
|
118327
|
-
const fallbackUser = this.recentUsers[0] ?? this.defaultRecentUsers[0];
|
|
118328
|
-
const resolvedInitials = initials ?? this.userInitials ?? fallbackUser.initials;
|
|
118329
|
-
const resolvedLabel = label ?? this.userLabel ?? fallbackUser.label;
|
|
118330
118335
|
return b`
|
|
118331
118336
|
<div
|
|
118332
118337
|
class=${e$1({
|
|
@@ -118342,8 +118347,8 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118342
118347
|
.variant=${Variant.initials}
|
|
118343
118348
|
.styleType=${StyleType.normal}
|
|
118344
118349
|
.size=${userButtonSize}
|
|
118345
|
-
.initials=${
|
|
118346
|
-
.label=${
|
|
118350
|
+
.initials=${this.userInitials ?? ""}
|
|
118351
|
+
.label=${this.userLabel ?? ""}
|
|
118347
118352
|
></obc-user-button>
|
|
118348
118353
|
</div>
|
|
118349
118354
|
`;
|
|
@@ -118447,7 +118452,7 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118447
118452
|
${msg("Sign in")}
|
|
118448
118453
|
</obc-button>
|
|
118449
118454
|
</div>
|
|
118450
|
-
${this.
|
|
118455
|
+
${this.showRecentUsers ? b`
|
|
118451
118456
|
<div class="recent-container">
|
|
118452
118457
|
<div class="title-container">
|
|
118453
118458
|
<div class="subtitle">${msg("Recently signed in")}</div>
|
|
@@ -118487,8 +118492,8 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118487
118492
|
${msg("Sign in")}
|
|
118488
118493
|
</obc-button>
|
|
118489
118494
|
</div>
|
|
118490
|
-
|
|
118491
|
-
|
|
118495
|
+
${this.showRecentUsers ? b`
|
|
118496
|
+
<div class="divider" aria-hidden="true"></div>
|
|
118492
118497
|
<div class="recent-container recent">
|
|
118493
118498
|
<div class="title-container">
|
|
118494
118499
|
<div class="subtitle">${msg("Recent")}</div>
|
|
@@ -118526,7 +118531,7 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118526
118531
|
</obc-button>
|
|
118527
118532
|
</div>
|
|
118528
118533
|
</div>
|
|
118529
|
-
${this.
|
|
118534
|
+
${this.showRecentUsers ? b`
|
|
118530
118535
|
<div class="recent-container">
|
|
118531
118536
|
<div class="title-container">
|
|
118532
118537
|
<div class="subtitle">${msg("Recently signed in")}</div>
|
|
@@ -118562,8 +118567,8 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118562
118567
|
${msg("Sign in")}
|
|
118563
118568
|
</obc-button>
|
|
118564
118569
|
</div>
|
|
118565
|
-
|
|
118566
|
-
|
|
118570
|
+
${this.showRecentUsers ? b`
|
|
118571
|
+
<div class="divider" aria-hidden="true"></div>
|
|
118567
118572
|
<div class="recent-container recent">
|
|
118568
118573
|
<div class="title-container">
|
|
118569
118574
|
<div class="subtitle">${msg("Recent")}</div>
|
|
@@ -118608,7 +118613,6 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118608
118613
|
`;
|
|
118609
118614
|
}
|
|
118610
118615
|
renderSignedIn() {
|
|
118611
|
-
const actions = this.signedInActions.length ? this.signedInActions : this.defaultSignedInActions;
|
|
118612
118616
|
return b`
|
|
118613
118617
|
<div class="title-container">
|
|
118614
118618
|
<h3 class="title">${msg("User")}</h3>
|
|
@@ -118617,24 +118621,26 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118617
118621
|
${this.renderUserProfile("vertical", "large")}
|
|
118618
118622
|
</div>
|
|
118619
118623
|
<div class="divider" aria-hidden="true"></div>
|
|
118620
|
-
|
|
118621
|
-
|
|
118624
|
+
${this.signedInActions.length ? b`
|
|
118625
|
+
<div class="nav-container">
|
|
118626
|
+
${this.signedInActions.map((action) => {
|
|
118622
118627
|
const normalizedId = this.normalizeActionId(action.id);
|
|
118623
118628
|
return b`
|
|
118624
|
-
|
|
118625
|
-
|
|
118626
|
-
|
|
118627
|
-
|
|
118628
|
-
|
|
118629
|
-
|
|
118630
|
-
|
|
118631
|
-
|
|
118632
|
-
|
|
118633
|
-
|
|
118634
|
-
|
|
118635
|
-
|
|
118629
|
+
<obc-navigation-item
|
|
118630
|
+
.label=${action.label}
|
|
118631
|
+
hasIcon
|
|
118632
|
+
@click=${() => this.handleSignedInActionClick(action)}
|
|
118633
|
+
>
|
|
118634
|
+
<span slot="icon">
|
|
118635
|
+
<slot name="signed-in-action-icon-${normalizedId}">
|
|
118636
|
+
${this.getSignedInActionIcon(normalizedId)}
|
|
118637
|
+
</slot>
|
|
118638
|
+
</span>
|
|
118639
|
+
</obc-navigation-item>
|
|
118640
|
+
`;
|
|
118636
118641
|
})}
|
|
118637
|
-
|
|
118642
|
+
</div>
|
|
118643
|
+
` : A}
|
|
118638
118644
|
<div class="button-container">
|
|
118639
118645
|
<obc-button
|
|
118640
118646
|
variant=${ButtonVariant.normal}
|
|
@@ -118647,8 +118653,9 @@ let ObcUserMenu = class extends i$4 {
|
|
|
118647
118653
|
`;
|
|
118648
118654
|
}
|
|
118649
118655
|
renderSignedInSmall() {
|
|
118650
|
-
const
|
|
118651
|
-
|
|
118656
|
+
const primaryAction = this.signedInActions.find(
|
|
118657
|
+
(action) => action.id === this.primaryActionId
|
|
118658
|
+
);
|
|
118652
118659
|
return b`
|
|
118653
118660
|
<div class="title-container">
|
|
118654
118661
|
<h3 class="title">${msg("User")}</h3>
|
|
@@ -118737,6 +118744,9 @@ __decorateClass$sA([
|
|
|
118737
118744
|
__decorateClass$sA([
|
|
118738
118745
|
n$3({ type: Array, attribute: false })
|
|
118739
118746
|
], ObcUserMenu.prototype, "signedInActions", 2);
|
|
118747
|
+
__decorateClass$sA([
|
|
118748
|
+
n$3({ type: String })
|
|
118749
|
+
], ObcUserMenu.prototype, "primaryActionId", 2);
|
|
118740
118750
|
ObcUserMenu = __decorateClass$sA([
|
|
118741
118751
|
customElement("obc-user-menu"),
|
|
118742
118752
|
localized()
|