@things-factory/pdf 7.0.49 → 7.0.56
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/client/pages/pdf-release/pdf-release-importer.ts +8 -11
- package/client/pages/pdf-template/pdf-template-importer.ts +5 -4
- package/dist-client/pages/pdf-release/pdf-release-importer.d.ts +1 -1
- package/dist-client/pages/pdf-release/pdf-release-importer.js +5 -4
- package/dist-client/pages/pdf-release/pdf-release-importer.js.map +1 -1
- package/dist-client/pages/pdf-release/pdf-release-list-page.d.ts +1 -1
- package/dist-client/pages/pdf-template/pdf-template-importer.d.ts +1 -1
- package/dist-client/pages/pdf-template/pdf-template-importer.js +5 -4
- package/dist-client/pages/pdf-template/pdf-template-importer.js.map +1 -1
- package/dist-client/pages/pdf-template/pdf-template-list-page.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -8,11 +8,11 @@ import { property } from 'lit/decorators.js'
|
|
|
8
8
|
import { client } from '@operato/graphql'
|
|
9
9
|
import { i18next } from '@operato/i18n'
|
|
10
10
|
import { isMobileDevice } from '@operato/utils'
|
|
11
|
-
import {
|
|
11
|
+
import { CommonHeaderStyles } from '@operato/styles'
|
|
12
12
|
|
|
13
13
|
export class PdfReleaseImporter extends LitElement {
|
|
14
14
|
static styles = [
|
|
15
|
-
|
|
15
|
+
CommonHeaderStyles,
|
|
16
16
|
css`
|
|
17
17
|
:host {
|
|
18
18
|
display: flex;
|
|
@@ -53,21 +53,19 @@ export class PdfReleaseImporter extends LitElement {
|
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
57
56
|
render() {
|
|
58
57
|
return html`
|
|
59
58
|
<ox-grist
|
|
60
59
|
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
61
60
|
.config=${this.columns}
|
|
62
|
-
.data=${
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
}
|
|
61
|
+
.data=${{
|
|
62
|
+
records: this.pdfReleases
|
|
63
|
+
}}
|
|
67
64
|
></ox-grist>
|
|
68
65
|
|
|
69
|
-
<div class="
|
|
70
|
-
<
|
|
66
|
+
<div class="footer">
|
|
67
|
+
<div filler></div>
|
|
68
|
+
<button @click=${this.save.bind(this)} done><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
71
69
|
</div>
|
|
72
70
|
`
|
|
73
71
|
}
|
|
@@ -87,4 +85,3 @@ export class PdfReleaseImporter extends LitElement {
|
|
|
87
85
|
this.dispatchEvent(new CustomEvent('imported'))
|
|
88
86
|
}
|
|
89
87
|
}
|
|
90
|
-
|
|
@@ -8,11 +8,11 @@ import { property } from 'lit/decorators.js'
|
|
|
8
8
|
import { client } from '@operato/graphql'
|
|
9
9
|
import { i18next } from '@operato/i18n'
|
|
10
10
|
import { isMobileDevice } from '@operato/utils'
|
|
11
|
-
import {
|
|
11
|
+
import { CommonHeaderStyles } from '@operato/styles'
|
|
12
12
|
|
|
13
13
|
export class PDFTemplateImporter extends LitElement {
|
|
14
14
|
static styles = [
|
|
15
|
-
|
|
15
|
+
CommonHeaderStyles,
|
|
16
16
|
css`
|
|
17
17
|
:host {
|
|
18
18
|
display: flex;
|
|
@@ -63,8 +63,9 @@ export class PDFTemplateImporter extends LitElement {
|
|
|
63
63
|
}}
|
|
64
64
|
></ox-grist>
|
|
65
65
|
|
|
66
|
-
<div class="
|
|
67
|
-
<
|
|
66
|
+
<div class="footer">
|
|
67
|
+
<div filler></div>
|
|
68
|
+
<button @click=${this.save.bind(this)} done><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
68
69
|
</div>
|
|
69
70
|
`
|
|
70
71
|
}
|
|
@@ -7,7 +7,7 @@ import { property } from 'lit/decorators.js';
|
|
|
7
7
|
import { client } from '@operato/graphql';
|
|
8
8
|
import { i18next } from '@operato/i18n';
|
|
9
9
|
import { isMobileDevice } from '@operato/utils';
|
|
10
|
-
import {
|
|
10
|
+
import { CommonHeaderStyles } from '@operato/styles';
|
|
11
11
|
export class PdfReleaseImporter extends LitElement {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
@@ -47,8 +47,9 @@ export class PdfReleaseImporter extends LitElement {
|
|
|
47
47
|
}}
|
|
48
48
|
></ox-grist>
|
|
49
49
|
|
|
50
|
-
<div class="
|
|
51
|
-
<
|
|
50
|
+
<div class="footer">
|
|
51
|
+
<div filler></div>
|
|
52
|
+
<button @click=${this.save.bind(this)} done><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
52
53
|
</div>
|
|
53
54
|
`;
|
|
54
55
|
}
|
|
@@ -68,7 +69,7 @@ export class PdfReleaseImporter extends LitElement {
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
PdfReleaseImporter.styles = [
|
|
71
|
-
|
|
72
|
+
CommonHeaderStyles,
|
|
72
73
|
css `
|
|
73
74
|
:host {
|
|
74
75
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdf-release-importer.js","sourceRoot":"","sources":["../../../client/pages/pdf-release/pdf-release-importer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"pdf-release-importer.js","sourceRoot":"","sources":["../../../client/pages/pdf-release/pdf-release-importer.ts"],"names":[],"m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kBAChC,IAAI,CAAC,OAAO;gBACd;YACN,OAAO,EAAE,IAAI,CAAC,WAAW;SAC1B;;;;;yBAKgB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gCAAgC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;;KAEhG,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;;QACR,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;OAIZ;YACD,SAAS,EAAE,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;SAC7C,CAAC,CAAA;QAEF,IAAI,MAAA,QAAQ,CAAC,MAAM,0CAAE,MAAM;YAAE,OAAM;QAEnC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IACjD,CAAC;;AAxEM,yBAAM,GAAG;IACd,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;KAWF;CACF,AAdY,CAcZ;AAE0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;uDAAwB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDAuB1B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\nimport { CommonHeaderStyles } from '@operato/styles'\n\nexport class PdfReleaseImporter extends LitElement {\n static styles = [\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) pdfReleases: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.pdfReleases\n }}\n ></ox-grist>\n\n <div class=\"footer\">\n <div filler></div>\n <button @click=${this.save.bind(this)} done><md-icon>save</md-icon>${i18next.t('button.save')}</button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importPdfReleases($pdfReleases: [PdfReleasePatch!]!) {\n importPdfReleases(pdfReleases: $pdfReleases)\n }\n `,\n variables: { pdfReleases: this.pdfReleases }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
|
|
@@ -50,7 +50,7 @@ export declare class PdfReleaseListPage extends PdfReleaseListPage_base {
|
|
|
50
50
|
handler: (records: any) => Promise<void>;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
render(): import("lit").TemplateResult<1>;
|
|
53
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
54
54
|
pageInitialized(lifecycle: any): Promise<void>;
|
|
55
55
|
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
56
56
|
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|
|
@@ -7,7 +7,7 @@ import { property } from 'lit/decorators.js';
|
|
|
7
7
|
import { client } from '@operato/graphql';
|
|
8
8
|
import { i18next } from '@operato/i18n';
|
|
9
9
|
import { isMobileDevice } from '@operato/utils';
|
|
10
|
-
import {
|
|
10
|
+
import { CommonHeaderStyles } from '@operato/styles';
|
|
11
11
|
export class PDFTemplateImporter extends LitElement {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
@@ -47,8 +47,9 @@ export class PDFTemplateImporter extends LitElement {
|
|
|
47
47
|
}}
|
|
48
48
|
></ox-grist>
|
|
49
49
|
|
|
50
|
-
<div class="
|
|
51
|
-
<
|
|
50
|
+
<div class="footer">
|
|
51
|
+
<div filler></div>
|
|
52
|
+
<button @click=${this.save.bind(this)} done><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
52
53
|
</div>
|
|
53
54
|
`;
|
|
54
55
|
}
|
|
@@ -68,7 +69,7 @@ export class PDFTemplateImporter extends LitElement {
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
PDFTemplateImporter.styles = [
|
|
71
|
-
|
|
72
|
+
CommonHeaderStyles,
|
|
72
73
|
css `
|
|
73
74
|
:host {
|
|
74
75
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdf-template-importer.js","sourceRoot":"","sources":["../../../client/pages/pdf-template/pdf-template-importer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"pdf-template-importer.js","sourceRoot":"","sources":["../../../client/pages/pdf-template/pdf-template-importer.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AA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a,CAAC;;KAEhG,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;;QACR,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;OAIZ;YACD,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE;SAC/C,CAAC,CAAA;QAEF,IAAI,MAAA,QAAQ,CAAC,MAAM,0CAAE,MAAM;YAAE,OAAM;QAEnC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IACjD,CAAC;;AAxEM,0BAAM,GAAG;IACd,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;KAWF;CACF,AAdY,CAcZ;AAE0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;yDAAyB;AACvB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAuB1B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\nimport { CommonHeaderStyles } from '@operato/styles'\n\nexport class PDFTemplateImporter extends LitElement {\n static styles = [\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) pdfTemplates: any[] = []\n @property({ type: Object }) columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${{\n records: this.pdfTemplates\n }}\n ></ox-grist>\n\n <div class=\"footer\">\n <div filler></div>\n <button @click=${this.save.bind(this)} done><md-icon>save</md-icon>${i18next.t('button.save')}</button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importPDFTemplates($pdfTemplates: [PDFTemplatePatch!]!) {\n importPDFTemplates(pdfTemplates: $pdfTemplates)\n }\n `,\n variables: { pdfTemplates: this.pdfTemplates }\n })\n\n if (response.errors?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n"]}
|
|
@@ -50,7 +50,7 @@ export declare class PDFTemplateListPage extends PDFTemplateListPage_base {
|
|
|
50
50
|
handler: (records: any) => Promise<void>;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
render(): import("lit").TemplateResult<1>;
|
|
53
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
54
54
|
pageInitialized(lifecycle: any): Promise<void>;
|
|
55
55
|
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
56
56
|
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|