@timus-networks/theme 2.4.41 → 2.4.43
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/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/development/example.checkbox.vue.d.ts +5 -4
- package/dist/runtime/public/scss/element-plus/color/index.scss +4 -5
- package/dist/runtime/public/scss/element-plus/mixins/_var.scss +1 -6
- package/dist/runtime/public/scss/element-plus/mixins/mixins.scss +5 -2
- package/package.json +1 -1
- package/dist/runtime/components/production/timus-breadcrumb-documentation.md +0 -72
- package/dist/runtime/components/production/timus-breadcrumb.vue +0 -159
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -11,7 +11,7 @@ const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
|
11
11
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
12
12
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
13
13
|
const name = "@timus-networks/theme";
|
|
14
|
-
const version = "2.4.
|
|
14
|
+
const version = "2.4.43";
|
|
15
15
|
const description = "A comprehensive Nuxt.js module providing a tailored theme experience with integrated TailwindCSS support for applications.";
|
|
16
16
|
const type = "module";
|
|
17
17
|
const exports = {
|
|
@@ -253,6 +253,10 @@ declare global {
|
|
|
253
253
|
type __VLS_PrettifyGlobal<T> = {
|
|
254
254
|
[K in keyof T]: T[K];
|
|
255
255
|
} & {};
|
|
256
|
+
type __VLS_PickFunctionalComponentCtx<T, K> = NonNullable<__VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends {
|
|
257
|
+
__ctx?: infer Ctx;
|
|
258
|
+
} ? Ctx : never : any, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any>>;
|
|
259
|
+
type __VLS_UseTemplateRef<T> = Readonly<import('vue').ShallowRef<T | null>>;
|
|
256
260
|
function __VLS_getVForSourceType(source: number): [number, number, number][];
|
|
257
261
|
function __VLS_getVForSourceType(source: string): [string, number, number][];
|
|
258
262
|
function __VLS_getVForSourceType<T extends any[]>(source: T): [
|
|
@@ -285,7 +289,7 @@ declare global {
|
|
|
285
289
|
][];
|
|
286
290
|
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
|
|
287
291
|
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
|
|
288
|
-
function
|
|
292
|
+
function __VLS_asFunctionalDirective<T>(dir: T): T extends import('vue').ObjectDirective ? NonNullable<T['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']> : T extends (...args: any) => any ? T : __VLS_unknownDirective;
|
|
289
293
|
function __VLS_withScope<T, K>(ctx: T, scope: K): ctx is T & K;
|
|
290
294
|
function __VLS_makeOptional<T>(t: T): {
|
|
291
295
|
[K in keyof T]?: T[K];
|
|
@@ -319,9 +323,6 @@ declare global {
|
|
|
319
323
|
};
|
|
320
324
|
function __VLS_elementAsFunction<T>(tag: T, endTag?: T): (_: T & Record<string, unknown>) => void;
|
|
321
325
|
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
|
|
322
|
-
function __VLS_pickFunctionalComponentCtx<T, K>(comp: T, compInstance: K): NonNullable<__VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends {
|
|
323
|
-
__ctx?: infer Ctx;
|
|
324
|
-
} ? Ctx : never : any, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any>>;
|
|
325
326
|
function __VLS_normalizeSlot<S>(s: S): S extends () => infer R ? (props: {}) => R : S;
|
|
326
327
|
function __VLS_tryAsConstant<const T>(t: T): T;
|
|
327
328
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
2
|
@use 'sass:string';
|
|
3
|
-
@use 'sass:math';
|
|
4
3
|
|
|
5
4
|
@function rgb2hex($color) {
|
|
6
5
|
@return string.unquote('#' + #{string.slice(color.ie-hex-str($color), 4)});
|
|
@@ -8,11 +7,11 @@
|
|
|
8
7
|
|
|
9
8
|
// rgba color above solid color
|
|
10
9
|
@function mix-overlay-color($upper, $lower) {
|
|
11
|
-
$opacity: color.
|
|
10
|
+
$opacity: color.alpha($upper);
|
|
12
11
|
|
|
13
|
-
$red:
|
|
14
|
-
$green:
|
|
15
|
-
$blue:
|
|
12
|
+
$red: color.channel($upper, 'red') * $opacity + color.channel($lower, 'red') * (1 - $opacity);
|
|
13
|
+
$green: color.channel($upper, 'green') * $opacity + color.channel($lower, 'green') * (1 - $opacity);
|
|
14
|
+
$blue: color.channel($upper, 'blue') * $opacity + color.channel($lower, 'blue') * (1 - $opacity);
|
|
16
15
|
|
|
17
16
|
@return rgb2hex(rgb($red, $green, $blue));
|
|
18
17
|
}
|
|
@@ -45,12 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
@mixin set-css-color-rgb($type) {
|
|
47
47
|
$color: map.get($colors, $type, 'base');
|
|
48
|
-
@include set-css-var-value(
|
|
49
|
-
('color', $type, 'rgb'),
|
|
50
|
-
#{color.channel($color, 'red', $space: rgb),
|
|
51
|
-
color.channel($color, 'green', $space: rgb),
|
|
52
|
-
color.channel($color, 'blue', $space: rgb)}
|
|
53
|
-
);
|
|
48
|
+
@include set-css-var-value(('color', $type, 'rgb'), #{color.channel($color, 'red'), color.channel($color, 'green'), color.channel($color, 'blue')});
|
|
54
49
|
}
|
|
55
50
|
|
|
56
51
|
// generate css var from existing css var
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@use 'sass:string';
|
|
3
1
|
@use 'function' as *;
|
|
4
2
|
@use '../common/var' as *;
|
|
5
3
|
// forward mixins
|
|
@@ -7,6 +5,11 @@
|
|
|
7
5
|
@forward 'function';
|
|
8
6
|
@forward '_var';
|
|
9
7
|
@use 'config' as *;
|
|
8
|
+
@use 'sass:string';
|
|
9
|
+
@use 'sass:map';
|
|
10
|
+
|
|
11
|
+
$B: null;
|
|
12
|
+
$E: null;
|
|
10
13
|
|
|
11
14
|
// Break-points
|
|
12
15
|
@mixin res($key, $map: $breakpoints) {
|
package/package.json
CHANGED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Path Array Documentation
|
|
2
|
-
|
|
3
|
-
This document describes the `path` array, which defines routing and navigation rules for a web application.
|
|
4
|
-
|
|
5
|
-
## Structure
|
|
6
|
-
|
|
7
|
-
Each object in the `path` array typically contains the following properties:
|
|
8
|
-
|
|
9
|
-
- `regex`: A regular expression to match URL paths
|
|
10
|
-
- `label`: A text label (usually a translation key) for the path
|
|
11
|
-
- `path` (optional): A redirect path or default path
|
|
12
|
-
- `hidden` (optional): A boolean indicating if the path should be hidden in navigation
|
|
13
|
-
- `rest`: Additional regex to match against the remaining path
|
|
14
|
-
|
|
15
|
-
## Key Concepts
|
|
16
|
-
|
|
17
|
-
1. **Regular Expression Matching**: The `regex` property is used to match the current route. This allows for flexible and powerful route matching.
|
|
18
|
-
|
|
19
|
-
2. **Hidden Routes**: By setting `hidden: true`, you can prevent certain routes from appearing in the breadcrumb. This is useful for intermediate pages or when you want to simplify the breadcrumb trail.
|
|
20
|
-
|
|
21
|
-
3. **Custom Redirects**: The `path` property allows you to specify a custom destination when a breadcrumb item is clicked. If not specified, it defaults to the matched path.
|
|
22
|
-
|
|
23
|
-
4. **Rest Path Handling**: The `rest` property is an additional condition. It's used to match against the remaining path after the main `regex` match. This allows for more granular control over when a rule should apply.
|
|
24
|
-
|
|
25
|
-
5. **Labeling**: The `label` property specifies the translation key for the breadcrumb text. This supports internationalization.
|
|
26
|
-
|
|
27
|
-
## Usage Notes
|
|
28
|
-
|
|
29
|
-
- Order matters in the `PathList`. The component will use the last matching rule it finds, so more specific rules should come later in the list.
|
|
30
|
-
|
|
31
|
-
- The `regex` property can include capturing groups, which can be used to extract dynamic parts of the route (like IDs).
|
|
32
|
-
|
|
33
|
-
- When using the `rest` property, the rule will only apply if both the main `regex` and the `rest` regex match.
|
|
34
|
-
|
|
35
|
-
- If no matching rule is found in `PathList`, the component will automatically generate a label based on the route segments.
|
|
36
|
-
|
|
37
|
-
## Examples
|
|
38
|
-
|
|
39
|
-
1. **Basic Route**
|
|
40
|
-
|
|
41
|
-
```javascript
|
|
42
|
-
{
|
|
43
|
-
regex: /^\/settings$/,
|
|
44
|
-
path: '/settings/administrators?tab=administrators',
|
|
45
|
-
label: 'header.settings.text',
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
This will match the "/settings" route, display "Settings" (or its translation), and redirect to the administrators tab when clicked.
|
|
50
|
-
|
|
51
|
-
2. **Hidden Route**
|
|
52
|
-
|
|
53
|
-
```javascript
|
|
54
|
-
{
|
|
55
|
-
regex: /^\/migrations$/,
|
|
56
|
-
hidden: true,
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
This will prevent the "/migrations" route from appearing in the breadcrumb.
|
|
61
|
-
|
|
62
|
-
3. **Dynamic Route with Rest Condition**
|
|
63
|
-
```javascript
|
|
64
|
-
{
|
|
65
|
-
regex: /^\/customers\/([A-Za-z0-9\-_]+)$/,
|
|
66
|
-
rest: /^subscriptions$/,
|
|
67
|
-
hidden: true,
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
This will hide the customer ID from the breadcrumb when viewing subscriptions, resulting in a cleaner "Home > Customers > Subscriptions" breadcrumb instead of "Home > Customers > [CustomerID] > Subscriptions".
|
|
71
|
-
|
|
72
|
-
By carefully crafting your `PathList`, you can create intuitive and clean breadcrumb navigation for your application.
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="flex gap-4 items-center">
|
|
3
|
-
<template v-if="false">
|
|
4
|
-
<!-- Back butonu entegre etmek istersek bu v-if'i silmek işi çözer -->
|
|
5
|
-
<el-button v-if="route.path !== '/'" class="isax-arrow-left outline" size="mini" @click="goBack" />
|
|
6
|
-
</template>
|
|
7
|
-
<el-breadcrumb separator="">
|
|
8
|
-
<el-breadcrumb-item v-for="(crumb, index) in list" :key="index" v-bind="index < list.length - 1 ? { to: { path: crumb.path } } : {}">
|
|
9
|
-
{{ $t(crumb.label) }}
|
|
10
|
-
<!--{{ crumb }} Tüm Objeyi Görüntülemek İçin Bunu Kullan -->
|
|
11
|
-
</el-breadcrumb-item>
|
|
12
|
-
</el-breadcrumb>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts">
|
|
17
|
-
/**
|
|
18
|
-
* tab,id,action gibi query parametrelerini alır route'un sonuna ekler ve onları da route.path gibi gösterir.
|
|
19
|
-
* bu parametresi sadece mevcutsa eklenir. Örnek: http://localhost:3000/customers/123?tab=details
|
|
20
|
-
* bu route'da tab=details olacak ve path'i resolve ederken ['customers', '123', 'details'] şu şekilde bir listeye dikkat edecektir.
|
|
21
|
-
*
|
|
22
|
-
* `hidden` ile match eden route `hidden` olarak tanimlanabilmektedir. Mesela http://localhost:3000/customers/details/123 adresinde
|
|
23
|
-
* {regex: `^\/customers\/details$`, hidden: true} gibi bir route tanımlandığında detail ile ilgili bir route breadrump'a eklenmez. Ama öncesindeki
|
|
24
|
-
* customers ve sonrasında 123 ile ilgili tanımlar yapıldıysa onlar eklenir (yapılmadıysa otomatik ekleyecektir).
|
|
25
|
-
*
|
|
26
|
-
* `rest` olarak tanımlanmışsa, match eden route'un sonrasında kalan path'a bakar ve rest ile belirtilen regex bu path ile match
|
|
27
|
-
* ederse o zaman ister `hidden` ile gizlersiniz, isterseniz `label` ile text'ini güncellersiniz. Örneğin birbirinin benzeri 2 adet link var diyelim.
|
|
28
|
-
* http://localhost:3000/customers/123, http://localhost:3000/customers/123/subscriptions gibi. 123 ile biten route'a bir text yazdırmak isterken
|
|
29
|
-
* diğerinin 123'e ait path'ine bir şey yazdırmak istemiyor olabilirsiniz.
|
|
30
|
-
* O zaman ilk route için {regex: `^\/customers\/([A-Za-z0-9\-_]+)$`, label: 'header.customers.details.text'} tanımlarken
|
|
31
|
-
* ikincisi için {regex: `^\/customers\/([A-Za-z0-9\-_]+)$`, rest: `^\/subscriptions$`, hidden: true} demeniz yeterli olacaktır.
|
|
32
|
-
* Rest burada ikinci bir condition gibi çalışmakadır.
|
|
33
|
-
*
|
|
34
|
-
* `path` ile match eden route tıklanıldığında path ile belirtilen route'a yönlendirilir. Tanımlanmazsa kendi path'ini alacaktır.
|
|
35
|
-
*
|
|
36
|
-
*`label` ile istediğiniz match eden route'a text verebilirsiniz.
|
|
37
|
-
*
|
|
38
|
-
* Rest ile ilgili detaylı açıklama:
|
|
39
|
-
*
|
|
40
|
-
* bu `customers/1363/subscriptions` gibi bir linki resolve ederken `1363` ile ilgili bir şey yazmasına engel olacaktır.
|
|
41
|
-
* bunu yaparken regex'i match eden route'un (customers/1363) sonrasında kalan path'a bakar, `rest` ile belirtilen
|
|
42
|
-
* Regex ile uyuşuyorsa (buradaki örnekte `subscriptions`) parantez içerisinde belirtilen kısmı navigasyona eklemez.
|
|
43
|
-
* Sonuç: `customers/subscriptions` şeklinde algılar.
|
|
44
|
-
*
|
|
45
|
-
* Dilerseniz `hidden:true` ile bu route gizleyebilirsiniz. Bu durumda breadcrumbda `home > customer > subscription` gibi bir sıralama yapılacaktır.
|
|
46
|
-
* Ya da `label` ile yeni bir isim verebilirsiniz.
|
|
47
|
-
* {
|
|
48
|
-
* regex: /^\/customers\/([A-Za-z0-9\-_]+)$/,
|
|
49
|
-
* rest: /^subscriptions$/,
|
|
50
|
-
* hidden: true,
|
|
51
|
-
* },
|
|
52
|
-
* {
|
|
53
|
-
* regex: /^\/customers\/([A-Za-z0-9\-_]+)$/,
|
|
54
|
-
* rest: /^subscriptions$/,
|
|
55
|
-
* label: "yeni isim",
|
|
56
|
-
* },
|
|
57
|
-
*/
|
|
58
|
-
</script>
|
|
59
|
-
|
|
60
|
-
<script setup lang="ts">
|
|
61
|
-
import { computed } from 'vue';
|
|
62
|
-
import { useRoute, useRouter } from 'vue-router';
|
|
63
|
-
|
|
64
|
-
interface Breadcrumb {
|
|
65
|
-
regex: string;
|
|
66
|
-
path: string;
|
|
67
|
-
label: string;
|
|
68
|
-
hidden?: boolean;
|
|
69
|
-
rest?: string;
|
|
70
|
-
auto?: boolean;
|
|
71
|
-
value?: string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
interface Props {
|
|
75
|
-
onChange?: Array<() => void>;
|
|
76
|
-
paths: Array<Breadcrumb>;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
80
|
-
onChange: () => [],
|
|
81
|
-
paths: () => [],
|
|
82
|
-
});
|
|
83
|
-
const route = useRoute();
|
|
84
|
-
const list = computed<Breadcrumb[]>(() => {
|
|
85
|
-
const pathArray = route.path.split('/');
|
|
86
|
-
const { tab, id } = route.query;
|
|
87
|
-
const breadcrumbs: Breadcrumb[] = [];
|
|
88
|
-
let link = '';
|
|
89
|
-
|
|
90
|
-
breadcrumbs.push({
|
|
91
|
-
path: '/',
|
|
92
|
-
label: 'header.home.text',
|
|
93
|
-
regex: '\/',
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
pathArray.filter(Boolean).forEach((path, index) => {
|
|
97
|
-
link += '/' + path;
|
|
98
|
-
if (index === pathArray.length - 2 && id && !tab) {
|
|
99
|
-
link += '?id=' + id;
|
|
100
|
-
}
|
|
101
|
-
const matched = findBestMatch(link);
|
|
102
|
-
|
|
103
|
-
if (matched && !matched?.hidden) {
|
|
104
|
-
breadcrumbs.push(matched);
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
if (tab) {
|
|
109
|
-
const matched = findBestMatch(link + '/' + tab);
|
|
110
|
-
|
|
111
|
-
if (matched && !matched?.hidden) {
|
|
112
|
-
breadcrumbs.push(matched);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return breadcrumbs;
|
|
117
|
-
});
|
|
118
|
-
const findBestMatch = (url: string): Breadcrumb | null => {
|
|
119
|
-
let bestMatch: Breadcrumb | null = null;
|
|
120
|
-
let maxMatchLength = 0;
|
|
121
|
-
|
|
122
|
-
props.paths.forEach((route: Breadcrumb) => {
|
|
123
|
-
const regex = new RegExp(route.regex);
|
|
124
|
-
|
|
125
|
-
if (regex.test(url)) {
|
|
126
|
-
const match = url.match(regex);
|
|
127
|
-
|
|
128
|
-
if (match && match[0].length > maxMatchLength) {
|
|
129
|
-
maxMatchLength = match[0].length;
|
|
130
|
-
route.path = route.path ?? match[0]; // route.path tanımsızsa match[0] ile güncelle
|
|
131
|
-
|
|
132
|
-
if (match[1]) [, route.value] = match; // match[1] mevcutsa route.value güncelle, yoksa eski değeri koru
|
|
133
|
-
|
|
134
|
-
bestMatch = route;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
if (!bestMatch) {
|
|
140
|
-
let label = 'header';
|
|
141
|
-
const filteredArray = url.split('/').filter(Boolean);
|
|
142
|
-
|
|
143
|
-
filteredArray.forEach((path) => {
|
|
144
|
-
label = label + `.${path}`;
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
bestMatch = {
|
|
148
|
-
label: label + '.text',
|
|
149
|
-
path: url,
|
|
150
|
-
auto: true,
|
|
151
|
-
regex: '',
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return bestMatch;
|
|
156
|
-
};
|
|
157
|
-
const router = useRouter();
|
|
158
|
-
const goBack = () => router.go(-1);
|
|
159
|
-
</script>
|