ublo-lib 1.47.7 → 1.47.9

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.
@@ -10,7 +10,7 @@
10
10
  position: absolute;
11
11
  bottom: 0;
12
12
  width: 100%;
13
- height: calc(100% - 70px);
13
+ height: calc(100% * 0.75);
14
14
  /* --gradient-color is defined in the collapsible.tsx props */
15
15
  background: linear-gradient(to top, var(--gradient-color), transparent);
16
16
  transition: opacity 320ms
@@ -1,6 +1,6 @@
1
1
  export declare function createDate(...args: number[]): Date;
2
2
  export declare function getChristmasWeek(endWeek: any, yearOffset?: number): Date;
3
- export declare function dateToWeek(date: any, christmasWeek: any): number;
3
+ export declare function dateToWeek(date: any, christmasWeek: any, yearOffset?: number): number;
4
4
  export declare function removeFilter(): void;
5
5
  export declare function filter(week: number): void;
6
6
  export declare function weekToDate(week: any, endWeek: any, yearOffset?: number): Date;
@@ -1 +1 @@
1
- {"version":3,"file":"weeks.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/week-selector/services/weeks.ts"],"names":[],"mappings":"AAYA,wBAAgB,UAAU,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,QAO3C;AAoBD,wBAAgB,gBAAgB,CAAC,OAAO,KAAA,EAAE,UAAU,SAAI,QAWvD;AAED,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,aAAa,KAAA,UAiB7C;AAMD,wBAAgB,YAAY,SAY3B;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,QAwBlC;AAED,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,UAAU,SAAI,QAEvD;AAED,wBAAgB,WAAW,CAAC,IAAI,KAAA,UAG/B"}
1
+ {"version":3,"file":"weeks.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/week-selector/services/weeks.ts"],"names":[],"mappings":"AAYA,wBAAgB,UAAU,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,QAO3C;AAoBD,wBAAgB,gBAAgB,CAAC,OAAO,KAAA,EAAE,UAAU,SAAI,QAWvD;AAED,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,aAAa,KAAA,EAAE,UAAU,SAAI,UAoB7D;AAMD,wBAAgB,YAAY,SAY3B;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,QAwBlC;AAED,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,OAAO,KAAA,EAAE,UAAU,SAAI,QAEvD;AAED,wBAAgB,WAAW,CAAC,IAAI,KAAA,UAG/B"}
@@ -37,8 +37,10 @@ export function getChristmasWeek(endWeek, yearOffset = 0) {
37
37
  const dateSeasonEnd = addDays(getPrevSaturday(lastChristmas), endWeek * 7);
38
38
  return getPrevSaturday(now <= dateSeasonEnd ? lastChristmas : nextChristmas);
39
39
  }
40
- export function dateToWeek(date, christmasWeek) {
41
- const diff = date.getTime() - christmasWeek.getTime();
40
+ export function dateToWeek(date, christmasWeek, yearOffset = 0) {
41
+ const diff = date.getTime() +
42
+ yearOffset * 365 * 24 * 60 * 60 * 1000 -
43
+ christmasWeek.getTime();
42
44
  const days = Math.floor(diff / (1000 * 60 * 60 * 24));
43
45
  const startYear = christmasWeek.getFullYear();
44
46
  const endYear = date.getFullYear();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.47.7",
3
+ "version": "1.47.9",
4
4
  "peerDependencies": {
5
5
  "classnames": "^2.5.1",
6
6
  "dt-design-system": "^3.12.0",