@capytale/activity.js 3.1.10 → 3.1.11
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.
@@ -15,11 +15,18 @@ export type ActivityType = {
|
|
15
15
|
description: string;
|
16
16
|
tags?: string;
|
17
17
|
bundle: string;
|
18
|
+
/** Si ce type d'activité est disponible pour l'utilisateur courant. */
|
18
19
|
available: boolean;
|
20
|
+
/** Indique que ce type d'activité est remplacé. */
|
19
21
|
replacedBy?: string | null;
|
22
|
+
/** Ce type d'activité devrait être filtré en même temps que celui indiqué. */
|
20
23
|
filterWith?: string | null;
|
24
|
+
/** Si ce type d'activité produit des évaluations détaillées. */
|
21
25
|
detailedEvaluation: boolean;
|
26
|
+
/** Si ce type d'activité est exportable. */
|
22
27
|
exportable: boolean;
|
28
|
+
/** Si ce type d'activité est compatible lti. */
|
29
|
+
lti: boolean;
|
23
30
|
};
|
24
31
|
export type ActivityGroup = {
|
25
32
|
title: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"activityType.js","sourceRoot":"","sources":["../../src/activity/activityType/activityType.ts"],"names":[],"mappings":"","sourcesContent":["export type ActivityType = {\n id: string;\n name: string;\n status?: { beta?: boolean };\n icon: {\n path: string;\n style?: { [s: string]: string };\n };\n helpUrl: string;\n summary: string;\n description: string;\n tags?: string;\n bundle: string;\n available: boolean;\n replacedBy?: string | null;\n filterWith?: string | null;\n detailedEvaluation: boolean;\n exportable: boolean;\n}\n\nexport type ActivityGroup = {\n title: string;\n tooltip?: string;\n activities: string[];\n};\n\nexport type ActivityGroups = {\n [key: string]: ActivityGroup;\n};\n\nexport type ActivityWeights = {\n all: { [key: string]: number };\n niveaux: {\n [key: string]: {\n title: string;\n activities: { [key: string]: number }\n }\n };\n groups: ActivityGroups;\n};\n"]}
|
1
|
+
{"version":3,"file":"activityType.js","sourceRoot":"","sources":["../../src/activity/activityType/activityType.ts"],"names":[],"mappings":"","sourcesContent":["export type ActivityType = {\n id: string;\n name: string;\n status?: { beta?: boolean };\n icon: {\n path: string;\n style?: { [s: string]: string };\n };\n helpUrl: string;\n summary: string;\n description: string;\n tags?: string;\n bundle: string;\n /** Si ce type d'activité est disponible pour l'utilisateur courant. */\n available: boolean;\n /** Indique que ce type d'activité est remplacé. */\n replacedBy?: string | null;\n /** Ce type d'activité devrait être filtré en même temps que celui indiqué. */\n filterWith?: string | null;\n /** Si ce type d'activité produit des évaluations détaillées. */\n detailedEvaluation: boolean;\n /** Si ce type d'activité est exportable. */\n exportable: boolean;\n /** Si ce type d'activité est compatible lti. */\n lti: boolean;\n}\n\nexport type ActivityGroup = {\n title: string;\n tooltip?: string;\n activities: string[];\n};\n\nexport type ActivityGroups = {\n [key: string]: ActivityGroup;\n};\n\nexport type ActivityWeights = {\n all: { [key: string]: number };\n niveaux: {\n [key: string]: {\n title: string;\n activities: { [key: string]: number }\n }\n };\n groups: ActivityGroups;\n};\n"]}
|
package/package.json
CHANGED
package/util/signal.d.ts
ADDED
package/util/signal.js
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
function safeInvoque(callback) {
|
2
|
+
try {
|
3
|
+
callback();
|
4
|
+
}
|
5
|
+
catch (error) {
|
6
|
+
console.error(error);
|
7
|
+
}
|
8
|
+
}
|
9
|
+
export default function createSignal() {
|
10
|
+
let watchers = [];
|
11
|
+
return [
|
12
|
+
() => {
|
13
|
+
for (const watcher of watchers)
|
14
|
+
safeInvoque(watcher);
|
15
|
+
},
|
16
|
+
(callback, imediate = false) => {
|
17
|
+
watchers.push(callback);
|
18
|
+
if (imediate)
|
19
|
+
safeInvoque(callback);
|
20
|
+
return () => {
|
21
|
+
watchers = watchers.filter((watcher) => watcher !== callback);
|
22
|
+
};
|
23
|
+
}
|
24
|
+
];
|
25
|
+
}
|
26
|
+
//# sourceMappingURL=signal.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"signal.js","sourceRoot":"","sources":["../src/util/signal.ts"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,QAAoB;IACrC,IAAI,CAAC;QACD,QAAQ,EAAE,CAAC;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;AACL,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,YAAY;IAIhC,IAAI,QAAQ,GAAmB,EAAE,CAAC;IAClC,OAAO;QACH,GAAG,EAAE;YACD,KAAK,MAAM,OAAO,IAAI,QAAQ;gBAAE,WAAW,CAAC,OAAO,CAAC,CAAC;QACzD,CAAC;QACD,CAAC,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,EAAE;YAC3B,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACxB,IAAI,QAAQ;gBAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;YACpC,OAAO,GAAG,EAAE;gBACR,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC;YAClE,CAAC,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC","sourcesContent":["function safeInvoque(callback: () => void) {\n try {\n callback();\n } catch (error) {\n console.error(error);\n }\n}\n\nexport default function createSignal(): [\n trigger: () => void,\n watch: (callback: () => void, imediate?: boolean) => () => void\n] {\n let watchers: (() => void)[] = [];\n return [\n () => {\n for (const watcher of watchers) safeInvoque(watcher);\n },\n (callback, imediate = false) => {\n watchers.push(callback);\n if (imediate) safeInvoque(callback);\n return () => {\n watchers = watchers.filter((watcher) => watcher !== callback);\n };\n }\n ];\n}"]}
|