@oods/components-vue 0.11.3 → 0.13.0

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/README.md CHANGED
@@ -34,4 +34,4 @@ Generated apps pin the OODS release that generated them; to upgrade, regenerate
34
34
 
35
35
  ## License
36
36
 
37
- Apache License 2.0. See [LICENSE](https://cdn.jsdelivr.net/npm/@oods/components-vue@0.11.3/LICENSE) and [NOTICE](https://cdn.jsdelivr.net/npm/@oods/components-vue@0.11.3/NOTICE). Generated output belongs to its user; installed package dependencies retain their own licenses.
37
+ Apache License 2.0. See [LICENSE](https://cdn.jsdelivr.net/npm/@oods/components-vue@0.13.0/LICENSE) and [NOTICE](https://cdn.jsdelivr.net/npm/@oods/components-vue@0.13.0/NOTICE). Generated output belongs to its user; installed package dependencies retain their own licenses.
package/dist/index.cjs CHANGED
@@ -2323,11 +2323,13 @@ function normalizeTimelineEvents(raw) {
2323
2323
  }
2324
2324
  const from = firstText2(entry, ["from"]);
2325
2325
  const to = firstText2(entry, ["to"]);
2326
+ const attribution = componentContracts.historyAttribution(entry);
2326
2327
  events.push({
2327
2328
  label: firstText2(entry, ["label", "title"]) ?? (firstText2(entry, ["event", "status", "state"]) ? statusLabel2(firstText2(entry, ["event", "status", "state"])) : void 0) ?? firstText2(entry, ["text", "name"]) ?? (to ? from ? `${statusLabel2(from)} \u2192 ${statusLabel2(to)}` : statusLabel2(to) : void 0) ?? "Event",
2328
2329
  timestamp: firstText2(entry, ["timestamp", "datetime", "time", "at", "createdAt", "updatedAt"]),
2329
2330
  detail: firstText2(entry, ["detail", "description", "message"]) ?? (to ? from ? `${statusLabel2(from)} \u2192 ${statusLabel2(to)}` : statusLabel2(to) : void 0),
2330
- actorId: firstText2(entry, ["actorId", "actor_id", "actor"]),
2331
+ actorId: attribution?.namesActor ? void 0 : firstText2(entry, ["actorId", "actor_id", "actor"]),
2332
+ ...attribution ? { attribution: attribution.text } : {},
2331
2333
  reason: firstText2(entry, ["reason"])
2332
2334
  });
2333
2335
  }
@@ -2538,6 +2540,7 @@ function renderTimelineEvent(event, index, showActorId, showReason) {
2538
2540
  vue.h("p", { class: "oods-timeline__label", "data-timeline-label": "true" }, event.label),
2539
2541
  event.timestamp ? vue.h("time", { "data-timeline-time": "true", datetime: event.timestamp }, componentContracts.formatDateTime(event.timestamp)) : null,
2540
2542
  event.detail ? vue.h("p", { class: "oods-timeline__detail", "data-timeline-detail": "true" }, event.detail) : null,
2543
+ showActorId && event.attribution ? vue.h("p", { class: "oods-timeline__actor", "data-timeline-attribution": "true" }, event.attribution) : null,
2541
2544
  showActorId && event.actorId ? vue.h("p", { class: "oods-timeline__actor", "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
2542
2545
  showReason && event.reason ? vue.h("p", { class: "oods-timeline__reason", "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
2543
2546
  ])
@@ -3103,7 +3106,7 @@ function eventRecipe(id, kind, title) {
3103
3106
  return vue.defineComponent({ name: id, props: { id: String, title: { type: String, default: title }, archivedAt: String, restoredAt: String, archivedBy: String, reason: String, timestamp: String, code: String, history: array, status: String, showActor: { type: Boolean, default: true }, showReason: { type: Boolean, default: true } }, setup: (props) => () => {
3104
3107
  const rows = componentContracts.traitEventRows(kind, props);
3105
3108
  if (!rows.length) return null;
3106
- return vue.h("article", { id: props.id, class: "oods-trait-recipe", "data-oods-component": id, "aria-label": props.title }, [vue.h("h2", props.title), vue.h("ol", rows.map((row, index) => vue.h("li", { key: index }, [vue.h("strong", row.title), vue.h("p", row.at ? vue.h("time", { datetime: row.at }, row.time) : row.time), row.actor && vue.h("p", `Actor: ${row.actor}`), row.reason && vue.h("p", `Reason: ${row.reason}`), row.code && vue.h("p", `Code: ${row.code}`)])))]);
3109
+ return vue.h("article", { id: props.id, class: "oods-trait-recipe", "data-oods-component": id, "aria-label": props.title }, [vue.h("h2", props.title), vue.h("ol", rows.map((row, index) => vue.h("li", { key: index }, [vue.h("strong", row.title), vue.h("p", row.at ? vue.h("time", { datetime: row.at }, row.time) : row.time), row.attribution && vue.h("p", row.attribution), row.actor && vue.h("p", `Actor: ${row.actor}`), row.reason && vue.h("p", `Reason: ${row.reason}`), row.code && vue.h("p", `Code: ${row.code}`)])))]);
3107
3110
  } });
3108
3111
  }
3109
3112
  var ArchiveEvent = eventRecipe("ArchiveEvent", "archive", "Archive events");
package/dist/index.d.cts CHANGED
@@ -2340,6 +2340,8 @@ type TimelineEvent = {
2340
2340
  timestamp?: string;
2341
2341
  detail?: string;
2342
2342
  actorId?: string;
2343
+ /** s244-m01 (#2829): who acted, for whom and who approved, from the entry's *_name fields (historyAttribution). */
2344
+ attribution?: string;
2343
2345
  reason?: string;
2344
2346
  };
2345
2347
  type PaginationItem = {
package/dist/index.d.ts CHANGED
@@ -2340,6 +2340,8 @@ type TimelineEvent = {
2340
2340
  timestamp?: string;
2341
2341
  detail?: string;
2342
2342
  actorId?: string;
2343
+ /** s244-m01 (#2829): who acted, for whom and who approved, from the entry's *_name fields (historyAttribution). */
2344
+ attribution?: string;
2343
2345
  reason?: string;
2344
2346
  };
2345
2347
  type PaginationItem = {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, h, useId, computed, ref, onMounted, onBeforeUnmount, watch, nextTick, isVNode, Text as Text$1, Comment, Fragment } from 'vue';
2
- import { vizPreviewLayers, svgCarriesTitle, formatPriceAmount, formatPriceCode, formatReferenceLabel, ownershipPhrase, summaryValue, formatDateTime, dateTimeInputValue, formatReadOnlyValue, BILLING_MINOR_UNITS, billingSummary, formatBillingAmount, billingAmountText, billingAmountMessage, parseBillingAmount, BILLING_INTERVALS, billingIntervalMessage, billingCycle, auditSummary, initialSort, ariaSort, nextSort, recipeItemLabels, DEFAULT_COLOR_STATES, geoFieldMapping, STATUS_ICON_SVG_ATTRS, STATUS_ICON_SHAPES, getStatusPresentation, resolveStatusIcon, currencyMinorUnits, billingPaymentSummary, billingPaymentRows, traitEventRows, vizControlFields, VIZ_CONTROL_TITLES, vizFieldValue, vizSummaryRows, editVizIntent } from '@oods/component-contracts';
2
+ import { vizPreviewLayers, svgCarriesTitle, formatPriceAmount, formatPriceCode, formatReferenceLabel, ownershipPhrase, summaryValue, formatDateTime, dateTimeInputValue, formatReadOnlyValue, BILLING_MINOR_UNITS, billingSummary, formatBillingAmount, billingAmountText, billingAmountMessage, parseBillingAmount, BILLING_INTERVALS, billingIntervalMessage, billingCycle, auditSummary, initialSort, ariaSort, nextSort, recipeItemLabels, DEFAULT_COLOR_STATES, geoFieldMapping, STATUS_ICON_SVG_ATTRS, STATUS_ICON_SHAPES, getStatusPresentation, resolveStatusIcon, currencyMinorUnits, billingPaymentSummary, billingPaymentRows, traitEventRows, vizControlFields, VIZ_CONTROL_TITLES, vizFieldValue, vizSummaryRows, historyAttribution, editVizIntent } from '@oods/component-contracts';
3
3
 
4
4
  // src/primitives.ts
5
5
  function statusIcon(name) {
@@ -2321,11 +2321,13 @@ function normalizeTimelineEvents(raw) {
2321
2321
  }
2322
2322
  const from = firstText2(entry, ["from"]);
2323
2323
  const to = firstText2(entry, ["to"]);
2324
+ const attribution = historyAttribution(entry);
2324
2325
  events.push({
2325
2326
  label: firstText2(entry, ["label", "title"]) ?? (firstText2(entry, ["event", "status", "state"]) ? statusLabel2(firstText2(entry, ["event", "status", "state"])) : void 0) ?? firstText2(entry, ["text", "name"]) ?? (to ? from ? `${statusLabel2(from)} \u2192 ${statusLabel2(to)}` : statusLabel2(to) : void 0) ?? "Event",
2326
2327
  timestamp: firstText2(entry, ["timestamp", "datetime", "time", "at", "createdAt", "updatedAt"]),
2327
2328
  detail: firstText2(entry, ["detail", "description", "message"]) ?? (to ? from ? `${statusLabel2(from)} \u2192 ${statusLabel2(to)}` : statusLabel2(to) : void 0),
2328
- actorId: firstText2(entry, ["actorId", "actor_id", "actor"]),
2329
+ actorId: attribution?.namesActor ? void 0 : firstText2(entry, ["actorId", "actor_id", "actor"]),
2330
+ ...attribution ? { attribution: attribution.text } : {},
2329
2331
  reason: firstText2(entry, ["reason"])
2330
2332
  });
2331
2333
  }
@@ -2536,6 +2538,7 @@ function renderTimelineEvent(event, index, showActorId, showReason) {
2536
2538
  h("p", { class: "oods-timeline__label", "data-timeline-label": "true" }, event.label),
2537
2539
  event.timestamp ? h("time", { "data-timeline-time": "true", datetime: event.timestamp }, formatDateTime(event.timestamp)) : null,
2538
2540
  event.detail ? h("p", { class: "oods-timeline__detail", "data-timeline-detail": "true" }, event.detail) : null,
2541
+ showActorId && event.attribution ? h("p", { class: "oods-timeline__actor", "data-timeline-attribution": "true" }, event.attribution) : null,
2539
2542
  showActorId && event.actorId ? h("p", { class: "oods-timeline__actor", "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
2540
2543
  showReason && event.reason ? h("p", { class: "oods-timeline__reason", "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
2541
2544
  ])
@@ -3101,7 +3104,7 @@ function eventRecipe(id, kind, title) {
3101
3104
  return defineComponent({ name: id, props: { id: String, title: { type: String, default: title }, archivedAt: String, restoredAt: String, archivedBy: String, reason: String, timestamp: String, code: String, history: array, status: String, showActor: { type: Boolean, default: true }, showReason: { type: Boolean, default: true } }, setup: (props) => () => {
3102
3105
  const rows = traitEventRows(kind, props);
3103
3106
  if (!rows.length) return null;
3104
- return h("article", { id: props.id, class: "oods-trait-recipe", "data-oods-component": id, "aria-label": props.title }, [h("h2", props.title), h("ol", rows.map((row, index) => h("li", { key: index }, [h("strong", row.title), h("p", row.at ? h("time", { datetime: row.at }, row.time) : row.time), row.actor && h("p", `Actor: ${row.actor}`), row.reason && h("p", `Reason: ${row.reason}`), row.code && h("p", `Code: ${row.code}`)])))]);
3107
+ return h("article", { id: props.id, class: "oods-trait-recipe", "data-oods-component": id, "aria-label": props.title }, [h("h2", props.title), h("ol", rows.map((row, index) => h("li", { key: index }, [h("strong", row.title), h("p", row.at ? h("time", { datetime: row.at }, row.time) : row.time), row.attribution && h("p", row.attribution), row.actor && h("p", `Actor: ${row.actor}`), row.reason && h("p", `Reason: ${row.reason}`), row.code && h("p", `Code: ${row.code}`)])))]);
3105
3108
  } });
3106
3109
  }
3107
3110
  var ArchiveEvent = eventRecipe("ArchiveEvent", "archive", "Archive events");
package/dist/ported.cjs CHANGED
@@ -814,11 +814,13 @@ function normalizeTimelineEvents(raw) {
814
814
  }
815
815
  const from = firstText(entry, ["from"]);
816
816
  const to = firstText(entry, ["to"]);
817
+ const attribution = componentContracts.historyAttribution(entry);
817
818
  events.push({
818
819
  label: firstText(entry, ["label", "title"]) ?? (firstText(entry, ["event", "status", "state"]) ? statusLabel2(firstText(entry, ["event", "status", "state"])) : void 0) ?? firstText(entry, ["text", "name"]) ?? (to ? from ? `${statusLabel2(from)} \u2192 ${statusLabel2(to)}` : statusLabel2(to) : void 0) ?? "Event",
819
820
  timestamp: firstText(entry, ["timestamp", "datetime", "time", "at", "createdAt", "updatedAt"]),
820
821
  detail: firstText(entry, ["detail", "description", "message"]) ?? (to ? from ? `${statusLabel2(from)} \u2192 ${statusLabel2(to)}` : statusLabel2(to) : void 0),
821
- actorId: firstText(entry, ["actorId", "actor_id", "actor"]),
822
+ actorId: attribution?.namesActor ? void 0 : firstText(entry, ["actorId", "actor_id", "actor"]),
823
+ ...attribution ? { attribution: attribution.text } : {},
822
824
  reason: firstText(entry, ["reason"])
823
825
  });
824
826
  }
@@ -1029,6 +1031,7 @@ function renderTimelineEvent(event, index, showActorId, showReason) {
1029
1031
  vue.h("p", { class: "oods-timeline__label", "data-timeline-label": "true" }, event.label),
1030
1032
  event.timestamp ? vue.h("time", { "data-timeline-time": "true", datetime: event.timestamp }, componentContracts.formatDateTime(event.timestamp)) : null,
1031
1033
  event.detail ? vue.h("p", { class: "oods-timeline__detail", "data-timeline-detail": "true" }, event.detail) : null,
1034
+ showActorId && event.attribution ? vue.h("p", { class: "oods-timeline__actor", "data-timeline-attribution": "true" }, event.attribution) : null,
1032
1035
  showActorId && event.actorId ? vue.h("p", { class: "oods-timeline__actor", "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
1033
1036
  showReason && event.reason ? vue.h("p", { class: "oods-timeline__reason", "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
1034
1037
  ])
package/dist/ported.d.cts CHANGED
@@ -10,6 +10,8 @@ type TimelineEvent = {
10
10
  timestamp?: string;
11
11
  detail?: string;
12
12
  actorId?: string;
13
+ /** s244-m01 (#2829): who acted, for whom and who approved, from the entry's *_name fields (historyAttribution). */
14
+ attribution?: string;
13
15
  reason?: string;
14
16
  };
15
17
  type PaginationItem = {
package/dist/ported.d.ts CHANGED
@@ -10,6 +10,8 @@ type TimelineEvent = {
10
10
  timestamp?: string;
11
11
  detail?: string;
12
12
  actorId?: string;
13
+ /** s244-m01 (#2829): who acted, for whom and who approved, from the entry's *_name fields (historyAttribution). */
14
+ attribution?: string;
13
15
  reason?: string;
14
16
  };
15
17
  type PaginationItem = {
package/dist/ported.js CHANGED
@@ -1,4 +1,4 @@
1
- import { dateTimeInputValue, formatDateTime, formatReadOnlyValue, STATUS_ICON_SVG_ATTRS, STATUS_ICON_SHAPES, getStatusPresentation, resolveStatusIcon, currencyMinorUnits } from '@oods/component-contracts';
1
+ import { dateTimeInputValue, formatDateTime, formatReadOnlyValue, STATUS_ICON_SVG_ATTRS, STATUS_ICON_SHAPES, getStatusPresentation, resolveStatusIcon, currencyMinorUnits, historyAttribution } from '@oods/component-contracts';
2
2
  import { defineComponent, h, useId, computed, ref, onMounted, onBeforeUnmount, watch } from 'vue';
3
3
 
4
4
  // src/ported.ts
@@ -812,11 +812,13 @@ function normalizeTimelineEvents(raw) {
812
812
  }
813
813
  const from = firstText(entry, ["from"]);
814
814
  const to = firstText(entry, ["to"]);
815
+ const attribution = historyAttribution(entry);
815
816
  events.push({
816
817
  label: firstText(entry, ["label", "title"]) ?? (firstText(entry, ["event", "status", "state"]) ? statusLabel2(firstText(entry, ["event", "status", "state"])) : void 0) ?? firstText(entry, ["text", "name"]) ?? (to ? from ? `${statusLabel2(from)} \u2192 ${statusLabel2(to)}` : statusLabel2(to) : void 0) ?? "Event",
817
818
  timestamp: firstText(entry, ["timestamp", "datetime", "time", "at", "createdAt", "updatedAt"]),
818
819
  detail: firstText(entry, ["detail", "description", "message"]) ?? (to ? from ? `${statusLabel2(from)} \u2192 ${statusLabel2(to)}` : statusLabel2(to) : void 0),
819
- actorId: firstText(entry, ["actorId", "actor_id", "actor"]),
820
+ actorId: attribution?.namesActor ? void 0 : firstText(entry, ["actorId", "actor_id", "actor"]),
821
+ ...attribution ? { attribution: attribution.text } : {},
820
822
  reason: firstText(entry, ["reason"])
821
823
  });
822
824
  }
@@ -1027,6 +1029,7 @@ function renderTimelineEvent(event, index, showActorId, showReason) {
1027
1029
  h("p", { class: "oods-timeline__label", "data-timeline-label": "true" }, event.label),
1028
1030
  event.timestamp ? h("time", { "data-timeline-time": "true", datetime: event.timestamp }, formatDateTime(event.timestamp)) : null,
1029
1031
  event.detail ? h("p", { class: "oods-timeline__detail", "data-timeline-detail": "true" }, event.detail) : null,
1032
+ showActorId && event.attribution ? h("p", { class: "oods-timeline__actor", "data-timeline-attribution": "true" }, event.attribution) : null,
1030
1033
  showActorId && event.actorId ? h("p", { class: "oods-timeline__actor", "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
1031
1034
  showReason && event.reason ? h("p", { class: "oods-timeline__reason", "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
1032
1035
  ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oods/components-vue",
3
- "version": "0.11.3",
3
+ "version": "0.13.0",
4
4
  "description": "Vue 3 components for OODS Foundry: the controls, layouts and domain views its generated screens use.",
5
5
  "homepage": "https://oods-foundry.com/",
6
6
  "bugs": {
@@ -53,8 +53,8 @@
53
53
  "**/*.css"
54
54
  ],
55
55
  "dependencies": {
56
- "@oods/component-contracts": "0.11.3",
57
- "@oods/component-styles": "0.11.3"
56
+ "@oods/component-contracts": "0.13.0",
57
+ "@oods/component-styles": "0.13.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "vue": "^3.5.0"