@unimaze/billing 0.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/LICENSE.txt +1 -0
- package/README.md +14 -0
- package/lib/common/components/attachments/Attachment.d.ts +15 -0
- package/lib/common/components/attachments/Attachment.js +78 -0
- package/lib/common/components/attachments/index.d.ts +3 -0
- package/lib/common/components/attachments/index.js +22 -0
- package/lib/common/components/base-information/index.d.ts +9 -0
- package/lib/common/components/base-information/index.js +112 -0
- package/lib/common/components/billing-lines/index.d.ts +27 -0
- package/lib/common/components/billing-lines/index.js +186 -0
- package/lib/common/components/component-container/Content.d.ts +7 -0
- package/lib/common/components/component-container/Content.js +13 -0
- package/lib/common/components/component-container/Header.d.ts +9 -0
- package/lib/common/components/component-container/Header.js +28 -0
- package/lib/common/components/component-container/index.d.ts +10 -0
- package/lib/common/components/component-container/index.js +20 -0
- package/lib/common/components/delivery-location/index.d.ts +3 -0
- package/lib/common/components/delivery-location/index.js +28 -0
- package/lib/common/components/editable-cell/index.d.ts +11 -0
- package/lib/common/components/editable-cell/index.js +76 -0
- package/lib/common/components/editable-row/index.d.ts +6 -0
- package/lib/common/components/editable-row/index.js +41 -0
- package/lib/common/components/index.d.ts +5 -0
- package/lib/common/components/index.js +10 -0
- package/lib/common/components/issuer/index.d.ts +7 -0
- package/lib/common/components/issuer/index.js +28 -0
- package/lib/common/components/payer/index.d.ts +3 -0
- package/lib/common/components/payer/index.js +50 -0
- package/lib/common/components/payment-method/index.d.ts +3 -0
- package/lib/common/components/payment-method/index.js +73 -0
- package/lib/common/consts/validationRules.d.ts +7 -0
- package/lib/common/consts/validationRules.js +67 -0
- package/lib/common/enums/DocumentTypeEnum.d.ts +5 -0
- package/lib/common/enums/DocumentTypeEnum.js +8 -0
- package/lib/common/enums/index.d.ts +1 -0
- package/lib/common/enums/index.js +6 -0
- package/lib/common/types/BillingLineMetadataOverride.d.ts +4 -0
- package/lib/common/types/BillingLineMetadataOverride.js +2 -0
- package/lib/common/types/CommonProps.d.ts +7 -0
- package/lib/common/types/CommonProps.js +2 -0
- package/lib/common/types/InvoiceFormFields.d.ts +1 -0
- package/lib/common/types/InvoiceFormFields.js +2 -0
- package/lib/common/types/index.d.ts +1 -0
- package/lib/common/types/index.js +2 -0
- package/lib/create-credit-note/index.d.ts +9 -0
- package/lib/create-credit-note/index.js +75 -0
- package/lib/create-invoice/index.d.ts +15 -0
- package/lib/create-invoice/index.js +89 -0
- package/lib/example/src/index.d.ts +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +9 -0
- package/lib/style/index.css +1269 -0
- package/lib/utils/index.d.ts +5 -0
- package/lib/utils/index.js +164 -0
- package/package.json +82 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InvoiceMetadataInput, CreditNoteMetadataInput } from "@unimaze/api-clients/lib/mapi";
|
|
2
|
+
export declare class Utility {
|
|
3
|
+
static convertToInvoiceMetadataInput: (formValues: any) => InvoiceMetadataInput;
|
|
4
|
+
static convertToCreditNoteMetadataInput: (formValues: any) => CreditNoteMetadataInput;
|
|
5
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var Utility = /** @class */ (function () {
|
|
4
|
+
function Utility() {
|
|
5
|
+
}
|
|
6
|
+
Utility.convertToInvoiceMetadataInput = function (formValues) {
|
|
7
|
+
return {
|
|
8
|
+
messageHandling: {
|
|
9
|
+
receiverIdentifier: "",
|
|
10
|
+
fallbackEmailAddress: "",
|
|
11
|
+
fallbackContactName: "",
|
|
12
|
+
},
|
|
13
|
+
invoice: {
|
|
14
|
+
supplier: {
|
|
15
|
+
identifier: "",
|
|
16
|
+
address: {
|
|
17
|
+
streetNameAndNumber: "",
|
|
18
|
+
postalZone: "",
|
|
19
|
+
city: "",
|
|
20
|
+
countryCode: "",
|
|
21
|
+
countrySubEntity: "",
|
|
22
|
+
addressLine2: "",
|
|
23
|
+
addressLine3: ""
|
|
24
|
+
},
|
|
25
|
+
name: "",
|
|
26
|
+
vatNumber: "",
|
|
27
|
+
contact: {
|
|
28
|
+
electronicMail: "",
|
|
29
|
+
fax: "",
|
|
30
|
+
name: "",
|
|
31
|
+
telephone: ""
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
customer: {
|
|
35
|
+
identifier: "",
|
|
36
|
+
address: {
|
|
37
|
+
streetNameAndNumber: "",
|
|
38
|
+
postalZone: "",
|
|
39
|
+
city: "",
|
|
40
|
+
countryCode: "",
|
|
41
|
+
countrySubEntity: "",
|
|
42
|
+
addressLine2: "",
|
|
43
|
+
addressLine3: ""
|
|
44
|
+
},
|
|
45
|
+
name: "",
|
|
46
|
+
contact: {
|
|
47
|
+
electronicMail: "",
|
|
48
|
+
fax: "",
|
|
49
|
+
name: "",
|
|
50
|
+
telephone: ""
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
delivery: {
|
|
54
|
+
actualDeliveryDate: null,
|
|
55
|
+
address: {
|
|
56
|
+
streetNameAndNumber: "",
|
|
57
|
+
postalZone: "",
|
|
58
|
+
city: "",
|
|
59
|
+
countryCode: "",
|
|
60
|
+
countrySubEntity: "",
|
|
61
|
+
addressLine2: "",
|
|
62
|
+
addressLine3: ""
|
|
63
|
+
},
|
|
64
|
+
locationIdentifier: "",
|
|
65
|
+
partyName: ""
|
|
66
|
+
},
|
|
67
|
+
issueDate: new Date(),
|
|
68
|
+
dueDate: null,
|
|
69
|
+
invoiceNo: "",
|
|
70
|
+
paymentTerms: {
|
|
71
|
+
note: ""
|
|
72
|
+
},
|
|
73
|
+
currencyCode: "",
|
|
74
|
+
invoiceLines: [],
|
|
75
|
+
notes: "",
|
|
76
|
+
payableAmount: 0,
|
|
77
|
+
orderReference: {
|
|
78
|
+
documentNo: "",
|
|
79
|
+
issueDate: undefined,
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
Utility.convertToCreditNoteMetadataInput = function (formValues) {
|
|
85
|
+
return {
|
|
86
|
+
messageHandling: {
|
|
87
|
+
receiverIdentifier: "",
|
|
88
|
+
fallbackEmailAddress: "",
|
|
89
|
+
fallbackContactName: "",
|
|
90
|
+
},
|
|
91
|
+
creditNote: {
|
|
92
|
+
supplier: {
|
|
93
|
+
identifier: "",
|
|
94
|
+
address: {
|
|
95
|
+
streetNameAndNumber: "",
|
|
96
|
+
postalZone: "",
|
|
97
|
+
city: "",
|
|
98
|
+
countryCode: "",
|
|
99
|
+
countrySubEntity: "",
|
|
100
|
+
addressLine2: "",
|
|
101
|
+
addressLine3: ""
|
|
102
|
+
},
|
|
103
|
+
name: "",
|
|
104
|
+
vatNumber: "",
|
|
105
|
+
contact: {
|
|
106
|
+
electronicMail: "",
|
|
107
|
+
fax: "",
|
|
108
|
+
name: "",
|
|
109
|
+
telephone: ""
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
customer: {
|
|
113
|
+
identifier: "",
|
|
114
|
+
address: {
|
|
115
|
+
streetNameAndNumber: "",
|
|
116
|
+
postalZone: "",
|
|
117
|
+
city: "",
|
|
118
|
+
countryCode: "",
|
|
119
|
+
countrySubEntity: "",
|
|
120
|
+
addressLine2: "",
|
|
121
|
+
addressLine3: ""
|
|
122
|
+
},
|
|
123
|
+
name: "",
|
|
124
|
+
contact: {
|
|
125
|
+
electronicMail: "",
|
|
126
|
+
fax: "",
|
|
127
|
+
name: "",
|
|
128
|
+
telephone: ""
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
delivery: {
|
|
132
|
+
actualDeliveryDate: null,
|
|
133
|
+
address: {
|
|
134
|
+
streetNameAndNumber: "",
|
|
135
|
+
postalZone: "",
|
|
136
|
+
city: "",
|
|
137
|
+
countryCode: "",
|
|
138
|
+
countrySubEntity: "",
|
|
139
|
+
addressLine2: "",
|
|
140
|
+
addressLine3: ""
|
|
141
|
+
},
|
|
142
|
+
locationIdentifier: "",
|
|
143
|
+
partyName: ""
|
|
144
|
+
},
|
|
145
|
+
issueDate: new Date(),
|
|
146
|
+
creditNoteNo: "",
|
|
147
|
+
currencyCode: "",
|
|
148
|
+
creditNoteLines: [],
|
|
149
|
+
notes: "",
|
|
150
|
+
payableAmount: 0,
|
|
151
|
+
orderReference: {
|
|
152
|
+
documentNo: "",
|
|
153
|
+
issueDate: undefined,
|
|
154
|
+
},
|
|
155
|
+
billingReferences: {
|
|
156
|
+
invoices: [],
|
|
157
|
+
creditNotes: [],
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
return Utility;
|
|
163
|
+
}());
|
|
164
|
+
exports.Utility = Utility;
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@unimaze/billing",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib/**/*"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"react-hot-loader": "^4.12.20",
|
|
12
|
+
"@ant-design/compatible": "latest"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@hot-loader/react-dom": "^16.13.0+4.12.20",
|
|
16
|
+
"@types/lodash": "^4.14.149",
|
|
17
|
+
"@types/react": "16.9.34",
|
|
18
|
+
"@types/react-dom": "16.9.7",
|
|
19
|
+
"@types/react-intl": "^3.0.0",
|
|
20
|
+
"awesome-typescript-loader": "^5.2.1",
|
|
21
|
+
"babel-loader": "^8.1.0",
|
|
22
|
+
"copyfiles": "^2.2.0",
|
|
23
|
+
"cross-env": "^7.0.2",
|
|
24
|
+
"css-loader": "^3.5.1",
|
|
25
|
+
"file-loader": "^6.0.0",
|
|
26
|
+
"less": "^3.11.1",
|
|
27
|
+
"less-loader": "^5.0.0",
|
|
28
|
+
"less-watch-compiler": "^1.14.1",
|
|
29
|
+
"mini-css-extract-plugin": "^0.9.0",
|
|
30
|
+
"npm-watch": "^0.6.0",
|
|
31
|
+
"open-browser-webpack-plugin": "^0.0.5",
|
|
32
|
+
"rimraf": "^3.0.2",
|
|
33
|
+
"style-loader": "^1.1.3",
|
|
34
|
+
"tslint": "^6.1.1",
|
|
35
|
+
"tslint-config-prettier": "^1.18.0",
|
|
36
|
+
"typescript": "3.5.3",
|
|
37
|
+
"url-loader": "^4.0.0",
|
|
38
|
+
"webpack": "^4.42.1",
|
|
39
|
+
"webpack-cli": "^3.3.11",
|
|
40
|
+
"webpack-dev-server": "^3.10.3",
|
|
41
|
+
"antd": "4.3.3",
|
|
42
|
+
"react": "16.13.1",
|
|
43
|
+
"react-dom": "16.13.1",
|
|
44
|
+
"react-intl": "^2.9.0",
|
|
45
|
+
"react-intl.macro": "^0.3.7"
|
|
46
|
+
},
|
|
47
|
+
"resolutions": {
|
|
48
|
+
"@types/react": "16.9.34",
|
|
49
|
+
"@types/react-dom": "16.9.7"
|
|
50
|
+
},
|
|
51
|
+
"watch": {
|
|
52
|
+
"build": {
|
|
53
|
+
"patterns": [
|
|
54
|
+
"src"
|
|
55
|
+
],
|
|
56
|
+
"extensions": "ts,tsx,less"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"watch": "npm-watch",
|
|
61
|
+
"less:watch": "less-watch-compiler --config less-watch-compiler.config.json",
|
|
62
|
+
"test": "echo \"Error: no test specified\" && exit 0",
|
|
63
|
+
"build": "tsc",
|
|
64
|
+
"postbuild": "copyfiles -V -u 1 src/**/*.css lib",
|
|
65
|
+
"lint": "tslint -p tsconfig.json",
|
|
66
|
+
"prepare": "yarn build",
|
|
67
|
+
"prepublishOnly": "yarn test && yarn run lint",
|
|
68
|
+
"preversion": "yarn run lint",
|
|
69
|
+
"version": "git add -A src",
|
|
70
|
+
"postversion": "git push && git push --tags",
|
|
71
|
+
"examples": "webpack-dev-server --hot --mode development --config example/webpack.config.js",
|
|
72
|
+
"examples:clean": "rimraf example/dist",
|
|
73
|
+
"examples:build": "webpack -d --mode development --config example/webpack.config.js",
|
|
74
|
+
"start": "yarn run examples"
|
|
75
|
+
},
|
|
76
|
+
"author": "",
|
|
77
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
78
|
+
"repository": {
|
|
79
|
+
"type": "git",
|
|
80
|
+
"url": "https://bitbucket.org/unimaze/npm-unimaze-billing.git"
|
|
81
|
+
}
|
|
82
|
+
}
|