@hpcc-js/common 2.73.3 → 2.73.4

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 (58) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +59 -59
  3. package/dist/index.es6.js +2 -2
  4. package/dist/index.es6.js.map +1 -1
  5. package/dist/index.js +2 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.min.js +1 -1
  8. package/dist/index.min.js.map +1 -1
  9. package/package.json +3 -3
  10. package/src/CanvasWidget.ts +31 -31
  11. package/src/Class.ts +67 -67
  12. package/src/Database.ts +856 -856
  13. package/src/Entity.ts +235 -235
  14. package/src/EntityCard.ts +66 -66
  15. package/src/EntityPin.ts +103 -103
  16. package/src/EntityRect.css +15 -15
  17. package/src/EntityRect.ts +236 -236
  18. package/src/EntityVertex.ts +86 -86
  19. package/src/FAChar.css +2 -2
  20. package/src/FAChar.ts +82 -82
  21. package/src/HTMLWidget.ts +191 -191
  22. package/src/IList.ts +4 -4
  23. package/src/IMenu.ts +5 -5
  24. package/src/Icon.css +9 -9
  25. package/src/Icon.ts +164 -164
  26. package/src/Image.ts +95 -95
  27. package/src/List.css +13 -13
  28. package/src/List.ts +99 -99
  29. package/src/Menu.css +23 -23
  30. package/src/Menu.ts +134 -134
  31. package/src/Palette.ts +341 -341
  32. package/src/Platform.ts +125 -125
  33. package/src/ProgressBar.ts +105 -105
  34. package/src/PropertyExt.ts +793 -793
  35. package/src/ResizeSurface.css +39 -39
  36. package/src/ResizeSurface.ts +221 -221
  37. package/src/SVGWidget.ts +567 -567
  38. package/src/SVGZoomWidget.css +12 -12
  39. package/src/SVGZoomWidget.ts +426 -426
  40. package/src/Shape.css +3 -3
  41. package/src/Shape.ts +186 -186
  42. package/src/Surface.css +35 -35
  43. package/src/Surface.ts +349 -349
  44. package/src/Text.css +4 -4
  45. package/src/Text.ts +131 -131
  46. package/src/TextBox.css +4 -4
  47. package/src/TextBox.ts +168 -168
  48. package/src/TitleBar.css +99 -99
  49. package/src/TitleBar.ts +401 -401
  50. package/src/Transition.ts +45 -45
  51. package/src/Utility.ts +839 -839
  52. package/src/Widget.css +8 -8
  53. package/src/Widget.ts +730 -730
  54. package/src/WidgetArray.ts +13 -13
  55. package/src/__package__.ts +3 -3
  56. package/src/index.ts +55 -55
  57. package/types/__package__.d.ts +2 -2
  58. package/types-3.4/__package__.d.ts +2 -2
package/src/EntityPin.ts CHANGED
@@ -1,103 +1,103 @@
1
- import { Entity } from "./Entity";
2
-
3
- export class EntityPin extends Entity {
4
- protected _element_textbox;
5
- constructor() {
6
- super();
7
- }
8
- enter(domNode, element) {
9
- super.enter(domNode, element);
10
- }
11
- update(domNode, element) {
12
- super.update.apply(this, arguments);
13
-
14
- const is_hovering = element.classed("hovering");
15
-
16
- this._icon_widget.render();
17
- this._desc_widget.render();
18
- this._title_widget.render();
19
- const title_bbox = !this.titleOnlyShowOnHover() || is_hovering ? this._title_widget.getBBox(true) : { height: 0, width: 0 };
20
- const icon_bbox = !this.iconOnlyShowOnHover() || is_hovering ? this._icon_widget.getBBox(true) : { height: 0, width: 0 };
21
- const desc_bbox = !this.descriptionOnlyShowOnHover() || is_hovering ? this._desc_widget.getBBox(true) : { height: 0, width: 0 };
22
- const _anno_h = !this.annotationOnlyShowOnHover() || is_hovering ? this.annotationIcons().length > 0 ? this.annotationDiameter() + this.padding() : 0 : 0;
23
- const background_bbox = this.calcBackgroundBBox(is_hovering, title_bbox, icon_bbox, desc_bbox, _anno_h);
24
-
25
- this._title_widget.display(!this.titleOnlyShowOnHover() || is_hovering);
26
- this._icon_widget.display(!this.iconOnlyShowOnHover() || is_hovering);
27
- this._desc_widget.display(!this.descriptionOnlyShowOnHover() || is_hovering);
28
-
29
- this._background_widget
30
- .height(background_bbox.height)
31
- .width(background_bbox.width);
32
- const icon_y = -background_bbox.height + icon_bbox.height + (this.padding() / 2);
33
- const title_y = icon_y + (icon_bbox.height / 2) + (title_bbox.height / 2) + this.padding();
34
- const desc_y = title_y + (title_bbox.height / 2) + (desc_bbox.height / 2) + this.padding();
35
- const anno_y = desc_y + (desc_bbox.height / 2) + this.padding();
36
- this._title_widget.move({
37
- x: 0,
38
- y: title_y
39
- });
40
- this._desc_widget.move({
41
- x: 0,
42
- y: desc_y
43
- });
44
- this._icon_widget.move({
45
- x: 0,
46
- y: icon_y
47
- });
48
- this.moveAnnotations(background_bbox.width / 2, anno_y);
49
-
50
- }
51
- calcHeight() {
52
- const is_hovering = true;
53
- this._icon_widget.render();
54
- this._desc_widget.render();
55
- this._title_widget.render();
56
- const title_bbox = !this.titleOnlyShowOnHover() || is_hovering ? this._title_widget.getBBox(true) : { height: 0, width: 0 };
57
- const icon_bbox = !this.iconOnlyShowOnHover() || is_hovering ? this._icon_widget.getBBox(true) : { height: 0, width: 0 };
58
- const desc_bbox = !this.descriptionOnlyShowOnHover() || is_hovering ? this._desc_widget.getBBox(true) : { height: 0, width: 0 };
59
- const _anno_h = !this.annotationOnlyShowOnHover() || is_hovering ? this.annotationIcons().length > 0 ? this.annotationDiameter() + this.padding() : 0 : 0;
60
- const background_bbox = this.calcBackgroundBBox(is_hovering, title_bbox, icon_bbox, desc_bbox, _anno_h);
61
-
62
- return background_bbox.height;
63
- }
64
- calcBackgroundBBox(is_hovering, title_bbox, icon_bbox, desc_bbox, _anno_h) {
65
- const content_width = Math.max(title_bbox.width, icon_bbox.width, desc_bbox.width);
66
- const background_bbox = {
67
- width: content_width + (this.padding() * 2),
68
- height: icon_bbox.height + title_bbox.height + _anno_h + this.arrowHeight() + desc_bbox.height + (this.padding() * 5)
69
- };
70
- let remove_padding = 0;
71
- if (this.titleOnlyShowOnHover() && !is_hovering) {
72
- remove_padding += this.padding();
73
- }
74
- if (this.iconOnlyShowOnHover() && !is_hovering) {
75
- remove_padding += this.padding();
76
- }
77
- if (this.descriptionOnlyShowOnHover() && !is_hovering) {
78
- remove_padding += this.padding();
79
- }
80
- if (this.annotationIcons().length === 0 || this.annotationOnlyShowOnHover() && !is_hovering) {
81
- remove_padding += this.padding();
82
- }
83
- background_bbox.height -= remove_padding;
84
- return background_bbox;
85
- }
86
- }
87
- EntityPin.prototype._class += " common_EntityPin";
88
-
89
- export interface EntityPin {
90
- titleOnlyShowOnHover(): boolean;
91
- titleOnlyShowOnHover(_: boolean): this;
92
- iconOnlyShowOnHover(): boolean;
93
- iconOnlyShowOnHover(_: boolean): this;
94
- descriptionOnlyShowOnHover(): boolean;
95
- descriptionOnlyShowOnHover(_: boolean): this;
96
- annotationOnlyShowOnHover(): boolean;
97
- annotationOnlyShowOnHover(_: boolean): this;
98
- }
99
-
100
- EntityPin.prototype.publish("titleOnlyShowOnHover", false, "boolean", "titleOnlyShowOnHover");
101
- EntityPin.prototype.publish("iconOnlyShowOnHover", false, "boolean", "iconOnlyShowOnHover");
102
- EntityPin.prototype.publish("descriptionOnlyShowOnHover", false, "boolean", "descriptionOnlyShowOnHover");
103
- EntityPin.prototype.publish("annotationOnlyShowOnHover", false, "boolean", "annotationOnlyShowOnHover");
1
+ import { Entity } from "./Entity";
2
+
3
+ export class EntityPin extends Entity {
4
+ protected _element_textbox;
5
+ constructor() {
6
+ super();
7
+ }
8
+ enter(domNode, element) {
9
+ super.enter(domNode, element);
10
+ }
11
+ update(domNode, element) {
12
+ super.update.apply(this, arguments);
13
+
14
+ const is_hovering = element.classed("hovering");
15
+
16
+ this._icon_widget.render();
17
+ this._desc_widget.render();
18
+ this._title_widget.render();
19
+ const title_bbox = !this.titleOnlyShowOnHover() || is_hovering ? this._title_widget.getBBox(true) : { height: 0, width: 0 };
20
+ const icon_bbox = !this.iconOnlyShowOnHover() || is_hovering ? this._icon_widget.getBBox(true) : { height: 0, width: 0 };
21
+ const desc_bbox = !this.descriptionOnlyShowOnHover() || is_hovering ? this._desc_widget.getBBox(true) : { height: 0, width: 0 };
22
+ const _anno_h = !this.annotationOnlyShowOnHover() || is_hovering ? this.annotationIcons().length > 0 ? this.annotationDiameter() + this.padding() : 0 : 0;
23
+ const background_bbox = this.calcBackgroundBBox(is_hovering, title_bbox, icon_bbox, desc_bbox, _anno_h);
24
+
25
+ this._title_widget.display(!this.titleOnlyShowOnHover() || is_hovering);
26
+ this._icon_widget.display(!this.iconOnlyShowOnHover() || is_hovering);
27
+ this._desc_widget.display(!this.descriptionOnlyShowOnHover() || is_hovering);
28
+
29
+ this._background_widget
30
+ .height(background_bbox.height)
31
+ .width(background_bbox.width);
32
+ const icon_y = -background_bbox.height + icon_bbox.height + (this.padding() / 2);
33
+ const title_y = icon_y + (icon_bbox.height / 2) + (title_bbox.height / 2) + this.padding();
34
+ const desc_y = title_y + (title_bbox.height / 2) + (desc_bbox.height / 2) + this.padding();
35
+ const anno_y = desc_y + (desc_bbox.height / 2) + this.padding();
36
+ this._title_widget.move({
37
+ x: 0,
38
+ y: title_y
39
+ });
40
+ this._desc_widget.move({
41
+ x: 0,
42
+ y: desc_y
43
+ });
44
+ this._icon_widget.move({
45
+ x: 0,
46
+ y: icon_y
47
+ });
48
+ this.moveAnnotations(background_bbox.width / 2, anno_y);
49
+
50
+ }
51
+ calcHeight() {
52
+ const is_hovering = true;
53
+ this._icon_widget.render();
54
+ this._desc_widget.render();
55
+ this._title_widget.render();
56
+ const title_bbox = !this.titleOnlyShowOnHover() || is_hovering ? this._title_widget.getBBox(true) : { height: 0, width: 0 };
57
+ const icon_bbox = !this.iconOnlyShowOnHover() || is_hovering ? this._icon_widget.getBBox(true) : { height: 0, width: 0 };
58
+ const desc_bbox = !this.descriptionOnlyShowOnHover() || is_hovering ? this._desc_widget.getBBox(true) : { height: 0, width: 0 };
59
+ const _anno_h = !this.annotationOnlyShowOnHover() || is_hovering ? this.annotationIcons().length > 0 ? this.annotationDiameter() + this.padding() : 0 : 0;
60
+ const background_bbox = this.calcBackgroundBBox(is_hovering, title_bbox, icon_bbox, desc_bbox, _anno_h);
61
+
62
+ return background_bbox.height;
63
+ }
64
+ calcBackgroundBBox(is_hovering, title_bbox, icon_bbox, desc_bbox, _anno_h) {
65
+ const content_width = Math.max(title_bbox.width, icon_bbox.width, desc_bbox.width);
66
+ const background_bbox = {
67
+ width: content_width + (this.padding() * 2),
68
+ height: icon_bbox.height + title_bbox.height + _anno_h + this.arrowHeight() + desc_bbox.height + (this.padding() * 5)
69
+ };
70
+ let remove_padding = 0;
71
+ if (this.titleOnlyShowOnHover() && !is_hovering) {
72
+ remove_padding += this.padding();
73
+ }
74
+ if (this.iconOnlyShowOnHover() && !is_hovering) {
75
+ remove_padding += this.padding();
76
+ }
77
+ if (this.descriptionOnlyShowOnHover() && !is_hovering) {
78
+ remove_padding += this.padding();
79
+ }
80
+ if (this.annotationIcons().length === 0 || this.annotationOnlyShowOnHover() && !is_hovering) {
81
+ remove_padding += this.padding();
82
+ }
83
+ background_bbox.height -= remove_padding;
84
+ return background_bbox;
85
+ }
86
+ }
87
+ EntityPin.prototype._class += " common_EntityPin";
88
+
89
+ export interface EntityPin {
90
+ titleOnlyShowOnHover(): boolean;
91
+ titleOnlyShowOnHover(_: boolean): this;
92
+ iconOnlyShowOnHover(): boolean;
93
+ iconOnlyShowOnHover(_: boolean): this;
94
+ descriptionOnlyShowOnHover(): boolean;
95
+ descriptionOnlyShowOnHover(_: boolean): this;
96
+ annotationOnlyShowOnHover(): boolean;
97
+ annotationOnlyShowOnHover(_: boolean): this;
98
+ }
99
+
100
+ EntityPin.prototype.publish("titleOnlyShowOnHover", false, "boolean", "titleOnlyShowOnHover");
101
+ EntityPin.prototype.publish("iconOnlyShowOnHover", false, "boolean", "iconOnlyShowOnHover");
102
+ EntityPin.prototype.publish("descriptionOnlyShowOnHover", false, "boolean", "descriptionOnlyShowOnHover");
103
+ EntityPin.prototype.publish("annotationOnlyShowOnHover", false, "boolean", "annotationOnlyShowOnHover");
@@ -1,16 +1,16 @@
1
- .common_EntityRectList .entityRectItem {
2
- margin:6px;
3
- border-width: 2px;
4
- border-radius: 8px;
5
- border-color:"black";
6
- border-style: solid;
7
- }
8
-
9
- .common_EntityRectList .entityRectItem rect {
10
- stroke-width: 4px;
11
- shape-rendering: geometricPrecision;
12
- }
13
-
14
- .common_EntityRect .entity_shape > g > rect {
15
- shape-rendering: geometricPrecision;
1
+ .common_EntityRectList .entityRectItem {
2
+ margin:6px;
3
+ border-width: 2px;
4
+ border-radius: 8px;
5
+ border-color:"black";
6
+ border-style: solid;
7
+ }
8
+
9
+ .common_EntityRectList .entityRectItem rect {
10
+ stroke-width: 4px;
11
+ shape-rendering: geometricPrecision;
12
+ }
13
+
14
+ .common_EntityRect .entity_shape > g > rect {
15
+ shape-rendering: geometricPrecision;
16
16
  }