oip-common 0.10.0 → 0.11.1

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 CHANGED
@@ -85,6 +85,8 @@ interface AppConfig {
85
85
  timeFormat: string;
86
86
  dateTimeFormat: string;
87
87
  timeZone: string;
88
+ /** First day of the week in date pickers: 0 - Sunday, 1 - Monday, ..., 6 - Saturday. */
89
+ firstDayOfWeek?: number;
88
90
  adminMode?: boolean;
89
91
  }
90
92
  interface LayoutState {
@@ -124,6 +126,7 @@ declare class LayoutService {
124
126
  dateTimeFormat: i0.Signal<string>;
125
127
  monthFormat: i0.Signal<string>;
126
128
  timeZone: i0.Signal<string>;
129
+ firstDayOfWeek: i0.Signal<number>;
127
130
  adminMode: i0.Signal<boolean>;
128
131
  transitionComplete: i0.WritableSignal<boolean>;
129
132
  /**
@@ -219,6 +222,10 @@ declare class L10nService {
219
222
  */
220
223
  use(selectedLanguage: string, key?: string): void;
221
224
  init(languages: LanguageDto[]): void;
225
+ /**
226
+ * Passes the PrimeNG dictionary of the current language to PrimeNG, keeping the user's first day of the week
227
+ */
228
+ private applyPrimeNgTranslation;
222
229
  instant(key: string | string[], interpolateParams?: InterpolationParameters): Translation | TranslationObject;
223
230
  static ɵfac: i0.ɵɵFactoryDeclaration<L10nService, never>;
224
231
  static ɵprov: i0.ɵɵInjectableDeclaration<L10nService>;
@@ -796,10 +803,6 @@ interface FolderModuleSettings {
796
803
  interface IframeModuleSettings {
797
804
  url?: string | null;
798
805
  }
799
- interface IntKeyValueDto {
800
- key?: number;
801
- value?: string | null;
802
- }
803
806
  interface ModuleInstanceDto {
804
807
  moduleInstanceId?: number;
805
808
  moduleId?: number;
@@ -815,6 +818,13 @@ interface ModuleInstanceDto {
815
818
  order?: number;
816
819
  separator?: boolean;
817
820
  isStart?: boolean;
821
+ isFolder?: boolean;
822
+ }
823
+ interface ModuleKeyValueDto {
824
+ key?: number;
825
+ value?: string | null;
826
+ icon?: string | null;
827
+ isFolder?: boolean;
818
828
  }
819
829
  interface GetAuthSessionsParams {
820
830
  userId?: string;
@@ -834,14 +844,21 @@ interface GetModuleInstanceRightsParams {
834
844
  interface DeleteModuleInstanceParams {
835
845
  id?: number;
836
846
  }
847
+ interface CopyModuleInstanceParams {
848
+ id: number;
849
+ }
837
850
  interface ChangeOrderParams {
838
851
  firstModuleId?: number;
839
852
  secondModuleId?: number;
840
853
  }
854
+ interface CreateAuthSessionParams {
855
+ returnUrl?: string;
856
+ }
841
857
 
842
858
  interface ContextMenuItemDto {
843
859
  moduleInstanceId: number;
844
860
  isStart?: boolean;
861
+ isFolder?: boolean;
845
862
  url: any;
846
863
  class: string | string[] | Set<string> | {
847
864
  [p: string]: any;
@@ -915,7 +932,7 @@ declare class MenuService {
915
932
  reset(): void;
916
933
  getMenu(): Promise<ModuleInstanceDto[]>;
917
934
  getAdminMenu(): Promise<ModuleInstanceDto[]>;
918
- getModules(): Promise<IntKeyValueDto[]>;
935
+ getModules(): Promise<ModuleKeyValueDto[]>;
919
936
  addModuleInstance(addModuleInstance: AddModuleInstanceDto): Promise<void>;
920
937
  deleteItem(moduleInstanceId: number): Promise<void>;
921
938
  editModuleInstance(item: EditModuleInstanceDto): Promise<void>;
@@ -929,10 +946,11 @@ declare class MenuApi<SecurityDataType = unknown> extends HttpClient<SecurityDat
929
946
  deleteStartModule: (params?: RequestParams) => Promise<void>;
930
947
  getModuleInstanceRights: (query: GetModuleInstanceRightsParams, params?: RequestParams) => Promise<string[]>;
931
948
  getAdminMenu: (params?: RequestParams) => Promise<ModuleInstanceDto[]>;
932
- getModules: (params?: RequestParams) => Promise<IntKeyValueDto[]>;
949
+ getModules: (params?: RequestParams) => Promise<ModuleKeyValueDto[]>;
933
950
  addModuleInstance: (data: AddModuleInstanceDto, params?: RequestParams) => Promise<void>;
934
951
  editModuleInstance: (data: EditModuleInstanceDto, params?: RequestParams) => Promise<void>;
935
952
  deleteModuleInstance: (query: DeleteModuleInstanceParams, params?: RequestParams) => Promise<void>;
953
+ copyModuleInstance: ({ id, ...query }: CopyModuleInstanceParams, params?: RequestParams) => Promise<number>;
936
954
  changeOrder: (query: ChangeOrderParams, params?: RequestParams) => Promise<void>;
937
955
  static ɵfac: i0.ɵɵFactoryDeclaration<MenuApi<any>, never>;
938
956
  static ɵprov: i0.ɵɵInjectableDeclaration<MenuApi<any>>;
@@ -943,12 +961,14 @@ type PrimeIconOption$1 = {
943
961
  value: string;
944
962
  };
945
963
  declare class MenuItemCreateDialogComponent implements OnInit {
964
+ private static readonly defaultIcon;
946
965
  protected readonly menuService: MenuService;
947
966
  protected readonly menu: MenuApi<any>;
948
967
  private readonly msgService;
949
968
  visible: boolean;
950
969
  visibleChange: EventEmitter<boolean>;
951
- modules: IntKeyValueDto[];
970
+ modules: ModuleKeyValueDto[];
971
+ moduleOptions: ModuleKeyValueDto[];
952
972
  iconOptions: PrimeIconOption$1[];
953
973
  selectModule: any;
954
974
  label: string;
@@ -956,6 +976,12 @@ declare class MenuItemCreateDialogComponent implements OnInit {
956
976
  saving: boolean;
957
977
  get canSave(): boolean;
958
978
  ngOnInit(): Promise<void>;
979
+ /**
980
+ * Restricts the module list to the folder when the item is created at the menu root,
981
+ * since only a folder can be placed there.
982
+ */
983
+ private updateModuleOptions;
984
+ onModuleChange(moduleId: number): void;
959
985
  changeVisible(): void;
960
986
  save(): Promise<void>;
961
987
  hide(): void;
@@ -1125,10 +1151,17 @@ declare class ConfigComponent {
1125
1151
  protected selectedDateFormat: string;
1126
1152
  protected selectedTimeFormat: string;
1127
1153
  protected selectedTimeZone: string;
1154
+ protected selectedFirstDayOfWeek: number;
1155
+ /** Days of the week starting from Monday, named in the current language. */
1156
+ protected readonly weekDays: i0.Signal<{
1157
+ value: number;
1158
+ label: string;
1159
+ }[]>;
1128
1160
  constructor();
1129
1161
  changeLanguage(): void;
1130
1162
  changeDateFormat(): void;
1131
1163
  changeTimeFormat(): void;
1164
+ changeFirstDayOfWeek(): void;
1132
1165
  changeTimeZone(): void;
1133
1166
  onSwitchChange(): Promise<void>;
1134
1167
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfigComponent, never>;
@@ -1597,6 +1630,10 @@ declare enum ImportanceLevel {
1597
1630
  High = "High",
1598
1631
  Critical = "Critical"
1599
1632
  }
1633
+ interface CreateTestNotificationRequest {
1634
+ subject?: string | null;
1635
+ message?: string | null;
1636
+ }
1600
1637
  interface UserNotificationCountResponse {
1601
1638
  count?: number;
1602
1639
  }
@@ -2027,7 +2064,7 @@ declare class IframeModuleApi<SecurityDataType = unknown> extends HttpClient<Sec
2027
2064
 
2028
2065
  declare class SecurityApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
2029
2066
  getCurrentAuthSession: (params?: RequestParams) => Promise<AuthSessionResponse>;
2030
- createAuthSession: (params?: RequestParams) => Promise<any>;
2067
+ createAuthSession: (query: CreateAuthSessionParams, params?: RequestParams) => Promise<any>;
2031
2068
  deleteAuthSession: (params?: RequestParams) => Promise<any>;
2032
2069
  getAuthCsrfToken: (params?: RequestParams) => Promise<AuthCsrfTokenResponse>;
2033
2070
  getRealmRoles: (params?: RequestParams) => Promise<string[]>;
@@ -2047,6 +2084,7 @@ declare class AuthSessionsApi<SecurityDataType = unknown> extends HttpClient<Sec
2047
2084
 
2048
2085
  declare class ApplicationsApi<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
2049
2086
  getApplicationRegistryItems: (params?: RequestParams) => Promise<ApplicationRegistryItemDto[]>;
2087
+ getAllApplicationRegistryItems: (params?: RequestParams) => Promise<ApplicationRegistryItemDto[]>;
2050
2088
  getApplicationRegistryItemByCode: ({ code, ...query }: GetApplicationRegistryItemByCodeParams, params?: RequestParams) => Promise<any>;
2051
2089
  createApplicationRegistryItem: (data: ApplicationRegistryItemDto, params?: RequestParams) => Promise<any>;
2052
2090
  updateApplicationRegistryItem: ({ code, ...query }: UpdateApplicationRegistryItemParams, data: ApplicationRegistryItemDto, params?: RequestParams) => Promise<any>;
@@ -2083,6 +2121,7 @@ declare class NotificationApi<SecurityDataType = unknown> extends HttpClient<Sec
2083
2121
  getNotificationCountByUser: (params?: RequestParams) => Promise<UserNotificationCountResponse>;
2084
2122
  markNotificationAsRead: ({ id, ...query }: MarkNotificationAsReadParams, params?: RequestParams) => Promise<void>;
2085
2123
  getNotificationById: (query: GetNotificationByIdParams, params?: RequestParams) => Promise<UserNotificationDto>;
2124
+ createTestNotification: (data: CreateTestNotificationRequest, params?: RequestParams) => Promise<UserNotificationDto>;
2086
2125
  static ɵfac: i0.ɵɵFactoryDeclaration<NotificationApi<any>, never>;
2087
2126
  static ɵprov: i0.ɵɵInjectableDeclaration<NotificationApi<any>>;
2088
2127
  }
@@ -2171,8 +2210,6 @@ declare function oipStartRoute(path?: string, data?: StartRouteData): Route;
2171
2210
  declare function oipAccessRoute(path?: string): Route;
2172
2211
  /** Authentication error page. */
2173
2212
  declare function oipErrorRoute(path?: string): Route;
2174
- /** Current user profile. */
2175
- declare function oipProfileRoute(path?: string): Route;
2176
2213
  /** Application configuration. */
2177
2214
  declare function oipConfigRoute(path?: string): Route;
2178
2215
  /** Registered applications, administrators only. */
@@ -2206,8 +2243,6 @@ interface OipRouteFeatures {
2206
2243
  access?: OipRouteToggle;
2207
2244
  /** Authentication error page. Default path: `error`. */
2208
2245
  error?: OipRouteToggle;
2209
- /** Current user profile. Default path: `profile`. */
2210
- profile?: OipRouteToggle;
2211
2246
  /** Application configuration. Default path: `config`. */
2212
2247
  config?: OipRouteToggle;
2213
2248
  /** Registered applications, administrators only. Default path: `applications`. */
@@ -2279,5 +2314,5 @@ interface OipRoutesOptions {
2279
2314
  */
2280
2315
  declare function provideOipRoutes(options?: OipRoutesOptions): Routes;
2281
2316
 
2282
- export { APP_INFO_TOKEN, APP_THEME_PRESETS, APP_THEME_PRESETS_MERGE_MODE, AccessComponent, AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppInfoService, AppLayoutComponent, AppModulesComponent, AppTopbar, AppTopbarApplicationSwitcherComponent, ApplicationRegistryService, ApplicationsApi, ApplicationsComponent, AuthGuardService, AuthSessionsApi, AuthSessionsComponent, BaseModuleComponent, BffSecurityService, BlockLoaderComponent, ConfigComponent, ContentType, CustomElementExtensionModuleHostComponent, DbMigrationComponent, DefaultSecretsBannerComponent, DiscussionComponent, ErrorComponent, ExtensionLoaderService, ExtensionModuleHostComponent, FolderModuleApi, FooterComponent, HttpClient, IframeModuleApi, IframeModuleComponent, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, ModuleInstanceRightsService, ModuleLoadingService, MsgService, NoModulesComponent, NotfoundComponent, NotificationApi, NotificationService, OIP_EXTENSION_EVENTS, SecurityApi, SecurityComponent, SecurityService, SidebarComponent, StartPageService, TableFilterService, TopBarService, UnauthorizedComponent, UserNotificationsComponent, UserProfileApi, UserProfileComponent, UserService, convertToPrimeNgDateFormat, defaultTheme, emitOipContextChange, emitOipError, emitOipNavigate, emitOipNotify, emitOipSettingsChange, emitOipTitleChange, langIntercept, mergeWithDefaults, moduleAccessGuard, oipAccessRoute, oipApplicationsRoute, oipAuthGuard, oipConfigRoute, oipDbMigrationRoute, oipDiscussionRoute, oipErrorRoute, oipExtensionsRoute, oipIframeModuleRoute, oipModulesRoute, oipNoModulesRoute, oipProfileRoute, oipSessionsRoute, oipStartRedirectGuard, oipStartRoute, provideAppInfo, provideAppThemes, provideLogoComponent, provideOip, provideOipRoutes, provideTranslations, replaceDefaults };
2317
+ export { APP_INFO_TOKEN, APP_THEME_PRESETS, APP_THEME_PRESETS_MERGE_MODE, AccessComponent, AppConfiguratorComponent, AppFloatingConfiguratorComponent, AppInfoService, AppLayoutComponent, AppModulesComponent, AppTopbar, AppTopbarApplicationSwitcherComponent, ApplicationRegistryService, ApplicationsApi, ApplicationsComponent, AuthGuardService, AuthSessionsApi, AuthSessionsComponent, BaseModuleComponent, BffSecurityService, BlockLoaderComponent, ConfigComponent, ContentType, CustomElementExtensionModuleHostComponent, DbMigrationComponent, DefaultSecretsBannerComponent, DiscussionComponent, ErrorComponent, ExtensionLoaderService, ExtensionModuleHostComponent, FolderModuleApi, FooterComponent, HttpClient, IframeModuleApi, IframeModuleComponent, L10nService, LOGO_COMPONENT_TOKEN, LayoutService, LogoComponent, LogoService, MenuComponent, MenuService, ModuleInstanceRightsService, ModuleLoadingService, MsgService, NoModulesComponent, NotfoundComponent, NotificationApi, NotificationService, OIP_EXTENSION_EVENTS, SecurityApi, SecurityComponent, SecurityService, SidebarComponent, StartPageService, TableFilterService, TopBarService, UnauthorizedComponent, UserNotificationsComponent, UserProfileApi, UserProfileComponent, UserService, convertToPrimeNgDateFormat, defaultTheme, emitOipContextChange, emitOipError, emitOipNavigate, emitOipNotify, emitOipSettingsChange, emitOipTitleChange, langIntercept, mergeWithDefaults, moduleAccessGuard, oipAccessRoute, oipApplicationsRoute, oipAuthGuard, oipConfigRoute, oipDbMigrationRoute, oipDiscussionRoute, oipErrorRoute, oipExtensionsRoute, oipIframeModuleRoute, oipModulesRoute, oipNoModulesRoute, oipSessionsRoute, oipStartRedirectGuard, oipStartRoute, provideAppInfo, provideAppThemes, provideLogoComponent, provideOip, provideOipRoutes, provideTranslations, replaceDefaults };
2283
2318
  export type { AppConfig, AppInfo, AppInfoValue, AppThemePreset, AppThemePresetLoader, AppThemePresetMergeMode, AuthCsrfToken, LanguageDto, MenuChangeEvent, ModuleAccessRouteData, NoSettingsDto, OipExtensionHostContext, OipExtensionLoadType, OipExtensionManifest, OipExtensionModuleMetadata, OipExtensionNavigateEvent, OipExtensionNotifyEvent, OipRouteFeatures, OipRouteToggle, OipRoutesOptions, PutSecurityDto, RequestParams, SecurityDto, StartRouteData, TopBarDto };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oip-common",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "A template for cross-platform web applications based on sakai-ng and primeNG",
5
5
  "main": "index.js",
6
6
  "keywords": [