2016-03-29 00:24:27 +08:00
|
|
|
/*
|
2016-04-08 00:49:39 +08:00
|
|
|
* skinned-sdk.js
|
2016-03-29 00:24:27 +08:00
|
|
|
*
|
2016-04-08 00:49:39 +08:00
|
|
|
* Skins the react-sdk with a few stub components which we expect the
|
|
|
|
* application to provide
|
2016-03-29 00:24:27 +08:00
|
|
|
*/
|
2016-04-08 00:49:39 +08:00
|
|
|
|
2016-04-21 15:09:40 +08:00
|
|
|
/* this is a convenient place to ensure we load the compatibility libraries we expect our
|
|
|
|
* app to provide
|
|
|
|
*/
|
|
|
|
|
|
|
|
// for ES6 stuff like startsWith() and Object.values() that babel doesn't do by
|
|
|
|
// default
|
|
|
|
require('babel-polyfill');
|
|
|
|
|
2017-10-12 00:56:17 +08:00
|
|
|
const sdk = require("../src/index");
|
2016-04-08 00:49:39 +08:00
|
|
|
|
2017-10-12 00:56:17 +08:00
|
|
|
const skin = require('../src/component-index.js');
|
|
|
|
const stubComponent = require('./components/stub-component.js');
|
2016-03-29 00:24:27 +08:00
|
|
|
|
2017-10-12 00:56:17 +08:00
|
|
|
const components = skin.components;
|
2016-03-31 07:48:46 +08:00
|
|
|
components['structures.LeftPanel'] = stubComponent();
|
|
|
|
components['structures.RightPanel'] = stubComponent();
|
|
|
|
components['structures.RoomDirectory'] = stubComponent();
|
|
|
|
components['views.globals.MatrixToolbar'] = stubComponent();
|
|
|
|
components['views.globals.GuestWarningBar'] = stubComponent();
|
|
|
|
components['views.globals.NewVersionBar'] = stubComponent();
|
|
|
|
components['views.elements.Spinner'] = stubComponent({displayName: 'Spinner'});
|
|
|
|
components['views.messages.DateSeparator'] = stubComponent({displayName: 'DateSeparator'});
|
|
|
|
components['views.messages.MessageTimestamp'] = stubComponent({displayName: 'MessageTimestamp'});
|
|
|
|
components['views.messages.SenderProfile'] = stubComponent({displayName: 'SenderProfile'});
|
2016-06-17 22:46:31 +08:00
|
|
|
components['views.rooms.SearchBar'] = stubComponent();
|
2016-03-29 00:24:27 +08:00
|
|
|
|
2016-04-08 00:49:39 +08:00
|
|
|
sdk.loadSkin(skin);
|
|
|
|
|
|
|
|
module.exports = sdk;
|