inviton-powerduck 0.0.199 → 0.0.200

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.
@@ -51,6 +51,7 @@ interface DaterangePickerArgs extends FormItemWrapperArgs {
51
51
  singleDate?: boolean;
52
52
  pickerRootCssClass?: string;
53
53
  maxDate?: Temporal.PlainDateTime;
54
+ forceModalMode?: boolean;
54
55
  prevIcon?: string;
55
56
  nextIcon?: string;
56
57
  hideYearInMonthName?: boolean;
@@ -106,6 +107,7 @@ class DaterangePickerComponent extends TsxComponent<DaterangePickerArgs> impleme
106
107
  @Prop() alwaysOpen!: boolean;
107
108
  @Prop() singleDate!: boolean;
108
109
  @Prop() pickerRootCssClass!: string;
110
+ @Prop() forceModalMode?: boolean;
109
111
  @Prop() wrap!: boolean;
110
112
  @Prop() hint: string;
111
113
  @Prop() appendIcon: string;
@@ -204,6 +206,10 @@ class DaterangePickerComponent extends TsxComponent<DaterangePickerArgs> impleme
204
206
  }
205
207
 
206
208
  useModalMode(): boolean {
209
+ if (this.forceModalMode) {
210
+ return true;
211
+ }
212
+
207
213
  if (this.alwaysOpen && (this.calendarPlacement != null && this.calendarPlacement != 'body')) {
208
214
  return false;
209
215
  }
@@ -367,19 +373,27 @@ class DaterangePickerComponent extends TsxComponent<DaterangePickerArgs> impleme
367
373
 
368
374
  setTimeout(() => {
369
375
  this.$nextTick(() => {
370
- const $elem = this.getInputElement();
371
- const $modalRoot = $(document.getElementById(uuid));
372
- this.bindDateRangePicker(
373
- $elem,
374
- 'inline',
375
- true,
376
- true,
377
- () => {
378
- this.raiseChangedEvent();
379
- handle.hideModal();
380
- },
381
- $modalRoot,
382
- );
376
+ setTimeout(() => {
377
+ this.$nextTick(() => {
378
+ const $elem = this.getInputElement();
379
+ const $modalRoot = $(document.getElementById(uuid));
380
+
381
+ (window as any)._elem = $elem;
382
+ (window as any)._modalRoot = $modalRoot;
383
+
384
+ this.bindDateRangePicker(
385
+ $elem,
386
+ 'inline',
387
+ true,
388
+ true,
389
+ () => {
390
+ this.raiseChangedEvent();
391
+ handle.hideModal();
392
+ },
393
+ $modalRoot,
394
+ );
395
+ });
396
+ }, 1);
383
397
  });
384
398
  }, 1);
385
399
  }
@@ -600,7 +600,9 @@ import { globalState } from '../../../../app/global-state';
600
600
 
601
601
  init_datepicker.call(this);
602
602
 
603
-
603
+ if (opt.alwaysOpen) {
604
+ open(0);
605
+ }
604
606
 
605
607
  // expose some api
606
608
  $(this).data('dateRangePicker', {
@@ -1270,10 +1272,6 @@ import { globalState } from '../../../../app/global-state';
1270
1272
  min,
1271
1273
  );
1272
1274
  });
1273
-
1274
- if (opt.alwaysOpen) {
1275
- open(0);
1276
- }
1277
1275
  }
1278
1276
 
1279
1277
  function calcPosition() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
3
  "type": "module",
4
- "version": "0.0.199",
4
+ "version": "0.0.200",
5
5
  "files": [
6
6
  "app/",
7
7
  "common/",