@nocobase/client 1.2.28-alpha → 1.3.0-alpha

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,30 +16,35 @@ export interface Moment2strOptions {
16
16
  export declare const moment2str: (value?: Dayjs | null, options?: Moment2strOptions) => any;
17
17
  export declare const mapDatePicker: () => (props: any) => any;
18
18
  export declare const mapRangePicker: () => (props: any) => any;
19
- export declare const getDateRanges: () => {
20
- now: () => string;
21
- today: () => Dayjs[];
22
- yesterday: () => Dayjs[];
23
- tomorrow: () => Dayjs[];
24
- thisWeek: () => Dayjs[];
25
- lastWeek: () => Dayjs[];
26
- nextWeek: () => Dayjs[];
27
- thisIsoWeek: () => Dayjs[];
28
- lastIsoWeek: () => Dayjs[];
29
- nextIsoWeek: () => Dayjs[];
30
- thisMonth: () => Dayjs[];
31
- lastMonth: () => Dayjs[];
32
- nextMonth: () => Dayjs[];
33
- thisQuarter: () => Dayjs[];
34
- lastQuarter: () => Dayjs[];
35
- nextQuarter: () => Dayjs[];
36
- thisYear: () => Dayjs[];
37
- lastYear: () => Dayjs[];
38
- nextYear: () => Dayjs[];
39
- last7Days: () => Dayjs[];
40
- next7Days: () => Dayjs[];
41
- last30Days: () => Dayjs[];
42
- next30Days: () => Dayjs[];
43
- last90Days: () => Dayjs[];
44
- next90Days: () => Dayjs[];
19
+ export declare const getDateRanges: (props?: {
20
+ /** 日期是否是 UTC 格式 */
21
+ utc?: boolean;
22
+ /** 如果为 true 则返回的值是一个字符串 */
23
+ shouldBeString?: boolean;
24
+ }) => {
25
+ now: () => any;
26
+ today: () => any;
27
+ yesterday: () => any;
28
+ tomorrow: () => any;
29
+ thisWeek: () => any;
30
+ lastWeek: () => any;
31
+ nextWeek: () => any;
32
+ thisIsoWeek: () => any;
33
+ lastIsoWeek: () => any;
34
+ nextIsoWeek: () => any;
35
+ thisMonth: () => any;
36
+ lastMonth: () => any;
37
+ nextMonth: () => any;
38
+ thisQuarter: () => any;
39
+ lastQuarter: () => any;
40
+ nextQuarter: () => any;
41
+ thisYear: () => any;
42
+ lastYear: () => any;
43
+ nextYear: () => any;
44
+ last7Days: () => any;
45
+ next7Days: () => any;
46
+ last30Days: () => any;
47
+ next30Days: () => any;
48
+ last90Days: () => any;
49
+ next90Days: () => any;
45
50
  };
@@ -6,6 +6,7 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
+ import { Schema } from '@formily/json-schema';
9
10
  interface Props {
10
11
  operator?: {
11
12
  value: string;
@@ -15,6 +16,8 @@ interface Props {
15
16
  * 不需要禁用选项,一般会在表达式中使用
16
17
  */
17
18
  noDisabled?: boolean;
19
+ /** 消费变量值的字段 */
20
+ targetFieldSchema?: Schema;
18
21
  }
19
22
  /**
20
23
  * @deprecated
@@ -41,7 +44,7 @@ export declare const useDateVariable: ({ operator, schema, noDisabled }: Props)
41
44
  * @param param0
42
45
  * @returns
43
46
  */
44
- export declare const useDatetimeVariable: ({ operator, schema, noDisabled }?: Props) => {
47
+ export declare const useDatetimeVariable: ({ operator, schema, noDisabled, targetFieldSchema }?: Props) => {
45
48
  datetimeSettings: {
46
49
  label: string;
47
50
  value: string;
@@ -55,31 +58,31 @@ export declare const useDatetimeVariable: ({ operator, schema, noDisabled }?: Pr
55
58
  }[];
56
59
  };
57
60
  datetimeCtx: {
58
- now: () => string;
59
- today: () => import("dayjs").Dayjs[];
60
- yesterday: () => import("dayjs").Dayjs[];
61
- tomorrow: () => import("dayjs").Dayjs[];
62
- thisWeek: () => import("dayjs").Dayjs[];
63
- lastWeek: () => import("dayjs").Dayjs[];
64
- nextWeek: () => import("dayjs").Dayjs[];
65
- thisIsoWeek: () => import("dayjs").Dayjs[];
66
- lastIsoWeek: () => import("dayjs").Dayjs[];
67
- nextIsoWeek: () => import("dayjs").Dayjs[];
68
- thisMonth: () => import("dayjs").Dayjs[];
69
- lastMonth: () => import("dayjs").Dayjs[];
70
- nextMonth: () => import("dayjs").Dayjs[];
71
- thisQuarter: () => import("dayjs").Dayjs[];
72
- lastQuarter: () => import("dayjs").Dayjs[];
73
- nextQuarter: () => import("dayjs").Dayjs[];
74
- thisYear: () => import("dayjs").Dayjs[];
75
- lastYear: () => import("dayjs").Dayjs[];
76
- nextYear: () => import("dayjs").Dayjs[];
77
- last7Days: () => import("dayjs").Dayjs[];
78
- next7Days: () => import("dayjs").Dayjs[];
79
- last30Days: () => import("dayjs").Dayjs[];
80
- next30Days: () => import("dayjs").Dayjs[];
81
- last90Days: () => import("dayjs").Dayjs[];
82
- next90Days: () => import("dayjs").Dayjs[];
61
+ now: () => any;
62
+ today: () => any;
63
+ yesterday: () => any;
64
+ tomorrow: () => any;
65
+ thisWeek: () => any;
66
+ lastWeek: () => any;
67
+ nextWeek: () => any;
68
+ thisIsoWeek: () => any;
69
+ lastIsoWeek: () => any;
70
+ nextIsoWeek: () => any;
71
+ thisMonth: () => any;
72
+ lastMonth: () => any;
73
+ nextMonth: () => any;
74
+ thisQuarter: () => any;
75
+ lastQuarter: () => any;
76
+ nextQuarter: () => any;
77
+ thisYear: () => any;
78
+ lastYear: () => any;
79
+ nextYear: () => any;
80
+ last7Days: () => any;
81
+ next7Days: () => any;
82
+ last30Days: () => any;
83
+ next30Days: () => any;
84
+ last90Days: () => any;
85
+ next90Days: () => any;
83
86
  };
84
87
  };
85
88
  export {};