| @@ -1,73 +1,117 @@ | ||
| 1 | 1 | /** |
| 2 | 2 | * WordPress dependencies |
| 3 | 3 | */ |
| 4 | -const { __ } = wp.i18n; | |
| 4 | +import {__} from '@wordpress/i18n' | |
| 5 | 5 | |
| 6 | 6 | /** |
| 7 | 7 | * Block Attributes |
| 8 | -*/ | |
| 8 | + */ | |
| 9 | 9 | |
| 10 | 10 | const blockAttributes = { |
| 11 | - donorsPerPage: { | |
| 12 | - type: 'string', | |
| 13 | - default: '12', | |
| 14 | - }, | |
| 15 | - formID:{ | |
| 16 | - type: 'string', | |
| 17 | - default: '0', | |
| 18 | - }, | |
| 19 | - order:{ | |
| 20 | - type: 'string', | |
| 21 | - default: 'DESC', | |
| 22 | - }, | |
| 23 | - paged:{ | |
| 24 | - type: 'string', | |
| 25 | - default: '1', | |
| 26 | - }, | |
| 27 | - columns: { | |
| 28 | - type: 'string', | |
| 29 | - default: 'best-fit', | |
| 30 | - }, | |
| 31 | - showAvatar: { | |
| 32 | - type: 'boolean', | |
| 33 | - default: true, | |
| 34 | - }, | |
| 35 | - showName: { | |
| 36 | - type: 'boolean', | |
| 37 | - default: true, | |
| 38 | - }, | |
| 39 | - showTotal: { | |
| 40 | - type: 'boolean', | |
| 41 | - default: true, | |
| 42 | - }, | |
| 43 | - showDate: { | |
| 44 | - type: 'boolean', | |
| 45 | - default: true, | |
| 46 | - }, | |
| 47 | - showComments: { | |
| 48 | - type: 'boolean', | |
| 49 | - default: true, | |
| 50 | - }, | |
| 51 | - commentLength: { | |
| 52 | - type: 'string', | |
| 53 | - default: '140', | |
| 54 | - }, | |
| 55 | - onlyComments: { | |
| 56 | - type: 'boolean', | |
| 57 | - default: false, | |
| 58 | - }, | |
| 59 | - readMoreText: { | |
| 60 | - type: 'string', | |
| 61 | - default: __( 'Read more' ), | |
| 62 | - }, | |
| 63 | - loadMoreText: { | |
| 64 | - type: 'string', | |
| 65 | - default: __( 'Load more' ), | |
| 66 | - }, | |
| 67 | - avatarSize: { | |
| 68 | - type: 'string', | |
| 69 | - default: '60', | |
| 70 | - }, | |
| 11 | + donorsPerPage: { | |
| 12 | + type: 'string', | |
| 13 | + default: '12', | |
| 14 | + }, | |
| 15 | + formID: { | |
| 16 | + type: 'array', | |
| 17 | + default: [], | |
| 18 | + }, | |
| 19 | + ids: { | |
| 20 | + type: 'array', | |
| 21 | + default: [], | |
| 22 | + }, | |
| 23 | + categories: { | |
| 24 | + type: 'array', | |
| 25 | + default: [], | |
| 26 | + }, | |
| 27 | + tags: { | |
| 28 | + type: 'string', | |
| 29 | + default: [], | |
| 30 | + }, | |
| 31 | + orderBy: { | |
| 32 | + type: 'string', | |
| 33 | + default: 'post_date', | |
| 34 | + }, | |
| 35 | + order: { | |
| 36 | + type: 'string', | |
| 37 | + default: 'DESC', | |
| 38 | + }, | |
| 39 | + paged: { | |
| 40 | + type: 'string', | |
| 41 | + default: '1', | |
| 42 | + }, | |
| 43 | + columns: { | |
| 44 | + type: 'string', | |
| 45 | + default: '3', | |
| 46 | + }, | |
| 47 | + showAvatar: { | |
| 48 | + type: 'boolean', | |
| 49 | + default: true, | |
| 50 | + }, | |
| 51 | + showName: { | |
| 52 | + type: 'boolean', | |
| 53 | + default: true, | |
| 54 | + }, | |
| 55 | + showCompanyName: { | |
| 56 | + type: 'boolean', | |
| 57 | + default: false, | |
| 58 | + }, | |
| 59 | + showForm: { | |
| 60 | + type: 'boolean', | |
| 61 | + default: true, | |
| 62 | + }, | |
| 63 | + showTotal: { | |
| 64 | + type: 'boolean', | |
| 65 | + default: true, | |
| 66 | + }, | |
| 67 | + showComments: { | |
| 68 | + type: 'boolean', | |
| 69 | + default: true, | |
| 70 | + }, | |
| 71 | + showTributes: { | |
| 72 | + type: 'boolean', | |
| 73 | + default: true, | |
| 74 | + }, | |
| 75 | + showAnonymous: { | |
| 76 | + type: 'boolean', | |
| 77 | + default: true, | |
| 78 | + }, | |
| 79 | + onlyComments: { | |
| 80 | + type: 'boolean', | |
| 81 | + default: false, | |
| 82 | + }, | |
| 83 | + commentLength: { | |
| 84 | + type: 'string', | |
| 85 | + default: '80', | |
| 86 | + }, | |
| 87 | + readMoreText: { | |
| 88 | + type: 'string', | |
| 89 | + default: __('Read more', 'give'), | |
| 90 | + }, | |
| 91 | + loadMoreText: { | |
| 92 | + type: 'string', | |
| 93 | + default: __('Load more', 'give'), | |
| 94 | + }, | |
| 95 | + avatarSize: { | |
| 96 | + type: 'string', | |
| 97 | + default: '75', | |
| 98 | + }, | |
| 99 | + toggleOptions: { | |
| 100 | + type: 'string', | |
| 101 | + default: 'donorInfo', | |
| 102 | + }, | |
| 103 | + filterOptions: { | |
| 104 | + type: 'string', | |
| 105 | + default: 'ids', | |
| 106 | + }, | |
| 107 | + color: { | |
| 108 | + type: 'string', | |
| 109 | + default: '#219653', | |
| 110 | + }, | |
| 111 | + showTimestamp: { | |
| 112 | + type: 'boolean', | |
| 113 | + default: true, | |
| 114 | + }, | |
| 71 | 115 | }; |
| 72 | 116 | |
| 73 | 117 | export default blockAttributes; |