mirror of https://github.com/artf/grapesjs.git
15 changed files with 280 additions and 49 deletions
@ -0,0 +1,20 @@ |
|||
{ |
|||
// Use IntelliSense to learn about possible attributes. |
|||
// Hover to view descriptions of existing attributes. |
|||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 |
|||
"version": "0.2.0", |
|||
"configurations": [ |
|||
{ |
|||
"type": "msedge", |
|||
"request": "launch", |
|||
"name": "Launch Edge against localhost", |
|||
"url": "http://localhost:8080", |
|||
"webRoot": "${workspaceFolder}/src/trait_managerindex.ts", |
|||
"sourceMapPathOverrides": { |
|||
"meteor://💻app/*": "${workspaceFolder}/*", |
|||
"webpack:///./~/*": "${workspaceFolder}/node_modules/*", |
|||
"webpack://?:*/*": "${workspaceFolder}/*" |
|||
} |
|||
} |
|||
] |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
{ |
|||
"grammarly.selectors": [ |
|||
{ |
|||
"language": "markdown", |
|||
"scheme": "file", |
|||
"pattern": "c:\\Users\\amirmohammad.r\\Desktop\\pr\\Grapesjs.md" |
|||
}, |
|||
{ |
|||
"language": "markdown", |
|||
"scheme": "file", |
|||
"pattern": "c:\\Users\\amirmohammad.r\\Desktop\\pr\\Grapesjs.md" |
|||
}, |
|||
{ |
|||
"language": "markdown", |
|||
"scheme": "file", |
|||
"pattern": "c:\\Users\\amirmohammad.r\\Desktop\\pr\\Grapesjs.md" |
|||
}, |
|||
{ |
|||
"language": "markdown", |
|||
"scheme": "file", |
|||
"pattern": "c:\\Users\\amirmohammad.r\\Desktop\\pr\\Grapesjs.md" |
|||
} |
|||
] |
|||
} |
|||
File diff suppressed because one or more lines are too long
@ -1,11 +1,11 @@ |
|||
import { isArray, isString } from 'underscore'; |
|||
import { AddOptions, Collection } from '../../common'; |
|||
import { normalizeKey } from '../../utils/mixins'; |
|||
import Category, { BlockCategoryProperties } from './Category'; |
|||
import { AddOptions, Collection } from '../common'; |
|||
import { normalizeKey } from '../utils/mixins'; |
|||
import Category, { CategoryProperties } from './ModuleCategory'; |
|||
|
|||
export default class Categories extends Collection<Category> { |
|||
/** @ts-ignore */ |
|||
add(model: (BlockCategoryProperties | Category)[] | BlockCategoryProperties | Category, opts?: AddOptions) { |
|||
add(model: (CategoryProperties | Category)[] | CategoryProperties | Category, opts?: AddOptions) { |
|||
const models = isArray(model) ? model : [model]; |
|||
models.forEach(md => md && (md.id = normalizeKey(`${md.id}`))); |
|||
return super.add(model, opts); |
|||
Loading…
Reference in new issue