@node-projects/web-component-designer 0.0.108 → 0.0.109

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.
@@ -27,6 +27,7 @@ import { IDemoProviderService } from "./demoProviderService/IDemoProviderService
27
27
  import { IBindableObjectsService } from "./bindableObjectsService/IBindableObjectsService.js";
28
28
  import { IBindableObjectDragDropService } from "./bindableObjectsService/IBindableObjectDragDropService.js";
29
29
  import { IDesignViewToolbarButtonProvider } from "../widgets/designerView/tools/toolBar/IDesignViewToolbarButtonProvider.js";
30
+ import { IElementInteractionService } from './elementInteractionService/IElementInteractionService';
30
31
  interface ServiceNameMap {
31
32
  "propertyService": IPropertiesService;
32
33
  "containerService": IPlacementService;
@@ -45,6 +46,7 @@ interface ServiceNameMap {
45
46
  "copyPasteService": ICopyPasteService;
46
47
  "modelCommandService": IModelCommandService;
47
48
  "demoProviderService": IDemoProviderService;
49
+ "elementInteractionService": IElementInteractionService;
48
50
  }
49
51
  export declare class ServiceContainer extends BaseServiceContainer<ServiceNameMap> {
50
52
  readonly config: {
@@ -62,6 +64,7 @@ export declare class ServiceContainer extends BaseServiceContainer<ServiceNameMa
62
64
  get bindingService(): IBindingService;
63
65
  get bindableObjectsServices(): IBindableObjectsService[];
64
66
  get bindableObjectDragDropService(): IBindableObjectDragDropService;
67
+ get elementInteractionServices(): IElementInteractionService[];
65
68
  get propertiesServices(): IPropertiesService[];
66
69
  get containerServices(): IPlacementService[];
67
70
  get snaplinesProviderService(): ISnaplinesProviderService;
@@ -31,6 +31,9 @@ export class ServiceContainer extends BaseServiceContainer {
31
31
  get bindableObjectDragDropService() {
32
32
  return this.getLastService('bindableObjectDragDropService');
33
33
  }
34
+ get elementInteractionServices() {
35
+ return this.getServices('elementInteractionService');
36
+ }
34
37
  get propertiesServices() {
35
38
  return this.getServices('propertyService');
36
39
  }
@@ -0,0 +1,5 @@
1
+ import { IDesignerCanvas } from "../../widgets/designerView/IDesignerCanvas.js";
2
+ import { IService } from "../IService";
3
+ export interface IElementInteractionService extends IService {
4
+ stopEventHandling(designerCanvas: IDesignerCanvas, event: PointerEvent, currentElement: Element): boolean;
5
+ }
@@ -25,7 +25,7 @@ export class WebcomponentManifestPropertiesService extends UnkownElementProperti
25
25
  if (declaration) {
26
26
  if (declaration.members) {
27
27
  for (let d of declaration.members) {
28
- if (d.kind == 'field') {
28
+ if (d.kind == 'field' && d.privacy !== 'private' && d.privacy !== 'protected') {
29
29
  let pType = PropertyType.property;
30
30
  if (declaration.attributes)
31
31
  pType = declaration.attributes.find(x => x.fieldName == d.name) != null ? PropertyType.propertyAndAttribute : PropertyType.property;
@@ -39,6 +39,12 @@ export class PointerTool {
39
39
  }
40
40
  }
41
41
  pointerEventHandler(designerCanvas, event, currentElement) {
42
+ const interactionServices = designerCanvas.serviceContainer.elementInteractionServices;
43
+ if (interactionServices)
44
+ for (let s of interactionServices) {
45
+ if (s.stopEventHandling(designerCanvas, event, currentElement))
46
+ return;
47
+ }
42
48
  if (event.button == 2) {
43
49
  this._showContextMenu(event, designerCanvas);
44
50
  return;
package/dist/index.d.ts CHANGED
@@ -38,6 +38,7 @@ export * from "./elements/services/demoProviderService/DemoProviderService.js";
38
38
  export type { IDemoProviderService } from "./elements/services/demoProviderService/IDemoProviderService.js";
39
39
  export * from "./elements/services/dragDropService/DragDropService.js";
40
40
  export type { IDragDropService } from "./elements/services/dragDropService/IDragDropService.js";
41
+ export type { IElementInteractionService } from "./elements/services/elementInteractionService/IElementInteractionService.js";
41
42
  export type { IElementDefinition } from "./elements/services/elementsService/IElementDefinition.js";
42
43
  export type { IElementsJson } from "./elements/services/elementsService/IElementsJson.js";
43
44
  export type { IElementsService } from "./elements/services/elementsService/IElementsService.js";
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "description": "A UI designer for Polymer apps",
3
- "name": "@node-projects/web-component-designer",
4
- "version": "0.0.108",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "author": "",
8
- "license": "MIT",
9
- "scripts": {
10
- "tsc": "tsc",
11
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
12
- "build": "tsc",
13
- "prepublishOnly": "npm run build"
14
- },
15
- "dependencies": {
16
- "@node-projects/base-custom-webcomponent": "^0.9.1",
17
- "construct-style-sheets-polyfill": "^3.1.0"
18
- },
19
- "devDependencies": {
20
- "@node-projects/lean-he-esm": "^3.3.0",
21
- "@node-projects/node-html-parser-esm": "^2.4.1",
22
- "@papyrs/stylo": "^0.0.30",
23
- "@types/codemirror": "^5.60.5",
24
- "@types/jquery": "^3.5.14",
25
- "@types/jquery.fancytree": "0.0.7",
26
- "ace-builds": "^1.7.1",
27
- "codemirror": "^6.0.1",
28
- "esprima-next": "^5.8.3",
29
- "html2canvas": "*",
30
- "jest": "^28.1.2",
31
- "jquery": "^3.6.0",
32
- "jquery.fancytree": "^2.38.2",
33
- "monaco-editor": "^0.33.0",
34
- "ts-jest": "^28.0.5",
35
- "typescript": "^4.7.4",
36
- "typescript-lit-html-plugin": "^0.9.0"
37
- },
38
- "repository": {
39
- "type": "git",
40
- "url": "git+https://github.com/node-projects/web-component-designer.git"
41
- }
42
- }
1
+ {
2
+ "description": "A UI designer for Polymer apps",
3
+ "name": "@node-projects/web-component-designer",
4
+ "version": "0.0.109",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "author": "",
8
+ "license": "MIT",
9
+ "scripts": {
10
+ "tsc": "tsc",
11
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
12
+ "build": "tsc",
13
+ "prepublishOnly": "npm run build"
14
+ },
15
+ "dependencies": {
16
+ "@node-projects/base-custom-webcomponent": "^0.9.1",
17
+ "construct-style-sheets-polyfill": "^3.1.0"
18
+ },
19
+ "devDependencies": {
20
+ "@node-projects/lean-he-esm": "^3.3.0",
21
+ "@node-projects/node-html-parser-esm": "^2.4.1",
22
+ "@papyrs/stylo": "^0.0.34",
23
+ "@types/codemirror": "^5.60.5",
24
+ "@types/jquery": "^3.5.14",
25
+ "@types/jquery.fancytree": "0.0.7",
26
+ "ace-builds": "^1.7.1",
27
+ "codemirror": "^6.0.1",
28
+ "esprima-next": "^5.8.3",
29
+ "html2canvas": "*",
30
+ "jest": "^28.1.3",
31
+ "jquery": "^3.6.0",
32
+ "jquery.fancytree": "^2.38.2",
33
+ "monaco-editor": "^0.33.0",
34
+ "ts-jest": "^28.0.7",
35
+ "typescript": "^4.7.4",
36
+ "typescript-lit-html-plugin": "^0.9.0"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/node-projects/web-component-designer.git"
41
+ }
42
+ }