@ulu/frontend-vue 0.1.0-beta.2 → 0.1.0-beta.21
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/README.md +113 -2
- package/dist/{breakpoints-ClT9bfZm.js → breakpoints-DOXmgVoG.js} +1 -1
- package/dist/frontend-vue.css +1 -1
- package/dist/frontend-vue.js +75 -73
- package/dist/index-BpmkfeZb.js +6671 -0
- package/lib/components/collapsible/UluAccordion.vue +1 -1
- package/lib/components/collapsible/UluModal.vue +4 -5
- package/lib/components/collapsible/UluOverflowPopover.vue +1 -1
- package/lib/components/elements/UluAlert.vue +1 -2
- package/lib/components/elements/UluBadge.vue +27 -28
- package/lib/components/elements/UluBadgeStack.vue +8 -13
- package/lib/components/elements/UluButton.vue +2 -2
- package/lib/components/elements/UluButtonVerbose.vue +119 -0
- package/lib/components/elements/UluCard.vue +1 -1
- package/lib/components/elements/UluDefinitionList.vue +14 -17
- package/lib/components/elements/UluExternalLink.vue +22 -29
- package/lib/components/elements/UluIcon.vue +22 -17
- package/lib/components/elements/UluList.vue +53 -55
- package/lib/components/elements/UluSpokeSpinner.vue +12 -18
- package/lib/components/elements/UluTag.vue +35 -35
- package/lib/components/forms/UluCheckboxMenu.vue +32 -31
- package/lib/components/forms/UluFileDisplay.vue +40 -31
- package/lib/components/forms/UluFormFile.vue +22 -24
- package/lib/components/forms/UluFormMessage.vue +7 -10
- package/lib/components/forms/UluFormSelect.vue +16 -16
- package/lib/components/forms/UluFormText.vue +15 -15
- package/lib/components/forms/UluSearchForm.vue +8 -10
- package/lib/components/index.js +1 -1
- package/lib/components/layout/UluAdaptiveLayout.vue +3 -5
- package/lib/components/layout/UluTitleRail.vue +9 -5
- package/lib/components/layout/UluWhenBreakpoint.vue +71 -77
- package/lib/components/navigation/UluBreadcrumb.vue +1 -2
- package/lib/components/navigation/UluMenu.vue +3 -3
- package/lib/components/navigation/UluPager.vue +102 -0
- package/lib/components/systems/facets/ExampleFacetsWithPagination.vue +119 -0
- package/lib/components/systems/facets/UluFacetsFilters.vue +73 -0
- package/lib/components/systems/facets/UluFacetsList.vue +13 -14
- package/lib/components/systems/facets/UluFacetsResults.vue +57 -0
- package/lib/components/systems/facets/UluFacetsSearch.vue +26 -49
- package/lib/components/systems/facets/UluFacetsSidebarLayout.vue +31 -0
- package/lib/components/systems/facets/UluFacetsSort.vue +45 -0
- package/lib/components/systems/facets/_facets.scss +2 -3
- package/lib/components/systems/facets/_mock-data.js +40 -0
- package/lib/components/systems/facets/useFacets.js +221 -0
- package/lib/components/systems/index.js +10 -2
- package/lib/components/systems/scroll-anchors/UluScrollAnchors.vue +2 -1
- package/lib/components/systems/skeleton/UluShowSkeleton.vue +9 -8
- package/lib/components/systems/skeleton/UluSkeletonContent.vue +39 -43
- package/lib/components/systems/skeleton/UluSkeletonMedia.vue +4 -6
- package/lib/components/systems/skeleton/UluSkeletonText.vue +27 -0
- package/lib/components/systems/slider/UluImageSlideShow.vue +1 -1
- package/lib/components/systems/slider/UluSlideShow.vue +8 -3
- package/lib/components/systems/table-sticky/UluTableSticky.vue +8 -8
- package/lib/components/systems/table-sticky/UluTableStickyTable.vue +3 -3
- package/lib/composables/index.js +3 -1
- package/lib/composables/useDocumentTitle.js +47 -0
- package/lib/composables/usePageTitle.js +37 -0
- package/lib/composables/usePagination.js +122 -0
- package/lib/composables/useRequiredInject.js +26 -0
- package/lib/index.js +1 -1
- package/lib/meta.js +14 -0
- package/lib/plugins/core/index.js +91 -0
- package/lib/plugins/index.js +1 -0
- package/lib/plugins/toast/UluToast.vue +2 -2
- package/lib/utils/index.js +2 -0
- package/lib/utils/{vue-router.js → router.js} +106 -11
- package/package.json +37 -14
- package/types/components/index.d.ts +2 -0
- package/types/components/index.d.ts.map +1 -0
- package/types/components/systems/facets/_mock-data.d.ts +18 -0
- package/types/components/systems/facets/_mock-data.d.ts.map +1 -0
- package/types/components/systems/facets/useFacets.d.ts +39 -0
- package/types/components/systems/facets/useFacets.d.ts.map +1 -0
- package/types/components/systems/index.d.ts +2 -0
- package/types/components/systems/index.d.ts.map +1 -0
- package/types/components/systems/scroll-anchors/symbols.d.ts +7 -0
- package/types/components/systems/scroll-anchors/symbols.d.ts.map +1 -0
- package/types/composables/index.d.ts +7 -0
- package/types/composables/index.d.ts.map +1 -0
- package/types/composables/useBreakpointManager.d.ts +8 -0
- package/types/composables/useBreakpointManager.d.ts.map +1 -0
- package/types/composables/useDocumentTitle.d.ts +18 -0
- package/types/composables/useDocumentTitle.d.ts.map +1 -0
- package/types/composables/useIcon.d.ts +6 -0
- package/types/composables/useIcon.d.ts.map +1 -0
- package/types/composables/useModifiers.d.ts +69 -0
- package/types/composables/useModifiers.d.ts.map +1 -0
- package/types/composables/usePageTitle.d.ts +19 -0
- package/types/composables/usePageTitle.d.ts.map +1 -0
- package/types/composables/usePagination.d.ts +25 -0
- package/types/composables/usePagination.d.ts.map +1 -0
- package/types/composables/useRequiredInject.d.ts +8 -0
- package/types/composables/useRequiredInject.d.ts.map +1 -0
- package/types/composables/useWindowResize.d.ts +6 -0
- package/types/composables/useWindowResize.d.ts.map +1 -0
- package/types/index.d.ts +5 -0
- package/types/index.d.ts.map +1 -0
- package/types/meta.d.ts +10 -0
- package/types/meta.d.ts.map +1 -0
- package/types/plugins/breakpoints/index.d.ts +2 -0
- package/types/plugins/breakpoints/index.d.ts.map +1 -0
- package/types/plugins/core/index.d.ts +3 -0
- package/types/plugins/core/index.d.ts.map +1 -0
- package/types/plugins/index.d.ts +6 -0
- package/types/plugins/index.d.ts.map +1 -0
- package/types/plugins/modals/api.d.ts +34 -0
- package/types/plugins/modals/api.d.ts.map +1 -0
- package/types/plugins/modals/index.d.ts +28 -0
- package/types/plugins/modals/index.d.ts.map +1 -0
- package/types/plugins/modals/useModals.d.ts +2 -0
- package/types/plugins/modals/useModals.d.ts.map +1 -0
- package/types/plugins/popovers/defaults.d.ts +14 -0
- package/types/plugins/popovers/defaults.d.ts.map +1 -0
- package/types/plugins/popovers/directive.d.ts +8 -0
- package/types/plugins/popovers/directive.d.ts.map +1 -0
- package/types/plugins/popovers/index.d.ts +7 -0
- package/types/plugins/popovers/index.d.ts.map +1 -0
- package/types/plugins/popovers/manager.d.ts +52 -0
- package/types/plugins/popovers/manager.d.ts.map +1 -0
- package/types/plugins/popovers/useFollow.d.ts +31 -0
- package/types/plugins/popovers/useFollow.d.ts.map +1 -0
- package/types/plugins/popovers/utils.d.ts +2 -0
- package/types/plugins/popovers/utils.d.ts.map +1 -0
- package/types/plugins/toast/defaults.d.ts +15 -0
- package/types/plugins/toast/defaults.d.ts.map +1 -0
- package/types/plugins/toast/index.d.ts +5 -0
- package/types/plugins/toast/index.d.ts.map +1 -0
- package/types/plugins/toast/store.d.ts +22 -0
- package/types/plugins/toast/store.d.ts.map +1 -0
- package/types/plugins/toast/useToast.d.ts +2 -0
- package/types/plugins/toast/useToast.d.ts.map +1 -0
- package/types/utils/dom.d.ts +8 -0
- package/types/utils/dom.d.ts.map +1 -0
- package/types/utils/index.d.ts +3 -0
- package/types/utils/index.d.ts.map +1 -0
- package/types/utils/placeholder.d.ts +8 -0
- package/types/utils/placeholder.d.ts.map +1 -0
- package/types/utils/router.d.ts +141 -0
- package/types/utils/router.d.ts.map +1 -0
- package/types/utils/vue-router.d.ts +122 -0
- package/types/utils/vue-router.d.ts.map +1 -0
- package/dist/frontend-vue.umd.cjs +0 -561
- package/dist/index-P5Rwl_Dl.js +0 -7263
- package/lib/components/forms/UluFormDropzone.vue +0 -62
- package/lib/components/systems/facets/UluFacets.vue +0 -380
- package/lib/components/systems/skeleton/UluSkeletonTextInline.vue +0 -9
- package/lib/settings.js +0 -119
- package/lib/utils/placeholder.js +0 -6
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This Module Creates Menus from route or router config
|
|
3
|
+
* - Note: Functions prefixed with "$" work with $route objects (running application, provided by vue-router ie $router, useRoute, etc),
|
|
4
|
+
* @module router-utils
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Route Menu Item
|
|
8
|
+
* @typedef {Object} RouteMenuItem
|
|
9
|
+
* @property {String} path - Menu item route path
|
|
10
|
+
* @property {String} title - Menu item title
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Get root/base static routes as menu items
|
|
14
|
+
* @param {*} routes Routes to build menu from (not router instance)
|
|
15
|
+
* @param {Object} options Options
|
|
16
|
+
* @param {Object} options.qualifier Callback to qualify as a base route (defaults to isStaticBaseRoute)
|
|
17
|
+
* @param {Object} options.item Options for createMenuItem
|
|
18
|
+
* @returns {Array.<RouteMenuItem>} Array of menu items
|
|
19
|
+
*/
|
|
20
|
+
export function createBaseMenu(routes: any, options: {
|
|
21
|
+
qualifier: any;
|
|
22
|
+
item: any;
|
|
23
|
+
}): Array<RouteMenuItem>;
|
|
24
|
+
/**
|
|
25
|
+
* Returns menu flat (no parent children)
|
|
26
|
+
*/
|
|
27
|
+
export function flattenMenu(menu: any): any;
|
|
28
|
+
/**
|
|
29
|
+
* Print out a section's menu based on path
|
|
30
|
+
* @param {*} routes All routes
|
|
31
|
+
* @param {*} sectionPath Path for section to create menu
|
|
32
|
+
* @param {Object} options Options
|
|
33
|
+
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie ({ path: "" })
|
|
34
|
+
* @param {Object} options.item Options to be passed to createMenuItem
|
|
35
|
+
* @returns {Array.<RouteMenuItem>} Array of menu items
|
|
36
|
+
*/
|
|
37
|
+
export function createSectionMenu(routes: any, sectionPath: any, options: {
|
|
38
|
+
includeIndex: boolean;
|
|
39
|
+
item: any;
|
|
40
|
+
}): Array<RouteMenuItem>;
|
|
41
|
+
/**
|
|
42
|
+
* For a given route this will return the route that renders. For routes without
|
|
43
|
+
* children this is the route itself for those with children (first child with empty path)
|
|
44
|
+
* @param {Object} route Route object to resolve
|
|
45
|
+
* @returns {Object} Resolved route
|
|
46
|
+
*/
|
|
47
|
+
/**
|
|
48
|
+
* For a given array of child routes return the index
|
|
49
|
+
* @param {Array} children Children array of routes
|
|
50
|
+
* @returns {Object} Route
|
|
51
|
+
*/
|
|
52
|
+
export function getChildIndexRoute(children: any[]): any;
|
|
53
|
+
/**
|
|
54
|
+
* Creates common menu item structure from route, pulls title and weight from meta (on route or index child)
|
|
55
|
+
* @param {Object} route Route
|
|
56
|
+
* @param {Object} routePath The final path for the menu item
|
|
57
|
+
* @param {Object} options Function to allow alterering the menu item (adding meta, etc)
|
|
58
|
+
* @param {Function} options.modify Function to allow alterering the menu item (adding meta, etc) (args: item, route)
|
|
59
|
+
* @param {Function} options.indexMeta Include the routes index child's meta (merged on top of route meta)
|
|
60
|
+
* @returns {RouteMenuItem} Menu item
|
|
61
|
+
*/
|
|
62
|
+
export function createMenuItem(route: any, routePath: any, options: {
|
|
63
|
+
modify: Function;
|
|
64
|
+
indexMeta: Function;
|
|
65
|
+
}): RouteMenuItem;
|
|
66
|
+
/**
|
|
67
|
+
* Test if route is static (doesn't incude parameters)
|
|
68
|
+
* @param {Object} route Route object to test
|
|
69
|
+
* @returns {Boolean} Whether or not this route is static (not dynamic)
|
|
70
|
+
*/
|
|
71
|
+
export function isStaticRoute(route: any): boolean;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @param {Object} route Route object to test
|
|
75
|
+
* @returns {Boolean} Whether or not this route is a static base route
|
|
76
|
+
*/
|
|
77
|
+
export function isStaticBaseRoute(route: any): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Function to make normal <a> behave as router links instread of page reload
|
|
80
|
+
* @param {Object} router Router instance (ie src/router) to push routes to
|
|
81
|
+
* @param {Object} event The event object that triggered route change (ie. onclick) pass event object
|
|
82
|
+
*/
|
|
83
|
+
export function nativeLinkRouter(router: any, event: any): void;
|
|
84
|
+
/**
|
|
85
|
+
* Returns the child routes for base route
|
|
86
|
+
* @param {Object} route Route Object
|
|
87
|
+
* @returns
|
|
88
|
+
*/
|
|
89
|
+
export function $getRouteChildren(route: any, parent?: any): any;
|
|
90
|
+
/**
|
|
91
|
+
* Returns the route's parent
|
|
92
|
+
* @param {Object} route Route Object
|
|
93
|
+
* @param {Object} deepest By default this returns the routes parent, if deepest it will return it's base route (top level parent)
|
|
94
|
+
* @return {Object|Null} Parent route, if there is no parent route for the given route this will return null
|
|
95
|
+
*/
|
|
96
|
+
export function $getParentRoute(route: any, deepest: any): any | null;
|
|
97
|
+
/**
|
|
98
|
+
* For a given $route will return all it's children as menu items,
|
|
99
|
+
* using the route's meta.title property for the title. This is for sections only (routes with children)
|
|
100
|
+
* - Useful for dynamic menus (menus within some unknown section) where you don't want to write static paths
|
|
101
|
+
* @param {Object} route Actual $route object
|
|
102
|
+
* @param {Object} options Options
|
|
103
|
+
* @param {Object} options.parent Route parent object, defaults to parent of route
|
|
104
|
+
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie ({ path: "" })
|
|
105
|
+
* @param {Object} options.item Options for createMenuItem
|
|
106
|
+
* @returns {Array.<RouteMenuItem>} Array of menu items
|
|
107
|
+
*/
|
|
108
|
+
export function $createSectionMenu(route: any, options: {
|
|
109
|
+
parent: any;
|
|
110
|
+
includeIndex: boolean;
|
|
111
|
+
item: any;
|
|
112
|
+
}): Array<RouteMenuItem>;
|
|
113
|
+
/**
|
|
114
|
+
* For a given $route, this will generate a breadcrumb trail.
|
|
115
|
+
* It iterates through `route.matched` to build the trail.
|
|
116
|
+
* - Prioritizes titles set via the `usePageTitle` composable for the current page.
|
|
117
|
+
* - Falls back to `meta.title` (string or function).
|
|
118
|
+
* - Skips routes where `meta.breadcrumb` is set to `false`.
|
|
119
|
+
* - Avoids duplicate crumbs for nested routes with empty paths.
|
|
120
|
+
* @param {Object} route The Vue Router `$route` object.
|
|
121
|
+
* @returns {Array.<{title: String, to: Object, current: Boolean}>} An array of breadcrumb items.
|
|
122
|
+
*/
|
|
123
|
+
export function $createBreadcrumb(route: any): Array<{
|
|
124
|
+
title: string;
|
|
125
|
+
to: any;
|
|
126
|
+
current: boolean;
|
|
127
|
+
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Route Menu Item
|
|
130
|
+
*/
|
|
131
|
+
export type RouteMenuItem = {
|
|
132
|
+
/**
|
|
133
|
+
* - Menu item route path
|
|
134
|
+
*/
|
|
135
|
+
path: string;
|
|
136
|
+
/**
|
|
137
|
+
* - Menu item title
|
|
138
|
+
*/
|
|
139
|
+
title: string;
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../lib/utils/router.js"],"names":[],"mappings":"AACA;;;;GAIG;AAEH;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,uCANW,GAAC,WAET;IAAwB,SAAS;IACT,IAAI;CAC5B,GAAU,KAAK,CAAE,aAAa,CAAC,CAiCjC;AAED;;GAEG;AACH,4CAcC;AAED;;;;;;;;GAQG;AACH,0CAPW,GAAC,eACD,GAAC,WAET;IAAyB,YAAY;IACb,IAAI;CAC5B,GAAU,KAAK,CAAE,aAAa,CAAC,CA6BjC;AAED;;;;;GAKG;AASH;;;;GAIG;AACH,yDAEC;AACD;;;;;;;;GAQG;AACH,oEAJG;IAA0B,MAAM;IACN,SAAS;CACnC,GAAU,aAAa,CAsBzB;AACD;;;;GAIG;AACH,mDAEC;AACD;;;;GAIG;AACH,uDAGC;AACD;;;;GAIG;AACH,gEAUC;AACD;;;;GAIG;AACH,iEAEC;AACD;;;;;GAKG;AACH,2DAFY,UAAW,CAUtB;AAUD;;;;;;;;;;GAUG;AACH,wDALG;IAAwB,MAAM;IACL,YAAY;IACb,IAAI;CAC5B,GAAU,KAAK,CAAE,aAAa,CAAC,CAgBjC;AAED;;;;;;;;;GASG;AACH,+CAFa,KAAK,CAAE;IAAC,KAAK,SAAS;IAAC,EAAE,MAAS;IAAC,OAAO,UAAS;CAAC,CAAC,CAiDjE"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This Module Creates Menus from route or router config
|
|
3
|
+
* - Note: Functions prefixed with "$" work with $route objects (running application, provided by vue-router ie $router, useRoute, etc),
|
|
4
|
+
* @module utils/router-utils
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Route Menu Item
|
|
8
|
+
* @typedef {Object} RouteMenuItem
|
|
9
|
+
* @property {String} path - Menu item route path
|
|
10
|
+
* @property {String} title - Menu item title
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Get root/base static routes as menu items
|
|
14
|
+
* @param {*} routes Routes to build menu from (not router instance)
|
|
15
|
+
* @param {Object} options Options
|
|
16
|
+
* @param {Object} options.qualifier Callback to qualify as a base route (defaults to isStaticBaseRoute)
|
|
17
|
+
* @param {Object} options.item Options for createMenuItem
|
|
18
|
+
* @returns {Array.<RouteMenuItem>} Array of menu items
|
|
19
|
+
*/
|
|
20
|
+
export function createBaseMenu(routes: any, options: {
|
|
21
|
+
qualifier: any;
|
|
22
|
+
item: any;
|
|
23
|
+
}): Array<RouteMenuItem>;
|
|
24
|
+
/**
|
|
25
|
+
* Print out a section's menu based on path
|
|
26
|
+
* @param {*} routes All routes
|
|
27
|
+
* @param {*} sectionPath Path for section to create menu
|
|
28
|
+
* @param {Object} options Options
|
|
29
|
+
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie ({ path: "" })
|
|
30
|
+
* @param {Object} options.item Options to be passed to createMenuItem
|
|
31
|
+
* @returns {Array.<RouteMenuItem>} Array of menu items
|
|
32
|
+
*/
|
|
33
|
+
export function createSectionMenu(routes: any, sectionPath: any, options: {
|
|
34
|
+
includeIndex: boolean;
|
|
35
|
+
item: any;
|
|
36
|
+
}): Array<RouteMenuItem>;
|
|
37
|
+
/**
|
|
38
|
+
* For a given route this will return the route that renders. For routes without
|
|
39
|
+
* children this is the route itself for those with children (first child with empty path)
|
|
40
|
+
* @param {Object} route Route object to resolve
|
|
41
|
+
* @returns {Object} Resolved route
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* For a given array of child routes return the index
|
|
45
|
+
* @param {Array} children Children array of routes
|
|
46
|
+
* @returns {Object} Route
|
|
47
|
+
*/
|
|
48
|
+
export function getChildIndexRoute(children: any[]): any;
|
|
49
|
+
/**
|
|
50
|
+
* Creates common menu item structure from route, pulls title and weight from meta (on route or index child)
|
|
51
|
+
* @param {Object} route Route
|
|
52
|
+
* @param {Object} routePath The final path for the menu item
|
|
53
|
+
* @param {Object} options Function to allow alterering the menu item (adding meta, etc)
|
|
54
|
+
* @param {Function} options.modify Function to allow alterering the menu item (adding meta, etc) (args: item, route)
|
|
55
|
+
* @param {Function} options.indexMeta Include the routes index child's meta (merged on top of route meta)
|
|
56
|
+
* @returns {RouteMenuItem} Menu item
|
|
57
|
+
*/
|
|
58
|
+
export function createMenuItem(route: any, routePath: any, options: {
|
|
59
|
+
modify: Function;
|
|
60
|
+
indexMeta: Function;
|
|
61
|
+
}): RouteMenuItem;
|
|
62
|
+
/**
|
|
63
|
+
* Test if route is static (doesn't incude parameters)
|
|
64
|
+
* @param {Object} route Route object to test
|
|
65
|
+
* @returns {Boolean} Whether or not this route is static (not dynamic)
|
|
66
|
+
*/
|
|
67
|
+
export function isStaticRoute(route: any): boolean;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @param {Object} route Route object to test
|
|
71
|
+
* @returns {Boolean} Whether or not this route is a static base route
|
|
72
|
+
*/
|
|
73
|
+
export function isStaticBaseRoute(route: any): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Function to make normal <a> behave as router links instread of page reload
|
|
76
|
+
* @param {Object} router Router instance (ie src/router) to push routes to
|
|
77
|
+
* @param {Object} event The event object that triggered route change (ie. onclick) pass event object
|
|
78
|
+
*/
|
|
79
|
+
export function nativeLinkRouter(router: any, event: any): void;
|
|
80
|
+
/**
|
|
81
|
+
* Returns the child routes for base route
|
|
82
|
+
* @param {Object} route Route Object
|
|
83
|
+
* @returns
|
|
84
|
+
*/
|
|
85
|
+
export function $getRouteChildren(route: any, parent?: any): any;
|
|
86
|
+
/**
|
|
87
|
+
* Returns the route's parent
|
|
88
|
+
* @param {Object} route Route Object
|
|
89
|
+
* @param {Object} deepest By default this returns the routes parent, if deepest it will return it's base route (top level parent)
|
|
90
|
+
* @return {Object|Null} Parent route, if there is no parent route for the given route this will return null
|
|
91
|
+
*/
|
|
92
|
+
export function $getParentRoute(route: any, deepest: any): any | null;
|
|
93
|
+
/**
|
|
94
|
+
* For a given $route will return all it's children as menu items,
|
|
95
|
+
* using the route's meta.title property for the title. This is for sections only (routes with children)
|
|
96
|
+
* - Useful for dynamic menus (menus within some unknown section) where you don't want to write static paths
|
|
97
|
+
* @param {Object} route Actual $route object
|
|
98
|
+
* @param {Object} options Options
|
|
99
|
+
* @param {Object} options.parent Route parent object, defaults to parent of route
|
|
100
|
+
* @param {Boolean} options.includeIndex Include the parent/index in the menu items ie ({ path: "" })
|
|
101
|
+
* @param {Object} options.item Options for createMenuItem
|
|
102
|
+
* @returns {Array.<RouteMenuItem>} Array of menu items
|
|
103
|
+
*/
|
|
104
|
+
export function $createSectionMenu(route: any, options: {
|
|
105
|
+
parent: any;
|
|
106
|
+
includeIndex: boolean;
|
|
107
|
+
item: any;
|
|
108
|
+
}): Array<RouteMenuItem>;
|
|
109
|
+
/**
|
|
110
|
+
* Route Menu Item
|
|
111
|
+
*/
|
|
112
|
+
export type RouteMenuItem = {
|
|
113
|
+
/**
|
|
114
|
+
* - Menu item route path
|
|
115
|
+
*/
|
|
116
|
+
path: string;
|
|
117
|
+
/**
|
|
118
|
+
* - Menu item title
|
|
119
|
+
*/
|
|
120
|
+
title: string;
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=vue-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue-router.d.ts","sourceRoot":"","sources":["../../lib/utils/vue-router.js"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AAEH;;;;;;;GAOG;AACH,uCANW,GAAC,WAET;IAAwB,SAAS;IACT,IAAI;CAC5B,GAAU,KAAK,CAAE,aAAa,CAAC,CAiBjC;AAED;;;;;;;;GAQG;AACH,0CAPW,GAAC,eACD,GAAC,WAET;IAAyB,YAAY;IACb,IAAI;CAC5B,GAAU,KAAK,CAAE,aAAa,CAAC,CA6BjC;AAED;;;;;GAKG;AASH;;;;GAIG;AACH,yDAEC;AACD;;;;;;;;GAQG;AACH,oEAJG;IAA0B,MAAM;IACN,SAAS;CACnC,GAAU,aAAa,CAsBzB;AACD;;;;GAIG;AACH,mDAEC;AACD;;;;GAIG;AACH,uDAGC;AACD;;;;GAIG;AACH,gEAUC;AACD;;;;GAIG;AACH,iEAEC;AACD;;;;;GAKG;AACH,2DAFY,UAAW,CAUtB;AAUD;;;;;;;;;;GAUG;AACH,wDALG;IAAwB,MAAM;IACL,YAAY;IACb,IAAI;CAC5B,GAAU,KAAK,CAAE,aAAa,CAAC,CAgBjC"}
|