viewof source = {
const textarea = html`<textarea>person
name
last
first
sex
null
not disclosed
female
male
age
numeric
cluster
marital status
single
married
widowed
separated
divorced
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]
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]]
livelihood
subsistence agriculture/forestry/aquaculture
est % crops
est % livestock
est % forestry
est % aquaculture
est % livestock
subsistence agriculture/forestry/aquaculture + income [income => income]
income
mixed
est % agricultural
est % crops
est % livestock
est % forestry
est % aquaculture
est % livestock
est % salaried
est % contractual
est % entrepreneurial
agricultural
crops
quantity above subsistence [annual / quarterly / monthly]
income amount (above subsistence)
livestock
quantity above subsistence [annual / quarterly / monthly]
income amount (above subsistence)
forestry
foraging
quantity above subsistence [annual / quarterly / monthly]
income amount (above subsistence)
tree harvesting
quantity above subsistence [annual / quarterly / monthly]
income amount (above subsistence)
other forest products
quantity above subsistence [annual / quarterly / monthly]
income amount (above subsistence)
aquaculture
fishing types / practices
quantity above subsistence [annual / quarterly / monthly]
income amount (above subsistence)
salaried
employer
locality
income amount
contractual
employer
locality
income amount
entrepreneurial
business
locality
income amount
major earning quarter
expenses
[details]
training
participant => person
training location = > loaction // NEW
training duration = > duration // NEW
training subject
activity
activity subject
agricultural
crops
livestock
forestry
foraging
tree harvesting
other forest products
aquaculture
fishing types / practices
entrepreneurial
business [LIST]
financial planning [e.g. resettlement focus]
activity date/duration
activity organizer
activity location [location template?] // NEW
activity benefit // INTERPRETED
income amount
income year(s)
location
admin (ref .NUTS)
district
municipality
ward
parcel
admin (ref .NUTS)
district
municipality
ward
land owner
size
square meter
square feet
ropani
aana
paisa
daam
bigha
katha
dhur
type
quality
irrigation
tenure
remarks
traditional land
survey`;
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();
}