@spicainternational/ngx-sds-components 5.6.0 → 5.8.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/esm2020/public-api.mjs +3 -1
- package/esm2020/src/lib/date-picker/date-picker.component.mjs +70 -29
- package/esm2020/src/lib/date-pipes/date-format.pipe.mjs +2 -2
- package/esm2020/src/lib/duration-box/duration-box.component.mjs +249 -0
- package/esm2020/src/lib/duration-box/duration-box.module.mjs +46 -0
- package/esm2020/src/lib/duration-box/duration-box.types.mjs +2 -0
- package/esm2020/src/lib/duration-box/duration.service.mjs +69 -0
- package/esm2020/src/lib/duration-box/public-api.mjs +3 -0
- package/esm2020/src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +5 -0
- package/esm2020/src/lib/duration-pipe/duration-format.pipe.mjs +26 -0
- package/esm2020/src/lib/duration-pipe/duration-pipe.module.mjs +18 -0
- package/esm2020/src/lib/duration-pipe/public-api.mjs +3 -0
- package/esm2020/src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs +5 -0
- package/esm2020/src/lib/modal/dialog/dialog.component.mjs +1 -1
- package/esm2020/src/lib/modal/modal.component.mjs +17 -5
- package/esm2020/src/lib/navigation/navigation-group/navigation-group.component.mjs +33 -10
- package/esm2020/src/lib/navigation/navigation.module.mjs +5 -3
- package/esm2020/src/lib/navigation/pipes/index.mjs +2 -0
- package/esm2020/src/lib/navigation/pipes/navigation-route-active.pipe.mjs +33 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +70 -28
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +365 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs.map +1 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs +48 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs.map +1 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs +17 -5
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-navigation.mjs +66 -12
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-navigation.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components.mjs +2 -0
- package/fesm2015/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +69 -28
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +364 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs.map +1 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs +48 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs.map +1 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs +17 -5
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-navigation.mjs +66 -12
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-navigation.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components.mjs +2 -0
- package/fesm2020/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/package.json +19 -2
- package/public-api.d.ts +2 -0
- package/src/lib/date-picker/date-picker.component.d.ts +8 -4
- package/src/lib/date-pipes/date-format.pipe.d.ts +1 -1
- package/src/lib/duration-box/duration-box.component.d.ts +136 -0
- package/src/lib/duration-box/duration-box.module.d.ts +10 -0
- package/src/lib/duration-box/duration-box.types.d.ts +1 -0
- package/src/lib/duration-box/duration.service.d.ts +10 -0
- package/src/lib/duration-box/package.json +10 -0
- package/src/lib/duration-box/public-api.d.ts +2 -0
- package/src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.d.ts +5 -0
- package/src/lib/duration-pipe/duration-format.pipe.d.ts +7 -0
- package/src/lib/duration-pipe/duration-pipe.module.d.ts +8 -0
- package/src/lib/duration-pipe/package.json +10 -0
- package/src/lib/duration-pipe/public-api.d.ts +2 -0
- package/src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.d.ts +5 -0
- package/src/lib/modal/modal.component.d.ts +3 -1
- package/src/lib/navigation/navigation-group/navigation-group.component.d.ts +18 -4
- package/src/lib/navigation/navigation.module.d.ts +5 -4
- package/src/lib/navigation/pipes/index.d.ts +1 -0
- package/src/lib/navigation/pipes/navigation-route-active.pipe.d.ts +7 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-modal.mjs","sources":["../../../projects/ngx-sds-components/src/lib/modal/modal.component.ts","../../../projects/ngx-sds-components/src/lib/modal/modal.component.html","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.ts","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.html","../../../projects/ngx-sds-components/src/lib/modal/modal.module.ts","../../../projects/ngx-sds-components/src/lib/modal/spicainternational-ngx-sds-components-src-lib-modal.ts"],"sourcesContent":["import {\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n EventEmitter,\r\n ContentChild,\r\n} from '@angular/core';\r\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\r\nimport { ModalTranslations } from './modal.model';\r\n\r\n@Component({\r\n selector: 'sds-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n})\r\nexport class SdsModalComponent implements OnInit {\r\n @ContentChild('header') headerContent: ElementRef = { nativeElement: undefined };\r\n\r\n @Input() public modalTitle?: string;\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showFooter: boolean = true;\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\r\n @Input() public modalDialogId?: string;\r\n @Input() public showCloseButton: boolean = true;\r\n\r\n @Input() public translations: ModalTranslations;\r\n @Input() public isScrollable = true;\r\n\r\n @Output() public modalOpen: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() public modalClose: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n @Output() public closeClick: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n public closeIcon = faXmark;\r\n\r\n @ViewChild('modal', { static: false }) private _modal: ElementRef | undefined;\r\n \r\n\r\n constructor() {\r\n this.translations = {\r\n close: undefined\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public open(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'block';\r\n this.modalOpen.emit();\r\n }\r\n }\r\n\r\n public close(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'none';\r\n this.modalClose.emit();\r\n }\r\n }\r\n\r\n public onCloseButtonClick(){\r\n this.closeClick.emit();\r\n this.close();\r\n }\r\n}\r\n","<div #modal class=\"modal\">\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [id]=\"modalDialogId\"\r\n [ngClass]=\"'modal-' + size\"\r\n role=\"document\"\r\n >\r\n <div class=\"modal-content\">\r\n\r\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\r\n <ng-content select='header'></ng-content>\r\n </div> \r\n\r\n <div *ngIf=\"showHeader && !headerContent\" class=\"modal-header\">\r\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\r\n <button \r\n *ngIf=\"showCloseButton\"\r\n type=\"button\" \r\n class=\"btn border-0\" \r\n [title]=\"translations.close ?? ''\"\r\n (click)=\"onCloseButtonClick()\">\r\n <fa-icon [icon]=\"closeIcon\"></fa-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"modal-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\r\n <ng-content select=\"footer\"></ng-content>\r\n </div> \r\n </div>\r\n </div>\r\n</div>","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { SdsModalComponent } from '../modal.component';\r\n\r\ntype modalButton = 'primary' | 'secondary' | 'close';\r\n\r\n@Component({\r\n selector: 'sds-dialog',\r\n templateUrl: './dialog.component.html',\r\n styleUrls: ['./dialog.component.scss'],\r\n})\r\nexport class SdsDialogComponent implements OnInit {\r\n @Input() public title: string = '';\r\n @Input() public closeText?: string = 'close';\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\r\n\r\n @Input() public primaryButtonText: string = 'Ok';\r\n @Input() public secondaryButtonText: string = 'Cancel';\r\n\r\n @Input() public primaryButtonClass: string = 'btn-primary';\r\n @Input() public secondaryButtonClass: string = 'btn-secondary';\r\n\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showCloseButton: boolean = true;\r\n @Input() public showPrimaryButton: boolean = true;\r\n @Input() public showSecondaryButton: boolean = true;\r\n\r\n @ViewChild('modal', { static: true }) private _modal: SdsModalComponent | undefined;\r\n\r\n private _callback?: Function;\r\n private _callbackData: any;\r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n\r\n public open(callback?: (button: modalButton, data: any) => void, data?: any): void{\r\n this._callback = callback;\r\n this._callbackData = data;\r\n\r\n if (this._modal != undefined) {\r\n this._modal.open();\r\n }\r\n }\r\n\r\n private close(): void {\r\n if (this._modal != undefined) {\r\n this._modal.close();\r\n }\r\n }\r\n\r\n public onSecondaryClick(): void {\r\n if (this._callback) {\r\n this._callback('secondary', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onPrimaryClick(): void {\r\n if (this._callback) {\r\n this._callback('primary', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onCloseClick(): void {\r\n if (this._callback) {\r\n this._callback('close', this._callbackData);\r\n }\r\n }\r\n\r\n}\r\n\r\n\r\n\r\n","<sds-modal\r\n #modal\r\n [modalTitle]=\"title\"\r\n [size]=\"size\"\r\n [showCloseButton]=\"showCloseButton\"\r\n [showHeader]=\"showHeader\"\r\n [translations]=\"{ close: closeText}\"\r\n (closeClick)=\"onCloseClick()\"\r\n>\r\n <div>\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <ng-container #footer ngProjectAs='footer'>\r\n <button\r\n *ngIf=\"showSecondaryButton\"\r\n class=\"btn\"\r\n [class]=\"secondaryButtonClass\"\r\n (click)=\"onSecondaryClick()\"\r\n >{{secondaryButtonText}}</button>\r\n <button\r\n *ngIf=\"showPrimaryButton\"\r\n class=\"btn\"\r\n [class]=\"primaryButtonClass\"\r\n (click)=\"onPrimaryClick()\"\r\n >{{primaryButtonText}}</button>\r\n </ng-container>\r\n</sds-modal>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsModalComponent } from './modal.component';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { SdsDialogComponent } from './dialog/dialog.component';\r\n\r\n\r\nconst components = [\r\n SdsModalComponent,\r\n SdsDialogComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n FontAwesomeModule\r\n ],\r\n exports: [\r\n ...components\r\n]\r\n})\r\nexport class SdsModalModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SdsModalComponent"],"mappings":";;;;;;;;MAkBa,iBAAiB,CAAA;AAuB1B,IAAA,WAAA,GAAA;A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AACjB,QAAA,kBAAkB,aAQlB,YAAY;AACZ,QAAA,iBAAiB,aAVjB,iBAAiB;QACjB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAeT,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EARhB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,iBAAiB;AAClB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAKU,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AAChB,qBAAA;AACA,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-modal.mjs","sources":["../../../projects/ngx-sds-components/src/lib/modal/modal.component.ts","../../../projects/ngx-sds-components/src/lib/modal/modal.component.html","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.ts","../../../projects/ngx-sds-components/src/lib/modal/dialog/dialog.component.html","../../../projects/ngx-sds-components/src/lib/modal/modal.module.ts","../../../projects/ngx-sds-components/src/lib/modal/spicainternational-ngx-sds-components-src-lib-modal.ts"],"sourcesContent":["import {\r\n Component,\r\n ElementRef,\r\n Input,\r\n OnInit,\r\n Output,\r\n ViewChild,\r\n EventEmitter,\r\n ContentChild,\r\n HostListener,\r\n} from '@angular/core';\r\nimport { faXmark } from '@fortawesome/pro-regular-svg-icons';\r\nimport { ModalTranslations } from './modal.model';\r\n\r\n@Component({\r\n selector: 'sds-modal',\r\n templateUrl: './modal.component.html',\r\n styleUrls: ['./modal.component.scss'],\r\n})\r\nexport class SdsModalComponent implements OnInit {\r\n @ContentChild('header') headerContent: ElementRef = { nativeElement: undefined };\r\n\r\n @Input() public modalTitle?: string;\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showFooter: boolean = true;\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\r\n @Input() public modalDialogId?: string;\r\n @Input() public showCloseButton: boolean = true;\r\n\r\n @Input() public translations: ModalTranslations;\r\n @Input() public isScrollable = true;\r\n @Input() public closeOnEscape = false;\r\n\r\n @Output() public modalOpen: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() public modalClose: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n @Output() public closeClick: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n public closeIcon = faXmark;\r\n\r\n @ViewChild('modal', { static: false }) private _modal: ElementRef | undefined;\r\n \r\n\r\n constructor() {\r\n this.translations = {\r\n close: undefined\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public open(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'block';\r\n this._modal.nativeElement.focus();\r\n this.modalOpen.emit();\r\n }\r\n }\r\n\r\n public close(): void {\r\n if (this._modal != undefined) {\r\n this._modal.nativeElement.style.display = 'none';\r\n this.modalClose.emit();\r\n }\r\n }\r\n\r\n public onCloseButtonClick(){\r\n this.closeClick.emit();\r\n this.close();\r\n }\r\n\r\n onKeydown(event: KeyboardEvent){\r\n if (\r\n event.code === 'Escape' &&\r\n this. closeOnEscape && \r\n this._modal != undefined && \r\n this._modal.nativeElement.style.display === 'block'){\r\n // console.log(`${this.constructor.name} got event: ${event.code}`);\r\n this.close();\r\n }\r\n }\r\n}\r\n","<div #modal class=\"modal\" (keydown)=\"onKeydown($event)\" tabindex=\"1\">\r\n <div\r\n class=\"modal-dialog modal-dialog-centered\"\r\n [class.modal-dialog-scrollable] = \"isScrollable\"\r\n [id]=\"modalDialogId\"\r\n [ngClass]=\"'modal-' + size\"\r\n role=\"document\"\r\n >\r\n <div class=\"modal-content\">\r\n\r\n <div *ngIf=\"showHeader && headerContent\" class=\"modal-header\">\r\n <ng-content select='header'></ng-content>\r\n </div> \r\n\r\n <div *ngIf=\"showHeader && !headerContent\" class=\"modal-header\">\r\n <h5 class=\"modal-title\">{{modalTitle}}</h5>\r\n <button \r\n *ngIf=\"showCloseButton\"\r\n type=\"button\" \r\n class=\"btn-close\" \r\n [title]=\"translations.close ?? ''\"\r\n (click)=\"onCloseButtonClick()\">\r\n </button>\r\n </div>\r\n\r\n <div class=\"modal-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <div *ngIf=\"showFooter\" class=\"modal-footer\">\r\n <ng-content select=\"footer\"></ng-content>\r\n </div> \r\n </div>\r\n </div>\r\n</div>","import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { SdsModalComponent } from '../modal.component';\r\n\r\ntype modalButton = 'primary' | 'secondary' | 'close';\r\n\r\n@Component({\r\n selector: 'sds-dialog',\r\n templateUrl: './dialog.component.html',\r\n styleUrls: ['./dialog.component.scss'],\r\n})\r\nexport class SdsDialogComponent implements OnInit {\r\n @Input() public title: string = '';\r\n @Input() public closeText?: string = 'close';\r\n @Input() public size: 'sm' | 'md' | 'lg' | 'xl' = 'md';\r\n\r\n @Input() public primaryButtonText: string = 'Ok';\r\n @Input() public secondaryButtonText: string = 'Cancel';\r\n\r\n @Input() public primaryButtonClass: string = 'btn-primary';\r\n @Input() public secondaryButtonClass: string = 'btn-secondary';\r\n\r\n @Input() public showHeader: boolean = true;\r\n @Input() public showCloseButton: boolean = true;\r\n @Input() public showPrimaryButton: boolean = true;\r\n @Input() public showSecondaryButton: boolean = true;\r\n\r\n @ViewChild('modal', { static: true }) private _modal: SdsModalComponent | undefined;\r\n\r\n private _callback?: Function;\r\n private _callbackData: any;\r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n\r\n public open(callback?: (button: modalButton, data: any) => void, data?: any): void{\r\n this._callback = callback;\r\n this._callbackData = data;\r\n\r\n if (this._modal != undefined) {\r\n this._modal.open();\r\n }\r\n }\r\n\r\n private close(): void {\r\n if (this._modal != undefined) {\r\n this._modal.close();\r\n }\r\n }\r\n\r\n public onSecondaryClick(): void {\r\n if (this._callback) {\r\n this._callback('secondary', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onPrimaryClick(): void {\r\n if (this._callback) {\r\n this._callback('primary', this._callbackData);\r\n }\r\n this.close();\r\n }\r\n\r\n public onCloseClick(): void {\r\n if (this._callback) {\r\n this._callback('close', this._callbackData);\r\n }\r\n }\r\n\r\n}\r\n\r\n\r\n\r\n","<sds-modal\r\n #modal\r\n [modalTitle]=\"title\"\r\n [size]=\"size\"\r\n [showCloseButton]=\"showCloseButton\"\r\n [showHeader]=\"showHeader\"\r\n [translations]=\"{ close: closeText}\"\r\n (closeClick)=\"onCloseClick()\"\r\n>\r\n <div>\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n <ng-container #footer ngProjectAs='footer'>\r\n <button\r\n *ngIf=\"showSecondaryButton\"\r\n class=\"btn\"\r\n [class]=\"secondaryButtonClass\"\r\n (click)=\"onSecondaryClick()\"\r\n >{{secondaryButtonText}}</button>\r\n <button\r\n *ngIf=\"showPrimaryButton\"\r\n class=\"btn\"\r\n [class]=\"primaryButtonClass\"\r\n (click)=\"onPrimaryClick()\"\r\n >{{primaryButtonText}}</button>\r\n </ng-container>\r\n</sds-modal>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsModalComponent } from './modal.component';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { SdsDialogComponent } from './dialog/dialog.component';\r\n\r\n\r\nconst components = [\r\n SdsModalComponent,\r\n SdsDialogComponent\r\n];\r\n\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n FontAwesomeModule\r\n ],\r\n exports: [\r\n ...components\r\n]\r\n})\r\nexport class SdsModalModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SdsModalComponent","i2"],"mappings":";;;;;;;MAmBa,iBAAiB,CAAA;AAwB1B,IAAA,WAAA,GAAA;AAvBwB,QAAA,IAAA,CAAA,aAAa,GAAe,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;QAGjE,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;QAC3B,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;QAC3B,IAAI,CAAA,IAAA,GAA8B,IAAI,CAAC;QAEvC,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;QAGhC,IAAY,CAAA,YAAA,GAAG,IAAI,CAAC;QACpB,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;AAErB,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACzD,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAQ,CAAC;AAE1D,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAQ,CAAC;QAEpE,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;QAMvB,IAAI,CAAC,YAAY,GAAG;AAChB,YAAA,KAAK,EAAE,SAAS;SACnB,CAAA;KACJ;AAED,IAAA,QAAQ,MAAW;IAEZ,IAAI,GAAA;AACP,QAAA,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE;YAC1B,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;AAClD,YAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;AAClC,YAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;AACzB,SAAA;KACJ;IAEM,KAAK,GAAA;AACR,QAAA,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE;YAC1B,IA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kBAAkB;CACrB,CAAC;MAcW,cAAc,CAAA;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,iBAhBvB,iBAAiB;AACjB,QAAA,kBAAkB,aAQlB,YAAY;AACZ,QAAA,iBAAiB,aAVjB,iBAAiB;QACjB,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAeT,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EARhB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,iBAAiB;AAClB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAKU,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AAChB,qBAAA;AACA,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input, QueryList, ContentChildren, NgModule } from '@angular/core';
|
|
2
|
+
import { Component, Input, Pipe, QueryList, ContentChildren, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/router';
|
|
@@ -7,6 +7,7 @@ import { NavigationStart, RouterModule } from '@angular/router';
|
|
|
7
7
|
import * as i2$1 from '@fortawesome/angular-fontawesome';
|
|
8
8
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
9
9
|
import { faAngleUp, faAngleDown, faExternalLink } from '@fortawesome/pro-regular-svg-icons';
|
|
10
|
+
import { Subject, filter, takeUntil } from 'rxjs';
|
|
10
11
|
|
|
11
12
|
class SdsNavigationSeparatorComponent {
|
|
12
13
|
constructor() { }
|
|
@@ -56,9 +57,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
56
57
|
type: Input
|
|
57
58
|
}] } });
|
|
58
59
|
|
|
60
|
+
class NavigationRouteActivePipe {
|
|
61
|
+
transform(currentUrl, ...args) {
|
|
62
|
+
if (!currentUrl || currentUrl?.length === 0) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
const nestedRoutes = args[0];
|
|
66
|
+
const defaultGroupUrl = args[1].replace('/', '');
|
|
67
|
+
if (nestedRoutes?.length > 0) {
|
|
68
|
+
// Nested routes are provided. We should find out if current url is on the list of
|
|
69
|
+
// the provided nested routes
|
|
70
|
+
const lastRouteItem = currentUrl.reverse().find((item, index) => index === 0);
|
|
71
|
+
const routeItemIsPartOfNestedRoutes = nestedRoutes.some((routeName) => routeName === lastRouteItem);
|
|
72
|
+
if (routeItemIsPartOfNestedRoutes) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
console.warn(`Nested routes were defined in sds-navigation-group component, however route ${lastRouteItem} is
|
|
76
|
+
not a part of the nested routes list. Maybe you forgot to include it? `);
|
|
77
|
+
}
|
|
78
|
+
const currentUrlContainsGroupUrl = currentUrl.some(path => path === defaultGroupUrl);
|
|
79
|
+
return currentUrlContainsGroupUrl;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
NavigationRouteActivePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: NavigationRouteActivePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
83
|
+
NavigationRouteActivePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: NavigationRouteActivePipe, name: "navigationRouteActive" });
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: NavigationRouteActivePipe, decorators: [{
|
|
85
|
+
type: Pipe,
|
|
86
|
+
args: [{
|
|
87
|
+
name: 'navigationRouteActive'
|
|
88
|
+
}]
|
|
89
|
+
}] });
|
|
90
|
+
|
|
59
91
|
class SdsNavigationGroupComponent {
|
|
60
92
|
constructor(_router) {
|
|
61
93
|
this._router = _router;
|
|
94
|
+
/**
|
|
95
|
+
* List of paths allowed/expected within this module.
|
|
96
|
+
* These are paths that are not accessible through child navigation
|
|
97
|
+
* elements, but through links in other parts of the application (e.g. link
|
|
98
|
+
* on form)
|
|
99
|
+
*/
|
|
100
|
+
this._navigationGroupNestedRoutes = [];
|
|
62
101
|
this.text = '';
|
|
63
102
|
this.icon = '';
|
|
64
103
|
this.defaultRouterLink = '';
|
|
@@ -67,28 +106,42 @@ class SdsNavigationGroupComponent {
|
|
|
67
106
|
this.active = false;
|
|
68
107
|
this.faAngleUpRegular = faAngleUp;
|
|
69
108
|
this.faAngleDownRegular = faAngleDown;
|
|
109
|
+
/**
|
|
110
|
+
* Current app URL (e.g. ['layout-showcase', 'default'])
|
|
111
|
+
*/
|
|
112
|
+
this.currentUrl = [];
|
|
113
|
+
this._unsubscribe = new Subject();
|
|
70
114
|
}
|
|
71
|
-
|
|
115
|
+
set navigationGroupNestedRoutes(value) {
|
|
116
|
+
this._navigationGroupNestedRoutes = value;
|
|
117
|
+
}
|
|
118
|
+
get navigationGroupNestedRoutes() {
|
|
119
|
+
return this._navigationGroupNestedRoutes;
|
|
72
120
|
}
|
|
73
|
-
|
|
74
|
-
this._router.events.subscribe((event) => {
|
|
121
|
+
ngOnInit() {
|
|
122
|
+
this._router.events.pipe(filter((event) => event instanceof NavigationStart), takeUntil(this._unsubscribe)).subscribe((event) => {
|
|
75
123
|
if (event instanceof NavigationStart) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
.routerLink === event.url) != null;
|
|
124
|
+
const route = event.url.split('/').filter(item => item.length > 0);
|
|
125
|
+
this.currentUrl = route;
|
|
79
126
|
}
|
|
80
127
|
});
|
|
81
128
|
}
|
|
129
|
+
ngOnDestroy() {
|
|
130
|
+
this._unsubscribe.next();
|
|
131
|
+
this._unsubscribe.complete();
|
|
132
|
+
}
|
|
82
133
|
navigateToDefaultRouterLink() {
|
|
83
134
|
this._router.navigateByUrl(this.defaultRouterLink);
|
|
84
135
|
}
|
|
85
136
|
}
|
|
86
137
|
SdsNavigationGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsNavigationGroupComponent, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
-
SdsNavigationGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsNavigationGroupComponent, selector: "sds-navigation-group", inputs: { text: "text", icon: "icon", defaultRouterLink: "defaultRouterLink", reverse: "reverse" }, queries: [{ propertyName: "routerLinkComponents", predicate: SdsNavigationRouteLinkComponent }], ngImport: i0, template: "<div class=\"sds-navigation-group sds-navigation-item-container d-flex\"\r\n [class.flex-column-reverse]=\"reverse\"\r\n [class.flex-column]=\"!reverse\"\r\n [class
|
|
138
|
+
SdsNavigationGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsNavigationGroupComponent, selector: "sds-navigation-group", inputs: { navigationGroupNestedRoutes: "navigationGroupNestedRoutes", text: "text", icon: "icon", defaultRouterLink: "defaultRouterLink", reverse: "reverse" }, queries: [{ propertyName: "routerLinkComponents", predicate: SdsNavigationRouteLinkComponent }], ngImport: i0, template: "<div class=\"sds-navigation-group sds-navigation-item-container d-flex\"\r\n [class.flex-column-reverse]=\"reverse\"\r\n [class.flex-column]=\"!reverse\"\r\n [class]=\"{'active': currentUrl | navigationRouteActive :navigationGroupNestedRoutes: defaultRouterLink}\">\r\n <a class=\"w-100 sds-navigation-item-content\" style=\"cursor: pointer\"\r\n (click)=\"navigateToDefaultRouterLink()\">\r\n\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <div class=\"text-right\">\r\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\r\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\r\n </div>\r\n </div>\r\n </a>\r\n <div class=\"sds-navigation-group-items\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n</div>\r\n", styles: [""], components: [{ type: i2$1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "navigationRouteActive": NavigationRouteActivePipe } });
|
|
88
139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsNavigationGroupComponent, decorators: [{
|
|
89
140
|
type: Component,
|
|
90
|
-
args: [{ selector: 'sds-navigation-group', template: "<div class=\"sds-navigation-group sds-navigation-item-container d-flex\"\r\n [class.flex-column-reverse]=\"reverse\"\r\n [class.flex-column]=\"!reverse\"\r\n [class
|
|
91
|
-
}], ctorParameters: function () { return [{ type: i1.Router }]; }, propDecorators: {
|
|
141
|
+
args: [{ selector: 'sds-navigation-group', template: "<div class=\"sds-navigation-group sds-navigation-item-container d-flex\"\r\n [class.flex-column-reverse]=\"reverse\"\r\n [class.flex-column]=\"!reverse\"\r\n [class]=\"{'active': currentUrl | navigationRouteActive :navigationGroupNestedRoutes: defaultRouterLink}\">\r\n <a class=\"w-100 sds-navigation-item-content\" style=\"cursor: pointer\"\r\n (click)=\"navigateToDefaultRouterLink()\">\r\n\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <div class=\"text-right\">\r\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\r\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\r\n </div>\r\n </div>\r\n </a>\r\n <div class=\"sds-navigation-group-items\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n</div>\r\n", styles: [""] }]
|
|
142
|
+
}], ctorParameters: function () { return [{ type: i1.Router }]; }, propDecorators: { navigationGroupNestedRoutes: [{
|
|
143
|
+
type: Input
|
|
144
|
+
}], text: [{
|
|
92
145
|
type: Input
|
|
93
146
|
}], icon: [{
|
|
94
147
|
type: Input
|
|
@@ -168,7 +221,7 @@ SdsNavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ver
|
|
|
168
221
|
SdsNavigationSeparatorComponent,
|
|
169
222
|
SdsNavigationHeaderComponent,
|
|
170
223
|
SdsNavigationContainerComponent,
|
|
171
|
-
SdsNavigationExternalLinkComponent], imports: [CommonModule,
|
|
224
|
+
SdsNavigationExternalLinkComponent, NavigationRouteActivePipe], imports: [CommonModule,
|
|
172
225
|
RouterModule,
|
|
173
226
|
FontAwesomeModule], exports: [SdsNavigationGroupComponent,
|
|
174
227
|
SdsNavigationRouteLinkComponent,
|
|
@@ -185,7 +238,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
185
238
|
type: NgModule,
|
|
186
239
|
args: [{
|
|
187
240
|
declarations: [
|
|
188
|
-
...components
|
|
241
|
+
...components,
|
|
242
|
+
NavigationRouteActivePipe
|
|
189
243
|
],
|
|
190
244
|
imports: [
|
|
191
245
|
CommonModule,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-navigation.mjs","sources":["../../../projects/ngx-sds-components/src/lib/navigation/navigation-separator/navigation-separator.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-separator/navigation-separator.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation-header/navigation-header.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-header/navigation-header.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation-route-link/navigation-route-link.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-route-link/navigation-route-link.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation-group/navigation-group.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-group/navigation-group.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation-container/navigation-container.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-container/navigation-container.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation-external-link/navigation-external-link.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-external-link/navigation-external-link.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation.module.ts","../../../projects/ngx-sds-components/src/lib/navigation/spicainternational-ngx-sds-components-src-lib-navigation.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-navigation-separator',\r\n templateUrl: './navigation-separator.component.html',\r\n styleUrls: ['./navigation-separator.component.scss']\r\n})\r\nexport class SdsNavigationSeparatorComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<div class=\"sds-navigation-separator nav-separator\"></div>\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-navigation-header',\r\n templateUrl: './navigation-header.component.html',\r\n styleUrls: ['./navigation-header.component.scss'],\r\n})\r\nexport class SdsNavigationHeaderComponent implements OnInit {\r\n @Input() text: string;\r\n\r\n constructor() {\r\n this.text = '';\r\n }\r\n\r\n ngOnInit(): void {}\r\n}\r\n","<div class=\"sds-navigation-header\">\r\n {{ text }}\r\n</div>\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-navigation-route-link',\r\n templateUrl: './navigation-route-link.component.html',\r\n styleUrls: ['./navigation-route-link.component.scss'],\r\n})\r\nexport class SdsNavigationRouteLinkComponent implements OnInit {\r\n @Input() routerLink: string = '';\r\n @Input() text: string = '';\r\n\r\n @Input() additionalInfo: string | undefined = undefined;\r\n\r\n constructor() {\r\n }\r\n\r\n ngOnInit(): void {}\r\n}\r\n","<!-- class=\"sds-navigation-router-link sidebar-item-x d-flex justify-content-start align-items-center sidebar-item-x py-1\"> -->\r\n<div \r\n class=\"sds-navigation-router-link sds-navigation-item-container\"\r\n routerLinkActive=\"active\">\r\n <a class=\"sds-navigation-item-content w-100\" [routerLink]=\"routerLink\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <span *ngIf=\"additionalInfo\"\r\n class=\"sds-navigation-router-link-additional-info badge badge-pill badge-warning\"\r\n >{{ additionalInfo }}</span\r\n > \r\n </div>\r\n </a>\r\n</div>","import {\r\n AfterContentInit,\r\n Component,\r\n ContentChildren,\r\n Input,\r\n OnInit,\r\n QueryList,\r\n} from '@angular/core';\r\nimport { NavigationStart, Router } from '@angular/router';\r\nimport { SdsNavigationRouteLinkComponent } from '../navigation-route-link/navigation-route-link.component';\r\n\r\nimport { faAngleUp, faAngleDown } from '@fortawesome/pro-regular-svg-icons';\r\n\r\n\r\n\r\n@Component({\r\n selector: 'sds-navigation-group',\r\n templateUrl: './navigation-group.component.html',\r\n styleUrls: ['./navigation-group.component.scss'],\r\n})\r\nexport class SdsNavigationGroupComponent implements OnInit, AfterContentInit {\r\n @Input() text: string = '';\r\n @Input() icon: string = '';\r\n @Input() defaultRouterLink: string = '';\r\n @Input() reverse = false;\r\n\r\n @ContentChildren(SdsNavigationRouteLinkComponent)\r\n routerLinkComponents: QueryList<SdsNavigationRouteLinkComponent> = new QueryList<SdsNavigationRouteLinkComponent>();\r\n\r\n active: boolean = false;\r\n\r\n faAngleUpRegular = faAngleUp;\r\n faAngleDownRegular = faAngleDown;\r\n\r\n constructor(private _router: Router) {}\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n ngAfterContentInit() {\r\n this._router.events.subscribe((event) => {\r\n if (event instanceof NavigationStart) {\r\n this.active =\r\n this.routerLinkComponents.find(\r\n (item) =>\r\n (item as SdsNavigationRouteLinkComponent)\r\n .routerLink === event.url\r\n ) != null;\r\n }\r\n });\r\n }\r\n\r\n navigateToDefaultRouterLink() {\r\n this._router.navigateByUrl(this.defaultRouterLink);\r\n }\r\n\r\n}\r\n","<div class=\"sds-navigation-group sds-navigation-item-container d-flex\"\r\n [class.flex-column-reverse]=\"reverse\"\r\n [class.flex-column]=\"!reverse\"\r\n [class.active] = \"active\" >\r\n <a class=\"w-100 sds-navigation-item-content\" style=\"cursor: pointer\"\r\n (click)=\"navigateToDefaultRouterLink()\">\r\n \r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <div class=\"text-right\">\r\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\r\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\r\n </div>\r\n </div>\r\n </a>\r\n <div class=\"sds-navigation-group-items\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n</div>","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-navigation-container',\r\n templateUrl: './navigation-container.component.html',\r\n styleUrls: ['./navigation-container.component.scss'],\r\n})\r\nexport class SdsNavigationContainerComponent implements OnInit {\r\n @Input() product: string;\r\n\r\n constructor() {\r\n this.product = 'all-hours';\r\n }\r\n\r\n ngOnInit(): void {}\r\n}\r\n","<div \r\n class=\"sds-navigation-container\"\r\n [class]=\"'product-' + product\">\r\n <ng-content></ng-content>\r\n</div>","import { Component, Input, OnInit } from '@angular/core';\r\nimport { faExternalLink } from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-navigation-external-link',\r\n templateUrl: './navigation-external-link.component.html',\r\n styleUrls: ['./navigation-external-link.component.scss']\r\n})\r\nexport class SdsNavigationExternalLinkComponent implements OnInit {\r\n\r\n @Input() link: string = '';\r\n @Input() text: string = '';\r\n @Input() tabName: string = '_blank'\r\n @Input() externalLinkHint = '';\r\n @Input() showExternalLinkIcon = true;\r\n\r\n\r\n public externalLinkIcon = faExternalLink;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n openLink(){\r\n window.open(this.link, this.tabName);\r\n }\r\n\r\n}\r\n","<div \r\n class=\"sds-navigation-external-link sds-navigation-item-container\">\r\n <a class=\"w-100 sds-navigation-item-content\" (click)=\"openLink()\" >\r\n <div class=\"d-flex align-items-center position-relative\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n\r\n <div class=\"sds-navigation-text\">\r\n <span>{{ text }}</span>\r\n </div>\r\n\r\n <div \r\n class=\"sds-navigation-external-link-info-container\">\r\n <fa-icon \r\n class=\"sds-navigation-external-link-info-icon\"\r\n *ngIf=\"showExternalLinkIcon\"\r\n\r\n [icon]=\"externalLinkIcon\"\r\n [size]=\"'xs'\"\r\n [title]=\"externalLinkHint\"\r\n >\r\n </fa-icon>\r\n </div> \r\n\r\n </div>\r\n </a>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\n\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\n\r\nimport { SdsNavigationSeparatorComponent } from './navigation-separator/navigation-separator.component';\r\nimport { SdsNavigationHeaderComponent } from './navigation-header/navigation-header.component';\r\nimport { SdsNavigationGroupComponent } from './navigation-group/navigation-group.component';\r\nimport { SdsNavigationRouteLinkComponent } from './navigation-route-link/navigation-route-link.component';\r\nimport { SdsNavigationContainerComponent } from './navigation-container/navigation-container.component';\r\nimport { SdsNavigationExternalLinkComponent } from './navigation-external-link/navigation-external-link.component';\r\n\r\n// import { NavigationGroupComponent } from './navigation-group/navigation-group.component';\r\n// import { NavigationRouteLinkComponent } from './navigation-route-link/navigation-route-link.component';\r\n// import { NavigationSeparatorComponent } from './navigation-separator/navigation-separator.component';\r\n// import { NavigationHeaderComponent } from './navigation-header/navigation-header.component';\r\n\r\nconst components = [\r\n SdsNavigationGroupComponent,\r\n SdsNavigationRouteLinkComponent,\r\n SdsNavigationSeparatorComponent,\r\n SdsNavigationHeaderComponent,\r\n SdsNavigationContainerComponent,\r\n SdsNavigationExternalLinkComponent\r\n]\r\n \r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FontAwesomeModule \r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsNavigationModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3","i1"],"mappings":";;;;;;;;;;MAOa,+BAA+B,CAAA;AAE1C,IAAA,WAAA,GAAA,GAAiB;IAEjB,QAAQ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,2BAA2B;QAC3B,+BAA+B;QAC/B,+BAA+B;QAC/B,4BAA4B;QAC5B,+BAA+B;AAC/B,QAAA,kCAAkC,aAQlC,YAAY;QACZ,YAAY;AACZ,QAAA,iBAAiB,aAfjB,2BAA2B;QAC3B,+BAA+B;QAC/B,+BAA+B;QAC/B,4BAA4B;QAC5B,+BAA+B;QAC/B,kCAAkC,CAAA,EAAA,CAAA,CAAA;AAgBzB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,EATrB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,YAAY;YACZ,iBAAiB;AAClB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAKU,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAb/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACV,wBAAA,GAAG,UAAU;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AACd,qBAAA;AACF,iBAAA,CAAA;;;ACvCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-navigation.mjs","sources":["../../../projects/ngx-sds-components/src/lib/navigation/navigation-separator/navigation-separator.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-separator/navigation-separator.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation-header/navigation-header.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-header/navigation-header.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation-route-link/navigation-route-link.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-route-link/navigation-route-link.component.html","../../../projects/ngx-sds-components/src/lib/navigation/pipes/navigation-route-active.pipe.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-group/navigation-group.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-group/navigation-group.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation-container/navigation-container.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-container/navigation-container.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation-external-link/navigation-external-link.component.ts","../../../projects/ngx-sds-components/src/lib/navigation/navigation-external-link/navigation-external-link.component.html","../../../projects/ngx-sds-components/src/lib/navigation/navigation.module.ts","../../../projects/ngx-sds-components/src/lib/navigation/spicainternational-ngx-sds-components-src-lib-navigation.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-navigation-separator',\r\n templateUrl: './navigation-separator.component.html',\r\n styleUrls: ['./navigation-separator.component.scss']\r\n})\r\nexport class SdsNavigationSeparatorComponent implements OnInit {\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n}\r\n","<div class=\"sds-navigation-separator nav-separator\"></div>\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-navigation-header',\r\n templateUrl: './navigation-header.component.html',\r\n styleUrls: ['./navigation-header.component.scss'],\r\n})\r\nexport class SdsNavigationHeaderComponent implements OnInit {\r\n @Input() text: string;\r\n\r\n constructor() {\r\n this.text = '';\r\n }\r\n\r\n ngOnInit(): void {}\r\n}\r\n","<div class=\"sds-navigation-header\">\r\n {{ text }}\r\n</div>\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-navigation-route-link',\r\n templateUrl: './navigation-route-link.component.html',\r\n styleUrls: ['./navigation-route-link.component.scss'],\r\n})\r\nexport class SdsNavigationRouteLinkComponent implements OnInit {\r\n @Input() routerLink: string = '';\r\n @Input() text: string = '';\r\n\r\n @Input() additionalInfo: string | undefined = undefined;\r\n\r\n constructor() {\r\n }\r\n\r\n ngOnInit(): void {}\r\n}\r\n","<!-- class=\"sds-navigation-router-link sidebar-item-x d-flex justify-content-start align-items-center sidebar-item-x py-1\"> -->\r\n<div \r\n class=\"sds-navigation-router-link sds-navigation-item-container\"\r\n routerLinkActive=\"active\">\r\n <a class=\"sds-navigation-item-content w-100\" [routerLink]=\"routerLink\">\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <span *ngIf=\"additionalInfo\"\r\n class=\"sds-navigation-router-link-additional-info badge badge-pill badge-warning\"\r\n >{{ additionalInfo }}</span\r\n > \r\n </div>\r\n </a>\r\n</div>","import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'navigationRouteActive'\r\n})\r\nexport class NavigationRouteActivePipe implements PipeTransform {\r\n\r\n transform(currentUrl: string[], ...args: unknown[]): boolean {\r\n if (!currentUrl || currentUrl?.length === 0) {\r\n return false;\r\n }\r\n const nestedRoutes: string[] = args[0] as string[];\r\n const defaultGroupUrl: string = (args[1] as string).replace('/', '');\r\n\r\n if (nestedRoutes?.length > 0) {\r\n // Nested routes are provided. We should find out if current url is on the list of\r\n // the provided nested routes\r\n const lastRouteItem = currentUrl.reverse().find((item, index) => index === 0);\r\n\r\n const routeItemIsPartOfNestedRoutes = nestedRoutes.some((routeName) => routeName === lastRouteItem);\r\n if (routeItemIsPartOfNestedRoutes) {\r\n return true;\r\n }\r\n console.warn(\r\n `Nested routes were defined in sds-navigation-group component, however route ${lastRouteItem} is\r\n not a part of the nested routes list. Maybe you forgot to include it? `\r\n );\r\n }\r\n\r\n const currentUrlContainsGroupUrl = currentUrl.some(path => path === defaultGroupUrl);\r\n return currentUrlContainsGroupUrl;\r\n }\r\n\r\n}\r\n","import {\r\n AfterContentInit,\r\n Component,\r\n ContentChildren,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n QueryList,\r\n} from '@angular/core';\r\nimport { NavigationStart, Router } from '@angular/router';\r\nimport { SdsNavigationRouteLinkComponent } from '../navigation-route-link/navigation-route-link.component';\r\n\r\nimport { faAngleUp, faAngleDown } from '@fortawesome/pro-regular-svg-icons';\r\nimport { filter, Subject, takeUntil } from 'rxjs';\r\n\r\n@Component({\r\n selector: 'sds-navigation-group',\r\n templateUrl: './navigation-group.component.html',\r\n styleUrls: ['./navigation-group.component.scss'],\r\n})\r\nexport class SdsNavigationGroupComponent implements OnInit, OnDestroy {\r\n /**\r\n * List of paths allowed/expected within this module.\r\n * These are paths that are not accessible through child navigation\r\n * elements, but through links in other parts of the application (e.g. link\r\n * on form)\r\n */\r\n private _navigationGroupNestedRoutes: string[] = [];\r\n @Input()\r\n set navigationGroupNestedRoutes(value: string[]) {\r\n this._navigationGroupNestedRoutes = value;\r\n }\r\n get navigationGroupNestedRoutes() {\r\n return this._navigationGroupNestedRoutes;\r\n }\r\n\r\n @Input() text: string = '';\r\n @Input() icon: string = '';\r\n @Input() defaultRouterLink: string = '';\r\n @Input() reverse = false;\r\n\r\n @ContentChildren(SdsNavigationRouteLinkComponent)\r\n routerLinkComponents: QueryList<SdsNavigationRouteLinkComponent> = new QueryList<SdsNavigationRouteLinkComponent>();\r\n\r\n active: boolean = false;\r\n\r\n faAngleUpRegular = faAngleUp;\r\n faAngleDownRegular = faAngleDown;\r\n\r\n /**\r\n * Current app URL (e.g. ['layout-showcase', 'default'])\r\n */\r\n currentUrl: string[] = [];\r\n\r\n private _unsubscribe: Subject<void> = new Subject<void>();\r\n\r\n constructor(private _router: Router) {}\r\n\r\n ngOnInit(): void {\r\n this._router.events.pipe(\r\n filter((event) => event instanceof NavigationStart),\r\n takeUntil(this._unsubscribe)\r\n ).subscribe((event) => {\r\n if (event instanceof NavigationStart) {\r\n const route: string[] = event.url.split('/').filter(item => item.length > 0)\r\n this.currentUrl = route;\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribe.next();\r\n this._unsubscribe.complete();\r\n }\r\n\r\n navigateToDefaultRouterLink() {\r\n this._router.navigateByUrl(this.defaultRouterLink);\r\n }\r\n\r\n}\r\n","<div class=\"sds-navigation-group sds-navigation-item-container d-flex\"\r\n [class.flex-column-reverse]=\"reverse\"\r\n [class.flex-column]=\"!reverse\"\r\n [class]=\"{'active': currentUrl | navigationRouteActive :navigationGroupNestedRoutes: defaultRouterLink}\">\r\n <a class=\"w-100 sds-navigation-item-content\" style=\"cursor: pointer\"\r\n (click)=\"navigateToDefaultRouterLink()\">\r\n\r\n <div class=\"d-flex align-items-center\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n <div class=\"sds-navigation-text\">\r\n {{ text }}\r\n </div>\r\n <div class=\"text-right\">\r\n <fa-icon *ngIf=\"!reverse\" [icon]=\"faAngleDownRegular\"></fa-icon>\r\n <fa-icon *ngIf=\"reverse\" [icon]=\"faAngleUpRegular\"></fa-icon>\r\n </div>\r\n </div>\r\n </a>\r\n <div class=\"sds-navigation-group-items\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n</div>\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-navigation-container',\r\n templateUrl: './navigation-container.component.html',\r\n styleUrls: ['./navigation-container.component.scss'],\r\n})\r\nexport class SdsNavigationContainerComponent implements OnInit {\r\n @Input() product: string;\r\n\r\n constructor() {\r\n this.product = 'all-hours';\r\n }\r\n\r\n ngOnInit(): void {}\r\n}\r\n","<div \r\n class=\"sds-navigation-container\"\r\n [class]=\"'product-' + product\">\r\n <ng-content></ng-content>\r\n</div>","import { Component, Input, OnInit } from '@angular/core';\r\nimport { faExternalLink } from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-navigation-external-link',\r\n templateUrl: './navigation-external-link.component.html',\r\n styleUrls: ['./navigation-external-link.component.scss']\r\n})\r\nexport class SdsNavigationExternalLinkComponent implements OnInit {\r\n\r\n @Input() link: string = '';\r\n @Input() text: string = '';\r\n @Input() tabName: string = '_blank'\r\n @Input() externalLinkHint = '';\r\n @Input() showExternalLinkIcon = true;\r\n\r\n\r\n public externalLinkIcon = faExternalLink;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n openLink(){\r\n window.open(this.link, this.tabName);\r\n }\r\n\r\n}\r\n","<div \r\n class=\"sds-navigation-external-link sds-navigation-item-container\">\r\n <a class=\"w-100 sds-navigation-item-content\" (click)=\"openLink()\" >\r\n <div class=\"d-flex align-items-center position-relative\">\r\n <div class=\"sds-navigation-icon\" >\r\n <ng-content select=\"[navigationIcon]\"></ng-content>\r\n </div>\r\n\r\n <div class=\"sds-navigation-text\">\r\n <span>{{ text }}</span>\r\n </div>\r\n\r\n <div \r\n class=\"sds-navigation-external-link-info-container\">\r\n <fa-icon \r\n class=\"sds-navigation-external-link-info-icon\"\r\n *ngIf=\"showExternalLinkIcon\"\r\n\r\n [icon]=\"externalLinkIcon\"\r\n [size]=\"'xs'\"\r\n [title]=\"externalLinkHint\"\r\n >\r\n </fa-icon>\r\n </div> \r\n\r\n </div>\r\n </a>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\n\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\n\r\nimport { SdsNavigationSeparatorComponent } from './navigation-separator/navigation-separator.component';\r\nimport { SdsNavigationHeaderComponent } from './navigation-header/navigation-header.component';\r\nimport { SdsNavigationGroupComponent } from './navigation-group/navigation-group.component';\r\nimport { SdsNavigationRouteLinkComponent } from './navigation-route-link/navigation-route-link.component';\r\nimport { SdsNavigationContainerComponent } from './navigation-container/navigation-container.component';\r\nimport { SdsNavigationExternalLinkComponent } from './navigation-external-link/navigation-external-link.component';\r\nimport { NavigationRouteActivePipe } from './pipes';\r\n\r\n// import { NavigationGroupComponent } from './navigation-group/navigation-group.component';\r\n// import { NavigationRouteLinkComponent } from './navigation-route-link/navigation-route-link.component';\r\n// import { NavigationSeparatorComponent } from './navigation-separator/navigation-separator.component';\r\n// import { NavigationHeaderComponent } from './navigation-header/navigation-header.component';\r\n\r\nconst components = [\r\n SdsNavigationGroupComponent,\r\n SdsNavigationRouteLinkComponent,\r\n SdsNavigationSeparatorComponent,\r\n SdsNavigationHeaderComponent,\r\n SdsNavigationContainerComponent,\r\n SdsNavigationExternalLinkComponent\r\n]\r\n\r\n@NgModule({\r\n declarations: [\r\n ...components,\r\n NavigationRouteActivePipe\r\n ],\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n FontAwesomeModule\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsNavigationModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3","i4.NavigationRouteActivePipe","i1"],"mappings":";;;;;;;;;;;MAOa,+BAA+B,CAAA;AAE1C,IAAA,WAAA,GAAA,GAAiB;IAEjB,QAAQ,GAAA;KACP;;4HALU,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA/B,+BAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,+BAA+B,gECP5C,kEACA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;2FDMa,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAL3C,SAAS;+BACE,0BAA0B,EAAA,QAAA,EAAA,kEAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;;MEIzB,4BAA4B,CAAA;AAGrC,IAAA,WAAA,GAAA;AACI,QAAA,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;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|
5
5
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
|
|
6
6
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
|
|
7
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';
|
|
8
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/duration-box';
|
|
7
9
|
export * from '@spicainternational/ngx-sds-components/src/lib/layout';
|
|
8
10
|
export * from '@spicainternational/ngx-sds-components/src/lib/modal';
|
|
9
11
|
export * from '@spicainternational/ngx-sds-components/src/lib/navigation';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/layout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/page-header';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/duration-box';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/layout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/page-header';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spicainternational/ngx-sds-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "Spica design system angular components.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": ">=10.0.0",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"@spicainternational/sds-bootstrap": ">=2.1.2",
|
|
14
14
|
"@spicainternational/sds-core": ">=3.4.20",
|
|
15
15
|
"devextreme": ">=19.0.0",
|
|
16
|
-
"devextreme-angular": ">=19.0.0"
|
|
16
|
+
"devextreme-angular": ">=19.0.0",
|
|
17
|
+
"rxjs": ">=7.0.0"
|
|
17
18
|
},
|
|
18
19
|
"dependencies": {
|
|
19
20
|
"tslib": "^2.3.0"
|
|
@@ -84,6 +85,22 @@
|
|
|
84
85
|
"node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs",
|
|
85
86
|
"default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs"
|
|
86
87
|
},
|
|
88
|
+
"./src/lib/duration-box": {
|
|
89
|
+
"types": "./src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.d.ts",
|
|
90
|
+
"esm2020": "./esm2020/src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
|
|
91
|
+
"es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
|
|
92
|
+
"es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
|
|
93
|
+
"node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs",
|
|
94
|
+
"default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs"
|
|
95
|
+
},
|
|
96
|
+
"./src/lib/duration-pipe": {
|
|
97
|
+
"types": "./src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.d.ts",
|
|
98
|
+
"esm2020": "./esm2020/src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
|
|
99
|
+
"es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
|
|
100
|
+
"es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
|
|
101
|
+
"node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs",
|
|
102
|
+
"default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs"
|
|
103
|
+
},
|
|
87
104
|
"./src/lib/expansion-panel": {
|
|
88
105
|
"types": "./src/lib/expansion-panel/spicainternational-ngx-sds-components-src-lib-expansion-panel.d.ts",
|
|
89
106
|
"esm2020": "./esm2020/src/lib/expansion-panel/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs",
|
package/public-api.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export * from '@spicainternational/ngx-sds-components/src/lib/callout';
|
|
|
4
4
|
export * from '@spicainternational/ngx-sds-components/src/lib/color-picker';
|
|
5
5
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
|
|
6
6
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
|
|
7
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/duration-pipe';
|
|
8
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/duration-box';
|
|
7
9
|
export * from '@spicainternational/ngx-sds-components/src/lib/layout';
|
|
8
10
|
export * from '@spicainternational/ngx-sds-components/src/lib/modal';
|
|
9
11
|
export * from '@spicainternational/ngx-sds-components/src/lib/navigation';
|
|
@@ -56,11 +56,12 @@ export declare class SdsDatePickerComponent implements OnInit, OnChanges {
|
|
|
56
56
|
private initCalendarValue;
|
|
57
57
|
private singleDatePickerBox;
|
|
58
58
|
private selectedDateStartBox;
|
|
59
|
+
private selectedDateEndBox;
|
|
59
60
|
private calendar;
|
|
61
|
+
private _selectedDateRangeButton;
|
|
60
62
|
constructor(changeRef: ChangeDetectorRef, datePickerService: SdsDatePickerService);
|
|
61
63
|
ngOnInit(): void;
|
|
62
64
|
ngOnChanges(changes: SimpleChanges): void;
|
|
63
|
-
onKeydownHandler(event: KeyboardEvent): void;
|
|
64
65
|
randomIdReference: number;
|
|
65
66
|
setDateRangeDefinitions(definitions: Array<PeriodPickerDateRangeDefinition>): void;
|
|
66
67
|
setTranslations(translations: PeriodPickerTranslations): void;
|
|
@@ -82,15 +83,18 @@ export declare class SdsDatePickerComponent implements OnInit, OnChanges {
|
|
|
82
83
|
setNextPreviousDay(setNext: any): void;
|
|
83
84
|
setNextPreviousRange(setNext: boolean): void;
|
|
84
85
|
getCellCssClass(date: any): string;
|
|
86
|
+
selectEndDate(): void;
|
|
87
|
+
onKeydown(event: KeyboardEvent): void;
|
|
88
|
+
private handleLocalesChange;
|
|
85
89
|
private updateCustomText;
|
|
86
90
|
private removeDxDefaultCalendarFocus;
|
|
87
91
|
private setSelectedDateRangeText;
|
|
88
92
|
toggleDateRangeSelectorVisibility(): void;
|
|
89
93
|
changDateRange(range: PeriodPickerDateRange): void;
|
|
90
|
-
matchDateRange
|
|
94
|
+
private matchDateRange;
|
|
91
95
|
private setDateRangeText;
|
|
92
|
-
formatDate
|
|
93
|
-
generateDateRanges
|
|
96
|
+
private formatDate;
|
|
97
|
+
private generateDateRanges;
|
|
94
98
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsDatePickerComponent, never>;
|
|
95
99
|
static ɵcmp: i0.ɵɵComponentDeclaration<SdsDatePickerComponent, "sds-date-picker", never, { "selectionKind": "selectionKind"; "dateRangeDefinitions": "dateRangeDefinitions"; "selectedDate": "selectedDate"; "selectedDateStart": "selectedDateStart"; "selectedDateEnd": "selectedDateEnd"; "minDate": "minDate"; "maxDate": "maxDate"; "locales": "locales"; "disabled": "disabled"; "validationError": "validationError"; "isValid": "isValid"; "disabledDates": "disabledDates"; "applyText": "applyText"; "cancelText": "cancelText"; "translations": "translations"; "firstDayOfWeek": "firstDayOfWeek"; "dateRangeDefinitionsWidth": "dateRangeDefinitionsWidth"; "showPreviousAndNextButtons": "showPreviousAndNextButtons"; "width": "width"; }, { "selectedDateChange": "selectedDateChange"; "selectedDateStartChange": "selectedDateStartChange"; "selectedDateEndChange": "selectedDateEndChange"; "periodChange": "periodChange"; }, never, never>;
|
|
96
100
|
}
|
|
@@ -12,7 +12,7 @@ export declare class SdsDateFormatPipe implements PipeTransform {
|
|
|
12
12
|
*
|
|
13
13
|
* @publicApi
|
|
14
14
|
*/
|
|
15
|
-
transform(date: Date | number | string, locales: string | Array<string>, options?: Intl.DateTimeFormatOptions | 'time' | 'date' | 'date-medium' | 'date-long' | 'date-time'): string;
|
|
15
|
+
transform(date: Date | number | string | undefined, locales: string | Array<string>, options?: Intl.DateTimeFormatOptions | 'time' | 'date' | 'date-medium' | 'date-long' | 'date-time'): string;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsDateFormatPipe, never>;
|
|
17
17
|
static ɵpipe: i0.ɵɵPipeDeclaration<SdsDateFormatPipe, "sdsDateFormat">;
|
|
18
18
|
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { DurationBoxRangeViolationHandling } from './duration-box.types';
|
|
3
|
+
import { DurationService } from './duration.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Component allows user to enter duration in h:mm format. User may also select no value is this is applicable to the
|
|
7
|
+
* use case. A list of pre-defined durations can be provided for easier selection.
|
|
8
|
+
*
|
|
9
|
+
* The auto resolve function tries to convert entered text into minutes. The algorithm splits entry into two parts
|
|
10
|
+
* hours and minutes based on delimiter or if there is none - it takes last two digits as minutes.
|
|
11
|
+
*
|
|
12
|
+
* @export
|
|
13
|
+
* @class SdsDurationBoxComponent
|
|
14
|
+
*/
|
|
15
|
+
export declare class SdsDurationBoxComponent implements OnInit, OnChanges, AfterViewInit {
|
|
16
|
+
private _durationInputResolver;
|
|
17
|
+
/**
|
|
18
|
+
* Duration length expressed in minutes; when we allow empty values this property can be null.
|
|
19
|
+
*
|
|
20
|
+
* @type {(number | null)}
|
|
21
|
+
* @memberof SdsDurationBoxComponent
|
|
22
|
+
*/
|
|
23
|
+
value: number | null;
|
|
24
|
+
valueChange: EventEmitter<number | null>;
|
|
25
|
+
/**
|
|
26
|
+
* Allow user to select empty value. You should provide emptyValueText in this case. The emitted value is 'null'.
|
|
27
|
+
*
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
* @memberof SdsDurationBoxComponent
|
|
30
|
+
*/
|
|
31
|
+
allowEmptyValue: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Text to be displayed when value is cleared
|
|
34
|
+
*
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof SdsDurationBoxComponent
|
|
37
|
+
*/
|
|
38
|
+
emptyValueText: string;
|
|
39
|
+
/**
|
|
40
|
+
* Array of pre-defined durations that will be displayed in dropdown for easier selection.
|
|
41
|
+
*
|
|
42
|
+
* @type {number[]}
|
|
43
|
+
* @memberof SdsDurationBoxComponent
|
|
44
|
+
*/
|
|
45
|
+
options?: number[];
|
|
46
|
+
/**
|
|
47
|
+
* Width of component. By default 10rem.
|
|
48
|
+
*
|
|
49
|
+
* @type {string}
|
|
50
|
+
* @memberof SdsDurationBoxComponent
|
|
51
|
+
*/
|
|
52
|
+
width: string;
|
|
53
|
+
/**
|
|
54
|
+
* Specifies whether the UI component responds to user interaction.
|
|
55
|
+
*
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof SdsDurationBoxComponent
|
|
58
|
+
*/
|
|
59
|
+
disabled: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Specifies whether to display the Clear button in the UI component.
|
|
62
|
+
*
|
|
63
|
+
* @type {boolean}
|
|
64
|
+
* @memberof SdsDurationBoxComponent
|
|
65
|
+
*/
|
|
66
|
+
showClearButton: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The maximum value accepted by the duration box.
|
|
69
|
+
*
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @memberof SdsDurationBoxComponent
|
|
72
|
+
*/
|
|
73
|
+
max?: number;
|
|
74
|
+
/**
|
|
75
|
+
* The minimum value accepted by the duration box.
|
|
76
|
+
*
|
|
77
|
+
* @type {number}
|
|
78
|
+
* @memberof SdsDurationBoxComponent
|
|
79
|
+
*/
|
|
80
|
+
min?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Specifies how range limits are handled.
|
|
83
|
+
*
|
|
84
|
+
* @type {('fallbackToLastValue' | 'showValidationError')}
|
|
85
|
+
* @memberof SdsDurationBoxComponent
|
|
86
|
+
*/
|
|
87
|
+
rangeViolationHandling: DurationBoxRangeViolationHandling;
|
|
88
|
+
/**
|
|
89
|
+
* Range violation message. Applicable when rangeViolationHandling is set to 'autoResolve'
|
|
90
|
+
*
|
|
91
|
+
* @type {string}
|
|
92
|
+
* @memberof SdsDurationBoxComponent
|
|
93
|
+
*/
|
|
94
|
+
rangeViolationText: string;
|
|
95
|
+
/**
|
|
96
|
+
* Indicates whether the editor's value is valid.
|
|
97
|
+
*
|
|
98
|
+
* @type {boolean}
|
|
99
|
+
* @memberof SdsDurationBoxComponent
|
|
100
|
+
*/
|
|
101
|
+
isValid: boolean;
|
|
102
|
+
elementUUID: string;
|
|
103
|
+
inputValue: string;
|
|
104
|
+
showOptions: boolean;
|
|
105
|
+
optionsDropdownButton: {
|
|
106
|
+
icon: string;
|
|
107
|
+
stylingMode: string;
|
|
108
|
+
onClick: () => void;
|
|
109
|
+
};
|
|
110
|
+
clearValueButton: {
|
|
111
|
+
icon: string;
|
|
112
|
+
stylingMode: string;
|
|
113
|
+
elementAttr: {
|
|
114
|
+
class: string;
|
|
115
|
+
};
|
|
116
|
+
onClick: () => void;
|
|
117
|
+
};
|
|
118
|
+
isValueEmpty: boolean;
|
|
119
|
+
private _validationRule;
|
|
120
|
+
private _validator;
|
|
121
|
+
private isValueSetInternally;
|
|
122
|
+
private _durationPipe;
|
|
123
|
+
constructor(_durationInputResolver: DurationService);
|
|
124
|
+
ngAfterViewInit(): void;
|
|
125
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
126
|
+
ngOnInit(): void;
|
|
127
|
+
blockNonNumberOrSemicolon(e: any): void;
|
|
128
|
+
resolveInput(): void;
|
|
129
|
+
applyOption(value: number | null): void;
|
|
130
|
+
checkIfValid(): boolean;
|
|
131
|
+
private setValue;
|
|
132
|
+
private setInputValueInternally;
|
|
133
|
+
private setValidationStatusAndValidate;
|
|
134
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsDurationBoxComponent, never>;
|
|
135
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsDurationBoxComponent, "sds-duration-box", never, { "value": "value"; "allowEmptyValue": "allowEmptyValue"; "emptyValueText": "emptyValueText"; "options": "options"; "width": "width"; "disabled": "disabled"; "showClearButton": "showClearButton"; "max": "max"; "min": "min"; "rangeViolationHandling": "rangeViolationHandling"; "rangeViolationText": "rangeViolationText"; }, { "valueChange": "valueChange"; }, never, never>;
|
|
136
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./duration-box.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@spicainternational/ngx-sds-components/src/lib/duration-pipe";
|
|
5
|
+
import * as i4 from "devextreme-angular";
|
|
6
|
+
export declare class SdsDurationBoxModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsDurationBoxModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsDurationBoxModule, [typeof i1.SdsDurationBoxComponent], [typeof i2.CommonModule, typeof i3.SdsDurationPipeModule, typeof i4.DxTextBoxModule, typeof i4.DxPopoverModule, typeof i4.DxScrollViewModule, typeof i4.DxValidatorModule], [typeof i1.SdsDurationBoxComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SdsDurationBoxModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type DurationBoxRangeViolationHandling = 'autoResolve' | 'markAsInvalid';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class DurationService {
|
|
3
|
+
constructor();
|
|
4
|
+
resolve(input: string): number | null;
|
|
5
|
+
isValidInput(input: string): boolean;
|
|
6
|
+
getDefaultValue(min?: number, max?: number): number;
|
|
7
|
+
isValueWithinLimits(value: number, min?: number, max?: number): boolean;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DurationService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DurationService>;
|
|
10
|
+
}
|