@digia-engage/core 1.0.0-beta.5 → 1.0.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/DigiaEngageReactNative.podspec +12 -15
- package/README.md +8 -17
- package/android/.project +28 -0
- package/android/build.gradle +1 -1
- package/android/settings.gradle +1 -2
- package/android/src/main/java/com/digia/engage/rn/DigiaModule.kt +1 -1
- package/android/src/main/java/com/digia/engage/rn/DigiaSlotViewManager.kt +146 -31
- package/ios/DigiaEngageModule.m +1 -0
- package/ios/DigiaHostViewManager.swift +41 -17
- package/ios/DigiaModule.swift +55 -6
- package/ios/DigiaSlotViewManager.swift +190 -22
- package/ios/RNEventBridgePlugin.swift +10 -11
- package/lib/commonjs/Digia.js +50 -0
- package/lib/commonjs/Digia.js.map +1 -1
- package/lib/commonjs/DigiaHostView.js +4 -50
- package/lib/commonjs/DigiaHostView.js.map +1 -1
- package/lib/commonjs/DigiaSlotView.js +35 -53
- package/lib/commonjs/DigiaSlotView.js.map +1 -1
- package/lib/commonjs/NativeDigiaEngage.js.map +1 -1
- package/lib/module/Digia.js +50 -0
- package/lib/module/Digia.js.map +1 -1
- package/lib/module/DigiaHostView.js +4 -51
- package/lib/module/DigiaHostView.js.map +1 -1
- package/lib/module/DigiaSlotView.js +35 -51
- package/lib/module/DigiaSlotView.js.map +1 -1
- package/lib/module/NativeDigiaEngage.js.map +1 -1
- package/lib/typescript/Digia.d.ts +12 -0
- package/lib/typescript/Digia.d.ts.map +1 -1
- package/lib/typescript/DigiaHostView.d.ts +2 -29
- package/lib/typescript/DigiaHostView.d.ts.map +1 -1
- package/lib/typescript/DigiaSlotView.d.ts +3 -40
- package/lib/typescript/DigiaSlotView.d.ts.map +1 -1
- package/lib/typescript/NativeDigiaEngage.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +21 -0
- package/lib/typescript/types.d.ts.map +1 -1
- package/package.json +8 -18
- package/src/Digia.ts +60 -1
- package/src/DigiaHostView.tsx +5 -48
- package/src/DigiaSlotView.tsx +40 -48
- package/src/NativeDigiaEngage.ts +1 -0
- package/src/index.ts +1 -1
- package/src/types.ts +30 -0
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DigiaSlotViewManager
|
|
3
|
-
*
|
|
4
|
-
* React Native ViewManager that exposes a UIView wrapping DigiaSlot (from the
|
|
5
|
-
* Digia iOS SDK) as the native view behind the JS <DigiaSlotView> component.
|
|
6
|
-
*
|
|
7
|
-
* DigiaSlot is a SwiftUI view, so it is bridged into UIKit via a
|
|
8
|
-
* UIHostingController. The placementKey prop is forwarded to the SwiftUI
|
|
9
|
-
* view via a StateObject/ObservableObject binding.
|
|
10
|
-
*
|
|
11
|
-
* Supported JS props:
|
|
12
|
-
* - `placementKey` (String) — matches the placement key set in the Digia dashboard.
|
|
13
|
-
*/
|
|
14
1
|
import SwiftUI
|
|
15
2
|
import React
|
|
16
3
|
import DigiaEngage
|
|
@@ -24,8 +11,6 @@ final class DigiaSlotViewManager: RCTViewManager {
|
|
|
24
11
|
return DigiaSlotUIView()
|
|
25
12
|
}
|
|
26
13
|
|
|
27
|
-
// ── prop setter wired by ObjC runtime via RCT_EXPORT_VIEW_PROPERTY ────────
|
|
28
|
-
// The @objc name must match the RCT_EXPORT_VIEW_PROPERTY in the .m file.
|
|
29
14
|
@objc func setPlacementKey(_ placementKey: String, forView view: DigiaSlotUIView) {
|
|
30
15
|
view.placementKey = placementKey
|
|
31
16
|
}
|
|
@@ -37,60 +22,180 @@ final class DigiaSlotViewManager: RCTViewManager {
|
|
|
37
22
|
/// Re-creates the SwiftUI view when placementKey changes.
|
|
38
23
|
final class DigiaSlotUIView: UIView {
|
|
39
24
|
|
|
25
|
+
override init(frame: CGRect) {
|
|
26
|
+
super.init(frame: frame)
|
|
27
|
+
clipsToBounds = false
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
required init?(coder: NSCoder) {
|
|
31
|
+
super.init(coder: coder)
|
|
32
|
+
clipsToBounds = false
|
|
33
|
+
}
|
|
34
|
+
|
|
40
35
|
@objc var placementKey: String = "" {
|
|
41
36
|
didSet {
|
|
42
37
|
guard placementKey != oldValue else { return }
|
|
38
|
+
lastReportedHeight = -.infinity
|
|
43
39
|
remount()
|
|
44
40
|
}
|
|
45
41
|
}
|
|
46
42
|
|
|
47
|
-
|
|
43
|
+
/// Fired when SwiftUI slot content intrinsic height changes (parity with Android `onContentSizeChange`).
|
|
44
|
+
@objc var onContentSizeChange: RCTDirectEventBlock?
|
|
45
|
+
|
|
46
|
+
private var hostingController: SlotHostingController<DigiaSlotWrapperView>?
|
|
47
|
+
private var lastReportedHeight: CGFloat = -.infinity
|
|
48
|
+
private var delegateProxiesInstalled = false
|
|
48
49
|
|
|
49
50
|
override func didMoveToWindow() {
|
|
50
51
|
super.didMoveToWindow()
|
|
51
52
|
if window != nil {
|
|
52
53
|
if hostingController == nil { remount() }
|
|
54
|
+
// Deferred so the full RN view hierarchy (including the Fabric
|
|
55
|
+
// surface root with RCTSurfaceTouchHandler) is established.
|
|
56
|
+
DispatchQueue.main.async { [weak self] in
|
|
57
|
+
self?.installDelegateProxiesIfNeeded()
|
|
58
|
+
}
|
|
53
59
|
} else {
|
|
54
60
|
teardown()
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
63
|
|
|
64
|
+
override func layoutSubviews() {
|
|
65
|
+
super.layoutSubviews()
|
|
66
|
+
emitContentSizeIfNeeded()
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// -- Touch handling -------------------------------------------------------
|
|
70
|
+
// RCTSurfaceTouchHandler claims touches before SwiftUI can handle them.
|
|
71
|
+
// RCTTouchDelegateProxy wraps its delegate and blocks touches that land
|
|
72
|
+
// within a registered hosting view, so SwiftUI gestures fire normally.
|
|
73
|
+
|
|
74
|
+
/// Expand the tappable area to include the hosting view when it overflows self.bounds.
|
|
75
|
+
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
|
|
76
|
+
if super.point(inside: point, with: event) { return true }
|
|
77
|
+
guard let hcView = hostingController?.view else { return false }
|
|
78
|
+
let converted = convert(point, to: hcView)
|
|
79
|
+
return hcView.point(inside: converted, with: event)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/// Forward hit-testing to SwiftUI view hierarchy even outside self.bounds.
|
|
83
|
+
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
|
84
|
+
guard let hcView = hostingController?.view, isUserInteractionEnabled, !isHidden, alpha > 0.01 else {
|
|
85
|
+
return super.hitTest(point, with: event)
|
|
86
|
+
}
|
|
87
|
+
let converted = convert(point, to: hcView)
|
|
88
|
+
if let target = hcView.hitTest(converted, with: event) {
|
|
89
|
+
return target
|
|
90
|
+
}
|
|
91
|
+
return super.hitTest(point, with: event)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/// Walk ancestors to find RCT touch handlers and install the delegate proxy.
|
|
95
|
+
private func installDelegateProxiesIfNeeded() {
|
|
96
|
+
guard !delegateProxiesInstalled, let hcView = hostingController?.view else { return }
|
|
97
|
+
delegateProxiesInstalled = true
|
|
98
|
+
|
|
99
|
+
RCTTouchDelegateProxy.registerHostingView(hcView)
|
|
100
|
+
|
|
101
|
+
var ancestor: UIView? = superview
|
|
102
|
+
while let v = ancestor {
|
|
103
|
+
for gr in v.gestureRecognizers ?? [] {
|
|
104
|
+
let name = String(describing: type(of: gr))
|
|
105
|
+
if name.hasPrefix("RCT"), name.lowercased().contains("touch") {
|
|
106
|
+
RCTTouchDelegateProxy.installIfNeeded(on: gr)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
ancestor = v.superview
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
58
113
|
private func remount() {
|
|
59
114
|
teardown()
|
|
60
115
|
guard window != nil, !placementKey.isEmpty else { return }
|
|
61
116
|
guard let parentVC = parentViewController() else { return }
|
|
62
117
|
|
|
63
118
|
let swiftUIView = DigiaSlotWrapperView(placementKey: placementKey)
|
|
64
|
-
let hc =
|
|
119
|
+
let hc = SlotHostingController(rootView: swiftUIView)
|
|
120
|
+
hc.sizingOptions = .intrinsicContentSize
|
|
65
121
|
hc.view.translatesAutoresizingMaskIntoConstraints = false
|
|
66
122
|
hc.view.backgroundColor = .clear
|
|
123
|
+
hc.onLayoutChange = { [weak self] in
|
|
124
|
+
self?.emitContentSizeIfNeeded()
|
|
125
|
+
}
|
|
67
126
|
|
|
68
127
|
parentVC.addChild(hc)
|
|
69
128
|
addSubview(hc.view)
|
|
70
129
|
hc.didMove(toParent: parentVC)
|
|
71
130
|
|
|
131
|
+
// No bottom constraint — lets SwiftUI report intrinsic height via onContentSizeChange.
|
|
72
132
|
NSLayoutConstraint.activate([
|
|
73
133
|
hc.view.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
74
134
|
hc.view.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
75
135
|
hc.view.topAnchor.constraint(equalTo: topAnchor),
|
|
76
|
-
hc.view.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
77
136
|
])
|
|
78
137
|
|
|
79
138
|
hostingController = hc
|
|
139
|
+
DispatchQueue.main.async { [weak self] in
|
|
140
|
+
self?.emitContentSizeIfNeeded()
|
|
141
|
+
}
|
|
80
142
|
}
|
|
81
143
|
|
|
82
144
|
private func teardown() {
|
|
145
|
+
if let hcView = hostingController?.view {
|
|
146
|
+
RCTTouchDelegateProxy.unregisterHostingView(hcView)
|
|
147
|
+
}
|
|
148
|
+
delegateProxiesInstalled = false
|
|
149
|
+
|
|
83
150
|
hostingController?.willMove(toParent: nil)
|
|
84
151
|
hostingController?.view.removeFromSuperview()
|
|
85
152
|
hostingController?.removeFromParent()
|
|
86
153
|
hostingController = nil
|
|
154
|
+
lastReportedHeight = -.infinity
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/// Emit content height to JS so it can resize the RN wrapper.
|
|
158
|
+
private func emitContentSizeIfNeeded() {
|
|
159
|
+
guard let hc = hostingController, let block = onContentSizeChange else { return }
|
|
160
|
+
let width = bounds.width
|
|
161
|
+
guard width > 0 else { return }
|
|
162
|
+
|
|
163
|
+
hc.view.layoutIfNeeded()
|
|
164
|
+
let intrinsic = hc.view.intrinsicContentSize.height
|
|
165
|
+
let height: CGFloat
|
|
166
|
+
if intrinsic.isFinite, intrinsic > 0, intrinsic != UIView.noIntrinsicMetric {
|
|
167
|
+
height = intrinsic
|
|
168
|
+
} else {
|
|
169
|
+
height = hc.view.systemLayoutSizeFitting(
|
|
170
|
+
CGSize(width: width, height: UIView.layoutFittingCompressedSize.height),
|
|
171
|
+
withHorizontalFittingPriority: .required,
|
|
172
|
+
verticalFittingPriority: .fittingSizeLevel
|
|
173
|
+
).height
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if abs(height - lastReportedHeight) < 0.5 { return }
|
|
177
|
+
lastReportedHeight = height
|
|
178
|
+
block(["height": height as NSNumber])
|
|
87
179
|
}
|
|
88
180
|
|
|
181
|
+
/// Walk the view hierarchy to find the nearest UIViewController.
|
|
89
182
|
private func parentViewController() -> UIViewController? {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
183
|
+
let reactSel = NSSelectorFromString("reactViewController")
|
|
184
|
+
var view: UIView? = self
|
|
185
|
+
while let v = view {
|
|
186
|
+
if v.responds(to: reactSel), let raw = v.perform(reactSel)?.takeUnretainedValue() {
|
|
187
|
+
if let vc = raw as? UIViewController { return vc }
|
|
188
|
+
}
|
|
189
|
+
view = v.superview
|
|
190
|
+
}
|
|
191
|
+
view = self
|
|
192
|
+
while let v = view {
|
|
193
|
+
var r: UIResponder? = v.next
|
|
194
|
+
while let responder = r {
|
|
195
|
+
if let vc = responder as? UIViewController { return vc }
|
|
196
|
+
r = responder.next
|
|
197
|
+
}
|
|
198
|
+
view = v.superview
|
|
94
199
|
}
|
|
95
200
|
return nil
|
|
96
201
|
}
|
|
@@ -105,3 +210,66 @@ private struct DigiaSlotWrapperView: View {
|
|
|
105
210
|
DigiaSlot(placementKey)
|
|
106
211
|
}
|
|
107
212
|
}
|
|
213
|
+
|
|
214
|
+
// MARK: - Hosting controller subclass
|
|
215
|
+
|
|
216
|
+
/// Overrides `viewDidLayoutSubviews` so that SwiftUI content size changes
|
|
217
|
+
/// (e.g. campaign arriving into `InlineCampaignController`) propagate back
|
|
218
|
+
/// to the UIKit `DigiaSlotUIView` which reports the new height to RN.
|
|
219
|
+
private final class SlotHostingController<Content: View>: UIHostingController<Content> {
|
|
220
|
+
var onLayoutChange: (() -> Void)?
|
|
221
|
+
|
|
222
|
+
override func viewDidLayoutSubviews() {
|
|
223
|
+
super.viewDidLayoutSubviews()
|
|
224
|
+
onLayoutChange?()
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// MARK: - RCT touch delegate proxy
|
|
229
|
+
|
|
230
|
+
private final class RCTTouchDelegateProxy: NSObject, UIGestureRecognizerDelegate {
|
|
231
|
+
|
|
232
|
+
private static let hostingViews = NSHashTable<UIView>.weakObjects()
|
|
233
|
+
private static let proxies = NSMapTable<UIGestureRecognizer, RCTTouchDelegateProxy>.weakToStrongObjects()
|
|
234
|
+
|
|
235
|
+
static func registerHostingView(_ view: UIView) {
|
|
236
|
+
hostingViews.add(view)
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
static func unregisterHostingView(_ view: UIView) {
|
|
240
|
+
hostingViews.remove(view)
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
static func installIfNeeded(on gr: UIGestureRecognizer) {
|
|
244
|
+
guard proxies.object(forKey: gr) == nil else { return }
|
|
245
|
+
let proxy = RCTTouchDelegateProxy()
|
|
246
|
+
proxy.originalDelegate = gr.delegate
|
|
247
|
+
gr.delegate = proxy
|
|
248
|
+
proxies.setObject(proxy, forKey: gr)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
weak var originalDelegate: UIGestureRecognizerDelegate?
|
|
252
|
+
|
|
253
|
+
func gestureRecognizer(_ gr: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
|
|
254
|
+
if let touchView = touch.view {
|
|
255
|
+
for hv in Self.hostingViews.allObjects {
|
|
256
|
+
if touchView === hv || touchView.isDescendant(of: hv) {
|
|
257
|
+
return false
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return originalDelegate?.gestureRecognizer?(gr, shouldReceive: touch) ?? true
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
override func responds(to aSelector: Selector!) -> Bool {
|
|
265
|
+
if super.responds(to: aSelector) { return true }
|
|
266
|
+
return originalDelegate?.responds(to: aSelector) ?? false
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
override func forwardingTarget(for aSelector: Selector!) -> Any? {
|
|
270
|
+
if let original = originalDelegate, original.responds(to: aSelector) {
|
|
271
|
+
return original
|
|
272
|
+
}
|
|
273
|
+
return super.forwardingTarget(for: aSelector)
|
|
274
|
+
}
|
|
275
|
+
}
|
|
@@ -41,21 +41,20 @@ internal final class RNEventBridgePlugin: NSObject, DigiaCEPPlugin {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
func notifyEvent(_ event: DigiaExperienceEvent, payload: InAppPayload) {
|
|
44
|
-
|
|
44
|
+
|
|
45
|
+
var body: [String: Any] = ["campaignId": payload.id]
|
|
45
46
|
switch event {
|
|
46
47
|
case .impressed:
|
|
47
|
-
|
|
48
|
-
case .clicked:
|
|
49
|
-
|
|
48
|
+
body["type"] = "impressed"
|
|
49
|
+
case .clicked(let elementID):
|
|
50
|
+
body["type"] = "clicked"
|
|
51
|
+
if let elementID {
|
|
52
|
+
body["elementId"] = elementID
|
|
53
|
+
}
|
|
50
54
|
case .dismissed:
|
|
51
|
-
|
|
55
|
+
body["type"] = "dismissed"
|
|
52
56
|
}
|
|
53
|
-
|
|
54
|
-
let body: [String: Any] = [
|
|
55
|
-
"id": payload.id,
|
|
56
|
-
"type": payload.content.type,
|
|
57
|
-
]
|
|
58
|
-
eventEmitter?.sendEvent(withName: eventName, body: body)
|
|
57
|
+
eventEmitter?.sendEvent(withName: "digiaEngageEvent", body: body)
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
func healthCheck() -> DiagnosticReport {
|
package/lib/commonjs/Digia.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Digia = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
7
8
|
var _NativeDigiaEngage = require("./NativeDigiaEngage");
|
|
8
9
|
/**
|
|
9
10
|
* High-level Digia Engage SDK wrapper.
|
|
@@ -27,6 +28,10 @@ class DigiaClass {
|
|
|
27
28
|
// Tracks whether the native bridge plugin (RNEventBridgePlugin) has been
|
|
28
29
|
// wired to the native SDK. Done once on the first Digia.register() call.
|
|
29
30
|
_nativeBridgeWired = false;
|
|
31
|
+
// Cache of triggered payloads keyed by campaign ID, used to reconstruct
|
|
32
|
+
// the full InAppPayload when overlay lifecycle events arrive from native.
|
|
33
|
+
_activePayloads = new Map();
|
|
34
|
+
_engageSubscription = null;
|
|
30
35
|
|
|
31
36
|
/**
|
|
32
37
|
* Initialise the Digia Engage SDK.
|
|
@@ -63,6 +68,7 @@ class DigiaClass {
|
|
|
63
68
|
// so the delegate is ready when JS campaigns start flowing.
|
|
64
69
|
if (!this._nativeBridgeWired) {
|
|
65
70
|
_NativeDigiaEngage.nativeDigiaModule.registerBridge();
|
|
71
|
+
this._startEngageListener();
|
|
66
72
|
this._nativeBridgeWired = true;
|
|
67
73
|
}
|
|
68
74
|
plugin.setup(this);
|
|
@@ -96,11 +102,55 @@ class DigiaClass {
|
|
|
96
102
|
// Forwards to the native DigiaCEPDelegate via the bridge.
|
|
97
103
|
|
|
98
104
|
onCampaignTriggered(payload) {
|
|
105
|
+
this._activePayloads.set(payload.id, payload);
|
|
99
106
|
_NativeDigiaEngage.nativeDigiaModule.triggerCampaign(payload.id, payload.content, payload.cepContext);
|
|
100
107
|
}
|
|
101
108
|
onCampaignInvalidated(campaignId) {
|
|
109
|
+
this._activePayloads.delete(campaignId);
|
|
102
110
|
_NativeDigiaEngage.nativeDigiaModule.invalidateCampaign(campaignId);
|
|
103
111
|
}
|
|
112
|
+
|
|
113
|
+
// ── Overlay event forwarding ─────────────────────────────────────────────
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Subscribes to `digiaOverlayEvent` emitted by the native
|
|
117
|
+
* RNEventBridgePlugin when the Compose overlay fires a lifecycle event
|
|
118
|
+
* (impressed / clicked / dismissed).
|
|
119
|
+
*
|
|
120
|
+
* Each event is forwarded to every registered plugin's notifyEvent() so
|
|
121
|
+
* that CEP plugins (e.g. WebEngagePlugin) can report analytics.
|
|
122
|
+
*/
|
|
123
|
+
_startEngageListener() {
|
|
124
|
+
if (this._engageSubscription) return;
|
|
125
|
+
this._engageSubscription = _reactNative.DeviceEventEmitter.addListener('digiaEngageEvent', data => this._forwardExperienceEvent(data));
|
|
126
|
+
}
|
|
127
|
+
_forwardExperienceEvent(data) {
|
|
128
|
+
const payload = this._activePayloads.get(data.campaignId);
|
|
129
|
+
if (!payload) return;
|
|
130
|
+
let event;
|
|
131
|
+
switch (data.type) {
|
|
132
|
+
case 'impressed':
|
|
133
|
+
event = {
|
|
134
|
+
type: 'impressed'
|
|
135
|
+
};
|
|
136
|
+
break;
|
|
137
|
+
case 'clicked':
|
|
138
|
+
event = {
|
|
139
|
+
type: 'clicked',
|
|
140
|
+
elementId: data.elementId
|
|
141
|
+
};
|
|
142
|
+
break;
|
|
143
|
+
case 'dismissed':
|
|
144
|
+
event = {
|
|
145
|
+
type: 'dismissed'
|
|
146
|
+
};
|
|
147
|
+
this._activePayloads.delete(data.campaignId);
|
|
148
|
+
break;
|
|
149
|
+
default:
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
this._plugins.forEach(plugin => plugin.notifyEvent(event, payload));
|
|
153
|
+
}
|
|
104
154
|
}
|
|
105
155
|
const Digia = exports.Digia = new DigiaClass();
|
|
106
156
|
//# sourceMappingURL=Digia.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_NativeDigiaEngage","DigiaClass","_plugins","Map","_nativeBridgeWired","_activePayloads","_engageSubscription","initialize","config","environment","logLevel","nativeDigiaModule","apiKey","register","plugin","has","identifier","get","teardown","registerBridge","_startEngageListener","setup","set","unregister","pluginOrId","id","delete","setCurrentScreen","name","forEach","forwardScreen","onCampaignTriggered","payload","triggerCampaign","content","cepContext","onCampaignInvalidated","campaignId","invalidateCampaign","DeviceEventEmitter","addListener","data","_forwardExperienceEvent","event","type","elementId","notifyEvent","Digia","exports"],"sourceRoot":"../../src","sources":["Digia.ts"],"mappings":";;;;;;AAiBA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,MAAME,UAAU,CAA0B;EACrBC,QAAQ,GAAG,IAAIC,GAAG,CAAsB,CAAC;EAC1D;EACA;EACQC,kBAAkB,GAAG,KAAK;EAClC;EACA;EACiBC,eAAe,GAAG,IAAIF,GAAG,CAAuB,CAAC;EAC1DG,mBAAmB,GAA8B,IAAI;;EAE7D;AACJ;AACA;AACA;AACA;AACA;EACI,MAAMC,UAAUA,CAACC,MAAmB,EAAiB;IACjD,MAAMC,WAAW,GAAGD,MAAM,CAACC,WAAW,IAAI,YAAY;IACtD,MAAMC,QAAQ,GAAGF,MAAM,CAACE,QAAQ,IAAI,OAAO;IAC3C,MAAMC,oCAAiB,CAACJ,UAAU,CAACC,MAAM,CAACI,MAAM,EAAEH,WAAW,EAAEC,QAAQ,CAAC;EAC5E;;EAEA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AAAC,OAAA,CAAAD,KAAA,GAAG,IAAI9C,UAAU,CAAC,CAAC","ignoreList":[]}
|
|
@@ -10,66 +10,20 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
10
10
|
/**
|
|
11
11
|
* DigiaHostView
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* ─── Usage ───────────────────────────────────────────────────────────────────
|
|
17
|
-
* Place `<DigiaHostView>` at the **root** of your component tree so that
|
|
18
|
-
* Digia dialogs and bottom sheets can stack on top of all your content.
|
|
19
|
-
*
|
|
20
|
-
* ```tsx
|
|
21
|
-
* import React from 'react';
|
|
22
|
-
* import { StyleSheet, View } from 'react-native';
|
|
23
|
-
* import { DigiaHostView } from '@digia/engage-react-native';
|
|
24
|
-
*
|
|
25
|
-
* export default function App() {
|
|
26
|
-
* return (
|
|
27
|
-
* <View style={styles.root}>
|
|
28
|
-
* <DigiaHostView style={StyleSheet.absoluteFill} />
|
|
29
|
-
* {/ * your navigation / app content here * /}
|
|
30
|
-
* </View>
|
|
31
|
-
* );
|
|
32
|
-
* }
|
|
33
|
-
*
|
|
34
|
-
* const styles = StyleSheet.create({ root: { flex: 1 } });
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* On Android this mounts a Jetpack Compose `DigiaHost` composable that
|
|
38
|
-
* manages dialog + bottom-sheet presentation triggered by CEP plugins.
|
|
39
|
-
* On iOS this mounts a SwiftUI `DigiaHost` via UIHostingController that
|
|
40
|
-
* manages the same overlay layer above React Native content.
|
|
41
|
-
* ─────────────────────────────────────────────────────────────────────────────
|
|
13
|
+
* Transparent full-screen overlay that hosts Digia dialogs and bottom sheets.
|
|
14
|
+
* Place at the root of your component tree so overlays stack above all content.
|
|
42
15
|
*/
|
|
43
16
|
|
|
44
|
-
// requireNativeComponent expects a plain ViewStyle, not StyleProp.
|
|
45
|
-
|
|
46
|
-
// Fabric (New Architecture) resolves view configs lazily — no UIManager
|
|
47
|
-
// guard needed. requireNativeComponent is called unconditionally on iOS and Android.
|
|
48
17
|
const NativeDigiaHostView = _reactNative.Platform.OS === 'android' || _reactNative.Platform.OS === 'ios' ? (0, _reactNative.requireNativeComponent)('DigiaHostView') : null;
|
|
49
|
-
|
|
50
|
-
// ── DigiaHostView ─────────────────────────────────────────────────────────────
|
|
51
|
-
|
|
52
18
|
function DigiaHostView({
|
|
53
19
|
style
|
|
54
20
|
}) {
|
|
55
21
|
if ((_reactNative.Platform.OS === 'android' || _reactNative.Platform.OS === 'ios') && NativeDigiaHostView) {
|
|
56
|
-
// The native DigiaHost (Compose on Android, SwiftUI on iOS) renders
|
|
57
|
-
// dialogs / bottom sheets that float above the view hierarchy on their
|
|
58
|
-
// own — the host view only needs to be mounted in the tree, not take up
|
|
59
|
-
// any screen space.
|
|
60
22
|
return /*#__PURE__*/_react.default.createElement(NativeDigiaHostView, {
|
|
61
|
-
|
|
23
|
+
pointerEvents: "none",
|
|
24
|
+
style: _reactNative.StyleSheet.flatten([_reactNative.StyleSheet.absoluteFillObject, style])
|
|
62
25
|
});
|
|
63
26
|
}
|
|
64
|
-
|
|
65
|
-
// Other platforms: no-op.
|
|
66
27
|
return null;
|
|
67
28
|
}
|
|
68
|
-
const styles = _reactNative.StyleSheet.create({
|
|
69
|
-
host: {
|
|
70
|
-
width: 0,
|
|
71
|
-
height: 0,
|
|
72
|
-
overflow: 'hidden'
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
29
|
//# sourceMappingURL=DigiaHostView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","e","__esModule","default","NativeDigiaHostView","Platform","OS","requireNativeComponent","DigiaHostView","style","createElement","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","e","__esModule","default","NativeDigiaHostView","Platform","OS","requireNativeComponent","DigiaHostView","style","createElement","pointerEvents","StyleSheet","flatten","absoluteFillObject"],"sourceRoot":"../../src","sources":["DigiaHostView.tsx"],"mappings":";;;;;;AAOA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMsB,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAdtB;AACA;AACA;AACA;AACA;AACA;;AAoBA,MAAMG,mBAAmB,GACrBC,qBAAQ,CAACC,EAAE,KAAK,SAAS,IAAID,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAC5C,IAAAC,mCAAsB,EAA2B,eAAe,CAAC,GACjE,IAAI;AAEP,SAASC,aAAaA,CAAC;EAAEC;AAA0B,CAAC,EAAE;EACzD,IAAI,CAACJ,qBAAQ,CAACC,EAAE,KAAK,SAAS,IAAID,qBAAQ,CAACC,EAAE,KAAK,KAAK,KAAKF,mBAAmB,EAAE;IAC7E,oBACIP,MAAA,CAAAM,OAAA,CAAAO,aAAA,CAACN,mBAAmB;MAChBO,aAAa,EAAC,MAAM;MACpBF,KAAK,EAAEG,uBAAU,CAACC,OAAO,CAAC,CAACD,uBAAU,CAACE,kBAAkB,EAAEL,KAAK,CAAC;IAAE,CACrE,CAAC;EAEV;EAEA,OAAO,IAAI;AACf","ignoreList":[]}
|
|
@@ -4,71 +4,53 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DigiaSlotView = DigiaSlotView;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
function
|
|
10
|
-
/**
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } /**
|
|
11
11
|
* DigiaSlotView
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* On Android this mounts a Jetpack Compose `DigiaSlot` composable that
|
|
17
|
-
* observes the slot payload for the given placement key and renders the
|
|
18
|
-
* matching campaign component. On iOS this mounts the equivalent SwiftUI
|
|
19
|
-
* `DigiaSlot` view via UIHostingController.
|
|
20
|
-
*
|
|
21
|
-
* ─── Usage ───────────────────────────────────────────────────────────────────
|
|
22
|
-
* ```tsx
|
|
23
|
-
* import { DigiaSlotView } from '@digia/engage-react-native';
|
|
24
|
-
*
|
|
25
|
-
* // Fixed height (you control the space)
|
|
26
|
-
* <DigiaSlotView
|
|
27
|
-
* placementKey="hero_banner"
|
|
28
|
-
* style={{ width: '100%', height: 200 }}
|
|
29
|
-
* />
|
|
30
|
-
*
|
|
31
|
-
* // Inside a scroll view
|
|
32
|
-
* <ScrollView>
|
|
33
|
-
* <ProductList />
|
|
34
|
-
* <DigiaSlotView
|
|
35
|
-
* placementKey="pdp_mid_banner"
|
|
36
|
-
* style={{ width: '100%', height: 120 }}
|
|
37
|
-
* />
|
|
38
|
-
* <RelatedProducts />
|
|
39
|
-
* </ScrollView>
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* The `placementKey` must match the key the marketer selects when creating
|
|
43
|
-
* inline content on the Digia dashboard. The view collapses to nothing when
|
|
44
|
-
* no campaign is active for that key.
|
|
45
|
-
*
|
|
46
|
-
* ─── Sizing ──────────────────────────────────────────────────────────────────
|
|
47
|
-
* React Native's layout system controls the dimensions of this view.
|
|
48
|
-
* Provide an explicit `height` (or flex) via the `style` prop so that the
|
|
49
|
-
* native Compose layer has space to render. When no campaign is active the
|
|
50
|
-
* Compose `DigiaSlot` renders nothing inside that space.
|
|
51
|
-
* ─────────────────────────────────────────────────────────────────────────────
|
|
13
|
+
* Renders inline campaign content at a placement position.
|
|
14
|
+
* Auto-sizes to match native content height via `onContentSizeChange`;
|
|
15
|
+
* pass an explicit `height` in `style` to fix the size instead.
|
|
52
16
|
*/
|
|
53
|
-
|
|
54
|
-
// Fabric (New Architecture) resolves view configs lazily — no UIManager
|
|
55
|
-
// guard needed. requireNativeComponent is called unconditionally on iOS and Android.
|
|
56
17
|
const NativeDigiaSlotView = _reactNative.Platform.OS === 'android' || _reactNative.Platform.OS === 'ios' ? (0, _reactNative.requireNativeComponent)('DigiaSlotView') : null;
|
|
57
|
-
|
|
58
|
-
// ── DigiaSlotView ─────────────────────────────────────────────────────────────
|
|
59
|
-
|
|
60
18
|
function DigiaSlotView({
|
|
61
19
|
placementKey,
|
|
62
20
|
style
|
|
63
21
|
}) {
|
|
22
|
+
const [contentHeight, setContentHeight] = (0, _react.useState)(0);
|
|
23
|
+
const onContentSizeChange = (0, _react.useCallback)(event => {
|
|
24
|
+
const h = event.nativeEvent.height ?? 0;
|
|
25
|
+
setContentHeight(Math.max(0, h));
|
|
26
|
+
}, []);
|
|
64
27
|
if ((_reactNative.Platform.OS === 'android' || _reactNative.Platform.OS === 'ios') && NativeDigiaSlotView) {
|
|
65
|
-
|
|
28
|
+
const flatStyle = _reactNative.StyleSheet.flatten(style) || {};
|
|
29
|
+
const hasExplicitHeight = flatStyle.height !== undefined;
|
|
30
|
+
if (hasExplicitHeight) {
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(NativeDigiaSlotView, _extends({
|
|
32
|
+
placementKey: placementKey,
|
|
33
|
+
style: [{
|
|
34
|
+
width: '100%'
|
|
35
|
+
}, style]
|
|
36
|
+
}, _reactNative.Platform.OS === 'android' ? {
|
|
37
|
+
collapsable: false
|
|
38
|
+
} : {}));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// 1dp bootstrap ensures a real layout pass before any campaign arrives.
|
|
42
|
+
const bootstrapHeight = Math.max(contentHeight, 1);
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(NativeDigiaSlotView, _extends({
|
|
66
44
|
placementKey: placementKey,
|
|
67
|
-
style:
|
|
68
|
-
|
|
45
|
+
style: [{
|
|
46
|
+
width: '100%',
|
|
47
|
+
height: bootstrapHeight
|
|
48
|
+
}, style],
|
|
49
|
+
onContentSizeChange: onContentSizeChange
|
|
50
|
+
}, _reactNative.Platform.OS === 'android' ? {
|
|
51
|
+
collapsable: false
|
|
52
|
+
} : {}));
|
|
69
53
|
}
|
|
70
|
-
|
|
71
|
-
// Other platforms: not yet implemented — render nothing.
|
|
72
54
|
return null;
|
|
73
55
|
}
|
|
74
56
|
//# sourceMappingURL=DigiaSlotView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","NativeDigiaSlotView","Platform","OS","requireNativeComponent","DigiaSlotView","placementKey","style","contentHeight","setContentHeight","useState","onContentSizeChange","useCallback","event","h","nativeEvent","height","Math","max","flatStyle","StyleSheet","flatten","hasExplicitHeight","undefined","createElement","width","collapsable","bootstrapHeight"],"sourceRoot":"../../src","sources":["DigiaSlotView.tsx"],"mappings":";;;;;;AAQA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMsB,SAAAD,wBAAAG,CAAA,EAAAC,CA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,CAC/D,CAAC;IAEV;;IAEA;IACA,MAAMC,eAAe,GAAGV,IAAI,CAACC,GAAG,CAACV,aAAa,EAAE,CAAC,CAAC;IAElD,oBACIpC,MAAA,CAAAc,OAAA,CAAAsC,aAAA,CAACvB,mBAAmB,EAAAN,QAAA;MAChBW,YAAY,EAAEA,YAAa;MAC3BC,KAAK,EAAE,CAAC;QAAEkB,KAAK,EAAE,MAAM;QAAET,MAAM,EAAEW;MAAgB,CAAC,EAAEpB,KAAK,CAAE;MAC3DI,mBAAmB,EAAEA;IAAoB,GACpCT,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAG;MAAEuB,WAAW,EAAE;IAAM,CAAC,GAAG,CAAC,CAAC,CAC/D,CAAC;EAEV;EAEA,OAAO,IAAI;AACf","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_resolved","getModule","TurboModuleRegistry","get","NativeModules","DigiaEngageModule","__DEV__","console","warn","nativeDigiaModule","exports","initialize","apiKey","environment","logLevel","Promise","resolve","registerBridge","setCurrentScreen","name","triggerCampaign","id","content","cepContext","invalidateCampaign","campaignId","getConstants"],"sourceRoot":"../../src","sources":["NativeDigiaEngage.ts"],"mappings":";;;;;;AAgBA,IAAAA,YAAA,GAAAC,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_resolved","getModule","TurboModuleRegistry","get","NativeModules","DigiaEngageModule","__DEV__","console","warn","nativeDigiaModule","exports","initialize","apiKey","environment","logLevel","Promise","resolve","registerBridge","setCurrentScreen","name","triggerCampaign","id","content","cepContext","invalidateCampaign","campaignId","getConstants"],"sourceRoot":"../../src","sources":["NativeDigiaEngage.ts"],"mappings":";;;;;;AAgBA,IAAAA,YAAA,GAAAC,OAAA;AAhBA;AACA;AACA;AACA;A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