@king-design/react 3.1.4 → 3.1.5
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/__tests__/components/cascader.spec.tsx +1 -1
- package/components/cascader/index.spec.js +67 -4
- package/components/cascader/useValue.js +1 -1
- package/components/diagram/index.d.ts +1 -1
- package/components/dropdown/menu.js +2 -0
- package/components/dropdown/usePosition.d.ts +1 -0
- package/components/dropdown/usePosition.js +12 -1
- package/components/select/useFocusout.d.ts +1 -1
- package/components/select/useFocusout.js +1 -1
- package/components/steps/context.d.ts +3 -3
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +2 -2
- package/yarn-error.log +38 -38
- package/components/cascader/index.d.ts +0 -45
- package/components/datepicker/index.d.ts +0 -63
- package/components/select/select.d.ts +0 -33
- package/components/timepicker/panelPicker.d.ts +0 -54
- package/components/treeSelect/index.d.ts +0 -28
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {createRef, useState} from 'react';
|
|
2
2
|
import * as ReactDOM from 'react-dom';
|
|
3
|
-
import {Cascader} from '../../';
|
|
3
|
+
import {Cascader, Card} from '../../';
|
|
4
4
|
import {Component} from 'intact-react';
|
|
5
5
|
import {getElement, wait, dispatchEvent} from '../../../../test/utils';
|
|
6
6
|
|
|
@@ -160,7 +160,7 @@ describe('Cascader', function () {
|
|
|
160
160
|
}, _callee5);
|
|
161
161
|
})));
|
|
162
162
|
it('filter', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
163
|
-
var _mount5, instance, element, input, dropdown, dropdown1;
|
|
163
|
+
var _mount5, instance, element, input, dropdown, dropdown1, _getElements2, _dropdown1, _dropdown2, _dropdown3;
|
|
164
164
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
165
165
|
while (1) switch (_context6.prev = _context6.next) {
|
|
166
166
|
case 0:
|
|
@@ -207,7 +207,16 @@ describe('Cascader', function () {
|
|
|
207
207
|
return wait();
|
|
208
208
|
case 34:
|
|
209
209
|
expect(instance.get('value')).to.eql(['hunan', 'yueyang', 'yueyanglou']);
|
|
210
|
-
|
|
210
|
+
// show again to test the position
|
|
211
|
+
input.click();
|
|
212
|
+
_context6.next = 38;
|
|
213
|
+
return wait();
|
|
214
|
+
case 38:
|
|
215
|
+
_getElements2 = getElements('.k-cascader-menu'), _dropdown1 = _getElements2[0], _dropdown2 = _getElements2[1], _dropdown3 = _getElements2[2];
|
|
216
|
+
expect(_dropdown1.style.top).not.eql('0px');
|
|
217
|
+
expect(_dropdown2.style.top).not.eql('0px');
|
|
218
|
+
expect(_dropdown3.style.top).not.eql('0px');
|
|
219
|
+
case 42:
|
|
211
220
|
case "end":
|
|
212
221
|
return _context6.stop();
|
|
213
222
|
}
|
|
@@ -234,7 +243,7 @@ describe('Cascader', function () {
|
|
|
234
243
|
}, _callee7);
|
|
235
244
|
})));
|
|
236
245
|
it('duplicated sub data', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
|
237
|
-
var Demo, _mount7, instance, element,
|
|
246
|
+
var Demo, _mount7, instance, element, _getElements3, dropdown1, dropdown2, _dropdown1$querySelec4, item1, item2, _dropdown2$querySelec3, item21, dropdown3, _dropdown3$querySelec2, item31;
|
|
238
247
|
return _regeneratorRuntime.wrap(function _callee8$(_context9) {
|
|
239
248
|
while (1) switch (_context9.prev = _context9.next) {
|
|
240
249
|
case 0:
|
|
@@ -278,7 +287,7 @@ describe('Cascader', function () {
|
|
|
278
287
|
_context9.next = 6;
|
|
279
288
|
return wait();
|
|
280
289
|
case 6:
|
|
281
|
-
|
|
290
|
+
_getElements3 = getElements('.k-cascader-menu'), dropdown1 = _getElements3[0], dropdown2 = _getElements3[1];
|
|
282
291
|
_dropdown1$querySelec4 = dropdown1.querySelectorAll(':scope > .k-dropdown-item'), item1 = _dropdown1$querySelec4[0], item2 = _dropdown1$querySelec4[1];
|
|
283
292
|
expect(item1.classList.contains('k-selected')).to.be.true;
|
|
284
293
|
expect(item2.classList.contains('k-selected')).to.be.false;
|
|
@@ -370,4 +379,58 @@ describe('Cascader', function () {
|
|
|
370
379
|
}
|
|
371
380
|
}, _callee9);
|
|
372
381
|
})));
|
|
382
|
+
it('should select correct value', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
|
383
|
+
var Demo, _mount9, instance, element, _getElements4, dropdown1, dropdown2, _dropdown1$querySelec6, item1, item2;
|
|
384
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context13) {
|
|
385
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
386
|
+
case 0:
|
|
387
|
+
Demo = /*#__PURE__*/function (_Component3) {
|
|
388
|
+
_inheritsLoose(Demo, _Component3);
|
|
389
|
+
function Demo() {
|
|
390
|
+
var _context12;
|
|
391
|
+
var _this3;
|
|
392
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
393
|
+
args[_key3] = arguments[_key3];
|
|
394
|
+
}
|
|
395
|
+
_this3 = _Component3.call.apply(_Component3, _concatInstanceProperty(_context12 = [this]).call(_context12, args)) || this;
|
|
396
|
+
_this3.Cascader = Cascader;
|
|
397
|
+
return _this3;
|
|
398
|
+
}
|
|
399
|
+
Demo.defaults = function defaults() {
|
|
400
|
+
return {
|
|
401
|
+
value: ['beijing', 'haidian'],
|
|
402
|
+
data: [{
|
|
403
|
+
value: 'beijing',
|
|
404
|
+
label: '北京',
|
|
405
|
+
children: [{
|
|
406
|
+
value: 'haidian',
|
|
407
|
+
label: '海淀区'
|
|
408
|
+
}]
|
|
409
|
+
}, {
|
|
410
|
+
value: 'hunan',
|
|
411
|
+
label: '湖南'
|
|
412
|
+
}]
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
return Demo;
|
|
416
|
+
}(Component);
|
|
417
|
+
Demo.template = "\n const {Cascader} = this;\n <Cascader data={this.get('data')} v-model=\"value\" />\n ";
|
|
418
|
+
_mount9 = mount(Demo), instance = _mount9[0], element = _mount9[1];
|
|
419
|
+
dispatchEvent(element, 'click');
|
|
420
|
+
_context13.next = 6;
|
|
421
|
+
return wait();
|
|
422
|
+
case 6:
|
|
423
|
+
_getElements4 = getElements('.k-cascader-menu'), dropdown1 = _getElements4[0], dropdown2 = _getElements4[1];
|
|
424
|
+
_dropdown1$querySelec6 = dropdown1.querySelectorAll(':scope > .k-dropdown-item'), item1 = _dropdown1$querySelec6[0], item2 = _dropdown1$querySelec6[1];
|
|
425
|
+
dispatchEvent(item2, 'click');
|
|
426
|
+
_context13.next = 11;
|
|
427
|
+
return wait();
|
|
428
|
+
case 11:
|
|
429
|
+
expect(instance.get('value')).to.eql(['hunan']);
|
|
430
|
+
case 12:
|
|
431
|
+
case "end":
|
|
432
|
+
return _context13.stop();
|
|
433
|
+
}
|
|
434
|
+
}, _callee10);
|
|
435
|
+
})));
|
|
373
436
|
});
|
|
@@ -74,7 +74,7 @@ export function useValue() {
|
|
|
74
74
|
// maybe the showedValue has the leaf value when we set it on show menu,
|
|
75
75
|
// if we select by clicking, the showedValue has not the leaf value,
|
|
76
76
|
// no matter which case, we set the last value by level
|
|
77
|
-
var newValue = _sliceInstanceProperty(_context4 = showedValue.value).call(_context4, 0);
|
|
77
|
+
var newValue = _sliceInstanceProperty(_context4 = showedValue.value).call(_context4, 0, level);
|
|
78
78
|
newValue[level] = value;
|
|
79
79
|
setValue(newValue);
|
|
80
80
|
}
|
|
@@ -10,7 +10,7 @@ export * from './shapes/rectangle';
|
|
|
10
10
|
export * from './shapes/square';
|
|
11
11
|
export * from './shapes/text';
|
|
12
12
|
export * from './shapes/line';
|
|
13
|
-
declare const DDiamond: import("
|
|
13
|
+
declare const DDiamond: import("vdt").ComponentConstructor<import("./shapes/shape").DShape<import("./shapes/shape").DShapeProps>>, DTriangle: import("vdt").ComponentConstructor<import("./shapes/shape").DShape<import("./shapes/shape").DShapeProps>>, DCylinder: import("vdt").ComponentConstructor<import("./shapes/shape").DShape<import("./shapes/shape").DShapeProps>>, DCloud: import("vdt").ComponentConstructor<import("./shapes/shape").DShape<import("./shapes/shape").DShapeProps>>;
|
|
14
14
|
export { DDiamond, DTriangle, DCylinder, DCloud };
|
|
15
15
|
export * from './layouts/layout';
|
|
16
16
|
export * from './layouts/circle';
|
|
@@ -9,6 +9,7 @@ import { useTransition } from './useTransition';
|
|
|
9
9
|
import { useMenuKeyboard } from './useKeyboard';
|
|
10
10
|
import { useMouseOutsidable } from '../../hooks/useMouseOutsidable';
|
|
11
11
|
import { useConfigContext } from '../config';
|
|
12
|
+
import { usePositionForDropdownMenu } from './usePosition';
|
|
12
13
|
export var DROPDOWN_MENU = 'DropdownMenu';
|
|
13
14
|
export var DropdownMenu = /*#__PURE__*/function (_Component) {
|
|
14
15
|
_inheritsLoose(DropdownMenu, _Component);
|
|
@@ -32,6 +33,7 @@ export var DropdownMenu = /*#__PURE__*/function (_Component) {
|
|
|
32
33
|
_proto.init = function init() {
|
|
33
34
|
provide(DROPDOWN_MENU, this);
|
|
34
35
|
useMouseOutsidable(this.elementRef);
|
|
36
|
+
usePositionForDropdownMenu();
|
|
35
37
|
}
|
|
36
38
|
// no matter what the trigger is, we should show menu when enter into it.
|
|
37
39
|
;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
-
import { useInstance, findDomFromVNode } from 'intact-react';
|
|
2
|
+
import { useInstance, findDomFromVNode, onBeforeUnmount } from 'intact-react';
|
|
3
3
|
import { position } from '../position';
|
|
4
4
|
import { noop, isObject, isFunction } from 'intact-shared';
|
|
5
5
|
import { isEqualObject } from '../utils';
|
|
@@ -112,4 +112,15 @@ export function usePosition() {
|
|
|
112
112
|
handle: handle,
|
|
113
113
|
positioned: positioned
|
|
114
114
|
};
|
|
115
|
+
}
|
|
116
|
+
export function usePositionForDropdownMenu() {
|
|
117
|
+
var instance = useInstance();
|
|
118
|
+
/**
|
|
119
|
+
* Meybe the DropdownMenu has changed by specified key
|
|
120
|
+
* so, we must reset the positioned.value beforeUnmount
|
|
121
|
+
* #956
|
|
122
|
+
*/
|
|
123
|
+
onBeforeUnmount(function () {
|
|
124
|
+
instance.dropdown.positionHook.positioned.value = false;
|
|
125
|
+
});
|
|
115
126
|
}
|
|
@@ -2,7 +2,7 @@ import _Object$assign from "@babel/runtime-corejs3/core-js/object/assign";
|
|
|
2
2
|
import { useInstance, createRef } from 'intact-react';
|
|
3
3
|
/**
|
|
4
4
|
* don't trigger focusout event when layer is showing,
|
|
5
|
-
* only trigger focusout when it hidden to make FormItem to validate it
|
|
5
|
+
* only trigger focusout when it is hidden to make FormItem to validate it
|
|
6
6
|
* #449
|
|
7
7
|
*/
|
|
8
8
|
export function useFocusout() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const context: {
|
|
2
|
-
Provider: import("
|
|
3
|
-
Consumer: import("
|
|
4
|
-
useContext: () => import("
|
|
2
|
+
Provider: import("vdt").ComponentConstructor<import('intact-react').Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
3
|
+
Consumer: import("vdt").ComponentConstructor<import('intact-react').Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
4
|
+
useContext: () => import("vdt").RefObject<any>;
|
|
5
5
|
};
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.1.
|
|
2
|
+
* @king-design v3.1.5
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -60,7 +60,7 @@ export * from './components/tree';
|
|
|
60
60
|
export * from './components/treeSelect';
|
|
61
61
|
export * from './components/upload';
|
|
62
62
|
export * from './components/wave';
|
|
63
|
-
export declare const version = "3.1.
|
|
63
|
+
export declare const version = "3.1.5";
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
export {normalize} from 'intact-react';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.1.
|
|
2
|
+
* @king-design v3.1.5
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -61,7 +61,7 @@ export * from './components/tree';
|
|
|
61
61
|
export * from './components/treeSelect';
|
|
62
62
|
export * from './components/upload';
|
|
63
63
|
export * from './components/wave';
|
|
64
|
-
export var version = '3.1.
|
|
64
|
+
export var version = '3.1.5';
|
|
65
65
|
/* generate end */
|
|
66
66
|
|
|
67
67
|
export {normalize} from 'intact-react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/react",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5",
|
|
4
4
|
"description": "King-Design UI components for React.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"component",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@emotion/css": "^11.5.0",
|
|
37
37
|
"dayjs": "^1.10.7",
|
|
38
38
|
"enquire.js": "^2.1.6",
|
|
39
|
-
"intact-react": "3.0.
|
|
39
|
+
"intact-react": "3.0.28",
|
|
40
40
|
"monaco-editor": "^0.26.1",
|
|
41
41
|
"mxgraphx": "^4.0.7",
|
|
42
42
|
"resize-observer-polyfill": "^1.5.1",
|
package/yarn-error.log
CHANGED
|
@@ -2,7 +2,7 @@ Arguments:
|
|
|
2
2
|
/home/javey/.nvm/versions/node/v14.21.3/bin/node /usr/share/yarn/bin/yarn.js --registry=https://registry.npmjs.org
|
|
3
3
|
|
|
4
4
|
PATH:
|
|
5
|
-
/home/javey/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/npm
|
|
5
|
+
/tmp/yarn--1706608428068-0.6084622372330697:/home/javey/Workspaces/kpc/node_modules/.bin:/home/javey/.config/yarn/link/node_modules/.bin:/home/javey/.nvm/versions/node/v14.21.3/libexec/lib/node_modules/npm/bin/node-gyp-bin:/home/javey/.nvm/versions/node/v14.21.3/lib/node_modules/npm/bin/node-gyp-bin:/home/javey/.nvm/versions/node/v14.21.3/bin/node_modules/npm/bin/node-gyp-bin:/home/javey/.nvm/versions/node/v14.21.3/bin:/home/javey/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/javey/.yarn/bin:/home/javey/.local/bin:/home/javey/.yarn/bin:/home/javey/.local/bin
|
|
6
6
|
|
|
7
7
|
Yarn version:
|
|
8
8
|
1.22.19
|
|
@@ -22,7 +22,7 @@ Trace:
|
|
|
22
22
|
npm manifest:
|
|
23
23
|
{
|
|
24
24
|
"name": "@king-design/react",
|
|
25
|
-
"version": "3.1.
|
|
25
|
+
"version": "3.1.4",
|
|
26
26
|
"description": "King-Design UI components for React.",
|
|
27
27
|
"keywords": [
|
|
28
28
|
"component",
|
|
@@ -58,7 +58,7 @@ npm manifest:
|
|
|
58
58
|
"@emotion/css": "^11.5.0",
|
|
59
59
|
"dayjs": "^1.10.7",
|
|
60
60
|
"enquire.js": "^2.1.6",
|
|
61
|
-
"intact-react": "3.0.
|
|
61
|
+
"intact-react": "3.0.28",
|
|
62
62
|
"monaco-editor": "^0.26.1",
|
|
63
63
|
"mxgraphx": "^4.0.7",
|
|
64
64
|
"resize-observer-polyfill": "^1.5.1",
|
|
@@ -347,30 +347,30 @@ Lockfile:
|
|
|
347
347
|
parent-module "^1.0.0"
|
|
348
348
|
resolve-from "^4.0.0"
|
|
349
349
|
|
|
350
|
-
intact-react@3.0.
|
|
351
|
-
version "3.0.
|
|
352
|
-
resolved "https://registry.npmjs.org/intact-react/-/intact-react-3.0.
|
|
353
|
-
integrity sha512-
|
|
350
|
+
intact-react@3.0.27:
|
|
351
|
+
version "3.0.27"
|
|
352
|
+
resolved "https://registry.npmjs.org/intact-react/-/intact-react-3.0.27.tgz#f045683c72ab196c43290b0d7e9585a055f75101"
|
|
353
|
+
integrity sha512-1UslVyrSSnYx33b547QjwgmGTt6bpFSzvSZzPnAPewZI9TlXKij5rcTbx7tZyU6P+5nUjgNqSBm0vshgROTKhg==
|
|
354
354
|
dependencies:
|
|
355
|
-
intact "^3.0.
|
|
356
|
-
intact-shared "^3.0.
|
|
355
|
+
intact "^3.0.27"
|
|
356
|
+
intact-shared "^3.0.27"
|
|
357
357
|
tslib "^2.3.1"
|
|
358
358
|
|
|
359
|
-
intact-shared@^3.0.
|
|
360
|
-
version "3.0.
|
|
361
|
-
resolved "https://registry.npmjs.org/intact-shared/-/intact-shared-3.0.
|
|
362
|
-
integrity sha512-
|
|
359
|
+
intact-shared@^3.0.27:
|
|
360
|
+
version "3.0.27"
|
|
361
|
+
resolved "https://registry.npmjs.org/intact-shared/-/intact-shared-3.0.27.tgz#0e8861125f9bbe5017b2564279368950ba439bba"
|
|
362
|
+
integrity sha512-wk2BcMcYgvnyzvm322UNT++D5Br5jZk9xR9uKgz5kKFew02hqClL6ATDWNeYSMNV5HF2gClnaRaVfSjc5S798Q==
|
|
363
363
|
|
|
364
|
-
intact@^3.0.
|
|
365
|
-
version "3.0.
|
|
366
|
-
resolved "https://registry.npmjs.org/intact/-/intact-3.0.
|
|
367
|
-
integrity sha512-
|
|
364
|
+
intact@^3.0.27:
|
|
365
|
+
version "3.0.27"
|
|
366
|
+
resolved "https://registry.npmjs.org/intact/-/intact-3.0.27.tgz#802e6caf70a7b5667155767940ad8525cd730bdc"
|
|
367
|
+
integrity sha512-FLEBHmkHHQ5rM62oH5W4L7KOObrtCIHHyAoFEiFDiFUH0x6ekPY6uOxzDmLq4Sr3DKOwnSHjij7LCskn0q4jSw==
|
|
368
368
|
dependencies:
|
|
369
|
-
intact-shared "^3.0.
|
|
370
|
-
misstime "^3.0.
|
|
369
|
+
intact-shared "^3.0.27"
|
|
370
|
+
misstime "^3.0.27"
|
|
371
371
|
tslib "^2.2.0"
|
|
372
|
-
vdt "^3.0.
|
|
373
|
-
vdt-compiler "^3.0.
|
|
372
|
+
vdt "^3.0.27"
|
|
373
|
+
vdt-compiler "^3.0.27"
|
|
374
374
|
|
|
375
375
|
is-arrayish@^0.2.1:
|
|
376
376
|
version "0.2.1"
|
|
@@ -399,12 +399,12 @@ Lockfile:
|
|
|
399
399
|
resolved "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
|
|
400
400
|
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
|
|
401
401
|
|
|
402
|
-
misstime@^3.0.
|
|
403
|
-
version "3.0.
|
|
404
|
-
resolved "https://registry.npmjs.org/misstime/-/misstime-3.0.
|
|
405
|
-
integrity sha512-
|
|
402
|
+
misstime@^3.0.27:
|
|
403
|
+
version "3.0.27"
|
|
404
|
+
resolved "https://registry.npmjs.org/misstime/-/misstime-3.0.27.tgz#52f4d7ae7d7dda23ef7aa54c03528829f85b998c"
|
|
405
|
+
integrity sha512-ylpomvHDr6gcqLB2khQ3fQtXo4ERM6tmjPAyt7b8uHDGE1SrrYcoR9KZmdKsuTCKLmp46QBiLfwDAyVLICQDUg==
|
|
406
406
|
dependencies:
|
|
407
|
-
intact-shared "^3.0.
|
|
407
|
+
intact-shared "^3.0.27"
|
|
408
408
|
|
|
409
409
|
monaco-editor@^0.26.1:
|
|
410
410
|
version "0.26.1"
|
|
@@ -504,22 +504,22 @@ Lockfile:
|
|
|
504
504
|
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410"
|
|
505
505
|
integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==
|
|
506
506
|
|
|
507
|
-
vdt-compiler@^3.0.
|
|
508
|
-
version "3.0.
|
|
509
|
-
resolved "https://registry.npmjs.org/vdt-compiler/-/vdt-compiler-3.0.
|
|
510
|
-
integrity sha512-
|
|
507
|
+
vdt-compiler@^3.0.27:
|
|
508
|
+
version "3.0.27"
|
|
509
|
+
resolved "https://registry.npmjs.org/vdt-compiler/-/vdt-compiler-3.0.27.tgz#5953391bc2e9db08f33abd50fdc1d241530bbf60"
|
|
510
|
+
integrity sha512-QQTant7rgPTifGyPL+IX7vqOMGCmTnl2K0vT8n+i+Cnmi6TEC+VyfS8HNFyxpXyKoWgg+zV7EfI7HQWcLOsoiw==
|
|
511
511
|
dependencies:
|
|
512
|
-
intact-shared "^3.0.
|
|
513
|
-
misstime "^3.0.
|
|
512
|
+
intact-shared "^3.0.27"
|
|
513
|
+
misstime "^3.0.27"
|
|
514
514
|
tslib "^2.2.0"
|
|
515
515
|
|
|
516
|
-
vdt@^3.0.
|
|
517
|
-
version "3.0.
|
|
518
|
-
resolved "https://registry.npmjs.org/vdt/-/vdt-3.0.
|
|
519
|
-
integrity sha512
|
|
516
|
+
vdt@^3.0.27:
|
|
517
|
+
version "3.0.27"
|
|
518
|
+
resolved "https://registry.npmjs.org/vdt/-/vdt-3.0.27.tgz#66281111ad0dda67e1fef5626f07dd12afd129ee"
|
|
519
|
+
integrity sha512-izO9GtAOsxiEJGbnkLK/3nLgWKz3ORbHdaPns+5gSEn5W2B00A4AfFaPkpUUSsUOdrQGFME/C4u9ptF+Zy02ng==
|
|
520
520
|
dependencies:
|
|
521
|
-
intact-shared "^3.0.
|
|
522
|
-
misstime "^3.0.
|
|
521
|
+
intact-shared "^3.0.27"
|
|
522
|
+
misstime "^3.0.27"
|
|
523
523
|
tslib "^2.2.0"
|
|
524
524
|
|
|
525
525
|
yaml@^1.10.0:
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { TypeDefs } from 'intact-react';
|
|
2
|
-
import { BaseSelect, BaseSelectProps, BaseSelectEvents, BaseSelectBlocks } from '../select/base';
|
|
3
|
-
export interface CascaderProps<V = any, Multipe extends boolean = boolean, Data extends BaseCascaderData = CascaderData<V>> extends BaseSelectProps<V[], Multipe> {
|
|
4
|
-
data?: Data[];
|
|
5
|
-
trigger?: 'click' | 'hover';
|
|
6
|
-
changeOnSelect?: boolean;
|
|
7
|
-
format?: (labels: string[]) => string;
|
|
8
|
-
loadData?: (data: Data) => any;
|
|
9
|
-
filter?: (keywords: string, data: Data) => boolean;
|
|
10
|
-
fields?: CascaderFields<Data>;
|
|
11
|
-
}
|
|
12
|
-
export type CascaderFields<Data> = {
|
|
13
|
-
value?: keyof Data;
|
|
14
|
-
label?: keyof Data;
|
|
15
|
-
children?: keyof Data;
|
|
16
|
-
disabled?: keyof Data;
|
|
17
|
-
};
|
|
18
|
-
export interface BaseCascaderData {
|
|
19
|
-
loaded?: boolean;
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}
|
|
22
|
-
export interface CascaderData<V> extends BaseCascaderData {
|
|
23
|
-
value: V;
|
|
24
|
-
label: string;
|
|
25
|
-
children?: CascaderData<V>[];
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface CascaderEvents extends BaseSelectEvents {
|
|
29
|
-
}
|
|
30
|
-
export interface CascaderBlocks<V> extends BaseSelectBlocks<V> {
|
|
31
|
-
}
|
|
32
|
-
export declare class Cascader<V = any, Multipe extends boolean = false, Data extends BaseCascaderData = CascaderData<V>> extends BaseSelect<CascaderProps<V, Multipe, Data>, CascaderEvents, CascaderBlocks<V>> {
|
|
33
|
-
static template: string | import('intact-react').Template<any>;
|
|
34
|
-
static typeDefs: Required<TypeDefs<CascaderProps<any, boolean, CascaderData<any>>>>;
|
|
35
|
-
static defaults: () => Partial<CascaderProps<any, boolean, CascaderData<any>>>;
|
|
36
|
-
private fields;
|
|
37
|
-
private value;
|
|
38
|
-
private label;
|
|
39
|
-
private load;
|
|
40
|
-
private filterable;
|
|
41
|
-
private positionObj;
|
|
42
|
-
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import('intact-react').Children[];
|
|
43
|
-
protected getLabel(): import('intact-react').Children;
|
|
44
|
-
protected hasValue(): any;
|
|
45
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { TypeDefs } from 'intact-react';
|
|
2
|
-
import dayjs from './dayjs';
|
|
3
|
-
import { State } from '../../hooks/useState';
|
|
4
|
-
import { Shortcut } from './shortcuts';
|
|
5
|
-
import { BasePicker, BasePickerProps, BasePickerEvents, BasePickerBlocks, Value } from './basepicker';
|
|
6
|
-
export * as shortcuts from './shortcuts';
|
|
7
|
-
export interface DatepickerProps<V extends Value = Value, M extends boolean = boolean, R extends boolean = boolean> extends BasePickerProps<V extends string ? V : V | string, M, R> {
|
|
8
|
-
type?: 'date' | 'datetime' | 'year' | 'month';
|
|
9
|
-
shortcuts?: Shortcut[];
|
|
10
|
-
}
|
|
11
|
-
export interface DatepickerEvents extends BasePickerEvents {
|
|
12
|
-
}
|
|
13
|
-
export interface DatepickerBlocks<V extends Value = Value, R extends boolean = boolean> extends BasePickerBlocks<V, R> {
|
|
14
|
-
}
|
|
15
|
-
export declare class Datepicker<V extends Value = Value, M extends boolean = false, R extends boolean = false> extends BasePicker<DatepickerProps<V, M, R>, DatepickerEvents, DatepickerBlocks<V, R>> {
|
|
16
|
-
static template: string | import('intact-react').Template<any>;
|
|
17
|
-
static typeDefs: Required<TypeDefs<DatepickerProps<Value, boolean, boolean>>>;
|
|
18
|
-
static defaults: () => Partial<DatepickerProps<Value, boolean, boolean>>;
|
|
19
|
-
formats: {
|
|
20
|
-
getValueFormat: () => string;
|
|
21
|
-
getShowFormat: () => string;
|
|
22
|
-
createDateByValueFormat: (value: Value) => dayjs.Dayjs;
|
|
23
|
-
createDateByShowFormat: (value: string) => dayjs.Dayjs;
|
|
24
|
-
getShowString: (value: dayjs.Dayjs) => string;
|
|
25
|
-
getValueString: (value: dayjs.Dayjs) => string;
|
|
26
|
-
};
|
|
27
|
-
disabled: {
|
|
28
|
-
isDisabled: (value: dayjs.Dayjs, type?: dayjs.OpUnitType) => boolean;
|
|
29
|
-
isDisabledTime: (value: dayjs.Dayjs, flag: import("./usePanel").PanelFlags) => boolean;
|
|
30
|
-
isDisabledConfirm: () => boolean;
|
|
31
|
-
maxDate: State<dayjs.Dayjs | null>;
|
|
32
|
-
minDate: State<dayjs.Dayjs | null>;
|
|
33
|
-
};
|
|
34
|
-
panel: {
|
|
35
|
-
startPanel: State<import("./usePanel").PanelTypes>;
|
|
36
|
-
endPanel: State<import("./usePanel").PanelTypes>;
|
|
37
|
-
changePanel: (type: import("./usePanel").PanelTypes, flag?: import("./usePanel").PanelFlags) => void;
|
|
38
|
-
getPanel: (flag: import("./usePanel").PanelFlags) => State<import("./usePanel").PanelTypes>;
|
|
39
|
-
reset: () => void;
|
|
40
|
-
startRef: import('intact-react').RefObject<import("./calendar").DatepickerCalendar>;
|
|
41
|
-
endRef: import('intact-react').RefObject<import("./calendar").DatepickerCalendar>;
|
|
42
|
-
};
|
|
43
|
-
focusDate: {
|
|
44
|
-
focusDate: State<dayjs.Dayjs | null>;
|
|
45
|
-
reset: () => void;
|
|
46
|
-
};
|
|
47
|
-
value: {
|
|
48
|
-
format: () => string | string[];
|
|
49
|
-
onConfirm: () => void;
|
|
50
|
-
onChangeTime: (date: dayjs.Dayjs, flag: import("./usePanel").PanelFlags) => void;
|
|
51
|
-
getTimeValue: (flag: import("./usePanel").PanelFlags) => dayjs.Dayjs | null | undefined;
|
|
52
|
-
convertToDayjs: (v: Value | [Value, Value] | Value[] | [Value, Value][] | null | undefined) => import("./basepicker").DayjsValue;
|
|
53
|
-
getDayjsValue: () => import("./basepicker").DayjsValue;
|
|
54
|
-
value: State<import("./basepicker").StateValue>;
|
|
55
|
-
setValue: (v: import("./basepicker").StateValueItem, fromInput: boolean) => void;
|
|
56
|
-
onChangeDate: (v: dayjs.Dayjs, flag: import("./usePanel").PanelFlags) => void;
|
|
57
|
-
};
|
|
58
|
-
init(): void;
|
|
59
|
-
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import('intact-react').Children[];
|
|
60
|
-
protected getLabel(): string | string[];
|
|
61
|
-
protected clear(e: MouseEvent): void;
|
|
62
|
-
private setByShortcut;
|
|
63
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Children, TypeDefs } from 'intact-react';
|
|
2
|
-
import { Option } from './option';
|
|
3
|
-
import { BaseSelect, BaseSelectProps, BaseSelectEvents, BaseSelectBlocks } from './base';
|
|
4
|
-
export interface SelectProps<T = string, Multipe extends boolean = boolean> extends BaseSelectProps<T, Multipe> {
|
|
5
|
-
filter?: (keywords: string, props: any) => boolean;
|
|
6
|
-
searchable?: boolean;
|
|
7
|
-
creatable?: boolean;
|
|
8
|
-
labelMap?: Map<any, Children>;
|
|
9
|
-
card?: boolean;
|
|
10
|
-
autoDisableArrow?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface SelectEvents extends BaseSelectEvents {
|
|
13
|
-
}
|
|
14
|
-
export interface SelectBlocks<T> extends BaseSelectBlocks<T> {
|
|
15
|
-
menu: null;
|
|
16
|
-
}
|
|
17
|
-
export declare class Select<T = string, Multipe extends boolean = false> extends BaseSelect<SelectProps<T, Multipe>, SelectEvents, SelectBlocks<T>> {
|
|
18
|
-
static template: string | import('intact-react').Template<any>;
|
|
19
|
-
static typeDefs: Required<TypeDefs<SelectProps<string, boolean>>>;
|
|
20
|
-
static defaults: () => Partial<SelectProps<string, boolean>>;
|
|
21
|
-
filterable: {
|
|
22
|
-
getCreatedVNode: (children: (string | number | import('intact-react').VNode<import('intact-react').VNodeTag>)[]) => import('intact-react').VNode<typeof Option> | undefined;
|
|
23
|
-
filter: (children: Children) => Children;
|
|
24
|
-
};
|
|
25
|
-
label: {
|
|
26
|
-
getLabel: () => Children;
|
|
27
|
-
activeIndices: import('intact-react').NonNullableRefObject<number[]>;
|
|
28
|
-
};
|
|
29
|
-
init(): void;
|
|
30
|
-
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | Children[];
|
|
31
|
-
protected getLabel(): Children;
|
|
32
|
-
private getAllShowedValues;
|
|
33
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { TypeDefs } from 'intact-react';
|
|
2
|
-
import { BasePicker } from '../datepicker/basepicker';
|
|
3
|
-
import dayjs from '../datepicker/dayjs';
|
|
4
|
-
import { State } from '../../hooks/useState';
|
|
5
|
-
import { PanelTypes } from '../datepicker/usePanel';
|
|
6
|
-
import { TimepickerProps, TimepickerEvents, TimepickerBlocks } from './constants';
|
|
7
|
-
export declare class PanelPicker<Multipe extends boolean = false, Range extends boolean = false> extends BasePicker<TimepickerProps<Multipe, Range>, TimepickerEvents, TimepickerBlocks> {
|
|
8
|
-
static template: string | import('intact-react').Template<any>;
|
|
9
|
-
static typeDefs: Required<TypeDefs<TimepickerProps<boolean, boolean>>>;
|
|
10
|
-
formats: {
|
|
11
|
-
getValueFormat: () => string;
|
|
12
|
-
getShowFormat: () => string;
|
|
13
|
-
createDateByValueFormat: (value: import("../datepicker/basepicker").Value) => dayjs.Dayjs;
|
|
14
|
-
createDateByShowFormat: (value: import("../datepicker/basepicker").Value) => dayjs.Dayjs;
|
|
15
|
-
getShowString: (value: dayjs.Dayjs) => string;
|
|
16
|
-
getValueString: (value: dayjs.Dayjs) => string;
|
|
17
|
-
};
|
|
18
|
-
disabled: {
|
|
19
|
-
isDisabled: (value: dayjs.Dayjs, type?: dayjs.OpUnitType) => boolean;
|
|
20
|
-
isDisabledConfirm: () => boolean;
|
|
21
|
-
maxDate: State<dayjs.Dayjs | null>;
|
|
22
|
-
minDate: State<dayjs.Dayjs | null>;
|
|
23
|
-
isDisabledTime: (value: dayjs.Dayjs, flag: import("../datepicker/usePanel").PanelFlags) => boolean;
|
|
24
|
-
isDisabledTimeByStep: (value: string, flag: import("../datepicker/usePanel").PanelFlags) => boolean;
|
|
25
|
-
};
|
|
26
|
-
panel: {
|
|
27
|
-
startPanel: State<PanelTypes>;
|
|
28
|
-
endPanel: State<PanelTypes>;
|
|
29
|
-
changePanel: (type: PanelTypes, flag?: import("../datepicker/usePanel").PanelFlags) => void;
|
|
30
|
-
getPanel: (flag: import("../datepicker/usePanel").PanelFlags) => State<PanelTypes>;
|
|
31
|
-
reset: () => void;
|
|
32
|
-
startRef: import('intact-react').RefObject<import("../datepicker/calendar").DatepickerCalendar>;
|
|
33
|
-
endRef: import('intact-react').RefObject<import("../datepicker/calendar").DatepickerCalendar>;
|
|
34
|
-
};
|
|
35
|
-
value: {
|
|
36
|
-
format: () => string | string[];
|
|
37
|
-
onConfirm: () => void;
|
|
38
|
-
getTimeValue: (flag: import("../datepicker/usePanel").PanelFlags) => dayjs.Dayjs | null | undefined;
|
|
39
|
-
convertToDayjs: (v: import("../datepicker/basepicker").Value | [import("../datepicker/basepicker").Value, import("../datepicker/basepicker").Value] | import("../datepicker/basepicker").Value[] | [import("../datepicker/basepicker").Value, import("../datepicker/basepicker").Value][] | null | undefined) => import("../datepicker/basepicker").DayjsValue;
|
|
40
|
-
value: State<import("../datepicker/basepicker").StateValue>;
|
|
41
|
-
setValue: (v: import("../datepicker/basepicker").StateValueItem, fromInput: boolean) => void;
|
|
42
|
-
getDayjsValue: () => import("../datepicker/basepicker").DayjsValue;
|
|
43
|
-
onChangeTime: (date: dayjs.Dayjs, flag: import("../datepicker/usePanel").PanelFlags) => void;
|
|
44
|
-
onChangeTimeByStep: (v: string, flag: import("../datepicker/usePanel").PanelFlags) => void;
|
|
45
|
-
};
|
|
46
|
-
step: {
|
|
47
|
-
options: State<{
|
|
48
|
-
value: string;
|
|
49
|
-
label: string;
|
|
50
|
-
}[] | null>;
|
|
51
|
-
};
|
|
52
|
-
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import('intact-react').Children[];
|
|
53
|
-
protected getLabel(): string | string[];
|
|
54
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { TypeDefs, Children, Key } from 'intact-react';
|
|
2
|
-
import { BaseSelect, BaseSelectProps, BaseSelectEvents, BaseSelectBlocks } from '../select/base';
|
|
3
|
-
import { TreeProps } from '../tree';
|
|
4
|
-
import type { DataItem } from '../tree/useNodes';
|
|
5
|
-
export interface TreeSelectProps<K extends Key = Key, Multipe extends boolean = boolean, Checkbox extends boolean = boolean> extends BaseSelectProps<K, Multipe, Checkbox extends true ? K[] : K | null> {
|
|
6
|
-
data?: TreeProps<K>['data'];
|
|
7
|
-
uncorrelated?: boolean;
|
|
8
|
-
load?: TreeProps<K>['load'];
|
|
9
|
-
showLine?: boolean;
|
|
10
|
-
defaultExpandAll?: boolean;
|
|
11
|
-
checkbox?: Checkbox;
|
|
12
|
-
filter?: (keywords: string, data: DataItem<K>) => boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface TreeSelectEvents extends BaseSelectEvents {
|
|
15
|
-
}
|
|
16
|
-
export interface TreeSelectBlocks<K> extends BaseSelectBlocks<K> {
|
|
17
|
-
}
|
|
18
|
-
export declare class TreeSelect<K extends Key = Key, Checkbox extends boolean = false, Multipe extends boolean = Checkbox extends true ? true : false> extends BaseSelect<TreeSelectProps<K, Multipe, Checkbox>, TreeSelectEvents, TreeSelectBlocks<K>> {
|
|
19
|
-
static template: string | import('intact-react').Template<any>;
|
|
20
|
-
static typeDefs: Required<TypeDefs<TreeSelectProps<Key, boolean, boolean>>>;
|
|
21
|
-
static defaults: () => Partial<TreeSelectProps<Key, boolean, boolean>>;
|
|
22
|
-
private value;
|
|
23
|
-
init(): void;
|
|
24
|
-
expandAll(): void;
|
|
25
|
-
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | Children[];
|
|
26
|
-
protected getLabel(): Children;
|
|
27
|
-
private filter;
|
|
28
|
-
}
|