-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcsvtextarea_llm_prompts.html
121 lines (121 loc) · 5.18 KB
/
csvtextarea_llm_prompts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>CL-web-components</title>
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="index.html">README</a></li>
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="user_manual.html">User Manual</a></li>
<li><a href="about.html">About</a></li>
<li><a href="search.html">Search</a></li>
<li><a href="https://github.com/caltechlibrary/CL-web-components">GitHub</a></li>
</ul>
</nav>
<section>
<ul>
<li>Create a web component for working with tabular data in a web
form</li>
<li>The component defined as CSVTextarea in the csvtextarea.js file</li>
<li>Component is embedded into the web page using “<csv-textarea>”
element</li>
<li>The component is implemented as a HTML table</li>
<li>The component has a name attribute which is used by web forms to
associate the data with the form data</li>
<li>It can include an optional column headings</li>
<li>column headings are specified as an attribute in the web
component</li>
<li>showing the column headings can be set using an attribute in the web
component</li>
<li>The number of columns should be configurable using the “cols”
attribute</li>
<li>The number of rows should be configuration using the “rows”
attribute</li>
<li>the minimum number of columns is one</li>
<li>the minimum number of rows is one</li>
<li>the default column is two</li>
<li>the default rows is 1</li>
<li>the rows and column attributes are required</li>
<li>column headings are shown by default</li>
<li>the default column headings are “column” followed an underscore an
column number</li>
<li>the column-headings attribute overwrites the default column
name</li>
<li>the web component should respond to changes in attributes</li>
<li>the value is the web component is held in the element’s
innerHTML</li>
<li>the innerHTML holds a comma separated value of the cells visible in
the web component</li>
<li>a header row is included in the innerHTML if it is also
displayed</li>
<li>the web component should include a readonly attribute and if true
prevent changes to the content</li>
<li>the default status of readonly is false</li>
<li>the web component should be usable in a web form and CSV content
should update the web form’s data</li>
<li>when a cell web component changes it should trigger a change event
updating the CSV content in the body</li>
<li>If all cells in a row are empty then that row should not be included
in the CSV content of the body</li>
<li>Each column can have a header row holding a column name configured
in the attributes of the web component</li>
<li>The maximum of rows should be optionally configurable</li>
<li>If web component cannot be instantiated it should fallback to a
plain textarea</li>
<li>The user should be able to add additional rows as needed up to any
specified maximum</li>
<li>Adding a row show happen when you press shift enter in the last
column of the last row</li>
<li>There should be a single button below the table that will to add a
row to the table on click</li>
<li>The column headings, rows, columns and button should accepts CSS
styling</li>
<li>showing the header row is optional, the default is to show it</li>
<li>The web component needs to support W3C recommendations for
accessibility</li>
<li>the width and size of the component needs to conform to the
inheritted styling</li>
<li>if the body of the web component is populate then it should populate
the table</li>
<li>when the table is change the body of the web component needs to be
update</li>
<li>when the web component is part of a web form the component needs to
add the CSV content to the form data using the component’s name
attribute</li>
<li>The componment should have a read-only attribute that works like
read-only for input attributes</li>
<li>The default column headings should be the word column, followed by
an underscore and the column number</li>
<li>There should only be one add row button in the component</li>
<li>The column headings should be down by default</li>
<li>Use an HTML template to structure the component</li>
<li>the HTML template should include the header row</li>
<li>when a row is added the focus should go to the first cell of the
added row</li>
<li>If a cell contains a comma then the value of the cell needs to be
quoted in the CSV output</li>
<li>The web component needs to add the contents when the web form is
encoded and sent to the web service.</li>
<li>The change event trigger for a cell should only happen when the cell
looses focus</li>
<li>Add a toJSON function. Represent each row as an object with the
attribute name matching the column heading and the value matching the
cell value.</li>
<li>CSVTextarea needs to include cell column and row number in the
change event.</li>
<li>The change event detail should include include column name, column
number and row number in the change event.</li>
<li>There also needs to be a function to update a cell in the table
given a column, row and value</li>
<li>The update cell function should allow the column name or column
number in the column parameter</li>
<li>Add a function to retrieve a cell’s value from the table given a
column name or number, and a row number</li>
</ul>
</section>
</body>
</html>