@everymatrix/casino-engagement-suite-progress-bar 1.39.3 → 1.41.0

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.
@@ -1 +1 @@
1
- import{p as e,b as i}from"./p-212ac068.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-1a9eaff2",[[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}]]]],e)));
1
+ import{p as e,b as i}from"./p-212ac068.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-319a5f2e",[[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],indeterminate:[4],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}]]]],e)));
@@ -0,0 +1 @@
1
+ import{r,h as e,g as s}from"./p-212ac068.js";const t=class{constructor(e){r(this,e),this.value=0,this.disabled=!1,this.hidePercent=!1,this.indeterminate=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let r=document.createElement("style");r.innerHTML=this.clientStyling,this.host.prepend(r)},this.setClientStylingURL=()=>{let r=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(r.href).then((r=>r.text())).then((r=>{e.innerHTML=r,setTimeout((()=>{this.host.prepend(e)}),1)})).catch((r=>{console.log("Error ",r)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getProgressBarClasses(){return{ProgressBar:!0,Completed:100===this.value,Disabled:this.disabled,HidePercent:this.hidePercent||this.indeterminate}}getProgressBarLineTemplate(){return e("div",this.indeterminate?{class:"ProgressBarLine Indeterminate",part:"ProgressBarLine Indeterminate"}:{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})}render(){return e("div",{class:this.getProgressBarClasses(),part:"ProgressBar"},e("div",{class:"ProgressBarInfo",part:"ProgressBarInfo"},e("slot",{name:"Title"},e("div",null)),e("slot",{name:"Percent"},e("div",{class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),e("div",{class:"ProgressBarBackground",part:"ProgressBarBackground"},this.getProgressBarLineTemplate()))}get host(){return s(this)}};t.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";export{t as casino_engagement_suite_progress_bar}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-7f32df08.js');
6
6
 
7
- const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
7
+ const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
8
8
 
9
9
  const CasinoEngagementSuiteProgressBar = class {
10
10
  constructor(hostRef) {
@@ -21,6 +21,10 @@ const CasinoEngagementSuiteProgressBar = class {
21
21
  * Hide percent value
22
22
  */
23
23
  this.hidePercent = false;
24
+ /**
25
+ * Constantly animates
26
+ */
27
+ this.indeterminate = false;
24
28
  /**
25
29
  * Client custom styling via string
26
30
  */
@@ -63,11 +67,19 @@ const CasinoEngagementSuiteProgressBar = class {
63
67
  ProgressBar: true,
64
68
  Completed: this.value === 100,
65
69
  Disabled: this.disabled,
66
- HidePercent: this.hidePercent
70
+ HidePercent: this.hidePercent || this.indeterminate
67
71
  };
68
72
  }
73
+ getProgressBarLineTemplate() {
74
+ if (this.indeterminate) {
75
+ return index.h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
76
+ }
77
+ else {
78
+ return index.h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
79
+ }
80
+ }
69
81
  render() {
70
- return index.h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, index.h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, index.h("slot", { name: "Title" }, index.h("div", null)), index.h("slot", { name: "Percent" }, index.h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), index.h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, index.h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } })));
82
+ return index.h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, index.h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, index.h("slot", { name: "Title" }, index.h("div", null)), index.h("slot", { name: "Percent" }, index.h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), index.h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
71
83
  }
72
84
  get host() { return index.getElement(this); }
73
85
  };
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["casino-engagement-suite-progress-bar.cjs",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
18
+ return index.bootstrapLazy([["casino-engagement-suite-progress-bar.cjs",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
19
19
  });
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["casino-engagement-suite-progress-bar.cjs",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
17
+ return index.bootstrapLazy([["casino-engagement-suite-progress-bar.cjs",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -8,11 +8,26 @@
8
8
  line-height: 14px;
9
9
  }
10
10
 
11
+ @keyframes indeterminate {
12
+ 0% {
13
+ left: -200%;
14
+ right: 100%;
15
+ }
16
+ 60% {
17
+ left: 110%;
18
+ right: -10%;
19
+ }
20
+ to {
21
+ left: 110%;
22
+ right: -10%;
23
+ }
24
+ }
11
25
  .ProgressBarBackground {
12
26
  height: 8px;
13
27
  background-color: var(--emw--color-background, #666178);
14
28
  border-radius: 4px;
15
29
  position: relative;
30
+ overflow: hidden;
16
31
  }
17
32
 
18
33
  .ProgressBarLine {
@@ -24,6 +39,9 @@
24
39
  background: linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);
25
40
  transition: width ease-out 0.3s;
26
41
  }
42
+ .ProgressBarLine.Indeterminate {
43
+ animation: indeterminate 1s linear infinite;
44
+ }
27
45
 
28
46
  .ProgressBarInfo {
29
47
  margin-bottom: 8px;
@@ -13,6 +13,10 @@ export class CasinoEngagementSuiteProgressBar {
13
13
  * Hide percent value
14
14
  */
15
15
  this.hidePercent = false;
16
+ /**
17
+ * Constantly animates
18
+ */
19
+ this.indeterminate = false;
16
20
  /**
17
21
  * Client custom styling via string
18
22
  */
@@ -55,9 +59,17 @@ export class CasinoEngagementSuiteProgressBar {
55
59
  ProgressBar: true,
56
60
  Completed: this.value === 100,
57
61
  Disabled: this.disabled,
58
- HidePercent: this.hidePercent
62
+ HidePercent: this.hidePercent || this.indeterminate
59
63
  };
60
64
  }
65
+ getProgressBarLineTemplate() {
66
+ if (this.indeterminate) {
67
+ return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
68
+ }
69
+ else {
70
+ return h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
71
+ }
72
+ }
61
73
  render() {
62
74
  return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" },
63
75
  h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" },
@@ -67,8 +79,7 @@ export class CasinoEngagementSuiteProgressBar {
67
79
  h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" },
68
80
  this.value,
69
81
  "%"))),
70
- h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" },
71
- h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } })));
82
+ h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
72
83
  }
73
84
  static get is() { return "casino-engagement-suite-progress-bar"; }
74
85
  static get encapsulation() { return "shadow"; }
@@ -133,6 +144,24 @@ export class CasinoEngagementSuiteProgressBar {
133
144
  "reflect": false,
134
145
  "defaultValue": "false"
135
146
  },
147
+ "indeterminate": {
148
+ "type": "boolean",
149
+ "mutable": false,
150
+ "complexType": {
151
+ "original": "boolean",
152
+ "resolved": "boolean",
153
+ "references": {}
154
+ },
155
+ "required": false,
156
+ "optional": false,
157
+ "docs": {
158
+ "tags": [],
159
+ "text": "Constantly animates"
160
+ },
161
+ "attribute": "indeterminate",
162
+ "reflect": false,
163
+ "defaultValue": "false"
164
+ },
136
165
  "clientStyling": {
137
166
  "type": "string",
138
167
  "mutable": false,
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
 
3
- const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
3
+ const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
4
4
 
5
5
  const CasinoEngagementSuiteProgressBar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
6
  constructor() {
@@ -19,6 +19,10 @@ const CasinoEngagementSuiteProgressBar$1 = /*@__PURE__*/ proxyCustomElement(clas
19
19
  * Hide percent value
20
20
  */
21
21
  this.hidePercent = false;
22
+ /**
23
+ * Constantly animates
24
+ */
25
+ this.indeterminate = false;
22
26
  /**
23
27
  * Client custom styling via string
24
28
  */
@@ -61,11 +65,19 @@ const CasinoEngagementSuiteProgressBar$1 = /*@__PURE__*/ proxyCustomElement(clas
61
65
  ProgressBar: true,
62
66
  Completed: this.value === 100,
63
67
  Disabled: this.disabled,
64
- HidePercent: this.hidePercent
68
+ HidePercent: this.hidePercent || this.indeterminate
65
69
  };
66
70
  }
71
+ getProgressBarLineTemplate() {
72
+ if (this.indeterminate) {
73
+ return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
74
+ }
75
+ else {
76
+ return h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
77
+ }
78
+ }
67
79
  render() {
68
- return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } })));
80
+ return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
69
81
  }
70
82
  get host() { return this; }
71
83
  static get style() { return casinoEngagementSuiteProgressBarCss; }
@@ -73,6 +85,7 @@ const CasinoEngagementSuiteProgressBar$1 = /*@__PURE__*/ proxyCustomElement(clas
73
85
  "value": [2],
74
86
  "disabled": [4],
75
87
  "hidePercent": [4, "hide-percent"],
88
+ "indeterminate": [4],
76
89
  "clientStyling": [513, "client-styling"],
77
90
  "clientStylingUrl": [513, "client-styling-url"],
78
91
  "limitStylingAppends": [32]
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-5b84ef46.js';
2
2
 
3
- const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
3
+ const casinoEngagementSuiteProgressBarCss = ":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";
4
4
 
5
5
  const CasinoEngagementSuiteProgressBar = class {
6
6
  constructor(hostRef) {
@@ -17,6 +17,10 @@ const CasinoEngagementSuiteProgressBar = class {
17
17
  * Hide percent value
18
18
  */
19
19
  this.hidePercent = false;
20
+ /**
21
+ * Constantly animates
22
+ */
23
+ this.indeterminate = false;
20
24
  /**
21
25
  * Client custom styling via string
22
26
  */
@@ -59,11 +63,19 @@ const CasinoEngagementSuiteProgressBar = class {
59
63
  ProgressBar: true,
60
64
  Completed: this.value === 100,
61
65
  Disabled: this.disabled,
62
- HidePercent: this.hidePercent
66
+ HidePercent: this.hidePercent || this.indeterminate
63
67
  };
64
68
  }
69
+ getProgressBarLineTemplate() {
70
+ if (this.indeterminate) {
71
+ return h("div", { class: "ProgressBarLine Indeterminate", part: "ProgressBarLine Indeterminate" });
72
+ }
73
+ else {
74
+ return h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } });
75
+ }
76
+ }
65
77
  render() {
66
- return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, h("div", { class: "ProgressBarLine", part: "ProgressBarLine", style: { width: this.value + '%' } })));
78
+ return h("div", { class: this.getProgressBarClasses(), part: "ProgressBar" }, h("div", { class: "ProgressBarInfo", part: "ProgressBarInfo" }, h("slot", { name: "Title" }, h("div", null)), h("slot", { name: "Percent" }, h("div", { class: "ProgressBarPercent", part: "ProgressBarPercent" }, this.value, "%"))), h("div", { class: "ProgressBarBackground", part: "ProgressBarBackground" }, this.getProgressBarLineTemplate()));
67
79
  }
68
80
  get host() { return getElement(this); }
69
81
  };
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["casino-engagement-suite-progress-bar",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
16
+ return bootstrapLazy([["casino-engagement-suite-progress-bar",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
17
17
  });
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["casino-engagement-suite-progress-bar",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
13
+ return bootstrapLazy([["casino-engagement-suite-progress-bar",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -11,6 +11,10 @@ export declare class CasinoEngagementSuiteProgressBar {
11
11
  * Hide percent value
12
12
  */
13
13
  hidePercent: boolean;
14
+ /**
15
+ * Constantly animates
16
+ */
17
+ indeterminate: boolean;
14
18
  /**
15
19
  * Client custom styling via string
16
20
  */
@@ -30,5 +34,6 @@ export declare class CasinoEngagementSuiteProgressBar {
30
34
  Disabled: boolean;
31
35
  HidePercent: boolean;
32
36
  };
37
+ getProgressBarLineTemplate(): any;
33
38
  render(): any;
34
39
  }
@@ -23,6 +23,10 @@ export namespace Components {
23
23
  * Hide percent value
24
24
  */
25
25
  "hidePercent": boolean;
26
+ /**
27
+ * Constantly animates
28
+ */
29
+ "indeterminate": boolean;
26
30
  /**
27
31
  * Value for the widget
28
32
  */
@@ -58,6 +62,10 @@ declare namespace LocalJSX {
58
62
  * Hide percent value
59
63
  */
60
64
  "hidePercent"?: boolean;
65
+ /**
66
+ * Constantly animates
67
+ */
68
+ "indeterminate"?: boolean;
61
69
  /**
62
70
  * Value for the widget
63
71
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-engagement-suite-progress-bar",
3
- "version": "1.39.3",
3
+ "version": "1.41.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r,h as e,g as s}from"./p-212ac068.js";const t=class{constructor(e){r(this,e),this.value=0,this.disabled=!1,this.hidePercent=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let r=document.createElement("style");r.innerHTML=this.clientStyling,this.host.prepend(r)},this.setClientStylingURL=()=>{let r=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(r.href).then((r=>r.text())).then((r=>{e.innerHTML=r,setTimeout((()=>{this.host.prepend(e)}),1)})).catch((r=>{console.log("Error ",r)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getProgressBarClasses(){return{ProgressBar:!0,Completed:100===this.value,Disabled:this.disabled,HidePercent:this.hidePercent}}render(){return e("div",{class:this.getProgressBarClasses(),part:"ProgressBar"},e("div",{class:"ProgressBarInfo",part:"ProgressBarInfo"},e("slot",{name:"Title"},e("div",null)),e("slot",{name:"Percent"},e("div",{class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),e("div",{class:"ProgressBarBackground",part:"ProgressBarBackground"},e("div",{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})))}get host(){return s(this)}};t.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";export{t as casino_engagement_suite_progress_bar}