@onereach/ui-components 11.3.1 → 11.3.2-beta.4417.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/dist/bundled/v2/components/OrDataGridV3/OrDataGrid.js +1 -1
- package/dist/bundled/v2/components/OrDataGridV3/index.js +1 -1
- package/dist/bundled/v2/components/OrPaginationV3/OrPagination.js +91 -51
- package/dist/bundled/v2/components/OrPaginationV3/OrPagination.vue.d.ts +40 -9
- package/dist/bundled/v2/components/OrPaginationV3/styles.d.ts +1 -3
- package/dist/bundled/v2/components/OrPaginationV3/styles.js +2 -12
- package/dist/bundled/v2/components/OrPaginationV3/types.d.ts +4 -0
- package/dist/bundled/v2/components/index.js +1 -1
- package/dist/bundled/v2/index.js +1 -1
- package/dist/bundled/v3/components/OrDataGridV3/OrDataGrid.js +1 -1
- package/dist/bundled/v3/components/OrDataGridV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDataGridV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrDataGridV3-ab1277d5.js → OrDataGridV3-53537045.js} +1 -1
- package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +1 -1
- package/dist/bundled/v3/components/OrPaginationV3/OrPagination.vue.d.ts +16 -5
- package/dist/bundled/v3/components/OrPaginationV3/index.js +1 -1
- package/dist/bundled/v3/components/OrPaginationV3/styles.d.ts +1 -3
- package/dist/bundled/v3/components/OrPaginationV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrPaginationV3/types.d.ts +4 -0
- package/dist/bundled/v3/components/{OrPaginationV3-a460d1bb.js → OrPaginationV3-4576ee90.js} +101 -66
- package/dist/bundled/v3/components/index.js +2 -2
- package/dist/bundled/v3/index.js +2 -2
- package/dist/esm/v2/{OrDataGrid-1bdd2499.js → OrDataGrid-9e29b831.js} +1 -1
- package/dist/esm/v2/{OrPagination-1b153a54.js → OrPagination-2d6fbd4b.js} +91 -61
- package/dist/esm/v2/components/index.js +2 -2
- package/dist/esm/v2/components/or-data-grid-v3/index.js +2 -2
- package/dist/esm/v2/components/or-pagination-v3/OrPagination.vue.d.ts +40 -9
- package/dist/esm/v2/components/or-pagination-v3/index.js +1 -1
- package/dist/esm/v2/components/or-pagination-v3/styles.d.ts +1 -3
- package/dist/esm/v2/components/or-pagination-v3/types.d.ts +4 -0
- package/dist/esm/v2/index.js +2 -2
- package/dist/esm/v3/{OrDataGrid-c7a65d77.js → OrDataGrid-c68a7070.js} +1 -1
- package/dist/esm/v3/{OrPagination-6bb85ce5.js → OrPagination-42ad7478.js} +100 -65
- package/dist/esm/v3/components/index.js +2 -2
- package/dist/esm/v3/components/or-data-grid-v3/index.js +2 -2
- package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +16 -5
- package/dist/esm/v3/components/or-pagination-v3/index.js +1 -1
- package/dist/esm/v3/components/or-pagination-v3/styles.d.ts +1 -3
- package/dist/esm/v3/components/or-pagination-v3/types.d.ts +4 -0
- package/dist/esm/v3/index.js +2 -2
- package/package.json +2 -3
- package/src/components/or-pagination-v3/OrPagination.vue +109 -68
- package/src/components/or-pagination-v3/styles.ts +1 -17
- package/src/components/or-pagination-v3/types.ts +5 -0
- /package/dist/bundled/v2/{OrDataGrid-13e9299a.js → OrDataGrid-0f6770b0.js} +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { PaginationModelValue } from './types';
|
|
2
|
+
import { PaginationFeatures, PaginationModelValue } from './types';
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
|
+
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
5
6
|
limitButton: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
6
7
|
[x: string]: ((...args: any[]) => any) | null;
|
|
7
8
|
} | string[], {} & {}, {
|
|
@@ -14,11 +15,20 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
14
15
|
[x: number]: string;
|
|
15
16
|
} | {}, true> | undefined>;
|
|
16
17
|
limitMenuRoot: import("@vue/composition-api").ComputedRef<undefined>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
offsetButton: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
19
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
20
|
+
} | string[], {} & {}, {
|
|
21
|
+
[x: number]: string;
|
|
22
|
+
} | {}, true> | undefined>;
|
|
23
|
+
offsetButtonRoot: import("@vue/composition-api").ComputedRef<undefined>;
|
|
24
|
+
offsetMenu: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
25
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
26
|
+
} | string[], {} & {}, {
|
|
27
|
+
[x: number]: string;
|
|
28
|
+
} | {}, true> | undefined>;
|
|
29
|
+
offsetMenuRoot: import("@vue/composition-api").ComputedRef<undefined>;
|
|
20
30
|
itemStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
21
|
-
|
|
31
|
+
model: import("../../hooks").UseProxyModelValueReturn<PaginationModelValue>;
|
|
22
32
|
currentLimit: import("@vue/composition-api").WritableComputedRef<number>;
|
|
23
33
|
currentOffset: import("@vue/composition-api").WritableComputedRef<number>;
|
|
24
34
|
currentPage: import("@vue/composition-api").WritableComputedRef<number>;
|
|
@@ -43,6 +53,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
43
53
|
type: PropType<number[]>;
|
|
44
54
|
default: () => number[];
|
|
45
55
|
};
|
|
56
|
+
features: {
|
|
57
|
+
type: PropType<PaginationFeatures>;
|
|
58
|
+
default: () => PaginationFeatures;
|
|
59
|
+
};
|
|
46
60
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
47
61
|
modelValue: {
|
|
48
62
|
type: PropType<PaginationModelValue>;
|
|
@@ -56,14 +70,20 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
56
70
|
type: PropType<number[]>;
|
|
57
71
|
default: () => number[];
|
|
58
72
|
};
|
|
73
|
+
features: {
|
|
74
|
+
type: PropType<PaginationFeatures>;
|
|
75
|
+
default: () => PaginationFeatures;
|
|
76
|
+
};
|
|
59
77
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
60
78
|
length: number;
|
|
61
79
|
modelValue: PaginationModelValue;
|
|
62
80
|
options: number[];
|
|
81
|
+
features: PaginationFeatures;
|
|
63
82
|
} & {} & {
|
|
64
83
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
65
84
|
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
66
85
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
86
|
+
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
67
87
|
limitButton: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
68
88
|
[x: string]: ((...args: any[]) => any) | null;
|
|
69
89
|
} | string[], {} & {}, {
|
|
@@ -76,11 +96,20 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
76
96
|
[x: number]: string;
|
|
77
97
|
} | {}, true> | undefined>;
|
|
78
98
|
limitMenuRoot: import("@vue/composition-api").ComputedRef<undefined>;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
99
|
+
offsetButton: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
100
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
101
|
+
} | string[], {} & {}, {
|
|
102
|
+
[x: number]: string;
|
|
103
|
+
} | {}, true> | undefined>;
|
|
104
|
+
offsetButtonRoot: import("@vue/composition-api").ComputedRef<undefined>;
|
|
105
|
+
offsetMenu: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
106
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
107
|
+
} | string[], {} & {}, {
|
|
108
|
+
[x: number]: string;
|
|
109
|
+
} | {}, true> | undefined>;
|
|
110
|
+
offsetMenuRoot: import("@vue/composition-api").ComputedRef<undefined>;
|
|
82
111
|
itemStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
83
|
-
|
|
112
|
+
model: import("../../hooks").UseProxyModelValueReturn<PaginationModelValue>;
|
|
84
113
|
currentLimit: import("@vue/composition-api").WritableComputedRef<number>;
|
|
85
114
|
currentOffset: import("@vue/composition-api").WritableComputedRef<number>;
|
|
86
115
|
currentPage: import("@vue/composition-api").WritableComputedRef<number>;
|
|
@@ -96,10 +125,12 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
96
125
|
length: number;
|
|
97
126
|
modelValue: PaginationModelValue;
|
|
98
127
|
options: number[];
|
|
128
|
+
features: PaginationFeatures;
|
|
99
129
|
} & {} & {
|
|
100
130
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
101
131
|
}, {
|
|
102
132
|
modelValue: PaginationModelValue;
|
|
103
133
|
options: number[];
|
|
134
|
+
features: PaginationFeatures;
|
|
104
135
|
}, true>);
|
|
105
136
|
export default _default;
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -34,7 +34,7 @@ export { _ as OrCombinedInputV3 } from './OrCombinedInput-4b19d4b3.js';
|
|
|
34
34
|
export { _ as OrConfirm } from './OrConfirm-4b5fdad4.js';
|
|
35
35
|
export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-b97c00de.js';
|
|
36
36
|
export { _ as OrContextMenuV3 } from './OrContextMenu-180a83f8.js';
|
|
37
|
-
export { _ as OrDataGridV3 } from './OrDataGrid-
|
|
37
|
+
export { _ as OrDataGridV3 } from './OrDataGrid-9e29b831.js';
|
|
38
38
|
export { D as DataGridVariant } from './OrDataGridToolbar-4611a09b.js';
|
|
39
39
|
export { _ as OrDateFormatV3 } from './OrDateFormat-5122f872.js';
|
|
40
40
|
export { _ as OrDatePickerV3 } from './OrDatePicker-83367e4e.js';
|
|
@@ -89,7 +89,7 @@ export { _ as OrNumberInput } from './OrNumberInput-b00163b4.js';
|
|
|
89
89
|
export { _ as OrOverflowMenu } from './OrOverflowMenu-7be5525a.js';
|
|
90
90
|
export { _ as OrOverlay } from './OrOverlay-ccec2218.js';
|
|
91
91
|
export { _ as OrOverlayV3 } from './OrOverlay-23008721.js';
|
|
92
|
-
export { _ as OrPaginationV3 } from './OrPagination-
|
|
92
|
+
export { _ as OrPaginationV3 } from './OrPagination-2d6fbd4b.js';
|
|
93
93
|
export { _ as OrPassword } from './OrPassword-d530c522.js';
|
|
94
94
|
export { _ as OrPopoverV3, a as PopoverPlacement, P as PopoverVariant } from './OrPopover-8c1fdbe0.js';
|
|
95
95
|
export { i as isPrevented } from './isPrevented-b151a948.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed } from 'vue-demi';
|
|
2
2
|
import { s as script$1 } from './OrCheckbox-98127253.js';
|
|
3
|
-
import { s as script$f } from './OrPagination-
|
|
3
|
+
import { s as script$f } from './OrPagination-42ad7478.js';
|
|
4
4
|
import { s as script$g } from './OrSearch-db35b8bf.js';
|
|
5
5
|
import { s as script$2, a as script$3, b as script$4, c as script$5, d as script$6, e as script$7, f as script$8, g as script$9, h as script$a, i as script$b, j as script$c, k as script$d, l as script$e, D as DataGridVariant } from './OrDataGridToolbar-9c02f848.js';
|
|
6
6
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createSlots, withCtx, renderSlot, createBlock, createCommentVNode, Fragment, renderList, createTextVNode, toDisplayString } from 'vue';
|
|
@@ -9,9 +9,9 @@ import { s as script$1 } from './OrButton-31bcb511.js';
|
|
|
9
9
|
import { s as script$2 } from './OrIcon-9aff520e.js';
|
|
10
10
|
import { s as script$4 } from './OrMenuItem-511d42b6.js';
|
|
11
11
|
import { s as script$3 } from './OrMenu-d63778a7.js';
|
|
12
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createVNode, withCtx, Fragment, renderList, createBlock,
|
|
12
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createTextVNode, createVNode, withCtx, toDisplayString, Fragment, renderList, createBlock, createCommentVNode } from 'vue';
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const Pagination = [
|
|
15
15
|
// Layout
|
|
16
16
|
'layout-row',
|
|
17
17
|
// Spacing
|
|
@@ -20,16 +20,6 @@ const PaginationRoot = [
|
|
|
20
20
|
'typography-caption-regular',
|
|
21
21
|
// Theme
|
|
22
22
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
|
|
23
|
-
const PaginationOffsetControl = [
|
|
24
|
-
// Layout
|
|
25
|
-
'layout-row',
|
|
26
|
-
// Spacing
|
|
27
|
-
'gap-md'];
|
|
28
|
-
const PaginationLimitControl = [
|
|
29
|
-
// Layout
|
|
30
|
-
'layout-row',
|
|
31
|
-
// Spacing
|
|
32
|
-
'gap-sm'];
|
|
33
23
|
const PaginationItem = [
|
|
34
24
|
// Typography
|
|
35
25
|
'typography-caption-regular',
|
|
@@ -60,13 +50,21 @@ var script = defineComponent({
|
|
|
60
50
|
options: {
|
|
61
51
|
type: Array,
|
|
62
52
|
default: () => [50, 20, 10, 5]
|
|
53
|
+
},
|
|
54
|
+
features: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default: () => ({
|
|
57
|
+
limit: true,
|
|
58
|
+
range: true
|
|
59
|
+
})
|
|
63
60
|
}
|
|
64
61
|
},
|
|
65
62
|
emits: ['update:modelValue'],
|
|
66
63
|
expose: ['root'],
|
|
67
64
|
setup(props, context) {
|
|
68
|
-
// Refs
|
|
65
|
+
// Refs & Styles
|
|
69
66
|
const root = ref();
|
|
67
|
+
const rootStyles = computed(() => ['or-pagination-v3', ...Pagination]);
|
|
70
68
|
const limitButton = ref();
|
|
71
69
|
const limitButtonRoot = computed(() => {
|
|
72
70
|
var _a;
|
|
@@ -77,20 +75,26 @@ var script = defineComponent({
|
|
|
77
75
|
var _a;
|
|
78
76
|
return (_a = limitMenu.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
79
77
|
});
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
const offsetButton = ref();
|
|
79
|
+
const offsetButtonRoot = computed(() => {
|
|
80
|
+
var _a;
|
|
81
|
+
return (_a = offsetButton.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
82
|
+
});
|
|
83
|
+
const offsetMenu = ref();
|
|
84
|
+
const offsetMenuRoot = computed(() => {
|
|
85
|
+
var _a;
|
|
86
|
+
return (_a = offsetMenu.value) === null || _a === void 0 ? void 0 : _a.root;
|
|
87
|
+
});
|
|
84
88
|
const itemStyles = computed(() => [...PaginationItem]);
|
|
85
89
|
// State
|
|
86
|
-
const
|
|
90
|
+
const model = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
87
91
|
const currentLimit = computed({
|
|
88
92
|
get: () => {
|
|
89
93
|
var _a, _b;
|
|
90
|
-
return (_b = (_a =
|
|
94
|
+
return (_b = (_a = model.value) === null || _a === void 0 ? void 0 : _a.limit) !== null && _b !== void 0 ? _b : props.options[0];
|
|
91
95
|
},
|
|
92
96
|
set: value => {
|
|
93
|
-
|
|
97
|
+
model.value = {
|
|
94
98
|
limit: value,
|
|
95
99
|
offset: 0
|
|
96
100
|
};
|
|
@@ -99,10 +103,10 @@ var script = defineComponent({
|
|
|
99
103
|
const currentOffset = computed({
|
|
100
104
|
get: () => {
|
|
101
105
|
var _a, _b;
|
|
102
|
-
return (_b = (_a =
|
|
106
|
+
return (_b = (_a = model.value) === null || _a === void 0 ? void 0 : _a.offset) !== null && _b !== void 0 ? _b : 0;
|
|
103
107
|
},
|
|
104
108
|
set: value => {
|
|
105
|
-
|
|
109
|
+
model.value = {
|
|
106
110
|
limit: currentLimit.value,
|
|
107
111
|
offset: value
|
|
108
112
|
};
|
|
@@ -165,15 +169,17 @@ var script = defineComponent({
|
|
|
165
169
|
} = useResponsive();
|
|
166
170
|
return {
|
|
167
171
|
root,
|
|
172
|
+
rootStyles,
|
|
168
173
|
limitButton,
|
|
169
174
|
limitButtonRoot,
|
|
170
175
|
limitMenu,
|
|
171
176
|
limitMenuRoot,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
offsetButton,
|
|
178
|
+
offsetButtonRoot,
|
|
179
|
+
offsetMenu,
|
|
180
|
+
offsetMenuRoot,
|
|
175
181
|
itemStyles,
|
|
176
|
-
|
|
182
|
+
model,
|
|
177
183
|
currentLimit,
|
|
178
184
|
currentOffset,
|
|
179
185
|
currentPage,
|
|
@@ -189,6 +195,16 @@ var script = defineComponent({
|
|
|
189
195
|
}
|
|
190
196
|
});
|
|
191
197
|
|
|
198
|
+
const _hoisted_1 = {
|
|
199
|
+
class: /*#__PURE__*/normalizeClass(['layout-row', 'gap-md', 'shrink-0'])
|
|
200
|
+
};
|
|
201
|
+
const _hoisted_2 = {
|
|
202
|
+
key: 0,
|
|
203
|
+
class: /*#__PURE__*/normalizeClass(['layout-row', 'gap-sm'])
|
|
204
|
+
};
|
|
205
|
+
const _hoisted_3 = {
|
|
206
|
+
class: /*#__PURE__*/normalizeClass(['layout-row', 'gap-md', 'shrink-0'])
|
|
207
|
+
};
|
|
192
208
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
193
209
|
const _component_OrIcon = resolveComponent("OrIcon");
|
|
194
210
|
const _component_OrButton = resolveComponent("OrButton");
|
|
@@ -197,22 +213,56 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
197
213
|
return openBlock(), createElementBlock("div", {
|
|
198
214
|
ref: 'root',
|
|
199
215
|
class: normalizeClass(_ctx.rootStyles)
|
|
200
|
-
}, [createElementVNode("div", {
|
|
201
|
-
|
|
202
|
-
|
|
216
|
+
}, [createElementVNode("div", _hoisted_1, [_ctx.features.limit ? (openBlock(), createElementBlock("div", _hoisted_2, [createTextVNode(" Per page: "), createVNode(_component_OrButton, {
|
|
217
|
+
ref: 'limitButton',
|
|
218
|
+
class: normalizeClass(_ctx.itemStyles),
|
|
219
|
+
variant: 'link',
|
|
220
|
+
color: 'inherit',
|
|
221
|
+
activated: true,
|
|
222
|
+
onClick: _cache[0] || (_cache[0] = $event => _ctx.limitMenu && _ctx.limitMenu.open())
|
|
223
|
+
}, {
|
|
224
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.currentLimit) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
|
|
225
|
+
icon: _ctx.limitMenu && _ctx.limitMenu.state === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
|
|
226
|
+
}, null, 8 /* PROPS */, ["icon"])]),
|
|
227
|
+
_: 1 /* STABLE */
|
|
228
|
+
}, 8 /* PROPS */, ["class"]), createVNode(_component_OrMenu, {
|
|
229
|
+
ref: 'limitMenu',
|
|
230
|
+
"additional-styles": ['min-w-[60px]'],
|
|
231
|
+
trigger: _ctx.limitButtonRoot,
|
|
232
|
+
placement: 'top'
|
|
233
|
+
}, {
|
|
234
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, limit => {
|
|
235
|
+
return openBlock(), createBlock(_component_OrMenuItem, {
|
|
236
|
+
key: limit,
|
|
237
|
+
selected: _ctx.currentLimit === limit,
|
|
238
|
+
onClick: $event => {
|
|
239
|
+
_ctx.currentLimit = limit;
|
|
240
|
+
_ctx.limitMenu && _ctx.limitMenu.close();
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
default: withCtx(() => [createTextVNode(toDisplayString(limit), 1 /* TEXT */)]),
|
|
244
|
+
|
|
245
|
+
_: 2 /* DYNAMIC */
|
|
246
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "onClick"]);
|
|
247
|
+
}), 128 /* KEYED_FRAGMENT */))]),
|
|
248
|
+
|
|
249
|
+
_: 1 /* STABLE */
|
|
250
|
+
}, 8 /* PROPS */, ["trigger"])])) : createCommentVNode("v-if", true), _ctx.features.range ? (openBlock(), createElementBlock(Fragment, {
|
|
251
|
+
key: 1
|
|
252
|
+
}, [createTextVNode(toDisplayString(_ctx.currentOffset + 1) + "-" + toDisplayString(Math.min(_ctx.currentOffset + _ctx.currentLimit, _ctx.length)) + " of " + toDisplayString(_ctx.length), 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)]), createElementVNode("div", _hoisted_3, [createVNode(_component_OrButton, {
|
|
203
253
|
class: normalizeClass(_ctx.itemStyles),
|
|
204
254
|
variant: 'link',
|
|
205
255
|
color: 'inherit',
|
|
206
256
|
disabled: _ctx.currentPage === _ctx.firstPage,
|
|
207
|
-
onClick: _cache[
|
|
257
|
+
onClick: _cache[1] || (_cache[1] = $event => _ctx.toPreviousPage())
|
|
208
258
|
}, {
|
|
209
259
|
default: withCtx(() => [createVNode(_component_OrIcon, {
|
|
210
260
|
icon: 'keyboard_arrow_left'
|
|
211
261
|
})]),
|
|
212
262
|
_: 1 /* STABLE */
|
|
213
|
-
}, 8 /* PROPS */, ["class", "disabled"]), _ctx.isDesktop ? (openBlock(), createElementBlock(Fragment, {
|
|
263
|
+
}, 8 /* PROPS */, ["class", "disabled"]), _ctx.isDesktop ? (openBlock(true), createElementBlock(Fragment, {
|
|
214
264
|
key: 0
|
|
215
|
-
},
|
|
265
|
+
}, renderList(_ctx.buttonGroup, (page, index) => {
|
|
216
266
|
return openBlock(), createBlock(_component_OrButton, {
|
|
217
267
|
key: index,
|
|
218
268
|
class: normalizeClass(_ctx.itemStyles),
|
|
@@ -225,58 +275,43 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
225
275
|
|
|
226
276
|
_: 2 /* DYNAMIC */
|
|
227
277
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["class", "activated", "onClick"]);
|
|
228
|
-
}), 128 /* KEYED_FRAGMENT */)),
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
disabled: _ctx.currentPage === _ctx.lastPage,
|
|
233
|
-
onClick: _cache[1] || (_cache[1] = $event => _ctx.toNextPage())
|
|
234
|
-
}, {
|
|
235
|
-
default: withCtx(() => [createVNode(_component_OrIcon, {
|
|
236
|
-
icon: 'keyboard_arrow_right'
|
|
237
|
-
})]),
|
|
238
|
-
_: 1 /* STABLE */
|
|
239
|
-
}, 8 /* PROPS */, ["class", "disabled"])], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)], 2 /* CLASS */), createElementVNode("div", {
|
|
240
|
-
class: normalizeClass(_ctx.limitControlStyles)
|
|
241
|
-
}, [_ctx.isDesktop ? (openBlock(), createElementBlock(Fragment, {
|
|
242
|
-
key: 0
|
|
243
|
-
}, [createTextVNode(" Per page: ")], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true), createVNode(_component_OrButton, {
|
|
244
|
-
ref: 'limitButton',
|
|
278
|
+
}), 128 /* KEYED_FRAGMENT */)) : createCommentVNode("v-if", true), _ctx.isMobile ? (openBlock(), createElementBlock(Fragment, {
|
|
279
|
+
key: 1
|
|
280
|
+
}, [createVNode(_component_OrButton, {
|
|
281
|
+
ref: 'offsetButton',
|
|
245
282
|
class: normalizeClass(_ctx.itemStyles),
|
|
246
283
|
variant: 'link',
|
|
247
284
|
color: 'inherit',
|
|
248
285
|
activated: true,
|
|
249
|
-
onClick: _cache[2] || (_cache[2] = $event => _ctx.
|
|
286
|
+
onClick: _cache[2] || (_cache[2] = $event => _ctx.offsetMenu && _ctx.offsetMenu.open())
|
|
250
287
|
}, {
|
|
251
|
-
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.
|
|
252
|
-
icon: _ctx.
|
|
288
|
+
default: withCtx(() => [createTextVNode(toDisplayString(_ctx.currentPage) + " ", 1 /* TEXT */), createVNode(_component_OrIcon, {
|
|
289
|
+
icon: _ctx.offsetMenu && _ctx.offsetMenu.state === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'
|
|
253
290
|
}, null, 8 /* PROPS */, ["icon"])]),
|
|
254
291
|
_: 1 /* STABLE */
|
|
255
292
|
}, 8 /* PROPS */, ["class"]), createVNode(_component_OrMenu, {
|
|
256
|
-
ref: '
|
|
293
|
+
ref: 'offsetMenu',
|
|
257
294
|
"additional-styles": ['min-w-[60px]'],
|
|
258
|
-
trigger: _ctx.
|
|
295
|
+
trigger: _ctx.offsetButtonRoot,
|
|
259
296
|
placement: 'top'
|
|
260
297
|
}, {
|
|
261
|
-
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.
|
|
298
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.lastPage, page => {
|
|
262
299
|
return openBlock(), createBlock(_component_OrMenuItem, {
|
|
263
|
-
key:
|
|
300
|
+
key: page,
|
|
301
|
+
selected: _ctx.currentPage === page,
|
|
264
302
|
onClick: $event => {
|
|
265
|
-
_ctx.
|
|
266
|
-
_ctx.
|
|
303
|
+
_ctx.currentPage = page;
|
|
304
|
+
_ctx.offsetMenu && _ctx.offsetMenu.close();
|
|
267
305
|
}
|
|
268
306
|
}, {
|
|
269
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
307
|
+
default: withCtx(() => [createTextVNode(toDisplayString(page), 1 /* TEXT */)]),
|
|
270
308
|
|
|
271
309
|
_: 2 /* DYNAMIC */
|
|
272
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
|
|
310
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["selected", "onClick"]);
|
|
273
311
|
}), 128 /* KEYED_FRAGMENT */))]),
|
|
274
312
|
|
|
275
313
|
_: 1 /* STABLE */
|
|
276
|
-
}, 8 /* PROPS */, ["trigger"])],
|
|
277
|
-
key: 0,
|
|
278
|
-
class: normalizeClass(_ctx.offsetControlStyles)
|
|
279
|
-
}, [createVNode(_component_OrButton, {
|
|
314
|
+
}, 8 /* PROPS */, ["trigger"])], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true), createVNode(_component_OrButton, {
|
|
280
315
|
class: normalizeClass(_ctx.itemStyles),
|
|
281
316
|
variant: 'link',
|
|
282
317
|
color: 'inherit',
|
|
@@ -287,7 +322,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
287
322
|
icon: 'keyboard_arrow_right'
|
|
288
323
|
})]),
|
|
289
324
|
_: 1 /* STABLE */
|
|
290
|
-
}, 8 /* PROPS */, ["class", "disabled"])]
|
|
325
|
+
}, 8 /* PROPS */, ["class", "disabled"])])], 2 /* CLASS */);
|
|
291
326
|
}
|
|
292
327
|
|
|
293
328
|
script.render = render;
|
|
@@ -32,7 +32,7 @@ export { s as OrCombinedInputV3 } from '../OrCombinedInput-4dc423a8.js';
|
|
|
32
32
|
export { s as OrConfirm } from '../OrConfirm-7c132ea7.js';
|
|
33
33
|
export { C as ConfirmType, s as OrConfirmV3 } from '../OrConfirm-780bd0e6.js';
|
|
34
34
|
export { s as OrContextMenuV3 } from '../OrContextMenu-7fe5d0b5.js';
|
|
35
|
-
export { s as OrDataGridV3 } from '../OrDataGrid-
|
|
35
|
+
export { s as OrDataGridV3 } from '../OrDataGrid-c68a7070.js';
|
|
36
36
|
export { D as DataGridVariant } from '../OrDataGridToolbar-9c02f848.js';
|
|
37
37
|
export { s as OrDateFormatV3 } from '../OrDateFormat-fe577aea.js';
|
|
38
38
|
export { s as OrDatePickerV3 } from '../OrDatePicker-e672967a.js';
|
|
@@ -86,7 +86,7 @@ export { s as OrNumberInput } from '../OrNumberInput-2433b4b8.js';
|
|
|
86
86
|
export { s as OrOverflowMenu } from '../OrOverflowMenu-8a0210ef.js';
|
|
87
87
|
export { s as OrOverlay } from '../OrOverlay-451dce49.js';
|
|
88
88
|
export { s as OrOverlayV3 } from '../OrOverlay-49a678a2.js';
|
|
89
|
-
export { s as OrPaginationV3 } from '../OrPagination-
|
|
89
|
+
export { s as OrPaginationV3 } from '../OrPagination-42ad7478.js';
|
|
90
90
|
export { s as OrPassword } from '../OrPassword-c8ed7759.js';
|
|
91
91
|
export { s as OrPopoverV3, a as PopoverPlacement, P as PopoverVariant } from '../OrPopover-d050ede2.js';
|
|
92
92
|
export { i as isPrevented } from '../isPrevented-b151a948.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { s as OrDataGridV3 } from '../../OrDataGrid-
|
|
1
|
+
export { s as OrDataGridV3 } from '../../OrDataGrid-c68a7070.js';
|
|
2
2
|
export { D as DataGridVariant } from '../../OrDataGridToolbar-9c02f848.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../OrCheckbox-98127253.js';
|
|
@@ -17,7 +17,7 @@ import '@onereach/styles/tailwind.config.json';
|
|
|
17
17
|
import '../../OrLabel-4abbce6e.js';
|
|
18
18
|
import 'vue';
|
|
19
19
|
import '../../style-inject.es-4c6f2515.js';
|
|
20
|
-
import '../../OrPagination-
|
|
20
|
+
import '../../OrPagination-42ad7478.js';
|
|
21
21
|
import '../../useResponsive-1baf3485.js';
|
|
22
22
|
import '../../OrButton-31bcb511.js';
|
|
23
23
|
import '../../OrLoader-5e2f359b.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { PaginationModelValue } from './types';
|
|
2
|
+
import { PaginationFeatures, PaginationModelValue } from './types';
|
|
3
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
4
4
|
modelValue: {
|
|
5
5
|
type: PropType<PaginationModelValue>;
|
|
@@ -13,17 +13,23 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
13
13
|
type: PropType<number[]>;
|
|
14
14
|
default: () => number[];
|
|
15
15
|
};
|
|
16
|
+
features: {
|
|
17
|
+
type: PropType<PaginationFeatures>;
|
|
18
|
+
default: () => PaginationFeatures;
|
|
19
|
+
};
|
|
16
20
|
}, {
|
|
17
21
|
root: import("vue-demi").Ref<HTMLElement | undefined>;
|
|
22
|
+
rootStyles: import("vue-demi").ComputedRef<string[]>;
|
|
18
23
|
limitButton: import("vue-demi").Ref<any>;
|
|
19
24
|
limitButtonRoot: import("vue-demi").ComputedRef<any>;
|
|
20
25
|
limitMenu: import("vue-demi").Ref<any>;
|
|
21
26
|
limitMenuRoot: import("vue-demi").ComputedRef<any>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
offsetButton: import("vue-demi").Ref<any>;
|
|
28
|
+
offsetButtonRoot: import("vue-demi").ComputedRef<any>;
|
|
29
|
+
offsetMenu: import("vue-demi").Ref<any>;
|
|
30
|
+
offsetMenuRoot: import("vue-demi").ComputedRef<any>;
|
|
25
31
|
itemStyles: import("vue-demi").ComputedRef<string[]>;
|
|
26
|
-
|
|
32
|
+
model: import("../../hooks").UseProxyModelValueReturn<PaginationModelValue>;
|
|
27
33
|
currentLimit: import("vue-demi").WritableComputedRef<number>;
|
|
28
34
|
currentOffset: import("vue-demi").WritableComputedRef<number>;
|
|
29
35
|
currentPage: import("vue-demi").WritableComputedRef<number>;
|
|
@@ -48,10 +54,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
48
54
|
type: PropType<number[]>;
|
|
49
55
|
default: () => number[];
|
|
50
56
|
};
|
|
57
|
+
features: {
|
|
58
|
+
type: PropType<PaginationFeatures>;
|
|
59
|
+
default: () => PaginationFeatures;
|
|
60
|
+
};
|
|
51
61
|
}>> & {
|
|
52
62
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
53
63
|
}, {
|
|
54
64
|
modelValue: PaginationModelValue;
|
|
55
65
|
options: number[];
|
|
66
|
+
features: PaginationFeatures;
|
|
56
67
|
}>;
|
|
57
68
|
export default _default;
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -32,7 +32,7 @@ export { s as OrCombinedInputV3 } from './OrCombinedInput-4dc423a8.js';
|
|
|
32
32
|
export { s as OrConfirm } from './OrConfirm-7c132ea7.js';
|
|
33
33
|
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-780bd0e6.js';
|
|
34
34
|
export { s as OrContextMenuV3 } from './OrContextMenu-7fe5d0b5.js';
|
|
35
|
-
export { s as OrDataGridV3 } from './OrDataGrid-
|
|
35
|
+
export { s as OrDataGridV3 } from './OrDataGrid-c68a7070.js';
|
|
36
36
|
export { D as DataGridVariant } from './OrDataGridToolbar-9c02f848.js';
|
|
37
37
|
export { s as OrDateFormatV3 } from './OrDateFormat-fe577aea.js';
|
|
38
38
|
export { s as OrDatePickerV3 } from './OrDatePicker-e672967a.js';
|
|
@@ -86,7 +86,7 @@ export { s as OrNumberInput } from './OrNumberInput-2433b4b8.js';
|
|
|
86
86
|
export { s as OrOverflowMenu } from './OrOverflowMenu-8a0210ef.js';
|
|
87
87
|
export { s as OrOverlay } from './OrOverlay-451dce49.js';
|
|
88
88
|
export { s as OrOverlayV3 } from './OrOverlay-49a678a2.js';
|
|
89
|
-
export { s as OrPaginationV3 } from './OrPagination-
|
|
89
|
+
export { s as OrPaginationV3 } from './OrPagination-42ad7478.js';
|
|
90
90
|
export { s as OrPassword } from './OrPassword-c8ed7759.js';
|
|
91
91
|
export { s as OrPopoverV3, a as PopoverPlacement, P as PopoverVariant } from './OrPopover-d050ede2.js';
|
|
92
92
|
export { i as isPrevented } from './isPrevented-b151a948.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "11.3.
|
|
3
|
+
"version": "11.3.2-beta.4417.0",
|
|
4
4
|
"npmUnpacked": "4.15.2",
|
|
5
5
|
"description": "Vue components library for v2/3",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -179,6 +179,5 @@
|
|
|
179
179
|
"default": "./dist/bundled/v3/components/*/index.js"
|
|
180
180
|
},
|
|
181
181
|
"./package.json": "./package.json"
|
|
182
|
-
}
|
|
183
|
-
"gitHead": "84c91589eeb8f06ee12ece77eb8e53d7984a1815"
|
|
182
|
+
}
|
|
184
183
|
}
|