@genesislcap/foundation-ui 14.401.3-hide-status-pill.3 → 14.401.3

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.
@@ -122,20 +122,10 @@ export declare class StatusPill extends FoundationElement {
122
122
  * ```
123
123
  */
124
124
  dateCountdownUnit: CountdownUnit;
125
- /**
126
- * @attr hide-when-countdown-completed - if true, the status pill will be removed
127
- * from the template once the countdown has expired.
128
- */
129
- hideWhenCountdownCompleted: boolean;
130
125
  /**
131
126
  * @internal
132
127
  */
133
128
  countdown: string;
134
- /**
135
- * @internal
136
- * Tracks whether the countdown has reached or passed its target.
137
- */
138
- isCountdownExpired: boolean;
139
129
  private dateInterval;
140
130
  /**
141
131
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"status-pill.d.ts","sourceRoot":"","sources":["../../../src/status-pill/status-pill.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAU/D;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,mBAAmB,MAAM,EACzB,UAAS,aAAwB,KAChC,MAoCF,CAAC;AAEF;;GAEG;AACH,qBAAa,UAAW,SAAQ,iBAAiB;IAC/C;;;;;;;;OAQG;IACsC,eAAe,EAAE,MAAM,CAAC;IAEjE;;;;;;;;OAQG;IAC+B,QAAQ,EAAE,MAAM,CAAC;IAEnD;;;;;;;;OAQG;IAC8B,OAAO,EAAE,MAAM,CAAC;IAEjD;;;;;;;;OAQG;IACkC,WAAW,EAAE,MAAM,CAAC;IAEzD;;;;;;;;OAQG;IACmD,0BAA0B,EAAE,MAAM,CAAC;IAEzF;;;;;;;;OAQG;IAC+B,QAAQ,EAAE,MAAM,CAAQ;IAE1D;;;;;;;;OAQG;IACgC,SAAS,EAAE,MAAM,CAAC;IAErD;;;;;;;;O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;;;;;;;OAQG;IAC+B,QAAQ,EAAE,MAAM,CAAQ;IAE1D;;;;;;;;OAQG;IACgC,SAAS,EAAE,MAAM,CAAC;IAErD;;;;;;;;OAQG;IACG,IAAI,EAAE,MAAM,CAAC;IAEnB;;;;;;;;OAQG;IACoC,aAAa,EAAE,MAAM,CAAC;IAE7D;;;;;;;;OAQG;IACsD,6BAA6B,EAAE,MAAM,CAClF;IAEZ;;;;;;;;OAQG;IACyC,iBAAiB,EAAE,aAAa,CAAY;IAExF;;OAEG;IACS,SAAS,EAAE,MAAM,CAAC;IAE9B,OAAO,CAAC,YAAY,CAAC;IAErB;;OAEG;IACH,oBAAoB,CAAC,QAAQ,KAAA,EAAE,QAAQ,KAAA;IAWvC,oBAAoB;IAKpB,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,mBAAmB;CAO5B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;qBAI/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"status-pill.template.d.ts","sourceRoot":"","sources":["../../../src/status-pill/status-pill.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAiDhD,eAAO,MAAM,4BAA4B,iEAExC,CAAC"}
1
+ {"version":3,"file":"status-pill.template.d.ts","sourceRoot":"","sources":["../../../src/status-pill/status-pill.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA4ChD,eAAO,MAAM,4BAA4B,iEAExC,CAAC"}
@@ -85,16 +85,6 @@ export class StatusPill extends FoundationElement {
85
85
  * ```
86
86
  */
87
87
  this.dateCountdownUnit = 'second';
88
- /**
89
- * @attr hide-when-countdown-completed - if true, the status pill will be removed
90
- * from the template once the countdown has expired.
91
- */
92
- this.hideWhenCountdownCompleted = false;
93
- /**
94
- * @internal
95
- * Tracks whether the countdown has reached or passed its target.
96
- */
97
- this.isCountdownExpired = false;
98
88
  }
99
89
  /**
100
90
  * @internal
@@ -105,7 +95,6 @@ export class StatusPill extends FoundationElement {
105
95
  this.clearCountdownTimer();
106
96
  return;
107
97
  }
108
- this.isCountdownExpired = false;
109
98
  this.setUpDateCountdown(newValue);
110
99
  }
111
100
  }
@@ -129,14 +118,8 @@ export class StatusPill extends FoundationElement {
129
118
  const now = new Date().getTime();
130
119
  const diff = Math.floor(targetDate.getTime() - now);
131
120
  if (diff <= 0) {
132
- if (this.hideWhenCountdownCompleted) {
133
- this.isCountdownExpired = true;
134
- this.clearCountdownTimer();
135
- }
136
- else {
137
- this.countdown = this.dateCountdownCompletedMessage;
138
- clearInterval(this.dateInterval);
139
- }
121
+ this.countdown = this.dateCountdownCompletedMessage;
122
+ clearInterval(this.dateInterval);
140
123
  }
141
124
  else {
142
125
  this.countdown = formatTimeForCountDown(diff, this.dateCountdownUnit);
@@ -146,8 +129,8 @@ export class StatusPill extends FoundationElement {
146
129
  if (this.dateInterval) {
147
130
  clearInterval(this.dateInterval);
148
131
  this.dateInterval = null;
132
+ this.countdown = null;
149
133
  }
150
- this.countdown = null;
151
134
  }
152
135
  }
153
136
  __decorate([
@@ -183,15 +166,9 @@ __decorate([
183
166
  __decorate([
184
167
  attr({ attribute: 'date-countdown-unit' })
185
168
  ], StatusPill.prototype, "dateCountdownUnit", void 0);
186
- __decorate([
187
- attr({ mode: 'boolean', attribute: 'hide-when-countdown-completed' })
188
- ], StatusPill.prototype, "hideWhenCountdownCompleted", void 0);
189
169
  __decorate([
190
170
  observable
191
171
  ], StatusPill.prototype, "countdown", void 0);
192
- __decorate([
193
- observable
194
- ], StatusPill.prototype, "isCountdownExpired", void 0);
195
172
  /**
196
173
  * The Foundation Status Pill
197
174
  *
@@ -1,34 +1,32 @@
1
1
  import { html, when } from '@microsoft/fast-element';
2
2
  import { getPrefix } from '../utils';
3
3
  const getPrefixedStatusPillTemplate = (prefix) => html `
4
- ${when((x) => !(x.hideWhenCountdownCompleted && x.isCountdownExpired), html `
5
- <div
6
- data-test-id="status-pill"
7
- part="status-pill"
8
- class="status-pill"
9
- style="color: ${(x) => x.textColor || ''}; background: ${(x) => x.backgroundColor || ''};"
10
- >
11
- ${when((x) => x.iconName, html `
12
- <${prefix}-icon name="${(x) => x.iconName}" size="${(x) => x.iconSize}"></${prefix}-icon>
13
- `)}
14
- ${when((x) => x.iconSrc, html `
15
- <img alt="${(x) => x.iconSrc}" class="status-pill-image" src="${(x) => x.iconSrc}" />
16
- `)}
17
- ${when((x) => x.iconInitial, html `
18
- <div
19
- data-test-id="status-pill-initial"
20
- class="status-pill-initial"
21
- style="color:${(x) => x.textColor}; background-color: ${(x) => x.iconInitialBackgroundColor}"
22
- >
23
- ${(x) => x.iconInitial.substring(0, 1)}
24
- </div>
25
- `)}
26
- <span data-test-id="status-pill-text">${(x) => x.text}</span>
27
- ${when((x) => x.countdown, html `
28
- <span data-test-id="status-pill-countdown">${(x) => x.countdown}</span>
29
- `)}
30
- </div>
31
- `)}
4
+ <div
5
+ data-test-id="status-pill"
6
+ part="status-pill"
7
+ class="status-pill"
8
+ style="color: ${(x) => x.textColor || ''}; background: ${(x) => x.backgroundColor || ''};"
9
+ >
10
+ ${when((x) => x.iconName, html `
11
+ <${prefix}-icon name="${(x) => x.iconName}" size="${(x) => x.iconSize}"></${prefix}-icon>
12
+ `)}
13
+ ${when((x) => x.iconSrc, html `
14
+ <img alt="${(x) => x.iconSrc}" class="status-pill-image" src="${(x) => x.iconSrc}" />
15
+ `)}
16
+ ${when((x) => x.iconInitial, html `
17
+ <div
18
+ data-test-id="status-pill-initial"
19
+ class="status-pill-initial"
20
+ style="color:${(x) => x.textColor}; background-color: ${(x) => x.iconInitialBackgroundColor}"
21
+ >
22
+ ${(x) => x.iconInitial.substring(0, 1)}
23
+ </div>
24
+ `)}
25
+ <span data-test-id="status-pill-text">${(x) => x.text}</span>
26
+ ${when((x) => x.countdown, html `
27
+ <span data-test-id="status-pill-countdown">${(x) => x.countdown}</span>
28
+ `)}
29
+ </div>
32
30
  `;
33
31
  export const foundationStatusPillTemplate = html `
34
32
  ${(x) => getPrefixedStatusPillTemplate(getPrefix(x))}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-ui",
3
3
  "description": "Genesis Foundation UI",
4
- "version": "14.401.3-hide-status-pill.3",
4
+ "version": "14.401.3",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -85,13 +85,13 @@
85
85
  }
86
86
  },
87
87
  "devDependencies": {
88
- "@genesislcap/foundation-testing": "14.401.3-hide-status-pill.3",
89
- "@genesislcap/genx": "14.401.3-hide-status-pill.3",
90
- "@genesislcap/rollup-builder": "14.401.3-hide-status-pill.3",
91
- "@genesislcap/ts-builder": "14.401.3-hide-status-pill.3",
92
- "@genesislcap/uvu-playwright-builder": "14.401.3-hide-status-pill.3",
93
- "@genesislcap/vite-builder": "14.401.3-hide-status-pill.3",
94
- "@genesislcap/webpack-builder": "14.401.3-hide-status-pill.3",
88
+ "@genesislcap/foundation-testing": "14.401.3",
89
+ "@genesislcap/genx": "14.401.3",
90
+ "@genesislcap/rollup-builder": "14.401.3",
91
+ "@genesislcap/ts-builder": "14.401.3",
92
+ "@genesislcap/uvu-playwright-builder": "14.401.3",
93
+ "@genesislcap/vite-builder": "14.401.3",
94
+ "@genesislcap/webpack-builder": "14.401.3",
95
95
  "copyfiles": "^2.4.1"
96
96
  },
97
97
  "dependencies": {
@@ -100,16 +100,16 @@
100
100
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
101
101
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
102
102
  "@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
103
- "@genesislcap/expression-builder": "14.401.3-hide-status-pill.3",
104
- "@genesislcap/foundation-ai": "14.401.3-hide-status-pill.3",
105
- "@genesislcap/foundation-comms": "14.401.3-hide-status-pill.3",
106
- "@genesislcap/foundation-criteria": "14.401.3-hide-status-pill.3",
107
- "@genesislcap/foundation-errors": "14.401.3-hide-status-pill.3",
108
- "@genesislcap/foundation-events": "14.401.3-hide-status-pill.3",
109
- "@genesislcap/foundation-logger": "14.401.3-hide-status-pill.3",
110
- "@genesislcap/foundation-notifications": "14.401.3-hide-status-pill.3",
111
- "@genesislcap/foundation-user": "14.401.3-hide-status-pill.3",
112
- "@genesislcap/foundation-utils": "14.401.3-hide-status-pill.3",
103
+ "@genesislcap/expression-builder": "14.401.3",
104
+ "@genesislcap/foundation-ai": "14.401.3",
105
+ "@genesislcap/foundation-comms": "14.401.3",
106
+ "@genesislcap/foundation-criteria": "14.401.3",
107
+ "@genesislcap/foundation-errors": "14.401.3",
108
+ "@genesislcap/foundation-events": "14.401.3",
109
+ "@genesislcap/foundation-logger": "14.401.3",
110
+ "@genesislcap/foundation-notifications": "14.401.3",
111
+ "@genesislcap/foundation-user": "14.401.3",
112
+ "@genesislcap/foundation-utils": "14.401.3",
113
113
  "@microsoft/fast-colors": "5.3.1",
114
114
  "@microsoft/fast-components": "2.30.6",
115
115
  "@microsoft/fast-element": "1.14.0",
@@ -131,5 +131,5 @@
131
131
  "access": "public"
132
132
  },
133
133
  "customElements": "dist/custom-elements.json",
134
- "gitHead": "00d67d0777ef1dc9e87c9c33feb7d3c19c560667"
134
+ "gitHead": "df71592dce2bc8d1e299fecc412bd193ba75c54f"
135
135
  }