@design.estate/dees-catalog 21.34.0 → 21.36.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/dist_bundle/bundle.js +848 -241
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-P3H4LK6R.js → chunk-3YTKY5IS.js} +7 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-P3H4LK6R.js.map → chunk-3YTKY5IS.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-Y4JW5Y72.js → chunk-5UGXWLMH.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-22Q5WLXW.js → chunk-ZCZ72OW4.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-7LG7TVSW.js → de-PERXVUIS.js} +7 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-PERXVUIS.js.map +1 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-TUZWVVOC.js → dees-modal-4QORKLGX.js} +3 -3
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-FZU6LDKJ.js → dees-workspace-terminal-7SYZG2AB.js} +4 -4
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.d.ts +5 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.js +11 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.d.ts +28 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.js +78 -1
- package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.d.ts +75 -3
- package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.demo.js +140 -44
- package/dist_ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.js +500 -16
- package/dist_ts_web/elements/00group-harness/interfaces.d.ts +72 -0
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.d.ts +8 -1
- package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.js +32 -5
- package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.js +225 -179
- package/dist_ts_web/i18n/de.d.ts +20 -0
- package/dist_ts_web/i18n/de.js +6 -1
- package/dist_ts_web/i18n/messages.d.ts +20 -0
- package/dist_ts_web/i18n/messages.js +6 -1
- package/package.json +1 -1
- package/readme.md +51 -2
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-harness/dees-harness-chat/dees-harness-chat.ts +17 -0
- package/ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts +83 -0
- package/ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.demo.ts +106 -2
- package/ts_web/elements/00group-harness/dees-harness-question-card/dees-harness-question-card.ts +484 -14
- package/ts_web/elements/00group-harness/interfaces.ts +77 -0
- package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts +24 -3
- package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts +240 -194
- package/ts_web/i18n/de.ts +5 -0
- package/ts_web/i18n/messages.ts +5 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-7LG7TVSW.js.map +0 -1
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-Y4JW5Y72.js.map → chunk-5UGXWLMH.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-22Q5WLXW.js.map → chunk-ZCZ72OW4.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-TUZWVVOC.js.map → dees-modal-4QORKLGX.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-FZU6LDKJ.js.map → dees-workspace-terminal-7SYZG2AB.js.map} +0 -0
package/dist_bundle/bundle.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
ownAppuiLabels,
|
|
27
27
|
resolveAppuiLabels,
|
|
28
28
|
xtermStyles
|
|
29
|
-
} from "./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-
|
|
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-
|
|
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-
|
|
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
|
|
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
|
-
|
|
49887
|
-
|
|
49888
|
-
|
|
49889
|
-
|
|
49890
|
-
|
|
49891
|
-
|
|
49892
|
-
|
|
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
|
-
|
|
49899
|
-
|
|
49900
|
-
|
|
49901
|
-
|
|
49902
|
-
|
|
49903
|
-
|
|
49904
|
-
|
|
49905
|
-
|
|
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
|
-
|
|
49912
|
-
|
|
49913
|
-
|
|
49914
|
-
|
|
49915
|
-
|
|
49916
|
-
|
|
49917
|
-
|
|
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
|
-
|
|
49924
|
-
|
|
49925
|
-
|
|
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
|
-
|
|
49932
|
-
|
|
49933
|
-
|
|
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
|
-
|
|
49939
|
-
|
|
49940
|
-
|
|
49941
|
-
|
|
49942
|
-
|
|
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
|
-
`)
|
|
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?.
|
|
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.
|
|
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,140 @@ 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
|
+
return b`
|
|
50356
|
+
<div class="personField">
|
|
50357
|
+
<label class="personLabel" for=${domId}>${fieldArg.label}${fieldArg.required ? b`<span class="required" aria-hidden="true">*</span>` : ""}</label>
|
|
50358
|
+
<div class="personInputRow">
|
|
50359
|
+
${fieldArg.multiline ? b`
|
|
50360
|
+
<textarea
|
|
50361
|
+
id=${domId}
|
|
50362
|
+
class="personInput ${secret ? "secret" : ""} ${secret && !shown ? "masked" : ""}"
|
|
50363
|
+
rows="3"
|
|
50364
|
+
autocomplete="off"
|
|
50365
|
+
spellcheck=${secret ? "false" : "true"}
|
|
50366
|
+
aria-required=${fieldArg.required ? "true" : "false"}
|
|
50367
|
+
aria-invalid=${error ? "true" : "false"}
|
|
50368
|
+
aria-describedby=${describedBy}
|
|
50369
|
+
.value=${value}
|
|
50370
|
+
?disabled=${this.locked}
|
|
50371
|
+
@input=${input}
|
|
50372
|
+
></textarea>
|
|
50373
|
+
` : b`
|
|
50374
|
+
<input
|
|
50375
|
+
id=${domId}
|
|
50376
|
+
class="personInput ${secret ? "secret" : ""}"
|
|
50377
|
+
type=${secret && !shown ? "password" : "text"}
|
|
50378
|
+
autocomplete="off"
|
|
50379
|
+
spellcheck=${secret ? "false" : "true"}
|
|
50380
|
+
aria-required=${fieldArg.required ? "true" : "false"}
|
|
50381
|
+
aria-invalid=${error ? "true" : "false"}
|
|
50382
|
+
aria-describedby=${describedBy}
|
|
50383
|
+
.value=${value}
|
|
50384
|
+
?disabled=${this.locked}
|
|
50385
|
+
@input=${input}
|
|
50386
|
+
/>
|
|
50387
|
+
`}
|
|
50388
|
+
${secret ? b`
|
|
50389
|
+
<button
|
|
50390
|
+
class="credentialAction"
|
|
50391
|
+
type="button"
|
|
50392
|
+
aria-controls=${domId}
|
|
50393
|
+
aria-label=${this.t(shown ? "question.credentialHide" : "question.credentialShow", { label: fieldArg.label })}
|
|
50394
|
+
@click=${() => this.togglePersonField(key)}
|
|
50395
|
+
>${this.t(shown ? "question.credentialHideShort" : "question.credentialShowShort")}</button>
|
|
50396
|
+
` : ""}
|
|
50397
|
+
</div>
|
|
50398
|
+
${fieldArg.hint ? b`<p class="personHint" id="${domId}-hint">${fieldArg.hint}</p>` : ""}
|
|
50399
|
+
${error ? b`<p class="personError" id="${domId}-error">${error}</p>` : ""}
|
|
50400
|
+
</div>
|
|
50401
|
+
`;
|
|
50402
|
+
}
|
|
50403
|
+
/**
|
|
50404
|
+
* Under the changes of a waiting proposal: the host's refusal of the last confirmation, that
|
|
50405
|
+
* what the person enters goes nowhere but with the confirmation, and what still holds it back.
|
|
50406
|
+
*/
|
|
50407
|
+
renderPersonNotes() {
|
|
50408
|
+
const rejection = this.effectiveRejection;
|
|
50409
|
+
const rejectionText = rejection?.message ?? (rejection?.fieldErrors?.length ? this.t("question.rejected") : "");
|
|
50410
|
+
const fields = this.includedPersonFields.length > 0;
|
|
50411
|
+
return b`
|
|
50412
|
+
${rejectionText ? b`<p class="rejection" role="alert">${rejectionText}</p>` : ""}
|
|
50413
|
+
${fields ? b`<p class="personNote">${this.t("question.personFieldsNote")}</p>` : ""}
|
|
50414
|
+
${fields && !this.locked && this.personFieldsMissing ? b`<p class="personNote personMissing">${this.t("question.personFieldsMissing")}</p>` : ""}
|
|
50415
|
+
`;
|
|
50416
|
+
}
|
|
50417
|
+
/** What the confirmed changes returned to the person: a secret masked until shown, a link to an http or https address only. */
|
|
50418
|
+
renderPersonResults(resultsArg) {
|
|
50419
|
+
return b`
|
|
50420
|
+
<div class="credential personResults">
|
|
50421
|
+
${resultsArg.map((result) => b`
|
|
50422
|
+
<div class="credentialRow">
|
|
50423
|
+
<span class="credentialLabel">${result.label}</span>
|
|
50424
|
+
${this.renderPersonResultValue(result)}
|
|
50425
|
+
</div>
|
|
50426
|
+
`)}
|
|
50427
|
+
<p class="credentialNote">${this.t("question.credentialNote")}</p>
|
|
50428
|
+
</div>
|
|
50429
|
+
`;
|
|
50430
|
+
}
|
|
50431
|
+
renderPersonResultValue(resultArg) {
|
|
50432
|
+
if (resultArg.display === "link") {
|
|
50433
|
+
const href = httpHref(resultArg.value);
|
|
50434
|
+
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>`;
|
|
50435
|
+
}
|
|
50436
|
+
if (resultArg.display !== "secret") return b`<span class="personResultText">${resultArg.value}</span>`;
|
|
50437
|
+
const shown = this.personResultsShown.has(resultArg.id);
|
|
50438
|
+
const feedback = this.copyFeedback?.key === `result:${resultArg.id}` ? this.copyFeedback : void 0;
|
|
50439
|
+
return b`
|
|
50440
|
+
<code class="credentialValue">${shown ? resultArg.value : b`<span aria-hidden="true">${CREDENTIAL_MASK}</span><span class="srOnly">${this.t("question.credentialHidden")}</span>`}</code>
|
|
50441
|
+
<button
|
|
50442
|
+
class="credentialAction"
|
|
50443
|
+
type="button"
|
|
50444
|
+
aria-label=${this.t(shown ? "question.credentialHide" : "question.credentialShow", { label: resultArg.label })}
|
|
50445
|
+
@click=${() => this.togglePersonResult(resultArg.id)}
|
|
50446
|
+
>${this.t(shown ? "question.credentialHideShort" : "question.credentialShowShort")}</button>
|
|
50447
|
+
<button
|
|
50448
|
+
class="credentialAction"
|
|
50449
|
+
type="button"
|
|
50450
|
+
aria-label=${this.t("question.credentialCopy", { label: resultArg.label })}
|
|
50451
|
+
@click=${() => this.copySecret(`result:${resultArg.id}`, resultArg.label, resultArg.value)}
|
|
50452
|
+
>${this.t("common.copy")}</button>
|
|
50453
|
+
<span class="credentialFeedback ${feedback?.failed ? "failed" : ""}" role="status" aria-live="polite">${feedback?.text ?? ""}</span>
|
|
50454
|
+
`;
|
|
50455
|
+
}
|
|
50200
50456
|
/** 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
50457
|
get proposalActions() {
|
|
50202
50458
|
const confirm2 = this.request.confirmLabel ?? this.t("question.proposalConfirm");
|
|
50203
50459
|
const decline = this.request.declineLabel ?? this.t("question.proposalDecline");
|
|
50204
50460
|
const nothingIncluded = this.itemsDeclinable && this.effectiveLeftOut.size === (this.request.items?.length ?? 0);
|
|
50205
|
-
|
|
50461
|
+
const held = !this.personFieldsComplete;
|
|
50462
|
+
if (this.footerActions?.confirm !== confirm2 || this.footerActions.decline !== decline || this.footerActions.nothingIncluded !== nothingIncluded || this.footerActions.held !== held) {
|
|
50206
50463
|
this.footerActions = {
|
|
50207
50464
|
confirm: confirm2,
|
|
50208
50465
|
decline,
|
|
50209
50466
|
nothingIncluded,
|
|
50467
|
+
held,
|
|
50210
50468
|
actions: [
|
|
50211
50469
|
{ 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") }
|
|
50470
|
+
{ name: confirm2, primary: true, disabled: nothingIncluded || held, action: /* @__PURE__ */ __name(async () => this.respond(["confirm"]), "action") }
|
|
50213
50471
|
]
|
|
50214
50472
|
};
|
|
50215
50473
|
}
|
|
@@ -50230,18 +50488,65 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
|
|
|
50230
50488
|
else next.add(itemIdArg);
|
|
50231
50489
|
this.credentialsShown = next;
|
|
50232
50490
|
}
|
|
50233
|
-
|
|
50234
|
-
const
|
|
50491
|
+
togglePersonField(keyArg) {
|
|
50492
|
+
const next = new Set(this.personFieldsShown);
|
|
50493
|
+
if (next.has(keyArg)) next.delete(keyArg);
|
|
50494
|
+
else next.add(keyArg);
|
|
50495
|
+
this.personFieldsShown = next;
|
|
50496
|
+
}
|
|
50497
|
+
togglePersonResult(resultIdArg) {
|
|
50498
|
+
const next = new Set(this.personResultsShown);
|
|
50499
|
+
if (next.has(resultIdArg)) next.delete(resultIdArg);
|
|
50500
|
+
else next.add(resultIdArg);
|
|
50501
|
+
this.personResultsShown = next;
|
|
50502
|
+
}
|
|
50503
|
+
/** The person enters a value; one the host refused is answered by the edit. */
|
|
50504
|
+
setPersonValue(fieldArg, valueArg) {
|
|
50505
|
+
if (this.locked) return;
|
|
50506
|
+
const next = new Map(this.personValues);
|
|
50507
|
+
if (valueArg) next.set(personKey(fieldArg.itemId, fieldArg.id), valueArg);
|
|
50508
|
+
else next.delete(personKey(fieldArg.itemId, fieldArg.id));
|
|
50509
|
+
this.personValues = next;
|
|
50510
|
+
const refused = /* @__PURE__ */ __name((entryArg) => entryArg.itemId === fieldArg.itemId && entryArg.fieldId === fieldArg.id, "refused");
|
|
50511
|
+
const rejection = this.effectiveRejection;
|
|
50512
|
+
if (rejection?.fieldErrors?.some(refused)) {
|
|
50513
|
+
this.setRejection({ ...rejection, fieldErrors: rejection.fieldErrors.filter((entry) => !refused(entry)) });
|
|
50514
|
+
}
|
|
50515
|
+
}
|
|
50516
|
+
/** The host's refusal the card shows: its own, or the one the view state kept over a remount. */
|
|
50517
|
+
get effectiveRejection() {
|
|
50518
|
+
return this.rejection ?? this.viewState?.rejection;
|
|
50519
|
+
}
|
|
50520
|
+
setRejection(rejectionArg) {
|
|
50521
|
+
this.rejection = rejectionArg;
|
|
50522
|
+
if (!this.viewState) return;
|
|
50523
|
+
if (rejectionArg) this.viewState.rejection = rejectionArg;
|
|
50524
|
+
else delete this.viewState.rejection;
|
|
50525
|
+
}
|
|
50526
|
+
/** Forgets what the person entered and showed, and the host's refusal of it. */
|
|
50527
|
+
clearPersonEntries() {
|
|
50528
|
+
this.personValues = /* @__PURE__ */ new Map();
|
|
50529
|
+
this.personFieldsShown = /* @__PURE__ */ new Set();
|
|
50530
|
+
this.rejection = void 0;
|
|
50531
|
+
}
|
|
50532
|
+
/** Forgets everything person-only: what was entered, and what the changes returned. */
|
|
50533
|
+
clearPersonState() {
|
|
50534
|
+
this.clearPersonEntries();
|
|
50535
|
+
this.personResults = NO_PERSON_RESULTS;
|
|
50536
|
+
this.personResultsShown = /* @__PURE__ */ new Set();
|
|
50537
|
+
if (this.copyFeedback?.key.startsWith("result:")) this.copyFeedback = void 0;
|
|
50538
|
+
}
|
|
50539
|
+
async copySecret(keyArg, labelArg, valueArg) {
|
|
50235
50540
|
const request = ++this.copyRequest;
|
|
50236
50541
|
clearTimeout(this.copyResetTimeout);
|
|
50237
50542
|
this.copyFeedback = void 0;
|
|
50238
50543
|
try {
|
|
50239
|
-
await navigator.clipboard.writeText(
|
|
50544
|
+
await navigator.clipboard.writeText(valueArg);
|
|
50240
50545
|
if (!this.isConnected || request !== this.copyRequest) return;
|
|
50241
|
-
this.copyFeedback = {
|
|
50546
|
+
this.copyFeedback = { key: keyArg, text: this.t("question.credentialCopied", { label: labelArg }), failed: false };
|
|
50242
50547
|
} catch {
|
|
50243
50548
|
if (!this.isConnected || request !== this.copyRequest) return;
|
|
50244
|
-
this.copyFeedback = {
|
|
50549
|
+
this.copyFeedback = { key: keyArg, text: this.t("question.credentialCopyFailed"), failed: true };
|
|
50245
50550
|
}
|
|
50246
50551
|
this.copyResetTimeout = setTimeout(() => {
|
|
50247
50552
|
this.copyFeedback = void 0;
|
|
@@ -50273,11 +50578,15 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
|
|
|
50273
50578
|
respond(answers) {
|
|
50274
50579
|
if (this.locked || !answers.length) return;
|
|
50275
50580
|
const items = this.request.items ?? [];
|
|
50276
|
-
const
|
|
50581
|
+
const confirming = answers[0] === "confirm";
|
|
50582
|
+
const leftOut = confirming && this.itemsDeclinable ? this.effectiveLeftOut : /* @__PURE__ */ new Set();
|
|
50277
50583
|
if (leftOut.size > 0 && leftOut.size === items.length) return;
|
|
50584
|
+
if (confirming && !this.personFieldsComplete) return;
|
|
50585
|
+
const personValues = confirming ? this.includedPersonFields.map((field) => ({ itemId: field.itemId, fieldId: field.id, value: this.personValueOf(field) })).filter((entry) => entry.value !== "") : [];
|
|
50278
50586
|
const footerFocused = this.shadowRoot?.activeElement?.localName === "dees-actionfooter";
|
|
50279
50587
|
this.answered = answers;
|
|
50280
50588
|
if (this.viewState) this.viewState.answered = answers;
|
|
50589
|
+
this.setRejection(void 0);
|
|
50281
50590
|
if (footerFocused) {
|
|
50282
50591
|
void this.updateComplete.then(() => this.shadowRoot?.querySelector(".decision")?.focus());
|
|
50283
50592
|
}
|
|
@@ -50287,11 +50596,38 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
|
|
|
50287
50596
|
request: harnessWithoutCredentials(this.request)
|
|
50288
50597
|
};
|
|
50289
50598
|
if (leftOut.size > 0) detail.declinedItemIds = items.filter((item) => leftOut.has(item.id)).map((item) => item.id);
|
|
50599
|
+
if (personValues.length) detail.personValues = personValues;
|
|
50290
50600
|
this.dispatchEvent(new CustomEvent("harness-question-response", {
|
|
50291
50601
|
detail,
|
|
50292
50602
|
bubbles: true,
|
|
50293
50603
|
composed: true
|
|
50294
50604
|
}));
|
|
50605
|
+
this.clearPersonEntries();
|
|
50606
|
+
}
|
|
50607
|
+
/**
|
|
50608
|
+
* The host refused the answer it was sent, such as a confirmation its server turned down: the
|
|
50609
|
+
* card waits for an answer again, keeps the changes the reader left out, and shows the host's
|
|
50610
|
+
* `message` and the error of each value it names. What the person entered went with the answer
|
|
50611
|
+
* and is entered anew. The refusal stands until the next answer, in the view state as well, so a
|
|
50612
|
+
* card the transcript remounts still shows it. A question that is not a proposal, a card whose
|
|
50613
|
+
* request carries the host's `response`, and one the host decided otherwise stay as they are: `false`.
|
|
50614
|
+
*/
|
|
50615
|
+
rejectResponse(rejectionArg = {}) {
|
|
50616
|
+
if (this.request.kind !== "proposal" || this.request.response !== void 0) return false;
|
|
50617
|
+
if (harnessProposalState(this.request, void 0) !== "pending") return false;
|
|
50618
|
+
this.answered = void 0;
|
|
50619
|
+
if (this.viewState) this.viewState.answered = void 0;
|
|
50620
|
+
this.setRejection(rejectionArg);
|
|
50621
|
+
return true;
|
|
50622
|
+
}
|
|
50623
|
+
willUpdate(changedProperties) {
|
|
50624
|
+
super.willUpdate(changedProperties);
|
|
50625
|
+
const previous = changedProperties.get("request");
|
|
50626
|
+
if (previous && previous.id !== this.request.id) {
|
|
50627
|
+
this.clearPersonEntries();
|
|
50628
|
+
this.personResultsShown = /* @__PURE__ */ new Set();
|
|
50629
|
+
if (!changedProperties.has("personResults")) this.personResults = NO_PERSON_RESULTS;
|
|
50630
|
+
}
|
|
50295
50631
|
}
|
|
50296
50632
|
async disconnectedCallback() {
|
|
50297
50633
|
++this.copyRequest;
|
|
@@ -50299,6 +50635,9 @@ var _DeesHarnessQuestionCard = class _DeesHarnessQuestionCard extends (_a64 = De
|
|
|
50299
50635
|
this.copyResetTimeout = void 0;
|
|
50300
50636
|
this.copyFeedback = void 0;
|
|
50301
50637
|
this.credentialsShown = /* @__PURE__ */ new Set();
|
|
50638
|
+
queueMicrotask(() => {
|
|
50639
|
+
if (!this.isConnected) this.clearPersonState();
|
|
50640
|
+
});
|
|
50302
50641
|
await super.disconnectedCallback();
|
|
50303
50642
|
}
|
|
50304
50643
|
};
|
|
@@ -50313,6 +50652,11 @@ _itemsExpanded2 = new WeakMap();
|
|
|
50313
50652
|
_leftOut = new WeakMap();
|
|
50314
50653
|
_credentialsShown = new WeakMap();
|
|
50315
50654
|
_copyFeedback2 = new WeakMap();
|
|
50655
|
+
_personResults = new WeakMap();
|
|
50656
|
+
_personValues = new WeakMap();
|
|
50657
|
+
_personFieldsShown = new WeakMap();
|
|
50658
|
+
_personResultsShown = new WeakMap();
|
|
50659
|
+
_rejection = new WeakMap();
|
|
50316
50660
|
__decorateElement(_init66, 4, "request", _request_dec2, _DeesHarnessQuestionCard, _request2);
|
|
50317
50661
|
__decorateElement(_init66, 4, "busy", _busy_dec2, _DeesHarnessQuestionCard, _busy2);
|
|
50318
50662
|
__decorateElement(_init66, 4, "viewState", _viewState_dec6, _DeesHarnessQuestionCard, _viewState6);
|
|
@@ -50323,6 +50667,11 @@ __decorateElement(_init66, 4, "itemsExpanded", _itemsExpanded_dec2, _DeesHarness
|
|
|
50323
50667
|
__decorateElement(_init66, 4, "leftOut", _leftOut_dec, _DeesHarnessQuestionCard, _leftOut);
|
|
50324
50668
|
__decorateElement(_init66, 4, "credentialsShown", _credentialsShown_dec, _DeesHarnessQuestionCard, _credentialsShown);
|
|
50325
50669
|
__decorateElement(_init66, 4, "copyFeedback", _copyFeedback_dec2, _DeesHarnessQuestionCard, _copyFeedback2);
|
|
50670
|
+
__decorateElement(_init66, 4, "personResults", _personResults_dec, _DeesHarnessQuestionCard, _personResults);
|
|
50671
|
+
__decorateElement(_init66, 4, "personValues", _personValues_dec, _DeesHarnessQuestionCard, _personValues);
|
|
50672
|
+
__decorateElement(_init66, 4, "personFieldsShown", _personFieldsShown_dec, _DeesHarnessQuestionCard, _personFieldsShown);
|
|
50673
|
+
__decorateElement(_init66, 4, "personResultsShown", _personResultsShown_dec, _DeesHarnessQuestionCard, _personResultsShown);
|
|
50674
|
+
__decorateElement(_init66, 4, "rejection", _rejection_dec, _DeesHarnessQuestionCard, _rejection);
|
|
50326
50675
|
_DeesHarnessQuestionCard = __decorateElement(_init66, 0, "DeesHarnessQuestionCard", _DeesHarnessQuestionCard_decorators, _DeesHarnessQuestionCard);
|
|
50327
50676
|
__name(_DeesHarnessQuestionCard, "DeesHarnessQuestionCard");
|
|
50328
50677
|
__publicField(_DeesHarnessQuestionCard, "demo", demoFunc44);
|
|
@@ -50627,6 +50976,130 @@ __publicField(_DeesHarnessQuestionCard, "styles", [
|
|
|
50627
50976
|
color: var(--dees-color-text-secondary);
|
|
50628
50977
|
font-size: var(--dees-font-caption1-size, 11px);
|
|
50629
50978
|
}
|
|
50979
|
+
|
|
50980
|
+
.personResultText {
|
|
50981
|
+
flex: 1 1 12em;
|
|
50982
|
+
min-width: 0;
|
|
50983
|
+
color: var(--dees-color-text-primary);
|
|
50984
|
+
overflow-wrap: anywhere;
|
|
50985
|
+
}
|
|
50986
|
+
|
|
50987
|
+
.personResultLink {
|
|
50988
|
+
flex: 1 1 12em;
|
|
50989
|
+
min-width: 0;
|
|
50990
|
+
color: var(--dees-color-accent-primary);
|
|
50991
|
+
overflow-wrap: anywhere;
|
|
50992
|
+
border-radius: var(--dees-radius-xs);
|
|
50993
|
+
}
|
|
50994
|
+
|
|
50995
|
+
.personResultLink:focus-visible {
|
|
50996
|
+
outline: var(--dees-line-width-focus-ring) solid var(--dees-color-focus-ring);
|
|
50997
|
+
outline-offset: 2px;
|
|
50998
|
+
}
|
|
50999
|
+
|
|
51000
|
+
.personFields {
|
|
51001
|
+
display: grid;
|
|
51002
|
+
gap: var(--dees-spacing-sm);
|
|
51003
|
+
margin-top: 4px;
|
|
51004
|
+
}
|
|
51005
|
+
|
|
51006
|
+
.personField {
|
|
51007
|
+
display: grid;
|
|
51008
|
+
gap: 4px;
|
|
51009
|
+
min-width: 0;
|
|
51010
|
+
}
|
|
51011
|
+
|
|
51012
|
+
.personLabel {
|
|
51013
|
+
justify-self: start;
|
|
51014
|
+
color: var(--dees-color-text-secondary);
|
|
51015
|
+
font-weight: 500;
|
|
51016
|
+
}
|
|
51017
|
+
|
|
51018
|
+
.personLabel .required {
|
|
51019
|
+
margin-left: var(--dees-spacing-2xs);
|
|
51020
|
+
color: var(--dees-color-accent-error);
|
|
51021
|
+
}
|
|
51022
|
+
|
|
51023
|
+
.personInputRow {
|
|
51024
|
+
display: flex;
|
|
51025
|
+
align-items: center;
|
|
51026
|
+
gap: var(--dees-spacing-sm);
|
|
51027
|
+
min-width: 0;
|
|
51028
|
+
}
|
|
51029
|
+
|
|
51030
|
+
.personInput {
|
|
51031
|
+
flex: 1;
|
|
51032
|
+
min-width: 0;
|
|
51033
|
+
height: var(--dees-control-height-md);
|
|
51034
|
+
padding: 0 var(--dees-spacing-sm);
|
|
51035
|
+
border: var(--dees-line-width-hairline) solid var(--dees-color-border-default);
|
|
51036
|
+
border-radius: var(--dees-radius-md);
|
|
51037
|
+
corner-shape: var(--dees-corner-shape);
|
|
51038
|
+
background: var(--dees-color-bg-primary);
|
|
51039
|
+
color: var(--dees-color-text-primary);
|
|
51040
|
+
font-family: inherit;
|
|
51041
|
+
font-size: var(--dees-font-control-size-sm, 12px);
|
|
51042
|
+
outline: none;
|
|
51043
|
+
}
|
|
51044
|
+
|
|
51045
|
+
.personInput.secret {
|
|
51046
|
+
font-family: var(--dees-font-family-mono);
|
|
51047
|
+
}
|
|
51048
|
+
|
|
51049
|
+
textarea.personInput {
|
|
51050
|
+
height: auto;
|
|
51051
|
+
min-height: calc(var(--dees-control-height-md) * 2);
|
|
51052
|
+
padding: 6px var(--dees-spacing-sm);
|
|
51053
|
+
line-height: 1.4;
|
|
51054
|
+
resize: vertical;
|
|
51055
|
+
}
|
|
51056
|
+
|
|
51057
|
+
/* a secret of several lines has no password input: it is masked as one is */
|
|
51058
|
+
textarea.personInput.masked {
|
|
51059
|
+
-webkit-text-security: disc;
|
|
51060
|
+
}
|
|
51061
|
+
|
|
51062
|
+
.personInput:focus {
|
|
51063
|
+
border-color: var(--dees-color-accent-primary);
|
|
51064
|
+
box-shadow: 0 0 0 var(--dees-line-width-focus-ring) var(--dees-color-focus-ring);
|
|
51065
|
+
}
|
|
51066
|
+
|
|
51067
|
+
.personInput[aria-invalid='true'] {
|
|
51068
|
+
border-color: var(--dees-color-accent-error);
|
|
51069
|
+
}
|
|
51070
|
+
|
|
51071
|
+
.personInput:disabled {
|
|
51072
|
+
cursor: default;
|
|
51073
|
+
opacity: 0.6;
|
|
51074
|
+
}
|
|
51075
|
+
|
|
51076
|
+
.personHint,
|
|
51077
|
+
.personError,
|
|
51078
|
+
.personNote {
|
|
51079
|
+
margin: 0;
|
|
51080
|
+
color: var(--dees-color-text-secondary);
|
|
51081
|
+
font-size: var(--dees-font-caption1-size, 11px);
|
|
51082
|
+
}
|
|
51083
|
+
|
|
51084
|
+
.personError {
|
|
51085
|
+
color: var(--dees-color-text-error);
|
|
51086
|
+
}
|
|
51087
|
+
|
|
51088
|
+
.personNote + .personNote {
|
|
51089
|
+
margin-top: var(--dees-spacing-2xs);
|
|
51090
|
+
}
|
|
51091
|
+
|
|
51092
|
+
.rejection {
|
|
51093
|
+
margin: 0 0 12px;
|
|
51094
|
+
padding: 8px 12px;
|
|
51095
|
+
border: var(--dees-line-width-hairline) solid var(--dees-color-accent-error);
|
|
51096
|
+
border-radius: var(--dees-radius-lg);
|
|
51097
|
+
corner-shape: var(--dees-corner-shape);
|
|
51098
|
+
background: var(--dees-color-badge-error-bg);
|
|
51099
|
+
color: var(--dees-color-badge-error-fg);
|
|
51100
|
+
font-size: var(--dees-font-control-size-sm, 12px);
|
|
51101
|
+
overflow-wrap: anywhere;
|
|
51102
|
+
}
|
|
50630
51103
|
`
|
|
50631
51104
|
]);
|
|
50632
51105
|
__runInitializers(_init66, 1, _DeesHarnessQuestionCard);
|
|
@@ -50644,6 +51117,7 @@ var virtualGapPx = 8;
|
|
|
50644
51117
|
var toolRowHeightPx = 28;
|
|
50645
51118
|
var toolRowGapPx = 2;
|
|
50646
51119
|
var thinkingRowGapPx = 2;
|
|
51120
|
+
var NO_PERSON_RESULTS2 = [];
|
|
50647
51121
|
var pinnedRequestTime = Number.MAX_SAFE_INTEGER;
|
|
50648
51122
|
var messageKeyOf = /* @__PURE__ */ __name((messageIdArg) => `message:${messageIdArg}`, "messageKeyOf");
|
|
50649
51123
|
var thinkingSignatureOf = /* @__PURE__ */ __name((messageArg) => {
|
|
@@ -50719,6 +51193,14 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
|
|
|
50719
51193
|
__publicField(this, "selectionGestureCrossesOwners", false);
|
|
50720
51194
|
__publicField(this, "selectionGestureSnapshot");
|
|
50721
51195
|
__publicField(this, "explicitRetainedVirtualKey");
|
|
51196
|
+
/** question rows kept mounted while the host's rejection reaches their card */
|
|
51197
|
+
__publicField(this, "heldQuestionKeys", /* @__PURE__ */ new Set());
|
|
51198
|
+
/**
|
|
51199
|
+
* What confirmed changes returned to the person, by question id: kept here rather than in the
|
|
51200
|
+
* view state, so a card mounted anew shows them again, and only while the question stays in
|
|
51201
|
+
* this transcript.
|
|
51202
|
+
*/
|
|
51203
|
+
__publicField(this, "questionPersonResults", /* @__PURE__ */ new Map());
|
|
50722
51204
|
__publicField(this, "virtualRowResizeObserver", null);
|
|
50723
51205
|
__publicField(this, "virtualViewportResizeObserver", null);
|
|
50724
51206
|
__publicField(this, "virtualMeasureFrame", null);
|
|
@@ -51071,6 +51553,9 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
|
|
|
51071
51553
|
for (const key of Object.keys(effectiveViewState.questions)) {
|
|
51072
51554
|
if (!questionIds.has(key)) delete effectiveViewState.questions[key];
|
|
51073
51555
|
}
|
|
51556
|
+
for (const key of this.questionPersonResults.keys()) {
|
|
51557
|
+
if (!questionIds.has(key)) this.questionPersonResults.delete(key);
|
|
51558
|
+
}
|
|
51074
51559
|
for (const message of this.messages) effectiveViewState.messages[message.id] ??= {};
|
|
51075
51560
|
for (const request of this.permissions) effectiveViewState.permissions[request.id] ??= {};
|
|
51076
51561
|
for (const request of this.questions) effectiveViewState.questions[request.id] ??= {};
|
|
@@ -51487,6 +51972,7 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
|
|
|
51487
51972
|
.request=${itemArg.question}
|
|
51488
51973
|
.busy=${this.permissionsBusy}
|
|
51489
51974
|
.viewState=${this.questionViewState(itemArg.question.id)}
|
|
51975
|
+
.personResults=${this.questionPersonResults.get(itemArg.question.id) ?? NO_PERSON_RESULTS2}
|
|
51490
51976
|
></dees-harness-question-card>
|
|
51491
51977
|
`;
|
|
51492
51978
|
}
|
|
@@ -51753,6 +52239,8 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
|
|
|
51753
52239
|
this.virtualEndIndex = 0;
|
|
51754
52240
|
this.retainedVirtualKeys.clear();
|
|
51755
52241
|
this.explicitRetainedVirtualKey = void 0;
|
|
52242
|
+
this.heldQuestionKeys.clear();
|
|
52243
|
+
this.questionPersonResults.clear();
|
|
51756
52244
|
this.measuredVirtualHeights.clear();
|
|
51757
52245
|
this.virtualOffsets = [];
|
|
51758
52246
|
this.virtualTotalHeight = 0;
|
|
@@ -51802,6 +52290,50 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
|
|
|
51802
52290
|
card.scrollIntoView({ block: "center" });
|
|
51803
52291
|
return card.focusFirstAction();
|
|
51804
52292
|
}
|
|
52293
|
+
/**
|
|
52294
|
+
* Hands the card of question `questionIdArg` what its confirmed changes returned to the person
|
|
52295
|
+
* (`IHarnessQuestionPersonResult`), after the host's own confirmation: shown under their changes,
|
|
52296
|
+
* kept by the list (never in the view state) while the question stays in this transcript, and
|
|
52297
|
+
* taken away with `[]`. `false` when this transcript has no such question.
|
|
52298
|
+
*/
|
|
52299
|
+
async showQuestionPersonResults(questionIdArg, resultsArg) {
|
|
52300
|
+
if (!this.questions.some((request) => request.id === questionIdArg)) return false;
|
|
52301
|
+
if (resultsArg.length) this.questionPersonResults.set(questionIdArg, resultsArg);
|
|
52302
|
+
else this.questionPersonResults.delete(questionIdArg);
|
|
52303
|
+
this.requestUpdate();
|
|
52304
|
+
await this.updateComplete;
|
|
52305
|
+
return true;
|
|
52306
|
+
}
|
|
52307
|
+
/**
|
|
52308
|
+
* The host refused the answer the card of question `questionIdArg` sent, such as a confirmation
|
|
52309
|
+
* its server turned down: the card waits for an answer again with the changes the reader left
|
|
52310
|
+
* out, and shows why (`IHarnessQuestionRejection`), brought into view. Its request carries no
|
|
52311
|
+
* `response`. `false` when this transcript has no such question or the card cannot ask again.
|
|
52312
|
+
*/
|
|
52313
|
+
async rejectQuestionResponse(questionIdArg, rejectionArg = {}) {
|
|
52314
|
+
if (!this.questions.some((request) => request.id === questionIdArg)) return false;
|
|
52315
|
+
const key = `question:${questionIdArg}`;
|
|
52316
|
+
this.heldQuestionKeys.add(key);
|
|
52317
|
+
this.retainedVirtualKeys = new Set(this.activeVirtualKeys());
|
|
52318
|
+
this.requestUpdate();
|
|
52319
|
+
try {
|
|
52320
|
+
await this.updateComplete;
|
|
52321
|
+
const card = Array.from(
|
|
52322
|
+
this.shadowRoot?.querySelectorAll("dees-harness-question-card[data-timeline-key]") ?? []
|
|
52323
|
+
).find((candidate) => candidate.dataset.timelineKey === key);
|
|
52324
|
+
if (!card) return false;
|
|
52325
|
+
const asked = card.rejectResponse(rejectionArg);
|
|
52326
|
+
if (asked) {
|
|
52327
|
+
await card.updateComplete;
|
|
52328
|
+
card.scrollIntoView({ block: "nearest" });
|
|
52329
|
+
}
|
|
52330
|
+
return asked;
|
|
52331
|
+
} finally {
|
|
52332
|
+
this.heldQuestionKeys.delete(key);
|
|
52333
|
+
this.retainedVirtualKeys = new Set(this.activeVirtualKeys());
|
|
52334
|
+
this.scheduleVirtualRangeUpdate();
|
|
52335
|
+
}
|
|
52336
|
+
}
|
|
51805
52337
|
schedulePendingVirtualizationActivation() {
|
|
51806
52338
|
if (!this.virtualizationEnablePending && !this.virtualizationDisablePending || this.virtualizationActivationFrame !== null) return;
|
|
51807
52339
|
this.virtualizationActivationFrame = requestAnimationFrame(() => {
|
|
@@ -52103,7 +52635,8 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
|
|
|
52103
52635
|
return [
|
|
52104
52636
|
...this.explicitRetainedVirtualKey ? [this.explicitRetainedVirtualKey] : [],
|
|
52105
52637
|
...focusKey ? [focusKey] : [],
|
|
52106
|
-
...this.activeSelectionKeys()
|
|
52638
|
+
...this.activeSelectionKeys(),
|
|
52639
|
+
...this.heldQuestionKeys
|
|
52107
52640
|
].filter((key, index, keys) => keys.indexOf(key) === index);
|
|
52108
52641
|
}
|
|
52109
52642
|
activeTimelineKey() {
|
|
@@ -52274,6 +52807,10 @@ var _DeesHarnessMessageList = class _DeesHarnessMessageList extends (_a65 = Dees
|
|
|
52274
52807
|
this.pendingVirtualRepin = false;
|
|
52275
52808
|
this.explicitRetainedVirtualKey = void 0;
|
|
52276
52809
|
this.retainedVirtualKeys.clear();
|
|
52810
|
+
this.heldQuestionKeys.clear();
|
|
52811
|
+
queueMicrotask(() => {
|
|
52812
|
+
if (!this.isConnected) this.questionPersonResults.clear();
|
|
52813
|
+
});
|
|
52277
52814
|
for (const key of [...this.enteringKeys]) this.endRowEntrance(key);
|
|
52278
52815
|
this.clearSelectionGesture();
|
|
52279
52816
|
this.resetLoadEarlierState();
|
|
@@ -55534,6 +56071,16 @@ var _DeesHarnessChat = class _DeesHarnessChat extends (_a69 = DeesElement, _mess
|
|
|
55534
56071
|
await this.updateComplete;
|
|
55535
56072
|
return this.listElement?.focusPendingPermission() ?? false;
|
|
55536
56073
|
}
|
|
56074
|
+
/** Hands a question card what its confirmed changes returned to the person; see the message list's `showQuestionPersonResults()`. */
|
|
56075
|
+
async showQuestionPersonResults(questionIdArg, resultsArg) {
|
|
56076
|
+
await this.updateComplete;
|
|
56077
|
+
return await this.listElement?.showQuestionPersonResults(questionIdArg, resultsArg) ?? false;
|
|
56078
|
+
}
|
|
56079
|
+
/** Asks a question card again after the host refused its answer; see the message list's `rejectQuestionResponse()`. */
|
|
56080
|
+
async rejectQuestionResponse(questionIdArg, rejectionArg) {
|
|
56081
|
+
await this.updateComplete;
|
|
56082
|
+
return await this.listElement?.rejectQuestionResponse(questionIdArg, rejectionArg) ?? false;
|
|
56083
|
+
}
|
|
55537
56084
|
scrollToBottom(force = false) {
|
|
55538
56085
|
this.listElement?.scrollToBottom(force);
|
|
55539
56086
|
}
|
|
@@ -71696,7 +72243,7 @@ var _DeesHarnessConversationPicker = class _DeesHarnessConversationPicker extend
|
|
|
71696
72243
|
* cancelled. Focus returns to whatever had it when the picker opened.
|
|
71697
72244
|
*/
|
|
71698
72245
|
static async pick(optionsArg = {}) {
|
|
71699
|
-
const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-
|
|
72246
|
+
const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-4QORKLGX.js");
|
|
71700
72247
|
const picker = new _DeesHarnessConversationPicker();
|
|
71701
72248
|
picker.sessions = optionsArg.sessions ?? [];
|
|
71702
72249
|
picker.groups = optionsArg.groups ?? [];
|
|
@@ -72157,7 +72704,7 @@ var handleResourceContext = /* @__PURE__ */ __name(async (event) => {
|
|
|
72157
72704
|
list.selectedResourceId = event.detail.resource.id;
|
|
72158
72705
|
}, "handleResourceContext");
|
|
72159
72706
|
var openModal = /* @__PURE__ */ __name(async (sessions, groups) => {
|
|
72160
|
-
const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-
|
|
72707
|
+
const { DeesModal: DeesModal2 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-modal-4QORKLGX.js");
|
|
72161
72708
|
const content = document.createElement("dees-harness-session-list");
|
|
72162
72709
|
content.sessions = sessions;
|
|
72163
72710
|
content.groups = groups;
|
|
@@ -75745,20 +76292,9 @@ var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a104 = Dee
|
|
|
75745
76292
|
title=${parent.title}
|
|
75746
76293
|
@click=${() => kanbanEvent(this, "kanban-ticket-open", { ticketId: parent.id })}
|
|
75747
76294
|
>${parent.title}</button>` : ""}
|
|
75748
|
-
<span class="spacer"></span>
|
|
75749
|
-
${editable && !this.editing ? b`<dees-button
|
|
75750
|
-
size="sm"
|
|
75751
|
-
type="ghost"
|
|
75752
|
-
text=${this.t("kanban.editTicket")}
|
|
75753
|
-
icon="lucide:Pencil"
|
|
75754
|
-
@clicked=${() => {
|
|
75755
|
-
this.editing = true;
|
|
75756
|
-
this.changeDraft({});
|
|
75757
|
-
}}
|
|
75758
|
-
></dees-button>` : ""}
|
|
75759
76295
|
</div>
|
|
75760
|
-
|
|
75761
|
-
|
|
76296
|
+
<div class="main">
|
|
76297
|
+
${this.error ? b`<p class="error" role="alert">${this.error}</p>` : ""}
|
|
75762
76298
|
<section class="lead">
|
|
75763
76299
|
${this.editing && editable ? b`<div class="edit">
|
|
75764
76300
|
${this.conflict ? this.renderConflict(ticket, this.conflict, parents, projects) : ""}
|
|
@@ -75807,133 +76343,6 @@ var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a104 = Dee
|
|
|
75807
76343
|
>${ticket.description || this.t("kanban.noDescription")}</div>`}
|
|
75808
76344
|
${ticket.source ? this.renderSource(ticket.source) : ""}
|
|
75809
76345
|
</section>
|
|
75810
|
-
<aside>
|
|
75811
|
-
<div class="fields">
|
|
75812
|
-
<div>
|
|
75813
|
-
<label class="caption">${this.t("kanban.status")}</label>
|
|
75814
|
-
<dees-input-dropdown
|
|
75815
|
-
label=${this.t("kanban.status")}
|
|
75816
|
-
.labelPosition=${"none"}
|
|
75817
|
-
.options=${this.columns.map((column) => ({ key: column.id, option: column.title }))}
|
|
75818
|
-
.value=${{
|
|
75819
|
-
key: ticket.columnId,
|
|
75820
|
-
option: this.columns.find((column) => column.id === ticket.columnId)?.title ?? ticket.columnId
|
|
75821
|
-
}}
|
|
75822
|
-
.disabled=${!movable || this.saving}
|
|
75823
|
-
@selectedOption=${(event) => kanbanEvent(this, "kanban-ticket-move", {
|
|
75824
|
-
ticketId: ticket.id,
|
|
75825
|
-
columnId: event.detail.key
|
|
75826
|
-
})}
|
|
75827
|
-
></dees-input-dropdown>
|
|
75828
|
-
</div>
|
|
75829
|
-
${this.editing && editable && projects.length ? b`<div>
|
|
75830
|
-
<label class="caption">${this.t("kanban.project")}</label>
|
|
75831
|
-
<dees-input-dropdown
|
|
75832
|
-
label=${this.t("kanban.project")}
|
|
75833
|
-
.labelPosition=${"none"}
|
|
75834
|
-
.disabled=${this.saving}
|
|
75835
|
-
.value=${{
|
|
75836
|
-
key: draft.project ?? "",
|
|
75837
|
-
option: draft.project ? kanbanProjectName(projects, draft.project) : this.t("kanban.noProject")
|
|
75838
|
-
}}
|
|
75839
|
-
.options=${[
|
|
75840
|
-
...ticket.project ? [] : [{ key: "", option: this.t("kanban.noProject") }],
|
|
75841
|
-
...projects.map((project2) => ({ key: project2.id, option: project2.name }))
|
|
75842
|
-
]}
|
|
75843
|
-
@selectedOption=${(event) => this.changeDraft({ project: event.detail.key })}
|
|
75844
|
-
></dees-input-dropdown>
|
|
75845
|
-
</div>` : ticket.project || projects.length ? b`<div>
|
|
75846
|
-
<label class="caption">${this.t("kanban.project")}</label>
|
|
75847
|
-
<span class="value ${ticket.project ? "" : "muted"}">${ticket.project ? kanbanProjectName(projects, ticket.project) : this.t("kanban.noProject")}</span>
|
|
75848
|
-
</div>` : ""}
|
|
75849
|
-
${this.editing && editable ? b`
|
|
75850
|
-
<div>
|
|
75851
|
-
<label class="caption">${this.t("kanban.priorityLabel")}</label>
|
|
75852
|
-
<dees-input-dropdown
|
|
75853
|
-
label=${this.t("kanban.priorityLabel")}
|
|
75854
|
-
.labelPosition=${"none"}
|
|
75855
|
-
.disabled=${this.saving}
|
|
75856
|
-
.value=${{ key: draft.priority, option: this.t("kanban.priority", { priority: draft.priority }) }}
|
|
75857
|
-
.options=${["none", "low", "normal", "high", "urgent"].map((key) => ({
|
|
75858
|
-
key,
|
|
75859
|
-
option: this.t("kanban.priority", { priority: key })
|
|
75860
|
-
}))}
|
|
75861
|
-
@selectedOption=${(event) => this.changeDraft({ priority: event.detail.key })}
|
|
75862
|
-
></dees-input-dropdown>
|
|
75863
|
-
</div>
|
|
75864
|
-
<div>
|
|
75865
|
-
<label class="caption">${this.t("kanban.assignee")}</label>
|
|
75866
|
-
<dees-input-dropdown
|
|
75867
|
-
label=${this.t("kanban.assignee")}
|
|
75868
|
-
.labelPosition=${"none"}
|
|
75869
|
-
.disabled=${this.saving}
|
|
75870
|
-
.value=${{
|
|
75871
|
-
key: draft.assigneeId,
|
|
75872
|
-
option: this.people.find((person) => person.id === draft.assigneeId)?.name ?? ticket.assignee?.name ?? this.t("kanban.unassigned")
|
|
75873
|
-
}}
|
|
75874
|
-
.options=${[
|
|
75875
|
-
{ key: "", option: this.t("kanban.unassigned") },
|
|
75876
|
-
...this.people.map((person) => ({ key: person.id, option: person.name }))
|
|
75877
|
-
]}
|
|
75878
|
-
@selectedOption=${(event) => this.changeDraft({ assigneeId: event.detail.key })}
|
|
75879
|
-
></dees-input-dropdown>
|
|
75880
|
-
</div>
|
|
75881
|
-
${ticket.kind !== "epic" ? b`<div>
|
|
75882
|
-
<label class="caption">${this.t(ticket.kind === "task" ? "kanban.epic" : "kanban.parentTask")}</label>
|
|
75883
|
-
<dees-input-dropdown
|
|
75884
|
-
label=${this.t(ticket.kind === "task" ? "kanban.epic" : "kanban.parentTask")}
|
|
75885
|
-
.labelPosition=${"none"}
|
|
75886
|
-
.disabled=${this.saving}
|
|
75887
|
-
.value=${{
|
|
75888
|
-
key: draft.parentId,
|
|
75889
|
-
option: parents.find((item) => item.id === draft.parentId)?.title ?? this.t("kanban.none")
|
|
75890
|
-
}}
|
|
75891
|
-
.options=${[
|
|
75892
|
-
...ticket.kind === "task" ? [{ key: "", option: this.t("kanban.none") }] : [],
|
|
75893
|
-
...parents.map((item) => ({ key: item.id, option: ticketLabel(item) }))
|
|
75894
|
-
]}
|
|
75895
|
-
@selectedOption=${(event) => this.changeDraft({ parentId: event.detail.key })}
|
|
75896
|
-
></dees-input-dropdown>
|
|
75897
|
-
</div>` : ""}
|
|
75898
|
-
` : b`<div>
|
|
75899
|
-
<label class="caption">${this.t("kanban.priorityLabel")}</label>
|
|
75900
|
-
<span class="priority value" data-priority=${ticket.priority ?? "none"}><dees-icon
|
|
75901
|
-
.icon=${kanbanPriorityIcon(ticket.priority)}
|
|
75902
|
-
iconSize="13"
|
|
75903
|
-
aria-hidden="true"
|
|
75904
|
-
></dees-icon>${this.t("kanban.priority", { priority: ticket.priority ?? "none" })}</span>
|
|
75905
|
-
</div>
|
|
75906
|
-
<div>
|
|
75907
|
-
<label class="caption">${this.t("kanban.assignee")}</label>
|
|
75908
|
-
<span class="person value"><span class="avatar" aria-hidden="true">${ticket.assignee ? kanbanInitials(ticket.assignee.name) : "\u2013"}</span>${ticket.assignee?.name ?? this.t("kanban.unassigned")}</span>
|
|
75909
|
-
</div>`}
|
|
75910
|
-
${this.editing && editable ? b`<div>
|
|
75911
|
-
<label class="caption">${this.t("kanban.labels")}</label>
|
|
75912
|
-
<dees-input-tags
|
|
75913
|
-
label=${this.t("kanban.labels")}
|
|
75914
|
-
.labelPosition=${"none"}
|
|
75915
|
-
.disabled=${this.saving}
|
|
75916
|
-
.value=${draft.labels ?? ticket.labels ?? []}
|
|
75917
|
-
.suggestions=${labels}
|
|
75918
|
-
.placeholder=${this.t("kanban.labelsPlaceholder")}
|
|
75919
|
-
@change=${(event) => {
|
|
75920
|
-
event.stopPropagation();
|
|
75921
|
-
this.changeDraft({ labels: [...event.detail.value] });
|
|
75922
|
-
}}
|
|
75923
|
-
@input=${(event) => event.stopPropagation()}
|
|
75924
|
-
></dees-input-tags>
|
|
75925
|
-
</div>` : ticket.labels?.length ? b`<div>
|
|
75926
|
-
<label class="caption">${this.t("kanban.labels")}</label>
|
|
75927
|
-
<div class="row value">
|
|
75928
|
-
${ticket.labels.map((label) => b`<span class="badge">${label}</span>`)}
|
|
75929
|
-
</div>
|
|
75930
|
-
</div>` : ""}
|
|
75931
|
-
</div>
|
|
75932
|
-
${ticket.createdAt || ticket.updatedAt ? b`<footer class="stamps">
|
|
75933
|
-
${ticket.createdAt ? this.renderStamp("created", ticket.createdAt, ticket.createdBy) : ""}
|
|
75934
|
-
${ticket.updatedAt ? this.renderStamp("updated", ticket.updatedAt, ticket.updatedBy) : ""}
|
|
75935
|
-
</footer>` : ""}
|
|
75936
|
-
</aside>
|
|
75937
76346
|
<div class="body">
|
|
75938
76347
|
${ticket.links?.length ? b`<section class="links">
|
|
75939
76348
|
<div class="section-title">
|
|
@@ -75973,7 +76382,146 @@ var _DeesKanbanTicketDetail = class _DeesKanbanTicketDetail extends (_a104 = Dee
|
|
|
75973
76382
|
</section>` : ""}
|
|
75974
76383
|
${this.provider.loadActivity ? this.renderFeed(ticket) : this.renderDiscussion(ticket)}
|
|
75975
76384
|
</div>
|
|
75976
|
-
</div
|
|
76385
|
+
</div>
|
|
76386
|
+
<aside>
|
|
76387
|
+
<div class="fields">
|
|
76388
|
+
<div class="status">
|
|
76389
|
+
<div class="field-head">
|
|
76390
|
+
<label class="caption">${this.t("kanban.status")}</label>
|
|
76391
|
+
${editable && !this.editing ? b`<dees-button
|
|
76392
|
+
size="sm"
|
|
76393
|
+
type="ghost"
|
|
76394
|
+
text=${this.t("kanban.editTicket")}
|
|
76395
|
+
icon="lucide:Pencil"
|
|
76396
|
+
@clicked=${() => {
|
|
76397
|
+
this.editing = true;
|
|
76398
|
+
this.changeDraft({});
|
|
76399
|
+
}}
|
|
76400
|
+
></dees-button>` : ""}
|
|
76401
|
+
</div>
|
|
76402
|
+
<dees-input-dropdown
|
|
76403
|
+
label=${this.t("kanban.status")}
|
|
76404
|
+
.labelPosition=${"none"}
|
|
76405
|
+
.options=${this.columns.map((column) => ({ key: column.id, option: column.title }))}
|
|
76406
|
+
.value=${{
|
|
76407
|
+
key: ticket.columnId,
|
|
76408
|
+
option: this.columns.find((column) => column.id === ticket.columnId)?.title ?? ticket.columnId
|
|
76409
|
+
}}
|
|
76410
|
+
.disabled=${!movable || this.saving}
|
|
76411
|
+
@selectedOption=${(event) => kanbanEvent(this, "kanban-ticket-move", {
|
|
76412
|
+
ticketId: ticket.id,
|
|
76413
|
+
columnId: event.detail.key
|
|
76414
|
+
})}
|
|
76415
|
+
></dees-input-dropdown>
|
|
76416
|
+
</div>
|
|
76417
|
+
${this.editing && editable && projects.length ? b`<div>
|
|
76418
|
+
<label class="caption">${this.t("kanban.project")}</label>
|
|
76419
|
+
<dees-input-dropdown
|
|
76420
|
+
label=${this.t("kanban.project")}
|
|
76421
|
+
.labelPosition=${"none"}
|
|
76422
|
+
.disabled=${this.saving}
|
|
76423
|
+
.value=${{
|
|
76424
|
+
key: draft.project ?? "",
|
|
76425
|
+
option: draft.project ? kanbanProjectName(projects, draft.project) : this.t("kanban.noProject")
|
|
76426
|
+
}}
|
|
76427
|
+
.options=${[
|
|
76428
|
+
...ticket.project ? [] : [{ key: "", option: this.t("kanban.noProject") }],
|
|
76429
|
+
...projects.map((project2) => ({ key: project2.id, option: project2.name }))
|
|
76430
|
+
]}
|
|
76431
|
+
@selectedOption=${(event) => this.changeDraft({ project: event.detail.key })}
|
|
76432
|
+
></dees-input-dropdown>
|
|
76433
|
+
</div>` : ticket.project || projects.length ? b`<div>
|
|
76434
|
+
<label class="caption">${this.t("kanban.project")}</label>
|
|
76435
|
+
<span class="value ${ticket.project ? "" : "muted"}">${ticket.project ? kanbanProjectName(projects, ticket.project) : this.t("kanban.noProject")}</span>
|
|
76436
|
+
</div>` : ""}
|
|
76437
|
+
${this.editing && editable ? b`
|
|
76438
|
+
<div>
|
|
76439
|
+
<label class="caption">${this.t("kanban.priorityLabel")}</label>
|
|
76440
|
+
<dees-input-dropdown
|
|
76441
|
+
label=${this.t("kanban.priorityLabel")}
|
|
76442
|
+
.labelPosition=${"none"}
|
|
76443
|
+
.disabled=${this.saving}
|
|
76444
|
+
.value=${{ key: draft.priority, option: this.t("kanban.priority", { priority: draft.priority }) }}
|
|
76445
|
+
.options=${["none", "low", "normal", "high", "urgent"].map((key) => ({
|
|
76446
|
+
key,
|
|
76447
|
+
option: this.t("kanban.priority", { priority: key })
|
|
76448
|
+
}))}
|
|
76449
|
+
@selectedOption=${(event) => this.changeDraft({ priority: event.detail.key })}
|
|
76450
|
+
></dees-input-dropdown>
|
|
76451
|
+
</div>
|
|
76452
|
+
<div>
|
|
76453
|
+
<label class="caption">${this.t("kanban.assignee")}</label>
|
|
76454
|
+
<dees-input-dropdown
|
|
76455
|
+
label=${this.t("kanban.assignee")}
|
|
76456
|
+
.labelPosition=${"none"}
|
|
76457
|
+
.disabled=${this.saving}
|
|
76458
|
+
.value=${{
|
|
76459
|
+
key: draft.assigneeId,
|
|
76460
|
+
option: this.people.find((person) => person.id === draft.assigneeId)?.name ?? ticket.assignee?.name ?? this.t("kanban.unassigned")
|
|
76461
|
+
}}
|
|
76462
|
+
.options=${[
|
|
76463
|
+
{ key: "", option: this.t("kanban.unassigned") },
|
|
76464
|
+
...this.people.map((person) => ({ key: person.id, option: person.name }))
|
|
76465
|
+
]}
|
|
76466
|
+
@selectedOption=${(event) => this.changeDraft({ assigneeId: event.detail.key })}
|
|
76467
|
+
></dees-input-dropdown>
|
|
76468
|
+
</div>
|
|
76469
|
+
${ticket.kind !== "epic" ? b`<div>
|
|
76470
|
+
<label class="caption">${this.t(ticket.kind === "task" ? "kanban.epic" : "kanban.parentTask")}</label>
|
|
76471
|
+
<dees-input-dropdown
|
|
76472
|
+
label=${this.t(ticket.kind === "task" ? "kanban.epic" : "kanban.parentTask")}
|
|
76473
|
+
.labelPosition=${"none"}
|
|
76474
|
+
.disabled=${this.saving}
|
|
76475
|
+
.value=${{
|
|
76476
|
+
key: draft.parentId,
|
|
76477
|
+
option: parents.find((item) => item.id === draft.parentId)?.title ?? this.t("kanban.none")
|
|
76478
|
+
}}
|
|
76479
|
+
.options=${[
|
|
76480
|
+
...ticket.kind === "task" ? [{ key: "", option: this.t("kanban.none") }] : [],
|
|
76481
|
+
...parents.map((item) => ({ key: item.id, option: ticketLabel(item) }))
|
|
76482
|
+
]}
|
|
76483
|
+
@selectedOption=${(event) => this.changeDraft({ parentId: event.detail.key })}
|
|
76484
|
+
></dees-input-dropdown>
|
|
76485
|
+
</div>` : ""}
|
|
76486
|
+
` : b`<div>
|
|
76487
|
+
<label class="caption">${this.t("kanban.priorityLabel")}</label>
|
|
76488
|
+
<span class="priority value" data-priority=${ticket.priority ?? "none"}><dees-icon
|
|
76489
|
+
.icon=${kanbanPriorityIcon(ticket.priority)}
|
|
76490
|
+
iconSize="13"
|
|
76491
|
+
aria-hidden="true"
|
|
76492
|
+
></dees-icon>${this.t("kanban.priority", { priority: ticket.priority ?? "none" })}</span>
|
|
76493
|
+
</div>
|
|
76494
|
+
<div>
|
|
76495
|
+
<label class="caption">${this.t("kanban.assignee")}</label>
|
|
76496
|
+
<span class="person value"><span class="avatar" aria-hidden="true">${ticket.assignee ? kanbanInitials(ticket.assignee.name) : "\u2013"}</span>${ticket.assignee?.name ?? this.t("kanban.unassigned")}</span>
|
|
76497
|
+
</div>`}
|
|
76498
|
+
${this.editing && editable ? b`<div>
|
|
76499
|
+
<label class="caption">${this.t("kanban.labels")}</label>
|
|
76500
|
+
<dees-input-tags
|
|
76501
|
+
label=${this.t("kanban.labels")}
|
|
76502
|
+
.labelPosition=${"none"}
|
|
76503
|
+
.disabled=${this.saving}
|
|
76504
|
+
.value=${draft.labels ?? ticket.labels ?? []}
|
|
76505
|
+
.suggestions=${labels}
|
|
76506
|
+
.placeholder=${this.t("kanban.labelsPlaceholder")}
|
|
76507
|
+
@change=${(event) => {
|
|
76508
|
+
event.stopPropagation();
|
|
76509
|
+
this.changeDraft({ labels: [...event.detail.value] });
|
|
76510
|
+
}}
|
|
76511
|
+
@input=${(event) => event.stopPropagation()}
|
|
76512
|
+
></dees-input-tags>
|
|
76513
|
+
</div>` : ticket.labels?.length ? b`<div>
|
|
76514
|
+
<label class="caption">${this.t("kanban.labels")}</label>
|
|
76515
|
+
<div class="row value">
|
|
76516
|
+
${ticket.labels.map((label) => b`<span class="badge">${label}</span>`)}
|
|
76517
|
+
</div>
|
|
76518
|
+
</div>` : ""}
|
|
76519
|
+
</div>
|
|
76520
|
+
${ticket.createdAt || ticket.updatedAt ? b`<footer class="stamps">
|
|
76521
|
+
${ticket.createdAt ? this.renderStamp("created", ticket.createdAt, ticket.createdBy) : ""}
|
|
76522
|
+
${ticket.updatedAt ? this.renderStamp("updated", ticket.updatedAt, ticket.updatedBy) : ""}
|
|
76523
|
+
</footer>` : ""}
|
|
76524
|
+
</aside>`;
|
|
75977
76525
|
}
|
|
75978
76526
|
renderDiscussion(ticket, inFeed = false) {
|
|
75979
76527
|
return b`<dees-kanban-discussion
|
|
@@ -76154,32 +76702,44 @@ __name(_DeesKanbanTicketDetail, "DeesKanbanTicketDetail");
|
|
|
76154
76702
|
__publicField(_DeesKanbanTicketDetail, "styles", [
|
|
76155
76703
|
...kanbanStyles,
|
|
76156
76704
|
i`
|
|
76705
|
+
/*
|
|
76706
|
+
* The toolbar runs across the top. Under its hairline the main column scrolls on its own
|
|
76707
|
+
* and the properties fill the other side down to the bottom edge. Given a height, such as a
|
|
76708
|
+
* modal's body, the detail fills it; otherwise it is as tall as its content.
|
|
76709
|
+
*/
|
|
76157
76710
|
:host {
|
|
76158
|
-
|
|
76711
|
+
display: grid;
|
|
76712
|
+
grid-template-columns: minmax(0, 1fr) 280px;
|
|
76713
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
76714
|
+
grid-template-areas: 'toolbar toolbar' 'main props';
|
|
76715
|
+
height: 100%;
|
|
76716
|
+
min-height: 0;
|
|
76159
76717
|
}
|
|
76160
76718
|
|
|
76161
|
-
.
|
|
76162
|
-
|
|
76163
|
-
|
|
76164
|
-
|
|
76165
|
-
|
|
76166
|
-
|
|
76719
|
+
.main {
|
|
76720
|
+
grid-area: main;
|
|
76721
|
+
min-width: 0;
|
|
76722
|
+
padding: 20px 24px 24px;
|
|
76723
|
+
overflow-y: auto;
|
|
76724
|
+
overscroll-behavior: contain;
|
|
76725
|
+
scrollbar-width: thin;
|
|
76167
76726
|
}
|
|
76168
76727
|
|
|
76169
76728
|
.lead {
|
|
76170
|
-
grid-area: lead;
|
|
76171
76729
|
min-width: 0;
|
|
76172
76730
|
}
|
|
76173
76731
|
|
|
76174
76732
|
.body {
|
|
76175
|
-
grid-area: body;
|
|
76176
76733
|
min-width: 0;
|
|
76734
|
+
margin-top: 24px;
|
|
76177
76735
|
}
|
|
76178
76736
|
|
|
76179
76737
|
.toolbar {
|
|
76180
|
-
|
|
76738
|
+
grid-area: toolbar;
|
|
76181
76739
|
flex-wrap: nowrap;
|
|
76182
76740
|
min-width: 0;
|
|
76741
|
+
padding: var(--dees-spacing-md) 24px 14px;
|
|
76742
|
+
border-bottom: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
76183
76743
|
}
|
|
76184
76744
|
|
|
76185
76745
|
.toolbar .badge {
|
|
@@ -76319,13 +76879,35 @@ __publicField(_DeesKanbanTicketDetail, "styles", [
|
|
|
76319
76879
|
font-variant-numeric: tabular-nums;
|
|
76320
76880
|
}
|
|
76321
76881
|
|
|
76882
|
+
/* The properties are the side of the surface, not a box on it; they stay while the main column scrolls. */
|
|
76322
76883
|
aside {
|
|
76323
76884
|
grid-area: props;
|
|
76324
76885
|
min-width: 0;
|
|
76325
|
-
padding:
|
|
76326
|
-
border-
|
|
76327
|
-
|
|
76328
|
-
|
|
76886
|
+
padding: 20px 24px 24px 20px;
|
|
76887
|
+
border-left: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
76888
|
+
background: var(--dees-color-modal-sidebar);
|
|
76889
|
+
overflow-y: auto;
|
|
76890
|
+
overscroll-behavior: contain;
|
|
76891
|
+
scrollbar-width: thin;
|
|
76892
|
+
}
|
|
76893
|
+
|
|
76894
|
+
/* Edit ticket shares the Status label's line without making it taller: 1lh is the label's line. */
|
|
76895
|
+
.field-head {
|
|
76896
|
+
display: flex;
|
|
76897
|
+
align-items: center;
|
|
76898
|
+
gap: 8px;
|
|
76899
|
+
margin-bottom: 5px;
|
|
76900
|
+
font-size: var(--dees-font-caption1-size);
|
|
76901
|
+
}
|
|
76902
|
+
|
|
76903
|
+
.fields .field-head label {
|
|
76904
|
+
flex: 1;
|
|
76905
|
+
margin-bottom: 0;
|
|
76906
|
+
}
|
|
76907
|
+
|
|
76908
|
+
.field-head dees-button {
|
|
76909
|
+
flex-shrink: 0;
|
|
76910
|
+
margin-block: calc((var(--dees-control-height-sm) - 1lh) / -2);
|
|
76329
76911
|
}
|
|
76330
76912
|
|
|
76331
76913
|
.fields {
|
|
@@ -76594,21 +77176,32 @@ __publicField(_DeesKanbanTicketDetail, "styles", [
|
|
|
76594
77176
|
grid-area: apply;
|
|
76595
77177
|
}
|
|
76596
77178
|
|
|
77179
|
+
/* One column the container scrolls; the properties follow the main content as a full-width section. */
|
|
76597
77180
|
@media (max-width: 700px) {
|
|
76598
77181
|
:host {
|
|
77182
|
+
display: block;
|
|
77183
|
+
height: auto;
|
|
77184
|
+
}
|
|
77185
|
+
.toolbar {
|
|
77186
|
+
gap: 6px;
|
|
77187
|
+
padding: var(--dees-spacing-md) 16px;
|
|
77188
|
+
}
|
|
77189
|
+
.main {
|
|
76599
77190
|
padding: 16px;
|
|
77191
|
+
overflow: visible;
|
|
76600
77192
|
}
|
|
76601
|
-
|
|
76602
|
-
|
|
76603
|
-
|
|
76604
|
-
|
|
77193
|
+
aside {
|
|
77194
|
+
padding: 16px 16px 20px;
|
|
77195
|
+
border-left: 0;
|
|
77196
|
+
border-top: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
|
|
77197
|
+
overflow: visible;
|
|
76605
77198
|
}
|
|
76606
77199
|
.fields {
|
|
76607
77200
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
76608
77201
|
}
|
|
76609
|
-
.
|
|
76610
|
-
|
|
76611
|
-
|
|
77202
|
+
/* Edit ticket stays at the far side, clear of the next field. */
|
|
77203
|
+
.fields .status {
|
|
77204
|
+
grid-column: 1 / -1;
|
|
76612
77205
|
}
|
|
76613
77206
|
.child {
|
|
76614
77207
|
gap: 7px;
|
|
@@ -78557,7 +79150,7 @@ __runInitializers(_init107, 1, _DeesKanbanColumn);
|
|
|
78557
79150
|
var DeesKanbanColumn = _DeesKanbanColumn;
|
|
78558
79151
|
|
|
78559
79152
|
// ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts
|
|
78560
|
-
var _columnsCollapsed_dec, _openingTicket_dec, _pendingTicketId_dec2, _filterAnnouncement_dec, _filtersOpen_dec, _operationError_dec, _revision_dec, _filterValues_dec2, _currentPersonId_dec, _projects_dec4, _error_dec7, _loading_dec11, _provider_dec4, _people_dec2, _columns_dec7, _tickets_dec4, _heading_dec10, _a107, _DeesKanban_decorators, _init108, _heading10, _tickets4, _columns7, _people2, _provider4, _loading11, _error7, _projects4, _currentPersonId, _filterValues2, _revision, _operationError, _filtersOpen, _filterAnnouncement, _pendingTicketId2, _openingTicket, _columnsCollapsed;
|
|
79153
|
+
var _columnsCollapsed_dec, _openingTicket_dec, _pendingTicketId_dec2, _filterAnnouncement_dec, _filtersOpen_dec, _operationError_dec, _revision_dec, _filterValues_dec2, _currentPersonId_dec, _projectRequired_dec, _projects_dec4, _error_dec7, _loading_dec11, _provider_dec4, _people_dec2, _columns_dec7, _tickets_dec4, _heading_dec10, _a107, _DeesKanban_decorators, _init108, _heading10, _tickets4, _columns7, _people2, _provider4, _loading11, _error7, _projects4, _projectRequired, _currentPersonId, _filterValues2, _revision, _operationError, _filtersOpen, _filterAnnouncement, _pendingTicketId2, _openingTicket, _columnsCollapsed;
|
|
78561
79154
|
var interactionEvents = [
|
|
78562
79155
|
"kanban-ticket-open",
|
|
78563
79156
|
"kanban-ticket-move",
|
|
@@ -78576,7 +79169,7 @@ var interactionEvents = [
|
|
|
78576
79169
|
"kanban-column-toggle"
|
|
78577
79170
|
];
|
|
78578
79171
|
_DeesKanban_decorators = [customElement("dees-kanban")];
|
|
78579
|
-
var _DeesKanban = class _DeesKanban extends (_a107 = DeesElement, _heading_dec10 = [n({ type: String, reflect: true })], _tickets_dec4 = [n({ attribute: false })], _columns_dec7 = [n({ attribute: false })], _people_dec2 = [n({ attribute: false })], _provider_dec4 = [n({ attribute: false })], _loading_dec11 = [n({ type: Boolean, reflect: true })], _error_dec7 = [n({ type: String, reflect: true })], _projects_dec4 = [n({ attribute: false })], _currentPersonId_dec = [n({ type: String, reflect: true })], _filterValues_dec2 = [n({ attribute: false })], _revision_dec = [n({ attribute: false })], _operationError_dec = [r2()], _filtersOpen_dec = [r2()], _filterAnnouncement_dec = [r2()], _pendingTicketId_dec2 = [r2()], _openingTicket_dec = [r2()], _columnsCollapsed_dec = [r2()], _a107) {
|
|
79172
|
+
var _DeesKanban = class _DeesKanban extends (_a107 = DeesElement, _heading_dec10 = [n({ type: String, reflect: true })], _tickets_dec4 = [n({ attribute: false })], _columns_dec7 = [n({ attribute: false })], _people_dec2 = [n({ attribute: false })], _provider_dec4 = [n({ attribute: false })], _loading_dec11 = [n({ type: Boolean, reflect: true })], _error_dec7 = [n({ type: String, reflect: true })], _projects_dec4 = [n({ attribute: false })], _projectRequired_dec = [n({ type: Boolean, reflect: true })], _currentPersonId_dec = [n({ type: String, reflect: true })], _filterValues_dec2 = [n({ attribute: false })], _revision_dec = [n({ attribute: false })], _operationError_dec = [r2()], _filtersOpen_dec = [r2()], _filterAnnouncement_dec = [r2()], _pendingTicketId_dec2 = [r2()], _openingTicket_dec = [r2()], _columnsCollapsed_dec = [r2()], _a107) {
|
|
78580
79173
|
constructor() {
|
|
78581
79174
|
super(...arguments);
|
|
78582
79175
|
__publicField(this, "t", dcLocalize(this));
|
|
@@ -78588,15 +79181,16 @@ var _DeesKanban = class _DeesKanban extends (_a107 = DeesElement, _heading_dec10
|
|
|
78588
79181
|
__privateAdd(this, _loading11, __runInitializers(_init108, 28, this, false)), __runInitializers(_init108, 31, this);
|
|
78589
79182
|
__privateAdd(this, _error7, __runInitializers(_init108, 32, this, "")), __runInitializers(_init108, 35, this);
|
|
78590
79183
|
__privateAdd(this, _projects4, __runInitializers(_init108, 36, this, [])), __runInitializers(_init108, 39, this);
|
|
78591
|
-
__privateAdd(this,
|
|
78592
|
-
__privateAdd(this,
|
|
78593
|
-
__privateAdd(this,
|
|
78594
|
-
__privateAdd(this,
|
|
78595
|
-
__privateAdd(this,
|
|
78596
|
-
__privateAdd(this,
|
|
78597
|
-
__privateAdd(this,
|
|
78598
|
-
__privateAdd(this,
|
|
78599
|
-
__privateAdd(this,
|
|
79184
|
+
__privateAdd(this, _projectRequired, __runInitializers(_init108, 40, this, false)), __runInitializers(_init108, 43, this);
|
|
79185
|
+
__privateAdd(this, _currentPersonId, __runInitializers(_init108, 44, this, "")), __runInitializers(_init108, 47, this);
|
|
79186
|
+
__privateAdd(this, _filterValues2, __runInitializers(_init108, 48, this, {})), __runInitializers(_init108, 51, this);
|
|
79187
|
+
__privateAdd(this, _revision, __runInitializers(_init108, 52, this)), __runInitializers(_init108, 55, this);
|
|
79188
|
+
__privateAdd(this, _operationError, __runInitializers(_init108, 56, this, "")), __runInitializers(_init108, 59, this);
|
|
79189
|
+
__privateAdd(this, _filtersOpen, __runInitializers(_init108, 60, this, false)), __runInitializers(_init108, 63, this);
|
|
79190
|
+
__privateAdd(this, _filterAnnouncement, __runInitializers(_init108, 64, this, "")), __runInitializers(_init108, 67, this);
|
|
79191
|
+
__privateAdd(this, _pendingTicketId2, __runInitializers(_init108, 68, this, "")), __runInitializers(_init108, 71, this);
|
|
79192
|
+
__privateAdd(this, _openingTicket, __runInitializers(_init108, 72, this, false)), __runInitializers(_init108, 75, this);
|
|
79193
|
+
__privateAdd(this, _columnsCollapsed, __runInitializers(_init108, 76, this, {})), __runInitializers(_init108, 79, this);
|
|
78600
79194
|
__publicField(this, "modal");
|
|
78601
79195
|
__publicField(this, "modalOpening");
|
|
78602
79196
|
__publicField(this, "detail");
|
|
@@ -79437,7 +80031,8 @@ var _DeesKanban = class _DeesKanban extends (_a107 = DeesElement, _heading_dec10
|
|
|
79437
80031
|
/**
|
|
79438
80032
|
* Asks for a new ticket's title and, for a task or an epic while the board knows projects, its
|
|
79439
80033
|
* project, then has the provider create it. The project starts at the board's project filter,
|
|
79440
|
-
* else the parent's; a subtask takes its parent's.
|
|
80034
|
+
* else the parent's; a subtask takes its parent's. With `projectRequired`, the dialog creates
|
|
80035
|
+
* nothing until a project is chosen.
|
|
79441
80036
|
*/
|
|
79442
80037
|
async createTicket(input) {
|
|
79443
80038
|
if (!this.provider.createTicket || !this.columns.some((column) => column.id === input.columnId))
|
|
@@ -79450,16 +80045,21 @@ var _DeesKanban = class _DeesKanban extends (_a107 = DeesElement, _heading_dec10
|
|
|
79450
80045
|
const parentProject = parentId ? this.findTicket(parentId)?.project : void 0;
|
|
79451
80046
|
const project2 = (input.kind === "subtask" ? parentProject || input.project : input.project || this.filterValues.project || parentProject) || "";
|
|
79452
80047
|
const projects = kanbanProjects(this.projects, this.tickets);
|
|
80048
|
+
const required = this.projectRequired;
|
|
79453
80049
|
let choice;
|
|
79454
80050
|
if (input.kind !== "subtask" && projects.length) {
|
|
79455
80051
|
choice = new DeesInputDropdown();
|
|
79456
80052
|
choice.label = this.t("kanban.project");
|
|
79457
80053
|
choice.options = [
|
|
79458
|
-
...project2 ? [] : [{ key: "", option: this.t("kanban.noProject") }],
|
|
80054
|
+
...project2 || required ? [] : [{ key: "", option: this.t("kanban.noProject") }],
|
|
79459
80055
|
...projects.map((item) => ({ key: item.id, option: item.name })),
|
|
79460
80056
|
...project2 && !projects.some((item) => item.id === project2) ? [{ key: project2, option: project2 }] : []
|
|
79461
80057
|
];
|
|
79462
80058
|
choice.selectedOption = choice.options.find((option) => option.key === project2) ?? null;
|
|
80059
|
+
if (required) {
|
|
80060
|
+
choice.required = true;
|
|
80061
|
+
choice.description = this.t("kanban.projectRequired");
|
|
80062
|
+
}
|
|
79463
80063
|
}
|
|
79464
80064
|
const title = new DeesInputText();
|
|
79465
80065
|
title.label = this.t("kanban.ticketTitle");
|
|
@@ -79475,6 +80075,11 @@ var _DeesKanban = class _DeesKanban extends (_a107 = DeesElement, _heading_dec10
|
|
|
79475
80075
|
return;
|
|
79476
80076
|
}
|
|
79477
80077
|
const chosen = choice ? choice.getValue()?.key ?? "" : project2;
|
|
80078
|
+
if (choice && required && !chosen) {
|
|
80079
|
+
choice.focus();
|
|
80080
|
+
if (!choice.isOpened) await choice.toggleSelectionBox();
|
|
80081
|
+
return;
|
|
80082
|
+
}
|
|
79478
80083
|
creating = true;
|
|
79479
80084
|
title.disabled = true;
|
|
79480
80085
|
if (choice) choice.disabled = true;
|
|
@@ -79604,6 +80209,7 @@ _provider4 = new WeakMap();
|
|
|
79604
80209
|
_loading11 = new WeakMap();
|
|
79605
80210
|
_error7 = new WeakMap();
|
|
79606
80211
|
_projects4 = new WeakMap();
|
|
80212
|
+
_projectRequired = new WeakMap();
|
|
79607
80213
|
_currentPersonId = new WeakMap();
|
|
79608
80214
|
_filterValues2 = new WeakMap();
|
|
79609
80215
|
_revision = new WeakMap();
|
|
@@ -79621,6 +80227,7 @@ __decorateElement(_init108, 4, "provider", _provider_dec4, _DeesKanban, _provide
|
|
|
79621
80227
|
__decorateElement(_init108, 4, "loading", _loading_dec11, _DeesKanban, _loading11);
|
|
79622
80228
|
__decorateElement(_init108, 4, "error", _error_dec7, _DeesKanban, _error7);
|
|
79623
80229
|
__decorateElement(_init108, 4, "projects", _projects_dec4, _DeesKanban, _projects4);
|
|
80230
|
+
__decorateElement(_init108, 4, "projectRequired", _projectRequired_dec, _DeesKanban, _projectRequired);
|
|
79624
80231
|
__decorateElement(_init108, 4, "currentPersonId", _currentPersonId_dec, _DeesKanban, _currentPersonId);
|
|
79625
80232
|
__decorateElement(_init108, 4, "filterValues", _filterValues_dec2, _DeesKanban, _filterValues2);
|
|
79626
80233
|
__decorateElement(_init108, 4, "revision", _revision_dec, _DeesKanban, _revision);
|
|
@@ -115784,7 +116391,7 @@ var _DeesSimpleAppDash = class _DeesSimpleAppDash extends (_a138 = DeesElement,
|
|
|
115784
116391
|
this.terminalOpen = true;
|
|
115785
116392
|
const request = ++this.terminalRequest;
|
|
115786
116393
|
try {
|
|
115787
|
-
const { DeesWorkspaceTerminal: DeesWorkspaceTerminal3 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-workspace-terminal-
|
|
116394
|
+
const { DeesWorkspaceTerminal: DeesWorkspaceTerminal3 } = await import("./chunks/U6Ua8p1giFoD1s7vrUZUdpbg/dees-workspace-terminal-7SYZG2AB.js");
|
|
115788
116395
|
await this.updateComplete;
|
|
115789
116396
|
if (!this.isConnected || request !== this.terminalRequest) return;
|
|
115790
116397
|
const terminal = new DeesWorkspaceTerminal3();
|
|
@@ -122789,7 +123396,7 @@ var bright = {
|
|
|
122789
123396
|
// ts_web/00_commitinfo_data.ts
|
|
122790
123397
|
var commitinfo = {
|
|
122791
123398
|
name: "@design.estate/dees-catalog",
|
|
122792
|
-
version: "21.
|
|
123399
|
+
version: "21.36.0",
|
|
122793
123400
|
description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
|
|
122794
123401
|
};
|
|
122795
123402
|
export {
|