@bagelink/vue 0.0.237 → 0.0.241
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/Btn.vue.d.ts +1 -1
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/Drop.vue.d.ts +34 -0
- package/dist/components/Drop.vue.d.ts.map +1 -0
- package/dist/components/FileUploader.vue.d.ts +60 -0
- package/dist/components/FileUploader.vue.d.ts.map +1 -0
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/ModalForm.vue.d.ts.map +1 -1
- package/dist/components/TableSchema.vue.d.ts +2 -0
- package/dist/components/TableSchema.vue.d.ts.map +1 -1
- package/dist/components/form/BglField.vue.d.ts.map +1 -1
- package/dist/components/form/BglForm.vue.d.ts.map +1 -1
- package/dist/components/form/ItemRef.vue.d.ts +1 -0
- package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/SelectField.vue.d.ts +1 -4
- package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/TextInput.vue.d.ts +1 -1
- package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/ToggleInput.vue.d.ts +6 -6
- package/dist/index.cjs +1714 -1706
- package/dist/index.mjs +1714 -1706
- package/dist/plugins/bagel.d.ts +1 -1
- package/dist/style.css +105 -80
- package/dist/types/index.d.ts +1 -1
- package/package.json +4 -4
- package/src/components/Btn.vue +4 -1
- package/src/components/Modal.vue +4 -2
- package/src/components/ModalForm.vue +33 -6
- package/src/components/TableSchema.vue +11 -54
- package/src/components/form/BglField.vue +21 -6
- package/src/components/form/BglForm.vue +32 -6
- package/src/plugins/modal.ts +1 -1
- package/src/styles/modal.css +26 -14
- package/src/styles/theme.css +19 -4
- package/tsconfig.json +7 -3
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<component
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="id?'div':'form'"
|
|
4
|
+
ref="form"
|
|
5
|
+
@submit.prevent="runSubmit"
|
|
6
|
+
>
|
|
7
|
+
<Title
|
|
8
|
+
tag="h4"
|
|
9
|
+
:label="label"
|
|
10
|
+
v-if="label"
|
|
11
|
+
/>
|
|
12
|
+
<BglField
|
|
13
|
+
v-for="(field, i) in schema"
|
|
14
|
+
:key="field.id || `${i}p`"
|
|
15
|
+
:field="field"
|
|
16
|
+
v-model="data"
|
|
17
|
+
/>
|
|
18
|
+
<Btn
|
|
19
|
+
class="del-top"
|
|
20
|
+
v-if="data?.id && onDelete"
|
|
21
|
+
@click="runDelete"
|
|
22
|
+
value="Delete"
|
|
23
|
+
flat
|
|
24
|
+
icon="delete"
|
|
25
|
+
color="red"
|
|
26
|
+
thin
|
|
27
|
+
/>
|
|
28
|
+
<Btn
|
|
29
|
+
v-if="!$slots.submit && onSubmit"
|
|
30
|
+
value="Submit"
|
|
31
|
+
type="submit"
|
|
32
|
+
thin
|
|
33
|
+
/>
|
|
8
34
|
<div v-else>
|
|
9
35
|
<slot name="submit" />
|
|
10
36
|
</div>
|
package/src/plugins/modal.ts
CHANGED
|
@@ -86,7 +86,7 @@ export const ModalPlugin: Plugin = {
|
|
|
86
86
|
return modalStack.map((modal, index) => {
|
|
87
87
|
const renderComponent = modal.modalType === 'modalForm' ? ModalForm : Modal;
|
|
88
88
|
return h(
|
|
89
|
-
renderComponent
|
|
89
|
+
renderComponent,
|
|
90
90
|
{
|
|
91
91
|
...modal.modalOptions,
|
|
92
92
|
'onUpdate:isModalVisible': () => hideModal(index),
|
package/src/styles/modal.css
CHANGED
|
@@ -6,23 +6,28 @@
|
|
|
6
6
|
bottom: 0;
|
|
7
7
|
background-color: rgba(0, 0, 0, 0.7);
|
|
8
8
|
z-index: 999;
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
align-items: center;
|
|
12
9
|
pointer-events: none;
|
|
13
10
|
opacity: 0;
|
|
14
11
|
transition: all ease-in-out 0.3s;
|
|
12
|
+
max-height: 100vh;
|
|
15
13
|
overflow: auto;
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
width: 100%;
|
|
16
|
+
text-align: center;
|
|
17
|
+
display: grid;
|
|
18
|
+
align-items: center;
|
|
16
19
|
}
|
|
17
20
|
|
|
21
|
+
|
|
18
22
|
.modal {
|
|
19
23
|
width: 96%;
|
|
20
24
|
max-width: 680px;
|
|
21
25
|
transform: scale(0.5);
|
|
22
26
|
opacity: 0;
|
|
23
27
|
transition: all ease-in-out 0.15s;
|
|
24
|
-
margin-
|
|
25
|
-
margin-
|
|
28
|
+
margin-left: auto;
|
|
29
|
+
margin-right: auto;
|
|
30
|
+
height: fit-content;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
.small-modal .modal {
|
|
@@ -37,7 +42,7 @@
|
|
|
37
42
|
position: -webkit-sticky;
|
|
38
43
|
position: sticky;
|
|
39
44
|
padding-top: 1rem;
|
|
40
|
-
top:
|
|
45
|
+
top: 0rem;
|
|
41
46
|
z-index: 3;
|
|
42
47
|
background: var(--bgl-white);
|
|
43
48
|
}
|
|
@@ -50,13 +55,17 @@
|
|
|
50
55
|
inset-inline-end: -600px;
|
|
51
56
|
transform: scale(1);
|
|
52
57
|
opacity: 1;
|
|
53
|
-
position: fixed;
|
|
54
|
-
top: 20px;
|
|
55
|
-
bottom: 20px;
|
|
58
|
+
/* position: fixed; */
|
|
59
|
+
/* top: 20px; */
|
|
60
|
+
/* bottom: 20px; */
|
|
56
61
|
max-width: 600px;
|
|
57
62
|
width: 90%;
|
|
58
|
-
margin-top:
|
|
59
|
-
margin-bottom:
|
|
63
|
+
margin-top: 20px;
|
|
64
|
+
margin-bottom: 20px;
|
|
65
|
+
margin-inline-start: auto;
|
|
66
|
+
margin-inline-end: 20px;
|
|
67
|
+
min-height: calc(100vh - 40px);
|
|
68
|
+
|
|
60
69
|
}
|
|
61
70
|
|
|
62
71
|
.is-active .modal {
|
|
@@ -76,6 +85,7 @@
|
|
|
76
85
|
|
|
77
86
|
.is-side.bg-dark.is-active {
|
|
78
87
|
opacity: 1;
|
|
88
|
+
align-items: stretch;
|
|
79
89
|
}
|
|
80
90
|
|
|
81
91
|
.is-side.is-active .modal {
|
|
@@ -84,11 +94,13 @@
|
|
|
84
94
|
|
|
85
95
|
@media screen and (max-width: 910px) {
|
|
86
96
|
.tool-bar {
|
|
87
|
-
margin: -
|
|
97
|
+
margin: -1rem 0rem 1rem;
|
|
98
|
+
padding-bottom: 1rem;
|
|
88
99
|
align-items: center;
|
|
89
100
|
}
|
|
90
101
|
|
|
91
102
|
.is-active.is-side .modal {
|
|
92
|
-
|
|
103
|
+
margin-inline-end: 5%;
|
|
104
|
+
margin-inline-start: 5%;
|
|
93
105
|
}
|
|
94
|
-
}
|
|
106
|
+
}
|
package/src/styles/theme.css
CHANGED
|
@@ -87,10 +87,17 @@
|
|
|
87
87
|
font-weight: 600;
|
|
88
88
|
font-size: 20px;
|
|
89
89
|
margin-top: 0.5rem;
|
|
90
|
-
margin-bottom:
|
|
90
|
+
margin-bottom: 0 !important;
|
|
91
91
|
width: 100%;
|
|
92
92
|
-webkit-padding-end: 40px;
|
|
93
93
|
padding-inline-end: 40px;
|
|
94
|
+
line-height: 2;
|
|
95
|
+
display: -webkit-box;
|
|
96
|
+
max-width: 100%;
|
|
97
|
+
-webkit-line-clamp: 1;
|
|
98
|
+
-webkit-box-orient: vertical;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
94
101
|
}
|
|
95
102
|
|
|
96
103
|
.modal-footer {
|
|
@@ -100,6 +107,14 @@
|
|
|
100
107
|
align-items: center;
|
|
101
108
|
}
|
|
102
109
|
|
|
110
|
+
.modal-footer>div {
|
|
111
|
+
gap: 1rem;
|
|
112
|
+
display: flex;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
align-items: center;
|
|
115
|
+
gap: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
103
118
|
* {
|
|
104
119
|
box-sizing: border-box;
|
|
105
120
|
}
|
|
@@ -468,7 +483,7 @@
|
|
|
468
483
|
|
|
469
484
|
.list-view {
|
|
470
485
|
grid-area: list-view;
|
|
471
|
-
grid-template-areas: "list-header"
|
|
486
|
+
grid-template-areas: "list-header""list-content";
|
|
472
487
|
grid-template-columns: 1fr;
|
|
473
488
|
overflow-y: auto;
|
|
474
489
|
grid-template-rows: -webkit-max-content 1fr;
|
|
@@ -498,7 +513,7 @@
|
|
|
498
513
|
opacity: 0;
|
|
499
514
|
}
|
|
500
515
|
|
|
501
|
-
.grid
|
|
516
|
+
.grid>* {
|
|
502
517
|
min-height: 0;
|
|
503
518
|
}
|
|
504
519
|
|
|
@@ -606,4 +621,4 @@
|
|
|
606
621
|
-webkit-margin-start: 0.5rem;
|
|
607
622
|
margin-inline-start: 0.5rem;
|
|
608
623
|
}
|
|
609
|
-
}
|
|
624
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
+
|
|
2
3
|
"compilerOptions": {
|
|
3
4
|
"target": "ESNext",
|
|
4
5
|
"baseUrl": ".",
|
|
5
|
-
"rootDir": "
|
|
6
|
+
"rootDir": "..",
|
|
6
7
|
"module": "ESNext",
|
|
7
8
|
"strict": true,
|
|
8
9
|
"jsx": "preserve",
|
|
@@ -29,6 +30,9 @@
|
|
|
29
30
|
"@vue-macros/reactivity-transform/macros-global"
|
|
30
31
|
],
|
|
31
32
|
"paths": {
|
|
33
|
+
"@bagelink/sdk": [
|
|
34
|
+
"../sdk/src/index.ts"
|
|
35
|
+
],
|
|
32
36
|
"@bagelink/vue": [
|
|
33
37
|
"./src/index.ts"
|
|
34
38
|
],
|
|
@@ -41,6 +45,6 @@
|
|
|
41
45
|
"**/**/*.ts",
|
|
42
46
|
"**/**/*.vue",
|
|
43
47
|
"**/**/*.d.ts",
|
|
44
|
-
"./vite.config.ts"
|
|
45
|
-
]
|
|
48
|
+
"./vite.config.ts"
|
|
49
|
+
],
|
|
46
50
|
}
|