Skip to content

Commit

Permalink
#244 update buttons config
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-light committed Feb 2, 2021
1 parent cb92fc6 commit 73e03ea
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 9 deletions.
15 changes: 15 additions & 0 deletions packages/ketcher-react/src/script/builders/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
/****************************************************************************
* Copyright 2021 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
export * from './ketcher'
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
/****************************************************************************
* Copyright 2021 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
export interface ButtonConfig {
name: string
hidden?: boolean
}
15 changes: 15 additions & 0 deletions packages/ketcher-react/src/script/builders/ketcher/ButtonName.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/****************************************************************************
* Copyright 2021 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
export type ButtonName =
| 'layout'
| 'clean'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
/****************************************************************************
* Copyright 2021 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
import { ButtonConfig } from './ButtonConfig'
import { ButtonName } from './ButtonName'

export type ButtonsConfig = {
[buttonName in ButtonName]: ButtonConfig
[buttonName in ButtonName]?: ButtonConfig
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/****************************************************************************
* Copyright 2021 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
import {
StructService,
StructServiceProvider,
Expand Down
15 changes: 15 additions & 0 deletions packages/ketcher-react/src/script/builders/ketcher/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
/****************************************************************************
* Copyright 2021 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
export * from './ButtonsConfig'
export * from './KetcherBuilder'
4 changes: 2 additions & 2 deletions packages/ketcher-react/src/script/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2018 EPAM Systems
* Copyright 2021 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,5 +38,5 @@ async function buildKetcherAsync({
return builder.build()
}

export type { Config }
export type { Config, ButtonsConfig }
export default buildKetcherAsync
7 changes: 2 additions & 5 deletions packages/ketcher-react/src/script/ui/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2020 EPAM Systems
* Copyright 2021 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/

import app from './app'

export default app
export { default } from './app'

0 comments on commit 73e03ea

Please sign in to comment.