@mcurros2/microm 1.1.463-0 → 1.1.465-0
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.js +43 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35325,7 +35325,7 @@ var $557VF = parcelRequire("557VF");
|
|
|
35325
35325
|
|
|
35326
35326
|
var $gMI48 = parcelRequire("gMI48");
|
|
35327
35327
|
function $9d29608dc6ae79e3$export$7c17b3a1430b33c0(props) {
|
|
35328
|
-
const { entityForm: entityForm, entity: entity, lookupDefName: lookupDefName, autoFocus: autoFocus, label: label, parentKeys: parentKeys, bindingColumns: bindingColumns, required: required, readonly: readonly, disabled: disabled, idMaxWidth: idMaxWidth, icon: icon, iconVariant: iconVariant, requiredLabel: requiredLabel, description: description, size: size, onLookupPerformed: onLookupPerformed, enableAdd: enableAdd, enableEdit: enableEdit, enableDelete: enableDelete, enableView: enableView, transform: transform, autoTrim: autoTrim, editLastLevelOnly: editLastLevelOnly } = (0, $b4te3$mantinecore.useComponentDefaultProps)('Lookup', (0, $557VF.LookupDefaultProps), props);
|
|
35328
|
+
const { entityForm: entityForm, entity: entity, lookupDefName: lookupDefName, autoFocus: autoFocus, label: label, parentKeys: parentKeys, bindingColumns: bindingColumns, required: required, readonly: readonly, disabled: disabled, idMaxWidth: idMaxWidth, icon: icon, iconVariant: iconVariant, requiredLabel: requiredLabel, description: description, size: size, onLookupPerformed: onLookupPerformed, enableAdd: enableAdd, enableEdit: enableEdit, enableDelete: enableDelete, enableView: enableView, transform: transform, autoTrim: autoTrim, editLastLevelOnly: editLastLevelOnly, prefixMaxWidth: prefixMaxWidth } = (0, $b4te3$mantinecore.useComponentDefaultProps)('Lookup', (0, $557VF.LookupDefaultProps), props);
|
|
35329
35329
|
if (bindingColumns.length < 2) throw new Error('Compound Lookup requires at least two bindingColumns.');
|
|
35330
35330
|
const theme = (0, $b4te3$mantinecore.useMantineTheme)();
|
|
35331
35331
|
const significantColumn = bindingColumns[bindingColumns.length - 1];
|
|
@@ -35428,39 +35428,49 @@ function $9d29608dc6ae79e3$export$7c17b3a1430b33c0(props) {
|
|
|
35428
35428
|
},
|
|
35429
35429
|
align: "flex-start",
|
|
35430
35430
|
children: [
|
|
35431
|
-
|
|
35432
|
-
|
|
35433
|
-
|
|
35434
|
-
|
|
35435
|
-
alignItems: 'baseline'
|
|
35436
|
-
},
|
|
35437
|
-
children: lookupAPI.keyPrefix
|
|
35438
|
-
})
|
|
35439
|
-
}),
|
|
35440
|
-
/*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.TextInput), {
|
|
35441
|
-
ref: inputRef,
|
|
35442
|
-
size: size,
|
|
35431
|
+
/*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsxs)((0, $b4te3$mantinecore.Group), {
|
|
35432
|
+
style: {
|
|
35433
|
+
flexGrow: 1
|
|
35434
|
+
},
|
|
35443
35435
|
maw: idMaxWidth,
|
|
35444
|
-
|
|
35445
|
-
|
|
35446
|
-
|
|
35447
|
-
|
|
35448
|
-
|
|
35449
|
-
|
|
35450
|
-
|
|
35451
|
-
|
|
35452
|
-
|
|
35453
|
-
|
|
35454
|
-
|
|
35455
|
-
|
|
35456
|
-
|
|
35457
|
-
|
|
35458
|
-
|
|
35459
|
-
|
|
35460
|
-
|
|
35461
|
-
|
|
35462
|
-
|
|
35463
|
-
|
|
35436
|
+
children: [
|
|
35437
|
+
editLastLevelOnly && /*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.TextInput), {
|
|
35438
|
+
readOnly: true,
|
|
35439
|
+
value: lookupAPI.keyPrefix
|
|
35440
|
+
}),
|
|
35441
|
+
/*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Group), {
|
|
35442
|
+
style: {
|
|
35443
|
+
flexGrow: 1
|
|
35444
|
+
},
|
|
35445
|
+
children: /*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.TextInput), {
|
|
35446
|
+
ref: inputRef,
|
|
35447
|
+
size: size,
|
|
35448
|
+
sx: {
|
|
35449
|
+
flexGrow: 1
|
|
35450
|
+
},
|
|
35451
|
+
readOnly: readonlyCondition || entityForm.formMode === 'view' || lookupAPI.status.loading || entityForm.status.loading,
|
|
35452
|
+
autoFocus: autoFocus === 'autoFocusOnAdd' ? addAutofocus : autoFocus === 'autoFocusOnEdit' ? editAutofocus : autoFocus,
|
|
35453
|
+
"data-autofocus": autoFocus === 'autoFocusOnAdd' ? addAutofocus : autoFocus === 'autoFocusOnEdit' ? editAutofocus : autoFocus,
|
|
35454
|
+
disabled: disabled,
|
|
35455
|
+
rightSection: /*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.ActionIcon), {
|
|
35456
|
+
color: theme.primaryColor,
|
|
35457
|
+
disabled: readonlyCondition || entityForm.formMode === 'view' || lookupAPI.status.loading || entityForm.status.loading,
|
|
35458
|
+
onClick: async ()=>{
|
|
35459
|
+
if (readonlyCondition || entityForm.formMode === 'view' || lookupAPI.status.loading || entityForm.status.loading) return;
|
|
35460
|
+
await lookupAPI.onBlur(significantColumn.name, true);
|
|
35461
|
+
},
|
|
35462
|
+
variant: iconVariant,
|
|
35463
|
+
size: "md",
|
|
35464
|
+
children: icon
|
|
35465
|
+
}),
|
|
35466
|
+
...lookupAPI.lookupInputProps,
|
|
35467
|
+
onBlur: async (event)=>{
|
|
35468
|
+
await lookupAPI.onBlur(significantColumn.name, false, event);
|
|
35469
|
+
}
|
|
35470
|
+
}, `${entity.name}${significantColumn.name}Compound`)
|
|
35471
|
+
})
|
|
35472
|
+
]
|
|
35473
|
+
}),
|
|
35464
35474
|
/*#__PURE__*/ (0, $b4te3$reactjsxruntime.jsx)((0, $b4te3$mantinecore.Group), {
|
|
35465
35475
|
style: {
|
|
35466
35476
|
flexGrow: 1
|