@indfnd/utils 0.1.24 → 0.1.26

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 (60) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/ind-utils.es.js +20 -4
  3. package/dist/ind-utils.umd.cjs +13 -13
  4. package/package.json +1 -1
  5. package/src/api/com.ts +3 -0
  6. package/src/api/item.ts +5 -0
  7. package/src/api/platform/oss.ts +3 -1
  8. package/src/config/base.config.ts +2 -0
  9. package/src/config/index.ts +14 -3
  10. package/types/api/com.d.ts +2 -2
  11. package/types/api/com.d.ts.map +1 -1
  12. package/types/api/index-desc.d.ts +2 -2
  13. package/types/api/index.d.ts +6 -6
  14. package/types/api/item.d.ts +4 -4
  15. package/types/api/item.d.ts.map +1 -1
  16. package/types/api/platform/base64.d.ts +5 -5
  17. package/types/api/platform/dict.d.ts +4 -4
  18. package/types/api/platform/index.d.ts +5 -5
  19. package/types/api/platform/menu.d.ts +17 -11
  20. package/types/api/platform/oss.d.ts +15 -7
  21. package/types/api/platform/oss.d.ts.map +1 -1
  22. package/types/api/platform/user.d.ts +17 -12
  23. package/types/api/user.d.ts +2 -2
  24. package/types/config/base.config.d.ts +33 -32
  25. package/types/config/base.config.d.ts.map +1 -1
  26. package/types/config/dev.config.d.ts +3 -3
  27. package/types/config/index.d.ts +6 -65
  28. package/types/config/index.d.ts.map +1 -1
  29. package/types/config/prod.config.d.ts +3 -3
  30. package/types/index.d.ts +4 -4
  31. package/types/utils/base64.d.ts +22 -22
  32. package/types/utils/blob.d.ts +3 -3
  33. package/types/utils/cache/dict-cache.d.ts +3 -3
  34. package/types/utils/cache/index-desc.d.ts +4 -4
  35. package/types/utils/cache/index.d.ts +4 -4
  36. package/types/utils/cache/permission-cache.d.ts +4 -4
  37. package/types/utils/cache/user-cache.d.ts +4 -4
  38. package/types/utils/date.d.ts +4 -4
  39. package/types/utils/enum.d.ts +43 -39
  40. package/types/utils/event.d.ts +13 -5
  41. package/types/utils/excel.d.ts +4 -4
  42. package/types/utils/half-year.d.ts +6 -6
  43. package/types/utils/index.d.ts +20 -20
  44. package/types/utils/is-type.d.ts +33 -33
  45. package/types/utils/mime-type.d.ts +67 -67
  46. package/types/utils/number.d.ts +8 -8
  47. package/types/utils/quarter.d.ts +7 -7
  48. package/types/utils/request/axios.extends.d.ts +7 -3
  49. package/types/utils/request/cache-rules.d.ts +3 -3
  50. package/types/utils/request/content-type.d.ts +9 -9
  51. package/types/utils/request/index.d.ts +8 -8
  52. package/types/utils/request/interceptors.d.ts +4 -4
  53. package/types/utils/request/url-params.d.ts +6 -6
  54. package/types/utils/sm3/index.d.ts +6 -6
  55. package/types/utils/sm3/sm3.d.ts +3 -3
  56. package/types/utils/storage.d.ts +8 -8
  57. package/types/utils/table.d.ts +40 -31
  58. package/types/utils/token.d.ts +3 -3
  59. package/types/utils/uuid.d.ts +4 -4
  60. package/types/utils/validate.d.ts +5 -5
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.26](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.25...v0.1.26) (2025-10-10)
6
+
7
+ ### [0.1.25](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.24...v0.1.25) (2025-09-04)
8
+
9
+
10
+ ### Features
11
+
12
+ * wps ([9f9f9f0](http://git.inspur.com/imp-ec/ind-front/ind-utils/commit/9f9f9f0b7d5aa1ac02458dc82720999ae9ab6e14))
13
+
5
14
  ### [0.1.24](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.23...v0.1.24) (2025-07-22)
6
15
 
7
16
 
@@ -3247,6 +3247,7 @@ var baseConfig = {
3247
3247
  imgServerContext: "/ind-img-server",
3248
3248
  imaServerContext: "/imarket-act-manage-server",
3249
3249
  ucExtServerContext: "/ind-uc-ext-server",
3250
+ dataManageServerContext: "/ddd-data-manage-server",
3250
3251
  kkfilepreviewContext: "/kkfilepreview",
3251
3252
  errorMessage: "\u7CFB\u7EDF\u5F00\u5C0F\u5DEE\u4E86\uFF0C\u8BF7\u7A0D\u540E\u5C1D\u8BD5",
3252
3253
  leftLockDays: 7,
@@ -3270,10 +3271,16 @@ function getProdConfig() {
3270
3271
  showMenus: typeof window !== "undefined" && window.top === window.self
3271
3272
  };
3272
3273
  }
3274
+ let config = {};
3273
3275
  function useConfig(isDev) {
3274
- return isDev ? Object.assign({}, baseConfig, getDevConfig()) : Object.assign({}, baseConfig, getProdConfig());
3276
+ config = isDev ? Object.assign({}, baseConfig, getDevConfig()) : Object.assign({}, baseConfig, getProdConfig());
3277
+ return config;
3278
+ }
3279
+ useConfig();
3280
+ function setConfig(key, value) {
3281
+ baseConfig[key] = value;
3282
+ config[key] = value;
3275
3283
  }
3276
- const config = useConfig();
3277
3284
  const SUCCESS_CODE = 1;
3278
3285
  const NO_SESSION_CODE = 10106;
3279
3286
  let timer = null;
@@ -11137,9 +11144,10 @@ function putOssFileApi(filename, blob) {
11137
11144
  });
11138
11145
  }
11139
11146
  function getPreviewUrlApi(fileId) {
11147
+ const isWeb = location.protocol === "https:" ? "1" : "";
11140
11148
  const axiosConfig = {};
11141
11149
  return instance.get(
11142
- `${config.ucExtServerContext}/api/wps/getPreviewUrl/${fileId}?previewMode=high_definition`,
11150
+ `${config.ucExtServerContext}/api/wps/getPreviewUrl/${fileId}?isWeb=${isWeb}&previewMode=high_definition`,
11143
11151
  axiosConfig
11144
11152
  );
11145
11153
  }
@@ -11255,6 +11263,9 @@ function logoutApi() {
11255
11263
  }
11256
11264
  const CONTEXT$1 = config.ismAmServerContext;
11257
11265
  function listComTreeApi(params) {
11266
+ if (config.useDddComItemTree) {
11267
+ return instance.get(`${config.ucExtServerContext}/manage/tree/getBusiComTree`, { params });
11268
+ }
11258
11269
  return instance.get(`${CONTEXT$1}/tree/com/listComTree`, { params });
11259
11270
  }
11260
11271
  const UC_CONTEXT$1 = config.ucExtServerContext;
@@ -11263,6 +11274,11 @@ function listIndexDescApi(params) {
11263
11274
  }
11264
11275
  const CONTEXT = config.ismAmServerContext;
11265
11276
  function listItemTreeApi(params) {
11277
+ if (config.useDddComItemTree) {
11278
+ return instance.get(`${config.ucExtServerContext}/manage/tree/getProductInfoAsTreeData`, {
11279
+ params
11280
+ });
11281
+ }
11266
11282
  return instance.get(`${CONTEXT}/tree/item/listItemTree`, { params });
11267
11283
  }
11268
11284
  function getPriceInfo() {
@@ -11275,4 +11291,4 @@ const UC_CONTEXT = config.ucExtServerContext;
11275
11291
  function listUserTreeApi(params) {
11276
11292
  return instance.get(`${UC_CONTEXT}/tree/uc-user/listUserTree`, { params });
11277
11293
  }
11278
- export { Base64ForLogin, CONTENT_TYPE, IS_OR_NOT_ENUM, IS_OR_NOT_ENUM_KEY, IS_OR_NOT_ENUM_LIST, MIME_TYPE, UC_ENUM, addMenuCollectApi, instance as axios, base64ToBlob, blobToBase64, checkIdCard, checkPhone, checkTel, checkVehicleNo, clearIndexDescCache, clearPermissionCache, clearSessionStorage, clearUserInfoCache, config, cryptor, deleteMenuCollectApi, deleteMenuHistoryApi, exportJsonToExcel, flattenRow2ColumnData, formatDate, formatDateChinese, formatDecimal, formatHalfYear, formatQuarter, getAppListApi, getCaptchaURL, getContentType, getDictApi, getDictMapApi, getDictsMapApi, getExcelColumnIdx, getGlobalPolicyApi, getHalfYear, getHalfYearBeginMonth, getHalfYearEndMonth, getHalfYearNum, getIndexDescCache, getItem, getLocalStorage, getMaxTabNumValueApi, getMenuCollectApi, getMenuHistoryApi, getOssFileApi, getOssFileUrl, getPermissionApi, getPermissionCache, getPreviewUrlApi, getPriceInfo, getQuarter, getQuarterBeginMonth, getQuarterEndMonth, getQuarterNum, getSessionStorage, getToken, getType, getUrlParams, getUserInfoApi, getUserInfoCache, guid, importJsonFromExcel, isArguments, isArray, isArrayLike, isBoolean, isDate, isDecimal, isElement, isEmpty, isEqual, isEqualWith, isError, isEven, isFinite$1 as isFinite, isFunction, isInteger, isNegative, isNil, isNull, isNumber, isNumberEqual, isObject, isObjectLike, isOdd, isPlainObject, isPositive, isPromise, isPrototype, isRegExp2 as isRegExp, isString, isType, isUndefined, listComTreeApi, listIndexDescApi, listItemTreeApi, listUserTreeApi, loginApi, logoutApi, menuHistoryApi, numToChineseNumerals, numToDX, off, on, preventDefault, putOssFileApi, putOssFileUrl, quarter2Chinese, removeLocalStorage, removeMenuCollectApi, removeSessionStorage, renderColumnEnums, renderEnumData, renderEnumList, renderFieldEnums, responseInterceptors, round, row2column, setContentType, setIndexDescCache, setLocalStorage, setPermissionCache, setSessionStorage, setToken, setUserInfoCache, stopPropagation, str2Date, toChies, toFixed, toThousands, updatePasswordApi, useConfig, uuid };
11294
+ export { Base64ForLogin, CONTENT_TYPE, IS_OR_NOT_ENUM, IS_OR_NOT_ENUM_KEY, IS_OR_NOT_ENUM_LIST, MIME_TYPE, UC_ENUM, addMenuCollectApi, instance as axios, base64ToBlob, blobToBase64, checkIdCard, checkPhone, checkTel, checkVehicleNo, clearIndexDescCache, clearPermissionCache, clearSessionStorage, clearUserInfoCache, config, cryptor, deleteMenuCollectApi, deleteMenuHistoryApi, exportJsonToExcel, flattenRow2ColumnData, formatDate, formatDateChinese, formatDecimal, formatHalfYear, formatQuarter, getAppListApi, getCaptchaURL, getContentType, getDictApi, getDictMapApi, getDictsMapApi, getExcelColumnIdx, getGlobalPolicyApi, getHalfYear, getHalfYearBeginMonth, getHalfYearEndMonth, getHalfYearNum, getIndexDescCache, getItem, getLocalStorage, getMaxTabNumValueApi, getMenuCollectApi, getMenuHistoryApi, getOssFileApi, getOssFileUrl, getPermissionApi, getPermissionCache, getPreviewUrlApi, getPriceInfo, getQuarter, getQuarterBeginMonth, getQuarterEndMonth, getQuarterNum, getSessionStorage, getToken, getType, getUrlParams, getUserInfoApi, getUserInfoCache, guid, importJsonFromExcel, isArguments, isArray, isArrayLike, isBoolean, isDate, isDecimal, isElement, isEmpty, isEqual, isEqualWith, isError, isEven, isFinite$1 as isFinite, isFunction, isInteger, isNegative, isNil, isNull, isNumber, isNumberEqual, isObject, isObjectLike, isOdd, isPlainObject, isPositive, isPromise, isPrototype, isRegExp2 as isRegExp, isString, isType, isUndefined, listComTreeApi, listIndexDescApi, listItemTreeApi, listUserTreeApi, loginApi, logoutApi, menuHistoryApi, numToChineseNumerals, numToDX, off, on, preventDefault, putOssFileApi, putOssFileUrl, quarter2Chinese, removeLocalStorage, removeMenuCollectApi, removeSessionStorage, renderColumnEnums, renderEnumData, renderEnumList, renderFieldEnums, responseInterceptors, round, row2column, setConfig, setContentType, setIndexDescCache, setLocalStorage, setPermissionCache, setSessionStorage, setToken, setUserInfoCache, stopPropagation, str2Date, toChies, toFixed, toThousands, updatePasswordApi, useConfig, uuid };