@data-fair/lib-vue 1.10.1 → 1.10.2

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.
@@ -1,8 +1 @@
1
- export declare const locale: string, dayjs: (date?: string | number | import("dayjs").Dayjs | Date | null | undefined) => Omit<import("dayjs").Dayjs, "add" | "subtract"> & {
2
- fromNow(withoutSuffix?: boolean): string;
3
- from(compared: import("dayjs").ConfigType, withoutSuffix?: boolean): string;
4
- toNow(withoutSuffix?: boolean): string;
5
- to(compared: import("dayjs").ConfigType, withoutSuffix?: boolean): string;
6
- add(duration: import("dayjs/plugin/duration.js").Duration): Omit<import("dayjs").Dayjs, "add" | "subtract"> & any;
7
- subtract(duration: import("dayjs/plugin/duration.js").Duration): Omit<import("dayjs").Dayjs, "add" | "subtract"> & any;
8
- };
1
+ export declare const locale: string, dayjs: (date?: string | number | import("dayjs").Dayjs | Date | null | undefined) => import("dayjs").Dayjs;
package/locale-dayjs.d.ts CHANGED
@@ -1,21 +1,21 @@
1
1
  import type { App } from 'vue';
2
- import dayjs, { type Dayjs, ConfigType } from 'dayjs';
2
+ import dayjs from 'dayjs';
3
3
  import 'dayjs/locale/fr';
4
4
  import 'dayjs/locale/en';
5
- import duration, { type Duration } from 'dayjs/plugin/duration.js';
5
+ import duration from 'dayjs/plugin/duration.js';
6
6
  export type { ConfigType as DayjsConfigType } from 'dayjs';
7
- type RelativeDayjs = Omit<Dayjs, 'add' | 'subtract'> & {
8
- fromNow(withoutSuffix?: boolean): string;
9
- from(compared: ConfigType, withoutSuffix?: boolean): string;
10
- toNow(withoutSuffix?: boolean): string;
11
- to(compared: ConfigType, withoutSuffix?: boolean): string;
12
- add(duration: Duration): RelativeDayjs;
13
- subtract(duration: Duration): RelativeDayjs;
14
- };
7
+ declare module 'dayjs' {
8
+ interface Dayjs {
9
+ fromNow(withoutSuffix?: boolean): string;
10
+ from(compared: ConfigType, withoutSuffix?: boolean): string;
11
+ toNow(withoutSuffix?: boolean): string;
12
+ to(compared: ConfigType, withoutSuffix?: boolean): string;
13
+ }
14
+ }
15
15
  export declare function getLocaleDayjs(locale?: string): {
16
16
  locale: string;
17
17
  duration: (dur: duration.DurationUnitsObjectType) => duration.Duration;
18
- dayjs: (date?: string | number | dayjs.Dayjs | Date | null | undefined) => RelativeDayjs;
18
+ dayjs: (date?: string | number | dayjs.Dayjs | Date | null | undefined) => dayjs.Dayjs;
19
19
  };
20
20
  export declare const localeDayjsKey: unique symbol;
21
21
  export declare function createLocaleDayjs(locale?: string): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vue",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
4
4
  "description": "Composables and other utilities for Vue applications in the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [