saasufy-components 7.6.0 → 7.7.0

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/app-router.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { toSafeHTML, renderTemplate, debouncer } from './utils.js';
2
2
  import { SocketConsumer } from './socket.js';
3
3
 
4
- const DEFAULT_DEBOUNCE_DELAY = 100;
4
+ const DEFAULT_DEBOUNCE_DELAY = 200;
5
5
  const DEFAULT_MAX_REDIRECTS = 5;
6
6
 
7
7
  export class AppRouter extends SocketConsumer {
package/input-provider.js CHANGED
@@ -133,21 +133,21 @@ class InputProvider extends HTMLElement {
133
133
  }
134
134
  this.inputElement = document.createElement(elementType);
135
135
  if (type === 'select') {
136
- if (options) {
136
+ if (options != null) {
137
137
  let {
138
138
  fieldNames: optionNames,
139
139
  fieldValues: optionValues
140
140
  } = convertStringToFieldParams(options, true);
141
141
 
142
142
  let optionElements = optionNames
143
- .map((optionName) => {
144
- let optionValue = optionValues[optionName] || optionName;
145
- if (optionName === placeholder) {
146
- return `<option value="" selected class="select-default-option">${optionName}</option>`;
147
- }
148
- return `<option value="${optionValue}">${optionName}</option>`;
149
- })
150
- .join('');
143
+ .map((optionName) => {
144
+ let optionValue = optionValues[optionName] || optionName;
145
+ if (optionName === placeholder) {
146
+ return `<option value="" selected class="select-default-option">${optionName}</option>`;
147
+ }
148
+ return `<option value="${optionValue}">${optionName}</option>`;
149
+ })
150
+ .join('');
151
151
  this.inputElement.innerHTML = optionElements;
152
152
  }
153
153
  } else if (elementType === 'input') {
package/model-input.js CHANGED
@@ -207,13 +207,21 @@ class ModelInput extends SocketConsumer {
207
207
  let optionList = null;
208
208
  if (type === 'select') {
209
209
  if (options != null) {
210
- optionList = options.split(',');
211
- let optionElements = optionList
212
- .map((option) => {
213
- return `<option value="${option}">${option}</option>`;
210
+ let {
211
+ fieldNames: optionNames,
212
+ fieldValues: optionValues
213
+ } = convertStringToFieldParams(options, true);
214
+
215
+ let optionElements = optionNames
216
+ .map((optionName) => {
217
+ let optionValue = optionValues[optionName] || optionName;
218
+ if (optionName === placeholder) {
219
+ return `<option value="" selected class="select-default-option">${optionName}</option>`;
220
+ }
221
+ return `<option value="${optionValue}">${optionName}</option>`;
214
222
  })
215
223
  .join('');
216
- this.inputElement.innerHTML = optionElements;
224
+ this.inputElement.innerHTML = optionElements;
217
225
  }
218
226
  } else if (elementType === 'input') {
219
227
  if (inputList) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saasufy-components",
3
- "version": "7.6.0",
3
+ "version": "7.7.0",
4
4
  "description": "Components for Saasufy.",
5
5
  "main": "index.js",
6
6
  "scripts": {