@ai-matrx/records-ui 0.116.64 → 0.116.66
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 +11 -1
- package/dist/{SaveToTable-VPLDWCSU.js → SaveToTable-OYJH3OKN.js} +3 -3
- package/dist/{chunk-QXPUBNYQ.js → chunk-57CGHFPO.js} +14 -4
- package/dist/{chunk-QXPUBNYQ.js.map → chunk-57CGHFPO.js.map} +1 -1
- package/dist/{chunk-WXYI4DKC.js → chunk-EACZUXJO.js} +2 -2
- package/dist/{chunk-4KWCNW7V.js → chunk-ZX4EFZSB.js} +2 -2
- package/dist/{chunk-4KWCNW7V.js.map → chunk-ZX4EFZSB.js.map} +1 -1
- package/dist/data-source.cjs +11 -1
- package/dist/data-source.cjs.map +1 -1
- package/dist/data-source.js +11 -1
- package/dist/data-source.js.map +1 -1
- package/dist/helpers.cjs +12 -2
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.js +12 -2
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/pickers.cjs +1 -1
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +2 -2
- package/package.json +4 -4
- /package/dist/{SaveToTable-VPLDWCSU.js.map → SaveToTable-OYJH3OKN.js.map} +0 -0
- /package/dist/{chunk-WXYI4DKC.js.map → chunk-EACZUXJO.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1879,7 +1879,7 @@ var init_enumLabels = __esm({
|
|
|
1879
1879
|
FIELD_SENSITIVITY_LABEL = {
|
|
1880
1880
|
public: "Anyone who can open the record",
|
|
1881
1881
|
internal: "People in this organization",
|
|
1882
|
-
confidential: "
|
|
1882
|
+
confidential: "Administrators and anyone granted it",
|
|
1883
1883
|
restricted: "Administrators only"
|
|
1884
1884
|
};
|
|
1885
1885
|
CONTEXT_POLICY_LABEL = {
|
|
@@ -24372,7 +24372,8 @@ function makeRecordsDataSource(client, fallbackSchema) {
|
|
|
24372
24372
|
opensInOneCall: true,
|
|
24373
24373
|
async rpc(fn, args, options) {
|
|
24374
24374
|
const schema = options?.schema ?? fallbackSchema;
|
|
24375
|
-
|
|
24375
|
+
const getSession = schema === "custom" ? sessionReader(supabase) : void 0;
|
|
24376
|
+
if (getSession && !await hasSession(getSession)) {
|
|
24376
24377
|
return { data: null, error: SIGNED_OUT };
|
|
24377
24378
|
}
|
|
24378
24379
|
const on = supabase.schema(schema);
|
|
@@ -24383,6 +24384,15 @@ function makeRecordsDataSource(client, fallbackSchema) {
|
|
|
24383
24384
|
}
|
|
24384
24385
|
};
|
|
24385
24386
|
}
|
|
24387
|
+
function sessionReader(supabase) {
|
|
24388
|
+
try {
|
|
24389
|
+
const auth = supabase.auth;
|
|
24390
|
+
const getSession = auth?.getSession;
|
|
24391
|
+
return typeof getSession === "function" ? () => getSession.call(auth) : void 0;
|
|
24392
|
+
} catch {
|
|
24393
|
+
return void 0;
|
|
24394
|
+
}
|
|
24395
|
+
}
|
|
24386
24396
|
var SIGNED_OUT = {
|
|
24387
24397
|
code: "42501",
|
|
24388
24398
|
message: "Nobody is signed in, so there is nothing to read.",
|