@ai-matrx/records-ui 0.116.110 → 0.116.112
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 +30 -1
- package/dist/{SaveToTable-WZ4BELUI.js → SaveToTable-GRDFTAC4.js} +4 -4
- package/dist/{chunk-TABDUUEC.js → chunk-DZ4KNUSS.js} +16 -3
- package/dist/chunk-DZ4KNUSS.js.map +1 -0
- package/dist/{chunk-NS2VEKMS.js → chunk-FZVW6XVB.js} +2 -2
- package/dist/{chunk-K7OX6RG6.js → chunk-JTEIYLII.js} +3 -1
- package/dist/chunk-JTEIYLII.js.map +1 -0
- package/dist/{chunk-TZ2KUSHH.js → chunk-LGQLATW5.js} +30 -9
- package/dist/chunk-LGQLATW5.js.map +1 -0
- package/dist/{chunk-T7SXM6ZL.js → chunk-N76I4VXM.js} +5 -4
- package/dist/{chunk-T7SXM6ZL.js.map → chunk-N76I4VXM.js.map} +1 -1
- package/dist/{chunk-D7LNXDKV.js → chunk-Z3EUU2NM.js} +2 -2
- package/dist/helpers.cjs +21 -6
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +11 -3
- package/dist/helpers.d.ts +11 -3
- package/dist/helpers.js +21 -6
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +447 -403
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -4
- package/dist/index.d.ts +13 -4
- package/dist/index.js +247 -240
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +195 -160
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +4 -4
- package/dist/skeleton.js +3 -3
- package/package.json +2 -2
- package/dist/chunk-K7OX6RG6.js.map +0 -1
- package/dist/chunk-TABDUUEC.js.map +0 -1
- package/dist/chunk-TZ2KUSHH.js.map +0 -1
- /package/dist/{SaveToTable-WZ4BELUI.js.map → SaveToTable-GRDFTAC4.js.map} +0 -0
- /package/dist/{chunk-NS2VEKMS.js.map → chunk-FZVW6XVB.js.map} +0 -0
- /package/dist/{chunk-D7LNXDKV.js.map → chunk-Z3EUU2NM.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
dateFormatFor,
|
|
4
4
|
editorKindFor
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JTEIYLII.js";
|
|
6
6
|
|
|
7
7
|
// src/presentation.ts
|
|
8
8
|
import { COLOR_ROTATION, parseTableStyle, tableStyleIsEmpty } from "@ai-matrx/design-system/data-table/table-style";
|
|
@@ -447,4 +447,4 @@ export {
|
|
|
447
447
|
EMBEDDED_TABLE_CLASS,
|
|
448
448
|
EMBEDDED_PLAIN_FOOTER_CLASS
|
|
449
449
|
};
|
|
450
|
-
//# sourceMappingURL=chunk-
|
|
450
|
+
//# sourceMappingURL=chunk-Z3EUU2NM.js.map
|
package/dist/helpers.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var globalSlot = require('@ai-matrx/kit/global-slot');
|
|
4
4
|
var tableStyle = require('@ai-matrx/design-system/data-table/table-style');
|
|
5
|
+
var records = require('@ai-matrx/records');
|
|
5
6
|
var fieldKinds = require('@ai-matrx/records/field-kinds');
|
|
6
7
|
var uuid = require('@ai-matrx/kit/uuid');
|
|
7
8
|
var textCase = require('@ai-matrx/kit/text-case');
|
|
@@ -110,6 +111,7 @@ function setPersonTimeZone(next) {
|
|
|
110
111
|
state.zone = clean;
|
|
111
112
|
tableStyle.setColorRuleTimeZone(clean);
|
|
112
113
|
tableStyle.setDisplayTimeZone(clean);
|
|
114
|
+
records.setReadersTimeZone(clean);
|
|
113
115
|
state.listeners.forEach((l) => l());
|
|
114
116
|
}
|
|
115
117
|
function getPersonTimeZone() {
|
|
@@ -1066,11 +1068,21 @@ function peopleSentence(message) {
|
|
|
1066
1068
|
function refusalSentence(error) {
|
|
1067
1069
|
return refusalForAPerson(error).sentence;
|
|
1068
1070
|
}
|
|
1071
|
+
var BUILD_LABEL = String.raw`(?:Test \d+ \([^)]{1,40}\)|[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+|[A-Z]{1,5}\d+[a-z]?)`;
|
|
1072
|
+
var LEADING_BUILD_LABEL = new RegExp(String.raw`^${BUILD_LABEL}(?:\s*\/\s*${BUILD_LABEL})*:\s+`);
|
|
1073
|
+
function withoutBuildLabel(sentence) {
|
|
1074
|
+
const hit = LEADING_BUILD_LABEL.exec(sentence);
|
|
1075
|
+
if (!hit) return { label: null, rest: sentence };
|
|
1076
|
+
const rest = sentence.slice(hit[0].length).trim();
|
|
1077
|
+
return { label: hit[0].trim(), rest: rest.charAt(0).toUpperCase() + rest.slice(1) };
|
|
1078
|
+
}
|
|
1069
1079
|
function plainSentence(message) {
|
|
1070
1080
|
const dropped = [];
|
|
1071
1081
|
const kept = [];
|
|
1072
1082
|
for (const raw of message.split(/(?<=[.!?])\s+/)) {
|
|
1073
|
-
const
|
|
1083
|
+
const labelled = withoutBuildLabel(raw.trim());
|
|
1084
|
+
if (labelled.label) dropped.push(labelled.label);
|
|
1085
|
+
const sentence = labelled.rest;
|
|
1074
1086
|
if (sentence === "") continue;
|
|
1075
1087
|
const cleaned = withoutMachineClauses(sentence);
|
|
1076
1088
|
dropped.push(...cleaned.dropped);
|
|
@@ -1078,6 +1090,9 @@ function plainSentence(message) {
|
|
|
1078
1090
|
}
|
|
1079
1091
|
return { kept: kept.length === 0 ? null : kept.join(" "), dropped };
|
|
1080
1092
|
}
|
|
1093
|
+
function readsAsASentence(text) {
|
|
1094
|
+
return (text ?? "").trim().split(/\s+/).filter(Boolean).length >= 2;
|
|
1095
|
+
}
|
|
1081
1096
|
function exampleOf(error) {
|
|
1082
1097
|
const detail = error.detail;
|
|
1083
1098
|
if (!detail || typeof detail !== "object") return null;
|
|
@@ -1094,7 +1109,7 @@ function refusalForAPerson(error) {
|
|
|
1094
1109
|
const title = timedOut ? TITLE["timed_out"] : TITLE[code] ?? "That was refused";
|
|
1095
1110
|
const hintIsForEngineers = isDeveloperHint(String(error.hint ?? ""));
|
|
1096
1111
|
const example = exampleOf(error);
|
|
1097
|
-
const remedy = (example ? `Enter it like ${example}.` : null) ?? (hintIsForEngineers ? null : hint.kept) ?? (timedOut ? REMEDY["timed_out"] : REMEDY[code]) ?? REMEDY["internal"];
|
|
1112
|
+
const remedy = (example ? `Enter it like ${example}.` : null) ?? (hintIsForEngineers || !readsAsASentence(hint.kept) ? null : hint.kept) ?? (timedOut ? REMEDY["timed_out"] : REMEDY[code]) ?? REMEDY["internal"];
|
|
1098
1113
|
const messageIsForEngineers = isEngineerText(String(error.message ?? ""));
|
|
1099
1114
|
const said = timedOut ? TIMED_OUT_SAID : (messageIsForEngineers ? "" : message.kept ?? "").trim();
|
|
1100
1115
|
const forEngineers = [
|
|
@@ -1150,16 +1165,16 @@ function announceTableArchived({ notify, client, tableId, name, onRestored }) {
|
|
|
1150
1165
|
notify.reversible({ verb: "archive", noun: "table", subject: name, undo });
|
|
1151
1166
|
return;
|
|
1152
1167
|
}
|
|
1153
|
-
notify?.success(
|
|
1168
|
+
notify?.success("Table archived", {
|
|
1154
1169
|
label: "Undo",
|
|
1155
1170
|
run: () => {
|
|
1156
1171
|
void undo().then(
|
|
1157
|
-
() => notify?.success(
|
|
1172
|
+
() => notify?.success("Restored", void 0, { description: `\u201C${name}\u201D` }),
|
|
1158
1173
|
// The store's refusal is already a person's sentence; anything else never prints raw.
|
|
1159
|
-
(thrown) => notify?.error(thrown instanceof TableRestoreRefused ? thrown.sentence :
|
|
1174
|
+
(thrown) => notify?.error("Not restored", { description: thrown instanceof TableRestoreRefused ? thrown.sentence : `\u201C${name}\u201D` })
|
|
1160
1175
|
);
|
|
1161
1176
|
}
|
|
1162
|
-
});
|
|
1177
|
+
}, { description: `\u201C${name}\u201D` });
|
|
1163
1178
|
}
|
|
1164
1179
|
|
|
1165
1180
|
// src/skeletonLayout.ts
|