udxcms 1.0.15 → 1.0.16

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.
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isJSON = isJSON;
4
- exports.unwrapJSONStr = unwrapJSONStr;
5
1
  /*
6
2
  * @Author: lewis lewis@everylink.ai
7
3
  * @Date: 2023-12-19 10:49:53
@@ -14,7 +10,7 @@ exports.unwrapJSONStr = unwrapJSONStr;
14
10
  * 判断是否是json 字符串
15
11
  * @param {*} jsonString 字符串
16
12
  */
17
- function isJSON(jsonString) {
13
+ export function isJSON(jsonString) {
18
14
  try {
19
15
  const res = JSON.parse(jsonString);
20
16
  if (typeof res === 'object' && res) {
@@ -31,13 +27,13 @@ function isJSON(jsonString) {
31
27
  * 解包json字符串
32
28
  * @param str 兼容格式 JSON.stringify的n层嵌套
33
29
  */
34
- function unwrapJSONStr(str) {
30
+ export function unwrapJSONStr(str) {
35
31
  if (typeof str === "string") {
36
32
  return unwrapJSONStr(JSON.parse(str));
37
33
  }
38
34
  return str;
39
35
  }
40
- exports.default = {
36
+ export default {
41
37
  isJSON,
42
38
  unwrapJSONStr
43
39
  };
package/dist/utils/pdf.js CHANGED
@@ -1,6 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Pdfembed = void 0;
4
1
  /*
5
2
  * @Author:
6
3
  * @Date: 2020-12-17 19:28:53
@@ -16,7 +13,7 @@ exports.Pdfembed = void 0;
16
13
  * MIT-style license: http://pipwerks.mit-license.org/
17
14
  * UMD module pattern from https://github.com/umdjs/umd/blob/master/templates/returnExports.js
18
15
  */
19
- const Pdfembed = function () {
16
+ export const Pdfembed = function () {
20
17
  let nav = window.navigator, ua = window.navigator.userAgent, isIE = "ActiveXObject" in window, isModernBrowser = void 0 !== window.Promise, supportsPdfMimeType = void 0 !== nav.mimeTypes["application/pdf"], isMobileDevice = void 0 !== nav.platform && "MacIntel" === nav.platform && void 0 !== nav.maxTouchPoints && nav.maxTouchPoints > 1 || /Mobi|Tablet|Android|iPad|iPhone/.test(ua), isSafariDesktop = !isMobileDevice && void 0 !== nav.vendor && /Apple/.test(nav.vendor) && /Safari/.test(ua), isFirefoxWithPDFJS = !(isMobileDevice || !/irefox/.test(ua)) && parseInt(ua.split("rv:")[1].split(".")[0], 10) > 18, createAXO = function (type) {
21
18
  var ax;
22
19
  try {
@@ -75,7 +72,6 @@ const Pdfembed = function () {
75
72
  supportsPDFs: supportsPDFs
76
73
  };
77
74
  };
78
- exports.Pdfembed = Pdfembed;
79
- exports.default = {
80
- Pdfembed: exports.Pdfembed
75
+ export default {
76
+ Pdfembed
81
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "udxcms",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "cms submodule",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",