@opentiny/vue-renderless 3.1.0-alpha.0 → 3.5.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 (178) hide show
  1. package/action-menu/index.js +10 -0
  2. package/action-menu/vue.js +26 -0
  3. package/amount/index.js +334 -0
  4. package/amount/vue.js +206 -0
  5. package/area/index.js +162 -0
  6. package/area/vue.js +68 -0
  7. package/autonavi-map/index.js +28 -0
  8. package/avatar/index.js +5 -1
  9. package/avatar/vue.js +2 -1
  10. package/baidu-map/index.js +28 -0
  11. package/breadcrumb/index.js +9 -0
  12. package/breadcrumb/vue.js +25 -3
  13. package/breadcrumb-item/index.js +26 -0
  14. package/breadcrumb-item/vue.js +20 -11
  15. package/bulletin-board/index.js +4 -1
  16. package/button-group/vue.js +1 -1
  17. package/calendar/index.js +14 -14
  18. package/card-template/index.js +1 -1
  19. package/cascader/index.js +21 -7
  20. package/cascader/vue.js +1 -2
  21. package/cascader-node/index.js +3 -1
  22. package/cascader-panel/index.js +12 -4
  23. package/cascader-panel/vue.js +1 -2
  24. package/chart-bar/index.js +533 -0
  25. package/chart-boxplot/index.js +270 -0
  26. package/chart-candle/index.js +428 -0
  27. package/chart-core/deps/constants.js +65 -0
  28. package/chart-core/deps/numerify.js +286 -0
  29. package/chart-core/deps/utils.js +205 -0
  30. package/chart-core/index.js +541 -0
  31. package/chart-core/modules/animation.js +10 -0
  32. package/chart-core/modules/extend.js +36 -0
  33. package/chart-core/modules/mark.js +7 -0
  34. package/chart-core/vue.js +128 -0
  35. package/chart-funnel/index.js +155 -0
  36. package/chart-gauge/index.js +153 -0
  37. package/chart-graph/index.js +38 -0
  38. package/chart-heatmap/index.js +407 -0
  39. package/chart-line/index.js +358 -0
  40. package/chart-liquidfill/index.js +119 -0
  41. package/chart-map/index.js +261 -0
  42. package/chart-pie/index.js +327 -0
  43. package/chart-radar/index.js +181 -0
  44. package/chart-sankey/index.js +166 -0
  45. package/chart-scatter/index.js +360 -0
  46. package/chart-sunburst/index.js +36 -0
  47. package/chart-tree/index.js +107 -0
  48. package/chart-waterfall/index.js +231 -0
  49. package/chart-wordcloud/index.js +109 -0
  50. package/checkbox/index.js +4 -4
  51. package/checkbox-button/index.js +3 -1
  52. package/common/bigInt.js +5 -2
  53. package/common/date.js +17 -17
  54. package/common/deps/date-util.js +15 -5
  55. package/common/deps/date.js +6 -6
  56. package/common/deps/dom.js +18 -6
  57. package/common/deps/eSpaceCtrl.js +286 -0
  58. package/common/deps/fullscreen/apis.js +22 -22
  59. package/common/deps/memorize.js +3 -3
  60. package/common/deps/modal-queue.js +2 -0
  61. package/common/deps/popper.js +12 -10
  62. package/common/deps/popup-manager.js +16 -5
  63. package/common/deps/resize-event.js +6 -2
  64. package/common/deps/scrollbar-width.js +6 -2
  65. package/common/deps/tree-model/node.js +30 -10
  66. package/common/deps/tree-model/tree-store.js +33 -21
  67. package/common/deps/tree-model/util.js +6 -2
  68. package/common/deps/upload-ajax.js +7 -1
  69. package/common/deps/vue-popper.js +2 -2
  70. package/common/string.js +1 -1
  71. package/company/index.js +56 -0
  72. package/company/vue.js +35 -0
  73. package/country/index.js +54 -0
  74. package/country/vue.js +35 -0
  75. package/credit-card-form/index.js +1 -0
  76. package/currency/index.js +78 -0
  77. package/currency/vue.js +39 -0
  78. package/date-panel/index.js +16 -6
  79. package/date-picker/index.js +9 -5
  80. package/date-range/index.js +28 -9
  81. package/date-table/index.js +3 -1
  82. package/dept/index.js +318 -0
  83. package/dept/vue.js +163 -0
  84. package/detail-page/index.js +4 -1
  85. package/dialog-box/index.js +14 -4
  86. package/dialog-box/vue.js +7 -3
  87. package/drop-roles/index.js +73 -0
  88. package/drop-roles/vue.js +38 -0
  89. package/dropdown/index.js +5 -4
  90. package/dropdown/vue.js +5 -3
  91. package/dropdown-item/index.js +15 -0
  92. package/dropdown-item/vue.js +27 -13
  93. package/espace/index.js +129 -0
  94. package/espace/vue.js +52 -0
  95. package/exception/index.js +1 -1
  96. package/file-upload/index.js +336 -291
  97. package/form/index.js +3 -1
  98. package/form/vue.js +15 -0
  99. package/form-item/index.js +15 -5
  100. package/fullscreen/index.js +4 -4
  101. package/fullscreen/vue.js +3 -3
  102. package/grid/core/interceptor.js +4 -7
  103. package/grid/plugins/export.js +2 -2
  104. package/grid/plugins/exportExcel.js +28 -10
  105. package/grid/static/array/findTree.js +1 -1
  106. package/grid/static/base/helperCreateGetObjects.js +1 -1
  107. package/grid/static/base/helperEqualCompare.js +2 -2
  108. package/grid/static/base/helperGetHGSKeys.js +1 -1
  109. package/grid/static/base/uniqueId.js +1 -1
  110. package/grid/static/object/assign.js +3 -3
  111. package/grid/static/string/toString.js +3 -3
  112. package/hrapprover/index.js +118 -0
  113. package/hrapprover/vue.js +102 -0
  114. package/locales/index.js +116 -0
  115. package/locales/vue.js +46 -0
  116. package/logon-user/index.js +23 -0
  117. package/logon-user/vue.js +22 -0
  118. package/logout/index.js +118 -0
  119. package/logout/vue.js +22 -0
  120. package/milestone/index.js +2 -1
  121. package/mini-picker/index.js +1 -1
  122. package/mini-picker/vue.js +1 -1
  123. package/modal/index.js +4 -2
  124. package/month-table/index.js +2 -2
  125. package/nav-menu/index.js +2 -2
  126. package/numeric/index.js +5 -2
  127. package/package.json +33 -136
  128. package/pager-item/vue.js +6 -2
  129. package/picker/index.js +43 -17
  130. package/picker/timezone.js +2 -2
  131. package/picker-column/index.js +7 -3
  132. package/pop-upload/index.js +5 -3
  133. package/popeditor/index.js +15 -7
  134. package/popover/index.js +87 -54
  135. package/popover/vue.js +13 -9
  136. package/rate/index.js +2 -2
  137. package/rich-text/clipboard.js +77 -0
  138. package/rich-text/index.js +176 -0
  139. package/rich-text/module/file-upload.js +118 -0
  140. package/rich-text/module/image-drop.js +54 -0
  141. package/rich-text/module/image-upload.js +84 -0
  142. package/rich-text/options.js +187 -0
  143. package/rich-text/table-module.js +557 -0
  144. package/rich-text/vue.js +149 -0
  145. package/roles/index.js +87 -0
  146. package/roles/vue.js +39 -0
  147. package/search/index.js +32 -27
  148. package/search/vue.js +7 -2
  149. package/select/index.js +328 -304
  150. package/select/vue.js +19 -9
  151. package/select-dropdown/index.js +1 -1
  152. package/slider/index.js +9 -11
  153. package/slider/vue.js +3 -3
  154. package/split/vue.js +1 -1
  155. package/tab-nav/index.js +0 -6
  156. package/tab-nav/vue.js +0 -14
  157. package/table/index.js +1 -1
  158. package/text-popup/index.js +6 -4
  159. package/time/index.js +3 -1
  160. package/time-range/index.js +6 -2
  161. package/time-spinner/index.js +15 -5
  162. package/toggle-menu/index.js +11 -0
  163. package/toggle-menu/vue.js +2 -1
  164. package/tooltip/index.js +46 -35
  165. package/tooltip/vue.js +5 -1
  166. package/tree/index.js +57 -21
  167. package/tree-menu/index.js +3 -1
  168. package/tree-node/index.js +7 -3
  169. package/upload/index.js +14 -5
  170. package/user/index.js +634 -0
  171. package/user/vue.js +113 -0
  172. package/user-account/index.js +23 -0
  173. package/user-account/vue.js +25 -0
  174. package/user-contact/index.js +1 -4
  175. package/user-head/index.js +33 -11
  176. package/user-head/vue.js +10 -7
  177. package/user-link/index.js +43 -0
  178. package/user-link/vue.js +60 -0
package/area/index.js ADDED
@@ -0,0 +1,162 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ export var fetchDefaultData = function fetchDefaultData(_ref) {
3
+ var emit = _ref.emit,
4
+ fetchArea = _ref.fetchArea,
5
+ nextTick = _ref.nextTick,
6
+ props = _ref.props,
7
+ refs = _ref.refs,
8
+ state = _ref.state;
9
+ return function () {
10
+ var parent = '';
11
+ nextTick(function () {
12
+ emit('change-jcr', parent, refs.refInstance.$parent);
13
+ });
14
+ var promise;
15
+ if (props.fetchJcr) {
16
+ promise = props.fetchJcr();
17
+ } else {
18
+ if (typeof fetchArea !== 'function') {
19
+ throw new Error('[AUI Error][Area] Prop fetchJcr is not configured');
20
+ }
21
+ promise = fetchArea({
22
+ label: 'JCR',
23
+ parent: parent
24
+ });
25
+ }
26
+ promise.then(function (data) {
27
+ return state.jcrData = data;
28
+ });
29
+ state.jcr = '';
30
+ state.region = '';
31
+ state.rep = '';
32
+ state.office = '';
33
+ emit('update:modelValue', [state.jcr, state.region, state.rep, state.office]);
34
+ };
35
+ };
36
+ export var getRegion = function getRegion(_ref2) {
37
+ var emit = _ref2.emit,
38
+ fetchArea = _ref2.fetchArea,
39
+ nextTick = _ref2.nextTick,
40
+ props = _ref2.props,
41
+ refs = _ref2.refs,
42
+ state = _ref2.state;
43
+ return function (value) {
44
+ state.jcr = value;
45
+ nextTick(function () {
46
+ emit('change-region', value, refs.refInstance.$parent);
47
+ });
48
+ var promise;
49
+ if (props.fetchRegion) {
50
+ promise = props.fetchRegion();
51
+ } else {
52
+ if (typeof fetchArea !== 'function') {
53
+ throw new Error('[AUI Error][Area] Prop fetchRegion is not configured');
54
+ }
55
+ promise = fetchArea({
56
+ label: 'Region',
57
+ parent: value
58
+ });
59
+ }
60
+ promise.then(function (data) {
61
+ return state.regionData = data;
62
+ });
63
+ state.region = '';
64
+ state.office = '';
65
+ state.rep = '';
66
+ emit('update:modelValue', [state.jcr, state.region, state.rep, state.office]);
67
+ };
68
+ };
69
+ export var getRep = function getRep(_ref3) {
70
+ var emit = _ref3.emit,
71
+ fetchArea = _ref3.fetchArea,
72
+ nextTick = _ref3.nextTick,
73
+ props = _ref3.props,
74
+ refs = _ref3.refs,
75
+ state = _ref3.state;
76
+ return function (value) {
77
+ state.region = value;
78
+ nextTick(function () {
79
+ emit('change-rep', value, refs.refInstance.$parent);
80
+ });
81
+ var promise;
82
+ if (props.fetchRep) {
83
+ promise = props.fetchRep();
84
+ } else {
85
+ if (typeof fetchArea !== 'function') {
86
+ throw new Error('[AUI Error][Area] Prop fetchRep is not configured');
87
+ }
88
+ promise = fetchArea({
89
+ label: 'Rep. Office',
90
+ parent: value
91
+ });
92
+ }
93
+ promise.then(function (data) {
94
+ return state.repData = data;
95
+ });
96
+ state.office = '';
97
+ state.rep = '';
98
+ emit('update:modelValue', [state.jcr, state.region, state.rep, state.office]);
99
+ };
100
+ };
101
+ export var getOffice = function getOffice(_ref4) {
102
+ var emit = _ref4.emit,
103
+ fetchArea = _ref4.fetchArea,
104
+ nextTick = _ref4.nextTick,
105
+ props = _ref4.props,
106
+ refs = _ref4.refs,
107
+ state = _ref4.state;
108
+ return function (value) {
109
+ state.rep = value;
110
+ nextTick(function () {
111
+ emit('change-office', value, refs.refInstance.$parent);
112
+ });
113
+ var promise;
114
+ if (props.fetchOffice) {
115
+ promise = props.fetchOffice();
116
+ } else {
117
+ if (typeof fetchArea !== 'function') {
118
+ throw new Error('[AUI Error][Area] Prop fetchOffice is not configured');
119
+ }
120
+ promise = fetchArea({
121
+ label: 'Office',
122
+ parent: value
123
+ });
124
+ }
125
+ promise.then(function (data) {
126
+ return state.officeData = data;
127
+ });
128
+ state.office = '';
129
+ emit('update:modelValue', [state.jcr, state.region, state.rep, state.office]);
130
+ };
131
+ };
132
+ export var changeOffice = function changeOffice(_ref5) {
133
+ var emit = _ref5.emit,
134
+ state = _ref5.state;
135
+ return function (value) {
136
+ state.office = value;
137
+ emit('update:modelValue', [state.jcr, state.region, state.rep, state.office]);
138
+ };
139
+ };
140
+ export var beforeMount = function beforeMount(_ref6) {
141
+ var api = _ref6.api,
142
+ props = _ref6.props;
143
+ return function () {
144
+ api.fetchDefaultData();
145
+ var modelValue = props.modelValue;
146
+ if (Array.isArray(modelValue) && modelValue.length) {
147
+ var _modelValue = _slicedToArray(modelValue, 4),
148
+ _modelValue$ = _modelValue[0],
149
+ jcr = _modelValue$ === void 0 ? '' : _modelValue$,
150
+ _modelValue$2 = _modelValue[1],
151
+ region = _modelValue$2 === void 0 ? '' : _modelValue$2,
152
+ _modelValue$3 = _modelValue[2],
153
+ rep = _modelValue$3 === void 0 ? '' : _modelValue$3,
154
+ _modelValue$4 = _modelValue[3],
155
+ office = _modelValue$4 === void 0 ? '' : _modelValue$4;
156
+ api.getRegion(jcr);
157
+ api.getRep(region);
158
+ api.getOffice(rep);
159
+ api.changeOffice(office);
160
+ }
161
+ };
162
+ };
package/area/vue.js ADDED
@@ -0,0 +1,68 @@
1
+ import { getRegion, changeOffice, getRep, getOffice, fetchDefaultData, beforeMount } from './index';
2
+ export var api = ['state', 'getRep', 'getRegion', 'getOffice', 'changeOffice'];
3
+ export var renderless = function renderless(props, _ref, _ref2) {
4
+ var onBeforeMount = _ref.onBeforeMount,
5
+ reactive = _ref.reactive;
6
+ var emit = _ref2.emit,
7
+ service = _ref2.service,
8
+ refs = _ref2.refs,
9
+ nextTick = _ref2.nextTick;
10
+ var api = {};
11
+ var _ref3 = service || {},
12
+ fetchArea = _ref3.fetchArea;
13
+ var state = reactive({
14
+ jcr: '',
15
+ region: '',
16
+ rep: '',
17
+ office: '',
18
+ jcrData: [],
19
+ regionData: [],
20
+ repData: [],
21
+ officeData: []
22
+ });
23
+ Object.assign(api, {
24
+ state: state,
25
+ changeOffice: changeOffice({
26
+ emit: emit,
27
+ state: state
28
+ }),
29
+ beforeMount: beforeMount({
30
+ api: api,
31
+ props: props
32
+ }),
33
+ getRep: getRep({
34
+ emit: emit,
35
+ fetchArea: fetchArea,
36
+ nextTick: nextTick,
37
+ props: props,
38
+ refs: refs,
39
+ state: state
40
+ }),
41
+ getRegion: getRegion({
42
+ emit: emit,
43
+ fetchArea: fetchArea,
44
+ nextTick: nextTick,
45
+ props: props,
46
+ refs: refs,
47
+ state: state
48
+ }),
49
+ getOffice: getOffice({
50
+ emit: emit,
51
+ fetchArea: fetchArea,
52
+ nextTick: nextTick,
53
+ props: props,
54
+ refs: refs,
55
+ state: state
56
+ }),
57
+ fetchDefaultData: fetchDefaultData({
58
+ emit: emit,
59
+ fetchArea: fetchArea,
60
+ nextTick: nextTick,
61
+ props: props,
62
+ refs: refs,
63
+ state: state
64
+ })
65
+ });
66
+ onBeforeMount(api.beforeMount);
67
+ return api;
68
+ };
@@ -0,0 +1,28 @@
1
+ import { getAmap } from '@opentiny/vue-renderless/chart-core/deps/utils';
2
+ export var amap = function amap(columns, rows, settings, extra) {
3
+ var key = settings.key,
4
+ v = settings.v,
5
+ amap = settings.amap,
6
+ useOuterMap = settings.useOuterMap,
7
+ url = settings.url;
8
+ var _once = extra._once;
9
+ var registerSign = 'amap_register';
10
+ if (_once[registerSign]) {
11
+ return {};
12
+ }
13
+ _once[registerSign] = true;
14
+ if (useOuterMap) {
15
+ return {
16
+ amap: amap
17
+ };
18
+ }
19
+ return getAmap({
20
+ key: key,
21
+ version: v,
22
+ url: url
23
+ }).then(function () {
24
+ return {
25
+ amap: amap
26
+ };
27
+ });
28
+ };
package/avatar/index.js CHANGED
@@ -5,7 +5,11 @@ export var handleError = function handleError(_ref) {
5
5
  var error = props.error;
6
6
  var errorFlag = error ? error() : undefined;
7
7
  if (errorFlag !== false) {
8
- state.isImageExist = false;
8
+ if (state.isSrcImageExist) {
9
+ state.isSrcImageExist = false;
10
+ } else {
11
+ state.isDefaultImageExist = false;
12
+ }
9
13
  }
10
14
  };
11
15
  };
package/avatar/vue.js CHANGED
@@ -8,7 +8,8 @@ export var renderless = function renderless(props, _ref, _ref2) {
8
8
  computedAvatarClass: computedAvatarClass(constants)
9
9
  };
10
10
  var state = reactive({
11
- isImageExist: true,
11
+ isSrcImageExist: true,
12
+ isDefaultImageExist: true,
12
13
  avatarClass: computed(function () {
13
14
  return api.computedAvatarClass(props);
14
15
  })
@@ -0,0 +1,28 @@
1
+ import { getBmap } from '@opentiny/vue-renderless/chart-core/deps/utils';
2
+ export var bmap = function bmap(columns, rows, settings, extra) {
3
+ var key = settings.key,
4
+ v = settings.v,
5
+ bmap = settings.bmap,
6
+ useOuterMap = settings.useOuterMap,
7
+ url = settings.url;
8
+ var _once = extra._once;
9
+ var registerSign = 'bmap_register';
10
+ if (_once[registerSign]) {
11
+ return {};
12
+ }
13
+ _once[registerSign] = true;
14
+ if (useOuterMap) {
15
+ return {
16
+ bmap: bmap
17
+ };
18
+ }
19
+ return getBmap({
20
+ key: key,
21
+ version: v,
22
+ url: url
23
+ }).then(function () {
24
+ return {
25
+ bmap: bmap
26
+ };
27
+ });
28
+ };
@@ -0,0 +1,9 @@
1
+ export var breadcrumbItemSelect = function breadcrumbItemSelect(_ref) {
2
+ var emit = _ref.emit,
3
+ state = _ref.state,
4
+ constants = _ref.constants;
5
+ state.breadcrumbEmitter.on(constants.EVENT_NAME.breadcrumbItemSelect, function (value) {
6
+ state.currentBreadcrumbItem = value;
7
+ emit('select', value);
8
+ });
9
+ };
package/breadcrumb/vue.js CHANGED
@@ -1,4 +1,26 @@
1
- export var api = [];
2
- export var renderless = function renderless() {
3
- return {};
1
+ import { breadcrumbItemSelect as _breadcrumbItemSelect } from './index';
2
+ export var api = ['breadcrumbItemSelect'];
3
+ export var renderless = function renderless(props, _ref, _ref2) {
4
+ var reactive = _ref.reactive,
5
+ provide = _ref.provide;
6
+ var emit = _ref2.emit,
7
+ constants = _ref2.constants,
8
+ emitter = _ref2.emitter;
9
+ var state = reactive({
10
+ breadcrumbEmitter: emitter(),
11
+ currentBreadcrumbItem: {}
12
+ });
13
+ var api = {
14
+ breadcrumbItemSelect: function breadcrumbItemSelect() {
15
+ return _breadcrumbItemSelect({
16
+ api: api,
17
+ emit: emit,
18
+ state: state,
19
+ constants: constants
20
+ });
21
+ }
22
+ };
23
+ provide('breadcrumbEmitter', state.breadcrumbEmitter);
24
+ api.breadcrumbItemSelect();
25
+ return api;
4
26
  };
@@ -0,0 +1,26 @@
1
+ export var linkClick = function linkClick(_ref) {
2
+ var props = _ref.props,
3
+ refs = _ref.refs,
4
+ router = _ref.router,
5
+ emit = _ref.emit,
6
+ breadcrumbEmitter = _ref.breadcrumbEmitter,
7
+ constants = _ref.constants;
8
+ return function (event) {
9
+ var replace = props.replace,
10
+ to = props.to,
11
+ option = props.option;
12
+ var currentBreadcrumbItem = {
13
+ link: refs.link,
14
+ replace: replace,
15
+ to: to,
16
+ event: event,
17
+ option: option
18
+ };
19
+ breadcrumbEmitter.emit(constants.EVENT_NAME.breadcrumbItemSelect, currentBreadcrumbItem);
20
+ emit('select', currentBreadcrumbItem);
21
+ if (!to || !router) {
22
+ return;
23
+ }
24
+ replace ? router.replace(to) : router.push(to);
25
+ };
26
+ };
@@ -1,19 +1,25 @@
1
1
  import { on, off } from '@opentiny/vue-renderless/common/deps/dom';
2
- export var api = [];
2
+ import { linkClick } from './index';
3
+ export var api = ['linkClick'];
3
4
  export var renderless = function renderless(props, _ref, _ref2) {
4
5
  var onMounted = _ref.onMounted,
5
- onBeforeUnmount = _ref.onBeforeUnmount;
6
+ onBeforeUnmount = _ref.onBeforeUnmount,
7
+ inject = _ref.inject;
6
8
  var refs = _ref2.refs,
7
- router = _ref2.router;
9
+ router = _ref2.router,
10
+ emit = _ref2.emit;
11
+ var breadcrumbEmitter = inject('breadcrumbEmitter');
12
+ var breadcrumb = inject('breadcrumb');
13
+ var constants = breadcrumb._constants;
8
14
  var api = {
9
- linkClick: function linkClick() {
10
- var replace = props.replace,
11
- to = props.to;
12
- if (!to || !router) {
13
- return;
14
- }
15
- replace ? router.replace(to) : router.push(to);
16
- }
15
+ linkClick: linkClick({
16
+ props: props,
17
+ refs: refs,
18
+ router: router,
19
+ emit: emit,
20
+ breadcrumbEmitter: breadcrumbEmitter,
21
+ constants: constants
22
+ })
17
23
  };
18
24
  onMounted(function () {
19
25
  on(refs.link, 'click', api.linkClick);
@@ -21,4 +27,7 @@ export var renderless = function renderless(props, _ref, _ref2) {
21
27
  onBeforeUnmount(function () {
22
28
  off(refs.link, 'click', api.linkClick);
23
29
  });
30
+ return {
31
+ api: api
32
+ };
24
33
  };
@@ -16,6 +16,9 @@ export var computedDataList = function computedDataList(_ref) {
16
16
  export var computedMoreLink = function computedMoreLink(_ref2) {
17
17
  var props = _ref2.props;
18
18
  return function () {
19
- return props.moreLink && xss.filterUrl(props.moreLink.url);
19
+ if (props.moreLink) {
20
+ props.moreLink.url = xss.filterUrl(props.moreLink.url);
21
+ }
22
+ return props.moreLink;
20
23
  };
21
24
  };
@@ -1,4 +1,4 @@
1
- import { handleClick, moreNodeClick } from './index';
1
+ import { handleClick } from './index';
2
2
  export var api = ['state', 'handleClick', 'moreNodeClick'];
3
3
  export var renderless = function renderless(props, _ref, _ref2) {
4
4
  var _props$data, _props$data2;
package/calendar/index.js CHANGED
@@ -7,8 +7,8 @@ export var getWeek = function getWeek(year, month, day) {
7
7
  return new Date("".concat(year, "/").concat(month, "/").concat(day)).getDay();
8
8
  };
9
9
  export var lastMonth = function lastMonth(year, month) {
10
- year = +year;
11
- month = +month;
10
+ year = Number(year);
11
+ month = Number(month);
12
12
  if (month === 1) {
13
13
  year--;
14
14
  month = 12;
@@ -21,8 +21,8 @@ export var lastMonth = function lastMonth(year, month) {
21
21
  };
22
22
  };
23
23
  export var nextMonth = function nextMonth(year, month) {
24
- year = +year;
25
- month = +month;
24
+ year = Number(year);
25
+ month = Number(month);
26
26
  if (month === 12) {
27
27
  year++;
28
28
  month = 1;
@@ -133,7 +133,7 @@ export var computedEventList = function computedEventList(_ref2) {
133
133
  var _parseDate = parseDate(item.time),
134
134
  year = _parseDate.year,
135
135
  month = _parseDate.month;
136
- return +state.activeYear === year && +state.activeMonth === month;
136
+ return Number(state.activeYear) === year && Number(state.activeMonth) === month;
137
137
  });
138
138
  }
139
139
  return result;
@@ -170,7 +170,7 @@ export var selectDay = function selectDay(state) {
170
170
  state.activeYear = _year;
171
171
  }
172
172
  state.selectedTip = "You selected date: ".concat(state.activeYear, "-").concat(state.activeMonth, "-").concat(day.value);
173
- state.selectedDate = +new Date("".concat(state.activeYear, "/").concat(state.activeMonth, "/").concat(day.value));
173
+ state.selectedDate = Number(new Date("".concat(state.activeYear, "/").concat(state.activeMonth, "/").concat(day.value)));
174
174
  }
175
175
  };
176
176
  };
@@ -181,7 +181,7 @@ export var getEventByDay = function getEventByDay(state) {
181
181
  events = copyArray(state.eventList).filter(function (_ref3) {
182
182
  var time = _ref3.time;
183
183
  var date = new Date(time);
184
- return date.getDate() === day && date.getFullYear() === +state.activeYear && date.getMonth() + 1 === +state.activeMonth;
184
+ return date.getDate() === day && date.getFullYear() === Number(state.activeYear) && date.getMonth() + 1 === Number(state.activeMonth);
185
185
  }).map(function (event) {
186
186
  event.parseTime = parseDate(event.time);
187
187
  return event;
@@ -199,7 +199,7 @@ export var getEventByMonth = function getEventByMonth(_ref4) {
199
199
  events = copyArray(props.events).filter(function (_ref5) {
200
200
  var time = _ref5.time;
201
201
  var date = new Date(time);
202
- return date.getFullYear() === +state.activeYear && date.getMonth() + 1 === month;
202
+ return date.getFullYear() === Number(state.activeYear) && date.getMonth() + 1 === month;
203
203
  }).map(function (event) {
204
204
  event.parseTime = parseDate(event.time);
205
205
  return event;
@@ -210,7 +210,7 @@ export var getEventByMonth = function getEventByMonth(_ref4) {
210
210
  };
211
211
  export var getTime = function getTime(state) {
212
212
  return function (day) {
213
- return +new Date("".concat(state.activeYear, "/").concat(state.activeMonth, "/").concat(day));
213
+ return Number(new Date("".concat(state.activeYear, "/").concat(state.activeMonth, "/").concat(day)));
214
214
  };
215
215
  };
216
216
  export var getYearList = function getYearList() {
@@ -227,8 +227,8 @@ export var getYearList = function getYearList() {
227
227
  export var isToday = function isToday(state) {
228
228
  return function (day) {
229
229
  var date = new Date();
230
- var year = +state.activeYear;
231
- var month = +state.activeMonth;
230
+ var year = Number(state.activeYear);
231
+ var month = Number(state.activeMonth);
232
232
  if (day.isLast) {
233
233
  var lastDate = lastMonth(state.activeYear, state.activeMonth);
234
234
  year = lastDate.year;
@@ -245,7 +245,7 @@ export var isToday = function isToday(state) {
245
245
  export var isThisMonth = function isThisMonth(state) {
246
246
  return function (month) {
247
247
  var date = new Date();
248
- var year = +state.activeYear;
248
+ var year = Number(state.activeYear);
249
249
  return date.getMonth() + 1 === month && date.getFullYear() === year;
250
250
  };
251
251
  };
@@ -268,12 +268,12 @@ export var toToday = function toToday(state) {
268
268
  state.activeMonth = month;
269
269
  state.activeYear = year;
270
270
  state.selectedTip = "You selected date: ".concat(year, "-").concat(month, "-").concat(day);
271
- state.selectedDate = +new Date("".concat(year, "/").concat(month, "/").concat(day));
271
+ state.selectedDate = Number(new Date("".concat(year, "/").concat(month, "/").concat(day)));
272
272
  };
273
273
  };
274
274
  export var getCurrentDate = function getCurrentDate() {
275
275
  var day = new Date().getDate();
276
276
  var month = new Date().getMonth() + 1;
277
277
  var year = new Date().getFullYear();
278
- return +new Date("".concat(year, "/").concat(month, "/").concat(day));
278
+ return Number(new Date("".concat(year, "/").concat(month, "/").concat(day)));
279
279
  };
@@ -29,7 +29,7 @@ export var computedTools = function computedTools(_ref2) {
29
29
  title: t('ui.base.more'),
30
30
  click: function click() {
31
31
  state.showMoreTools = !state.showMoreTools;
32
- refs['selector'].style.zIndex = PopupManager.nextZIndex();
32
+ refs.selector.style.zIndex = PopupManager.nextZIndex();
33
33
  }
34
34
  });
35
35
  }
package/cascader/index.js CHANGED
@@ -99,7 +99,9 @@ export var watchCheckedValue = function watchCheckedValue(_ref5) {
99
99
  };
100
100
  };
101
101
  export var isEmpty = function isEmpty(val) {
102
- if (isNull(val)) return true;
102
+ if (isNull(val)) {
103
+ return true;
104
+ }
103
105
  if (typeof val === 'boolean') {
104
106
  return false;
105
107
  }
@@ -165,7 +167,9 @@ export var toggleDropDownVisible = function toggleDropDownVisible(_ref7) {
165
167
  state = _ref7.state,
166
168
  updatePopper = _ref7.updatePopper;
167
169
  return function (visible) {
168
- if (state.isDisabled) return;
170
+ if (state.isDisabled) {
171
+ return;
172
+ }
169
173
  var input = refs.input;
170
174
  visible = !isNull(visible) ? visible : !state.dropDownVisible;
171
175
  if (visible !== state.dropDownVisible) {
@@ -229,7 +233,9 @@ export var handleInput = function handleInput(_ref10) {
229
233
  refs = _ref10.refs;
230
234
  return function (val, event) {
231
235
  event = event || window.event;
232
- if (!event) return;
236
+ if (!event) {
237
+ return;
238
+ }
233
239
  var reference = refs.reference;
234
240
  var key = 'init-flag';
235
241
  var value = 'true';
@@ -240,7 +246,9 @@ export var handleInput = function handleInput(_ref10) {
240
246
  }
241
247
  !state.dropDownVisible && api.toggleDropDownVisible(true);
242
248
  state.presentText = val;
243
- if (event && event.isComposing) return;
249
+ if (event && event.isComposing) {
250
+ return;
251
+ }
244
252
  if (val) {
245
253
  api.filterHandler();
246
254
  } else {
@@ -361,7 +369,9 @@ export var getSuggestions = function getSuggestions(_ref15) {
361
369
  filterMethod = props.filterMethod;
362
370
  }
363
371
  var suggestions = state.panel.getFlattedNodes(state.leafOnly).filter(function (node) {
364
- if (node.isDisabled) return false;
372
+ if (node.isDisabled) {
373
+ return false;
374
+ }
365
375
  node.text = node.getText(props.showAllLevels, props.separator) || '';
366
376
  return filterMethod(node, state.inputValue);
367
377
  });
@@ -385,7 +395,9 @@ export var handleSuggestionKeyDown = function handleSuggestionKeyDown(_ref16) {
385
395
  var api = _ref16.api;
386
396
  return function (event) {
387
397
  event = event || window.event;
388
- if (!event) return;
398
+ if (!event) {
399
+ return;
400
+ }
389
401
  var _event = event,
390
402
  keyCode = _event.keyCode,
391
403
  target = _event.target;
@@ -409,7 +421,9 @@ export var handleDelete = function handleDelete(_ref17) {
409
421
  var lastIndex = state.presentTags.length - 1;
410
422
  var lastTag = state.presentTags[lastIndex];
411
423
  state.pressDeleteCount = state.inputValue ? 0 : state.pressDeleteCount + 1;
412
- if (!lastTag) return;
424
+ if (!lastTag) {
425
+ return;
426
+ }
413
427
  if (state.pressDeleteCount) {
414
428
  if (lastTag.hitState) {
415
429
  api.deleteTag(lastIndex);
package/cascader/vue.js CHANGED
@@ -267,8 +267,7 @@ export var renderless = function renderless(props, _ref4, _ref5) {
267
267
  reactive = _ref4.reactive,
268
268
  toRefs = _ref4.toRefs,
269
269
  watch = _ref4.watch,
270
- inject = _ref4.inject,
271
- provide = _ref4.provide;
270
+ inject = _ref4.inject;
272
271
  var t = _ref5.t,
273
272
  refs = _ref5.refs,
274
273
  emit = _ref5.emit,
@@ -25,7 +25,9 @@ export var handleExpand = function handleExpand(_ref2) {
25
25
  }
26
26
  if (state.config.lazy && !props.node.loaded) {
27
27
  parent.lazyLoad(props.node, function () {
28
- if (!state.isLeaf) api.handleExpand();
28
+ if (!state.isLeaf) {
29
+ api.handleExpand();
30
+ }
29
31
  if (multiple) {
30
32
  var checked = state.isLeaf ? props.node.checked : false;
31
33
  api.handleMultiCheckChange(checked);