@fluentui-react-native/callout 0.29.6 → 0.29.8
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/CHANGELOG.md +39 -0
- package/README.md +18 -0
- package/lib/index.d.ts +2 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/package.json +12 -27
- package/src/index.ts +2 -3
- package/.cache/tsconfig.tsbuildinfo +0 -1
- package/FRNCallout.podspec +0 -24
- package/NuGet.config +0 -10
- package/SPEC.md +0 -46
- package/jest.config.cjs +0 -1
- package/lib/Callout.d.ts +0 -6
- package/lib/Callout.d.ts.map +0 -1
- package/lib/Callout.js +0 -64
- package/lib/Callout.js.map +0 -1
- package/lib/Callout.types.d.ts +0 -85
- package/lib/Callout.types.d.ts.map +0 -1
- package/lib/Callout.types.js +0 -2
- package/lib/Callout.types.js.map +0 -1
- package/lib/CalloutNativeComponent.d.ts +0 -49
- package/lib/CalloutNativeComponent.d.ts.map +0 -1
- package/lib/CalloutNativeComponent.js +0 -9
- package/lib/CalloutNativeComponent.js.map +0 -1
- package/lib/__tests__/Callout.test.d.ts +0 -2
- package/lib/__tests__/Callout.test.d.ts.map +0 -1
- package/lib/__tests__/Callout.test.js +0 -96
- package/lib/__tests__/Callout.test.js.map +0 -1
- package/lib/__tests__/Callout.types.test.d.ts +0 -2
- package/lib/__tests__/Callout.types.test.d.ts.map +0 -1
- package/lib/__tests__/Callout.types.test.js +0 -21
- package/lib/__tests__/Callout.types.test.js.map +0 -1
- package/macos/CalloutManager.swift +0 -16
- package/macos/CalloutView.swift +0 -454
- package/macos/CalloutWindow.swift +0 -40
- package/macos/FRNCallout.h +0 -14
- package/macos/FRNCalloutManager.h +0 -5
- package/macos/FRNCalloutManager.m +0 -76
- package/macos/FlippedVisualEffectView.swift +0 -10
- package/macos/GuardedEventMonitor.swift +0 -28
- package/macos/RCTCalloutComponentView.h +0 -12
- package/macos/RCTCalloutComponentView.mm +0 -209
- package/react-native.config.cjs +0 -15
- package/src/Callout.stories.tsx +0 -276
- package/src/Callout.tsx +0 -111
- package/src/Callout.types.ts +0 -106
- package/src/CalloutNativeComponent.ts +0 -74
- package/src/__tests__/Callout.test.tsx +0 -157
- package/src/__tests__/Callout.types.test.ts +0 -30
- package/src/__tests__/__snapshots__/Callout.test.tsx.snap +0 -11
- package/tsconfig.json +0 -19
- package/windows/Callout/Callout.cpp +0 -420
- package/windows/Callout/Callout.def +0 -3
- package/windows/Callout/Callout.h +0 -25
- package/windows/Callout/Callout.vcxproj +0 -152
- package/windows/Callout/ReactPackageProvider.cpp +0 -25
- package/windows/Callout/ReactPackageProvider.h +0 -25
- package/windows/Callout/ReactPackageProvider.idl +0 -12
- package/windows/Callout/codegen/.clang-format +0 -2
- package/windows/Callout/codegen/react/components/FRNCalloutSpec/Callout.g.h +0 -375
- package/windows/Callout/packages.lock.json +0 -151
- package/windows/Callout/pch.cpp +0 -1
- package/windows/Callout/pch.h +0 -28
- package/windows/ExperimentalFeatures.props +0 -33
- package/windows/NuGet.Config +0 -13
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
* This file is auto-generated from CalloutNativeComponent spec file in flow / TypeScript.
|
|
4
|
-
*/
|
|
5
|
-
// clang-format off
|
|
6
|
-
#pragma once
|
|
7
|
-
|
|
8
|
-
#include <NativeModules.h>
|
|
9
|
-
|
|
10
|
-
#ifdef RNW_NEW_ARCH
|
|
11
|
-
#include <JSValueComposition.h>
|
|
12
|
-
|
|
13
|
-
#include <winrt/Microsoft.ReactNative.Composition.h>
|
|
14
|
-
#include <winrt/Microsoft.UI.Composition.h>
|
|
15
|
-
#endif // #ifdef RNW_NEW_ARCH
|
|
16
|
-
|
|
17
|
-
#ifdef RNW_NEW_ARCH
|
|
18
|
-
|
|
19
|
-
namespace winrt::FluentUI::Callout::Codegen {
|
|
20
|
-
|
|
21
|
-
REACT_STRUCT(CalloutSpec_CalloutProps_anchorRect)
|
|
22
|
-
struct CalloutSpec_CalloutProps_anchorRect {
|
|
23
|
-
REACT_FIELD(screenX)
|
|
24
|
-
double screenX{};
|
|
25
|
-
|
|
26
|
-
REACT_FIELD(screenY)
|
|
27
|
-
double screenY{};
|
|
28
|
-
|
|
29
|
-
REACT_FIELD(width)
|
|
30
|
-
double width{};
|
|
31
|
-
|
|
32
|
-
REACT_FIELD(height)
|
|
33
|
-
double height{};
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
REACT_STRUCT(CalloutProps)
|
|
37
|
-
struct CalloutProps : winrt::implements<CalloutProps, winrt::Microsoft::ReactNative::IComponentProps> {
|
|
38
|
-
CalloutProps(winrt::Microsoft::ReactNative::ViewProps props, const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom)
|
|
39
|
-
: ViewProps(props)
|
|
40
|
-
{
|
|
41
|
-
if (cloneFrom) {
|
|
42
|
-
auto cloneFromProps = cloneFrom.as<CalloutProps>();
|
|
43
|
-
accessibilityLabel = cloneFromProps->accessibilityLabel;
|
|
44
|
-
accessibilityOnShowAnnouncement = cloneFromProps->accessibilityOnShowAnnouncement;
|
|
45
|
-
anchorRect = cloneFromProps->anchorRect;
|
|
46
|
-
beakWidth = cloneFromProps->beakWidth;
|
|
47
|
-
dismissBehaviors = cloneFromProps->dismissBehaviors;
|
|
48
|
-
doNotTakePointerCapture = cloneFromProps->doNotTakePointerCapture;
|
|
49
|
-
focusable = cloneFromProps->focusable;
|
|
50
|
-
gapSpace = cloneFromProps->gapSpace;
|
|
51
|
-
isBeakVisible = cloneFromProps->isBeakVisible;
|
|
52
|
-
maxHeight = cloneFromProps->maxHeight;
|
|
53
|
-
maxWidth = cloneFromProps->maxWidth;
|
|
54
|
-
minPadding = cloneFromProps->minPadding;
|
|
55
|
-
minWidth = cloneFromProps->minWidth;
|
|
56
|
-
setInitialFocus = cloneFromProps->setInitialFocus;
|
|
57
|
-
testID = cloneFromProps->testID;
|
|
58
|
-
directionalHint = cloneFromProps->directionalHint;
|
|
59
|
-
target = cloneFromProps->target.Copy();
|
|
60
|
-
onRestoreFocus = cloneFromProps->onRestoreFocus;
|
|
61
|
-
onDismiss = cloneFromProps->onDismiss;
|
|
62
|
-
onShow = cloneFromProps->onShow;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
void SetProp(uint32_t hash, winrt::hstring propName, winrt::Microsoft::ReactNative::IJSValueReader value) noexcept {
|
|
67
|
-
winrt::Microsoft::ReactNative::ReadProp(hash, propName, value, *this);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
REACT_FIELD(accessibilityLabel)
|
|
71
|
-
std::optional<std::string> accessibilityLabel;
|
|
72
|
-
|
|
73
|
-
REACT_FIELD(accessibilityOnShowAnnouncement)
|
|
74
|
-
std::optional<std::string> accessibilityOnShowAnnouncement;
|
|
75
|
-
|
|
76
|
-
REACT_FIELD(anchorRect)
|
|
77
|
-
std::optional<CalloutSpec_CalloutProps_anchorRect> anchorRect;
|
|
78
|
-
|
|
79
|
-
REACT_FIELD(beakWidth)
|
|
80
|
-
std::optional<int32_t> beakWidth{};
|
|
81
|
-
|
|
82
|
-
REACT_FIELD(dismissBehaviors)
|
|
83
|
-
std::optional<std::vector<std::string>> dismissBehaviors;
|
|
84
|
-
|
|
85
|
-
REACT_FIELD(doNotTakePointerCapture)
|
|
86
|
-
std::optional<bool> doNotTakePointerCapture{};
|
|
87
|
-
|
|
88
|
-
REACT_FIELD(focusable)
|
|
89
|
-
std::optional<bool> focusable{};
|
|
90
|
-
|
|
91
|
-
REACT_FIELD(gapSpace)
|
|
92
|
-
std::optional<int32_t> gapSpace{};
|
|
93
|
-
|
|
94
|
-
REACT_FIELD(isBeakVisible)
|
|
95
|
-
std::optional<bool> isBeakVisible{};
|
|
96
|
-
|
|
97
|
-
REACT_FIELD(maxHeight)
|
|
98
|
-
std::optional<int32_t> maxHeight{};
|
|
99
|
-
|
|
100
|
-
REACT_FIELD(maxWidth)
|
|
101
|
-
std::optional<int32_t> maxWidth{};
|
|
102
|
-
|
|
103
|
-
REACT_FIELD(minPadding)
|
|
104
|
-
std::optional<int32_t> minPadding{};
|
|
105
|
-
|
|
106
|
-
REACT_FIELD(minWidth)
|
|
107
|
-
std::optional<int32_t> minWidth{};
|
|
108
|
-
|
|
109
|
-
REACT_FIELD(setInitialFocus)
|
|
110
|
-
std::optional<bool> setInitialFocus{};
|
|
111
|
-
|
|
112
|
-
REACT_FIELD(testID)
|
|
113
|
-
std::optional<std::string> testID;
|
|
114
|
-
|
|
115
|
-
REACT_FIELD(directionalHint)
|
|
116
|
-
std::optional<std::string> directionalHint;
|
|
117
|
-
|
|
118
|
-
REACT_FIELD(target)
|
|
119
|
-
winrt::Microsoft::ReactNative::JSValue target{nullptr};
|
|
120
|
-
|
|
121
|
-
// These fields can be used to determine if JS has registered for this event
|
|
122
|
-
REACT_FIELD(onRestoreFocus)
|
|
123
|
-
bool onRestoreFocus{false};
|
|
124
|
-
|
|
125
|
-
REACT_FIELD(onDismiss)
|
|
126
|
-
bool onDismiss{false};
|
|
127
|
-
|
|
128
|
-
REACT_FIELD(onShow)
|
|
129
|
-
bool onShow{false};
|
|
130
|
-
|
|
131
|
-
const winrt::Microsoft::ReactNative::ViewProps ViewProps;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
REACT_STRUCT(CalloutSpec_onShow)
|
|
135
|
-
struct CalloutSpec_onShow {
|
|
136
|
-
REACT_FIELD(target)
|
|
137
|
-
int32_t target{};
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
REACT_STRUCT(CalloutSpec_onDismiss)
|
|
141
|
-
struct CalloutSpec_onDismiss {
|
|
142
|
-
REACT_FIELD(target)
|
|
143
|
-
int32_t target{};
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
REACT_STRUCT(CalloutSpec_onRestoreFocus)
|
|
147
|
-
struct CalloutSpec_onRestoreFocus {
|
|
148
|
-
REACT_FIELD(target)
|
|
149
|
-
int32_t target{};
|
|
150
|
-
|
|
151
|
-
REACT_FIELD(containsFocus)
|
|
152
|
-
bool containsFocus{};
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
struct CalloutEventEmitter {
|
|
156
|
-
CalloutEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
|
|
157
|
-
: m_eventEmitter(eventEmitter) {}
|
|
158
|
-
|
|
159
|
-
using OnRestoreFocus = CalloutSpec_onRestoreFocus;
|
|
160
|
-
using OnDismiss = CalloutSpec_onDismiss;
|
|
161
|
-
using OnShow = CalloutSpec_onShow;
|
|
162
|
-
|
|
163
|
-
void onRestoreFocus(OnRestoreFocus &&value) const {
|
|
164
|
-
m_eventEmitter.DispatchEvent(L"restoreFocus", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
165
|
-
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
void onDismiss(OnDismiss &&value) const {
|
|
170
|
-
m_eventEmitter.DispatchEvent(L"dismiss", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
171
|
-
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
void onShow(OnShow &&value) const {
|
|
176
|
-
m_eventEmitter.DispatchEvent(L"show", [value = std::move(value)](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
|
|
177
|
-
winrt::Microsoft::ReactNative::WriteValue(writer, value);
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
private:
|
|
182
|
-
winrt::Microsoft::ReactNative::EventEmitter m_eventEmitter{nullptr};
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
template<typename TUserData>
|
|
186
|
-
struct BaseCallout {
|
|
187
|
-
|
|
188
|
-
virtual void UpdateProps(
|
|
189
|
-
const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
190
|
-
const winrt::com_ptr<CalloutProps> &newProps,
|
|
191
|
-
const winrt::com_ptr<CalloutProps> &/*oldProps*/) noexcept {
|
|
192
|
-
m_props = newProps;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// UpdateLayoutMetrics will only be called if this method is overridden
|
|
196
|
-
virtual void UpdateLayoutMetrics(
|
|
197
|
-
const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
198
|
-
const winrt::Microsoft::ReactNative::LayoutMetrics &/*newLayoutMetrics*/,
|
|
199
|
-
const winrt::Microsoft::ReactNative::LayoutMetrics &/*oldLayoutMetrics*/) noexcept {
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// UpdateState will only be called if this method is overridden
|
|
203
|
-
virtual void UpdateState(
|
|
204
|
-
const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
205
|
-
const winrt::Microsoft::ReactNative::IComponentState &/*newState*/) noexcept {
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
virtual void UpdateEventEmitter(const std::shared_ptr<CalloutEventEmitter> &eventEmitter) noexcept {
|
|
209
|
-
m_eventEmitter = eventEmitter;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
// MountChildComponentView will only be called if this method is overridden
|
|
213
|
-
virtual void MountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
214
|
-
const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &/*args*/) noexcept {
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// UnmountChildComponentView will only be called if this method is overridden
|
|
218
|
-
virtual void UnmountChildComponentView(const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
219
|
-
const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &/*args*/) noexcept {
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Initialize will only be called if this method is overridden
|
|
223
|
-
virtual void Initialize(const winrt::Microsoft::ReactNative::ComponentView &/*view*/) noexcept {
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
// CreateVisual will only be called if this method is overridden
|
|
227
|
-
virtual winrt::Microsoft::UI::Composition::Visual CreateVisual(const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
|
|
228
|
-
return view.as<winrt::Microsoft::ReactNative::Composition::ComponentView>().Compositor().CreateSpriteVisual();
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// FinalizeUpdate will only be called if this method is overridden
|
|
232
|
-
virtual void FinalizeUpdate(const winrt::Microsoft::ReactNative::ComponentView &/*view*/,
|
|
233
|
-
winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept {
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// CreateAutomationPeer will only be called if this method is overridden
|
|
237
|
-
virtual winrt::Windows::Foundation::IInspectable CreateAutomationPeer(const winrt::Microsoft::ReactNative::ComponentView & /*view*/,
|
|
238
|
-
const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& /*args*/) noexcept {
|
|
239
|
-
return nullptr;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
// You must provide an implementation of this method to handle the "focusWindow" command
|
|
243
|
-
virtual void HandleFocusWindowCommand() noexcept = 0;
|
|
244
|
-
|
|
245
|
-
// You must provide an implementation of this method to handle the "blurWindow" command
|
|
246
|
-
virtual void HandleBlurWindowCommand() noexcept = 0;
|
|
247
|
-
|
|
248
|
-
void HandleCommand(const winrt::Microsoft::ReactNative::ComponentView &view, const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept {
|
|
249
|
-
auto userData = view.UserData().as<TUserData>();
|
|
250
|
-
auto commandName = args.CommandName();
|
|
251
|
-
if (commandName == L"focusWindow") {
|
|
252
|
-
|
|
253
|
-
userData->HandleFocusWindowCommand();
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
if (commandName == L"blurWindow") {
|
|
258
|
-
|
|
259
|
-
userData->HandleBlurWindowCommand();
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
const std::shared_ptr<CalloutEventEmitter>& EventEmitter() const { return m_eventEmitter; }
|
|
265
|
-
const winrt::com_ptr<CalloutProps>& Props() const { return m_props; }
|
|
266
|
-
|
|
267
|
-
private:
|
|
268
|
-
winrt::com_ptr<CalloutProps> m_props;
|
|
269
|
-
std::shared_ptr<CalloutEventEmitter> m_eventEmitter;
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
template <typename TUserData>
|
|
273
|
-
void RegisterCalloutNativeComponent(
|
|
274
|
-
winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder,
|
|
275
|
-
std::function<void(const winrt::Microsoft::ReactNative::Composition::IReactCompositionViewComponentBuilder&)> builderCallback) noexcept {
|
|
276
|
-
packageBuilder.as<winrt::Microsoft::ReactNative::IReactPackageBuilderFabric>().AddViewComponent(
|
|
277
|
-
L"Callout", [builderCallback](winrt::Microsoft::ReactNative::IReactViewComponentBuilder const &builder) noexcept {
|
|
278
|
-
auto compBuilder = builder.as<winrt::Microsoft::ReactNative::Composition::IReactCompositionViewComponentBuilder>();
|
|
279
|
-
|
|
280
|
-
builder.SetCreateProps([](winrt::Microsoft::ReactNative::ViewProps props,
|
|
281
|
-
const winrt::Microsoft::ReactNative::IComponentProps& cloneFrom) noexcept {
|
|
282
|
-
return winrt::make<CalloutProps>(props, cloneFrom);
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
builder.SetUpdatePropsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
286
|
-
const winrt::Microsoft::ReactNative::IComponentProps &newProps,
|
|
287
|
-
const winrt::Microsoft::ReactNative::IComponentProps &oldProps) noexcept {
|
|
288
|
-
auto userData = view.UserData().as<TUserData>();
|
|
289
|
-
userData->UpdateProps(view, newProps ? newProps.as<CalloutProps>() : nullptr, oldProps ? oldProps.as<CalloutProps>() : nullptr);
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
compBuilder.SetUpdateLayoutMetricsHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
293
|
-
const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics,
|
|
294
|
-
const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics) noexcept {
|
|
295
|
-
auto userData = view.UserData().as<TUserData>();
|
|
296
|
-
userData->UpdateLayoutMetrics(view, newLayoutMetrics, oldLayoutMetrics);
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
builder.SetUpdateEventEmitterHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
300
|
-
const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter) noexcept {
|
|
301
|
-
auto userData = view.UserData().as<TUserData>();
|
|
302
|
-
userData->UpdateEventEmitter(std::make_shared<CalloutEventEmitter>(eventEmitter));
|
|
303
|
-
});
|
|
304
|
-
|
|
305
|
-
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::FinalizeUpdate != &BaseCallout<TUserData>::FinalizeUpdate) {
|
|
306
|
-
builder.SetFinalizeUpdateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
307
|
-
winrt::Microsoft::ReactNative::ComponentViewUpdateMask mask) noexcept {
|
|
308
|
-
auto userData = view.UserData().as<TUserData>();
|
|
309
|
-
userData->FinalizeUpdate(view, mask);
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UpdateState != &BaseCallout<TUserData>::UpdateState) {
|
|
314
|
-
builder.SetUpdateStateHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
315
|
-
const winrt::Microsoft::ReactNative::IComponentState &newState) noexcept {
|
|
316
|
-
auto userData = view.UserData().as<TUserData>();
|
|
317
|
-
userData->UpdateState(view, newState);
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
builder.SetCustomCommandHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
322
|
-
const winrt::Microsoft::ReactNative::HandleCommandArgs& args) noexcept {
|
|
323
|
-
auto userData = view.UserData().as<TUserData>();
|
|
324
|
-
userData->HandleCommand(view, args);
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::MountChildComponentView != &BaseCallout<TUserData>::MountChildComponentView) {
|
|
328
|
-
builder.SetMountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
329
|
-
const winrt::Microsoft::ReactNative::MountChildComponentViewArgs &args) noexcept {
|
|
330
|
-
auto userData = view.UserData().as<TUserData>();
|
|
331
|
-
return userData->MountChildComponentView(view, args);
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::UnmountChildComponentView != &BaseCallout<TUserData>::UnmountChildComponentView) {
|
|
336
|
-
builder.SetUnmountChildComponentViewHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
337
|
-
const winrt::Microsoft::ReactNative::UnmountChildComponentViewArgs &args) noexcept {
|
|
338
|
-
auto userData = view.UserData().as<TUserData>();
|
|
339
|
-
return userData->UnmountChildComponentView(view, args);
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateAutomationPeer != &BaseCallout<TUserData>::CreateAutomationPeer) {
|
|
344
|
-
builder.SetCreateAutomationPeerHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
|
|
345
|
-
const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& args) noexcept {
|
|
346
|
-
auto userData = view.UserData().as<TUserData>();
|
|
347
|
-
return userData->CreateAutomationPeer(view, args);
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
|
|
352
|
-
auto userData = winrt::make_self<TUserData>();
|
|
353
|
-
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseCallout<TUserData>::Initialize) {
|
|
354
|
-
userData->Initialize(view);
|
|
355
|
-
}
|
|
356
|
-
view.UserData(*userData);
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateVisual != &BaseCallout<TUserData>::CreateVisual) {
|
|
360
|
-
compBuilder.SetCreateVisualHandler([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
|
|
361
|
-
auto userData = view.UserData().as<TUserData>();
|
|
362
|
-
return userData->CreateVisual(view);
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
// Allow app to further customize the builder
|
|
367
|
-
if (builderCallback) {
|
|
368
|
-
builderCallback(compBuilder);
|
|
369
|
-
}
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
} // namespace winrt::FluentUI::Callout::Codegen
|
|
374
|
-
|
|
375
|
-
#endif // #ifdef RNW_NEW_ARCH
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1,
|
|
3
|
-
"dependencies": {
|
|
4
|
-
"native,Version=v0.0": {
|
|
5
|
-
"boost": {
|
|
6
|
-
"type": "Direct",
|
|
7
|
-
"requested": "[1.84.0, )",
|
|
8
|
-
"resolved": "1.84.0",
|
|
9
|
-
"contentHash": "4el2YP3cNJDVFPdzOso+LxGvdWP2rHxML4siq8VdonNypW2m4q503tHfCj6vK0L1UfxioE2hpFGb4ITEua73tg=="
|
|
10
|
-
},
|
|
11
|
-
"Microsoft.ReactNative": {
|
|
12
|
-
"type": "Direct",
|
|
13
|
-
"requested": "[0.81.35, )",
|
|
14
|
-
"resolved": "0.81.35",
|
|
15
|
-
"contentHash": "WjsJFALaLLUvJHUBw8k8G8/PB3p5qvqqXG7NYJefHOgqB7MbCSOnD/bckIqKcp53J+MkPxqaeg5tnYLVTVhqwQ=="
|
|
16
|
-
},
|
|
17
|
-
"Microsoft.ReactNative.Cxx": {
|
|
18
|
-
"type": "Direct",
|
|
19
|
-
"requested": "[0.81.35, )",
|
|
20
|
-
"resolved": "0.81.35",
|
|
21
|
-
"contentHash": "oadpIMSLN11M9W/hyZKyiCKE2wMvjb80Bl5jInVUmqDJWNswxnu7W5Kt/NA9ciy+BN0ru62ucO0E2PJDrnP/Jg==",
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"Microsoft.ReactNative": "0.81.35"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"Microsoft.VCRTForwarders.140": {
|
|
27
|
-
"type": "Direct",
|
|
28
|
-
"requested": "[1.0.2-rc, )",
|
|
29
|
-
"resolved": "1.0.2-rc",
|
|
30
|
-
"contentHash": "/r+sjtEeCIGyDhobIZ5hSmYhC/dSyGZxf1SxYJpElUhB0LMCktOMFs9gXrauXypIFECpVynNyVjAmJt6hjJ5oQ=="
|
|
31
|
-
},
|
|
32
|
-
"Microsoft.Windows.CppWinRT": {
|
|
33
|
-
"type": "Direct",
|
|
34
|
-
"requested": "[2.0.230706.1, )",
|
|
35
|
-
"resolved": "2.0.230706.1",
|
|
36
|
-
"contentHash": "l0D7oCw/5X+xIKHqZTi62TtV+1qeSz7KVluNFdrJ9hXsst4ghvqQ/Yhura7JqRdZWBXAuDS0G0KwALptdoxweQ=="
|
|
37
|
-
},
|
|
38
|
-
"Microsoft.WindowsAppSDK": {
|
|
39
|
-
"type": "Direct",
|
|
40
|
-
"requested": "[1.8.260508005, )",
|
|
41
|
-
"resolved": "1.8.260508005",
|
|
42
|
-
"contentHash": "+aA+zrvqJKgsn/1TPOSR0Uy7dkMO5jI/+cDWPu2pWmXe4KQxYkR8gQFY9IrfbgCxxSd/yl1zMcAKD/4HBbNqaw==",
|
|
43
|
-
"dependencies": {
|
|
44
|
-
"Microsoft.WindowsAppSDK.AI": "[1.8.76]",
|
|
45
|
-
"Microsoft.WindowsAppSDK.Base": "[1.8.251216001]",
|
|
46
|
-
"Microsoft.WindowsAppSDK.DWrite": "[1.8.25122902]",
|
|
47
|
-
"Microsoft.WindowsAppSDK.Foundation": "[1.8.260505001]",
|
|
48
|
-
"Microsoft.WindowsAppSDK.InteractiveExperiences": "[1.8.260430001]",
|
|
49
|
-
"Microsoft.WindowsAppSDK.ML": "[1.8.2197]",
|
|
50
|
-
"Microsoft.WindowsAppSDK.Runtime": "[1.8.260508005]",
|
|
51
|
-
"Microsoft.WindowsAppSDK.Widgets": "[1.8.251231004]",
|
|
52
|
-
"Microsoft.WindowsAppSDK.WinUI": "[1.8.260505002]"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"Microsoft.Web.WebView2": {
|
|
56
|
-
"type": "Transitive",
|
|
57
|
-
"resolved": "1.0.3179.45",
|
|
58
|
-
"contentHash": "3pokSH5CnN0G6rGhGFo1y87inxYhNxBQ2Vdf0wlvBj99KHxQJormjDACmqRnFeUsmuNFIhWwfAL1ztq7wD5qRA=="
|
|
59
|
-
},
|
|
60
|
-
"Microsoft.Windows.SDK.BuildTools": {
|
|
61
|
-
"type": "Transitive",
|
|
62
|
-
"resolved": "10.0.26100.4654",
|
|
63
|
-
"contentHash": "2mgcOlj/t2RfSyyw+pVESfO+Tk1RkfQzto9Vrq42M1lUQIfQEwbi8QLha9GXWIOj+TFzeHIEJckIoF25mgiM8A=="
|
|
64
|
-
},
|
|
65
|
-
"Microsoft.Windows.SDK.BuildTools.MSIX": {
|
|
66
|
-
"type": "Transitive",
|
|
67
|
-
"resolved": "1.7.20250829.1",
|
|
68
|
-
"contentHash": "IMdvRmCIZnBS5GkYnv0po1bcx6U1OF39pqA4TphQ9evDzpCRoSE19/PkDvlUNNrBavTsLIEJgd/TAIFner75ow=="
|
|
69
|
-
},
|
|
70
|
-
"Microsoft.WindowsAppSDK.AI": {
|
|
71
|
-
"type": "Transitive",
|
|
72
|
-
"resolved": "1.8.76",
|
|
73
|
-
"contentHash": "Ayn9QybcwzH+c8eQlE7dm2oO3Jrcn2uohLcsHJpCbLOAfcisjzwtSBe0oyulbaJ86R4eDSX3RDS25tsjGpIqyQ==",
|
|
74
|
-
"dependencies": {
|
|
75
|
-
"Microsoft.WindowsAppSDK.Base": "1.8.251216001",
|
|
76
|
-
"Microsoft.WindowsAppSDK.Foundation": "1.8.260501000"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
"Microsoft.WindowsAppSDK.Base": {
|
|
80
|
-
"type": "Transitive",
|
|
81
|
-
"resolved": "1.8.251216001",
|
|
82
|
-
"contentHash": "PS1wriuFknz3W2F2P/e6RvOTM35w89Lsj/f0QmUEPrJjKnc+jM0JLX1vfdytI14y1gNRUTm9uclwP0aH/SVU5w==",
|
|
83
|
-
"dependencies": {
|
|
84
|
-
"Microsoft.Windows.SDK.BuildTools": "10.0.26100.4654",
|
|
85
|
-
"Microsoft.Windows.SDK.BuildTools.MSIX": "1.7.20250829.1"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
"Microsoft.WindowsAppSDK.DWrite": {
|
|
89
|
-
"type": "Transitive",
|
|
90
|
-
"resolved": "1.8.25122902",
|
|
91
|
-
"contentHash": "zFNn07i7Cyz62Y8FnPQAyzeZK7ww3m9t42i9pzy4C04pNbyUDQ4fG7pB6VSh6n4EyFuYtuFQuDzt4mKmXFrkrg==",
|
|
92
|
-
"dependencies": {
|
|
93
|
-
"Microsoft.WindowsAppSDK.Base": "1.8.251216001"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"Microsoft.WindowsAppSDK.Foundation": {
|
|
97
|
-
"type": "Transitive",
|
|
98
|
-
"resolved": "1.8.260505001",
|
|
99
|
-
"contentHash": "41SSoEn3sKKCAVPA/w18zVJwV1C7aDEkPS2f6Zyp19m27tDEmteEp0XS3Ln3b0ElYR4FfPEPvIDbJPSA9vePGw==",
|
|
100
|
-
"dependencies": {
|
|
101
|
-
"Microsoft.WindowsAppSDK.Base": "1.8.251216001",
|
|
102
|
-
"Microsoft.WindowsAppSDK.InteractiveExperiences": "1.8.260430001"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"Microsoft.WindowsAppSDK.InteractiveExperiences": {
|
|
106
|
-
"type": "Transitive",
|
|
107
|
-
"resolved": "1.8.260430001",
|
|
108
|
-
"contentHash": "fTPCnQb3ZarMh9khlEfbLDllcZzK0tSP+2S6W/T4cPyLLSAmARm8Gd3AC5kqubnDjzTvG+1lNZ1bZGFsIHplJQ==",
|
|
109
|
-
"dependencies": {
|
|
110
|
-
"Microsoft.WindowsAppSDK.Base": "1.8.251216001"
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
"Microsoft.WindowsAppSDK.ML": {
|
|
114
|
-
"type": "Transitive",
|
|
115
|
-
"resolved": "1.8.2197",
|
|
116
|
-
"contentHash": "6Bc1SOLd5HicY3GbF+zr76YBfH4iZOKeEGxTK/lHKAK2ExZTWavOADxB2CKSi/irF4dWSngUdRFopWPmckJ6fA==",
|
|
117
|
-
"dependencies": {
|
|
118
|
-
"Microsoft.WindowsAppSDK.Base": "1.8.251216001",
|
|
119
|
-
"Microsoft.WindowsAppSDK.Foundation": "1.8.260505001"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
"Microsoft.WindowsAppSDK.Runtime": {
|
|
123
|
-
"type": "Transitive",
|
|
124
|
-
"resolved": "1.8.260508005",
|
|
125
|
-
"contentHash": "2JqXzA4heHSkkaXJNyEvYtpv2wsEUMhwQzgXmZsFmYSkUXSdeVc6hdHcWoBK1SY9l1Sjd1brLt7h16kIpgh2kA==",
|
|
126
|
-
"dependencies": {
|
|
127
|
-
"Microsoft.WindowsAppSDK.Base": "1.8.251216001"
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"Microsoft.WindowsAppSDK.Widgets": {
|
|
131
|
-
"type": "Transitive",
|
|
132
|
-
"resolved": "1.8.251231004",
|
|
133
|
-
"contentHash": "bIWqQYR8DCoB1SoPOMil5AtgtkTn438wJTdpsHgyO/6o7Eh7PMP5BzrR0KbDsFqy+4LhPWQ4vtwko5k93fECcA==",
|
|
134
|
-
"dependencies": {
|
|
135
|
-
"Microsoft.WindowsAppSDK.Base": "1.8.251216001"
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
"Microsoft.WindowsAppSDK.WinUI": {
|
|
139
|
-
"type": "Transitive",
|
|
140
|
-
"resolved": "1.8.260505002",
|
|
141
|
-
"contentHash": "/hGl6EOmo8aeJR2bYbOmGhOicnJK4EY+u+cQI+jm8H1uXThfMX32DsfKOt9LkOcu8AKX3j5FpiBay8ObUSytIw==",
|
|
142
|
-
"dependencies": {
|
|
143
|
-
"Microsoft.Web.WebView2": "1.0.3179.45",
|
|
144
|
-
"Microsoft.WindowsAppSDK.Base": "1.8.251216001",
|
|
145
|
-
"Microsoft.WindowsAppSDK.Foundation": "1.8.260505001",
|
|
146
|
-
"Microsoft.WindowsAppSDK.InteractiveExperiences": "1.8.260430001"
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
package/windows/Callout/pch.cpp
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#include "pch.h"
|
package/windows/Callout/pch.h
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// pch.h : include file for standard system include files,
|
|
2
|
-
// or project specific include files that are used frequently, but
|
|
3
|
-
// are changed infrequently
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
#pragma once
|
|
7
|
-
|
|
8
|
-
#define NOMINMAX 1
|
|
9
|
-
//#define WIN32_LEAN_AND_MEAN 1
|
|
10
|
-
//#define WINRT_LEAN_AND_MEAN 1
|
|
11
|
-
|
|
12
|
-
// Windows Header Files
|
|
13
|
-
#include <windows.h>
|
|
14
|
-
#undef GetCurrentTime
|
|
15
|
-
#include <unknwn.h>
|
|
16
|
-
|
|
17
|
-
// WinRT Header Files
|
|
18
|
-
#include <CppWinRTIncludes.h>
|
|
19
|
-
#include <winrt/Microsoft.ReactNative.h>
|
|
20
|
-
#include <winrt/base.h>
|
|
21
|
-
|
|
22
|
-
// C RunTime Header Files
|
|
23
|
-
#include <malloc.h>
|
|
24
|
-
#include <memory.h>
|
|
25
|
-
#include <stdlib.h>
|
|
26
|
-
#include <tchar.h>
|
|
27
|
-
|
|
28
|
-
// Reference additional headers your project requires here
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
|
|
4
|
-
<PropertyGroup Label="Microsoft.ReactNative Experimental Features">
|
|
5
|
-
<!--
|
|
6
|
-
Required for building a New Architecture project.
|
|
7
|
-
|
|
8
|
-
Library projects can change this value to test against Old and New
|
|
9
|
-
Architectures when building the library project's local sln file.
|
|
10
|
-
|
|
11
|
-
Otherwise this value will be decided by the consuming RNW app.
|
|
12
|
-
|
|
13
|
-
See https://microsoft.github.io/react-native-windows/docs/new-architecture
|
|
14
|
-
-->
|
|
15
|
-
<RnwNewArch>true</RnwNewArch>
|
|
16
|
-
|
|
17
|
-
<!--
|
|
18
|
-
Changes compilation to assume use of Microsoft.ReactNative NuGet packages
|
|
19
|
-
instead of building the framework from source. Defaults to true.
|
|
20
|
-
|
|
21
|
-
This is set during library project creation and is used when building
|
|
22
|
-
the library project's local sln file.
|
|
23
|
-
|
|
24
|
-
Otherwise this value will be decided by the consuming RNW app.
|
|
25
|
-
|
|
26
|
-
See https://microsoft.github.io/react-native-windows/docs/nuget
|
|
27
|
-
-->
|
|
28
|
-
<UseExperimentalNuget>true</UseExperimentalNuget>
|
|
29
|
-
|
|
30
|
-
<ReactExperimentalFeaturesSet>true</ReactExperimentalFeaturesSet>
|
|
31
|
-
</PropertyGroup>
|
|
32
|
-
|
|
33
|
-
</Project>
|
package/windows/NuGet.Config
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<configuration>
|
|
3
|
-
<config>
|
|
4
|
-
<add key="repositoryPath" value="packages" />
|
|
5
|
-
</config>
|
|
6
|
-
<packageSources>
|
|
7
|
-
<clear />
|
|
8
|
-
<add key="react-native" value="https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/nuget/v3/index.json" />
|
|
9
|
-
</packageSources>
|
|
10
|
-
<disabledPackageSources>
|
|
11
|
-
<clear />
|
|
12
|
-
</disabledPackageSources>
|
|
13
|
-
</configuration>
|