unifyedx-storybook-new 0.1.81 → 0.1.82
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.
|
@@ -77186,6 +77186,47 @@ const FullConfigPage = ({
|
|
|
77186
77186
|
overview = {},
|
|
77187
77187
|
configuration = []
|
|
77188
77188
|
} = config;
|
|
77189
|
+
const processedConfiguration = configuration.map((section) => {
|
|
77190
|
+
if (section.type === "section" && section.fields) {
|
|
77191
|
+
const processedFields = [...section.fields];
|
|
77192
|
+
const appkeyFieldIndex = processedFields.findIndex((field) => field.key === "appkey");
|
|
77193
|
+
if (appkeyFieldIndex !== -1) {
|
|
77194
|
+
const appkeyField = processedFields[appkeyFieldIndex];
|
|
77195
|
+
processedFields[appkeyFieldIndex] = {
|
|
77196
|
+
...appkeyField,
|
|
77197
|
+
default: appid,
|
|
77198
|
+
value: appid,
|
|
77199
|
+
disabled: true,
|
|
77200
|
+
placeholder: appid
|
|
77201
|
+
};
|
|
77202
|
+
const displaynameFieldExists = processedFields.some((field) => field.key === "displayname");
|
|
77203
|
+
if (!displaynameFieldExists) {
|
|
77204
|
+
const displaynameField = {
|
|
77205
|
+
key: "displayname",
|
|
77206
|
+
label: "Display Name",
|
|
77207
|
+
fieldtype: "text",
|
|
77208
|
+
default: appid,
|
|
77209
|
+
value: appid,
|
|
77210
|
+
placeholder: "Enter display name",
|
|
77211
|
+
required: false
|
|
77212
|
+
};
|
|
77213
|
+
processedFields.splice(appkeyFieldIndex + 1, 0, displaynameField);
|
|
77214
|
+
} else {
|
|
77215
|
+
const displaynameFieldIndex = processedFields.findIndex((field) => field.key === "displayname");
|
|
77216
|
+
processedFields[displaynameFieldIndex] = {
|
|
77217
|
+
...processedFields[displaynameFieldIndex],
|
|
77218
|
+
default: appid,
|
|
77219
|
+
value: appid
|
|
77220
|
+
};
|
|
77221
|
+
}
|
|
77222
|
+
}
|
|
77223
|
+
return {
|
|
77224
|
+
...section,
|
|
77225
|
+
fields: processedFields
|
|
77226
|
+
};
|
|
77227
|
+
}
|
|
77228
|
+
return section;
|
|
77229
|
+
});
|
|
77189
77230
|
const defaultPageHeader = {
|
|
77190
77231
|
heading: "App Details",
|
|
77191
77232
|
subHeading: "View app details and customize configurations to align with institutional requirements.",
|
|
@@ -77210,8 +77251,19 @@ const FullConfigPage = ({
|
|
|
77210
77251
|
console.log("User cancelled the cancel action - modal closed, data preserved");
|
|
77211
77252
|
}
|
|
77212
77253
|
}, []);
|
|
77254
|
+
const getDisplayName = () => {
|
|
77255
|
+
for (const section of processedConfiguration) {
|
|
77256
|
+
if (section.type === "section" && section.fields) {
|
|
77257
|
+
const displaynameField = section.fields.find((field) => field.key === "displayname");
|
|
77258
|
+
if (displaynameField) {
|
|
77259
|
+
return displaynameField.default || displaynameField.value || appid;
|
|
77260
|
+
}
|
|
77261
|
+
}
|
|
77262
|
+
}
|
|
77263
|
+
return appid;
|
|
77264
|
+
};
|
|
77213
77265
|
const defaultAppletHeader = {
|
|
77214
|
-
heading:
|
|
77266
|
+
heading: getDisplayName(),
|
|
77215
77267
|
subHeading: "Application configuration and details",
|
|
77216
77268
|
tags: [],
|
|
77217
77269
|
...appletHeader
|
|
@@ -77237,7 +77289,7 @@ const FullConfigPage = ({
|
|
|
77237
77289
|
};
|
|
77238
77290
|
const tabs = [
|
|
77239
77291
|
{ label: "Overview", content: renderOverview(defaultOverview) },
|
|
77240
|
-
{ label: "Configuration", content: /* @__PURE__ */ jsx(DynamicConfig, { appid, configdata: { configuration }, disableApi, onCancel: handleCancelRequest }) }
|
|
77292
|
+
{ label: "Configuration", content: /* @__PURE__ */ jsx(DynamicConfig, { appid, configdata: { configuration: processedConfiguration }, disableApi, onCancel: handleCancelRequest }) }
|
|
77241
77293
|
];
|
|
77242
77294
|
function renderIcon(icon) {
|
|
77243
77295
|
if (!icon) {
|