@microsoft/power-apps-native-host 0.2.22

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 (104) hide show
  1. package/LICENSE +112 -0
  2. package/README.md +59 -0
  3. package/app.plugin.js +4 -0
  4. package/lib/NOTICE.txt +1659 -0
  5. package/lib/commonjs/ErrorBoundary.js +128 -0
  6. package/lib/commonjs/auth/AuthContext.js +281 -0
  7. package/lib/commonjs/bridge/NativePowerAppsBridge.js +279 -0
  8. package/lib/commonjs/bridge/setupNativeHost.js +65 -0
  9. package/lib/commonjs/connections/ConnectionSetupScreen.js +531 -0
  10. package/lib/commonjs/connections/disambiguate.js +88 -0
  11. package/lib/commonjs/connections/types.js +58 -0
  12. package/lib/commonjs/connections/useConnectionSetup.js +236 -0
  13. package/lib/commonjs/controls/FilePicker.js +183 -0
  14. package/lib/commonjs/controls/ImagePicker.js +236 -0
  15. package/lib/commonjs/index.js +246 -0
  16. package/lib/commonjs/logger.js +27 -0
  17. package/lib/commonjs/package.json +1 -0
  18. package/lib/commonjs/platform/PowerPlatformConnectionApi.js +606 -0
  19. package/lib/commonjs/platform/PowerPlatformEnvironmentApi.js +194 -0
  20. package/lib/commonjs/platform/resolveConnections.js +264 -0
  21. package/lib/commonjs/platform/useConnectionRefs.js +270 -0
  22. package/lib/commonjs/provider/PowerAppsHostProvider.js +336 -0
  23. package/lib/commonjs/provider/PowerAppsProvider.js +351 -0
  24. package/lib/commonjs/telemetry/index.js +70 -0
  25. package/lib/commonjs/theme/ThemeProvider.js +80 -0
  26. package/lib/commonjs/theme/tokens.js +50 -0
  27. package/lib/commonjs/utils/dataverseUtils.js +98 -0
  28. package/lib/commonjs/utils/isDevPlayer.js +27 -0
  29. package/lib/module/ErrorBoundary.js +122 -0
  30. package/lib/module/auth/AuthContext.js +276 -0
  31. package/lib/module/bridge/NativePowerAppsBridge.js +273 -0
  32. package/lib/module/bridge/setupNativeHost.js +62 -0
  33. package/lib/module/connections/ConnectionSetupScreen.js +526 -0
  34. package/lib/module/connections/disambiguate.js +83 -0
  35. package/lib/module/connections/types.js +60 -0
  36. package/lib/module/connections/useConnectionSetup.js +233 -0
  37. package/lib/module/controls/FilePicker.js +178 -0
  38. package/lib/module/controls/ImagePicker.js +231 -0
  39. package/lib/module/index.js +41 -0
  40. package/lib/module/logger.js +22 -0
  41. package/lib/module/package.json +1 -0
  42. package/lib/module/platform/PowerPlatformConnectionApi.js +595 -0
  43. package/lib/module/platform/PowerPlatformEnvironmentApi.js +186 -0
  44. package/lib/module/platform/resolveConnections.js +259 -0
  45. package/lib/module/platform/useConnectionRefs.js +267 -0
  46. package/lib/module/provider/PowerAppsHostProvider.js +332 -0
  47. package/lib/module/provider/PowerAppsProvider.js +345 -0
  48. package/lib/module/telemetry/index.js +55 -0
  49. package/lib/module/theme/ThemeProvider.js +63 -0
  50. package/lib/module/theme/tokens.js +46 -0
  51. package/lib/module/utils/dataverseUtils.js +90 -0
  52. package/lib/module/utils/isDevPlayer.js +23 -0
  53. package/lib/typescript/commonjs/ErrorBoundary.d.ts +30 -0
  54. package/lib/typescript/commonjs/auth/AuthContext.d.ts +57 -0
  55. package/lib/typescript/commonjs/bridge/NativePowerAppsBridge.d.ts +112 -0
  56. package/lib/typescript/commonjs/bridge/setupNativeHost.d.ts +39 -0
  57. package/lib/typescript/commonjs/connections/ConnectionSetupScreen.d.ts +107 -0
  58. package/lib/typescript/commonjs/connections/disambiguate.d.ts +43 -0
  59. package/lib/typescript/commonjs/connections/types.d.ts +91 -0
  60. package/lib/typescript/commonjs/connections/useConnectionSetup.d.ts +96 -0
  61. package/lib/typescript/commonjs/controls/FilePicker.d.ts +65 -0
  62. package/lib/typescript/commonjs/controls/ImagePicker.d.ts +76 -0
  63. package/lib/typescript/commonjs/index.d.ts +42 -0
  64. package/lib/typescript/commonjs/logger.d.ts +11 -0
  65. package/lib/typescript/commonjs/package.json +1 -0
  66. package/lib/typescript/commonjs/platform/PowerPlatformConnectionApi.d.ts +205 -0
  67. package/lib/typescript/commonjs/platform/PowerPlatformEnvironmentApi.d.ts +108 -0
  68. package/lib/typescript/commonjs/platform/resolveConnections.d.ts +86 -0
  69. package/lib/typescript/commonjs/platform/useConnectionRefs.d.ts +126 -0
  70. package/lib/typescript/commonjs/provider/PowerAppsHostProvider.d.ts +123 -0
  71. package/lib/typescript/commonjs/provider/PowerAppsProvider.d.ts +148 -0
  72. package/lib/typescript/commonjs/telemetry/index.d.ts +48 -0
  73. package/lib/typescript/commonjs/theme/ThemeProvider.d.ts +30 -0
  74. package/lib/typescript/commonjs/theme/tokens.d.ts +27 -0
  75. package/lib/typescript/commonjs/utils/dataverseUtils.d.ts +39 -0
  76. package/lib/typescript/commonjs/utils/isDevPlayer.d.ts +19 -0
  77. package/lib/typescript/module/ErrorBoundary.d.ts +30 -0
  78. package/lib/typescript/module/auth/AuthContext.d.ts +57 -0
  79. package/lib/typescript/module/bridge/NativePowerAppsBridge.d.ts +112 -0
  80. package/lib/typescript/module/bridge/setupNativeHost.d.ts +39 -0
  81. package/lib/typescript/module/connections/ConnectionSetupScreen.d.ts +107 -0
  82. package/lib/typescript/module/connections/disambiguate.d.ts +43 -0
  83. package/lib/typescript/module/connections/types.d.ts +91 -0
  84. package/lib/typescript/module/connections/useConnectionSetup.d.ts +96 -0
  85. package/lib/typescript/module/controls/FilePicker.d.ts +65 -0
  86. package/lib/typescript/module/controls/ImagePicker.d.ts +76 -0
  87. package/lib/typescript/module/index.d.ts +42 -0
  88. package/lib/typescript/module/logger.d.ts +11 -0
  89. package/lib/typescript/module/package.json +1 -0
  90. package/lib/typescript/module/platform/PowerPlatformConnectionApi.d.ts +205 -0
  91. package/lib/typescript/module/platform/PowerPlatformEnvironmentApi.d.ts +108 -0
  92. package/lib/typescript/module/platform/resolveConnections.d.ts +86 -0
  93. package/lib/typescript/module/platform/useConnectionRefs.d.ts +126 -0
  94. package/lib/typescript/module/provider/PowerAppsHostProvider.d.ts +123 -0
  95. package/lib/typescript/module/provider/PowerAppsProvider.d.ts +148 -0
  96. package/lib/typescript/module/telemetry/index.d.ts +48 -0
  97. package/lib/typescript/module/theme/ThemeProvider.d.ts +30 -0
  98. package/lib/typescript/module/theme/tokens.d.ts +27 -0
  99. package/lib/typescript/module/utils/dataverseUtils.d.ts +39 -0
  100. package/lib/typescript/module/utils/isDevPlayer.d.ts +19 -0
  101. package/package.json +119 -0
  102. package/scripts/build-ios-base.js +96 -0
  103. package/scripts/bundle.js +95 -0
  104. package/scripts/generate-connector-schemas.js +75 -0
@@ -0,0 +1,236 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ImagePicker = ImagePicker;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var ExpoImagePicker = _interopRequireWildcard(require("expo-image-picker"));
10
+ var _vectorIcons = require("@expo/vector-icons");
11
+ var _ThemeProvider = require("../theme/ThemeProvider.js");
12
+ var _dataverseUtils = require("../utils/dataverseUtils.js");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ 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); }
15
+ /**
16
+ * A self-contained image picker that shows a preview and lets the user
17
+ * choose a new image from the library. Works on Android and iOS.
18
+ *
19
+ * - Existing images are seeded from a Dataverse base64 string via `initialBase64`.
20
+ * - On pick, the image is returned as base64 for legacy callers and as a
21
+ * File-compatible object for generated Dataverse upload methods.
22
+ */
23
+ function ImagePicker({
24
+ label = 'Image',
25
+ initialBase64,
26
+ onChange,
27
+ containerStyle,
28
+ labelStyle,
29
+ buttonRowStyle,
30
+ buttonStyle,
31
+ buttonTextStyle,
32
+ previewStyle,
33
+ accentColor,
34
+ onImageChange,
35
+ imageFileName = 'image',
36
+ quality = 0.8,
37
+ allowsEditing = false,
38
+ aspect,
39
+ cropShape,
40
+ exif = false,
41
+ legacy = false,
42
+ cameraButtonLabel = 'Take Photo',
43
+ selectButtonLabel = 'Select Image',
44
+ changeButtonLabel = 'Change Image',
45
+ readingLabel = 'Reading image...'
46
+ }) {
47
+ const theme = (0, _ThemeProvider.useThemeTokens)();
48
+ const accentColor_resolved = accentColor ?? theme.accentBase;
49
+ const labelColor = theme.text2;
50
+ const bg = theme.surface0;
51
+ const previewBg = theme.surface2;
52
+
53
+ // The URI shown in the preview — either a data: URI built from the seeded
54
+ // base64, or the file:// URI of a newly picked image.
55
+ const [previewUri, setPreviewUri] = (0, _react.useState)(null);
56
+ const [reading, setReading] = (0, _react.useState)(false);
57
+ const imagePickerOptions = {
58
+ mediaTypes: ['images'],
59
+ quality,
60
+ allowsEditing,
61
+ base64: true,
62
+ exif,
63
+ legacy,
64
+ ...(allowsEditing && aspect ? {
65
+ aspect
66
+ } : {}),
67
+ ...(allowsEditing && cropShape ? {
68
+ shape: cropShape
69
+ } : {})
70
+ };
71
+ (0, _react.useEffect)(() => {
72
+ if (initialBase64) {
73
+ setPreviewUri((0, _dataverseUtils.base64ToDataUri)(initialBase64));
74
+ } else {
75
+ setPreviewUri(null);
76
+ }
77
+ }, [initialBase64]);
78
+ const handleAsset = asset => {
79
+ const uri = asset.uri;
80
+ const base64 = asset.base64;
81
+ if (!base64) {
82
+ _reactNative.Alert.alert('Unable to read image', 'The selected image did not include image data. Please try again.');
83
+ return;
84
+ }
85
+ setPreviewUri(uri);
86
+ const bytes = (0, _dataverseUtils.base64ToUint8Array)(base64);
87
+ const mimeType = (0, _dataverseUtils.detectImageMime)(base64);
88
+ const extension = mimeType.slice('image/'.length).replace('jpeg', 'jpg');
89
+ const name = asset.fileName ?? (imageFileName.includes('.') ? imageFileName : `${imageFileName}.${extension}`);
90
+ onChange?.(base64);
91
+ onImageChange?.({
92
+ uri,
93
+ name,
94
+ mimeType,
95
+ base64,
96
+ file: (0, _dataverseUtils.createDataverseUploadFile)(name, mimeType, bytes),
97
+ bytes
98
+ });
99
+ };
100
+ const pick = async () => {
101
+ if (reading) return;
102
+ const {
103
+ status
104
+ } = await ExpoImagePicker.requestMediaLibraryPermissionsAsync();
105
+ if (status !== 'granted') {
106
+ _reactNative.Alert.alert('Permission required', 'Please allow access to your photo library.');
107
+ return;
108
+ }
109
+ const result = await ExpoImagePicker.launchImageLibraryAsync(imagePickerOptions);
110
+ if (!result.canceled && result.assets.length > 0) {
111
+ setReading(true);
112
+ try {
113
+ handleAsset(result.assets[0]);
114
+ } finally {
115
+ setReading(false);
116
+ }
117
+ }
118
+ };
119
+ const shoot = async () => {
120
+ if (reading) return;
121
+ const {
122
+ status
123
+ } = await ExpoImagePicker.requestCameraPermissionsAsync();
124
+ if (status !== 'granted') {
125
+ _reactNative.Alert.alert('Permission required', 'Please allow access to your camera.');
126
+ return;
127
+ }
128
+ const result = await ExpoImagePicker.launchCameraAsync(imagePickerOptions);
129
+ if (!result.canceled && result.assets.length > 0) {
130
+ setReading(true);
131
+ try {
132
+ handleAsset(result.assets[0]);
133
+ } finally {
134
+ setReading(false);
135
+ }
136
+ }
137
+ };
138
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
139
+ style: [styles.container, containerStyle],
140
+ children: [label ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
141
+ style: [styles.label, {
142
+ color: labelColor
143
+ }, labelStyle],
144
+ children: label
145
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
146
+ style: [styles.buttonRow, buttonRowStyle],
147
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
148
+ style: [styles.button, {
149
+ borderColor: accentColor_resolved,
150
+ backgroundColor: bg
151
+ }, buttonStyle],
152
+ onPress: shoot,
153
+ activeOpacity: 0.7,
154
+ disabled: reading,
155
+ children: [reading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
156
+ size: "small",
157
+ color: accentColor_resolved
158
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Feather, {
159
+ name: "camera",
160
+ size: 16,
161
+ color: accentColor_resolved
162
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
163
+ style: [styles.buttonText, {
164
+ color: accentColor_resolved
165
+ }, buttonTextStyle],
166
+ children: reading ? readingLabel : cameraButtonLabel
167
+ })]
168
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
169
+ style: [styles.button, {
170
+ borderColor: accentColor_resolved,
171
+ backgroundColor: bg
172
+ }, buttonStyle],
173
+ onPress: pick,
174
+ activeOpacity: 0.7,
175
+ disabled: reading,
176
+ children: [reading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
177
+ size: "small",
178
+ color: accentColor_resolved
179
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Feather, {
180
+ name: "image",
181
+ size: 16,
182
+ color: accentColor_resolved
183
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
184
+ style: [styles.buttonText, {
185
+ color: accentColor_resolved
186
+ }, buttonTextStyle],
187
+ children: reading ? readingLabel : previewUri ? changeButtonLabel : selectButtonLabel
188
+ })]
189
+ })]
190
+ }), previewUri ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
191
+ source: {
192
+ uri: previewUri
193
+ },
194
+ style: [styles.preview, {
195
+ backgroundColor: previewBg
196
+ }, previewStyle],
197
+ resizeMode: "cover"
198
+ }) : null]
199
+ });
200
+ }
201
+ const styles = _reactNative.StyleSheet.create({
202
+ container: {
203
+ marginBottom: 16
204
+ },
205
+ label: {
206
+ fontSize: 12,
207
+ fontWeight: '600',
208
+ marginBottom: 4
209
+ },
210
+ buttonRow: {
211
+ flexDirection: 'row',
212
+ gap: 8
213
+ },
214
+ button: {
215
+ flexDirection: 'row',
216
+ alignItems: 'center',
217
+ gap: 8,
218
+ paddingHorizontal: 16,
219
+ paddingVertical: 10,
220
+ borderWidth: 1,
221
+ borderRadius: 8,
222
+ alignSelf: 'flex-start',
223
+ maxWidth: '100%'
224
+ },
225
+ buttonText: {
226
+ fontSize: 14,
227
+ fontWeight: '600',
228
+ flexShrink: 1
229
+ },
230
+ preview: {
231
+ width: '100%',
232
+ height: 180,
233
+ borderRadius: 8,
234
+ marginTop: 8
235
+ }
236
+ });
@@ -0,0 +1,246 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "AuthProvider", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _AuthContext.AuthProvider;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "ConnectionSetupScreen", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _ConnectionSetupScreen.ConnectionSetupScreen;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "ErrorBoundary", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _ErrorBoundary.ErrorBoundary;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "FilePicker", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _FilePicker.FilePicker;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "HostOperationNames", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _index.HostOperationNames;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "ImagePicker", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _ImagePicker.ImagePicker;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "NativePowerAppsBridge", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _NativePowerAppsBridge.NativePowerAppsBridge;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "POWER_PLATFORM_API_SCOPE", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _PowerPlatformEnvironmentApi.POWER_PLATFORM_API_SCOPE;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "PowerAppsHostProvider", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _PowerAppsHostProvider.PowerAppsHostProvider;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "PowerAppsProvider", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _PowerAppsProvider.PowerAppsProvider;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "ThemeProvider", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _ThemeProvider.ThemeProvider;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "base64ToDataverseUploadFile", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _dataverseUtils.base64ToDataverseUploadFile;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "base64ToUint8Array", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _dataverseUtils.base64ToUint8Array;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "buildCdsDataSources", {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _PowerPlatformEnvironmentApi.buildCdsDataSources;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, "buildConnectionReferences", {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _NativePowerAppsBridge.buildConnectionReferences;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "buildEnvironmentEndpoint", {
97
+ enumerable: true,
98
+ get: function () {
99
+ return _PowerPlatformEnvironmentApi.buildEnvironmentEndpoint;
100
+ }
101
+ });
102
+ Object.defineProperty(exports, "configureAppLogger", {
103
+ enumerable: true,
104
+ get: function () {
105
+ return _index.configureAppLogger;
106
+ }
107
+ });
108
+ Object.defineProperty(exports, "confirmConsentCode", {
109
+ enumerable: true,
110
+ get: function () {
111
+ return _PowerPlatformConnectionApi.confirmConsentCode;
112
+ }
113
+ });
114
+ Object.defineProperty(exports, "createConnection", {
115
+ enumerable: true,
116
+ get: function () {
117
+ return _PowerPlatformConnectionApi.createConnection;
118
+ }
119
+ });
120
+ Object.defineProperty(exports, "createDataverseUploadFile", {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _dataverseUtils.createDataverseUploadFile;
124
+ }
125
+ });
126
+ Object.defineProperty(exports, "darkTheme", {
127
+ enumerable: true,
128
+ get: function () {
129
+ return _tokens.darkTheme;
130
+ }
131
+ });
132
+ Object.defineProperty(exports, "disambiguateConnections", {
133
+ enumerable: true,
134
+ get: function () {
135
+ return _disambiguate.disambiguateConnections;
136
+ }
137
+ });
138
+ Object.defineProperty(exports, "extractConnectionId", {
139
+ enumerable: true,
140
+ get: function () {
141
+ return _disambiguate.extractConnectionId;
142
+ }
143
+ });
144
+ Object.defineProperty(exports, "fetchAppLaunchData", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _PowerPlatformConnectionApi.fetchAppLaunchData;
148
+ }
149
+ });
150
+ Object.defineProperty(exports, "fetchConnectionsForConnector", {
151
+ enumerable: true,
152
+ get: function () {
153
+ return _PowerPlatformConnectionApi.fetchConnectionsForConnector;
154
+ }
155
+ });
156
+ Object.defineProperty(exports, "fetchConnectorMetadata", {
157
+ enumerable: true,
158
+ get: function () {
159
+ return _PowerPlatformConnectionApi.fetchConnectorMetadata;
160
+ }
161
+ });
162
+ Object.defineProperty(exports, "fetchInstanceUrl", {
163
+ enumerable: true,
164
+ get: function () {
165
+ return _PowerPlatformEnvironmentApi.fetchInstanceUrl;
166
+ }
167
+ });
168
+ Object.defineProperty(exports, "getAppLogger", {
169
+ enumerable: true,
170
+ get: function () {
171
+ return _index.getAppLogger;
172
+ }
173
+ });
174
+ Object.defineProperty(exports, "isDevPlayer", {
175
+ enumerable: true,
176
+ get: function () {
177
+ return _isDevPlayer.isDevPlayer;
178
+ }
179
+ });
180
+ Object.defineProperty(exports, "lightTheme", {
181
+ enumerable: true,
182
+ get: function () {
183
+ return _tokens.lightTheme;
184
+ }
185
+ });
186
+ Object.defineProperty(exports, "pollConnectionStatus", {
187
+ enumerable: true,
188
+ get: function () {
189
+ return _PowerPlatformConnectionApi.pollConnectionStatus;
190
+ }
191
+ });
192
+ Object.defineProperty(exports, "setupNativeHost", {
193
+ enumerable: true,
194
+ get: function () {
195
+ return _setupNativeHost.setupNativeHost;
196
+ }
197
+ });
198
+ Object.defineProperty(exports, "useAuth", {
199
+ enumerable: true,
200
+ get: function () {
201
+ return _AuthContext.useAuth;
202
+ }
203
+ });
204
+ Object.defineProperty(exports, "useConnectionRefs", {
205
+ enumerable: true,
206
+ get: function () {
207
+ return _useConnectionRefs.useConnectionRefs;
208
+ }
209
+ });
210
+ Object.defineProperty(exports, "useConnectionSetup", {
211
+ enumerable: true,
212
+ get: function () {
213
+ return _useConnectionSetup.useConnectionSetup;
214
+ }
215
+ });
216
+ Object.defineProperty(exports, "useThemeControl", {
217
+ enumerable: true,
218
+ get: function () {
219
+ return _ThemeProvider.useThemeControl;
220
+ }
221
+ });
222
+ Object.defineProperty(exports, "useThemeTokens", {
223
+ enumerable: true,
224
+ get: function () {
225
+ return _ThemeProvider.useThemeTokens;
226
+ }
227
+ });
228
+ var _NativePowerAppsBridge = require("./bridge/NativePowerAppsBridge.js");
229
+ var _setupNativeHost = require("./bridge/setupNativeHost.js");
230
+ var _AuthContext = require("./auth/AuthContext.js");
231
+ var _PowerAppsHostProvider = require("./provider/PowerAppsHostProvider.js");
232
+ var _PowerAppsProvider = require("./provider/PowerAppsProvider.js");
233
+ var _PowerPlatformEnvironmentApi = require("./platform/PowerPlatformEnvironmentApi.js");
234
+ var _useConnectionRefs = require("./platform/useConnectionRefs.js");
235
+ var _PowerPlatformConnectionApi = require("./platform/PowerPlatformConnectionApi.js");
236
+ var _disambiguate = require("./connections/disambiguate.js");
237
+ var _useConnectionSetup = require("./connections/useConnectionSetup.js");
238
+ var _ConnectionSetupScreen = require("./connections/ConnectionSetupScreen.js");
239
+ var _ThemeProvider = require("./theme/ThemeProvider.js");
240
+ var _tokens = require("./theme/tokens.js");
241
+ var _FilePicker = require("./controls/FilePicker.js");
242
+ var _ImagePicker = require("./controls/ImagePicker.js");
243
+ var _isDevPlayer = require("./utils/isDevPlayer.js");
244
+ var _dataverseUtils = require("./utils/dataverseUtils.js");
245
+ var _index = require("./telemetry/index.js");
246
+ var _ErrorBoundary = require("./ErrorBoundary.js");
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.debugLog = debugLog;
7
+ exports.debugWarn = debugWarn;
8
+ var _isDevPlayer = require("./utils/isDevPlayer.js");
9
+ /**
10
+ * Conditional debug logger for power-apps-native-host.
11
+ *
12
+ * Debug logs (debugLog / debugWarn) are only emitted when the JS bundle
13
+ * is running inside the Power Apps Dev Player (detected via
14
+ * `Constants.expoConfig.extra.isDevPlayer`). They are silenced in release
15
+ * APKs generated from the template so the production log stream stays clean.
16
+ */
17
+
18
+ function debugLog(...args) {
19
+ if (_isDevPlayer.isDevPlayer) {
20
+ console.log(...args);
21
+ }
22
+ }
23
+ function debugWarn(...args) {
24
+ if (_isDevPlayer.isDevPlayer) {
25
+ console.warn(...args);
26
+ }
27
+ }
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}