@hpcc-js/common 2.73.0 → 3.2.0

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 (143) hide show
  1. package/dist/index.js +294 -15311
  2. package/dist/index.js.map +7 -1
  3. package/package.json +31 -36
  4. package/src/CanvasWidget.ts +1 -1
  5. package/src/Class.ts +5 -0
  6. package/src/Database.ts +10 -6
  7. package/src/Entity.ts +5 -5
  8. package/src/EntityCard.ts +1 -1
  9. package/src/EntityPin.ts +1 -1
  10. package/src/EntityRect.ts +54 -36
  11. package/src/EntityVertex.ts +2 -2
  12. package/src/FAChar.ts +14 -7
  13. package/src/HTMLWidget.ts +1 -1
  14. package/src/Icon.ts +27 -15
  15. package/src/Image.ts +16 -7
  16. package/src/List.ts +8 -5
  17. package/src/Menu.ts +11 -6
  18. package/src/Palette.ts +6 -6
  19. package/src/ProgressBar.ts +28 -18
  20. package/src/PropertyExt.ts +7 -30
  21. package/src/ResizeSurface.ts +6 -2
  22. package/src/SVGWidget.ts +6 -8
  23. package/src/SVGZoomWidget.ts +4 -3
  24. package/src/Shape.ts +1 -1
  25. package/src/Surface.ts +32 -17
  26. package/src/Text.ts +1 -1
  27. package/src/TextBox.ts +34 -19
  28. package/src/TitleBar.ts +3 -3
  29. package/src/Transition.ts +3 -3
  30. package/src/Utility.ts +3 -3
  31. package/src/Widget.ts +11 -10
  32. package/src/WidgetArray.ts +7 -5
  33. package/src/__package__.ts +2 -2
  34. package/src/index.ts +32 -32
  35. package/types/CanvasWidget.d.ts +1 -2
  36. package/types/Class.d.ts +2 -1
  37. package/types/Database.d.ts +9 -18
  38. package/types/Entity.d.ts +5 -6
  39. package/types/EntityCard.d.ts +1 -2
  40. package/types/EntityPin.d.ts +1 -2
  41. package/types/EntityRect.d.ts +35 -20
  42. package/types/EntityVertex.d.ts +2 -3
  43. package/types/FAChar.d.ts +11 -18
  44. package/types/HTMLWidget.d.ts +1 -2
  45. package/types/IList.d.ts +0 -1
  46. package/types/IMenu.d.ts +0 -1
  47. package/types/Icon.d.ts +23 -40
  48. package/types/Image.d.ts +15 -26
  49. package/types/List.d.ts +6 -7
  50. package/types/Menu.d.ts +10 -13
  51. package/types/Palette.d.ts +0 -1
  52. package/types/Platform.d.ts +0 -1
  53. package/types/ProgressBar.d.ts +19 -10
  54. package/types/PropertyExt.d.ts +1 -13
  55. package/types/ResizeSurface.d.ts +5 -6
  56. package/types/SVGWidget.d.ts +2 -4
  57. package/types/SVGZoomWidget.d.ts +2 -3
  58. package/types/Shape.d.ts +1 -2
  59. package/types/Surface.d.ts +27 -50
  60. package/types/Text.d.ts +1 -2
  61. package/types/TextBox.d.ts +32 -57
  62. package/types/TitleBar.d.ts +2 -3
  63. package/types/Transition.d.ts +3 -4
  64. package/types/Utility.d.ts +3 -4
  65. package/types/Widget.d.ts +6 -6
  66. package/types/WidgetArray.d.ts +5 -4
  67. package/types/__package__.d.ts +2 -3
  68. package/types/index.d.ts +32 -33
  69. package/dist/index.es6.js +0 -15067
  70. package/dist/index.es6.js.map +0 -1
  71. package/dist/index.min.js +0 -2
  72. package/dist/index.min.js.map +0 -1
  73. package/font-awesome/css/font-awesome.css +0 -2337
  74. package/font-awesome/css/font-awesome.css.map +0 -7
  75. package/font-awesome/css/font-awesome.min.css +0 -4
  76. package/types/CanvasWidget.d.ts.map +0 -1
  77. package/types/Class.d.ts.map +0 -1
  78. package/types/Database.d.ts.map +0 -1
  79. package/types/Entity.d.ts.map +0 -1
  80. package/types/EntityCard.d.ts.map +0 -1
  81. package/types/EntityPin.d.ts.map +0 -1
  82. package/types/EntityRect.d.ts.map +0 -1
  83. package/types/EntityVertex.d.ts.map +0 -1
  84. package/types/FAChar.d.ts.map +0 -1
  85. package/types/HTMLWidget.d.ts.map +0 -1
  86. package/types/IList.d.ts.map +0 -1
  87. package/types/IMenu.d.ts.map +0 -1
  88. package/types/Icon.d.ts.map +0 -1
  89. package/types/Image.d.ts.map +0 -1
  90. package/types/List.d.ts.map +0 -1
  91. package/types/Menu.d.ts.map +0 -1
  92. package/types/Palette.d.ts.map +0 -1
  93. package/types/Platform.d.ts.map +0 -1
  94. package/types/ProgressBar.d.ts.map +0 -1
  95. package/types/PropertyExt.d.ts.map +0 -1
  96. package/types/ResizeSurface.d.ts.map +0 -1
  97. package/types/SVGWidget.d.ts.map +0 -1
  98. package/types/SVGZoomWidget.d.ts.map +0 -1
  99. package/types/Shape.d.ts.map +0 -1
  100. package/types/Surface.d.ts.map +0 -1
  101. package/types/Text.d.ts.map +0 -1
  102. package/types/TextBox.d.ts.map +0 -1
  103. package/types/TitleBar.d.ts.map +0 -1
  104. package/types/Transition.d.ts.map +0 -1
  105. package/types/Utility.d.ts.map +0 -1
  106. package/types/Widget.d.ts.map +0 -1
  107. package/types/WidgetArray.d.ts.map +0 -1
  108. package/types/__package__.d.ts.map +0 -1
  109. package/types/index.d.ts.map +0 -1
  110. package/types-3.4/CanvasWidget.d.ts +0 -9
  111. package/types-3.4/Class.d.ts +0 -13
  112. package/types-3.4/Database.d.ts +0 -137
  113. package/types-3.4/Entity.d.ts +0 -89
  114. package/types-3.4/EntityCard.d.ts +0 -14
  115. package/types-3.4/EntityPin.d.ts +0 -23
  116. package/types-3.4/EntityRect.d.ts +0 -46
  117. package/types-3.4/EntityVertex.d.ts +0 -31
  118. package/types-3.4/FAChar.d.ts +0 -30
  119. package/types-3.4/HTMLWidget.d.ts +0 -28
  120. package/types-3.4/IList.d.ts +0 -5
  121. package/types-3.4/IMenu.d.ts +0 -6
  122. package/types-3.4/Icon.d.ts +0 -63
  123. package/types-3.4/Image.d.ts +0 -34
  124. package/types-3.4/List.d.ts +0 -16
  125. package/types-3.4/Menu.d.ts +0 -29
  126. package/types-3.4/Palette.d.ts +0 -20
  127. package/types-3.4/Platform.d.ts +0 -6
  128. package/types-3.4/ProgressBar.d.ts +0 -22
  129. package/types-3.4/PropertyExt.d.ts +0 -115
  130. package/types-3.4/ResizeSurface.d.ts +0 -24
  131. package/types-3.4/SVGWidget.d.ts +0 -78
  132. package/types-3.4/SVGZoomWidget.d.ts +0 -74
  133. package/types-3.4/Shape.d.ts +0 -35
  134. package/types-3.4/Surface.d.ts +0 -70
  135. package/types-3.4/Text.d.ts +0 -38
  136. package/types-3.4/TextBox.d.ts +0 -77
  137. package/types-3.4/TitleBar.d.ts +0 -118
  138. package/types-3.4/Transition.d.ts +0 -12
  139. package/types-3.4/Utility.d.ts +0 -103
  140. package/types-3.4/Widget.d.ts +0 -154
  141. package/types-3.4/WidgetArray.d.ts +0 -7
  142. package/types-3.4/__package__.d.ts +0 -4
  143. package/types-3.4/index.d.ts +0 -53
@@ -1,6 +1,6 @@
1
1
  import { hashSum } from "@hpcc-js/util";
2
2
  import { event as d3Event } from "d3-selection";
3
- import { Class } from "./Class";
3
+ import { Class } from "./Class.ts";
4
4
 
5
5
  const GEN_PUB_STUBS: boolean = false;
6
6
 
@@ -493,7 +493,7 @@ export class PropertyExt extends Class {
493
493
  if (this[id]) {
494
494
  } else {
495
495
  if (type === "propertyArray") {
496
- this[id] = function (_) {
496
+ this[id] = function (_?) {
497
497
  if (!arguments.length) return this[__prop_ + id];
498
498
  this[__prop_ + id] = _.map(item => {
499
499
  if (!meta.ext.noDeserialize && meta.ext.autoExpand && !(item instanceof meta.ext.autoExpand)) {
@@ -505,8 +505,8 @@ export class PropertyExt extends Class {
505
505
  return this;
506
506
  };
507
507
  } else {
508
- this[id] = function (_) {
509
- if (!arguments.length) return this[__prop_ + id];
508
+ this[id] = function (_?) {
509
+ if (!arguments.length) return this[__prop_ + id] ?? this[id + "_default"]();
510
510
  this[__prop_ + id] = _;
511
511
  return this;
512
512
  };
@@ -532,7 +532,7 @@ export class PropertyExt extends Class {
532
532
  if (this[id + "_default"]() != null && !(this[id + "_default"]() === "" && ext.optional === true)) return true;
533
533
  return false;
534
534
  };
535
- this[id + "_default"] = function (_) {
535
+ this[id + "_default"] = function (_?) {
536
536
  if (!arguments.length) return this[__default_ + id] !== undefined ? this[__default_ + id] : meta.defaultValue;
537
537
  if (_ === "") {
538
538
  _ = null;
@@ -594,7 +594,7 @@ export class PropertyExt extends Class {
594
594
  throw new Error(id + " is already published.");
595
595
  }
596
596
  this[__meta_ + id] = new MetaProxy(id, proxy, method, defaultValue);
597
- this[id] = function (_) {
597
+ this[id] = function (_?) {
598
598
  if (!arguments.length) return defaultValue === undefined || this[id + "_modified"]() ? this[proxy][method]() : defaultValue;
599
599
  if (defaultValue !== undefined && _ === defaultValue) {
600
600
  this[proxy][method + "_reset"]();
@@ -612,7 +612,7 @@ export class PropertyExt extends Class {
612
612
  this[id + "_exists"] = function () {
613
613
  return this[proxy][method + "_exists"]();
614
614
  };
615
- this[id + "_default"] = function (_) {
615
+ this[id + "_default"] = function (_?) {
616
616
  if (!arguments.length) return this[proxy][method + "_default"]();
617
617
  this[proxy][method + "_default"](_);
618
618
  return this;
@@ -768,26 +768,3 @@ export class PropertyExt extends Class {
768
768
  }
769
769
  }
770
770
  PropertyExt.prototype._class += " common_PropertyExt";
771
-
772
- export function publish(defaultValue, type?: PublishTypes, description?: string, set?: string[] | (() => string[] | Array<{ value: string, text: string }>) | IPublishExt, ext: IPublishExt = {}) {
773
- return function (target: any, key: string) {
774
- if (!key) throw new Error("???");
775
- if (ext.reset) {
776
- target.publishReset();
777
- }
778
- target.publish(key, defaultValue, type, description, set, ext);
779
- };
780
- }
781
- export type publish<T, U> = {
782
- (_: U): T;
783
- (): U;
784
- };
785
-
786
- export function publishProxy(proxy: string, method?: string, defaultValue?, ext: { reset?: boolean } = {}) {
787
- return function (target: any, key: string) {
788
- if (ext.reset) {
789
- target.publishReset();
790
- }
791
- target.publishProxy(key, proxy, method, defaultValue);
792
- };
793
- }
@@ -1,7 +1,7 @@
1
1
  import { dispatch as d3Dispatch } from "d3-dispatch";
2
2
  import { drag as d3Drag } from "d3-drag";
3
3
  import { event as d3Event, select as d3Select } from "d3-selection";
4
- import { Surface } from "./Surface";
4
+ import { Surface } from "./Surface.ts";
5
5
 
6
6
  import "../src/ResizeSurface.css";
7
7
 
@@ -214,8 +214,12 @@ export class ResizeSurface extends Surface {
214
214
  })
215
215
  ;
216
216
  }
217
- allowResize: { (): boolean; (_: boolean): ResizeSurface; };
218
217
  }
219
218
  ResizeSurface.prototype._class += " common_ResizeSurface";
220
219
 
220
+ export interface ResizeSurface {
221
+ allowResize(): boolean;
222
+ allowResize(_: boolean): this;
223
+ }
224
+
221
225
  ResizeSurface.prototype.publish("allowResize", true, "boolean", "Sets if surface can be resized", null, { tags: ["Private", "Shared"] });
package/src/SVGWidget.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { rgb as d3Rgb } from "d3-color";
2
2
  import { select as d3Select } from "d3-selection";
3
- import { fontAwsesomeStyle } from "./FAChar";
4
- import { svgMarkerGlitch } from "./Platform";
5
- import { Transition } from "./Transition";
6
- import { debounce, downloadBlob, downloadString, timestamp } from "./Utility";
7
- import { ISize, Widget } from "./Widget";
3
+ import { fontAwsesomeStyle } from "./FAChar.ts";
4
+ import { svgMarkerGlitch } from "./Platform.ts";
5
+ import { Transition } from "./Transition.ts";
6
+ import { debounce, downloadBlob, downloadString, timestamp } from "./Utility.ts";
7
+ import { ISize, Widget } from "./Widget.ts";
8
8
 
9
9
  type Point = { x: number, y: number };
10
10
  type Rect = { x: number, y: number, width: number, height: number };
@@ -144,8 +144,6 @@ export class SVGGlowFilter {
144
144
  export class SVGWidget extends Widget {
145
145
  static _class = "common_SVGWidget";
146
146
 
147
- _tag;
148
-
149
147
  protected _boundingBox;
150
148
  protected transition;
151
149
  protected _drawStartPos: "center" | "origin";
@@ -166,7 +164,7 @@ export class SVGWidget extends Widget {
166
164
  }
167
165
 
168
166
  // Properties ---
169
- move(_, transitionDuration?) {
167
+ move(_?, transitionDuration?) {
170
168
  const retVal = this.pos(_);
171
169
  if (arguments.length) {
172
170
  (transitionDuration ? this._element.transition().duration(transitionDuration) : this._element)
@@ -1,8 +1,8 @@
1
1
  import { event as d3Event, mouse as d3Mouse } from "d3-selection";
2
2
  import { zoom as d3Zoom, zoomIdentity as d3ZoomIdentity } from "d3-zoom";
3
- import { SVGWidget } from "./SVGWidget";
4
- import { safeRaise } from "./Utility";
5
- import { Button, IconBar, Spacer, ToggleButton } from "./TitleBar";
3
+ import { SVGWidget } from "./SVGWidget.ts";
4
+ import { safeRaise } from "./Utility.ts";
5
+ import { Button, IconBar, Spacer, ToggleButton } from "./TitleBar.ts";
6
6
 
7
7
  import "../src/SVGZoomWidget.css";
8
8
 
@@ -329,6 +329,7 @@ export class SVGZoomWidget extends SVGWidget {
329
329
  .attr("class", "zoomBackground")
330
330
  .attr("width", this.width())
331
331
  .attr("height", this.height())
332
+ .style("fill", "transparent")
332
333
  .on("mousedown", () => {
333
334
  if (d3Event.shiftKey && this.mouseMode() === "zoom") {
334
335
  d3Event.stopPropagation();
package/src/Shape.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { select as d3Select } from "d3-selection";
2
- import { SVGWidget } from "./SVGWidget";
2
+ import { SVGWidget } from "./SVGWidget.ts";
3
3
 
4
4
  import "../src/Shape.css";
5
5
 
package/src/Surface.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { select as d3Select } from "d3-selection";
2
2
  import "d3-transition";
3
- import { Icon } from "./Icon";
4
- import { Menu } from "./Menu";
5
- import { Shape } from "./Shape";
6
- import { SVGWidget } from "./SVGWidget";
7
- import { Text } from "./Text";
3
+ import { Icon } from "./Icon.ts";
4
+ import { Menu } from "./Menu.ts";
5
+ import { Shape } from "./Shape.ts";
6
+ import { SVGWidget } from "./SVGWidget.ts";
7
+ import { Text } from "./Text.ts";
8
8
 
9
9
  import "../src/Surface.css";
10
10
 
@@ -296,21 +296,36 @@ export class Surface extends SVGWidget {
296
296
  click(d) {
297
297
  }
298
298
 
299
- showTitle: { (): boolean; (_: boolean): Surface; };
300
- title: { (): string; (_: string): Surface; };
301
- titleFontSize: { (): string; (_: string): Surface; };
302
- showIcon: { (): boolean; (_: boolean): Surface; };
303
- icon_faChar: { (): string; (_: string): Surface; };
304
- icon_shape: { (): string; (_: string): Surface; };
305
- content: { (): any; (_: any): Surface; };
306
- buttonAnnotations: { (): any[]; (_: any[]): Surface; };
307
- buttonGutter: { (): number; (_: number): Surface; };
308
- showContent: { (): boolean; (_: boolean): Surface; };
309
- menu: { (): any[]; (_: any[]): Surface; };
310
- menuPadding: { (): number; (_: number): Surface; };
311
299
  }
312
300
  Surface.prototype._class += " common_Surface";
313
301
 
302
+ export interface Surface {
303
+ showTitle(): boolean;
304
+ showTitle(_: boolean): this;
305
+ title(): string;
306
+ title(_: string): this;
307
+ titleFontSize(): string;
308
+ titleFontSize(_: string): this;
309
+ showIcon(): boolean;
310
+ showIcon(_: boolean): this;
311
+ icon_faChar(): string;
312
+ icon_faChar(_: string): this;
313
+ icon_shape(): string;
314
+ icon_shape(_: string): this;
315
+ content(): any;
316
+ content(_: any): this;
317
+ buttonAnnotations(): any[];
318
+ buttonAnnotations(_: any[]): this;
319
+ buttonGutter(): number;
320
+ buttonGutter(_: number): this;
321
+ showContent(): boolean;
322
+ showContent(_: boolean): this;
323
+ menu(): any[];
324
+ menu(_: any[]): this;
325
+ menuPadding(): number;
326
+ menuPadding(_: number): this;
327
+ }
328
+
314
329
  Surface.prototype.publish("showTitle", true, "boolean", "Show Title", null, { tags: ["Basic"] });
315
330
  Surface.prototype.publish("title", "", "string", "Title", null, { tags: ["Basic"] });
316
331
  Surface.prototype.publishProxy("titleFontSize", "_textWidget", "fontSize");
package/src/Text.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SVGWidget } from "./SVGWidget";
1
+ import { SVGWidget } from "./SVGWidget.ts";
2
2
 
3
3
  import "../src/Text.css";
4
4
 
package/src/TextBox.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { textColor } from "./Palette";
2
- import { Shape } from "./Shape";
3
- import { SVGWidget } from "./SVGWidget";
4
- import { Text } from "./Text";
5
- import { ISize } from "./Widget";
1
+ import { textColor } from "./Palette.ts";
2
+ import { Shape } from "./Shape.ts";
3
+ import { SVGWidget } from "./SVGWidget.ts";
4
+ import { Text } from "./Text.ts";
5
+ import { ISize } from "./Widget.ts";
6
6
 
7
7
  import "../src/TextBox.css";
8
8
 
@@ -135,23 +135,38 @@ export class TextBox extends SVGWidget {
135
135
 
136
136
  dblclick() {
137
137
  }
138
-
139
- text: { (): string; (_: string): TextBox; };
140
- fontSize: { (): number; (_: number): TextBox; };
141
- shape_colorFill: { (): string; (_: string): TextBox; };
142
- shape_colorStroke: { (): string; (_: string): TextBox; };
143
- text_colorFill: { (): string; (_: string): TextBox; };
144
- text_fontFamily: { (): string; (_: string): TextBox; };
145
- paddingLeft: { (): number; (_: number): TextBox; };
146
- paddingRight: { (): number; (_: number): TextBox; };
147
- paddingTop: { (): number; (_: number): TextBox; };
148
- paddingBottom: { (): number; (_: number): TextBox; };
149
- anchor: { (): "start" | "middle" | "end"; (_: "start" | "middle" | "end"): TextBox; };
150
- fixedSize: { (): ISize; (_: ISize): TextBox; };
151
- tooltip: { (): string; (_: string): TextBox; };
152
138
  }
153
139
  TextBox.prototype._class += " common_TextBox";
154
140
 
141
+ export interface TextBox {
142
+ text(): string;
143
+ text(_: string): this;
144
+ fontSize(): number;
145
+ fontSize(_: number): this;
146
+ shape_colorFill(): string;
147
+ shape_colorFill(_: string): this;
148
+ shape_colorStroke(): string;
149
+ shape_colorStroke(_: string): this;
150
+ text_colorFill(): string;
151
+ text_colorFill(_: string): this;
152
+ text_fontFamily(): string;
153
+ text_fontFamily(_: string): this;
154
+ paddingLeft(): number;
155
+ paddingLeft(_: number): this;
156
+ paddingRight(): number;
157
+ paddingRight(_: number): this;
158
+ paddingTop(): number;
159
+ paddingTop(_: number): this;
160
+ paddingBottom(): number;
161
+ paddingBottom(_: number): this;
162
+ anchor(): "start" | "middle" | "end";
163
+ anchor(_: "start" | "middle" | "end"): this;
164
+ fixedSize(): ISize;
165
+ fixedSize(_: ISize): this;
166
+ tooltip(): string;
167
+ tooltip(_: string): this;
168
+ }
169
+
155
170
  TextBox.prototype.publishProxy("text", "_text");
156
171
  TextBox.prototype.publishProxy("fontSize", "_text", "fontSize");
157
172
  TextBox.prototype.publishProxy("shape_colorStroke", "_shape", "colorStroke");
package/src/TitleBar.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { event as d3Event } from "d3-selection";
2
- import { HTMLWidget } from "./HTMLWidget";
3
- import { fa5Class } from "./Utility";
4
- import { Widget } from "./Widget";
2
+ import { HTMLWidget } from "./HTMLWidget.ts";
3
+ import { fa5Class } from "./Utility.ts";
4
+ import { Widget } from "./Widget.ts";
5
5
 
6
6
  import "../src/TitleBar.css";
7
7
 
package/src/Transition.ts CHANGED
@@ -14,19 +14,19 @@ export class Transition {
14
14
  this._ease = d3CubicInOut;
15
15
  }
16
16
 
17
- duration(_) {
17
+ duration(_?) {
18
18
  if (!arguments.length) return this._duration;
19
19
  this._duration = _;
20
20
  return this._widget;
21
21
  }
22
22
 
23
- delay(_) {
23
+ delay(_?) {
24
24
  if (!arguments.length) return this._delay;
25
25
  this._delay = _;
26
26
  return this._widget;
27
27
  }
28
28
 
29
- ease(_) {
29
+ ease(_?) {
30
30
  if (!arguments.length) return this._ease;
31
31
  this._ease = _;
32
32
  return this._widget;
package/src/Utility.ts CHANGED
@@ -158,7 +158,7 @@ export class SimpleSelection extends SelectionBase {
158
158
  }
159
159
 
160
160
  _skipBringToTop;
161
- skipBringToTop(_) {
161
+ skipBringToTop(_?) {
162
162
  if (!arguments.length) return this._skipBringToTop;
163
163
  this._skipBringToTop = _;
164
164
  return this;
@@ -220,7 +220,7 @@ export class SimpleSelection extends SelectionBase {
220
220
  selected(domNode) {
221
221
  return d3Select(domNode).classed("selected");
222
222
  }
223
- selection(_) {
223
+ selection(_?) {
224
224
  if (!arguments.length) {
225
225
  return this.selection2().map(row => JSON.stringify(row));
226
226
  }
@@ -418,7 +418,7 @@ export function templateFields(tpl: string): string[] {
418
418
  return retVal;
419
419
  }
420
420
 
421
- export function template(tpl: string, _args) {
421
+ export function template(tpl?: string, _args?) {
422
422
  if (!tpl) return "";
423
423
  let args;
424
424
 
package/src/Widget.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  import { select as d3Select } from "d3-selection";
2
2
  import "d3-transition";
3
- import { Field, Grid } from "./Database";
4
- import { } from "./Platform";
5
- import { PropertyExt } from "./PropertyExt";
6
- import { debounce, textRect, TextRect, textSize, TextSize } from "./Utility";
3
+ import { Field, Grid } from "./Database.ts";
4
+ import { } from "./Platform.ts";
5
+ import { PropertyExt } from "./PropertyExt.ts";
6
+ import { debounce, textRect, TextRect, textSize, TextSize } from "./Utility.ts";
7
7
 
8
8
  import "../src/Widget.css";
9
9
 
10
+ export { Field };
11
+
10
12
  export type IPrimative = boolean | number | string | object;
11
13
  export type IFieldType = "boolean" | "number" | "string" | "dataset" | "object" | "any";
12
14
  export interface InputField {
@@ -44,7 +46,7 @@ export interface DataMetaT {
44
46
 
45
47
  let widgetID = 0;
46
48
  export abstract class Widget extends PropertyExt {
47
- _idSeed: string;
49
+ static _idSeed: string;
48
50
 
49
51
  protected _tag: string;
50
52
  protected _isRootNode: boolean = true;
@@ -70,8 +72,7 @@ export abstract class Widget extends PropertyExt {
70
72
 
71
73
  constructor() {
72
74
  super();
73
- this._class = Object.getPrototypeOf(this)._class;
74
- this._id = this._idSeed + widgetID++;
75
+ this._id = Widget._idSeed + widgetID++;
75
76
 
76
77
  this._db = new Grid();
77
78
  this._pos = { x: 0, y: 0 };
@@ -313,8 +314,8 @@ export abstract class Widget extends PropertyExt {
313
314
  }
314
315
 
315
316
  scale(): number;
316
- scale(_): Widget;
317
- scale(_?): number | Widget {
317
+ scale(_): this;
318
+ scale(_?): number | this {
318
319
  if (!arguments.length) return this._widgetScale;
319
320
  this._widgetScale = _;
320
321
  if (this._overlayElement) {
@@ -714,7 +715,7 @@ export interface Widget {
714
715
  classed(_: { [classID: string]: boolean }): this;
715
716
  }
716
717
 
717
- Widget.prototype._idSeed = "_w";
718
+ Widget._idSeed = "_w";
718
719
 
719
720
  Widget.prototype.publishProxy("fields", "_db", "fields");
720
721
  Widget.prototype.publish("classed", {}, "object", "HTML Classes", null, { tags: ["Private"] });
@@ -1,13 +1,15 @@
1
- import { publish } from "./PropertyExt";
2
- import { Widget } from "./Widget";
1
+ import { Widget } from "./Widget.ts";
3
2
 
4
3
  export class WidgetArray extends Widget {
5
4
 
6
- @publish([], "widgetArray", "Widget Array")
7
- content: publish<this, Widget[]>;
8
-
9
5
  constructor() {
10
6
  super();
11
7
  }
12
8
  }
13
9
  WidgetArray.prototype._class += " common_WidgetArray";
10
+
11
+ export interface WidgetArray {
12
+ content(): Widget[];
13
+ content(_: Widget[]): this;
14
+ }
15
+ WidgetArray.prototype.publish("content", [], "widgetArray", "Widget Array");
@@ -1,3 +1,3 @@
1
1
  export const PKG_NAME = "@hpcc-js/common";
2
- export const PKG_VERSION = "2.73.0";
3
- export const BUILD_VERSION = "2.107.0";
2
+ export const PKG_VERSION = "3.2.0";
3
+ export const BUILD_VERSION = "3.2.0";
package/src/index.ts CHANGED
@@ -1,39 +1,39 @@
1
- export * from "./__package__";
2
- export * from "./CanvasWidget";
3
- export * from "./Class";
4
- import * as Database from "./Database";
1
+ export * from "./__package__.ts";
2
+ export * from "./CanvasWidget.ts";
3
+ export * from "./Class.ts";
4
+ import * as Database from "./Database.ts";
5
5
  export { Database };
6
- export * from "./Entity";
7
- export * from "./EntityCard";
8
- export * from "./EntityPin";
9
- export * from "./EntityRect";
10
- export * from "./EntityVertex";
11
- export * from "./FAChar";
12
- export * from "./HTMLWidget";
13
- export * from "./Icon";
14
- export * from "./IList";
15
- export * from "./Image";
16
- export * from "./IMenu";
17
- export * from "./List";
18
- export * from "./Menu";
19
- import * as Palette from "./Palette";
6
+ export * from "./Entity.ts";
7
+ export * from "./EntityCard.ts";
8
+ export * from "./EntityPin.ts";
9
+ export * from "./EntityRect.ts";
10
+ export * from "./EntityVertex.ts";
11
+ export * from "./FAChar.ts";
12
+ export * from "./HTMLWidget.ts";
13
+ export * from "./Icon.ts";
14
+ export * from "./IList.ts";
15
+ export * from "./Image.ts";
16
+ export * from "./IMenu.ts";
17
+ export * from "./List.ts";
18
+ export * from "./Menu.ts";
19
+ import * as Palette from "./Palette.ts";
20
20
  export { Palette };
21
- import * as Platform from "./Platform";
21
+ import * as Platform from "./Platform.ts";
22
22
  export { Platform };
23
- export * from "./ProgressBar";
24
- export * from "./PropertyExt";
25
- export * from "./ResizeSurface";
26
- export * from "./Shape";
27
- export * from "./Surface";
28
- export * from "./SVGWidget";
29
- export * from "./SVGZoomWidget";
30
- export * from "./Text";
31
- export * from "./TextBox";
32
- export * from "./TitleBar";
33
- import * as Utility from "./Utility";
23
+ export * from "./ProgressBar.ts";
24
+ export * from "./PropertyExt.ts";
25
+ export * from "./ResizeSurface.ts";
26
+ export * from "./Shape.ts";
27
+ export * from "./Surface.ts";
28
+ export * from "./SVGWidget.ts";
29
+ export * from "./SVGZoomWidget.ts";
30
+ export * from "./Text.ts";
31
+ export * from "./TextBox.ts";
32
+ export * from "./TitleBar.ts";
33
+ import * as Utility from "./Utility.ts";
34
34
  export { Utility };
35
- export * from "./Widget";
36
- export * from "./WidgetArray";
35
+ export * from "./Widget.ts";
36
+ export * from "./WidgetArray.ts";
37
37
 
38
38
  export * from "d3-array";
39
39
  export * from "d3-brush";
@@ -1,4 +1,4 @@
1
- import { HTMLWidget } from "./HTMLWidget";
1
+ import { HTMLWidget } from "./HTMLWidget.ts";
2
2
  export declare class CanvasWidget extends HTMLWidget {
3
3
  _ctx: CanvasRenderingContext2D;
4
4
  constructor();
@@ -6,4 +6,3 @@ export declare class CanvasWidget extends HTMLWidget {
6
6
  resetContext(): void;
7
7
  click(d: any, c: any): void;
8
8
  }
9
- //# sourceMappingURL=CanvasWidget.d.ts.map
package/types/Class.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { ClassMeta } from "@hpcc-js/util";
2
2
  export declare class Class {
3
+ static _class: string;
3
4
  _class: string;
5
+ constructor();
4
6
  class(): string;
5
7
  class(_: string): this;
6
8
  classID(): string;
@@ -10,4 +12,3 @@ export declare class Class {
10
12
  overrideMethod<M extends keyof this>(methodID: M, newMethod: this[M]): this;
11
13
  cssTag(id: string): string;
12
14
  }
13
- //# sourceMappingURL=Class.d.ts.map
@@ -1,4 +1,4 @@
1
- import { PropertyExt } from "./PropertyExt";
1
+ import { PropertyExt } from "./PropertyExt.ts";
2
2
  export interface INestedColumn {
3
3
  label: string;
4
4
  columns: Array<string | INestedColumn>;
@@ -22,26 +22,18 @@ export declare class Field extends PropertyExt {
22
22
  formatter(format: any): any;
23
23
  children(): Field[];
24
24
  children(_: Array<string | INestedColumn | Field>, asDefault?: boolean): this;
25
- label_default: {
26
- (): string;
27
- (x: string): Field;
28
- };
29
- label: {
30
- (): string;
31
- (x: string): Field;
32
- };
33
- mask: {
34
- (): string;
35
- (x: string): Field;
36
- };
37
- format: {
38
- (): string;
39
- (x: string): Field;
40
- };
41
25
  }
42
26
  export interface Field {
27
+ label(): string;
28
+ label(_: string): this;
29
+ label_default(): string;
30
+ label_default(_: string): this;
43
31
  type(): FieldType;
44
32
  type(_: FieldType): this;
33
+ mask(): string;
34
+ mask(_: string): this;
35
+ format(): string;
36
+ format(_: string): this;
45
37
  }
46
38
  export declare class Grid extends PropertyExt {
47
39
  _dataChecksum: boolean;
@@ -134,4 +126,3 @@ export declare class RollupView extends LegacyView {
134
126
  _walkData(entries: any, prevRow?: any[]): any[];
135
127
  data(opts: any): any[];
136
128
  }
137
- //# sourceMappingURL=Database.d.ts.map
package/types/Entity.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { Icon } from "./Icon";
2
- import { Shape } from "./Shape";
3
- import { SVGWidget } from "./SVGWidget";
4
- import { Text } from "./Text";
5
- import { BBox, Widget } from "./Widget";
1
+ import { Icon } from "./Icon.ts";
2
+ import { Shape } from "./Shape.ts";
3
+ import { SVGWidget } from "./SVGWidget.ts";
4
+ import { Text } from "./Text.ts";
5
+ import { BBox, Widget } from "./Widget.ts";
6
6
  export interface IAnnotation {
7
7
  faChar: string;
8
8
  tooltip?: string;
@@ -86,4 +86,3 @@ export interface Entity {
86
86
  backgroundColorStroke(): string;
87
87
  backgroundColorStroke(_: string): this;
88
88
  }
89
- //# sourceMappingURL=Entity.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Entity } from "./Entity";
1
+ import { Entity } from "./Entity.ts";
2
2
  export declare class EntityCard extends Entity {
3
3
  protected _element_textbox: any;
4
4
  constructor();
@@ -11,4 +11,3 @@ export interface EntityCard {
11
11
  fixedHeight(): number;
12
12
  fixedHeight(_: number): this;
13
13
  }
14
- //# sourceMappingURL=EntityCard.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Entity } from "./Entity";
1
+ import { Entity } from "./Entity.ts";
2
2
  export declare class EntityPin extends Entity {
3
3
  protected _element_textbox: any;
4
4
  constructor();
@@ -20,4 +20,3 @@ export interface EntityPin {
20
20
  annotationOnlyShowOnHover(): boolean;
21
21
  annotationOnlyShowOnHover(_: boolean): this;
22
22
  }
23
- //# sourceMappingURL=EntityPin.d.ts.map