@globalbrain/sefirot 2.2.0 → 2.3.0
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/lib/components/SButton.vue +0 -1
- package/lib/components/SButtonGroup.vue +17 -17
- package/lib/components/SDropdownSectionFilter.vue +5 -5
- package/lib/components/SIcon.vue +2 -2
- package/lib/components/SInputBase.vue +4 -5
- package/lib/components/SInputCheckbox.vue +23 -23
- package/lib/components/SInputCheckboxes.vue +23 -23
- package/lib/components/SInputDate.vue +55 -132
- package/lib/components/SInputDropdown.vue +16 -5
- package/lib/components/SInputDropdownItem.vue +3 -0
- package/lib/components/SInputDropdownItemAvatar.vue +8 -3
- package/lib/components/SInputDropdownItemText.vue +9 -4
- package/lib/components/SInputFile.vue +1 -1
- package/lib/components/SInputNumber.vue +51 -50
- package/lib/components/SInputSelect.vue +48 -48
- package/lib/components/SInputSwitch.vue +68 -142
- package/lib/components/SInputSwitches.vue +51 -58
- package/lib/components/SInputText.vue +13 -2
- package/lib/components/SInputTextarea.vue +24 -24
- package/lib/components/SInputYMD.vue +1 -1
- package/lib/components/SLink.vue +14 -14
- package/lib/components/SMarkdown.vue +3 -3
- package/lib/components/SMount.vue +1 -1
- package/lib/components/SSheetFooterAction.vue +1 -1
- package/lib/components/SSpinner.vue +28 -12
- package/lib/components/SStep.vue +15 -15
- package/lib/components/SSteps.vue +16 -16
- package/lib/components/STable.vue +2 -2
- package/lib/components/STableCellAvatar.vue +1 -1
- package/lib/components/STableCellAvatars.vue +1 -1
- package/lib/components/STableCellDay.vue +1 -1
- package/lib/components/STableCellPill.vue +3 -2
- package/lib/components/STableColumn.vue +4 -4
- package/lib/components/STooltip.vue +17 -17
- package/lib/composables/Form.ts +7 -5
- package/lib/composables/Grid.ts +3 -3
- package/lib/composables/Markdown.ts +2 -2
- package/lib/composables/Tooltip.ts +2 -1
- package/lib/composables/Validation.ts +2 -2
- package/lib/support/Day.ts +1 -1
- package/lib/validation/rules/email.ts +1 -1
- package/lib/validation/rules/hms.ts +1 -1
- package/lib/validation/rules/maxLength.ts +1 -1
- package/lib/validation/rules/maxValue.ts +1 -1
- package/lib/validation/rules/minLength.ts +1 -1
- package/lib/validation/rules/minValue.ts +1 -1
- package/lib/validation/rules/required.ts +1 -1
- package/lib/validation/rules/requiredHms.ts +1 -1
- package/lib/validation/rules/requiredIf.ts +1 -1
- package/lib/validation/rules/requiredYmd.ts +1 -1
- package/lib/validation/rules/url.ts +1 -1
- package/lib/validation/rules/ymd.ts +1 -1
- package/lib/validation/validators/requiredYmd.ts +1 -1
- package/package.json +12 -15
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<SInputBase
|
|
3
|
-
class="SInputTextarea"
|
|
4
|
-
:class="classes"
|
|
5
|
-
:name="name"
|
|
6
|
-
:label="label"
|
|
7
|
-
:note="note"
|
|
8
|
-
:help="help"
|
|
9
|
-
:hide-error="hideError"
|
|
10
|
-
:validation="validation"
|
|
11
|
-
>
|
|
12
|
-
<textarea
|
|
13
|
-
:id="name"
|
|
14
|
-
class="input"
|
|
15
|
-
:placeholder="placeholder"
|
|
16
|
-
:rows="rows ?? 3"
|
|
17
|
-
:disabled="disabled"
|
|
18
|
-
:value="modelValue ?? ''"
|
|
19
|
-
@input="emitInput"
|
|
20
|
-
@blur="emitBlur"
|
|
21
|
-
/>
|
|
22
|
-
</SInputBase>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
1
|
<script setup lang="ts">
|
|
26
2
|
import { computed } from 'vue'
|
|
27
3
|
import { Validatable } from '../composables/Validation'
|
|
@@ -62,6 +38,30 @@ function emitBlur(e: FocusEvent): void {
|
|
|
62
38
|
}
|
|
63
39
|
</script>
|
|
64
40
|
|
|
41
|
+
<template>
|
|
42
|
+
<SInputBase
|
|
43
|
+
class="SInputTextarea"
|
|
44
|
+
:class="classes"
|
|
45
|
+
:name="name"
|
|
46
|
+
:label="label"
|
|
47
|
+
:note="note"
|
|
48
|
+
:help="help"
|
|
49
|
+
:hide-error="hideError"
|
|
50
|
+
:validation="validation"
|
|
51
|
+
>
|
|
52
|
+
<textarea
|
|
53
|
+
:id="name"
|
|
54
|
+
class="input"
|
|
55
|
+
:placeholder="placeholder"
|
|
56
|
+
:rows="rows ?? 3"
|
|
57
|
+
:disabled="disabled"
|
|
58
|
+
:value="modelValue ?? ''"
|
|
59
|
+
@input="emitInput"
|
|
60
|
+
@blur="emitBlur"
|
|
61
|
+
/>
|
|
62
|
+
</SInputBase>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
65
|
<style lang="postcss" scoped>
|
|
66
66
|
.SInputTextarea.mini {
|
|
67
67
|
.input {
|
package/lib/components/SLink.vue
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="component"
|
|
4
|
-
class="SLink"
|
|
5
|
-
:class="{ link: href }"
|
|
6
|
-
:href="href"
|
|
7
|
-
:to="href"
|
|
8
|
-
:target="target"
|
|
9
|
-
:rel="rel"
|
|
10
|
-
>
|
|
11
|
-
<slot />
|
|
12
|
-
</component>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
1
|
<script setup lang="ts">
|
|
16
2
|
import { computed } from 'vue'
|
|
17
3
|
|
|
@@ -34,3 +20,17 @@ const component = computed(() => {
|
|
|
34
20
|
const target = computed(() => isExternal.value ? '_blank' : null)
|
|
35
21
|
const rel = computed(() => isExternal.value ? 'noopener noreferrer' : null)
|
|
36
22
|
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<component
|
|
26
|
+
:is="component"
|
|
27
|
+
class="SLink"
|
|
28
|
+
:class="{ link: href }"
|
|
29
|
+
:href="href"
|
|
30
|
+
:to="href"
|
|
31
|
+
:target="target"
|
|
32
|
+
:rel="rel"
|
|
33
|
+
>
|
|
34
|
+
<slot />
|
|
35
|
+
</component>
|
|
36
|
+
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import { LinkCallback, LinkSubscriberPayload,
|
|
2
|
+
import { computed, nextTick, ref, watch } from 'vue'
|
|
3
|
+
import { LinkCallback, LinkSubscriberPayload, useLink, useMarkdown } from '../composables/Markdown'
|
|
4
4
|
|
|
5
5
|
const props = defineProps<{
|
|
6
6
|
tag?: string
|
|
@@ -29,7 +29,7 @@ watch(
|
|
|
29
29
|
{ immediate: true }
|
|
30
30
|
)
|
|
31
31
|
|
|
32
|
-
subscribe(
|
|
32
|
+
subscribe(payload => emit('clicked', payload))
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<template>
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<svg
|
|
2
|
+
<svg
|
|
3
|
+
class="SSpinner"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
viewBox="0 0 100 100"
|
|
6
|
+
preserveAspectRatio="xMidYMid"
|
|
7
|
+
>
|
|
3
8
|
<g transform="rotate(0 50 50)">
|
|
4
9
|
<rect
|
|
5
10
|
class="bar"
|
|
@@ -19,7 +24,8 @@
|
|
|
19
24
|
repeatCount="indefinite"
|
|
20
25
|
/>
|
|
21
26
|
</rect>
|
|
22
|
-
</g
|
|
27
|
+
</g>
|
|
28
|
+
<g transform="rotate(30 50 50)">
|
|
23
29
|
<rect
|
|
24
30
|
class="bar"
|
|
25
31
|
x="48"
|
|
@@ -38,7 +44,8 @@
|
|
|
38
44
|
repeatCount="indefinite"
|
|
39
45
|
/>
|
|
40
46
|
</rect>
|
|
41
|
-
</g
|
|
47
|
+
</g>
|
|
48
|
+
<g transform="rotate(60 50 50)">
|
|
42
49
|
<rect
|
|
43
50
|
class="bar"
|
|
44
51
|
x="48"
|
|
@@ -57,7 +64,8 @@
|
|
|
57
64
|
repeatCount="indefinite"
|
|
58
65
|
/>
|
|
59
66
|
</rect>
|
|
60
|
-
</g
|
|
67
|
+
</g>
|
|
68
|
+
<g transform="rotate(90 50 50)">
|
|
61
69
|
<rect
|
|
62
70
|
class="bar"
|
|
63
71
|
x="48"
|
|
@@ -76,7 +84,8 @@
|
|
|
76
84
|
repeatCount="indefinite"
|
|
77
85
|
/>
|
|
78
86
|
</rect>
|
|
79
|
-
</g
|
|
87
|
+
</g>
|
|
88
|
+
<g transform="rotate(120 50 50)">
|
|
80
89
|
<rect
|
|
81
90
|
class="bar"
|
|
82
91
|
x="48"
|
|
@@ -95,7 +104,8 @@
|
|
|
95
104
|
repeatCount="indefinite"
|
|
96
105
|
/>
|
|
97
106
|
</rect>
|
|
98
|
-
</g
|
|
107
|
+
</g>
|
|
108
|
+
<g transform="rotate(150 50 50)">
|
|
99
109
|
<rect
|
|
100
110
|
class="bar"
|
|
101
111
|
x="48"
|
|
@@ -114,7 +124,8 @@
|
|
|
114
124
|
repeatCount="indefinite"
|
|
115
125
|
/>
|
|
116
126
|
</rect>
|
|
117
|
-
</g
|
|
127
|
+
</g>
|
|
128
|
+
<g transform="rotate(180 50 50)">
|
|
118
129
|
<rect
|
|
119
130
|
class="bar"
|
|
120
131
|
x="48"
|
|
@@ -133,7 +144,8 @@
|
|
|
133
144
|
repeatCount="indefinite"
|
|
134
145
|
/>
|
|
135
146
|
</rect>
|
|
136
|
-
</g
|
|
147
|
+
</g>
|
|
148
|
+
<g transform="rotate(210 50 50)">
|
|
137
149
|
<rect
|
|
138
150
|
class="bar"
|
|
139
151
|
x="48"
|
|
@@ -152,7 +164,8 @@
|
|
|
152
164
|
repeatCount="indefinite"
|
|
153
165
|
/>
|
|
154
166
|
</rect>
|
|
155
|
-
</g
|
|
167
|
+
</g>
|
|
168
|
+
<g transform="rotate(240 50 50)">
|
|
156
169
|
<rect
|
|
157
170
|
class="bar"
|
|
158
171
|
x="48"
|
|
@@ -171,7 +184,8 @@
|
|
|
171
184
|
repeatCount="indefinite"
|
|
172
185
|
/>
|
|
173
186
|
</rect>
|
|
174
|
-
</g
|
|
187
|
+
</g>
|
|
188
|
+
<g transform="rotate(270 50 50)">
|
|
175
189
|
<rect
|
|
176
190
|
class="bar"
|
|
177
191
|
x="48"
|
|
@@ -190,7 +204,8 @@
|
|
|
190
204
|
repeatCount="indefinite"
|
|
191
205
|
/>
|
|
192
206
|
</rect>
|
|
193
|
-
</g
|
|
207
|
+
</g>
|
|
208
|
+
<g transform="rotate(300 50 50)">
|
|
194
209
|
<rect
|
|
195
210
|
class="bar"
|
|
196
211
|
x="48"
|
|
@@ -209,7 +224,8 @@
|
|
|
209
224
|
repeatCount="indefinite"
|
|
210
225
|
/>
|
|
211
226
|
</rect>
|
|
212
|
-
</g
|
|
227
|
+
</g>
|
|
228
|
+
<g transform="rotate(330 50 50)">
|
|
213
229
|
<rect
|
|
214
230
|
class="bar"
|
|
215
231
|
x="48"
|
package/lib/components/SStep.vue
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import IconCheck from '@iconify-icons/ph/check'
|
|
3
|
+
import IconX from '@iconify-icons/ph/x'
|
|
4
|
+
import { PropType } from 'vue'
|
|
5
|
+
import { BarMode, StepStatus } from '../composables/Step'
|
|
6
|
+
import SIcon from './SIcon.vue'
|
|
7
|
+
|
|
8
|
+
defineProps({
|
|
9
|
+
status: { type: String as PropType<StepStatus>, required: true },
|
|
10
|
+
barLeft: { type: String as PropType<BarMode | null>, default: null },
|
|
11
|
+
barRight: { type: String as PropType<BarMode | null>, default: null },
|
|
12
|
+
text: { type: String, default: null }
|
|
13
|
+
})
|
|
14
|
+
</script>
|
|
15
|
+
|
|
1
16
|
<template>
|
|
2
17
|
<div class="SStep" :class="[status]">
|
|
3
18
|
<div class="indicator">
|
|
@@ -14,21 +29,6 @@
|
|
|
14
29
|
</div>
|
|
15
30
|
</template>
|
|
16
31
|
|
|
17
|
-
<script setup lang="ts">
|
|
18
|
-
import IconCheck from '@iconify-icons/ph/check'
|
|
19
|
-
import IconX from '@iconify-icons/ph/x'
|
|
20
|
-
import { PropType } from 'vue'
|
|
21
|
-
import { StepStatus, BarMode } from '../composables/Step'
|
|
22
|
-
import SIcon from './SIcon.vue'
|
|
23
|
-
|
|
24
|
-
defineProps({
|
|
25
|
-
status: { type: String as PropType<StepStatus>, required: true },
|
|
26
|
-
barLeft: { type: String as PropType<BarMode | null>, default: null },
|
|
27
|
-
barRight: { type: String as PropType<BarMode | null>, default: null },
|
|
28
|
-
text: { type: String, default: null }
|
|
29
|
-
})
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
32
|
<style lang="postcss" scoped>
|
|
33
33
|
.SStep.upcoming {
|
|
34
34
|
.point { border-color: var(--c-divider); }
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="SSteps">
|
|
3
|
-
<SStep
|
|
4
|
-
v-for="(step, index) in steps"
|
|
5
|
-
:key="index"
|
|
6
|
-
class="item"
|
|
7
|
-
:style="{ width }"
|
|
8
|
-
:bar-left="getBarLeftMode(index)"
|
|
9
|
-
:bar-right="getBarRightMode(index)"
|
|
10
|
-
v-bind="step"
|
|
11
|
-
/>
|
|
12
|
-
</div>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
1
|
<script setup lang="ts">
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
2
|
+
import { PropType, computed } from 'vue'
|
|
3
|
+
import { BarMode, Step } from '../composables/Step'
|
|
18
4
|
import SStep from './SStep.vue'
|
|
19
5
|
|
|
20
6
|
const props = defineProps({
|
|
@@ -52,6 +38,20 @@ function isActive(step: Step): boolean {
|
|
|
52
38
|
}
|
|
53
39
|
</script>
|
|
54
40
|
|
|
41
|
+
<template>
|
|
42
|
+
<div class="SSteps">
|
|
43
|
+
<SStep
|
|
44
|
+
v-for="(step, index) in steps"
|
|
45
|
+
:key="index"
|
|
46
|
+
class="item"
|
|
47
|
+
:style="{ width }"
|
|
48
|
+
:bar-left="getBarLeftMode(index)"
|
|
49
|
+
:bar-right="getBarRightMode(index)"
|
|
50
|
+
v-bind="step"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
55
|
<style lang="postcss" scoped>
|
|
56
56
|
.SSteps {
|
|
57
57
|
display: flex;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { reactive, ref,
|
|
2
|
+
import { computed, reactive, ref, toRefs, watch } from 'vue'
|
|
3
3
|
import { Table } from '../composables/Table'
|
|
4
4
|
import SSpinner from './SSpinner.vue'
|
|
5
5
|
import STableCell from './STableCell.vue'
|
|
@@ -24,7 +24,7 @@ const {
|
|
|
24
24
|
loading,
|
|
25
25
|
onPrev,
|
|
26
26
|
onNext,
|
|
27
|
-
onReset
|
|
27
|
+
onReset
|
|
28
28
|
} = toRefs(props.options)
|
|
29
29
|
|
|
30
30
|
const head = ref<HTMLElement | null>(null)
|
|
@@ -17,7 +17,7 @@ const _name = computed(() => props.name?.(props.value, props.record))
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
|
-
<div class="STableCellAvatar" :class="[{ link}, color]">
|
|
20
|
+
<div class="STableCellAvatar" :class="[{ link }, color]">
|
|
21
21
|
<SLink class="container" :href="link?.(value, record)">
|
|
22
22
|
<div v-if="_image" class="avatar">
|
|
23
23
|
<SAvatar size="mini" :avatar="_image" :name="_name" />
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue'
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
export type Color = 'info' | 'success' | 'warning' | 'danger' | 'mute'
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
6
7
|
value?: any
|
|
7
8
|
record: any
|
|
8
9
|
getter?: string | ((value: any) => string)
|
|
9
|
-
color?:
|
|
10
|
+
color?: Color | ((value: any) => Color)
|
|
10
11
|
}>()
|
|
11
12
|
|
|
12
13
|
const _value = computed(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import IconDotsThree from '@iconify-icons/ph/dots-three'
|
|
3
|
-
import {
|
|
3
|
+
import { computed, nextTick, ref, unref, watch } from 'vue'
|
|
4
4
|
import { DropdownSection } from '../composables/Dropdown'
|
|
5
5
|
import { useFlyout } from '../composables/Flyout'
|
|
6
6
|
import { isArray } from '../support/Utils'
|
|
@@ -93,11 +93,11 @@ async function adjustDialogPosition() {
|
|
|
93
93
|
const position = (window.innerWidth - rect.right) > dialogWidth ? 'right' : 'left'
|
|
94
94
|
|
|
95
95
|
top.value = `${rect.top + rect.height - 8}px`
|
|
96
|
-
left.value
|
|
97
|
-
Math.max(
|
|
96
|
+
left.value
|
|
97
|
+
= `${Math.max(
|
|
98
98
|
16,
|
|
99
99
|
position === 'right' ? rect.left - 4 : rect.right - dialogWidth - 4
|
|
100
|
-
)
|
|
100
|
+
)}px`
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
function startDialogPositionListener() {
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { PropType, computed, ref } from 'vue'
|
|
3
|
+
import { Position, useTooltip } from '../composables/Tooltip'
|
|
4
|
+
import SMarkdown from './SMarkdown.vue'
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
tag: { type: String, default: 'span' },
|
|
8
|
+
text: { type: String, default: null },
|
|
9
|
+
position: { type: String as PropType<Position>, default: 'top' }
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
const tip = ref<HTMLElement | null>(null)
|
|
13
|
+
const content = ref<HTMLElement | null>(null)
|
|
14
|
+
const classes = computed(() => [props.position])
|
|
15
|
+
const { on, show, hide } = useTooltip(content, tip, props.position)
|
|
16
|
+
</script>
|
|
17
|
+
|
|
1
18
|
<template>
|
|
2
19
|
<component :is="tag" class="STooltip" @mouseenter="show" @mouseleave="hide">
|
|
3
20
|
<template v-if="text">
|
|
@@ -20,23 +37,6 @@
|
|
|
20
37
|
</component>
|
|
21
38
|
</template>
|
|
22
39
|
|
|
23
|
-
<script setup lang="ts">
|
|
24
|
-
import { computed, PropType, ref } from 'vue'
|
|
25
|
-
import { Position, useTooltip } from '../composables/Tooltip'
|
|
26
|
-
import SMarkdown from './SMarkdown.vue'
|
|
27
|
-
|
|
28
|
-
const props = defineProps({
|
|
29
|
-
tag: { type: String, default: 'span' },
|
|
30
|
-
text: { type: String, default: null },
|
|
31
|
-
position: { type: String as PropType<Position>, default: 'top' }
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
const tip = ref<HTMLElement | null>(null)
|
|
35
|
-
const content = ref<HTMLElement | null>(null)
|
|
36
|
-
const classes = computed(() => [props.position])
|
|
37
|
-
const { on, show, hide } = useTooltip(content, tip, props.position)
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
40
|
<style lang="postcss" scoped>
|
|
41
41
|
.STooltip {
|
|
42
42
|
position: relative;
|
package/lib/composables/Form.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import cloneDeep from 'lodash-es/cloneDeep'
|
|
2
|
-
import { Ref, reactive } from 'vue'
|
|
2
|
+
import { Ref, computed, reactive } from 'vue'
|
|
3
3
|
import { useSnackbars } from '../stores/Snackbars'
|
|
4
4
|
import { Validation, useValidation } from './Validation'
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ export interface Form<T extends Record<string, any>> {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export interface UseFormOptions<T extends Record<string, any>> {
|
|
16
|
-
data: T
|
|
16
|
+
data: T
|
|
17
17
|
rules?: Record<string, any> | ((state: T) => Record<string, any>)
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -26,9 +26,11 @@ export function useForm<
|
|
|
26
26
|
|
|
27
27
|
const data = reactive(options.data)
|
|
28
28
|
|
|
29
|
-
const rules =
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const rules = computed(() => {
|
|
30
|
+
return options.rules
|
|
31
|
+
? typeof options.rules === 'function' ? options.rules(data) : options.rules
|
|
32
|
+
: {}
|
|
33
|
+
})
|
|
32
34
|
|
|
33
35
|
const validation = useValidation(data, rules)
|
|
34
36
|
|
package/lib/composables/Grid.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ref,
|
|
1
|
+
import { Ref, onMounted, onUnmounted, ref, watchEffect } from 'vue'
|
|
2
2
|
|
|
3
3
|
export interface Grid {
|
|
4
4
|
container: Ref<HTMLElement | null>
|
|
@@ -69,7 +69,7 @@ export function useGrid(options: UseGridOptions): Grid {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
function toClassSelector(name: string) {
|
|
72
|
-
return name.startsWith('.') ? name :
|
|
72
|
+
return name.startsWith('.') ? name : `.${name}`
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
function toClassName(name: string) {
|
|
@@ -84,7 +84,7 @@ function createSpacers(size: number, tag: string, classes: string, type: 'fill'
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
if (type === 'fill') {
|
|
87
|
-
const spacer = createSpacer(tag, classes, { gridColumn: `span ${size}`})
|
|
87
|
+
const spacer = createSpacer(tag, classes, { gridColumn: `span ${size}` })
|
|
88
88
|
|
|
89
89
|
fragment.appendChild(spacer)
|
|
90
90
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import MarkdownIt from 'markdown-it'
|
|
2
|
-
import {
|
|
2
|
+
import { Ref, onUnmounted } from 'vue'
|
|
3
3
|
import { useRouter } from 'vue-router'
|
|
4
|
-
import { isCallbackUrl, isExternalUrl,
|
|
4
|
+
import { LinkAttrs, isCallbackUrl, isExternalUrl, linkPlugin } from './markdown/LinkPlugin'
|
|
5
5
|
|
|
6
6
|
export type UseMarkdown = (source: string, inline: boolean) => string
|
|
7
7
|
|
package/lib/support/Day.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { helpers } from '@vuelidate/validators'
|
|
2
|
-
import { hms as baseHms
|
|
2
|
+
import { Hms, HmsType, hms as baseHms } from '../validators/hms'
|
|
3
3
|
|
|
4
4
|
export function hms(required?: HmsType[], msg?: string) {
|
|
5
5
|
return helpers.withMessage(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { helpers } from '@vuelidate/validators'
|
|
2
|
-
import { requiredHms as baseRequiredHms
|
|
2
|
+
import { Hms, HmsType, requiredHms as baseRequiredHms } from '../validators/requiredHms'
|
|
3
3
|
|
|
4
4
|
export function requiredHms(required?: HmsType[], msg?: string) {
|
|
5
5
|
return helpers.withMessage(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { helpers } from '@vuelidate/validators'
|
|
2
|
-
import { requiredYmd as baseRequiredYmd
|
|
2
|
+
import { Ymd, YmdType, requiredYmd as baseRequiredYmd } from '../validators/requiredYmd'
|
|
3
3
|
|
|
4
4
|
export function requiredYmd(required?: YmdType[], msg?: string) {
|
|
5
5
|
return helpers.withMessage(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { helpers } from '@vuelidate/validators'
|
|
2
|
-
import { ymd as baseYmd
|
|
2
|
+
import { Ymd, YmdType, ymd as baseYmd } from '../validators/ymd'
|
|
3
3
|
|
|
4
4
|
export function ymd(required?: YmdType[], msg?: string) {
|
|
5
5
|
return helpers.withMessage(
|