@edifice.io/client 1.7.4-develop-pedago.20241211160712
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/LICENSE +661 -0
- package/README.md +90 -0
- package/dist/analytics/Service.d.ts +17 -0
- package/dist/apps/timeline/Framework.d.ts +25 -0
- package/dist/apps/timeline/Notification.model.d.ts +10 -0
- package/dist/apps/timeline/interfaces.d.ts +69 -0
- package/dist/audience/ReactionsService.d.ts +22 -0
- package/dist/audience/Service.d.ts +13 -0
- package/dist/audience/ViewsService.d.ts +12 -0
- package/dist/audience/interface.d.ts +108 -0
- package/dist/cache/Service.d.ts +14 -0
- package/dist/configure/Analytics.d.ts +40 -0
- package/dist/configure/AppConf.d.ts +17 -0
- package/dist/configure/Framework.d.ts +22 -0
- package/dist/configure/Service.d.ts +21 -0
- package/dist/configure/Theme.d.ts +34 -0
- package/dist/configure/User.d.ts +21 -0
- package/dist/configure/interfaces.d.ts +218 -0
- package/dist/data/Service.d.ts +25 -0
- package/dist/data/WebBroker.d.ts +12 -0
- package/dist/data/interface.d.ts +50 -0
- package/dist/directory/Service.d.ts +17 -0
- package/dist/directory/interface.d.ts +53 -0
- package/dist/embedder/Service.d.ts +39 -0
- package/dist/embedder/interface.d.ts +14 -0
- package/dist/globals.d.ts +52 -0
- package/dist/idiom/Idiom.d.ts +18 -0
- package/dist/idiom/Service.d.ts +24 -0
- package/dist/idiom/interfaces.d.ts +22 -0
- package/dist/index.cjs +6 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +6192 -0
- package/dist/notify/Framework.d.ts +29 -0
- package/dist/notify/Subject.d.ts +9 -0
- package/dist/notify/interfaces.d.ts +113 -0
- package/dist/resources/ResourceService.d.ts +52 -0
- package/dist/resources/ServiceRegistry.d.ts +25 -0
- package/dist/resources/SnipletsService.d.ts +18 -0
- package/dist/resources/behaviours/AbstractBehaviourService.d.ts +34 -0
- package/dist/resources/behaviours/ActualitesBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/BlogBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/CollaborativewallBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/CommunityBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/ExercizerBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/FormulaireBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/ForumBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/HomeworksBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/MagnetoBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/MindmapBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/PagesBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/PollBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/ScrapbookBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/TimelinegeneratorBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/WikiBehaviour.d.ts +6 -0
- package/dist/resources/behaviours/WorkspaceBehaviour.d.ts +7 -0
- package/dist/resources/interface.d.ts +390 -0
- package/dist/resources/services/ScrapbookResourceService.d.ts +14 -0
- package/dist/rights/Service.d.ts +77 -0
- package/dist/rights/interface.d.ts +18 -0
- package/dist/services/OdeServices.d.ts +72 -0
- package/dist/services/index.d.ts +10 -0
- package/dist/session/Framework.d.ts +10 -0
- package/dist/session/Service.d.ts +39 -0
- package/dist/session/Session.d.ts +34 -0
- package/dist/session/interfaces.d.ts +268 -0
- package/dist/share/Service.d.ts +18 -0
- package/dist/share/interface.d.ts +104 -0
- package/dist/transport/Framework.d.ts +9 -0
- package/dist/transport/Http.d.ts +26 -0
- package/dist/transport/Service.d.ts +31 -0
- package/dist/transport/interfaces.d.ts +70 -0
- package/dist/utilities/DocumentHelper.d.ts +27 -0
- package/dist/utilities/StringUtils.d.ts +3 -0
- package/dist/utilities/index.d.ts +3 -0
- package/dist/utilities/isActionAvailable.d.ts +2 -0
- package/dist/video/Service.d.ts +21 -0
- package/dist/video/interface.d.ts +42 -0
- package/dist/widget/Framework.d.ts +31 -0
- package/dist/widget/LastInfos.widget.d.ts +15 -0
- package/dist/widget/interfaces.d.ts +53 -0
- package/dist/workspace/Service.d.ts +75 -0
- package/dist/workspace/interface.d.ts +67 -0
- package/package.json +53 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ILastInfosModel {
|
|
2
|
+
date: string;
|
|
3
|
+
shared: [];
|
|
4
|
+
thread_icon: string;
|
|
5
|
+
thread_id: number;
|
|
6
|
+
thread_title: string;
|
|
7
|
+
title: string;
|
|
8
|
+
username: string;
|
|
9
|
+
_id: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class LastInfosWidget {
|
|
12
|
+
loadInfos(maxResults: number): Promise<ILastInfosModel[]>;
|
|
13
|
+
getMaxResults(): Promise<number>;
|
|
14
|
+
setMaxResults(maxResults: number): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { IWidgetModel, WidgetPosition } from '../session/interfaces';
|
|
2
|
+
export declare const WIDGET_NAME: {
|
|
3
|
+
readonly LAST_INFOS: "last-infos-widget";
|
|
4
|
+
readonly BIRTHDAY: "birthday";
|
|
5
|
+
readonly CALENDAR: "calendar-widget";
|
|
6
|
+
readonly CARNET: "carnet-de-bord";
|
|
7
|
+
readonly RECORD: "record-me";
|
|
8
|
+
readonly MOOD: "mood";
|
|
9
|
+
readonly MY_APPS: "my-apps";
|
|
10
|
+
readonly NOTES: "notes";
|
|
11
|
+
readonly RSS: "rss-widget";
|
|
12
|
+
readonly BOOKMARK: "bookmark-widget";
|
|
13
|
+
readonly QWANT: "qwant";
|
|
14
|
+
readonly QWANT_JUNIOR: "qwant-junior";
|
|
15
|
+
readonly AGENDA: "agenda-widget";
|
|
16
|
+
readonly CURSUS: "cursus-widget";
|
|
17
|
+
readonly MAXICOURS: "maxicours-widget";
|
|
18
|
+
readonly UNIVERSALIS: "universalis-widget";
|
|
19
|
+
readonly BRIEFME: "briefme-widget";
|
|
20
|
+
readonly SCHOOL: "school-widget";
|
|
21
|
+
};
|
|
22
|
+
export type WidgetName = (typeof WIDGET_NAME)[keyof typeof WIDGET_NAME];
|
|
23
|
+
export declare abstract class WidgetFrameworkFactory {
|
|
24
|
+
static instance(): IWidgetFramework;
|
|
25
|
+
}
|
|
26
|
+
export interface IWidgetFramework {
|
|
27
|
+
/** Loads the widget configuration. */
|
|
28
|
+
initialize(version: string | null, cdnDomain: string | null): Promise<void>;
|
|
29
|
+
/** Save user preferences */
|
|
30
|
+
saveUserPrefs(): Promise<any>;
|
|
31
|
+
/** List widgets that are visible to the connected user. */
|
|
32
|
+
readonly list: IWidget[];
|
|
33
|
+
/** Retrieve a widget by name. */
|
|
34
|
+
lookup(widgetName: string): IWidget | undefined;
|
|
35
|
+
}
|
|
36
|
+
export interface IWidget {
|
|
37
|
+
/** The widgets conf at platform level. */
|
|
38
|
+
readonly platformConf: IWidgetModel;
|
|
39
|
+
/** The widgets conf at user level. */
|
|
40
|
+
readonly userPref: WidgetUserPref;
|
|
41
|
+
}
|
|
42
|
+
export type WidgetSpecificUserPrefs = 'schoolId';
|
|
43
|
+
export type WidgetUserPref = {
|
|
44
|
+
/** Integer defining the sort order of this widget. */
|
|
45
|
+
index: number;
|
|
46
|
+
/** Boolean indicating wether the user wants to see this widget, or not. */
|
|
47
|
+
show: boolean;
|
|
48
|
+
/** Prefered position on-screen (left, right...). */
|
|
49
|
+
position?: WidgetPosition;
|
|
50
|
+
} & {
|
|
51
|
+
[pref in WidgetSpecificUserPrefs]?: any;
|
|
52
|
+
};
|
|
53
|
+
export * from './LastInfos.widget';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ID } from '../globals';
|
|
2
|
+
import { IOdeServices } from '../services/OdeServices';
|
|
3
|
+
import { WorkspaceElement, WorkspaceSearchFilter, WorkspaceVisibility } from './interface';
|
|
4
|
+
interface ElementQuery {
|
|
5
|
+
/**
|
|
6
|
+
* Keep only results having this criteria.
|
|
7
|
+
* Defaults to "owner" in backend but must be specified here for clarity.
|
|
8
|
+
*/
|
|
9
|
+
filter: WorkspaceSearchFilter;
|
|
10
|
+
/** Restrict results to this element id only (kind of get). */
|
|
11
|
+
id?: ID;
|
|
12
|
+
/** Restrict results to element having this direct parent (folder). */
|
|
13
|
+
parentId?: ID;
|
|
14
|
+
/** Restrict results to elements having this ancestor (folder) at any level. */
|
|
15
|
+
ancestorId?: string;
|
|
16
|
+
/** Restrict results to the 1st folder hierarchy level. */
|
|
17
|
+
onlyRoot?: boolean;
|
|
18
|
+
/** Restrict results to this app. */
|
|
19
|
+
application?: string;
|
|
20
|
+
/** Restrict results to elements containing this text. */
|
|
21
|
+
search?: string;
|
|
22
|
+
/** Extend results to files AND folders. Defaults to false, with file results only. */
|
|
23
|
+
includeall?: boolean;
|
|
24
|
+
/** Max number of results needed. */
|
|
25
|
+
limit?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Skip the first N results.
|
|
28
|
+
* Allows for pagination when used with the `limit` parameter.
|
|
29
|
+
*/
|
|
30
|
+
skip?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Restrict results to elements directly shared with the user.
|
|
33
|
+
* => Handle this param through a dedicated method. Do not expose it directly.
|
|
34
|
+
*/
|
|
35
|
+
directShared?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Truthy when result is a tree ?
|
|
38
|
+
* => Handle this param through a dedicated method. Do not expose it directly.
|
|
39
|
+
*/
|
|
40
|
+
hierarchical?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export declare class WorkspaceService {
|
|
43
|
+
private context;
|
|
44
|
+
constructor(context: IOdeServices);
|
|
45
|
+
private get http();
|
|
46
|
+
private extractMetadata;
|
|
47
|
+
saveFile(file: Blob | File, params?: {
|
|
48
|
+
parentId?: string;
|
|
49
|
+
visibility?: WorkspaceVisibility;
|
|
50
|
+
application?: string;
|
|
51
|
+
}): Promise<WorkspaceElement>;
|
|
52
|
+
updateFile(id: string, file: Blob | File, params?: {
|
|
53
|
+
alt?: string;
|
|
54
|
+
legend?: string;
|
|
55
|
+
name?: string;
|
|
56
|
+
}): Promise<any>;
|
|
57
|
+
deleteFile(elements: WorkspaceElement[]): Promise<void>;
|
|
58
|
+
private acceptDocuments;
|
|
59
|
+
searchDocuments(params: ElementQuery): Promise<WorkspaceElement[]>;
|
|
60
|
+
listDocuments(filter: WorkspaceSearchFilter, parentId?: ID): Promise<WorkspaceElement[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Duplicate and transfers documents if needed to a different folder with the specified application and visibility.
|
|
63
|
+
* @param documents - The array of documents to transfer.
|
|
64
|
+
* @param application - The application to associate with the transferred documents.
|
|
65
|
+
* @param visibility - The visibility of the transferred documents. Defaults to "protected".
|
|
66
|
+
* @returns A Promise that resolves to an array of transferred WorkspaceElements.
|
|
67
|
+
*/
|
|
68
|
+
transferDocuments(documents: WorkspaceElement[], application: string, visibility?: WorkspaceVisibility): Promise<WorkspaceElement[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Get the URL of the thumbnail of a workspace element (or its URL),
|
|
71
|
+
* or `null` if none exists or can be created.
|
|
72
|
+
*/
|
|
73
|
+
getThumbnailUrl(doc: WorkspaceElement | string, width?: number, height?: number): string | null;
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export interface WorkspaceElement {
|
|
2
|
+
_id?: string;
|
|
3
|
+
eType: 'folder' | 'file' | string;
|
|
4
|
+
eParent: string;
|
|
5
|
+
name: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
file?: string;
|
|
8
|
+
deleted?: boolean;
|
|
9
|
+
children: WorkspaceElement[];
|
|
10
|
+
created: Date;
|
|
11
|
+
trasher?: string;
|
|
12
|
+
externalId?: string;
|
|
13
|
+
_shared: any[];
|
|
14
|
+
inheritedShares?: any[];
|
|
15
|
+
_isShared: boolean;
|
|
16
|
+
showComments?: boolean;
|
|
17
|
+
editing?: boolean;
|
|
18
|
+
comments?: Comment[];
|
|
19
|
+
comment?: string;
|
|
20
|
+
ownerName?: string;
|
|
21
|
+
owner: {
|
|
22
|
+
userId: string;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
uploadStatus?: 'loading' | 'loaded' | 'failed' | 'abort';
|
|
26
|
+
uploadXhr?: XMLHttpRequest;
|
|
27
|
+
hiddenBlob?: Blob;
|
|
28
|
+
metadata?: {
|
|
29
|
+
'content-type'?: string;
|
|
30
|
+
'role'?: string;
|
|
31
|
+
'extension'?: string;
|
|
32
|
+
'filename'?: string;
|
|
33
|
+
'size'?: number;
|
|
34
|
+
'captation'?: boolean;
|
|
35
|
+
'duration'?: number;
|
|
36
|
+
'width'?: number;
|
|
37
|
+
'height'?: number;
|
|
38
|
+
};
|
|
39
|
+
link?: string;
|
|
40
|
+
icon?: string;
|
|
41
|
+
version?: number;
|
|
42
|
+
currentQuality?: number;
|
|
43
|
+
application?: string;
|
|
44
|
+
legend?: string;
|
|
45
|
+
alt?: string;
|
|
46
|
+
protected?: boolean;
|
|
47
|
+
public?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Get multimedia thumbnails
|
|
50
|
+
* */
|
|
51
|
+
thumbnails?: {
|
|
52
|
+
[thumbSize: string]: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** Supported view preferences */
|
|
56
|
+
export type WorkspacePreferenceView = 'list' | 'icons' | 'carousel';
|
|
57
|
+
export type WorkspaceVisibility = 'public' | 'protected';
|
|
58
|
+
/** Workspace preferences */
|
|
59
|
+
export interface WorkspacePreference {
|
|
60
|
+
sortField?: string;
|
|
61
|
+
sortDesc?: boolean;
|
|
62
|
+
view?: WorkspacePreferenceView;
|
|
63
|
+
bbmView?: WorkspacePreferenceView;
|
|
64
|
+
quickstart?: 'viewed' | 'notviewed';
|
|
65
|
+
}
|
|
66
|
+
/** Supported search filters */
|
|
67
|
+
export type WorkspaceSearchFilter = 'owner' | 'shared' | 'protected' | 'public' | 'trash' | 'all' | 'external';
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@edifice.io/client",
|
|
3
|
+
"version": "1.7.4-develop-pedago.20241211160712",
|
|
4
|
+
"description": "Edifice TypeScript Client",
|
|
5
|
+
"homepage": "https://github.com/edificeio/edifice-frontend-framework/tree/main/packages/client#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/edificeio/edifice-frontend-framework/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/edificeio/edifice-frontend-framework.git",
|
|
12
|
+
"directory": "packages/client"
|
|
13
|
+
},
|
|
14
|
+
"license": "AGPL-3.0",
|
|
15
|
+
"author": "Edifice",
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"require": "./dist/index.cjs",
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"main": "dist/index.cjs",
|
|
25
|
+
"module": "dist/index.js",
|
|
26
|
+
"types": "dist/index.d.ts",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"axios": "^1.7.7",
|
|
32
|
+
"core-js": "^3.35.1",
|
|
33
|
+
"@edifice.io/utilities": "1.7.4-develop-pedago.20241211160712"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/jasmine": "5.1.4",
|
|
37
|
+
"@types/node": "^22.9.1",
|
|
38
|
+
"jasmine": "5.1.0",
|
|
39
|
+
"rimraf": "5.0.5",
|
|
40
|
+
"rollup-plugin-visualizer": "5.12.0",
|
|
41
|
+
"typedoc": "0.25.7",
|
|
42
|
+
"typedoc-plugin-markdown": "3.17.1",
|
|
43
|
+
"vite": "^5.4.11",
|
|
44
|
+
"vite-plugin-dts": "^4.1.0"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "vite build",
|
|
48
|
+
"docs": "npx rimraf ./docs/ && npx typedoc src/ts/index.ts --excludePrivate --disableSources --plugin typedoc-plugin-markdown",
|
|
49
|
+
"format": "pnpm run format:write && pnpm run format:check",
|
|
50
|
+
"format:check": "npx prettier --check \"src/ts/**/*.ts\"",
|
|
51
|
+
"format:write": "npx prettier --write \"src/ts/**/*.ts\""
|
|
52
|
+
}
|
|
53
|
+
}
|