@das-fed/upf-utils 6.4.0-dev.269 → 6.4.0-dev.271

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.
Files changed (52) hide show
  1. package/api-services/es5.js +1672 -1660
  2. package/api-services/index.js +1362 -1344
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/es5.js +850 -852
  5. package/api-services/modules/app-manage/index.js +667 -671
  6. package/api-services/modules/app-manage/index.js.gz +0 -0
  7. package/api-services/modules/bems/es5.js +1141 -1153
  8. package/api-services/modules/bems/index.js +946 -964
  9. package/api-services/modules/bems/index.js.gz +0 -0
  10. package/api-services/modules/contract/es5.js +1122 -1132
  11. package/api-services/modules/contract/index.js +930 -944
  12. package/api-services/modules/contract/index.js.gz +0 -0
  13. package/api-services/modules/duty-manage/es5.js +1120 -1108
  14. package/api-services/modules/duty-manage/index.js +935 -917
  15. package/api-services/modules/duty-manage/index.js.gz +0 -0
  16. package/api-services/modules/enterpriseright/es5.js +1134 -1122
  17. package/api-services/modules/enterpriseright/index.js +948 -930
  18. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  19. package/api-services/modules/file/es5.js +1548 -1536
  20. package/api-services/modules/file/index.js +1284 -1266
  21. package/api-services/modules/file/index.js.gz +0 -0
  22. package/api-services/modules/link/es5.js +1124 -1133
  23. package/api-services/modules/link/index.js +933 -947
  24. package/api-services/modules/link/index.js.gz +0 -0
  25. package/api-services/modules/permission/es5.js +857 -860
  26. package/api-services/modules/permission/index.js +670 -674
  27. package/api-services/modules/permission/index.js.gz +0 -0
  28. package/api-services/modules/super-admin/es5.js +1138 -1126
  29. package/api-services/modules/super-admin/index.js +950 -932
  30. package/api-services/modules/super-admin/index.js.gz +0 -0
  31. package/api-services/modules/supplier/es5.js +1126 -1114
  32. package/api-services/modules/supplier/index.js +938 -920
  33. package/api-services/modules/supplier/index.js.gz +0 -0
  34. package/api-services/modules/supplychain-manage/es5.js +1134 -1122
  35. package/api-services/modules/supplychain-manage/index.js +948 -930
  36. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  37. package/api-services/modules/systemConfiguration/es5.js +1134 -1122
  38. package/api-services/modules/systemConfiguration/index.js +948 -930
  39. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  40. package/api-services/src/create-service/es5.js +1120 -1132
  41. package/api-services/src/create-service/index.js +929 -947
  42. package/api-services/src/create-service/index.js.gz +0 -0
  43. package/common-tools/timezone-format/es5.d.ts +39 -1
  44. package/common-tools/timezone-format/es5.js +592 -438
  45. package/common-tools/timezone-format/index.d.ts +39 -1
  46. package/common-tools/timezone-format/index.js +407 -318
  47. package/common-tools/timezone-format/index.js.gz +0 -0
  48. package/curring-http/es5.js +406 -417
  49. package/curring-http/index.js +323 -321
  50. package/curring-http/index.js.gz +0 -0
  51. package/esm-map.json +11 -1
  52. package/package.json +3 -3
@@ -1,13 +1,15 @@
1
- import { Dayjs } from 'dayjs';
1
+ import { default as dayjs, Dayjs } from 'dayjs';
2
2
  import { default as dayjsTimezoneIanaPlugin, PackedIanaData, PreloadDayjsIanaOptions } from './get-iana-data/dayjs-timezone-iana-plugin';
3
3
  import { loadIanaData as loadMomentIanaData, loadIanaFromApi as loadMomentIanaFromApi, LoadIanaFromApiOptions, MomentWithTimezone, PackedIanaTzData } from './get-iana-data/moment-iana-loader';
4
4
 
5
5
  export * from './get-iana-data';
6
6
  export { dayjsTimezoneIanaPlugin, loadMomentIanaData, loadMomentIanaFromApi };
7
+ export type TimeZoneDayjsFactory = typeof dayjs;
7
8
  export type TimeValue = string | number | Date | Dayjs | null | undefined;
8
9
  export type TimeZoneFlag = number | string | null | undefined;
9
10
  export type TimeZoneDateLibrary = 'dayjs' | 'moment';
10
11
  export type TimeZoneInputMode = 'instant' | 'local';
12
+ export type TimeZonePickerMode = 'none' | 'instant' | 'local';
11
13
  interface MomentFormatValue {
12
14
  tz?: (timeZone: string) => MomentFormatValue;
13
15
  format: (format?: string) => string;
@@ -94,6 +96,32 @@ export interface FormatLocalDateTimeOptions {
94
96
  /** 未传 timeZone 时是否读取 sessionStorage/客户端时区。默认 false,兼容旧 toLocalDate。 */
95
97
  useClientTimeZone?: boolean;
96
98
  }
99
+ export interface FormatLocalDateTimeIntlOptions {
100
+ /** 输出格式,支持常用 YYYY/MM/DD/HH/mm/ss/SSS token,默认 YYYY-MM-DD HH:mm:ss。 */
101
+ format?: string;
102
+ /** 目标 IANA 时区;为空时读取当前客户端时区。 */
103
+ timeZone?: string | null;
104
+ /** Intl 本地化语言,默认 zh-CN。 */
105
+ locale?: string;
106
+ }
107
+ export interface TimeZonePickerOptions {
108
+ /** none 保持原行为;instant 表示真实时间点;local 表示业务时区本地时间。 */
109
+ timeZoneMode?: TimeZonePickerMode;
110
+ /** 显式业务时区,优先级高于 useClientTimeZone。 */
111
+ timeZone?: string | null;
112
+ /** 是否读取当前客户端/右上角选择的时区。 */
113
+ useClientTimeZone?: boolean;
114
+ /** 开启时区模式后的输出格式;未传时 instant 默认带 offset,local 默认本地时间文本。 */
115
+ timeZoneValueFormat?: string;
116
+ }
117
+ export interface TimeZoneDayBoundaryOptions {
118
+ /** 显式业务时区;为空时可配合 useClientTimeZone 读取当前用户时区。 */
119
+ timeZone?: string | null;
120
+ /** 是否读取当前客户端/右上角选择的时区。 */
121
+ useClientTimeZone?: boolean;
122
+ /** date 保留输入日期标签;instant 按真实时间点在目标时区所属日期计算。 */
123
+ inputMode?: 'date' | 'instant';
124
+ }
97
125
  export interface ApplyIanaTimeZoneOptions {
98
126
  /** 指定默认时区,后续 dayjs.tz(value) 可直接使用。 */
99
127
  defaultTimeZone?: string;
@@ -140,6 +168,7 @@ export interface RuntimeIanaTimeZoneDataSnapshot extends PackedIanaData {
140
168
  export declare const TIMEZONE_CHANGE_EVENT = "timezonechange";
141
169
  export declare const UPF_TIMEZONE_MESSAGE_TYPE = "__UPF_TIMEZONE_CHANGE__";
142
170
  export declare const IANA_TIMEZONE_DATA_CHANGE_EVENT = "ianatimezonedatachange";
171
+ export declare const timeZoneDayjs: TimeZoneDayjsFactory;
143
172
  export declare const setRuntimeIanaTimeZoneDataSnapshot: (data: Pick<PackedIanaData, "version" | "zones" | "links">, source?: RuntimeIanaTimeZoneDataSource) => RuntimeIanaTimeZoneDataSnapshot;
144
173
  export declare const getRuntimeIanaTimeZoneDataSnapshot: () => RuntimeIanaTimeZoneDataSnapshot | null;
145
174
  export declare const getRuntimeNameZoneDataSnapshot: () => RuntimeIanaTimeZoneDataSnapshot | null;
@@ -158,10 +187,19 @@ export declare const onClientTimeZoneChange: (handler: ClientTimeZoneChangeHandl
158
187
  export declare const initClientTimeZoneSync: () => boolean;
159
188
  export declare const getClientTimeZone: () => any;
160
189
  export declare const resolveTimeZone: (timeZone?: string | null) => any;
190
+ export declare const resolvePickerTimeZone: (options?: TimeZonePickerOptions) => any;
191
+ export declare const isTimeZonePickerModeEnabled: (options?: TimeZonePickerOptions) => boolean;
161
192
  export declare const normalizeLocaleCode: (locale?: string, supportedLocales?: string[]) => any;
193
+ export declare const getTimeZoneDayjs: () => TimeZoneDayjsFactory;
194
+ export declare const toTimeZonePickerValue: <T extends TimeValue>(value?: T, options?: TimeZonePickerOptions) => any;
195
+ export declare const fromTimeZonePickerValue: (value?: TimeValue, options?: TimeZonePickerOptions) => any;
162
196
  export declare const getZoneUtcOffset: (value: TimeValue, timeZone?: string | null) => any;
163
197
  export declare const formatInTimeZone: (value?: TimeValue, timeZone?: string | null, format?: string) => any;
198
+ export declare const toTimestampAtZoneStartOfDay: (value?: TimeValue, options?: TimeZoneDayBoundaryOptions) => number | undefined;
199
+ export declare const toTimestampAtZoneEndOfDay: (value?: TimeValue, options?: TimeZoneDayBoundaryOptions) => number | undefined;
200
+ export declare const isMomentTimezoneFormatInstance: (moment?: unknown) => moment is MomentTimezoneFormatInstance;
164
201
  export declare const formatLocalDateTime: (value?: TimeValue, options?: FormatLocalDateTimeOptions | string) => string;
202
+ export declare const formatLocalDateTimeIntl: (value?: TimeValue, options?: FormatLocalDateTimeIntlOptions | string) => string;
165
203
  export declare const toLocalDate: (value?: TimeValue, format?: string, options?: Omit<FormatLocalDateTimeOptions, "format">) => string;
166
204
  export declare const formatTimeZoneOffsetLabel: (value?: TimeValue, timeZone?: string | null) => string;
167
205
  export declare const resolveUtcOffsetFallback: (option: Pick<TimeZoneOption, "timeZoneId" | "baseUtcOffsetText" | "currentUtcOffsetText">, referenceDate?: Date) => string;