@dangl/web-components-ava 1.2.3-beta0010 → 1.3.0-beta0032
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 +15 -7
- package/invoice.js +1 -1
- package/package.json +1 -1
- package/tree.js +1 -1
package/README.md
CHANGED
|
@@ -139,13 +139,18 @@ export interface IConfigurationTree {
|
|
|
139
139
|
### Invoice Component
|
|
140
140
|
|
|
141
141
|
```html
|
|
142
|
-
<ava-invoice-display id="
|
|
142
|
+
<ava-invoice-display id="your-unique-id"></ava-invoice-display>
|
|
143
143
|
<script>
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
//
|
|
147
|
-
|
|
148
|
-
|
|
144
|
+
const invoiceData = {...}
|
|
145
|
+
const invoice = document.getElementById('your-unique-id');
|
|
146
|
+
// You can also directly set a JSONified invoice object as your attribute value in the html markup
|
|
147
|
+
invoice.setAttribute('invoice', JSON.stringify(invoiceData));
|
|
148
|
+
invoice.setAttribute(
|
|
149
|
+
'config',
|
|
150
|
+
JSON.stringify({
|
|
151
|
+
language: 'de',
|
|
152
|
+
}),
|
|
153
|
+
);
|
|
149
154
|
</script>
|
|
150
155
|
```
|
|
151
156
|
|
|
@@ -160,7 +165,10 @@ export interface IConfigurationInvoice {
|
|
|
160
165
|
pdfViewEnabled?: boolean;
|
|
161
166
|
|
|
162
167
|
//** If specified, the invoice viewer will use the given language for the text in the UI. */
|
|
163
|
-
language?:
|
|
168
|
+
language?: LanguageType; // type LanguageType = 'en' | 'de';
|
|
169
|
+
|
|
170
|
+
//** This controls how many digits are displayed for quantities. It defaults to '1.3-3', meaning it will always show three decimal palces. */
|
|
171
|
+
quantityDecimalPlaces?: string;
|
|
164
172
|
}
|
|
165
173
|
```
|
|
166
174
|
|