mithril-materialized 3.5.1 → 3.5.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.
- package/dist/index.esm.js +3 -5
- package/dist/index.js +3 -5
- package/dist/index.umd.js +3 -5
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3614,9 +3614,7 @@ const InputCheckbox = () => {
|
|
|
3614
3614
|
const OptionsList = {
|
|
3615
3615
|
view: ({ attrs: { options, layout } }) => {
|
|
3616
3616
|
const optionElements = options.map(({ component, props, key }) => m(component, Object.assign(Object.assign({}, props), { key })));
|
|
3617
|
-
return layout === 'horizontal'
|
|
3618
|
-
? m('div.grid-container', optionElements)
|
|
3619
|
-
: optionElements;
|
|
3617
|
+
return layout === 'horizontal' ? m('div.grid-container', optionElements) : optionElements;
|
|
3620
3618
|
},
|
|
3621
3619
|
};
|
|
3622
3620
|
/** A list of checkboxes */
|
|
@@ -3642,7 +3640,7 @@ const Options = () => {
|
|
|
3642
3640
|
oninit: ({ attrs }) => {
|
|
3643
3641
|
state.componentId = attrs.id || uniqueId();
|
|
3644
3642
|
},
|
|
3645
|
-
view: ({ attrs: { checkedId, label, options, description, className = 'col s12', style, disabled, checkboxClass, newRow, isMandatory, layout = 'vertical', showSelectAll = false, selectAllText = 'Select All', selectNoneText = 'Select None', onchange, }, }) => {
|
|
3643
|
+
view: ({ attrs: { checkedId, label, options = [], description, className = 'col s12', style, disabled, checkboxClass, newRow, isMandatory, layout = 'vertical', showSelectAll = false, selectAllText = 'Select All', selectNoneText = 'Select None', onchange, }, }) => {
|
|
3646
3644
|
// Derive checked IDs from props
|
|
3647
3645
|
const checkedIds = checkedId !== undefined ? (Array.isArray(checkedId) ? checkedId : [checkedId]) : [];
|
|
3648
3646
|
const isChecked = (id) => checkedIds.includes(id);
|
|
@@ -6302,7 +6300,7 @@ const Select = () => {
|
|
|
6302
6300
|
view: ({ attrs }) => {
|
|
6303
6301
|
var _a;
|
|
6304
6302
|
const controlled = isControlled(attrs);
|
|
6305
|
-
const { newRow, className = 'col s12', key, options, multiple = false, label, helperText, placeholder = '', isMandatory, iconName, style, disabled, } = attrs;
|
|
6303
|
+
const { newRow, className = 'col s12', key, options = [], multiple = false, label, helperText, placeholder = '', isMandatory, iconName, style, disabled, } = attrs;
|
|
6306
6304
|
state.isMultiple = multiple;
|
|
6307
6305
|
// Get selected IDs from props or internal state
|
|
6308
6306
|
let selectedIds;
|
package/dist/index.js
CHANGED
|
@@ -3616,9 +3616,7 @@ const InputCheckbox = () => {
|
|
|
3616
3616
|
const OptionsList = {
|
|
3617
3617
|
view: ({ attrs: { options, layout } }) => {
|
|
3618
3618
|
const optionElements = options.map(({ component, props, key }) => m(component, Object.assign(Object.assign({}, props), { key })));
|
|
3619
|
-
return layout === 'horizontal'
|
|
3620
|
-
? m('div.grid-container', optionElements)
|
|
3621
|
-
: optionElements;
|
|
3619
|
+
return layout === 'horizontal' ? m('div.grid-container', optionElements) : optionElements;
|
|
3622
3620
|
},
|
|
3623
3621
|
};
|
|
3624
3622
|
/** A list of checkboxes */
|
|
@@ -3644,7 +3642,7 @@ const Options = () => {
|
|
|
3644
3642
|
oninit: ({ attrs }) => {
|
|
3645
3643
|
state.componentId = attrs.id || uniqueId();
|
|
3646
3644
|
},
|
|
3647
|
-
view: ({ attrs: { checkedId, label, options, description, className = 'col s12', style, disabled, checkboxClass, newRow, isMandatory, layout = 'vertical', showSelectAll = false, selectAllText = 'Select All', selectNoneText = 'Select None', onchange, }, }) => {
|
|
3645
|
+
view: ({ attrs: { checkedId, label, options = [], description, className = 'col s12', style, disabled, checkboxClass, newRow, isMandatory, layout = 'vertical', showSelectAll = false, selectAllText = 'Select All', selectNoneText = 'Select None', onchange, }, }) => {
|
|
3648
3646
|
// Derive checked IDs from props
|
|
3649
3647
|
const checkedIds = checkedId !== undefined ? (Array.isArray(checkedId) ? checkedId : [checkedId]) : [];
|
|
3650
3648
|
const isChecked = (id) => checkedIds.includes(id);
|
|
@@ -6304,7 +6302,7 @@ const Select = () => {
|
|
|
6304
6302
|
view: ({ attrs }) => {
|
|
6305
6303
|
var _a;
|
|
6306
6304
|
const controlled = isControlled(attrs);
|
|
6307
|
-
const { newRow, className = 'col s12', key, options, multiple = false, label, helperText, placeholder = '', isMandatory, iconName, style, disabled, } = attrs;
|
|
6305
|
+
const { newRow, className = 'col s12', key, options = [], multiple = false, label, helperText, placeholder = '', isMandatory, iconName, style, disabled, } = attrs;
|
|
6308
6306
|
state.isMultiple = multiple;
|
|
6309
6307
|
// Get selected IDs from props or internal state
|
|
6310
6308
|
let selectedIds;
|
package/dist/index.umd.js
CHANGED
|
@@ -3618,9 +3618,7 @@
|
|
|
3618
3618
|
const OptionsList = {
|
|
3619
3619
|
view: ({ attrs: { options, layout } }) => {
|
|
3620
3620
|
const optionElements = options.map(({ component, props, key }) => m(component, Object.assign(Object.assign({}, props), { key })));
|
|
3621
|
-
return layout === 'horizontal'
|
|
3622
|
-
? m('div.grid-container', optionElements)
|
|
3623
|
-
: optionElements;
|
|
3621
|
+
return layout === 'horizontal' ? m('div.grid-container', optionElements) : optionElements;
|
|
3624
3622
|
},
|
|
3625
3623
|
};
|
|
3626
3624
|
/** A list of checkboxes */
|
|
@@ -3646,7 +3644,7 @@
|
|
|
3646
3644
|
oninit: ({ attrs }) => {
|
|
3647
3645
|
state.componentId = attrs.id || uniqueId();
|
|
3648
3646
|
},
|
|
3649
|
-
view: ({ attrs: { checkedId, label, options, description, className = 'col s12', style, disabled, checkboxClass, newRow, isMandatory, layout = 'vertical', showSelectAll = false, selectAllText = 'Select All', selectNoneText = 'Select None', onchange, }, }) => {
|
|
3647
|
+
view: ({ attrs: { checkedId, label, options = [], description, className = 'col s12', style, disabled, checkboxClass, newRow, isMandatory, layout = 'vertical', showSelectAll = false, selectAllText = 'Select All', selectNoneText = 'Select None', onchange, }, }) => {
|
|
3650
3648
|
// Derive checked IDs from props
|
|
3651
3649
|
const checkedIds = checkedId !== undefined ? (Array.isArray(checkedId) ? checkedId : [checkedId]) : [];
|
|
3652
3650
|
const isChecked = (id) => checkedIds.includes(id);
|
|
@@ -6306,7 +6304,7 @@
|
|
|
6306
6304
|
view: ({ attrs }) => {
|
|
6307
6305
|
var _a;
|
|
6308
6306
|
const controlled = isControlled(attrs);
|
|
6309
|
-
const { newRow, className = 'col s12', key, options, multiple = false, label, helperText, placeholder = '', isMandatory, iconName, style, disabled, } = attrs;
|
|
6307
|
+
const { newRow, className = 'col s12', key, options = [], multiple = false, label, helperText, placeholder = '', isMandatory, iconName, style, disabled, } = attrs;
|
|
6310
6308
|
state.isMultiple = multiple;
|
|
6311
6309
|
// Get selected IDs from props or internal state
|
|
6312
6310
|
let selectedIds;
|