@ai-matrx/records-ui 0.116.45 → 0.116.47
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 +29 -1
- package/dist/{SaveToTable-SL5DUNI4.js → SaveToTable-HG3HQMAQ.js} +5 -5
- package/dist/{chunk-KQR2RA4V.js → chunk-ABIUJCNS.js} +3 -3
- package/dist/chunk-ABIUJCNS.js.map +1 -0
- package/dist/{chunk-F4SAKQKQ.js → chunk-K3B5IRXY.js} +79 -76
- package/dist/chunk-K3B5IRXY.js.map +1 -0
- package/dist/{chunk-OV6QBL5R.js → chunk-LBZZDHV6.js} +8 -8
- package/dist/chunk-LBZZDHV6.js.map +1 -0
- package/dist/{chunk-NKZBAIU4.js → chunk-MDXDJVDB.js} +8 -6
- package/dist/chunk-MDXDJVDB.js.map +1 -0
- package/dist/{chunk-XKI6S5KF.js → chunk-VJDJQDDI.js} +7 -7
- package/dist/{chunk-XKI6S5KF.js.map → chunk-VJDJQDDI.js.map} +1 -1
- package/dist/helpers.cjs +14 -12
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.js +14 -12
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +137 -116
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +46 -30
- package/dist/index.js.map +1 -1
- package/dist/object-actions.cjs +8 -8
- package/dist/object-actions.cjs.map +1 -1
- package/dist/object-actions.d.cts +1 -1
- package/dist/object-actions.d.ts +1 -1
- package/dist/object-actions.js +2 -2
- package/dist/{objectActions-Be9sBGvW.d.cts → objectActions-DK-qa5zC.d.cts} +1 -1
- package/dist/{objectActions-Be9sBGvW.d.ts → objectActions-DK-qa5zC.d.ts} +1 -1
- package/dist/pickers.cjs +90 -86
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +3 -3
- package/package.json +5 -5
- package/dist/chunk-F4SAKQKQ.js.map +0 -1
- package/dist/chunk-KQR2RA4V.js.map +0 -1
- package/dist/chunk-NKZBAIU4.js.map +0 -1
- package/dist/chunk-OV6QBL5R.js.map +0 -1
- /package/dist/{SaveToTable-SL5DUNI4.js.map → SaveToTable-HG3HQMAQ.js.map} +0 -0
package/dist/helpers.cjs
CHANGED
|
@@ -127,11 +127,11 @@ function personWallNow(at = /* @__PURE__ */ new Date()) {
|
|
|
127
127
|
return new Date(n("year"), n("month") - 1, n("day"), n("hour"), n("minute"), n("second"));
|
|
128
128
|
}
|
|
129
129
|
var LEVEL_WORD = {
|
|
130
|
-
viewer: "
|
|
131
|
-
commenter: "
|
|
132
|
-
edit_content: "
|
|
133
|
-
editor: "
|
|
134
|
-
admin: "
|
|
130
|
+
viewer: "View access",
|
|
131
|
+
commenter: "Comment access",
|
|
132
|
+
edit_content: "Edit access",
|
|
133
|
+
editor: "Edit access",
|
|
134
|
+
admin: "Full access"
|
|
135
135
|
};
|
|
136
136
|
var NEEDS = {
|
|
137
137
|
read: "viewer",
|
|
@@ -156,7 +156,7 @@ function levelNeededFor(what) {
|
|
|
156
156
|
return NEEDS[what];
|
|
157
157
|
}
|
|
158
158
|
var NOT_YET = "Checking what you may do here. Nothing is offered until then.";
|
|
159
|
-
var NOTHING_AT_ALL = "You have not been given this. Ask somebody
|
|
159
|
+
var NOTHING_AT_ALL = "You have not been given this. Ask somebody with Full access on it to share it with you.";
|
|
160
160
|
function sentenceFor(what, level) {
|
|
161
161
|
if (level === null) return NOTHING_AT_ALL;
|
|
162
162
|
const need = LEVEL_WORD[NEEDS[what]];
|
|
@@ -170,7 +170,7 @@ function sentenceFor(what, level) {
|
|
|
170
170
|
share: "pass this on to somebody else",
|
|
171
171
|
structure: "change the columns of this table"
|
|
172
172
|
};
|
|
173
|
-
return `You
|
|
173
|
+
return `You have ${have} here, and it takes ${need} to ${doing[what]}. Ask somebody with Full access on it to move you up.`;
|
|
174
174
|
}
|
|
175
175
|
function whatYouMayDo(level, known = true) {
|
|
176
176
|
const may = (what) => known && fieldKinds.atLeast(level, NEEDS[what]);
|
|
@@ -1070,23 +1070,25 @@ function exampleOf(error) {
|
|
|
1070
1070
|
const example = detail.example;
|
|
1071
1071
|
return typeof example === "string" && example.trim() !== "" ? example.trim() : null;
|
|
1072
1072
|
}
|
|
1073
|
+
var TIMED_OUT_SAID = "That took too long. Nothing was lost; try again.";
|
|
1073
1074
|
function refusalForAPerson(error) {
|
|
1074
1075
|
const code = error.code ?? "internal";
|
|
1076
|
+
const timedOut = code === "timed_out" || error.sqlstate === "57014" || /canceling statement due to statement timeout/i.test(String(error.message ?? ""));
|
|
1075
1077
|
const ours = error.ours === true;
|
|
1076
1078
|
const hint = plainSentence(String(error.hint ?? ""));
|
|
1077
1079
|
const message = ours ? plainSentence(String(error.message ?? "")) : peopleSentence(String(error.message ?? ""));
|
|
1078
|
-
const title = TITLE[code] ?? "That was refused";
|
|
1080
|
+
const title = timedOut ? TITLE["timed_out"] : TITLE[code] ?? "That was refused";
|
|
1079
1081
|
const hintIsForEngineers = isDeveloperHint(String(error.hint ?? ""));
|
|
1080
1082
|
const example = exampleOf(error);
|
|
1081
|
-
const remedy = (example ? `Enter it like ${example}.` : null) ?? (hintIsForEngineers ? null : hint.kept) ?? REMEDY[code] ?? REMEDY["internal"];
|
|
1083
|
+
const remedy = (example ? `Enter it like ${example}.` : null) ?? (hintIsForEngineers ? null : hint.kept) ?? (timedOut ? REMEDY["timed_out"] : REMEDY[code]) ?? REMEDY["internal"];
|
|
1082
1084
|
const messageIsForEngineers = isEngineerText(String(error.message ?? ""));
|
|
1083
|
-
const said = (messageIsForEngineers ? "" : message.kept ?? "").trim();
|
|
1085
|
+
const said = timedOut ? TIMED_OUT_SAID : (messageIsForEngineers ? "" : message.kept ?? "").trim();
|
|
1084
1086
|
const forEngineers = [
|
|
1085
1087
|
error.sqlstate ? `SQLSTATE ${error.sqlstate}.` : null,
|
|
1086
1088
|
// The client's own note about a class it did not recognize, or a call that
|
|
1087
1089
|
// never reached the store. It is rendered out of sight, never as a sentence.
|
|
1088
1090
|
error.diagnostic ? error.diagnostic : null,
|
|
1089
|
-
messageIsForEngineers ? `Message: ${error.message}` : null,
|
|
1091
|
+
messageIsForEngineers || timedOut ? `Message: ${error.message}` : null,
|
|
1090
1092
|
error.hint && (hintIsForEngineers || hint.kept !== error.hint) ? `Hint: ${error.hint}` : null,
|
|
1091
1093
|
message.dropped.length > 0 || hint.dropped.length > 0 ? `Dropped from the person's view: ${[...message.dropped, ...hint.dropped].join(" | ")}` : null
|
|
1092
1094
|
].filter(Boolean).join(" ");
|
|
@@ -1230,7 +1232,7 @@ function rightsReason(rights, what, table) {
|
|
|
1230
1232
|
if (!rights.known) return ACTION_CHECKING_ACCESS_REASON;
|
|
1231
1233
|
if (rights[what]) return null;
|
|
1232
1234
|
if (rights.level === null) return ACTION_NO_ACCESS_REASON;
|
|
1233
|
-
return `Needs ${LEVEL_WORD[levelNeededFor(what)]}
|
|
1235
|
+
return `Needs ${LEVEL_WORD[levelNeededFor(what)]}`;
|
|
1234
1236
|
}
|
|
1235
1237
|
var TABLE_ACTION_CHORDS = {
|
|
1236
1238
|
"copy-link": { code: "KeyL", chord: "alt+shift+l" },
|