@docsvision/management-console 6.2.0-beta.24 → 6.2.0-beta.25
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/index.d.ts +1 -1
- package/index.js +29 -23
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1269,7 +1269,7 @@ export declare interface IDropdownOptionProps extends Omit<MenuItemProps, "butto
|
|
|
1269
1269
|
|
|
1270
1270
|
export declare interface IDropdownWithEllipsisProps {
|
|
1271
1271
|
options: IPageElementOption_2[];
|
|
1272
|
-
value
|
|
1272
|
+
value?: string | number;
|
|
1273
1273
|
label: string;
|
|
1274
1274
|
handleChange: (value: string) => void;
|
|
1275
1275
|
field: ControllerRenderProps<FieldValues, string>;
|
package/index.js
CHANGED
|
@@ -59285,10 +59285,10 @@ function DropdownWithEllipsis(props) {
|
|
|
59285
59285
|
select: true,
|
|
59286
59286
|
"data-testid": dataTestId,
|
|
59287
59287
|
...field,
|
|
59288
|
-
value,
|
|
59288
|
+
value: value?.toString() ?? "",
|
|
59289
59289
|
inputRef: field.ref,
|
|
59290
59290
|
ref: anchorRef,
|
|
59291
|
-
onChange: (event) => handleChange(event.target.value),
|
|
59291
|
+
onChange: (event) => handleChange(String(event.target.value)),
|
|
59292
59292
|
className,
|
|
59293
59293
|
variant: "outlined",
|
|
59294
59294
|
size: "small",
|
|
@@ -59298,15 +59298,18 @@ function DropdownWithEllipsis(props) {
|
|
|
59298
59298
|
label: shouldShowFloatingLabel ? label : void 0,
|
|
59299
59299
|
InputLabelProps: shouldShowFloatingLabel ? { shrink: true } : void 0,
|
|
59300
59300
|
children: [
|
|
59301
|
-
options?.map((option) =>
|
|
59302
|
-
|
|
59303
|
-
|
|
59304
|
-
|
|
59305
|
-
|
|
59306
|
-
|
|
59307
|
-
|
|
59308
|
-
|
|
59309
|
-
|
|
59301
|
+
options?.map((option) => {
|
|
59302
|
+
const optionValue = option.value?.toString() ?? "";
|
|
59303
|
+
return /* @__PURE__ */ jsx(
|
|
59304
|
+
DropdownOption2,
|
|
59305
|
+
{
|
|
59306
|
+
"data-testid": `${dataTestId}-option-${optionValue}`,
|
|
59307
|
+
value: optionValue,
|
|
59308
|
+
displayName: option.displayName
|
|
59309
|
+
},
|
|
59310
|
+
`${field.name}_${optionValue}`
|
|
59311
|
+
);
|
|
59312
|
+
}),
|
|
59310
59313
|
options.length === 0 && noOptionsText && /* @__PURE__ */ jsx(NoOptionMenuItem, { text: noOptionsText })
|
|
59311
59314
|
]
|
|
59312
59315
|
}
|
|
@@ -61099,6 +61102,10 @@ function ListPanel(props) {
|
|
|
61099
61102
|
const changeItem = async (index2, value2) => {
|
|
61100
61103
|
setItems(items.map((item, i2) => i2 === index2 ? value2 : item));
|
|
61101
61104
|
};
|
|
61105
|
+
const handleInputEnter = (e2) => {
|
|
61106
|
+
if (e2.key !== "Enter") return;
|
|
61107
|
+
addItem();
|
|
61108
|
+
};
|
|
61102
61109
|
return /* @__PURE__ */ jsxs(List$4, { component: Paper$3, className, children: [
|
|
61103
61110
|
items && items.map((item, index2) => /* @__PURE__ */ jsx(
|
|
61104
61111
|
ListItem,
|
|
@@ -61119,6 +61126,7 @@ function ListPanel(props) {
|
|
|
61119
61126
|
value,
|
|
61120
61127
|
onChange: (e2) => setValue(e2.target.value),
|
|
61121
61128
|
fullWidth: true,
|
|
61129
|
+
onKeyPress: handleInputEnter,
|
|
61122
61130
|
slotProps: { htmlInput: { "data-testid": "add-item-input" } }
|
|
61123
61131
|
}
|
|
61124
61132
|
),
|
|
@@ -63643,7 +63651,7 @@ class LoginLogic extends ComponentLogic {
|
|
|
63643
63651
|
} else {
|
|
63644
63652
|
const data = await response.json();
|
|
63645
63653
|
if (data && data.message) {
|
|
63646
|
-
this.
|
|
63654
|
+
this.setError(data.message);
|
|
63647
63655
|
}
|
|
63648
63656
|
}
|
|
63649
63657
|
}
|
|
@@ -63664,7 +63672,7 @@ class LoginLogic extends ComponentLogic {
|
|
|
63664
63672
|
} else {
|
|
63665
63673
|
const data = await response.json();
|
|
63666
63674
|
if (data && data.message) {
|
|
63667
|
-
this.
|
|
63675
|
+
this.setError(data.message);
|
|
63668
63676
|
}
|
|
63669
63677
|
}
|
|
63670
63678
|
} finally {
|
|
@@ -63689,16 +63697,14 @@ class LoginLogic extends ComponentLogic {
|
|
|
63689
63697
|
fn: ({ userName, password }, event) => ({ userName, password, event }),
|
|
63690
63698
|
target: this.login
|
|
63691
63699
|
});
|
|
63692
|
-
const queryParams = parseQueryString(location.search.substring(1));
|
|
63693
|
-
const errorMessage = queryParams["message"]?.replaceAll("+", " ") || "";
|
|
63694
|
-
this.setError(errorMessage);
|
|
63695
|
-
}
|
|
63696
|
-
setErrorAndUrlMessage(message) {
|
|
63697
|
-
this.setError(message);
|
|
63698
63700
|
const url = new URL(location.href);
|
|
63699
|
-
const
|
|
63700
|
-
url.searchParams.
|
|
63701
|
-
|
|
63701
|
+
const hasMessageQueryParam = url.searchParams.has("message");
|
|
63702
|
+
const errorMessage = (url.searchParams.get("message") || "").replaceAll("+", " ");
|
|
63703
|
+
if (hasMessageQueryParam) {
|
|
63704
|
+
url.searchParams.delete("message");
|
|
63705
|
+
history.replaceState({}, "", url.toString());
|
|
63706
|
+
}
|
|
63707
|
+
this.setError(errorMessage);
|
|
63702
63708
|
}
|
|
63703
63709
|
}
|
|
63704
63710
|
function LoginPage(props) {
|
|
@@ -109942,7 +109948,7 @@ function Dropdown(props) {
|
|
|
109942
109948
|
const { required, id: fieldName, value, options, label } = props;
|
|
109943
109949
|
const services = React__default.useContext(ServicesContext);
|
|
109944
109950
|
const { resetField, control } = useCustomFormContext();
|
|
109945
|
-
const defaultValue = value
|
|
109951
|
+
const defaultValue = value !== void 0 && value !== null ? value.toString() : "";
|
|
109946
109952
|
const {
|
|
109947
109953
|
field,
|
|
109948
109954
|
fieldState: { isDirty, error }
|