@node-projects/web-component-designer 0.1.80 → 0.1.82
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/services/multiplayerService/IMultiplayerService.d.ts +16 -0
- package/dist/elements/services/multiplayerService/IMultiplayerService.js +1 -0
- package/dist/elements/services/multiplayerService/MultiplayerService.d.ts +6 -0
- package/dist/elements/services/multiplayerService/MultiplayerService.js +5 -0
- package/dist/elements/services/propertiesService/services/AbstractPropertiesService.js +25 -3
- package/dist/elements/services/propertiesService/services/CommonPropertiesService.js +1 -1
- package/dist/elements/widgets/designerView/designerCanvas.js +0 -6
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IPoint } from "../../../interfaces/IPoint";
|
|
2
|
+
export interface IMultiplayerService {
|
|
3
|
+
signOn(userInfo: userInfo): any;
|
|
4
|
+
}
|
|
5
|
+
export type userInfo = {
|
|
6
|
+
name: string;
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
export type userContext = {
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
export type cursor = {
|
|
13
|
+
point: IPoint;
|
|
14
|
+
state: 'none' | 'pointing' | 'chat';
|
|
15
|
+
document: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TypedEvent } from "@node-projects/base-custom-webcomponent";
|
|
2
|
+
import { userInfo } from "./IMultiplayerService";
|
|
3
|
+
export declare class MultiplayerService {
|
|
4
|
+
constructor(getUserInfo: () => userInfo, sendMessage: (message: any) => void, messageReceived: () => any);
|
|
5
|
+
cursorsChanged: TypedEvent<string>;
|
|
6
|
+
}
|
|
@@ -66,6 +66,10 @@ export class AbstractPropertiesService {
|
|
|
66
66
|
cg.commit();
|
|
67
67
|
}
|
|
68
68
|
getPropertyTarget(designItem, property) {
|
|
69
|
+
if (property.propertyType == PropertyType.attribute)
|
|
70
|
+
return BindingTarget.attribute;
|
|
71
|
+
if (property.propertyType == PropertyType.cssValue)
|
|
72
|
+
return BindingTarget.css;
|
|
69
73
|
return BindingTarget.property;
|
|
70
74
|
}
|
|
71
75
|
clearValue(designItems, property, clearType) {
|
|
@@ -122,8 +126,18 @@ export class AbstractPropertiesService {
|
|
|
122
126
|
return ValueType.bound;
|
|
123
127
|
}
|
|
124
128
|
else {
|
|
125
|
-
if (
|
|
126
|
-
|
|
129
|
+
if (property.propertyType == PropertyType.attribute) {
|
|
130
|
+
if (bindings && bindings.find(x => x.target == BindingTarget.attribute && x.targetName == property.name))
|
|
131
|
+
return ValueType.bound;
|
|
132
|
+
}
|
|
133
|
+
else if (property.propertyType == PropertyType.property) {
|
|
134
|
+
if (bindings && bindings.find(x => x.target == BindingTarget.property && x.targetName == property.name))
|
|
135
|
+
return ValueType.bound;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
if (bindings && bindings.find(x => (x.target == BindingTarget.property || x.target == BindingTarget.attribute) && x.targetName == property.name))
|
|
139
|
+
return ValueType.bound;
|
|
140
|
+
}
|
|
127
141
|
}
|
|
128
142
|
if (!all && property.propertyType == PropertyType.cssValue) {
|
|
129
143
|
let styles = AbstractPropertiesService._stylesCache.get(designItems[0]);
|
|
@@ -193,7 +207,15 @@ export class AbstractPropertiesService {
|
|
|
193
207
|
return bindings.find(x => (x.target == BindingTarget.css || x.target == BindingTarget.cssvar) && x.targetName == property.name);
|
|
194
208
|
}
|
|
195
209
|
else {
|
|
196
|
-
|
|
210
|
+
if (property.propertyType == PropertyType.attribute) {
|
|
211
|
+
return bindings.find(x => x.target == BindingTarget.attribute && x.targetName == property.name);
|
|
212
|
+
}
|
|
213
|
+
else if (property.propertyType == PropertyType.property) {
|
|
214
|
+
return bindings.find(x => x.target == BindingTarget.property && x.targetName == property.name);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
return bindings.find(x => (x.target == BindingTarget.property || x.target == BindingTarget.attribute) && x.targetName == property.name);
|
|
218
|
+
}
|
|
197
219
|
}
|
|
198
220
|
}
|
|
199
221
|
return null;
|
|
@@ -18,7 +18,7 @@ export class CommonPropertiesService extends AbstractPropertiesService {
|
|
|
18
18
|
service: this,
|
|
19
19
|
attributeName: "class",
|
|
20
20
|
propertyName: "className",
|
|
21
|
-
propertyType: PropertyType.
|
|
21
|
+
propertyType: PropertyType.attribute
|
|
22
22
|
}, {
|
|
23
23
|
name: "title",
|
|
24
24
|
type: "string",
|
|
@@ -247,12 +247,6 @@ export class DesignerCanvas extends BaseCustomWebComponentLazyAppend {
|
|
|
247
247
|
#node-projects-designer-search-container > #node-projects-designer-search-close::after {
|
|
248
248
|
transform: translate(-50%, -50%) rotate(-45deg);
|
|
249
249
|
}
|
|
250
|
-
|
|
251
|
-
#node-projects-designer-canvas-canvas {
|
|
252
|
-
margin: 0;
|
|
253
|
-
padding: 0;
|
|
254
|
-
border: none;
|
|
255
|
-
}
|
|
256
250
|
`;
|
|
257
251
|
static template = html `
|
|
258
252
|
<div style="display: flex;flex-direction: column;width: 100%;height: 100%; margin: 0 !important; padding: 0 !important; border: none !important;">
|