@antv/l7-component 2.21.0 → 2.21.2

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 (83) hide show
  1. package/es/assets/iconfont/iconfont.js +6 -6
  2. package/es/constants/index.js +2 -2
  3. package/es/control/baseControl/buttonControl.js +109 -144
  4. package/es/control/baseControl/control.js +212 -258
  5. package/es/control/baseControl/popperControl.js +67 -95
  6. package/es/control/baseControl/selectControl.js +132 -178
  7. package/es/control/exportImage.js +59 -142
  8. package/es/control/fullscreen.js +69 -100
  9. package/es/control/geoLocate.js +37 -84
  10. package/es/control/layerSwitch.js +111 -154
  11. package/es/control/logo.js +43 -69
  12. package/es/control/mapTheme.js +57 -98
  13. package/es/control/mouseLocation.js +37 -69
  14. package/es/control/scale.js +107 -135
  15. package/es/control/swipe.js +297 -393
  16. package/es/control/zoom.js +80 -112
  17. package/es/css/index.css +10 -7
  18. package/es/index.js +667 -1
  19. package/es/marker-layer.js +274 -326
  20. package/es/marker.d.ts +0 -2
  21. package/es/marker.js +394 -453
  22. package/es/popup/layerPopup.js +277 -321
  23. package/es/popup/popup.js +422 -482
  24. package/es/utils/anchor.js +6 -6
  25. package/es/utils/icon.js +4 -4
  26. package/es/utils/popper.js +180 -196
  27. package/es/utils/screenfull.js +29 -51
  28. package/lib/assets/iconfont/iconfont.js +6 -6
  29. package/lib/constants/index.d.ts +60 -0
  30. package/lib/constants/index.js +2 -2
  31. package/lib/control/baseControl/buttonControl.d.ts +60 -0
  32. package/lib/control/baseControl/buttonControl.js +110 -143
  33. package/lib/control/baseControl/control.d.ts +112 -0
  34. package/lib/control/baseControl/control.js +213 -257
  35. package/lib/control/baseControl/index.d.ts +4 -0
  36. package/lib/control/baseControl/index.js +5 -5
  37. package/lib/control/baseControl/popperControl.d.ts +28 -0
  38. package/lib/control/baseControl/popperControl.js +68 -94
  39. package/lib/control/baseControl/selectControl.d.ts +53 -0
  40. package/lib/control/baseControl/selectControl.js +133 -177
  41. package/lib/control/exportImage.d.ts +19 -0
  42. package/lib/control/exportImage.js +60 -141
  43. package/lib/control/fullscreen.d.ts +20 -0
  44. package/lib/control/fullscreen.js +70 -99
  45. package/lib/control/geoLocate.d.ts +17 -0
  46. package/lib/control/geoLocate.js +38 -83
  47. package/lib/control/layerSwitch.d.ts +27 -0
  48. package/lib/control/layerSwitch.js +112 -153
  49. package/lib/control/logo.d.ts +14 -0
  50. package/lib/control/logo.js +44 -69
  51. package/lib/control/mapTheme.d.ts +11 -0
  52. package/lib/control/mapTheme.js +58 -97
  53. package/lib/control/mouseLocation.d.ts +16 -0
  54. package/lib/control/mouseLocation.js +38 -68
  55. package/lib/control/scale.d.ts +35 -0
  56. package/lib/control/scale.js +108 -134
  57. package/lib/control/swipe.d.ts +66 -0
  58. package/lib/control/swipe.js +298 -392
  59. package/lib/control/zoom.d.ts +39 -0
  60. package/lib/control/zoom.js +81 -111
  61. package/lib/css/index.css +10 -7
  62. package/lib/index.d.ts +19 -0
  63. package/lib/index.js +683 -17
  64. package/lib/interface.d.ts +18 -0
  65. package/lib/marker-layer.d.ts +55 -0
  66. package/lib/marker-layer.js +276 -324
  67. package/lib/marker.d.ts +58 -0
  68. package/lib/marker.js +395 -452
  69. package/lib/popup/layerPopup.d.ts +99 -0
  70. package/lib/popup/layerPopup.js +278 -320
  71. package/lib/popup/popup.d.ts +142 -0
  72. package/lib/popup/popup.js +423 -481
  73. package/lib/utils/anchor.d.ts +22 -0
  74. package/lib/utils/anchor.js +6 -6
  75. package/lib/utils/icon.d.ts +1 -0
  76. package/lib/utils/icon.js +6 -5
  77. package/lib/utils/popper.d.ts +76 -0
  78. package/lib/utils/popper.js +184 -196
  79. package/lib/utils/screenfull.d.ts +2 -0
  80. package/lib/utils/screenfull.js +29 -52
  81. package/package.json +16 -20
  82. package/CHANGELOG.md +0 -325
  83. package/LICENSE.md +0 -21
@@ -7,305 +7,261 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.Control = void 0;
8
8
  Object.defineProperty(exports, "PositionType", {
9
9
  enumerable: true,
10
- get: function get() {
10
+ get: function () {
11
11
  return _l7Core.PositionType;
12
12
  }
13
13
  });
14
14
  exports.default = void 0;
15
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
16
15
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
17
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
18
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
19
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
20
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
21
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
22
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
23
17
  var _l7Core = require("@antv/l7-core");
24
18
  var _l7Utils = require("@antv/l7-utils");
25
19
  var _eventemitter = _interopRequireDefault(require("eventemitter3"));
26
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
27
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
28
- var Control = exports.default = exports.Control = /*#__PURE__*/function (_ref) {
29
- (0, _inherits2.default)(Control, _ref);
30
- var _super = _createSuper(Control);
31
- /**
32
- * 当前控件实例配置
33
- */
20
+ class Control extends _eventemitter.default {
21
+ constructor(option) {
22
+ super();
23
+ /**
24
+ * 当前控件实例配置
25
+ */
26
+ (0, _defineProperty2.default)(this, "controlOption", void 0);
27
+ /**
28
+ * 控件的 DOM 容器
29
+ * @protected
30
+ */
31
+ (0, _defineProperty2.default)(this, "container", void 0);
32
+ /**
33
+ * 当前控件是否显示
34
+ * @protected
35
+ */
36
+ (0, _defineProperty2.default)(this, "isShow", void 0);
37
+ (0, _defineProperty2.default)(this, "sceneContainer", void 0);
38
+ (0, _defineProperty2.default)(this, "scene", void 0);
39
+ (0, _defineProperty2.default)(this, "mapsService", void 0);
40
+ (0, _defineProperty2.default)(this, "renderService", void 0);
41
+ (0, _defineProperty2.default)(this, "layerService", void 0);
42
+ (0, _defineProperty2.default)(this, "controlService", void 0);
43
+ (0, _defineProperty2.default)(this, "configService", void 0);
44
+ Control.controlCount++;
45
+ this.controlOption = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.getDefault(option)), option || {});
46
+ }
47
+ getOptions() {
48
+ return this.controlOption;
49
+ }
34
50
 
35
51
  /**
36
- * 控件的 DOM 容器
37
- * @protected
52
+ * 更新配置的方法,子类如果有自己的配置,也需要重写该方法
53
+ * @param newOptions
38
54
  */
55
+ setOptions(newOptions) {
56
+ const defaultOptions = this.getDefault(newOptions);
57
+ Object.entries(newOptions).forEach(([key, value]) => {
58
+ if (value === undefined) {
59
+ newOptions[key] = defaultOptions[key];
60
+ }
61
+ });
62
+ if ('position' in newOptions) {
63
+ this.setPosition(newOptions.position);
64
+ }
65
+ if ('className' in newOptions) {
66
+ this.setClassName(newOptions.className);
67
+ }
68
+ if ('style' in newOptions) {
69
+ this.setStyle(newOptions.style);
70
+ }
71
+ this.controlOption = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.controlOption), newOptions);
72
+ }
39
73
 
40
74
  /**
41
- * 当前控件是否显示
42
- * @protected
75
+ * 当 Control 被添加至 Scene 中,被 controlService 调用的方法
76
+ * @param sceneContainer
43
77
  */
78
+ addTo(sceneContainer) {
79
+ // 初始化各个 Service 实例
80
+ this.mapsService = sceneContainer.mapService;
81
+ this.renderService = sceneContainer.rendererService;
82
+ this.layerService = sceneContainer.layerService;
83
+ this.controlService = sceneContainer.controlService;
84
+ this.configService = sceneContainer.globalConfigService;
85
+ this.scene = sceneContainer.sceneService;
86
+ this.sceneContainer = sceneContainer;
87
+ this.isShow = true;
44
88
 
45
- function Control(option) {
46
- var _this;
47
- (0, _classCallCheck2.default)(this, Control);
48
- _this = _super.call(this);
49
- Control.controlCount++;
50
- _this.controlOption = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _this.getDefault(option)), option || {});
51
- return _this;
52
- }
53
- (0, _createClass2.default)(Control, [{
54
- key: "getOptions",
55
- value: function getOptions() {
56
- return this.controlOption;
89
+ // 初始化 container
90
+ this.container = this.onAdd();
91
+ _l7Utils.DOM.addClass(this.container, 'l7-control');
92
+ const {
93
+ className,
94
+ style
95
+ } = this.controlOption;
96
+ if (className) {
97
+ this.setClassName(className);
57
98
  }
58
-
59
- /**
60
- * 更新配置的方法,子类如果有自己的配置,也需要重写该方法
61
- * @param newOptions
62
- */
63
- }, {
64
- key: "setOptions",
65
- value: function setOptions(newOptions) {
66
- var defaultOptions = this.getDefault(newOptions);
67
- Object.entries(newOptions).forEach(function (_ref2) {
68
- var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
69
- key = _ref3[0],
70
- value = _ref3[1];
71
- if (value === undefined) {
72
- newOptions[key] = defaultOptions[key];
73
- }
74
- });
75
- if ('position' in newOptions) {
76
- this.setPosition(newOptions.position);
77
- }
78
- if ('className' in newOptions) {
79
- this.setClassName(newOptions.className);
80
- }
81
- if ('style' in newOptions) {
82
- this.setStyle(newOptions.style);
83
- }
84
- this.controlOption = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, this.controlOption), newOptions);
99
+ if (style) {
100
+ this.setStyle(style);
85
101
  }
102
+ // 将 container 插入容器中
103
+ this.insertContainer();
104
+ this.emit('add', this);
105
+ return this;
106
+ }
86
107
 
87
- /**
88
- * 当 Control 被添加至 Scene 中,被 controlService 调用的方法
89
- * @param sceneContainer
90
- */
91
- }, {
92
- key: "addTo",
93
- value: function addTo(sceneContainer) {
94
- // 初始化各个 Service 实例
95
- this.mapsService = sceneContainer.mapService;
96
- this.renderService = sceneContainer.rendererService;
97
- this.layerService = sceneContainer.layerService;
98
- this.controlService = sceneContainer.controlService;
99
- this.configService = sceneContainer.globalConfigService;
100
- this.scene = sceneContainer.sceneService;
101
- this.sceneContainer = sceneContainer;
102
- this.isShow = true;
103
-
104
- // 初始化 container
105
- this.container = this.onAdd();
106
- _l7Utils.DOM.addClass(this.container, 'l7-control');
107
- var _this$controlOption = this.controlOption,
108
- className = _this$controlOption.className,
109
- style = _this$controlOption.style;
110
- if (className) {
111
- this.setClassName(className);
112
- }
113
- if (style) {
114
- this.setStyle(style);
115
- }
116
- // 将 container 插入容器中
117
- this.insertContainer();
118
- this.emit('add', this);
108
+ /**
109
+ * 将控件移除时触发
110
+ */
111
+ remove() {
112
+ if (!this.mapsService) {
119
113
  return this;
120
114
  }
115
+ _l7Utils.DOM.remove(this.container);
116
+ this.onRemove();
117
+ this.emit('remove', this);
118
+ }
121
119
 
122
- /**
123
- * 将控件移除时触发
124
- */
125
- }, {
126
- key: "remove",
127
- value: function remove() {
128
- if (!this.mapsService) {
129
- return this;
130
- }
131
- _l7Utils.DOM.remove(this.container);
132
- this.onRemove();
133
- this.emit('remove', this);
134
- }
120
+ /**
121
+ * Control 被添加的时候被调用,返回 Control 对应的 DOM 容器
122
+ */
123
+ onAdd() {
124
+ return _l7Utils.DOM.create('div');
125
+ }
135
126
 
136
- /**
137
- * Control 被添加的时候被调用,返回 Control 对应的 DOM 容器
138
- */
139
- }, {
140
- key: "onAdd",
141
- value: function onAdd() {
142
- return _l7Utils.DOM.create('div');
143
- }
127
+ /**
128
+ * Control 被移除时调用
129
+ */
130
+ // tslint:disable-next-line:no-empty
131
+ onRemove() {}
144
132
 
145
- /**
146
- * Control 被移除时调用
147
- */
148
- // tslint:disable-next-line:no-empty
149
- }, {
150
- key: "onRemove",
151
- value: function onRemove() {}
133
+ /**
134
+ * 显示控件时触发
135
+ */
136
+ show() {
137
+ const container = this.container;
138
+ _l7Utils.DOM.removeClass(container, 'l7-control--hide');
139
+ this.isShow = true;
140
+ this.emit('show', this);
141
+ }
152
142
 
153
- /**
154
- * 显示控件时触发
155
- */
156
- }, {
157
- key: "show",
158
- value: function show() {
159
- var container = this.container;
160
- _l7Utils.DOM.removeClass(container, 'l7-control--hide');
161
- this.isShow = true;
162
- this.emit('show', this);
163
- }
143
+ /**
144
+ * 隐藏控件时触发
145
+ */
146
+ hide() {
147
+ const container = this.container;
148
+ _l7Utils.DOM.addClass(container, 'l7-control--hide');
149
+ this.isShow = false;
150
+ this.emit('hide', this);
151
+ }
164
152
 
165
- /**
166
- * 隐藏控件时触发
167
- */
168
- }, {
169
- key: "hide",
170
- value: function hide() {
171
- var container = this.container;
172
- _l7Utils.DOM.addClass(container, 'l7-control--hide');
173
- this.isShow = false;
174
- this.emit('hide', this);
175
- }
153
+ /**
154
+ * 获取默认构造器参数
155
+ */
156
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
157
+ getDefault(option) {
158
+ // tslint:disable-next-line:no-object-literal-type-assertion
159
+ return {
160
+ position: _l7Core.PositionType.TOPRIGHT,
161
+ name: `${Control.controlCount}`
162
+ };
163
+ }
176
164
 
177
- /**
178
- * 获取默认构造器参数
179
- */
180
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
181
- }, {
182
- key: "getDefault",
183
- value: function getDefault(option) {
184
- // tslint:disable-next-line:no-object-literal-type-assertion
185
- return {
186
- position: _l7Core.PositionType.TOPRIGHT,
187
- name: "".concat(Control.controlCount)
188
- };
189
- }
165
+ /**
166
+ * 获取当前控件对应的 DOM 容器
167
+ */
168
+ getContainer() {
169
+ return this.container;
170
+ }
190
171
 
191
- /**
192
- * 获取当前控件对应的 DOM 容器
193
- */
194
- }, {
195
- key: "getContainer",
196
- value: function getContainer() {
197
- return this.container;
172
+ /**
173
+ * 获取当前 Control 是否展示
174
+ */
175
+ getIsShow() {
176
+ return this.isShow;
177
+ }
178
+ _refocusOnMap(e) {
179
+ // if map exists and event is not a keyboard event
180
+ if (this.mapsService && e && e.screenX > 0 && e.screenY > 0) {
181
+ const container = this.mapsService.getContainer();
182
+ if (container !== null) {
183
+ container.focus();
184
+ }
198
185
  }
186
+ }
199
187
 
200
- /**
201
- * 获取当前 Control 是否展示
202
- */
203
- }, {
204
- key: "getIsShow",
205
- value: function getIsShow() {
206
- return this.isShow;
188
+ /**
189
+ * 设置当前控件位置
190
+ * @param position
191
+ */
192
+ setPosition(position = _l7Core.PositionType.TOPLEFT) {
193
+ // 考虑组件的自动布局,需要销毁重建
194
+ const controlService = this.controlService;
195
+ if (controlService) {
196
+ controlService.removeControl(this);
207
197
  }
208
- }, {
209
- key: "_refocusOnMap",
210
- value: function _refocusOnMap(e) {
211
- // if map exists and event is not a keyboard event
212
- if (this.mapsService && e && e.screenX > 0 && e.screenY > 0) {
213
- var container = this.mapsService.getContainer();
214
- if (container !== null) {
215
- container.focus();
216
- }
217
- }
198
+ this.controlOption.position = position;
199
+ if (controlService) {
200
+ controlService.addControl(this, this.sceneContainer);
218
201
  }
202
+ return this;
203
+ }
219
204
 
220
- /**
221
- * 设置当前控件位置
222
- * @param position
223
- */
224
- }, {
225
- key: "setPosition",
226
- value: function setPosition() {
227
- var position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _l7Core.PositionType.TOPLEFT;
228
- // 考虑组件的自动布局,需要销毁重建
229
- var controlService = this.controlService;
230
- if (controlService) {
231
- controlService.removeControl(this);
232
- }
233
- this.controlOption.position = position;
234
- if (controlService) {
235
- controlService.addControl(this, this.sceneContainer);
236
- }
237
- return this;
205
+ /**
206
+ * 设置容器 container 的样式相关位置,包含 className
207
+ * @param className
208
+ */
209
+ setClassName(className) {
210
+ const container = this.container;
211
+ const {
212
+ className: oldClassName
213
+ } = this.controlOption;
214
+ if (oldClassName) {
215
+ _l7Utils.DOM.removeClass(container, oldClassName);
238
216
  }
239
-
240
- /**
241
- * 设置容器 container 的样式相关位置,包含 className
242
- * @param className
243
- */
244
- }, {
245
- key: "setClassName",
246
- value: function setClassName(className) {
247
- var container = this.container;
248
- var oldClassName = this.controlOption.className;
249
- if (oldClassName) {
250
- _l7Utils.DOM.removeClass(container, oldClassName);
251
- }
252
- if (className) {
253
- _l7Utils.DOM.addClass(container, className);
254
- }
217
+ if (className) {
218
+ _l7Utils.DOM.addClass(container, className);
255
219
  }
220
+ }
256
221
 
257
- /**
258
- * 设置容器 container 的样式相关位置,包含 style
259
- * @param style
260
- */
261
- }, {
262
- key: "setStyle",
263
- value: function setStyle(style) {
264
- var container = this.container;
265
- if (style) {
266
- container.setAttribute('style', style);
267
- } else {
268
- container.removeAttribute('style');
269
- }
222
+ /**
223
+ * 设置容器 container 的样式相关位置,包含 style
224
+ * @param style
225
+ */
226
+ setStyle(style) {
227
+ const container = this.container;
228
+ if (style) {
229
+ container.setAttribute('style', style);
230
+ } else {
231
+ container.removeAttribute('style');
270
232
  }
233
+ }
271
234
 
272
- /**
273
- * 将控件 DOM 插入到对应 position 的容器中
274
- * @protected
275
- */
276
- }, {
277
- key: "insertContainer",
278
- value: function insertContainer() {
279
- var position = this.controlOption.position;
280
- var container = this.container;
281
- if (position instanceof Element) {
282
- position.appendChild(container);
235
+ /**
236
+ * 将控件 DOM 插入到对应 position 的容器中
237
+ * @protected
238
+ */
239
+ insertContainer() {
240
+ const position = this.controlOption.position;
241
+ const container = this.container;
242
+ if (position instanceof Element) {
243
+ position.appendChild(container);
244
+ } else {
245
+ const corner = this.controlService.controlCorners[position];
246
+ if (['bottomleft', 'bottomright', 'righttop', 'rightbottom'].includes(position)) {
247
+ corner.insertBefore(container, corner.firstChild);
283
248
  } else {
284
- var corner = this.controlService.controlCorners[position];
285
- if (['bottomleft', 'bottomright', 'righttop', 'rightbottom'].includes(position)) {
286
- corner.insertBefore(container, corner.firstChild);
287
- } else {
288
- corner.appendChild(container);
289
- }
249
+ corner.appendChild(container);
290
250
  }
291
251
  }
252
+ }
292
253
 
293
- /**
294
- * 检查当前传入 option 是否包含 keys 字段
295
- * @param option
296
- * @param keys
297
- * @protected
298
- */
299
- }, {
300
- key: "checkUpdateOption",
301
- value: function checkUpdateOption(option, keys) {
302
- return keys.some(function (key) {
303
- return key in option;
304
- });
305
- }
306
- }]);
307
- return Control;
308
- }(_eventemitter.default);
254
+ /**
255
+ * 检查当前传入 option 是否包含 keys 字段
256
+ * @param option
257
+ * @param keys
258
+ * @protected
259
+ */
260
+ checkUpdateOption(option, keys) {
261
+ return keys.some(key => key in option);
262
+ }
263
+ }
264
+ exports.default = exports.Control = Control;
309
265
  /**
310
266
  * 当前类型控件实例个数
311
267
  * @protected
@@ -0,0 +1,4 @@
1
+ export { ButtonControl, type IButtonControlOption } from './buttonControl';
2
+ export { Control, PositionType, type IControlOption } from './control';
3
+ export { PopperControl, type IPopperControlOption } from './popperControl';
4
+ export { SelectControl, type ControlOptionItem, type ISelectControlOption, } from './selectControl';
@@ -5,31 +5,31 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "ButtonControl", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _buttonControl.ButtonControl;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "Control", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _control.Control;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "PopperControl", {
19
19
  enumerable: true,
20
- get: function get() {
20
+ get: function () {
21
21
  return _popperControl.PopperControl;
22
22
  }
23
23
  });
24
24
  Object.defineProperty(exports, "PositionType", {
25
25
  enumerable: true,
26
- get: function get() {
26
+ get: function () {
27
27
  return _control.PositionType;
28
28
  }
29
29
  });
30
30
  Object.defineProperty(exports, "SelectControl", {
31
31
  enumerable: true,
32
- get: function get() {
32
+ get: function () {
33
33
  return _selectControl.SelectControl;
34
34
  }
35
35
  });
@@ -0,0 +1,28 @@
1
+ import type { PopperPlacement, PopperTrigger } from '../../utils/popper';
2
+ import { Popper } from '../../utils/popper';
3
+ import type { IButtonControlOption } from './buttonControl';
4
+ import ButtonControl from './buttonControl';
5
+ export { PopperControl };
6
+ export interface IPopperControlOption extends IButtonControlOption {
7
+ popperPlacement: PopperPlacement;
8
+ popperClassName?: string;
9
+ popperTrigger: PopperTrigger;
10
+ }
11
+ export default class PopperControl<O extends IPopperControlOption = IPopperControlOption> extends ButtonControl<O> {
12
+ /**
13
+ * 气泡实例
14
+ * @protected
15
+ */
16
+ protected popper: Popper;
17
+ getPopper(): Popper;
18
+ hide(): void;
19
+ /**
20
+ * 获取默认配置
21
+ * @param option
22
+ */
23
+ getDefault(option?: Partial<O>): O;
24
+ onAdd(): HTMLElement;
25
+ onRemove(): void;
26
+ initPopper(): Popper;
27
+ setOptions(option: Partial<O>): void;
28
+ }