superdesk-ui-framework 4.0.21 → 4.0.23

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.
@@ -10,7 +10,6 @@
10
10
  .sd-editor-grid__editor-subnav {
11
11
  grid-column: 1 / 6;
12
12
  grid-row: editorSubnav;
13
- height: $nav-height;
14
13
  }
15
14
 
16
15
  .sd-editor-grid__sidebar-left {
@@ -1,6 +1,4 @@
1
1
  import * as React from 'react';
2
- // @ts-ignore
3
- import * as iconFont from '../../app/styles/_icon-font.scss';
4
2
  import { Button } from './Button';
5
3
  import { Icon } from './Icon';
6
4
  import { IItem, SelectGrid } from "./SelectGrid";
@@ -85,7 +83,7 @@ export class IconPicker extends React.PureComponent<IProps, IState> {
85
83
  }
86
84
 
87
85
  const getIcons = (translateFunction: (text: string) => string): Array<IItem> => {
88
- const translatedIconNameMap: any = {
86
+ const translatedIconNameMap = {
89
87
  'add-gallery': 'Add Gallery',
90
88
  'add-image': 'Add Image',
91
89
  'adjust': 'Adjust',
@@ -271,11 +269,8 @@ const getIcons = (translateFunction: (text: string) => string): Array<IItem> =>
271
269
  'zoom-out': 'Zoom Out',
272
270
  };
273
271
 
274
- return iconFont.icon
275
- .split(', ')
276
- .sort()
277
- .map((icon: string) => ({
278
- value: icon,
279
- label: translatedIconNameMap[icon] ? translateFunction(translatedIconNameMap[icon]) : icon,
280
- }));
272
+ return Object.keys(translatedIconNameMap).sort().map((icon) => ({
273
+ value: icon as keyof typeof translatedIconNameMap,
274
+ label: translateFunction(translatedIconNameMap[icon as keyof typeof translatedIconNameMap]),
275
+ }));
281
276
  };