inviton-powerduck 0.0.181 → 0.0.183

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.
@@ -1,3 +1,5 @@
1
+ /* eslint-disable no-useless-call */
2
+ /* eslint-disable ts/no-this-alias */
1
3
  import type { DropdownButtonItemArgs } from '../dropdown-button/dropdown-button-item';
2
4
  import type { FormItemWrapperArgs, MarginType } from '../form/form-item-wrapper';
3
5
  import { Temporal } from '@js-temporal/polyfill';
@@ -47,6 +49,7 @@ interface DaterangePickerArgs extends FormItemWrapperArgs {
47
49
  minDate?: Temporal.PlainDateTime;
48
50
  alwaysOpen?: boolean;
49
51
  singleDate?: boolean;
52
+ pickerRootCssClass?: string
50
53
  maxDate?: Temporal.PlainDateTime;
51
54
  prevIcon?: string;
52
55
  nextIcon?: string;
@@ -71,6 +74,7 @@ export interface DaterangeChangedArgs {
71
74
  }
72
75
 
73
76
  const DATE_FORMAT_FOR_RANGE_PICKER = (() => {
77
+ // eslint-disable-next-line no-restricted-syntax
74
78
  const dummyDate = new Date(Date.UTC(
75
79
  2022,
76
80
  11,
@@ -101,6 +105,7 @@ class DaterangePickerComponent extends TsxComponent<DaterangePickerArgs> impleme
101
105
  @Prop() inputReadOnly?: boolean;
102
106
  @Prop() alwaysOpen!: boolean;
103
107
  @Prop() singleDate!: boolean;
108
+ @Prop() pickerRootCssClass!: string
104
109
  @Prop() wrap!: boolean;
105
110
  @Prop() hint: string;
106
111
  @Prop() appendIcon: string;
@@ -239,6 +244,7 @@ class DaterangePickerComponent extends TsxComponent<DaterangePickerArgs> impleme
239
244
  singleMonth: singleMonth == true,
240
245
  alwaysOpen: alwaysOpen == true,
241
246
  singleDate: this.singleDate == true,
247
+ rootCssClass: this.pickerRootCssClass,
242
248
  startOfWeek: DateInputHelper.getStartOfWeek() == 0 ? 'sunday' : 'monday',
243
249
  separator: self.getSeparator(),
244
250
  hideYearInMonthName: this.hideYearInMonthName == true,
@@ -253,9 +259,7 @@ class DaterangePickerComponent extends TsxComponent<DaterangePickerArgs> impleme
253
259
  maxDaysTooltip: this.maxDaysTooltip,
254
260
  calendarPlacement,
255
261
  container,
256
- displayMode: () => {
257
- return 'below-input';
258
- },
262
+ displayMode: () => 'below-input',
259
263
  leftOffset: () => {
260
264
  if (this.prependIcon == null) {
261
265
  return 0;
@@ -625,7 +625,6 @@
625
625
  -moz-appearance: none;
626
626
  }
627
627
 
628
-
629
628
  .date-range-picker-wrapper table .caption,
630
629
  .daterangepicker-modal .date-range-picker-root.inline-wrapper.drpc-inline .month-wrapper .month-wrapper-inner-common table th>span.select-wrapper,
631
630
  .daterangepicker-modal .date-range-picker-root.inline-wrapper.drpc-inline .month-wrapper .month-wrapper-inner-common table th>span.select-wrapper select {
@@ -653,6 +652,10 @@
653
652
  vertical-align: top;
654
653
  }
655
654
 
655
+ .daterangepicker-dummy-row-item {
656
+ visibility: hidden;
657
+ }
658
+
656
659
  .daterangepicker-modal .date-range-picker-root.inline-wrapper.drpc-inline .month-wrapper .month-wrapper-inner-common {}
657
660
 
658
661
  .daterangepicker-modal .date-range-picker-root.inline-wrapper.drpc-inline .month-wrapper .month-wrapper-inner-common table {
@@ -680,7 +683,6 @@
680
683
  position: relative;
681
684
  }
682
685
 
683
-
684
686
  .daterangepicker-modal .date-range-picker-root .select-wrapper-selected-month {
685
687
  display: inline-block;
686
688
  }
@@ -386,6 +386,7 @@ import { globalState } from '../../../../app/global-state';
386
386
  // attribute bags for day cells are unknown
387
387
  dayDivAttrs: any[];
388
388
  dayTdAttrs: any[];
389
+ rootCssClass: string
389
390
 
390
391
  selectForward: boolean;
391
392
  selectBackward: boolean;
@@ -2551,7 +2552,7 @@ import { globalState } from '../../../../app/global-state';
2551
2552
  }
2552
2553
 
2553
2554
  function createDom() {
2554
- let html = '<div class="date-range-picker-root"><div class="drpc-modal-close-button">x</div><div class="date-range-picker-wrapper';
2555
+ let html = '<div class="date-range-picker-root ' + (opt.rootCssClass || '') + '"><div class="drpc-modal-close-button">x</div><div class="date-range-picker-wrapper';
2555
2556
  if (opt.extraClass) { html += ` ${opt.extraClass} `; }
2556
2557
 
2557
2558
  if (opt.singleDate) { html += ' single-date '; }
@@ -2960,7 +2961,12 @@ import { globalState } from '../../../../app/global-state';
2960
2961
  }
2961
2962
 
2962
2963
  while (weekCount < 6) {
2963
- html.push('<tr><td colspan="7"><div color="transparent" class="day daterangepicker-dummy-row-item" time="-1" style="visibility:hidden;">42</div></td></tr>');
2964
+ const inner = getInnerDayHtml(
2965
+ { 'time': String(-1), 'data-tooltip': '', 'class': 'day daterangepicker-dummy-row-item' },
2966
+ { day: 42, type: 'toMonth', time: -1, valid: false } as any
2967
+ );
2968
+
2969
+ html.push('<tr><td colspan="7">' + inner + '</td></tr>');
2964
2970
  weekCount += 1;
2965
2971
  }
2966
2972
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
3
  "type": "module",
4
- "version": "0.0.181",
4
+ "version": "0.0.183",
5
5
  "files": [
6
6
  "app/",
7
7
  "common/",