fix(core): fix scaling greater than 1x, fix automatic document updates
This commit is contained in:
parent
efac2187f2
commit
ecc8396f4f
14
changelog.md
Normal file
14
changelog.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## 2024-11-27 - 1.0.100 - fix(core)
|
||||
Fix issues with PDF service, invoice item positioning, and update package dependencies.
|
||||
|
||||
- Updated package dependencies to latest versions for improved stability and performance.
|
||||
- Fixed invoice item positioning in demo data.
|
||||
- Ensured PDF service handles rendering updates more efficiently.
|
||||
|
||||
## 2024-04-20 to 2023-10-16 - 1.0.99 to 1.0.90 - Core Fixes and Documentation Update
|
||||
Routine updates and fixes with a focus on core improvements and documentation enhancements.
|
||||
|
||||
- Regular core updates to enhance stability and performance
|
||||
- Updated project documentation for better clarity and user guidance
|
32
package.json
32
package.json
@ -18,26 +18,26 @@
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@design.estate/dees-domtools": "^2.0.55",
|
||||
"@design.estate/dees-element": "^2.0.33",
|
||||
"@design.estate/dees-wcctools": "^1.0.85",
|
||||
"@git.zone/tsrun": "^1.2.46",
|
||||
"@push.rocks/smartfile": "^11.0.4",
|
||||
"@push.rocks/smartjson": "^5.0.10",
|
||||
"@push.rocks/smartpath": "^5.0.11",
|
||||
"@push.rocks/smartpdf": "^3.0.16",
|
||||
"@push.rocks/smarttime": "^4.0.6",
|
||||
"@tsclass/tsclass": "^4.0.46",
|
||||
"@design.estate/dees-domtools": "^2.0.65",
|
||||
"@design.estate/dees-element": "^2.0.39",
|
||||
"@design.estate/dees-wcctools": "^1.0.90",
|
||||
"@git.zone/tsrun": "^1.3.3",
|
||||
"@push.rocks/smartfile": "^11.0.21",
|
||||
"@push.rocks/smartjson": "^5.0.20",
|
||||
"@push.rocks/smartpath": "^5.0.18",
|
||||
"@push.rocks/smartpdf": "^3.1.7",
|
||||
"@push.rocks/smarttime": "^4.0.8",
|
||||
"@tsclass/tsclass": "^4.1.2",
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"qrcode": "^1.5.3"
|
||||
"qrcode": "^1.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^2.1.72",
|
||||
"@git.zone/tsbundle": "^2.0.15",
|
||||
"@git.zone/tstest": "^1.0.84",
|
||||
"@git.zone/tswatch": "^2.0.21",
|
||||
"@git.zone/tsbuild": "^2.2.0",
|
||||
"@git.zone/tsbundle": "^2.1.0",
|
||||
"@git.zone/tstest": "^1.0.90",
|
||||
"@git.zone/tswatch": "^2.0.25",
|
||||
"@push.rocks/projectinfo": "^5.0.2",
|
||||
"@push.rocks/tapbundle": "^5.0.15"
|
||||
"@push.rocks/tapbundle": "^5.5.3"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
11628
pnpm-lock.yaml
generated
11628
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -43,7 +43,7 @@ const testLetterData: plugins.tsclass.business.ILetter = {
|
||||
unitNetPrice: 1200,
|
||||
unitType: 'item',
|
||||
vatPercentage: 0,
|
||||
currency: 'EUR',
|
||||
position: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-document',
|
||||
version: '1.0.99',
|
||||
description: 'a catalog for creating documents like invoices'
|
||||
version: '1.0.100',
|
||||
description: 'A comprehensive solution for generating documents like invoices, integrating elements, templates, and services to streamline document creation.'
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-document',
|
||||
version: '1.0.99',
|
||||
description: 'a catalog for creating documents like invoices'
|
||||
version: '1.0.100',
|
||||
description: 'A comprehensive solution for generating documents like invoices, integrating elements, templates, and services to streamline document creation.'
|
||||
}
|
||||
|
@ -32,21 +32,25 @@ export class DeDocument extends DeesElement {
|
||||
|
||||
@property({
|
||||
type: String,
|
||||
reflect: true,
|
||||
})
|
||||
public format: 'a4' = 'a4';
|
||||
|
||||
@property({
|
||||
type: Number,
|
||||
reflect: true,
|
||||
})
|
||||
public viewWidth: number = null;
|
||||
|
||||
@property({
|
||||
type: Number,
|
||||
reflect: true,
|
||||
})
|
||||
public viewHeight: number = null;
|
||||
|
||||
@property({
|
||||
type: Boolean,
|
||||
reflect: true,
|
||||
})
|
||||
printMode = false;
|
||||
|
||||
@ -60,7 +64,6 @@ export class DeDocument extends DeesElement {
|
||||
return valueArg;
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
public letterData: plugins.tsclass.business.ILetter;
|
||||
|
||||
@ -117,6 +120,7 @@ export class DeDocument extends DeesElement {
|
||||
this.renderDocument();
|
||||
}
|
||||
|
||||
public latestRenderedLetterData: plugins.tsclass.business.ILetter = null;
|
||||
public async renderDocument() {
|
||||
const domtools = await this.domtoolsPromise;
|
||||
const documentContainer = this.shadowRoot.querySelector('.documentContainer');
|
||||
@ -172,10 +176,16 @@ export class DeDocument extends DeesElement {
|
||||
page.pageTotalNumber = pageCounter;
|
||||
}
|
||||
this.adjustDePageScaling();
|
||||
this.latestRenderedLetterData = this.letterData;
|
||||
}
|
||||
|
||||
updated(changedProperties: Map<string | number | symbol, unknown>): void {
|
||||
async updated(changedProperties: Map<string | number | symbol, unknown>): void {
|
||||
super.updated(changedProperties);
|
||||
const domtools = await this.domtoolsPromise;
|
||||
const renderedDocIsUpToDate = domtools.convenience.smartjson.deepEqualObjects(this.letterData, this.latestRenderedLetterData);
|
||||
if (!renderedDocIsUpToDate) {
|
||||
this.renderDocument();
|
||||
}
|
||||
|
||||
if (changedProperties.has('viewHeight') || changedProperties.has('viewWidth')) {
|
||||
this.adjustDePageScaling();
|
||||
|
@ -65,8 +65,6 @@ export class DePage extends DeesElement {
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
max-height: ${shared.a4Height}px;
|
||||
max-width: ${shared.a4Width}px;
|
||||
}
|
||||
|
||||
#scaleWrapper {
|
||||
|
@ -69,6 +69,45 @@ export const demoLetter: tsclass.business.ILetter = {
|
||||
vatPercentage: 19,
|
||||
currency: 'EUR',
|
||||
},
|
||||
{
|
||||
name: 'Item with 7% VAT',
|
||||
unitQuantity: 1,
|
||||
unitNetPrice: 100,
|
||||
unitType: 'hours',
|
||||
vatPercentage: 7,
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
name: 'Item with 7% VAT',
|
||||
unitQuantity: 1,
|
||||
unitNetPrice: 230,
|
||||
unitType: 'hours',
|
||||
vatPercentage: 7,
|
||||
position: 2,
|
||||
},
|
||||
{
|
||||
name: 'Item with 21% VAT',
|
||||
unitQuantity: 1,
|
||||
unitNetPrice: 230,
|
||||
unitType: 'hours',
|
||||
vatPercentage: 21,
|
||||
position: 3,
|
||||
},
|
||||
{
|
||||
name: 'Item with 0% VAT',
|
||||
unitQuantity: 1,
|
||||
unitNetPrice: 230,
|
||||
unitType: 'hours',
|
||||
vatPercentage: 0,
|
||||
position: 4,
|
||||
},{
|
||||
name: 'Item with 19% VAT',
|
||||
unitQuantity: 1,
|
||||
unitNetPrice: 100,
|
||||
unitType: 'hours',
|
||||
vatPercentage: 19,
|
||||
position: 5,
|
||||
},
|
||||
{
|
||||
name: 'Item with 7% VAT',
|
||||
unitQuantity: 1,
|
||||
|
Loading…
Reference in New Issue
Block a user