@dataloop-ai/components 0.19.56 → 0.19.58
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/package.json +1 -1
- package/src/components/compound/DlDateTime/DlDateTimeRange/DlDateTimeRange.vue +3 -0
- package/src/components/compound/DlTable/DlTable.vue +2 -0
- package/src/demos/DlDateTimeRangeDemo.vue +44 -0
- package/src/demos/DlInputDemo.vue +22 -2
- package/src/demos/DlTableDemo.vue +1 -0
- package/src/utils/resizable-table.ts +4 -1
package/package.json
CHANGED
|
@@ -1291,6 +1291,7 @@ export default defineComponent({
|
|
|
1291
1291
|
const setIsDragging = (val: boolean) => (isDragging.value = val)
|
|
1292
1292
|
const getIsDragging = () => isDragging.value
|
|
1293
1293
|
const getIsResizing = () => isResizing.value
|
|
1294
|
+
const getVisibleColumnsState = () => visibleColumnsState.value
|
|
1294
1295
|
|
|
1295
1296
|
// table slots
|
|
1296
1297
|
const hasSlotByName = (name: string) => !!slots[name]
|
|
@@ -1905,6 +1906,7 @@ export default defineComponent({
|
|
|
1905
1906
|
setIsDragging,
|
|
1906
1907
|
getIsResizing,
|
|
1907
1908
|
getIsDragging,
|
|
1909
|
+
getVisibleColumnsState,
|
|
1908
1910
|
getTableKey
|
|
1909
1911
|
})
|
|
1910
1912
|
|
|
@@ -101,6 +101,50 @@
|
|
|
101
101
|
@change="handleModelValueUpdate"
|
|
102
102
|
/>
|
|
103
103
|
</div>
|
|
104
|
+
<div style="width: 500px">
|
|
105
|
+
<div
|
|
106
|
+
v-if="date"
|
|
107
|
+
class="row"
|
|
108
|
+
style="
|
|
109
|
+
width: 100%;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
"
|
|
113
|
+
>
|
|
114
|
+
to
|
|
115
|
+
<input
|
|
116
|
+
type="date"
|
|
117
|
+
:disabled="!range"
|
|
118
|
+
:value="date.from"
|
|
119
|
+
class="dl-dtr--range-input"
|
|
120
|
+
placeholder="from"
|
|
121
|
+
@input="date.from = new Date($event.target.value)"
|
|
122
|
+
>
|
|
123
|
+
|
|
124
|
+
from
|
|
125
|
+
<input
|
|
126
|
+
type="date"
|
|
127
|
+
:disabled="!range"
|
|
128
|
+
:value="date.to"
|
|
129
|
+
class="dl-dtr--range-input"
|
|
130
|
+
placeholder="from"
|
|
131
|
+
@input="date.to = new Date($event.target.value)"
|
|
132
|
+
>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
vmodel date: {{ date }}
|
|
136
|
+
<dl-date-time-range
|
|
137
|
+
v-model="date"
|
|
138
|
+
:type="type"
|
|
139
|
+
width="100%"
|
|
140
|
+
:available-range="range ? availableRange : null"
|
|
141
|
+
:mode="mode"
|
|
142
|
+
:show-time="showTime"
|
|
143
|
+
:auto-close="autoClose"
|
|
144
|
+
@set-type="handleSetType"
|
|
145
|
+
@change="handleModelValueUpdate"
|
|
146
|
+
/>
|
|
147
|
+
</div>
|
|
104
148
|
</div>
|
|
105
149
|
</template>
|
|
106
150
|
<script lang="ts">
|
|
@@ -6,13 +6,22 @@
|
|
|
6
6
|
<div>This is to test v-model reactivity</div>
|
|
7
7
|
<dl-input
|
|
8
8
|
v-model="textVal"
|
|
9
|
-
placeholder="
|
|
9
|
+
placeholder="Test reactivity"
|
|
10
|
+
/>
|
|
11
|
+
<dl-input
|
|
12
|
+
v-model="textVal"
|
|
13
|
+
placeholder="Test reactivity disabled"
|
|
10
14
|
disabled
|
|
11
15
|
/>
|
|
12
16
|
<dl-input
|
|
13
17
|
v-model="textVal"
|
|
14
18
|
disabled
|
|
15
19
|
/>
|
|
20
|
+
<dl-input
|
|
21
|
+
v-model="textVal"
|
|
22
|
+
readonly
|
|
23
|
+
/>
|
|
24
|
+
<dl-input v-model="trimmedValue" />
|
|
16
25
|
</div>
|
|
17
26
|
|
|
18
27
|
<dl-input
|
|
@@ -238,7 +247,7 @@
|
|
|
238
247
|
</template>
|
|
239
248
|
<script lang="ts">
|
|
240
249
|
import { v4 } from 'uuid'
|
|
241
|
-
import { defineComponent, ref } from 'vue-demi'
|
|
250
|
+
import { computed, defineComponent, ref } from 'vue-demi'
|
|
242
251
|
import { DlInput, DlButton, DlIcon } from '../components'
|
|
243
252
|
import { DlInputFile } from '../components/compound/DlInput/types'
|
|
244
253
|
export default defineComponent({
|
|
@@ -284,9 +293,20 @@ export default defineComponent({
|
|
|
284
293
|
|
|
285
294
|
const textVal = ref<string>('test me')
|
|
286
295
|
|
|
296
|
+
const val = ref('')
|
|
297
|
+
const trimmedValue = computed<string>({
|
|
298
|
+
get: () => {
|
|
299
|
+
return textVal.value.trim()
|
|
300
|
+
},
|
|
301
|
+
set: (value: string) => {
|
|
302
|
+
textVal.value = value
|
|
303
|
+
}
|
|
304
|
+
})
|
|
305
|
+
|
|
287
306
|
return {
|
|
288
307
|
log: console.log,
|
|
289
308
|
textVal,
|
|
309
|
+
trimmedValue,
|
|
290
310
|
textInputValue,
|
|
291
311
|
passFieldValue,
|
|
292
312
|
warningFieldValue,
|
|
@@ -17,7 +17,10 @@ export function applyResizableColumns(table: HTMLTableElement, vm: any) {
|
|
|
17
17
|
let targetIndex: number = null
|
|
18
18
|
|
|
19
19
|
watch(
|
|
20
|
-
|
|
20
|
+
[
|
|
21
|
+
() => vm.proxy.getIsDragging(),
|
|
22
|
+
() => vm.proxy.getVisibleColumnsState()
|
|
23
|
+
],
|
|
21
24
|
() => {
|
|
22
25
|
const vnodeEl = isVue2 ? vm.vnode.elm : vm.vnode.el
|
|
23
26
|
table = vnodeEl?.querySelector('table')
|