@pdfme/common 5.3.8-dev.4 → 5.3.8-dev.42
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/dist/cjs/__tests__/dynamicTemplate.test.js +9 -9
- package/dist/cjs/__tests__/dynamicTemplate.test.js.map +1 -1
- package/dist/cjs/__tests__/expression.test.js +45 -45
- package/dist/cjs/__tests__/expression.test.js.map +1 -1
- package/dist/cjs/__tests__/helper.test.js +46 -47
- package/dist/cjs/__tests__/helper.test.js.map +1 -1
- package/dist/cjs/src/dynamicTemplate.js +4 -4
- package/dist/cjs/src/dynamicTemplate.js.map +1 -1
- package/dist/cjs/src/index.js +34 -34
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/esm/__tests__/dynamicTemplate.test.js +1 -1
- package/dist/esm/__tests__/dynamicTemplate.test.js.map +1 -1
- package/dist/esm/__tests__/expression.test.js +1 -1
- package/dist/esm/__tests__/expression.test.js.map +1 -1
- package/dist/esm/__tests__/helper.test.js +2 -3
- package/dist/esm/__tests__/helper.test.js.map +1 -1
- package/dist/esm/src/dynamicTemplate.js +1 -1
- package/dist/esm/src/dynamicTemplate.js.map +1 -1
- package/dist/esm/src/index.js +5 -5
- package/dist/esm/src/index.js.map +1 -1
- package/dist/node/__tests__/dynamicTemplate.test.js +9 -9
- package/dist/node/__tests__/dynamicTemplate.test.js.map +1 -1
- package/dist/node/__tests__/expression.test.js +45 -45
- package/dist/node/__tests__/expression.test.js.map +1 -1
- package/dist/node/__tests__/helper.test.js +46 -47
- package/dist/node/__tests__/helper.test.js.map +1 -1
- package/dist/node/src/dynamicTemplate.js +4 -4
- package/dist/node/src/dynamicTemplate.js.map +1 -1
- package/dist/node/src/index.js +34 -34
- package/dist/node/src/index.js.map +1 -1
- package/dist/types/src/dynamicTemplate.d.ts +1 -1
- package/dist/types/src/expression.d.ts +1 -1
- package/dist/types/src/helper.d.ts +1 -1
- package/dist/types/src/index.d.ts +6 -6
- package/dist/types/src/types.d.ts +0 -2
- package/eslint.config.mjs +22 -0
- package/package.json +2 -2
- package/set-version.js +1 -1
- package/src/dynamicTemplate.ts +2 -2
- package/src/expression.ts +1 -1
- package/src/helper.ts +1 -1
- package/src/index.ts +6 -6
- package/src/types.ts +0 -2
- package/tsconfig.esm.json +2 -1
- package/.eslintrc.cjs +0 -3
@@ -0,0 +1,22 @@
|
|
1
|
+
import { fileURLToPath } from 'url';
|
2
|
+
import { dirname, resolve } from 'path';
|
3
|
+
|
4
|
+
const __filename = fileURLToPath(import.meta.url);
|
5
|
+
const __dirname = dirname(__filename);
|
6
|
+
|
7
|
+
// Import the root config
|
8
|
+
const rootConfigPath = resolve(__dirname, '../../eslint.config.mjs');
|
9
|
+
const rootConfig = await import(rootConfigPath);
|
10
|
+
|
11
|
+
export default [
|
12
|
+
...rootConfig.default,
|
13
|
+
{
|
14
|
+
files: ['src/**/*.ts'],
|
15
|
+
languageOptions: {
|
16
|
+
parserOptions: {
|
17
|
+
project: ['./tsconfig.esm.json'],
|
18
|
+
tsconfigRootDir: __dirname,
|
19
|
+
},
|
20
|
+
},
|
21
|
+
},
|
22
|
+
];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pdfme/common",
|
3
|
-
"version": "5.3.8-dev.
|
3
|
+
"version": "5.3.8-dev.42",
|
4
4
|
"sideEffects": false,
|
5
5
|
"author": "hand-dot",
|
6
6
|
"license": "MIT",
|
@@ -42,7 +42,7 @@
|
|
42
42
|
"build:esm": "tsc -p tsconfig.esm.json",
|
43
43
|
"build:node": "tsc -p tsconfig.node.json",
|
44
44
|
"clean": "rimraf dist",
|
45
|
-
"lint": "eslint --ext .ts src",
|
45
|
+
"lint": "eslint --ext .ts src --config eslint.config.mjs --no-error-on-unmatched-pattern",
|
46
46
|
"test": "jest",
|
47
47
|
"prune": "ts-prune src",
|
48
48
|
"prettier": "prettier --write 'src/**/*.ts'"
|
package/set-version.js
CHANGED
package/src/dynamicTemplate.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Schema, Template, BasePdf, BlankPdf, CommonOptions } from './types';
|
2
|
-
import { cloneDeep, isBlankPdf } from './helper';
|
1
|
+
import { Schema, Template, BasePdf, BlankPdf, CommonOptions } from './types.js';
|
2
|
+
import { cloneDeep, isBlankPdf } from './helper.js';
|
3
3
|
|
4
4
|
interface ModifyTemplateForDynamicTableArg {
|
5
5
|
template: Template;
|
package/src/expression.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as acorn from 'acorn';
|
2
2
|
import type { Node as AcornNode, Identifier, Property } from 'estree';
|
3
|
-
import type { SchemaPageArray } from './types';
|
3
|
+
import type { SchemaPageArray } from './types.js';
|
4
4
|
|
5
5
|
const expressionCache = new Map<string, (context: Record<string, unknown>) => unknown>();
|
6
6
|
const parseDataCache = new Map<string, Record<string, unknown>>();
|
package/src/helper.ts
CHANGED
package/src/index.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {PDFME_VERSION} from './version';
|
1
|
+
import {PDFME_VERSION} from './version.js';
|
2
2
|
import {
|
3
3
|
MM_TO_PT_RATIO,
|
4
4
|
PT_TO_MM_RATIO,
|
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
BLANK_PDF,
|
7
7
|
ZOOM,
|
8
8
|
DEFAULT_FONT_NAME,
|
9
|
-
} from './constants';
|
9
|
+
} from './constants.js';
|
10
10
|
import type {
|
11
11
|
ChangeSchemaItem,
|
12
12
|
ChangeSchemas,
|
@@ -36,7 +36,7 @@ import type {
|
|
36
36
|
UIProps,
|
37
37
|
PreviewProps,
|
38
38
|
DesignerProps,
|
39
|
-
} from './types';
|
39
|
+
} from './types.js';
|
40
40
|
import {
|
41
41
|
cloneDeep,
|
42
42
|
getFallbackFontName,
|
@@ -58,9 +58,9 @@ import {
|
|
58
58
|
isHexValid,
|
59
59
|
getInputFromTemplate,
|
60
60
|
isBlankPdf,
|
61
|
-
} from './helper';
|
62
|
-
import { getDynamicTemplate } from './dynamicTemplate';
|
63
|
-
import { replacePlaceholders } from './expression';
|
61
|
+
} from './helper.js';
|
62
|
+
import { getDynamicTemplate } from './dynamicTemplate.js';
|
63
|
+
import { replacePlaceholders } from './expression.js';
|
64
64
|
|
65
65
|
export {
|
66
66
|
PDFME_VERSION,
|
package/src/types.ts
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import type { PDFPage, PDFDocument } from '@pdfme/pdf-lib';
|
3
|
-
/** @ts-ignore -- optional interface, will gracefully degrade to `any` if `antd` isn't installed **/
|
4
3
|
import type { ThemeConfig, GlobalToken } from 'antd';
|
5
|
-
/** @ts-ignore -- optional interface, will gracefully degrade to `any` if `form-render` isn't installed*/
|
6
4
|
import type { WidgetProps as _PropPanelWidgetProps, Schema as _PropPanelSchema } from 'form-render';
|
7
5
|
import {
|
8
6
|
Lang,
|
package/tsconfig.esm.json
CHANGED
package/.eslintrc.cjs
DELETED