1.112.1
2 months ago
1.116.2
2 months ago
1.13.2
2 months ago
1.16.1
2 months ago
1.70.0
2 months ago
1.94.2
2 months ago
index.js
2 weeks ago
index.js
123 lines
| 1 | import save1_13_2 from './1.13.2/save'; |
| 2 | import save1_16_1 from './1.16.1/save'; |
| 3 | import save1_94_2 from './1.94.2/save'; |
| 4 | import save1_112_1 from './1.112.1/save'; |
| 5 | import save1_116_2 from './1.116.2/save'; |
| 6 | |
| 7 | const blockAttributes = { |
| 8 | faIcon: { |
| 9 | type: 'string', |
| 10 | default: '<i class="fas fa-user"></i>', |
| 11 | }, |
| 12 | iconSize: { |
| 13 | type: 'number', |
| 14 | default: 36, |
| 15 | }, |
| 16 | iconSizeUnit: { |
| 17 | type: 'string', |
| 18 | default: 'px', |
| 19 | }, |
| 20 | iconMargin: { |
| 21 | type: 'number', |
| 22 | default: 22, |
| 23 | }, |
| 24 | iconMarginUnit: { |
| 25 | type: 'string', |
| 26 | default: 'px', |
| 27 | }, |
| 28 | iconRadius: { |
| 29 | type: 'number', |
| 30 | default: 50, |
| 31 | }, |
| 32 | iconAlign: { |
| 33 | type: 'string', |
| 34 | default: 'left', |
| 35 | }, |
| 36 | iconType: { |
| 37 | type: 'string', |
| 38 | default: '0' |
| 39 | }, |
| 40 | iconColor: { |
| 41 | type: 'string', |
| 42 | default: 'undefined', |
| 43 | }, |
| 44 | iconUrl: { |
| 45 | type: 'string', |
| 46 | default: "", |
| 47 | }, |
| 48 | iconTarget: { |
| 49 | type: 'boolean', |
| 50 | default: false, |
| 51 | }, |
| 52 | }; |
| 53 | |
| 54 | const blockAttributes2 = { |
| 55 | ...blockAttributes, |
| 56 | iconColor: { |
| 57 | type: 'string', |
| 58 | }, |
| 59 | iconUrl: { |
| 60 | type: 'string', |
| 61 | }, |
| 62 | } |
| 63 | |
| 64 | const blockAttributes3 = { |
| 65 | ...blockAttributes2, |
| 66 | iconFontColor: { |
| 67 | type: 'string', |
| 68 | }, |
| 69 | } |
| 70 | |
| 71 | const blockAttributes4 = { |
| 72 | ...blockAttributes3, |
| 73 | relAttribute: { |
| 74 | type: 'string', |
| 75 | default: '' |
| 76 | }, |
| 77 | linkDescription: { |
| 78 | type: 'string', |
| 79 | default: '' |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | /* |
| 84 | // v1.117.0 投稿リンク機能の追加に伴う属性の追加 |
| 85 | const blockAttributes5 = { |
| 86 | ...blockAttributes4, |
| 87 | linkToPost: { |
| 88 | type: 'boolean', |
| 89 | default: false, |
| 90 | }, |
| 91 | } |
| 92 | */ |
| 93 | |
| 94 | export const deprecated = [ |
| 95 | { |
| 96 | attributes: blockAttributes4, |
| 97 | save: save1_116_2, |
| 98 | }, |
| 99 | { |
| 100 | attributes: blockAttributes4, |
| 101 | save: save1_112_1, |
| 102 | }, |
| 103 | { |
| 104 | attributes: blockAttributes3, |
| 105 | save: save1_94_2, |
| 106 | migrate: (attributes) => { |
| 107 | return { |
| 108 | ...attributes, |
| 109 | relAttribute: '', |
| 110 | linkDescription: '', |
| 111 | }; |
| 112 | }, |
| 113 | }, |
| 114 | { |
| 115 | attributes: blockAttributes2, |
| 116 | save: save1_16_1, |
| 117 | }, |
| 118 | { |
| 119 | attributes: blockAttributes, |
| 120 | save: save1_13_2, |
| 121 | }, |
| 122 | ]; |
| 123 |