@ribajs/bs4
Advanced tools
Comparing version 1.3.0 to 1.4.0
{ | ||
"name": "@ribajs/bs4", | ||
"description": "Bootstrap 4 module for Riba.js", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"author": "Pascal Garber <pascal@artandcode.studio>", | ||
@@ -55,6 +55,6 @@ "contributors": [], | ||
"webpack": "^4.41.2", | ||
"webpack-cli": "^3.3.9" | ||
"webpack-cli": "^3.3.10" | ||
}, | ||
"dependencies": { | ||
"@ribajs/core": "^1.3.0", | ||
"@ribajs/core": "^1.4.0", | ||
"@types/jquery": "^3.3.31", | ||
@@ -61,0 +61,0 @@ "bootstrap": "^4.3.1", |
@@ -25,2 +25,6 @@ import { | ||
/** | ||
* Depth in how many parents elements should be searched for an id for each found header element (default `1`) | ||
*/ | ||
findHeaderIdDepth: number; | ||
/** | ||
* Selector to search for headers insite of the element | ||
@@ -37,2 +41,5 @@ */ | ||
scrollElement?: string; | ||
/** | ||
* Array of found headers / anchors | ||
*/ | ||
anchors: Anchor[]; | ||
@@ -50,3 +57,3 @@ } | ||
static get observedAttributes() { | ||
return ['headers-start', 'headers-depth', 'header-parent-selector', 'scroll-offset', 'scroll-element']; | ||
return ['headers-start', 'headers-depth', 'find-header-id-depth', 'header-parent-selector', 'scroll-offset', 'scroll-element']; | ||
} | ||
@@ -59,2 +66,3 @@ | ||
headersStart: 2, | ||
findHeaderIdDepth: 1, | ||
headerParentSelector: undefined, | ||
@@ -78,7 +86,7 @@ scrollOffset: 0, | ||
protected getIdFromElementOrParent(element: HTMLElement, depth = 0): string | null { | ||
protected getIdFromElementOrParent(element: HTMLElement, depth = 1): string | null { | ||
if (element.id) { | ||
return element.id; | ||
} | ||
if (depth <= 1) { | ||
if (depth <= this.scope.findHeaderIdDepth) { | ||
if (element.parentElement) { | ||
@@ -128,3 +136,3 @@ return this.getIdFromElementOrParent(element.parentElement, ++depth); | ||
protected async afterBind() { | ||
this.debug('afterBind', this.scope); | ||
super.afterBind(); | ||
} | ||
@@ -131,0 +139,0 @@ |
@@ -36,3 +36,3 @@ import { | ||
static get observedAttributes() { | ||
return ['headers-start', 'headers-depth', 'header-parent-selector', 'offset', 'offset-bottom', 'scroll-offset']; | ||
return ['headers-start', 'headers-depth', 'find-header-id-depth', 'header-parent-selector', 'offset', 'offset-bottom', 'scroll-offset']; | ||
} | ||
@@ -45,2 +45,3 @@ | ||
headersStart: 2, | ||
findHeaderIdDepth: 1, | ||
headerParentSelector: undefined, | ||
@@ -47,0 +48,0 @@ offset: 0, |
@@ -0,6 +1,8 @@ | ||
export { Bs4ContentsComponent } from './bs4-contents/bs4-contents.component'; | ||
export { Bs4IconComponent } from './bs4-icon/bs4-icon.component'; | ||
export { Bs4ScrollspyComponent } from './bs4-scrollspy/bs4-scrollspy.component'; | ||
export { TabsComponent } from './tabs/tabs.component'; | ||
export { Bs4SidebarComponent } from './bs4-sidebar/bs4-sidebar.component'; | ||
export { Bs4ToggleButtonComponent } from './bs4-toggle-button/bs4-toggle-button.component'; | ||
export { DropdownComponent } from './dropdown/dropdown.component'; | ||
export { NavbarComponent } from './navbar/navbar.component'; | ||
export { Bs4ContentsComponent } from './bs4-contents/bs4-contents.component'; | ||
export { Bs4IconComponent } from './bs4-icon/bs4-icon.component'; | ||
export { TabsComponent } from './tabs/tabs.component'; |
@@ -1,17 +0,11 @@ | ||
import { IRibaModule } from '@ribajs/core'; | ||
export * from './services'; | ||
export * from './binders'; | ||
export * from './components'; | ||
// export * as formatters from './formatters/bs4.formatters'; | ||
export * from './services'; | ||
// export * from './interfaces/interfaces'; | ||
import bs4Module from './bs4.module'; | ||
// import * from './interfaces/interfaces'; | ||
import * as binders from './binders'; | ||
import * as components from './components'; | ||
// import * as formatters from './formatters/bs4.formatters'; | ||
import * as services from './services'; | ||
export const bs4Module: IRibaModule = { | ||
binders, | ||
services, | ||
// formatters, | ||
components, | ||
}; | ||
export { bs4Module }; | ||
export default bs4Module; |
@@ -22,3 +22,3 @@ { | ||
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"], | ||
"no-console": [true, "log", "info", "debug"], | ||
"no-console": [true, "log", "info"], | ||
"prefer-for-of": false, | ||
@@ -25,0 +25,0 @@ "object-literal-sort-keys": false |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
218825
92
3731
Updated@ribajs/core@^1.4.0