@tylertech/forge 3.10.0 → 3.10.1

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.
@@ -87,7 +87,7 @@ export class AppBarProfileButtonAdapter extends BaseAdapter {
87
87
  async closePopup() {
88
88
  if (this._popupElement) {
89
89
  await this._popupElement.hideAsync();
90
- this._popupElement.remove();
90
+ this._popupElement?.remove();
91
91
  this._popupElement = undefined;
92
92
  this._profileCardElement = undefined;
93
93
  }
@@ -14,7 +14,7 @@ import { IconComponent, IconRegistry } from '../../icon';
14
14
  import { StateLayerComponent } from '../../state-layer';
15
15
  import { FocusIndicatorComponent } from '../../focus-indicator';
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-state-layer target=\"handle\" id=\"state-layer\" exportparts=\"surface:state-layer\"></forge-state-layer><forge-focus-indicator inward target=\"handle\" part=\"focus-indicator\"></forge-focus-indicator></div><div class=\"forge-split-view-panel__content\" id=\"content\" part=\"content\" role=\"group\"><slot></slot></div></div></template>';
17
- const styles = '.forge-split-view-panel{display:flex;width:100%;height:100%;overflow:hidden}.forge-split-view-panel__handle{color:var(--forge-theme-text-medium,rgba(0,0,0,.6));background-color:var(--forge-theme-outline,#e0e0e0);position:relative;display:flex;flex-shrink:0;justify-content:center;align-items:center;outline:0}.forge-split-view-panel__content{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:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{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;animation-name:uyqz2qh;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes uyqz2qh{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;animation-name:uyqz2r0;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes uyqz2r0{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:uyqz2r1;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes uyqz2r1{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;animation-name:uyqz2rg;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes uyqz2rg{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{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));flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{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;animation-name:uyqz2sd;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes uyqz2sd{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;animation-name:uyqz2sk;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes uyqz2sk{from{transform:none}to{transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:uyqz2st;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes uyqz2st{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;animation-name:uyqz2tq;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes uyqz2tq{from{transform:none}to{transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){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}forge-focus-indicator{--forge-focus-indicator-active-width:2px}';
17
+ const styles = '.forge-split-view-panel{display:flex;width:100%;height:100%;overflow:hidden}.forge-split-view-panel__handle{color:var(--forge-theme-text-medium,rgba(0,0,0,.6));background-color:var(--forge-theme-outline,#e0e0e0);position:relative;display:flex;flex-shrink:0;justify-content:center;align-items:center;outline:0}.forge-split-view-panel__content{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:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{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;animation-name:u79y01n;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u79y01n{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;animation-name:u79y02l;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u79y02l{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:u79y02v;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u79y02v{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;animation-name:u79y03q;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u79y03q{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{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));flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{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;animation-name:u79y04i;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u79y04i{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;animation-name:u79y04t;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u79y04t{from{transform:none}to{transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:u79y05l;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u79y05l{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;animation-name:u79y06f;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u79y06f{from{transform:none}to{transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){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}forge-focus-indicator{--forge-focus-indicator-active-width:2px}';
18
18
  /**
19
19
  * @tag forge-split-view-panel
20
20
  *
@@ -89,6 +89,7 @@ export declare class TimePickerCore implements ITimePickerCore {
89
89
  private _trySetValue;
90
90
  private _setValue;
91
91
  private _validateMillis;
92
+ private _isTimeInRange;
92
93
  private _isValidTimeFormat;
93
94
  private _isValidInputValue;
94
95
  private _onSelect;
@@ -367,10 +367,9 @@ export class TimePickerCore {
367
367
  }
368
368
  _validateMillis(millis) {
369
369
  // Trap for min/max validation
370
- if (typeof millis === 'number') {
371
- const isBelowMin = typeof this._min === 'number' && millis < this._min;
372
- const isAboveMax = typeof this._max === 'number' && millis > this._max;
373
- if (isBelowMin || isAboveMax) {
370
+ if (typeof millis === 'number' && (typeof this._min === 'number' || typeof this._max === 'number')) {
371
+ const isInValidRange = this._isTimeInRange(millis, this._min, this._max);
372
+ if (!isInValidRange) {
374
373
  millis = null;
375
374
  }
376
375
  }
@@ -382,6 +381,32 @@ export class TimePickerCore {
382
381
  }
383
382
  return millis;
384
383
  }
384
+ _isTimeInRange(millis, min, max) {
385
+ // If neither min nor max is set, everything is valid
386
+ if (typeof min !== 'number' && typeof max !== 'number') {
387
+ return true;
388
+ }
389
+ // If only min is set
390
+ if (typeof min === 'number' && typeof max !== 'number') {
391
+ return millis >= min;
392
+ }
393
+ // If only max is set
394
+ if (typeof max === 'number' && typeof min !== 'number') {
395
+ return millis <= max;
396
+ }
397
+ // Both min and max are set
398
+ if (typeof min === 'number' && typeof max === 'number') {
399
+ // Normal range: min <= max (e.g., 09:00 to 17:00)
400
+ if (min <= max) {
401
+ return millis >= min && millis <= max;
402
+ }
403
+ // Wrapped range: min > max (e.g., 23:30 to 06:00, crossing midnight)
404
+ else {
405
+ return millis >= min || millis <= max;
406
+ }
407
+ }
408
+ return true;
409
+ }
385
410
  _isValidTimeFormat(value) {
386
411
  if (!this._masked && typeof this._validationCallback === 'function') {
387
412
  return this._validationCallback.call(this, value);
@@ -547,20 +572,47 @@ export class TimePickerCore {
547
572
  const times = [];
548
573
  let leadingOptions = [];
549
574
  if (this._showHourOptions) {
550
- for (let totalMinutes = minMinutes; totalMinutes <= maxMinutes; totalMinutes += minuteStep) {
551
- if (totalMinutes === TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES) {
552
- break;
575
+ // Handle wrapped time ranges (e.g., 23:30 to 06:00)
576
+ const isWrappedRange = this._min != null && this._max != null && this._min > this._max;
577
+ if (isWrappedRange) {
578
+ // Generate times from min to end of day
579
+ for (let totalMinutes = minMinutes; totalMinutes < TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES; totalMinutes += minuteStep) {
580
+ const millis = minutesToMillis(totalMinutes);
581
+ const disabled = this._restrictedTimes.includes(millis);
582
+ const label = millisToTimeString(millis, this._use24HourTime, false) || '';
583
+ const value = { time: millis };
584
+ times.push({ label, value, disabled });
585
+ }
586
+ // Generate times from start of day to max
587
+ for (let totalMinutes = 0; totalMinutes <= maxMinutes; totalMinutes += minuteStep) {
588
+ const millis = minutesToMillis(totalMinutes);
589
+ const disabled = this._restrictedTimes.includes(millis);
590
+ const label = millisToTimeString(millis, this._use24HourTime, false) || '';
591
+ const value = { time: millis };
592
+ times.push({ label, value, disabled });
593
+ }
594
+ }
595
+ else {
596
+ // Normal range or no range restrictions
597
+ const startMinutes = this._min != null ? minMinutes : 0;
598
+ const endMinutes = this._max != null ? maxMinutes : TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES;
599
+ for (let totalMinutes = startMinutes; totalMinutes <= endMinutes; totalMinutes += minuteStep) {
600
+ if (totalMinutes === TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES) {
601
+ break;
602
+ }
603
+ const millis = minutesToMillis(totalMinutes);
604
+ const disabled = this._restrictedTimes.includes(millis);
605
+ const label = millisToTimeString(millis, this._use24HourTime, false) || '';
606
+ const value = { time: millis };
607
+ times.push({ label, value, disabled });
553
608
  }
554
- const millis = minutesToMillis(totalMinutes);
555
- const disabled = this._restrictedTimes.includes(millis);
556
- const label = millisToTimeString(millis, this._use24HourTime, false) || '';
557
- const value = { time: millis };
558
- times.push({ label, value, disabled });
559
609
  }
560
- // Add divider between AM/PM times
561
- const firstPmIndex = times.findIndex(t => t.value.time / 1000 / 60 >= 720);
562
- if (firstPmIndex >= 0 && firstPmIndex < times.length - 1) {
563
- times.splice(firstPmIndex, 0, { label: '', value: null, divider: true });
610
+ // Add divider between AM/PM times (only for normal ranges)
611
+ if (!isWrappedRange) {
612
+ const firstPmIndex = times.findIndex(t => t.value.time / 1000 / 60 >= 720);
613
+ if (firstPmIndex >= 0 && firstPmIndex < times.length - 1) {
614
+ times.splice(firstPmIndex, 0, { label: '', value: null, divider: true });
615
+ }
564
616
  }
565
617
  }
566
618
  // Check if we need to prepend a "Now" option
@@ -709,10 +761,16 @@ export class TimePickerCore {
709
761
  }
710
762
  this._min = this._convertTimeStringToMillis(value, true, this._allowSeconds);
711
763
  // Validate and reset our millis to ensure within range
764
+ const originalValue = this._value;
712
765
  const millis = this._validateMillis(this._value);
713
766
  this._setValue(millis);
714
767
  if (this._isInitialized) {
715
768
  this._applyValue(millis);
769
+ // Emit change event if the value was modified due to range validation
770
+ if (originalValue !== millis) {
771
+ const timeString = millisToTimeString(millis, true, this._allowSeconds);
772
+ this._emitChangeEvent(timeString);
773
+ }
716
774
  }
717
775
  }
718
776
  }
@@ -727,10 +785,16 @@ export class TimePickerCore {
727
785
  }
728
786
  this._max = this._convertTimeStringToMillis(value, true, this._allowSeconds);
729
787
  // Validate and reset our millis to ensure within range
788
+ const originalValue = this._value;
730
789
  const millis = this._validateMillis(this._value);
731
790
  this._setValue(millis);
732
791
  if (this._isInitialized) {
733
792
  this._applyValue(millis);
793
+ // Emit change event if the value was modified due to range validation
794
+ if (originalValue !== millis) {
795
+ const timeString = millisToTimeString(millis, true, this._allowSeconds);
796
+ this._emitChangeEvent(timeString);
797
+ }
734
798
  }
735
799
  }
736
800
  }
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": "3.10.0",
4
+ "version": "3.10.1",
5
5
  "author": "Tyler Technologies, Inc.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {