inviton-powerduck 0.0.164 → 0.0.166

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.
Files changed (57) hide show
  1. package/app/global-state.ts +28 -0
  2. package/app/powerduck-initializer.ts +10 -9
  3. package/app/powerduck-state.ts +3 -2
  4. package/common/ajax-xhr.ts +2 -1
  5. package/common/api-http.ts +6 -5
  6. package/common/base-component.tsx +2 -1
  7. package/common/dialog-utils.ts +2 -1
  8. package/common/external-barcode-scanner.ts +244 -242
  9. package/common/history-extended.ts +44 -6
  10. package/common/history-handler.ts +15 -15
  11. package/common/keyboard-open-tracker.ts +20 -6
  12. package/common/ladda-lite.ts +14 -1
  13. package/common/local-storage-shim.ts +66 -30
  14. package/common/resource-helper.ts +77 -71
  15. package/common/scroll-utils.ts +9 -4
  16. package/common/set-current-url.ts +8 -5
  17. package/common/utils/checkbox-utils.ts +6 -0
  18. package/common/utils/clipboard-provider.ts +37 -34
  19. package/common/utils/cookie.ts +9 -0
  20. package/common/utils/dropdown-utils.ts +5 -0
  21. package/common/utils/string-utils.ts +46 -40
  22. package/common/utils/upload-image-helper.ts +2 -1
  23. package/common/utils/utils.ts +34 -14
  24. package/components/app/navigation-guard.ts +5 -2
  25. package/components/app/root-dynamic-component-container.tsx +2 -1
  26. package/components/app/vue-plugin-jsxtransform.ts +3 -1
  27. package/components/chart-js/line-chart-flot.tsx +4 -3
  28. package/components/chart-js/line-chart.tsx +5 -0
  29. package/components/chart-js/pie-chart.tsx +4 -3
  30. package/components/collapse/index.tsx +9 -0
  31. package/components/container-with-breakpoints/ts/breakpoint-handler.ts +7 -6
  32. package/components/counter/index.tsx +2 -1
  33. package/components/counter/testall.tsx +12 -9
  34. package/components/datatable/datatable.tsx +2363 -2362
  35. package/components/dropdown/mobile/legacy_fdd.ts +10 -9
  36. package/components/dropdown/mobile/legacy_lvb.ts +3 -1
  37. package/components/file-downloader/index.tsx +6 -5
  38. package/components/google/maps.tsx +18 -8
  39. package/components/google/places-autocomplete.tsx +6 -1
  40. package/components/google/ts/google-maps-api.ts +3 -2
  41. package/components/image-crop/image-cropping-modal.tsx +11 -6
  42. package/components/image-crop/upload-and-crop.tsx +163 -162
  43. package/components/input/daterange-picker.tsx +9 -0
  44. package/components/input/datetime-picker.tsx +11 -2
  45. package/components/input/localized-url-input.tsx +2 -1
  46. package/components/input/ts/bootstrapInputSpinner.ts +7 -2
  47. package/components/input/ts/dateInputHelper.ts +8 -7
  48. package/components/memory-cache/index.ts +7 -5
  49. package/components/modal/modal-utils.ts +2 -1
  50. package/components/modal/modal.tsx +5 -4
  51. package/components/modal/ts/file-manager-dialog.ts +3 -2
  52. package/components/share/share-modal.tsx +13 -12
  53. package/components/share/share.tsx +13 -12
  54. package/components/swiper/swiper.tsx +19 -15
  55. package/package.json +1 -1
  56. package/common/cdn-webpack-shim.ts +0 -5
  57. package/components/input/plugins/daterangepicker/jquery.daterangepicker.min.js +0 -1910
@@ -3,9 +3,11 @@ import type { Temporal } from '@js-temporal/polyfill';
3
3
  import type { DropdownButtonItemArgs } from '../dropdown-button/dropdown-button-item';
4
4
  import type { FormItemWrapperArgs, MarginType } from '../form/form-item-wrapper';
5
5
  import { Prop, toNative } from 'vue-facing-decorator';
6
+ import { globalState } from '../../app/global-state';
6
7
  import PowerduckState from '../../app/powerduck-state';
7
- import TsxComponent, { Component } from '../../app/vuetsx';
8
8
 
9
+ import TsxComponent, { Component } from '../../app/vuetsx';
10
+ import { capitalize } from '../../common/extensions/string-extensions';
9
11
  import { toJsDate, toWire } from '../../common/extensions/temporal-extensions';
10
12
  import { isNullOrEmpty } from '../../common/utils/is-null-or-empty';
11
13
  import TemporalUtils from '../../common/utils/temporal-utils';
@@ -14,7 +16,6 @@ import FormItemWrapper from '../form/form-item-wrapper';
14
16
  import DateInputHelper, { DateInputUsage } from './ts/dateInputHelper';
15
17
  import 'bootstrap-datetime-picker';
16
18
  import 'bootstrap-datetime-picker/css/bootstrap-datetimepicker.min.css';
17
- import { capitalize } from '../../common/extensions/string-extensions';
18
19
 
19
20
  interface DatetimePickerArgs extends FormItemWrapperArgs {
20
21
  value: Temporal.PlainDateTime;
@@ -307,6 +308,10 @@ class DatetimePickerComponent extends TsxComponent<DatetimePickerArgs> implement
307
308
  }
308
309
 
309
310
  mounted() {
311
+ if (!globalState.windowExists) {
312
+ return;
313
+ }
314
+
310
315
  this.ensureLocale();
311
316
 
312
317
  if (!this.useNativeElement()) {
@@ -340,6 +345,10 @@ class DatetimePickerComponent extends TsxComponent<DatetimePickerArgs> implement
340
345
  }
341
346
 
342
347
  updated() {
348
+ if (!globalState.windowExists) {
349
+ return;
350
+ }
351
+
343
352
  if (!this.useNativeElement()) {
344
353
  this.refreshJqInputDate();
345
354
  (this.getDtpJq() as any).datetimepicker('update');
@@ -2,6 +2,7 @@ import type { ILocalizedText } from '../../common/localized-text';
2
2
  import type { DropdownButtonItemArgs } from '../dropdown-button/dropdown-button-item';
3
3
  import type { FormItemWrapperArgs, MarginType } from '../form/form-item-wrapper';
4
4
  import { Prop, toNative } from 'vue-facing-decorator';
5
+ import { globalState } from '../../app/global-state';
5
6
  import PowerduckState from '../../app/powerduck-state';
6
7
  import TsxComponent, { Component } from '../../app/vuetsx';
7
8
  import { Language } from '../../common/enums/language';
@@ -118,7 +119,7 @@ class LocalizedUrlInputComponent extends TsxComponent<LocalizedUrlInputArgs> imp
118
119
  url = `http://${url}`;
119
120
  }
120
121
 
121
- window.open(url, '_blank');
122
+ globalState.open(url, '_blank');
122
123
  }
123
124
 
124
125
  handleModalValueChange(newValue: string, lang?: LanguageUtils.LanguageListItem) {
@@ -4,6 +4,8 @@
4
4
  * License: MIT, see file 'LICENSE'
5
5
  */
6
6
 
7
+ import { globalState } from '../../../app/global-state';
8
+
7
9
  // the default editor for parsing and rendering
8
10
  const I18nEditor = function (
9
11
  this: any,
@@ -36,8 +38,11 @@ const I18nEditor = function (
36
38
 
37
39
  let triggerKeyPressed = false;
38
40
  const patchJqueryVal = () => {
39
- if ((window as any).__bisValuePatched != true) {
40
- (window as any).__bisValuePatched = true;
41
+ if (globalState.__bisValuePatched != true) {
42
+ globalState.__bisValuePatched = true;
43
+ if (!globalState.windowExists) {
44
+ return;
45
+ }
41
46
 
42
47
  const originalVal = $.fn.val;
43
48
  ($ as any).fn.val = function (value) {
@@ -1,3 +1,4 @@
1
+ import { globalState } from '../../../app/global-state';
1
2
  import PowerduckState from '../../../app/powerduck-state';
2
3
  import { PortalUtils } from '../../../common/utils/utils';
3
4
 
@@ -10,7 +11,7 @@ export default class DateInputHelper {
10
11
  static useNativeElement(showTime: boolean): boolean {
11
12
  return (
12
13
  DateInputHelper.nativeSupported(showTime)
13
- && (PortalUtils.isTouchDevice() || (window as any).cordova != null || PortalUtils.isChromeDesktopBrowser() || navigator.userAgent.toLowerCase().includes('firefox'))
14
+ && (PortalUtils.isTouchDevice() || globalState.cordova != null || PortalUtils.isChromeDesktopBrowser() || navigator.userAgent.toLowerCase().includes('firefox'))
14
15
  );
15
16
  }
16
17
 
@@ -114,18 +115,18 @@ export default class DateInputHelper {
114
115
  }
115
116
 
116
117
  private static getValueFromCache(key: string): any {
117
- if ((window as any)._DateTimePickerCache == null) {
118
- (window as any)._DateTimePickerCache = {};
118
+ if (globalState._DateTimePickerCache == null) {
119
+ globalState._DateTimePickerCache = {};
119
120
  }
120
121
 
121
- return (window as any)._DateTimePickerCache[key];
122
+ return globalState._DateTimePickerCache[key];
122
123
  }
123
124
 
124
125
  private static cacheValue(key: string, value: any): void {
125
- if ((window as any)._DateTimePickerCache == null) {
126
- (window as any)._DateTimePickerCache = {};
126
+ if (globalState._DateTimePickerCache == null) {
127
+ globalState._DateTimePickerCache = {};
127
128
  }
128
129
 
129
- return ((window as any)._DateTimePickerCache[key] = value);
130
+ return (globalState._DateTimePickerCache[key] = value);
130
131
  }
131
132
  }
@@ -1,3 +1,5 @@
1
+ import { globalState } from '../../app/global-state';
2
+
1
3
  export class MemoryCacheConfig {
2
4
  static windowRootName: string = 'powerduck';
3
5
  static cacheObjectKey: string = '_cache';
@@ -12,15 +14,15 @@ class MemoryCacheImpl {
12
14
 
13
15
  private getCacheRoot(): any {
14
16
  const repository = this._repository;
15
- if ((window as any)[repository] == null) {
16
- (window as any)[repository] = {};
17
+ if (globalState[repository] == null) {
18
+ globalState[repository] = {};
17
19
  }
18
20
 
19
- if ((window as any)[repository][MemoryCacheConfig.cacheObjectKey] == null) {
20
- (window as any)[repository][MemoryCacheConfig.cacheObjectKey] = {};
21
+ if (globalState[repository][MemoryCacheConfig.cacheObjectKey] == null) {
22
+ globalState[repository][MemoryCacheConfig.cacheObjectKey] = {};
21
23
  }
22
24
 
23
- return (window as any)[repository][MemoryCacheConfig.cacheObjectKey];
25
+ return globalState[repository][MemoryCacheConfig.cacheObjectKey];
24
26
  }
25
27
 
26
28
  getItem<T>(key: string): T {
@@ -1,5 +1,6 @@
1
1
  import type { Vue } from 'vue-facing-decorator';
2
2
  import { Modal as BootstrapModal } from 'bootstrap';
3
+ import { globalState } from '../../app/global-state';
3
4
 
4
5
  type VueType = typeof Vue.prototype;
5
6
 
@@ -136,6 +137,6 @@ export class ModalUtils {
136
137
  }
137
138
 
138
139
  private static _getModalJquery(modalElem: Element | IVue): JQuery {
139
- return (window as any).jQuery(modalElem as any);
140
+ return globalState.jQuery(modalElem as any);
140
141
  }
141
142
  }
@@ -1,6 +1,7 @@
1
1
  import type { ModalOnBeforeShownArgs, ModalOnShownArgs } from './modal-utils';
2
2
  import { Modal as BootstrapModal } from 'bootstrap';
3
3
  import { Prop, toNative } from 'vue-facing-decorator';
4
+ import { globalState } from '../../app/global-state';
4
5
  import PowerduckState from '../../app/powerduck-state';
5
6
  import TsxComponent, { Component } from '../../app/vuetsx';
6
7
  import { PortalUtils } from '../../common/utils/utils';
@@ -195,12 +196,12 @@ class ModalComponent extends TsxComponent<ModalArgs> implements ModalArgs {
195
196
 
196
197
  const onMouseUp = () => {
197
198
  endDrag();
198
- window.removeEventListener('mousemove', onMouseMove);
199
- window.removeEventListener('mouseup', onMouseUp);
199
+ globalState.removeEventListener('mousemove', onMouseMove);
200
+ globalState.removeEventListener('mouseup', onMouseUp);
200
201
  };
201
202
 
202
- window.addEventListener('mousemove', onMouseMove);
203
- window.addEventListener('mouseup', onMouseUp);
203
+ globalState.addEventListener('mousemove', onMouseMove);
204
+ globalState.addEventListener('mouseup', onMouseUp);
204
205
  });
205
206
 
206
207
  // Reset on modal hide
@@ -1,3 +1,4 @@
1
+ import { globalState } from '../../../app/global-state';
1
2
  import PowerduckState from '../../../app/powerduck-state';
2
3
  import NotificationProvider from '../../ui/notification';
3
4
  import { ModalUtils } from '../modal-utils';
@@ -53,7 +54,7 @@ export class FileManagerDialog {
53
54
  const context = $('#fileManagerDialog').find('.dialog-frame');
54
55
  context.find('iframe').remove();
55
56
 
56
- (window as any).onMceDialogCallback = function (cbArgs) {
57
+ globalState.onMceDialogCallback = function (cbArgs) {
57
58
  self.tryRemoveCallback();
58
59
  args.callback(cbArgs);
59
60
  self.hideManagerDialog();
@@ -90,7 +91,7 @@ export class FileManagerDialog {
90
91
 
91
92
  private static tryRemoveCallback() {
92
93
  try {
93
- delete (window as any).onMceDialogCallback;
94
+ delete globalState.onMceDialogCallback;
94
95
  } catch (e) { }
95
96
  }
96
97
  }
@@ -1,4 +1,5 @@
1
1
  import { toNative } from 'vue-facing-decorator';
2
+ import { globalState } from '../../app/global-state';
2
3
  import TsxComponent, { Component } from '../../app/vuetsx';
3
4
  import { PortalUtils } from '../../common/utils/utils';
4
5
  import Modal from '../modal/modal';
@@ -60,25 +61,25 @@ class ShareModalComponent extends TsxComponent<ShareComponentBindingArgs> implem
60
61
  }
61
62
 
62
63
  private facebookShare(): void {
63
- window.open(`https://www.facebook.com/sharer/sharer.php?u=${this.getUrl()}`);
64
+ globalState.open(`https://www.facebook.com/sharer/sharer.php?u=${this.getUrl()}`);
64
65
  }
65
66
 
66
67
  private twitterShare(): void {
67
68
  const text = this.shareTitle;
68
69
  const url = `https://twitter.com/intent/tweet?url=${this.getUrl()}&text=${encodeURIComponent(text)}`;
69
- window.open(url);
70
+ globalState.open(url);
70
71
  }
71
72
 
72
73
  private facebookMessengerShare(): void {
73
74
  if (this.isInAppBrowser()) {
74
- alert('ERROR - Unable to open in Facebook browser, open the entry in your system browser and try again');
75
+ globalState.alert('ERROR - Unable to open in Facebook browser, open the entry in your system browser and try again');
75
76
  return;
76
77
  }
77
78
 
78
79
  if (this.isMobile()) {
79
- window.open(`fb-messenger://share?link=${encodeURIComponent(this.getUrl())}&app_id=${encodeURIComponent(this.FB_APP_ID)}`, '_system');
80
+ globalState.open(`fb-messenger://share?link=${encodeURIComponent(this.getUrl())}&app_id=${encodeURIComponent(this.FB_APP_ID)}`, '_system');
80
81
  } else {
81
- window.open(`https://www.facebook.com/dialog/send?link=${
82
+ globalState.open(`https://www.facebook.com/dialog/send?link=${
82
83
  encodeURIComponent(this.getUrl())
83
84
  }&app_id=${
84
85
  encodeURIComponent(this.FB_APP_ID)
@@ -89,30 +90,30 @@ class ShareModalComponent extends TsxComponent<ShareComponentBindingArgs> implem
89
90
 
90
91
  private whatsAppShare(): void {
91
92
  if (this.isMobile()) {
92
- window.open(`whatsapp://send?text=${encodeURIComponent(this.getUrl())}`);
93
+ globalState.open(`whatsapp://send?text=${encodeURIComponent(this.getUrl())}`);
93
94
  } else {
94
- window.open(`https://web.whatsapp.com/send?text=${encodeURIComponent(this.getUrl())}`);
95
+ globalState.open(`https://web.whatsapp.com/send?text=${encodeURIComponent(this.getUrl())}`);
95
96
  }
96
97
  }
97
98
 
98
99
  private redditShare(): void {
99
- window.open(`https://reddit.com/submit?url=${encodeURIComponent(this.getUrl())}&title=${encodeURIComponent(this.shareTitle)}`);
100
+ globalState.open(`https://reddit.com/submit?url=${encodeURIComponent(this.getUrl())}&title=${encodeURIComponent(this.shareTitle)}`);
100
101
  }
101
102
 
102
103
  private pinterestShare(): void {
103
- window.open(`https://pinterest.com/pin/create/button/?url=${encodeURIComponent(this.getUrl())}&description=${encodeURIComponent(this.shareTitle)}`);
104
+ globalState.open(`https://pinterest.com/pin/create/button/?url=${encodeURIComponent(this.getUrl())}&description=${encodeURIComponent(this.shareTitle)}`);
104
105
  }
105
106
 
106
107
  private linkedInShare(): void {
107
- window.open(`https://www.linkedin.com/shareArticle?url=${encodeURIComponent(this.getUrl())}&title=${encodeURIComponent(this.shareTitle)}`);
108
+ globalState.open(`https://www.linkedin.com/shareArticle?url=${encodeURIComponent(this.getUrl())}&title=${encodeURIComponent(this.shareTitle)}`);
108
109
  }
109
110
 
110
111
  private emailShare(): void {
111
- window.location.href = `mailto:?body=${encodeURIComponent(this.shareTitle)}<br><br>${this.getUrl()}`;
112
+ globalState.location.href = `mailto:?body=${encodeURIComponent(this.shareTitle)}<br><br>${this.getUrl()}`;
112
113
  }
113
114
 
114
115
  private smsShare(): void {
115
- window.open(`sms:?body=${encodeURIComponent(`${this.shareTitle}, ${this.getUrl()}`)}`);
116
+ globalState.open(`sms:?body=${encodeURIComponent(`${this.shareTitle}, ${this.getUrl()}`)}`);
116
117
  }
117
118
 
118
119
  private copyToClipboard(): void {
@@ -1,4 +1,5 @@
1
1
  import { Prop, toNative } from 'vue-facing-decorator';
2
+ import { globalState } from '../../app/global-state';
2
3
  import PowerduckState from '../../app/powerduck-state';
3
4
  import TsxComponent, { Component } from '../../app/vuetsx';
4
5
  import { PortalUtils } from '../../common/utils/utils';
@@ -48,25 +49,25 @@ class ShareComponentComponent extends TsxComponent<ShareComponentArgs> implement
48
49
  }
49
50
 
50
51
  private facebookShare(): void {
51
- window.open(`https://www.facebook.com/sharer/sharer.php?u=${this.getUrl()}`);
52
+ globalState.open(`https://www.facebook.com/sharer/sharer.php?u=${this.getUrl()}`);
52
53
  }
53
54
 
54
55
  private twitterShare(): void {
55
56
  const text = this.shareTitle;
56
57
  const url = `https://twitter.com/intent/tweet?url=${this.getUrl()}&text=${encodeURIComponent(text)}`;
57
- window.open(url);
58
+ globalState.open(url);
58
59
  }
59
60
 
60
61
  private facebookMessengerShare(): void {
61
62
  if (this.isInAppBrowser()) {
62
- alert('ERROR - Unable to open in Facebook browser, open the entry in your system browser and try again');
63
+ globalState.alert('ERROR - Unable to open in Facebook browser, open the entry in your system browser and try again');
63
64
  return;
64
65
  }
65
66
 
66
67
  if (this.isMobile()) {
67
- window.open(`fb-messenger://share?link=${encodeURIComponent(this.getUrl())}&app_id=${encodeURIComponent(this.FB_APP_ID)}`, '_system');
68
+ globalState.open(`fb-messenger://share?link=${encodeURIComponent(this.getUrl())}&app_id=${encodeURIComponent(this.FB_APP_ID)}`, '_system');
68
69
  } else {
69
- window.open(`https://www.facebook.com/dialog/send?link=${
70
+ globalState.open(`https://www.facebook.com/dialog/send?link=${
70
71
  encodeURIComponent(this.getUrl())
71
72
  }&app_id=${
72
73
  encodeURIComponent(this.FB_APP_ID)
@@ -77,30 +78,30 @@ class ShareComponentComponent extends TsxComponent<ShareComponentArgs> implement
77
78
 
78
79
  private whatsAppShare(): void {
79
80
  if (this.isMobile()) {
80
- window.open(`whatsapp://send?text=${encodeURIComponent(this.getUrl())}`);
81
+ globalState.open(`whatsapp://send?text=${encodeURIComponent(this.getUrl())}`);
81
82
  } else {
82
- window.open(`https://web.whatsapp.com/send?text=${encodeURIComponent(this.getUrl())}`);
83
+ globalState.open(`https://web.whatsapp.com/send?text=${encodeURIComponent(this.getUrl())}`);
83
84
  }
84
85
  }
85
86
 
86
87
  private redditShare(): void {
87
- window.open(`https://reddit.com/submit?url=${encodeURIComponent(this.getUrl())}&title=${encodeURIComponent(this.shareTitle)}`);
88
+ globalState.open(`https://reddit.com/submit?url=${encodeURIComponent(this.getUrl())}&title=${encodeURIComponent(this.shareTitle)}`);
88
89
  }
89
90
 
90
91
  private pinterestShare(): void {
91
- window.open(`https://pinterest.com/pin/create/button/?url=${encodeURIComponent(this.getUrl())}&description=${encodeURIComponent(this.shareTitle)}`);
92
+ globalState.open(`https://pinterest.com/pin/create/button/?url=${encodeURIComponent(this.getUrl())}&description=${encodeURIComponent(this.shareTitle)}`);
92
93
  }
93
94
 
94
95
  private linkedInShare(): void {
95
- window.open(`https://www.linkedin.com/shareArticle?url=${encodeURIComponent(this.getUrl())}&title=${encodeURIComponent(this.shareTitle)}`);
96
+ globalState.open(`https://www.linkedin.com/shareArticle?url=${encodeURIComponent(this.getUrl())}&title=${encodeURIComponent(this.shareTitle)}`);
96
97
  }
97
98
 
98
99
  private emailShare(): void {
99
- window.location.href = `mailto:?body=${encodeURIComponent(this.shareTitle)}<br><br>${this.getUrl()}`;
100
+ globalState.location.href = `mailto:?body=${encodeURIComponent(this.shareTitle)}<br><br>${this.getUrl()}`;
100
101
  }
101
102
 
102
103
  private smsShare(): void {
103
- window.open(`sms:?body=${encodeURIComponent(`${this.shareTitle}, ${this.getUrl()}`)}`);
104
+ globalState.open(`sms:?body=${encodeURIComponent(`${this.shareTitle}, ${this.getUrl()}`)}`);
104
105
  }
105
106
 
106
107
  private copyToClipboard(): void {
@@ -1,6 +1,6 @@
1
1
  import type { Vue } from 'vue-facing-decorator';
2
2
  import SwiperCore from 'swiper';
3
- import { Navigation, Pagination, Autoplay } from 'swiper/modules';
3
+ import { Navigation, Pagination, Autoplay, FreeMode } from 'swiper/modules';
4
4
  import { AutoplayOptions } from 'swiper/types';
5
5
  import { Prop, toNative } from 'vue-facing-decorator';
6
6
  import TsxComponent, { Component } from '../../app/vuetsx';
@@ -15,6 +15,7 @@ SwiperCore.use([
15
15
  Navigation,
16
16
  Pagination,
17
17
  Autoplay,
18
+ FreeMode,
18
19
  ]);
19
20
 
20
21
  interface SwiperArgs {
@@ -24,6 +25,7 @@ interface SwiperArgs {
24
25
  slidesPerGroup?: number;
25
26
  spaceBetween?: number;
26
27
  freeMode?: boolean;
28
+ clickable?: boolean;
27
29
  grabCursor?: boolean;
28
30
  speed?: number;
29
31
  autoplay?: AutoplayOptions;
@@ -55,6 +57,7 @@ class SwiperComponent extends TsxComponent<SwiperArgs> implements SwiperArgs {
55
57
  @Prop() slidesPerGroup?: number;
56
58
  @Prop() spaceBetween?: number;
57
59
  @Prop() freeMode?: boolean;
60
+ @Prop() clickable?: boolean;
58
61
  @Prop() grabCursor?: boolean;
59
62
  @Prop() speed: number;
60
63
  @Prop() autoplay: AutoplayOptions;
@@ -76,12 +79,13 @@ class SwiperComponent extends TsxComponent<SwiperArgs> implements SwiperArgs {
76
79
  spaceBetween: this.spaceBetween > 0 ? this.spaceBetween : 0,
77
80
  pagination: this.shouldRenderPagination()
78
81
  ? {
79
- el: this.$refs.swiperPagination,
80
- type: 'bullets',
81
- }
82
+ el: this.$refs.swiperPagination,
83
+ type: 'bullets',
84
+ clickable: this.clickable
85
+ }
82
86
  : {
83
- el: null,
84
- },
87
+ el: null,
88
+ },
85
89
  };
86
90
 
87
91
  if (this.slidesPerView != null) {
@@ -188,15 +192,15 @@ class SwiperComponent extends TsxComponent<SwiperArgs> implements SwiperArgs {
188
192
  return (
189
193
  <div class="swiper">
190
194
  {this.shouldRenderPagination()
191
- && (
192
- <div
193
- ref="swiperPagination"
194
- class={`swiper-pagination swiper-pagination-bullets swiper-pagination-horizontal ${this.zoomed
195
- ? 'hide-swiper-pagination-bulets'
196
- : ''}`}
197
- >
198
- </div>
199
- )}
195
+ && (
196
+ <div
197
+ ref="swiperPagination"
198
+ class={`swiper-pagination swiper-pagination-bullets swiper-pagination-horizontal ${this.zoomed
199
+ ? 'hide-swiper-pagination-bulets'
200
+ : ''}`}
201
+ >
202
+ </div>
203
+ )}
200
204
 
201
205
  <div class="swiper-wrapper">
202
206
  {this.$slots?.default()}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
3
  "type": "module",
4
- "version": "0.0.164",
4
+ "version": "0.0.166",
5
5
  "files": [
6
6
  "app/",
7
7
  "common/",
@@ -1,5 +0,0 @@
1
- export const cdnWebpackShim = () => {
2
- const isDebugMode = location.href.includes('localhost') || location.href.includes('//192.168');
3
- // @ts-expect-error FIXME: __webpack_public_path__ in not defined
4
- __webpack_public_path__ = isDebugMode ? '/dist-dev/' : `${window.resourceCdnPath}/dist/`;
5
- };