@dxs-ts/eveli-ide 0.0.322 → 0.0.323
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/build/api-prefs/ImmutablePreference.d.ts +33 -0
- package/build/api-prefs/PreferenceContext.d.ts +10 -0
- package/build/api-prefs/index.d.ts +1 -0
- package/build/api-prefs/initMethods.d.ts +13 -0
- package/build/api-prefs/pref-types.d.ts +37 -0
- package/build/api-prefs/profile-types.d.ts +111 -0
- package/build/{cssMode-DrNipldO.js → cssMode-CJXYanDN.js} +1 -1
- package/build/eveli-fetch/createFileFetch.d.ts +14 -0
- package/build/fetch/worker.rest.api.userprofiles.$profileId.get.d.ts +8 -0
- package/build/fetchTree.gen.d.ts +16 -0
- package/build/{freemarker2-BQPRUo-x.js → freemarker2-C3M8UKFb.js} +1 -1
- package/build/{handlebars-CRJ0xuHH.js → handlebars-3yh7IoZF.js} +1 -1
- package/build/{html-B-V1rL3q.js → html-BRUvEXsZ.js} +1 -1
- package/build/{htmlMode-D2wg5K7d.js → htmlMode-B6kE3DLA.js} +1 -1
- package/build/{index-Dsh2TNw9.js → index-Coqk7Lmq.js} +7353 -7303
- package/build/index.js +1 -1
- package/build/{javascript-qjHB25QK.js → javascript-Byv9Lf9E.js} +1 -1
- package/build/{jsonMode-CEBmSfnV.js → jsonMode-DCDZmv0T.js} +1 -1
- package/build/{liquid-BdJMb2e7.js → liquid-DMNb185q.js} +1 -1
- package/build/{mdx-g42Ar18k.js → mdx-CGfxFfDe.js} +1 -1
- package/build/{python-Dl2Somf8.js → python-BONS3W_G.js} +1 -1
- package/build/{razor-jGEoj9na.js → razor-DRJ5VzHl.js} +1 -1
- package/build/{tsMode-H8nR6ytG.js → tsMode-CBk_nSHu.js} +1 -1
- package/build/{typescript-D5Wje9g6.js → typescript-DpqOfXVO.js} +1 -1
- package/build/{xml-CfESWbYk.js → xml-oM3m_NxQ.js} +1 -1
- package/build/{yaml-DTanssYy.js → yaml-B9a9lCRy.js} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Preference, VisibilityRule, SortingRule, DataId, PreferenceId, ConfigRule } from './pref-types';
|
|
2
|
+
export interface ImmutablePreferenceInit {
|
|
3
|
+
id: PreferenceId;
|
|
4
|
+
backendId: string | undefined;
|
|
5
|
+
fields: readonly DataId[];
|
|
6
|
+
visibility: Record<DataId, VisibilityRule>;
|
|
7
|
+
sorting: Record<DataId, SortingRule>;
|
|
8
|
+
config: Record<DataId, ConfigRule>;
|
|
9
|
+
}
|
|
10
|
+
export declare class ImmutablePreference implements Preference {
|
|
11
|
+
private _backendId;
|
|
12
|
+
private _id;
|
|
13
|
+
private _fields;
|
|
14
|
+
private _visibility;
|
|
15
|
+
private _sorting;
|
|
16
|
+
private _config;
|
|
17
|
+
constructor(init: ImmutablePreferenceInit);
|
|
18
|
+
initVisibility(init: ImmutablePreferenceInit): Record<DataId, VisibilityRule>;
|
|
19
|
+
get id(): string;
|
|
20
|
+
get backendId(): string | undefined;
|
|
21
|
+
get fields(): readonly string[];
|
|
22
|
+
get config(): ConfigRule[];
|
|
23
|
+
get visibility(): VisibilityRule[];
|
|
24
|
+
get sorting(): SortingRule[];
|
|
25
|
+
getVisibility(dataId: DataId): VisibilityRule;
|
|
26
|
+
getSorting(dataId?: DataId): SortingRule | undefined;
|
|
27
|
+
getConfig(dataId: DataId): ConfigRule | undefined;
|
|
28
|
+
withConfig(config: ConfigRule | (ConfigRule[])): ImmutablePreference;
|
|
29
|
+
withSorting(newValue: SortingRule): ImmutablePreference;
|
|
30
|
+
withVisibility(newValue: VisibilityRule): ImmutablePreference;
|
|
31
|
+
withVisibleFields(newValueFields: DataId[]): ImmutablePreference;
|
|
32
|
+
clone(init: Partial<ImmutablePreferenceInit>): ImmutablePreferenceInit;
|
|
33
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PreferenceContextType, PreferenceInit } from './pref-types';
|
|
3
|
+
export declare function createPrefContext(hardInit?: PreferenceInit): {
|
|
4
|
+
Context: React.Context<PreferenceContextType>;
|
|
5
|
+
Provider: React.FC<{
|
|
6
|
+
children: React.ReactElement;
|
|
7
|
+
init?: PreferenceInit;
|
|
8
|
+
}>;
|
|
9
|
+
usePreference: () => PreferenceContextType;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './profile-types';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PreferenceInit, VisibilityRule, SortingRule, DataId, ConfigRule } from './pref-types';
|
|
2
|
+
import { ImmutablePreference } from './ImmutablePreference';
|
|
3
|
+
import { PrefsApi } from './profile-types';
|
|
4
|
+
export type WithVisibleFields = (visibleFields: DataId[]) => void;
|
|
5
|
+
export type WithSorting = (sorting: Omit<SortingRule, "id">) => void;
|
|
6
|
+
export type WithVisibility = (visibility: Omit<VisibilityRule, "id">) => void;
|
|
7
|
+
export type WithConfig = (config: ConfigRule | (ConfigRule[])) => void;
|
|
8
|
+
export declare function initPreference(init: PreferenceInit, initProfile: PrefsApi.UiSettings | undefined): ImmutablePreference;
|
|
9
|
+
export declare function parsePreference(settingsId: string, initProfile: PrefsApi.UiSettings | undefined): ImmutablePreference;
|
|
10
|
+
export declare function initWithConfig(setPref: React.Dispatch<React.SetStateAction<ImmutablePreference>>, backend: PrefsApi.PrefsRestApi, userId: string, config: ConfigRule | (ConfigRule[])): void;
|
|
11
|
+
export declare function initWithSorting(setPref: React.Dispatch<React.SetStateAction<ImmutablePreference>>, backend: PrefsApi.PrefsRestApi, userId: string, sorting: SortingRule): void;
|
|
12
|
+
export declare function initWithVisibleFields(setPref: React.Dispatch<React.SetStateAction<ImmutablePreference>>, backend: PrefsApi.PrefsRestApi, userId: string, visibility: DataId[]): void;
|
|
13
|
+
export declare function initWithVisibility(setPref: React.Dispatch<React.SetStateAction<ImmutablePreference>>, backend: PrefsApi.PrefsRestApi, userId: string, visibility: VisibilityRule): void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type PreferenceId = string;
|
|
2
|
+
export type DataId = string;
|
|
3
|
+
export interface VisibilityRule {
|
|
4
|
+
dataId: DataId;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface SortingRule {
|
|
8
|
+
dataId: DataId;
|
|
9
|
+
direction: 'asc' | 'desc';
|
|
10
|
+
}
|
|
11
|
+
export interface ConfigRule {
|
|
12
|
+
dataId: DataId;
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
export interface Preference {
|
|
16
|
+
id: PreferenceId;
|
|
17
|
+
fields: readonly DataId[];
|
|
18
|
+
visibility: readonly VisibilityRule[];
|
|
19
|
+
sorting: readonly SortingRule[];
|
|
20
|
+
config: readonly ConfigRule[];
|
|
21
|
+
getVisibility(dataId: DataId): VisibilityRule;
|
|
22
|
+
getConfig(dataId: DataId): ConfigRule | undefined;
|
|
23
|
+
getSorting(dataId?: DataId): SortingRule | undefined;
|
|
24
|
+
}
|
|
25
|
+
export interface PreferenceContextType {
|
|
26
|
+
pref: Preference;
|
|
27
|
+
withConfig(config: ConfigRule): void;
|
|
28
|
+
withSorting(sorting: Omit<SortingRule, "id">): void;
|
|
29
|
+
withVisibility(visibility: Omit<VisibilityRule, "id">): void;
|
|
30
|
+
withVisibleFields(visibility: DataId[]): void;
|
|
31
|
+
}
|
|
32
|
+
export interface PreferenceInit {
|
|
33
|
+
id: PreferenceId;
|
|
34
|
+
fields: DataId[];
|
|
35
|
+
sorting?: SortingRule;
|
|
36
|
+
config?: ConfigRule;
|
|
37
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export declare namespace PrefsApi {
|
|
2
|
+
}
|
|
3
|
+
export declare namespace PrefsApi {
|
|
4
|
+
interface PrefsRestApi {
|
|
5
|
+
currentUserProfile(): Promise<UserProfile>;
|
|
6
|
+
getUserProfileById(id: string): Promise<UserProfile>;
|
|
7
|
+
findAllUserProfiles(): Promise<UserProfile[]>;
|
|
8
|
+
updateUserProfile(profileId: string, commands: UserProfileUpdateCommand<any>[]): Promise<UserProfile>;
|
|
9
|
+
updateUiSettings(commands: UpsertUiSettings): Promise<UserProfile>;
|
|
10
|
+
findUiSettings(settingsId: string): Promise<UiSettings | undefined>;
|
|
11
|
+
}
|
|
12
|
+
type NotificationType = string;
|
|
13
|
+
interface UserDetails {
|
|
14
|
+
username: string;
|
|
15
|
+
firstName: string;
|
|
16
|
+
lastName: string;
|
|
17
|
+
email: string;
|
|
18
|
+
}
|
|
19
|
+
interface NotificationSetting {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
type: NotificationType;
|
|
22
|
+
}
|
|
23
|
+
interface UiSettingForVisibility {
|
|
24
|
+
dataId: string;
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface UiSettingsForSorting {
|
|
28
|
+
dataId: string;
|
|
29
|
+
direction: 'asc' | 'desc';
|
|
30
|
+
}
|
|
31
|
+
interface UiSettingsForConfig {
|
|
32
|
+
dataId: string;
|
|
33
|
+
value: string;
|
|
34
|
+
}
|
|
35
|
+
interface UiSettings {
|
|
36
|
+
id: string | undefined;
|
|
37
|
+
settingsId: string;
|
|
38
|
+
userId: string;
|
|
39
|
+
visibility: UiSettingForVisibility[];
|
|
40
|
+
sorting: UiSettingsForSorting[];
|
|
41
|
+
config: UiSettingsForConfig[];
|
|
42
|
+
}
|
|
43
|
+
interface UserProfile {
|
|
44
|
+
id: string;
|
|
45
|
+
created: string;
|
|
46
|
+
updated: string;
|
|
47
|
+
details: UserDetails;
|
|
48
|
+
notificationSettings: NotificationSetting[];
|
|
49
|
+
}
|
|
50
|
+
interface UserProfileTransaction {
|
|
51
|
+
id: string;
|
|
52
|
+
commands: UserProfileCommand[];
|
|
53
|
+
}
|
|
54
|
+
interface UserProfileCommand {
|
|
55
|
+
id: string;
|
|
56
|
+
userId?: string;
|
|
57
|
+
targetDate?: Date;
|
|
58
|
+
commandType: UserProfileCommandType;
|
|
59
|
+
}
|
|
60
|
+
type UserProfileCommandType = 'CreateUserProfile' | 'UpsertUserProfile' | 'ChangeUserDetailsFirstName' | 'ChangeUserDetailsLastName' | 'ChangeUserDetailsEmail' | 'ChangeNotificationSetting' | 'ArchiveUserProfile';
|
|
61
|
+
interface UserProfileUpdateCommand<T extends UserProfileCommandType> extends UserProfileCommand {
|
|
62
|
+
commandType: T;
|
|
63
|
+
}
|
|
64
|
+
interface CreateUserProfile extends UserProfileCommand {
|
|
65
|
+
commandType: 'CreateUserProfile';
|
|
66
|
+
details: UserDetails;
|
|
67
|
+
notificationSettings: NotificationSetting[];
|
|
68
|
+
}
|
|
69
|
+
interface UpsertUiSettings {
|
|
70
|
+
commandType: 'UpsertUiSettings';
|
|
71
|
+
userId: string;
|
|
72
|
+
settingsId: string;
|
|
73
|
+
visibility: UiSettingForVisibility[];
|
|
74
|
+
sorting: UiSettingsForSorting[];
|
|
75
|
+
config: UiSettingsForConfig[];
|
|
76
|
+
}
|
|
77
|
+
interface UpsertUserProfile extends UserProfileUpdateCommand<'UpsertUserProfile'> {
|
|
78
|
+
commandType: 'UpsertUserProfile';
|
|
79
|
+
details: UserDetails;
|
|
80
|
+
notificationSettings: NotificationSetting[];
|
|
81
|
+
}
|
|
82
|
+
interface ChangeUserDetailsFirstName extends UserProfileUpdateCommand<'ChangeUserDetailsFirstName'> {
|
|
83
|
+
commandType: 'ChangeUserDetailsFirstName';
|
|
84
|
+
firstName: string;
|
|
85
|
+
}
|
|
86
|
+
interface ChangeUserDetailsLastName extends UserProfileUpdateCommand<'ChangeUserDetailsLastName'> {
|
|
87
|
+
commandType: 'ChangeUserDetailsLastName';
|
|
88
|
+
lastName: string;
|
|
89
|
+
}
|
|
90
|
+
interface ChangeUserDetailsEmail extends UserProfileUpdateCommand<'ChangeUserDetailsEmail'> {
|
|
91
|
+
commandType: 'ChangeUserDetailsEmail';
|
|
92
|
+
email: string;
|
|
93
|
+
}
|
|
94
|
+
interface ChangeNotificationSetting extends UserProfileUpdateCommand<'ChangeNotificationSetting'> {
|
|
95
|
+
commandType: 'ChangeNotificationSetting';
|
|
96
|
+
type: NotificationType;
|
|
97
|
+
enabled: boolean;
|
|
98
|
+
}
|
|
99
|
+
interface ArchiveUserProfile extends UserProfileUpdateCommand<'ArchiveUserProfile'> {
|
|
100
|
+
commandType: 'ArchiveUserProfile';
|
|
101
|
+
}
|
|
102
|
+
interface UserProfileDescriptor {
|
|
103
|
+
id: string;
|
|
104
|
+
email: string | undefined;
|
|
105
|
+
displayName: string;
|
|
106
|
+
entry: UserProfile;
|
|
107
|
+
created: string;
|
|
108
|
+
updated: string;
|
|
109
|
+
notificationSettings: NotificationSetting[];
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as et } from "./index-
|
|
1
|
+
import { m as et } from "./index-Coqk7Lmq.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
@@ -880,6 +880,20 @@ export declare class RootFileFetch {
|
|
|
880
880
|
tenantConfig: import('..').TenantConfig | undefined;
|
|
881
881
|
pending: boolean;
|
|
882
882
|
}>;
|
|
883
|
+
} | {
|
|
884
|
+
id: "worker/rest/api/userprofiles/$profileId.GET";
|
|
885
|
+
path: "worker/rest/api/userprofiles/$profileId";
|
|
886
|
+
method: "GET";
|
|
887
|
+
params: {
|
|
888
|
+
profileId: string;
|
|
889
|
+
};
|
|
890
|
+
hook: HookImpl<"worker/rest/api/userprofiles/$profileId.GET", Hook<{}, {
|
|
891
|
+
restApi: () => import("../api-prefs").PrefsApi.PrefsRestApi;
|
|
892
|
+
}>, "worker/rest/api/userprofiles/$profileId", "GET", {
|
|
893
|
+
profileId: string;
|
|
894
|
+
}, {}, {
|
|
895
|
+
restApi: () => import("../api-prefs").PrefsApi.PrefsRestApi;
|
|
896
|
+
}>;
|
|
883
897
|
} | {
|
|
884
898
|
id: "worker/rest/api/version.GET";
|
|
885
899
|
path: "worker/rest/api/version";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PrefsApi } from '../api-prefs';
|
|
2
|
+
export declare const Hook: import('../eveli-fetch').HookImpl<"worker/rest/api/userprofiles/$profileId.GET", import('../eveli-fetch').Hook<{}, {
|
|
3
|
+
restApi: () => PrefsApi.PrefsRestApi;
|
|
4
|
+
}>, "worker/rest/api/userprofiles/$profileId", "GET", {
|
|
5
|
+
profileId: string;
|
|
6
|
+
}, {}, {
|
|
7
|
+
restApi: () => PrefsApi.PrefsRestApi;
|
|
8
|
+
}>;
|
package/build/fetchTree.gen.d.ts
CHANGED
|
@@ -457,6 +457,13 @@ declare const workerRestApiTenantConfigsGETRoute: import('./eveli-fetch').HookIm
|
|
|
457
457
|
tenantConfig: import('./index.ts').TenantConfig | undefined;
|
|
458
458
|
pending: boolean;
|
|
459
459
|
}>;
|
|
460
|
+
declare const workerRestApiUserprofilesProfileIdGETRoute: import('./eveli-fetch').HookImpl<"worker/rest/api/userprofiles/$profileId.GET", import('./eveli-fetch').Hook<{}, {
|
|
461
|
+
restApi: () => import("./api-prefs/profile-types.ts").PrefsApi.PrefsRestApi;
|
|
462
|
+
}>, "worker/rest/api/userprofiles/$profileId", "GET", {
|
|
463
|
+
profileId: string;
|
|
464
|
+
}, {}, {
|
|
465
|
+
restApi: () => import("./api-prefs/profile-types.ts").PrefsApi.PrefsRestApi;
|
|
466
|
+
}>;
|
|
460
467
|
declare const workerRestApiVersionGETRoute: import('./eveli-fetch').HookImpl<"worker/rest/api/version.GET", import('./eveli-fetch').Hook<{}, {
|
|
461
468
|
frontend: import('./fetch/worker.rest.api.version.get.ts').VersionEntity;
|
|
462
469
|
backend: import('./fetch/worker.rest.api.version.get.ts').VersionEntity;
|
|
@@ -1019,6 +1026,15 @@ declare module './eveli-fetch' {
|
|
|
1019
1026
|
params: {};
|
|
1020
1027
|
hook: typeof workerRestApiTenantConfigsGETRoute;
|
|
1021
1028
|
};
|
|
1029
|
+
'worker/rest/api/userprofiles/$profileId.GET': {
|
|
1030
|
+
id: 'worker/rest/api/userprofiles/$profileId.GET';
|
|
1031
|
+
path: 'worker/rest/api/userprofiles/$profileId';
|
|
1032
|
+
method: 'GET';
|
|
1033
|
+
params: {
|
|
1034
|
+
profileId: string;
|
|
1035
|
+
};
|
|
1036
|
+
hook: typeof workerRestApiUserprofilesProfileIdGETRoute;
|
|
1037
|
+
};
|
|
1022
1038
|
'worker/rest/api/version.GET': {
|
|
1023
1039
|
id: 'worker/rest/api/version.GET';
|
|
1024
1040
|
path: 'worker/rest/api/version';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as f } from "./index-
|
|
1
|
+
import { m as f } from "./index-Coqk7Lmq.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as l } from "./index-
|
|
1
|
+
import { m as l } from "./index-Coqk7Lmq.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as s } from "./index-
|
|
1
|
+
import { m as s } from "./index-Coqk7Lmq.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as lt } from "./index-
|
|
1
|
+
import { m as lt } from "./index-Coqk7Lmq.js";
|
|
2
2
|
/*!-----------------------------------------------------------------------------
|
|
3
3
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|