@lingxiteam/assets 1.0.12 → 1.0.13-alpha.2

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 (133) hide show
  1. package/es/dealDsl/index.d.ts +1 -2
  2. package/es/dealDsl/index.js +1 -2
  3. package/es/dealDsl/preprocess/common.js +179 -37
  4. package/es/dealDsl/preprocessDSL.d.ts +2 -14
  5. package/es/dealDsl/preprocessDSL.js +2 -42
  6. package/es/error/errorDisplay/Web/Drawer/Drawer.js +6 -2
  7. package/es/error/errorDisplay/Web/Drawer/Drawer.less +25 -0
  8. package/es/error/errorDisplay/Web/ErrorMsg/index.js +187 -43
  9. package/es/error/errorDisplay/Web/Notification/Notice.js +5 -1
  10. package/es/error/errorDisplay/Web/Notification/Notification.js +10 -3
  11. package/es/error/errorDisplay/Web/Notification/Notification.less +13 -1
  12. package/es/error/errorDisplay/Web/Notification/index.js +8 -9
  13. package/es/error/errorDisplay/Web/defaultGlobalConfig.js +3 -1
  14. package/es/error/errorDisplay/compUtils.js +17 -1
  15. package/es/error/errorDisplay/const.js +1 -1
  16. package/es/error/errorDisplay/http.js +1 -1
  17. package/es/error/index.js +3 -1
  18. package/es/index.d.ts +2 -2
  19. package/es/index.js +2 -2
  20. package/es/rootConfig/mobile/BusiComp.d.ts +5 -0
  21. package/es/rootConfig/mobile/BusiComp.js +32 -3
  22. package/es/rootConfig/mobile/MobileModal.d.ts +13 -5
  23. package/es/rootConfig/mobile/MobileModal.js +38 -9
  24. package/es/rootConfig/mobile/MobilePopover.d.ts +5 -0
  25. package/es/rootConfig/mobile/MobilePopover.js +31 -2
  26. package/es/rootConfig/mobile/page.d.ts +25 -5
  27. package/es/rootConfig/mobile/page.js +70 -10
  28. package/es/rootConfig/pc/BusiComp.d.ts +4 -0
  29. package/es/rootConfig/pc/BusiComp.js +64 -3
  30. package/es/rootConfig/pc/Drawer.d.ts +12 -0
  31. package/es/rootConfig/pc/Drawer.js +68 -2
  32. package/es/rootConfig/pc/Modal.d.ts +6 -0
  33. package/es/rootConfig/pc/Modal.js +62 -2
  34. package/es/rootConfig/pc/Popover.d.ts +5 -0
  35. package/es/rootConfig/pc/Popover.js +58 -2
  36. package/es/rootConfig/pc/page.d.ts +25 -10
  37. package/es/rootConfig/pc/page.js +103 -15
  38. package/es/rootConfig/todoActionList.d.ts +170 -50
  39. package/es/rootConfig/todoActionList.js +221 -70
  40. package/es/rootConfig/todoOptionList.d.ts +38 -6
  41. package/es/rootConfig/todoOptionList.js +44 -6
  42. package/es/security/encipher/sign.js +8 -1
  43. package/es/security/encipher/token.d.ts +3 -0
  44. package/es/security/encipher/token.js +30 -0
  45. package/es/security/index.d.ts +2 -0
  46. package/es/security/index.js +4 -1
  47. package/es/theme/bin/default/modalWidth.js +8 -0
  48. package/es/theme/bin/default/theme.js +282 -207
  49. package/es/theme/bin/default/theme.less +282 -207
  50. package/es/theme/bin/default/theme.scss +282 -207
  51. package/es/theme/build.js +9 -0
  52. package/es/theme/src/default/index.js +169 -61
  53. package/es/theme/utils/renderColors.js +13 -2
  54. package/es/utils/cookieUtil.js +36 -0
  55. package/lib/dealDsl/index.d.ts +1 -2
  56. package/lib/dealDsl/index.js +1 -20
  57. package/lib/dealDsl/preprocess/common.js +179 -37
  58. package/lib/dealDsl/preprocessDSL.d.ts +2 -14
  59. package/lib/dealDsl/preprocessDSL.js +4 -46
  60. package/lib/error/errorDisplay/Web/Drawer/Drawer.js +6 -2
  61. package/lib/error/errorDisplay/Web/Drawer/Drawer.less +25 -0
  62. package/lib/error/errorDisplay/Web/ErrorMsg/index.js +186 -43
  63. package/lib/error/errorDisplay/Web/Notification/Notice.js +5 -1
  64. package/lib/error/errorDisplay/Web/Notification/Notification.js +10 -3
  65. package/lib/error/errorDisplay/Web/Notification/Notification.less +13 -1
  66. package/lib/error/errorDisplay/Web/Notification/index.js +8 -9
  67. package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +2 -1
  68. package/lib/error/errorDisplay/compUtils.js +19 -1
  69. package/lib/error/errorDisplay/const.js +1 -1
  70. package/lib/error/errorDisplay/http.js +1 -1
  71. package/lib/error/index.js +14 -0
  72. package/lib/index.d.ts +2 -2
  73. package/lib/index.js +14 -0
  74. package/lib/rootConfig/mobile/BusiComp.d.ts +5 -0
  75. package/lib/rootConfig/mobile/BusiComp.js +32 -3
  76. package/lib/rootConfig/mobile/MobileModal.d.ts +13 -5
  77. package/lib/rootConfig/mobile/MobileModal.js +38 -9
  78. package/lib/rootConfig/mobile/MobilePopover.d.ts +5 -0
  79. package/lib/rootConfig/mobile/MobilePopover.js +31 -2
  80. package/lib/rootConfig/mobile/page.d.ts +25 -5
  81. package/lib/rootConfig/mobile/page.js +70 -10
  82. package/lib/rootConfig/pc/BusiComp.d.ts +4 -0
  83. package/lib/rootConfig/pc/BusiComp.js +64 -3
  84. package/lib/rootConfig/pc/Drawer.d.ts +12 -0
  85. package/lib/rootConfig/pc/Drawer.js +68 -2
  86. package/lib/rootConfig/pc/Modal.d.ts +6 -0
  87. package/lib/rootConfig/pc/Modal.js +62 -2
  88. package/lib/rootConfig/pc/Popover.d.ts +5 -0
  89. package/lib/rootConfig/pc/Popover.js +58 -2
  90. package/lib/rootConfig/pc/page.d.ts +25 -10
  91. package/lib/rootConfig/pc/page.js +103 -15
  92. package/lib/rootConfig/todoActionList.d.ts +170 -50
  93. package/lib/rootConfig/todoActionList.js +221 -70
  94. package/lib/rootConfig/todoOptionList.d.ts +38 -6
  95. package/lib/rootConfig/todoOptionList.js +44 -6
  96. package/lib/security/encipher/sign.js +9 -1
  97. package/lib/security/encipher/token.d.ts +3 -0
  98. package/lib/security/encipher/token.js +38 -0
  99. package/lib/security/index.d.ts +2 -0
  100. package/lib/security/index.js +4 -1
  101. package/lib/theme/bin/default/modalWidth.js +15 -0
  102. package/lib/theme/bin/default/theme.js +282 -207
  103. package/lib/theme/bin/default/theme.less +282 -207
  104. package/lib/theme/bin/default/theme.scss +282 -207
  105. package/lib/theme/build.js +9 -0
  106. package/lib/theme/src/default/index.js +169 -61
  107. package/lib/theme/utils/renderColors.js +13 -2
  108. package/lib/utils/cookieUtil.js +43 -0
  109. package/package.json +1 -1
  110. package/es/dealDsl/events/actionObj.d.ts +0 -3
  111. package/es/dealDsl/events/actionObj.js +0 -6
  112. package/es/dealDsl/events/index.d.ts +0 -6
  113. package/es/dealDsl/events/index.js +0 -14
  114. package/es/dealDsl/preprocess/editor.d.ts +0 -9
  115. package/es/dealDsl/preprocess/editor.js +0 -21
  116. package/es/dealDsl/preprocess/engine.d.ts +0 -9
  117. package/es/dealDsl/preprocess/engine.js +0 -19
  118. package/es/theme/bin/cucc/theme.js +0 -275
  119. package/es/theme/bin/cucc/theme.less +0 -272
  120. package/es/theme/bin/cucc/theme.scss +0 -272
  121. package/es/theme/src/cucc/index.js +0 -131
  122. package/lib/dealDsl/events/actionObj.d.ts +0 -3
  123. package/lib/dealDsl/events/actionObj.js +0 -13
  124. package/lib/dealDsl/events/index.d.ts +0 -6
  125. package/lib/dealDsl/events/index.js +0 -21
  126. package/lib/dealDsl/preprocess/editor.d.ts +0 -9
  127. package/lib/dealDsl/preprocess/editor.js +0 -28
  128. package/lib/dealDsl/preprocess/engine.d.ts +0 -9
  129. package/lib/dealDsl/preprocess/engine.js +0 -26
  130. package/lib/theme/bin/cucc/theme.js +0 -277
  131. package/lib/theme/bin/cucc/theme.less +0 -272
  132. package/lib/theme/bin/cucc/theme.scss +0 -272
  133. package/lib/theme/src/cucc/index.js +0 -133
@@ -6,67 +6,140 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
6
6
  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; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  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); }
9
- var renderColors = require('../../utils/renderColors');
9
+ var _require = require('../../utils/renderColors'),
10
+ renderColors = _require.renderColors,
11
+ fade = _require.fade;
10
12
  var px2Num = require('../../utils/px2Num');
11
13
  var colors = {
12
- blue: '#3295fa',
13
- cyan: '#0dd1a9',
14
- green: '#02b342',
15
- gold: '#faaf0c',
16
- volcano: '#fa6432',
17
14
  red: '#f23030',
18
- purple: '#6732e6',
19
- geekblue: '#3366ee',
20
- pink: '#eb2f96',
21
- orange: '#fa8c16',
15
+ volcano: '#fa541c',
16
+ orange: '#fa6432',
17
+ gold: '#faaf0c',
22
18
  yellow: '#fadb14',
23
- lime: '#a0d911'
19
+ lime: '#a0d911',
20
+ green: '#02b342',
21
+ cyan: '#0dd1a9',
22
+ blue: '#3295fa',
23
+ geekblue: '#3366ee',
24
+ purple: '#6732e6',
25
+ magenta: '#eb2f96',
26
+ pink: '#eb2f96'
24
27
  };
25
28
  var sceneColors = {
26
- primary: '#4477ee',
27
- info: '#4477ee',
28
- success: '#36bf36',
29
- warning: '#faad14',
30
- error: '#f52230',
31
- highlight: '#fa6432'
29
+ primary: '#417ffb',
30
+ info: '#3998f7',
31
+ success: '#02b342',
32
+ warning: '#faaf0c',
33
+ error: '#f23030',
34
+ highlight: '#f23030'
32
35
  };
33
36
  var colorPlate = renderColors(colors, 'base');
34
37
  var sceneColorPlate = renderColors(sceneColors);
35
38
 
39
+ // 灰色色阶
40
+ var grayPlate = {
41
+ 'gray-1': '#fff',
42
+ 'gray-2': '#f7f8fa',
43
+ 'gray-3': '#f2f3f5',
44
+ 'gray-4': '#ebebf0',
45
+ 'gray-5': '#e4e4eb',
46
+ 'gray-6': '#dcdde5',
47
+ 'gray-7': '#d5d6e0',
48
+ 'gray-8': '#c9cbd6',
49
+ 'gray-9': '#b0b2bf',
50
+ 'gray-10': '#9092a3',
51
+ 'gray-11': '#64677a',
52
+ 'gray-12': '#414352',
53
+ 'gray-13': '#2a2b33'
54
+ };
55
+
36
56
  // 黑色色阶
37
57
  var blackPlate = {
38
- 'black-1': 'rgba(28, 36, 46, 0.15)',
39
- 'black-2': 'rgba(28, 36, 46, 0.25)',
40
- 'black-3': 'rgba(28, 36, 46, 0.35)',
41
- 'black-4': 'rgba(28, 36, 46, 0.45)',
42
- 'black-5': 'rgba(28, 36, 46, 0.55)',
43
- 'black-6': 'rgba(28, 36, 46, 0.65)',
44
- 'black-7': 'rgba(28, 36, 46, 0.75)',
45
- 'black-8': 'rgba(28, 36, 46, 0.85)',
46
- 'black-9': 'rgba(28, 36, 46, 0.95)',
47
- 'black-10': 'rgba(28, 36, 46, 1)'
58
+ 'black-1': fade(grayPlate['gray-13'], 0.15),
59
+ 'black-2': fade(grayPlate['gray-13'], 0.25),
60
+ 'black-3': fade(grayPlate['gray-13'], 0.35),
61
+ 'black-4': fade(grayPlate['gray-13'], 0.45),
62
+ 'black-5': fade(grayPlate['gray-13'], 0.55),
63
+ 'black-6': fade(grayPlate['gray-13'], 0.65),
64
+ 'black-7': fade(grayPlate['gray-13'], 0.75),
65
+ 'black-8': fade(grayPlate['gray-13'], 0.85),
66
+ 'black-9': fade(grayPlate['gray-13'], 0.95),
67
+ 'black-10': fade(grayPlate['gray-13'], 1)
68
+ };
69
+
70
+ // 填充色
71
+ var fillColors = {
72
+ 'color-fill-1': grayPlate['gray-1'],
73
+ 'color-fill-2': grayPlate['gray-2'],
74
+ 'color-fill-3': grayPlate['gray-3'],
75
+ 'color-fill-4': grayPlate['gray-4'],
76
+ 'color-fill-5': grayPlate['gray-11']
77
+ };
78
+
79
+ // 线条色
80
+ var lineColors = {
81
+ 'color-line-1': grayPlate['gray-3'],
82
+ 'color-line-2': grayPlate['gray-5'],
83
+ 'color-line-3': grayPlate['gray-6'],
84
+ 'color-line-4': grayPlate['gray-7']
85
+ };
86
+
87
+ // 文字颜色
88
+ var fontColors = {
89
+ 'heading-color': grayPlate['gray-13'],
90
+ 'text-color': grayPlate['gray-12'],
91
+ 'text-color-paragraph': grayPlate['gray-11'],
92
+ 'text-color-secondary': grayPlate['gray-10'],
93
+ 'disabled-color': grayPlate['gray-9'],
94
+ 'text-color-inverse': '#fff',
95
+ 'text-color-dark': fade('#fff', 0.85),
96
+ 'text-color-paragraph-dark': fade('#fff', 0.75),
97
+ 'text-color-secondary-dark': fade('#fff', 0.65),
98
+ 'disabled-color-dark': fade('#fff', 0.45),
99
+ 'icon-color-hover': blackPlate['black-7'],
100
+ 'icon-color-secondary': blackPlate['black-4'],
101
+ 'icon-color-heading': blackPlate['black-10'],
102
+ 'icon-color': 'inherit',
103
+ 'link-color': '#417ffb'
48
104
  };
49
105
 
50
106
  // 文字尺寸
51
107
  var fontSizes = {
52
- 'font-size-base': '14px',
53
- 'font-size-lg': '16px',
54
- 'font-size-md': '15px',
55
108
  'font-size-sm': '12px',
56
- 'font-weight': '500'
109
+ 'font-size-base': '13px',
110
+ 'font-size-md': '14px',
111
+ 'font-size-lg': '16px',
112
+ 'font-weight': '500',
113
+ 'article-size-sm': '12px',
114
+ 'article-size-md': '14px',
115
+ 'article-size-lg': '16px',
116
+ 'article-line-height': 2
57
117
  };
58
118
 
59
119
  // 圆角
60
120
  var radius = {
61
- 'border-radius-base': '2px',
121
+ 'border-radius-base': '4px',
122
+ 'border-radius-sm': '2px',
62
123
  'border-radius-md': '4px',
63
124
  'border-radius-lg': '8px',
64
- 'border-radius-round': '50%'
125
+ 'border-radius-round': '50%',
126
+ 'box-border-radius': '8px'
65
127
  };
66
128
 
67
129
  // 间距
130
+ var spaces = {
131
+ 'space-xxs': '2px',
132
+ 'space-xs': '4px',
133
+ 'space-sm': '8px',
134
+ 'space-md': '12px',
135
+ 'space-lg': '16px',
136
+ 'space-xl': '20px',
137
+ 'space-xxl': '24px'
138
+ };
139
+
140
+ // 外间距
68
141
  var paddings = {
69
- 'padding-lg': '20px',
142
+ 'padding-lg': '24px',
70
143
  'padding-md': '16px',
71
144
  'padding-sm': '12px',
72
145
  'padding-xs': '8px',
@@ -74,6 +147,27 @@ var paddings = {
74
147
  'padding-xxxs': '2px'
75
148
  };
76
149
 
150
+ // 内间距
151
+ var margins = {
152
+ 'margin-lg': '24px',
153
+ 'margin-md': '16px',
154
+ 'margin-sm': '12px',
155
+ 'margin-xs': '8px',
156
+ 'margin-xxs': '4px',
157
+ 'margin-xxxs': '2px'
158
+ };
159
+
160
+ // 页面间距
161
+ var pageSpaces = {
162
+ 'page-space': '0 40px 16px 40px'
163
+ };
164
+
165
+ // 盒子区块间距
166
+ var boxSpaces = {
167
+ 'box-padding-base': '20px',
168
+ 'box-padding-sm': '12px'
169
+ };
170
+
77
171
  // 尺寸
78
172
  var sizes = {
79
173
  'size-xs': '16px',
@@ -83,31 +177,41 @@ var sizes = {
83
177
  'size-lg': '40px',
84
178
  'size-xl': '56px'
85
179
  };
86
- var variable = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, colorPlate), sceneColorPlate), blackPlate), {}, {
180
+
181
+ // 宽度值
182
+ var widths = {
183
+ 'width-xs': '256px',
184
+ 'width-sm': '500px',
185
+ 'width-md': '768px',
186
+ 'width-lg': '1000px',
187
+ 'width-xl': '80%'
188
+ };
189
+
190
+ // 投影
191
+ var shadows = {
192
+ 'box-shadow-1': '0px 1px 4px rgba(100, 103, 122, 0.06)',
193
+ 'box-shadow-2': '0px 2px 8px rgba(100, 103, 122, 0.08)',
194
+ 'box-shadow-3': '0px 4px 16px rgba(100, 103, 122, 0.12)',
195
+ 'box-shadow-4': '0px 8px 24px rgba(100, 103, 122, 0.24)'
196
+ };
197
+ var variable = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, colorPlate), sceneColorPlate), blackPlate), grayPlate), fillColors), lineColors), shadows), {}, {
87
198
  white: '#fff',
88
- black: 'rgba(28, 36, 46, 1)',
89
- 'link-color': '#2299ff',
90
- 'body-background': '#fff',
91
- 'background-color-base': '#edf0f5',
92
- 'border-color-base': '#e5e5e5',
93
- 'dividing-color': '#e5e5e5',
94
- 'border-color-split': '#f0f0f0',
95
- 'component-background': '#fff',
96
- 'background-color-light': 'hsv(0, 0, 98%)',
97
- 'disabled-bg': '#f5f5f5',
98
- 'modal-mask-bg': blackPlate['black-4'],
99
- 'item-hover-bg': '#f5f5f5',
100
- 'heading-color': blackPlate['black-10'],
101
- 'text-color': blackPlate['black-8'],
102
- 'text-color-paragraph': blackPlate['black-6'],
103
- 'text-color-secondary': blackPlate['black-4'],
104
- 'disabled-color': blackPlate['black-2'],
105
- 'text-color-inverse': '#fff',
106
- 'line-height-base': '1.5715',
107
- 'icon-color': 'inherit',
108
- 'icon-color-hover': blackPlate['black-7'],
109
- 'icon-color-secondary': blackPlate['black-4'],
110
- 'icon-color-heading': blackPlate['black-10']
199
+ black: '#000'
200
+ }, fontColors), {}, {
201
+ 'body-background': 'linear-gradient(180deg, #EBF0FF 0%, #F2F3F7 100%)',
202
+ 'background-color-base': grayPlate['gray-3'],
203
+ 'component-background': grayPlate['gray-1'],
204
+ 'background-color-light': grayPlate['gray-2'],
205
+ 'border-color-base': grayPlate['gray-6'],
206
+ 'border-color-split': grayPlate['gray-5'],
207
+ 'dividing-color': grayPlate['gray-6'],
208
+ 'disabled-bg': grayPlate['gray-3'],
209
+ 'disabled-active-bg': grayPlate['gray-4'],
210
+ 'modal-mask-bg': fade(grayPlate['gray-13'], 0.45),
211
+ 'item-hover-bg': fade(grayPlate['gray-13'], 0.06),
212
+ 'item-active-bg': sceneColorPlate['primary-1'],
213
+ 'label-required-color': colorPlate['red-6'],
214
+ 'line-height-base': '1.5715'
111
215
  }, fontSizes), {}, {
112
216
  'heading-1-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 2.71), "px"),
113
217
  'heading-2-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 2.14), "px"),
@@ -115,13 +219,17 @@ var variable = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSp
115
219
  'heading-4-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.42), "px"),
116
220
  'heading-5-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1.14), "px"),
117
221
  'heading-6-size': "".concat(Math.ceil(px2Num(fontSizes['font-size-base']) * 1), "px")
118
- }, radius), paddings), sizes), {}, {
119
- 'btn-height-base': sizes['size-base'],
222
+ }, radius), spaces), paddings), margins), pageSpaces), boxSpaces), sizes), widths), {}, {
223
+ 'height-base': sizes['size-md'],
224
+ 'height-lg': sizes['size-lg'],
225
+ 'height-sm': sizes['size-sm'],
226
+ 'table-header-bg': grayPlate['gray-2'],
227
+ 'btn-height-base': sizes['size-md'],
120
228
  'btn-height-lg': sizes['size-lg'],
121
229
  'btn-height-sm': sizes['size-sm'],
122
230
  'radio-size': sizes['size-xs'],
123
231
  'checkbox-size': sizes['size-xs'],
124
- 'input-height-base': sizes['size-base'],
232
+ 'input-height-base': sizes['size-md'],
125
233
  'input-height-lg': sizes['size-lg'],
126
234
  'input-height-sm': sizes['size-sm'],
127
235
  'menu-inline-toplevel-item-height': sizes['size-lg'],
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var tinycolor = require('tinycolor2');
3
4
  var colorPaletteMixin = require('./colorPaletteMixin');
4
5
  function renderColors(colors) {
5
6
  var suffix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'color';
@@ -8,11 +9,21 @@ function renderColors(colors) {
8
9
  Object.keys(colors).forEach(function (item) {
9
10
  for (var i = 0; i <= 10; i += 1) {
10
11
  var name = i === 0 ? "".concat(item, "-").concat(suffix) : "".concat(item, "-").concat(i);
11
- var color = i === 0 ? colors[item] : colorPaletteMixin(colors[item], i);
12
+ var color = i === 0 || i === 6 ? colors[item] : colorPaletteMixin(colors[item], i);
12
13
  res[name] = color;
13
14
  }
14
15
  });
15
16
  }
16
17
  return res;
17
18
  }
18
- module.exports = renderColors;
19
+ function fade(color) {
20
+ var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
21
+ var value = tinycolor(color);
22
+ value.setAlpha(alpha);
23
+ return value.toRgbString();
24
+ }
25
+ var colorUtils = {
26
+ renderColors: renderColors,
27
+ fade: fade
28
+ };
29
+ module.exports = colorUtils;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var CookieUtil = {
8
+ get: function get(name) {
9
+ var cookieName = "".concat(encodeURIComponent(name), "=");
10
+ var cookieStart = document.cookie.indexOf(cookieName);
11
+ var cookieValue = null;
12
+ var cookieEnd;
13
+ if (cookieStart > -1) {
14
+ cookieEnd = document.cookie.indexOf(';', cookieStart);
15
+ if (cookieEnd === -1) {
16
+ cookieEnd = document.cookie.length;
17
+ }
18
+ cookieValue = decodeURIComponent(document.cookie.substring(cookieStart + cookieName.length, cookieEnd));
19
+ }
20
+ return cookieValue;
21
+ },
22
+ set: function set(name, value, expires, path, domain, secure) {
23
+ var cookieText = "".concat(encodeURIComponent(name), "=").concat(encodeURIComponent(value));
24
+ if (expires instanceof Date) {
25
+ cookieText += "; expires=".concat(expires.toGMTString());
26
+ }
27
+ if (path) {
28
+ cookieText += "; path=".concat(path);
29
+ }
30
+ if (domain) {
31
+ cookieText += "; domain=".concat(domain);
32
+ }
33
+ if (secure) {
34
+ cookieText += '; secure';
35
+ }
36
+ document.cookie = cookieText;
37
+ },
38
+ unset: function unset(name, path, domain, secure) {
39
+ this.set(name, '', new Date(0), path, domain, secure);
40
+ }
41
+ };
42
+ var _default = CookieUtil;
43
+ exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingxiteam/assets",
3
- "version": "1.0.12",
3
+ "version": "1.0.13-alpha.2",
4
4
  "description": "灵犀低代码平台移动端 - 工具类",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -1,3 +0,0 @@
1
- export declare const actionObj: {
2
- apiRequest: (action: any) => any;
3
- };
@@ -1,6 +0,0 @@
1
- export var actionObj = {
2
- apiRequest: function apiRequest(action) {
3
- // 在这里修改动作参数
4
- return action;
5
- }
6
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * 动作解析前
3
- * @param action
4
- * @returns
5
- */
6
- export declare const parseActionBefore: (action: any) => any;
@@ -1,14 +0,0 @@
1
- import { actionObj } from "./actionObj";
2
- /**
3
- * 动作解析前
4
- * @param action
5
- * @returns
6
- */
7
- export var parseActionBefore = function parseActionBefore(action) {
8
- var newAction = action;
9
- if (actionObj[newAction.value]) {
10
- var _actionObj$newAction$;
11
- newAction = (_actionObj$newAction$ = actionObj[newAction.value](action)) !== null && _actionObj$newAction$ !== void 0 ? _actionObj$newAction$ : newAction;
12
- }
13
- return newAction;
14
- };
@@ -1,9 +0,0 @@
1
- import type { ProcessPlatformType } from "../PropType";
2
- /**
3
- * 编辑器端
4
- */
5
- declare const _default: {
6
- h5: ProcessPlatformType;
7
- pc: ProcessPlatformType;
8
- };
9
- export default _default;
@@ -1,21 +0,0 @@
1
- var h5 = {
2
- Button: function Button(component) {
3
- return component;
4
- }
5
- };
6
- var pc = {
7
- Description: function Description(component) {
8
- var descColumns = component.props.descColumns;
9
- if (descColumns) {
10
- delete component.props.descColumns;
11
- }
12
- return component;
13
- }
14
- };
15
- /**
16
- * 编辑器端
17
- */
18
- export default {
19
- h5: h5,
20
- pc: pc
21
- };
@@ -1,9 +0,0 @@
1
- import type { ProcessPlatformType } from "../PropType";
2
- /**
3
- * 运行态端
4
- */
5
- declare const _default: {
6
- h5: ProcessPlatformType;
7
- pc: ProcessPlatformType;
8
- };
9
- export default _default;
@@ -1,19 +0,0 @@
1
- // H5组件
2
- var h5 = {
3
- Button: function Button(component) {
4
- return component;
5
- }
6
- };
7
- // PC端组件
8
- var pc = {
9
- Button: function Button(component) {
10
- return component;
11
- }
12
- };
13
- /**
14
- * 运行态端
15
- */
16
- export default {
17
- h5: h5,
18
- pc: pc
19
- };