@loadbare/app 0.22.0 → 0.24.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/build/assemble.d.ts.map +1 -1
- package/dist/build/assemble.js +28 -1
- package/dist/build/assemble.js.map +1 -1
- package/dist/build/build.d.ts +16 -0
- package/dist/build/build.d.ts.map +1 -1
- package/dist/build/build.js +77 -5
- package/dist/build/build.js.map +1 -1
- package/dist/core/lb-constants.d.ts +8 -5
- package/dist/core/lb-constants.d.ts.map +1 -1
- package/dist/core/lb-constants.js +20 -11
- package/dist/core/lb-constants.js.map +1 -1
- package/dist/core/lb-types.d.ts +19 -3
- package/dist/core/lb-types.d.ts.map +1 -1
- package/dist/core/lb-types.js +35 -5
- package/dist/core/lb-types.js.map +1 -1
- package/dist/hub/lb-apply.d.ts +18 -22
- package/dist/hub/lb-apply.d.ts.map +1 -1
- package/dist/hub/lb-apply.js +127 -57
- package/dist/hub/lb-apply.js.map +1 -1
- package/dist/hub/lb-hub.browser.d.ts.map +1 -1
- package/dist/hub/lb-hub.browser.js +15 -22
- package/dist/hub/lb-hub.browser.js.map +1 -1
- package/dist/server/lb-server.d.ts +2 -2
- package/dist/server/lb-server.d.ts.map +1 -1
- package/dist/server/lb-server.js +29 -9
- package/dist/server/lb-server.js.map +1 -1
- package/docs/comparison.md +11 -11
- package/docs/miswarts.md +7 -5
- package/docs/reference/chrome.md +42 -0
- package/docs/reference/custom-elements.md +9 -4
- package/docs/reference/data-binding.md +89 -67
- package/docs/reference/dev-server.md +10 -3
- package/docs/reference/names.md +10 -7
- package/docs/reference/page-files.md +8 -4
- package/docs/temp-proposals.md +251 -0
- package/docs/testing.md +3 -3
- package/package.json +1 -1
- package/skills/loadbare-app/SKILL.md +24 -12
- package/skills/loadbare-app/references/chrome.md +42 -0
- package/skills/loadbare-app/references/custom-elements.md +9 -4
- package/skills/loadbare-app/references/data-binding.md +89 -67
- package/skills/loadbare-app/references/dev-server.md +10 -3
- package/skills/loadbare-app/references/miswarts.md +7 -5
- package/skills/loadbare-app/references/names.md +10 -7
- package/skills/loadbare-app/references/page-files.md +8 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A page shows server data by naming queries and columns in its HTML, and asks
|
|
4
4
|
the server to change that data by naming requests. The developer writes
|
|
5
|
-
|
|
5
|
+
eighteen `lb-` attributes. The server declares every query a page may show and
|
|
6
6
|
every request it may send, and refuses anything it has not declared.
|
|
7
7
|
|
|
8
8
|
Everything is a query. A query is a name for rows, of kind `row` or `rows`,
|
|
@@ -67,10 +67,10 @@ builder writes a stamp, and a stylesheet or a custom element reads it.
|
|
|
67
67
|
| `lb-key-value` | The key of a live row, or of a `row` landed on an element |
|
|
68
68
|
| `lb-row-live` | The element is a live row |
|
|
69
69
|
| `lb-query-row-count` | The number of live rows an element shows |
|
|
70
|
-
| `lb-query-
|
|
70
|
+
| `lb-query-unplaced-count` | The number of them out of place; see [Placing by hand](#placing-by-hand) |
|
|
71
71
|
| `lb-query-order` | The order placing them; see [Order](#order) |
|
|
72
72
|
| `lb-group-live`, `lb-group-column`, `lb-group-value` | A group, the column it breaks on, and its value; see [Groups](#groups) |
|
|
73
|
-
| `lb-row-created`, `lb-row-changed`, `lb-row-moved`, `lb-row-requested`, `lb-row-
|
|
73
|
+
| `lb-row-created`, `lb-row-changed`, `lb-row-moved`, `lb-row-requested`, `lb-row-unplaced` | What happened to a row; see [What happened to a row](#what-happened-to-a-row) |
|
|
74
74
|
| `lb-row-leaving`, `lb-group-leaving` | A row or group on its way out |
|
|
75
75
|
| `lb-row-editing` | The row a form is pointed at; see [Editing a row in one form](#editing-a-row-in-one-form) |
|
|
76
76
|
| `lb-row-selected` | A row whose `lb-select` is ticked |
|
|
@@ -146,6 +146,7 @@ no row fills.
|
|
|
146
146
|
| `<input>`, `<select>`, `<textarea>` | Its `value`, and `lb-column-value` |
|
|
147
147
|
| `<input type="checkbox">` | Its `checked`, and `lb-column-value` |
|
|
148
148
|
| `<input type="radio">` | Its `checked`, and `lb-column-value` |
|
|
149
|
+
| `<select multiple>` | Its selected options, and `lb-column-value` |
|
|
149
150
|
| A form-associated custom element with `value` | Its `value`, and `lb-column-value` |
|
|
150
151
|
| Any other custom element | `lb-column-value` only |
|
|
151
152
|
| Any other element | Its text content, and `lb-column-value` |
|
|
@@ -173,18 +174,22 @@ column the user sorts or filters raw, and format it in the element.
|
|
|
173
174
|
|
|
174
175
|
### Checkboxes
|
|
175
176
|
|
|
176
|
-
A checkbox is a control. It
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
A checkbox is a control. It sends `"true"` or `"false"`
|
|
178
|
+
([miswart](../miswarts.md#checkboxes-and-radio-groups-always-gather-a-value)),
|
|
179
|
+
and it is checked when its column is anything but `false`, null, `"false"`
|
|
180
|
+
or `""`:
|
|
179
181
|
|
|
180
182
|
```html
|
|
181
183
|
<input type="checkbox" lb-column="active" lb-request="lb-row-update" />
|
|
182
184
|
```
|
|
183
185
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
A checkbox lands what it sends, so it shows the same state after a round
|
|
187
|
+
trip through a query whose values are strings, such as `lb-url` or
|
|
188
|
+
`lb-choices`. A query parm the URL does not carry lands as `""`, so the
|
|
189
|
+
checkbox is unchecked. Unchecked sends `"false"` rather than nothing, so a
|
|
190
|
+
flag can be set back. A checkbox carrying a `value` attribute is not a flag
|
|
191
|
+
but one of a set, holding a query parm the URL repeats; see
|
|
192
|
+
[Several values](./chrome.md#several-values).
|
|
188
193
|
|
|
189
194
|
### Radio buttons
|
|
190
195
|
|
|
@@ -225,9 +230,9 @@ places it immediately before the template:
|
|
|
225
230
|
The hub matches each row to a live row by its key. All rows decide
|
|
226
231
|
membership: a live row whose key did not arrive leaves. A patch changes only
|
|
227
232
|
the rows it names, and every other live row keeps its content. The hub
|
|
228
|
-
places live rows by the query's order, except
|
|
229
|
-
|
|
230
|
-
[
|
|
233
|
+
places live rows by the query's order, except where the list's `lb-manual`
|
|
234
|
+
leaves them where they stand; see [Order](#order) and
|
|
235
|
+
[Placing by hand](#placing-by-hand). A row that
|
|
231
236
|
does not pass the user's filter is `hidden`; see [Filters](#filters).
|
|
232
237
|
|
|
233
238
|
A live row whose values arrive as it already shows them is not filled
|
|
@@ -307,41 +312,50 @@ Rows that compare equal keep the order they arrived in, a patch's new rows
|
|
|
307
312
|
after the rows already showing. A row moves only when the order
|
|
308
313
|
puts it somewhere else, so all rows landing again unchanged move nothing.
|
|
309
314
|
|
|
310
|
-
###
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
315
|
+
### Placing by hand
|
|
316
|
+
|
|
317
|
+
By default the hub places a list's rows by the order and the filter on
|
|
318
|
+
every landing. Write `lb-manual` on the element carrying `lb-query` to leave
|
|
319
|
+
one side or both to the user, so rows do not jump about or vanish while the
|
|
320
|
+
user works through them. It names `order`, `filter` or both, separated by a
|
|
321
|
+
space:
|
|
322
|
+
|
|
323
|
+
```html
|
|
324
|
+
<lb-table lb-query="entries" lb-order="entries_order"
|
|
325
|
+
lb-filter="description, is_unmatched" lb-manual="order filter">
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
A landing that answers a request leaves alone each side the list names,
|
|
329
|
+
wherever the request was sent from: a control in a live row, a ghost row, a
|
|
330
|
+
form `--lb-edit` pointed at a row, or a form elsewhere on the page.
|
|
331
|
+
|
|
332
|
+
| The answer | Under `lb-manual`, the row | Side |
|
|
333
|
+
|----------------------------------------|---------------------------------------------------|----------|
|
|
334
|
+
| Changes a column the order reads | Stays where it stands | `order` |
|
|
335
|
+
| Creates a row | Goes after the last row of its group, or last of all | `order` |
|
|
336
|
+
| Changes the column its group breaks on | Stays under its group's heading | `order` |
|
|
337
|
+
| Changes a row so the filter hides it | Stays showing | `filter` |
|
|
338
|
+
| Drops a row | Leaves, under either side | |
|
|
339
|
+
|
|
340
|
+
A side not named is placed on every landing. A list that names only
|
|
341
|
+
`filter` moves an edited row into the order and keeps it showing; one that
|
|
342
|
+
names only `order` leaves it where it stands and hides it once the filter
|
|
343
|
+
says so.
|
|
344
|
+
|
|
345
|
+
A patch and all rows answering the same edit land the same way. A showing
|
|
346
|
+
row left where the order or the filter would not leave it is stamped
|
|
347
|
+
`lb-row-unplaced`, and the element carrying `lb-query` carries
|
|
348
|
+
`lb-query-unplaced-count`, the number of such rows. One stamp covers both
|
|
349
|
+
sides. Each element naming the query places by its own `lb-manual`.
|
|
350
|
+
|
|
351
|
+
The rows are placed by the order and the filter again, and every
|
|
352
|
+
`lb-row-unplaced` is cleared, when the page loads, when the user's order or
|
|
353
|
+
filter changes, or on `--lb-place`. A button names the list with HTML's
|
|
340
354
|
`commandfor`, and a stylesheet shows it only while it has something to do:
|
|
341
355
|
|
|
342
356
|
```html
|
|
343
|
-
<div id="roster" lb-query="roster">
|
|
344
|
-
<button type="button" class="
|
|
357
|
+
<div id="roster" lb-query="roster" lb-manual="order">
|
|
358
|
+
<button type="button" class="place" commandfor="roster" command="--lb-place">Re-sort</button>
|
|
345
359
|
<ul>
|
|
346
360
|
<template><li><input lb-column="name" lb-request="lb-row-update" /></li></template>
|
|
347
361
|
</ul>
|
|
@@ -349,19 +363,19 @@ filter changes, or on `--lb-sort`. A button names the list with HTML's
|
|
|
349
363
|
```
|
|
350
364
|
|
|
351
365
|
```css
|
|
352
|
-
.
|
|
366
|
+
.place {
|
|
353
367
|
display: none;
|
|
354
368
|
}
|
|
355
|
-
[lb-query-
|
|
369
|
+
[lb-query-unplaced-count]:not([lb-query-unplaced-count="0"]) .place {
|
|
356
370
|
display: revert;
|
|
357
371
|
}
|
|
358
372
|
```
|
|
359
373
|
|
|
360
|
-
`--lb-
|
|
374
|
+
`--lb-place` places the rows the hub holds, with no round trip. Aimed at an
|
|
361
375
|
element that carries no `lb-query`, or shows no rows the hub holds, it is
|
|
362
376
|
reported to the console. A custom element that reorders rows by a request of
|
|
363
377
|
its own dispatches the same command on the list once the answer lands, with
|
|
364
|
-
`new CommandEvent("command", { command: "--lb-
|
|
378
|
+
`new CommandEvent("command", { command: "--lb-place" })`: the user asked for
|
|
365
379
|
the move.
|
|
366
380
|
|
|
367
381
|
### Filters
|
|
@@ -381,9 +395,9 @@ its rows the user may filter, separated by commas. The column of
|
|
|
381
395
|
```
|
|
382
396
|
|
|
383
397
|
A row that does not pass every filter is `hidden`, and a ticked `lb-select`
|
|
384
|
-
in it is cleared.
|
|
385
|
-
until the rows are placed again; see
|
|
386
|
-
[
|
|
398
|
+
in it is cleared. Under `lb-manual="filter"`, a row an answer changed stays
|
|
399
|
+
showing until the rows are placed again; see
|
|
400
|
+
[Placing by hand](#placing-by-hand). A group whose rows are all hidden is hidden too
|
|
387
401
|
([miswart](../miswarts.md#rows-hidden-by-a-filter)). An empty
|
|
388
402
|
choice filters nothing.
|
|
389
403
|
|
|
@@ -464,8 +478,9 @@ are heading rows beside their rows:
|
|
|
464
478
|
Content after the nested template lands after the group's rows, which is
|
|
465
479
|
where a group's footer goes.
|
|
466
480
|
|
|
467
|
-
A heading is filled from its group's first row
|
|
468
|
-
|
|
481
|
+
A heading is filled from its group's first row as an element in a row is,
|
|
482
|
+
`href`s from `lb-url-parm` included, so it may show a column other than the
|
|
483
|
+
one the group breaks on. Under `lb-manual="order"`, a row an answer
|
|
469
484
|
moved to another group stays under its old heading, and the heading shows
|
|
470
485
|
the row as it stood, until the rows are placed again. The hub stamps each top-level
|
|
471
486
|
element of a group with `lb-group-live`, `lb-group-column` and
|
|
@@ -516,7 +531,7 @@ Every change to a list is one a stylesheet can see:
|
|
|
516
531
|
| `lb-row-changed` | Its values changed when the hub last touched it |
|
|
517
532
|
| `lb-row-moved` | Its values changed, and it now stands elsewhere |
|
|
518
533
|
| `lb-row-requested` | `created`, `changed` or `moved` by this page's request |
|
|
519
|
-
| `lb-row-
|
|
534
|
+
| `lb-row-unplaced` | Stands where the order or the filter would not leave it |
|
|
520
535
|
| `lb-row-leaving` | A row on its way out |
|
|
521
536
|
| `lb-group-leaving` | A group on its way out |
|
|
522
537
|
|
|
@@ -525,9 +540,9 @@ The hub touches a row when an answer names it. `lb-row-created`,
|
|
|
525
540
|
applied again is removed and added as two changes, so an animation keyed to
|
|
526
541
|
it plays again. `lb-row-requested` is cleared at every landing of the row's
|
|
527
542
|
query, and set only by a landing that answers a request from the page.
|
|
528
|
-
`lb-row-
|
|
529
|
-
placed
|
|
530
|
-
[
|
|
543
|
+
`lb-row-unplaced` is a state, not an event: it stays until the rows are
|
|
544
|
+
placed again; see
|
|
545
|
+
[Placing by hand](#placing-by-hand).
|
|
531
546
|
|
|
532
547
|
A row or a group that leaves loses `lb-row-live` or `lb-group-live`, takes
|
|
533
548
|
`lb-row-leaving` or `lb-group-leaving` and `inert`
|
|
@@ -576,9 +591,9 @@ insert form above: it sits inside `lb-query="roster"` so its request is for
|
|
|
576
591
|
|
|
577
592
|
The hub stamps every element that holds a row template with
|
|
578
593
|
`lb-query-row-count`, the number of live rows it shows. A row a filter
|
|
579
|
-
hides is not counted. Beside it, `lb-query-
|
|
580
|
-
rows out of
|
|
581
|
-
[
|
|
594
|
+
hides is not counted. Beside it, `lb-query-unplaced-count` is the number of
|
|
595
|
+
rows out of place; see
|
|
596
|
+
[Placing by hand](#placing-by-hand). An empty query is a stylesheet rule:
|
|
582
597
|
|
|
583
598
|
```html
|
|
584
599
|
<div lb-query="roster">
|
|
@@ -789,6 +804,10 @@ carrying `lb-request`:
|
|
|
789
804
|
3. The element is in a live row: every control in that live row.
|
|
790
805
|
4. Otherwise: every control whose form owner is the element's form owner.
|
|
791
806
|
|
|
807
|
+
A control that holds several values, a `<select multiple>` or a set of
|
|
808
|
+
checkboxes carrying `value`, gathers an array of strings; see
|
|
809
|
+
[Several values](./chrome.md#several-values).
|
|
810
|
+
|
|
792
811
|
The hub gathers from controls only, and skips a control that belongs to a
|
|
793
812
|
query nested inside the group, except that a form gathers the rows of a
|
|
794
813
|
query nested in its own; see [A form over a set of rows](#a-form-over-a-set-of-rows).
|
|
@@ -1040,11 +1059,9 @@ An `lb-show` in the form reads from the row it was pointed at. With no row,
|
|
|
1040
1059
|
every column is null, so `lb-show="!id"` shows only while entering a new
|
|
1041
1060
|
row.
|
|
1042
1061
|
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
[Rows the user is working in](#rows-the-user-is-working-in). A form New
|
|
1047
|
-
pointed is not inside any list, and its rows are placed by the order.
|
|
1062
|
+
The rows a form's answer lands are placed by the list's `lb-manual`, as any
|
|
1063
|
+
answer's are, whether the form was pointed by Edit or by New; see
|
|
1064
|
+
[Placing by hand](#placing-by-hand).
|
|
1048
1065
|
|
|
1049
1066
|
A successful request from the form lets it go, as Cancel does: the form
|
|
1050
1067
|
empties, its controls return to their defaults, and the stamps go. A failed
|
|
@@ -1320,7 +1337,7 @@ The developer writes `lb-` attributes in markup, and script never assigns
|
|
|
1320
1337
|
them. The builder checks the markup of the chrome and of every page, after
|
|
1321
1338
|
expansion, and refuses to build:
|
|
1322
1339
|
|
|
1323
|
-
- an `lb-` attribute that is not one of the
|
|
1340
|
+
- an `lb-` attribute that is not one of the eighteen the developer writes;
|
|
1324
1341
|
`lb-exp-slot` and `lb-exp-template` are consumed by expansion and never
|
|
1325
1342
|
reach the check
|
|
1326
1343
|
- `lb-request` naming an `lb-` request other than the three Loadbare provides
|
|
@@ -1337,12 +1354,17 @@ expansion, and refuses to build:
|
|
|
1337
1354
|
column, naming columns not separated by commas or one beginning `lb-`, or
|
|
1338
1355
|
with no row around it
|
|
1339
1356
|
- `lb-url-push` on an element without `lb-request`
|
|
1357
|
+
- `lb-column` on an element carrying `multiple`, or on a checkbox carrying
|
|
1358
|
+
`value`, with any query but `lb-url` around it: only a query parm holds
|
|
1359
|
+
several values
|
|
1340
1360
|
- `lb-url-unknown` on anything but a `<dialog>`, or outside `<lb-hub>`
|
|
1341
1361
|
- `lb-show` on a `<template>`, or on a row template's root
|
|
1342
1362
|
- `lb-show` with no `lb-query` around it
|
|
1343
1363
|
- `lb-show="!"` or `lb-show="!!column"`, which reverse no column
|
|
1344
1364
|
- `lb-order` or `lb-filter` on an element not carrying `lb-query`, or naming
|
|
1345
1365
|
no column
|
|
1366
|
+
- `lb-manual` on an element not carrying `lb-query`, or naming anything but
|
|
1367
|
+
`order`, `filter` or both
|
|
1346
1368
|
- `lb-select` on anything but `<input type="checkbox">`, outside a row
|
|
1347
1369
|
template, or beside `lb-column` or `lb-request`
|
|
1348
1370
|
- a `command` beginning `--lb-` that is not one of the four commands
|
|
@@ -105,6 +105,7 @@ own from them.
|
|
|
105
105
|
|--------------|------------------------|--------------------------------------------------------------|
|
|
106
106
|
| `watchApp` | `@loadbare/app/build` | Builds, rebuilds on a change, and reports each build |
|
|
107
107
|
| `buildApp` | `@loadbare/app/build` | Builds once |
|
|
108
|
+
| `watchTree` | `@loadbare/app/build` | Reports each changed file under a directory |
|
|
108
109
|
| `appServer` | `@loadbare/app/dev` | The application's server as a child process, restarted on demand |
|
|
109
110
|
| `gate` | `@loadbare/app/dev` | Holds requests while any reason to hold them stands |
|
|
110
111
|
| `devProxy` | `@loadbare/app/dev` | The browser's port, passing requests through a gate |
|
|
@@ -123,6 +124,13 @@ fails. A build writes nothing until every output is ready, so a failed one
|
|
|
123
124
|
leaves the last good build in place. `loadbare-app-build` is a thin command
|
|
124
125
|
over these two.
|
|
125
126
|
|
|
127
|
+
`watchTree(root, onFile)` calls `onFile(file)` for each file under `root`
|
|
128
|
+
that is changed, added or removed, with its path relative to `root`. It
|
|
129
|
+
watches each directory, including those made later, so a file saved by
|
|
130
|
+
replacing it, as `sed -i` and many editors save, is reported on every save.
|
|
131
|
+
Node's `fs.watch` with `recursive: true` loses such a file on Linux after
|
|
132
|
+
its first save. It returns `{ close() }`. `watchApp` watches `src` with it.
|
|
133
|
+
|
|
126
134
|
`appServer({ entry, port, portEnv, node, log })` returns `{ restart(),
|
|
127
135
|
stop(), state }`. `restart()` stops the server if it runs, starts it, and
|
|
128
136
|
resolves once it accepts connections, or has exited instead. `state` is
|
|
@@ -143,8 +151,7 @@ a plain message when the port is in use.
|
|
|
143
151
|
A dev server that also restarts on a change to `config/`:
|
|
144
152
|
|
|
145
153
|
```ts
|
|
146
|
-
import {
|
|
147
|
-
import { watchApp } from "@loadbare/app/build";
|
|
154
|
+
import { watchApp, watchTree } from "@loadbare/app/build";
|
|
148
155
|
import { appServer, devProxy, gate } from "@loadbare/app/dev";
|
|
149
156
|
|
|
150
157
|
const held = gate();
|
|
@@ -163,7 +170,7 @@ const watcher = watchApp({
|
|
|
163
170
|
held.open("build");
|
|
164
171
|
},
|
|
165
172
|
});
|
|
166
|
-
|
|
173
|
+
watchTree("config", () => void restart());
|
|
167
174
|
|
|
168
175
|
await watcher.ready;
|
|
169
176
|
await restart();
|
package/docs/reference/names.md
CHANGED
|
@@ -66,7 +66,7 @@ A widget package declares these. An application never does.
|
|
|
66
66
|
|
|
67
67
|
## Attributes
|
|
68
68
|
|
|
69
|
-
The developer writes
|
|
69
|
+
The developer writes eighteen attributes in pages and the chrome, and the
|
|
70
70
|
builder refuses any other `lb-` attribute there. `lb-exp-slot` and
|
|
71
71
|
`lb-exp-template` are written for expansion, which removes them before the
|
|
72
72
|
check. The hub and the builder write the rest, as stamps, and script never
|
|
@@ -79,6 +79,7 @@ assigns one.
|
|
|
79
79
|
| `lb-show` | Developer | [Conditional rendering](./data-binding.md#conditional-rendering) |
|
|
80
80
|
| `lb-order` | Developer | [Order](./data-binding.md#order) |
|
|
81
81
|
| `lb-filter` | Developer | [Filters](./data-binding.md#filters) |
|
|
82
|
+
| `lb-manual` | Developer | [Placing by hand](./data-binding.md#placing-by-hand) |
|
|
82
83
|
| `lb-group` | Developer | [Groups](./data-binding.md#groups) |
|
|
83
84
|
| `lb-count`, `lb-sum`, `lb-avg`, `lb-min`, `lb-max` | Developer | [Aggregates](./data-binding.md#aggregates) |
|
|
84
85
|
| `lb-select` | Developer | [Selecting rows](./data-binding.md#selecting-rows) |
|
|
@@ -93,7 +94,7 @@ assigns one.
|
|
|
93
94
|
| `lb-key-value` | Hub | [Landing](./data-binding.md#landing), [Editing a row in one form](./data-binding.md#editing-a-row-in-one-form) |
|
|
94
95
|
| `lb-row-live` | Hub | [Landing](./data-binding.md#landing) |
|
|
95
96
|
| `lb-query-row-count` | Hub | [Counting rows](./data-binding.md#counting-rows) |
|
|
96
|
-
| `lb-query-
|
|
97
|
+
| `lb-query-unplaced-count`, `lb-row-unplaced` | Hub | [Placing by hand](./data-binding.md#placing-by-hand) |
|
|
97
98
|
| `lb-query-order` | Hub | [Order](./data-binding.md#order) |
|
|
98
99
|
| `lb-group-live`, `lb-group-column`, `lb-group-value` | Hub | [Groups](./data-binding.md#groups) |
|
|
99
100
|
| `lb-row-created`, `lb-row-changed`, `lb-row-moved`, `lb-row-requested` | Hub | [What happened to a row](./data-binding.md#what-happened-to-a-row) |
|
|
@@ -140,7 +141,7 @@ Loadbare/app owns every value of HTML's `command` attribute beginning with
|
|
|
140
141
|
| `--lb-edit` | [Editing a row in one form](./data-binding.md#editing-a-row-in-one-form) |
|
|
141
142
|
| `--lb-new` | [Editing a row in one form](./data-binding.md#editing-a-row-in-one-form) |
|
|
142
143
|
| `--lb-release` | [Editing a row in one form](./data-binding.md#editing-a-row-in-one-form) |
|
|
143
|
-
| `--lb-
|
|
144
|
+
| `--lb-place` | [Placing by hand](./data-binding.md#placing-by-hand) |
|
|
144
145
|
|
|
145
146
|
## Reserved tags
|
|
146
147
|
|
|
@@ -199,7 +200,7 @@ imports them rather than writing a string.
|
|
|
199
200
|
| `ATTR_ROW_LIVE` | `lb-row-live` |
|
|
200
201
|
| `LIVE_ROW` | `[lb-row-live]`, the selector for a live row |
|
|
201
202
|
| `ATTR_QUERY_ROW_COUNT` | `lb-query-row-count` |
|
|
202
|
-
| `
|
|
203
|
+
| `ATTR_QUERY_UNPLACED_COUNT` | `lb-query-unplaced-count` |
|
|
203
204
|
| `ATTR_QUERY_ORDER` | `lb-query-order` |
|
|
204
205
|
| `ATTR_GROUP` | `lb-group` |
|
|
205
206
|
| `ATTR_GROUP_LIVE` | `lb-group-live` |
|
|
@@ -213,13 +214,15 @@ imports them rather than writing a string.
|
|
|
213
214
|
| `CHOICES_QUERY` | `lb-choices` |
|
|
214
215
|
| `ATTR_ORDER` | `lb-order` |
|
|
215
216
|
| `ATTR_FILTER` | `lb-filter` |
|
|
217
|
+
| `ATTR_MANUAL` | `lb-manual` |
|
|
218
|
+
| `MANUAL_ORDER`, `MANUAL_FILTER` | `order`, `filter`: the sides `lb-manual` names |
|
|
216
219
|
| `FILTER_OPERATORS` | Every filter operator, the longer first |
|
|
217
220
|
| `ATTR_ROW_CREATED` | `lb-row-created` |
|
|
218
221
|
| `ATTR_ROW_CHANGED` | `lb-row-changed` |
|
|
219
222
|
| `ATTR_ROW_MOVED` | `lb-row-moved` |
|
|
220
223
|
| `ATTR_ROW_REQUESTED` | `lb-row-requested` |
|
|
221
224
|
| `REQUESTED_CREATED`, `REQUESTED_CHANGED`, `REQUESTED_MOVED` | `created`, `changed`, `moved` |
|
|
222
|
-
| `
|
|
225
|
+
| `ATTR_ROW_UNPLACED` | `lb-row-unplaced` |
|
|
223
226
|
| `ATTR_ROW_LEAVING` | `lb-row-leaving` |
|
|
224
227
|
| `ATTR_GROUP_LEAVING` | `lb-group-leaving` |
|
|
225
228
|
| `ATTR_REQUEST` | `lb-request` |
|
|
@@ -229,7 +232,7 @@ imports them rather than writing a string.
|
|
|
229
232
|
| `ATTR_REQUEST_ERROR` | `lb-request-error` |
|
|
230
233
|
| `ATTR_REQUEST_REFUSED` | `lb-request-refused` |
|
|
231
234
|
| `LB_REFUSAL_STATUS` | `422` |
|
|
232
|
-
| `COMMAND_EDIT`, `COMMAND_NEW`, `COMMAND_RELEASE`, `
|
|
235
|
+
| `COMMAND_EDIT`, `COMMAND_NEW`, `COMMAND_RELEASE`, `COMMAND_PLACE` | `--lb-edit`, `--lb-new`, `--lb-release`, `--lb-place` |
|
|
233
236
|
| `LB_COMMANDS` | All four commands |
|
|
234
237
|
| `LB_COMMAND_PREFIX` | `--lb-` |
|
|
235
238
|
| `ATTR_ROW_EDITING` | `lb-row-editing` |
|
|
@@ -265,7 +268,7 @@ imports them rather than writing a string.
|
|
|
265
268
|
| `ATTR_EXP_TEMPLATE` | `lb-exp-template` |
|
|
266
269
|
| `ATTR_PAGE` | `lb-page` |
|
|
267
270
|
| `ATTR_PAGE_TITLE` | `lb-page-title` |
|
|
268
|
-
| `DEVELOPER_ATTRIBUTES` | The
|
|
271
|
+
| `DEVELOPER_ATTRIBUTES` | The eighteen attributes a developer writes |
|
|
269
272
|
| `HUB_TAG_NAME` | `lb-hub` |
|
|
270
273
|
| `LB_ENDPOINT` | `/lb` |
|
|
271
274
|
| `LB_REQUEST_TIMEOUT_MS` | `10000` |
|
|
@@ -382,8 +382,9 @@ one row dropped, one row edited — and leave `refresh` empty. A refreshed
|
|
|
382
382
|
A change that seems to need a refresh usually has a patch:
|
|
383
383
|
|
|
384
384
|
- A row whose position changes: the hub places it by the query's
|
|
385
|
-
[order](./data-binding.md#order), or leaves it where
|
|
386
|
-
|
|
385
|
+
[order](./data-binding.md#order), or leaves it where it stands under the
|
|
386
|
+
list's [`lb-manual`](./data-binding.md#placing-by-hand); a refresh would do
|
|
387
|
+
the same.
|
|
387
388
|
- A group that appears or goes: the hub makes a group with its first row
|
|
388
389
|
and removes it with its last, so no row stands in for an empty one.
|
|
389
390
|
- A row whose other columns change with the edit: re-read the row and patch
|
|
@@ -445,7 +446,9 @@ export const requests: Requests = {
|
|
|
445
446
|
```
|
|
446
447
|
|
|
447
448
|
A column other than `lb-path` is a query parm: set, or taken out when its
|
|
448
|
-
value is an empty string. Name at least one column, and give each a string
|
|
449
|
+
value is an empty string. Name at least one column, and give each a string,
|
|
450
|
+
or an array of strings to repeat the parm; see
|
|
451
|
+
[Several values](./chrome.md#several-values).
|
|
449
452
|
With `lb-path` naming another page, the page is entered with only the parms
|
|
450
453
|
named:
|
|
451
454
|
|
|
@@ -462,7 +465,8 @@ nothing else `run` returned is sent, since both answered for the URL the page
|
|
|
462
465
|
left. The loaded page reads the new parms through `contextFor`; see
|
|
463
466
|
[the Express server](./server.md#database-layer).
|
|
464
467
|
|
|
465
|
-
- A `url()` naming no column, or holding a value that is
|
|
468
|
+
- A `url()` naming no column, or holding a value that is neither a string
|
|
469
|
+
nor an array of strings, is
|
|
466
470
|
warned about on the server console and ignored, and the refresh set runs
|
|
467
471
|
as usual.
|
|
468
472
|
- If loading the page fails, the write has still happened. The response
|