semanticdb-core 1.0.40 → 1.0.41

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.
@@ -16,4 +16,4 @@ export declare function isDateForm(dateValue: any): boolean;
16
16
  * @param {Boolean} flag 本函数是否在yoymomsplysplm.ts获得最小粒度时被调用
17
17
  * @return {String}
18
18
  */
19
- export declare function getMinGran(date: any, flag?: boolean): "year" | "quarter" | "month" | "week" | "day" | "hour" | "minute" | "second" | "date" | "w" | "y" | "years" | "months" | "M" | "weeks" | "days" | "d" | "hours" | "h" | "minutes" | "m" | "seconds" | "s" | "millisecond" | "milliseconds" | "ms" | "quarters" | "Q" | "isoWeek" | "isoWeeks" | "W" | "dates" | "D" | null;
19
+ export declare function getMinGran(date: any, flag?: boolean): unitOfTime.Base | unitOfTime._quarter | unitOfTime._isoWeek | unitOfTime._date | null;
@@ -127,6 +127,9 @@ function getMinGran(date, flag = false) {
127
127
  for (const tw of [...exports.grans].reverse()) {
128
128
  if (gte.isSame((0, moment_1.default)(gte).startOf(tw), 'second') &&
129
129
  lte.isSame((0, moment_1.default)(lte).endOf(tw), 'second')) {
130
+ if (tw === 'isoWeek') {
131
+ return 'week';
132
+ }
130
133
  return tw;
131
134
  }
132
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "semanticdb-core",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [