@cpelements/plcc-table
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -6,3 +6,3 @@ import PFElement from '../../../@patternfly/pfelement/dist/pfelement.js'; | ||
/*! | ||
* PatternFly Elements: PlccTable 1.0.1 | ||
* PatternFly Elements: PlccTable 1.1.0 | ||
* @license | ||
@@ -33,3 +33,3 @@ * Copyright 2020 Red Hat, Inc. | ||
static get version() { | ||
return "1.0.1"; | ||
return "1.1.0"; | ||
} | ||
@@ -247,3 +247,3 @@ | ||
this._uncategorizedTable = this.shadowRoot.querySelector( | ||
'#product-lifecycle-uncategorized' | ||
"#product-lifecycle-uncategorized" | ||
); | ||
@@ -313,3 +313,3 @@ this._fullSupportBody = this.shadowRoot.querySelector( | ||
} | ||
} | ||
} | ||
} | ||
@@ -353,3 +353,3 @@ | ||
let displayHeaders = []; | ||
if (data.data[0].is_layered_product){ | ||
if (data.data[0].is_layered_product) { | ||
displayHeaders.push(data.data[0].extra_header); | ||
@@ -366,3 +366,3 @@ } | ||
let headers = []; | ||
if (data.data[0].is_layered_product){ | ||
if (data.data[0].is_layered_product) { | ||
headers.push(data.data[0].extra_header); | ||
@@ -424,7 +424,7 @@ } | ||
${ | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: '' | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: "" | ||
} | ||
@@ -435,3 +435,4 @@ ${item.phases | ||
return `<td data-label="${phase.name}">${this._parseDate( | ||
phase.date, phase.date_format | ||
phase.date, | ||
phase.date_format | ||
)}</td>`; | ||
@@ -464,7 +465,7 @@ } else { | ||
${ | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: '' | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: "" | ||
} | ||
@@ -475,3 +476,4 @@ ${item.phases | ||
return `<td data-label="${phase.name}">${this._parseDate( | ||
phase.date, phase.date_format | ||
phase.date, | ||
phase.date_format | ||
)}</td>`; | ||
@@ -504,7 +506,7 @@ } else { | ||
${ | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: '' | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: "" | ||
} | ||
@@ -515,3 +517,4 @@ ${item.phases | ||
return `<td data-label="${phase.name}">${this._parseDate( | ||
phase.date, phase.date_format | ||
phase.date, | ||
phase.date_format | ||
)}</td>`; | ||
@@ -543,7 +546,7 @@ } else { | ||
${ | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: '' | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: "" | ||
} | ||
@@ -554,3 +557,4 @@ ${item.phases | ||
return `<td data-label="${phase.name}">${this._parseDate( | ||
phase.date, phase.date_format | ||
phase.date, | ||
phase.date_format | ||
)}</td>`; | ||
@@ -583,7 +587,7 @@ } else { | ||
${ | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: '' | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: "" | ||
} | ||
@@ -594,3 +598,4 @@ ${item.phases | ||
return `<td data-label="${phase.name}">${this._parseDate( | ||
phase.date, phase.date_format | ||
phase.date, | ||
phase.date_format | ||
)}</td>`; | ||
@@ -615,3 +620,2 @@ } else { | ||
//if version is tagged latest, create row for full support | ||
@@ -625,7 +629,7 @@ if (item.type === "" || item.type === null) { | ||
${ | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: '' | ||
layeredProduct | ||
? item.extra_header_value !== null | ||
? `<td data-label="${data.data[0].extra_header}">${item.extra_header_value}</td>` | ||
: `<td data-label="${data.data[0].extra_header}">N/A</td>` | ||
: "" | ||
} | ||
@@ -636,3 +640,4 @@ ${item.phases | ||
return `<td data-label="${phase.name}">${this._parseDate( | ||
phase.date, phase.date_format | ||
phase.date, | ||
phase.date_format | ||
)}</td>`; | ||
@@ -720,4 +725,3 @@ } else { | ||
_parseDate(date, format) { | ||
if (format === 'string') { | ||
if (format === "string") { | ||
return date; | ||
@@ -732,6 +736,6 @@ } else { | ||
if (val) { | ||
this._endOfLifeTable.setAttribute("hidden", true); | ||
} else { | ||
this._endOfLifeTable.removeAttribute("hidden"); | ||
} | ||
this._endOfLifeTable.setAttribute("hidden", true); | ||
} else { | ||
this._endOfLifeTable.removeAttribute("hidden"); | ||
} | ||
} | ||
@@ -738,0 +742,0 @@ |
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Plcc table", | ||
"description": "To show product lifecycle data", | ||
"type": "object", | ||
"tag": "plcc-table", | ||
"class": "PlccTable", | ||
"category": "component", | ||
"properties": { | ||
"slots": { | ||
"title": "Slots", | ||
"description": "Definition of the supported slots", | ||
"type": "object", | ||
"properties": { | ||
"default": { | ||
"title": "Default slot", | ||
"type": "array", | ||
"namedSlot": false, | ||
"items": { | ||
"oneOf": [{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Plcc table", | ||
"description": "To show product lifecycle data", | ||
"type": "object", | ||
"tag": "plcc-table", | ||
"class": "PlccTable", | ||
"category": "component", | ||
"properties": { | ||
"slots": { | ||
"title": "Slots", | ||
"description": "Definition of the supported slots", | ||
"type": "object", | ||
"properties": { | ||
"default": { | ||
"title": "Default slot", | ||
"type": "array", | ||
"namedSlot": false, | ||
"items": { | ||
"oneOf": [ | ||
{ | ||
"$ref": "raw" | ||
}] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"required": [ "default" ] | ||
} | ||
}, | ||
"attributes": { | ||
"title": "Attributes", | ||
"type": "object", | ||
"properties": { | ||
}, | ||
"required": [] | ||
} | ||
"required": ["default"] | ||
}, | ||
"required": [ "slots", "attributes" ], | ||
"additionalProperties": false | ||
} | ||
"attributes": { | ||
"title": "Attributes", | ||
"type": "object", | ||
"properties": {}, | ||
"required": [] | ||
} | ||
}, | ||
"required": ["slots", "attributes"], | ||
"additionalProperties": false | ||
} |
@@ -1,4 +0,4 @@ | ||
import e from"../../../@patternfly/pfelement/dist/pfelement.min.js";import"../../../@patternfly/pfe-progress-indicator/dist/pfe-progress-indicator.min.js";import"../../../@patternfly/pfe-datetime/dist/pfe-datetime.min.js"; | ||
import e from"../../../@patternfly/pfelement/dist/pfelement.js";import"../../../@patternfly/pfe-progress-indicator/dist/pfe-progress-indicator.js";import"../../../@patternfly/pfe-datetime/dist/pfe-datetime.js"; | ||
/*! | ||
* PatternFly Elements: PlccTable 1.0.1 | ||
* PatternFly Elements: PlccTable 1.1.0 | ||
* @license | ||
@@ -25,3 +25,3 @@ * Copyright 2020 Red Hat, Inc. | ||
* | ||
*/class t extends e{static get version(){return"1.0.1"}get html(){return'<style>.product-lifecycle-info__table thead,.sr-only{position:absolute;overflow:hidden;clip:rect(0,0,0,0);height:1px;width:1px;margin:-1px;padding:0;border:0}:host{display:block}:host([hidden]){display:none}:host([loading]) article{display:none}article{display:block;font-size:16px;line-height:1.5;color:#151515}#loading{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;min-height:100px}#loading.loading{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.u-no-break{white-space:nowrap}*{-webkit-box-sizing:border-box;box-sizing:border-box}.icon-close{position:relative;width:1.5em;height:1.5em;margin:0;padding:0;border:0;font-size:2rem;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.icon-close__inner1{position:absolute;top:50%;left:50%;width:0;height:0;font-size:4rem;-webkit-transform:translate(-50%,-50%) scale(.125);transform:translate(-50%,-50%) scale(.125)}.icon-close__inner1:after,.icon-close__inner1:before{content:"";position:absolute;top:0;left:0;display:block;width:.3em;height:2em;background:#000}.icon-close:focus .icon-close__inner1:after,.icon-close:focus .icon-close__inner1:before,.icon-close:hover .icon-close__inner1:after,.icon-close:hover .icon-close__inner1:before{background:#06c}.icon-close__inner1:before{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.icon-close__inner1:after{-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}article{font-size:1rem;line-height:1.5;color:#151515}.product-lifecycle__wrapper{position:relative}.product-lifecycle__wrapper--listing{border:1px solid #d2d2d2}.product-lifecycle__header{padding:1.125rem}@media (min-width:650px){.product-lifecycle__header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:1rem}}.product-lifecycle__header--more-info{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media (min-width:1080px){.product-lifecycle__header--more-info{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}}.product-lifecycle__header--more-info>*{margin-bottom:.5em}@media (min-width:1080px){.product-lifecycle__header--more-info>*{margin-right:1.5rem}}.product-lifecycle__header--more-info>:last-child{margin-right:0}.product-lifecycle-info__product-name{font-size:1.25em;font-weight:400;width:100%}.product-lifecycle__header--less-info .product-lifecycle-info__product-name{margin-right:auto;width:auto}.product-lifecycle-info__detailed-info{margin-right:auto}.product-lifecycle__header--more-info .product-lifecycle-info__detailed-info{margin-bottom:1em}[type=checkbox]{margin-right:.25em}.product-lifecycle__close{position:absolute;top:0;right:0;cursor:pointer}table{min-width:100%;border:0}@media (min-width:650px){table{position:relative;margin-left:0;margin-right:0}}.product-lifecycle-info__table-headers{position:-webkit-sticky;position:sticky;top:0;z-index:999;display:none;background:#fff}@media (min-width:1000px){.product-lifecycle-info__table-headers{display:table}}.product-lifecycle-info__table{border-top:0}caption,td,th{padding:1.125rem;border:0;text-align:left}caption *,td *,th *{margin:0;padding:0}th{font-weight:700;vertical-align:bottom}@media (min-width:1000px){td:nth-last-child(2):first-child~td,td:nth-last-child(2):first-child~th,th:nth-last-child(2):first-child~td,th:nth-last-child(2):first-child~th{width:50%}}@media (min-width:1000px){td:nth-last-child(3):first-child~td,td:nth-last-child(3):first-child~th,th:nth-last-child(3):first-child~td,th:nth-last-child(3):first-child~th{width:33.33333%}}@media (min-width:1000px){td:nth-last-child(4):first-child~td,td:nth-last-child(4):first-child~th,th:nth-last-child(4):first-child~td,th:nth-last-child(4):first-child~th{width:25%}}@media (min-width:1000px){td:nth-last-child(5):first-child~td,td:nth-last-child(5):first-child~th,th:nth-last-child(5):first-child~td,th:nth-last-child(5):first-child~th{width:20%}}@media (min-width:1000px){td:nth-last-child(6):first-child~td,td:nth-last-child(6):first-child~th,th:nth-last-child(6):first-child~td,th:nth-last-child(6):first-child~th{width:16.66667%}}@media (min-width:1000px){td:nth-last-child(7):first-child~td,td:nth-last-child(7):first-child~th,th:nth-last-child(7):first-child~td,th:nth-last-child(7):first-child~th{width:14.28571%}}@media (min-width:1000px){td:nth-last-child(8):first-child~td,td:nth-last-child(8):first-child~th,th:nth-last-child(8):first-child~td,th:nth-last-child(8):first-child~th{width:12.5%}}@media (min-width:1000px){td:nth-last-child(9):first-child~td,td:nth-last-child(9):first-child~th,th:nth-last-child(9):first-child~td,th:nth-last-child(9):first-child~th{width:11.11111%}}th{margin-top:1rem;border-top:4px solid #d2d2d2;border-bottom:1px solid #d2d2d2}tbody tr:first-child th{border-top:0;margin-top:0}@media (min-width:1000px){th{margin-top:0;border-top:0}}th[scope=row]{font-weight:inherit}td{padding:.5rem 1.125rem;border:0}@media (min-width:1000px){td{border-bottom:1px solid #d2d2d2}}@media (min-width:1000px){td,th{padding:1rem}}caption{padding:16px 24px;border-bottom:3px solid #d2d2d2}.responsive-table--row-strategy thead{display:none}@media (min-width:1000px){.responsive-table--row-strategy thead{display:table-header-group}}.responsive-table--row-strategy td,.responsive-table--row-strategy th{display:block}@media (min-width:1000px){.responsive-table--row-strategy td,.responsive-table--row-strategy th{display:table-cell}}.responsive-table--row-strategy td:before,.responsive-table--row-strategy th:before{content:attr(data-label) ": ";font-weight:700}@media (min-width:1000px){.responsive-table--row-strategy td:before,.responsive-table--row-strategy th:before{content:none}}.responsive-table--column-strategy{display:none}@media (min-width:1000px){.responsive-table--column-strategy{display:table}}@media (min-width:1000px){.responsive-table__wrapper--column-strategy .responsive-table__mobile-alternative{display:none}}.responsive-table__wrapper--scroll-strategy{overflow-x:auto}@media (min-width:1000px){.responsive-table__wrapper--scroll-strategy{overflow:hidden}}:host([pfe-c-style=compact]) .lifecycle-table__product-name,:host([pfe-c-style=compact]) table{font-size:.875rem;line-height:1.5}:host([pfe-c-style=compact]) .product-lifecycle-info__table-headers{border:0}:host([pfe-c-style=compact]) caption,:host([pfe-c-style=compact]) td,:host([pfe-c-style=compact]) th{padding:.57143em}:host([pfe-c-style=compact]) caption:first-child,:host([pfe-c-style=compact]) td:first-child,:host([pfe-c-style=compact]) th:first-child{padding-left:1.14286em}:host([pfe-c-style=compact]) caption:last-child,:host([pfe-c-style=compact]) td:last-child,:host([pfe-c-style=compact]) th:last-child{padding-right:1.14286em}:host([pfe-c-style=compact]) th{border-top-width:2px;padding-top:.85714em}:host([pfe-c-style=compact]) caption{padding-top:1.14286em;border-bottom-width:1px}\n/*# sourceMappingURL=plcc-table.min.css.map */\n</style><div id="loading" hidden>\n <pfe-progress-indicator></pfe-progress-indicator>\n</div>\n<article class="product-lifecycle__wrapper" id="product-lifecycle__wrapper--listing">\n <button class="product-lifecycle__close icon-close application" id="close-btn" aria-label="Closes Red Hat OpenStack Platform Table" hidden>\n <div class="icon-close__inner1"></div>\n </button>\n <h2 class="product-lifecycle-info__product-name sr-only"></h2>\n\n <table border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table-headers" aria-hidden>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n </table>\n\n <table id="product-lifecycle-full-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--supported responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Full support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-maintenance-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--purgatory responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Maintenance support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-extended-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--purgatory responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Extended support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <table id="product-lifecycle-end-of-maintenance" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--unsupported responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n End of maintenance <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-end-of-life" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--unsupported responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n End of life <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <table id="product-lifecycle-uncategorized" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--uncatagorized responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Uncategorized <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <p id="plcc-disclaimer">All future dates mentioned are close approximations, non definitive, and subject to change.</p>\n</article>'}static get properties(){return{}}static get slots(){return{default:{title:"Default slot",type:"array",namedSlot:!1,items:{oneOf:[{$ref:"raw"}]}}}}static get tag(){return"plcc-table"}static get events(){return{close:this.tag+":close"}}get schemaUrl(){return"plcc-table.json"}get templateUrl(){return"plcc-table.html"}get styleUrl(){return"plcc-table.scss"}get productName(){return this.getAttribute("product-name")}get app(){return this.getAttribute("app")}get hideEOL(){return this.getAttribute("hide-eol")}get loading(){return this.hasAttribute("loading")}set loading(e){e?(this._loadingIndicator.removeAttribute("hidden"),this._loadingIndicator.classList.add("loading"),this.setAttribute("loading",!0)):(this._loadingIndicator.setAttribute("hidden",!0),this._loadingIndicator.classList.remove("loading"),this.removeAttribute("loading"))}get tableData(){return this._data}set tableData(e){if(!e)return;this.loading=!0,this._data=e;let t=this._getDisplayHeaders(this._data),a=this._getHeaders(this._data);this._construct(this._data,t,a),this.loading=!1}static get observedAttributes(){return["product-name","hide-eol","app"]}static get PfeType(){return e.PfeTypes.Component}constructor(){super(t,{type:t.PfeType}),this._handleBtnClick=this._handleBtnClick.bind(this),this._data=null,this._fullSupport=!1,this._maintenanceSupport=!1,this._extendedSupport=!1,this._uncategorized=!1,this._endOfMaintenance=!1,this._endOfLife=!1,this._plccApplication=!1,this._disclaimer=this.shadowRoot.querySelector("#plcc-disclaimer"),this._article=this.shadowRoot.querySelector("article"),this._header=this.shadowRoot.querySelector("header"),this._links=this.shadowRoot.querySelectorAll("a"),this._appMarkup=this.shadowRoot.querySelectorAll(".application"),this._fullSupportTable=this.shadowRoot.querySelector("#product-lifecycle-full-support"),this._maintenanceSupportTable=this.shadowRoot.querySelector("#product-lifecycle-maintenance-support"),this._extendedSupportTable=this.shadowRoot.querySelector("#product-lifecycle-extended-support"),this._endOfMaintenanceTable=this.shadowRoot.querySelector("#product-lifecycle-end-of-maintenance"),this._endOfLifeTable=this.shadowRoot.querySelector("#product-lifecycle-end-of-life"),this._uncategorizedTable=this.shadowRoot.querySelector("#product-lifecycle-uncategorized"),this._fullSupportBody=this.shadowRoot.querySelector("#product-lifecycle-full-support tbody"),this._maintenanceSupportBody=this.shadowRoot.querySelector("#product-lifecycle-maintenance-support tbody"),this._extendedSupportBody=this.shadowRoot.querySelector("#product-lifecycle-extended-support tbody"),this._endOfMaintenanceBody=this.shadowRoot.querySelector("#product-lifecycle-end-of-maintenance tbody"),this._endOfLifeBody=this.shadowRoot.querySelector("#product-lifecycle-end-of-life tbody"),this._uncategorizedBody=this.shadowRoot.querySelector("#product-lifecycle-uncategorized tbody"),this._caption=this.shadowRoot.querySelector("caption"),this._phaseRow=this.shadowRoot.querySelectorAll(".product-phases"),this._versionToggleRow=this.shadowRoot.querySelectorAll("version-toggle-row"),this._versionToggle=this.shadowRoot.querySelector("#unsupported-versions"),this._closeBtn=this.shadowRoot.querySelector("#close-btn"),this._loadingIndicator=this.shadowRoot.querySelector("#loading"),this.loading=!1}disconnectedCallback(){this._closeBtn.removeEventListener("click",this._handleBtnClick)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),"product-name"===e&&this._requestProduct(a).then(e=>{this.tableData=e}).catch(e=>{console.error(e)}),"hide-eol"===e&&this._handleHideEOL(this.hasAttribute("hide-eol")),"app"===e&&(this.hasAttribute("app")?this._disclaimer.setAttribute("hidden",!0):this._disclaimer.removeAttribute("hidden"))}_requestProduct(e){this.loading=!0;return new Promise((t,a)=>{const i=new XMLHttpRequest;i.open("GET","https://access.redhat.com/product-life-cycles/api/v1/products?name="+e),i.responseType="json",i.onload=()=>{i.status>=400?a(i.response):t(i.response),this.loading=!1},i.onerror=e=>{a(e,"Something went wrong."),this.loading=!1},i.send()})}_getDisplayHeaders(e){let t=[];return e.data[0].is_layered_product&&t.push(e.data[0].extra_header),e.data[0].all_phases.forEach(e=>{t.push(e.display_name)}),t}_getHeaders(e){let t=[];return e.data[0].is_layered_product&&t.push(e.data[0].extra_header),e.data[0].all_phases.forEach(e=>{t.push(e.name)}),t}_construct(e,t,a){let i="",l="",n="",d="",r="",o="",s='<th scope="col">Version</th>',c=e.data[0].versions,h=e.data[0].show_last_minor_release,p=e.data[0].is_layered_product;this.shadowRoot.querySelector(".product-lifecycle-info__product-name").innerText=e.data[0].name,this.shadowRoot.querySelectorAll(".sr-only").forEach(t=>t.innerText=""+e.data[0].name),t.forEach(e=>{s+=`<th scope="col">${e}</th>`}),h&&(s+='<th scope="col">Last minor release</th>'),c.forEach((t,s)=>{let c="",u="",b="",f="",_="",m="";"Full Support"===t.type&&(this._fullSupport=!0,c=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),"Maintenance Support"===t.type&&(this._maintenanceSupport=!0,u=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),"Extended Support"===t.type&&(this._extendedSupport=!0,b=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),"End of Maintenance"===t.type&&(this._endOfMaintenance=!0,_=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),"End of life"===t.type&&(this._endOfLife=!0,f=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),""!==t.type&&null!==t.type||(this._uncategorized=!0,m=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),i+=c,l+=u,n+=b,d+=f,r+=_,o+=m}),this._fullSupport?this._fullSupportTable.removeAttribute("hidden"):this._fullSupportTable.setAttribute("hidden",!0),this._maintenanceSupport?this._maintenanceSupportTable.removeAttribute("hidden"):this._maintenanceSupportTable.setAttribute("hidden",!0),this._extendedSupport?this._extendedSupportTable.removeAttribute("hidden"):this._extendedSupportTable.setAttribute("hidden",!0),this._endOfMaintenance?this._endOfMaintenanceTable.removeAttribute("hidden"):this._endOfMaintenanceTable.setAttribute("hidden",!0),this._endOfLife?this._endOfLife&&this._plccApplication&&this._endOfLifeTable.setAttribute("hidden",!0):this._endOfLifeTable.setAttribute("hidden",!0),this._uncategorized?this._uncategorizedTable.removeAttribute("hidden"):this._uncategorizedTable.setAttribute("hidden",!0),this._phaseRow.forEach(e=>{e.innerHTML=s}),this._fullSupportBody.innerHTML=i,this._maintenanceSupportBody.innerHTML=l,this._extendedSupportBody.innerHTML=n,this._endOfLifeBody.innerHTML=d,this._endOfMaintenanceBody.innerHTML=r,this._uncategorizedBody.innerHTML=o}_parseDate(e,t){return"string"===t?e:`<pfe-datetime datetime=${e} day="numeric" month="long" year="numeric" time-zone="UTC"></pfe-datetime>`}_handleHideEOL(e){e?this._endOfLifeTable.setAttribute("hidden",!0):this._endOfLifeTable.removeAttribute("hidden")}_handleBtnClick(e){this.emitEvent(t.events.close)}}e.create(t);export default t; | ||
*/class t extends e{static get version(){return"1.1.0"}get html(){return'<style>.product-lifecycle-info__table thead,.sr-only{position:absolute;overflow:hidden;clip:rect(0,0,0,0);height:1px;width:1px;margin:-1px;padding:0;border:0}:host{display:block}:host([hidden]){display:none}:host([loading]) article{display:none}article{display:block;font-size:16px;line-height:1.5;color:#151515}#loading{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;min-height:100px}#loading.loading{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.u-no-break{white-space:nowrap}*{-webkit-box-sizing:border-box;box-sizing:border-box}.icon-close{position:relative;width:1.5em;height:1.5em;margin:0;padding:0;border:0;font-size:2rem;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.icon-close__inner1{position:absolute;top:50%;left:50%;width:0;height:0;font-size:4rem;-webkit-transform:translate(-50%,-50%) scale(.125);transform:translate(-50%,-50%) scale(.125)}.icon-close__inner1:after,.icon-close__inner1:before{content:"";position:absolute;top:0;left:0;display:block;width:.3em;height:2em;background:#000}.icon-close:focus .icon-close__inner1:after,.icon-close:focus .icon-close__inner1:before,.icon-close:hover .icon-close__inner1:after,.icon-close:hover .icon-close__inner1:before{background:#06c}.icon-close__inner1:before{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.icon-close__inner1:after{-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}article{font-size:1rem;line-height:1.5;color:#151515}.product-lifecycle__wrapper{position:relative}.product-lifecycle__wrapper--listing{border:1px solid #d2d2d2}.product-lifecycle__header{padding:1.125rem}@media (min-width:650px){.product-lifecycle__header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:1rem}}.product-lifecycle__header--more-info{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media (min-width:1080px){.product-lifecycle__header--more-info{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}}.product-lifecycle__header--more-info>*{margin-bottom:.5em}@media (min-width:1080px){.product-lifecycle__header--more-info>*{margin-right:1.5rem}}.product-lifecycle__header--more-info>:last-child{margin-right:0}.product-lifecycle-info__product-name{font-size:1.25em;font-weight:400;width:100%}.product-lifecycle__header--less-info .product-lifecycle-info__product-name{margin-right:auto;width:auto}.product-lifecycle-info__detailed-info{margin-right:auto}.product-lifecycle__header--more-info .product-lifecycle-info__detailed-info{margin-bottom:1em}[type=checkbox]{margin-right:.25em}.product-lifecycle__close{position:absolute;top:0;right:0;cursor:pointer}table{min-width:100%;border:0}@media (min-width:650px){table{position:relative;margin-left:0;margin-right:0}}.product-lifecycle-info__table-headers{position:-webkit-sticky;position:sticky;top:0;z-index:999;display:none;background:#fff}@media (min-width:1000px){.product-lifecycle-info__table-headers{display:table}}.product-lifecycle-info__table{border-top:0}caption,td,th{padding:1.125rem;border:0;text-align:left}caption *,td *,th *{margin:0;padding:0}th{font-weight:700;vertical-align:bottom}@media (min-width:1000px){td:nth-last-child(2):first-child~td,td:nth-last-child(2):first-child~th,th:nth-last-child(2):first-child~td,th:nth-last-child(2):first-child~th{width:50%}}@media (min-width:1000px){td:nth-last-child(3):first-child~td,td:nth-last-child(3):first-child~th,th:nth-last-child(3):first-child~td,th:nth-last-child(3):first-child~th{width:33.33333%}}@media (min-width:1000px){td:nth-last-child(4):first-child~td,td:nth-last-child(4):first-child~th,th:nth-last-child(4):first-child~td,th:nth-last-child(4):first-child~th{width:25%}}@media (min-width:1000px){td:nth-last-child(5):first-child~td,td:nth-last-child(5):first-child~th,th:nth-last-child(5):first-child~td,th:nth-last-child(5):first-child~th{width:20%}}@media (min-width:1000px){td:nth-last-child(6):first-child~td,td:nth-last-child(6):first-child~th,th:nth-last-child(6):first-child~td,th:nth-last-child(6):first-child~th{width:16.66667%}}@media (min-width:1000px){td:nth-last-child(7):first-child~td,td:nth-last-child(7):first-child~th,th:nth-last-child(7):first-child~td,th:nth-last-child(7):first-child~th{width:14.28571%}}@media (min-width:1000px){td:nth-last-child(8):first-child~td,td:nth-last-child(8):first-child~th,th:nth-last-child(8):first-child~td,th:nth-last-child(8):first-child~th{width:12.5%}}@media (min-width:1000px){td:nth-last-child(9):first-child~td,td:nth-last-child(9):first-child~th,th:nth-last-child(9):first-child~td,th:nth-last-child(9):first-child~th{width:11.11111%}}th{margin-top:1rem;border-top:4px solid #d2d2d2;border-bottom:1px solid #d2d2d2}tbody tr:first-child th{border-top:0;margin-top:0}@media (min-width:1000px){th{margin-top:0;border-top:0}}th[scope=row]{font-weight:inherit}td{padding:.5rem 1.125rem;border:0}@media (min-width:1000px){td{border-bottom:1px solid #d2d2d2}}@media (min-width:1000px){td,th{padding:1rem}}caption{padding:16px 24px;border-bottom:3px solid #d2d2d2}.responsive-table--row-strategy thead{display:none}@media (min-width:1000px){.responsive-table--row-strategy thead{display:table-header-group}}.responsive-table--row-strategy td,.responsive-table--row-strategy th{display:block}@media (min-width:1000px){.responsive-table--row-strategy td,.responsive-table--row-strategy th{display:table-cell}}.responsive-table--row-strategy td:before,.responsive-table--row-strategy th:before{content:attr(data-label) ": ";font-weight:700}@media (min-width:1000px){.responsive-table--row-strategy td:before,.responsive-table--row-strategy th:before{content:none}}.responsive-table--column-strategy{display:none}@media (min-width:1000px){.responsive-table--column-strategy{display:table}}@media (min-width:1000px){.responsive-table__wrapper--column-strategy .responsive-table__mobile-alternative{display:none}}.responsive-table__wrapper--scroll-strategy{overflow-x:auto}@media (min-width:1000px){.responsive-table__wrapper--scroll-strategy{overflow:hidden}}:host([pfe-c-style=compact]) .lifecycle-table__product-name,:host([pfe-c-style=compact]) table{font-size:.875rem;line-height:1.5}:host([pfe-c-style=compact]) .product-lifecycle-info__table-headers{border:0}:host([pfe-c-style=compact]) caption,:host([pfe-c-style=compact]) td,:host([pfe-c-style=compact]) th{padding:.57143em}:host([pfe-c-style=compact]) caption:first-child,:host([pfe-c-style=compact]) td:first-child,:host([pfe-c-style=compact]) th:first-child{padding-left:1.14286em}:host([pfe-c-style=compact]) caption:last-child,:host([pfe-c-style=compact]) td:last-child,:host([pfe-c-style=compact]) th:last-child{padding-right:1.14286em}:host([pfe-c-style=compact]) th{border-top-width:2px;padding-top:.85714em}:host([pfe-c-style=compact]) caption{padding-top:1.14286em;border-bottom-width:1px}\n/*# sourceMappingURL=plcc-table.min.css.map */\n</style><div id="loading" hidden>\n <pfe-progress-indicator></pfe-progress-indicator>\n</div>\n<article class="product-lifecycle__wrapper" id="product-lifecycle__wrapper--listing">\n <button class="product-lifecycle__close icon-close application" id="close-btn" aria-label="Closes Red Hat OpenStack Platform Table" hidden>\n <div class="icon-close__inner1"></div>\n </button>\n <h2 class="product-lifecycle-info__product-name sr-only"></h2>\n\n <table border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table-headers" aria-hidden>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n </table>\n\n <table id="product-lifecycle-full-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--supported responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Full support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-maintenance-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--purgatory responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Maintenance support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-extended-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--purgatory responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Extended support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <table id="product-lifecycle-end-of-maintenance" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--unsupported responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n End of maintenance <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-end-of-life" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--unsupported responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n End of life <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <table id="product-lifecycle-uncategorized" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--uncatagorized responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Uncategorized <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <p id="plcc-disclaimer">All future dates mentioned are close approximations, non definitive, and subject to change.</p>\n</article>'}static get properties(){return{}}static get slots(){return{default:{title:"Default slot",type:"array",namedSlot:!1,items:{oneOf:[{$ref:"raw"}]}}}}static get tag(){return"plcc-table"}static get events(){return{close:`${this.tag}:close`}}get schemaUrl(){return"plcc-table.json"}get templateUrl(){return"plcc-table.html"}get styleUrl(){return"plcc-table.scss"}get productName(){return this.getAttribute("product-name")}get app(){return this.getAttribute("app")}get hideEOL(){return this.getAttribute("hide-eol")}get loading(){return this.hasAttribute("loading")}set loading(e){e?(this._loadingIndicator.removeAttribute("hidden"),this._loadingIndicator.classList.add("loading"),this.setAttribute("loading",!0)):(this._loadingIndicator.setAttribute("hidden",!0),this._loadingIndicator.classList.remove("loading"),this.removeAttribute("loading"))}get tableData(){return this._data}set tableData(e){if(!e)return;this.loading=!0,this._data=e;let t=this._getDisplayHeaders(this._data),a=this._getHeaders(this._data);this._construct(this._data,t,a),this.loading=!1}static get observedAttributes(){return["product-name","hide-eol","app"]}static get PfeType(){return e.PfeTypes.Component}constructor(){super(t,{type:t.PfeType}),this._handleBtnClick=this._handleBtnClick.bind(this),this._data=null,this._fullSupport=!1,this._maintenanceSupport=!1,this._extendedSupport=!1,this._uncategorized=!1,this._endOfMaintenance=!1,this._endOfLife=!1,this._plccApplication=!1,this._disclaimer=this.shadowRoot.querySelector("#plcc-disclaimer"),this._article=this.shadowRoot.querySelector("article"),this._header=this.shadowRoot.querySelector("header"),this._links=this.shadowRoot.querySelectorAll("a"),this._appMarkup=this.shadowRoot.querySelectorAll(".application"),this._fullSupportTable=this.shadowRoot.querySelector("#product-lifecycle-full-support"),this._maintenanceSupportTable=this.shadowRoot.querySelector("#product-lifecycle-maintenance-support"),this._extendedSupportTable=this.shadowRoot.querySelector("#product-lifecycle-extended-support"),this._endOfMaintenanceTable=this.shadowRoot.querySelector("#product-lifecycle-end-of-maintenance"),this._endOfLifeTable=this.shadowRoot.querySelector("#product-lifecycle-end-of-life"),this._uncategorizedTable=this.shadowRoot.querySelector("#product-lifecycle-uncategorized"),this._fullSupportBody=this.shadowRoot.querySelector("#product-lifecycle-full-support tbody"),this._maintenanceSupportBody=this.shadowRoot.querySelector("#product-lifecycle-maintenance-support tbody"),this._extendedSupportBody=this.shadowRoot.querySelector("#product-lifecycle-extended-support tbody"),this._endOfMaintenanceBody=this.shadowRoot.querySelector("#product-lifecycle-end-of-maintenance tbody"),this._endOfLifeBody=this.shadowRoot.querySelector("#product-lifecycle-end-of-life tbody"),this._uncategorizedBody=this.shadowRoot.querySelector("#product-lifecycle-uncategorized tbody"),this._caption=this.shadowRoot.querySelector("caption"),this._phaseRow=this.shadowRoot.querySelectorAll(".product-phases"),this._versionToggleRow=this.shadowRoot.querySelectorAll("version-toggle-row"),this._versionToggle=this.shadowRoot.querySelector("#unsupported-versions"),this._closeBtn=this.shadowRoot.querySelector("#close-btn"),this._loadingIndicator=this.shadowRoot.querySelector("#loading"),this.loading=!1}disconnectedCallback(){this._closeBtn.removeEventListener("click",this._handleBtnClick)}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),"product-name"===e&&this._requestProduct(a).then(e=>{this.tableData=e}).catch(e=>{console.error(e)}),"hide-eol"===e&&this._handleHideEOL(this.hasAttribute("hide-eol")),"app"===e&&(this.hasAttribute("app")?this._disclaimer.setAttribute("hidden",!0):this._disclaimer.removeAttribute("hidden"))}_requestProduct(e){return this.loading=!0,new Promise((t,a)=>{const i=new XMLHttpRequest;i.open("GET","https://access.redhat.com/product-life-cycles/api/v1/products?name="+e),i.responseType="json",i.onload=(()=>{i.status>=400?a(i.response):t(i.response),this.loading=!1}),i.onerror=(e=>{a(e,"Something went wrong."),this.loading=!1}),i.send()})}_getDisplayHeaders(e){let t=[];return e.data[0].is_layered_product&&t.push(e.data[0].extra_header),e.data[0].all_phases.forEach(e=>{t.push(e.display_name)}),t}_getHeaders(e){let t=[];return e.data[0].is_layered_product&&t.push(e.data[0].extra_header),e.data[0].all_phases.forEach(e=>{t.push(e.name)}),t}_construct(e,t,a){let i="",l="",n="",d="",r="",o="",s='<th scope="col">Version</th>',c=e.data[0].versions,h=e.data[0].show_last_minor_release,p=e.data[0].is_layered_product;this.shadowRoot.querySelector(".product-lifecycle-info__product-name").innerText=e.data[0].name,this.shadowRoot.querySelectorAll(".sr-only").forEach(t=>t.innerText=`${e.data[0].name}`),t.forEach(e=>{s+=`<th scope="col">${e}</th>`}),h&&(s+='<th scope="col">Last minor release</th>'),c.forEach((t,s)=>{let c="",u="",b="",f="",_="",m="";"Full Support"===t.type&&(this._fullSupport=!0,c=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),"Maintenance Support"===t.type&&(this._maintenanceSupport=!0,u=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),"Extended Support"===t.type&&(this._extendedSupport=!0,b=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),"End of Maintenance"===t.type&&(this._endOfMaintenance=!0,_=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),"End of life"===t.type&&(this._endOfLife=!0,f=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),""!==t.type&&null!==t.type||(this._uncategorized=!0,m=`\n <tr>\n <th scope="row" data-label="Version">${t.name}</th>\n ${p?null!==t.extra_header_value?`<td data-label="${e.data[0].extra_header}">${t.extra_header_value}</td>`:`<td data-label="${e.data[0].extra_header}">N/A</td>`:""}\n ${t.phases.map(e=>a.includes(e.name)?`<td data-label="${e.name}">${this._parseDate(e.date,e.date_format)}</td>`:`<td data-label="${e.name}">N/A</td>`).join("")}\n ${h?null!==t.last_minor_release?'<td data-label="Last minor release">'+t.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':""}\n </tr>\n `),i+=c,l+=u,n+=b,d+=f,r+=_,o+=m}),this._fullSupport?this._fullSupportTable.removeAttribute("hidden"):this._fullSupportTable.setAttribute("hidden",!0),this._maintenanceSupport?this._maintenanceSupportTable.removeAttribute("hidden"):this._maintenanceSupportTable.setAttribute("hidden",!0),this._extendedSupport?this._extendedSupportTable.removeAttribute("hidden"):this._extendedSupportTable.setAttribute("hidden",!0),this._endOfMaintenance?this._endOfMaintenanceTable.removeAttribute("hidden"):this._endOfMaintenanceTable.setAttribute("hidden",!0),this._endOfLife?this._endOfLife&&this._plccApplication&&this._endOfLifeTable.setAttribute("hidden",!0):this._endOfLifeTable.setAttribute("hidden",!0),this._uncategorized?this._uncategorizedTable.removeAttribute("hidden"):this._uncategorizedTable.setAttribute("hidden",!0),this._phaseRow.forEach(e=>{e.innerHTML=s}),this._fullSupportBody.innerHTML=i,this._maintenanceSupportBody.innerHTML=l,this._extendedSupportBody.innerHTML=n,this._endOfLifeBody.innerHTML=d,this._endOfMaintenanceBody.innerHTML=r,this._uncategorizedBody.innerHTML=o}_parseDate(e,t){return"string"===t?e:`<pfe-datetime datetime=${e} day="numeric" month="long" year="numeric" time-zone="UTC"></pfe-datetime>`}_handleHideEOL(e){e?this._endOfLifeTable.setAttribute("hidden",!0):this._endOfLifeTable.removeAttribute("hidden")}_handleBtnClick(e){this.emitEvent(t.events.close)}}e.create(t);export default t; | ||
//# sourceMappingURL=plcc-table.min.js.map |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../../../@patternfly/pfelement/dist/pfelement.umd'), require('../../../@patternfly/pfe-progress-indicator/dist/pfe-progress-indicator.umd'), require('../../../@patternfly/pfe-datetime/dist/pfe-datetime.umd')) : | ||
typeof define === 'function' && define.amd ? define(['../../../@patternfly/pfelement/dist/pfelement.umd', '../../../@patternfly/pfe-progress-indicator/dist/pfe-progress-indicator.umd', '../../../@patternfly/pfe-datetime/dist/pfe-datetime.umd'], factory) : | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../../../@patternfly/pfelement/dist/pfelement.umd.umd'), require('../../../@patternfly/pfe-progress-indicator/dist/pfe-progress-indicator.umd.umd'), require('../../../@patternfly/pfe-datetime/dist/pfe-datetime.umd.umd')) : | ||
typeof define === 'function' && define.amd ? define(['../../../@patternfly/pfelement/dist/pfelement.umd.umd', '../../../@patternfly/pfe-progress-indicator/dist/pfe-progress-indicator.umd.umd', '../../../@patternfly/pfe-datetime/dist/pfe-datetime.umd.umd'], factory) : | ||
(global.PlccTable = factory(global.PFElement)); | ||
@@ -83,3 +83,3 @@ }(this, (function (PFElement) { 'use strict'; | ||
/*! | ||
* PatternFly Elements: PlccTable 1.0.1 | ||
* PatternFly Elements: PlccTable 1.1.0 | ||
* @license | ||
@@ -181,3 +181,3 @@ * Copyright 2020 Red Hat, Inc. | ||
get: function get$$1() { | ||
return "1.0.1"; | ||
return "1.1.0"; | ||
} | ||
@@ -248,3 +248,3 @@ }, { | ||
_this._endOfLifeTable = _this.shadowRoot.querySelector("#product-lifecycle-end-of-life"); | ||
_this._uncategorizedTable = _this.shadowRoot.querySelector('#product-lifecycle-uncategorized'); | ||
_this._uncategorizedTable = _this.shadowRoot.querySelector("#product-lifecycle-uncategorized"); | ||
_this._fullSupportBody = _this.shadowRoot.querySelector("#product-lifecycle-full-support tbody"); | ||
@@ -411,3 +411,3 @@ _this._maintenanceSupportBody = _this.shadowRoot.querySelector("#product-lifecycle-maintenance-support tbody"); | ||
_this4._fullSupport = true; | ||
fullSupportRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : '') + "\n " + item.phases.map(function (phase) { | ||
fullSupportRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : "") + "\n " + item.phases.map(function (phase) { | ||
if (headers.includes(phase.name)) { | ||
@@ -425,3 +425,3 @@ return "<td data-label=\"" + phase.name + "\">" + _this4._parseDate(phase.date, phase.date_format) + "</td>"; | ||
maintenanceSupportRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : '') + "\n " + item.phases.map(function (phase) { | ||
maintenanceSupportRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : "") + "\n " + item.phases.map(function (phase) { | ||
if (headers.includes(phase.name)) { | ||
@@ -439,3 +439,3 @@ return "<td data-label=\"" + phase.name + "\">" + _this4._parseDate(phase.date, phase.date_format) + "</td>"; | ||
extendedSupportRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : '') + "\n " + item.phases.map(function (phase) { | ||
extendedSupportRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : "") + "\n " + item.phases.map(function (phase) { | ||
if (headers.includes(phase.name)) { | ||
@@ -452,3 +452,3 @@ return "<td data-label=\"" + phase.name + "\">" + _this4._parseDate(phase.date, phase.date_format) + "</td>"; | ||
endOfMaintenanceRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : '') + "\n " + item.phases.map(function (phase) { | ||
endOfMaintenanceRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : "") + "\n " + item.phases.map(function (phase) { | ||
if (headers.includes(phase.name)) { | ||
@@ -466,3 +466,3 @@ return "<td data-label=\"" + phase.name + "\">" + _this4._parseDate(phase.date, phase.date_format) + "</td>"; | ||
endOfLifeRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : '') + "\n " + item.phases.map(function (phase) { | ||
endOfLifeRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : "") + "\n " + item.phases.map(function (phase) { | ||
if (headers.includes(phase.name)) { | ||
@@ -480,3 +480,3 @@ return "<td data-label=\"" + phase.name + "\">" + _this4._parseDate(phase.date, phase.date_format) + "</td>"; | ||
uncategorizedRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : '') + "\n " + item.phases.map(function (phase) { | ||
uncategorizedRow = "\n <tr>\n <th scope=\"row\" data-label=\"Version\">" + item.name + "</th>\n " + (layeredProduct ? item.extra_header_value !== null ? "<td data-label=\"" + data.data[0].extra_header + "\">" + item.extra_header_value + "</td>" : "<td data-label=\"" + data.data[0].extra_header + "\">N/A</td>" : "") + "\n " + item.phases.map(function (phase) { | ||
if (headers.includes(phase.name)) { | ||
@@ -556,4 +556,3 @@ return "<td data-label=\"" + phase.name + "\">" + _this4._parseDate(phase.date, phase.date_format) + "</td>"; | ||
value: function _parseDate(date, format) { | ||
if (format === 'string') { | ||
if (format === "string") { | ||
return date; | ||
@@ -560,0 +559,0 @@ } else { |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("../../../@patternfly/pfelement/dist/pfelement.umd.min"),require("../../../@patternfly/pfe-progress-indicator/dist/pfe-progress-indicator.umd.min"),require("../../../@patternfly/pfe-datetime/dist/pfe-datetime.umd.min")):"function"==typeof define&&define.amd?define(["../../../@patternfly/pfelement/dist/pfelement.umd.min","../../../@patternfly/pfe-progress-indicator/dist/pfe-progress-indicator.umd.min","../../../@patternfly/pfe-datetime/dist/pfe-datetime.umd.min"],t):e.PlccTable=t(e.PFElement)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t=function(e,t,a){return t&&n(e.prototype,t),a&&n(e,a),e};function n(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,e),t(i,[{key:"html",get:function(){return'<style>.product-lifecycle-info__table thead,.sr-only{position:absolute;overflow:hidden;clip:rect(0,0,0,0);height:1px;width:1px;margin:-1px;padding:0;border:0}:host{display:block}:host([hidden]){display:none}:host([loading]) article{display:none}article{display:block;font-size:16px;line-height:1.5;color:#151515}#loading{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;min-height:100px}#loading.loading{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.u-no-break{white-space:nowrap}*{-webkit-box-sizing:border-box;box-sizing:border-box}.icon-close{position:relative;width:1.5em;height:1.5em;margin:0;padding:0;border:0;font-size:2rem;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.icon-close__inner1{position:absolute;top:50%;left:50%;width:0;height:0;font-size:4rem;-webkit-transform:translate(-50%,-50%) scale(.125);transform:translate(-50%,-50%) scale(.125)}.icon-close__inner1:after,.icon-close__inner1:before{content:"";position:absolute;top:0;left:0;display:block;width:.3em;height:2em;background:#000}.icon-close:focus .icon-close__inner1:after,.icon-close:focus .icon-close__inner1:before,.icon-close:hover .icon-close__inner1:after,.icon-close:hover .icon-close__inner1:before{background:#06c}.icon-close__inner1:before{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.icon-close__inner1:after{-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}article{font-size:1rem;line-height:1.5;color:#151515}.product-lifecycle__wrapper{position:relative}.product-lifecycle__wrapper--listing{border:1px solid #d2d2d2}.product-lifecycle__header{padding:1.125rem}@media (min-width:650px){.product-lifecycle__header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:1rem}}.product-lifecycle__header--more-info{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media (min-width:1080px){.product-lifecycle__header--more-info{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}}.product-lifecycle__header--more-info>*{margin-bottom:.5em}@media (min-width:1080px){.product-lifecycle__header--more-info>*{margin-right:1.5rem}}.product-lifecycle__header--more-info>:last-child{margin-right:0}.product-lifecycle-info__product-name{font-size:1.25em;font-weight:400;width:100%}.product-lifecycle__header--less-info .product-lifecycle-info__product-name{margin-right:auto;width:auto}.product-lifecycle-info__detailed-info{margin-right:auto}.product-lifecycle__header--more-info .product-lifecycle-info__detailed-info{margin-bottom:1em}[type=checkbox]{margin-right:.25em}.product-lifecycle__close{position:absolute;top:0;right:0;cursor:pointer}table{min-width:100%;border:0}@media (min-width:650px){table{position:relative;margin-left:0;margin-right:0}}.product-lifecycle-info__table-headers{position:-webkit-sticky;position:sticky;top:0;z-index:999;display:none;background:#fff}@media (min-width:1000px){.product-lifecycle-info__table-headers{display:table}}.product-lifecycle-info__table{border-top:0}caption,td,th{padding:1.125rem;border:0;text-align:left}caption *,td *,th *{margin:0;padding:0}th{font-weight:700;vertical-align:bottom}@media (min-width:1000px){td:nth-last-child(2):first-child~td,td:nth-last-child(2):first-child~th,th:nth-last-child(2):first-child~td,th:nth-last-child(2):first-child~th{width:50%}}@media (min-width:1000px){td:nth-last-child(3):first-child~td,td:nth-last-child(3):first-child~th,th:nth-last-child(3):first-child~td,th:nth-last-child(3):first-child~th{width:33.33333%}}@media (min-width:1000px){td:nth-last-child(4):first-child~td,td:nth-last-child(4):first-child~th,th:nth-last-child(4):first-child~td,th:nth-last-child(4):first-child~th{width:25%}}@media (min-width:1000px){td:nth-last-child(5):first-child~td,td:nth-last-child(5):first-child~th,th:nth-last-child(5):first-child~td,th:nth-last-child(5):first-child~th{width:20%}}@media (min-width:1000px){td:nth-last-child(6):first-child~td,td:nth-last-child(6):first-child~th,th:nth-last-child(6):first-child~td,th:nth-last-child(6):first-child~th{width:16.66667%}}@media (min-width:1000px){td:nth-last-child(7):first-child~td,td:nth-last-child(7):first-child~th,th:nth-last-child(7):first-child~td,th:nth-last-child(7):first-child~th{width:14.28571%}}@media (min-width:1000px){td:nth-last-child(8):first-child~td,td:nth-last-child(8):first-child~th,th:nth-last-child(8):first-child~td,th:nth-last-child(8):first-child~th{width:12.5%}}@media (min-width:1000px){td:nth-last-child(9):first-child~td,td:nth-last-child(9):first-child~th,th:nth-last-child(9):first-child~td,th:nth-last-child(9):first-child~th{width:11.11111%}}th{margin-top:1rem;border-top:4px solid #d2d2d2;border-bottom:1px solid #d2d2d2}tbody tr:first-child th{border-top:0;margin-top:0}@media (min-width:1000px){th{margin-top:0;border-top:0}}th[scope=row]{font-weight:inherit}td{padding:.5rem 1.125rem;border:0}@media (min-width:1000px){td{border-bottom:1px solid #d2d2d2}}@media (min-width:1000px){td,th{padding:1rem}}caption{padding:16px 24px;border-bottom:3px solid #d2d2d2}.responsive-table--row-strategy thead{display:none}@media (min-width:1000px){.responsive-table--row-strategy thead{display:table-header-group}}.responsive-table--row-strategy td,.responsive-table--row-strategy th{display:block}@media (min-width:1000px){.responsive-table--row-strategy td,.responsive-table--row-strategy th{display:table-cell}}.responsive-table--row-strategy td:before,.responsive-table--row-strategy th:before{content:attr(data-label) ": ";font-weight:700}@media (min-width:1000px){.responsive-table--row-strategy td:before,.responsive-table--row-strategy th:before{content:none}}.responsive-table--column-strategy{display:none}@media (min-width:1000px){.responsive-table--column-strategy{display:table}}@media (min-width:1000px){.responsive-table__wrapper--column-strategy .responsive-table__mobile-alternative{display:none}}.responsive-table__wrapper--scroll-strategy{overflow-x:auto}@media (min-width:1000px){.responsive-table__wrapper--scroll-strategy{overflow:hidden}}:host([pfe-c-style=compact]) .lifecycle-table__product-name,:host([pfe-c-style=compact]) table{font-size:.875rem;line-height:1.5}:host([pfe-c-style=compact]) .product-lifecycle-info__table-headers{border:0}:host([pfe-c-style=compact]) caption,:host([pfe-c-style=compact]) td,:host([pfe-c-style=compact]) th{padding:.57143em}:host([pfe-c-style=compact]) caption:first-child,:host([pfe-c-style=compact]) td:first-child,:host([pfe-c-style=compact]) th:first-child{padding-left:1.14286em}:host([pfe-c-style=compact]) caption:last-child,:host([pfe-c-style=compact]) td:last-child,:host([pfe-c-style=compact]) th:last-child{padding-right:1.14286em}:host([pfe-c-style=compact]) th{border-top-width:2px;padding-top:.85714em}:host([pfe-c-style=compact]) caption{padding-top:1.14286em;border-bottom-width:1px}\n/*# sourceMappingURL=plcc-table.min.css.map */\n</style><div id="loading" hidden>\n <pfe-progress-indicator></pfe-progress-indicator>\n</div>\n<article class="product-lifecycle__wrapper" id="product-lifecycle__wrapper--listing">\n <button class="product-lifecycle__close icon-close application" id="close-btn" aria-label="Closes Red Hat OpenStack Platform Table" hidden>\n <div class="icon-close__inner1"></div>\n </button>\n <h2 class="product-lifecycle-info__product-name sr-only"></h2>\n\n <table border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table-headers" aria-hidden>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n </table>\n\n <table id="product-lifecycle-full-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--supported responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Full support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-maintenance-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--purgatory responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Maintenance support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-extended-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--purgatory responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Extended support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <table id="product-lifecycle-end-of-maintenance" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--unsupported responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n End of maintenance <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-end-of-life" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--unsupported responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n End of life <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <table id="product-lifecycle-uncategorized" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--uncatagorized responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Uncategorized <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <p id="plcc-disclaimer">All future dates mentioned are close approximations, non definitive, and subject to change.</p>\n</article>'}},{key:"schemaUrl",get:function(){return"plcc-table.json"}},{key:"templateUrl",get:function(){return"plcc-table.html"}},{key:"styleUrl",get:function(){return"plcc-table.scss"}},{key:"productName",get:function(){return this.getAttribute("product-name")}},{key:"app",get:function(){return this.getAttribute("app")}},{key:"hideEOL",get:function(){return this.getAttribute("hide-eol")}},{key:"loading",get:function(){return this.hasAttribute("loading")},set:function(e){e?(this._loadingIndicator.removeAttribute("hidden"),this._loadingIndicator.classList.add("loading"),this.setAttribute("loading",!0)):(this._loadingIndicator.setAttribute("hidden",!0),this._loadingIndicator.classList.remove("loading"),this.removeAttribute("loading"))}},{key:"tableData",get:function(){return this._data},set:function(e){if(e){this.loading=!0,this._data=e;var t=this._getDisplayHeaders(this._data),a=this._getHeaders(this._data);this._construct(this._data,t,a),this.loading=!1}}}],[{key:"version",get:function(){return"1.0.1"}},{key:"properties",get:function(){return{}}},{key:"slots",get:function(){return{default:{title:"Default slot",type:"array",namedSlot:!1,items:{oneOf:[{$ref:"raw"}]}}}}},{key:"tag",get:function(){return"plcc-table"}},{key:"events",get:function(){return{close:this.tag+":close"}}},{key:"observedAttributes",get:function(){return["product-name","hide-eol","app"]}},{key:"PfeType",get:function(){return e.PfeTypes.Component}}]),t(i,[{key:"disconnectedCallback",value:function(){this._closeBtn.removeEventListener("click",this._handleBtnClick)}},{key:"attributeChangedCallback",value:function(e,t,a){var n=this;(function e(t,a,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,a);if(void 0===i){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,a,n)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(n):void 0})(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"attributeChangedCallback",this).call(this,e,t,a),"product-name"===e&&this._requestProduct(a).then(function(e){n.tableData=e}).catch(function(e){console.error(e)}),"hide-eol"===e&&this._handleHideEOL(this.hasAttribute("hide-eol")),"app"===e&&(this.hasAttribute("app")?this._disclaimer.setAttribute("hidden",!0):this._disclaimer.removeAttribute("hidden"))}},{key:"_requestProduct",value:function(n){var i=this;return this.loading=!0,new Promise(function(e,t){var a=new XMLHttpRequest;a.open("GET","https://access.redhat.com/product-life-cycles/api/v1/products?name="+n),a.responseType="json",a.onload=function(){(400<=a.status?t:e)(a.response),i.loading=!1},a.onerror=function(e){t(e,"Something went wrong."),i.loading=!1},a.send()})}},{key:"_getDisplayHeaders",value:function(e){var t=[];return e.data[0].is_layered_product&&t.push(e.data[0].extra_header),e.data[0].all_phases.forEach(function(e){t.push(e.display_name)}),t}},{key:"_getHeaders",value:function(e){var t=[];return e.data[0].is_layered_product&&t.push(e.data[0].extra_header),e.data[0].all_phases.forEach(function(e){t.push(e.name)}),t}},{key:"_construct",value:function(d,e,s){var c=this,p="",h="",u="",f="",b="",_="",t='<th scope="col">Version</th>',a=d.data[0].versions,m=d.data[0].show_last_minor_release,y=d.data[0].is_layered_product;this.shadowRoot.querySelector(".product-lifecycle-info__product-name").innerText=d.data[0].name,this.shadowRoot.querySelectorAll(".sr-only").forEach(function(e){return e.innerText=""+d.data[0].name}),e.forEach(function(e){t+='<th scope="col">'+e+"</th>"}),m&&(t+='<th scope="col">Last minor release</th>'),a.forEach(function(e,t){var a="",n="",i="",r="",o="",l="";"Full Support"===e.type&&(c._fullSupport=!0,a='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),"Maintenance Support"===e.type&&(c._maintenanceSupport=!0,n='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),"Extended Support"===e.type&&(c._extendedSupport=!0,i='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),"End of Maintenance"===e.type&&(c._endOfMaintenance=!0,o='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),"End of life"===e.type&&(c._endOfLife=!0,r='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),""!==e.type&&null!==e.type||(c._uncategorized=!0,l='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),p+=a,h+=n,u+=i,f+=r,b+=o,_+=l}),this._fullSupport?this._fullSupportTable.removeAttribute("hidden"):this._fullSupportTable.setAttribute("hidden",!0),this._maintenanceSupport?this._maintenanceSupportTable.removeAttribute("hidden"):this._maintenanceSupportTable.setAttribute("hidden",!0),this._extendedSupport?this._extendedSupportTable.removeAttribute("hidden"):this._extendedSupportTable.setAttribute("hidden",!0),this._endOfMaintenance?this._endOfMaintenanceTable.removeAttribute("hidden"):this._endOfMaintenanceTable.setAttribute("hidden",!0),(!this._endOfLife||this._endOfLife&&this._plccApplication)&&this._endOfLifeTable.setAttribute("hidden",!0),this._uncategorized?this._uncategorizedTable.removeAttribute("hidden"):this._uncategorizedTable.setAttribute("hidden",!0),this._phaseRow.forEach(function(e){e.innerHTML=t}),this._fullSupportBody.innerHTML=p,this._maintenanceSupportBody.innerHTML=h,this._extendedSupportBody.innerHTML=u,this._endOfLifeBody.innerHTML=f,this._endOfMaintenanceBody.innerHTML=b,this._uncategorizedBody.innerHTML=_}},{key:"_parseDate",value:function(e,t){return"string"===t?e:"<pfe-datetime datetime="+e+' day="numeric" month="long" year="numeric" time-zone="UTC"></pfe-datetime>'}},{key:"_handleHideEOL",value:function(e){e?this._endOfLifeTable.setAttribute("hidden",!0):this._endOfLifeTable.removeAttribute("hidden")}},{key:"_handleBtnClick",value:function(){this.emitEvent(i.events.close)}}]),i);function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,i,{type:i.PfeType}));return e._handleBtnClick=e._handleBtnClick.bind(e),e._data=null,e._fullSupport=!1,e._maintenanceSupport=!1,e._extendedSupport=!1,e._uncategorized=!1,e._endOfMaintenance=!1,e._endOfLife=!1,e._plccApplication=!1,e._disclaimer=e.shadowRoot.querySelector("#plcc-disclaimer"),e._article=e.shadowRoot.querySelector("article"),e._header=e.shadowRoot.querySelector("header"),e._links=e.shadowRoot.querySelectorAll("a"),e._appMarkup=e.shadowRoot.querySelectorAll(".application"),e._fullSupportTable=e.shadowRoot.querySelector("#product-lifecycle-full-support"),e._maintenanceSupportTable=e.shadowRoot.querySelector("#product-lifecycle-maintenance-support"),e._extendedSupportTable=e.shadowRoot.querySelector("#product-lifecycle-extended-support"),e._endOfMaintenanceTable=e.shadowRoot.querySelector("#product-lifecycle-end-of-maintenance"),e._endOfLifeTable=e.shadowRoot.querySelector("#product-lifecycle-end-of-life"),e._uncategorizedTable=e.shadowRoot.querySelector("#product-lifecycle-uncategorized"),e._fullSupportBody=e.shadowRoot.querySelector("#product-lifecycle-full-support tbody"),e._maintenanceSupportBody=e.shadowRoot.querySelector("#product-lifecycle-maintenance-support tbody"),e._extendedSupportBody=e.shadowRoot.querySelector("#product-lifecycle-extended-support tbody"),e._endOfMaintenanceBody=e.shadowRoot.querySelector("#product-lifecycle-end-of-maintenance tbody"),e._endOfLifeBody=e.shadowRoot.querySelector("#product-lifecycle-end-of-life tbody"),e._uncategorizedBody=e.shadowRoot.querySelector("#product-lifecycle-uncategorized tbody"),e._caption=e.shadowRoot.querySelector("caption"),e._phaseRow=e.shadowRoot.querySelectorAll(".product-phases"),e._versionToggleRow=e.shadowRoot.querySelectorAll("version-toggle-row"),e._versionToggle=e.shadowRoot.querySelector("#unsupported-versions"),e._closeBtn=e.shadowRoot.querySelector("#close-btn"),e._loadingIndicator=e.shadowRoot.querySelector("#loading"),e.loading=!1,e}return e.create(a),a}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("../../../@patternfly/pfelement/dist/pfelement.umd.min.js"),require("../../../@patternfly/pfe-progress-indicator/dist/pfe-progress-indicator.umd.min.js"),require("../../../@patternfly/pfe-datetime/dist/pfe-datetime.umd.min.js")):"function"==typeof define&&define.amd?define(["../../../@patternfly/pfelement/dist/pfelement.umd.min.js","../../../@patternfly/pfe-progress-indicator/dist/pfe-progress-indicator.umd.min.js","../../../@patternfly/pfe-datetime/dist/pfe-datetime.umd.min.js"],t):e.PlccTable=t(e.PFElement)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t=function(e,t,a){return t&&n(e.prototype,t),a&&n(e,a),e};function n(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,e),t(i,[{key:"html",get:function(){return'<style>.product-lifecycle-info__table thead,.sr-only{position:absolute;overflow:hidden;clip:rect(0,0,0,0);height:1px;width:1px;margin:-1px;padding:0;border:0}:host{display:block}:host([hidden]){display:none}:host([loading]) article{display:none}article{display:block;font-size:16px;line-height:1.5;color:#151515}#loading{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;min-height:100px}#loading.loading{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.u-no-break{white-space:nowrap}*{-webkit-box-sizing:border-box;box-sizing:border-box}.icon-close{position:relative;width:1.5em;height:1.5em;margin:0;padding:0;border:0;font-size:2rem;background:0 0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.icon-close__inner1{position:absolute;top:50%;left:50%;width:0;height:0;font-size:4rem;-webkit-transform:translate(-50%,-50%) scale(.125);transform:translate(-50%,-50%) scale(.125)}.icon-close__inner1:after,.icon-close__inner1:before{content:"";position:absolute;top:0;left:0;display:block;width:.3em;height:2em;background:#000}.icon-close:focus .icon-close__inner1:after,.icon-close:focus .icon-close__inner1:before,.icon-close:hover .icon-close__inner1:after,.icon-close:hover .icon-close__inner1:before{background:#06c}.icon-close__inner1:before{-webkit-transform:translate(-50%,-50%) rotate(-45deg);transform:translate(-50%,-50%) rotate(-45deg)}.icon-close__inner1:after{-webkit-transform:translate(-50%,-50%) rotate(45deg);transform:translate(-50%,-50%) rotate(45deg)}article{font-size:1rem;line-height:1.5;color:#151515}.product-lifecycle__wrapper{position:relative}.product-lifecycle__wrapper--listing{border:1px solid #d2d2d2}.product-lifecycle__header{padding:1.125rem}@media (min-width:650px){.product-lifecycle__header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:1rem}}.product-lifecycle__header--more-info{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}@media (min-width:1080px){.product-lifecycle__header--more-info{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}}.product-lifecycle__header--more-info>*{margin-bottom:.5em}@media (min-width:1080px){.product-lifecycle__header--more-info>*{margin-right:1.5rem}}.product-lifecycle__header--more-info>:last-child{margin-right:0}.product-lifecycle-info__product-name{font-size:1.25em;font-weight:400;width:100%}.product-lifecycle__header--less-info .product-lifecycle-info__product-name{margin-right:auto;width:auto}.product-lifecycle-info__detailed-info{margin-right:auto}.product-lifecycle__header--more-info .product-lifecycle-info__detailed-info{margin-bottom:1em}[type=checkbox]{margin-right:.25em}.product-lifecycle__close{position:absolute;top:0;right:0;cursor:pointer}table{min-width:100%;border:0}@media (min-width:650px){table{position:relative;margin-left:0;margin-right:0}}.product-lifecycle-info__table-headers{position:-webkit-sticky;position:sticky;top:0;z-index:999;display:none;background:#fff}@media (min-width:1000px){.product-lifecycle-info__table-headers{display:table}}.product-lifecycle-info__table{border-top:0}caption,td,th{padding:1.125rem;border:0;text-align:left}caption *,td *,th *{margin:0;padding:0}th{font-weight:700;vertical-align:bottom}@media (min-width:1000px){td:nth-last-child(2):first-child~td,td:nth-last-child(2):first-child~th,th:nth-last-child(2):first-child~td,th:nth-last-child(2):first-child~th{width:50%}}@media (min-width:1000px){td:nth-last-child(3):first-child~td,td:nth-last-child(3):first-child~th,th:nth-last-child(3):first-child~td,th:nth-last-child(3):first-child~th{width:33.33333%}}@media (min-width:1000px){td:nth-last-child(4):first-child~td,td:nth-last-child(4):first-child~th,th:nth-last-child(4):first-child~td,th:nth-last-child(4):first-child~th{width:25%}}@media (min-width:1000px){td:nth-last-child(5):first-child~td,td:nth-last-child(5):first-child~th,th:nth-last-child(5):first-child~td,th:nth-last-child(5):first-child~th{width:20%}}@media (min-width:1000px){td:nth-last-child(6):first-child~td,td:nth-last-child(6):first-child~th,th:nth-last-child(6):first-child~td,th:nth-last-child(6):first-child~th{width:16.66667%}}@media (min-width:1000px){td:nth-last-child(7):first-child~td,td:nth-last-child(7):first-child~th,th:nth-last-child(7):first-child~td,th:nth-last-child(7):first-child~th{width:14.28571%}}@media (min-width:1000px){td:nth-last-child(8):first-child~td,td:nth-last-child(8):first-child~th,th:nth-last-child(8):first-child~td,th:nth-last-child(8):first-child~th{width:12.5%}}@media (min-width:1000px){td:nth-last-child(9):first-child~td,td:nth-last-child(9):first-child~th,th:nth-last-child(9):first-child~td,th:nth-last-child(9):first-child~th{width:11.11111%}}th{margin-top:1rem;border-top:4px solid #d2d2d2;border-bottom:1px solid #d2d2d2}tbody tr:first-child th{border-top:0;margin-top:0}@media (min-width:1000px){th{margin-top:0;border-top:0}}th[scope=row]{font-weight:inherit}td{padding:.5rem 1.125rem;border:0}@media (min-width:1000px){td{border-bottom:1px solid #d2d2d2}}@media (min-width:1000px){td,th{padding:1rem}}caption{padding:16px 24px;border-bottom:3px solid #d2d2d2}.responsive-table--row-strategy thead{display:none}@media (min-width:1000px){.responsive-table--row-strategy thead{display:table-header-group}}.responsive-table--row-strategy td,.responsive-table--row-strategy th{display:block}@media (min-width:1000px){.responsive-table--row-strategy td,.responsive-table--row-strategy th{display:table-cell}}.responsive-table--row-strategy td:before,.responsive-table--row-strategy th:before{content:attr(data-label) ": ";font-weight:700}@media (min-width:1000px){.responsive-table--row-strategy td:before,.responsive-table--row-strategy th:before{content:none}}.responsive-table--column-strategy{display:none}@media (min-width:1000px){.responsive-table--column-strategy{display:table}}@media (min-width:1000px){.responsive-table__wrapper--column-strategy .responsive-table__mobile-alternative{display:none}}.responsive-table__wrapper--scroll-strategy{overflow-x:auto}@media (min-width:1000px){.responsive-table__wrapper--scroll-strategy{overflow:hidden}}:host([pfe-c-style=compact]) .lifecycle-table__product-name,:host([pfe-c-style=compact]) table{font-size:.875rem;line-height:1.5}:host([pfe-c-style=compact]) .product-lifecycle-info__table-headers{border:0}:host([pfe-c-style=compact]) caption,:host([pfe-c-style=compact]) td,:host([pfe-c-style=compact]) th{padding:.57143em}:host([pfe-c-style=compact]) caption:first-child,:host([pfe-c-style=compact]) td:first-child,:host([pfe-c-style=compact]) th:first-child{padding-left:1.14286em}:host([pfe-c-style=compact]) caption:last-child,:host([pfe-c-style=compact]) td:last-child,:host([pfe-c-style=compact]) th:last-child{padding-right:1.14286em}:host([pfe-c-style=compact]) th{border-top-width:2px;padding-top:.85714em}:host([pfe-c-style=compact]) caption{padding-top:1.14286em;border-bottom-width:1px}\n/*# sourceMappingURL=plcc-table.min.css.map */\n</style><div id="loading" hidden>\n <pfe-progress-indicator></pfe-progress-indicator>\n</div>\n<article class="product-lifecycle__wrapper" id="product-lifecycle__wrapper--listing">\n <button class="product-lifecycle__close icon-close application" id="close-btn" aria-label="Closes Red Hat OpenStack Platform Table" hidden>\n <div class="icon-close__inner1"></div>\n </button>\n <h2 class="product-lifecycle-info__product-name sr-only"></h2>\n\n <table border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table-headers" aria-hidden>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n </table>\n\n <table id="product-lifecycle-full-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--supported responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Full support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-maintenance-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--purgatory responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Maintenance support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-extended-support" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--purgatory responsive-table responsive-table--row-strategy">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Extended support <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <table id="product-lifecycle-end-of-maintenance" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--unsupported responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n End of maintenance <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n\n <table id="product-lifecycle-end-of-life" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--unsupported responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n End of life <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <table id="product-lifecycle-uncategorized" border="0" cellspacing="0" cellpadding="0" class="product-lifecycle-info__table product-lifecycle-info__table--uncatagorized responsive-table responsive-table--row-strategy ">\n <caption>\n <h3 class="lifecycle-table__product-name">\n Uncategorized <span class="sr-only"></span>\n </h3>\n </caption>\n <thead>\n <tr class="product-phases"></tr>\n </thead>\n <tbody></tbody>\n </table>\n <p id="plcc-disclaimer">All future dates mentioned are close approximations, non definitive, and subject to change.</p>\n</article>'}},{key:"schemaUrl",get:function(){return"plcc-table.json"}},{key:"templateUrl",get:function(){return"plcc-table.html"}},{key:"styleUrl",get:function(){return"plcc-table.scss"}},{key:"productName",get:function(){return this.getAttribute("product-name")}},{key:"app",get:function(){return this.getAttribute("app")}},{key:"hideEOL",get:function(){return this.getAttribute("hide-eol")}},{key:"loading",get:function(){return this.hasAttribute("loading")},set:function(e){e?(this._loadingIndicator.removeAttribute("hidden"),this._loadingIndicator.classList.add("loading"),this.setAttribute("loading",!0)):(this._loadingIndicator.setAttribute("hidden",!0),this._loadingIndicator.classList.remove("loading"),this.removeAttribute("loading"))}},{key:"tableData",get:function(){return this._data},set:function(e){if(e){this.loading=!0,this._data=e;var t=this._getDisplayHeaders(this._data),a=this._getHeaders(this._data);this._construct(this._data,t,a),this.loading=!1}}}],[{key:"version",get:function(){return"1.1.0"}},{key:"properties",get:function(){return{}}},{key:"slots",get:function(){return{default:{title:"Default slot",type:"array",namedSlot:!1,items:{oneOf:[{$ref:"raw"}]}}}}},{key:"tag",get:function(){return"plcc-table"}},{key:"events",get:function(){return{close:this.tag+":close"}}},{key:"observedAttributes",get:function(){return["product-name","hide-eol","app"]}},{key:"PfeType",get:function(){return e.PfeTypes.Component}}]),t(i,[{key:"disconnectedCallback",value:function(){this._closeBtn.removeEventListener("click",this._handleBtnClick)}},{key:"attributeChangedCallback",value:function(e,t,a){var n=this;(function e(t,a,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,a);if(void 0===i){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,a,n)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(n):void 0})(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"attributeChangedCallback",this).call(this,e,t,a),"product-name"===e&&this._requestProduct(a).then(function(e){n.tableData=e}).catch(function(e){console.error(e)}),"hide-eol"===e&&this._handleHideEOL(this.hasAttribute("hide-eol")),"app"===e&&(this.hasAttribute("app")?this._disclaimer.setAttribute("hidden",!0):this._disclaimer.removeAttribute("hidden"))}},{key:"_requestProduct",value:function(n){var i=this;return this.loading=!0,new Promise(function(e,t){var a=new XMLHttpRequest;a.open("GET","https://access.redhat.com/product-life-cycles/api/v1/products?name="+n),a.responseType="json",a.onload=function(){400<=a.status?t(a.response):e(a.response),i.loading=!1},a.onerror=function(e){t(e,"Something went wrong."),i.loading=!1},a.send()})}},{key:"_getDisplayHeaders",value:function(e){var t=[];return e.data[0].is_layered_product&&t.push(e.data[0].extra_header),e.data[0].all_phases.forEach(function(e){t.push(e.display_name)}),t}},{key:"_getHeaders",value:function(e){var t=[];return e.data[0].is_layered_product&&t.push(e.data[0].extra_header),e.data[0].all_phases.forEach(function(e){t.push(e.name)}),t}},{key:"_construct",value:function(d,e,s){var c=this,p="",h="",u="",f="",b="",_="",t='<th scope="col">Version</th>',a=d.data[0].versions,m=d.data[0].show_last_minor_release,y=d.data[0].is_layered_product;this.shadowRoot.querySelector(".product-lifecycle-info__product-name").innerText=d.data[0].name,this.shadowRoot.querySelectorAll(".sr-only").forEach(function(e){return e.innerText=""+d.data[0].name}),e.forEach(function(e){t+='<th scope="col">'+e+"</th>"}),m&&(t+='<th scope="col">Last minor release</th>'),a.forEach(function(e,t){var a="",n="",i="",r="",o="",l="";"Full Support"===e.type&&(c._fullSupport=!0,a='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),"Maintenance Support"===e.type&&(c._maintenanceSupport=!0,n='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),"Extended Support"===e.type&&(c._extendedSupport=!0,i='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),"End of Maintenance"===e.type&&(c._endOfMaintenance=!0,o='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),"End of life"===e.type&&(c._endOfLife=!0,r='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),""!==e.type&&null!==e.type||(c._uncategorized=!0,l='\n <tr>\n <th scope="row" data-label="Version">'+e.name+"</th>\n "+(y?null!==e.extra_header_value?'<td data-label="'+d.data[0].extra_header+'">'+e.extra_header_value+"</td>":'<td data-label="'+d.data[0].extra_header+'">N/A</td>':"")+"\n "+e.phases.map(function(e){return s.includes(e.name)?'<td data-label="'+e.name+'">'+c._parseDate(e.date,e.date_format)+"</td>":'<td data-label="'+e.name+'">N/A</td>'}).join("")+"\n "+(m?null!==e.last_minor_release?'<td data-label="Last minor release">'+e.last_minor_release+"</td>":'<td data-label="Last minor release">N/A</td>':"")+"\n </tr>\n "),p+=a,h+=n,u+=i,f+=r,b+=o,_+=l}),this._fullSupport?this._fullSupportTable.removeAttribute("hidden"):this._fullSupportTable.setAttribute("hidden",!0),this._maintenanceSupport?this._maintenanceSupportTable.removeAttribute("hidden"):this._maintenanceSupportTable.setAttribute("hidden",!0),this._extendedSupport?this._extendedSupportTable.removeAttribute("hidden"):this._extendedSupportTable.setAttribute("hidden",!0),this._endOfMaintenance?this._endOfMaintenanceTable.removeAttribute("hidden"):this._endOfMaintenanceTable.setAttribute("hidden",!0),this._endOfLife?this._endOfLife&&this._plccApplication&&this._endOfLifeTable.setAttribute("hidden",!0):this._endOfLifeTable.setAttribute("hidden",!0),this._uncategorized?this._uncategorizedTable.removeAttribute("hidden"):this._uncategorizedTable.setAttribute("hidden",!0),this._phaseRow.forEach(function(e){e.innerHTML=t}),this._fullSupportBody.innerHTML=p,this._maintenanceSupportBody.innerHTML=h,this._extendedSupportBody.innerHTML=u,this._endOfLifeBody.innerHTML=f,this._endOfMaintenanceBody.innerHTML=b,this._uncategorizedBody.innerHTML=_}},{key:"_parseDate",value:function(e,t){return"string"===t?e:"<pfe-datetime datetime="+e+' day="numeric" month="long" year="numeric" time-zone="UTC"></pfe-datetime>'}},{key:"_handleHideEOL",value:function(e){e?this._endOfLifeTable.setAttribute("hidden",!0):this._endOfLifeTable.removeAttribute("hidden")}},{key:"_handleBtnClick",value:function(e){this.emitEvent(i.events.close)}}]),i);function i(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,i,{type:i.PfeType}));return e._handleBtnClick=e._handleBtnClick.bind(e),e._data=null,e._fullSupport=!1,e._maintenanceSupport=!1,e._extendedSupport=!1,e._uncategorized=!1,e._endOfMaintenance=!1,e._endOfLife=!1,e._plccApplication=!1,e._disclaimer=e.shadowRoot.querySelector("#plcc-disclaimer"),e._article=e.shadowRoot.querySelector("article"),e._header=e.shadowRoot.querySelector("header"),e._links=e.shadowRoot.querySelectorAll("a"),e._appMarkup=e.shadowRoot.querySelectorAll(".application"),e._fullSupportTable=e.shadowRoot.querySelector("#product-lifecycle-full-support"),e._maintenanceSupportTable=e.shadowRoot.querySelector("#product-lifecycle-maintenance-support"),e._extendedSupportTable=e.shadowRoot.querySelector("#product-lifecycle-extended-support"),e._endOfMaintenanceTable=e.shadowRoot.querySelector("#product-lifecycle-end-of-maintenance"),e._endOfLifeTable=e.shadowRoot.querySelector("#product-lifecycle-end-of-life"),e._uncategorizedTable=e.shadowRoot.querySelector("#product-lifecycle-uncategorized"),e._fullSupportBody=e.shadowRoot.querySelector("#product-lifecycle-full-support tbody"),e._maintenanceSupportBody=e.shadowRoot.querySelector("#product-lifecycle-maintenance-support tbody"),e._extendedSupportBody=e.shadowRoot.querySelector("#product-lifecycle-extended-support tbody"),e._endOfMaintenanceBody=e.shadowRoot.querySelector("#product-lifecycle-end-of-maintenance tbody"),e._endOfLifeBody=e.shadowRoot.querySelector("#product-lifecycle-end-of-life tbody"),e._uncategorizedBody=e.shadowRoot.querySelector("#product-lifecycle-uncategorized tbody"),e._caption=e.shadowRoot.querySelector("caption"),e._phaseRow=e.shadowRoot.querySelectorAll(".product-phases"),e._versionToggleRow=e.shadowRoot.querySelectorAll("version-toggle-row"),e._versionToggle=e.shadowRoot.querySelector("#unsupported-versions"),e._closeBtn=e.shadowRoot.querySelector("#close-btn"),e._loadingIndicator=e.shadowRoot.querySelector("#loading"),e.loading=!1,e}return e.create(a),a}); | ||
//# sourceMappingURL=plcc-table.umd.min.js.map |
@@ -15,3 +15,3 @@ { | ||
}, | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"keywords": [ | ||
@@ -23,3 +23,4 @@ "web-components", | ||
"type": "git", | ||
"url": "" | ||
"url": "https://gitlab.cee.redhat.com/customer-platform/cp-elements", | ||
"directory": "elements/plcc-table" | ||
}, | ||
@@ -36,7 +37,5 @@ "publishConfig": { | ||
"scripts": { | ||
"gulp": "gulp", | ||
"start": "npm run dev", | ||
"dev": "gulp dev", | ||
"build": "gulp", | ||
"test": "wct" | ||
"build": "../../node_modules/.bin/gulp && ../../node_modules/.bin/prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}'", | ||
"dev": "../../node_modules/.bin/gulp dev", | ||
"test": "../../node_modules/.bin/wct --configFile ../../wct.conf.json elements/plcc-table/test/" | ||
}, | ||
@@ -56,6 +55,6 @@ "contributors": [ | ||
"dependencies": { | ||
"@patternfly/pfe-datetime": "^1.0.0-prerelease.48", | ||
"@patternfly/pfe-progress-indicator": "^1.0.0-prerelease.48", | ||
"@patternfly/pfe-sass": "^1.0.0-prerelease.45", | ||
"@patternfly/pfelement": "^1.0.0-prerelease.48" | ||
"@patternfly/pfe-datetime": "^1.3.0", | ||
"@patternfly/pfe-progress-indicator": "^1.3.0", | ||
"@patternfly/pfe-sass": "^1.3.0", | ||
"@patternfly/pfelement": "^1.3.0" | ||
}, | ||
@@ -71,21 +70,3 @@ "devDependencies": { | ||
"decomment": "^0.9.2", | ||
"gulp": "^4.0.0", | ||
"gulp-banner": "^0.1.3", | ||
"gulp-clean": "^0.4.0", | ||
"gulp-clean-css": "^4.3.0", | ||
"gulp-postcss": "^8.0.0", | ||
"gulp-rename": "^1.4.0", | ||
"gulp-replace": "^1.0.0", | ||
"gulp-sass": "^4.1.0", | ||
"gulp-shell": "^0.6.5", | ||
"node-sass": "^4.14.1", | ||
"postcss-custom-properties": "^9.1.1", | ||
"requirejs": "^2.3.6", | ||
"rollup": "^0.66.6", | ||
"rollup-plugin-babel": "^3.0.7", | ||
"rollup-plugin-commonjs": "^9.1.5", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"rollup-plugin-re": "^1.0.7", | ||
"rollup-plugin-terser": "^5.3.0", | ||
"rollup-plugin-uglify": "^4.0.0", | ||
"strip-css-comments": "^3.0.0", | ||
@@ -92,0 +73,0 @@ "trim": "0.0.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
295772
13
1471
3
12