@tylertech/forge 3.9.0-dev.0 → 3.9.0-dev.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.
Files changed (117) hide show
  1. package/custom-elements.json +4276 -4167
  2. package/dist/lib.js +27 -105
  3. package/dist/lib.js.map +4 -4
  4. package/dist/vscode.css-custom-data.json +154 -147
  5. package/dist/vscode.html-custom-data.json +355 -368
  6. package/esm/app-bar/help-button/app-bar-help-button.js +1 -1
  7. package/esm/app-bar/menu-button/app-bar-menu-button.js +1 -1
  8. package/esm/app-bar/notification-button/app-bar-notification-button.js +1 -1
  9. package/esm/app-bar/search/app-bar-search.js +1 -1
  10. package/esm/autocomplete/autocomplete.js +1 -1
  11. package/esm/banner/banner.js +1 -1
  12. package/esm/button/base/base-button-adapter.js +1 -1
  13. package/esm/button/base/base-button.js +1 -1
  14. package/esm/calendar/calendar-adapter.d.ts +0 -24
  15. package/esm/calendar/calendar-adapter.js +1 -67
  16. package/esm/calendar/calendar-constants.d.ts +0 -34
  17. package/esm/calendar/calendar-constants.js +0 -33
  18. package/esm/calendar/calendar-core.d.ts +0 -60
  19. package/esm/calendar/calendar-core.js +2 -220
  20. package/esm/calendar/calendar-dom-utils.d.ts +0 -6
  21. package/esm/calendar/calendar-dom-utils.js +0 -36
  22. package/esm/calendar/calendar.d.ts +1 -40
  23. package/esm/calendar/calendar.js +3 -81
  24. package/esm/calendar/core/calendar-base.d.ts +0 -3
  25. package/esm/calendar/core/date-range.d.ts +0 -2
  26. package/esm/calendar/core/date-range.js +0 -1
  27. package/esm/chips/chip/chip.js +1 -1
  28. package/esm/color-picker/color-picker.js +1 -1
  29. package/esm/core/utils/dismissible-stack.d.ts +5 -1
  30. package/esm/core/utils/dismissible-stack.js +6 -0
  31. package/esm/data-table/body/body.d.ts +33 -0
  32. package/esm/data-table/body/body.js +42 -0
  33. package/esm/data-table/body/index.d.ts +6 -0
  34. package/esm/data-table/body/index.js +6 -0
  35. package/esm/data-table/cell/cell.d.ts +33 -0
  36. package/esm/data-table/cell/cell.js +42 -0
  37. package/esm/data-table/cell/index.d.ts +6 -0
  38. package/esm/data-table/cell/index.js +6 -0
  39. package/esm/data-table/column/column.d.ts +33 -0
  40. package/esm/data-table/column/column.js +42 -0
  41. package/esm/data-table/column/index.d.ts +6 -0
  42. package/esm/data-table/column/index.js +6 -0
  43. package/esm/data-table/footer/footer.d.ts +33 -0
  44. package/esm/data-table/footer/footer.js +42 -0
  45. package/esm/data-table/footer/index.d.ts +6 -0
  46. package/esm/data-table/footer/index.js +6 -0
  47. package/esm/data-table/head/head.d.ts +33 -0
  48. package/esm/data-table/head/head.js +42 -0
  49. package/esm/data-table/head/index.d.ts +6 -0
  50. package/esm/data-table/head/index.js +6 -0
  51. package/esm/data-table/index.d.ts +12 -0
  52. package/esm/data-table/index.js +12 -0
  53. package/esm/data-table/row/index.d.ts +6 -0
  54. package/esm/data-table/row/index.js +6 -0
  55. package/esm/data-table/row/row.d.ts +33 -0
  56. package/esm/data-table/row/row.js +42 -0
  57. package/esm/data-table/table/index.d.ts +6 -0
  58. package/esm/data-table/table/index.js +6 -0
  59. package/esm/data-table/table/table.d.ts +36 -0
  60. package/esm/data-table/table/table.js +40 -0
  61. package/esm/date-picker/base/base-date-picker-adapter.js +3 -0
  62. package/esm/date-picker/base/base-date-picker-constants.d.ts +0 -3
  63. package/esm/date-picker/base/base-date-picker-constants.js +0 -3
  64. package/esm/date-picker/base/base-date-picker-core.d.ts +0 -15
  65. package/esm/date-picker/base/base-date-picker-core.js +0 -30
  66. package/esm/date-picker/base/base-date-picker.d.ts +0 -12
  67. package/esm/date-picker/base/base-date-picker.js +0 -24
  68. package/esm/date-picker/date-picker-core.d.ts +0 -3
  69. package/esm/date-picker/date-picker-core.js +0 -20
  70. package/esm/date-picker/date-picker.js +1 -1
  71. package/esm/date-range-picker/date-range-picker-constants.d.ts +0 -3
  72. package/esm/date-range-picker/date-range-picker-constants.js +0 -1
  73. package/esm/date-range-picker/date-range-picker-core.d.ts +0 -3
  74. package/esm/date-range-picker/date-range-picker-core.js +2 -62
  75. package/esm/date-range-picker/date-range-picker.d.ts +0 -3
  76. package/esm/date-range-picker/date-range-picker.js +1 -4
  77. package/esm/icon/icon-constants.d.ts +2 -1
  78. package/esm/icon/icon-constants.js +2 -1
  79. package/esm/icon/icon-core.js +6 -2
  80. package/esm/icon/icon-utils.d.ts +2 -1
  81. package/esm/icon/icon-utils.js +2 -2
  82. package/esm/icon/icon.d.ts +3 -1
  83. package/esm/icon/icon.js +1 -1
  84. package/esm/icon-button/icon-button-core.js +11 -2
  85. package/esm/list-dropdown/list-dropdown-utils.js +1 -1
  86. package/esm/list-dropdown/list-dropdown.js +1 -1
  87. package/esm/menu/menu.js +1 -1
  88. package/esm/open-icon/open-icon.js +1 -1
  89. package/esm/paginator/paginator.js +1 -1
  90. package/esm/popover/popover-constants.d.ts +3 -0
  91. package/esm/popover/popover-constants.js +4 -2
  92. package/esm/popover/popover-core.d.ts +4 -0
  93. package/esm/popover/popover-core.js +20 -0
  94. package/esm/popover/popover.d.ts +4 -0
  95. package/esm/popover/popover.js +8 -0
  96. package/esm/select/select/select.js +1 -1
  97. package/esm/split-view/split-view-panel/split-view-panel.js +3 -4
  98. package/esm/stepper/step/step.js +1 -1
  99. package/esm/table/table-core.js +1 -0
  100. package/esm/table/table.js +1 -1
  101. package/esm/tabs/tab-bar/tab-bar-adapter.js +1 -1
  102. package/esm/tabs/tab-bar/tab-bar.js +1 -1
  103. package/esm/text-field/text-field.js +1 -1
  104. package/esm/time-picker/time-picker.js +1 -2
  105. package/esm/toast/toast.js +1 -1
  106. package/package.json +2 -2
  107. package/sass/calendar/_mixins.scss +2 -3
  108. package/sass/data-table/_core.scss +52 -0
  109. package/sass/data-table/_token-utils.scss +15 -0
  110. package/sass/data-table/body/body.scss +27 -0
  111. package/sass/data-table/cell/cell.scss +27 -0
  112. package/sass/data-table/column/column.scss +27 -0
  113. package/sass/data-table/footer/footer.scss +27 -0
  114. package/sass/data-table/head/head.scss +27 -0
  115. package/sass/data-table/index.scss +12 -0
  116. package/sass/data-table/row/row.scss +27 -0
  117. package/sass/data-table/table/table.scss +16 -0
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ * Copyright Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ import { TemplateResult } from 'lit';
7
+ import { CUSTOM_ELEMENT_NAME_PROPERTY } from '@tylertech/forge-core';
8
+ import { BaseLitElement } from '../../core/base/base-lit-element';
9
+ import '../cell/cell';
10
+ import '../column/column';
11
+ import '../row/row';
12
+ export interface IDataTableComponent extends BaseLitElement {
13
+ }
14
+ declare global {
15
+ interface HTMLElementTagNameMap {
16
+ 'forge-data-table': IDataTableComponent;
17
+ }
18
+ }
19
+ export declare const DATA_TABLE_TAG_NAME: keyof HTMLElementTagNameMap;
20
+ /**
21
+ * @tag forge-data-table
22
+ *
23
+ * @summary Data tables display information in a grid-like format of rows and columns.
24
+ *
25
+ * @csspart root - The root container element.
26
+ *
27
+ * @slot - The default slot for data table content.
28
+ *
29
+ * @cssclass forge-data-table - The data table class _(required)_.
30
+ */
31
+ export declare class DataTableComponent extends BaseLitElement implements IDataTableComponent {
32
+ static styles: import("lit").CSSResult;
33
+ /** @deprecated Used for compatibility with legacy Forge @customElement decorator. */
34
+ static [CUSTOM_ELEMENT_NAME_PROPERTY]: keyof HTMLElementTagNameMap;
35
+ render(): TemplateResult;
36
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license
3
+ * Copyright Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ var _a;
7
+ import { __decorate } from "tslib";
8
+ import { html, unsafeCSS } from 'lit';
9
+ import { customElement } from 'lit/decorators.js';
10
+ import { CUSTOM_ELEMENT_NAME_PROPERTY } from '@tylertech/forge-core';
11
+ import { BaseLitElement } from '../../core/base/base-lit-element';
12
+ import '../cell/cell';
13
+ import '../column/column';
14
+ import '../row/row';
15
+ const styles = ':host{display:block;display:table;width:100%;border-collapse:collapse}:host([hidden]){display:none}';
16
+ export const DATA_TABLE_TAG_NAME = 'forge-data-table';
17
+ /**
18
+ * @tag forge-data-table
19
+ *
20
+ * @summary Data tables display information in a grid-like format of rows and columns.
21
+ *
22
+ * @csspart root - The root container element.
23
+ *
24
+ * @slot - The default slot for data table content.
25
+ *
26
+ * @cssclass forge-data-table - The data table class _(required)_.
27
+ */
28
+ let DataTableComponent = class DataTableComponent extends BaseLitElement {
29
+ render() {
30
+ return html `<slot></slot></div>`;
31
+ }
32
+ };
33
+ _a = CUSTOM_ELEMENT_NAME_PROPERTY;
34
+ DataTableComponent.styles = unsafeCSS(styles);
35
+ /** @deprecated Used for compatibility with legacy Forge @customElement decorator. */
36
+ DataTableComponent[_a] = DATA_TABLE_TAG_NAME;
37
+ DataTableComponent = __decorate([
38
+ customElement(DATA_TABLE_TAG_NAME)
39
+ ], DataTableComponent);
40
+ export { DataTableComponent };
@@ -173,6 +173,9 @@ export class BaseDatePickerAdapter extends BaseAdapter {
173
173
  return;
174
174
  }
175
175
  const iconButtonElement = this._createToggleElement();
176
+ // if (textField.density === 'extra-small') {
177
+ // iconButtonElement.density = 'small';
178
+ // }
176
179
  textField.appendChild(iconButtonElement);
177
180
  this._toggleElement = iconButtonElement;
178
181
  }
@@ -48,9 +48,6 @@ export declare const BASE_DATE_PICKER_CONSTANTS: {
48
48
  VALUE_MODE: string;
49
49
  ALLOW_INVALID_DATE: string;
50
50
  SHOW_TODAY: string;
51
- SHOW_YESTERDAY: string;
52
- SHOW_LAST_SEVEN_DAYS: string;
53
- SHOW_LAST_THIRTY_DAYS: string;
54
51
  SHOW_CLEAR: string;
55
52
  DISABLED_DAYS_OF_WEEK: string;
56
53
  YEAR_RANGE: string;
@@ -15,9 +15,6 @@ const observedAttributes = {
15
15
  VALUE_MODE: 'value-mode',
16
16
  ALLOW_INVALID_DATE: 'allow-invalid-date',
17
17
  SHOW_TODAY: 'show-today',
18
- SHOW_YESTERDAY: 'show-yesterday',
19
- SHOW_LAST_SEVEN_DAYS: 'show-last-seven-days',
20
- SHOW_LAST_THIRTY_DAYS: 'show-last-thirty-days',
21
18
  SHOW_CLEAR: 'show-clear',
22
19
  DISABLED_DAYS_OF_WEEK: 'disabled-days-of-week',
23
20
  YEAR_RANGE: 'year-range',
@@ -49,9 +49,6 @@ export declare abstract class BaseDatePickerCore<TAdapter extends IBaseDatePicke
49
49
  protected _notifyInputValueChanges: boolean;
50
50
  protected _allowInvalidDate: boolean;
51
51
  protected _showToday: boolean;
52
- protected _showYesterday: boolean;
53
- protected _showLastSevenDays: boolean;
54
- protected _showLastThirtyDays: boolean;
55
52
  protected _showClear: boolean;
56
53
  protected _disabledDaysOfWeek: DayOfWeek[];
57
54
  protected _yearRange: string;
@@ -67,9 +64,6 @@ export declare abstract class BaseDatePickerCore<TAdapter extends IBaseDatePicke
67
64
  private _dropdownCloseListener;
68
65
  private _activeChangeListener;
69
66
  private _todayListener;
70
- private _yesterdayListener;
71
- private _lastSevenDaysListener;
72
- private _lastThirtyDaysListener;
73
67
  private _clearListener;
74
68
  private _dateSelectListener;
75
69
  private _monthChangeListener;
@@ -80,9 +74,6 @@ export declare abstract class BaseDatePickerCore<TAdapter extends IBaseDatePicke
80
74
  protected abstract _emitOpenEvent(): void;
81
75
  protected abstract _emitCloseEvent(): void;
82
76
  protected abstract _onToday(): void;
83
- protected abstract _onYesterday(): void;
84
- protected abstract _onLastSevenDays(): void;
85
- protected abstract _onLastThirtyDays(): void;
86
77
  protected abstract _onClear(): void;
87
78
  protected abstract _getCurrentValue(): TPrivateValue | null | undefined;
88
79
  protected abstract _setFormattedInputValue(suppressValueChanges?: boolean): void;
@@ -158,12 +149,6 @@ export declare abstract class BaseDatePickerCore<TAdapter extends IBaseDatePicke
158
149
  set prepareMaskCallback(cb: DatePickerPrepareMaskCallback);
159
150
  get showToday(): boolean;
160
151
  set showToday(value: boolean);
161
- get showYesterday(): boolean;
162
- set showYesterday(value: boolean);
163
- get showLastSevenDays(): boolean;
164
- set showLastSevenDays(value: boolean);
165
- get showLastThirtyDays(): boolean;
166
- set showLastThirtyDays(value: boolean);
167
152
  get showClear(): boolean;
168
153
  set showClear(value: boolean);
169
154
  get yearRange(): string;
@@ -24,9 +24,6 @@ export class BaseDatePickerCore {
24
24
  this._notifyInputValueChanges = true;
25
25
  this._allowInvalidDate = false;
26
26
  this._showToday = false;
27
- this._showYesterday = false;
28
- this._showLastSevenDays = false;
29
- this._showLastThirtyDays = false;
30
27
  this._showClear = false;
31
28
  this._yearRange = '-50:+50';
32
29
  this._calendarText = {};
@@ -42,9 +39,6 @@ export class BaseDatePickerCore {
42
39
  this._monthChangeListener = evt => this._onMonthChanged(evt);
43
40
  this._activeChangeListener = id => this._onActiveDescendantChanged(id);
44
41
  this._todayListener = () => this._onToday();
45
- this._yesterdayListener = () => this._onYesterday();
46
- this._lastSevenDaysListener = () => this._onLastSevenDays();
47
- this._lastThirtyDaysListener = () => this._onLastThirtyDays();
48
42
  this._clearListener = () => this._onClear();
49
43
  }
50
44
  initialize() {
@@ -124,14 +118,8 @@ export class BaseDatePickerCore {
124
118
  disabledDates: this._disabledDates,
125
119
  yearRange: this._yearRange,
126
120
  todayButton: this._showToday,
127
- yesterdayButton: this._showYesterday,
128
- lastSevenDaysButton: this._showLastSevenDays,
129
- lastThirtyDaysButton: this._showLastThirtyDays,
130
121
  clearButton: this._showClear,
131
122
  todayCallback: this._todayListener,
132
- yesterdayCallback: this._yesterdayListener,
133
- lastSevenDaysCallback: this._lastSevenDaysListener,
134
- lastThirtyDaysCallback: this._lastThirtyDaysListener,
135
123
  clearCallback: this._clearListener,
136
124
  disabledDateBuilder: this._disableDayCallback,
137
125
  disabledDaysOfWeek: this._disabledDaysOfWeek,
@@ -619,24 +607,6 @@ export class BaseDatePickerCore {
619
607
  set showToday(value) {
620
608
  this._showToday = value;
621
609
  }
622
- get showYesterday() {
623
- return this._showYesterday;
624
- }
625
- set showYesterday(value) {
626
- this._showYesterday = value;
627
- }
628
- get showLastSevenDays() {
629
- return this._showLastSevenDays;
630
- }
631
- set showLastSevenDays(value) {
632
- this._showLastSevenDays = value;
633
- }
634
- get showLastThirtyDays() {
635
- return this._showLastThirtyDays;
636
- }
637
- set showLastThirtyDays(value) {
638
- this._showLastThirtyDays = value;
639
- }
640
610
  get showClear() {
641
611
  return this._showClear;
642
612
  }
@@ -27,9 +27,6 @@ export interface IBaseDatePickerComponent<TValue> extends IBaseComponent {
27
27
  notifyInputValueChanges: boolean;
28
28
  allowInvalidDate: boolean;
29
29
  showToday: boolean;
30
- showYesterday: boolean;
31
- showLastSevenDays: boolean;
32
- showLastThirtyDays: boolean;
33
30
  showClear: boolean;
34
31
  disabledDaysOfWeek: DayOfWeek[];
35
32
  yearRange: string;
@@ -57,9 +54,6 @@ export interface IBaseDatePickerComponent<TValue> extends IBaseComponent {
57
54
  * @property {boolean} [showClear=false] - Whether the clear button is visible in the popup.
58
55
  * @property {boolean} [showMaskFormat=false] - Whether the mask format is displayed in the input or not. Only applies if `masked` is `true`.
59
56
  * @property {boolean} [showToday=false] - Whether the today button is visible in the popup.
60
- * @property {boolean} [showYesterday=false] - Whether the yesterday button is visible in the popup.
61
- * @property {boolean} [showLastSevenDays=false] - Whether the last seven days button is visible in the popup.
62
- * @property {boolean} [showLastThirtyDays=false] - Whether the last thirty days button is visible in the popup.
63
57
  * @property {TValue} value - The value of the date picker.
64
58
  * @property {DatePickerValueMode} valueMode - The type for the `value` property and `forge-date-picker-change` event.
65
59
  * @property {string} yearRange - The year range.
@@ -78,9 +72,6 @@ export interface IBaseDatePickerComponent<TValue> extends IBaseComponent {
78
72
  * @attribute {boolean} [show-clear=false] - Whether the clear button is visible in the popup.
79
73
  * @attribute {boolean} [show-mask-format=false] - Whether the mask format is displayed in the input or not. Only applies if `masked` is `true`.
80
74
  * @attribute {boolean} [show-today=false] - Whether the today button is visible in the popup.
81
- * @attribute {boolean} [show-yesterday=false] - Whether the yesterday button is visible in the popup.
82
- * @attribute {boolean} [show-last-seven-days=false] - Whether the last seven days button is visible in the popup.
83
- * @attribute {boolean} [show-last-thirty-days=false] - Whether the last thirty days button is visible in the popup.
84
75
  * @attribute {DatePickerValueMode} [value-mode=string] - The type for the `value` property and `forge-date-picker-change` event.
85
76
  * @attribute {string} [year-range] - The year range.
86
77
  */
@@ -104,9 +95,6 @@ export declare abstract class BaseDatePickerComponent<TPublicValue, TPrivateValu
104
95
  notifyInputValueChanges: boolean;
105
96
  allowInvalidDate: boolean;
106
97
  showToday: boolean;
107
- showYesterday: boolean;
108
- showLastSevenDays: boolean;
109
- showLastThirtyDays: boolean;
110
98
  showClear: boolean;
111
99
  parseCallback: DatePickerParseCallback;
112
100
  formatCallback: DatePickerFormatCallback;
@@ -28,9 +28,6 @@ import { BASE_DATE_PICKER_CONSTANTS } from './base-date-picker-constants';
28
28
  * @property {boolean} [showClear=false] - Whether the clear button is visible in the popup.
29
29
  * @property {boolean} [showMaskFormat=false] - Whether the mask format is displayed in the input or not. Only applies if `masked` is `true`.
30
30
  * @property {boolean} [showToday=false] - Whether the today button is visible in the popup.
31
- * @property {boolean} [showYesterday=false] - Whether the yesterday button is visible in the popup.
32
- * @property {boolean} [showLastSevenDays=false] - Whether the last seven days button is visible in the popup.
33
- * @property {boolean} [showLastThirtyDays=false] - Whether the last thirty days button is visible in the popup.
34
31
  * @property {TValue} value - The value of the date picker.
35
32
  * @property {DatePickerValueMode} valueMode - The type for the `value` property and `forge-date-picker-change` event.
36
33
  * @property {string} yearRange - The year range.
@@ -49,9 +46,6 @@ import { BASE_DATE_PICKER_CONSTANTS } from './base-date-picker-constants';
49
46
  * @attribute {boolean} [show-clear=false] - Whether the clear button is visible in the popup.
50
47
  * @attribute {boolean} [show-mask-format=false] - Whether the mask format is displayed in the input or not. Only applies if `masked` is `true`.
51
48
  * @attribute {boolean} [show-today=false] - Whether the today button is visible in the popup.
52
- * @attribute {boolean} [show-yesterday=false] - Whether the yesterday button is visible in the popup.
53
- * @attribute {boolean} [show-last-seven-days=false] - Whether the last seven days button is visible in the popup.
54
- * @attribute {boolean} [show-last-thirty-days=false] - Whether the last thirty days button is visible in the popup.
55
49
  * @attribute {DatePickerValueMode} [value-mode=string] - The type for the `value` property and `forge-date-picker-change` event.
56
50
  * @attribute {string} [year-range] - The year range.
57
51
  */
@@ -107,15 +101,6 @@ export class BaseDatePickerComponent extends BaseComponent {
107
101
  case BASE_DATE_PICKER_CONSTANTS.observedAttributes.SHOW_TODAY:
108
102
  this.showToday = coerceBoolean(newValue);
109
103
  break;
110
- case BASE_DATE_PICKER_CONSTANTS.observedAttributes.SHOW_YESTERDAY:
111
- this.showYesterday = coerceBoolean(newValue);
112
- break;
113
- case BASE_DATE_PICKER_CONSTANTS.observedAttributes.SHOW_LAST_SEVEN_DAYS:
114
- this.showLastSevenDays = coerceBoolean(newValue);
115
- break;
116
- case BASE_DATE_PICKER_CONSTANTS.observedAttributes.SHOW_LAST_THIRTY_DAYS:
117
- this.showLastThirtyDays = coerceBoolean(newValue);
118
- break;
119
104
  case BASE_DATE_PICKER_CONSTANTS.observedAttributes.SHOW_CLEAR:
120
105
  this.showClear = coerceBoolean(newValue);
121
106
  break;
@@ -176,15 +161,6 @@ __decorate([
176
161
  __decorate([
177
162
  coreProperty()
178
163
  ], BaseDatePickerComponent.prototype, "showToday", void 0);
179
- __decorate([
180
- coreProperty()
181
- ], BaseDatePickerComponent.prototype, "showYesterday", void 0);
182
- __decorate([
183
- coreProperty()
184
- ], BaseDatePickerComponent.prototype, "showLastSevenDays", void 0);
185
- __decorate([
186
- coreProperty()
187
- ], BaseDatePickerComponent.prototype, "showLastThirtyDays", void 0);
188
164
  __decorate([
189
165
  coreProperty()
190
166
  ], BaseDatePickerComponent.prototype, "showClear", void 0);
@@ -16,9 +16,6 @@ export declare class DatePickerCore extends BaseDatePickerCore<IDatePickerAdapte
16
16
  protected _emitOpenEvent(): void;
17
17
  protected _emitCloseEvent(): void;
18
18
  protected _onToday(): void;
19
- protected _onYesterday(): void;
20
- protected _onLastSevenDays(): void;
21
- protected _onLastThirtyDays(): void;
22
19
  protected _onClear(): void;
23
20
  protected _getCurrentValue(): Date | null | undefined;
24
21
  protected _setFormattedInputValue(suppressValueChanges?: boolean): void;
@@ -37,26 +37,6 @@ export class DatePickerCore extends BaseDatePickerCore {
37
37
  this._tryMergeCurrentTime(today);
38
38
  this._onDateSelected({ date: today, selected: true, type: 'date' });
39
39
  }
40
- _onYesterday() {
41
- const today = new Date();
42
- const yesterday = new Date(today.setDate(today.getDate() - 1));
43
- this._tryMergeCurrentTime(yesterday);
44
- this._onDateSelected({ date: yesterday, selected: true, type: 'date' });
45
- }
46
- _onLastSevenDays() {
47
- // not a range, so setting the day to 7 days ago
48
- const today = new Date();
49
- const sevenDaysAgo = new Date(today.setDate(today.getDate() - 7));
50
- this._tryMergeCurrentTime(sevenDaysAgo);
51
- this._onDateSelected({ date: sevenDaysAgo, selected: true, type: 'date' });
52
- }
53
- _onLastThirtyDays() {
54
- // not a range, so setting the day to 30 days ago
55
- const today = new Date();
56
- const thirtyDaysAgo = new Date(today.setDate(today.getDate() - 7));
57
- this._tryMergeCurrentTime(thirtyDaysAgo);
58
- this._onDateSelected({ date: thirtyDaysAgo, selected: true, type: 'date' });
59
- }
60
40
  _onClear() {
61
41
  this._onDateSelected({ date: null, selected: false, type: 'date' });
62
42
  }
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { __decorate } from "tslib";
7
7
  import { attachShadowTemplate, customElement } from '@tylertech/forge-core';
8
- import { tylIconInsertInvitation } from '@tylertech/tyler-icons/standard';
8
+ import { tylIconInsertInvitation } from '@tylertech/tyler-icons';
9
9
  import { CalendarComponent } from '../calendar';
10
10
  import { IconComponent, IconRegistry } from '../icon';
11
11
  import { IconButtonComponent } from '../icon-button';
@@ -6,14 +6,12 @@
6
6
  export declare class DatePickerRange implements IDatePickerRange {
7
7
  from?: Date | string | null;
8
8
  to?: Date | string | null;
9
- rangeName?: string | null | undefined;
10
9
  constructor(range?: IDatePickerRange);
11
10
  copy(): DatePickerRange;
12
11
  }
13
12
  export interface IDatePickerRange {
14
13
  from?: Date | string | null;
15
14
  to?: Date | string | null;
16
- rangeName?: string | null | undefined;
17
15
  }
18
16
  export declare const DATE_RANGE_PICKER_CONSTANTS: {
19
17
  elementName: "forge-date-range-picker";
@@ -33,5 +31,4 @@ export declare const DATE_RANGE_PICKER_CONSTANTS: {
33
31
  };
34
32
  };
35
33
  export interface IDateRangePickerChangeEventData extends DatePickerRange {
36
- rangeName?: string | null | undefined;
37
34
  }
@@ -10,7 +10,6 @@ export class DatePickerRange {
10
10
  if (range) {
11
11
  this.from = range.from;
12
12
  this.to = range.to;
13
- this.rangeName = range.rangeName;
14
13
  }
15
14
  }
16
15
  copy() {
@@ -32,9 +32,6 @@ export declare class DateRangePickerCore extends BaseDatePickerCore<IDateRangePi
32
32
  protected _emitOpenEvent(): void;
33
33
  protected _emitCloseEvent(): void;
34
34
  protected _onToday(): void;
35
- protected _onYesterday(): void;
36
- protected _onLastSevenDays(): void;
37
- protected _onLastThirtyDays(): void;
38
35
  protected _onClear(): void;
39
36
  protected _getCurrentValue(): IDatePickerRange | null | undefined;
40
37
  private _applyToMask;
@@ -65,8 +65,7 @@ export class DateRangePickerCore extends BaseDatePickerCore {
65
65
  _emitChangeEvent(value, force) {
66
66
  const typedStartValue = this._getTypedValue((value && value.from) || null);
67
67
  const typedEndValue = this._getTypedValue((value && value.to) || null);
68
- const rangeName = (value && value.rangeName) || null;
69
- const detail = new DatePickerRange({ from: typedStartValue, to: typedEndValue, rangeName });
68
+ const detail = new DatePickerRange({ from: typedStartValue, to: typedEndValue });
70
69
  const wasCancelled = !this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.CHANGE, detail, true, !force);
71
70
  if (!wasCancelled) {
72
71
  this._setValue(this._coerceDateValue((value && value.from) || null));
@@ -82,14 +81,9 @@ export class DateRangePickerCore extends BaseDatePickerCore {
82
81
  this._adapter.emitHostEvent(DATE_RANGE_PICKER_CONSTANTS.events.CLOSE, undefined, false);
83
82
  }
84
83
  _onToday() {
85
- this._onClear();
86
84
  const today = new Date();
87
- const todayFrom = new Date();
88
- todayFrom.setHours(0, 0, 0, 0);
89
85
  this._tryMergeCurrentTime({ from: today });
90
- const range = this._open
91
- ? new DateRange({ from: this._from || todayFrom, to: this._to || today, rangeName: 'today' })
92
- : new DateRange({ from: todayFrom, to: today, rangeName: 'today' });
86
+ const range = this._open ? new DateRange({ from: this._from || today, to: this._to || undefined }) : new DateRange({ from: today });
93
87
  if (!this._isDateRangeAcceptable(range)) {
94
88
  return;
95
89
  }
@@ -97,60 +91,6 @@ export class DateRangePickerCore extends BaseDatePickerCore {
97
91
  this._onDateSelected({ date: today, range, selected: true, type: 'date' });
98
92
  this._adapter.setCalendarActiveDate(today);
99
93
  }
100
- _onYesterday() {
101
- this._onClear();
102
- const today = new Date();
103
- const yesterdayFrom = new Date(today.setDate(today.getDate() - 1));
104
- yesterdayFrom.setHours(0, 0, 0, 0);
105
- const yesterdayTo = new Date(yesterdayFrom);
106
- yesterdayTo.setHours(23, 59, 59, 0);
107
- this._tryMergeCurrentTime({ from: yesterdayFrom, to: yesterdayTo });
108
- const range = this._open
109
- ? new DateRange({ from: this._from || yesterdayFrom, to: this._to || yesterdayTo, rangeName: 'yesterday' })
110
- : new DateRange({ from: yesterdayFrom, to: yesterdayTo, rangeName: 'yesterday' });
111
- if (!this._isDateRangeAcceptable(range)) {
112
- return;
113
- }
114
- this.value = range;
115
- this._onDateSelected({ date: yesterdayFrom, range, selected: true, type: 'date' });
116
- this._adapter.setCalendarActiveDate(yesterdayFrom);
117
- }
118
- _onLastSevenDays() {
119
- this._onClear();
120
- const today = new Date();
121
- const lastSevenDaysFrom = new Date(today.setDate(today.getDate() - 7));
122
- lastSevenDaysFrom.setHours(0, 0, 0, 0);
123
- const lastSevenDaysTo = new Date();
124
- lastSevenDaysTo.setHours(23, 59, 59, 0);
125
- this._tryMergeCurrentTime({ from: lastSevenDaysFrom, to: lastSevenDaysTo });
126
- const range = this._open
127
- ? new DateRange({ from: this._from || lastSevenDaysFrom, to: this._to || lastSevenDaysTo, rangeName: 'last 7 days' })
128
- : new DateRange({ from: lastSevenDaysFrom, to: lastSevenDaysTo, rangeName: 'last 7 days' });
129
- if (!this._isDateRangeAcceptable(range)) {
130
- return;
131
- }
132
- this.value = range;
133
- this._onDateSelected({ date: lastSevenDaysFrom, range, selected: true, rangeSelectionState: 'from', type: 'date' });
134
- this._onDateSelected({ date: lastSevenDaysTo, range, selected: true, rangeSelectionState: 'to', type: 'date' });
135
- }
136
- _onLastThirtyDays() {
137
- this._onClear();
138
- const today = new Date();
139
- const lastThirtyDaysFrom = new Date(today.setDate(today.getDate() - 30));
140
- lastThirtyDaysFrom.setHours(0, 0, 0, 0);
141
- const lastThirtyDaysTo = new Date();
142
- lastThirtyDaysTo.setHours(23, 59, 59, 0);
143
- this._tryMergeCurrentTime({ from: lastThirtyDaysFrom, to: lastThirtyDaysTo });
144
- const range = this._open
145
- ? new DateRange({ from: this._from || lastThirtyDaysFrom, to: this._to || lastThirtyDaysTo, rangeName: 'last 30 days' })
146
- : new DateRange({ from: lastThirtyDaysFrom, to: lastThirtyDaysTo, rangeName: 'last 30 days' });
147
- if (!this._isDateRangeAcceptable(range)) {
148
- return;
149
- }
150
- this.value = range;
151
- this._onDateSelected({ date: lastThirtyDaysFrom, range, selected: true, rangeSelectionState: 'from', type: 'date' });
152
- this._onDateSelected({ date: lastThirtyDaysTo, range, selected: true, rangeSelectionState: 'to', type: 'date' });
153
- }
154
94
  _onClear() {
155
95
  this._onDateSelected({ date: null, range: new DateRange(), selected: false, type: 'date' });
156
96
  this._closeCalendar(true);
@@ -44,9 +44,6 @@ declare global {
44
44
  * @property {boolean} [notifyInputValueChanges=false] - Gets/sets the state of whether to notify input value changes.
45
45
  * @property {boolean} [allowInvalidDate=false] - Gets/sets the state of whether to allow invalid dates.
46
46
  * @property {boolean} [showToday=true] - Gets/sets the state of whether to show the "Today" button.
47
- * @property {boolean} [showYesterday=true] - Gets/sets the state of whether to show the "Yesterday" button.
48
- * @property {boolean} [showLastSevenDays=true] Gets/sets the state of whether to show the "Last 7 days" button.
49
- * @property {boolean} [showLastThirtyDays=true] Gets/sets the state of whether to show the "Last 30 days" button.
50
47
  * @property {boolean} [showClear=true] - Gets/sets the state of whether to show the "Clear" button.
51
48
  * @property {DayOfWeek[]} [disabledDaysOfWeek=[]] - Gets/sets the disabled days of the week.
52
49
  * @property {string} [yearRange=''] - Gets/sets the year range for the date range picker.
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { __decorate } from "tslib";
7
7
  import { attachShadowTemplate, customElement, coreProperty } from '@tylertech/forge-core';
8
- import { tylIconDateRange } from '@tylertech/tyler-icons/standard';
8
+ import { tylIconDateRange } from '@tylertech/tyler-icons';
9
9
  import { CalendarComponent } from '../calendar';
10
10
  import { BaseDatePickerComponent } from '../date-picker/base/base-date-picker';
11
11
  import { BASE_DATE_PICKER_CONSTANTS } from '../date-picker/base/base-date-picker-constants';
@@ -40,9 +40,6 @@ const styles = ':host{display:block}:host([hidden]){display:none}';
40
40
  * @property {boolean} [notifyInputValueChanges=false] - Gets/sets the state of whether to notify input value changes.
41
41
  * @property {boolean} [allowInvalidDate=false] - Gets/sets the state of whether to allow invalid dates.
42
42
  * @property {boolean} [showToday=true] - Gets/sets the state of whether to show the "Today" button.
43
- * @property {boolean} [showYesterday=true] - Gets/sets the state of whether to show the "Yesterday" button.
44
- * @property {boolean} [showLastSevenDays=true] Gets/sets the state of whether to show the "Last 7 days" button.
45
- * @property {boolean} [showLastThirtyDays=true] Gets/sets the state of whether to show the "Last 30 days" button.
46
43
  * @property {boolean} [showClear=true] - Gets/sets the state of whether to show the "Clear" button.
47
44
  * @property {DayOfWeek[]} [disabledDaysOfWeek=[]] - Gets/sets the disabled days of the week.
48
45
  * @property {string} [yearRange=''] - Gets/sets the year range for the date range picker.
@@ -31,9 +31,10 @@ export declare const ICON_CONSTANTS: {
31
31
  };
32
32
  strings: {
33
33
  DEFAULT_NETWORK_BASE_URL: string;
34
+ ALL_NETWORK_BASE_URL: string;
34
35
  };
35
36
  };
36
37
  export declare const ICON_REGISTRY_KEY: "forgeIcons";
37
38
  export type IconUrlBuilder = (name: string, type: IconExternalType) => string;
38
- export type IconExternalType = '' | 'custom' | 'standard' | 'extended';
39
+ export type IconExternalType = '' | 'custom' | 'standard' | 'extended' | 'all';
39
40
  export type IconTheme = Theme | 'text-medium' | 'text-low';
@@ -23,7 +23,8 @@ const numbers = {
23
23
  DEFAULT_HEIGHT: 24
24
24
  };
25
25
  const strings = {
26
- DEFAULT_NETWORK_BASE_URL: `${CDN_BASE_URL}v1/icons/svg`
26
+ DEFAULT_NETWORK_BASE_URL: `${CDN_BASE_URL}v1/icons/svg`,
27
+ ALL_NETWORK_BASE_URL: `${CDN_BASE_URL}v1/icons/svg/all`
27
28
  };
28
29
  export const ICON_CONSTANTS = {
29
30
  elementName,
@@ -11,7 +11,7 @@ export class IconCore {
11
11
  this._adapter = _adapter;
12
12
  this._lazy = false;
13
13
  this._external = false;
14
- this._externalType = 'standard';
14
+ this._externalType = 'all';
15
15
  this._lazyListener = this._loadIcon.bind(this);
16
16
  }
17
17
  initialize() {
@@ -125,7 +125,10 @@ export class IconCore {
125
125
  return this._externalUrlBuilder(name, type);
126
126
  }
127
127
  const setName = sanitizeExternalType(this._externalType);
128
- return `${ICON_CONSTANTS.strings.DEFAULT_NETWORK_BASE_URL}${setName ? `/${setName}` : ''}/${name}.svg`;
128
+ if (['standard', 'extended', 'custom'].includes(setName)) {
129
+ return `${ICON_CONSTANTS.strings.DEFAULT_NETWORK_BASE_URL}/${setName}/${name}.svg`;
130
+ }
131
+ return `${ICON_CONSTANTS.strings.ALL_NETWORK_BASE_URL}/${name}.svg`;
129
132
  }
130
133
  get name() {
131
134
  return this._name;
@@ -177,6 +180,7 @@ export class IconCore {
177
180
  return this._externalType;
178
181
  }
179
182
  set externalType(value) {
183
+ value = sanitizeExternalType(value);
180
184
  if (this._externalType !== value) {
181
185
  this._externalType = value;
182
186
  this._safeApplyIcon();
@@ -4,6 +4,7 @@
4
4
  * License: Apache-2.0
5
5
  */
6
6
  import { IIconDescriptor } from './icon-registry';
7
+ import { IconExternalType } from './icon-constants';
7
8
  /**
8
9
  * Creates an SVG element from a string of SVG content, and sanitizes it for injection into the DOM.
9
10
  */
@@ -12,4 +13,4 @@ export declare function getCachedIcon(key: string): IIconDescriptor | undefined;
12
13
  export declare function awaitIconDefinition(key: string, listener: () => void): void;
13
14
  export declare function removeIconListener(key: string, listener: () => void): void;
14
15
  export declare function fetchIconContent(url: string, name: string): Promise<string>;
15
- export declare function sanitizeExternalType(type: string): string;
16
+ export declare function sanitizeExternalType(type: string): IconExternalType;
@@ -60,6 +60,6 @@ export function fetchIconContent(url, name) {
60
60
  return request || Promise.resolve('');
61
61
  }
62
62
  export function sanitizeExternalType(type) {
63
- const isValidType = ['standard', 'extended', 'custom'].includes(type);
64
- return isValidType ? type : '';
63
+ const isValidType = ['standard', 'extended', 'custom', 'all'].includes(type);
64
+ return isValidType ? type : 'all';
65
65
  }
@@ -10,6 +10,7 @@ export interface IIconProperties {
10
10
  src: string | undefined;
11
11
  lazy: boolean;
12
12
  external: boolean;
13
+ /** @deprecated This will be removed in a future version. */
13
14
  externalType: IconExternalType;
14
15
  externalUrlBuilder: IconUrlBuilder;
15
16
  theme: IconTheme;
@@ -32,7 +33,7 @@ declare global {
32
33
  * @property {string} src - Provides the ability to set the SVG string content directly.
33
34
  * @property {boolean} [lazy=false] - Controls whether the icon will be loaded dynamically when it comes into view. False by default.
34
35
  * @property {boolean} [external=false] - Controls whether external network requests are allowed for this icon. Only pertains for icons that aren't already defined in the registry.
35
- * @property {IconExternalType} [externalType="standard"] - The type of icon to load externally. Possible values: "standard" (default), "extended", "custom".
36
+ * @property {IconExternalType} [externalType="all"] - **(Deprecated)** The type of icon to load externally. Possible values: "all" (default), "standard", "extended", "custom".
36
37
  * @property {IconUrlBuilder} externalUrlBuilder - A callback that can be provided to generate a URL that will be used to fetch an SVG icon.
37
38
  * @property {string} viewbox - A custom value to apply to the `viewBox` attribute on the internal `<svg>` element.
38
39
  * @property {IconTheme} theme - The theme to apply to the icon.
@@ -79,6 +80,7 @@ export declare class IconComponent extends BaseComponent implements IIconCompone
79
80
  external: boolean;
80
81
  /**
81
82
  * The type of icon to load externally. Possible values: "standard", "extended", "custom".
83
+ * @deprecated This will be removed in a future version.
82
84
  * @attribute external-type
83
85
  */
84
86
  externalType: IconExternalType;
package/esm/icon/icon.js CHANGED
@@ -20,7 +20,7 @@ const styles = ':host{--_icon-color:var(--forge-icon-color, currentColor);--_ico
20
20
  * @property {string} src - Provides the ability to set the SVG string content directly.
21
21
  * @property {boolean} [lazy=false] - Controls whether the icon will be loaded dynamically when it comes into view. False by default.
22
22
  * @property {boolean} [external=false] - Controls whether external network requests are allowed for this icon. Only pertains for icons that aren't already defined in the registry.
23
- * @property {IconExternalType} [externalType="standard"] - The type of icon to load externally. Possible values: "standard" (default), "extended", "custom".
23
+ * @property {IconExternalType} [externalType="all"] - **(Deprecated)** The type of icon to load externally. Possible values: "all" (default), "standard", "extended", "custom".
24
24
  * @property {IconUrlBuilder} externalUrlBuilder - A callback that can be provided to generate a URL that will be used to fetch an SVG icon.
25
25
  * @property {string} viewbox - A custom value to apply to the `viewBox` attribute on the internal `<svg>` element.
26
26
  * @property {IconTheme} theme - The theme to apply to the icon.
@@ -29,9 +29,18 @@ export class IconButtonCore extends BaseButtonCore {
29
29
  // Update internal state first so listeners can access the new state
30
30
  const originalPressed = this._pressed;
31
31
  this._pressed = !this._pressed;
32
- const cancelled = !this._adapter.emitHostEvent(ICON_BUTTON_CONSTANTS.events.TOGGLE, this.pressed, true, true);
32
+ const event = new CustomEvent(ICON_BUTTON_CONSTANTS.events.TOGGLE, {
33
+ detail: {
34
+ pressed: this._pressed,
35
+ toggle: this._toggle
36
+ },
37
+ bubbles: true,
38
+ cancelable: true,
39
+ composed: true
40
+ });
41
+ this._adapter.dispatchHostEvent(event);
33
42
  this._pressed = originalPressed;
34
- if (cancelled) {
43
+ if (event.defaultPrevented) {
35
44
  return;
36
45
  }
37
46
  this.pressed = !originalPressed;