itmar-block-packages 2.1.2 → 3.0.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 (218) hide show
  1. package/README.md +18 -4
  2. package/build/cjs/AnimationBlock.js +61 -92
  3. package/build/cjs/AnimationBlock.js.map +1 -1
  4. package/build/cjs/BlockEditWrapper.js +3 -10
  5. package/build/cjs/BlockEditWrapper.js.map +1 -1
  6. package/build/cjs/BlockPlace.js +277 -482
  7. package/build/cjs/BlockPlace.js.map +1 -1
  8. package/build/cjs/BrockInserter.js +195 -191
  9. package/build/cjs/BrockInserter.js.map +1 -1
  10. package/build/cjs/DateElm.js +254 -281
  11. package/build/cjs/DateElm.js.map +1 -1
  12. package/build/cjs/DraggableBox.js +99 -129
  13. package/build/cjs/DraggableBox.js.map +1 -1
  14. package/build/cjs/GridControls.js +292 -392
  15. package/build/cjs/GridControls.js.map +1 -1
  16. package/build/cjs/IconSelectControl.js +65 -156
  17. package/build/cjs/IconSelectControl.js.map +1 -1
  18. package/build/cjs/JapaneseHolidays.js +67 -76
  19. package/build/cjs/JapaneseHolidays.js.map +1 -1
  20. package/build/cjs/MasonryControl.js +95 -100
  21. package/build/cjs/MasonryControl.js.map +1 -1
  22. package/build/cjs/PseudoElm.js +37 -50
  23. package/build/cjs/PseudoElm.js.map +1 -1
  24. package/build/cjs/ShadowStyle.js +216 -430
  25. package/build/cjs/ShadowStyle.js.map +1 -1
  26. package/build/cjs/SwiperControl.js +240 -241
  27. package/build/cjs/SwiperControl.js.map +1 -1
  28. package/build/cjs/ToggleElement.js +17 -9
  29. package/build/cjs/ToggleElement.js.map +1 -1
  30. package/build/cjs/TypographyControls.js +73 -139
  31. package/build/cjs/TypographyControls.js.map +1 -1
  32. package/build/cjs/UpdateAllPostsBlockAttributes.js +102 -119
  33. package/build/cjs/UpdateAllPostsBlockAttributes.js.map +1 -1
  34. package/build/cjs/ZipAddress.js +27 -23
  35. package/build/cjs/ZipAddress.js.map +1 -1
  36. package/build/cjs/blockStore.js +42 -47
  37. package/build/cjs/blockStore.js.map +1 -1
  38. package/build/cjs/cssPropertes.js +165 -117
  39. package/build/cjs/cssPropertes.js.map +1 -1
  40. package/build/cjs/customHooks.js +277 -0
  41. package/build/cjs/customHooks.js.map +1 -0
  42. package/build/cjs/formatCreate.js +115 -145
  43. package/build/cjs/formatCreate.js.map +1 -1
  44. package/build/cjs/hslToRgb.js +112 -116
  45. package/build/cjs/hslToRgb.js.map +1 -1
  46. package/build/cjs/index.js +15 -11
  47. package/build/cjs/index.js.map +1 -1
  48. package/build/cjs/mediaUpload.js +95 -158
  49. package/build/cjs/mediaUpload.js.map +1 -1
  50. package/build/cjs/node_modules/swiper/shared/ssr-window.esm.js +144 -0
  51. package/build/cjs/node_modules/swiper/shared/ssr-window.esm.js.map +1 -0
  52. package/build/cjs/node_modules/swiper/shared/swiper-core.js +3925 -0
  53. package/build/cjs/node_modules/swiper/shared/swiper-core.js.map +1 -0
  54. package/build/cjs/node_modules/swiper/shared/utils.js +294 -0
  55. package/build/cjs/node_modules/swiper/shared/utils.js.map +1 -0
  56. package/build/cjs/pickupStore.js +56 -54
  57. package/build/cjs/pickupStore.js.map +1 -1
  58. package/build/cjs/shopfiApi.js +127 -138
  59. package/build/cjs/shopfiApi.js.map +1 -1
  60. package/build/cjs/types/AnimationBlock.d.ts +22 -0
  61. package/build/cjs/types/BlockEditWrapper.d.ts +7 -0
  62. package/build/cjs/types/BlockPlace.d.ts +49 -0
  63. package/build/cjs/types/BrockInserter.d.ts +6 -0
  64. package/build/cjs/types/DateElm.d.ts +69 -0
  65. package/build/cjs/types/DraggableBox.d.ts +19 -0
  66. package/build/cjs/types/GridControls.d.ts +27 -0
  67. package/build/cjs/types/IconSelectControl.d.ts +17 -0
  68. package/build/cjs/types/JapaneseHolidays.d.ts +6 -0
  69. package/build/cjs/types/MasonryControl.d.ts +35 -0
  70. package/build/cjs/types/PseudoElm.d.ts +11 -0
  71. package/build/cjs/types/ShadowStyle.d.ts +33 -0
  72. package/build/cjs/types/SwiperControl.d.ts +12 -0
  73. package/build/cjs/types/ToggleElement.d.ts +13 -0
  74. package/build/cjs/types/TypographyControls.d.ts +17 -0
  75. package/build/cjs/types/UpdateAllPostsBlockAttributes.d.ts +10 -0
  76. package/build/cjs/types/ZipAddress.d.ts +18 -0
  77. package/build/cjs/types/blockStore.d.ts +15 -0
  78. package/build/cjs/types/cssPropertes.d.ts +53 -0
  79. package/build/cjs/types/customHooks.d.ts +11 -0
  80. package/build/cjs/types/formatCreate.d.ts +18 -0
  81. package/build/cjs/types/hslToRgb.d.ts +23 -0
  82. package/build/cjs/types/index.d.ts +31 -0
  83. package/build/cjs/types/mediaUpload.d.ts +29 -0
  84. package/build/cjs/types/pickupStore.d.ts +39 -0
  85. package/build/cjs/types/shopfiApi.d.ts +18 -0
  86. package/build/cjs/types/validationCheck.d.ts +5 -0
  87. package/build/cjs/types/wordpressApi.d.ts +99 -0
  88. package/build/cjs/validationCheck.js +15 -9
  89. package/build/cjs/validationCheck.js.map +1 -1
  90. package/build/cjs/wordpressApi.js +364 -576
  91. package/build/cjs/wordpressApi.js.map +1 -1
  92. package/build/esm/AnimationBlock.d.ts +22 -0
  93. package/build/esm/AnimationBlock.js +61 -92
  94. package/build/esm/AnimationBlock.js.map +1 -1
  95. package/build/esm/BlockEditWrapper.d.ts +7 -0
  96. package/build/esm/BlockEditWrapper.js +4 -11
  97. package/build/esm/BlockEditWrapper.js.map +1 -1
  98. package/build/esm/BlockPlace.d.ts +49 -0
  99. package/build/esm/BlockPlace.js +279 -484
  100. package/build/esm/BlockPlace.js.map +1 -1
  101. package/build/esm/BrockInserter.d.ts +6 -0
  102. package/build/esm/BrockInserter.js +195 -191
  103. package/build/esm/BrockInserter.js.map +1 -1
  104. package/build/esm/DateElm.d.ts +69 -0
  105. package/build/esm/DateElm.js +254 -281
  106. package/build/esm/DateElm.js.map +1 -1
  107. package/build/esm/DraggableBox.d.ts +19 -0
  108. package/build/esm/DraggableBox.js +99 -129
  109. package/build/esm/DraggableBox.js.map +1 -1
  110. package/build/esm/GridControls.d.ts +27 -0
  111. package/build/esm/GridControls.js +294 -394
  112. package/build/esm/GridControls.js.map +1 -1
  113. package/build/esm/IconSelectControl.d.ts +17 -0
  114. package/build/esm/IconSelectControl.js +65 -156
  115. package/build/esm/IconSelectControl.js.map +1 -1
  116. package/build/esm/JapaneseHolidays.d.ts +6 -0
  117. package/build/esm/JapaneseHolidays.js +67 -76
  118. package/build/esm/JapaneseHolidays.js.map +1 -1
  119. package/build/esm/MasonryControl.d.ts +35 -0
  120. package/build/esm/MasonryControl.js +95 -100
  121. package/build/esm/MasonryControl.js.map +1 -1
  122. package/build/esm/PseudoElm.d.ts +11 -0
  123. package/build/esm/PseudoElm.js +37 -50
  124. package/build/esm/PseudoElm.js.map +1 -1
  125. package/build/esm/ShadowStyle.d.ts +33 -0
  126. package/build/esm/ShadowStyle.js +217 -431
  127. package/build/esm/ShadowStyle.js.map +1 -1
  128. package/build/esm/SwiperControl.d.ts +12 -0
  129. package/build/esm/SwiperControl.js +240 -241
  130. package/build/esm/SwiperControl.js.map +1 -1
  131. package/build/esm/ToggleElement.d.ts +13 -0
  132. package/build/esm/ToggleElement.js +17 -9
  133. package/build/esm/ToggleElement.js.map +1 -1
  134. package/build/esm/TypographyControls.d.ts +17 -0
  135. package/build/esm/TypographyControls.js +73 -139
  136. package/build/esm/TypographyControls.js.map +1 -1
  137. package/build/esm/UpdateAllPostsBlockAttributes.d.ts +10 -0
  138. package/build/esm/UpdateAllPostsBlockAttributes.js +103 -120
  139. package/build/esm/UpdateAllPostsBlockAttributes.js.map +1 -1
  140. package/build/esm/ZipAddress.d.ts +18 -0
  141. package/build/esm/ZipAddress.js +27 -23
  142. package/build/esm/ZipAddress.js.map +1 -1
  143. package/build/esm/blockStore.d.ts +15 -0
  144. package/build/esm/blockStore.js +42 -47
  145. package/build/esm/blockStore.js.map +1 -1
  146. package/build/esm/cssPropertes.d.ts +53 -0
  147. package/build/esm/cssPropertes.js +165 -117
  148. package/build/esm/cssPropertes.js.map +1 -1
  149. package/build/esm/customHooks.d.ts +11 -0
  150. package/build/esm/customHooks.js +267 -0
  151. package/build/esm/customHooks.js.map +1 -0
  152. package/build/esm/formatCreate.d.ts +18 -0
  153. package/build/esm/formatCreate.js +115 -145
  154. package/build/esm/formatCreate.js.map +1 -1
  155. package/build/esm/hslToRgb.d.ts +23 -0
  156. package/build/esm/hslToRgb.js +112 -116
  157. package/build/esm/hslToRgb.js.map +1 -1
  158. package/build/esm/index.d.ts +27 -0
  159. package/build/esm/index.js +8 -1
  160. package/build/esm/index.js.map +1 -1
  161. package/build/esm/mediaUpload.d.ts +29 -0
  162. package/build/esm/mediaUpload.js +95 -158
  163. package/build/esm/mediaUpload.js.map +1 -1
  164. package/build/esm/node_modules/swiper/shared/ssr-window.esm.js +141 -0
  165. package/build/esm/node_modules/swiper/shared/ssr-window.esm.js.map +1 -0
  166. package/build/esm/node_modules/swiper/shared/swiper-core.js +3922 -0
  167. package/build/esm/node_modules/swiper/shared/swiper-core.js.map +1 -0
  168. package/build/esm/node_modules/swiper/shared/utils.js +274 -0
  169. package/build/esm/node_modules/swiper/shared/utils.js.map +1 -0
  170. package/build/esm/pickupStore.d.ts +39 -0
  171. package/build/esm/pickupStore.js +56 -54
  172. package/build/esm/pickupStore.js.map +1 -1
  173. package/build/esm/shopfiApi.d.ts +18 -0
  174. package/build/esm/shopfiApi.js +127 -138
  175. package/build/esm/shopfiApi.js.map +1 -1
  176. package/build/esm/types/AnimationBlock.d.ts +22 -0
  177. package/build/esm/types/BlockEditWrapper.d.ts +7 -0
  178. package/build/esm/types/BlockPlace.d.ts +49 -0
  179. package/build/esm/types/BrockInserter.d.ts +6 -0
  180. package/build/esm/types/DateElm.d.ts +69 -0
  181. package/build/esm/types/DraggableBox.d.ts +19 -0
  182. package/build/esm/types/GridControls.d.ts +27 -0
  183. package/build/esm/types/IconSelectControl.d.ts +17 -0
  184. package/build/esm/types/JapaneseHolidays.d.ts +6 -0
  185. package/build/esm/types/MasonryControl.d.ts +35 -0
  186. package/build/esm/types/PseudoElm.d.ts +11 -0
  187. package/build/esm/types/ShadowStyle.d.ts +33 -0
  188. package/build/esm/types/SwiperControl.d.ts +12 -0
  189. package/build/esm/types/ToggleElement.d.ts +13 -0
  190. package/build/esm/types/TypographyControls.d.ts +17 -0
  191. package/build/esm/types/UpdateAllPostsBlockAttributes.d.ts +10 -0
  192. package/build/esm/types/ZipAddress.d.ts +18 -0
  193. package/build/esm/types/blockStore.d.ts +15 -0
  194. package/build/esm/types/cssPropertes.d.ts +53 -0
  195. package/build/esm/types/customHooks.d.ts +11 -0
  196. package/build/esm/types/formatCreate.d.ts +18 -0
  197. package/build/esm/types/hslToRgb.d.ts +23 -0
  198. package/build/esm/types/index.d.ts +31 -0
  199. package/build/esm/types/mediaUpload.d.ts +29 -0
  200. package/build/esm/types/pickupStore.d.ts +39 -0
  201. package/build/esm/types/shopfiApi.d.ts +18 -0
  202. package/build/esm/types/validationCheck.d.ts +5 -0
  203. package/build/esm/types/wordpressApi.d.ts +99 -0
  204. package/build/esm/validationCheck.d.ts +5 -0
  205. package/build/esm/validationCheck.js +15 -9
  206. package/build/esm/validationCheck.js.map +1 -1
  207. package/build/esm/wordpressApi.d.ts +99 -0
  208. package/build/esm/wordpressApi.js +365 -577
  209. package/build/esm/wordpressApi.js.map +1 -1
  210. package/package.json +29 -7
  211. package/build/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -117
  212. package/build/cjs/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
  213. package/build/cjs/customFooks.js +0 -300
  214. package/build/cjs/customFooks.js.map +0 -1
  215. package/build/esm/_virtual/_rollupPluginBabelHelpers.js +0 -107
  216. package/build/esm/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
  217. package/build/esm/customFooks.js +0 -290
  218. package/build/esm/customFooks.js.map +0 -1
@@ -1,416 +1,316 @@
1
- import { objectSpread2 as _objectSpread2, extends as _extends } from './_virtual/_rollupPluginBabelHelpers.js';
2
- import { PanelRow, __experimentalNumberControl, __experimentalUnitControl, Button, ComboboxControl, __experimentalInputControl, ToolbarDropdownMenu, Icon } from '@wordpress/components';
1
+ import { createElement, useState, useRef, useEffect, Fragment } from '@wordpress/element';
2
+ import { Icon, PanelRow, __experimentalNumberControl, __experimentalUnitControl, Button, ComboboxControl, __experimentalInputControl, ToolbarDropdownMenu } from '@wordpress/components';
3
3
  import { useSelect, dispatch } from '@wordpress/data';
4
- import { useState, useRef, useEffect } from '@wordpress/element';
5
4
  import { __ } from '@wordpress/i18n';
6
- import { justifyRight, justifyCenter, justifyLeft } from '@wordpress/icons';
5
+ import { justifyLeft, justifyCenter, justifyRight } from '@wordpress/icons';
7
6
 
8
7
  //上よせアイコン
9
- var upper = /*#__PURE__*/React.createElement(Icon, {
10
- icon: justifyLeft,
11
- className: "rotate-icon"
12
- });
8
+ const upper = createElement(Icon, { icon: justifyLeft, className: "rotate-icon" });
13
9
  //中央よせのアイコン
14
- var middle = /*#__PURE__*/React.createElement(Icon, {
15
- icon: justifyCenter,
16
- className: "rotate-icon"
17
- });
10
+ const middle = createElement(Icon, { icon: justifyCenter, className: "rotate-icon" });
18
11
  //下よせのアイコン
19
- var lower = /*#__PURE__*/React.createElement(Icon, {
20
- icon: justifyRight,
21
- className: "rotate-icon"
22
- });
12
+ const lower = createElement(Icon, { icon: justifyRight, className: "rotate-icon" });
23
13
  // アイコンと文字列キーのマッピングを作成
24
- var alignIconMap = {
25
- left: justifyLeft,
26
- center: justifyCenter,
27
- right: justifyRight,
28
- upper: upper,
29
- middle: middle,
30
- lower: lower
14
+ const alignIconMap = {
15
+ left: justifyLeft,
16
+ center: justifyCenter,
17
+ right: justifyRight,
18
+ upper: upper,
19
+ middle: middle,
20
+ lower: lower,
31
21
  };
32
- var units = [{
33
- value: "px",
34
- label: "px"
35
- }, {
36
- value: "em",
37
- label: "em"
38
- }, {
39
- value: "rem",
40
- label: "rem"
41
- }];
42
- var initializeUnitArray = (rowUnit, length) => {
43
- if (!Array.isArray(rowUnit)) {
44
- // rowUnit が配列ではない(undefined を含む)場合、全て "1fr" で埋めた配列を返す
45
- return Array(length).fill("1fr");
46
- }
47
- return Array.from({
48
- length
49
- }, (_, i) => rowUnit[i] || "1fr");
22
+ const units = [
23
+ { value: "px", label: "px" },
24
+ { value: "em", label: "em" },
25
+ { value: "rem", label: "rem" },
26
+ ];
27
+ const initializeUnitArray = (rowUnit, length) => {
28
+ if (!Array.isArray(rowUnit)) {
29
+ // rowUnit が配列ではない(undefined を含む)場合、全て "1fr" で埋めた配列を返す
30
+ return Array(length).fill("1fr");
31
+ }
32
+ return Array.from({ length }, (_, i) => rowUnit[i] || "1fr");
50
33
  };
51
-
52
- //r,cで与えられた座標がgridElmsのどの要素に含まれているかを返す
53
- var findElementInGrid = (gridElms, r, c) => {
54
- for (var i = 0; i < gridElms.length; i++) {
55
- var {
56
- startCell,
57
- endCell
58
- } = gridElms[i];
59
- // 各座標の最小値と最大値を決定
60
- var minRow = Math.min(startCell === null || startCell === void 0 ? void 0 : startCell.rowInx, endCell === null || endCell === void 0 ? void 0 : endCell.rowInx);
61
- var maxRow = Math.max(startCell === null || startCell === void 0 ? void 0 : startCell.rowInx, endCell === null || endCell === void 0 ? void 0 : endCell.rowInx);
62
- var minCol = Math.min(startCell === null || startCell === void 0 ? void 0 : startCell.colInx, endCell === null || endCell === void 0 ? void 0 : endCell.colInx);
63
- var maxCol = Math.max(startCell === null || startCell === void 0 ? void 0 : startCell.colInx, endCell === null || endCell === void 0 ? void 0 : endCell.colInx);
64
-
65
- // 座標が範囲内にあるかどうかをチェック
66
- if (r >= minRow && r <= maxRow && c >= minCol && c <= maxCol) {
67
- return {
68
- index: i,
69
- elm: gridElms[i]
70
- };
34
+ const findElementInGrid = (gridElms, r, c) => {
35
+ for (let i = 0; i < gridElms.length; i++) {
36
+ const { startCell, endCell } = gridElms[i];
37
+ // 各座標の最小値と最大値を決定
38
+ const minRow = Math.min(startCell?.rowInx, endCell?.rowInx);
39
+ const maxRow = Math.max(startCell?.rowInx, endCell?.rowInx);
40
+ const minCol = Math.min(startCell?.colInx, endCell?.colInx);
41
+ const maxCol = Math.max(startCell?.colInx, endCell?.colInx);
42
+ // 座標が範囲内にあるかどうかをチェック
43
+ if (r >= minRow && r <= maxRow && c >= minCol && c <= maxCol) {
44
+ return { index: i, elm: gridElms[i] };
45
+ }
71
46
  }
72
- }
73
- return null;
47
+ return null;
74
48
  };
75
-
76
- //親にイベントを伝播させないラッパー
77
- var StopPropagationWrapper = _ref => {
78
- var {
79
- children
80
- } = _ref;
81
- var handleClick = event => {
82
- // イベントの伝播を阻止
83
- event.stopPropagation();
84
- };
85
- return /*#__PURE__*/React.createElement("div", {
86
- className: "itmar_event_stopper",
87
- onClick: handleClick
88
- }, children);
49
+ const StopPropagationWrapper = ({ children }) => {
50
+ const handleClick = (event) => {
51
+ // イベントの伝播を阻止
52
+ event.stopPropagation();
53
+ };
54
+ return (createElement("div", { className: "itmar_event_stopper", onClick: handleClick }, children));
89
55
  };
90
- var GridControls = _ref2 => {
91
- var {
92
- attributes,
93
- clientId,
94
- onChange: _onChange
95
- } = _ref2;
96
- var {
97
- gridElms,
98
- rowNum,
99
- colNum,
100
- rowGap,
101
- colGap,
102
- rowUnit,
103
- colUnit
104
- } = attributes;
105
-
106
- //コンポーネント内の行列情報
107
- var [rowCount, setRowCount] = useState(rowNum);
108
- var [colCount, setColCount] = useState(colNum);
109
-
110
- //マウント時検出用フラグ
111
- var firstFlgRef = useRef(true);
112
-
113
- //グリッドの配置指定用テーブル要素
114
- var renderRows = () => {
115
- //セルが埋まっているかどうかの判定配列
116
-
117
- var occupied = new Array(rowCount).fill(0).map(() => new Array(colCount).fill(false));
118
- var rows = [];
119
- // 列単位入力行を追加
120
- var headerCells = [/*#__PURE__*/React.createElement("th", {
121
- key: "header-corner"
122
- })]; // 左上の角の空白セル
123
- var _loop = function _loop(c) {
124
- headerCells.push(/*#__PURE__*/React.createElement("th", {
125
- key: "header-".concat(c)
126
- }, /*#__PURE__*/React.createElement(__experimentalInputControl, {
127
- value: colUnit ? colUnit[c] : "",
128
- type: "text",
129
- isPressEnterToChange: true,
130
- onChange: newValue => {
131
- var newArray = [...colUnit.slice(0, c), newValue, ...colUnit.slice(c + 1)];
132
- setUnitColArray(newArray);
56
+ const GridControls = ({ attributes, clientId, onChange, }) => {
57
+ const { gridElms, rowNum, colNum, rowGap, colGap, rowUnit, colUnit } = attributes;
58
+ //コンポーネント内の行列情報
59
+ const [rowCount, setRowCount] = useState(rowNum);
60
+ const [colCount, setColCount] = useState(colNum);
61
+ //マウント時検出用フラグ
62
+ const firstFlgRef = useRef(true);
63
+ //グリッドの配置指定用テーブル要素
64
+ const renderRows = () => {
65
+ //セルが埋まっているかどうかの判定配列
66
+ const occupied = new Array(rowCount)
67
+ .fill(0)
68
+ .map(() => new Array(colCount).fill(false));
69
+ let rows = [];
70
+ // 列単位入力行を追加
71
+ let headerCells = [createElement("th", { key: "header-corner" })]; // 左上の角の空白セル
72
+ for (let c = 0; c < colCount; c++) {
73
+ headerCells.push(createElement("th", { key: `header-${c}` },
74
+ createElement(__experimentalInputControl, { value: colUnit ? colUnit[c] : "", type: "text", isPressEnterToChange: true, onChange: (newValue) => {
75
+ // 2. newValue が undefined の可能性を考慮してガードを入れる
76
+ const safeValue = newValue ?? "";
77
+ const newArray = [
78
+ ...colUnit.slice(0, c),
79
+ safeValue,
80
+ ...colUnit.slice(c + 1),
81
+ ];
82
+ setUnitColArray(newArray);
83
+ } })));
133
84
  }
134
- })));
85
+ rows.push(createElement("tr", { key: "header-row" }, headerCells));
86
+ // 各行とセルの生成
87
+ for (let r = 0; r < rowCount; r++) {
88
+ let cells = [];
89
+ // 行行単位入力を追加
90
+ cells.push(createElement("th", { key: `row-header-${r}` },
91
+ createElement(__experimentalInputControl, { value: rowUnit ? rowUnit[r] : "", type: "text", isPressEnterToChange: true, onChange: (newValue) => {
92
+ // newValue が undefined の可能性を考慮してガードを入れる
93
+ const safeValue = newValue ?? "";
94
+ const newArray = [
95
+ ...rowUnit.slice(0, r),
96
+ safeValue,
97
+ ...rowUnit.slice(r + 1),
98
+ ];
99
+ setUnitRowArray(newArray);
100
+ } })));
101
+ // 各行に対するセルを生成
102
+ for (let c = 0; c < colCount; c++) {
103
+ if (occupied[r][c]) {
104
+ continue; // このセルは既に占められているのでスキップ
105
+ }
106
+ //複数のセルを占める設定があればセルの結合オブジェクトを生成
107
+ const setElm = findElementInGrid(gridElms, r, c);
108
+ const rowSpanValue = setElm
109
+ ? Math.abs(setElm.elm.startCell.rowInx - setElm.elm.endCell.rowInx)
110
+ : 0;
111
+ const colSpanValue = setElm
112
+ ? Math.abs(setElm.elm.startCell.colInx - setElm.elm.endCell.colInx)
113
+ : 0;
114
+ const cellSpan = {
115
+ ...(rowSpanValue !== 0 && { rowspan: rowSpanValue + 1 }),
116
+ ...(colSpanValue !== 0 && { colspan: colSpanValue + 1 }),
117
+ };
118
+ // 占められるセルの位置を記録
119
+ for (let i = 0; i <= rowSpanValue; i++) {
120
+ for (let j = 0; j <= colSpanValue; j++) {
121
+ if (r + i < rowCount && c + j < colCount) {
122
+ occupied[r + i][c + j] = true;
123
+ }
124
+ }
125
+ }
126
+ //セルを生成
127
+ cells.push(createElement("td", { key: `cell-${r}-${c}`, ...cellSpan, className: isCellSelected(r, c) ? "selected" : "", style: setElm
128
+ ? {
129
+ backgroundColor: `var(--wp--custom--color--area-${setElm.index})`,
130
+ }
131
+ : undefined, onClick: () => detectCellPosition(r, c) }, setElm && (createElement(StopPropagationWrapper, null,
132
+ createElement(ToolbarDropdownMenu, { label: __("Lateral Alignment", "block-collections"), icon: setElm.elm.latAlign
133
+ ? alignIconMap[setElm.elm.latAlign]
134
+ : alignIconMap["left"], controls: ["left", "center", "right"].map((align) => ({
135
+ icon: alignIconMap[align],
136
+ title: __(align.charAt(0).toUpperCase() + align.slice(1), "block-collections"),
137
+ isActive: setElm.elm.latAlign === align,
138
+ onClick: () => updateAlignment(setElm.index, align, "latAlign"),
139
+ })) }),
140
+ createElement(ToolbarDropdownMenu, { label: __("Vertical Alignment", "block-collections"), icon: setElm.elm.vertAlign
141
+ ? alignIconMap[setElm.elm.vertAlign]
142
+ : alignIconMap["upper"], controls: ["upper", "middle", "lower"].map((align) => ({
143
+ icon: alignIconMap[align],
144
+ title: __(align.charAt(0).toUpperCase() + align.slice(1), "block-collections"),
145
+ isActive: setElm.elm.vertAlign === align,
146
+ onClick: () => updateAlignment(setElm.index, align, "vertAlign"),
147
+ })) })))));
148
+ }
149
+ // 行の追加
150
+ rows.push(createElement("tr", { key: `row-${r}` }, cells));
151
+ }
152
+ return rows;
135
153
  };
136
- for (var c = 0; c < colCount; c++) {
137
- _loop(c);
138
- }
139
- rows.push(/*#__PURE__*/React.createElement("tr", {
140
- key: "header-row"
141
- }, headerCells));
142
-
143
- // 各行とセルの生成
144
- var _loop2 = function _loop2(r) {
145
- var cells = [];
146
- // 行行単位入力を追加
147
- cells.push(/*#__PURE__*/React.createElement("th", {
148
- key: "row-header-".concat(r)
149
- }, /*#__PURE__*/React.createElement(__experimentalInputControl, {
150
- value: rowUnit ? rowUnit[r] : "",
151
- type: "text",
152
- isPressEnterToChange: true,
153
- onChange: newValue => {
154
- var newArray = [...rowUnit.slice(0, r), newValue, ...rowUnit.slice(r + 1)];
155
- setUnitRowArray(newArray);
154
+ //テーブルの位置選択関数
155
+ const detectCellPosition = (rowIndex, colIndex) => {
156
+ //インナーブロックの選択がなければリターン
157
+ if (!selBlock) {
158
+ dispatch("core/notices").createNotice("error", __("No blocks selected.", "itmar_guest_contact_block"), { type: "snackbar", isDismissible: true });
159
+ return;
156
160
  }
157
- })));
158
-
159
- // 各行に対するセルを生成
160
- var _loop3 = function _loop3(_c) {
161
- if (occupied[r][_c]) {
162
- return 1; // continue
163
- // このセルは既に占められているのでスキップ
161
+ //選択済みのセルが選択されたときはリターン
162
+ if (findElementInGrid(gridElms, rowIndex, colIndex)) {
163
+ dispatch("core/notices").createNotice("error", __("That cell is already selected by another block.", "itmar_guest_contact_block"), { type: "snackbar", isDismissible: true });
164
+ return;
164
165
  }
165
- //複数のセルを占める設定があればセルの結合オブジェクトを生成
166
- var setElm = findElementInGrid(gridElms, r, _c);
167
- var rowSpanValue = setElm ? Math.abs(setElm.elm.startCell.rowInx - setElm.elm.endCell.rowInx) : 0;
168
- var colSpanValue = setElm ? Math.abs(setElm.elm.startCell.colInx - setElm.elm.endCell.colInx) : 0;
169
- var cellSpan = _objectSpread2(_objectSpread2({}, rowSpanValue !== 0 && {
170
- rowspan: rowSpanValue + 1
171
- }), colSpanValue !== 0 && {
172
- colspan: colSpanValue + 1
173
- });
174
- // 占められるセルの位置を記録
175
- for (var i = 0; i <= rowSpanValue; i++) {
176
- for (var j = 0; j <= colSpanValue; j++) {
177
- if (r + i < rowCount && _c + j < colCount) {
178
- occupied[r + i][_c + j] = true;
166
+ //選択されたブロックのポジションを記録
167
+ const newBlock = !selBlock.startCell
168
+ ? {
169
+ ...selBlock,
170
+ startCell: { rowInx: rowIndex, colInx: colIndex },
171
+ endCell: { rowInx: rowIndex, colInx: colIndex },
179
172
  }
180
- }
173
+ : { ...selBlock, endCell: { rowInx: rowIndex, colInx: colIndex } };
174
+ setSelBlock(newBlock);
175
+ //blockNamesの更新
176
+ const index = gridElms?.findIndex((block) => block.value === selBlock.value);
177
+ const setAreaBlock = [
178
+ ...blockNames.slice(0, index),
179
+ newBlock,
180
+ ...blockNames.slice(index + 1),
181
+ ];
182
+ setBlockNames(setAreaBlock);
183
+ };
184
+ // セルが選択されているか判断する関数
185
+ const isCellSelected = (rowIndex, colIndex) => {
186
+ if (selBlock) {
187
+ // 各座標の最小値と最大値を決定
188
+ const minRow = Math.min(selBlock.startCell?.rowInx, selBlock.endCell?.rowInx);
189
+ const maxRow = Math.max(selBlock.startCell?.rowInx, selBlock.endCell?.rowInx);
190
+ const minCol = Math.min(selBlock.startCell?.colInx, selBlock.endCell?.colInx);
191
+ const maxCol = Math.max(selBlock.startCell?.colInx, selBlock.endCell?.colInx);
192
+ // 座標が範囲内にあるかどうかをチェック
193
+ return (rowIndex >= minRow &&
194
+ rowIndex <= maxRow &&
195
+ colIndex >= minCol &&
196
+ colIndex <= maxCol);
197
+ }
198
+ else {
199
+ return false;
181
200
  }
182
- //セルを生成
183
- cells.push(/*#__PURE__*/React.createElement("td", _extends({
184
- key: "cell-".concat(r, "-").concat(_c)
185
- }, cellSpan, {
186
- className: isCellSelected(r, _c) ? "selected" : "",
187
- style: setElm ? {
188
- backgroundColor: "var(--wp--custom--color--area-".concat(setElm.index, ")")
189
- } : undefined,
190
- onClick: () => detectCellPosition(r, _c)
191
- }), setElm && /*#__PURE__*/React.createElement(StopPropagationWrapper, null, /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
192
- label: __("Lateral Alignment", "block-collections"),
193
- icon: setElm.elm.latAlign ? alignIconMap[setElm.elm.latAlign] : alignIconMap["left"],
194
- controls: ["left", "center", "right"].map(align => ({
195
- icon: alignIconMap[align],
196
- isActive: setElm.elm.latAlign === align,
197
- onClick: () => updateAlignment(setElm.index, align, "latAlign")
198
- }))
199
- }), /*#__PURE__*/React.createElement(ToolbarDropdownMenu, {
200
- label: __("Vertical Alignment", "block-collections"),
201
- icon: setElm.elm.vertAlign ? alignIconMap[setElm.elm.vertAlign] : alignIconMap["upper"],
202
- controls: ["upper", "middle", "lower"].map(align => ({
203
- icon: alignIconMap[align],
204
- isActive: setElm.elm.vertAlign === align,
205
- onClick: () => updateAlignment(setElm.index, align, "vertAlign")
206
- }))
207
- }))));
208
- };
209
- for (var _c = 0; _c < colCount; _c++) {
210
- if (_loop3(_c)) continue;
211
- }
212
- // 行の追加
213
- rows.push(/*#__PURE__*/React.createElement("tr", {
214
- key: "row-".concat(r)
215
- }, cells));
216
201
  };
217
- for (var r = 0; r < rowCount; r++) {
218
- _loop2(r);
219
- }
220
- return rows;
221
- };
222
-
223
- //テーブルの位置選択関数
224
- var detectCellPosition = (rowIndex, colIndex) => {
225
- //インナーブロックの選択がなければリターン
226
- if (!selBlock) {
227
- dispatch("core/notices").createNotice("error", __("No blocks selected.", "itmar_guest_contact_block"), {
228
- type: "snackbar",
229
- isDismissible: true
230
- });
231
- return;
232
- }
233
- //選択済みのセルが選択されたときはリターン
234
- if (findElementInGrid(gridElms, rowIndex, colIndex)) {
235
- dispatch("core/notices").createNotice("error", __("That cell is already selected by another block.", "itmar_guest_contact_block"), {
236
- type: "snackbar",
237
- isDismissible: true
238
- });
239
- return;
240
- }
241
-
242
- //選択されたブロックのポジションを記録
243
- var newBlock = !selBlock.startCell ? _objectSpread2(_objectSpread2({}, selBlock), {}, {
244
- startCell: {
245
- rowInx: rowIndex,
246
- colInx: colIndex
247
- },
248
- endCell: {
249
- rowInx: rowIndex,
250
- colInx: colIndex
251
- }
252
- }) : _objectSpread2(_objectSpread2({}, selBlock), {}, {
253
- endCell: {
254
- rowInx: rowIndex,
255
- colInx: colIndex
256
- }
257
- });
258
- setSelBlock(newBlock);
259
-
260
- //blockNamesの更新
261
- var index = gridElms === null || gridElms === void 0 ? void 0 : gridElms.findIndex(block => block.value === selBlock.value);
262
- var setAreaBlock = [...blockNames.slice(0, index), newBlock, ...blockNames.slice(index + 1)];
263
- setBlockNames(setAreaBlock);
264
- };
265
-
266
- // セルが選択されているか判断する関数
267
- var isCellSelected = (rowIndex, colIndex) => {
268
- if (selBlock) {
269
- var _selBlock$startCell, _selBlock$endCell, _selBlock$startCell2, _selBlock$endCell2, _selBlock$startCell3, _selBlock$endCell3, _selBlock$startCell4, _selBlock$endCell4;
270
- // 各座標の最小値と最大値を決定
271
- var minRow = Math.min((_selBlock$startCell = selBlock.startCell) === null || _selBlock$startCell === void 0 ? void 0 : _selBlock$startCell.rowInx, (_selBlock$endCell = selBlock.endCell) === null || _selBlock$endCell === void 0 ? void 0 : _selBlock$endCell.rowInx);
272
- var maxRow = Math.max((_selBlock$startCell2 = selBlock.startCell) === null || _selBlock$startCell2 === void 0 ? void 0 : _selBlock$startCell2.rowInx, (_selBlock$endCell2 = selBlock.endCell) === null || _selBlock$endCell2 === void 0 ? void 0 : _selBlock$endCell2.rowInx);
273
- var minCol = Math.min((_selBlock$startCell3 = selBlock.startCell) === null || _selBlock$startCell3 === void 0 ? void 0 : _selBlock$startCell3.colInx, (_selBlock$endCell3 = selBlock.endCell) === null || _selBlock$endCell3 === void 0 ? void 0 : _selBlock$endCell3.colInx);
274
- var maxCol = Math.max((_selBlock$startCell4 = selBlock.startCell) === null || _selBlock$startCell4 === void 0 ? void 0 : _selBlock$startCell4.colInx, (_selBlock$endCell4 = selBlock.endCell) === null || _selBlock$endCell4 === void 0 ? void 0 : _selBlock$endCell4.colInx);
275
-
276
- // 座標が範囲内にあるかどうかをチェック
277
- return rowIndex >= minRow && rowIndex <= maxRow && colIndex >= minCol && colIndex <= maxCol;
278
- } else {
279
- return false;
280
- }
281
- };
282
-
283
- //コンテンツ位置設定
284
- var updateAlignment = (index, align, derection) => {
285
- var alignBlock = _objectSpread2(_objectSpread2({}, blockNames[index]), {}, {
286
- [derection]: align
287
- });
288
- var setAlignBlock = [...blockNames.slice(0, index), alignBlock, ...blockNames.slice(index + 1)];
289
- setBlockNames(setAlignBlock);
290
- };
291
-
292
- //選択したインナーブロック
293
- var [selBlock, setSelBlock] = useState(null);
294
-
295
- //インナーブロックを取得
296
- var parentBlocks = useSelect(select => {
297
- var innerBlocks = select("core/block-editor").getBlocks(clientId);
298
- //インナーブロック入れ替えの際は既に登録したブロックの位置情報があれば、それを付加する。
299
- var new_block_names = innerBlocks.map((block, index) => gridElms.length > index ? {
300
- value: block.clientId,
301
- label: block.name,
302
- startCell: gridElms[index].startCell,
303
- endCell: gridElms[index].endCell,
304
- latAlign: gridElms[index].latAlign,
305
- vertAlign: gridElms[index].vertAlign
306
- } : {
307
- value: block.clientId,
308
- label: block.name
309
- });
310
- return new_block_names;
311
- }, [clientId]);
312
- var [blockNames, setBlockNames] = useState(parentBlocks);
313
-
314
- //グリッド配置のクリア
315
- var clear_placement = () => {
316
- //ブロックの配置情報削除
317
- var clear_block = blockNames.map(block => ({
318
- value: block.value,
319
- label: block.label
320
- }));
321
- setBlockNames(clear_block);
322
- };
323
-
324
- //単位配列の初期化
325
- var initRowUnitArray = initializeUnitArray(rowUnit, rowCount);
326
- var [unitRowArray, setUnitRowArray] = useState(initRowUnitArray);
327
- var initColUnitArray = initializeUnitArray(colUnit, colCount);
328
- var [unitColArray, setUnitColArray] = useState(initColUnitArray);
329
-
330
- //親ブロックへの書き戻し
331
- useEffect(() => {
332
- var gridStyle = _objectSpread2(_objectSpread2({}, attributes), {}, {
333
- gridElms: blockNames,
334
- rowNum: rowCount,
335
- colNum: colCount,
336
- rowUnit: unitRowArray,
337
- colUnit: unitColArray
338
- });
339
- _onChange(gridStyle);
340
- }, [blockNames, unitRowArray, unitColArray]);
341
-
342
- //行と列の数を変えた場合は位置情報を削除・単位の再編成
343
- useEffect(() => {
344
- if (!firstFlgRef.current) {
345
- //マウント時は実行しない
346
- //ブロックの位置情報クリア
347
- clear_placement();
348
- //単位情報の再編成
349
- var newRowUnitArray = initializeUnitArray(rowUnit, rowCount);
350
- setUnitRowArray(newRowUnitArray);
351
- var newColUnitArray = initializeUnitArray(colUnit, colCount);
352
- setUnitColArray(newColUnitArray);
353
- } else {
354
- firstFlgRef.current = false;
355
- }
356
- }, [rowCount, colCount]);
357
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PanelRow, {
358
- className: "distance_row"
359
- }, /*#__PURE__*/React.createElement(__experimentalNumberControl, {
360
- onChange: newValue => {
361
- var input_val = typeof newValue === "number" ? newValue : Number(newValue);
362
- setRowCount(input_val);
363
- },
364
- label: __("Number of Row ", "block-collections"),
365
- value: rowCount,
366
- min: 2
367
- }), /*#__PURE__*/React.createElement(__experimentalNumberControl, {
368
- onChange: newValue => {
369
- var input_val = typeof newValue === "number" ? newValue : Number(newValue);
370
- setColCount(input_val);
371
- },
372
- label: __("Number of Colum", "block-collections"),
373
- value: colCount
374
- })), /*#__PURE__*/React.createElement(PanelRow, {
375
- className: "distance_row"
376
- }, /*#__PURE__*/React.createElement(__experimentalUnitControl, {
377
- onChange: newValue => {
378
- newValue = newValue != "" ? newValue : "0px";
379
- var newStyle = _objectSpread2(_objectSpread2({}, attributes), {}, {
380
- rowGap: newValue
381
- });
382
- _onChange(newStyle);
383
- },
384
- label: __("Row Gap", "block-collections"),
385
- value: rowGap,
386
- units: units
387
- }), /*#__PURE__*/React.createElement(__experimentalUnitControl, {
388
- onChange: newValue => {
389
- newValue = newValue != "" ? newValue : "0px";
390
- var newStyle = _objectSpread2(_objectSpread2({}, attributes), {}, {
391
- colGap: newValue
392
- });
393
- _onChange(newStyle);
394
- },
395
- label: __("Colum Gap", "block-collections"),
396
- value: colGap,
397
- units: units
398
- })), /*#__PURE__*/React.createElement(PanelRow, {
399
- className: "distance_row"
400
- }, /*#__PURE__*/React.createElement("p", null, __("Element placement", "block-collections")), /*#__PURE__*/React.createElement(Button, {
401
- variant: "secondary",
402
- onClick: clear_placement
403
- }, __("Clear", "block-collections"))), /*#__PURE__*/React.createElement(PanelRow, {
404
- className: "grid_table"
405
- }, /*#__PURE__*/React.createElement("table", null, renderRows())), /*#__PURE__*/React.createElement(ComboboxControl, {
406
- label: __("InnerBlock Name", "block-collections"),
407
- options: blockNames,
408
- value: selBlock ? selBlock.value : null,
409
- onChange: sel_id => {
410
- var matchedBlock = blockNames.find(block => block.value === sel_id);
411
- setSelBlock(matchedBlock);
412
- }
413
- }));
202
+ //コンテンツ位置設定
203
+ const updateAlignment = (index, align, derection) => {
204
+ const alignBlock = { ...blockNames[index], [derection]: align };
205
+ const setAlignBlock = [
206
+ ...blockNames.slice(0, index),
207
+ alignBlock,
208
+ ...blockNames.slice(index + 1),
209
+ ];
210
+ setBlockNames(setAlignBlock);
211
+ };
212
+ const [selBlock, setSelBlock] = useState(null);
213
+ //インナーブロックを取得
214
+ const parentBlocks = useSelect((select) => {
215
+ // 1. select の型を補完(または any で一時回避)
216
+ const editor = select("core/block-editor");
217
+ const innerBlocks = editor.getBlocks(clientId);
218
+ //インナーブロック入れ替えの際は既に登録したブロックの位置情報があれば、それを付加する。
219
+ const new_block_names = innerBlocks.map((block, index) => gridElms.length > index
220
+ ? {
221
+ value: block.clientId,
222
+ label: block.name,
223
+ startCell: gridElms[index].startCell,
224
+ endCell: gridElms[index].endCell,
225
+ latAlign: gridElms[index].latAlign,
226
+ vertAlign: gridElms[index].vertAlign,
227
+ }
228
+ : {
229
+ value: block.clientId,
230
+ label: block.name,
231
+ });
232
+ return new_block_names;
233
+ }, [clientId]);
234
+ const [blockNames, setBlockNames] = useState(parentBlocks);
235
+ //グリッド配置のクリア
236
+ const clear_placement = () => {
237
+ //ブロックの配置情報削除
238
+ const clear_block = blockNames.map((block) => ({
239
+ value: block.value,
240
+ label: block.label,
241
+ }));
242
+ setBlockNames(clear_block);
243
+ };
244
+ //単位配列の初期化
245
+ const initRowUnitArray = initializeUnitArray(rowUnit, rowCount);
246
+ const [unitRowArray, setUnitRowArray] = useState(initRowUnitArray);
247
+ const initColUnitArray = initializeUnitArray(colUnit, colCount);
248
+ const [unitColArray, setUnitColArray] = useState(initColUnitArray);
249
+ //親ブロックへの書き戻し
250
+ useEffect(() => {
251
+ const gridStyle = {
252
+ ...attributes,
253
+ gridElms: blockNames, // BlockNameItem[] を GridElement[] に合わせる
254
+ rowNum: rowCount,
255
+ colNum: colCount,
256
+ rowGap: attributes.rowGap ?? "0px", // 必須プロパティが空の場合のガード
257
+ colGap: attributes.colGap ?? "0px",
258
+ rowUnit: unitRowArray,
259
+ colUnit: unitColArray,
260
+ };
261
+ onChange(gridStyle);
262
+ }, [blockNames, unitRowArray, unitColArray]);
263
+ //行と列の数を変えた場合は位置情報を削除・単位の再編成
264
+ useEffect(() => {
265
+ if (!firstFlgRef.current) {
266
+ //マウント時は実行しない
267
+ //ブロックの位置情報クリア
268
+ clear_placement();
269
+ //単位情報の再編成
270
+ const newRowUnitArray = initializeUnitArray(rowUnit, rowCount);
271
+ setUnitRowArray(newRowUnitArray);
272
+ const newColUnitArray = initializeUnitArray(colUnit, colCount);
273
+ setUnitColArray(newColUnitArray);
274
+ }
275
+ else {
276
+ firstFlgRef.current = false;
277
+ }
278
+ }, [rowCount, colCount]);
279
+ return (createElement(Fragment, null,
280
+ createElement(PanelRow, { className: "distance_row" },
281
+ createElement(__experimentalNumberControl, { onChange: (newValue) => {
282
+ const input_val = typeof newValue === "number" ? newValue : Number(newValue);
283
+ setRowCount(input_val);
284
+ }, label: __("Number of Row ", "block-collections"), value: rowCount, min: 2 }),
285
+ createElement(__experimentalNumberControl, { onChange: (newValue) => {
286
+ const input_val = typeof newValue === "number" ? newValue : Number(newValue);
287
+ setColCount(input_val);
288
+ }, label: __("Number of Colum", "block-collections"), value: colCount })),
289
+ createElement(PanelRow, { className: "distance_row" },
290
+ createElement(__experimentalUnitControl, { onChange: (newValue) => {
291
+ newValue = newValue != "" ? newValue : "0px";
292
+ const newStyle = { ...attributes, rowGap: newValue };
293
+ onChange(newStyle);
294
+ }, label: __("Row Gap", "block-collections"), value: rowGap, units: units }),
295
+ createElement(__experimentalUnitControl, { onChange: (newValue) => {
296
+ newValue = newValue != "" ? newValue : "0px";
297
+ const newStyle = { ...attributes, colGap: newValue };
298
+ onChange(newStyle);
299
+ }, label: __("Colum Gap", "block-collections"), value: colGap, units: units })),
300
+ createElement(PanelRow, { className: "distance_row" },
301
+ createElement("p", null, __("Element placement", "block-collections")),
302
+ createElement(Button, { variant: "secondary", onClick: clear_placement }, __("Clear", "block-collections"))),
303
+ createElement(PanelRow, { className: "grid_table" },
304
+ createElement("table", null, renderRows())),
305
+ createElement(ComboboxControl, { label: __("InnerBlock Name", "block-collections"), options: blockNames, value: selBlock ? selBlock.value : null, onChange: (sel_id) => {
306
+ const matchedBlock = blockNames.find((block) => block.value === sel_id);
307
+ if (matchedBlock) {
308
+ setSelBlock(matchedBlock);
309
+ }
310
+ else {
311
+ setSelBlock(null);
312
+ }
313
+ } })));
414
314
  };
415
315
 
416
316
  export { GridControls as default };