@hanwenbo/x-web-pro-components 0.0.1 → 0.0.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.
|
@@ -996,9 +996,9 @@ var BaseProForm = function BaseProForm(_ref18) {
|
|
|
996
996
|
});
|
|
997
997
|
var availableActionRowSpan = 24 - actionSpan;
|
|
998
998
|
var actionRow = rows[rows.length - 1];
|
|
999
|
-
var shouldStretchActionRow = Boolean(actionRow) && actionRow.totalSpan < availableActionRowSpan &&
|
|
999
|
+
var shouldStretchActionRow = Boolean(actionRow) && actionRow.totalSpan < availableActionRowSpan && actionRow.spans.some(function (currentSpan) {
|
|
1000
1000
|
return currentSpan > querySpanSize.span;
|
|
1001
|
-
})
|
|
1001
|
+
});
|
|
1002
1002
|
if (actionRow && actionRow.totalSpan <= availableActionRowSpan) {
|
|
1003
1003
|
var stretchedRowSpans = shouldStretchActionRow ? getQueryFilterStretchSpans(actionRow.spans, availableActionRowSpan) : actionRow.spans;
|
|
1004
1004
|
actionRow.keys.forEach(function (itemKey, index) {
|
|
@@ -2208,7 +2208,7 @@ export var DrawerForm = function DrawerForm(_ref36) {
|
|
|
2208
2208
|
};
|
|
2209
2209
|
export var ProFormList = Form.List;
|
|
2210
2210
|
export var ProFormErrorList = Form.ErrorList;
|
|
2211
|
-
|
|
2211
|
+
var proFormWithProperties = attachPropertiesToComponent(BaseProForm, {
|
|
2212
2212
|
useForm: useForm,
|
|
2213
2213
|
useFormInstance: useFormInstance,
|
|
2214
2214
|
useWatch: useWatch,
|
|
@@ -2230,8 +2230,6 @@ export var ProForm = attachPropertiesToComponent(BaseProForm, {
|
|
|
2230
2230
|
UploadDragger: ProFormUploadDragger,
|
|
2231
2231
|
StepsForm: StepsForm,
|
|
2232
2232
|
StepForm: StepForm,
|
|
2233
|
-
SchemaForm: SchemaForm,
|
|
2234
|
-
BetaSchemaForm: BetaSchemaForm,
|
|
2235
2233
|
Field: ProFormField,
|
|
2236
2234
|
Text: ProFormText,
|
|
2237
2235
|
TextArea: ProFormTextArea,
|
|
@@ -2264,5 +2262,26 @@ export var ProForm = attachPropertiesToComponent(BaseProForm, {
|
|
|
2264
2262
|
Rate: ProFormRate,
|
|
2265
2263
|
Slider: ProFormSlider
|
|
2266
2264
|
});
|
|
2265
|
+
|
|
2266
|
+
// SchemaForm imports the form primitives above. Resolve these two static
|
|
2267
|
+
// members lazily so native ESM consumers do not read the circular bindings
|
|
2268
|
+
// before schemaForm.tsx has finished initializing.
|
|
2269
|
+
Object.defineProperties(proFormWithProperties, {
|
|
2270
|
+
SchemaForm: {
|
|
2271
|
+
configurable: true,
|
|
2272
|
+
enumerable: true,
|
|
2273
|
+
get: function get() {
|
|
2274
|
+
return SchemaForm;
|
|
2275
|
+
}
|
|
2276
|
+
},
|
|
2277
|
+
BetaSchemaForm: {
|
|
2278
|
+
configurable: true,
|
|
2279
|
+
enumerable: true,
|
|
2280
|
+
get: function get() {
|
|
2281
|
+
return BetaSchemaForm;
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
});
|
|
2285
|
+
export var ProForm = proFormWithProperties;
|
|
2267
2286
|
export var ProFormCore = BaseProForm;
|
|
2268
2287
|
export default ProForm;
|
|
@@ -1060,9 +1060,9 @@ var BaseProForm = function BaseProForm(_ref18) {
|
|
|
1060
1060
|
});
|
|
1061
1061
|
var availableActionRowSpan = 24 - actionSpan;
|
|
1062
1062
|
var actionRow = rows[rows.length - 1];
|
|
1063
|
-
var shouldStretchActionRow = Boolean(actionRow) && actionRow.totalSpan < availableActionRowSpan &&
|
|
1063
|
+
var shouldStretchActionRow = Boolean(actionRow) && actionRow.totalSpan < availableActionRowSpan && actionRow.spans.some(function (currentSpan) {
|
|
1064
1064
|
return currentSpan > querySpanSize.span;
|
|
1065
|
-
})
|
|
1065
|
+
});
|
|
1066
1066
|
if (actionRow && actionRow.totalSpan <= availableActionRowSpan) {
|
|
1067
1067
|
var stretchedRowSpans = shouldStretchActionRow ? getQueryFilterStretchSpans(actionRow.spans, availableActionRowSpan) : actionRow.spans;
|
|
1068
1068
|
actionRow.keys.forEach(function (itemKey, index) {
|
|
@@ -2272,7 +2272,7 @@ var DrawerForm = exports.DrawerForm = function DrawerForm(_ref36) {
|
|
|
2272
2272
|
};
|
|
2273
2273
|
var ProFormList = exports.ProFormList = _form.Form.List;
|
|
2274
2274
|
var ProFormErrorList = exports.ProFormErrorList = _form.Form.ErrorList;
|
|
2275
|
-
var
|
|
2275
|
+
var proFormWithProperties = (0, _utils.attachPropertiesToComponent)(BaseProForm, {
|
|
2276
2276
|
useForm: _form.useForm,
|
|
2277
2277
|
useFormInstance: _form.useFormInstance,
|
|
2278
2278
|
useWatch: _form.useWatch,
|
|
@@ -2294,8 +2294,6 @@ var ProForm = exports.ProForm = (0, _utils.attachPropertiesToComponent)(BaseProF
|
|
|
2294
2294
|
UploadDragger: _uploadDragger.ProFormUploadDragger,
|
|
2295
2295
|
StepsForm: _stepsForm.StepsForm,
|
|
2296
2296
|
StepForm: _stepsForm.StepForm,
|
|
2297
|
-
SchemaForm: _schemaForm.SchemaForm,
|
|
2298
|
-
BetaSchemaForm: _schemaForm.BetaSchemaForm,
|
|
2299
2297
|
Field: ProFormField,
|
|
2300
2298
|
Text: ProFormText,
|
|
2301
2299
|
TextArea: ProFormTextArea,
|
|
@@ -2328,5 +2326,26 @@ var ProForm = exports.ProForm = (0, _utils.attachPropertiesToComponent)(BaseProF
|
|
|
2328
2326
|
Rate: ProFormRate,
|
|
2329
2327
|
Slider: ProFormSlider
|
|
2330
2328
|
});
|
|
2329
|
+
|
|
2330
|
+
// SchemaForm imports the form primitives above. Resolve these two static
|
|
2331
|
+
// members lazily so native ESM consumers do not read the circular bindings
|
|
2332
|
+
// before schemaForm.tsx has finished initializing.
|
|
2333
|
+
Object.defineProperties(proFormWithProperties, {
|
|
2334
|
+
SchemaForm: {
|
|
2335
|
+
configurable: true,
|
|
2336
|
+
enumerable: true,
|
|
2337
|
+
get: function get() {
|
|
2338
|
+
return _schemaForm.SchemaForm;
|
|
2339
|
+
}
|
|
2340
|
+
},
|
|
2341
|
+
BetaSchemaForm: {
|
|
2342
|
+
configurable: true,
|
|
2343
|
+
enumerable: true,
|
|
2344
|
+
get: function get() {
|
|
2345
|
+
return _schemaForm.BetaSchemaForm;
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2348
|
+
});
|
|
2349
|
+
var ProForm = exports.ProForm = proFormWithProperties;
|
|
2331
2350
|
var ProFormCore = exports.ProFormCore = BaseProForm;
|
|
2332
2351
|
var _default = exports.default = ProForm;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanwenbo/x-web-pro-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Enterprise-ready pro components built on x-web-ui",
|
|
5
5
|
"author": "9476400@qq.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"dayjs": "^1.11.3",
|
|
46
46
|
"lucide-react": "^0.460.0",
|
|
47
|
-
"@hanwenbo/x-web-ui": "0.0.
|
|
47
|
+
"@hanwenbo/x-web-ui": "0.0.2"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": ">=18.0.0",
|