unifyedx-storybook-new 0.1.55 → 0.1.57
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.
|
@@ -45190,12 +45190,8 @@ li.e-separator.e-menu-item.e-excel-separator {
|
|
|
45190
45190
|
}
|
|
45191
45191
|
|
|
45192
45192
|
.native-radiogroup-container {
|
|
45193
|
-
|
|
45194
|
-
border: 1px solid #e5e7eb;
|
|
45195
|
-
border-radius: .5rem;
|
|
45196
|
-
flex-direction: column;
|
|
45193
|
+
flex-direction: row;
|
|
45197
45194
|
gap: 1rem;
|
|
45198
|
-
padding: 1rem;
|
|
45199
45195
|
display: flex;
|
|
45200
45196
|
}
|
|
45201
45197
|
|
|
@@ -49435,12 +49431,8 @@ body.toast-backdrop #ui-toast-backdrop {
|
|
|
49435
49431
|
/* --- ✅ NEW: Native Radio Group Story Styles --- */
|
|
49436
49432
|
.native-radiogroup-container {
|
|
49437
49433
|
display: flex;
|
|
49438
|
-
flex-direction:
|
|
49434
|
+
flex-direction: row;
|
|
49439
49435
|
gap: 1rem;
|
|
49440
|
-
padding: 1rem;
|
|
49441
|
-
border: 1px solid #e5e7eb; /* gray-200 */
|
|
49442
|
-
border-radius: 0.5rem;
|
|
49443
|
-
background-color: #f9fafb; /* gray-50 */
|
|
49444
49436
|
}
|
|
49445
49437
|
|
|
49446
49438
|
.native-radio-option {
|
|
@@ -40985,7 +40985,12 @@ const Select = ({
|
|
|
40985
40985
|
const filteredOptions = query === "" ? options : options.filter(
|
|
40986
40986
|
(option) => option.label.toLowerCase().includes(query.toLowerCase())
|
|
40987
40987
|
);
|
|
40988
|
-
const selectedOption = options.find((option) =>
|
|
40988
|
+
const selectedOption = options.find((option) => {
|
|
40989
|
+
if (value?.id) {
|
|
40990
|
+
return option.id === value.id;
|
|
40991
|
+
}
|
|
40992
|
+
return option.id === value || option.value === value;
|
|
40993
|
+
});
|
|
40989
40994
|
return /* @__PURE__ */ jsx(Listbox, { value, onChange, disabled, children: /* @__PURE__ */ jsxs("div", { className: "select-wrapper", ref, children: [
|
|
40990
40995
|
label && /* @__PURE__ */ jsx("label", { className: "select-label", children: label }),
|
|
40991
40996
|
/* @__PURE__ */ jsxs("div", { className: "select-button-container", children: [
|
|
@@ -41041,7 +41046,7 @@ const Select = ({
|
|
|
41041
41046
|
) : null
|
|
41042
41047
|
] })
|
|
41043
41048
|
},
|
|
41044
|
-
option.id
|
|
41049
|
+
option.id || option.value || option.label
|
|
41045
41050
|
)) })
|
|
41046
41051
|
] })
|
|
41047
41052
|
}
|
|
@@ -75235,6 +75240,16 @@ function TreeView({
|
|
|
75235
75240
|
] });
|
|
75236
75241
|
}
|
|
75237
75242
|
|
|
75243
|
+
const getOptionsFromConfig = (optionsFrom, configData) => {
|
|
75244
|
+
if (!optionsFrom || !configData) return [];
|
|
75245
|
+
const { config, valueField, labelField } = optionsFrom;
|
|
75246
|
+
const configSection = configData[config];
|
|
75247
|
+
if (!configSection || !Array.isArray(configSection)) return [];
|
|
75248
|
+
return configSection.map((item) => ({
|
|
75249
|
+
value: item[valueField],
|
|
75250
|
+
label: item[labelField]
|
|
75251
|
+
}));
|
|
75252
|
+
};
|
|
75238
75253
|
function SectionRenderer({ item, data: initialData, updateHandler, validationErrors = {} }) {
|
|
75239
75254
|
console.log(item);
|
|
75240
75255
|
const [section, setSection] = React__default.useState(item);
|
|
@@ -75414,7 +75429,7 @@ function SectionRenderer({ item, data: initialData, updateHandler, validationErr
|
|
|
75414
75429
|
const newData = { ...data, [field.key]: value };
|
|
75415
75430
|
setData(newData);
|
|
75416
75431
|
},
|
|
75417
|
-
options: field.options || [],
|
|
75432
|
+
options: field.optionsFrom ? getOptionsFromConfig(field.optionsFrom, initialData) : field.options || [],
|
|
75418
75433
|
placeholder: field.placeholder || `Select ${field.label}`,
|
|
75419
75434
|
required: field.required,
|
|
75420
75435
|
disabled: field.disabled ? field.disabled : false,
|
|
@@ -76556,35 +76571,29 @@ const ManageCollectionList = ({
|
|
|
76556
76571
|
(item) => item.categoryName?.toLowerCase().includes(searchValue.toLowerCase())
|
|
76557
76572
|
) : [];
|
|
76558
76573
|
return /* @__PURE__ */ jsxs("div", { className: `manage-collection-list ${className}`, children: [
|
|
76559
|
-
/* @__PURE__ */ jsxs("div", { className: "flex", children: [
|
|
76560
|
-
/* @__PURE__ */
|
|
76561
|
-
|
|
76562
|
-
|
|
76563
|
-
|
|
76564
|
-
|
|
76565
|
-
|
|
76566
|
-
|
|
76567
|
-
|
|
76568
|
-
|
|
76569
|
-
|
|
76570
|
-
|
|
76571
|
-
|
|
76572
|
-
|
|
76573
|
-
|
|
76574
|
-
|
|
76575
|
-
"
|
|
76576
|
-
|
|
76577
|
-
|
|
76578
|
-
|
|
76579
|
-
|
|
76580
|
-
|
|
76581
|
-
|
|
76582
|
-
disabled: editingId !== null,
|
|
76583
|
-
children: "Add a Collection"
|
|
76584
|
-
}
|
|
76585
|
-
)
|
|
76586
|
-
] })
|
|
76587
|
-
] }),
|
|
76574
|
+
/* @__PURE__ */ jsx("div", { className: "flex", children: /* @__PURE__ */ jsxs("div", { className: "w-1/2 flex justify-end", children: [
|
|
76575
|
+
showSearch && /* @__PURE__ */ jsx(
|
|
76576
|
+
SearchBar,
|
|
76577
|
+
{
|
|
76578
|
+
value: searchValue,
|
|
76579
|
+
onDebouncedChange: setSearchValue,
|
|
76580
|
+
placeholder: "Search Collection",
|
|
76581
|
+
customClass: "mr-4"
|
|
76582
|
+
}
|
|
76583
|
+
),
|
|
76584
|
+
allowAdd && /* @__PURE__ */ jsx(
|
|
76585
|
+
"button",
|
|
76586
|
+
{
|
|
76587
|
+
className: [
|
|
76588
|
+
"px-4 py-3 bg-black text-white rounded-2xl ml-4",
|
|
76589
|
+
editingId !== null ? "opacity-60 cursor-not-allowed" : "cursor-pointer"
|
|
76590
|
+
].join(" "),
|
|
76591
|
+
onClick: startAdd,
|
|
76592
|
+
disabled: editingId !== null,
|
|
76593
|
+
children: "Add a Collection"
|
|
76594
|
+
}
|
|
76595
|
+
)
|
|
76596
|
+
] }) }),
|
|
76588
76597
|
/* @__PURE__ */ jsx("div", { className: "mt-5 flex flex-col", children: filteredData.map((item) => {
|
|
76589
76598
|
const isEditing = editingId === item.id;
|
|
76590
76599
|
const linkCount = item?.links?.length ?? 0;
|
|
@@ -76691,7 +76700,7 @@ const ManageCollectionList = ({
|
|
|
76691
76700
|
const ManageCollectionListRenderer = ({ item, data, updateHandler }) => {
|
|
76692
76701
|
const {
|
|
76693
76702
|
label = "Manage Collections",
|
|
76694
|
-
description = "
|
|
76703
|
+
description = "",
|
|
76695
76704
|
endpoints = {},
|
|
76696
76705
|
initialData = null,
|
|
76697
76706
|
showSearch = true,
|