@kaiheila/ui-components 1.0.2 → 1.0.3
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/dist/main.css +1617 -1617
- package/dist/ui-components.js +11 -5
- package/package.json +1 -1
package/dist/ui-components.js
CHANGED
|
@@ -2196,7 +2196,7 @@ const logic_models_react_namespaceObject = require("@kookapp/logic-models-react"
|
|
|
2196
2196
|
|
|
2197
2197
|
|
|
2198
2198
|
const OptionList = _ref => {
|
|
2199
|
-
var _visibleRange$visible;
|
|
2199
|
+
var _visibleRange$visible, _visibleRange$visible2;
|
|
2200
2200
|
let {
|
|
2201
2201
|
filterData,
|
|
2202
2202
|
optionsStyle,
|
|
@@ -2206,7 +2206,8 @@ const OptionList = _ref => {
|
|
|
2206
2206
|
valueKey = "value",
|
|
2207
2207
|
loadComponent,
|
|
2208
2208
|
onSelect,
|
|
2209
|
-
onReachBottom
|
|
2209
|
+
onReachBottom,
|
|
2210
|
+
loading = false
|
|
2210
2211
|
} = _ref;
|
|
2211
2212
|
const containerRef = (0,external_react_namespaceObject.useRef)(null);
|
|
2212
2213
|
const ids = (0,external_react_namespaceObject.useMemo)(() => filterData.map(item => item[valueKey]), [filterData, valueKey]);
|
|
@@ -2225,6 +2226,7 @@ const OptionList = _ref => {
|
|
|
2225
2226
|
containerRef,
|
|
2226
2227
|
onReachBottom
|
|
2227
2228
|
});
|
|
2229
|
+
const empty = (visibleRange === null || visibleRange === void 0 || (_visibleRange$visible = visibleRange.visibleIds) === null || _visibleRange$visible === void 0 ? void 0 : _visibleRange$visible.length) == 0 || (visibleRange === null || visibleRange === void 0 || (_visibleRange$visible2 = visibleRange.visibleIds) === null || _visibleRange$visible2 === void 0 ? void 0 : _visibleRange$visible2.every(id => (0,logic_models_react_namespaceObject.isSentinelId)(id)));
|
|
2228
2230
|
return /*#__PURE__*/external_react_default().createElement("ul", {
|
|
2229
2231
|
className: "selector-search-option theme-scroll-bar",
|
|
2230
2232
|
style: optionsStyle,
|
|
@@ -2242,7 +2244,7 @@ const OptionList = _ref => {
|
|
|
2242
2244
|
padding: 8,
|
|
2243
2245
|
transform: "translateY(".concat(visibleRange === null || visibleRange === void 0 ? void 0 : visibleRange.topSpace, "px)")
|
|
2244
2246
|
}
|
|
2245
|
-
},
|
|
2247
|
+
}, !empty ? visibleRange === null || visibleRange === void 0 ? void 0 : visibleRange.visibleIds.map((id, i) => {
|
|
2246
2248
|
if ((0,logic_models_react_namespaceObject.isSentinelId)(id)) {
|
|
2247
2249
|
return null;
|
|
2248
2250
|
}
|
|
@@ -2263,7 +2265,9 @@ const OptionList = _ref => {
|
|
|
2263
2265
|
key: value + i,
|
|
2264
2266
|
title: label
|
|
2265
2267
|
}, renderOption ? renderOption(item) : label);
|
|
2266
|
-
}) : /*#__PURE__*/external_react_default().createElement("li", {
|
|
2268
|
+
}) : loading ? /*#__PURE__*/external_react_default().createElement("li", {
|
|
2269
|
+
key: "none"
|
|
2270
|
+
}, "\u52A0\u8F7D\u4E2D...") : /*#__PURE__*/external_react_default().createElement("li", {
|
|
2267
2271
|
key: "none"
|
|
2268
2272
|
}, "\u6CA1\u6709\u4EFB\u4F55\u5185\u5BB9")));
|
|
2269
2273
|
};
|
|
@@ -2503,6 +2507,7 @@ class SelectorSearch extends external_react_namespaceObject.Component {
|
|
|
2503
2507
|
renderOption,
|
|
2504
2508
|
disabledValues = [],
|
|
2505
2509
|
onReachBottom,
|
|
2510
|
+
loading,
|
|
2506
2511
|
labelKey = 'label',
|
|
2507
2512
|
valueKey = 'value',
|
|
2508
2513
|
loadComponent
|
|
@@ -2537,6 +2542,7 @@ class SelectorSearch extends external_react_namespaceObject.Component {
|
|
|
2537
2542
|
}, label)), /*#__PURE__*/external_react_default().createElement("span", {
|
|
2538
2543
|
className: "dropdown-icon"
|
|
2539
2544
|
}, /*#__PURE__*/external_react_default().createElement(IconDropDown, null))), showList ? /*#__PURE__*/external_react_default().createElement(selector_search_OptionList, {
|
|
2545
|
+
loading: loading,
|
|
2540
2546
|
filterData: filterData,
|
|
2541
2547
|
optionsStyle: optionsStyle,
|
|
2542
2548
|
renderOption: renderOption,
|
|
@@ -5648,7 +5654,7 @@ class TimeSelector extends external_react_namespaceObject.Component {
|
|
|
5648
5654
|
|
|
5649
5655
|
/* harmony default export */ const time_selector = (TimeSelector);
|
|
5650
5656
|
;// ./package.json
|
|
5651
|
-
const package_namespaceObject = {"rE":"1.0.
|
|
5657
|
+
const package_namespaceObject = {"rE":"1.0.3"};
|
|
5652
5658
|
;// ./src/index.js
|
|
5653
5659
|
|
|
5654
5660
|
|