@redhat-cloud-services/frontend-components 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AsyncComponent/index.d.ts +5 -5
- package/AsyncComponent/index.js +6 -3
- package/AsyncComponent/index.js.map +1 -1
- package/Inventory/TagWithDialog.js +2 -1
- package/Inventory/TagWithDialog.js.map +1 -1
- package/esm/AsyncComponent/index.d.ts +5 -5
- package/esm/AsyncComponent/index.js +4 -1
- package/esm/AsyncComponent/index.js.map +1 -1
- package/esm/Inventory/TagWithDialog.js +2 -1
- package/esm/Inventory/TagWithDialog.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type ExcludeModulesKeys = 'module' | 'scope';
|
|
3
|
-
export type AsyncComponentProps = {
|
|
3
|
+
export type AsyncComponentProps<T extends object = object> = {
|
|
4
4
|
module: string;
|
|
5
5
|
scope: string;
|
|
6
|
-
fallback
|
|
7
|
-
component
|
|
8
|
-
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement
|
|
9
|
-
export declare
|
|
6
|
+
fallback?: React.ReactElement;
|
|
7
|
+
component?: keyof JSX.IntrinsicElements;
|
|
8
|
+
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & T;
|
|
9
|
+
export declare function AsyncComponent<T extends object = object>(props: AsyncComponentProps & T): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default AsyncComponent;
|
package/AsyncComponent/index.js
CHANGED
|
@@ -25,7 +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 =
|
|
28
|
+
exports.AsyncComponent = AsyncComponent;
|
|
29
29
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
30
30
|
var react_1 = __importDefault(require("react"));
|
|
31
31
|
var react_core_1 = require("@scalprum/react-core");
|
|
@@ -37,6 +37,9 @@ var BaseAsyncComponent = function (_a) {
|
|
|
37
37
|
var SCProps = __assign({ className: className, module: module, scope: scope, ref: innerRef, fallback: fallback }, props);
|
|
38
38
|
return ((0, jsx_runtime_1.jsx)(Cmp, { className: (0, classnames_1.default)(className, scope), children: (0, jsx_runtime_1.jsx)(react_core_1.ScalprumComponent, __assign({}, SCProps)) }));
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
var InternalSyncComponent = react_1.default.forwardRef(function (props, ref) { return (0, jsx_runtime_1.jsx)(BaseAsyncComponent, __assign({ innerRef: ref }, props)); });
|
|
41
|
+
function AsyncComponent(props) {
|
|
42
|
+
return (0, jsx_runtime_1.jsx)(InternalSyncComponent, __assign({}, props));
|
|
43
|
+
}
|
|
44
|
+
exports.default = AsyncComponent;
|
|
42
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/components/src/AsyncComponent/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/components/src/AsyncComponent/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,wCAEC;;AA9DD,gDAA0B;AAC1B,mDAAiF;AACjF,iFAAgF;AAChF,kFAAiF;AACjF,0DAAoC;AAqBpC,IAAM,kBAAkB,GAAqD,UAAC,EAY7E;IAXC,IAAA,KAAK,WAAA,EACL,MAAM,YAAA,EACN,gBAIC,EAJD,QAAQ,mBAAG,CACT,uBAAC,mBAAQ,cACP,uBAAC,iBAAO,IAAC,IAAI,EAAC,IAAI,GAAG,GACZ,CACZ,KAAA,EACD,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,iBAA0B,EAAf,GAAG,mBAAG,SAAS,KAAA,EACvB,KAAK,cAXoE,qEAY7E,CADS;IAER,IAAM,OAAO,cACX,SAAS,WAAA,EACT,MAAM,QAAA,EACN,KAAK,OAAA,EACL,GAAG,EAAE,QAAQ,EACb,QAAQ,UAAA,IACL,KAAK,CACT,CAAC;IACF,OAAO,CACL,uBAAC,GAAG,IAAC,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE,KAAK,CAAC,YAC1C,uBAAC,8BAAiB,eAAK,OAAO,EAAI,GAC9B,CACP,CAAC;AACJ,CAAC,CAAC;AAQF,IAAM,qBAAqB,GAAG,eAAK,CAAC,UAAU,CAAmC,UAAC,KAAK,EAAE,GAAG,IAAK,OAAA,uBAAC,kBAAkB,aAAC,QAAQ,EAAE,GAAG,IAAM,KAAK,EAAI,EAAhD,CAAgD,CAAC,CAAC;AACnJ,SAAgB,cAAc,CAA4B,KAA8B;IACtF,OAAO,uBAAC,qBAAqB,eAAK,KAAK,EAAI,CAAC;AAC9C,CAAC;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -58,8 +58,9 @@ var InventoryLoadError_1 = __importDefault(require("./InventoryLoadError"));
|
|
|
58
58
|
var classnames_1 = __importDefault(require("classnames"));
|
|
59
59
|
var WithHistory_1 = __importDefault(require("./WithHistory"));
|
|
60
60
|
var BaseTagWithDialog = function (props) {
|
|
61
|
+
var _a;
|
|
61
62
|
var store = (0, react_redux_1.useStore)();
|
|
62
|
-
var Cmp = props.component;
|
|
63
|
+
var Cmp = (_a = props.component) !== null && _a !== void 0 ? _a : 'section';
|
|
63
64
|
var SCProps = __assign({ history: props.history, store: store, module: './TagWithDialog', scope: 'inventory', ErrorComponent: (0, jsx_runtime_1.jsx)(InventoryLoadError_1.default, __assign({}, props, { component: "InventoryDetailHead" })), ref: props.innerRef }, props);
|
|
64
65
|
return ((0, jsx_runtime_1.jsx)(Cmp, { className: (0, classnames_1.default)(props.className, 'inventory'), children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: props.fallback, children: (0, jsx_runtime_1.jsx)(react_core_1.ScalprumComponent, __assign({}, SCProps)) }) }));
|
|
65
66
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagWithDialog.js","sourceRoot":"","sources":["../../../../packages/components/src/Inventory/TagWithDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAwC;AACxC,mDAAiF;AACjF,2CAAuC;AACvC,iFAAgF;AAChF,kFAAiF;AACjF,4EAAsD;AACtD,0DAAoC;AAGpC,8DAAwC;AASxC,IAAM,iBAAiB,GAA6G,UAAC,KAAK
|
|
1
|
+
{"version":3,"file":"TagWithDialog.js","sourceRoot":"","sources":["../../../../packages/components/src/Inventory/TagWithDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAwC;AACxC,mDAAiF;AACjF,2CAAuC;AACvC,iFAAgF;AAChF,kFAAiF;AACjF,4EAAsD;AACtD,0DAAoC;AAGpC,8DAAwC;AASxC,IAAM,iBAAiB,GAA6G,UAAC,KAAK;;IACxI,IAAM,KAAK,GAAG,IAAA,sBAAQ,GAAE,CAAC;IACzB,IAAM,GAAG,GAAG,MAAA,KAAK,CAAC,SAAS,mCAAI,SAAS,CAAC;IACzC,IAAM,OAAO,cACX,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,KAAK,OAAA,EACL,MAAM,EAAE,iBAAiB,EACzB,KAAK,EAAE,WAAW,EAClB,cAAc,EAAE,uBAAC,4BAAkB,eAAK,KAAK,IAAE,SAAS,EAAC,qBAAqB,IAAG,EACjF,GAAG,EAAE,KAAK,CAAC,QAAQ,IAChB,KAAK,CACT,CAAC;IACF,OAAO,CACL,uBAAC,GAAG,IAAC,SAAS,EAAE,IAAA,oBAAU,EAAC,KAAK,CAAC,SAAS,EAAE,WAAW,CAAC,YACtD,uBAAC,gBAAQ,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,YAChC,uBAAC,8BAAiB,eAAK,OAAO,EAAI,GACzB,GACP,CACP,CAAC;AACJ,CAAC,CAAC;AAOF,IAAM,aAAa,GAAiC,eAAK,CAAC,UAAU,CAClE,UACE,EAQC,EACD,GAAG;IARD,IAAA,iBAAqB,EAArB,SAAS,mBAAG,SAAS,KAAA,EACrB,gBAIC,EAJD,QAAQ,mBAAG,CACT,uBAAC,mBAAQ,IAAC,SAAS,EAAC,cAAc,YAChC,uBAAC,iBAAO,IAAC,IAAI,EAAC,IAAI,GAAG,GACZ,CACZ,KAAA,EACE,KAAK,cAPV,yBAQC,CADS;IAGP,OAAA,uBAAC,iBAAiB,aAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,IAAM,KAAK,EAAI,CAAA;CAAA,CAC/F,CAAC;AAEF,IAAM,mBAAmB,GAAG,UAAC,KAAU,EAAE,GAAQ,IAAK,OAAA,uBAAC,qBAAW,aAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,IAAM,KAAK,EAAI,EAAnE,CAAmE,CAAC;AAE1H,kBAAe,eAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type ExcludeModulesKeys = 'module' | 'scope';
|
|
3
|
-
export type AsyncComponentProps = {
|
|
3
|
+
export type AsyncComponentProps<T extends object = object> = {
|
|
4
4
|
module: string;
|
|
5
5
|
scope: string;
|
|
6
|
-
fallback
|
|
7
|
-
component
|
|
8
|
-
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement
|
|
9
|
-
export declare
|
|
6
|
+
fallback?: React.ReactElement;
|
|
7
|
+
component?: keyof JSX.IntrinsicElements;
|
|
8
|
+
} & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & T;
|
|
9
|
+
export declare function AsyncComponent<T extends object = object>(props: AsyncComponentProps & T): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default AsyncComponent;
|
|
@@ -31,6 +31,9 @@ var BaseAsyncComponent = function (_a) {
|
|
|
31
31
|
var SCProps = __assign({ className: className, module: module, scope: scope, ref: innerRef, fallback: fallback }, props);
|
|
32
32
|
return (_jsx(Cmp, { className: classNames(className, scope), children: _jsx(ScalprumComponent, __assign({}, SCProps)) }));
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
var InternalSyncComponent = React.forwardRef(function (props, ref) { return _jsx(BaseAsyncComponent, __assign({ innerRef: ref }, props)); });
|
|
35
|
+
export function AsyncComponent(props) {
|
|
36
|
+
return _jsx(InternalSyncComponent, __assign({}, props));
|
|
37
|
+
}
|
|
35
38
|
export default AsyncComponent;
|
|
36
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/components/src/AsyncComponent/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAA0B,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,sDAAsD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,wDAAwD,CAAC;AACjF,OAAO,UAAU,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/components/src/AsyncComponent/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAA0B,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,sDAAsD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,wDAAwD,CAAC;AACjF,OAAO,UAAU,MAAM,YAAY,CAAC;AAqBpC,IAAM,kBAAkB,GAAqD,UAAC,EAY7E;IAXC,IAAA,KAAK,WAAA,EACL,MAAM,YAAA,EACN,gBAIC,EAJD,QAAQ,mBAAG,CACT,KAAC,QAAQ,cACP,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,GAAG,GACZ,CACZ,KAAA,EACD,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,iBAA0B,EAAf,GAAG,mBAAG,SAAS,KAAA,EACvB,KAAK,cAXoE,qEAY7E,CADS;IAER,IAAM,OAAO,cACX,SAAS,WAAA,EACT,MAAM,QAAA,EACN,KAAK,OAAA,EACL,GAAG,EAAE,QAAQ,EACb,QAAQ,UAAA,IACL,KAAK,CACT,CAAC;IACF,OAAO,CACL,KAAC,GAAG,IAAC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,KAAK,CAAC,YAC1C,KAAC,iBAAiB,eAAK,OAAO,EAAI,GAC9B,CACP,CAAC;AACJ,CAAC,CAAC;AAQF,IAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAAmC,UAAC,KAAK,EAAE,GAAG,IAAK,OAAA,KAAC,kBAAkB,aAAC,QAAQ,EAAE,GAAG,IAAM,KAAK,EAAI,EAAhD,CAAgD,CAAC,CAAC;AACnJ,MAAM,UAAU,cAAc,CAA4B,KAA8B;IACtF,OAAO,KAAC,qBAAqB,eAAK,KAAK,EAAI,CAAC;AAC9C,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -30,8 +30,9 @@ import InventoryLoadError from './InventoryLoadError';
|
|
|
30
30
|
import classNames from 'classnames';
|
|
31
31
|
import WithHistory from './WithHistory';
|
|
32
32
|
var BaseTagWithDialog = function (props) {
|
|
33
|
+
var _a;
|
|
33
34
|
var store = useStore();
|
|
34
|
-
var Cmp = props.component;
|
|
35
|
+
var Cmp = (_a = props.component) !== null && _a !== void 0 ? _a : 'section';
|
|
35
36
|
var SCProps = __assign({ history: props.history, store: store, module: './TagWithDialog', scope: 'inventory', ErrorComponent: _jsx(InventoryLoadError, __assign({}, props, { component: "InventoryDetailHead" })), ref: props.innerRef }, props);
|
|
36
37
|
return (_jsx(Cmp, { className: classNames(props.className, 'inventory'), children: _jsx(Suspense, { fallback: props.fallback, children: _jsx(ScalprumComponent, __assign({}, SCProps)) }) }));
|
|
37
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagWithDialog.js","sourceRoot":"","sources":["../../../../../packages/components/src/Inventory/TagWithDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,sDAAsD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,wDAAwD,CAAC;AACjF,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC,OAAO,WAAW,MAAM,eAAe,CAAC;AASxC,IAAM,iBAAiB,GAA6G,UAAC,KAAK
|
|
1
|
+
{"version":3,"file":"TagWithDialog.js","sourceRoot":"","sources":["../../../../../packages/components/src/Inventory/TagWithDialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,sDAAsD,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,wDAAwD,CAAC;AACjF,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;A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