@kumori/aurora-wui-components 0.0.281-dev4205.23 → 0.0.281-dev4205.24
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.
|
@@ -7,9 +7,14 @@ export declare class AxebowCallToActionFeature extends LitElement {
|
|
|
7
7
|
noActionsLabel: string;
|
|
8
8
|
lastUpdatedText: string;
|
|
9
9
|
private expanded;
|
|
10
|
+
private refreshing;
|
|
11
|
+
private static readonly REFRESH_DURATION_MS;
|
|
12
|
+
private static readonly REFRESH_SKELETON_ROWS;
|
|
10
13
|
static styles: import('lit').CSSResult[];
|
|
11
14
|
private get _highestCriticality();
|
|
12
15
|
private _toggle;
|
|
16
|
+
private _handleRefresh;
|
|
17
|
+
private _renderSkeletonRow;
|
|
13
18
|
render(): import('lit-html').TemplateResult<1>;
|
|
14
19
|
}
|
|
15
20
|
//# sourceMappingURL=axebow-call-to-action-feature.d.ts.map
|
package/dist/components/axebow-call-to-action-feature/axebow-call-to-action-feature.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axebow-call-to-action-feature.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-call-to-action-feature/axebow-call-to-action-feature.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAwB,MAAM,KAAK,CAAC;AAEvD,OAAO,+BAA+B,CAAC;AAGvC,OAAO,2DAA2D,CAAC;AAUnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6DAA6D,CAAC;AAE5G,YAAY,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,6DAA6D,CAAC;AAE5I,qBACa,yBAA0B,SAAQ,UAAU;IAC5B,aAAa,EAAE,wBAAwB,EAAE,CAAM;IAC9C,iBAAiB,SAAmB;IACpC,cAAc,SAAuB;IACrC,eAAe,SAAM;IAExC,OAAO,CAAC,QAAQ,CAAS;
|
|
1
|
+
{"version":3,"file":"axebow-call-to-action-feature.d.ts","sourceRoot":"","sources":["../../../src/components/axebow-call-to-action-feature/axebow-call-to-action-feature.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAwB,MAAM,KAAK,CAAC;AAEvD,OAAO,+BAA+B,CAAC;AAGvC,OAAO,2DAA2D,CAAC;AAUnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6DAA6D,CAAC;AAE5G,YAAY,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,6DAA6D,CAAC;AAE5I,qBACa,yBAA0B,SAAQ,UAAU;IAC5B,aAAa,EAAE,wBAAwB,EAAE,CAAM;IAC9C,iBAAiB,SAAmB;IACpC,cAAc,SAAuB;IACrC,eAAe,SAAM;IAExC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,UAAU,CAAS;IAEpC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAQ;IACnD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAK;IAElD,MAAM,CAAC,MAAM,4BAuBX;IAEF,OAAO,KAAK,mBAAmB,GAE9B;IAED,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,kBAAkB;IAiB1B,MAAM;CA8EP"}
|
package/dist/index.js
CHANGED
|
@@ -13778,7 +13778,11 @@ function buildCtaButtons(notification, dispatch) {
|
|
|
13778
13778
|
}
|
|
13779
13779
|
//#endregion
|
|
13780
13780
|
//#region src/components/axebow-call-to-action-feature/axebow-call-to-action-feature.ts
|
|
13781
|
+
var _AxebowCallToActionFeature;
|
|
13781
13782
|
var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitElement {
|
|
13783
|
+
static {
|
|
13784
|
+
_AxebowCallToActionFeature = this;
|
|
13785
|
+
}
|
|
13782
13786
|
constructor(..._args) {
|
|
13783
13787
|
super(..._args);
|
|
13784
13788
|
this.callToActions = [];
|
|
@@ -13786,6 +13790,13 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13786
13790
|
this.noActionsLabel = "No action needed!";
|
|
13787
13791
|
this.lastUpdatedText = "";
|
|
13788
13792
|
this.expanded = false;
|
|
13793
|
+
this.refreshing = false;
|
|
13794
|
+
}
|
|
13795
|
+
static {
|
|
13796
|
+
this.REFRESH_DURATION_MS = 2500;
|
|
13797
|
+
}
|
|
13798
|
+
static {
|
|
13799
|
+
this.REFRESH_SKELETON_ROWS = 4;
|
|
13789
13800
|
}
|
|
13790
13801
|
static {
|
|
13791
13802
|
this.styles = [
|
|
@@ -13796,6 +13807,20 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13796
13807
|
display: block;
|
|
13797
13808
|
width: 100%;
|
|
13798
13809
|
}
|
|
13810
|
+
|
|
13811
|
+
@keyframes cta-skeleton-pulse {
|
|
13812
|
+
0%,
|
|
13813
|
+
100% {
|
|
13814
|
+
opacity: 1;
|
|
13815
|
+
}
|
|
13816
|
+
50% {
|
|
13817
|
+
opacity: 0.4;
|
|
13818
|
+
}
|
|
13819
|
+
}
|
|
13820
|
+
|
|
13821
|
+
.cta-skeleton-bar {
|
|
13822
|
+
animation: cta-skeleton-pulse 1.5s ease-in-out infinite;
|
|
13823
|
+
}
|
|
13799
13824
|
`
|
|
13800
13825
|
];
|
|
13801
13826
|
}
|
|
@@ -13806,6 +13831,29 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13806
13831
|
if (this.callToActions.length === 0) return;
|
|
13807
13832
|
this.expanded = !this.expanded;
|
|
13808
13833
|
}
|
|
13834
|
+
_handleRefresh() {
|
|
13835
|
+
if (this.refreshing) return;
|
|
13836
|
+
this.refreshing = true;
|
|
13837
|
+
setTimeout(() => {
|
|
13838
|
+
this.refreshing = false;
|
|
13839
|
+
}, _AxebowCallToActionFeature.REFRESH_DURATION_MS);
|
|
13840
|
+
}
|
|
13841
|
+
_renderSkeletonRow() {
|
|
13842
|
+
return html`
|
|
13843
|
+
<div
|
|
13844
|
+
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"
|
|
13845
|
+
>
|
|
13846
|
+
<div
|
|
13847
|
+
class="cta-skeleton-bar w-10 h-10 rounded-md shrink-0"
|
|
13848
|
+
style="background-color: var(--axebow-base);"
|
|
13849
|
+
></div>
|
|
13850
|
+
<div class="flex-1 min-w-0 flex flex-col gap-2">
|
|
13851
|
+
<div class="cta-skeleton-bar h-4 rounded" style="background-color: var(--axebow-base); width: 40%;"></div>
|
|
13852
|
+
<div class="cta-skeleton-bar h-3 rounded" style="background-color: var(--axebow-base); width: 70%;"></div>
|
|
13853
|
+
</div>
|
|
13854
|
+
</div>
|
|
13855
|
+
`;
|
|
13856
|
+
}
|
|
13809
13857
|
render() {
|
|
13810
13858
|
const { color: criticalityColor, iconName } = CRITICALITY_STYLES[this._highestCriticality];
|
|
13811
13859
|
const chevronIconName = this.expanded ? "keyboard_arrow_down" : "chevron_right";
|
|
@@ -13814,7 +13862,7 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13814
13862
|
<div class="w-full box-border border border-solid border-(--axebow-table-header-border) rounded-lg overflow-hidden flex flex-col">
|
|
13815
13863
|
<div
|
|
13816
13864
|
class="w-full box-border py-3 px-5 flex flex-row items-center justify-between"
|
|
13817
|
-
style="background-color: ${this.expanded ? "var(--axebow-base)" : "var(--axebow-white)"};"
|
|
13865
|
+
style="background-color: ${this.expanded || this.refreshing ? "var(--axebow-base)" : "var(--axebow-white)"};"
|
|
13818
13866
|
>
|
|
13819
13867
|
<div class="flex flex-row items-center gap-2">
|
|
13820
13868
|
${hasCallToActions ? html`<axebow-icon iconName=${iconName} iconColor=${criticalityColor} size="2xl"></axebow-icon>` : ""}
|
|
@@ -13830,8 +13878,9 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13830
13878
|
<div class="flex flex-row items-center gap-3">
|
|
13831
13879
|
<span class="text-sm text-(--axebow-gray) whitespace-nowrap">${this.lastUpdatedText}</span>
|
|
13832
13880
|
<div
|
|
13833
|
-
class="w-7 h-7 shrink-0 rounded-md border border-solid flex items-center justify-center"
|
|
13881
|
+
class="w-7 h-7 shrink-0 rounded-md border border-solid flex items-center justify-center cursor-pointer"
|
|
13834
13882
|
style="border-color: var(--axebow-gray);"
|
|
13883
|
+
@click=${() => this._handleRefresh()}
|
|
13835
13884
|
>
|
|
13836
13885
|
<axebow-icon iconName="refresh" iconColor="var(--axebow-gray)" size="md"></axebow-icon>
|
|
13837
13886
|
</div>
|
|
@@ -13843,7 +13892,12 @@ var AxebowCallToActionFeature = class AxebowCallToActionFeature extends LitEleme
|
|
|
13843
13892
|
</div>
|
|
13844
13893
|
</div>
|
|
13845
13894
|
|
|
13846
|
-
${this.
|
|
13895
|
+
${this.refreshing ? html`
|
|
13896
|
+
<div class="w-full flex flex-col">
|
|
13897
|
+
${Array.from({ length: _AxebowCallToActionFeature.REFRESH_SKELETON_ROWS }, () => this._renderSkeletonRow())}
|
|
13898
|
+
</div>
|
|
13899
|
+
` : ""}
|
|
13900
|
+
${!this.refreshing && this.expanded && hasCallToActions ? html`
|
|
13847
13901
|
<div class="w-full flex flex-col">
|
|
13848
13902
|
${groupCallToActionNotifications(this.callToActions).map(({ notification, count }) => html`
|
|
13849
13903
|
<axebow-call-to-action-row
|
|
@@ -13871,7 +13925,8 @@ __decorate([property({ type: String })], AxebowCallToActionFeature.prototype, "a
|
|
|
13871
13925
|
__decorate([property({ type: String })], AxebowCallToActionFeature.prototype, "noActionsLabel", void 0);
|
|
13872
13926
|
__decorate([property({ type: String })], AxebowCallToActionFeature.prototype, "lastUpdatedText", void 0);
|
|
13873
13927
|
__decorate([state()], AxebowCallToActionFeature.prototype, "expanded", void 0);
|
|
13874
|
-
|
|
13928
|
+
__decorate([state()], AxebowCallToActionFeature.prototype, "refreshing", void 0);
|
|
13929
|
+
AxebowCallToActionFeature = _AxebowCallToActionFeature = __decorate([customElement("axebow-call-to-action-feature")], AxebowCallToActionFeature);
|
|
13875
13930
|
//#endregion
|
|
13876
13931
|
//#region src/components/axebow-cta-dialog/axebow-cta-dialog.ts
|
|
13877
13932
|
var AxebowCtaDialog = class AxebowCtaDialog extends LitElement {
|