@digital-realty/ix-widget 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/IxWidget.js CHANGED
@@ -37,6 +37,10 @@ IxWidget.styles = css `
37
37
  --ix-widget-background: transparent;
38
38
  }
39
39
 
40
+ [type='action-list'].card {
41
+ --ix-widget-padding: 0 11px 16px 24px;
42
+ }
43
+
40
44
  @media (max-width: 1349px) {
41
45
  [type='status-counter-group'].card {
42
46
  --ix-widget-padding: 1rem;
@@ -1 +1 @@
1
- {"version":3,"file":"IxWidget.js","sourceRoot":"","sources":["../src/IxWidget.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,OAAO,QAAS,SAAQ,UAAU;IAAxC;;QAqE8B,SAAI,GAAG,SAAS,CAAC;IAO/C,CAAC;IALoB,MAAM;QACvB,OAAO,IAAI,CAAA,0BAA0B,IAAI,CAAC,IAAI;;WAEvC,CAAC;IACV,CAAC;;AA1EM,eAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkElB,AAlEY,CAkEX;AAE0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCAAkB","sourcesContent":["import { html, LitElement, css } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nexport class IxWidget extends LitElement {\n static styles = css`\n .card {\n border-radius: 0.75rem;\n background: var(--ix-widget-background, white);\n padding: var(--ix-widget-padding, 16px 24px 32px);\n border: var(--ix-widget-border, none);\n }\n\n [type='status-counter'].card {\n margin-bottom: 0;\n --ix-widget-padding: 0;\n --ix-widget-padding: 1rem;\n }\n\n @media (min-width: 1350px) {\n [type='status-counter'].card {\n --ix-widget-padding: 36.5px 20px 36.5px 24px;\n }\n }\n\n [type='status-counter-group'].card {\n --ix-widget-padding: 0;\n --ix-widget-background: transparent;\n }\n\n @media (max-width: 1349px) {\n [type='status-counter-group'].card {\n --ix-widget-padding: 1rem;\n --ix-widget-background: white;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 1px -1px,\n rgba(0, 0, 0, 0.14) 0px 1px 1px 0px,\n rgba(0, 0, 0, 0.12) 0px 1px 3px 0px;\n }\n }\n\n [type='info-card'].card {\n display: block;\n max-width: 348px;\n border-radius: 0.5rem;\n border: 1px solid #e0e0e0;\n position: relative;\n overflow: auto;\n aspect-ratio: 1 / 1.47;\n }\n [type='info-card-2'].card {\n display: block;\n max-width: 348px;\n border-radius: 0.5rem;\n border: 1px solid #e0e0e0;\n position: relative;\n overflow: hidden;\n aspect-ratio: 1 / 0.85;\n }\n [type='action-list'].card {\n box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 1px -1px,\n rgba(0, 0, 0, 0.14) 0px 1px 1px 0px, rgba(0, 0, 0, 0.12) 0px 1px 3px 0px;\n }\n [type='news-feed'].card {\n display: flex;\n flex-direction: column;\n background: rgb(255, 255, 255);\n box-shadow: rgba(0, 0, 0, 0.12) 0px 12px 20px -12px,\n rgb(225, 228, 232) 0px 0px 0px 1px inset;\n border-radius: 12px;\n padding-bottom: 11px;\n }\n `;\n\n @property({ type: String }) type = 'default';\n\n protected override render() {\n return html`<div class=\"card\" type=${this.type}>\n <slot></slot>\n </div>`;\n }\n}\n"]}
1
+ {"version":3,"file":"IxWidget.js","sourceRoot":"","sources":["../src/IxWidget.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,OAAO,QAAS,SAAQ,UAAU;IAAxC;;QAyE8B,SAAI,GAAG,SAAS,CAAC;IAO/C,CAAC;IALoB,MAAM;QACvB,OAAO,IAAI,CAAA,0BAA0B,IAAI,CAAC,IAAI;;WAEvC,CAAC;IACV,CAAC;;AA9EM,eAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsElB,AAtEY,CAsEX;AAE0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCAAkB","sourcesContent":["import { html, LitElement, css } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nexport class IxWidget extends LitElement {\n static styles = css`\n .card {\n border-radius: 0.75rem;\n background: var(--ix-widget-background, white);\n padding: var(--ix-widget-padding, 16px 24px 32px);\n border: var(--ix-widget-border, none);\n }\n\n [type='status-counter'].card {\n margin-bottom: 0;\n --ix-widget-padding: 0;\n --ix-widget-padding: 1rem;\n }\n\n @media (min-width: 1350px) {\n [type='status-counter'].card {\n --ix-widget-padding: 36.5px 20px 36.5px 24px;\n }\n }\n\n [type='status-counter-group'].card {\n --ix-widget-padding: 0;\n --ix-widget-background: transparent;\n }\n\n [type='action-list'].card {\n --ix-widget-padding: 0 11px 16px 24px;\n }\n\n @media (max-width: 1349px) {\n [type='status-counter-group'].card {\n --ix-widget-padding: 1rem;\n --ix-widget-background: white;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 1px -1px,\n rgba(0, 0, 0, 0.14) 0px 1px 1px 0px,\n rgba(0, 0, 0, 0.12) 0px 1px 3px 0px;\n }\n }\n\n [type='info-card'].card {\n display: block;\n max-width: 348px;\n border-radius: 0.5rem;\n border: 1px solid #e0e0e0;\n position: relative;\n overflow: auto;\n aspect-ratio: 1 / 1.47;\n }\n [type='info-card-2'].card {\n display: block;\n max-width: 348px;\n border-radius: 0.5rem;\n border: 1px solid #e0e0e0;\n position: relative;\n overflow: hidden;\n aspect-ratio: 1 / 0.85;\n }\n [type='action-list'].card {\n box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 1px -1px,\n rgba(0, 0, 0, 0.14) 0px 1px 1px 0px, rgba(0, 0, 0, 0.12) 0px 1px 3px 0px;\n }\n [type='news-feed'].card {\n display: flex;\n flex-direction: column;\n background: rgb(255, 255, 255);\n box-shadow: rgba(0, 0, 0, 0.12) 0px 12px 20px -12px,\n rgb(225, 228, 232) 0px 0px 0px 1px inset;\n border-radius: 12px;\n padding-bottom: 11px;\n }\n `;\n\n @property({ type: String }) type = 'default';\n\n protected override render() {\n return html`<div class=\"card\" type=${this.type}>\n <slot></slot>\n </div>`;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ export declare function getStatusData(apiUrl: string): Promise<any>;
@@ -0,0 +1,19 @@
1
+ const token = '';
2
+ export async function getStatusData(apiUrl) {
3
+ try {
4
+ const response = await fetch(apiUrl, {
5
+ headers: {
6
+ Authorization: `Bearer ${token}`,
7
+ },
8
+ });
9
+ if (!response.ok) {
10
+ throw new Error('Something went wrong');
11
+ }
12
+ const data = await response.json();
13
+ return data.ticketNumber;
14
+ }
15
+ catch (error) {
16
+ return '-';
17
+ }
18
+ }
19
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,EAAE,CAAC;AAEjB,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAc;IAChD,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,EAAE;YACnC,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,KAAK,EAAE;aACjC;SACF,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,GAAG,CAAC;IACb,CAAC;AACH,CAAC","sourcesContent":["const token = '';\n\nexport async function getStatusData(apiUrl: string) {\n try {\n const response = await fetch(apiUrl, {\n headers: {\n Authorization: `Bearer ${token}`,\n },\n });\n if (!response.ok) {\n throw new Error('Something went wrong');\n }\n const data = await response.json();\n return data.ticketNumber;\n } catch (error) {\n return '-';\n }\n}\n"]}
@@ -0,0 +1,6 @@
1
+ export declare const API_CONFIG: {
2
+ DISABLED: boolean;
3
+ STATUS: string;
4
+ TICKET: string;
5
+ IMG_URL: string;
6
+ };
@@ -0,0 +1,7 @@
1
+ export const API_CONFIG = {
2
+ DISABLED: true,
3
+ STATUS: '',
4
+ TICKET: '',
5
+ IMG_URL: 'https://gp-tst.digitalrealty.com/_next/image?url=https%3A%2F%2Ftst-cms-strapi.digitalrealtytrust.com',
6
+ };
7
+ //# sourceMappingURL=launchpad-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launchpad-config.js","sourceRoot":"","sources":["../../src/api/launchpad-config.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,EAAE;IACV,OAAO,EACL,sGAAsG;CACzG,CAAC","sourcesContent":["export const API_CONFIG = {\n DISABLED: true,\n STATUS: '',\n TICKET: '',\n IMG_URL:\n 'https://gp-tst.digitalrealty.com/_next/image?url=https%3A%2F%2Ftst-cms-strapi.digitalrealtytrust.com',\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  export declare const statusData: {
2
- value: number;
2
+ value: string;
3
3
  header: string;
4
4
  icon: string;
5
5
  }[];
@@ -1,29 +1,24 @@
1
1
  export const statusData = [
2
2
  {
3
- value: 3206,
3
+ value: 'N/A',
4
4
  header: 'Active Tickets',
5
5
  icon: 'laptop',
6
6
  },
7
7
  {
8
- value: 1166,
8
+ value: 'N/A',
9
9
  header: 'Users',
10
10
  icon: 'users',
11
11
  },
12
12
  {
13
- value: 3206,
14
- header: 'Active Tickets',
13
+ value: 'N/A',
14
+ header: 'My Sites',
15
15
  icon: 'mySites',
16
16
  },
17
17
  {
18
- value: 1166,
19
- header: 'Users',
18
+ value: 'N/A',
19
+ header: 'DCIM-Enabled Locations',
20
20
  icon: 'dcim',
21
21
  },
22
- {
23
- value: 3206,
24
- header: 'Active Tickets',
25
- icon: 'locations',
26
- },
27
22
  ];
28
23
  export const pageProps = {
29
24
  pageProps: {