@pisell/common 0.0.13 → 0.0.15-0

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 (100) hide show
  1. package/build/lowcode/assets-daily.json +67 -0
  2. package/build/lowcode/assets-dev.json +67 -0
  3. package/build/lowcode/assets-prod.json +67 -0
  4. package/build/lowcode/designer.html +302 -0
  5. package/build/lowcode/index.html +304 -0
  6. package/build/lowcode/index.js +1 -0
  7. package/build/lowcode/meta.js +1 -0
  8. package/build/lowcode/preview.css +1 -0
  9. package/build/lowcode/preview.html +33 -0
  10. package/build/lowcode/preview.js +27 -0
  11. package/build/lowcode/render/default/view.js +20 -0
  12. package/build/lowcode/view.js +20 -0
  13. package/es/business-components/colorInput/index.js +25 -29
  14. package/es/business-components/rechargeOption/index.js +55 -72
  15. package/es/business-components/selectTag/index.d.ts +1 -1
  16. package/es/business-components/selectTag/index.js +36 -44
  17. package/es/business-components/sortModal/index.d.ts +1 -1
  18. package/es/business-components/sortModal/index.js +14 -19
  19. package/es/business-components/statistics/index.js +17 -23
  20. package/es/business-components/tagModal/index.d.ts +1 -1
  21. package/es/business-components/tagModal/index.js +12 -16
  22. package/es/business-hooks/useModal/index.d.ts +1 -1
  23. package/es/business-hooks/useModal/index.js +4 -11
  24. package/es/business-hooks/useTagModal/index.d.ts +2 -1
  25. package/es/business-hooks/useTagModal/index.js +12 -16
  26. package/es/components/ColorPicker/index.js +4 -6
  27. package/es/components/DragSort/index.d.ts +2 -1
  28. package/es/components/DragSort/index.js +28 -39
  29. package/es/components/EditorPreview/index.d.ts +1 -1
  30. package/es/components/EditorPreview/index.js +3 -8
  31. package/es/components/Iconfont/index.js +2 -8
  32. package/es/components/agreement/Detail/index.d.ts +2 -2
  33. package/es/components/agreement/Detail/index.js +12 -15
  34. package/es/components/agreement/index.js +14 -18
  35. package/es/components/avatar/index.js +2 -8
  36. package/es/components/button/index.d.ts +3 -2
  37. package/es/components/button/index.js +3 -9
  38. package/es/components/card/index.d.ts +1 -1
  39. package/es/components/card/index.js +5 -11
  40. package/es/components/checkbox/index.d.ts +3 -2
  41. package/es/components/checkbox/index.js +3 -9
  42. package/es/components/datePicker/index.d.ts +2 -1
  43. package/es/components/datePicker/index.js +2 -8
  44. package/es/components/input/index.d.ts +6 -5
  45. package/es/components/input/index.js +6 -12
  46. package/es/components/inputNumber/index.d.ts +2 -1
  47. package/es/components/inputNumber/index.js +2 -8
  48. package/es/components/pagination/index.js +1 -8
  49. package/es/components/radio/index.d.ts +3 -2
  50. package/es/components/radio/index.js +3 -9
  51. package/es/components/select/index.d.ts +2 -1
  52. package/es/components/select/index.js +2 -8
  53. package/es/components/switch/index.js +1 -8
  54. package/es/hooks/useTableModal/index.d.ts +1 -1
  55. package/es/hooks/useTableModal/index.js +2 -5
  56. package/es/lowcode/button/index.d.ts +5 -0
  57. package/es/lowcode/button/index.js +6 -0
  58. package/es/lowcode/checkbox/index.d.ts +10 -0
  59. package/es/lowcode/checkbox/index.js +11 -0
  60. package/es/lowcode/index.d.ts +4 -0
  61. package/es/lowcode/index.js +2 -0
  62. package/es/script/index.js +3 -1
  63. package/lib/business-components/selectTag/index.d.ts +1 -1
  64. package/lib/business-components/sortModal/index.d.ts +1 -1
  65. package/lib/business-components/tagModal/index.d.ts +1 -1
  66. package/lib/business-hooks/useModal/index.d.ts +1 -1
  67. package/lib/business-hooks/useTagModal/index.d.ts +2 -1
  68. package/lib/components/DragSort/index.d.ts +2 -1
  69. package/lib/components/DragSort/index.js +6 -5
  70. package/lib/components/EditorPreview/index.d.ts +1 -1
  71. package/lib/components/EditorPreview/index.js +12 -1
  72. package/lib/components/agreement/Detail/index.d.ts +2 -2
  73. package/lib/components/agreement/Detail/index.js +2 -2
  74. package/lib/components/button/index.d.ts +3 -2
  75. package/lib/components/button/index.js +13 -2
  76. package/lib/components/card/index.d.ts +1 -1
  77. package/lib/components/card/index.js +2 -1
  78. package/lib/components/checkbox/index.d.ts +3 -2
  79. package/lib/components/checkbox/index.js +13 -2
  80. package/lib/components/datePicker/index.d.ts +2 -1
  81. package/lib/components/datePicker/index.js +12 -1
  82. package/lib/components/input/index.d.ts +6 -5
  83. package/lib/components/input/index.js +16 -5
  84. package/lib/components/inputNumber/index.d.ts +2 -1
  85. package/lib/components/inputNumber/index.js +12 -1
  86. package/lib/components/radio/index.d.ts +3 -2
  87. package/lib/components/radio/index.js +13 -2
  88. package/lib/components/select/index.d.ts +2 -1
  89. package/lib/components/select/index.js +12 -1
  90. package/lib/hooks/useTableModal/index.d.ts +1 -1
  91. package/lib/lowcode/button/index.d.ts +5 -0
  92. package/lib/lowcode/button/index.js +42 -0
  93. package/lib/lowcode/checkbox/index.d.ts +10 -0
  94. package/lib/lowcode/checkbox/index.js +42 -0
  95. package/lib/lowcode/index.d.ts +4 -0
  96. package/lib/lowcode/index.js +42 -0
  97. package/lib/script/index.js +6 -1
  98. package/lowcode/button/meta.ts +324 -0
  99. package/lowcode/checkbox/meta.ts +92 -0
  100. package/package.json +16 -7
@@ -0,0 +1,67 @@
1
+ {
2
+ "packages": [
3
+ {
4
+ "package": "@pisell/common",
5
+ "version": "0.0.14",
6
+ "library": "PisellCommon",
7
+ "urls": [
8
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/render/default/view.js",
9
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/render/default/view.css"
10
+ ],
11
+ "editUrls": [
12
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/view.js",
13
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/view.css"
14
+ ],
15
+ "advancedUrls": {
16
+ "default": [
17
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/render/default/view.js",
18
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/render/default/view.css"
19
+ ]
20
+ },
21
+ "advancedEditUrls": {}
22
+ }
23
+ ],
24
+ "components": [
25
+ {
26
+ "exportName": "PisellCommonMeta",
27
+ "npm": {
28
+ "package": "@pisell/common",
29
+ "version": "0.0.14"
30
+ },
31
+ "url": "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/meta.js",
32
+ "urls": {
33
+ "default": "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/meta.js"
34
+ },
35
+ "advancedUrls": {
36
+ "default": [
37
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/meta.js"
38
+ ]
39
+ }
40
+ }
41
+ ],
42
+ "sort": {
43
+ "groupList": [
44
+ "精选组件",
45
+ "原子组件"
46
+ ],
47
+ "categoryList": [
48
+ "基础元素",
49
+ "布局容器类",
50
+ "表格类",
51
+ "表单详情类",
52
+ "帮助类",
53
+ "对话框类",
54
+ "业务类",
55
+ "通用",
56
+ "引导",
57
+ "信息输入",
58
+ "信息展示",
59
+ "信息反馈"
60
+ ]
61
+ },
62
+ "groupList": [
63
+ "精选组件",
64
+ "原子组件"
65
+ ],
66
+ "ignoreComponents": {}
67
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "packages": [
3
+ {
4
+ "package": "@pisell/common",
5
+ "version": "0.0.14",
6
+ "library": "PisellCommon",
7
+ "urls": [
8
+ "./render/default/view.js",
9
+ "./render/default/view.css"
10
+ ],
11
+ "editUrls": [
12
+ "./view.js",
13
+ "./view.css"
14
+ ],
15
+ "advancedUrls": {
16
+ "default": [
17
+ "./render/default/view.js",
18
+ "./render/default/view.css"
19
+ ]
20
+ },
21
+ "advancedEditUrls": {}
22
+ }
23
+ ],
24
+ "components": [
25
+ {
26
+ "exportName": "PisellCommonMeta",
27
+ "npm": {
28
+ "package": "@pisell/common",
29
+ "version": "0.0.14"
30
+ },
31
+ "url": "./meta.js",
32
+ "urls": {
33
+ "default": "./meta.js"
34
+ },
35
+ "advancedUrls": {
36
+ "default": [
37
+ "./meta.js"
38
+ ]
39
+ }
40
+ }
41
+ ],
42
+ "sort": {
43
+ "groupList": [
44
+ "精选组件",
45
+ "原子组件"
46
+ ],
47
+ "categoryList": [
48
+ "基础元素",
49
+ "布局容器类",
50
+ "表格类",
51
+ "表单详情类",
52
+ "帮助类",
53
+ "对话框类",
54
+ "业务类",
55
+ "通用",
56
+ "引导",
57
+ "信息输入",
58
+ "信息展示",
59
+ "信息反馈"
60
+ ]
61
+ },
62
+ "groupList": [
63
+ "精选组件",
64
+ "原子组件"
65
+ ],
66
+ "ignoreComponents": {}
67
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "packages": [
3
+ {
4
+ "package": "@pisell/common",
5
+ "version": "0.0.14",
6
+ "library": "PisellCommon",
7
+ "urls": [
8
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/render/default/view.js",
9
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/render/default/view.css"
10
+ ],
11
+ "editUrls": [
12
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/view.js",
13
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/view.css"
14
+ ],
15
+ "advancedUrls": {
16
+ "default": [
17
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/render/default/view.js",
18
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/render/default/view.css"
19
+ ]
20
+ },
21
+ "advancedEditUrls": {}
22
+ }
23
+ ],
24
+ "components": [
25
+ {
26
+ "exportName": "PisellCommonMeta",
27
+ "npm": {
28
+ "package": "@pisell/common",
29
+ "version": "0.0.14"
30
+ },
31
+ "url": "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/meta.js",
32
+ "urls": {
33
+ "default": "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/meta.js"
34
+ },
35
+ "advancedUrls": {
36
+ "default": [
37
+ "https://unpkg.com/@pisell/common@0.0.14/build/lowcode/meta.js"
38
+ ]
39
+ }
40
+ }
41
+ ],
42
+ "sort": {
43
+ "groupList": [
44
+ "精选组件",
45
+ "原子组件"
46
+ ],
47
+ "categoryList": [
48
+ "基础元素",
49
+ "布局容器类",
50
+ "表格类",
51
+ "表单详情类",
52
+ "帮助类",
53
+ "对话框类",
54
+ "业务类",
55
+ "通用",
56
+ "引导",
57
+ "信息输入",
58
+ "信息展示",
59
+ "信息反馈"
60
+ ]
61
+ },
62
+ "groupList": [
63
+ "精选组件",
64
+ "原子组件"
65
+ ],
66
+ "ignoreComponents": {}
67
+ }
@@ -0,0 +1,302 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta http-equiv="X-UA-Compatible" content="ie=edge" />
7
+ <title>DEMO 预览</title>
8
+ <style>
9
+ body {
10
+ font-family: PingFangSC-Regular, Roboto, Helvetica Neue, Helvetica, Tahoma, Arial,
11
+ PingFang SC-Light, Microsoft YaHei;
12
+ font-size: 12px;
13
+
14
+ * {
15
+ box-sizing: border-box;
16
+ }
17
+ }
18
+
19
+ body,
20
+ #lce-container {
21
+ position: fixed;
22
+ left: 0;
23
+ right: 0;
24
+ bottom: 0;
25
+ top: 0;
26
+ box-sizing: border-box;
27
+ padding: 0;
28
+ margin: 0;
29
+ overflow: hidden;
30
+ text-rendering: optimizeLegibility;
31
+ -webkit-user-select: none;
32
+ -webkit-user-drag: none;
33
+ -webkit-text-size-adjust: none;
34
+ -webkit-touch-callout: none;
35
+ -webkit-font-smoothing: antialiased;
36
+ }
37
+
38
+ html {
39
+ min-width: 1024px;
40
+ }
41
+ </style>
42
+ </head>
43
+
44
+ <body>
45
+ <link rel="stylesheet" href="https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.7-beta.11/dist/css/engine-core.css" />
46
+ <link rel="stylesheet" href="https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6-beta.25/dist/css/engine-ext.css" />
47
+ <link rel="stylesheet" href="https://alifd.alicdn.com/npm/@alilc/lowcode-preset-plugin@0.1.2/dist/lowcode-preset-plugin.css" />
48
+ <link href="https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/variables.css" rel="stylesheet" />
49
+ <link href="https://alifd.alicdn.com/npm/@alifd/theme-lowcode-light@0.2.1/dist/next.var.min.css" rel="stylesheet" />
50
+ <div id="lce-container"></div>
51
+ <script src="https://g.alicdn.com/code/lib/rax/1.1.0/rax.umd.min.js"></script>
52
+ <script src="https://g.alicdn.com/code/lib/react/16.9.0/umd/react.development.js"></script>
53
+ <script src="https://g.alicdn.com/code/lib/react-dom/16.9.0/umd/react-dom.development.js"></script>
54
+ <script src="https://g.alicdn.com/code/lib/prop-types/15.7.2/prop-types.js"></script>
55
+ <script>
56
+ React.PropTypes = PropTypes;
57
+ </script>
58
+ <script src="https://g.alicdn.com/platform/c/??react15-polyfill/0.0.1/dist/index.js,lodash/4.6.1/lodash.min.js,immutable/3.7.6/dist/immutable.min.js,natty-storage/2.0.2/dist/natty-storage.min.js,natty-fetch/2.6.0/dist/natty-fetch.pc.min.js,tinymce/4.2.5/tinymce-full.js"></script>
59
+ <script src="https://g.alicdn.com/mylib/moment/2.24.0/min/moment.min.js"></script>
60
+ <script src="https://g.alicdn.com/code/lib/alifd__next/1.23.20/next-with-locales.min.js"></script>
61
+ <script crossorigin="anonymous" src="https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.1.7-beta.11/dist/js/engine-core.js"></script>
62
+ <script crossorigin="anonymous" src="https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine-ext/1.0.6-beta.25/dist/js/engine-ext.js"></script>
63
+ <script>
64
+ if (!window.AliLowCodeEngine.common) {
65
+ window.AliLowCodeEngine.common = {
66
+ designerCabin: window.AliLowCodeEngine.designerCabin,
67
+ editorCabin: window.AliLowCodeEngine.editorCabin,
68
+ skeletonCabin: window.AliLowCodeEngine.skeletonCabin,
69
+ utils: window.AliLowCodeEngine.utils,
70
+ };
71
+ }
72
+ </script>
73
+ <script src="https://alifd.alicdn.com/npm/@alilc/lowcode-preset-plugin@0.1.2/dist/lowcode-preset-plugin.js"></script>
74
+ <script type="text/javascript" charset="utf-8" src="./index.js"></script>
75
+ <script>
76
+ (function (factory) {
77
+ if (typeof define === 'function' && define.amd) {
78
+ define([], factory);
79
+ } else if (typeof module === 'object' && module.exports) {
80
+ module.exports = factory();
81
+ } else {
82
+ window.idleCallbackShim = factory();
83
+ }
84
+ })(function () {
85
+ 'use strict';
86
+ var scheduleStart, throttleDelay, lazytimer, lazyraf;
87
+ var root =
88
+ typeof window != 'undefined' ? window : typeof global != undefined ? global : this || {};
89
+ var requestAnimationFrame =
90
+ (root.cancelRequestAnimationFrame && root.requestAnimationFrame) || setTimeout;
91
+ var cancelRequestAnimationFrame = root.cancelRequestAnimationFrame || clearTimeout;
92
+ var tasks = [];
93
+ var runAttempts = 0;
94
+ var isRunning = false;
95
+ var remainingTime = 7;
96
+ var minThrottle = 35;
97
+ var throttle = 125;
98
+ var index = 0;
99
+ var taskStart = 0;
100
+ var tasklength = 0;
101
+ var IdleDeadline = {
102
+ get didTimeout() {
103
+ return false;
104
+ },
105
+ timeRemaining: function () {
106
+ var timeRemaining = remainingTime - (Date.now() - taskStart);
107
+ return Math.max(0, timeRemaining);
108
+ },
109
+ };
110
+ var setInactive = debounce(function () {
111
+ remainingTime = 22;
112
+ throttle = 66;
113
+ minThrottle = 0;
114
+ });
115
+
116
+ function debounce(fn) {
117
+ var id, timestamp;
118
+ var wait = 99;
119
+ var check = function () {
120
+ var last = Date.now() - timestamp;
121
+
122
+ if (last < wait) {
123
+ id = setTimeout(check, wait - last);
124
+ } else {
125
+ id = null;
126
+ fn();
127
+ }
128
+ };
129
+ return function () {
130
+ timestamp = Date.now();
131
+ if (!id) {
132
+ id = setTimeout(check, wait);
133
+ }
134
+ };
135
+ }
136
+
137
+ function abortRunning() {
138
+ if (isRunning) {
139
+ if (lazyraf) {
140
+ cancelRequestAnimationFrame(lazyraf);
141
+ }
142
+ if (lazytimer) {
143
+ clearTimeout(lazytimer);
144
+ }
145
+ isRunning = false;
146
+ }
147
+ }
148
+
149
+ function onInputorMutation() {
150
+ if (throttle != 125) {
151
+ remainingTime = 7;
152
+ throttle = 125;
153
+ minThrottle = 35;
154
+
155
+ if (isRunning) {
156
+ abortRunning();
157
+ scheduleLazy();
158
+ }
159
+ }
160
+ setInactive();
161
+ }
162
+
163
+ function scheduleAfterRaf() {
164
+ lazyraf = null;
165
+ lazytimer = setTimeout(runTasks, 0);
166
+ }
167
+
168
+ function scheduleRaf() {
169
+ lazytimer = null;
170
+ requestAnimationFrame(scheduleAfterRaf);
171
+ }
172
+
173
+ function scheduleLazy() {
174
+ if (isRunning) {
175
+ return;
176
+ }
177
+ throttleDelay = throttle - (Date.now() - taskStart);
178
+
179
+ scheduleStart = Date.now();
180
+
181
+ isRunning = true;
182
+
183
+ if (minThrottle && throttleDelay < minThrottle) {
184
+ throttleDelay = minThrottle;
185
+ }
186
+
187
+ if (throttleDelay > 9) {
188
+ lazytimer = setTimeout(scheduleRaf, throttleDelay);
189
+ } else {
190
+ throttleDelay = 0;
191
+ scheduleRaf();
192
+ }
193
+ }
194
+
195
+ function runTasks() {
196
+ var task, i, len;
197
+ var timeThreshold = remainingTime > 9 ? 9 : 1;
198
+ taskStart = Date.now();
199
+ isRunning = false;
200
+
201
+ lazytimer = null;
202
+
203
+ if (runAttempts > 2 || taskStart - throttleDelay - 50 < scheduleStart) {
204
+ for (
205
+ i = 0, len = tasks.length;
206
+ i < len && IdleDeadline.timeRemaining() > timeThreshold;
207
+ i++
208
+ ) {
209
+ task = tasks.shift();
210
+ tasklength++;
211
+ if (task) {
212
+ task(IdleDeadline);
213
+ }
214
+ }
215
+ }
216
+
217
+ if (tasks.length) {
218
+ scheduleLazy();
219
+ } else {
220
+ runAttempts = 0;
221
+ }
222
+ }
223
+
224
+ function requestIdleCallbackShim(task) {
225
+ index++;
226
+ tasks.push(task);
227
+ scheduleLazy();
228
+ return index;
229
+ }
230
+
231
+ function cancelIdleCallbackShim(id) {
232
+ var index = id - 1 - tasklength;
233
+ if (tasks[index]) {
234
+ tasks[index] = null;
235
+ }
236
+ }
237
+
238
+ if (!root.requestIdleCallback || !root.cancelIdleCallback) {
239
+ root.requestIdleCallback = requestIdleCallbackShim;
240
+ root.cancelIdleCallback = cancelIdleCallbackShim;
241
+
242
+ if (root.document && document.addEventListener) {
243
+ root.addEventListener('scroll', onInputorMutation, true);
244
+ root.addEventListener('resize', onInputorMutation);
245
+
246
+ document.addEventListener('focus', onInputorMutation, true);
247
+ document.addEventListener('mouseover', onInputorMutation, true);
248
+ ['click', 'keypress', 'touchstart', 'mousedown'].forEach(function (name) {
249
+ document.addEventListener(name, onInputorMutation, { capture: true, passive: true });
250
+ });
251
+
252
+ if (root.MutationObserver) {
253
+ new MutationObserver(onInputorMutation).observe(document.documentElement, {
254
+ childList: true,
255
+ subtree: true,
256
+ attributes: true,
257
+ });
258
+ }
259
+ }
260
+ } else {
261
+ try {
262
+ root.requestIdleCallback(function () {}, { timeout: 0 });
263
+ } catch (e) {
264
+ (function (rIC) {
265
+ var timeRemainingProto, timeRemaining;
266
+ root.requestIdleCallback = function (fn, timeout) {
267
+ if (timeout && typeof timeout.timeout == 'number') {
268
+ return rIC(fn, timeout.timeout);
269
+ }
270
+ return rIC(fn);
271
+ };
272
+ if (
273
+ root.IdleCallbackDeadline &&
274
+ (timeRemainingProto = IdleCallbackDeadline.prototype)
275
+ ) {
276
+ timeRemaining = Object.getOwnPropertyDescriptor(
277
+ timeRemainingProto,
278
+ 'timeRemaining',
279
+ );
280
+ if (!timeRemaining || !timeRemaining.configurable || !timeRemaining.get) {
281
+ return;
282
+ }
283
+ Object.defineProperty(timeRemainingProto, 'timeRemaining', {
284
+ value: function () {
285
+ return timeRemaining.get.call(this);
286
+ },
287
+ enumerable: true,
288
+ configurable: true,
289
+ });
290
+ }
291
+ })(root.requestIdleCallback);
292
+ }
293
+ }
294
+
295
+ return {
296
+ request: requestIdleCallbackShim,
297
+ cancel: cancelIdleCallbackShim,
298
+ };
299
+ });
300
+ </script>
301
+ </body>
302
+ </html>