@douyinfe/semi-foundation 2.70.0-alpha.2 → 2.70.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 (92) hide show
  1. package/chat/foundation.ts +17 -2
  2. package/datePicker/yearAndMonthFoundation.ts +29 -9
  3. package/lib/cjs/chat/foundation.d.ts +4 -0
  4. package/lib/cjs/chat/foundation.js +12 -1
  5. package/lib/cjs/datePicker/yearAndMonthFoundation.js +39 -8
  6. package/lib/cjs/markdownRender/foundation.d.ts +1 -0
  7. package/lib/cjs/markdownRender/foundation.js +9 -4
  8. package/lib/cjs/overflowList/constants.d.ts +1 -1
  9. package/lib/cjs/resizable/foundation.d.ts +2 -4
  10. package/lib/cjs/resizable/group/index.d.ts +6 -3
  11. package/lib/cjs/resizable/group/index.js +90 -23
  12. package/lib/cjs/resizable/resizable.css +86 -0
  13. package/lib/cjs/resizable/resizable.scss +100 -3
  14. package/lib/cjs/resizable/single/index.d.ts +1 -1
  15. package/lib/cjs/resizable/single/index.js +2 -2
  16. package/lib/cjs/resizable/types.d.ts +41 -0
  17. package/lib/cjs/resizable/types.js +12 -0
  18. package/lib/cjs/resizable/utils.js +5 -5
  19. package/lib/cjs/resizable/variables.scss +8 -0
  20. package/lib/cjs/table/table.css +2 -1
  21. package/lib/cjs/table/table.scss +2 -1
  22. package/lib/cjs/transfer/transfer.css +1 -0
  23. package/lib/cjs/transfer/transfer.scss +1 -0
  24. package/lib/cjs/tree/treeUtil.d.ts +1 -1
  25. package/lib/cjs/treeSelect/treeSelect.css +3 -1
  26. package/lib/cjs/treeSelect/treeSelect.scss +4 -1
  27. package/lib/es/chat/foundation.d.ts +4 -0
  28. package/lib/es/chat/foundation.js +12 -1
  29. package/lib/es/datePicker/yearAndMonthFoundation.js +39 -8
  30. package/lib/es/markdownRender/foundation.d.ts +1 -0
  31. package/lib/es/markdownRender/foundation.js +9 -4
  32. package/lib/es/overflowList/constants.d.ts +1 -1
  33. package/lib/es/resizable/foundation.d.ts +2 -4
  34. package/lib/es/resizable/foundation.js +2 -4
  35. package/lib/es/resizable/group/index.d.ts +6 -3
  36. package/lib/es/resizable/group/index.js +90 -23
  37. package/lib/es/resizable/resizable.css +86 -0
  38. package/lib/es/resizable/resizable.scss +100 -3
  39. package/lib/es/resizable/single/index.d.ts +1 -1
  40. package/lib/es/resizable/single/index.js +1 -1
  41. package/lib/es/resizable/types.d.ts +41 -0
  42. package/lib/es/resizable/types.js +6 -0
  43. package/lib/es/resizable/utils.js +5 -5
  44. package/lib/es/resizable/variables.scss +8 -0
  45. package/lib/es/table/table.css +2 -1
  46. package/lib/es/table/table.scss +2 -1
  47. package/lib/es/transfer/transfer.css +1 -0
  48. package/lib/es/transfer/transfer.scss +1 -0
  49. package/lib/es/tree/treeUtil.d.ts +1 -1
  50. package/lib/es/treeSelect/treeSelect.css +3 -1
  51. package/lib/es/treeSelect/treeSelect.scss +4 -1
  52. package/markdownRender/foundation.ts +13 -7
  53. package/package.json +3 -5
  54. package/resizable/foundation.ts +3 -19
  55. package/resizable/group/index.ts +92 -29
  56. package/resizable/resizable.scss +100 -3
  57. package/resizable/single/index.ts +1 -1
  58. package/resizable/{singleConstants.ts → types.ts} +0 -65
  59. package/resizable/utils.ts +7 -6
  60. package/resizable/variables.scss +8 -0
  61. package/table/table.scss +2 -1
  62. package/transfer/transfer.scss +1 -0
  63. package/treeSelect/treeSelect.scss +4 -1
  64. package/tsconfig.json +1 -1
  65. package/jsonViewer/constants.ts +0 -7
  66. package/jsonViewer/foundation.ts +0 -67
  67. package/jsonViewer/jsonViewer.scss +0 -152
  68. package/jsonViewer/script/build.js +0 -51
  69. package/jsonViewer/variables.scss +0 -27
  70. package/lib/cjs/jsonViewer/constants.d.ts +0 -4
  71. package/lib/cjs/jsonViewer/constants.js +0 -10
  72. package/lib/cjs/jsonViewer/foundation.d.ts +0 -21
  73. package/lib/cjs/jsonViewer/foundation.js +0 -78
  74. package/lib/cjs/jsonViewer/jsonViewer.css +0 -136
  75. package/lib/cjs/jsonViewer/jsonViewer.scss +0 -152
  76. package/lib/cjs/jsonViewer/variables.scss +0 -27
  77. package/lib/cjs/resizable/groupConstants.d.ts +0 -16
  78. package/lib/cjs/resizable/groupConstants.js +0 -25
  79. package/lib/cjs/resizable/singleConstants.d.ts +0 -105
  80. package/lib/cjs/resizable/singleConstants.js +0 -67
  81. package/lib/es/jsonViewer/constants.d.ts +0 -4
  82. package/lib/es/jsonViewer/constants.js +0 -5
  83. package/lib/es/jsonViewer/foundation.d.ts +0 -21
  84. package/lib/es/jsonViewer/foundation.js +0 -60
  85. package/lib/es/jsonViewer/jsonViewer.css +0 -136
  86. package/lib/es/jsonViewer/jsonViewer.scss +0 -152
  87. package/lib/es/jsonViewer/variables.scss +0 -27
  88. package/lib/es/resizable/groupConstants.d.ts +0 -16
  89. package/lib/es/resizable/groupConstants.js +0 -19
  90. package/lib/es/resizable/singleConstants.d.ts +0 -105
  91. package/lib/es/resizable/singleConstants.js +0 -61
  92. package/resizable/groupConstants.ts +0 -25
@@ -1,5 +1,4 @@
1
- @import './variables.scss';
2
-
1
+ @import "./variables.scss";
3
2
  $module: #{$prefix}-resizable;
4
3
 
5
4
  .#{$module} {
@@ -13,8 +12,83 @@ $module: #{$prefix}-resizable;
13
12
  position: absolute;
14
13
  user-select: none;
15
14
  z-index: $z-resizable_handler;
15
+
16
+ // 基础样式
17
+ @mixin row-resize-base {
18
+ width: 100%;
19
+ height: $height-row-handler;
20
+ top: 0;
21
+ left: 0;
22
+ cursor: row-resize;
23
+ }
24
+
25
+ @mixin col-resize-base {
26
+ width: $width-col-handler;
27
+ height: 100%;
28
+ top: 0;
29
+ left: 0;
30
+ cursor: col-resize;
31
+ }
32
+
33
+ @mixin edge-resize-base {
34
+ width: $width-edge-handler;
35
+ height: $height-edge-handler;
36
+ position: absolute;
37
+ }
38
+
39
+ // 方向样式
40
+ &-top {
41
+ @include row-resize-base;
42
+ top: calc(-1 * $height-row-handler / 2);
43
+ }
44
+
45
+ &-right {
46
+ @include col-resize-base;
47
+ left: auto;
48
+ right: calc(-1 * $width-col-handler / 2);
49
+ }
50
+
51
+ &-bottom {
52
+ @include row-resize-base;
53
+ top: auto;
54
+ bottom: calc(-1 * $height-row-handler / 2);
55
+ }
56
+
57
+ &-left {
58
+ @include col-resize-base;
59
+ left: calc(-1 * $width-col-handler / 2);
60
+ }
61
+
62
+ // 边角样式
63
+ &-topRight {
64
+ @include edge-resize-base;
65
+ right: calc(-1 * $width-edge-handler / 2);
66
+ top: calc(-1 * $height-edge-handler / 2);
67
+ cursor: ne-resize;
68
+ }
69
+
70
+ &-bottomRight {
71
+ @include edge-resize-base;
72
+ right: calc(-1 * $width-edge-handler / 2);
73
+ bottom: calc(-1 * $height-edge-handler / 2);
74
+ cursor: se-resize;
75
+ }
76
+
77
+ &-bottomLeft {
78
+ @include edge-resize-base;
79
+ left: calc(-1 * $width-edge-handler / 2);
80
+ bottom: calc(-1 * $height-edge-handler / 2);
81
+ cursor: sw-resize;
82
+ }
83
+
84
+ &-topLeft {
85
+ @include edge-resize-base;
86
+ left: calc(-1 * $width-edge-handler / 2);
87
+ top: calc(-1 * $height-edge-handler / 2);
88
+ cursor: nw-resize;
89
+ }
16
90
  }
17
-
91
+
18
92
  &-group {
19
93
  display: flex;
20
94
  position: relative;
@@ -37,5 +111,28 @@ $module: #{$prefix}-resizable;
37
111
  justify-content: center;
38
112
  background-color: var(--semi-color-fill-0);
39
113
  opacity: 1;
114
+
115
+ &-vertical {
116
+ width: 100%;
117
+ height: $height-vertical-handler;
118
+ flex-shrink: 0;
119
+ cursor: row-resize;
120
+ }
121
+
122
+ &-horizontal {
123
+ height: 100%;
124
+ width: $width-horizontal-handler;
125
+ flex-shrink: 0;
126
+ cursor: col-resize;
127
+ }
128
+ }
129
+
130
+ &-background {
131
+ height: 100%;
132
+ width: 100%;
133
+ inset: 0;
134
+ z-index: $z-resizable_background;
135
+ opacity: 0;
136
+ position: fixed;
40
137
  }
41
138
  }
@@ -1,5 +1,5 @@
1
1
  import BaseFoundation, { DefaultAdapter } from '../../base/foundation';
2
- import { Size, NumberSize, Direction } from "../singleConstants";
2
+ import { Size, NumberSize, Direction } from "../types";
3
3
  export interface ResizableHandlerAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
4
4
  registerEvent: () => void;
5
5
  unregisterEvent: () => void;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.ResizableHandlerFoundation = exports.ResizableFoundation = void 0;
7
7
  var _foundation = _interopRequireDefault(require("../../base/foundation"));
8
- var _singleConstants = require("../singleConstants");
8
+ var _types = require("../types");
9
9
  var _utils = require("../utils");
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  class ResizableHandlerFoundation extends _foundation.default {
@@ -303,7 +303,7 @@ class ResizableFoundation extends _foundation.default {
303
303
  }
304
304
  get propSize() {
305
305
  const porps = this.getProps();
306
- return porps.size || porps.defaultSize || _singleConstants.DEFAULT_SIZE;
306
+ return porps.size || porps.defaultSize || _types.DEFAULT_SIZE;
307
307
  }
308
308
  get size() {
309
309
  let width = 0;
@@ -0,0 +1,41 @@
1
+ export declare const directions: readonly ["top", "right", "bottom", "left", "topRight", "bottomRight", "bottomLeft", "topLeft"];
2
+ export type Direction = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'topLeft';
3
+ export interface HandleClassName {
4
+ top?: string;
5
+ right?: string;
6
+ bottom?: string;
7
+ left?: string;
8
+ topRight?: string;
9
+ bottomRight?: string;
10
+ bottomLeft?: string;
11
+ topLeft?: string;
12
+ }
13
+ export type HandlerCallback = (e: MouseEvent, direction: Direction) => void;
14
+ export interface Enable {
15
+ top?: boolean;
16
+ right?: boolean;
17
+ bottom?: boolean;
18
+ left?: boolean;
19
+ topRight?: boolean;
20
+ bottomRight?: boolean;
21
+ bottomLeft?: boolean;
22
+ topLeft?: boolean;
23
+ }
24
+ export interface Size {
25
+ width?: string | number;
26
+ height?: string | number;
27
+ }
28
+ export interface NumberSize {
29
+ width: number;
30
+ height: number;
31
+ }
32
+ export interface NewSize {
33
+ newHeight: number | string;
34
+ newWidth: number | string;
35
+ }
36
+ export declare const DEFAULT_SIZE: {
37
+ width: string;
38
+ height: string;
39
+ };
40
+ export type ResizeCallback = (size: Size, event: MouseEvent, direction: Direction) => void;
41
+ export type ResizeStartCallback = (e: MouseEvent, dir: Direction) => void | boolean;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.directions = exports.DEFAULT_SIZE = void 0;
7
+ // single
8
+ const directions = exports.directions = ['top', 'right', 'bottom', 'left', 'topRight', 'bottomRight', 'bottomLeft', 'topLeft'];
9
+ const DEFAULT_SIZE = exports.DEFAULT_SIZE = {
10
+ width: 'auto',
11
+ height: 'auto'
12
+ };
@@ -101,10 +101,10 @@ const judgeConstraint = function (newSize, min, max, parentSize) {
101
101
  max = max !== null && max !== void 0 ? max : "100%";
102
102
  const minSize = getPixelSize(min, parentSize);
103
103
  const maxSize = getPixelSize(max, parentSize);
104
- if (newSize <= minSize + offset) {
104
+ if (newSize < minSize + offset) {
105
105
  return true;
106
106
  }
107
- if (newSize >= maxSize - offset) {
107
+ if (newSize > maxSize) {
108
108
  return true;
109
109
  }
110
110
  return false;
@@ -115,11 +115,11 @@ const adjustNewSize = (newSize, min, max, parentSize, offset) => {
115
115
  max = max !== null && max !== void 0 ? max : "100%";
116
116
  const minSize = getPixelSize(min, parentSize);
117
117
  const maxSize = getPixelSize(max, parentSize);
118
- if (newSize <= minSize + offset) {
118
+ if (newSize < minSize + offset) {
119
119
  return minSize + offset;
120
120
  }
121
- if (newSize >= maxSize - offset) {
122
- return maxSize - offset;
121
+ if (newSize > maxSize) {
122
+ return maxSize;
123
123
  }
124
124
  return newSize;
125
125
  };
@@ -1 +1,9 @@
1
1
  $z-resizable_handler: 2000 !default; // 伸缩框组件中handler的z-index
2
+ $z-resizable_background: 2010; // 伸缩框组件中背景的z-index
3
+
4
+ $height-row-handler: 10px; // 单个伸缩框中上下handler的高度
5
+ $width-col-handler: 10px; // 单个伸缩框中左右handler的宽度
6
+ $width-edge-handler: 20px; // 单个伸缩框中边角handler的宽度
7
+ $height-edge-handler: 20px; // 单个伸缩框中边角handler的高度
8
+ $width-horizontal-handler: 10px; // 组合伸缩框中水平方向handler的宽度
9
+ $height-vertical-handler: 10px; // 组合伸缩框中垂直方向handler的高度
@@ -140,7 +140,8 @@
140
140
  cursor: pointer;
141
141
  }
142
142
  .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-row-head-clickSort:hover {
143
- background: var(--semi-color-fill-0);
143
+ background-image: linear-gradient(0deg, var(--semi-color-fill-0), var(--semi-color-fill-0));
144
+ background-color: var(--semi-color-bg-0);
144
145
  }
145
146
  .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-row-head-clickSort:hover.semi-table-cell-fixed-left::before, .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-row-head-clickSort:hover.semi-table-cell-fixed-right::before {
146
147
  background-color: transparent;
@@ -145,7 +145,8 @@ $module: #{$prefix}-table;
145
145
  &.#{$module}-row-head-clickSort {
146
146
  cursor: pointer;
147
147
  &:hover {
148
- background: $color-table_th-clickSort-bg-hover;
148
+ background-image: linear-gradient(0deg, $color-table_th-clickSort-bg-hover, $color-table_th-clickSort-bg-hover);
149
+ background-color: $color-table_cell-bg-hover;
149
150
 
150
151
  &.#{$module}-cell-fixed {
151
152
  &-left,
@@ -44,6 +44,7 @@
44
44
  margin-bottom: 8px;
45
45
  margin-left: 12px;
46
46
  color: var(--semi-color-text-2);
47
+ flex-shrink: 0;
47
48
  }
48
49
  .semi-transfer-header-all {
49
50
  font-weight: 600;
@@ -53,6 +53,7 @@ $module: #{$prefix}-transfer;
53
53
  margin-bottom: $spacing-transfer_header-marginBottom;
54
54
  margin-left: $spacing-transfer_header-marginLeft;
55
55
  color: $color-transfer_header-text;
56
+ flex-shrink: 0;
56
57
 
57
58
  &-all {
58
59
  font-weight: $font-transfer_header_all-fontWeight;
@@ -83,6 +83,6 @@ export declare function getValueOrKey(data: any, keyMaps?: KeyMapProps): any;
83
83
  export declare function normalizeValue(value: any, withObject: boolean, keyMaps?: KeyMapProps): any;
84
84
  export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
85
85
  export declare function calcDisabledKeys(keyEntities: KeyEntities, keyMaps?: KeyMapProps): Set<string>;
86
- export declare function calcDropRelativePosition(event: any, treeNode: any): 0 | 1 | -1;
86
+ export declare function calcDropRelativePosition(event: any, treeNode: any): 1 | -1 | 0;
87
87
  export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
88
88
  export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
@@ -136,12 +136,14 @@
136
136
  }
137
137
  .semi-tree-select-selection-TriggerSearchItem-placeholder {
138
138
  opacity: 0.6;
139
- z-index: -1;
140
139
  }
141
140
  .semi-tree-select-selection-TriggerSearchItem-disabled {
142
141
  cursor: not-allowed;
143
142
  color: var(--semi-color-disabled-text);
144
143
  }
144
+ .semi-tree-select-selection .semi-tree-select-triggerSingleSearch-upper {
145
+ z-index: 1;
146
+ }
145
147
  .semi-tree-select-selection .semi-tree-select-triggerSingleSearch-wrapper {
146
148
  width: 100%;
147
149
  }
@@ -165,7 +165,6 @@ $module: #{$prefix}-tree-select;
165
165
 
166
166
  &-placeholder {
167
167
  opacity: .6;
168
- z-index: -1;
169
168
  }
170
169
 
171
170
  &-disabled {
@@ -174,6 +173,10 @@ $module: #{$prefix}-tree-select;
174
173
  }
175
174
  }
176
175
 
176
+ .#{$module}-triggerSingleSearch-upper {
177
+ z-index: 1;
178
+ }
179
+
177
180
  .#{$module}-triggerSingleSearch-wrapper{
178
181
  width: 100%;
179
182
 
@@ -46,6 +46,8 @@ export interface ChatAdapter<P = Record<string, any>, S = Record<string, any>> e
46
46
  setUploadAreaVisible: (visible: boolean) => void;
47
47
  manualUpload: (e: any) => void;
48
48
  getDropAreaElement: () => HTMLDivElement;
49
+ getDragStatus: () => boolean;
50
+ setDragStatus: (status: boolean) => void;
49
51
  }
50
52
  export default class ChatFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<ChatAdapter<P, S>, P, S> {
51
53
  animation: any;
@@ -69,6 +71,8 @@ export default class ChatFoundation<P = Record<string, any>, S = Record<string,
69
71
  dislikeMessage: (message: Message) => void;
70
72
  resetMessage: (message: Message) => void;
71
73
  handleDragOver: (e: any) => void;
74
+ handleDragStart: (e: any) => void;
75
+ handleDragEnd: (e: any) => void;
72
76
  handleContainerDragOver: (e: any) => void;
73
77
  handleContainerDrop: (e: any) => void;
74
78
  handleContainerDragLeave: (e: any) => void;
@@ -228,8 +228,18 @@ export default class ChatFoundation extends BaseFoundation {
228
228
  onMessageReset === null || onMessageReset === void 0 ? void 0 : onMessageReset(message);
229
229
  };
230
230
  this.handleDragOver = e => {
231
+ const dragStatus = this._adapter.getDragStatus();
232
+ if (dragStatus) {
233
+ return;
234
+ }
231
235
  this._adapter.setUploadAreaVisible(true);
232
236
  };
237
+ this.handleDragStart = e => {
238
+ this._adapter.setDragStatus(true);
239
+ };
240
+ this.handleDragEnd = e => {
241
+ this._adapter.setDragStatus(false);
242
+ };
233
243
  this.handleContainerDragOver = e => {
234
244
  handlePrevent(e);
235
245
  };
@@ -246,7 +256,8 @@ export default class ChatFoundation extends BaseFoundation {
246
256
  // 鼠标移动至 container 的子元素,则不做任何操作
247
257
  // If the mouse moves to the child element of container, no operation will be performed.
248
258
  const dropAreaElement = this._adapter.getDropAreaElement();
249
- if (dropAreaElement !== e.target && dropAreaElement.contains(e.target)) {
259
+ const enterTarget = e.relatedTarget;
260
+ if (dropAreaElement.contains(enterTarget)) {
250
261
  return;
251
262
  }
252
263
  /**
@@ -48,9 +48,9 @@ export default class YearAndMonthFoundation extends BaseFoundation {
48
48
  const right = strings.PANEL_TYPE_RIGHT;
49
49
  const month = copy(currentMonth);
50
50
  month[panelType] = item.month;
51
- // make sure the right panel time is always less than the left panel time
51
+ // Make sure the time on the right panel is always greater than or equal to the time on the left panel
52
52
  if (type === 'monthRange' && panelType === left && currentYear[left] === currentYear[right] && item.value > month[right]) {
53
- month[right] = item.month + 1;
53
+ month[right] = item.month;
54
54
  }
55
55
  this._adapter.setCurrentMonth(month);
56
56
  this._adapter.notifySelectMonth(month);
@@ -67,8 +67,17 @@ export default class YearAndMonthFoundation extends BaseFoundation {
67
67
  months,
68
68
  currentMonth
69
69
  } = this._adapter.getStates();
70
+ const oppositeType = panelType === strings.PANEL_TYPE_LEFT ? 'right' : 'left';
70
71
  const currentDate = setYear(Date.now(), item.year);
71
72
  const isCurrentMonthDisabled = disabledDate(setMonth(currentDate, currentMonth[panelType] - 1));
73
+ // whether the date on the opposite is legal
74
+ const isOppositeMonthDisabled = disabledDate(setMonth(setYear(Date.now(), year[oppositeType]), currentMonth[oppositeType] - 1));
75
+ if (!isCurrentMonthDisabled && !isOppositeMonthDisabled) {
76
+ // all panel Date is legal
77
+ return;
78
+ }
79
+ let finalYear = year;
80
+ let finalMonth = currentMonth;
72
81
  if (isCurrentMonthDisabled) {
73
82
  const currentIndex = months.findIndex(_ref => {
74
83
  let {
@@ -92,14 +101,36 @@ export default class YearAndMonthFoundation extends BaseFoundation {
92
101
  return !disabledDate(setMonth(currentDate, month - 1));
93
102
  });
94
103
  }
95
- if (validMonth) {
96
- const month = copy(currentMonth);
97
- month[panelType] = validMonth.month;
98
- // change year and month same time
99
- this._adapter.setCurrentYearAndMonth(year, month);
100
- this._adapter.notifySelectYearAndMonth(year, month);
104
+ if (validMonth && !isOppositeMonthDisabled) {
105
+ // only currentPanel Date is illegal
106
+ // just need to modify the month of the current panel
107
+ finalMonth[panelType] = validMonth.month;
108
+ } else if (validMonth && isOppositeMonthDisabled) {
109
+ // all panel Date is illegal
110
+ // change the value to the legal value calculated by the current panel
111
+ finalYear = {
112
+ 'left': item.year,
113
+ 'right': item.year
114
+ };
115
+ finalMonth = {
116
+ 'left': validMonth.month,
117
+ 'right': validMonth.month
118
+ };
101
119
  }
120
+ } else if (!isCurrentMonthDisabled && isOppositeMonthDisabled) {
121
+ // only opposite panel Date is illegal
122
+ // change the value to the legal value in the current panel
123
+ finalYear = {
124
+ 'left': item.year,
125
+ 'right': item.year
126
+ };
127
+ finalMonth = {
128
+ 'left': currentMonth[panelType],
129
+ 'right': currentMonth[panelType]
130
+ };
102
131
  }
132
+ this._adapter.setCurrentYearAndMonth(finalYear, finalMonth);
133
+ this._adapter.notifySelectYearAndMonth(finalYear, finalMonth);
103
134
  }
104
135
  backToMain() {
105
136
  this._adapter.notifyBackToMain();
@@ -10,6 +10,7 @@ export interface MarkdownRenderBaseProps {
10
10
  format: "md" | "mdx";
11
11
  remarkPlugins?: PluggableList;
12
12
  rehypePlugins?: PluggableList;
13
+ remarkGfm?: boolean;
13
14
  }
14
15
  export interface MarkdownRenderBaseState {
15
16
  MDXContentComponent: any;
@@ -32,17 +32,22 @@ class MarkdownRenderFoundation extends BaseFoundation {
32
32
  constructor() {
33
33
  super(...arguments);
34
34
  this.getOptions = () => {
35
- var _a, _b, _c, _d;
35
+ var _a, _b, _c;
36
+ const enableRemarkGfm = this._adapter.getProp("remarkGfm");
37
+ const remarkPlugins = [...((_a = this.getProp("remarkPlugins")) !== null && _a !== void 0 ? _a : [])];
38
+ if (enableRemarkGfm) {
39
+ remarkPlugins.unshift(remarkGfm);
40
+ }
36
41
  return {
37
42
  evaluateOptions: {
38
- remarkPlugins: [remarkGfm, ...((_a = this.getProp("remarkPlugins")) !== null && _a !== void 0 ? _a : [])],
43
+ remarkPlugins: remarkPlugins,
39
44
  rehypePlugins: (_b = this.getProp("rehypePlugins")) !== null && _b !== void 0 ? _b : [],
40
45
  format: this.getProp("format")
41
46
  },
42
47
  compileOptions: {
43
48
  format: this.getProp("format"),
44
- remarkPlugins: [remarkGfm, ...((_c = this.getProp("remarkPlugins")) !== null && _c !== void 0 ? _c : [])],
45
- rehypePlugins: (_d = this.getProp("rehypePlugins")) !== null && _d !== void 0 ? _d : []
49
+ remarkPlugins: remarkPlugins,
50
+ rehypePlugins: (_c = this.getProp("rehypePlugins")) !== null && _c !== void 0 ? _c : []
46
51
  },
47
52
  runOptions: {}
48
53
  };
@@ -2,7 +2,7 @@ declare const cssClasses: {
2
2
  PREFIX: string;
3
3
  };
4
4
  declare const strings: {
5
- BOUNDARY_SET: ("start" | "end")[];
5
+ BOUNDARY_SET: ("end" | "start")[];
6
6
  POSITION_SET: string[];
7
7
  MODE_SET: string[];
8
8
  MODE_MAP: {
@@ -1,4 +1,2 @@
1
- import { ResizableHandlerAdapter, ResizableHandlerFoundation, ResizableFoundation, ResizableAdapter } from './single';
2
- export { ResizableHandlerAdapter, ResizableHandlerFoundation, ResizableFoundation, ResizableAdapter };
3
- import { ResizeGroupAdapter, ResizeItemAdapter, ResizeHandlerAdapter, ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation } from './group';
4
- export { ResizeGroupAdapter, ResizeItemAdapter, ResizeHandlerAdapter, ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation };
1
+ export { ResizableHandlerAdapter, ResizableHandlerFoundation, ResizableFoundation, ResizableAdapter } from './single';
2
+ export { ResizeGroupAdapter, ResizeItemAdapter, ResizeHandlerAdapter, ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation } from './group';
@@ -1,4 +1,2 @@
1
- import { ResizableHandlerFoundation, ResizableFoundation } from './single';
2
- export { ResizableHandlerFoundation, ResizableFoundation };
3
- import { ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation } from './group';
4
- export { ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation };
1
+ export { ResizableHandlerFoundation, ResizableFoundation } from './single';
2
+ export { ResizeGroupFoundation, ResizeItemFoundation, ResizeHandlerFoundation } from './group';
@@ -1,5 +1,6 @@
1
+ /// <reference types="lodash" />
1
2
  import BaseFoundation, { DefaultAdapter } from '../../base/foundation';
2
- import { ResizeStartCallback, ResizeCallback } from "../singleConstants";
3
+ import { ResizeStartCallback, ResizeCallback } from "../types";
3
4
  export interface ResizeHandlerAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
4
5
  registerEvents: () => void;
5
6
  unregisterEvents: () => void;
@@ -34,10 +35,11 @@ export interface ResizeGroupAdapter<P = Record<string, any>, S = Record<string,
34
35
  export declare class ResizeGroupFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<ResizeGroupAdapter<P, S>, P, S> {
35
36
  constructor(adapter: ResizeGroupAdapter<P, S>);
36
37
  get groupRef(): HTMLDivElement | null;
38
+ get groupSize(): number;
37
39
  direction: 'horizontal' | 'vertical';
38
40
  itemMinusMap: Map<number, number>;
39
41
  totalMinus: number;
40
- avaliableSize: number;
42
+ itemPercentMap: Map<number, number>;
41
43
  init(): void;
42
44
  get window(): Window | null;
43
45
  registerEvents: () => void;
@@ -45,6 +47,7 @@ export declare class ResizeGroupFoundation<P = Record<string, any>, S = Record<s
45
47
  onResizeStart: (handlerIndex: number, e: MouseEvent) => void;
46
48
  onResizing: (e: MouseEvent) => void;
47
49
  onResizeEnd: (e: MouseEvent) => void;
48
- calculateSpace: () => void;
50
+ initSpace: () => void;
51
+ ensureConstraint: import("lodash").DebouncedFunc<() => void>;
49
52
  destroy(): void;
50
53
  }