@das-fed/upf-utils 6.4.0-dev.286 → 6.4.0-dev.287
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.
- package/api-services/es5.js +1028 -1026
- package/api-services/index.js +784 -779
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +1129 -1112
- package/api-services/modules/app-manage/index.js +946 -919
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +1141 -1124
- package/api-services/modules/authentication/index.js +958 -931
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +885 -877
- package/api-services/modules/bems/index.js +700 -687
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +1141 -1124
- package/api-services/modules/contract/index.js +958 -931
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +1127 -1110
- package/api-services/modules/duty-manage/index.js +945 -918
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +7 -2
- package/api-services/modules/enterpriseright/index.js +10 -1
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +7 -2
- package/api-services/modules/file/es5.js +1543 -1550
- package/api-services/modules/file/index.js +1275 -1284
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +1141 -1124
- package/api-services/modules/gateway-edge/index.js +958 -931
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +10 -1
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +1236 -1243
- package/api-services/modules/iot/index.js +1031 -1040
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +1133 -1137
- package/api-services/modules/justauth/index.js +944 -949
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +7 -2
- package/api-services/modules/knowledge/index.js +10 -1
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +1129 -1136
- package/api-services/modules/link/index.js +940 -949
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +7 -2
- package/api-services/modules/permission/index.js +10 -1
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +7 -2
- package/api-services/modules/platformManage/index.js +10 -1
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +1141 -1124
- package/api-services/modules/portal/index.js +958 -931
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +7 -2
- package/api-services/modules/space-manage/index.js +10 -1
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +7 -2
- package/api-services/modules/super-admin/index.js +10 -1
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +1121 -1128
- package/api-services/modules/supplier/index.js +930 -939
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +7 -2
- package/api-services/modules/supplychain-manage/index.js +10 -1
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +7 -2
- package/api-services/modules/systemConfiguration/index.js +10 -1
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +1141 -1124
- package/api-services/modules/tool/index.js +958 -931
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +1127 -1134
- package/api-services/src/create-service/index.js +939 -948
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +1300 -1283
- package/common-info/getPermissionMethod/es5.js +7 -2
- package/common-info/getPermissionMethod/index.js +10 -1
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.js +1083 -1056
- package/common-info/index.js.gz +0 -0
- package/common-tools/timezone-format/es5.d.ts +54 -1
- package/common-tools/timezone-format/es5.js +563 -366
- package/common-tools/timezone-format/index.d.ts +54 -1
- package/common-tools/timezone-format/index.js +380 -260
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/create-api-service/es5.js +1128 -1135
- package/create-api-service/i18n/es5.d.ts +42 -0
- package/create-api-service/i18n/es5.js +44 -2
- package/create-api-service/i18n/index.d.ts +42 -0
- package/create-api-service/i18n/index.js +19 -2
- package/create-api-service/i18n/index.js.gz +0 -0
- package/create-api-service/index.js +940 -949
- package/create-api-service/index.js.gz +0 -0
- package/curring-http/es5.js +406 -417
- package/curring-http/index.js +323 -321
- package/curring-http/index.js.gz +0 -0
- package/esm-map.json +15 -1
- package/package.json +18 -4
- package/release-meta.json +13 -0
|
@@ -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,9 +96,39 @@ 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;
|
|
128
|
+
/** 写入运行期快照的数据来源,供 mframe 注入 iframe 首屏复用。 */
|
|
129
|
+
runtimeSource?: RuntimeIanaTimeZoneDataSource;
|
|
130
|
+
/** 是否同步 window.__UPF_IANA_TIMEZONE_DATA__ 并派发事件,默认 true。 */
|
|
131
|
+
syncRuntimeSnapshot?: boolean;
|
|
100
132
|
}
|
|
101
133
|
export interface LoadIanaTimeZoneOptions extends PreloadDayjsIanaOptions, ApplyIanaTimeZoneOptions {
|
|
102
134
|
}
|
|
@@ -126,8 +158,20 @@ export interface SetClientTimeZoneOptions {
|
|
|
126
158
|
source?: string;
|
|
127
159
|
}
|
|
128
160
|
export type ClientTimeZoneChangeHandler = (timeZone: string, detail: ClientTimeZoneChangeDetail) => void;
|
|
161
|
+
export type RuntimeIanaTimeZoneDataSource = 'iana' | 'fallback';
|
|
162
|
+
export interface RuntimeIanaTimeZoneDataSnapshot extends PackedIanaData {
|
|
163
|
+
/** 数据来源:接口 IANA 数据或降级兜底数据。 */
|
|
164
|
+
source: RuntimeIanaTimeZoneDataSource;
|
|
165
|
+
/** 写入快照时间,供宿主和 iframe 判断是否需要刷新。 */
|
|
166
|
+
timestamp: number;
|
|
167
|
+
}
|
|
129
168
|
export declare const TIMEZONE_CHANGE_EVENT = "timezonechange";
|
|
130
169
|
export declare const UPF_TIMEZONE_MESSAGE_TYPE = "__UPF_TIMEZONE_CHANGE__";
|
|
170
|
+
export declare const IANA_TIMEZONE_DATA_CHANGE_EVENT = "ianatimezonedatachange";
|
|
171
|
+
export declare const timeZoneDayjs: TimeZoneDayjsFactory;
|
|
172
|
+
export declare const setRuntimeIanaTimeZoneDataSnapshot: (data: Pick<PackedIanaData, "version" | "zones" | "links">, source?: RuntimeIanaTimeZoneDataSource) => RuntimeIanaTimeZoneDataSnapshot;
|
|
173
|
+
export declare const getRuntimeIanaTimeZoneDataSnapshot: () => RuntimeIanaTimeZoneDataSnapshot | null;
|
|
174
|
+
export declare const getRuntimeNameZoneDataSnapshot: () => RuntimeIanaTimeZoneDataSnapshot | null;
|
|
131
175
|
export declare const clientTimeZone: any;
|
|
132
176
|
export declare const isKnownTimeZone: (timeZone?: string | null) => any;
|
|
133
177
|
export declare const rebuildKnownTimeZoneIds: (data: Pick<PackedIanaData, "zones" | "links">) => any;
|
|
@@ -143,10 +187,19 @@ export declare const onClientTimeZoneChange: (handler: ClientTimeZoneChangeHandl
|
|
|
143
187
|
export declare const initClientTimeZoneSync: () => boolean;
|
|
144
188
|
export declare const getClientTimeZone: () => any;
|
|
145
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;
|
|
146
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;
|
|
147
196
|
export declare const getZoneUtcOffset: (value: TimeValue, timeZone?: string | null) => any;
|
|
148
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;
|
|
149
201
|
export declare const formatLocalDateTime: (value?: TimeValue, options?: FormatLocalDateTimeOptions | string) => string;
|
|
202
|
+
export declare const formatLocalDateTimeIntl: (value?: TimeValue, options?: FormatLocalDateTimeIntlOptions | string) => string;
|
|
150
203
|
export declare const toLocalDate: (value?: TimeValue, format?: string, options?: Omit<FormatLocalDateTimeOptions, "format">) => string;
|
|
151
204
|
export declare const formatTimeZoneOffsetLabel: (value?: TimeValue, timeZone?: string | null) => string;
|
|
152
205
|
export declare const resolveUtcOffsetFallback: (option: Pick<TimeZoneOption, "timeZoneId" | "baseUtcOffsetText" | "currentUtcOffsetText">, referenceDate?: Date) => string;
|