@signature.digital/catalog 1.5.0 → 1.6.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 +186 -186
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/sdig-workspace/sdig-workspace-inbox.d.ts +2 -1
- package/dist_ts_web/elements/sdig-workspace/sdig-workspace-inbox.js +24 -9
- package/dist_ts_web/elements/sdig-workspace/sdig-workspace.d.ts +3 -2
- package/dist_ts_web/elements/sdig-workspace/sdig-workspace.js +19 -9
- package/dist_watch/bundle.js +4 -2
- package/dist_watch/bundle.js.map +3 -3
- package/package.json +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/sdig-workspace/sdig-workspace-inbox.ts +15 -7
- package/ts_web/elements/sdig-workspace/sdig-workspace.ts +10 -7
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ export class SdigWorkspaceInbox extends DeesElement {
|
|
|
14
14
|
public static demoGroups = ['Signature Digital Workspace'];
|
|
15
15
|
|
|
16
16
|
@property({ type: String }) public accessor density: TDensity = 'comfortable';
|
|
17
|
+
@property({ attribute: false }) public accessor documents: IDocumentRow[] = demoDocuments;
|
|
17
18
|
@state() private accessor filter: string = 'all';
|
|
18
19
|
@state() private accessor search: string = '';
|
|
19
20
|
|
|
@@ -45,7 +46,7 @@ export class SdigWorkspaceInbox extends DeesElement {
|
|
|
45
46
|
`];
|
|
46
47
|
|
|
47
48
|
private get filteredDocuments(): IDocumentRow[] {
|
|
48
|
-
return
|
|
49
|
+
return this.documents
|
|
49
50
|
.filter((doc) => this.filter === 'all' || doc.status === this.filter)
|
|
50
51
|
.filter((doc) => !this.search || doc.title.toLowerCase().includes(this.search.toLowerCase()));
|
|
51
52
|
}
|
|
@@ -62,23 +63,30 @@ export class SdigWorkspaceInbox extends DeesElement {
|
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
private openDocument(doc: IDocumentRow) {
|
|
66
|
+
this.dispatchEvent(new CustomEvent('document-open', {
|
|
67
|
+
detail: { document: doc },
|
|
68
|
+
bubbles: true,
|
|
69
|
+
composed: true,
|
|
70
|
+
}));
|
|
65
71
|
requestWorkspaceView(this, doc.status === 'signed' ? 'audit' : 'sign');
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
public render(): TemplateResult {
|
|
75
|
+
const documents = this.documents;
|
|
69
76
|
const filters = [
|
|
70
|
-
{ id: 'all', label: 'All', count:
|
|
71
|
-
{ id: 'awaiting', label: 'Awaiting', count:
|
|
72
|
-
{ id: 'signed', label: 'Completed', count:
|
|
73
|
-
{ id: 'draft', label: 'Drafts', count:
|
|
74
|
-
{ id: 'declined', label: 'Declined', count:
|
|
77
|
+
{ id: 'all', label: 'All', count: documents.length },
|
|
78
|
+
{ id: 'awaiting', label: 'Awaiting', count: documents.filter((doc) => doc.status === 'awaiting').length },
|
|
79
|
+
{ id: 'signed', label: 'Completed', count: documents.filter((doc) => doc.status === 'signed').length },
|
|
80
|
+
{ id: 'draft', label: 'Drafts', count: documents.filter((doc) => doc.status === 'draft').length },
|
|
81
|
+
{ id: 'declined', label: 'Declined', count: documents.filter((doc) => doc.status === 'declined').length },
|
|
75
82
|
];
|
|
83
|
+
const attentionCount = documents.filter((doc) => doc.status === 'awaiting').length;
|
|
76
84
|
|
|
77
85
|
return html`
|
|
78
86
|
${topBar({
|
|
79
87
|
breadcrumb: ['signature.digital', 'Lossless GmbH', 'Inbox'],
|
|
80
88
|
title: 'Inbox',
|
|
81
|
-
subtitle: pill(`${
|
|
89
|
+
subtitle: pill(`${attentionCount} need attention`, 'info'),
|
|
82
90
|
actions: html`${actionButton('Import', 'outline', 'upload')}${actionButton('New document', 'primary', 'plus', () => requestWorkspaceView(this, 'compose'))}`,
|
|
83
91
|
})}
|
|
84
92
|
<div class="filterbar">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DeesElement, property,
|
|
2
|
-
import { icon, type TDensity, type TWorkspaceTheme, type TWorkspaceView } from './sdig-workspace.shared.js';
|
|
1
|
+
import { DeesElement, property, html, customElement, type TemplateResult, css } from '@design.estate/dees-element';
|
|
2
|
+
import { demoDocuments, icon, type IDocumentRow, type TDensity, type TWorkspaceTheme, type TWorkspaceView } from './sdig-workspace.shared.js';
|
|
3
3
|
import './sdig-workspace-inbox.js';
|
|
4
4
|
import './sdig-workspace-compose.js';
|
|
5
5
|
import './sdig-workspace-sign.js';
|
|
@@ -22,11 +22,14 @@ export class SdigWorkspace extends DeesElement {
|
|
|
22
22
|
@property({ type: String }) public accessor density: TDensity = 'comfortable';
|
|
23
23
|
@property({ type: String, reflect: true }) public accessor theme: TWorkspaceTheme = 'dark';
|
|
24
24
|
@property({ type: String }) public accessor initialView: TWorkspaceView = 'inbox';
|
|
25
|
-
@
|
|
25
|
+
@property({ type: String, reflect: true }) public accessor view: TWorkspaceView = 'inbox';
|
|
26
|
+
@property({ attribute: false }) public accessor documents: IDocumentRow[] = demoDocuments;
|
|
26
27
|
|
|
27
28
|
public connectedCallback = async () => {
|
|
28
29
|
await super.connectedCallback();
|
|
29
|
-
this.view
|
|
30
|
+
if (this.view === 'inbox' && this.initialView !== 'inbox') {
|
|
31
|
+
this.view = this.initialView;
|
|
32
|
+
}
|
|
30
33
|
this.addEventListener('workspace-view-request', this.handleViewRequest as EventListener);
|
|
31
34
|
};
|
|
32
35
|
|
|
@@ -131,7 +134,7 @@ export class SdigWorkspace extends DeesElement {
|
|
|
131
134
|
|
|
132
135
|
private renderSidebar(): TemplateResult {
|
|
133
136
|
const navItems = [
|
|
134
|
-
{ id: 'inbox', label: 'Inbox', icon: 'inbox', count:
|
|
137
|
+
{ id: 'inbox', label: 'Inbox', icon: 'inbox', count: this.documents.length },
|
|
135
138
|
{ id: 'compose', label: 'Compose', icon: 'plus' },
|
|
136
139
|
{ id: 'templates', label: 'Templates', icon: 'folder', count: 12 },
|
|
137
140
|
{ id: 'audit', label: 'Audit Trail', icon: 'shield' },
|
|
@@ -157,7 +160,7 @@ export class SdigWorkspace extends DeesElement {
|
|
|
157
160
|
|
|
158
161
|
private renderView(): TemplateResult {
|
|
159
162
|
switch (this.view) {
|
|
160
|
-
case 'inbox': return html`<sdig-workspace-inbox class="view-host" .density=${this.density}></sdig-workspace-inbox>`;
|
|
163
|
+
case 'inbox': return html`<sdig-workspace-inbox class="view-host" .density=${this.density} .documents=${this.documents}></sdig-workspace-inbox>`;
|
|
161
164
|
case 'compose': return html`<sdig-workspace-compose class="view-host"></sdig-workspace-compose>`;
|
|
162
165
|
case 'sign': return html`<sdig-workspace-sign class="view-host"></sdig-workspace-sign>`;
|
|
163
166
|
case 'audit': return html`<sdig-workspace-audit class="view-host"></sdig-workspace-audit>`;
|
|
@@ -165,7 +168,7 @@ export class SdigWorkspace extends DeesElement {
|
|
|
165
168
|
case 'templates': return html`<sdig-workspace-placeholder class="view-host" label="Templates" subtitle="Reusable agreement templates"></sdig-workspace-placeholder>`;
|
|
166
169
|
case 'team': return html`<sdig-workspace-placeholder class="view-host" label="Team" subtitle="Workspace members & roles"></sdig-workspace-placeholder>`;
|
|
167
170
|
case 'settings': return html`<sdig-workspace-placeholder class="view-host" label="Settings" subtitle="Workspace, billing, security"></sdig-workspace-placeholder>`;
|
|
168
|
-
default: return html`<sdig-workspace-inbox class="view-host" .density=${this.density}></sdig-workspace-inbox>`;
|
|
171
|
+
default: return html`<sdig-workspace-inbox class="view-host" .density=${this.density} .documents=${this.documents}></sdig-workspace-inbox>`;
|
|
169
172
|
}
|
|
170
173
|
}
|
|
171
174
|
|