fix(sdig-workspace): make workspace view externally controllable and preserve explicit initial state
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-05-02 - 1.5.1 - fix(sdig-workspace)
|
||||||
|
make workspace view externally controllable and preserve explicit initial state
|
||||||
|
|
||||||
|
- change the workspace view from internal state to a reflected public property
|
||||||
|
- only apply initialView during connection when no non-default view has already been set
|
||||||
|
|
||||||
## 2026-05-02 - 1.5.0 - feat(elements)
|
## 2026-05-02 - 1.5.0 - feat(elements)
|
||||||
add reusable context menu element for recipient role selection
|
add reusable context menu element for recipient role selection
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@signature.digital/catalog',
|
name: '@signature.digital/catalog',
|
||||||
version: '1.5.0',
|
version: '1.5.1',
|
||||||
description: 'A comprehensive catalog of customizable web components designed for building and managing e-signature applications.'
|
description: 'A comprehensive catalog of customizable web components designed for building and managing e-signature applications.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { DeesElement, property, state, html, customElement, type TemplateResult, css } from '@design.estate/dees-element';
|
import { DeesElement, property, html, customElement, type TemplateResult, css } from '@design.estate/dees-element';
|
||||||
import { icon, type TDensity, type TWorkspaceTheme, type TWorkspaceView } from './sdig-workspace.shared.js';
|
import { icon, type TDensity, type TWorkspaceTheme, type TWorkspaceView } from './sdig-workspace.shared.js';
|
||||||
import './sdig-workspace-inbox.js';
|
import './sdig-workspace-inbox.js';
|
||||||
import './sdig-workspace-compose.js';
|
import './sdig-workspace-compose.js';
|
||||||
@@ -22,11 +22,13 @@ export class SdigWorkspace extends DeesElement {
|
|||||||
@property({ type: String }) public accessor density: TDensity = 'comfortable';
|
@property({ type: String }) public accessor density: TDensity = 'comfortable';
|
||||||
@property({ type: String, reflect: true }) public accessor theme: TWorkspaceTheme = 'dark';
|
@property({ type: String, reflect: true }) public accessor theme: TWorkspaceTheme = 'dark';
|
||||||
@property({ type: String }) public accessor initialView: TWorkspaceView = 'inbox';
|
@property({ type: String }) public accessor initialView: TWorkspaceView = 'inbox';
|
||||||
@state() private accessor view: TWorkspaceView = 'inbox';
|
@property({ type: String, reflect: true }) public accessor view: TWorkspaceView = 'inbox';
|
||||||
|
|
||||||
public connectedCallback = async () => {
|
public connectedCallback = async () => {
|
||||||
await super.connectedCallback();
|
await super.connectedCallback();
|
||||||
this.view = this.initialView || 'inbox';
|
if (this.view === 'inbox' && this.initialView !== 'inbox') {
|
||||||
|
this.view = this.initialView;
|
||||||
|
}
|
||||||
this.addEventListener('workspace-view-request', this.handleViewRequest as EventListener);
|
this.addEventListener('workspace-view-request', this.handleViewRequest as EventListener);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user