@adstage/web-sdk 2.5.2 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/dist/index.cjs.js +2073 -1050
- package/dist/index.d.ts +55 -12
- package/dist/index.esm.js +2073 -1050
- package/dist/index.standalone.js +2073 -1050
- package/package.json +1 -1
- package/src/constants/endpoints.ts +0 -1
- package/src/core/{AdStage.ts → adstage.ts} +36 -8
- package/src/index.ts +9 -3
- package/src/managers/ads/advertisement-event-tracker.ts +15 -11
- package/src/managers/ads/carousel-slider-manager.ts +91 -19
- package/src/managers/ads/slider-event-tracker.ts +57 -0
- package/src/managers/ads/text-transition-manager.ts +91 -26
- package/src/modules/ads/ad-renderer.ts +259 -0
- package/src/modules/ads/{AdsModule.ts → ads-module.ts} +202 -21
- package/src/modules/ads/interfaces/i-ad-renderer.ts +77 -0
- package/src/modules/ads/renderers/banner-ad-renderer.ts +414 -0
- package/src/modules/ads/renderers/base-ad-renderer.ts +340 -0
- package/src/modules/ads/renderers/interstitial-ad-renderer.ts +256 -0
- package/src/modules/ads/renderers/native-ad-renderer.ts +154 -0
- package/src/modules/ads/renderers/text-ad-renderer.ts +120 -0
- package/src/modules/ads/renderers/video-ad-renderer.ts +433 -0
- package/src/modules/config/{ConfigModule.ts → config-module.ts} +1 -5
- package/src/react/{AdStageProvider.tsx → ad-stage-provider.tsx} +1 -1
- package/src/react/index.ts +2 -2
- package/src/types/config.ts +2 -184
- package/src/utils/ad-click-handler.ts +155 -0
- package/src/utils/text-ad-utils.ts +37 -0
- package/src/dummy/ads_dummy.json +0 -84
- package/src/modules/ads/AdRenderer.ts +0 -735
- package/src/renderers/banner-renderer.ts +0 -35
- package/src/renderers/base-renderer.ts +0 -209
- package/src/renderers/index.ts +0 -71
- package/src/renderers/interstitial-renderer.ts +0 -70
- package/src/renderers/native-renderer.ts +0 -35
- package/src/renderers/text-renderer.ts +0 -94
- package/src/renderers/video-renderer.ts +0 -63
- /package/src/modules/events/{EventsModule.ts → events-module.ts} +0 -0
|
@@ -21,10 +21,6 @@ export class ConfigModule implements BaseModule {
|
|
|
21
21
|
timeout: 30000,
|
|
22
22
|
debug: false,
|
|
23
23
|
modules: ['ads', 'events', 'config'],
|
|
24
|
-
validateOnInit: false,
|
|
25
|
-
fallbackMode: true,
|
|
26
|
-
offlineMode: false,
|
|
27
|
-
productionMode: false,
|
|
28
24
|
...config
|
|
29
25
|
};
|
|
30
26
|
|
|
@@ -39,7 +35,7 @@ export class ConfigModule implements BaseModule {
|
|
|
39
35
|
console.log('✅ Config module initialized (sync mode)', {
|
|
40
36
|
modules: this._config.modules,
|
|
41
37
|
endpoint: endpoints.getBaseUrl(),
|
|
42
|
-
mode:
|
|
38
|
+
mode: 'development'
|
|
43
39
|
});
|
|
44
40
|
}
|
|
45
41
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React, { createContext, useContext, useEffect, useState, ReactNode } from 'react';
|
|
7
|
-
import AdStage from '../core/
|
|
7
|
+
import AdStage from '../core/adstage';
|
|
8
8
|
import { AdStageConfig } from '../types/config';
|
|
9
9
|
|
|
10
10
|
interface AdStageContextType {
|
package/src/react/index.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* React 애플리케이션을 위한 컴포넌트와 훅들
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export { AdStageProvider, useAdStageContext, useAdStageInstance } from './
|
|
6
|
+
export { AdStageProvider, useAdStageContext, useAdStageInstance } from './ad-stage-provider';
|
|
7
7
|
|
|
8
8
|
// 타입들도 재export
|
|
9
9
|
export type { AdStageConfig, ModuleName, BaseModule } from '../types/config';
|
|
10
|
-
export type { AdOptions } from '../modules/ads/
|
|
10
|
+
export type { AdOptions } from '../modules/ads/ads-module';
|
|
11
11
|
export type { AdType, AdEventType, Advertisement, AdSlot } from '../types/advertisement';
|
package/src/types/config.ts
CHANGED
|
@@ -24,17 +24,8 @@ export interface AdStageConfig {
|
|
|
24
24
|
/** 요청 타임아웃 (ms) */
|
|
25
25
|
timeout?: number;
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/** 네트워크 오류시 fallback 모드 사용 (기본값: true) */
|
|
31
|
-
fallbackMode?: boolean;
|
|
32
|
-
|
|
33
|
-
/** 오프라인 모드 (기본값: false) */
|
|
34
|
-
offlineMode?: boolean;
|
|
35
|
-
|
|
36
|
-
/** 프로덕션 모드 (엄격한 검증, 기본값: false) */
|
|
37
|
-
productionMode?: boolean;
|
|
27
|
+
/** 플레이스홀더 스타일 모드 (기본값: 'subtle') */
|
|
28
|
+
placeholderMode?: 'invisible' | 'transparent' | 'subtle' | 'minimal' | 'debug' | 'legacy';
|
|
38
29
|
}
|
|
39
30
|
|
|
40
31
|
/**
|
|
@@ -70,176 +61,3 @@ export interface OrganizationInfo {
|
|
|
70
61
|
slug: string;
|
|
71
62
|
settings: Record<string, any>;
|
|
72
63
|
}
|
|
73
|
-
|
|
74
|
-
// 메인 SDK 설정 (기존 호환성)
|
|
75
|
-
/**
|
|
76
|
-
* SDK 설정 (레거시)
|
|
77
|
-
*/
|
|
78
|
-
export interface SDKConfig {
|
|
79
|
-
clientId: string;
|
|
80
|
-
baseUrl: string;
|
|
81
|
-
debug?: boolean;
|
|
82
|
-
batchSize?: number;
|
|
83
|
-
retryCount?: number;
|
|
84
|
-
timeout?: number;
|
|
85
|
-
cache?: {
|
|
86
|
-
enabled: boolean;
|
|
87
|
-
maxSize?: number;
|
|
88
|
-
ttl?: number;
|
|
89
|
-
};
|
|
90
|
-
viewability?: {
|
|
91
|
-
threshold?: number;
|
|
92
|
-
minDuration?: number;
|
|
93
|
-
scrollDepthTracking?: boolean;
|
|
94
|
-
attentionTracking?: boolean;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// 환경별 설정
|
|
99
|
-
export interface EnvironmentConfig {
|
|
100
|
-
production: Partial<SDKConfig>;
|
|
101
|
-
development: Partial<SDKConfig>;
|
|
102
|
-
test: Partial<SDKConfig>;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// 로깅 설정
|
|
106
|
-
export interface LoggingConfig {
|
|
107
|
-
level: 'debug' | 'info' | 'warn' | 'error' | 'silent';
|
|
108
|
-
enableConsole?: boolean;
|
|
109
|
-
enableRemote?: boolean;
|
|
110
|
-
remoteEndpoint?: string;
|
|
111
|
-
maxLogSize?: number;
|
|
112
|
-
enablePerformanceLogs?: boolean;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// 뷰어빌리티 엔진 설정
|
|
116
|
-
export interface ViewabilityConfig {
|
|
117
|
-
threshold: number; // 0-1 (기본값: 0.5)
|
|
118
|
-
timeThreshold: number; // 밀리초 (기본값: 1000)
|
|
119
|
-
enableIABStandard?: boolean;
|
|
120
|
-
enableAttentionTracking?: boolean;
|
|
121
|
-
enableScrollTracking?: boolean;
|
|
122
|
-
intersectionThresholds?: number[];
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// 렌더링 엔진 설정
|
|
126
|
-
export interface RenderingConfig {
|
|
127
|
-
enableLazyLoading?: boolean;
|
|
128
|
-
lazyLoadThreshold?: number;
|
|
129
|
-
enableResponsive?: boolean;
|
|
130
|
-
breakpoints?: {
|
|
131
|
-
mobile: number;
|
|
132
|
-
tablet: number;
|
|
133
|
-
desktop: number;
|
|
134
|
-
};
|
|
135
|
-
enableAnimation?: boolean;
|
|
136
|
-
enableTemplating?: boolean;
|
|
137
|
-
templateEngine?: 'mustache' | 'handlebars' | 'custom';
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// 타겟팅 설정
|
|
141
|
-
export interface TargetingConfig {
|
|
142
|
-
enableGeoTargeting?: boolean;
|
|
143
|
-
enableDeviceTargeting?: boolean;
|
|
144
|
-
enableBehavioralTargeting?: boolean;
|
|
145
|
-
enableContextualTargeting?: boolean;
|
|
146
|
-
enableTimeTargeting?: boolean;
|
|
147
|
-
enableFrequencyCapping?: boolean;
|
|
148
|
-
maxFrequency?: number;
|
|
149
|
-
frequencyWindow?: number; // 시간 단위 (시간)
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// A/B 테스트 설정
|
|
153
|
-
export interface ABTestConfig {
|
|
154
|
-
enableABTesting?: boolean;
|
|
155
|
-
defaultVariant?: string;
|
|
156
|
-
variantSelection?: 'random' | 'hash' | 'user-agent';
|
|
157
|
-
persistVariant?: boolean;
|
|
158
|
-
variantStorageKey?: string;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// 스타일 설정
|
|
162
|
-
export interface StyleConfig {
|
|
163
|
-
enableCustomCSS?: boolean;
|
|
164
|
-
theme?: 'light' | 'dark' | 'auto';
|
|
165
|
-
borderRadius?: number;
|
|
166
|
-
shadows?: boolean;
|
|
167
|
-
animations?: {
|
|
168
|
-
fadeIn?: boolean;
|
|
169
|
-
slideIn?: boolean;
|
|
170
|
-
duration?: number;
|
|
171
|
-
easing?: string;
|
|
172
|
-
};
|
|
173
|
-
responsive?: {
|
|
174
|
-
mobile?: Partial<CSSStyleDeclaration>;
|
|
175
|
-
tablet?: Partial<CSSStyleDeclaration>;
|
|
176
|
-
desktop?: Partial<CSSStyleDeclaration>;
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// 통합 설정 (모든 설정 포함)
|
|
181
|
-
export interface AdstageConfig extends SDKConfig {
|
|
182
|
-
logging?: LoggingConfig;
|
|
183
|
-
viewability?: ViewabilityConfig;
|
|
184
|
-
rendering?: RenderingConfig;
|
|
185
|
-
targeting?: TargetingConfig;
|
|
186
|
-
abTest?: ABTestConfig;
|
|
187
|
-
styling?: StyleConfig;
|
|
188
|
-
environment?: keyof EnvironmentConfig;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// 설정 검증 결과
|
|
192
|
-
export interface ConfigValidationResult {
|
|
193
|
-
isValid: boolean;
|
|
194
|
-
errors: string[];
|
|
195
|
-
warnings: string[];
|
|
196
|
-
sanitizedConfig: AdstageConfig;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// 기본 설정 값들
|
|
200
|
-
export const DEFAULT_CONFIG: Required<SDKConfig> = {
|
|
201
|
-
clientId: '',
|
|
202
|
-
baseUrl: 'https://beta-api.adstage.app', // 현재 개발 단계에서는 베타 URL 사용
|
|
203
|
-
debug: false,
|
|
204
|
-
batchSize: 10,
|
|
205
|
-
retryCount: 3,
|
|
206
|
-
timeout: 10000,
|
|
207
|
-
|
|
208
|
-
cache: {
|
|
209
|
-
enabled: true,
|
|
210
|
-
maxSize: 100,
|
|
211
|
-
ttl: 300000,
|
|
212
|
-
},
|
|
213
|
-
|
|
214
|
-
viewability: {
|
|
215
|
-
threshold: 0.5,
|
|
216
|
-
minDuration: 1000,
|
|
217
|
-
scrollDepthTracking: true,
|
|
218
|
-
attentionTracking: true,
|
|
219
|
-
},
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
// 환경별 기본 설정
|
|
223
|
-
export const ENVIRONMENT_DEFAULTS: EnvironmentConfig = {
|
|
224
|
-
production: {
|
|
225
|
-
debug: false,
|
|
226
|
-
cache: {
|
|
227
|
-
enabled: true,
|
|
228
|
-
},
|
|
229
|
-
timeout: 10000,
|
|
230
|
-
},
|
|
231
|
-
development: {
|
|
232
|
-
debug: true,
|
|
233
|
-
cache: {
|
|
234
|
-
enabled: false,
|
|
235
|
-
},
|
|
236
|
-
timeout: 30000,
|
|
237
|
-
},
|
|
238
|
-
test: {
|
|
239
|
-
debug: false,
|
|
240
|
-
cache: {
|
|
241
|
-
enabled: false,
|
|
242
|
-
},
|
|
243
|
-
timeout: 5000,
|
|
244
|
-
},
|
|
245
|
-
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { AdEventType } from '../types/advertisement';
|
|
2
|
+
import type { AdSlot, Advertisement } from '../types/advertisement';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 광고 클릭 이벤트 핸들러 유틸리티
|
|
6
|
+
* 모든 광고 타입에서 일관된 클릭 이벤트 처리를 위한 공통 컴포넌트
|
|
7
|
+
*/
|
|
8
|
+
export class AdClickHandler {
|
|
9
|
+
/**
|
|
10
|
+
* 광고 요소에 클릭 이벤트를 추가하는 공통 함수
|
|
11
|
+
* @param element - 클릭 이벤트를 추가할 DOM 요소
|
|
12
|
+
* @param advertisement - 광고 데이터
|
|
13
|
+
* @param slot - 광고 슬롯 정보
|
|
14
|
+
* @param trackEventCallback - 이벤트 추적 콜백 함수
|
|
15
|
+
* @param debug - 디버그 모드
|
|
16
|
+
* @param adTypeLabel - 광고 타입 라벨 (로그용, 선택사항)
|
|
17
|
+
*/
|
|
18
|
+
static addClickEvent(
|
|
19
|
+
element: HTMLElement,
|
|
20
|
+
advertisement: Advertisement,
|
|
21
|
+
slot: AdSlot,
|
|
22
|
+
trackEventCallback: (adId: string, slotId: string, eventType: AdEventType) => void,
|
|
23
|
+
debug: boolean = false,
|
|
24
|
+
adTypeLabel?: string
|
|
25
|
+
): void {
|
|
26
|
+
// linkUrl이 없으면 클릭 이벤트 추가하지 않음
|
|
27
|
+
if (!advertisement.linkUrl) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// 커서 스타일 설정
|
|
32
|
+
element.style.cursor = 'pointer';
|
|
33
|
+
|
|
34
|
+
// 클릭 이벤트 리스너 추가
|
|
35
|
+
element.addEventListener('click', (e) => {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
e.stopPropagation();
|
|
38
|
+
|
|
39
|
+
// 이벤트 추적
|
|
40
|
+
if (trackEventCallback) {
|
|
41
|
+
trackEventCallback(advertisement._id, slot.id, AdEventType.CLICK);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// 링크 이동
|
|
45
|
+
window.open(advertisement.linkUrl!, '_blank');
|
|
46
|
+
|
|
47
|
+
// 디버그 로그
|
|
48
|
+
if (debug) {
|
|
49
|
+
const typeLabel = adTypeLabel || String(slot.adType).toLowerCase();
|
|
50
|
+
console.log(`🔗 ${typeLabel} ad clicked: ${advertisement._id} -> ${advertisement.linkUrl}`);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 렌더러에서 사용할 수 있는 간편한 클릭 이벤트 추가 함수
|
|
57
|
+
* BaseAdRenderer를 상속받은 클래스에서 사용
|
|
58
|
+
* @param element - 클릭 이벤트를 추가할 DOM 요소
|
|
59
|
+
* @param advertisement - 광고 데이터
|
|
60
|
+
* @param slot - 광고 슬롯 정보
|
|
61
|
+
* @param createEventTrackingCallback - 이벤트 추적 콜백 생성 함수
|
|
62
|
+
* @param debug - 디버그 모드
|
|
63
|
+
* @param adTypeLabel - 광고 타입 라벨 (로그용, 선택사항)
|
|
64
|
+
*/
|
|
65
|
+
static addClickEventForRenderer(
|
|
66
|
+
element: HTMLElement,
|
|
67
|
+
advertisement: Advertisement,
|
|
68
|
+
slot: AdSlot,
|
|
69
|
+
createEventTrackingCallback: () => (adId: string, slotId: string, eventType: AdEventType) => void,
|
|
70
|
+
debug: boolean = false,
|
|
71
|
+
adTypeLabel?: string
|
|
72
|
+
): void {
|
|
73
|
+
// linkUrl이 없으면 클릭 이벤트 추가하지 않음
|
|
74
|
+
if (!advertisement.linkUrl) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// 커서 스타일 설정
|
|
79
|
+
element.style.cursor = 'pointer';
|
|
80
|
+
|
|
81
|
+
// 클릭 이벤트 리스너 추가
|
|
82
|
+
element.addEventListener('click', (e) => {
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
e.stopPropagation();
|
|
85
|
+
|
|
86
|
+
// 이벤트 추적 콜백 생성
|
|
87
|
+
const trackEventCallback = createEventTrackingCallback();
|
|
88
|
+
trackEventCallback(advertisement._id, slot.id, AdEventType.CLICK);
|
|
89
|
+
|
|
90
|
+
// 링크 이동
|
|
91
|
+
window.open(advertisement.linkUrl!, '_blank');
|
|
92
|
+
|
|
93
|
+
// 디버그 로그
|
|
94
|
+
if (debug) {
|
|
95
|
+
const typeLabel = adTypeLabel || String(slot.adType).toLowerCase();
|
|
96
|
+
console.log(`🔗 ${typeLabel} ad clicked: ${advertisement._id} -> ${advertisement.linkUrl}`);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 슬라이더/매니저에서 사용할 수 있는 클릭 이벤트 추가 함수
|
|
103
|
+
* 이미 trackEventCallback이 준비된 상황에서 사용
|
|
104
|
+
* @param element - 클릭 이벤트를 추가할 DOM 요소
|
|
105
|
+
* @param advertisement - 광고 데이터
|
|
106
|
+
* @param slot - 광고 슬롯 정보
|
|
107
|
+
* @param trackEventCallback - 준비된 이벤트 추적 콜백
|
|
108
|
+
* @param debug - 디버그 모드
|
|
109
|
+
* @param adTypeLabel - 광고 타입 라벨 (로그용, 선택사항)
|
|
110
|
+
*/
|
|
111
|
+
static addClickEventForSlider(
|
|
112
|
+
element: HTMLElement,
|
|
113
|
+
advertisement: Advertisement,
|
|
114
|
+
slot: AdSlot,
|
|
115
|
+
trackEventCallback: (adId: string, slotId: string, eventType: AdEventType) => void,
|
|
116
|
+
debug: boolean = false,
|
|
117
|
+
adTypeLabel?: string
|
|
118
|
+
): void {
|
|
119
|
+
this.addClickEvent(element, advertisement, slot, trackEventCallback, debug, adTypeLabel);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* 클릭 가능한 광고인지 확인하는 헬퍼 함수
|
|
124
|
+
* @param advertisement - 광고 데이터
|
|
125
|
+
* @returns linkUrl이 있으면 true, 없으면 false
|
|
126
|
+
*/
|
|
127
|
+
static isClickable(advertisement: Advertisement): boolean {
|
|
128
|
+
return Boolean(advertisement.linkUrl);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* 여러 요소에 대해 일괄적으로 클릭 이벤트를 추가하는 함수
|
|
133
|
+
* @param elements - 클릭 이벤트를 추가할 DOM 요소들
|
|
134
|
+
* @param advertisements - 광고 데이터 배열 (elements와 같은 순서)
|
|
135
|
+
* @param slot - 광고 슬롯 정보
|
|
136
|
+
* @param trackEventCallback - 이벤트 추적 콜백
|
|
137
|
+
* @param debug - 디버그 모드
|
|
138
|
+
* @param adTypeLabel - 광고 타입 라벨 (로그용, 선택사항)
|
|
139
|
+
*/
|
|
140
|
+
static addClickEventsBatch(
|
|
141
|
+
elements: HTMLElement[],
|
|
142
|
+
advertisements: Advertisement[],
|
|
143
|
+
slot: AdSlot,
|
|
144
|
+
trackEventCallback: (adId: string, slotId: string, eventType: AdEventType) => void,
|
|
145
|
+
debug: boolean = false,
|
|
146
|
+
adTypeLabel?: string
|
|
147
|
+
): void {
|
|
148
|
+
elements.forEach((element, index) => {
|
|
149
|
+
const advertisement = advertisements[index];
|
|
150
|
+
if (advertisement) {
|
|
151
|
+
this.addClickEvent(element, advertisement, slot, trackEventCallback, debug, adTypeLabel);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 텍스트 광고 공통 유틸리티 함수들
|
|
3
|
+
*/
|
|
4
|
+
export class TextAdUtils {
|
|
5
|
+
/**
|
|
6
|
+
* 텍스트 광고의 기본 스타일을 생성
|
|
7
|
+
* @param isSimple 간단한 스타일 여부
|
|
8
|
+
* @returns CSS 스타일 문자열
|
|
9
|
+
*/
|
|
10
|
+
static createTextAdStyles(isSimple: boolean = false): string {
|
|
11
|
+
const baseStyles = `
|
|
12
|
+
font-family: 'Arial', sans-serif;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
display: block;
|
|
15
|
+
text-align: left;
|
|
16
|
+
transition: color 0.3s ease;
|
|
17
|
+
width: 100%;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
overflow: visible;
|
|
20
|
+
padding-right: 2px;
|
|
21
|
+
padding-left: 2px;
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
return baseStyles;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 텍스트 광고의 콘텐츠를 설정 (textContent 우선, 없으면 title)
|
|
30
|
+
* @param element 설정할 HTML 요소
|
|
31
|
+
* @param adData 광고 데이터
|
|
32
|
+
*/
|
|
33
|
+
static setTextAdContent(element: HTMLElement, adData: any): void {
|
|
34
|
+
const content = adData.textContent || adData.title || '';
|
|
35
|
+
element.textContent = content;
|
|
36
|
+
}
|
|
37
|
+
}
|
package/src/dummy/ads_dummy.json
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"_id": "68870e36bdfa1e6e54d108a5",
|
|
4
|
-
"title": "stageUp 입점 신청 - 수수료 할인 광고",
|
|
5
|
-
"description": "",
|
|
6
|
-
"adType": "BANNER",
|
|
7
|
-
"orgId": "c1cd5bb0-2f45-4e49-8e86-7ba653d3477c",
|
|
8
|
-
"textContent": "",
|
|
9
|
-
"imageUrl": "https://cmvn255e11092.edge.naverncp.com/d82ceba0-ce99-48e0-9a19-6a6c8792af31.png",
|
|
10
|
-
"videoUrl": "",
|
|
11
|
-
"linkUrl": "/partnership",
|
|
12
|
-
"startDate": "2025-07-28T00:00:00.000Z",
|
|
13
|
-
"endDate": "2025-12-31T00:00:00.000Z",
|
|
14
|
-
"status": "ACTIVE",
|
|
15
|
-
"order": 0,
|
|
16
|
-
"language": "ko",
|
|
17
|
-
"countries": [
|
|
18
|
-
"KR",
|
|
19
|
-
"US",
|
|
20
|
-
"JP",
|
|
21
|
-
"CN",
|
|
22
|
-
"DE",
|
|
23
|
-
"FR",
|
|
24
|
-
"GB",
|
|
25
|
-
"IT",
|
|
26
|
-
"ES",
|
|
27
|
-
"RU",
|
|
28
|
-
"ID",
|
|
29
|
-
"VN",
|
|
30
|
-
"TH",
|
|
31
|
-
"MY",
|
|
32
|
-
"SG",
|
|
33
|
-
"PH",
|
|
34
|
-
"IN",
|
|
35
|
-
"BR",
|
|
36
|
-
"CA",
|
|
37
|
-
"AU"
|
|
38
|
-
],
|
|
39
|
-
"deviceType": "DESKTOP",
|
|
40
|
-
"createdAt": "2025-07-28T05:44:22.999Z",
|
|
41
|
-
"updatedAt": "2025-07-28T05:45:12.589Z"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"_id": "68870edbbdfa1e6e54d10901",
|
|
45
|
-
"title": "Join stageUp Today! - 간편한 통합 절차",
|
|
46
|
-
"description": "",
|
|
47
|
-
"adType": "BANNER",
|
|
48
|
-
"orgId": "c1cd5bb0-2f45-4e49-8e86-7ba653d3477c",
|
|
49
|
-
"textContent": "",
|
|
50
|
-
"imageUrl": "https://cmvn255e11092.edge.naverncp.com/550849fd-9c25-4e15-bd0f-a3efd7cff617.webp",
|
|
51
|
-
"videoUrl": "",
|
|
52
|
-
"linkUrl": "https://www.stageup.store/",
|
|
53
|
-
"startDate": "2025-07-28T00:00:00.000Z",
|
|
54
|
-
"endDate": "2025-12-31T00:00:00.000Z",
|
|
55
|
-
"status": "ACTIVE",
|
|
56
|
-
"order": 1,
|
|
57
|
-
"language": "ko",
|
|
58
|
-
"countries": [
|
|
59
|
-
"KR",
|
|
60
|
-
"US",
|
|
61
|
-
"JP",
|
|
62
|
-
"CN",
|
|
63
|
-
"DE",
|
|
64
|
-
"FR",
|
|
65
|
-
"GB",
|
|
66
|
-
"IT",
|
|
67
|
-
"ES",
|
|
68
|
-
"RU",
|
|
69
|
-
"ID",
|
|
70
|
-
"VN",
|
|
71
|
-
"TH",
|
|
72
|
-
"MY",
|
|
73
|
-
"SG",
|
|
74
|
-
"PH",
|
|
75
|
-
"IN",
|
|
76
|
-
"BR",
|
|
77
|
-
"CA",
|
|
78
|
-
"AU"
|
|
79
|
-
],
|
|
80
|
-
"deviceType": "DESKTOP",
|
|
81
|
-
"createdAt": "2025-07-28T05:47:07.685Z",
|
|
82
|
-
"updatedAt": "2025-07-28T05:47:07.685Z"
|
|
83
|
-
}
|
|
84
|
-
]
|