@das-fed/upf-utils 6.4.0-dev.286 → 6.4.0-dev.288

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 (97) hide show
  1. package/api-services/es5.js +1648 -1634
  2. package/api-services/index.js +1342 -1319
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/es5.js +1129 -1112
  5. package/api-services/modules/app-manage/index.js +946 -919
  6. package/api-services/modules/app-manage/index.js.gz +0 -0
  7. package/api-services/modules/authentication/es5.js +1141 -1124
  8. package/api-services/modules/authentication/index.js +958 -931
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/es5.js +1160 -1143
  11. package/api-services/modules/bems/index.js +974 -947
  12. package/api-services/modules/bems/index.js.gz +0 -0
  13. package/api-services/modules/contract/es5.js +1141 -1124
  14. package/api-services/modules/contract/index.js +958 -931
  15. package/api-services/modules/contract/index.js.gz +0 -0
  16. package/api-services/modules/duty-manage/es5.js +865 -857
  17. package/api-services/modules/duty-manage/index.js +683 -670
  18. package/api-services/modules/duty-manage/index.js.gz +0 -0
  19. package/api-services/modules/enterpriseright/es5.js +7 -2
  20. package/api-services/modules/enterpriseright/index.js +10 -1
  21. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  22. package/api-services/modules/es5.js +1366 -1370
  23. package/api-services/modules/file/es5.js +7 -2
  24. package/api-services/modules/file/index.js +10 -1
  25. package/api-services/modules/file/index.js.gz +0 -0
  26. package/api-services/modules/gateway-edge/es5.js +7 -2
  27. package/api-services/modules/gateway-edge/index.js +10 -1
  28. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  29. package/api-services/modules/index.js +1079 -1084
  30. package/api-services/modules/index.js.gz +0 -0
  31. package/api-services/modules/iot/es5.js +1236 -1243
  32. package/api-services/modules/iot/index.js +1031 -1040
  33. package/api-services/modules/iot/index.js.gz +0 -0
  34. package/api-services/modules/justauth/es5.js +1133 -1137
  35. package/api-services/modules/justauth/index.js +944 -949
  36. package/api-services/modules/justauth/index.js.gz +0 -0
  37. package/api-services/modules/knowledge/es5.js +7 -2
  38. package/api-services/modules/knowledge/index.js +10 -1
  39. package/api-services/modules/knowledge/index.js.gz +0 -0
  40. package/api-services/modules/link/es5.js +1129 -1136
  41. package/api-services/modules/link/index.js +940 -949
  42. package/api-services/modules/link/index.js.gz +0 -0
  43. package/api-services/modules/permission/es5.js +1129 -1136
  44. package/api-services/modules/permission/index.js +940 -949
  45. package/api-services/modules/permission/index.js.gz +0 -0
  46. package/api-services/modules/platformManage/es5.js +7 -2
  47. package/api-services/modules/platformManage/index.js +10 -1
  48. package/api-services/modules/platformManage/index.js.gz +0 -0
  49. package/api-services/modules/portal/es5.js +1141 -1124
  50. package/api-services/modules/portal/index.js +958 -931
  51. package/api-services/modules/portal/index.js.gz +0 -0
  52. package/api-services/modules/space-manage/es5.js +7 -2
  53. package/api-services/modules/space-manage/index.js +10 -1
  54. package/api-services/modules/space-manage/index.js.gz +0 -0
  55. package/api-services/modules/super-admin/es5.js +7 -2
  56. package/api-services/modules/super-admin/index.js +10 -1
  57. package/api-services/modules/super-admin/index.js.gz +0 -0
  58. package/api-services/modules/supplier/es5.js +861 -858
  59. package/api-services/modules/supplier/index.js +679 -674
  60. package/api-services/modules/supplier/index.js.gz +0 -0
  61. package/api-services/modules/supplychain-manage/es5.js +1141 -1124
  62. package/api-services/modules/supplychain-manage/index.js +958 -931
  63. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  64. package/api-services/modules/systemConfiguration/es5.js +1129 -1136
  65. package/api-services/modules/systemConfiguration/index.js +940 -949
  66. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  67. package/api-services/modules/tool/es5.js +7 -2
  68. package/api-services/modules/tool/index.js +10 -1
  69. package/api-services/modules/tool/index.js.gz +0 -0
  70. package/api-services/src/create-service/es5.js +1127 -1134
  71. package/api-services/src/create-service/index.js +939 -948
  72. package/api-services/src/create-service/index.js.gz +0 -0
  73. package/common-info/es5.js +7 -2
  74. package/common-info/getPermissionMethod/es5.js +7 -2
  75. package/common-info/getPermissionMethod/index.js +10 -1
  76. package/common-info/getPermissionMethod/index.js.gz +0 -0
  77. package/common-info/index.js +10 -1
  78. package/common-info/index.js.gz +0 -0
  79. package/common-tools/timezone-format/es5.d.ts +55 -1
  80. package/common-tools/timezone-format/es5.js +575 -365
  81. package/common-tools/timezone-format/index.d.ts +55 -1
  82. package/common-tools/timezone-format/index.js +397 -261
  83. package/common-tools/timezone-format/index.js.gz +0 -0
  84. package/create-api-service/es5.js +1128 -1135
  85. package/create-api-service/i18n/es5.d.ts +42 -0
  86. package/create-api-service/i18n/es5.js +44 -2
  87. package/create-api-service/i18n/index.d.ts +42 -0
  88. package/create-api-service/i18n/index.js +19 -2
  89. package/create-api-service/i18n/index.js.gz +0 -0
  90. package/create-api-service/index.js +940 -949
  91. package/create-api-service/index.js.gz +0 -0
  92. package/curring-http/es5.js +406 -417
  93. package/curring-http/index.js +323 -321
  94. package/curring-http/index.js.gz +0 -0
  95. package/esm-map.json +16 -1
  96. package/package.json +18 -4
  97. package/release-meta.json +13 -0
@@ -4043,8 +4043,13 @@ var Il = 5e3,
4043
4043
  i = {};
4044
4044
  a = {
4045
4045
  400: r("参数校验错误"),
4046
- 404: r("接口地址未找到"),
4047
- 500: r("服务器内部错误")
4046
+ 404: r("请求的资源不存在"),
4047
+ 405: r("请求方式不被允许"),
4048
+ 429: r("操作过于频繁"),
4049
+ 500: r("服务器出错了"),
4050
+ 502: r("服务器响应异常"),
4051
+ 503: r("服务正在维护或过载,请稍后再访问"),
4052
+ 504: r("服务器响应超时,请检查网络或稍后重试")
4048
4053
  };
4049
4054
  s = ((d = e == null ? undefined : e.response) == null ? undefined : d.data) || {};
4050
4055
  c = s == null ? undefined : s.code, u = (h = e.response) == null ? undefined : h.status;
@@ -4042,8 +4042,13 @@ var Al = 5e3,
4042
4042
  i = {};
4043
4043
  a = {
4044
4044
  400: r("参数校验错误"),
4045
- 404: r("接口地址未找到"),
4046
- 500: r("服务器内部错误")
4045
+ 404: r("请求的资源不存在"),
4046
+ 405: r("请求方式不被允许"),
4047
+ 429: r("操作过于频繁"),
4048
+ 500: r("服务器出错了"),
4049
+ 502: r("服务器响应异常"),
4050
+ 503: r("服务正在维护或过载,请稍后再访问"),
4051
+ 504: r("服务器响应超时,请检查网络或稍后重试")
4047
4052
  };
4048
4053
  s = ((d = t == null ? undefined : t.response) == null ? undefined : d.data) || {};
4049
4054
  c = s == null ? undefined : s.code, u = (m = t.response) == null ? undefined : m.status;
@@ -3359,7 +3359,16 @@ const Al = 5e3, uo = () => _t ? !1 : (_t = !0, setTimeout(() => {
3359
3359
  var d, m, h, b;
3360
3360
  const { t: r } = an();
3361
3361
  let n, o, i = {};
3362
- const a = { 400: r("参数校验错误"), 404: r("接口地址未找到"), 500: r("服务器内部错误") };
3362
+ const a = {
3363
+ 400: r("参数校验错误"),
3364
+ 404: r("请求的资源不存在"),
3365
+ 405: r("请求方式不被允许"),
3366
+ 429: r("操作过于频繁"),
3367
+ 500: r("服务器出错了"),
3368
+ 502: r("服务器响应异常"),
3369
+ 503: r("服务正在维护或过载,请稍后再访问"),
3370
+ 504: r("服务器响应超时,请检查网络或稍后重试")
3371
+ };
3363
3372
  let s = ((d = t == null ? void 0 : t.response) == null ? void 0 : d.data) || {};
3364
3373
  const c = s == null ? void 0 : s.code, u = (m = t.response) == null ? void 0 : m.status;
3365
3374
  if (c === 401 || u === 401) {
@@ -3360,7 +3360,16 @@ const Il = 5e3, po = () => xt ? !1 : (xt = !0, setTimeout(() => {
3360
3360
  var d, h, m, b;
3361
3361
  const { t: r } = ln();
3362
3362
  let n, o, i = {};
3363
- const a = { 400: r("参数校验错误"), 404: r("接口地址未找到"), 500: r("服务器内部错误") };
3363
+ const a = {
3364
+ 400: r("参数校验错误"),
3365
+ 404: r("请求的资源不存在"),
3366
+ 405: r("请求方式不被允许"),
3367
+ 429: r("操作过于频繁"),
3368
+ 500: r("服务器出错了"),
3369
+ 502: r("服务器响应异常"),
3370
+ 503: r("服务正在维护或过载,请稍后再访问"),
3371
+ 504: r("服务器响应超时,请检查网络或稍后重试")
3372
+ };
3364
3373
  let s = ((d = e == null ? void 0 : e.response) == null ? void 0 : d.data) || {};
3365
3374
  const c = s == null ? void 0 : s.code, u = (h = e.response) == null ? void 0 : h.status;
3366
3375
  if (c === 401 || u === 401) {
Binary file
@@ -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,21 @@ 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;
175
+ export declare const readInjectedParentIanaTimeZoneDataSnapshot: () => RuntimeIanaTimeZoneDataSnapshot | null;
131
176
  export declare const clientTimeZone: any;
132
177
  export declare const isKnownTimeZone: (timeZone?: string | null) => any;
133
178
  export declare const rebuildKnownTimeZoneIds: (data: Pick<PackedIanaData, "zones" | "links">) => any;
@@ -143,10 +188,19 @@ export declare const onClientTimeZoneChange: (handler: ClientTimeZoneChangeHandl
143
188
  export declare const initClientTimeZoneSync: () => boolean;
144
189
  export declare const getClientTimeZone: () => any;
145
190
  export declare const resolveTimeZone: (timeZone?: string | null) => any;
191
+ export declare const resolvePickerTimeZone: (options?: TimeZonePickerOptions) => any;
192
+ export declare const isTimeZonePickerModeEnabled: (options?: TimeZonePickerOptions) => boolean;
146
193
  export declare const normalizeLocaleCode: (locale?: string, supportedLocales?: string[]) => any;
194
+ export declare const getTimeZoneDayjs: () => TimeZoneDayjsFactory;
195
+ export declare const toTimeZonePickerValue: <T extends TimeValue>(value?: T, options?: TimeZonePickerOptions) => any;
196
+ export declare const fromTimeZonePickerValue: (value?: TimeValue, options?: TimeZonePickerOptions) => any;
147
197
  export declare const getZoneUtcOffset: (value: TimeValue, timeZone?: string | null) => any;
148
198
  export declare const formatInTimeZone: (value?: TimeValue, timeZone?: string | null, format?: string) => any;
199
+ export declare const toTimestampAtZoneStartOfDay: (value?: TimeValue, options?: TimeZoneDayBoundaryOptions) => number | undefined;
200
+ export declare const toTimestampAtZoneEndOfDay: (value?: TimeValue, options?: TimeZoneDayBoundaryOptions) => number | undefined;
201
+ export declare const isMomentTimezoneFormatInstance: (moment?: unknown) => moment is MomentTimezoneFormatInstance;
149
202
  export declare const formatLocalDateTime: (value?: TimeValue, options?: FormatLocalDateTimeOptions | string) => string;
203
+ export declare const formatLocalDateTimeIntl: (value?: TimeValue, options?: FormatLocalDateTimeIntlOptions | string) => string;
150
204
  export declare const toLocalDate: (value?: TimeValue, format?: string, options?: Omit<FormatLocalDateTimeOptions, "format">) => string;
151
205
  export declare const formatTimeZoneOffsetLabel: (value?: TimeValue, timeZone?: string | null) => string;
152
206
  export declare const resolveUtcOffsetFallback: (option: Pick<TimeZoneOption, "timeZoneId" | "baseUtcOffsetText" | "currentUtcOffsetText">, referenceDate?: Date) => string;