jsl-ui 9.19.2 → 9.19.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.
@@ -72,9 +72,13 @@ var CheckBoxComponent = /** @class */ (function () {
72
72
  return ((_a = this.currentDom) === null || _a === void 0 ? void 0 : _a.checked) || false;
73
73
  };
74
74
  CheckBoxComponent.prototype.setValue = function (val) {
75
+ var _a;
75
76
  if (this.currentDom != null) {
76
77
  this.currentDom.checked = val;
77
78
  }
79
+ if (this.options.bindTo && this.options.bindMode !== "fromModel" && this.options.property) {
80
+ this.options.bindTo[this.options.property] = ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(val) : val;
81
+ }
78
82
  };
79
83
  CheckBoxComponent.prototype.onCreate = function (node) {
80
84
  this.currentDom = node.dom.querySelector("input");
@@ -250,6 +250,7 @@ var SelectComponent = /** @class */ (function () {
250
250
  };
251
251
  SelectComponent.prototype.setValue = function (value) {
252
252
  var _this = this;
253
+ var _a;
253
254
  if (value != null) {
254
255
  if (this.options.multiple) {
255
256
  this.selected = this.options.data.filter(function (x) { return value.indexOf(x[_this.options.keyColumn]) >= 0; });
@@ -261,6 +262,9 @@ var SelectComponent = /** @class */ (function () {
261
262
  else {
262
263
  this.selected = this.options.multiple ? [] : null;
263
264
  }
265
+ if (this.options.bindTo && this.options.bindMode !== "fromModel" && this.options.property) {
266
+ this.options.bindTo[this.options.property] = ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
267
+ }
264
268
  if (this.renderer != null) {
265
269
  this.renderer.refresh();
266
270
  }
@@ -9,4 +9,5 @@ export declare abstract class helper {
9
9
  static getParams(): any;
10
10
  static isCyclic(o: any): boolean;
11
11
  static correctDates(data: any): any;
12
+ static isTouchScreen(): boolean;
12
13
  }
@@ -69,6 +69,9 @@ var helper = /** @class */ (function () {
69
69
  }
70
70
  return data;
71
71
  };
72
+ helper.isTouchScreen = function () {
73
+ return ("ontouchstart" in window) || (navigator.msMaxTouchPoints > 0);
74
+ };
72
75
  helper.emptyGuid = "00000000-0000-0000-0000-000000000000";
73
76
  return helper;
74
77
  }());
@@ -11,6 +11,7 @@ import { ExcelFilter } from "./filterDialogs/excelFilter";
11
11
  import { UILang } from "../core/lang";
12
12
  import { RowMoveManager } from "./plugins/slick.rowmovemanager";
13
13
  import { Overlays } from "./plugins/ext.overlay";
14
+ import { helper } from "../core/helper";
14
15
  var $ = jQueryReplacement;
15
16
  export function createJSLGrid(selector, data, columns, option) {
16
17
  var formulaObjects = [];
@@ -107,7 +108,8 @@ export function createJSLGrid(selector, data, columns, option) {
107
108
  grid.render();
108
109
  });
109
110
  }
110
- if (option.enableFillDown) {
111
+ var isTouch = helper.isTouchScreen();
112
+ if (option.enableFillDown && !isTouch) {
111
113
  var overlayPlugin = new Overlays({});
112
114
  // Event fires when a range is selected
113
115
  overlayPlugin.onFillUpDown.subscribe(function (e, args) {
@@ -14,6 +14,7 @@ import "./slick.grid.css";
14
14
  import "./slick-default-theme.css";
15
15
  import { Resizable } from "../interaction/resizable";
16
16
  import { EventHandler } from "../interaction/eventhandler";
17
+ import { helper } from "../core";
17
18
  var $ = Slick.$;
18
19
  $.deepExtend(Slick, { Grid: SlickGrid });
19
20
  // shared across all grids on the page
@@ -261,7 +262,7 @@ export function SlickGrid(container, data, columns, options) {
261
262
  .addClass(uid)
262
263
  .addClass("slickgrid")
263
264
  .addClass("ui-widget");
264
- var isTouch = (("ontouchstart" in window) || (navigator.msMaxTouchPoints > 0));
265
+ var isTouch = helper.isTouchScreen();
265
266
  if (isTouch) {
266
267
  $container.addClass("js-touch");
267
268
  }