@xy-planning-network/trees 0.11.6-dev-4 → 0.11.6-dev-5
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
CHANGED
|
@@ -169,7 +169,11 @@ const bulkActions = computed(() => {
|
|
|
169
169
|
...action,
|
|
170
170
|
disabled: selected.value.length === 0 || action.disabled,
|
|
171
171
|
onClick: () =>
|
|
172
|
-
action.onClick.apply(undefined, [
|
|
172
|
+
action.onClick.apply(undefined, [
|
|
173
|
+
selected.value,
|
|
174
|
+
undefined,
|
|
175
|
+
publicMethods,
|
|
176
|
+
]),
|
|
173
177
|
}
|
|
174
178
|
})
|
|
175
179
|
})
|
|
@@ -85,7 +85,9 @@ const range = computed(() => {
|
|
|
85
85
|
class="flex flex-col items-center space-y-3.5 sm:flex-row sm:space-y-0 sm:gap-x-3 sm:justify-center"
|
|
86
86
|
>
|
|
87
87
|
<!--Range details-->
|
|
88
|
-
<p
|
|
88
|
+
<p
|
|
89
|
+
class="text-center text-sm text-neutral-700 sm:text-left sm:mr-auto sm:w-1/3"
|
|
90
|
+
>
|
|
89
91
|
Showing
|
|
90
92
|
<span class="font-medium">{{ range.start }}</span>
|
|
91
93
|
to
|
|
@@ -95,46 +97,50 @@ const range = computed(() => {
|
|
|
95
97
|
results
|
|
96
98
|
</p>
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
100
|
+
<div
|
|
101
|
+
class="flex flex-col items-center space-y-3.5 sm:flex-row sm:space-y-0 sm:gap-x-3 sm:flex-1"
|
|
102
|
+
>
|
|
103
|
+
<!--Pager-->
|
|
104
|
+
<div class="flex gap-3 items-center justify-center shrink-0 md:w-1/2">
|
|
105
|
+
<button
|
|
106
|
+
class="xy-btn-neutral"
|
|
107
|
+
:disabled="page <= 1"
|
|
108
|
+
type="button"
|
|
109
|
+
@click.prevent="page--"
|
|
110
|
+
>
|
|
111
|
+
← <span class="sr-only">Previous</span>
|
|
112
|
+
</button>
|
|
113
|
+
|
|
114
|
+
<div class="max-w-[50px]">
|
|
115
|
+
<NumberInput
|
|
116
|
+
:model-value="page"
|
|
117
|
+
:min="1"
|
|
118
|
+
:max="pagination.totalPages"
|
|
119
|
+
type="number"
|
|
120
|
+
@update:model-value="debouncePageInput"
|
|
121
|
+
@keydown.down.prevent="onDown"
|
|
122
|
+
@keydown.up.prevent="onUp"
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<div class="text-sm">
|
|
127
|
+
of <span class="font-medium">{{ pagination.totalPages }}</span>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<button
|
|
131
|
+
class="xy-btn-neutral"
|
|
132
|
+
:disabled="page >= pagination.totalPages"
|
|
133
|
+
type="button"
|
|
134
|
+
@click.prevent="page++"
|
|
135
|
+
>
|
|
136
|
+
<span class="sr-only">Next</span> →
|
|
137
|
+
</button>
|
|
119
138
|
</div>
|
|
120
139
|
|
|
121
|
-
|
|
122
|
-
|
|
140
|
+
<!--Per Page Selector-->
|
|
141
|
+
<div class="max-w-[150px] sm:ml-auto">
|
|
142
|
+
<Select v-model="perPage" :options="pageSelectOpts" />
|
|
123
143
|
</div>
|
|
124
|
-
|
|
125
|
-
<button
|
|
126
|
-
class="xy-btn-neutral"
|
|
127
|
-
:disabled="page >= pagination.totalPages"
|
|
128
|
-
type="button"
|
|
129
|
-
@click.prevent="page++"
|
|
130
|
-
>
|
|
131
|
-
<span class="sr-only">Next</span> →
|
|
132
|
-
</button>
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<!--Per Page Selector-->
|
|
136
|
-
<div class="max-w-[150px] sm:ml-auto">
|
|
137
|
-
<Select v-model="perPage" :options="pageSelectOpts" />
|
|
138
144
|
</div>
|
|
139
145
|
</div>
|
|
140
146
|
</template>
|
|
@@ -58,10 +58,11 @@ export interface TableBulkActionItem extends ActionItem {
|
|
|
58
58
|
/**
|
|
59
59
|
* The callback method triggered by the action item buttons click event.
|
|
60
60
|
* @param selected the array of selected rows by the primary key `id`
|
|
61
|
+
* @param _ NOTE(spk): Holding for T[]
|
|
61
62
|
* @param tableAPI DynamicTableAPI
|
|
62
63
|
* @returns void
|
|
63
64
|
*/
|
|
64
|
-
onClick: (selected: number[], tableAPI: DynamicTableAPI) => void;
|
|
65
|
+
onClick: (selected: number[], _: undefined, tableAPI: DynamicTableAPI) => void;
|
|
65
66
|
/**
|
|
66
67
|
* Whether or not to visible show the action item in the UI. When all action items
|
|
67
68
|
* on a table a hidden with show: false, bulk selections are disabled for the table.
|