@das-fed/upf-utils 6.4.0-dev.279 → 6.4.0-dev.281
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 +1127 -1136
- package/api-services/index.js +857 -862
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +1252 -1271
- package/api-services/modules/app-manage/index.js +1048 -1068
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +921 -928
- package/api-services/modules/authentication/index.js +740 -742
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +1056 -1069
- package/api-services/modules/bems/index.js +841 -851
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +1258 -1280
- package/api-services/modules/contract/index.js +1048 -1072
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +673 -683
- package/api-services/modules/duty-manage/index.js +556 -562
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +1258 -1280
- package/api-services/modules/enterpriseright/index.js +1048 -1072
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +1168 -1177
- package/api-services/modules/file/es5.js +1098 -1107
- package/api-services/modules/file/index.js +869 -874
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +680 -690
- package/api-services/modules/gateway-edge/index.js +566 -572
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +885 -890
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +1044 -1056
- package/api-services/modules/iot/index.js +830 -840
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +1262 -1284
- package/api-services/modules/justauth/index.js +1051 -1075
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +921 -928
- package/api-services/modules/knowledge/index.js +740 -742
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +1267 -1265
- package/api-services/modules/link/index.js +1054 -1042
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +1252 -1253
- package/api-services/modules/permission/index.js +1042 -1034
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +1282 -1301
- package/api-services/modules/platformManage/index.js +1071 -1091
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +1252 -1271
- package/api-services/modules/portal/index.js +1048 -1068
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +680 -690
- package/api-services/modules/space-manage/index.js +566 -572
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +725 -735
- package/api-services/modules/super-admin/index.js +600 -606
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +1039 -1052
- package/api-services/modules/supplier/index.js +826 -836
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +1267 -1265
- package/api-services/modules/supplychain-manage/index.js +1054 -1042
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +680 -690
- package/api-services/modules/systemConfiguration/index.js +566 -572
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +694 -704
- package/api-services/modules/tool/index.js +568 -574
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +690 -700
- package/api-services/src/create-service/index.js +567 -573
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +1447 -1448
- package/common-info/getPermissionMethod/es5.js +760 -770
- package/common-info/getPermissionMethod/index.js +635 -641
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.js +1217 -1209
- package/common-info/index.js.gz +0 -0
- package/common-tools/timezone-format/es5.d.ts +5 -54
- package/common-tools/timezone-format/es5.js +373 -550
- package/common-tools/timezone-format/index.d.ts +5 -54
- package/common-tools/timezone-format/index.js +271 -374
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/create-api-service/es5.js +679 -689
- package/create-api-service/index.js +566 -572
- package/create-api-service/index.js.gz +0 -0
- package/curring-http/es5.js +417 -406
- package/curring-http/index.js +321 -323
- package/curring-http/index.js.gz +0 -0
- package/esm-map.json +1 -15
- package/package.json +3 -3
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { 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;
|
|
8
7
|
export type TimeValue = string | number | Date | Dayjs | null | undefined;
|
|
9
8
|
export type TimeZoneFlag = number | string | null | undefined;
|
|
10
9
|
export type TimeZoneDateLibrary = 'dayjs' | 'moment';
|
|
11
10
|
export type TimeZoneInputMode = 'instant' | 'local';
|
|
12
|
-
export type TimeZonePickerMode = 'none' | 'instant' | 'local';
|
|
13
11
|
interface MomentFormatValue {
|
|
14
12
|
tz?: (timeZone: string) => MomentFormatValue;
|
|
15
13
|
format: (format?: string) => string;
|
|
@@ -96,39 +94,9 @@ export interface FormatLocalDateTimeOptions {
|
|
|
96
94
|
/** 未传 timeZone 时是否读取 sessionStorage/客户端时区。默认 false,兼容旧 toLocalDate。 */
|
|
97
95
|
useClientTimeZone?: boolean;
|
|
98
96
|
}
|
|
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
|
-
}
|
|
125
97
|
export interface ApplyIanaTimeZoneOptions {
|
|
126
98
|
/** 指定默认时区,后续 dayjs.tz(value) 可直接使用。 */
|
|
127
99
|
defaultTimeZone?: string;
|
|
128
|
-
/** 写入运行期快照的数据来源,供 mframe 注入 iframe 首屏复用。 */
|
|
129
|
-
runtimeSource?: RuntimeIanaTimeZoneDataSource;
|
|
130
|
-
/** 是否同步 window.__UPF_IANA_TIMEZONE_DATA__ 并派发事件,默认 true。 */
|
|
131
|
-
syncRuntimeSnapshot?: boolean;
|
|
132
100
|
}
|
|
133
101
|
export interface LoadIanaTimeZoneOptions extends PreloadDayjsIanaOptions, ApplyIanaTimeZoneOptions {
|
|
134
102
|
}
|
|
@@ -158,21 +126,13 @@ export interface SetClientTimeZoneOptions {
|
|
|
158
126
|
source?: string;
|
|
159
127
|
}
|
|
160
128
|
export type ClientTimeZoneChangeHandler = (timeZone: string, detail: ClientTimeZoneChangeDetail) => void;
|
|
161
|
-
export
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
source: RuntimeIanaTimeZoneDataSource;
|
|
165
|
-
/** 写入快照时间,供宿主和 iframe 判断是否需要刷新。 */
|
|
166
|
-
timestamp: number;
|
|
129
|
+
export interface ClientTimeZoneRef {
|
|
130
|
+
/** 框架无关的当前时区快照;Vue/Angular/原生应用都可直接读取。 */
|
|
131
|
+
value: string;
|
|
167
132
|
}
|
|
168
133
|
export declare const TIMEZONE_CHANGE_EVENT = "timezonechange";
|
|
169
134
|
export declare const UPF_TIMEZONE_MESSAGE_TYPE = "__UPF_TIMEZONE_CHANGE__";
|
|
170
|
-
export declare const
|
|
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;
|
|
175
|
-
export declare const clientTimeZone: any;
|
|
135
|
+
export declare const clientTimeZone: ClientTimeZoneRef;
|
|
176
136
|
export declare const isKnownTimeZone: (timeZone?: string | null) => any;
|
|
177
137
|
export declare const rebuildKnownTimeZoneIds: (data: Pick<PackedIanaData, "zones" | "links">) => any;
|
|
178
138
|
export declare const getKnownTimeZoneIds: () => any;
|
|
@@ -187,19 +147,10 @@ export declare const onClientTimeZoneChange: (handler: ClientTimeZoneChangeHandl
|
|
|
187
147
|
export declare const initClientTimeZoneSync: () => boolean;
|
|
188
148
|
export declare const getClientTimeZone: () => any;
|
|
189
149
|
export declare const resolveTimeZone: (timeZone?: string | null) => any;
|
|
190
|
-
export declare const resolvePickerTimeZone: (options?: TimeZonePickerOptions) => any;
|
|
191
|
-
export declare const isTimeZonePickerModeEnabled: (options?: TimeZonePickerOptions) => boolean;
|
|
192
150
|
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;
|
|
196
151
|
export declare const getZoneUtcOffset: (value: TimeValue, timeZone?: string | null) => any;
|
|
197
152
|
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;
|
|
201
153
|
export declare const formatLocalDateTime: (value?: TimeValue, options?: FormatLocalDateTimeOptions | string) => string;
|
|
202
|
-
export declare const formatLocalDateTimeIntl: (value?: TimeValue, options?: FormatLocalDateTimeIntlOptions | string) => string;
|
|
203
154
|
export declare const toLocalDate: (value?: TimeValue, format?: string, options?: Omit<FormatLocalDateTimeOptions, "format">) => string;
|
|
204
155
|
export declare const formatTimeZoneOffsetLabel: (value?: TimeValue, timeZone?: string | null) => string;
|
|
205
156
|
export declare const resolveUtcOffsetFallback: (option: Pick<TimeZoneOption, "timeZoneId" | "baseUtcOffsetText" | "currentUtcOffsetText">, referenceDate?: Date) => string;
|