bk-magic-vue 2.4.7 → 2.4.8-beta.3

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.
@@ -7939,6 +7939,12 @@
7939
7939
  validate: function validate(v) {
7940
7940
  return ['simplicity', 'normal'].indexOf(v) > -1;
7941
7941
  }
7942
+ },
7943
+ cellClass: {
7944
+ type: Function,
7945
+ default: function _default() {
7946
+ return '';
7947
+ }
7942
7948
  }
7943
7949
  },
7944
7950
  data: function data() {
@@ -8668,7 +8674,8 @@
8668
8674
  "time-picker-options": _vm.timePickerOptions,
8669
8675
  "shortcut-close": _vm.shortcutClose,
8670
8676
  "up-to-now": _vm.upToNow,
8671
- "allow-cross-day": _vm.allowCrossDayProp
8677
+ "allow-cross-day": _vm.allowCrossDayProp,
8678
+ "cell-class": _vm.cellClass
8672
8679
  },
8673
8680
  on: {
8674
8681
  "pick": _vm.onPick,
@@ -9853,6 +9860,12 @@
9853
9860
  focusedDate: {
9854
9861
  type: Date,
9855
9862
  required: true
9863
+ },
9864
+ cellClass: {
9865
+ type: Function,
9866
+ default: function _default() {
9867
+ return '';
9868
+ }
9856
9869
  }
9857
9870
  },
9858
9871
  computed: {
@@ -9933,9 +9946,15 @@
9933
9946
  }
9934
9947
  },
9935
9948
  methods: {
9949
+ getExternalCellClass: function getExternalCellClass(cell) {
9950
+ if (typeof this.cellClass === 'function') {
9951
+ return this.cellClass(cell);
9952
+ }
9953
+ return '';
9954
+ },
9936
9955
  getCellCls: function getCellCls(cell) {
9937
9956
  var _ref;
9938
- return ['bk-date-picker-cells-cell', (_ref = {}, _defineProperty(_ref, "bk-date-picker-cells-cell-selected", cell.selected || cell.start || cell.end), _defineProperty(_ref, "bk-date-picker-cells-cell-disabled", cell.disabled), _defineProperty(_ref, "bk-date-picker-cells-cell-today", cell.type === 'today'), _defineProperty(_ref, "bk-date-picker-cells-cell-prev-month", cell.type === 'prevMonth'), _defineProperty(_ref, "bk-date-picker-cells-cell-next-month", cell.type === 'nextMonth'), _defineProperty(_ref, "bk-date-picker-cells-cell-week-label", cell.type === 'weekLabel'), _defineProperty(_ref, "bk-date-picker-cells-cell-range", cell.range && !cell.start && !cell.end), _ref)];
9957
+ return ['bk-date-picker-cells-cell', (_ref = {}, _defineProperty(_ref, "bk-date-picker-cells-cell-selected", cell.selected || cell.start || cell.end), _defineProperty(_ref, "bk-date-picker-cells-cell-disabled", cell.disabled), _defineProperty(_ref, "bk-date-picker-cells-cell-today", cell.type === 'today'), _defineProperty(_ref, "bk-date-picker-cells-cell-prev-month", cell.type === 'prevMonth'), _defineProperty(_ref, "bk-date-picker-cells-cell-next-month", cell.type === 'nextMonth'), _defineProperty(_ref, "bk-date-picker-cells-cell-week-label", cell.type === 'weekLabel'), _defineProperty(_ref, "bk-date-picker-cells-cell-range", cell.range && !cell.start && !cell.end), _ref), this.getExternalCellClass(cell)];
9939
9958
  }
9940
9959
  }
9941
9960
  };
@@ -11288,6 +11307,12 @@
11288
11307
  upToNow: {
11289
11308
  type: Boolean,
11290
11309
  default: false
11310
+ },
11311
+ cellClass: {
11312
+ type: Function,
11313
+ default: function _default() {
11314
+ return '';
11315
+ }
11291
11316
  }
11292
11317
  },
11293
11318
  computed: {
@@ -11551,7 +11576,8 @@
11551
11576
  "value": _vm.dates,
11552
11577
  "selection-mode": _vm.selectionMode,
11553
11578
  "disabled-date": _vm.disabledDate,
11554
- "focused-date": _vm.focusedDate
11579
+ "focused-date": _vm.focusedDate,
11580
+ "cell-class": _vm.cellClass
11555
11581
  },
11556
11582
  on: {
11557
11583
  "pick": _vm.panelPickerHandlers,
@@ -12283,7 +12309,8 @@
12283
12309
  "range-state": _vm.rangeState,
12284
12310
  "disabled-date": _vm.disabledDate,
12285
12311
  "value": _vm.preSelecting.right ? [_vm.dates[_vm.dates.length - 1]] : _vm.dates,
12286
- "focused-date": _vm.focusedDate
12312
+ "focused-date": _vm.focusedDate,
12313
+ "cell-class": _vm.cellClass
12287
12314
  },
12288
12315
  on: {
12289
12316
  "change-range": _vm.handleChangeRange,
@@ -31578,9 +31605,10 @@
31578
31605
  }, this.$props, this.tippyOptions));
31579
31606
  var onShow = options.onShow;
31580
31607
  var onHide = options.onHide;
31608
+ var zIndex = typeof options.zIndex === 'number' ? options.zIndex : null;
31581
31609
  options.onShow = function (tip) {
31582
31610
  tip.set({
31583
- zIndex: _this.getLocalZIndex(_this.zIndex)
31611
+ zIndex: _this.getLocalZIndex(zIndex || _this.zIndex)
31584
31612
  });
31585
31613
  onShow && onShow(tip);
31586
31614
  _this.$emit('show');
@@ -36110,9 +36138,12 @@
36110
36138
  } else if (newPosition > 100) {
36111
36139
  newPosition = 100;
36112
36140
  }
36113
- var lengthPerStep = 100 / ((this.maxValue - this.minValue) / this.step);
36141
+ var maxValue = _parseFloat$2(this.maxValue);
36142
+ var minValue = _parseFloat$2(this.minValue);
36143
+ var step = _parseFloat$2(this.step);
36144
+ var lengthPerStep = 100 / ((maxValue - minValue) / step);
36114
36145
  var steps = Math.round(newPosition / lengthPerStep);
36115
- var value = steps * lengthPerStep * (this.maxValue - this.minValue) * 0.01 + this.minValue;
36146
+ var value = steps * lengthPerStep * (maxValue - minValue) * 0.01 + minValue;
36116
36147
  value = _parseFloat$2(value.toFixed(this.precision));
36117
36148
  this.$emit('input', value);
36118
36149
  if (!this.dragging && this.value !== this.oldValue) {
@@ -36368,13 +36399,15 @@
36368
36399
  console.warn('WARNNING:step should not be 0');
36369
36400
  return [];
36370
36401
  }
36371
- var stepCount = (this.maxValue - this.minValue) / this.step;
36372
36402
  var stepWidth = 100 * this.step / (this.maxValue - this.minValue);
36373
36403
  var result = [];
36374
- for (var i = 0; i <= stepCount; i++) {
36404
+ var minValue = _parseFloat$2(this.minValue);
36405
+ var maxValue = _parseFloat$2(this.maxValue);
36406
+ var step = _parseFloat$2(this.step);
36407
+ for (var i = minValue, j = 0; i <= maxValue; i += step, j++) {
36375
36408
  var item = {
36376
- stepWidth: i * stepWidth,
36377
- stepLabel: "".concat(i * this.step).concat(this.intervalLabelUnit)
36409
+ stepWidth: j * stepWidth,
36410
+ stepLabel: "".concat(i).concat(this.intervalLabelUnit)
36378
36411
  };
36379
36412
  result.push(item);
36380
36413
  }
@@ -40401,7 +40434,8 @@
40401
40434
  bkPopover: __vue_component__$H
40402
40435
  },
40403
40436
  props: {
40404
- column: Object
40437
+ column: Object,
40438
+ tippyOptions: Object
40405
40439
  },
40406
40440
  render: function render(h) {
40407
40441
  var popoverContent = this.column.settingContent ? this.column.settingContent(h) : '';
@@ -40410,7 +40444,8 @@
40410
40444
  "trigger": "click",
40411
40445
  "placement": "bottom-end",
40412
40446
  "theme": "light bk-table-setting-popover-content",
40413
- "distance": -2
40447
+ "distance": -2,
40448
+ "tippy-options": this.tippyOptions
40414
40449
  }
40415
40450
  }, [h("i", {
40416
40451
  "class": 'bk-table-setting-icon ' + this.column.icon
@@ -42474,7 +42509,8 @@
42474
42509
  if (fixed === 'right') {
42475
42510
  return h("bk-table-setting", {
42476
42511
  "attrs": {
42477
- "column": column
42512
+ "column": column,
42513
+ "tippyOptions": column.tippyOptions
42478
42514
  }
42479
42515
  });
42480
42516
  }
@@ -42585,7 +42621,8 @@
42585
42621
  },
42586
42622
  beforeExpandChange: Function,
42587
42623
  beforeSelectChange: Function,
42588
- beforeSelectAllChange: Function
42624
+ beforeSelectAllChange: Function,
42625
+ tippyOptions: Object
42589
42626
  },
42590
42627
  data: function data() {
42591
42628
  return {
@@ -42677,6 +42714,7 @@
42677
42714
  sortOrders: this.sortOrders,
42678
42715
  order: null,
42679
42716
  beforeExpandChange: this.beforeExpandChange,
42717
+ tippyOptions: this.tippyOptions,
42680
42718
  beforeSelectChange: createFuncWrapper(this.beforeSelectChange),
42681
42719
  beforeSelectAllChange: createFuncWrapper(this.beforeSelectAllChange)
42682
42720
  });