1 | "use strict";
|
2 | var __assign = (this && this.__assign) || function () {
|
3 | __assign = Object.assign || function(t) {
|
4 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5 | s = arguments[i];
|
6 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7 | t[p] = s[p];
|
8 | }
|
9 | return t;
|
10 | };
|
11 | return __assign.apply(this, arguments);
|
12 | };
|
13 | var __importStar = (this && this.__importStar) || function (mod) {
|
14 | if (mod && mod.__esModule) return mod;
|
15 | var result = {};
|
16 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
17 | result["default"] = mod;
|
18 | return result;
|
19 | };
|
20 | Object.defineProperty(exports, "__esModule", { value: true });
|
21 | var React = __importStar(require("react"));
|
22 | var useUtils_1 = require("./hooks/useUtils");
|
23 | exports.withUtils = function () { return function (Component) {
|
24 | var WithUtils = function (props) {
|
25 | var utils = useUtils_1.useUtils();
|
26 | return React.createElement(Component, __assign({ utils: utils }, props));
|
27 | };
|
28 | WithUtils.displayName = "WithUtils(" + (Component.displayName || Component.name) + ")";
|
29 | return WithUtils;
|
30 | }; };
|