@xfe-repo/web-components 1.5.3 → 1.6.1
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/index.css +24 -0
- package/dist/index.js +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +7 -7
package/dist/index.css
CHANGED
|
@@ -591,10 +591,34 @@
|
|
|
591
591
|
.index_module_select_wrap .index_module_select_label .ant-select-selector {
|
|
592
592
|
border-right: none !important;
|
|
593
593
|
}
|
|
594
|
+
.index_module_auto_width_wrap {
|
|
595
|
+
flex: none !important;
|
|
596
|
+
width: fit-content !important;
|
|
597
|
+
min-width: 385px;
|
|
598
|
+
}
|
|
594
599
|
.index_module_value_select {
|
|
595
600
|
width: calc(100% - 85px) !important;
|
|
596
601
|
min-width: 0;
|
|
597
602
|
}
|
|
603
|
+
.index_module_auto_width_value_select {
|
|
604
|
+
flex: none !important;
|
|
605
|
+
width: auto !important;
|
|
606
|
+
min-width: 300px;
|
|
607
|
+
}
|
|
608
|
+
.index_module_auto_width_value_select .ant-select-selector {
|
|
609
|
+
width: auto !important;
|
|
610
|
+
min-width: 100%;
|
|
611
|
+
}
|
|
612
|
+
.index_module_auto_width_value_select .ant-select-selection-item {
|
|
613
|
+
flex: none;
|
|
614
|
+
width: max-content;
|
|
615
|
+
max-width: none;
|
|
616
|
+
}
|
|
617
|
+
.index_module_auto_width_value_select .ant-select-selection-placeholder {
|
|
618
|
+
flex: none;
|
|
619
|
+
width: max-content;
|
|
620
|
+
max-width: none;
|
|
621
|
+
}
|
|
598
622
|
.index_module_select7 {
|
|
599
623
|
width: auto;
|
|
600
624
|
}
|
package/dist/index.js
CHANGED
|
@@ -101,6 +101,7 @@ function _inherits(subClass, superClass) {
|
|
|
101
101
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
102
102
|
}
|
|
103
103
|
function _instanceof(left, right) {
|
|
104
|
+
"@swc/helpers - instanceof";
|
|
104
105
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
105
106
|
return !!right[Symbol.hasInstance](left);
|
|
106
107
|
} else {
|
|
@@ -7358,7 +7359,9 @@ var useReqData = function useReqData(fn, reqParams, dependency) {
|
|
|
7358
7359
|
var index_module_default21 = {
|
|
7359
7360
|
select_wrap: "index_module_select_wrap",
|
|
7360
7361
|
select_label: "index_module_select_label",
|
|
7362
|
+
auto_width_wrap: "index_module_auto_width_wrap",
|
|
7361
7363
|
value_select: "index_module_value_select",
|
|
7364
|
+
auto_width_value_select: "index_module_auto_width_value_select",
|
|
7362
7365
|
select: "index_module_select7"
|
|
7363
7366
|
};
|
|
7364
7367
|
// src/EffectLabelSelect/index.tsx
|
|
@@ -7367,6 +7370,7 @@ var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
|
7367
7370
|
var EffectLabelSelect = (0, import_react52.memo)(function(props) {
|
|
7368
7371
|
var onChange = props.onChange, className = props.className, value = props.value, disabled = props.disabled, defaultLabel = props.defaultLabel, _props_labelDic = props.labelDic, labelDic = _props_labelDic === void 0 ? defaultLabelDic : _props_labelDic, onFetchData = props.onFetchData, _props_onTransformData = props.onTransformData, onTransformData = _props_onTransformData === void 0 ? defaultTransformDataFn : _props_onTransformData, _props_fetchParams = props.fetchParams, fetchParams = _props_fetchParams === void 0 ? {} : _props_fetchParams, _props_customLabelInValue = props.customLabelInValue, customLabelInValue = _props_customLabelInValue === void 0 ? false : _props_customLabelInValue, optionsDisplayType = props.optionsDisplayType, style = props.style;
|
|
7369
7372
|
var apiService = useRequestConfig().apiService;
|
|
7373
|
+
var isAutoWidthMode = optionsDisplayType === "labelAndValue";
|
|
7370
7374
|
var _ref = _sliced_to_array((0, import_react52.useState)(function() {
|
|
7371
7375
|
var _transformObj2Options_, _transformObj2Options;
|
|
7372
7376
|
var defaultLabelFromValue = customLabelInValue ? getSelectValue(value, "labelDicKey") : "";
|
|
@@ -7436,7 +7440,7 @@ var EffectLabelSelect = (0, import_react52.memo)(function(props) {
|
|
|
7436
7440
|
});
|
|
7437
7441
|
}) : optionsData;
|
|
7438
7442
|
var selectValueProps = {
|
|
7439
|
-
className: (0, import_classnames16.default)(index_module_default21.value_select, className),
|
|
7443
|
+
className: (0, import_classnames16.default)(index_module_default21.value_select, className, _define_property({}, index_module_default21.auto_width_value_select, isAutoWidthMode)),
|
|
7440
7444
|
notFoundContent: notFoundContent,
|
|
7441
7445
|
value: mergedValue,
|
|
7442
7446
|
options: mergedOptionsData,
|
|
@@ -7453,7 +7457,7 @@ var EffectLabelSelect = (0, import_react52.memo)(function(props) {
|
|
|
7453
7457
|
filterOption: false
|
|
7454
7458
|
};
|
|
7455
7459
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_antd40.Space.Compact, {
|
|
7456
|
-
className: index_module_default21.select_wrap,
|
|
7460
|
+
className: (0, import_classnames16.default)(index_module_default21.select_wrap, _define_property({}, index_module_default21.auto_width_wrap, isAutoWidthMode)),
|
|
7457
7461
|
style: style,
|
|
7458
7462
|
children: [
|
|
7459
7463
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_antd40.Select, _object_spread({}, selectLabelProps)),
|
package/dist/index.mjs
CHANGED
|
@@ -100,6 +100,7 @@ function _inherits(subClass, superClass) {
|
|
|
100
100
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
101
101
|
}
|
|
102
102
|
function _instanceof(left, right) {
|
|
103
|
+
"@swc/helpers - instanceof";
|
|
103
104
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
104
105
|
return !!right[Symbol.hasInstance](left);
|
|
105
106
|
} else {
|
|
@@ -7064,7 +7065,9 @@ var useReqData = function useReqData(fn, reqParams, dependency) {
|
|
|
7064
7065
|
var index_module_default21 = {
|
|
7065
7066
|
select_wrap: "index_module_select_wrap",
|
|
7066
7067
|
select_label: "index_module_select_label",
|
|
7068
|
+
auto_width_wrap: "index_module_auto_width_wrap",
|
|
7067
7069
|
value_select: "index_module_value_select",
|
|
7070
|
+
auto_width_value_select: "index_module_auto_width_value_select",
|
|
7068
7071
|
select: "index_module_select7"
|
|
7069
7072
|
};
|
|
7070
7073
|
// src/EffectLabelSelect/index.tsx
|
|
@@ -7073,6 +7076,7 @@ import { jsx as jsx48, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
|
7073
7076
|
var EffectLabelSelect = memo38(function(props) {
|
|
7074
7077
|
var onChange = props.onChange, className = props.className, value = props.value, disabled = props.disabled, defaultLabel = props.defaultLabel, _props_labelDic = props.labelDic, labelDic = _props_labelDic === void 0 ? defaultLabelDic : _props_labelDic, onFetchData = props.onFetchData, _props_onTransformData = props.onTransformData, onTransformData = _props_onTransformData === void 0 ? defaultTransformDataFn : _props_onTransformData, _props_fetchParams = props.fetchParams, fetchParams = _props_fetchParams === void 0 ? {} : _props_fetchParams, _props_customLabelInValue = props.customLabelInValue, customLabelInValue = _props_customLabelInValue === void 0 ? false : _props_customLabelInValue, optionsDisplayType = props.optionsDisplayType, style = props.style;
|
|
7075
7078
|
var apiService = useRequestConfig().apiService;
|
|
7079
|
+
var isAutoWidthMode = optionsDisplayType === "labelAndValue";
|
|
7076
7080
|
var _useState31 = _sliced_to_array(useState31(function() {
|
|
7077
7081
|
var _transformObj2Options_, _transformObj2Options;
|
|
7078
7082
|
var defaultLabelFromValue = customLabelInValue ? getSelectValue(value, "labelDicKey") : "";
|
|
@@ -7142,7 +7146,7 @@ var EffectLabelSelect = memo38(function(props) {
|
|
|
7142
7146
|
});
|
|
7143
7147
|
}) : optionsData;
|
|
7144
7148
|
var selectValueProps = {
|
|
7145
|
-
className: classnames15(index_module_default21.value_select, className),
|
|
7149
|
+
className: classnames15(index_module_default21.value_select, className, _define_property({}, index_module_default21.auto_width_value_select, isAutoWidthMode)),
|
|
7146
7150
|
notFoundContent: notFoundContent,
|
|
7147
7151
|
value: mergedValue,
|
|
7148
7152
|
options: mergedOptionsData,
|
|
@@ -7159,7 +7163,7 @@ var EffectLabelSelect = memo38(function(props) {
|
|
|
7159
7163
|
filterOption: false
|
|
7160
7164
|
};
|
|
7161
7165
|
return /* @__PURE__ */ jsxs20(Space4.Compact, {
|
|
7162
|
-
className: index_module_default21.select_wrap,
|
|
7166
|
+
className: classnames15(index_module_default21.select_wrap, _define_property({}, index_module_default21.auto_width_wrap, isAutoWidthMode)),
|
|
7163
7167
|
style: style,
|
|
7164
7168
|
children: [
|
|
7165
7169
|
/* @__PURE__ */ jsx48(Select12, _object_spread({}, selectLabelProps)),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xfe-repo/web-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"module": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"@types/react": "^18",
|
|
51
51
|
"esbuild-plugin-less": "^1.3.9",
|
|
52
52
|
"eslint": "8.57.1",
|
|
53
|
-
"@xfe-repo/eslint-config": "1.
|
|
54
|
-
"@xfe-repo/typescript-config": "1.
|
|
53
|
+
"@xfe-repo/eslint-config": "1.6.0",
|
|
54
|
+
"@xfe-repo/typescript-config": "1.6.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@ant-design/icons": "^5.0.0",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"react-dom": "18.2.0",
|
|
62
62
|
"react-use": "^17.5.1",
|
|
63
63
|
"swr": "^2.2.5",
|
|
64
|
-
"@xfe-repo/web-router": "1.
|
|
65
|
-
"@xfe-repo/web-
|
|
66
|
-
"@xfe-repo/web-
|
|
67
|
-
"@xfe-repo/web-
|
|
64
|
+
"@xfe-repo/web-router": "1.6.0",
|
|
65
|
+
"@xfe-repo/web-micro": "1.6.0",
|
|
66
|
+
"@xfe-repo/web-service": "1.6.0",
|
|
67
|
+
"@xfe-repo/web-utils": "1.6.0"
|
|
68
68
|
},
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"registry": "https://registry.npmjs.org/"
|