Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
96e237b9af | |||
710e06b2f1 | |||
a3bc25c4ac | |||
ee5b712a37 | |||
879ae5ad91 | |||
2bbda416b2 | |||
de88957857 | |||
aa0c63d569 | |||
d843f27fd3 | |||
a26755b7d3 | |||
345a562a21 | |||
3fae99554d | |||
ed30ed3f8f | |||
beef47959b | |||
aec2cf18fd | |||
0f45633666 | |||
8588888ce7 | |||
2a62a635cd | |||
0eb2557956 | |||
9960bf7018 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-catalog",
|
"name": "@designestate/dees-catalog",
|
||||||
"version": "1.0.157",
|
"version": "1.0.167",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "website for lossless.com",
|
"description": "website for lossless.com",
|
||||||
"main": "dist_ts_web/index.js",
|
"main": "dist_ts_web/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@designestate/dees-catalog',
|
name: '@designestate/dees-catalog',
|
||||||
version: '1.0.157',
|
version: '1.0.167',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ export class DeesButton extends DeesElement {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: ${cssManager.bdTheme('#fff', '#333')};
|
background: ${cssManager.bdTheme('#fff', '#333')};
|
||||||
box-shadow: ${cssManager.bdTheme('0px 1px 4px rgba(0,0,0,0.3)', 'none')};
|
box-shadow: ${cssManager.bdTheme('0px 1px 3px rgba(0,0,0,0.3)', 'none')};
|
||||||
border: 1px solid ${cssManager.bdTheme('#eee', '#333')};
|
border: 1px solid ${cssManager.bdTheme('#eee', '#333')};
|
||||||
border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')};
|
border-top: ${cssManager.bdTheme('1px solid #eee', '1px solid #444')};
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
@ -30,9 +30,10 @@ export class DeesDataviewCodebox extends DeesElement {
|
|||||||
public progLang: string = 'typescript';
|
public progLang: string = 'typescript';
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public codeToDisplay: string = '// no code set';
|
public codeToDisplay: string = '';
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -143,12 +144,15 @@ export class DeesDataviewCodebox extends DeesElement {
|
|||||||
})
|
})
|
||||||
})()}
|
})()}
|
||||||
</div>
|
</div>
|
||||||
<pre><code class="${this.progLang}">${this.codeToDisplay}</code></pre>
|
<pre><code></code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@state()
|
||||||
|
private codeToDisplayStore = '';
|
||||||
|
|
||||||
public async updated(_changedProperties) {
|
public async updated(_changedProperties) {
|
||||||
super.updated(_changedProperties);
|
super.updated(_changedProperties);
|
||||||
console.log('highlighting now');
|
console.log('highlighting now');
|
||||||
@ -159,11 +163,16 @@ export class DeesDataviewCodebox extends DeesElement {
|
|||||||
slottedCodeNodes.push(childNode as Text);
|
slottedCodeNodes.push(childNode as Text);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (slottedCodeNodes[0] && slottedCodeNodes[0].wholeText) {
|
if (this.codeToDisplay && this.codeToDisplay !== this.codeToDisplayStore) {
|
||||||
this.codeToDisplay = smartstring.indent.normalize(slottedCodeNodes[0].wholeText);
|
this.codeToDisplayStore = smartstring.indent.normalize(this.codeToDisplay).trimStart();
|
||||||
|
}
|
||||||
|
if (slottedCodeNodes[0] && slottedCodeNodes[0].wholeText && !this.codeToDisplay) {
|
||||||
|
this.codeToDisplayStore = smartstring.indent.normalize(slottedCodeNodes[0].wholeText).trimStart();
|
||||||
|
this.codeToDisplay = this.codeToDisplayStore;
|
||||||
}
|
}
|
||||||
await domtools.plugins.smartdelay.delayFor(0);
|
await domtools.plugins.smartdelay.delayFor(0);
|
||||||
const localCodeNode = this.shadowRoot.querySelector('code');
|
const localCodeNode = this.shadowRoot.querySelector('code');
|
||||||
hlight.highlightBlock(localCodeNode);
|
const html = hlight.highlight(this.codeToDisplayStore, {language: this.progLang, ignoreIllegals: true});
|
||||||
|
localCodeNode.innerHTML = html.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,6 @@ import {
|
|||||||
|
|
||||||
import * as tsclass from '@tsclass/tsclass';
|
import * as tsclass from '@tsclass/tsclass';
|
||||||
|
|
||||||
import hlight from 'highlight.js';
|
|
||||||
|
|
||||||
import * as smartstring from '@pushrocks/smartstring';
|
|
||||||
|
|
||||||
import * as domtools from '@designestate/dees-domtools';
|
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
'dees-dataview-statusobject': DeesDataviewStatusobject;
|
'dees-dataview-statusobject': DeesDataviewStatusobject;
|
||||||
@ -67,9 +61,9 @@ export class DeesDataviewStatusobject extends DeesElement {
|
|||||||
cssManager.defaultStyles,
|
cssManager.defaultStyles,
|
||||||
css`
|
css`
|
||||||
.mainbox {
|
.mainbox {
|
||||||
max-width: 600px;
|
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background: #1b1b1b;
|
background: ${cssManager.bdTheme('#fff', '#1b1b1b')};
|
||||||
|
box-shadow: 0px 1px 3px #00000030;
|
||||||
min-height: 48px;
|
min-height: 48px;
|
||||||
color: ${cssManager.bdTheme('#000', '#fff')};
|
color: ${cssManager.bdTheme('#000', '#fff')};
|
||||||
}
|
}
|
||||||
@ -130,6 +124,10 @@ export class DeesDataviewStatusobject extends DeesElement {
|
|||||||
border-top: 1px dotted ${cssManager.bdTheme('#999', '#444')};
|
border-top: 1px dotted ${cssManager.bdTheme('#999', '#444')};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.detail .detailsText {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.detail .detailsText .label {
|
.detail .detailsText .label {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
@ -145,11 +143,11 @@ export class DeesDataviewStatusobject extends DeesElement {
|
|||||||
return html`
|
return html`
|
||||||
<div class="mainbox">
|
<div class="mainbox">
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<div class="statusdot ${this.statusObject.combinedStatus}"></div>
|
<div class="statusdot ${this.statusObject?.combinedStatus}"></div>
|
||||||
<h1>${this.statusObject?.name || 'no status object assigned'}</h1>
|
<h1>${this.statusObject?.name || 'no status object assigned'}</h1>
|
||||||
<div class="copyMain">Copy as JSON</div>
|
<div class="copyMain">Copy as JSON</div>
|
||||||
</div>
|
</div>
|
||||||
${this.statusObject.details.map((detailArg) => {
|
${this.statusObject?.details?.map((detailArg) => {
|
||||||
return html`
|
return html`
|
||||||
<div class="detail">
|
<div class="detail">
|
||||||
<div class="statusdot ${detailArg.status}"></div>
|
<div class="statusdot ${detailArg.status}"></div>
|
||||||
|
@ -10,7 +10,7 @@ declare global {
|
|||||||
@customElement('dees-input-text')
|
@customElement('dees-input-text')
|
||||||
export class DeesInputText extends DeesElement {
|
export class DeesInputText extends DeesElement {
|
||||||
public static demo = () => html`
|
public static demo = () => html`
|
||||||
<dees-input-text .label=${'this is a label'}></dees-input-text>
|
<dees-input-text .label=${'this is a label'} .value=${'test'}></dees-input-text>
|
||||||
<dees-input-text .isPasswordBool=${true}></dees-input-text>
|
<dees-input-text .isPasswordBool=${true}></dees-input-text>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -29,7 +29,8 @@ export class DeesInputText extends DeesElement {
|
|||||||
public key: string;
|
public key: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: String
|
type: String,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public value: string = '';
|
public value: string = '';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user