@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 CHANGED
@@ -139,13 +139,18 @@ export interface IConfigurationTree {
139
139
  ### Invoice Component
140
140
 
141
141
  ```html
142
- <ava-invoice-display id="invoiceTree"></ava-invoice-display>
142
+ <ava-invoice-display id="your-unique-id"></ava-invoice-display>
143
143
  <script>
144
- const INVOICE = {...};
145
- window['InvoiceGlobalVariable'] = INVOICE;
146
- // The config is optional
147
- const invoiceView = document.getElementById('invoiceTree');
148
- invoiceView.config = {...};
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?: "en" | "de";
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