synos-helena 22.0.14-notification.1 → 22.0.14-notification.2
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/lib/index.js
CHANGED
|
@@ -32211,6 +32211,17 @@ eval("\n\nvar _require = __webpack_require__(/*! ./Component */ \"./node_modules
|
|
|
32211
32211
|
|
|
32212
32212
|
/***/ }),
|
|
32213
32213
|
|
|
32214
|
+
/***/ "./node_modules/react-countdown/dist/index.es.js":
|
|
32215
|
+
/*!*******************************************************!*\
|
|
32216
|
+
!*** ./node_modules/react-countdown/dist/index.es.js ***!
|
|
32217
|
+
\*******************************************************/
|
|
32218
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
32219
|
+
|
|
32220
|
+
"use strict";
|
|
32221
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ \"calcTimeDelta\": () => (/* binding */ calcTimeDelta),\n/* harmony export */ \"formatTimeDelta\": () => (/* binding */ formatTimeDelta),\n/* harmony export */ \"zeroPad\": () => (/* binding */ zeroPad)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction zeroPad(value) {\n var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n var strValue = String(value);\n if (length === 0) return strValue;\n var match = strValue.match(/(.*?)([0-9]+)(.*)/);\n var prefix = match ? match[1] : '';\n var suffix = match ? match[3] : '';\n var strNo = match ? match[2] : strValue;\n var paddedNo = strNo.length >= length ? strNo : (_toConsumableArray(Array(length)).map(function () {\n return '0';\n }).join('') + strNo).slice(length * -1);\n return \"\".concat(prefix).concat(paddedNo).concat(suffix);\n}\nvar timeDeltaFormatOptionsDefaults = {\n daysInHours: false,\n zeroPadTime: 2\n};\nfunction calcTimeDelta(date) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$now = options.now,\n now = _options$now === void 0 ? Date.now : _options$now,\n _options$precision = options.precision,\n precision = _options$precision === void 0 ? 0 : _options$precision,\n controlled = options.controlled,\n _options$offsetTime = options.offsetTime,\n offsetTime = _options$offsetTime === void 0 ? 0 : _options$offsetTime,\n overtime = options.overtime;\n var startTimestamp;\n\n if (typeof date === 'string') {\n startTimestamp = new Date(date).getTime();\n } else if (date instanceof Date) {\n startTimestamp = date.getTime();\n } else {\n startTimestamp = date;\n }\n\n if (!controlled) {\n startTimestamp += offsetTime;\n }\n\n var timeLeft = controlled ? startTimestamp : startTimestamp - now();\n var clampedPrecision = Math.min(20, Math.max(0, precision));\n var total = Math.round(parseFloat(((overtime ? timeLeft : Math.max(0, timeLeft)) / 1000).toFixed(clampedPrecision)) * 1000);\n var seconds = Math.abs(total) / 1000;\n return {\n total: total,\n days: Math.floor(seconds / (3600 * 24)),\n hours: Math.floor(seconds / 3600 % 24),\n minutes: Math.floor(seconds / 60 % 60),\n seconds: Math.floor(seconds % 60),\n milliseconds: Number((seconds % 1 * 1000).toFixed()),\n completed: total <= 0\n };\n}\nfunction formatTimeDelta(timeDelta, options) {\n var days = timeDelta.days,\n hours = timeDelta.hours,\n minutes = timeDelta.minutes,\n seconds = timeDelta.seconds;\n\n var _Object$assign = Object.assign(Object.assign({}, timeDeltaFormatOptionsDefaults), options),\n daysInHours = _Object$assign.daysInHours,\n zeroPadTime = _Object$assign.zeroPadTime,\n _Object$assign$zeroPa = _Object$assign.zeroPadDays,\n zeroPadDays = _Object$assign$zeroPa === void 0 ? zeroPadTime : _Object$assign$zeroPa;\n\n var zeroPadTimeLength = Math.min(2, zeroPadTime);\n var formattedHours = daysInHours ? zeroPad(hours + days * 24, zeroPadTime) : zeroPad(hours, zeroPadTimeLength);\n return {\n days: daysInHours ? '' : zeroPad(days, zeroPadDays),\n hours: formattedHours,\n minutes: zeroPad(minutes, zeroPadTimeLength),\n seconds: zeroPad(seconds, zeroPadTimeLength)\n };\n}\n\nvar Countdown = function (_React$Component) {\n _inherits(Countdown, _React$Component);\n\n var _super = _createSuper(Countdown);\n\n function Countdown() {\n var _this;\n\n _classCallCheck(this, Countdown);\n\n _this = _super.apply(this, arguments);\n _this.state = {\n count: _this.props.count || 3\n };\n\n _this.startCountdown = function () {\n _this.interval = window.setInterval(function () {\n var count = _this.state.count - 1;\n\n if (count === 0) {\n _this.stopCountdown();\n\n _this.props.onComplete && _this.props.onComplete();\n } else {\n _this.setState(function (prevState) {\n return {\n count: prevState.count - 1\n };\n });\n }\n }, 1000);\n };\n\n _this.stopCountdown = function () {\n clearInterval(_this.interval);\n };\n\n _this.addTime = function (seconds) {\n _this.stopCountdown();\n\n _this.setState(function (prevState) {\n return {\n count: prevState.count + seconds\n };\n }, _this.startCountdown);\n };\n\n return _this;\n }\n\n _createClass(Countdown, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.startCountdown();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n clearInterval(this.interval);\n }\n }, {\n key: \"render\",\n value: function render() {\n return this.props.children ? (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(this.props.children, {\n count: this.state.count\n }) : null;\n }\n }]);\n\n return Countdown;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\nCountdown.propTypes = {\n count: prop_types__WEBPACK_IMPORTED_MODULE_1__.number,\n children: prop_types__WEBPACK_IMPORTED_MODULE_1__.element,\n onComplete: prop_types__WEBPACK_IMPORTED_MODULE_1__.func\n};\n\nvar Countdown$1 = function (_React$Component) {\n _inherits(Countdown$1, _React$Component);\n\n var _super = _createSuper(Countdown$1);\n\n function Countdown$1(props) {\n var _this;\n\n _classCallCheck(this, Countdown$1);\n\n _this = _super.call(this, props);\n _this.mounted = false;\n _this.initialTimestamp = _this.calcOffsetStartTimestamp();\n _this.offsetStartTimestamp = _this.props.autoStart ? 0 : _this.initialTimestamp;\n _this.offsetTime = 0;\n _this.legacyMode = false;\n _this.legacyCountdownRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.createRef)();\n\n _this.tick = function () {\n var timeDelta = _this.calcTimeDelta();\n\n var callback = timeDelta.completed && !_this.props.overtime ? undefined : _this.props.onTick;\n\n _this.setTimeDeltaState(timeDelta, undefined, callback);\n };\n\n _this.start = function () {\n if (_this.isStarted()) return;\n var prevOffsetStartTimestamp = _this.offsetStartTimestamp;\n _this.offsetStartTimestamp = 0;\n _this.offsetTime += prevOffsetStartTimestamp ? _this.calcOffsetStartTimestamp() - prevOffsetStartTimestamp : 0;\n\n var timeDelta = _this.calcTimeDelta();\n\n _this.setTimeDeltaState(timeDelta, \"STARTED\", _this.props.onStart);\n\n if (!_this.props.controlled && (!timeDelta.completed || _this.props.overtime)) {\n _this.clearTimer();\n\n _this.interval = window.setInterval(_this.tick, _this.props.intervalDelay);\n }\n };\n\n _this.pause = function () {\n if (_this.isPaused()) return;\n\n _this.clearTimer();\n\n _this.offsetStartTimestamp = _this.calcOffsetStartTimestamp();\n\n _this.setTimeDeltaState(_this.state.timeDelta, \"PAUSED\", _this.props.onPause);\n };\n\n _this.stop = function () {\n if (_this.isStopped()) return;\n\n _this.clearTimer();\n\n _this.offsetStartTimestamp = _this.calcOffsetStartTimestamp();\n _this.offsetTime = _this.offsetStartTimestamp - _this.initialTimestamp;\n\n _this.setTimeDeltaState(_this.calcTimeDelta(), \"STOPPED\", _this.props.onStop);\n };\n\n _this.isStarted = function () {\n return _this.isStatus(\"STARTED\");\n };\n\n _this.isPaused = function () {\n return _this.isStatus(\"PAUSED\");\n };\n\n _this.isStopped = function () {\n return _this.isStatus(\"STOPPED\");\n };\n\n _this.isCompleted = function () {\n return _this.isStatus(\"COMPLETED\");\n };\n\n _this.handleOnComplete = function (timeDelta) {\n if (_this.props.onComplete) _this.props.onComplete(timeDelta);\n };\n\n if (props.date) {\n var timeDelta = _this.calcTimeDelta();\n\n _this.state = {\n timeDelta: timeDelta,\n status: timeDelta.completed ? \"COMPLETED\" : \"STOPPED\"\n };\n } else {\n _this.legacyMode = true;\n }\n\n return _this;\n }\n\n _createClass(Countdown$1, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.legacyMode) {\n return;\n }\n\n this.mounted = true;\n if (this.props.onMount) this.props.onMount(this.calcTimeDelta());\n if (this.props.autoStart) this.start();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.legacyMode) {\n return;\n }\n\n if (this.props.date !== prevProps.date) {\n this.initialTimestamp = this.calcOffsetStartTimestamp();\n this.offsetStartTimestamp = this.initialTimestamp;\n this.offsetTime = 0;\n this.setTimeDeltaState(this.calcTimeDelta());\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.legacyMode) {\n return;\n }\n\n this.mounted = false;\n this.clearTimer();\n }\n }, {\n key: \"calcTimeDelta\",\n value: function calcTimeDelta$1() {\n var _this$props = this.props,\n date = _this$props.date,\n now = _this$props.now,\n precision = _this$props.precision,\n controlled = _this$props.controlled,\n overtime = _this$props.overtime;\n return calcTimeDelta(date, {\n now: now,\n precision: precision,\n controlled: controlled,\n offsetTime: this.offsetTime,\n overtime: overtime\n });\n }\n }, {\n key: \"calcOffsetStartTimestamp\",\n value: function calcOffsetStartTimestamp() {\n return Date.now();\n }\n }, {\n key: \"addTime\",\n value: function addTime(seconds) {\n this.legacyCountdownRef.current.addTime(seconds);\n }\n }, {\n key: \"clearTimer\",\n value: function clearTimer() {\n window.clearInterval(this.interval);\n }\n }, {\n key: \"isStatus\",\n value: function isStatus(status) {\n return this.state.status === status;\n }\n }, {\n key: \"setTimeDeltaState\",\n value: function setTimeDeltaState(timeDelta, status, callback) {\n var _this2 = this;\n\n if (!this.mounted) return;\n var completedCallback;\n\n if (!this.state.timeDelta.completed && timeDelta.completed) {\n if (!this.props.overtime) this.clearTimer();\n completedCallback = this.handleOnComplete;\n }\n\n var onDone = function onDone() {\n if (callback) callback(_this2.state.timeDelta);\n if (completedCallback) completedCallback(_this2.state.timeDelta);\n };\n\n return this.setState(function (prevState) {\n var newStatus = status || prevState.status;\n\n if (timeDelta.completed && !_this2.props.overtime) {\n newStatus = \"COMPLETED\";\n } else if (!status && newStatus === \"COMPLETED\") {\n newStatus = \"STOPPED\";\n }\n\n return {\n timeDelta: timeDelta,\n status: newStatus\n };\n }, onDone);\n }\n }, {\n key: \"getApi\",\n value: function getApi() {\n return this.api = this.api || {\n start: this.start,\n pause: this.pause,\n stop: this.stop,\n isStarted: this.isStarted,\n isPaused: this.isPaused,\n isStopped: this.isStopped,\n isCompleted: this.isCompleted\n };\n }\n }, {\n key: \"getRenderProps\",\n value: function getRenderProps() {\n var _this$props2 = this.props,\n daysInHours = _this$props2.daysInHours,\n zeroPadTime = _this$props2.zeroPadTime,\n zeroPadDays = _this$props2.zeroPadDays;\n var timeDelta = this.state.timeDelta;\n return Object.assign(Object.assign({}, timeDelta), {\n api: this.getApi(),\n props: this.props,\n formatted: formatTimeDelta(timeDelta, {\n daysInHours: daysInHours,\n zeroPadTime: zeroPadTime,\n zeroPadDays: zeroPadDays\n })\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.legacyMode) {\n var _this$props3 = this.props,\n count = _this$props3.count,\n _children = _this$props3.children,\n onComplete = _this$props3.onComplete;\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Countdown, {\n ref: this.legacyCountdownRef,\n count: count,\n onComplete: onComplete\n }, _children);\n }\n\n var _this$props4 = this.props,\n className = _this$props4.className,\n overtime = _this$props4.overtime,\n children = _this$props4.children,\n renderer = _this$props4.renderer;\n var renderProps = this.getRenderProps();\n\n if (renderer) {\n return renderer(renderProps);\n }\n\n if (children && this.state.timeDelta.completed && !overtime) {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(children, {\n countdown: renderProps\n });\n }\n\n var _renderProps$formatte = renderProps.formatted,\n days = _renderProps$formatte.days,\n hours = _renderProps$formatte.hours,\n minutes = _renderProps$formatte.minutes,\n seconds = _renderProps$formatte.seconds;\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(\"span\", {\n className: className\n }, renderProps.total < 0 ? '-' : '', days, days ? ':' : '', hours, \":\", minutes, \":\", seconds);\n }\n }]);\n\n return Countdown$1;\n}(react__WEBPACK_IMPORTED_MODULE_0__.Component);\nCountdown$1.defaultProps = Object.assign(Object.assign({}, timeDeltaFormatOptionsDefaults), {\n controlled: false,\n intervalDelay: 1000,\n precision: 0,\n autoStart: true\n});\nCountdown$1.propTypes = {\n date: (0,prop_types__WEBPACK_IMPORTED_MODULE_1__.oneOfType)([(0,prop_types__WEBPACK_IMPORTED_MODULE_1__.instanceOf)(Date), prop_types__WEBPACK_IMPORTED_MODULE_1__.string, prop_types__WEBPACK_IMPORTED_MODULE_1__.number]),\n daysInHours: prop_types__WEBPACK_IMPORTED_MODULE_1__.bool,\n zeroPadTime: prop_types__WEBPACK_IMPORTED_MODULE_1__.number,\n zeroPadDays: prop_types__WEBPACK_IMPORTED_MODULE_1__.number,\n controlled: prop_types__WEBPACK_IMPORTED_MODULE_1__.bool,\n intervalDelay: prop_types__WEBPACK_IMPORTED_MODULE_1__.number,\n precision: prop_types__WEBPACK_IMPORTED_MODULE_1__.number,\n autoStart: prop_types__WEBPACK_IMPORTED_MODULE_1__.bool,\n overtime: prop_types__WEBPACK_IMPORTED_MODULE_1__.bool,\n className: prop_types__WEBPACK_IMPORTED_MODULE_1__.string,\n children: prop_types__WEBPACK_IMPORTED_MODULE_1__.element,\n renderer: prop_types__WEBPACK_IMPORTED_MODULE_1__.func,\n now: prop_types__WEBPACK_IMPORTED_MODULE_1__.func,\n onMount: prop_types__WEBPACK_IMPORTED_MODULE_1__.func,\n onStart: prop_types__WEBPACK_IMPORTED_MODULE_1__.func,\n onPause: prop_types__WEBPACK_IMPORTED_MODULE_1__.func,\n onStop: prop_types__WEBPACK_IMPORTED_MODULE_1__.func,\n onTick: prop_types__WEBPACK_IMPORTED_MODULE_1__.func,\n onComplete: prop_types__WEBPACK_IMPORTED_MODULE_1__.func\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Countdown$1);\n\n\n\n//# sourceURL=webpack://synchro-helena/./node_modules/react-countdown/dist/index.es.js?");
|
|
32222
|
+
|
|
32223
|
+
/***/ }),
|
|
32224
|
+
|
|
32214
32225
|
/***/ "./node_modules/react-highlight-words/dist/main.js":
|
|
32215
32226
|
/*!*********************************************************!*\
|
|
32216
32227
|
!*** ./node_modules/react-highlight-words/dist/main.js ***!
|
|
@@ -33378,7 +33389,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
33378
33389
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
33379
33390
|
|
|
33380
33391
|
"use strict";
|
|
33381
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd */ \"antd\");\n/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ~ */ \"./src/index.ts\");\n/* harmony import */ var _assets_images_micro_gerproc_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ~/assets/images/micro-gerproc.svg */ \"./src/assets/images/micro-gerproc.svg\");\n/* harmony import */ var _assets_images_micro_insight_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ~/assets/images/micro-insight.svg */ \"./src/assets/images/micro-insight.svg\");\n/* harmony import */ var _assets_images_micro_download_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ~/assets/images/micro-download.svg */ \"./src/assets/images/micro-download.svg\");\n/* harmony import */ var _util_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ~/util/constants */ \"./src/util/constants.ts\");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n\n\nvar HLErrorBoundary = /** @class */ (function (_super) {\n __extends(HLErrorBoundary, _super);\n function HLErrorBoundary(props) {\n var _this = _super.call(this, props) || this;\n _this.state = { errorCatch: false };\n return _this;\n }\n HLErrorBoundary.getDerivedStateFromError = function (error) {\n return { errorCatch: true };\n };\n HLErrorBoundary.prototype.getErrorContent = function (serviceDescription) {\n return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", { style: { marginTop: '40px', marginBottom: '40px' } },\n
|
|
33392
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd */ \"antd\");\n/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ~ */ \"./src/index.ts\");\n/* harmony import */ var _assets_images_micro_gerproc_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ~/assets/images/micro-gerproc.svg */ \"./src/assets/images/micro-gerproc.svg\");\n/* harmony import */ var _assets_images_micro_insight_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ~/assets/images/micro-insight.svg */ \"./src/assets/images/micro-insight.svg\");\n/* harmony import */ var _assets_images_micro_download_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ~/assets/images/micro-download.svg */ \"./src/assets/images/micro-download.svg\");\n/* harmony import */ var _util_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ~/util/constants */ \"./src/util/constants.ts\");\n/* harmony import */ var react_countdown__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-countdown */ \"./node_modules/react-countdown/dist/index.es.js\");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n\n\n\nvar HLErrorBoundary = /** @class */ (function (_super) {\n __extends(HLErrorBoundary, _super);\n function HLErrorBoundary(props) {\n var _this = _super.call(this, props) || this;\n _this.pageRefresh = function () {\n window.location.reload();\n };\n _this.state = { errorCatch: false };\n return _this;\n }\n HLErrorBoundary.getDerivedStateFromError = function (error) {\n return { errorCatch: true };\n };\n HLErrorBoundary.prototype.getErrorContent = function (serviceDescription) {\n var _this = this;\n return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,\n react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", { style: { marginTop: '40px', marginBottom: '40px' } },\n react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"h1\", null, \"Erro\"),\n react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"p\", null, \"O componente respons\\u00E1vel \".concat(serviceDescription, \" encontra-se temporariamente inacess\\u00EDvel.\")),\n react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_countdown__WEBPACK_IMPORTED_MODULE_7__[\"default\"], { date: Date.now() + 10000, renderer: function (_a) {\n var seconds = _a.seconds, completed = _a.completed;\n if (completed) {\n _this.pageRefresh();\n return react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"p\", null, \"Atualizando...\");\n }\n else {\n return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,\n react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"p\", null,\n \"Aguarde a pr\\u00F3xima atualiza\\u00E7\\u00E3o em \",\n seconds,\n \" segundos ou atualize a p\\u00E1gina.\"),\n react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"p\", null, \"Caso o erro persista, contate o suporte.\"),\n react__WEBPACK_IMPORTED_MODULE_0___default().createElement(antd__WEBPACK_IMPORTED_MODULE_1__.Button, { type: \"primary\", shape: \"round\", onClick: _this.pageRefresh }, \"Atualizar agora\")));\n }\n } }))));\n };\n HLErrorBoundary.prototype.componentDidCatch = function () {\n this.setState({\n errorCatch: true,\n });\n };\n HLErrorBoundary.prototype.render = function () {\n var _a, _b;\n var LoadingComponent = (_a = this.props.LoadingComponent) !== null && _a !== void 0 ? _a : react__WEBPACK_IMPORTED_MODULE_0___default().createElement(antd__WEBPACK_IMPORTED_MODULE_1__.Skeleton, null);\n if (this.state.errorCatch) {\n var size = void 0;\n var content = void 0;\n var icon = void 0;\n switch (this.props.template) {\n case _util_constants__WEBPACK_IMPORTED_MODULE_6__.ERROR_BOUNDARY_TEMPLATES.GERPROC:\n size = _util_constants__WEBPACK_IMPORTED_MODULE_6__.ERROR_SIZES.PAGE;\n content = this.getErrorContent('pelos processos e obrigações');\n icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_2__.HLIcon, { component: _assets_images_micro_gerproc_svg__WEBPACK_IMPORTED_MODULE_3__[\"default\"] });\n break;\n case _util_constants__WEBPACK_IMPORTED_MODULE_6__.ERROR_BOUNDARY_TEMPLATES.INSIGHT:\n size = _util_constants__WEBPACK_IMPORTED_MODULE_6__.ERROR_SIZES.PAGE;\n content = this.getErrorContent('pelos relatórios e painéis');\n icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_2__.HLIcon, { component: _assets_images_micro_insight_svg__WEBPACK_IMPORTED_MODULE_4__[\"default\"] });\n break;\n case _util_constants__WEBPACK_IMPORTED_MODULE_6__.ERROR_BOUNDARY_TEMPLATES.DOWNLOAD:\n size = _util_constants__WEBPACK_IMPORTED_MODULE_6__.ERROR_SIZES.PAGE;\n content = this.getErrorContent('pelo download e suas páginas');\n icon = react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_2__.HLIcon, { component: _assets_images_micro_download_svg__WEBPACK_IMPORTED_MODULE_5__[\"default\"] });\n break;\n default:\n content = (_b = this.props.FallbackComponent) !== null && _b !== void 0 ? _b : react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null);\n break;\n }\n return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Suspense), { fallback: LoadingComponent }, icon && size ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_2__.HLException.Error, { size: size, content: content, icon: icon }) : content));\n }\n else {\n return react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Suspense), { fallback: LoadingComponent }, this.props.children);\n }\n };\n return HLErrorBoundary;\n}((react__WEBPACK_IMPORTED_MODULE_0___default().Component)));\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HLErrorBoundary);\n\n\n//# sourceURL=webpack://synchro-helena/./src/HLErrorBoundary/HLErrorBoundary.tsx?");
|
|
33382
33393
|
|
|
33383
33394
|
/***/ }),
|
|
33384
33395
|
|
|
@@ -5,6 +5,7 @@ declare class HLErrorBoundary extends React.Component<HLErrorBoundaryPropTypes,
|
|
|
5
5
|
static getDerivedStateFromError(error: any): {
|
|
6
6
|
errorCatch: boolean;
|
|
7
7
|
};
|
|
8
|
+
pageRefresh: () => void;
|
|
8
9
|
getErrorContent(serviceDescription: any): JSX.Element;
|
|
9
10
|
componentDidCatch(): void;
|
|
10
11
|
render(): JSX.Element;
|