@digital-realty/ix-widget 1.0.9 → 1.0.10

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.
@@ -32,6 +32,7 @@ export interface TableDataItem {
32
32
  rows?: string[];
33
33
  header: string;
34
34
  href: string;
35
+ disabled?: boolean;
35
36
  }
36
37
  export declare class IxLaunchpad extends LitElement {
37
38
  static styles: import("lit").CSSResult[];
@@ -36,6 +36,7 @@ let IxLaunchpad = class IxLaunchpad extends LitElement {
36
36
  rows: [],
37
37
  header: '',
38
38
  href: '',
39
+ disabled: true,
39
40
  };
40
41
  this.renderNavigation = () => html `
41
42
  ${this.nav.map((nav) => html ` <ix-nav-list .header="${nav.header}">
@@ -68,6 +69,7 @@ let IxLaunchpad = class IxLaunchpad extends LitElement {
68
69
  .rows=${this.updates.rows}
69
70
  .header=${this.updates.header}
70
71
  .href=${this.actions.href}
72
+ ?disabled=${true}
71
73
  >
72
74
  </ix-table-data>
73
75
 
@@ -1 +1 @@
1
- {"version":3,"file":"ix-launchpad.js","sourceRoot":"","sources":["../src/ix-launchpad.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,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;AACjE,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,SAAS,GACV,MAAM,+BAA+B,CAAC;AAEvC,MAAM,OAAO,GACX,sGAAsG,CAAC;AAmClG,IAAM,WAAW,GAAj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E,CAAC;wCAAU;AAET;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yCAAW;AAET;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAe;AAEf;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CAAgB;AAEf;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;+CAAiB;AAElC;IAAR,KAAK,EAAE;0CAAc;AAEb;IAAR,KAAK,EAAE;8CAAsB;AAErB;IAAR,KAAK,EAAE;+CAAwB;AAEvB;IAAR,KAAK,EAAE;gDAA0B;AAEN;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAKzB;AAE0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAKzB;AArCS,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAwJvB","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property, state } 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';\nimport {\n contacts,\n news,\n promotions,\n resources,\n} from './assets/gapi-default-data.js';\n\nconst IMG_URL =\n 'https://gp-tst.digitalrealty.com/_next/image?url=https%3A%2F%2Ftst-cms-strapi.digitalrealtytrust.com';\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}\n\nexport interface TableDataItem {\n columns: string[];\n rows?: string[];\n header: string;\n href: string;\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 = [];\n\n @property({ type: Object }) contacts = {};\n\n @property({ type: Array }) resources = [];\n\n @property({ type: Array }) promotions = [];\n\n @state() _news = news;\n\n @state() _contacts = contacts;\n\n @state() _resources = resources;\n\n @state() _promotions = promotions;\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 };\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 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 <ix-table-data\n .columns=${this.actions.columns}\n .rows=${this.actions.rows}\n .header=${this.actions.header}\n .href=${this.actions.href}\n >\n </ix-table-data>\n\n <ix-table-data\n .columns=${this.updates.columns}\n .rows=${this.updates.rows}\n .header=${this.updates.header}\n .href=${this.actions.href}\n >\n </ix-table-data>\n\n <nav>${this.renderNavigation()}</nav>\n\n <ix-news-feed\n header=\"What's New\"\n .data=${this._news}\n href=\"/news\"\n ></ix-news-feed>\n\n <div class=\"news-info\">\n <h2>Resources</h2>\n <div class=\"resources\">\n ${this._resources.map(\n item => html` <ix-info-card type=\"info-card-resources\"\n ><img\n slot=\"image\"\n name=\"image\"\n alt=\"${item.thumbnail.alternativeText}\"\n src=\"${`${IMG_URL}${encodeURIComponent(\n item.thumbnail.url\n )}&w=3840&q=75`}\"\n />\n <div slot=\"label\">${item.topics?.[0]?.name}</div>\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>`\n )}\n </div>\n\n <h2 class=\"\">News &amp; Promotions</h2>\n <div class=\"newsAndPromotions\">\n ${this._promotions.map(\n item => html` <ix-info-card type=\"info-card\">\n <img\n slot=\"image\"\n name=\"image\"\n alt=\"${item.thumbnail.alternativeText}\"\n src=\"${`${IMG_URL}${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>`\n )}\n </div>\n </div>\n\n <ix-contacts .contacts=${this._contacts}></ix-contacts>\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,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,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;AACjE,OAAO,EACL,QAAQ,EACR,I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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;yCAAW;AAET;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAe;AAEf;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;8CAAgB;AAEf;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;+CAAiB;AAElC;IAAR,KAAK,EAAE;0CAAc;AAEb;IAAR,KAAK,EAAE;8CAAsB;AAErB;IAAR,KAAK,EAAE;+CAAwB;AAEvB;IAAR,KAAK,EAAE;gDAA0B;AAEN;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAKzB;AAE0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAMzB;AAtCS,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CA0JvB","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property, state } 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';\nimport {\n contacts,\n news,\n promotions,\n resources,\n} from './assets/gapi-default-data.js';\n\nconst IMG_URL =\n 'https://gp-tst.digitalrealty.com/_next/image?url=https%3A%2F%2Ftst-cms-strapi.digitalrealtytrust.com';\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}\n\nexport interface TableDataItem {\n columns: string[];\n rows?: string[];\n header: string;\n href: string;\n disabled?: 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 = [];\n\n @property({ type: Object }) contacts = {};\n\n @property({ type: Array }) resources = [];\n\n @property({ type: Array }) promotions = [];\n\n @state() _news = news;\n\n @state() _contacts = contacts;\n\n @state() _resources = resources;\n\n @state() _promotions = promotions;\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 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 <ix-table-data\n .columns=${this.actions.columns}\n .rows=${this.actions.rows}\n .header=${this.actions.header}\n .href=${this.actions.href}\n >\n </ix-table-data>\n\n <ix-table-data\n .columns=${this.updates.columns}\n .rows=${this.updates.rows}\n .header=${this.updates.header}\n .href=${this.actions.href}\n ?disabled=${true}\n >\n </ix-table-data>\n\n <nav>${this.renderNavigation()}</nav>\n\n <ix-news-feed\n header=\"What's New\"\n .data=${this._news}\n href=\"/news\"\n ></ix-news-feed>\n\n <div class=\"news-info\">\n <h2>Resources</h2>\n <div class=\"resources\">\n ${this._resources.map(\n item => html` <ix-info-card type=\"info-card-resources\"\n ><img\n slot=\"image\"\n name=\"image\"\n alt=\"${item.thumbnail.alternativeText}\"\n src=\"${`${IMG_URL}${encodeURIComponent(\n item.thumbnail.url\n )}&w=3840&q=75`}\"\n />\n <div slot=\"label\">${item.topics?.[0]?.name}</div>\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>`\n )}\n </div>\n\n <h2 class=\"\">News &amp; Promotions</h2>\n <div class=\"newsAndPromotions\">\n ${this._promotions.map(\n item => html` <ix-info-card type=\"info-card\">\n <img\n slot=\"image\"\n name=\"image\"\n alt=\"${item.thumbnail.alternativeText}\"\n src=\"${`${IMG_URL}${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>`\n )}\n </div>\n </div>\n\n <ix-contacts .contacts=${this._contacts}></ix-contacts>\n </div>\n <nav class=\"side-nav\">${this.renderNavigation()}</nav>\n </div>\n </section>\n </main>\n `;\n }\n}\n"]}
@@ -6,8 +6,10 @@ export declare class IxTableData extends LitElement {
6
6
  static styles: import("lit").CSSResult;
7
7
  columns: string[];
8
8
  rows: string[] | undefined;
9
+ disabled: boolean;
9
10
  pageSize: number;
10
11
  header: string;
11
12
  href: string;
13
+ renderEmptyTable(): import("lit").TemplateResult<1>;
12
14
  protected render(): import("lit").TemplateResult<1>;
13
15
  }
@@ -10,12 +10,38 @@ let IxTableData = class IxTableData extends LitElement {
10
10
  super(...arguments);
11
11
  this.columns = [];
12
12
  this.rows = [];
13
+ this.disabled = false;
13
14
  this.pageSize = 5;
14
15
  this.header = '';
15
16
  this.href = '/';
16
17
  }
18
+ renderEmptyTable() {
19
+ return html `<ix-widget class="empty" type="empty-table">
20
+ <div class="header">
21
+ <h2>${this.header}</h2>
22
+ <ix-button type="button" has-icon trailing-icon appearance="text">
23
+ <ix-icon slot="icon">chevron_right</ix-icon>
24
+ View all
25
+ </ix-button>
26
+ </div>
27
+ <div class="content">
28
+ <ix-icon class="error">error</ix-icon>
29
+ <div class="description">
30
+ <p>We are unable to display the relevant ticket information.</p>
31
+ <p>
32
+ Please, reach out to us via
33
+ <a href="#">GlobalPortal@digitalrealty.com</a> for further
34
+ assistance.
35
+ </p>
36
+ </div>
37
+ </div>
38
+ </ix-widget>`;
39
+ }
17
40
  render() {
18
41
  var _a, _b;
42
+ if (this.disabled) {
43
+ return this.renderEmptyTable();
44
+ }
19
45
  if (!((_a = this.rows) === null || _a === void 0 ? void 0 : _a.length)) {
20
46
  return html `<ix-widget type="news-feed">
21
47
  <div class="empty-state">
@@ -76,6 +102,18 @@ IxTableData.styles = css `
76
102
  letter-spacing: 0.15px;
77
103
  color: rgb(9, 34, 65);
78
104
  }
105
+ h3 {
106
+ margin: 0px;
107
+ font-family: 'Red Hat Display', sans-serif;
108
+ font-style: normal;
109
+ font-weight: bold;
110
+ font-size: 16px;
111
+ line-height: 24px;
112
+ letter-spacing: 0.15px;
113
+ color: rgb(9, 34, 65);
114
+ text-align: center;
115
+ padding: 1rem;
116
+ }
79
117
  .status {
80
118
  display: flex;
81
119
  flex-direction: row;
@@ -121,6 +159,41 @@ IxTableData.styles = css `
121
159
  transform: rotate(360deg);
122
160
  }
123
161
  }
162
+
163
+ ix-widget.empty .header {
164
+ margin: 0;
165
+ }
166
+ ix-widget.empty {
167
+ --ix-widget-padding: 1rem 11px 1rem 24px;
168
+ }
169
+ ix-widget.empty .content {
170
+ display: flex;
171
+ flex-direction: column;
172
+ -webkit-box-align: center;
173
+ align-items: center;
174
+ -webkit-box-pack: start;
175
+ justify-content: start;
176
+ margin: 40px;
177
+ }
178
+ ix-widget.empty ix-icon.error {
179
+ user-select: none;
180
+ width: 48px;
181
+ height: 48px;
182
+ --ix-icon-font-size: 44px;
183
+ --ix-icon-line-height: 1;
184
+ color: rgba(255, 152, 0, 1);
185
+ }
186
+ ix-widget.empty .description p {
187
+ font-family: Red Hat Display;
188
+ font-size: 24px;
189
+ font-weight: 700;
190
+ line-height: 32px;
191
+ text-align: center;
192
+ margin: 0.5rem;
193
+ }
194
+ ix-widget.empty .description p a {
195
+ color: rgb(20, 86, 224);
196
+ }
124
197
  `;
125
198
  __decorate([
126
199
  property({ type: Array })
@@ -128,6 +201,9 @@ __decorate([
128
201
  __decorate([
129
202
  property({ type: Array })
130
203
  ], IxTableData.prototype, "rows", void 0);
204
+ __decorate([
205
+ property({ type: Boolean })
206
+ ], IxTableData.prototype, "disabled", void 0);
131
207
  __decorate([
132
208
  property({ type: Number })
133
209
  ], IxTableData.prototype, "pageSize", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"ix-table-data.js","sourceRoot":"","sources":["../src/ix-table-data.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,oCAAoC,CAAC;AAC5C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGtC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QA2EsB,YAAO,GAAa,EAAE,CAAC;QAEvB,SAAI,GAAyB,EAAE,CAAC;QAE/B,aAAQ,GAAG,CAAC,CAAC;QAEb,WAAM,GAAG,EAAE,CAAC;QAEZ,SAAI,GAAG,GAAG,CAAC;IAmCzC,CAAC;IAjCoB,MAAM;;QACvB,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAA,EAAE,CAAC;YACvB,OAAO,IAAI,CAAA;;gBAED,IAAI,CAAC,MAAM;gCACK,MAAM;;mBAEnB,CAAC;QAChB,CAAC;QACD,OAAO,IAAI,CAAA;;mBAEI,IAAI,CAAC,OAAO;gBACf,IAAI,CAAC,IAAI;oBACL,IAAI,CAAC,QAAQ;oBACb,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,MAAM,KAAI,CAAC;wBAClB,IAAI;;;gBAGZ,IAAI,CAAC,MAAM;;;;;;mBAMR,IAAI,CAAC,IAAI;;;;;;;iBAOX,CAAC;IAChB,CAAC;;AApHM,kBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwElB,AAxEY,CAwEX;AAEyB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAwB;AAEvB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yCAAiC;AAE/B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAc;AAEb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAa;AAEZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAY;AAnF5B,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAsHvB","sourcesContent":["import { html, LitElement, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport '@digital-realty/ix-icon/ix-icon.js';\nimport '@digital-realty/ix-grid/ix-grid.js';\nimport './ix-widget.js';\nimport { loader } from './assets/iconset.js';\n\n@customElement('ix-table-data')\nexport class IxTableData extends LitElement {\n static styles = css`\n ix-widget {\n --ix-widget-padding: 0;\n }\n .empty-state {\n padding: 24px;\n }\n .header {\n display: flex;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n align-items: center;\n width: 100%;\n width: -webkit-fill-available;\n margin: 0px -15px 0px -3px;\n }\n h2 {\n margin: 0px;\n font-family: 'Red Hat Display', sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 20px;\n line-height: 24px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n }\n .status {\n display: flex;\n flex-direction: row;\n -webkit-box-align: center;\n align-items: center;\n padding: 2px 12px;\n width: 185px;\n height: 28px;\n left: 0px;\n top: 0px;\n border-radius: 68px;\n flex: 0 0 auto;\n order: 0;\n -webkit-box-flex: 0;\n color: white;\n -webkit-box-pack: center;\n justify-content: center;\n background: rgb(76, 175, 80);\n }\n ix-grid {\n --_cell-padding: 0;\n }\n .loader {\n width: 24px;\n height: 24px;\n margin: 1rem auto;\n }\n svg {\n stroke: rgb(20, 86, 224);\n width: 48px;\n height: 48px;\n animation-name: loading;\n animation-duration: 1000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n margin: auto;\n }\n @keyframes loading {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n `;\n\n @property({ type: Array }) columns: string[] = [];\n\n @property({ type: Array }) rows: string[] | undefined = [];\n\n @property({ type: Number }) pageSize = 5;\n\n @property({ type: String }) header = '';\n\n @property({ type: String }) href = '/';\n\n protected override render() {\n if (!this.rows?.length) {\n return html`<ix-widget type=\"news-feed\">\n <div class=\"empty-state\">\n <h2>${this.header}</h2>\n <div class=\"loader\">${loader}</div>\n </div>\n </ix-widget>`;\n }\n return html`<ix-widget>\n <ix-grid\n .columns=${this.columns}\n .rows=${this.rows}\n .pageSize=${this.pageSize}\n .rowLimit=${this.rows?.length || 0}\n ?hide-filters=${true}\n add-params-to-url=\"false\"\n ><div slot=\"header\" class=\"header\">\n <h2>${this.header}</h2>\n <ix-button\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n href=${this.href}\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n View all\n </ix-button>\n </div>\n </ix-grid>\n </ix-widget>`;\n }\n}\n"]}
1
+ {"version":3,"file":"ix-table-data.js","sourceRoot":"","sources":["../src/ix-table-data.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,oCAAoC,CAAC;AAC5C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGtC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QA0HsB,YAAO,GAAa,EAAE,CAAC;QAEvB,SAAI,GAAyB,EAAE,CAAC;QAE9B,aAAQ,GAAG,KAAK,CAAC;QAElB,aAAQ,GAAG,CAAC,CAAC;QAEb,WAAM,GAAG,EAAE,CAAC;QAEZ,SAAI,GAAG,GAAG,CAAC;IA6DzC,CAAC;IA3DC,gBAAgB;QACd,OAAO,IAAI,CAAA;;cAED,IAAI,CAAC,MAAM;;;;;;;;;;;;;;;;;iBAiBR,CAAC;IAChB,CAAC;IAEkB,MAAM;;QACvB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAA,EAAE,CAAC;YACvB,OAAO,IAAI,CAAA;;gBAED,IAAI,CAAC,MAAM;gCACK,MAAM;;mBAEnB,CAAC;QAChB,CAAC;QACD,OAAO,IAAI,CAAA;;mBAEI,IAAI,CAAC,OAAO;gBACf,IAAI,CAAC,IAAI;oBACL,IAAI,CAAC,QAAQ;oBACb,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,MAAM,KAAI,CAAC;wBAClB,IAAI;;;gBAGZ,IAAI,CAAC,MAAM;;;;;;mBAMR,IAAI,CAAC,IAAI;;;;;;;iBAOX,CAAC;IAChB,CAAC;;AA/LM,kBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuHlB,AAvHY,CAuHX;AAEyB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAwB;AAEvB;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;yCAAiC;AAE9B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAAkB;AAElB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAc;AAEb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAa;AAEZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAY;AApI5B,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAiMvB","sourcesContent":["import { html, LitElement, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport '@digital-realty/ix-icon/ix-icon.js';\nimport '@digital-realty/ix-grid/ix-grid.js';\nimport './ix-widget.js';\nimport { loader } from './assets/iconset.js';\n\n@customElement('ix-table-data')\nexport class IxTableData extends LitElement {\n static styles = css`\n ix-widget {\n --ix-widget-padding: 0;\n }\n .empty-state {\n padding: 24px;\n }\n .header {\n display: flex;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: center;\n align-items: center;\n width: 100%;\n width: -webkit-fill-available;\n margin: 0px -15px 0px -3px;\n }\n h2 {\n margin: 0px;\n font-family: 'Red Hat Display', sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 20px;\n line-height: 24px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n }\n h3 {\n margin: 0px;\n font-family: 'Red Hat Display', sans-serif;\n font-style: normal;\n font-weight: bold;\n font-size: 16px;\n line-height: 24px;\n letter-spacing: 0.15px;\n color: rgb(9, 34, 65);\n text-align: center;\n padding: 1rem;\n }\n .status {\n display: flex;\n flex-direction: row;\n -webkit-box-align: center;\n align-items: center;\n padding: 2px 12px;\n width: 185px;\n height: 28px;\n left: 0px;\n top: 0px;\n border-radius: 68px;\n flex: 0 0 auto;\n order: 0;\n -webkit-box-flex: 0;\n color: white;\n -webkit-box-pack: center;\n justify-content: center;\n background: rgb(76, 175, 80);\n }\n ix-grid {\n --_cell-padding: 0;\n }\n .loader {\n width: 24px;\n height: 24px;\n margin: 1rem auto;\n }\n svg {\n stroke: rgb(20, 86, 224);\n width: 48px;\n height: 48px;\n animation-name: loading;\n animation-duration: 1000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n margin: auto;\n }\n @keyframes loading {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n ix-widget.empty .header {\n margin: 0;\n }\n ix-widget.empty {\n --ix-widget-padding: 1rem 11px 1rem 24px;\n }\n ix-widget.empty .content {\n display: flex;\n flex-direction: column;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: start;\n justify-content: start;\n margin: 40px;\n }\n ix-widget.empty ix-icon.error {\n user-select: none;\n width: 48px;\n height: 48px;\n --ix-icon-font-size: 44px;\n --ix-icon-line-height: 1;\n color: rgba(255, 152, 0, 1);\n }\n ix-widget.empty .description p {\n font-family: Red Hat Display;\n font-size: 24px;\n font-weight: 700;\n line-height: 32px;\n text-align: center;\n margin: 0.5rem;\n }\n ix-widget.empty .description p a {\n color: rgb(20, 86, 224);\n }\n `;\n\n @property({ type: Array }) columns: string[] = [];\n\n @property({ type: Array }) rows: string[] | undefined = [];\n\n @property({ type: Boolean }) disabled = false;\n\n @property({ type: Number }) pageSize = 5;\n\n @property({ type: String }) header = '';\n\n @property({ type: String }) href = '/';\n\n renderEmptyTable() {\n return html`<ix-widget class=\"empty\" type=\"empty-table\">\n <div class=\"header\">\n <h2>${this.header}</h2>\n <ix-button type=\"button\" has-icon trailing-icon appearance=\"text\">\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n View all\n </ix-button>\n </div>\n <div class=\"content\">\n <ix-icon class=\"error\">error</ix-icon>\n <div class=\"description\">\n <p>We are unable to display the relevant ticket information.</p>\n <p>\n Please, reach out to us via\n <a href=\"#\">GlobalPortal@digitalrealty.com</a> for further\n assistance.\n </p>\n </div>\n </div>\n </ix-widget>`;\n }\n\n protected override render() {\n if (this.disabled) {\n return this.renderEmptyTable();\n }\n if (!this.rows?.length) {\n return html`<ix-widget type=\"news-feed\">\n <div class=\"empty-state\">\n <h2>${this.header}</h2>\n <div class=\"loader\">${loader}</div>\n </div>\n </ix-widget>`;\n }\n return html`<ix-widget>\n <ix-grid\n .columns=${this.columns}\n .rows=${this.rows}\n .pageSize=${this.pageSize}\n .rowLimit=${this.rows?.length || 0}\n ?hide-filters=${true}\n add-params-to-url=\"false\"\n ><div slot=\"header\" class=\"header\">\n <h2>${this.header}</h2>\n <ix-button\n type=\"button\"\n has-icon\n trailing-icon\n appearance=\"text\"\n href=${this.href}\n >\n <ix-icon slot=\"icon\">chevron_right</ix-icon>\n View all\n </ix-button>\n </div>\n </ix-grid>\n </ix-widget>`;\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": "1.0.9",
6
+ "version": "1.0.10",
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": "d65a169accc686b0adb07ace2a1f0982efba5d7a"
129
+ "gitHead": "a772a628eac400c077a8bdaf99dddacc3fbd58ad"
130
130
  }