@websy/websy-designs 1.4.11 → 1.4.13

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.
@@ -494,11 +494,13 @@ class WebsyDatePicker {
494
494
  this.close()
495
495
  }
496
496
  else if (event.target.classList.contains('clear-selection')) {
497
+ this.currentselection = []
498
+ this.selectedRangeDates = []
497
499
  this.selectRange(0, false)
498
500
  if (this.options.onClear) {
499
501
  this.options.onClear()
500
502
  }
501
- this.updateRange(0)
503
+ // this.updateRange(0)
502
504
  }
503
505
  }
504
506
  handleKeyDown (event) {
@@ -1017,18 +1019,21 @@ class WebsyDatePicker {
1017
1019
  selectRange (index, confirm = true) {
1018
1020
  if (this.options.ranges[this.options.mode][index]) {
1019
1021
  this.selectedRangeDates = [...this.options.ranges[this.options.mode][index].range]
1020
- this.currentselection = this.options.ranges[this.options.mode][index].range.map(d => {
1021
- if (this.options.mode === 'date' || this.options.mode === 'monthyear') {
1022
- return d.getTime()
1023
- }
1024
- else {
1025
- return d
1026
- }
1027
- })
1022
+ this.currentselection = []
1023
+ // this.currentselection = this.options.ranges[this.options.mode][index].range.map(d => {
1024
+ // if (this.options.mode === 'date' || this.options.mode === 'monthyear') {
1025
+ // return d.getTime()
1026
+ // }
1027
+ // else {
1028
+ // return d
1029
+ // }
1030
+ // })
1028
1031
  this.selectedRange = +index
1029
1032
  this.highlightRange()
1030
- this.updateRange()
1031
- this.close(confirm, true)
1033
+ this.updateRange()
1034
+ if (confirm === true) {
1035
+ this.close(confirm, true)
1036
+ }
1032
1037
  }
1033
1038
  }
1034
1039
  selectCustomRange (rangeInput) {
@@ -1643,10 +1648,14 @@ class WebsyDropdown {
1643
1648
  }
1644
1649
  if (scrollEl) {
1645
1650
  scrollEl.scrollTo(0, 0)
1651
+ }
1652
+ if (maskEl) {
1653
+ maskEl.classList.remove('active')
1654
+ }
1655
+ if (contentEl) {
1656
+ contentEl.classList.remove('active')
1657
+ contentEl.classList.remove('on-top')
1646
1658
  }
1647
- maskEl.classList.remove('active')
1648
- contentEl.classList.remove('active')
1649
- contentEl.classList.remove('on-top')
1650
1659
  const searchEl = document.getElementById(`${this.elementId}_search`)
1651
1660
  if (searchEl) {
1652
1661
  if (searchEl.value.length > 0 && this.options.onCancelSearch) {
@@ -2392,8 +2401,10 @@ class WebsyLoadingDialog {
2392
2401
  }
2393
2402
  hide () {
2394
2403
  const el = document.getElementById(this.elementId)
2395
- el.classList.remove('loading')
2396
- el.innerHTML = ''
2404
+ if (el) {
2405
+ el.classList.remove('loading')
2406
+ el.innerHTML = ''
2407
+ }
2397
2408
  }
2398
2409
  render () {
2399
2410
  if (!this.elementId) {
@@ -5763,7 +5774,7 @@ class WebsyTable3 {
5763
5774
  }
5764
5775
  // console.log('rowspan', cell.rowspan)
5765
5776
  bodyHtml += `<td
5766
- class='websy-table-cell ${(cell.classes || []).join(' ')}'
5777
+ class='websy-table-cell ${sizeIndex < this.pinnedColumns ? 'pinned' : 'unpinned'} ${(cell.classes || []).join(' ')}'
5767
5778
  style='${style}'
5768
5779
  data-info='${cell.value}'
5769
5780
  colspan='${cell.colspan || 1}'
@@ -7306,7 +7317,7 @@ function getBarY (d, i) {
7306
7317
  bars
7307
7318
  .exit()
7308
7319
  .transition(this.transition)
7309
- .style('stroke-opacity', 1e-6)
7320
+ .style('fill-opacity', 1e-6)
7310
7321
  .remove()
7311
7322
 
7312
7323
  bars
@@ -7330,6 +7341,14 @@ bars
7330
7341
  return `bar bar_${series.key}`
7331
7342
  })
7332
7343
 
7344
+ }
7345
+ removebar (key) {
7346
+ /* global key d3 */
7347
+ let bars = this.barLayer.selectAll(`.bar_${key}`)
7348
+ .transition(this.transition)
7349
+ .style('fill-opacity', 1e-6)
7350
+ .remove()
7351
+
7333
7352
  }
7334
7353
  renderLabels (series, index) {
7335
7354
  /* global series index d3 WebsyDesigns */