@opentiny/vue-renderless 3.1.0-alpha.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.
- package/action-sheet/index.js +28 -0
- package/action-sheet/vue.js +29 -0
- package/alert/index.js +23 -0
- package/alert/vue.js +37 -0
- package/autocomplete/index.js +175 -0
- package/autocomplete/vue.js +171 -0
- package/avatar/index.js +29 -0
- package/avatar/vue.js +24 -0
- package/badge/index.js +16 -0
- package/badge/vue.js +30 -0
- package/breadcrumb/vue.js +4 -0
- package/breadcrumb-item/vue.js +24 -0
- package/bulletin-board/index.js +21 -0
- package/bulletin-board/vue.js +36 -0
- package/button/index.js +19 -0
- package/button/vue.js +43 -0
- package/button-group/index.js +25 -0
- package/button-group/vue.js +51 -0
- package/calendar/index.js +279 -0
- package/calendar/vue.js +124 -0
- package/card-template/index.js +39 -0
- package/card-template/vue.js +34 -0
- package/carousel/index.js +206 -0
- package/carousel/vue.js +222 -0
- package/carousel-item/index.js +93 -0
- package/carousel-item/vue.js +57 -0
- package/cascader/index.js +511 -0
- package/cascader/vue.js +342 -0
- package/cascader-menu/index.js +41 -0
- package/cascader-menu/vue.js +36 -0
- package/cascader-node/index.js +63 -0
- package/cascader-node/vue.js +62 -0
- package/cascader-panel/index.js +359 -0
- package/cascader-panel/node.js +199 -0
- package/cascader-panel/store.js +80 -0
- package/cascader-panel/vue.js +217 -0
- package/checkbox/index.js +145 -0
- package/checkbox/vue.js +139 -0
- package/checkbox-button/index.js +102 -0
- package/checkbox-button/vue.js +150 -0
- package/checkbox-group/index.js +12 -0
- package/checkbox-group/vue.js +33 -0
- package/col/index.js +132 -0
- package/col/vue.js +34 -0
- package/collapse/index.js +45 -0
- package/collapse/vue.js +35 -0
- package/collapse-item/index.js +38 -0
- package/collapse-item/vue.js +48 -0
- package/common/array.js +120 -0
- package/common/bigInt.js +352 -0
- package/common/browser.js +69 -0
- package/common/dataset/index.js +135 -0
- package/common/date.js +352 -0
- package/common/decimal.js +203 -0
- package/common/deps/ResizeObserver.js +474 -0
- package/common/deps/after-leave.js +25 -0
- package/common/deps/clickoutside.js +61 -0
- package/common/deps/date-util.js +262 -0
- package/common/deps/date.js +308 -0
- package/common/deps/debounce.js +4 -0
- package/common/deps/dom.js +190 -0
- package/common/deps/fullscreen/apis.js +157 -0
- package/common/deps/fullscreen/screenfull.js +106 -0
- package/common/deps/letter-only.js +15 -0
- package/common/deps/memorize.js +149 -0
- package/common/deps/number-only.js +16 -0
- package/common/deps/popper.js +713 -0
- package/common/deps/popup-manager.js +179 -0
- package/common/deps/repeat-click.js +24 -0
- package/common/deps/requestAnimationFrame.js +25 -0
- package/common/deps/resize-event.js +29 -0
- package/common/deps/scroll-into-view.js +29 -0
- package/common/deps/scrollbar-width.js +25 -0
- package/common/deps/throttle.js +34 -0
- package/common/deps/touch.js +33 -0
- package/common/deps/tree-model/node.js +586 -0
- package/common/deps/tree-model/tree-store.js +377 -0
- package/common/deps/tree-model/util.js +14 -0
- package/common/deps/upload-ajax.js +71 -0
- package/common/deps/vue-emitter.js +30 -0
- package/common/deps/vue-popper.js +291 -0
- package/common/deps/vue-popup.js +211 -0
- package/common/event.js +17 -0
- package/common/index.js +288 -0
- package/common/object.js +228 -0
- package/common/runtime.js +52 -0
- package/common/string.js +446 -0
- package/common/type.js +65 -0
- package/common/validate/index.js +6 -0
- package/common/validate/messages.js +68 -0
- package/common/validate/rules/enum.js +8 -0
- package/common/validate/rules/index.js +14 -0
- package/common/validate/rules/pattern.js +16 -0
- package/common/validate/rules/range.js +62 -0
- package/common/validate/rules/required.js +13 -0
- package/common/validate/rules/type.js +110 -0
- package/common/validate/rules/whitespace.js +6 -0
- package/common/validate/schema.js +323 -0
- package/common/validate/util.js +198 -0
- package/common/validate/validations/array.js +25 -0
- package/common/validate/validations/date.js +35 -0
- package/common/validate/validations/enum.js +24 -0
- package/common/validate/validations/float.js +24 -0
- package/common/validate/validations/index.js +42 -0
- package/common/validate/validations/integer.js +24 -0
- package/common/validate/validations/method.js +23 -0
- package/common/validate/validations/number.js +27 -0
- package/common/validate/validations/pattern.js +23 -0
- package/common/validate/validations/required.js +15 -0
- package/common/validate/validations/string.js +29 -0
- package/common/validate/validations/type.js +25 -0
- package/common/xss.js +325 -0
- package/container/index.js +110 -0
- package/container/vue.js +63 -0
- package/credit-card/index.js +107 -0
- package/credit-card/vue.js +117 -0
- package/credit-card-form/index.js +143 -0
- package/credit-card-form/vue.js +150 -0
- package/crop/index.js +297 -0
- package/crop/vue.js +191 -0
- package/date-panel/index.js +584 -0
- package/date-panel/vue.js +319 -0
- package/date-picker/index.js +301 -0
- package/date-picker/vue.js +169 -0
- package/date-range/index.js +463 -0
- package/date-range/vue.js +297 -0
- package/date-table/index.js +457 -0
- package/date-table/vue.js +151 -0
- package/detail-page/index.js +135 -0
- package/detail-page/vue.js +145 -0
- package/dialog-box/index.js +268 -0
- package/dialog-box/vue.js +226 -0
- package/drop-times/index.js +23 -0
- package/drop-times/vue.js +28 -0
- package/dropdown/index.js +259 -0
- package/dropdown/vue.js +107 -0
- package/dropdown-item/index.js +155 -0
- package/dropdown-item/vue.js +124 -0
- package/dropdown-menu/index.js +148 -0
- package/dropdown-menu/vue.js +44 -0
- package/exception/index.js +13 -0
- package/exception/vue.js +25 -0
- package/fall-menu/index.js +121 -0
- package/fall-menu/vue.js +90 -0
- package/file-upload/index.js +1940 -0
- package/file-upload/vue.js +458 -0
- package/floatbar/index.js +10 -0
- package/floatbar/vue.js +17 -0
- package/form/index.js +186 -0
- package/form/vue.js +69 -0
- package/form-item/index.js +364 -0
- package/form-item/vue.js +210 -0
- package/fullscreen/index.js +138 -0
- package/fullscreen/vue.js +77 -0
- package/grid/core/index.js +3 -0
- package/grid/core/interceptor.js +38 -0
- package/grid/core/storeMap.js +19 -0
- package/grid/plugins/export.js +169 -0
- package/grid/plugins/exportExcel.js +749 -0
- package/grid/plugins/header.js +58 -0
- package/grid/plugins/resize.js +82 -0
- package/grid/static/array/arrayEach.js +12 -0
- package/grid/static/array/arrayIndexOf.js +11 -0
- package/grid/static/array/eachTree.js +32 -0
- package/grid/static/array/every.js +2 -0
- package/grid/static/array/filterTree.js +16 -0
- package/grid/static/array/find.js +3 -0
- package/grid/static/array/findTree.js +46 -0
- package/grid/static/array/helperCreateIterateHandle.js +59 -0
- package/grid/static/array/helperCreateTreeFunc.js +18 -0
- package/grid/static/array/includes.js +5 -0
- package/grid/static/array/lastArrayEach.js +6 -0
- package/grid/static/array/map.js +23 -0
- package/grid/static/array/mapTree.js +33 -0
- package/grid/static/array/slice.js +10 -0
- package/grid/static/array/sortBy.js +69 -0
- package/grid/static/array/sum.js +28 -0
- package/grid/static/array/toArray.js +7 -0
- package/grid/static/array/toTreeArray.js +24 -0
- package/grid/static/base/clear.js +44 -0
- package/grid/static/base/clone.js +18 -0
- package/grid/static/base/destructuring.js +18 -0
- package/grid/static/base/each.js +9 -0
- package/grid/static/base/eqNull.js +6 -0
- package/grid/static/base/findIndexOf.js +10 -0
- package/grid/static/base/get.js +42 -0
- package/grid/static/base/has.js +60 -0
- package/grid/static/base/hasOwnProp.js +4 -0
- package/grid/static/base/helperCreateGetObjects.js +26 -0
- package/grid/static/base/helperCreateInInObjectString.js +7 -0
- package/grid/static/base/helperCreateInTypeof.js +6 -0
- package/grid/static/base/helperCreateIndexOf.js +21 -0
- package/grid/static/base/helperCreateiterateIndexOf.js +21 -0
- package/grid/static/base/helperDefaultCompare.js +4 -0
- package/grid/static/base/helperDeleteProperty.js +8 -0
- package/grid/static/base/helperEqualCompare.js +60 -0
- package/grid/static/base/helperGetHGSKeys.js +4 -0
- package/grid/static/base/indexOf.js +3 -0
- package/grid/static/base/isArray.js +3 -0
- package/grid/static/base/isBoolean.js +4 -0
- package/grid/static/base/isDate.js +3 -0
- package/grid/static/base/isEmpty.js +8 -0
- package/grid/static/base/isEqual.js +11 -0
- package/grid/static/base/isFunction.js +4 -0
- package/grid/static/base/isNaN.js +5 -0
- package/grid/static/base/isNull.js +4 -0
- package/grid/static/base/isNumber.js +4 -0
- package/grid/static/base/isObject.js +5 -0
- package/grid/static/base/isPlainObject.js +2 -0
- package/grid/static/base/isRegExp.js +3 -0
- package/grid/static/base/isSet.js +5 -0
- package/grid/static/base/isString.js +4 -0
- package/grid/static/base/isUndefined.js +4 -0
- package/grid/static/base/keys.js +3 -0
- package/grid/static/base/lastEach.js +9 -0
- package/grid/static/base/remove.js +44 -0
- package/grid/static/base/set.js +43 -0
- package/grid/static/base/toJSONString.js +4 -0
- package/grid/static/base/toStringJSON.js +13 -0
- package/grid/static/base/uniqueId.js +5 -0
- package/grid/static/browse/browse.js +54 -0
- package/grid/static/function/property.js +7 -0
- package/grid/static/function/throttle.js +43 -0
- package/grid/static/index.js +55 -0
- package/grid/static/number/helperCreateToNumber.js +12 -0
- package/grid/static/number/toNumber.js +3 -0
- package/grid/static/object/assign.js +41 -0
- package/grid/static/object/extend.js +3 -0
- package/grid/static/object/lastObjectEach.js +8 -0
- package/grid/static/object/objectEach.js +11 -0
- package/grid/static/object/objectMap.js +20 -0
- package/grid/static/object/values.js +9 -0
- package/grid/static/static/staticDocument.js +4 -0
- package/grid/static/static/staticHGKeyRE.js +2 -0
- package/grid/static/static/staticParseInt.js +2 -0
- package/grid/static/static/staticStrUndefined.js +2 -0
- package/grid/static/static/staticWindow.js +4 -0
- package/grid/static/string/template.js +12 -0
- package/grid/static/string/toString.js +12 -0
- package/grid/utils/column.js +72 -0
- package/grid/utils/common.js +155 -0
- package/grid/utils/dom.js +213 -0
- package/grid/utils/event.js +40 -0
- package/grid/utils/index.js +5 -0
- package/image/index.js +187 -0
- package/image/vue.js +142 -0
- package/image-viewer/index.js +469 -0
- package/image-viewer/vue.js +243 -0
- package/input/index.js +319 -0
- package/input/vue.js +319 -0
- package/ip-address/index.js +370 -0
- package/ip-address/vue.js +185 -0
- package/layout/vue.js +4 -0
- package/link/index.js +10 -0
- package/link/vue.js +26 -0
- package/link-menu/index.js +146 -0
- package/link-menu/vue.js +138 -0
- package/list/index.js +13 -0
- package/list/vue.js +17 -0
- package/loading/index.js +29 -0
- package/loading/vue.js +28 -0
- package/milestone/index.js +92 -0
- package/milestone/vue.js +31 -0
- package/mini-picker/index.js +227 -0
- package/mini-picker/vue.js +142 -0
- package/modal/index.js +866 -0
- package/modal/vue.js +130 -0
- package/month-range/index.js +169 -0
- package/month-range/vue.js +104 -0
- package/month-table/index.js +232 -0
- package/month-table/vue.js +72 -0
- package/nav-menu/index.js +457 -0
- package/nav-menu/vue.js +187 -0
- package/notify/index.js +91 -0
- package/notify/vue.js +67 -0
- package/numeric/index.js +419 -0
- package/numeric/vue.js +218 -0
- package/option/index.js +79 -0
- package/option/vue.js +219 -0
- package/option-group/index.js +18 -0
- package/option-group/vue.js +37 -0
- package/package.json +179 -0
- package/pager-item/index.js +122 -0
- package/pager-item/vue.js +52 -0
- package/panel/index.js +30 -0
- package/panel/vue.js +26 -0
- package/picker/index.js +1039 -0
- package/picker/timezone.js +974 -0
- package/picker/vue.js +415 -0
- package/picker-column/index.js +261 -0
- package/picker-column/vue.js +163 -0
- package/pop-upload/index.js +324 -0
- package/pop-upload/vue.js +292 -0
- package/popeditor/index.js +884 -0
- package/popeditor/vue.js +368 -0
- package/popover/index.js +203 -0
- package/popover/vue.js +174 -0
- package/popup/index.js +139 -0
- package/popup/vue.js +129 -0
- package/progress/index.js +174 -0
- package/progress/vue.js +118 -0
- package/pull-refresh/index.js +104 -0
- package/pull-refresh/vue.js +64 -0
- package/radio/index.js +83 -0
- package/radio/vue.js +99 -0
- package/radio-button/index.js +58 -0
- package/radio-button/vue.js +70 -0
- package/radio-group/index.js +51 -0
- package/radio-group/vue.js +34 -0
- package/rate/index.js +254 -0
- package/rate/vue.js +158 -0
- package/row/index.js +19 -0
- package/row/vue.js +24 -0
- package/scroll-text/index.js +24 -0
- package/scroll-text/vue.js +31 -0
- package/scrollbar/index.js +127 -0
- package/scrollbar/vue-bar.js +49 -0
- package/scrollbar/vue.js +43 -0
- package/search/index.js +110 -0
- package/search/vue.js +110 -0
- package/select/index.js +1766 -0
- package/select/vue.js +693 -0
- package/select-dropdown/index.js +23 -0
- package/select-dropdown/vue.js +122 -0
- package/slide-bar/index.js +94 -0
- package/slide-bar/vue.js +58 -0
- package/slider/index.js +434 -0
- package/slider/vue.js +172 -0
- package/split/index.js +122 -0
- package/split/vue.js +131 -0
- package/steps/vue.js +4 -0
- package/switch/index.js +45 -0
- package/switch/vue.js +62 -0
- package/tab-bar/index.js +51 -0
- package/tab-bar/vue.js +16 -0
- package/tab-dropdown/index.js +11 -0
- package/tab-dropdown/vue.js +17 -0
- package/tab-item/index.js +37 -0
- package/tab-item/vue.js +49 -0
- package/tab-nav/index.js +247 -0
- package/tab-nav/vue.js +106 -0
- package/tabbar/index.js +32 -0
- package/tabbar/vue.js +54 -0
- package/tabbar-item/index.js +55 -0
- package/tabbar-item/vue.js +53 -0
- package/table/index.js +111 -0
- package/table/vue.js +66 -0
- package/tabs/index.js +174 -0
- package/tabs/vue.js +141 -0
- package/tag/index.js +14 -0
- package/tag/vue.js +13 -0
- package/tall-storage/index.js +161 -0
- package/tall-storage/vue-storage-box.js +25 -0
- package/tall-storage/vue.js +38 -0
- package/text-popup/index.js +75 -0
- package/text-popup/vue.js +64 -0
- package/time/index.js +121 -0
- package/time/vue.js +124 -0
- package/time-line/index.js +60 -0
- package/time-line/vue.js +49 -0
- package/time-panel/index.js +189 -0
- package/time-panel/scrollIntoView.js +23 -0
- package/time-panel/vue.js +110 -0
- package/time-range/index.js +199 -0
- package/time-range/vue.js +129 -0
- package/time-spinner/index.js +175 -0
- package/time-spinner/vue.js +122 -0
- package/toggle-menu/index.js +104 -0
- package/toggle-menu/vue.js +74 -0
- package/tooltip/index.js +171 -0
- package/tooltip/vue.js +133 -0
- package/top-box/index.js +81 -0
- package/top-box/vue.js +77 -0
- package/transfer/index.js +296 -0
- package/transfer/vue.js +138 -0
- package/transfer-panel/index.js +364 -0
- package/transfer-panel/vue.js +258 -0
- package/tree/index.js +642 -0
- package/tree/vue.js +268 -0
- package/tree-menu/index.js +124 -0
- package/tree-menu/vue.js +60 -0
- package/tree-node/index.js +271 -0
- package/tree-node/vue.js +211 -0
- package/upload/index.js +324 -0
- package/upload/vue.js +93 -0
- package/upload-dragger/index.js +50 -0
- package/upload-dragger/vue.js +27 -0
- package/upload-list/index.js +55 -0
- package/upload-list/vue.js +48 -0
- package/user-contact/index.js +13 -0
- package/user-contact/vue.js +20 -0
- package/user-head/index.js +71 -0
- package/user-head/vue.js +47 -0
- package/wizard/index.js +123 -0
- package/wizard/vue.js +45 -0
- package/year-table/index.js +40 -0
- package/year-table/vue.js +23 -0
package/common/index.js
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { log as uLog, xss } from '@opentiny/vue-renderless/common/xss.js';
|
|
2
|
+
export var KEY_CODE = {
|
|
3
|
+
Backspace: 8,
|
|
4
|
+
Tab: 9,
|
|
5
|
+
Clear: 12,
|
|
6
|
+
Enter: 13,
|
|
7
|
+
Shift: 16,
|
|
8
|
+
Control: 17,
|
|
9
|
+
Alt: 18,
|
|
10
|
+
CapsLock: 20,
|
|
11
|
+
Escape: 27,
|
|
12
|
+
Space: 32,
|
|
13
|
+
PageUp: 33,
|
|
14
|
+
PageDown: 34,
|
|
15
|
+
End: 35,
|
|
16
|
+
Home: 36,
|
|
17
|
+
'ArrowLeft': 37,
|
|
18
|
+
'ArrowUp': 38,
|
|
19
|
+
'ArrowRight': 39,
|
|
20
|
+
'ArrowDown': 40,
|
|
21
|
+
Insert: 45,
|
|
22
|
+
Delete: 46,
|
|
23
|
+
Colon: 58,
|
|
24
|
+
Semicolon: 59,
|
|
25
|
+
LessThan: 60,
|
|
26
|
+
Equals: 61,
|
|
27
|
+
GreaterThan: 62,
|
|
28
|
+
QuestionMark: 63,
|
|
29
|
+
AtMark: 64,
|
|
30
|
+
KeyA: 65,
|
|
31
|
+
KeyB: 66,
|
|
32
|
+
KeyC: 67,
|
|
33
|
+
KeyD: 68,
|
|
34
|
+
'KeyE': 69,
|
|
35
|
+
'KeyF': 70,
|
|
36
|
+
'KeyG': 71,
|
|
37
|
+
'KeyH': 72,
|
|
38
|
+
KeyI: 73,
|
|
39
|
+
KeyJ: 74,
|
|
40
|
+
KeyK: 75,
|
|
41
|
+
KeyL: 76,
|
|
42
|
+
KeyM: 77,
|
|
43
|
+
KeyN: 78,
|
|
44
|
+
KeyO: 79,
|
|
45
|
+
KeyP: 80,
|
|
46
|
+
KeyQ: 81,
|
|
47
|
+
'KeyR': 82,
|
|
48
|
+
'KeyS': 83,
|
|
49
|
+
'KeyT': 84,
|
|
50
|
+
'KeyU': 85,
|
|
51
|
+
KeyV: 86,
|
|
52
|
+
KeyW: 87,
|
|
53
|
+
KeyX: 88,
|
|
54
|
+
KeyY: 89,
|
|
55
|
+
KeyZ: 90,
|
|
56
|
+
'Digit0': 48,
|
|
57
|
+
'Digit1': 49,
|
|
58
|
+
'Digit2': 50,
|
|
59
|
+
'Digit3': 51,
|
|
60
|
+
Digit4: 52,
|
|
61
|
+
Digit5: 53,
|
|
62
|
+
Digit6: 54,
|
|
63
|
+
Digit7: 55,
|
|
64
|
+
Digit8: 56,
|
|
65
|
+
Digit9: 57,
|
|
66
|
+
'F1': 112,
|
|
67
|
+
'F2': 113,
|
|
68
|
+
'F3': 114,
|
|
69
|
+
'F4': 115,
|
|
70
|
+
F5: 116,
|
|
71
|
+
F6: 117,
|
|
72
|
+
F7: 118,
|
|
73
|
+
F8: 119,
|
|
74
|
+
F9: 120,
|
|
75
|
+
F10: 121,
|
|
76
|
+
F11: 122,
|
|
77
|
+
F12: 123,
|
|
78
|
+
'NumLock': 144,
|
|
79
|
+
'Numpad0': 96,
|
|
80
|
+
'Numpad1': 97,
|
|
81
|
+
'Numpad2': 98,
|
|
82
|
+
Numpad3: 99,
|
|
83
|
+
Numpad4: 100,
|
|
84
|
+
Numpad5: 101,
|
|
85
|
+
Numpad6: 102,
|
|
86
|
+
Numpad7: 103,
|
|
87
|
+
Numpad8: 104,
|
|
88
|
+
Numpad9: 105,
|
|
89
|
+
'NumpadMultiply': 106,
|
|
90
|
+
'NumpadAdd': 107,
|
|
91
|
+
'NumpadEnter': 13,
|
|
92
|
+
'NumpadSubtract': 109,
|
|
93
|
+
NumpadDecimal: 110,
|
|
94
|
+
NumpadDivide: 111,
|
|
95
|
+
NumpadComma: 190
|
|
96
|
+
};
|
|
97
|
+
export var POSITION = {
|
|
98
|
+
Left: 'left',
|
|
99
|
+
Right: 'right',
|
|
100
|
+
Top: 'top',
|
|
101
|
+
Bottom: 'bottom'
|
|
102
|
+
};
|
|
103
|
+
export var SORT = {
|
|
104
|
+
Asc: 'asc',
|
|
105
|
+
Desc: 'desc'
|
|
106
|
+
};
|
|
107
|
+
export var REFRESH_INTERVAL = 100;
|
|
108
|
+
export var IPTHRESHOLD = {
|
|
109
|
+
Min: 0,
|
|
110
|
+
Max: 255,
|
|
111
|
+
NonNumeric: 25
|
|
112
|
+
};
|
|
113
|
+
export var DATE = {
|
|
114
|
+
FullDatetime: 'yyyy-MM-dd hh:mm:ss.SSS',
|
|
115
|
+
LongDatetime: 'yyyy-MM-dd hh:mm:ss',
|
|
116
|
+
Datetime: 'yyyy-MM-dd hh:mm',
|
|
117
|
+
Date: 'yyyy-MM-dd',
|
|
118
|
+
FullTime: 'hh:mm:ss.SSS',
|
|
119
|
+
LongTime: 'hh:mm:ss',
|
|
120
|
+
Time: 'hh:mm',
|
|
121
|
+
YearMonth: 'yyyy-MM'
|
|
122
|
+
};
|
|
123
|
+
var TriggerTypes = 'date,datetime,time,time-select,week,month,year,daterange,monthrange,timerange,datetimerange,dates';
|
|
124
|
+
export var DATEPICKER = {
|
|
125
|
+
Day: 'day',
|
|
126
|
+
Date: 'date',
|
|
127
|
+
Dates: 'dates',
|
|
128
|
+
Year: 'year',
|
|
129
|
+
Month: 'month',
|
|
130
|
+
Week: 'week',
|
|
131
|
+
Normal: 'normal',
|
|
132
|
+
Today: 'today',
|
|
133
|
+
PreMonth: 'pre-month',
|
|
134
|
+
NextMonth: 'next-month',
|
|
135
|
+
YearI18n: 'ui.datepicker.year',
|
|
136
|
+
List: [38, 40, 37, 39],
|
|
137
|
+
YearObj: {
|
|
138
|
+
38: -4,
|
|
139
|
+
40: 4,
|
|
140
|
+
37: -1,
|
|
141
|
+
39: 1
|
|
142
|
+
},
|
|
143
|
+
WeekObj: {
|
|
144
|
+
38: -1,
|
|
145
|
+
40: 1,
|
|
146
|
+
37: -1,
|
|
147
|
+
39: 1
|
|
148
|
+
},
|
|
149
|
+
DayObj: {
|
|
150
|
+
38: -7,
|
|
151
|
+
40: 7,
|
|
152
|
+
37: -1,
|
|
153
|
+
39: 1
|
|
154
|
+
},
|
|
155
|
+
Aviailable: 'available',
|
|
156
|
+
Default: 'default',
|
|
157
|
+
Current: 'current',
|
|
158
|
+
InRange: 'in-range',
|
|
159
|
+
StartDate: 'start-date',
|
|
160
|
+
EndDate: 'end-date',
|
|
161
|
+
Selected: 'selected',
|
|
162
|
+
Disabled: 'disabled',
|
|
163
|
+
Range: 'range',
|
|
164
|
+
fullMonths: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),
|
|
165
|
+
fullWeeks: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
166
|
+
MonhtList: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'],
|
|
167
|
+
Weeks: ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'],
|
|
168
|
+
PlacementMap: {
|
|
169
|
+
left: 'bottom-start',
|
|
170
|
+
center: 'bottom',
|
|
171
|
+
right: 'bottom-end'
|
|
172
|
+
},
|
|
173
|
+
TriggerTypes: TriggerTypes.split(','),
|
|
174
|
+
DateFormats: {
|
|
175
|
+
year: 'yyyy',
|
|
176
|
+
month: 'yyyy-MM',
|
|
177
|
+
time: 'HH:mm:ss',
|
|
178
|
+
week: 'yyyywWW',
|
|
179
|
+
date: 'yyyy-MM-dd',
|
|
180
|
+
timerange: 'HH:mm:ss',
|
|
181
|
+
monthrange: 'yyyy-MM',
|
|
182
|
+
daterange: 'yyyy-MM-dd',
|
|
183
|
+
datetime: 'yyyy-MM-dd HH:mm:ss',
|
|
184
|
+
datetimerange: 'yyyy-MM-dd HH:mm:ss'
|
|
185
|
+
},
|
|
186
|
+
Time: 'time',
|
|
187
|
+
TimeRange: 'timerange',
|
|
188
|
+
IconTime: 'icon-time',
|
|
189
|
+
IconDate: 'icon-Calendar',
|
|
190
|
+
DateRange: 'daterange',
|
|
191
|
+
DateTimeRange: 'datetimerange',
|
|
192
|
+
MonthRange: 'monthrange',
|
|
193
|
+
TimeSelect: 'time-select',
|
|
194
|
+
TimesTamp: 'timestamp',
|
|
195
|
+
DateTime: 'datetime',
|
|
196
|
+
SelectbaleRange: 'selectableRange',
|
|
197
|
+
Start: '09:00',
|
|
198
|
+
End: '18:00',
|
|
199
|
+
Step: '00:30',
|
|
200
|
+
CompareOne: '-1:-1',
|
|
201
|
+
CompareHundred: '100:100',
|
|
202
|
+
selClass: '.selected',
|
|
203
|
+
queryClass: '.tiny-picker-panel__content',
|
|
204
|
+
disableClass: '.time-select-item:not(.disabled)',
|
|
205
|
+
defaultClass: '.default',
|
|
206
|
+
Qurtyli: 'li',
|
|
207
|
+
MappingKeyCode: {
|
|
208
|
+
40: 1,
|
|
209
|
+
38: -1
|
|
210
|
+
},
|
|
211
|
+
DatePicker: 'DatePicker',
|
|
212
|
+
TimePicker: 'TimePicker'
|
|
213
|
+
};
|
|
214
|
+
export var BROWSER_NAME = {
|
|
215
|
+
IE: 'ie',
|
|
216
|
+
Edge: 'edge',
|
|
217
|
+
Chrome: 'chrome',
|
|
218
|
+
Firefox: 'firefox'
|
|
219
|
+
};
|
|
220
|
+
export var MOUSEDELTA = 120;
|
|
221
|
+
export var VALIDATE_STATE = {
|
|
222
|
+
Validating: 'validating',
|
|
223
|
+
Success: 'success',
|
|
224
|
+
Error: 'error'
|
|
225
|
+
};
|
|
226
|
+
export var CASCADER = {
|
|
227
|
+
SvgStr: '<path style="pointer-events: auto;" fill="transparent" d="M',
|
|
228
|
+
CascaderNodeExpand: '.tiny-cascader-node[aria-expanded="true"]',
|
|
229
|
+
CascaderNodeTab: '.tiny-cascader-node[tabindex="-1"]',
|
|
230
|
+
ScrollWrap: '.tiny-scrollbar__wrap',
|
|
231
|
+
CascaderActice: '.tiny-cascader-node.is-active',
|
|
232
|
+
ActivePath: '.tiny-cascader-node.in-active-path',
|
|
233
|
+
PropsObject: {
|
|
234
|
+
'expand-trigger': 'expand-trigger is removed, use `props.expandTrigger` instead.',
|
|
235
|
+
'change-on-select': 'change-on-select is removed, use `props.checkStrictly` instead.',
|
|
236
|
+
'hover-threshold': 'hover-threshold is removed, use `props.hoverThreshold` instead'
|
|
237
|
+
},
|
|
238
|
+
EventObject: {
|
|
239
|
+
'active-item-change': 'active-item-change is renamed to expand-change'
|
|
240
|
+
},
|
|
241
|
+
SugItem: '.tiny-cascader__suggestion-item',
|
|
242
|
+
CascaderMenu: '.tiny-cascader-menu',
|
|
243
|
+
InputClass: '.tiny-input__inner',
|
|
244
|
+
TagClass: '.tiny-cascader__tags',
|
|
245
|
+
ListClass: '.tiny-cascader__suggestion-list',
|
|
246
|
+
PropsExpandTri: 'expandTrigger',
|
|
247
|
+
PropsCheckStric: 'checkStrictly',
|
|
248
|
+
PropsHover: 'hoverThreshold',
|
|
249
|
+
MenuConnector: 'cascader-menu-'
|
|
250
|
+
};
|
|
251
|
+
export var EDOC = {
|
|
252
|
+
uploadFlag: 'uploadDocument',
|
|
253
|
+
edocFlag: 'edoc_flag_',
|
|
254
|
+
edocUrl: 'edoc_url_',
|
|
255
|
+
action: '/EdocAction.do?methodFlag=getJsonp×tamp=',
|
|
256
|
+
name: 'edocupload',
|
|
257
|
+
path: '',
|
|
258
|
+
updateFlag: 'updateDocumentContent',
|
|
259
|
+
docVersion: '&docVersion=',
|
|
260
|
+
preview: 'edoc/preview',
|
|
261
|
+
docId: '?docId=',
|
|
262
|
+
formName: 'previewForm',
|
|
263
|
+
formAction: '<form action="',
|
|
264
|
+
formMethod: '" method="post" target=\'',
|
|
265
|
+
formInput: '<input type="hidden" name="methodFlag" value="view">',
|
|
266
|
+
formInutValue: '<input type="hidden" name="hw_document_code" value="',
|
|
267
|
+
closeDom: '"/>',
|
|
268
|
+
formClose: '</form>',
|
|
269
|
+
hwVersion: '&hw_doc_version=',
|
|
270
|
+
heightStr: '&tmb_height=',
|
|
271
|
+
widthStr: '&hw_thumb_width=',
|
|
272
|
+
imgPreview: 'edoc/previewImage',
|
|
273
|
+
hwId: '?hw_doc_id=',
|
|
274
|
+
viewThumb: 'viewThumb',
|
|
275
|
+
viewImage: 'viewImage',
|
|
276
|
+
methodFlag: '?methodFlag=',
|
|
277
|
+
code: '&hw_document_code=',
|
|
278
|
+
imgDom: '<img src="',
|
|
279
|
+
imgClose: '">',
|
|
280
|
+
constants: 320,
|
|
281
|
+
twenty: 20
|
|
282
|
+
};
|
|
283
|
+
export var version = process.env.RUNTIME_VERSION;
|
|
284
|
+
export var log = function log(data) {
|
|
285
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'log';
|
|
286
|
+
uLog.logger[type](data);
|
|
287
|
+
};
|
|
288
|
+
export { xss };
|
package/common/object.js
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { hasOwn, typeOf, isObject, isPlainObject, isNull } from '@opentiny/vue-renderless/common/type';
|
|
2
|
+
export var each = function each(obj, handle) {
|
|
3
|
+
if (typeof handle !== 'function') {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
for (var name in obj) {
|
|
7
|
+
if (hasOwn.call(obj, name)) {
|
|
8
|
+
if (handle(name, obj[name]) === false) {
|
|
9
|
+
break;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
var extend;
|
|
15
|
+
export var getObj = function getObj(data, names, isExceptRoot) {
|
|
16
|
+
if (!data || !isPlainObject(data) || !names || typeof names !== 'string') {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
names = names.split('.');
|
|
20
|
+
var obj = data;
|
|
21
|
+
var len = names.length;
|
|
22
|
+
if (len > 1) {
|
|
23
|
+
var startIndex = isExceptRoot ? 1 : 0;
|
|
24
|
+
for (var i = startIndex; i < len; i++) {
|
|
25
|
+
obj = obj[names[i]];
|
|
26
|
+
if (isNull(obj)) {
|
|
27
|
+
return obj;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return obj;
|
|
31
|
+
} else {
|
|
32
|
+
return obj[names[0]];
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export var setObj = function setObj(data, names, value, isMerge) {
|
|
36
|
+
if (!data || !isPlainObject(data) || !names || typeof names !== 'string') {
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
names = names.split('.');
|
|
40
|
+
var obj = data;
|
|
41
|
+
var len = names.length;
|
|
42
|
+
var item = names[0];
|
|
43
|
+
if (len > 1) {
|
|
44
|
+
len--;
|
|
45
|
+
var tmpl = obj;
|
|
46
|
+
var name, target;
|
|
47
|
+
for (var i = 0; i < len; i++) {
|
|
48
|
+
name = names[i];
|
|
49
|
+
target = tmpl[name];
|
|
50
|
+
if (target === null || !isPlainObject(target)) {
|
|
51
|
+
tmpl[name] = {};
|
|
52
|
+
target = tmpl[name];
|
|
53
|
+
}
|
|
54
|
+
tmpl = target;
|
|
55
|
+
}
|
|
56
|
+
item = names[len];
|
|
57
|
+
isMerge ? isPlainObject(tmpl[item]) ? extend(true, tmpl[item], value) : tmpl[item] = value : tmpl[item] = value;
|
|
58
|
+
} else {
|
|
59
|
+
isMerge ? isPlainObject(obj[item]) ? extend(true, obj[item], value) : obj[item] = value : obj[item] = value;
|
|
60
|
+
}
|
|
61
|
+
return obj;
|
|
62
|
+
};
|
|
63
|
+
export var copyField = function copyField(data, fields, isMerge, isExclude) {
|
|
64
|
+
var setValue = function setValue(obj, result, name, key, isMerge) {
|
|
65
|
+
var include = key.indexOf(name) === 0;
|
|
66
|
+
var keySplit = key.split(name);
|
|
67
|
+
var hasNextDot = keySplit[1] && keySplit[1].indexOf('.') === 0;
|
|
68
|
+
if (name === key || include && hasNextDot) {
|
|
69
|
+
if (name !== key) {
|
|
70
|
+
each(getObj(obj, name), function (field) {
|
|
71
|
+
setValue(obj, result, "".concat(name, ".").concat(field), key);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
if (fields.indexOf(name) < 0) {
|
|
76
|
+
setObj(result, name, getObj(obj, name), isMerge);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
var innerCopyFields = function innerCopyFields(obj, fields, isMerge, isExclude) {
|
|
81
|
+
var result = {};
|
|
82
|
+
if (isExclude) {
|
|
83
|
+
each(obj, function (name) {
|
|
84
|
+
return fields.forEach(function (key) {
|
|
85
|
+
return setValue(obj, result, name, key, isMerge);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
} else {
|
|
89
|
+
fields.forEach(function (field) {
|
|
90
|
+
return setObj(result, field, getObj(obj, field), isMerge);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
};
|
|
95
|
+
if (isPlainObject(data)) {
|
|
96
|
+
return Array.isArray(fields) ? innerCopyFields(data, fields, isMerge, isExclude) : extend(isMerge !== false, {}, data);
|
|
97
|
+
}
|
|
98
|
+
return data;
|
|
99
|
+
};
|
|
100
|
+
export var copyArray = function copyArray(arr) {
|
|
101
|
+
return Array.isArray(arr) ? arr.map(function (item) {
|
|
102
|
+
return copyField(item);
|
|
103
|
+
}) : arr;
|
|
104
|
+
};
|
|
105
|
+
var deepCopy = function deepCopy(target, name, deep, copy, src) {
|
|
106
|
+
var copyIsArray;
|
|
107
|
+
if (deep && copy && (isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
|
|
108
|
+
if (copyIsArray) {
|
|
109
|
+
copyIsArray = false;
|
|
110
|
+
target[name] = copyArray(copy);
|
|
111
|
+
} else {
|
|
112
|
+
var clone = src && isPlainObject(src) ? src : {};
|
|
113
|
+
target[name] = extend(deep, clone, copy);
|
|
114
|
+
}
|
|
115
|
+
} else if (copy !== undefined) {
|
|
116
|
+
try {
|
|
117
|
+
target[name] = copy;
|
|
118
|
+
} catch (e) {}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
extend = function extend() {
|
|
122
|
+
var args = arguments;
|
|
123
|
+
var length = args.length;
|
|
124
|
+
var target = args[0] || {};
|
|
125
|
+
var i = 1;
|
|
126
|
+
var deep = false;
|
|
127
|
+
if (typeOf(target) === 'boolean') {
|
|
128
|
+
deep = target;
|
|
129
|
+
target = args[i] || {};
|
|
130
|
+
i++;
|
|
131
|
+
}
|
|
132
|
+
if (!isObject(target) && typeOf(target) !== 'function') {
|
|
133
|
+
target = {};
|
|
134
|
+
}
|
|
135
|
+
if (i === length) {
|
|
136
|
+
target = this;
|
|
137
|
+
i--;
|
|
138
|
+
}
|
|
139
|
+
for (; i < length; i++) {
|
|
140
|
+
var options = args[i];
|
|
141
|
+
if (options !== null && isObject(options)) {
|
|
142
|
+
var names = Object.keys(options);
|
|
143
|
+
for (var _i = 0, _names = names; _i < _names.length; _i++) {
|
|
144
|
+
var name = _names[_i];
|
|
145
|
+
var src = target[name];
|
|
146
|
+
var copy = options[name];
|
|
147
|
+
if (target !== copy) {
|
|
148
|
+
deepCopy(target, name, deep, copy, src);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return target;
|
|
154
|
+
};
|
|
155
|
+
var _isEachEqual;
|
|
156
|
+
export var isEqual = function isEqual(sourceData, targetData, deep, fields) {
|
|
157
|
+
if (typeOf(sourceData) === typeOf(targetData)) {
|
|
158
|
+
deep = deep !== false;
|
|
159
|
+
if (Array.isArray(fields)) {
|
|
160
|
+
var _sourceData = copyField(sourceData, fields);
|
|
161
|
+
var _targetData = copyField(targetData, fields);
|
|
162
|
+
return isEqual(_sourceData, _targetData, deep);
|
|
163
|
+
}
|
|
164
|
+
var source = _isEachEqual(sourceData, targetData, deep);
|
|
165
|
+
var target = _isEachEqual(targetData, sourceData, deep);
|
|
166
|
+
return source === target && source !== false;
|
|
167
|
+
}
|
|
168
|
+
return false;
|
|
169
|
+
};
|
|
170
|
+
_isEachEqual = function isEachEqual(data1, data2, deep) {
|
|
171
|
+
if (!isPlainObject(data1)) {
|
|
172
|
+
if (!Array.isArray(data1)) {
|
|
173
|
+
return data1 === data2;
|
|
174
|
+
}
|
|
175
|
+
if (data1.length !== data2.length) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
for (var i = 0, length = data1.length; i < length; i++) {
|
|
179
|
+
var result = isEqual(data1[i], data2[i], deep);
|
|
180
|
+
if (!result) {
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
var bEqual = true;
|
|
187
|
+
var names = Object.keys(data1);
|
|
188
|
+
for (var _i2 = 0, _names2 = names; _i2 < _names2.length; _i2++) {
|
|
189
|
+
var name = _names2[_i2];
|
|
190
|
+
if (hasOwn.call(data2, name)) {
|
|
191
|
+
var _data1 = data1[name];
|
|
192
|
+
var _data2 = data2[name];
|
|
193
|
+
if (deep && isObject(_data1) || Array.isArray(_data1)) {
|
|
194
|
+
bEqual = _isEachEqual(_data1, _data2, deep);
|
|
195
|
+
} else {
|
|
196
|
+
bEqual = _data1 === _data2;
|
|
197
|
+
}
|
|
198
|
+
} else {
|
|
199
|
+
bEqual = false;
|
|
200
|
+
}
|
|
201
|
+
if (bEqual === false) {
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return bEqual;
|
|
206
|
+
};
|
|
207
|
+
export { _isEachEqual as isEachEqual, extend };
|
|
208
|
+
export var toJsonStr = function toJsonStr(obj) {
|
|
209
|
+
try {
|
|
210
|
+
return JSON.stringify(obj);
|
|
211
|
+
} catch (e) {
|
|
212
|
+
return undefined;
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
export var merge = function merge(target) {
|
|
216
|
+
for (var i = 1, len = arguments.length; i < len; i++) {
|
|
217
|
+
var source = arguments[i] || {};
|
|
218
|
+
for (var prop in source) {
|
|
219
|
+
if (hasOwn.call(source, prop)) {
|
|
220
|
+
var value = source[prop];
|
|
221
|
+
if (value !== undefined) {
|
|
222
|
+
target[prop] = value;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return target;
|
|
228
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as array from '@opentiny/vue-renderless/common/array';
|
|
2
|
+
import browser from '@opentiny/vue-renderless/common/browser';
|
|
3
|
+
import * as date from '@opentiny/vue-renderless/common/date';
|
|
4
|
+
import * as decimal from '@opentiny/vue-renderless/common/decimal';
|
|
5
|
+
import * as object from '@opentiny/vue-renderless/common/object';
|
|
6
|
+
import * as string from '@opentiny/vue-renderless/common/string';
|
|
7
|
+
import * as type from '@opentiny/vue-renderless/common/type';
|
|
8
|
+
import * as dataset from '@opentiny/vue-renderless/common/dataset';
|
|
9
|
+
import afterLeave from '@opentiny/vue-renderless/common/deps/after-leave';
|
|
10
|
+
import clickoutside from '@opentiny/vue-renderless/common/deps/clickoutside';
|
|
11
|
+
import debounce from '@opentiny/vue-renderless/common/deps/debounce';
|
|
12
|
+
import * as dom from '@opentiny/vue-renderless/common/deps/dom';
|
|
13
|
+
import popper from '@opentiny/vue-renderless/common/deps/popper';
|
|
14
|
+
import popupManager from '@opentiny/vue-renderless/common/deps/popup-manager';
|
|
15
|
+
import * as resizeEvent from '@opentiny/vue-renderless/common/deps/resize-event';
|
|
16
|
+
import * as scrollbarWidth from '@opentiny/vue-renderless/common/deps/scrollbar-width';
|
|
17
|
+
import throttle from '@opentiny/vue-renderless/common/deps/throttle';
|
|
18
|
+
import vueEmitter from '@opentiny/vue-renderless/common/deps/vue-emitter';
|
|
19
|
+
import vuePopper from '@opentiny/vue-renderless/common/deps/vue-popper';
|
|
20
|
+
import vuePopup from '@opentiny/vue-renderless/common/deps/vue-popup';
|
|
21
|
+
import validate from '@opentiny/vue-renderless/common/validate';
|
|
22
|
+
import memorize from '@opentiny/vue-renderless/common/deps/memorize';
|
|
23
|
+
import * as common from '@opentiny/vue-renderless/common';
|
|
24
|
+
var version = process.env.RUNTIME_VERSION;
|
|
25
|
+
var Renderless = {
|
|
26
|
+
browser: browser,
|
|
27
|
+
array: array,
|
|
28
|
+
date: date,
|
|
29
|
+
object: object,
|
|
30
|
+
decimal: decimal,
|
|
31
|
+
type: type,
|
|
32
|
+
string: string,
|
|
33
|
+
afterLeave: afterLeave,
|
|
34
|
+
dataset: dataset,
|
|
35
|
+
clickoutside: clickoutside,
|
|
36
|
+
dom: dom,
|
|
37
|
+
debounce: debounce,
|
|
38
|
+
popper: popper,
|
|
39
|
+
resizeEvent: resizeEvent,
|
|
40
|
+
popupManager: popupManager,
|
|
41
|
+
scrollbarWidth: scrollbarWidth,
|
|
42
|
+
vueEmitter: vueEmitter,
|
|
43
|
+
vuePopper: vuePopper,
|
|
44
|
+
throttle: throttle,
|
|
45
|
+
vuePopup: vuePopup,
|
|
46
|
+
memorize: memorize,
|
|
47
|
+
common: common,
|
|
48
|
+
validate: validate,
|
|
49
|
+
version: version
|
|
50
|
+
};
|
|
51
|
+
export default Renderless;
|
|
52
|
+
export { array, browser, date, decimal, object, string, type, dataset, afterLeave, clickoutside, debounce, dom, popper, popupManager, resizeEvent, scrollbarWidth, throttle, vueEmitter, vuePopper, vuePopup, validate, memorize, common, version };
|