Browse Source

Move Sorter to TS

ts-components
Artur Arseniev 4 years ago
parent
commit
bc36bc3093
  1. 3
      src/block_manager/model/Block.ts
  2. 2
      src/common/index.ts
  3. 538
      src/utils/Sorter.ts

3
src/block_manager/model/Block.ts

@ -2,6 +2,7 @@ import { Model } from '../../common';
import { isFunction } from 'underscore'; import { isFunction } from 'underscore';
import EditorModule from '../../editor'; import EditorModule from '../../editor';
import { BlockCategoryProperties } from './Category'; import { BlockCategoryProperties } from './Category';
import { ComponentDefinition } from '../../dom_components/model/types';
/** @private */ /** @private */
export interface BlockProperties { export interface BlockProperties {
@ -12,7 +13,7 @@ export interface BlockProperties {
/** /**
* The content of the block. Might be an HTML string or a [Component Defintion](/modules/Components.html#component-definition) * The content of the block. Might be an HTML string or a [Component Defintion](/modules/Components.html#component-definition)
*/ */
content: string | any; content: string | ComponentDefinition;
/** /**
* HTML string for the media/icon of the block, eg. `<svg ...`, `<img ...`, etc. * HTML string for the media/icon of the block, eg. `<svg ...`, `<img ...`, etc.
* @default '' * @default ''

2
src/common/index.ts

@ -4,7 +4,7 @@ export { default as View } from './View';
export type SetOptions = Backbone.ModelSetOptions & { avoidStore?: boolean }; export type SetOptions = Backbone.ModelSetOptions & { avoidStore?: boolean };
export type AddOptions = Backbone.AddOptions; export type AddOptions = Backbone.AddOptions & { temporary?: boolean };
export type RemoveOptions = Backbone.Silenceable; export type RemoveOptions = Backbone.Silenceable;

538
src/utils/Sorter.js → src/utils/Sorter.ts

File diff suppressed because it is too large
Loading…
Cancel
Save