@node-projects/web-component-designer 0.0.135 → 0.0.137

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.
Files changed (43) hide show
  1. package/config/elements-native.json +2 -0
  2. package/dist/elements/controls/MetricsEditor.d.ts +14 -0
  3. package/dist/elements/controls/MetricsEditor.js +120 -0
  4. package/dist/elements/controls/ThicknessEditor copy.d.ts +33 -0
  5. package/dist/elements/controls/ThicknessEditor copy.js +145 -0
  6. package/dist/elements/helper/Screenshot.js +2 -1
  7. package/dist/elements/services/DefaultServiceBootstrap.js +4 -0
  8. package/dist/elements/services/ServiceContainer.d.ts +3 -0
  9. package/dist/elements/services/ServiceContainer.js +3 -0
  10. package/dist/elements/services/htmlWriterService/HtmlWriterService.js +1 -1
  11. package/dist/elements/services/propertiesService/DefaultEditorTypesService.js +5 -0
  12. package/dist/elements/services/propertiesService/IPropertiesService.d.ts +1 -0
  13. package/dist/elements/services/propertiesService/IProperty.d.ts +1 -1
  14. package/dist/elements/services/propertiesService/IPropertyGroupsService.d.ts +8 -0
  15. package/dist/elements/services/propertiesService/IPropertyGroupsService.js +1 -0
  16. package/dist/elements/services/propertiesService/PropertyGroupsService.d.ts +11 -0
  17. package/dist/elements/services/propertiesService/PropertyGroupsService.js +28 -0
  18. package/dist/elements/services/propertiesService/PropertyType.d.ts +3 -1
  19. package/dist/elements/services/propertiesService/PropertyType.js +2 -0
  20. package/dist/elements/services/propertiesService/propertyEditors/MetricsEditor.d.ts +0 -0
  21. package/dist/elements/services/propertiesService/propertyEditors/MetricsEditor.js +1 -0
  22. package/dist/elements/services/propertiesService/propertyEditors/MetricsPropertyEditor.d.ts +8 -0
  23. package/dist/elements/services/propertiesService/propertyEditors/MetricsPropertyEditor.js +14 -0
  24. package/dist/elements/services/propertiesService/services/AttributesPropertiesService.d.ts +1 -0
  25. package/dist/elements/services/propertiesService/services/AttributesPropertiesService.js +4 -0
  26. package/dist/elements/services/propertiesService/services/CommonPropertiesService.d.ts +1 -0
  27. package/dist/elements/services/propertiesService/services/CommonPropertiesService.js +3 -0
  28. package/dist/elements/services/propertiesService/services/CssPropertiesService.d.ts +6 -6
  29. package/dist/elements/services/propertiesService/services/CssPropertiesService.js +16 -75
  30. package/dist/elements/services/propertiesService/services/NativeElementsPropertiesService.d.ts +3 -0
  31. package/dist/elements/services/propertiesService/services/NativeElementsPropertiesService.js +79 -8
  32. package/dist/elements/services/propertiesService/services/SVGElementsPropertiesService.d.ts +15 -0
  33. package/dist/elements/services/propertiesService/services/SVGElementsPropertiesService.js +259 -0
  34. package/dist/elements/services/propertiesService/services/UnkownElementPropertiesService.d.ts +1 -0
  35. package/dist/elements/services/propertiesService/services/UnkownElementPropertiesService.js +6 -1
  36. package/dist/elements/widgets/designerView/designerCanvas.js +16 -4
  37. package/dist/elements/widgets/designerView/tools/TextTool.js +3 -1
  38. package/dist/elements/widgets/propertyGrid/PropertyGrid.d.ts +1 -0
  39. package/dist/elements/widgets/propertyGrid/PropertyGrid.js +24 -58
  40. package/dist/elements/widgets/propertyGrid/PropertyGridPropertyList.js +61 -41
  41. package/dist/index.d.ts +15 -0
  42. package/dist/index.js +14 -0
  43. package/package.json +1 -1
@@ -3,8 +3,17 @@ import { NodeType } from '../../../item/NodeType';
3
3
  import { BindingTarget } from '../../../item/BindingTarget.js';
4
4
  import { PropertyType } from '../PropertyType';
5
5
  export class CssPropertiesService {
6
- //@ts-ignore
7
- styles = [
6
+ listNeedsRefresh(designItem) {
7
+ return this.name == 'styles' ? true : false;
8
+ }
9
+ layout = [
10
+ {
11
+ name: "display",
12
+ type: "list",
13
+ values: ["block", "inline-block", "flex", "contents", "grid", "inherit", "initial", "none"],
14
+ service: this,
15
+ propertyType: PropertyType.cssValue
16
+ },
8
17
  {
9
18
  name: "color",
10
19
  type: "color",
@@ -42,51 +51,16 @@ export class CssPropertiesService {
42
51
  service: this,
43
52
  propertyType: PropertyType.cssValue
44
53
  }, {
45
- name: "padding",
46
- type: "thickness",
54
+ name: "metrics",
55
+ type: "metrics",
47
56
  service: this,
48
- propertyType: PropertyType.cssValue
49
- }, {
50
- name: "margin",
51
- type: "thickness",
52
- service: this,
53
- propertyType: PropertyType.cssValue
57
+ propertyType: PropertyType.complex
54
58
  }, {
55
59
  name: "position",
56
60
  type: "list",
57
61
  values: ["static", "relative", "absolute"],
58
62
  service: this,
59
63
  propertyType: PropertyType.cssValue
60
- }, {
61
- name: "left",
62
- type: "css-length",
63
- service: this,
64
- propertyType: PropertyType.cssValue
65
- }, {
66
- name: "top",
67
- type: "css-length",
68
- service: this,
69
- propertyType: PropertyType.cssValue
70
- }, {
71
- name: "right",
72
- type: "css-length",
73
- service: this,
74
- propertyType: PropertyType.cssValue
75
- }, {
76
- name: "bottom",
77
- type: "css-length",
78
- service: this,
79
- propertyType: PropertyType.cssValue
80
- }, {
81
- name: "width",
82
- type: "css-length",
83
- service: this,
84
- propertyType: PropertyType.cssValue
85
- }, {
86
- name: "height",
87
- type: "css-length",
88
- service: this,
89
- propertyType: PropertyType.cssValue
90
64
  }, {
91
65
  name: "font-size",
92
66
  type: "css-length",
@@ -100,38 +74,6 @@ export class CssPropertiesService {
100
74
  propertyType: PropertyType.cssValue
101
75
  }
102
76
  ];
103
- //@ts-ignore
104
- alignment = [
105
- {
106
- name: "display",
107
- type: "list",
108
- values: ["block", "inline-block", "flex", "contents", "grid", "inherit", "initial", "none"],
109
- service: this,
110
- propertyType: PropertyType.cssValue
111
- }, {
112
- name: "position",
113
- type: "list",
114
- values: ["static", "relative", "absolute"],
115
- service: this,
116
- propertyType: PropertyType.cssValue
117
- }, {
118
- name: "inset",
119
- type: "thickness",
120
- service: this,
121
- propertyType: PropertyType.cssValue
122
- }, {
123
- name: "margin",
124
- type: "thickness",
125
- service: this,
126
- propertyType: PropertyType.cssValue
127
- }, {
128
- name: "padding",
129
- type: "thickness",
130
- service: this,
131
- propertyType: PropertyType.cssValue
132
- }
133
- ];
134
- //@ts-ignore
135
77
  grid = [
136
78
  {
137
79
  name: "display",
@@ -191,7 +133,6 @@ export class CssPropertiesService {
191
133
  propertyType: PropertyType.cssValue
192
134
  }
193
135
  ];
194
- //@ts-ignore
195
136
  flex = [
196
137
  {
197
138
  name: "display",
@@ -245,13 +186,13 @@ export class CssPropertiesService {
245
186
  return true;
246
187
  }
247
188
  getProperty(designItem, name) {
248
- if (this.name == 'set-styles') {
189
+ if (this.name == 'styles') {
249
190
  return { name: name, type: 'string', service: this, propertyType: PropertyType.cssValue };
250
191
  }
251
192
  return this[this.name][name];
252
193
  }
253
194
  getProperties(designItem) {
254
- if (this.name == 'set-styles') {
195
+ if (this.name == 'styles') {
255
196
  if (!designItem)
256
197
  return [];
257
198
  return Array.from(designItem.styles.keys(), x => ({ name: x, type: 'string', service: this, propertyType: PropertyType.cssValue }));
@@ -3,11 +3,14 @@ import { IDesignItem } from '../../../item/IDesignItem';
3
3
  import { CommonPropertiesService } from "./CommonPropertiesService";
4
4
  export declare class NativeElementsPropertiesService extends CommonPropertiesService {
5
5
  private inputProperties;
6
+ private textareaProperties;
7
+ private selectProperties;
6
8
  private buttonProperties;
7
9
  private anchorProperties;
8
10
  private divProperties;
9
11
  private imgProperties;
10
12
  private iframeProperties;
13
+ private formElementProperties;
11
14
  name: string;
12
15
  isHandledElement(designItem: IDesignItem): boolean;
13
16
  getProperty(designItem: IDesignItem, name: string): IProperty;
@@ -1,7 +1,6 @@
1
1
  import { CommonPropertiesService } from "./CommonPropertiesService";
2
2
  import { PropertyType } from '../PropertyType';
3
3
  export class NativeElementsPropertiesService extends CommonPropertiesService {
4
- //@ts-ignore
5
4
  inputProperties = [
6
5
  {
7
6
  name: "type",
@@ -15,6 +14,11 @@ export class NativeElementsPropertiesService extends CommonPropertiesService {
15
14
  type: "string",
16
15
  service: this,
17
16
  propertyType: PropertyType.propertyAndAttribute
17
+ }, {
18
+ name: "placeholder",
19
+ type: "string",
20
+ service: this,
21
+ propertyType: PropertyType.propertyAndAttribute
18
22
  }, {
19
23
  name: "checked",
20
24
  type: "boolean",
@@ -30,6 +34,52 @@ export class NativeElementsPropertiesService extends CommonPropertiesService {
30
34
  type: "number",
31
35
  service: this,
32
36
  propertyType: PropertyType.propertyAndAttribute
37
+ }, {
38
+ name: "readonly",
39
+ type: "boolean",
40
+ service: this,
41
+ propertyType: PropertyType.propertyAndAttribute
42
+ }
43
+ ];
44
+ textareaProperties = [
45
+ {
46
+ name: "placeholder",
47
+ type: "string",
48
+ service: this,
49
+ propertyType: PropertyType.propertyAndAttribute
50
+ }, {
51
+ name: "maxlength",
52
+ type: "number",
53
+ service: this,
54
+ propertyType: PropertyType.propertyAndAttribute
55
+ }, {
56
+ name: "cols",
57
+ type: "number",
58
+ service: this,
59
+ propertyType: PropertyType.propertyAndAttribute
60
+ }, {
61
+ name: "rows",
62
+ type: "number",
63
+ service: this,
64
+ propertyType: PropertyType.propertyAndAttribute
65
+ }, {
66
+ name: "readonly",
67
+ type: "boolean",
68
+ service: this,
69
+ propertyType: PropertyType.propertyAndAttribute
70
+ }
71
+ ];
72
+ selectProperties = [
73
+ {
74
+ name: "size",
75
+ type: "number",
76
+ service: this,
77
+ propertyType: PropertyType.propertyAndAttribute
78
+ }, {
79
+ name: "multiple",
80
+ type: "boolean",
81
+ service: this,
82
+ propertyType: PropertyType.propertyAndAttribute
33
83
  }
34
84
  ];
35
85
  buttonProperties = [
@@ -45,11 +95,6 @@ export class NativeElementsPropertiesService extends CommonPropertiesService {
45
95
  type: "string",
46
96
  service: this,
47
97
  propertyType: PropertyType.propertyAndAttribute
48
- }, {
49
- name: "disabled",
50
- type: "boolean",
51
- service: this,
52
- propertyType: PropertyType.propertyAndAttribute
53
98
  }
54
99
  ];
55
100
  anchorProperties = [
@@ -84,10 +129,32 @@ export class NativeElementsPropertiesService extends CommonPropertiesService {
84
129
  propertyType: PropertyType.propertyAndAttribute
85
130
  }
86
131
  ];
132
+ formElementProperties = [
133
+ {
134
+ name: "autofocus",
135
+ type: "boolean",
136
+ service: this,
137
+ propertyType: PropertyType.propertyAndAttribute
138
+ },
139
+ {
140
+ name: "disabled",
141
+ type: "boolean",
142
+ service: this,
143
+ propertyType: PropertyType.propertyAndAttribute
144
+ },
145
+ {
146
+ name: "required",
147
+ type: "boolean",
148
+ service: this,
149
+ propertyType: PropertyType.propertyAndAttribute
150
+ }
151
+ ];
87
152
  name = "native";
88
153
  isHandledElement(designItem) {
89
154
  switch (designItem.element.localName) {
90
155
  case 'input':
156
+ case 'textarea':
157
+ case 'select':
91
158
  case 'button':
92
159
  case 'a':
93
160
  case 'div':
@@ -107,9 +174,13 @@ export class NativeElementsPropertiesService extends CommonPropertiesService {
107
174
  return null;
108
175
  switch (designItem.element.localName) {
109
176
  case 'input':
110
- return this.inputProperties;
177
+ return [...this.inputProperties, ...this.formElementProperties];
178
+ case 'textarea':
179
+ return [...this.textareaProperties, ...this.formElementProperties];
180
+ case 'select':
181
+ return [...this.selectProperties, ...this.formElementProperties];
111
182
  case 'button':
112
- return this.buttonProperties;
183
+ return [...this.buttonProperties, ...this.formElementProperties];
113
184
  case 'a':
114
185
  return this.anchorProperties;
115
186
  case 'div':
@@ -0,0 +1,15 @@
1
+ import { IProperty } from '../IProperty';
2
+ import { IDesignItem } from '../../../item/IDesignItem';
3
+ import { CommonPropertiesService } from "./CommonPropertiesService";
4
+ export declare class SVGElementsPropertiesService extends CommonPropertiesService {
5
+ private rectProperties;
6
+ private lineProperties;
7
+ private ellipseProperties;
8
+ private pathProperties;
9
+ private svgProperties;
10
+ private defaultProperties;
11
+ name: string;
12
+ isHandledElement(designItem: IDesignItem): boolean;
13
+ getProperty(designItem: IDesignItem, name: string): IProperty;
14
+ getProperties(designItem: IDesignItem): IProperty[];
15
+ }
@@ -0,0 +1,259 @@
1
+ import { CommonPropertiesService } from "./CommonPropertiesService";
2
+ import { PropertyType } from '../PropertyType';
3
+ export class SVGElementsPropertiesService extends CommonPropertiesService {
4
+ rectProperties = [
5
+ {
6
+ name: "x",
7
+ type: "number",
8
+ defaultValue: "0",
9
+ service: this,
10
+ propertyType: PropertyType.propertyAndAttribute
11
+ },
12
+ {
13
+ name: "y",
14
+ type: "number",
15
+ defaultValue: "0",
16
+ service: this,
17
+ propertyType: PropertyType.propertyAndAttribute
18
+ },
19
+ {
20
+ name: "width",
21
+ type: "number",
22
+ defaultValue: "auto",
23
+ service: this,
24
+ propertyType: PropertyType.propertyAndAttribute
25
+ },
26
+ {
27
+ name: "height",
28
+ type: "number",
29
+ defaultValue: "auto",
30
+ service: this,
31
+ propertyType: PropertyType.propertyAndAttribute
32
+ },
33
+ {
34
+ name: "rx",
35
+ type: "number",
36
+ defaultValue: "auto",
37
+ service: this,
38
+ propertyType: PropertyType.propertyAndAttribute
39
+ },
40
+ {
41
+ name: "ry",
42
+ type: "number",
43
+ defaultValue: "auto",
44
+ service: this,
45
+ propertyType: PropertyType.propertyAndAttribute
46
+ },
47
+ {
48
+ name: "pathLength",
49
+ type: "number",
50
+ service: this,
51
+ propertyType: PropertyType.propertyAndAttribute
52
+ },
53
+ {
54
+ name: "fill",
55
+ type: "list",
56
+ values: ["transparent", "black", "white", "blue", "green", "red", "yellow", "orange", "brown", "grey"],
57
+ defaultValue: "transparent",
58
+ service: this,
59
+ propertyType: PropertyType.propertyAndAttribute
60
+ },
61
+ {
62
+ name: "fill-opacity",
63
+ type: "list",
64
+ values: ["0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"],
65
+ defaultValue: "1",
66
+ service: this,
67
+ propertyType: PropertyType.propertyAndAttribute
68
+ }
69
+ ];
70
+ lineProperties = [
71
+ {
72
+ name: "x1",
73
+ type: "number",
74
+ defaultValue: "0",
75
+ service: this,
76
+ propertyType: PropertyType.propertyAndAttribute
77
+ },
78
+ {
79
+ name: "y1",
80
+ type: "number",
81
+ defaultValue: "0",
82
+ service: this,
83
+ propertyType: PropertyType.propertyAndAttribute
84
+ },
85
+ {
86
+ name: "x2",
87
+ type: "number",
88
+ defaultValue: "0",
89
+ service: this,
90
+ propertyType: PropertyType.propertyAndAttribute
91
+ },
92
+ {
93
+ name: "y2",
94
+ type: "number",
95
+ defaultValue: "0",
96
+ service: this,
97
+ propertyType: PropertyType.propertyAndAttribute
98
+ },
99
+ {
100
+ name: "pathLength",
101
+ type: "number",
102
+ service: this,
103
+ propertyType: PropertyType.propertyAndAttribute
104
+ }
105
+ ];
106
+ ellipseProperties = [
107
+ {
108
+ name: "cx",
109
+ type: "number",
110
+ defaultValue: "0",
111
+ service: this,
112
+ propertyType: PropertyType.propertyAndAttribute
113
+ },
114
+ {
115
+ name: "cy",
116
+ type: "number",
117
+ defaultValue: "0",
118
+ service: this,
119
+ propertyType: PropertyType.propertyAndAttribute
120
+ },
121
+ {
122
+ name: "rx",
123
+ type: "number",
124
+ defaultValue: "auto",
125
+ service: this,
126
+ propertyType: PropertyType.propertyAndAttribute
127
+ },
128
+ {
129
+ name: "ry",
130
+ type: "number",
131
+ defaultValue: "auto",
132
+ service: this,
133
+ propertyType: PropertyType.propertyAndAttribute
134
+ },
135
+ {
136
+ name: "pathLength",
137
+ type: "number",
138
+ service: this,
139
+ propertyType: PropertyType.propertyAndAttribute
140
+ },
141
+ {
142
+ name: "fill",
143
+ type: "list",
144
+ values: ["transparent", "black", "white", "blue", "green", "red", "yellow", "orange", "brown", "grey"],
145
+ defaultValue: "transparent",
146
+ service: this,
147
+ propertyType: PropertyType.propertyAndAttribute
148
+ },
149
+ {
150
+ name: "fill-opacity",
151
+ type: "list",
152
+ values: ["0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"],
153
+ defaultValue: "1",
154
+ service: this,
155
+ propertyType: PropertyType.propertyAndAttribute
156
+ }
157
+ ];
158
+ pathProperties = [
159
+ {
160
+ name: "d",
161
+ type: "string",
162
+ defaultValue: '',
163
+ service: this,
164
+ propertyType: PropertyType.propertyAndAttribute
165
+ },
166
+ {
167
+ name: "pathLength",
168
+ type: "number",
169
+ service: this,
170
+ propertyType: PropertyType.propertyAndAttribute
171
+ }
172
+ ];
173
+ svgProperties = [
174
+ {
175
+ name: "width",
176
+ type: "number",
177
+ defaultValue: "auto",
178
+ service: this,
179
+ propertyType: PropertyType.cssValue
180
+ },
181
+ {
182
+ name: "height",
183
+ type: "number",
184
+ defaultValue: "auto",
185
+ service: this,
186
+ propertyType: PropertyType.cssValue
187
+ },
188
+ {
189
+ name: "viewBox",
190
+ type: "number",
191
+ service: this,
192
+ propertyType: PropertyType.cssValue
193
+ }
194
+ ];
195
+ defaultProperties = [
196
+ {
197
+ name: "stroke",
198
+ type: "list",
199
+ values: ["black", "white", "blue", "green", "red", "yellow", "orange", "brown", "grey"],
200
+ defaultValue: "currentcolor",
201
+ service: this,
202
+ propertyType: PropertyType.propertyAndAttribute
203
+ },
204
+ {
205
+ name: "stroke-width",
206
+ type: "number",
207
+ service: this,
208
+ propertyType: PropertyType.propertyAndAttribute
209
+ },
210
+ {
211
+ name: "stroke-opacity",
212
+ type: "list",
213
+ values: ["0.1", "0.2", "0.3", "0.4", "0.5", "0.6", "0.7", "0.8", "0.9", "1"],
214
+ defaultValue: "1",
215
+ service: this,
216
+ propertyType: PropertyType.propertyAndAttribute
217
+ },
218
+ {
219
+ name: "visibility",
220
+ type: "list",
221
+ values: ["visible", "hidden"],
222
+ defaultValue: "visible",
223
+ service: this,
224
+ propertyType: PropertyType.propertyAndAttribute
225
+ }
226
+ ];
227
+ name = "svg";
228
+ isHandledElement(designItem) {
229
+ switch (designItem.element.localName) {
230
+ case 'rect':
231
+ case 'line':
232
+ case 'ellipse':
233
+ case 'path':
234
+ case 'svg':
235
+ return true;
236
+ }
237
+ return false;
238
+ }
239
+ getProperty(designItem, name) {
240
+ return this.getProperties(designItem)[name];
241
+ }
242
+ getProperties(designItem) {
243
+ if (!this.isHandledElement(designItem))
244
+ return null;
245
+ switch (designItem.element.localName) {
246
+ case 'rect':
247
+ return [...this.rectProperties, ...this.defaultProperties];
248
+ case 'line':
249
+ return [...this.lineProperties, ...this.defaultProperties];
250
+ case 'ellipse':
251
+ return [...this.ellipseProperties, ...this.defaultProperties];
252
+ case 'path':
253
+ return [...this.pathProperties, ...this.defaultProperties];
254
+ case 'svg':
255
+ return this.svgProperties;
256
+ }
257
+ return null;
258
+ }
259
+ }
@@ -5,6 +5,7 @@ import { ValueType } from "../ValueType";
5
5
  import { BindingTarget } from "../../../item/BindingTarget";
6
6
  import { IBinding } from "../../../item/IBinding";
7
7
  export declare abstract class UnkownElementPropertiesService implements IPropertiesService {
8
+ listNeedsRefresh(designItem: IDesignItem): boolean;
8
9
  isHandledElement(designItem: IDesignItem): boolean;
9
10
  protected _notifyChangedProperty(designItem: IDesignItem, property: IProperty, value: any): void;
10
11
  getProperty(designItem: IDesignItem, name: string): IProperty;
@@ -3,6 +3,9 @@ import { PropertiesHelper } from './PropertiesHelper';
3
3
  import { BindingTarget } from "../../../item/BindingTarget";
4
4
  //@ts-ignore
5
5
  export class UnkownElementPropertiesService {
6
+ listNeedsRefresh(designItem) {
7
+ return true;
8
+ }
6
9
  isHandledElement(designItem) {
7
10
  return true;
8
11
  }
@@ -15,7 +18,9 @@ export class UnkownElementPropertiesService {
15
18
  return null;
16
19
  }
17
20
  setValue(designItems, property, value) {
18
- const attributeName = PropertiesHelper.camelToDashCase(property.name);
21
+ let attributeName = property.attributeName;
22
+ if (!attributeName)
23
+ attributeName = PropertiesHelper.camelToDashCase(property.name);
19
24
  const cg = designItems[0].openGroup("properties changed");
20
25
  try {
21
26
  for (let d of designItems) {
@@ -233,28 +233,31 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
233
233
  switch (command.type) {
234
234
  case CommandType.screenshot:
235
235
  {
236
+ if (!Screenshot.screenshotsEnabled) {
237
+ alert("you need to select current tab in next browser dialog, or screenshots will not work correctly");
238
+ }
236
239
  if (!this.instanceServiceContainer.selectionService.primarySelection) {
237
240
  this.zoomToFit();
238
241
  this.disableBackgroud();
239
- await sleep(100);
240
242
  const el = this.rootDesignItem.element;
241
243
  const sel = this.instanceServiceContainer.selectionService.selectedElements;
242
244
  this.instanceServiceContainer.selectionService.setSelectedElements(null);
245
+ await sleep(100);
243
246
  const screenshot = await Screenshot.takeScreenshot(el, el.clientWidth, el.clientHeight);
244
247
  await exportData(dataURItoBlob(screenshot), "screenshot.png");
245
248
  this.instanceServiceContainer.selectionService.setSelectedElements(sel);
246
249
  this.enableBackground();
247
250
  }
248
251
  else {
249
- if (!Screenshot.screenshotsEnabled) {
250
- alert("you need to select current tab in next browser dialog, or screenshots will not work correctly");
251
- }
252
+ this.disableBackgroud();
252
253
  const el = this.instanceServiceContainer.selectionService.primarySelection.element;
253
254
  const sel = this.instanceServiceContainer.selectionService.selectedElements;
254
255
  this.instanceServiceContainer.selectionService.setSelectedElements(null);
256
+ await sleep(100);
255
257
  const screenshot = await Screenshot.takeScreenshot(el, el.clientWidth, el.clientHeight);
256
258
  await exportData(dataURItoBlob(screenshot), "screenshot.png");
257
259
  this.instanceServiceContainer.selectionService.setSelectedElements(sel);
260
+ this.enableBackground();
258
261
  }
259
262
  }
260
263
  break;
@@ -482,6 +485,7 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
482
485
  this.rootDesignItem._removeChildInternal(i);
483
486
  this.addDesignItems(designItems);
484
487
  this.instanceServiceContainer.contentService.onContentChanged.emit({ changeType: 'parsed' });
488
+ this.instanceServiceContainer.selectionService.setSelectedElements(null);
485
489
  }
486
490
  addDesignItems(designItems) {
487
491
  if (designItems) {
@@ -622,6 +626,8 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
622
626
  this._dragOverExtensionItem = null;
623
627
  }
624
628
  let [newContainer] = this._getPossibleContainerForDrop(event);
629
+ if (!newContainer)
630
+ newContainer = this.rootDesignItem;
625
631
  let pos = this.getNormalizedElementCoordinates(newContainer.element);
626
632
  this._fillCalculationrects();
627
633
  const position = this.getNormalizedEventCoordinates(event);
@@ -780,6 +786,8 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
780
786
  continue;
781
787
  if (e.getRootNode() !== this.shadowRoot)
782
788
  continue;
789
+ if (e == this._outercanvas2)
790
+ break;
783
791
  retVal.push(e);
784
792
  if (e === this._canvas)
785
793
  break;
@@ -791,6 +799,10 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
791
799
  let currentElement = null;
792
800
  for (let i = 0; i < elements.length; i++) {
793
801
  currentElement = elements[i];
802
+ if (currentElement == this._outercanvas2) {
803
+ currentElement = null;
804
+ break;
805
+ }
794
806
  if (currentElement == this.clickOverlay) {
795
807
  currentElement = null;
796
808
  continue;
@@ -20,8 +20,10 @@ export class TextTool {
20
20
  di.setStyle('left', currentPoint.x + 'px');
21
21
  di.setStyle('top', currentPoint.y + 'px');
22
22
  designerCanvas.instanceServiceContainer.undoService.execute(new InsertAction(designerCanvas.rootDesignItem, designerCanvas.rootDesignItem.childCount, di));
23
- designerCanvas.serviceContainer.globalContext.finishedWithTool(this);
23
+ //designerCanvas.serviceContainer.globalContext.finishedWithTool(this);
24
+ //todo: we need to keep the tool active, cause the pointer tool eats the stylo events. Maybe we could also remove the eatEvents property
24
25
  //TODO - don't apply doubleclick extension (maybe it is not the doubleclick one) - apply edit text extesion directly
26
+ //should we configure the editTextExtension anywhere??
25
27
  designerCanvas.extensionManager.applyExtension(di, ExtensionType.Doubleclick);
26
28
  setTimeout(() => {
27
29
  span.focus();
@@ -7,6 +7,7 @@ export declare class PropertyGrid extends BaseCustomWebComponentLazyAppend {
7
7
  private _designerTabControl;
8
8
  private _selectedItems;
9
9
  private _propertyGridPropertyLists;
10
+ private _propertyGridPropertyListsDict;
10
11
  private _itemsObserver;
11
12
  private _instanceServiceContainer;
12
13
  private _selectionChangedHandler;