ent-unified-logon-template 0.0.1-security → 3.14.5
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.
Potentially problematic release.
This version of ent-unified-logon-template might be problematic. Click here for more details.
- package/lib/common/components/body-wrapper.js +116 -0
- package/lib/common/components/disclosure.js +192 -0
- package/lib/common/components/exit-dialog-trigger.js +180 -0
- package/lib/common/components/footer/disclosure-list.js +119 -0
- package/lib/common/components/footer/footer.js +132 -0
- package/lib/common/components/footer/footnote-list.js +93 -0
- package/lib/common/components/footnote.js +179 -0
- package/lib/common/components/page-header/skip-to-content.js +115 -0
- package/lib/common/components/printer-wrapper.js +98 -0
- package/lib/common/components/prodqa-banner.js +89 -0
- package/lib/common/components/render-watcher.js +66 -0
- package/lib/common/components/screen-share.js +219 -0
- package/lib/common/components/session-storage-error.js +39 -0
- package/lib/common/components/wcm-display.js +416 -0
- package/lib/common/redux/disclosures/disclosures-actions.js +27 -0
- package/lib/common/redux/disclosures/disclosures-reducer.js +112 -0
- package/lib/common/redux/footnotes/footnotes-actions.js +38 -0
- package/lib/common/redux/footnotes/footnotes-reducer.js +107 -0
- package/lib/common/redux/get-create-store.js +83 -0
- package/lib/common/redux/profile.js +50 -0
- package/lib/common/redux/template-connect.js +24 -0
- package/lib/common/usaa-template-common-hoc.js +80 -0
- package/lib/common/usaa-template-common.js +178 -0
- package/lib/common/util/a11y.js +45 -0
- package/lib/common/util/check-storage-availability.js +37 -0
- package/lib/common/util/ecid.js +66 -0
- package/lib/common/util/get-profile-analytics.js +186 -0
- package/lib/common/util/get-profile-base-data.js +44 -0
- package/lib/common/util/load-utag.js +46 -0
- package/lib/common/util/main-content-id.js +9 -0
- package/lib/common/util/parse-wcm-xml.js +125 -0
- package/lib/common/util/screenshare-iframe.js +90 -0
- package/lib/common/util/string-utils.js +25 -0
- package/lib/common/util/wcm-retriever.js +44 -0
- package/lib/common/wcm-component-loaders.js +30 -0
- package/lib/index.js +28 -0
- package/lib/transactional/components/Link.js +79 -0
- package/lib/transactional/components/Logo.js +35 -0
- package/lib/transactional/components/header.js +159 -0
- package/lib/transactional/components/native-underhang.js +73 -0
- package/lib/transactional/index.js +20 -0
- package/lib/transactional/usaa-template-transactional.js +288 -0
- package/lib/transactional/utils/component-constants.js +26 -0
- package/lib/transactional/utils/getBaseURL.js +39 -0
- package/package.json +24 -4
- package/README.md +0 -5
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Footer = exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _templateConnect = _interopRequireDefault(require("../../redux/template-connect"));
|
|
15
|
+
|
|
16
|
+
var _disclosureList = _interopRequireWildcard(require("./disclosure-list"));
|
|
17
|
+
|
|
18
|
+
var _footnoteList = _interopRequireDefault(require("./footnote-list"));
|
|
19
|
+
|
|
20
|
+
require("./footer.css");
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
|
|
25
|
+
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
28
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
|
+
|
|
30
|
+
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); } }
|
|
31
|
+
|
|
32
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
33
|
+
|
|
34
|
+
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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
35
|
+
|
|
36
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
|
+
|
|
38
|
+
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); }; }
|
|
39
|
+
|
|
40
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
41
|
+
|
|
42
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
43
|
+
|
|
44
|
+
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; } }
|
|
45
|
+
|
|
46
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
47
|
+
|
|
48
|
+
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; }
|
|
49
|
+
|
|
50
|
+
var Footer = /*#__PURE__*/function (_React$Component) {
|
|
51
|
+
_inherits(Footer, _React$Component);
|
|
52
|
+
|
|
53
|
+
var _super = _createSuper(Footer);
|
|
54
|
+
|
|
55
|
+
function Footer() {
|
|
56
|
+
_classCallCheck(this, Footer);
|
|
57
|
+
|
|
58
|
+
return _super.apply(this, arguments);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
_createClass(Footer, [{
|
|
62
|
+
key: "render",
|
|
63
|
+
value: function render() {
|
|
64
|
+
var className = this.props.className;
|
|
65
|
+
var copyright, icons;
|
|
66
|
+
var addCopyright = true;
|
|
67
|
+
var addIcons = true;
|
|
68
|
+
|
|
69
|
+
if (process.env.USAA_PLATFORM === 'native') {
|
|
70
|
+
// don't render footer in native platform if there are no footnotes or disclosures
|
|
71
|
+
if (this.props.footnotes.length === 0 && this.props.disclosures.length === 0) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
addCopyright = false;
|
|
76
|
+
addIcons = false;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (addCopyright) {
|
|
80
|
+
var currentYear = new Date().getFullYear();
|
|
81
|
+
copyright = /*#__PURE__*/_react.default.createElement("p", {
|
|
82
|
+
className: "".concat(className, "-copyright")
|
|
83
|
+
}, "Copyright \xA9 ", currentYear, " USAA.");
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (addIcons) {
|
|
87
|
+
icons = /*#__PURE__*/_react.default.createElement("div", {
|
|
88
|
+
className: "".concat(className, "-icons")
|
|
89
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
+
className: "".concat(className, "-logo")
|
|
91
|
+
}, "USAA Logo"));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
className: className,
|
|
96
|
+
"aria-hidden": this.props.ariaHidden
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement("footer", {
|
|
98
|
+
className: "".concat(className, "-footer")
|
|
99
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
100
|
+
className: "".concat(className, "-content")
|
|
101
|
+
}, copyright, /*#__PURE__*/_react.default.createElement(_disclosureList.default, {
|
|
102
|
+
location: _disclosureList.ABOVE_FOOTNOTES
|
|
103
|
+
}), /*#__PURE__*/_react.default.createElement(_footnoteList.default, null), /*#__PURE__*/_react.default.createElement(_disclosureList.default, null), icons)));
|
|
104
|
+
}
|
|
105
|
+
}]);
|
|
106
|
+
|
|
107
|
+
return Footer;
|
|
108
|
+
}(_react.default.Component);
|
|
109
|
+
|
|
110
|
+
exports.Footer = Footer;
|
|
111
|
+
|
|
112
|
+
_defineProperty(Footer, "propTypes", {
|
|
113
|
+
ariaHidden: _propTypes.default.bool,
|
|
114
|
+
className: _propTypes.default.string.isRequired,
|
|
115
|
+
disclosures: _propTypes.default.array,
|
|
116
|
+
footnotes: _propTypes.default.array
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
_defineProperty(Footer, "defaultProps", {
|
|
120
|
+
footnotes: []
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
var _default = (0, _templateConnect.default)(function (state) {
|
|
124
|
+
return {
|
|
125
|
+
footnotes: state.template.footnotes,
|
|
126
|
+
disclosures: state.template.disclosures
|
|
127
|
+
};
|
|
128
|
+
})(Footer); // non-connected component for testing
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
exports.default = _default;
|
|
132
|
+
//# sourceMappingURL=footer.js.map
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.FootnoteList = exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _templateConnect = _interopRequireDefault(require("../../redux/template-connect"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
|
+
|
|
20
|
+
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); } }
|
|
21
|
+
|
|
22
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
23
|
+
|
|
24
|
+
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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
|
+
|
|
26
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
|
+
|
|
28
|
+
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); }; }
|
|
29
|
+
|
|
30
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
31
|
+
|
|
32
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
+
|
|
34
|
+
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; } }
|
|
35
|
+
|
|
36
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
var FootnoteList = /*#__PURE__*/function (_React$Component) {
|
|
41
|
+
_inherits(FootnoteList, _React$Component);
|
|
42
|
+
|
|
43
|
+
var _super = _createSuper(FootnoteList);
|
|
44
|
+
|
|
45
|
+
function FootnoteList() {
|
|
46
|
+
_classCallCheck(this, FootnoteList);
|
|
47
|
+
|
|
48
|
+
return _super.apply(this, arguments);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
_createClass(FootnoteList, [{
|
|
52
|
+
key: "render",
|
|
53
|
+
value: function render() {
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
+
className: "pageFooter-footnotes"
|
|
56
|
+
}, this.props.footnotes.map(function (footnote, index) {
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement("p", {
|
|
58
|
+
key: footnote.id
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
60
|
+
className: "screenReader"
|
|
61
|
+
}, "Note "), /*#__PURE__*/_react.default.createElement("span", {
|
|
62
|
+
className: "pageFooter-footnoteIndex"
|
|
63
|
+
}, index + 1), ' ', /*#__PURE__*/_react.default.createElement("span", {
|
|
64
|
+
dangerouslySetInnerHTML: {
|
|
65
|
+
__html: footnote.text
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
}]);
|
|
71
|
+
|
|
72
|
+
return FootnoteList;
|
|
73
|
+
}(_react.default.Component);
|
|
74
|
+
|
|
75
|
+
exports.FootnoteList = FootnoteList;
|
|
76
|
+
|
|
77
|
+
_defineProperty(FootnoteList, "propTypes", {
|
|
78
|
+
footnotes: _propTypes.default.array
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
_defineProperty(FootnoteList, "defaultProps", {
|
|
82
|
+
footnotes: []
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
var _default = (0, _templateConnect.default)(function (state) {
|
|
86
|
+
return {
|
|
87
|
+
footnotes: state.template.footnotes
|
|
88
|
+
};
|
|
89
|
+
})(FootnoteList); // non-connected component for testing
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
exports.default = _default;
|
|
93
|
+
//# sourceMappingURL=footnote-list.js.map
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Footnote = exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _templateConnect = _interopRequireDefault(require("../redux/template-connect"));
|
|
15
|
+
|
|
16
|
+
var footnoteActions = _interopRequireWildcard(require("../redux/footnotes/footnotes-actions"));
|
|
17
|
+
|
|
18
|
+
var _wcmRetriever = _interopRequireDefault(require("usaa-wcm-utils/lib/wcm-retriever"));
|
|
19
|
+
|
|
20
|
+
var _usaaLogger = _interopRequireDefault(require("usaa-logger"));
|
|
21
|
+
|
|
22
|
+
var _stringUtils = require("../util/string-utils");
|
|
23
|
+
|
|
24
|
+
var _shared = require("../../shared");
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
+
|
|
32
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
33
|
+
|
|
34
|
+
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); } }
|
|
35
|
+
|
|
36
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
37
|
+
|
|
38
|
+
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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
39
|
+
|
|
40
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
41
|
+
|
|
42
|
+
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); }; }
|
|
43
|
+
|
|
44
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
45
|
+
|
|
46
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
47
|
+
|
|
48
|
+
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; } }
|
|
49
|
+
|
|
50
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
51
|
+
|
|
52
|
+
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; }
|
|
53
|
+
|
|
54
|
+
var logger = new _usaaLogger.default();
|
|
55
|
+
|
|
56
|
+
var Footnote = /*#__PURE__*/function (_React$Component) {
|
|
57
|
+
_inherits(Footnote, _React$Component);
|
|
58
|
+
|
|
59
|
+
var _super = _createSuper(Footnote);
|
|
60
|
+
|
|
61
|
+
function Footnote(props) {
|
|
62
|
+
var _this;
|
|
63
|
+
|
|
64
|
+
_classCallCheck(this, Footnote);
|
|
65
|
+
|
|
66
|
+
_this = _super.call(this, props);
|
|
67
|
+
|
|
68
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
69
|
+
id: ''
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
_defineProperty(_assertThisInitialized(_this), "getWcmDataAndUpdateFootnote", function (isLoggedIn) {
|
|
73
|
+
(0, _wcmRetriever.default)(_this.props.wcmKey, isLoggedIn).then(function (response) {
|
|
74
|
+
_this.props.dispatch(footnoteActions.updateFootnoteText(_this.state.id, response.mainContent));
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
if (props.wcmKey) {
|
|
79
|
+
_this.state.id = props.wcmKey;
|
|
80
|
+
} else if (props.text) {
|
|
81
|
+
_this.state.id = "customFootnote-".concat((0, _stringUtils.hashCode)(props.text));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return _this;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
_createClass(Footnote, [{
|
|
88
|
+
key: "componentDidMount",
|
|
89
|
+
value: function componentDidMount() {
|
|
90
|
+
var _this2 = this;
|
|
91
|
+
|
|
92
|
+
if (this.props.wcmKey) {
|
|
93
|
+
// add a general placeholder before we get actual footnote content from WCM
|
|
94
|
+
this.props.dispatch(footnoteActions.addFootnote({
|
|
95
|
+
id: this.state.id
|
|
96
|
+
}));
|
|
97
|
+
(0, _shared.getGuid)().then(function () {
|
|
98
|
+
_this2.getWcmDataAndUpdateFootnote(true);
|
|
99
|
+
}, function () {
|
|
100
|
+
_this2.getWcmDataAndUpdateFootnote(false);
|
|
101
|
+
});
|
|
102
|
+
} else if (this.props.text) {
|
|
103
|
+
var text = this.props.text;
|
|
104
|
+
|
|
105
|
+
if (typeof text !== 'string') {
|
|
106
|
+
logger.log('footnote not using string - discarding footnote!');
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
this.props.dispatch(footnoteActions.addFootnote({
|
|
111
|
+
id: this.state.id,
|
|
112
|
+
text: text
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, {
|
|
117
|
+
key: "componentDidUpdate",
|
|
118
|
+
value: function componentDidUpdate(prevProps) {
|
|
119
|
+
var _this$props = this.props,
|
|
120
|
+
dispatch = _this$props.dispatch,
|
|
121
|
+
text = _this$props.text;
|
|
122
|
+
|
|
123
|
+
if (text && text !== prevProps.text) {
|
|
124
|
+
if (typeof text !== 'string') {
|
|
125
|
+
logger.log('new footnote text is not a string - discarding update!');
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
dispatch(footnoteActions.updateFootnoteText(this.state.id, text));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, {
|
|
133
|
+
key: "componentWillUnmount",
|
|
134
|
+
value: function componentWillUnmount() {
|
|
135
|
+
if (this.state.id) {
|
|
136
|
+
this.props.dispatch(footnoteActions.removeFootnote(this.state.id));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
key: "render",
|
|
141
|
+
value: function render() {
|
|
142
|
+
var _this3 = this;
|
|
143
|
+
|
|
144
|
+
var superscript, footnoteIndex;
|
|
145
|
+
var footnote = this.props.allFootnotes.find(function (currentFootnote, index) {
|
|
146
|
+
footnoteIndex = index;
|
|
147
|
+
return _this3.state.id === currentFootnote.id;
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
if (footnote) {
|
|
151
|
+
superscript = footnoteIndex + 1;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return /*#__PURE__*/_react.default.createElement("sup", null, /*#__PURE__*/_react.default.createElement("span", {
|
|
155
|
+
className: "screenReader"
|
|
156
|
+
}, "see note "), superscript);
|
|
157
|
+
}
|
|
158
|
+
}]);
|
|
159
|
+
|
|
160
|
+
return Footnote;
|
|
161
|
+
}(_react.default.Component);
|
|
162
|
+
|
|
163
|
+
exports.Footnote = Footnote;
|
|
164
|
+
|
|
165
|
+
_defineProperty(Footnote, "propTypes", {
|
|
166
|
+
allFootnotes: _propTypes.default.array,
|
|
167
|
+
text: _propTypes.default.string,
|
|
168
|
+
wcmKey: _propTypes.default.string
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
var _default = (0, _templateConnect.default)(function (state) {
|
|
172
|
+
return {
|
|
173
|
+
allFootnotes: state.template.footnotes
|
|
174
|
+
};
|
|
175
|
+
})(Footnote); // export non-connected component for testing
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
exports.default = _default;
|
|
179
|
+
//# sourceMappingURL=footnote.js.map
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var _mainContentId = _interopRequireDefault(require("../../util/main-content-id"));
|
|
17
|
+
|
|
18
|
+
require("./skip-to-content.css");
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
|
+
|
|
30
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
|
+
|
|
32
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
33
|
+
|
|
34
|
+
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); } }
|
|
35
|
+
|
|
36
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
37
|
+
|
|
38
|
+
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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
39
|
+
|
|
40
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
41
|
+
|
|
42
|
+
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); }; }
|
|
43
|
+
|
|
44
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
45
|
+
|
|
46
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
47
|
+
|
|
48
|
+
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; } }
|
|
49
|
+
|
|
50
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
51
|
+
|
|
52
|
+
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; }
|
|
53
|
+
|
|
54
|
+
var SkipToContent = /*#__PURE__*/function (_Component) {
|
|
55
|
+
_inherits(SkipToContent, _Component);
|
|
56
|
+
|
|
57
|
+
var _super = _createSuper(SkipToContent);
|
|
58
|
+
|
|
59
|
+
function SkipToContent() {
|
|
60
|
+
var _this;
|
|
61
|
+
|
|
62
|
+
_classCallCheck(this, SkipToContent);
|
|
63
|
+
|
|
64
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
65
|
+
args[_key] = arguments[_key];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
69
|
+
|
|
70
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
71
|
+
isFocused: false
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
return _this;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
_createClass(SkipToContent, [{
|
|
78
|
+
key: "render",
|
|
79
|
+
value: function render() {
|
|
80
|
+
var _this2 = this;
|
|
81
|
+
|
|
82
|
+
var _this$props = this.props,
|
|
83
|
+
contentHijack = _this$props.contentHijack,
|
|
84
|
+
remainingProps = _objectWithoutProperties(_this$props, ["contentHijack"]);
|
|
85
|
+
|
|
86
|
+
var skipToContentClasses = (0, _classnames.default)('usaa-skipToContent', {
|
|
87
|
+
screenReader: this.state.isFocused === false
|
|
88
|
+
});
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement("a", _extends({
|
|
90
|
+
href: contentHijack ? '#contentHijackId' : "#".concat(_mainContentId.default),
|
|
91
|
+
className: skipToContentClasses,
|
|
92
|
+
accessKey: "2",
|
|
93
|
+
onFocus: function onFocus() {
|
|
94
|
+
return _this2.setState({
|
|
95
|
+
isFocused: true
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
onBlur: function onBlur() {
|
|
99
|
+
return _this2.setState({
|
|
100
|
+
isFocused: false
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}, remainingProps), "Skip to Content");
|
|
104
|
+
}
|
|
105
|
+
}]);
|
|
106
|
+
|
|
107
|
+
return SkipToContent;
|
|
108
|
+
}(_react.Component);
|
|
109
|
+
|
|
110
|
+
exports.default = SkipToContent;
|
|
111
|
+
|
|
112
|
+
_defineProperty(SkipToContent, "propTypes", {
|
|
113
|
+
contentHijack: _propTypes.default.bool
|
|
114
|
+
});
|
|
115
|
+
//# sourceMappingURL=skip-to-content.js.map
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _gridLayout = require("usaa-css-grids/lib/js/gridLayout");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
|
+
|
|
20
|
+
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); } }
|
|
21
|
+
|
|
22
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
23
|
+
|
|
24
|
+
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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
|
+
|
|
26
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
|
+
|
|
28
|
+
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); }; }
|
|
29
|
+
|
|
30
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
31
|
+
|
|
32
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
+
|
|
34
|
+
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; } }
|
|
35
|
+
|
|
36
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
var PrinterWrapper = /*#__PURE__*/function (_React$Component) {
|
|
41
|
+
_inherits(PrinterWrapper, _React$Component);
|
|
42
|
+
|
|
43
|
+
var _super = _createSuper(PrinterWrapper);
|
|
44
|
+
|
|
45
|
+
function PrinterWrapper() {
|
|
46
|
+
var _this;
|
|
47
|
+
|
|
48
|
+
_classCallCheck(this, PrinterWrapper);
|
|
49
|
+
|
|
50
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
|
+
args[_key] = arguments[_key];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
55
|
+
|
|
56
|
+
_defineProperty(_assertThisInitialized(_this), "handleBeforePrint", function () {
|
|
57
|
+
var wrapper = document.getElementsByClassName(_this.props.printElement);
|
|
58
|
+
var classNames = "".concat(_this.props.printElement, " ").concat((0, _gridLayout.getGridLayoutClasses)(wrapper[0], true).join(' '));
|
|
59
|
+
wrapper[0].className = classNames;
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
_defineProperty(_assertThisInitialized(_this), "handleAfterPrint", function () {
|
|
63
|
+
var wrapper = document.getElementsByClassName(_this.props.printElement);
|
|
64
|
+
var classNames = "".concat(_this.props.printElement, " ").concat((0, _gridLayout.getGridLayoutClasses)(wrapper[0]).join(' '));
|
|
65
|
+
wrapper[0].className = classNames;
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
return _this;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
_createClass(PrinterWrapper, [{
|
|
72
|
+
key: "componentDidMount",
|
|
73
|
+
value: function componentDidMount() {
|
|
74
|
+
window.addEventListener('beforeprint', this.handleBeforePrint);
|
|
75
|
+
window.addEventListener('afterprint', this.handleAfterPrint);
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
key: "componentWillUnmount",
|
|
79
|
+
value: function componentWillUnmount() {
|
|
80
|
+
window.removeEventListener('beforeprint', this.handleBeforePrint);
|
|
81
|
+
window.removeEventListener('afterprint', this.handleAfterPrint);
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
key: "render",
|
|
85
|
+
value: function render() {
|
|
86
|
+
return this.props.children;
|
|
87
|
+
}
|
|
88
|
+
}]);
|
|
89
|
+
|
|
90
|
+
return PrinterWrapper;
|
|
91
|
+
}(_react.default.Component);
|
|
92
|
+
|
|
93
|
+
exports.default = PrinterWrapper;
|
|
94
|
+
|
|
95
|
+
_defineProperty(PrinterWrapper, "propTypes", {
|
|
96
|
+
printElement: _propTypes.default.string.isRequired
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=printer-wrapper.js.map
|