element-book 7.0.6 → 7.0.7

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.
@@ -30,8 +30,7 @@ export declare enum BookPageControlTypeEnum {
30
30
  declare const controlValueTypes: {
31
31
  checkbox: boolean;
32
32
  color: string;
33
- /** The number type here indicates which index in the options are selected. */
34
- dropdown: number;
33
+ dropdown: string;
35
34
  hidden: any;
36
35
  number: number;
37
36
  text: string;
@@ -22,8 +22,7 @@ const anySymbol = Symbol('any-type');
22
22
  const controlValueTypes = {
23
23
  [BookPageControlTypeEnum.Checkbox]: false,
24
24
  [BookPageControlTypeEnum.Color]: '',
25
- /** The number type here indicates which index in the options are selected. */
26
- [BookPageControlTypeEnum.Dropdown]: 0,
25
+ [BookPageControlTypeEnum.Dropdown]: '',
27
26
  [BookPageControlTypeEnum.Hidden]: anySymbol,
28
27
  [BookPageControlTypeEnum.Number]: 0,
29
28
  [BookPageControlTypeEnum.Text]: '',
@@ -149,9 +149,9 @@ function createControlInput(value, controlInit, valueChange) {
149
149
  valueChange(selectElement.value);
150
150
  })}
151
151
  >
152
- ${controlInit.options.map((optionLabel, optionIndex) => {
152
+ ${controlInit.options.map((optionLabel) => {
153
153
  return html `
154
- <option ?selected=${optionIndex === value} value=${optionIndex}>
154
+ <option ?selected=${optionLabel === value} value=${optionLabel}>
155
155
  ${optionLabel}
156
156
  </option>
157
157
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "element-book",
3
- "version": "7.0.6",
3
+ "version": "7.0.7",
4
4
  "keywords": [
5
5
  "book",
6
6
  "design system",