chore: remove tools folder

This commit is contained in:
qa46hx 2020-12-16 14:49:04 +01:00
parent 94d6955390
commit e50fc4ce21
30 changed files with 0 additions and 482 deletions

View file

@ -1,29 +0,0 @@
export class OverlaysManager {
name = 'OverlayManager 1.x';
blockBody = false;
constructor() {
this._setupBlocker();
}
_setupBlocker() {
const blocker = document.createElement('div');
blocker.setAttribute('style', 'border: 2px solid #8d0606; margin: 10px; padding: 10px; width: 140px; text-align: center;');
blocker.innerText = `Blocker for ${this.name}`;
document.body.appendChild(blocker);
this.blocker = blocker;
}
block() {
this.blockBody = true;
this.blocker.style.backgroundColor = '#ff6161';
}
unBlock() {
this.blockBody = false;
this.blocker.style.backgroundColor = 'transparent';
}
}

View file

@ -1,3 +0,0 @@
import { OverlaysManager } from './index.js';
export const overlays = new OverlaysManager();

View file

@ -1,4 +0,0 @@
{
"name": "overlays",
"version": "1.0.0"
}

View file

@ -1,7 +0,0 @@
{
"name": "page-a",
"version": "1.0.0",
"dependencies": {
"overlays": "^1.0.0"
}
}

View file

@ -1,34 +0,0 @@
import { LitElement, html, css } from 'lit-element';
import { overlays } from 'overlays/instance.js';
export class PageA extends LitElement {
static get styles() {
return css`
:host {
display: block;
padding: 10px;
border: 2px solid #ccc;
}
`;
}
render() {
return html`
<h3>I am page A</h3>
<p>Overlays Status:</p>
<p>Name: ${overlays.name}</p>
<p>Blocked: ${overlays.blockBody}</p>
<button @click=${() => {
overlays.block(); this.requestUpdate();
}}>block</button>
<button @click=${() => {
overlays.unBlock(); this.requestUpdate();
}}>un-block</button>
<button @click=${() => {
this.requestUpdate();
}}>refresh</button>
`;
}
}
customElements.define('page-a', PageA);

View file

@ -1,29 +0,0 @@
export class OverlaysManager {
name = 'OverlayManager 2.x';
_blockBody = false;
constructor() {
this._setupBlocker();
}
_setupBlocker() {
const blocker = document.createElement('div');
blocker.setAttribute('style', 'border: 2px solid #8d0606; margin: 10px; padding: 10px; width: 140px; text-align: center;');
blocker.innerText = `Blocker for ${this.name}`;
document.body.appendChild(blocker);
this.blocker = blocker;
}
blockBody() {
this._blockBody = true;
this.blocker.style.backgroundColor = '#ff6161';
}
unBlockBody() {
this._blockBody = false;
this.blocker.style.backgroundColor = 'transparent';
}
}

View file

@ -1,3 +0,0 @@
import { OverlaysManager } from './index.js';
export const overlays = new OverlaysManager();

View file

@ -1,4 +0,0 @@
{
"name": "overlays",
"version": "2.0.0"
}

View file

@ -1,7 +0,0 @@
{
"name": "page-b",
"version": "1.0.0",
"dependencies": {
"overlays": "^2.0.0"
}
}

View file

@ -1,34 +0,0 @@
import { LitElement, html, css } from 'lit-element';
import { overlays } from 'overlays/instance.js';
export class PageB extends LitElement {
static get styles() {
return css`
:host {
display: block;
padding: 10px;
border: 2px solid #ccc;
}
`;
}
render() {
return html`
<h3>I am page B</h3>
<p>Overlays Status:</p>
<p>Name: ${overlays.name}</p>
<p>Blocked: ${overlays._blockBody}</p>
<button @click=${() => {
overlays.blockBody(); this.requestUpdate();
}}>block</button>
<button @click=${() => {
overlays.unBlockBody(); this.requestUpdate();
}}>un-block</button>
<button @click=${() => {
this.requestUpdate();
}}>refresh</button>
`;
}
}
customElements.define('page-b', PageB);

View file

@ -1,29 +0,0 @@
export class OverlaysManager {
name = 'OverlayManager 1.x';
blockBody = false;
constructor() {
this._setupBlocker();
}
_setupBlocker() {
const blocker = document.createElement('div');
blocker.setAttribute('style', 'border: 2px solid #8d0606; margin: 10px; padding: 10px; width: 140px; text-align: center;');
blocker.innerText = `Blocker for ${this.name}`;
document.body.appendChild(blocker);
this.blocker = blocker;
}
block() {
this.blockBody = true;
this.blocker.style.backgroundColor = '#ff6161';
}
unBlock() {
this.blockBody = false;
this.blocker.style.backgroundColor = 'transparent';
}
}

View file

@ -1,4 +0,0 @@
import { OverlaysManager } from './index.js';
import { singletonManager } from '../../../../index.js';
export const overlays = singletonManager.get('overlays::overlays::1.x') || new OverlaysManager();

View file

@ -1,4 +0,0 @@
{
"name": "overlays",
"version": "1.0.0"
}

View file

@ -1,7 +0,0 @@
{
"name": "page-a",
"version": "1.0.0",
"dependencies": {
"overlays": "^1.0.0"
}
}

View file

@ -1,35 +0,0 @@
import { LitElement, html, css } from 'lit-element';
import { overlays } from 'overlays/instance.js';
export class PageA extends LitElement {
static get styles() {
return css`
:host {
display: block;
padding: 10px;
border: 2px solid #ccc;
}
`;
}
render() {
return html`
<h3>I am page A</h3>
<p>Overlays Status:</p>
<p>Name: ${overlays.name}</p>
<p>Blocked: ${overlays.blockBody}</p>
<button @click=${() => {
overlays.block(); this.requestUpdate();
}}>block</button>
<button @click=${() => {
overlays.unBlock(); this.requestUpdate();
}}>un-block</button>
<button @click=${() => {
this.requestUpdate();
}}>refresh</button>
`;
}
}
customElements.define('page-a', PageA);

View file

@ -1,29 +0,0 @@
export class OverlaysManager {
name = 'OverlayManager 2.x';
_blockBody = false;
constructor() {
this._setupBlocker();
}
_setupBlocker() {
const blocker = document.createElement('div');
blocker.setAttribute('style', 'border: 2px solid #8d0606; margin: 10px; padding: 10px; width: 140px; text-align: center;');
blocker.innerText = `Blocker for ${this.name}`;
document.body.appendChild(blocker);
this.blocker = blocker;
}
blockBody() {
this._blockBody = true;
this.blocker.style.backgroundColor = '#ff6161';
}
unBlockBody() {
this._blockBody = false;
this.blocker.style.backgroundColor = 'transparent';
}
}

View file

@ -1,4 +0,0 @@
import { OverlaysManager } from './index.js';
import { singletonManager } from '../../../../../../index.js';
export const overlays = singletonManager.get('overlays::overlays::2.x') || new OverlaysManager();

View file

@ -1,4 +0,0 @@
{
"name": "overlays",
"version": "2.0.0"
}

View file

@ -1,7 +0,0 @@
{
"name": "page-b",
"version": "1.0.0",
"dependencies": {
"overlays": "^2.0.0"
}
}

View file

@ -1,49 +0,0 @@
import { LitElement, html, css } from 'lit-element';
import { overlays } from 'overlays/instance.js';
export class PageB extends LitElement {
getInstance(sym, fallback) {
const ev = new CustomEvent('request-instance', {
detail: { key: sym },
bubbles: true,
cancelable: true,
composed: true,
});
this.dispatchEvent(ev);
return ev.detail.instance || fallback();
}
connectedCallback() {
super.connectedCallback();
}
static get styles() {
return css`
:host {
display: block;
padding: 10px;
border: 2px solid #ccc;
}
`;
}
render() {
return html`
<h3>I am page B</h3>
<p>Overlays Status:</p>
<p>Name: ${overlays.name}</p>
<p>Blocked: ${overlays._blockBody}</p>
<button @click=${() => {
overlays.blockBody(); this.requestUpdate();
}}>block</button>
<button @click=${() => {
overlays.unBlockBody(); this.requestUpdate();
}}>un-block</button>
<button @click=${() => {
this.requestUpdate();
}}>refresh</button>
`;
}
}
customElements.define('page-b', PageB);

View file

@ -1,29 +0,0 @@
export class OverlaysManager {
name = 'OverlayManager 1.x';
blockBody = false;
constructor() {
this._setupBlocker();
}
_setupBlocker() {
const blocker = document.createElement('div');
blocker.setAttribute('style', 'border: 2px solid #8d0606; margin: 10px; padding: 10px; width: 140px; text-align: center;');
blocker.innerText = `Blocker for ${this.name}`;
document.body.appendChild(blocker);
this.blocker = blocker;
}
block() {
this.blockBody = true;
this.blocker.style.backgroundColor = '#ff6161';
}
unBlock() {
this.blockBody = false;
this.blocker.style.backgroundColor = 'transparent';
}
}

View file

@ -1,4 +0,0 @@
import { OverlaysManager } from './index.js';
import { singletonManager } from '../../../../index.js';
export const overlays = singletonManager.get('overlays::overlays::1.x') || new OverlaysManager();

View file

@ -1,4 +0,0 @@
{
"name": "overlays",
"version": "1.0.0"
}

View file

@ -1,7 +0,0 @@
{
"name": "page-a",
"version": "1.0.0",
"dependencies": {
"overlays": "^1.0.0"
}
}

View file

@ -1,34 +0,0 @@
import { LitElement, html, css } from 'lit-element';
import { overlays } from 'overlays/instance.js';
export class PageA extends LitElement {
static get styles() {
return css`
:host {
display: block;
padding: 10px;
border: 2px solid #ccc;
}
`;
}
render() {
return html`
<h3>I am page A</h3>
<p>Overlays Status:</p>
<p>Name: ${overlays.name}</p>
<p>Blocked: ${overlays.blockBody}</p>
<button @click=${() => {
overlays.block(); this.requestUpdate();
}}>block</button>
<button @click=${() => {
overlays.unBlock(); this.requestUpdate();
}}>un-block</button>
<button @click=${() => {
this.requestUpdate();
}}>refresh</button>
`;
}
}
customElements.define('page-a', PageA);

View file

@ -1,29 +0,0 @@
export class OverlaysManager {
name = 'OverlayManager 2.x';
blockBody = false;
constructor() {
this._setupBlocker();
}
_setupBlocker() {
const blocker = document.createElement('div');
blocker.setAttribute('style', 'border: 2px solid #8d0606; margin: 10px; padding: 10px; width: 140px; text-align: center;');
blocker.innerText = `Blocker for ${this.name}`;
document.body.appendChild(blocker);
this.blocker = blocker;
}
blockingBody() {
this.blockBody = true;
this.blocker.style.backgroundColor = '#ff6161';
}
unBlockingBody() {
this.blockBody = false;
this.blocker.style.backgroundColor = 'transparent';
}
}

View file

@ -1,4 +0,0 @@
import { OverlaysManager } from './index.js';
import { singletonManager } from '../../../../../../index.js';
export const overlays = singletonManager.get('overlays::overlays::2.x') || new OverlaysManager();

View file

@ -1,4 +0,0 @@
{
"name": "overlays",
"version": "2.0.0"
}

View file

@ -1,7 +0,0 @@
{
"name": "page-b",
"version": "1.0.0",
"dependencies": {
"overlays": "^2.0.0"
}
}

View file

@ -1,34 +0,0 @@
import { LitElement, html, css } from 'lit-element';
import { overlays } from 'overlays/instance.js';
export class PageB extends LitElement {
static get styles() {
return css`
:host {
display: block;
padding: 10px;
border: 2px solid #ccc;
}
`;
}
render() {
return html`
<h3>I am page B</h3>
<p>Overlays Status:</p>
<p>Name: ${overlays.name}</p>
<p>Blocked: ${overlays.blockBody}</p>
<button @click=${() => {
overlays.blockingBody(); this.requestUpdate();
}}>block</button>
<button @click=${() => {
overlays.unBlockingBody(); this.requestUpdate();
}}>un-block</button>
<button @click=${() => {
this.requestUpdate();
}}>refresh</button>
`;
}
}
customElements.define('page-b', PageB);