@node-projects/web-component-designer 0.0.235 → 0.0.237
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/elements/controls/DesignerTabControl.js +1 -2
- package/dist/elements/controls/ImageButtonListSelector.js +1 -2
- package/dist/elements/controls/MetricsEditor.js +1 -2
- package/dist/elements/controls/NumericPopup.js +1 -2
- package/dist/elements/controls/NumericStyleInput.js +1 -2
- package/dist/elements/controls/SimpleSplitView.js +1 -2
- package/dist/elements/controls/ThicknessEditor.js +1 -2
- package/dist/elements/documentContainer.js +12 -6
- package/dist/elements/helper/CssCombiner.js +1 -2
- package/dist/elements/helper/contextMenu/ContextMenu.js +1 -2
- package/dist/elements/item/DesignItem.js +1 -2
- package/dist/elements/services/bindingsService/BaseCustomWebcomponentBindingsService.js +1 -2
- package/dist/elements/services/bindingsService/SpecialTagsBindingService.js +1 -2
- package/dist/elements/services/copyPasteService/CopyPasteAsJsonService.d.ts +9 -0
- package/dist/elements/services/copyPasteService/CopyPasteAsJsonService.js +44 -0
- package/dist/elements/services/htmlWriterService/LitTsElementWriterService.js +1 -2
- package/dist/elements/services/propertiesService/propertyEditors/JsonPropertyEditor.js +1 -2
- package/dist/elements/services/propertiesService/propertyEditors/JsonPropertyPopupEditor.js +1 -2
- package/dist/elements/services/propertiesService/services/CssCurrentPropertiesService.js +2 -0
- package/dist/elements/services/propertiesService/services/CssPropertiesService.js +2 -0
- package/dist/elements/services/stylesheetService/AbstractStylesheetService.js +3 -0
- package/dist/elements/widgets/bindableObjectsBrowser/bindable-objects-browser.js +1 -2
- package/dist/elements/widgets/bindings/BindingsEditor.js +1 -2
- package/dist/elements/widgets/codeView/code-view-ace.js +1 -2
- package/dist/elements/widgets/codeView/code-view-code-mirror.js +1 -2
- package/dist/elements/widgets/codeView/code-view-monaco.js +1 -2
- package/dist/elements/widgets/codeView/code-view-simple.js +1 -2
- package/dist/elements/widgets/demoView/demoView.js +1 -2
- package/dist/elements/widgets/designerView/designerCanvas.d.ts +2 -0
- package/dist/elements/widgets/designerView/designerCanvas.js +13 -5
- package/dist/elements/widgets/designerView/designerView.js +1 -2
- package/dist/elements/widgets/designerView/extensions/EditText/EditTextExtension.js +1 -2
- package/dist/elements/widgets/designerView/extensions/EditText/EditTextWithStyloExtension.js +1 -2
- package/dist/elements/widgets/designerView/overlay/EditTextOverlay.js +1 -2
- package/dist/elements/widgets/designerView/overlayLayerView.js +1 -2
- package/dist/elements/widgets/designerView/tools/toolBar/DesignerToolbar.js +1 -2
- package/dist/elements/widgets/designerView/tools/toolBar/DesignerToolbarButton.js +1 -2
- package/dist/elements/widgets/designerView/tools/toolBar/popups/DrawToolPopup.js +1 -2
- package/dist/elements/widgets/miniatureView/html-2-canvas-miniature-view.js +1 -2
- package/dist/elements/widgets/paletteView/paletteElements.js +37 -23
- package/dist/elements/widgets/paletteView/paletteTreeView.js +1 -2
- package/dist/elements/widgets/paletteView/paletteView.js +1 -2
- package/dist/elements/widgets/propertyGrid/PropertyGrid.js +1 -2
- package/dist/elements/widgets/propertyGrid/PropertyGridWithHeader.js +1 -2
- package/dist/elements/widgets/treeView/treeView.js +1 -2
- package/dist/elements/widgets/treeView/treeViewExtended.js +1 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css, TypedEvent, DomHelper } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class DesignerTabControl extends BaseCustomWebComponentLazyAppend {
|
|
2
|
+
export class DesignerTabControl extends BaseCustomWebComponentLazyAppend {
|
|
3
3
|
_selectedIndex = -1;
|
|
4
4
|
//private _contentObserver: MutationObserver;
|
|
5
5
|
_panels;
|
|
@@ -234,5 +234,4 @@ class DesignerTabControl extends BaseCustomWebComponentLazyAppend {
|
|
|
234
234
|
}
|
|
235
235
|
onSelectedTabChanged = new TypedEvent();
|
|
236
236
|
}
|
|
237
|
-
export { DesignerTabControl };
|
|
238
237
|
customElements.define('node-projects-designer-tab-control', DesignerTabControl);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class ImageButtonListSelector extends BaseCustomWebComponentConstructorAppend {
|
|
2
|
+
export class ImageButtonListSelector extends BaseCustomWebComponentConstructorAppend {
|
|
3
3
|
static style = css `
|
|
4
4
|
div {
|
|
5
5
|
font-size: 10px;
|
|
@@ -78,5 +78,4 @@ class ImageButtonListSelector extends BaseCustomWebComponentConstructorAppend {
|
|
|
78
78
|
this._updateValue();
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
export { ImageButtonListSelector };
|
|
82
81
|
customElements.define('node-projects-image-button-list-selector', ImageButtonListSelector);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, css, html } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class MetricsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
2
|
+
export class MetricsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
3
3
|
static style = css `
|
|
4
4
|
:host {
|
|
5
5
|
justify-content: center;
|
|
@@ -122,5 +122,4 @@ span {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
export { MetricsEditor };
|
|
126
125
|
customElements.define('node-projects-metrics-editor', MetricsEditor);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, css, html } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class NumericPopup extends BaseCustomWebComponentConstructorAppend {
|
|
2
|
+
export class NumericPopup extends BaseCustomWebComponentConstructorAppend {
|
|
3
3
|
static style = css `
|
|
4
4
|
:host {
|
|
5
5
|
}
|
|
@@ -36,5 +36,4 @@ class NumericPopup extends BaseCustomWebComponentConstructorAppend {
|
|
|
36
36
|
ready() {
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
export { NumericPopup };
|
|
40
39
|
customElements.define('node-projects-numeric-popup', NumericPopup);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class NumericStyleInput extends BaseCustomWebComponentConstructorAppend {
|
|
2
|
+
export class NumericStyleInput extends BaseCustomWebComponentConstructorAppend {
|
|
3
3
|
static style = css `
|
|
4
4
|
:host {
|
|
5
5
|
}
|
|
@@ -53,5 +53,4 @@ class NumericStyleInput extends BaseCustomWebComponentConstructorAppend {
|
|
|
53
53
|
_updateValue() {
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
export { NumericStyleInput };
|
|
57
56
|
customElements.define('node-projects-numeric-style-input', NumericStyleInput);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, css, html } from "@node-projects/base-custom-webcomponent";
|
|
2
|
-
class SimpleSplitView extends BaseCustomWebComponentConstructorAppend {
|
|
2
|
+
export class SimpleSplitView extends BaseCustomWebComponentConstructorAppend {
|
|
3
3
|
static style = css `
|
|
4
4
|
:host {
|
|
5
5
|
display: block;
|
|
@@ -64,5 +64,4 @@ class SimpleSplitView extends BaseCustomWebComponentConstructorAppend {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
export { SimpleSplitView };
|
|
68
67
|
customElements.define('node-projects-simple-split-view', SimpleSplitView);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class ThicknessEditor extends BaseCustomWebComponentConstructorAppend {
|
|
2
|
+
export class ThicknessEditor extends BaseCustomWebComponentConstructorAppend {
|
|
3
3
|
static style = css `
|
|
4
4
|
:host {
|
|
5
5
|
margin: 4px;
|
|
@@ -142,5 +142,4 @@ class ThicknessEditor extends BaseCustomWebComponentConstructorAppend {
|
|
|
142
142
|
this._updateValue();
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
export { ThicknessEditor };
|
|
146
145
|
customElements.define('node-projects-thickness-editor', ThicknessEditor);
|
|
@@ -157,12 +157,18 @@ export class DocumentContainer extends BaseCustomWebComponentLazyAppend {
|
|
|
157
157
|
this.demoView.executeCommand(command);
|
|
158
158
|
}
|
|
159
159
|
canExecuteCommand(command) {
|
|
160
|
-
if (this._tabControl.selectedIndex === 0 || this._tabControl.selectedIndex === 2)
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
else if (this._tabControl.selectedIndex ===
|
|
165
|
-
|
|
160
|
+
if (this._tabControl.selectedIndex === 0 || this._tabControl.selectedIndex === 2) {
|
|
161
|
+
if (this.designerView?.canExecuteCommand)
|
|
162
|
+
return this.designerView.canExecuteCommand(command);
|
|
163
|
+
}
|
|
164
|
+
else if (this._tabControl.selectedIndex === 1) {
|
|
165
|
+
if (this.codeView?.canExecuteCommand)
|
|
166
|
+
return this.codeView.canExecuteCommand(command);
|
|
167
|
+
}
|
|
168
|
+
else if (this._tabControl.selectedIndex === 3) {
|
|
169
|
+
if (this.demoView?.canExecuteCommand)
|
|
170
|
+
return this.demoView.canExecuteCommand(command);
|
|
171
|
+
}
|
|
166
172
|
return false;
|
|
167
173
|
}
|
|
168
174
|
set content(value) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class CssCombiner {
|
|
1
|
+
export class CssCombiner {
|
|
2
2
|
static _helperElement = document.createElement('div');
|
|
3
3
|
//todo: inset, flex flow, place content...
|
|
4
4
|
//flex => flex-grow, flex-shrink, flex-basis
|
|
@@ -295,4 +295,3 @@ class CssCombiner {
|
|
|
295
295
|
return true;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
export { CssCombiner };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "@node-projects/base-custom-webcomponent";
|
|
2
|
-
class ContextMenu {
|
|
2
|
+
export class ContextMenu {
|
|
3
3
|
static _contextMenuCss = css `
|
|
4
4
|
.context_menu {
|
|
5
5
|
position: fixed;
|
|
@@ -306,7 +306,6 @@ class ContextMenu {
|
|
|
306
306
|
setTimeout(() => window.removeEventListener("contextmenu", this._windowDown), 10);
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
export { ContextMenu };
|
|
310
309
|
class ContextUtil {
|
|
311
310
|
static getSizes(obj) {
|
|
312
311
|
let lis = obj.getElementsByTagName('li');
|
|
@@ -13,7 +13,7 @@ import { cssFromString } from '@node-projects/base-custom-webcomponent';
|
|
|
13
13
|
const hideAtDesignTimeAttributeName = 'node-projects-hide-at-design-time';
|
|
14
14
|
const hideAtRunTimeAttributeName = 'node-projects-hide-at-run-time';
|
|
15
15
|
const lockAtDesignTimeAttributeName = 'node-projects-lock-at-design-time';
|
|
16
|
-
class DesignItem {
|
|
16
|
+
export class DesignItem {
|
|
17
17
|
lastContainerSize;
|
|
18
18
|
parsedNode;
|
|
19
19
|
node;
|
|
@@ -462,4 +462,3 @@ class DesignItem {
|
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
export { DesignItem };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BindingMode } from '../../item/BindingMode.js';
|
|
2
2
|
import { BindingTarget } from "../../item/BindingTarget.js";
|
|
3
3
|
import { PropertiesHelper } from '../propertiesService/services/PropertiesHelper.js';
|
|
4
|
-
class BaseCustomWebcomponentBindingsService {
|
|
4
|
+
export class BaseCustomWebcomponentBindingsService {
|
|
5
5
|
static type = 'base-custom-webcomponent-binding';
|
|
6
6
|
getBindings(designItem) {
|
|
7
7
|
let bindings = null;
|
|
@@ -71,4 +71,3 @@ class BaseCustomWebcomponentBindingsService {
|
|
|
71
71
|
return true;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
export { BaseCustomWebcomponentBindingsService };
|
|
@@ -2,7 +2,7 @@ import { BindingTarget } from "../../item/BindingTarget.js";
|
|
|
2
2
|
import { BindingMode } from "../../item/BindingMode.js";
|
|
3
3
|
/* Service wich read binings from special HTMl elements -> like tag-binding */
|
|
4
4
|
//TODO: refactor so we could use it
|
|
5
|
-
class SpecialTagsBindingService {
|
|
5
|
+
export class SpecialTagsBindingService {
|
|
6
6
|
static type = 'visu-tagbinding-binding';
|
|
7
7
|
_bindingTagName = "visu-tagbinding";
|
|
8
8
|
_elementIdAttribute = "elemnt-id";
|
|
@@ -42,4 +42,3 @@ class SpecialTagsBindingService {
|
|
|
42
42
|
return true;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
export { SpecialTagsBindingService };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IDesignItem } from "../../item/IDesignItem.js";
|
|
2
|
+
import { ICopyPasteService } from "./ICopyPasteService.js";
|
|
3
|
+
import { ServiceContainer } from '../ServiceContainer.js';
|
|
4
|
+
import { InstanceServiceContainer } from '../InstanceServiceContainer.js';
|
|
5
|
+
import { IRect } from "../../../interfaces/IRect.js";
|
|
6
|
+
export declare class CopyPasteAsJsonService implements ICopyPasteService {
|
|
7
|
+
copyItems(designItems: IDesignItem[]): Promise<void>;
|
|
8
|
+
getPasteItems(serviceContainer: ServiceContainer, instanceServiceContainer: InstanceServiceContainer): Promise<[designItems: IDesignItem[], positions?: IRect[]]>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DomConverter } from "../../widgets/designerView/DomConverter.js";
|
|
2
|
+
import { copyToClipboard, getFromClipboard, getTextFromClipboard } from "../../helper/ClipboardHelper.js";
|
|
3
|
+
export class CopyPasteAsJsonService {
|
|
4
|
+
async copyItems(designItems) {
|
|
5
|
+
const copyText = DomConverter.ConvertToString(designItems, false);
|
|
6
|
+
const positions = designItems.map(x => x.instanceServiceContainer.designerCanvas.getNormalizedElementCoordinates(x.element));
|
|
7
|
+
let data = { html: copyText, positions: positions };
|
|
8
|
+
copyToClipboard([["application/json", JSON.stringify(data)]]);
|
|
9
|
+
}
|
|
10
|
+
async getPasteItems(serviceContainer, instanceServiceContainer) {
|
|
11
|
+
let data = '';
|
|
12
|
+
let html = '';
|
|
13
|
+
let positions = null;
|
|
14
|
+
const items = await getFromClipboard();
|
|
15
|
+
if (items != null) {
|
|
16
|
+
try {
|
|
17
|
+
data = await (await items[0].getType('text/html'))?.text();
|
|
18
|
+
}
|
|
19
|
+
catch { }
|
|
20
|
+
if (!data)
|
|
21
|
+
try {
|
|
22
|
+
data = await (await items[0].getType('text/plain'))?.text();
|
|
23
|
+
}
|
|
24
|
+
catch { }
|
|
25
|
+
try {
|
|
26
|
+
data = await (await items[0].getType('application/json'))?.text();
|
|
27
|
+
}
|
|
28
|
+
catch { }
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
data = await getTextFromClipboard();
|
|
32
|
+
}
|
|
33
|
+
if (data.startsWith('{')) {
|
|
34
|
+
let dataObj = JSON.parse(data);
|
|
35
|
+
html = dataObj.html;
|
|
36
|
+
positions = dataObj.positions;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
html = data;
|
|
40
|
+
}
|
|
41
|
+
const parserService = serviceContainer.htmlParserService;
|
|
42
|
+
return [await parserService.parse(html, serviceContainer, instanceServiceContainer, true), positions];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//needs InternalBindinsgStorrageService -> keeps bindings
|
|
2
|
-
class LitTsElementWriterService {
|
|
2
|
+
export class LitTsElementWriterService {
|
|
3
3
|
write(indentedTextWriter, designItems, rootContainerKeepInline, options) {
|
|
4
4
|
throw new Error('Method not implemented.');
|
|
5
5
|
}
|
|
@@ -41,4 +41,3 @@ declare global {
|
|
|
41
41
|
}
|
|
42
42
|
}`;
|
|
43
43
|
}
|
|
44
|
-
export { LitTsElementWriterService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BasePropertyEditor } from './BasePropertyEditor.js';
|
|
2
2
|
import { html } from '@node-projects/base-custom-webcomponent';
|
|
3
|
-
class JsonPropertyEditor extends BasePropertyEditor {
|
|
3
|
+
export class JsonPropertyEditor extends BasePropertyEditor {
|
|
4
4
|
static template = html `
|
|
5
5
|
<div style="display: flex;">
|
|
6
6
|
<input id="input" type="text">
|
|
@@ -19,4 +19,3 @@ class JsonPropertyEditor extends BasePropertyEditor {
|
|
|
19
19
|
this._input.value = value;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
export { JsonPropertyEditor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html, BaseCustomWebComponentConstructorAppend } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class JsonPropertyPopupEditor extends BaseCustomWebComponentConstructorAppend {
|
|
2
|
+
export class JsonPropertyPopupEditor extends BaseCustomWebComponentConstructorAppend {
|
|
3
3
|
static template = html `
|
|
4
4
|
<div style="display: flex;">
|
|
5
5
|
<input id="input" type="text">
|
|
@@ -11,4 +11,3 @@ class JsonPropertyPopupEditor extends BaseCustomWebComponentConstructorAppend {
|
|
|
11
11
|
//codeview
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
export { JsonPropertyPopupEditor };
|
|
@@ -14,6 +14,8 @@ if (window.importShim) {
|
|
|
14
14
|
else
|
|
15
15
|
//@ts-ignore
|
|
16
16
|
cssProperties = await import("./CssProperties.json", { assert: { type: 'json' } });
|
|
17
|
+
if (cssProperties.default)
|
|
18
|
+
cssProperties = cssProperties.default;
|
|
17
19
|
const localName = '<local>';
|
|
18
20
|
export class CssCurrentPropertiesService extends CommonPropertiesService {
|
|
19
21
|
getRefreshMode(designItem) {
|
|
@@ -14,6 +14,8 @@ if (window.importShim) {
|
|
|
14
14
|
else
|
|
15
15
|
//@ts-ignore
|
|
16
16
|
cssProperties = await import("./CssProperties.json", { assert: { type: 'json' } });
|
|
17
|
+
if (cssProperties.default)
|
|
18
|
+
cssProperties = cssProperties.default;
|
|
17
19
|
export class CssPropertiesService extends CommonPropertiesService {
|
|
18
20
|
getRefreshMode(designItem) {
|
|
19
21
|
return RefreshMode.none;
|
|
@@ -129,6 +129,9 @@ export class AbstractStylesheetService {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
t += '{' + cssText + '}';
|
|
132
|
+
/*if (rule.cssRules) {
|
|
133
|
+
t += rule.cssText.split(rule.conditionText)[0] + rule.conditionText + " { " + this.traverseAndCollectRules(rule) + " }";
|
|
134
|
+
}*/
|
|
132
135
|
}
|
|
133
136
|
}
|
|
134
137
|
return t;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css } from '@node-projects/base-custom-webcomponent';
|
|
2
2
|
import { dragDropFormatNameBindingObject } from '../../../Constants.js';
|
|
3
|
-
class BindableObjectsBrowser extends BaseCustomWebComponentLazyAppend {
|
|
3
|
+
export class BindableObjectsBrowser extends BaseCustomWebComponentLazyAppend {
|
|
4
4
|
_treeDiv;
|
|
5
5
|
_tree;
|
|
6
6
|
static style = css `
|
|
@@ -104,5 +104,4 @@ class BindableObjectsBrowser extends BaseCustomWebComponentLazyAppend {
|
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
export { BindableObjectsBrowser };
|
|
108
107
|
customElements.define('node-projects-bindable-objects-browser', BindableObjectsBrowser);
|
|
@@ -12,7 +12,7 @@ export var valueType;
|
|
|
12
12
|
valueType["number"] = "number";
|
|
13
13
|
valueType["boolean"] = "boolean";
|
|
14
14
|
})(valueType || (valueType = {}));
|
|
15
|
-
class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
15
|
+
export class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
16
16
|
static style = css `
|
|
17
17
|
* { font-size: 16px; }
|
|
18
18
|
.list {
|
|
@@ -50,5 +50,4 @@ class BindingsEditor extends BaseCustomWebComponentConstructorAppend {
|
|
|
50
50
|
super();
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
export { BindingsEditor };
|
|
54
53
|
customElements.define('node-projects-bindings-editor', BindingsEditor);
|
|
@@ -14,7 +14,7 @@ class CodeViewAceCompleter {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
class CodeViewAce extends BaseCustomWebComponentLazyAppend {
|
|
17
|
+
export class CodeViewAce extends BaseCustomWebComponentLazyAppend {
|
|
18
18
|
canvasElement;
|
|
19
19
|
elementsToPackages;
|
|
20
20
|
code;
|
|
@@ -130,5 +130,4 @@ class CodeViewAce extends BaseCustomWebComponentLazyAppend {
|
|
|
130
130
|
this._aceEditor.scrollToLine(point1.row);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
export { CodeViewAce };
|
|
134
133
|
customElements.define('node-projects-code-view-ace', CodeViewAce);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
2
|
import { CommandType } from '../../../commandHandling/CommandType.js';
|
|
3
|
-
class CodeViewCodeMirror extends BaseCustomWebComponentLazyAppend {
|
|
3
|
+
export class CodeViewCodeMirror extends BaseCustomWebComponentLazyAppend {
|
|
4
4
|
canvasElement;
|
|
5
5
|
elementsToPackages;
|
|
6
6
|
code;
|
|
@@ -101,5 +101,4 @@ class CodeViewCodeMirror extends BaseCustomWebComponentLazyAppend {
|
|
|
101
101
|
this._codeMirrorEditor.setSelection(point1, point2);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
export { CodeViewCodeMirror };
|
|
105
104
|
customElements.define('node-projects-code-view-code-mirror', CodeViewCodeMirror);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
2
|
import { CommandType } from '../../../commandHandling/CommandType.js';
|
|
3
|
-
class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
3
|
+
export class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
4
4
|
static _initalized;
|
|
5
5
|
dispose() {
|
|
6
6
|
this._monacoEditor?.dispose();
|
|
@@ -192,5 +192,4 @@ class CodeViewMonaco extends BaseCustomWebComponentLazyAppend {
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
export { CodeViewMonaco };
|
|
196
195
|
customElements.define('node-projects-code-view-monaco', CodeViewMonaco);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, css, html, TypedEvent } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class CodeViewSimple extends BaseCustomWebComponentConstructorAppend {
|
|
2
|
+
export class CodeViewSimple extends BaseCustomWebComponentConstructorAppend {
|
|
3
3
|
dispose() {
|
|
4
4
|
}
|
|
5
5
|
canvasElement;
|
|
@@ -52,5 +52,4 @@ class CodeViewSimple extends BaseCustomWebComponentConstructorAppend {
|
|
|
52
52
|
this._text.setSelectionRange(position.start, position.start + position.length);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
export { CodeViewSimple };
|
|
56
55
|
customElements.define('node-projects-code-view-simple', CodeViewSimple);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class DemoView extends BaseCustomWebComponentLazyAppend {
|
|
2
|
+
export class DemoView extends BaseCustomWebComponentLazyAppend {
|
|
3
3
|
_placeholder;
|
|
4
4
|
_loading;
|
|
5
5
|
static style = css `
|
|
@@ -39,5 +39,4 @@ class DemoView extends BaseCustomWebComponentLazyAppend {
|
|
|
39
39
|
this._loading.hidden = true;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
export { DemoView };
|
|
43
42
|
customElements.define('node-projects-demo-view', DemoView);
|
|
@@ -23,12 +23,14 @@ export declare class DesignerCanvas extends BaseCustomWebComponentLazyAppend imp
|
|
|
23
23
|
clickOverlay: HTMLDivElement;
|
|
24
24
|
private _activeTool;
|
|
25
25
|
gridSize: number;
|
|
26
|
+
pasteOffset: number;
|
|
26
27
|
alignOnGrid: boolean;
|
|
27
28
|
alignOnSnap: boolean;
|
|
28
29
|
snapLines: Snaplines;
|
|
29
30
|
overlayLayer: OverlayLayerView;
|
|
30
31
|
rootDesignItem: IDesignItem;
|
|
31
32
|
eatEvents: Element;
|
|
33
|
+
private _currentPasteOffset;
|
|
32
34
|
private _zoomFactor;
|
|
33
35
|
private _scaleFactor;
|
|
34
36
|
private _canvasOffset;
|
|
@@ -20,7 +20,7 @@ import { NodeType } from '../../item/NodeType.js';
|
|
|
20
20
|
import { StylesheetChangedAction } from '../../services/undoService/transactionItems/StylesheetChangedAction.js';
|
|
21
21
|
import { SetDesignItemsAction } from '../../services/undoService/transactionItems/SetDesignItemsAction.js';
|
|
22
22
|
import { AbstractStylesheetService } from '../../services/stylesheetService/AbstractStylesheetService.js';
|
|
23
|
-
class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
23
|
+
export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
24
24
|
// Public Properties
|
|
25
25
|
serviceContainer;
|
|
26
26
|
instanceServiceContainer;
|
|
@@ -30,12 +30,14 @@ class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
30
30
|
_activeTool;
|
|
31
31
|
// IPlacementView
|
|
32
32
|
gridSize = 10;
|
|
33
|
+
pasteOffset = 10;
|
|
33
34
|
alignOnGrid = false;
|
|
34
35
|
alignOnSnap = true;
|
|
35
36
|
snapLines;
|
|
36
37
|
overlayLayer;
|
|
37
38
|
rootDesignItem;
|
|
38
39
|
eatEvents;
|
|
40
|
+
_currentPasteOffset = this.pasteOffset;
|
|
39
41
|
_zoomFactor = 1; //if scale or zoom css property is used this needs to be the value
|
|
40
42
|
_scaleFactor = 1; //if scale css property is used this need to be the scale value
|
|
41
43
|
_canvasOffset = { x: 0, y: 0 };
|
|
@@ -460,14 +462,17 @@ class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
460
462
|
this.instanceServiceContainer.selectionService.setSelectedElements(Array.from(this.rootDesignItem.children()));
|
|
461
463
|
}
|
|
462
464
|
async handleCopyCommand() {
|
|
465
|
+
this._currentPasteOffset = this.pasteOffset;
|
|
463
466
|
this._lastCopiedPrimaryItem = this.instanceServiceContainer.selectionService.primarySelection;
|
|
464
467
|
await this.serviceContainer.copyPasteService.copyItems(this.instanceServiceContainer.selectionService.selectedElements);
|
|
465
468
|
}
|
|
466
469
|
async handlePasteCommand(disableRestoreOfPositions) {
|
|
467
470
|
const [designItems, positions] = await this.serviceContainer.copyPasteService.getPasteItems(this.serviceContainer, this.instanceServiceContainer);
|
|
468
471
|
let grp = this.rootDesignItem.openGroup("Insert");
|
|
472
|
+
let lastCopiedPrimaryItemBackup = this._lastCopiedPrimaryItem;
|
|
473
|
+
let nextPasteOffset = this._currentPasteOffset + this.pasteOffset;
|
|
469
474
|
let pasteContainer = this.rootDesignItem;
|
|
470
|
-
let pCon =
|
|
475
|
+
let pCon = lastCopiedPrimaryItemBackup?.parent ?? this.instanceServiceContainer.selectionService.primarySelection;
|
|
471
476
|
while (pCon != null) {
|
|
472
477
|
const containerStyle = getComputedStyle(pCon.element);
|
|
473
478
|
let newContainerService;
|
|
@@ -490,8 +495,8 @@ class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
490
495
|
let pos = positions ? positions[i] : null;
|
|
491
496
|
this.instanceServiceContainer.undoService.execute(new InsertAction(pasteContainer, pasteContainer.childCount, di));
|
|
492
497
|
if (!disableRestoreOfPositions && pos && di.nodeType == NodeType.Element) {
|
|
493
|
-
di.setStyle('left', (pos.x - containerPos.x +
|
|
494
|
-
di.setStyle('top', (pos.y - containerPos.y +
|
|
498
|
+
di.setStyle('left', (pos.x - containerPos.x + this._currentPasteOffset) + 'px');
|
|
499
|
+
di.setStyle('top', (pos.y - containerPos.y + this._currentPasteOffset) + 'px');
|
|
495
500
|
}
|
|
496
501
|
}
|
|
497
502
|
const intializationService = this.serviceContainer.intializationService;
|
|
@@ -503,6 +508,8 @@ class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
503
508
|
}
|
|
504
509
|
grp.commit();
|
|
505
510
|
this.snapLines.clearSnaplines();
|
|
511
|
+
this._lastCopiedPrimaryItem = lastCopiedPrimaryItemBackup;
|
|
512
|
+
this._currentPasteOffset = nextPasteOffset;
|
|
506
513
|
}
|
|
507
514
|
handleDeleteCommand() {
|
|
508
515
|
let items = this.instanceServiceContainer.selectionService.selectedElements;
|
|
@@ -520,6 +527,7 @@ class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
520
527
|
this.instanceServiceContainer.register("selectionService", selectionService(this));
|
|
521
528
|
this.instanceServiceContainer.selectionService.onSelectionChanged.on(() => {
|
|
522
529
|
this._lastCopiedPrimaryItem = null;
|
|
530
|
+
this._currentPasteOffset = this.pasteOffset;
|
|
523
531
|
});
|
|
524
532
|
}
|
|
525
533
|
const designItemDocumentPositionService = this.serviceContainer.getLastService('designItemDocumentPositionService');
|
|
@@ -782,6 +790,7 @@ class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
782
790
|
return [newContainerElementDesignItem, newContainerService];
|
|
783
791
|
}
|
|
784
792
|
async _onDrop(event) {
|
|
793
|
+
this.serviceContainer.globalContext.tool = this.serviceContainer.designerTools.get(NamedTools.Pointer);
|
|
785
794
|
this._lastDdElement = null;
|
|
786
795
|
event.preventDefault();
|
|
787
796
|
this._canvas.classList.remove('dragFileActive');
|
|
@@ -1161,5 +1170,4 @@ class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
1161
1170
|
this.canvasOffsetUnzoomed = newCanvasOffset;
|
|
1162
1171
|
}
|
|
1163
1172
|
}
|
|
1164
|
-
export { DesignerCanvas };
|
|
1165
1173
|
customElements.define('node-projects-designer-canvas', DesignerCanvas);
|
|
@@ -4,7 +4,7 @@ import { DomConverter } from './DomConverter.js';
|
|
|
4
4
|
import { DefaultHtmlParserService } from '../../services/htmlParserService/DefaultHtmlParserService.js';
|
|
5
5
|
import { EventNames } from '../../../enums/EventNames.js';
|
|
6
6
|
import { DesignerToolbar } from './tools/toolBar/DesignerToolbar.js';
|
|
7
|
-
class DesignerView extends BaseCustomWebComponentConstructorAppend {
|
|
7
|
+
export class DesignerView extends BaseCustomWebComponentConstructorAppend {
|
|
8
8
|
_sVert;
|
|
9
9
|
_sHor;
|
|
10
10
|
get serviceContainer() {
|
|
@@ -334,5 +334,4 @@ class DesignerView extends BaseCustomWebComponentConstructorAppend {
|
|
|
334
334
|
return designerCanvas;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
export { DesignerView };
|
|
338
337
|
customElements.define('node-projects-designer-view', DesignerView);
|
|
@@ -2,7 +2,7 @@ import { html } from "@node-projects/base-custom-webcomponent";
|
|
|
2
2
|
import { AbstractExtension } from "../AbstractExtension.js";
|
|
3
3
|
import { ExtensionType } from "../ExtensionType.js";
|
|
4
4
|
import { OverlayLayer } from "../OverlayLayer.js";
|
|
5
|
-
class EditTextExtension extends AbstractExtension {
|
|
5
|
+
export class EditTextExtension extends AbstractExtension {
|
|
6
6
|
static template = html `
|
|
7
7
|
<div style="height: 24px; display: flex;">
|
|
8
8
|
<button data-command="bold" style="pointer-events: all; height: 24px; width: 24px; padding: 0; font-weight: 900;">b</button>
|
|
@@ -93,4 +93,3 @@ class EditTextExtension extends AbstractExtension {
|
|
|
93
93
|
this.extendedItem.element.focus();
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
export { EditTextExtension };
|
package/dist/elements/widgets/designerView/extensions/EditText/EditTextWithStyloExtension.js
CHANGED
|
@@ -3,7 +3,7 @@ import { TextTool } from '../../tools/TextTool.js';
|
|
|
3
3
|
import { AbstractExtension } from "../AbstractExtension.js";
|
|
4
4
|
import { ExtensionType } from "../ExtensionType.js";
|
|
5
5
|
import { OverlayLayer } from "../OverlayLayer.js";
|
|
6
|
-
class EditTextWithStyloExtension extends AbstractExtension {
|
|
6
|
+
export class EditTextWithStyloExtension extends AbstractExtension {
|
|
7
7
|
_contentEditedBound;
|
|
8
8
|
_blurBound;
|
|
9
9
|
static template = html `
|
|
@@ -85,4 +85,3 @@ class EditTextWithStyloExtension extends AbstractExtension {
|
|
|
85
85
|
this.extensionManager.removeExtension(this.extendedItem, ExtensionType.Doubleclick);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
export { EditTextWithStyloExtension };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, css, html } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class EditTextOverlay extends BaseCustomWebComponentConstructorAppend {
|
|
2
|
+
export class EditTextOverlay extends BaseCustomWebComponentConstructorAppend {
|
|
3
3
|
static style = css ``;
|
|
4
4
|
static template = html `
|
|
5
5
|
<div>
|
|
@@ -7,4 +7,3 @@ class EditTextOverlay extends BaseCustomWebComponentConstructorAppend {
|
|
|
7
7
|
</div>
|
|
8
8
|
`;
|
|
9
9
|
}
|
|
10
|
-
export { EditTextOverlay };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, html, BaseCustomWebComponentConstructorAppend } from '@node-projects/base-custom-webcomponent';
|
|
2
2
|
import { OverlayLayer } from './extensions/OverlayLayer.js';
|
|
3
|
-
class OverlayLayerView extends BaseCustomWebComponentConstructorAppend {
|
|
3
|
+
export class OverlayLayerView extends BaseCustomWebComponentConstructorAppend {
|
|
4
4
|
static template = html `
|
|
5
5
|
<svg id="svg" style="pointer-events: none;">
|
|
6
6
|
<defs id="defs"></defs>
|
|
@@ -199,5 +199,4 @@ class OverlayLayerView extends BaseCustomWebComponentConstructorAppend {
|
|
|
199
199
|
return existingEls;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
export { OverlayLayerView };
|
|
203
202
|
customElements.define(OverlayLayerView.is, OverlayLayerView);
|
|
@@ -6,7 +6,7 @@ import { CommandType } from "../../../../../commandHandling/CommandType.js";
|
|
|
6
6
|
//import "./popups/DrawToolPopup.js";
|
|
7
7
|
//import "./popups/SelectorToolsPopup.js";
|
|
8
8
|
import { DesignerToolbarButton } from './DesignerToolbarButton.js';
|
|
9
|
-
class DesignerToolbar extends BaseCustomWebComponentConstructorAppend {
|
|
9
|
+
export class DesignerToolbar extends BaseCustomWebComponentConstructorAppend {
|
|
10
10
|
static style = css `
|
|
11
11
|
node-projects-designer-tools-buttons {
|
|
12
12
|
height: 100%;
|
|
@@ -83,5 +83,4 @@ class DesignerToolbar extends BaseCustomWebComponentConstructorAppend {
|
|
|
83
83
|
this._designerView.designerCanvas.executeCommand({ type: CommandType.setStrokeThickness, parameter: input });
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
export { DesignerToolbar };
|
|
87
86
|
customElements.define('node-projects-designer-toolbar', DesignerToolbar);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentConstructorAppend, css, html } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class DesignerToolbarButton extends BaseCustomWebComponentConstructorAppend {
|
|
2
|
+
export class DesignerToolbarButton extends BaseCustomWebComponentConstructorAppend {
|
|
3
3
|
static style = css `
|
|
4
4
|
div {
|
|
5
5
|
width: 24px;
|
|
@@ -59,5 +59,4 @@ class DesignerToolbarButton extends BaseCustomWebComponentConstructorAppend {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
export { DesignerToolbarButton };
|
|
63
62
|
customElements.define('node-projects-designer-toolbar-button', DesignerToolbarButton);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { html, BaseCustomWebComponentConstructorAppend, css } from '@node-projects/base-custom-webcomponent';
|
|
2
2
|
import { assetsPath } from "../../../../../../Constants.js";
|
|
3
|
-
class DrawToolPopup extends BaseCustomWebComponentConstructorAppend {
|
|
3
|
+
export class DrawToolPopup extends BaseCustomWebComponentConstructorAppend {
|
|
4
4
|
static style = css `
|
|
5
5
|
.container {
|
|
6
6
|
width: 220px;
|
|
@@ -99,5 +99,4 @@ class DrawToolPopup extends BaseCustomWebComponentConstructorAppend {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
export { DrawToolPopup };
|
|
103
102
|
customElements.define('node-projects-designer-drawtool-popup', DrawToolPopup);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css, html, DomHelper } from '@node-projects/base-custom-webcomponent';
|
|
2
|
-
class Html2CanvasMiniatureView extends BaseCustomWebComponentLazyAppend {
|
|
2
|
+
export class Html2CanvasMiniatureView extends BaseCustomWebComponentLazyAppend {
|
|
3
3
|
static style = css ``;
|
|
4
4
|
static template = html `
|
|
5
5
|
<div class="imgdiv">
|
|
@@ -18,5 +18,4 @@ class Html2CanvasMiniatureView extends BaseCustomWebComponentLazyAppend {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
export { Html2CanvasMiniatureView };
|
|
22
21
|
customElements.define('node-projects-html-2-canvas-miniature-view', Html2CanvasMiniatureView);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { dragDropFormatNameElementDefinition } from '../../../Constants.js';
|
|
2
2
|
import { BaseCustomWebComponentLazyAppend, css, html } from '@node-projects/base-custom-webcomponent';
|
|
3
3
|
import { DrawElementTool } from '../designerView/tools/DrawElementTool.js';
|
|
4
|
-
class PaletteElements extends BaseCustomWebComponentLazyAppend {
|
|
4
|
+
export class PaletteElements extends BaseCustomWebComponentLazyAppend {
|
|
5
5
|
static style = css `
|
|
6
6
|
:host {
|
|
7
7
|
display: block;
|
|
@@ -79,27 +79,42 @@ class PaletteElements extends BaseCustomWebComponentLazyAppend {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
else if (!elementDefintion.import) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
82
|
+
try {
|
|
83
|
+
let elem = document.createElement(elementDefintion.tag);
|
|
84
|
+
if (elementDefintion.defaultContent)
|
|
85
|
+
elem.innerHTML = elementDefintion.defaultContent;
|
|
86
|
+
if (elementDefintion.defaultWidth)
|
|
87
|
+
elem.style.width = elementDefintion.defaultWidth;
|
|
88
|
+
if (elementDefintion.defaultHeight)
|
|
89
|
+
elem.style.height = elementDefintion.defaultHeight;
|
|
90
|
+
if (elementDefintion.defaultAttributes) {
|
|
91
|
+
for (let a in elementDefintion.defaultAttributes) {
|
|
92
|
+
elem.setAttribute(a, elementDefintion.defaultAttributes[a]);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (elementDefintion.defaultStyles) {
|
|
96
|
+
for (let s in elementDefintion.defaultStyles) {
|
|
97
|
+
elem.style[s] = elementDefintion.defaultStyles[s];
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
elem.style.position = "absolute";
|
|
101
|
+
if (elementDefintion.defaultWidth)
|
|
102
|
+
elem.style.top = "-" + (parseInt(elementDefintion.defaultHeight) + 500) + 'px';
|
|
103
|
+
else
|
|
104
|
+
elem.style.top = "-500px";
|
|
105
|
+
if (elementDefintion.defaultWidth)
|
|
106
|
+
elem.style.left = "-" + (parseInt(elementDefintion.defaultWidth) + 500) + 'px';
|
|
107
|
+
else
|
|
108
|
+
elem.style.left = "-500px";
|
|
109
|
+
document.body.appendChild(elem);
|
|
110
|
+
let rect = elem.getBoundingClientRect();
|
|
111
|
+
if (rect.width > 0 && rect.height > 0)
|
|
112
|
+
e.dataTransfer.setDragImage(elem, 0, 0);
|
|
113
|
+
requestAnimationFrame(() => document.body.removeChild(elem));
|
|
114
|
+
}
|
|
115
|
+
catch (err) {
|
|
116
|
+
console.warn("error creating gost elment", err);
|
|
117
|
+
}
|
|
103
118
|
}
|
|
104
119
|
};
|
|
105
120
|
button.ondragend = (e) => {
|
|
@@ -121,5 +136,4 @@ class PaletteElements extends BaseCustomWebComponentLazyAppend {
|
|
|
121
136
|
}
|
|
122
137
|
}
|
|
123
138
|
}
|
|
124
|
-
export { PaletteElements };
|
|
125
139
|
customElements.define('node-projects-palette-elements', PaletteElements);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, html, BaseCustomWebComponentConstructorAppend } from '@node-projects/base-custom-webcomponent';
|
|
2
2
|
import { dragDropFormatNameElementDefinition } from '../../../Constants.js';
|
|
3
|
-
class PaletteTreeView extends BaseCustomWebComponentConstructorAppend {
|
|
3
|
+
export class PaletteTreeView extends BaseCustomWebComponentConstructorAppend {
|
|
4
4
|
_treeDiv;
|
|
5
5
|
_tree;
|
|
6
6
|
_filter;
|
|
@@ -134,5 +134,4 @@ class PaletteTreeView extends BaseCustomWebComponentConstructorAppend {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
export { PaletteTreeView };
|
|
138
137
|
customElements.define('node-projects-palette-tree-view', PaletteTreeView);
|
|
@@ -2,7 +2,7 @@ import '../../controls/DesignerTabControl.js';
|
|
|
2
2
|
import { PaletteElements } from './paletteElements.js';
|
|
3
3
|
import { DesignerTabControl } from '../../controls/DesignerTabControl.js';
|
|
4
4
|
import { BaseCustomWebComponentLazyAppend, css } from '@node-projects/base-custom-webcomponent';
|
|
5
|
-
class PaletteView extends BaseCustomWebComponentLazyAppend {
|
|
5
|
+
export class PaletteView extends BaseCustomWebComponentLazyAppend {
|
|
6
6
|
selected = 'native';
|
|
7
7
|
_designerTabControl;
|
|
8
8
|
static style = css `
|
|
@@ -35,5 +35,4 @@ class PaletteView extends BaseCustomWebComponentLazyAppend {
|
|
|
35
35
|
this._designerTabControl.refreshItems();
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
export { PaletteView };
|
|
39
38
|
customElements.define('node-projects-palette-view', PaletteView);
|
|
@@ -2,7 +2,7 @@ import { PropertyGridPropertyList } from './PropertyGridPropertyList.js';
|
|
|
2
2
|
import { DesignerTabControl } from '../../controls/DesignerTabControl.js';
|
|
3
3
|
import { BaseCustomWebComponentLazyAppend, css } from '@node-projects/base-custom-webcomponent';
|
|
4
4
|
import { RefreshMode } from '../../services/propertiesService/IPropertiesService.js';
|
|
5
|
-
class PropertyGrid extends BaseCustomWebComponentLazyAppend {
|
|
5
|
+
export class PropertyGrid extends BaseCustomWebComponentLazyAppend {
|
|
6
6
|
_serviceContainer;
|
|
7
7
|
_designerTabControl;
|
|
8
8
|
_selectedItems;
|
|
@@ -109,5 +109,4 @@ class PropertyGrid extends BaseCustomWebComponentLazyAppend {
|
|
|
109
109
|
this._itemsObserver.observe(this._selectedItems[0].element, { attributes: true, childList: false, characterData: false });
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
export { PropertyGrid };
|
|
113
112
|
customElements.define('node-projects-property-grid', PropertyGrid);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css, html } from '@node-projects/base-custom-webcomponent';
|
|
2
2
|
import { sleep } from '../../helper/Helper.js';
|
|
3
3
|
import { NodeType } from '../../item/NodeType.js';
|
|
4
|
-
class PropertyGridWithHeader extends BaseCustomWebComponentLazyAppend {
|
|
4
|
+
export class PropertyGridWithHeader extends BaseCustomWebComponentLazyAppend {
|
|
5
5
|
static style = css `
|
|
6
6
|
:host {
|
|
7
7
|
display: block;
|
|
@@ -114,5 +114,4 @@ class PropertyGridWithHeader extends BaseCustomWebComponentLazyAppend {
|
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
export { PropertyGridWithHeader };
|
|
118
117
|
customElements.define('node-projects-property-grid-with-header', PropertyGridWithHeader);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseCustomWebComponentLazyAppend, css } from '@node-projects/base-custom-webcomponent';
|
|
2
2
|
import { DesignItem } from '../../item/DesignItem.js';
|
|
3
|
-
class TreeView extends BaseCustomWebComponentLazyAppend {
|
|
3
|
+
export class TreeView extends BaseCustomWebComponentLazyAppend {
|
|
4
4
|
_items;
|
|
5
5
|
_index;
|
|
6
6
|
_previouslySelected;
|
|
@@ -239,5 +239,4 @@ class TreeView extends BaseCustomWebComponentLazyAppend {
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
export { TreeView };
|
|
243
242
|
customElements.define('node-projects-tree-view', TreeView);
|
|
@@ -4,7 +4,7 @@ import { assetsPath } from '../../../Constants.js';
|
|
|
4
4
|
import { ContextMenu } from '../../helper/contextMenu/ContextMenu.js';
|
|
5
5
|
import { switchContainer } from '../../helper/SwitchContainerHelper.js';
|
|
6
6
|
import { DomConverter } from '../designerView/DomConverter.js';
|
|
7
|
-
class TreeViewExtended extends BaseCustomWebComponentConstructorAppend {
|
|
7
|
+
export class TreeViewExtended extends BaseCustomWebComponentConstructorAppend {
|
|
8
8
|
_treeDiv;
|
|
9
9
|
_tree;
|
|
10
10
|
_filter;
|
|
@@ -363,5 +363,4 @@ class TreeViewExtended extends BaseCustomWebComponentConstructorAppend {
|
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
export { TreeViewExtended };
|
|
367
366
|
customElements.define('node-projects-tree-view-extended', TreeViewExtended);
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export * from "./elements/services/contentService/ContentService.js";
|
|
|
38
38
|
export type { IContentChanged } from "./elements/services/contentService/IContentChanged.js";
|
|
39
39
|
export type { IContentService } from "./elements/services/contentService/IContentService.js";
|
|
40
40
|
export * from "./elements/services/copyPasteService/CopyPasteService.js";
|
|
41
|
+
export * from "./elements/services/copyPasteService/CopyPasteAsJsonService.js";
|
|
41
42
|
export type { ICopyPasteService } from "./elements/services/copyPasteService/ICopyPasteService.js";
|
|
42
43
|
export * from "./elements/services/demoProviderService/DemoProviderService.js";
|
|
43
44
|
export type { IDemoProviderService } from "./elements/services/demoProviderService/IDemoProviderService.js";
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export * from "./elements/services/placementService/SnaplinesProviderService.js"
|
|
|
26
26
|
export * from "./elements/services/elementAtPointService/ElementAtPointService.js";
|
|
27
27
|
export * from "./elements/services/contentService/ContentService.js";
|
|
28
28
|
export * from "./elements/services/copyPasteService/CopyPasteService.js";
|
|
29
|
+
export * from "./elements/services/copyPasteService/CopyPasteAsJsonService.js";
|
|
29
30
|
export * from "./elements/services/demoProviderService/DemoProviderService.js";
|
|
30
31
|
export * from "./elements/services/designItemDocumentPositionService/DesignItemDocumentPositionService.js";
|
|
31
32
|
export * from "./elements/services/dragDropService/DragDropService.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"description": "A UI designer for Polymer apps",
|
|
3
3
|
"name": "@node-projects/web-component-designer",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.237",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"@node-projects/lean-he-esm": "^3.3.0",
|
|
22
22
|
"@node-projects/node-html-parser-esm": "^6.1.5",
|
|
23
23
|
"@papyrs/stylo": "^0.0.45",
|
|
24
|
-
"@types/codemirror": "^5.60.
|
|
24
|
+
"@types/codemirror": "^5.60.8",
|
|
25
25
|
"@types/css-tree": "^2.3.1",
|
|
26
26
|
"@types/jquery": "^3.5.16",
|
|
27
27
|
"@types/jquery.fancytree": "0.0.7",
|
|
28
|
-
"@types/node": "^20.
|
|
29
|
-
"ace-builds": "^1.
|
|
28
|
+
"@types/node": "^20.3.1",
|
|
29
|
+
"ace-builds": "^1.22.1",
|
|
30
30
|
"codemirror": "^6.0.1",
|
|
31
31
|
"css-tree": "^2.3.1",
|
|
32
32
|
"esprima-next": "^5.8.4",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"jquery": "^3.7.0",
|
|
36
36
|
"jquery.fancytree": "^2.38.3",
|
|
37
37
|
"mdn-data": "^2.0.32",
|
|
38
|
-
"monaco-editor": "^0.
|
|
38
|
+
"monaco-editor": "^0.39.0",
|
|
39
39
|
"ts-jest": "^29.1.0",
|
|
40
|
-
"typescript": "^5.
|
|
40
|
+
"typescript": "^5.1.3",
|
|
41
41
|
"typescript-lit-html-plugin": "^0.9.0"
|
|
42
42
|
},
|
|
43
43
|
"repository": {
|