@hpcc-js/layout 2.47.3 → 2.48.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.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@hpcc-js/common'), require('@hpcc-js/dgrid'), require('@hpcc-js/api')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@hpcc-js/common', '@hpcc-js/dgrid', '@hpcc-js/api'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@hpcc-js/layout"] = {}, global["@hpcc-js/common"], global["@hpcc-js/dgrid"], global["@hpcc-js/api"]));
5
- })(this, (function (exports, common, dgrid, api) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@hpcc-js/common'), require('@hpcc-js/dgrid2'), require('@hpcc-js/api')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@hpcc-js/common', '@hpcc-js/dgrid2', '@hpcc-js/api'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@hpcc-js/layout"] = {}, global["@hpcc-js/common"], global["@hpcc-js/dgrid2"], global["@hpcc-js/api"]));
5
+ })(this, (function (exports, common, dgrid2, api) { 'use strict';
6
6
 
7
7
  function _mergeNamespaces(n, m) {
8
8
  m.forEach(function (e) {
@@ -20,8 +20,8 @@
20
20
  }
21
21
 
22
22
  var PKG_NAME = "@hpcc-js/layout";
23
- var PKG_VERSION = "2.47.3";
24
- var BUILD_VERSION = "2.102.11";
23
+ var PKG_VERSION = "2.48.0";
24
+ var BUILD_VERSION = "2.103.2";
25
25
 
26
26
  /*! *****************************************************************************
27
27
  Copyright (c) Microsoft Corporation.
@@ -2941,7 +2941,7 @@
2941
2941
  _this._spacer = new common.Spacer();
2942
2942
  _this._titleBar = new common.TitleBar().buttons([_this._toggleData, _this._buttonDownload, _this._buttonDownloadImage, _this._spacer, _this._toggleLegend]);
2943
2943
  _this._carousel = new Carousel();
2944
- _this._table = new dgrid.Table();
2944
+ _this._table = new dgrid2.Table();
2945
2945
  _this._hideLegendToggleList = ["dgrid_Table"];
2946
2946
  _this._tag = "div";
2947
2947
  return _this;
@@ -3096,7 +3096,28 @@
3096
3096
  element.style("transform", "translate(0px,0px) scale(1)");
3097
3097
  };
3098
3098
  ChartPanel.prototype.update = function (domNode, element) {
3099
+ var _this = this;
3099
3100
  _super.prototype.update.call(this, domNode, element);
3101
+ if (this._table && this.widget_exists() && this.widget().class().indexOf("chart_XYAxis") >= 0) {
3102
+ var chart_1 = this.widget();
3103
+ this._table.columns().forEach(function (column, idx) {
3104
+ switch (idx === 0 ? chart_1.xAxisType() : chart_1.yAxisType()) {
3105
+ case "linear":
3106
+ case "log":
3107
+ case "pow":
3108
+ _this._table.columnType(column, "number");
3109
+ break;
3110
+ case "time":
3111
+ _this._table.columnType(column, "time");
3112
+ break;
3113
+ case "ordinal":
3114
+ default:
3115
+ _this._table.columnType(column, "string");
3116
+ }
3117
+ _this._table.columnPattern(column, idx === 0 ? chart_1.xAxisTypeTimePattern() : chart_1.yAxisTypeTimePattern());
3118
+ _this._table.columnFormat(column, idx === 0 ? chart_1.xAxisTickFormat() : chart_1.yAxisTickFormat());
3119
+ });
3120
+ }
3100
3121
  };
3101
3122
  ChartPanel.prototype.preUpdate = function (domNode, element) {
3102
3123
  _super.prototype.preUpdate.call(this, domNode, element);
@@ -3126,12 +3147,13 @@
3126
3147
  if (this._prevdataVisible !== this.dataVisible()) {
3127
3148
  this._prevdataVisible = this.dataVisible();
3128
3149
  this._toggleData.selected(this._prevdataVisible);
3150
+ this._legend.visible(this._prevlegendVisible && !this._prevdataVisible);
3129
3151
  this._carousel.active(this._prevdataVisible ? 1 : 0);
3130
3152
  }
3131
3153
  if (this._prevlegendVisible !== this.legendVisible()) {
3132
3154
  this._prevlegendVisible = this.legendVisible();
3133
3155
  this._toggleLegend.selected(this._prevlegendVisible);
3134
- this._legend.visible(this._prevlegendVisible);
3156
+ this._legend.visible(this._prevlegendVisible && !this._prevdataVisible);
3135
3157
  }
3136
3158
  this._legend.orientation(this.legendPosition() === "bottom" ? "horizontal" : "vertical");
3137
3159
  this.showLeft(!this.left());