mithril-materialized 3.4.3 → 3.4.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.
package/dist/index.esm.js CHANGED
@@ -1826,7 +1826,7 @@ const DatePicker = () => {
1826
1826
  },
1827
1827
  }, opts.day),
1828
1828
  ]);
1829
- }
1829
+ },
1830
1830
  };
1831
1831
  };
1832
1832
  const Calendar = () => {
@@ -1917,7 +1917,7 @@ const DatePicker = () => {
1917
1917
  const weekDate = new Date(yearNumber, monthNumber, dayNumber);
1918
1918
  const weekNum = getWeekNumber(weekDate, options.weekNumbering, options.firstDay);
1919
1919
  row.push(m('td.datepicker-week-number', {
1920
- title: `Week ${weekNum}`
1920
+ title: `Week ${weekNum}`,
1921
1921
  }, weekNum));
1922
1922
  }
1923
1923
  row.push(m(Day, { opts: dayConfig, options }));
@@ -1950,7 +1950,7 @@ const DatePicker = () => {
1950
1950
  class: options.showWeekNumbers ? 'with-week-numbers' : '',
1951
1951
  }, [m('thead', [m('tr', weekdayHeaders)]), m('tbody', data)]),
1952
1952
  ]);
1953
- }
1953
+ },
1954
1954
  };
1955
1955
  };
1956
1956
  const DateDisplay = () => {
@@ -2009,7 +2009,7 @@ const DatePicker = () => {
2009
2009
  m('span.date-text', `${day}, ${month} ${date}`),
2010
2010
  ]);
2011
2011
  }
2012
- }
2012
+ },
2013
2013
  };
2014
2014
  };
2015
2015
  const DateControls = () => {
@@ -2040,7 +2040,13 @@ const DatePicker = () => {
2040
2040
  e.preventDefault();
2041
2041
  prevMonth();
2042
2042
  },
2043
- }, m('svg', { fill: '#000000', height: '24', viewBox: '0 0 24 24', width: '24', xmlns: 'http://www.w3.org/2000/svg' }, [
2043
+ }, m('svg', {
2044
+ fill: '#000000',
2045
+ height: '24',
2046
+ viewBox: '0 0 24 24',
2047
+ width: '24',
2048
+ xmlns: 'http://www.w3.org/2000/svg',
2049
+ }, [
2044
2050
  m('path', { d: 'M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z' }),
2045
2051
  m('path', { d: 'M0-.5h24v24H0z', fill: 'none' }),
2046
2052
  ])),
@@ -2100,12 +2106,18 @@ const DatePicker = () => {
2100
2106
  e.preventDefault();
2101
2107
  nextMonth();
2102
2108
  },
2103
- }, m('svg', { fill: '#000000', height: '24', viewBox: '0 0 24 24', width: '24', xmlns: 'http://www.w3.org/2000/svg' }, [
2109
+ }, m('svg', {
2110
+ fill: '#000000',
2111
+ height: '24',
2112
+ viewBox: '0 0 24 24',
2113
+ width: '24',
2114
+ xmlns: 'http://www.w3.org/2000/svg',
2115
+ }, [
2104
2116
  m('path', { d: 'M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z' }),
2105
2117
  m('path', { d: 'M0-.25h24v24H0z', fill: 'none' }),
2106
2118
  ])),
2107
2119
  ]);
2108
- }
2120
+ },
2109
2121
  };
2110
2122
  };
2111
2123
  const gotoMonth = (month) => {
@@ -2148,6 +2160,7 @@ const DatePicker = () => {
2148
2160
  state.monthDropdownOpen = false;
2149
2161
  state.yearDropdownOpen = false;
2150
2162
  }
2163
+ m.redraw();
2151
2164
  };
2152
2165
  return {
2153
2166
  oninit: (vnode) => {
@@ -2624,9 +2637,7 @@ const SingleRangeSlider = {
2624
2637
  state.cleanupMouseEvents = null;
2625
2638
  }
2626
2639
  updateSingleValue(state.singleValue, false);
2627
- if (finalValueDisplay === 'auto') {
2628
- m.redraw();
2629
- }
2640
+ m.redraw();
2630
2641
  };
2631
2642
  document.addEventListener('mousemove', handleMouseMove);
2632
2643
  document.addEventListener('mouseup', handleMouseUp);
@@ -2769,9 +2780,7 @@ const DoubleRangeSlider = {
2769
2780
  state.cleanupMouseEvents = null;
2770
2781
  }
2771
2782
  updateRangeValues(state.rangeMinValue, state.rangeMaxValue, attrs, state, false);
2772
- if (finalValueDisplay === 'auto') {
2773
- m.redraw();
2774
- }
2783
+ m.redraw();
2775
2784
  };
2776
2785
  document.addEventListener('mousemove', handleMouseMove);
2777
2786
  document.addEventListener('mouseup', handleMouseUp);
@@ -4756,6 +4765,7 @@ const MaterialBox = () => {
4756
4765
  state.originalImage = null;
4757
4766
  if (attrs.onCloseEnd)
4758
4767
  attrs.onCloseEnd();
4768
+ m.redraw();
4759
4769
  }, attrs.outDuration || 200);
4760
4770
  };
4761
4771
  return {
@@ -4806,6 +4816,7 @@ const ModalPanel = () => {
4806
4816
  }
4807
4817
  // Restore body scroll
4808
4818
  document.body.style.overflow = '';
4819
+ m.redraw();
4809
4820
  };
4810
4821
  const openModal = (attrs) => {
4811
4822
  state.isOpen = true;
@@ -5186,6 +5197,7 @@ const TimePicker = () => {
5186
5197
  const y = clickPos.y - state.y0;
5187
5198
  state.moved = true;
5188
5199
  setHand(x, y, false);
5200
+ m.redraw();
5189
5201
  };
5190
5202
  const handleDocumentClickEnd = (e) => {
5191
5203
  e.preventDefault();
@@ -5213,6 +5225,7 @@ const TimePicker = () => {
5213
5225
  if (options.onSelect) {
5214
5226
  options.onSelect(state.hours, state.minutes);
5215
5227
  }
5228
+ m.redraw();
5216
5229
  };
5217
5230
  const updateTimeFromInput = (inputValue) => {
5218
5231
  let value = ((inputValue || options.defaultTime || '') + '').split(':');
@@ -5498,6 +5511,7 @@ const TimePicker = () => {
5498
5511
  value = `${value} ${state.amOrPm}`;
5499
5512
  }
5500
5513
  close();
5514
+ m.redraw();
5501
5515
  return value;
5502
5516
  };
5503
5517
  const clear = () => {
@@ -6083,6 +6097,7 @@ const Select = () => {
6083
6097
  const closeDropdown = (e) => {
6084
6098
  if (!state.isMultiple) {
6085
6099
  state.isOpen = false;
6100
+ m.redraw();
6086
6101
  return;
6087
6102
  }
6088
6103
  const target = e.target;
@@ -6092,6 +6107,7 @@ const Select = () => {
6092
6107
  if (!isClickInsideSelect && !isClickInsidePortalDropdown) {
6093
6108
  state.isOpen = false;
6094
6109
  }
6110
+ m.redraw();
6095
6111
  };
6096
6112
  const getPortalStyles = (inputRef) => {
6097
6113
  if (!inputRef)
@@ -6619,6 +6635,7 @@ const SearchSelect = () => {
6619
6635
  // Click outside, close dropdown
6620
6636
  state.isOpen = false;
6621
6637
  }
6638
+ m.redraw();
6622
6639
  };
6623
6640
  // Handle keyboard navigation
6624
6641
  const handleKeyDown = (e, filteredOptions, showAddNew) => {
@@ -7771,6 +7788,7 @@ const Sidenav = () => {
7771
7788
  const handleEscapeKey = (e, attrs) => {
7772
7789
  if (e.key === 'Escape' && attrs.closeOnEscape !== false && attrs.onToggle) {
7773
7790
  attrs.onToggle(false);
7791
+ m.redraw();
7774
7792
  }
7775
7793
  };
7776
7794
  const setBodyOverflow = (isOpen, mode) => {
package/dist/index.js CHANGED
@@ -1828,7 +1828,7 @@ const DatePicker = () => {
1828
1828
  },
1829
1829
  }, opts.day),
1830
1830
  ]);
1831
- }
1831
+ },
1832
1832
  };
1833
1833
  };
1834
1834
  const Calendar = () => {
@@ -1919,7 +1919,7 @@ const DatePicker = () => {
1919
1919
  const weekDate = new Date(yearNumber, monthNumber, dayNumber);
1920
1920
  const weekNum = getWeekNumber(weekDate, options.weekNumbering, options.firstDay);
1921
1921
  row.push(m('td.datepicker-week-number', {
1922
- title: `Week ${weekNum}`
1922
+ title: `Week ${weekNum}`,
1923
1923
  }, weekNum));
1924
1924
  }
1925
1925
  row.push(m(Day, { opts: dayConfig, options }));
@@ -1952,7 +1952,7 @@ const DatePicker = () => {
1952
1952
  class: options.showWeekNumbers ? 'with-week-numbers' : '',
1953
1953
  }, [m('thead', [m('tr', weekdayHeaders)]), m('tbody', data)]),
1954
1954
  ]);
1955
- }
1955
+ },
1956
1956
  };
1957
1957
  };
1958
1958
  const DateDisplay = () => {
@@ -2011,7 +2011,7 @@ const DatePicker = () => {
2011
2011
  m('span.date-text', `${day}, ${month} ${date}`),
2012
2012
  ]);
2013
2013
  }
2014
- }
2014
+ },
2015
2015
  };
2016
2016
  };
2017
2017
  const DateControls = () => {
@@ -2042,7 +2042,13 @@ const DatePicker = () => {
2042
2042
  e.preventDefault();
2043
2043
  prevMonth();
2044
2044
  },
2045
- }, m('svg', { fill: '#000000', height: '24', viewBox: '0 0 24 24', width: '24', xmlns: 'http://www.w3.org/2000/svg' }, [
2045
+ }, m('svg', {
2046
+ fill: '#000000',
2047
+ height: '24',
2048
+ viewBox: '0 0 24 24',
2049
+ width: '24',
2050
+ xmlns: 'http://www.w3.org/2000/svg',
2051
+ }, [
2046
2052
  m('path', { d: 'M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z' }),
2047
2053
  m('path', { d: 'M0-.5h24v24H0z', fill: 'none' }),
2048
2054
  ])),
@@ -2102,12 +2108,18 @@ const DatePicker = () => {
2102
2108
  e.preventDefault();
2103
2109
  nextMonth();
2104
2110
  },
2105
- }, m('svg', { fill: '#000000', height: '24', viewBox: '0 0 24 24', width: '24', xmlns: 'http://www.w3.org/2000/svg' }, [
2111
+ }, m('svg', {
2112
+ fill: '#000000',
2113
+ height: '24',
2114
+ viewBox: '0 0 24 24',
2115
+ width: '24',
2116
+ xmlns: 'http://www.w3.org/2000/svg',
2117
+ }, [
2106
2118
  m('path', { d: 'M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z' }),
2107
2119
  m('path', { d: 'M0-.25h24v24H0z', fill: 'none' }),
2108
2120
  ])),
2109
2121
  ]);
2110
- }
2122
+ },
2111
2123
  };
2112
2124
  };
2113
2125
  const gotoMonth = (month) => {
@@ -2150,6 +2162,7 @@ const DatePicker = () => {
2150
2162
  state.monthDropdownOpen = false;
2151
2163
  state.yearDropdownOpen = false;
2152
2164
  }
2165
+ m.redraw();
2153
2166
  };
2154
2167
  return {
2155
2168
  oninit: (vnode) => {
@@ -2626,9 +2639,7 @@ const SingleRangeSlider = {
2626
2639
  state.cleanupMouseEvents = null;
2627
2640
  }
2628
2641
  updateSingleValue(state.singleValue, false);
2629
- if (finalValueDisplay === 'auto') {
2630
- m.redraw();
2631
- }
2642
+ m.redraw();
2632
2643
  };
2633
2644
  document.addEventListener('mousemove', handleMouseMove);
2634
2645
  document.addEventListener('mouseup', handleMouseUp);
@@ -2771,9 +2782,7 @@ const DoubleRangeSlider = {
2771
2782
  state.cleanupMouseEvents = null;
2772
2783
  }
2773
2784
  updateRangeValues(state.rangeMinValue, state.rangeMaxValue, attrs, state, false);
2774
- if (finalValueDisplay === 'auto') {
2775
- m.redraw();
2776
- }
2785
+ m.redraw();
2777
2786
  };
2778
2787
  document.addEventListener('mousemove', handleMouseMove);
2779
2788
  document.addEventListener('mouseup', handleMouseUp);
@@ -4758,6 +4767,7 @@ const MaterialBox = () => {
4758
4767
  state.originalImage = null;
4759
4768
  if (attrs.onCloseEnd)
4760
4769
  attrs.onCloseEnd();
4770
+ m.redraw();
4761
4771
  }, attrs.outDuration || 200);
4762
4772
  };
4763
4773
  return {
@@ -4808,6 +4818,7 @@ const ModalPanel = () => {
4808
4818
  }
4809
4819
  // Restore body scroll
4810
4820
  document.body.style.overflow = '';
4821
+ m.redraw();
4811
4822
  };
4812
4823
  const openModal = (attrs) => {
4813
4824
  state.isOpen = true;
@@ -5188,6 +5199,7 @@ const TimePicker = () => {
5188
5199
  const y = clickPos.y - state.y0;
5189
5200
  state.moved = true;
5190
5201
  setHand(x, y, false);
5202
+ m.redraw();
5191
5203
  };
5192
5204
  const handleDocumentClickEnd = (e) => {
5193
5205
  e.preventDefault();
@@ -5215,6 +5227,7 @@ const TimePicker = () => {
5215
5227
  if (options.onSelect) {
5216
5228
  options.onSelect(state.hours, state.minutes);
5217
5229
  }
5230
+ m.redraw();
5218
5231
  };
5219
5232
  const updateTimeFromInput = (inputValue) => {
5220
5233
  let value = ((inputValue || options.defaultTime || '') + '').split(':');
@@ -5500,6 +5513,7 @@ const TimePicker = () => {
5500
5513
  value = `${value} ${state.amOrPm}`;
5501
5514
  }
5502
5515
  close();
5516
+ m.redraw();
5503
5517
  return value;
5504
5518
  };
5505
5519
  const clear = () => {
@@ -6085,6 +6099,7 @@ const Select = () => {
6085
6099
  const closeDropdown = (e) => {
6086
6100
  if (!state.isMultiple) {
6087
6101
  state.isOpen = false;
6102
+ m.redraw();
6088
6103
  return;
6089
6104
  }
6090
6105
  const target = e.target;
@@ -6094,6 +6109,7 @@ const Select = () => {
6094
6109
  if (!isClickInsideSelect && !isClickInsidePortalDropdown) {
6095
6110
  state.isOpen = false;
6096
6111
  }
6112
+ m.redraw();
6097
6113
  };
6098
6114
  const getPortalStyles = (inputRef) => {
6099
6115
  if (!inputRef)
@@ -6621,6 +6637,7 @@ const SearchSelect = () => {
6621
6637
  // Click outside, close dropdown
6622
6638
  state.isOpen = false;
6623
6639
  }
6640
+ m.redraw();
6624
6641
  };
6625
6642
  // Handle keyboard navigation
6626
6643
  const handleKeyDown = (e, filteredOptions, showAddNew) => {
@@ -7773,6 +7790,7 @@ const Sidenav = () => {
7773
7790
  const handleEscapeKey = (e, attrs) => {
7774
7791
  if (e.key === 'Escape' && attrs.closeOnEscape !== false && attrs.onToggle) {
7775
7792
  attrs.onToggle(false);
7793
+ m.redraw();
7776
7794
  }
7777
7795
  };
7778
7796
  const setBodyOverflow = (isOpen, mode) => {
package/dist/index.umd.js CHANGED
@@ -1830,7 +1830,7 @@
1830
1830
  },
1831
1831
  }, opts.day),
1832
1832
  ]);
1833
- }
1833
+ },
1834
1834
  };
1835
1835
  };
1836
1836
  const Calendar = () => {
@@ -1921,7 +1921,7 @@
1921
1921
  const weekDate = new Date(yearNumber, monthNumber, dayNumber);
1922
1922
  const weekNum = getWeekNumber(weekDate, options.weekNumbering, options.firstDay);
1923
1923
  row.push(m('td.datepicker-week-number', {
1924
- title: `Week ${weekNum}`
1924
+ title: `Week ${weekNum}`,
1925
1925
  }, weekNum));
1926
1926
  }
1927
1927
  row.push(m(Day, { opts: dayConfig, options }));
@@ -1954,7 +1954,7 @@
1954
1954
  class: options.showWeekNumbers ? 'with-week-numbers' : '',
1955
1955
  }, [m('thead', [m('tr', weekdayHeaders)]), m('tbody', data)]),
1956
1956
  ]);
1957
- }
1957
+ },
1958
1958
  };
1959
1959
  };
1960
1960
  const DateDisplay = () => {
@@ -2013,7 +2013,7 @@
2013
2013
  m('span.date-text', `${day}, ${month} ${date}`),
2014
2014
  ]);
2015
2015
  }
2016
- }
2016
+ },
2017
2017
  };
2018
2018
  };
2019
2019
  const DateControls = () => {
@@ -2044,7 +2044,13 @@
2044
2044
  e.preventDefault();
2045
2045
  prevMonth();
2046
2046
  },
2047
- }, m('svg', { fill: '#000000', height: '24', viewBox: '0 0 24 24', width: '24', xmlns: 'http://www.w3.org/2000/svg' }, [
2047
+ }, m('svg', {
2048
+ fill: '#000000',
2049
+ height: '24',
2050
+ viewBox: '0 0 24 24',
2051
+ width: '24',
2052
+ xmlns: 'http://www.w3.org/2000/svg',
2053
+ }, [
2048
2054
  m('path', { d: 'M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z' }),
2049
2055
  m('path', { d: 'M0-.5h24v24H0z', fill: 'none' }),
2050
2056
  ])),
@@ -2104,12 +2110,18 @@
2104
2110
  e.preventDefault();
2105
2111
  nextMonth();
2106
2112
  },
2107
- }, m('svg', { fill: '#000000', height: '24', viewBox: '0 0 24 24', width: '24', xmlns: 'http://www.w3.org/2000/svg' }, [
2113
+ }, m('svg', {
2114
+ fill: '#000000',
2115
+ height: '24',
2116
+ viewBox: '0 0 24 24',
2117
+ width: '24',
2118
+ xmlns: 'http://www.w3.org/2000/svg',
2119
+ }, [
2108
2120
  m('path', { d: 'M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z' }),
2109
2121
  m('path', { d: 'M0-.25h24v24H0z', fill: 'none' }),
2110
2122
  ])),
2111
2123
  ]);
2112
- }
2124
+ },
2113
2125
  };
2114
2126
  };
2115
2127
  const gotoMonth = (month) => {
@@ -2152,6 +2164,7 @@
2152
2164
  state.monthDropdownOpen = false;
2153
2165
  state.yearDropdownOpen = false;
2154
2166
  }
2167
+ m.redraw();
2155
2168
  };
2156
2169
  return {
2157
2170
  oninit: (vnode) => {
@@ -2628,9 +2641,7 @@
2628
2641
  state.cleanupMouseEvents = null;
2629
2642
  }
2630
2643
  updateSingleValue(state.singleValue, false);
2631
- if (finalValueDisplay === 'auto') {
2632
- m.redraw();
2633
- }
2644
+ m.redraw();
2634
2645
  };
2635
2646
  document.addEventListener('mousemove', handleMouseMove);
2636
2647
  document.addEventListener('mouseup', handleMouseUp);
@@ -2773,9 +2784,7 @@
2773
2784
  state.cleanupMouseEvents = null;
2774
2785
  }
2775
2786
  updateRangeValues(state.rangeMinValue, state.rangeMaxValue, attrs, state, false);
2776
- if (finalValueDisplay === 'auto') {
2777
- m.redraw();
2778
- }
2787
+ m.redraw();
2779
2788
  };
2780
2789
  document.addEventListener('mousemove', handleMouseMove);
2781
2790
  document.addEventListener('mouseup', handleMouseUp);
@@ -4760,6 +4769,7 @@
4760
4769
  state.originalImage = null;
4761
4770
  if (attrs.onCloseEnd)
4762
4771
  attrs.onCloseEnd();
4772
+ m.redraw();
4763
4773
  }, attrs.outDuration || 200);
4764
4774
  };
4765
4775
  return {
@@ -4810,6 +4820,7 @@
4810
4820
  }
4811
4821
  // Restore body scroll
4812
4822
  document.body.style.overflow = '';
4823
+ m.redraw();
4813
4824
  };
4814
4825
  const openModal = (attrs) => {
4815
4826
  state.isOpen = true;
@@ -5190,6 +5201,7 @@
5190
5201
  const y = clickPos.y - state.y0;
5191
5202
  state.moved = true;
5192
5203
  setHand(x, y, false);
5204
+ m.redraw();
5193
5205
  };
5194
5206
  const handleDocumentClickEnd = (e) => {
5195
5207
  e.preventDefault();
@@ -5217,6 +5229,7 @@
5217
5229
  if (options.onSelect) {
5218
5230
  options.onSelect(state.hours, state.minutes);
5219
5231
  }
5232
+ m.redraw();
5220
5233
  };
5221
5234
  const updateTimeFromInput = (inputValue) => {
5222
5235
  let value = ((inputValue || options.defaultTime || '') + '').split(':');
@@ -5502,6 +5515,7 @@
5502
5515
  value = `${value} ${state.amOrPm}`;
5503
5516
  }
5504
5517
  close();
5518
+ m.redraw();
5505
5519
  return value;
5506
5520
  };
5507
5521
  const clear = () => {
@@ -6087,6 +6101,7 @@
6087
6101
  const closeDropdown = (e) => {
6088
6102
  if (!state.isMultiple) {
6089
6103
  state.isOpen = false;
6104
+ m.redraw();
6090
6105
  return;
6091
6106
  }
6092
6107
  const target = e.target;
@@ -6096,6 +6111,7 @@
6096
6111
  if (!isClickInsideSelect && !isClickInsidePortalDropdown) {
6097
6112
  state.isOpen = false;
6098
6113
  }
6114
+ m.redraw();
6099
6115
  };
6100
6116
  const getPortalStyles = (inputRef) => {
6101
6117
  if (!inputRef)
@@ -6623,6 +6639,7 @@
6623
6639
  // Click outside, close dropdown
6624
6640
  state.isOpen = false;
6625
6641
  }
6642
+ m.redraw();
6626
6643
  };
6627
6644
  // Handle keyboard navigation
6628
6645
  const handleKeyDown = (e, filteredOptions, showAddNew) => {
@@ -7775,6 +7792,7 @@
7775
7792
  const handleEscapeKey = (e, attrs) => {
7776
7793
  if (e.key === 'Escape' && attrs.closeOnEscape !== false && attrs.onToggle) {
7777
7794
  attrs.onToggle(false);
7795
+ m.redraw();
7778
7796
  }
7779
7797
  };
7780
7798
  const setBodyOverflow = (isOpen, mode) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mithril-materialized",
3
- "version": "3.4.3",
3
+ "version": "3.4.4",
4
4
  "description": "A materialize library for mithril.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",