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
@@ -0,0 +1,33 @@
1
+ type CornerDirection = "top_left" | "top_right" | "bottom_left" | "bottom_right" | "right_bottom" | "top";
2
+ interface ShadowState {
3
+ shadowType: "nomal" | "newmor" | "claymor" | "glassmor";
4
+ spread: number;
5
+ lateral: number;
6
+ longitude: number;
7
+ nomalBlur: number;
8
+ shadowColor: string;
9
+ blur: number;
10
+ intensity: number;
11
+ distance: number;
12
+ newDirection: CornerDirection;
13
+ clayDirection: CornerDirection;
14
+ embos: "swell" | "dent";
15
+ opacity: number;
16
+ depth: number;
17
+ bdBlur: number;
18
+ expand: number;
19
+ glassblur: number;
20
+ glassopa: number;
21
+ hasOutline: boolean;
22
+ baseColor: string;
23
+ }
24
+ interface ShadowResult {
25
+ style: React.CSSProperties;
26
+ }
27
+ export declare const ShadowElm: (shadowState: ShadowState) => ShadowResult | null;
28
+ interface ShadowStyleProps {
29
+ shadowStyle: ShadowState;
30
+ onChange: (elm: ShadowResult, state: ShadowState) => void;
31
+ }
32
+ declare const ShadowStyle: ({ shadowStyle, onChange }: ShadowStyleProps) => JSX.Element;
33
+ export default ShadowStyle;
@@ -0,0 +1,12 @@
1
+ import Swiper from "swiper";
2
+ interface SwiperObject {
3
+ swiper_id: string;
4
+ relate_id: string | null;
5
+ is_thumbnail: boolean;
6
+ instance: Swiper;
7
+ }
8
+ /**
9
+ * スライダーブロックの初期化メイン関数
10
+ */
11
+ export declare function slideBlockSwiperInit(swiperElement: HTMLElement | string): SwiperObject | null;
12
+ export {};
@@ -0,0 +1,13 @@
1
+ import React, { ReactNode } from "react";
2
+ interface ToggleElementProps {
3
+ openFlg: boolean;
4
+ onToggle?: (isOpen: boolean) => void;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ children?: ReactNode;
8
+ }
9
+ /**
10
+ * クリックで開閉状態を切り替えるラッパーコンポーネント
11
+ */
12
+ export default function ToggleElement({ openFlg, onToggle, className, style, children, }: ToggleElementProps): JSX.Element;
13
+ export {};
@@ -0,0 +1,17 @@
1
+ interface FontStyle {
2
+ default_fontSize: string;
3
+ mobile_fontSize: string;
4
+ fontSize?: string;
5
+ fontFamily: string;
6
+ fontWeight: string;
7
+ isItalic: boolean;
8
+ }
9
+ interface TypographyControlsProps {
10
+ title: string;
11
+ fontStyle: FontStyle;
12
+ initialOpen?: boolean;
13
+ isMobile: boolean;
14
+ onChange: (newStyle: FontStyle) => void;
15
+ }
16
+ declare const TypographyControls: ({ title, fontStyle, initialOpen, isMobile, onChange, }: TypographyControlsProps) => JSX.Element;
17
+ export default TypographyControls;
@@ -0,0 +1,10 @@
1
+ interface UpdateAllPostsProps {
2
+ postType: string;
3
+ blockName: string;
4
+ newAttributes: Record<string, any>;
5
+ onProcessStart: () => void;
6
+ onProcessEnd: () => void;
7
+ onProcessCancel: () => void;
8
+ }
9
+ export default function UpdateAllPostsBlockAttributes({ postType, blockName, newAttributes, onProcessStart, onProcessEnd, onProcessCancel, }: UpdateAllPostsProps): JSX.Element;
10
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * zipcloud API のレスポンス型定義
3
+ */
4
+ interface ZipCloudResult {
5
+ address1: string;
6
+ address2: string;
7
+ address3: string;
8
+ kana1: string;
9
+ kana2: string;
10
+ kana3: string;
11
+ prefcode: string;
12
+ zipcode: string;
13
+ }
14
+ /**
15
+ * 郵便番号から住所を取得する
16
+ */
17
+ export declare const fetchZipToAddress: (zipNum: string) => Promise<ZipCloudResult | null>;
18
+ export {};
@@ -0,0 +1,15 @@
1
+ import { BlockInstance } from "@wordpress/blocks";
2
+ export declare const useTargetBlocks: (clientId: string, blockName: string, attributeFilter?: null, includeNested?: boolean) => BlockInstance<{
3
+ [k: string]: any;
4
+ }> | BlockInstance<{
5
+ [k: string]: any;
6
+ }>[] | null;
7
+ export declare const flattenBlocks: (blocks: BlockInstance[]) => BlockInstance[];
8
+ interface SerializedBlock {
9
+ blockName: string;
10
+ attributes: Record<string, any>;
11
+ innerBlocks: SerializedBlock[];
12
+ }
13
+ export declare const serializeBlockTree: (block: BlockInstance) => SerializedBlock;
14
+ export declare const createBlockTree: (blockData: SerializedBlock) => BlockInstance;
15
+ export {};
@@ -0,0 +1,53 @@
1
+ import { CSSProperties } from "react";
2
+ interface RadiusObject {
3
+ value?: string;
4
+ topLeft?: string;
5
+ topRight?: string;
6
+ bottomLeft?: string;
7
+ bottomRight?: string;
8
+ }
9
+ export declare const radius_prm: (radius: RadiusObject | undefined) => string;
10
+ interface SpaceObject {
11
+ top?: string | number;
12
+ right?: string | number;
13
+ bottom?: string | number;
14
+ left?: string | number;
15
+ }
16
+ export declare const space_prm: (space: SpaceObject | undefined) => string;
17
+ interface PositionObject {
18
+ vertBase: "top" | "bottom";
19
+ horBase: "left" | "right";
20
+ vertValue: string;
21
+ horValue: string;
22
+ isVertCenter?: boolean;
23
+ isHorCenter?: boolean;
24
+ }
25
+ type PositionType = "absolute" | "fixed" | "sticky" | "relative" | string;
26
+ export declare const position_prm: (pos: PositionObject | any, type: PositionType) => string | null;
27
+ type WidthType = "wideSize" | "contentSize" | "free" | "full" | "fit" | string;
28
+ type HeightType = "fit" | "full" | "free" | string;
29
+ type AlignType = "center" | "right" | "left" | string;
30
+ export declare const max_width_prm: (width: WidthType, free_val?: string) => string;
31
+ export declare const width_prm: (width: WidthType, free_val?: string) => string;
32
+ export declare const height_prm: (height: HeightType, free_val?: string) => string;
33
+ export declare const align_prm: (align: AlignType, camelFLg?: boolean) => string | CSSProperties;
34
+ export declare const convertToScss: (styleObject: Record<string, string | number>) => string;
35
+ /**
36
+ * ボーダー設定オブジェクトをCSSプロパティオブジェクトに変換する
37
+ */
38
+ export declare const borderProperty: (borderObj: any) => Record<string, string> | null;
39
+ interface BoxSpacing {
40
+ top?: string | number;
41
+ right?: string | number;
42
+ bottom?: string | number;
43
+ left?: string | number;
44
+ value?: string | number;
45
+ topLeft?: string | number;
46
+ topRight?: string | number;
47
+ bottomLeft?: string | number;
48
+ bottomRight?: string | number;
49
+ }
50
+ export declare const radiusProperty: (radiusObj: BoxSpacing | undefined) => CSSProperties;
51
+ export declare const marginProperty: (marginObj: BoxSpacing | undefined) => CSSProperties;
52
+ export declare const paddingProperty: (paddingObj: BoxSpacing | undefined) => CSSProperties;
53
+ export {};
@@ -0,0 +1,11 @@
1
+ import { RefObject } from "@wordpress/element";
2
+ import { DependencyList, EffectCallback } from "react";
3
+ export declare function useElementWidth(): (number | import("react").MutableRefObject<null>)[];
4
+ export declare function useIsMobile(): boolean;
5
+ export declare function useIsIframeMobile(): boolean;
6
+ export declare function useElementBackgroundColor(blockRef: RefObject<HTMLElement>, style: React.CSSProperties): string;
7
+ export declare function useElementStyleObject(blockRef: RefObject<HTMLElement>, style: React.CSSProperties): string;
8
+ export declare function useDeepCompareEffect(callback: EffectCallback, dependencies: DependencyList): void;
9
+ export declare function useFontawesomeIframe(): void;
10
+ export declare function useBlockAttributeChanges(clientId: string, blockName: string, className: string, modFlg?: boolean, excludeAttributes?: Record<string, any>): any;
11
+ export declare function useDuplicateBlockRemove(clientId: string, blockNames: string[]): void;
@@ -0,0 +1,18 @@
1
+ interface FormatSettings {
2
+ userFormat: string;
3
+ freeStrFormat: string;
4
+ decimal: number;
5
+ }
6
+ interface FormatSelectControlProps {
7
+ titleType: "plaine" | "date" | "user" | string;
8
+ userFormat: string;
9
+ freeStrFormat: string;
10
+ decimal: number;
11
+ onFormatChange: (settings: FormatSettings) => void;
12
+ }
13
+ export declare const FormatSelectControl: ({ titleType, userFormat, freeStrFormat, decimal, onFormatChange, }: FormatSelectControlProps) => JSX.Element;
14
+ /**
15
+ * 値を指定されたフォーマットで整形して返す
16
+ */
17
+ export declare const displayFormated: (content: any, userFormat: string | undefined, freeStrFormat: string, decimal: number) => string;
18
+ export {};
@@ -0,0 +1,23 @@
1
+ interface HSL {
2
+ hue: number;
3
+ saturation: number;
4
+ lightness: number;
5
+ }
6
+ interface RGB {
7
+ red: number;
8
+ green: number;
9
+ blue: number;
10
+ }
11
+ /**
12
+ * HSLを16進数カラーコード(#RRGGBB)に変換
13
+ */
14
+ export declare function hslToRgb16(hue: number | string, saturation: number | string, lightness: number | string): string | false;
15
+ /**
16
+ * 16進数カラーコードをHSLオブジェクトに変換
17
+ */
18
+ export declare function rgb16ToHsl(strRgb16: string): HSL | false;
19
+ /**
20
+ * 16進数カラーコードをRGBオブジェクトに変換
21
+ */
22
+ export declare function HexToRGB(strRgb16: string): RGB | false;
23
+ export {};
@@ -0,0 +1,31 @@
1
+ export interface BookingActionContextType {
2
+ onCellClick: (tag: string, row: number, col: number) => void;
3
+ }
4
+ export declare const BookingActionContext: import("@types/react").Context<BookingActionContextType | null>;
5
+ export { useIsIframeMobile, useElementBackgroundColor, useElementStyleObject, useElementWidth, useIsMobile, useDeepCompareEffect, useFontawesomeIframe, useBlockAttributeChanges, useDuplicateBlockRemove, } from "./customHooks";
6
+ export { fetchPagesOptions, fetchArchiveOptions, restFetchData, restTaxonomies, restFieldes, termToDispObj, PageSelectControl, ArchiveSelectControl, PostSelectControl, TermChoiceControl, FieldChoiceControl, } from "./wordpressApi";
7
+ export { space_prm, max_width_prm, width_prm, height_prm, align_prm, position_prm, radius_prm, convertToScss, borderProperty, radiusProperty, marginProperty, paddingProperty, } from "./cssPropertes";
8
+ export { default as ShadowStyle, ShadowElm } from "./ShadowStyle";
9
+ export { default as PseudoElm, Arrow } from "./PseudoElm";
10
+ export { SingleImageSelect, MultiImageSelect, getMediaType, getImageAspectRatio, getVideoAspectRatio, } from "./mediaUpload";
11
+ export { default as DraggableBox, useDraggingMove } from "./DraggableBox";
12
+ export { default as AnimationBlock, anime_comp } from "./AnimationBlock";
13
+ export { default as BlockPlace, BlockWidth, BlockHeight } from "./BlockPlace";
14
+ export { default as GridControls } from "./GridControls";
15
+ export { default as ToggleElement } from "./ToggleElement";
16
+ export { default as TypographyControls } from "./TypographyControls";
17
+ export { default as IconSelectControl } from "./IconSelectControl";
18
+ export { default as BlockEditWrapper } from "./BlockEditWrapper";
19
+ export { hslToRgb16, rgb16ToHsl, HexToRGB } from "./hslToRgb";
20
+ export { generateDateArray, generateMonthCalendar, PeriodCtrl, getPeriodQuery, getTodayYearMonth, getTodayYear, getTodayMonth, getMonthRangeYmd, normalizeDateYYYYMMDD, toYmdFromMonthAndDay, generateGridAreas, } from "./DateElm";
21
+ export { JapaneseHolidays } from "./JapaneseHolidays";
22
+ export { flattenBlocks, useTargetBlocks, serializeBlockTree, createBlockTree, } from "./blockStore";
23
+ export { isValidUrlWithUrlApi } from "./validationCheck";
24
+ export { default as UpdateAllPostsBlockAttributes } from "./UpdateAllPostsBlockAttributes";
25
+ export { fetchZipToAddress } from "./ZipAddress";
26
+ export { FormatSelectControl, displayFormated } from "./formatCreate";
27
+ export { checkCustomerLoginState, redirectCustomerAuthorize, sendRegistrationRequest, } from "./shopfiApi";
28
+ export { useRebuildChangeField } from "./BrockInserter";
29
+ export { default as MasonryControl } from "./MasonryControl";
30
+ export { slideBlockSwiperInit } from "./SwiperControl";
31
+ export { ensureCtx, registerPickup, getCtx, subscribe, setState, } from "./pickupStore";
@@ -0,0 +1,29 @@
1
+ interface MediaObject {
2
+ id: number;
3
+ url: string;
4
+ alt?: string;
5
+ caption?: string;
6
+ [key: string]: any;
7
+ }
8
+ interface SingleImageSelectProps {
9
+ attributes: {
10
+ mediaID?: number;
11
+ media?: MediaObject;
12
+ };
13
+ onSelectChange: (media: MediaObject) => void;
14
+ }
15
+ export declare function SingleImageSelect({ attributes, onSelectChange, }: SingleImageSelectProps): JSX.Element;
16
+ interface MultiImageSelectProps {
17
+ attributes: {
18
+ mediaID: number[];
19
+ media: MediaObject[];
20
+ };
21
+ label: string;
22
+ onSelectChange: (media: MediaObject[]) => void;
23
+ onAllDelete: () => void;
24
+ }
25
+ export declare function MultiImageSelect({ attributes, label, onSelectChange, onAllDelete, }: MultiImageSelectProps): JSX.Element;
26
+ export declare function getMediaType(url: string): "image" | "video" | undefined;
27
+ export declare function getImageAspectRatio(url: string): Promise<unknown>;
28
+ export declare function getVideoAspectRatio(url: string): Promise<unknown>;
29
+ export {};
@@ -0,0 +1,39 @@
1
+ declare const GLOBAL_KEY = "__itmar_pickup_store__";
2
+ interface PickupState {
3
+ page: number;
4
+ searchKeyWord: string;
5
+ periodDisp: string;
6
+ periodQueryObj: Record<string, any>;
7
+ termParamObj: Record<string, any> | null;
8
+ termQueryObj: any[];
9
+ posts: any[];
10
+ rawPosts: any[] | null;
11
+ targetIndex: number;
12
+ total: number;
13
+ }
14
+ interface PickupContext {
15
+ id: string;
16
+ pickupEl: HTMLElement | null;
17
+ dataset: Record<string, string | undefined>;
18
+ state: PickupState;
19
+ listeners: Set<(ctx: PickupContext) => void>;
20
+ cache: {
21
+ taxonomies: any | null;
22
+ };
23
+ inflight: {
24
+ abort: AbortController | null;
25
+ };
26
+ }
27
+ declare global {
28
+ interface Window {
29
+ [GLOBAL_KEY]: {
30
+ contexts: Map<string, PickupContext>;
31
+ };
32
+ }
33
+ }
34
+ export declare function ensureCtx(id: string | undefined): PickupContext | null;
35
+ export declare function registerPickup(pickupEl: HTMLElement | null): PickupContext | null;
36
+ export declare function getCtx(id: string): PickupContext | null;
37
+ export declare function subscribe(id: string, fn: (ctx: PickupContext) => void): () => void;
38
+ export declare function setState(id: string, partial: Partial<PickupState>): void;
39
+ export {};
@@ -0,0 +1,18 @@
1
+ export declare function redirectCustomerAuthorize(shopId: string, clientId: string, userMail: string, callbackUri: string, // Shopify側の管理画面で登録したリダイレクト先
2
+ redirectUri: string): Promise<void>;
3
+ /**
4
+ * Shopifyの顧客トークンを検証し、ログイン状態を確認する
5
+ */
6
+ export declare function checkCustomerLoginState(): Promise<boolean | void>;
7
+ /**
8
+ * 通信モードの定義
9
+ * auto: URLから自動判別
10
+ * rest: WP REST API形式 (application/json)
11
+ * admin: admin-ajax.php形式 (x-www-form-urlencoded)
12
+ */
13
+ type ApiMode = "auto" | "rest" | "admin";
14
+ /**
15
+ * 統合された WordPress 通信関数
16
+ */
17
+ export declare function sendRegistrationRequest<T = any>(urlOrPath: string, data?: Record<string, any>, mode?: ApiMode): Promise<T>;
18
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 文字列が有効な絶対URL形式(http/https等)であるか検証する
3
+ * @param urlString 検証対象の文字列
4
+ */
5
+ export declare const isValidUrlWithUrlApi: (urlString: string | null | undefined) => boolean;
@@ -0,0 +1,99 @@
1
+ export declare const restFetchData: <T = any>(path: string) => Promise<T | undefined>;
2
+ interface SelectOption {
3
+ label: string;
4
+ value: string;
5
+ slug: string;
6
+ [key: string]: any;
7
+ }
8
+ interface SelectControlProps {
9
+ selectedSlug: string | undefined;
10
+ label: string;
11
+ homeUrl: string;
12
+ fetchOptions: (homeUrl: string, props: any) => Promise<SelectOption[]>;
13
+ onChange: (newInfo: SelectOption | undefined) => void;
14
+ restBase?: string;
15
+ status?: string;
16
+ perPage?: number;
17
+ orderby?: string;
18
+ order?: string;
19
+ search?: string;
20
+ }
21
+ interface ChoiceControlProps {
22
+ selectedSlug: string | undefined;
23
+ choiceItems: any[];
24
+ dispTaxonomies: string[];
25
+ type: "taxonomy" | "field" | "imgField";
26
+ blockMap: Record<string, string>;
27
+ textDomain?: string;
28
+ fetchFunction: (slug: string) => Promise<any[] | undefined>;
29
+ onChange: (items: any[]) => void;
30
+ onBlockMapChange: (map: Record<string, string>) => void;
31
+ onSetDispTax: (taxonomies: string[]) => void;
32
+ }
33
+ interface PageOption {
34
+ value: string;
35
+ slug: string;
36
+ label: string;
37
+ link: string;
38
+ }
39
+ export declare const fetchPagesOptions: (home_url: string) => Promise<PageOption[]>;
40
+ interface ArchiveOption {
41
+ value: string;
42
+ slug: string;
43
+ rest_base: string;
44
+ link: string;
45
+ label: string;
46
+ }
47
+ export declare const fetchArchiveOptions: (home_url: string) => Promise<ArchiveOption[]>;
48
+ interface PostOption {
49
+ value: string;
50
+ label: string;
51
+ slug: string;
52
+ link: string;
53
+ rest_base: string;
54
+ post_id: number;
55
+ }
56
+ interface TaxonomyObject {
57
+ slug: string;
58
+ name: string;
59
+ rest_base: string;
60
+ terms: any[];
61
+ }
62
+ /**
63
+ * 1. 投稿データ取得RestAPI関数
64
+ */
65
+ export declare const fetchPostOptions: (home_url: string, props?: any) => Promise<PostOption[]>;
66
+ /**
67
+ * 2. タクソノミー取得RestAPI関数
68
+ */
69
+ export declare const restTaxonomies: (post_type: string) => Promise<TaxonomyObject[] | undefined>;
70
+ export declare const termToDispObj: (terms: any[], connectString: string) => Record<string, string>;
71
+ /**
72
+ * 4. フィールド情報取得RestAPI関数
73
+ */
74
+ export declare const restFieldes: (rest_base: string) => Promise<any[]>;
75
+ /**
76
+ * 固定ページ選択用
77
+ */
78
+ export declare const PageSelectControl: (props: Omit<SelectControlProps, "fetchOptions">) => JSX.Element;
79
+ /**
80
+ * アーカイブ(投稿タイプ)選択用
81
+ */
82
+ export declare const ArchiveSelectControl: (props: Omit<SelectControlProps, "fetchOptions">) => JSX.Element;
83
+ /**
84
+ * 投稿(各投稿タイプの中身)選択用
85
+ */
86
+ export declare const PostSelectControl: (props: Omit<SelectControlProps, "fetchOptions">) => JSX.Element;
87
+ /**
88
+ * タクソノミー・ターム選択用
89
+ */
90
+ export declare const TermChoiceControl: (props: Omit<ChoiceControlProps, "fetchFunction">) => JSX.Element;
91
+ /**
92
+ * カスタムフィールド(ACF/Meta)選択用
93
+ */
94
+ export declare const FieldChoiceControl: (props: Omit<ChoiceControlProps, "fetchFunction" | "type">) => JSX.Element;
95
+ /**
96
+ * 画像系カスタムフィールド選択用
97
+ */
98
+ export declare const ImageFieldChoiceControl: (props: Omit<ChoiceControlProps, "fetchFunction" | "type">) => JSX.Element;
99
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 文字列が有効な絶対URL形式(http/https等)であるか検証する
3
+ * @param urlString 検証対象の文字列
4
+ */
5
+ export declare const isValidUrlWithUrlApi: (urlString: string | null | undefined) => boolean;
@@ -1,12 +1,18 @@
1
- //URLのバリデーションチェック
2
- var isValidUrlWithUrlApi = string => {
3
- try {
4
- var cleanString = string.replace(/<[^>]+>/g, "");
5
- new URL(cleanString);
6
- return true;
7
- } catch (err) {
8
- return false;
9
- }
1
+ /**
2
+ * 文字列が有効な絶対URL形式(http/https等)であるか検証する
3
+ * @param urlString 検証対象の文字列
4
+ */
5
+ const isValidUrlWithUrlApi = (urlString) => {
6
+ if (!urlString)
7
+ return false;
8
+ try {
9
+ const cleanString = urlString.replace(/<[^>]+>/g, "");
10
+ new URL(cleanString);
11
+ return true;
12
+ }
13
+ catch (err) {
14
+ return false;
15
+ }
10
16
  };
11
17
 
12
18
  export { isValidUrlWithUrlApi };
@@ -1 +1 @@
1
- {"version":3,"file":"validationCheck.js","sources":["../../src/validationCheck.js"],"sourcesContent":["//URLのバリデーションチェック\nexport const isValidUrlWithUrlApi = (string) => {\n try {\n const cleanString = string.replace(/<[^>]+>/g, \"\");\n new URL(cleanString);\n return true;\n } catch (err) {\n return false;\n }\n};\n"],"names":["isValidUrlWithUrlApi","string","cleanString","replace","URL","err"],"mappings":"AAAA;AACO,IAAMA,oBAAoB,GAAIC,MAAM,IAAK;EAC9C,IAAI;IACF,IAAMC,WAAW,GAAGD,MAAM,CAACE,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;IAClD,IAAIC,GAAG,CAACF,WAAW,CAAC;AACpB,IAAA,OAAO,IAAI;EACb,CAAC,CAAC,OAAOG,GAAG,EAAE;AACZ,IAAA,OAAO,KAAK;AACd,EAAA;AACF;;;;"}
1
+ {"version":3,"file":"validationCheck.js","sources":["../../src/validationCheck.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;AAGG;AACI,MAAM,oBAAoB,GAAG,CAClC,SAAoC,KACzB;AACX,IAAA,IAAI,CAAC,SAAS;AAAE,QAAA,OAAO,KAAK;AAE5B,IAAA,IAAI;QACF,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;AACrD,QAAA,IAAI,GAAG,CAAC,WAAW,CAAC;AACpB,QAAA,OAAO,IAAI;IACb;IAAE,OAAO,GAAG,EAAE;AACZ,QAAA,OAAO,KAAK;IACd;AACF;;;;"}
@@ -0,0 +1,99 @@
1
+ export declare const restFetchData: <T = any>(path: string) => Promise<T | undefined>;
2
+ interface SelectOption {
3
+ label: string;
4
+ value: string;
5
+ slug: string;
6
+ [key: string]: any;
7
+ }
8
+ interface SelectControlProps {
9
+ selectedSlug: string | undefined;
10
+ label: string;
11
+ homeUrl: string;
12
+ fetchOptions: (homeUrl: string, props: any) => Promise<SelectOption[]>;
13
+ onChange: (newInfo: SelectOption | undefined) => void;
14
+ restBase?: string;
15
+ status?: string;
16
+ perPage?: number;
17
+ orderby?: string;
18
+ order?: string;
19
+ search?: string;
20
+ }
21
+ interface ChoiceControlProps {
22
+ selectedSlug: string | undefined;
23
+ choiceItems: any[];
24
+ dispTaxonomies: string[];
25
+ type: "taxonomy" | "field" | "imgField";
26
+ blockMap: Record<string, string>;
27
+ textDomain?: string;
28
+ fetchFunction: (slug: string) => Promise<any[] | undefined>;
29
+ onChange: (items: any[]) => void;
30
+ onBlockMapChange: (map: Record<string, string>) => void;
31
+ onSetDispTax: (taxonomies: string[]) => void;
32
+ }
33
+ interface PageOption {
34
+ value: string;
35
+ slug: string;
36
+ label: string;
37
+ link: string;
38
+ }
39
+ export declare const fetchPagesOptions: (home_url: string) => Promise<PageOption[]>;
40
+ interface ArchiveOption {
41
+ value: string;
42
+ slug: string;
43
+ rest_base: string;
44
+ link: string;
45
+ label: string;
46
+ }
47
+ export declare const fetchArchiveOptions: (home_url: string) => Promise<ArchiveOption[]>;
48
+ interface PostOption {
49
+ value: string;
50
+ label: string;
51
+ slug: string;
52
+ link: string;
53
+ rest_base: string;
54
+ post_id: number;
55
+ }
56
+ interface TaxonomyObject {
57
+ slug: string;
58
+ name: string;
59
+ rest_base: string;
60
+ terms: any[];
61
+ }
62
+ /**
63
+ * 1. 投稿データ取得RestAPI関数
64
+ */
65
+ export declare const fetchPostOptions: (home_url: string, props?: any) => Promise<PostOption[]>;
66
+ /**
67
+ * 2. タクソノミー取得RestAPI関数
68
+ */
69
+ export declare const restTaxonomies: (post_type: string) => Promise<TaxonomyObject[] | undefined>;
70
+ export declare const termToDispObj: (terms: any[], connectString: string) => Record<string, string>;
71
+ /**
72
+ * 4. フィールド情報取得RestAPI関数
73
+ */
74
+ export declare const restFieldes: (rest_base: string) => Promise<any[]>;
75
+ /**
76
+ * 固定ページ選択用
77
+ */
78
+ export declare const PageSelectControl: (props: Omit<SelectControlProps, "fetchOptions">) => JSX.Element;
79
+ /**
80
+ * アーカイブ(投稿タイプ)選択用
81
+ */
82
+ export declare const ArchiveSelectControl: (props: Omit<SelectControlProps, "fetchOptions">) => JSX.Element;
83
+ /**
84
+ * 投稿(各投稿タイプの中身)選択用
85
+ */
86
+ export declare const PostSelectControl: (props: Omit<SelectControlProps, "fetchOptions">) => JSX.Element;
87
+ /**
88
+ * タクソノミー・ターム選択用
89
+ */
90
+ export declare const TermChoiceControl: (props: Omit<ChoiceControlProps, "fetchFunction">) => JSX.Element;
91
+ /**
92
+ * カスタムフィールド(ACF/Meta)選択用
93
+ */
94
+ export declare const FieldChoiceControl: (props: Omit<ChoiceControlProps, "fetchFunction" | "type">) => JSX.Element;
95
+ /**
96
+ * 画像系カスタムフィールド選択用
97
+ */
98
+ export declare const ImageFieldChoiceControl: (props: Omit<ChoiceControlProps, "fetchFunction" | "type">) => JSX.Element;
99
+ export {};