cobrowse-agent-ui 1.0.0 → 1.1.1
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 +14 -0
- package/README.md +1 -1
- package/dist/CodeEntry.js +20 -92
- package/dist/Device.css +22 -6
- package/dist/Device.js +17 -30
- package/dist/PlatformIcon.js +34 -60
- package/dist/Session.js +23 -39
- package/dist/SmartConnectButton.css +8 -9
- package/dist/SmartConnectButton.js +4 -16
- package/dist/Stopwatch.js +12 -22
- package/dist/UserIcon.js +5 -17
- package/dist/deviceType.js +8 -26
- package/dist/i18n.js +23 -48
- package/dist/index.js +7 -55
- package/i18next-parser.config.js +3 -1
- package/icons/android.svg +3 -32
- package/icons/apple.svg +3 -18
- package/icons/globe.svg +3 -0
- package/icons/windows.svg +5 -24
- package/package.json +7 -7
- package/icons/web.svg +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.1](https://github.com/cobrowseio/cobrowse-agent-ui/compare/v1.1.0...v1.1.1) (2025-02-03)
|
|
6
|
+
|
|
7
|
+
## [1.1.0](https://github.com/cobrowseio/cobrowse-agent-ui/compare/v1.0.0...v1.1.0) (2024-01-17)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Update device status styles ([#15](https://github.com/cobrowseio/cobrowse-agent-ui/issues/15)) ([3dcac2c](https://github.com/cobrowseio/cobrowse-agent-ui/commit/3dcac2c270826fba6397d54649516455e6f12612))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* default to English dates if no locale has been set previously ([#13](https://github.com/cobrowseio/cobrowse-agent-ui/issues/13)) ([4031c25](https://github.com/cobrowseio/cobrowse-agent-ui/commit/4031c25a5da4e4fb3a169ed6960c984e233e98f2))
|
|
18
|
+
|
|
5
19
|
## [1.0.0](https://github.com/cobrowseio/cobrowse-agent-ui/compare/v0.0.2...v1.0.0) (2023-03-15)
|
|
6
20
|
|
|
7
21
|
### 0.0.2 (2023-03-15)
|
package/README.md
CHANGED
|
@@ -36,4 +36,4 @@ To add a new locale follow these steps:
|
|
|
36
36
|
- Add a new entry to the `SUPPORTED_LOCALES` constant inside `src/i18n.js`.
|
|
37
37
|
|
|
38
38
|
**Note:** ensure the locale code matches the ones provided by the
|
|
39
|
-
[
|
|
39
|
+
[date-fns library](https://github.com/date-fns/date-fns/tree/main/src/locale) as these are used to localize dates as well.
|
package/dist/CodeEntry.js
CHANGED
|
@@ -1,98 +1,52 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
require("./CodeEntry.css");
|
|
13
|
-
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
|
|
16
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
18
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
-
|
|
20
3
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
21
|
-
|
|
22
4
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
23
|
-
|
|
24
5
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
25
|
-
|
|
26
6
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
27
|
-
|
|
28
7
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
-
|
|
30
8
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
-
|
|
32
9
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
33
|
-
|
|
34
10
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
35
|
-
|
|
36
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
|
-
|
|
38
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
39
|
-
|
|
40
13
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
41
|
-
|
|
42
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
43
|
-
|
|
44
15
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
45
|
-
|
|
46
16
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
47
|
-
|
|
48
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49
|
-
|
|
50
18
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
51
|
-
|
|
52
19
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
53
|
-
|
|
54
20
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
55
|
-
|
|
56
21
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
57
|
-
|
|
58
22
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
59
|
-
|
|
23
|
+
import React, { Component } from 'react';
|
|
24
|
+
import './CodeEntry.css';
|
|
60
25
|
var CodeEntry = /*#__PURE__*/function (_Component) {
|
|
61
26
|
_inherits(CodeEntry, _Component);
|
|
62
|
-
|
|
63
27
|
var _super = _createSuper(CodeEntry);
|
|
64
|
-
|
|
65
28
|
function CodeEntry() {
|
|
66
29
|
var _this;
|
|
67
|
-
|
|
68
30
|
_classCallCheck(this, CodeEntry);
|
|
69
|
-
|
|
70
31
|
_this = _super.call(this);
|
|
71
|
-
|
|
72
32
|
_defineProperty(_assertThisInitialized(_this), "getCode", function () {
|
|
73
33
|
return _this.state.code.join('').substr(0, 6);
|
|
74
34
|
});
|
|
75
|
-
|
|
76
35
|
_defineProperty(_assertThisInitialized(_this), "setDigit", function (digit, value) {
|
|
77
36
|
if (digit > 5) return;
|
|
78
37
|
var code = _this.state.code;
|
|
79
38
|
code[digit] = value;
|
|
80
|
-
|
|
81
39
|
_this.setState({
|
|
82
40
|
code: _toConsumableArray(code)
|
|
83
41
|
});
|
|
84
|
-
|
|
85
42
|
_this.tryComplete();
|
|
86
43
|
});
|
|
87
|
-
|
|
88
44
|
_defineProperty(_assertThisInitialized(_this), "focus", function () {
|
|
89
45
|
_this.firstDigit.focus();
|
|
90
46
|
});
|
|
91
|
-
|
|
92
47
|
_defineProperty(_assertThisInitialized(_this), "isEditable", function () {
|
|
93
48
|
return !_this.state.validating;
|
|
94
49
|
});
|
|
95
|
-
|
|
96
50
|
_defineProperty(_assertThisInitialized(_this), "tryComplete", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
97
51
|
var code;
|
|
98
52
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -103,68 +57,51 @@ var CodeEntry = /*#__PURE__*/function (_Component) {
|
|
|
103
57
|
_context.next = 2;
|
|
104
58
|
break;
|
|
105
59
|
}
|
|
106
|
-
|
|
107
60
|
return _context.abrupt("return");
|
|
108
|
-
|
|
109
61
|
case 2:
|
|
110
62
|
code = _this.getCode();
|
|
111
|
-
|
|
112
63
|
if (!(code.length !== 6)) {
|
|
113
64
|
_context.next = 5;
|
|
114
65
|
break;
|
|
115
66
|
}
|
|
116
|
-
|
|
117
67
|
return _context.abrupt("return");
|
|
118
|
-
|
|
119
68
|
case 5:
|
|
120
69
|
_this.setState({
|
|
121
70
|
validating: true
|
|
122
71
|
});
|
|
123
|
-
|
|
124
72
|
_context.prev = 6;
|
|
125
73
|
_context.next = 9;
|
|
126
74
|
return _this.props.onCode(code);
|
|
127
|
-
|
|
128
75
|
case 9:
|
|
129
76
|
if (!_context.sent) {
|
|
130
77
|
_context.next = 15;
|
|
131
78
|
break;
|
|
132
79
|
}
|
|
133
|
-
|
|
134
80
|
_this.setState({
|
|
135
81
|
validating: false
|
|
136
82
|
});
|
|
137
|
-
|
|
138
83
|
_this.setState({
|
|
139
84
|
code: ['', '', '', '', '', '']
|
|
140
85
|
});
|
|
141
|
-
|
|
142
86
|
if (_this.firstDigit) _this.firstDigit.focus();
|
|
143
87
|
_context.next = 17;
|
|
144
88
|
break;
|
|
145
|
-
|
|
146
89
|
case 15:
|
|
147
90
|
_this.setState({
|
|
148
91
|
validating: false
|
|
149
92
|
});
|
|
150
|
-
|
|
151
93
|
if (_this.lastDigit) _this.lastDigit.focus();
|
|
152
|
-
|
|
153
94
|
case 17:
|
|
154
95
|
_context.next = 24;
|
|
155
96
|
break;
|
|
156
|
-
|
|
157
97
|
case 19:
|
|
158
98
|
_context.prev = 19;
|
|
159
99
|
_context.t0 = _context["catch"](6);
|
|
160
|
-
|
|
161
100
|
_this.setState({
|
|
162
101
|
validating: false
|
|
163
102
|
});
|
|
164
|
-
|
|
165
103
|
if (_this.lastDigit) _this.lastDigit.focus();
|
|
166
104
|
throw _context.t0;
|
|
167
|
-
|
|
168
105
|
case 24:
|
|
169
106
|
case "end":
|
|
170
107
|
return _context.stop();
|
|
@@ -172,7 +109,6 @@ var CodeEntry = /*#__PURE__*/function (_Component) {
|
|
|
172
109
|
}
|
|
173
110
|
}, _callee, null, [[6, 19]]);
|
|
174
111
|
})));
|
|
175
|
-
|
|
176
112
|
_defineProperty(_assertThisInitialized(_this), "handlePaste", function (event) {
|
|
177
113
|
if (!_this.isEditable()) return false;
|
|
178
114
|
var clipboardData = event.clipboardData || window.clipboardData;
|
|
@@ -183,58 +119,52 @@ var CodeEntry = /*#__PURE__*/function (_Component) {
|
|
|
183
119
|
var target = event.target;
|
|
184
120
|
digits.forEach(function (value) {
|
|
185
121
|
_this.setDigit(digit, value);
|
|
186
|
-
|
|
187
122
|
digit += 1;
|
|
188
123
|
if (target) target = target.nextSibling;
|
|
189
124
|
});
|
|
190
125
|
if (target) target.focus();
|
|
191
126
|
return event.preventDefault();
|
|
192
127
|
});
|
|
193
|
-
|
|
194
128
|
_defineProperty(_assertThisInitialized(_this), "handleOnChange", function (event) {
|
|
195
|
-
var value = event.target.value.substr(-1);
|
|
196
|
-
|
|
129
|
+
var value = event.target.value.substr(-1);
|
|
130
|
+
// validate text on any change
|
|
197
131
|
var digit = parseInt(event.target.getAttribute('data-digit'), 10);
|
|
198
|
-
|
|
199
132
|
_this.setDigit(digit, value);
|
|
200
|
-
|
|
201
133
|
if (!event.repeat && /[0-9]/.test(value)) {
|
|
202
134
|
event.target.value = '';
|
|
203
135
|
var nextSibling = event.target.nextSibling;
|
|
204
136
|
if (nextSibling) nextSibling.focus();
|
|
205
137
|
}
|
|
206
138
|
});
|
|
207
|
-
|
|
208
139
|
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (event) {
|
|
209
140
|
// on backspace on empty node go back to previous
|
|
210
141
|
if (event.target.value.length === 0 && event.keyCode === 8) {
|
|
211
|
-
if (event.target.previousSibling) event.target.previousSibling.focus();
|
|
142
|
+
if (event.target.previousSibling) event.target.previousSibling.focus();
|
|
143
|
+
// left arrow moves to previous
|
|
212
144
|
} else if (event.keyCode === 37) {
|
|
213
145
|
if (event.target.previousSibling) event.target.previousSibling.focus();
|
|
214
|
-
return event.preventDefault();
|
|
146
|
+
return event.preventDefault();
|
|
147
|
+
// right arrow moves to next
|
|
215
148
|
} else if (event.keyCode === 39) {
|
|
216
149
|
if (event.target.nextSibling) event.target.nextSibling.focus();
|
|
217
|
-
return event.preventDefault();
|
|
150
|
+
return event.preventDefault();
|
|
151
|
+
// prevent non-numeric characters that might appear in numbers (e.g 'e')
|
|
218
152
|
// but allow backspaces too
|
|
219
153
|
} else if (!event.metaKey && !event.ctrlKey && event.keyCode !== 8 && event.keyCode !== 9 && !/^[0-9]{1}$/.test(event.key)) {
|
|
220
154
|
return event.preventDefault();
|
|
221
155
|
}
|
|
222
|
-
|
|
223
156
|
return null;
|
|
224
157
|
});
|
|
225
|
-
|
|
226
158
|
_this.state = {
|
|
227
159
|
validating: false,
|
|
228
160
|
code: ['', '', '', '', '', '']
|
|
229
161
|
};
|
|
230
162
|
return _this;
|
|
231
163
|
}
|
|
232
|
-
|
|
233
164
|
_createClass(CodeEntry, [{
|
|
234
165
|
key: "render",
|
|
235
166
|
value: function render() {
|
|
236
167
|
var _this2 = this;
|
|
237
|
-
|
|
238
168
|
var keyHandlers = {
|
|
239
169
|
onKeyDown: this.handleKeyDown,
|
|
240
170
|
onChange: this.handleOnChange,
|
|
@@ -242,11 +172,11 @@ var CodeEntry = /*#__PURE__*/function (_Component) {
|
|
|
242
172
|
disabled: !this.isEditable()
|
|
243
173
|
};
|
|
244
174
|
var invalid = !this.state.validating && this.getCode().length === 6;
|
|
245
|
-
return /*#__PURE__*/
|
|
175
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
246
176
|
className: "CodeEntry"
|
|
247
|
-
}, /*#__PURE__*/
|
|
177
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
248
178
|
className: invalid ? 'invalid' : ''
|
|
249
|
-
}, /*#__PURE__*/
|
|
179
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
250
180
|
className: "bordered",
|
|
251
181
|
type: "number"
|
|
252
182
|
}, keyHandlers, {
|
|
@@ -255,31 +185,31 @@ var CodeEntry = /*#__PURE__*/function (_Component) {
|
|
|
255
185
|
ref: function ref(c) {
|
|
256
186
|
_this2.firstDigit = c;
|
|
257
187
|
}
|
|
258
|
-
})), /*#__PURE__*/
|
|
188
|
+
})), /*#__PURE__*/React.createElement("input", _extends({
|
|
259
189
|
className: "bordered",
|
|
260
190
|
type: "number"
|
|
261
191
|
}, keyHandlers, {
|
|
262
192
|
value: this.state.code[1],
|
|
263
193
|
"data-digit": 1
|
|
264
|
-
})), /*#__PURE__*/
|
|
194
|
+
})), /*#__PURE__*/React.createElement("input", _extends({
|
|
265
195
|
className: "bordered",
|
|
266
196
|
type: "number"
|
|
267
197
|
}, keyHandlers, {
|
|
268
198
|
value: this.state.code[2],
|
|
269
199
|
"data-digit": 2
|
|
270
|
-
})), /*#__PURE__*/
|
|
200
|
+
})), /*#__PURE__*/React.createElement("input", _extends({
|
|
271
201
|
className: "bordered",
|
|
272
202
|
type: "number"
|
|
273
203
|
}, keyHandlers, {
|
|
274
204
|
value: this.state.code[3],
|
|
275
205
|
"data-digit": 3
|
|
276
|
-
})), /*#__PURE__*/
|
|
206
|
+
})), /*#__PURE__*/React.createElement("input", _extends({
|
|
277
207
|
className: "bordered",
|
|
278
208
|
type: "number"
|
|
279
209
|
}, keyHandlers, {
|
|
280
210
|
value: this.state.code[4],
|
|
281
211
|
"data-digit": 4
|
|
282
|
-
})), /*#__PURE__*/
|
|
212
|
+
})), /*#__PURE__*/React.createElement("input", _extends({
|
|
283
213
|
className: "bordered",
|
|
284
214
|
type: "number"
|
|
285
215
|
}, keyHandlers, {
|
|
@@ -291,8 +221,6 @@ var CodeEntry = /*#__PURE__*/function (_Component) {
|
|
|
291
221
|
}))));
|
|
292
222
|
}
|
|
293
223
|
}]);
|
|
294
|
-
|
|
295
224
|
return CodeEntry;
|
|
296
|
-
}(
|
|
297
|
-
|
|
298
|
-
exports.default = CodeEntry;
|
|
225
|
+
}(Component);
|
|
226
|
+
export { CodeEntry as default };
|
package/dist/Device.css
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
border-left: 5px solid transparent;
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
7
|
+
position: relative;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
.Device.online {
|
|
10
|
-
|
|
10
|
+
.Device.online .device-status {
|
|
11
|
+
outline: 2px solid #C7EA30;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
.Device .last-seen {
|
|
@@ -17,12 +18,27 @@
|
|
|
17
18
|
white-space: nowrap;
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
.Device .device-status {
|
|
22
|
+
height: 36px;
|
|
23
|
+
width: 36px;
|
|
24
|
+
padding: 4px;
|
|
25
|
+
outline: 2px solid rgb(4 13 60 / 0.25);
|
|
26
|
+
border-radius: 100%;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
}
|
|
32
|
+
|
|
20
33
|
.Device .platform-icon {
|
|
21
|
-
font-size:
|
|
22
|
-
max-height:
|
|
23
|
-
|
|
34
|
+
/*font-size: 24px;*/
|
|
35
|
+
/*max-height: 24px;*/
|
|
36
|
+
height: 100%;
|
|
37
|
+
width: auto;
|
|
24
38
|
pointer-events: none;
|
|
25
|
-
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
26
42
|
}
|
|
27
43
|
|
|
28
44
|
.Device .details {
|
package/dist/Device.js
CHANGED
|
@@ -1,44 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _i18n = _interopRequireDefault(require("./i18n"));
|
|
11
|
-
|
|
12
|
-
var _PlatformIcon = _interopRequireDefault(require("./PlatformIcon.js"));
|
|
13
|
-
|
|
14
|
-
var _deviceType = _interopRequireDefault(require("./deviceType.js"));
|
|
15
|
-
|
|
16
|
-
require("./Device.css");
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
function Device(props) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import i18n from './i18n';
|
|
3
|
+
import PlatformIcon from './PlatformIcon.js';
|
|
4
|
+
import deviceType from './deviceType.js';
|
|
5
|
+
import './Device.css';
|
|
6
|
+
export default function Device(props) {
|
|
21
7
|
function renderLastSeen() {
|
|
22
8
|
if (props.device.online) {
|
|
23
|
-
return /*#__PURE__*/
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24
10
|
className: "last-seen"
|
|
25
|
-
},
|
|
11
|
+
}, i18n.t('Online'));
|
|
26
12
|
} else {
|
|
27
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
28
14
|
className: "last-seen"
|
|
29
|
-
},
|
|
30
|
-
date: props.device.last_active
|
|
15
|
+
}, i18n.t('Last seen {{date, dateRelative}}', {
|
|
16
|
+
date: new Date(props.device.last_active)
|
|
31
17
|
}));
|
|
32
18
|
}
|
|
33
19
|
}
|
|
34
|
-
|
|
35
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
36
21
|
style: props.style,
|
|
37
22
|
className: "Device ".concat(props.device.online ? 'online' : '', " ").concat(props.device.connectable ? 'connectable' : '')
|
|
38
|
-
}, /*#__PURE__*/
|
|
23
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: "device-status"
|
|
25
|
+
}, /*#__PURE__*/React.createElement(PlatformIcon, {
|
|
39
26
|
platform: props.device.device.platform,
|
|
40
27
|
className: "platform-icon"
|
|
41
|
-
}), /*#__PURE__*/
|
|
28
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
42
29
|
className: "details"
|
|
43
|
-
}, (
|
|
30
|
+
}, deviceType(props.device.device), renderLastSeen()), props.children);
|
|
44
31
|
}
|
package/dist/PlatformIcon.js
CHANGED
|
@@ -1,118 +1,92 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = PlatformIcon;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
require("./PlatformIcon.css");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
-
d: "
|
|
2
|
+
import React from 'react';
|
|
3
|
+
var IconGlobe = function IconGlobe(props) {
|
|
4
|
+
return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("path", {
|
|
5
|
+
d: "M14.917 14.492a1.672 1.672 0 0 0-1.584-1.159H12.5v-2.5a.833.833 0 0 0-.833-.833h-5V8.333h1.666a.833.833 0 0 0 .834-.833V5.833h1.666A1.667 1.667 0 0 0 12.5 4.167v-.342a6.654 6.654 0 0 1 2.417 10.667Zm-5.75 2.116A6.657 6.657 0 0 1 3.333 10c0-.517.067-1.017.175-1.492L7.5 12.5v.833A1.667 1.667 0 0 0 9.167 15M10 1.667a8.333 8.333 0 1 0 0 16.666 8.333 8.333 0 0 0 0-16.666Z",
|
|
6
|
+
fill: "currentColor"
|
|
19
7
|
}));
|
|
20
8
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
xmlSpace: "preserve"
|
|
9
|
+
IconGlobe.defaultProps = {
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
26
13
|
};
|
|
27
|
-
|
|
28
14
|
var IconApple = function IconApple(props) {
|
|
29
|
-
return /*#__PURE__*/
|
|
30
|
-
d: "
|
|
31
|
-
|
|
32
|
-
d: "M212.101.002c-15.763.642-34.672 10.345-45.974 23.583-9.605 11.127-18.988 29.679-16.516 48.379a2.499 2.499 0 0 0 2.284 2.164c1.064.083 2.15.125 3.232.126 15.413 0 32.04-8.527 43.395-22.257 11.951-14.498 17.994-33.104 16.166-49.77a2.515 2.515 0 0 0-2.587-2.225z"
|
|
15
|
+
return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("path", {
|
|
16
|
+
d: "M14.208 16.9c-.816.792-1.708.667-2.566.292-.909-.384-1.742-.4-2.7 0-1.2.516-1.834.366-2.55-.292-4.067-4.192-3.467-10.575 1.15-10.808 1.125.058 1.908.616 2.566.666.984-.2 1.925-.775 2.975-.7 1.259.1 2.209.6 2.834 1.5-2.6 1.559-1.984 4.984.4 5.942-.475 1.25-1.092 2.492-2.117 3.408l.008-.008ZM10.025 6.042C9.9 4.183 11.408 2.65 13.142 2.5c.241 2.15-1.95 3.75-3.117 3.542Z",
|
|
17
|
+
fill: "currentColor"
|
|
33
18
|
}));
|
|
34
19
|
};
|
|
35
|
-
|
|
36
20
|
IconApple.defaultProps = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
viewBox: "0 0 20 20",
|
|
22
|
+
fill: "none",
|
|
23
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
40
24
|
};
|
|
41
|
-
|
|
42
25
|
var IconAndroid = function IconAndroid(props) {
|
|
43
|
-
return /*#__PURE__*/
|
|
44
|
-
d: "
|
|
26
|
+
return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("path", {
|
|
27
|
+
d: "M.833 15a9.03 9.03 0 0 1 1.365-4.104 8.67 8.67 0 0 1 3.135-2.98L3.792 5.25a.45.45 0 0 1-.063-.396.501.501 0 0 1 .27-.312.439.439 0 0 1 .376-.042c.139.042.25.125.333.25L6.25 7.417a9.616 9.616 0 0 1 3.75-.75c1.306 0 2.556.25 3.75.75l1.542-2.667a.597.597 0 0 1 .333-.25.439.439 0 0 1 .375.042c.139.07.23.173.27.312a.45.45 0 0 1-.062.396l-1.541 2.667a8.661 8.661 0 0 1 3.135 2.979A9.044 9.044 0 0 1 19.167 15H.833Zm5-2.292c.292 0 .539-.1.74-.302.202-.202.302-.448.302-.74 0-.291-.1-.538-.303-.74a1.002 1.002 0 0 0-.739-.301c-.291 0-.538.1-.74.303a1.003 1.003 0 0 0-.301.739c0 .291.1.538.302.74.202.201.448.302.74.301Zm8.334 0c.291 0 .538-.1.74-.302.201-.202.302-.448.301-.74 0-.291-.1-.538-.302-.74a1.003 1.003 0 0 0-.74-.301c-.291 0-.538.1-.74.303a1.003 1.003 0 0 0-.301.739c0 .291.1.538.302.74.202.201.449.302.74.301Z",
|
|
28
|
+
fill: "currentColor"
|
|
45
29
|
}));
|
|
46
30
|
};
|
|
47
|
-
|
|
48
31
|
IconAndroid.defaultProps = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
viewBox: "0 0 20 20",
|
|
33
|
+
fill: "none",
|
|
34
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
52
35
|
};
|
|
53
|
-
|
|
54
36
|
var IconWindows = function IconWindows(props) {
|
|
55
|
-
return /*#__PURE__*/
|
|
56
|
-
d: "
|
|
37
|
+
return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("path", {
|
|
38
|
+
d: "M5.216 8.219 16.28 6.695v10.69H5.214V8.22l.002-.002Zm0 19.563 11.065 1.525v-10.56H5.214l.002 9.035Zm12.282 1.687L32.216 31.5V18.747H17.498v10.722Zm0-22.938v10.854h14.718V4.5L17.498 6.531Z",
|
|
39
|
+
fill: "currentColor"
|
|
57
40
|
}));
|
|
58
41
|
};
|
|
59
|
-
|
|
60
42
|
IconWindows.defaultProps = {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
43
|
+
viewBox: "0 0 37 36",
|
|
44
|
+
fill: "none",
|
|
45
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
64
46
|
};
|
|
65
|
-
|
|
66
47
|
var IconDefault = function IconDefault(props) {
|
|
67
|
-
return /*#__PURE__*/
|
|
48
|
+
return /*#__PURE__*/React.createElement("svg", props, /*#__PURE__*/React.createElement("path", {
|
|
68
49
|
style: {
|
|
69
50
|
fill: "#020202"
|
|
70
51
|
},
|
|
71
52
|
d: "M206.759 332.99H39.225c-3.894 0-7.065-3.173-7.065-7.067V53.353c0-3.893 3.172-7.065 7.065-7.065h401.631c3.895 0 7.065 3.172 7.065 7.065v59.696c11.763 1.389 22.785 5.244 32.159 11.581V53.353c0-21.63-17.602-39.225-39.225-39.225H39.225C17.602 14.128 0 31.722 0 53.353v272.569c0 21.631 17.602 39.227 39.225 39.227h134.62v52.581h-21.229c-13.316 0-24.12 10.796-24.12 24.12 0 13.324 10.804 24.12 24.12 24.12h67.71c-8.463-11.902-13.566-26.35-13.566-42.037V332.99z"
|
|
72
|
-
}), /*#__PURE__*/
|
|
53
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
73
54
|
style: {
|
|
74
55
|
fill: "#020202"
|
|
75
56
|
},
|
|
76
57
|
d: "M341.739 441.645v-34.742h-70.662V184.999c0-4.681 3.8-8.489 8.479-8.489h159.887c4.679 0 8.478 3.808 8.478 8.489v68.676h12.046c7.364 0 14.179 2.127 20.113 5.597v-74.273c0-22.417-18.23-40.648-40.638-40.648H279.556c-22.407 0-40.638 18.231-40.638 40.648v238.933c0 22.417 18.23 40.647 40.638 40.647h69.438c-4.428-6.359-7.255-15.22-7.255-22.934z"
|
|
77
|
-
}), /*#__PURE__*/
|
|
58
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
78
59
|
style: {
|
|
79
60
|
fill: "#020202"
|
|
80
61
|
},
|
|
81
62
|
d: "M459.967 273.775h-77.996c-11.104 0-20.132 9.037-20.132 20.138v147.732c0 11.101 9.028 20.131 20.132 20.131h77.996c11.102 0 20.13-9.03 20.13-20.131V293.912c0-11.101-9.029-20.137-20.13-20.137zm-74.009 24.119h70.019v127.703h-70.019V297.894zm35.019 154.099c-2.215 0-4.193-.896-5.7-2.277-1.713-1.555-2.812-3.739-2.812-6.228 0-4.694 3.801-8.495 8.512-8.495 4.679 0 8.479 3.801 8.479 8.495 0 2.489-1.1 4.672-2.795 6.228-1.509 1.382-3.487 2.277-5.684 2.277z"
|
|
82
63
|
}));
|
|
83
64
|
};
|
|
84
|
-
|
|
85
65
|
IconDefault.defaultProps = {
|
|
86
66
|
xmlns: "http://www.w3.org/2000/svg",
|
|
87
67
|
viewBox: "0 0 480.097 480.097",
|
|
88
68
|
xmlSpace: "preserve"
|
|
89
69
|
};
|
|
90
|
-
|
|
70
|
+
import './PlatformIcon.css';
|
|
91
71
|
function icon(platform) {
|
|
92
72
|
switch (platform) {
|
|
93
73
|
case 'web':
|
|
94
|
-
return
|
|
95
|
-
|
|
74
|
+
return IconGlobe;
|
|
96
75
|
case 'ios':
|
|
97
76
|
return IconApple;
|
|
98
|
-
|
|
99
77
|
case 'macos':
|
|
100
78
|
return IconApple;
|
|
101
|
-
|
|
102
79
|
case 'android':
|
|
103
80
|
return IconAndroid;
|
|
104
|
-
|
|
105
81
|
case 'windows':
|
|
106
82
|
return IconWindows;
|
|
107
|
-
|
|
108
83
|
default:
|
|
109
84
|
return IconDefault;
|
|
110
85
|
}
|
|
111
86
|
}
|
|
112
|
-
|
|
113
|
-
function PlatformIcon(props) {
|
|
87
|
+
export default function PlatformIcon(props) {
|
|
114
88
|
var Icon = icon(props.platform);
|
|
115
|
-
return /*#__PURE__*/
|
|
89
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({
|
|
116
90
|
fill: "currentColor"
|
|
117
91
|
}, props, {
|
|
118
92
|
className: "PlatformIcon ".concat(props.className || '')
|
package/dist/Session.js
CHANGED
|
@@ -1,55 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _deviceType = _interopRequireDefault(require("./deviceType.js"));
|
|
11
|
-
|
|
12
|
-
var _Stopwatch = _interopRequireDefault(require("./Stopwatch.js"));
|
|
13
|
-
|
|
14
|
-
var _i18n = _interopRequireDefault(require("./i18n"));
|
|
15
|
-
|
|
16
|
-
var _reactI18next = require("react-i18next");
|
|
17
|
-
|
|
18
|
-
require("./Session.css");
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
function Session(props) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import deviceType from './deviceType.js';
|
|
3
|
+
import Stopwatch from './Stopwatch.js';
|
|
4
|
+
import i18n from './i18n';
|
|
5
|
+
import { Trans } from 'react-i18next';
|
|
6
|
+
import './Session.css';
|
|
7
|
+
export default function Session(props) {
|
|
23
8
|
function openRecording() {
|
|
24
9
|
if (props.openRecording) props.openRecording(props.session);
|
|
25
10
|
}
|
|
26
|
-
|
|
27
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
28
12
|
style: props.style,
|
|
29
13
|
onClick: props.onClick,
|
|
30
14
|
className: "Session ".concat(props.className || '')
|
|
31
|
-
}, /*#__PURE__*/
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32
16
|
className: "details"
|
|
33
|
-
}, /*#__PURE__*/
|
|
34
|
-
i18n:
|
|
35
|
-
}, /*#__PURE__*/
|
|
17
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Trans, {
|
|
18
|
+
i18n: i18n
|
|
19
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
36
20
|
className: "device-prefix"
|
|
37
21
|
}, "Connected to "), {
|
|
38
|
-
deviceType: (
|
|
39
|
-
})), /*#__PURE__*/
|
|
22
|
+
deviceType: deviceType(props.session.device)
|
|
23
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
40
24
|
className: "subdetails"
|
|
41
|
-
}, /*#__PURE__*/
|
|
25
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42
26
|
className: "activated"
|
|
43
|
-
},
|
|
44
|
-
date: props.session.activated
|
|
45
|
-
})), props.session.state === 'ended' && props.session.recorded ? /*#__PURE__*/
|
|
27
|
+
}, i18n.t('{{date, dateRelative}}', {
|
|
28
|
+
date: new Date(props.session.activated)
|
|
29
|
+
})), props.session.state === 'ended' && props.session.recorded ? /*#__PURE__*/React.createElement("div", {
|
|
46
30
|
className: "recorded",
|
|
47
31
|
onClick: openRecording
|
|
48
|
-
},
|
|
32
|
+
}, i18n.t('Recorded')) : null)), props.session.state === 'ended' ? /*#__PURE__*/React.createElement(Stopwatch, {
|
|
49
33
|
className: "duration",
|
|
50
|
-
start: props.session.activated,
|
|
51
|
-
end: props.session.ended ||
|
|
52
|
-
}) : /*#__PURE__*/
|
|
34
|
+
start: new Date(props.session.activated),
|
|
35
|
+
end: new Date(props.session.ended || Date.now())
|
|
36
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
53
37
|
className: "active"
|
|
54
|
-
},
|
|
38
|
+
}, i18n.t('Active')), props.children);
|
|
55
39
|
}
|
|
@@ -2,19 +2,18 @@
|
|
|
2
2
|
.SmartConnectButton {
|
|
3
3
|
margin: 3px;
|
|
4
4
|
display: inline-block;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
padding: 7px 14px;
|
|
5
|
+
background: #F6F4F8;
|
|
6
|
+
padding: 12px 16px;
|
|
8
7
|
cursor: not-allowed;
|
|
9
|
-
border-radius:
|
|
8
|
+
border-radius: 4px;
|
|
10
9
|
font-weight: 600;
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
opacity: 0.6;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
.SmartConnectButton.connectable {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
color: white;
|
|
15
|
+
background: #040D3C;
|
|
16
|
+
color: #ffffff;
|
|
19
17
|
cursor: pointer;
|
|
18
|
+
opacity: 1;
|
|
20
19
|
}
|
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = SmartConnectButton;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
require("./SmartConnectButton.css");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function SmartConnectButton(props) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './SmartConnectButton.css';
|
|
3
|
+
export default function SmartConnectButton(props) {
|
|
15
4
|
function onClick() {
|
|
16
5
|
if (props.device.connectable && props.onClick) props.onClick(props.device);
|
|
17
6
|
}
|
|
18
|
-
|
|
19
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
7
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
8
|
className: "SmartConnectButton ".concat(props.device.online ? 'online' : '', " ").concat(props.device.connectable ? 'connectable' : ''),
|
|
21
9
|
onClick: onClick
|
|
22
10
|
}, props.label || 'Connect');
|
package/dist/Stopwatch.js
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function Stopwatch(props) {
|
|
15
|
-
var start = (0, _moment.default)(props.start || 0);
|
|
16
|
-
var end = (0, _moment.default)(props.end || Date.now());
|
|
17
|
-
var ms = (0, _moment.default)(end).diff(start);
|
|
18
|
-
|
|
19
|
-
var delta = _moment.default.duration(ms);
|
|
20
|
-
|
|
21
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { differenceInMilliseconds, intervalToDuration, format } from 'date-fns';
|
|
3
|
+
export default function Stopwatch(props) {
|
|
4
|
+
var start = props.start || new Date(0);
|
|
5
|
+
var end = props.end || new Date();
|
|
6
|
+
var ms = differenceInMilliseconds(end, start);
|
|
7
|
+
var duration = intervalToDuration({
|
|
8
|
+
start: start,
|
|
9
|
+
end: end
|
|
10
|
+
});
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22
12
|
style: props.style,
|
|
23
13
|
className: "Stopwatch ".concat(props.className || '')
|
|
24
|
-
},
|
|
14
|
+
}, duration.hours > 0 ? /*#__PURE__*/React.createElement("span", null, duration.hours, /*#__PURE__*/React.createElement("span", null, ":")) : null, /*#__PURE__*/React.createElement("span", null, format(new Date(ms), 'mm:ss')));
|
|
25
15
|
}
|
package/dist/UserIcon.js
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = UserIcon;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
require("./UserIcon.css");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function UserIcon(props) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './UserIcon.css';
|
|
3
|
+
export default function UserIcon(props) {
|
|
15
4
|
function initials() {
|
|
16
5
|
if (!props.user) return '';
|
|
17
6
|
if (!props.user.name) return '';
|
|
@@ -20,14 +9,13 @@ function UserIcon(props) {
|
|
|
20
9
|
return i.toUpperCase().charAt(0);
|
|
21
10
|
}).join('').substr(0, 2);
|
|
22
11
|
}
|
|
23
|
-
|
|
24
12
|
if (!props.user) return null;
|
|
25
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
14
|
className: "UserIcon ".concat(props.className || ''),
|
|
27
15
|
title: props.user.name || null,
|
|
28
16
|
style: {
|
|
29
17
|
backgroundImage: props.user.picture ? "url(".concat(props.user.picture || '', ")") : undefined,
|
|
30
18
|
backgroundColor: props.user.colour
|
|
31
19
|
}
|
|
32
|
-
}, /*#__PURE__*/
|
|
20
|
+
}, /*#__PURE__*/React.createElement("span", null, initials()));
|
|
33
21
|
}
|
package/dist/deviceType.js
CHANGED
|
@@ -1,48 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = deviceType;
|
|
7
|
-
|
|
8
|
-
var _uaParserJs = _interopRequireDefault(require("ua-parser-js"));
|
|
9
|
-
|
|
10
|
-
var _i18n = _interopRequireDefault(require("./i18n"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function deviceType(_ref) {
|
|
1
|
+
import parser from 'ua-parser-js';
|
|
2
|
+
import i18n from './i18n';
|
|
3
|
+
export default function deviceType(_ref) {
|
|
15
4
|
var platform = _ref.platform,
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
device = _ref.device;
|
|
18
6
|
var translateDevice = function translateDevice(device) {
|
|
19
|
-
return
|
|
7
|
+
return i18n.t('{{device}} Device', {
|
|
20
8
|
device: device
|
|
21
9
|
});
|
|
22
10
|
};
|
|
23
|
-
|
|
24
11
|
switch (platform) {
|
|
25
12
|
case 'web':
|
|
26
13
|
{
|
|
27
|
-
var ua = (
|
|
28
|
-
return
|
|
14
|
+
var ua = parser(device);
|
|
15
|
+
return i18n.t('{{browser}} on {{os}}', {
|
|
29
16
|
browser: ua.browser.name,
|
|
30
17
|
os: ua.os.name
|
|
31
18
|
});
|
|
32
19
|
}
|
|
33
|
-
|
|
34
20
|
case 'ios':
|
|
35
21
|
return translateDevice('iOS');
|
|
36
|
-
|
|
37
22
|
case 'android':
|
|
38
23
|
return translateDevice('Android');
|
|
39
|
-
|
|
40
24
|
case 'windows':
|
|
41
25
|
return translateDevice('Windows');
|
|
42
|
-
|
|
43
26
|
case 'macos':
|
|
44
|
-
return translateDevice('
|
|
45
|
-
|
|
27
|
+
return translateDevice('macOS');
|
|
46
28
|
default:
|
|
47
29
|
return platform;
|
|
48
30
|
}
|
package/dist/i18n.js
CHANGED
|
@@ -1,67 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _reactI18next = require("react-i18next");
|
|
11
|
-
|
|
12
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
13
|
-
|
|
14
|
-
require("moment/locale/es");
|
|
15
|
-
|
|
16
|
-
require("moment/locale/fr");
|
|
17
|
-
|
|
18
|
-
var _translation = _interopRequireDefault(require("./locales/en-us/translation.json"));
|
|
19
|
-
|
|
20
|
-
var _translation2 = _interopRequireDefault(require("./locales/es/translation.json"));
|
|
21
|
-
|
|
22
|
-
var _translation3 = _interopRequireDefault(require("./locales/fr/translation.json"));
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
1
|
+
var _dateLocales;
|
|
2
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
import { createInstance } from 'i18next';
|
|
4
|
+
import { initReactI18next } from 'react-i18next';
|
|
5
|
+
import { formatDistanceToNow } from 'date-fns';
|
|
6
|
+
import { enUS, es, fr } from 'date-fns/locale';
|
|
7
|
+
import localeEnUS from './locales/en-us/translation.json';
|
|
8
|
+
import localeEs from './locales/es/translation.json';
|
|
9
|
+
import localeFr from './locales/fr/translation.json';
|
|
26
10
|
var englishUS = 'en-us';
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var SUPPORTED_LOCALES = [englishUS, spanish, french];
|
|
30
|
-
var i18n = (0, _i18next.createInstance)({
|
|
11
|
+
var dateLocales = (_dateLocales = {}, _defineProperty(_dateLocales, englishUS, enUS), _defineProperty(_dateLocales, "es", es), _defineProperty(_dateLocales, "fr", fr), _dateLocales);
|
|
12
|
+
var i18n = createInstance({
|
|
31
13
|
fallbackLng: englishUS,
|
|
32
14
|
debug: process.env.NODE_ENV === 'development',
|
|
33
15
|
lowerCaseLng: true,
|
|
34
16
|
interpolation: {
|
|
35
17
|
escapeValue: false,
|
|
36
18
|
// not needed for react as it escapes by default
|
|
37
|
-
format: function format(value, _format) {
|
|
38
|
-
if (_format === 'dateRelative' &&
|
|
39
|
-
|
|
19
|
+
format: function format(value, _format, lng) {
|
|
20
|
+
if (_format === 'dateRelative' && value instanceof Date) {
|
|
21
|
+
var locale = dateLocales[lng] || enUS;
|
|
22
|
+
return formatDistanceToNow(value, {
|
|
23
|
+
addSuffix: true,
|
|
24
|
+
locale: locale
|
|
25
|
+
});
|
|
40
26
|
}
|
|
41
27
|
}
|
|
42
28
|
},
|
|
43
29
|
resources: {
|
|
44
30
|
'en-us': {
|
|
45
|
-
translation:
|
|
31
|
+
translation: localeEnUS
|
|
46
32
|
},
|
|
47
33
|
es: {
|
|
48
|
-
translation:
|
|
34
|
+
translation: localeEs
|
|
49
35
|
},
|
|
50
36
|
fr: {
|
|
51
|
-
translation:
|
|
37
|
+
translation: localeFr
|
|
52
38
|
}
|
|
53
39
|
}
|
|
54
40
|
});
|
|
55
|
-
i18n.use(
|
|
56
|
-
|
|
57
|
-
// Fall back to US English if we don't currently support the selected language
|
|
58
|
-
if (SUPPORTED_LOCALES.indexOf(language) === -1) {
|
|
59
|
-
_moment.default.locale(englishUS);
|
|
60
|
-
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
_moment.default.locale(language);
|
|
65
|
-
});
|
|
66
|
-
var _default = i18n;
|
|
67
|
-
exports.default = _default;
|
|
41
|
+
i18n.use(initReactI18next).init();
|
|
42
|
+
export default i18n;
|
package/dist/index.js
CHANGED
|
@@ -1,55 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _CodeEntry.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "Device", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _Device.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "PlatformIcon", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _PlatformIcon.default;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "Session", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _Session.default;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "SmartConnectButton", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _SmartConnectButton.default;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "i18n", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _i18n.default;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
var _CodeEntry = _interopRequireDefault(require("./CodeEntry"));
|
|
44
|
-
|
|
45
|
-
var _PlatformIcon = _interopRequireDefault(require("./PlatformIcon"));
|
|
46
|
-
|
|
47
|
-
var _Device = _interopRequireDefault(require("./Device"));
|
|
48
|
-
|
|
49
|
-
var _Session = _interopRequireDefault(require("./Session"));
|
|
50
|
-
|
|
51
|
-
var _SmartConnectButton = _interopRequireDefault(require("./SmartConnectButton"));
|
|
52
|
-
|
|
53
|
-
var _i18n = _interopRequireDefault(require("./i18n"));
|
|
54
|
-
|
|
55
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1
|
+
import CodeEntry from './CodeEntry';
|
|
2
|
+
import PlatformIcon from './PlatformIcon';
|
|
3
|
+
import Device from './Device';
|
|
4
|
+
import Session from './Session';
|
|
5
|
+
import SmartConnectButton from './SmartConnectButton';
|
|
6
|
+
import i18n from './i18n';
|
|
7
|
+
export { CodeEntry, PlatformIcon, Device, SmartConnectButton, Session, i18n };
|
package/i18next-parser.config.js
CHANGED
|
@@ -2,7 +2,9 @@ module.exports = {
|
|
|
2
2
|
locales: ['en-us', 'es', 'fr'],
|
|
3
3
|
namespaceSeparator: false,
|
|
4
4
|
keySeparator: false,
|
|
5
|
-
|
|
5
|
+
defaultValue: function (locale, namespace, key, value) {
|
|
6
|
+
return key
|
|
7
|
+
},
|
|
6
8
|
verbose: true,
|
|
7
9
|
output: 'src/locales/$LOCALE/$NAMESPACE.json',
|
|
8
10
|
lexers: {
|
package/icons/android.svg
CHANGED
|
@@ -1,32 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
viewBox="0 0 553.048 553.048" xml:space="preserve">
|
|
5
|
-
<g>
|
|
6
|
-
<g>
|
|
7
|
-
<path d="M76.774,179.141c-9.529,0-17.614,3.323-24.26,9.969c-6.646,6.646-9.97,14.621-9.97,23.929v142.914
|
|
8
|
-
c0,9.541,3.323,17.619,9.97,24.266c6.646,6.646,14.731,9.97,24.26,9.97c9.522,0,17.558-3.323,24.101-9.97
|
|
9
|
-
c6.53-6.646,9.804-14.725,9.804-24.266V213.039c0-9.309-3.323-17.283-9.97-23.929C94.062,182.464,86.082,179.141,76.774,179.141z"
|
|
10
|
-
/>
|
|
11
|
-
<path d="M351.972,50.847L375.57,7.315c1.549-2.882,0.998-5.092-1.658-6.646c-2.883-1.34-5.098-0.661-6.646,1.989l-23.928,43.88
|
|
12
|
-
c-21.055-9.309-43.324-13.972-66.807-13.972c-23.488,0-45.759,4.664-66.806,13.972l-23.929-43.88
|
|
13
|
-
c-1.555-2.65-3.77-3.323-6.646-1.989c-2.662,1.561-3.213,3.764-1.658,6.646l23.599,43.532
|
|
14
|
-
c-23.929,12.203-42.987,29.198-57.167,51.022c-14.18,21.836-21.273,45.698-21.273,71.628h307.426
|
|
15
|
-
c0-25.924-7.094-49.787-21.273-71.628C394.623,80.045,375.675,63.05,351.972,50.847z M215.539,114.165
|
|
16
|
-
c-2.552,2.558-5.6,3.831-9.143,3.831c-3.55,0-6.536-1.273-8.972-3.831c-2.436-2.546-3.654-5.582-3.654-9.137
|
|
17
|
-
c0-3.543,1.218-6.585,3.654-9.137c2.436-2.546,5.429-3.819,8.972-3.819s6.591,1.273,9.143,3.819
|
|
18
|
-
c2.546,2.558,3.825,5.594,3.825,9.137C219.357,108.577,218.079,111.619,215.539,114.165z M355.625,114.165
|
|
19
|
-
c-2.441,2.558-5.434,3.831-8.971,3.831c-3.551,0-6.598-1.273-9.145-3.831c-2.551-2.546-3.824-5.582-3.824-9.137
|
|
20
|
-
c0-3.543,1.273-6.585,3.824-9.137c2.547-2.546,5.594-3.819,9.145-3.819c3.543,0,6.529,1.273,8.971,3.819
|
|
21
|
-
c2.438,2.558,3.654,5.594,3.654,9.137C359.279,108.577,358.062,111.619,355.625,114.165z"/>
|
|
22
|
-
<path d="M123.971,406.804c0,10.202,3.543,18.838,10.63,25.925c7.093,7.087,15.729,10.63,25.924,10.63h24.596l0.337,75.454
|
|
23
|
-
c0,9.528,3.323,17.619,9.969,24.266s14.627,9.97,23.929,9.97c9.523,0,17.613-3.323,24.26-9.97s9.97-14.737,9.97-24.266v-75.447
|
|
24
|
-
h45.864v75.447c0,9.528,3.322,17.619,9.969,24.266s14.73,9.97,24.26,9.97c9.523,0,17.613-3.323,24.26-9.97
|
|
25
|
-
s9.969-14.737,9.969-24.266v-75.447h24.928c9.969,0,18.494-3.544,25.594-10.631c7.086-7.087,10.631-15.723,10.631-25.924V185.45
|
|
26
|
-
H123.971V406.804z"/>
|
|
27
|
-
<path d="M476.275,179.141c-9.309,0-17.283,3.274-23.93,9.804c-6.646,6.542-9.969,14.578-9.969,24.094v142.914
|
|
28
|
-
c0,9.541,3.322,17.619,9.969,24.266s14.627,9.97,23.93,9.97c9.523,0,17.613-3.323,24.26-9.97s9.969-14.725,9.969-24.266V213.039
|
|
29
|
-
c0-9.517-3.322-17.552-9.969-24.094C493.888,182.415,485.798,179.141,476.275,179.141z"/>
|
|
30
|
-
</g>
|
|
31
|
-
</g>
|
|
32
|
-
</svg>
|
|
1
|
+
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0.833252 15C0.958252 13.5139 1.41325 12.1458 2.19825 10.8958C2.98325 9.64583 4.02825 8.65278 5.33325 7.91667L3.79159 5.25C3.70825 5.125 3.68742 4.99306 3.72909 4.85417C3.77075 4.71528 3.86103 4.61111 3.99992 4.54167C4.11103 4.47222 4.23603 4.45833 4.37492 4.5C4.51381 4.54167 4.62492 4.625 4.70825 4.75L6.24992 7.41667C7.44436 6.91667 8.69436 6.66667 9.99992 6.66667C11.3055 6.66667 12.5555 6.91667 13.7499 7.41667L15.2916 4.75C15.3749 4.625 15.486 4.54167 15.6249 4.5C15.7638 4.45833 15.8888 4.47222 15.9999 4.54167C16.1388 4.61111 16.2291 4.71528 16.2708 4.85417C16.3124 4.99306 16.2916 5.125 16.2083 5.25L14.6666 7.91667C15.9721 8.65278 17.0171 9.64583 17.8016 10.8958C18.586 12.1458 19.041 13.5139 19.1666 15H0.833252ZM5.83325 12.7083C6.12492 12.7083 6.37159 12.6075 6.57325 12.4058C6.77492 12.2042 6.87547 11.9578 6.87492 11.6667C6.87492 11.375 6.77409 11.1283 6.57242 10.9267C6.37075 10.725 6.12436 10.6244 5.83325 10.625C5.54159 10.625 5.29492 10.7258 5.09325 10.9275C4.89159 11.1292 4.79103 11.3756 4.79159 11.6667C4.79159 11.9583 4.89242 12.205 5.09409 12.4067C5.29575 12.6083 5.54214 12.7089 5.83325 12.7083ZM14.1666 12.7083C14.4583 12.7083 14.7049 12.6075 14.9066 12.4058C15.1083 12.2042 15.2088 11.9578 15.2083 11.6667C15.2083 11.375 15.1074 11.1283 14.9058 10.9267C14.7041 10.725 14.4577 10.6244 14.1666 10.625C13.8749 10.625 13.6283 10.7258 13.4266 10.9275C13.2249 11.1292 13.1244 11.3756 13.1249 11.6667C13.1249 11.9583 13.2258 12.205 13.4274 12.4067C13.6291 12.6083 13.8755 12.7089 14.1666 12.7083Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
package/icons/apple.svg
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<g>
|
|
5
|
-
<path d="M40.738,112.119c-25.785,44.745-9.393,112.648,19.121,153.82C74.092,286.523,88.502,305,108.239,305
|
|
6
|
-
c0.372,0,0.745-0.007,1.127-0.022c9.273-0.37,15.974-3.225,22.453-5.984c7.274-3.1,14.797-6.305,26.597-6.305
|
|
7
|
-
c11.226,0,18.39,3.101,25.318,6.099c6.828,2.954,13.861,6.01,24.253,5.815c22.232-0.414,35.882-20.352,47.925-37.941
|
|
8
|
-
c12.567-18.365,18.871-36.196,20.998-43.01l0.086-0.271c0.405-1.211-0.167-2.533-1.328-3.066c-0.032-0.015-0.15-0.064-0.183-0.078
|
|
9
|
-
c-3.915-1.601-38.257-16.836-38.618-58.36c-0.335-33.736,25.763-51.601,30.997-54.839l0.244-0.152
|
|
10
|
-
c0.567-0.365,0.962-0.944,1.096-1.606c0.134-0.661-0.006-1.349-0.386-1.905c-18.014-26.362-45.624-30.335-56.74-30.813
|
|
11
|
-
c-1.613-0.161-3.278-0.242-4.95-0.242c-13.056,0-25.563,4.931-35.611,8.893c-6.936,2.735-12.927,5.097-17.059,5.097
|
|
12
|
-
c-4.643,0-10.668-2.391-17.645-5.159c-9.33-3.703-19.905-7.899-31.1-7.899c-0.267,0-0.53,0.003-0.789,0.008
|
|
13
|
-
C78.894,73.643,54.298,88.535,40.738,112.119z"/>
|
|
14
|
-
<path d="M212.101,0.002c-15.763,0.642-34.672,10.345-45.974,23.583c-9.605,11.127-18.988,29.679-16.516,48.379
|
|
15
|
-
c0.155,1.17,1.107,2.073,2.284,2.164c1.064,0.083,2.15,0.125,3.232,0.126c15.413,0,32.04-8.527,43.395-22.257
|
|
16
|
-
c11.951-14.498,17.994-33.104,16.166-49.77C214.544,0.921,213.395-0.049,212.101,0.002z"/>
|
|
17
|
-
</g>
|
|
18
|
-
</svg>
|
|
1
|
+
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M14.2084 16.9C13.3917 17.6917 12.5001 17.5667 11.6417 17.1917C10.7334 16.8083 9.90005 16.7917 8.94172 17.1917C7.74172 17.7083 7.10839 17.5583 6.39172 16.9C2.32506 12.7083 2.92506 6.325 7.54172 6.09167C8.66672 6.15 9.45006 6.70833 10.1084 6.75833C11.0917 6.55833 12.0334 5.98333 13.0834 6.05833C14.3417 6.15833 15.2917 6.65833 15.9167 7.55833C13.3167 9.11667 13.9334 12.5417 16.3167 13.5C15.8417 14.75 15.2251 15.9917 14.2001 16.9083L14.2084 16.9ZM10.0251 6.04167C9.90005 4.18333 11.4084 2.65 13.1417 2.5C13.3834 4.65 11.1917 6.25 10.0251 6.04167Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
package/icons/globe.svg
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M14.9167 14.4917C14.7001 13.8251 14.0751 13.3334 13.3334 13.3334H12.5001V10.8334C12.5001 10.6124 12.4123 10.4004 12.256 10.2442C12.0997 10.0879 11.8878 10.0001 11.6667 10.0001H6.66675V8.33341H8.33341C8.55443 8.33341 8.76639 8.24562 8.92267 8.08934C9.07895 7.93306 9.16675 7.7211 9.16675 7.50008V5.83341H10.8334C11.2754 5.83341 11.6994 5.65782 12.0119 5.34526C12.3245 5.0327 12.5001 4.60878 12.5001 4.16675V3.82508C13.4971 4.22705 14.382 4.86464 15.0788 5.68328C15.7756 6.50191 16.2637 7.4772 16.5012 8.52567C16.7387 9.57414 16.7187 10.6646 16.4427 11.7036C16.1668 12.7426 15.6432 13.6993 14.9167 14.4917ZM9.16675 16.6084C5.87508 16.2001 3.33341 13.4001 3.33341 10.0001C3.33341 9.48341 3.40008 8.98341 3.50841 8.50841L7.50008 12.5001V13.3334C7.50008 13.7754 7.67568 14.1994 7.98824 14.5119C8.3008 14.8245 8.72472 15.0001 9.16675 15.0001M10.0001 1.66675C8.90573 1.66675 7.8221 1.8823 6.81105 2.30109C5.80001 2.71987 4.88135 3.3337 4.10752 4.10752C2.54472 5.67033 1.66675 7.78994 1.66675 10.0001C1.66675 12.2102 2.54472 14.3298 4.10752 15.8926C4.88135 16.6665 5.80001 17.2803 6.81105 17.6991C7.8221 18.1179 8.90573 18.3334 10.0001 18.3334C12.2102 18.3334 14.3298 17.4554 15.8926 15.8926C17.4554 14.3298 18.3334 12.2102 18.3334 10.0001C18.3334 8.90573 18.1179 7.8221 17.6991 6.81105C17.2803 5.80001 16.6665 4.88135 15.8926 4.10752C15.1188 3.3337 14.2002 2.71987 13.1891 2.30109C12.1781 1.8823 11.0944 1.66675 10.0001 1.66675Z" fill="currentColor" />
|
|
3
|
+
</svg>
|
package/icons/windows.svg
CHANGED
|
@@ -1,24 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<polygon points="0,80 0,240 224,240 224,52"/>
|
|
7
|
-
</g>
|
|
8
|
-
</g>
|
|
9
|
-
<g>
|
|
10
|
-
<g>
|
|
11
|
-
<polygon points="256,48 256,240 512,240 512,16"/>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
<g>
|
|
15
|
-
<g>
|
|
16
|
-
<polygon points="256,272 256,464 512,496 512,272"/>
|
|
17
|
-
</g>
|
|
18
|
-
</g>
|
|
19
|
-
<g>
|
|
20
|
-
<g>
|
|
21
|
-
<polygon points="0,272 0,432 224,460 224,272"/>
|
|
22
|
-
</g>
|
|
23
|
-
</g>
|
|
24
|
-
</svg>
|
|
1
|
+
<svg viewBox="0 0 37 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Device Icon">
|
|
3
|
+
<path id="Vector" d="M5.21561 8.2185L16.2811 6.6945V17.385H5.21411V8.22L5.21561 8.2185ZM5.21561 27.7815L16.2811 29.307V18.747H5.21411L5.21561 27.7815ZM17.4976 29.469L32.2156 31.5V18.747H17.4976V29.469ZM17.4976 6.531V17.385H32.2156V4.5L17.4976 6.531Z" fill="currentColor"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cobrowse-agent-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "babel src --out-dir dist --watch --copy-files",
|
|
6
6
|
"build": "rm -rf dist && babel src --out-dir dist --copy-files",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
},
|
|
11
11
|
"main": "dist/index.js",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"
|
|
14
|
-
"i18next
|
|
15
|
-
"
|
|
16
|
-
"react-i18next": "^
|
|
13
|
+
"date-fns": "^4.1.0",
|
|
14
|
+
"i18next": "^24.2.2",
|
|
15
|
+
"i18next-resources-to-backend": "^1.2.1",
|
|
16
|
+
"react-i18next": "^15.4.0",
|
|
17
17
|
"ua-parser-js": "^1.0.33"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"react": "^
|
|
20
|
+
"react": "^19.0.0"
|
|
21
21
|
},
|
|
22
22
|
"browserslist": [
|
|
23
23
|
">0.2%",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
|
35
35
|
"eslint": "^8.23.1",
|
|
36
36
|
"eslint-plugin-react": "^7.31.8",
|
|
37
|
-
"i18next-parser": "^
|
|
37
|
+
"i18next-parser": "^9.0.0",
|
|
38
38
|
"standard": "^17.0.0"
|
|
39
39
|
}
|
|
40
40
|
}
|
package/icons/web.svg
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
-
viewBox="0 0 548.172 548.172" xml:space="preserve">
|
|
5
|
-
<g>
|
|
6
|
-
<path d="M534.75,49.965c-8.945-8.945-19.694-13.422-32.261-13.422H45.681c-12.562,0-23.313,4.477-32.264,13.422
|
|
7
|
-
C4.471,58.913,0,69.663,0,82.226v310.633c0,12.566,4.471,23.315,13.417,32.265c8.951,8.945,19.702,13.414,32.264,13.414h155.318
|
|
8
|
-
c0,7.231-1.524,14.661-4.57,22.269c-3.044,7.614-6.09,14.273-9.136,19.981c-3.042,5.715-4.565,9.897-4.565,12.56
|
|
9
|
-
c0,4.948,1.807,9.24,5.424,12.847c3.615,3.621,7.898,5.435,12.847,5.435h146.179c4.949,0,9.233-1.813,12.848-5.435
|
|
10
|
-
c3.62-3.606,5.427-7.898,5.427-12.847c0-2.468-1.526-6.611-4.571-12.415c-3.046-5.801-6.092-12.566-9.134-20.267
|
|
11
|
-
c-3.046-7.71-4.569-15.085-4.569-22.128h155.318c12.56,0,23.309-4.469,32.254-13.414c8.949-8.949,13.422-19.698,13.422-32.265
|
|
12
|
-
V82.226C548.176,69.663,543.699,58.913,534.75,49.965z M511.627,319.768c0,2.475-0.903,4.613-2.711,6.424
|
|
13
|
-
c-1.81,1.804-3.952,2.707-6.427,2.707H45.681c-2.473,0-4.615-0.903-6.423-2.707c-1.807-1.817-2.712-3.949-2.712-6.424V82.226
|
|
14
|
-
c0-2.475,0.902-4.615,2.712-6.423c1.809-1.805,3.951-2.712,6.423-2.712h456.815c2.471,0,4.617,0.904,6.42,2.712
|
|
15
|
-
c1.808,1.809,2.711,3.949,2.711,6.423V319.768L511.627,319.768z"/>
|
|
16
|
-
</g>
|
|
17
|
-
</svg>
|