viewof source = {
const textarea = html`<textarea>
project
number
title
subproject => subproject
number
keyword
date / date range
administrative area
vdc/ward etc.
scope => scope
activities => activities
component => component
subproject
name
number
keyword
date / date range
scope => scope
activities => activities
component
subject title
date / date range
scope => scope
activities => activities
scope
activities
location
admin (ref .NUTS)
district
municipality
ward
person
name
last
first
sex
null
not disclosed
female
male
age
numeric
cluster
marital status
single
married
widowed
separated
divorced
patriarchal lineage
father's name
grandfather's name
language
[options list]
ethnicity
[options list]
religion
[options list]
education
cluster
disability
[options list]
contribute_to_household_subsistence
yes/no => livelihood
contribute_to_household_income
yes/no => livelihood
traditional lands => traditional lands [yes/no => create / link]
household => household [yes/no => create / link]
livelihood => livelihood [yes/no => create / link]
vocational skills
[options list]
location => location
aggrieved
yes/no => grievance
household
head of household
primary income earner
**female-headed** [inherited -> override // [writeback / error message]]
**ethnic identification** [inherited -> override // [writeback]]
**linguistic identification** [inherited -> override // [writeback]]
**religious identification** [inherited -> override // [writeback]]
**income** [inherited -> override // [writeback]]
**expenses** [inherited -> override // [writeback]]
dwelling owned/rented/squatter/landless/other
traditional lands => traditional lands
vulnerability => vulnerability
members => person
structures => structures
parcels => parcels
livelihood => [inherited -> override ++ comment // [writeback]]
grievance
project => project
subproject => subproject
complainant => person / household
complaint received by => person
date filed
mode filed
date of issue / concern
complaint subject
complaint summary
supporting attachment(s)
status
action
`;
textarea.style.display = "block";
textarea.style.boxSizing = "border-box";
textarea.style.width = "calc(100% + 28px)";
textarea.style.font = "var(--mono_fonts)";
textarea.style.minHeight = "60px";
textarea.style.border = "none";
textarea.style.padding = "4px 10px";
textarea.style.margin = "0 -14px";
textarea.style.background = "rgb(247,247,249)";
textarea.style.tabSize = 2;
textarea.onkeypress = event => {
if (event.key !== "Enter" || event.shiftKey || event.altKey || event.metaKey || event.ctrlKey) return;
let i = textarea.selectionStart;
let j = textarea.selectionEnd;
let v = textarea.value;
if (i === j) {
let k = 0;
while (i > 0 && v[--i - 1] !== "\n");
while (i < j && v[i] === " ") ++i, ++k;
textarea.value = v.substring(0, j) + "\n" + new Array(k + 1).join(" ") + v.substring(j);
textarea.selectionStart = textarea.selectionEnd = j + k + 1;
textarea.dispatchEvent(new CustomEvent("input"));
event.preventDefault();
}
};
textarea.oninput = () => {
textarea.style.height = "initial";
textarea.style.height = `${textarea.scrollHeight}px`;
};
yield textarea;
textarea.oninput();
}