@simple-reporting/base 1.0.16 → 1.0.17
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/dev/eslint.config.js +5 -0
- package/dev/package.json +1 -1
- package/dev/src/assets/scss/components/icons.scss +287 -0
- package/dev/src/assets/scss/components/note/accordion.scss +57 -24
- package/dev/src/assets/scss/components/round-button.scss +75 -0
- package/dev/src/assets/scss/general.scss +2 -0
- package/dev/src/assets/scss/placeholders.scss +315 -1
- package/dev/src/assets/scss/web.scss +1 -0
- package/dev/srl.config.json +23 -8
- package/livingdocs/010.Titles/020.title-h2/title-h2.html +5 -6
- package/livingdocs/010.Titles/030.title-h3/title-h3.html +4 -5
- package/livingdocs/010.Titles/040.title-h4/title-h4.html +4 -5
- package/livingdocs/020.Text/060.quote-with-portrait/scss/general.scss +1 -0
- package/livingdocs/040.Media/010.table/ld-conf.json +1 -6
- package/livingdocs/040.Media/010.table/scss/general.scss +53 -1
- package/livingdocs/040.Media/010.table/table.html +11 -9
- package/livingdocs/040.Media/010.table/table.vue +0 -1
- package/livingdocs/040.Media/030.video/ld-conf.json +3 -0
- package/livingdocs/040.Media/030.video/scss/general.scss +4 -0
- package/livingdocs/040.Media/030.video/scss/web.scss +23 -32
- package/livingdocs/040.Media/030.video/video.html +13 -12
- package/livingdocs/040.Media/030.video/video.vue +53 -0
- package/livingdocs/060.Buttons/010.button-container/button-container.html +5 -0
- package/livingdocs/060.Buttons/010.button-container/ld-conf.json +19 -0
- package/livingdocs/060.Buttons/010.button-container/properties.json +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/app.scss +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/editor.scss +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/general.scss +6 -0
- package/livingdocs/060.Buttons/010.button-container/scss/pdf.scss +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/web.scss +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/word.scss +1 -0
- package/livingdocs/060.Buttons/010.button-container/scss/xbrl.scss +2 -0
- package/livingdocs/060.Buttons/020.button/button.html +4 -0
- package/livingdocs/060.Buttons/020.button/ld-conf.json +15 -0
- package/livingdocs/060.Buttons/020.button/scss/app.scss +1 -0
- package/livingdocs/060.Buttons/020.button/scss/editor.scss +1 -0
- package/livingdocs/060.Buttons/020.button/scss/general.scss +89 -0
- package/livingdocs/060.Buttons/020.button/scss/pdf.scss +1 -0
- package/livingdocs/060.Buttons/020.button/scss/web.scss +1 -0
- package/livingdocs/060.Buttons/020.button/scss/word.scss +1 -0
- package/livingdocs/060.Buttons/020.button/scss/xbrl.scss +3 -0
- package/livingdocs/090.Signatures/010.signature-container/scss/web.scss +1 -0
- package/livingdocs/110.PDF/040.pdf-chapter-title/scss/editor.scss +0 -6
- package/livingdocs/999.Properties/hide-quote-characters/properties.json +1 -1
- package/livingdocs/999.Properties/icon/properties.json +19 -0
- package/livingdocs/999.Properties/reverse/properties.json +7 -0
- package/package.json +1 -1
- package/plugins/viteSrlPlugin.d.ts +5 -1
- package/plugins/viteSrlPlugin.js +4 -1
- package/scripts/build.js +117 -33
- package/srl/components/Srl/Category/Accordion/Content.vue +7 -1
- package/srl/components/Srl/Category/Accordion.vue +2 -1
- package/srl/components/Srl/Menu.vue +1 -0
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
@use "web";
|
|
3
3
|
@use 'assets/scss/placeholders';
|
|
4
4
|
|
|
5
|
-
.srl-pdf-chapter-title {
|
|
6
|
-
border-bottom: 1px solid #{srl.colors-primary-1000()};
|
|
7
|
-
@include srl.spacer-padding-block(200);
|
|
8
|
-
@extend %srl-grid-base;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
5
|
.srl-pdf-chapter-title__text {
|
|
12
6
|
@extend %srl-regular-width;
|
|
13
7
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"icon": {
|
|
3
|
+
"label": "Icon",
|
|
4
|
+
"type": "select",
|
|
5
|
+
"options": [
|
|
6
|
+
{
|
|
7
|
+
"caption": "None"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"caption": "Arrow right",
|
|
11
|
+
"value": "srl-icon-arrow-right-after"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"caption": "Download",
|
|
15
|
+
"value": "srl-icon-download-after"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
package/package.json
CHANGED
package/plugins/viteSrlPlugin.js
CHANGED
|
@@ -125,7 +125,7 @@ function triggerAction(callback) {
|
|
|
125
125
|
}, 200);
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
function viteSrlPlugin() {
|
|
129
129
|
return {
|
|
130
130
|
name: 'vite-srl-plugin',
|
|
131
131
|
config(config) {
|
|
@@ -251,3 +251,6 @@ export default function viteSrlPlugin() {
|
|
|
251
251
|
},
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
+
|
|
255
|
+
export default viteSrlPlugin;
|
|
256
|
+
export { viteSrlPlugin };
|
package/scripts/build.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { join } from 'node:path/posix';
|
|
1
|
+
import { join, relative } from 'node:path/posix';
|
|
2
2
|
import {
|
|
3
3
|
statSync,
|
|
4
4
|
writeFileSync,
|
|
@@ -244,22 +244,6 @@ async function zipLdd() {
|
|
|
244
244
|
console.log("\n\nCreate zip file for LDD");
|
|
245
245
|
await checkFolders();
|
|
246
246
|
|
|
247
|
-
const lddPdfDir = join(folders.srlOutput, 'ldd', 'pdf');
|
|
248
|
-
|
|
249
|
-
try {
|
|
250
|
-
const pdfDir = join(folders.srlOutput, 'pdf');
|
|
251
|
-
statSync(pdfDir);
|
|
252
|
-
await cpSync(pdfDir, lddPdfDir, { recursive: true });
|
|
253
|
-
console.log('PDF folder has been copied to ' + lddPdfDir);
|
|
254
|
-
} catch (e) {}
|
|
255
|
-
|
|
256
|
-
try {
|
|
257
|
-
const customerDir = join(folders.root, 'pdf', 'customer');
|
|
258
|
-
statSync(customerDir);
|
|
259
|
-
await cpSync(customerDir, lddPdfDir, { recursive: true });
|
|
260
|
-
console.log('Contents of pdf/customer have been copied to ' + lddPdfDir);
|
|
261
|
-
} catch (e) {}
|
|
262
|
-
|
|
263
247
|
const archiver = require('archiver');
|
|
264
248
|
const output = createWriteStream(join(outputPath, 'design.zip'));
|
|
265
249
|
const archive = archiver('zip', {
|
|
@@ -472,21 +456,6 @@ async function buildLdd(version) {
|
|
|
472
456
|
}
|
|
473
457
|
}
|
|
474
458
|
},
|
|
475
|
-
resolve: {
|
|
476
|
-
alias: {
|
|
477
|
-
'~': folders.root,
|
|
478
|
-
'@': folders.srlSrc,
|
|
479
|
-
'#components': folders.srlComponents,
|
|
480
|
-
'#composables': folders.srlComposables,
|
|
481
|
-
'#plugins': folders.srlPlugins,
|
|
482
|
-
'#types': folders.srlTypes,
|
|
483
|
-
'#utils': folders.srlUtils,
|
|
484
|
-
'#imports': folders.srlImports,
|
|
485
|
-
'#ldd': folders.packageLd,
|
|
486
|
-
'assets': folders.srlAssets,
|
|
487
|
-
'srl': folders.srlSystem,
|
|
488
|
-
},
|
|
489
|
-
},
|
|
490
459
|
publicDir: false,
|
|
491
460
|
})
|
|
492
461
|
}
|
|
@@ -501,6 +470,7 @@ async function buildLdd(version) {
|
|
|
501
470
|
join(folders.root, 'livingdocs.config.json'),
|
|
502
471
|
join(folders.srlOutput, 'ldd', 'design.json'),
|
|
503
472
|
);
|
|
473
|
+
buildPdfCustomer()
|
|
504
474
|
});
|
|
505
475
|
} catch (e) {
|
|
506
476
|
console.error(e);
|
|
@@ -508,6 +478,121 @@ async function buildLdd(version) {
|
|
|
508
478
|
}
|
|
509
479
|
}
|
|
510
480
|
|
|
481
|
+
async function buildPdfCustomer() {
|
|
482
|
+
const lddPdfDir = join(folders.srlOutput, 'ldd', 'pdf');
|
|
483
|
+
const lddJson = await readLivingDocsJson();
|
|
484
|
+
|
|
485
|
+
try {
|
|
486
|
+
const pdfDir = join(folders.srlOutput, 'pdf');
|
|
487
|
+
statSync(pdfDir);
|
|
488
|
+
await cpSync(pdfDir, lddPdfDir, { recursive: true });
|
|
489
|
+
console.log('PDF folder has been copied to ' + lddPdfDir);
|
|
490
|
+
} catch (e) {
|
|
491
|
+
console.error(e)
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
try {
|
|
495
|
+
const customerDir = join(folders.root, 'pdf', 'customers');
|
|
496
|
+
statSync(customerDir);
|
|
497
|
+
const customerFolders = readdirSync(customerDir, { withFileTypes: true })
|
|
498
|
+
.filter(dirent => dirent.isDirectory())
|
|
499
|
+
.map(dirent => dirent.name);
|
|
500
|
+
|
|
501
|
+
try {
|
|
502
|
+
for (let i = 0; i < customerFolders.length; i++) {
|
|
503
|
+
const customer = customerFolders[i];
|
|
504
|
+
const customerFolder = join(customerDir, customer);
|
|
505
|
+
const customerTarget = join(lddPdfDir, customer);
|
|
506
|
+
|
|
507
|
+
const jsReferences = [
|
|
508
|
+
'pdf.js'
|
|
509
|
+
];
|
|
510
|
+
const cssReferences = [
|
|
511
|
+
'pdf.css'
|
|
512
|
+
];
|
|
513
|
+
|
|
514
|
+
try {
|
|
515
|
+
const scssPath = join(customerFolder, 'custom.ts');
|
|
516
|
+
statSync(scssPath);
|
|
517
|
+
const config = {
|
|
518
|
+
css: {
|
|
519
|
+
preprocessorOptions: {
|
|
520
|
+
scss: {
|
|
521
|
+
api: 'modern-compiler',
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
base: './',
|
|
526
|
+
build: {
|
|
527
|
+
outDir: customerTarget,
|
|
528
|
+
lib: {
|
|
529
|
+
fileName: 'custom',
|
|
530
|
+
entry: scssPath,
|
|
531
|
+
formats: ['es'],
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
publicDir: false,
|
|
535
|
+
};
|
|
536
|
+
await viteBuild(config)
|
|
537
|
+
|
|
538
|
+
try {
|
|
539
|
+
statSync(join(customerTarget, 'custom.js'));
|
|
540
|
+
jsReferences.push(`${customer}/custom.js`);
|
|
541
|
+
} catch (e) {}
|
|
542
|
+
|
|
543
|
+
try {
|
|
544
|
+
statSync(join(customerTarget, 'custom.css'));
|
|
545
|
+
cssReferences.push(`${customer}/custom.css`);
|
|
546
|
+
} catch (e) {}
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
} catch (e) {}
|
|
550
|
+
|
|
551
|
+
const files = await glob(join(customerFolder, '**', '*'), { withFileTypes: true });
|
|
552
|
+
for (const file of files) {
|
|
553
|
+
if (file.isFile()) {
|
|
554
|
+
if (!file.name.endsWith('.scss') && !file.name.endsWith('.ts') && !file.name.endsWith('.tsx')) {
|
|
555
|
+
const from = file.fullpath();
|
|
556
|
+
const to = join(customerTarget, relative(customerFolder, file.fullpath()));
|
|
557
|
+
await cpSync(from, to);
|
|
558
|
+
console.log(`Copy /${relative(folders.root, from)} to /${relative(folders.root, to)}`);
|
|
559
|
+
}
|
|
560
|
+
if (file.name.endsWith('.css')) {
|
|
561
|
+
cssReferences.push(`${relative(customerDir, file.fullpath())}`);
|
|
562
|
+
}
|
|
563
|
+
if (file.name.endsWith('.js')) {
|
|
564
|
+
jsReferences.push(`${relative(customerDir, file.fullpath())}`);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
const ns = `${nsWowInternalLddUrl}/${lddJson.name}/${lddJson.version}/pdf`;
|
|
570
|
+
|
|
571
|
+
const pdfConfig = [
|
|
572
|
+
'<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'
|
|
573
|
+
];
|
|
574
|
+
cssReferences.forEach( p => {
|
|
575
|
+
pdfConfig.push(` <userStyleSheets><uri>${ns}/${p}</uri></userStyleSheets>`);
|
|
576
|
+
})
|
|
577
|
+
|
|
578
|
+
jsReferences.forEach( p => {
|
|
579
|
+
pdfConfig.push(` <userScripts><uri>${ns}/${p}</uri></userScripts>`);
|
|
580
|
+
})
|
|
581
|
+
|
|
582
|
+
pdfConfig.push(`</configuration>`);
|
|
583
|
+
|
|
584
|
+
const pdfConfigPath = join(customerTarget, 'pdf-configuration.xml');
|
|
585
|
+
await writeFileSync(pdfConfigPath, pdfConfig.join('\n'));
|
|
586
|
+
console.log(`Create PDF configuration file /${relative(folders.root, pdfConfigPath)}`);
|
|
587
|
+
}
|
|
588
|
+
} catch (e) {
|
|
589
|
+
console.error(e)
|
|
590
|
+
}
|
|
591
|
+
} catch (e) {}
|
|
592
|
+
|
|
593
|
+
return true;
|
|
594
|
+
}
|
|
595
|
+
|
|
511
596
|
/**
|
|
512
597
|
* Builds the word document by compiling the HTML file using Vite and
|
|
513
598
|
* returns the result.
|
|
@@ -518,7 +603,6 @@ async function buildLdd(version) {
|
|
|
518
603
|
async function buildWord() {
|
|
519
604
|
console.log("\n\nBuild Word");
|
|
520
605
|
await checkFolders();
|
|
521
|
-
let configFile = false;
|
|
522
606
|
|
|
523
607
|
const config = {
|
|
524
608
|
css: {
|
|
@@ -57,7 +57,13 @@ onMounted(() => {
|
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
59
|
<template>
|
|
60
|
-
<div
|
|
60
|
+
<div
|
|
61
|
+
ref="rootEl"
|
|
62
|
+
:id="props.accordion.id"
|
|
63
|
+
:hidden="!props.accordion.state"
|
|
64
|
+
tabindex="-1"
|
|
65
|
+
@keydown.esc.stop.prevent="accordion.close()"
|
|
66
|
+
>
|
|
61
67
|
<slot/>
|
|
62
68
|
</div>
|
|
63
69
|
</template>
|
|
@@ -12,11 +12,12 @@ function toggle() {
|
|
|
12
12
|
|
|
13
13
|
function open() {
|
|
14
14
|
state.value = true
|
|
15
|
-
rootEl.value
|
|
15
|
+
rootEl.value?.querySelector<HTMLDivElement>(`#${id.value}`)?.focus()
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function close() {
|
|
19
19
|
state.value = false
|
|
20
|
+
rootEl.value?.querySelector<HTMLDivElement>(`[aria-controls="${id.value}"]`)?.focus()
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
const accordion = computed(() => {
|