@umbraco-cms/backoffice 14.0.0--preview004-3ba57be2 → 14.0.0--preview004-168c444e
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-cms/apps/backoffice/components/backoffice-header-sections.element.d.ts +0 -5
- package/dist-cms/apps/backoffice/components/backoffice-header-sections.element.js +7 -52
- package/dist-cms/packages/core/components/body-layout/body-layout.element.js +2 -1
- package/dist-cms/packages/core/section/section-main/section-main.element.js +2 -1
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { CSSResultGroup } from '../../../external/lit/index.js';
|
|
2
2
|
import { UmbLitElement } from '../../../shared/lit-element/index.js';
|
|
3
3
|
export declare class UmbBackofficeHeaderSectionsElement extends UmbLitElement {
|
|
4
|
-
private _open;
|
|
5
4
|
private _sections;
|
|
6
|
-
private _extraSections;
|
|
7
5
|
private _currentSectionAlias;
|
|
8
6
|
private _backofficeContext?;
|
|
9
7
|
constructor();
|
|
10
|
-
private _handleMore;
|
|
11
|
-
private _handleLabelClick;
|
|
12
8
|
private _observeSections;
|
|
13
9
|
private _observeCurrentSection;
|
|
14
10
|
private _renderSections;
|
|
15
|
-
private _renderExtraSections;
|
|
16
11
|
render(): import("lit-html").TemplateResult<1>;
|
|
17
12
|
static styles: CSSResultGroup;
|
|
18
13
|
}
|
|
@@ -5,14 +5,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { UMB_BACKOFFICE_CONTEXT_TOKEN } from '../backoffice.context.js';
|
|
8
|
-
import { css, html,
|
|
8
|
+
import { css, html, customElement, state, repeat } from '../../../external/lit/index.js';
|
|
9
9
|
import { UmbLitElement } from '../../../shared/lit-element/index.js';
|
|
10
10
|
export let UmbBackofficeHeaderSectionsElement = class UmbBackofficeHeaderSectionsElement extends UmbLitElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
|
-
this._open = false;
|
|
14
13
|
this._sections = [];
|
|
15
|
-
this._extraSections = [];
|
|
16
14
|
this._currentSectionAlias = '';
|
|
17
15
|
this.consumeContext(UMB_BACKOFFICE_CONTEXT_TOKEN, (backofficeContext) => {
|
|
18
16
|
this._backofficeContext = backofficeContext;
|
|
@@ -20,15 +18,6 @@ export let UmbBackofficeHeaderSectionsElement = class UmbBackofficeHeaderSection
|
|
|
20
18
|
this._observeCurrentSection();
|
|
21
19
|
});
|
|
22
20
|
}
|
|
23
|
-
_handleMore(e) {
|
|
24
|
-
e.stopPropagation();
|
|
25
|
-
this._open = !this._open;
|
|
26
|
-
}
|
|
27
|
-
_handleLabelClick() {
|
|
28
|
-
const moreTab = this.shadowRoot?.getElementById('moreTab');
|
|
29
|
-
moreTab?.setAttribute('active', 'true');
|
|
30
|
-
this._open = false;
|
|
31
|
-
}
|
|
32
21
|
_observeSections() {
|
|
33
22
|
if (!this._backofficeContext)
|
|
34
23
|
return;
|
|
@@ -54,67 +43,33 @@ export let UmbBackofficeHeaderSectionsElement = class UmbBackofficeHeaderSection
|
|
|
54
43
|
href="${`section/${section.manifest?.meta.pathname}`}"
|
|
55
44
|
label="${section.manifest?.meta.label ?? section.manifest?.name ?? ''}"></uui-tab>
|
|
56
45
|
`)}
|
|
57
|
-
${this._renderExtraSections()}
|
|
58
46
|
</uui-tab-group>
|
|
59
47
|
`;
|
|
60
48
|
}
|
|
61
|
-
_renderExtraSections() {
|
|
62
|
-
return when(this._extraSections.length > 0, () => html `
|
|
63
|
-
<uui-tab id="moreTab">
|
|
64
|
-
<uui-popover .open=${this._open} placement="bottom-start" @close="${() => (this._open = false)}">
|
|
65
|
-
<uui-button slot="trigger" look="primary" label="More" @click="${this._handleMore}" compact>
|
|
66
|
-
<uui-symbol-more></uui-symbol-more>
|
|
67
|
-
</uui-button>
|
|
68
|
-
|
|
69
|
-
<div slot="popover" id="dropdown">
|
|
70
|
-
${this._extraSections.map((section) => html `
|
|
71
|
-
<uui-menu-item
|
|
72
|
-
?active="${this._currentSectionAlias === section.alias}"
|
|
73
|
-
label="${section.meta.label || section.name}"
|
|
74
|
-
@click-label="${this._handleLabelClick}"></uui-menu-item>
|
|
75
|
-
`)}
|
|
76
|
-
</div>
|
|
77
|
-
</uui-popover>
|
|
78
|
-
</uui-tab>
|
|
79
|
-
`);
|
|
80
|
-
}
|
|
81
49
|
render() {
|
|
82
50
|
return html ` ${this._renderSections()} `;
|
|
83
51
|
}
|
|
84
52
|
static { this.styles = [
|
|
85
53
|
css `
|
|
54
|
+
:host {
|
|
55
|
+
display: contents;
|
|
56
|
+
}
|
|
86
57
|
#tabs {
|
|
87
|
-
color: var(--uui-color-header-contrast);
|
|
88
58
|
height: 60px;
|
|
59
|
+
flex-basis: 100%;
|
|
89
60
|
font-size: 16px;
|
|
90
61
|
--uui-tab-text: var(--uui-color-header-contrast);
|
|
91
62
|
--uui-tab-text-hover: var(--uui-color-header-contrast-emphasis);
|
|
92
63
|
--uui-tab-text-active: var(--uui-color-header-contrast-emphasis);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
#dropdown {
|
|
97
|
-
background-color: white;
|
|
98
|
-
border-radius: var(--uui-border-radius);
|
|
99
|
-
width: 100%;
|
|
100
|
-
height: 100%;
|
|
101
|
-
box-sizing: border-box;
|
|
102
|
-
box-shadow: var(--uui-shadow-depth-3);
|
|
103
|
-
min-width: 200px;
|
|
104
|
-
color: black; /* Change to variable */
|
|
64
|
+
background-color: var(--uui-color-header-background);
|
|
65
|
+
--uui-tab-group-dropdown-background: var(--uui-color-header-surface);
|
|
105
66
|
}
|
|
106
67
|
`,
|
|
107
68
|
]; }
|
|
108
69
|
};
|
|
109
|
-
__decorate([
|
|
110
|
-
state()
|
|
111
|
-
], UmbBackofficeHeaderSectionsElement.prototype, "_open", void 0);
|
|
112
70
|
__decorate([
|
|
113
71
|
state()
|
|
114
72
|
], UmbBackofficeHeaderSectionsElement.prototype, "_sections", void 0);
|
|
115
|
-
__decorate([
|
|
116
|
-
state()
|
|
117
|
-
], UmbBackofficeHeaderSectionsElement.prototype, "_extraSections", void 0);
|
|
118
73
|
__decorate([
|
|
119
74
|
state()
|
|
120
75
|
], UmbBackofficeHeaderSectionsElement.prototype, "_currentSectionAlias", void 0);
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { UmbTextStyles } from
|
|
7
|
+
import { UmbTextStyles } from '../../../../shared/style/index.js';
|
|
8
8
|
import { css, html, LitElement, nothing, customElement, property, state, query, } from '../../../../external/lit/index.js';
|
|
9
9
|
//TODO: Add the following attributes to JSDocs: header-transparent, main-no-padding, header-no-padding, header-fit-height
|
|
10
10
|
/**
|
|
@@ -169,6 +169,7 @@ export let UmbBodyLayoutElement = class UmbBodyLayoutElement extends LitElement
|
|
|
169
169
|
height: 100%;
|
|
170
170
|
align-items: center;
|
|
171
171
|
box-sizing: border-box;
|
|
172
|
+
min-width: 0;
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
#navigation-slot,
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { UmbTextStyles } from
|
|
7
|
+
import { UmbTextStyles } from '../../../../shared/style/index.js';
|
|
8
8
|
import { css, html, LitElement, customElement } from '../../../../external/lit/index.js';
|
|
9
9
|
export let UmbSectionMainElement = class UmbSectionMainElement extends LitElement {
|
|
10
10
|
render() {
|
|
@@ -20,6 +20,7 @@ export let UmbSectionMainElement = class UmbSectionMainElement extends LitElemen
|
|
|
20
20
|
:host {
|
|
21
21
|
flex: 1 1 auto;
|
|
22
22
|
height: 100%;
|
|
23
|
+
min-width: 0;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
main {
|