td-stylekit 26.11.0 → 26.12.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [26.12.0](https://github.com/treasure-data/td-stylekit/compare/v26.11.0...v26.12.0) (2022-05-31)
2
+
3
+
4
+ ### Features
5
+
6
+ * **CON-10146:** Correct time formatting four hours-minutes time editor format ([#1282](https://github.com/treasure-data/td-stylekit/issues/1282)) ([f670fb0](https://github.com/treasure-data/td-stylekit/commit/f670fb0))
7
+
1
8
  # [26.11.0](https://github.com/treasure-data/td-stylekit/compare/v26.10.3...v26.11.0) (2022-05-30)
2
9
 
3
10
 
@@ -73,6 +73,8 @@ var DATE_FORMATS = ['MMM DD, YYYY', 'MMM DD YYYY', 'MMM D, YYYY', 'MMM D YYYY',
73
73
  exports.DATE_FORMATS = DATE_FORMATS;
74
74
  var TIME_FORMAT_24 = 'HH:mm:ss';
75
75
  var TIME_FORMAT_12 = 'hh:mm:ss A';
76
+ var TIME_FORMAT_SHORT_24 = 'HH:mm';
77
+ var TIME_FORMAT_SHORT_12 = 'hh:mm A';
76
78
  var TIME_FORMAT_MS = ':mm:ss';
77
79
  var TIME_FORMAT_HM = 'hh:mm';
78
80
 
@@ -112,8 +114,10 @@ var resolveDisplayFormat = function resolveDisplayFormat(hasTime, timePeriod, de
112
114
 
113
115
  if (timeEditor === 'minutes-seconds') {
114
116
  timeFormat = TIME_FORMAT_MS;
115
- } else if (timeEditor === 'hours-minutes' || timeEditor === 'minutes') {
117
+ } else if (timeEditor === 'minutes') {
116
118
  timeFormat = TIME_FORMAT_HM;
119
+ } else if (timeEditor === 'hours-minutes') {
120
+ timeFormat = timePeriod === '24' ? TIME_FORMAT_SHORT_24 : TIME_FORMAT_SHORT_12;
117
121
  } else {
118
122
  timeFormat = timePeriod === '24' ? TIME_FORMAT_24 : TIME_FORMAT_12;
119
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "td-stylekit",
3
- "version": "26.11.0",
3
+ "version": "26.12.0",
4
4
  "main": "dist/es/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",