@node-projects/web-component-designer 0.0.214 → 0.0.216
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/documentContainer.js +17 -14
- package/dist/elements/item/DesignItem.js +1 -1
- package/dist/elements/services/DefaultServiceBootstrap.js +2 -0
- package/dist/elements/services/InstanceServiceContainer.d.ts +3 -0
- package/dist/elements/services/InstanceServiceContainer.js +3 -0
- package/dist/elements/services/ServiceContainer.d.ts +2 -0
- package/dist/elements/services/copyPasteService/CopyPasteService.js +1 -1
- package/dist/elements/services/designItemDocumentPositionService/DesignItemDocumentPositionService.d.ts +11 -0
- package/dist/elements/services/designItemDocumentPositionService/DesignItemDocumentPositionService.js +13 -0
- package/dist/elements/services/designItemDocumentPositionService/IDesignItemDocumentPositionService.d.ts +7 -0
- package/dist/elements/services/designItemDocumentPositionService/IDesignItemDocumentPositionService.js +1 -0
- package/dist/elements/services/htmlParserService/NodeHtmlParserService.js +6 -0
- package/dist/elements/services/htmlWriterService/HtmlWriterService.d.ts +1 -2
- package/dist/elements/services/htmlWriterService/HtmlWriterService.js +6 -6
- package/dist/elements/services/htmlWriterService/IHtmlWriterService.d.ts +1 -2
- package/dist/elements/widgets/designerView/DomConverter.d.ts +1 -2
- package/dist/elements/widgets/designerView/DomConverter.js +2 -2
- package/dist/elements/widgets/designerView/designerCanvas.js +4 -0
- package/dist/elements/widgets/designerView/designerView.d.ts +1 -2
- package/dist/elements/widgets/designerView/designerView.js +2 -2
- package/dist/elements/widgets/designerView/extensions/grid/EditGridColumnRowSizesExtension.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +3 -3
|
@@ -115,11 +115,12 @@ export class DocumentContainer extends BaseCustomWebComponentLazyAppend {
|
|
|
115
115
|
if (this._tabControl.selectedIndex === 2) {
|
|
116
116
|
let primarySelection = this.instanceServiceContainer.selectionService.primarySelection;
|
|
117
117
|
if (primarySelection) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
this._content = this.designerView.getHTML();
|
|
119
|
+
if (this.designerView.instanceServiceContainer.designItemDocumentPositionService) {
|
|
120
|
+
this._selectionPosition = this.designerView.instanceServiceContainer.designItemDocumentPositionService.getPosition(primarySelection);
|
|
121
|
+
this.codeView.setSelection(this._selectionPosition);
|
|
122
|
+
this._selectionPosition = null;
|
|
123
|
+
}
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
}
|
|
@@ -129,14 +130,15 @@ export class DocumentContainer extends BaseCustomWebComponentLazyAppend {
|
|
|
129
130
|
this._disableChangeNotificationDesigner = true;
|
|
130
131
|
if (this._tabControl.selectedIndex === 2) {
|
|
131
132
|
let primarySelection = this.instanceServiceContainer.selectionService.primarySelection;
|
|
132
|
-
|
|
133
|
-
this._content = this.designerView.getHTML(designItemsAssignmentList);
|
|
133
|
+
this._content = this.designerView.getHTML();
|
|
134
134
|
this.codeView.update(this._content);
|
|
135
135
|
if (primarySelection) {
|
|
136
|
-
this.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
if (this.designerView.instanceServiceContainer.designItemDocumentPositionService) {
|
|
137
|
+
this._selectionPosition = this.designerView.instanceServiceContainer.designItemDocumentPositionService.getPosition(primarySelection);
|
|
138
|
+
if (this._selectionPosition)
|
|
139
|
+
this.codeView.setSelection(this._selectionPosition);
|
|
140
|
+
this._selectionPosition = null;
|
|
141
|
+
}
|
|
140
142
|
}
|
|
141
143
|
}
|
|
142
144
|
this._disableChangeNotificationDesigner = false;
|
|
@@ -190,9 +192,10 @@ export class DocumentContainer extends BaseCustomWebComponentLazyAppend {
|
|
|
190
192
|
this._tabControl.onSelectedTabChanged.on(i => {
|
|
191
193
|
if (i.oldIndex === 0) {
|
|
192
194
|
let primarySelection = this.instanceServiceContainer.selectionService.primarySelection;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
195
|
+
this._content = this.designerView.getHTML();
|
|
196
|
+
if (this.designerView.instanceServiceContainer.designItemDocumentPositionService) {
|
|
197
|
+
this._selectionPosition = this.designerView.instanceServiceContainer.designItemDocumentPositionService.getPosition(primarySelection);
|
|
198
|
+
}
|
|
196
199
|
}
|
|
197
200
|
else if (i.oldIndex === 1) {
|
|
198
201
|
this._content = this.codeView.getText();
|
|
@@ -23,7 +23,7 @@ export class DesignItem {
|
|
|
23
23
|
shouldAppliedDesignerExtensions = new Map();
|
|
24
24
|
async clone() {
|
|
25
25
|
try {
|
|
26
|
-
const html = DomConverter.ConvertToString([this],
|
|
26
|
+
const html = DomConverter.ConvertToString([this], false);
|
|
27
27
|
const parsed = await this.serviceContainer.htmlParserService.parse(html, this.serviceContainer, this.instanceServiceContainer);
|
|
28
28
|
return parsed[0];
|
|
29
29
|
}
|
|
@@ -79,6 +79,7 @@ import { JumpToElementContextMenu } from '../widgets/designerView/extensions/con
|
|
|
79
79
|
import { EditGridColumnRowSizesExtensionProvider } from '../widgets/designerView/extensions/grid/EditGridColumnRowSizesExtensionProvider.js';
|
|
80
80
|
import { DisplayGridExtensionProvider } from '../widgets/designerView/extensions/grid/DisplayGridExtensionProvider.js';
|
|
81
81
|
import { ApplyFirstMachingExtensionProvider } from '../widgets/designerView/extensions/logic/ApplyFirstMachingExtensionProvider.js';
|
|
82
|
+
import { DesignItemDocumentPositionService } from './designItemDocumentPositionService/DesignItemDocumentPositionService.js';
|
|
82
83
|
export function createDefaultServiceContainer() {
|
|
83
84
|
let serviceContainer = new ServiceContainer();
|
|
84
85
|
serviceContainer.register("propertyService", new PolymerPropertiesService());
|
|
@@ -104,6 +105,7 @@ export function createDefaultServiceContainer() {
|
|
|
104
105
|
serviceContainer.register("undoService", (designerCanvas) => new UndoService(designerCanvas));
|
|
105
106
|
serviceContainer.register("selectionService", (designerCanvas) => new SelectionService(designerCanvas, false));
|
|
106
107
|
serviceContainer.register("contentService", (designerCanvas) => new ContentService(designerCanvas.rootDesignItem));
|
|
108
|
+
serviceContainer.register("designItemDocumentPositionService", (designerCanvas) => new DesignItemDocumentPositionService(designerCanvas));
|
|
107
109
|
//serviceContainer.register("stylesheetService", new DemoProviderService());
|
|
108
110
|
serviceContainer.designerExtensions.set(ExtensionType.Permanent, [
|
|
109
111
|
// new ResizeExtensionProvider(false),
|
|
@@ -5,11 +5,13 @@ import { IContentService } from './contentService/IContentService.js';
|
|
|
5
5
|
import { IDesignContext } from '../widgets/designerView/IDesignContext.js';
|
|
6
6
|
import { IDesignerCanvas } from '../widgets/designerView/IDesignerCanvas.js';
|
|
7
7
|
import { IStylesheetService } from './stylesheetService/IStylesheetService.js';
|
|
8
|
+
import { IDesignItemDocumentPositionService } from './designItemDocumentPositionService/IDesignItemDocumentPositionService.js';
|
|
8
9
|
interface InstanceServiceNameMap {
|
|
9
10
|
"undoService": IUndoService;
|
|
10
11
|
"selectionService": ISelectionService;
|
|
11
12
|
"contentService": IContentService;
|
|
12
13
|
"stylesheetService": IStylesheetService;
|
|
14
|
+
"designItemDocumentPositionService": IDesignItemDocumentPositionService;
|
|
13
15
|
}
|
|
14
16
|
export declare class InstanceServiceContainer extends BaseServiceContainer<InstanceServiceNameMap> {
|
|
15
17
|
designContext: IDesignContext;
|
|
@@ -20,5 +22,6 @@ export declare class InstanceServiceContainer extends BaseServiceContainer<Insta
|
|
|
20
22
|
get selectionService(): ISelectionService;
|
|
21
23
|
get contentService(): IContentService;
|
|
22
24
|
get stylesheetService(): IStylesheetService;
|
|
25
|
+
get designItemDocumentPositionService(): IDesignItemDocumentPositionService;
|
|
23
26
|
}
|
|
24
27
|
export {};
|
|
@@ -20,4 +20,7 @@ export class InstanceServiceContainer extends BaseServiceContainer {
|
|
|
20
20
|
get stylesheetService() {
|
|
21
21
|
return this.getLastService('stylesheetService');
|
|
22
22
|
}
|
|
23
|
+
get designItemDocumentPositionService() {
|
|
24
|
+
return this.getLastService('designItemDocumentPositionService');
|
|
25
|
+
}
|
|
23
26
|
}
|
|
@@ -38,6 +38,7 @@ import { ISelectionService } from './selectionService/ISelectionService.js';
|
|
|
38
38
|
import { IContentService } from './contentService/IContentService.js';
|
|
39
39
|
import { IStylesheetService } from './stylesheetService/IStylesheetService.js';
|
|
40
40
|
import { IDesignerCanvas } from '../widgets/designerView/IDesignerCanvas.js';
|
|
41
|
+
import { IDesignItemDocumentPositionService } from './designItemDocumentPositionService/IDesignItemDocumentPositionService.js';
|
|
41
42
|
interface ServiceNameMap {
|
|
42
43
|
"propertyService": IPropertiesService;
|
|
43
44
|
"containerService": IPlacementService;
|
|
@@ -62,6 +63,7 @@ interface ServiceNameMap {
|
|
|
62
63
|
"selectionService": (designerCanvas: IDesignerCanvas) => ISelectionService;
|
|
63
64
|
"contentService": (designerCanvas: IDesignerCanvas) => IContentService;
|
|
64
65
|
"stylesheetService": (designerCanvas: IDesignerCanvas) => IStylesheetService;
|
|
66
|
+
"designItemDocumentPositionService": (designerCanvas: IDesignerCanvas) => IDesignItemDocumentPositionService;
|
|
65
67
|
}
|
|
66
68
|
export declare class ServiceContainer extends BaseServiceContainer<ServiceNameMap> {
|
|
67
69
|
readonly config: {
|
|
@@ -3,7 +3,7 @@ import { copyToClipboard, getFromClipboard, getTextFromClipboard } from "../../h
|
|
|
3
3
|
export const positionsJsonMime = 'web text/positions';
|
|
4
4
|
export class CopyPasteService {
|
|
5
5
|
async copyItems(designItems) {
|
|
6
|
-
const copyText = DomConverter.ConvertToString(designItems,
|
|
6
|
+
const copyText = DomConverter.ConvertToString(designItems, false);
|
|
7
7
|
const positions = designItems.map(x => x.instanceServiceContainer.designerCanvas.getNormalizedElementCoordinates(x.element));
|
|
8
8
|
copyToClipboard([["text/html", copyText], [positionsJsonMime, JSON.stringify(positions)]]);
|
|
9
9
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IDesignItem } from "../../item/IDesignItem.js";
|
|
2
|
+
import { IDesignerCanvas } from "../../widgets/designerView/IDesignerCanvas.js";
|
|
3
|
+
import { IStringPosition } from "../htmlWriterService/IStringPosition.js";
|
|
4
|
+
import { IDesignItemDocumentPositionService } from "./IDesignItemDocumentPositionService.js";
|
|
5
|
+
export declare class DesignItemDocumentPositionService implements IDesignItemDocumentPositionService {
|
|
6
|
+
private _designItemsAssignmentList?;
|
|
7
|
+
constructor(designerCanvas: IDesignerCanvas);
|
|
8
|
+
setPosition(designItem: IDesignItem, position: IStringPosition): void;
|
|
9
|
+
clearPositions(): void;
|
|
10
|
+
getPosition(designItem: IDesignItem): IStringPosition;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class DesignItemDocumentPositionService {
|
|
2
|
+
_designItemsAssignmentList = new Map();
|
|
3
|
+
constructor(designerCanvas) { }
|
|
4
|
+
setPosition(designItem, position) {
|
|
5
|
+
this._designItemsAssignmentList.set(designItem, position);
|
|
6
|
+
}
|
|
7
|
+
clearPositions() {
|
|
8
|
+
this._designItemsAssignmentList.clear();
|
|
9
|
+
}
|
|
10
|
+
getPosition(designItem) {
|
|
11
|
+
return this._designItemsAssignmentList.get(designItem);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IDesignItem } from "../../item/IDesignItem.js";
|
|
2
|
+
import { IStringPosition } from "../htmlWriterService/IStringPosition.js";
|
|
3
|
+
export interface IDesignItemDocumentPositionService {
|
|
4
|
+
setPosition(designItem: IDesignItem, position: IStringPosition): any;
|
|
5
|
+
clearPositions(): any;
|
|
6
|
+
getPosition(designItem: IDesignItem): IStringPosition;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -38,6 +38,8 @@ export class NodeHtmlParserService {
|
|
|
38
38
|
manualCreatedElement = true;
|
|
39
39
|
}
|
|
40
40
|
designItem = new DesignItem(element, item, serviceContainer, instanceServiceContainer);
|
|
41
|
+
if (instanceServiceContainer.designItemDocumentPositionService)
|
|
42
|
+
instanceServiceContainer.designItemDocumentPositionService.setPosition(designItem, { start: item.range[0], length: item.range[1] - item.range[0] });
|
|
41
43
|
let style = '';
|
|
42
44
|
let attr = item.attributes;
|
|
43
45
|
for (let a in attr) {
|
|
@@ -71,10 +73,14 @@ export class NodeHtmlParserService {
|
|
|
71
73
|
this._parseDiv.innerHTML = item.rawText;
|
|
72
74
|
let element = this._parseDiv.childNodes[0];
|
|
73
75
|
designItem = new DesignItem(element, item, serviceContainer, instanceServiceContainer);
|
|
76
|
+
if (instanceServiceContainer.designItemDocumentPositionService)
|
|
77
|
+
instanceServiceContainer.designItemDocumentPositionService.setPosition(designItem, { start: item.range[0], length: item.range[1] - item.range[0] });
|
|
74
78
|
}
|
|
75
79
|
else if (item.nodeType == 8) {
|
|
76
80
|
let element = document.createComment(item.rawText);
|
|
77
81
|
designItem = new DesignItem(element, item, serviceContainer, instanceServiceContainer);
|
|
82
|
+
if (instanceServiceContainer.designItemDocumentPositionService)
|
|
83
|
+
instanceServiceContainer.designItemDocumentPositionService.setPosition(designItem, { start: item.range[0], length: item.range[1] - item.range[0] });
|
|
78
84
|
}
|
|
79
85
|
return designItem;
|
|
80
86
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { IDesignItem } from '../../item/IDesignItem.js';
|
|
2
2
|
import { IHtmlWriterOptions } from './IHtmlWriterOptions.js';
|
|
3
3
|
import { IndentedTextWriter } from '../../helper/IndentedTextWriter.js';
|
|
4
|
-
import { IStringPosition } from './IStringPosition.js';
|
|
5
4
|
import { AbstractHtmlWriterService } from './AbstractHtmlWriterService.js';
|
|
6
5
|
export declare class HtmlWriterService extends AbstractHtmlWriterService {
|
|
7
6
|
private _conditionalyWriteIndent;
|
|
8
7
|
private _conditionalyWriteIndentBefore;
|
|
9
8
|
private _conditionalyWriteNewline;
|
|
10
|
-
write(indentedTextWriter: IndentedTextWriter, designItems: IDesignItem[], rootContainerKeepInline: boolean, options: IHtmlWriterOptions
|
|
9
|
+
write(indentedTextWriter: IndentedTextWriter, designItems: IDesignItem[], rootContainerKeepInline: boolean, options: IHtmlWriterOptions): void;
|
|
11
10
|
private internalWrite;
|
|
12
11
|
private writeTextNode;
|
|
13
12
|
}
|
|
@@ -22,12 +22,12 @@ export class HtmlWriterService extends AbstractHtmlWriterService {
|
|
|
22
22
|
(designItem.element instanceof SVGElement))
|
|
23
23
|
indentedTextWriter.writeNewline();
|
|
24
24
|
}
|
|
25
|
-
write(indentedTextWriter, designItems, rootContainerKeepInline, options
|
|
25
|
+
write(indentedTextWriter, designItems, rootContainerKeepInline, options) {
|
|
26
26
|
for (const d of designItems) {
|
|
27
|
-
this.internalWrite(indentedTextWriter, d, options
|
|
27
|
+
this.internalWrite(indentedTextWriter, d, options);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
internalWrite(indentedTextWriter, designItem, options
|
|
30
|
+
internalWrite(indentedTextWriter, designItem, options) {
|
|
31
31
|
let start = indentedTextWriter.position;
|
|
32
32
|
let end = indentedTextWriter.position;
|
|
33
33
|
if (designItem.nodeType == NodeType.TextNode) {
|
|
@@ -66,7 +66,7 @@ export class HtmlWriterService extends AbstractHtmlWriterService {
|
|
|
66
66
|
indentedTextWriter.levelRaise();
|
|
67
67
|
}
|
|
68
68
|
for (const c of children) {
|
|
69
|
-
this.internalWrite(indentedTextWriter, c, options
|
|
69
|
+
this.internalWrite(indentedTextWriter, c, options);
|
|
70
70
|
let childSingleTextNode = c.childCount === 1 && c.firstChild.nodeType === NodeType.TextNode;
|
|
71
71
|
if (childSingleTextNode)
|
|
72
72
|
if (!indentedTextWriter.isLastCharNewline())
|
|
@@ -92,8 +92,8 @@ export class HtmlWriterService extends AbstractHtmlWriterService {
|
|
|
92
92
|
if (!indentedTextWriter.isLastCharNewline() && (!designItem.parent || !isInlineAfter(designItem.parent.element)))
|
|
93
93
|
this._conditionalyWriteNewline(indentedTextWriter, designItem);
|
|
94
94
|
}
|
|
95
|
-
if (
|
|
96
|
-
|
|
95
|
+
if (designItem.instanceServiceContainer.designItemDocumentPositionService) {
|
|
96
|
+
designItem.instanceServiceContainer.designItemDocumentPositionService.setPosition(designItem, { start: start, length: end - start });
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
writeTextNode(indentedTextWriter, designItem, indentAndNewline) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IDesignItem } from '../../item/IDesignItem.js';
|
|
2
2
|
import { IHtmlWriterOptions } from './IHtmlWriterOptions.js';
|
|
3
3
|
import { ITextWriter } from '../../helper/ITextWriter.js';
|
|
4
|
-
import { IStringPosition } from './IStringPosition.js';
|
|
5
4
|
export interface IHtmlWriterService {
|
|
6
|
-
write(textWriter: ITextWriter, designItems: IDesignItem[], rootContainerKeepInline: boolean, options: IHtmlWriterOptions
|
|
5
|
+
write(textWriter: ITextWriter, designItems: IDesignItem[], rootContainerKeepInline: boolean, options: IHtmlWriterOptions): any;
|
|
7
6
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { IDesignItem } from "../../item/IDesignItem.js";
|
|
2
|
-
import { IStringPosition } from "../../services/htmlWriterService/IStringPosition.js";
|
|
3
2
|
export declare class DomConverter {
|
|
4
3
|
static normalizeAttributeValue(value: string | number, useSingleQuotes?: boolean): string;
|
|
5
4
|
static normalizeContentValue(value: string): string;
|
|
6
5
|
static IsSelfClosingElement(tag: string): boolean;
|
|
7
|
-
static ConvertToString(designItems: IDesignItem[],
|
|
6
|
+
static ConvertToString(designItems: IDesignItem[], beautifyOutput?: boolean): string;
|
|
8
7
|
}
|
|
@@ -33,10 +33,10 @@ export class DomConverter {
|
|
|
33
33
|
tag === 'track' ||
|
|
34
34
|
tag === 'wbr';
|
|
35
35
|
}
|
|
36
|
-
static ConvertToString(designItems,
|
|
36
|
+
static ConvertToString(designItems, beautifyOutput) {
|
|
37
37
|
let itw = beautifyOutput !== false ? new IndentedTextWriter() : new SimpleTextWriter();
|
|
38
38
|
let options = { beautifyOutput: beautifyOutput !== false, writeDesignerProperties: true, compressCssToShorthandProperties: true, parseJsonInAttributes: true, jsonWriteMode: 'beauty' };
|
|
39
|
-
designItems[0].serviceContainer.htmlWriterService.write(itw, designItems, true, options
|
|
39
|
+
designItems[0].serviceContainer.htmlWriterService.write(itw, designItems, true, options);
|
|
40
40
|
return itw.getString();
|
|
41
41
|
}
|
|
42
42
|
}
|
|
@@ -429,6 +429,10 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
429
429
|
this._lastCopiedPrimaryItem = null;
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
|
+
const designItemDocumentPositionService = this.serviceContainer.getLastService('designItemDocumentPositionService');
|
|
433
|
+
if (designItemDocumentPositionService) {
|
|
434
|
+
this.instanceServiceContainer.register("designItemDocumentPositionService", designItemDocumentPositionService(this));
|
|
435
|
+
}
|
|
432
436
|
this.rootDesignItem = DesignItem.GetOrCreateDesignItem(this._canvas, this.serviceContainer, this.instanceServiceContainer);
|
|
433
437
|
const contentService = this.serviceContainer.getLastService('contentService');
|
|
434
438
|
if (contentService) {
|
|
@@ -5,7 +5,6 @@ import { IUiCommandHandler } from '../../../commandHandling/IUiCommandHandler.js
|
|
|
5
5
|
import { IUiCommand } from '../../../commandHandling/IUiCommand.js';
|
|
6
6
|
import { DesignerCanvas } from "./designerCanvas.js";
|
|
7
7
|
import { IDesignItem } from '../../item/IDesignItem.js';
|
|
8
|
-
import { IStringPosition } from '../../services/htmlWriterService/IStringPosition.js';
|
|
9
8
|
export declare class DesignerView extends BaseCustomWebComponentConstructorAppend implements IUiCommandHandler {
|
|
10
9
|
private _sVert;
|
|
11
10
|
private _sHor;
|
|
@@ -34,7 +33,7 @@ export declare class DesignerView extends BaseCustomWebComponentConstructorAppen
|
|
|
34
33
|
executeCommand(command: IUiCommand): Promise<void>;
|
|
35
34
|
canExecuteCommand(command: IUiCommand): boolean;
|
|
36
35
|
initialize(serviceContainer: ServiceContainer): void;
|
|
37
|
-
getHTML(
|
|
36
|
+
getHTML(): string;
|
|
38
37
|
parseHTML(html: string, disableUndo?: boolean): Promise<void>;
|
|
39
38
|
static wrapInDesigner(elements: HTMLCollection | HTMLElement[], serviceContainer: ServiceContainer): DesignerCanvas;
|
|
40
39
|
}
|
|
@@ -301,10 +301,10 @@ export class DesignerView extends BaseCustomWebComponentConstructorAppend {
|
|
|
301
301
|
}
|
|
302
302
|
this._toolbar.initialize(this.serviceContainer, this);
|
|
303
303
|
}
|
|
304
|
-
getHTML(
|
|
304
|
+
getHTML() {
|
|
305
305
|
//this.instanceServiceContainer.selectionService.setSelectedElements(null);
|
|
306
306
|
if (this._designerCanvas.rootDesignItem.childCount > 0)
|
|
307
|
-
return DomConverter.ConvertToString(Array.from(this._designerCanvas.rootDesignItem.children())
|
|
307
|
+
return DomConverter.ConvertToString(Array.from(this._designerCanvas.rootDesignItem.children()));
|
|
308
308
|
return '';
|
|
309
309
|
}
|
|
310
310
|
async parseHTML(html, disableUndo = false) {
|
package/dist/elements/widgets/designerView/extensions/grid/EditGridColumnRowSizesExtension.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class EditGridColumnRowSizesExtension extends AbstractExtension {
|
|
|
11
11
|
constructor(extensionManager: IExtensionManager, designerView: IDesignerCanvas, extendedItem: IDesignItem);
|
|
12
12
|
extend(event?: Event): void;
|
|
13
13
|
refresh(event?: Event): void;
|
|
14
|
-
_pointerActionTypeResize
|
|
15
|
-
_convertCssUnits
|
|
14
|
+
private _pointerActionTypeResize;
|
|
15
|
+
private _convertCssUnits;
|
|
16
16
|
dispose(): void;
|
|
17
17
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export * from "./elements/services/copyPasteService/CopyPasteService.js";
|
|
|
40
40
|
export type { ICopyPasteService } from "./elements/services/copyPasteService/ICopyPasteService.js";
|
|
41
41
|
export * from "./elements/services/demoProviderService/DemoProviderService.js";
|
|
42
42
|
export type { IDemoProviderService } from "./elements/services/demoProviderService/IDemoProviderService.js";
|
|
43
|
+
export * from "./elements/services/designItemDocumentPositionService/DesignItemDocumentPositionService.js";
|
|
44
|
+
export type { IDesignItemDocumentPositionService } from "./elements/services/designItemDocumentPositionService/IDesignItemDocumentPositionService.js";
|
|
43
45
|
export * from "./elements/services/dragDropService/DragDropService.js";
|
|
44
46
|
export type { IDragDropService } from "./elements/services/dragDropService/IDragDropService.js";
|
|
45
47
|
export type { IElementInteractionService } from "./elements/services/elementInteractionService/IElementInteractionService.js";
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export * from "./elements/services/elementAtPointService/ElementAtPointService.j
|
|
|
26
26
|
export * from "./elements/services/contentService/ContentService.js";
|
|
27
27
|
export * from "./elements/services/copyPasteService/CopyPasteService.js";
|
|
28
28
|
export * from "./elements/services/demoProviderService/DemoProviderService.js";
|
|
29
|
+
export * from "./elements/services/designItemDocumentPositionService/DesignItemDocumentPositionService.js";
|
|
29
30
|
export * from "./elements/services/dragDropService/DragDropService.js";
|
|
30
31
|
export * from "./elements/services/elementsService/JsonFileElementsService.js";
|
|
31
32
|
export * from "./elements/services/elementsService/PreDefinedElementsService.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.216",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"author": "",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@adobe/css-tools": "^4.3.0-beta.1",
|
|
21
21
|
"@node-projects/lean-he-esm": "^3.3.0",
|
|
22
|
-
"@node-projects/node-html-parser-esm": "^
|
|
22
|
+
"@node-projects/node-html-parser-esm": "^6.1.5",
|
|
23
23
|
"@papyrs/stylo": "^0.0.42",
|
|
24
24
|
"@types/codemirror": "^5.60.7",
|
|
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": "^18.
|
|
28
|
+
"@types/node": "^18.15.0",
|
|
29
29
|
"ace-builds": "^1.15.3",
|
|
30
30
|
"codemirror": "^6.0.1",
|
|
31
31
|
"css-tree": "^2.3.1",
|