@bagelink/vue 1.2.43 → 1.2.48
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/components/AddressSearch.vue.d.ts.map +1 -1
- package/dist/components/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/ListItem.vue.d.ts +3 -0
- package/dist/components/ListItem.vue.d.ts.map +1 -1
- package/dist/components/form/FieldArray.vue.d.ts +29 -21
- package/dist/components/form/FieldArray.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ToggleInput.vue.d.ts +1 -1
- package/dist/components/form/inputs/ToggleInput.vue.d.ts.map +1 -1
- package/dist/index.cjs +91 -68
- package/dist/index.mjs +91 -68
- package/dist/style.css +32 -20
- package/dist/utils/calendar/dateUtils.d.ts +1 -1
- package/dist/utils/calendar/dateUtils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/ListItem.vue +24 -7
- package/src/components/Modal.vue +1 -1
- package/src/components/form/FieldArray.vue +31 -24
- package/src/components/form/inputs/ToggleInput.vue +1 -1
- package/src/styles/appearance.css +12 -0
- package/src/styles/modal.css +4 -4
- package/src/utils/calendar/dateUtils.ts +15 -7
package/dist/style.css
CHANGED
|
@@ -2367,18 +2367,18 @@ input[type="range"][data-v-46e22f3e]:active::-webkit-slider-thumb {
|
|
|
2367
2367
|
height: 30px;
|
|
2368
2368
|
}
|
|
2369
2369
|
|
|
2370
|
-
.bagel-input.bgl-toggle[data-v-
|
|
2370
|
+
.bagel-input.bgl-toggle[data-v-c5e45931]{
|
|
2371
2371
|
display: unset !important;
|
|
2372
2372
|
}
|
|
2373
|
-
.bagel-input.bgl-toggle[data-v-
|
|
2373
|
+
.bagel-input.bgl-toggle[data-v-c5e45931] *{
|
|
2374
2374
|
cursor: pointer !important;
|
|
2375
2375
|
}
|
|
2376
|
-
.bagel-input.bgl-toggle input[data-v-
|
|
2376
|
+
.bagel-input.bgl-toggle input[data-v-c5e45931]{
|
|
2377
2377
|
padding: unset !important;
|
|
2378
2378
|
min-width: unset !important;
|
|
2379
2379
|
margin: 0 !important;
|
|
2380
2380
|
}
|
|
2381
|
-
.bgl-toggle input[data-v-
|
|
2381
|
+
.bgl-toggle input[data-v-c5e45931] {
|
|
2382
2382
|
appearance: none;
|
|
2383
2383
|
position: relative;
|
|
2384
2384
|
display: inline-block;
|
|
@@ -2391,7 +2391,7 @@ input[type="range"][data-v-46e22f3e]:active::-webkit-slider-thumb {
|
|
|
2391
2391
|
transition: 0.25s linear all;
|
|
2392
2392
|
outline: 1px solid var(--border-color);
|
|
2393
2393
|
}
|
|
2394
|
-
.bgl-toggle input[data-v-
|
|
2394
|
+
.bgl-toggle input[data-v-c5e45931]::before {
|
|
2395
2395
|
position: absolute;
|
|
2396
2396
|
content: "";
|
|
2397
2397
|
height: calc(var(--input-height) / 2 - 2px);
|
|
@@ -2404,7 +2404,7 @@ input[type="range"][data-v-46e22f3e]:active::-webkit-slider-thumb {
|
|
|
2404
2404
|
transition: 0.2s;
|
|
2405
2405
|
box-shadow:0 1px 5px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
|
|
2406
2406
|
}
|
|
2407
|
-
.bgl-toggle label[data-v-
|
|
2407
|
+
.bgl-toggle label[data-v-c5e45931] {
|
|
2408
2408
|
padding-inline-start: 0.5rem;
|
|
2409
2409
|
transition: var(--bgl-transition);
|
|
2410
2410
|
cursor: pointer;
|
|
@@ -2413,30 +2413,30 @@ input[type="range"][data-v-46e22f3e]:active::-webkit-slider-thumb {
|
|
|
2413
2413
|
font-size: var(--input-font-size);
|
|
2414
2414
|
vertical-align: middle;
|
|
2415
2415
|
}
|
|
2416
|
-
.bgl-toggle label[data-v-
|
|
2416
|
+
.bgl-toggle label[data-v-c5e45931]:hover {
|
|
2417
2417
|
filter: brightness(90%);
|
|
2418
2418
|
}
|
|
2419
|
-
.bgl-toggle label[data-v-
|
|
2419
|
+
.bgl-toggle label[data-v-c5e45931]:active {
|
|
2420
2420
|
filter: var(--bgl-active-filter);
|
|
2421
2421
|
}
|
|
2422
|
-
.bgl-toggle input[data-v-
|
|
2422
|
+
.bgl-toggle input[data-v-c5e45931]:focus-visible {
|
|
2423
2423
|
outline: -webkit-focus-ring-color auto 1px;
|
|
2424
2424
|
outline-offset: 2px
|
|
2425
2425
|
}
|
|
2426
|
-
.bgl-toggle input[data-v-
|
|
2426
|
+
.bgl-toggle input[data-v-c5e45931]:focus {
|
|
2427
2427
|
outline-color: transparent;
|
|
2428
2428
|
}
|
|
2429
|
-
.bgl-toggle input[data-v-
|
|
2429
|
+
.bgl-toggle input[data-v-c5e45931]:focus-visible {
|
|
2430
2430
|
outline: -webkit-focus-ring-color auto 1px;
|
|
2431
2431
|
outline-offset: 2px
|
|
2432
2432
|
}
|
|
2433
|
-
.bgl-toggle[data-v-
|
|
2433
|
+
.bgl-toggle[data-v-c5e45931] :checked{
|
|
2434
2434
|
background: var(--bgl-primary);
|
|
2435
2435
|
}
|
|
2436
|
-
.bgl-toggle[data-v-
|
|
2436
|
+
.bgl-toggle[data-v-c5e45931] :checked::before{
|
|
2437
2437
|
margin-inline-start:calc(var(--input-height) / 2 - 2px) ;
|
|
2438
2438
|
}
|
|
2439
|
-
.bgl-toggle input:checked + label[data-v-
|
|
2439
|
+
.bgl-toggle input:checked + label[data-v-c5e45931] {
|
|
2440
2440
|
color: var(--bgl-primary) !important;
|
|
2441
2441
|
}
|
|
2442
2442
|
.fileUploadWrap[data-v-d8f3ff01] {
|
|
@@ -2904,7 +2904,6 @@ button.list-item {
|
|
|
2904
2904
|
pointer-events: none;
|
|
2905
2905
|
}
|
|
2906
2906
|
.list-item {
|
|
2907
|
-
padding: 0.6rem 1rem;
|
|
2908
2907
|
min-height: -webkit-fit-content;
|
|
2909
2908
|
min-height: -moz-fit-content;
|
|
2910
2909
|
min-height: fit-content;
|
|
@@ -2915,6 +2914,9 @@ button.list-item {
|
|
|
2915
2914
|
text-decoration: none;
|
|
2916
2915
|
position: relative;
|
|
2917
2916
|
}
|
|
2917
|
+
.list-item > *{
|
|
2918
|
+
margiin-bottom: 0;
|
|
2919
|
+
}
|
|
2918
2920
|
.list-item::after {
|
|
2919
2921
|
content: '';
|
|
2920
2922
|
position: absolute;
|
|
@@ -2933,7 +2935,7 @@ button.list-item {
|
|
|
2933
2935
|
}
|
|
2934
2936
|
.list-item:hover,
|
|
2935
2937
|
.list-item.router-link-active {
|
|
2936
|
-
background-color: var(--bgl-primary-
|
|
2938
|
+
background-color: var(--bgl-primary-tint);
|
|
2937
2939
|
}
|
|
2938
2940
|
.notClickable:hover{
|
|
2939
2941
|
background-color:unset;
|
|
@@ -3796,7 +3798,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
3796
3798
|
.leaflet-marker-icon {
|
|
3797
3799
|
cursor: pointer;
|
|
3798
3800
|
}
|
|
3799
|
-
.bg-dark {
|
|
3801
|
+
.bg-dark-modal {
|
|
3800
3802
|
position: fixed;
|
|
3801
3803
|
top: 0;
|
|
3802
3804
|
right: 0;
|
|
@@ -3903,16 +3905,16 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
3903
3905
|
transform: translateX(0%);
|
|
3904
3906
|
}
|
|
3905
3907
|
|
|
3906
|
-
.bg-dark.is-active {
|
|
3908
|
+
.bg-dark-modal.is-active {
|
|
3907
3909
|
opacity: 1;
|
|
3908
3910
|
pointer-events: all;
|
|
3909
3911
|
}
|
|
3910
3912
|
|
|
3911
|
-
body:has(.bg-dark.is-active) {
|
|
3913
|
+
body:has(.bg-dark-modal.is-active) {
|
|
3912
3914
|
overflow: hidden;
|
|
3913
3915
|
}
|
|
3914
3916
|
|
|
3915
|
-
.is-side.bg-dark.is-active {
|
|
3917
|
+
.is-side.bg-dark-modal.is-active {
|
|
3916
3918
|
opacity: 1;
|
|
3917
3919
|
align-items: stretch;
|
|
3918
3920
|
}
|
|
@@ -16490,6 +16492,8 @@ select {
|
|
|
16490
16492
|
color: var(--bgl-blue-light) !important;
|
|
16491
16493
|
}.bg-bg {
|
|
16492
16494
|
background: var(--bgl-bg) !important;
|
|
16495
|
+
}.bg-dark {
|
|
16496
|
+
background: var(--bgl-dark-bg);
|
|
16493
16497
|
}.color-bg {
|
|
16494
16498
|
color: var(--bgl-bg) !important;
|
|
16495
16499
|
}.bg-input {
|
|
@@ -17028,6 +17032,14 @@ select {
|
|
|
17028
17032
|
background: var(--label-color) !important;
|
|
17029
17033
|
}
|
|
17030
17034
|
|
|
17035
|
+
.m_bg-bg {
|
|
17036
|
+
background: var(--bgl-bg) !important;
|
|
17037
|
+
}
|
|
17038
|
+
|
|
17039
|
+
.m_bg-dark {
|
|
17040
|
+
background: var(--bgl-dark-bg);
|
|
17041
|
+
}
|
|
17042
|
+
|
|
17031
17043
|
.m_bg-gray-light {
|
|
17032
17044
|
background: var(--bgl-gray-light) !important;
|
|
17033
17045
|
}
|
|
@@ -17,7 +17,7 @@ export declare function timeAgo(date: string | Date, lang?: AvailableTimeLanguag
|
|
|
17
17
|
* @param timeZone The timezone to use (e.g., 'UTC', 'America/New_York')
|
|
18
18
|
* @returns Date parts with timezone adjustment applied
|
|
19
19
|
*/
|
|
20
|
-
export declare function handleTimezone(date: Date,
|
|
20
|
+
export declare function handleTimezone(date: Date, intFmtOpt: Intl.DateTimeFormatOptions): Date;
|
|
21
21
|
export declare function getDatePartsMap(date: Date, locale: Intl.LocalesArgument, intFmtOpt?: Intl.DateTimeFormatOptions): {
|
|
22
22
|
AmPm: string;
|
|
23
23
|
DD: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/calendar/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAkC,MAAM,sBAAsB,CAAA;AAE3H,UAAU,gBAAgB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAyBvE;AAqDD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,GAAE,sBAA6B,UAsD/E;AASD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"dateUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/calendar/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAkC,MAAM,sBAAsB,CAAA;AAE3H,UAAU,gBAAgB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,gBAAgB,QAyBvE;AAqDD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,GAAE,sBAA6B,UAsD/E;AASD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,qBAAqB,GAAG,IAAI,CA2CtF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,qBAAqB;;;;;;;;;;;;;;EAyB/G;AAcD,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC;IAC7F,GAAG,CAAC,EAAE,uBAAuB,CAAA;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC,eAAe,CAAA;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;CACX;AACD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACzB,IAAI,CAAC,EAAE,QAAQ,EACf,IAAI,GAAE,iBAAsB,GAC1B,MAAM,CAuER;AACD,eAAO,MAAM,OAAO,mBAAa,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bagelink/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.48",
|
|
5
5
|
"description": "Bagel core sdk packages",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Neveh Allon",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"date-fns": "^4.1.0",
|
|
84
|
-
"@vueuse/core": "^13.
|
|
84
|
+
"@vueuse/core": "^13.1.0",
|
|
85
85
|
"axios": "^1.8.4",
|
|
86
86
|
"floating-vue": "^5.2.2",
|
|
87
87
|
"libphonenumber-js": "1.12.6",
|
|
@@ -15,6 +15,8 @@ const props = defineProps<{
|
|
|
15
15
|
lead?: string
|
|
16
16
|
iconEnd?: IconType
|
|
17
17
|
target?: '_blank' | '_self'
|
|
18
|
+
thin?: boolean
|
|
19
|
+
fullWidth?: boolean
|
|
18
20
|
onClick?: () => void
|
|
19
21
|
}>()
|
|
20
22
|
|
|
@@ -25,6 +27,10 @@ const isComponent = $computed(() => {
|
|
|
25
27
|
return 'div'
|
|
26
28
|
})
|
|
27
29
|
|
|
30
|
+
const isClickable = $computed(() => {
|
|
31
|
+
return props.to || props.href || props.onClick
|
|
32
|
+
})
|
|
33
|
+
|
|
28
34
|
const bind = $computed(() => {
|
|
29
35
|
const obj: { [key: string]: any } = {}
|
|
30
36
|
if (props.to) obj.to = props.to
|
|
@@ -44,27 +50,36 @@ const bind = $computed(() => {
|
|
|
44
50
|
<component
|
|
45
51
|
:is="isComponent"
|
|
46
52
|
v-bind="bind"
|
|
53
|
+
v-ripple="isClickable"
|
|
47
54
|
class="flex gap-05 list-item"
|
|
55
|
+
:class="{ 'py-1': !props.thin,
|
|
56
|
+
'py-05': props.thin,
|
|
57
|
+
'px-1': !props.fullWidth,
|
|
58
|
+
'px-0': props.fullWidth,
|
|
59
|
+
}"
|
|
48
60
|
@click="onClick"
|
|
49
61
|
>
|
|
50
62
|
<Avatar v-if="src || showAvatar" style="flex-basis: 1;" :name="title" :src="src" :size="40" />
|
|
51
63
|
<Icon v-if="icon" size="1.2" class="color-primary" :icon="icon" />
|
|
52
64
|
|
|
53
|
-
<div>
|
|
54
|
-
<p v-if="lead" class="txt10
|
|
65
|
+
<div class="txt-start">
|
|
66
|
+
<p v-if="lead" class="txt10 m-0 p-0 txt-gray ellipsis">
|
|
55
67
|
{{ lead }}
|
|
56
68
|
<slot name="lead" />
|
|
57
69
|
</p>
|
|
58
|
-
<p class="
|
|
70
|
+
<p class="m-0 p-0 ellipsis-1 line-height-14 pb-025">
|
|
59
71
|
{{ title }}
|
|
60
72
|
<slot />
|
|
61
73
|
</p>
|
|
62
|
-
<p v-if="subtitle" class="txt12
|
|
74
|
+
<p v-if="subtitle" class="txt12 m-0 p-0 opacity-7 ellipsis-1">
|
|
63
75
|
{{ subtitle }}
|
|
64
76
|
<slot name="subtitle" />
|
|
65
77
|
</p>
|
|
66
78
|
</div>
|
|
67
|
-
<
|
|
79
|
+
<div class="flex-grow-1" />
|
|
80
|
+
<slot name="action">
|
|
81
|
+
<Icon v-if="iconEnd" :icon="iconEnd" class="transition-400" />
|
|
82
|
+
</slot>
|
|
68
83
|
</component>
|
|
69
84
|
</template>
|
|
70
85
|
|
|
@@ -83,7 +98,6 @@ button.list-item {
|
|
|
83
98
|
pointer-events: none;
|
|
84
99
|
}
|
|
85
100
|
.list-item {
|
|
86
|
-
padding: 0.6rem 1rem;
|
|
87
101
|
min-height: -webkit-fit-content;
|
|
88
102
|
min-height: -moz-fit-content;
|
|
89
103
|
min-height: fit-content;
|
|
@@ -94,6 +108,9 @@ button.list-item {
|
|
|
94
108
|
text-decoration: none;
|
|
95
109
|
position: relative;
|
|
96
110
|
}
|
|
111
|
+
.list-item > *{
|
|
112
|
+
margiin-bottom: 0;
|
|
113
|
+
}
|
|
97
114
|
|
|
98
115
|
.list-item::after {
|
|
99
116
|
content: '';
|
|
@@ -114,7 +131,7 @@ button.list-item {
|
|
|
114
131
|
|
|
115
132
|
.list-item:hover,
|
|
116
133
|
.list-item.router-link-active {
|
|
117
|
-
background-color: var(--bgl-primary-
|
|
134
|
+
background-color: var(--bgl-primary-tint);
|
|
118
135
|
}
|
|
119
136
|
.notClickable:hover{
|
|
120
137
|
background-color:unset;
|
package/src/components/Modal.vue
CHANGED
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
AttributeValue,
|
|
5
5
|
Attributes,
|
|
6
6
|
BagelFieldOptions,
|
|
7
|
+
BaseBagelField,
|
|
7
8
|
BglFormSchemaFnT,
|
|
8
9
|
Field,
|
|
9
10
|
Path
|
|
@@ -11,27 +12,33 @@ import type {
|
|
|
11
12
|
import { BagelForm, Btn, Loading, Icon } from '@bagelink/vue'
|
|
12
13
|
import { ref, onMounted, computed, watch } from 'vue'
|
|
13
14
|
|
|
15
|
+
export interface FieldArrayProps<T, P extends Path<T>> {
|
|
16
|
+
el?: any
|
|
17
|
+
id: string
|
|
18
|
+
label?: string
|
|
19
|
+
placeholder?: string
|
|
20
|
+
children?: Field<T>[]
|
|
21
|
+
class?: AttributeValue | AttributeFn<T, P>
|
|
22
|
+
attrs?: Attributes<T, P>
|
|
23
|
+
required?: boolean
|
|
24
|
+
disabled?: boolean
|
|
25
|
+
helptext?: string
|
|
26
|
+
options?: BagelFieldOptions<T>
|
|
27
|
+
defaultValue?: any
|
|
28
|
+
add?: boolean
|
|
29
|
+
delete?: boolean
|
|
30
|
+
transform?: (value: T) => T
|
|
31
|
+
schema?: BglFormSchemaFnT<T>
|
|
32
|
+
modelValue: T[]
|
|
33
|
+
type?: 'object' | 'number' | 'text'
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface PrimitiveArrFieldT extends BaseBagelField<{ value: string }, 'value'> {
|
|
37
|
+
type: FieldArrayProps<{ value: string }, 'value'>['type']
|
|
38
|
+
}
|
|
39
|
+
|
|
14
40
|
const props = withDefaults(
|
|
15
|
-
defineProps<
|
|
16
|
-
el?: any
|
|
17
|
-
id: string
|
|
18
|
-
label?: string
|
|
19
|
-
placeholder?: string
|
|
20
|
-
children?: Field<T>[]
|
|
21
|
-
class?: AttributeValue | AttributeFn<T, P>
|
|
22
|
-
attrs?: Attributes<T, P>
|
|
23
|
-
required?: boolean
|
|
24
|
-
disabled?: boolean
|
|
25
|
-
helptext?: string
|
|
26
|
-
options?: BagelFieldOptions<T>
|
|
27
|
-
defaultValue?: any
|
|
28
|
-
add?: boolean
|
|
29
|
-
delete?: boolean
|
|
30
|
-
transform?: (value: T) => T
|
|
31
|
-
schema?: BglFormSchemaFnT<T>
|
|
32
|
-
modelValue: T[]
|
|
33
|
-
type?: 'object' | 'number' | 'text'
|
|
34
|
-
}>(),
|
|
41
|
+
defineProps<FieldArrayProps<T, P>>(),
|
|
35
42
|
{
|
|
36
43
|
delete: true,
|
|
37
44
|
add: true,
|
|
@@ -54,18 +61,18 @@ watch(() => props.modelValue, (newValue) => {
|
|
|
54
61
|
}, { deep: true })
|
|
55
62
|
|
|
56
63
|
// Generate schema for primitive types
|
|
57
|
-
const primitiveSchema = computed(() => {
|
|
64
|
+
const primitiveSchema = computed<PrimitiveArrFieldT[]>(() => {
|
|
58
65
|
if (props.type === 'text') {
|
|
59
|
-
return [{ id: 'value', type: 'text', label: '' }]
|
|
66
|
+
return [{ id: 'value', type: 'text', label: '', $el: 'text' }]
|
|
60
67
|
} else if (props.type === 'number') {
|
|
61
|
-
return [{ id: 'value', type: 'number', label: '' }]
|
|
68
|
+
return [{ id: 'value', type: 'number', label: '', $el: 'number' }]
|
|
62
69
|
}
|
|
63
70
|
return []
|
|
64
71
|
})
|
|
65
72
|
|
|
66
73
|
// Resolve schema
|
|
67
74
|
async function resolveSchema() {
|
|
68
|
-
// For primitive types, use the predefined
|
|
75
|
+
// For primitive types, use the predefined schemaks
|
|
69
76
|
if (props.type !== 'object') {
|
|
70
77
|
resolvedSchemaData.value = primitiveSchema.value
|
|
71
78
|
schemaState.value = 'loaded'
|
|
@@ -173,6 +173,10 @@
|
|
|
173
173
|
background: var(--bgl-bg) !important;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
.bg-dark {
|
|
177
|
+
background: var(--bgl-dark-bg);
|
|
178
|
+
}
|
|
179
|
+
|
|
176
180
|
.color-bg {
|
|
177
181
|
color: var(--bgl-bg) !important;
|
|
178
182
|
}
|
|
@@ -1015,6 +1019,14 @@
|
|
|
1015
1019
|
background: var(--label-color) !important;
|
|
1016
1020
|
}
|
|
1017
1021
|
|
|
1022
|
+
.m_bg-bg {
|
|
1023
|
+
background: var(--bgl-bg) !important;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
.m_bg-dark {
|
|
1027
|
+
background: var(--bgl-dark-bg);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1018
1030
|
.m_bg-gray-light {
|
|
1019
1031
|
background: var(--bgl-gray-light) !important;
|
|
1020
1032
|
}
|
package/src/styles/modal.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.bg-dark {
|
|
1
|
+
.bg-dark-modal {
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
right: 0;
|
|
@@ -105,16 +105,16 @@
|
|
|
105
105
|
transform: translateX(0%);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.bg-dark.is-active {
|
|
108
|
+
.bg-dark-modal.is-active {
|
|
109
109
|
opacity: 1;
|
|
110
110
|
pointer-events: all;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
body:has(.bg-dark.is-active) {
|
|
113
|
+
body:has(.bg-dark-modal.is-active) {
|
|
114
114
|
overflow: hidden;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
.is-side.bg-dark.is-active {
|
|
117
|
+
.is-side.bg-dark-modal.is-active {
|
|
118
118
|
opacity: 1;
|
|
119
119
|
align-items: stretch;
|
|
120
120
|
}
|
|
@@ -158,7 +158,7 @@ function getBrowserNavigatorLocale(): string {
|
|
|
158
158
|
* @param timeZone The timezone to use (e.g., 'UTC', 'America/New_York')
|
|
159
159
|
* @returns Date parts with timezone adjustment applied
|
|
160
160
|
*/
|
|
161
|
-
export function handleTimezone(date: Date,
|
|
161
|
+
export function handleTimezone(date: Date, intFmtOpt: Intl.DateTimeFormatOptions): Date {
|
|
162
162
|
// If timeZone is UTC, convert to UTC directly
|
|
163
163
|
if (intFmtOpt.timeZone === 'UTC') {
|
|
164
164
|
const utcDate = new Date(date.getTime())
|
|
@@ -168,14 +168,18 @@ export function handleTimezone(date: Date, locale: Intl.LocalesArgument, intFmtO
|
|
|
168
168
|
|
|
169
169
|
// For other timezones, use the Intl API
|
|
170
170
|
try {
|
|
171
|
-
//
|
|
172
|
-
const formatter = new Intl.DateTimeFormat(
|
|
171
|
+
// Always use en-US locale for parsing date parts to ensure Latin numerals
|
|
172
|
+
const formatter = new Intl.DateTimeFormat('en-US', {
|
|
173
|
+
...intFmtOpt,
|
|
174
|
+
month: 'numeric' // Force numeric month format
|
|
175
|
+
})
|
|
173
176
|
|
|
174
177
|
// Format the date in the target timezone
|
|
175
178
|
const formattedParts = formatter.formatToParts(date)
|
|
176
179
|
|
|
177
180
|
// Extract date components from formatted parts
|
|
178
181
|
const parts: Record<string, number> = {}
|
|
182
|
+
|
|
179
183
|
formattedParts.forEach((part) => {
|
|
180
184
|
if (part.type !== 'literal' && part.type !== 'timeZoneName') {
|
|
181
185
|
parts[part.type] = Number.parseInt(part.value, 10)
|
|
@@ -201,8 +205,10 @@ export function handleTimezone(date: Date, locale: Intl.LocalesArgument, intFmtO
|
|
|
201
205
|
|
|
202
206
|
export function getDatePartsMap(date: Date, locale: Intl.LocalesArgument, intFmtOpt?: Intl.DateTimeFormatOptions) {
|
|
203
207
|
// Apply timezone adjustment if specified
|
|
204
|
-
const d = intFmtOpt?.timeZone ? handleTimezone(date,
|
|
205
|
-
|
|
208
|
+
const d = intFmtOpt?.timeZone ? handleTimezone(date, intFmtOpt) : date
|
|
209
|
+
|
|
210
|
+
// Use numeric formatting for year to ensure consistency across locales
|
|
211
|
+
const year = d.getFullYear().toString()
|
|
206
212
|
|
|
207
213
|
/// keep-sorted
|
|
208
214
|
return {
|
|
@@ -217,8 +223,10 @@ export function getDatePartsMap(date: Date, locale: Intl.LocalesArgument, intFmt
|
|
|
217
223
|
MMMM: d.toLocaleString(locale, { month: 'long' }),
|
|
218
224
|
ss: String(d.getSeconds()).padStart(2, '0'),
|
|
219
225
|
sss: String(d.getMilliseconds()).padStart(3, '0'),
|
|
220
|
-
|
|
221
|
-
|
|
226
|
+
|
|
227
|
+
// Always use Latin numerals for year to ensure consistency
|
|
228
|
+
YY: year.slice(-2),
|
|
229
|
+
YYYY: year,
|
|
222
230
|
}
|
|
223
231
|
}
|
|
224
232
|
|