@redhat-cloud-services/frontend-components 4.0.9 → 4.0.10
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.
|
@@ -8,5 +8,5 @@ export interface AsyncComponentProps extends React.DetailedHTMLProps<React.HTMLA
|
|
|
8
8
|
component: keyof JSX.IntrinsicElements;
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
}
|
|
11
|
-
declare const
|
|
12
|
-
export default
|
|
11
|
+
export declare const AsyncComponent: React.ForwardRefExoticComponent<Omit<AsyncComponentProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
12
|
+
export default AsyncComponent;
|
package/AsyncComponent/index.js
CHANGED
|
@@ -25,6 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.AsyncComponent = void 0;
|
|
28
29
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
29
30
|
var react_1 = __importDefault(require("react"));
|
|
30
31
|
var react_core_1 = require("@scalprum/react-core");
|
|
@@ -32,9 +33,9 @@ var react_core_2 = require("@patternfly/react-core");
|
|
|
32
33
|
var classnames_1 = __importDefault(require("classnames"));
|
|
33
34
|
var BaseAsyncComponent = function (_a) {
|
|
34
35
|
var appName = _a.appName, scope = _a.scope, module = _a.module, _b = _a.fallback, fallback = _b === void 0 ? ((0, jsx_runtime_1.jsx)(react_core_2.Bullseye, { children: (0, jsx_runtime_1.jsx)(react_core_2.Spinner, { size: "xl" }) })) : _b, innerRef = _a.innerRef, className = _a.className, _c = _a.component, Cmp = _c === void 0 ? 'section' : _c, props = __rest(_a, ["appName", "scope", "module", "fallback", "innerRef", "className", "component"]);
|
|
35
|
-
var SCProps = __assign({ className: className, appName: appName, module: module, scope: scope !== null && scope !== void 0 ? scope : appName,
|
|
36
|
+
var SCProps = __assign({ className: className, appName: appName, module: module, scope: scope !== null && scope !== void 0 ? scope : appName, ref: innerRef, fallback: fallback }, props);
|
|
36
37
|
return ((0, jsx_runtime_1.jsx)(Cmp, { className: (0, classnames_1.default)(className, appName), children: (0, jsx_runtime_1.jsx)(react_core_1.ScalprumComponent, __assign({}, SCProps)) }));
|
|
37
38
|
};
|
|
38
|
-
|
|
39
|
-
exports.default =
|
|
39
|
+
exports.AsyncComponent = react_1.default.forwardRef(function (props, ref) { return (0, jsx_runtime_1.jsx)(BaseAsyncComponent, __assign({ innerRef: ref }, props)); });
|
|
40
|
+
exports.default = exports.AsyncComponent;
|
|
40
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/AsyncComponent/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/AsyncComponent/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,mDAAiF;AACjF,qDAA2D;AAC3D,0DAAoC;AAwBpC,IAAM,kBAAkB,GAAqD,UAAC,EAa7E;IAZC,IAAA,OAAO,aAAA,EACP,KAAK,WAAA,EACL,MAAM,YAAA,EACN,gBAIC,EAJD,QAAQ,mBAAG,CACT,uBAAC,qBAAQ,cACP,uBAAC,oBAAO,IAAC,IAAI,EAAC,IAAI,GAAG,GACZ,CACZ,KAAA,EACD,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,iBAA0B,EAAf,GAAG,mBAAG,SAAS,KAAA,EACvB,KAAK,cAZoE,gFAa7E,CADS;IAER,IAAM,OAAO,cACX,SAAS,WAAA,EACT,OAAO,SAAA,EACP,MAAM,QAAA,EACN,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,OAAO,EACvB,GAAG,EAAE,QAAQ,EACb,QAAQ,UAAA,IACL,KAAK,CACT,CAAC;IACF,OAAO,CACL,uBAAC,GAAG,IAAC,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE,OAAO,CAAC,YAC5C,uBAAC,8BAAiB,eAAK,OAAO,EAAI,GAC9B,CACP,CAAC;AACJ,CAAC,CAAC;AAQW,QAAA,cAAc,GAAG,eAAK,CAAC,UAAU,CAAmC,UAAC,KAAK,EAAE,GAAG,IAAK,OAAA,uBAAC,kBAAkB,aAAC,QAAQ,EAAE,GAAG,IAAM,KAAK,EAAI,EAAhD,CAAgD,CAAC,CAAC;AAEnJ,kBAAe,sBAAc,CAAC"}
|
|
@@ -28,9 +28,9 @@ import { Spinner } from "@patternfly/react-core/dist/dynamic/components/Spinner"
|
|
|
28
28
|
import classNames from 'classnames';
|
|
29
29
|
var BaseAsyncComponent = function (_a) {
|
|
30
30
|
var appName = _a.appName, scope = _a.scope, module = _a.module, _b = _a.fallback, fallback = _b === void 0 ? (_jsx(Bullseye, { children: _jsx(Spinner, { size: "xl" }) })) : _b, innerRef = _a.innerRef, className = _a.className, _c = _a.component, Cmp = _c === void 0 ? 'section' : _c, props = __rest(_a, ["appName", "scope", "module", "fallback", "innerRef", "className", "component"]);
|
|
31
|
-
var SCProps = __assign({ className: className, appName: appName, module: module, scope: scope !== null && scope !== void 0 ? scope : appName,
|
|
31
|
+
var SCProps = __assign({ className: className, appName: appName, module: module, scope: scope !== null && scope !== void 0 ? scope : appName, ref: innerRef, fallback: fallback }, props);
|
|
32
32
|
return (_jsx(Cmp, { className: classNames(className, appName), children: _jsx(ScalprumComponent, __assign({}, SCProps)) }));
|
|
33
33
|
};
|
|
34
|
-
var
|
|
35
|
-
export default
|
|
34
|
+
export var AsyncComponent = React.forwardRef(function (props, ref) { return _jsx(BaseAsyncComponent, __assign({ innerRef: ref }, props)); });
|
|
35
|
+
export default AsyncComponent;
|
|
36
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/AsyncComponent/index.t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