@shopify/app-bridge-host
Version:
App Bridge Host contains middleware and components that are meant to be consumed by the app's host. The middleware and `Frame` component are responsible for facilitating messages posted between the client and host, and used to act on actions sent from the
45 lines (44 loc) • 1.81 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var polaris_1 = require("@shopify/polaris");
var react_compose_1 = __importDefault(require("@shopify/react-compose"));
var withFeature_1 = __importDefault(require("../withFeature"));
var loading_1 = require("../store/reducers/embeddedApp/loading");
/**
* The UI component for the Loading feature
* @public
* */
var Loading = /** @class */ (function (_super) {
__extends(Loading, _super);
function Loading() {
return _super !== null && _super.apply(this, arguments) || this;
}
Loading.prototype.render = function () {
var isLoading = this.props.store.isLoading;
return isLoading ? react_1.default.createElement(polaris_1.Loading, null) : null;
};
return Loading;
}(react_1.default.PureComponent));
exports.Loading = Loading;
/**
* The Loading feature with its reducer, actions and UI component
* @public
* */
exports.default = react_compose_1.default(withFeature_1.default(loading_1.feature))(Loading);