Merge branch 'master' of https://github.com/ONLYOFFICE/CommunityServer-AspNetCore
# Conflicts: # web/ASC.Web.Client/src/store/settings/reducer.js
This commit is contained in:
commit
87e76575d8
@ -173,6 +173,56 @@ namespace ASC.Api.Settings
|
||||
return listOfTimezones;
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[Read("greetingsettings")]
|
||||
public string GetGreetingSettings()
|
||||
{
|
||||
return Tenant.Name;
|
||||
}
|
||||
|
||||
[Create("greetingsettings")]
|
||||
public object SaveGreetingSettings(GreetingSettingsModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
SecurityContext.DemandPermissions(Tenant, SecutiryConstants.EditPortalSettings);
|
||||
|
||||
Tenant.Name = model.Title;
|
||||
CoreContext.TenantManager.SaveTenant(Tenant);
|
||||
|
||||
MessageService.Send(MessageAction.GreetingSettingsUpdated);
|
||||
|
||||
return new { Status = 1, Message = Resource.SuccessfullySaveGreetingSettingsMessage };
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return new { Status = 0, Message = e.Message.HtmlEncode() };
|
||||
}
|
||||
}
|
||||
|
||||
[Create("greetingsettings/restore")]
|
||||
public object RestoreGreetingSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
SecurityContext.DemandPermissions(Tenant, SecutiryConstants.EditPortalSettings);
|
||||
|
||||
TenantInfoSettings.Load().RestoreDefaultTenantName();
|
||||
//_tenantInfoSettings.Save();
|
||||
|
||||
return new
|
||||
{
|
||||
Status = 1,
|
||||
Message = Resource.SuccessfullySaveGreetingSettingsMessage,
|
||||
CompanyName = CoreContext.TenantManager.GetCurrentTenant().Name
|
||||
};
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return new { Status = 0, Message = e.Message.HtmlEncode() };
|
||||
}
|
||||
}
|
||||
|
||||
[Read("recalculatequota")]
|
||||
public void RecalculateQuota()
|
||||
{
|
||||
|
7
web/ASC.Web.Api/Models/GreetingSettingsModel.cs
Normal file
7
web/ASC.Web.Api/Models/GreetingSettingsModel.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace ASC.Web.Api.Models
|
||||
{
|
||||
public class GreetingSettingsModel
|
||||
{
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
@ -25,9 +25,9 @@ import { login } from "../../../store/auth/actions";
|
||||
import styled from "styled-components";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import i18n from "./i18n";
|
||||
import { welcomePageTitle } from "./../../../helpers/customNames";
|
||||
import { sendInstructionsToChangePassword } from "../../../store/services/api";
|
||||
import SubModalDialog from "./sub-components/modal-dialog";
|
||||
import { getGreetingSettings } from '../../../store/services/api';
|
||||
|
||||
const FormContainer = styled(Container)`
|
||||
margin-top: 70px;
|
||||
@ -106,6 +106,7 @@ const Form = props => {
|
||||
const [email, setEmail] = useState("");
|
||||
const [isDisabled, setIsDisabled] = useState(false);
|
||||
const [isChecked, setIsisChecked] = useState(false);
|
||||
const [greetingTitle, setGreetingTitle] = useState('');
|
||||
|
||||
const onClick = () => {
|
||||
setOpenDialog(true);
|
||||
@ -182,6 +183,13 @@ const Form = props => {
|
||||
};
|
||||
}, [onKeyPress, params, language]);
|
||||
|
||||
useEffect(() => {
|
||||
getGreetingSettings()
|
||||
.then((res) => {
|
||||
setGreetingTitle(res)
|
||||
});
|
||||
}, []);
|
||||
|
||||
const onChangePassword = event => {
|
||||
setPassword(event.target.value);
|
||||
!passwordValid && setPasswordValid(true);
|
||||
@ -212,7 +220,7 @@ const Form = props => {
|
||||
top
|
||||
/>
|
||||
<CardTitle className="card-title">
|
||||
{t("CustomWelcomePageTitle", { welcomePageTitle })}
|
||||
{greetingTitle}
|
||||
</CardTitle>
|
||||
</Card>
|
||||
</Col>
|
||||
|
@ -1,8 +1,9 @@
|
||||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { withTranslation } from 'react-i18next';
|
||||
import { FieldContainer, Text, ComboBox, Loader, Button, toastr, Link } from "asc-web-components";
|
||||
import { FieldContainer, Text, ComboBox, Loader, Button, toastr, Link, TextInput } from "asc-web-components";
|
||||
import { getCultures, setLanguageAndTime, getPortalTimezones } from '../../../../../store/auth/actions';
|
||||
import { getGreetingTitle, setGreetingTitle, restoreGreetingTitle } from '../../../../../store/settings/actions';
|
||||
import styled from 'styled-components';
|
||||
import { Trans } from 'react-i18next';
|
||||
|
||||
@ -27,6 +28,18 @@ const StyledComponent = styled.div`
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.margin-left {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.settings-block {
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
|
||||
.input-width {
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.dropdown-item-width {
|
||||
& > div:first-child {
|
||||
div:first-child{
|
||||
@ -40,7 +53,7 @@ class Customization extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
const { portalLanguage, portalTimeZoneId, rawCultures, rawTimezones, t } = props;
|
||||
const { portalLanguage, portalTimeZoneId, rawCultures, rawTimezones, t, greetingSettings } = props;
|
||||
const languages = mapCulturesToArray(rawCultures, t);
|
||||
const timezones = mapTimezonesToArray(rawTimezones);
|
||||
|
||||
@ -51,13 +64,20 @@ class Customization extends React.Component {
|
||||
timezone: findSelectedItemByKey(timezones, portalTimeZoneId),
|
||||
languages,
|
||||
language: findSelectedItemByKey(languages, portalLanguage),
|
||||
greetingTitle: greetingSettings,
|
||||
isLoadingGreeting: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
componentDidMount() {
|
||||
const { getCultures, portalLanguage, portalTimeZoneId, t, getPortalTimezones } = this.props;
|
||||
const { timezones, languages } = this.state;
|
||||
const { getCultures, portalLanguage, portalTimeZoneId, t, getPortalTimezones, getGreetingTitle } = this.props;
|
||||
const { timezones, languages, greetingTitle } = this.state;
|
||||
|
||||
if (!greetingTitle.length) {
|
||||
getGreetingTitle()
|
||||
.then(() => this.setState({ greetingTitle: this.props.greetingSettings }));
|
||||
}
|
||||
|
||||
if (!timezones.length && !languages.length) {
|
||||
let languages;
|
||||
@ -99,9 +119,38 @@ class Customization extends React.Component {
|
||||
})
|
||||
}
|
||||
|
||||
onChangeGreetingTitle = (e) => {
|
||||
this.setState({ greetingTitle: e.target.value })
|
||||
};
|
||||
|
||||
onSaveGreetingSettings = () => {
|
||||
const { setGreetingTitle, t } = this.props;
|
||||
this.setState({ isLoadingGreeting: true }, function () {
|
||||
setGreetingTitle(this.state.greetingTitle)
|
||||
.then(() => {
|
||||
this.setState({ isLoadingGreeting: false })
|
||||
toastr.success(t('SuccessfullySaveGreetingSettingsMessage'));
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
onRestoreGreetingSettings = () => {
|
||||
const { restoreGreetingTitle, t } = this.props;
|
||||
this.setState({ isLoadingGreeting: true }, function () {
|
||||
restoreGreetingTitle()
|
||||
.then(() => {
|
||||
this.setState({
|
||||
isLoadingGreeting: false,
|
||||
greetingTitle: this.props.greetingSettings
|
||||
})
|
||||
toastr.success(t('SuccessfullySaveGreetingSettingsMessage'));
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
const { t, i18n } = this.props;
|
||||
const { isLoadedData, languages, language, isLoading, timezones, timezone } = this.state;
|
||||
const { isLoadedData, languages, language, isLoading, timezones, timezone, greetingTitle, isLoadingGreeting } = this.state;
|
||||
const supportEmail = "documentation@onlyoffice.com";
|
||||
const tooltipLanguage =
|
||||
<Text.Body fontSize={13}>
|
||||
@ -123,54 +172,94 @@ class Customization extends React.Component {
|
||||
<Loader className="pageLoader" type="rombs" size={40} />
|
||||
: <>
|
||||
<StyledComponent>
|
||||
<Text.Body fontSize={16}>{t('StudioTimeLanguageSettings')}</Text.Body>
|
||||
<FieldContainer
|
||||
id='fieldContainerLanguage'
|
||||
className='margin-top'
|
||||
labelText={`${t("Language")}:`}
|
||||
tooltipContent={tooltipLanguage}
|
||||
isVertical={true}>
|
||||
<ComboBox
|
||||
id='comboBoxLanguage'
|
||||
options={languages}
|
||||
selectedOption={language}
|
||||
onSelect={this.onLanguageSelect}
|
||||
isDisabled={isLoading}
|
||||
noBorder={false}
|
||||
scaled={false}
|
||||
scaledOptions={true}
|
||||
// dropDownMaxHeight={300}
|
||||
size='huge'
|
||||
/>
|
||||
</FieldContainer>
|
||||
<div className='settings-block'>
|
||||
<Text.Body fontSize={16}>{t('StudioTimeLanguageSettings')}</Text.Body>
|
||||
<FieldContainer
|
||||
id='fieldContainerLanguage'
|
||||
className='margin-top'
|
||||
labelText={`${t("Language")}:`}
|
||||
tooltipContent={tooltipLanguage}
|
||||
isVertical={true}>
|
||||
<ComboBox
|
||||
id='comboBoxLanguage'
|
||||
options={languages}
|
||||
selectedOption={language}
|
||||
onSelect={this.onLanguageSelect}
|
||||
isDisabled={isLoading}
|
||||
noBorder={false}
|
||||
scaled={false}
|
||||
scaledOptions={true}
|
||||
dropDownMaxHeight={300}
|
||||
size='huge'
|
||||
/>
|
||||
</FieldContainer>
|
||||
|
||||
<FieldContainer
|
||||
id='fieldContainerTimezone'
|
||||
labelText={`${t("TimeZone")}:`}
|
||||
isVertical={true}>
|
||||
<ComboBox
|
||||
id='comboBoxTimezone'
|
||||
options={timezones}
|
||||
selectedOption={timezone}
|
||||
onSelect={this.onTimezoneSelect}
|
||||
isDisabled={isLoading}
|
||||
noBorder={false}
|
||||
scaled={false}
|
||||
scaledOptions={true}
|
||||
dropDownMaxHeight={300}
|
||||
size='huge'
|
||||
className='dropdown-item-width'
|
||||
<FieldContainer
|
||||
id='fieldContainerTimezone'
|
||||
labelText={`${t("TimeZone")}:`}
|
||||
isVertical={true}>
|
||||
<ComboBox
|
||||
id='comboBoxTimezone'
|
||||
options={timezones}
|
||||
selectedOption={timezone}
|
||||
onSelect={this.onTimezoneSelect}
|
||||
isDisabled={isLoading}
|
||||
noBorder={false}
|
||||
scaled={false}
|
||||
scaledOptions={true}
|
||||
dropDownMaxHeight={300}
|
||||
size='huge'
|
||||
className='dropdown-item-width'
|
||||
/>
|
||||
</FieldContainer>
|
||||
<Button
|
||||
id='btnSaveLngTZ'
|
||||
className='margin-top'
|
||||
primary={true}
|
||||
size='medium'
|
||||
label={t('SaveButton')}
|
||||
isLoading={isLoading}
|
||||
onClick={this.onSaveLngTZSettings}
|
||||
/>
|
||||
</FieldContainer>
|
||||
<Button
|
||||
id='btnSaveLngTZ'
|
||||
className='margin-top'
|
||||
primary={true}
|
||||
size='big'
|
||||
label={t('SaveButton')}
|
||||
isLoading={isLoading}
|
||||
onClick={this.onSaveLngTZSettings}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='settings-block'>
|
||||
<Text.Body fontSize={16}>{t('GreetingSettingsTitle')}</Text.Body>
|
||||
<FieldContainer
|
||||
id='fieldContainerWelcomePage'
|
||||
className='margin-top'
|
||||
labelText={`${t("GreetingTitle")}:`}
|
||||
isVertical={true}>
|
||||
<TextInput
|
||||
className='input-width'
|
||||
scale={true}
|
||||
value={greetingTitle}
|
||||
onChange={this.onChangeGreetingTitle}
|
||||
isDisabled={isLoadingGreeting}
|
||||
/>
|
||||
|
||||
</FieldContainer>
|
||||
|
||||
<Button
|
||||
id='btnSaveGreetingSetting'
|
||||
className='margin-top'
|
||||
primary={true}
|
||||
size='medium'
|
||||
label={t('SaveButton')}
|
||||
isLoading={isLoadingGreeting}
|
||||
onClick={this.onSaveGreetingSettings}
|
||||
/>
|
||||
|
||||
<Button
|
||||
id='btnRestoreToDefault'
|
||||
className='margin-top margin-left'
|
||||
size='medium'
|
||||
label={t('RestoreDefaultButton')}
|
||||
isDisabled={isLoadingGreeting}
|
||||
onClick={this.onRestoreGreetingSettings}
|
||||
/>
|
||||
</div>
|
||||
|
||||
</StyledComponent>
|
||||
|
||||
</>
|
||||
@ -185,7 +274,11 @@ function mapStateToProps(state) {
|
||||
language: state.auth.user.cultureName || state.auth.settings.culture,
|
||||
rawTimezones: state.auth.settings.timezones,
|
||||
rawCultures: state.auth.settings.cultures,
|
||||
greetingSettings: state.settings.greetingSettings,
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, { getCultures, setLanguageAndTime, getPortalTimezones })(withTranslation()(Customization));
|
||||
export default connect(mapStateToProps, {
|
||||
getCultures, setLanguageAndTime, getPortalTimezones,
|
||||
getGreetingTitle, setGreetingTitle, restoreGreetingTitle
|
||||
})(withTranslation()(Customization));
|
||||
|
@ -42,8 +42,12 @@
|
||||
"ThirdPartyAuthorization": "Third Party Authorization",
|
||||
"SmtpSettings": "SMTP Settings",
|
||||
"ManagementCategoryStatistic": "Statistics",
|
||||
"LoadingProcessing": "Loading...",
|
||||
"LoadingDescription": "Please wait...",
|
||||
"LoadingProcessing": "Loading...",
|
||||
"LoadingDescription": "Please wait...",
|
||||
"GreetingSettingsTitle": "Welcome Page Settings",
|
||||
"GreetingTitle": "Title",
|
||||
"RestoreDefaultButton": "Restore to Default",
|
||||
"SuccessfullySaveGreetingSettingsMessage": "Welcome Page settings have been successfully saved",
|
||||
|
||||
|
||||
|
||||
|
@ -42,7 +42,11 @@
|
||||
"SmtpSettings": "Настройки SMTP",
|
||||
"ManagementCategoryStatistic": "Статистика",
|
||||
"LoadingProcessing": "Загрузка...",
|
||||
"LoadingDescription": "Пожалуйста подождите...",
|
||||
"LoadingDescription": "Пожалуйста подождите...",
|
||||
"GreetingSettingsTitle": "Настройки страницы приветствия",
|
||||
"GreetingTitle": "Заголовок",
|
||||
"RestoreDefaultButton": "Настройки по умолчанию",
|
||||
"SuccessfullySaveGreetingSettingsMessage": "Настройки страницы приветствия успешно сохранены",
|
||||
|
||||
|
||||
|
||||
|
@ -89,6 +89,10 @@
|
||||
"DeactivationDeletionPortal",
|
||||
"ThirdPartyAuthorization",
|
||||
"SmtpSettings",
|
||||
"GreetingSettingsTitle",
|
||||
"GreetingTitle",
|
||||
"RestoreDefaultButton",
|
||||
"SuccessfullySaveGreetingSettingsMessage",
|
||||
"Employees"
|
||||
],
|
||||
"FeedResource": [
|
||||
|
@ -167,7 +167,7 @@ export function changeProductAdmin(userId, productId, administrator) {
|
||||
return request({
|
||||
method: "put",
|
||||
url: "/settings/security/administrator",
|
||||
data: {
|
||||
data: {
|
||||
productId,
|
||||
userId,
|
||||
administrator
|
||||
@ -180,4 +180,26 @@ export function getUserById(userId) {
|
||||
method: "get",
|
||||
url: `/people/${userId}`,
|
||||
});
|
||||
}
|
||||
|
||||
export function getGreetingSettings() {
|
||||
return request({
|
||||
method: "get",
|
||||
url: `/settings/greetingsettings.json`,
|
||||
});
|
||||
}
|
||||
|
||||
export function setGreetingSettings(title) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: `/settings/greetingsettings.json`,
|
||||
data: { title }
|
||||
});
|
||||
}
|
||||
|
||||
export function restoreGreetingSettings() {
|
||||
return request({
|
||||
method: "post",
|
||||
url: `/settings/greetingsettings/restore.json`
|
||||
});
|
||||
}
|
@ -10,6 +10,7 @@ import {
|
||||
export const SET_USERS = "SET_USERS";
|
||||
export const SET_ADMINS = "SET_ADMINS";
|
||||
export const SET_OWNER = "SET_OWNER";
|
||||
export const SET_GREETING_SETTINGS = "SET_GREETING_SETTINGS";
|
||||
|
||||
export function setUsers(options) {
|
||||
return {
|
||||
@ -33,6 +34,13 @@ export function setOwner(owner) {
|
||||
};
|
||||
}
|
||||
|
||||
export function setGreetingSettings(title) {
|
||||
return {
|
||||
type: SET_GREETING_SETTINGS,
|
||||
title
|
||||
};
|
||||
}
|
||||
|
||||
export function getListUsers() {
|
||||
return (dispatch, getState) => {
|
||||
return api.getUserList().then(users => {
|
||||
@ -101,3 +109,28 @@ export function getUserById(userId) {
|
||||
return api.getUserById(userId).then(owner => dispatch(setOwner(owner)));
|
||||
};
|
||||
}
|
||||
|
||||
export function getGreetingTitle() {
|
||||
return dispatch => {
|
||||
return api.getGreetingSettings()
|
||||
.then(greetingTitle => dispatch(setGreetingSettings(greetingTitle)));
|
||||
};
|
||||
}
|
||||
|
||||
export function setGreetingTitle(greetingTitle) {
|
||||
return dispatch => {
|
||||
return api.setGreetingSettings(greetingTitle)
|
||||
.then((res) => {
|
||||
dispatch(setGreetingSettings(greetingTitle))
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function restoreGreetingTitle() {
|
||||
return dispatch => {
|
||||
return api.restoreGreetingSettings()
|
||||
.then((res) => {
|
||||
dispatch(setGreetingSettings(res.companyName))
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -1,11 +1,13 @@
|
||||
import { SET_USERS, SET_ADMINS, SET_OWNER } from "./actions";
|
||||
import { SET_USERS, SET_ADMINS, SET_OWNER, SET_GREETING_SETTINGS } from "./actions";
|
||||
|
||||
const initialState = {
|
||||
|
||||
accessRight: {
|
||||
options: [],
|
||||
admins: [],
|
||||
owner: {}
|
||||
}
|
||||
},
|
||||
greetingSettings: ''
|
||||
};
|
||||
|
||||
const peopleReducer = (state = initialState, action) => {
|
||||
@ -28,6 +30,10 @@ const peopleReducer = (state = initialState, action) => {
|
||||
owner: action.owner
|
||||
})
|
||||
});
|
||||
case SET_GREETING_SETTINGS:
|
||||
return Object.assign({}, state, {
|
||||
greetingSettings: action.title
|
||||
});
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ module.exports = ({ config }) => {
|
||||
// add story source
|
||||
{
|
||||
test: /\.stories\.js$/,
|
||||
loaders: [require.resolve('@storybook/addon-storysource/loader')],
|
||||
loaders: [require.resolve('@storybook/source-loader')],
|
||||
enforce: 'pre',
|
||||
},
|
||||
// Process JS with Babel.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "asc-web-components",
|
||||
"version": "1.0.153",
|
||||
"version": "1.0.156",
|
||||
"description": "Ascensio System SIA component library",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "dist/asc-web-components.js",
|
||||
@ -46,16 +46,16 @@
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@emotion/babel-preset-css-prop": "^10.0.17",
|
||||
"@storybook/addon-a11y": "^5.1.11",
|
||||
"@storybook/addon-actions": "^5.1.11",
|
||||
"@storybook/addon-actions": "^5.2.5",
|
||||
"@storybook/addon-console": "^1.2.1",
|
||||
"@storybook/addon-knobs": "^5.1.11",
|
||||
"@storybook/addon-links": "^5.1.11",
|
||||
"@storybook/addon-options": "^5.1.11",
|
||||
"@storybook/addon-storysource": "^5.1.11",
|
||||
"@storybook/addon-viewport": "^5.1.11",
|
||||
"@storybook/addons": "^5.1.11",
|
||||
"@storybook/react": "^5.1.11",
|
||||
"@svgr/rollup": "^4.3.2",
|
||||
"@storybook/addon-knobs": "^5.2.5",
|
||||
"@storybook/addon-links": "^5.2.5",
|
||||
"@storybook/addon-options": "^5.2.5",
|
||||
"@storybook/addon-storysource": "^5.2.5",
|
||||
"@storybook/addon-viewport": "^5.2.5",
|
||||
"@storybook/addons": "^5.2.5",
|
||||
"@storybook/react": "^5.2.5",
|
||||
"@svgr/rollup": "^4.3.3",
|
||||
"@svgr/webpack": "^4.3.2",
|
||||
"@testing-library/react": "^8.0.8",
|
||||
"@types/jest": "^24.0.17",
|
||||
|
@ -49,8 +49,7 @@ const getButtons = (primary) => {
|
||||
};
|
||||
|
||||
storiesOf('Components|Buttons', module)
|
||||
// To set a default viewport for all the stories for this component
|
||||
.addParameters({ viewport: { defaultViewport: 'responsive' } })
|
||||
|
||||
.addParameters({ options: { showAddonPanel: false } })
|
||||
.add('all', () => (
|
||||
<Section>
|
||||
|
@ -94,7 +94,9 @@ class DropDown extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
const {maxHeight, withArrow, directionX, children} = this.props;
|
||||
const dropDownMaxHeightProp = maxHeight ? { height: maxHeight + 'px' } : {};
|
||||
const fullHeight = children && children.length * 36;
|
||||
const calculatedHeight = ((fullHeight > 0) && (fullHeight < maxHeight)) ? fullHeight : maxHeight;
|
||||
const dropDownMaxHeightProp = maxHeight ? { height: calculatedHeight + 'px' } : {};
|
||||
//console.log("DropDown render");
|
||||
return (
|
||||
<StyledDropdown
|
||||
@ -105,7 +107,7 @@ class DropDown extends React.PureComponent {
|
||||
{withArrow && <Arrow directionX={directionX} />}
|
||||
{maxHeight
|
||||
? <FixedSizeList
|
||||
height={maxHeight}
|
||||
height={calculatedHeight}
|
||||
width={this.state.width}
|
||||
itemSize={36}
|
||||
itemCount={children.length}
|
||||
|
@ -84,8 +84,6 @@ const LoginForm = props => {
|
||||
};
|
||||
|
||||
storiesOf('EXAMPLES|Forms', module)
|
||||
// To set a default viewport for all the stories for this component
|
||||
.addParameters({ viewport: { defaultViewport: 'responsive' } })
|
||||
.add('login', () => {
|
||||
const onSubmit = (e, credentials) => {
|
||||
console.log("onSubmit", e, credentials);
|
||||
|
@ -82,8 +82,6 @@ function getRandomInt(min, max) {
|
||||
|
||||
storiesOf("EXAMPLES|AdvancedSelector", module)
|
||||
.addDecorator(withKnobs)
|
||||
// To set a default viewport for all the stories for this component
|
||||
.addParameters({ viewport: { defaultViewport: "responsive" } })
|
||||
.add("people group selector", () => {
|
||||
return (
|
||||
<Section>
|
||||
|
@ -25,7 +25,6 @@ const data = [
|
||||
const dropdownType = ['alwaysDashed', 'appearDashedAfterHover'];
|
||||
|
||||
storiesOf('Components|LinkWithDropdown', module)
|
||||
.addParameters({ viewport: { defaultViewport: 'responsive' } })
|
||||
.addParameters({ options: { showAddonPanel: false } })
|
||||
.add('all', () => (
|
||||
<>
|
||||
|
@ -17,7 +17,6 @@ const headerStyle = {
|
||||
|
||||
|
||||
storiesOf('Components|Link', module)
|
||||
.addParameters({ viewport: { defaultViewport: 'responsive' } })
|
||||
.addParameters({ options: { showAddonPanel: false } })
|
||||
.add('all', () => (
|
||||
<>
|
||||
|
@ -7,8 +7,6 @@ import ModuleTile from '../module-tile';
|
||||
const rowStyle = { marginTop: 8 };
|
||||
|
||||
storiesOf('Components|ModuleTile', module)
|
||||
// To set a default viewport for all the stories for this component
|
||||
.addParameters({ viewport: { defaultViewport: 'responsive' } })
|
||||
.addParameters({ options: { showAddonPanel: false }})
|
||||
.add('all', () => (
|
||||
<Container>
|
||||
|
@ -10,8 +10,6 @@ import Readme from './README.md';
|
||||
const rowStyle = { marginTop: 8 };
|
||||
|
||||
storiesOf('Components|ModuleTile', module)
|
||||
// To set a default viewport for all the stories for this component
|
||||
.addParameters({ viewport: { defaultViewport: 'responsive' } })
|
||||
.addDecorator(withKnobs)
|
||||
.addDecorator(withReadme(Readme))
|
||||
.add('base', () => (
|
||||
|
@ -26,7 +26,6 @@ const StyledContainerInline = styled.div`
|
||||
`;
|
||||
|
||||
storiesOf('Components|SelectedItem', module)
|
||||
.addParameters({ viewport: { defaultViewport: 'responsive' } })
|
||||
.addParameters({ options: { showAddonPanel: false } })
|
||||
.add('all', () => {
|
||||
|
||||
|
@ -48,6 +48,5 @@ class TostWrapper extends React.Component {
|
||||
}
|
||||
|
||||
storiesOf('Components|Toast', module)
|
||||
.addParameters({ viewport: { defaultViewport: 'responsive' } })
|
||||
.addParameters({ options: { showAddonPanel: false } })
|
||||
.add('all', () => (<TostWrapper />));
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user