@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
|
@@ -91,9 +91,12 @@ export default function useMenu(
|
|
|
91
91
|
try {
|
|
92
92
|
const route = useRoute();
|
|
93
93
|
menus[name] = computed<NsWowNavigationItem[]>(() => {
|
|
94
|
-
|
|
95
|
-
return
|
|
96
|
-
|
|
94
|
+
if (config.value.menus[config.value.locale][name]) {
|
|
95
|
+
return config.value.menus[config.value.locale][name].map((item) => {
|
|
96
|
+
return buildNav(item, route);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return [];
|
|
97
100
|
});
|
|
98
101
|
|
|
99
102
|
return menus[name];
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { App } from 'vue'
|
|
2
2
|
export {}
|
|
3
3
|
declare global {
|
|
4
|
+
type SrlDevToolsSettings = {
|
|
5
|
+
active: boolean
|
|
6
|
+
size: string
|
|
7
|
+
position: string
|
|
8
|
+
opacity: number
|
|
9
|
+
darkMode: boolean
|
|
10
|
+
overlay: {
|
|
11
|
+
grid: boolean
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
type SrlDevToolsDialog = null | "grid" | "spacer" | "typo" | "colors" | "settings" | "viewport"
|
|
4
15
|
interface Window {
|
|
5
16
|
app: App;
|
|
6
17
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
2
|
+
|
|
1
3
|
export {};
|
|
2
4
|
declare global {
|
|
3
5
|
type NsWowSettings = {
|
|
@@ -98,6 +100,9 @@ declare global {
|
|
|
98
100
|
icon?: string;
|
|
99
101
|
iconBefore?: string;
|
|
100
102
|
iconAfter?: string;
|
|
103
|
+
svg?: VNode | string;
|
|
104
|
+
svgBefore?: VNode | string;
|
|
105
|
+
svgAfter?: VNode | string;
|
|
101
106
|
img?: {
|
|
102
107
|
src: string;
|
|
103
108
|
alt?: string;
|
package/srl/.srl/utils/html.ts
CHANGED
|
@@ -77,8 +77,8 @@ export function prepareHtmlContent(text: string): string {
|
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
text = text.replace(
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
/<template-([a-z]+)([^>]*)>([\s\S]*?)<\/template-\1>/g,
|
|
81
|
+
(_match, name, attrs, content) => `<template ${attrs} #${name}>${content}</template>`
|
|
82
82
|
);
|
|
83
83
|
|
|
84
84
|
text = text.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi, (match, p1) => {
|
package/srl/.srl/utils/index.ts
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import { isFilePath, isRouterPath, isExternalPath } from './uri';
|
|
2
2
|
import { camelCase } from './string';
|
|
3
3
|
import { prepareHtmlContent } from './html';
|
|
4
|
+
import { objectDeepAssign } from './object'
|
|
4
5
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
usePageState,
|
|
7
|
+
clearPageState,
|
|
8
|
+
isDialogStored,
|
|
9
|
+
addDialogToStorage,
|
|
10
|
+
getDialogFromStorage,
|
|
11
|
+
getDialogStorage,
|
|
12
|
+
isAccordionAnchored,
|
|
13
|
+
setAccordionAnchored,
|
|
14
|
+
isMounted,
|
|
15
|
+
setMounted
|
|
15
16
|
} from './pageState.ts';
|
|
16
17
|
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
isFilePath,
|
|
20
|
+
isRouterPath,
|
|
21
|
+
isExternalPath,
|
|
22
|
+
camelCase,
|
|
23
|
+
prepareHtmlContent,
|
|
24
|
+
usePageState,
|
|
25
|
+
clearPageState,
|
|
26
|
+
isAccordionAnchored,
|
|
27
|
+
setAccordionAnchored,
|
|
28
|
+
isDialogStored,
|
|
29
|
+
addDialogToStorage,
|
|
30
|
+
getDialogFromStorage,
|
|
31
|
+
getDialogStorage,
|
|
32
|
+
setMounted,
|
|
33
|
+
isMounted,
|
|
34
|
+
objectDeepAssign
|
|
33
35
|
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
type PlainObject = Record<string, any>;
|
|
2
|
+
|
|
3
|
+
export function objectDeepAssign<T extends PlainObject>(target: T, source: Partial<T>): T {
|
|
4
|
+
// Defensive guard: API erwartet Root-Objekte, keine Arrays.
|
|
5
|
+
if (Array.isArray(target) || Array.isArray(source)) {
|
|
6
|
+
throw new TypeError('objectDeepAssign erwartet Objekte als Root-Parameter');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
for (const key in source) {
|
|
10
|
+
if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
|
|
11
|
+
|
|
12
|
+
const sourceValue = (source as PlainObject)[key];
|
|
13
|
+
const targetValue = (target as PlainObject)[key];
|
|
14
|
+
|
|
15
|
+
(target as PlainObject)[key] = mergeNode(targetValue, sourceValue);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return target;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function mergeNode(targetValue: any, sourceValue: any): any {
|
|
22
|
+
// Arrays nur intern behandeln (verschachtelte Knoten)
|
|
23
|
+
if (Array.isArray(sourceValue)) {
|
|
24
|
+
const targetArr = Array.isArray(targetValue) ? targetValue : [];
|
|
25
|
+
return mergeArray(targetArr, sourceValue);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Plain Objects rekursiv mergen
|
|
29
|
+
if (isPlainObject(sourceValue)) {
|
|
30
|
+
const base = isPlainObject(targetValue) ? targetValue : {};
|
|
31
|
+
return objectDeepAssign(base, sourceValue);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Primitive / null / Funktionen etc. überschreiben
|
|
35
|
+
return sourceValue;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function mergeArray(targetArr: any[], sourceArr: any[]): any[] {
|
|
39
|
+
// Vereint beide Längen: neue source-Elemente kommen dazu,
|
|
40
|
+
// bestehende target-Reste bleiben erhalten.
|
|
41
|
+
const maxLen = Math.max(targetArr.length, sourceArr.length);
|
|
42
|
+
const result = new Array(maxLen);
|
|
43
|
+
|
|
44
|
+
for (let i = 0; i < maxLen; i++) {
|
|
45
|
+
const hasSource = i < sourceArr.length;
|
|
46
|
+
|
|
47
|
+
if (!hasSource) {
|
|
48
|
+
result[i] = targetArr[i];
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
result[i] = mergeNode(targetArr[i], sourceArr[i]);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function isPlainObject(value: unknown): value is PlainObject {
|
|
59
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
60
|
+
}
|