@simple-reporting/base 1.0.33 → 1.0.35
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/package.json +2 -1
- package/dev/src/assets/scss/app.scss +5 -0
- package/dev/src/assets/scss/pdf.scss +1 -1
- package/dev/vite.config.ts +4 -1
- package/devTools/SrlDevTools.vue +234 -0
- package/devTools/assets/Svg/Check.vue +7 -0
- package/devTools/assets/Svg/Close.vue +5 -0
- package/devTools/assets/Svg/Eye.vue +16 -0
- package/devTools/assets/Svg/Info.vue +7 -0
- package/devTools/assets/Svg/Settings.vue +5 -0
- package/devTools/assets/Svg/Uncheck.vue +7 -0
- package/devTools/box/Content.vue +93 -0
- package/devTools/components/BoxPanel.vue +23 -0
- package/devTools/components/Content.vue +17 -0
- package/devTools/config.ts +34 -0
- package/devTools/dialog/Colors.vue +33 -0
- package/devTools/dialog/Grid.vue +111 -0
- package/devTools/dialog/Settings.vue +62 -0
- package/devTools/dialog/Spacer.vue +110 -0
- package/devTools/dialog/ViewPort.vue +33 -0
- package/devTools/panel/Content.vue +50 -0
- package/devTools/settings.ts +28 -0
- package/devTools/utils/index.ts +7 -0
- package/devTools/utils/wheelResizeHandler.ts +19 -0
- package/livingdocs/010.Titles/020.title-h2/scss/general.scss +1 -16
- package/livingdocs/010.Titles/020.title-h2/scss/pdf.scss +16 -0
- package/livingdocs/010.Titles/020.title-h2/scss/web.scss +16 -0
- package/livingdocs/010.Titles/030.title-h3/scss/general.scss +0 -15
- package/livingdocs/010.Titles/030.title-h3/scss/pdf.scss +16 -0
- package/livingdocs/010.Titles/030.title-h3/scss/web.scss +16 -0
- package/livingdocs/010.Titles/040.title-h4/scss/general.scss +0 -15
- package/livingdocs/010.Titles/040.title-h4/scss/pdf.scss +16 -0
- package/livingdocs/010.Titles/040.title-h4/scss/web.scss +16 -0
- package/livingdocs/040.Media/010.table/scss/general.scss +6 -3
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/general.scss +6 -1
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/pdf.scss +6 -0
- package/package.json +8 -3
- package/plugins/viteSrlPlugin.js +19 -6
- package/scripts/build.d.ts +2 -0
- package/scripts/build.js +68 -3
- package/scripts/css/stripMediaFromCss.d.ts +17 -0
- package/scripts/css/stripMediaFromCss.js +147 -0
- package/scripts/vue/components.js +9 -2
- package/srl/.srl/App.vue +7 -1
- package/srl/.srl/components/Srl/Article/Accordion.vue +1 -0
- package/srl/.srl/components/Srl/Article/Root.vue +4 -4
- package/srl/.srl/components/Srl/Category/Accordion/Toggle.vue +2 -1
- package/srl/.srl/components/Srl/Menu/Item.vue +58 -24
- package/srl/.srl/components/Srl/Menu.vue +43 -17
- package/srl/.srl/composables/config.ts +4 -3
- package/srl/.srl/composables/index.ts +3 -0
- package/srl/.srl/composables/menu.ts +6 -3
- package/srl/.srl/composables/srlConfig.ts +3 -0
- package/srl/.srl/types/global.d.ts +11 -0
- package/srl/.srl/types/nswow.d.ts +5 -0
- package/srl/.srl/utils/html.ts +2 -2
- package/srl/.srl/utils/index.ts +27 -25
- package/srl/.srl/utils/object.ts +60 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { config, sizeOptions } from '../config.ts'
|
|
3
|
+
import { settings } from '../settings.ts'
|
|
4
|
+
|
|
5
|
+
import { NSelect, NSlider, NSwitch, NTable, NText, NFlex } from 'naive-ui'
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
|
|
10
|
+
<NTable>
|
|
11
|
+
<tbody>
|
|
12
|
+
<tr>
|
|
13
|
+
<td>
|
|
14
|
+
<NText strong>Dark Mode</NText>
|
|
15
|
+
</td>
|
|
16
|
+
<td>
|
|
17
|
+
<NSwitch v-model:value="settings.darkMode" />
|
|
18
|
+
</td>
|
|
19
|
+
</tr>
|
|
20
|
+
<tr>
|
|
21
|
+
<td>
|
|
22
|
+
<NText strong>Size</NText>
|
|
23
|
+
</td>
|
|
24
|
+
<td>
|
|
25
|
+
<NSelect
|
|
26
|
+
v-model:value="settings.size"
|
|
27
|
+
size="small"
|
|
28
|
+
:options="sizeOptions.map(s => ({ label: s, value: s }))"
|
|
29
|
+
/>
|
|
30
|
+
</td>
|
|
31
|
+
</tr>
|
|
32
|
+
<tr>
|
|
33
|
+
<td>
|
|
34
|
+
<NText strong>Position</NText>
|
|
35
|
+
</td>
|
|
36
|
+
<td>
|
|
37
|
+
<NSelect
|
|
38
|
+
v-model:value="settings.position"
|
|
39
|
+
size="small"
|
|
40
|
+
:options="config.positions.map(p => ({ label: p, value: p }))"
|
|
41
|
+
/>
|
|
42
|
+
</td>
|
|
43
|
+
</tr>
|
|
44
|
+
<tr>
|
|
45
|
+
<td>
|
|
46
|
+
<NText strong>Opacity</NText>
|
|
47
|
+
</td>
|
|
48
|
+
<td>
|
|
49
|
+
<NFlex justify="center">
|
|
50
|
+
<NText v-text="settings.opacity"/>
|
|
51
|
+
</NFlex>
|
|
52
|
+
<NSlider
|
|
53
|
+
v-model:value="settings.opacity"
|
|
54
|
+
:min="0.1"
|
|
55
|
+
:max="1"
|
|
56
|
+
:step="0.1"
|
|
57
|
+
/>
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</tbody>
|
|
61
|
+
</NTable>
|
|
62
|
+
</template>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { NGrid, NGridItem, NH2, NTable } from 'naive-ui'
|
|
3
|
+
import { useSrlConfig } from '#composables'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
|
|
6
|
+
const srlConfig = useSrlConfig()
|
|
7
|
+
|
|
8
|
+
type SpacerItem = {
|
|
9
|
+
name: string
|
|
10
|
+
size: number | string
|
|
11
|
+
alias: string | null
|
|
12
|
+
only?: SpacerItemMedia[]
|
|
13
|
+
up?: SpacerItemMedia[]
|
|
14
|
+
down?: SpacerItemMedia[]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type SpacerItemMedia = {
|
|
18
|
+
name: string
|
|
19
|
+
size: number | string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const spacerView = computed<SpacerItem[]>(() => {
|
|
23
|
+
const res = []
|
|
24
|
+
for (const [key, item] of Object.entries(srlConfig.value.spacer.spacer)) {
|
|
25
|
+
const i: SpacerItem = {
|
|
26
|
+
name: key,
|
|
27
|
+
size: item.size,
|
|
28
|
+
alias: item.alias??null,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (item.media) {
|
|
32
|
+
for (const [media, value] of Object.entries(item.media)) {
|
|
33
|
+
if (['up', 'down'].includes(media)) {
|
|
34
|
+
for (const [m, s] of Object.entries(value as object)) {
|
|
35
|
+
if (!i[media]) { i[media] = [] }
|
|
36
|
+
i[media].push({
|
|
37
|
+
name: m,
|
|
38
|
+
size: s.size ?? s,
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
if (!i.only) { i.only = [] }
|
|
43
|
+
i.only.push({
|
|
44
|
+
name: media,
|
|
45
|
+
size: value.size ?? value,
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
res.push(i)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return res;
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<template>
|
|
60
|
+
<NGrid cols="1 s:2 m:3 l:4" responsive="screen" x-gap="20" y-gap="20">
|
|
61
|
+
<NGridItem v-for="item in spacerView" :key="item.name">
|
|
62
|
+
<NH2>
|
|
63
|
+
{{item.name}}
|
|
64
|
+
<template v-if="item.alias">( {{item.alias}} )</template>
|
|
65
|
+
</NH2>
|
|
66
|
+
<NTable striped>
|
|
67
|
+
<tbody>
|
|
68
|
+
<tr>
|
|
69
|
+
<td v-text="'size'"/>
|
|
70
|
+
<td colspan="2" v-text="typeof item.size === 'number' ? item.size + 'px / ' + (item.size / 16) + 'rem' : item.size" />
|
|
71
|
+
</tr>
|
|
72
|
+
<template v-if="item.only">
|
|
73
|
+
<template v-for="(only, index) in item.only">
|
|
74
|
+
<tr>
|
|
75
|
+
<td class="v-top" v-if="index === 0" :rowspan="item.only.length" v-text="'only'"/>
|
|
76
|
+
<td v-text="only.name"/>
|
|
77
|
+
<td v-text="typeof only.size === 'number' ? only.size + 'px / ' + (only.size / 16) + 'rem' : only.size" />
|
|
78
|
+
</tr>
|
|
79
|
+
</template>
|
|
80
|
+
</template>
|
|
81
|
+
<template v-if="item.up">
|
|
82
|
+
<template v-for="(up, index) in item.up">
|
|
83
|
+
<tr>
|
|
84
|
+
<td class="v-top" v-if="index === 0" :rowspan="item.up.length" v-text="'up'"/>
|
|
85
|
+
<td v-text="up.name"/>
|
|
86
|
+
<td v-text="typeof up.size === 'number' ? up.size + 'px / ' + (up.size / 16) + 'rem' : up.size" />
|
|
87
|
+
</tr>
|
|
88
|
+
</template>
|
|
89
|
+
</template>
|
|
90
|
+
<template v-if="item.down">
|
|
91
|
+
<template v-for="(down, index) in item.down">
|
|
92
|
+
<tr>
|
|
93
|
+
<td class="v-top" v-if="index === 0" :rowspan="item.down.length" v-text="'down'"/>
|
|
94
|
+
<td v-text="down.name"/>
|
|
95
|
+
<td v-text="typeof down.size === 'number' ? down.size + 'px / ' + (down.size / 16) + 'rem' : down.size" />
|
|
96
|
+
</tr>
|
|
97
|
+
</template>
|
|
98
|
+
</template>
|
|
99
|
+
</tbody>
|
|
100
|
+
</NTable>
|
|
101
|
+
</NGridItem>
|
|
102
|
+
|
|
103
|
+
</NGrid>
|
|
104
|
+
</template>
|
|
105
|
+
|
|
106
|
+
<style scoped lang="scss">
|
|
107
|
+
.v-top {
|
|
108
|
+
vertical-align: top;
|
|
109
|
+
}
|
|
110
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useViewPort, useSrlConfig } from '#composables'
|
|
3
|
+
import { NTable, NH2, NText } from 'naive-ui'
|
|
4
|
+
|
|
5
|
+
const srlConfig = useSrlConfig()
|
|
6
|
+
const viewPort = useViewPort()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<NTable striped>
|
|
11
|
+
<tbody>
|
|
12
|
+
<tr>
|
|
13
|
+
<td>window.innerWidth</td>
|
|
14
|
+
<td v-text="viewPort.innerWidth" />
|
|
15
|
+
</tr>
|
|
16
|
+
<tr>
|
|
17
|
+
<td>ViewPort</td>
|
|
18
|
+
<td v-text="viewPort.viewPort" />
|
|
19
|
+
</tr>
|
|
20
|
+
</tbody>
|
|
21
|
+
</NTable>
|
|
22
|
+
<NH2>Breakpoints</NH2>
|
|
23
|
+
<NTable striped>
|
|
24
|
+
<tbody>
|
|
25
|
+
<tr v-for="(value, breakpoint) in srlConfig.grid.breakpoints" :key="breakpoint">
|
|
26
|
+
<td>
|
|
27
|
+
<NText strong v-text="breakpoint" :type="breakpoint === viewPort.viewPort?'error':'default'"></NText>
|
|
28
|
+
</td>
|
|
29
|
+
<td v-text="value" />
|
|
30
|
+
</tr>
|
|
31
|
+
</tbody>
|
|
32
|
+
</NTable>
|
|
33
|
+
</template>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { settings } from '../settings.ts'
|
|
3
|
+
import { NButton, NIcon } from 'naive-ui'
|
|
4
|
+
import { SettingsOutline, Eye, EyeOff } from '@vicons/ionicons5'
|
|
5
|
+
|
|
6
|
+
function toggleActive() {
|
|
7
|
+
settings.value.active = !settings.value.active
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const dialogContent = defineModel('dialogContent', {
|
|
11
|
+
type: String as () => SrlDevToolsDialog,
|
|
12
|
+
default: null
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
function dialogToggle(target: SrlDevToolsDialog) {
|
|
16
|
+
dialogContent.value = dialogContent.value === target ? null : target
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
|
|
22
|
+
<NButton
|
|
23
|
+
v-if="settings.active"
|
|
24
|
+
quaternary
|
|
25
|
+
circle
|
|
26
|
+
size="tiny"
|
|
27
|
+
@click="dialogToggle('settings')"
|
|
28
|
+
>
|
|
29
|
+
<template #icon>
|
|
30
|
+
<NIcon :component="SettingsOutline" />
|
|
31
|
+
</template>
|
|
32
|
+
</NButton>
|
|
33
|
+
|
|
34
|
+
<NButton
|
|
35
|
+
quaternary
|
|
36
|
+
circle
|
|
37
|
+
size="tiny"
|
|
38
|
+
@click="toggleActive"
|
|
39
|
+
:type="settings.active?'default':'error'"
|
|
40
|
+
>
|
|
41
|
+
<template #icon>
|
|
42
|
+
<NIcon :component="settings.active?Eye:EyeOff" />
|
|
43
|
+
</template>
|
|
44
|
+
</NButton>
|
|
45
|
+
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<style scoped lang="scss">
|
|
49
|
+
|
|
50
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { computed, ref, watch } from 'vue'
|
|
2
|
+
import { config } from './config'
|
|
3
|
+
|
|
4
|
+
export const settings = ref<SrlDevToolsSettings>(config.value.defaultSettings)
|
|
5
|
+
|
|
6
|
+
const storedSettings = localStorage.getItem(config.value.settingsNamespace)
|
|
7
|
+
if (storedSettings) {
|
|
8
|
+
try {
|
|
9
|
+
settings.value = JSON.parse(storedSettings)
|
|
10
|
+
} catch {}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
watch(
|
|
14
|
+
settings.value,
|
|
15
|
+
(newSettings) => {
|
|
16
|
+
localStorage.setItem(config.value.settingsNamespace, JSON.stringify(newSettings))
|
|
17
|
+
},
|
|
18
|
+
{ immediate: true }
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
export const isDefaultSettings = computed(() => {
|
|
22
|
+
return JSON.stringify(settings.value) === JSON.stringify(config.value.defaultSettings)
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
settings,
|
|
27
|
+
isDefaultSettings,
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { settings } from '../settings.ts'
|
|
2
|
+
import { sizeOptions } from '../config.ts'
|
|
3
|
+
|
|
4
|
+
export function wheelResizeHandler(e: WheelEvent) {
|
|
5
|
+
if (!settings.value.active || !settings.value.mouseResize) return
|
|
6
|
+
e.stopPropagation()
|
|
7
|
+
e.preventDefault()
|
|
8
|
+
const options = sizeOptions.value
|
|
9
|
+
const currentIdx = options.indexOf(settings.value.size)
|
|
10
|
+
if (e.deltaY > 0 && currentIdx < options.length - 1) {
|
|
11
|
+
settings.value.size = options[currentIdx + 1]
|
|
12
|
+
} else if (e.deltaY < 0 && currentIdx > 0) {
|
|
13
|
+
settings.value.size = options[currentIdx - 1]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
wheelResizeHandler,
|
|
19
|
+
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
@use 'srl';
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
|
|
4
|
-
$number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
|
|
5
2
|
|
|
6
3
|
.srl-title-h2 {
|
|
7
4
|
@include srl.typography-title-h2();
|
|
@@ -21,16 +18,4 @@ $number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
|
|
|
21
18
|
|
|
22
19
|
.srl-title-h2__number-text-container {
|
|
23
20
|
display: flex;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.srl-title-h2__number {
|
|
27
|
-
width: $number-width;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.srl-title-h2__number + .srl-title-h2__text {
|
|
31
|
-
width: calc(100% - #{$number-width});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.srl-title-h2__number:empty + .srl-title-h2__text {
|
|
35
|
-
width: 100%;
|
|
36
|
-
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use 'srl';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
|
|
4
|
+
$number-width: srl.spacer-get(map.get(srl.$meta, title, number-width-pdf));
|
|
5
|
+
|
|
6
|
+
.srl-title-h2__number {
|
|
7
|
+
width: $number-width;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.srl-title-h2__number + .srl-title-h2__text {
|
|
11
|
+
width: calc(100% - #{$number-width});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.srl-title-h2__number:empty + .srl-title-h2__text {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use 'srl';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
|
|
4
|
+
$number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
|
|
5
|
+
|
|
6
|
+
.srl-title-h2__number {
|
|
7
|
+
width: $number-width;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.srl-title-h2__number + .srl-title-h2__text {
|
|
11
|
+
width: calc(100% - #{$number-width});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.srl-title-h2__number:empty + .srl-title-h2__text {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
@use 'srl';
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
|
|
4
|
-
$number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
|
|
5
2
|
|
|
6
3
|
.srl-title-h3 {
|
|
7
4
|
@include srl.typography-title-h3();
|
|
@@ -9,16 +6,4 @@ $number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
|
|
|
9
6
|
|
|
10
7
|
.srl-title-h3__number-text-container {
|
|
11
8
|
display: flex;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.srl-title-h3__number {
|
|
15
|
-
width: $number-width;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.srl-title-h3__number + .srl-title-h3__text {
|
|
19
|
-
width: calc(100% - #{$number-width});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.srl-title-h3__number:empty + .srl-title-h3__text {
|
|
23
|
-
width: 100%;
|
|
24
9
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use 'srl';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
|
|
4
|
+
$number-width: srl.spacer-get(map.get(srl.$meta, title, number-width-pdf));
|
|
5
|
+
|
|
6
|
+
.srl-title-h3__number {
|
|
7
|
+
width: $number-width;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.srl-title-h3__number + .srl-title-h3__text {
|
|
11
|
+
width: calc(100% - #{$number-width});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.srl-title-h3__number:empty + .srl-title-h3__text {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use 'srl';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
|
|
4
|
+
$number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
|
|
5
|
+
|
|
6
|
+
.srl-title-h3__number {
|
|
7
|
+
width: $number-width;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.srl-title-h3__number + .srl-title-h3__text {
|
|
11
|
+
width: calc(100% - #{$number-width});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.srl-title-h3__number:empty + .srl-title-h3__text {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
@use 'srl';
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
|
|
4
|
-
$number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
|
|
5
2
|
|
|
6
3
|
.srl-title-h4 {
|
|
7
4
|
@include srl.typography-title-h4();
|
|
@@ -9,16 +6,4 @@ $number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
|
|
|
9
6
|
|
|
10
7
|
.srl-title-h4__number-text-container {
|
|
11
8
|
display: flex;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.srl-title-h4__number {
|
|
15
|
-
width: $number-width;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.srl-title-h4__number + .srl-title-h4__text {
|
|
19
|
-
width: calc(100% - #{$number-width});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.srl-title-h4__number:empty + .srl-title-h4__text {
|
|
23
|
-
width: 100%;
|
|
24
9
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use 'srl';
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
$number-width: srl.spacer-get(map.get(srl.$meta, title, number-width-pdf));
|
|
5
|
+
|
|
6
|
+
.srl-title-h4__number {
|
|
7
|
+
width: $number-width;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.srl-title-h4__number + .srl-title-h4__text {
|
|
11
|
+
width: calc(100% - #{$number-width});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.srl-title-h4__number:empty + .srl-title-h4__text {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use 'srl';
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
$number-width: srl.spacer-get(map.get(srl.$meta, title, number-width));
|
|
5
|
+
|
|
6
|
+
.srl-title-h4__number {
|
|
7
|
+
width: $number-width;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.srl-title-h4__number + .srl-title-h4__text {
|
|
11
|
+
width: calc(100% - #{$number-width});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.srl-title-h4__number:empty + .srl-title-h4__text {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
@@ -270,15 +270,18 @@ td {
|
|
|
270
270
|
text-align: right;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
&[class*=
|
|
273
|
+
&[class*='srl-vertical-top'],
|
|
274
|
+
&[class*='vatop'] {
|
|
274
275
|
vertical-align: top;
|
|
275
276
|
}
|
|
276
277
|
|
|
277
|
-
&[class*=
|
|
278
|
+
&[class*='srl-vertical-middle'],
|
|
279
|
+
&[class*='vamiddle'] {
|
|
278
280
|
vertical-align: middle;
|
|
279
281
|
}
|
|
280
282
|
|
|
281
|
-
&[class*=
|
|
283
|
+
&[class*='srl-vertical-bottom'],
|
|
284
|
+
&[class*='vabottom'] {
|
|
282
285
|
vertical-align: bottom;
|
|
283
286
|
}
|
|
284
287
|
|
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
width: srl.system-size-unit(24pt);
|
|
19
19
|
|
|
20
20
|
&:after {
|
|
21
|
-
|
|
21
|
+
.srl-pdf-toc__link:not([href]) & {
|
|
22
|
+
content: "No link provided";
|
|
23
|
+
color: #FF0000;
|
|
24
|
+
display: inline-block;
|
|
25
|
+
margin-left: srl.spacer-get(100)
|
|
26
|
+
}
|
|
22
27
|
}
|
|
23
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simple-reporting/base",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "Manage srl templates, build and publish",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/mmssolutionsio/simple-reporting-library"
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"main": "cli.js",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@kne/color-palette": "^0.1.0",
|
|
24
|
+
"@vicons/ionicons5": "^0.13.0",
|
|
24
25
|
"archiver": "^7.0.1",
|
|
25
26
|
"chalk": "^5.6.2",
|
|
26
27
|
"colors": "^1.4.0",
|
|
@@ -30,10 +31,14 @@
|
|
|
30
31
|
"fs": "^0.0.1-security",
|
|
31
32
|
"fs-extra": "^11.3.2",
|
|
32
33
|
"glob": "^10.4.5",
|
|
34
|
+
"native-ui": "^0.0.1",
|
|
35
|
+
"write-json": "^3.0.1"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
33
38
|
"modern-css-reset": "^1.4.0",
|
|
39
|
+
"naive-ui": "^2.43.2",
|
|
34
40
|
"node-html-parser": "^7.0.1",
|
|
35
|
-
"vite": "^6.3.6"
|
|
36
|
-
"write-json": "^3.0.1"
|
|
41
|
+
"vite": "^6.3.6"
|
|
37
42
|
},
|
|
38
43
|
"keywords": [
|
|
39
44
|
"scss",
|
package/plugins/viteSrlPlugin.js
CHANGED
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
map,
|
|
11
11
|
mapLdd,
|
|
12
12
|
mapJs,
|
|
13
|
+
generateUseSrlConfig,
|
|
14
|
+
mapIndexScss,
|
|
13
15
|
mapScss,
|
|
14
16
|
} from '../scripts/build.js';
|
|
15
17
|
import chalk from 'chalk';
|
|
@@ -121,6 +123,8 @@ async function startActions() {
|
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
await vueComponents();
|
|
126
|
+
await generateUseSrlConfig();
|
|
127
|
+
await mapIndexScss();
|
|
124
128
|
await beaver(0);
|
|
125
129
|
await map();
|
|
126
130
|
await mapJs();
|
|
@@ -174,6 +178,7 @@ function viteSrlPlugin() {
|
|
|
174
178
|
}
|
|
175
179
|
if (path.endsWith('/srl.config.json')) {
|
|
176
180
|
await updateNsWowJson();
|
|
181
|
+
await generateUseSrlConfig();
|
|
177
182
|
triggerAction(beaver);
|
|
178
183
|
}
|
|
179
184
|
});
|
|
@@ -196,14 +201,14 @@ function viteSrlPlugin() {
|
|
|
196
201
|
}
|
|
197
202
|
|
|
198
203
|
if (
|
|
199
|
-
path.includes('livingdocs') &&
|
|
204
|
+
path.includes('/livingdocs/') &&
|
|
200
205
|
(path.endsWith('/app.js') || path.endsWith('/app.ts'))
|
|
201
206
|
) {
|
|
202
207
|
triggerAction(mapJs);
|
|
203
208
|
}
|
|
204
209
|
|
|
205
210
|
if (
|
|
206
|
-
path.includes('livingdocs') &&
|
|
211
|
+
path.includes('/livingdocs/') &&
|
|
207
212
|
(path.endsWith('/properties.json') ||
|
|
208
213
|
path.endsWith('/properties.ts') ||
|
|
209
214
|
path.endsWith('/properties.js') ||
|
|
@@ -213,11 +218,15 @@ function viteSrlPlugin() {
|
|
|
213
218
|
}
|
|
214
219
|
|
|
215
220
|
if (
|
|
216
|
-
path.includes('src/components/') &&
|
|
221
|
+
path.includes('/src/components/') &&
|
|
217
222
|
path.endsWith('.vue')
|
|
218
223
|
) {
|
|
219
224
|
triggerAction(vueComponents);
|
|
220
225
|
}
|
|
226
|
+
|
|
227
|
+
if (path.includes('/src/assets/scss/placeholders/')) {
|
|
228
|
+
triggerAction(mapIndexScss);
|
|
229
|
+
}
|
|
221
230
|
});
|
|
222
231
|
|
|
223
232
|
server.watcher.on('unlink', (path) => {
|
|
@@ -238,14 +247,14 @@ function viteSrlPlugin() {
|
|
|
238
247
|
}
|
|
239
248
|
|
|
240
249
|
if (
|
|
241
|
-
path.includes('livingdocs') &&
|
|
250
|
+
path.includes('/livingdocs/') &&
|
|
242
251
|
(path.endsWith('/app.js') || path.endsWith('/app.ts'))
|
|
243
252
|
) {
|
|
244
253
|
triggerAction(mapJs);
|
|
245
254
|
}
|
|
246
255
|
|
|
247
256
|
if (
|
|
248
|
-
path.includes('livingdocs') &&
|
|
257
|
+
path.includes('/livingdocs/') &&
|
|
249
258
|
(path.endsWith('/properties.json') ||
|
|
250
259
|
path.endsWith('/properties.ts') ||
|
|
251
260
|
path.endsWith('/properties.js') ||
|
|
@@ -255,11 +264,15 @@ function viteSrlPlugin() {
|
|
|
255
264
|
}
|
|
256
265
|
|
|
257
266
|
if (
|
|
258
|
-
path.includes('src/components/') &&
|
|
267
|
+
path.includes('/src/components/') &&
|
|
259
268
|
path.endsWith('.vue')
|
|
260
269
|
) {
|
|
261
270
|
triggerAction(vueComponents);
|
|
262
271
|
}
|
|
272
|
+
|
|
273
|
+
if (path.includes('/src/assets/scss/placeholders/')) {
|
|
274
|
+
triggerAction(mapIndexScss);
|
|
275
|
+
}
|
|
263
276
|
});
|
|
264
277
|
},
|
|
265
278
|
};
|
package/scripts/build.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export function ddev(): Promise<void>;
|
|
|
22
22
|
* @throws {Error} If there is an error during the mapping process.
|
|
23
23
|
*/
|
|
24
24
|
export function map(): Promise<boolean>;
|
|
25
|
+
export function generateUseSrlConfig(): Promise<void>;
|
|
26
|
+
export function mapIndexScss(): Promise<boolean>;
|
|
25
27
|
/**
|
|
26
28
|
* Maps SCSS files and generates import statements for different output files.
|
|
27
29
|
*
|