inviton-powerduck 0.0.149 → 0.0.151

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.
@@ -89,10 +89,9 @@ export class ExcelJsProvider {
89
89
  });
90
90
  });
91
91
 
92
- const mySelf = this;
93
92
  workbook.xlsx
94
93
  .writeBuffer()
95
- .then((data: Uint8Array) => {
94
+ .then((data: any) => {
96
95
  const blob = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
97
96
  PortalUtils.downloadBlob(
98
97
  blob,
@@ -182,23 +182,19 @@ class TableExportModalComponent extends TsxComponent<TableExportModalBindingArgs
182
182
  worksheet.addRow(rowExportData);
183
183
  });
184
184
 
185
- const mySelf = this;
186
- workbook.xlsx.writeBuffer().then((data: Uint8Array) => {
185
+ workbook.xlsx.writeBuffer().then((data: any) => {
187
186
  const blob = new Blob([data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
188
187
  PortalUtils.downloadBlob(
189
188
  blob,
190
189
  'export.xlsx',
191
190
  () => {
192
191
  setTimeout(() => {
193
- mySelf.hideExportModal();
192
+ this.hideExportModal();
194
193
  }, 300);
195
194
  },
196
195
  );
197
196
  }).catch((err) => {
198
197
  const omg = err;
199
- if (omg == 'wtf') {
200
- alert('wtf..');
201
- }
202
198
  });
203
199
  }
204
200
  }
@@ -346,8 +346,20 @@ class DropdownListComponent extends TsxComponent<DropdownListArgs> implements Dr
346
346
  );
347
347
  }
348
348
 
349
+ open() {
350
+ if (this.useMobile()) {
351
+ (this.$refs.mobileModeRoot as HTMLElement).click();
352
+ } else {
353
+ DropdownSelect2Helper.getSelect2Instance(this.getSelect2RootElement()).open();
354
+ }
355
+ }
356
+
349
357
  close() {
350
- ($(this.$el).find('.make-select2') as any).select2('close');
358
+ if (this.useMobile()) {
359
+ (FilterableSelect as any).currentInstance?.hide();
360
+ } else {
361
+ DropdownSelect2Helper.getSelect2Instance(this.getSelect2RootElement()).close();
362
+ }
351
363
  }
352
364
 
353
365
  render(h) {
@@ -414,7 +426,7 @@ class DropdownListComponent extends TsxComponent<DropdownListArgs> implements Dr
414
426
  }
415
427
 
416
428
  return (
417
- <span onClick={e => this.showMobilePicker(h)} class={`select2 select2-container select2-container--default s2-pseudo maxwidth-input ${this.getRootBaseCssClass()}`} dir="ltr">
429
+ <span ref="mobileModeRoot" onClick={e => this.showMobilePicker(h)} class={`select2 select2-container select2-container--default s2-pseudo maxwidth-input ${this.getRootBaseCssClass()}`} dir="ltr">
418
430
  <span class="selection">
419
431
  <span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true">
420
432
  <span class="select2-selection__rendered mbl-ddl-text" title={selectedText} style="font-size: inherit;">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
3
  "type": "module",
4
- "version": "0.0.149",
4
+ "version": "0.0.151",
5
5
  "files": [
6
6
  "app/",
7
7
  "common/",