itmar-block-packages 1.6.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +18 -0
  2. package/build/index.asset.php +1 -1
  3. package/build/index.js +3 -3
  4. package/package.json +1 -1
  5. package/src/AnimationBlock.js +8 -8
  6. package/src/BlockPlace.js +62 -70
  7. package/src/DateElm.js +7 -7
  8. package/src/DraggableBox.js +4 -4
  9. package/src/GridControls.js +196 -137
  10. package/src/IconSelectControl.js +15 -15
  11. package/src/ShadowStyle.js +23 -23
  12. package/src/TypographyControls.js +5 -5
  13. package/src/ZipAddress.js +3 -3
  14. package/src/customFooks.js +1 -1
  15. package/src/index.js +3 -0
  16. package/src/validationCheck.js +10 -0
  17. package/src/wordpressApi.js +8 -8
  18. package/languages/itmar-block-packages-ja-2e59d6ebc088ea4b3d475a06e1e94824.json +0 -1
  19. package/languages/itmar-block-packages-ja-314423d5ad20380dc5fb85a96050381e.json +0 -1
  20. package/languages/itmar-block-packages-ja-3e946be5d900b4a727047c8a51bb058e.json +0 -1
  21. package/languages/itmar-block-packages-ja-5f1760422a0125b48fdcca644f4db89f.json +0 -1
  22. package/languages/itmar-block-packages-ja-800102e626a7ce0305d324a5bb0ee61e.json +0 -1
  23. package/languages/itmar-block-packages-ja-865f209aff5ee1f8efb51f6a62e8d8e1.json +0 -1
  24. package/languages/itmar-block-packages-ja-88eb778e4da0e010ceace8232ab1a901.json +0 -1
  25. package/languages/itmar-block-packages-ja-a418e2f5e97a053f5e0785a30f28b854.json +0 -1
  26. package/languages/itmar-block-packages-ja-ce2d14d174f0af0f13cd9a1302cebdd7.json +0 -1
  27. package/languages/itmar-block-packages-ja-f55909920e3bd84845271a62dbfb8dfe.json +0 -1
  28. package/languages/itmar-block-packages-ja-f6bd3c69ad85ee9ae9f1315af8f44e4a.json +0 -1
  29. package/languages/itmar-block-packages-ja.mo +0 -0
  30. package/languages/itmar-block-packages-ja.po +0 -1485
  31. package/languages/itmar-block-packages.pot +0 -530
@@ -6,21 +6,20 @@ import {
6
6
  ToolbarDropdownMenu,
7
7
  __experimentalNumberControl as NumberControl,
8
8
  __experimentalUnitControl as UnitControl,
9
- __experimentalInputControl as InputControl
10
- } from '@wordpress/components';
9
+ __experimentalInputControl as InputControl,
10
+ } from "@wordpress/components";
11
11
 
12
- import { useSelect, dispatch } from '@wordpress/data';
13
- import { useState, useEffect, useRef } from '@wordpress/element';
12
+ import { useSelect, dispatch } from "@wordpress/data";
13
+ import { useState, useEffect, useRef } from "@wordpress/element";
14
14
 
15
-
16
- import { __ } from '@wordpress/i18n';
17
- import { justifyCenter, justifyLeft, justifyRight } from '@wordpress/icons';
15
+ import { __ } from "@wordpress/i18n";
16
+ import { justifyCenter, justifyLeft, justifyRight } from "@wordpress/icons";
18
17
  //上よせアイコン
19
- const upper = <Icon icon={justifyLeft} className="rotate-icon" />
18
+ const upper = <Icon icon={justifyLeft} className="rotate-icon" />;
20
19
  //中央よせのアイコン
21
- const middle = <Icon icon={justifyCenter} className="rotate-icon" />
20
+ const middle = <Icon icon={justifyCenter} className="rotate-icon" />;
22
21
  //下よせのアイコン
23
- const lower = <Icon icon={justifyRight} className="rotate-icon" />
22
+ const lower = <Icon icon={justifyRight} className="rotate-icon" />;
24
23
  // アイコンと文字列キーのマッピングを作成
25
24
  const alignIconMap = {
26
25
  left: justifyLeft,
@@ -28,13 +27,13 @@ const alignIconMap = {
28
27
  right: justifyRight,
29
28
  upper: upper,
30
29
  middle: middle,
31
- lower: lower
30
+ lower: lower,
32
31
  };
33
32
 
34
33
  const units = [
35
- { value: 'px', label: 'px' },
36
- { value: 'em', label: 'em' },
37
- { value: 'rem', label: 'rem' },
34
+ { value: "px", label: "px" },
35
+ { value: "em", label: "em" },
36
+ { value: "rem", label: "rem" },
38
37
  ];
39
38
 
40
39
  const initializeUnitArray = (rowUnit, length) => {
@@ -44,7 +43,7 @@ const initializeUnitArray = (rowUnit, length) => {
44
43
  }
45
44
 
46
45
  return Array.from({ length }, (_, i) => rowUnit[i] || "1fr");
47
- }
46
+ };
48
47
 
49
48
  //r,cで与えられた座標がgridElmsのどの要素に含まれているかを返す
50
49
  const findElementInGrid = (gridElms, r, c) => {
@@ -62,7 +61,7 @@ const findElementInGrid = (gridElms, r, c) => {
62
61
  }
63
62
  }
64
63
  return null;
65
- }
64
+ };
66
65
 
67
66
  //親にイベントを伝播させないラッパー
68
67
  const StopPropagationWrapper = ({ children }) => {
@@ -72,22 +71,15 @@ const StopPropagationWrapper = ({ children }) => {
72
71
  };
73
72
 
74
73
  return (
75
- <div className='itmar_event_stopper' onClick={handleClick}>
74
+ <div className="itmar_event_stopper" onClick={handleClick}>
76
75
  {children}
77
76
  </div>
78
77
  );
79
78
  };
80
79
 
81
80
  const GridControls = ({ attributes, clientId, onChange }) => {
82
- const {
83
- gridElms,
84
- rowNum,
85
- colNum,
86
- rowGap,
87
- colGap,
88
- rowUnit,
89
- colUnit
90
- } = attributes;
81
+ const { gridElms, rowNum, colNum, rowGap, colGap, rowUnit, colUnit } =
82
+ attributes;
91
83
 
92
84
  //コンポーネント内の行列情報
93
85
  const [rowCount, setRowCount] = useState(rowNum);
@@ -100,7 +92,9 @@ const GridControls = ({ attributes, clientId, onChange }) => {
100
92
  const renderRows = () => {
101
93
  //セルが埋まっているかどうかの判定配列
102
94
 
103
- const occupied = new Array(rowCount).fill(0).map(() => new Array(colCount).fill(false));
95
+ const occupied = new Array(rowCount)
96
+ .fill(0)
97
+ .map(() => new Array(colCount).fill(false));
104
98
 
105
99
  let rows = [];
106
100
  // 列単位入力行を追加
@@ -113,7 +107,11 @@ const GridControls = ({ attributes, clientId, onChange }) => {
113
107
  type="text"
114
108
  isPressEnterToChange={true}
115
109
  onChange={(newValue) => {
116
- const newArray = [...colUnit.slice(0, c), newValue, ...colUnit.slice(c + 1)];
110
+ const newArray = [
111
+ ...colUnit.slice(0, c),
112
+ newValue,
113
+ ...colUnit.slice(c + 1),
114
+ ];
117
115
  setUnitColArray(newArray);
118
116
  }}
119
117
  />
@@ -133,10 +131,13 @@ const GridControls = ({ attributes, clientId, onChange }) => {
133
131
  type="text"
134
132
  isPressEnterToChange={true}
135
133
  onChange={(newValue) => {
136
- const newArray = [...rowUnit.slice(0, r), newValue, ...rowUnit.slice(r + 1)];
134
+ const newArray = [
135
+ ...rowUnit.slice(0, r),
136
+ newValue,
137
+ ...rowUnit.slice(r + 1),
138
+ ];
137
139
  setUnitRowArray(newArray);
138
140
  }}
139
-
140
141
  />
141
142
  </th>
142
143
  );
@@ -148,11 +149,15 @@ const GridControls = ({ attributes, clientId, onChange }) => {
148
149
  }
149
150
  //複数のセルを占める設定があればセルの結合オブジェクトを生成
150
151
  const setElm = findElementInGrid(gridElms, r, c);
151
- const rowSpanValue = setElm ? Math.abs(setElm.elm.startCell.rowInx - setElm.elm.endCell.rowInx) : 0;
152
- const colSpanValue = setElm ? Math.abs(setElm.elm.startCell.colInx - setElm.elm.endCell.colInx) : 0;
152
+ const rowSpanValue = setElm
153
+ ? Math.abs(setElm.elm.startCell.rowInx - setElm.elm.endCell.rowInx)
154
+ : 0;
155
+ const colSpanValue = setElm
156
+ ? Math.abs(setElm.elm.startCell.colInx - setElm.elm.endCell.colInx)
157
+ : 0;
153
158
  const cellSpan = {
154
159
  ...(rowSpanValue !== 0 && { rowspan: rowSpanValue + 1 }),
155
- ...(colSpanValue !== 0 && { colspan: colSpanValue + 1 })
160
+ ...(colSpanValue !== 0 && { colspan: colSpanValue + 1 }),
156
161
  };
157
162
  // 占められるセルの位置を記録
158
163
  for (let i = 0; i <= rowSpanValue; i++) {
@@ -163,36 +168,54 @@ const GridControls = ({ attributes, clientId, onChange }) => {
163
168
  }
164
169
  }
165
170
  //セルを生成
166
- cells.push(<td
167
- key={`cell-${r}-${c}`}
168
- {...cellSpan}
169
- className={isCellSelected(r, c) ? 'selected' : ''}
170
- style={setElm ? { backgroundColor: `var(--wp--custom--color--area-${setElm.index})` } : undefined}
171
- onClick={() => detectCellPosition(r, c)}
172
- >
173
- {setElm &&
174
- <StopPropagationWrapper>
175
- <ToolbarDropdownMenu
176
- label={__('Lateral Alignment', 'itmar-block-packages')}
177
- icon={setElm.elm.latAlign ? alignIconMap[setElm.elm.latAlign] : alignIconMap['left']}
178
- controls={['left', 'center', 'right'].map(align => ({
179
- icon: alignIconMap[align],
180
- isActive: setElm.elm.latAlign === align,
181
- onClick: () => updateAlignment(setElm.index, align, 'latAlign'),
182
- }))}
183
- />
184
- <ToolbarDropdownMenu
185
- label={__('Vertical Alignment', 'itmar-block-packages')}
186
- icon={setElm.elm.vertAlign ? alignIconMap[setElm.elm.vertAlign] : alignIconMap['upper']}
187
- controls={['upper', 'middle', 'lower'].map(align => ({
188
- icon: alignIconMap[align],
189
- isActive: setElm.elm.vertAlign === align,
190
- onClick: () => updateAlignment(setElm.index, align, 'vertAlign'),
191
- }))}
192
- />
193
- </StopPropagationWrapper>
194
- }
195
- </td>)
171
+ cells.push(
172
+ <td
173
+ key={`cell-${r}-${c}`}
174
+ {...cellSpan}
175
+ className={isCellSelected(r, c) ? "selected" : ""}
176
+ style={
177
+ setElm
178
+ ? {
179
+ backgroundColor: `var(--wp--custom--color--area-${setElm.index})`,
180
+ }
181
+ : undefined
182
+ }
183
+ onClick={() => detectCellPosition(r, c)}
184
+ >
185
+ {setElm && (
186
+ <StopPropagationWrapper>
187
+ <ToolbarDropdownMenu
188
+ label={__("Lateral Alignment", "block-collections")}
189
+ icon={
190
+ setElm.elm.latAlign
191
+ ? alignIconMap[setElm.elm.latAlign]
192
+ : alignIconMap["left"]
193
+ }
194
+ controls={["left", "center", "right"].map((align) => ({
195
+ icon: alignIconMap[align],
196
+ isActive: setElm.elm.latAlign === align,
197
+ onClick: () =>
198
+ updateAlignment(setElm.index, align, "latAlign"),
199
+ }))}
200
+ />
201
+ <ToolbarDropdownMenu
202
+ label={__("Vertical Alignment", "block-collections")}
203
+ icon={
204
+ setElm.elm.vertAlign
205
+ ? alignIconMap[setElm.elm.vertAlign]
206
+ : alignIconMap["upper"]
207
+ }
208
+ controls={["upper", "middle", "lower"].map((align) => ({
209
+ icon: alignIconMap[align],
210
+ isActive: setElm.elm.vertAlign === align,
211
+ onClick: () =>
212
+ updateAlignment(setElm.index, align, "vertAlign"),
213
+ }))}
214
+ />
215
+ </StopPropagationWrapper>
216
+ )}
217
+ </td>
218
+ );
196
219
  }
197
220
  // 行の追加
198
221
  rows.push(<tr key={`row-${r}`}>{cells}</tr>);
@@ -204,33 +227,46 @@ const GridControls = ({ attributes, clientId, onChange }) => {
204
227
  const detectCellPosition = (rowIndex, colIndex) => {
205
228
  //インナーブロックの選択がなければリターン
206
229
  if (!selBlock) {
207
- dispatch('core/notices').createNotice(
208
- 'error',
209
- __('No blocks selected.', 'itmar_guest_contact_block'),
210
- { type: 'snackbar', isDismissible: true, }
230
+ dispatch("core/notices").createNotice(
231
+ "error",
232
+ __("No blocks selected.", "itmar_guest_contact_block"),
233
+ { type: "snackbar", isDismissible: true }
211
234
  );
212
235
  return;
213
236
  }
214
237
  //選択済みのセルが選択されたときはリターン
215
238
  if (findElementInGrid(gridElms, rowIndex, colIndex)) {
216
- dispatch('core/notices').createNotice(
217
- 'error',
218
- __('That cell is already selected by another block.', 'itmar_guest_contact_block'),
219
- { type: 'snackbar', isDismissible: true, }
239
+ dispatch("core/notices").createNotice(
240
+ "error",
241
+ __(
242
+ "That cell is already selected by another block.",
243
+ "itmar_guest_contact_block"
244
+ ),
245
+ { type: "snackbar", isDismissible: true }
220
246
  );
221
247
  return;
222
248
  }
223
249
 
224
250
  //選択されたブロックのポジションを記録
225
251
  const newBlock = !selBlock.startCell
226
- ? { ...selBlock, startCell: { rowInx: rowIndex, colInx: colIndex }, endCell: { rowInx: rowIndex, colInx: colIndex } }
252
+ ? {
253
+ ...selBlock,
254
+ startCell: { rowInx: rowIndex, colInx: colIndex },
255
+ endCell: { rowInx: rowIndex, colInx: colIndex },
256
+ }
227
257
  : { ...selBlock, endCell: { rowInx: rowIndex, colInx: colIndex } };
228
258
 
229
259
  setSelBlock(newBlock);
230
260
 
231
261
  //blockNamesの更新
232
- const index = gridElms?.findIndex((block) => block.value === selBlock.value);
233
- const setAreaBlock = [...blockNames.slice(0, index), newBlock, ...blockNames.slice(index + 1)];
262
+ const index = gridElms?.findIndex(
263
+ (block) => block.value === selBlock.value
264
+ );
265
+ const setAreaBlock = [
266
+ ...blockNames.slice(0, index),
267
+ newBlock,
268
+ ...blockNames.slice(index + 1),
269
+ ];
234
270
  setBlockNames(setAreaBlock);
235
271
  };
236
272
 
@@ -238,51 +274,73 @@ const GridControls = ({ attributes, clientId, onChange }) => {
238
274
  const isCellSelected = (rowIndex, colIndex) => {
239
275
  if (selBlock) {
240
276
  // 各座標の最小値と最大値を決定
241
- const minRow = Math.min(selBlock.startCell?.rowInx, selBlock.endCell?.rowInx);
242
- const maxRow = Math.max(selBlock.startCell?.rowInx, selBlock.endCell?.rowInx);
243
- const minCol = Math.min(selBlock.startCell?.colInx, selBlock.endCell?.colInx);
244
- const maxCol = Math.max(selBlock.startCell?.colInx, selBlock.endCell?.colInx);
277
+ const minRow = Math.min(
278
+ selBlock.startCell?.rowInx,
279
+ selBlock.endCell?.rowInx
280
+ );
281
+ const maxRow = Math.max(
282
+ selBlock.startCell?.rowInx,
283
+ selBlock.endCell?.rowInx
284
+ );
285
+ const minCol = Math.min(
286
+ selBlock.startCell?.colInx,
287
+ selBlock.endCell?.colInx
288
+ );
289
+ const maxCol = Math.max(
290
+ selBlock.startCell?.colInx,
291
+ selBlock.endCell?.colInx
292
+ );
245
293
 
246
294
  // 座標が範囲内にあるかどうかをチェック
247
295
  return (
248
- rowIndex >= minRow && rowIndex <= maxRow &&
249
- colIndex >= minCol && colIndex <= maxCol
296
+ rowIndex >= minRow &&
297
+ rowIndex <= maxRow &&
298
+ colIndex >= minCol &&
299
+ colIndex <= maxCol
250
300
  );
251
301
  } else {
252
302
  return false;
253
303
  }
254
-
255
304
  };
256
305
 
257
306
  //コンテンツ位置設定
258
307
  const updateAlignment = (index, align, derection) => {
259
308
  const alignBlock = { ...blockNames[index], [derection]: align };
260
- const setAlignBlock = [...blockNames.slice(0, index), alignBlock, ...blockNames.slice(index + 1)];
309
+ const setAlignBlock = [
310
+ ...blockNames.slice(0, index),
311
+ alignBlock,
312
+ ...blockNames.slice(index + 1),
313
+ ];
261
314
  setBlockNames(setAlignBlock);
262
- }
315
+ };
263
316
 
264
317
  //選択したインナーブロック
265
318
  const [selBlock, setSelBlock] = useState(null);
266
319
 
267
320
  //インナーブロックを取得
268
- const parentBlocks = useSelect((select) => {
269
- const innerBlocks = select('core/block-editor').getBlocks(clientId);
270
- //インナーブロック入れ替えの際は既に登録したブロックの位置情報があれば、それを付加する。
271
- const new_block_names = innerBlocks.map((block, index) => gridElms.length > index ? {
272
- value: block.clientId,
273
- label: block.name,
274
- startCell: gridElms[index].startCell,
275
- endCell: gridElms[index].endCell,
276
- latAlign: gridElms[index].latAlign,
277
- vertAlign: gridElms[index].vertAlign
278
- } :
279
- {
280
- value: block.clientId,
281
- label: block.name
282
- }
283
- );
284
- return new_block_names
285
- }, [clientId]);
321
+ const parentBlocks = useSelect(
322
+ (select) => {
323
+ const innerBlocks = select("core/block-editor").getBlocks(clientId);
324
+ //インナーブロック入れ替えの際は既に登録したブロックの位置情報があれば、それを付加する。
325
+ const new_block_names = innerBlocks.map((block, index) =>
326
+ gridElms.length > index
327
+ ? {
328
+ value: block.clientId,
329
+ label: block.name,
330
+ startCell: gridElms[index].startCell,
331
+ endCell: gridElms[index].endCell,
332
+ latAlign: gridElms[index].latAlign,
333
+ vertAlign: gridElms[index].vertAlign,
334
+ }
335
+ : {
336
+ value: block.clientId,
337
+ label: block.name,
338
+ }
339
+ );
340
+ return new_block_names;
341
+ },
342
+ [clientId]
343
+ );
286
344
  const [blockNames, setBlockNames] = useState(parentBlocks);
287
345
 
288
346
  //グリッド配置のクリア
@@ -290,30 +348,35 @@ const GridControls = ({ attributes, clientId, onChange }) => {
290
348
  //ブロックの配置情報削除
291
349
  const clear_block = blockNames.map((block) => ({
292
350
  value: block.value,
293
- label: block.label
294
- }
295
- ));
351
+ label: block.label,
352
+ }));
296
353
  setBlockNames(clear_block);
297
-
298
- }
354
+ };
299
355
 
300
356
  //単位配列の初期化
301
357
  const initRowUnitArray = initializeUnitArray(rowUnit, rowCount);
302
358
  const [unitRowArray, setUnitRowArray] = useState(initRowUnitArray);
303
- const initColUnitArray = initializeUnitArray(colUnit, colCount);;
359
+ const initColUnitArray = initializeUnitArray(colUnit, colCount);
304
360
  const [unitColArray, setUnitColArray] = useState(initColUnitArray);
305
361
 
306
362
  //親ブロックへの書き戻し
307
363
  useEffect(() => {
308
- const gridStyle = { ...attributes, gridElms: blockNames, rowNum: rowCount, colNum: colCount, rowUnit: unitRowArray, colUnit: unitColArray };
364
+ const gridStyle = {
365
+ ...attributes,
366
+ gridElms: blockNames,
367
+ rowNum: rowCount,
368
+ colNum: colCount,
369
+ rowUnit: unitRowArray,
370
+ colUnit: unitColArray,
371
+ };
309
372
 
310
373
  onChange(gridStyle);
311
-
312
374
  }, [blockNames, unitRowArray, unitColArray]);
313
375
 
314
376
  //行と列の数を変えた場合は位置情報を削除・単位の再編成
315
377
  useEffect(() => {
316
- if (!firstFlgRef.current) {//マウント時は実行しない
378
+ if (!firstFlgRef.current) {
379
+ //マウント時は実行しない
317
380
  //ブロックの位置情報クリア
318
381
  clear_placement();
319
382
  //単位情報の再編成
@@ -322,79 +385,75 @@ const GridControls = ({ attributes, clientId, onChange }) => {
322
385
  const newColUnitArray = initializeUnitArray(colUnit, colCount);
323
386
  setUnitColArray(newColUnitArray);
324
387
  } else {
325
- firstFlgRef.current = false
388
+ firstFlgRef.current = false;
326
389
  }
327
-
328
390
  }, [rowCount, colCount]);
329
391
 
330
392
  return (
331
393
  <>
332
- <PanelRow
333
- className='distance_row'
334
- >
394
+ <PanelRow className="distance_row">
335
395
  <NumberControl
336
396
  onChange={(newValue) => {
337
- const input_val = typeof (newValue) === 'number' ? newValue : Number(newValue);
397
+ const input_val =
398
+ typeof newValue === "number" ? newValue : Number(newValue);
338
399
  setRowCount(input_val);
339
400
  }}
340
- label={__('Number of Row ', 'itmar-block-packages')}
401
+ label={__("Number of Row ", "block-collections")}
341
402
  value={rowCount}
342
403
  min={2}
343
404
  />
344
405
  <NumberControl
345
406
  onChange={(newValue) => {
346
- const input_val = typeof (newValue) === 'number' ? newValue : Number(newValue);
407
+ const input_val =
408
+ typeof newValue === "number" ? newValue : Number(newValue);
347
409
  setColCount(input_val);
348
410
  }}
349
- label={__('Number of Colum', 'itmar-block-packages')}
411
+ label={__("Number of Colum", "block-collections")}
350
412
  value={colCount}
351
413
  />
352
414
  </PanelRow>
353
- <PanelRow
354
- className='distance_row'
355
- >
415
+ <PanelRow className="distance_row">
356
416
  <UnitControl
357
417
  onChange={(newValue) => {
358
- newValue = newValue != '' ? newValue : '0px'
418
+ newValue = newValue != "" ? newValue : "0px";
359
419
  const newStyle = { ...attributes, rowGap: newValue };
360
420
  onChange(newStyle);
361
421
  }}
362
- label={__('Row Gap', 'itmar-block-packages')}
422
+ label={__("Row Gap", "block-collections")}
363
423
  value={rowGap}
364
424
  units={units}
365
425
  />
366
426
  <UnitControl
367
427
  onChange={(newValue) => {
368
- newValue = newValue != '' ? newValue : '0px'
428
+ newValue = newValue != "" ? newValue : "0px";
369
429
  const newStyle = { ...attributes, colGap: newValue };
370
430
  onChange(newStyle);
371
431
  }}
372
- label={__('Colum Gap', 'itmar-block-packages')}
432
+ label={__("Colum Gap", "block-collections")}
373
433
  value={colGap}
374
434
  units={units}
375
435
  />
376
-
377
436
  </PanelRow>
378
437
 
379
- <PanelRow className='distance_row'>
380
- <p>{__('Element placement', 'itmar-block-packages')}</p>
438
+ <PanelRow className="distance_row">
439
+ <p>{__("Element placement", "block-collections")}</p>
381
440
  <Button variant="secondary" onClick={clear_placement}>
382
- {__("Clear", 'itmar-block-packages')}
441
+ {__("Clear", "block-collections")}
383
442
  </Button>
384
443
  </PanelRow>
385
444
 
386
- <PanelRow className='grid_table' >
387
- <table>
388
- {renderRows()}
389
- </table>
445
+ <PanelRow className="grid_table">
446
+ <table>{renderRows()}</table>
390
447
  </PanelRow>
391
448
  <ComboboxControl
392
- label={__('InnerBlock Name', 'itmar-block-packages')}
449
+ label={__("InnerBlock Name", "block-collections")}
393
450
  options={blockNames}
394
451
  value={selBlock ? selBlock.value : null}
395
452
  onChange={(sel_id) => {
396
- const matchedBlock = blockNames.find(block => block.value === sel_id);
397
- setSelBlock(matchedBlock)
453
+ const matchedBlock = blockNames.find(
454
+ (block) => block.value === sel_id
455
+ );
456
+ setSelBlock(matchedBlock);
398
457
  }}
399
458
  />
400
459
  </>
@@ -22,14 +22,14 @@ const helpTextCode = createElement(
22
22
  helpLink,
23
23
  __(
24
24
  "Select the icon from and enter Unicode (the upper right four digits of the selection dialog). ",
25
- "itmar-block-packages"
25
+ "block-collections"
26
26
  )
27
27
  );
28
28
 
29
29
  const helpImageURL = createElement(
30
30
  "span",
31
31
  {},
32
- __("Enter the URL for the image.", "itmar-block-packages")
32
+ __("Enter the URL for the image.", "block-collections")
33
33
  );
34
34
 
35
35
  const helpTextFamily = createElement(
@@ -37,7 +37,7 @@ const helpTextFamily = createElement(
37
37
  {},
38
38
  __(
39
39
  "Please select the first class name shown in the HTML code field of the selection dialog. ",
40
- "itmar-block-packages"
40
+ "block-collections"
41
41
  )
42
42
  );
43
43
 
@@ -67,15 +67,15 @@ export default ({ iconStyle, setPosition, onChange }) => {
67
67
  return (
68
68
  <>
69
69
  <label className="components-base-control__label">
70
- {__("Icon Types", "itmar-block-packages")}
70
+ {__("Icon Types", "block-collections")}
71
71
  </label>
72
72
  <PanelRow className="itmar_position_row">
73
73
  <RadioControl
74
74
  selected={icon_type}
75
75
  options={[
76
- { label: __("Awesome", "itmar-block-packages"), value: "awesome" },
77
- { label: __("Image", "itmar-block-packages"), value: "image" },
78
- { label: __("Avatar", "itmar-block-packages"), value: "avatar" },
76
+ { label: __("Awesome", "block-collections"), value: "awesome" },
77
+ { label: __("Image", "block-collections"), value: "image" },
78
+ { label: __("Avatar", "block-collections"), value: "avatar" },
79
79
  ]}
80
80
  onChange={(newValue) => {
81
81
  const newStyle = { ...iconStyle, icon_type: newValue };
@@ -86,7 +86,7 @@ export default ({ iconStyle, setPosition, onChange }) => {
86
86
  {icon_type === "awesome" && (
87
87
  <>
88
88
  <TextControl
89
- label={__("icon name", "itmar-block-packages")}
89
+ label={__("icon name", "block-collections")}
90
90
  help={helpTextCode}
91
91
  labelPosition="top"
92
92
  value={icon_name}
@@ -98,7 +98,7 @@ export default ({ iconStyle, setPosition, onChange }) => {
98
98
  />
99
99
 
100
100
  <ComboboxControl
101
- label={__("Icon Family", "itmar-block-packages")}
101
+ label={__("Icon Family", "block-collections")}
102
102
  help={helpTextFamily}
103
103
  options={family_option}
104
104
  value={icon_family ? icon_family : "Font Awesome 6 Free"}
@@ -111,7 +111,7 @@ export default ({ iconStyle, setPosition, onChange }) => {
111
111
  )}
112
112
  {icon_type === "image" && (
113
113
  <TextControl
114
- label={__("icon url", "itmar-block-packages")}
114
+ label={__("icon url", "block-collections")}
115
115
  help={helpImageURL}
116
116
  labelPosition="top"
117
117
  value={icon_url}
@@ -129,7 +129,7 @@ export default ({ iconStyle, setPosition, onChange }) => {
129
129
  const newStyle = { ...iconStyle, icon_size: newValue };
130
130
  onChange(newStyle);
131
131
  }}
132
- label={__("Size", "itmar-block-packages")}
132
+ label={__("Size", "block-collections")}
133
133
  value={icon_size}
134
134
  units={units}
135
135
  />
@@ -140,7 +140,7 @@ export default ({ iconStyle, setPosition, onChange }) => {
140
140
  const newStyle = { ...iconStyle, icon_space: newValue };
141
141
  onChange(newStyle);
142
142
  }}
143
- label={__("spacing to end", "itmar-block-packages")}
143
+ label={__("spacing to end", "block-collections")}
144
144
  value={icon_space}
145
145
  units={units}
146
146
  />
@@ -164,14 +164,14 @@ export default ({ iconStyle, setPosition, onChange }) => {
164
164
  {setPosition && (
165
165
  <>
166
166
  <label className="components-base-control__label">
167
- {__("Arrangement", "itmar-block-packages")}
167
+ {__("Arrangement", "block-collections")}
168
168
  </label>
169
169
  <PanelRow className="itmar_position_row">
170
170
  <RadioControl
171
171
  selected={icon_pos}
172
172
  options={[
173
- { label: __("left", "itmar-block-packages"), value: "left" },
174
- { label: __("right", "itmar-block-packages"), value: "right" },
173
+ { label: __("left", "block-collections"), value: "left" },
174
+ { label: __("right", "block-collections"), value: "right" },
175
175
  ]}
176
176
  onChange={(newValue) => {
177
177
  const newStyle = { ...iconStyle, icon_pos: newValue };