pds-dev-kit-web-test 0.3.59 → 0.3.61

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 (23) hide show
  1. package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +282 -0
  2. package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +166 -120
  3. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +2 -2
  4. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/{Iframe/Iframe.d.ts → Embed/Embed.d.ts} +2 -2
  5. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/{Iframe/Iframe.js → Embed/Embed.js} +4 -33
  6. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/EmbedCore.d.ts +8 -0
  7. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/EmbedCore.js +75 -0
  8. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/EmbedIframe.d.ts +10 -0
  9. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/EmbedIframe.js +34 -0
  10. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/constant.d.ts +4 -0
  11. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/constant.js +99 -0
  12. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/sanitizeEmbedCode.d.ts +9 -0
  13. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/{Iframe → Embed}/sanitizeEmbedCode.js +13 -2
  14. package/package.json +3 -1
  15. package/release-note.md +7 -7
  16. package/webhook/node_modules/esrecurse/.babelrc +3 -0
  17. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Iframe/EmbedCore.d.ts +0 -6
  18. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Iframe/EmbedCore.js +0 -24
  19. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Iframe/constant.d.ts +0 -2
  20. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Iframe/constant.js +0 -26
  21. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Iframe/sanitizeEmbedCode.d.ts +0 -1
  22. /package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/{Iframe → Embed}/types.d.ts +0 -0
  23. /package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/{Iframe → Embed}/types.js +0 -0
@@ -3,6 +3,11 @@ export declare const EMBEDED_SAMPLES: {
3
3
  GOOGLE_FORMS: string;
4
4
  SCRIPT: string;
5
5
  DIV: string;
6
+ DIRTY: string;
7
+ CLEAN: string;
8
+ SCRIPT2: string;
9
+ FACEBOOK: string;
10
+ ALERT: string;
6
11
  };
7
12
  export declare const sampleCustomsection1: {
8
13
  administrativeTitle: string;
@@ -2112,6 +2117,7 @@ export declare const sampleCustomsection5: {
2112
2117
  };
2113
2118
  CB_CONTENT_PROP_CODEBLOCK: {
2114
2119
  CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: string;
2120
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_LANG?: undefined;
2115
2121
  };
2116
2122
  CB_CONTENT_PROP_VISIBILITY: {
2117
2123
  CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: boolean;
@@ -2197,6 +2203,278 @@ export declare const sampleCustomsection5: {
2197
2203
  'CB_STYLE_PROP_TWITTER_SPEC_THEME:MOBILE': null;
2198
2204
  };
2199
2205
  CB_EFFECT_PROP_HOVERANIM?: undefined;
2206
+ CB_STYLE_PROP_BGCOLOR?: undefined;
2207
+ CB_STYLE_PROP_DIVIDER?: undefined;
2208
+ CB_CONTENT_PROP_CLINK?: undefined;
2209
+ CB_CONTENT_PROP_TEXT?: undefined;
2210
+ CB_STYLE_PROP_BORDER?: undefined;
2211
+ CB_STYLE_PROP_BTNCOLOR?: undefined;
2212
+ CB_STYLE_PROP_BTNTEXT?: undefined;
2213
+ CB_STYLE_PROP_TEXT?: undefined;
2214
+ };
2215
+ minVersion: string;
2216
+ version: string;
2217
+ };
2218
+ queryableDefinitionPreset: string;
2219
+ queryableTapSrc: string;
2220
+ updatedAt: string;
2221
+ } | {
2222
+ availablePlugins: never[];
2223
+ componentBlockCode: string;
2224
+ componentBlockType: string;
2225
+ dynamicLayoutSectionId: number;
2226
+ id: number;
2227
+ insertedAt: string;
2228
+ jsonProperties: {
2229
+ currentVersion: string;
2230
+ data: {
2231
+ CB_CONTENT_PROP_CODEBLOCK: {
2232
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: string;
2233
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_LANG: string;
2234
+ };
2235
+ CB_CONTENT_PROP_HOVER: {
2236
+ CB_CONTENT_PROP_HOVER_SPEC_MUSE: boolean;
2237
+ };
2238
+ CB_CONTENT_PROP_VISIBILITY: {
2239
+ CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: boolean;
2240
+ CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB: boolean;
2241
+ };
2242
+ CB_EFFECT_PROP_ENTANIM: {
2243
+ CB_EFFECT_PROP_ENTANIM_SPEC_DURATION: number;
2244
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_DURATION:MOBILE': null;
2245
+ CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT: number;
2246
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT:MOBILE': null;
2247
+ CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC: string;
2248
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC:MOBILE': null;
2249
+ CB_EFFECT_PROP_ENTANIM_SPEC_TYPE: string;
2250
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE': null;
2251
+ };
2252
+ CB_EFFECT_PROP_HOVERANIM: {
2253
+ CB_EFFECT_PROP_HOVERANIM_SPEC_DURATION: number;
2254
+ 'CB_EFFECT_PROP_HOVERANIM_SPEC_DURATION:MOBILE': null;
2255
+ CB_EFFECT_PROP_HOVERANIM_SPEC_REPEAT: number;
2256
+ 'CB_EFFECT_PROP_HOVERANIM_SPEC_REPEAT:MOBILE': null;
2257
+ CB_EFFECT_PROP_HOVERANIM_SPEC_TFUNC: string;
2258
+ 'CB_EFFECT_PROP_HOVERANIM_SPEC_TFUNC:MOBILE': null;
2259
+ CB_EFFECT_PROP_HOVERANIM_SPEC_TYPE: string;
2260
+ 'CB_EFFECT_PROP_HOVERANIM_SPEC_TYPE:MOBILE': null;
2261
+ };
2262
+ CB_LAYOUT_PROP_ARRANGE: {
2263
+ CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL: string;
2264
+ 'CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL:MOBILE': null;
2265
+ CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL: string;
2266
+ 'CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL:MOBILE': null;
2267
+ };
2268
+ CB_LAYOUT_PROP_PADDING: {
2269
+ CB_LAYOUT_PROP_PADDING_SPEC_FIX: boolean;
2270
+ 'CB_LAYOUT_PROP_PADDING_SPEC_FIX:MOBILE': null;
2271
+ CB_LAYOUT_PROP_PADDING_SPEC_PADDING: {
2272
+ bottom: number;
2273
+ left: number;
2274
+ right: number;
2275
+ top: number;
2276
+ };
2277
+ 'CB_LAYOUT_PROP_PADDING_SPEC_PADDING:MOBILE': null;
2278
+ };
2279
+ CB_PLACEMENT_PROP_PLACEMENT: {
2280
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS: number;
2281
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': number;
2282
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: number;
2283
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE': number;
2284
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: number;
2285
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE': number;
2286
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY: number;
2287
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE': number;
2288
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX: number;
2289
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE': number;
2290
+ };
2291
+ CB_STYLE_PROP_BGCOLOR: {
2292
+ CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE: number;
2293
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:HOVER': null;
2294
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:MOBILE': null;
2295
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:MOBILE:HOVER': null;
2296
+ CB_STYLE_PROP_BGCOLOR_SPEC_COLOR: string;
2297
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:HOVER': null;
2298
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:MOBILE': null;
2299
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:MOBILE:HOVER': null;
2300
+ CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR: string;
2301
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:HOVER': null;
2302
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:MOBILE': null;
2303
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:MOBILE:HOVER': null;
2304
+ CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC: number;
2305
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:HOVER': null;
2306
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:MOBILE': null;
2307
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:MOBILE:HOVER': null;
2308
+ CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT: string;
2309
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:HOVER': null;
2310
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:MOBILE': null;
2311
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:MOBILE:HOVER': null;
2312
+ CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR: string;
2313
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:HOVER': null;
2314
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:MOBILE': null;
2315
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:MOBILE:HOVER': null;
2316
+ CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC: number;
2317
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:HOVER': null;
2318
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:MOBILE': null;
2319
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:MOBILE:HOVER': null;
2320
+ CB_STYLE_PROP_BGCOLOR_SPEC_TYPE: string;
2321
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:HOVER': null;
2322
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:MOBILE': null;
2323
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:MOBILE:HOVER': null;
2324
+ };
2325
+ CB_STYLE_PROP_OPACITY: {
2326
+ CB_STYLE_PROP_OPACITY_SPEC_OPACITY: number;
2327
+ 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:HOVER': null;
2328
+ 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:MOBILE': null;
2329
+ 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:MOBILE:HOVER': null;
2330
+ };
2331
+ CB_STYLE_PROP_SHADOW: {
2332
+ CB_STYLE_PROP_SHADOW_SPEC_BLUR: number;
2333
+ 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:HOVER': null;
2334
+ 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:MOBILE': null;
2335
+ 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:MOBILE:HOVER': null;
2336
+ CB_STYLE_PROP_SHADOW_SPEC_COLOR: string;
2337
+ 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:HOVER': null;
2338
+ 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:MOBILE': null;
2339
+ 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:MOBILE:HOVER': null;
2340
+ CB_STYLE_PROP_SHADOW_SPEC_OPACITY: number;
2341
+ 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:HOVER': null;
2342
+ 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE': null;
2343
+ 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE:HOVER': null;
2344
+ CB_STYLE_PROP_SHADOW_SPEC_SPREAD: number;
2345
+ 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:HOVER': null;
2346
+ 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:MOBILE': null;
2347
+ 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:MOBILE:HOVER': null;
2348
+ CB_STYLE_PROP_SHADOW_SPEC_TYPE: string;
2349
+ 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:HOVER': null;
2350
+ 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:MOBILE': null;
2351
+ 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:MOBILE:HOVER': null;
2352
+ CB_STYLE_PROP_SHADOW_SPEC_X: number;
2353
+ 'CB_STYLE_PROP_SHADOW_SPEC_X:HOVER': null;
2354
+ 'CB_STYLE_PROP_SHADOW_SPEC_X:MOBILE': null;
2355
+ 'CB_STYLE_PROP_SHADOW_SPEC_X:MOBILE:HOVER': null;
2356
+ CB_STYLE_PROP_SHADOW_SPEC_Y: number;
2357
+ 'CB_STYLE_PROP_SHADOW_SPEC_Y:HOVER': null;
2358
+ 'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE': null;
2359
+ 'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE:HOVER': null;
2360
+ };
2361
+ CB_STYLE_PROP_TWITTER?: undefined;
2362
+ CB_STYLE_PROP_DIVIDER?: undefined;
2363
+ CB_CONTENT_PROP_CLINK?: undefined;
2364
+ CB_CONTENT_PROP_TEXT?: undefined;
2365
+ CB_STYLE_PROP_BORDER?: undefined;
2366
+ CB_STYLE_PROP_BTNCOLOR?: undefined;
2367
+ CB_STYLE_PROP_BTNTEXT?: undefined;
2368
+ CB_STYLE_PROP_TEXT?: undefined;
2369
+ };
2370
+ minVersion: string;
2371
+ version: string;
2372
+ };
2373
+ queryableDefinitionPreset: string;
2374
+ queryableTapSrc: string;
2375
+ updatedAt: string;
2376
+ } | {
2377
+ availablePlugins: never[];
2378
+ componentBlockCode: string;
2379
+ componentBlockType: string;
2380
+ dynamicLayoutSectionId: number;
2381
+ id: number;
2382
+ insertedAt: string;
2383
+ jsonProperties: {
2384
+ currentVersion: string;
2385
+ data: {
2386
+ CB_CONTENT_PROP_HOVER: {
2387
+ CB_CONTENT_PROP_HOVER_SPEC_MUSE: boolean;
2388
+ };
2389
+ CB_CONTENT_PROP_CODEBLOCK: {
2390
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: string;
2391
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_LANG?: undefined;
2392
+ };
2393
+ CB_CONTENT_PROP_VISIBILITY: {
2394
+ CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: boolean;
2395
+ CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB: boolean;
2396
+ };
2397
+ CB_EFFECT_PROP_ENTANIM: {
2398
+ CB_EFFECT_PROP_ENTANIM_SPEC_TYPE: string;
2399
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE': string;
2400
+ CB_EFFECT_PROP_ENTANIM_SPEC_DURATION: number;
2401
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_DURATION:MOBILE': null;
2402
+ CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT: number;
2403
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT:MOBILE': null;
2404
+ CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC: string;
2405
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC:MOBILE': null;
2406
+ };
2407
+ CB_LAYOUT_PROP_ARRANGE: {
2408
+ CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL: string;
2409
+ 'CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL:MOBILE': string;
2410
+ CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL: string;
2411
+ 'CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL:MOBILE': null;
2412
+ };
2413
+ CB_LAYOUT_PROP_PADDING: {
2414
+ CB_LAYOUT_PROP_PADDING_SPEC_FIX: boolean;
2415
+ 'CB_LAYOUT_PROP_PADDING_SPEC_FIX:MOBILE': null;
2416
+ CB_LAYOUT_PROP_PADDING_SPEC_PADDING: {
2417
+ bottom: number;
2418
+ left: number;
2419
+ right: number;
2420
+ top: number;
2421
+ };
2422
+ 'CB_LAYOUT_PROP_PADDING_SPEC_PADDING:MOBILE': null;
2423
+ };
2424
+ CB_PLACEMENT_PROP_PLACEMENT: {
2425
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS: number;
2426
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': number;
2427
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: number;
2428
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE': number;
2429
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: number;
2430
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE': number;
2431
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY: number;
2432
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE': number;
2433
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX: number;
2434
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE': number;
2435
+ };
2436
+ CB_STYLE_PROP_OPACITY: {
2437
+ CB_STYLE_PROP_OPACITY_SPEC_OPACITY: number;
2438
+ 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:HOVER': number;
2439
+ 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:MOBILE': null;
2440
+ 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:MOBILE:HOVER': null;
2441
+ };
2442
+ CB_STYLE_PROP_SHADOW: {
2443
+ CB_STYLE_PROP_SHADOW_SPEC_BLUR: number;
2444
+ 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:HOVER': number;
2445
+ 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:MOBILE': null;
2446
+ 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:MOBILE:HOVER': null;
2447
+ CB_STYLE_PROP_SHADOW_SPEC_COLOR: string;
2448
+ 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:HOVER': string;
2449
+ 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:MOBILE': null;
2450
+ 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:MOBILE:HOVER': null;
2451
+ CB_STYLE_PROP_SHADOW_SPEC_OPACITY: number;
2452
+ 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:HOVER': number;
2453
+ 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE': null;
2454
+ 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE:HOVER': null;
2455
+ CB_STYLE_PROP_SHADOW_SPEC_SPREAD: number;
2456
+ 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:HOVER': number;
2457
+ 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:MOBILE': null;
2458
+ 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:MOBILE:HOVER': null;
2459
+ CB_STYLE_PROP_SHADOW_SPEC_TYPE: string;
2460
+ 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:HOVER': string;
2461
+ 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:MOBILE': null;
2462
+ 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:MOBILE:HOVER': null;
2463
+ CB_STYLE_PROP_SHADOW_SPEC_X: number;
2464
+ 'CB_STYLE_PROP_SHADOW_SPEC_X:HOVER': number;
2465
+ 'CB_STYLE_PROP_SHADOW_SPEC_X:MOBILE': null;
2466
+ 'CB_STYLE_PROP_SHADOW_SPEC_X:MOBILE:HOVER': null;
2467
+ CB_STYLE_PROP_SHADOW_SPEC_Y: number;
2468
+ 'CB_STYLE_PROP_SHADOW_SPEC_Y:HOVER': number;
2469
+ 'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE': null;
2470
+ 'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE:HOVER': null;
2471
+ };
2472
+ CB_STYLE_PROP_TWITTER: {
2473
+ CB_STYLE_PROP_TWITTER_SPEC_THEME: string;
2474
+ 'CB_STYLE_PROP_TWITTER_SPEC_THEME:MOBILE': null;
2475
+ };
2476
+ CB_EFFECT_PROP_HOVERANIM?: undefined;
2477
+ CB_STYLE_PROP_BGCOLOR?: undefined;
2200
2478
  CB_STYLE_PROP_DIVIDER?: undefined;
2201
2479
  CB_CONTENT_PROP_CLINK?: undefined;
2202
2480
  CB_CONTENT_PROP_TEXT?: undefined;
@@ -2295,6 +2573,7 @@ export declare const sampleCustomsection5: {
2295
2573
  CB_STYLE_PROP_OPACITY?: undefined;
2296
2574
  CB_STYLE_PROP_SHADOW?: undefined;
2297
2575
  CB_STYLE_PROP_TWITTER?: undefined;
2576
+ CB_STYLE_PROP_BGCOLOR?: undefined;
2298
2577
  CB_CONTENT_PROP_CLINK?: undefined;
2299
2578
  CB_CONTENT_PROP_TEXT?: undefined;
2300
2579
  CB_STYLE_PROP_BORDER?: undefined;
@@ -2511,6 +2790,7 @@ export declare const sampleCustomsection5: {
2511
2790
  CB_CONTENT_PROP_CODEBLOCK?: undefined;
2512
2791
  CB_LAYOUT_PROP_ARRANGE?: undefined;
2513
2792
  CB_STYLE_PROP_TWITTER?: undefined;
2793
+ CB_STYLE_PROP_BGCOLOR?: undefined;
2514
2794
  CB_STYLE_PROP_DIVIDER?: undefined;
2515
2795
  CB_STYLE_PROP_TEXT?: undefined;
2516
2796
  };
@@ -2633,6 +2913,7 @@ export declare const sampleCustomsection5: {
2633
2913
  CB_LAYOUT_PROP_ARRANGE?: undefined;
2634
2914
  CB_STYLE_PROP_SHADOW?: undefined;
2635
2915
  CB_STYLE_PROP_TWITTER?: undefined;
2916
+ CB_STYLE_PROP_BGCOLOR?: undefined;
2636
2917
  CB_STYLE_PROP_DIVIDER?: undefined;
2637
2918
  CB_STYLE_PROP_BORDER?: undefined;
2638
2919
  CB_STYLE_PROP_BTNCOLOR?: undefined;
@@ -2757,6 +3038,7 @@ export declare const sampleCustomsection5: {
2757
3038
  CB_LAYOUT_PROP_ARRANGE?: undefined;
2758
3039
  CB_STYLE_PROP_SHADOW?: undefined;
2759
3040
  CB_STYLE_PROP_TWITTER?: undefined;
3041
+ CB_STYLE_PROP_BGCOLOR?: undefined;
2760
3042
  CB_STYLE_PROP_DIVIDER?: undefined;
2761
3043
  CB_STYLE_PROP_BORDER?: undefined;
2762
3044
  CB_STYLE_PROP_BTNCOLOR?: undefined;
@@ -5,7 +5,12 @@ exports.EMBEDED_SAMPLES = {
5
5
  GOOGLE_MAPS: '<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d508.40856699559515!2d127.04604546611074!3d37.5412884534309!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x357ca484b232aab9%3A0x3016af9babd6093e!2z7ISc7Jq47Yq567OE7IucIOyEseuPmeq1rCDrmp3shKzroZwgMzE3!5e0!3m2!1sko!2skr!4v1690098445797!5m2!1sko!2skr" width="100%" height="100%" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>',
6
6
  GOOGLE_FORMS: '<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSeXlFI2qpbGOGQ5Zvk3JkkJXo0qsznrpjjIutpk9nGfpPFCIA/viewform?embedded=true" width="100%" height="100%" frameborder="0" marginheight="0" marginwidth="0">로드 중…</iframe>',
7
7
  SCRIPT: '<div class="whattime-inline-widget" data-code="9WVUWfsUhi" style="min-width: 320px; height: 690px;"></div><link href="https://whattime.co.kr/widget/widget.css" rel="stylesheet"><script src="https://whattime.co.kr/widget/widget.js" type="text/javascript" async></script>',
8
- DIV: '<div style="background-color: black"><button>sample-button</button></div>'
8
+ DIV: '<div style="background-color: black"><button>sample-button</button></div>',
9
+ DIRTY: '<img src=x onerror=alert(1)//>',
10
+ CLEAN: '<div>CLEAN</div>',
11
+ SCRIPT2: '<script src="https:/hello.js" type="text/javascript" async></script>',
12
+ FACEBOOK: '<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fsminglive%2Fposts%2Fpfbid023o4i8jNwoh9B3bdQSXKcsKZiaU7rK8FuLtgGdt2crQugFWHA7aiPJZWxPpZMqTh3l&show_text=true&width=500" width="500"height="437"style="border:none;overflow:hidden"scrolling="no"frameborder="0"allowfullscreen="true"allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>',
13
+ ALERT: '<script>alert("this-is-no"); console.log("hi"); </script>'
9
14
  };
10
15
  exports.sampleCustomsection1 = {
11
16
  administrativeTitle: 'UNTITLED',
@@ -2033,7 +2038,7 @@ exports.sampleCustomsection5 = {
2033
2038
  CB_CONTENT_PROP_HOVER_SPEC_MUSE: true
2034
2039
  },
2035
2040
  CB_CONTENT_PROP_CODEBLOCK: {
2036
- CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: exports.EMBEDED_SAMPLES.DIV
2041
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: exports.EMBEDED_SAMPLES.ALERT
2037
2042
  },
2038
2043
  CB_CONTENT_PROP_VISIBILITY: {
2039
2044
  CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: true,
@@ -2133,6 +2138,154 @@ exports.sampleCustomsection5 = {
2133
2138
  dynamicLayoutSectionId: 39541,
2134
2139
  id: 1201,
2135
2140
  insertedAt: '2023-08-06T13:30:47',
2141
+ jsonProperties: {
2142
+ currentVersion: '2023-08-03',
2143
+ data: {
2144
+ CB_CONTENT_PROP_CODEBLOCK: {
2145
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: exports.EMBEDED_SAMPLES.CLEAN,
2146
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_LANG: 'HTML'
2147
+ },
2148
+ CB_CONTENT_PROP_HOVER: {
2149
+ CB_CONTENT_PROP_HOVER_SPEC_MUSE: true
2150
+ },
2151
+ CB_CONTENT_PROP_VISIBILITY: {
2152
+ CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: true,
2153
+ CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB: true
2154
+ },
2155
+ CB_EFFECT_PROP_ENTANIM: {
2156
+ CB_EFFECT_PROP_ENTANIM_SPEC_DURATION: 0.7,
2157
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_DURATION:MOBILE': null,
2158
+ CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT: 1,
2159
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT:MOBILE': null,
2160
+ CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC: 'EASEINOUT',
2161
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC:MOBILE': null,
2162
+ CB_EFFECT_PROP_ENTANIM_SPEC_TYPE: 'NONE',
2163
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE': null
2164
+ },
2165
+ CB_EFFECT_PROP_HOVERANIM: {
2166
+ CB_EFFECT_PROP_HOVERANIM_SPEC_DURATION: 0.7,
2167
+ 'CB_EFFECT_PROP_HOVERANIM_SPEC_DURATION:MOBILE': null,
2168
+ CB_EFFECT_PROP_HOVERANIM_SPEC_REPEAT: 1,
2169
+ 'CB_EFFECT_PROP_HOVERANIM_SPEC_REPEAT:MOBILE': null,
2170
+ CB_EFFECT_PROP_HOVERANIM_SPEC_TFUNC: 'EASEINOUT',
2171
+ 'CB_EFFECT_PROP_HOVERANIM_SPEC_TFUNC:MOBILE': null,
2172
+ CB_EFFECT_PROP_HOVERANIM_SPEC_TYPE: 'NONE',
2173
+ 'CB_EFFECT_PROP_HOVERANIM_SPEC_TYPE:MOBILE': null
2174
+ },
2175
+ CB_LAYOUT_PROP_ARRANGE: {
2176
+ CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL: 'CENTER',
2177
+ 'CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL:MOBILE': null,
2178
+ CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL: 'MIDDLE',
2179
+ 'CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL:MOBILE': null
2180
+ },
2181
+ CB_LAYOUT_PROP_PADDING: {
2182
+ CB_LAYOUT_PROP_PADDING_SPEC_FIX: true,
2183
+ 'CB_LAYOUT_PROP_PADDING_SPEC_FIX:MOBILE': null,
2184
+ CB_LAYOUT_PROP_PADDING_SPEC_PADDING: {
2185
+ bottom: 0,
2186
+ left: 0,
2187
+ right: 0,
2188
+ top: 0
2189
+ },
2190
+ 'CB_LAYOUT_PROP_PADDING_SPEC_PADDING:MOBILE': null
2191
+ },
2192
+ CB_PLACEMENT_PROP_PLACEMENT: {
2193
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS: 13,
2194
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': 8,
2195
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: 13,
2196
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE': 4,
2197
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: 8,
2198
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE': 1,
2199
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY: 4,
2200
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE': 10,
2201
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX: 1,
2202
+ 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE': 1
2203
+ },
2204
+ CB_STYLE_PROP_BGCOLOR: {
2205
+ CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE: 90,
2206
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:HOVER': null,
2207
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:MOBILE': null,
2208
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ANGLE:MOBILE:HOVER': null,
2209
+ CB_STYLE_PROP_BGCOLOR_SPEC_COLOR: '#027FFBFFF',
2210
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:HOVER': null,
2211
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:MOBILE': null,
2212
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_COLOR:MOBILE:HOVER': null,
2213
+ CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR: '#27FFBFFF',
2214
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:HOVER': null,
2215
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:MOBILE': null,
2216
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDCOLOR:MOBILE:HOVER': null,
2217
+ CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC: 100,
2218
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:HOVER': null,
2219
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:MOBILE': null,
2220
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_ENDLOC:MOBILE:HOVER': null,
2221
+ CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT: 'LINEAR',
2222
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:HOVER': null,
2223
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:MOBILE': null,
2224
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_GRADIENT:MOBILE:HOVER': null,
2225
+ CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR: '#455EEFFF',
2226
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:HOVER': null,
2227
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:MOBILE': null,
2228
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTCOLOR:MOBILE:HOVER': null,
2229
+ CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC: 0,
2230
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:HOVER': null,
2231
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:MOBILE': null,
2232
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_STARTLOC:MOBILE:HOVER': null,
2233
+ CB_STYLE_PROP_BGCOLOR_SPEC_TYPE: 'SOLID',
2234
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:HOVER': null,
2235
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:MOBILE': null,
2236
+ 'CB_STYLE_PROP_BGCOLOR_SPEC_TYPE:MOBILE:HOVER': null
2237
+ },
2238
+ CB_STYLE_PROP_OPACITY: {
2239
+ CB_STYLE_PROP_OPACITY_SPEC_OPACITY: 100,
2240
+ 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:HOVER': null,
2241
+ 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:MOBILE': null,
2242
+ 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:MOBILE:HOVER': null
2243
+ },
2244
+ CB_STYLE_PROP_SHADOW: {
2245
+ CB_STYLE_PROP_SHADOW_SPEC_BLUR: 24,
2246
+ 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:HOVER': null,
2247
+ 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:MOBILE': null,
2248
+ 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:MOBILE:HOVER': null,
2249
+ CB_STYLE_PROP_SHADOW_SPEC_COLOR: '#FFF1F1FF',
2250
+ 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:HOVER': null,
2251
+ 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:MOBILE': null,
2252
+ 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:MOBILE:HOVER': null,
2253
+ CB_STYLE_PROP_SHADOW_SPEC_OPACITY: 30,
2254
+ 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:HOVER': null,
2255
+ 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE': null,
2256
+ 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE:HOVER': null,
2257
+ CB_STYLE_PROP_SHADOW_SPEC_SPREAD: 2,
2258
+ 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:HOVER': null,
2259
+ 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:MOBILE': null,
2260
+ 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:MOBILE:HOVER': null,
2261
+ CB_STYLE_PROP_SHADOW_SPEC_TYPE: 'OUTSET',
2262
+ 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:HOVER': null,
2263
+ 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:MOBILE': null,
2264
+ 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:MOBILE:HOVER': null,
2265
+ CB_STYLE_PROP_SHADOW_SPEC_X: 0,
2266
+ 'CB_STYLE_PROP_SHADOW_SPEC_X:HOVER': null,
2267
+ 'CB_STYLE_PROP_SHADOW_SPEC_X:MOBILE': null,
2268
+ 'CB_STYLE_PROP_SHADOW_SPEC_X:MOBILE:HOVER': null,
2269
+ CB_STYLE_PROP_SHADOW_SPEC_Y: 12,
2270
+ 'CB_STYLE_PROP_SHADOW_SPEC_Y:HOVER': null,
2271
+ 'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE': null,
2272
+ 'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE:HOVER': null
2273
+ }
2274
+ },
2275
+ minVersion: '2023-08-03',
2276
+ version: '2023-08-03'
2277
+ },
2278
+ queryableDefinitionPreset: 'N/A',
2279
+ queryableTapSrc: 'N/A',
2280
+ updatedAt: '2023-08-06T13:30:49'
2281
+ },
2282
+ {
2283
+ availablePlugins: [],
2284
+ componentBlockCode: 'CB_EMBED',
2285
+ componentBlockType: 'GENERAL',
2286
+ dynamicLayoutSectionId: 39541,
2287
+ id: 1202,
2288
+ insertedAt: '2023-08-06T13:30:47',
2136
2289
  jsonProperties: {
2137
2290
  currentVersion: '2023-08-03',
2138
2291
  data: {
@@ -2140,7 +2293,7 @@ exports.sampleCustomsection5 = {
2140
2293
  CB_CONTENT_PROP_HOVER_SPEC_MUSE: true
2141
2294
  },
2142
2295
  CB_CONTENT_PROP_CODEBLOCK: {
2143
- CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: exports.EMBEDED_SAMPLES.GOOGLE_MAPS
2296
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: exports.EMBEDED_SAMPLES.SCRIPT
2144
2297
  },
2145
2298
  CB_CONTENT_PROP_VISIBILITY: {
2146
2299
  CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: true,
@@ -2178,9 +2331,9 @@ exports.sampleCustomsection5 = {
2178
2331
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': 8,
2179
2332
  CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: 20,
2180
2333
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE': 20,
2181
- CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: 0,
2334
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: 10,
2182
2335
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE': 0,
2183
- CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY: 20,
2336
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY: 0,
2184
2337
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE': 0,
2185
2338
  CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX: 3,
2186
2339
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE': 2
@@ -2238,7 +2391,7 @@ exports.sampleCustomsection5 = {
2238
2391
  componentBlockCode: 'CB_EMBED',
2239
2392
  componentBlockType: 'GENERAL',
2240
2393
  dynamicLayoutSectionId: 39541,
2241
- id: 1202,
2394
+ id: 1203,
2242
2395
  insertedAt: '2023-08-06T13:30:47',
2243
2396
  jsonProperties: {
2244
2397
  currentVersion: '2023-08-03',
@@ -2247,7 +2400,7 @@ exports.sampleCustomsection5 = {
2247
2400
  CB_CONTENT_PROP_HOVER_SPEC_MUSE: true
2248
2401
  },
2249
2402
  CB_CONTENT_PROP_CODEBLOCK: {
2250
- CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: exports.EMBEDED_SAMPLES.SCRIPT
2403
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: exports.EMBEDED_SAMPLES.GOOGLE_FORMS
2251
2404
  },
2252
2405
  CB_CONTENT_PROP_VISIBILITY: {
2253
2406
  CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: true,
@@ -2264,9 +2417,9 @@ exports.sampleCustomsection5 = {
2264
2417
  'CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC:MOBILE': null
2265
2418
  },
2266
2419
  CB_LAYOUT_PROP_ARRANGE: {
2267
- CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL: 'CENTER',
2420
+ CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL: 'LEFT',
2268
2421
  'CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL:MOBILE': 'MIDDLE',
2269
- CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL: null,
2422
+ CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL: 'TOP',
2270
2423
  'CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL:MOBILE': null
2271
2424
  },
2272
2425
  CB_LAYOUT_PROP_PADDING: {
@@ -2281,11 +2434,11 @@ exports.sampleCustomsection5 = {
2281
2434
  'CB_LAYOUT_PROP_PADDING_SPEC_PADDING:MOBILE': null
2282
2435
  },
2283
2436
  CB_PLACEMENT_PROP_PLACEMENT: {
2284
- CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS: 10,
2437
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS: 15,
2285
2438
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': 8,
2286
2439
  CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: 20,
2287
2440
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE': 20,
2288
- CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: 10,
2441
+ CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: 0,
2289
2442
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE': 0,
2290
2443
  CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY: 0,
2291
2444
  'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE': 0,
@@ -2345,7 +2498,7 @@ exports.sampleCustomsection5 = {
2345
2498
  componentBlockCode: 'CB_EMBED',
2346
2499
  componentBlockType: 'GENERAL',
2347
2500
  dynamicLayoutSectionId: 39541,
2348
- id: 1203,
2501
+ id: 1204,
2349
2502
  insertedAt: '2023-08-06T13:30:47',
2350
2503
  jsonProperties: {
2351
2504
  currentVersion: '2023-08-03',
@@ -2354,7 +2507,7 @@ exports.sampleCustomsection5 = {
2354
2507
  CB_CONTENT_PROP_HOVER_SPEC_MUSE: true
2355
2508
  },
2356
2509
  CB_CONTENT_PROP_CODEBLOCK: {
2357
- CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: exports.EMBEDED_SAMPLES.SCRIPT
2510
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: exports.EMBEDED_SAMPLES.GOOGLE_MAPS
2358
2511
  },
2359
2512
  CB_CONTENT_PROP_VISIBILITY: {
2360
2513
  CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: true,
@@ -2447,113 +2600,6 @@ exports.sampleCustomsection5 = {
2447
2600
  queryableTapSrc: 'N/A',
2448
2601
  updatedAt: '2023-08-06T13:30:49'
2449
2602
  },
2450
- // {
2451
- // availablePlugins: [],
2452
- // componentBlockCode: 'CB_EMBED',
2453
- // componentBlockType: 'GENERAL',
2454
- // dynamicLayoutSectionId: 39541,
2455
- // id: 1204,
2456
- // insertedAt: '2023-08-06T13:30:47',
2457
- // jsonProperties: {
2458
- // currentVersion: '2023-08-03',
2459
- // data: {
2460
- // CB_CONTENT_PROP_HOVER: {
2461
- // CB_CONTENT_PROP_HOVER_SPEC_MUSE: true
2462
- // },
2463
- // CB_CONTENT_PROP_TWITTER: {
2464
- // CB_CONTENT_PROP_TWITTER_SPEC_SRC: EMBEDED_SAMPLES.GOOGLE_FORMS
2465
- // },
2466
- // CB_CONTENT_PROP_VISIBILITY: {
2467
- // CB_CONTENT_PROP_VISIBILITY_SPEC_DESKTOP: true,
2468
- // CB_CONTENT_PROP_VISIBILITY_SPEC_MOBILEWEB: true
2469
- // },
2470
- // CB_EFFECT_PROP_ENTANIM: {
2471
- // CB_EFFECT_PROP_ENTANIM_SPEC_TYPE: 'SLIDEINLEFT',
2472
- // 'CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE': 'HEARTBEAT',
2473
- // CB_EFFECT_PROP_ENTANIM_SPEC_DURATION: 1,
2474
- // 'CB_EFFECT_PROP_ENTANIM_SPEC_DURATION:MOBILE': null,
2475
- // CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT: 1,
2476
- // 'CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT:MOBILE': null,
2477
- // CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC: 'EASEINOUT',
2478
- // 'CB_EFFECT_PROP_ENTANIM_SPEC_TFUNC:MOBILE': null
2479
- // },
2480
- // CB_LAYOUT_PROP_ARRANGE: {
2481
- // CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL: 'CENTER',
2482
- // 'CB_LAYOUT_PROP_ARRANGE_SPEC_HORIZONTAL:MOBILE': 'MIDDLE',
2483
- // CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL: null,
2484
- // 'CB_LAYOUT_PROP_ARRANGE_SPEC_VERTICAL:MOBILE': null
2485
- // },
2486
- // CB_LAYOUT_PROP_PADDING: {
2487
- // CB_LAYOUT_PROP_PADDING_SPEC_FIX: true,
2488
- // 'CB_LAYOUT_PROP_PADDING_SPEC_FIX:MOBILE': null,
2489
- // CB_LAYOUT_PROP_PADDING_SPEC_PADDING: {
2490
- // bottom: 0,
2491
- // left: 0,
2492
- // right: 0,
2493
- // top: 0
2494
- // },
2495
- // 'CB_LAYOUT_PROP_PADDING_SPEC_PADDING:MOBILE': null
2496
- // },
2497
- // CB_PLACEMENT_PROP_PLACEMENT: {
2498
- // CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS: 10,
2499
- // 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE': 8,
2500
- // CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS: 20,
2501
- // 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE': 20,
2502
- // CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX: 10,
2503
- // 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX:MOBILE': 0,
2504
- // CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY: 0,
2505
- // 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE': 0,
2506
- // CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX: 3,
2507
- // 'CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE': 2
2508
- // },
2509
- // CB_STYLE_PROP_OPACITY: {
2510
- // CB_STYLE_PROP_OPACITY_SPEC_OPACITY: 100,
2511
- // 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:HOVER': 95,
2512
- // 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:MOBILE': null,
2513
- // 'CB_STYLE_PROP_OPACITY_SPEC_OPACITY:MOBILE:HOVER': null
2514
- // },
2515
- // CB_STYLE_PROP_SHADOW: {
2516
- // CB_STYLE_PROP_SHADOW_SPEC_BLUR: 24,
2517
- // 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:HOVER': 24,
2518
- // 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:MOBILE': null,
2519
- // 'CB_STYLE_PROP_SHADOW_SPEC_BLUR:MOBILE:HOVER': null,
2520
- // CB_STYLE_PROP_SHADOW_SPEC_COLOR: '#00000000',
2521
- // 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:HOVER': '#00000000',
2522
- // 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:MOBILE': null,
2523
- // 'CB_STYLE_PROP_SHADOW_SPEC_COLOR:MOBILE:HOVER': null,
2524
- // CB_STYLE_PROP_SHADOW_SPEC_OPACITY: 30,
2525
- // 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:HOVER': 30,
2526
- // 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE': null,
2527
- // 'CB_STYLE_PROP_SHADOW_SPEC_OPACITY:MOBILE:HOVER': null,
2528
- // CB_STYLE_PROP_SHADOW_SPEC_SPREAD: 2,
2529
- // 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:HOVER': 2,
2530
- // 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:MOBILE': null,
2531
- // 'CB_STYLE_PROP_SHADOW_SPEC_SPREAD:MOBILE:HOVER': null,
2532
- // CB_STYLE_PROP_SHADOW_SPEC_TYPE: 'NONE',
2533
- // 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:HOVER': 'OUTSET',
2534
- // 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:MOBILE': null,
2535
- // 'CB_STYLE_PROP_SHADOW_SPEC_TYPE:MOBILE:HOVER': null,
2536
- // CB_STYLE_PROP_SHADOW_SPEC_X: 0,
2537
- // 'CB_STYLE_PROP_SHADOW_SPEC_X:HOVER': 0,
2538
- // 'CB_STYLE_PROP_SHADOW_SPEC_X:MOBILE': null,
2539
- // 'CB_STYLE_PROP_SHADOW_SPEC_X:MOBILE:HOVER': null,
2540
- // CB_STYLE_PROP_SHADOW_SPEC_Y: 12,
2541
- // 'CB_STYLE_PROP_SHADOW_SPEC_Y:HOVER': 12,
2542
- // 'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE': null,
2543
- // 'CB_STYLE_PROP_SHADOW_SPEC_Y:MOBILE:HOVER': null
2544
- // },
2545
- // CB_STYLE_PROP_TWITTER: {
2546
- // CB_STYLE_PROP_TWITTER_SPEC_THEME: 'LIGHT',
2547
- // 'CB_STYLE_PROP_TWITTER_SPEC_THEME:MOBILE': null
2548
- // }
2549
- // },
2550
- // minVersion: '2023-08-03',
2551
- // version: '2023-08-03'
2552
- // },
2553
- // queryableDefinitionPreset: 'N/A',
2554
- // queryableTapSrc: 'N/A',
2555
- // updatedAt: '2023-08-06T13:30:49'
2556
- // },
2557
2603
  {
2558
2604
  availablePlugins: [],
2559
2605
  componentBlockCode: 'CB_DIVIDER',
@@ -20,7 +20,7 @@ var newUtils_1 = require("../../newUtils");
20
20
  var types_1 = require("../../types");
21
21
  var Button_1 = __importDefault(require("./componentBlocks/Button/Button"));
22
22
  var Divider_1 = __importDefault(require("./componentBlocks/Divider/Divider"));
23
- var Iframe_1 = __importDefault(require("./componentBlocks/Iframe/Iframe"));
23
+ var Embed_1 = __importDefault(require("./componentBlocks/Embed/Embed"));
24
24
  var Image_1 = __importDefault(require("./componentBlocks/Image/Image"));
25
25
  var RichText_1 = require("./componentBlocks/RichText");
26
26
  var Text_1 = __importDefault(require("./componentBlocks/Text/Text"));
@@ -46,7 +46,7 @@ function ComponentBlockMatcher(_a) {
46
46
  case types_1.CB_ALL_CODES.CB_YOUTUBE:
47
47
  return (0, jsx_runtime_1.jsx)(Youtube_1.Youtube, __assign({}, propsWithValue, { index: index }));
48
48
  case types_1.CB_ALL_CODES.CB_EMBED:
49
- return (0, jsx_runtime_1.jsx)(Iframe_1.default, __assign({}, propsWithValue, { index: index }));
49
+ return (0, jsx_runtime_1.jsx)(Embed_1.default, __assign({}, propsWithValue, { index: index }));
50
50
  default:
51
51
  return (0, jsx_runtime_1.jsx)("div", { children: "Error: not supported CB" });
52
52
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import type { CB_EMBED_PROPERTIES_TYPE, IndexForIntersection } from '../../../../util/types';
3
3
  type Props = CB_EMBED_PROPERTIES_TYPE & IndexForIntersection;
4
- declare function Iframe(props: Props): JSX.Element;
5
- export default Iframe;
4
+ declare function Embed(props: Props): JSX.Element;
5
+ export default Embed;
@@ -21,22 +21,13 @@ var hooks_1 = require("../../../../hooks");
21
21
  var util_1 = require("../../../../util");
22
22
  var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
23
23
  var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
24
- var EmbedCore_1 = __importDefault(require("./EmbedCore"));
25
- function Iframe(props) {
24
+ var EmbedIframe_1 = __importDefault(require("./EmbedIframe"));
25
+ function Embed(props) {
26
26
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
27
27
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
28
28
  var CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, index = props.index;
29
29
  var CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE = props.CB_CONTENT_PROP_CODEBLOCK.CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW;
30
30
  var _b = (0, util_1.parseProperties)(props, device), style = _b.style, hoverStyle = _b.hoverStyle, layout = _b.layout, effect = _b.effect;
31
- if ('display' in layout) {
32
- delete layout.display;
33
- }
34
- if ('alignItems' in layout) {
35
- delete layout.alignItems;
36
- }
37
- if ('justifyContent' in layout) {
38
- delete layout.justifyContent;
39
- }
40
31
  var cbRef = (0, react_1.useRef)(null);
41
32
  var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
42
33
  index
@@ -49,26 +40,6 @@ function Iframe(props) {
49
40
  : CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
50
41
  var hasEffect = !isNoneEffectType;
51
42
  var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
52
- return ((0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), hoverStyle: hoverStyle, cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device }, { children: (0, jsx_runtime_1.jsx)(EmbedCore_1.default, { embedCode: CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE }) })) })));
43
+ return ((0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), hoverStyle: hoverStyle, cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device }, { children: (0, jsx_runtime_1.jsx)(EmbedIframe_1.default, { embedCode: CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE, mode: mode, style: layout }) })) })));
53
44
  }
54
- // NOTE: 추후 사용되지 않으면 삭제
55
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
56
- function sanitizeIframe(iframeHtml) {
57
- var parser = new DOMParser();
58
- var doc = parser.parseFromString(iframeHtml, 'text/html');
59
- var iframe = doc.querySelector('iframe');
60
- if (!iframe) {
61
- // throw new Error('Invalid iframe.');
62
- return null;
63
- }
64
- // Check the src attribute matches allowed patterns
65
- // if (!iframe.src.startsWith('https://player.vimeo.com/')) {
66
- // throw new Error('URL not allowed.');
67
- // }
68
- // Remove any attributes that are not allowed
69
- iframe.removeAttribute('onload');
70
- iframe.removeAttribute('onerror');
71
- // ...repeat for other attributes
72
- return iframe.outerHTML;
73
- }
74
- exports.default = Iframe;
45
+ exports.default = Embed;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { DynamicLayoutProps } from '../../../../../../../DynamicLayout/types';
3
+ interface EmbedCoreProps {
4
+ embedCode: string;
5
+ mode: DynamicLayoutProps['mode'];
6
+ }
7
+ declare const EmbedCore: React.FC<EmbedCoreProps>;
8
+ export default EmbedCore;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
29
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
30
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
31
+ if (ar || !(i in from)) {
32
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
33
+ ar[i] = from[i];
34
+ }
35
+ }
36
+ return to.concat(ar || Array.prototype.slice.call(from));
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var jsx_runtime_1 = require("react/jsx-runtime");
43
+ var DOMPurify = __importStar(require("dompurify"));
44
+ var styled_components_1 = __importDefault(require("styled-components"));
45
+ var constant_1 = require("./constant");
46
+ var PURIFY_CONFIG = {
47
+ ADD_TAGS: constant_1.PURIFY_BLOCK_TAGS,
48
+ ADD_ATTR: constant_1.PURIFY_BLOCK_ATTRS
49
+ };
50
+ var EmbedCore = function (_a) {
51
+ var embedCode = _a.embedCode, mode = _a.mode;
52
+ var sanitized = DOMPurify.sanitize(embedCode, PURIFY_CONFIG);
53
+ DOMPurify.addHook('afterSanitizeAttributes', function (node) {
54
+ if (node.tagName === 'IFRAME') {
55
+ node.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms');
56
+ }
57
+ });
58
+ if (DOMPurify.removed.length > 0 && mode === 'EDIT') {
59
+ var message = removedMessage(DOMPurify.removed).join("\n");
60
+ return (0, jsx_runtime_1.jsx)(S_Error, { children: message });
61
+ }
62
+ // eslint-disable-next-line react/no-danger
63
+ return (0, jsx_runtime_1.jsx)(S_EmbedCore, { dangerouslySetInnerHTML: { __html: sanitized } });
64
+ };
65
+ function removedMessage(removed) {
66
+ return removed.reduce(function (acc, cur) {
67
+ var key = Object.keys(cur)[0];
68
+ var message = "".concat(key, ":").concat(cur[key].localName, " is not allowed.");
69
+ return __spreadArray(__spreadArray([], acc, true), [message], false);
70
+ }, []);
71
+ }
72
+ var S_Error = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: red;\n display: flex;\n height: 100%;\n justify-content: center;\n white-space: pre-line;\n width: 100%;\n"], ["\n align-items: center;\n background-color: red;\n display: flex;\n height: 100%;\n justify-content: center;\n white-space: pre-line;\n width: 100%;\n"])));
73
+ var S_EmbedCore = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-items: inherit;\n display: inherit;\n flex-direction: inherit;\n height: inherit;\n justify-content: inherit;\n width: inherit;\n"], ["\n align-items: inherit;\n display: inherit;\n flex-direction: inherit;\n height: inherit;\n justify-content: inherit;\n width: inherit;\n"])));
74
+ exports.default = EmbedCore;
75
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { CSSProperties } from 'styled-components';
3
+ import type { DynamicLayoutProps } from '../../../../../../../DynamicLayout/types';
4
+ interface EmbedCoreProps {
5
+ embedCode: string;
6
+ mode: DynamicLayoutProps['mode'];
7
+ style: CSSProperties;
8
+ }
9
+ declare const EmbedIframe: React.FC<EmbedCoreProps>;
10
+ export default EmbedIframe;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ var jsx_runtime_1 = require("react/jsx-runtime");
11
+ var react_1 = require("react");
12
+ var styled_components_1 = __importDefault(require("styled-components"));
13
+ var EmbedIframe = function (_a) {
14
+ var embedCode = _a.embedCode, style = _a.style;
15
+ var blobUrl = (0, react_1.useMemo)(function () {
16
+ return getCodeBlobUrl(embedCode, style);
17
+ }, [embedCode]);
18
+ return ((0, jsx_runtime_1.jsx)(S_Iframe, { src: blobUrl, title: "\uD2B9\uBCC4\uD55C\uC774\uB984", sandbox: "allow-scripts allow-same-origin allow-forms" }));
19
+ };
20
+ var S_Iframe = styled_components_1.default.iframe(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: none;\n height: 100%;\n width: 100%;\n"], ["\n border: none;\n height: 100%;\n width: 100%;\n"])));
21
+ function getCodeBlobUrl(code, style) {
22
+ var styleString = Object.entries(style).reduce(function (styleStr, _a) {
23
+ var prop = _a[0], value = _a[1];
24
+ var kebabProp = prop.replace(/([a-z0])([A-Z])/g, '$1-$2').toLowerCase();
25
+ return "".concat(styleStr).concat(kebabProp, ": ").concat(value, ";");
26
+ }, '');
27
+ var fullCode = "\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <title>\uCF54\uB4DC\uC528\uBE44</title>\n <style>\n html, body {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n ".concat(styleString, "\n }\n\n </style>\n </head>\n <body>\n ").concat(code, "\n </body>\n </html>\n ");
28
+ // Use a blob to handle potentially complex scripts and avoid encoding issues
29
+ var blob = new Blob([fullCode], { type: 'text/html' });
30
+ var url = URL.createObjectURL(blob);
31
+ return url;
32
+ }
33
+ exports.default = EmbedIframe;
34
+ var templateObject_1;
@@ -0,0 +1,4 @@
1
+ export declare const tagBlacklist: string[];
2
+ export declare const attrBlacklist: string[];
3
+ export declare const PURIFY_BLOCK_TAGS: string[];
4
+ export declare const PURIFY_BLOCK_ATTRS: string[];
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PURIFY_BLOCK_ATTRS = exports.PURIFY_BLOCK_TAGS = exports.attrBlacklist = exports.tagBlacklist = void 0;
4
+ exports.tagBlacklist = [
5
+ // 'script',
6
+ // 'iframe',
7
+ 'object',
8
+ 'embed',
9
+ 'applet',
10
+ // 'link',
11
+ 'meta',
12
+ 'style'
13
+ ];
14
+ exports.attrBlacklist = [
15
+ 'onerror',
16
+ 'onload',
17
+ 'onclick',
18
+ 'onmouseover',
19
+ 'onfocus',
20
+ 'onblur',
21
+ 'onchange',
22
+ // 'href',
23
+ // 'src',
24
+ // 'style',
25
+ 'target'
26
+ ];
27
+ exports.PURIFY_BLOCK_TAGS = [
28
+ 'applet',
29
+ 'base',
30
+ 'basefont',
31
+ 'command',
32
+ 'embed',
33
+ 'frame',
34
+ 'frameset',
35
+ 'iframe',
36
+ 'keygen',
37
+ 'link',
38
+ 'meta',
39
+ 'noframes',
40
+ 'noscript',
41
+ 'object',
42
+ 'param',
43
+ 'script',
44
+ 'title'
45
+ ];
46
+ exports.PURIFY_BLOCK_ATTRS = [
47
+ 'accept-charset',
48
+ 'accesskey',
49
+ 'allow',
50
+ 'allowfullscreen',
51
+ 'async',
52
+ 'autocapitalize',
53
+ 'autofocus',
54
+ 'autoplay',
55
+ 'buffered',
56
+ 'challenge',
57
+ 'charset',
58
+ 'code',
59
+ 'codebase',
60
+ 'content',
61
+ 'contenteditable',
62
+ 'contextmenu',
63
+ 'controls',
64
+ 'data',
65
+ 'decoding',
66
+ 'defer',
67
+ 'dirname',
68
+ 'draggable',
69
+ 'dropzone',
70
+ 'form',
71
+ 'formaction',
72
+ 'http-equiv',
73
+ 'icon',
74
+ 'importance',
75
+ 'itemprop',
76
+ 'keytype',
77
+ 'kind',
78
+ 'language',
79
+ 'lazyload',
80
+ 'manifest',
81
+ 'minlength',
82
+ 'muted',
83
+ 'ping',
84
+ 'sandbox',
85
+ 'scoped',
86
+ 'slot',
87
+ 'spellcheck',
88
+ 'srcdoc',
89
+ 'srclang',
90
+ 'start',
91
+ 'target',
92
+ 'translate',
93
+ 'wrap',
94
+ 'referrerpolicy',
95
+ 'frameborder',
96
+ 'scrolling',
97
+ 'marginheight',
98
+ 'marginwidth'
99
+ ];
@@ -0,0 +1,9 @@
1
+ export default function sanitizeEmbedCode(embedCode: string): {
2
+ html: string;
3
+ scripts: string[];
4
+ error?: undefined;
5
+ } | {
6
+ error: Error;
7
+ html?: undefined;
8
+ scripts?: undefined;
9
+ };
@@ -5,6 +5,7 @@ function sanitizeEmbedCode(embedCode) {
5
5
  try {
6
6
  var parser = new DOMParser();
7
7
  var doc = parser.parseFromString(embedCode, 'text/html');
8
+ var scripts_1 = [];
8
9
  // Function to check for the presence of blacklisted tags or attributes
9
10
  var checkForBlacklist_1 = function (node) {
10
11
  if (constant_1.tagBlacklist.includes(node.tagName.toLowerCase())) {
@@ -16,6 +17,13 @@ function sanitizeEmbedCode(embedCode) {
16
17
  }
17
18
  });
18
19
  };
20
+ // Collect and remove script tags
21
+ var scriptElements = doc.querySelectorAll('script');
22
+ scriptElements.forEach(function (script) {
23
+ var _a;
24
+ scripts_1.push(script.outerHTML);
25
+ (_a = script.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(script);
26
+ });
19
27
  // Recursive function to check all nodes in the document
20
28
  var checkNode_1 = function (node) {
21
29
  if (node.nodeType === Node.ELEMENT_NODE) {
@@ -24,10 +32,13 @@ function sanitizeEmbedCode(embedCode) {
24
32
  Array.from(node.childNodes).forEach(checkNode_1);
25
33
  };
26
34
  checkNode_1(doc.body);
27
- return doc.body.innerHTML;
35
+ return {
36
+ html: doc.body.innerHTML,
37
+ scripts: scripts_1
38
+ };
28
39
  }
29
40
  catch (error) {
30
- return new Error("Sanitization failed: ".concat(error.message));
41
+ return { error: new Error("Sanitization failed: ".concat(error.message)) };
31
42
  }
32
43
  }
33
44
  exports.default = sanitizeEmbedCode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "0.3.59",
3
+ "version": "0.3.61",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -15,6 +15,7 @@
15
15
  "@types/google-spreadsheet": "^3.1.5",
16
16
  "@types/react": "^17.0.27",
17
17
  "@types/react-dom": "^17.0.9",
18
+ "dompurify": "^3.0.9",
18
19
  "dotenv": "^8.2.0",
19
20
  "google-spreadsheet": "^3.1.15",
20
21
  "i18next": "^21.3.2",
@@ -83,6 +84,7 @@
83
84
  "@storybook/node-logger": "^6.3.12",
84
85
  "@storybook/preset-create-react-app": "^3.2.0",
85
86
  "@storybook/react": "^6.3.12",
87
+ "@types/dompurify": "^3.0.5",
86
88
  "@types/lodash": "^4.14.175",
87
89
  "@types/node": "^16.10.2",
88
90
  "@types/react-router-dom": "^5.3.3",
package/release-note.md CHANGED
@@ -1,7 +1,7 @@
1
- # PDS-DEV-KIT-WEB Release Notes
2
- ## [v2.2.57]
3
- ## daily|https://design.storybook.publ.biz/
4
-
5
- ### Component
6
- * BasicListItem
7
- * MainButton과 Switch 우측의 스페이싱 제거
1
+ # pds-dev-kit-web-test Release Notes
2
+ ## [v0.3.61]
3
+ ## 기준 pds-dev-kit-web 버전 @2.2.57
4
+ ### sub
5
+ * DynamicLayout
6
+ * domPurify(sanitizer) 사용하지 않고 blob iframe으로 사용.
7
+ * form 허용가능하게 한다.
@@ -0,0 +1,3 @@
1
+ {
2
+ "presets": ["es2015"]
3
+ }
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface EmbedComponentProps {
3
- embedCode: string;
4
- }
5
- declare const EmbedComponent: React.FC<EmbedComponentProps>;
6
- export default EmbedComponent;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- var jsx_runtime_1 = require("react/jsx-runtime");
11
- var styled_components_1 = __importDefault(require("styled-components"));
12
- var sanitizeEmbedCode_1 = __importDefault(require("./sanitizeEmbedCode"));
13
- var EmbedComponent = function (_a) {
14
- var embedCode = _a.embedCode;
15
- var sanitized = (0, sanitizeEmbedCode_1.default)(embedCode);
16
- if (typeof sanitized !== 'string') {
17
- return (0, jsx_runtime_1.jsxs)(S_Error, { children: ["Error: ", sanitized.message] });
18
- }
19
- // eslint-disable-next-line react/no-danger
20
- return ((0, jsx_runtime_1.jsx)("div", { dangerouslySetInnerHTML: { __html: sanitized }, style: { width: '100%', height: '100%' } }));
21
- };
22
- var S_Error = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: red;\n display: flex;\n height: 100%;\n justify-content: center;\n width: 100%;\n"], ["\n align-items: center;\n background-color: red;\n display: flex;\n height: 100%;\n justify-content: center;\n width: 100%;\n"])));
23
- exports.default = EmbedComponent;
24
- var templateObject_1;
@@ -1,2 +0,0 @@
1
- export declare const tagBlacklist: string[];
2
- export declare const attrBlacklist: string[];
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.attrBlacklist = exports.tagBlacklist = void 0;
4
- exports.tagBlacklist = [
5
- // 'script',
6
- // 'iframe',
7
- 'object',
8
- 'embed',
9
- 'applet',
10
- // 'link',
11
- 'meta',
12
- 'style'
13
- ];
14
- exports.attrBlacklist = [
15
- 'onerror',
16
- 'onload',
17
- 'onclick',
18
- 'onmouseover',
19
- 'onfocus',
20
- 'onblur',
21
- 'onchange',
22
- // 'href',
23
- // 'src',
24
- // 'style',
25
- 'target'
26
- ];
@@ -1 +0,0 @@
1
- export default function sanitizeEmbedCode(embedCode: string): string | Error;