@ai-matrx/records-ui 0.116.59 → 0.116.60

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/dist/{SaveToTable-2TQKEYJA.js → SaveToTable-VPLDWCSU.js} +4 -4
  3. package/dist/{chunk-AJVN4BMI.js → chunk-2YK72GHL.js} +305 -248
  4. package/dist/chunk-2YK72GHL.js.map +1 -0
  5. package/dist/{chunk-NGOPU3AJ.js → chunk-4KWCNW7V.js} +5 -4
  6. package/dist/{chunk-NGOPU3AJ.js.map → chunk-4KWCNW7V.js.map} +1 -1
  7. package/dist/{chunk-MBUW42SM.js → chunk-NBL26U5K.js} +2 -2
  8. package/dist/{chunk-4ZS4WEEE.js → chunk-TEYXG4XD.js} +73 -4
  9. package/dist/chunk-TEYXG4XD.js.map +1 -0
  10. package/dist/{chunk-HAWACXPU.js → chunk-W6FX3XVF.js} +2 -2
  11. package/dist/{chunk-Y6U5OFJX.js → chunk-WXYI4DKC.js} +3 -3
  12. package/dist/data-source.cjs +2 -1
  13. package/dist/data-source.cjs.map +1 -1
  14. package/dist/data-source.js +2 -1
  15. package/dist/data-source.js.map +1 -1
  16. package/dist/helpers.cjs +7 -7
  17. package/dist/helpers.cjs.map +1 -1
  18. package/dist/helpers.js +8 -8
  19. package/dist/helpers.js.map +1 -1
  20. package/dist/index.cjs +732 -616
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +17 -16
  23. package/dist/index.d.ts +17 -16
  24. package/dist/index.js +53 -62
  25. package/dist/index.js.map +1 -1
  26. package/dist/pickers.cjs +106 -96
  27. package/dist/pickers.cjs.map +1 -1
  28. package/dist/pickers.js +4 -4
  29. package/dist/skeleton.js +3 -3
  30. package/package.json +4 -4
  31. package/dist/chunk-4ZS4WEEE.js.map +0 -1
  32. package/dist/chunk-AJVN4BMI.js.map +0 -1
  33. /package/dist/{SaveToTable-2TQKEYJA.js.map → SaveToTable-VPLDWCSU.js.map} +0 -0
  34. /package/dist/{chunk-MBUW42SM.js.map → chunk-NBL26U5K.js.map} +0 -0
  35. /package/dist/{chunk-HAWACXPU.js.map → chunk-W6FX3XVF.js.map} +0 -0
  36. /package/dist/{chunk-Y6U5OFJX.js.map → chunk-WXYI4DKC.js.map} +0 -0
package/dist/helpers.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { globalSlot } from '@ai-matrx/kit/global-slot';
2
- import { tableStyleIsEmpty, parseTableStyle, setColorRuleTimeZone } from '@ai-matrx/design-system/data-table/table-style';
2
+ import { tableStyleIsEmpty, parseTableStyle, setColorRuleTimeZone, setDisplayTimeZone } from '@ai-matrx/design-system/data-table/table-style';
3
3
  import { DECLARABLE_FIELD_KINDS, NEWER_FIELD_KINDS, PARITY_FIELD_TYPES, KERNEL_TABLES, atLeast, fieldKindFor, isButtonField, newerKindOf } from '@ai-matrx/records/field-kinds';
4
4
  export { DEFAULT_FIELDS, addFields, declareTable, fieldDeclarationFor, tokenFor } from '@ai-matrx/records/field-kinds';
5
5
  import { isUuidShape } from '@ai-matrx/kit/uuid';
6
6
  import { humanizeIdentifier } from '@ai-matrx/kit/text-case';
7
7
  import { formatRelativeTime } from '@ai-matrx/kit/format';
8
- import '@ai-matrx/design-system/field-formats';
8
+ import { momentZoneOptions } from '@ai-matrx/design-system/field-formats';
9
9
  import * as base from '@ai-matrx/records/views';
10
10
  export { endingsFromDocument, hiddenFromLink, themeFromDocument, welcomeFromDocument } from '@ai-matrx/records/forms';
11
11
  import { toDelimited } from '@ai-matrx/kit/delimited';
@@ -78,6 +78,7 @@ function setPersonTimeZone(next) {
78
78
  if (clean === state.zone) return;
79
79
  state.zone = clean;
80
80
  setColorRuleTimeZone(clean);
81
+ setDisplayTimeZone(clean);
81
82
  state.listeners.forEach((l) => l());
82
83
  }
83
84
  function getPersonTimeZone() {
@@ -248,6 +249,7 @@ function cardTitleField(fields, titleKey, exclude = []) {
248
249
  }
249
250
  return ordered.find((f) => f.type === "text" && canTitle(f, excluded)) ?? ordered.find((f) => canTitle(f, excluded));
250
251
  }
252
+ var displayZone = globalSlot("ai-matrx.design-system.display-time-zone", () => ({ zone: null }));
251
253
  var SOMEBODY = "somebody in this organization";
252
254
  var THE_SYSTEM = "Matrx";
253
255
  function actorWords(actor, resolve) {
@@ -266,7 +268,7 @@ function whenWords(at, now = /* @__PURE__ */ new Date()) {
266
268
  const age = now.getTime() - then.getTime();
267
269
  if (!Number.isFinite(age)) return "at an unknown time";
268
270
  if (age < 30 * 864e5) return formatRelativeTime(then, { style: "intl", now: now.getTime() });
269
- return then.toLocaleDateString();
271
+ return then.toLocaleDateString(void 0, displayZone.zone ? { timeZone: displayZone.zone } : void 0);
270
272
  }
271
273
  var OPERATION_WORDS = {
272
274
  created: "Created",
@@ -466,8 +468,6 @@ function fieldTypeLabel(field) {
466
468
  };
467
469
  return plain[kind] ?? humanizeIdentifier(kind);
468
470
  }
469
-
470
- // src/tablePickerEntries.ts
471
471
  var PLATFORM_TABLE_PREFIX = "records_ui_";
472
472
  function keptByPlatform(table) {
473
473
  return table.platform_owned === true || table.kept_by_the_app === true;
@@ -509,7 +509,7 @@ function madeOn(stamp) {
509
509
  if (!stamp) return null;
510
510
  const at = new Date(stamp);
511
511
  if (Number.isNaN(at.getTime())) return null;
512
- return new Intl.DateTimeFormat(void 0, { month: "short", day: "numeric", year: "numeric" }).format(at);
512
+ return new Intl.DateTimeFormat(void 0, { month: "short", day: "numeric", year: "numeric", ...momentZoneOptions(at) }).format(at);
513
513
  }
514
514
  function parseGanttLook(raw) {
515
515
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) return void 0;
@@ -889,8 +889,8 @@ function googleCalendarUrl(httpsUrl) {
889
889
  var FIELD_SENSITIVITY_LABEL = {
890
890
  public: "Anyone who can open the record",
891
891
  internal: "People in this organization",
892
- confidential: "People who have been given the record",
893
- restricted: "Owners and administrators only"
892
+ confidential: "Editors and administrators",
893
+ restricted: "Administrators only"
894
894
  };
895
895
  var STORE_BEHAVIOUR = new Map(DECLARABLE_FIELD_KINDS.map((row) => [row.kind, row.behavior]));
896
896
  function holdsAValueOnAStandardTable(kind) {