@pdg/react-form 1.2.10 → 1.2.11
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.
|
@@ -4,7 +4,7 @@ declare function PFormAutocomplete<T extends PFormAutocompleteSingleValue, Multi
|
|
|
4
4
|
/********************************************************************************************************************/
|
|
5
5
|
variant: initVariant, size: initSize, color: initColor, focused: initFocused, labelShrink: initLabelShrink, fullWidth: initFullWidth,
|
|
6
6
|
/********************************************************************************************************************/
|
|
7
|
-
name, labelIcon, label, loading: initLoading, items: initItems, value: initValue, data: initData, error: initError, helperText, disabled: initDisabled, readOnly, required, exceptValue, width, placeholder, multiple, formValueSeparator, formValueSort, disablePortal, noOptionsText, loadingText, limitTags, getLimitTagsText, openOnFocus, disableClearable, async, autoFocus, hidden: initHidden, onLoadItems, onAsyncLoadValueItem, onRenderItem, onRenderTag, onAddItem, getOptionDisabled,
|
|
7
|
+
name, labelIcon, label, loading: initLoading, items: initItems, value: initValue, data: initData, error: initError, helperText, disabled: initDisabled, readOnly, required, exceptValue, width, placeholder, multiple, formValueSeparator, formValueSort, disablePortal, noOptionsText, loadingText, limitTags, getLimitTagsText, openOnFocus, disableClearable, async, autoFocus, hidden: initHidden, onLoadItems, onAsyncLoadValueItem, onRenderItem, onRenderTag, onRednerValue, onAddItem, getOptionDisabled,
|
|
8
8
|
/********************************************************************************************************************/
|
|
9
9
|
onChange, onValue, onValidate, onFocus, onBlur,
|
|
10
10
|
/********************************************************************************************************************/
|
|
@@ -33,6 +33,7 @@ export interface PFormAutocompleteProps<T extends PFormAutocompleteSingleValue,
|
|
|
33
33
|
onAsyncLoadValueItem?: (value: Value) => Promise<ComponentValue>;
|
|
34
34
|
onRenderItem?: (item: Item) => ReactNode;
|
|
35
35
|
onRenderTag?: (item: Item) => ReactNode;
|
|
36
|
+
onRednerValue?: (item: Item) => ReactNode;
|
|
36
37
|
onValue?: (value: Value | undefined) => Value | undefined;
|
|
37
38
|
onAddItem?: (item: Item) => boolean | Promise<boolean>;
|
|
38
39
|
getOptionDisabled?: (item: Item) => boolean;
|
package/dist/index.esm.js
CHANGED
|
@@ -11174,7 +11174,7 @@ _PFormTextEditor.apiKey = '';
|
|
|
11174
11174
|
function _temp$m() {
|
|
11175
11175
|
return "PFormTextEditor";
|
|
11176
11176
|
}function PFormAutocomplete(t0) {
|
|
11177
|
-
var $ = c(
|
|
11177
|
+
var $ = c(251);
|
|
11178
11178
|
var ref = t0.ref,
|
|
11179
11179
|
initVariant = t0.variant,
|
|
11180
11180
|
initSize = t0.size,
|
|
@@ -11214,6 +11214,7 @@ function _temp$m() {
|
|
|
11214
11214
|
onAsyncLoadValueItem = t0.onAsyncLoadValueItem,
|
|
11215
11215
|
onRenderItem = t0.onRenderItem,
|
|
11216
11216
|
onRenderTag = t0.onRenderTag,
|
|
11217
|
+
onRednerValue = t0.onRednerValue,
|
|
11217
11218
|
onAddItem = t0.onAddItem,
|
|
11218
11219
|
getOptionDisabled = t0.getOptionDisabled,
|
|
11219
11220
|
onChange = t0.onChange,
|
|
@@ -12349,7 +12350,7 @@ function _temp$m() {
|
|
|
12349
12350
|
t74 = $[200];
|
|
12350
12351
|
}
|
|
12351
12352
|
var t75;
|
|
12352
|
-
if ($[201] !== multiple || $[202] !==
|
|
12353
|
+
if ($[201] !== multiple || $[202] !== onRednerValue || $[203] !== onRenderTag || $[204] !== size || $[205] !== variant) {
|
|
12353
12354
|
t75 = multiple ? function (value_5, getItemProps) {
|
|
12354
12355
|
if (Array.isArray(value_5)) {
|
|
12355
12356
|
return value_5.map(function (option_2, index) {
|
|
@@ -12377,17 +12378,24 @@ function _temp$m() {
|
|
|
12377
12378
|
index: 0
|
|
12378
12379
|
})));
|
|
12379
12380
|
}
|
|
12381
|
+
} : onRednerValue ? function (value_6, getItemProps_0) {
|
|
12382
|
+
return Array.isArray(value_6) ? null : /*#__PURE__*/React.createElement(Box, _extends({
|
|
12383
|
+
lineHeight: 0
|
|
12384
|
+
}, getItemProps_0({
|
|
12385
|
+
index: 0
|
|
12386
|
+
})), onRednerValue(value_6));
|
|
12380
12387
|
} : undefined;
|
|
12381
12388
|
$[201] = multiple;
|
|
12382
|
-
$[202] =
|
|
12383
|
-
$[203] =
|
|
12384
|
-
$[204] =
|
|
12385
|
-
$[205] =
|
|
12389
|
+
$[202] = onRednerValue;
|
|
12390
|
+
$[203] = onRenderTag;
|
|
12391
|
+
$[204] = size;
|
|
12392
|
+
$[205] = variant;
|
|
12393
|
+
$[206] = t75;
|
|
12386
12394
|
} else {
|
|
12387
|
-
t75 = $[
|
|
12395
|
+
t75 = $[206];
|
|
12388
12396
|
}
|
|
12389
12397
|
var t76;
|
|
12390
|
-
if ($[
|
|
12398
|
+
if ($[207] !== autoFocus || $[208] !== color || $[209] !== disabled || $[210] !== error || $[211] !== errorHelperText || $[212] !== focused || $[213] !== helperText || $[214] !== isOnGetItemLoading || $[215] !== label || $[216] !== labelIcon || $[217] !== labelShrink || $[218] !== loading || $[219] !== name || $[220] !== onBlurRef || $[221] !== onFocusRef || $[222] !== placeholder || $[223] !== readOnly || $[224] !== required || $[225] !== size || $[226] !== variant) {
|
|
12391
12399
|
t76 = function t76(params) {
|
|
12392
12400
|
var _params$inputProps;
|
|
12393
12401
|
var slotProps = {
|
|
@@ -12439,32 +12447,32 @@ function _temp$m() {
|
|
|
12439
12447
|
noFormValueItem: true
|
|
12440
12448
|
}));
|
|
12441
12449
|
};
|
|
12442
|
-
$[
|
|
12443
|
-
$[
|
|
12444
|
-
$[
|
|
12445
|
-
$[
|
|
12446
|
-
$[
|
|
12447
|
-
$[
|
|
12448
|
-
$[
|
|
12449
|
-
$[
|
|
12450
|
-
$[
|
|
12451
|
-
$[
|
|
12452
|
-
$[
|
|
12453
|
-
$[
|
|
12454
|
-
$[
|
|
12455
|
-
$[
|
|
12456
|
-
$[
|
|
12457
|
-
$[
|
|
12458
|
-
$[
|
|
12459
|
-
$[
|
|
12460
|
-
$[
|
|
12461
|
-
$[
|
|
12462
|
-
$[
|
|
12463
|
-
} else {
|
|
12464
|
-
t76 = $[
|
|
12450
|
+
$[207] = autoFocus;
|
|
12451
|
+
$[208] = color;
|
|
12452
|
+
$[209] = disabled;
|
|
12453
|
+
$[210] = error;
|
|
12454
|
+
$[211] = errorHelperText;
|
|
12455
|
+
$[212] = focused;
|
|
12456
|
+
$[213] = helperText;
|
|
12457
|
+
$[214] = isOnGetItemLoading;
|
|
12458
|
+
$[215] = label;
|
|
12459
|
+
$[216] = labelIcon;
|
|
12460
|
+
$[217] = labelShrink;
|
|
12461
|
+
$[218] = loading;
|
|
12462
|
+
$[219] = name;
|
|
12463
|
+
$[220] = onBlurRef;
|
|
12464
|
+
$[221] = onFocusRef;
|
|
12465
|
+
$[222] = placeholder;
|
|
12466
|
+
$[223] = readOnly;
|
|
12467
|
+
$[224] = required;
|
|
12468
|
+
$[225] = size;
|
|
12469
|
+
$[226] = variant;
|
|
12470
|
+
$[227] = t76;
|
|
12471
|
+
} else {
|
|
12472
|
+
t76 = $[227];
|
|
12465
12473
|
}
|
|
12466
12474
|
var t77;
|
|
12467
|
-
if ($[
|
|
12475
|
+
if ($[228] !== disableClearable || $[229] !== disablePortal || $[230] !== disabled || $[231] !== getLimitTagsText || $[232] !== handleGetOptionDisabled || $[233] !== limitTags || $[234] !== loadingText || $[235] !== multiple || $[236] !== noOptionsText || $[237] !== openOnFocus || $[238] !== readOnly || $[239] !== style || $[240] !== sx || $[241] !== t67 || $[242] !== t68 || $[243] !== t69 || $[244] !== t70 || $[245] !== t71 || $[246] !== t72 || $[247] !== t73 || $[248] !== t75 || $[249] !== t76) {
|
|
12468
12476
|
t77 = /*#__PURE__*/React.createElement(Autocomplete, {
|
|
12469
12477
|
options: t67,
|
|
12470
12478
|
className: t68,
|
|
@@ -12491,31 +12499,31 @@ function _temp$m() {
|
|
|
12491
12499
|
renderValue: t75,
|
|
12492
12500
|
renderInput: t76
|
|
12493
12501
|
});
|
|
12494
|
-
$[
|
|
12495
|
-
$[
|
|
12496
|
-
$[
|
|
12497
|
-
$[
|
|
12498
|
-
$[
|
|
12499
|
-
$[
|
|
12500
|
-
$[
|
|
12501
|
-
$[
|
|
12502
|
-
$[
|
|
12503
|
-
$[
|
|
12504
|
-
$[
|
|
12505
|
-
$[
|
|
12506
|
-
$[
|
|
12507
|
-
$[
|
|
12508
|
-
$[
|
|
12509
|
-
$[
|
|
12510
|
-
$[
|
|
12511
|
-
$[
|
|
12512
|
-
$[
|
|
12513
|
-
$[
|
|
12514
|
-
$[
|
|
12515
|
-
$[
|
|
12516
|
-
$[
|
|
12517
|
-
} else {
|
|
12518
|
-
t77 = $[
|
|
12502
|
+
$[228] = disableClearable;
|
|
12503
|
+
$[229] = disablePortal;
|
|
12504
|
+
$[230] = disabled;
|
|
12505
|
+
$[231] = getLimitTagsText;
|
|
12506
|
+
$[232] = handleGetOptionDisabled;
|
|
12507
|
+
$[233] = limitTags;
|
|
12508
|
+
$[234] = loadingText;
|
|
12509
|
+
$[235] = multiple;
|
|
12510
|
+
$[236] = noOptionsText;
|
|
12511
|
+
$[237] = openOnFocus;
|
|
12512
|
+
$[238] = readOnly;
|
|
12513
|
+
$[239] = style;
|
|
12514
|
+
$[240] = sx;
|
|
12515
|
+
$[241] = t67;
|
|
12516
|
+
$[242] = t68;
|
|
12517
|
+
$[243] = t69;
|
|
12518
|
+
$[244] = t70;
|
|
12519
|
+
$[245] = t71;
|
|
12520
|
+
$[246] = t72;
|
|
12521
|
+
$[247] = t73;
|
|
12522
|
+
$[248] = t75;
|
|
12523
|
+
$[249] = t76;
|
|
12524
|
+
$[250] = t77;
|
|
12525
|
+
} else {
|
|
12526
|
+
t77 = $[250];
|
|
12519
12527
|
}
|
|
12520
12528
|
return t77;
|
|
12521
12529
|
}
|
package/dist/index.js
CHANGED
|
@@ -11174,7 +11174,7 @@ _PFormTextEditor.apiKey = '';
|
|
|
11174
11174
|
function _temp$m() {
|
|
11175
11175
|
return "PFormTextEditor";
|
|
11176
11176
|
}function PFormAutocomplete(t0) {
|
|
11177
|
-
var $ = compilerRuntime.c(
|
|
11177
|
+
var $ = compilerRuntime.c(251);
|
|
11178
11178
|
var ref = t0.ref,
|
|
11179
11179
|
initVariant = t0.variant,
|
|
11180
11180
|
initSize = t0.size,
|
|
@@ -11214,6 +11214,7 @@ function _temp$m() {
|
|
|
11214
11214
|
onAsyncLoadValueItem = t0.onAsyncLoadValueItem,
|
|
11215
11215
|
onRenderItem = t0.onRenderItem,
|
|
11216
11216
|
onRenderTag = t0.onRenderTag,
|
|
11217
|
+
onRednerValue = t0.onRednerValue,
|
|
11217
11218
|
onAddItem = t0.onAddItem,
|
|
11218
11219
|
getOptionDisabled = t0.getOptionDisabled,
|
|
11219
11220
|
onChange = t0.onChange,
|
|
@@ -12349,7 +12350,7 @@ function _temp$m() {
|
|
|
12349
12350
|
t74 = $[200];
|
|
12350
12351
|
}
|
|
12351
12352
|
var t75;
|
|
12352
|
-
if ($[201] !== multiple || $[202] !==
|
|
12353
|
+
if ($[201] !== multiple || $[202] !== onRednerValue || $[203] !== onRenderTag || $[204] !== size || $[205] !== variant) {
|
|
12353
12354
|
t75 = multiple ? function (value_5, getItemProps) {
|
|
12354
12355
|
if (Array.isArray(value_5)) {
|
|
12355
12356
|
return value_5.map(function (option_2, index) {
|
|
@@ -12377,17 +12378,24 @@ function _temp$m() {
|
|
|
12377
12378
|
index: 0
|
|
12378
12379
|
})));
|
|
12379
12380
|
}
|
|
12381
|
+
} : onRednerValue ? function (value_6, getItemProps_0) {
|
|
12382
|
+
return Array.isArray(value_6) ? null : /*#__PURE__*/React.createElement(material.Box, _extends({
|
|
12383
|
+
lineHeight: 0
|
|
12384
|
+
}, getItemProps_0({
|
|
12385
|
+
index: 0
|
|
12386
|
+
})), onRednerValue(value_6));
|
|
12380
12387
|
} : undefined;
|
|
12381
12388
|
$[201] = multiple;
|
|
12382
|
-
$[202] =
|
|
12383
|
-
$[203] =
|
|
12384
|
-
$[204] =
|
|
12385
|
-
$[205] =
|
|
12389
|
+
$[202] = onRednerValue;
|
|
12390
|
+
$[203] = onRenderTag;
|
|
12391
|
+
$[204] = size;
|
|
12392
|
+
$[205] = variant;
|
|
12393
|
+
$[206] = t75;
|
|
12386
12394
|
} else {
|
|
12387
|
-
t75 = $[
|
|
12395
|
+
t75 = $[206];
|
|
12388
12396
|
}
|
|
12389
12397
|
var t76;
|
|
12390
|
-
if ($[
|
|
12398
|
+
if ($[207] !== autoFocus || $[208] !== color || $[209] !== disabled || $[210] !== error || $[211] !== errorHelperText || $[212] !== focused || $[213] !== helperText || $[214] !== isOnGetItemLoading || $[215] !== label || $[216] !== labelIcon || $[217] !== labelShrink || $[218] !== loading || $[219] !== name || $[220] !== onBlurRef || $[221] !== onFocusRef || $[222] !== placeholder || $[223] !== readOnly || $[224] !== required || $[225] !== size || $[226] !== variant) {
|
|
12391
12399
|
t76 = function t76(params) {
|
|
12392
12400
|
var _params$inputProps;
|
|
12393
12401
|
var slotProps = {
|
|
@@ -12439,32 +12447,32 @@ function _temp$m() {
|
|
|
12439
12447
|
noFormValueItem: true
|
|
12440
12448
|
}));
|
|
12441
12449
|
};
|
|
12442
|
-
$[
|
|
12443
|
-
$[
|
|
12444
|
-
$[
|
|
12445
|
-
$[
|
|
12446
|
-
$[
|
|
12447
|
-
$[
|
|
12448
|
-
$[
|
|
12449
|
-
$[
|
|
12450
|
-
$[
|
|
12451
|
-
$[
|
|
12452
|
-
$[
|
|
12453
|
-
$[
|
|
12454
|
-
$[
|
|
12455
|
-
$[
|
|
12456
|
-
$[
|
|
12457
|
-
$[
|
|
12458
|
-
$[
|
|
12459
|
-
$[
|
|
12460
|
-
$[
|
|
12461
|
-
$[
|
|
12462
|
-
$[
|
|
12463
|
-
} else {
|
|
12464
|
-
t76 = $[
|
|
12450
|
+
$[207] = autoFocus;
|
|
12451
|
+
$[208] = color;
|
|
12452
|
+
$[209] = disabled;
|
|
12453
|
+
$[210] = error;
|
|
12454
|
+
$[211] = errorHelperText;
|
|
12455
|
+
$[212] = focused;
|
|
12456
|
+
$[213] = helperText;
|
|
12457
|
+
$[214] = isOnGetItemLoading;
|
|
12458
|
+
$[215] = label;
|
|
12459
|
+
$[216] = labelIcon;
|
|
12460
|
+
$[217] = labelShrink;
|
|
12461
|
+
$[218] = loading;
|
|
12462
|
+
$[219] = name;
|
|
12463
|
+
$[220] = onBlurRef;
|
|
12464
|
+
$[221] = onFocusRef;
|
|
12465
|
+
$[222] = placeholder;
|
|
12466
|
+
$[223] = readOnly;
|
|
12467
|
+
$[224] = required;
|
|
12468
|
+
$[225] = size;
|
|
12469
|
+
$[226] = variant;
|
|
12470
|
+
$[227] = t76;
|
|
12471
|
+
} else {
|
|
12472
|
+
t76 = $[227];
|
|
12465
12473
|
}
|
|
12466
12474
|
var t77;
|
|
12467
|
-
if ($[
|
|
12475
|
+
if ($[228] !== disableClearable || $[229] !== disablePortal || $[230] !== disabled || $[231] !== getLimitTagsText || $[232] !== handleGetOptionDisabled || $[233] !== limitTags || $[234] !== loadingText || $[235] !== multiple || $[236] !== noOptionsText || $[237] !== openOnFocus || $[238] !== readOnly || $[239] !== style || $[240] !== sx || $[241] !== t67 || $[242] !== t68 || $[243] !== t69 || $[244] !== t70 || $[245] !== t71 || $[246] !== t72 || $[247] !== t73 || $[248] !== t75 || $[249] !== t76) {
|
|
12468
12476
|
t77 = /*#__PURE__*/React.createElement(material.Autocomplete, {
|
|
12469
12477
|
options: t67,
|
|
12470
12478
|
className: t68,
|
|
@@ -12491,31 +12499,31 @@ function _temp$m() {
|
|
|
12491
12499
|
renderValue: t75,
|
|
12492
12500
|
renderInput: t76
|
|
12493
12501
|
});
|
|
12494
|
-
$[
|
|
12495
|
-
$[
|
|
12496
|
-
$[
|
|
12497
|
-
$[
|
|
12498
|
-
$[
|
|
12499
|
-
$[
|
|
12500
|
-
$[
|
|
12501
|
-
$[
|
|
12502
|
-
$[
|
|
12503
|
-
$[
|
|
12504
|
-
$[
|
|
12505
|
-
$[
|
|
12506
|
-
$[
|
|
12507
|
-
$[
|
|
12508
|
-
$[
|
|
12509
|
-
$[
|
|
12510
|
-
$[
|
|
12511
|
-
$[
|
|
12512
|
-
$[
|
|
12513
|
-
$[
|
|
12514
|
-
$[
|
|
12515
|
-
$[
|
|
12516
|
-
$[
|
|
12517
|
-
} else {
|
|
12518
|
-
t77 = $[
|
|
12502
|
+
$[228] = disableClearable;
|
|
12503
|
+
$[229] = disablePortal;
|
|
12504
|
+
$[230] = disabled;
|
|
12505
|
+
$[231] = getLimitTagsText;
|
|
12506
|
+
$[232] = handleGetOptionDisabled;
|
|
12507
|
+
$[233] = limitTags;
|
|
12508
|
+
$[234] = loadingText;
|
|
12509
|
+
$[235] = multiple;
|
|
12510
|
+
$[236] = noOptionsText;
|
|
12511
|
+
$[237] = openOnFocus;
|
|
12512
|
+
$[238] = readOnly;
|
|
12513
|
+
$[239] = style;
|
|
12514
|
+
$[240] = sx;
|
|
12515
|
+
$[241] = t67;
|
|
12516
|
+
$[242] = t68;
|
|
12517
|
+
$[243] = t69;
|
|
12518
|
+
$[244] = t70;
|
|
12519
|
+
$[245] = t71;
|
|
12520
|
+
$[246] = t72;
|
|
12521
|
+
$[247] = t73;
|
|
12522
|
+
$[248] = t75;
|
|
12523
|
+
$[249] = t76;
|
|
12524
|
+
$[250] = t77;
|
|
12525
|
+
} else {
|
|
12526
|
+
t77 = $[250];
|
|
12519
12527
|
}
|
|
12520
12528
|
return t77;
|
|
12521
12529
|
}
|
package/package.json
CHANGED