@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/helpers.js
CHANGED
|
@@ -35,7 +35,8 @@ function makeRecordsDataSource(client, fallbackSchema) {
|
|
|
35
35
|
opensInOneCall: true,
|
|
36
36
|
async rpc(fn, args, options) {
|
|
37
37
|
const schema = options?.schema ?? fallbackSchema;
|
|
38
|
-
|
|
38
|
+
const getSession = schema === "custom" ? sessionReader(supabase) : void 0;
|
|
39
|
+
if (getSession && !await hasSession(getSession)) {
|
|
39
40
|
return { data: null, error: SIGNED_OUT };
|
|
40
41
|
}
|
|
41
42
|
const on = supabase.schema(schema);
|
|
@@ -46,6 +47,15 @@ function makeRecordsDataSource(client, fallbackSchema) {
|
|
|
46
47
|
}
|
|
47
48
|
};
|
|
48
49
|
}
|
|
50
|
+
function sessionReader(supabase) {
|
|
51
|
+
try {
|
|
52
|
+
const auth = supabase.auth;
|
|
53
|
+
const getSession = auth?.getSession;
|
|
54
|
+
return typeof getSession === "function" ? () => getSession.call(auth) : void 0;
|
|
55
|
+
} catch {
|
|
56
|
+
return void 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
49
59
|
var SIGNED_OUT = {
|
|
50
60
|
code: "42501",
|
|
51
61
|
message: "Nobody is signed in, so there is nothing to read.",
|
|
@@ -889,7 +899,7 @@ function googleCalendarUrl(httpsUrl) {
|
|
|
889
899
|
var FIELD_SENSITIVITY_LABEL = {
|
|
890
900
|
public: "Anyone who can open the record",
|
|
891
901
|
internal: "People in this organization",
|
|
892
|
-
confidential: "
|
|
902
|
+
confidential: "Administrators and anyone granted it",
|
|
893
903
|
restricted: "Administrators only"
|
|
894
904
|
};
|
|
895
905
|
var STORE_BEHAVIOUR = new Map(DECLARABLE_FIELD_KINDS.map((row) => [row.kind, row.behavior]));
|