oip-common 0.10.0 → 0.11.0

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,6 +844,9 @@ 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;
@@ -842,6 +855,7 @@ interface ChangeOrderParams {
842
855
  interface ContextMenuItemDto {
843
856
  moduleInstanceId: number;
844
857
  isStart?: boolean;
858
+ isFolder?: boolean;
845
859
  url: any;
846
860
  class: string | string[] | Set<string> | {
847
861
  [p: string]: any;
@@ -915,7 +929,7 @@ declare class MenuService {
915
929
  reset(): void;
916
930
  getMenu(): Promise<ModuleInstanceDto[]>;
917
931
  getAdminMenu(): Promise<ModuleInstanceDto[]>;
918
- getModules(): Promise<IntKeyValueDto[]>;
932
+ getModules(): Promise<ModuleKeyValueDto[]>;
919
933
  addModuleInstance(addModuleInstance: AddModuleInstanceDto): Promise<void>;
920
934
  deleteItem(moduleInstanceId: number): Promise<void>;
921
935
  editModuleInstance(item: EditModuleInstanceDto): Promise<void>;
@@ -929,10 +943,11 @@ declare class MenuApi<SecurityDataType = unknown> extends HttpClient<SecurityDat
929
943
  deleteStartModule: (params?: RequestParams) => Promise<void>;
930
944
  getModuleInstanceRights: (query: GetModuleInstanceRightsParams, params?: RequestParams) => Promise<string[]>;
931
945
  getAdminMenu: (params?: RequestParams) => Promise<ModuleInstanceDto[]>;
932
- getModules: (params?: RequestParams) => Promise<IntKeyValueDto[]>;
946
+ getModules: (params?: RequestParams) => Promise<ModuleKeyValueDto[]>;
933
947
  addModuleInstance: (data: AddModuleInstanceDto, params?: RequestParams) => Promise<void>;
934
948
  editModuleInstance: (data: EditModuleInstanceDto, params?: RequestParams) => Promise<void>;
935
949
  deleteModuleInstance: (query: DeleteModuleInstanceParams, params?: RequestParams) => Promise<void>;
950
+ copyModuleInstance: ({ id, ...query }: CopyModuleInstanceParams, params?: RequestParams) => Promise<number>;
936
951
  changeOrder: (query: ChangeOrderParams, params?: RequestParams) => Promise<void>;
937
952
  static ɵfac: i0.ɵɵFactoryDeclaration<MenuApi<any>, never>;
938
953
  static ɵprov: i0.ɵɵInjectableDeclaration<MenuApi<any>>;
@@ -943,12 +958,14 @@ type PrimeIconOption$1 = {
943
958
  value: string;
944
959
  };
945
960
  declare class MenuItemCreateDialogComponent implements OnInit {
961
+ private static readonly defaultIcon;
946
962
  protected readonly menuService: MenuService;
947
963
  protected readonly menu: MenuApi<any>;
948
964
  private readonly msgService;
949
965
  visible: boolean;
950
966
  visibleChange: EventEmitter<boolean>;
951
- modules: IntKeyValueDto[];
967
+ modules: ModuleKeyValueDto[];
968
+ moduleOptions: ModuleKeyValueDto[];
952
969
  iconOptions: PrimeIconOption$1[];
953
970
  selectModule: any;
954
971
  label: string;
@@ -956,6 +973,12 @@ declare class MenuItemCreateDialogComponent implements OnInit {
956
973
  saving: boolean;
957
974
  get canSave(): boolean;
958
975
  ngOnInit(): Promise<void>;
976
+ /**
977
+ * Restricts the module list to the folder when the item is created at the menu root,
978
+ * since only a folder can be placed there.
979
+ */
980
+ private updateModuleOptions;
981
+ onModuleChange(moduleId: number): void;
959
982
  changeVisible(): void;
960
983
  save(): Promise<void>;
961
984
  hide(): void;
@@ -1125,10 +1148,17 @@ declare class ConfigComponent {
1125
1148
  protected selectedDateFormat: string;
1126
1149
  protected selectedTimeFormat: string;
1127
1150
  protected selectedTimeZone: string;
1151
+ protected selectedFirstDayOfWeek: number;
1152
+ /** Days of the week starting from Monday, named in the current language. */
1153
+ protected readonly weekDays: i0.Signal<{
1154
+ value: number;
1155
+ label: string;
1156
+ }[]>;
1128
1157
  constructor();
1129
1158
  changeLanguage(): void;
1130
1159
  changeDateFormat(): void;
1131
1160
  changeTimeFormat(): void;
1161
+ changeFirstDayOfWeek(): void;
1132
1162
  changeTimeZone(): void;
1133
1163
  onSwitchChange(): Promise<void>;
1134
1164
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfigComponent, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oip-common",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "A template for cross-platform web applications based on sakai-ng and primeNG",
5
5
  "main": "index.js",
6
6
  "keywords": [