@douyinfe/semi-foundation 2.40.0-alpha.0 → 2.40.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/anchor/foundation.ts +0 -2
- package/anchor/linkFoundation.ts +0 -1
- package/autoComplete/foundation.ts +0 -1
- package/autoComplete/optionFoundation.ts +0 -2
- package/avatar/constants.ts +21 -4
- package/avatar/foundation.ts +3 -3
- package/base/foundation.ts +0 -1
- package/breadcrumb/foundation.ts +0 -1
- package/button/button.scss +0 -1
- package/calendar/eventUtil.ts +0 -2
- package/calendar/foundation.ts +0 -1
- package/cascader/foundation.ts +0 -5
- package/checkbox/checkbox.scss +0 -1
- package/checkbox/checkboxFoundation.ts +1 -2
- package/checkbox/checkboxGroupFoundation.ts +0 -1
- package/datePicker/foundation.ts +1 -4
- package/datePicker/inputFoundation.ts +0 -3
- package/datePicker/monthFoundation.ts +0 -1
- package/datePicker/monthsGridFoundation.ts +0 -2
- package/datePicker/yearAndMonthFoundation.ts +0 -2
- package/form/foundation.ts +12 -10
- package/form/interface.ts +4 -5
- package/form/utils.ts +0 -3
- package/image/image.scss +8 -4
- package/image/previewImageFoundation.ts +1 -1
- package/image/previewInnerFoundation.ts +11 -7
- package/image/variables.scss +1 -1
- package/input/foundation.ts +0 -2
- package/input/textareaFoundation.ts +0 -2
- package/inputNumber/foundation.ts +0 -5
- package/lib/cjs/anchor/foundation.js +0 -2
- package/lib/cjs/anchor/linkFoundation.js +0 -1
- package/lib/cjs/autoComplete/foundation.js +0 -2
- package/lib/cjs/autoComplete/optionFoundation.js +0 -2
- package/lib/cjs/avatar/constants.js +0 -1
- package/lib/cjs/avatar/foundation.js +2 -2
- package/lib/cjs/breadcrumb/foundation.js +0 -2
- package/lib/cjs/button/button.css +0 -1
- package/lib/cjs/button/button.scss +0 -1
- package/lib/cjs/calendar/eventUtil.js +0 -2
- package/lib/cjs/calendar/foundation.js +0 -1
- package/lib/cjs/cascader/foundation.js +0 -5
- package/lib/cjs/checkbox/checkbox.css +0 -1
- package/lib/cjs/checkbox/checkbox.scss +0 -1
- package/lib/cjs/checkbox/checkboxFoundation.js +0 -1
- package/lib/cjs/checkbox/checkboxGroupFoundation.js +0 -1
- package/lib/cjs/datePicker/foundation.js +0 -5
- package/lib/cjs/datePicker/inputFoundation.js +0 -4
- package/lib/cjs/datePicker/monthFoundation.js +0 -1
- package/lib/cjs/datePicker/monthsGridFoundation.js +0 -3
- package/lib/cjs/datePicker/yearAndMonthFoundation.js +0 -2
- package/lib/cjs/form/foundation.d.ts +4 -4
- package/lib/cjs/form/foundation.js +9 -8
- package/lib/cjs/form/interface.d.ts +4 -4
- package/lib/cjs/form/utils.js +0 -3
- package/lib/cjs/image/image.css +3 -1
- package/lib/cjs/image/image.scss +8 -4
- package/lib/cjs/image/previewInnerFoundation.d.ts +4 -2
- package/lib/cjs/image/previewInnerFoundation.js +2 -1
- package/lib/cjs/image/variables.scss +1 -1
- package/lib/cjs/input/foundation.js +0 -2
- package/lib/cjs/input/textareaFoundation.js +0 -2
- package/lib/cjs/inputNumber/foundation.js +0 -6
- package/lib/cjs/navigation/NavItem.js +0 -2
- package/lib/cjs/navigation/foundation.js +1 -4
- package/lib/cjs/navigation/itemFoundation.js +0 -1
- package/lib/cjs/navigation/subNavFoundation.js +1 -2
- package/lib/cjs/notification/notificationListFoundation.js +0 -2
- package/lib/cjs/pagination/foundation.d.ts +2 -0
- package/lib/cjs/pagination/foundation.js +16 -4
- package/lib/cjs/popconfirm/popconfirmFoundation.js +0 -2
- package/lib/cjs/radio/radio.css +1 -0
- package/lib/cjs/radio/radio.scss +1 -0
- package/lib/cjs/radio/radioGroupFoundation.js +0 -1
- package/lib/cjs/radio/radioInnerFoundation.js +0 -1
- package/lib/cjs/radio/variables.scss +1 -0
- package/lib/cjs/rating/foundation.js +0 -2
- package/lib/cjs/select/foundation.js +0 -5
- package/lib/cjs/select/optionFoundation.js +0 -2
- package/lib/cjs/select/select.css +0 -35
- package/lib/cjs/select/select.scss +11 -63
- package/lib/cjs/select/variables.scss +0 -10
- package/lib/cjs/skeleton/skeleton.css +2 -2
- package/lib/cjs/skeleton/variables.scss +2 -2
- package/lib/cjs/slider/foundation.js +0 -8
- package/lib/cjs/switch/foundation.js +0 -1
- package/lib/cjs/table/bodyFoundation.js +0 -1
- package/lib/cjs/table/constants.js +0 -2
- package/lib/cjs/table/foundation.js +0 -9
- package/lib/cjs/table/tableRowFoundation.js +0 -1
- package/lib/cjs/table/utils.js +0 -4
- package/lib/cjs/tag/constants.js +0 -2
- package/lib/cjs/tagInput/foundation.js +0 -2
- package/lib/cjs/timePicker/foundation.js +6 -8
- package/lib/cjs/timePicker/inputFoundation.js +0 -2
- package/lib/cjs/timePicker/utils/index.js +2 -2
- package/lib/cjs/tooltip/foundation.js +0 -11
- package/lib/cjs/transfer/foundation.js +0 -1
- package/lib/cjs/tree/foundation.js +0 -1
- package/lib/cjs/tree/treeUtil.js +0 -9
- package/lib/cjs/treeSelect/foundation.js +0 -1
- package/lib/cjs/upload/foundation.js +3 -1
- package/lib/cjs/utils/Event.js +0 -1
- package/lib/cjs/utils/date-fns-extra.js +0 -3
- package/lib/cjs/utils/function.js +0 -1
- package/lib/cjs/utils/object.js +0 -4
- package/lib/es/anchor/foundation.js +0 -2
- package/lib/es/anchor/linkFoundation.js +0 -1
- package/lib/es/autoComplete/foundation.js +0 -1
- package/lib/es/autoComplete/optionFoundation.js +0 -2
- package/lib/es/avatar/constants.js +0 -1
- package/lib/es/avatar/foundation.js +2 -2
- package/lib/es/breadcrumb/foundation.js +0 -1
- package/lib/es/button/button.css +0 -1
- package/lib/es/button/button.scss +0 -1
- package/lib/es/calendar/eventUtil.js +0 -2
- package/lib/es/calendar/foundation.js +0 -1
- package/lib/es/cascader/foundation.js +0 -5
- package/lib/es/checkbox/checkbox.css +0 -1
- package/lib/es/checkbox/checkbox.scss +0 -1
- package/lib/es/checkbox/checkboxFoundation.js +0 -1
- package/lib/es/checkbox/checkboxGroupFoundation.js +0 -1
- package/lib/es/datePicker/foundation.js +0 -4
- package/lib/es/datePicker/inputFoundation.js +0 -3
- package/lib/es/datePicker/monthFoundation.js +0 -1
- package/lib/es/datePicker/monthsGridFoundation.js +0 -2
- package/lib/es/datePicker/yearAndMonthFoundation.js +0 -2
- package/lib/es/form/foundation.d.ts +4 -4
- package/lib/es/form/foundation.js +9 -7
- package/lib/es/form/interface.d.ts +4 -4
- package/lib/es/form/utils.js +0 -3
- package/lib/es/image/image.css +3 -1
- package/lib/es/image/image.scss +8 -4
- package/lib/es/image/previewInnerFoundation.d.ts +4 -2
- package/lib/es/image/previewInnerFoundation.js +2 -1
- package/lib/es/image/variables.scss +1 -1
- package/lib/es/input/foundation.js +0 -2
- package/lib/es/input/textareaFoundation.js +0 -2
- package/lib/es/inputNumber/foundation.js +0 -5
- package/lib/es/navigation/NavItem.js +0 -2
- package/lib/es/navigation/foundation.js +1 -3
- package/lib/es/navigation/itemFoundation.js +0 -1
- package/lib/es/navigation/subNavFoundation.js +1 -2
- package/lib/es/notification/notificationListFoundation.js +0 -1
- package/lib/es/pagination/foundation.d.ts +2 -0
- package/lib/es/pagination/foundation.js +16 -3
- package/lib/es/popconfirm/popconfirmFoundation.js +0 -1
- package/lib/es/radio/radio.css +1 -0
- package/lib/es/radio/radio.scss +1 -0
- package/lib/es/radio/radioGroupFoundation.js +0 -1
- package/lib/es/radio/radioInnerFoundation.js +0 -1
- package/lib/es/radio/variables.scss +1 -0
- package/lib/es/rating/foundation.js +0 -1
- package/lib/es/select/foundation.js +0 -5
- package/lib/es/select/optionFoundation.js +0 -2
- package/lib/es/select/select.css +0 -35
- package/lib/es/select/select.scss +11 -63
- package/lib/es/select/variables.scss +0 -10
- package/lib/es/skeleton/skeleton.css +2 -2
- package/lib/es/skeleton/variables.scss +2 -2
- package/lib/es/slider/foundation.js +0 -7
- package/lib/es/switch/foundation.js +0 -1
- package/lib/es/table/bodyFoundation.js +0 -1
- package/lib/es/table/constants.js +0 -1
- package/lib/es/table/foundation.js +0 -8
- package/lib/es/table/tableRowFoundation.js +0 -1
- package/lib/es/table/utils.js +0 -3
- package/lib/es/tag/constants.js +0 -1
- package/lib/es/tagInput/foundation.js +0 -2
- package/lib/es/timePicker/foundation.js +6 -7
- package/lib/es/timePicker/inputFoundation.js +0 -2
- package/lib/es/timePicker/utils/index.js +2 -1
- package/lib/es/tooltip/foundation.js +0 -10
- package/lib/es/transfer/foundation.js +0 -1
- package/lib/es/tree/foundation.js +0 -1
- package/lib/es/tree/treeUtil.js +0 -9
- package/lib/es/treeSelect/foundation.js +0 -1
- package/lib/es/upload/foundation.js +3 -1
- package/lib/es/utils/Event.js +0 -1
- package/lib/es/utils/date-fns-extra.js +0 -2
- package/lib/es/utils/function.js +0 -1
- package/lib/es/utils/object.js +0 -3
- package/modal/modalFoundation.ts +3 -4
- package/navigation/NavItem.ts +0 -2
- package/navigation/foundation.ts +1 -3
- package/navigation/itemFoundation.ts +0 -1
- package/navigation/subNavFoundation.ts +1 -2
- package/notification/notificationListFoundation.ts +0 -2
- package/package.json +3 -3
- package/pagination/foundation.ts +13 -3
- package/popconfirm/popconfirmFoundation.ts +0 -1
- package/radio/radio.scss +1 -0
- package/radio/radioGroupFoundation.ts +0 -1
- package/radio/radioInnerFoundation.ts +0 -1
- package/radio/variables.scss +1 -0
- package/rating/foundation.ts +0 -1
- package/select/foundation.ts +0 -5
- package/select/optionFoundation.ts +0 -2
- package/select/select.scss +11 -63
- package/select/variables.scss +0 -10
- package/skeleton/variables.scss +2 -2
- package/slider/foundation.ts +0 -7
- package/switch/foundation.ts +0 -1
- package/table/bodyFoundation.ts +0 -1
- package/table/constants.ts +0 -1
- package/table/foundation.ts +0 -8
- package/table/tableRowFoundation.ts +0 -1
- package/table/utils.ts +0 -3
- package/tag/constants.ts +19 -2
- package/tagInput/foundation.ts +0 -2
- package/timePicker/foundation.ts +7 -8
- package/timePicker/inputFoundation.ts +0 -2
- package/timePicker/utils/index.ts +2 -1
- package/toast/toastFoundation.ts +1 -4
- package/toast/toastListFoundation.ts +0 -1
- package/tooltip/foundation.ts +0 -10
- package/transfer/foundation.ts +0 -1
- package/tree/foundation.ts +0 -1
- package/tree/treeUtil.ts +1 -10
- package/treeSelect/foundation.ts +0 -1
- package/upload/foundation.ts +3 -1
- package/utils/Event.ts +0 -1
- package/utils/date-fns-extra.ts +0 -2
- package/utils/function.ts +0 -1
- package/utils/object.ts +0 -3
|
@@ -7,8 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
var _foundation = _interopRequireDefault(require("../base/foundation"));
|
|
8
8
|
var _isEnterPress = _interopRequireDefault(require("../utils/isEnterPress"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
/* eslint-disable prefer-const */
|
|
11
|
-
|
|
12
10
|
class BreadcrumbFoundation extends _foundation.default {
|
|
13
11
|
constructor(adapter) {
|
|
14
12
|
super(Object.assign({}, adapter));
|
|
@@ -237,7 +237,6 @@ const filterEvents = (events, start, end) => {
|
|
|
237
237
|
* @returns {arr}
|
|
238
238
|
* filter out event that is not in the week range
|
|
239
239
|
*/
|
|
240
|
-
// eslint-disable-next-line max-len
|
|
241
240
|
exports.filterEvents = filterEvents;
|
|
242
241
|
const filterWeeklyEvents = (events, weekStart, weekStartsOn) => filterEvents(events, weekStart, (0, _dateFns.addDays)((0, _dateFns.endOfWeek)(weekStart, {
|
|
243
242
|
weekStartsOn
|
|
@@ -306,7 +305,6 @@ const collectDailyEvents = events => {
|
|
|
306
305
|
};
|
|
307
306
|
exports.collectDailyEvents = collectDailyEvents;
|
|
308
307
|
const renderDailyEvent = event => {
|
|
309
|
-
// eslint-disable-next-line prefer-const
|
|
310
308
|
let {
|
|
311
309
|
start,
|
|
312
310
|
end,
|
|
@@ -12,7 +12,6 @@ class CalendarFoundation extends _foundation.default {
|
|
|
12
12
|
constructor(adapter) {
|
|
13
13
|
super(Object.assign({}, adapter));
|
|
14
14
|
}
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
16
15
|
init() {}
|
|
17
16
|
destroy() {
|
|
18
17
|
this.raf && cancelAnimationFrame(this.raf);
|
|
@@ -20,7 +20,6 @@ var _util = require("./util");
|
|
|
20
20
|
var _constants = require("./constants");
|
|
21
21
|
var _isEnterPress = _interopRequireDefault(require("../utils/isEnterPress"));
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
// eslint-disable-next-line max-len
|
|
24
23
|
class CascaderFoundation extends _foundation.default {
|
|
25
24
|
constructor(adapter) {
|
|
26
25
|
super(Object.assign({}, adapter));
|
|
@@ -55,7 +54,6 @@ class CascaderFoundation extends _foundation.default {
|
|
|
55
54
|
const valueProp = onChangeWithObject ? [] : 'value';
|
|
56
55
|
if (multiple) {
|
|
57
56
|
const valuePath = [];
|
|
58
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
59
57
|
// @ts-ignore
|
|
60
58
|
item.forEach(checkedKey => {
|
|
61
59
|
const valuePathItem = this.getItemPropPath(checkedKey, valueProp);
|
|
@@ -122,9 +120,7 @@ class CascaderFoundation extends _foundation.default {
|
|
|
122
120
|
if ((0, _isEmpty2.default)(keyEntities[selectedKey])) {
|
|
123
121
|
if ((0, _includes2.default)(selectedKey, 'not-exist-')) {
|
|
124
122
|
/* Get the value behind not-exist- */
|
|
125
|
-
// eslint-disable-next-line prefer-destructuring
|
|
126
123
|
const targetValue = selectedKey.match(/not-exist-(\S*)/)[1];
|
|
127
|
-
// eslint-disable-next-line max-depth
|
|
128
124
|
if ((0, _isEmpty2.default)(keyEntities[targetValue])) {
|
|
129
125
|
cacheValue = targetValue;
|
|
130
126
|
} else {
|
|
@@ -812,7 +808,6 @@ class CascaderFoundation extends _foundation.default {
|
|
|
812
808
|
return this.getFilteredData();
|
|
813
809
|
}
|
|
814
810
|
return Object.values(keyEntities).filter(item => item.parentKey === null && !item._notExist)
|
|
815
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
816
811
|
// @ts-ignore
|
|
817
812
|
.sort((a, b) => parseInt(a.ind, 10) - parseInt(b.ind, 10));
|
|
818
813
|
}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
position: relative;
|
|
7
7
|
display: flex;
|
|
8
8
|
align-items: flex-start;
|
|
9
|
-
flex-wrap: wrap;
|
|
10
9
|
font-size: 14px;
|
|
11
10
|
line-height: 20px;
|
|
12
11
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
@@ -12,7 +12,6 @@ $module: #{$prefix}-checkbox;
|
|
|
12
12
|
position: relative;
|
|
13
13
|
display: flex;
|
|
14
14
|
align-items: flex-start;
|
|
15
|
-
flex-wrap: wrap;
|
|
16
15
|
@include font-size-regular;
|
|
17
16
|
cursor: pointer;
|
|
18
17
|
transition: background-color $transition_duration-checkbox-bg $transition_function-checkbox-bg $transition_delay-checkbox-bg,
|
|
@@ -96,7 +96,6 @@ class CheckboxFoundation extends _foundation.default {
|
|
|
96
96
|
setChecked(checked) {
|
|
97
97
|
this._adapter.setNativeControlChecked(checked);
|
|
98
98
|
}
|
|
99
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
100
99
|
destroy() {}
|
|
101
100
|
}
|
|
102
101
|
var _default = CheckboxFoundation;
|
|
@@ -66,7 +66,6 @@ class CheckboxGroupFoundation extends _foundation.default {
|
|
|
66
66
|
(0, _warning.default)(true, 'Warning: [Semi CheckboxGroup] value should be an Array');
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
70
69
|
destroy() {}
|
|
71
70
|
}
|
|
72
71
|
var _default = CheckboxGroupFoundation;
|
|
@@ -22,9 +22,6 @@ var _getInsetInputFormatToken = _interopRequireDefault(require("./_utils/getInse
|
|
|
22
22
|
var _getInsetInputValueFromInsetInputStr = _interopRequireDefault(require("./_utils/getInsetInputValueFromInsetInputStr"));
|
|
23
23
|
var _isValidTimeZone = _interopRequireDefault(require("./_utils/isValidTimeZone"));
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
/* eslint-disable no-nested-ternary */
|
|
26
|
-
/* eslint-disable max-len, max-depth, */
|
|
27
|
-
|
|
28
25
|
/**
|
|
29
26
|
* The datePicker foundation.js is responsible for maintaining the date value and the input box value, as well as the callback of both
|
|
30
27
|
* task 1. Accept the selected date change, update the date value, and update the input box value according to the date = > Notify the change
|
|
@@ -388,7 +385,6 @@ class DatePickerFoundation extends _foundation.default {
|
|
|
388
385
|
* @param {String} input
|
|
389
386
|
* @param {Event} e
|
|
390
387
|
*/
|
|
391
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
392
388
|
handleInputBlur() {
|
|
393
389
|
let input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
394
390
|
let e = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -441,7 +437,6 @@ class DatePickerFoundation extends _foundation.default {
|
|
|
441
437
|
this._adapter.setRangeInputFocus(false);
|
|
442
438
|
this._adapter.notifyClear(e);
|
|
443
439
|
}
|
|
444
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
445
440
|
handleRangeInputBlur(value, e) {}
|
|
446
441
|
// Parses input only after user returns
|
|
447
442
|
handleInputComplete() {
|
|
@@ -19,17 +19,13 @@ var _getDefaultPickerDate = _interopRequireDefault(require("./_utils/getDefaultP
|
|
|
19
19
|
var _parser = require("./_utils/parser");
|
|
20
20
|
var _utils = require("./_utils");
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
-
/* eslint-disable max-len */
|
|
23
|
-
|
|
24
22
|
const KEY_CODE_ENTER = 'Enter';
|
|
25
23
|
const KEY_CODE_TAB = 'Tab';
|
|
26
24
|
class InputFoundation extends _foundation.default {
|
|
27
25
|
constructor(adapter) {
|
|
28
26
|
super(Object.assign({}, adapter));
|
|
29
27
|
}
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
31
28
|
init() {}
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
33
29
|
destroy() {}
|
|
34
30
|
handleClick(e) {
|
|
35
31
|
this._adapter.notifyClick(e);
|
|
@@ -17,8 +17,6 @@ var _dateFnsExtra = require("../utils/date-fns-extra");
|
|
|
17
17
|
var _getDefaultFormatToken = require("./_utils/getDefaultFormatToken");
|
|
18
18
|
var _isValidTimeZone = _interopRequireDefault(require("./_utils/isValidTimeZone"));
|
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
/* eslint-disable max-len */
|
|
21
|
-
|
|
22
20
|
const dateDiffFns = {
|
|
23
21
|
month: _dateFns.differenceInCalendarMonths,
|
|
24
22
|
year: _dateFns.differenceInCalendarYears
|
|
@@ -189,7 +187,6 @@ class MonthsGridFoundation extends _foundation.default {
|
|
|
189
187
|
_initDateTimeRangePickerFormValue(values) {
|
|
190
188
|
this._initDateRangePickerFromValue(values, true);
|
|
191
189
|
}
|
|
192
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
193
190
|
destroy() {}
|
|
194
191
|
/**
|
|
195
192
|
* sync change another panel month when change months from the else yam panel
|
|
@@ -13,9 +13,7 @@ class YearAndMonthFoundation extends _foundation.default {
|
|
|
13
13
|
constructor(adapter) {
|
|
14
14
|
super(Object.assign({}, adapter));
|
|
15
15
|
}
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17
16
|
init() {}
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
19
17
|
destroy() {}
|
|
20
18
|
selectYear(item, panelType) {
|
|
21
19
|
// const year = item.value;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import BaseFoundation from '../base/foundation';
|
|
2
|
-
import { Options as
|
|
2
|
+
import { Options as ScrollIntoViewOptions } from 'scroll-into-view-if-needed';
|
|
3
3
|
import { BaseFormAdapter, FormState, CallOpts, FieldState, FieldStaff, ComponentProps, setValuesConfig, ArrayFieldStaff } from './interface';
|
|
4
4
|
export type { BaseFormAdapter };
|
|
5
5
|
export default class FormFoundation extends BaseFoundation<BaseFormAdapter> {
|
|
@@ -19,7 +19,7 @@ export default class FormFoundation extends BaseFoundation<BaseFormAdapter> {
|
|
|
19
19
|
validate(fieldPaths?: Array<string>): Promise<unknown>;
|
|
20
20
|
_formValidate(): Promise<unknown>;
|
|
21
21
|
_fieldsValidate(fieldPaths: Array<string>): Promise<unknown>;
|
|
22
|
-
submit(): void;
|
|
22
|
+
submit(e?: any): void;
|
|
23
23
|
/**
|
|
24
24
|
* Case A:
|
|
25
25
|
* All fields: a[0]、a[1]、b.type、b.name[2]、b.name[0]
|
|
@@ -95,6 +95,6 @@ export default class FormFoundation extends BaseFoundation<BaseFormAdapter> {
|
|
|
95
95
|
getFormProps(keys?: Array<string>): ComponentProps;
|
|
96
96
|
getFieldExist(field: string): boolean;
|
|
97
97
|
_autoScroll(timeout?: boolean | number): void;
|
|
98
|
-
_getErrorFieldAndScroll(scrollOpts?:
|
|
99
|
-
scrollToField(field: string, scrollOpts?:
|
|
98
|
+
_getErrorFieldAndScroll(scrollOpts?: ScrollIntoViewOptions | boolean): void;
|
|
99
|
+
scrollToField(field: string, scrollOpts?: ScrollIntoViewOptions<any>): void;
|
|
100
100
|
}
|
|
@@ -15,8 +15,6 @@ var _scrollIntoViewIfNeeded = _interopRequireDefault(require("scroll-into-view-i
|
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
/* eslint-disable prefer-const, max-len */
|
|
19
|
-
|
|
20
18
|
class FormFoundation extends _foundation.default {
|
|
21
19
|
constructor(adapter) {
|
|
22
20
|
super(Object.assign({}, adapter));
|
|
@@ -163,13 +161,15 @@ class FormFoundation extends _foundation.default {
|
|
|
163
161
|
maybePromisedErrors = errors;
|
|
164
162
|
}
|
|
165
163
|
if (!maybePromisedErrors) {
|
|
166
|
-
|
|
164
|
+
const _values = this._adapter.cloneDeep(values);
|
|
165
|
+
resolve(_values);
|
|
167
166
|
this.injectErrorToField({});
|
|
168
167
|
} else if ((0, _isPromise.default)(maybePromisedErrors)) {
|
|
169
168
|
maybePromisedErrors.then(result => {
|
|
170
169
|
// validate success,clear error
|
|
171
170
|
if (!result) {
|
|
172
|
-
|
|
171
|
+
const _values = this._adapter.cloneDeep(values);
|
|
172
|
+
resolve(_values);
|
|
173
173
|
this.injectErrorToField({});
|
|
174
174
|
} else {
|
|
175
175
|
this.data.errors = result;
|
|
@@ -223,7 +223,8 @@ class FormFoundation extends _foundation.default {
|
|
|
223
223
|
this._adapter.forceUpdate();
|
|
224
224
|
const errors = this.getError();
|
|
225
225
|
if (this._isValid(targetFields)) {
|
|
226
|
-
|
|
226
|
+
const _values = this._adapter.cloneDeep(values);
|
|
227
|
+
resolve(_values);
|
|
227
228
|
} else {
|
|
228
229
|
this._autoScroll();
|
|
229
230
|
reject(errors);
|
|
@@ -231,7 +232,7 @@ class FormFoundation extends _foundation.default {
|
|
|
231
232
|
});
|
|
232
233
|
});
|
|
233
234
|
}
|
|
234
|
-
submit() {
|
|
235
|
+
submit(e) {
|
|
235
236
|
const {
|
|
236
237
|
values
|
|
237
238
|
} = this.data;
|
|
@@ -239,11 +240,11 @@ class FormFoundation extends _foundation.default {
|
|
|
239
240
|
this.validate().then(resolveValues => {
|
|
240
241
|
// if valid do submit
|
|
241
242
|
const _values = this._adapter.cloneDeep(resolveValues);
|
|
242
|
-
this._adapter.notifySubmit(_values);
|
|
243
|
+
this._adapter.notifySubmit(_values, e);
|
|
243
244
|
}).catch(errors => {
|
|
244
245
|
const _errors = this._adapter.cloneDeep(errors);
|
|
245
246
|
const _values = this._adapter.cloneDeep(values);
|
|
246
|
-
this._adapter.notifySubmitFail(_errors, _values);
|
|
247
|
+
this._adapter.notifySubmitFail(_errors, _values, e);
|
|
247
248
|
});
|
|
248
249
|
}
|
|
249
250
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DefaultAdapter } from '../base/foundation';
|
|
2
|
-
import { Options as
|
|
2
|
+
import { Options as ScrollIntoViewOptions } from 'scroll-into-view-if-needed';
|
|
3
3
|
export type BasicTriggerType = 'blur' | 'change' | 'custom' | 'mount';
|
|
4
4
|
export type FieldValidateTriggerType = BasicTriggerType | Array<BasicTriggerType>;
|
|
5
5
|
export type CommonFieldError = boolean | string | Array<any> | undefined | unknown;
|
|
6
6
|
export type BasicFieldError = Array<any>;
|
|
7
7
|
export interface BaseFormAdapter<P = Record<string, any>, S = Record<string, any>, Values extends object = any> extends DefaultAdapter<P, S> {
|
|
8
8
|
cloneDeep: (val: any, ...rest: any[]) => any;
|
|
9
|
-
notifySubmit: (values: any) => void;
|
|
10
|
-
notifySubmitFail: (errors: Record<keyof Values, BasicFieldError>, values: Partial<Values
|
|
9
|
+
notifySubmit: (values: any, e?: any) => void;
|
|
10
|
+
notifySubmitFail: (errors: Record<keyof Values, BasicFieldError>, values: Partial<Values>, e?: any) => void;
|
|
11
11
|
forceUpdate: (callback?: () => void) => void;
|
|
12
12
|
notifyChange: (formState: FormState) => void;
|
|
13
13
|
notifyValueChange: (values: any, changedValues: any) => void;
|
|
@@ -61,7 +61,7 @@ export interface BaseFormApi<T extends object = any> {
|
|
|
61
61
|
getValues: () => T;
|
|
62
62
|
/** set value of multiple fields */
|
|
63
63
|
setValues: (fieldsValue: Partial<T>, config?: setValuesConfig) => void;
|
|
64
|
-
scrollToField: <K extends keyof T>(field: K, scrollConfig?:
|
|
64
|
+
scrollToField: <K extends keyof T>(field: K, scrollConfig?: ScrollIntoViewOptions) => void;
|
|
65
65
|
}
|
|
66
66
|
export interface CallOpts {
|
|
67
67
|
[x: string]: any;
|
package/lib/cjs/form/utils.js
CHANGED
|
@@ -20,9 +20,6 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
/* eslint-disable prefer-destructuring */
|
|
24
|
-
/* eslint-disable prefer-const */
|
|
25
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
26
23
|
/**
|
|
27
24
|
*
|
|
28
25
|
* @param WrappedComponent React.ComponentType | any
|
package/lib/cjs/image/image.css
CHANGED
|
@@ -109,9 +109,11 @@
|
|
|
109
109
|
.semi-image-preview-footer {
|
|
110
110
|
display: flex;
|
|
111
111
|
align-items: center;
|
|
112
|
+
}
|
|
113
|
+
.semi-image-preview-footer-content {
|
|
112
114
|
padding: 0 16px;
|
|
113
115
|
background: rgba(0, 0, 0, 0.75);
|
|
114
|
-
border-radius:
|
|
116
|
+
border-radius: var(--semi-border-radius-medium);
|
|
115
117
|
height: 48px;
|
|
116
118
|
}
|
|
117
119
|
.semi-image-preview-footer-wrapper {
|
package/lib/cjs/image/image.scss
CHANGED
|
@@ -123,10 +123,14 @@ $module: #{$prefix}-image;
|
|
|
123
123
|
&-footer {
|
|
124
124
|
display: flex;
|
|
125
125
|
align-items: center;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
|
|
127
|
+
&-content {
|
|
128
|
+
padding: $spacing-image_preview_footer-paddingY $spacing-image_preview_footer-paddingX;
|
|
129
|
+
background: $color-image_preview_footer-bg;
|
|
130
|
+
border-radius: $radius-image_preview_footer;
|
|
131
|
+
height: $height-image_preview_footer;
|
|
132
|
+
}
|
|
133
|
+
|
|
130
134
|
|
|
131
135
|
&-wrapper {
|
|
132
136
|
position: absolute;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import BaseFoundation, { DefaultAdapter } from "../base/foundation";
|
|
2
|
+
export type RatioType = "adaptation" | "realSize";
|
|
2
3
|
export interface PreviewInnerAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
|
|
3
4
|
getIsInGroup: () => boolean;
|
|
4
5
|
notifyChange: (index: number, direction: string) => void;
|
|
5
6
|
notifyZoom: (zoom: number, increase: boolean) => void;
|
|
6
7
|
notifyClose: () => void;
|
|
7
8
|
notifyVisibleChange: (visible: boolean) => void;
|
|
8
|
-
notifyRatioChange: (type:
|
|
9
|
+
notifyRatioChange: (type: RatioType) => void;
|
|
9
10
|
notifyRotateChange: (angle: number) => void;
|
|
10
11
|
notifyDownload: (src: string, index: number) => void;
|
|
11
12
|
registerKeyDownListener: () => void;
|
|
@@ -21,6 +22,7 @@ export interface PreviewInnerAdapter<P = Record<string, any>, S = Record<string,
|
|
|
21
22
|
setMouseActiveTime: (time: number) => void;
|
|
22
23
|
disabledBodyScroll: () => void;
|
|
23
24
|
enabledBodyScroll: () => void;
|
|
25
|
+
getSetDownloadFunc: () => (src: string) => string;
|
|
24
26
|
}
|
|
25
27
|
export default class PreviewInnerFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<PreviewInnerAdapter<P, S>, P, S> {
|
|
26
28
|
constructor(adapter: PreviewInnerAdapter<P, S>);
|
|
@@ -35,7 +37,7 @@ export default class PreviewInnerFoundation<P = Record<string, any>, S = Record<
|
|
|
35
37
|
handleSwitchImage: (direction: string) => void;
|
|
36
38
|
handleDownload: () => void;
|
|
37
39
|
handlePreviewClose: () => void;
|
|
38
|
-
handleAdjustRatio: (type:
|
|
40
|
+
handleAdjustRatio: (type: RatioType) => void;
|
|
39
41
|
handleRotateImage: (direction: string) => void;
|
|
40
42
|
handleZoomImage: (newZoom: number) => void;
|
|
41
43
|
preloadGapImage: () => void;
|
|
@@ -115,8 +115,9 @@ class PreviewInnerFoundation extends _foundation.default {
|
|
|
115
115
|
currentIndex,
|
|
116
116
|
imgSrc
|
|
117
117
|
} = this.getStates();
|
|
118
|
+
const setDownloadName = this._adapter.getSetDownloadFunc();
|
|
118
119
|
const downloadSrc = imgSrc[currentIndex];
|
|
119
|
-
const downloadName = downloadSrc.slice(downloadSrc.lastIndexOf("/") + 1);
|
|
120
|
+
const downloadName = setDownloadName ? setDownloadName(downloadSrc) : downloadSrc.slice(downloadSrc.lastIndexOf("/") + 1);
|
|
120
121
|
(0, _utils.downloadImage)(downloadSrc, downloadName);
|
|
121
122
|
this._adapter.notifyDownload(downloadSrc, currentIndex);
|
|
122
123
|
};
|
|
@@ -27,7 +27,7 @@ $height-image_preview_icon: 40px; // 图像预览footer操作区icon高度
|
|
|
27
27
|
$height-image_preview_header_close: 30px; // 图像预览header部分的关闭热区高度
|
|
28
28
|
|
|
29
29
|
$radius-image: var(--semi-border-radius-small); // 图像圆角
|
|
30
|
-
$radius-image_preview_footer:
|
|
30
|
+
$radius-image_preview_footer: var(--semi-border-radius-medium); // 图像预览footer操作区圆角
|
|
31
31
|
|
|
32
32
|
$color-image_mask-bg: var(--semi-color-overlay-bg); // 图像蒙层背景色
|
|
33
33
|
$color-image_mask_info_text: var(--semi-color-white); // 图像蒙层文字颜色
|
|
@@ -34,7 +34,6 @@ class InputFoundation extends _foundation.default {
|
|
|
34
34
|
this._timer = null;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
// eslint-disable-next-line
|
|
38
37
|
setDisable() {}
|
|
39
38
|
_setInitValue() {
|
|
40
39
|
const {
|
|
@@ -114,7 +113,6 @@ class InputFoundation extends _foundation.default {
|
|
|
114
113
|
if ((0, _isNumber2.default)(maxLength) && maxLength >= 0 && (0, _isFunction2.default)(getValueLength) && (0, _isString2.default)(value)) {
|
|
115
114
|
const valueLength = getValueLength(value);
|
|
116
115
|
if (valueLength > maxLength) {
|
|
117
|
-
// eslint-disable-next-line max-len
|
|
118
116
|
console.warn('[Semi Input] The input character is truncated because the input length exceeds the maximum length limit');
|
|
119
117
|
const truncatedValue = this.handleTruncateValue(value, maxLength);
|
|
120
118
|
return truncatedValue;
|
|
@@ -55,7 +55,6 @@ class TextAreaFoundation extends _foundation.default {
|
|
|
55
55
|
init() {
|
|
56
56
|
this.setInitValue();
|
|
57
57
|
}
|
|
58
|
-
// eslint-disable-next-line
|
|
59
58
|
destroy() {}
|
|
60
59
|
setInitValue() {
|
|
61
60
|
const {
|
|
@@ -127,7 +126,6 @@ class TextAreaFoundation extends _foundation.default {
|
|
|
127
126
|
if ((0, _isNumber2.default)(maxLength) && maxLength >= 0 && (0, _isFunction2.default)(getValueLength) && (0, _isString2.default)(value)) {
|
|
128
127
|
const valueLength = getValueLength(value);
|
|
129
128
|
if (valueLength > maxLength) {
|
|
130
|
-
// eslint-disable-next-line max-len
|
|
131
129
|
console.warn('[Semi TextArea] The input character is truncated because the input length exceeds the maximum length limit');
|
|
132
130
|
const truncatedValue = this.handleTruncateValue(value, maxLength);
|
|
133
131
|
return truncatedValue;
|
|
@@ -13,10 +13,6 @@ var _keyCode = _interopRequireDefault(require("../utils/keyCode"));
|
|
|
13
13
|
var _constants = require("./constants");
|
|
14
14
|
var _number = require("../utils/number");
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
/* eslint-disable max-len */
|
|
17
|
-
/* eslint-disable no-param-reassign */
|
|
18
|
-
/* eslint-disable eqeqeq */
|
|
19
|
-
|
|
20
16
|
class InputNumberFoundation extends _foundation.default {
|
|
21
17
|
init() {
|
|
22
18
|
this._setInitValue();
|
|
@@ -139,7 +135,6 @@ class InputNumberFoundation extends _foundation.default {
|
|
|
139
135
|
const dotBeginStr = dotIndex > -1 ? valueAfterParser.slice(dotIndex) : '';
|
|
140
136
|
formattedNum += dotBeginStr;
|
|
141
137
|
} else if (precLength < lengthAfterDot) {
|
|
142
|
-
// eslint-disable-next-line max-depth
|
|
143
138
|
for (let i = 0; i < lengthAfterDot - precLength; i++) {
|
|
144
139
|
formattedNum += '0';
|
|
145
140
|
}
|
|
@@ -207,7 +202,6 @@ class InputNumberFoundation extends _foundation.default {
|
|
|
207
202
|
}
|
|
208
203
|
|
|
209
204
|
if (willSetNum != null) {
|
|
210
|
-
// eslint-disable-next-line max-depth
|
|
211
205
|
if (!this._isControlledComponent('value')) {
|
|
212
206
|
this._adapter.setNumber(willSetNum);
|
|
213
207
|
}
|
|
@@ -13,9 +13,7 @@ exports.DEFAULT_TOGGLE_ICON = DEFAULT_TOGGLE_ICON;
|
|
|
13
13
|
class NavItem {
|
|
14
14
|
constructor() {
|
|
15
15
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
|
-
// eslint-disable-next-line eqeqeq
|
|
17
16
|
if (options == null || typeof options !== 'object') {
|
|
18
|
-
// eslint-disable-next-line no-param-reassign
|
|
19
17
|
options = {
|
|
20
18
|
text: options,
|
|
21
19
|
itemKey: options,
|
|
@@ -10,9 +10,6 @@ var _NavItem = _interopRequireDefault(require("./NavItem"));
|
|
|
10
10
|
var _constants = require("./constants");
|
|
11
11
|
var _isNullOrUndefined = _interopRequireDefault(require("../utils/isNullOrUndefined"));
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
/* eslint-disable max-depth */
|
|
14
|
-
/* eslint-disable max-len */
|
|
15
|
-
|
|
16
13
|
class NavigationFoundation extends _foundation.default {
|
|
17
14
|
constructor(adapter) {
|
|
18
15
|
super(Object.assign({}, adapter));
|
|
@@ -166,7 +163,7 @@ class NavigationFoundation extends _foundation.default {
|
|
|
166
163
|
}
|
|
167
164
|
return [...willOpenKeySet];
|
|
168
165
|
}
|
|
169
|
-
destroy() {}
|
|
166
|
+
destroy() {}
|
|
170
167
|
selectLevelZeroParentKeys(itemKeysMap) {
|
|
171
168
|
const _itemKeysMap = (0, _isNullOrUndefined.default)(itemKeysMap) ? this.getState('itemKeysMap') : itemKeysMap;
|
|
172
169
|
// console.log(itemKeysMap);
|
|
@@ -33,7 +33,7 @@ class SubNavFoundation extends _foundation.default {
|
|
|
33
33
|
// this.log('invoke SubNavFoundation init()');
|
|
34
34
|
this._timer = null;
|
|
35
35
|
}
|
|
36
|
-
destroy() {}
|
|
36
|
+
destroy() {}
|
|
37
37
|
clearDelayTimer() {
|
|
38
38
|
if (this._timer) {
|
|
39
39
|
clearTimeout(this._timer);
|
|
@@ -41,7 +41,6 @@ class SubNavFoundation extends _foundation.default {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
isValidKey(itemKey) {
|
|
44
|
-
// eslint-disable-next-line eqeqeq
|
|
45
44
|
return itemKey != null && (typeof itemKey === 'number' || typeof itemKey === 'string');
|
|
46
45
|
}
|
|
47
46
|
handleDropdownVisibleChange(visible) {
|
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _foundation = _interopRequireDefault(require("../base/foundation"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
/* eslint-disable no-useless-constructor */
|
|
10
|
-
|
|
11
9
|
class NotificationListFoundation extends _foundation.default {
|
|
12
10
|
addNotice(opts) {
|
|
13
11
|
// let notices = this._adapter.getNotices();
|
|
@@ -5,6 +5,7 @@ export interface PaginationAdapter<P = Record<string, any>, S = Record<string, a
|
|
|
5
5
|
updateTotal: (total: number) => void;
|
|
6
6
|
updatePageSize: (pageSize: number) => void;
|
|
7
7
|
updateQuickJumpPage: (quickJumpPage: string | number) => void;
|
|
8
|
+
updateAllPageNumbers: (allPageNumbers: number[]) => void;
|
|
8
9
|
setCurrentPage: (pageIndex: number) => void;
|
|
9
10
|
registerKeyDownHandler: (handler: KeyDownHandler) => void;
|
|
10
11
|
unregisterKeyDownHandler: (handler: KeyDownHandler) => void;
|
|
@@ -33,6 +34,7 @@ declare class PaginationFoundation<P = Record<string, any>, S = Record<string, a
|
|
|
33
34
|
}): void;
|
|
34
35
|
goPage(targetPageIndex: number | '...'): void;
|
|
35
36
|
updatePage(targetPageIndex?: number, total?: number, pageSize?: number): void;
|
|
37
|
+
updateAllPageNumbers(total: number, pageSize: number): void;
|
|
36
38
|
goPrev(): void;
|
|
37
39
|
goNext(): void;
|
|
38
40
|
_updatePageList(pageListInfo: {
|
|
@@ -7,9 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
var _foundation = _interopRequireDefault(require("../base/foundation"));
|
|
8
8
|
var _constants = require("./constants");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
/* eslint-disable max-len */
|
|
11
|
-
/* eslint-disable no-param-reassign */
|
|
12
|
-
|
|
13
10
|
class PaginationFoundation extends _foundation.default {
|
|
14
11
|
constructor(adapter) {
|
|
15
12
|
super(Object.assign({}, adapter));
|
|
@@ -106,6 +103,22 @@ class PaginationFoundation extends _foundation.default {
|
|
|
106
103
|
this._adapter.setCurrentPage(targetPageIndex);
|
|
107
104
|
this._adapter.updatePageSize(pageSize);
|
|
108
105
|
}
|
|
106
|
+
updateAllPageNumbers(total, pageSize) {
|
|
107
|
+
// only need to update in small size
|
|
108
|
+
const {
|
|
109
|
+
size,
|
|
110
|
+
hoverShowPageSelect,
|
|
111
|
+
disabled
|
|
112
|
+
} = this.getProps();
|
|
113
|
+
if (size !== 'small' || !hoverShowPageSelect || disabled) {
|
|
114
|
+
return;
|
|
115
|
+
} else {
|
|
116
|
+
const pageNumbers = Array.from({
|
|
117
|
+
length: Math.ceil(total / pageSize)
|
|
118
|
+
}, (v, i) => i + 1);
|
|
119
|
+
this._adapter.updateAllPageNumbers(pageNumbers);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
109
122
|
goPrev() {
|
|
110
123
|
const {
|
|
111
124
|
currentPage
|
|
@@ -235,7 +248,6 @@ class PaginationFoundation extends _foundation.default {
|
|
|
235
248
|
this._adapter.notifyChange(newCurrentPage, newPageSize);
|
|
236
249
|
}
|
|
237
250
|
// TODO handle tab/enter events
|
|
238
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
239
251
|
handleKeyDown() {}
|
|
240
252
|
// If pageSize is not in the Opts array, insert it
|
|
241
253
|
pageSizeInOpts() {
|
|
@@ -8,8 +8,6 @@ var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
|
8
8
|
var _foundation = _interopRequireDefault(require("../base/foundation"));
|
|
9
9
|
var _isPromise = _interopRequireDefault(require("../utils/isPromise"));
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
12
|
-
|
|
13
11
|
class PopConfirmFoundation extends _foundation.default {
|
|
14
12
|
init() {}
|
|
15
13
|
destroy() {}
|
package/lib/cjs/radio/radio.css
CHANGED
package/lib/cjs/radio/radio.scss
CHANGED