entcore 4.8.13 → 4.8.14-dev.202602171056

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.
@@ -1,7 +1,7 @@
1
1
  <div class="image-properties">
2
2
  <div class="row">
3
3
  <label class="twelve cell"><strong><i18n>filename</i18n></strong></label>
4
- <input class="twelve cell" type="text" i18n-placeholder="name" ng-model="document.newProperties.name" />
4
+ <input class="twelve cell" type="text" i18n-placeholder="name" ng-model="document.newProperties.name" ng-maxlength="80" maxlength="80" ng-keypress="preventForbiddenChars($event)" />
5
5
  </div>
6
6
  <div class="row">
7
7
  <label class="twelve cell"><strong><i18n>alttext</i18n></strong></label>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "entcore",
3
- "version": "4.8.13",
3
+ "version": "4.8.14-dev.202602171056",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,7 +37,7 @@
37
37
  "rxjs": "5.4.2",
38
38
  "source-map-loader": "^0.1.6",
39
39
  "typescript": "2.4.1",
40
- "ua-parser-js": "0.7.28",
40
+ "ua-parser-js": "2.0.9",
41
41
  "uglify-js": "^3.0.23",
42
42
  "uglifyjs-webpack-plugin": "^0.4.6",
43
43
  "underscore": "^1.8.3",
@@ -48,7 +48,7 @@
48
48
  "@types/angular": "1.8.3",
49
49
  "@types/core-js": "0.9.46",
50
50
  "@types/jasmine": "2.8.8",
51
- "@types/jquery": "^3.3.32",
51
+ "@types/jquery": "3.5.32",
52
52
  "@types/pixi.js": "4.5.7",
53
53
  "@types/ua-parser-js": "^0.7.35",
54
54
  "@types/webdriverio": "4.13.0",
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Device information interface returned by the detection functions.
3
+ */
4
+ export interface DeviceInfo {
5
+ osName: string;
6
+ osVersion: string;
7
+ deviceType: string;
8
+ deviceName: string;
9
+ }
10
+ /**
11
+ * Detects the device information from the user-agent string.
12
+ *
13
+ * Uses ua-parser-js to parse the browser's user-agent and extract:
14
+ * - Operating system name and version
15
+ * - Device type (mobile, tablet, desktop, etc.)
16
+ * - Device name (vendor + model)
17
+ *
18
+ * Falls back to 'Unknown' for any field that cannot be determined.
19
+ * For iPad detection, combines user-agent analysis with feature detection
20
+ * (ongesturechange event) for accurate identification.
21
+ *
22
+ * @returns DeviceInfo object containing osName, osVersion, deviceType, deviceName
23
+ */
24
+ export declare function detectDevice(): DeviceInfo;
25
+ /**
26
+ * Reads device information from existing cookies.
27
+ *
28
+ * @returns DeviceInfo object if all cookies exist, null otherwise
29
+ */
30
+ export declare function readDeviceCookies(): DeviceInfo | null;
31
+ /**
32
+ * Sets device detection cookies in the browser.
33
+ *
34
+ * First checks if cookies already exist. If so, returns the existing values
35
+ * without recalculating. Otherwise, detects device info and sets the cookies.
36
+ *
37
+ * This optimization avoids parsing the user-agent on every page load.
38
+ *
39
+ * @returns DeviceInfo object containing osName, osVersion, deviceType, deviceName
40
+ */
41
+ export declare function setDeviceCookies(): DeviceInfo;
@@ -5,12 +5,8 @@ export declare type BrowserInfo = {
5
5
  name: 'MSIE' | 'Edge' | 'Chrome' | 'Safari' | 'Firefox' | 'Opera' | 'CriOS' | 'FxiOS';
6
6
  version: number;
7
7
  };
8
- export declare type OSInfo = {
9
- name: string | undefined;
10
- version: string | undefined;
11
- };
12
8
  export declare const devices: {
13
- getOSInfo: (uaString?: string) => OSInfo;
9
+ getOSInfo: (uaString?: string) => UAParser.IOS;
14
10
  isIE: () => boolean;
15
11
  isiOS: () => boolean;
16
12
  isIphone: () => boolean;