@design.estate/dees-catalog 21.35.0 → 21.36.1

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 (37) hide show
  1. package/dist_bundle/bundle.js +614 -66
  2. package/dist_bundle/bundle.js.map +1 -1
  3. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-5CNZ4UM3.js → chunk-3YTKY5IS.js} +6 -2
  4. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-5CNZ4UM3.js.map → chunk-3YTKY5IS.js.map} +1 -1
  5. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-PHFZ5EZN.js → chunk-5UGXWLMH.js} +3 -3
  6. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-KY5Z6Y6T.js → chunk-ZCZ72OW4.js} +2 -2
  7. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-AGABQ27E.js → de-PERXVUIS.js} +6 -2
  8. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-AGABQ27E.js.map → de-PERXVUIS.js.map} +1 -1
  9. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-QBFEQURL.js → dees-modal-4QORKLGX.js} +3 -3
  10. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-UYSWDBV4.js → dees-workspace-terminal-7SYZG2AB.js} +4 -4
  11. package/dist_ts_web/00_commitinfo_data.js +1 -1
  12. package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.d.ts +5 -1
  13. package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.js +11 -1
  14. package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.d.ts +28 -1
  15. package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.js +78 -1
  16. package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.d.ts +75 -3
  17. package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.demo.js +140 -44
  18. package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.js +502 -16
  19. package/dist_ts_web/elements/00group-harness/interfaces.d.ts +72 -0
  20. package/dist_ts_web/i18n/de.d.ts +16 -0
  21. package/dist_ts_web/i18n/de.js +5 -1
  22. package/dist_ts_web/i18n/messages.d.ts +16 -0
  23. package/dist_ts_web/i18n/messages.js +5 -1
  24. package/package.json +1 -1
  25. package/readme.md +38 -1
  26. package/ts_web/00_commitinfo_data.ts +1 -1
  27. package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.ts +17 -0
  28. package/ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts +83 -0
  29. package/ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.demo.ts +106 -2
  30. package/ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.ts +486 -14
  31. package/ts_web/elements/00group-harness/interfaces.ts +77 -0
  32. package/ts_web/i18n/de.ts +4 -0
  33. package/ts_web/i18n/messages.ts +4 -0
  34. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-PHFZ5EZN.js.map → chunk-5UGXWLMH.js.map} +0 -0
  35. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-KY5Z6Y6T.js.map → chunk-ZCZ72OW4.js.map} +0 -0
  36. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-QBFEQURL.js.map → dees-modal-4QORKLGX.js.map} +0 -0
  37. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-UYSWDBV4.js.map → dees-workspace-terminal-7SYZG2AB.js.map} +0 -0
@@ -26,7 +26,7 @@ import {
26
26
  ownAppuiLabels,
27
27
  resolveAppuiLabels,
28
28
  xtermStyles
29
- } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-PHFZ5EZN.js";
29
+ } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-5UGXWLMH.js";
30
30
  import {
31
31
  ActionRunController,
32
32
  BarInfoController,
@@ -123,7 +123,7 @@ import {
123
123
  workspaceVisibility,
124
124
  zIndexLayers,
125
125
  zIndexRegistry
126
- } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-KY5Z6Y6T.js";
126
+ } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-ZCZ72OW4.js";
127
127
  import {
128
128
  dcMessages,
129
129
  dcSourceI18n,
@@ -133,7 +133,7 @@ import {
133
133
  firstDayOfWeek,
134
134
  iso_exports,
135
135
  momentFormat
136
- } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-5CNZ4UM3.js";
136
+ } from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-3YTKY5IS.js";
137
137
  import {
138
138
  __decorateElement,
139
139
  __decoratorMetadata,
@@ -49878,69 +49878,147 @@ var decided = [
49878
49878
  outcome: { tone: "error", text: "The ledger refused the change: account 1200 is locked for the closed year 2025." }
49879
49879
  }
49880
49880
  ];
49881
- var demoFunc44 = /* @__PURE__ */ __name(() => demoPage("Questions", "Questions the agent asks, and changes it proposes that wait for a confirmation.", b`
49881
+ var REFUSED_PASSWORD = "refused";
49882
+ var personProposal = /* @__PURE__ */ __name((idArg) => ({
49883
+ id: idArg,
49884
+ kind: "proposal",
49885
+ severity: "warning",
49886
+ question: "Send invoices through your own mail server?",
49887
+ itemsDeclinable: true,
49888
+ items: [
49889
+ {
49890
+ id: "smtp",
49891
+ summary: "Sends invoices from invoices@nordwind.de through your mail server",
49892
+ label: "Mail settings",
49893
+ href: "#",
49894
+ changes: [{ label: "Server", before: "Built-in", after: "smtp.nordwind.de:587" }]
49895
+ },
49896
+ { id: "dkim", summary: "Signs outgoing invoices with your DKIM key" },
49897
+ { id: "webhook", summary: "Issues a key for the delivery report webhook" }
49898
+ ],
49899
+ personFields: [
49900
+ { id: "user", itemId: "smtp", label: "User name", input: "text", required: true, maxLength: 128 },
49901
+ { id: "password", itemId: "smtp", label: "Password", input: "secret", required: true, maxLength: 128 },
49902
+ {
49903
+ id: "key",
49904
+ itemId: "dkim",
49905
+ label: "Private key",
49906
+ input: "secret",
49907
+ multiline: true,
49908
+ required: true,
49909
+ maxLength: 4096,
49910
+ hint: "The PEM block, from -----BEGIN to -----END."
49911
+ }
49912
+ ]
49913
+ }), "personProposal");
49914
+ var personResults = [
49915
+ { id: "dkim-record", itemId: "dkim", label: "DNS record", value: "nm2026._domainkey.nordwind.de", display: "text" },
49916
+ { id: "webhook-key", itemId: "webhook", label: "Webhook key", value: "whsec_demo_5Jk2-Qp8r-Tx3v-Lm7w", display: "secret" },
49917
+ { id: "webhook-guide", itemId: "webhook", label: "Set-up guide", value: "https://example.com/docs/delivery-reports", display: "link" }
49918
+ ];
49919
+ var runPersonProposal = /* @__PURE__ */ __name((event) => {
49920
+ const card = event.target;
49921
+ const { requestId, answers, declinedItemIds, personValues } = event.detail;
49922
+ showDemoResult(event.currentTarget, {
49923
+ requestId,
49924
+ answers,
49925
+ declinedItemIds,
49926
+ personValues: personValues?.map(({ itemId, fieldId }) => ({ itemId, fieldId, value: "(not shown)" }))
49927
+ });
49928
+ if (answers[0] !== "confirm") {
49929
+ card.request = { ...card.request, response: answers, respondedAt: Date.now() };
49930
+ return;
49931
+ }
49932
+ const password = personValues?.find((entry) => entry.itemId === "smtp" && entry.fieldId === "password")?.value;
49933
+ setTimeout(() => {
49934
+ if (password === REFUSED_PASSWORD) {
49935
+ card.rejectResponse({
49936
+ message: "The mail server refused the sign-in. Nothing was changed.",
49937
+ fieldErrors: [{ itemId: "smtp", fieldId: "password", message: "The mail server refused this password." }]
49938
+ });
49939
+ return;
49940
+ }
49941
+ card.request = { ...card.request, response: answers, respondedAt: Date.now(), declinedItemIds, outcome: { tone: "success", text: "Mail server connected" } };
49942
+ card.personResults = personResults.filter((result) => !declinedItemIds?.includes(result.itemId));
49943
+ }, 800);
49944
+ }, "runPersonProposal");
49945
+ var demoFunc44 = /* @__PURE__ */ __name(() => {
49946
+ const refused = document.createElement("dees-harness-question-card");
49947
+ refused.request = personProposal("p-person-refused");
49948
+ void refused.updateComplete.then(() => refused.rejectResponse({
49949
+ message: "The mail server refused the sign-in. Nothing was changed.",
49950
+ fieldErrors: [{ itemId: "smtp", fieldId: "password", message: "The mail server refused this password." }]
49951
+ }));
49952
+ const returned = document.createElement("dees-harness-question-card");
49953
+ returned.request = {
49954
+ ...personProposal("p-person-done"),
49955
+ response: ["confirm"],
49956
+ outcome: { tone: "success", text: "Mail server connected" }
49957
+ };
49958
+ returned.personResults = personResults;
49959
+ return demoPage("Questions", "Questions the agent asks, and changes it proposes that wait for a confirmation.", b`
49882
49960
  ${demoSection("Questions", "Single choices, multiple choices and written answers.", b`
49883
49961
  <div class="questionDemo dees-demo-stack" @harness-question-response=${logResponse2}>
49884
49962
  <dees-harness-question-card
49885
49963
  .request=${{
49886
- id: "q1",
49887
- question: "Which database should the new service use?",
49888
- createdAt: Date.now(),
49889
- options: [
49890
- { label: "PostgreSQL", description: "Relational, already in the stack" },
49891
- { label: "MongoDB", description: "Document store, flexible schema" },
49892
- { label: "SQLite", description: "Embedded, zero ops" }
49893
- ]
49894
- }}
49964
+ id: "q1",
49965
+ question: "Which database should the new service use?",
49966
+ createdAt: Date.now(),
49967
+ options: [
49968
+ { label: "PostgreSQL", description: "Relational, already in the stack" },
49969
+ { label: "MongoDB", description: "Document store, flexible schema" },
49970
+ { label: "SQLite", description: "Embedded, zero ops" }
49971
+ ]
49972
+ }}
49895
49973
  ></dees-harness-question-card>
49896
49974
  <dees-harness-question-card
49897
49975
  .request=${{
49898
- id: "q2",
49899
- question: "Which environments should the rollout include?",
49900
- multiSelect: true,
49901
- allowCustom: false,
49902
- options: [
49903
- { label: "staging" },
49904
- { label: "production-eu" },
49905
- { label: "production-us" }
49906
- ]
49907
- }}
49976
+ id: "q2",
49977
+ question: "Which environments should the rollout include?",
49978
+ multiSelect: true,
49979
+ allowCustom: false,
49980
+ options: [
49981
+ { label: "staging" },
49982
+ { label: "production-eu" },
49983
+ { label: "production-us" }
49984
+ ]
49985
+ }}
49908
49986
  ></dees-harness-question-card>
49909
49987
  <dees-harness-question-card
49910
49988
  .request=${{
49911
- id: "q-warning",
49912
- severity: "warning",
49913
- question: "The import brings its own tax settings. Replace the current ones?",
49914
- allowCustom: false,
49915
- options: [
49916
- { label: "Replace them", description: "The imported rates apply from the next booking on" },
49917
- { label: "Keep the current ones" }
49918
- ]
49919
- }}
49989
+ id: "q-warning",
49990
+ severity: "warning",
49991
+ question: "The import brings its own tax settings. Replace the current ones?",
49992
+ allowCustom: false,
49993
+ options: [
49994
+ { label: "Replace them", description: "The imported rates apply from the next booking on" },
49995
+ { label: "Keep the current ones" }
49996
+ ]
49997
+ }}
49920
49998
  ></dees-harness-question-card>
49921
49999
  <dees-harness-question-card
49922
50000
  .request=${{
49923
- id: "q3",
49924
- question: "Anything else I should know before migrating?",
49925
- options: []
49926
- }}
50001
+ id: "q3",
50002
+ question: "Anything else I should know before migrating?",
50003
+ options: []
50004
+ }}
49927
50005
  ></dees-harness-question-card>
49928
50006
  <dees-harness-question-card
49929
50007
  busy
49930
50008
  .request=${{
49931
- id: "q-busy",
49932
- question: "Waiting for the runtime \u2014 which region?",
49933
- options: [{ label: "eu-central" }, { label: "us-east" }]
49934
- }}
50009
+ id: "q-busy",
50010
+ question: "Waiting for the runtime \u2014 which region?",
50011
+ options: [{ label: "eu-central" }, { label: "us-east" }]
50012
+ }}
49935
50013
  ></dees-harness-question-card>
49936
50014
  <dees-harness-question-card
49937
50015
  .request=${{
49938
- id: "q4",
49939
- question: "Which framework for the admin UI?",
49940
- options: [{ label: "Lit" }, { label: "React" }],
49941
- response: ["Lit"],
49942
- respondedAt: Date.now() - 6e4
49943
- }}
50016
+ id: "q4",
50017
+ question: "Which framework for the admin UI?",
50018
+ options: [{ label: "Lit" }, { label: "React" }],
50019
+ response: ["Lit"],
50020
+ respondedAt: Date.now() - 6e4
50021
+ }}
49944
50022
  ></dees-harness-question-card>
49945
50023
  </div>
49946
50024
  ${demoOutput()}
@@ -49951,22 +50029,41 @@ var demoFunc44 = /* @__PURE__ */ __name(() => demoPage("Questions", "Questions t
49951
50029
  </div>
49952
50030
  ${demoOutput()}
49953
50031
  `)}
50032
+ ${demoSection("Values only the person gives", `A change may need values from the person alone: entered under it, a secret masked until shown, and sent with the confirmation only. What the changes return to the person shows under them. Enter the password "${REFUSED_PASSWORD}" to see the host turn the confirmation down.`, b`
50033
+ <div class="dees-demo-stack" @harness-question-response=${runPersonProposal} @harness-question-link=${routeLink}>
50034
+ <dees-harness-question-card .request=${personProposal("p-person")}></dees-harness-question-card>
50035
+ ${refused}
50036
+ ${returned}
50037
+ </div>
50038
+ ${demoOutput()}
50039
+ `)}
49954
50040
  ${demoSection("Decided proposals", "Read-only once decided: confirmed and under way, confirmed with a change left out, confirmed with a secret only the reader sees, declined, expired, failed.", b`
49955
50041
  <div class="dees-demo-stack" @harness-question-link=${routeLink}>
49956
50042
  ${decided.map((request) => b`<dees-harness-question-card .request=${request}></dees-harness-question-card>`)}
49957
50043
  </div>
49958
50044
  ${demoOutput()}
49959
50045
  `)}
49960
- `), "demoFunc");
50046
+ `);
50047
+ }, "demoFunc");
49961
50048
 
49962
50049
  // ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.ts
49963
- var _copyFeedback_dec2, _credentialsShown_dec, _leftOut_dec, _itemsExpanded_dec2, _customText_dec, _selected_dec, _answered_dec2, _viewState_dec6, _busy_dec2, _request_dec2, _a64, _DeesHarnessQuestionCard_decorators, _init66, _request2, _busy2, _viewState6, _answered2, _selected, _customText, _itemsExpanded2, _leftOut, _credentialsShown, _copyFeedback2;
50050
+ var _rejection_dec, _personResultsShown_dec, _personFieldsShown_dec, _personValues_dec, _personResults_dec, _copyFeedback_dec2, _credentialsShown_dec, _leftOut_dec, _itemsExpanded_dec2, _customText_dec, _selected_dec, _answered_dec2, _viewState_dec6, _busy_dec2, _request_dec2, _a64, _DeesHarnessQuestionCard_decorators, _init66, _request2, _busy2, _viewState6, _answered2, _selected, _customText, _itemsExpanded2, _leftOut, _credentialsShown, _copyFeedback2, _personResults, _personValues, _personFieldsShown, _personResultsShown, _rejection;
49964
50051
  var titleIcon = /* @__PURE__ */ __name((kindArg, severityArg) => severityArg === "danger" ? "lucide:OctagonAlert" : severityArg === "warning" ? "lucide:TriangleAlert" : kindArg === "proposal" ? "lucide:ListChecks" : "lucide:MessageCircleQuestionMark", "titleIcon");
49965
50052
  var ITEM_ICON = {
49966
50053
  warning: "lucide:TriangleAlert",
49967
50054
  danger: "lucide:OctagonAlert"
49968
50055
  };
49969
50056
  var CREDENTIAL_MASK = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
50057
+ var personKey = /* @__PURE__ */ __name((itemIdArg, fieldIdArg) => `${itemIdArg}\0${fieldIdArg}`, "personKey");
50058
+ var NO_PERSON_RESULTS = [];
50059
+ var httpHref = /* @__PURE__ */ __name((valueArg) => {
50060
+ try {
50061
+ const url = new URL(valueArg);
50062
+ return url.protocol === "http:" || url.protocol === "https:" ? url.href : void 0;
50063
+ } catch {
50064
+ return void 0;
50065
+ }
50066
+ }, "httpHref");
49970
50067
  var STATE_BADGE = {
49971
50068
  confirmed: "success",
49972
50069
  declined: "default",
@@ -49974,7 +50071,7 @@ var STATE_BADGE = {
49974
50071
  failed: "error"
49975
50072
  };
49976
50073
  _DeesHarnessQuestionCard_decorators = [customElement("dees-harness-question-card")];
49977
- var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = DeesElement, _request_dec2 = [n({ attribute: false })], _busy_dec2 = [n({ type: Boolean, reflect: true })], _viewState_dec6 = [n({ attribute: false })], _answered_dec2 = [r2()], _selected_dec = [r2()], _customText_dec = [r2()], _itemsExpanded_dec2 = [r2()], _leftOut_dec = [r2()], _credentialsShown_dec = [r2()], _copyFeedback_dec2 = [r2()], _a64) {
50074
+ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = DeesElement, _request_dec2 = [n({ attribute: false })], _busy_dec2 = [n({ type: Boolean, reflect: true })], _viewState_dec6 = [n({ attribute: false })], _answered_dec2 = [r2()], _selected_dec = [r2()], _customText_dec = [r2()], _itemsExpanded_dec2 = [r2()], _leftOut_dec = [r2()], _credentialsShown_dec = [r2()], _copyFeedback_dec2 = [r2()], _personResults_dec = [n({ attribute: false })], _personValues_dec = [r2()], _personFieldsShown_dec = [r2()], _personResultsShown_dec = [r2()], _rejection_dec = [r2()], _a64) {
49978
50075
  constructor() {
49979
50076
  super(...arguments);
49980
50077
  __publicField(this, "t", dcLocalize(this));
@@ -49988,6 +50085,11 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
49988
50085
  __privateAdd(this, _leftOut, __runInitializers(_init66, 36, this)), __runInitializers(_init66, 39, this);
49989
50086
  __privateAdd(this, _credentialsShown, __runInitializers(_init66, 40, this, /* @__PURE__ */ new Set())), __runInitializers(_init66, 43, this);
49990
50087
  __privateAdd(this, _copyFeedback2, __runInitializers(_init66, 44, this)), __runInitializers(_init66, 47, this);
50088
+ __privateAdd(this, _personResults, __runInitializers(_init66, 48, this, NO_PERSON_RESULTS)), __runInitializers(_init66, 51, this);
50089
+ __privateAdd(this, _personValues, __runInitializers(_init66, 52, this, /* @__PURE__ */ new Map())), __runInitializers(_init66, 55, this);
50090
+ __privateAdd(this, _personFieldsShown, __runInitializers(_init66, 56, this, /* @__PURE__ */ new Set())), __runInitializers(_init66, 59, this);
50091
+ __privateAdd(this, _personResultsShown, __runInitializers(_init66, 60, this, /* @__PURE__ */ new Set())), __runInitializers(_init66, 63, this);
50092
+ __privateAdd(this, _rejection, __runInitializers(_init66, 64, this)), __runInitializers(_init66, 67, this);
49991
50093
  __publicField(this, "copyRequest", 0);
49992
50094
  __publicField(this, "copyResetTimeout");
49993
50095
  __publicField(this, "footerActions");
@@ -50026,6 +50128,29 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50026
50128
  const chosen = new Set(ids);
50027
50129
  return new Set((this.request.items ?? []).filter((item) => chosen.has(item.id)).map((item) => item.id));
50028
50130
  }
50131
+ /** A change's person fields, those of a proposal only. */
50132
+ personFieldsOf(itemIdArg) {
50133
+ if (this.request.kind !== "proposal") return [];
50134
+ return (this.request.personFields ?? []).filter((field) => field.itemId === itemIdArg);
50135
+ }
50136
+ /** The person fields a confirmation sends: those of the changes it includes. */
50137
+ get includedPersonFields() {
50138
+ if (this.request.kind !== "proposal" || !this.request.personFields?.length) return [];
50139
+ const leftOut = this.effectiveLeftOut;
50140
+ const included = new Set((this.request.items ?? []).filter((item) => !leftOut.has(item.id)).map((item) => item.id));
50141
+ return this.request.personFields.filter((field) => included.has(field.itemId));
50142
+ }
50143
+ personValueOf(fieldArg) {
50144
+ return this.personValues.get(personKey(fieldArg.itemId, fieldArg.id)) ?? "";
50145
+ }
50146
+ /** Whether a required field of an included change is still empty. */
50147
+ get personFieldsMissing() {
50148
+ return this.includedPersonFields.some((field) => field.required === true && this.personValueOf(field).trim() === "");
50149
+ }
50150
+ /** Whether the included changes have every value they need, none of them too long. */
50151
+ get personFieldsComplete() {
50152
+ return !this.personFieldsMissing && this.includedPersonFields.every((field) => this.personValueOf(field).length <= field.maxLength);
50153
+ }
50029
50154
  /** Whether the card takes no answer: answered, waiting for the host (`busy`), or its changes under way or decided. */
50030
50155
  get locked() {
50031
50156
  return this.busy || this.effectiveResponse !== void 0 || this.proposalState !== "pending";
@@ -50121,8 +50246,16 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50121
50246
  /** The proposed changes and, once decided, the state and what came of it. */
50122
50247
  renderProposal() {
50123
50248
  const items = this.request.items ?? [];
50124
- const expanded = this.effectiveItemsExpanded;
50125
50249
  const proposalState = this.proposalState;
50250
+ const pending = proposalState === "pending";
50251
+ const personItems = /* @__PURE__ */ new Set([
50252
+ ...pending ? (this.request.personFields ?? []).map((field) => field.itemId) : [],
50253
+ ...this.personResults.map((result) => result.itemId)
50254
+ ]);
50255
+ const unfolded = !this.effectiveItemsExpanded && items.slice(harnessRecordsShown).some((item) => personItems.has(item.id));
50256
+ const expanded = this.effectiveItemsExpanded || unfolded;
50257
+ const itemIds = new Set(items.map((item) => item.id));
50258
+ const otherResults = this.personResults.filter((result) => !itemIds.has(result.itemId));
50126
50259
  const choosing = this.itemsDeclinable && proposalState === "pending";
50127
50260
  const leftOut = choosing || proposalState === "confirmed" || proposalState === "failed" ? this.effectiveLeftOut : /* @__PURE__ */ new Set();
50128
50261
  return b`
@@ -50151,13 +50284,17 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50151
50284
  </div>
50152
50285
  ${item.label ? item.href ? b`<a class="itemLabel" href=${item.href} @click=${(event) => this.openItem(event, item)}>${item.label}</a>` : b`<span class="itemLabel">${item.label}</span>` : ""}
50153
50286
  ${item.changes?.length ? renderHarnessChanges(this.t, item.changes) : ""}
50287
+ ${pending && !isLeftOut && this.personFieldsOf(item.id).length ? this.renderPersonFields(this.personFieldsOf(item.id)) : ""}
50154
50288
  ${item.credential ? this.renderCredential(item) : ""}
50289
+ ${this.personResults.some((result) => result.itemId === item.id) ? this.renderPersonResults(this.personResults.filter((result) => result.itemId === item.id)) : ""}
50155
50290
  </li>
50156
50291
  `;
50157
50292
  })}
50158
50293
  </ul>
50159
- ${renderHarnessMoreRecords(this.t, items.length, expanded, this.toggleItems)}
50294
+ ${unfolded ? "" : renderHarnessMoreRecords(this.t, items.length, expanded, this.toggleItems)}
50160
50295
  ` : ""}
50296
+ ${otherResults.length ? this.renderPersonResults(otherResults) : ""}
50297
+ ${pending ? this.renderPersonNotes() : ""}
50161
50298
  ${proposalState === "pending" ? "" : b`
50162
50299
  <div class="decision" tabindex="-1">
50163
50300
  <dees-badge type=${STATE_BADGE[proposalState]} .text=${this.t(`question.${proposalState}`)} rounded></dees-badge>
@@ -50173,7 +50310,7 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50173
50310
  renderCredential(itemArg) {
50174
50311
  const credential = itemArg.credential;
50175
50312
  const shown = this.credentialsShown.has(itemArg.id);
50176
- const feedback = this.copyFeedback?.itemId === itemArg.id ? this.copyFeedback : void 0;
50313
+ const feedback = this.copyFeedback?.key === `credential:${itemArg.id}` ? this.copyFeedback : void 0;
50177
50314
  return b`
50178
50315
  <div class="credential">
50179
50316
  <div class="credentialRow">
@@ -50189,7 +50326,7 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50189
50326
  class="credentialAction"
50190
50327
  type="button"
50191
50328
  aria-label=${this.t("question.credentialCopy", { label: credential.label })}
50192
- @click=${() => this.copyCredential(itemArg)}
50329
+ @click=${() => this.copySecret(`credential:${itemArg.id}`, credential.label, credential.value)}
50193
50330
  >${this.t("common.copy")}</button>
50194
50331
  <span class="credentialFeedback ${feedback?.failed ? "failed" : ""}" role="status" aria-live="polite">${feedback?.text ?? ""}</span>
50195
50332
  </div>
@@ -50197,19 +50334,141 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50197
50334
  </div>
50198
50335
  `;
50199
50336
  }
50337
+ /** The values a change needs from the person, under it while the proposal waits. */
50338
+ renderPersonFields(fieldsArg) {
50339
+ return b`<div class="personFields">${fieldsArg.map((field) => this.renderPersonField(field))}</div>`;
50340
+ }
50341
+ /**
50342
+ * One value for the person to enter: labelled, a secret masked until shown, its hint, and what
50343
+ * holds it back: too long, or refused by the host. It is not cut at its `maxLength`: a pasted
50344
+ * secret cut short would be a wrong one.
50345
+ */
50346
+ renderPersonField(fieldArg) {
50347
+ const key = personKey(fieldArg.itemId, fieldArg.id);
50348
+ const domId = `person-field-${(this.request.personFields ?? []).indexOf(fieldArg)}`;
50349
+ const value = this.personValues.get(key) ?? "";
50350
+ const secret = fieldArg.input === "secret";
50351
+ const shown = this.personFieldsShown.has(key);
50352
+ const error = value.length > fieldArg.maxLength ? this.t("question.personTooLong", { max: fieldArg.maxLength, count: value.length }) : this.effectiveRejection?.fieldErrors?.find((entry) => entry.itemId === fieldArg.itemId && entry.fieldId === fieldArg.id)?.message;
50353
+ const describedBy = [fieldArg.hint ? `${domId}-hint` : "", error ? `${domId}-error` : ""].filter(Boolean).join(" ");
50354
+ const input = /* @__PURE__ */ __name((eventArg) => this.setPersonValue(fieldArg, eventArg.currentTarget.value), "input");
50355
+ const autocomplete = secret ? "new-password" : "off";
50356
+ return b`
50357
+ <div class="personField">
50358
+ <label class="personLabel" for=${domId}>${fieldArg.label}${fieldArg.required ? b`<span class="required" aria-hidden="true">*</span>` : ""}</label>
50359
+ <div class="personInputRow">
50360
+ ${fieldArg.multiline ? b`
50361
+ <textarea
50362
+ id=${domId}
50363
+ class="personInput ${secret ? "secret" : ""} ${secret && !shown ? "masked" : ""}"
50364
+ rows="3"
50365
+ autocomplete=${autocomplete}
50366
+ spellcheck=${secret ? "false" : "true"}
50367
+ aria-required=${fieldArg.required ? "true" : "false"}
50368
+ aria-invalid=${error ? "true" : "false"}
50369
+ aria-describedby=${describedBy}
50370
+ .value=${value}
50371
+ ?disabled=${this.locked}
50372
+ @input=${input}
50373
+ ></textarea>
50374
+ ` : b`
50375
+ <input
50376
+ id=${domId}
50377
+ class="personInput ${secret ? "secret" : ""}"
50378
+ type=${secret && !shown ? "password" : "text"}
50379
+ autocomplete=${autocomplete}
50380
+ spellcheck=${secret ? "false" : "true"}
50381
+ aria-required=${fieldArg.required ? "true" : "false"}
50382
+ aria-invalid=${error ? "true" : "false"}
50383
+ aria-describedby=${describedBy}
50384
+ .value=${value}
50385
+ ?disabled=${this.locked}
50386
+ @input=${input}
50387
+ />
50388
+ `}
50389
+ ${secret ? b`
50390
+ <button
50391
+ class="credentialAction"
50392
+ type="button"
50393
+ aria-controls=${domId}
50394
+ aria-label=${this.t(shown ? "question.credentialHide" : "question.credentialShow", { label: fieldArg.label })}
50395
+ @click=${() => this.togglePersonField(key)}
50396
+ >${this.t(shown ? "question.credentialHideShort" : "question.credentialShowShort")}</button>
50397
+ ` : ""}
50398
+ </div>
50399
+ ${fieldArg.hint ? b`<p class="personHint" id="${domId}-hint">${fieldArg.hint}</p>` : ""}
50400
+ ${error ? b`<p class="personError" id="${domId}-error">${error}</p>` : ""}
50401
+ </div>
50402
+ `;
50403
+ }
50404
+ /**
50405
+ * Under the changes of a waiting proposal: the host's refusal of the last confirmation, that
50406
+ * what the person enters goes nowhere but with the confirmation, and what still holds it back.
50407
+ */
50408
+ renderPersonNotes() {
50409
+ const rejection = this.effectiveRejection;
50410
+ const rejectionText = rejection?.message ?? (rejection?.fieldErrors?.length ? this.t("question.rejected") : "");
50411
+ const fields = this.includedPersonFields.length > 0;
50412
+ return b`
50413
+ ${rejectionText ? b`<p class="rejection" role="alert">${rejectionText}</p>` : ""}
50414
+ ${fields ? b`<p class="personNote">${this.t("question.personFieldsNote")}</p>` : ""}
50415
+ ${fields && !this.locked && this.personFieldsMissing ? b`<p class="personNote personMissing">${this.t("question.personFieldsMissing")}</p>` : ""}
50416
+ `;
50417
+ }
50418
+ /** What the confirmed changes returned to the person: a secret masked until shown, a link to an http or https address only. */
50419
+ renderPersonResults(resultsArg) {
50420
+ return b`
50421
+ <div class="credential personResults">
50422
+ ${resultsArg.map((result) => b`
50423
+ <div class="credentialRow">
50424
+ <span class="credentialLabel">${result.label}</span>
50425
+ ${this.renderPersonResultValue(result)}
50426
+ </div>
50427
+ `)}
50428
+ <p class="credentialNote">${this.t("question.credentialNote")}</p>
50429
+ </div>
50430
+ `;
50431
+ }
50432
+ renderPersonResultValue(resultArg) {
50433
+ if (resultArg.display === "link") {
50434
+ const href = httpHref(resultArg.value);
50435
+ return href ? b`<a class="personResultLink" href=${href} target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">${resultArg.value}</a>` : b`<span class="personResultText">${resultArg.value}</span>`;
50436
+ }
50437
+ if (resultArg.display !== "secret") return b`<span class="personResultText">${resultArg.value}</span>`;
50438
+ const shown = this.personResultsShown.has(resultArg.id);
50439
+ const feedback = this.copyFeedback?.key === `result:${resultArg.id}` ? this.copyFeedback : void 0;
50440
+ return b`
50441
+ <code class="credentialValue">${shown ? resultArg.value : b`<span aria-hidden="true">${CREDENTIAL_MASK}</span><span class="srOnly">${this.t("question.credentialHidden")}</span>`}</code>
50442
+ <button
50443
+ class="credentialAction"
50444
+ type="button"
50445
+ aria-label=${this.t(shown ? "question.credentialHide" : "question.credentialShow", { label: resultArg.label })}
50446
+ @click=${() => this.togglePersonResult(resultArg.id)}
50447
+ >${this.t(shown ? "question.credentialHideShort" : "question.credentialShowShort")}</button>
50448
+ <button
50449
+ class="credentialAction"
50450
+ type="button"
50451
+ aria-label=${this.t("question.credentialCopy", { label: resultArg.label })}
50452
+ @click=${() => this.copySecret(`result:${resultArg.id}`, resultArg.label, resultArg.value)}
50453
+ >${this.t("common.copy")}</button>
50454
+ <span class="credentialFeedback ${feedback?.failed ? "failed" : ""}" role="status" aria-live="polite">${feedback?.text ?? ""}</span>
50455
+ `;
50456
+ }
50200
50457
  /** Decline, and Confirm as the primary; kept while their words and Confirm's availability stay, so the footer knows a running one by its object. */
50201
50458
  get proposalActions() {
50202
50459
  const confirm2 = this.request.confirmLabel ?? this.t("question.proposalConfirm");
50203
50460
  const decline = this.request.declineLabel ?? this.t("question.proposalDecline");
50204
50461
  const nothingIncluded = this.itemsDeclinable && this.effectiveLeftOut.size === (this.request.items?.length ?? 0);
50205
- if (this.footerActions?.confirm !== confirm2 || this.footerActions.decline !== decline || this.footerActions.nothingIncluded !== nothingIncluded) {
50462
+ const held = !this.personFieldsComplete;
50463
+ if (this.footerActions?.confirm !== confirm2 || this.footerActions.decline !== decline || this.footerActions.nothingIncluded !== nothingIncluded || this.footerActions.held !== held) {
50206
50464
  this.footerActions = {
50207
50465
  confirm: confirm2,
50208
50466
  decline,
50209
50467
  nothingIncluded,
50468
+ held,
50210
50469
  actions: [
50211
50470
  { name: decline, action: /* @__PURE__ */ __name(async () => this.respond(["decline"]), "action") },
50212
- { name: confirm2, primary: true, disabled: nothingIncluded, action: /* @__PURE__ */ __name(async () => this.respond(["confirm"]), "action") }
50471
+ { name: confirm2, primary: true, disabled: nothingIncluded || held, action: /* @__PURE__ */ __name(async () => this.respond(["confirm"]), "action") }
50213
50472
  ]
50214
50473
  };
50215
50474
  }
@@ -50230,18 +50489,65 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50230
50489
  else next.add(itemIdArg);
50231
50490
  this.credentialsShown = next;
50232
50491
  }
50233
- async copyCredential(itemArg) {
50234
- const credential = itemArg.credential;
50492
+ togglePersonField(keyArg) {
50493
+ const next = new Set(this.personFieldsShown);
50494
+ if (next.has(keyArg)) next.delete(keyArg);
50495
+ else next.add(keyArg);
50496
+ this.personFieldsShown = next;
50497
+ }
50498
+ togglePersonResult(resultIdArg) {
50499
+ const next = new Set(this.personResultsShown);
50500
+ if (next.has(resultIdArg)) next.delete(resultIdArg);
50501
+ else next.add(resultIdArg);
50502
+ this.personResultsShown = next;
50503
+ }
50504
+ /** The person enters a value; one the host refused is answered by the edit. */
50505
+ setPersonValue(fieldArg, valueArg) {
50506
+ if (this.locked) return;
50507
+ const next = new Map(this.personValues);
50508
+ if (valueArg) next.set(personKey(fieldArg.itemId, fieldArg.id), valueArg);
50509
+ else next.delete(personKey(fieldArg.itemId, fieldArg.id));
50510
+ this.personValues = next;
50511
+ const refused = /* @__PURE__ */ __name((entryArg) => entryArg.itemId === fieldArg.itemId && entryArg.fieldId === fieldArg.id, "refused");
50512
+ const rejection = this.effectiveRejection;
50513
+ if (rejection?.fieldErrors?.some(refused)) {
50514
+ this.setRejection({ ...rejection, fieldErrors: rejection.fieldErrors.filter((entry) => !refused(entry)) });
50515
+ }
50516
+ }
50517
+ /** The host's refusal the card shows: its own, or the one the view state kept over a remount. */
50518
+ get effectiveRejection() {
50519
+ return this.rejection ?? this.viewState?.rejection;
50520
+ }
50521
+ setRejection(rejectionArg) {
50522
+ this.rejection = rejectionArg;
50523
+ if (!this.viewState) return;
50524
+ if (rejectionArg) this.viewState.rejection = rejectionArg;
50525
+ else delete this.viewState.rejection;
50526
+ }
50527
+ /** Forgets what the person entered and showed, and the host's refusal of it. */
50528
+ clearPersonEntries() {
50529
+ this.personValues = /* @__PURE__ */ new Map();
50530
+ this.personFieldsShown = /* @__PURE__ */ new Set();
50531
+ this.rejection = void 0;
50532
+ }
50533
+ /** Forgets everything person-only: what was entered, and what the changes returned. */
50534
+ clearPersonState() {
50535
+ this.clearPersonEntries();
50536
+ this.personResults = NO_PERSON_RESULTS;
50537
+ this.personResultsShown = /* @__PURE__ */ new Set();
50538
+ if (this.copyFeedback?.key.startsWith("result:")) this.copyFeedback = void 0;
50539
+ }
50540
+ async copySecret(keyArg, labelArg, valueArg) {
50235
50541
  const request = ++this.copyRequest;
50236
50542
  clearTimeout(this.copyResetTimeout);
50237
50543
  this.copyFeedback = void 0;
50238
50544
  try {
50239
- await navigator.clipboard.writeText(credential.value);
50545
+ await navigator.clipboard.writeText(valueArg);
50240
50546
  if (!this.isConnected || request !== this.copyRequest) return;
50241
- this.copyFeedback = { itemId: itemArg.id, text: this.t("question.credentialCopied", { label: credential.label }), failed: false };
50547
+ this.copyFeedback = { key: keyArg, text: this.t("question.credentialCopied", { label: labelArg }), failed: false };
50242
50548
  } catch {
50243
50549
  if (!this.isConnected || request !== this.copyRequest) return;
50244
- this.copyFeedback = { itemId: itemArg.id, text: this.t("question.credentialCopyFailed"), failed: true };
50550
+ this.copyFeedback = { key: keyArg, text: this.t("question.credentialCopyFailed"), failed: true };
50245
50551
  }
50246
50552
  this.copyResetTimeout = setTimeout(() => {
50247
50553
  this.copyFeedback = void 0;
@@ -50273,11 +50579,15 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50273
50579
  respond(answers) {
50274
50580
  if (this.locked || !answers.length) return;
50275
50581
  const items = this.request.items ?? [];
50276
- const leftOut = answers[0] === "confirm" && this.itemsDeclinable ? this.effectiveLeftOut : /* @__PURE__ */ new Set();
50582
+ const confirming = answers[0] === "confirm";
50583
+ const leftOut = confirming && this.itemsDeclinable ? this.effectiveLeftOut : /* @__PURE__ */ new Set();
50277
50584
  if (leftOut.size > 0 && leftOut.size === items.length) return;
50585
+ if (confirming && !this.personFieldsComplete) return;
50586
+ const personValues = confirming ? this.includedPersonFields.map((field) => ({ itemId: field.itemId, fieldId: field.id, value: this.personValueOf(field) })).filter((entry) => entry.value !== "") : [];
50278
50587
  const footerFocused = this.shadowRoot?.activeElement?.localName === "dees-actionfooter";
50279
50588
  this.answered = answers;
50280
50589
  if (this.viewState) this.viewState.answered = answers;
50590
+ this.setRejection(void 0);
50281
50591
  if (footerFocused) {
50282
50592
  void this.updateComplete.then(() => this.shadowRoot?.querySelector(".decision")?.focus());
50283
50593
  }
@@ -50287,11 +50597,38 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50287
50597
  request: harnessWithoutCredentials(this.request)
50288
50598
  };
50289
50599
  if (leftOut.size > 0) detail.declinedItemIds = items.filter((item) => leftOut.has(item.id)).map((item) => item.id);
50600
+ if (personValues.length) detail.personValues = personValues;
50290
50601
  this.dispatchEvent(new CustomEvent("harness-question-response", {
50291
50602
  detail,
50292
50603
  bubbles: true,
50293
50604
  composed: true
50294
50605
  }));
50606
+ this.clearPersonEntries();
50607
+ }
50608
+ /**
50609
+ * The host refused the answer it was sent, such as a confirmation its server turned down: the
50610
+ * card waits for an answer again, keeps the changes the reader left out, and shows the host's
50611
+ * `message` and the error of each value it names. What the person entered went with the answer
50612
+ * and is entered anew. The refusal stands until the next answer, in the view state as well, so a
50613
+ * card the transcript remounts still shows it. A question that is not a proposal, a card whose
50614
+ * request carries the host's `response`, and one the host decided otherwise stay as they are: `false`.
50615
+ */
50616
+ rejectResponse(rejectionArg = {}) {
50617
+ if (this.request.kind !== "proposal" || this.request.response !== void 0) return false;
50618
+ if (harnessProposalState(this.request, void 0) !== "pending") return false;
50619
+ this.answered = void 0;
50620
+ if (this.viewState) this.viewState.answered = void 0;
50621
+ this.setRejection(rejectionArg);
50622
+ return true;
50623
+ }
50624
+ willUpdate(changedProperties) {
50625
+ super.willUpdate(changedProperties);
50626
+ const previous = changedProperties.get("request");
50627
+ if (previous && previous.id !== this.request.id) {
50628
+ this.clearPersonEntries();
50629
+ this.personResultsShown = /* @__PURE__ */ new Set();
50630
+ if (!changedProperties.has("personResults")) this.personResults = NO_PERSON_RESULTS;
50631
+ }
50295
50632
  }
50296
50633
  async disconnectedCallback() {
50297
50634
  ++this.copyRequest;
@@ -50299,6 +50636,9 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
50299
50636
  this.copyResetTimeout = void 0;
50300
50637
  this.copyFeedback = void 0;
50301
50638
  this.credentialsShown = /* @__PURE__ */ new Set();
50639
+ queueMicrotask(() => {
50640
+ if (!this.isConnected) this.clearPersonState();
50641
+ });
50302
50642
  await super.disconnectedCallback();
50303
50643
  }
50304
50644
  };
@@ -50313,6 +50653,11 @@ _itemsExpanded2 = new WeakMap();
50313
50653
  _leftOut = new WeakMap();
50314
50654
  _credentialsShown = new WeakMap();
50315
50655
  _copyFeedback2 = new WeakMap();
50656
+ _personResults = new WeakMap();
50657
+ _personValues = new WeakMap();
50658
+ _personFieldsShown = new WeakMap();
50659
+ _personResultsShown = new WeakMap();
50660
+ _rejection = new WeakMap();
50316
50661
  __decorateElement(_init66, 4, "request", _request_dec2, _DeesHarnessQuestionCard, _request2);
50317
50662
  __decorateElement(_init66, 4, "busy", _busy_dec2, _DeesHarnessQuestionCard, _busy2);
50318
50663
  __decorateElement(_init66, 4, "viewState", _viewState_dec6, _DeesHarnessQuestionCard, _viewState6);
@@ -50323,6 +50668,11 @@ __decorateElement(_init66, 4, "itemsExpanded", _itemsExpanded_dec2, _DeesHarness
50323
50668
  __decorateElement(_init66, 4, "leftOut", _leftOut_dec, _DeesHarnessQuestionCard, _leftOut);
50324
50669
  __decorateElement(_init66, 4, "credentialsShown", _credentialsShown_dec, _DeesHarnessQuestionCard, _credentialsShown);
50325
50670
  __decorateElement(_init66, 4, "copyFeedback", _copyFeedback_dec2, _DeesHarnessQuestionCard, _copyFeedback2);
50671
+ __decorateElement(_init66, 4, "personResults", _personResults_dec, _DeesHarnessQuestionCard, _personResults);
50672
+ __decorateElement(_init66, 4, "personValues", _personValues_dec, _DeesHarnessQuestionCard, _personValues);
50673
+ __decorateElement(_init66, 4, "personFieldsShown", _personFieldsShown_dec, _DeesHarnessQuestionCard, _personFieldsShown);
50674
+ __decorateElement(_init66, 4, "personResultsShown", _personResultsShown_dec, _DeesHarnessQuestionCard, _personResultsShown);
50675
+ __decorateElement(_init66, 4, "rejection", _rejection_dec, _DeesHarnessQuestionCard, _rejection);
50326
50676
  _DeesHarnessQuestionCard = __decorateElement(_init66, 0, "DeesHarnessQuestionCard", _DeesHarnessQuestionCard_decorators, _DeesHarnessQuestionCard);
50327
50677
  __name(_DeesHarnessQuestionCard, "DeesHarnessQuestionCard");
50328
50678
  __publicField(_DeesHarnessQuestionCard, "demo", demoFunc44);
@@ -50627,6 +50977,130 @@ __publicField(_DeesHarnessQuestionCard, "styles", [
50627
50977
  color: var(--dees-color-text-secondary);
50628
50978
  font-size: var(--dees-font-caption1-size, 11px);
50629
50979
  }
50980
+
50981
+ .personResultText {
50982
+ flex: 1 1 12em;
50983
+ min-width: 0;
50984
+ color: var(--dees-color-text-primary);
50985
+ overflow-wrap: anywhere;
50986
+ }
50987
+
50988
+ .personResultLink {
50989
+ flex: 1 1 12em;
50990
+ min-width: 0;
50991
+ color: var(--dees-color-accent-primary);
50992
+ overflow-wrap: anywhere;
50993
+ border-radius: var(--dees-radius-xs);
50994
+ }
50995
+
50996
+ .personResultLink:focus-visible {
50997
+ outline: var(--dees-line-width-focus-ring) solid var(--dees-color-focus-ring);
50998
+ outline-offset: 2px;
50999
+ }
51000
+
51001
+ .personFields {
51002
+ display: grid;
51003
+ gap: var(--dees-spacing-sm);
51004
+ margin-top: 4px;
51005
+ }
51006
+
51007
+ .personField {
51008
+ display: grid;
51009
+ gap: 4px;
51010
+ min-width: 0;
51011
+ }
51012
+
51013
+ .personLabel {
51014
+ justify-self: start;
51015
+ color: var(--dees-color-text-secondary);
51016
+ font-weight: 500;
51017
+ }
51018
+
51019
+ .personLabel .required {
51020
+ margin-left: var(--dees-spacing-2xs);
51021
+ color: var(--dees-color-accent-error);
51022
+ }
51023
+
51024
+ .personInputRow {
51025
+ display: flex;
51026
+ align-items: center;
51027
+ gap: var(--dees-spacing-sm);
51028
+ min-width: 0;
51029
+ }
51030
+
51031
+ .personInput {
51032
+ flex: 1;
51033
+ min-width: 0;
51034
+ height: var(--dees-control-height-md);
51035
+ padding: 0 var(--dees-spacing-sm);
51036
+ border: var(--dees-line-width-hairline) solid var(--dees-color-border-default);
51037
+ border-radius: var(--dees-radius-md);
51038
+ corner-shape: var(--dees-corner-shape);
51039
+ background: var(--dees-color-bg-primary);
51040
+ color: var(--dees-color-text-primary);
51041
+ font-family: inherit;
51042
+ font-size: var(--dees-font-control-size-sm, 12px);
51043
+ outline: none;
51044
+ }
51045
+
51046
+ .personInput.secret {
51047
+ font-family: var(--dees-font-family-mono);
51048
+ }
51049
+
51050
+ textarea.personInput {
51051
+ height: auto;
51052
+ min-height: calc(var(--dees-control-height-md) * 2);
51053
+ padding: 6px var(--dees-spacing-sm);
51054
+ line-height: 1.4;
51055
+ resize: vertical;
51056
+ }
51057
+
51058
+ /* a secret of several lines has no password input: it is masked as one is */
51059
+ textarea.personInput.masked {
51060
+ -webkit-text-security: disc;
51061
+ }
51062
+
51063
+ .personInput:focus {
51064
+ border-color: var(--dees-color-accent-primary);
51065
+ box-shadow: 0 0 0 var(--dees-line-width-focus-ring) var(--dees-color-focus-ring);
51066
+ }
51067
+
51068
+ .personInput[aria-invalid='true'] {
51069
+ border-color: var(--dees-color-accent-error);
51070
+ }
51071
+
51072
+ .personInput:disabled {
51073
+ cursor: default;
51074
+ opacity: 0.6;
51075
+ }
51076
+
51077
+ .personHint,
51078
+ .personError,
51079
+ .personNote {
51080
+ margin: 0;
51081
+ color: var(--dees-color-text-secondary);
51082
+ font-size: var(--dees-font-caption1-size, 11px);
51083
+ }
51084
+
51085
+ .personError {
51086
+ color: var(--dees-color-text-error);
51087
+ }
51088
+
51089
+ .personNote + .personNote {
51090
+ margin-top: var(--dees-spacing-2xs);
51091
+ }
51092
+
51093
+ .rejection {
51094
+ margin: 0 0 12px;
51095
+ padding: 8px 12px;
51096
+ border: var(--dees-line-width-hairline) solid var(--dees-color-accent-error);
51097
+ border-radius: var(--dees-radius-lg);
51098
+ corner-shape: var(--dees-corner-shape);
51099
+ background: var(--dees-color-badge-error-bg);
51100
+ color: var(--dees-color-badge-error-fg);
51101
+ font-size: var(--dees-font-control-size-sm, 12px);
51102
+ overflow-wrap: anywhere;
51103
+ }
50630
51104
  `
50631
51105
  ]);
50632
51106
  __runInitializers(_init66, 1, _DeesHarnessQuestionCard);
@@ -50644,6 +51118,7 @@ var virtualGapPx = 8;
50644
51118
  var toolRowHeightPx = 28;
50645
51119
  var toolRowGapPx = 2;
50646
51120
  var thinkingRowGapPx = 2;
51121
+ var NO_PERSON_RESULTS2 = [];
50647
51122
  var pinnedRequestTime = Number.MAX_SAFE_INTEGER;
50648
51123
  var messageKeyOf = /* @__PURE__ */ __name((messageIdArg) => `message:${messageIdArg}`, "messageKeyOf");
50649
51124
  var thinkingSignatureOf = /* @__PURE__ */ __name((messageArg) => {
@@ -50719,6 +51194,14 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
50719
51194
  __publicField(this, "selectionGestureCrossesOwners", false);
50720
51195
  __publicField(this, "selectionGestureSnapshot");
50721
51196
  __publicField(this, "explicitRetainedVirtualKey");
51197
+ /** question rows kept mounted while the host's rejection reaches their card */
51198
+ __publicField(this, "heldQuestionKeys", /* @__PURE__ */ new Set());
51199
+ /**
51200
+ * What confirmed changes returned to the person, by question id: kept here rather than in the
51201
+ * view state, so a card mounted anew shows them again, and only while the question stays in
51202
+ * this transcript.
51203
+ */
51204
+ __publicField(this, "questionPersonResults", /* @__PURE__ */ new Map());
50722
51205
  __publicField(this, "virtualRowResizeObserver", null);
50723
51206
  __publicField(this, "virtualViewportResizeObserver", null);
50724
51207
  __publicField(this, "virtualMeasureFrame", null);
@@ -51071,6 +51554,9 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
51071
51554
  for (const key of Object.keys(effectiveViewState.questions)) {
51072
51555
  if (!questionIds.has(key)) delete effectiveViewState.questions[key];
51073
51556
  }
51557
+ for (const key of this.questionPersonResults.keys()) {
51558
+ if (!questionIds.has(key)) this.questionPersonResults.delete(key);
51559
+ }
51074
51560
  for (const message of this.messages) effectiveViewState.messages[message.id] ??= {};
51075
51561
  for (const request of this.permissions) effectiveViewState.permissions[request.id] ??= {};
51076
51562
  for (const request of this.questions) effectiveViewState.questions[request.id] ??= {};
@@ -51487,6 +51973,7 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
51487
51973
  .request=${itemArg.question}
51488
51974
  .busy=${this.permissionsBusy}
51489
51975
  .viewState=${this.questionViewState(itemArg.question.id)}
51976
+ .personResults=${this.questionPersonResults.get(itemArg.question.id) ?? NO_PERSON_RESULTS2}
51490
51977
  ></dees-harness-question-card>
51491
51978
  `;
51492
51979
  }
@@ -51753,6 +52240,8 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
51753
52240
  this.virtualEndIndex = 0;
51754
52241
  this.retainedVirtualKeys.clear();
51755
52242
  this.explicitRetainedVirtualKey = void 0;
52243
+ this.heldQuestionKeys.clear();
52244
+ this.questionPersonResults.clear();
51756
52245
  this.measuredVirtualHeights.clear();
51757
52246
  this.virtualOffsets = [];
51758
52247
  this.virtualTotalHeight = 0;
@@ -51802,6 +52291,50 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
51802
52291
  card.scrollIntoView({ block: "center" });
51803
52292
  return card.focusFirstAction();
51804
52293
  }
52294
+ /**
52295
+ * Hands the card of question `questionIdArg` what its confirmed changes returned to the person
52296
+ * (`IHarnessQuestionPersonResult`), after the host's own confirmation: shown under their changes,
52297
+ * kept by the list (never in the view state) while the question stays in this transcript, and
52298
+ * taken away with `[]`. `false` when this transcript has no such question.
52299
+ */
52300
+ async showQuestionPersonResults(questionIdArg, resultsArg) {
52301
+ if (!this.questions.some((request) => request.id === questionIdArg)) return false;
52302
+ if (resultsArg.length) this.questionPersonResults.set(questionIdArg, resultsArg);
52303
+ else this.questionPersonResults.delete(questionIdArg);
52304
+ this.requestUpdate();
52305
+ await this.updateComplete;
52306
+ return true;
52307
+ }
52308
+ /**
52309
+ * The host refused the answer the card of question `questionIdArg` sent, such as a confirmation
52310
+ * its server turned down: the card waits for an answer again with the changes the reader left
52311
+ * out, and shows why (`IHarnessQuestionRejection`), brought into view. Its request carries no
52312
+ * `response`. `false` when this transcript has no such question or the card cannot ask again.
52313
+ */
52314
+ async rejectQuestionResponse(questionIdArg, rejectionArg = {}) {
52315
+ if (!this.questions.some((request) => request.id === questionIdArg)) return false;
52316
+ const key = `question:${questionIdArg}`;
52317
+ this.heldQuestionKeys.add(key);
52318
+ this.retainedVirtualKeys = new Set(this.activeVirtualKeys());
52319
+ this.requestUpdate();
52320
+ try {
52321
+ await this.updateComplete;
52322
+ const card = Array.from(
52323
+ this.shadowRoot?.querySelectorAll("dees-harness-question-card[data-timeline-key]") ?? []
52324
+ ).find((candidate) => candidate.dataset.timelineKey === key);
52325
+ if (!card) return false;
52326
+ const asked = card.rejectResponse(rejectionArg);
52327
+ if (asked) {
52328
+ await card.updateComplete;
52329
+ card.scrollIntoView({ block: "nearest" });
52330
+ }
52331
+ return asked;
52332
+ } finally {
52333
+ this.heldQuestionKeys.delete(key);
52334
+ this.retainedVirtualKeys = new Set(this.activeVirtualKeys());
52335
+ this.scheduleVirtualRangeUpdate();
52336
+ }
52337
+ }
51805
52338
  schedulePendingVirtualizationActivation() {
51806
52339
  if (!this.virtualizationEnablePending && !this.virtualizationDisablePending || this.virtualizationActivationFrame !== null) return;
51807
52340
  this.virtualizationActivationFrame = requestAnimationFrame(() => {
@@ -52103,7 +52636,8 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
52103
52636
  return [
52104
52637
  ...this.explicitRetainedVirtualKey ? [this.explicitRetainedVirtualKey] : [],
52105
52638
  ...focusKey ? [focusKey] : [],
52106
- ...this.activeSelectionKeys()
52639
+ ...this.activeSelectionKeys(),
52640
+ ...this.heldQuestionKeys
52107
52641
  ].filter((key, index, keys) => keys.indexOf(key) === index);
52108
52642
  }
52109
52643
  activeTimelineKey() {
@@ -52274,6 +52808,10 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
52274
52808
  this.pendingVirtualRepin = false;
52275
52809
  this.explicitRetainedVirtualKey = void 0;
52276
52810
  this.retainedVirtualKeys.clear();
52811
+ this.heldQuestionKeys.clear();
52812
+ queueMicrotask(() => {
52813
+ if (!this.isConnected) this.questionPersonResults.clear();
52814
+ });
52277
52815
  for (const key of [...this.enteringKeys]) this.endRowEntrance(key);
52278
52816
  this.clearSelectionGesture();
52279
52817
  this.resetLoadEarlierState();
@@ -55534,6 +56072,16 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a69 = DeesElement, _mess
55534
56072
  await this.updateComplete;
55535
56073
  return this.listElement?.focusPendingPermission() ?? false;
55536
56074
  }
56075
+ /** Hands a question card what its confirmed changes returned to the person; see the message list's `showQuestionPersonResults()`. */
56076
+ async showQuestionPersonResults(questionIdArg, resultsArg) {
56077
+ await this.updateComplete;
56078
+ return await this.listElement?.showQuestionPersonResults(questionIdArg, resultsArg) ?? false;
56079
+ }
56080
+ /** Asks a question card again after the host refused its answer; see the message list's `rejectQuestionResponse()`. */
56081
+ async rejectQuestionResponse(questionIdArg, rejectionArg) {
56082
+ await this.updateComplete;
56083
+ return await this.listElement?.rejectQuestionResponse(questionIdArg, rejectionArg) ?? false;
56084
+ }
55537
56085
  scrollToBottom(force = false) {
55538
56086
  this.listElement?.scrollToBottom(force);
55539
56087
  }
@@ -71696,7 +72244,7 @@ var _DeesHarnessConversationPicker = class _DeesHarnessConversationPicker extend
71696
72244
  * cancelled. Focus returns to whatever had it when the picker opened.
71697
72245
  */
71698
72246
  static async pick(optionsArg = {}) {
71699
- const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-QBFEQURL.js");
72247
+ const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-4QORKLGX.js");
71700
72248
  const picker = new _DeesHarnessConversationPicker();
71701
72249
  picker.sessions = optionsArg.sessions ?? [];
71702
72250
  picker.groups = optionsArg.groups ?? [];
@@ -72157,7 +72705,7 @@ var handleResourceContext = /* @__PURE__ */ __name(async (event) => {
72157
72705
  list.selectedResourceId = event.detail.resource.id;
72158
72706
  }, "handleResourceContext");
72159
72707
  var openModal = /* @__PURE__ */ __name(async (sessions, groups) => {
72160
- const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-QBFEQURL.js");
72708
+ const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-4QORKLGX.js");
72161
72709
  const content = document.createElement("dees-harness-session-list");
72162
72710
  content.sessions = sessions;
72163
72711
  content.groups = groups;
@@ -115844,7 +116392,7 @@ var _DeesSimpleAppDash = class _DeesSimpleAppDash extends (_a138 = DeesElement,
115844
116392
  this.terminalOpen = true;
115845
116393
  const request = ++this.terminalRequest;
115846
116394
  try {
115847
- const { DeesWorkspaceTerminal: DeesWorkspaceTerminal3 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-workspace-terminal-UYSWDBV4.js");
116395
+ const { DeesWorkspaceTerminal: DeesWorkspaceTerminal3 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-workspace-terminal-7SYZG2AB.js");
115848
116396
  await this.updateComplete;
115849
116397
  if (!this.isConnected || request !== this.terminalRequest) return;
115850
116398
  const terminal = new DeesWorkspaceTerminal3();
@@ -122849,7 +123397,7 @@ var bright = {
122849
123397
  // ts_web/00_commitinfo_data.ts
122850
123398
  var commitinfo = {
122851
123399
  name: "@design.estate/dees-catalog",
122852
- version: "21.35.0",
123400
+ version: "21.36.1",
122853
123401
  description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
122854
123402
  };
122855
123403
  export {