@node-projects/web-component-designer 0.0.112 → 0.0.113
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/README.md
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
# web-component-designer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
```This is a preview version. It's already useable but big refactorings could still happen.```
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Based on PolymerLabs Wizzywid (but it does not use Polymer any more.)
|
|
9
|
-
|
|
10
|
-
This is a Designer Framework wich could easily be included in your own Software..
|
|
5
|
+
A HTML web component for designing web components and HTML pages based on PolymerLabs wizzywid which can easily be integrated in your own software.
|
|
6
|
+
Meanwhile polymer is not used anymore.
|
|
11
7
|
|
|
12
8
|

|
|
13
9
|
|
|
14
10
|
## NPM Package
|
|
15
11
|
|
|
16
|
-
At the moment there is no
|
|
17
|
-
But there will be one when project is in Release Candidate state.
|
|
12
|
+
At the moment there is no npm package available, but there will be one as soon as the software has reached RC status.
|
|
18
13
|
|
|
19
14
|
## Demo
|
|
20
15
|
|
|
@@ -35,9 +30,7 @@ repository: https://github.com/node-projects/web-component-designer-simple-demo
|
|
|
35
30
|
|
|
36
31
|
## Features we are workin on
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
- look at the issues
|
|
40
|
-
- Much, much more ...
|
|
33
|
+
https://github.com/node-projects/web-component-designer/issues
|
|
41
34
|
|
|
42
35
|
## Developing
|
|
43
36
|
|
|
@@ -46,38 +39,39 @@ repository: https://github.com/node-projects/web-component-designer-simple-demo
|
|
|
46
39
|
$ npm install
|
|
47
40
|
```
|
|
48
41
|
|
|
49
|
-
* Compile
|
|
42
|
+
* Compile typescript after doing changes
|
|
50
43
|
```
|
|
51
|
-
$ npm run build
|
|
44
|
+
$ npm run build (if you use Visual Studio Code, you can also run the build task via Ctrl + Shift + B > tsc:build - tsconfig.json)
|
|
52
45
|
```
|
|
53
46
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
* *Link node module*<br/>
|
|
48
|
+
```
|
|
49
|
+
$ npm link
|
|
50
|
+
```
|
|
57
51
|
|
|
58
|
-
##
|
|
52
|
+
## Using
|
|
59
53
|
|
|
60
|
-
|
|
54
|
+
At first you have to setup a service container providing services for history, properties, elements, ...
|
|
61
55
|
|
|
62
56
|
## Code Editor
|
|
63
57
|
|
|
64
|
-
You can select to use
|
|
65
|
-
If you use one of the
|
|
58
|
+
You can select to use one of 3 code editors available (ACE, CodeMirrow, Monaco).
|
|
59
|
+
If you use one of the widgets, you need to include the JS lib in your index.html and then use the specific widget.
|
|
66
60
|
|
|
67
61
|
## TreeView
|
|
68
62
|
|
|
69
|
-
We have 2
|
|
63
|
+
We have 2 tree components. One independent and one feature rich which uses FancyTree (and cause of this it needs JQuery and JqueryUI).
|
|
70
64
|
|
|
71
65
|
## DragDrop
|
|
72
66
|
|
|
73
|
-
If you'd like to use the
|
|
74
|
-
Your
|
|
67
|
+
If you'd like to use the designer on mobile, you need the mobile-drag-drop npm library and include our polyfill.
|
|
68
|
+
Your index.html should be extended as follows:
|
|
75
69
|
|
|
76
70
|
<link rel="stylesheet" href="/node_modules/mobile-drag-drop/default.css">
|
|
77
71
|
<script src="/node_modules/mobile-drag-drop/index.js"></script>
|
|
78
72
|
<script src="/node_modules/@node-projects/web-component-designer/dist/polyfill/mobileDragDrop.js"></script>
|
|
79
73
|
|
|
80
|
-
## Copyright notice
|
|
74
|
+
## Copyright notice
|
|
81
75
|
|
|
82
76
|
The Library uses Images from the Chrome Dev Tools, see
|
|
83
77
|
https://github.com/ChromeDevTools/devtools-frontend/tree/main/front_end/Images/src
|
|
@@ -136,8 +136,13 @@ export class DesignerTabControl extends BaseCustomWebComponentLazyAppend {
|
|
|
136
136
|
let w = 0;
|
|
137
137
|
DomHelper.removeAllChildnodes(this._moreContainer);
|
|
138
138
|
DomHelper.removeAllChildnodes(this._headerDiv);
|
|
139
|
+
let reloadOnce = true;
|
|
139
140
|
for (let item of this.children) {
|
|
140
141
|
let htmlItem = item;
|
|
142
|
+
if (!this._elementMap.has(htmlItem) && reloadOnce) {
|
|
143
|
+
this.refreshItems();
|
|
144
|
+
reloadOnce = false;
|
|
145
|
+
}
|
|
141
146
|
const tabHeaderDiv = this._elementMap.get(htmlItem);
|
|
142
147
|
this._moreContainer.appendChild(tabHeaderDiv);
|
|
143
148
|
if (this._headerDiv.children.length == 0 || (w + (tabHeaderDiv.clientWidth / 2)) < this._headerDiv.clientWidth) {
|