ui(components): New Dialog and Modal components for ui-next (#4772)
Co-authored-by: sedghi <ar.sedghi@gmail.com>
This commit is contained in:
1 parent
62b4fa3e89
commit
a3b51aa8db
90 files changed
+3459
-1357
No files matched your search
@@ -382,6 +382,10 @@ export default class ExtensionManager extends PubSubService {
|
||||
return this.dataSourceMap[dataSourceName];
|
||||
};
|
||||
|
||||
getDataSourceInstance = dataSourceName => {
|
||||
return this.dataSourceMap[dataSourceName][0];
|
||||
};
|
||||
|
||||
getActiveDataSource = () => {
|
||||
return this.dataSourceMap[this.activeDataSource];
|
||||
};
|
||||
@@ -409,6 +413,29 @@ export default class ExtensionManager extends PubSubService {
|
||||
return this.getDataSourceDefinition(this.activeDataSource);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets a formatted list of data sources suitable for UI display/selection.
|
||||
* Only returns data sources that support STOW or have a WADO root.
|
||||
* @returns Array of data source options with value, label, and placeholder
|
||||
*/
|
||||
getDataSourcesForUI = () => {
|
||||
// If multi-select export is not allowed, return empty list
|
||||
if (this._appConfig?.allowMultiSelectExport === false) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return Object.keys(this.dataSourceMap)
|
||||
.filter(ds => {
|
||||
const configuration = this.dataSourceDefs[ds]?.configuration;
|
||||
return configuration?.supportsStow ?? configuration?.wadoRoot;
|
||||
})
|
||||
.map(ds => ({
|
||||
value: ds,
|
||||
label: ds,
|
||||
placeHolder: ds,
|
||||
}));
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {string} moduleType
|
||||
|
||||
Reference in new issue
Block a user