@tylertech/forge 2.24.4 → 2.24.6

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 (172) hide show
  1. package/custom-elements.json +53 -29
  2. package/dist/esm/accordion/index.js +1 -1
  3. package/dist/esm/app-bar/help-button/index.js +1 -1
  4. package/dist/esm/app-bar/index.js +1 -1
  5. package/dist/esm/app-bar/menu-button/index.js +1 -1
  6. package/dist/esm/app-bar/notification-button/index.js +1 -1
  7. package/dist/esm/app-bar/profile-button/index.js +1 -1
  8. package/dist/esm/app-bar/search/index.js +1 -1
  9. package/dist/esm/autocomplete/index.js +1 -1
  10. package/dist/esm/banner/index.js +1 -1
  11. package/dist/esm/bottom-sheet/index.js +1 -1
  12. package/dist/esm/button-area/index.js +1 -1
  13. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  14. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  15. package/dist/esm/calendar/index.js +1 -1
  16. package/dist/esm/checkbox/index.js +1 -1
  17. package/dist/esm/chip-field/index.js +1 -1
  18. package/dist/esm/chips/chip/index.js +1 -1
  19. package/dist/esm/chips/chip-set/index.js +1 -1
  20. package/dist/esm/chips/index.js +1 -1
  21. package/dist/esm/chunks/{chunk.KGMCBPGV.js → chunk.22XYSOBK.js} +2 -2
  22. package/dist/esm/chunks/chunk.3HRCB7FN.js +7 -0
  23. package/dist/esm/chunks/chunk.3HRCB7FN.js.map +7 -0
  24. package/dist/esm/chunks/{chunk.IY43YPCQ.js → chunk.3VO4CCLE.js} +2 -2
  25. package/dist/esm/chunks/{chunk.JFAOCIGZ.js → chunk.4TAJ2ISD.js} +2 -2
  26. package/dist/esm/chunks/chunk.64BPRKXV.js +7 -0
  27. package/dist/esm/chunks/chunk.64BPRKXV.js.map +7 -0
  28. package/dist/esm/chunks/chunk.6VXZW2KP.js +12 -0
  29. package/dist/esm/chunks/chunk.6ZUV5N66.js +7 -0
  30. package/dist/esm/chunks/chunk.6ZUV5N66.js.map +7 -0
  31. package/dist/esm/chunks/{chunk.SXQ22MNR.js → chunk.ABB66VV2.js} +2 -2
  32. package/dist/esm/chunks/{chunk.WHQZNZHW.js → chunk.B5TEOESG.js} +2 -2
  33. package/dist/esm/chunks/{chunk.47EUT2BJ.js → chunk.B72LQPTW.js} +2 -2
  34. package/dist/esm/chunks/{chunk.C3G25JFG.js → chunk.BVMEPQRH.js} +2 -2
  35. package/dist/esm/chunks/{chunk.QBKSRXQK.js → chunk.CGT6H4RE.js} +2 -2
  36. package/dist/esm/chunks/{chunk.CL4FTBLR.js → chunk.DKP3U76M.js} +2 -2
  37. package/dist/esm/chunks/{chunk.TMEYQXRR.js → chunk.DT4G43BK.js} +2 -2
  38. package/dist/esm/chunks/chunk.DXA626CF.js +7 -0
  39. package/dist/esm/chunks/chunk.DXA626CF.js.map +7 -0
  40. package/dist/esm/chunks/{chunk.N6MAUMFI.js → chunk.HMJ3REU5.js} +2 -2
  41. package/dist/esm/chunks/chunk.J3YNMJ7K.js +7 -0
  42. package/dist/esm/chunks/chunk.J3YNMJ7K.js.map +7 -0
  43. package/dist/esm/chunks/{chunk.E3K6KM57.js → chunk.LAM6EDW3.js} +2 -2
  44. package/dist/esm/chunks/{chunk.FEU4FTVQ.js → chunk.LEOEVEFJ.js} +2 -2
  45. package/dist/esm/chunks/{chunk.EQEMCHMB.js → chunk.LKL5KWVY.js} +2 -2
  46. package/dist/esm/chunks/{chunk.TVWUZYVG.js → chunk.LQAXFDOO.js} +2 -2
  47. package/dist/esm/chunks/{chunk.6DVJ22IK.js → chunk.LQEVGZKN.js} +2 -2
  48. package/dist/esm/chunks/{chunk.6ENND42M.js → chunk.MSBAFZ54.js} +2 -2
  49. package/dist/esm/chunks/{chunk.ZVPPLZUU.js → chunk.P7AU3S6P.js} +2 -2
  50. package/dist/esm/chunks/{chunk.QPWP24VW.js → chunk.PLORKGHA.js} +2 -2
  51. package/dist/esm/chunks/{chunk.LFBYFJTX.js → chunk.PRD35UWX.js} +2 -2
  52. package/dist/esm/chunks/chunk.PTOAOW4U.js +7 -0
  53. package/dist/esm/chunks/chunk.PTOAOW4U.js.map +7 -0
  54. package/dist/esm/chunks/{chunk.MBJGQYCF.js → chunk.RZMTIEVK.js} +2 -2
  55. package/dist/esm/chunks/{chunk.XINI6PNZ.js → chunk.SCLNLPNS.js} +2 -2
  56. package/dist/esm/chunks/{chunk.5OLZHLY4.js → chunk.SLK5TNHE.js} +2 -2
  57. package/dist/esm/chunks/{chunk.5OLZHLY4.js.map → chunk.SLK5TNHE.js.map} +1 -1
  58. package/dist/esm/chunks/{chunk.CHVDZAGE.js → chunk.SMIOTQJL.js} +2 -2
  59. package/dist/esm/chunks/{chunk.W3DFKTAX.js → chunk.TJHXZ6PA.js} +2 -2
  60. package/dist/esm/chunks/{chunk.L5OECKS5.js → chunk.UOYOPTMC.js} +2 -2
  61. package/dist/esm/chunks/{chunk.3MMDUUTN.js → chunk.V6C2AEKZ.js} +2 -2
  62. package/dist/esm/chunks/{chunk.MA573DEE.js → chunk.VWLMQCC2.js} +2 -2
  63. package/dist/esm/chunks/{chunk.OBBYRQCY.js → chunk.XNUJPZIK.js} +2 -2
  64. package/dist/esm/chunks/{chunk.6NARYF7U.js → chunk.XRYKUVE3.js} +2 -2
  65. package/dist/esm/chunks/{chunk.WF24FWAT.js → chunk.XT4IC25K.js} +2 -2
  66. package/dist/esm/chunks/{chunk.MKHU4IPO.js → chunk.XTQO35SU.js} +2 -2
  67. package/dist/esm/chunks/{chunk.TLXWXBQO.js → chunk.YBEKNPIH.js} +2 -2
  68. package/dist/esm/chunks/{chunk.LEINPSKL.js → chunk.YKZ36ELA.js} +2 -2
  69. package/dist/esm/chunks/chunk.ZCJNWF7K.js +7 -0
  70. package/dist/esm/chunks/chunk.ZCJNWF7K.js.map +7 -0
  71. package/dist/esm/chunks/{chunk.4KKMVMPN.js → chunk.ZFVGFJUF.js} +2 -2
  72. package/dist/esm/color-picker/index.js +1 -1
  73. package/dist/esm/core/index.js +1 -1
  74. package/dist/esm/core/utils/index.js +1 -1
  75. package/dist/esm/date-picker/index.js +1 -1
  76. package/dist/esm/date-range-picker/index.js +1 -1
  77. package/dist/esm/expansion-panel/index.js +1 -1
  78. package/dist/esm/file-picker/index.js +1 -1
  79. package/dist/esm/icon/index.js +1 -1
  80. package/dist/esm/icon-button/index.js +1 -1
  81. package/dist/esm/index.js +1 -1
  82. package/dist/esm/list/index.js +1 -1
  83. package/dist/esm/list/list/index.js +1 -1
  84. package/dist/esm/list/list-item/index.js +1 -1
  85. package/dist/esm/list-dropdown/index.js +1 -1
  86. package/dist/esm/menu/index.js +1 -1
  87. package/dist/esm/open-icon/index.js +1 -1
  88. package/dist/esm/paginator/index.js +1 -1
  89. package/dist/esm/profile-card/index.js +1 -1
  90. package/dist/esm/quantity-field/index.js +1 -1
  91. package/dist/esm/radio/index.js +1 -1
  92. package/dist/esm/select/core/index.js +1 -1
  93. package/dist/esm/select/index.js +1 -1
  94. package/dist/esm/select/select/index.js +1 -1
  95. package/dist/esm/select/select-dropdown/index.js +1 -1
  96. package/dist/esm/slider/index.js +1 -1
  97. package/dist/esm/split-view/index.js +1 -1
  98. package/dist/esm/split-view/split-view/index.js +1 -1
  99. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  100. package/dist/esm/stepper/index.js +1 -1
  101. package/dist/esm/stepper/step/index.js +1 -1
  102. package/dist/esm/stepper/stepper/index.js +1 -1
  103. package/dist/esm/switch/index.js +1 -1
  104. package/dist/esm/table/index.js +1 -1
  105. package/dist/esm/tabs/index.js +1 -1
  106. package/dist/esm/tabs/tab-bar/index.js +1 -1
  107. package/dist/esm/text-field/index.js +1 -1
  108. package/dist/esm/time-picker/index.js +1 -1
  109. package/dist/esm/toast/index.js +1 -1
  110. package/esm/app-bar/notification-button/app-bar-notification-button-foundation.js +5 -2
  111. package/esm/chip-field/chip-field-adapter.js +2 -2
  112. package/esm/core/utils/date-utils.js +1 -1
  113. package/esm/date-picker/date-picker-foundation.d.ts +1 -0
  114. package/esm/date-picker/date-picker-foundation.js +9 -1
  115. package/esm/date-range-picker/date-range-picker-foundation.d.ts +1 -0
  116. package/esm/date-range-picker/date-range-picker-foundation.js +15 -0
  117. package/esm/field/field-adapter.d.ts +3 -3
  118. package/esm/field/field-adapter.js +3 -3
  119. package/esm/field/field-foundation.js +1 -1
  120. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  121. package/esm/text-field/text-field-adapter.js +2 -2
  122. package/package.json +1 -1
  123. package/dist/esm/chunks/chunk.AH4YGLZ4.js +0 -7
  124. package/dist/esm/chunks/chunk.AH4YGLZ4.js.map +0 -7
  125. package/dist/esm/chunks/chunk.DK6EGV4J.js +0 -7
  126. package/dist/esm/chunks/chunk.DK6EGV4J.js.map +0 -7
  127. package/dist/esm/chunks/chunk.MESFNTBS.js +0 -12
  128. package/dist/esm/chunks/chunk.OJ54J4L3.js +0 -7
  129. package/dist/esm/chunks/chunk.OJ54J4L3.js.map +0 -7
  130. package/dist/esm/chunks/chunk.OZPV5ZJC.js +0 -7
  131. package/dist/esm/chunks/chunk.OZPV5ZJC.js.map +0 -7
  132. package/dist/esm/chunks/chunk.QIGNMZRL.js +0 -7
  133. package/dist/esm/chunks/chunk.QIGNMZRL.js.map +0 -7
  134. package/dist/esm/chunks/chunk.U6WGJELL.js +0 -7
  135. package/dist/esm/chunks/chunk.U6WGJELL.js.map +0 -7
  136. package/dist/esm/chunks/chunk.VDF5MWGC.js +0 -7
  137. package/dist/esm/chunks/chunk.VDF5MWGC.js.map +0 -7
  138. /package/dist/esm/chunks/{chunk.KGMCBPGV.js.map → chunk.22XYSOBK.js.map} +0 -0
  139. /package/dist/esm/chunks/{chunk.IY43YPCQ.js.map → chunk.3VO4CCLE.js.map} +0 -0
  140. /package/dist/esm/chunks/{chunk.JFAOCIGZ.js.map → chunk.4TAJ2ISD.js.map} +0 -0
  141. /package/dist/esm/chunks/{chunk.MESFNTBS.js.map → chunk.6VXZW2KP.js.map} +0 -0
  142. /package/dist/esm/chunks/{chunk.SXQ22MNR.js.map → chunk.ABB66VV2.js.map} +0 -0
  143. /package/dist/esm/chunks/{chunk.WHQZNZHW.js.map → chunk.B5TEOESG.js.map} +0 -0
  144. /package/dist/esm/chunks/{chunk.47EUT2BJ.js.map → chunk.B72LQPTW.js.map} +0 -0
  145. /package/dist/esm/chunks/{chunk.C3G25JFG.js.map → chunk.BVMEPQRH.js.map} +0 -0
  146. /package/dist/esm/chunks/{chunk.QBKSRXQK.js.map → chunk.CGT6H4RE.js.map} +0 -0
  147. /package/dist/esm/chunks/{chunk.CL4FTBLR.js.map → chunk.DKP3U76M.js.map} +0 -0
  148. /package/dist/esm/chunks/{chunk.TMEYQXRR.js.map → chunk.DT4G43BK.js.map} +0 -0
  149. /package/dist/esm/chunks/{chunk.N6MAUMFI.js.map → chunk.HMJ3REU5.js.map} +0 -0
  150. /package/dist/esm/chunks/{chunk.E3K6KM57.js.map → chunk.LAM6EDW3.js.map} +0 -0
  151. /package/dist/esm/chunks/{chunk.FEU4FTVQ.js.map → chunk.LEOEVEFJ.js.map} +0 -0
  152. /package/dist/esm/chunks/{chunk.EQEMCHMB.js.map → chunk.LKL5KWVY.js.map} +0 -0
  153. /package/dist/esm/chunks/{chunk.TVWUZYVG.js.map → chunk.LQAXFDOO.js.map} +0 -0
  154. /package/dist/esm/chunks/{chunk.6DVJ22IK.js.map → chunk.LQEVGZKN.js.map} +0 -0
  155. /package/dist/esm/chunks/{chunk.6ENND42M.js.map → chunk.MSBAFZ54.js.map} +0 -0
  156. /package/dist/esm/chunks/{chunk.ZVPPLZUU.js.map → chunk.P7AU3S6P.js.map} +0 -0
  157. /package/dist/esm/chunks/{chunk.QPWP24VW.js.map → chunk.PLORKGHA.js.map} +0 -0
  158. /package/dist/esm/chunks/{chunk.LFBYFJTX.js.map → chunk.PRD35UWX.js.map} +0 -0
  159. /package/dist/esm/chunks/{chunk.MBJGQYCF.js.map → chunk.RZMTIEVK.js.map} +0 -0
  160. /package/dist/esm/chunks/{chunk.XINI6PNZ.js.map → chunk.SCLNLPNS.js.map} +0 -0
  161. /package/dist/esm/chunks/{chunk.CHVDZAGE.js.map → chunk.SMIOTQJL.js.map} +0 -0
  162. /package/dist/esm/chunks/{chunk.W3DFKTAX.js.map → chunk.TJHXZ6PA.js.map} +0 -0
  163. /package/dist/esm/chunks/{chunk.L5OECKS5.js.map → chunk.UOYOPTMC.js.map} +0 -0
  164. /package/dist/esm/chunks/{chunk.3MMDUUTN.js.map → chunk.V6C2AEKZ.js.map} +0 -0
  165. /package/dist/esm/chunks/{chunk.MA573DEE.js.map → chunk.VWLMQCC2.js.map} +0 -0
  166. /package/dist/esm/chunks/{chunk.OBBYRQCY.js.map → chunk.XNUJPZIK.js.map} +0 -0
  167. /package/dist/esm/chunks/{chunk.6NARYF7U.js.map → chunk.XRYKUVE3.js.map} +0 -0
  168. /package/dist/esm/chunks/{chunk.WF24FWAT.js.map → chunk.XT4IC25K.js.map} +0 -0
  169. /package/dist/esm/chunks/{chunk.MKHU4IPO.js.map → chunk.XTQO35SU.js.map} +0 -0
  170. /package/dist/esm/chunks/{chunk.TLXWXBQO.js.map → chunk.YBEKNPIH.js.map} +0 -0
  171. /package/dist/esm/chunks/{chunk.LEINPSKL.js.map → chunk.YKZ36ELA.js.map} +0 -0
  172. /package/dist/esm/chunks/{chunk.4KKMVMPN.js.map → chunk.ZFVGFJUF.js.map} +0 -0
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a,b,c,d,e}from"../chunks/chunk.JFAOCIGZ.js";import"../chunks/chunk.RHXQ2GMV.js";import"../chunks/chunk.E3K6KM57.js";import"../chunks/chunk.MV327MYK.js";import"../chunks/chunk.EC5JFSHR.js";import"../chunks/chunk.2DXG2R3M.js";import"../chunks/chunk.F3MP6AXF.js";import"../chunks/chunk.MZLPUI6R.js";import"../chunks/chunk.WHQZNZHW.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SKLCDWYQ.js";import"../chunks/chunk.2KXSGD3S.js";import"../chunks/chunk.FVRSGKJD.js";import"../chunks/chunk.U6WGJELL.js";import"../chunks/chunk.7XFU2W25.js";import"../chunks/chunk.KYH5GKVI.js";import"../chunks/chunk.BESB4RGK.js";import"../chunks/chunk.UWYANU5D.js";import"../chunks/chunk.KTGSZEAG.js";import"../chunks/chunk.DL7NX432.js";import"../chunks/chunk.LJLEPTLU.js";import"../chunks/chunk.4LA6HEA7.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.MCIQXNKY.js";export{a as TOAST_CONSTANTS,b as ToastAdapter,d as ToastComponent,c as ToastFoundation,e as defineToastComponent};
6
+ import{a,b,c,d,e}from"../chunks/chunk.4TAJ2ISD.js";import"../chunks/chunk.RHXQ2GMV.js";import"../chunks/chunk.LAM6EDW3.js";import"../chunks/chunk.MV327MYK.js";import"../chunks/chunk.EC5JFSHR.js";import"../chunks/chunk.2DXG2R3M.js";import"../chunks/chunk.F3MP6AXF.js";import"../chunks/chunk.MZLPUI6R.js";import"../chunks/chunk.B5TEOESG.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SKLCDWYQ.js";import"../chunks/chunk.2KXSGD3S.js";import"../chunks/chunk.FVRSGKJD.js";import"../chunks/chunk.J3YNMJ7K.js";import"../chunks/chunk.7XFU2W25.js";import"../chunks/chunk.KYH5GKVI.js";import"../chunks/chunk.BESB4RGK.js";import"../chunks/chunk.UWYANU5D.js";import"../chunks/chunk.KTGSZEAG.js";import"../chunks/chunk.DL7NX432.js";import"../chunks/chunk.LJLEPTLU.js";import"../chunks/chunk.4LA6HEA7.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.MCIQXNKY.js";export{a as TOAST_CONSTANTS,b as ToastAdapter,d as ToastComponent,c as ToastFoundation,e as defineToastComponent};
7
7
  //# sourceMappingURL=index.js.map
@@ -15,7 +15,7 @@ export class AppBarNotificationButtonFoundation {
15
15
  }
16
16
  initialize() {
17
17
  this._adapter.initialize();
18
- this._adapter.setCount(this._count);
18
+ this._adapter.setCount(this._dot ? null : this._count);
19
19
  this._adapter.setBadgeType(this._dot);
20
20
  this._adapter.setBadgeTheme(this._theme);
21
21
  this._adapter.setBadgeVisible(this._showBadge);
@@ -44,7 +44,10 @@ export class AppBarNotificationButtonFoundation {
44
44
  if (this._count !== value) {
45
45
  this._count = value;
46
46
  if (this._isInitialized) {
47
- if (!this._dot) {
47
+ if (this._dot) {
48
+ this._adapter.setCount(null);
49
+ }
50
+ else {
48
51
  this._adapter.setCount(this._count);
49
52
  }
50
53
  if (typeof this._count === 'string') {
@@ -8,10 +8,10 @@ import { CHIP_FIELD_CONSTANTS } from './chip-field-constants';
8
8
  import { FieldAdapter } from '../field/field-adapter';
9
9
  export class ChipFieldAdapter extends FieldAdapter {
10
10
  constructor(component) {
11
- super(component);
11
+ super(component, CHIP_FIELD_CONSTANTS.selectors.ROOT);
12
12
  }
13
13
  initialize() {
14
- super.initialize(CHIP_FIELD_CONSTANTS.selectors.ROOT);
14
+ super.initialize();
15
15
  this._memberSlot = getShadowElement(this._component, CHIP_FIELD_CONSTANTS.selectors.MEMBER_SLOT);
16
16
  this._inputContainerElement = getShadowElement(this._component, CHIP_FIELD_CONSTANTS.selectors.INPUT_CONTAINER);
17
17
  }
@@ -109,7 +109,7 @@ export function isSameDate(first, second) {
109
109
  else if (!isValidDate(first) || !isValidDate(second)) {
110
110
  return false;
111
111
  }
112
- return first.setHours(0, 0, 0, 0) === second.setHours(0, 0, 0, 0);
112
+ return new Date(first).setHours(0, 0, 0, 0) === new Date(second).setHours(0, 0, 0, 0);
113
113
  }
114
114
  /**
115
115
  * Returns the last date on a month.
@@ -28,6 +28,7 @@ export declare class DatePickerFoundation extends BaseDatePickerFoundation<IDate
28
28
  protected _applyDisabledDaysOfWeek(): void;
29
29
  protected _handleInput(value: string): void;
30
30
  protected _onInputValueChanged(value: string): void;
31
+ private _tryMergeCurrentTime;
31
32
  private _applyValue;
32
33
  get value(): Date | string | null | undefined;
33
34
  set value(value: Date | string | null | undefined);
@@ -34,7 +34,7 @@ export class DatePickerFoundation extends BaseDatePickerFoundation {
34
34
  }
35
35
  _onToday() {
36
36
  const today = new Date();
37
- today.setHours(0, 0, 0, 0);
37
+ this._tryMergeCurrentTime(today);
38
38
  this._onDateSelected({ date: today, selected: true, type: 'date' });
39
39
  }
40
40
  _onClear() {
@@ -64,6 +64,7 @@ export class DatePickerFoundation extends BaseDatePickerFoundation {
64
64
  if (event.type === 'date') {
65
65
  this._closeCalendar(true);
66
66
  }
67
+ this._tryMergeCurrentTime(value);
67
68
  if (!this._emitChangeEvent(value)) {
68
69
  return;
69
70
  }
@@ -110,6 +111,7 @@ export class DatePickerFoundation extends BaseDatePickerFoundation {
110
111
  _handleInput(value) {
111
112
  const sanitizedValue = this._getSanitizedDateString(value);
112
113
  const date = this._coerceDateValue(sanitizedValue);
114
+ this._tryMergeCurrentTime(date);
113
115
  if (this._masked) {
114
116
  this._adapter.emitInputEvent(DATE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);
115
117
  }
@@ -130,6 +132,12 @@ export class DatePickerFoundation extends BaseDatePickerFoundation {
130
132
  this._emitChangeEvent(this._value);
131
133
  }
132
134
  }
135
+ _tryMergeCurrentTime(date) {
136
+ if (!date || !this._value) {
137
+ return;
138
+ }
139
+ date.setHours(this._value.getHours(), this._value.getMinutes(), this._value.getSeconds(), this._value.getMilliseconds());
140
+ }
133
141
  _applyValue() {
134
142
  this._setFormattedInputValue();
135
143
  if (this._open) {
@@ -56,6 +56,7 @@ export declare class DateRangePickerFoundation extends BaseDatePickerFoundation<
56
56
  protected _onInputBlur(evt: FocusEvent): void;
57
57
  protected _onInputValueChanged(value: string): void;
58
58
  private _onToInputValueChanged;
59
+ private _tryMergeCurrentTime;
59
60
  get value(): IDatePickerRange | null | undefined;
60
61
  set value(value: IDatePickerRange | null | undefined);
61
62
  get from(): Date | string | null | undefined;
@@ -82,6 +82,7 @@ export class DateRangePickerFoundation extends BaseDatePickerFoundation {
82
82
  }
83
83
  _onToday() {
84
84
  const today = new Date();
85
+ this._tryMergeCurrentTime({ from: today });
85
86
  const range = this._open ? new DateRange({ from: this._from || today, to: this._to || undefined }) : new DateRange({ from: today });
86
87
  if (!this._isDateRangeAcceptable(range)) {
87
88
  return;
@@ -173,6 +174,7 @@ export class DateRangePickerFoundation extends BaseDatePickerFoundation {
173
174
  if (event.rangeSelectionState === 'to') {
174
175
  this._closeCalendar(true);
175
176
  }
177
+ this._tryMergeCurrentTime(value);
176
178
  if (!this._emitChangeEvent(value !== null && value !== void 0 ? value : null)) {
177
179
  return;
178
180
  }
@@ -257,6 +259,7 @@ export class DateRangePickerFoundation extends BaseDatePickerFoundation {
257
259
  _handleInput(value) {
258
260
  const sanitizedValue = this._getSanitizedDateString(value);
259
261
  const date = this._coerceDateValue(sanitizedValue);
262
+ this._tryMergeCurrentTime({ from: date });
260
263
  if (this._masked) {
261
264
  this._adapter.emitInputEvent(DATE_RANGE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);
262
265
  }
@@ -267,6 +270,7 @@ export class DateRangePickerFoundation extends BaseDatePickerFoundation {
267
270
  _handleToInput(value) {
268
271
  const sanitizedValue = this._getSanitizedDateString(value);
269
272
  const date = this._coerceDateValue(sanitizedValue);
273
+ this._tryMergeCurrentTime({ to: date });
270
274
  if (this._masked) {
271
275
  this._adapter.emitToInputEvent(DATE_RANGE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);
272
276
  }
@@ -330,6 +334,17 @@ export class DateRangePickerFoundation extends BaseDatePickerFoundation {
330
334
  this._emitChangeEvent(new DateRange({ from: this._from || undefined, to: date || undefined }));
331
335
  }
332
336
  }
337
+ _tryMergeCurrentTime(range) {
338
+ if (!range || !this._value || (!this._value.from && !this._value.to)) {
339
+ return;
340
+ }
341
+ if (range.from && this._value.from && this._value.from instanceof Date) {
342
+ range.from.setHours(this._value.from.getHours(), this._value.from.getMinutes(), this._value.from.getSeconds(), this._value.from.getMilliseconds());
343
+ }
344
+ if (range.to && this._value.to && this._value.to instanceof Date) {
345
+ range.to.setHours(this._value.to.getHours(), this._value.to.getMinutes(), this._value.to.getSeconds(), this._value.to.getMilliseconds());
346
+ }
347
+ }
333
348
  get value() {
334
349
  return { from: this.from, to: this.to };
335
350
  }
@@ -37,7 +37,7 @@ export interface IFieldAdapter extends IBaseAdapter {
37
37
  isReadonly(): boolean;
38
38
  getLabelFontMetrics(): IFontInfo;
39
39
  getLabelWidth(fontSize: number, fontFamily: string): number;
40
- initialize(rootSelector: string): void;
40
+ initialize(): void;
41
41
  initializeFloatingLabel(): IFloatingLabel;
42
42
  ensureSlottedLabel(): void;
43
43
  destroy(): void;
@@ -58,8 +58,8 @@ export declare class FieldAdapter extends BaseAdapter<IFieldComponent> implement
58
58
  protected _inputElement: HTMLInputElement;
59
59
  protected _inputMutationObserver: MutationObserver;
60
60
  protected _valueChangeListeners: Array<() => void>;
61
- constructor(component: IFieldComponent);
62
- initialize(rootSelector: string): void;
61
+ constructor(component: IFieldComponent, rootSelector: string);
62
+ initialize(): void;
63
63
  destroy(): void;
64
64
  hasLabel(): boolean;
65
65
  ensureSlottedLabel(): void;
@@ -8,16 +8,16 @@ import { BaseAdapter } from '../core/base/base-adapter';
8
8
  import { FloatingLabel } from '../floating-label/floating-label';
9
9
  import { FIELD_CONSTANTS } from './field-constants';
10
10
  export class FieldAdapter extends BaseAdapter {
11
- constructor(component) {
11
+ constructor(component, rootSelector) {
12
12
  super(component);
13
13
  this._valueChangeListeners = [];
14
- }
15
- initialize(rootSelector) {
16
14
  this._rootElement = getShadowElement(this._component, rootSelector);
17
15
  this._labelSlot = getShadowElement(this._component, 'slot[name=label]');
18
16
  this._leadingSlot = getShadowElement(this._component, 'slot[name=leading]');
19
17
  this._trailingSlot = getShadowElement(this._component, 'slot[name=trailing]');
20
18
  this._addonEndSlot = getShadowElement(this._component, 'slot[name=addon-end]');
19
+ }
20
+ initialize() {
21
21
  this._inputElement = this._component.querySelector('input:not([type=checkbox]):not([type=radio])');
22
22
  this.detectLabel();
23
23
  }
@@ -26,7 +26,7 @@ export class FieldFoundation {
26
26
  // Public
27
27
  //
28
28
  initialize() {
29
- this._adapter.initialize('');
29
+ this._adapter.initialize();
30
30
  if (this._adapter.hasLabel()) {
31
31
  this._adapter.ensureSlottedLabel();
32
32
  }
@@ -14,7 +14,7 @@ import { SplitViewPanelAdapter } from './split-view-panel-adapter';
14
14
  import { IconComponent, IconRegistry } from '../../icon';
15
15
  import { RippleComponent } from '../../ripple';
16
16
  const template = '<template><div class=\"forge-split-view-panel\" id=\"root\" part=\"root\"><div class=\"forge-split-view-panel__handle\" id=\"handle\" part=\"handle\" role=\"separator\" aria-controls=\"content\" aria-grabbed=\"false\" tabindex=\"0\"><forge-icon class=\"forge-split-view-panel__icon\" id=\"icon\" part=\"icon\"></forge-icon><forge-ripple id=\"ripple\" part=\"ripple\"></forge-ripple></div><div class=\"forge-split-view-panel__content\" id=\"content\" part=\"content\" role=\"group\"><slot></slot></div></div></template>';
17
- const styles = '@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u3m84b1;animation-name:u3m84b1;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u3m84b1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes u3m84b1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:u3m84b9;animation-name:u3m84b9;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u3m84b9{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes u3m84b9{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u3m84bt;animation-name:u3m84bt;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u3m84bt{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes u3m84bt{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:u3m84cn;animation-name:u3m84cn;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u3m84cn{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes u3m84cn{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u3m84cy;animation-name:u3m84cy;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u3m84cy{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes u3m84cy{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:u3m84dj;animation-name:u3m84dj;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u3m84dj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes u3m84dj{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u3m84e7;animation-name:u3m84e7;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u3m84e7{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes u3m84e7{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:u3m84ed;animation-name:u3m84ed;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u3m84ed{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes u3m84ed{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}';
17
+ const styles = '@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:uq1qpmr;animation-name:uq1qpmr;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes uq1qpmr{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes uq1qpmr{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:uq1qpn7;animation-name:uq1qpn7;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes uq1qpn7{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes uq1qpn7{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:uq1qpnz;animation-name:uq1qpnz;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes uq1qpnz{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes uq1qpnz{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:uq1qpoa;animation-name:uq1qpoa;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes uq1qpoa{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes uq1qpoa{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:uq1qpp1;animation-name:uq1qpp1;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes uq1qpp1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes uq1qpp1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:uq1qpp6;animation-name:uq1qpp6;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes uq1qpp6{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes uq1qpp6{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:uq1qppt;animation-name:uq1qppt;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes uq1qppt{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes uq1qppt{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:uq1qpqh;animation-name:uq1qpqh;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes uq1qpqh{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes uq1qpqh{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}';
18
18
  /**
19
19
  * The custom element class behind the `<forge-split-view-panel>` element.
20
20
  *
@@ -9,12 +9,12 @@ import { TEXT_FIELD_CONSTANTS } from './text-field-constants';
9
9
  import { FIELD_CONSTANTS } from '../field/field-constants';
10
10
  export class TextFieldAdapter extends FieldAdapter {
11
11
  constructor(component) {
12
- super(component);
12
+ super(component, TEXT_FIELD_CONSTANTS.selectors.ROOT);
13
13
  this._inputElements = [];
14
14
  this._inputMutationObserverInstances = [];
15
15
  }
16
16
  initialize() {
17
- super.initialize(TEXT_FIELD_CONSTANTS.selectors.ROOT);
17
+ super.initialize();
18
18
  this._inputElements = Array.from(this._component.querySelectorAll('input:not([type=checkbox]):not([type=radio]), textarea'));
19
19
  if (this._inputElements.length > 1) {
20
20
  this._handleMultiInputs();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tylertech/forge",
3
3
  "description": "Tyler Forge™ Web Components library",
4
- "version": "2.24.4",
4
+ "version": "2.24.6",
5
5
  "author": "Tyler Technologies, Inc.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{a as H,b as K,c as U,d as $,e as q}from"./chunk.6ENND42M.js";import{E as z}from"./chunk.LFBYFJTX.js";import{F as B}from"./chunk.KTEM7SW7.js";import{a}from"./chunk.YPZNIYQL.js";import{a as _}from"./chunk.EYGSUZWX.js";import{e as v}from"./chunk.DONAMICM.js";import{e as S}from"./chunk.WCSVKQR2.js";import{a as O}from"./chunk.E3K6KM57.js";import{l as A}from"./chunk.MZLPUI6R.js";import{a as V}from"./chunk.YI4JTY4T.js";import{d as w,l as N}from"./chunk.WHQZNZHW.js";import{a as L}from"./chunk.2KXSGD3S.js";import{b as T}from"./chunk.FVRSGKJD.js";import{e as p}from"./chunk.U6WGJELL.js";import{i as R,j as x}from"./chunk.KYH5GKVI.js";import{a as E}from"./chunk.KTGSZEAG.js";import{a as F,b as M}from"./chunk.DL7NX432.js";import{a as y,e as P,i as D}from"./chunk.LJLEPTLU.js";import{s as k}from"./chunk.4LA6HEA7.js";import{f as g,g as b}from"./chunk.J2M2MXP2.js";import{f as h}from"./chunk.MCIQXNKY.js";var d=`${M}date-range-picker`,u=class{constructor(r){r&&(this.from=r.from,this.to=r.to)}copy(){return new u(this)}},W={FROM:"from",TO:"to",END_VALUE:"end-value"},X={INPUT:"input"},j={CHANGE:`${d}-change`,OPEN:`${d}-open`,CLOSE:`${d}-close`,INPUT:`${d}-input`},n={elementName:d,selectors:X,events:j,observedAttributes:W};var m=class extends ${constructor(t){super(t);this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(n.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(n.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${n.elementName} requires two inputs`)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new B(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new T(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new T(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier)),this._toInputElement.hasAttribute("aria-label")||this._toInputElement.setAttribute("aria-label","To date"),R(),this._applyToInputs(t=>x(t))}addInputListener(t,e,i){var o;(o=this._fromInputElement)==null||o.addEventListener(t,e,{capture:i})}addToInputListener(t,e,i){var o;(o=this._toInputElement)==null||o.addEventListener(t,e,{capture:i})}removeInputListener(t,e){var i;(i=this._fromInputElement)==null||i.removeEventListener(t,e)}removeToInputListener(t,e){var i;(i=this._toInputElement)==null||i.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let i=v(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(i)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=v(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=k(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),this._toggleElement.hasOwnProperty("disabled")&&(this._toggleElement.disabled=t))}emitInputEvent(t,e){D(this._fromInputElement,t,e)}emitToInputEvent(t,e){D(this._toInputElement,t,e)}_createToggleElement(){return U("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}};var c=class extends q{constructor(t){super(t);this._mode="range";this._from=null;this._to=null;this._toInputListener=e=>this._onToInput(e),this._toInputValueChangedListener=e=>this._onToInputValueChanged(e),this._toInputKeydownListener=e=>this._onInputKeydown(e),this._toInputFocusListener=e=>this._onToInputFocus(),this._toInputBlurListener=e=>this._onToInputBlur(e)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(t){this._formatToInputValue(),super._openCalendar(t);let e=this._getCurrentValue();e!=null&&e.to?this._adapter.goToCalendarDate(new Date(e.to)):e!=null&&e.from&&this._adapter.goToCalendarDate(new Date(e.from))}_emitChangeEvent(t,e){let i=this._getTypedValue(t&&t.from||null),o=this._getTypedValue(t&&t.to||null),l=new u({from:i,to:o});return this._adapter.emitHostEvent(n.events.CHANGE,l,!0,!e)?(this._setValue(this._coerceDateValue(t&&t.from||null)),this._setToValue(this._coerceDateValue(t&&t.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(n.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(n.events.CLOSE,void 0,!1)}_onToday(){let t=new Date,e=this._open?new a({from:this._from||t,to:this._to||void 0}):new a({from:t});!this._isDateRangeAcceptable(e)||(this.value=e,this._onDateSelected({date:t,range:e,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(t))}_onClear(){this._onDateSelected({date:null,range:new a,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let t=this._adapter.getToInputValue();if(t){let e=this._parseDateString(t);if(b(e)&&this._isDateValueAcceptable(e)){let i=this._formatDate(e);i&&this._adapter.setToInputValue(i,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(t){let e=this._formatDate(this._from);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setInputValue(e,t?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(t){let e=this._formatDate(this._to);!e&&!this._allowInvalidDate&&(e=""),this._adapter.setToInputValue(e,t?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(t){if(!(t!=null&&t.to))return!0;let e=()=>this._isDateValueAcceptable(t.from),i=()=>this._isDateValueAcceptable(t.to),o=()=>(t==null?void 0:t.from)&&(t==null?void 0:t.to)?t.from.getTime()<=t.to.getTime():!0;return e()&&i()&&o()}_setValue(t){this._isDateValueAcceptable(t)&&(this._from=t||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(t){this._isDateValueAcceptable(t)&&(this._to=t||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(t){let e=t.range;if(t.rangeSelectionState==="to"&&this._closeCalendar(!0),!this._emitChangeEvent(e!=null?e:null))return;let i=this._formatDate(e&&e.from||null),o=this._formatDate(e&&e.to||null);this._adapter.setInputValue(i,this._notifyInputValueChanges),this._adapter.setToInputValue(o,this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=e&&e.from||null,this._to=e&&e.to||null,V.isMobile||(o?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_initializeToMask(){if(!this._masked)return;let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleToInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,i,o,l)=>this._prepareMaskCallback.call(null,e,i,o,l)),this._adapter.initializeToMask(t)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new a({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new a({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(t){this._handleInput(this._adapter.getInputValue())}_handleInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitInputEvent(n.events.INPUT,e),!p(i,this._from)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0}))}_handleToInput(t){let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);this._masked&&this._adapter.emitToInputEvent(n.events.INPUT,e),!p(i,this._to)&&this._isDateValueAcceptable(i)&&this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(t){this._masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(t){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&!this._adapter.isInputFocused(t.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(t.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);p(i,this._from)||(this.from=i,this._emitChangeEvent(new a({from:i||void 0,to:this._to||void 0})))}_onToInputValueChanged(t){if(this._masked)return;let e=this._getSanitizedDateString(t),i=this._coerceDateValue(e);p(i,this._to)||(this.to=i,this._emitChangeEvent(new a({from:this._from||void 0,to:i||void 0})))}get value(){return{from:this.from,to:this.to}}set value(t){t||(t={from:null,to:null}),t.from===void 0&&(t.from=null),t.to===void 0&&(t.to=null),this.from=t.from,this.to=t.to,this._value={from:this.from,to:this.to}}get from(){let t=this._getTypedValue(this._from);return t?g(t)?new Date(t.getTime()):t:null}set from(t){this._from!==t&&(this._setValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new a({from:this._coerceDateValue(t)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let t=this._getTypedValue(this._to);return t?g(t)?new Date(t.getTime()):t:null}set to(t){this._to!==t&&(this._setToValue(this._coerceDateValue(t)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new a({to:this._coerceDateValue(t)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var J="<template><slot></slot></template>",Q=":host{display:block}:host([hidden]){display:none}",s=class extends K{constructor(){super();w.define(A),P(this,J,Q),this._foundation=new c(new m(this))}static get observedAttributes(){return[...Object.values(H.observedAttributes),n.observedAttributes.FROM,n.observedAttributes.TO]}attributeChangedCallback(t,e,i){switch(t){case n.observedAttributes.FROM:this.from=i;return;case n.observedAttributes.TO:this.to=i;return}super.attributeChangedCallback(t,e,i)}};h([E()],s.prototype,"from",2),h([E()],s.prototype,"to",2),s=h([F({name:n.elementName,dependencies:[S,z,O,N]})],s);var G=class extends L{constructor(t){super(t)}_build(){let t=document.createElement(n.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector(`input[${_.attributes.MULTI_INPUT}-0]`)}get toInput(){return this._textField.querySelector(`input[${_.attributes.MULTI_INPUT}-1]`)}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(n.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var i,o,l,I,C;this._textField=document.createElement(_.elementName),(i=this._config.options)!=null&&i.required&&(this._textField.required=!0),(o=this._config.options)!=null&&o.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((l=this._config.options)==null?void 0:l.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((I=this._config.options)==null?void 0:I.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((C=this._config.options)==null?void 0:C.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function Wt(){y(s)}export{u as a,n as b,m as c,c as d,s as e,G as f,Wt as g};
7
- //# sourceMappingURL=chunk.AH4YGLZ4.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/date-range-picker/date-range-picker-constants.ts", "../../src/date-range-picker/date-range-picker-adapter.ts", "../../src/date-range-picker/date-range-picker-foundation.ts", "../../src/date-range-picker/date-range-picker.ts", "../../src/date-range-picker/date-range-picker-component-delegate.ts", "../../src/date-range-picker/index.ts"],
4
- "sourcesContent": ["import { COMPONENT_NAME_PREFIX } from '../constants';\n\nconst elementName: keyof HTMLElementTagNameMap = `${COMPONENT_NAME_PREFIX}date-range-picker`;\n\nexport class DatePickerRange implements IDatePickerRange {\n public from?: Date | string | null;\n public to?: Date | string | null;\n constructor(range?: IDatePickerRange) {\n if (range) {\n this.from = range.from;\n this.to = range.to;\n }\n }\n\n public copy(): DatePickerRange {\n return new DatePickerRange(this);\n }\n}\n\nexport interface IDatePickerRange {\n from?: Date | string | null;\n to?: Date | string | null;\n}\n\nconst observedAttributes = {\n FROM: 'from',\n TO: 'to',\n END_VALUE: 'end-value'\n};\n\nconst selectors = {\n INPUT: 'input'\n};\n\nconst events = {\n CHANGE: `${elementName}-change`,\n OPEN: `${elementName}-open`,\n CLOSE: `${elementName}-close`,\n INPUT: `${elementName}-input`\n};\n\nexport const DATE_RANGE_PICKER_CONSTANTS = {\n elementName,\n selectors,\n events,\n observedAttributes\n};\n\n\nexport interface IDateRangePickerChangeEventData extends DatePickerRange {}\n", "import { emitEvent, listenOwnProperty, getActiveElement, randomChars } from '@tylertech/forge-core';\nimport { CalendarDropdown, ICalendarDropdownPopupConfig } from '../calendar/calendar-dropdown';\nimport { DateInputMask, IDateInputMaskOptions, setAriaControls, tryCreateAriaControlsPlaceholder } from '../core';\nimport { BaseDatePickerAdapter, IBaseDatePickerAdapter } from '../date-picker/base/base-date-picker-adapter';\nimport { IDatePickerCalendarDropdownConfig } from '../date-picker/base/base-date-picker-constants';\nimport { createToggleElement } from '../date-picker/base/base-date-picker-utils';\nimport { DateRangePickerComponent, IDateRangePickerComponent } from './date-range-picker';\nimport { DATE_RANGE_PICKER_CONSTANTS } from './date-range-picker-constants';\n\nexport interface IDateRangePickerAdapter extends IBaseDatePickerAdapter {\n initializeToMask(toOptions: IDateInputMaskOptions): void;\n addToInputListener(type: string, listener: (event: Event) => void): void;\n removeToInputListener(type: string, listener: (event: Event) => void): void;\n setToInputValueChangedListener(context: any, listener: (value: any) => void): void;\n getToInputValue(): string;\n setToInputValue(value: string, emitEvents: boolean): void;\n emitInputEvent(type: string, data?: any): void;\n emitToInputEvent(type: string, data?: any): void;\n tryFocusInput(): void;\n tryBlurInput(): void;\n selectToInputText(): void;\n destroyToMask(): void;\n}\n\nexport class DateRangePickerAdapter extends BaseDatePickerAdapter<IDateRangePickerComponent> implements IDateRangePickerAdapter {\n private _fromInputElement: HTMLInputElement;\n private _toInputElement: HTMLInputElement;\n private _toInputMask: DateInputMask | undefined;\n private _fromInputMask: DateInputMask | undefined;\n private _dropdownIdentifier: string;\n private _toValueChangeListener: (() => void) | undefined;\n\n constructor(component: DateRangePickerComponent) {\n super(component);\n this._dropdownIdentifier = `forge-date-range-picker-${this._identifier}`;\n }\n\n protected _initializeInput(): void {\n this._fromInputElement = this._component.querySelectorAll(DATE_RANGE_PICKER_CONSTANTS.selectors.INPUT)[0] as HTMLInputElement;\n this._toInputElement = this._component.querySelectorAll(DATE_RANGE_PICKER_CONSTANTS.selectors.INPUT)[1] as HTMLInputElement;\n\n if (!this._fromInputElement || !this._fromInputElement) {\n throw new Error(`The ${DATE_RANGE_PICKER_CONSTANTS.elementName} requires two inputs`);\n }\n }\n\n protected _initializeCalendarDropdown(): void {\n const targetElement = this._getDefaultTargetElement();\n this._calendarDropdown = new CalendarDropdown(targetElement, this._dropdownIdentifier);\n }\n\n public override initializeMask(fromOptions: IDateInputMaskOptions): void {\n this._fromInputMask?.destroy();\n this._fromInputMask = new DateInputMask(this._fromInputElement, fromOptions);\n }\n\n public override destroyMask(): void {\n this._fromInputMask?.destroy();\n this._fromInputMask = undefined;\n }\n\n public initializeToMask(toOptions: IDateInputMaskOptions): void {\n this._toInputMask?.destroy();\n this._toInputMask = new DateInputMask(this._toInputElement, toOptions);\n }\n\n public destroyToMask(): void {\n this._toInputMask?.destroy();\n this._toInputMask = undefined;\n }\n\n public override destroy(): void {\n super.destroy();\n this._destroyToValueChangeListener();\n }\n\n private _destroyToValueChangeListener(): void {\n if (typeof this._toValueChangeListener === 'function') {\n this._toValueChangeListener();\n }\n }\n\n public initializeAccessibility(): void {\n this._applyToInputs(input => input.setAttribute('autocomplete', 'off'));\n this._applyToInputs(input => input.setAttribute('autocorrect', 'off'));\n this._applyToInputs(input => input.setAttribute('autocapitalize', 'off'));\n this._applyToInputs(input => input.setAttribute('spellcheck', 'false'));\n this._applyToInputs(input => input.setAttribute('role', 'combobox'));\n this._applyToInputs(input => input.setAttribute('aria-live', 'assertive'));\n this._applyToInputs(input => input.setAttribute('aria-atomic', 'true'));\n this._applyToInputs(input => input.setAttribute('aria-haspopup', 'true'));\n this._applyToInputs(input => input.setAttribute('aria-expanded', 'false'));\n this._applyToInputs(input => input.setAttribute('aria-owns', this._dropdownIdentifier));\n if (!this._toInputElement.hasAttribute('aria-label')) {\n this._toInputElement.setAttribute('aria-label', 'To date');\n }\n tryCreateAriaControlsPlaceholder();\n this._applyToInputs(input => setAriaControls(input));\n }\n\n public addInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._fromInputElement?.addEventListener(type, listener, { capture });\n }\n\n public addToInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void {\n this._toInputElement?.addEventListener(type, listener, { capture });\n }\n\n public removeInputListener(type: string, listener: (event: Event) => void): void {\n this._fromInputElement?.removeEventListener(type, listener);\n }\n \n public removeToInputListener(type: string, listener: (event: Event) => void): void {\n this._toInputElement?.removeEventListener(type, listener);\n }\n\n public setInputValueChangedListener(context: any, listener: (value: any) => void): void {\n if (this._valueChangeListeners.length) {\n this.destroyValueChangeListener();\n }\n const destroyListenerCb = listenOwnProperty(context, this._fromInputElement, 'value', listener);\n this._valueChangeListeners.push(destroyListenerCb);\n }\n\n public setToInputValueChangedListener(context: any, listener: (value: any) => void): void {\n this._destroyToValueChangeListener();\n this._toValueChangeListener = listenOwnProperty(context, this._toInputElement, 'value', listener);\n }\n\n public hasInputElement(): boolean {\n return !!this._fromInputElement && !!this._toInputElement;\n }\n\n public override attachCalendar(calendarConfig: IDatePickerCalendarDropdownConfig<Date | null>, dropdownConfig?: ICalendarDropdownPopupConfig): void {\n super.attachCalendar(calendarConfig, dropdownConfig);\n this._fromInputElement.setAttribute('aria-expanded', 'true');\n }\n\n public override detachCalendar(): void {\n super.detachCalendar();\n if (this._fromInputElement) {\n this._fromInputElement.setAttribute('aria-expanded', 'false');\n this._fromInputElement.removeAttribute('aria-activedescendant');\n }\n }\n\n public setActiveDescendant(id: string): void {\n this._fromInputElement.setAttribute('aria-activedescendant', id);\n }\n\n public setInputValue(value: string, emitEvents: boolean): void {\n if (this._fromInputElement.value === value) {\n return;\n }\n\n this._fromInputElement.value = value;\n \n if (this._fromInputMask) {\n this._fromInputMask.updateMask();\n }\n\n if (emitEvents) {\n this._fromInputElement.dispatchEvent(new Event('change'));\n this._fromInputElement.dispatchEvent(new Event('input'));;\n }\n }\n\n public setToInputValue(value: string, emitEvents: boolean): void {\n if (this._toInputElement.value === value) {\n return;\n }\n\n this._toInputElement.value = value;\n \n if (this._toInputMask) {\n this._toInputMask.updateMask();\n }\n \n if (emitEvents) {\n this._toInputElement.dispatchEvent(new Event('change'));\n this._toInputElement.dispatchEvent(new Event('input'));\n }\n }\n\n public isInputDisabled(): boolean {\n return this._fromInputElement.disabled;\n }\n\n public isInputFocused(target?: EventTarget | null): boolean {\n if (target && this._toInputElement === target || this._fromInputElement === target) {\n return true;\n }\n const activeEl = getActiveElement(this._component.ownerDocument);\n return this._toInputElement === activeEl || this._fromInputElement === activeEl;\n }\n\n public getInputValue(): string {\n return this._fromInputElement.value;\n }\n\n public getToInputValue(): string {\n return this._toInputElement.value;\n }\n\n public setDisabled(isDisabled: boolean): void {\n this._fromInputElement.disabled = isDisabled;\n this._toInputElement.disabled = isDisabled;\n\n this._toInputElement.setAttribute('aria-disabled', isDisabled.toString());\n this._fromInputElement.setAttribute('aria-disabled', isDisabled.toString());\n\n if (this._toggleElement) {\n this._toggleElement.setAttribute('aria-disabled', isDisabled.toString());\n if (this._toggleElement.hasOwnProperty('disabled')) {\n (this._toggleElement as HTMLButtonElement).disabled = isDisabled;\n }\n }\n }\n\n public emitInputEvent(type: string, data?: any): void {\n emitEvent(this._fromInputElement, type, data);\n }\n\n public emitToInputEvent(type: string, data?: any): void {\n emitEvent(this._toInputElement, type, data);\n }\n\n protected override _createToggleElement(): HTMLElement {\n return createToggleElement('date_range');\n }\n\n public tryFocusInput(): void {\n this._fromInputElement.focus();\n }\n\n public tryBlurInput(): void {\n this._fromInputElement.blur();\n }\n\n public selectInputText(): void {\n this._fromInputElement.select();\n }\n\n public selectToInputText(): void {\n this._toInputElement.select();\n }\n\n private _applyToInputs(action: (input: HTMLInputElement) => void): void {\n [this._fromInputElement, this._toInputElement].forEach(action);\n }\n}\n", "import { isDate, isValidDate, Platform } from '@tylertech/forge-core';\nimport { CalendarMode, DateRange, ICalendarDateSelectEventData } from '../calendar';\nimport { isSameDate } from '../core/utils/date-utils';\nimport { IDateInputMaskOptions } from '../core/mask/date-input-mask';\nimport { BaseDatePickerFoundation, IBaseDatePickerFoundation } from '../date-picker/base/base-date-picker-foundation';\nimport { IDateRangePickerAdapter } from './date-range-picker-adapter';\nimport { DatePickerRange, DATE_RANGE_PICKER_CONSTANTS, IDatePickerRange, IDateRangePickerChangeEventData } from './date-range-picker-constants';\n\nexport interface IDateRangePickerFoundation extends IBaseDatePickerFoundation<IDatePickerRange> {\n from: Date | string | null | undefined;\n to: Date | string | null | undefined;\n}\n\nexport class DateRangePickerFoundation extends BaseDatePickerFoundation<IDateRangePickerAdapter, IDatePickerRange> implements IDateRangePickerFoundation {\n protected _mode: CalendarMode = 'range';\n private _from?: Date | null = null;\n private _to?: Date | null = null;\n private _toInputListener: (evt: Event) => void;\n private _toInputKeydownListener: (evt: KeyboardEvent) => void;\n private _toInputFocusListener: (evt: FocusEvent) => void;\n private _toInputBlurListener: (evt: FocusEvent) => void;\n private _toInputValueChangedListener: (value: string) => void;\n\n constructor(adapter: IDateRangePickerAdapter) {\n super(adapter);\n this._toInputListener = evt => this._onToInput(evt);\n this._toInputValueChangedListener = value => this._onToInputValueChanged(value);\n this._toInputKeydownListener = evt => this._onInputKeydown(evt);\n this._toInputFocusListener = evt => this._onToInputFocus();\n this._toInputBlurListener = evt => this._onToInputBlur(evt);\n }\n\n public override initialize(): void {\n super.initialize();\n this._setFormattedToInputValue(true);\n }\n\n protected _initializeState(): void {\n this._applyToMask();\n\n if (!this._from) {\n this._from = this._coerceDateValue(this._adapter.getInputValue());\n }\n if (!this._to) {\n this._to = this._coerceDateValue(this._adapter.getToInputValue());\n }\n }\n\n protected override _initializeListeners(): void {\n super._initializeListeners();\n this._adapter.addToInputListener('keydown', this._toInputKeydownListener);\n this._adapter.addToInputListener('focus', this._toInputFocusListener);\n this._adapter.addToInputListener('blur', this._toInputBlurListener);\n }\n\n protected override _initializeValueChangedListeners(): void {\n super._initializeValueChangedListeners();\n this._adapter.setToInputValueChangedListener(this, this._toInputValueChangedListener);\n }\n\n protected override _setInputChangeListeners(): void {\n super._setInputChangeListeners();\n this._adapter.addToInputListener('input', this._toInputListener);\n }\n\n protected override _removeInputChangeListeners(): void {\n super._removeInputChangeListeners();\n this._adapter.removeToInputListener('input', this._toInputListener);\n }\n\n protected override _openCalendar(emitOpenEvent?: boolean): void {\n this._formatToInputValue();\n super._openCalendar(emitOpenEvent);\n\n const currentValue = this._getCurrentValue();\n if (!!currentValue?.to) {\n this._adapter.goToCalendarDate(new Date(currentValue.to));\n } else if (!!currentValue?.from) {\n this._adapter.goToCalendarDate(new Date(currentValue.from));\n }\n }\n\n protected _emitChangeEvent(value: DateRange | null | undefined, force?: boolean): boolean {\n const typedStartValue = this._getTypedValue((value && value.from) || null);\n const typedEndValue = this._getTypedValue((value && value.to) || null);\n const detail: IDateRangePickerChangeEventData = new DatePickerRange({ from: typedStartValue, to: typedEndValue });\n const wasCancelled = !this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.CHANGE, detail, true, !force);\n if (!wasCancelled) {\n this._setValue(this._coerceDateValue((value && value.from) || null));\n this._setToValue(this._coerceDateValue((value && value.to) || null));\n return true;\n }\n return false;\n }\n\n protected _emitOpenEvent(): void {\n this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.OPEN, undefined, false);\n }\n\n protected _emitCloseEvent(): void {\n this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.CLOSE, undefined, false);\n }\n \n protected _onToday(): void {\n const today = new Date();\n const range = this._open ? new DateRange({ from: this._from || today, to: this._to || undefined }) : new DateRange({ from: today });\n if (!this._isDateRangeAcceptable(range)) {\n return;\n }\n this.value = range;\n this._onDateSelected({ date: today, range, selected: true, type: 'date' });\n this._adapter.setCalendarActiveDate(today);\n }\n\n protected _onClear(): void {\n this._onDateSelected({ date: null, range: new DateRange(), selected: false, type: 'date' });\n this._closeCalendar(true);\n }\n\n protected _getCurrentValue(): IDatePickerRange | null | undefined {\n return this._value;\n }\n\n private _applyToMask(): void {\n if (this._masked) {\n this._initializeToMask();\n } else {\n this._adapter.destroyToMask();\n this._formatToInputValue();\n }\n }\n\n private _formatToInputValue(): void {\n const inputValue = this._adapter.getToInputValue();\n if (inputValue) {\n const parsedDate = this._parseDateString(inputValue);\n if (isValidDate(parsedDate) && this._isDateValueAcceptable(parsedDate)) {\n const formattedDate = this._formatDate(parsedDate);\n if (formattedDate) {\n this._adapter.setToInputValue(formattedDate, this._notifyInputValueChanges);\n }\n } else {\n if (!this._allowInvalidDate) {\n this._adapter.setToInputValue('', this._notifyInputValueChanges);\n }\n }\n }\n }\n\n protected _setFormattedInputValue(suppressValueChanges?: boolean): void {\n let formattedDate = this._formatDate(this._from);\n if (!formattedDate && !this._allowInvalidDate) {\n formattedDate = '';\n }\n this._adapter.setInputValue(formattedDate, suppressValueChanges ? false : this._notifyInputValueChanges);\n }\n\n private _setFormattedToInputValue(suppressValueChanges?: boolean): void {\n let formattedDate = this._formatDate(this._to);\n if (!formattedDate && !this._allowInvalidDate) {\n formattedDate = '';\n }\n this._adapter.setToInputValue(formattedDate, suppressValueChanges ? false : this._notifyInputValueChanges);\n }\n\n protected _isDateRangeAcceptable(value?: DateRange | null | undefined): boolean {\n if (!value?.to) {\n return true;\n }\n\n const passesMinDate = (): boolean => this._isDateValueAcceptable(value.from);\n const passesMaxDate = (): boolean => this._isDateValueAcceptable(value.to);\n const passesDateRange = (): boolean => value?.from && value?.to ? value.from.getTime() <= value.to.getTime() : true;\n\n return passesMinDate() && passesMaxDate() && passesDateRange();\n }\n\n protected _setValue(value: Date | null | undefined): void {\n if (this._isDateValueAcceptable(value)) {\n this._from = value || null;\n if (!this._value) {\n this._value = { from: this._from, to: this._to };\n } else {\n this._value.from = this._from;\n }\n }\n }\n\n private _setToValue(value: Date | null | undefined): void {\n if (this._isDateValueAcceptable(value)) {\n this._to = value || null;\n if (!this._value) {\n this._value = { from: this._from, to: this._to };\n } else {\n this._value.to = this._to;\n }\n }\n }\n\n protected _onDateSelected(event: ICalendarDateSelectEventData): void {\n const value = event.range;\n\n if (event.rangeSelectionState === 'to') {\n this._closeCalendar(true);\n }\n\n if (!this._emitChangeEvent(value ?? null)) {\n return;\n }\n\n const formattedFromValue = this._formatDate((value && value.from) || null);\n const formattedToValue = this._formatDate((value && value.to) || null);\n this._adapter.setInputValue(formattedFromValue, this._notifyInputValueChanges);\n this._adapter.setToInputValue(formattedToValue, this._notifyInputValueChanges);\n this._formatInputValue();\n this._formatToInputValue();\n\n this._from = (value && value.from) || null;\n this._to = (value && value.to) || null;\n\n if (!Platform.isMobile) {\n if (formattedToValue) {\n this._adapter.selectToInputText();\n } else {\n this._adapter.selectInputText();\n }\n }\n }\n\n protected override _applyMin(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(new DateRange({ to: this._to || undefined }), true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined }), true);\n this._setFormattedToInputValue();\n }\n super._applyMin();\n }\n\n protected override _applyMax(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(new DateRange({ to: this._to || undefined }), true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined }), true);\n this._setFormattedToInputValue();\n }\n super._applyMax();\n }\n\n protected _initializeToMask(): void {\n if (!this._masked) {\n return;\n }\n\n const options: IDateInputMaskOptions = {\n showMaskFormat: this._showMaskFormat && this._adapter.isInputFocused(),\n pattern: this._maskFormat,\n onChange: (value: string) => this._handleToInput(value)\n };\n\n if (this._prepareMaskCallback) {\n options.prepareCallback = (value, masked, flags, maskInstance) => {\n return this._prepareMaskCallback.call(null, value, masked, flags, maskInstance);\n };\n }\n\n this._adapter.initializeToMask(options);\n }\n\n protected _applyDisabledDates(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(new DateRange({ to: this._to || undefined }), true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined }), true);\n this._setFormattedToInputValue();\n }\n }\n\n protected _applyDisabledDaysOfWeek(): void {\n if (this._from && !this._isDateValueAcceptable(this._from)) {\n this._emitChangeEvent(null, true);\n this._setFormattedInputValue();\n }\n if (this._to && !this._isDateValueAcceptable(this._to)) {\n this._emitChangeEvent(null, true);\n this._setFormattedToInputValue();\n }\n }\n\n private _onToInput(evt: Event): void {\n this._handleInput(this._adapter.getInputValue());\n }\n\n protected _handleInput(value: string): void {\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (this._masked) {\n this._adapter.emitInputEvent(DATE_RANGE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);\n }\n if (!isSameDate(date, this._from) && this._isDateValueAcceptable(date)) {\n this._emitChangeEvent(new DateRange({ from: date || undefined, to: this._to || undefined }));\n }\n }\n\n private _handleToInput(value: string): void {\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (this._masked) {\n this._adapter.emitToInputEvent(DATE_RANGE_PICKER_CONSTANTS.events.INPUT, sanitizedValue);\n }\n if (!isSameDate(date, this._to) && this._isDateValueAcceptable(date)) {\n this._emitChangeEvent(new DateRange({ from: this._from || undefined, to: date || undefined }));\n }\n }\n\n private _onToInputFocus(): void {\n if (this.masked && this._showMaskFormat) {\n this._initializeMask();\n this._initializeToMask();\n }\n this._adapter.selectToInputText();\n }\n\n private _onToInputBlur(evt: FocusEvent): void {\n if (this._masked && !this._adapter.isInputFocused(evt.relatedTarget)) {\n this._initializeMask();\n this._initializeToMask();\n }\n\n this._formatToInputValue();\n\n if (this._open) {\n this._closeCalendar(true);\n }\n }\n\n protected override _onInputFocus(evt: FocusEvent): void {\n if (this.masked && this._showMaskFormat) {\n this._initializeMask();\n this._initializeToMask();\n }\n this._adapter.selectInputText();\n }\n\n protected override _onInputBlur(evt: FocusEvent): void {\n if (this.masked && !this._adapter.isInputFocused(evt.relatedTarget)) {\n this._initializeMask();\n this._initializeToMask();\n }\n\n this._formatInputValue();\n\n if (this._open && !this._adapter.isInputFocused(evt.relatedTarget)) {\n this._closeCalendar(true);\n }\n }\n\n protected _onInputValueChanged(value: string): void {\n if (this._masked) {\n return;\n }\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (!isSameDate(date, this._from)) {\n this.from = date;\n this._emitChangeEvent(new DateRange({ from: date || undefined, to: this._to || undefined }));\n }\n }\n\n private _onToInputValueChanged(value: string): void {\n if (this._masked) {\n return;\n }\n const sanitizedValue = this._getSanitizedDateString(value);\n const date = this._coerceDateValue(sanitizedValue);\n if (!isSameDate(date, this._to)) {\n this.to = date;\n this._emitChangeEvent(new DateRange({ from: this._from || undefined, to: date || undefined }));\n }\n }\n\n public get value(): IDatePickerRange | null | undefined {\n return { from: this.from, to: this.to };\n }\n public set value(value: IDatePickerRange | null | undefined) {\n if (!value) {\n value = { from: null, to: null };\n }\n\n if (value.from === undefined) {\n value.from = null;\n }\n\n if (value.to === undefined) {\n value.to = null;\n }\n\n this.from = value.from;\n this.to = value.to;\n\n this._value = { from: this.from, to: this.to };\n }\n\n public get from(): Date | string | null | undefined {\n const date = this._getTypedValue(this._from);\n\n if (!date) {\n return null;\n }\n\n if (isDate(date)) {\n return new Date(date.getTime());\n }\n\n return date;\n }\n public set from(value: Date | string | null | undefined) {\n if (this._from !== value) {\n this._setValue(this._coerceDateValue(value));\n if (this._isInitialized) {\n this._setFormattedInputValue();\n if (this._open) {\n this._adapter.setCalendarValue(new DateRange({ from: this._coerceDateValue(value) || undefined, to: this._coerceDateValue(this._to) || undefined }));\n }\n }\n }\n }\n\n public get to(): Date | string | null | undefined {\n const date = this._getTypedValue(this._to);\n\n if (!date) {\n return null;\n }\n\n if (isDate(date)) {\n return new Date(date.getTime());\n }\n\n return date;\n }\n public set to(value: Date | string | null | undefined) {\n if (this._to !== value) {\n this._setToValue(this._coerceDateValue(value));\n if (this._isInitialized) {\n this._setFormattedToInputValue();\n if (this._open) {\n this._adapter.setCalendarValue(new DateRange({ to: this._coerceDateValue(value) || undefined, from: this._coerceDateValue(this._from) || undefined }));\n }\n }\n }\n }\n}\n", "import { attachShadowTemplate, CustomElement, FoundationProperty } from '@tylertech/forge-core';\nimport { tylIconDateRange } from '@tylertech/tyler-icons/standard';\nimport { CalendarComponent } from '../calendar';\nimport { BaseDatePickerComponent, IBaseDatePickerComponent } from '../date-picker/base/base-date-picker';\nimport { BASE_DATE_PICKER_CONSTANTS } from '../date-picker/base/base-date-picker-constants';\nimport { IconComponent, IconRegistry } from '../icon';\nimport { IconButtonComponent } from '../icon-button';\nimport { PopupComponent } from '../popup';\nimport { DateRangePickerAdapter } from './date-range-picker-adapter';\nimport { DATE_RANGE_PICKER_CONSTANTS, IDatePickerRange, IDateRangePickerChangeEventData } from './date-range-picker-constants';\nimport { DateRangePickerFoundation } from './date-range-picker-foundation';\n\nconst template = '<template><slot></slot></template>';\nconst styles = ':host{display:block}:host([hidden]){display:none}';\n\nexport interface IDateRangePickerComponent extends IBaseDatePickerComponent<IDatePickerRange> {\n from: Date | string | null | undefined;\n to: Date | string | null | undefined;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'forge-date-range-picker': IDateRangePickerComponent;\n }\n\n interface HTMLElementEventMap {\n 'forge-date-range-picker-change': CustomEvent<IDateRangePickerChangeEventData>;\n 'forge-date-range-picker-open': CustomEvent<void>;\n 'forge-date-range-picker-close': CustomEvent<void>;\n 'forge-date-range-picker-input': CustomEvent<string>;\n }\n}\n\n/**\n * The custom element class behind the `<forge-date-range-picker>` element.\n * \n * @tag forge-date-range-picker\n */\n@CustomElement({\n name: DATE_RANGE_PICKER_CONSTANTS.elementName,\n dependencies: [\n PopupComponent,\n CalendarComponent,\n IconButtonComponent,\n IconComponent\n ]\n})\nexport class DateRangePickerComponent extends BaseDatePickerComponent<IDatePickerRange, IDatePickerRange, DateRangePickerFoundation> implements IDateRangePickerComponent {\n public static get observedAttributes(): string[] {\n return [\n ...Object.values(BASE_DATE_PICKER_CONSTANTS.observedAttributes),\n DATE_RANGE_PICKER_CONSTANTS.observedAttributes.FROM,\n DATE_RANGE_PICKER_CONSTANTS.observedAttributes.TO\n ];\n }\n\n constructor() {\n super();\n IconRegistry.define(tylIconDateRange);\n attachShadowTemplate(this, template, styles);\n this._foundation = new DateRangePickerFoundation(new DateRangePickerAdapter(this));\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case DATE_RANGE_PICKER_CONSTANTS.observedAttributes.FROM:\n this.from = newValue;\n return;\n case DATE_RANGE_PICKER_CONSTANTS.observedAttributes.TO:\n this.to = newValue;\n return;\n }\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n\n /** Gets/sets the \"from\" date range value. */\n @FoundationProperty()\n public declare from: Date | string | null | undefined;\n\n /** Gets/sets the \"to\" date range value. */\n @FoundationProperty()\n public declare to: Date | string | null | undefined;\n}\n", "import { FormFieldComponentDelegate, IFormFieldComponentDelegateOptions, IBaseComponentDelegateConfig } from '../core/delegates';\nimport { FieldDensityType } from '../field/field-constants';\nimport { ITextFieldComponent, TEXT_FIELD_CONSTANTS } from '../text-field';\nimport { IDateRangePickerComponent } from './date-range-picker';\nimport { DATE_RANGE_PICKER_CONSTANTS, IDateRangePickerChangeEventData } from './date-range-picker-constants';\n\nexport type DateRangePickerComponentDelegateProps = Partial<IDateRangePickerComponent>;\nexport interface IDateRangePickerComponentDelegateOptions extends IFormFieldComponentDelegateOptions {\n useDropdownIcon?: boolean;\n fromPlaceholder?: string;\n toPlaceholder?: string;\n label?: string;\n required?: boolean;\n density?: FieldDensityType;\n}\nexport interface IDateRangePickerComponentDelegateConfig extends IBaseComponentDelegateConfig<IDateRangePickerComponent, IDateRangePickerComponentDelegateOptions> {}\n\nexport class DateRangeComponentDelegate extends FormFieldComponentDelegate<IDateRangePickerComponent, IDateRangePickerComponentDelegateOptions> {\n private _textField: ITextFieldComponent;\n private _fromInput: HTMLInputElement;\n private _toInput: HTMLInputElement;\n\n constructor(config?: IDateRangePickerComponentDelegateConfig) {\n super(config);\n }\n\n protected _build(): IDateRangePickerComponent {\n const dateRangePicker = document.createElement(DATE_RANGE_PICKER_CONSTANTS.elementName) as IDateRangePickerComponent;\n this._attachTextField(dateRangePicker);\n return dateRangePicker;\n }\n\n public get fromInput(): HTMLInputElement {\n return this._textField.querySelector(`input[${TEXT_FIELD_CONSTANTS.attributes.MULTI_INPUT}-0]`) as HTMLInputElement;\n }\n\n public get toInput(): HTMLInputElement {\n return this._textField.querySelector(`input[${TEXT_FIELD_CONSTANTS.attributes.MULTI_INPUT}-1]`) as HTMLInputElement;\n }\n\n public get textField(): ITextFieldComponent {\n return this._textField;\n }\n\n public get value(): any {\n return this._element.value;\n }\n public set value(value: any) {\n this._element.value = value;\n }\n\n public get disabled(): boolean {\n return this._element.disabled;\n }\n public set disabled(value: boolean) {\n this._element.disabled = value;\n }\n\n public get invalid(): boolean {\n return this._textField.invalid || false;\n }\n public set invalid(value: boolean) {\n this._textField.invalid = value;\n }\n\n public onChange(listener: (value: IDateRangePickerChangeEventData) => void): void {\n this._element.addEventListener(DATE_RANGE_PICKER_CONSTANTS.events.CHANGE, (evt: CustomEvent<IDateRangePickerChangeEventData>) => listener(evt.detail));\n }\n\n public onFocus(listener: (evt: FocusEvent) => void): void {\n this._element.addEventListener('focusin', (evt: FocusEvent) => {\n const isFocusWithin = !this._element.contains(evt.relatedTarget as Node);\n if (isFocusWithin) {\n listener(evt);\n }\n });\n }\n\n public onBlur(listener: (evt: FocusEvent) => void): void {\n this._element.addEventListener('focusout', (evt: FocusEvent) => {\n const isFocusOutside = !this._element.contains(evt.relatedTarget as Node);\n if (isFocusOutside) {\n listener(evt);\n }\n });\n }\n\n private _attachTextField(dateRangePicker: IDateRangePickerComponent): void {\n this._textField = document.createElement(TEXT_FIELD_CONSTANTS.elementName);\n\n if (this._config.options?.required) {\n this._textField.required = true;\n }\n if (this._config.options?.density) {\n this._textField.density = this._config.options.density;\n }\n\n this._fromInput = document.createElement('input');\n this._fromInput.type = 'text';\n this._fromInput.placeholder = this._config.options?.fromPlaceholder || 'From';\n this._textField.appendChild(this._fromInput);\n\n this._toInput = document.createElement('input');\n this._toInput.type = 'text';\n this._toInput.placeholder = this._config.options?.toPlaceholder || 'To';\n this._textField.appendChild(this._toInput);\n\n const label = document.createElement('label');\n label.textContent = this._config.options?.label || 'Choose date range';\n this._textField.appendChild(label);\n\n dateRangePicker.appendChild(this._textField);\n }\n}\n", "import { defineCustomElement } from '@tylertech/forge-core';\nimport { DateRangePickerComponent } from './date-range-picker';\n\nexport * from './date-range-picker';\nexport * from './date-range-picker-adapter';\nexport * from './date-range-picker-constants';\nexport * from './date-range-picker-foundation';\nexport * from './date-range-picker-component-delegate';\n\nexport function defineDateRangePickerComponent(): void {\n defineCustomElement(DateRangePickerComponent);\n}\n"],
5
- "mappings": "y4BAEA,IAAMA,EAA2C,GAAGC,qBAEvCC,EAAN,KAAkD,CAGvD,YAAYC,EAA0B,CAChCA,IACF,KAAK,KAAOA,EAAM,KAClB,KAAK,GAAKA,EAAM,GAEpB,CAEO,MAAwB,CAC7B,OAAO,IAAID,EAAgB,IAAI,CACjC,CACF,EAOME,EAAqB,CACzB,KAAM,OACN,GAAI,KACJ,UAAW,WACb,EAEMC,EAAY,CAChB,MAAO,OACT,EAEMC,EAAS,CACb,OAAQ,GAAGN,WACX,KAAM,GAAGA,SACT,MAAO,GAAGA,UACV,MAAO,GAAGA,SACZ,EAEaO,EAA8B,CACzC,YAAAP,EACA,UAAAK,EACA,OAAAC,EACA,mBAAAF,CACF,ECtBO,IAAMI,EAAN,cAAqCC,CAAoF,CAQ9H,YAAYC,EAAqC,CAC/C,MAAMA,CAAS,EACf,KAAK,oBAAsB,2BAA2B,KAAK,aAC7D,CAEU,kBAAyB,CA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EAAsB,UACxB,KAAK,WAAW,QAAU,KAAK,QAAQ,QAAQ,SAGjD,KAAK,WAAa,SAAS,cAAc,OAAO,EAChD,KAAK,WAAW,KAAO,OACvB,KAAK,WAAW,cAAcC,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,kBAAmB,OACvE,KAAK,WAAW,YAAY,KAAK,UAAU,EAE3C,KAAK,SAAW,SAAS,cAAc,OAAO,EAC9C,KAAK,SAAS,KAAO,OACrB,KAAK,SAAS,cAAcC,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,gBAAiB,KACnE,KAAK,WAAW,YAAY,KAAK,QAAQ,EAEzC,IAAME,EAAQ,SAAS,cAAc,OAAO,EAC5CA,EAAM,cAAcD,EAAA,KAAK,QAAQ,UAAb,YAAAA,EAAsB,QAAS,oBACnD,KAAK,WAAW,YAAYC,CAAK,EAEjCX,EAAgB,YAAY,KAAK,UAAU,CAC7C,CACF,ECxGO,SAASY,IAAuC,CACrDC,EAAoBC,CAAwB,CAC9C",
6
- "names": ["elementName", "COMPONENT_NAME_PREFIX", "DatePickerRange", "range", "observedAttributes", "selectors", "events", "DATE_RANGE_PICKER_CONSTANTS", "DateRangePickerAdapter", "BaseDatePickerAdapter", "component", "DATE_RANGE_PICKER_CONSTANTS", "targetElement", "CalendarDropdown", "fromOptions", "_a", "DateInputMask", "toOptions", "input", "tryCreateAriaControlsPlaceholder", "setAriaControls", "type", "listener", "capture", "context", "destroyListenerCb", "listenOwnProperty", "calendarConfig", "dropdownConfig", "id", "value", "emitEvents", "target", "activeEl", "getActiveElement", "isDisabled", "data", "emitEvent", "createToggleElement", "action", "DateRangePickerFoundation", "BaseDatePickerFoundation", "adapter", "evt", "value", "emitOpenEvent", "currentValue", "force", "typedStartValue", "typedEndValue", "detail", "DatePickerRange", "DATE_RANGE_PICKER_CONSTANTS", "today", "range", "DateRange", "inputValue", "parsedDate", "isValidDate", "formattedDate", "suppressValueChanges", "passesMinDate", "passesMaxDate", "passesDateRange", "event", "formattedFromValue", "formattedToValue", "Platform", "options", "masked", "flags", "maskInstance", "sanitizedValue", "date", "isSameDate", "isDate", "template", "styles", "DateRangePickerComponent", "BaseDatePickerComponent", "IconRegistry", "tylIconDateRange", "attachShadowTemplate", "DateRangePickerFoundation", "DateRangePickerAdapter", "BASE_DATE_PICKER_CONSTANTS", "DATE_RANGE_PICKER_CONSTANTS", "name", "oldValue", "newValue", "__decorateClass", "FoundationProperty", "CustomElement", "PopupComponent", "CalendarComponent", "IconButtonComponent", "IconComponent", "DateRangeComponentDelegate", "FormFieldComponentDelegate", "config", "dateRangePicker", "DATE_RANGE_PICKER_CONSTANTS", "TEXT_FIELD_CONSTANTS", "value", "listener", "evt", "_a", "_b", "_c", "_d", "_e", "label", "defineDateRangePickerComponent", "defineCustomElement", "DateRangePickerComponent"]
7
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Tyler Technologies, Inc.
4
- * License: Apache-2.0
5
- */
6
- import{e as E}from"./chunk.DONAMICM.js";import{d as f}from"./chunk.DBKVUCUQ.js";import{a as t}from"./chunk.IX2UHMIM.js";import{a as m}from"./chunk.UWYANU5D.js";import{a as r}from"./chunk.KTGSZEAG.js";import{g as n,l as g}from"./chunk.LJLEPTLU.js";import{f as _,g as b,m as u,o as L,s as c,t as h,z as v}from"./chunk.4LA6HEA7.js";import{k as d}from"./chunk.J2M2MXP2.js";import{f as o}from"./chunk.MCIQXNKY.js";var S=class extends m{constructor(e){super(e);this._valueChangeListeners=[]}initialize(e){this._rootElement=n(this._component,e),this._labelSlot=n(this._component,"slot[name=label]"),this._leadingSlot=n(this._component,"slot[name=leading]"),this._trailingSlot=n(this._component,"slot[name=trailing]"),this._addonEndSlot=n(this._component,"slot[name=addon-end]"),this._inputElement=this._component.querySelector("input:not([type=checkbox]):not([type=radio])"),this.detectLabel()}destroy(){this._inputMutationObserver&&this._inputMutationObserver.disconnect()}hasLabel(){return!!this._labelElement}ensureSlottedLabel(){this._labelElement.slot="label"}addLabelSlotListener(e){this._labelSlot.addEventListener("slotchange",e)}removeLabelSlotListener(e){this._labelSlot&&this._labelSlot.removeEventListener("slotchange",e)}addLeadingSlotListener(e){this._leadingSlot.addEventListener("slotchange",e)}removeLeadingSlotListener(e){this._leadingSlot&&this._leadingSlot.removeEventListener("slotchange",e)}addTrailingSlotListener(e){this._trailingSlot.addEventListener("slotchange",e)}removeTrailingSlotListener(e){this._trailingSlot&&this._trailingSlot.removeEventListener("slotchange",e)}addAddonEndSlotListener(e){this._addonEndSlot.addEventListener("slotchange",e)}removeAddonEndSlotListener(e){this._addonEndSlot&&this._addonEndSlot.removeEventListener("slotchange",e)}addInputListener(e,s){this._inputElement.addEventListener(e,s)}removeInputListener(e,s){this._inputElement&&this._inputElement.removeEventListener(e,s)}setValueChangedListener(e,s){this.destroyValueChangeListener();let a=E(e,this._inputElement,"value",s);this._valueChangeListeners.push(a)}destroyValueChangeListener(){this._valueChangeListeners.forEach(e=>e())}detectLabel(){this._labelElement=this._component.querySelector("label")}initializeFloatingLabel(){return new f(this._labelElement)}inputHasValue(){return this._inputElement.value?this._inputElement.value.trim().length>0:!1}fieldHasValue(){return this.inputHasValue()}hasPlaceholder(){return this._inputElement.placeholder?this._inputElement.placeholder.trim().length>0:!1}inputHasFocus(e){return this._inputElement===e||this._inputElement===c(this._component.ownerDocument)}setLabelClass(e){this._labelElement&&this._labelElement.classList.add(e)}removeLabelClass(e){this._labelElement&&this._labelElement.classList.remove(e)}isLabelFloating(){return this._component.hasAttribute(t.attributes.HOST_LABEL_FLOATING)}setRoomy(e){h(this._rootElement,e,t.classes.ROOMY)}setDense(e){h(this._rootElement,e,t.classes.DENSE)}hasLeadingNodes(){return this._leadingSlot?this._leadingSlot.assignedNodes().length>0:!1}hasTrailingNodes(){return this._trailingSlot?this._trailingSlot.assignedNodes().length>0:!1}hasAddonEndNodes(){return this._addonEndSlot?this._addonEndSlot.assignedNodes().length>0:!1}setInputClass(e){this._inputElement.classList.add(e)}removeInputClass(e){this._inputElement.classList.remove(e)}setRootClass(e){_(e,this._rootElement)}removeRootClass(e){b(e,this._rootElement)}setInputAttributeObserver(e){this._inputMutationObserver=v(this._inputElement,e,t.observedInputAttributes)}isDisabled(){return this._inputElement.hasAttribute("disabled")}isReadonly(){return this._inputElement.hasAttribute("readonly")}getLabelWidth(e,s){return L(this._labelElement.innerText,{fontSize:e,fontFamily:s})}getLabelFontMetrics(){let e=getComputedStyle(this._labelElement);return{fontSize:parseInt(e.fontSize||"16",10),fontFamily:e.fontFamily||"Roboto"}}};var y=class{constructor(i){this._adapter=i;this._density="default";this._shape="default";this._invalid=!1;this._required=!1;this._floatLabelType="auto";this._isInitialized=!1;this._labelSlotListener=e=>this._onLabelSlotChanged(e),this._leadingSlotListener=e=>this._onLeadingSlotChanged(e),this._trailingSlotListener=e=>this._onTrailingSlotChanged(e),this._addonEndSlotListener=e=>this._onAddonEndSlotChanged(e),this._focusListener=e=>this._onFocus(e),this._blurListener=e=>this._onBlur(e),this._valueChangedListener=e=>this._onValueChanged(e),this._inputAttributeChangedListener=(e,s)=>this._onInputAttributeChanged(e,s)}initialize(){this._adapter.initialize(""),this._adapter.hasLabel()&&this._adapter.ensureSlottedLabel(),this._initializeLabel(),this._adapter.hasPlaceholder()&&(this._floatLabelType="always"),this._detectSlottedContent(),this._adapter.addLabelSlotListener(this._labelSlotListener),this._adapter.addLeadingSlotListener(this._leadingSlotListener),this._adapter.addTrailingSlotListener(this._trailingSlotListener),this._adapter.addAddonEndSlotListener(this._addonEndSlotListener),this._adapter.setValueChangedListener(this,this._valueChangedListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.setInputAttributeObserver(this._inputAttributeChangedListener),this._applyDensity(),this._setShapeType(),this._setValidity(),this._adapter.isDisabled()?this._adapter.setRootClass(t.classes.DISABLED):this._adapter.removeRootClass(t.classes.DISABLED),this._adapter.isReadonly()?this._adapter.setRootClass(t.classes.READONLY):this._adapter.removeRootClass(t.classes.READONLY),this._floatLabelType==="always"&&this.floatLabel(!0),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.destroy(),this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING),this._adapter.removeRootClass(t.classes.LABEL),this._floatingLabel&&(this._floatingLabel.destroy(),this._floatingLabel=void 0),this._adapter.removeLabelSlotListener(this._labelSlotListener),this._adapter.removeLeadingSlotListener(this._leadingSlotListener),this._adapter.removeTrailingSlotListener(this._trailingSlotListener),this._adapter.removeAddonEndSlotListener(this._addonEndSlotListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.destroyValueChangeListener()}get density(){return this._density}set density(i){if(this._density!==i){let e=this._density;this._density=i,this._isInitialized&&(this._applyDensity(),this._density==="dense"?this._destroyFloatingLabel({cancelFloat:!0}):e==="dense"&&this._initializeLabel()),this._adapter.setHostAttribute(t.attributes.DENSITY,this._density.toString())}}get floatLabelType(){return this._floatLabelType}set floatLabelType(i){this._floatLabelType!==i&&(this._floatLabelType=i,this._isInitialized&&this.floatLabel(this._floatLabelType==="always"),this._adapter.setHostAttribute(t.attributes.FLOAT_LABEL_TYPE,this._floatLabelType))}get shape(){return this._shape}set shape(i){this._shape!==i&&(this._shape=i,this._isInitialized&&this._setShapeType(),this._adapter.setHostAttribute(t.attributes.SHAPE,this._shape))}get invalid(){return this._invalid}set invalid(i){this._invalid!==i&&(this._invalid=i,this._isInitialized&&this._setValidity())}get required(){return this._required}set required(i){this._required!==i&&(this._required=i,this._isInitialized&&this._setValidity(),this._required?this._adapter.setHostAttribute(t.attributes.REQUIRED):this._adapter.removeHostAttribute(t.attributes.REQUIRED))}floatLabel(i){var e,s;if(((e=this._floatingLabel)==null?void 0:e.isFloating)===i||this._adapter.isLabelFloating()===i){i&&this._adapter.setHostAttribute(t.attributes.HOST_LABEL_FLOATING,"");return}if(!i&&this._floatLabelType==="always"){(s=this._floatingLabel)==null||s.float(!0,!0),this._adapter.setHostAttribute(t.attributes.HOST_LABEL_FLOATING,"");return}this._floatingLabel&&(this._floatingLabel.float(i,this._floatLabelType==="always"),i?(this._adapter.setInputClass(t.classes.INPUT_FOCUSED),this._adapter.setHostAttribute(t.attributes.HOST_LABEL_FLOATING,"")):(this._adapter.removeInputClass(t.classes.INPUT_FOCUSED),this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING)))}_onLabelSlotChanged(i){this._initializeLabel()}_onLeadingSlotChanged(i){this._detectLeadingContent()}_onTrailingSlotChanged(i){this._detectTrailingContent()}_onAddonEndSlotChanged(i){this._detectAddonEndContent()}_initializeLabel(){var i;(i=this._floatingLabel)==null||i.destroy(),this._adapter.detectLabel(),this._adapter.hasLabel()&&this._density!=="dense"?(this._floatingLabel=this._adapter.initializeFloatingLabel(),this.floatLabel(this._floatLabelType==="always"||this._adapter.fieldHasValue()||this._adapter.hasPlaceholder()),this._adapter.setRootClass(t.classes.LABEL)):this._destroyFloatingLabel()}_destroyFloatingLabel({cancelFloat:i=!1}={}){var e;this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING),this._adapter.removeRootClass(t.classes.LABEL),(e=this._floatingLabel)==null||e.destroy({cancelFloat:i}),this._floatingLabel=void 0}_detectLeadingContent(){this._adapter.hasLeadingNodes()?this._adapter.setRootClass(t.classes.LEADING):this._adapter.removeRootClass(t.classes.LEADING)}_detectTrailingContent(){this._adapter.hasTrailingNodes()?this._adapter.setRootClass(t.classes.TRAILING):this._adapter.removeRootClass(t.classes.TRAILING)}_detectAddonEndContent(){this._adapter.hasAddonEndNodes()?this._adapter.setRootClass(t.classes.ADDON_END):this._adapter.removeRootClass(t.classes.ADDON_END)}_detectSlottedContent(){this._detectLeadingContent(),this._detectTrailingContent(),this._detectAddonEndContent()}_onFocus(i){this._adapter.setRootClass(t.classes.FOCUSED),this._adapter.setLabelClass(t.classes.LABEL_FOCUSED),this.floatLabel(!0)}_onBlur(i){this._adapter.inputHasFocus(i.relatedTarget)||(this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeLabelClass(t.classes.LABEL_FOCUSED),!this._adapter.fieldHasValue()&&!this._adapter.hasPlaceholder()&&(this.floatLabel(!1),this._adapter.removeHostAttribute(t.attributes.HOST_LABEL_FLOATING)))}_onValueChanged(i){this._adapter.fieldHasValue()?this.floatLabel(!0):!this._adapter.inputHasFocus()&&!this._adapter.hasPlaceholder()&&this.floatLabel(!1)}_onInputAttributeChanged(i,e){switch(this._adapter.isDisabled()?(this._adapter.setRootClass(t.classes.DISABLED),this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeInputClass(t.classes.INPUT_FOCUSED),this._adapter.removeLabelClass(t.classes.LABEL_FOCUSED),!this._adapter.fieldHasValue()&&!this._adapter.hasPlaceholder()&&this._floatingLabel&&this.floatLabel(!1)):this._adapter.removeRootClass(t.classes.DISABLED),this._adapter.isReadonly()?this._adapter.setRootClass(t.classes.READONLY):(this._adapter.removeRootClass(t.classes.READONLY),this._adapter.removeRootClass(t.classes.FOCUSED),this._adapter.removeInputClass(t.classes.INPUT_FOCUSED)),i){case"readonly":case"disabled":this._adapter.inputHasFocus()&&(this._adapter.setRootClass(t.classes.FOCUSED),this._adapter.setInputClass(t.classes.INPUT_FOCUSED),this._adapter.setLabelClass(t.classes.LABEL_FOCUSED));break;case"value":this._floatingLabel&&this.floatLabel(this._adapter.fieldHasValue());break;case"placeholder":if(this._floatingLabel){let s=!!e&&!!e.trim()||this._adapter.fieldHasValue();s!==this._floatingLabel.isFloating&&this.floatLabel(s)}break}}_setShapeType(){this._shape==="rounded"?this._adapter.setRootClass(t.classes.SHAPE_ROUNDED):this._adapter.removeRootClass(t.classes.SHAPE_ROUNDED)}_setValidity(){this._invalid?this._adapter.setRootClass(t.classes.INVALID):this._adapter.removeRootClass(t.classes.INVALID),this._required?this._adapter.setRootClass(t.classes.REQUIRED):this._adapter.removeRootClass(t.classes.REQUIRED)}_applyDensity(){this._adapter.setRoomy(this._density==="roomy"),this._adapter.setDense(this._density==="dense")}};var l=class extends g{constructor(){super()}static get observedAttributes(){return[t.attributes.DENSITY,t.attributes.FLOAT_LABEL_TYPE,t.attributes.SHAPE,t.attributes.INVALID,t.attributes.REQUIRED]}connectedCallback(){this.querySelector(t.selectors.INPUT)?this._initialize():u(this,t.selectors.INPUT).then(()=>this._initialize())}_initialize(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,s,a){switch(e){case t.attributes.DENSITY:this.density=a;break;case t.attributes.FLOAT_LABEL_TYPE:this.floatLabelType=a;break;case t.attributes.SHAPE:this.shape=a;break;case t.attributes.INVALID:this.invalid=d(a);break;case t.attributes.REQUIRED:this.required=d(a);break}}floatLabel(e){this._foundation.floatLabel(e)}};o([r()],l.prototype,"density",2),o([r()],l.prototype,"floatLabelType",2),o([r()],l.prototype,"shape",2),o([r()],l.prototype,"invalid",2),o([r()],l.prototype,"required",2);export{S as a,y as b,l as c};
7
- //# sourceMappingURL=chunk.DK6EGV4J.js.map