@pisell/materials 6.4.8 → 6.4.9
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +24 -23
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +25 -24
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
- package/es/components/auto-resize-text/auto-text-size-standalone.js +258 -0
- package/es/components/auto-resize-text/index.d.ts +6 -0
- package/es/components/auto-resize-text/index.js +40 -0
- package/es/components/batch-editor/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +1 -1
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -12
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/es/components/filter/types.d.ts +1 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/keyboard/index.d.ts +22 -0
- package/es/components/keyboard/index.js +159 -0
- package/es/components/keyboard/index.less +44 -0
- package/es/components/page/index.d.ts +0 -1
- package/es/components/pisell-config-provider/context.d.ts +22 -0
- package/es/components/pisell-config-provider/index.d.ts +13 -0
- package/es/components/pisellAdjustPrice/status.d.ts +32 -0
- package/es/components/pisellAdjustPrice/type.d.ts +22 -0
- package/es/components/pisellQRScanner/index.d.ts +0 -13
- package/es/components/pisellQRScanner/index.js +0 -8
- package/es/components/pisellToast/squareToast/index.d.ts +15 -0
- package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +29 -0
- package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
- package/es/components/pisellWalletPassCard/index.d.ts +1 -1
- package/es/components/pisellWalletPassCard/index.js +2 -1
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/es/components/productCard/components/Action/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/locales.d.ts +84 -0
- package/es/components/productCard/status.d.ts +32 -0
- package/es/components/productCard/types.d.ts +84 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useTableSetting.js +1 -1
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -1
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +21 -7
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +4 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +44 -25
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Number/types.d.ts +26 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/es/components/virtualInput/BaseVirtualInput/index.js +163 -0
- package/es/components/virtualInput/BaseVirtualInput/index.less +78 -0
- package/es/components/virtualInput/index.d.ts +24 -0
- package/es/components/virtualInput/index.js +60 -0
- package/es/components/virtualInput/index.less +42 -0
- package/es/components/walletCard/Guide/index.d.ts +3 -0
- package/es/components/walletCard/index.d.ts +67 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/locales/en-US.d.ts +286 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/zh-CN.d.ts +281 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-TW.d.ts +281 -0
- package/es/locales/zh-TW.js +1 -0
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
- package/lib/components/auto-resize-text/auto-text-size-standalone.js +273 -0
- package/lib/components/auto-resize-text/index.d.ts +6 -0
- package/lib/components/auto-resize-text/index.js +71 -0
- package/lib/components/batch-editor/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -12
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/lib/components/filter/types.d.ts +1 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/keyboard/index.d.ts +22 -0
- package/lib/components/keyboard/index.js +223 -0
- package/lib/components/keyboard/index.less +44 -0
- package/lib/components/page/index.d.ts +0 -1
- package/lib/components/pisell-config-provider/context.d.ts +22 -0
- package/lib/components/pisell-config-provider/index.d.ts +13 -0
- package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +22 -0
- package/lib/components/pisellQRScanner/index.d.ts +0 -13
- package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
- package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +29 -0
- package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -1
- package/lib/components/pisellWalletPassCard/index.js +2 -1
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/lib/components/productCard/components/Action/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/locales.d.ts +84 -0
- package/lib/components/productCard/status.d.ts +32 -0
- package/lib/components/productCard/types.d.ts +84 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/hooks/useTableSetting.js +1 -1
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -1
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +19 -2
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +4 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +45 -27
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +26 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.js +179 -0
- package/lib/components/virtualInput/BaseVirtualInput/index.less +78 -0
- package/lib/components/virtualInput/index.d.ts +24 -0
- package/lib/components/virtualInput/index.js +102 -0
- package/lib/components/virtualInput/index.less +42 -0
- package/lib/components/walletCard/Guide/index.d.ts +3 -0
- package/lib/components/walletCard/index.d.ts +67 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/locales/en-US.d.ts +286 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/zh-CN.d.ts +281 -0
- package/lib/locales/zh-CN.js +1 -0
- package/lib/locales/zh-TW.d.ts +281 -0
- package/lib/locales/zh-TW.js +1 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +3 -3
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare type Options = {
|
|
2
|
+
mode?: 'oneline' | 'multiline' | 'box' | 'boxoneline' | undefined;
|
|
3
|
+
minFontSizePx?: number | undefined;
|
|
4
|
+
maxFontSizePx?: number | undefined;
|
|
5
|
+
fontSizePrecisionPx?: number | undefined;
|
|
6
|
+
scrollToEnd?: boolean | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare function updateTextSize({ innerEl, containerEl, mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, scrollToEnd, }: Options & {
|
|
9
|
+
innerEl: HTMLElement;
|
|
10
|
+
containerEl: HTMLElement;
|
|
11
|
+
}): void;
|
|
12
|
+
declare type DisconnectableFunction = {
|
|
13
|
+
(): void;
|
|
14
|
+
disconnect: () => void;
|
|
15
|
+
};
|
|
16
|
+
export declare function autoTextSize({ innerEl, containerEl, mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, scrollToEnd, }: Options & {
|
|
17
|
+
innerEl: HTMLElement;
|
|
18
|
+
containerEl: HTMLElement;
|
|
19
|
+
}): DisconnectableFunction;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
function throttleAnimationFrame(func) {
|
|
2
|
+
var wait = false;
|
|
3
|
+
return function () {
|
|
4
|
+
if (!wait) {
|
|
5
|
+
wait = true;
|
|
6
|
+
requestAnimationFrame(function () {
|
|
7
|
+
func();
|
|
8
|
+
wait = false;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
var antiOverflowAlgo = function antiOverflowAlgo(_ref) {
|
|
14
|
+
var fontSizePx = _ref.fontSizePx,
|
|
15
|
+
minFontSizePx = _ref.minFontSizePx,
|
|
16
|
+
fontSizePrecisionPx = _ref.fontSizePrecisionPx,
|
|
17
|
+
updateFontSizePx = _ref.updateFontSizePx,
|
|
18
|
+
breakPred = _ref.breakPredicate;
|
|
19
|
+
var maxIterCount = Math.ceil(1 / fontSizePrecisionPx); // 1 px should always be enough.
|
|
20
|
+
var iterCount = 0;
|
|
21
|
+
while (fontSizePx > minFontSizePx && iterCount < maxIterCount) {
|
|
22
|
+
if (breakPred()) break;
|
|
23
|
+
fontSizePx = updateFontSizePx(fontSizePx - fontSizePrecisionPx);
|
|
24
|
+
iterCount++;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var getContentWidth = function getContentWidth(element) {
|
|
28
|
+
var computedStyle = getComputedStyle(element);
|
|
29
|
+
return element.clientWidth - parseFloat(computedStyle.paddingLeft) - parseFloat(computedStyle.paddingRight);
|
|
30
|
+
};
|
|
31
|
+
var getContentHeight = function getContentHeight(element) {
|
|
32
|
+
var computedStyle = getComputedStyle(element);
|
|
33
|
+
return element.clientHeight - parseFloat(computedStyle.paddingTop) - parseFloat(computedStyle.paddingBottom);
|
|
34
|
+
};
|
|
35
|
+
var multilineAlgo = function multilineAlgo(opts) {
|
|
36
|
+
opts.innerEl.style.whiteSpace = 'nowrap';
|
|
37
|
+
onelineAlgo(opts);
|
|
38
|
+
if (opts.innerEl.scrollWidth > getContentWidth(opts.containerEl)) {
|
|
39
|
+
opts.innerEl.style.whiteSpace = 'normal';
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var onelineAlgo = function onelineAlgo(_ref2) {
|
|
43
|
+
var innerEl = _ref2.innerEl,
|
|
44
|
+
containerEl = _ref2.containerEl,
|
|
45
|
+
fontSizePx = _ref2.fontSizePx,
|
|
46
|
+
minFontSizePx = _ref2.minFontSizePx,
|
|
47
|
+
maxFontSizePx = _ref2.maxFontSizePx,
|
|
48
|
+
fontSizePrecisionPx = _ref2.fontSizePrecisionPx,
|
|
49
|
+
updateFontSizePx = _ref2.updateFontSizePx;
|
|
50
|
+
var maxIterCount = 10;
|
|
51
|
+
var iterCount = 0;
|
|
52
|
+
var prevOverflowFactor = 1;
|
|
53
|
+
while (iterCount < maxIterCount) {
|
|
54
|
+
var w0 = innerEl.scrollWidth;
|
|
55
|
+
var w1 = getContentWidth(containerEl);
|
|
56
|
+
var canGrow = fontSizePx < maxFontSizePx && w0 < w1;
|
|
57
|
+
var canShrink = fontSizePx > minFontSizePx && w0 > w1;
|
|
58
|
+
var overflowFactor = w0 / w1;
|
|
59
|
+
|
|
60
|
+
// The browser cannot render a difference based on the previous font size update
|
|
61
|
+
if (prevOverflowFactor === overflowFactor) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
if (!(canGrow || canShrink)) {
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
var updatePx = fontSizePx / overflowFactor - fontSizePx;
|
|
68
|
+
var prevFontSizePx = fontSizePx;
|
|
69
|
+
fontSizePx = updateFontSizePx(fontSizePx + updatePx);
|
|
70
|
+
if (Math.abs(fontSizePx - prevFontSizePx) <= fontSizePrecisionPx) {
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
prevOverflowFactor = overflowFactor;
|
|
74
|
+
iterCount++;
|
|
75
|
+
}
|
|
76
|
+
antiOverflowAlgo({
|
|
77
|
+
fontSizePx: fontSizePx,
|
|
78
|
+
minFontSizePx: minFontSizePx,
|
|
79
|
+
updateFontSizePx: updateFontSizePx,
|
|
80
|
+
fontSizePrecisionPx: fontSizePrecisionPx,
|
|
81
|
+
breakPredicate: function breakPredicate() {
|
|
82
|
+
return innerEl.scrollWidth <= getContentWidth(containerEl);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
var boxAlgo = function boxAlgo(_ref3) {
|
|
87
|
+
var innerEl = _ref3.innerEl,
|
|
88
|
+
containerEl = _ref3.containerEl,
|
|
89
|
+
fontSizePx = _ref3.fontSizePx,
|
|
90
|
+
minFontSizePx = _ref3.minFontSizePx,
|
|
91
|
+
maxFontSizePx = _ref3.maxFontSizePx,
|
|
92
|
+
fontSizePrecisionPx = _ref3.fontSizePrecisionPx,
|
|
93
|
+
updateFontSizePx = _ref3.updateFontSizePx;
|
|
94
|
+
var maxIterCount = 100;
|
|
95
|
+
fontSizePx = updateFontSizePx((maxFontSizePx - minFontSizePx) * 0.5);
|
|
96
|
+
var updatePx = (maxFontSizePx - minFontSizePx) * 0.25;
|
|
97
|
+
var iterCount = 0;
|
|
98
|
+
while (updatePx > fontSizePrecisionPx && iterCount < maxIterCount) {
|
|
99
|
+
var w0 = innerEl.scrollWidth;
|
|
100
|
+
var w1 = getContentWidth(containerEl);
|
|
101
|
+
var h0 = innerEl.scrollHeight;
|
|
102
|
+
var h1 = getContentHeight(containerEl);
|
|
103
|
+
if (w0 === w1 && h0 === h1) break;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Use `<=` rather than `<` since equality is possible even though there is
|
|
107
|
+
* room for resizing in the other dimension.
|
|
108
|
+
*/
|
|
109
|
+
if (fontSizePx < maxFontSizePx && w0 <= w1 && h0 <= h1) {
|
|
110
|
+
fontSizePx = updateFontSizePx(fontSizePx + updatePx);
|
|
111
|
+
} else if (fontSizePx > minFontSizePx && (w0 > w1 || h0 > h1)) {
|
|
112
|
+
fontSizePx = updateFontSizePx(fontSizePx - updatePx);
|
|
113
|
+
}
|
|
114
|
+
updatePx *= 0.5; // Binary search. Don't change this number.
|
|
115
|
+
iterCount++;
|
|
116
|
+
}
|
|
117
|
+
antiOverflowAlgo({
|
|
118
|
+
fontSizePx: fontSizePx,
|
|
119
|
+
minFontSizePx: minFontSizePx,
|
|
120
|
+
updateFontSizePx: updateFontSizePx,
|
|
121
|
+
fontSizePrecisionPx: fontSizePrecisionPx,
|
|
122
|
+
breakPredicate: function breakPredicate() {
|
|
123
|
+
return innerEl.scrollWidth <= getContentWidth(containerEl) && innerEl.scrollHeight <= getContentHeight(containerEl);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
export function updateTextSize(_ref4) {
|
|
128
|
+
var innerEl = _ref4.innerEl,
|
|
129
|
+
containerEl = _ref4.containerEl,
|
|
130
|
+
_ref4$mode = _ref4.mode,
|
|
131
|
+
mode = _ref4$mode === void 0 ? 'multiline' : _ref4$mode,
|
|
132
|
+
_ref4$minFontSizePx = _ref4.minFontSizePx,
|
|
133
|
+
minFontSizePx = _ref4$minFontSizePx === void 0 ? 8 : _ref4$minFontSizePx,
|
|
134
|
+
_ref4$maxFontSizePx = _ref4.maxFontSizePx,
|
|
135
|
+
maxFontSizePx = _ref4$maxFontSizePx === void 0 ? 160 : _ref4$maxFontSizePx,
|
|
136
|
+
_ref4$fontSizePrecisi = _ref4.fontSizePrecisionPx,
|
|
137
|
+
fontSizePrecisionPx = _ref4$fontSizePrecisi === void 0 ? 0.1 : _ref4$fontSizePrecisi,
|
|
138
|
+
_ref4$scrollToEnd = _ref4.scrollToEnd,
|
|
139
|
+
scrollToEnd = _ref4$scrollToEnd === void 0 ? false : _ref4$scrollToEnd;
|
|
140
|
+
var t0 = performance.now();
|
|
141
|
+
if (!isFinite(minFontSizePx)) {
|
|
142
|
+
throw new Error("Invalid minFontSizePx (".concat(minFontSizePx, ")"));
|
|
143
|
+
}
|
|
144
|
+
if (!isFinite(minFontSizePx)) {
|
|
145
|
+
throw new Error("Invalid maxFontSizePx (".concat(maxFontSizePx, ")"));
|
|
146
|
+
}
|
|
147
|
+
if (!isFinite(fontSizePrecisionPx) || fontSizePrecisionPx === 0) {
|
|
148
|
+
throw new Error("Invalid fontSizePrecisionPx (".concat(fontSizePrecisionPx, ")"));
|
|
149
|
+
}
|
|
150
|
+
if (containerEl.children.length > 1) {
|
|
151
|
+
console.warn("AutoTextSize has ".concat(containerEl.children.length - 1, " siblings. This may interfere with the algorithm."));
|
|
152
|
+
}
|
|
153
|
+
var containerStyles = {
|
|
154
|
+
display: 'flex',
|
|
155
|
+
alignItems: 'start'
|
|
156
|
+
};
|
|
157
|
+
var innerStyles = {
|
|
158
|
+
display: 'block'
|
|
159
|
+
};
|
|
160
|
+
if (mode === 'oneline') {
|
|
161
|
+
innerStyles.whiteSpace = 'nowrap';
|
|
162
|
+
} else if (mode === 'multiline') {
|
|
163
|
+
innerStyles.wordBreak = 'break-word';
|
|
164
|
+
} else if (mode === 'box') {
|
|
165
|
+
innerStyles.whiteSpace = 'pre-wrap';
|
|
166
|
+
innerStyles.wordBreak = 'break-word';
|
|
167
|
+
} else if (mode === 'boxoneline') {
|
|
168
|
+
innerStyles.whiteSpace = 'nowrap';
|
|
169
|
+
}
|
|
170
|
+
Object.assign(containerEl.style, containerStyles);
|
|
171
|
+
Object.assign(innerEl.style, innerStyles);
|
|
172
|
+
var fontSizeStr = window.getComputedStyle(innerEl, null).getPropertyValue('font-size');
|
|
173
|
+
var fontSizePx = parseFloat(fontSizeStr);
|
|
174
|
+
var iterations = 0;
|
|
175
|
+
var updateFontSizePx = function updateFontSizePx(px) {
|
|
176
|
+
px = Math.min(Math.max(px, minFontSizePx), maxFontSizePx);
|
|
177
|
+
// console.debug(
|
|
178
|
+
// `setFontSizePx ${px > fontSizePx ? "up" : "down"} (abs: ${
|
|
179
|
+
// px / fontSizePx
|
|
180
|
+
// }, rel: ${(px - fontSizePx) / fontSizePx}) ${px}`
|
|
181
|
+
// );
|
|
182
|
+
fontSizePx = px;
|
|
183
|
+
innerEl.style.fontSize = "".concat(fontSizePx, "px");
|
|
184
|
+
iterations++;
|
|
185
|
+
return fontSizePx;
|
|
186
|
+
};
|
|
187
|
+
if (fontSizePx > maxFontSizePx || fontSizePx < minFontSizePx) {
|
|
188
|
+
updateFontSizePx(fontSizePx);
|
|
189
|
+
}
|
|
190
|
+
var algoOpts = {
|
|
191
|
+
innerEl: innerEl,
|
|
192
|
+
containerEl: containerEl,
|
|
193
|
+
fontSizePx: fontSizePx,
|
|
194
|
+
minFontSizePx: minFontSizePx,
|
|
195
|
+
maxFontSizePx: maxFontSizePx,
|
|
196
|
+
fontSizePrecisionPx: fontSizePrecisionPx,
|
|
197
|
+
updateFontSizePx: updateFontSizePx
|
|
198
|
+
};
|
|
199
|
+
if (mode === 'oneline') {
|
|
200
|
+
onelineAlgo(algoOpts);
|
|
201
|
+
} else if (mode === 'multiline') {
|
|
202
|
+
multilineAlgo(algoOpts);
|
|
203
|
+
} else if (mode === 'box') {
|
|
204
|
+
boxAlgo(algoOpts);
|
|
205
|
+
} else if (mode === 'boxoneline') {
|
|
206
|
+
boxAlgo(algoOpts);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// 如果启用了 scrollToEnd,滚动到内容末端
|
|
210
|
+
if (scrollToEnd) {
|
|
211
|
+
// 使用 requestAnimationFrame 确保在 DOM 更新后执行滚动
|
|
212
|
+
requestAnimationFrame(function () {
|
|
213
|
+
if (mode === 'oneline' || mode === 'boxoneline') {
|
|
214
|
+
// 对于单行模式,滚动到最右端
|
|
215
|
+
var maxScrollLeft = Math.max(0, innerEl.scrollWidth - innerEl.clientWidth);
|
|
216
|
+
innerEl.scrollLeft = maxScrollLeft;
|
|
217
|
+
} else {
|
|
218
|
+
// 对于多行模式,滚动到最底端
|
|
219
|
+
var maxScrollTop = Math.max(0, innerEl.scrollHeight - innerEl.clientHeight);
|
|
220
|
+
innerEl.scrollTop = maxScrollTop;
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
export function autoTextSize(_ref5) {
|
|
226
|
+
var innerEl = _ref5.innerEl,
|
|
227
|
+
containerEl = _ref5.containerEl,
|
|
228
|
+
mode = _ref5.mode,
|
|
229
|
+
minFontSizePx = _ref5.minFontSizePx,
|
|
230
|
+
maxFontSizePx = _ref5.maxFontSizePx,
|
|
231
|
+
fontSizePrecisionPx = _ref5.fontSizePrecisionPx,
|
|
232
|
+
scrollToEnd = _ref5.scrollToEnd;
|
|
233
|
+
var containerDimensions = undefined;
|
|
234
|
+
var throttledUpdateTextSize = throttleAnimationFrame(function () {
|
|
235
|
+
updateTextSize({
|
|
236
|
+
innerEl: innerEl,
|
|
237
|
+
containerEl: containerEl,
|
|
238
|
+
mode: mode,
|
|
239
|
+
maxFontSizePx: maxFontSizePx,
|
|
240
|
+
minFontSizePx: minFontSizePx,
|
|
241
|
+
fontSizePrecisionPx: fontSizePrecisionPx,
|
|
242
|
+
scrollToEnd: scrollToEnd
|
|
243
|
+
});
|
|
244
|
+
containerDimensions = [getContentWidth(containerEl), getContentHeight(containerEl)];
|
|
245
|
+
});
|
|
246
|
+
var resizeObserver = new ResizeObserver(function () {
|
|
247
|
+
var prevContainerDimensions = containerDimensions;
|
|
248
|
+
containerDimensions = [getContentWidth(containerEl), getContentHeight(containerEl)];
|
|
249
|
+
if ((prevContainerDimensions === null || prevContainerDimensions === void 0 ? void 0 : prevContainerDimensions[0]) !== containerDimensions[0] || (prevContainerDimensions === null || prevContainerDimensions === void 0 ? void 0 : prevContainerDimensions[1]) !== containerDimensions[1]) {
|
|
250
|
+
throttledUpdateTextSize();
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
resizeObserver.observe(containerEl);
|
|
254
|
+
throttledUpdateTextSize.disconnect = function () {
|
|
255
|
+
return resizeObserver.disconnect();
|
|
256
|
+
};
|
|
257
|
+
return throttledUpdateTextSize;
|
|
258
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { DetailedHTMLProps, HTMLAttributes, ReactElement, ReactHTML } from 'react';
|
|
2
|
+
import { Options } from './auto-text-size-standalone';
|
|
3
|
+
export default function AutoResizeText({ mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, scrollToEnd, as: Comp, children, ...rest }: Options & {
|
|
4
|
+
as?: keyof ReactHTML | React.ComponentType<any>;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
} & DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>): ReactElement;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var _excluded = ["mode", "minFontSizePx", "maxFontSizePx", "fontSizePrecisionPx", "scrollToEnd", "as", "children"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React, { useCallback, useEffect, useRef } from 'react';
|
|
6
|
+
import { autoTextSize } from "./auto-text-size-standalone";
|
|
7
|
+
export default function AutoResizeText(_ref) {
|
|
8
|
+
var mode = _ref.mode,
|
|
9
|
+
minFontSizePx = _ref.minFontSizePx,
|
|
10
|
+
maxFontSizePx = _ref.maxFontSizePx,
|
|
11
|
+
fontSizePrecisionPx = _ref.fontSizePrecisionPx,
|
|
12
|
+
scrollToEnd = _ref.scrollToEnd,
|
|
13
|
+
_ref$as = _ref.as,
|
|
14
|
+
Comp = _ref$as === void 0 ? 'div' : _ref$as,
|
|
15
|
+
children = _ref.children,
|
|
16
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
var updateTextSizeRef = useRef();
|
|
18
|
+
useEffect(function () {
|
|
19
|
+
var _updateTextSizeRef$cu;
|
|
20
|
+
(_updateTextSizeRef$cu = updateTextSizeRef.current) === null || _updateTextSizeRef$cu === void 0 || _updateTextSizeRef$cu.call(updateTextSizeRef);
|
|
21
|
+
}, [children]);
|
|
22
|
+
var refCallback = useCallback(function (innerEl) {
|
|
23
|
+
var _updateTextSizeRef$cu2;
|
|
24
|
+
(_updateTextSizeRef$cu2 = updateTextSizeRef.current) === null || _updateTextSizeRef$cu2 === void 0 || _updateTextSizeRef$cu2.disconnect();
|
|
25
|
+
var containerEl = innerEl === null || innerEl === void 0 ? void 0 : innerEl.parentElement;
|
|
26
|
+
if (!innerEl || !containerEl) return;
|
|
27
|
+
updateTextSizeRef.current = autoTextSize({
|
|
28
|
+
innerEl: innerEl,
|
|
29
|
+
containerEl: containerEl,
|
|
30
|
+
mode: mode,
|
|
31
|
+
minFontSizePx: minFontSizePx,
|
|
32
|
+
maxFontSizePx: maxFontSizePx,
|
|
33
|
+
fontSizePrecisionPx: fontSizePrecisionPx,
|
|
34
|
+
scrollToEnd: scrollToEnd
|
|
35
|
+
});
|
|
36
|
+
}, [mode, minFontSizePx, maxFontSizePx, fontSizePrecisionPx, scrollToEnd]);
|
|
37
|
+
return /*#__PURE__*/React.createElement(Comp, _extends({
|
|
38
|
+
ref: refCallback
|
|
39
|
+
}, rest), children);
|
|
40
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string |
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string |
|
|
2
|
+
dataSourceKey: string | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -8,7 +8,7 @@ declare const useDrawerState: (operationContent?: {
|
|
|
8
8
|
openDrawer: (item: OperationItem) => void;
|
|
9
9
|
closeDrawer: () => void;
|
|
10
10
|
drawerContent: import("react").ReactNode;
|
|
11
|
-
Container:
|
|
11
|
+
Container: {
|
|
12
12
|
(props: import("../../../pisellModal").PisellModalProps): JSX.Element;
|
|
13
13
|
confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
14
14
|
destroy: () => void;
|
|
@@ -32,7 +32,7 @@ declare const useDrawerState: (operationContent?: {
|
|
|
32
32
|
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
33
33
|
};
|
|
34
34
|
Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
|
|
35
|
-
};
|
|
35
|
+
} | typeof Drawer;
|
|
36
36
|
containerProps: {};
|
|
37
37
|
};
|
|
38
38
|
export default useDrawerState;
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title:
|
|
22
|
+
title: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle:
|
|
31
|
+
subTitle: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: any;
|
|
34
34
|
onRow: (record: any) => any;
|
|
@@ -69,7 +69,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
69
69
|
useCustomAction: boolean;
|
|
70
70
|
actionType: string;
|
|
71
71
|
openMode: "modal" | "drawer";
|
|
72
|
-
openContentSize: "
|
|
72
|
+
openContentSize: "small" | "middle" | "large";
|
|
73
73
|
openTitle: string;
|
|
74
74
|
key: string;
|
|
75
75
|
} | undefined;
|
|
@@ -289,7 +289,7 @@ var useTableProps = function useTableProps(props) {
|
|
|
289
289
|
filterBy: filterBy,
|
|
290
290
|
getInitialValues: getInitialValues
|
|
291
291
|
}));
|
|
292
|
-
dom.__proto__.
|
|
292
|
+
dom.__proto__.__items = propsFilter === null || propsFilter === void 0 ? void 0 : propsFilter.items;
|
|
293
293
|
return dom;
|
|
294
294
|
}, [propsFilter, search]);
|
|
295
295
|
var onRow = useMemoizedFn(function (record) {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { UploadFile as AntdUploadFile } from 'antd/es/upload/interface';
|
|
2
|
+
import type { UploadValue, UploadChangeHandler } from './types';
|
|
3
|
+
export interface UploadFile extends AntdUploadFile {
|
|
4
|
+
metadata?: {
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
duration?: number;
|
|
8
|
+
bitrate?: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface UploadProps {
|
|
12
|
+
renderMode?: string;
|
|
13
|
+
fieldKey: string;
|
|
14
|
+
maxSize?: number;
|
|
15
|
+
minCount?: number;
|
|
16
|
+
maxCount?: number;
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
presetType?: string[];
|
|
19
|
+
presetTypeString?: string[];
|
|
20
|
+
customType?: string[];
|
|
21
|
+
enablePresetType?: boolean;
|
|
22
|
+
enableCustomType?: boolean;
|
|
23
|
+
allowPreview?: boolean;
|
|
24
|
+
value?: UploadValue;
|
|
25
|
+
typeMaxSizeMap?: Record<string, number>;
|
|
26
|
+
enableMultilingual?: boolean;
|
|
27
|
+
onChange?: UploadChangeHandler;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
mediaUploadUrl?: string;
|
|
30
|
+
getHeaders?: () => Record<string, string>;
|
|
31
|
+
mediaConfig?: {
|
|
32
|
+
data: {
|
|
33
|
+
upload_onetime_limit: number;
|
|
34
|
+
upload_maxsize: number;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const formFieldMap: {
|
|
3
2
|
FormItemCheckbox: import("react").FC<{}> & {
|
|
4
3
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -20,7 +19,7 @@ declare const formFieldMap: {
|
|
|
20
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
21
20
|
onChange: (value: string) => void;
|
|
22
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
23
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
24
23
|
customDomain?: string | undefined;
|
|
25
24
|
value?: string | undefined;
|
|
26
25
|
tenantId: string;
|
|
@@ -60,7 +59,13 @@ declare const formFieldMap: {
|
|
|
60
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
62
61
|
};
|
|
63
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> |
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
63
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
+
} & {
|
|
65
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
67
|
+
onChange: (value: string) => void;
|
|
68
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
64
69
|
JSON: import("react").FC<any>;
|
|
65
70
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
66
71
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -73,18 +78,14 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
73
78
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
74
79
|
onChange: (value: string) => void;
|
|
75
80
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
76
|
-
rootDomain: "custom" | "
|
|
81
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
77
82
|
customDomain?: string | undefined;
|
|
78
83
|
value?: string | undefined;
|
|
79
84
|
tenantId: string;
|
|
80
85
|
name?: string | undefined;
|
|
81
86
|
fieldKey?: string | undefined;
|
|
82
87
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
83
|
-
}) | (import("react").FC<{}> & {
|
|
84
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
85
|
-
} & {
|
|
86
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
87
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
88
|
+
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
88
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
89
90
|
} & {
|
|
90
91
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -96,7 +97,5 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
96
97
|
extraParams?: Record<string, any> | undefined;
|
|
97
98
|
} & {
|
|
98
99
|
dataSource?: any;
|
|
99
|
-
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./
|
|
100
|
-
onChange: (value: string) => void;
|
|
101
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
100
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
102
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { ValueProps, SortType } from '../types';
|
|
3
|
+
declare type IdType = string | number;
|
|
4
|
+
declare type TreeItemProps = {
|
|
5
|
+
id: string | number;
|
|
6
|
+
key: string | number;
|
|
7
|
+
item: ValueProps | any;
|
|
8
|
+
depth: number;
|
|
9
|
+
lists: any[];
|
|
10
|
+
childrenProps?: SortType;
|
|
11
|
+
sensors?: any;
|
|
12
|
+
expandedKeys?: IdType[];
|
|
13
|
+
setExpandedKeys?: any;
|
|
14
|
+
onSelectKeys?: (ids: IdType) => void;
|
|
15
|
+
onChange?: (value: any[]) => void;
|
|
16
|
+
};
|
|
17
|
+
declare const TreeItem: (props: TreeItemProps) => JSX.Element;
|
|
18
|
+
export default TreeItem;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface IconFontProps extends IconComponentProps {
|
|
4
|
+
type: string;
|
|
5
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
6
|
+
}
|
|
7
|
+
declare const IconFont: React.FC<IconFontProps>;
|
|
8
|
+
export default IconFont;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare type ItemValue = string | number;
|
|
4
|
+
export interface Item {
|
|
5
|
+
value: ItemValue;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
type: 'text' | 'primary';
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
size?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface KeyboardProps {
|
|
13
|
+
id?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
onChange?: (value?: ItemValue) => void;
|
|
17
|
+
items?: Item[];
|
|
18
|
+
rightItems?: Item[];
|
|
19
|
+
keydown?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: React.MemoExoticComponent<(props: KeyboardProps) => JSX.Element>;
|
|
22
|
+
export default _default;
|