forked from brettcodling/vue3-pivottable
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
60 lines (53 loc) · 1.04 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Import your components and utilities
import VuePivottable from './Pivottable'
import VuePivottableUi from './PivottableUi'
import TableRenderer from './TableRenderer'
import {
aggregatorTemplates,
aggregators,
derivers,
locales,
naturalSort,
numberFormat,
getSort,
sortAs,
PivotData
} from './helper/utils'
// Bundle utilities and renderers
const PivotUtilities = {
aggregatorTemplates,
aggregators,
derivers,
locales,
naturalSort,
numberFormat,
getSort,
sortAs,
PivotData
}
const Renderer = {
TableRenderer
}
// Collect components for easy registration
const components = {
VuePivottable,
VuePivottableUi
}
// Define the install method for the plugin
const install = (app) => {
// Register each component globally
Object.values(components).forEach(component => {
app.component(component.name, component)
})
}
// Export individual components and utilities
export {
VuePivottable,
VuePivottableUi,
PivotUtilities,
Renderer
}
// Export the plugin as the default export
export default {
install
}