@limetech/lime-elements 33.14.0-next.16 → 33.14.0-next.17

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.
@@ -19,6 +19,9 @@ let Config = class {
19
19
  * Copy any config settings to the global config object
20
20
  */
21
21
  setGlobalConfig() {
22
+ if (!this.config) {
23
+ return;
24
+ }
22
25
  Object.keys(this.config).forEach((key) => {
23
26
  config.config[key] = this.config[key];
24
27
  });
@@ -38,7 +38,7 @@ class ListRenderer {
38
38
  * Returns `undefined` if no item should have the attribute set.
39
39
  * See https://github.com/material-components/material-components-web/tree/e66a43a75fef4f9179e24856649518e15e279a04/packages/mdc-list#accessibility
40
40
  *
41
- * @param {Array<ListItem | ListSeparator | MenuItems>} items the items of the list, including any `ListSeparator`:s
41
+ * @param {Array<ListItem | ListSeparator>} items the items of the list, including any `ListSeparator`:s
42
42
  * @returns {number} the index as per the description
43
43
  */
44
44
  this.getIndexForWhichToApplyTabIndex = (items) => {
@@ -63,7 +63,7 @@ class ListRenderer {
63
63
  /**
64
64
  * Render a single list item
65
65
  *
66
- * @param {ListItem | ListSeparator | MenuItems} item the item to render
66
+ * @param {ListItem | ListSeparator} item the item to render
67
67
  * @param {number} index the index the item had in the `items` array
68
68
  * @returns {HTMLElement} the list item
69
69
  */
@@ -92,7 +92,7 @@ class ListRenderer {
92
92
  /**
93
93
  * Render the text of the list item
94
94
  *
95
- * @param {ListItem | MenuItem} item the list item
95
+ * @param {ListItem} item the list item
96
96
  * @returns {HTMLElement | string} the text for the list item
97
97
  */
98
98
  this.renderText = (item) => {
@@ -101,20 +101,10 @@ class ListRenderer {
101
101
  }
102
102
  return (index.h("div", { class: "mdc-deprecated-list-item__text" },
103
103
  index.h("div", { class: "mdc-deprecated-list-item__primary-command-text" },
104
- index.h("div", { class: "mdc-deprecated-list-item__primary-text" }, item.text),
105
- this.renderCommandText(item)),
104
+ index.h("div", { class: "mdc-deprecated-list-item__primary-text" }, item.text)),
106
105
  index.h("div", { class: "mdc-deprecated-list-item__secondary-text" }, item.secondaryText)));
107
106
  };
108
- this.renderCommandText = (item) => {
109
- if (!('commandText' in item)) {
110
- return;
111
- }
112
- return (index.h("div", { class: "mdc-deprecated-list-item__command-text" }, item.commandText));
113
- };
114
107
  this.isSimpleItem = (item) => {
115
- if ('commandText' in item) {
116
- return false;
117
- }
118
108
  if ('secondaryText' in item) {
119
109
  return false;
120
110
  }
@@ -195,9 +185,6 @@ class ListRenderer {
195
185
  this.twoLines = items.some((item) => {
196
186
  return 'secondaryText' in item && !!item.secondaryText;
197
187
  });
198
- this.commandKey = items.some((item) => {
199
- return 'commandText' in item && !!item.commandText;
200
- });
201
188
  this.hasIcons = items.some((item) => {
202
189
  return 'icon' in item && !!item.icon;
203
190
  });