@94ai/nf-double-quarter 3.2.48 → 3.2.49

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,5 +1,13 @@
1
1
  import { QuarterItem } from './types';
2
2
  declare const _default: import("vue-demi").DefineComponent<{
3
+ offset: {
4
+ type: import("vue-demi").PropType<number>;
5
+ default: number;
6
+ };
7
+ transition: {
8
+ type: import("vue-demi").PropType<string>;
9
+ default: string;
10
+ };
3
11
  value: {
4
12
  type: import("vue-demi").PropType<string[]>;
5
13
  default: undefined;
@@ -47,10 +55,6 @@ declare const _default: import("vue-demi").DefineComponent<{
47
55
  type: import("vue-demi").PropType<string>;
48
56
  default: string;
49
57
  };
50
- transition: {
51
- type: import("vue-demi").PropType<string>;
52
- default: string;
53
- };
54
58
  placement: {
55
59
  type: import("vue-demi").PropType<string>;
56
60
  default: string;
@@ -63,10 +67,6 @@ declare const _default: import("vue-demi").DefineComponent<{
63
67
  type: import("vue-demi").PropType<string>;
64
68
  default: string;
65
69
  };
66
- offset: {
67
- type: import("vue-demi").PropType<number>;
68
- default: number;
69
- };
70
70
  visibleArrow: {
71
71
  type: import("vue-demi").PropType<boolean>;
72
72
  default: boolean;
@@ -104,6 +104,14 @@ declare const _default: import("vue-demi").DefineComponent<{
104
104
  blur: (value: any) => void;
105
105
  focus: (value: any) => void;
106
106
  }, string, Readonly<import("vue-demi").ExtractPropTypes<{
107
+ offset: {
108
+ type: import("vue-demi").PropType<number>;
109
+ default: number;
110
+ };
111
+ transition: {
112
+ type: import("vue-demi").PropType<string>;
113
+ default: string;
114
+ };
107
115
  value: {
108
116
  type: import("vue-demi").PropType<string[]>;
109
117
  default: undefined;
@@ -151,10 +159,6 @@ declare const _default: import("vue-demi").DefineComponent<{
151
159
  type: import("vue-demi").PropType<string>;
152
160
  default: string;
153
161
  };
154
- transition: {
155
- type: import("vue-demi").PropType<string>;
156
- default: string;
157
- };
158
162
  placement: {
159
163
  type: import("vue-demi").PropType<string>;
160
164
  default: string;
@@ -167,10 +171,6 @@ declare const _default: import("vue-demi").DefineComponent<{
167
171
  type: import("vue-demi").PropType<string>;
168
172
  default: string;
169
173
  };
170
- offset: {
171
- type: import("vue-demi").PropType<number>;
172
- default: number;
173
- };
174
174
  visibleArrow: {
175
175
  type: import("vue-demi").PropType<boolean>;
176
176
  default: boolean;
@@ -195,6 +195,8 @@ declare const _default: import("vue-demi").DefineComponent<{
195
195
  default: boolean;
196
196
  };
197
197
  }>>, {
198
+ offset: number;
199
+ transition: string;
198
200
  value: string[];
199
201
  tabindex: number;
200
202
  rangeSeparator: string;
@@ -206,11 +208,9 @@ declare const _default: import("vue-demi").DefineComponent<{
206
208
  disabled: boolean;
207
209
  prefixIcon: string;
208
210
  clearIcon: string;
209
- transition: string;
210
211
  placement: string;
211
212
  popperClass: string;
212
213
  trigger: string;
213
- offset: number;
214
214
  visibleArrow: boolean;
215
215
  popperOptions: Object;
216
216
  openDelay: number;
@@ -75,7 +75,7 @@ import {
75
75
  getNextYear,
76
76
  getQuarter,
77
77
  startOf
78
- } from './util'
78
+ } from '@94ai/common-utils'
79
79
  import { getQuarterOptionMonths } from './config'
80
80
  import { QuarterItem } from './types'
81
81
 
@@ -44,7 +44,7 @@ import {
44
44
  defineProps,
45
45
  ref
46
46
  } from 'vue-demi'
47
- import { getQuarter } from './util'
47
+ import { getQuarter } from '@94ai/common-utils'
48
48
  import { quarterOptions } from './config'
49
49
  import { QuarterItem } from './types'
50
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-double-quarter",
3
- "version": "3.2.48",
3
+ "version": "3.2.49",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,7 +14,8 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/nf-theme-chalk": "^3.2.48",
17
+ "@94ai/common-utils": "^3.2.49",
18
+ "@94ai/nf-theme-chalk": "^3.2.49",
18
19
  "vue-demi": "^0.14.5"
19
20
  },
20
21
  "peerDependenciesMeta": {
@@ -30,5 +31,5 @@
30
31
  "types": "lib/index.d.ts",
31
32
  "main": "lib/nf-double-quarter.cjs.js",
32
33
  "module": "lib/nf-double-quarter.esm-bundler.js",
33
- "gitHead": "91145bb7df8dad2c0cb3eefb101c6158ec854269"
34
+ "gitHead": "8cbd9254da4ec43f46b29198c0839bf2ba19132d"
34
35
  }
package/lib/util.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export declare function getQuarter(date?: Date): number;
2
- export declare function getNextYear(date?: Date): Date;
3
- export declare function endOf(now: Date | undefined, unit: any): Date;
4
- export declare function startOf(date: any, unit: any): Date;
5
- export declare function formatDate(date: any, format: any): any;
package/package/util.ts DELETED
@@ -1,56 +0,0 @@
1
- export function getQuarter(date = new Date()) {
2
- const currMonth = date.getMonth() + 1
3
- return Math.floor((currMonth % 3 == 0 ? (currMonth / 3) : (currMonth / 3 + 1)))
4
- }
5
- export function getNextYear(date = new Date()) {
6
- return new Date(date.setFullYear(date.getFullYear() + 1))
7
- }
8
- export function endOf(now = new Date(), unit) {
9
- if (unit === 'year') {
10
- return new Date(now.getFullYear(), 11, 31, 23, 59, 59, 999);
11
- }
12
- if (unit === 'month') {
13
- return new Date(new Date(now.getFullYear(), now.getMonth() + 1, 1).getTime() - 1);
14
- }
15
- if (unit === 'week') {
16
- return new Date(now.getFullYear(), now.getMonth(), now.getDate() + (6 - now.getDay()), 23, 59, 59, 999);
17
- }
18
- return new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999);
19
- }
20
-
21
- export function startOf(date, unit) {
22
- const newDate = new Date(date)
23
- if (unit === 'year') {
24
- newDate.setMonth(0)
25
- newDate.setDate(1)
26
- newDate.setHours(0, 0, 0, 0)
27
- } else if (unit === 'month') {
28
- newDate.setDate(1)
29
- newDate.setHours(0, 0, 0, 0)
30
- } else if (unit === '') {
31
- newDate.setHours(0, 0, 0, 0)
32
- } else if (unit === 'hour') {
33
- newDate.setMinutes(0, 0, 0)
34
- } else if (unit === 'minute') {
35
- newDate.setSeconds(0, 0)
36
- } else if (unit === 'second') {
37
- newDate.setMilliseconds(0)
38
- }
39
- return newDate
40
- }
41
-
42
- export function formatDate(date, format) {
43
- const year = date.getFullYear()
44
- const month = date.getMonth() + 1
45
- const day = date.getDate()
46
- const hours = date.getHours()
47
- const minutes = date.getMinutes()
48
- const seconds = date.getSeconds()
49
- format = format.replace('YYYY', year)
50
- format = format.replace('MM', String(month).padStart(2, '0'))
51
- format = format.replace('DD', String(day).padStart(2, '0'))
52
- format = format.replace('HH', String(hours).padStart(2, '0'))
53
- format = format.replace('mm', String(minutes).padStart(2, '0'))
54
- format = format.replace('ss', String(seconds).padStart(2, '0'))
55
- return format
56
- }