@signageos/front-applet 6.5.7 → 6.6.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/CHANGELOG.md +4 -0
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.map +1 -1
- package/docs/content/js-device-info.md +1 -0
- package/docs/content/js-file-system.md +2 -1
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.d.ts +2 -0
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js +13 -0
- package/es6/FrontApplet/DeviceInfo/DeviceInfo.js.map +1 -1
- package/package.json +4 -4
|
@@ -21,6 +21,7 @@ Information set to the device using the CloudControl - e.g. Location and Tags.
|
|
|
21
21
|
| ----------------- | ------------------ | :---------------: |
|
|
22
22
|
| `getLocation()` | Returns location when assigned to device | 5.2.0 |
|
|
23
23
|
| `getOrganizationTags()` | Returns list of organization tags when some assigned to device | 5.2.0
|
|
24
|
+
| `getDeviceName()` | Returns name of device | 6.6.0 |
|
|
24
25
|
|
|
25
26
|
## getLocation()
|
|
26
27
|
Location is requested from server on application start, automatically updated when changed and persists in local storage.
|
|
@@ -273,7 +273,8 @@ For every download request, our app makes HEAD request for `content-length` head
|
|
|
273
273
|
:::
|
|
274
274
|
|
|
275
275
|
:::warning
|
|
276
|
-
`headers` has to be a JSON object. If you are passing the value, make sure you use `JSON.parse()`.
|
|
276
|
+
- `headers` has to be a JSON object. If you are passing the value, make sure you use `JSON.parse()`.
|
|
277
|
+
- Windows platform can download only files smaller then 4GB.
|
|
277
278
|
:::
|
|
278
279
|
|
|
279
280
|
### Javascript Example
|
|
@@ -7,5 +7,7 @@ export default class DeviceInfo {
|
|
|
7
7
|
constructor(messagePrefix: string, postMessage: IPostMessage<any>);
|
|
8
8
|
getLocation(): Promise<IDeviceLocation | null>;
|
|
9
9
|
getOrganizationTags(): Promise<IOrganizationTag[]>;
|
|
10
|
+
getDeviceName(): Promise<string>;
|
|
10
11
|
private getMessage;
|
|
12
|
+
private geDeviceNameFromTittle;
|
|
11
13
|
}
|
|
@@ -26,9 +26,22 @@ class DeviceInfo {
|
|
|
26
26
|
return tags;
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
+
getDeviceName() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const deviceName = this.geDeviceNameFromTittle();
|
|
32
|
+
return deviceName;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
29
35
|
getMessage(name) {
|
|
30
36
|
return [this.messagePrefix, DeviceInfo.MESSAGE_PREFIX, name].join('.');
|
|
31
37
|
}
|
|
38
|
+
geDeviceNameFromTittle() {
|
|
39
|
+
var _a;
|
|
40
|
+
const rootDocument = window.parent.document;
|
|
41
|
+
const titleElement = rootDocument.head.getElementsByTagName('title')[0];
|
|
42
|
+
const parentElement = titleElement.parentElement;
|
|
43
|
+
return (_a = parentElement.getElementsByTagName('title')[0].innerHTML) !== null && _a !== void 0 ? _a : '';
|
|
44
|
+
}
|
|
32
45
|
}
|
|
33
46
|
exports.default = DeviceInfo;
|
|
34
47
|
DeviceInfo.MESSAGE_PREFIX = 'device_info';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceInfo.js","sourceRoot":"","sources":["../../../src/FrontApplet/DeviceInfo/DeviceInfo.ts"],"names":[],"mappings":";;;;;;;;;;;AAGA,MAAqB,UAAU;IAG9B,YAAoB,aAAqB,EAAU,WAA8B;QAA7D,kBAAa,GAAb,aAAa,CAAQ;QAAU,gBAAW,GAAX,WAAW,CAAmB;IAAG,CAAC;IAExE,WAAW;;YACvB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YACvF,OAAO,QAAQ,CAAC;QACjB,CAAC;KAAA;IAEY,mBAAmB;;YAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,W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AM,CAAC,MAAM,CAAC,QAAQ,CAAC;QAC5C,MAAM,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,MAAM,aAAa,GAAG,YAAY,CAAC,aAAc,CAAC;QAClD,OAAO,MAAA,aAAa,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,mCAAI,EAAE,CAAC;IACvE,CAAC;;AA7BF,6BA8BC;AA7Bc,yBAAc,GAAW,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signageos/front-applet",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"main": "dist/bundle.js",
|
|
5
5
|
"types": "es6/bundle.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"test:coverage:types": "tsc --noEmit -p tsconfig.json",
|
|
28
28
|
"escheck": "es-check --module es5 dist/*.js",
|
|
29
29
|
"check": "npm run depcheck && npx --userconfig ./.npmrc @signageos/lib check-deps '.+' 'weinre'",
|
|
30
|
-
"depcheck": "depcheck --specials=tslint,webpack,mocha --parsers='*.ts:typescript,*.js:es6' --detectors='requireCallExpression,importDeclaration' --ignore-dirs='dist,packages' --ignores='@types/*,@signageos/codestyle,ts-node,source-map-support,mocha,depcheck,webpack-cli,@babel/polyfill,@babel/preset-env,es-check,debug,husky,lint-staged,c8,should-sinon,
|
|
30
|
+
"depcheck": "depcheck --specials=tslint,webpack,mocha --parsers='*.ts:typescript,*.js:es6' --detectors='requireCallExpression,importDeclaration' --ignore-dirs='dist,packages' --ignores='@types/*,@signageos/codestyle,ts-node,source-map-support,mocha,depcheck,webpack-cli,@babel/polyfill,@babel/preset-env,es-check,debug,husky,lint-staged,c8,should-sinon,faker,should,sinon'"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
33
33
|
"url": "git@gitlab.com:signageos/front-applet",
|
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
"tslint": "5.4.3",
|
|
65
65
|
"typescript": "4.3.5",
|
|
66
66
|
"webpack": "4.39.2",
|
|
67
|
-
"webpack-cli": "3.3.7"
|
|
67
|
+
"webpack-cli": "3.3.7",
|
|
68
|
+
"weinre": "2.0.0-pre-I0Z7U9OV"
|
|
68
69
|
},
|
|
69
70
|
"engines": {
|
|
70
71
|
"node": ">=12.0.0",
|
|
@@ -78,7 +79,6 @@
|
|
|
78
79
|
"engine-strict": false,
|
|
79
80
|
"author": "signageOS <dev@signageos.io>",
|
|
80
81
|
"license": "MIT",
|
|
81
|
-
"dependencies": {},
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"registry": "https://registry.npmjs.org/",
|
|
84
84
|
"access": "public"
|