@fto-consult/expo-ui 6.77.0 → 6.77.2
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/babel.config.alias.js +0 -2
- package/package.json +2 -2
- package/src/components/Datagrid/Common/Common.js +188 -117
- package/src/screens/Help/openLibraries.js +1 -1
- package/src/pdf/pdfmake/index.js +0 -0
- package/src/pdf/pdfmake/pdfmake.html +0 -21
- package/src/print/createPDF/index.js +0 -20
- package/src/print/formatText.js +0 -84
- package/src/print/index.js +0 -13
- package/src/print/pdf/formats/defaultFormats.js +0 -28
- package/src/print/pdf/formats/defaultPageFormat.js +0 -1
- package/src/print/pdf/formats/defaultPageOrientation.js +0 -1
- package/src/print/pdf/formats/fields.js +0 -139
- package/src/print/pdf/formats/formats.js +0 -8
- package/src/print/pdf/formats/index.js +0 -10
- package/src/print/pdf/formats/renderItem.js +0 -8
- package/src/print/pdf/index.js +0 -2
- package/src/print/pdf/paperSizes/all.js +0 -1948
- package/src/print/pdf/paperSizes/index.js +0 -4
- package/src/print/pdf/paperSizes/iso.js +0 -493
- package/src/print/qrCode.js +0 -44
- package/src/print/svg/index.js +0 -25
- package/src/print/toPdfMakeObj.js +0 -51
@@ -1,20 +0,0 @@
|
|
1
|
-
const pdfMake = require('pdfmake/build/pdfmake.js');
|
2
|
-
const pdfFonts = require('pdfmake/build/vfs_fonts.js');
|
3
|
-
pdfMake.vfs = pdfFonts.pdfMake.vfs;
|
4
|
-
|
5
|
-
const fonts = {
|
6
|
-
Roboto: {
|
7
|
-
normal: 'Roboto-Regular.ttf',
|
8
|
-
bold: 'Roboto-Medium.ttf',
|
9
|
-
italics: 'Roboto-Italic.ttf',
|
10
|
-
bolditalics: 'Roboto-MediumItalic.ttf'
|
11
|
-
},
|
12
|
-
};
|
13
|
-
pdfMake.fonts = fonts;
|
14
|
-
function createPDF(args){
|
15
|
-
return pdfMake.createPdf(args);
|
16
|
-
};
|
17
|
-
|
18
|
-
export {fonts};
|
19
|
-
export default createPDF;
|
20
|
-
export {createPDF};
|
package/src/print/formatText.js
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
function isAplhanumeric(char) {
|
2
|
-
const x = `${char || ""}`.charCodeAt(0);
|
3
|
-
if (!char || Number.isNaN(x)) {
|
4
|
-
return false;
|
5
|
-
}
|
6
|
-
return !!((x >= 65 && x <= 90)
|
7
|
-
|| (x >= 97 && x <= 122)
|
8
|
-
|| (x >= 48 && x <= 57));
|
9
|
-
}
|
10
|
-
function getIndexes(text, wildcard) {
|
11
|
-
const indices = [];
|
12
|
-
for (let i = 0; i < text.length; i += 1) {
|
13
|
-
if (text[i] === wildcard) {
|
14
|
-
if (indices.length % 2) {
|
15
|
-
if (text[i - 1] === " "
|
16
|
-
|| isAplhanumeric(text[i + 1])) {
|
17
|
-
break;
|
18
|
-
}
|
19
|
-
else {
|
20
|
-
indices.push(i);
|
21
|
-
}
|
22
|
-
}
|
23
|
-
else if (typeof (text[i + 1]) === "undefined"
|
24
|
-
|| text[i + 1] === " "
|
25
|
-
|| isAplhanumeric(text[i - 1])) {
|
26
|
-
break;
|
27
|
-
}
|
28
|
-
else {
|
29
|
-
indices.push(i);
|
30
|
-
}
|
31
|
-
}
|
32
|
-
else if (text[i].charCodeAt(0) === 10 && indices.length % 2) {
|
33
|
-
indices.pop();
|
34
|
-
}
|
35
|
-
}
|
36
|
-
if (indices.length % 2) {
|
37
|
-
// we have unclosed tags
|
38
|
-
indices.pop();
|
39
|
-
}
|
40
|
-
return indices;
|
41
|
-
}
|
42
|
-
function injectTags(text, indices, rule) {
|
43
|
-
let e = 0;
|
44
|
-
indices.forEach((value, index) => {
|
45
|
-
const tag = (index % 2)
|
46
|
-
? rule.closeTag
|
47
|
-
: rule.openTag;
|
48
|
-
let v = value;
|
49
|
-
v += e;
|
50
|
-
text = text.substr(0, v) + tag + text.substr(v + 1);
|
51
|
-
e += (tag.length - 1);
|
52
|
-
});
|
53
|
-
return text;
|
54
|
-
}
|
55
|
-
function execRule(text, rule) {
|
56
|
-
const indices = getIndexes(text, rule.wildcard);
|
57
|
-
return injectTags(text, indices, rule);
|
58
|
-
}
|
59
|
-
function parseText(text, rules) {
|
60
|
-
const final = rules.reduce((transformed, rule) => {
|
61
|
-
return execRule(transformed, rule);
|
62
|
-
}, text);
|
63
|
-
return final.replace(/\n/gi, "<br>");
|
64
|
-
}
|
65
|
-
export const whatsappRules = [
|
66
|
-
{
|
67
|
-
closeTag: "</strong>",
|
68
|
-
openTag: "<strong>",
|
69
|
-
wildcard: "*",
|
70
|
-
},
|
71
|
-
{
|
72
|
-
closeTag: "</i>",
|
73
|
-
openTag: "<i>",
|
74
|
-
wildcard: "_",
|
75
|
-
},
|
76
|
-
{
|
77
|
-
closeTag: "</s>",
|
78
|
-
openTag: "<s>",
|
79
|
-
wildcard: "~",
|
80
|
-
},
|
81
|
-
];
|
82
|
-
export default function format(text, rules) {
|
83
|
-
return parseText(text, rules || whatsappRules);
|
84
|
-
}
|
package/src/print/index.js
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
|
2
|
-
import $session from "$session";
|
3
|
-
import {isDOMElement} from "$cutils/dom";
|
4
|
-
let formatField = require("../exporter/formatField");
|
5
|
-
let {outlineText} = require("./svg");
|
6
|
-
let printingPageFormats = {};
|
7
|
-
|
8
|
-
/*** vérifie si le contenu désiré pour l'impression est valide */
|
9
|
-
|
10
|
-
import createPDF from ("./createPDF");
|
11
|
-
import notify from "$cnotify";
|
12
|
-
|
13
|
-
module.exports = printTB;
|
@@ -1,28 +0,0 @@
|
|
1
|
-
function populateFormats (){
|
2
|
-
let i = 4;
|
3
|
-
const formats = {};
|
4
|
-
while(i>=0){
|
5
|
-
let format = "A"+i;
|
6
|
-
let size = {};
|
7
|
-
formats[format] = {
|
8
|
-
code : format,
|
9
|
-
label : format,
|
10
|
-
pageFormat : format,
|
11
|
-
pageWidth : 0,
|
12
|
-
pageHeight : 0,
|
13
|
-
displayLogo : 1,
|
14
|
-
displaySocialReason : 1,
|
15
|
-
displayIdentifier : 1,
|
16
|
-
displayThirdPartiesIdentifier : 1,
|
17
|
-
pageOrientation : 'portrait',
|
18
|
-
topMargin : 15,
|
19
|
-
leftMargin : 15,
|
20
|
-
rightMargin : 15,
|
21
|
-
bottomMargin : 0,
|
22
|
-
...size
|
23
|
-
}
|
24
|
-
i-=1;
|
25
|
-
}
|
26
|
-
return formats;
|
27
|
-
}
|
28
|
-
export default populateFormats();
|
@@ -1 +0,0 @@
|
|
1
|
-
export default "A4";
|
@@ -1 +0,0 @@
|
|
1
|
-
export default 'portrait';
|
@@ -1,139 +0,0 @@
|
|
1
|
-
import formats from "./formats";
|
2
|
-
import {isObj,isNonNullString} from "$cutils";
|
3
|
-
|
4
|
-
export default {
|
5
|
-
code : {
|
6
|
-
label : 'Code du format',
|
7
|
-
primaryKey : true,
|
8
|
-
readOnlyOnEditing : true,
|
9
|
-
validType : 'required',
|
10
|
-
maxLength : 20
|
11
|
-
},
|
12
|
-
label : {
|
13
|
-
text : "Intitulé du format",
|
14
|
-
maxLength : 40
|
15
|
-
},
|
16
|
-
users : {
|
17
|
-
type : "selecttabledata",
|
18
|
-
text : "Accessible aux utilisateurs",
|
19
|
-
multiple : true,
|
20
|
-
foreignKeyColumn : 'code',
|
21
|
-
foreignKeyTable : "users",
|
22
|
-
dbName : "users"
|
23
|
-
},
|
24
|
-
displayLogo : {
|
25
|
-
text : 'Afficher le logo société',
|
26
|
-
type : 'switch',
|
27
|
-
defaultValue : 1,
|
28
|
-
checkedTooltip : 'Oui',
|
29
|
-
uncheckedTooltip : 'Non',
|
30
|
-
},
|
31
|
-
displaySocialReason : {
|
32
|
-
text : 'Entêtes société',
|
33
|
-
type : 'switch',
|
34
|
-
checkedTooltip : 'Oui',
|
35
|
-
uncheckedTooltip : 'Non',
|
36
|
-
defaultValue : 1,
|
37
|
-
},
|
38
|
-
displayIdentifier : {
|
39
|
-
text : 'Afficher les ID Société',
|
40
|
-
type : 'switch',
|
41
|
-
checkedTooltip : 'Oui',
|
42
|
-
uncheckedTooltip : 'Non',
|
43
|
-
defaultValue : 0,
|
44
|
-
//checkedTooltip : 'Afficher les identifiants société à l\'instar du registre de commerce et bien d\'autres',
|
45
|
-
//uncheckedTooltip : 'Ne pas afficher les identifiants société à l\'instar du registre de commerce et bien d\'autres',
|
46
|
-
},
|
47
|
-
displayThirdPartiesIdentifier : {
|
48
|
-
text : 'Afficher les ID Tiers',
|
49
|
-
type : 'switch',
|
50
|
-
checkedTooltip : 'Oui',
|
51
|
-
uncheckedTooltip : 'Non',
|
52
|
-
defaultValue : 0,
|
53
|
-
},
|
54
|
-
signatories : {
|
55
|
-
type : 'selectstructdata',
|
56
|
-
table : 'signatories',
|
57
|
-
multiple : true,
|
58
|
-
text : 'Signataires',
|
59
|
-
},
|
60
|
-
signatoriesMargin : {
|
61
|
-
type : 'number',
|
62
|
-
format : 'number',
|
63
|
-
validType : 'number',
|
64
|
-
text : 'Nbrs sauts de lignes après signataires',
|
65
|
-
tooltip : 'Entrez le nombre de sauts de lignes à laisser sur la page après la ligne des signataires',
|
66
|
-
defaultValue : 3,
|
67
|
-
},
|
68
|
-
footerNote : {
|
69
|
-
text : 'Note de bas de page',
|
70
|
-
format : 'hashtag',
|
71
|
-
maxLength : 500,
|
72
|
-
},
|
73
|
-
footerCopyRight : {
|
74
|
-
text : 'Pied de page',
|
75
|
-
format : 'hashtag',
|
76
|
-
maxLength : 500,
|
77
|
-
},
|
78
|
-
pageFormat : {
|
79
|
-
text : 'Format de la page',
|
80
|
-
defaultValue : require("./defaultPageFormat").default,
|
81
|
-
type : 'select',
|
82
|
-
items : formats,
|
83
|
-
required : true,
|
84
|
-
multiple : false,
|
85
|
-
itemValue : ({item})=>{
|
86
|
-
return formats[item] || item;
|
87
|
-
}
|
88
|
-
},
|
89
|
-
pageWidth : {
|
90
|
-
text : 'Largeur de la page en pts(pt)',
|
91
|
-
tooltip : 'Spécifiez une valeur de la largeur de la page à imprimer, si cette valeur vaut zéro, la valeur du format de la page sera utilisée',
|
92
|
-
defaultValue : 0,
|
93
|
-
type : 'number',
|
94
|
-
format : 'number',
|
95
|
-
validType : 'decimal',
|
96
|
-
},
|
97
|
-
pageHeight : {
|
98
|
-
text : 'Hauteur de la page en pts(pt)',
|
99
|
-
tooltip : 'Spécifiez une valeur de la hauteur de la page à imprimer, si cette valeur vaut zéro, la valeur du format de la page sera utilisée',
|
100
|
-
defaultValue : 0,
|
101
|
-
type : 'number',
|
102
|
-
format : 'number',
|
103
|
-
validType : 'decimal',
|
104
|
-
},
|
105
|
-
pageOrientation : {
|
106
|
-
text : 'Orientation de la page',
|
107
|
-
type : 'select',
|
108
|
-
items : [{code:'portrait',label:'Portrait'},{code:'landscape',label:'Paysage'}],
|
109
|
-
defaultValue : require("./defaultPageOrientation"),
|
110
|
-
required : true,
|
111
|
-
},
|
112
|
-
leftMargin : {
|
113
|
-
type : 'number',
|
114
|
-
format : 'number',
|
115
|
-
validType : 'number',
|
116
|
-
text : 'Marge [Gauche]',
|
117
|
-
defaultValue : 20
|
118
|
-
},
|
119
|
-
topMargin : {
|
120
|
-
type : 'number',
|
121
|
-
format : 'number',
|
122
|
-
validType : 'number',
|
123
|
-
text : 'Marge [Haut]',
|
124
|
-
defaultValue : 20,
|
125
|
-
},
|
126
|
-
rightMargin : {
|
127
|
-
type : 'number',
|
128
|
-
text : 'Marge [Droite]',
|
129
|
-
validType : 'number',
|
130
|
-
defaultValue : 20
|
131
|
-
},
|
132
|
-
bottomMargin : {
|
133
|
-
type : 'number',
|
134
|
-
format : 'number',
|
135
|
-
validType : 'number',
|
136
|
-
text : 'Marge [Bas]',
|
137
|
-
defaultValue : 30
|
138
|
-
},
|
139
|
-
}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
export default [
|
2
|
-
'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10','4A0', '2A0', 'A0', 'A1', 'A2', 'A3',
|
3
|
-
'B0', 'B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B9', 'B10',
|
4
|
-
'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9', 'C10',
|
5
|
-
'RA0', 'RA1', 'RA2', 'RA3', 'RA4',
|
6
|
-
'SRA0', 'SRA1', 'SRA2', 'SRA3', 'SRA4',
|
7
|
-
'EXECUTIVE', 'FOLIO', 'LEGAL', 'LETTER', 'TABLOID'
|
8
|
-
]
|
@@ -1,10 +0,0 @@
|
|
1
|
-
let renderItem = require("./renderItem")
|
2
|
-
|
3
|
-
export {default as renderItem} from "./renderItem";
|
4
|
-
export {default as formats} from "./formats";
|
5
|
-
export {default as fields} from "./fields";
|
6
|
-
export {default as defaultFormat} from "./defaultFormat";
|
7
|
-
export {default as defaultFormats} from "./defaultFormats";
|
8
|
-
export {default as pageFormats} from "./defaultFormats";
|
9
|
-
export {default as defaultPageOrientation} from "./defaultPageOrientation";
|
10
|
-
export {default as defaultPageFormat} from "./defaultPageFormat";
|
package/src/print/pdf/index.js
DELETED