@tylertech/forge 2.7.0 → 2.8.0

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 (47) hide show
  1. package/custom-elements.json +78 -4
  2. package/dist/esm/chunks/{chunk.JUXKYUD4.js → chunk.2NMHSTAO.js} +51 -28
  3. package/dist/esm/chunks/{chunk.JUXKYUD4.js.map → chunk.2NMHSTAO.js.map} +2 -2
  4. package/dist/esm/chunks/{chunk.GL72QT42.js → chunk.35BJJH5E.js} +2 -2
  5. package/dist/esm/chunks/{chunk.GL72QT42.js.map → chunk.35BJJH5E.js.map} +1 -1
  6. package/dist/esm/chunks/{chunk.L344BPCW.js → chunk.BLZJIYMG.js} +2 -2
  7. package/dist/esm/chunks/{chunk.L344BPCW.js.map → chunk.BLZJIYMG.js.map} +0 -0
  8. package/dist/esm/chunks/{chunk.65GHMPX2.js → chunk.ELAJS33V.js} +6 -6
  9. package/dist/esm/chunks/chunk.ELAJS33V.js.map +7 -0
  10. package/dist/esm/chunks/{chunk.GOWHXADJ.js → chunk.K7OLG7CS.js} +22 -14
  11. package/dist/esm/chunks/chunk.K7OLG7CS.js.map +7 -0
  12. package/dist/esm/chunks/{chunk.XHMNHBZD.js → chunk.PNKLV3BK.js} +2 -2
  13. package/dist/esm/chunks/{chunk.XHMNHBZD.js.map → chunk.PNKLV3BK.js.map} +1 -1
  14. package/dist/esm/chunks/{chunk.ZXMJB7OW.js → chunk.UFMUXBT4.js} +8 -8
  15. package/dist/esm/chunks/{chunk.ZXMJB7OW.js.map → chunk.UFMUXBT4.js.map} +0 -0
  16. package/dist/esm/chunks/{chunk.C73AZRT4.js → chunk.XE7ZMJBZ.js} +5 -3
  17. package/dist/esm/chunks/{chunk.C73AZRT4.js.map → chunk.XE7ZMJBZ.js.map} +2 -2
  18. package/dist/esm/chunks/{chunk.MF3IZXQG.js → chunk.ZSHQMR4O.js} +2 -2
  19. package/dist/esm/chunks/{chunk.MF3IZXQG.js.map → chunk.ZSHQMR4O.js.map} +0 -0
  20. package/dist/esm/drawer/base/index.js +1 -1
  21. package/dist/esm/drawer/drawer/index.js +2 -2
  22. package/dist/esm/drawer/index.js +4 -4
  23. package/dist/esm/drawer/mini-drawer/index.js +2 -2
  24. package/dist/esm/drawer/modal-drawer/index.js +2 -2
  25. package/dist/esm/file-picker/index.js +1 -1
  26. package/dist/esm/index.js +9 -9
  27. package/dist/esm/inline-message/index.js +1 -1
  28. package/dist/esm/table/index.js +1 -1
  29. package/dist/esm/time-picker/index.js +1 -1
  30. package/esm/drawer/base/base-drawer-foundation.d.ts +4 -2
  31. package/esm/drawer/base/base-drawer-foundation.js +22 -14
  32. package/esm/drawer/modal-drawer/modal-drawer-foundation.d.ts +2 -2
  33. package/esm/drawer/modal-drawer/modal-drawer-foundation.js +4 -4
  34. package/esm/file-picker/file-picker.js +1 -1
  35. package/esm/inline-message/inline-message.js +1 -1
  36. package/esm/table/table.js +3 -1
  37. package/esm/time-picker/time-picker-constants.d.ts +1 -0
  38. package/esm/time-picker/time-picker-constants.js +1 -0
  39. package/esm/time-picker/time-picker-foundation.d.ts +4 -0
  40. package/esm/time-picker/time-picker-foundation.js +44 -29
  41. package/esm/time-picker/time-picker.d.ts +3 -0
  42. package/esm/time-picker/time-picker.js +7 -0
  43. package/package.json +1 -1
  44. package/styles/file-picker/_mixins.scss +3 -1
  45. package/styles/inline-message/inline-message.scss +4 -0
  46. package/dist/esm/chunks/chunk.65GHMPX2.js.map +0 -7
  47. package/dist/esm/chunks/chunk.GOWHXADJ.js.map +0 -7
@@ -73327,6 +73327,15 @@
73327
73327
  "privacy": "private",
73328
73328
  "default": "false"
73329
73329
  },
73330
+ {
73331
+ "kind": "field",
73332
+ "name": "_showHourOptions",
73333
+ "type": {
73334
+ "text": "boolean"
73335
+ },
73336
+ "privacy": "private",
73337
+ "default": "true"
73338
+ },
73330
73339
  {
73331
73340
  "kind": "field",
73332
73341
  "name": "_customOptions",
@@ -74109,6 +74118,14 @@
74109
74118
  },
74110
74119
  "privacy": "public"
74111
74120
  },
74121
+ {
74122
+ "kind": "field",
74123
+ "name": "showHourOptions",
74124
+ "type": {
74125
+ "text": "boolean"
74126
+ },
74127
+ "privacy": "public"
74128
+ },
74112
74129
  {
74113
74130
  "kind": "field",
74114
74131
  "name": "customOptions",
@@ -74681,6 +74698,15 @@
74681
74698
  },
74682
74699
  "privacy": "public"
74683
74700
  },
74701
+ {
74702
+ "kind": "field",
74703
+ "name": "showHourOptions",
74704
+ "type": {
74705
+ "text": "boolean"
74706
+ },
74707
+ "privacy": "public",
74708
+ "description": "Whether or not to display hour options in dropdown"
74709
+ },
74684
74710
  {
74685
74711
  "kind": "field",
74686
74712
  "name": "customOptions",
@@ -94197,6 +94223,26 @@
94197
94223
  }
94198
94224
  }
94199
94225
  },
94226
+ {
94227
+ "kind": "method",
94228
+ "name": "_setOpened",
94229
+ "privacy": "private",
94230
+ "return": {
94231
+ "type": {
94232
+ "text": "void"
94233
+ }
94234
+ }
94235
+ },
94236
+ {
94237
+ "kind": "method",
94238
+ "name": "_setClosed",
94239
+ "privacy": "private",
94240
+ "return": {
94241
+ "type": {
94242
+ "text": "void"
94243
+ }
94244
+ }
94245
+ },
94200
94246
  {
94201
94247
  "kind": "method",
94202
94248
  "name": "_applyOpen",
@@ -94209,7 +94255,7 @@
94209
94255
  },
94210
94256
  {
94211
94257
  "kind": "method",
94212
- "name": "_setDrawerOpenState",
94258
+ "name": "_triggerDrawerOpen",
94213
94259
  "privacy": "protected",
94214
94260
  "return": {
94215
94261
  "type": {
@@ -94219,7 +94265,7 @@
94219
94265
  },
94220
94266
  {
94221
94267
  "kind": "method",
94222
- "name": "_setDrawerClosedState",
94268
+ "name": "_triggerDrawerClose",
94223
94269
  "privacy": "protected",
94224
94270
  "return": {
94225
94271
  "type": {
@@ -95437,7 +95483,7 @@
95437
95483
  },
95438
95484
  {
95439
95485
  "kind": "method",
95440
- "name": "_setDrawerOpenState",
95486
+ "name": "_triggerDrawerOpen",
95441
95487
  "privacy": "protected",
95442
95488
  "return": {
95443
95489
  "type": {
@@ -95451,7 +95497,7 @@
95451
95497
  },
95452
95498
  {
95453
95499
  "kind": "method",
95454
- "name": "_setDrawerClosedState",
95500
+ "name": "_triggerDrawerClose",
95455
95501
  "privacy": "protected",
95456
95502
  "return": {
95457
95503
  "type": {
@@ -95591,6 +95637,34 @@
95591
95637
  "module": "drawer/base/base-drawer-foundation.ts"
95592
95638
  }
95593
95639
  },
95640
+ {
95641
+ "kind": "method",
95642
+ "name": "_setOpened",
95643
+ "privacy": "private",
95644
+ "return": {
95645
+ "type": {
95646
+ "text": "void"
95647
+ }
95648
+ },
95649
+ "inheritedFrom": {
95650
+ "name": "BaseDrawerFoundation",
95651
+ "module": "drawer/base/base-drawer-foundation.ts"
95652
+ }
95653
+ },
95654
+ {
95655
+ "kind": "method",
95656
+ "name": "_setClosed",
95657
+ "privacy": "private",
95658
+ "return": {
95659
+ "type": {
95660
+ "text": "void"
95661
+ }
95662
+ },
95663
+ "inheritedFrom": {
95664
+ "name": "BaseDrawerFoundation",
95665
+ "module": "drawer/base/base-drawer-foundation.ts"
95666
+ }
95667
+ },
95594
95668
  {
95595
95669
  "kind": "method",
95596
95670
  "name": "_applyOpen",
@@ -109,6 +109,7 @@ var attributes = {
109
109
  STEP: "step",
110
110
  ALLOW_INPUT: "allow-input",
111
111
  SHOW_NOW: "show-now",
112
+ SHOW_HOUR_OPTIONS: "show-hour-options",
112
113
  DISABLED: "disabled",
113
114
  POPUP_CLASSES: "popup-classes",
114
115
  ALLOW_DROPDOWN: "allow-dropdown"
@@ -456,6 +457,7 @@ var TimePickerFoundation = class {
456
457
  this._allowSeconds = false;
457
458
  this._allowInvalidTime = false;
458
459
  this._showNow = false;
460
+ this._showHourOptions = true;
459
461
  this._customOptions = [];
460
462
  this._disabled = false;
461
463
  this._popupClasses = [];
@@ -806,31 +808,33 @@ var TimePickerFoundation = class {
806
808
  return value;
807
809
  }
808
810
  _openDropdown() {
809
- if (!this.allowDropdown) {
811
+ const options = this._generateTimeOptions();
812
+ if (!this.allowDropdown || !options.length) {
810
813
  return;
811
814
  }
812
815
  this._formatInputValue();
813
816
  this._open = true;
814
817
  this._adapter.setHostAttribute(TIME_PICKER_CONSTANTS.attributes.OPEN);
815
- const options = this._generateTimeOptions();
816
818
  const selectableOptions = options.filter((o) => !o.divider && !o.disabled);
817
819
  let selectedValues = [];
818
820
  let activeStartIndex;
819
- if (this._value !== null) {
820
- const optionIndex = this._findClosestOptionIndex(this._value, selectableOptions);
821
- if (optionIndex >= 0) {
822
- const isExactMatch = selectableOptions[optionIndex].value.time === this._value;
823
- if (isExactMatch) {
824
- selectedValues = [selectableOptions[optionIndex].value];
825
- } else {
821
+ if (options.length) {
822
+ if (this._value !== null) {
823
+ const optionIndex = this._findClosestOptionIndex(this._value, selectableOptions);
824
+ if (optionIndex >= 0) {
825
+ const isExactMatch = selectableOptions[optionIndex].value.time === this._value;
826
+ if (isExactMatch) {
827
+ selectedValues = [selectableOptions[optionIndex].value];
828
+ } else {
829
+ activeStartIndex = optionIndex;
830
+ }
831
+ }
832
+ } else if (typeof this._startTime === "number") {
833
+ const optionIndex = this._findClosestOptionIndex(this._startTime, selectableOptions);
834
+ if (optionIndex >= 0 && optionIndex < selectableOptions.length) {
826
835
  activeStartIndex = optionIndex;
827
836
  }
828
837
  }
829
- } else if (typeof this._startTime === "number") {
830
- const optionIndex = this._findClosestOptionIndex(this._startTime, selectableOptions);
831
- if (optionIndex >= 0 && optionIndex < selectableOptions.length) {
832
- activeStartIndex = optionIndex;
833
- }
834
838
  }
835
839
  const config = {
836
840
  id: `forge-time-picker-${this._identifier}`,
@@ -879,19 +883,21 @@ var TimePickerFoundation = class {
879
883
  const minuteStep = this._step;
880
884
  const times = [];
881
885
  let leadingOptions = [];
882
- for (let totalMinutes = minMinutes; totalMinutes <= maxMinutes; totalMinutes += minuteStep) {
883
- if (totalMinutes === TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES) {
884
- break;
886
+ if (this._showHourOptions) {
887
+ for (let totalMinutes = minMinutes; totalMinutes <= maxMinutes; totalMinutes += minuteStep) {
888
+ if (totalMinutes === TIME_PICKER_CONSTANTS.numbers.MAX_DAY_MINUTES) {
889
+ break;
890
+ }
891
+ const millis = minutesToMillis(totalMinutes);
892
+ const disabled = this._restrictedTimes.includes(millis);
893
+ const label = millisToTimeString(millis, this._use24HourTime, false) || "";
894
+ const value = { time: millis };
895
+ times.push({ label, value, disabled });
896
+ }
897
+ const firstPmIndex = times.findIndex((t) => t.value.time / 1e3 / 60 >= 720);
898
+ if (firstPmIndex >= 0 && firstPmIndex < times.length - 1) {
899
+ times.splice(firstPmIndex, 0, { label: "", value: null, divider: true });
885
900
  }
886
- const millis = minutesToMillis(totalMinutes);
887
- const disabled = this._restrictedTimes.includes(millis);
888
- const label = millisToTimeString(millis, this._use24HourTime, false) || "";
889
- const value = { time: millis };
890
- times.push({ label, value, disabled });
891
- }
892
- const firstPmIndex = times.findIndex((t) => t.value.time / 1e3 / 60 >= 720);
893
- if (firstPmIndex >= 0 && firstPmIndex < times.length - 1) {
894
- times.splice(firstPmIndex, 0, { label: "", value: null, divider: true });
895
901
  }
896
902
  if (this._showNow) {
897
903
  const value = { time: null, metadata: "now" };
@@ -905,7 +911,9 @@ var TimePickerFoundation = class {
905
911
  leadingOptions = [...leadingOptions, ...options];
906
912
  }
907
913
  if (leadingOptions.length) {
908
- times.splice(0, 0, { label: "", value: null, divider: true });
914
+ if (times.length) {
915
+ times.splice(0, 0, { label: "", value: null, divider: true });
916
+ }
909
917
  leadingOptions.forEach((o, index) => times.splice(index, 0, o));
910
918
  }
911
919
  return times;
@@ -1109,6 +1117,14 @@ var TimePickerFoundation = class {
1109
1117
  this._showNow = value;
1110
1118
  }
1111
1119
  }
1120
+ get showHourOptions() {
1121
+ return this._showHourOptions;
1122
+ }
1123
+ set showHourOptions(value) {
1124
+ if (this._showHourOptions !== value) {
1125
+ this._showHourOptions = value;
1126
+ }
1127
+ }
1112
1128
  get customOptions() {
1113
1129
  return this._customOptions;
1114
1130
  }
@@ -1199,6 +1215,7 @@ var TimePickerComponent = class extends BaseComponent {
1199
1215
  TIME_PICKER_CONSTANTS.attributes.STEP,
1200
1216
  TIME_PICKER_CONSTANTS.attributes.ALLOW_INPUT,
1201
1217
  TIME_PICKER_CONSTANTS.attributes.SHOW_NOW,
1218
+ TIME_PICKER_CONSTANTS.attributes.SHOW_HOUR_OPTIONS,
1202
1219
  TIME_PICKER_CONSTANTS.attributes.DISABLED,
1203
1220
  TIME_PICKER_CONSTANTS.attributes.POPUP_CLASSES,
1204
1221
  TIME_PICKER_CONSTANTS.attributes.ALLOW_DROPDOWN
@@ -1240,6 +1257,9 @@ var TimePickerComponent = class extends BaseComponent {
1240
1257
  case TIME_PICKER_CONSTANTS.attributes.SHOW_NOW:
1241
1258
  this.showNow = coerceBoolean(newValue);
1242
1259
  break;
1260
+ case TIME_PICKER_CONSTANTS.attributes.SHOW_HOUR_OPTIONS:
1261
+ this.showHourOptions = coerceBoolean(newValue);
1262
+ break;
1243
1263
  case TIME_PICKER_CONSTANTS.attributes.MIN:
1244
1264
  this.min = newValue;
1245
1265
  break;
@@ -1309,6 +1329,9 @@ __decorateClass([
1309
1329
  __decorateClass([
1310
1330
  FoundationProperty()
1311
1331
  ], TimePickerComponent.prototype, "showNow", 2);
1332
+ __decorateClass([
1333
+ FoundationProperty()
1334
+ ], TimePickerComponent.prototype, "showHourOptions", 2);
1312
1335
  __decorateClass([
1313
1336
  FoundationProperty()
1314
1337
  ], TimePickerComponent.prototype, "customOptions", 2);
@@ -1447,4 +1470,4 @@ export {
1447
1470
  TimePickerComponentDelegate,
1448
1471
  defineTimePickerComponent
1449
1472
  };
1450
- //# sourceMappingURL=chunk.JUXKYUD4.js.map
1473
+ //# sourceMappingURL=chunk.2NMHSTAO.js.map