@kumori/aurora-wui-components 0.0.280-dev4205.2 → 0.0.281-dev4205.10
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/components/axebow-call-to-action-feature/axebow-call-to-action-feature.d.ts +3 -1
- package/dist/components/axebow-call-to-action-feature/axebow-call-to-action-feature.d.ts.map +1 -1
- package/dist/components/axebow-call-to-action-row/axebow-call-to-action-row.d.ts +1 -0
- package/dist/components/axebow-call-to-action-row/axebow-call-to-action-row.d.ts.map +1 -1
- package/dist/components/axebow-call-to-action-row/call-to-action-notification.d.ts +44 -0
- package/dist/components/axebow-call-to-action-row/call-to-action-notification.d.ts.map +1 -0
- package/dist/components/axebow-cta-dialog/axebow-cta-dialog.d.ts +2 -1
- package/dist/components/axebow-cta-dialog/axebow-cta-dialog.d.ts.map +1 -1
- package/dist/components/axebow-modal/axebow-modal.d.ts +3 -0
- package/dist/components/axebow-modal/axebow-modal.d.ts.map +1 -1
- package/dist/components/axebow-tenant-card/axebow-tenant-card.d.ts +5 -0
- package/dist/components/axebow-tenant-card/axebow-tenant-card.d.ts.map +1 -1
- package/dist/components/axebow-tenant-resource-table/axebow-tenant-resource-table.d.ts +3 -0
- package/dist/components/axebow-tenant-resource-table/axebow-tenant-resource-table.d.ts.map +1 -1
- package/dist/components/cards/axebow-base-card.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +269 -165
- package/dist/index.js.map +1 -1
- package/dist/playground/schemas/axebow-call-to-action-feature.schema.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6808,7 +6808,7 @@ var AxebowBaseCard = class AxebowBaseCard extends LitElement {
|
|
|
6808
6808
|
</div>
|
|
6809
6809
|
</div>
|
|
6810
6810
|
|
|
6811
|
-
|
|
6811
|
+
${this.cardType === "tenant" ? html`<div class="w-full h-8"><slot name="extra-features"></slot></div>` : html`<slot name="extra-features"></slot>`}
|
|
6812
6812
|
</div>
|
|
6813
6813
|
</div>
|
|
6814
6814
|
|
|
@@ -8507,12 +8507,17 @@ var AxebowTenantResourceTable = class AxebowTenantResourceTable extends LitEleme
|
|
|
8507
8507
|
}
|
|
8508
8508
|
_renderStatusIcon(icon) {
|
|
8509
8509
|
if (!icon) return "";
|
|
8510
|
-
const iconEl =
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8510
|
+
const iconEl = html`
|
|
8511
|
+
<div
|
|
8512
|
+
class="w-5 h-5 shrink-0 flex items-center justify-center cursor-pointer"
|
|
8513
|
+
@click=${icon.onClick ? (e) => {
|
|
8514
|
+
e.stopPropagation();
|
|
8515
|
+
icon.onClick();
|
|
8516
|
+
} : null}
|
|
8517
|
+
>
|
|
8518
|
+
${icon.spinner ? html`<sl-spinner style="font-size: 0.85rem; --indicator-color: var(--axebow-tertiary);"></sl-spinner>` : html`<axebow-icon iconName=${icon.iconName} iconColor=${icon.iconColor} size="md"></axebow-icon>`}
|
|
8519
|
+
</div>
|
|
8520
|
+
`;
|
|
8516
8521
|
return icon.tooltip ? html`<axebow-tooltip content=${icon.tooltip}>${iconEl}</axebow-tooltip>` : iconEl;
|
|
8517
8522
|
}
|
|
8518
8523
|
_renderTableRow(row, index) {
|
|
@@ -8540,6 +8545,7 @@ var AxebowTenantResourceTable = class AxebowTenantResourceTable extends LitEleme
|
|
|
8540
8545
|
` : html`<span class="w-4 inline-block"></span>`}
|
|
8541
8546
|
${row.logoUrl ? html`<img src=${row.logoUrl} alt="logo" class="w-5 h-5 object-contain shrink-0" />` : ""}
|
|
8542
8547
|
<span class="truncate">${row.name}</span>
|
|
8548
|
+
${this._renderStatusIcon(row.ctaIcon)}
|
|
8543
8549
|
${this._renderStatusIcon(row.statusIcon)}
|
|
8544
8550
|
<span class="flex-1"></span>
|
|
8545
8551
|
${this._renderStatusIcon(row.warningIcon)}
|
|
@@ -8597,6 +8603,7 @@ var AxebowTenantResourceTable = class AxebowTenantResourceTable extends LitEleme
|
|
|
8597
8603
|
></axebow-icon>
|
|
8598
8604
|
${subRow.logoUrl ? html`<img src=${subRow.logoUrl} class="w-5 h-5 object-contain shrink-0" />` : ""}
|
|
8599
8605
|
<span class="font-normal text-gray-700 truncate">${subRow.name}</span>
|
|
8606
|
+
${this._renderStatusIcon(subRow.ctaIcon)}
|
|
8600
8607
|
<span class="flex-1"></span>
|
|
8601
8608
|
${this._renderStatusIcon(subRow.warningIcon)}
|
|
8602
8609
|
</div>
|
|
@@ -8970,6 +8977,145 @@ __decorate([property({ type: String })], AxebowServiceDetailHeader.prototype, "a
|
|
|
8970
8977
|
__decorate([property({ type: String })], AxebowServiceDetailHeader.prototype, "deployLabel", void 0);
|
|
8971
8978
|
AxebowServiceDetailHeader = __decorate([customElement("axebow-service-detail-header")], AxebowServiceDetailHeader);
|
|
8972
8979
|
//#endregion
|
|
8980
|
+
//#region src/components/axebow-badge/axebow-badge.ts
|
|
8981
|
+
var AxebowBadge = class AxebowBadge extends LitElement {
|
|
8982
|
+
constructor(..._args) {
|
|
8983
|
+
super(..._args);
|
|
8984
|
+
this.bgColor = "var(--axebow-base)";
|
|
8985
|
+
this.textColor = "var(--axebow-secondary)";
|
|
8986
|
+
}
|
|
8987
|
+
static {
|
|
8988
|
+
this.styles = [unsafeCSS(tailwind_default), css`
|
|
8989
|
+
:host {
|
|
8990
|
+
display: inline-block;
|
|
8991
|
+
}
|
|
8992
|
+
`];
|
|
8993
|
+
}
|
|
8994
|
+
render() {
|
|
8995
|
+
return html`
|
|
8996
|
+
<div
|
|
8997
|
+
class="inline-flex items-center justify-center px-2 py-px rounded border border-solid text-xs leading-3 font-semibold whitespace-nowrap"
|
|
8998
|
+
style="background-color: ${this.bgColor}; color: ${this.textColor}; border-color: ${this.textColor};"
|
|
8999
|
+
>
|
|
9000
|
+
<slot></slot>
|
|
9001
|
+
</div>
|
|
9002
|
+
`;
|
|
9003
|
+
}
|
|
9004
|
+
};
|
|
9005
|
+
__decorate([property({ type: String })], AxebowBadge.prototype, "bgColor", void 0);
|
|
9006
|
+
__decorate([property({ type: String })], AxebowBadge.prototype, "textColor", void 0);
|
|
9007
|
+
AxebowBadge = __decorate([customElement("axebow-badge")], AxebowBadge);
|
|
9008
|
+
//#endregion
|
|
9009
|
+
//#region src/components/axebow-call-to-action-row/axebow-call-to-action-row.ts
|
|
9010
|
+
var CRITICALITY_STYLES = {
|
|
9011
|
+
critical: {
|
|
9012
|
+
bg: "var(--axebow-critical-bg)",
|
|
9013
|
+
color: "var(--axebow-error)",
|
|
9014
|
+
iconName: "error"
|
|
9015
|
+
},
|
|
9016
|
+
high: {
|
|
9017
|
+
bg: "var(--axebow-high-bg)",
|
|
9018
|
+
color: "var(--axebow-dark-yellow)",
|
|
9019
|
+
iconName: "warning"
|
|
9020
|
+
},
|
|
9021
|
+
low: {
|
|
9022
|
+
bg: "var(--axebow-base)",
|
|
9023
|
+
color: "var(--axebow-secondary)",
|
|
9024
|
+
iconName: "info"
|
|
9025
|
+
}
|
|
9026
|
+
};
|
|
9027
|
+
var AxebowCallToActionRow = class AxebowCallToActionRow extends LitElement {
|
|
9028
|
+
constructor(..._args) {
|
|
9029
|
+
super(..._args);
|
|
9030
|
+
this.criticality = "low";
|
|
9031
|
+
this.heading = "";
|
|
9032
|
+
this.badgeLabel = "";
|
|
9033
|
+
this.description = "";
|
|
9034
|
+
this.buttons = [];
|
|
9035
|
+
this.lowNoteText = "";
|
|
9036
|
+
this.count = 1;
|
|
9037
|
+
}
|
|
9038
|
+
static {
|
|
9039
|
+
this.styles = [
|
|
9040
|
+
unsafeCSS(tailwind_default),
|
|
9041
|
+
axebowTheme,
|
|
9042
|
+
css`
|
|
9043
|
+
:host {
|
|
9044
|
+
display: block;
|
|
9045
|
+
width: 100%;
|
|
9046
|
+
}
|
|
9047
|
+
`
|
|
9048
|
+
];
|
|
9049
|
+
}
|
|
9050
|
+
render() {
|
|
9051
|
+
const { bg, color, iconName } = CRITICALITY_STYLES[this.criticality] ?? CRITICALITY_STYLES.low;
|
|
9052
|
+
return html`
|
|
9053
|
+
<div class="w-full box-border border-t border-solid border-(--axebow-table-header-border) bg-white p-4 flex flex-row items-center gap-4">
|
|
9054
|
+
<div class="w-10 h-10 rounded-md shrink-0 flex items-center justify-center" style="background-color: ${bg};">
|
|
9055
|
+
<div class="w-6 h-6 flex items-center justify-center">
|
|
9056
|
+
<axebow-icon iconName=${iconName} iconColor=${color} size="2xl"></axebow-icon>
|
|
9057
|
+
</div>
|
|
9058
|
+
</div>
|
|
9059
|
+
|
|
9060
|
+
<div class="flex-1 min-w-0 flex flex-col gap-1">
|
|
9061
|
+
<div class="w-full flex flex-row items-center gap-2">
|
|
9062
|
+
<span class="text-base font-semibold truncate">${this.heading}</span>
|
|
9063
|
+
${this.badgeLabel ? html`<axebow-badge bgColor=${bg} textColor=${color}>${this.badgeLabel}</axebow-badge>` : ""}
|
|
9064
|
+
${this.count > 1 ? html`<div
|
|
9065
|
+
class="w-5 h-5 shrink-0 rounded-full flex items-center justify-center text-sm font-semibold"
|
|
9066
|
+
style="background-color: ${bg}; color: ${color};"
|
|
9067
|
+
>
|
|
9068
|
+
${this.count}
|
|
9069
|
+
</div>` : ""}
|
|
9070
|
+
</div>
|
|
9071
|
+
<div class="w-full text-(--axebow-gray)">${this.description}</div>
|
|
9072
|
+
</div>
|
|
9073
|
+
|
|
9074
|
+
${this.criticality === "low" ? this._renderLowNote() : this._renderButtons()}
|
|
9075
|
+
</div>
|
|
9076
|
+
`;
|
|
9077
|
+
}
|
|
9078
|
+
_renderLowNote() {
|
|
9079
|
+
return html`
|
|
9080
|
+
<div
|
|
9081
|
+
class="w-91 h-11 shrink-0 box-border rounded-md py-1 px-3 flex items-center text-(--axebow-gray)"
|
|
9082
|
+
style="background-color: var(--axebow-base);"
|
|
9083
|
+
>
|
|
9084
|
+
${this.lowNoteText}
|
|
9085
|
+
</div>
|
|
9086
|
+
`;
|
|
9087
|
+
}
|
|
9088
|
+
_renderButtons() {
|
|
9089
|
+
if (!this.buttons.length) return "";
|
|
9090
|
+
return html`
|
|
9091
|
+
<div class="flex flex-row items-center gap-4 shrink-0">
|
|
9092
|
+
${this.buttons.map((button) => html`
|
|
9093
|
+
<axebow-button
|
|
9094
|
+
variant=${button.variant ?? "primary"}
|
|
9095
|
+
?outline=${button.outline ?? false}
|
|
9096
|
+
@click=${() => button.onClick?.()}
|
|
9097
|
+
>
|
|
9098
|
+
${button.label}
|
|
9099
|
+
${button.iconName ? html`<axebow-icon
|
|
9100
|
+
slot="suffix"
|
|
9101
|
+
iconName=${button.iconName}
|
|
9102
|
+
iconColor=${button.iconColor ?? "currentColor"}
|
|
9103
|
+
></axebow-icon>` : ""}
|
|
9104
|
+
</axebow-button>
|
|
9105
|
+
`)}
|
|
9106
|
+
</div>
|
|
9107
|
+
`;
|
|
9108
|
+
}
|
|
9109
|
+
};
|
|
9110
|
+
__decorate([property({ type: String })], AxebowCallToActionRow.prototype, "criticality", void 0);
|
|
9111
|
+
__decorate([property({ type: String })], AxebowCallToActionRow.prototype, "heading", void 0);
|
|
9112
|
+
__decorate([property({ type: String })], AxebowCallToActionRow.prototype, "badgeLabel", void 0);
|
|
9113
|
+
__decorate([property({ type: String })], AxebowCallToActionRow.prototype, "description", void 0);
|
|
9114
|
+
__decorate([property({ type: Array })], AxebowCallToActionRow.prototype, "buttons", void 0);
|
|
9115
|
+
__decorate([property({ type: String })], AxebowCallToActionRow.prototype, "lowNoteText", void 0);
|
|
9116
|
+
__decorate([property({ type: Number })], AxebowCallToActionRow.prototype, "count", void 0);
|
|
9117
|
+
AxebowCallToActionRow = __decorate([customElement("axebow-call-to-action-row")], AxebowCallToActionRow);
|
|
9118
|
+
//#endregion
|
|
8973
9119
|
//#region src/components/axebow-tenant-card/axebow-tenant-card.ts
|
|
8974
9120
|
var AxebowTenantCard = class AxebowTenantCard extends LitElement {
|
|
8975
9121
|
constructor(..._args) {
|
|
@@ -8992,6 +9138,9 @@ var AxebowTenantCard = class AxebowTenantCard extends LitElement {
|
|
|
8992
9138
|
this.invitedNoticeText = "";
|
|
8993
9139
|
this.showNoAccountsWarning = false;
|
|
8994
9140
|
this.noAccountsWarningText = "";
|
|
9141
|
+
this.showCallToActionIssues = false;
|
|
9142
|
+
this.callToActionIssuesText = "";
|
|
9143
|
+
this.callToActionCriticality = "low";
|
|
8995
9144
|
this.contentState = "table";
|
|
8996
9145
|
this.invitationText = "";
|
|
8997
9146
|
this.emptyTextPrefix = "";
|
|
@@ -9125,7 +9274,20 @@ var AxebowTenantCard = class AxebowTenantCard extends LitElement {
|
|
|
9125
9274
|
${this.showInvitedNotice ? html`<span class="text-base text-black">${this.invitedNoticeText}</span>` : this.showNoAccountsWarning ? html`<span class="flex items-center gap-1 text-base text-black">
|
|
9126
9275
|
<axebow-icon iconName="warning" iconColor="var(--axebow-warning)" size="md"></axebow-icon>
|
|
9127
9276
|
${this.noAccountsWarningText}
|
|
9128
|
-
</span>` :
|
|
9277
|
+
</span>` : this.showCallToActionIssues ? html`<span
|
|
9278
|
+
class="flex items-center gap-1 text-base cursor-pointer"
|
|
9279
|
+
style="color: ${CRITICALITY_STYLES[this.callToActionCriticality].color};"
|
|
9280
|
+
@click=${() => this.onCallToActionClick?.()}
|
|
9281
|
+
>
|
|
9282
|
+
<div class="w-5 h-5 shrink-0 flex items-center justify-center">
|
|
9283
|
+
<axebow-icon
|
|
9284
|
+
iconName=${CRITICALITY_STYLES[this.callToActionCriticality].iconName}
|
|
9285
|
+
iconColor=${CRITICALITY_STYLES[this.callToActionCriticality].color}
|
|
9286
|
+
size="md"
|
|
9287
|
+
></axebow-icon>
|
|
9288
|
+
</div>
|
|
9289
|
+
${this.callToActionIssuesText}
|
|
9290
|
+
</span>` : ""}
|
|
9129
9291
|
</div>
|
|
9130
9292
|
|
|
9131
9293
|
<div class="w-full">
|
|
@@ -9158,6 +9320,10 @@ __decorate([property({ type: Boolean })], AxebowTenantCard.prototype, "showInvit
|
|
|
9158
9320
|
__decorate([property({ type: String })], AxebowTenantCard.prototype, "invitedNoticeText", void 0);
|
|
9159
9321
|
__decorate([property({ type: Boolean })], AxebowTenantCard.prototype, "showNoAccountsWarning", void 0);
|
|
9160
9322
|
__decorate([property({ type: String })], AxebowTenantCard.prototype, "noAccountsWarningText", void 0);
|
|
9323
|
+
__decorate([property({ type: Boolean })], AxebowTenantCard.prototype, "showCallToActionIssues", void 0);
|
|
9324
|
+
__decorate([property({ type: String })], AxebowTenantCard.prototype, "callToActionIssuesText", void 0);
|
|
9325
|
+
__decorate([property({ type: String })], AxebowTenantCard.prototype, "callToActionCriticality", void 0);
|
|
9326
|
+
__decorate([property({ attribute: false })], AxebowTenantCard.prototype, "onCallToActionClick", void 0);
|
|
9161
9327
|
__decorate([property({ type: String })], AxebowTenantCard.prototype, "contentState", void 0);
|
|
9162
9328
|
__decorate([property({ type: String })], AxebowTenantCard.prototype, "invitationText", void 0);
|
|
9163
9329
|
__decorate([property({ type: String })], AxebowTenantCard.prototype, "emptyTextPrefix", void 0);
|
|
@@ -13426,6 +13592,7 @@ var AxebowModal = class AxebowModal extends LitElement {
|
|
|
13426
13592
|
this.height = "calc(100% - 2rem)";
|
|
13427
13593
|
this.title = "";
|
|
13428
13594
|
this.description = "";
|
|
13595
|
+
this.closeIconName = "close";
|
|
13429
13596
|
this._hasFooterSlotContent = false;
|
|
13430
13597
|
this._isScrollLocked = false;
|
|
13431
13598
|
}
|
|
@@ -13536,8 +13703,12 @@ var AxebowModal = class AxebowModal extends LitElement {
|
|
|
13536
13703
|
${this.description ? html`<p class="text-(--axebow-gray) mt-1 m-0">${this.description}</p>` : ""}
|
|
13537
13704
|
<slot name="description"></slot>
|
|
13538
13705
|
|
|
13539
|
-
<div
|
|
13540
|
-
|
|
13706
|
+
<div
|
|
13707
|
+
class="close-button"
|
|
13708
|
+
style=${ifDefined(this.closeButtonSize ? `width: ${this.closeButtonSize}; height: ${this.closeButtonSize}; padding: 0;` : void 0)}
|
|
13709
|
+
@click=${this._handleClose}
|
|
13710
|
+
>
|
|
13711
|
+
<axebow-icon iconName=${this.closeIconName} iconColor=${ifDefined(this.closeIconColor)} size="xl"></axebow-icon>
|
|
13541
13712
|
</div>
|
|
13542
13713
|
</div>
|
|
13543
13714
|
` : ""}
|
|
@@ -13565,145 +13736,65 @@ __decorate([property()], AxebowModal.prototype, "maxHeight", void 0);
|
|
|
13565
13736
|
__decorate([property()], AxebowModal.prototype, "height", void 0);
|
|
13566
13737
|
__decorate([property()], AxebowModal.prototype, "title", void 0);
|
|
13567
13738
|
__decorate([property()], AxebowModal.prototype, "description", void 0);
|
|
13739
|
+
__decorate([property()], AxebowModal.prototype, "closeIconName", void 0);
|
|
13740
|
+
__decorate([property()], AxebowModal.prototype, "closeIconColor", void 0);
|
|
13741
|
+
__decorate([property()], AxebowModal.prototype, "closeButtonSize", void 0);
|
|
13568
13742
|
__decorate([state()], AxebowModal.prototype, "_hasFooterSlotContent", void 0);
|
|
13569
13743
|
AxebowModal = __decorate([customElement("axebow-modal")], AxebowModal);
|
|
13570
13744
|
//#endregion
|
|
13571
|
-
//#region src/components/axebow-
|
|
13572
|
-
var
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13584
|
-
|
|
13585
|
-
|
|
13586
|
-
|
|
13587
|
-
|
|
13588
|
-
|
|
13589
|
-
|
|
13590
|
-
|
|
13591
|
-
|
|
13592
|
-
|
|
13593
|
-
|
|
13594
|
-
|
|
13595
|
-
}
|
|
13596
|
-
|
|
13597
|
-
|
|
13598
|
-
|
|
13599
|
-
|
|
13600
|
-
|
|
13601
|
-
|
|
13602
|
-
|
|
13603
|
-
|
|
13604
|
-
|
|
13605
|
-
|
|
13606
|
-
|
|
13607
|
-
|
|
13608
|
-
|
|
13609
|
-
|
|
13610
|
-
iconName:
|
|
13611
|
-
|
|
13612
|
-
|
|
13613
|
-
|
|
13614
|
-
|
|
13615
|
-
|
|
13616
|
-
}
|
|
13617
|
-
}
|
|
13618
|
-
var AxebowCallToActionRow = class AxebowCallToActionRow extends LitElement {
|
|
13619
|
-
constructor(..._args) {
|
|
13620
|
-
super(..._args);
|
|
13621
|
-
this.criticality = "low";
|
|
13622
|
-
this.heading = "";
|
|
13623
|
-
this.badgeLabel = "";
|
|
13624
|
-
this.description = "";
|
|
13625
|
-
this.buttons = [];
|
|
13626
|
-
this.lowNoteText = "";
|
|
13627
|
-
}
|
|
13628
|
-
static {
|
|
13629
|
-
this.styles = [
|
|
13630
|
-
unsafeCSS(tailwind_default),
|
|
13631
|
-
axebowTheme,
|
|
13632
|
-
css`
|
|
13633
|
-
:host {
|
|
13634
|
-
display: block;
|
|
13635
|
-
width: 100%;
|
|
13636
|
-
}
|
|
13637
|
-
`
|
|
13638
|
-
];
|
|
13639
|
-
}
|
|
13640
|
-
render() {
|
|
13641
|
-
const { bg, color, iconName } = CRITICALITY_STYLES[this.criticality] ?? CRITICALITY_STYLES.low;
|
|
13642
|
-
return html`
|
|
13643
|
-
<div class="w-full bg-white p-4 flex flex-row items-center gap-4">
|
|
13644
|
-
<div class="w-10 h-10 rounded-md shrink-0 flex items-center justify-center" style="background-color: ${bg};">
|
|
13645
|
-
<div class="w-6 h-6 flex items-center justify-center">
|
|
13646
|
-
<axebow-icon iconName=${iconName} iconColor=${color} size="2xl"></axebow-icon>
|
|
13647
|
-
</div>
|
|
13648
|
-
</div>
|
|
13649
|
-
|
|
13650
|
-
<div class="flex-1 min-w-0 flex flex-col gap-1">
|
|
13651
|
-
<div class="w-full flex flex-row items-center gap-2">
|
|
13652
|
-
<span class="text-base font-semibold truncate">${this.heading}</span>
|
|
13653
|
-
${this.badgeLabel ? html`<axebow-badge bgColor=${bg} textColor=${color}>${this.badgeLabel}</axebow-badge>` : ""}
|
|
13654
|
-
</div>
|
|
13655
|
-
<div class="w-full text-(--axebow-gray)">${this.description}</div>
|
|
13656
|
-
</div>
|
|
13657
|
-
|
|
13658
|
-
${this.criticality === "low" ? this._renderLowNote() : this._renderButtons()}
|
|
13659
|
-
</div>
|
|
13660
|
-
`;
|
|
13661
|
-
}
|
|
13662
|
-
_renderLowNote() {
|
|
13663
|
-
return html`
|
|
13664
|
-
<div
|
|
13665
|
-
class="w-91 h-11 shrink-0 box-border rounded-md py-1 px-3 flex items-center text-(--axebow-gray)"
|
|
13666
|
-
style="background-color: var(--axebow-base);"
|
|
13667
|
-
>
|
|
13668
|
-
${this.lowNoteText}
|
|
13669
|
-
</div>
|
|
13670
|
-
`;
|
|
13671
|
-
}
|
|
13672
|
-
_renderButtons() {
|
|
13673
|
-
if (!this.buttons.length) return "";
|
|
13674
|
-
return html`
|
|
13675
|
-
<div class="flex flex-row items-center gap-4 shrink-0">
|
|
13676
|
-
${this.buttons.map((button) => html`
|
|
13677
|
-
<axebow-button
|
|
13678
|
-
variant=${button.variant ?? "primary"}
|
|
13679
|
-
?outline=${button.outline ?? false}
|
|
13680
|
-
@click=${() => button.onClick?.()}
|
|
13681
|
-
>
|
|
13682
|
-
${button.label}
|
|
13683
|
-
${button.iconName ? html`<axebow-icon
|
|
13684
|
-
slot="suffix"
|
|
13685
|
-
iconName=${button.iconName}
|
|
13686
|
-
iconColor=${button.iconColor ?? "currentColor"}
|
|
13687
|
-
></axebow-icon>` : ""}
|
|
13688
|
-
</axebow-button>
|
|
13689
|
-
`)}
|
|
13690
|
-
</div>
|
|
13691
|
-
`;
|
|
13692
|
-
}
|
|
13693
|
-
};
|
|
13694
|
-
__decorate([property({ type: String })], AxebowCallToActionRow.prototype, "criticality", void 0);
|
|
13695
|
-
__decorate([property({ type: String })], AxebowCallToActionRow.prototype, "heading", void 0);
|
|
13696
|
-
__decorate([property({ type: String })], AxebowCallToActionRow.prototype, "badgeLabel", void 0);
|
|
13697
|
-
__decorate([property({ type: String })], AxebowCallToActionRow.prototype, "description", void 0);
|
|
13698
|
-
__decorate([property({ type: Array })], AxebowCallToActionRow.prototype, "buttons", void 0);
|
|
13699
|
-
__decorate([property({ type: String })], AxebowCallToActionRow.prototype, "lowNoteText", void 0);
|
|
13700
|
-
AxebowCallToActionRow = __decorate([customElement("axebow-call-to-action-row")], AxebowCallToActionRow);
|
|
13745
|
+
//#region src/components/axebow-call-to-action-row/call-to-action-notification.ts
|
|
13746
|
+
var DEFAULT_LOW_NOTE_TEXT = "No action needed";
|
|
13747
|
+
var BUTTON_TYPE_TO_VARIANT = {
|
|
13748
|
+
primary: "primary",
|
|
13749
|
+
secondary: "tertiary",
|
|
13750
|
+
text: "text"
|
|
13751
|
+
};
|
|
13752
|
+
function getHighestCriticality(notifications) {
|
|
13753
|
+
if (notifications.some((n) => n.criticality === "critical")) return "critical";
|
|
13754
|
+
if (notifications.some((n) => n.criticality === "high")) return "high";
|
|
13755
|
+
return "low";
|
|
13756
|
+
}
|
|
13757
|
+
function getCtaHeading(notification) {
|
|
13758
|
+
return (notification.info_content?.code || notification.subtype).replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
13759
|
+
}
|
|
13760
|
+
function getCtaDescription(notification) {
|
|
13761
|
+
return notification.info_content?.message ?? "";
|
|
13762
|
+
}
|
|
13763
|
+
function getCtaBadgeLabel(notification) {
|
|
13764
|
+
return notification.criticality.charAt(0).toUpperCase() + notification.criticality.slice(1);
|
|
13765
|
+
}
|
|
13766
|
+
function groupCallToActionNotifications(notifications) {
|
|
13767
|
+
const groups = /* @__PURE__ */ new Map();
|
|
13768
|
+
notifications.forEach((notification) => {
|
|
13769
|
+
const key = `${notification.criticality}|${getCtaHeading(notification)}|${getCtaDescription(notification)}`;
|
|
13770
|
+
const existing = groups.get(key);
|
|
13771
|
+
if (existing) existing.count += 1;
|
|
13772
|
+
else groups.set(key, {
|
|
13773
|
+
notification,
|
|
13774
|
+
count: 1
|
|
13775
|
+
});
|
|
13776
|
+
});
|
|
13777
|
+
return [...groups.values()];
|
|
13778
|
+
}
|
|
13779
|
+
function buildCtaButtons(notification, dispatch) {
|
|
13780
|
+
return (notification.actions ?? []).map((action) => ({
|
|
13781
|
+
label: action.label,
|
|
13782
|
+
variant: BUTTON_TYPE_TO_VARIANT[action.buttonType] ?? "primary",
|
|
13783
|
+
outline: action.outlined,
|
|
13784
|
+
iconName: action.icon,
|
|
13785
|
+
iconColor: action.iconColor,
|
|
13786
|
+
onClick: () => dispatch({
|
|
13787
|
+
notification,
|
|
13788
|
+
action
|
|
13789
|
+
})
|
|
13790
|
+
}));
|
|
13791
|
+
}
|
|
13701
13792
|
//#endregion
|
|
13702
13793
|
//#region src/components/axebow-call-to-action-feature/axebow-call-to-action-feature.ts
|
|
13703
13794
|
var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitElement {
|
|
13704
13795
|
constructor(..._args) {
|
|
13705
13796
|
super(..._args);
|
|
13706
|
-
this.
|
|
13797
|
+
this.callToActions = [];
|
|
13707
13798
|
this.actionNeededLabel = "Action needed";
|
|
13708
13799
|
this.lastUpdatedText = "";
|
|
13709
13800
|
this.expanded = false;
|
|
@@ -13721,18 +13812,18 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13721
13812
|
];
|
|
13722
13813
|
}
|
|
13723
13814
|
get _highestCriticality() {
|
|
13724
|
-
|
|
13725
|
-
if (this.notifications.some((n) => n?.criticality === "high")) return "high";
|
|
13726
|
-
return "low";
|
|
13815
|
+
return getHighestCriticality(this.callToActions);
|
|
13727
13816
|
}
|
|
13728
13817
|
_toggle() {
|
|
13818
|
+
if (this.callToActions.length === 0) return;
|
|
13729
13819
|
this.expanded = !this.expanded;
|
|
13730
13820
|
}
|
|
13731
13821
|
render() {
|
|
13732
13822
|
const { color: criticalityColor, iconName } = CRITICALITY_STYLES[this._highestCriticality];
|
|
13733
13823
|
const chevronIconName = this.expanded ? "keyboard_arrow_down" : "chevron_right";
|
|
13824
|
+
const hasCallToActions = this.callToActions.length > 0;
|
|
13734
13825
|
return html`
|
|
13735
|
-
<div class="w-full flex flex-col">
|
|
13826
|
+
<div class="w-full box-border border border-solid border-(--axebow-table-header-border) rounded-lg overflow-hidden flex flex-col">
|
|
13736
13827
|
<div
|
|
13737
13828
|
class="w-full box-border py-3 px-5 flex flex-row items-center justify-between"
|
|
13738
13829
|
style="background-color: ${this.expanded ? "var(--axebow-base)" : "var(--axebow-white)"};"
|
|
@@ -13744,7 +13835,7 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13744
13835
|
class="w-6 h-6 shrink-0 rounded-full flex items-center justify-center"
|
|
13745
13836
|
style="background-color: ${this.expanded ? "var(--axebow-white)" : "var(--axebow-base)"};"
|
|
13746
13837
|
>
|
|
13747
|
-
<span class="text-base">${this.
|
|
13838
|
+
<span class="text-base">${this.callToActions.length}</span>
|
|
13748
13839
|
</div>
|
|
13749
13840
|
</div>
|
|
13750
13841
|
|
|
@@ -13757,7 +13848,7 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13757
13848
|
<axebow-icon iconName="undo" iconColor="var(--axebow-gray)" size="md"></axebow-icon>
|
|
13758
13849
|
</div>
|
|
13759
13850
|
<div
|
|
13760
|
-
class="w-5 h-5 shrink-0 flex items-center justify-center cursor-pointer"
|
|
13851
|
+
class="w-5 h-5 shrink-0 flex items-center justify-center ${hasCallToActions ? "cursor-pointer" : "cursor-default opacity-50"}"
|
|
13761
13852
|
@click=${() => this._toggle()}
|
|
13762
13853
|
>
|
|
13763
13854
|
<axebow-icon iconName=${chevronIconName} iconColor="var(--axebow-tertiary)" size="md"></axebow-icon>
|
|
@@ -13765,16 +13856,21 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13765
13856
|
</div>
|
|
13766
13857
|
</div>
|
|
13767
13858
|
|
|
13768
|
-
${this.expanded ? html`
|
|
13859
|
+
${this.expanded && hasCallToActions ? html`
|
|
13769
13860
|
<div class="w-full flex flex-col">
|
|
13770
|
-
${this.
|
|
13861
|
+
${groupCallToActionNotifications(this.callToActions).map(({ notification, count }) => html`
|
|
13771
13862
|
<axebow-call-to-action-row
|
|
13772
|
-
criticality=${
|
|
13773
|
-
heading=${
|
|
13774
|
-
badgeLabel=${
|
|
13775
|
-
description=${
|
|
13776
|
-
lowNoteText=${
|
|
13777
|
-
|
|
13863
|
+
criticality=${notification.criticality}
|
|
13864
|
+
heading=${getCtaHeading(notification)}
|
|
13865
|
+
badgeLabel=${getCtaBadgeLabel(notification)}
|
|
13866
|
+
description=${getCtaDescription(notification)}
|
|
13867
|
+
lowNoteText=${DEFAULT_LOW_NOTE_TEXT}
|
|
13868
|
+
count=${count}
|
|
13869
|
+
.buttons=${buildCtaButtons(notification, (detail) => this.dispatchEvent(new CustomEvent("cta-action", {
|
|
13870
|
+
detail,
|
|
13871
|
+
bubbles: true,
|
|
13872
|
+
composed: true
|
|
13873
|
+
})))}
|
|
13778
13874
|
></axebow-call-to-action-row>
|
|
13779
13875
|
`)}
|
|
13780
13876
|
</div>
|
|
@@ -13783,7 +13879,7 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13783
13879
|
`;
|
|
13784
13880
|
}
|
|
13785
13881
|
};
|
|
13786
|
-
__decorate([property({ type: Array })], AxebowCallToActionFeature.prototype, "
|
|
13882
|
+
__decorate([property({ type: Array })], AxebowCallToActionFeature.prototype, "callToActions", void 0);
|
|
13787
13883
|
__decorate([property({ type: String })], AxebowCallToActionFeature.prototype, "actionNeededLabel", void 0);
|
|
13788
13884
|
__decorate([property({ type: String })], AxebowCallToActionFeature.prototype, "lastUpdatedText", void 0);
|
|
13789
13885
|
__decorate([state()], AxebowCallToActionFeature.prototype, "expanded", void 0);
|
|
@@ -13816,23 +13912,31 @@ var AxebowCtaDialog = class AxebowCtaDialog extends LitElement {
|
|
|
13816
13912
|
width="76.25rem"
|
|
13817
13913
|
maxWidth="100%"
|
|
13818
13914
|
height="auto"
|
|
13915
|
+
closeIconName="cancel"
|
|
13916
|
+
closeIconColor="#8A94AE"
|
|
13917
|
+
closeButtonSize="1.5rem"
|
|
13819
13918
|
@close=${() => this._handleClose()}
|
|
13820
13919
|
>
|
|
13821
13920
|
<div class="flex flex-col gap-2 p-6">
|
|
13822
|
-
${this.notifications.map((notification) => html`
|
|
13921
|
+
${groupCallToActionNotifications(this.notifications).map(({ notification, count }) => html`
|
|
13823
13922
|
<axebow-call-to-action-row
|
|
13824
|
-
criticality=${
|
|
13825
|
-
heading=${
|
|
13826
|
-
badgeLabel=${
|
|
13827
|
-
description=${
|
|
13828
|
-
lowNoteText=${
|
|
13829
|
-
|
|
13923
|
+
criticality=${notification.criticality}
|
|
13924
|
+
heading=${getCtaHeading(notification)}
|
|
13925
|
+
badgeLabel=${getCtaBadgeLabel(notification)}
|
|
13926
|
+
description=${getCtaDescription(notification)}
|
|
13927
|
+
lowNoteText=${DEFAULT_LOW_NOTE_TEXT}
|
|
13928
|
+
count=${count}
|
|
13929
|
+
.buttons=${buildCtaButtons(notification, (detail) => this.dispatchEvent(new CustomEvent("cta-action", {
|
|
13930
|
+
detail,
|
|
13931
|
+
bubbles: true,
|
|
13932
|
+
composed: true
|
|
13933
|
+
})))}
|
|
13830
13934
|
></axebow-call-to-action-row>
|
|
13831
13935
|
`)}
|
|
13832
13936
|
</div>
|
|
13833
13937
|
|
|
13834
13938
|
<div slot="footer" class="flex items-center justify-end p-4">
|
|
13835
|
-
<axebow-button variant="primary" @click=${() => this._handleClose()}>${this.goBackLabel}</axebow-button>
|
|
13939
|
+
<axebow-button variant="primary" outline @click=${() => this._handleClose()}>${this.goBackLabel}</axebow-button>
|
|
13836
13940
|
</div>
|
|
13837
13941
|
</axebow-modal>
|
|
13838
13942
|
`;
|
|
@@ -13848,6 +13952,6 @@ __decorate([property({ type: Array })], AxebowCtaDialog.prototype, "notification
|
|
|
13848
13952
|
__decorate([property({ attribute: false })], AxebowCtaDialog.prototype, "onClose", void 0);
|
|
13849
13953
|
AxebowCtaDialog = __decorate([customElement("axebow-cta-dialog")], AxebowCtaDialog);
|
|
13850
13954
|
//#endregion
|
|
13851
|
-
export { AxebowActionsFooter, AxebowAdjustmentResourcesCounter, AxebowAlert, AxebowBadge, AxebowBanner, AxebowBaseCard, AxebowBoxSection, AxebowBreadcrumbHeader, AxebowButton, AxebowCallToActionFeature, AxebowCallToActionRow, AxebowCardActionBanner, AxebowCardAttentionBanner, AxebowCardCloudLogo, AxebowCardFilter, AxebowCardFilterItem, AxebowCardFooter, AxebowCardHeader, AxebowCardResourceRow, AxebowCardResourceTable, AxebowCardSpecialLink, AxebowCardStatItem, AxebowCardStatsRow, AxebowCardStatus, AxebowCardTableHeader, AxebowCardVersionSelector, AxebowCarouselInput, AxebowCarouselSelectorItem, AxebowCarouselSelectorTenant, AxebowChannelConfigPanel, AxebowCheckboxInput, AxebowCollaboratorsDialog, AxebowCopyBox, AxebowCtaDialog, AxebowDeployCard, AxebowDeploySummary, AxebowDialog, AxebowDivider, AxebowDragDropUploadFile, AxebowDraggableService, AxebowEmptyState, AxebowExpandableCard, AxebowExpandableHeader, AxebowFilterBar, AxebowFooter, AxebowFormPanelField, AxebowGettingStartedCard, AxebowGraph, AxebowHeader, AxebowHelpBubble, AxebowIcon, AxebowInfrastructureCard, AxebowInput, AxebowInputBase, AxebowInstancesTable, AxebowLimitsCounter, AxebowManageHyperlinks, AxebowMarketplaceCard, AxebowModal, AxebowModalsConfirmation, AxebowMoreActions, AxebowNumberCard, AxebowNumbersSection, AxebowNumericInput, AxebowObservabilityContainer, AxebowPill, AxebowPlanSelectField, AxebowProgressBar, AxebowProvidersInput, AxebowQuickTipButton, AxebowQuickTipSection, AxebowRefreshPeriodPanel, AxebowRegistrySelector, AxebowResourceBar, AxebowResourceBoxForm, AxebowResourceCard, AxebowResourceLimitInput, AxebowResourceLimitsPanel, AxebowResourcesCounter, AxebowRoleCard, AxebowRoleContainerDropdown, AxebowRoleTooltip, AxebowRuntimeZipDialog, AxebowSearch, AxebowSearchBarFilters, AxebowSelectInput, AxebowSelectInputWithDivider, AxebowSelectorCard, AxebowSelectorSlider, AxebowServiceDetailHeader, AxebowServicesPanel, AxebowSidebar, AxebowStatus, AxebowStepHeader, AxebowSummaryCard, AxebowSummaryFlavors, AxebowSummaryKeyValue, AxebowSummaryLimits, AxebowSummaryStep, AxebowSummaryStepHeader, AxebowSwitch, AxebowSwitchInput, AxebowTabSelector, AxebowTabsSubmenu, AxebowTagsInput, AxebowTenantCard, AxebowTenantResourceTable, AxebowTenantsTable, AxebowTextInput, AxebowTimeRangePanel, AxebowTooltip, AxebowUndeployCard, AxebowUnderlineTabSelector, AxebowUsageTooltip, CRITICALITY_STYLES, CustomHomePageBody, DEFAULT_ADD_DIALOG_LABELS, DeployModalComponent, DeployModalFooter, DeployModalHeader, DeployPageBody, STATUS_COLORS, TableChart, axebowTheme, buildAddButton, buildExternalNodeContent, buildMainNodeContent, createElement, createIcon };
|
|
13955
|
+
export { AxebowActionsFooter, AxebowAdjustmentResourcesCounter, AxebowAlert, AxebowBadge, AxebowBanner, AxebowBaseCard, AxebowBoxSection, AxebowBreadcrumbHeader, AxebowButton, AxebowCallToActionFeature, AxebowCallToActionRow, AxebowCardActionBanner, AxebowCardAttentionBanner, AxebowCardCloudLogo, AxebowCardFilter, AxebowCardFilterItem, AxebowCardFooter, AxebowCardHeader, AxebowCardResourceRow, AxebowCardResourceTable, AxebowCardSpecialLink, AxebowCardStatItem, AxebowCardStatsRow, AxebowCardStatus, AxebowCardTableHeader, AxebowCardVersionSelector, AxebowCarouselInput, AxebowCarouselSelectorItem, AxebowCarouselSelectorTenant, AxebowChannelConfigPanel, AxebowCheckboxInput, AxebowCollaboratorsDialog, AxebowCopyBox, AxebowCtaDialog, AxebowDeployCard, AxebowDeploySummary, AxebowDialog, AxebowDivider, AxebowDragDropUploadFile, AxebowDraggableService, AxebowEmptyState, AxebowExpandableCard, AxebowExpandableHeader, AxebowFilterBar, AxebowFooter, AxebowFormPanelField, AxebowGettingStartedCard, AxebowGraph, AxebowHeader, AxebowHelpBubble, AxebowIcon, AxebowInfrastructureCard, AxebowInput, AxebowInputBase, AxebowInstancesTable, AxebowLimitsCounter, AxebowManageHyperlinks, AxebowMarketplaceCard, AxebowModal, AxebowModalsConfirmation, AxebowMoreActions, AxebowNumberCard, AxebowNumbersSection, AxebowNumericInput, AxebowObservabilityContainer, AxebowPill, AxebowPlanSelectField, AxebowProgressBar, AxebowProvidersInput, AxebowQuickTipButton, AxebowQuickTipSection, AxebowRefreshPeriodPanel, AxebowRegistrySelector, AxebowResourceBar, AxebowResourceBoxForm, AxebowResourceCard, AxebowResourceLimitInput, AxebowResourceLimitsPanel, AxebowResourcesCounter, AxebowRoleCard, AxebowRoleContainerDropdown, AxebowRoleTooltip, AxebowRuntimeZipDialog, AxebowSearch, AxebowSearchBarFilters, AxebowSelectInput, AxebowSelectInputWithDivider, AxebowSelectorCard, AxebowSelectorSlider, AxebowServiceDetailHeader, AxebowServicesPanel, AxebowSidebar, AxebowStatus, AxebowStepHeader, AxebowSummaryCard, AxebowSummaryFlavors, AxebowSummaryKeyValue, AxebowSummaryLimits, AxebowSummaryStep, AxebowSummaryStepHeader, AxebowSwitch, AxebowSwitchInput, AxebowTabSelector, AxebowTabsSubmenu, AxebowTagsInput, AxebowTenantCard, AxebowTenantResourceTable, AxebowTenantsTable, AxebowTextInput, AxebowTimeRangePanel, AxebowTooltip, AxebowUndeployCard, AxebowUnderlineTabSelector, AxebowUsageTooltip, CRITICALITY_STYLES, CustomHomePageBody, DEFAULT_ADD_DIALOG_LABELS, DEFAULT_LOW_NOTE_TEXT, DeployModalComponent, DeployModalFooter, DeployModalHeader, DeployPageBody, STATUS_COLORS, TableChart, axebowTheme, buildAddButton, buildCtaButtons, buildExternalNodeContent, buildMainNodeContent, createElement, createIcon, getCtaBadgeLabel, getCtaDescription, getCtaHeading, getHighestCriticality, groupCallToActionNotifications };
|
|
13852
13956
|
|
|
13853
13957
|
//# sourceMappingURL=index.js.map
|