@titaui/pc 1.12.7-beta.2 → 1.12.7-beta.22
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/components/attachments-preview/index.js +4 -4
- package/lib/components/change-okr-modal/index.js +2 -4
- package/lib/components/color-date-picker/index.css +7 -0
- package/lib/components/color-date-picker/index.js +13 -7
- package/lib/components/common-share/publishMblog.js +2 -4
- package/lib/components/create-okr-modal/fields/okr-type-detail.js +2 -4
- package/lib/components/create-okr-modal/fields/okr-visibility-detail.js +2 -4
- package/lib/components/create-okr-modal/index.js +2 -4
- package/lib/components/create-okr-modal/request-api.js +12 -16
- package/lib/components/create-okr-modal/utils/helper.js +2 -6
- package/lib/components/dialog-confirm/index.css +1 -0
- package/lib/components/dialog-confirm/index.js +5 -3
- package/lib/components/dialog-upload/index.js +2 -4
- package/lib/components/dialog-upload/uploaded-preview.js +4 -4
- package/lib/components/drawer-manager/drawerWrapper.js +2 -4
- package/lib/components/dynamic/dynamic-item/components/comments-dialog/index.js +12 -8
- package/lib/components/dynamic/dynamic-item/components/header/index.js +1 -5
- package/lib/components/dynamic/dynamic-item/components/okr-progress/constant.js +31 -0
- package/lib/components/dynamic/dynamic-item/components/okr-progress/index.js +88 -57
- package/lib/components/dynamic/dynamic-item/components/progress/components/okr-progress/index.js +2 -4
- package/lib/components/dynamic/dynamic-item/components/summary-header/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.css +51 -21
- package/lib/components/dynamic/dynamic-item/components/summary-header/index.js +76 -84
- package/lib/components/dynamic/dynamic-item/components/summary-header/operate-record.js +49 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/constant.js +16 -0
- package/lib/components/dynamic/dynamic-item/components/task-progress/index.js +105 -34
- package/lib/components/dynamic/dynamic-item/components/task-progress/utils.js +20 -3
- package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.css +37 -1
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/evalute/index.js +18 -11
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.css +12 -6
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/components/remind-user-view/index.js +14 -6
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/constant.js +45 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.css +16 -0
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/index.js +99 -23
- package/lib/components/dynamic/dynamic-item/dynamic-new-report/util.js +30 -0
- package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +3 -2
- package/lib/components/dynamic/dynamic-item/index.css +1 -0
- package/lib/components/dynamic/dynamic-item/index.js +5 -3
- package/lib/components/firework/index.js +2 -6
- package/lib/components/form/form-fields/input-verification-code/index.js +2 -4
- package/lib/components/grid-layout/util/network.js +6 -10
- package/lib/components/import-modal/import-okr-modal/index.js +4 -1
- package/lib/components/import-modal/import-task-modal/index.js +2 -1
- package/lib/components/import-modal/tree/okr-tree/index.js +2 -4
- package/lib/components/menus/components/menu-tree/tree-node/subordinates.js +7 -3
- package/lib/components/menus/components/menu-tree/tree-node/summary-share.js +7 -3
- package/lib/components/menus/export-modules/summary-menus/depart-menus/index.js +59 -29
- package/lib/components/menus/export-modules/summary-menus/menus.js +42 -51
- package/lib/components/menus/export-modules/summary-menus/request-api.js +17 -0
- package/lib/components/menus/export-modules/summary-menus/summary-front-menus.js +50 -7
- package/lib/components/menus/request-apis.js +8 -2
- package/lib/components/new-confidence/index.js +5 -5
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +2 -4
- package/lib/components/okr-detail/components/ao-nice/index.js +4 -6
- package/lib/components/okr-detail/components/header/edit-name.js +2 -4
- package/lib/components/okr-detail/components/header/o-avatar.js +2 -4
- package/lib/components/okr-detail/components/o-classify.js +2 -4
- package/lib/components/okr-detail/components/o-progress-update/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task-level2.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-task.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-parent-node/index.js +2 -4
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-child-node/edit-child-okr-weight.js +6 -8
- package/lib/components/okr-detail/components/okr-tree/tree-node/o-parent-node/index.js +2 -4
- package/lib/components/okr-detail/detail-footer/index.js +2 -4
- package/lib/components/okr-detail/detail-header/index.js +10 -12
- package/lib/components/okr-detail/okr-list/index.js +2 -4
- package/lib/components/okr-detail/request-apis.js +2 -6
- package/lib/components/okr-flow/child-node/fields/creator.js +2 -4
- package/lib/components/okr-flow/child-node/work-node.js +2 -4
- package/lib/components/okr-flow/export-modal/index.js +23 -4
- package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +8 -10
- package/lib/components/okr-flow/request-apis.js +2 -6
- package/lib/components/okr-flow/root-node/index.js +2 -4
- package/lib/components/okr-progress/components/o-progress-update/index.js +2 -4
- package/lib/components/okr-progress-modal/index.js +2 -4
- package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +2 -4
- package/lib/components/okr-share/common-painter/darwAvatar.js +4 -8
- package/lib/components/okr-share/common-painter/openDataPainter.js +2 -6
- package/lib/components/okr-share/pink-card/drawDepartmentName.js +2 -6
- package/lib/components/okr-share/pink-card/drawQuote.js +2 -6
- package/lib/components/okr-share/pink-card/drawUserName.js +2 -6
- package/lib/components/okr-share/pink-card/index.js +2 -6
- package/lib/components/okr-share/publishMblog.js +2 -4
- package/lib/components/okr-share/shareCardSelector.js +4 -6
- package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +4 -4
- package/lib/components/okrcase-library/server/network.js +20 -24
- package/lib/components/open-data-painter/index.js +2 -6
- package/lib/components/period-selector/helper/index.js +2 -6
- package/lib/components/picker/components/panels/week-panel/utils.js +81 -2
- package/lib/components/picker/components/panels/week-panel/week-body.js +29 -31
- package/lib/components/picker/components/picker-trigger/index.js +2 -47
- package/lib/components/promise-confirm/index.css +0 -0
- package/lib/components/promise-confirm/index.js +117 -0
- package/lib/components/promise-confirm/interface.js +5 -0
- package/lib/components/rate/index.css +111 -0
- package/lib/components/rate/index.js +1 -1
- package/lib/components/rich-editor/schemas/list.js +0 -1
- package/lib/components/rich-editor-at/index.js +9 -4
- package/lib/components/rich-editor-upload/index.js +3 -0
- package/lib/components/select-tags/index.js +7 -1
- package/lib/components/superset-charts/fetch-assets-and-append/get-assets-with-cache.js +2 -6
- package/lib/components/superset-charts/fetch-assets-and-append/index.js +4 -8
- package/lib/components/survey-model/request-api.js +2 -6
- package/lib/components/task-relation-modal/index.js +4 -6
- package/lib/components/task-relation-modal/tree/category-tree/index.js +2 -4
- package/lib/components/task-relation-modal/tree/okr-tree/index.js +2 -4
- package/lib/components/task-relation-modal/tree/work-tree/index.js +2 -4
- package/lib/components/task-relation-modal/work-relation/index.js +4 -6
- package/lib/components/task-tree/task-item-node/e-project.js +2 -4
- package/lib/components/task-tree/task-item-node/e-task.js +2 -4
- package/lib/components/toast/index.js +8 -12
- package/lib/components/upvote/index.js +4 -6
- package/lib/components/version-change-modal/index.js +4 -6
- package/lib/components/version-change-modal/request-api.js +2 -6
- package/lib/components/weekly-report/card.js +12 -4
- package/lib/components/weekly-report/common-painter/darwAvatar.js +6 -10
- package/lib/components/weekly-report/common-painter/drawName.js +2 -6
- package/lib/components/weekly-report/common-painter/openDataPainter.js +2 -6
- package/lib/components/weekly-report/index.js +4 -6
- package/lib/components/write-summary-modal/index.css +79 -0
- package/lib/components/write-summary-modal/index.js +167 -0
- package/lib/components/write-summary-modal/interface.js +19 -0
- package/lib/components/write-summary-modal/request-api.js +18 -0
- package/lib/components/write-summary-modal/utils.js +31 -0
- package/lib/index.js +16 -0
- package/lib/pages/group-management/groupInterface.js +2 -6
- package/lib/pages/new-okr-list/request-api.js +14 -18
- package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +2 -4
- package/lib/pages/okr-map/request-apis.js +2 -6
- package/lib/utils/constant.js +8 -2
- package/lib/utils/request-v1.js +2 -6
- package/lib/utils/request.js +2 -6
- package/package.json +1 -1
|
@@ -15,6 +15,8 @@ var _utils = require("./utils");
|
|
|
15
15
|
|
|
16
16
|
var _utils2 = require("../../../utils");
|
|
17
17
|
|
|
18
|
+
var _constant = require("../../../../../utils/constant");
|
|
19
|
+
|
|
18
20
|
require("./index.css");
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -25,47 +27,43 @@ var preCls = 'titaui__picker';
|
|
|
25
27
|
|
|
26
28
|
var WeekPanelBody = function WeekPanelBody(props) {
|
|
27
29
|
var viewDateStart = props.viewDateStart,
|
|
28
|
-
onSelect = props.onSelect
|
|
30
|
+
onSelect = props.onSelect,
|
|
31
|
+
_props$valueTypeIsRan = props.valueTypeIsRange,
|
|
32
|
+
valueTypeIsRange = _props$valueTypeIsRan === void 0 ? true : _props$valueTypeIsRan;
|
|
29
33
|
var currentYear = new Date().getFullYear();
|
|
30
34
|
var currentMonth = new Date().getMonth() + 1;
|
|
31
35
|
var currentWeek = (0, _utils.getWeekNumber)(new Date());
|
|
32
36
|
|
|
33
37
|
var getCells = function getCells(date) {
|
|
34
|
-
var dates = [];
|
|
35
38
|
var year = (0, _moment["default"])(date).format('YYYY'); //获取年
|
|
36
39
|
|
|
37
40
|
var month = (0, _moment["default"])(date).format('MM'); //获取月
|
|
38
41
|
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
for (var i = 0; i <= WEEK_NUM; i++) {
|
|
65
|
-
_loop(i);
|
|
42
|
+
var range = (0, _utils.getPointYearMonthWeeksRange)(year, month);
|
|
43
|
+
|
|
44
|
+
if (range) {
|
|
45
|
+
return range.map(function (item, i) {
|
|
46
|
+
return /*#__PURE__*/_react["default"].createElement("tr", {
|
|
47
|
+
key: i,
|
|
48
|
+
className: (0, _classnames["default"])("".concat(preCls, "__week"), _defineProperty({}, "".concat(preCls, "__week--select"), currentWeek === i + 1 && parseInt(year) == currentYear && parseInt(month) == currentMonth))
|
|
49
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
50
|
+
onClick: function onClick() {
|
|
51
|
+
if (onSelect) {
|
|
52
|
+
if (valueTypeIsRange) {
|
|
53
|
+
onSelect("".concat(item.startTime, "~").concat(item.endTime), 'week', year);
|
|
54
|
+
} else {
|
|
55
|
+
onSelect("".concat(year, "-").concat(month, "-").concat(i + 1), 'week', year);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
className: "".concat(preCls, "__week-box")
|
|
60
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
|
+
className: "".concat(preCls, "__week-index")
|
|
62
|
+
}, (0, _constant.getWeekly)()[i]), "".concat(item.startTime, "~").concat(item.endTime)));
|
|
63
|
+
});
|
|
64
|
+
} else {
|
|
65
|
+
return null;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
return dates;
|
|
69
67
|
};
|
|
70
68
|
|
|
71
69
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -25,18 +25,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
|
-
|
|
30
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
37
|
-
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
-
|
|
40
28
|
var PickerTrigger = function PickerTrigger(props) {
|
|
41
29
|
var children = props.children,
|
|
42
30
|
viewDate = props.viewDate,
|
|
@@ -45,29 +33,13 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
45
33
|
_props$allowClear = props.allowClear,
|
|
46
34
|
allowClear = _props$allowClear === void 0 ? false : _props$allowClear,
|
|
47
35
|
placeholder = props.placeholder,
|
|
48
|
-
_onClick = props.onClick
|
|
49
|
-
viewDateRange = props.viewDateRange;
|
|
36
|
+
_onClick = props.onClick;
|
|
50
37
|
|
|
51
38
|
var _useContext = (0, _react.useContext)(_context["default"]),
|
|
52
39
|
mode = _useContext.mode,
|
|
53
40
|
format = _useContext.format,
|
|
54
41
|
value = _useContext.value;
|
|
55
42
|
|
|
56
|
-
var _useState = (0, _react.useState)(false),
|
|
57
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
58
|
-
isCkeckTime = _useState2[0],
|
|
59
|
-
setIsCheckTime = _useState2[1];
|
|
60
|
-
|
|
61
|
-
var _useState3 = (0, _react.useState)(value),
|
|
62
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
63
|
-
firstValue = _useState4[0],
|
|
64
|
-
setFirstValue = _useState4[1];
|
|
65
|
-
|
|
66
|
-
var _useState5 = (0, _react.useState)(mode),
|
|
67
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
68
|
-
modeType = _useState6[0],
|
|
69
|
-
setModeType = _useState6[1];
|
|
70
|
-
|
|
71
43
|
var currFormat = format;
|
|
72
44
|
|
|
73
45
|
switch (mode) {
|
|
@@ -88,23 +60,6 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
88
60
|
break;
|
|
89
61
|
}
|
|
90
62
|
|
|
91
|
-
(0, _react.useEffect)(function () {
|
|
92
|
-
if (modeType === mode) {
|
|
93
|
-
if (firstValue !== value) {
|
|
94
|
-
setIsCheckTime(true);
|
|
95
|
-
}
|
|
96
|
-
} else {
|
|
97
|
-
setModeType(mode);
|
|
98
|
-
|
|
99
|
-
if (viewDateRange) {
|
|
100
|
-
setFirstValue(viewDateRange);
|
|
101
|
-
} else {
|
|
102
|
-
setFirstValue(value);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
setIsCheckTime(false);
|
|
106
|
-
}
|
|
107
|
-
}, [value, mode, viewDateRange]);
|
|
108
63
|
return (
|
|
109
64
|
/*#__PURE__*/
|
|
110
65
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
@@ -119,7 +74,7 @@ var PickerTrigger = function PickerTrigger(props) {
|
|
|
119
74
|
}
|
|
120
75
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
121
76
|
className: (0, _classnames["default"])("".concat(_utils.PickerTriggerClass, "__input"), _defineProperty({}, "".concat(_utils.PickerTriggerClass, "__input--placeholder"), !value && placeholder))
|
|
122
|
-
},
|
|
77
|
+
}, value ? viewDate.format(currFormat) : placeholder), /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
78
|
className: (0, _classnames["default"])("".concat(_utils.PickerTriggerClass, "__operation"))
|
|
124
79
|
}, !disabled && /*#__PURE__*/_react["default"].createElement("span", {
|
|
125
80
|
className: "tu-icon-caret-down"
|
|
File without changes
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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
|
+
var _dialogConfirm = _interopRequireDefault(require("../dialog-confirm"));
|
|
13
|
+
|
|
14
|
+
var _getLocale = require("../../utils/getLocale");
|
|
15
|
+
|
|
16
|
+
require("./index.css");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
+
|
|
26
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
+
|
|
28
|
+
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); }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
33
|
+
|
|
34
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
+
|
|
36
|
+
var WarningButton = _dialogConfirm["default"].WarningButton;
|
|
37
|
+
var CancelButton = _dialogConfirm["default"].CancelButton;
|
|
38
|
+
var SureButton = _dialogConfirm["default"].SureButton;
|
|
39
|
+
var PromiseConfirm = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
40
|
+
var _ref$type = _ref.type,
|
|
41
|
+
type = _ref$type === void 0 ? "warning" : _ref$type,
|
|
42
|
+
title = _ref.title,
|
|
43
|
+
onConfirm = _ref.onConfirm,
|
|
44
|
+
_ref$onCancel = _ref.onCancel,
|
|
45
|
+
onCancel = _ref$onCancel === void 0 ? function () {} : _ref$onCancel,
|
|
46
|
+
_ref$content = _ref.content,
|
|
47
|
+
content = _ref$content === void 0 ? "" : _ref$content,
|
|
48
|
+
_ref$leftBtnText = _ref.leftBtnText,
|
|
49
|
+
leftBtnText = _ref$leftBtnText === void 0 ? (0, _getLocale.getLocale)("Mod_Cancel") : _ref$leftBtnText,
|
|
50
|
+
_ref$rightBtnText = _ref.rightBtnText,
|
|
51
|
+
rightBtnText = _ref$rightBtnText === void 0 ? (0, _getLocale.getLocale)("OKR_MyO_Butt_Determine") : _ref$rightBtnText;
|
|
52
|
+
|
|
53
|
+
var _useState = (0, _react.useState)(false),
|
|
54
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
55
|
+
visible = _useState2[0],
|
|
56
|
+
setVisible = _useState2[1];
|
|
57
|
+
|
|
58
|
+
var dialogPromise = (0, _react.useRef)({
|
|
59
|
+
resolve: function resolve() {},
|
|
60
|
+
reject: function reject() {}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
var handleCancelBtnClick = function handleCancelBtnClick() {
|
|
64
|
+
onCancel();
|
|
65
|
+
dialogPromise.current.reject();
|
|
66
|
+
setVisible(false);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
var handleConfirmBtnClick = function handleConfirmBtnClick() {
|
|
70
|
+
if (onConfirm) {
|
|
71
|
+
onConfirm();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
dialogPromise.current.resolve();
|
|
75
|
+
setVisible(false);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var showDialog = function showDialog() {
|
|
79
|
+
setVisible(true);
|
|
80
|
+
return new Promise(function (resolve, reject) {
|
|
81
|
+
dialogPromise.current = {
|
|
82
|
+
resolve: resolve,
|
|
83
|
+
reject: reject
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
var hideDialog = function hideDialog() {
|
|
89
|
+
setVisible(false);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
93
|
+
return {
|
|
94
|
+
show: showDialog,
|
|
95
|
+
hide: hideDialog
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
return /*#__PURE__*/_react["default"].createElement(_dialogConfirm["default"], {
|
|
99
|
+
visible: visible,
|
|
100
|
+
type: type
|
|
101
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
102
|
+
type: "title"
|
|
103
|
+
}, title), content && /*#__PURE__*/_react["default"].createElement("span", {
|
|
104
|
+
type: "content"
|
|
105
|
+
}, content), /*#__PURE__*/_react["default"].createElement(CancelButton, {
|
|
106
|
+
type: "button",
|
|
107
|
+
onClick: handleCancelBtnClick
|
|
108
|
+
}, leftBtnText), type === "warning" && /*#__PURE__*/_react["default"].createElement(WarningButton, {
|
|
109
|
+
type: "button",
|
|
110
|
+
onClick: handleConfirmBtnClick
|
|
111
|
+
}, rightBtnText), type === "confirm" && /*#__PURE__*/_react["default"].createElement(SureButton, {
|
|
112
|
+
type: "button",
|
|
113
|
+
onClick: handleConfirmBtnClick
|
|
114
|
+
}, rightBtnText));
|
|
115
|
+
});
|
|
116
|
+
var _default = PromiseConfirm;
|
|
117
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
.rc-rate {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
list-style: none;
|
|
5
|
+
font-size: 18px;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
font-weight: normal;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
outline: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.rc-rate-rtl {
|
|
14
|
+
direction: rtl;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.rc-rate-disabled .rc-rate-star {
|
|
18
|
+
cursor: default;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.rc-rate-disabled .rc-rate-star:before, .rc-rate-disabled .rc-rate-star-content:before {
|
|
22
|
+
cursor: default;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.rc-rate-disabled .rc-rate-star:hover {
|
|
26
|
+
transform: scale(1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.rc-rate-star {
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
display: inline-block;
|
|
33
|
+
margin-right: 8px;
|
|
34
|
+
position: relative;
|
|
35
|
+
transition: all 0.3s;
|
|
36
|
+
color: #e9e9e9;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
line-height: 1.5;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.rc-rate-rtl .rc-rate-star {
|
|
42
|
+
margin-right: 0;
|
|
43
|
+
margin-left: 8px;
|
|
44
|
+
float: right;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.rc-rate-star-first, .rc-rate-star-second {
|
|
48
|
+
transition: all 0.3s;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.rc-rate-star-focused, .rc-rate-star:hover {
|
|
52
|
+
transform: scale(1.1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.rc-rate-star-first {
|
|
56
|
+
position: absolute;
|
|
57
|
+
left: 0;
|
|
58
|
+
top: 0;
|
|
59
|
+
width: 50%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
opacity: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.rc-rate-rtl .rc-rate-star-first {
|
|
66
|
+
right: 0;
|
|
67
|
+
left: auto;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.rc-rate-star-half .rc-rate-star-first,
|
|
71
|
+
.rc-rate-star-half .rc-rate-star-second {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.rc-rate-star-half .rc-rate-star-first,
|
|
76
|
+
.rc-rate-star-full .rc-rate-star-second {
|
|
77
|
+
color: #f5a623;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.rc-rate-star-half:hover .rc-rate-star-first,
|
|
81
|
+
.rc-rate-star-full:hover .rc-rate-star-second {
|
|
82
|
+
color: tint(#f5a623, 30%);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@font-face {
|
|
86
|
+
font-family: 'anticon';
|
|
87
|
+
src: url("//at.alicdn.com/t/font_r5u29ls31bgldi.eot");
|
|
88
|
+
/* IE9*/
|
|
89
|
+
src: url("//at.alicdn.com/t/font_r5u29ls31bgldi.eot?#iefix") format("embedded-opentype"), url("//at.alicdn.com/t/font_r5u29ls31bgldi.woff") format("woff"), url("//at.alicdn.com/t/font_r5u29ls31bgldi.ttf") format("truetype"), url("//at.alicdn.com/t/font_r5u29ls31bgldi.svg#iconfont") format("svg");
|
|
90
|
+
/* iOS 4.1- */
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.anticon {
|
|
94
|
+
font-style: normal;
|
|
95
|
+
vertical-align: baseline;
|
|
96
|
+
text-align: center;
|
|
97
|
+
text-transform: none;
|
|
98
|
+
line-height: 1;
|
|
99
|
+
text-rendering: optimizeLegibility;
|
|
100
|
+
-webkit-font-smoothing: antialiased;
|
|
101
|
+
-moz-osx-font-smoothing: grayscale;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.anticon:before {
|
|
105
|
+
display: block;
|
|
106
|
+
font-family: 'anticon' !important;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.anticon-star:before {
|
|
110
|
+
content: '\e660';
|
|
111
|
+
}
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _rcRate = _interopRequireDefault(require("rc-rate"));
|
|
11
11
|
|
|
12
|
-
require("./index.
|
|
12
|
+
require("./index.css");
|
|
13
13
|
|
|
14
14
|
var _excluded = ["character", "defaultValue", "count", "allowHalf", "onChange", "disabled"];
|
|
15
15
|
|
|
@@ -33,14 +33,14 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
33
33
|
|
|
34
34
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
35
|
|
|
36
|
-
var prefix =
|
|
36
|
+
var prefix = "titaui-rich-editor-at";
|
|
37
37
|
|
|
38
38
|
var RichEditorAt = function RichEditorAt(_ref) {
|
|
39
39
|
var _ref$users = _ref.users,
|
|
40
40
|
users = _ref$users === void 0 ? [] : _ref$users,
|
|
41
41
|
onChange = _ref.onChange,
|
|
42
42
|
_ref$text = _ref.text,
|
|
43
|
-
text = _ref$text === void 0 ?
|
|
43
|
+
text = _ref$text === void 0 ? "" : _ref$text;
|
|
44
44
|
|
|
45
45
|
var _useState = (0, _react.useState)(users),
|
|
46
46
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -58,7 +58,7 @@ var RichEditorAt = function RichEditorAt(_ref) {
|
|
|
58
58
|
|
|
59
59
|
var handleDeleteUser = function handleDeleteUser(info) {
|
|
60
60
|
var newData = seleceUsers.filter(function (user) {
|
|
61
|
-
return user.userId !== info.
|
|
61
|
+
return user.userId !== info.userId;
|
|
62
62
|
});
|
|
63
63
|
setSelectUsers(newData);
|
|
64
64
|
|
|
@@ -67,6 +67,9 @@ var RichEditorAt = function RichEditorAt(_ref) {
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
+
(0, _react.useEffect)(function () {
|
|
71
|
+
setSelectUsers(users);
|
|
72
|
+
}, [users]);
|
|
70
73
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
71
74
|
className: prefix
|
|
72
75
|
}, text && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -82,7 +85,9 @@ var RichEditorAt = function RichEditorAt(_ref) {
|
|
|
82
85
|
userId: item.userId,
|
|
83
86
|
showNameTips: true,
|
|
84
87
|
canDelUser: true,
|
|
85
|
-
onDelUser:
|
|
88
|
+
onDelUser: function onDelUser() {
|
|
89
|
+
return handleDeleteUser(item);
|
|
90
|
+
},
|
|
86
91
|
color: item.avatar.color
|
|
87
92
|
}));
|
|
88
93
|
}), /*#__PURE__*/_react["default"].createElement(_userSelector["default"], {
|
|
@@ -65,6 +65,9 @@ var RichEditorUpload = function RichEditorUpload(_ref) {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
+
(0, _react.useEffect)(function () {
|
|
69
|
+
setAttachments(files);
|
|
70
|
+
}, [files]);
|
|
68
71
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
69
72
|
className: prefix
|
|
70
73
|
}, text && /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -19,7 +19,7 @@ var _getLocale = require("../../utils/getLocale");
|
|
|
19
19
|
|
|
20
20
|
require("./index.css");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["selected", "data", "onChange", "style", "mode", "className", "placeholder", "name", "noBorder"];
|
|
22
|
+
var _excluded = ["selected", "controlValue", "data", "onChange", "style", "mode", "className", "placeholder", "name", "noBorder"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
@@ -52,6 +52,7 @@ var preCls = "titaui-select-tags";
|
|
|
52
52
|
var SelectTags = function SelectTags(_ref) {
|
|
53
53
|
var _ref$selected = _ref.selected,
|
|
54
54
|
selected = _ref$selected === void 0 ? [] : _ref$selected,
|
|
55
|
+
controlValue = _ref.controlValue,
|
|
55
56
|
_ref$data = _ref.data,
|
|
56
57
|
data = _ref$data === void 0 ? [] : _ref$data,
|
|
57
58
|
onChange = _ref.onChange,
|
|
@@ -78,6 +79,11 @@ var SelectTags = function SelectTags(_ref) {
|
|
|
78
79
|
setValue(value);
|
|
79
80
|
};
|
|
80
81
|
|
|
82
|
+
(0, _react.useEffect)(function () {
|
|
83
|
+
if (controlValue) {
|
|
84
|
+
setValue(selected);
|
|
85
|
+
}
|
|
86
|
+
}, [selected]);
|
|
81
87
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
82
88
|
className: preCls
|
|
83
89
|
}, /*#__PURE__*/_react["default"].createElement(_rcSelect["default"], _extends({
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -11,8 +9,6 @@ var _axios = _interopRequireDefault(require("../utils/axios"));
|
|
|
11
9
|
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
11
|
|
|
14
|
-
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; }
|
|
15
|
-
|
|
16
12
|
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); } }
|
|
17
13
|
|
|
18
14
|
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); }); }; }
|
|
@@ -98,11 +94,11 @@ var hasCachedAssets = function hasCachedAssets(resVersion) {
|
|
|
98
94
|
};
|
|
99
95
|
|
|
100
96
|
var getAssetsWithCache = /*#__PURE__*/function () {
|
|
101
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
97
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
102
98
|
var _res$;
|
|
103
99
|
|
|
104
100
|
var res, cacheAssets, resVersion, assetsUri;
|
|
105
|
-
return
|
|
101
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
106
102
|
while (1) {
|
|
107
103
|
switch (_context.prev = _context.next) {
|
|
108
104
|
case 0:
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -13,16 +11,14 @@ var _getAssetsWithCache = _interopRequireDefault(require("./get-assets-with-cach
|
|
|
13
11
|
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
13
|
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
14
|
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); } }
|
|
19
15
|
|
|
20
16
|
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); }); }; }
|
|
21
17
|
|
|
22
18
|
var getAssetsAndAppend = /*#__PURE__*/function () {
|
|
23
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
19
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
24
20
|
var assets, execute;
|
|
25
|
-
return
|
|
21
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
26
22
|
while (1) {
|
|
27
23
|
switch (_context.prev = _context.next) {
|
|
28
24
|
case 0:
|
|
@@ -51,8 +47,8 @@ var getAssetsAndAppend = /*#__PURE__*/function () {
|
|
|
51
47
|
var SingletonFetchAssetsAndAppend = function SingletonFetchAssetsAndAppend() {
|
|
52
48
|
var instance;
|
|
53
49
|
return /*#__PURE__*/function () {
|
|
54
|
-
var _Singlenton = _asyncToGenerator( /*#__PURE__*/
|
|
55
|
-
return
|
|
50
|
+
var _Singlenton = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
51
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
56
52
|
while (1) {
|
|
57
53
|
switch (_context2.prev = _context2.next) {
|
|
58
54
|
case 0:
|