@formancy/report-builder-angular 0.2.0 → 0.3.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/README.md
CHANGED
|
@@ -59,8 +59,9 @@ builder's suite and report-builder-core's model test.
|
|
|
59
59
|
|
|
60
60
|
Exactly the structure report-builder-core's README sets out under *What a
|
|
61
61
|
builder renders*, which the React builder renders too: a region named
|
|
62
|
-
"Report editor" with a bar above the panes (the title
|
|
63
|
-
|
|
62
|
+
"Report editor" with a bar above the panes (the title, the switch between
|
|
63
|
+
the report's languages where it is written in more than one, and the
|
|
64
|
+
toolbar, with its four pane buttons), the outline pane with the place chooser floating
|
|
64
65
|
over it, the design view -- or the host's view in its place -- the
|
|
65
66
|
properties and the problems sharing the third column, and a bar below with
|
|
66
67
|
the live region. Every name comes from the core's catalogue in English,
|
|
@@ -102,6 +103,45 @@ What is Angular's own:
|
|
|
102
103
|
cleared, and handed to `editor.addImage`. The report's own properties
|
|
103
104
|
list its images, each with its Remove, which puts the keyboard on the
|
|
104
105
|
first field only once the image is gone (`ReportEditorRoot.attempt`).
|
|
106
|
+
- **A report's QR-bill is selected and edited like a component**
|
|
107
|
+
([0039](../../docs/decisions/0039-a-person-selects-a-reports-qr-bill-and-edits-it-field-by-field-in-either-builder.md)): its row stands in the outline after the regions, its band
|
|
108
|
+
on the canvas selects it with a click, and the properties draw its
|
|
109
|
+
fields and its parties as groups, each a `group` named in the editor's
|
|
110
|
+
words with its one button, which keeps the keyboard as its words change.
|
|
111
|
+
A field is `ReportPropertyRow`, drawn by itself or in a group from one
|
|
112
|
+
template, since `NgTemplateOutlet` is not this package's to use. Add
|
|
113
|
+
QR-bill takes its own button away, and the keyboard goes to the bill's
|
|
114
|
+
IBAN, the first field, as it does when a Remove takes its row.
|
|
115
|
+
- **A report's e-invoice is selected and edited the same way**
|
|
116
|
+
([0044](../../docs/decisions/0044-a-person-edits-a-reports-e-invoice-in-either-builder-one-term-a-field-in-groups.md)): its row stands after the bill's, and its properties
|
|
117
|
+
are groups -- the parties, the seller's contact, each VAT category, the
|
|
118
|
+
list's Add, the lines, the payment instructions, an XRechnung's own
|
|
119
|
+
terms -- each with its buttons, one with nowhere to go `aria-disabled`
|
|
120
|
+
and still sent. Where a button's action says where the keyboard goes
|
|
121
|
+
once it is done (`then`), the root puts it there after the render
|
|
122
|
+
(`ReportEditorRoot.attempt`, a `group` focus): a category moved keeps
|
|
123
|
+
it on the same button of the group it went to, one removed hands it to
|
|
124
|
+
the list's Add, and one added to its first field.
|
|
125
|
+
- **A report written in several languages**
|
|
126
|
+
([0063](../../docs/decisions/0063-a-reports-own-words-are-written-in-each-language-it-declares-and-a-render-names-the-one-it-prints-in.md))
|
|
127
|
+
has a switch between them in `<report-builder>`'s bar, a native
|
|
128
|
+
`<select>` beside the title that dispatches `setLanguage`, drawn only
|
|
129
|
+
while the report declares more than one; a language is added from the
|
|
130
|
+
report's own properties, its Languages group's Add language. In another
|
|
131
|
+
language than the report's own, a field at a word writes its
|
|
132
|
+
translation, `ReportPropertyRow` drawing its note under it and
|
|
133
|
+
describing it by it, and a box or a field whose word is missing there
|
|
134
|
+
is marked `data-missing`, the box described as missing by its `title`.
|
|
135
|
+
- **A run of a paragraph is set below or above the line from its group**
|
|
136
|
+
([0061](../../docs/decisions/0061-a-paragraphs-run-may-be-set-below-or-above-the-line-in-any-character-its-face-draws-and-prints-only-beside-a-run-on-the-line.md)): each run is a group with two buttons, Subscript and
|
|
137
|
+
Superscript, each showing its word, named after the run by `aria-label`
|
|
138
|
+
("Part 2: Text, subscript") and `aria-pressed` as the run is set.
|
|
139
|
+
Pressed, one reads the selection of its group's text field and the text
|
|
140
|
+
it is of from the element, the one thing it reads from the DOM to send,
|
|
141
|
+
and adds them to the action; the editor decides what it sets, and
|
|
142
|
+
`ReportEditorRoot.attempt` puts the keyboard where the outcome's `then`
|
|
143
|
+
says, the pressed button of the run that holds the text now. A run bound
|
|
144
|
+
to a value is a select, and is set whole.
|
|
105
145
|
- **Drag and drop is HTML's**, from the palette, from a canvas box or from an
|
|
106
146
|
outline row, onto the sheet (the nearest place, `targetNear`, read inside
|
|
107
147
|
the sheet's border) or onto a row (before or after it, `targetBeside`). A
|
|
@@ -128,8 +168,9 @@ and the parts inside it:
|
|
|
128
168
|
```
|
|
129
169
|
|
|
130
170
|
Each part is an attribute on the element it is, so the DOM has no wrapper
|
|
131
|
-
elements the React builder lacks. The bars, the
|
|
132
|
-
button and the problems' count are
|
|
171
|
+
elements the React builder lacks. The bars, the switch between languages,
|
|
172
|
+
the panes' headers, the Report button and the problems' count are
|
|
173
|
+
`<report-builder>`'s template, not parts;
|
|
133
174
|
a host that arranges the parts itself writes its own, and draws its own
|
|
134
175
|
view where the state's `view` says, in place of `reportCanvas`. The parts inject
|
|
135
176
|
`ReportEditorRoot`, which holds the state as a signal and the editor's words.
|
|
@@ -170,7 +211,9 @@ runs.
|
|
|
170
211
|
- **Every `BUILDER_SCENARIOS` scenario**, in English, Swiss German and Swiss
|
|
171
212
|
French. Each step finds elements by role and accessible name only, but an
|
|
172
213
|
`upload`, which finds the hidden file input beside Add image… in the DOM,
|
|
173
|
-
since it has no role
|
|
214
|
+
since it has no role, and a `selectText`, which selects characters with
|
|
215
|
+
the field's own `setSelectionRange`, as this runner's keys move no caret
|
|
216
|
+
(0061); and each scenario ends with axe over the whole page at WCAG 2.2 AA, as formancy.ai's
|
|
174
217
|
conformance suite audits. A scenario left out, or a kind of step never
|
|
175
218
|
taken, fails the file.
|
|
176
219
|
- **The accessible tree:** every element a person operates or reads is
|
|
@@ -181,7 +224,8 @@ runs.
|
|
|
181
224
|
the statuses and the place chooser are named in the editor's words, never
|
|
182
225
|
after text on the page, which Chromium would read in the stylesheet's
|
|
183
226
|
capitals; jsdom applies no stylesheet, so that test reads from the DOM
|
|
184
|
-
how each name is given
|
|
227
|
+
how each name is given, and a run's buttons' word beside their name and
|
|
228
|
+
their pressed state (0061). The Studio compares this tree with the React
|
|
185
229
|
builder's, in jsdom and in Chromium.
|
|
186
230
|
- **The builder's life:** destroyed and made again, given another editor, and
|
|
187
231
|
plan 21's switch over one session.
|
|
@@ -246,7 +290,8 @@ a host's own page is its own to measure.
|
|
|
246
290
|
- **Text that is not a number never reaches the editor from a number field.**
|
|
247
291
|
A browser empties an `<input type="number">` holding "tall" before any
|
|
248
292
|
change event fires, so the field says "This cannot be empty." rather than
|
|
249
|
-
"Enter a number."
|
|
293
|
+
"Enter a number.", and an optional one is emptied: the rows a group
|
|
294
|
+
header is kept with, emptied, are 1 again, the member's absence (0059).
|
|
250
295
|
- **Most touch browsers fire no HTML drag and drop.** There, as everywhere,
|
|
251
296
|
the place chooser is the path to every place.
|
|
252
297
|
- **No measured cost.** Rendering a long report's outline and design view has
|