@kizmann/nano-ui 0.7.21 → 0.7.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kizmann/nano-ui",
3
- "version": "0.7.21",
3
+ "version": "0.7.23",
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
  },
@@ -110,6 +110,10 @@ export default {
110
110
  let file = Obj.get(this.tempFile, 'name',
111
111
  this.tempFile);
112
112
 
113
+ if ( Any.isEmpty(file) ) {
114
+ return fallback;
115
+ }
116
+
113
117
  let extension = file.replace(/^.*?\.([^.?]+)(\?.*?)?$/,
114
118
  '$1');
115
119