mirror of
https://github.com/codex-team/editor.js
synced 2024-06-16 12:45:29 +02:00
Remove type: 'default'
This commit is contained in:
parent
ab79deea42
commit
96f8f6b672
|
@ -219,7 +219,6 @@ export default class BlockSettings extends Module<BlockSettingsNodes> {
|
||||||
|
|
||||||
if (convertToItems.length > 0) {
|
if (convertToItems.length > 0) {
|
||||||
items.push({
|
items.push({
|
||||||
type: 'default',
|
|
||||||
icon: IconReplace,
|
icon: IconReplace,
|
||||||
title: I18n.ui(I18nInternalNS.ui.popover, 'Convert to'),
|
title: I18n.ui(I18nInternalNS.ui.popover, 'Convert to'),
|
||||||
children: {
|
children: {
|
||||||
|
@ -288,7 +287,6 @@ export default class BlockSettings extends Module<BlockSettingsNodes> {
|
||||||
}
|
}
|
||||||
|
|
||||||
resultItems.push({
|
resultItems.push({
|
||||||
type: 'default',
|
|
||||||
icon: toolboxItem.icon,
|
icon: toolboxItem.icon,
|
||||||
title: toolboxItem.title,
|
title: toolboxItem.title,
|
||||||
name: toolName,
|
name: toolName,
|
||||||
|
|
|
@ -17,7 +17,7 @@ interface PopoverItemDefaultBaseParams {
|
||||||
/**
|
/**
|
||||||
* Item type
|
* Item type
|
||||||
*/
|
*/
|
||||||
type: 'default';
|
type?: 'default';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displayed text
|
* Displayed text
|
||||||
|
|
|
@ -28,7 +28,6 @@ class SomePlugin {
|
||||||
*/
|
*/
|
||||||
public static get toolbox(): PopoverItemParams {
|
public static get toolbox(): PopoverItemParams {
|
||||||
return {
|
return {
|
||||||
type: 'default',
|
|
||||||
icon: '₷',
|
icon: '₷',
|
||||||
title: 'Some tool',
|
title: 'Some tool',
|
||||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
|
|
|
@ -16,7 +16,6 @@ describe('Popover', () => {
|
||||||
* (Inside popover null value is set to confirmation property, so, object becomes unavailable otherwise)
|
* (Inside popover null value is set to confirmation property, so, object becomes unavailable otherwise)
|
||||||
*/
|
*/
|
||||||
const confirmation: PopoverItemParams = {
|
const confirmation: PopoverItemParams = {
|
||||||
type: 'default',
|
|
||||||
icon: confirmActionIcon,
|
icon: confirmActionIcon,
|
||||||
title: confirmActionTitle,
|
title: confirmActionTitle,
|
||||||
onActivate: cy.stub(),
|
onActivate: cy.stub(),
|
||||||
|
@ -24,7 +23,6 @@ describe('Popover', () => {
|
||||||
|
|
||||||
const items: PopoverItemParams[] = [
|
const items: PopoverItemParams[] = [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
icon: actionIcon,
|
icon: actionIcon,
|
||||||
title: actionTitle,
|
title: actionTitle,
|
||||||
name: 'testItem',
|
name: 'testItem',
|
||||||
|
@ -73,7 +71,6 @@ describe('Popover', () => {
|
||||||
it('should render the items with true isActive property value as active', () => {
|
it('should render the items with true isActive property value as active', () => {
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
isActive: true,
|
isActive: true,
|
||||||
|
@ -98,7 +95,6 @@ describe('Popover', () => {
|
||||||
it('should not execute item\'s onActivate callback if the item is disabled', () => {
|
it('should not execute item\'s onActivate callback if the item is disabled', () => {
|
||||||
const items: PopoverItemParams[] = [
|
const items: PopoverItemParams[] = [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
isDisabled: true,
|
isDisabled: true,
|
||||||
|
@ -131,7 +127,6 @@ describe('Popover', () => {
|
||||||
it('should close once item with closeOnActivate property set to true is activated', () => {
|
it('should close once item with closeOnActivate property set to true is activated', () => {
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
closeOnActivate: true,
|
closeOnActivate: true,
|
||||||
|
@ -159,7 +154,6 @@ describe('Popover', () => {
|
||||||
it('should highlight as active the item with toggle property set to true once activated', () => {
|
it('should highlight as active the item with toggle property set to true once activated', () => {
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
toggle: true,
|
toggle: true,
|
||||||
|
@ -184,7 +178,6 @@ describe('Popover', () => {
|
||||||
it('should perform radiobutton-like behavior among the items that have toggle property value set to the same string value', () => {
|
it('should perform radiobutton-like behavior among the items that have toggle property value set to the same string value', () => {
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon 1',
|
icon: 'Icon 1',
|
||||||
title: 'Title 1',
|
title: 'Title 1',
|
||||||
toggle: 'group-name',
|
toggle: 'group-name',
|
||||||
|
@ -193,7 +186,6 @@ describe('Popover', () => {
|
||||||
onActivate: (): void => {},
|
onActivate: (): void => {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon 2',
|
icon: 'Icon 2',
|
||||||
title: 'Title 2',
|
title: 'Title 2',
|
||||||
toggle: 'group-name',
|
toggle: 'group-name',
|
||||||
|
@ -231,7 +223,6 @@ describe('Popover', () => {
|
||||||
it('should toggle item if it is the only item in toggle group', () => {
|
it('should toggle item if it is the only item in toggle group', () => {
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
toggle: 'key',
|
toggle: 'key',
|
||||||
|
@ -279,7 +270,6 @@ describe('Popover', () => {
|
||||||
/** Tool data displayed in block tunes popover */
|
/** Tool data displayed in block tunes popover */
|
||||||
public render(): TunesMenuConfig {
|
public render(): TunesMenuConfig {
|
||||||
return {
|
return {
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
toggle: 'key',
|
toggle: 'key',
|
||||||
|
@ -287,7 +277,6 @@ describe('Popover', () => {
|
||||||
children: {
|
children: {
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
name: 'nested-test-item',
|
name: 'nested-test-item',
|
||||||
|
@ -357,7 +346,6 @@ describe('Popover', () => {
|
||||||
/** Tool data displayed in block tunes popover */
|
/** Tool data displayed in block tunes popover */
|
||||||
public render(): TunesMenuConfig {
|
public render(): TunesMenuConfig {
|
||||||
return {
|
return {
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Tune',
|
title: 'Tune',
|
||||||
toggle: 'key',
|
toggle: 'key',
|
||||||
|
@ -365,7 +353,6 @@ describe('Popover', () => {
|
||||||
children: {
|
children: {
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Title',
|
title: 'Title',
|
||||||
name: 'nested-test-item',
|
name: 'nested-test-item',
|
||||||
|
@ -521,7 +508,6 @@ describe('Popover', () => {
|
||||||
public render(): TunesMenuConfig {
|
public render(): TunesMenuConfig {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
onActivate: (): void => {},
|
onActivate: (): void => {},
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Tune',
|
title: 'Tune',
|
||||||
|
@ -585,7 +571,6 @@ describe('Popover', () => {
|
||||||
public render(): TunesMenuConfig {
|
public render(): TunesMenuConfig {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
onActivate: (): void => {},
|
onActivate: (): void => {},
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Tune 1',
|
title: 'Tune 1',
|
||||||
|
@ -595,7 +580,6 @@ describe('Popover', () => {
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
onActivate: (): void => {},
|
onActivate: (): void => {},
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Tune 2',
|
title: 'Tune 2',
|
||||||
|
@ -674,7 +658,6 @@ describe('Popover', () => {
|
||||||
public render(): TunesMenuConfig {
|
public render(): TunesMenuConfig {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
onActivate: (): void => {},
|
onActivate: (): void => {},
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Tune 1',
|
title: 'Tune 1',
|
||||||
|
@ -684,7 +667,6 @@ describe('Popover', () => {
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'default',
|
|
||||||
onActivate: (): void => {},
|
onActivate: (): void => {},
|
||||||
icon: 'Icon',
|
icon: 'Icon',
|
||||||
title: 'Tune 2',
|
title: 'Tune 2',
|
||||||
|
|
Loading…
Reference in a new issue