@feelflow/ffid-sdk 2.19.0 → 2.20.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 +82 -0
- package/dist/{chunk-SXYB5QM3.js → chunk-GCUVFSB2.js} +1 -1
- package/dist/{chunk-BBXUZS4U.cjs → chunk-KNEZ5OUQ.cjs} +1 -1
- package/dist/components/index.cjs +8 -8
- package/dist/components/index.js +1 -1
- package/dist/ffid-client-Cjm_TKUc.d.cts +1123 -0
- package/dist/ffid-client-Cjm_TKUc.d.ts +1123 -0
- package/dist/index.cjs +31 -31
- package/dist/index.js +2 -2
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.cts +3 -1123
- package/dist/server/index.d.ts +3 -1123
- package/dist/server/index.js +1 -1
- package/dist/server/test/index.cjs +105 -0
- package/dist/server/test/index.d.cts +125 -0
- package/dist/server/test/index.d.ts +125 -0
- package/dist/server/test/index.js +100 -0
- package/package.json +6 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKNEZ5OUQ_cjs = require('./chunk-KNEZ5OUQ.cjs');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
@@ -53,8 +53,8 @@ function defaultRedirect(url) {
|
|
|
53
53
|
}
|
|
54
54
|
function useRequireActiveSubscription(options) {
|
|
55
55
|
const { redirectTo, allowGrace = true, onRedirect } = options;
|
|
56
|
-
const { isLoading, error } =
|
|
57
|
-
const { effectiveStatus, isBlocked, isGrace } =
|
|
56
|
+
const { isLoading, error } = chunkKNEZ5OUQ_cjs.useFFIDContext();
|
|
57
|
+
const { effectiveStatus, isBlocked, isGrace } = chunkKNEZ5OUQ_cjs.useSubscription();
|
|
58
58
|
const hasFetchError = error !== null && effectiveStatus === null;
|
|
59
59
|
const shouldRedirect = !isLoading && !hasFetchError && (isBlocked || !allowGrace && isGrace || effectiveStatus === null);
|
|
60
60
|
react.useEffect(() => {
|
|
@@ -75,7 +75,7 @@ function useRequireActiveSubscription(options) {
|
|
|
75
75
|
}
|
|
76
76
|
function withFFIDAuth(Component, options = {}) {
|
|
77
77
|
const WrappedComponent = (props) => {
|
|
78
|
-
const { isLoading, isAuthenticated, login } =
|
|
78
|
+
const { isLoading, isAuthenticated, login } = chunkKNEZ5OUQ_cjs.useFFIDContext();
|
|
79
79
|
const hasRedirected = react.useRef(false);
|
|
80
80
|
react.useEffect(() => {
|
|
81
81
|
if (!isLoading && !isAuthenticated && options.redirectToLogin && !hasRedirected.current) {
|
|
@@ -103,111 +103,111 @@ var FFID_NEWSLETTER_TYPES = ["inquiry_followup", "general"];
|
|
|
103
103
|
|
|
104
104
|
Object.defineProperty(exports, "DEFAULT_API_BASE_URL", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkKNEZ5OUQ_cjs.DEFAULT_API_BASE_URL; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "FFIDAnnouncementBadge", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFIDAnnouncementBadge; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "FFIDAnnouncementList", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFIDAnnouncementList; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "FFIDInquiryForm", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFIDInquiryForm; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "FFIDLoginButton", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFIDLoginButton; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFIDOrganizationSwitcher; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "FFIDProvider", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFIDProvider; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "FFIDSDKError", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFIDSDKError; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "FFIDSubscriptionBadge", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFIDSubscriptionBadge; }
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "FFIDUserMenu", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFIDUserMenu; }
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "FFID_ANNOUNCEMENTS_ERROR_CODES", {
|
|
145
145
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFID_ANNOUNCEMENTS_ERROR_CODES; }
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES", {
|
|
149
149
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFID_INQUIRY_CATEGORIES; }
|
|
151
151
|
});
|
|
152
152
|
Object.defineProperty(exports, "FFID_INQUIRY_CATEGORIES_SITE_2026", {
|
|
153
153
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunkKNEZ5OUQ_cjs.FFID_INQUIRY_CATEGORIES_SITE_2026; }
|
|
155
155
|
});
|
|
156
156
|
Object.defineProperty(exports, "computeEffectiveStatusFromSession", {
|
|
157
157
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunkKNEZ5OUQ_cjs.computeEffectiveStatusFromSession; }
|
|
159
159
|
});
|
|
160
160
|
Object.defineProperty(exports, "createFFIDAnnouncementsClient", {
|
|
161
161
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunkKNEZ5OUQ_cjs.createFFIDAnnouncementsClient; }
|
|
163
163
|
});
|
|
164
164
|
Object.defineProperty(exports, "createFFIDClient", {
|
|
165
165
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunkKNEZ5OUQ_cjs.createFFIDClient; }
|
|
167
167
|
});
|
|
168
168
|
Object.defineProperty(exports, "createTokenStore", {
|
|
169
169
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunkKNEZ5OUQ_cjs.createTokenStore; }
|
|
171
171
|
});
|
|
172
172
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
173
173
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunkKNEZ5OUQ_cjs.generateCodeChallenge; }
|
|
175
175
|
});
|
|
176
176
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
177
177
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunkKNEZ5OUQ_cjs.generateCodeVerifier; }
|
|
179
179
|
});
|
|
180
180
|
Object.defineProperty(exports, "isFFIDInquiryCategorySite2026", {
|
|
181
181
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunkKNEZ5OUQ_cjs.isFFIDInquiryCategorySite2026; }
|
|
183
183
|
});
|
|
184
184
|
Object.defineProperty(exports, "normalizeRedirectUri", {
|
|
185
185
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
186
|
+
get: function () { return chunkKNEZ5OUQ_cjs.normalizeRedirectUri; }
|
|
187
187
|
});
|
|
188
188
|
Object.defineProperty(exports, "retrieveCodeVerifier", {
|
|
189
189
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunkKNEZ5OUQ_cjs.retrieveCodeVerifier; }
|
|
191
191
|
});
|
|
192
192
|
Object.defineProperty(exports, "storeCodeVerifier", {
|
|
193
193
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunkKNEZ5OUQ_cjs.storeCodeVerifier; }
|
|
195
195
|
});
|
|
196
196
|
Object.defineProperty(exports, "useFFID", {
|
|
197
197
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunkKNEZ5OUQ_cjs.useFFID; }
|
|
199
199
|
});
|
|
200
200
|
Object.defineProperty(exports, "useFFIDAnnouncements", {
|
|
201
201
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunkKNEZ5OUQ_cjs.useFFIDAnnouncements; }
|
|
203
203
|
});
|
|
204
204
|
Object.defineProperty(exports, "useSubscription", {
|
|
205
205
|
enumerable: true,
|
|
206
|
-
get: function () { return
|
|
206
|
+
get: function () { return chunkKNEZ5OUQ_cjs.useSubscription; }
|
|
207
207
|
});
|
|
208
208
|
Object.defineProperty(exports, "withSubscription", {
|
|
209
209
|
enumerable: true,
|
|
210
|
-
get: function () { return
|
|
210
|
+
get: function () { return chunkKNEZ5OUQ_cjs.withSubscription; }
|
|
211
211
|
});
|
|
212
212
|
exports.FFID_NEWSLETTER_TYPES = FFID_NEWSLETTER_TYPES;
|
|
213
213
|
exports.createKVCacheAdapter = createKVCacheAdapter;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useFFIDContext, useSubscription } from './chunk-
|
|
2
|
-
export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-
|
|
1
|
+
import { useFFIDContext, useSubscription } from './chunk-GCUVFSB2.js';
|
|
2
|
+
export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSDKError, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, FFID_INQUIRY_CATEGORIES_SITE_2026, computeEffectiveStatusFromSession, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, isFFIDInquiryCategorySite2026, normalizeRedirectUri, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useSubscription, withSubscription } from './chunk-GCUVFSB2.js';
|
|
3
3
|
import { useEffect, useRef } from 'react';
|
|
4
4
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
|
package/dist/server/index.cjs
CHANGED
|
@@ -803,7 +803,7 @@ function createProfileMethods(deps) {
|
|
|
803
803
|
}
|
|
804
804
|
|
|
805
805
|
// src/client/version-check.ts
|
|
806
|
-
var SDK_VERSION = "2.
|
|
806
|
+
var SDK_VERSION = "2.20.0";
|
|
807
807
|
var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
|
|
808
808
|
var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
|
|
809
809
|
function sdkHeaders() {
|