@douyinfe/semi-foundation 2.43.0 → 2.43.1-alpha.1
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/calendar/eventUtil.ts +5 -1
- package/calendar/foundation.ts +4 -3
- package/dropdown/constants.ts +1 -1
- package/lib/cjs/calendar/eventUtil.js +5 -1
- package/lib/cjs/calendar/foundation.js +3 -3
- package/lib/cjs/dropdown/constants.js +1 -1
- package/lib/cjs/popover/constants.d.ts +1 -1
- package/lib/cjs/popover/constants.js +1 -1
- package/lib/es/calendar/eventUtil.js +5 -1
- package/lib/es/calendar/foundation.js +3 -3
- package/lib/es/dropdown/constants.js +1 -1
- package/lib/es/popover/constants.d.ts +1 -1
- package/lib/es/popover/constants.js +1 -1
- package/package.json +3 -3
- package/popover/constants.ts +1 -1
package/calendar/eventUtil.ts
CHANGED
|
@@ -230,7 +230,11 @@ export const filterEvents = (events: Map<string, EventObject[]>, start: Date, en
|
|
|
230
230
|
const item = events.get(day);
|
|
231
231
|
const date = new Date(day);
|
|
232
232
|
if (isDateInRange(date, start, end)) {
|
|
233
|
-
res.
|
|
233
|
+
if (res.has(day)) {
|
|
234
|
+
res.set(day, [...res.get(day), ...item]);
|
|
235
|
+
} else {
|
|
236
|
+
res.set(day, item);
|
|
237
|
+
}
|
|
234
238
|
} else if (isBefore(end, date)) {
|
|
235
239
|
// do nothing
|
|
236
240
|
} else {
|
package/calendar/foundation.ts
CHANGED
|
@@ -320,13 +320,14 @@ export default class CalendarFoundation<P = Record<string, any>, S = Record<stri
|
|
|
320
320
|
|
|
321
321
|
convertMapToArray(weekMap: Map<string, EventObject[]>, weekStart: Date) {
|
|
322
322
|
const eventArray = [];
|
|
323
|
+
const map = new Map();
|
|
323
324
|
for (const entry of weekMap.entries()) {
|
|
324
325
|
const [key, value] = entry;
|
|
325
|
-
const map = new Map();
|
|
326
326
|
map.set(key, value);
|
|
327
|
-
const weekEvents = this._parseWeeklyEvents(map, weekStart);
|
|
328
|
-
eventArray.push(...weekEvents);
|
|
329
327
|
}
|
|
328
|
+
const weekEvents = this._parseWeeklyEvents(map, weekStart);
|
|
329
|
+
eventArray.push(...weekEvents);
|
|
330
|
+
|
|
330
331
|
return eventArray;
|
|
331
332
|
}
|
|
332
333
|
|
package/dropdown/constants.ts
CHANGED
|
@@ -9,7 +9,7 @@ const cssClasses = {
|
|
|
9
9
|
|
|
10
10
|
const strings = {
|
|
11
11
|
POSITION_SET: tooltipStrings.POSITION_SET,
|
|
12
|
-
TRIGGER_SET: ['hover', 'focus', 'click', 'custom'],
|
|
12
|
+
TRIGGER_SET: ['hover', 'focus', 'click', 'custom', 'contextMenu'],
|
|
13
13
|
DEFAULT_LEAVE_DELAY: 100,
|
|
14
14
|
ITEM_TYPE: ['primary', 'secondary', 'tertiary', 'warning', 'danger'],
|
|
15
15
|
};
|
|
@@ -218,7 +218,11 @@ const filterEvents = (events, start, end) => {
|
|
|
218
218
|
const item = events.get(day);
|
|
219
219
|
const date = new Date(day);
|
|
220
220
|
if (isDateInRange(date, start, end)) {
|
|
221
|
-
res.
|
|
221
|
+
if (res.has(day)) {
|
|
222
|
+
res.set(day, [...res.get(day), ...item]);
|
|
223
|
+
} else {
|
|
224
|
+
res.set(day, item);
|
|
225
|
+
}
|
|
222
226
|
} else if ((0, _dateFns.isBefore)(end, date)) {
|
|
223
227
|
// do nothing
|
|
224
228
|
} else {
|
|
@@ -225,13 +225,13 @@ class CalendarFoundation extends _foundation.default {
|
|
|
225
225
|
}
|
|
226
226
|
convertMapToArray(weekMap, weekStart) {
|
|
227
227
|
const eventArray = [];
|
|
228
|
+
const map = new Map();
|
|
228
229
|
for (const entry of weekMap.entries()) {
|
|
229
230
|
const [key, value] = entry;
|
|
230
|
-
const map = new Map();
|
|
231
231
|
map.set(key, value);
|
|
232
|
-
const weekEvents = this._parseWeeklyEvents(map, weekStart);
|
|
233
|
-
eventArray.push(...weekEvents);
|
|
234
232
|
}
|
|
233
|
+
const weekEvents = this._parseWeeklyEvents(map, weekStart);
|
|
234
|
+
eventArray.push(...weekEvents);
|
|
235
235
|
return eventArray;
|
|
236
236
|
}
|
|
237
237
|
getParseMonthlyEvents(itemLimit) {
|
|
@@ -14,7 +14,7 @@ const cssClasses = {
|
|
|
14
14
|
exports.cssClasses = cssClasses;
|
|
15
15
|
const strings = {
|
|
16
16
|
POSITION_SET: _constants.strings.POSITION_SET,
|
|
17
|
-
TRIGGER_SET: ['hover', 'focus', 'click', 'custom'],
|
|
17
|
+
TRIGGER_SET: ['hover', 'focus', 'click', 'custom', 'contextMenu'],
|
|
18
18
|
DEFAULT_LEAVE_DELAY: 100,
|
|
19
19
|
ITEM_TYPE: ['primary', 'secondary', 'tertiary', 'warning', 'danger']
|
|
20
20
|
};
|
|
@@ -4,7 +4,7 @@ declare const cssClasses: {
|
|
|
4
4
|
};
|
|
5
5
|
declare const strings: {
|
|
6
6
|
readonly POSITION_SET: readonly ["top", "topLeft", "topRight", "left", "leftTop", "leftBottom", "right", "rightTop", "rightBottom", "bottom", "bottomLeft", "bottomRight", "leftTopOver", "rightTopOver"];
|
|
7
|
-
readonly TRIGGER_SET: readonly ["hover", "focus", "click", "custom"];
|
|
7
|
+
readonly TRIGGER_SET: readonly ["hover", "focus", "click", "custom", "contextMenu"];
|
|
8
8
|
readonly DEFAULT_ARROW_STYLE: {
|
|
9
9
|
readonly borderOpacity: "1";
|
|
10
10
|
readonly backgroundColor: "var(--semi-color-bg-3)";
|
|
@@ -13,7 +13,7 @@ const cssClasses = {
|
|
|
13
13
|
exports.cssClasses = cssClasses;
|
|
14
14
|
const strings = {
|
|
15
15
|
POSITION_SET: ['top', 'topLeft', 'topRight', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'bottom', 'bottomLeft', 'bottomRight', 'leftTopOver', 'rightTopOver'],
|
|
16
|
-
TRIGGER_SET: ['hover', 'focus', 'click', 'custom'],
|
|
16
|
+
TRIGGER_SET: ['hover', 'focus', 'click', 'custom', 'contextMenu'],
|
|
17
17
|
DEFAULT_ARROW_STYLE: {
|
|
18
18
|
borderOpacity: '1',
|
|
19
19
|
backgroundColor: 'var(--semi-color-bg-3)',
|
|
@@ -199,7 +199,11 @@ export const filterEvents = (events, start, end) => {
|
|
|
199
199
|
const item = events.get(day);
|
|
200
200
|
const date = new Date(day);
|
|
201
201
|
if (isDateInRange(date, start, end)) {
|
|
202
|
-
res.
|
|
202
|
+
if (res.has(day)) {
|
|
203
|
+
res.set(day, [...res.get(day), ...item]);
|
|
204
|
+
} else {
|
|
205
|
+
res.set(day, item);
|
|
206
|
+
}
|
|
203
207
|
} else if (isBefore(end, date)) {
|
|
204
208
|
// do nothing
|
|
205
209
|
} else {
|
|
@@ -218,13 +218,13 @@ export default class CalendarFoundation extends BaseFoundation {
|
|
|
218
218
|
}
|
|
219
219
|
convertMapToArray(weekMap, weekStart) {
|
|
220
220
|
const eventArray = [];
|
|
221
|
+
const map = new Map();
|
|
221
222
|
for (const entry of weekMap.entries()) {
|
|
222
223
|
const [key, value] = entry;
|
|
223
|
-
const map = new Map();
|
|
224
224
|
map.set(key, value);
|
|
225
|
-
const weekEvents = this._parseWeeklyEvents(map, weekStart);
|
|
226
|
-
eventArray.push(...weekEvents);
|
|
227
225
|
}
|
|
226
|
+
const weekEvents = this._parseWeeklyEvents(map, weekStart);
|
|
227
|
+
eventArray.push(...weekEvents);
|
|
228
228
|
return eventArray;
|
|
229
229
|
}
|
|
230
230
|
getParseMonthlyEvents(itemLimit) {
|
|
@@ -7,7 +7,7 @@ const cssClasses = {
|
|
|
7
7
|
};
|
|
8
8
|
const strings = {
|
|
9
9
|
POSITION_SET: tooltipStrings.POSITION_SET,
|
|
10
|
-
TRIGGER_SET: ['hover', 'focus', 'click', 'custom'],
|
|
10
|
+
TRIGGER_SET: ['hover', 'focus', 'click', 'custom', 'contextMenu'],
|
|
11
11
|
DEFAULT_LEAVE_DELAY: 100,
|
|
12
12
|
ITEM_TYPE: ['primary', 'secondary', 'tertiary', 'warning', 'danger']
|
|
13
13
|
};
|
|
@@ -4,7 +4,7 @@ declare const cssClasses: {
|
|
|
4
4
|
};
|
|
5
5
|
declare const strings: {
|
|
6
6
|
readonly POSITION_SET: readonly ["top", "topLeft", "topRight", "left", "leftTop", "leftBottom", "right", "rightTop", "rightBottom", "bottom", "bottomLeft", "bottomRight", "leftTopOver", "rightTopOver"];
|
|
7
|
-
readonly TRIGGER_SET: readonly ["hover", "focus", "click", "custom"];
|
|
7
|
+
readonly TRIGGER_SET: readonly ["hover", "focus", "click", "custom", "contextMenu"];
|
|
8
8
|
readonly DEFAULT_ARROW_STYLE: {
|
|
9
9
|
readonly borderOpacity: "1";
|
|
10
10
|
readonly backgroundColor: "var(--semi-color-bg-3)";
|
|
@@ -6,7 +6,7 @@ const cssClasses = {
|
|
|
6
6
|
};
|
|
7
7
|
const strings = {
|
|
8
8
|
POSITION_SET: ['top', 'topLeft', 'topRight', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'bottom', 'bottomLeft', 'bottomRight', 'leftTopOver', 'rightTopOver'],
|
|
9
|
-
TRIGGER_SET: ['hover', 'focus', 'click', 'custom'],
|
|
9
|
+
TRIGGER_SET: ['hover', 'focus', 'click', 'custom', 'contextMenu'],
|
|
10
10
|
DEFAULT_ARROW_STYLE: {
|
|
11
11
|
borderOpacity: '1',
|
|
12
12
|
backgroundColor: 'var(--semi-color-bg-3)',
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.1-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
7
7
|
"prepublishOnly": "npm run build:lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@douyinfe/semi-animation": "2.43.
|
|
10
|
+
"@douyinfe/semi-animation": "2.43.1-alpha.1",
|
|
11
11
|
"async-validator": "^3.5.0",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"date-fns": "^2.29.3",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "5d365532a2f23fb1d064276a81e602fb8fbf26b4",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
package/popover/constants.ts
CHANGED
|
@@ -23,7 +23,7 @@ const strings = {
|
|
|
23
23
|
'leftTopOver',
|
|
24
24
|
'rightTopOver',
|
|
25
25
|
],
|
|
26
|
-
TRIGGER_SET: ['hover', 'focus', 'click', 'custom'],
|
|
26
|
+
TRIGGER_SET: ['hover', 'focus', 'click', 'custom', 'contextMenu'],
|
|
27
27
|
DEFAULT_ARROW_STYLE: {
|
|
28
28
|
borderOpacity: '1',
|
|
29
29
|
backgroundColor: 'var(--semi-color-bg-3)',
|