@design.estate/dees-document 1.0.103 → 1.1.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/npmextra.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "githost": "code.foss.global",
6
6
  "gitscope": "designestate/private",
7
7
  "gitrepo": "dedocument-catalog",
8
- "description": "A comprehensive solution for generating documents like invoices, integrating elements, templates, and services to streamline document creation.",
8
+ "description": "A versatile tool for dynamically generating and rendering business documents, such as invoices, using modern web technologies and elements.",
9
9
  "npmPackagename": "@designestate_private/dedocument-catalog",
10
10
  "license": "MIT",
11
11
  "projectDomain": "design.estate",
@@ -14,19 +14,20 @@
14
14
  "document generation",
15
15
  "invoices",
16
16
  "PDF creation",
17
- "typescript",
17
+ "TypeScript",
18
18
  "web components",
19
- "custom elements",
20
- "QR code",
21
- "smart contracts",
22
19
  "templating",
23
20
  "dynamic rendering",
24
21
  "responsive design",
25
- "modular development",
26
- "lightweight",
27
- "efficient",
28
- "finance",
29
- "business"
22
+ "business documentation",
23
+ "automated workflows",
24
+ "modular architecture",
25
+ "smart contracts",
26
+ "javascript",
27
+ "QR code",
28
+ "custom elements",
29
+ "nodejs",
30
+ "data-driven"
30
31
  ]
31
32
  }
32
33
  },
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@design.estate/dees-document",
3
- "version": "1.0.103",
3
+ "version": "1.1.0",
4
4
  "private": false,
5
- "description": "A comprehensive solution for generating documents like invoices, integrating elements, templates, and services to streamline document creation.",
5
+ "description": "A versatile tool for dynamically generating and rendering business documents, such as invoices, using modern web technologies and elements.",
6
6
  "main": "dist_ts_web/index.js",
7
7
  "typings": "dist_ts_web/index.d.ts",
8
8
  "exports": {
@@ -19,7 +19,7 @@
19
19
  "@push.rocks/smartfile": "^11.0.21",
20
20
  "@push.rocks/smartjson": "^5.0.20",
21
21
  "@push.rocks/smartpath": "^5.0.18",
22
- "@push.rocks/smartpdf": "^3.1.7",
22
+ "@push.rocks/smartpdf": "^3.1.8",
23
23
  "@push.rocks/smarttime": "^4.0.8",
24
24
  "@tsclass/tsclass": "^4.1.2",
25
25
  "@types/qrcode": "^1.5.5",
@@ -61,19 +61,20 @@
61
61
  "document generation",
62
62
  "invoices",
63
63
  "PDF creation",
64
- "typescript",
64
+ "TypeScript",
65
65
  "web components",
66
- "custom elements",
67
- "QR code",
68
- "smart contracts",
69
66
  "templating",
70
67
  "dynamic rendering",
71
68
  "responsive design",
72
- "modular development",
73
- "lightweight",
74
- "efficient",
75
- "finance",
76
- "business"
69
+ "business documentation",
70
+ "automated workflows",
71
+ "modular architecture",
72
+ "smart contracts",
73
+ "javascript",
74
+ "QR code",
75
+ "custom elements",
76
+ "nodejs",
77
+ "data-driven"
77
78
  ],
78
79
  "scripts": {
79
80
  "test": "npm run build && tstest test/",
package/readme.md CHANGED
@@ -1,26 +1,31 @@
1
1
  # @design.estate/dees-document
2
- a catalog for creating documents like invoices
2
+
3
+ A comprehensive solution for generating documents like invoices, integrating elements, templates, and services to streamline document creation.
3
4
 
4
5
  ## Install
5
- To install `@design.estate/dees-document`, run the following command in your project directory:
6
+
7
+ To add `@design.estate/dees-document` to your project, run the following command in your terminal:
8
+
6
9
  ```shell
7
10
  npm install @design.estate/dees-document --save
8
11
  ```
9
12
 
10
- This will add `@design.estate/dees-document` to your project's dependencies and ensure it's installed into your `node_modules` folder.
13
+ This will install the package and add it to your project's dependencies, ensuring all required modules are available in your `node_modules` directory.
11
14
 
12
15
  ## Usage
13
- The `@design.estate/dees-document` package is a comprehensive toolkit for creating various types of documents, such as invoices, with ease. It leverages modern ECMAScript (ES) modules and TypeScript for a type-safe, developer-friendly experience. Below, you'll find detailed examples covering how to utilize the package to its full potential.
14
16
 
15
- ### Setting Up the Document Service
16
- Before diving into creating documents, you first need to set up the document service. This involves importing the necessary modules and initializing the service instance.
17
+ The `@design.estate/dees-document` package provides a robust framework for creating documents including invoices, contracts, and various other business-related documents. It is built on modern web technologies including TypeScript and ES modules to ensure a type-safe and easy-to-integrate experience. Below, we will guide you through the comprehensive usage of this package, from setting up your environment to generating PDF documents.
18
+
19
+ ### Getting Started
20
+
21
+ Before creating documents, initialize the document service which is central to this package. This is typically done at the beginning of your application.
17
22
 
18
23
  ```typescript
19
24
  import { PdfService, IPdfServiceConstructorOptions } from '@design.estate/dees-document';
20
25
 
21
26
  async function setupPdfService() {
22
27
  const options: IPdfServiceConstructorOptions = {
23
- // Configuration options here
28
+ // Add necessary configuration here
24
29
  };
25
30
 
26
31
  const pdfService = await PdfService.createAndStart(options);
@@ -29,100 +34,136 @@ async function setupPdfService() {
29
34
  }
30
35
  ```
31
36
 
32
- In the example above, we import `PdfService` from the package and use its `createAndStart` method to initialize it with optional configuration settings. Replace `// Configuration options here` with any specific options your project may require.
37
+ This script initializes `PdfService`. Modify the options to tailor the service to your needs.
38
+
39
+ ### Creating Documents
40
+
41
+ With the PDF service ready, you can proceed to generate documents. The following section provides a detailed example of creating an invoice. This example is applicable to various document types with necessary adjustments.
42
+
43
+ #### Step-by-Step: Create an Invoice
44
+
45
+ 1. **Define the Data Structure**: Describe the invoice details. This includes sender and recipient information, the items being invoiced, and more.
46
+
47
+ ```typescript
48
+ import { ILetter } from '@design.estate/dees-document';
49
+
50
+ const invoiceData: ILetter = {
51
+ from: {
52
+ name: "Your Company Name",
53
+ address: {
54
+ streetName: "Your Street",
55
+ houseNumber: "123",
56
+ city: "Your City",
57
+ country: "Your Country",
58
+ postalCode: "12345",
59
+ },
60
+ email: "your-email@example.com",
61
+ phone: "123-456-7890",
62
+ },
63
+ to: {
64
+ name: "Recipient Company Name",
65
+ address: {
66
+ streetName: "Recipient Street",
67
+ houseNumber: "456",
68
+ city: "Recipient City",
69
+ country: "Recipient Country",
70
+ postalCode: "67890",
71
+ },
72
+ email: "recipient-email@example.com",
73
+ phone: "098-765-4321",
74
+ },
75
+ content: {
76
+ invoiceData: {
77
+ items: [
78
+ {
79
+ name: "Service or Product Name",
80
+ unitQuantity: 2,
81
+ unitNetPrice: 100.00,
82
+ unitType: 'service',
83
+ vatPercentage: 19,
84
+ currency: 'EUR',
85
+ }
86
+ ]
87
+ }
88
+ },
89
+ subject: "Invoice for Services Rendered",
90
+ date: new Date().getTime(),
91
+ versionInfo: {
92
+ type: "final",
93
+ version: "1.0.0"
94
+ },
95
+ };
96
+ ```
33
97
 
34
- ### Creating a Simple Invoice
35
- After setting up the document service, you can proceed to create documents such as invoices. Here, we'll demonstrate how to create a basic invoice.
98
+ Here, `ILetter` interface details all components of an invoice including sender (`from`) and recipient (`to`) information, as well as the invoiced items.
36
99
 
37
- #### Define the Invoice Data Structure
38
- First, define the basic structure of your invoice. This involves specifying details like the sender, recipient, items, and more.
100
+ 2. **Generate the PDF**: Transform the invoice details into a PDF.
39
101
 
40
- ```typescript
41
- import { ILetter } from '@design.estate/dees-document';
42
-
43
- const invoiceData: ILetter = {
44
- from: {
45
- name: "Your Company Name",
46
- address: {
47
- streetName: "Your Street",
48
- houseNumber: "123",
49
- city: "Your City",
50
- country: "Your Country",
51
- postalCode: "12345",
52
- },
53
- email: "your-email@example.com",
54
- phone: "123-456-7890",
55
- },
56
- to: {
57
- name: "Recipient Company Name",
58
- address: {
59
- streetName: "Recipient Street",
60
- houseNumber: "456",
61
- city: "Recipient City",
62
- country: "Recipient Country",
63
- postalCode: "67890",
64
- },
65
- email: "recipient-email@example.com",
66
- phone: "098-765-4321",
67
- },
68
- content: {
69
- invoiceData: {
70
- items: [
71
- {
72
- name: "Service or Product Name",
73
- unitQuantity: 2,
74
- unitNetPrice: 100.00,
75
- unitType: 'service',
76
- vatPercentage: 19,
77
- currency: 'EUR',
78
- }
79
- ]
80
- }
81
- },
82
- subject: "Invoice for Services Rendered",
83
- date: new Date().getTime(),
84
- versionInfo: {
85
- type: "final",
86
- version: "1.0.0"
87
- },
88
- };
89
- ```
102
+ ```typescript
103
+ async function generateInvoice(pdfService: PdfService, invoiceData: ILetter) {
104
+ const pdfBuffer = await pdfService.createPdfFromLetterObject(invoiceData);
105
+ console.log('Invoice PDF generated successfully.');
90
106
 
91
- In this structure, `invoiceData` outlines essential details for an invoice document, using the `ILetter` interface. It includes information about both the sender (`from`) and the recipient (`to`), as well as the invoiced items under `content.invoiceData.items`.
107
+ // Save the PDF, send it via email, etc.
108
+ }
109
+ ```
92
110
 
93
- #### Generate the Invoice PDF
94
- With the invoice data ready, you can now generate the PDF using the `PdfService` instance.
111
+ The function `createPdfFromLetterObject` returns a `Buffer` containing the generated PDF. From here, you can save this PDF to a file, send it to clients, or archive it.
95
112
 
96
- ```typescript
97
- async function generateInvoice(pdfService: PdfService, invoiceData: ILetter) {
98
- const pdfBuffer = await pdfService.createPdfFromLetterObject(invoiceData);
99
- console.log('Invoice PDF generated successfully.');
113
+ 3. **Integrate It All**: Here's how everything ties together into a complete script for generating an invoice:
100
114
 
101
- // Here, you can save the PDF to a file, send it over a network, etc.
102
- }
103
- ```
115
+ ```typescript
116
+ async function main() {
117
+ const pdfService = await setupPdfService();
118
+ await generateInvoice(pdfService, invoiceData);
119
+ }
104
120
 
105
- The method `createPdfFromLetterObject` receives the invoice data and returns a `Buffer` containing the PDF. You can then save this PDF to the filesystem, send it over email, or perform any other required actions.
121
+ main().then(() => console.log('Invoice generation process completed.'));
122
+ ```
106
123
 
107
- #### Complete Example Integration
108
- Combining everything, your complete script to set up the service, define invoice data, and generate a PDF invoice might look something like this:
124
+ This script initiates the PDF service and generates the invoice PDF with the provided information.
109
125
 
110
- ```typescript
111
- async function main() {
112
- const pdfService = await setupPdfService();
113
- await generateInvoice(pdfService, invoiceData);
114
- }
126
+ ### Advanced Document Features
115
127
 
116
- main().then(() => console.log('Invoice generation process completed.'));
117
- ```
128
+ The package is designed to create not only invoices but a wide range of document types. Leverage its modular architecture to build and customize documents to fit specific needs.
129
+
130
+ #### Advanced Scenarios
131
+
132
+ 1. **Custom Styling**: Customize the appearance of elements within your documents, such as headers, footers, and more.
133
+
134
+ ```typescript
135
+ import { DeDocumentViewer } from '@design.estate/dees-element';
118
136
 
119
- ### Beyond Invoices
120
- The `@design.estate/dees-document` package is not limited to invoices alone. It's designed to handle a wide range of document types. The modular architecture allows for the customizable construction of documents, enabling you to tailor the output to meet precise requirements.
137
+ const customStyledViewer = new DeDocumentViewer();
138
+ customStyledViewer.style.setProperty('--main-bg-color', 'lightblue');
139
+ document.body.appendChild(customStyledViewer);
140
+ ```
141
+
142
+ Customize via CSS or dynamically through TypeScript where necessary.
143
+
144
+ 2. **Interactive Document Elements**: Incorporate UI components like buttons, input fields, or visualizations tailored for your document needs.
145
+
146
+ 3. **Multi-page Document Generation**: Handle overflow of content and automatic page generation while maintaining headers and footers.
147
+
148
+ ```typescript
149
+ pdfService.adjustDePageScaling();
150
+ ```
151
+
152
+ Toggle between print and digital formats and handle scaling.
153
+
154
+ 4. **Embedding Images and Logos**: Add company logos, graphics, or auxiliary content to enhance document presentation.
155
+
156
+ ### Additional Capabilities
157
+
158
+ Beyond these examples, delve deeper into advanced functionalities such as:
159
+
160
+ - **Document Management**: Manage multiple document templates, manage versions, and add annotations or notes.
161
+ - **Dynamic Rendering**: Use templating for dynamic content rendering based on variable inputs.
162
+ - **Responsive Design for Digital Documents**: Ensure documents are displayed correctly across devices.
121
163
 
122
- For instance, you can create contracts, reports, and other document types using a similar approach—by defining the content structure and utilizing the PDF service to generate the document. The package's flexibility and extensibility make it an invaluable tool in any document generation workflow.
164
+ ### Concluding Remarks
123
165
 
124
- ### Advanced Usage
125
- For more advanced scenarios, such as custom styling, embedding images, and handling more complex document structures, refer to the package's documentation. It provides comprehensive details and examples to help you fully leverage the capabilities of `@design.estate/dees-document`.
166
+ The `@design.estate/dees-document` package is an essential tool in the modern document generation ecosystem. Its expansive capabilities, from basic invoices to complex document templates, make it a versatile solution for businesses of all scales. Implementing this service broadly simplifies document management workflows and enhances document presentation precision and quality. For further depth, consult the package's documentation or explore the examples included in the module.
126
167
 
127
168
  ## License and Legal Information
128
169
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-document',
6
- version: '1.0.103',
7
- description: 'A comprehensive solution for generating documents like invoices, integrating elements, templates, and services to streamline document creation.'
6
+ version: '1.1.0',
7
+ description: 'A versatile tool for dynamically generating and rendering business documents, such as invoices, using modern web technologies and elements.'
8
8
  }
@@ -1,6 +1,7 @@
1
1
  import * as plugins from './plugins.js';
2
2
  import * as paths from './paths.js';
3
3
  import * as helpers from './helpers.js';
4
+ import * as interfaces from '../ts/interfaces/index.js';
4
5
 
5
6
  export interface IPdfServiceConstructorOptions {
6
7
 
@@ -44,12 +45,15 @@ export class PdfService {
44
45
  /**
45
46
  * creates an letter
46
47
  */
47
- public async createPdfFromLetterObject(letterDataArg: plugins.tsclass.business.ILetter) {
48
+ public async createPdfFromLetterObject(optionsArg: {
49
+ letterData: plugins.tsclass.business.ILetter,
50
+ documentSettings: interfaces.IDocumentSettings
51
+ }) {
48
52
  const html = `
49
53
  <script type="module">
50
54
  ${await helpers.getBundleAsString()}
51
55
  </script>
52
- <dedocument-dedocument printMode letterData="${plugins.smartjson.stringifyBase64(letterDataArg)}"></dedocument-dedocument>
56
+ <dedocument-dedocument printMode documentSettings="${plugins.smartjson.stringifyBase64(optionsArg.documentSettings)}" letterData="${plugins.smartjson.stringifyBase64(optionsArg.letterData)}"></dedocument-dedocument>
53
57
  `;
54
58
  // console.log(html);
55
59
  const pdfResult = await this.smartpdfInstance.getA4PdfResultForHtmlString(html);
@@ -0,0 +1,5 @@
1
+ export interface IDocumentSettings {
2
+ enableTopDraftText?: boolean;
3
+ enableDefaultHeader?: boolean;
4
+ enableDefaultFooter?: boolean;
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from './document.js';
2
+ export * from './translation.js';
@@ -0,0 +1,4 @@
1
+ export interface IDeDocumentTranslations {
2
+ "invoice": string;
3
+ "quantity": string;
4
+ }
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-document',
6
- version: '1.0.103',
7
- description: 'A comprehensive solution for generating documents like invoices, integrating elements, templates, and services to streamline document creation.'
6
+ version: '1.1.0',
7
+ description: 'A versatile tool for dynamically generating and rendering business documents, such as invoices, using modern web technologies and elements.'
8
8
  }
@@ -12,14 +12,13 @@ import {
12
12
  cssManager,
13
13
  unsafeCSS,
14
14
  render,
15
+ domtools,
15
16
  } from '@design.estate/dees-element';
16
- import * as domtools from '@design.estate/dees-domtools';
17
-
18
17
  import * as plugins from '../plugins.js';
19
-
20
18
  import * as shared from './shared/index.js';
21
19
 
22
20
 
21
+
23
22
  declare global {
24
23
  interface HTMLElementTagNameMap {
25
24
  'dedocument-contentinvoice': DeContentInvoice;
@@ -277,8 +276,8 @@ export class DeContentInvoice extends DeesElement {
277
276
  <div>We hereby invoice products and services provided to you by Lossless GmbH:</div>
278
277
  <div class="grid topLine dataHeader">
279
278
  <div class="lineItem">Item Pos.</div>
280
- <div class="lineItem">Description</div>
281
- <div class="lineItem">Quantity</div>
279
+ <div class="lineItem">${shared.translation.translate('DE', 'description', 'Description')}</div>
280
+ <div class="lineItem">${shared.translation.translate('DE', 'quantity', 'Quantity')}</div>
282
281
  <div class="lineItem">Unit Type</div>
283
282
  <div class="lineItem">Unit Net Price</div>
284
283
  <div class="lineItem">Total Net Price</div>
@@ -11,8 +11,15 @@ import {
11
11
  domtools,
12
12
  } from '@design.estate/dees-element';
13
13
 
14
+ import * as interfaces from '../../ts/interfaces/index.js';
14
15
  import * as plugins from '../plugins.js';
15
16
 
17
+ export const defaultDocumentSettings: interfaces.IDocumentSettings = {
18
+ enableTopDraftText: true,
19
+ enableDefaultHeader: true,
20
+ enableDefaultFooter: true,
21
+ };
22
+
16
23
 
17
24
  import { DePage } from './page.js';
18
25
  import { DeContentInvoice } from './contentinvoice.js';
@@ -68,9 +75,17 @@ export class DeDocument extends DeesElement {
68
75
  public letterData: plugins.tsclass.business.ILetter;
69
76
 
70
77
  @property({
71
- type: String,
78
+ type: Object,
79
+ reflect: true,
80
+ converter: (valueArg) => {
81
+ if (typeof valueArg === 'string') {
82
+ return plugins.smartjson.parseBase64(valueArg)
83
+ } else {
84
+ return valueArg;
85
+ }
86
+ },
72
87
  })
73
- public letterDataUrl: string;
88
+ public documentSettings: interfaces.IDocumentSettings = defaultDocumentSettings;
74
89
 
75
90
  constructor() {
76
91
  super();
@@ -112,11 +127,6 @@ export class DeDocument extends DeesElement {
112
127
  this.registerGarbageFunction(() => {
113
128
  resizeObserver.disconnect();
114
129
  })
115
-
116
- if (this.letterDataUrl) {
117
- const response = await fetch(this.letterDataUrl);
118
- this.letterData = await response.json();
119
- }
120
130
  }
121
131
 
122
132
  public latestRenderedLetterData: plugins.tsclass.business.ILetter = null;
@@ -8,8 +8,12 @@ import {
8
8
  css,
9
9
  cssManager,
10
10
  unsafeCSS,
11
+ domtools,
11
12
  } from '@design.estate/dees-element';
12
- import * as domtools from '@design.estate/dees-domtools';
13
+
14
+ import * as interfaces from '../../ts/interfaces/index.js';
15
+
16
+ import { defaultDocumentSettings } from './document.js';
13
17
 
14
18
  import * as shared from './shared/index.js';
15
19
 
@@ -23,10 +27,14 @@ declare global {
23
27
  export class DePage extends DeesElement {
24
28
  public static demo = () => html` <dedocument-page .format="${'a4'}"></dedocument-page> `;
25
29
 
26
- @property()
30
+ @property({
31
+ type: Number,
32
+ })
27
33
  viewWidth: number = null;
28
34
 
29
- @property()
35
+ @property({
36
+ type: Number,
37
+ })
30
38
  viewHeight: number = null;
31
39
 
32
40
  @property({
@@ -55,6 +63,12 @@ export class DePage extends DeesElement {
55
63
  })
56
64
  printMode = false;
57
65
 
66
+ @property({
67
+ type: Object,
68
+ reflect: true,
69
+ })
70
+ public documentSettings: interfaces.IDocumentSettings = defaultDocumentSettings;
71
+
58
72
  constructor() {
59
73
  super();
60
74
  domtools.DomTools.setupDomTools();
@@ -109,11 +123,15 @@ export class DePage extends DeesElement {
109
123
  <dedocument-pagecontainer .printMode=${this.printMode}>
110
124
  ${this.letterData
111
125
  ? html`
112
- <dedocument-pageheader
113
- .letterData=${this.letterData}
114
- .pageNumber="${this.pageNumber}"
115
- .pageTotalNumber="${this.pageTotalNumber}"
116
- ></dedocument-pageheader>
126
+ ${this.documentSettings.enableDefaultHeader
127
+ ? html`
128
+ <dedocument-pageheader
129
+ .letterData=${this.letterData}
130
+ .pageNumber="${this.pageNumber}"
131
+ .pageTotalNumber="${this.pageTotalNumber}"
132
+ ></dedocument-pageheader>
133
+ `
134
+ : ``}
117
135
  ${this.pageNumber === 1
118
136
  ? html`
119
137
  <dedocument-letterheader
@@ -129,26 +147,33 @@ export class DePage extends DeesElement {
129
147
  .letterData=${this.letterData}
130
148
  ><slot></slot
131
149
  ></dedocument-pagecontent>
132
- <dedocument-pagefooter
133
- .letterData=${this.letterData}
134
- .pageNumber="${this.pageNumber}"
135
- .pageTotalNumber="${this.pageTotalNumber}"
136
- ></dedocument-pagefooter>
150
+ ${this.documentSettings.enableDefaultFooter
151
+ ? html`
152
+ <dedocument-pagefooter
153
+ .letterData=${this.letterData}
154
+ .pageNumber="${this.pageNumber}"
155
+ .pageTotalNumber="${this.pageTotalNumber}"
156
+ ></dedocument-pagefooter>
157
+ `
158
+ : ``}
137
159
  <div class="versionOverlay">
138
160
  ${this.letterData.versionInfo.type === 'draft'
139
161
  ? html`
140
- <div class="topInfo">
141
- Please note: THIS IS A DRAFT ONLY. NO RIGHTS CAN BE DERIVED FROM THIS.<br />
142
- -> Revision/Document version: ${this.letterData.versionInfo.version}
143
- </div>
162
+ ${this.documentSettings.enableTopDraftText
163
+ ? html`
164
+ <div class="topInfo">
165
+ Please note: THIS IS A DRAFT ONLY. NO RIGHTS CAN BE DERIVED FROM
166
+ THIS.<br />
167
+ -> Revision/Document version: ${this.letterData.versionInfo.version}
168
+ </div>
169
+ `
170
+ : ``}
144
171
  <div class="bigDraftText">DRAFT</div>
145
172
  `
146
173
  : html``}
147
174
  </div>
148
175
  `
149
- : html`
150
- <slot></slot>
151
- `}
176
+ : html` <slot></slot> `}
152
177
  </dedocument-pagecontainer>
153
178
  </div>
154
179
  `;
@@ -74,13 +74,17 @@ export class DePageHeader extends DeesElement {
74
74
  color: #333;
75
75
  font-size: 10px;
76
76
  }
77
- .topstripe img {
78
- filter: invert(1);
77
+ .topstripe .logo {
79
78
  position: absolute;
80
79
  bottom: 10px;
81
80
  height: 25px;
82
81
  left: auto;
83
82
  right: ${unsafeCSS(shared.rightMargin + 'px')};
83
+ font-family: 'Courier New', Courier, monospace;
84
+ }
85
+ .topstripe .logo img {
86
+ position: relative;
87
+ height: 25px;
84
88
  }
85
89
  `,
86
90
  ];
@@ -88,7 +92,9 @@ export class DePageHeader extends DeesElement {
88
92
  public render(): TemplateResult {
89
93
  return html`
90
94
  <div class="topstripe">
91
- <img src="https://assetbroker.lossless.one/brandfiles/lossless/svg-minimal-bright.svg" />
95
+ <div class="logo">
96
+ No logo set!
97
+ </div>
92
98
  </div>
93
99
  <div class="topstripe2">${this.letterData?.from?.description || '[no letterData.from.description set]'}</div>
94
100
  `;
@@ -3,4 +3,7 @@ export const a4Width = 794;
3
3
  export const rightMargin = 70;
4
4
  export const leftMargin = 90;
5
5
 
6
+ import * as translation from './translation.js';
7
+ export { translation };
8
+
6
9
  export * from './demoletter.js';