@lingxiteam/assets 1.0.11 → 1.0.12

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 (137) hide show
  1. package/es/dealDsl/preprocess/common.js +27 -16
  2. package/es/error/errorDisplay/Web/Drawer/Drawer.less +31 -0
  3. package/es/error/errorDisplay/Web/Drawer/index.js +12 -4
  4. package/es/error/errorDisplay/Web/ErrorMsg/index.js +27 -4
  5. package/es/error/errorDisplay/Web/Notification/index.js +22 -11
  6. package/es/rootConfig/mobile/BusiComp.js +1 -1
  7. package/es/rootConfig/mobile/MobileModal.js +1 -1
  8. package/es/rootConfig/mobile/MobilePopover.js +1 -1
  9. package/es/rootConfig/pc/BusiComp.js +1 -1
  10. package/es/rootConfig/pc/Drawer.js +1 -1
  11. package/es/rootConfig/pc/Modal.js +1 -1
  12. package/es/rootConfig/pc/Popover.js +1 -1
  13. package/es/rootConfig/todoActionList.js +1 -1
  14. package/es/rootConfig/todoOptionList.js +1 -1
  15. package/es/theme/bin/cucc/theme.js +275 -0
  16. package/es/theme/bin/cucc/theme.less +272 -0
  17. package/es/theme/bin/cucc/theme.scss +272 -0
  18. package/es/theme/bin/default/theme.js +275 -0
  19. package/es/theme/bin/default/theme.less +272 -0
  20. package/es/theme/bin/default/theme.scss +272 -0
  21. package/es/theme/build.js +42 -0
  22. package/es/theme/src/cucc/index.js +131 -0
  23. package/es/theme/src/default/index.js +131 -0
  24. package/es/theme/utils/colorPaletteMixin.js +59 -0
  25. package/es/theme/utils/px2Num.js +12 -0
  26. package/es/theme/utils/renderColors.js +16 -0
  27. package/lib/IconSvg/index.d.ts +6 -0
  28. package/lib/IconSvg/index.js +30 -0
  29. package/lib/dealDsl/PropType.d.ts +7 -0
  30. package/lib/dealDsl/PropType.js +5 -0
  31. package/lib/dealDsl/events/actionObj.d.ts +3 -0
  32. package/lib/dealDsl/events/actionObj.js +13 -0
  33. package/lib/dealDsl/events/index.d.ts +6 -0
  34. package/lib/dealDsl/events/index.js +21 -0
  35. package/lib/dealDsl/index.d.ts +2 -0
  36. package/lib/dealDsl/index.js +31 -0
  37. package/lib/dealDsl/preprocess/common.d.ts +9 -0
  38. package/lib/dealDsl/preprocess/common.js +277 -0
  39. package/lib/dealDsl/preprocess/editor.d.ts +9 -0
  40. package/lib/dealDsl/preprocess/editor.js +28 -0
  41. package/lib/dealDsl/preprocess/engine.d.ts +9 -0
  42. package/lib/dealDsl/preprocess/engine.js +26 -0
  43. package/lib/dealDsl/preprocessDSL.d.ts +21 -0
  44. package/lib/dealDsl/preprocessDSL.js +88 -0
  45. package/lib/dealDsl/utils/index.d.ts +13 -0
  46. package/lib/dealDsl/utils/index.js +29 -0
  47. package/lib/error/errorCatch/index.js +48 -0
  48. package/lib/error/errorDisplay/Mobile/Drawer/Drawer.js +115 -0
  49. package/lib/error/errorDisplay/Mobile/Drawer/Drawer.less +201 -0
  50. package/lib/error/errorDisplay/Mobile/Drawer/index.js +140 -0
  51. package/lib/error/errorDisplay/Mobile/ErrorMsg/index.js +207 -0
  52. package/lib/error/errorDisplay/Mobile/Modal/Modal.js +53 -0
  53. package/lib/error/errorDisplay/Mobile/Modal/Modal.less +146 -0
  54. package/lib/error/errorDisplay/Mobile/Modal/index.js +127 -0
  55. package/lib/error/errorDisplay/Mobile/defaultGlobalConfig.js +21 -0
  56. package/lib/error/errorDisplay/SVGstring.js +18 -0
  57. package/lib/error/errorDisplay/Web/Drawer/Drawer.js +274 -0
  58. package/lib/error/errorDisplay/Web/Drawer/Drawer.less +420 -0
  59. package/lib/error/errorDisplay/Web/Drawer/DrawerConnect.js +213 -0
  60. package/lib/error/errorDisplay/Web/Drawer/index.js +142 -0
  61. package/lib/error/errorDisplay/Web/ErrorMsg/index.js +301 -0
  62. package/lib/error/errorDisplay/Web/Notification/Notice.js +161 -0
  63. package/lib/error/errorDisplay/Web/Notification/Notification.js +149 -0
  64. package/lib/error/errorDisplay/Web/Notification/Notification.less +137 -0
  65. package/lib/error/errorDisplay/Web/Notification/index.js +104 -0
  66. package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +29 -0
  67. package/lib/error/errorDisplay/animation.less +112 -0
  68. package/lib/error/errorDisplay/compUtils.js +52 -0
  69. package/lib/error/errorDisplay/const.js +83 -0
  70. package/lib/error/errorDisplay/http.js +103 -0
  71. package/lib/error/errorDisplay/variables.less +1 -0
  72. package/lib/error/index.js +34 -0
  73. package/lib/images/ico-back.png +0 -0
  74. package/lib/index.d.ts +9 -0
  75. package/lib/rootConfig/index.d.ts +5 -0
  76. package/lib/rootConfig/index.js +28 -0
  77. package/lib/rootConfig/mobile/BusiComp.d.ts +66 -0
  78. package/lib/rootConfig/mobile/BusiComp.js +88 -0
  79. package/lib/rootConfig/mobile/MobileModal.d.ts +114 -0
  80. package/lib/rootConfig/mobile/MobileModal.js +140 -0
  81. package/lib/rootConfig/mobile/MobilePopover.d.ts +81 -0
  82. package/lib/rootConfig/mobile/MobilePopover.js +89 -0
  83. package/lib/rootConfig/mobile/index.d.ts +4 -0
  84. package/lib/rootConfig/mobile/index.js +34 -0
  85. package/lib/rootConfig/mobile/page.d.ts +157 -0
  86. package/lib/rootConfig/mobile/page.js +161 -0
  87. package/lib/rootConfig/pc/BusiComp.d.ts +66 -0
  88. package/lib/rootConfig/pc/BusiComp.js +88 -0
  89. package/lib/rootConfig/pc/Drawer.d.ts +150 -0
  90. package/lib/rootConfig/pc/Drawer.js +203 -0
  91. package/lib/rootConfig/pc/Modal.d.ts +160 -0
  92. package/lib/rootConfig/pc/Modal.js +195 -0
  93. package/lib/rootConfig/pc/Popover.d.ts +90 -0
  94. package/lib/rootConfig/pc/Popover.js +104 -0
  95. package/lib/rootConfig/pc/index.d.ts +5 -0
  96. package/lib/rootConfig/pc/index.js +41 -0
  97. package/lib/rootConfig/pc/page.d.ts +146 -0
  98. package/lib/rootConfig/pc/page.js +153 -0
  99. package/lib/rootConfig/todoActionList.d.ts +3082 -0
  100. package/lib/rootConfig/todoActionList.js +3600 -0
  101. package/lib/rootConfig/todoOptionList.d.ts +1466 -0
  102. package/lib/rootConfig/todoOptionList.js +1685 -0
  103. package/lib/security/const.d.ts +22 -0
  104. package/lib/security/const.js +38 -0
  105. package/lib/security/encipher/aes.d.ts +2 -0
  106. package/lib/security/encipher/aes.js +35 -0
  107. package/lib/security/encipher/des.d.ts +2 -0
  108. package/lib/security/encipher/des.js +34 -0
  109. package/lib/security/encipher/rsa.d.ts +2 -0
  110. package/lib/security/encipher/rsa.js +26 -0
  111. package/lib/security/encipher/sign.d.ts +6 -0
  112. package/lib/security/encipher/sign.js +102 -0
  113. package/lib/security/fetch.d.ts +9 -0
  114. package/lib/security/fetch.js +212 -0
  115. package/lib/security/httpEncryption.js +83 -0
  116. package/lib/security/index.d.ts +39 -0
  117. package/lib/security/index.js +29 -0
  118. package/lib/svg/check.svg +10 -0
  119. package/lib/svg/normal-check.svg +10 -0
  120. package/lib/svg/webViewError.svg +40 -0
  121. package/lib/theme/bin/cucc/theme.js +277 -0
  122. package/lib/theme/bin/cucc/theme.less +272 -0
  123. package/lib/theme/bin/cucc/theme.scss +272 -0
  124. package/lib/theme/bin/default/theme.js +277 -0
  125. package/lib/theme/bin/default/theme.less +272 -0
  126. package/lib/theme/bin/default/theme.scss +272 -0
  127. package/lib/theme/build.js +44 -0
  128. package/lib/theme/src/cucc/index.js +133 -0
  129. package/lib/theme/src/default/index.js +133 -0
  130. package/lib/theme/utils/colorPaletteMixin.js +61 -0
  131. package/lib/theme/utils/px2Num.js +14 -0
  132. package/lib/theme/utils/renderColors.js +18 -0
  133. package/lib/utils/img.d.ts +1 -0
  134. package/lib/utils/img.js +10 -0
  135. package/lib/utils/url.d.ts +16 -0
  136. package/lib/utils/url.js +111 -0
  137. package/package.json +6 -3
@@ -0,0 +1,16 @@
1
+ export declare const obj2QueryString: (params: any) => string;
2
+ export declare const getSearchObj: (url?: string) => {};
3
+ /**
4
+ * 解析路径地址表达式
5
+ * @param urlStr
6
+ * @param urlParamsContext
7
+ * 内置变量
8
+ protocol 当前url所使用的协议,包括结尾的":"
9
+ hostname 当前url的主机名
10
+ port 当前url的端口信息
11
+ pathname 当前url的路径字符串
12
+ search url中?以及之后的字符串
13
+ host 当前的主机信息,包括主机名,":"和端口号
14
+ href 当前文档的完整url
15
+ */
16
+ export declare const parseUrlExpression: (urlStr: string, urlParamsContext?: Record<string, any>) => string;
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.parseUrlExpression = exports.obj2QueryString = exports.getSearchObj = void 0;
7
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
10
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
13
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
14
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
17
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
18
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
+ var obj2QueryString = function obj2QueryString(params) {
20
+ var queryString = Object.keys(params).map(function (key) {
21
+ return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(params[key]));
22
+ }).join('&');
23
+ return queryString;
24
+ };
25
+ exports.obj2QueryString = obj2QueryString;
26
+ var getSearchObj = function getSearchObj() {
27
+ var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location.href;
28
+ var urlArr = url.split('?');
29
+ if (urlArr.length === 1) return {};
30
+ var search = urlArr.pop() || '';
31
+ var objs = search.split('&');
32
+ var obj = {};
33
+ objs.forEach(function (value) {
34
+ var _value$split = value.split('='),
35
+ _value$split2 = _slicedToArray(_value$split, 2),
36
+ k = _value$split2[0],
37
+ v = _value$split2[1];
38
+ if (v) {
39
+ obj[decodeURIComponent(k)] = decodeURIComponent(v);
40
+ }
41
+ });
42
+ return obj;
43
+ };
44
+ /**
45
+ * 解析路径地址表达式
46
+ * @param urlStr
47
+ * @param urlParamsContext
48
+ * 内置变量
49
+ protocol 当前url所使用的协议,包括结尾的":"
50
+ hostname 当前url的主机名
51
+ port 当前url的端口信息
52
+ pathname 当前url的路径字符串
53
+ search url中?以及之后的字符串
54
+ host 当前的主机信息,包括主机名,":"和端口号
55
+ href 当前文档的完整url
56
+ */
57
+ exports.getSearchObj = getSearchObj;
58
+ var parseUrlExpression = function parseUrlExpression(urlStr) {
59
+ var urlParamsContext = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
60
+ if (urlStr && typeof urlStr !== 'string') {
61
+ console.error("parseUrlExpression\u5904\u7406".concat(urlStr, "\u65F6\u89E3\u6790\u9519\u8BEF:\u8868\u8FBE\u5F0F\u9700\u4E3A\u5B57\u7B26\u4E32\u683C\u5F0F"));
62
+ return '';
63
+ }
64
+ var extend = urlParamsContext;
65
+ var result = urlStr;
66
+ if (_typeof(urlParamsContext) !== 'object') {
67
+ console.warn("parseUrlExpression\u53C2\u6570\u9519\u8BEF:\u6269\u5C55\u53C2\u6570\u9700\u4E3A\u5BF9\u8C61");
68
+ extend = {};
69
+ }
70
+ try {
71
+ var _ref = window.location || {},
72
+ protocol = _ref.protocol,
73
+ _ref$href = _ref.href,
74
+ href = _ref$href === void 0 ? '' : _ref$href,
75
+ port = _ref.port,
76
+ pathname = _ref.pathname,
77
+ host = _ref.host,
78
+ hostname = _ref.hostname,
79
+ hash = _ref.hash;
80
+ var defaultParams = {
81
+ protocol: protocol,
82
+ href: href,
83
+ port: port,
84
+ pathname: pathname,
85
+ host: host,
86
+ hostname: hostname,
87
+ searchObj: getSearchObj(href),
88
+ search: decodeURIComponent(href.split('?').pop() || ''),
89
+ hash: decodeURIComponent(hash)
90
+ };
91
+ var evalVariableExpression = function evalVariableExpression(text) {
92
+ var params = _objectSpread(_objectSpread({}, defaultParams), extend);
93
+ try {
94
+ return Function('context', "\n with(context) {\n return (function(){\n \"use strict\";\n return ".concat(text.slice(2, text.length - 1), ";\n })();\n }\n "))(params);
95
+ } catch (error) {
96
+ console.warn("parseUrlExpression\u5904\u7406".concat(text, "\u65F6\u89E3\u6790\u9519\u8BEF:"), error);
97
+ return text;
98
+ }
99
+ };
100
+ var regexp = /\$\{(.+?)\}/g;
101
+ if (result) {
102
+ result = result.replace(regexp, function (str) {
103
+ return evalVariableExpression(str);
104
+ });
105
+ }
106
+ } catch (e) {
107
+ console.error("parseUrlExpression\u6267\u884C\u9519\u8BEF:", e);
108
+ }
109
+ return result || '';
110
+ };
111
+ exports.parseUrlExpression = parseUrlExpression;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingxiteam/assets",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "灵犀低代码平台移动端 - 工具类",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -8,6 +8,7 @@
8
8
  "typings": "es/index.d.ts",
9
9
  "authors": [],
10
10
  "files": [
11
+ "lib",
11
12
  "es",
12
13
  "dist",
13
14
  "*.md"
@@ -17,9 +18,10 @@
17
18
  },
18
19
  "scripts": {
19
20
  "exports": "node ./scripts/exports.js",
20
- "prebuild-component": "npm run exports",
21
+ "prebuild-component": "npm run exports && npm run build-theme",
21
22
  "build-component": "father-build",
22
23
  "watch": "father-build -w",
24
+ "build-theme": "node ./src/theme/build.js",
23
25
  "test": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha"
24
26
  },
25
27
  "keywords": [],
@@ -36,6 +38,7 @@
36
38
  "gitHead": "bcd338198e2c14459538542d10600ab03abc92f2",
37
39
  "dependencies": {
38
40
  "crypto-js": "^4.1.1",
39
- "jsencrypt": "^3.1.0"
41
+ "jsencrypt": "^3.1.0",
42
+ "tinycolor2": "^1.6.0"
40
43
  }
41
44
  }