@kizmann/nano-ui 0.7.20 → 0.7.22

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizmann/nano-ui",
3
- "version": "0.7.20",
3
+ "version": "0.7.22",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "author": "Eduard Kizmann <kizmann@protonmail.ch>",
@@ -169,7 +169,6 @@ export default {
169
169
  }
170
170
 
171
171
  Dom.find(document.body).append(this.$el);
172
-
173
172
  },
174
173
 
175
174
  beforeUnmount()
@@ -220,7 +219,7 @@ export default {
220
219
 
221
220
  stopRefreshTimeout()
222
221
  {
223
- clearInterval(this.refresh);
222
+ clearTimeout(this.refresh);
224
223
 
225
224
  Dom.find(this.$el).removeClass('n-ready');
226
225
  },
@@ -233,13 +232,22 @@ export default {
233
232
 
234
233
  window.zIndex += 1;
235
234
 
236
- Dom.find(this.$el).attr('data-modal',
235
+ Dom.find(this.$el).attr('data-modal',
237
236
  window.zIndex);
238
237
 
239
- Dom.find(this.$el).css({
238
+ Dom.find(this.$el).css({
240
239
  'z-index': window.zIndex
241
240
  });
242
241
 
242
+ this.queueRefreshTimeout();
243
+ },
244
+
245
+ queueRefreshTimeout()
246
+ {
247
+ if ( ! this.tempValue ) {
248
+ return this.stopRefreshTimeout();
249
+ }
250
+
243
251
  this.refresh = setTimeout(() => {
244
252
  Dom.find(this.$el).addClass('n-ready');
245
253
  }, 100);
@@ -280,7 +288,7 @@ export default {
280
288
  return;
281
289
  }
282
290
 
283
- let extractIndex = (modal) => {
291
+ let extractIndex = (modal) => {
284
292
  return Dom.find(modal).attr('data-modal');
285
293
  };
286
294
 
@@ -403,6 +411,10 @@ export default {
403
411
  'n-modal--' + this.position
404
412
  ];
405
413
 
414
+ if ( this.tempValue ) {
415
+ this.queueRefreshTimeout();
416
+ }
417
+
406
418
  if ( this.renderClose ) {
407
419
  classList.push('n-closable');
408
420
  }
@@ -419,7 +431,7 @@ export default {
419
431
 
420
432
  return (
421
433
  <div class={classList}>
422
- { [innerHtml, this.ctor('renderBackdrop')()] }
434
+ { [innerHtml, this.ctor('renderBackdrop')()] }
423
435
  </div>
424
436
  );
425
437
  }
@@ -115,6 +115,8 @@ export default {
115
115
  if ( this.NPopover && this.clickClose ) {
116
116
  this.NPopover.close();
117
117
  }
118
+
119
+ this.$emit('fakeclick', event);
118
120
  }
119
121
 
120
122
  },
@@ -318,9 +318,11 @@ export default {
318
318
  this.onMousedown(event, this.index = index);
319
319
  };
320
320
 
321
+ let key = Arr.findIndex(this.steps, value);
322
+
321
323
  return (
322
324
  <div class="n-slider__handle" {...handleProps}>
323
- <span>{ Obj.get(this.labels, index, value) }</span>
325
+ <span>{ Obj.get(this.labels, key, value) }</span>
324
326
  </div>
325
327
  );
326
328
  },