@digital-realty/ix-widget 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ix-launchpad.d.ts
CHANGED
package/dist/ix-launchpad.js
CHANGED
|
@@ -21,6 +21,7 @@ let IxLaunchpad = class IxLaunchpad extends LitElement {
|
|
|
21
21
|
this.promotions = [];
|
|
22
22
|
this.kbImgBaseUrl = '';
|
|
23
23
|
this.kbLinkBaseUrl = '';
|
|
24
|
+
this.kbNewsViewAllUrl = '/knowledge-base/category/whats-new/';
|
|
24
25
|
this.knowledgebase = '';
|
|
25
26
|
this.updates = {
|
|
26
27
|
columns: [],
|
|
@@ -92,8 +93,11 @@ let IxLaunchpad = class IxLaunchpad extends LitElement {
|
|
|
92
93
|
${((_a = this.news) === null || _a === void 0 ? void 0 : _a.length)
|
|
93
94
|
? html `<ix-news-feed
|
|
94
95
|
header="What's New"
|
|
95
|
-
.data=${this.news
|
|
96
|
-
|
|
96
|
+
.data=${this.news.map(item => ({
|
|
97
|
+
...item,
|
|
98
|
+
uid: `${this.kbLinkBaseUrl}${item.uid}`,
|
|
99
|
+
}))}
|
|
100
|
+
.href=${this.kbNewsViewAllUrl}
|
|
97
101
|
></ix-news-feed>`
|
|
98
102
|
: nothing}
|
|
99
103
|
${((_b = this.resources) === null || _b === void 0 ? void 0 : _b.length)
|
|
@@ -195,6 +199,9 @@ __decorate([
|
|
|
195
199
|
__decorate([
|
|
196
200
|
property({ type: String, attribute: 'kb-link-base-url' })
|
|
197
201
|
], IxLaunchpad.prototype, "kbLinkBaseUrl", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
property({ type: String, attribute: 'kb-news-view-all-url' })
|
|
204
|
+
], IxLaunchpad.prototype, "kbNewsViewAllUrl", void 0);
|
|
198
205
|
__decorate([
|
|
199
206
|
property({ type: String })
|
|
200
207
|
], IxLaunchpad.prototype, "knowledgebase", void 0);
|
package/dist/ix-launchpad.js.map
CH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gBAAgB,EAAE;;;;KAItD,CAAC;IACJ,CAAC;;AAlLM,kBAAM,GAAG,CAAC,iBAAiB,CAAC,AAAtB,CAAuB;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAW;AAEX;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;2CAAa;AAEZ;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;wCAAU;AAET;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yCAA2B;AAEzB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAoB;AAEpB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CAAgC;AAE/B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;+CAAiC;AAED;IAAzD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;iDAAmB;AAEjB;IAA1D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;kDAAoB;AAElD;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAoB;AAEnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAKzB;AAE0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAMzB;AApCS,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAoLvB","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport './ix-status-counter-group.js';\nimport './ix-contacts.js';\nimport './ix-info-card.js';\nimport './ix-news-feed.js';\nimport './ix-table-data.js';\nimport './ix-nav-item.js';\nimport './ix-nav-list.js';\nimport { IxLaunchpadStyles } from './styles/launchpad-styles.js';\n\nexport interface NavItem {\n icon: string;\n target: string;\n name: string;\n}\n\nexport interface NavList {\n header: string;\n items: NavItem[];\n}\n\nexport interface Topic {\n name: string;\n}\n\nexport interface InfoCardItem {\n thumbnail: {\n alternativeText: string;\n url: string;\n };\n topics: Topic[];\n title: string;\n abstract: string;\n uid: string;\n}\n\nexport interface TableDataItem {\n columns: string[];\n rows?: string[];\n header: string;\n href: string;\n disabled?: boolean;\n isAuthorizedToView?: boolean;\n}\n\n@customElement('ix-launchpad')\nexport class IxLaunchpad extends LitElement {\n static styles = [IxLaunchpadStyles];\n\n @property({ type: Object }) data = {};\n\n @property({ type: Array }) status = [];\n\n @property({ type: Array }) nav = [];\n\n @property({ type: Array }) news: InfoCardItem[] = [];\n\n @property({ type: Object }) contacts: any = {};\n\n @property({ type: Array }) resources: InfoCardItem[] = [];\n\n @property({ type: Array }) promotions: InfoCardItem[] = [];\n\n @property({ type: String, attribute: 'kb-img-base-url' }) kbImgBaseUrl = '';\n\n @property({ type: String, attribute: 'kb-link-base-url' }) kbLinkBaseUrl = '';\n\n @property({ type: String }) knowledgebase = '';\n\n @property({ type: Object }) updates: TableDataItem = {\n columns: [],\n rows: [],\n header: '',\n href: '',\n };\n\n @property({ type: Object }) actions: TableDataItem = {\n columns: [],\n rows: [],\n header: '',\n href: '',\n disabled: true,\n };\n\n renderNavigation = () => html`\n ${this.nav.map(\n (nav: NavList) => html` <ix-nav-list .header=\"${nav.header}\">\n ${nav.items.map(\n (item: NavItem) =>\n html`<ix-nav-item .icon=${item?.icon} .target=${item?.target}\n >${item.name}</ix-nav-item\n >`\n )}\n </ix-nav-list>`\n )}\n `;\n\n renderTicketUpdatesGrid = () => html`<ix-table-data\n .columns=${this.updates.columns}\n .rows=${this.updates.rows}\n .header=${this.updates.header}\n .href=${this.updates.href}\n ?disabled=${this.updates.disabled}\n emptyDescription=\"No Recent Service Ticket Updates\"\n showViewAllButtonOnEmpty\n >\n </ix-table-data>`;\n\n renderActionsRequiredGrid = () => html`<ix-table-data\n .columns=${this.actions.columns}\n .rows=${this.actions.rows}\n .header=${this.actions.header}\n .href=${this.actions.href}\n ?disabled=${this.actions.disabled}\n emptyDescription=\"No Pending Actions\"\n >\n </ix-table-data>`;\n\n protected override render() {\n return html`\n <main class=\"wrapper\">\n <section>\n <div class=\"container\">\n <div class=\"content\">\n <ix-status-counter-group\n .data=${this.status}\n ></ix-status-counter-group>\n\n ${this.actions.isAuthorizedToView\n ? this.renderActionsRequiredGrid()\n : nothing}\n ${this.updates.isAuthorizedToView\n ? this.renderTicketUpdatesGrid()\n : nothing}\n\n <nav>${this.renderNavigation()}</nav>\n\n ${this.knowledgebase !== ''\n ? html` <iframe\n class=\"knowledge-base\"\n title=\"knowledge base\"\n .src=${this.knowledgebase}\n ></iframe>`\n : nothing}\n ${this.news?.length\n ? html`<ix-news-feed\n header=\"What's New\"\n .data=${this.news}\n href=\"/news\"\n ></ix-news-feed>`\n : nothing}\n ${this.resources?.length\n ? html`<div class=\"news-info\">\n <h2>Resources</h2>\n <div class=\"resources\">\n ${this.resources.map(\n item => html` <a\n href=${`${this.kbLinkBaseUrl}${item.uid}`}\n ><ix-info-card type=\"info-card-resources\"\n ><img\n slot=\"image\"\n name=\"image\"\n alt=${item?.thumbnail?.alternativeText || ''}\n src=\"${`${this.kbImgBaseUrl}${encodeURIComponent(\n item.thumbnail.url\n )}&w=3840&q=75`}\"\n />\n\n <div slot=\"title\">${item.title}</div>\n <ix-button\n slot=\"cta\"\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n Learn more\n </ix-button>\n </ix-info-card></a\n >`\n )}\n </div>\n\n <h2 class=\"\">News & Promotions</h2>\n <div class=\"newsAndPromotions\">\n ${this.promotions.map(\n item => html` <a\n href=${`${this.kbLinkBaseUrl}${item.uid}`}\n ><ix-info-card type=\"info-card\">\n <img\n slot=\"image\"\n name=\"image\"\n alt=\"${item.thumbnail.alternativeText}\"\n src=\"${`${this.kbImgBaseUrl}${encodeURIComponent(\n item.thumbnail.url\n )}&w=3840&q=75`}\"\n />\n <div slot=\"title\">${item.title}</div>\n <div slot=\"description\">${item.abstract}</div>\n <ix-button\n slot=\"cta\"\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n Learn more\n </ix-button>\n </ix-info-card></a\n >`\n )}\n </div>\n </div>`\n : nothing}\n ${this.contacts?.email\n ? html`<ix-contacts .contacts=${this.contacts}></ix-contacts>`\n : nothing}\n </div>\n <nav class=\"side-nav\">${this.renderNavigation()}</nav>\n </div>\n </section>\n </main>\n `;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ix-launchpad.js","sourceRoot":"","sources":["../src/ix-launchpad.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,8BAA8B,CAAC;AACtC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAsC1D,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAGuB,SAAI,GAAG,EAAE,CAAC;QAEX,WAAM,GAAG,EAAE,CAAC;QAEZ,QAAG,GAAG,EAAE,CAAC;QAET,SAAI,GAAmB,EAAE,CAAC;QAEzB,aAAQ,GAAQ,EAAE,CAAC;QAEpB,cAAS,GAAmB,EAAE,CAAC;QAE/B,eAAU,GAAmB,EAAE,CAAC;Q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AE,IAAI,EAAE,KAAK,EAAE,CAAC;+CAAiC;AAED;IAAzD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;iDAAmB;AAEjB;IAA1D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;kDAAoB;AAG9E;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC;qDACL;AAE7B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAoB;AAEnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAKzB;AAE0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAMzB;AAvCS,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CA0LvB","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport './ix-status-counter-group.js';\nimport './ix-contacts.js';\nimport './ix-info-card.js';\nimport './ix-news-feed.js';\nimport './ix-table-data.js';\nimport './ix-nav-item.js';\nimport './ix-nav-list.js';\nimport { IxLaunchpadStyles } from './styles/launchpad-styles.js';\n\nexport interface NavItem {\n icon: string;\n target: string;\n name: string;\n}\n\nexport interface NavList {\n header: string;\n items: NavItem[];\n}\n\nexport interface Topic {\n name: string;\n}\n\nexport interface InfoCardItem {\n thumbnail: {\n alternativeText: string;\n url: string;\n };\n topics: Topic[];\n title: string;\n abstract: string;\n uid: string;\n}\n\nexport interface TableDataItem {\n columns: string[];\n rows?: string[];\n header: string;\n href: string;\n disabled?: boolean;\n isAuthorizedToView?: boolean;\n}\n\n@customElement('ix-launchpad')\nexport class IxLaunchpad extends LitElement {\n static styles = [IxLaunchpadStyles];\n\n @property({ type: Object }) data = {};\n\n @property({ type: Array }) status = [];\n\n @property({ type: Array }) nav = [];\n\n @property({ type: Array }) news: InfoCardItem[] = [];\n\n @property({ type: Object }) contacts: any = {};\n\n @property({ type: Array }) resources: InfoCardItem[] = [];\n\n @property({ type: Array }) promotions: InfoCardItem[] = [];\n\n @property({ type: String, attribute: 'kb-img-base-url' }) kbImgBaseUrl = '';\n\n @property({ type: String, attribute: 'kb-link-base-url' }) kbLinkBaseUrl = '';\n\n @property({ type: String, attribute: 'kb-news-view-all-url' })\n kbNewsViewAllUrl = '/knowledge-base/category/whats-new/';\n\n @property({ type: String }) knowledgebase = '';\n\n @property({ type: Object }) updates: TableDataItem = {\n columns: [],\n rows: [],\n header: '',\n href: '',\n };\n\n @property({ type: Object }) actions: TableDataItem = {\n columns: [],\n rows: [],\n header: '',\n href: '',\n disabled: true,\n };\n\n renderNavigation = () => html`\n ${this.nav.map(\n (nav: NavList) => html` <ix-nav-list .header=\"${nav.header}\">\n ${nav.items.map(\n (item: NavItem) =>\n html`<ix-nav-item .icon=${item?.icon} .target=${item?.target}\n >${item.name}</ix-nav-item\n >`\n )}\n </ix-nav-list>`\n )}\n `;\n\n renderTicketUpdatesGrid = () => html`<ix-table-data\n .columns=${this.updates.columns}\n .rows=${this.updates.rows}\n .header=${this.updates.header}\n .href=${this.updates.href}\n ?disabled=${this.updates.disabled}\n emptyDescription=\"No Recent Service Ticket Updates\"\n showViewAllButtonOnEmpty\n >\n </ix-table-data>`;\n\n renderActionsRequiredGrid = () => html`<ix-table-data\n .columns=${this.actions.columns}\n .rows=${this.actions.rows}\n .header=${this.actions.header}\n .href=${this.actions.href}\n ?disabled=${this.actions.disabled}\n emptyDescription=\"No Pending Actions\"\n >\n </ix-table-data>`;\n\n protected override render() {\n return html`\n <main class=\"wrapper\">\n <section>\n <div class=\"container\">\n <div class=\"content\">\n <ix-status-counter-group\n .data=${this.status}\n ></ix-status-counter-group>\n\n ${this.actions.isAuthorizedToView\n ? this.renderActionsRequiredGrid()\n : nothing}\n ${this.updates.isAuthorizedToView\n ? this.renderTicketUpdatesGrid()\n : nothing}\n\n <nav>${this.renderNavigation()}</nav>\n\n ${this.knowledgebase !== ''\n ? html` <iframe\n class=\"knowledge-base\"\n title=\"knowledge base\"\n .src=${this.knowledgebase}\n ></iframe>`\n : nothing}\n ${this.news?.length\n ? html`<ix-news-feed\n header=\"What's New\"\n .data=${this.news.map(item => ({\n ...item,\n uid: `${this.kbLinkBaseUrl}${item.uid}`,\n }))}\n .href=${this.kbNewsViewAllUrl}\n ></ix-news-feed>`\n : nothing}\n ${this.resources?.length\n ? html`<div class=\"news-info\">\n <h2>Resources</h2>\n <div class=\"resources\">\n ${this.resources.map(\n item => html` <a\n href=${`${this.kbLinkBaseUrl}${item.uid}`}\n ><ix-info-card type=\"info-card-resources\"\n ><img\n slot=\"image\"\n name=\"image\"\n alt=${item?.thumbnail?.alternativeText || ''}\n src=\"${`${this.kbImgBaseUrl}${encodeURIComponent(\n item.thumbnail.url\n )}&w=3840&q=75`}\"\n />\n\n <div slot=\"title\">${item.title}</div>\n <ix-button\n slot=\"cta\"\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n Learn more\n </ix-button>\n </ix-info-card></a\n >`\n )}\n </div>\n\n <h2 class=\"\">News & Promotions</h2>\n <div class=\"newsAndPromotions\">\n ${this.promotions.map(\n item => html` <a\n href=${`${this.kbLinkBaseUrl}${item.uid}`}\n ><ix-info-card type=\"info-card\">\n <img\n slot=\"image\"\n name=\"image\"\n alt=\"${item.thumbnail.alternativeText}\"\n src=\"${`${this.kbImgBaseUrl}${encodeURIComponent(\n item.thumbnail.url\n )}&w=3840&q=75`}\"\n />\n <div slot=\"title\">${item.title}</div>\n <div slot=\"description\">${item.abstract}</div>\n <ix-button\n slot=\"cta\"\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n Learn more\n </ix-button>\n </ix-info-card></a\n >`\n )}\n </div>\n </div>`\n : nothing}\n ${this.contacts?.email\n ? html`<ix-contacts .contacts=${this.contacts}></ix-contacts>`\n : nothing}\n </div>\n <nav class=\"side-nav\">${this.renderNavigation()}</nav>\n </div>\n </section>\n </main>\n `;\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent ix-widget following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Digital Realty",
|
|
6
|
-
"version": "2.0.
|
|
6
|
+
"version": "2.0.4",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -126,5 +126,5 @@
|
|
|
126
126
|
"README.md",
|
|
127
127
|
"LICENSE"
|
|
128
128
|
],
|
|
129
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "48e9d026490db18f8fc1b864a13f1c1c062880f1"
|
|
130
130
|
}
|