@design.estate/dees-catalog 24.1.0 → 24.3.0
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_bundle/bundle.js +7274 -5319
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-fit-XY7VCF6W.js → addon-fit-RDDY6CA4.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-search-OQXRIIMV.js → addon-search-UT4OBXLU.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-serialize-BV6MHBIQ.js → addon-serialize-U4KTWHZ2.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-web-links-IYKN5JS7.js → addon-web-links-QMZRXLUR.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-FUMEXHR4.js → chunk-4UZGSPGV.js} +39 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-FUMEXHR4.js.map → chunk-4UZGSPGV.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-K2UNUD5D.js → chunk-7CM7S6EQ.js} +19 -19
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-MV6OSXZD.js → chunk-AR2XNHGF.js} +2 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-NFVJ3L3L.js → chunk-LFHMAQWF.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-4DJP4JAJ.js → chunk-OPVBP4HP.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-BTYTET7H.js → chunk-R6EBIDCM.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-XE2K545Z.js → de-LD3JG4AD.js} +35 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-LD3JG4AD.js.map +1 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-IIOB2SYP.js → dees-modal-Z3DSEMNI.js} +4 -4
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-EEY5WEF4.js → dees-workspace-terminal-KPB3RVGL.js} +5 -5
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-2OQWGHFH.js → dist-2U2U7ROC.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-CRWOBKHW.js → dist-4S4PAFPC.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-J3O6DO5O.js → dist-5P27Y36A.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-IIHC67RE.js → dist-6GIZONLS.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-ERBPCUJB.js → dist-CRHDJ3CC.js} +4 -4
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-3OMAY2ID.js → dist-OASEKGFQ.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-FJCH275Q.js → dist-UJJOGV5H.js} +4 -4
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{echarts-Z2APN5DY.js → echarts-QMOTMVTN.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/es-J75P6Y7U.js +1461 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/es-J75P6Y7U.js.map +1 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/fr-FXZISX5I.js +1461 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/fr-FXZISX5I.js.map +1 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{highlightjs-2VS4UD5C.js → highlightjs-CH6EL3U4.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{lightweight-charts.production-BYPU2BNH.js → lightweight-charts.production-VKUEJKDY.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{xterm-44R3YQOT.js → xterm-KAKUMKDA.js} +2 -2
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-appui/appui.helpers.d.ts +6 -0
- package/dist_ts_web/elements/00group-appui/appui.helpers.js +7 -1
- package/dist_ts_web/elements/00group-appui/dees-appui/dees-appui.js +7 -10
- package/dist_ts_web/elements/00group-appui/dees-appui-detailpane/dees-appui-detailpane.d.ts +88 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-detailpane/dees-appui-detailpane.demo.d.ts +34 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-detailpane/dees-appui-detailpane.demo.js +317 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-detailpane/dees-appui-detailpane.js +510 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-detailpane/index.d.ts +1 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-detailpane/index.js +2 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-page/dees-appui-page.d.ts +43 -17
- package/dist_ts_web/elements/00group-appui/dees-appui-page/dees-appui-page.demo.d.ts +2 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-page/dees-appui-page.demo.js +28 -3
- package/dist_ts_web/elements/00group-appui/dees-appui-page/dees-appui-page.js +113 -152
- package/dist_ts_web/elements/00group-appui/dees-appui-secondarytabs/dees-appui-secondarytabs.d.ts +68 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-secondarytabs/dees-appui-secondarytabs.demo.d.ts +4 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-secondarytabs/dees-appui-secondarytabs.demo.js +57 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-secondarytabs/dees-appui-secondarytabs.js +357 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-secondarytabs/index.d.ts +1 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-secondarytabs/index.js +2 -0
- package/dist_ts_web/elements/00group-appui/index.d.ts +2 -0
- package/dist_ts_web/elements/00group-appui/index.js +3 -1
- package/dist_ts_web/elements/00group-dataview/dees-table/styles.js +1 -1
- package/dist_ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.demo.js +6 -6
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.d.ts +7 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.js +17 -2
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.d.ts +79 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.demo.d.ts +1 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.demo.js +87 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.js +995 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/index.d.ts +1 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-elicitation-card/index.js +2 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.d.ts +14 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.js +60 -5
- package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.d.ts +9 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.demo.js +25 -3
- package/dist_ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.js +57 -5
- package/dist_ts_web/elements/00group-harness/index.d.ts +1 -0
- package/dist_ts_web/elements/00group-harness/index.js +2 -1
- package/dist_ts_web/elements/00group-harness/interfaces.d.ts +141 -0
- package/dist_ts_web/elements/00group-media/dees-pdf-viewer/component.d.ts +10 -0
- package/dist_ts_web/elements/00group-media/dees-pdf-viewer/component.js +38 -6
- package/dist_ts_web/elements/00group-media/dees-pdf-viewer/styles.js +4 -1
- package/dist_ts_web/i18n/de.d.ts +128 -0
- package/dist_ts_web/i18n/de.js +33 -1
- package/dist_ts_web/i18n/es.d.ts +5780 -0
- package/dist_ts_web/i18n/es.js +1452 -0
- package/dist_ts_web/i18n/fr.d.ts +5780 -0
- package/dist_ts_web/i18n/fr.js +1452 -0
- package/dist_ts_web/i18n/messages.d.ts +129 -1
- package/dist_ts_web/i18n/messages.js +38 -2
- package/package.json +3 -3
- package/readme.md +178 -21
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-appui/appui.helpers.ts +7 -0
- package/ts_web/elements/00group-appui/dees-appui/dees-appui.ts +6 -10
- package/ts_web/elements/00group-appui/dees-appui-detailpane/dees-appui-detailpane.demo.ts +267 -0
- package/ts_web/elements/00group-appui/dees-appui-detailpane/dees-appui-detailpane.ts +451 -0
- package/ts_web/elements/00group-appui/dees-appui-detailpane/index.ts +1 -0
- package/ts_web/elements/00group-appui/dees-appui-page/dees-appui-page.demo.ts +30 -2
- package/ts_web/elements/00group-appui/dees-appui-page/dees-appui-page.ts +113 -148
- package/ts_web/elements/00group-appui/dees-appui-secondarytabs/dees-appui-secondarytabs.demo.ts +62 -0
- package/ts_web/elements/00group-appui/dees-appui-secondarytabs/dees-appui-secondarytabs.ts +299 -0
- package/ts_web/elements/00group-appui/dees-appui-secondarytabs/index.ts +1 -0
- package/ts_web/elements/00group-appui/index.ts +2 -0
- package/ts_web/elements/00group-dataview/dees-table/styles.ts +1 -1
- package/ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.demo.ts +5 -5
- package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.ts +11 -0
- package/ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.demo.ts +100 -0
- package/ts_web/elements/00group-harness/dees-harness-elicitation-card/dees-harness-elicitation-card.ts +997 -0
- package/ts_web/elements/00group-harness/dees-harness-elicitation-card/index.ts +1 -0
- package/ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts +62 -2
- package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.demo.ts +24 -2
- package/ts_web/elements/00group-harness/dees-harness-session-list/dees-harness-session-list.ts +57 -4
- package/ts_web/elements/00group-harness/index.ts +1 -0
- package/ts_web/elements/00group-harness/interfaces.ts +172 -0
- package/ts_web/elements/00group-media/dees-pdf-viewer/component.ts +37 -5
- package/ts_web/elements/00group-media/dees-pdf-viewer/styles.ts +3 -0
- package/ts_web/i18n/de.ts +32 -0
- package/ts_web/i18n/es.ts +1452 -0
- package/ts_web/i18n/fr.ts +1452 -0
- package/ts_web/i18n/messages.ts +38 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-XE2K545Z.js.map +0 -1
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-fit-XY7VCF6W.js.map → addon-fit-RDDY6CA4.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-search-OQXRIIMV.js.map → addon-search-UT4OBXLU.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-serialize-BV6MHBIQ.js.map → addon-serialize-U4KTWHZ2.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{addon-web-links-IYKN5JS7.js.map → addon-web-links-QMZRXLUR.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-K2UNUD5D.js.map → chunk-7CM7S6EQ.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-MV6OSXZD.js.map → chunk-AR2XNHGF.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-NFVJ3L3L.js.map → chunk-LFHMAQWF.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-4DJP4JAJ.js.map → chunk-OPVBP4HP.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-BTYTET7H.js.map → chunk-R6EBIDCM.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-IIOB2SYP.js.map → dees-modal-Z3DSEMNI.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-EEY5WEF4.js.map → dees-workspace-terminal-KPB3RVGL.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-2OQWGHFH.js.map → dist-2U2U7ROC.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-CRWOBKHW.js.map → dist-4S4PAFPC.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-J3O6DO5O.js.map → dist-5P27Y36A.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-IIHC67RE.js.map → dist-6GIZONLS.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-3OMAY2ID.js.map → dist-CRHDJ3CC.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-ERBPCUJB.js.map → dist-OASEKGFQ.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dist-FJCH275Q.js.map → dist-UJJOGV5H.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{echarts-Z2APN5DY.js.map → echarts-QMOTMVTN.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{highlightjs-2VS4UD5C.js.map → highlightjs-CH6EL3U4.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{lightweight-charts.production-BYPU2BNH.js.map → lightweight-charts.production-VKUEJKDY.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{xterm-44R3YQOT.js.map → xterm-KAKUMKDA.js.map} +0 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { DeesElement, css, customElement, html, property, state, type TemplateResult } from '@design.estate/dees-element';
|
|
2
|
+
import { demoCode, demoPage, demoSection, demoStyles } from '../../../demos/templates.js';
|
|
3
|
+
import { themeDefaultStyles } from '../../00theme.js';
|
|
4
|
+
import type { Column, ITableAction } from '../../00group-dataview/dees-table/types.js';
|
|
5
|
+
import type { DeesTable } from '../../00group-dataview/dees-table/dees-table.js';
|
|
6
|
+
import type { IStatusbuttonItem } from '../../00group-feedback/dees-statusbutton/dees-statusbutton.js';
|
|
7
|
+
import type { IAppuiPageAction, IAppuiPageTab, IAppuiPageTabSelectEvent } from '../dees-appui-page/dees-appui-page.js';
|
|
8
|
+
import type { DeesAppuiDetailpane, IAppuiDetailpaneWidthChangeEvent } from './dees-appui-detailpane.js';
|
|
9
|
+
import { deepActiveElement } from '../../00overlay.js';
|
|
10
|
+
import '../dees-appui-page/dees-appui-page.js';
|
|
11
|
+
import '../../00group-dataview/dees-table/dees-table.js';
|
|
12
|
+
import '../../00group-dataview/dees-table-search/dees-table-search.js';
|
|
13
|
+
import '../../00group-feedback/dees-statusbutton/dees-statusbutton.js';
|
|
14
|
+
import '../../00group-feedback/dees-badge/dees-badge.js';
|
|
15
|
+
import '../../00group-button/dees-button/dees-button.js';
|
|
16
|
+
|
|
17
|
+
interface IDemoRoute {
|
|
18
|
+
id: string;
|
|
19
|
+
hosts: string;
|
|
20
|
+
target: string;
|
|
21
|
+
owner: string;
|
|
22
|
+
cluster: string;
|
|
23
|
+
ports: string;
|
|
24
|
+
source: string;
|
|
25
|
+
/** Whether every gateway applied the route's last revision. */
|
|
26
|
+
applying: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface IDemoRedirect {
|
|
30
|
+
id: string;
|
|
31
|
+
from: string;
|
|
32
|
+
to: string;
|
|
33
|
+
route: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const routes: IDemoRoute[] = [
|
|
37
|
+
{ id: 'docs', hosts: 'docs.example.com', target: 'docs-site', owner: 'Service', cluster: 'production', ports: '443', source: 'Public', applying: true },
|
|
38
|
+
{ id: 'uploads', hosts: 'uploads.example.com', target: 'uploads', owner: 'Service', cluster: 'production', ports: '443', source: 'Public', applying: false },
|
|
39
|
+
{ id: 'media', hosts: 'media.example.com', target: 'media-render', owner: 'Service', cluster: 'production', ports: '443', source: 'Public', applying: false },
|
|
40
|
+
{ id: 'www', hosts: 'www.example.com +3', target: 'docs-site', owner: 'Service', cluster: 'production', ports: '443', source: 'Public', applying: false },
|
|
41
|
+
{ id: 'smtp-submission', hosts: 'Port 587', target: 'Mail', owner: 'System', cluster: 'edge', ports: '587', source: 'Public', applying: false },
|
|
42
|
+
{ id: 'agl', hosts: 'agl.example.com', target: '10.0.4.20:3000', owner: 'Gateway client', cluster: 'office', ports: '443', source: 'Office network', applying: false },
|
|
43
|
+
{ id: 'status', hosts: 'status.example.com', target: 'status-page', owner: 'Service', cluster: 'production', ports: '443', source: 'Public', applying: false },
|
|
44
|
+
{ id: 'grafana', hosts: 'grafana.example.com', target: 'grafana', owner: 'Service', cluster: 'monitoring', ports: '443', source: 'Office network', applying: false },
|
|
45
|
+
{ id: 'registry', hosts: 'registry.example.com', target: 'registry', owner: 'Service', cluster: 'production', ports: '443', source: 'Public', applying: false },
|
|
46
|
+
{ id: 'api', hosts: 'api.example.com', target: 'api-gateway', owner: 'Service', cluster: 'production', ports: '443', source: 'Public', applying: false },
|
|
47
|
+
{ id: 'auth', hosts: 'auth.example.com', target: 'idp', owner: 'Service', cluster: 'production', ports: '443', source: 'Public', applying: false },
|
|
48
|
+
{ id: 'imap', hosts: 'Port 993', target: 'Mail', owner: 'System', cluster: 'edge', ports: '993', source: 'Public', applying: false },
|
|
49
|
+
{ id: 'git', hosts: 'git.example.com', target: 'gitea', owner: 'Service', cluster: 'tools', ports: '443, 22', source: 'Public', applying: false },
|
|
50
|
+
{ id: 'chat', hosts: 'chat.example.com', target: 'matrix', owner: 'Service', cluster: 'tools', ports: '443', source: 'Public', applying: false },
|
|
51
|
+
{ id: 'vpn', hosts: 'Port 51820', target: 'wireguard', owner: 'System', cluster: 'edge', ports: '51820', source: 'Public', applying: false },
|
|
52
|
+
{ id: 'billing', hosts: 'billing.example.com', target: 'billing-api', owner: 'Service', cluster: 'production', ports: '443', source: 'Public', applying: false },
|
|
53
|
+
{ id: 'backup', hosts: 'backup.example.com', target: '10.0.4.31:8200', owner: 'Gateway client', cluster: 'office', ports: '443', source: 'Office network', applying: false },
|
|
54
|
+
{ id: 'preview', hosts: '*.preview.example.com', target: 'preview-renderer', owner: 'Service', cluster: 'staging', ports: '443', source: 'Public', applying: false },
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
const redirects: IDemoRedirect[] = ['docs', 'uploads', 'media', 'www', 'status'].map((route) => ({
|
|
58
|
+
id: `${route}-http`,
|
|
59
|
+
from: `http://${routes.find((entry) => entry.id === route)!.hosts.split(' ')[0]}/*`,
|
|
60
|
+
to: 'https, 308',
|
|
61
|
+
route,
|
|
62
|
+
}));
|
|
63
|
+
|
|
64
|
+
const appliedBadge = (applying: boolean) => html`<dees-badge .tone=${applying ? 'warning' : 'success'} .text=${applying ? 'Applying' : 'Applied'} .rounded=${true}></dees-badge>`;
|
|
65
|
+
|
|
66
|
+
const routeColumns: Column<IDemoRoute>[] = [
|
|
67
|
+
{ key: 'id', header: 'Route' },
|
|
68
|
+
{ key: 'hosts', header: 'Hosts' },
|
|
69
|
+
{ key: 'target', header: 'Target' },
|
|
70
|
+
{ key: 'owner', header: 'Owner' },
|
|
71
|
+
{ key: 'applying', header: 'Applied', renderer: (value) => appliedBadge(!!value) },
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
const redirectColumns: Column<IDemoRedirect>[] = [
|
|
75
|
+
{ key: 'from', header: 'From' },
|
|
76
|
+
{ key: 'to', header: 'To' },
|
|
77
|
+
{ key: 'route', header: 'Route' },
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
const subViews: IAppuiPageTab[] = [
|
|
81
|
+
{ key: 'routes', label: 'Routes', badge: routes.length },
|
|
82
|
+
{ key: 'redirects', label: 'Derived redirects', badge: redirects.length },
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
const statuses: IStatusbuttonItem[] = [
|
|
86
|
+
{ key: 'rollout', severity: 'warning', text: 'Applying r418: 1 of 2 gateways.', detail: 'gw-nbg-1 still runs r417.' },
|
|
87
|
+
{ key: 'certificates', severity: 'success', text: 'Every route is covered by a valid certificate.' },
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A list page as the integrated view standard has it: the search, the status button and the
|
|
92
|
+
* primary action in the header, two sub-views in a stripe of tabs, and a frameless list whose
|
|
93
|
+
* rows open their record in a detail pane beside it. The host drives the pane: a row it opens
|
|
94
|
+
* sets `open` and the record, `close-request` clears them, and `width-change` is kept.
|
|
95
|
+
*/
|
|
96
|
+
@customElement('dees-demo-appui-detailpane')
|
|
97
|
+
export class DeesDemoAppuiDetailpane extends DeesElement {
|
|
98
|
+
/** The frame's width in CSS pixels; 0 takes the panel's. */
|
|
99
|
+
@property({ type: Number }) accessor frameWidth = 0;
|
|
100
|
+
@state() accessor subView = 'routes';
|
|
101
|
+
@state() accessor openId: string | null = null;
|
|
102
|
+
@state() accessor paneWidth = 400;
|
|
103
|
+
@state() accessor message = 'Click a row, or focus one and press Enter, to open its record.';
|
|
104
|
+
|
|
105
|
+
public static styles = [themeDefaultStyles, demoStyles, css`
|
|
106
|
+
:host { display: block; min-width: 0; }
|
|
107
|
+
.frame {
|
|
108
|
+
height: 560px; min-width: 0; overflow: hidden;
|
|
109
|
+
border: 1px solid var(--dees-color-border-subtle); border-radius: var(--dees-radius-xl); background: var(--dees-color-bg-canvas);
|
|
110
|
+
}
|
|
111
|
+
.record { display: grid; gap: 18px; font-size: 13px; line-height: 20px; }
|
|
112
|
+
.record h3 { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--dees-color-text-muted); }
|
|
113
|
+
.record dl { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
|
|
114
|
+
.record dt { color: var(--dees-color-text-secondary); }
|
|
115
|
+
.record dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
|
|
116
|
+
.checks { border: 1px solid var(--dees-color-border-subtle); border-radius: var(--dees-radius-lg); }
|
|
117
|
+
.check { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; }
|
|
118
|
+
.check + .check { border-top: 1px solid var(--dees-color-border-subtle); }
|
|
119
|
+
.check small { margin-left: auto; color: var(--dees-color-text-muted); }
|
|
120
|
+
`];
|
|
121
|
+
|
|
122
|
+
private get pane(): DeesAppuiDetailpane | null {
|
|
123
|
+
return this.shadowRoot?.querySelector('dees-appui-detailpane') ?? null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
private get table(): DeesTable<IDemoRoute | IDemoRedirect> | null {
|
|
127
|
+
return this.shadowRoot?.querySelector('dees-table') ?? null;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Opens a record; where the pane covers the list, the reader is taken into it. */
|
|
131
|
+
private async openRecord(id: string, takeFocus: boolean): Promise<void> {
|
|
132
|
+
if (this.openId !== id) this.message = `Opened ${id}.`;
|
|
133
|
+
this.openId = id;
|
|
134
|
+
await this.updateComplete;
|
|
135
|
+
if (takeFocus && this.pane?.narrow) await this.pane.focus();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** Closes the record; a reader who was in it goes back to the row the record was opened from. */
|
|
139
|
+
private readonly closeRecord = async () => {
|
|
140
|
+
const active = deepActiveElement();
|
|
141
|
+
const pane = this.pane;
|
|
142
|
+
const wasInPane = !!pane && !!active && (pane.contains(active) || !!pane.shadowRoot?.contains(active));
|
|
143
|
+
this.message = `close-request: closed ${this.openId}.`;
|
|
144
|
+
this.openId = null;
|
|
145
|
+
await this.updateComplete;
|
|
146
|
+
// The rows' tab stop is the row the reader last focused or clicked: the one the record came from.
|
|
147
|
+
if (wasInPane) this.table?.shadowRoot?.querySelector<HTMLElement>('tbody tr[tabindex="0"]')?.focus();
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
private readonly openAction: ITableAction<IDemoRoute | IDemoRedirect> = {
|
|
151
|
+
name: 'Open',
|
|
152
|
+
type: ['rowClick'],
|
|
153
|
+
actionFunc: async ({ item }) => this.openRecord(item.id, true),
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
public render(): TemplateResult {
|
|
157
|
+
const onRoutes = this.subView === 'routes';
|
|
158
|
+
const route = onRoutes ? routes.find((entry) => entry.id === this.openId) : undefined;
|
|
159
|
+
const redirect = onRoutes ? undefined : redirects.find((entry) => entry.id === this.openId);
|
|
160
|
+
const actions: IAppuiPageAction[] = [
|
|
161
|
+
{ label: 'Add route', iconName: 'lucide:Plus', type: 'primary', action: () => { this.message = 'Add route.'; } },
|
|
162
|
+
];
|
|
163
|
+
return html`
|
|
164
|
+
<div class="frame" style=${this.frameWidth ? `max-width: ${this.frameWidth}px` : ''}>
|
|
165
|
+
<dees-appui-page
|
|
166
|
+
layout="fill"
|
|
167
|
+
heading="Routes"
|
|
168
|
+
description="Network · 18 routes, whoever created them. Special forwards are a route type."
|
|
169
|
+
.actions=${actions}
|
|
170
|
+
.tabs=${subViews}
|
|
171
|
+
.selectedTab=${this.subView}
|
|
172
|
+
@tab-select=${(event: CustomEvent<IAppuiPageTabSelectEvent>) => {
|
|
173
|
+
this.subView = event.detail.key;
|
|
174
|
+
this.openId = null;
|
|
175
|
+
this.message = `tab-select: ${event.detail.key}`;
|
|
176
|
+
}}
|
|
177
|
+
>
|
|
178
|
+
<dees-table-search slot="tools" for="detailpaneDemoList"></dees-table-search>
|
|
179
|
+
<dees-statusbutton slot="tools" heading="Rollout" .progress=${'r418'} .items=${statuses}></dees-statusbutton>
|
|
180
|
+
<dees-appui-detailpane
|
|
181
|
+
.open=${!!(route || redirect)}
|
|
182
|
+
.heading=${route?.id ?? redirect?.from ?? ''}
|
|
183
|
+
.description=${route ? `${route.owner} ${route.target} · ${route.cluster} · r418` : redirect ? `Derived from the route ${redirect.route}` : ''}
|
|
184
|
+
.width=${this.paneWidth}
|
|
185
|
+
@close-request=${this.closeRecord}
|
|
186
|
+
@width-change=${(event: CustomEvent<IAppuiDetailpaneWidthChangeEvent>) => {
|
|
187
|
+
this.paneWidth = event.detail.width;
|
|
188
|
+
this.message = `width-change: ${event.detail.width}px, kept by the host.`;
|
|
189
|
+
}}
|
|
190
|
+
>
|
|
191
|
+
<dees-table
|
|
192
|
+
id="detailpaneDemoList"
|
|
193
|
+
frameless
|
|
194
|
+
fill
|
|
195
|
+
.searchable=${false}
|
|
196
|
+
.selectionMode=${'single'}
|
|
197
|
+
.rowKey=${'id'}
|
|
198
|
+
.dataName=${onRoutes ? 'routes' : 'redirects'}
|
|
199
|
+
.columns=${onRoutes ? routeColumns : redirectColumns}
|
|
200
|
+
.data=${onRoutes ? routes : redirects}
|
|
201
|
+
.dataActions=${[this.openAction]}
|
|
202
|
+
.selectedIds=${new Set(this.openId ? [this.openId] : [])}
|
|
203
|
+
@selectionChange=${(event: CustomEvent<{ selectedIds: string[] }>) => {
|
|
204
|
+
const [id] = event.detail.selectedIds;
|
|
205
|
+
if (id) void this.openRecord(id, false);
|
|
206
|
+
}}
|
|
207
|
+
></dees-table>
|
|
208
|
+
${route ? html`<dees-badge slot="status" .tone=${route.applying ? 'warning' : 'success'} .text=${route.applying ? 'Applying' : 'Applied'} .rounded=${true}></dees-badge>` : ''}
|
|
209
|
+
${route ? html`<dees-button slot="actions" size="sm" type="outline" text="Edit" icon="lucide:SquarePen" @clicked=${() => { this.message = `Edit ${route.id}.`; }}></dees-button>` : ''}
|
|
210
|
+
${route ? this.renderRoute(route) : redirect ? this.renderRedirect(redirect) : ''}
|
|
211
|
+
</dees-appui-detailpane>
|
|
212
|
+
</dees-appui-page>
|
|
213
|
+
</div>
|
|
214
|
+
<output class="dees-demo-output" role="status">${this.message}</output>
|
|
215
|
+
`;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
private renderRoute(route: IDemoRoute): TemplateResult {
|
|
219
|
+
return html`<div slot="detail" class="record">
|
|
220
|
+
<section><h3>Match</h3><dl><dt>Hosts</dt><dd>${route.hosts}</dd><dt>Ports</dt><dd>${route.ports}</dd></dl></section>
|
|
221
|
+
<section><h3>Target</h3><dl><dt>${route.owner}</dt><dd>${route.target}</dd><dt>Cluster</dt><dd>${route.cluster}</dd></dl></section>
|
|
222
|
+
<section><h3>Policy</h3><dl><dt>Source</dt><dd>${route.source}</dd></dl></section>
|
|
223
|
+
<section><h3>Applied</h3><div class="checks">
|
|
224
|
+
<div class="check">gw-fra-1 <small>r418, 12 s ago</small></div>
|
|
225
|
+
<div class="check">gw-nbg-1 <small>${route.applying ? 'r417, applying' : 'r418, 14 s ago'}</small></div>
|
|
226
|
+
</div></section>
|
|
227
|
+
<section><h3>Certificate</h3><dl><dt>Covered by</dt><dd>*.example.com, ACME, valid until 2027-01-08</dd></dl></section>
|
|
228
|
+
<section><h3>Derived redirect</h3><dl><dt>From</dt><dd>http :80, /*</dd><dt>To</dt><dd>https :443, 308</dd><dt>Status</dt><dd>Active</dd></dl></section>
|
|
229
|
+
<section><h3>Last change</h3><div class="checks">
|
|
230
|
+
<div class="check">r418 Changed target <small>maria.keller, 12 min. ago</small></div>
|
|
231
|
+
<div class="check">r402 Added host <small>jonas.weber, 3 days ago</small></div>
|
|
232
|
+
<div class="check">r377 Created <small>maria.keller, 2 weeks ago</small></div>
|
|
233
|
+
</div></section>
|
|
234
|
+
</div>`;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
private renderRedirect(redirect: IDemoRedirect): TemplateResult {
|
|
238
|
+
return html`<div slot="detail" class="record">
|
|
239
|
+
<section><h3>Redirect</h3><dl><dt>From</dt><dd>${redirect.from}</dd><dt>To</dt><dd>${redirect.to}</dd></dl></section>
|
|
240
|
+
<section><h3>Derived from</h3><dl><dt>Route</dt><dd>${redirect.route}</dd><dt>Status</dt><dd>Active</dd></dl></section>
|
|
241
|
+
</div>`;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/** The integrated list at the panel's width and at 600px, where the open record covers the list. */
|
|
246
|
+
export const demoFunc = () => demoPage('Detail pane', 'A list and the record it opens, side by side inside a view\'s content: the list fills the room left and scrolls on its own, the record scrolls on its own in the pane, which a reader resizes at its inner edge. At 700px or less the open pane covers the list.', html`
|
|
247
|
+
${demoSection('Integrated list', 'A page with layout="fill": the search and the status button in its tools, the primary action last, two sub-views as tabs in a stripe, and a frameless list whose rows open their record. Drag the pane\'s inner edge, or focus it and press the arrow keys; the host keeps the width from width-change.', html`
|
|
248
|
+
<dees-demo-appui-detailpane></dees-demo-appui-detailpane>
|
|
249
|
+
${demoCode(`<dees-appui-page layout="fill" heading="Routes" .tabs=\${subViews} .actions=\${[addRoute]}>
|
|
250
|
+
<dees-table-search slot="tools" for="routes"></dees-table-search>
|
|
251
|
+
<dees-statusbutton slot="tools" .items=\${statuses}></dees-statusbutton>
|
|
252
|
+
<dees-appui-detailpane .open=\${!!route} .heading=\${route?.id ?? ''} .description=\${summary}
|
|
253
|
+
.width=\${this.paneWidth} @close-request=\${() => this.close()}
|
|
254
|
+
@width-change=\${(event) => this.keepWidth(event.detail.width)}>
|
|
255
|
+
<dees-table id="routes" frameless fill .searchable=\${false} .selectionMode=\${'single'}
|
|
256
|
+
.rowKey=\${'id'} .columns=\${columns} .data=\${routes}
|
|
257
|
+
@selectionChange=\${(event) => this.open(event.detail.selectedIds[0])}></dees-table>
|
|
258
|
+
<dees-badge slot="status" tone="warning" text="Applying" rounded></dees-badge>
|
|
259
|
+
<dees-button slot="actions" size="sm" type="outline" text="Edit"></dees-button>
|
|
260
|
+
<div slot="detail">…the record…</div>
|
|
261
|
+
</dees-appui-detailpane>
|
|
262
|
+
</dees-appui-page>`)}
|
|
263
|
+
`)}
|
|
264
|
+
${demoSection('Narrow', 'At 600px the open record covers the list, which is inert meanwhile. The host takes the reader into the pane with focus(); Escape or the close button ask to close it, and the host puts the focus back on the row.', html`
|
|
265
|
+
<dees-demo-appui-detailpane .frameWidth=${600}></dees-demo-appui-detailpane>
|
|
266
|
+
`)}
|
|
267
|
+
`);
|