itmar-block-packages 1.6.0 → 1.6.2

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 (29) hide show
  1. package/README.md +2 -0
  2. package/build/index.asset.php +1 -1
  3. package/build/index.js +3 -3
  4. package/languages/itmar-block-packages-ja-2e59d6ebc088ea4b3d475a06e1e94824.json +1 -0
  5. package/languages/itmar-block-packages-ja-314423d5ad20380dc5fb85a96050381e.json +1 -0
  6. package/languages/itmar-block-packages-ja-3e946be5d900b4a727047c8a51bb058e.json +1 -0
  7. package/languages/itmar-block-packages-ja-5f1760422a0125b48fdcca644f4db89f.json +1 -0
  8. package/languages/itmar-block-packages-ja-800102e626a7ce0305d324a5bb0ee61e.json +1 -0
  9. package/languages/itmar-block-packages-ja-865f209aff5ee1f8efb51f6a62e8d8e1.json +1 -0
  10. package/languages/itmar-block-packages-ja-88eb778e4da0e010ceace8232ab1a901.json +1 -0
  11. package/languages/itmar-block-packages-ja-a418e2f5e97a053f5e0785a30f28b854.json +1 -0
  12. package/languages/itmar-block-packages-ja-ce2d14d174f0af0f13cd9a1302cebdd7.json +1 -0
  13. package/languages/itmar-block-packages-ja-f55909920e3bd84845271a62dbfb8dfe.json +1 -0
  14. package/languages/itmar-block-packages-ja-f6bd3c69ad85ee9ae9f1315af8f44e4a.json +1 -0
  15. package/languages/itmar-block-packages-ja.mo +0 -0
  16. package/languages/itmar-block-packages-ja.po +1485 -0
  17. package/languages/itmar-block-packages.pot +530 -0
  18. package/package.json +1 -1
  19. package/src/AnimationBlock.js +8 -8
  20. package/src/BlockPlace.js +76 -62
  21. package/src/DateElm.js +7 -7
  22. package/src/DraggableBox.js +4 -4
  23. package/src/GridControls.js +9 -9
  24. package/src/IconSelectControl.js +70 -30
  25. package/src/ShadowStyle.js +215 -158
  26. package/src/TypographyControls.js +62 -30
  27. package/src/ZipAddress.js +3 -3
  28. package/src/customFooks.js +1 -1
  29. package/src/wordpressApi.js +9 -9
@@ -4,33 +4,55 @@ import {
4
4
  RadioControl,
5
5
  ToggleControl,
6
6
  __experimentalUnitControl as UnitControl,
7
- } from '@wordpress/components';
7
+ } from "@wordpress/components";
8
8
 
9
- import Select from 'react-select';
10
- import { __ } from '@wordpress/i18n';
9
+ import Select from "react-select";
10
+ import { __ } from "@wordpress/i18n";
11
11
 
12
- const TypographyControls = ({ title, fontStyle, initialOpen, isMobile, onChange }) => {
12
+ const TypographyControls = ({
13
+ title,
14
+ fontStyle,
15
+ initialOpen,
16
+ isMobile,
17
+ onChange,
18
+ }) => {
13
19
  const {
14
20
  default_fontSize,
15
21
  mobile_fontSize,
16
22
  fontSize,
17
23
  fontFamily,
18
24
  fontWeight,
19
- isItalic
25
+ isItalic,
20
26
  } = fontStyle;
21
27
 
22
28
  const fontFamilyOptions = [
23
- { value: 'Arial, sans-serif', label: 'Arial', fontFamily: 'Arial, sans-serif' },
24
- { value: 'Courier New, monospace', label: 'Courier New', fontFamily: 'Courier New, monospace' },
25
- { value: 'Georgia, serif', label: 'Georgia', fontFamily: 'Georgia, serif' },
26
- { label: 'Noto Sans JP', value: 'Noto Sans JP, sans-serif', fontFamily: 'Noto Sans JP, sans-serif' },
27
- { label: 'Texturina', value: 'Texturina, serif', fontFamily: 'Texturina, serif' },
29
+ {
30
+ value: "Arial, sans-serif",
31
+ label: "Arial",
32
+ fontFamily: "Arial, sans-serif",
33
+ },
34
+ {
35
+ value: "Courier New, monospace",
36
+ label: "Courier New",
37
+ fontFamily: "Courier New, monospace",
38
+ },
39
+ { value: "Georgia, serif", label: "Georgia", fontFamily: "Georgia, serif" },
40
+ {
41
+ label: "Noto Sans JP",
42
+ value: "Noto Sans JP, sans-serif",
43
+ fontFamily: "Noto Sans JP, sans-serif",
44
+ },
45
+ {
46
+ label: "Texturina",
47
+ value: "Texturina, serif",
48
+ fontFamily: "Texturina, serif",
49
+ },
28
50
  ];
29
51
 
30
52
  const units = [
31
- { value: 'px', label: 'px' },
32
- { value: 'em', label: 'em' },
33
- { value: 'rem', label: 'rem' },
53
+ { value: "px", label: "px" },
54
+ { value: "em", label: "em" },
55
+ { value: "rem", label: "rem" },
34
56
  ];
35
57
 
36
58
  const customStyles = {
@@ -42,7 +64,9 @@ const TypographyControls = ({ title, fontStyle, initialOpen, isMobile, onChange
42
64
 
43
65
  const FontSelect = ({ label, value, onChange }) => (
44
66
  <>
45
- {label && <label className="components-base-control__label">{label}</label>}
67
+ {label && (
68
+ <label className="components-base-control__label">{label}</label>
69
+ )}
46
70
  <Select
47
71
  options={fontFamilyOptions}
48
72
  value={fontFamilyOptions.find((option) => option.value === value)}
@@ -55,24 +79,28 @@ const TypographyControls = ({ title, fontStyle, initialOpen, isMobile, onChange
55
79
  );
56
80
 
57
81
  return (
58
- <PanelBody title={title} initialOpen={initialOpen} >
82
+ <PanelBody title={title} initialOpen={initialOpen}>
59
83
  <UnitControl
60
84
  dragDirection="e"
61
85
  onChange={(newValue) => {
62
- newValue = newValue != '' ? newValue : '0px'
63
- const set_size = !isMobile ? { default_fontSize: newValue } : { mobile_fontSize: newValue };
86
+ newValue = newValue != "" ? newValue : "0px";
87
+ const set_size = !isMobile
88
+ ? { default_fontSize: newValue }
89
+ : { mobile_fontSize: newValue };
64
90
  const newStyle = { ...fontStyle, ...set_size };
65
91
  onChange(newStyle);
66
92
  }}
67
- label={!isMobile ?
68
- __("Size(desk top)", 'block-collections')
69
- : __("Size(mobile)", 'block-collections')}
93
+ label={
94
+ !isMobile
95
+ ? __("Size(desk top)", "itmar-block-packages")
96
+ : __("Size(mobile)", "itmar-block-packages")
97
+ }
70
98
  value={!isMobile ? default_fontSize : mobile_fontSize}
71
99
  units={units}
72
100
  />
73
101
 
74
102
  <FontSelect
75
- label={__("font family", 'block-collections')}
103
+ label={__("font family", "itmar-block-packages")}
76
104
  value={fontFamily}
77
105
  onChange={(newValue) => {
78
106
  const newStyle = { ...fontStyle, fontFamily: newValue };
@@ -80,17 +108,19 @@ const TypographyControls = ({ title, fontStyle, initialOpen, isMobile, onChange
80
108
  }}
81
109
  />
82
110
 
83
- <label className="components-base-control__label">{__('font weight', 'block-collections')}</label>
84
- <PanelRow className='itmar_weight_row'>
111
+ <label className="components-base-control__label">
112
+ {__("font weight", "itmar-block-packages")}
113
+ </label>
114
+ <PanelRow className="itmar_weight_row">
85
115
  <RadioControl
86
116
  selected={fontWeight}
87
117
  options={[
88
- { label: 'LIGHT', value: "300" },
89
- { label: 'REGULAR', value: "400" },
90
- { label: 'MEDIUM', value: "500" },
91
- { label: 'S-BOLD', value: "600" },
92
- { label: 'BOLD', value: "700" },
93
- { label: 'BLACK', value: "900" },
118
+ { label: "LIGHT", value: "300" },
119
+ { label: "REGULAR", value: "400" },
120
+ { label: "MEDIUM", value: "500" },
121
+ { label: "S-BOLD", value: "600" },
122
+ { label: "BOLD", value: "700" },
123
+ { label: "BLACK", value: "900" },
94
124
  ]}
95
125
  onChange={(newValue) => {
96
126
  const newStyle = { ...fontStyle, fontWeight: newValue };
@@ -99,7 +129,9 @@ const TypographyControls = ({ title, fontStyle, initialOpen, isMobile, onChange
99
129
  />
100
130
  </PanelRow>
101
131
 
102
- <label className="components-base-control__label">{__('Italic display', 'block-collections')}</label>
132
+ <label className="components-base-control__label">
133
+ {__("Italic display", "itmar-block-packages")}
134
+ </label>
103
135
  <ToggleControl
104
136
  checked={isItalic}
105
137
  onChange={(newValue) => {
package/src/ZipAddress.js CHANGED
@@ -6,7 +6,7 @@ export const fetchZipToAddress = async (zipNum) => {
6
6
  alert(
7
7
  __(
8
8
  "Please enter your postal code as 7 digits without hyphens.",
9
- "block-collections"
9
+ "itmar-block-packages"
10
10
  )
11
11
  );
12
12
  return null;
@@ -25,11 +25,11 @@ export const fetchZipToAddress = async (zipNum) => {
25
25
  const result = data.results[0];
26
26
  return result;
27
27
  } else {
28
- alert(__("No matching address found", "block-collections"));
28
+ alert(__("No matching address found", "itmar-block-packages"));
29
29
  return null;
30
30
  }
31
31
  } catch (error) {
32
- alert(__("Communication failed", "block-collections"));
32
+ alert(__("Communication failed", "itmar-block-packages"));
33
33
  return null;
34
34
  }
35
35
  };
@@ -319,7 +319,7 @@ export function useDuplicateBlockRemove(clientId, blockNames) {
319
319
  "error", // 通知のタイプ(エラー)
320
320
  __(
321
321
  "A new block cannot be inserted because a block has already been placed.",
322
- "block-collections"
322
+ "itmar-block-packages"
323
323
  ), // メッセージ
324
324
  {
325
325
  type: "snackbar", // 通知のスタイル
@@ -165,7 +165,7 @@ const ChoiceControl = (props) => {
165
165
  <div className="tax_label">
166
166
  {choice.name}
167
167
  <ToggleControl
168
- label={__("Display", "block-collections")}
168
+ label={__("Display", "itmar-block-packages")}
169
169
  checked={dispTaxonomies.some((tax) => tax === choice.slug)}
170
170
  onChange={(checked) => {
171
171
  const newChoiceFields = handleChoiceChange(
@@ -226,7 +226,7 @@ const ChoiceControl = (props) => {
226
226
  {choice.title && (
227
227
  <ToggleControl
228
228
  className="field_choice"
229
- label={__("Title", "block-collections")}
229
+ label={__("Title", "itmar-block-packages")}
230
230
  checked={choiceItems.some(
231
231
  (choiceField) => choiceField === "title"
232
232
  )}
@@ -243,7 +243,7 @@ const ChoiceControl = (props) => {
243
243
  {choice.date && (
244
244
  <ToggleControl
245
245
  className="field_choice"
246
- label={__("Date", "block-collections")}
246
+ label={__("Date", "itmar-block-packages")}
247
247
  checked={choiceItems.some(
248
248
  (choiceField) => choiceField === "date"
249
249
  )}
@@ -260,7 +260,7 @@ const ChoiceControl = (props) => {
260
260
  {choice.excerpt && (
261
261
  <ToggleControl
262
262
  className="field_choice"
263
- label={__("Excerpt", "block-collections")}
263
+ label={__("Excerpt", "itmar-block-packages")}
264
264
  checked={choiceItems.some(
265
265
  (choiceField) => choiceField === "excerpt"
266
266
  )}
@@ -277,7 +277,7 @@ const ChoiceControl = (props) => {
277
277
  {(choice.featured_media || choice.featured_media === 0) && (
278
278
  <ToggleControl
279
279
  className="field_choice"
280
- label={__("Featured Image", "block-collections")}
280
+ label={__("Featured Image", "itmar-block-packages")}
281
281
  checked={choiceItems.some(
282
282
  (choiceField) => choiceField === "featured_media"
283
283
  )}
@@ -295,7 +295,7 @@ const ChoiceControl = (props) => {
295
295
  <div className="itmar_custom_field_set">
296
296
  <ToggleControl
297
297
  className="field_choice"
298
- label={__("Single Page Link", "block-collections")}
298
+ label={__("Single Page Link", "itmar-block-packages")}
299
299
  checked={choiceItems.some(
300
300
  (choiceField) => choiceField === "link"
301
301
  )}
@@ -331,7 +331,7 @@ const ChoiceControl = (props) => {
331
331
  <p>
332
332
  {__(
333
333
  "If no block is specified, a link will be set to the parent block, Design Group.",
334
- "block-collections"
334
+ "itmar-block-packages"
335
335
  )}
336
336
  </p>
337
337
  </div>
@@ -339,7 +339,7 @@ const ChoiceControl = (props) => {
339
339
  {(metaFlg || acfFlg) && (
340
340
  <>
341
341
  <div className="custom_field_label">
342
- {__("Custom Field", "block-collections")}
342
+ {__("Custom Field", "itmar-block-packages")}
343
343
  </div>
344
344
  <div className="custom_field_area">
345
345
  {dispCustumFields({
@@ -377,7 +377,7 @@ export const fetchPagesOptions = async (home_url) => {
377
377
  id: -1,
378
378
  title: { rendered: "ホーム" },
379
379
  link: home_url,
380
- slug: "home",
380
+ slug: "",
381
381
  });
382
382
  }
383
383