Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/libs/workspace/context/workspace-context.interface.ts

18 lines
691 B
TypeScript
Raw Normal View History

Feature: Languages repository (#527) * wip migrate languages to repositories * load language and subscribe to draft data * add methods to update data * rename file + use methods on context * add crud methods to repo * use new workspace action * clean up * register delete language entity action + language repository * add dropdown element to supply styles to the uui popover element * import dropdown element * use requestItems in delete action instead of treeItems * add method to language repo to request items * add todo * render entity actions in language table * clean up table header * add await to save action * remove detail from method names * let save action save or create * remove save and delete from template workspace * add isNew to workspace interface * add isNew to template workspace * clean up * fix type errors * add isNew to workspaces * add isNew * remove todo * remove space * abstract culture selection into its own component * add correct event types * don't show undefined in input * fix wrong repository alias * fix import order * wip language picker * add language picker modal layout * handle fallback language change event * set value for fallback language on language picker input * remove unused * add app language select * don't set width on dropdown * make scroll container full height * adjust padding and add border * temp move sidebar headings + set fixed height on language toggle * set fixed body header height * only show scroll bars if sidebar content is scrollable * align height * create full scaffold * align handlers with end points * align server data source with end points * add todo * remove culture warning * set the culture to readonly on saved languages * prevent having no default language + show message if changing the default language * clean up + add caret * add hover state * set active state on active language * make workspace isNew an observable * update workspace contexts * fix typescript errors
2023-02-23 09:01:04 +01:00
import { Observable } from 'rxjs';
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
2023-01-27 10:06:10 +01:00
2023-03-29 22:06:08 +02:00
export interface UmbWorkspaceContextInterface<DataType = unknown> {
host: UmbControllerHostElement;
2023-02-27 15:04:12 +01:00
repository: any; // TODO: add type
isNew: Observable<boolean | undefined>;
getIsNew(): boolean | undefined;
Feature: Languages repository (#527) * wip migrate languages to repositories * load language and subscribe to draft data * add methods to update data * rename file + use methods on context * add crud methods to repo * use new workspace action * clean up * register delete language entity action + language repository * add dropdown element to supply styles to the uui popover element * import dropdown element * use requestItems in delete action instead of treeItems * add method to language repo to request items * add todo * render entity actions in language table * clean up table header * add await to save action * remove detail from method names * let save action save or create * remove save and delete from template workspace * add isNew to workspace interface * add isNew to template workspace * clean up * fix type errors * add isNew to workspaces * add isNew * remove todo * remove space * abstract culture selection into its own component * add correct event types * don't show undefined in input * fix wrong repository alias * fix import order * wip language picker * add language picker modal layout * handle fallback language change event * set value for fallback language on language picker input * remove unused * add app language select * don't set width on dropdown * make scroll container full height * adjust padding and add border * temp move sidebar headings + set fixed height on language toggle * set fixed body header height * only show scroll bars if sidebar content is scrollable * align height * create full scaffold * align handlers with end points * align server data source with end points * add todo * remove culture warning * set the culture to readonly on saved languages * prevent having no default language + show message if changing the default language * clean up + add caret * add hover state * set active state on active language * make workspace isNew an observable * update workspace contexts * fix typescript errors
2023-02-23 09:01:04 +01:00
setIsNew(value: boolean): void;
2023-03-24 13:14:22 +01:00
// TODO: should we consider another name than entity type. File system files are not entities but still have this type.
2023-02-03 11:03:13 +01:00
getEntityType(): string;
2023-03-29 22:06:08 +02:00
getData(): DataType | undefined;
save(): Promise<void>;
2023-01-27 10:06:10 +01:00
destroy(): void;
Feature: Languages repository (#527) * wip migrate languages to repositories * load language and subscribe to draft data * add methods to update data * rename file + use methods on context * add crud methods to repo * use new workspace action * clean up * register delete language entity action + language repository * add dropdown element to supply styles to the uui popover element * import dropdown element * use requestItems in delete action instead of treeItems * add method to language repo to request items * add todo * render entity actions in language table * clean up table header * add await to save action * remove detail from method names * let save action save or create * remove save and delete from template workspace * add isNew to workspace interface * add isNew to template workspace * clean up * fix type errors * add isNew to workspaces * add isNew * remove todo * remove space * abstract culture selection into its own component * add correct event types * don't show undefined in input * fix wrong repository alias * fix import order * wip language picker * add language picker modal layout * handle fallback language change event * set value for fallback language on language picker input * remove unused * add app language select * don't set width on dropdown * make scroll container full height * adjust padding and add border * temp move sidebar headings + set fixed height on language toggle * set fixed body header height * only show scroll bars if sidebar content is scrollable * align height * create full scaffold * align handlers with end points * align server data source with end points * add todo * remove culture warning * set the culture to readonly on saved languages * prevent having no default language + show message if changing the default language * clean up + add caret * add hover state * set active state on active language * make workspace isNew an observable * update workspace contexts * fix typescript errors
2023-02-23 09:01:04 +01:00
// TODO: temp solution to bubble validation errors to the UI
setValidationErrors?(errorMap: any): void;
2023-01-27 10:06:10 +01:00
}